@forge/manifest 8.9.0-next.11 → 8.9.0-next.12-experimental-99739ec

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,35 @@
1
1
  # @forge/manifest
2
2
 
3
+ ## 8.9.0-next.12-experimental-99739ec
4
+
5
+ ### Minor Changes
6
+
7
+ - 4b083be: Option to bundle applications using TypeScript
8
+ - 94e48b9: Remove agent mode support per product decision
9
+ - 8c34ca3: Changed manifest to allow egress objects to be a list of string, egress objects containing at least the 'address' field, or a remote reference
10
+
11
+ ### Patch Changes
12
+
13
+ - 7243788: Displaying all product options and fixing wording
14
+ - acf1edf: fix i18n test
15
+ - 9d231e9: switch the `forge create` cross-context flow to use the new `app.contexts` manifest format
16
+ - b51be39: allow app developer to specify function memory allocation
17
+ - 0dfb15d: Revert CustomUITunnellingResourceHandler change
18
+ - b503084: switch the `forge create` cross-context flow to use the new `app.contexts` manifest format
19
+ - 64daaa5: validate schema for app.contexts so developers can define a required context in the manifest
20
+ - 99739ec: Update manifest definitions
21
+ - 3a703de: Update manifest definitions
22
+ - 003b1ed: Update manifest definitions
23
+ - Updated dependencies [336f74f]
24
+ - Updated dependencies [e404ba0]
25
+ - @forge/i18n@0.0.5-next.1-experimental-99739ec
26
+
27
+ ## 8.9.0-next.12
28
+
29
+ ### Minor Changes
30
+
31
+ - 8c34ca3: Changed manifest to allow egress objects to be a list of string, egress objects containing at least the 'address' field, or a remote reference
32
+
3
33
  ## 8.9.0-next.11
4
34
 
5
35
  ### Patch Changes
@@ -26432,6 +26432,9 @@
26432
26432
  "type": "string",
26433
26433
  "maxLength": 1000
26434
26434
  },
26435
+ {
26436
+ "$ref": "#/definitions/EgressPermission"
26437
+ },
26435
26438
  {
26436
26439
  "type": "object",
26437
26440
  "description": "References a Remote",
@@ -26460,6 +26463,9 @@
26460
26463
  "type": "string",
26461
26464
  "maxLength": 1000
26462
26465
  },
26466
+ {
26467
+ "$ref": "#/definitions/EgressPermission"
26468
+ },
26463
26469
  {
26464
26470
  "type": "object",
26465
26471
  "description": "References a Remote",
@@ -26485,8 +26491,15 @@
26485
26491
  },
26486
26492
  "fonts": {
26487
26493
  "items": {
26488
- "type": "string",
26489
- "maxLength": 1000
26494
+ "oneOf": [
26495
+ {
26496
+ "type": "string",
26497
+ "maxLength": 1000
26498
+ },
26499
+ {
26500
+ "$ref": "#/definitions/EgressPermission"
26501
+ }
26502
+ ]
26490
26503
  },
26491
26504
  "title": "fonts",
26492
26505
  "type": "array",
@@ -26494,8 +26507,15 @@
26494
26507
  },
26495
26508
  "frames": {
26496
26509
  "items": {
26497
- "type": "string",
26498
- "maxLength": 1000
26510
+ "oneOf": [
26511
+ {
26512
+ "type": "string",
26513
+ "maxLength": 1000
26514
+ },
26515
+ {
26516
+ "$ref": "#/definitions/EgressPermission"
26517
+ }
26518
+ ]
26499
26519
  },
26500
26520
  "title": "frames",
26501
26521
  "type": "array",
@@ -26503,8 +26523,15 @@
26503
26523
  },
26504
26524
  "navigation": {
26505
26525
  "items": {
26506
- "type": "string",
26507
- "maxLength": 1000
26526
+ "oneOf": [
26527
+ {
26528
+ "type": "string",
26529
+ "maxLength": 1000
26530
+ },
26531
+ {
26532
+ "$ref": "#/definitions/EgressPermission"
26533
+ }
26534
+ ]
26508
26535
  },
26509
26536
  "title": "navigation",
26510
26537
  "type": "array",
@@ -26512,8 +26539,15 @@
26512
26539
  },
