@forge/cli-shared 8.22.1-next.1 → 8.23.0-next.10

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,81 @@
1
1
  # @forge/cli-shared
2
2
 
3
+ ## 8.23.0-next.10
4
+
5
+ ### Minor Changes
6
+
7
+ - 3bbb9da: Extend `ForgeCliAttribution` to emit additional fields on the `atl-attribution` GraphQL header and GASv3 analytics events: `skillName`, `agentHint` (auto-detects rovo-dev, claude-code, cursor, codex, antigravity, opencode, windsurf, gemini, github-copilot), and `isStudio`. All three are sourced from reserved `ATL_FORGE_ATTRIBUTION_*` env vars with input validation. Adds a generic `ATL_FORGE_ATTRIBUTION_<KEY>` wildcard pass-through so additional attribution fields can be supplied via environment variables (with key/value validation and reserved-field protection)
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [bf76c3c]
12
+ - @forge/manifest@12.8.0-next.8
13
+
14
+ ## 8.23.0-next.9
15
+
16
+ ### Minor Changes
17
+
18
+ - 30060eb: Emit `isAgent`/`isCI` on GASv3 analytics events via a new shared `ForgeCliAttribution` class, used by both the `atl-attribution` GraphQL header and analytics client.
19
+
20
+ ## 8.23.0-next.8
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies [f7c39e1]
25
+ - @forge/manifest@12.8.0-next.7
26
+
27
+ ## 8.23.0-next.7
28
+
29
+ ### Patch Changes
30
+
31
+ - Updated dependencies [e7b0684]
32
+ - @forge/manifest@12.8.0-next.6
33
+
34
+ ## 8.23.0-next.6
35
+
36
+ ### Patch Changes
37
+
38
+ - ef0434d: Added support for multi-entry resources in UI Kit applications, enabling developers to define multiple entry points within a single resource.
39
+ - Updated dependencies [ef0434d]
40
+ - @forge/manifest@12.8.0-next.5
41
+
42
+ ## 8.23.0-next.5
43
+
44
+ ### Patch Changes
45
+
46
+ - Updated dependencies [1eded6e]
47
+ - Updated dependencies [cf7000f]
48
+ - Updated dependencies [d660fb0]
49
+ - @forge/manifest@12.8.0-next.4
50
+
51
+ ## 8.23.0-next.4
52
+
53
+ ### Minor Changes
54
+
55
+ - a885062: Support a limit parameter in the version bulk-upgrade start command
56
+
57
+ ### Patch Changes
58
+
59
+ - 84d9930: adding option to include installation-id for uninstall flow
60
+
61
+ ## 8.23.0-next.3
62
+
63
+ ### Patch Changes
64
+
65
+ - Updated dependencies [8d90f4f]
66
+ - @forge/manifest@12.8.0-next.3
67
+
68
+ ## 8.23.0-next.2
69
+
70
+ ### Minor Changes
71
+
72
+ - 808adbd: Grouped commands in CLI help and commander.js version bump
73
+
74
+ ### Patch Changes
75
+
76
+ - Updated dependencies [55991a3]
77
+ - @forge/manifest@12.8.0-next.2
78
+
3
79
  ## 8.22.1-next.1
4
80
 
5
81
  ### Patch Changes
package/out/ari/ari.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { Ari, AnyAri, JiraWorkspaceAri, ConfluenceWorkspaceAri, CompassWorkspaceAri, GraphWorkspaceAri } from '@forge/util/packages/ari';
2
2
  export declare const SITE_RESOURCE_TYPE = "site";
3
3
  export declare const WORKSPACE_RESOURCE_TYPE = "workspace";
4
+ export declare const INSTALLATION_RESOURCE_TYPE = "installation";
4
5
  export declare const TRELLO_RESOURCE_OWNER = "trello";
5
6
  export declare const BITBUCKET_RESOURCE_OWNER = "bitbucket";
6
7
  export declare function appIdToAriString(appId: string): string;
