@forge/cli-shared 3.15.2-next.3 → 3.16.0-next.14
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.
- package/CHANGELOG.md +87 -0
- package/out/auth/personal/credential-store.d.ts.map +1 -1
- package/out/auth/personal/credential-store.js +1 -2
- package/out/cache/cached-conf.d.ts +1 -0
- package/out/cache/cached-conf.d.ts.map +1 -1
- package/out/cache/cached-conf.js +3 -1
- package/out/config/config-file.d.ts +4 -1
- package/out/config/config-file.d.ts.map +1 -1
- package/out/config/config-file.js +9 -3
- package/out/graphql/graphql-types.d.ts +197 -5
- package/out/graphql/graphql-types.d.ts.map +1 -1
- package/out/graphql/graphql-types.js +10 -5
- package/out/graphql/minimal-graphql-runner.d.ts +6 -0
- package/out/graphql/minimal-graphql-runner.d.ts.map +1 -1
- package/out/graphql/minimal-graphql-runner.js +35 -23
- package/out/service/feature-flag-service.d.ts +0 -4
- package/out/service/feature-flag-service.d.ts.map +1 -1
- package/out/service/feature-flag-service.js +2 -8
- package/out/shared/cli-details.d.ts +1 -0
- package/out/shared/cli-details.d.ts.map +1 -1
- package/out/shared/cli-details.js +2 -1
- package/out/shared/error-handling.d.ts +9 -0
- package/out/shared/error-handling.d.ts.map +1 -1
- package/out/shared/error-handling.js +18 -1
- package/out/ui/command-line-ui.d.ts +2 -1
- package/out/ui/command-line-ui.d.ts.map +1 -1
- package/out/ui/command-line-ui.js +13 -3
- package/out/ui/text.d.ts +1 -0
- package/out/ui/text.d.ts.map +1 -1
- package/out/ui/text.js +5 -2
- package/package.json +7 -7
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CompassLinkType = exports.CompassLifecycleEventStage = exports.CompassIncidentEventState = exports.CompassIncidentEventSeverityLevel = exports.CompassFieldType = exports.CompassEventType = exports.CompassDeploymentEventState = exports.CompassDeploymentEventEnvironmentCategory = exports.CompassCustomEventIcon = exports.CompassCriteriaTextComparatorOptions = exports.CompassCriteriaNumberComparatorOptions = exports.CompassCriteriaBooleanComparatorOptions = exports.CompassComponentType = exports.CompassBuildEventState = exports.Classification = exports.CcpSubscriptionStatus = exports.CcpSubscriptionScheduleAction = exports.CcpEntitlementStatus = exports.CcpDuration = exports.CardHierarchyLevelEnumType = exports.BuiltinPolarisIdeaField = exports.BoardFeatureToggleStatus = exports.BoardFeatureStatus = exports.BitbucketPermission = exports.AtlassianProductHostingType = exports.AriGraphRelationshipsSortDirection = exports.AppTrustInformationState = exports.AppTaskState = exports.AppStoredEntityCondition = exports.AppStoredCustomEntityRangeCondition = exports.AppStoredCustomEntityFilterCondition = exports.AppSecurityPoliciesPermissionTypeExtension = exports.AppSecurityPoliciesPermissionType = exports.AppNetworkPermissionTypeExtension = exports.AppNetworkPermissionType = exports.AppEnvironmentType = exports.AppDeploymentStepStatus = exports.AppDeploymentStatus = exports.AppDeploymentEventLogLevel = exports.AppContributorRole = exports.ApiGroup = exports.ApiContext = exports.ActivityProduct = exports.ActivityObjectType = exports.ActivityEventType = exports.ActivitiesObjectType = exports.ActivitiesFilterType = exports.ActivitiesContainerType = exports.AccountStatus = exports.AcceptableResponse = void 0;
|
|
4
4
|
exports.DevOpsSecurityVulnerabilityStatus = exports.DevOpsSecurityVulnerabilitySeverity = exports.DevOpsRepositoryHostingProviderFilter = exports.DevOpsRelationshipCertaintyFilter = exports.DevOpsRelationshipCertainty = exports.DevOpsPullRequestStatus = exports.DevOpsPullRequestApprovalStatus = exports.DevOpsProviderType = exports.DevOpsMetricsRollupOption = exports.DevOpsMetricsResolutionUnit = exports.DevOpsMetricsCycleTimePhase = exports.DevOpsJiraProjectType = exports.DevOpsEnvironmentCategory = exports.DevOpsDocumentCategory = exports.DevOpsBuildState = exports.DeploymentState = exports.DataResidencyResponse = exports.DataClassificationPolicyDecisionStatus = exports.CustomEntityStatus = exports.CustomEntityIndexStatus = exports.CustomEntityAttributeType = exports.ContentPlatformSearchTypes = exports.ContentPlatformOperators = exports.ContentPlatformFieldNames = exports.ContentPlatformBooleanOperators = exports.ConfluenceUserType = exports.ConfluenceSpaceType = exports.ConfluenceSpaceStatus = exports.ConfluenceSpaceSettingEditorVersion = exports.ConfluencePageStatus = exports.ConfluenceOperationTarget = exports.ConfluenceOperationName = exports.ConfluenceMutationContentStatus = exports.ConfluenceInlineTaskStatus = exports.ConfluenceInlineCommentResolutionStatus = exports.ConfluenceContributionStatus = exports.ConfluenceContentType = exports.ConfluenceContentRepresentation = exports.ConfluenceCommentType = exports.ConfluenceCommentStatus = exports.ConfluenceCollaborativeEditingService = exports.ConfluenceBodyRepresentation = exports.ConfluenceBlogPostStatus = exports.ComponentSyncEventStatus = exports.CompassScorecardQuerySortOrder = exports.CompassScorecardImportance = exports.CompassRelationshipType = exports.CompassRelationshipDirection = exports.CompassQuerySortOrder = exports.CompassMetricDefinitionType = void 0;
|
|
5
|
-
exports.
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
8
|
-
exports.
|
|
9
|
-
exports.SourceBillingType = exports.VirtualAgentIntentTemplateType = exports.UserInstallationRuleValue = exports.TrelloPluginDataScope = exports.TrelloPluginDataAccess = exports.TrelloCardRole = exports.TrelloCardCoverSize = exports.TrelloCardCoverColor = exports.TrelloCardCoverBrightness = exports.TownsquareTargetDateType = exports.TownsquareProjectStateValue = exports.TownsquareProjectSortEnum = exports.TownsquareGoalStateValue = exports.TownsquareGoalSortEnum = exports.ToolchainSyncState = exports.TeamStateV2 = exports.TeamState = exports.TeamSortOrder = exports.TeamSortField = exports.TeamMembershipState = exports.TeamMembershipSetting = exports.TeamMembershipRole = exports.SwimlaneStrategy = exports.SupportRequestUserType = exports.SupportRequestStatusCategory = exports.SupportRequestQueryStatusCategory = exports.SupportRequestQueryOwnership = void 0;
|
|
5
|
+
exports.JiraHomePageType = exports.JiraGrantTypeKeyEnum = exports.JiraFavouriteType = exports.JiraDevOpsIssuePanelState = exports.JiraDevOpsIssuePanelBannerType = exports.JiraDevOpsCapability = exports.JiraDevInfoConfigErrorType = exports.JiraDeploymentsFeaturePrecondition = exports.JiraCmdbAttributeType = exports.JiraCascadingSelectOptionType = exports.JiraCannedResponseSortOrder = exports.JiraCannedResponseScope = exports.JiraBulkEditMultiSelectFieldOptions = exports.JiraAttachmentsPermissions = exports.JiraApprovalDecision = exports.JiraActionType = exports.IssueDevOpsPullRequestStatus = exports.IssueDevOpsDeploymentState = exports.IssueDevOpsDeploymentEnvironmentType = exports.IssueDevOpsCommitChangeType = exports.HelpObjectStoreJsmEntityType = exports.HelpObjectStoreHelpObjectType = exports.HelpLayoutHeadingType = exports.HelpLayoutElementKey = exports.HelpLayoutElementCategory = exports.HelpLayoutCompositeElementKey = exports.HelpLayoutAtomicElementKey = exports.HelpCenterType = exports.GrantCheckProduct = exports.FunctionTriggerType = exports.FortifiedMetricsResolutionUnit = exports.FormStatus = exports.ForgeMetricsSiteFilterCategory = exports.ForgeMetricsResolutionUnit = exports.ForgeMetricsLabels = exports.ForgeMetricsGroupByDimensions = exports.ForgeMetricsDataType = exports.ForgeAuditLogsActionType = exports.ForgeAlertsStatus = exports.ForgeAlertsActivityType = exports.ExtensionContextsFilterType = exports.EventMatchingStrategies = exports.EventKnownAvIs = exports.EstimationType = exports.DevStatusActivity = exports.DevOpsToolSortOrder = exports.DevOpsToolIntegrationType = exports.DevOpsServiceRelationshipType = exports.DevOpsServiceAndRepositoryRelationshipSortBy = exports.DevOpsServiceAndJiraProjectRelationshipType = void 0;
|
|
6
|
+
exports.JiraSingleValueFieldOperations = exports.JiraShareableEntityGrant = exports.JiraServiceManagementPractice = exports.JiraServiceManagementMajorIncident = exports.JiraServiceManagementCreateRequestTypeFromTemplateWorkflowInputType = exports.JiraServiceManagementCreateRequestTypeFromTemplateWorkflowAction = exports.JiraServiceManagementCreateRequestTypeFromTemplateRequestFormInputType = exports.JiraServiceManagementCommentVisibility = exports.JiraServiceManagementApprovalState = exports.JiraServiceManagementApprovalDecisionResponseType = exports.JiraReviewState = exports.JiraReleasesIssueReleaseStatusFilter = exports.JiraReleasesEpicReleaseStatusFilter = exports.JiraReleaseNotesIssueKeyConfig = exports.JiraPullRequestState = exports.JiraProjectType = exports.JiraProjectStyle = exports.JiraProjectStatus = exports.JiraProjectSortField = exports.JiraProjectShortcutType = exports.JiraProjectPermissionCategoryEnum = exports.JiraProjectDateTimeFormat = exports.JiraProjectAndRepositoryRelationshipSortBy = exports.JiraProjectActionType = exports.JiraPermissionType = exports.JiraPermissionTagEnum = exports.JiraPermissionMessageTypeEnum = exports.JiraMultiValueFieldOperations = exports.JiraLongRunningTaskStatus = exports.JiraJqlViewContext = exports.JiraJqlSyntaxError = exports.JiraJqlOperator = exports.JiraJqlFunctionStatus = exports.JiraJqlClauseType = exports.JiraJqlBuilderMode = exports.JiraJqlAutocompleteType = exports.JiraJqlBuilderSearchMode = exports.JiraIteration = exports.JiraIssueViewTimestampDisplayMode = exports.JiraIssueViewAttachmentPanelViewMode = exports.JiraIssueViewActivityFeedSortOrder = exports.JiraIssueTransitionLayoutMessageType = exports.JiraIssueSearchFieldSetSelectedState = exports.JiraIssueNavigatorSearchLayout = exports.JiraIssueLinkDirection = exports.JiraIssueLifecycleState = exports.JiraIssueItemSystemContainerType = exports.JiraIssueItemLayoutItemLocationRuleType = exports.JiraIssueDeploymentEnvironmentState = exports.JiraInstallDeploymentsBannerPrecondition = void 0;
|
|
7
|
+
exports.PolarisPlayKind = exports.PolarisFieldType = exports.PolarisCommentKind = exports.PlanModeDestination = exports.PartnerCurrency = exports.PartnerCloudLicenseType = exports.PartnerBtfLicenseType = exports.NlpSearchResultType = exports.NlpErrorState = exports.NlpDisclaimer = exports.NadelHydrationTemplate = exports.MembershipState = exports.MembershipSetting = exports.MembershipRole = exports.MarketplaceProgramStatus = exports.MarketplacePricingTierType = exports.MarketplacePricingTierPolicy = exports.MarketplacePricingTierMode = exports.MarketplacePricingPlanStatus = exports.MarketplacePartnerType = exports.MarketplacePartnerTierType = exports.MarketplacePartnerSupportHolidayFrequency = exports.MarketplaceLocation = exports.MarketplaceListingStatus = exports.MarketplaceEntityStatus = exports.MarketplaceCloudFortifiedStatus = exports.MarketplaceBillingCycle = exports.MarketplaceAppVersionVisibility = exports.MarketplaceAppPermission = exports.MarketplaceAppPaymentModel = exports.LifecycleStage = exports.LicenseOverrideState = exports.JiraWatchesOperations = exports.JiraVotesOperations = exports.JiraVersionWarningConfigState = exports.JiraVersionWarningCategories = exports.JiraVersionStatus = exports.JiraVersionReleaseNotesType = exports.JiraVersionRelatedWorkType = exports.JiraVersionIssuesStatusCategories = exports.JiraVersionIssuesSortField = exports.JiraVersionIssuesFilter = exports.JiraVersionIssueTableColumn = exports.JiraVersionDetailsCollapsedUi = exports.JiraVersionApproverStatus = exports.JiraTransitionSortOption = exports.JiraTimeUnit = exports.JiraTimeFormat = exports.JiraStatusCategoryColor = exports.JiraSprintState = void 0;
|
|
8
|
+
exports.SupportRequestFieldDataType = exports.SubscriptionEventSources = exports.SprintState = exports.SprintReportsEstimationStatisticType = exports.SortOrder = exports.SortDirection = exports.SoftwareCardsDestinationEnum = exports.ShepherdWebhookType = exports.ShepherdWebhookDestinationType = exports.ShepherdSubscriptionStatus = exports.ShepherdRateThresholdValue = exports.ShepherdQueryErrorType = exports.ShepherdMutationErrorType = exports.ShepherdLoginDeviceType = exports.ShepherdDetectionScanningFrequency = exports.ShepherdAtlassianProduct = exports.ShepherdAlertTemplateType = exports.ShepherdAlertStatus = exports.ShepherdActionType = exports.SearchResultType = exports.SearchProjectType = exports.SearchIssueStatusCategory = exports.SearchContainerStatus = exports.SearchConfluenceRangeField = exports.SearchConfluenceDocumentStatus = exports.SearchBoardProductType = exports.Scope = exports.RoadmapVersionStatus = exports.RoadmapTimelineMode = exports.RoadmapSprintState = exports.RoadmapRankPosition = exports.RoadmapPaletteColor = exports.RoadmapLevelOneView = exports.RoadmapEpicView = exports.RoadmapChildIssuePlanningMode = exports.RateLimitingCurrency = exports.PrincipalType = exports.PolarisVisualizationType = exports.PolarisViewSortMode = exports.PolarisViewSetType = exports.PolarisViewLayoutType = exports.PolarisViewFilterOperator = exports.PolarisViewFilterKind = exports.PolarisViewFieldRollupType = exports.PolarisValueOperator = exports.PolarisTimelineMode = exports.PolarisSortOrder = exports.PolarisSnippetPropertyKind = exports.PolarisResolvedObjectAuthType = exports.PolarisRefreshError = void 0;
|
|
9
|
+
exports.SourceBillingType = exports.VirtualAgentIntentTemplateType = exports.UserInstallationRuleValue = exports.TrelloPluginDataScope = exports.TrelloPluginDataAccess = exports.TrelloCardRole = exports.TrelloCardCoverSize = exports.TrelloCardCoverColor = exports.TrelloCardCoverBrightness = exports.TownsquareTargetDateType = exports.TownsquareProjectStateValue = exports.TownsquareProjectSortEnum = exports.TownsquareGoalStateValue = exports.TownsquareGoalSortEnum = exports.ToolchainSyncState = exports.TeamStateV2 = exports.TeamState = exports.TeamSortOrder = exports.TeamSortField = exports.TeamMembershipState = exports.TeamMembershipSetting = exports.TeamMembershipRole = exports.SwimlaneStrategy = exports.SupportRequestUserType = exports.SupportRequestStatusCategory = exports.SupportRequestQueryStatusCategory = exports.SupportRequestQueryOwnership = exports.SupportRequestNamedContactOperation = void 0;
|
|
10
10
|
var AcceptableResponse;
|
|
11
11
|
(function (AcceptableResponse) {
|
|
12
12
|
AcceptableResponse["NotApplicable"] = "NOT_APPLICABLE";
|
|
@@ -986,6 +986,11 @@ var JiraActionType;
|
|
|
986
986
|
JiraActionType["CreateCompanyManagedProject"] = "CREATE_COMPANY_MANAGED_PROJECT";
|
|
987
987
|
JiraActionType["CreateTeamManagedProject"] = "CREATE_TEAM_MANAGED_PROJECT";
|
|
988
988
|
})(JiraActionType = exports.JiraActionType || (exports.JiraActionType = {}));
|
|
989
|
+
var JiraApprovalDecision;
|
|
990
|
+
(function (JiraApprovalDecision) {
|
|
991
|
+
JiraApprovalDecision["Approved"] = "APPROVED";
|
|
992
|
+
JiraApprovalDecision["Rejected"] = "REJECTED";
|
|
993
|
+
})(JiraApprovalDecision = exports.JiraApprovalDecision || (exports.JiraApprovalDecision = {}));
|
|
989
994
|
var JiraAttachmentsPermissions;
|
|
990
995
|
(function (JiraAttachmentsPermissions) {
|
|
991
996
|
JiraAttachmentsPermissions["CreateAttachments"] = "CREATE_ATTACHMENTS";
|
|
@@ -11,7 +11,13 @@ export declare class OutdatedClientVersionError extends UserError {
|
|
|
11
11
|
}
|
|
12
12
|
export declare class GraphQLProviderServiceError extends BaseError {
|
|
13
13
|
private readonly userError;
|
|
14
|
+
private readonly code;
|
|
15
|
+
private readonly statusCode;
|
|
16
|
+
readonly requestId: string | undefined;
|
|
14
17
|
constructor(userError: boolean, requestId: string | undefined, errors: GraphQLError[]);
|
|
18
|
+
getCode: () => string | undefined;
|
|
19
|
+
getStatusCode: () => number | undefined;
|
|
20
|
+
getRequestId: () => string | undefined;
|
|
15
21
|
isUserError(): boolean;
|
|
16
22
|
}
|
|
17
23
|
export declare class GraphqlError extends Error {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"minimal-graphql-runner.d.ts","sourceRoot":"","sources":["../../src/graphql/minimal-graphql-runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAG1D,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"minimal-graphql-runner.d.ts","sourceRoot":"","sources":["../../src/graphql/minimal-graphql-runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAG1D,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,EAAE,UAAU,EAA+B,MAAM,UAAU,CAAC;AACnE,OAAO,EAAE,SAAS,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AAE;IAWtF,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,gBAAgB;YAIV,4BAA4B;IAuC1C,OAAO,CAAC,YAAY;CAUrB"}
|
|
@@ -17,8 +17,21 @@ class OutdatedClientVersionError extends shared_1.UserError {
|
|
|
17
17
|
exports.OutdatedClientVersionError = OutdatedClientVersionError;
|
|
18
18
|
class GraphQLProviderServiceError extends shared_1.BaseError {
|
|
19
19
|
constructor(userError, requestId, errors) {
|
|
20
|
-
|
|
20
|
+
const { message, code, statusCode } = (0, index_1.getError)(errors);
|
|
21
|
+
super(requestId, `${message} (requestId: ${requestId || 'unknown'})`);
|
|
21
22
|
this.userError = userError;
|
|
23
|
+
this.getCode = () => {
|
|
24
|
+
return this.code;
|
|
25
|
+
};
|
|
26
|
+
this.getStatusCode = () => {
|
|
27
|
+
return this.statusCode;
|
|
28
|
+
};
|
|
29
|
+
this.getRequestId = () => {
|
|
30
|
+
return this.requestId;
|
|
31
|
+
};
|
|
32
|
+
this.code = code;
|
|
33
|
+
this.statusCode = statusCode;
|
|
34
|
+
this.requestId = requestId;
|
|
22
35
|
}
|
|
23
36
|
isUserError() {
|
|
24
37
|
return this.userError;
|
|
@@ -38,23 +51,8 @@ class MinimalGraphQLRunner {
|
|
|
38
51
|
this.cliDetails = cliDetails;
|
|
39
52
|
}
|
|
40
53
|
async run(query, variables) {
|
|
41
|
-
const { data,
|
|
42
|
-
if (status === 401) {
|
|
43
|
-
const errorMessage = this.authenticator.getInstructionsWhenInvalid();
|
|
44
|
-
throw new GraphQLAuthenticationError(errorMessage);
|
|
45
|
-
}
|
|
54
|
+
const { data, extensions, headers } = await this.rawRequestWithoutClientError(query, variables);
|
|
46
55
|
const requestId = this.getRequestId(extensions, headers);
|
|
47
|
-
if (errors) {
|
|
48
|
-
if (errors.find((e) => isOutdatedClientVersionError(e))) {
|
|
49
|
-
throw new OutdatedClientVersionError();
|
|
50
|
-
}
|
|
51
|
-
const { statusCode } = (0, index_1.getError)(errors);
|
|
52
|
-
const isUserError = statusCode && statusCode >= 400 && statusCode < 500 ? true : false;
|
|
53
|
-
throw new GraphQLProviderServiceError(isUserError, requestId, errors);
|
|
54
|
-
}
|
|
55
|
-
if (status !== 200) {
|
|
56
|
-
throw new GraphqlError(data, requestId);
|
|
57
|
-
}
|
|
58
56
|
return {
|
|
59
57
|
requestId,
|
|
60
58
|
response: data
|
|
@@ -73,7 +71,7 @@ class MinimalGraphQLRunner {
|
|
|
73
71
|
}
|
|
74
72
|
getClientName() {
|
|
75
73
|
var _a;
|
|
76
|
-
return ((_a = this.cliDetails) === null || _a === void 0 ? void 0 : _a.name) ||
|
|
74
|
+
return ((_a = this.cliDetails) === null || _a === void 0 ? void 0 : _a.name) || index_1.FORGE_CLI_PACKAGE;
|
|
77
75
|
}
|
|
78
76
|
getClientVersion() {
|
|
79
77
|
var _a;
|
|
@@ -86,12 +84,26 @@ class MinimalGraphQLRunner {
|
|
|
86
84
|
return await client.rawRequest(query, variables);
|
|
87
85
|
}
|
|
88
86
|
catch (error) {
|
|
89
|
-
if (error.
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
87
|
+
if (error instanceof graphql_request_1.ClientError) {
|
|
88
|
+
const { data, errors, extensions, headers, status } = error.response;
|
|
89
|
+
if (status === 401) {
|
|
90
|
+
const errorMessage = this.authenticator.getInstructionsWhenInvalid();
|
|
91
|
+
throw new GraphQLAuthenticationError(errorMessage);
|
|
92
|
+
}
|
|
93
|
+
const requestId = this.getRequestId(extensions, headers);
|
|
94
|
+
if (errors) {
|
|
95
|
+
if (errors.find((e) => isOutdatedClientVersionError(e))) {
|
|
96
|
+
throw new OutdatedClientVersionError();
|
|
97
|
+
}
|
|
98
|
+
const { statusCode } = (0, index_1.getError)(errors);
|
|
99
|
+
const isUserError = statusCode && statusCode >= 400 && statusCode < 500 ? true : false;
|
|
100
|
+
throw new GraphQLProviderServiceError(isUserError, requestId, errors);
|
|
101
|
+
}
|
|
102
|
+
if (status !== 200) {
|
|
103
|
+
throw new GraphqlError(data, requestId);
|
|
104
|
+
}
|
|
94
105
|
}
|
|
106
|
+
throw error;
|
|
95
107
|
}
|
|
96
108
|
}
|
|
97
109
|
getRequestId(extensions, headers) {
|
|
@@ -7,9 +7,7 @@ import { Logger } from '../ui';
|
|
|
7
7
|
declare type FeatureFlagType = {
|
|
8
8
|
'forge-cli-test-flag': 'apple' | 'banana' | 'orange' | 'watermelon';
|
|
9
9
|
'forge-cli-startup-warning': string;
|
|
10
|
-
'forge-cli-enable-muao': boolean;
|
|
11
10
|
'xls-do-not-automatically-add-read-me-scope': boolean;
|
|
12
|
-
'forge-cli-enable-concurrent-development': boolean;
|
|
13
11
|
'xis-allow-automatic-user-consent': boolean;
|
|
14
12
|
'forge-cli-enable-csuik': boolean;
|
|
15
13
|
};
|
|
@@ -18,8 +16,6 @@ export declare abstract class FeatureFlagReader {
|
|
|
18
16
|
abstract readFlag<F extends FeatureFlag>(flag: F): Promise<FeatureFlagType[F] | null>;
|
|
19
17
|
readMeScopeAddedByXLS(): Promise<boolean>;
|
|
20
18
|
isAutoConsentAllowed(): Promise<boolean>;
|
|
21
|
-
isMUAOEnabled(): Promise<boolean>;
|
|
22
|
-
isConcurrentDevEnabled(): Promise<boolean>;
|
|
23
19
|
}
|
|
24
20
|
declare type ILaunchDarkly = Pick<LDClient, 'variation' | 'waitUntilReady'>;
|
|
25
21
|
declare type LaunchDarklyInitialize = (envKey: string, user: LDUser, options?: LDOptions) => ILaunchDarkly;
|
|
@@ -1 +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,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE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__importDefault(require("env-paths"));
|
|
|
7
7
|
const fs_1 = require("fs");
|
|
8
8
|
const util_1 = require("util");
|
|
9
9
|
const graphql_1 = require("../graphql");
|
|
10
|
+
const shared_1 = require("../shared");
|
|
10
11
|
class FeatureFlagReader {
|
|
11
12
|
async readMeScopeAddedByXLS() {
|
|
12
13
|
var _a;
|
|
@@ -17,13 +18,6 @@ class FeatureFlagReader {
|
|
|
17
18
|
var _a;
|
|
18
19
|
return (_a = (await this.readFlag('xis-allow-automatic-user-consent'))) !== null && _a !== void 0 ? _a : false;
|
|
19
20
|
}
|
|
20
|
-
async isMUAOEnabled() {
|
|
21
|
-
return (await this.readFlag('forge-cli-enable-muao')) || process.env.ENABLE_MUAO === 'true';
|
|
22
|
-
}
|
|
23
|
-
async isConcurrentDevEnabled() {
|
|
24
|
-
return ((await this.readFlag('forge-cli-enable-concurrent-development')) ||
|
|
25
|
-
process.env.ENABLE_CONCURRENT_DEVELOPMENT === 'true');
|
|
26
|
-
}
|
|
27
21
|
}
|
|
28
22
|
exports.FeatureFlagReader = FeatureFlagReader;
|
|
29
23
|
var CLIENT_SIDE_ID;
|
|
@@ -84,7 +78,7 @@ class FeatureFlagService extends FeatureFlagReader {
|
|
|
84
78
|
this.client = cachedMethod(async () => {
|
|
85
79
|
const clientSideID = this.getEnvironmentFn(CLIENT_SIDE_ID);
|
|
86
80
|
const user = await this.user();
|
|
87
|
-
const cachePath = (0, env_paths_1.default)(
|
|
81
|
+
const cachePath = (0, env_paths_1.default)(shared_1.FORGE_CLI_PACKAGE).cache;
|
|
88
82
|
await (0, util_1.promisify)(fs_1.mkdir)(cachePath, { recursive: true });
|
|
89
83
|
const options = {
|
|
90
84
|
logger: (0, launchdarkly_node_client_sdk_1.basicLogger)({ level: 'error' }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-details.d.ts","sourceRoot":"","sources":["../../src/shared/cli-details.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,qBAAqB,EAAE,MAAM,CAAC;CAC/B;AAED,eAAO,MAAM,kBAAkB,eAAgB,UAAU,GAAG,SAAS,KAAG,OAOvE,CAAC"}
|
|
1
|
+
{"version":3,"file":"cli-details.d.ts","sourceRoot":"","sources":["../../src/shared/cli-details.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,eAAe,CAAC;AAE9C,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,qBAAqB,EAAE,MAAM,CAAC;CAC/B;AAED,eAAO,MAAM,kBAAkB,eAAgB,UAAU,GAAG,SAAS,KAAG,OAOvE,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isLatestCLIVersion = void 0;
|
|
3
|
+
exports.isLatestCLIVersion = exports.FORGE_CLI_PACKAGE = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const semver_1 = tslib_1.__importDefault(require("semver"));
|
|
6
|
+
exports.FORGE_CLI_PACKAGE = '@forge/cli';
|
|
6
7
|
const isLatestCLIVersion = (cliDetails) => {
|
|
7
8
|
const version = semver_1.default.valid(cliDetails === null || cliDetails === void 0 ? void 0 : cliDetails.version);
|
|
8
9
|
const latest = semver_1.default.valid(cliDetails === null || cliDetails === void 0 ? void 0 : cliDetails.latest);
|
|
@@ -32,4 +32,13 @@ export declare class ApplicationCompileError extends UserError {
|
|
|
32
32
|
readonly error: Error;
|
|
33
33
|
constructor(error: Error);
|
|
34
34
|
}
|
|
35
|
+
export declare class UIPromptError extends BaseError {
|
|
36
|
+
private readonly isTtyError;
|
|
37
|
+
constructor(message?: string, isTtyError?: boolean);
|
|
38
|
+
isUserError(): boolean;
|
|
39
|
+
}
|
|
40
|
+
export declare const APP_NOT_IN_EAP = "APP_NOT_IN_EAP";
|
|
41
|
+
export declare class AppNotInMUAOEAPError extends BaseError {
|
|
42
|
+
constructor(requestId?: string);
|
|
43
|
+
}
|
|
35
44
|
//# 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;AAI/B,qBAAa,SAAU,SAAQ,KAAM,YAAW,kBAAkB;IACpD,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC;gBAAV,SAAS,CAAC,oBAAoB,EAAE,OAAO,CAAC,EAAE,MAAM;IAIxE,aAAa,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAMpC,WAAW,IAAI,OAAO;CAG9B;AAED,qBAAa,SAAU,SAAQ,SAAS;gBAC1B,OAAO,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS;IAIrD,WAAW,IAAI,OAAO;CAG9B;AAED,qBAAa,WAAY,SAAQ,SAAS;gBAC5B,OAAO,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS;CAG7D;AAgBD,eAAO,MAAM,WAAW,WAAkB,MAAM,UAAU,KAAK,SAAS,MAAM,GAAG,IAAI,KAAG,QAAQ,KAAK,CAsBpG,CAAC;AAOF,eAAO,MAAM,SAAS,UAAW,OAAO,KAAG,KAK1C,CAAC;AAMF,eAAO,MAAM,aAAa,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC,KAAK,IAAI,KAIhE,CAAC;AAKF,MAAM,WAAW,kBAAkB;IACjC,aAAa,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,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AK1C,CAAC;AAMF,eAAO,MAAM,aAAa,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC,KAAK,IAAI,KAIhE,CAAC;AAKF,MAAM,WAAW,kBAAkB;IACjC,aAAa,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC,CAAC;CAClE;AAED,eAAO,MAAM,oBAAoB,MAAO,GAAG,4BAE1C,CAAC;AAEF,qBAAa,eAAgB,SAAQ,SAAS;CAAG;AAEjD,qBAAa,cAAe,SAAQ,SAAS;CAAG;AAEhD,MAAM,WAAW,kBAAkB;IACjC,gBAAgB,EAAE,IAAI,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC,CAAC;CACzD;AAED,qBAAa,uBAAwB,SAAQ,SAAS;IACxC,QAAQ,CAAC,KAAK,EAAE,KAAK;gBAAZ,KAAK,EAAE,KAAK;CAGlC;AAED,qBAAa,aAAc,SAAQ,SAAS;IACZ,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAA7C,OAAO,CAAC,EAAE,MAAM,EAAmB,UAAU,GAAE,OAAe;IAInE,WAAW;CAGnB;AAED,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAE/C,qBAAa,oBAAqB,SAAQ,SAAS;gBACrC,SAAS,CAAC,EAAE,MAAM;CAG/B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ApplicationCompileError = exports.BundlerTSError = exports.ValidationError = exports.isErrorWithAnalytics = exports.assertIsError = exports.wrapError = exports.exitOnError = exports.HiddenError = exports.UserError = exports.BaseError = void 0;
|
|
3
|
+
exports.AppNotInMUAOEAPError = exports.APP_NOT_IN_EAP = exports.UIPromptError = exports.ApplicationCompileError = exports.BundlerTSError = exports.ValidationError = exports.isErrorWithAnalytics = exports.assertIsError = exports.wrapError = exports.exitOnError = exports.HiddenError = exports.UserError = exports.BaseError = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const ui_1 = require("../ui");
|
|
6
6
|
const Sentry = tslib_1.__importStar(require("@sentry/node"));
|
|
@@ -90,3 +90,20 @@ class ApplicationCompileError extends UserError {
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
exports.ApplicationCompileError = ApplicationCompileError;
|
|
93
|
+
class UIPromptError extends BaseError {
|
|
94
|
+
constructor(message, isTtyError = false) {
|
|
95
|
+
super(undefined, message);
|
|
96
|
+
this.isTtyError = isTtyError;
|
|
97
|
+
}
|
|
98
|
+
isUserError() {
|
|
99
|
+
return this.isTtyError;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
exports.UIPromptError = UIPromptError;
|
|
103
|
+
exports.APP_NOT_IN_EAP = 'APP_NOT_IN_EAP';
|
|
104
|
+
class AppNotInMUAOEAPError extends BaseError {
|
|
105
|
+
constructor(requestId) {
|
|
106
|
+
super(requestId, ui_1.Text.error.appNotInMUAOEAP(requestId));
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
exports.AppNotInMUAOEAPError = AppNotInMUAOEAPError;
|
|
@@ -9,10 +9,11 @@ export declare class CommandLineUI implements UI {
|
|
|
9
9
|
private readonly verbose;
|
|
10
10
|
private readonly logger;
|
|
11
11
|
private readonly spinner;
|
|
12
|
-
private readonly
|
|
12
|
+
private readonly promptInternal;
|
|
13
13
|
private insideProgress;
|
|
14
14
|
private addedProgressPadding;
|
|
15
15
|
constructor(verbose: () => boolean, spinner?: Ora, logger?: Console);
|
|
16
|
+
private prompt;
|
|
16
17
|
get traceEnabled(): boolean;
|
|
17
18
|
get debugEnabled(): boolean;
|
|
18
19
|
displayProgress<Result>(progress: () => Promise<Result>, startText: string, successText: string | ((result: Result) => string | ProgressResult)): Promise<Result>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-line-ui.d.ts","sourceRoot":"","sources":["../../src/ui/command-line-ui.ts"],"names":[],"mappings":";AAEA,OAAY,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAM/B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"command-line-ui.d.ts","sourceRoot":"","sources":["../../src/ui/command-line-ui.ts"],"names":[],"mappings":";AAEA,OAAY,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAM/B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAiBnD,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,qBAAa,aAAc,YAAW,EAAE;IA2B1B,OAAO,CAAC,QAAQ,CAAC,OAAO;IA1BpC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAU;IAKjC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAM;IAE9B,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAwB;IAGvD,OAAO,CAAC,cAAc,CAAS;IAc/B,OAAO,CAAC,oBAAoB,CAAS;gBAER,OAAO,EAAE,MAAM,OAAO,EAAE,OAAO,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,OAAO;IASpF,OAAO,CAAC,MAAM;IAad,IAAW,YAAY,IAAI,OAAO,CAEjC;IAED,IAAW,YAAY,IAAI,OAAO,CAEjC;IAEY,eAAe,CAAC,MAAM,EACjC,QAAQ,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,EAC/B,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,cAAc,CAAC,GAClE,OAAO,CAAC,MAAM,CAAC;IAgCL,uBAAuB,CAAC,MAAM,EAAE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AAE,MAAM,EAAE,SAAS,EAAE,GAAE,YAAY,CAAC,GAAG,CAAM,GACzF,IAAI;IAsBP,OAAO,CAAC,gBAAgB;IAYxB,OAAO,CAAC,kBAAkB;IAkB1B,OAAO,CAAC,QAAQ;IAwChB,OAAO,CAAC,GAAG;IAqBX,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,QAAQ;IAQhB,OAAO,CAAC,mBAAmB;IAe3B,OAAO,CAAC,yBAAyB;IAQjC,OAAO,CAAC,eAAe;YAaT,eAAe;IAa7B,OAAO,CAAC,wBAAwB;CAIjC"}
|
|
@@ -12,6 +12,7 @@ const text_1 = require("./text");
|
|
|
12
12
|
const runtime_log_1 = require("./runtime-log");
|
|
13
13
|
const multiple_table_prompt_1 = require("./multiple-table-prompt");
|
|
14
14
|
const single_table_prompt_1 = require("./single-table-prompt");
|
|
15
|
+
const shared_1 = require("../shared");
|
|
15
16
|
var ProgressLogType;
|
|
16
17
|
(function (ProgressLogType) {
|
|
17
18
|
ProgressLogType[ProgressLogType["startText"] = 0] = "startText";
|
|
@@ -25,9 +26,18 @@ class CommandLineUI {
|
|
|
25
26
|
this.addedProgressPadding = false;
|
|
26
27
|
this.spinner = spinner || (0, ora_1.default)({ discardStdin: false });
|
|
27
28
|
this.logger = logger || console;
|
|
28
|
-
this.
|
|
29
|
+
this.promptInternal = inquirer_1.default.createPromptModule({ skipTTYChecks: false });
|
|
29
30
|
this.registerCustomUIElements();
|
|
30
31
|
}
|
|
32
|
+
prompt(questions, initialAnswers) {
|
|
33
|
+
var _a;
|
|
34
|
+
try {
|
|
35
|
+
return this.promptInternal(questions, initialAnswers);
|
|
36
|
+
}
|
|
37
|
+
catch (e) {
|
|
38
|
+
throw new shared_1.UIPromptError(e.message, (_a = e.isTtyError) !== null && _a !== void 0 ? _a : false);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
31
41
|
get traceEnabled() {
|
|
32
42
|
return this.verbose();
|
|
33
43
|
}
|
|
@@ -320,8 +330,8 @@ class CommandLineUI {
|
|
|
320
330
|
return text;
|
|
321
331
|
}
|
|
322
332
|
registerCustomUIElements() {
|
|
323
|
-
this.
|
|
324
|
-
this.
|
|
333
|
+
this.promptInternal.registerPrompt('multiple-choice-table', multiple_table_prompt_1.MultipleChoiceTablePrompt);
|
|
334
|
+
this.promptInternal.registerPrompt('single-choice-table', single_table_prompt_1.SingleChoiceTablePrompt);
|
|
325
335
|
}
|
|
326
336
|
}
|
|
327
337
|
exports.CommandLineUI = CommandLineUI;
|
package/out/ui/text.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export declare const Text: {
|
|
|
29
29
|
resourceDirectoryEmpty: (resourceKey: string, directory: string) => string;
|
|
30
30
|
templateFetchFailed: string;
|
|
31
31
|
handlerFormat: (handler: string) => string;
|
|
32
|
+
appNotInMUAOEAP: (requestId?: string) => string;
|
|
32
33
|
};
|
|
33
34
|
warning: {
|
|
34
35
|
plaintextCredentialsFound: (url: string) => string;
|
package/out/ui/text.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/ui/text.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAI1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAG9D,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACtC;AAmBD,eAAO,MAAM,UAAU,SAAU,MAAM,KAAG,MAAsD,CAAC;AAoDjG,eAAO,MAAM,IAAI;;;;;6BAiBM,MAAM;2BACR,MAAM;6BAGJ,MAAM;+BAEJ,MAAM;;wCAIK,MAAM,UAAU,MAAM;qDAOT,MAAM,sBAAsB,MAAM;;;;6CAa1C,MAAM,YAAY,MAAM,YAAY,MAAM;;;qCAQlD,GAAG,WAAW,QAAQ,GAAG,CAAC;kDAEb,MAAM,EAAE;gDAKV,MAAM,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iDACO,MAAM;;;;;;;uCAWhB,MAAM;;;;;;;+BAQd,OAAO;;;;;;;;wBAQZ,MAAM,UAAU,MAAM,eAAe,MAAM,WAAW,OAAO;0BAI3D,MAAM,UAAU,MAAM,eAAe,MAAM;;;;;oBAYjD,MAAM;;;;;;;qCAUS,MAAM;;;;;;;;;oCAWL,MAAM;;;;;;;;;;;;oCAYN,MAAM,WAAW,MAAM;kCAMzB,MAAM,sBAAsB,MAAM,KAAG,MAAM;;sBAUvD,MAAM,UAAU,MAAM,WAAW,MAAM,aAAa,MAAM,KAAG,MAAM;6BAE5D,MAAM,eAAe,MAAM,oBAAoB,MAAM,sBAAsB,MAAM,KAAG,MAAM;gCAevF,MAAM,oBAAoB,MAAM,sBAAsB,MAAM,KAAG,MAAM;wBAc7E,MAAM,UAAU,MAAM,WAAW,MAAM,aAAa,MAAM,KAAG,MAAM;;;yBAKlE,MAAM,WAAW,MAAM;;;;qCAQb,MAAM;qCACN,MAAM,gBAAgB,OAAO;;;yCAMzB,MAAM;qCACV,MAAM;;;;;;;;;;;;;;;;+BAwBZ,MAAM,SAAS,MAAM;;;;;;;;;;;;;;;;6CAiBP,MAAM,mBAAmB,MAAM,EAAE;;;;CAOvE,CAAC"}
|
package/out/ui/text.js
CHANGED
|
@@ -67,7 +67,10 @@ exports.Text = {
|
|
|
67
67
|
resourceDirectoryMissing: (resourceKey, directory) => `Resource ${resourceKey} at: ${directory} not found`,
|
|
68
68
|
resourceDirectoryEmpty: (resourceKey, directory) => `Resource ${resourceKey} at: ${directory} is an empty directory`,
|
|
69
69
|
templateFetchFailed: 'Failed to fetch templates, try running the command again.',
|
|
70
|
-
handlerFormat: (handler) => `Function handler "${handler}" must be in format <module>.<function>, example: index.run
|
|
70
|
+
handlerFormat: (handler) => `Function handler "${handler}" must be in format <module>.<function>, example: index.run`,
|
|
71
|
+
appNotInMUAOEAP: (requestId) => `This feature is only available in the Early Access Program. (requestId: ${requestId || 'unknown'})\n\n` +
|
|
72
|
+
'Learn more about the Multi User App Ownership EAP:\n' +
|
|
73
|
+
`${chalk_1.default.bold.underline('https://developer.atlassian.com/platform/forge/contributors/')}`
|
|
71
74
|
},
|
|
72
75
|
warning: {
|
|
73
76
|
plaintextCredentialsFound: (url) => `Your credentials were stored in plaintext by a previous version of the Forge CLI. For additional security, revoke your existing API token by visting this URL ${buildTerminalLink(url)}.`,
|
|
@@ -253,7 +256,7 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
253
256
|
confirmQuestion: 'Are you sure you want to overwrite the existing app details?'
|
|
254
257
|
},
|
|
255
258
|
env: {
|
|
256
|
-
option:
|
|
259
|
+
option: `specify the environment (see your default environment by running forge settings list)`,
|
|
257
260
|
invalid: 'Invalid environment name',
|
|
258
261
|
developmentOnly: (envKey) => `${(0, environment_1.environmentToOption)(envKey)} cannot be set as default environment. Only development environments can be used.`,
|
|
259
262
|
error: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/cli-shared",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.16.0-next.14",
|
|
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": "4.16.1-next.
|
|
15
|
+
"@forge/manifest": "4.16.1-next.5",
|
|
16
16
|
"@forge/util": "1.2.3",
|
|
17
17
|
"@sentry/node": "^7.57.0",
|
|
18
18
|
"adm-zip": "^0.5.10",
|
|
@@ -25,15 +25,15 @@
|
|
|
25
25
|
"cross-spawn": "^7.0.3",
|
|
26
26
|
"env-paths": "^2.2.1",
|
|
27
27
|
"figures": "^3.2.0",
|
|
28
|
-
"fp-ts": "^2.0
|
|
28
|
+
"fp-ts": "^2.16.0",
|
|
29
29
|
"fs-extra": "^8.1.0",
|
|
30
30
|
"get-folder-size": "^2.0.1",
|
|
31
|
-
"glob": "^7.
|
|
31
|
+
"glob": "^7.2.3",
|
|
32
32
|
"graphql": "^15.8.0",
|
|
33
|
-
"graphql-request": "3.
|
|
33
|
+
"graphql-request": "3.7.0",
|
|
34
34
|
"ignore-walk": "^3.0.4",
|
|
35
35
|
"inquirer": "^8.2.5",
|
|
36
|
-
"io-ts": "^2.
|
|
36
|
+
"io-ts": "^2.2.20",
|
|
37
37
|
"keytar": "^7.9.0",
|
|
38
38
|
"launchdarkly-node-client-sdk": "^2.0.3",
|
|
39
39
|
"node-fetch": "2.6.12",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@types/ignore-walk": "^3.0.2",
|
|
62
62
|
"@types/inquirer": "^8.2.6",
|
|
63
63
|
"@types/jest": "^29.1.2",
|
|
64
|
-
"@types/js-yaml": "^3.12.
|
|
64
|
+
"@types/js-yaml": "^3.12.7",
|
|
65
65
|
"@types/node-fetch": "^2.6.4",
|
|
66
66
|
"@types/recursive-readdir": "^2.2.1",
|
|
67
67
|
"@types/tmp": "^0.1.0",
|