26513
26540
  "images": {
26514
26541
  "items": {
26515
- "type": "string",
26516
- "maxLength": 1000
26542
+ "oneOf": [
26543
+ {
26544
+ "type": "string",
26545
+ "maxLength": 1000
26546
+ },
26547
+ {
26548
+ "$ref": "#/definitions/EgressPermission"
26549
+ }
26550
+ ]
26517
26551
  },
26518
26552
  "title": "images",
26519
26553
  "type": "array",
@@ -26521,8 +26555,15 @@
26521
26555
  },
26522
26556
  "media": {
26523
26557
  "items": {
26524
- "type": "string",
26525
- "maxLength": 1000
26558
+ "oneOf": [
26559
+ {
26560
+ "type": "string",
26561
+ "maxLength": 1000
26562
+ },
26563
+ {
26564
+ "$ref": "#/definitions/EgressPermission"
26565
+ }
26566
+ ]
26526
26567
  },
26527
26568
  "title": "media",
26528
26569
  "type": "array",
@@ -26530,8 +26571,15 @@
26530
26571
  },
26531
26572
  "scripts": {
26532
26573
  "items": {
26533
- "type": "string",
26534
- "maxLength": 1000
26574
+ "oneOf": [
26575
+ {
26576
+ "type": "string",
26577
+ "maxLength": 1000
26578
+ },
26579
+ {
26580
+ "$ref": "#/definitions/EgressPermission"
26581
+ }
26582
+ ]
26535
26583
  },
26536
26584
  "title": "scripts",
26537
26585
  "type": "array",
@@ -26539,8 +26587,15 @@
26539
26587
  },
26540
26588
  "styles": {
26541
26589
  "items": {
26542
- "type": "string",
26543
- "maxLength": 1000
26590
+ "oneOf": [
26591
+ {
26592
+ "type": "string",
26593
+ "maxLength": 1000
26594
+ },
26595
+ {
26596
+ "$ref": "#/definitions/EgressPermission"
26597
+ }
26598
+ ]
26544
26599
  },
26545
26600
  "title": "styles",
26546
26601
  "type": "array",
@@ -26851,6 +26906,31 @@
26851
26906
  "type": "string",
26852
26907
  "pattern": "^[^\\s]+$"
26853
26908
  },
