npm package diff
Package: @forge/cli-shared
Versions: 8.0.0 - 8.0.1-next.0
File: package/out/graphql/minimal-graphql-runner.js
Index: package/out/graphql/minimal-graphql-runner.js
===================================================================
--- package/out/graphql/minimal-graphql-runner.js
+++ package/out/graphql/minimal-graphql-runner.js
@@ -1,11 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-exports.MinimalGraphQLRunner = exports.GraphqlError = exports.GraphQLProviderServiceError = exports.OutdatedClientVersionError = exports.GraphQLAuthenticationError = void 0;
+exports.MinimalGraphQLRunner = exports.GraphqlError = exports.GraphQLProviderServiceError = exports.OutdatedClientVersionError = exports.GraphQLAuthenticationError = exports.BUSINESS_UNITS = exports.NON_PROD_BUSINESS_UNIT = exports.PROD_BUSINESS_UNIT = exports.SERVICE_NAME = void 0;
const graphql_request_1 = require("graphql-request");
const index_1 = require("../index");
const shared_1 = require("../shared");
const ui_1 = require("../ui");
+exports.SERVICE_NAME = 'forge-cli';
+exports.PROD_BUSINESS_UNIT = 'Ecosystem - COGS';
+exports.NON_PROD_BUSINESS_UNIT = 'Ecosystem Engineering';
+exports.BUSINESS_UNITS = {
+ DEV: exports.NON_PROD_BUSINESS_UNIT,
+ STG: exports.NON_PROD_BUSINESS_UNIT,
+ PROD: exports.PROD_BUSINESS_UNIT,
+ FEDRAMP_MODERATE_STAGING: exports.NON_PROD_BUSINESS_UNIT,
+ FEDRAMP_MODERATE_PROD: exports.PROD_BUSINESS_UNIT
+};
class GraphQLAuthenticationError extends shared_1.UserError {
}
exports.GraphQLAuthenticationError = GraphQLAuthenticationError;
const isOutdatedClientVersionError = (error) => error.message?.includes('client version is outdated');
@@ -75,12 +85,19 @@
...authorizationHeader,
...(this.cliDetails ? { 'user-agent': `${this.getClientName()}/${this.getClientVersion()}` } : {}),
...{
'atl-client-name': `${this.getClientName()}`,
- 'atl-client-version': `${this.getClientVersion()}`
+ 'atl-client-version': `${this.getClientVersion()}`,
+ 'atl-attribution': this.getAttribution()
}
};
}
+ getAttribution() {
+ return JSON.stringify({
+ businessUnit: (0, index_1.getEnvironmentConfig)(exports.BUSINESS_UNITS),
+ service: exports.SERVICE_NAME
+ });
+ }
getClientName() {
return this.cliDetails?.name || index_1.FORGE_CLI_PACKAGE;
}
getClientVersion() {