@forge/manifest 9.5.0-next.3 → 9.5.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 +6 -0
- package/out/builder/processor-builder.d.ts +4 -1
- package/out/builder/processor-builder.d.ts.map +1 -1
- package/out/builder/processor-builder.js +13 -4
- package/out/processor/basic-validation-processor.d.ts +2 -1
- package/out/processor/basic-validation-processor.d.ts.map +1 -1
- package/out/processor/basic-validation-processor.js +4 -2
- package/out/processor/full-validation-processor.d.ts +2 -1
- package/out/processor/full-validation-processor.d.ts.map +1 -1
- package/out/processor/full-validation-processor.js +4 -2
- package/out/text/errors.d.ts +5 -0
- package/out/text/errors.d.ts.map +1 -1
- package/out/text/errors.js +10 -0
- package/out/types/index.d.ts +1 -0
- package/out/types/index.d.ts.map +1 -1
- package/out/types/index.js +1 -0
- package/out/types/lint-options.d.ts +4 -0
- package/out/types/lint-options.d.ts.map +1 -0
- package/out/types/lint-options.js +2 -0
- package/out/validators/runtime-version-validator.d.ts +13 -0
- package/out/validators/runtime-version-validator.d.ts.map +1 -0
- package/out/validators/runtime-version-validator.js +36 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ValidationTypes } from '../types';
|
|
1
|
+
import { ValidationTypes, LintOptions } from '../types';
|
|
2
2
|
import { ManifestSchema } from '../schema/manifest';
|
|
3
3
|
import { BasicManifestSchema } from '../schema/basic-manifest';
|
|
4
4
|
import { ProcessorInterface } from '../processor';
|
|
@@ -6,10 +6,13 @@ import { BuilderInterface } from './builder-interface';
|
|
|
6
6
|
export declare class ProcessorBuilder implements BuilderInterface<ProcessorInterface<ManifestSchema | BasicManifestSchema>> {
|
|
7
7
|
private static cache;
|
|
8
8
|
private validationType;
|
|
9
|
+
private lintOptions;
|
|
9
10
|
private constructor();
|
|
10
11
|
static instance(): ProcessorBuilder;
|
|
11
12
|
withValidation(type: ValidationTypes): ProcessorBuilder;
|
|
13
|
+
withOptions(options: LintOptions): ProcessorBuilder;
|
|
12
14
|
private buildInternal;
|
|
15
|
+
private createCacheKey;
|
|
13
16
|
build(): ProcessorInterface<ManifestSchema | BasicManifestSchema>;
|
|
14
17
|
}
|
|
15
18
|
//# sourceMappingURL=processor-builder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processor-builder.d.ts","sourceRoot":"","sources":["../../src/builder/processor-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"processor-builder.d.ts","sourceRoot":"","sources":["../../src/builder/processor-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAGL,kBAAkB,EAEnB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAKvD,qBAAa,gBAAiB,YAAW,gBAAgB,CAAC,kBAAkB,CAAC,cAAc,GAAG,mBAAmB,CAAC,CAAC;IACjH,OAAO,CAAC,MAAM,CAAC,KAAK,CAAoF;IAExG,OAAO,CAAC,cAAc,CAAkB;IACxC,OAAO,CAAC,WAAW,CAAmB;IAEtC,OAAO;IAIP,MAAM,CAAC,QAAQ,IAAI,gBAAgB;IAInC,cAAc,CAAC,IAAI,EAAE,eAAe,GAAG,gBAAgB;IAKvD,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,gBAAgB;IAKnD,OAAO,CAAC,aAAa;IAmBrB,OAAO,CAAC,cAAc;IAItB,KAAK,IAAI,kBAAkB,CAAC,cAAc,GAAG,mBAAmB,CAAC;CAWlE"}
|
|
@@ -9,6 +9,7 @@ const deprecated_egress_permissions_validation_processor_1 = require("../process
|
|
|
9
9
|
class ProcessorBuilder {
|
|
10
10
|
static cache = new Map();
|
|
11
11
|
validationType;
|
|
12
|
+
lintOptions = {};
|
|
12
13
|
constructor() {
|
|
13
14
|
this.validationType = types_1.ValidationTypes.FULL;
|
|
14
15
|
}
|
|
@@ -19,12 +20,16 @@ class ProcessorBuilder {
|
|
|
19
20
|
this.validationType = type;
|
|
20
21
|
return this;
|
|
21
22
|
}
|
|
23
|
+
withOptions(options) {
|
|
24
|
+
this.lintOptions = options;
|
|
25
|
+
return this;
|
|
26
|
+
}
|
|
22
27
|
buildInternal() {
|
|
23
28
|
switch (this.validationType) {
|
|
24
29
|
case types_1.ValidationTypes.BASIC:
|
|
25
|
-
return new processor_1.BasicValidationProcessor();
|
|
30
|
+
return new processor_1.BasicValidationProcessor(this.lintOptions);
|
|
26
31
|
case types_1.ValidationTypes.FULL:
|
|
27
|
-
return new processor_1.FullValidationProcessor();
|
|
32
|
+
return new processor_1.FullValidationProcessor(this.lintOptions);
|
|
28
33
|
case types_1.ValidationTypes.FORGE_REMOTE_COMPUTE:
|
|
29
34
|
return new remote_compute_validation_processor_1.RemoteComputeValidationProcessor();
|
|
30
35
|
case types_1.ValidationTypes.PRODUCT_TRIGGER:
|
|
@@ -37,13 +42,17 @@ class ProcessorBuilder {
|
|
|
37
42
|
throw new Error('Unsupported validation type');
|
|
38
43
|
}
|
|
39
44
|
}
|
|
45
|
+
createCacheKey() {
|
|
46
|
+
return `${this.validationType}-${JSON.stringify(this.lintOptions)}`;
|
|
47
|
+
}
|
|
40
48
|
build() {
|
|
41
|
-
const
|
|
49
|
+
const cacheKey = this.createCacheKey();
|
|
50
|
+
const cached = ProcessorBuilder.cache.get(cacheKey);
|
|
42
51
|
if (cached) {
|
|
43
52
|
return cached;
|
|
44
53
|
}
|
|
45
54
|
const processor = this.buildInternal();
|
|
46
|
-
ProcessorBuilder.cache.set(
|
|
55
|
+
ProcessorBuilder.cache.set(cacheKey, processor);
|
|
47
56
|
return processor;
|
|
48
57
|
}
|
|
49
58
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AbstractValidationProcessor } from './abstract-validation-processor';
|
|
2
2
|
import { BasicManifestSchema } from '../schema/basic-manifest';
|
|
3
|
+
import { LintOptions } from '../types';
|
|
3
4
|
export declare class BasicValidationProcessor extends AbstractValidationProcessor<BasicManifestSchema> {
|
|
4
|
-
constructor();
|
|
5
|
+
constructor(lintOptions: LintOptions);
|
|
5
6
|
}
|
|
6
7
|
//# sourceMappingURL=basic-validation-processor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basic-validation-processor.d.ts","sourceRoot":"","sources":["../../src/processor/basic-validation-processor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAG/D,qBAAa,wBAAyB,SAAQ,2BAA2B,CAAC,mBAAmB,CAAC
|
|
1
|
+
{"version":3,"file":"basic-validation-processor.d.ts","sourceRoot":"","sources":["../../src/processor/basic-validation-processor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAG/D,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,qBAAa,wBAAyB,SAAQ,2BAA2B,CAAC,mBAAmB,CAAC;gBAChF,WAAW,EAAE,WAAW;CAUrC"}
|
|
@@ -6,14 +6,16 @@ const validators_1 = require("../validators");
|
|
|
6
6
|
const BASIC_SCHEMA = tslib_1.__importStar(require("../schema/basic-manifest-schema.json"));
|
|
7
7
|
const abstract_validation_processor_1 = require("./abstract-validation-processor");
|
|
8
8
|
const jql_function_validator_1 = require("../validators/jql-function-validator");
|
|
9
|
+
const runtime_version_validator_1 = require("../validators/runtime-version-validator");
|
|
9
10
|
class BasicValidationProcessor extends abstract_validation_processor_1.AbstractValidationProcessor {
|
|
10
|
-
constructor() {
|
|
11
|
+
constructor(lintOptions) {
|
|
11
12
|
super([
|
|
12
13
|
new validators_1.FileValidator(),
|
|
13
14
|
new validators_1.YamlValidator(),
|
|
14
15
|
new validators_1.SchemaValidator(BASIC_SCHEMA),
|
|
15
16
|
new validators_1.EntityPropertyValidator(),
|
|
16
|
-
new jql_function_validator_1.JqlFunctionValidator()
|
|
17
|
+
new jql_function_validator_1.JqlFunctionValidator(),
|
|
18
|
+
new runtime_version_validator_1.RuntimeVersionValidator(lintOptions)
|
|
17
19
|
]);
|
|
18
20
|
}
|
|
19
21
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AbstractValidationProcessor } from './abstract-validation-processor';
|
|
2
2
|
import { ManifestSchema } from '../schema/manifest';
|
|
3
|
+
import { LintOptions } from '../types';
|
|
3
4
|
export declare class FullValidationProcessor extends AbstractValidationProcessor<ManifestSchema> {
|
|
4
|
-
constructor();
|
|
5
|
+
constructor(lintOptions: LintOptions);
|
|
5
6
|
}
|
|
6
7
|
//# sourceMappingURL=full-validation-processor.d.ts.map
|
|
@@ -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;
|
|
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;AAQpD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,qBAAa,uBAAwB,SAAQ,2BAA2B,CAAC,cAAc,CAAC;gBAC1E,WAAW,EAAE,WAAW;CA0BrC"}
|
|
@@ -12,8 +12,9 @@ const app_features_validator_1 = require("../validators/app-features-validator")
|
|
|
12
12
|
const data_classification_validator_1 = require("../validators/data-classification-validator");
|
|
13
13
|
const remote_regions_validator_1 = require("../validators/remote-regions-validator");
|
|
14
14
|
const remote_auth_scopes_validator_1 = require("../validators/remote-auth-scopes-validator");
|
|
15
|
+
const runtime_version_validator_1 = require("../validators/runtime-version-validator");
|
|
15
16
|
class FullValidationProcessor extends abstract_validation_processor_1.AbstractValidationProcessor {
|
|
16
|
-
constructor() {
|
|
17
|
+
constructor(lintOptions) {
|
|
17
18
|
super([
|
|
18
19
|
new validators_1.FileValidator(),
|
|
19
20
|
new validators_1.YamlValidator(),
|
|
@@ -35,7 +36,8 @@ class FullValidationProcessor extends abstract_validation_processor_1.AbstractVa
|
|
|
35
36
|
new data_classification_validator_1.DataClassificationValidator(),
|
|
36
37
|
new validators_1.TranslationsValidator(),
|
|
37
38
|
new remote_regions_validator_1.RemoteRegionsValidator(),
|
|
38
|
-
new remote_auth_scopes_validator_1.RemoteAuthScopesValidator()
|
|
39
|
+
new remote_auth_scopes_validator_1.RemoteAuthScopesValidator(),
|
|
40
|
+
new runtime_version_validator_1.RuntimeVersionValidator(lintOptions)
|
|
39
41
|
]);
|
|
40
42
|
}
|
|
41
43
|
}
|
package/out/text/errors.d.ts
CHANGED
|
@@ -195,6 +195,11 @@ export declare const errors: {
|
|
|
195
195
|
internalI18nPropertyKeyFound: (propertyKey: string, moduleKey: string) => string;
|
|
196
196
|
i18nValueValidationError: (keyName: string, languageLocaleCode: ForgeSupportedLocaleCode, errorMsg: string) => string;
|
|
197
197
|
};
|
|
198
|
+
deprecation: {
|
|
199
|
+
runtime: {
|
|
200
|
+
message: (runtimeName: string) => string;
|
|
201
|
+
};
|
|
202
|
+
};
|
|
198
203
|
};
|
|
199
204
|
export declare enum References {
|
|
200
205
|
MissingManifest = "manifest-file-required",
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;4CAKX,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;;;;mCAKjF,MAAM;;;CAQlC,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"}
|
package/out/text/errors.js
CHANGED
|
@@ -206,6 +206,16 @@ exports.errors = {
|
|
|
206
206
|
missingTranslationsPropertyError: 'i18n key(s) found but translations property is missing in manifest file',
|
|
207
207
|
internalI18nPropertyKeyFound: (propertyKey, moduleKey) => `Unexpected property key '${propertyKey}' found in '${moduleKey}' module`,
|
|
208
208
|
i18nValueValidationError: (keyName, languageLocaleCode, errorMsg) => `i18n value for key '${keyName}' for locale '${languageLocaleCode}' ${errorMsg}`
|
|
209
|
+
},
|
|
210
|
+
deprecation: {
|
|
211
|
+
runtime: {
|
|
212
|
+
message: (runtimeName) => {
|
|
213
|
+
const changelogUrl = 'https://go.atlassian.com/forge-changelog';
|
|
214
|
+
return runtimeName === 'sandbox'
|
|
215
|
+
? `The sandbox runtime is deprecated and will be removed in the future ${changelogUrl}/#CHANGE-789.`
|
|
216
|
+
: `The ${runtimeName} runtime is deprecated and will be removed in the future. Check ${changelogUrl} for more information on ${runtimeName} deprecation and removal dates.`;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
209
219
|
}
|
|
210
220
|
};
|
|
211
221
|
var References;
|
package/out/types/index.d.ts
CHANGED
package/out/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC"}
|
package/out/types/index.js
CHANGED
|
@@ -6,3 +6,4 @@ tslib_1.__exportStar(require("./module-types"), exports);
|
|
|
6
6
|
tslib_1.__exportStar(require("./constants"), exports);
|
|
7
7
|
tslib_1.__exportStar(require("./validation-types"), exports);
|
|
8
8
|
tslib_1.__exportStar(require("./core-endpoint-types"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./lint-options"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lint-options.d.ts","sourceRoot":"","sources":["../../src/types/lint-options.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC/B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ValidatorInterface } from './validator-interface';
|
|
2
|
+
import { ManifestObject, ManifestValidationResult, LintOptions } from '../types';
|
|
3
|
+
import { ManifestSchema } from '../schema/manifest';
|
|
4
|
+
declare type ManifestApp = {
|
|
5
|
+
app: ManifestSchema['app'];
|
|
6
|
+
};
|
|
7
|
+
export declare class RuntimeVersionValidator implements ValidatorInterface<ManifestObject<ManifestApp> | undefined, ManifestApp> {
|
|
8
|
+
private readonly lintOptions;
|
|
9
|
+
constructor(lintOptions: LintOptions);
|
|
10
|
+
validate(manifest: ManifestObject<ManifestApp> | undefined): Promise<ManifestValidationResult<ManifestApp>>;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=runtime-version-validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-version-validator.d.ts","sourceRoot":"","sources":["../../src/validators/runtime-version-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIpD,aAAK,WAAW,GAAG;IAAE,GAAG,EAAE,cAAc,CAAC,KAAK,CAAC,CAAA;CAAE,CAAC;AAElD,qBAAa,uBACX,YAAW,kBAAkB,CAAC,cAAc,CAAC,WAAW,CAAC,GAAG,SAAS,EAAE,WAAW,CAAC;IAEnF,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAc;gBAE9B,WAAW,EAAE,WAAW;IAI9B,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC,WAAW,CAAC,GAAG,SAAS,GAAG,OAAO,CAAC,wBAAwB,CAAC,WAAW,CAAC,CAAC;CA0BlH"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RuntimeVersionValidator = void 0;
|
|
4
|
+
const text_1 = require("../text");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
class RuntimeVersionValidator {
|
|
7
|
+
lintOptions;
|
|
8
|
+
constructor(lintOptions) {
|
|
9
|
+
this.lintOptions = lintOptions;
|
|
10
|
+
}
|
|
11
|
+
async validate(manifest) {
|
|
12
|
+
if (manifest?.typedContent) {
|
|
13
|
+
const runtimeName = manifest.typedContent.app.runtime.name;
|
|
14
|
+
const deprecatedRuntimes = this.lintOptions.deprecatedRuntimes ?? [];
|
|
15
|
+
if (deprecatedRuntimes.includes(runtimeName)) {
|
|
16
|
+
return {
|
|
17
|
+
success: true,
|
|
18
|
+
manifestObject: manifest,
|
|
19
|
+
errors: [
|
|
20
|
+
{
|
|
21
|
+
message: text_1.errors.deprecation.runtime.message(runtimeName),
|
|
22
|
+
reference: text_1.References.Deprecated,
|
|
23
|
+
level: 'warning',
|
|
24
|
+
...(0, utils_1.findPosition)(runtimeName, manifest?.yamlContentByLine)
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
success: true,
|
|
32
|
+
manifestObject: manifest
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.RuntimeVersionValidator = RuntimeVersionValidator;
|