@forge/cli-shared 2.4.2 → 2.5.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,7 +11,7 @@ export declare class MutationAwareGraphQLClient implements GraphQLClient {
11
11
  private readonly runner;
12
12
  constructor(runner: GraphQLRunner);
13
13
  mutate<TLabel extends keyof AvailableMutations, TVariables>(query: string, variables: TVariables): Promise<{
14
- response: Record<TLabel, NonNullable<Required<Pick<import("./graphql-types").Mutation, "customerSupport" | "shepherd" | "helpObjectStore" | "jsw" | "devOps" | "jira" | "roadmaps" | "confluence" | "polaris" | "ecosystem" | "jiraOAuthApps" | "helpCenter" | "compass" | "createJiraProjectAndDevOpsToolRelationship" | "deleteJiraProjectAndDevOpsToolRelationship" | "createColumn" | "setColumnName" | "rankColumn" | "setColumnLimit" | "deleteColumn" | "startSprint" | "createSprint" | "completeSprint" | "deleteSprint" | "moveSprintUp" | "moveSprintDown" | "editSprint" | "setUserSwimlaneStrategy" | "setSwimlaneStrategy" | "setEstimationType" | "createCustomFilter" | "updateCustomFilter" | "deleteCustomFilter" | "boardCardMove" | "assignIssueParent" | "unassignIssueParent" | "createCardParent" | "rankCardParent" | "setIssueMediaVisibility" | "toggleBoardFeature" | "setBoardEstimationType" | "createApp" | "updateAppDetails" | "deleteApp" | "updateAtlassianOAuthClient" | "createReleaseNote" | "publishReleaseNote" | "updateReleaseNote" | "updateNavbarConnectionStateTabSeen" | "createDevOpsServiceAndOpsgenieTeamRelationship" | "updateDevOpsServiceAndOpsgenieTeamRelationship" | "deleteDevOpsServiceAndOpsgenieTeamRelationship" | "updateDevOpsContainerRelationshipEntityProperties" | "deleteDevOpsContainerRelationshipEntityProperties" | "createDevOpsServiceAndJiraProjectRelationship" | "updateDevOpsServiceAndJiraProjectRelationship" | "deleteDevOpsServiceAndJiraProjectRelationship" | "createDevOpsServiceAndRepositoryRelationship" | "updateDevOpsServiceAndRepositoryRelationship" | "deleteDevOpsServiceAndRepositoryRelationship" | "createJiraProjectAndOpsgenieTeamRelationship" | "updateJiraProjectAndOpsgenieTeamRelationship" | "deleteJiraProjectAndOpsgenieTeamRelationship" | "createJiraProjectAndRepositoryRelationship" | "updateJiraProjectAndRepositoryRelationship" | "deleteJiraProjectAndRepositoryRelationship" | "createDevOpsService" | "updateDevOpsService" | "deleteDevOpsService" | "createDevOpsServiceRelationship" | "updateDevOpsServiceRelationship" | "deleteDevOpsServiceRelationship" | "updateDevOpsServiceEntityProperties" | "deleteDevOpsServiceEntityProperties" | "updateDeveloperLogAccess" | "appStorage" | "updatePolarisTermsConsent" | "createPolarisAnonymousVisitorHash" | "deletePolarisAnonymousVisitorHash" | "resolvePolarisObject" | "invokePolarisObject" | "createPolarisComment" | "updatePolarisComment" | "createPolarisStandardField" | "createPolarisCalculatedField" | "updatePolarisCalculatedField" | "updatePolarisFieldDescription" | "updatePolarisFieldEmoji" | "deletePolarisField" | "updatePolarisFieldOptionWeight" | "deletePolarisFieldOption" | "createPolarisDecoration" | "updatePolarisDecoration" | "deletePolarisDecoration" | "createPolarisIdeaTemplate" | "updatePolarisIdea" | "createPolarisInsight" | "updatePolarisInsight" | "deletePolarisInsight" | "copyPolarisInsights" | "archivePolarisInsights" | "unarchivePolarisInsights" | "createPolarisPlay" | "createPolarisPlayContribution" | "updatePolarisPlayContribution" | "deletePolarisPlayContribution" | "createPolarisInsightFromPlayContribution" | "configurePolarisRefresh" | "applyPolarisProjectTemplate" | "setPolarisProjectOnboarded" | "setPolarisSelectedDeliveryProject" | "refreshPolarisSnippets" | "setPolarisSnippetPropertiesConfig" | "createPolarisView" | "updatePolarisView" | "updatePolarisViewRankV2" | "deletePolarisView" | "updatePolarisViewLastViewedTimestamp" | "createPolarisViewSet" | "updatePolarisViewSet" | "deletePolarisViewSet" | "createAppTunnels" | "deleteAppTunnels" | "invokeExtension" | "invokeAuxEffects" | "userAuthTokenForExtension" | "createWebTriggerUrl" | "deleteWebTriggerUrl" | "watchMarketplaceApp" | "unwatchMarketplaceApp" | "installApp" | "uninstallApp" | "upgradeApp" | "subscribeToApp" | "unsubscribeFromApp" | "createAppDeploymentUrl" | "createHostedResourceUploadUrl" | "setExternalAuthCredentials" | "setAppEnvironmentVariable" | "deleteAppEnvironmentVariable" | "createAppDeployment" | "deleteConfluenceSpaceRelationshipsForJiraProject">>[TLabel]>>;
14
+ response: Record<TLabel, NonNullable<Required<Pick<import("./graphql-types").Mutation, "customerSupport" | "shepherd" | "helpObjectStore" | "jsw" | "devOps" | "jira" | "roadmaps" | "confluence" | "polaris" | "ecosystem" | "jiraOAuthApps" | "helpCenter" | "compass" | "createJiraProjectAndDevOpsToolRelationship" | "deleteJiraProjectAndDevOpsToolRelationship" | "createColumn" | "setColumnName" | "rankColumn" | "setColumnLimit" | "deleteColumn" | "startSprint" | "createSprint" | "completeSprint" | "deleteSprint" | "moveSprintUp" | "moveSprintDown" | "editSprint" | "setUserSwimlaneStrategy" | "setSwimlaneStrategy" | "setEstimationType" | "createCustomFilter" | "updateCustomFilter" | "deleteCustomFilter" | "boardCardMove" | "assignIssueParent" | "unassignIssueParent" | "createCardParent" | "rankCardParent" | "setIssueMediaVisibility" | "toggleBoardFeature" | "setBoardEstimationType" | "createApp" | "updateAppDetails" | "deleteApp" | "updateAtlassianOAuthClient" | "createReleaseNote" | "publishReleaseNote" | "updateReleaseNote" | "updateNavbarConnectionStateTabSeen" | "createDevOpsServiceAndOpsgenieTeamRelationship" | "updateDevOpsServiceAndOpsgenieTeamRelationship" | "deleteDevOpsServiceAndOpsgenieTeamRelationship" | "updateDevOpsContainerRelationshipEntityProperties" | "deleteDevOpsContainerRelationshipEntityProperties" | "createDevOpsServiceAndJiraProjectRelationship" | "updateDevOpsServiceAndJiraProjectRelationship" | "deleteDevOpsServiceAndJiraProjectRelationship" | "createDevOpsServiceAndRepositoryRelationship" | "updateDevOpsServiceAndRepositoryRelationship" | "deleteDevOpsServiceAndRepositoryRelationship" | "createJiraProjectAndOpsgenieTeamRelationship" | "updateJiraProjectAndOpsgenieTeamRelationship" | "deleteJiraProjectAndOpsgenieTeamRelationship" | "createJiraProjectAndRepositoryRelationship" | "updateJiraProjectAndRepositoryRelationship" | "deleteJiraProjectAndRepositoryRelationship" | "createDevOpsService" | "updateDevOpsService" | "deleteDevOpsService" | "createDevOpsServiceRelationship" | "updateDevOpsServiceRelationship" | "deleteDevOpsServiceRelationship" | "updateDevOpsServiceEntityProperties" | "deleteDevOpsServiceEntityProperties" | "updateDeveloperLogAccess" | "appStorage" | "updatePolarisTermsConsent" | "createPolarisAnonymousVisitorHash" | "deletePolarisAnonymousVisitorHash" | "resolvePolarisObject" | "invokePolarisObject" | "createPolarisComment" | "updatePolarisComment" | "createPolarisStandardField" | "createPolarisCalculatedField" | "updatePolarisCalculatedField" | "updatePolarisFieldDescription" | "updatePolarisFieldEmoji" | "deletePolarisField" | "updatePolarisFieldOptionWeight" | "deletePolarisFieldOption" | "createPolarisDecoration" | "updatePolarisDecoration" | "deletePolarisDecoration" | "createPolarisIdeaTemplate" | "updatePolarisIdeaTemplate" | "updatePolarisIdea" | "createPolarisInsight" | "updatePolarisInsight" | "deletePolarisInsight" | "copyPolarisInsights" | "archivePolarisInsights" | "unarchivePolarisInsights" | "createPolarisPlay" | "createPolarisPlayContribution" | "updatePolarisPlayContribution" | "deletePolarisPlayContribution" | "createPolarisInsightFromPlayContribution" | "configurePolarisRefresh" | "applyPolarisProjectTemplate" | "setPolarisProjectOnboarded" | "setPolarisSelectedDeliveryProject" | "refreshPolarisSnippets" | "setPolarisSnippetPropertiesConfig" | "createPolarisView" | "updatePolarisView" | "updatePolarisViewRankV2" | "deletePolarisView" | "updatePolarisViewLastViewedTimestamp" | "createPolarisViewSet" | "updatePolarisViewSet" | "deletePolarisViewSet" | "createAppTunnels" | "deleteAppTunnels" | "invokeExtension" | "invokeAuxEffects" | "userAuthTokenForExtension" | "createWebTriggerUrl" | "deleteWebTriggerUrl" | "watchMarketplaceApp" | "unwatchMarketplaceApp" | "installApp" | "uninstallApp" | "upgradeApp" | "subscribeToApp" | "unsubscribeFromApp" | "createAppDeploymentUrl" | "createHostedResourceUploadUrl" | "setExternalAuthCredentials" | "setAppEnvironmentVariable" | "deleteAppEnvironmentVariable" | "createAppDeployment" | "deleteConfluenceSpaceRelationshipsForJiraProject">>[TLabel]>>;
15
15
  requestId: string | undefined;
16
16
  }>;
17
17
  query<TVariables, TResponse>(query: string, variables: TVariables): Promise<TResponse>;
@@ -0,0 +1,35 @@
1
+ import { LDClient, LDOptions, LDUser } from 'launchdarkly-node-client-sdk';
2
+ import { PersonalApiCredentialsGetter } from '../auth';
3
+ import { ConfigSectionReader } from '../config';
4
+ import { getEnvironment } from '../graphql';
5
+ import { CLIDetails } from '../shared';
6
+ import { Logger } from '../ui';
7
+ declare type FeatureFlagType = {
8
+ 'forge-cli-test-flag': 'apple' | 'banana' | 'orange' | 'watermelon';
9
+ 'forge-cli-startup-warning': string;
10
+ 'xls-lambda-runtime': string;
11
+ };
12
+ export declare type FeatureFlag = keyof FeatureFlagType;
13
+ export interface FeatureFlagReader {
14
+ readFlag<F extends FeatureFlag>(flag: F): Promise<FeatureFlagType[F] | null>;
15
+ }
16
+ declare type ILaunchDarkly = Pick<LDClient, 'variation' | 'waitUntilReady'>;
17
+ declare type LaunchDarklyInitialize = (envKey: string, user: LDUser, options?: LDOptions) => ILaunchDarkly;
18
+ export declare function cachedMethod<C, T>(getter: (this: C) => Promise<T>): (this: C) => Promise<T>;
19
+ export declare class FeatureFlagService implements FeatureFlagReader {
20
+ private readonly logger;
21
+ private readonly cliDetails;
22
+ private readonly userCredentials;
23
+ private readonly appConfigReader;
24
+ private readonly getEnvironmentFn;
25
+ private readonly initializeLD;
26
+ constructor(logger: Logger, cliDetails: Pick<CLIDetails, 'version'> | undefined, userCredentials: PersonalApiCredentialsGetter, appConfigReader: ConfigSectionReader<{
27
+ id: string;
28
+ }>, getEnvironmentFn?: typeof getEnvironment, initializeLD?: LaunchDarklyInitialize);
29
+ private appID;
30
+ private user;
31
+ private client;
32
+ readFlag<F extends FeatureFlag>(flag: F): Promise<FeatureFlagType[F] | null>;
33
+ }
34
+ export {};
35
+ //# sourceMappingURL=feature-flag-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature-flag-service.d.ts","sourceRoot":"","sources":["../../src/service/feature-flag-service.ts"],"names":[],"mappings":"AAAA,OAAqB,EAAe,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAKtG,OAAO,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAyB/B,aAAK,eAAe,GAAG;IACrB,qBAAqB,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,YAAY,CAAC;IACpE,2BAA2B,EAAE,MAAM,CAAC;IACpC,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,oBAAY,WAAW,GAAG,MAAM,eAAe,CAAC;AAKhD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,CAAC,SAAS,WAAW,EAAE,IAAI,EAAE,CAAC,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;CAC9E;AAmBD,aAAK,aAAa,GAAG,IAAI,CAAC,QAAQ,EAAE,WAAW,GAAG,gBAAgB,CAAC,CAAC;AAMpE,aAAK,sBAAsB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,KAAK,aAAa,CAAC;AAEnG,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAa3F;AAKD,qBAAa,kBAAmB,YAAW,iBAAiB;IAExD,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,YAAY;gBALZ,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC,GAAG,SAAS,EACnD,eAAe,EAAE,4BAA4B,EAC7C,eAAe,EAAE,mBAAmB,CAAC;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,EACpD,gBAAgB,GAAE,OAAO,cAA+B,EACxD,YAAY,GAAE,sBAAgD;IAOjF,OAAO,CAAC,KAAK,CAOV;IAMH,OAAO,CAAC,IAAI,CAkBT;IAEH,OAAO,CAAC,MAAM,CAYX;IAEG,QAAQ,CAAC,CAAC,SAAS,WAAW,EAAE,IAAI,EAAE,CAAC,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;CAUnF"}
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FeatureFlagService = exports.cachedMethod = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const launchdarkly_node_client_sdk_1 = tslib_1.__importStar(require("launchdarkly-node-client-sdk"));
6
+ const env_paths_1 = tslib_1.__importDefault(require("env-paths"));
7
+ const fs_1 = require("fs");
8
+ const util_1 = require("util");
9
+ const graphql_1 = require("../graphql");
10
+ var CLIENT_SIDE_ID;
11
+ (function (CLIENT_SIDE_ID) {
12
+ CLIENT_SIDE_ID["DEV"] = "5d22bfb52c6a0707aac5be90";
13
+ CLIENT_SIDE_ID["STG"] = "5d1eed1f47274b07674b9395";
14
+ CLIENT_SIDE_ID["PROD"] = "5d1eecfe47274b07674b938f";
15
+ })(CLIENT_SIDE_ID || (CLIENT_SIDE_ID = {}));
16
+ function cachedMethod(getter) {
17
+ const cacheDict = new Map();
18
+ return async function () {
19
+ const cached = cacheDict.get(this);
20
+ if (cached !== undefined) {
21
+ return cached;
22
+ }
23
+ const value = await getter.call(this);
24
+ cacheDict.set(this, value);
25
+ return value;
26
+ };
27
+ }
28
+ exports.cachedMethod = cachedMethod;
29
+ class FeatureFlagService {
30
+ constructor(logger, cliDetails, userCredentials, appConfigReader, getEnvironmentFn = graphql_1.getEnvironment, initializeLD = launchdarkly_node_client_sdk_1.default.initialize) {
31
+ this.logger = logger;
32
+ this.cliDetails = cliDetails;
33
+ this.userCredentials = userCredentials;
34
+ this.appConfigReader = appConfigReader;
35
+ this.getEnvironmentFn = getEnvironmentFn;
36
+ this.initializeLD = initializeLD;
37
+ this.appID = cachedMethod(async () => {
38
+ try {
39
+ const config = await this.appConfigReader.readConfigSection();
40
+ return config == 'missing' || config == 'invalid' ? null : config.id;
41
+ }
42
+ catch (e) {
43
+ return null;
44
+ }
45
+ });
46
+ this.user = cachedMethod(async () => {
47
+ const custom = {};
48
+ const appID = await this.appID();
49
+ if (appID) {
50
+ custom.appID = appID;
51
+ }
52
+ if (this.cliDetails) {
53
+ custom.version = this.cliDetails.version;
54
+ }
55
+ let key;
56
+ try {
57
+ key = (await this.userCredentials.getCredentials()).accountId;
58
+ }
59
+ catch (e) {
60
+ key = 'anonymous';
61
+ }
62
+ return { key, anonymous: true, custom };
63
+ });
64
+ this.client = cachedMethod(async () => {
65
+ const clientSideID = this.getEnvironmentFn(CLIENT_SIDE_ID);
66
+ const user = await this.user();
67
+ const cachePath = env_paths_1.default('@forge/cli').cache;
68
+ await util_1.promisify(fs_1.mkdir)(cachePath, { recursive: true });
69
+ const options = {
70
+ bootstrap: 'localStorage',
71
+ localStoragePath: cachePath,
72
+ logger: launchdarkly_node_client_sdk_1.basicLogger({ level: 'error' }),
73
+ sendEvents: false
74
+ };
75
+ return this.initializeLD(clientSideID, user, options);
76
+ });
77
+ }
78
+ async readFlag(flag) {
79
+ try {
80
+ const client = await this.client();
81
+ await client.waitUntilReady();
82
+ return client.variation(flag, null);
83
+ }
84
+ catch (e) {
85
+ this.logger.error(new Error('Failed to read feature flags. Proceeding with defaults.'));
86
+ return null;
87
+ }
88
+ }
89
+ }
90
+ exports.FeatureFlagService = FeatureFlagService;
@@ -1,3 +1,4 @@
1
1
  export * from './bridge-script-service';
2
2
  export * from './iframe-resizer-script-service';
3
+ export * from './feature-flag-service';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/service/index.ts"],"names":[],"mappings":"AAEA,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/service/index.ts"],"names":[],"mappings":"AAEA,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAChD,cAAc,wBAAwB,CAAC"}
@@ -3,3 +3,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./bridge-script-service"), exports);
5
5
  tslib_1.__exportStar(require("./iframe-resizer-script-service"), exports);
6
+ tslib_1.__exportStar(require("./feature-flag-service"), exports);
@@ -1,5 +1,5 @@
1
1
  import { Logger } from '../ui';
2
2
  export declare class HiddenError extends Error {
3
3
  }
4
- export declare const exitOnError: (logger: Logger) => (error?: HiddenError | undefined) => never;
4
+ export declare const exitOnError: (logger: Logger) => (error?: Error | undefined) => never;
5
5
  //# sourceMappingURL=error-handling.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"error-handling.d.ts","sourceRoot":"","sources":["../../src/shared/error-handling.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAG/B,qBAAa,WAAY,SAAQ,KAAK;CAAG;AAUzC,eAAO,MAAM,WAAW,WAAY,MAAM,0CAA4B,KAarE,CAAC"}
1
+ {"version":3,"file":"error-handling.d.ts","sourceRoot":"","sources":["../../src/shared/error-handling.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAG/B,qBAAa,WAAY,SAAQ,KAAK;CAAG;AAUzC,eAAO,MAAM,WAAW,WAAY,MAAM,oCAAsB,KAa/D,CAAC"}
@@ -10,5 +10,6 @@ export interface Logger {
10
10
  }): void;
11
11
  snapshotLog(message: string, level: 'INFO' | 'WARNING' | 'ERROR'): void;
12
12
  }
