@forge/manifest 7.9.0-next.3 → 7.9.0-next.4

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,11 @@
1
1
  # @forge/manifest
2
2
 
3
+ ## 7.9.0-next.4
4
+
5
+ ### Minor Changes
6
+
7
+ - 238e7ab: Update type references to support a change in the manifest remote schema
8
+
3
9
  ## 7.9.0-next.3
4
10
 
5
11
  ### Patch Changes
@@ -23823,7 +23823,39 @@
23823
23823
  "maxLength": 23
23824
23824
  },
23825
23825
  "baseUrl": {
23826
- "type": "string"
23826
+ "oneOf": [
23827
+ {
23828
+ "type": "string"
23829
+ },
23830
+ {
23831
+ "type": "object",
23832
+ "propertyNames": {
23833
+ "enum": [
23834
+ "EU",
23835
+ "US",
23836
+ "AU",
23837
+ "DE",
23838
+ "SG",
23839
+ "CA",
23840
+ "IN",
23841
+ "KR",
23842
+ "JP",
23843
+ "GB",
23844
+ "CH",
23845
+ "default"
23846
+ ]
23847
+ },
23848
+ "patternProperties": {
23849
+ ".+": {
23850
+ "type": "string",
23851
+ "minLength": 1
23852
+ }
23853
+ },
23854
+ "required": [
23855
+ "default"
23856
+ ]
23857
+ }
23858
+ ]
23827
23859
  },
23828
23860
  "operations": {
23829
23861
  "description": "The type of operations done in the remote",
@@ -59560,7 +59560,15 @@ export interface RemotesSchema {
59560
59560
  * A key for the remote, which other modules can refer to. Must be unique within the manifest and have a maximum of 23 characters.
59561
59561
  */
59562
59562
  key: string;
59563
- baseUrl: string;
59563
+ baseUrl:
59564
+ | string
59565
+ | {
59566
+ /**
59567
+ * This interface was referenced by `undefined`'s JSON-Schema definition
59568
+ * via the `patternProperty` ".+".
59569
+ */
59570
+ [k: string]: string;
59571
+ };
59564
59572
  /**
59565
59573
  * The type of operations done in the remote
59566
59574
  */
@@ -80,7 +80,10 @@ class PermissionsValidator {
80
80
  if (invalidBackendStrings?.length) {
81
81
  this.addValidationErrors(errors, 'external.fetch.backend', invalidBackendStrings, manifest);
82
82
  }
83
- const remoteMap = manifest.typedContent.remotes?.reduce((prev, item) => prev.set(item.key, item.baseUrl), new Map());
83
+ const remoteMap = manifest.typedContent.remotes?.reduce((prev, item) => {
84
+ const baseUrl = typeof item.baseUrl === 'string' ? item.baseUrl : item.baseUrl.default;
85
+ return prev.set(item.key, baseUrl);
86
+ }, new Map());
84
87
  const invalidBackendRemotes = manifest.typedContent.permissions.external?.fetch?.backend
85
88
  ?.filter((item) => typeof item === 'object' &&
86
89
  (!remoteMap || !remoteMap.has(item.remote) || !this.isValidURL(remoteMap.get(item.remote))))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/manifest",
3
- "version": "7.9.0-next.3",
3
+ "version": "7.9.0-next.4",
4
4
  "description": "Definitions and validations of the Forge manifest",
5
5
  "main": "out/index.js",
6
6
  "scripts": {