@forge/manifest 7.10.0-next.3 → 7.10.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.10.0-next.4
4
+
5
+ ### Minor Changes
6
+
7
+ - 51dc2a8: Add support for remotes with regional urls
8
+
3
9
  ## 7.10.0-next.3
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":"AAmBA,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAMpD,qBAAa,uBAAwB,SAAQ,2BAA2B,CAAC,cAAc,CAAC;;CAwBvF"}
1
+ {"version":3,"file":"full-validation-processor.d.ts","sourceRoot":"","sources":["../../src/processor/full-validation-processor.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAOpD,qBAAa,uBAAwB,SAAQ,2BAA2B,CAAC,cAAc,CAAC;;CAyBvF"}
@@ -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 remote_regions_validator_1 = require("../validators/remote-regions-validator");
13
14
  class FullValidationProcessor extends abstract_validation_processor_1.AbstractValidationProcessor {
14
15
  constructor() {
15
16
  super([
@@ -31,7 +32,8 @@ class FullValidationProcessor extends abstract_validation_processor_1.AbstractVa
31
32
  new validators_1.PackageValidator(),
32
33
  new app_features_validator_1.AppFeaturesValidator(),
33
34
  new data_classification_validator_1.DataClassificationValidator(),
34
- new validators_1.TranslationsValidator()
35
+ new validators_1.TranslationsValidator(),
36
+ new remote_regions_validator_1.RemoteRegionsValidator()
35
37
  ]);
36
38
  }
37
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"remote-compute-validation-processor.d.ts","sourceRoot":"","sources":["../../src/processor/remote-compute-validation-processor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,qBAAa,gCAAiC,SAAQ,2BAA2B,CAAC,cAAc,CAAC;;CAShG"}
1
+ {"version":3,"file":"remote-compute-validation-processor.d.ts","sourceRoot":"","sources":["../../src/processor/remote-compute-validation-processor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIpD,qBAAa,gCAAiC,SAAQ,2BAA2B,CAAC,cAAc,CAAC;;CAUhG"}
@@ -5,12 +5,14 @@ const tslib_1 = require("tslib");
5
5
  const validators_1 = require("../validators");
6
6
  const abstract_validation_processor_1 = require("./abstract-validation-processor");
7
7
  const FULL_SCHEMA = tslib_1.__importStar(require("../schema/manifest-schema.json"));
8
+ const remote_regions_validator_1 = require("../validators/remote-regions-validator");
8
9
  class RemoteComputeValidationProcessor extends abstract_validation_processor_1.AbstractValidationProcessor {
9
10
  constructor() {
10
11
  super([
11
12
  new validators_1.FileValidator(),
12
13
  new validators_1.YamlValidator(),
13
14
  new validators_1.SchemaValidator(FULL_SCHEMA),
15
+ new remote_regions_validator_1.RemoteRegionsValidator(),
14
16
  new validators_1.ModulesValidator()
15
17
  ]);
16
18
  }
@@ -110,6 +110,7 @@ export declare const errors: {
110
110
  };
111
111
  remote: {
112
112
  missingModuleRemoteStorageInScopeEUD: (key: string) => string;
113
+ allRegionsNotDeclared: (key: string) => string;
113
114
  };
114
115
  rovo: {
115
116
  incorrectAgentActionReference: (module: string, moduleKey: string) => string;
@@ -134,6 +135,7 @@ export declare const errors: {
134
135
  missingRemote: (provider: string, remote: string) => string;
135
136
  missingEgress: (remote: string) => string;
136
137
  missingProfileFunction: (provider: string, functionKey: string) => string;
138
+ hasRegionUrls: (provider: string, remote: string) => string;
137
139
  };
138
140
  app: {
139
141
  missingAppConnectRemote: () => 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,MAAM,KAAG,MAAM;4BAEtC,MAAM,EAAE,GAAG,SAAS,KAAG,MAAM;+CAIV,MAAM;6CACR,MAAM,gBAAgB,MAAM;qCAEpC,MAAM;2CACA,MAAM;6CACJ,MAAM;;;qCAGd,MAAM,SAAS,MAAM,KAAG,MAAM;4CAEvB,MAAM,SAAS,MAAM,KAAG,MAAM;oDAEtB,MAAM,OAAO,MAAM,KAAG,MAAM;kDAE9B,MAAM,OAAO,MAAM,KAAG,MAAM;wCAEtC,MAAM,SAAS,MAAM,EAAE,KAAG,MAAM;;;uCAMjC,MAAM,KAAG,MAAM;0CACZ,MAAM,KAAG,MAAM;;;gCAGzB,MAAM,KAAG,MAAM;6BACpB,MAAM;+BACJ,MAAM;iCACF,MAAM,KAAG,MAAM;yCACP,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AAM;gDAE1B,MAAM,aAAa,MAAM,KAAG,MAAM;4CAEtC,MAAM,SAAS,MAAM,KAAG,MAAM;;;2CAI7B,MAAM;;;gCAInB,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;;CAG7G,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;IACjC,eAAe,0BAA0B;CAC1C"}
@@ -121,7 +121,8 @@ exports.errors = {
121
121
  endpointNeedsRoute: (productEventKey, endpointModuleKey) => `Trigger module: '${productEventKey}' using remote endpoint: '${endpointModuleKey}' requires 'route' parameter.`
122
122
  },
123
123
  remote: {
124
- missingModuleRemoteStorageInScopeEUD: (key) => `missing storage.inScopeEUD in ${key} module. storage.inScopeEUD is required if storage is present in operations.`
124
+ missingModuleRemoteStorageInScopeEUD: (key) => `missing storage.inScopeEUD in ${key} module. storage.inScopeEUD is required if storage is present in operations.`,
125
+ allRegionsNotDeclared: (key) => `All region specific URLs are not declared for ${key}`
125
126
  },
126
127
  rovo: {
127
128
  incorrectAgentActionReference: (module, moduleKey) => `${module} references undefined action module with key '${moduleKey}'.`,
@@ -145,7 +146,8 @@ exports.errors = {
145
146
  providers: {
146
147
  missingRemote: (provider, remote) => `missing remote '${remote}' is being referenced by '${provider}' in providers`,
147
148
  missingEgress: (remote) => `missing egress permissions for remote '${remote}'. Please add the remote to permissions.fetch`,
148
- missingProfileFunction: (provider, functionKey) => `missing function '${functionKey}' is being referenced by '${provider}' in providers`
149
+ missingProfileFunction: (provider, functionKey) => `missing function '${functionKey}' is being referenced by '${provider}' in providers`,
150
+ hasRegionUrls: (provider, remote) => `External Authentication Provider does not support region specific URLs. The '${provider}' provider's remote '${remote}' contains region specific URLs.`
149
151
  },
150
152
  app: {
151
153
  missingAppConnectRemote: () => `missing app.connect.remote. app.connect.remote is required if connectModules are present.`,
@@ -5,5 +5,6 @@ export declare class ProvidersValidator implements ValidatorInterface<ManifestOb
5
5
  validate(manifest: ManifestObject<ManifestSchema> | undefined): Promise<ManifestValidationResult<ManifestSchema>>;
6
6
  private isActionValidRemote;
7
7
  private isValidProfileRetrieverFunction;
8
+ private isValidAuthRemote;
8
9
  }
9
10
  //# sourceMappingURL=providers-validator.d.ts.map
@@ -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;AAE3D,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;IA0EpD,OAAO,CAAC,mBAAmB;IAiB3B,OAAO,CAAC,+BAA+B;CAiBxC"}
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"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ProvidersValidator = void 0;
4
4
  const utils_1 = require("../utils");
5
5
  const text_1 = require("../text");
6
+ const remote_regions_validator_1 = require("./remote-regions-validator");
6
7
  class ProvidersValidator {
7
8
  async validate(manifest) {
8
9
  if (!manifest || !manifest.typedContent || !manifest.typedContent.providers) {
@@ -11,7 +12,7 @@ class ProvidersValidator {
11
12
  manifestObject: manifest
12
13
  };
13
14
  }
14
- const validationErrors = [];
15
+ let validationErrors = [];
15
16
  const auth = manifest.typedContent.providers.auth;
16
17
  const remotes = manifest.typedContent.remotes;
17
18
  const permissions = manifest.typedContent.permissions;
@@ -60,6 +61,9 @@ class ProvidersValidator {
60
61
  validationErrors.push(message);
61
62
  }
62
63
  });
64
+ auth?.forEach((provider) => {
65
+ validationErrors = [...validationErrors, ...this.isValidAuthRemote(provider, manifest, remotes)];
66
+ });
63
67
  return {
64
68
  success: validationErrors.length === 0,
65
69
  errors: validationErrors
@@ -90,5 +94,32 @@ class ProvidersValidator {
90
94
  }
91
95
  }
92
96
  }
97
+ isValidAuthRemote(provider, manifest, remotes) {
98
+ const validationErrors = [];
99
+ const referencedRemotes = [...(provider.remotes || [])];
100
+ if ('actions' in provider) {
101
+ referencedRemotes.push(provider.actions.retrieveProfile.remote);
102
+ referencedRemotes.push(provider.actions.exchange.remote);
103
+ referencedRemotes.push(provider.actions.authorization.remote);
104
+ provider.actions.revokeToken && referencedRemotes.push(provider.actions.revokeToken.remote);
105
+ provider.actions.refreshToken && referencedRemotes.push(provider.actions.refreshToken.remote);
106
+ }
107
+ referencedRemotes?.forEach((providerRemoteKey) => {
108
+ const remote = remotes?.find((remote) => remote.key === providerRemoteKey);
109
+ if (!remote) {
110
+ return;
111
+ }
112
+ const remoteRegions = (0, remote_regions_validator_1.getRegionsFromBaseUrl)(remote.baseUrl);
113
+ if (remoteRegions.size != 1) {
114
+ validationErrors.push({
115
+ message: text_1.errors.providers.hasRegionUrls(provider.key, remote.key),
116
+ reference: text_1.References.Providers,
117
+ level: 'error',
118
+ ...(0, utils_1.findPosition)(providerRemoteKey, manifest.yamlContentByLine)
119
+ });
120
+ }
121
+ });
122
+ return validationErrors;
123
+ }
93
124
  }
94
125
  exports.ProvidersValidator = ProvidersValidator;
@@ -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 RemoteRegionsValidator implements ValidatorInterface<ManifestObject<ManifestSchema> | undefined, ManifestSchema> {
5
+ validate(manifest: ManifestObject<ManifestSchema> | undefined): Promise<ManifestValidationResult<ManifestSchema>>;
6
+ }
7
+ export declare const getRegionsFromBaseUrl: (baseUrl: string | Record<string, string>) => Set<string>;
8
+ export declare const areSetsEqual: (a: Set<string>, b: Set<string>) => boolean;
9
+ //# sourceMappingURL=remote-regions-validator.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.areSetsEqual = exports.getRegionsFromBaseUrl = exports.RemoteRegionsValidator = void 0;
4
+ const text_1 = require("../text");
5
+ const utils_1 = require("../utils");
6
+ class RemoteRegionsValidator {
7
+ async validate(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
+ const allRegionsToSupport = new Set();
17
+ remotes?.forEach((remote) => {
18
+ (0, exports.getRegionsFromBaseUrl)(remote.baseUrl).forEach((region) => allRegionsToSupport.add(region));
19
+ });
20
+ 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
+ });
33
+ }
34
+ });
35
+ return {
36
+ success: validationErrors.length === 0,
37
+ manifestObject: manifest,
38
+ errors: validationErrors
39
+ };
40
+ }
41
+ }
42
+ exports.RemoteRegionsValidator = RemoteRegionsValidator;
43
+ const getRegionsFromBaseUrl = (baseUrl) => {
44
+ if (typeof baseUrl === 'string') {
45
+ return new Set(['default']);
46
+ }
47
+ else {
48
+ return new Set(Object.keys(baseUrl));
49
+ }
50
+ };
51
+ exports.getRegionsFromBaseUrl = getRegionsFromBaseUrl;
52
+ const areSetsEqual = (a, b) => {
53
+ return a.size === b.size && [...a].every((val) => b.has(val));
54
+ };
55
+ exports.areSetsEqual = areSetsEqual;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/manifest",
3
- "version": "7.10.0-next.3",
3
+ "version": "7.10.0-next.4",
4
4
  "description": "Definitions and validations of the Forge manifest",
5
5
  "main": "out/index.js",
6
6
  "scripts": {