13
+ export declare const NullLogger: Logger;
13
14
  export declare function errorMessage(error: Error): string;
14
15
  //# sourceMappingURL=logger.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/ui/logger.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IAEtB,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;IACvD,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,IAAI,CAAC;CACzE;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAEjD"}
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/ui/logger.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IAEtB,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;IACvD,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,IAAI,CAAC;CACzE;AAED,eAAO,MAAM,UAAU,EAAE,MAsBxB,CAAC;AAEF,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAEjD"}
package/out/ui/logger.js CHANGED
@@ -1,6 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.errorMessage = void 0;
3
+ exports.errorMessage = exports.NullLogger = void 0;
4
+ exports.NullLogger = {
5
+ traceEnabled: false,
6
+ debugEnabled: false,
7
+ trace() {
8
+ },
9
+ debug() {
10
+ },
11
+ info() {
12
+ },
13
+ warn() {
14
+ },
15
+ error() {
16
+ },
17
+ snapshotLog() {
18
+ }
19
+ };
4
20
  function errorMessage(error) {
5
21
  return error.message ? error.message : error.constructor.name;
6
22
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/cli-shared",
3
- "version": "2.4.2",
3
+ "version": "2.5.0-next.2",
4
4
  "description": "Common functionality for Forge CLI",
5
5
  "author": "Atlassian",
6
6
  "license": "UNLICENSED",
@@ -12,7 +12,7 @@
12
12
  "generate-graphql-types": "graphql-codegen --config src/graphql/codegen.yml"
13
13
  },
14
14
  "dependencies": {
15
- "@forge/manifest": "3.7.0",
15
+ "@forge/manifest": "3.8.0-next.1",
16
16
  "@forge/util": "1.2.0",
17
17
  "array.prototype.flatmap": "^1.2.3",
18
18
  "case": "^1.6.2",
@@ -21,6 +21,7 @@
21
21
  "cli-table3": "^0.6.1",
22
22
  "conf": "^6.2.0",
23
23
  "cross-spawn": "^7.0.1",
24
+ "env-paths": "^2.2.0",
24
25
  "figures": "^3.2.0",
25
26
  "fp-ts": "^2.0.1",
26
27
  "fs-extra": "^8.1.0",