@forge/manifest

11.3.3-next.011.4.0-next.1
~

Modified (7 files)

Index: package/out/types/constants.js
===================================================================
--- package/out/types/constants.js
+++ package/out/types/constants.js
@@ -1,7 +1,5 @@
 "use strict";
 Object.defineProperty(exports, "__esModule", { value: true });
-exports.REMOTE_AUTH_SCOPES = exports.USER_TOKEN_SCOPE = exports.SYSTEM_TOKEN_SCOPE = exports.MANIFEST_FILE = void 0;
+exports.REMOTE_AUTH_SCOPES = exports.MANIFEST_FILE = void 0;
 exports.MANIFEST_FILE = 'manifest.yml';
-exports.SYSTEM_TOKEN_SCOPE = 'read:app-system-token';
-exports.USER_TOKEN_SCOPE = 'read:app-user-token';
-exports.REMOTE_AUTH_SCOPES = [exports.SYSTEM_TOKEN_SCOPE, exports.USER_TOKEN_SCOPE];
+exports.REMOTE_AUTH_SCOPES = ['read:app-system-token', 'read:app-user-token'];
Index: package/out/validators/modules-validator.js
===================================================================
--- package/out/validators/modules-validator.js
+++ package/out/validators/modules-validator.js
@@ -21,9 +21,8 @@
 const validate_custom_field_1 = require("./modules-validators/jira/validate-custom-field");
 const validate_trigger_1 = require("./modules-validators/jira/validate-trigger");
 const validate_command_1 = require("./modules-validators/jira/validate-command");
 const validate_action_validator_1 = require("./modules-validators/jira/validate-action-validator");
-const scopes_1 = require("../utils/scopes");
 const automation_1 = require("./modules-validators/automation");
 class ModulesValidator {
     functionHandlerRegex = /^([\p{Alpha}\d_-]+(?:\/[\p{Alpha}\d_-]+)*)\.([\p{Alpha}\d_-]+)$/u;
     async validate(manifest) {
@@ -135,9 +134,8 @@
             return remotes?.find((remote) => remote.key === remoteKey) !== undefined;
         };
         const { endpoint: _endpoint } = modules;
         const eventModulesWithEndpoint = modules?.trigger?.filter((trigger) => trigger.endpoint != null) || [];
-        const scopeKeys = (0, scopes_1.getAllScopeKeys)(scopes);
         eventModulesWithEndpoint.forEach((event) => {
             const endpointModule = _endpoint?.find((remoteEndpoint) => remoteEndpoint.key === event.endpoint);
             if (endpointModule) {
                 if (endpointModule.auth?.appUserToken?.enabled) {
@@ -173,30 +171,8 @@
                         level: 'error',
                         ...(0, utils_1.findPosition)(endpoint.remote, yamlContentByLine)
                     });
                 }
-                if (endpoint.auth?.appUserToken?.enabled && !scopeKeys.includes(types_1.USER_TOKEN_SCOPE)) {
-                    validationErrors.push({
-                        message: text_1.errors.permissions.missingEndpointPermissionFromScope(types_1.USER_TOKEN_SCOPE, endpoint.key),
-                        reference: text_1.References.MissingScopes,
-                        level: 'error',
-                        metadata: {
-                            missingPermission: types_1.USER_TOKEN_SCOPE
-                        },
-                        ...(0, utils_1.findPosition)('scopes', yamlContentByLine)
-                    });
-                }
-                if (endpoint.auth?.appSystemToken?.enabled && !scopeKeys.includes(types_1.SYSTEM_TOKEN_SCOPE)) {
-                    validationErrors.push({
-                        message: text_1.errors.permissions.missingEndpointPermissionFromScope(types_1.SYSTEM_TOKEN_SCOPE, endpoint.key),
-                        reference: text_1.References.MissingScopes,
-                        level: 'error',
-                        metadata: {
-                            missingPermission: types_1.SYSTEM_TOKEN_SCOPE
-                        },
-                        ...(0, utils_1.findPosition)('scopes', yamlContentByLine)
-                    });
-                }
             }
             else if (isServiceType(endpoint)) {
                 (0, utils_1.findInvalidServiceReferences)(endpoint, services).forEach((service) => {
                     validationErrors.push({
@@ -207,32 +183,8 @@
                     });
                 });
             }
         });
