@forge/cli-shared 3.2.0-next.3 → 3.2.0-next.5
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 +13 -0
- package/out/graphql/graphql-types.d.ts +57 -46
- package/out/graphql/graphql-types.d.ts.map +1 -1
- package/out/graphql/graphql-types.js +1 -12
- 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 +26 -0
- package/out/ui/text.d.ts +1 -0
- package/out/ui/text.d.ts.map +1 -1
- package/out/ui/text.js +1 -0
- package/out/ui/ui.d.ts +11 -0
- package/out/ui/ui.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SourceBillingType = exports.UserInstallationRuleValue = exports.TownsquareTargetDateType = exports.TownsquareProjectStateValue = exports.TownsquareProjectSortEnum = exports.TownsquareHelpPointerType = exports.TownsquareGoalStateValue = 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.ShepherdActionType = 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.JiraSingleValueFieldOperations = 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.JiraIssueLifecycleState = 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.
|
|
3
|
+
exports.SourceBillingType = exports.UserInstallationRuleValue = exports.TownsquareTargetDateType = exports.TownsquareProjectStateValue = exports.TownsquareProjectSortEnum = exports.TownsquareHelpPointerType = exports.TownsquareGoalStateValue = 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.ShepherdActionType = 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.JiraSingleValueFieldOperations = 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.JiraIssueLifecycleState = 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.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";
|
|
@@ -663,17 +663,6 @@ var ForgeMetricsSiteFilterCategory;
|
|
|
663
663
|
ForgeMetricsSiteFilterCategory["HighestNumberOfUsers"] = "HIGHEST_NUMBER_OF_USERS";
|
|
664
664
|
ForgeMetricsSiteFilterCategory["All"] = "ALL";
|
|
665
665
|
})(ForgeMetricsSiteFilterCategory = exports.ForgeMetricsSiteFilterCategory || (exports.ForgeMetricsSiteFilterCategory = {}));
|
|
666
|
-
var FortifiedMarketplacePartnerContactPermission;
|
|
667
|
-
(function (FortifiedMarketplacePartnerContactPermission) {
|
|
668
|
-
FortifiedMarketplacePartnerContactPermission["AdministerPartner"] = "ADMINISTER_PARTNER";
|
|
669
|
-
FortifiedMarketplacePartnerContactPermission["ManageAddonDetails"] = "MANAGE_ADDON_DETAILS";
|
|
670
|
-
FortifiedMarketplacePartnerContactPermission["ManagePayment"] = "MANAGE_PAYMENT";
|
|
671
|
-
FortifiedMarketplacePartnerContactPermission["ManagePricing"] = "MANAGE_PRICING";
|
|
672
|
-
FortifiedMarketplacePartnerContactPermission["ManagePromotions"] = "MANAGE_PROMOTIONS";
|
|
673
|
-
FortifiedMarketplacePartnerContactPermission["ManagePartnerDetails"] = "MANAGE_PARTNER_DETAILS";
|
|
674
|
-
FortifiedMarketplacePartnerContactPermission["ViewSalesReports"] = "VIEW_SALES_REPORTS";
|
|
675
|
-
FortifiedMarketplacePartnerContactPermission["ViewUsageReports"] = "VIEW_USAGE_REPORTS";
|
|
676
|
-
})(FortifiedMarketplacePartnerContactPermission = exports.FortifiedMarketplacePartnerContactPermission || (exports.FortifiedMarketplacePartnerContactPermission = {}));
|
|
677
666
|
var FortifiedMetricsResolutionUnit;
|
|
678
667
|
(function (FortifiedMetricsResolutionUnit) {
|
|
679
668
|
FortifiedMetricsResolutionUnit["Hours"] = "HOURS";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { Ora } from 'ora';
|
|
3
|
-
import { UI } from './ui';
|
|
3
|
+
import { TableCell, TableOptions, UI } from './ui';
|
|
4
4
|
export interface ProgressResult {
|
|
5
5
|
successful: boolean;
|
|
6
6
|
message: string;
|
|
@@ -32,6 +32,7 @@ export declare class CommandLineUI implements UI {
|
|
|
32
32
|
promptForList(message: string, choices: string[]): Promise<string>;
|
|
33
33
|
promptForTable(message: string, infoMessage: string, columns: string[], choices: object[]): Promise<number[]>;
|
|
34
34
|
promptForSingleChoiceTable(message: string, infoMessage: string, columns: string[], choices: object[]): Promise<number>;
|
|
35
|
+
table<Key extends string>(head: [Key, string][], data: Record<Key, TableCell>[] | undefined | null, { json, emptyMessage, preMessage, postMessage, format }?: TableOptions<Key>): void;
|
|
35
36
|
private log;
|
|
36
37
|
private logSuccess;
|
|
37
38
|
private logError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-line-ui.d.ts","sourceRoot":"","sources":["../../src/ui/command-line-ui.ts"],"names":[],"mappings":";
|
|
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;AAWnD,MAAM,WAAW,cAAc;IAC7B,UAAU,EAA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B,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM;IAIpD,eAAe,CAAC,OAAO,EAAE,MAAM;IAIzB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAYlE,cAAc,CACzB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EAAE,EACjB,OAAO,EAAE,MAAM,EAAE,GAChB,OAAO,CAAC,MAAM,EAAE,CAAC;IAeP,0BAA0B,CACrC,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EAAE,EACjB,OAAO,EAAE,MAAM,EAAE,GAChB,OAAO,CAAC,MAAM,CAAC;IAeX,KAAK,CAAC,GAAG,SAAS,MAAM,EAC7B,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,EACrB,IAAI,EAAE,MAAM,CAAC,GAAG,EAAE,SAAS,CAAC,EAAE,GAAG,SAAS,GAAG,IAAI,EACjD,EAAE,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAW,EAAE,GAAE,YAAY,CAAC,GAAG,CAAM,GACnF,IAAI;IAqCP,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"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CommandLineUI = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
const cli_table3_1 = tslib_1.__importDefault(require("cli-table3"));
|
|
5
6
|
const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
|
|
6
7
|
const ora_1 = tslib_1.__importDefault(require("ora"));
|
|
7
8
|
const log_color_1 = require("./log-color");
|
|
@@ -184,6 +185,31 @@ class CommandLineUI {
|
|
|
184
185
|
]);
|
|
185
186
|
return choice;
|
|
186
187
|
}
|
|
188
|
+
table(head, data, { json, emptyMessage, preMessage, postMessage, format = {} } = {}) {
|
|
189
|
+
if (json) {
|
|
190
|
+
this.log(JSON.stringify(data, null, 2));
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
if (!data && emptyMessage) {
|
|
194
|
+
this.info(emptyMessage);
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
if (preMessage) {
|
|
198
|
+
this.info(preMessage);
|
|
199
|
+
}
|
|
200
|
+
const table = new cli_table3_1.default(Object.assign(Object.assign({}, log_color_1.TableStyle.default), { head: head.map(([, heading]) => heading) }));
|
|
201
|
+
if (data) {
|
|
202
|
+
table.push(...data.map((row) => head.map(([key]) => {
|
|
203
|
+
const value = row[key];
|
|
204
|
+
const formatter = format[key];
|
|
205
|
+
return formatter ? formatter(value) : value;
|
|
206
|
+
})));
|
|
207
|
+
}
|
|
208
|
+
this.info(table.toString());
|
|
209
|
+
if (postMessage) {
|
|
210
|
+
this.info(postMessage);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
187
213
|
log(message, progressLogType = ProgressLogType.other) {
|
|
188
214
|
let msg = message;
|
|
189
215
|
if (this.insideProgress) {
|
package/out/ui/text.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ export declare const Text: {
|
|
|
45
45
|
optionSite: string;
|
|
46
46
|
optionProduct: (supportedProducts: string[]) => string;
|
|
47
47
|
optionVerbose: string;
|
|
48
|
+
optionJson: string;
|
|
48
49
|
invalidCmd: (command: string) => string;
|
|
49
50
|
invalidCmdHelp: string;
|
|
50
51
|
extraArguments: (commandName: string) => string;
|
package/out/ui/text.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.d.ts","sourceRoot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AAM;;;kCAIJ,MAAM;oCAEJ,MAAM;;;;qDAKa,MAAM;kDAGT,MAAM;0CAGd,MAAM,aAAa,OAAO;oCAIhC,MAAM;iDACO,MAAM;;;;;;;uCAWhB,MAAM;;;;;;;+BAQd,OAAO;;;;;;;;wBASjB,MAAM,UACP,MAAM,eACD,MAAM,uBACE,mBAAmB,WAC/B,OAAO;0BAKA,MAAM,UAAU,MAAM,eAAe,MAAM,uBAAuB,mBAAmB;;;;;oBAY3F,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;;;;;;;;;;;;6CAaP,MAAM,mBAAmB,MAAM,EAAE;;;;CAOvE,CAAC"}
|
package/out/ui/text.js
CHANGED
|
@@ -88,6 +88,7 @@ exports.Text = {
|
|
|
88
88
|
optionSite: 'site URL (example.atlassian.net)',
|
|
89
89
|
optionProduct: (supportedProducts) => `product (${supportedProducts.join(', ')})`,
|
|
90
90
|
optionVerbose: 'enable verbose mode',
|
|
91
|
+
optionJson: 'output results in JSON format',
|
|
91
92
|
invalidCmd: (command) => `’${command}’ is not a Forge command.`,
|
|
92
93
|
invalidCmdHelp: `Run ${chalk_1.default.bold('forge --help')} to see the full list of available commands.`,
|
|
93
94
|
extraArguments: (commandName) => `Unexpected argument. Run ${chalk_1.default.bold(`forge ${commandName} --help`)} for a list of available arguments.`,
|
package/out/ui/ui.d.ts
CHANGED
|
@@ -8,9 +8,20 @@ export interface Prompt {
|
|
|
8
8
|
promptForTable(message: string, infoMessage: string, columns: string[], choices: object[]): Promise<number[]>;
|
|
9
9
|
promptForSingleChoiceTable(message: string, infoMessage: string, columns: string[], choices: object[]): Promise<number>;
|
|
10
10
|
}
|
|
11
|
+
export declare type TableCell = string | boolean | null | undefined;
|
|
12
|
+
export declare type TableOptions<Key extends string> = {
|
|
13
|
+
json?: boolean;
|
|
14
|
+
emptyMessage?: string;
|
|
15
|
+
preMessage?: string;
|
|
16
|
+
postMessage?: string;
|
|
17
|
+
format?: {
|
|
18
|
+
[K in Key]?: (value: TableCell) => string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
11
21
|
export interface UI extends Logger, Prompt {
|
|
12
22
|
emptyLine(): void;
|
|
13
23
|
displayProgress<Result>(progress: () => Promise<Result>, startText: string, successText: string | ((result: Result) => string | ProgressResult)): Promise<Result>;
|
|
14
24
|
displayTemporaryMessage<Result>(progress: () => Promise<Result>, waitText: string): Promise<Result>;
|
|
25
|
+
table<Key extends string>(head: [Key, string][], data: Record<Key, TableCell>[] | undefined | null, options?: TableOptions<Key>): void;
|
|
15
26
|
}
|
|
16
27
|
//# sourceMappingURL=ui.d.ts.map
|
package/out/ui/ui.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../src/ui/ui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,WAAW,MAAM;IACrB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC3C,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,YAA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,EAAE,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,cAAc,CAAC,GAClE,OAAO,CAAC,MAAM,CAAC,CAAC;IAEnB,uBAAuB,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEpG,KAAK,CAAC,GAAG,SAAS,MAAM,EACtB,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,EACrB,IAAI,EAAE,MAAM,CAAC,GAAG,EAAE,SAAS,CAAC,EAAE,GAAG,SAAS,GAAG,IAAI,EACjD,OAAO,CAAC,EAAE,YAAY,CAAC,GAAG,CAAC,GAC1B,IAAI,CAAC;CACT"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/cli-shared",
|
|
3
|
-
"version": "3.2.0-next.
|
|
3
|
+
"version": "3.2.0-next.5",
|
|
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.3.1-next.
|
|
15
|
+
"@forge/manifest": "4.3.1-next.1",
|
|
16
16
|
"@forge/util": "1.2.0",
|
|
17
17
|
"array.prototype.flatmap": "^1.2.3",
|
|
18
18
|
"case": "^1.6.2",
|