@forge/cli-shared 9.11.0-next.4 → 9.11.0-next.6

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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # @forge/cli-shared
2
2
 
3
+ ## 9.11.0-next.6
4
+
5
+ ### Minor Changes
6
+
7
+ - 1a8fe4a: Module composition for create presets runs before app registration
8
+
9
+ ## 9.11.0-next.5
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies [562c365]
14
+ - @forge/i18n@1.0.2-next.0
15
+ - @forge/manifest@13.9.1-next.0
16
+
3
17
  ## 9.11.0-next.4
4
18
 
5
19
  ### Patch Changes
@@ -7,6 +7,8 @@ export interface CreateAppCommandInput extends CreateAppClientInput {
7
7
  directory: string;
8
8
  compatibility?: AppCompatibility;
9
9
  install?: boolean;
10
+ prependAppName?: boolean;
11
+ beforeRegister?: (directory: string) => Promise<void>;
10
12
  }
11
13
  export declare class NoTemplatesError extends Error {
12
14
  constructor();
@@ -22,7 +24,7 @@ export declare class CreateAppCommand {
22
24
  private readonly packageInstaller;
23
25
  private readonly statsig;
24
26
  constructor(templater: Templater, registerAppCommand: RegisterAppCommand, packageInstaller: PackageInstaller, statsig: StatsigService);
25
- execute({ name, description, template, directory, compatibility, developerSpaceId, billingConsent, appFeatures, install }: CreateAppCommandInput): Promise<CreateAppCommandResult>;
27
+ execute({ name, description, template, directory, compatibility, developerSpaceId, billingConsent, appFeatures, install, prependAppName, beforeRegister }: CreateAppCommandInput): Promise<CreateAppCommandResult>;
26
28
  getAvailableTemplates(): Promise<string[]>;
27
29
  filterAvailableProducts<T extends string>(products: T[], teamworkGraph: T, crossContext: T): Promise<T[]>;
28
30
  }
@@ -1 +1 @@
1
- {"version":3,"file":"create-an-app.d.ts","sourceRoot":"","sources":["../../src/apps/create-an-app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AA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AAO,CAAC,sBAAsB,CAAC;IAmC7C,qBAAqB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAS1C,uBAAuB,CAAC,CAAC,SAAS,MAAM,EACnD,QAAQ,EAAE,CAAC,EAAE,EACb,aAAa,EAAE,CAAC,EAChB,YAAY,EAAE,CAAC,GACd,OAAO,CAAC,CAAC,EAAE,CAAC;CAchB"}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CreateAppCommand = exports.NoTemplatesError = void 0;
4
+ const fs_extra_1 = require("fs-extra");
4
5
  const ui_1 = require("../ui");
5
6
  class NoTemplatesError extends Error {
6
7
  constructor() {
@@ -19,8 +20,17 @@ class CreateAppCommand {
19
20
  this.packageInstaller = packageInstaller;
20
21
  this.statsig = statsig;
21
22
  }
22
- async execute({ name, description, template, directory, compatibility, developerSpaceId, billingConsent, appFeatures, install }) {
23
+ async execute({ name, description, template, directory, compatibility, developerSpaceId, billingConsent, appFeatures, install, prependAppName = true, beforeRegister }) {
23
24
  await this.templater.downloadAndExtract(template, directory);
25
+ if (beforeRegister) {
26
+ try {
27
+ await beforeRegister(directory);
28
+ }
29
+ catch (error) {
30
+ (0, fs_extra_1.removeSync)(directory);
31
+ throw error;
32
+ }
33
+ }
24
34
  const result = await this.registerAppCommand.registerApp({
25
35
  name,
26
36
  description,
@@ -28,7 +38,7 @@ class CreateAppCommand {
28
38
  billingConsent,
29
39
  ...(appFeatures && { appFeatures })
30
40
  }, directory, {
31
- shouldPrependAppName: true,
41
+ shouldPrependAppName: prependAppName,
32
42
  compatibility
33
43
  });
34
44
  if (install !== false) {
@@ -1 +1 @@
1
- {"version":3,"file":"get-app-owner.d.ts","sourceRoot":"","sources":["../../src/apps/get-app-owner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAA4B,MAAM,YAAY,CAAC;AAErE,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,qBAAa,oBAAqB,SAAQ,KAAK;;CAI9C;AAED,eAAO,MAAM,aAAa;QAuC4is/G,8CAAc;GA9Blls/G,CAAC;AAEH,qBAAa,gBAAgB;IAEzB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,YAAY;gBADZ,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAE,iBAAiB;IAGrC,OAAO;;;;;;;;;;;;;YAMN,WAAW;CAe1B"}
1
+ {"version":3,"file":"get-app-owner.d.ts","sourceRoot":"","sources":["../../src/apps/get-app-owner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAA4B,MAAM,YAAY,CAAC;AAErE,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,qBAAa,oBAAqB,SAAQ,KAAK;;CAI9C;AAED,eAAO,MAAM,aAAa;QAuC8ix/G,8CAAc;GA9Bplx/G,CAAC;AAEH,qBAAa,gBAAgB;IAEzB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,YAAY;gBADZ,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAE,iBAAiB;IAGrC,OAAO;;;;;;;;;;;;;YAMN,WAAW;CAe1B"}
@@ -12328,6 +12328,24 @@ export type GraphInferenceManagedReviewItemPatchV2Input = {
12328
12328
  itemId: Scalars['ID']['input'];
12329
12329
  projectFeedback?: InputMaybe<Scalars['JSON']['input']>;
12330
12330
  };
12331
+ export type GraphInferenceManagedReviewMetric = 'ADAPTED_STRICT_PRECISION' | 'BEST_ORDER' | 'GEARS' | 'ORDER_GAIN' | 'PROJECT_ASSESSMENT_ACCURACY' | 'PROJECT_RELEVANCE_PRECISION' | 'RANDOM_BASELINE' | 'REVIEWER_REPORTED_RECALL';
12332
+ export type GraphInferenceManagedReviewMetricAggregation = 'EQUAL_PERSON' | 'POOLED';
12333
+ export type GraphInferenceManagedReviewMetricReason = 'DUPLICATE_IDENTITY' | 'INACCESSIBLE' | 'INVALID_ANSWERS' | 'INVALID_RANKING' | 'MALFORMED_MISSING_ENTRY' | 'MANAGER_EXCLUSION' | 'MISSING_COMPLETENESS_UNKNOWN' | 'NOT_SHARED' | 'NO_DENOMINATOR' | 'NO_ELIGIBLE_PEOPLE' | 'NO_GOLD_ITEMS' | 'NO_ORDER_GAIN' | 'NO_VALID_BASELINE' | 'REVIEWER_SKIPPED' | 'UNANSWERED' | 'UNKNOWN_ASSESSMENT' | 'UNKNOWN_RELEVANCE' | 'UNRANKED_MISSING_PROJECTS';
12334
+ export type GraphInferenceManagedReviewMetricTarget = 'ADAPTED_PROJECT_QUALITY' | 'PROJECT_ASSESSMENT' | 'PROJECT_RANKING' | 'PROJECT_RECALL' | 'PROJECT_RELEVANCE';
12335
+ export type GraphInferenceManagedReviewMetricsExclusionInput = {
12336
+ explanation: Scalars['String']['input'];
12337
+ itemId: Scalars['String']['input'];
12338
+ itemKind: GraphInferenceManagedReviewMetricsItemKind;
12339
+ reason: GraphInferenceManagedReviewMetricsExclusionReason;
12340
+ scopeId: Scalars['ID']['input'];
12341
+ submissionId: Scalars['String']['input'];
12342
+ submissionRevision: Scalars['Int']['input'];
12343
+ targets: Array<GraphInferenceManagedReviewMetricTarget>;
12344
+ };
12345
+ export type GraphInferenceManagedReviewMetricsExclusionReason = 'DUPLICATE_PREDICTION' | 'INACCESSIBLE' | 'MALFORMED_MISSING_ENTRY' | 'REVIEWER_SKIPPED' | 'UNANSWERED' | 'UNKNOWN_JUDGMENT';
12346
+ export type GraphInferenceManagedReviewMetricsItemKind = 'MISSING' | 'RETURNED';
12347
+ export type GraphInferenceManagedReviewMetricsMode = 'LENIENT' | 'STRICT';
12348
+ export type GraphInferenceManagedReviewMetricsPreparationStatus = 'COMPLETED' | 'EXPIRED' | 'FAILED' | 'INTERRUPTED' | 'RUNNING';
12331
12349
  export type GraphInferenceManagedReviewMissingDecisionsScopeInput = {
12332
12350
  assignmentId: Scalars['ID']['input'];
12333
12351
  sourceId: Scalars['ID']['input'];
@@ -12366,6 +12384,12 @@ export type GraphInferencePatchManagedReviewProgressV2Input = {
12366
12384
  patch: GraphInferenceManagedReviewDraftPatchV2Input;
12367
12385
  requestId: Scalars['String']['input'];
12368
12386
  };
12387
+ export type GraphInferencePrepareManagedReviewMetricsInput = {
12388
+ exclusionReportIds?: InputMaybe<Array<Scalars['ID']['input']>>;
12389
+ idempotencyKey: Scalars['String']['input'];
12390
+ packetIds: Array<Scalars['ID']['input']>;
12391
+ policyVersion?: Scalars['Int']['input'];
12392
+ };
12369
12393
  export type GraphInferenceProjectAccessLevel = 'OPEN_EDIT' | 'OPEN_VIEW' | 'RESTRICTED';
12370
12394
  export type GraphInferenceProjectAddedCollaboratorRole = 'FOLLOWER' | 'MAJOR_COLLABORATOR' | 'MINOR_COLLABORATOR' | 'OWNER';
12371
12395
  export type GraphInferenceProjectIconInput = {
@@ -12436,6 +12460,13 @@ export type GraphInferenceReviewPackStatus = 'COMPLETED' | 'FAILED' | 'GENERATIN
12436
12460
  export type GraphInferenceReviewSubjectKind = 'ARTIFACT' | 'DECISION' | 'PROJECT' | 'RELATIONSHIP' | 'TEAM';
12437
12461
  export type GraphInferenceReviewUtility = 'NOT_USEFUL' | 'USEFUL';
12438
12462
  export type GraphInferenceReviewVerdict = 'CORRECT' | 'NEEDS_CHANGES' | 'UNSURE';
12463
+ export type GraphInferenceReviseManagedReviewMetricsExclusionsInput = {
12464
+ additions: Array<GraphInferenceManagedReviewMetricsExclusionInput>;
12465
+ expectedExclusionRevision: Scalars['Int']['input'];
12466
+ idempotencyKey: Scalars['String']['input'];
12467
+ removeIds: Array<Scalars['ID']['input']>;
12468
+ reportId: Scalars['ID']['input'];
12469
+ };
12439
12470
  export type GraphInferenceRiskSubtypeValue = 'BUG_PATTERN' | 'CAPACITY' | 'DECISION_STALLED' | 'DELIVERY_BLOCKER' | 'DESIGN_ENG_DIVERGING' | 'EXTERNAL_DEPENDENCY' | 'OTHER' | 'PROJECT_STALLED' | 'QUALITY';
12440
12471
  export type GraphInferenceSaveDecisionRankingInput = {
12441
12472
  category: Scalars['String']['input'];