@forge/manifest 2.6.0-next.15 → 2.6.0-next.16

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
+ ## 2.6.0-next.16
4
+
5
+ ### Minor Changes
6
+
7
+ - 218fe20: Added an optional connect.authentication property to indicate how the harmonized forge app will be authenticating with tenant API's - using "jwt" or "oauth2". If not specified it defaults to "jwt".
8
+
3
9
  ## 2.6.0-next.15
4
10
 
5
11
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"full-validation-processor.d.ts","sourceRoot":"","sources":["../../src/processor/full-validation-processor.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,qBAAa,uBAAwB,SAAQ,2BAA2B,CAAC,cAAc,CAAC;;CAevF"}
1
+ {"version":3,"file":"full-validation-processor.d.ts","sourceRoot":"","sources":["../../src/processor/full-validation-processor.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,qBAAa,uBAAwB,SAAQ,2BAA2B,CAAC,cAAc,CAAC;;CAgBvF"}
@@ -16,6 +16,7 @@ class FullValidationProcessor extends abstract_validation_processor_1.AbstractVa
16
16
  new validators_1.ConnectModulesValidator(),
17
17
  new validators_1.ResourcesValidator(),
18
18
  new validators_1.ConnectRemoteValidator(),
19
+ new validators_1.ConnectAuthenticationValidator(),
19
20
  new validators_1.PermissionsValidator(),
20
21
  new validators_1.DisplayConditionsValidator(DISPLAY_CONDITIONS_SCHEMA),
21
22
  new validators_1.ProvidersValidator()
@@ -69,6 +69,15 @@
69
69
  "description": "A key for the remote, which other modules can refer to. Must be unique within the manifest and have a maximum of 23 characters.",
70
70
  "pattern": "^[a-zA-Z0-9_-]+$",
71
71
  "maxLength": 23
72
+ },
73
+ "authentication": {
74
+ "description": "The type of authentication used to communicate with tenant APIs",
75
+ "type": "string",
76
+ "default": "jwt",
77
+ "enum": [
78
+ "jwt",
79
+ "oauth2"
80
+ ]
72
81
  }
73
82
  }
74
83
  }
@@ -58,4 +58,8 @@ export interface Connect {
58
58
  * A key for the remote, which other modules can refer to. Must be unique within the manifest and have a maximum of 23 characters.
59
59
  */
60
60
  remote?: string;
61
+ /**
62
+ * The type of authentication used to communicate with tenant APIs
63
+ */
64
+ authentication?: 'jwt' | 'oauth2';
61
65
  }
@@ -69,6 +69,15 @@
69
69
  "description": "A key for the remote, which other modules can refer to. Must be unique within the manifest and have a maximum of 23 characters.",
70
70
  "pattern": "^[a-zA-Z0-9_-]+$",
71
71
  "maxLength": 23
72
+ },
73
+ "authentication": {
74
+ "description": "The type of authentication used to communicate with tenant APIs",
75
+ "type": "string",
76
+ "default": "jwt",
77
+ "enum": [
78
+ "jwt",
79
+ "oauth2"
80
+ ]
72
81
  }
73
82
  }
74
83
  }
@@ -124,6 +124,10 @@ export interface Connect {
124
124
  * A key for the remote, which other modules can refer to. Must be unique within the manifest and have a maximum of 23 characters.
125
125
  */
126
126
  remote?: string;
127
+ /**
128
+ * The type of authentication used to communicate with tenant APIs
129
+ */
130
+ authentication?: 'jwt' | 'oauth2';
127
131
  }
