@forge/cli-shared 10.0.1-next.3 → 10.0.1-next.4-experimental-e080d98

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.
Files changed (37) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/out/apps/get-app-owner.d.ts.map +1 -1
  3. package/out/apps/register-app.js +1 -1
  4. package/out/config/config-file.d.ts +3 -3
  5. package/out/config/config-file.d.ts.map +1 -1
  6. package/out/config/config-file.js +20 -12
  7. package/out/config/config.d.ts +1 -1
  8. package/out/config/config.d.ts.map +1 -1
  9. package/out/config/index.d.ts +1 -0
  10. package/out/config/index.d.ts.map +1 -1
  11. package/out/config/index.js +1 -0
  12. package/out/config/workflows-integration.d.ts +18 -0
  13. package/out/config/workflows-integration.d.ts.map +1 -0
  14. package/out/config/workflows-integration.js +71 -0
  15. package/out/graphql/gql/graphql.d.ts +24 -3
  16. package/out/graphql/gql/graphql.d.ts.map +1 -1
  17. package/out/service/i18n-resource-bundling-service.d.ts +1 -1
  18. package/out/service/i18n-resource-bundling-service.d.ts.map +1 -1
  19. package/out/shared/error-handling.d.ts.map +1 -1
  20. package/out/shared/error-handling.js +3 -3
  21. package/out/shared/read-app-config-files.d.ts.map +1 -1
  22. package/out/shared/read-app-config-files.js +4 -3
  23. package/out/shared/test.d.ts.map +1 -1
  24. package/out/shared/test.js +1 -1
  25. package/out/tunnel/docker-compose-lifecycle.d.ts +1 -1
  26. package/out/tunnel/docker-compose-lifecycle.d.ts.map +1 -1
  27. package/out/tunnel/tunnel-options.d.ts +1 -1
  28. package/out/tunnel/tunnel-options.d.ts.map +1 -1
  29. package/out/ui/command-line-ui.d.ts +2 -1
  30. package/out/ui/command-line-ui.d.ts.map +1 -1
  31. package/out/ui/command-line-ui.js +31 -22
  32. package/out/ui/table.d.ts.map +1 -1
  33. package/out/ui/table.js +3 -12
  34. package/out/ui/text.d.ts +6 -1
  35. package/out/ui/text.d.ts.map +1 -1
  36. package/out/ui/text.js +6 -2
  37. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # @forge/cli-shared
2
2
 
3
+ ## 10.0.1-next.4-experimental-e080d98
4
+
5
+ ### Minor Changes
6
+
7
+ - 0a22c6b: Forge Workflows pipelines are now compiled by the Forge CLI when it bundles an app that depends on `@forge/workflows`. The orchestrator's function and queue consumer are added to the uploaded manifest at build time, and module keys and queue names starting with `__forge` are now reserved (a lint warning for now). Pipelines are built from `task()` functions and end in `.start()`, which queues a run and resolves to `{ runId, created }` for polling with `runs.get`; `.start({ idempotencyKey })` starts at most one run per key. The runtime records each step's outcome so redelivered events are safe, and adds `.catch()`, `loop()`/`.loop()`, `collect({ concurrency, settle })` (concurrency defaults to 10, at most 25), `all`, `sleep`, `waitForSignal`/`runs.signal`, retry policies, step timeouts, `.finally()` for work that runs once a run has ended, `currentStep()` for a step's stable ID and attempt, and `runs.get`/`runs.cancel`.
8
+
9
+ ### Patch Changes
10
+
11
+ - 982339a: Remove forge-cli-enable-developer-space-enforcement-flow feature gate. Developer space enforcement is now always enabled (unless FedRAMP or FORGE_CLI_DISABLE_DEV_SPACE=true).
12
+ - da3d08c: `forge module show` errors now say what to do next. In non-interactive mode, a missing module key is reported as `MISSING_INPUT` with a `Next:` command. An unknown key points to `forge module list`. A failed template download has its own message.
13
+ - 517fee2: Reduced `forge` startup time by loading `@forge/manifest`, `@forge/bundler`, `@forge/tunnel`, `inquirer`, `typescript`, `open` and `@sentry/node` on first use
14
+
15
+ These packages are now loaded when a command first needs them, instead of at startup. The manifest change warning in `@forge/tunnel` now takes the manifest file name as an argument, and `findUIKit1Modules` in `@forge/cli-shared` now returns a promise.
16
+
17
+ - fd8f229: Don't suggest rerunning with `--verbose` when an input is missing (a `[MISSING_INPUT]` error, a missing required argument, or an option without its value), as the error already says what to pass
18
+ - Updated dependencies [0a22c6b]
19
+ - Updated dependencies [a1c1754]
20
+ - @forge/manifest@13.9.2-next.0-experimental-e080d98
21
+
22
+ ## 10.0.1-next.4
23
+
24
+ ### Patch Changes
25
+
26
+ - 517fee2: Reduced `forge` startup time by loading `@forge/manifest`, `@forge/bundler`, `@forge/tunnel`, `inquirer`, `typescript`, `open` and `@sentry/node` on first use
27
+
28
+ These packages are now loaded when a command first needs them, instead of at startup. The manifest change warning in `@forge/tunnel` now takes the manifest file name as an argument, and `findUIKit1Modules` in `@forge/cli-shared` now returns a promise.
29
+
3
30
  ## 10.0.1-next.3
