npm package diff
Package: @forge/manifest
Versions: 9.3.0-next.3 - 9.3.0-next.4
Added: package/out/utils/scopes.js
Added: package/out/utils/scopes.d.ts.map
Added: package/out/utils/scopes.d.ts
Modified: package/out/text/errors.js
Index: package/out/text/errors.js
===================================================================
--- package/out/text/errors.js
+++ package/out/text/errors.js
@@ -35,9 +35,10 @@
missingRemotePermissionFromScope: (scope, key) => `Remote: '${key}' requires '${scope}' scope.`,
deprecatedPermission: (element, value) => `There are deprecated scopes '${element}' in the manifest.yml file: '${value.join(', ')}'. You need to update this app to use new scopes and remove the deprecated scopes. Learn more at: https://go.atlassian.com/forge-permissions.`,
globalUrlNotRecommended: (element) => `Global URL usage detected for '${element}' permission in the manifest.yml file. We recommend using a more specific URL.`,
imageUrlNotRecommended: (element, value) => `Unnecessary URL detected for '${element}' permission in the manifest.yml file. Your app should not need the URL '${value}' to work properly.`,
- fontAndStylesNotRecommended: (element) => `Unnecessary usage of '${element}' permission in the manifest.yml file. You can avoid using this permission by packaging the fonts and styles with your app code.`
+ fontAndStylesNotRecommended: (element) => `Unnecessary usage of '${element}' permission in the manifest.yml file. You can avoid using this permission by packaging the fonts and styles with your app code.`,
+ malformedScope: (index) => `The scope definition at index '${index}' is malformed. Use either a string with the scope key, or an object with the scope key as the only key`
},
connectModules: {
invalidConnectModule: (module) => `invalid value '${module}' in connectModules`,
duplicateLifecycleFound: (module) => `'${module}' should contain only one element`
Modified: package/out/scopes/index.js
Index: package/out/scopes/index.js
===================================================================
--- package/out/scopes/index.js
+++ package/out/scopes/index.js
@@ -1,22 +1,24 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getScopesWithInteractiveConsent = exports.getMissingScopes = void 0;
const tslib_1 = require("tslib");
+const scopes_1 = require("../utils/scopes");
const shipyard_scopes_with_interactive_consent_json_1 = tslib_1.__importDefault(require("./shipyard-scopes-with-interactive-consent.json"));
async function getMissingScopes(existing, required) {
if (!existing?.length) {
return required.current;
}
if (required.current.length === 0)
return [];
- const missingCurrent = required.current.filter((scope) => !existing?.includes(scope));
+ const existingScopeKeys = existing ? (0, scopes_1.getAllScopeKeys)(existing) : undefined;
+ const missingCurrent = required.current.filter((scope) => !existingScopeKeys?.includes(scope));
if (missingCurrent.length === 0)
return [];
- const missingBeta = required.beta?.filter((scope) => !existing?.includes(scope));
+ const missingBeta = required.beta?.filter((scope) => !existingScopeKeys?.includes(scope));
if (required.beta && missingBeta?.length === 0)
return [];
- const missingDeprecated = required.deprecated?.filter((scope) => !existing?.includes(scope));
+ const missingDeprecated = required.deprecated?.filter((scope) => !existingScopeKeys?.includes(scope));
if (required.deprecated && missingDeprecated?.length === 0)
return [];
return missingCurrent;
}
Modified: package/out/validators/modules-validator.js
Index: package/out/validators/modules-validator.js
===================================================================
--- package/out/validators/modules-validator.js
+++ package/out/validators/modules-validator.js
@@ -19,8 +19,9 @@
const validate_full_page_1 = require("./modules-validators/jira/validate-full-page");
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 scopes_1 = require("../utils/scopes");
class ModulesValidator {
functionHandlerRegex = /^([\p{Alpha}\d_-]+(?:\/[\p{Alpha}\d_-]+)*)\.([\p{Alpha}\d_-]+)$/u;
async validate(manifest) {
if (!manifest?.typedContent || !manifest.filePath) {
@@ -131,8 +132,9 @@
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) {
@@ -168,9 +170,9 @@
level: 'error',
...(0, utils_1.findPosition)(endpoint.remote, yamlContentByLine)
});
}
- if (endpoint.auth?.appUserToken?.enabled && !scopes.includes(types_1.USER_TOKEN_SCOPE)) {
+ 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',
@@ -179,9 +181,9 @@
},
...(0, utils_1.findPosition)('scopes', yamlContentByLine)
});
}
- if (endpoint.auth?.appSystemToken?.enabled && !scopes.includes(types_1.SYSTEM_TOKEN_SCOPE)) {
+ 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',
@@ -203,9 +205,9 @@
});
}
});
remotes?.forEach((remote) => {
- if (remote.auth?.appUserToken?.enabled && !scopes.includes(types_1.USER_TOKEN_SCOPE)) {
+ 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',
@@ -214,9 +216,9 @@
},
...(0, utils_1.findPosition)('scopes', yamlContentByLine)
});
}
- if (remote.auth?.appSystemToken?.enabled && !scopes.includes(types_1.SYSTEM_TOKEN_SCOPE)) {
+ 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',
Modified: package/out/validators/permissions-validator.js
Index: package/out/validators/permissions-validator.js
===================================================================
--- package/out/validators/permissions-validator.js
+++ package/out/validators/permissions-validator.js
@@ -7,8 +7,9 @@
const egress_types_1 = require("../types/egress-types");
const url_1 = require("url");
const shipyard_scopes_json_1 = tslib_1.__importDefault(require("../scopes/shipyard-scopes.json"));
const deprecated_shipyard_scopes_json_1 = tslib_1.__importDefault(require("../scopes/deprecated-shipyard-scopes.json"));
+const scopes_1 = require("../utils/scopes");
class PermissionsValidator {
isValidURL(inputURL) {
const protocolRegex = /^(.*?:\/\/)/;
const validURI = /^(\*\.)?[.a-zA-Z0-9_\-\/:~#%?=&]+$/;
@@ -97,9 +98,9 @@
};
}
const errors = [];
const ALL_SCOPES = shipyard_scopes_json_1.default.concat(deprecated_shipyard_scopes_json_1.default);
- const invalidScopes = manifest.typedContent.permissions.scopes?.filter((key) => !ALL_SCOPES.includes(key));
+ const invalidScopes = (0, scopes_1.getAllScopeKeys)(manifest.typedContent.permissions.scopes ?? []).filter((scope) => !ALL_SCOPES.includes(scope));
if (invalidScopes?.length) {
this.addValidationErrors(errors, 'scopes', invalidScopes, manifest);
}
const invalidScripts = manifest.typedContent.permissions.content?.scripts?.filter((key) => !egress_types_1.EGRESS_TYPES.ALLOWED_CSP_TYPES.includes(key) && !this.isValidHash(key));
Modified: package/out/validators/remote-auth-scopes-validator.js
Index: package/out/validators/remote-auth-scopes-validator.js
===================================================================
--- package/out/validators/remote-auth-scopes-validator.js
+++ package/out/validators/remote-auth-scopes-validator.js
@@ -3,8 +3,9 @@
exports.RemoteAuthScopesValidator = void 0;
const types_1 = require("../types");
const text_1 = require("../text");
const utils_1 = require("../utils");
+const scopes_1 = require("../utils/scopes");
class RemoteAuthScopesValidator {
async validate(manifest) {
if (!manifest?.typedContent?.remotes && !manifest?.typedContent?.modules?.endpoint) {
return {
@@ -18,9 +19,9 @@
remotes?.some((remote) => this.appUserTokenEnabled(remote.auth));
const hasAppSystemToken = endpoints.some((endpoint) => this.appSystemTokenEnabled(endpoint.auth)) ||
remotes?.some((remote) => this.appSystemTokenEnabled(remote.auth));
if (hasAppUserToken || hasAppSystemToken) {
- const scopes = manifest.typedContent.permissions?.scopes ?? [];
+ const scopes = (0, scopes_1.getAllScopeKeys)(manifest.typedContent.permissions?.scopes ?? []);
const filteredScopes = scopes.filter((scope) => !types_1.REMOTE_AUTH_SCOPES.includes(scope));
if (filteredScopes.length === 0) {
return {
success: false,
Modified: package/out/validators/modules-validators/validateModuleScopes.js
Index: package/out/validators/modules-validators/validateModuleScopes.js
===================================================================
--- package/out/validators/modules-validators/validateModuleScopes.js
+++ package/out/validators/modules-validators/validateModuleScopes.js
@@ -3,11 +3,12 @@
exports.validateModuleScopes = void 0;
const text_1 = require("../../text");
const utils_1 = require("../../utils");
const module_to_scope_mapping_1 = require("../../mapping/module-to-scope-mapping");
+const scopes_1 = require("../../utils/scopes");
const validateModuleScopes = (modules, yamlContentByLine, permissions) => {
const validationErrors = [];
- const scopes = permissions?.scopes || [];
+ const scopes = (0, scopes_1.getAllScopeKeys)(permissions?.scopes ?? []);
module_to_scope_mapping_1.MODULE_TO_SCOPES_MAPPING.forEach((requiredScopes, moduleType) => {
const modulesToValidate = modules[moduleType];
if (modulesToValidate) {
if (!requiredScopes.every((s) => scopes.includes(s))) {
Modified: package/out/schema/manifest-schema.json
Large diffs are not rendered by default.
Modified: package/package.json
Index: package/package.json
===================================================================
--- package/package.json
+++ package/package.json
@@ -1,7 +1,7 @@
{
"name": "@forge/manifest",
- "version": "9.3.0-next.3",
+ "version": "9.3.0-next.4",
"description": "Definitions and validations of the Forge manifest",
"main": "out/index.js",
"scripts": {
"build": "yarn run compile",
Modified: package/out/text/errors.d.ts.map
Index: package/out/text/errors.d.ts.map
===================================================================
--- package/out/text/errors.d.ts.map
+++ package/out/text/errors.d.ts.map
@@ -1,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,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KX,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;;;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"}
\ No newline at end of file
Modified: package/out/scopes/index.d.ts.map
Index: package/out/scopes/index.d.ts.map
===================================================================
--- package/out/scopes/index.d.ts.map
+++ package/out/scopes/index.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/scopes/index.ts"],"names":[],"mappings":"AAEA,oBAAY,cAAc,GAAG;IAC3B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB,CAAC;AAEF,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,QAAQ,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAoBlH;AAED,wBAAgB,+BAA+B,IAAI,GAAG,CAAC,MAAM,CAAC,CAE7D"}
\ No newline at end of file
+{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/scopes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAI5C,oBAAY,cAAc,GAAG;IAC3B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB,CAAC;AAEF,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAsBhH;AAED,wBAAgB,+BAA+B,IAAI,GAAG,CAAC,MAAM,CAAC,CAE7D"}
\ No newline at end of file
Modified: package/out/validators/modules-validator.d.ts.map
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,EAAkB,cAAc,EAA+C,MAAM,oBAAoB,CAAC;AACjH,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAqB3D,qBAAa,gBACX,YAAW,kBAAkB,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,EAAE,cAAc,CAAC;IAGzF,OAAO,CAAC,oBAAoB,CAAsE;IAE5F,QAAQ,CACZ,QAAQ,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,GACnD,OAAO,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAC;IA4DpD,OAAO,CAAC,uBAAuB;IAO/B,OAAO,CAAC,iBAAiB;IAkBzB,OAAO,CAAC,4BAA4B;IAapC,OAAO,CAAC,uBAAuB;IAe/B,OAAO,CAAC,uBAAuB;IAiB/B,OAAO,CAAC,4BAA4B;IA0BpC,OAAO,CAAC,mBAAmB;IA6H3B,OAAO,CAAC,4BAA4B;IA2BpC,OAAO,CAAC,yBAAyB;CAkClC"}
\ No newline at end of file
+{"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,oBAAoB,CAAC;AAC5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAsB3D,qBAAa,gBACX,YAAW,kBAAkB,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,EAAE,cAAc,CAAC;IAGzF,OAAO,CAAC,oBAAoB,CAAsE;IAE5F,QAAQ,CACZ,QAAQ,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,GACnD,OAAO,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAC;IA4DpD,OAAO,CAAC,uBAAuB;IAO/B,OAAO,CAAC,iBAAiB;IAkBzB,OAAO,CAAC,4BAA4B;IAapC,OAAO,CAAC,uBAAuB;IAe/B,OAAO,CAAC,uBAAuB;IAiB/B,OAAO,CAAC,4BAA4B;IA0BpC,OAAO,CAAC,mBAAmB;IA+H3B,OAAO,CAAC,4BAA4B;IA2BpC,OAAO,CAAC,yBAAyB;CAkClC"}
\ No newline at end of file
Modified: package/out/validators/permissions-validator.d.ts.map
Index: package/out/validators/permissions-validator.d.ts.map
===================================================================
--- package/out/validators/permissions-validator.d.ts.map
+++ package/out/validators/permissions-validator.d.ts.map
@@ -1,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;AAM3D,qBAAa,oBACX,YAAW,kBAAkB,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,EAAE,cAAc,CAAC;IAEzF,OAAO,CAAC,UAAU;IA+BlB,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;CA8HrD"}
\ No newline at end of file
+{"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,qBAAa,oBACX,YAAW,kBAAkB,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,EAAE,cAAc,CAAC;IAEzF,OAAO,CAAC,UAAU;IA+BlB,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;CAiIrD"}
\ No newline at end of file
Modified: package/out/validators/remote-auth-scopes-validator.d.ts.map
Index: package/out/validators/remote-auth-scopes-validator.d.ts.map
===================================================================
--- package/out/validators/remote-auth-scopes-validator.d.ts.map
+++ package/out/validators/remote-auth-scopes-validator.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"remote-auth-scopes-validator.d.ts","sourceRoot":"","sources":["../../src/validators/remote-auth-scopes-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAsB,MAAM,UAAU,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAapD,qBAAa,yBACX,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;IA4CpD,OAAO,CAAC,mBAAmB,CAA+D;IAC1F,OAAO,CAAC,qBAAqB,CAAiE;CAC/F"}
\ No newline at end of file
+{"version":3,"file":"remote-auth-scopes-validator.d.ts","sourceRoot":"","sources":["../../src/validators/remote-auth-scopes-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAsB,MAAM,UAAU,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAcpD,qBAAa,yBACX,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;IA4CpD,OAAO,CAAC,mBAAmB,CAA+D;IAC1F,OAAO,CAAC,qBAAqB,CAAiE;CAC/F"}
\ No newline at end of file
Modified: package/out/validators/modules-validators/validateModuleScopes.d.ts.map
Index: package/out/validators/modules-validators/validateModuleScopes.d.ts.map
===================================================================
--- package/out/validators/modules-validators/validateModuleScopes.d.ts.map
+++ package/out/validators/modules-validators/validateModuleScopes.d.ts.map
@@ -1,1 +1,1 @@
-{"version":3,"file":"validateModuleScopes.d.ts","sourceRoot":"","sources":["../../../src/validators/modules-validators/validateModuleScopes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAU9C,eAAO,MAAM,oBAAoB,YACtB,OAAO,sBACI,MAAM,EAAE,gBACd,WAAW,KACxB,eAAe,EAoBjB,CAAC"}
\ No newline at end of file
+{"version":3,"file":"validateModuleScopes.d.ts","sourceRoot":"","sources":["../../../src/validators/modules-validators/validateModuleScopes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAW9C,eAAO,MAAM,oBAAoB,YACtB,OAAO,sBACI,MAAM,EAAE,gBACd,WAAW,KACxB,eAAe,EAoBjB,CAAC"}
\ No newline at end of file
Modified: package/CHANGELOG.md
Index: package/CHANGELOG.md
===================================================================
--- package/CHANGELOG.md
+++ package/CHANGELOG.md
@@ -1,6 +1,12 @@
# @forge/manifest
+## 9.3.0-next.4
+
+### Minor Changes
+
+- 43832a8: Allow scopes to be declared with offline user impersonation support
+
## 9.3.0-next.3
### Patch Changes
Modified: package/out/text/errors.d.ts
Index: package/out/text/errors.d.ts
===================================================================
--- package/out/text/errors.d.ts
+++ package/out/text/errors.d.ts
@@ -24,8 +24,9 @@
deprecatedPermission: (element: string, value: string[]) => string;
globalUrlNotRecommended: (element: string) => string;
imageUrlNotRecommended: (element: string, value: string) => string;
fontAndStylesNotRecommended: (element: string) => string;
+ malformedScope: (index: number) => string;
};
connectModules: {
invalidConnectModule: (module: string) => string;
duplicateLifecycleFound: (module: string) => string;
Modified: package/out/scopes/index.d.ts
Index: package/out/scopes/index.d.ts
===================================================================
--- package/out/scopes/index.d.ts
+++ package/out/scopes/index.d.ts
@@ -1,8 +1,9 @@
+import { Scopes } from '../schema/manifest';
export declare type RequiredScopes = {
current: string[];
deprecated?: string[];
beta?: string[];
};
-export declare function getMissingScopes(existing: string[] | undefined, required: RequiredScopes): Promise<string[]>;
+export declare function getMissingScopes(existing: Scopes | undefined, required: RequiredScopes): Promise<string[]>;
export declare function getScopesWithInteractiveConsent(): Set<string>;
//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
Modified: package/out/schema/manifest.d.ts
Large diffs are not rendered by default.