@forge/manifest 12.3.0-next.2 → 12.3.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 +12 -0
- package/out/utils/index.d.ts +0 -1
- package/out/utils/index.d.ts.map +1 -1
- package/out/utils/index.js +0 -1
- package/out/validators/permissions-validator.d.ts.map +1 -1
- package/out/validators/permissions-validator.js +6 -18
- package/out/validators/remotes-is-configurable-validator.d.ts +1 -2
- package/out/validators/remotes-is-configurable-validator.d.ts.map +1 -1
- package/out/validators/remotes-is-configurable-validator.js +2 -32
- package/package.json +1 -1
- package/out/utils/features.d.ts +0 -3
- package/out/utils/features.d.ts.map +0 -1
- package/out/utils/features.js +0 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @forge/manifest
|
|
2
2
|
|
|
3
|
+
## 12.3.0-next.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 6581f58: Update manifest definitions
|
|
8
|
+
|
|
9
|
+
## 12.3.0-next.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 06fc76b: Removing `ENABLE_CONFIGURABLE_REMOTES` environment variable in advance of Preview
|
|
14
|
+
|
|
3
15
|
## 12.3.0-next.2
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/out/utils/index.d.ts
CHANGED
|
@@ -4,6 +4,5 @@ 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';
|
|
8
7
|
export * from './i18n';
|
|
9
8
|
//# sourceMappingURL=index.d.ts.map
|
package/out/utils/index.d.ts.map
CHANGED
|
@@ -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,
|
|
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"}
|
package/out/utils/index.js
CHANGED
|
@@ -6,5 +6,4 @@ 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);
|
|
10
9
|
tslib_1.__exportStar(require("./i18n"), exports);
|
|
@@ -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;
|
|
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,0BAA0B;IAQlC,OAAO,CAAC,UAAU;IAwClB,OAAO,CAAC,WAAW;IAUnB,OAAO,CAAC,gBAAgB;IAaxB,OAAO,CAAC,mBAAmB;IAgB3B,OAAO,CAAC,8BAA8B;IA2DhC,QAAQ,CACZ,QAAQ,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,GACnD,OAAO,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAC;CAkMrD"}
|
|
@@ -9,7 +9,6 @@ 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");
|
|
13
12
|
exports.PROTOCOL_BLOCKLIST = [
|
|
14
13
|
'javascript:',
|
|
15
14
|
'data:',
|
|
@@ -239,25 +238,14 @@ class PermissionsValidator {
|
|
|
239
238
|
}
|
|
240
239
|
});
|
|
241
240
|
const remoteMap = manifest.typedContent.remotes?.reduce((prev, item) => {
|
|
242
|
-
if (
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
return prev.set(item.key, baseUrl);
|
|
246
|
-
}
|
|
247
|
-
if (!item.baseUrl && item?.configurable) {
|
|
248
|
-
return prev.set(item.key, null);
|
|
249
|
-
}
|
|
250
|
-
return prev;
|
|
241
|
+
if (item.baseUrl) {
|
|
242
|
+
const baseUrl = typeof item.baseUrl === 'string' ? item.baseUrl : item.baseUrl.default;
|
|
243
|
+
return prev.set(item.key, baseUrl);
|
|
251
244
|
}
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
const baseUrl = typeof item.baseUrl === 'string' ? item.baseUrl : item.baseUrl.default;
|
|
255
|
-
return prev.set(item.key, baseUrl);
|
|
256
|
-
}
|
|
257
|
-
else {
|
|
258
|
-
return prev;
|
|
259
|
-
}
|
|
245
|
+
if (!item.baseUrl && item?.configurable) {
|
|
246
|
+
return prev.set(item.key, null);
|
|
260
247
|
}
|
|
248
|
+
return prev;
|
|
261
249
|
}, new Map());
|
|
262
250
|
const invalidBackendRemotes = manifest.typedContent.permissions.external?.fetch?.backend
|
|
263
251
|
?.filter((item) => typeof item === 'object' && 'remote' in item && !this.remotesHasValidEntryForKey(remoteMap, item.remote))
|
|
@@ -2,8 +2,7 @@ import { ValidatorInterface } from './validator-interface';
|
|
|
2
2
|
import { ManifestSchema } from '../schema/manifest';
|
|
3
3
|
import { ManifestObject, ManifestValidationResult } from '../types';
|
|
4
4
|
export declare class RemotesIsUserConfigurableValidator implements ValidatorInterface<ManifestObject<ManifestSchema> | undefined, ManifestSchema> {
|
|
5
|
-
|
|
6
|
-
validateNew(manifest: ManifestObject<ManifestSchema> | undefined): Promise<ManifestValidationResult<ManifestSchema>>;
|
|
5
|
+
validateRemote(manifest: ManifestObject<ManifestSchema> | undefined): Promise<ManifestValidationResult<ManifestSchema>>;
|
|
7
6
|
validate(manifest: ManifestObject<ManifestSchema> | undefined): Promise<ManifestValidationResult<ManifestSchema>>;
|
|
8
7
|
}
|
|
9
8
|
//# sourceMappingURL=remotes-is-configurable-validator.d.ts.map
|
|
@@ -1 +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;
|
|
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;IAEnF,cAAc,CAClB,QAAQ,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,GACnD,OAAO,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAC;IAgC9C,QAAQ,CACZ,QAAQ,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,GACnD,OAAO,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAC;CAGrD"}
|
|
@@ -4,32 +4,7 @@ exports.RemotesIsUserConfigurableValidator = void 0;
|
|
|
4
4
|
const text_1 = require("../text");
|
|
5
5
|
const utils_1 = require("../utils");
|
|
6
6
|
class RemotesIsUserConfigurableValidator {
|
|
7
|
-
async
|
|
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) {
|
|
7
|
+
async validateRemote(manifest) {
|
|
33
8
|
if (!manifest?.typedContent?.remotes) {
|
|
34
9
|
return {
|
|
35
10
|
success: true,
|
|
@@ -56,12 +31,7 @@ class RemotesIsUserConfigurableValidator {
|
|
|
56
31
|
};
|
|
57
32
|
}
|
|
58
33
|
async validate(manifest) {
|
|
59
|
-
|
|
60
|
-
return this.validateOld(manifest);
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
return this.validateNew(manifest);
|
|
64
|
-
}
|
|
34
|
+
return this.validateRemote(manifest);
|
|
65
35
|
}
|
|
66
36
|
}
|
|
67
37
|
exports.RemotesIsUserConfigurableValidator = RemotesIsUserConfigurableValidator;
|
package/package.json
CHANGED
package/out/utils/features.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
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"}
|
package/out/utils/features.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
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;
|