-        remotes?.forEach((remote) => {
-            if (remote.auth?.appUserToken?.enabled && !scopeKeys.includes(types_1.USER_TOKEN_SCOPE)) {
-                validationErrors.push({
-                    message: text_1.errors.permissions.missingRemotePermissionFromScope(types_1.USER_TOKEN_SCOPE, remote.key),
-                    reference: text_1.References.MissingScopes,
-                    level: 'error',
-                    metadata: {
-                        missingPermission: types_1.USER_TOKEN_SCOPE
-                    },
-                    ...(0, utils_1.findPosition)('scopes', yamlContentByLine)
-                });
-            }
-            if (remote.auth?.appSystemToken?.enabled && !scopeKeys.includes(types_1.SYSTEM_TOKEN_SCOPE)) {
-                validationErrors.push({
-                    message: text_1.errors.permissions.missingRemotePermissionFromScope(types_1.SYSTEM_TOKEN_SCOPE, remote.key),
-                    reference: text_1.References.MissingScopes,
-                    level: 'error',
-                    metadata: {
-                        missingPermission: types_1.SYSTEM_TOKEN_SCOPE
-                    },
-                    ...(0, utils_1.findPosition)('scopes', yamlContentByLine)
-                });
-            }
-        });
         return validationErrors;
     }
     duplicateModuleKeyValidation(modules, connectModules, yamlContentByLine) {
         const validationErrors = [];
Index: package/package.json
===================================================================
--- package/package.json
+++ package/package.json
@@ -1,7 +1,7 @@
 {
   "name": "@forge/manifest",
-  "version": "11.3.3-next.0",
+  "version": "11.4.0-next.1",
   "description": "Definitions and validations of the Forge manifest",
   "main": "out/index.js",
   "scripts": {
     "build": "yarn run compile",
Index: package/out/types/constants.d.ts.map
===================================================================
--- package/out/types/constants.d.ts.map
+++ package/out/types/constants.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/types/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,iBAAiB,CAAC;AAE5C,eAAO,MAAM,kBAAkB,0BAA0B,CAAC;AAC1D,eAAO,MAAM,gBAAgB,wBAAwB,CAAC;AACtD,eAAO,MAAM,kBAAkB,UAAyC,CAAC"}
\ No newline at end of file
+{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/types/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,iBAAiB,CAAC;AAE5C,eAAO,MAAM,kBAAkB,UAAmD,CAAC"}
\ No newline at end of file
Index: package/out/validators/modules-validator.d.ts.map
===================================================================
--- package/out/validators/modules-validator.d.ts.map
+++ package/out/validators/modules-validator.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"modules-validator.d.ts","sourceRoot":"","sources":["../../src/validators/modules-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,EACd,wBAAwB,EAKzB,MAAM,UAAU,CAAC;AASlB,OAAO,EAEL,cAAc,EAMf,MAAM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B;IAiB/B,OAAO,CAAC,4BAA4B;IA0BpC,OAAO,CAAC,mBAAmB;IA2E3B,OAAO,CAAC,4BAA4B;IA2BpC,OAAO,CAAC,yBAAyB;CAkClC"}
\ No newline at end of file
File too large for inline diff
Index: package/out/types/constants.d.ts
===================================================================
--- package/out/types/constants.d.ts
+++ package/out/types/constants.d.ts
@@ -1,5 +1,3 @@
 export declare const MANIFEST_FILE = "manifest.yml";
-export declare const SYSTEM_TOKEN_SCOPE = "read:app-system-token";
-export declare const USER_TOKEN_SCOPE = "read:app-user-token";
 export declare const REMOTE_AUTH_SCOPES: string[];
 //# sourceMappingURL=constants.d.ts.map
\ No newline at end of file