@forge/manifest 10.4.0 → 10.5.0-next.0

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
+ ## 10.5.0-next.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 2d37370: Adding `configurable` to `external`, and extending `remotes` to support `userConfiguration`
8
+
3
9
  ## 10.4.0
4
10
 
5
11
  ### Minor Changes
@@ -1 +1 @@
1
- {"version":3,"file":"full-validation-processor.d.ts","sourceRoot":"","sources":["../../src/processor/full-validation-processor.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAQpD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,qBAAa,uBAAwB,SAAQ,2BAA2B,CAAC,cAAc,CAAC;gBAC1E,WAAW,EAAE,WAAW;CAyBrC"}
1
+ {"version":3,"file":"full-validation-processor.d.ts","sourceRoot":"","sources":["../../src/processor/full-validation-processor.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AASpD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,qBAAa,uBAAwB,SAAQ,2BAA2B,CAAC,cAAc,CAAC;gBAC1E,WAAW,EAAE,WAAW;CA0BrC"}
@@ -10,6 +10,7 @@ const storage_validator_1 = require("../validators/storage-validator");
10
10
  const jql_function_validator_1 = require("../validators/jql-function-validator");
11
11
  const app_features_validator_1 = require("../validators/app-features-validator");
12
12
  const data_classification_validator_1 = require("../validators/data-classification-validator");
13
+ const remotes_is_configurable_validator_1 = require("../validators/remotes-is-configurable-validator");
13
14
  const remote_regions_validator_1 = require("../validators/remote-regions-validator");
14
15
  const remote_auth_scopes_validator_1 = require("../validators/remote-auth-scopes-validator");
15
16
  const runtime_version_validator_1 = require("../validators/runtime-version-validator");
@@ -34,6 +35,7 @@ class FullValidationProcessor extends abstract_validation_processor_1.AbstractVa
34
35
  new app_features_validator_1.AppFeaturesValidator(),
35
36
  new data_classification_validator_1.DataClassificationValidator(),
36
37
  new validators_1.TranslationsValidator(),
38
+ new remotes_is_configurable_validator_1.RemotesIsUserConfigurableValidator(),
37
39
  new remote_regions_validator_1.RemoteRegionsValidator(),
38
40
  new remote_auth_scopes_validator_1.RemoteAuthScopesValidator(),
39
41
  new runtime_version_validator_1.RuntimeVersionValidator(lintOptions)
@@ -1270,7 +1270,6 @@
1270
1270
  }
1271
1271
  },
1272
1272
  "required": [
1273
- "baseUrl",
1274
1273
  "key"
1275
1274
  ],
1276
1275
  "type": "object",
@@ -27672,6 +27671,20 @@
27672
27671
  "type": "object",
27673
27672
  "title": "AppPermissionsSchema",
27674
27673
  "properties": {
27674
+ "configurable": {
27675
+ "type": "object",
27676
+ "additionalProperties": true,
27677
+ "description": "This property is not yet supported",
27678
+ "required": [
27679
+ "enabled"
27680
+ ],
27681
+ "properties": {
27682
+ "enabled": {
27683
+ "type": "boolean",
27684
+ "description": "This property is not yet supported"
27685
+ }
27686
+ }
27687
+ },
27675
27688
  "scopes": {
27676
27689
  "title": "scopes",
27677
27690
  "oneOf": [
@@ -27954,8 +27967,7 @@
27954
27967
  "type": "object",
27955
27968
  "title": "RemotesSchema",
27956
27969
  "required": [
27957
- "key",
27958
- "baseUrl"
27970
+ "key"
27959
27971
  ],
27960
27972
  "additionalProperties": false,
27961
27973
  "properties": {
@@ -28058,6 +28070,37 @@
28058
28070
  "type": "boolean"
28059
28071
  }
28060
28072
  }
28073
+ },
28074
+ "configurable": {
28075
+ "description": "A remote that an admin can configure",
28076
+ "type": "object",
28077
+ "required": [
28078
+ "name",
28079
+ "description"
28080
+ ],
28081
+ "properties": {
28082
+ "name": {
28083
+ "description": "The name that an admin will see when they're configuring the remote",
28084
+ "type": "string"
28085
+ },
28086
+ "description": {
28087
+ "description": "The description that an admin will see when they're configuring the remote",
28088
+ "type": "string"
28089
+ },
28090
+ "default": {
28091
+ "description": "The default value that will be used if the admin does not set a custom domain for this remote",
28092
+ "type": "string"
28093
+ },
28094
+ "supportedPatterns": {
28095
+ "description": "The domains that are supported for this remote, prefixed with a * wildcard. For example, `*.atlassian.net` would allow this remote to communicate with domains that matched this.",
28096
+ "type": "array",
28097
+ "minItems": 1,
28098
+ "items": {
28099
+ "type": "string"
28100
+ }
28101
+ }
28102
+ },
28103
+ "additionalProperties": false
28061
28104
  }
28062
28105
  }