128
132
  export interface ConnectModules {
129
133
  lifecycle?: [
@@ -69,6 +69,7 @@ export declare const errors: {
69
69
  app: {
70
70
  missingAppConnectRemote: () => string;
71
71
  missingRemoteForConnect: (key: string) => string;
72
+ missingConnectModules: () => string;
72
73
  };
73
74
  };
74
75
  export declare enum References {
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/text/errors.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM;8BACS,MAAM,KAAG,MAAM;2BACpB,MAAM;yBAE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;mCAIf,MAAM,EAAE,KAAG,MAAM;;;oCAIhB,MAAM,KAAG,MAAM;;oCAEjB,MAAM,SAAS,MAAM,KAAG,MAAM;qCAI7B,MAAM,YAAY,MAAM,KAAG,MAAM;;;;;mCAQ/B,MAAM,OAAO,MAAM,KAAG,MAAM;iCAE9B,MAAM,OAAO,MAAM,KAAG,MAAM;oCAEzB,MAAM,OAAO,MAAM,KAAG,MAAM;gDAEhB,MAAM,KAAG,MAAM;uCAExB,MAAM,KAAG,MAAM;;;;;;;;kCAQpB,MAAM,UAAU,MAAM,KAAG,MAAM;gCAEjC,MAAM,KAAG,MAAM;2CAEJ,MAAM,eAAe,MAAM,KAAG,MAAM;;;uCAI1C,MAAM;uCAEJ,MAAM,KAAG,MAAM;qCAEnB,MAAM;;CAGpC,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,mBAAmB,0BAA0B;IAC7C,SAAS,4BAA4B;IACrC,SAAS,4BAA4B;IACrC,UAAU,wBAAwB;IAClC,GAAG,8BAA8B;CAClC"}
@@ -80,7 +80,8 @@ exports.errors = {
80
80
  },
81
81
  app: {
82
82
  missingAppConnectRemote: () => `missing app.connect.remote. app.connect.remote is required if connectModules are present.`,
83
- missingRemoteForConnect: (key) => `no remote found with key '${key}' matching app.connect.remote value.`
83
+ missingRemoteForConnect: (key) => `no remote found with key '${key}' matching app.connect.remote value.`,
84
+ missingConnectModules: () => 'Missing connectModules. When app.connect.authentication is present, connectModules is required.'
84
85
  }
85
86
  };
86
87
  var References;
@@ -0,0 +1,7 @@
1
+ import { ValidatorInterface } from './validator-interface';
2
+ import { ManifestObject, ManifestValidationResult } from '../types';
3
+ import { ManifestSchema } from '../schema/manifest';
4
+ export declare class ConnectAuthenticationValidator implements ValidatorInterface<ManifestObject<ManifestSchema> | undefined, ManifestSchema> {
5
+ validate(manifest: ManifestObject<ManifestSchema> | undefined): ManifestValidationResult<ManifestSchema>;
6
+ }
7
+ //# sourceMappingURL=connect-authentication-validator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connect-authentication-validator.d.ts","sourceRoot":"","sources":["../../src/validators/connect-authentication-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAmB,MAAM,UAAU,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIpD,qBAAa,8BACX,YAAW,kBAAkB,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,EAAE,cAAc,CAAC;IACzF,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,GAAG,wBAAwB,CAAC,cAAc,CAAC;CA0BzG"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConnectAuthenticationValidator = void 0;
4
+ const text_1 = require("../text");
5
+ const utils_1 = require("../utils");
6
+ class ConnectAuthenticationValidator {
7
+ validate(manifest) {
8
+ var _a, _b;
9
+ if (!((_a = manifest === null || manifest === void 0 ? void 0 : manifest.typedContent) === null || _a === void 0 ? void 0 : _a.app)) {
10
+ return {
11
+ success: false,
12
+ manifestObject: manifest
13
+ };
14
+ }
15
+ const app = manifest.typedContent.app;
16
+ const validationErrors = [];
17
+ if (!manifest.typedContent.connectModules && ((_b = app === null || app === void 0 ? void 0 : app.connect) === null || _b === void 0 ? void 0 : _b.authentication)) {
18
+ validationErrors.push(Object.assign({ message: text_1.errors.app.missingConnectModules(), reference: text_1.References.App, level: 'error' }, utils_1.findPosition('connect', manifest.yamlContentByLine)));
19
+ }
20
+ return {
21
+ success: validationErrors.length === 0,
22
+ manifestObject: manifest,
23
+ errors: validationErrors
24
+ };
25
+ }
26
+ }
27
+ exports.ConnectAuthenticationValidator = ConnectAuthenticationValidator;
@@ -10,4 +10,5 @@ export * from './product-trigger-scopes-validator';
10
10
  export * from './providers-validator';
11
11
  export * from './permissions-validator';
12
12
  export * from './connect-remote-validator';
13
+ export * from './connect-authentication-validator';
13
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validators/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validators/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC"}
@@ -13,3 +13,4 @@ tslib_1.__exportStar(require("./product-trigger-scopes-validator"), exports);
13
13
  tslib_1.__exportStar(require("./providers-validator"), exports);
14
14
  tslib_1.__exportStar(require("./permissions-validator"), exports);
15
15
  tslib_1.__exportStar(require("./connect-remote-validator"), exports);
16
+ tslib_1.__exportStar(require("./connect-authentication-validator"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/manifest",
3
- "version": "2.6.0-next.15",
3
+ "version": "2.6.0-next.16",
4
4
  "description": "Definitions and validations of the Forge manifest",
5
5
  "main": "out/index.js",
6
6
  "scripts": {