4
31
 
5
32
  ### Patch Changes
@@ -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,qBAAqB,CAAC;AAE9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD,qBAAa,oBAAqB,SAAQ,KAAK;;CAI9C;AAED,eAAO,MAAM,aAAa;QAuC8+3lH,iDAAc;GA9Bph4lH,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,qBAAqB,CAAC;AAE9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD,qBAAa,oBAAqB,SAAQ,KAAK;;CAI9C;AAED,eAAO,MAAM,aAAa;QAuCi29lH,iDAAc;GA9Bv49lH,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"}
@@ -27,7 +27,7 @@ export class RegisterAppCommand {
27
27
  await inDirectory(directory, async () => {
28
28
  const { modules } = await this.configFile.readConfig();
29
29
  if (modules) {
30
- const uiKit1Modules = findUIKit1Modules(modules);
30
+ const uiKit1Modules = await findUIKit1Modules(modules);
31
31
  if (uiKit1Modules.length > 0) {
32
32
  this.logger.warn(Text.warning.deprecation.uikit(uiKit1Modules));
33
33
  }
@@ -1,6 +1,6 @@
1
1
  import { FileSystemReader, FileSystemWriter } from '../file-system/index.js';
2
2
  import { ConfigReader, ConfigWriter } from './index.js';
3
- import { Modules, ManifestSchema, Resources } from '@forge/manifest';
3
+ import type { Modules, ManifestSchema, Resources } from '@forge/manifest';
4
4
  import { UserError, ValidationError } from '../shared/index.js';
5
5
  export declare class InvalidManifestError extends ValidationError {
6
6
  constructor();
@@ -20,13 +20,13 @@ export type UIResourceType = 'customUI' | 'nativeUI' | 'default';
20
20
  export interface ResourceDetails extends Resource {
21
21
  resourceType: UIResourceType;
22
22
  }
23
- export declare function findUIKit1Modules(modules: Modules): string[];
23
+ export declare function findUIKit1Modules(modules: Modules): Promise<string[]>;
24
24
  export declare const DEPRECATED_FULL_PAGE_MODULES: string[];
25
25
  export declare function findDeprecatedFullPageModules(modules: Modules): string[];
26
26
  export declare class ConfigFile implements ConfigReader, ConfigWriter, ConfigInteractor {
27
27
  private readonly fileReader;
28
28
  private readonly fileWriter;
29
- private readonly manifestParser;
29
+ private manifestParser?;
30
30
  constructor(fileReader: FileSystemReader, fileWriter: FileSystemWriter);
31
31
  getAppHandlers(): Promise<Array<Handler>>;
32
32
  readConfig(): Promise<ManifestSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"config-file.d.ts","sourceRoot":"","sources":["../../src/config/config-file.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CA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AiB,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAgB1G,OAAO,CAAC,wBAAwB;IAKhC,OAAO,CAAC,wBAAwB;IAsBhC,OAAO,CAAC,6BAA6B;IAkBrC,OAAO,CAAC,gBAAgB;IAIX,oBAAoB,IAAI,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;KAAE,EAAE,CAAC;IAqClF,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAe1E,YAAY,CAAC,aAAa,CAAC,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAuB1E,aAAa,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAKzD,OAAO,CAAC,eAAe;CAmCxB"}
@@ -3,7 +3,7 @@ import { Text } from '../ui/index.js';
3
3
  import { manifestFileName } from './index.js';
4
4
  import Case from 'case';
5
5
  import { isHostedResourceModule, ModuleEntryPoints, validateResource } from './config.js';
6
- import { ManifestParserBuilder, getValidModules, parseResourceReference } from '@forge/manifest';
6
+ import { loadWorkflowsIntegration, removeGeneratedModules } from './workflows-integration.js';
7
7
  import { URL } from 'url';
8
8
  import { UserError, ValidationError } from '../shared/index.js';
9
9
  export class InvalidManifestError extends ValidationError {
@@ -23,7 +23,7 @@ const isUIKit1 = (module) => {
23
23
  !module.hasOwnProperty('render') &&
24
24
  !module.hasOwnProperty('resource'));
25
25
  };
26
- export function findUIKit1Modules(modules) {
26
+ export async function findUIKit1Modules(modules) {
27
27
  const allUIKit1SupportedModules = [
28
28
  'confluence:contentAction',
29
29
  'confluence:contentBylineItem',
@@ -72,6 +72,7 @@ export function findUIKit1Modules(modules) {
72
72
  'compass:globalPage',
73
73
  'compass:teamPage'
74
74
  ];
75
+ const { getValidModules } = await import('@forge/manifest');
75
76
  return getValidModules(modules)
76
77
  .filter((moduleType) => {
77
78
  return allUIKit1SupportedModules.includes(moduleType);
@@ -97,7 +98,6 @@ export class ConfigFile {
97
98
  constructor(fileReader, fileWriter) {
98
99
  this.fileReader = fileReader;
99
100
  this.fileWriter = fileWriter;
100
- this.manifestParser = new ManifestParserBuilder().withInterpolators().build();
101
101
  }
102
102
  async getAppHandlers() {
103
103
  const config = await this.readConfig();
@@ -114,8 +114,13 @@ export class ConfigFile {
114
114
  }
115
115
  async readConfig() {
116
116
  const manifestFileContents = this.fileReader.readFile(manifestFileName);
117
+ if (manifestFileContents === undefined) {
118
+ throw new InvalidManifestError();
119
+ }
120
+ this.manifestParser ??= new (await import('@forge/manifest')).ManifestParserBuilder().withInterpolators().build();
121
+ let manifest;
117
122
  try {
118
- return this.manifestParser.parseManifest({
123
+ manifest = this.manifestParser.parseManifest({
119
124
  content: manifestFileContents,
120
125
  filePath: manifestFileName
121
126
  });
@@ -123,6 +128,8 @@ export class ConfigFile {
123
128
  catch {
124
129
  throw new InvalidManifestError();
125
130
  }
131
+ const workflows = loadWorkflowsIntegration();
132
+ return workflows ? workflows.enrichManifest(manifest) : manifest;
126
133
  }
127
134
  async runtimeName() {
128
135
  const config = await this.readConfig();
@@ -169,21 +176,21 @@ export class ConfigFile {
169
176
  delete config[key];
170
177
  }
171
178
  });
172
- currentConfigDoc.set(configKey, config);
179
+ currentConfigDoc.set(configKey, configKey === 'modules' ? removeGeneratedModules(config) : config);
173
180
  this.writeManifest(currentConfigDoc);
174
181
  }
175
182
  getHostedResourceModules(modules) {
176
183
  const modulesArray = Object.values(modules).flat();
177
184
  return modulesArray.filter(isHostedResourceModule);
178
185
  }
179
- assertNoMissingResources(modules, resources) {
186
+ assertNoMissingResources(modules, resources, parseReference) {
180
187
  const modulesResourcesKeys = modules
181
188
  .flatMap((module) => {
182
189
  return [module.resource, ...ModuleEntryPoints.map((entryPoint) => module[entryPoint]?.resource || '')];
183
190
  })
184
191
  .filter(Boolean);
185
192
  const missingModuleResourcesKeys = modulesResourcesKeys.filter((resourceReference) => {
186
- const { resourceKey } = parseResourceReference(resourceReference);
193
+ const { resourceKey } = parseReference(resourceReference);
187
194
  return !resources.some((resource) => resource.key === resourceKey);
188
195
  });
189
196
  if (missingModuleResourcesKeys.length > 0) {
@@ -255,10 +262,11 @@ export class ConfigFile {
255
262
  const hostedResourceModules = modules ? this.getHostedResourceModules(modules) : [];
256
263
  const maybeResources = resources || [];
257
264
  const validResources = maybeResources.filter(validateResource);
258
- this.assertNoMissingResources(hostedResourceModules, validResources);
265
+ const { parseResourceReference } = await import('@forge/manifest');
266
+ this.assertNoMissingResources(hostedResourceModules, validResources, parseResourceReference);
259
267
  const validResourcesWithDetails = validResources.map((resource) => ({
260
268
  ...resource,
261
- resourceType: this.getResourceType(resource, hostedResourceModules)
269
+ resourceType: this.getResourceType(resource, hostedResourceModules, parseResourceReference)
262
270
  })) || [];
263
271
  if (!resourceTypes) {
264
272
  return validResourcesWithDetails;
@@ -269,11 +277,11 @@ export class ConfigFile {
269
277
  const { app } = await this.readConfig();
270
278
  return app.connect?.key;
271
279
  }
272
- getResourceType({ key: resourceKey }, allModules) {
280
+ getResourceType({ key: resourceKey }, allModules, parseReference) {
273
281
  const linkedModule = allModules.find((m) => {
274
282
  if (!m.resource)
275
283
  return false;
276
- const { resourceKey: moduleResourceKey } = parseResourceReference(m.resource);
284
+ const { resourceKey: moduleResourceKey } = parseReference(m.resource);
277
285
  return moduleResourceKey === resourceKey;
278
286
  }) ??
279
287
  allModules
@@ -289,7 +297,7 @@ export class ConfigFile {
289
297
  .find(({ resource }) => {
290
298
  if (!resource)
291
299
  return false;
292
- const { resourceKey: moduleResourceKey } = parseResourceReference(resource);
300
+ const { resourceKey: moduleResourceKey } = parseReference(resource);
293
301
  return moduleResourceKey === resourceKey;
294
302
  });
295
303
  if (!linkedModule) {
@@ -1,4 +1,4 @@
1
- import { ManifestSchema, Resources } from '@forge/manifest';
1
+ import type { ManifestSchema, Resources } from '@forge/manifest';
2
2
  import { type ResourceDetails } from './config-file.js';
3
3
  export declare const manifestFileName = "manifest.yml";
4
4
  export declare const dependencyFileNames: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD,eAAO,MAAM,gBAAgB,iBAAiB,CAAC;AAC/C,eAAO,MAAM,mBAAmB,UAAqD,CAAC;AAEtF,eAAO,MAAM,iBAAiB,0EAA2E,CAAC;AAC1G,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE,MAAM,MAAM,UAAU,GAAG;IACvB,GAAG,EAAE,MAAM,CAAC;CACb,GAAG;KACD,UAAU,IAAI,gBAAgB,CAAC,CAAC,EAAE,UAAU;CAC9C,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;CAC/B,GAAG;KACD,UAAU,IAAI,gBAAgB,CAAC,CAAC,EAAE,qBAAqB;CACzD,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B,UAAU,IAAI,OAAO,CAAC,cAAc,CAAC,CAAC;CACvC;AAED,MAAM,WAAW,YAAY;IAC3B,iBAAiB,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9F,uBAAuB,CAAC,IAAI,EAAE,M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CAAC,IAAI,CAAC,CAAC;IAC9F,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtD;AAED,eAAO,MAAM,gBAAgB,GAAI,UAAU,GAAG,KAAG,QAAQ,IAAI,SAG5D,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,QAAQ,GAAG,KAAG,MAAM,IAAI,qBAG9D,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,UAAU,eAAe,KAAG,OAEhE,CAAC"}
@@ -2,6 +2,7 @@ export * from './config-codec-types.js';
2
2
  export * from './config-file-section-reader.js';
3
3
  export * from './config-file-section-writer.js';
4
4
  export * from './config-file.js';
5
+ export * from './workflows-integration.js';
5
6
  export * from './config-section.js';
6
7
  export * from './config.js';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAEA,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAEA,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC"}
@@ -2,5 +2,6 @@ export * from './config-codec-types.js';
2
2
  export * from './config-file-section-reader.js';
3
3
  export * from './config-file-section-writer.js';
4
4
  export * from './config-file.js';
5
+ export * from './workflows-integration.js';
5
6
  export * from './config-section.js';
6
7
  export * from './config.js';
@@ -0,0 +1,18 @@
1
+ export interface WorkflowsWebpackIntegration {
2
+ preLoader: string;
3
+ orchestratorEntry: string;
4
+ orchestratorModule: string;
5
+ }
6
+ export interface WorkflowsIntegration {
7
+ enrichManifest<M extends {
8
+ modules?: Record<string, unknown>;
9
+ }>(manifest: M): M;
10
+ webpackIntegration(appDirectory: string): WorkflowsWebpackIntegration;
11
+ }
12
+ export declare const WORKFLOWS_PACKAGES: string[];
13
+ export declare const loadWorkflowsIntegration: (appDirectory?: string, { strict }?: {
14
+ strict?: boolean;
15
+ }) => WorkflowsIntegration | undefined;
16
+ export declare const removeGeneratedModules: <T extends object>(modules: T) => T;
17
+ export declare const __clearWorkflowsIntegrationCache: () => void;
18
+ //# sourceMappingURL=workflows-integration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflows-integration.d.ts","sourceRoot":"","sources":["../../src/config/workflows-integration.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,oBAAoB;IACnC,cAAc,CAAC,CAAC,SAAS;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,EAAE,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC;IAChF,kBAAkB,CAAC,YAAY,EAAE,MAAM,GAAG,2BAA2B,CAAC;CACvE;AAED,eAAO,MAAM,kBAAkB,UAAuB,CAAC;AAuDvD,eAAO,MAAM,wBAAwB,GACnC,qBAA4B,EAC5B,aAAoB;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,KAC5C,oBAAoB,GAAG,SASzB,CAAC;AAUF,eAAO,MAAM,sBAAsB,GAAI,CAAC,SAAS,MAAM,EAAE,SAAS,CAAC,KAAG,CAWrE,CAAC;AAGF,eAAO,MAAM,gCAAgC,QAAO,IAAqB,CAAC"}
@@ -0,0 +1,71 @@
1
+ import fs from 'fs';
2
+ import { createRequire } from 'module';
3
+ import path from 'path';
4
+ import { UserError } from '../shared/index.js';
5
+ import { Text } from '../ui/index.js';
6
+ export const WORKFLOWS_PACKAGES = ['@forge/workflows'];
7
+ const cache = new Map();
8
+ const isModuleNotFound = (error, request) => error?.code === 'MODULE_NOT_FOUND' && String(error.message).includes(request);
9
+ const declaredDependencies = (appDirectory) => {
10
+ try {
11
+ const manifest = JSON.parse(fs.readFileSync(path.join(appDirectory, 'package.json'), 'utf8'));
12
+ return new Set([...Object.keys(manifest.dependencies ?? {}), ...Object.keys(manifest.devDependencies ?? {})]);
13
+ }
14
+ catch {
15
+ return new Set();
16
+ }
17
+ };
18
+ const load = (directory) => {
19
+ const dependencies = declaredDependencies(directory);
20
+ const name = WORKFLOWS_PACKAGES.find((pkg) => dependencies.has(pkg));
21
+ if (!name)
22
+ return {};
23
+ const request = `${name}/out/bundler`;
24
+ const requireFromApp = createRequire(path.join(directory, 'package.json'));
25
+ let resolved;
26
+ try {
27
+ resolved = requireFromApp.resolve(request);
28
+ }
29
+ catch (error) {
30
+ if (!isModuleNotFound(error, request))
31
+ throw error;
32
+ return { problem: Text.workflows.notInstalled(name) };
33
+ }
34
+ let integration;
35
+ try {
36
+ integration = requireFromApp(resolved);
37
+ }
38
+ catch (error) {
39
+ return { problem: Text.workflows.loadFailed(name, error instanceof Error ? error.message : String(error)) };
40
+ }
41
+ if (typeof integration.enrichManifest !== 'function' || typeof integration.webpackIntegration !== 'function') {
42
+ return { problem: Text.workflows.incompatible(name) };
43
+ }
44
+ return { integration: integration };
45
+ };
46
+ export const loadWorkflowsIntegration = (appDirectory = process.cwd(), { strict = false } = {}) => {
47
+ const directory = path.resolve(appDirectory);
48
+ let cached = cache.get(directory);
49
+ if (!cached) {
50
+ cached = load(directory);
51
+ cache.set(directory, cached);
52
+ }
53
+ if (strict && cached.problem)
54
+ throw new UserError(cached.problem);
55
+ return cached.integration;
56
+ };
57
+ const isGeneratedModule = (entry) => typeof entry?.key === 'string' && entry.key.startsWith('__forge');
58
+ export const removeGeneratedModules = (modules) => {
59
+ const result = {};
60
+ for (const [type, entries] of Object.entries(modules)) {
61
+ if (!Array.isArray(entries)) {
62
+ result[type] = entries;
63
+ continue;
64
+ }
65
+ const kept = entries.filter((entry) => !isGeneratedModule(entry));
66
+ if (kept.length || !entries.length)
67
+ result[type] = kept;
68
+ }
69
+ return result;
70
+ };
71
+ export const __clearWorkflowsIntegrationCache = () => cache.clear();
@@ -9251,6 +9251,10 @@ export type CplsContributionDateRange = {
9251
9251
  startDate?: InputMaybe<Scalars['Date']['input']>;
9252
9252
  };
9253
9253
  export type CplsContributionValueType = 'DAYS' | 'HOURS' | 'PERCENTAGE';
9254
+ export type CplsContributorAvailabilityInput = {
9255
+ contributorDataId: Scalars['ID']['input'];
9256
+ weeklyHours: Scalars['Float']['input'];
9257
+ };
9254
9258
  export type CplsContributorWorkAssociation = {
9255
9259
  contributorDataId: Scalars['ID']['input'];
9256
9260
  workId: Scalars['ID']['input'];
@@ -9457,6 +9461,12 @@ export type CplsUpdateCapacityPlanSettingsInput = {
9457
9461
  planSettings: CplsCapacityPlanSettingsInput;
9458
9462
  scopeId: Scalars['ID']['input'];
9459
9463
  };
9464
+ export type CplsUpdateContributorAvailabilitiesInput = {
9465
+ applyDefaultToAllContributors: Scalars['Boolean']['input'];
9466
+ contributors?: InputMaybe<Array<CplsContributorAvailabilityInput>>;
9467
+ defaultWeeklyHours?: InputMaybe<Scalars['Float']['input']>;
9468
+ scopeId: Scalars['ID']['input'];
9469
+ };
9460
9470
  export type CplsUpdateCustomContributionTargetInput = {
9461
9471
  cloudId: Scalars['ID']['input'];
9462
9472
  id: Scalars['ID']['input'];
@@ -13216,6 +13226,10 @@ export type GraphIntegrationSetTwgProductToolAccessOverrideInput = {
13216
13226
  productAri: Scalars['ID']['input'];
13217
13227
  toolAccessOverride: Scalars['Boolean']['input'];
13218
13228
  };
13229
+ export type GraphIntegrationSkillAccessNotificationInput = {
13230
+ message?: InputMaybe<Scalars['String']['input']>;
13231
+ send: Scalars['Boolean']['input'];
13232
+ };
13219
13233
  export type GraphIntegrationSkillAccessPermissionsInput = {
13220
13234
  view?: InputMaybe<GraphIntegrationSkillAccessPrincipalChangeInput>;
13221
13235
  };
@@ -13254,7 +13268,7 @@ export type GraphIntegrationUpdateDataConnectorConnectionInput = {
13254
13268
  };
13255
13269
  export type GraphIntegrationUpdateSkillAccessInput = {
13256
13270
  contextAri: Scalars['ID']['input'];
13257
- notificationMessage?: InputMaybe<Scalars['String']['input']>;
13271
+ notification?: InputMaybe<GraphIntegrationSkillAccessNotificationInput>;
13258
13272
  permissions: GraphIntegrationSkillAccessPermissionsInput;
13259
13273
  skillAri: Scalars['ID']['input'];
13260
13274
  };
@@ -31290,6 +31304,12 @@ export type MarketplaceConsoleCreateVersionAssetsInput = {
31290
31304
  highlights?: InputMaybe<Array<MarketplaceConsoleHighlightAssetInput>>;
31291
31305
  screenshots?: InputMaybe<Array<MarketplaceConsoleImageAssetInput>>;
31292
31306
  };
31307
+ export type MarketplaceConsoleCurrencyPricingInput = {
31308
+ currency: MarketplaceConsolePricingCurrency;
31309
+ model: MarketplaceConsoleCurrencyPricingModel;
31310
+ tieredPricing?: InputMaybe<Array<MarketplaceConsolePricingItemInput>>;
31311
+ };
31312
+ export type MarketplaceConsoleCurrencyPricingModel = 'ATLASSIAN_DEFAULT' | 'CUSTOM';
31293
31313
  export type MarketplaceConsoleDefaultEditionEnrolledInput = {
31294
31314
  appKey?: InputMaybe<Scalars['String']['input']>;
31295
31315
  };
@@ -31572,7 +31592,7 @@ export type MarketplaceConsolePluginFrameworkAttributesInput = {
31572
31592
  href: Scalars['String']['input'];
31573
31593
  };
31574
31594
  export type MarketplaceConsolePluginFrameworkType = 'P1' | 'P2';
31575
- export type MarketplaceConsolePricingCurrency = 'JPY' | 'USD';
31595
+ export type MarketplaceConsolePricingCurrency = 'AUD' | 'CAD' | 'EUR' | 'GBP' | 'JPY' | 'USD';
31576
31596
  export type MarketplaceConsolePricingItemInput = {
31577
31597
  amount: Scalars['Float']['input'];
31578
31598
  ceiling: Scalars['Float']['input'];
@@ -31580,6 +31600,7 @@ export type MarketplaceConsolePricingItemInput = {
31580
31600
  };
31581
31601
  export type MarketplaceConsolePricingPlanFetchStatus = 'DRAFT' | 'LIVE' | 'PENDING';
31582
31602
  export type MarketplaceConsolePricingPlanInput = {
31603
+ currencies?: InputMaybe<Array<MarketplaceConsoleCurrencyPricingInput>>;
31583
31604
  currency: MarketplaceConsolePricingCurrency;
31584
31605
  expertDiscountOptOut: Scalars['Boolean']['input'];
31585
31606
  isDefaultPricing?: InputMaybe<Scalars['Boolean']['input']>;
@@ -31882,7 +31903,7 @@ export type MarketplaceStoreInstallAppTargetInput = {
31882
31903
  export type MarketplaceStoreInstallationTarget = 'SITE' | 'UNIT';
31883
31904
  export type MarketplaceStoreInstallationTargetProduct = 'BITBUCKET' | 'COMPASS' | 'CONFLUENCE' | 'JIRA' | 'JSM';
31884
31905
  export type MarketplaceStoreInstalledAppManageLinkType = 'CONFIGURE' | 'GET_STARTED' | 'MANAGE';
31885
- export type MarketplaceStoreLayoutSectionKeys = 'BROWSE_ALL' | 'CAPABILITY' | 'CATEGORY_HERO' | 'COLLECTION_HERO' | 'EXPLORE_AI_OBJECTS' | 'EXPLORE_CATEGORIES' | 'EXPLORE_OBJECTS' | 'FEATURED_TILES' | 'HERO' | 'NEWEST_AI_APPS' | 'PARTNER_CREDENTIALS' | 'PARTNER_HERO' | 'PARTNER_SIDEBAR' | 'PICKUP_WHERE_YOU_LEFT' | 'PRODUCT_HERO' | 'RECOMMENDATIONS_FALLBACK' | 'RECOMMENDED_FOR_YOU' | 'SPOTLIGHT' | 'STATISTICS' | 'TOP_PICKS' | 'TRUSTED_PARTNERS';
31906
+ export type MarketplaceStoreLayoutSectionKeys = 'BROWSE_ALL' | 'CAPABILITY' | 'CATEGORY_HERO' | 'COLLECTION_HERO' | 'EXPLORE_AI_OBJECTS' | 'EXPLORE_CATEGORIES' | 'EXPLORE_OBJECTS' | 'FEATURED_TILES' | 'HERO' | 'LOGO_MARQUEE' | 'NEWEST_AI_APPS' | 'PARTNER_CREDENTIALS' | 'PARTNER_HERO' | 'PARTNER_SIDEBAR' | 'PICKUP_WHERE_YOU_LEFT' | 'PRODUCT_HERO' | 'RECOMMENDATIONS_FALLBACK' | 'RECOMMENDED_FOR_YOU' | 'SIGN_IN' | 'SPOTLIGHT' | 'STATISTICS' | 'TOP_PICKS' | 'TRUSTED_PARTNERS';
31886
31907
  export type MarketplaceStoreLayoutSectionType = 'BRAND' | 'CAPABILITY' | 'DARK' | 'EXPLORE_CATEGORIES' | 'EXPLORE_OBJECTS' | 'LIST';
31887
31908
  export type MarketplaceStoreLayoutSlotTheme = 'BOUNDED' | 'DARK' | 'DEFAULT' | 'ELEVATED' | 'INVERSE';
31888
31909
  export type MarketplaceStoreLayoutSlotVariant = 'DEFAULT' | 'LIST' | 'STANDARD';