28063
28106
  }
@@ -1351,7 +1351,7 @@ export interface Modules {
1351
1351
  */
1352
1352
  [k: string]: string;
1353
1353
  };
1354
- baseUrl:
1354
+ baseUrl?:
1355
1355
  | string
1356
1356
  | {
1357
1357
  /**
@@ -1393,7 +1393,7 @@ export interface Modules {
1393
1393
  */
1394
1394
  [k: string]: string;
1395
1395
  };
1396
- baseUrl:
1396
+ baseUrl?:
1397
1397
  | string
1398
1398
  | {
1399
1399
  /**
@@ -72779,6 +72779,16 @@ export interface FormProperty {
72779
72779
  hideInEditView?: boolean;
72780
72780
  }
72781
72781
  export interface Permissions {
72782
+ /**
72783
+ * This property is not yet supported
72784
+ */
72785
+ configurable?: {
72786
+ /**
72787
+ * This property is not yet supported
72788
+ */
72789
+ enabled: boolean;
72790
+ [k: string]: unknown;
72791
+ };
72782
72792
  scopes?: Scopes;
72783
72793
  content?: Content1;
72784
72794
  external?: External;
@@ -72842,7 +72852,7 @@ export interface RemotesSchema {
72842
72852
  * A key for the remote, which other modules can refer to. Must be unique within the manifest and have a maximum of 23 characters.
72843
72853
  */
72844
72854
  key: string;
72845
- baseUrl:
72855
+ baseUrl?:
72846
72856
  | string
72847
72857
  | {
72848
72858
  /**
@@ -72875,6 +72885,27 @@ export interface RemotesSchema {
72875
72885
  */
72876
72886
  inScopeEUD: boolean;
72877
72887
  };
72888
+ /**
72889
+ * A remote that an admin can configure
72890
+ */
72891
+ configurable?: {
72892
+ /**
72893
+ * The name that an admin will see when they're configuring the remote
72894
+ */
72895
+ name: string;
72896
+ /**
72897
+ * The description that an admin will see when they're configuring the remote
72898
+ */
72899
+ description: string;
72900
+ /**
72901
+ * The default value that will be used if the admin does not set a custom domain for this remote
72902
+ */
72903
+ default?: string;
72904
+ /**
72905
+ * The domains that are supported for this remote, prefixed with a * wildcard. For example, `*.atlassian.net` would allow this remote to communicate with domains that matched this.
72906
+ */
72907
+ supportedPatterns?: [string, ...string[]];
72908
+ };
72878
72909
  }
72879
72910
  export interface Providers {
72880
72911
  auth: Auth;
@@ -126,6 +126,10 @@ export declare const errors: {
126
126
  remote: {
127
127
  missingModuleRemoteStorageInScopeEUD: (key: string) => string;
128
128
  allRegionsNotDeclared: (key: string) => string;
129
+ baseUrlNotPresent: (key: string) => string;
130
+ userConfigurationPermissionsMismatch: (key: string) => string;
131
+ neitherBaseUrlNorUserConfigurationPresent: (key: string) => string;
132
+ bothBaseUrlAndUserConfigurationPresent: (key: string) => string;
129
133
  };
130
134
  rovo: {
131
135
  incorrectAgentActionReference: (module: string, moduleKey: string) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/text/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG1C,eAAO,MAAM,MAAM;8BACS,MAAM,KAAG,MAAM;2BACpB,MAAM;yBAEN,MAAM,GAAG,SAAS,QAAQ,MAAM,EAAE,UAAU,MAAM,GAAG,SAAS,KAAG,MAAM;;uBAO3E,MAAM,EAAE,EAAE,GAAG,SAAS,KAAG,MAAM;4BAI1B,MAAM,EAAE,KAAG,MAAM;mCACV,MAAM,SAAS,MAAM,mBAAmB,MAAM,KAAG,MAAM;mDAIvC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AAG,MAAM;2CAEJ,MAAM,eAAe,MAAM,KAAG,MAAM;kCAE7C,MAAM,UAAU,MAAM,KAAG,MAAM;;;uCAI5B,MAAM;uCAEJ,MAAM,KAAG,MAAM;qCAEnB,MAAM;;6CAGA,MAAM;;;mDAIE,MAAM,KAAG,MAAM;iDAEnB,MAAM;;;;4CAKX,MAAM,SAAS,MAAM,KAAG,MAAM;4CAE9B,MAAM,KAAG,MAAM;4CACf,MAAM,SAAS,MAAM,KAAG,MAAM;+CAE3B,MAAM,aAAa,MAAM,SAAS,MAAM,KAAG,MAAM;yCAEvD,MAAM,SAAS,MAAM,KAAG,MAAM;4CAE3B,MAAM,SAAS,MAAM,KAAG,MAAM;gDAE1B,MAAM,aAAa,MAAM,KAAG,MAAM;4CAEtC,MAAM,SAAS,MAAM,KAAG,MAAM;;;;;gCAM1C,MAAM;;;;;0DAKwB,wBAAwB,KAAG,MAAM;sDAErC,wBAAwB,KAAG,MAAM;kDAErC,wBAAwB,QAAQ,MAAM,KAAG,MAAM;mDAE9C,wBAAwB,KAAG,MAAM;mCAEjD,MAAM,KAAG,MAAM;;oDAEE,MAAM,aAAa,MAAM,KAAG,MAAM;4CAE1C,MAAM,sBAAsB,wBAAwB,YAAY,MAAM;;;;mCAKjF,MAAM;;;CAQlC,CAAC;AAEF,oBAAY,UAAU;IACpB,eAAe,2BAA2B;IAC1C,eAAe,wBAAwB;IACvC,WAAW,4BAA4B;IACvC,WAAW,+BAA+B;IAC1C,aAAa,8BAA8B;IAC3C,OAAO,0BAA0B;IACjC,cAAc,kCAAkC;IAChD,SAAS,4BAA4B;IACrC,SAAS,4BAA4B;IACrC,UAAU,wBAAwB;IAClC,GAAG,8BAA8B;CAClC"}
@@ -137,7 +137,11 @@ exports.errors = {
137
137
  },
138
138
  remote: {
139
139
  missingModuleRemoteStorageInScopeEUD: (key) => `missing storage.inScopeEUD in ${key} module. storage.inScopeEUD is required if storage is present in operations.`,
140
- allRegionsNotDeclared: (key) => `All region specific URLs are not declared for ${key}`
140
+ allRegionsNotDeclared: (key) => `All region specific URLs are not declared for ${key}`,
141
+ baseUrlNotPresent: (key) => `A remote must declare baseUrl for ${key}`,
142
+ userConfigurationPermissionsMismatch: (key) => `The remote ${key} is configurable, but permissions.configurable.enabled is not true`,
143
+ neitherBaseUrlNorUserConfigurationPresent: (key) => `A remote must declare either baseUrl or configurable for ${key}`,
144
+ bothBaseUrlAndUserConfigurationPresent: (key) => `A remote must not declare both baseUrl and configurable for ${key}`
141
145
  },
142
146
  rovo: {
143
147
  incorrectAgentActionReference: (module, moduleKey) => `${module} references undefined action module with key '${moduleKey}'.`,
@@ -0,0 +1,3 @@
1
+ export declare const ENABLE_CONFIGURABLE_REMOTES: string | undefined;
2
+ export declare function configurableRemotesEnabled(): boolean;
3
+ //# sourceMappingURL=features.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features.d.ts","sourceRoot":"","sources":["../../src/utils/features.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B,oBAA0C,CAAC;AAEnF,wBAAgB,0BAA0B,IAAI,OAAO,CAMpD"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.configurableRemotesEnabled = exports.ENABLE_CONFIGURABLE_REMOTES = void 0;
4
+ exports.ENABLE_CONFIGURABLE_REMOTES = process.env.ENABLE_CONFIGURABLE_REMOTES;
5
+ function configurableRemotesEnabled() {
6
+ if (!exports.ENABLE_CONFIGURABLE_REMOTES || exports.ENABLE_CONFIGURABLE_REMOTES.length === 0) {
7
+ return false;
8
+ }
9
+ else {
10
+ return true;
11
+ }
12
+ }
13
+ exports.configurableRemotesEnabled = configurableRemotesEnabled;
@@ -4,5 +4,6 @@ export * from './module-key-cleaner';
4
4
  export * from './module-references';
5
5
  export * from './manifest-parser-builder';
6
6
  export type { ManifestParser } from './manifest-parser';
7
+ export * from './features';
7
8
  export * from './i18n';
8
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC"}
@@ -6,4 +6,5 @@ tslib_1.__exportStar(require("./line-finder"), exports);
6
6
  tslib_1.__exportStar(require("./module-key-cleaner"), exports);
7
7
  tslib_1.__exportStar(require("./module-references"), exports);
8
8
  tslib_1.__exportStar(require("./manifest-parser-builder"), exports);
9
+ tslib_1.__exportStar(require("./features"), exports);
9
10
  tslib_1.__exportStar(require("./i18n"), exports);
@@ -3,6 +3,7 @@ import { ManifestSchema } from '../schema/manifest';
3
3
  import { ValidatorInterface } from './validator-interface';
4
4
  export declare const PROTOCOL_BLOCKLIST: string[];
5
5
  export declare class PermissionsValidator implements ValidatorInterface<ManifestObject<ManifestSchema> | undefined, ManifestSchema> {
6
+ private remotesHasValidEntryForKey;
6
7
  private isValidURL;
7
8
  private isValidHash;
8
9
  private addValidationErrors;
@@ -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;AAO3D,eAAO,MAAM,kBAAkB,UAa9B,CAAC;AAEF,qBAAa,oBACX,YAAW,kBAAkB,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,EAAE,cAAc,CAAC;IAEzF,OAAO,CAAC,UAAU;IAwClB,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;CA+JrD"}
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;AAQ3D,eAAO,MAAM,kBAAkB,UAa9B,CAAC;AAEF,qBAAa,oBACX,YAAW,kBAAkB,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,EAAE,cAAc,CAAC;IAEzF,OAAO,CAAC,0BAA0B;IAQlC,OAAO,CAAC,UAAU;IAwClB,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;CAkNrD"}
@@ -9,6 +9,7 @@ const url_1 = require("url");
9
9
  const shipyard_scopes_json_1 = tslib_1.__importDefault(require("../scopes/shipyard-scopes.json"));
10
10
  const deprecated_shipyard_scopes_json_1 = tslib_1.__importDefault(require("../scopes/deprecated-shipyard-scopes.json"));
11
11
  const scopes_1 = require("../utils/scopes");
12
+ const features_1 = require("../utils/features");
12
13
  exports.PROTOCOL_BLOCKLIST = [
13
14
  'javascript:',
14
15
  'data:',
@@ -24,6 +25,11 @@ exports.PROTOCOL_BLOCKLIST = [
24
25
  'smb:'
25
26
  ];
26
27
  class PermissionsValidator {
28
+ remotesHasValidEntryForKey(remoteMap, key) {
29
+ return (remoteMap !== undefined &&
30
+ remoteMap.has(key) &&
31
+ (remoteMap.get(key) === null || this.isValidURL(remoteMap.get(key))));
32
+ }
27
33
  isValidURL(inputURL) {
28
34
  const protocolRegex = /^(.*?:\/\/)/;
29
35
  const validURI = /^(\*\.)?[.a-zA-Z0-9_\-\/:~#%?=&]+$/;
@@ -208,21 +214,44 @@ class PermissionsValidator {
208
214
  }
209
215
  });
210
216
  const remoteMap = manifest.typedContent.remotes?.reduce((prev, item) => {
211
- const baseUrl = typeof item.baseUrl === 'string' ? item.baseUrl : item.baseUrl.default;
212
- return prev.set(item.key, baseUrl);
217
+ if ((0, features_1.configurableRemotesEnabled)()) {
218
+ if (typeof item.configurable !== 'undefined') {
219
+ if (typeof item.configurable.default !== 'undefined') {
220
+ const baseUrl = item.configurable.default;
221
+ return prev.set(item.key, baseUrl);
222
+ }
223
+ else {
224
+ return prev.set(item.key, null);
225
+ }
226
+ }
227
+ else {
228
+ if (typeof item.baseUrl !== 'undefined') {
229
+ const baseUrl = typeof item.baseUrl === 'string' ? item.baseUrl : item.baseUrl.default;
230
+ return prev.set(item.key, baseUrl);
231
+ }
232
+ else {
233
+ return prev;
234
+ }
235
+ }
236
+ }
237
+ else {
238
+ if (item.baseUrl !== undefined) {
239
+ const baseUrl = typeof item.baseUrl === 'string' ? item.baseUrl : item.baseUrl.default;
240
+ return prev.set(item.key, baseUrl);
241
+ }
242
+ else {
243
+ return prev;
244
+ }
245
+ }
213
246
  }, new Map());
214
247
  const invalidBackendRemotes = manifest.typedContent.permissions.external?.fetch?.backend
215
- ?.filter((item) => typeof item === 'object' &&
216
- 'remote' in item &&
217
- (!remoteMap || !remoteMap.has(item.remote) || !this.isValidURL(remoteMap.get(item.remote))))
248
+ ?.filter((item) => typeof item === 'object' && 'remote' in item && !this.remotesHasValidEntryForKey(remoteMap, item.remote))
218
249
  .map((item) => item.remote);
219
250
  if (invalidBackendRemotes?.length) {
220
251
  this.addValidationErrors(errors, 'external.fetch.backend', invalidBackendRemotes, manifest);
221
252
  }
222
253
  const invalidClientRemotes = manifest.typedContent.permissions.external?.fetch?.client
223
- ?.filter((item) => typeof item === 'object' &&
224
- 'remote' in item &&
225
- (!remoteMap || !remoteMap.has(item.remote) || !this.isValidURL(remoteMap.get(item.remote))))
254
+ ?.filter((item) => typeof item === 'object' && 'remote' in item && !this.remotesHasValidEntryForKey(remoteMap, item.remote))
226
255
  .map((item) => item.remote);
227
256
  if (invalidClientRemotes?.length) {
228
257
  this.addValidationErrors(errors, 'external.fetch.client', invalidClientRemotes, manifest);
@@ -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;IAqFpD,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;CAuC1B"}
@@ -117,14 +117,16 @@ class ProvidersValidator {
117
117
  if (!remote) {
118
118
  return;
119
119
  }
120
- const remoteRegions = (0, remote_regions_validator_1.getRegionsFromBaseUrl)(remote.baseUrl);
121
- if (remoteRegions.size != 1) {
122
- validationErrors.push({
123
- message: text_1.errors.providers.hasRegionUrls(provider.key, remote.key),
124
- reference: text_1.References.Providers,
125
- level: 'error',
126
- ...(0, utils_1.findPosition)(providerRemoteKey, manifest.yamlContentByLine)
127
- });
120
+ if (typeof remote.baseUrl !== 'undefined') {
121
+ const remoteRegions = (0, remote_regions_validator_1.getRegionsFromBaseUrl)(remote.baseUrl);
122
+ if (remoteRegions.size != 1) {
123
+ validationErrors.push({
124
+ message: text_1.errors.providers.hasRegionUrls(provider.key, remote.key),
125
+ reference: text_1.References.Providers,
126
+ level: 'error',
127
+ ...(0, utils_1.findPosition)(providerRemoteKey, manifest.yamlContentByLine)
128
+ });
129
+ }
128
130
  }
129
131
  });
130
132
  return validationErrors;
@@ -1 +1 @@
1
- {"version":3,"file":"remote-regions-validator.d.ts","sourceRoot":"","sources":["../../src/validators/remote-regions-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAmB,MAAM,UAAU,CAAC;AAIrF,qBAAa,sBACX,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;CAyCrD;AAED,eAAO,MAAM,qBAAqB,YAAa,MAAM,GAAG,OAAO,MAAM,EAAE,MAAM,CAAC,gBAM7E,CAAC;AAEF,eAAO,MAAM,YAAY,MAAO,IAAI,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,YAE1D,CAAC"}
1
+ {"version":3,"file":"remote-regions-validator.d.ts","sourceRoot":"","sources":["../../src/validators/remote-regions-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAmB,MAAM,UAAU,CAAC;AAIrF,qBAAa,sBACX,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;CA+CrD;AAED,eAAO,MAAM,qBAAqB,YAAa,MAAM,GAAG,OAAO,MAAM,EAAE,MAAM,CAAC,gBAM7E,CAAC;AAEF,eAAO,MAAM,YAAY,MAAO,IAAI,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,YAE1D,CAAC"}
@@ -15,21 +15,25 @@ class RemoteRegionsValidator {
15
15
  const validationErrors = [];
16
16
  const allRegionsToSupport = new Set();
17
17
  remotes?.forEach((remote) => {
18
- (0, exports.getRegionsFromBaseUrl)(remote.baseUrl).forEach((region) => allRegionsToSupport.add(region));
18
+ if (remote.baseUrl !== undefined) {
19
+ (0, exports.getRegionsFromBaseUrl)(remote.baseUrl).forEach((region) => allRegionsToSupport.add(region));
20
+ }
19
21
  });
20
22
  remotes?.forEach((remote) => {
21
- const regions = (0, exports.getRegionsFromBaseUrl)(remote.baseUrl);
22
- const regionsMatch = (0, exports.areSetsEqual)(allRegionsToSupport, regions);
23
- if (!regionsMatch && regions.size === 1 && !remote.storage?.inScopeEUD) {
24
- return;
25
- }
26
- else if (!regionsMatch) {
27
- validationErrors.push({
28
- message: text_1.errors.modules.remote.allRegionsNotDeclared(remote.key),
29
- reference: text_1.References.App,
30
- level: 'error',
31
- ...(0, utils_1.findPosition)(remote.key, manifest.yamlContentByLine)
32
- });
23
+ if (remote.baseUrl !== undefined) {
24
+ const regions = (0, exports.getRegionsFromBaseUrl)(remote.baseUrl);
25
+ const regionsMatch = (0, exports.areSetsEqual)(allRegionsToSupport, regions);
26
+ if (!regionsMatch && regions.size === 1 && !remote.storage?.inScopeEUD) {
27
+ return;
28
+ }
29
+ else if (!regionsMatch) {
30
+ validationErrors.push({
31
+ message: text_1.errors.modules.remote.allRegionsNotDeclared(remote.key),
32
+ reference: text_1.References.App,
33
+ level: 'error',
34
+ ...(0, utils_1.findPosition)(remote.key, manifest.yamlContentByLine)
35
+ });
36
+ }
33
37
  }
34
38
  });
35
39
  return {
@@ -0,0 +1,9 @@
1
+ import { ValidatorInterface } from './validator-interface';
2
+ import { ManifestSchema } from '../schema/manifest';
3
+ import { ManifestObject, ManifestValidationResult } from '../types';
4
+ export declare class RemotesIsUserConfigurableValidator implements ValidatorInterface<ManifestObject<ManifestSchema> | undefined, ManifestSchema> {
5
+ private validateOld;
6
+ validateNew(manifest: ManifestObject<ManifestSchema> | undefined): Promise<ManifestValidationResult<ManifestSchema>>;
7
+ validate(manifest: ManifestObject<ManifestSchema> | undefined): Promise<ManifestValidationResult<ManifestSchema>>;
8
+ }
9
+ //# sourceMappingURL=remotes-is-configurable-validator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remotes-is-configurable-validator.d.ts","sourceRoot":"","sources":["../../src/validators/remotes-is-configurable-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAmB,MAAM,UAAU,CAAC;AAKrF,qBAAa,kCACX,YAAW,kBAAkB,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,EAAE,cAAc,CAAC;YAI3E,WAAW;IAiCnB,WAAW,CACf,QAAQ,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,GACnD,OAAO,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAC;IAgE9C,QAAQ,CACZ,QAAQ,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,GACnD,OAAO,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAC;CAOrD"}
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RemotesIsUserConfigurableValidator = void 0;
4
+ const text_1 = require("../text");
5
+ const utils_1 = require("../utils");
6
+ class RemotesIsUserConfigurableValidator {
7
+ async validateOld(manifest) {
8
+ if (!manifest?.typedContent?.remotes) {
9
+ return {
10
+ success: true,
11
+ manifestObject: manifest
12
+ };
13
+ }
14
+ const remotes = manifest.typedContent.remotes;
15
+ const validationErrors = [];
16
+ remotes?.forEach((remote) => {
17
+ if (remote.baseUrl === undefined) {
18
+ validationErrors.push({
19
+ message: text_1.errors.modules.remote.baseUrlNotPresent(remote.key),
20
+ reference: text_1.References.App,
21
+ level: 'error',
22
+ ...(0, utils_1.findPosition)(remote.key, manifest.yamlContentByLine)
23
+ });
24
+ }
25
+ });
26
+ return {
27
+ success: validationErrors.length === 0,
28
+ manifestObject: manifest,
29
+ errors: validationErrors
30
+ };
31
+ }
32
+ async validateNew(manifest) {
33
+ if (!manifest?.typedContent?.remotes) {
34
+ return {
35
+ success: true,
36
+ manifestObject: manifest
37
+ };
38
+ }
39
+ const remotes = manifest.typedContent.remotes;
40
+ const validationErrors = [];
41
+ const configurableRemotesAllowed = manifest.typedContent.permissions?.configurable?.enabled ?? false;
42
+ remotes?.forEach((remote) => {
43
+ if (!configurableRemotesAllowed) {
44
+ if (remote.configurable !== undefined) {
45
+ validationErrors.push({
46
+ message: text_1.errors.modules.remote.userConfigurationPermissionsMismatch(remote.key),
47
+ reference: text_1.References.App,
48
+ level: 'error',
49
+ ...(0, utils_1.findPosition)(remote.key, manifest.yamlContentByLine)
50
+ });
51
+ }
52
+ if (remote.configurable === undefined && remote.baseUrl === undefined) {
53
+ validationErrors.push({
54
+ message: text_1.errors.modules.remote.baseUrlNotPresent(remote.key),
55
+ reference: text_1.References.App,
56
+ level: 'error',
57
+ ...(0, utils_1.findPosition)(remote.key, manifest.yamlContentByLine)
58
+ });
59
+ }
60
+ }
61
+ else {
62
+ if (remote.configurable === undefined && remote.baseUrl === undefined) {
63
+ validationErrors.push({
64
+ message: text_1.errors.modules.remote.neitherBaseUrlNorUserConfigurationPresent(remote.key),
65
+ reference: text_1.References.App,
66
+ level: 'error',
67
+ ...(0, utils_1.findPosition)(remote.key, manifest.yamlContentByLine)
68
+ });
69
+ }
70
+ else if (remote.configurable !== undefined && remote.baseUrl !== undefined) {
71
+ validationErrors.push({
72
+ message: text_1.errors.modules.remote.bothBaseUrlAndUserConfigurationPresent(remote.key),
73
+ reference: text_1.References.App,
74
+ level: 'error',
75
+ ...(0, utils_1.findPosition)(remote.key, manifest.yamlContentByLine)
76
+ });
77
+ }
78
+ }
79
+ });
80
+ return {
81
+ success: validationErrors.length === 0,
82
+ manifestObject: manifest,
83
+ errors: validationErrors
84
+ };
85
+ }
86
+ async validate(manifest) {
87
+ if (!(0, utils_1.configurableRemotesEnabled)()) {
88
+ return this.validateOld(manifest);
89
+ }
90
+ else {
91
+ return this.validateNew(manifest);
92
+ }
93
+ }
94
+ }
95
+ exports.RemotesIsUserConfigurableValidator = RemotesIsUserConfigurableValidator;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/manifest",
3
- "version": "10.4.0",
3
+ "version": "10.5.0-next.0",
4
4
  "description": "Definitions and validations of the Forge manifest",
5
5
  "main": "out/index.js",
6
6
  "scripts": {