@actions/workflow-parser 0.2.0
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/LICENSE +21 -0
- package/README.md +87 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/model/convert.d.ts +31 -0
- package/dist/model/convert.d.ts.map +1 -0
- package/dist/model/convert.js +105 -0
- package/dist/model/convert.js.map +1 -0
- package/dist/model/converter/concurrency.d.ts +5 -0
- package/dist/model/converter/concurrency.d.ts.map +1 -0
- package/dist/model/converter/concurrency.js +30 -0
- package/dist/model/converter/concurrency.js.map +1 -0
- package/dist/model/converter/container.d.ts +6 -0
- package/dist/model/converter/container.d.ts.map +1 -0
- package/dist/model/converter/container.js +97 -0
- package/dist/model/converter/container.js.map +1 -0
- package/dist/model/converter/cron-constants.d.ts +44 -0
- package/dist/model/converter/cron-constants.d.ts.map +1 -0
- package/dist/model/converter/cron-constants.js +30 -0
- package/dist/model/converter/cron-constants.js.map +1 -0
- package/dist/model/converter/cron.d.ts +3 -0
- package/dist/model/converter/cron.d.ts.map +1 -0
- package/dist/model/converter/cron.js +92 -0
- package/dist/model/converter/cron.js.map +1 -0
- package/dist/model/converter/events.d.ts +5 -0
- package/dist/model/converter/events.d.ts.map +1 -0
- package/dist/model/converter/events.js +123 -0
- package/dist/model/converter/events.js.map +1 -0
- package/dist/model/converter/handle-errors.d.ts +4 -0
- package/dist/model/converter/handle-errors.d.ts.map +1 -0
- package/dist/model/converter/handle-errors.js +18 -0
- package/dist/model/converter/handle-errors.js.map +1 -0
- package/dist/model/converter/id-builder.d.ts +23 -0
- package/dist/model/converter/id-builder.d.ts.map +1 -0
- package/dist/model/converter/id-builder.js +113 -0
- package/dist/model/converter/id-builder.js.map +1 -0
- package/dist/model/converter/job/environment.d.ts +5 -0
- package/dist/model/converter/job/environment.d.ts.map +1 -0
- package/dist/model/converter/job/environment.js +28 -0
- package/dist/model/converter/job/environment.js.map +1 -0
- package/dist/model/converter/job/inputs.d.ts +8 -0
- package/dist/model/converter/job/inputs.d.ts.map +1 -0
- package/dist/model/converter/job/inputs.js +38 -0
- package/dist/model/converter/job/inputs.js.map +1 -0
- package/dist/model/converter/job/runs-on.d.ts +9 -0
- package/dist/model/converter/job/runs-on.d.ts.map +1 -0
- package/dist/model/converter/job/runs-on.js +78 -0
- package/dist/model/converter/job/runs-on.js.map +1 -0
- package/dist/model/converter/job/secrets.d.ts +4 -0
- package/dist/model/converter/job/secrets.d.ts.map +1 -0
- package/dist/model/converter/job/secrets.js +32 -0
- package/dist/model/converter/job/secrets.js.map +1 -0
- package/dist/model/converter/job.d.ts +5 -0
- package/dist/model/converter/job.d.ts.map +1 -0
- package/dist/model/converter/job.js +144 -0
- package/dist/model/converter/job.js.map +1 -0
- package/dist/model/converter/jobs.d.ts +5 -0
- package/dist/model/converter/jobs.d.ts.map +1 -0
- package/dist/model/converter/jobs.js +74 -0
- package/dist/model/converter/jobs.js.map +1 -0
- package/dist/model/converter/referencedWorkflow.d.ts +5 -0
- package/dist/model/converter/referencedWorkflow.d.ts.map +1 -0
- package/dist/model/converter/referencedWorkflow.js +85 -0
- package/dist/model/converter/referencedWorkflow.js.map +1 -0
- package/dist/model/converter/steps.d.ts +5 -0
- package/dist/model/converter/steps.d.ts.map +1 -0
- package/dist/model/converter/steps.js +113 -0
- package/dist/model/converter/steps.js.map +1 -0
- package/dist/model/converter/string-list.d.ts +3 -0
- package/dist/model/converter/string-list.d.ts.map +1 -0
- package/dist/model/converter/string-list.js +8 -0
- package/dist/model/converter/string-list.js.map +1 -0
- package/dist/model/converter/workflow-call.d.ts +5 -0
- package/dist/model/converter/workflow-call.d.ts.map +1 -0
- package/dist/model/converter/workflow-call.js +45 -0
- package/dist/model/converter/workflow-call.js.map +1 -0
- package/dist/model/converter/workflow-dispatch.d.ts +9 -0
- package/dist/model/converter/workflow-dispatch.d.ts.map +1 -0
- package/dist/model/converter/workflow-dispatch.js +82 -0
- package/dist/model/converter/workflow-dispatch.js.map +1 -0
- package/dist/model/type-guards.d.ts +6 -0
- package/dist/model/type-guards.d.ts.map +1 -0
- package/dist/model/type-guards.js +13 -0
- package/dist/model/type-guards.js.map +1 -0
- package/dist/model/workflow-template.d.ts +157 -0
- package/dist/model/workflow-template.d.ts.map +1 -0
- package/dist/model/workflow-template.js +8 -0
- package/dist/model/workflow-template.js.map +1 -0
- package/dist/templates/allowed-context.d.ts +6 -0
- package/dist/templates/allowed-context.d.ts.map +1 -0
- package/dist/templates/allowed-context.js +30 -0
- package/dist/templates/allowed-context.js.map +1 -0
- package/dist/templates/json-object-reader.d.ts +20 -0
- package/dist/templates/json-object-reader.d.ts.map +1 -0
- package/dist/templates/json-object-reader.js +135 -0
- package/dist/templates/json-object-reader.js.map +1 -0
- package/dist/templates/object-reader.d.ts +15 -0
- package/dist/templates/object-reader.d.ts.map +1 -0
- package/dist/templates/object-reader.js +2 -0
- package/dist/templates/object-reader.js.map +1 -0
- package/dist/templates/parse-event.d.ts +16 -0
- package/dist/templates/parse-event.d.ts.map +1 -0
- package/dist/templates/parse-event.js +17 -0
- package/dist/templates/parse-event.js.map +1 -0
- package/dist/templates/schema/boolean-definition.d.ts +10 -0
- package/dist/templates/schema/boolean-definition.d.ts.map +1 -0
- package/dist/templates/schema/boolean-definition.js +41 -0
- package/dist/templates/schema/boolean-definition.js.map +1 -0
- package/dist/templates/schema/definition-info.d.ts +16 -0
- package/dist/templates/schema/definition-info.d.ts.map +1 -0
- package/dist/templates/schema/definition-info.js +40 -0
- package/dist/templates/schema/definition-info.js.map +1 -0
- package/dist/templates/schema/definition-type.d.ts +11 -0
- package/dist/templates/schema/definition-type.d.ts.map +1 -0
- package/dist/templates/schema/definition-type.js +12 -0
- package/dist/templates/schema/definition-type.js.map +1 -0
- package/dist/templates/schema/definition.d.ts +24 -0
- package/dist/templates/schema/definition.d.ts.map +1 -0
- package/dist/templates/schema/definition.js +62 -0
- package/dist/templates/schema/definition.js.map +1 -0
- package/dist/templates/schema/index.d.ts +2 -0
- package/dist/templates/schema/index.d.ts.map +1 -0
- package/dist/templates/schema/index.js +2 -0
- package/dist/templates/schema/index.js.map +1 -0
- package/dist/templates/schema/mapping-definition.d.ts +16 -0
- package/dist/templates/schema/mapping-definition.d.ts.map +1 -0
- package/dist/templates/schema/mapping-definition.js +81 -0
- package/dist/templates/schema/mapping-definition.js.map +1 -0
- package/dist/templates/schema/null-definition.d.ts +10 -0
- package/dist/templates/schema/null-definition.d.ts.map +1 -0
- package/dist/templates/schema/null-definition.js +41 -0
- package/dist/templates/schema/null-definition.js.map +1 -0
- package/dist/templates/schema/number-definition.d.ts +10 -0
- package/dist/templates/schema/number-definition.d.ts.map +1 -0
- package/dist/templates/schema/number-definition.js +41 -0
- package/dist/templates/schema/number-definition.js.map +1 -0
- package/dist/templates/schema/one-of-definition.d.ts +15 -0
- package/dist/templates/schema/one-of-definition.d.ts.map +1 -0
- package/dist/templates/schema/one-of-definition.js +154 -0
- package/dist/templates/schema/one-of-definition.js.map +1 -0
- package/dist/templates/schema/property-definition.d.ts +8 -0
- package/dist/templates/schema/property-definition.d.ts.map +1 -0
- package/dist/templates/schema/property-definition.js +31 -0
- package/dist/templates/schema/property-definition.js.map +1 -0
- package/dist/templates/schema/scalar-definition.d.ts +7 -0
- package/dist/templates/schema/scalar-definition.d.ts.map +1 -0
- package/dist/templates/schema/scalar-definition.js +7 -0
- package/dist/templates/schema/scalar-definition.js.map +1 -0
- package/dist/templates/schema/sequence-definition.d.ts +11 -0
- package/dist/templates/schema/sequence-definition.d.ts.map +1 -0
- package/dist/templates/schema/sequence-definition.js +47 -0
- package/dist/templates/schema/sequence-definition.js.map +1 -0
- package/dist/templates/schema/string-definition.d.ts +14 -0
- package/dist/templates/schema/string-definition.d.ts.map +1 -0
- package/dist/templates/schema/string-definition.js +79 -0
- package/dist/templates/schema/string-definition.js.map +1 -0
- package/dist/templates/schema/template-schema.d.ts +47 -0
- package/dist/templates/schema/template-schema.d.ts.map +1 -0
- package/dist/templates/schema/template-schema.js +377 -0
- package/dist/templates/schema/template-schema.js.map +1 -0
- package/dist/templates/template-constants.d.ts +49 -0
- package/dist/templates/template-constants.d.ts.map +1 -0
- package/dist/templates/template-constants.js +49 -0
- package/dist/templates/template-constants.js.map +1 -0
- package/dist/templates/template-context.d.ts +66 -0
- package/dist/templates/template-context.d.ts.map +1 -0
- package/dist/templates/template-context.js +118 -0
- package/dist/templates/template-context.js.map +1 -0
- package/dist/templates/template-reader.d.ts +9 -0
- package/dist/templates/template-reader.d.ts.map +1 -0
- package/dist/templates/template-reader.js +595 -0
- package/dist/templates/template-reader.js.map +1 -0
- package/dist/templates/template-validation-error.d.ts +14 -0
- package/dist/templates/template-validation-error.d.ts.map +1 -0
- package/dist/templates/template-validation-error.js +21 -0
- package/dist/templates/template-validation-error.js.map +1 -0
- package/dist/templates/tokens/basic-expression-token.d.ts +27 -0
- package/dist/templates/tokens/basic-expression-token.d.ts.map +1 -0
- package/dist/templates/tokens/basic-expression-token.js +38 -0
- package/dist/templates/tokens/basic-expression-token.js.map +1 -0
- package/dist/templates/tokens/boolean-token.d.ts +12 -0
- package/dist/templates/tokens/boolean-token.d.ts.map +1 -0
- package/dist/templates/tokens/boolean-token.js +23 -0
- package/dist/templates/tokens/boolean-token.js.map +1 -0
- package/dist/templates/tokens/expression-token.d.ts +11 -0
- package/dist/templates/tokens/expression-token.d.ts.map +1 -0
- package/dist/templates/tokens/expression-token.js +24 -0
- package/dist/templates/tokens/expression-token.js.map +1 -0
- package/dist/templates/tokens/index.d.ts +14 -0
- package/dist/templates/tokens/index.d.ts.map +1 -0
- package/dist/templates/tokens/index.js +14 -0
- package/dist/templates/tokens/index.js.map +1 -0
- package/dist/templates/tokens/insert-expression-token.d.ts +12 -0
- package/dist/templates/tokens/insert-expression-token.d.ts.map +1 -0
- package/dist/templates/tokens/insert-expression-token.js +26 -0
- package/dist/templates/tokens/insert-expression-token.js.map +1 -0
- package/dist/templates/tokens/key-value-pair.d.ts +8 -0
- package/dist/templates/tokens/key-value-pair.d.ts.map +1 -0
- package/dist/templates/tokens/key-value-pair.js +7 -0
- package/dist/templates/tokens/key-value-pair.js.map +1 -0
- package/dist/templates/tokens/literal-token.d.ts +14 -0
- package/dist/templates/tokens/literal-token.d.ts.map +1 -0
- package/dist/templates/tokens/literal-token.js +22 -0
- package/dist/templates/tokens/literal-token.js.map +1 -0
- package/dist/templates/tokens/mapping-token.d.ts +20 -0
- package/dist/templates/tokens/mapping-token.d.ts.map +1 -0
- package/dist/templates/tokens/mapping-token.js +58 -0
- package/dist/templates/tokens/mapping-token.js.map +1 -0
- package/dist/templates/tokens/null-token.d.ts +10 -0
- package/dist/templates/tokens/null-token.d.ts.map +1 -0
- package/dist/templates/tokens/null-token.js +19 -0
- package/dist/templates/tokens/null-token.js.map +1 -0
- package/dist/templates/tokens/number-token.d.ts +12 -0
- package/dist/templates/tokens/number-token.d.ts.map +1 -0
- package/dist/templates/tokens/number-token.js +23 -0
- package/dist/templates/tokens/number-token.js.map +1 -0
- package/dist/templates/tokens/scalar-token.d.ts +14 -0
- package/dist/templates/tokens/scalar-token.d.ts.map +1 -0
- package/dist/templates/tokens/scalar-token.js +22 -0
- package/dist/templates/tokens/scalar-token.js.map +1 -0
- package/dist/templates/tokens/sequence-token.d.ts +18 -0
- package/dist/templates/tokens/sequence-token.d.ts.map +1 -0
- package/dist/templates/tokens/sequence-token.js +47 -0
- package/dist/templates/tokens/sequence-token.js.map +1 -0
- package/dist/templates/tokens/serialization.d.ts +21 -0
- package/dist/templates/tokens/serialization.d.ts.map +1 -0
- package/dist/templates/tokens/serialization.js +2 -0
- package/dist/templates/tokens/serialization.js.map +1 -0
- package/dist/templates/tokens/string-token.d.ts +12 -0
- package/dist/templates/tokens/string-token.d.ts.map +1 -0
- package/dist/templates/tokens/string-token.js +21 -0
- package/dist/templates/tokens/string-token.js.map +1 -0
- package/dist/templates/tokens/template-token.d.ts +70 -0
- package/dist/templates/tokens/template-token.d.ts.map +1 -0
- package/dist/templates/tokens/template-token.js +138 -0
- package/dist/templates/tokens/template-token.js.map +1 -0
- package/dist/templates/tokens/token-range.d.ts +12 -0
- package/dist/templates/tokens/token-range.d.ts.map +1 -0
- package/dist/templates/tokens/token-range.js +2 -0
- package/dist/templates/tokens/token-range.js.map +1 -0
- package/dist/templates/tokens/traversal-state.d.ts +12 -0
- package/dist/templates/tokens/traversal-state.d.ts.map +1 -0
- package/dist/templates/tokens/traversal-state.js +54 -0
- package/dist/templates/tokens/traversal-state.js.map +1 -0
- package/dist/templates/tokens/type-guards.d.ts +18 -0
- package/dist/templates/tokens/type-guards.d.ts.map +1 -0
- package/dist/templates/tokens/type-guards.js +28 -0
- package/dist/templates/tokens/type-guards.js.map +1 -0
- package/dist/templates/tokens/types.d.ts +12 -0
- package/dist/templates/tokens/types.d.ts.map +1 -0
- package/dist/templates/tokens/types.js +37 -0
- package/dist/templates/tokens/types.js.map +1 -0
- package/dist/templates/trace-writer.d.ts +11 -0
- package/dist/templates/trace-writer.d.ts.map +1 -0
- package/dist/templates/trace-writer.js +12 -0
- package/dist/templates/trace-writer.js.map +1 -0
- package/dist/test-utils/null-trace.d.ts +3 -0
- package/dist/test-utils/null-trace.d.ts.map +1 -0
- package/dist/test-utils/null-trace.js +3 -0
- package/dist/test-utils/null-trace.js.map +1 -0
- package/dist/workflow-v1.0.json +2511 -0
- package/dist/workflows/file-provider.d.ts +6 -0
- package/dist/workflows/file-provider.d.ts.map +1 -0
- package/dist/workflows/file-provider.js +2 -0
- package/dist/workflows/file-provider.js.map +1 -0
- package/dist/workflows/file-reference.d.ts +13 -0
- package/dist/workflows/file-reference.d.ts.map +1 -0
- package/dist/workflows/file-reference.js +25 -0
- package/dist/workflows/file-reference.js.map +1 -0
- package/dist/workflows/file.d.ts +5 -0
- package/dist/workflows/file.d.ts.map +1 -0
- package/dist/workflows/file.js +2 -0
- package/dist/workflows/file.js.map +1 -0
- package/dist/workflows/workflow-constants.d.ts +2 -0
- package/dist/workflows/workflow-constants.d.ts.map +1 -0
- package/dist/workflows/workflow-constants.js +2 -0
- package/dist/workflows/workflow-constants.js.map +1 -0
- package/dist/workflows/workflow-parser.d.ts +11 -0
- package/dist/workflows/workflow-parser.d.ts.map +1 -0
- package/dist/workflows/workflow-parser.js +28 -0
- package/dist/workflows/workflow-parser.js.map +1 -0
- package/dist/workflows/workflow-schema.d.ts +3 -0
- package/dist/workflows/workflow-schema.d.ts.map +1 -0
- package/dist/workflows/workflow-schema.js +12 -0
- package/dist/workflows/workflow-schema.js.map +1 -0
- package/dist/workflows/yaml-object-reader.d.ts +26 -0
- package/dist/workflows/yaml-object-reader.d.ts.map +1 -0
- package/dist/workflows/yaml-object-reader.js +178 -0
- package/dist/workflows/yaml-object-reader.js.map +1 -0
- package/package.json +70 -0
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
import { TokenType } from "../../templates/tokens/types";
|
|
2
|
+
import { ALLOWED_VALUES, ANY, BOOLEAN, BOOLEAN_DEFINITION, BOOLEAN_DEFINITION_PROPERTIES, CONSTANT, CONTEXT, DEFINITION, DEFINITIONS, DESCRIPTION, IGNORE_CASE, IS_EXPRESSION, ITEM_TYPE, LOOSE_KEY_TYPE, LOOSE_VALUE_TYPE, MAPPING, MAPPING_DEFINITION, MAPPING_DEFINITION_PROPERTIES, MAPPING_PROPERTY_VALUE, NON_EMPTY_STRING, NULL, NULL_DEFINITION, NULL_DEFINITION_PROPERTIES, NUMBER, NUMBER_DEFINITION, NUMBER_DEFINITION_PROPERTIES, ONE_OF, ONE_OF_DEFINITION, PROPERTIES, PROPERTY_VALUE, REQUIRED, REQUIRE_NON_EMPTY, SEQUENCE, SEQUENCE_DEFINITION, SEQUENCE_DEFINITION_PROPERTIES, SEQUENCE_OF_NON_EMPTY_STRING, STRING, STRING_DEFINITION, STRING_DEFINITION_PROPERTIES, TEMPLATE_SCHEMA, TYPE, VERSION } from "../template-constants";
|
|
3
|
+
import { TemplateContext, TemplateValidationErrors } from "../template-context";
|
|
4
|
+
import { readTemplate } from "../template-reader";
|
|
5
|
+
import { StringToken } from "../tokens";
|
|
6
|
+
import { NoOperationTraceWriter } from "../trace-writer";
|
|
7
|
+
import { BooleanDefinition } from "./boolean-definition";
|
|
8
|
+
import { DefinitionType } from "./definition-type";
|
|
9
|
+
import { MappingDefinition } from "./mapping-definition";
|
|
10
|
+
import { NullDefinition } from "./null-definition";
|
|
11
|
+
import { NumberDefinition } from "./number-definition";
|
|
12
|
+
import { OneOfDefinition } from "./one-of-definition";
|
|
13
|
+
import { PropertyDefinition } from "./property-definition";
|
|
14
|
+
import { SequenceDefinition } from "./sequence-definition";
|
|
15
|
+
import { StringDefinition } from "./string-definition";
|
|
16
|
+
/**
|
|
17
|
+
* This models the root schema object and contains definitions
|
|
18
|
+
*/
|
|
19
|
+
export class TemplateSchema {
|
|
20
|
+
constructor(mapping) {
|
|
21
|
+
this.definitions = {};
|
|
22
|
+
this.version = "";
|
|
23
|
+
// Add built-in type: null
|
|
24
|
+
this.definitions[NULL] = new NullDefinition(NULL);
|
|
25
|
+
// Add built-in type: boolean
|
|
26
|
+
this.definitions[BOOLEAN] = new BooleanDefinition(BOOLEAN);
|
|
27
|
+
// Add built-in type: number
|
|
28
|
+
this.definitions[NUMBER] = new NumberDefinition(NUMBER);
|
|
29
|
+
// Add built-in type: string
|
|
30
|
+
this.definitions[STRING] = new StringDefinition(STRING);
|
|
31
|
+
// Add built-in type: sequence
|
|
32
|
+
const sequenceDefinition = new SequenceDefinition(SEQUENCE);
|
|
33
|
+
sequenceDefinition.itemType = ANY;
|
|
34
|
+
this.definitions[sequenceDefinition.key] = sequenceDefinition;
|
|
35
|
+
// Add built-in type: mapping
|
|
36
|
+
const mappingDefinition = new MappingDefinition(MAPPING);
|
|
37
|
+
mappingDefinition.looseKeyType = STRING;
|
|
38
|
+
mappingDefinition.looseValueType = ANY;
|
|
39
|
+
this.definitions[mappingDefinition.key] = mappingDefinition;
|
|
40
|
+
// Add built-in type: any
|
|
41
|
+
const anyDefinition = new OneOfDefinition(ANY);
|
|
42
|
+
anyDefinition.oneOf.push(NULL);
|
|
43
|
+
anyDefinition.oneOf.push(BOOLEAN);
|
|
44
|
+
anyDefinition.oneOf.push(NUMBER);
|
|
45
|
+
anyDefinition.oneOf.push(STRING);
|
|
46
|
+
anyDefinition.oneOf.push(SEQUENCE);
|
|
47
|
+
anyDefinition.oneOf.push(MAPPING);
|
|
48
|
+
this.definitions[anyDefinition.key] = anyDefinition;
|
|
49
|
+
if (mapping) {
|
|
50
|
+
for (const pair of mapping) {
|
|
51
|
+
const key = pair.key.assertString(`${TEMPLATE_SCHEMA} key`);
|
|
52
|
+
switch (key.value) {
|
|
53
|
+
case VERSION: {
|
|
54
|
+
this.version = pair.value.assertString(`${TEMPLATE_SCHEMA} ${VERSION}`).value;
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
case DEFINITIONS: {
|
|
58
|
+
const definitions = pair.value.assertMapping(`${TEMPLATE_SCHEMA} ${DEFINITIONS}`);
|
|
59
|
+
for (const definitionsPair of definitions) {
|
|
60
|
+
const definitionsKey = definitionsPair.key.assertString(`${TEMPLATE_SCHEMA} ${DEFINITIONS} key`);
|
|
61
|
+
const definitionsValue = definitionsPair.value.assertMapping(`${TEMPLATE_SCHEMA} ${DEFINITIONS} value`);
|
|
62
|
+
let definition;
|
|
63
|
+
for (const definitionPair of definitionsValue) {
|
|
64
|
+
const definitionKey = definitionPair.key.assertString(`${DEFINITION} key`);
|
|
65
|
+
const mappingToken = definitionsPair.value;
|
|
66
|
+
switch (definitionKey.value) {
|
|
67
|
+
case NULL:
|
|
68
|
+
definition = new NullDefinition(definitionsKey.value, definitionsValue);
|
|
69
|
+
break;
|
|
70
|
+
case BOOLEAN:
|
|
71
|
+
definition = new BooleanDefinition(definitionsKey.value, definitionsValue);
|
|
72
|
+
break;
|
|
73
|
+
case NUMBER:
|
|
74
|
+
definition = new NumberDefinition(definitionsKey.value, definitionsValue);
|
|
75
|
+
break;
|
|
76
|
+
case STRING:
|
|
77
|
+
definition = new StringDefinition(definitionsKey.value, definitionsValue);
|
|
78
|
+
break;
|
|
79
|
+
case SEQUENCE:
|
|
80
|
+
definition = new SequenceDefinition(definitionsKey.value, definitionsValue);
|
|
81
|
+
break;
|
|
82
|
+
case MAPPING:
|
|
83
|
+
definition = new MappingDefinition(definitionsKey.value, definitionsValue);
|
|
84
|
+
break;
|
|
85
|
+
case ONE_OF:
|
|
86
|
+
definition = new OneOfDefinition(definitionsKey.value, definitionsValue);
|
|
87
|
+
break;
|
|
88
|
+
case ALLOWED_VALUES:
|
|
89
|
+
// Change the allowed-values definition into a one-of definition and its corresponding string definitions
|
|
90
|
+
for (const item of mappingToken) {
|
|
91
|
+
if (item.value.templateTokenType === TokenType.Sequence) {
|
|
92
|
+
// Create a new string definition for each StringToken in the sequence
|
|
93
|
+
const sequenceToken = item.value;
|
|
94
|
+
for (const activity of sequenceToken) {
|
|
95
|
+
if (activity.templateTokenType === TokenType.String) {
|
|
96
|
+
const stringToken = activity;
|
|
97
|
+
const allowedValuesKey = definitionsKey.value + "-" + stringToken.value;
|
|
98
|
+
const allowedValuesDef = new StringDefinition(allowedValuesKey);
|
|
99
|
+
allowedValuesDef.constant = stringToken.toDisplayString();
|
|
100
|
+
this.definitions[allowedValuesKey] = allowedValuesDef;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
definition = new OneOfDefinition(definitionsKey.value, definitionsValue);
|
|
106
|
+
break;
|
|
107
|
+
case CONTEXT:
|
|
108
|
+
case DESCRIPTION:
|
|
109
|
+
continue;
|
|
110
|
+
default:
|
|
111
|
+
// throws
|
|
112
|
+
definitionKey.assertUnexpectedValue(`${DEFINITION} mapping key`);
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
if (!definition) {
|
|
118
|
+
throw new Error(`Not enough information to construct definition '${definitionsKey.value}'`);
|
|
119
|
+
}
|
|
120
|
+
this.definitions[definitionsKey.value] = definition;
|
|
121
|
+
}
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
default:
|
|
125
|
+
// throws
|
|
126
|
+
key.assertUnexpectedValue(`${TEMPLATE_SCHEMA} key`);
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Looks up a definition by name
|
|
134
|
+
*/
|
|
135
|
+
getDefinition(name) {
|
|
136
|
+
const result = this.definitions[name];
|
|
137
|
+
if (result) {
|
|
138
|
+
return result;
|
|
139
|
+
}
|
|
140
|
+
throw new Error(`Schema definition '${name}' not found`);
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Expands one-of definitions and returns all scalar definitions
|
|
144
|
+
*/
|
|
145
|
+
getScalarDefinitions(definition) {
|
|
146
|
+
const result = [];
|
|
147
|
+
switch (definition.definitionType) {
|
|
148
|
+
case DefinitionType.Null:
|
|
149
|
+
case DefinitionType.Boolean:
|
|
150
|
+
case DefinitionType.Number:
|
|
151
|
+
case DefinitionType.String:
|
|
152
|
+
result.push(definition);
|
|
153
|
+
break;
|
|
154
|
+
case DefinitionType.OneOf: {
|
|
155
|
+
const oneOf = definition;
|
|
156
|
+
// Expand nested one-of definitions
|
|
157
|
+
for (const nestedName of oneOf.oneOf) {
|
|
158
|
+
const nestedDefinition = this.getDefinition(nestedName);
|
|
159
|
+
result.push(...this.getScalarDefinitions(nestedDefinition));
|
|
160
|
+
}
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
return result;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Expands one-of definitions and returns all matching definitions by type
|
|
168
|
+
*/
|
|
169
|
+
getDefinitionsOfType(definition, type) {
|
|
170
|
+
const result = [];
|
|
171
|
+
if (definition.definitionType === type) {
|
|
172
|
+
result.push(definition);
|
|
173
|
+
}
|
|
174
|
+
else if (definition.definitionType === DefinitionType.OneOf) {
|
|
175
|
+
const oneOf = definition;
|
|
176
|
+
for (const nestedName of oneOf.oneOf) {
|
|
177
|
+
const nestedDefinition = this.getDefinition(nestedName);
|
|
178
|
+
if (nestedDefinition.definitionType === type) {
|
|
179
|
+
result.push(nestedDefinition);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
return result;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Attempts match the property name to a property defined by any of the specified definitions.
|
|
187
|
+
* If matched, any unmatching definitions are filtered from the definitions array.
|
|
188
|
+
* Returns the type information for the matched property.
|
|
189
|
+
*/
|
|
190
|
+
matchPropertyAndFilter(definitions, propertyName) {
|
|
191
|
+
let result;
|
|
192
|
+
// Check for a matching well-known property
|
|
193
|
+
let notFoundInSome = false;
|
|
194
|
+
for (const definition of definitions) {
|
|
195
|
+
const propertyDef = definition.properties[propertyName];
|
|
196
|
+
if (propertyDef) {
|
|
197
|
+
result = propertyDef;
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
notFoundInSome = true;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
// Filter the matched definitions if needed
|
|
204
|
+
if (result && notFoundInSome) {
|
|
205
|
+
for (let i = 0; i < definitions.length;) {
|
|
206
|
+
if (definitions[i].properties[propertyName]) {
|
|
207
|
+
i++;
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
definitions.splice(i, 1);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
return result;
|
|
215
|
+
}
|
|
216
|
+
validate() {
|
|
217
|
+
const oneOfDefinitions = {};
|
|
218
|
+
for (const name of Object.keys(this.definitions)) {
|
|
219
|
+
if (!name.match(TemplateSchema._definitionNamePattern)) {
|
|
220
|
+
throw new Error(`Invalid definition name '${name}'`);
|
|
221
|
+
}
|
|
222
|
+
const definition = this.definitions[name];
|
|
223
|
+
// Delay validation for 'one-of' definitions
|
|
224
|
+
if (definition.definitionType === DefinitionType.OneOf) {
|
|
225
|
+
oneOfDefinitions[name] = definition;
|
|
226
|
+
}
|
|
227
|
+
// Otherwise validate now
|
|
228
|
+
else {
|
|
229
|
+
definition.validate(this, name);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
// Validate 'one-of' definitions
|
|
233
|
+
for (const name of Object.keys(oneOfDefinitions)) {
|
|
234
|
+
const oneOf = oneOfDefinitions[name];
|
|
235
|
+
oneOf.validate(this, name);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Loads a user-defined schema file
|
|
240
|
+
*/
|
|
241
|
+
static load(objectReader) {
|
|
242
|
+
const context = new TemplateContext(new TemplateValidationErrors(10, 500), TemplateSchema.getInternalSchema(), new NoOperationTraceWriter());
|
|
243
|
+
const template = readTemplate(context, TEMPLATE_SCHEMA, objectReader, undefined);
|
|
244
|
+
context.errors.check();
|
|
245
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
246
|
+
const mapping = template.assertMapping(TEMPLATE_SCHEMA);
|
|
247
|
+
const schema = new TemplateSchema(mapping);
|
|
248
|
+
schema.validate();
|
|
249
|
+
return schema;
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Gets the internal schema used for reading user-defined schema files
|
|
253
|
+
*/
|
|
254
|
+
static getInternalSchema() {
|
|
255
|
+
if (TemplateSchema._internalSchema === undefined) {
|
|
256
|
+
const schema = new TemplateSchema();
|
|
257
|
+
// template-schema
|
|
258
|
+
let mappingDefinition = new MappingDefinition(TEMPLATE_SCHEMA);
|
|
259
|
+
mappingDefinition.properties[VERSION] = new PropertyDefinition(new StringToken(undefined, undefined, NON_EMPTY_STRING, undefined));
|
|
260
|
+
mappingDefinition.properties[DEFINITIONS] = new PropertyDefinition(new StringToken(undefined, undefined, DEFINITIONS, undefined));
|
|
261
|
+
schema.definitions[mappingDefinition.key] = mappingDefinition;
|
|
262
|
+
// definitions
|
|
263
|
+
mappingDefinition = new MappingDefinition(DEFINITIONS);
|
|
264
|
+
mappingDefinition.looseKeyType = NON_EMPTY_STRING;
|
|
265
|
+
mappingDefinition.looseValueType = DEFINITION;
|
|
266
|
+
schema.definitions[mappingDefinition.key] = mappingDefinition;
|
|
267
|
+
// definition
|
|
268
|
+
let oneOfDefinition = new OneOfDefinition(DEFINITION);
|
|
269
|
+
oneOfDefinition.oneOf.push(NULL_DEFINITION);
|
|
270
|
+
oneOfDefinition.oneOf.push(BOOLEAN_DEFINITION);
|
|
271
|
+
oneOfDefinition.oneOf.push(NUMBER_DEFINITION);
|
|
272
|
+
oneOfDefinition.oneOf.push(STRING_DEFINITION);
|
|
273
|
+
oneOfDefinition.oneOf.push(SEQUENCE_DEFINITION);
|
|
274
|
+
oneOfDefinition.oneOf.push(MAPPING_DEFINITION);
|
|
275
|
+
oneOfDefinition.oneOf.push(ONE_OF_DEFINITION);
|
|
276
|
+
schema.definitions[oneOfDefinition.key] = oneOfDefinition;
|
|
277
|
+
// null-definition
|
|
278
|
+
mappingDefinition = new MappingDefinition(NULL_DEFINITION);
|
|
279
|
+
mappingDefinition.properties[DESCRIPTION] = new PropertyDefinition(new StringToken(undefined, undefined, STRING, undefined));
|
|
280
|
+
mappingDefinition.properties[CONTEXT] = new PropertyDefinition(new StringToken(undefined, undefined, SEQUENCE_OF_NON_EMPTY_STRING, undefined));
|
|
281
|
+
mappingDefinition.properties[NULL] = new PropertyDefinition(new StringToken(undefined, undefined, NULL_DEFINITION_PROPERTIES, undefined));
|
|
282
|
+
schema.definitions[mappingDefinition.key] = mappingDefinition;
|
|
283
|
+
// null-definition-properties
|
|
284
|
+
mappingDefinition = new MappingDefinition(NULL_DEFINITION_PROPERTIES);
|
|
285
|
+
schema.definitions[mappingDefinition.key] = mappingDefinition;
|
|
286
|
+
// boolean-definition
|
|
287
|
+
mappingDefinition = new MappingDefinition(BOOLEAN_DEFINITION);
|
|
288
|
+
mappingDefinition.properties[DESCRIPTION] = new PropertyDefinition(new StringToken(undefined, undefined, STRING, undefined));
|
|
289
|
+
mappingDefinition.properties[CONTEXT] = new PropertyDefinition(new StringToken(undefined, undefined, SEQUENCE_OF_NON_EMPTY_STRING, undefined));
|
|
290
|
+
mappingDefinition.properties[BOOLEAN] = new PropertyDefinition(new StringToken(undefined, undefined, BOOLEAN_DEFINITION_PROPERTIES, undefined));
|
|
291
|
+
schema.definitions[mappingDefinition.key] = mappingDefinition;
|
|
292
|
+
// boolean-definition-properties
|
|
293
|
+
mappingDefinition = new MappingDefinition(BOOLEAN_DEFINITION_PROPERTIES);
|
|
294
|
+
schema.definitions[mappingDefinition.key] = mappingDefinition;
|
|
295
|
+
// number-definition
|
|
296
|
+
mappingDefinition = new MappingDefinition(NUMBER_DEFINITION);
|
|
297
|
+
mappingDefinition.properties[DESCRIPTION] = new PropertyDefinition(new StringToken(undefined, undefined, STRING, undefined));
|
|
298
|
+
mappingDefinition.properties[CONTEXT] = new PropertyDefinition(new StringToken(undefined, undefined, SEQUENCE_OF_NON_EMPTY_STRING, undefined));
|
|
299
|
+
mappingDefinition.properties[NUMBER] = new PropertyDefinition(new StringToken(undefined, undefined, NUMBER_DEFINITION_PROPERTIES, undefined));
|
|
300
|
+
schema.definitions[mappingDefinition.key] = mappingDefinition;
|
|
301
|
+
// number-definition-properties
|
|
302
|
+
mappingDefinition = new MappingDefinition(NUMBER_DEFINITION_PROPERTIES);
|
|
303
|
+
schema.definitions[mappingDefinition.key] = mappingDefinition;
|
|
304
|
+
// string-definition
|
|
305
|
+
mappingDefinition = new MappingDefinition(STRING_DEFINITION);
|
|
306
|
+
mappingDefinition.properties[DESCRIPTION] = new PropertyDefinition(new StringToken(undefined, undefined, STRING, undefined));
|
|
307
|
+
mappingDefinition.properties[CONTEXT] = new PropertyDefinition(new StringToken(undefined, undefined, SEQUENCE_OF_NON_EMPTY_STRING, undefined));
|
|
308
|
+
mappingDefinition.properties[STRING] = new PropertyDefinition(new StringToken(undefined, undefined, STRING_DEFINITION_PROPERTIES, undefined));
|
|
309
|
+
schema.definitions[mappingDefinition.key] = mappingDefinition;
|
|
310
|
+
// string-definition-properties
|
|
311
|
+
mappingDefinition = new MappingDefinition(STRING_DEFINITION_PROPERTIES);
|
|
312
|
+
mappingDefinition.properties[CONSTANT] = new PropertyDefinition(new StringToken(undefined, undefined, NON_EMPTY_STRING, undefined));
|
|
313
|
+
mappingDefinition.properties[IGNORE_CASE] = new PropertyDefinition(new StringToken(undefined, undefined, BOOLEAN, undefined));
|
|
314
|
+
mappingDefinition.properties[REQUIRE_NON_EMPTY] = new PropertyDefinition(new StringToken(undefined, undefined, BOOLEAN, undefined));
|
|
315
|
+
mappingDefinition.properties[IS_EXPRESSION] = new PropertyDefinition(new StringToken(undefined, undefined, BOOLEAN, undefined));
|
|
316
|
+
schema.definitions[mappingDefinition.key] = mappingDefinition;
|
|
317
|
+
// sequence-definition
|
|
318
|
+
mappingDefinition = new MappingDefinition(SEQUENCE_DEFINITION);
|
|
319
|
+
mappingDefinition.properties[DESCRIPTION] = new PropertyDefinition(new StringToken(undefined, undefined, STRING, undefined));
|
|
320
|
+
mappingDefinition.properties[CONTEXT] = new PropertyDefinition(new StringToken(undefined, undefined, SEQUENCE_OF_NON_EMPTY_STRING, undefined));
|
|
321
|
+
mappingDefinition.properties[SEQUENCE] = new PropertyDefinition(new StringToken(undefined, undefined, SEQUENCE_DEFINITION_PROPERTIES, undefined));
|
|
322
|
+
schema.definitions[mappingDefinition.key] = mappingDefinition;
|
|
323
|
+
// sequence-definition-properties
|
|
324
|
+
mappingDefinition = new MappingDefinition(SEQUENCE_DEFINITION_PROPERTIES);
|
|
325
|
+
mappingDefinition.properties[ITEM_TYPE] = new PropertyDefinition(new StringToken(undefined, undefined, NON_EMPTY_STRING, undefined));
|
|
326
|
+
schema.definitions[mappingDefinition.key] = mappingDefinition;
|
|
327
|
+
// mapping-definition
|
|
328
|
+
mappingDefinition = new MappingDefinition(MAPPING_DEFINITION);
|
|
329
|
+
mappingDefinition.properties[DESCRIPTION] = new PropertyDefinition(new StringToken(undefined, undefined, STRING, undefined));
|
|
330
|
+
mappingDefinition.properties[CONTEXT] = new PropertyDefinition(new StringToken(undefined, undefined, SEQUENCE_OF_NON_EMPTY_STRING, undefined));
|
|
331
|
+
mappingDefinition.properties[MAPPING] = new PropertyDefinition(new StringToken(undefined, undefined, MAPPING_DEFINITION_PROPERTIES, undefined));
|
|
332
|
+
schema.definitions[mappingDefinition.key] = mappingDefinition;
|
|
333
|
+
// mapping-definition-properties
|
|
334
|
+
mappingDefinition = new MappingDefinition(MAPPING_DEFINITION_PROPERTIES);
|
|
335
|
+
mappingDefinition.properties[PROPERTIES] = new PropertyDefinition(new StringToken(undefined, undefined, PROPERTIES, undefined));
|
|
336
|
+
mappingDefinition.properties[LOOSE_KEY_TYPE] = new PropertyDefinition(new StringToken(undefined, undefined, NON_EMPTY_STRING, undefined));
|
|
337
|
+
mappingDefinition.properties[LOOSE_VALUE_TYPE] = new PropertyDefinition(new StringToken(undefined, undefined, NON_EMPTY_STRING, undefined));
|
|
338
|
+
schema.definitions[mappingDefinition.key] = mappingDefinition;
|
|
339
|
+
// properties
|
|
340
|
+
mappingDefinition = new MappingDefinition(PROPERTIES);
|
|
341
|
+
mappingDefinition.looseKeyType = NON_EMPTY_STRING;
|
|
342
|
+
mappingDefinition.looseValueType = PROPERTY_VALUE;
|
|
343
|
+
schema.definitions[mappingDefinition.key] = mappingDefinition;
|
|
344
|
+
// property-value
|
|
345
|
+
oneOfDefinition = new OneOfDefinition(PROPERTY_VALUE);
|
|
346
|
+
oneOfDefinition.oneOf.push(NON_EMPTY_STRING);
|
|
347
|
+
oneOfDefinition.oneOf.push(MAPPING_PROPERTY_VALUE);
|
|
348
|
+
schema.definitions[oneOfDefinition.key] = oneOfDefinition;
|
|
349
|
+
// mapping-property-value
|
|
350
|
+
mappingDefinition = new MappingDefinition(MAPPING_PROPERTY_VALUE);
|
|
351
|
+
mappingDefinition.properties[TYPE] = new PropertyDefinition(new StringToken(undefined, undefined, NON_EMPTY_STRING, undefined));
|
|
352
|
+
mappingDefinition.properties[REQUIRED] = new PropertyDefinition(new StringToken(undefined, undefined, BOOLEAN, undefined));
|
|
353
|
+
mappingDefinition.properties[DESCRIPTION] = new PropertyDefinition(new StringToken(undefined, undefined, STRING, undefined));
|
|
354
|
+
schema.definitions[mappingDefinition.key] = mappingDefinition;
|
|
355
|
+
// one-of-definition
|
|
356
|
+
mappingDefinition = new MappingDefinition(ONE_OF_DEFINITION);
|
|
357
|
+
mappingDefinition.properties[DESCRIPTION] = new PropertyDefinition(new StringToken(undefined, undefined, STRING, undefined));
|
|
358
|
+
mappingDefinition.properties[CONTEXT] = new PropertyDefinition(new StringToken(undefined, undefined, SEQUENCE_OF_NON_EMPTY_STRING, undefined));
|
|
359
|
+
mappingDefinition.properties[ONE_OF] = new PropertyDefinition(new StringToken(undefined, undefined, SEQUENCE_OF_NON_EMPTY_STRING, undefined));
|
|
360
|
+
mappingDefinition.properties[ALLOWED_VALUES] = new PropertyDefinition(new StringToken(undefined, undefined, SEQUENCE_OF_NON_EMPTY_STRING, undefined));
|
|
361
|
+
schema.definitions[mappingDefinition.key] = mappingDefinition;
|
|
362
|
+
// non-empty-string
|
|
363
|
+
const stringDefinition = new StringDefinition(NON_EMPTY_STRING);
|
|
364
|
+
stringDefinition.requireNonEmpty = true;
|
|
365
|
+
schema.definitions[stringDefinition.key] = stringDefinition;
|
|
366
|
+
// sequence-of-non-empty-string
|
|
367
|
+
const sequenceDefinition = new SequenceDefinition(SEQUENCE_OF_NON_EMPTY_STRING);
|
|
368
|
+
sequenceDefinition.itemType = NON_EMPTY_STRING;
|
|
369
|
+
schema.definitions[sequenceDefinition.key] = sequenceDefinition;
|
|
370
|
+
schema.validate();
|
|
371
|
+
TemplateSchema._internalSchema = schema;
|
|
372
|
+
}
|
|
373
|
+
return TemplateSchema._internalSchema;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
TemplateSchema._definitionNamePattern = /^[a-zA-Z_][a-zA-Z0-9_-]*$/;
|
|
377
|
+
//# sourceMappingURL=template-schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-schema.js","sourceRoot":"","sources":["../../../src/templates/schema/template-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,8BAA8B,CAAC;AAEvD,OAAO,EACL,cAAc,EACd,GAAG,EACH,OAAO,EACP,kBAAkB,EAClB,6BAA6B,EAC7B,QAAQ,EACR,OAAO,EACP,UAAU,EACV,WAAW,EACX,WAAW,EACX,WAAW,EACX,aAAa,EACb,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,OAAO,EACP,kBAAkB,EAClB,6BAA6B,EAC7B,sBAAsB,EACtB,gBAAgB,EAChB,IAAI,EACJ,eAAe,EACf,0BAA0B,EAC1B,MAAM,EACN,iBAAiB,EACjB,4BAA4B,EAC5B,MAAM,EACN,iBAAiB,EACjB,UAAU,EACV,cAAc,EACd,QAAQ,EACR,iBAAiB,EACjB,QAAQ,EACR,mBAAmB,EACnB,8BAA8B,EAC9B,4BAA4B,EAC5B,MAAM,EACN,iBAAiB,EACjB,4BAA4B,EAC5B,eAAe,EACf,IAAI,EACJ,OAAO,EACR,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAC,eAAe,EAAE,wBAAwB,EAAC,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAA8B,WAAW,EAAC,MAAM,WAAW,CAAC;AACnE,OAAO,EAAC,sBAAsB,EAAC,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAC,iBAAiB,EAAC,MAAM,sBAAsB,CAAC;AAEvD,OAAO,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAC,iBAAiB,EAAC,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAC,cAAc,EAAC,MAAM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S,EAAE,4BAA4B,EAAE,SAAS,CAAC,CAC/E,CAAC;YACF,iBAAiB,CAAC,UAAU,CAAC,cAAc,CAAC,GAAG,IAAI,kBAAkB,CACnE,IAAI,WAAW,CAAC,SAAS,EAAE,SAAS,EAAE,4BAA4B,EAAE,SAAS,CAAC,CAC/E,CAAC;YACF,MAAM,CAAC,WAAW,CAAC,iBAAiB,CAAC,GAAG,CAAC,GAAG,iBAAiB,CAAC;YAE9D,mBAAmB;YACnB,MAAM,gBAAgB,GAAG,IAAI,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;YAChE,gBAAgB,CAAC,eAAe,GAAG,IAAI,CAAC;YACxC,MAAM,CAAC,WAAW,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,gBAAgB,CAAC;YAE5D,+BAA+B;YAC/B,MAAM,kBAAkB,GAAG,IAAI,kBAAkB,CAAC,4BAA4B,CAAC,CAAC;YAChF,kBAAkB,CAAC,QAAQ,GAAG,gBAAgB,CAAC;YAC/C,MAAM,CAAC,WAAW,CAAC,kBAAkB,CAAC,GAAG,CAAC,GAAG,kBAAkB,CAAC;YAEhE,MAAM,CAAC,QAAQ,EAAE,CAAC;YAElB,cAAc,CAAC,eAAe,GAAG,MAAM,CAAC;SACzC;QAED,OAAO,cAAc,CAAC,eAAe,CAAC;IACxC,CAAC;;AApeuB,qCAAsB,GAAG,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export declare const ALLOWED_VALUES = "allowed-values";
|
|
2
|
+
export declare const ANY = "any";
|
|
3
|
+
export declare const BOOLEAN = "boolean";
|
|
4
|
+
export declare const BOOLEAN_DEFINITION = "boolean-definition";
|
|
5
|
+
export declare const BOOLEAN_DEFINITION_PROPERTIES = "boolean-definition-properties";
|
|
6
|
+
export declare const CLOSE_EXPRESSION = "}}";
|
|
7
|
+
export declare const CONSTANT = "constant";
|
|
8
|
+
export declare const CONTEXT = "context";
|
|
9
|
+
export declare const DEFINITION = "definition";
|
|
10
|
+
export declare const DEFINITIONS = "definitions";
|
|
11
|
+
export declare const DESCRIPTION = "description";
|
|
12
|
+
export declare const IGNORE_CASE = "ignore-case";
|
|
13
|
+
export declare const INSERT_DIRECTIVE = "insert";
|
|
14
|
+
export declare const IS_EXPRESSION = "is-expression";
|
|
15
|
+
export declare const ITEM_TYPE = "item-type";
|
|
16
|
+
export declare const LOOSE_KEY_TYPE = "loose-key-type";
|
|
17
|
+
export declare const LOOSE_VALUE_TYPE = "loose-value-type";
|
|
18
|
+
export declare const MAX_CONSTANT = "MAX";
|
|
19
|
+
export declare const MAPPING = "mapping";
|
|
20
|
+
export declare const MAPPING_DEFINITION = "mapping-definition";
|
|
21
|
+
export declare const MAPPING_DEFINITION_PROPERTIES = "mapping-definition-properties";
|
|
22
|
+
export declare const MAPPING_PROPERTY_VALUE = "mapping-property-value";
|
|
23
|
+
export declare const NON_EMPTY_STRING = "non-empty-string";
|
|
24
|
+
export declare const NULL = "null";
|
|
25
|
+
export declare const NULL_DEFINITION = "null-definition";
|
|
26
|
+
export declare const NULL_DEFINITION_PROPERTIES = "null-definition-properties";
|
|
27
|
+
export declare const NUMBER = "number";
|
|
28
|
+
export declare const NUMBER_DEFINITION = "number-definition";
|
|
29
|
+
export declare const NUMBER_DEFINITION_PROPERTIES = "number-definition-properties";
|
|
30
|
+
export declare const ONE_OF = "one-of";
|
|
31
|
+
export declare const ONE_OF_DEFINITION = "one-of-definition";
|
|
32
|
+
export declare const OPEN_EXPRESSION = "${{";
|
|
33
|
+
export declare const PROPERTY_VALUE = "property-value";
|
|
34
|
+
export declare const PROPERTIES = "properties";
|
|
35
|
+
export declare const REQUIRED = "required";
|
|
36
|
+
export declare const REQUIRE_NON_EMPTY = "require-non-empty";
|
|
37
|
+
export declare const SCALAR = "scalar";
|
|
38
|
+
export declare const SEQUENCE = "sequence";
|
|
39
|
+
export declare const SEQUENCE_DEFINITION = "sequence-definition";
|
|
40
|
+
export declare const SEQUENCE_DEFINITION_PROPERTIES = "sequence-definition-properties";
|
|
41
|
+
export declare const TYPE = "type";
|
|
42
|
+
export declare const SEQUENCE_OF_NON_EMPTY_STRING = "sequence-of-non-empty-string";
|
|
43
|
+
export declare const STRING = "string";
|
|
44
|
+
export declare const STRING_DEFINITION = "string-definition";
|
|
45
|
+
export declare const STRING_DEFINITION_PROPERTIES = "string-definition-properties";
|
|
46
|
+
export declare const STRUCTURE = "structure";
|
|
47
|
+
export declare const TEMPLATE_SCHEMA = "template-schema";
|
|
48
|
+
export declare const VERSION = "version";
|
|
49
|
+
//# sourceMappingURL=template-constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-constants.d.ts","sourceRoot":"","sources":["../../src/templates/template-constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAC/C,eAAO,MAAM,GAAG,QAAQ,CAAC;AACzB,eAAO,MAAM,OAAO,YAAY,CAAC;AACjC,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AACvD,eAAO,MAAM,6BAA6B,kCAAkC,CAAC;AAC7E,eAAO,MAAM,gBAAgB,OAAO,CAAC;AACrC,eAAO,MAAM,QAAQ,aAAa,CAAC;AACnC,eAAO,MAAM,OAAO,YAAY,CAAC;AACjC,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,eAAO,MAAM,gBAAgB,WAAW,CAAC;AACzC,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C,eAAO,MAAM,SAAS,cAAc,CAAC;AACrC,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAC/C,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AACnD,eAAO,MAAM,YAAY,QAAQ,CAAC;AAClC,eAAO,MAAM,OAAO,YAAY,CAAC;AACjC,eAAO,MAAM,kBAAkB,uBAA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|
|
4
|
+
export const BOOLEAN_DEFINITION = "boolean-definition";
|
|
5
|
+
export const BOOLEAN_DEFINITION_PROPERTIES = "boolean-definition-properties";
|
|
6
|
+
export const CLOSE_EXPRESSION = "}}";
|
|
7
|
+
export const CONSTANT = "constant";
|
|
8
|
+
export const CONTEXT = "context";
|
|
9
|
+
export const DEFINITION = "definition";
|
|
10
|
+
export const DEFINITIONS = "definitions";
|
|
11
|
+
export const DESCRIPTION = "description";
|
|
12
|
+
export const IGNORE_CASE = "ignore-case";
|
|
13
|
+
export const INSERT_DIRECTIVE = "insert";
|
|
14
|
+
export const IS_EXPRESSION = "is-expression";
|
|
15
|
+
export const ITEM_TYPE = "item-type";
|
|
16
|
+
export const LOOSE_KEY_TYPE = "loose-key-type";
|
|
17
|
+
export const LOOSE_VALUE_TYPE = "loose-value-type";
|
|
18
|
+
export const MAX_CONSTANT = "MAX";
|
|
19
|
+
export const MAPPING = "mapping";
|
|
20
|
+
export const MAPPING_DEFINITION = "mapping-definition";
|
|
21
|
+
export const MAPPING_DEFINITION_PROPERTIES = "mapping-definition-properties";
|
|
22
|
+
export const MAPPING_PROPERTY_VALUE = "mapping-property-value";
|
|
23
|
+
export const NON_EMPTY_STRING = "non-empty-string";
|
|
24
|
+
export const NULL = "null";
|
|
25
|
+
export const NULL_DEFINITION = "null-definition";
|
|
26
|
+
export const NULL_DEFINITION_PROPERTIES = "null-definition-properties";
|
|
27
|
+
export const NUMBER = "number";
|
|
28
|
+
export const NUMBER_DEFINITION = "number-definition";
|
|
29
|
+
export const NUMBER_DEFINITION_PROPERTIES = "number-definition-properties";
|
|
30
|
+
export const ONE_OF = "one-of";
|
|
31
|
+
export const ONE_OF_DEFINITION = "one-of-definition";
|
|
32
|
+
export const OPEN_EXPRESSION = "${{";
|
|
33
|
+
export const PROPERTY_VALUE = "property-value";
|
|
34
|
+
export const PROPERTIES = "properties";
|
|
35
|
+
export const REQUIRED = "required";
|
|
36
|
+
export const REQUIRE_NON_EMPTY = "require-non-empty";
|
|
37
|
+
export const SCALAR = "scalar";
|
|
38
|
+
export const SEQUENCE = "sequence";
|
|
39
|
+
export const SEQUENCE_DEFINITION = "sequence-definition";
|
|
40
|
+
export const SEQUENCE_DEFINITION_PROPERTIES = "sequence-definition-properties";
|
|
41
|
+
export const TYPE = "type";
|
|
42
|
+
export const SEQUENCE_OF_NON_EMPTY_STRING = "sequence-of-non-empty-string";
|
|
43
|
+
export const STRING = "string";
|
|
44
|
+
export const STRING_DEFINITION = "string-definition";
|
|
45
|
+
export const STRING_DEFINITION_PROPERTIES = "string-definition-properties";
|
|
46
|
+
export const STRUCTURE = "structure";
|
|
47
|
+
export const TEMPLATE_SCHEMA = "template-schema";
|
|
48
|
+
export const VERSION = "version";
|
|
49
|
+
//# sourceMappingURL=template-constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-constants.js","sourceRoot":"","sources":["../../src/templates/template-constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAAC;AAC/C,MAAM,CAAC,MAAM,GAAG,GAAG,KAAK,CAAC;AACzB,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC;AACjC,MAAM,CAAC,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;AACvD,MAAM,CAAC,MAAM,6BAA6B,GAAG,+BAA+B,CAAC;AAC7E,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC;AACrC,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAC;AACnC,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC;AACjC,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC;AACvC,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAC;AACzC,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAC;AACzC,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAC;AACzC,MAAM,CAAC,MAAM,gBAAgB,GAAG,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,CAAC;AAC/B,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAC;AACnC,MAAM,CAAC,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AACzD,MAAM,CAAC,MAAM,8BAA8B,GAAG,gCAAgC,CAAC;AAC/E,MAAM,CAAC,MAAM,IAAI,GAAG,MAAM,CAAC;AAC3B,MAAM,CAAC,MAAM,4BAA4B,GAAG,8BAA8B,CAAC;AAC3E,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC;AAC/B,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AACrD,MAAM,CAAC,MAAM,4BAA4B,GAAG,8BAA8B,CAAC;AAC3E,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC;AACrC,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,CAAC;AACjD,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { FunctionInfo } from "@actions/expressions/funcs/info";
|
|
2
|
+
import { TemplateSchema } from "./schema/template-schema";
|
|
3
|
+
import { TemplateValidationError } from "./template-validation-error";
|
|
4
|
+
import { TemplateToken } from "./tokens";
|
|
5
|
+
import { TokenRange } from "./tokens/token-range";
|
|
6
|
+
import { TraceWriter } from "./trace-writer";
|
|
7
|
+
/**
|
|
8
|
+
* Context object that is flowed through while loading and evaluating object templates
|
|
9
|
+
*/
|
|
10
|
+
export declare class TemplateContext {
|
|
11
|
+
private readonly _fileIds;
|
|
12
|
+
private readonly _fileNames;
|
|
13
|
+
/**
|
|
14
|
+
* Available functions within expression contexts
|
|
15
|
+
*/
|
|
16
|
+
readonly expressionFunctions: FunctionInfo[];
|
|
17
|
+
/**
|
|
18
|
+
* Available values within expression contexts
|
|
19
|
+
*/
|
|
20
|
+
readonly expressionNamedContexts: string[];
|
|
21
|
+
readonly errors: TemplateValidationErrors;
|
|
22
|
+
readonly schema: TemplateSchema;
|
|
23
|
+
readonly trace: TraceWriter;
|
|
24
|
+
readonly state: {
|
|
25
|
+
[key: string]: unknown;
|
|
26
|
+
};
|
|
27
|
+
constructor(errors: TemplateValidationErrors, schema: TemplateSchema, trace: TraceWriter);
|
|
28
|
+
error(token: TemplateToken | undefined, err: string, tokenRange?: TokenRange): void;
|
|
29
|
+
error(token: TemplateToken | undefined, err: Error, tokenRange?: TokenRange): void;
|
|
30
|
+
error(token: TemplateToken | undefined, err: unknown): void;
|
|
31
|
+
error(fileId: number | undefined, err: string, tokenRange?: TokenRange): void;
|
|
32
|
+
error(fileId: number | undefined, err: Error, tokenRange?: TokenRange): void;
|
|
33
|
+
error(fileId: number | undefined, err: unknown, tokenRange?: TokenRange): void;
|
|
34
|
+
/**
|
|
35
|
+
* Gets or adds the file ID
|
|
36
|
+
*/
|
|
37
|
+
getFileId(file: string): number;
|
|
38
|
+
/**
|
|
39
|
+
* Looks up a file name by ID. Returns undefined if not found.
|
|
40
|
+
*/
|
|
41
|
+
getFileName(fileId: number): string | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Gets a copy of the file table
|
|
44
|
+
*/
|
|
45
|
+
getFileTable(): string[];
|
|
46
|
+
private getErrorPrefix;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Provides information about errors which occurred during validation
|
|
50
|
+
*/
|
|
51
|
+
export declare class TemplateValidationErrors {
|
|
52
|
+
private readonly _maxErrors;
|
|
53
|
+
private readonly _maxMessageLength;
|
|
54
|
+
private _errors;
|
|
55
|
+
constructor(maxErrors?: number, maxMessageLength?: number);
|
|
56
|
+
get count(): number;
|
|
57
|
+
add(err: TemplateValidationError | TemplateValidationError[]): void;
|
|
58
|
+
/**
|
|
59
|
+
* Throws if any errors
|
|
60
|
+
* @param prefix The error message prefix
|
|
61
|
+
*/
|
|
62
|
+
check(prefix?: string): void;
|
|
63
|
+
clear(): void;
|
|
64
|
+
getErrors(): TemplateValidationError[];
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=template-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template-context.d.ts","sourceRoot":"","sources":["../../src/templates/template-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,iCAAiC,CAAC;AAE7D,OAAO,EAAC,cAAc,EAAC,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAC,uBAAuB,EAAC,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AACvC,OAAO,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC3C;;GAEG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAgC;IACzD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAgB;IAE3C;;OAEG;IACH,SAAgB,mBAAmB,EAAE,YAAY,EAAE,CAAM;IAEzD;;OAEG;IACH,SAAgB,uBAAuB,EAAE,MAAM,EAAE,CAAM;IAEvD,SAAgB,MAAM,EAAE,wBAAwB,CAAC;IACjD,SAAgB,MAAM,EAAE,cAAc,CAAC;IACvC,SAAgB,KAAK,EAAE,WAAW,CAAC;IACnC,SAAgB,KAAK,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAC,CAAM;gBAElC,MAAM,EAAE,wBAAwB,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,WAAW;IAMxF,KAAK,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,UAAU,GAAG,IAAI;IACnF,KAAK,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,EAAE,GAAG,EAAE,KAAK,EAAE,UAAU,CAAC,EAAE,UAAU,GAAG,IAAI;IAClF,KAAK,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,EAAE,GAAG,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