@@ -13,6 +14,9 @@ export declare class UnknownSiteWithoutResourceIdError extends Error {
13
14
  export declare class UnknownWorkspaceWithoutResourceIdError extends Error {
14
15
  constructor();
15
16
  }
17
+ export declare class UnknownInstallationWithoutResourceIdError extends Error {
18
+ constructor();
19
+ }
16
20
  export declare function parseInstallationContext(installationContext: string): AnyAri;
17
21
  export declare const createWorkspaceAriByProduct: {
18
22
  jira: (siteId: string, activationId: string) => JiraWorkspaceAri;
@@ -1 +1 @@
1
- {"version":3,"file":"ari.d.ts","sourceRoot":"","sources":["../../src/ari/ari.ts"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,0BAA0B,iBAAiB,CAAC;AACzD,eAAO,MAAM,qBAAqB,WAAW,CAAC;AAC9C,eAAO,MAAM,wBAAwB,cAAc,CAAC;AAEpD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEtD;AAID,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,GAAG,CAMrE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,GAAG,CAMhG;AAGD,wBAAgB,aAAa,CAAC,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,GAAG,MAAM,CAKlE;AACD,qBAAa,iCAAkC,SAAQ,KAAK;;CAI3D;AACD,qBAAa,sCAAuC,SAAQ,KAAK;;CAIhE;AACD,qBAAa,yCAA0C,SAAQ,KAAK;;CAInE;AASD,wBAAgB,wBAAwB,CAAC,mBAAmB,EAAE,MAAM,GAAG,MAAM,CA0B5E;AAGD,eAAO,MAAM,2BAA2B;mBACvB,MAAM,gBAAgB,MAAM;yBACtB,MAAM,gBAAgB,MAAM;sBAC/B,MAAM,eAAe,MAAM;qBAC5B,MAAM,gBAAgB,MAAM;CAC9C,CAAC"}
package/out/ari/ari.js CHANGED
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createWorkspaceAriByProduct = exports.parseInstallationContext = exports.UnknownWorkspaceWithoutResourceIdError = exports.UnknownSiteWithoutResourceIdError = exports.encodeContext = exports.buildExtensionAri = exports.buildContextAri = exports.appIdToAriString = exports.BITBUCKET_RESOURCE_OWNER = exports.TRELLO_RESOURCE_OWNER = exports.WORKSPACE_RESOURCE_TYPE = exports.SITE_RESOURCE_TYPE = void 0;
3
+ exports.createWorkspaceAriByProduct = exports.parseInstallationContext = exports.UnknownInstallationWithoutResourceIdError = exports.UnknownWorkspaceWithoutResourceIdError = exports.UnknownSiteWithoutResourceIdError = exports.encodeContext = exports.buildExtensionAri = exports.buildContextAri = exports.appIdToAriString = exports.BITBUCKET_RESOURCE_OWNER = exports.TRELLO_RESOURCE_OWNER = exports.INSTALLATION_RESOURCE_TYPE = exports.WORKSPACE_RESOURCE_TYPE = exports.SITE_RESOURCE_TYPE = void 0;
4
4
  const ari_1 = require("@forge/util/packages/ari");
5
5
  const shared_1 = require("../shared");
6
6
  const ui_1 = require("../ui");
7
7
  exports.SITE_RESOURCE_TYPE = 'site';
8
8
  exports.WORKSPACE_RESOURCE_TYPE = 'workspace';
9
+ exports.INSTALLATION_RESOURCE_TYPE = 'installation';
9
10
  exports.TRELLO_RESOURCE_OWNER = 'trello';
10
11
  exports.BITBUCKET_RESOURCE_OWNER = 'bitbucket';
11
12
  function appIdToAriString(appId) {
@@ -45,6 +46,12 @@ class UnknownWorkspaceWithoutResourceIdError extends Error {
45
46
  }
46
47
  }
47
48
  exports.UnknownWorkspaceWithoutResourceIdError = UnknownWorkspaceWithoutResourceIdError;
49
+ class UnknownInstallationWithoutResourceIdError extends Error {
50
+ constructor() {
51
+ super(ui_1.Text.installList.noResourceIdInInstallation);
52
+ }
53
+ }
54
+ exports.UnknownInstallationWithoutResourceIdError = UnknownInstallationWithoutResourceIdError;
48
55
  function parseInstallationContext(installationContext) {
49
56
  const context = ari_1.AnyAri.parse(installationContext);
50
57
  switch (context.resourceType) {
@@ -58,6 +65,11 @@ function parseInstallationContext(installationContext) {
58
65
  throw new UnknownWorkspaceWithoutResourceIdError();
59
66
  }
60
67
  break;
68
+ case exports.INSTALLATION_RESOURCE_TYPE:
69
+ if (!context.resourceId) {
70
+ throw new UnknownInstallationWithoutResourceIdError();
71
+ }
72
+ break;
61
73
  default:
62
74
  throw new Error('Unknown resource type');
63
75
  }
@@ -1 +1 @@
1
- {"version":3,"file":"config-file.d.ts","sourceRoot":"","sources":["../../src/config/config-file.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAA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O,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;IAsB1E,aAAa,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAKzD,OAAO,CAAC,eAAe;CAkCxB"}
@@ -182,7 +182,10 @@ class ConfigFile {
182
182
  return [module.resource, ...config_1.ModuleEntryPoints.map((entryPoint) => module[entryPoint]?.resource || '')];
183
183
  })
184
184
  .filter(Boolean);
185
- const missingModuleResourcesKeys = modulesResourcesKeys.filter((key) => !resources.some((resource) => resource.key === key));
185
+ const missingModuleResourcesKeys = modulesResourcesKeys.filter((resourceReference) => {
186
+ const { resourceKey } = (0, manifest_1.parseResourceReference)(resourceReference);
187
+ return !resources.some((resource) => resource.key === resourceKey);
188
+ });
186
189
  if (missingModuleResourcesKeys.length > 0) {
187
190
  throw new ResourceDefinitionMissingError(missingModuleResourcesKeys);
188
191
  }
@@ -267,7 +270,12 @@ class ConfigFile {
267
270
  return app.connect?.key;
268
271
  }
269
272
  getResourceType({ key: resourceKey }, allModules) {
270
- const linkedModule = allModules.find((m) => m.resource === resourceKey) ??
273
+ const linkedModule = allModules.find((m) => {
274
+ if (!m.resource)
275
+ return false;
276
+ const { resourceKey: moduleResourceKey } = (0, manifest_1.parseResourceReference)(m.resource);
277
+ return moduleResourceKey === resourceKey;
278
+ }) ??
271
279
  allModules
272
280
  .reduce((acc, m) => {
273
281
  config_1.ModuleEntryPoints.forEach((entryPoint) => {
@@ -278,7 +286,12 @@ class ConfigFile {
278
286
  });
279
287
  return acc;
280
288
  }, [])
281
- .find(({ resource }) => resource === resourceKey);
289
+ .find(({ resource }) => {
290
+ if (!resource)
291
+ return false;
292
+ const { resourceKey: moduleResourceKey } = (0, manifest_1.parseResourceReference)(resource);
293
+ return moduleResourceKey === resourceKey;
294
+ });
282
295
  if (!linkedModule) {
283
296
  return 'default';
284
297
  }