@forge/cli-shared 2.6.2 → 3.0.0-next.0
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 +10 -0
- package/out/auth/index.d.ts +0 -1
- package/out/auth/index.d.ts.map +1 -1
- package/out/auth/index.js +0 -1
- package/out/auth/personal/credential-store.d.ts +51 -0
- package/out/auth/personal/credential-store.d.ts.map +1 -0
- package/out/auth/personal/credential-store.js +170 -0
- package/out/auth/personal/index.d.ts +1 -4
- package/out/auth/personal/index.d.ts.map +1 -1
- package/out/auth/personal/index.js +1 -4
- package/out/auth/personal/login.d.ts +2 -2
- package/out/auth/personal/login.d.ts.map +1 -1
- package/out/auth/personal/login.js +1 -1
- package/out/auth/personal/logout.d.ts +2 -2
- package/out/auth/personal/logout.d.ts.map +1 -1
- package/out/auth/personal/token-authenticator.d.ts +3 -3
- package/out/auth/personal/token-authenticator.d.ts.map +1 -1
- package/out/auth/personal/token-authenticator.js +4 -4
- package/out/graphql/graphql-types.d.ts +380 -23
- package/out/graphql/graphql-types.d.ts.map +1 -1
- package/out/graphql/graphql-types.js +31 -1
- package/out/graphql/mutation-aware-graphql-client.d.ts +1 -1
- package/out/service/feature-flag-service.d.ts +3 -3
- package/out/service/feature-flag-service.d.ts.map +1 -1
- package/out/service/feature-flag-service.js +3 -3
- package/out/shared/product.d.ts +4 -1
- package/out/shared/product.d.ts.map +1 -1
- package/out/shared/product.js +11 -4
- package/out/shared/validate.d.ts +1 -1
- package/out/shared/validate.d.ts.map +1 -1
- package/out/shared/validate.js +5 -1
- package/out/ui/text.d.ts +8 -3
- package/out/ui/text.d.ts.map +1 -1
- package/out/ui/text.js +26 -9
- package/package.json +2 -4
- package/out/auth/credentials-store-provider.d.ts +0 -4
- package/out/auth/credentials-store-provider.d.ts.map +0 -1
- package/out/auth/credentials-store-provider.js +0 -11
- package/out/auth/personal/abstract-token-store-getter.d.ts +0 -13
- package/out/auth/personal/abstract-token-store-getter.d.ts.map +0 -1
- package/out/auth/personal/abstract-token-store-getter.js +0 -31
- package/out/auth/personal/token-store-cache.d.ts +0 -12
- package/out/auth/personal/token-store-cache.d.ts.map +0 -1
- package/out/auth/personal/token-store-cache.js +0 -41
- package/out/auth/personal/token-store-keytar.d.ts +0 -23
- package/out/auth/personal/token-store-keytar.d.ts.map +0 -1
- package/out/auth/personal/token-store-keytar.js +0 -101
- package/out/auth/personal/token-store.d.ts +0 -28
- package/out/auth/personal/token-store.d.ts.map +0 -1
- package/out/auth/personal/token-store.js +0 -21
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SourceBillingType = exports.UserInstallationRuleValue = exports.TownsquareProjectStateValue = exports.TownsquareProjectSortEnum = exports.TownsquareHelpPointerType = exports.TownsquareGoalSortEnum = exports.TestingActivityEventType = exports.TeamState = exports.SwimlaneStrategy = exports.SupportRequestUserType = exports.SupportRequestStatusCategory = exports.SupportRequestQueryStatusCategory = exports.SupportRequestQueryOwnership = exports.SupportRequestNamedContactOperation = exports.SupportRequestFieldDataType = exports.SprintState = exports.SprintReportsEstimationStatisticType = exports.SortDirection = exports.SoftwareCardsDestinationEnum = exports.ShepherdWebhookType = exports.ShepherdSubscriptionStatus = exports.ShepherdQueryErrorType = exports.ShepherdAlertTemplateType = exports.ShepherdAlertStatus = exports.ShepherdAlertSeverity = exports.ShepherdAlertDescriptionType = exports.SearchResultType = exports.SearchProjectType = exports.SearchContainerStatus = exports.SearchConfluenceRangeField = exports.SearchBoardProductType = exports.Scope = exports.RoadmapVersionStatus = exports.RoadmapTimelineMode = exports.RoadmapSprintState = exports.RoadmapRankPosition = exports.RoadmapPaletteColor = exports.RoadmapLevelOneView = exports.RoadmapEpicView = exports.RateLimitingCurrency = exports.PolarisVisualizationType = exports.PolarisViewSortMode = exports.PolarisViewSetType = exports.PolarisViewFilterOperator = exports.PolarisViewFilterKind = exports.PolarisValueOperator = exports.PolarisTimelineMode = exports.PolarisSortOrder = exports.PolarisSnippetPropertyKind = exports.PolarisResolvedObjectAuthType = exports.PolarisRefreshError = exports.PolarisPlayKind = exports.PolarisFieldType = exports.PolarisCommentKind = 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.JiraVersionWarningConfigState = exports.JiraVersionStatus = exports.JiraVersionIssuesFilter = exports.JiraTimeUnit = exports.JiraTimeFormat = exports.JiraStatusCategoryColor = exports.JiraSprintState = exports.JiraShareableEntityGrant = exports.JiraServiceManagementPractice = exports.JiraServiceManagementMajorIncident = exports.JiraServiceManagementCommentVisibility = exports.JiraServiceManagementApprovalState = exports.JiraServiceManagementApprovalDecisionResponseType = exports.JiraReviewState = exports.JiraReleasesIssueReleaseStatusFilter = exports.JiraReleasesEpicReleaseStatusFilter = exports.JiraPullRequestState = exports.JiraProjectType = exports.JiraProjectStyle = exports.JiraProjectStatus = exports.JiraProjectSortField = exports.JiraProjectPermissionCategoryEnum = exports.JiraProjectAndRepositoryRelationshipSortBy = exports.JiraPermissionTagEnum = exports.JiraPermissionMessageTypeEnum = exports.JiraJqlSyntaxError = exports.JiraJqlOperator = exports.JiraJqlClauseType = exports.JiraJqlBuilderMode = exports.JiraJqlAutocompleteType = exports.JiraIssueSearchFieldSetSelectedState = exports.JiraIssueLinkDirection = exports.JiraIssueItemSystemContainerType = exports.JiraIssueItemLayoutItemLocationRuleType = exports.JiraIssueDeploymentEnvironmentState = exports.JiraInstallDeploymentsBannerPrecondition = exports.JiraGrantTypeKeyEnum = exports.JiraFavouriteType = exports.JiraDevOpsIssuePanelState = exports.JiraDevOpsIssuePanelBannerType = exports.JiraDevOpsCapability = exports.JiraDevInfoConfigErrorType = exports.JiraDeploymentsFeaturePrecondition = exports.JiraCmdbAttributeType = exports.JiraCascadingSelectOptionType = exports.JiraAttachmentsPermissions = exports.IssueDevOpsPullRequestStatus = exports.IssueDevOpsDeploymentState = exports.IssueDevOpsDeploymentEnvironmentType = exports.IssueDevOpsCommitChangeType = exports.HelpObjectStoreJsmEntityType = exports.HelpObjectStoreHelpObjectType = exports.GrantCheckProduct = exports.FunctionTriggerType = exports.FortifiedMetricsResolutionUnit = exports.FortifiedMarketplacePartnerContactPermission = exports.ForgeMetricsSiteFilterCategory = exports.ForgeMetricsResolutionUnit = exports.ForgeMetricsGroupByDimensions = exports.ForgeMetricsDataType = exports.ForgeAlertsStatus = exports.ForgeAlertsActivityType = exports.EventMatchingStrategies = exports.EventKnownAvIs = exports.DevStatusActivity = exports.DevOpsToolSortOrder = exports.DevOpsToolNavbarConnectionStateTab = exports.DevOpsToolIntegrationType = exports.DevOpsToolConnectionState = exports.DevOpsServiceRelationshipType = exports.DevOpsServiceAndRepositoryRelationshipSortBy = exports.DevOpsServiceAndJiraProjectRelationshipType = exports.DevOpsRepositoryHostingProviderFilter = exports.DevOpsRelationshipCertaintyFilter = exports.DevOpsRelationshipCertainty = exports.DevOpsPullRequestStatus = exports.DevOpsPullRequestApprovalStatus = exports.DevOpsMetricsRollupOption = exports.DevOpsMetricsResolutionUnit = exports.DevOpsMetricsCycleTimePhase = exports.DevOpsJiraProjectType = exports.DevOpsEnvironmentCategory = exports.DeploymentState = exports.ConfluenceSpaceType = exports.ConfluenceSpaceStatus = 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.CompassScorecardImportance = exports.CompassRelationshipType = exports.CompassRelationshipDirection = exports.CompassQuerySortOrder = exports.CompassMetricDefinitionType = exports.CompassLinkType = exports.CompassLifecycleEventStage = exports.CompassIncidentEventState = exports.CompassIncidentEventSeverityLevel = exports.CompassFieldType = exports.CompassEventType = exports.CompassDeploymentEventState = exports.CompassDeploymentEventEnvironmentCategory = exports.CompassCustomEventIcon = exports.CompassCriteriaNumberComparatorOptions = exports.CompassCriteriaBooleanComparatorOptions = exports.CompassComponentType = exports.CompassBuildEventState = exports.Classification = exports.CardHierarchyLevelEnumType = exports.BuiltinPolarisIdeaField = exports.BoardFeatureToggleStatus = exports.BoardFeatureStatus = exports.BitbucketPermission = exports.AtlassianProductHostingType = exports.AriGraphRelationshipsSortDirection = exports.AppTaskState = exports.AppStoredEntityCondition = exports.AppSecurityPoliciesPermissionTypeExtension = exports.AppSecurityPoliciesPermissionType = exports.AppNetworkPermissionTypeExtension = exports.AppNetworkPermissionType = exports.AppEnvironmentType = exports.AppDeploymentStepStatus = exports.AppDeploymentStatus = exports.AppDeploymentEventLogLevel = exports.ApiGroup = exports.ApiContext = exports.ActivityProduct = exports.ActivityObjectType = exports.ActivityEventType = exports.ActivitiesObjectType = exports.ActivitiesFilterType = exports.ActivitiesContainerType = exports.AccountStatus = void 0;
|
|
3
|
+
exports.SourceBillingType = exports.UserInstallationRuleValue = exports.TownsquareProjectStateValue = exports.TownsquareProjectSortEnum = exports.TownsquareHelpPointerType = exports.TownsquareGoalSortEnum = exports.TestingActivityEventType = exports.TeamState = exports.SwimlaneStrategy = exports.SupportRequestUserType = exports.SupportRequestStatusCategory = exports.SupportRequestQueryStatusCategory = exports.SupportRequestQueryOwnership = exports.SupportRequestNamedContactOperation = exports.SupportRequestFieldDataType = exports.SprintState = exports.SprintReportsEstimationStatisticType = exports.SortDirection = exports.SoftwareCardsDestinationEnum = exports.ShepherdWebhookType = exports.ShepherdSubscriptionStatus = exports.ShepherdQueryErrorType = exports.ShepherdAlertTemplateType = exports.ShepherdAlertStatus = exports.ShepherdAlertSeverity = exports.ShepherdAlertDescriptionType = exports.SearchResultType = exports.SearchProjectType = exports.SearchContainerStatus = exports.SearchConfluenceRangeField = exports.SearchBoardProductType = exports.Scope = exports.RoadmapVersionStatus = exports.RoadmapTimelineMode = exports.RoadmapSprintState = exports.RoadmapRankPosition = exports.RoadmapPaletteColor = exports.RoadmapLevelOneView = exports.RoadmapEpicView = exports.RateLimitingCurrency = exports.PolarisVisualizationType = exports.PolarisViewSortMode = exports.PolarisViewSetType = exports.PolarisViewFilterOperator = exports.PolarisViewFilterKind = exports.PolarisValueOperator = exports.PolarisTimelineMode = exports.PolarisSortOrder = exports.PolarisSnippetPropertyKind = exports.PolarisResolvedObjectAuthType = exports.PolarisRefreshError = exports.PolarisPlayKind = exports.PolarisFieldType = exports.PolarisCommentKind = 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.JiraVersionWarningConfigState = exports.JiraVersionStatus = exports.JiraVersionIssuesFilter = exports.JiraTimeUnit = exports.JiraTimeFormat = exports.JiraStatusCategoryColor = exports.JiraSprintState = exports.JiraShareableEntityGrant = exports.JiraServiceManagementPractice = exports.JiraServiceManagementMajorIncident = 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.JiraProjectPermissionCategoryEnum = exports.JiraProjectAndRepositoryRelationshipSortBy = exports.JiraProjectActionType = exports.JiraPermissionTagEnum = exports.JiraPermissionMessageTypeEnum = exports.JiraMultiValueFieldOperations = exports.JiraJqlSyntaxError = exports.JiraJqlOperator = exports.JiraJqlClauseType = exports.JiraJqlBuilderMode = exports.JiraJqlAutocompleteType = exports.JiraIssueSearchFieldSetSelectedState = exports.JiraIssueLinkDirection = exports.JiraIssueItemSystemContainerType = exports.JiraIssueItemLayoutItemLocationRuleType = exports.JiraIssueDeploymentEnvironmentState = exports.JiraInstallDeploymentsBannerPrecondition = exports.JiraGrantTypeKeyEnum = exports.JiraFavouriteType = exports.JiraDevOpsIssuePanelState = exports.JiraDevOpsIssuePanelBannerType = exports.JiraDevOpsCapability = exports.JiraDevInfoConfigErrorType = exports.JiraDeploymentsFeaturePrecondition = exports.JiraCmdbAttributeType = exports.JiraCascadingSelectOptionType = exports.JiraAttachmentsPermissions = exports.IssueDevOpsPullRequestStatus = exports.IssueDevOpsDeploymentState = exports.IssueDevOpsDeploymentEnvironmentType = exports.IssueDevOpsCommitChangeType = exports.HelpObjectStoreJsmEntityType = exports.HelpObjectStoreHelpObjectType = exports.GrantCheckProduct = exports.FunctionTriggerType = exports.FortifiedMetricsResolutionUnit = exports.FortifiedMarketplacePartnerContactPermission = exports.ForgeMetricsSiteFilterCategory = exports.ForgeMetricsResolutionUnit = exports.ForgeMetricsGroupByDimensions = exports.ForgeMetricsDataType = exports.ForgeAlertsStatus = exports.ForgeAlertsActivityType = exports.EventMatchingStrategies = exports.EventKnownAvIs = exports.DevStatusActivity = exports.DevOpsToolSortOrder = exports.DevOpsToolNavbarConnectionStateTab = exports.DevOpsToolIntegrationType = exports.DevOpsToolConnectionState = exports.DevOpsServiceRelationshipType = exports.DevOpsServiceAndRepositoryRelationshipSortBy = exports.DevOpsServiceAndJiraProjectRelationshipType = exports.DevOpsRepositoryHostingProviderFilter = exports.DevOpsRelationshipCertaintyFilter = exports.DevOpsRelationshipCertainty = exports.DevOpsPullRequestStatus = exports.DevOpsPullRequestApprovalStatus = exports.DevOpsMetricsRollupOption = exports.DevOpsMetricsResolutionUnit = exports.DevOpsMetricsCycleTimePhase = exports.DevOpsJiraProjectType = exports.DevOpsEnvironmentCategory = exports.DeploymentState = 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.CompassScorecardImportance = exports.CompassRelationshipType = exports.CompassRelationshipDirection = exports.CompassQuerySortOrder = exports.CompassMetricDefinitionType = exports.CompassLinkType = exports.CompassLifecycleEventStage = exports.CompassIncidentEventState = exports.CompassIncidentEventSeverityLevel = exports.CompassFieldType = exports.CompassEventType = exports.CompassDeploymentEventState = exports.CompassDeploymentEventEnvironmentCategory = exports.CompassCustomEventIcon = exports.CompassCriteriaNumberComparatorOptions = exports.CompassCriteriaBooleanComparatorOptions = exports.CompassComponentType = exports.CompassBuildEventState = exports.Classification = exports.CardHierarchyLevelEnumType = exports.BuiltinPolarisIdeaField = exports.BoardFeatureToggleStatus = exports.BoardFeatureStatus = exports.BitbucketPermission = exports.AtlassianProductHostingType = exports.AriGraphRelationshipsSortDirection = exports.AppTaskState = exports.AppStoredEntityCondition = exports.AppSecurityPoliciesPermissionTypeExtension = exports.AppSecurityPoliciesPermissionType = exports.AppNetworkPermissionTypeExtension = exports.AppNetworkPermissionType = exports.AppEnvironmentType = exports.AppDeploymentStepStatus = exports.AppDeploymentStatus = exports.AppDeploymentEventLogLevel = exports.ApiGroup = exports.ApiContext = exports.ActivityProduct = exports.ActivityObjectType = exports.ActivityEventType = exports.ActivitiesObjectType = exports.ActivitiesFilterType = exports.ActivitiesContainerType = exports.AccountStatus = void 0;
|
|
4
4
|
var AccountStatus;
|
|
5
5
|
(function (AccountStatus) {
|
|
6
6
|
AccountStatus["Active"] = "active";
|
|
@@ -82,6 +82,7 @@ var ApiGroup;
|
|
|
82
82
|
ApiGroup["Identity"] = "IDENTITY";
|
|
83
83
|
ApiGroup["DevopsAriGraph"] = "DEVOPS_ARI_GRAPH";
|
|
84
84
|
ApiGroup["Help"] = "HELP";
|
|
85
|
+
ApiGroup["VirtualAgent"] = "VIRTUAL_AGENT";
|
|
85
86
|
ApiGroup["CollaborationGraph"] = "COLLABORATION_GRAPH";
|
|
86
87
|
})(ApiGroup = exports.ApiGroup || (exports.ApiGroup = {}));
|
|
87
88
|
var AppDeploymentEventLogLevel;
|
|
@@ -462,6 +463,11 @@ var ConfluencePageStatus;
|
|
|
462
463
|
ConfluencePageStatus["Historical"] = "HISTORICAL";
|
|
463
464
|
ConfluencePageStatus["Trashed"] = "TRASHED";
|
|
464
465
|
})(ConfluencePageStatus = exports.ConfluencePageStatus || (exports.ConfluencePageStatus = {}));
|
|
466
|
+
var ConfluenceSpaceSettingEditorVersion;
|
|
467
|
+
(function (ConfluenceSpaceSettingEditorVersion) {
|
|
468
|
+
ConfluenceSpaceSettingEditorVersion["V1"] = "V1";
|
|
469
|
+
ConfluenceSpaceSettingEditorVersion["V2"] = "V2";
|
|
470
|
+
})(ConfluenceSpaceSettingEditorVersion = exports.ConfluenceSpaceSettingEditorVersion || (exports.ConfluenceSpaceSettingEditorVersion = {}));
|
|
465
471
|
var ConfluenceSpaceStatus;
|
|
466
472
|
(function (ConfluenceSpaceStatus) {
|
|
467
473
|
ConfluenceSpaceStatus["Archived"] = "ARCHIVED";
|
|
@@ -472,6 +478,11 @@ var ConfluenceSpaceType;
|
|
|
472
478
|
ConfluenceSpaceType["Global"] = "GLOBAL";
|
|
473
479
|
ConfluenceSpaceType["Personal"] = "PERSONAL";
|
|
474
480
|
})(ConfluenceSpaceType = exports.ConfluenceSpaceType || (exports.ConfluenceSpaceType = {}));
|
|
481
|
+
var ConfluenceUserType;
|
|
482
|
+
(function (ConfluenceUserType) {
|
|
483
|
+
ConfluenceUserType["Anonymous"] = "ANONYMOUS";
|
|
484
|
+
ConfluenceUserType["Known"] = "KNOWN";
|
|
485
|
+
})(ConfluenceUserType = exports.ConfluenceUserType || (exports.ConfluenceUserType = {}));
|
|
475
486
|
var DeploymentState;
|
|
476
487
|
(function (DeploymentState) {
|
|
477
488
|
DeploymentState["Pending"] = "PENDING";
|
|
@@ -909,6 +920,12 @@ var JiraJqlSyntaxError;
|
|
|
909
920
|
JiraJqlSyntaxError["PredicateUnsupported"] = "PREDICATE_UNSUPPORTED";
|
|
910
921
|
JiraJqlSyntaxError["OperandUnsupported"] = "OPERAND_UNSUPPORTED";
|
|
911
922
|
})(JiraJqlSyntaxError = exports.JiraJqlSyntaxError || (exports.JiraJqlSyntaxError = {}));
|
|
923
|
+
var JiraMultiValueFieldOperations;
|
|
924
|
+
(function (JiraMultiValueFieldOperations) {
|
|
925
|
+
JiraMultiValueFieldOperations["Add"] = "ADD";
|
|
926
|
+
JiraMultiValueFieldOperations["Remove"] = "REMOVE";
|
|
927
|
+
JiraMultiValueFieldOperations["Set"] = "SET";
|
|
928
|
+
})(JiraMultiValueFieldOperations = exports.JiraMultiValueFieldOperations || (exports.JiraMultiValueFieldOperations = {}));
|
|
912
929
|
var JiraPermissionMessageTypeEnum;
|
|
913
930
|
(function (JiraPermissionMessageTypeEnum) {
|
|
914
931
|
JiraPermissionMessageTypeEnum["Information"] = "INFORMATION";
|
|
@@ -919,6 +936,12 @@ var JiraPermissionTagEnum;
|
|
|
919
936
|
JiraPermissionTagEnum["Deprecated"] = "DEPRECATED";
|
|
920
937
|
JiraPermissionTagEnum["New"] = "NEW";
|
|
921
938
|
})(JiraPermissionTagEnum = exports.JiraPermissionTagEnum || (exports.JiraPermissionTagEnum = {}));
|
|
939
|
+
var JiraProjectActionType;
|
|
940
|
+
(function (JiraProjectActionType) {
|
|
941
|
+
JiraProjectActionType["EditProjectConfig"] = "EDIT_PROJECT_CONFIG";
|
|
942
|
+
JiraProjectActionType["ViewIssues"] = "VIEW_ISSUES";
|
|
943
|
+
JiraProjectActionType["CreateIssues"] = "CREATE_ISSUES";
|
|
944
|
+
})(JiraProjectActionType = exports.JiraProjectActionType || (exports.JiraProjectActionType = {}));
|
|
922
945
|
var JiraProjectAndRepositoryRelationshipSortBy;
|
|
923
946
|
(function (JiraProjectAndRepositoryRelationshipSortBy) {
|
|
924
947
|
JiraProjectAndRepositoryRelationshipSortBy["LastInferredAt"] = "LAST_INFERRED_AT";
|
|
@@ -963,6 +986,12 @@ var JiraPullRequestState;
|
|
|
963
986
|
JiraPullRequestState["Declined"] = "DECLINED";
|
|
964
987
|
JiraPullRequestState["Merged"] = "MERGED";
|
|
965
988
|
})(JiraPullRequestState = exports.JiraPullRequestState || (exports.JiraPullRequestState = {}));
|
|
989
|
+
var JiraReleaseNotesIssueKeyConfig;
|
|
990
|
+
(function (JiraReleaseNotesIssueKeyConfig) {
|
|
991
|
+
JiraReleaseNotesIssueKeyConfig["None"] = "NONE";
|
|
992
|
+
JiraReleaseNotesIssueKeyConfig["Unlinked"] = "UNLINKED";
|
|
993
|
+
JiraReleaseNotesIssueKeyConfig["Linked"] = "LINKED";
|
|
994
|
+
})(JiraReleaseNotesIssueKeyConfig = exports.JiraReleaseNotesIssueKeyConfig || (exports.JiraReleaseNotesIssueKeyConfig = {}));
|
|
966
995
|
var JiraReleasesEpicReleaseStatusFilter;
|
|
967
996
|
(function (JiraReleasesEpicReleaseStatusFilter) {
|
|
968
997
|
JiraReleasesEpicReleaseStatusFilter["Released"] = "RELEASED";
|
|
@@ -1302,6 +1331,7 @@ var RateLimitingCurrency;
|
|
|
1302
1331
|
RateLimitingCurrency["TeamMembersCurrency"] = "TEAM_MEMBERS_CURRENCY";
|
|
1303
1332
|
RateLimitingCurrency["CompassInsertMetricValueCurrency"] = "COMPASS_INSERT_METRIC_VALUE_CURRENCY";
|
|
1304
1333
|
RateLimitingCurrency["CompassSynchronizeLinkAssociationsCurrency"] = "COMPASS_SYNCHRONIZE_LINK_ASSOCIATIONS_CURRENCY";
|
|
1334
|
+
RateLimitingCurrency["DirectoryCurrency"] = "DIRECTORY_CURRENCY";
|
|
1305
1335
|
RateLimitingCurrency["ForgeMetricsCurrency"] = "FORGE_METRICS_CURRENCY";
|
|
1306
1336
|
RateLimitingCurrency["DevopsServiceReadCurrency"] = "DEVOPS_SERVICE_READ_CURRENCY";
|
|
1307
1337
|
RateLimitingCurrency["DevopsServiceWriteCurrency"] = "DEVOPS_SERVICE_WRITE_CURRENCY";
|
|
@@ -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" | "devOps" | "jira" | "confluence" | "polaris" | "compass" | "shepherd" | "directory" | "helpObjectStore" | "jsw" | "roadmaps" | "ecosystem" | "jiraOAuthApps" | "helpCenter" | "createJiraProjectAndDevOpsToolRelationship" | "deleteJiraProjectAndDevOpsToolRelationship" | "deleteDevOpsToolRelationshipsForJiraProject" | "createReleaseNote" | "publishReleaseNote" | "updateReleaseNote" | "createDevOpsServiceAndOpsgenieTeamRelationship" | "updateDevOpsServiceAndOpsgenieTeamRelationship" | "deleteDevOpsServiceAndOpsgenieTeamRelationship" | "updateDevOpsContainerRelationshipEntityProperties" | "deleteDevOpsContainerRelationshipEntityProperties" | "createDevOpsServiceAndJiraProjectRelationship" | "updateDevOpsServiceAndJiraProjectRelationship" | "deleteDevOpsServiceAndJiraProjectRelationship" | "createDevOpsServiceAndRepositoryRelationship" | "updateDevOpsServiceAndRepositoryRelationship" | "deleteDevOpsServiceAndRepositoryRelationship" | "createJiraProjectAndOpsgenieTeamRelationship" | "updateJiraProjectAndOpsgenieTeamRelationship" | "deleteJiraProjectAndOpsgenieTeamRelationship" | "createJiraProjectAndRepositoryRelationship" | "updateJiraProjectAndRepositoryRelationship" | "deleteJiraProjectAndRepositoryRelationship" | "appStorage" | "updatePolarisTermsConsent" | "createPolarisAnonymousVisitorHash" | "deletePolarisAnonymousVisitorHash" | "resolvePolarisObject" | "invokePolarisObject" | "createPolarisComment" | "updatePolarisComment" | "createPolarisStandardField" | "createPolarisCalculatedField" | "updatePolarisCalculatedField" | "updatePolarisFieldDescription" | "updatePolarisFieldEmoji" | "deletePolarisField" | "updatePolarisFieldOptionWeight" | "deletePolarisFieldOption" | "createPolarisDecoration" | "updatePolarisDecoration" | "deletePolarisDecoration" | "createPolarisIdeaTemplate" | "updatePolarisIdeaTemplate" | "deletePolarisIdeaTemplate" | "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" | "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" | "updateNavbarConnectionStateTabSeen" | "createDevOpsService" | "updateDevOpsService" | "deleteDevOpsService" | "createDevOpsServiceRelationship" | "updateDevOpsServiceRelationship" | "deleteDevOpsServiceRelationship" | "updateDevOpsServiceEntityProperties" | "deleteDevOpsServiceEntityProperties" | "updateDeveloperLogAccess" | "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" | "devOps" | "jira" | "confluence" | "polaris" | "compass" | "shepherd" | "directory" | "helpObjectStore" | "jsw" | "roadmaps" | "virtualAgent" | "ecosystem" | "jiraOAuthApps" | "helpCenter" | "createJiraProjectAndDevOpsToolRelationship" | "deleteJiraProjectAndDevOpsToolRelationship" | "deleteDevOpsToolRelationshipsForJiraProject" | "createReleaseNote" | "publishReleaseNote" | "updateReleaseNote" | "createDevOpsServiceAndOpsgenieTeamRelationship" | "updateDevOpsServiceAndOpsgenieTeamRelationship" | "deleteDevOpsServiceAndOpsgenieTeamRelationship" | "updateDevOpsContainerRelationshipEntityProperties" | "deleteDevOpsContainerRelationshipEntityProperties" | "createDevOpsServiceAndJiraProjectRelationship" | "updateDevOpsServiceAndJiraProjectRelationship" | "deleteDevOpsServiceAndJiraProjectRelationship" | "createDevOpsServiceAndRepositoryRelationship" | "updateDevOpsServiceAndRepositoryRelationship" | "deleteDevOpsServiceAndRepositoryRelationship" | "createJiraProjectAndOpsgenieTeamRelationship" | "updateJiraProjectAndOpsgenieTeamRelationship" | "deleteJiraProjectAndOpsgenieTeamRelationship" | "createJiraProjectAndRepositoryRelationship" | "updateJiraProjectAndRepositoryRelationship" | "deleteJiraProjectAndRepositoryRelationship" | "appStorage" | "updatePolarisTermsConsent" | "createPolarisAnonymousVisitorHash" | "deletePolarisAnonymousVisitorHash" | "resolvePolarisObject" | "invokePolarisObject" | "createPolarisComment" | "updatePolarisComment" | "createPolarisStandardField" | "createPolarisCalculatedField" | "updatePolarisCalculatedField" | "updatePolarisFieldDescription" | "updatePolarisFieldEmoji" | "deletePolarisField" | "updatePolarisFieldOptionWeight" | "deletePolarisFieldOption" | "createPolarisDecoration" | "updatePolarisDecoration" | "deletePolarisDecoration" | "createPolarisIdeaTemplate" | "updatePolarisIdeaTemplate" | "deletePolarisIdeaTemplate" | "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" | "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" | "updateNavbarConnectionStateTabSeen" | "createDevOpsService" | "updateDevOpsService" | "deleteDevOpsService" | "createDevOpsServiceRelationship" | "updateDevOpsServiceRelationship" | "deleteDevOpsServiceRelationship" | "updateDevOpsServiceEntityProperties" | "deleteDevOpsServiceEntityProperties" | "updateDeveloperLogAccess" | "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>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LDClient, LDOptions, LDUser } from 'launchdarkly-node-client-sdk';
|
|
2
|
-
import {
|
|
2
|
+
import { CredentialGetter } from '../auth';
|
|
3
3
|
import { ConfigSectionReader } from '../config';
|
|
4
4
|
import { getEnvironment } from '../graphql';
|
|
5
5
|
import { CLIDetails } from '../shared';
|
|
@@ -19,11 +19,11 @@ export declare function cachedMethod<C, T>(getter: (this: C) => Promise<T>): (th
|
|
|
19
19
|
export declare class FeatureFlagService implements FeatureFlagReader {
|
|
20
20
|
private readonly logger;
|
|
21
21
|
private readonly cliDetails;
|
|
22
|
-
private readonly
|
|
22
|
+
private readonly credentialStore;
|
|
23
23
|
private readonly appConfigReader;
|
|
24
24
|
private readonly getEnvironmentFn;
|
|
25
25
|
private readonly initializeLD;
|
|
26
|
-
constructor(logger: Logger, cliDetails: Pick<CLIDetails, 'version'> | undefined,
|
|
26
|
+
constructor(logger: Logger, cliDetails: Pick<CLIDetails, 'version'> | undefined, credentialStore: CredentialGetter, appConfigReader: ConfigSectionReader<{
|
|
27
27
|
id: string;
|
|
28
28
|
}>, getEnvironmentFn?: typeof getEnvironment, initializeLD?: LaunchDarklyInitialize);
|
|
29
29
|
private appID;
|
|
@@ -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,
|
|
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,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,gBAAgB,EACjC,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,CAmBT;IAEH,OAAO,CAAC,MAAM,CAUX;IAEG,QAAQ,CAAC,CAAC,SAAS,WAAW,EAAE,IAAI,EAAE,CAAC,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;CAUnF"}
|
|
@@ -27,10 +27,10 @@ function cachedMethod(getter) {
|
|
|
27
27
|
}
|
|
28
28
|
exports.cachedMethod = cachedMethod;
|
|
29
29
|
class FeatureFlagService {
|
|
30
|
-
constructor(logger, cliDetails,
|
|
30
|
+
constructor(logger, cliDetails, credentialStore, appConfigReader, getEnvironmentFn = graphql_1.getEnvironment, initializeLD = launchdarkly_node_client_sdk_1.default.initialize) {
|
|
31
31
|
this.logger = logger;
|
|
32
32
|
this.cliDetails = cliDetails;
|
|
33
|
-
this.
|
|
33
|
+
this.credentialStore = credentialStore;
|
|
34
34
|
this.appConfigReader = appConfigReader;
|
|
35
35
|
this.getEnvironmentFn = getEnvironmentFn;
|
|
36
36
|
this.initializeLD = initializeLD;
|
|
@@ -54,7 +54,7 @@ class FeatureFlagService {
|
|
|
54
54
|
}
|
|
55
55
|
let key;
|
|
56
56
|
try {
|
|
57
|
-
key = (await this.
|
|
57
|
+
key = (await this.credentialStore.getCredentials()).accountId;
|
|
58
58
|
}
|
|
59
59
|
catch (e) {
|
|
60
60
|
key = 'anonymous';
|
package/out/shared/product.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export declare const SUPPORTED_PRODUCTS: string[];
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const WORKSPACE_PRODUCTS: string[];
|
|
3
3
|
export declare function capitalizeProduct(product: string): string;
|
|
4
|
+
export declare const isWorkspaceProduct: (product: string) => boolean;
|
|
5
|
+
export declare const isBitbucketProduct: (product: string) => boolean;
|
|
6
|
+
export declare const isSupportedProduct: (product: string) => boolean;
|
|
4
7
|
//# sourceMappingURL=product.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product.d.ts","sourceRoot":"","sources":["../../src/shared/product.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,UAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"product.d.ts","sourceRoot":"","sources":["../../src/shared/product.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,UAAoC,CAAC;AACpE,eAAO,MAAM,kBAAkB,UAAgB,CAAC;AAEhD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,eAAO,MAAM,kBAAkB,YAAa,MAAM,KAAG,OAEpD,CAAC;AAEF,eAAO,MAAM,kBAAkB,YAAa,MAAM,KAAG,OAEpD,CAAC;AAEF,eAAO,MAAM,kBAAkB,YAAa,MAAM,KAAG,OAEpD,CAAC"}
|
package/out/shared/product.js
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.capitalizeProduct = exports.
|
|
3
|
+
exports.isSupportedProduct = exports.isBitbucketProduct = exports.isWorkspaceProduct = exports.capitalizeProduct = exports.WORKSPACE_PRODUCTS = exports.SUPPORTED_PRODUCTS = void 0;
|
|
4
4
|
const case_1 = require("case");
|
|
5
5
|
exports.SUPPORTED_PRODUCTS = ['Jira', 'Confluence', 'Compass'];
|
|
6
|
-
exports.
|
|
7
|
-
return exports.SUPPORTED_PRODUCTS.includes(product);
|
|
8
|
-
};
|
|
6
|
+
exports.WORKSPACE_PRODUCTS = ['Bitbucket'];
|
|
9
7
|
function capitalizeProduct(product) {
|
|
10
8
|
return case_1.capital(product);
|
|
11
9
|
}
|
|
12
10
|
exports.capitalizeProduct = capitalizeProduct;
|
|
11
|
+
exports.isWorkspaceProduct = (product) => {
|
|
12
|
+
return exports.WORKSPACE_PRODUCTS.includes(capitalizeProduct(product));
|
|
13
|
+
};
|
|
14
|
+
exports.isBitbucketProduct = (product) => {
|
|
15
|
+
return capitalizeProduct(product) === 'Bitbucket';
|
|
16
|
+
};
|
|
17
|
+
exports.isSupportedProduct = (product) => {
|
|
18
|
+
return exports.SUPPORTED_PRODUCTS.includes(capitalizeProduct(product)) || exports.isWorkspaceProduct(product);
|
|
19
|
+
};
|
package/out/shared/validate.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/shared/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/shared/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAK1B,eAAO,MAAM,YAAY,SAAU,MAAM,WAAW,MAAM,GAAG,SAAS,KAAG,GAkBxE,CAAC"}
|
package/out/shared/validate.js
CHANGED
|
@@ -4,11 +4,15 @@ exports.validateSite = void 0;
|
|
|
4
4
|
const url_1 = require("url");
|
|
5
5
|
const ui_1 = require("../ui");
|
|
6
6
|
const ui_2 = require("../ui");
|
|
7
|
-
|
|
7
|
+
const product_1 = require("./product");
|
|
8
|
+
exports.validateSite = (site, product) => {
|
|
8
9
|
const trySites = [site, `https://${site}`];
|
|
9
10
|
for (const trySite of trySites) {
|
|
10
11
|
try {
|
|
11
12
|
const urlObj = new url_1.URL(trySite);
|
|
13
|
+
if (product && product_1.isWorkspaceProduct(product)) {
|
|
14
|
+
return urlObj;
|
|
15
|
+
}
|
|
12
16
|
urlObj.pathname = '/';
|
|
13
17
|
return urlObj;
|
|
14
18
|
}
|
package/out/ui/text.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare const capitalise: (word: string) => string;
|
|
|
4
4
|
export declare const Text: {
|
|
5
5
|
error: {
|
|
6
6
|
noKeytar: string;
|
|
7
|
-
|
|
7
|
+
noTokenStored: string;
|
|
8
8
|
keytarAccessError: {
|
|
9
9
|
other: (message: string) => string;
|
|
10
10
|
mac: (message: string) => string;
|
|
@@ -15,7 +15,7 @@ export declare const Text: {
|
|
|
15
15
|
outdatedNodeVersion: (compatibleNodeVersion: string, currentNodeVersion: string) => string;
|
|
16
16
|
invalidProduct: string;
|
|
17
17
|
invalidSite: string;
|
|
18
|
-
|
|
18
|
+
invalidTokenInKeytar: string;
|
|
19
19
|
invalidTokenInEnv: (instructionsUrl: string, emailVar: string, tokenVar: string) => string;
|
|
20
20
|
promptInputRequired: string;
|
|
21
21
|
noExecutableFile: string;
|
|
@@ -26,6 +26,9 @@ export declare const Text: {
|
|
|
26
26
|
templateFetchFailed: string;
|
|
27
27
|
};
|
|
28
28
|
warning: {
|
|
29
|
+
plaintextCredentialsFound: (url: string) => string;
|
|
30
|
+
plaintextCredentialsMigrated: string;
|
|
31
|
+
plaintextCredentialsNotMigrated: string;
|
|
29
32
|
unsupportedNodeVersion: (userNodeVersion: string) => string;
|
|
30
33
|
};
|
|
31
34
|
installationContext: {
|
|
@@ -33,6 +36,7 @@ export declare const Text: {
|
|
|
33
36
|
promptProduct: string;
|
|
34
37
|
overviewSite: string;
|
|
35
38
|
promptSite: string;
|
|
39
|
+
promptWorkspace: string;
|
|
36
40
|
};
|
|
37
41
|
upgradeContext: {
|
|
38
42
|
overview: string;
|
|
@@ -331,6 +335,7 @@ export declare const Text: {
|
|
|
331
335
|
};
|
|
332
336
|
error: {
|
|
333
337
|
invalidAtlassianSite: (url: URL) => string;
|
|
338
|
+
invalidWorkspace: (url: URL) => string;
|
|
334
339
|
url: (url: string) => string;
|
|
335
340
|
site: (url: string) => string;
|
|
336
341
|
alreadyInstalledError: string;
|
|
@@ -378,7 +383,7 @@ export declare const Text: {
|
|
|
378
383
|
installList: {
|
|
379
384
|
cmd: string;
|
|
380
385
|
banner: string;
|
|
381
|
-
|
|
386
|
+
noResourceId: string;
|
|
382
387
|
noInstallations: string;
|
|
383
388
|
};
|
|
384
389
|
tunnel: {
|
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;AAK1B,aAAK,mBAAmB,GAAG,CAAC,WAAW,EAAE,MAAM,KAAK,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/ui/text.ts"],"names":[],"mappings":"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"}
|
package/out/ui/text.js
CHANGED
|
@@ -7,11 +7,14 @@ const terminal_link_1 = tslib_1.__importDefault(require("terminal-link"));
|
|
|
7
7
|
const case_1 = require("case");
|
|
8
8
|
const log_symbols_1 = tslib_1.__importDefault(require("./log-symbols"));
|
|
9
9
|
const log_color_1 = require("./log-color");
|
|
10
|
-
const reinstallCmd = chalk_1.default.bold('npm install -g @forge/cli');
|
|
11
10
|
const ctrlC = 'Press Ctrl+C to cancel.';
|
|
11
|
+
const gettingStartedDACLink = 'https://go.atlassian.com/dac/platform/forge/getting-started/#log-in-with-an-atlassian-api-token';
|
|
12
12
|
const encryptedValue = '****';
|
|
13
13
|
const greenTick = `${chalk_1.default.bold(chalk_1.default.green('✔'))}`;
|
|
14
14
|
const buildTerminalLink = (text) => terminal_link_1.default(chalk_1.default.bold(text), text, { fallback: () => chalk_1.default.underline.bold(text) });
|
|
15
|
+
const autoSpaceSentences = (...sentences) => sentences
|
|
16
|
+
.filter((sentence) => sentence.length > 0)
|
|
17
|
+
.join(' ');
|
|
15
18
|
const fatalError = (message) => chalk_1.default.bold(chalk_1.default.red(message));
|
|
16
19
|
const keytarAccessErrorBase = (message) => `Keytar error detected: ${message}`;
|
|
17
20
|
exports.capitalise = (word) => word.charAt(0).toUpperCase() + word.slice(1);
|
|
@@ -23,13 +26,20 @@ const checkLintTotalPlurals = (numErrors, numWarnings, numFixableErrors, numFixa
|
|
|
23
26
|
pluralCheckedFixableErrors: `${numFixableErrors} ${numFixableErrors === 1 ? 'error' : 'errors'}`,
|
|
24
27
|
pluralCheckedFixableWarnings: `${numFixableWarnings} ${numFixableWarnings === 1 ? 'warning' : 'warnings'}`
|
|
25
28
|
});
|
|
29
|
+
const platformKeytarRecommendations = () => {
|
|
30
|
+
switch (process.platform) {
|
|
31
|
+
case 'darwin':
|
|
32
|
+
return 'Ensure you enable access to the macOS keychain when prompted.';
|
|
33
|
+
case 'linux':
|
|
34
|
+
return `Ensure you have ${chalk_1.default.bold('libsecret')} installed.`;
|
|
35
|
+
default:
|
|
36
|
+
return '';
|
|
37
|
+
}
|
|
38
|
+
};
|
|
26
39
|
exports.Text = {
|
|
27
40
|
error: {
|
|
28
|
-
noKeytar:
|
|
29
|
-
|
|
30
|
-
? `Make sure you have libsecret, then install the CLI again with ${reinstallCmd}.`
|
|
31
|
-
: `To fix this, install the CLI again with ${reinstallCmd}.`),
|
|
32
|
-
noTokenInKeytarOrCache: `Not logged in. Run ${chalk_1.default.bold('forge login')} before trying again.`,
|
|
41
|
+
noKeytar: autoSpaceSentences(`The CLI couldn't securely store your login credentials in a local keychain.`, platformKeytarRecommendations(), `If a local keychain is not available, use environment variables before trying again. See ${buildTerminalLink(gettingStartedDACLink)} for more.`),
|
|
42
|
+
noTokenStored: `Not logged in. If a local keychain is available, run ${chalk_1.default.bold('forge login')}, otherwise set environment variables before trying again. See ${buildTerminalLink(gettingStartedDACLink)} for more.`,
|
|
33
43
|
keytarAccessError: {
|
|
34
44
|
other: (message) => keytarAccessErrorBase(message),
|
|
35
45
|
mac: (message) => keytarAccessErrorBase(message) +
|
|
@@ -43,7 +53,7 @@ exports.Text = {
|
|
|
43
53
|
outdatedNodeVersion: (compatibleNodeVersion, currentNodeVersion) => fatalError(`Unsupported Node.js version. The CLI requires Node.js ${compatibleNodeVersion}, but you're using Node.js ${currentNodeVersion}.`),
|
|
44
54
|
invalidProduct: 'Invalid product. Rerun the command with a valid product.',
|
|
45
55
|
invalidSite: 'The site you entered is not an Atlassian site. Rerun the command with the URL to an Atlassian site to install the app.',
|
|
46
|
-
|
|
56
|
+
invalidTokenInKeytar: `Your API token is no longer valid. Run ${chalk_1.default.bold('forge login')} to reset your login credentials.`,
|
|
47
57
|
invalidTokenInEnv: (instructionsUrl, emailVar, tokenVar) => `The API token on your machine is no longer valid.` +
|
|
48
58
|
`\n 1) Get a new API token: ${instructionsUrl}` +
|
|
49
59
|
`\n 2) Set your email and the token to ${emailVar} and ${tokenVar} environment variables.`,
|
|
@@ -56,6 +66,9 @@ exports.Text = {
|
|
|
56
66
|
templateFetchFailed: 'Failed to fetch templates, try running the command again.'
|
|
57
67
|
},
|
|
58
68
|
warning: {
|
|
69
|
+
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)}.`,
|
|
70
|
+
plaintextCredentialsMigrated: 'The credentials found in plaintext have been migrated to your local keychain.',
|
|
71
|
+
plaintextCredentialsNotMigrated: autoSpaceSentences(`The CLI couldn't securely store your login credentials in a local keychain.`, platformKeytarRecommendations(), `If a local keychain is not available, use environment variables instead. See ${buildTerminalLink(gettingStartedDACLink)} for more information.`),
|
|
59
72
|
unsupportedNodeVersion: (userNodeVersion) => log_color_1.LogColor.warn(`Warning: Forge CLI currently supports Active LTS or Maintenance LTS releases of Node.js only. ` +
|
|
60
73
|
`\nUpdate Node.js from version ${chalk_1.default.bold(userNodeVersion)} to an LTS release to continue using Forge CLI.` +
|
|
61
74
|
`\nLearn more about LTS releases at https://nodejs.org/en/about/releases. ` +
|
|
@@ -65,7 +78,8 @@ exports.Text = {
|
|
|
65
78
|
overviewProduct: 'Select the product your app uses.\n',
|
|
66
79
|
promptProduct: 'Select a product:',
|
|
67
80
|
overviewSite: '\nEnter your site. For example, your-domain.atlassian.net\n',
|
|
68
|
-
promptSite: 'Enter the site URL:'
|
|
81
|
+
promptSite: 'Enter the site URL:',
|
|
82
|
+
promptWorkspace: 'Enter the workspace URL:'
|
|
69
83
|
},
|
|
70
84
|
upgradeContext: {
|
|
71
85
|
overview: `To upgrade your app to use the latest scopes, select it from the list.\n${ctrlC}`,
|
|
@@ -426,6 +440,9 @@ What do you like or don't like about Forge? Share your feedback below or press C
|
|
|
426
440
|
invalidAtlassianSite: (url) => `The URL you entered doesn't belong to an Atlassian site: ` +
|
|
427
441
|
`\n${url.toString()} ` +
|
|
428
442
|
`\n\nRun the command using a different URL.`,
|
|
443
|
+
invalidWorkspace: (url) => `The URL you entered is not a valid workspace: ` +
|
|
444
|
+
`\n${url.toString()} ` +
|
|
445
|
+
`\n\nRun the command using a different URL.`,
|
|
429
446
|
url: (url) => `Site URL is invalid: ${url}`,
|
|
430
447
|
site: (url) => `Site is invalid: ${url}`,
|
|
431
448
|
alreadyInstalledError: `Installation error: App is already installed.\nIf you're trying to upgrade your app, use the ${chalk_1.default.bold('forge install --upgrade')} command.`,
|
|
@@ -492,7 +509,7 @@ ${buildTerminalLink(link)}\n`,
|
|
|
492
509
|
installList: {
|
|
493
510
|
cmd: 'list app installations',
|
|
494
511
|
banner: `\nShowing all the current installations of your app:`,
|
|
495
|
-
|
|
512
|
+
noResourceId: 'Unknown site with no resource ID',
|
|
496
513
|
noInstallations: `The app is not installed anywhere.\nRun ${chalk_1.default.bold('forge install')} to install your app on an Atlassian site.\n`
|
|
497
514
|
},
|
|
498
515
|
tunnel: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/cli-shared",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-next.0",
|
|
4
4
|
"description": "Common functionality for Forge CLI",
|
|
5
5
|
"author": "Atlassian",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"ignore-walk": "^3.0.3",
|
|
33
33
|
"inquirer": "^7.0.4",
|
|
34
34
|
"io-ts": "^2.0.6",
|
|
35
|
+
"keytar": "^7.9.0",
|
|
35
36
|
"launchdarkly-node-client-sdk": "^2.0.3",
|
|
36
37
|
"node-fetch": "2.6.1",
|
|
37
38
|
"ora": "^4.0.3",
|
|
@@ -42,9 +43,6 @@
|
|
|
42
43
|
"unzipper": "^0.10.8",
|
|
43
44
|
"yaml": "^1.10.0"
|
|
44
45
|
},
|
|
45
|
-
"optionalDependencies": {
|
|
46
|
-
"keytar": "^7.0.0"
|
|
47
|
-
},
|
|
48
46
|
"devDependencies": {
|
|
49
47
|
"@graphql-codegen/add": "^2.0.1",
|
|
50
48
|
"@graphql-codegen/cli": "^1.21.6",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"credentials-store-provider.d.ts","sourceRoot":"","sources":["../../src/auth/credentials-store-provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EAKL,2BAA2B,EAC5B,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,2BAA2B,OAAQ,EAAE,KAAG,2BAMpD,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getCredentialsStoreProvider = void 0;
|
|
4
|
-
const graphql_1 = require("../graphql");
|
|
5
|
-
const personal_1 = require("./personal");
|
|
6
|
-
exports.getCredentialsStoreProvider = (ui) => {
|
|
7
|
-
const graphqlGateway = graphql_1.getGraphqlGateway();
|
|
8
|
-
return personal_1.hasKeytar()
|
|
9
|
-
? new personal_1.KeytarPersonalApiCredentialsStore(graphqlGateway, () => personal_1.getKeytar(ui))
|
|
10
|
-
: new personal_1.CachePersonalApiCredentialsStore(graphqlGateway);
|
|
11
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { PersonalApiCredentialsGetter, PersonalApiCredentialsValidated } from './token-store';
|
|
2
|
-
export declare const EMAIL_KEY = "FORGE_EMAIL";
|
|
3
|
-
export declare const API_TOKEN_KEY = "FORGE_API_TOKEN";
|
|
4
|
-
export declare const AAID_KEY = "FORGE_AAID";
|
|
5
|
-
export declare abstract class AbstractPersonalApiCredentialsGetter implements PersonalApiCredentialsGetter {
|
|
6
|
-
protected readonly graphqlGateway: string;
|
|
7
|
-
protected constructor(graphqlGateway: string);
|
|
8
|
-
getCredentials: () => Promise<PersonalApiCredentialsValidated>;
|
|
9
|
-
abstract getCredentialsImpl(): Promise<PersonalApiCredentialsValidated>;
|
|
10
|
-
getInstructionsWhenInvalid: () => string;
|
|
11
|
-
abstract getInstructionsWhenInvalidImpl(): string;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=abstract-token-store-getter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"abstract-token-store-getter.d.ts","sourceRoot":"","sources":["../../../src/auth/personal/abstract-token-store-getter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,4BAA4B,EAAE,+BAA+B,EAAE,MAAM,eAAe,CAAC;AAE9F,eAAO,MAAM,SAAS,gBAAgB,CAAC;AACvC,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAC/C,eAAO,MAAM,QAAQ,eAAe,CAAC;AAErC,8BAAsB,oCAAqC,YAAW,4BAA4B;IAC1E,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,MAAM;IAA/D,SAAS,aAAgC,cAAc,EAAE,MAAM;IAE/D,cAAc,QAAO,OAAO,CAAC,+BAA+B,CAAC,CAU3D;IAEF,QAAQ,CAAC,kBAAkB,IAAI,OAAO,CAAC,+BAA+B,CAAC;IAEvE,0BAA0B,QAAO,MAAM,CAMrC;IAEF,QAAQ,CAAC,8BAA8B,IAAI,MAAM;CAClD"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AbstractPersonalApiCredentialsGetter = exports.AAID_KEY = exports.API_TOKEN_KEY = exports.EMAIL_KEY = void 0;
|
|
4
|
-
const instruction_1 = require("../instruction");
|
|
5
|
-
const ui_1 = require("../../ui");
|
|
6
|
-
exports.EMAIL_KEY = 'FORGE_EMAIL';
|
|
7
|
-
exports.API_TOKEN_KEY = 'FORGE_API_TOKEN';
|
|
8
|
-
exports.AAID_KEY = 'FORGE_AAID';
|
|
9
|
-
class AbstractPersonalApiCredentialsGetter {
|
|
10
|
-
constructor(graphqlGateway) {
|
|
11
|
-
this.graphqlGateway = graphqlGateway;
|
|
12
|
-
this.getCredentials = () => {
|
|
13
|
-
if (process.env[exports.API_TOKEN_KEY] && process.env[exports.EMAIL_KEY]) {
|
|
14
|
-
return Promise.resolve({
|
|
15
|
-
email: process.env[exports.EMAIL_KEY],
|
|
16
|
-
token: process.env[exports.API_TOKEN_KEY],
|
|
17
|
-
accountId: process.env[exports.AAID_KEY] || ''
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
return this.getCredentialsImpl();
|
|
21
|
-
};
|
|
22
|
-
this.getInstructionsWhenInvalid = () => {
|
|
23
|
-
if (process.env[exports.API_TOKEN_KEY] && process.env[exports.EMAIL_KEY]) {
|
|
24
|
-
const instructionsUrl = instruction_1.getInstructionsUrl(this.graphqlGateway);
|
|
25
|
-
return ui_1.Text.error.invalidTokenInEnv(instructionsUrl, exports.EMAIL_KEY, exports.API_TOKEN_KEY);
|
|
26
|
-
}
|
|
27
|
-
return this.getInstructionsWhenInvalidImpl();
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
exports.AbstractPersonalApiCredentialsGetter = AbstractPersonalApiCredentialsGetter;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { AbstractPersonalApiCredentialsGetter } from './abstract-token-store-getter';
|
|
2
|
-
import { PersonalApiCredentialsDeleter, PersonalApiCredentialsSetter, PersonalApiCredentialsValidated } from './token-store';
|
|
3
|
-
export declare class CachePersonalApiCredentialsStore extends AbstractPersonalApiCredentialsGetter implements PersonalApiCredentialsSetter, PersonalApiCredentialsDeleter {
|
|
4
|
-
protected readonly graphqlGateway: string;
|
|
5
|
-
private cachedConfig;
|
|
6
|
-
constructor(graphqlGateway: string);
|
|
7
|
-
getCredentialsImpl(): Promise<PersonalApiCredentialsValidated>;
|
|
8
|
-
getInstructionsWhenInvalidImpl(): string;
|
|
9
|
-
deleteCredentials(): Promise<void>;
|
|
10
|
-
setCredentials(credentials: PersonalApiCredentialsValidated): Promise<void>;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=token-store-cache.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"token-store-cache.d.ts","sourceRoot":"","sources":["../../../src/auth/personal/token-store-cache.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oCAAoC,EAAE,MAAM,+BAA+B,CAAC;AACrF,OAAO,EAEL,6BAA6B,EAC7B,4BAA4B,EAC5B,+BAA+B,EAChC,MAAM,eAAe,CAAC;AAOvB,qBAAa,gCAAiC,SAAQ,oCACpD,YAAW,4BAA4B,EAAE,6BAA6B;IAG1D,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,MAAM;IAFrD,OAAO,CAAC,YAAY,CAAa;gBAEF,cAAc,EAAE,MAAM;IAK9C,kBAAkB,IAAI,OAAO,CAAC,+BAA+B,CAAC;IAU9D,8BAA8B,IAAI,MAAM;IAI/C,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAOlC,cAAc,CAAC,WAAW,EAAE,+BAA+B,GAAG,OAAO,CAAC,IAAI,CAAC;CAM5E"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CachePersonalApiCredentialsStore = void 0;
|
|
4
|
-
const ui_1 = require("../../ui");
|
|
5
|
-
const abstract_token_store_getter_1 = require("./abstract-token-store-getter");
|
|
6
|
-
const token_store_1 = require("./token-store");
|
|
7
|
-
const cache_1 = require("../../cache");
|
|
8
|
-
const FORGE_CLI_PACKAGE = '@forge/cli';
|
|
9
|
-
const CACHE_CREDENTIALS_KEY = 'forge-credentials';
|
|
10
|
-
class CachePersonalApiCredentialsStore extends abstract_token_store_getter_1.AbstractPersonalApiCredentialsGetter {
|
|
11
|
-
constructor(graphqlGateway) {
|
|
12
|
-
super(graphqlGateway);
|
|
13
|
-
this.graphqlGateway = graphqlGateway;
|
|
14
|
-
this.cachedConfig = cache_1.CachedConf.getCache(FORGE_CLI_PACKAGE);
|
|
15
|
-
}
|
|
16
|
-
getCredentialsImpl() {
|
|
17
|
-
return new Promise((resolve, reject) => {
|
|
18
|
-
const credentials = this.cachedConfig.get(CACHE_CREDENTIALS_KEY);
|
|
19
|
-
if (!credentials) {
|
|
20
|
-
return reject(new token_store_1.NoTokenInStoreError());
|
|
21
|
-
}
|
|
22
|
-
resolve(credentials);
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
getInstructionsWhenInvalidImpl() {
|
|
26
|
-
return ui_1.Text.error.invalidTokenInKeytarOrCache;
|
|
27
|
-
}
|
|
28
|
-
deleteCredentials() {
|
|
29
|
-
return new Promise((resolve) => {
|
|
30
|
-
this.cachedConfig.delete(CACHE_CREDENTIALS_KEY);
|
|
31
|
-
resolve();
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
setCredentials(credentials) {
|
|
35
|
-
return new Promise((resolve) => {
|
|
36
|
-
this.cachedConfig.set(CACHE_CREDENTIALS_KEY, credentials);
|
|
37
|
-
resolve();
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
exports.CachePersonalApiCredentialsStore = CachePersonalApiCredentialsStore;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { UI } from '../../ui';
|
|
2
|
-
import { AbstractPersonalApiCredentialsGetter } from './abstract-token-store-getter';
|
|
3
|
-
import { PersonalApiCredentialsDeleter, PersonalApiCredentialsSetter, PersonalApiCredentialsValidated } from './token-store';
|
|
4
|
-
export interface Keytar {
|
|
5
|
-
getPassword(service: string, account: string): Promise<string | null>;
|
|
6
|
-
setPassword(service: string, account: string, password: string): Promise<void>;
|
|
7
|
-
deletePassword(service: string, account: string): Promise<void>;
|
|
8
|
-
}
|
|
9
|
-
export declare function getKeytar(ui: UI): Keytar | never;
|
|
10
|
-
export declare const hasKeytar: () => boolean;
|
|
11
|
-
export declare class KeytarPersonalApiCredentialsStore extends AbstractPersonalApiCredentialsGetter implements PersonalApiCredentialsSetter, PersonalApiCredentialsDeleter {
|
|
12
|
-
protected readonly graphqlGateway: string;
|
|
13
|
-
private readonly keytarProvider;
|
|
14
|
-
private keytarAccount;
|
|
15
|
-
constructor(graphqlGateway: string, keytarProvider: () => Keytar);
|
|
16
|
-
private getKeytarAccount;
|
|
17
|
-
getCredentialsImpl(): Promise<PersonalApiCredentialsValidated>;
|
|
18
|
-
getInstructionsWhenInvalidImpl(): string;
|
|
19
|
-
setCredentials(credentials: PersonalApiCredentialsValidated): Promise<void>;
|
|
20
|
-
deleteCredentials(): Promise<void>;
|
|
21
|
-
private wrapKeytarError;
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=token-store-keytar.d.ts.map
|