26909
+ "EgressPermission": {
26910
+ "type": "object",
26911
+ "additionalProperties": false,
26912
+ "required": [
26913
+ "address"
26914
+ ],
26915
+ "properties": {
26916
+ "address": {
26917
+ "type": "string",
26918
+ "description": "The URL for external egress",
26919
+ "maxLength": 1000
26920
+ },
26921
+ "category": {
26922
+ "type": "string",
26923
+ "description": "The category of egress, e.g. analytics",
26924
+ "enum": [
26925
+ "analytics"
26926
+ ]
26927
+ },
26928
+ "inScopeEUD": {
26929
+ "type": "boolean",
26930
+ "description": "Weather or not any user data is in egressed via this address"
26931
+ }
26932
+ }
26933
+ },
26854
26934
  "AuthProviderPredefined": {
26855
26935
  "type": "object",
26856
26936
  "additionalProperties": false,
@@ -653,15 +653,15 @@ export type Function7 = string;
653
653
  export type Scopes = string[];
654
654
  export type Scripts = string[];
655
655
  export type Styles = 'unsafe-inline'[];
656
- export type Backend = (string | Remote)[];
657
- export type Client = (string | Remote1)[];
658
- export type Fonts = string[];
659
- export type Frames = string[];
660
- export type Navigation = string[];
661
- export type Images = string[];
662
- export type Media = string[];
663
- export type Scripts1 = string[];
664
- export type Styles1 = string[];
656
+ export type Backend = (string | EgressPermission | Remote)[];
657
+ export type Client = (string | EgressPermission | Remote1)[];
658
+ export type Fonts = (string | EgressPermission)[];
659
+ export type Frames = (string | EgressPermission)[];
660
+ export type Navigation = (string | EgressPermission)[];
661
+ export type Images = (string | EgressPermission)[];
662
+ export type Media = (string | EgressPermission)[];
663
+ export type Scripts1 = (string | EgressPermission)[];
664
+ export type Styles1 = (string | EgressPermission)[];
665
665
  export type Resources = HostedResourcesSchema[];
666
666
  export type Remotes = RemotesSchema[];
667
667
  export type BearerMethodSchema =
@@ -60974,6 +60974,20 @@ export interface Fetch {
60974
60974
  backend?: Backend;
60975
60975
  client?: Client;
60976
60976
  }
60977
+ export interface EgressPermission {
60978
+ /**
60979
+ * The URL for external egress
60980
+ */
60981
+ address: string;
60982
+ /**
60983
+ * The category of egress, e.g. analytics
60984
+ */
60985
+ category?: 'analytics';
60986
+ /**
60987
+ * Weather or not any user data is in egressed via this address
60988
+ */
60989
+ inScopeEUD?: boolean;
60990
+ }
60977
60991
  /**
60978
60992
  * References a Remote
60979
60993
  */
@@ -1 +1 @@
1
- {"version":3,"file":"permissions-validator.d.ts","sourceRoot":"","sources":["../../src/validators/permissions-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAmB,MAAM,UAAU,CAAC;AAGrF,OAAO,EAAE,cAAc,EAAU,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAM3D,qBAAa,oBACX,YAAW,kBAAkB,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,EAAE,cAAc,CAAC;IAEzF,OAAO,CAAC,UAAU;IA+BlB,OAAO,CAAC,WAAW;IAUnB,OAAO,CAAC,mBAAmB;IAgB3B,OAAO,CAAC,8BAA8B;IA6ChC,QAAQ,CACZ,QAAQ,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,GACnD,OAAO,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAC;CAoGrD"}
1
+ {"version":3,"file":"permissions-validator.d.ts","sourceRoot":"","sources":["../../src/validators/permissions-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAmB,MAAM,UAAU,CAAC;AAGrF,OAAO,EAAE,cAAc,EAAU,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAM3D,qBAAa,oBACX,YAAW,kBAAkB,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,EAAE,cAAc,CAAC;IAEzF,OAAO,CAAC,UAAU;IA+BlB,OAAO,CAAC,WAAW;IAUnB,OAAO,CAAC,mBAAmB;IAgB3B,OAAO,CAAC,8BAA8B;IA6ChC,QAAQ,CACZ,QAAQ,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,GACnD,OAAO,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAC;CA8HrD"}
@@ -109,39 +109,53 @@ class PermissionsValidator {
109
109
  const mapping = [
110
110
  {
111
111
  element: 'external.fetch.backend',
112
- perms: manifest.typedContent.permissions.external?.fetch?.backend?.filter((key) => typeof key === 'string')
112
+ perms: manifest.typedContent.permissions.external?.fetch?.backend
113
+ ?.map((key) => {
114
+ if (typeof key === 'object' && 'address' in key) {
115
+ return key.address;
116
+ }
117
+ return key;
118
+ })
119
+ .filter((key) => typeof key === 'string')
113
120
  },
114
121
  {
115
122
  element: 'external.fetch.client',
116
- perms: manifest.typedContent.permissions.external?.fetch?.client?.filter((key) => typeof key === 'string')
123
+ perms: manifest.typedContent.permissions.external?.fetch?.client
124
+ ?.map((key) => {
125
+ if (typeof key === 'object' && 'address' in key) {
126
+ return key.address;
127
+ }
128
+ return key;
129
+ })
130
+ .filter((key) => typeof key === 'string')
117
131
  },
118
132
  {
119
133
  element: 'external.navigation',
120
- perms: manifest.typedContent.permissions.external?.navigation
134
+ perms: manifest.typedContent.permissions.external?.navigation?.map((key) => typeof key === 'object' ? key.address : key)
121
135
  },
122
136
  {
123
137
  element: 'external.styles',
124
- perms: manifest.typedContent.permissions.external?.styles
138
+ perms: manifest.typedContent.permissions.external?.styles?.map((key) => typeof key === 'object' ? key.address : key)
125
139
  },
126
140
  {
127
141
  element: 'external.frames',
128
- perms: manifest.typedContent.permissions.external?.frames
142
+ perms: manifest.typedContent.permissions.external?.frames?.map((key) => typeof key === 'object' ? key.address : key)
129
143
  },
130
144
  {
131
145
  element: 'external.fonts',
132
- perms: manifest.typedContent.permissions.external?.fonts
146
+ perms: manifest.typedContent.permissions.external?.fonts?.map((key) => typeof key === 'object' ? key.address : key)
133
147
  },
134
148
  {
135
149
  element: 'external.images',
136
- perms: manifest.typedContent.permissions.external?.images
150
+ perms: manifest.typedContent.permissions.external?.images?.map((key) => typeof key === 'object' ? key.address : key)
137
151
  },
138
152
  {
139
153
  element: 'external.media',
140
- perms: manifest.typedContent.permissions.external?.media
154
+ perms: manifest.typedContent.permissions.external?.media?.map((key) => typeof key === 'object' ? key.address : key)
141
155
  },
142
156
  {
143
157
  element: 'external.scripts',
144
- perms: manifest.typedContent.permissions.external?.scripts
158
+ perms: manifest.typedContent.permissions.external?.scripts?.map((key) => typeof key === 'object' ? key.address : key)
145
159
  }
146
160
  ];
147
161
  mapping.forEach((item) => this.validateExternalPermissionURLs(errors, item.element, item.perms, manifest));
@@ -151,6 +165,7 @@ class PermissionsValidator {
151
165
  }, new Map());
152
166
  const invalidBackendRemotes = manifest.typedContent.permissions.external?.fetch?.backend
153
167
  ?.filter((item) => typeof item === 'object' &&
168
+ 'remote' in item &&
154
169
  (!remoteMap || !remoteMap.has(item.remote) || !this.isValidURL(remoteMap.get(item.remote))))
155
170
  .map((item) => item.remote);
156
171
  if (invalidBackendRemotes?.length) {
@@ -158,6 +173,7 @@ class PermissionsValidator {
158
173
  }
159
174
  const invalidClientRemotes = manifest.typedContent.permissions.external?.fetch?.client
160
175
  ?.filter((item) => typeof item === 'object' &&
176
+ 'remote' in item &&
161
177
  (!remoteMap || !remoteMap.has(item.remote) || !this.isValidURL(remoteMap.get(item.remote))))
162
178
  .map((item) => item.remote);
163
179
  if (invalidClientRemotes?.length) {
@@ -1 +1 @@
1
- {"version":3,"file":"providers-validator.d.ts","sourceRoot":"","sources":["../../src/validators/providers-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAmB,MAAM,UAAU,CAAC;AAGrF,OAAO,KAAK,EAGV,cAAc,EAGf,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAG3D,qBAAa,kBACX,YAAW,kBAAkB,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,EAAE,cAAc,CAAC;IAEnF,QAAQ,CACZ,QAAQ,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,GACnD,OAAO,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAC;IA+EpD,OAAO,CAAC,mBAAmB;IAiB3B,OAAO,CAAC,+BAA+B;IAkBvC,OAAO,CAAC,iBAAiB;CAoC1B"}
1
+ {"version":3,"file":"providers-validator.d.ts","sourceRoot":"","sources":["../../src/validators/providers-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAmB,MAAM,UAAU,CAAC;AAGrF,OAAO,KAAK,EAGV,cAAc,EAGf,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAG3D,qBAAa,kBACX,YAAW,kBAAkB,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,EAAE,cAAc,CAAC;IAEnF,QAAQ,CACZ,QAAQ,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,GACnD,OAAO,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAC;IAqFpD,OAAO,CAAC,mBAAmB;IAiB3B,OAAO,CAAC,+BAA+B;IAkBvC,OAAO,CAAC,iBAAiB;CAoC1B"}
@@ -30,7 +30,15 @@ class ProvidersValidator {
30
30
  const missingEgressPermission = provider.remotes?.find((key) => {
31
31
  const remote = remotes?.find((item) => item.key === key);
32
32
  if (remote) {
33
- const egressPermission = permissions?.external?.fetch?.backend?.find((item) => typeof item === 'string' ? item === remote.baseUrl : item.remote === remote.key);
33
+ const egressPermission = permissions?.external?.fetch?.backend?.find((item) => {
34
+ if (typeof item === 'string') {
35
+ return item === remote.baseUrl;
36
+ }
37
+ if ('remote' in item) {
38
+ return item.remote === remote.key;
39
+ }
40
+ return item.address === remote.baseUrl;
41
+ });
34
42
  return !egressPermission;
35
43
  }
36
44
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/manifest",
3
- "version": "8.9.0-next.11",
3
+ "version": "8.9.0-next.12-experimental-99739ec",
4
4
  "description": "Definitions and validations of the Forge manifest",
5
5
  "main": "out/index.js",
6
6
  "scripts": {
@@ -24,7 +24,7 @@
24
24
  "author": "Atlassian",
25
25
  "license": "SEE LICENSE IN LICENSE.txt",
26
26
  "dependencies": {
27
- "@forge/i18n": "0.0.5-next.1",
27
+ "@forge/i18n": "0.0.5-next.1-experimental-99739ec",
28
28
  "@sentry/node": "7.106.0",
29
29
  "ajv": "^8.12.0",
30
30
  "ajv-formats": "2.1.1",