@aws/cloudformation-validate 1.9.0-beta → 1.10.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/README.md +252 -87
- package/THIRD-PARTY-LICENSES.txt +79 -0
- package/bindings_wasm.d.ts +114 -111
- package/bindings_wasm.js +121 -17
- package/bindings_wasm_bg.wasm +0 -0
- package/bindings_wasm_bg.wasm.d.ts +10 -11
- package/index.d.ts +72 -10
- package/index.js +211 -9
- package/package.json +1 -1
package/bindings_wasm.d.ts
CHANGED
|
@@ -358,6 +358,53 @@ export interface ReferenceEdge {
|
|
|
358
358
|
conditionContext?: string;
|
|
359
359
|
}
|
|
360
360
|
|
|
361
|
+
/**
|
|
362
|
+
* A single validation finding in the public report shape: the targeted entity is
|
|
363
|
+
* carried as a nested `entity` struct and the source location is flattened into
|
|
364
|
+
* individual line/column fields. The enrichment fields - `documentation_url`,
|
|
365
|
+
* `rule_description`, `phase`, and `context` - are carried only when a report is
|
|
366
|
+
* projected at the `DETAILED` detail level; the `STANDARD` detail level leaves them
|
|
367
|
+
* `None`, so they are omitted from serialization.
|
|
368
|
+
*/
|
|
369
|
+
export interface Diagnostic {
|
|
370
|
+
/**
|
|
371
|
+
* Identifier of the rule that produced this finding; its leading letter encodes the severity.
|
|
372
|
+
*/
|
|
373
|
+
ruleId: string;
|
|
374
|
+
severity: Severity;
|
|
375
|
+
message: string;
|
|
376
|
+
/**
|
|
377
|
+
* Where the rule came from, such as a provider schema, the built-in engine, or a user-supplied rule.
|
|
378
|
+
*/
|
|
379
|
+
source: RuleOrigin;
|
|
380
|
+
/**
|
|
381
|
+
* The named template entity this finding targets - a resource, parameter, output, mapping, condition, or template rule - if any.
|
|
382
|
+
*/
|
|
383
|
+
entity?: Entity;
|
|
384
|
+
/**
|
|
385
|
+
* Path to the offending property within the resource, such as \'Properties.Name\'.
|
|
386
|
+
*/
|
|
387
|
+
propertyPath?: string;
|
|
388
|
+
suggestedFix?: string;
|
|
389
|
+
category?: string;
|
|
390
|
+
/**
|
|
391
|
+
* Line in the source template where the finding begins (1-based).
|
|
392
|
+
*/
|
|
393
|
+
startLine?: number;
|
|
394
|
+
startColumn?: number;
|
|
395
|
+
endLine?: number;
|
|
396
|
+
endColumn?: number;
|
|
397
|
+
relatedResources?: RelatedResource[];
|
|
398
|
+
/**
|
|
399
|
+
* Condition name to boolean assignment under which this finding applies, when it depends on template conditions.
|
|
400
|
+
*/
|
|
401
|
+
conditionScenario?: Record<string, boolean>;
|
|
402
|
+
documentationUrl?: string;
|
|
403
|
+
ruleDescription?: string;
|
|
404
|
+
phase?: Phase;
|
|
405
|
+
context?: ViolationContext;
|
|
406
|
+
}
|
|
407
|
+
|
|
361
408
|
/**
|
|
362
409
|
* A template Parameter\'s declaration: its type, constraints (allowed values/pattern,
|
|
363
410
|
* length and value bounds), default, and description.
|
|
@@ -626,6 +673,41 @@ export interface RelatedResource {
|
|
|
626
673
|
message: string;
|
|
627
674
|
}
|
|
628
675
|
|
|
676
|
+
/**
|
|
677
|
+
* Configuration for a composite engine that evaluates the built-in rules with
|
|
678
|
+
* one engine and caller-supplied external rules with another.
|
|
679
|
+
*
|
|
680
|
+
* The built-in rules are always evaluated, so this config only carries the
|
|
681
|
+
* external rules layered on top plus the shared schema configuration. Custom
|
|
682
|
+
* rules can be supplied in all three formats: Rego rules are evaluated by the
|
|
683
|
+
* external engine, while CEL custom rules and Guard rules are evaluated by the
|
|
684
|
+
* engine that owns the built-ins. It has no field for engine-native built-in
|
|
685
|
+
* custom rules because the composite fixes which engine owns the built-ins.
|
|
686
|
+
*/
|
|
687
|
+
export interface CompositeEngineConfig {
|
|
688
|
+
/**
|
|
689
|
+
* Custom Rego rules layered on top of the built-in rules.
|
|
690
|
+
*/
|
|
691
|
+
regoRules?: ExternalRuleSource[];
|
|
692
|
+
/**
|
|
693
|
+
* Custom CEL rules layered on top of the built-in rules. They are evaluated
|
|
694
|
+
* by the same engine that owns the built-ins, since CEL custom rules are a
|
|
695
|
+
* CEL-engine feature.
|
|
696
|
+
*/
|
|
697
|
+
celRules?: ExternalRuleSource[];
|
|
698
|
+
/**
|
|
699
|
+
* Guard DSL rules as raw source text, layered on top of the built-in rules.
|
|
700
|
+
*/
|
|
701
|
+
guardRules?: ExternalRuleSource[];
|
|
702
|
+
/**
|
|
703
|
+
* Optional schema validator configuration. A standalone engine derives its
|
|
704
|
+
* schema-aware rule metadata from this config. Language APIs also use it to
|
|
705
|
+
* construct the schema validator bundled with the engine, so both components
|
|
706
|
+
* observe the same additional schemas.
|
|
707
|
+
*/
|
|
708
|
+
schemaValidatorConfig?: SchemaValidatorConfig;
|
|
709
|
+
}
|
|
710
|
+
|
|
629
711
|
/**
|
|
630
712
|
* Configuration for constructing a [`SchemaValidator`] with optional overlay
|
|
631
713
|
* schemas. Bindings and the CLI use this to build the validator separately from
|
|
@@ -645,19 +727,7 @@ export interface SchemaValidatorConfig {
|
|
|
645
727
|
export type DetailLevel = 'STANDARD' | 'DETAILED';
|
|
646
728
|
|
|
647
729
|
/**
|
|
648
|
-
*
|
|
649
|
-
*/
|
|
650
|
-
export interface DetailedReport {
|
|
651
|
-
filePath: string;
|
|
652
|
-
status: ReportStatus;
|
|
653
|
-
version: string;
|
|
654
|
-
metadata: ReportMetadata;
|
|
655
|
-
performance: PerformanceMetrics;
|
|
656
|
-
diagnostics: DetailedDiagnostic[];
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
/**
|
|
660
|
-
* Extra detail about a specific violation, present only in the detailed report.
|
|
730
|
+
* Extra detail about a specific violation, present only at the `DETAILED` detail level.
|
|
661
731
|
*/
|
|
662
732
|
export interface ViolationContext {
|
|
663
733
|
/**
|
|
@@ -788,19 +858,7 @@ export interface ResolutionSource {
|
|
|
788
858
|
/**
|
|
789
859
|
* Selects which validation engine evaluates rules.
|
|
790
860
|
*/
|
|
791
|
-
export type EngineType = 'REGO' | 'CEL';
|
|
792
|
-
|
|
793
|
-
/**
|
|
794
|
-
* Standard validation result: the report plus flattened diagnostics.
|
|
795
|
-
*/
|
|
796
|
-
export interface StandardReport {
|
|
797
|
-
filePath: string;
|
|
798
|
-
status: ReportStatus;
|
|
799
|
-
version: string;
|
|
800
|
-
metadata: ReportMetadata;
|
|
801
|
-
performance: PerformanceMetrics;
|
|
802
|
-
diagnostics: StandardDiagnostic[];
|
|
803
|
-
}
|
|
861
|
+
export type EngineType = 'REGO' | 'CEL' | 'COMPOSITE';
|
|
804
862
|
|
|
805
863
|
/**
|
|
806
864
|
* Suppress a rule for a specific logical resource ID. An absent `rule_id`
|
|
@@ -885,6 +943,20 @@ export interface Entity {
|
|
|
885
943
|
resourceType?: string;
|
|
886
944
|
}
|
|
887
945
|
|
|
946
|
+
/**
|
|
947
|
+
* The serializable validation result: report metadata, performance metrics, and
|
|
948
|
+
* the flattened diagnostics. The per-diagnostic enrichment fields are present only
|
|
949
|
+
* when the report is projected at the `DETAILED` detail level.
|
|
950
|
+
*/
|
|
951
|
+
export interface ValidationReport {
|
|
952
|
+
filePath: string;
|
|
953
|
+
status: ReportStatus;
|
|
954
|
+
version: string;
|
|
955
|
+
metadata: ReportMetadata;
|
|
956
|
+
performance: PerformanceMetrics;
|
|
957
|
+
diagnostics: Diagnostic[];
|
|
958
|
+
}
|
|
959
|
+
|
|
888
960
|
/**
|
|
889
961
|
* The template resource a diagnostic is attributed to, when it targets one.
|
|
890
962
|
*/
|
|
@@ -965,86 +1037,6 @@ export interface PseudoParameterOverrides {
|
|
|
965
1037
|
*/
|
|
966
1038
|
export type RuleOrigin = 'SCHEMA' | 'CFN_LINT' | 'ENGINE' | 'CUSTOM' | 'GUARD';
|
|
967
1039
|
|
|
968
|
-
/**
|
|
969
|
-
*r" A single validation finding with its source location flattened into individual fields.
|
|
970
|
-
*/
|
|
971
|
-
export interface StandardDiagnostic {
|
|
972
|
-
/**
|
|
973
|
-
* Identifier of the rule that produced this finding; its leading letter encodes the severity.
|
|
974
|
-
*/
|
|
975
|
-
ruleId: string;
|
|
976
|
-
severity: Severity;
|
|
977
|
-
message: string;
|
|
978
|
-
/**
|
|
979
|
-
* Where the rule came from, such as a provider schema, the built-in engine, or a user-supplied rule.
|
|
980
|
-
*/
|
|
981
|
-
source: RuleOrigin;
|
|
982
|
-
/**
|
|
983
|
-
* The named template entity this finding targets - a resource, parameter, output, mapping, condition, or template rule - if any.
|
|
984
|
-
*/
|
|
985
|
-
entity?: Entity;
|
|
986
|
-
/**
|
|
987
|
-
* Path to the offending property within the resource, such as \'Properties.Name\'.
|
|
988
|
-
*/
|
|
989
|
-
propertyPath?: string;
|
|
990
|
-
suggestedFix?: string;
|
|
991
|
-
category?: string;
|
|
992
|
-
/**
|
|
993
|
-
* Line in the source template where the finding begins (1-based).
|
|
994
|
-
*/
|
|
995
|
-
startLine?: number;
|
|
996
|
-
startColumn?: number;
|
|
997
|
-
endLine?: number;
|
|
998
|
-
endColumn?: number;
|
|
999
|
-
relatedResources?: RelatedResource[];
|
|
1000
|
-
/**
|
|
1001
|
-
* Condition name to boolean assignment under which this finding applies, when it depends on template conditions.
|
|
1002
|
-
*/
|
|
1003
|
-
conditionScenario?: Record<string, boolean>;
|
|
1004
|
-
}
|
|
1005
|
-
|
|
1006
|
-
/**
|
|
1007
|
-
*r" A validation finding with additional context and enrichment beyond the standard finding.
|
|
1008
|
-
*/
|
|
1009
|
-
export interface DetailedDiagnostic {
|
|
1010
|
-
/**
|
|
1011
|
-
* Identifier of the rule that produced this finding; its leading letter encodes the severity.
|
|
1012
|
-
*/
|
|
1013
|
-
ruleId: string;
|
|
1014
|
-
severity: Severity;
|
|
1015
|
-
message: string;
|
|
1016
|
-
/**
|
|
1017
|
-
* Where the rule came from, such as a provider schema, the built-in engine, or a user-supplied rule.
|
|
1018
|
-
*/
|
|
1019
|
-
source: RuleOrigin;
|
|
1020
|
-
/**
|
|
1021
|
-
* The named template entity this finding targets - a resource, parameter, output, mapping, condition, or template rule - if any.
|
|
1022
|
-
*/
|
|
1023
|
-
entity?: Entity;
|
|
1024
|
-
/**
|
|
1025
|
-
* Path to the offending property within the resource, such as \'Properties.Name\'.
|
|
1026
|
-
*/
|
|
1027
|
-
propertyPath?: string;
|
|
1028
|
-
suggestedFix?: string;
|
|
1029
|
-
category?: string;
|
|
1030
|
-
/**
|
|
1031
|
-
* Line in the source template where the finding begins (1-based).
|
|
1032
|
-
*/
|
|
1033
|
-
startLine?: number;
|
|
1034
|
-
startColumn?: number;
|
|
1035
|
-
endLine?: number;
|
|
1036
|
-
endColumn?: number;
|
|
1037
|
-
relatedResources?: RelatedResource[];
|
|
1038
|
-
/**
|
|
1039
|
-
* Condition name to boolean assignment under which this finding applies, when it depends on template conditions.
|
|
1040
|
-
*/
|
|
1041
|
-
conditionScenario?: Record<string, boolean>;
|
|
1042
|
-
documentationUrl?: string;
|
|
1043
|
-
ruleDescription?: string;
|
|
1044
|
-
phase?: Phase;
|
|
1045
|
-
context?: ViolationContext;
|
|
1046
|
-
}
|
|
1047
|
-
|
|
1048
1040
|
export interface EngineConfig {
|
|
1049
1041
|
/**
|
|
1050
1042
|
* Engine-native custom rules (Rego or CEL depending on engine).
|
|
@@ -1116,6 +1108,7 @@ export interface Summary {
|
|
|
1116
1108
|
export interface ValidateConfig {
|
|
1117
1109
|
include?: RuleFilterConfig;
|
|
1118
1110
|
exclude?: RuleFilterConfig;
|
|
1111
|
+
detailLevel?: DetailLevel;
|
|
1119
1112
|
severityLevel?: Severity;
|
|
1120
1113
|
parameterOverrides?: Record<string, string>;
|
|
1121
1114
|
pseudoParameterOverrides?: PseudoParameterOverrides;
|
|
@@ -1124,7 +1117,7 @@ export interface ValidateConfig {
|
|
|
1124
1117
|
}
|
|
1125
1118
|
|
|
1126
1119
|
export interface WasmSchemaValidationResult {
|
|
1127
|
-
diagnostics:
|
|
1120
|
+
diagnostics: Diagnostic[];
|
|
1128
1121
|
metric: PhaseMetric;
|
|
1129
1122
|
}
|
|
1130
1123
|
|
|
@@ -1136,8 +1129,18 @@ export class WasmCelEngine {
|
|
|
1136
1129
|
engineName(): string;
|
|
1137
1130
|
listRules(): any;
|
|
1138
1131
|
constructor(config: EngineConfig);
|
|
1139
|
-
|
|
1140
|
-
|
|
1132
|
+
validateAwsCliCommand(request: any): any;
|
|
1133
|
+
validateTemplate(template: Uint8Array, options: ValidateConfig, file_path: string): any;
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
export class WasmCompositeEngine {
|
|
1137
|
+
free(): void;
|
|
1138
|
+
[Symbol.dispose](): void;
|
|
1139
|
+
engineName(): string;
|
|
1140
|
+
listRules(): any;
|
|
1141
|
+
constructor(config: CompositeEngineConfig);
|
|
1142
|
+
validateAwsCliCommand(request: any): any;
|
|
1143
|
+
validateTemplate(template: Uint8Array, options: ValidateConfig, file_path: string): any;
|
|
1141
1144
|
}
|
|
1142
1145
|
|
|
1143
1146
|
export class WasmRegoEngine {
|
|
@@ -1146,8 +1149,8 @@ export class WasmRegoEngine {
|
|
|
1146
1149
|
engineName(): string;
|
|
1147
1150
|
listRules(): any;
|
|
1148
1151
|
constructor(config: EngineConfig);
|
|
1149
|
-
|
|
1150
|
-
|
|
1152
|
+
validateAwsCliCommand(request: any): any;
|
|
1153
|
+
validateTemplate(template: Uint8Array, options: ValidateConfig, file_path: string): any;
|
|
1151
1154
|
}
|
|
1152
1155
|
|
|
1153
1156
|
export class WasmSchemaValidator {
|
package/bindings_wasm.js
CHANGED
|
@@ -48,18 +48,92 @@ class WasmCelEngine {
|
|
|
48
48
|
WasmCelEngineFinalization.register(this, this.__wbg_ptr, this);
|
|
49
49
|
return this;
|
|
50
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* @param {any} request
|
|
53
|
+
* @returns {any}
|
|
54
|
+
*/
|
|
55
|
+
validateAwsCliCommand(request) {
|
|
56
|
+
const ret = wasm.wasmcelengine_validateAwsCliCommand(this.__wbg_ptr, request);
|
|
57
|
+
if (ret[2]) {
|
|
58
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
59
|
+
}
|
|
60
|
+
return takeFromExternrefTable0(ret[0]);
|
|
61
|
+
}
|
|
51
62
|
/**
|
|
52
63
|
* @param {Uint8Array} template
|
|
53
64
|
* @param {ValidateConfig} options
|
|
54
65
|
* @param {string} file_path
|
|
55
66
|
* @returns {any}
|
|
56
67
|
*/
|
|
57
|
-
|
|
68
|
+
validateTemplate(template, options, file_path) {
|
|
58
69
|
const ptr0 = passArray8ToWasm0(template, wasm.__wbindgen_malloc);
|
|
59
70
|
const len0 = WASM_VECTOR_LEN;
|
|
60
71
|
const ptr1 = passStringToWasm0(file_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
61
72
|
const len1 = WASM_VECTOR_LEN;
|
|
62
|
-
const ret = wasm.
|
|
73
|
+
const ret = wasm.wasmcelengine_validateTemplate(this.__wbg_ptr, ptr0, len0, options, ptr1, len1);
|
|
74
|
+
if (ret[2]) {
|
|
75
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
76
|
+
}
|
|
77
|
+
return takeFromExternrefTable0(ret[0]);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
if (Symbol.dispose) WasmCelEngine.prototype[Symbol.dispose] = WasmCelEngine.prototype.free;
|
|
81
|
+
exports.WasmCelEngine = WasmCelEngine;
|
|
82
|
+
|
|
83
|
+
class WasmCompositeEngine {
|
|
84
|
+
__destroy_into_raw() {
|
|
85
|
+
const ptr = this.__wbg_ptr;
|
|
86
|
+
this.__wbg_ptr = 0;
|
|
87
|
+
WasmCompositeEngineFinalization.unregister(this);
|
|
88
|
+
return ptr;
|
|
89
|
+
}
|
|
90
|
+
free() {
|
|
91
|
+
const ptr = this.__destroy_into_raw();
|
|
92
|
+
wasm.__wbg_wasmcompositeengine_free(ptr, 0);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* @returns {string}
|
|
96
|
+
*/
|
|
97
|
+
engineName() {
|
|
98
|
+
let deferred1_0;
|
|
99
|
+
let deferred1_1;
|
|
100
|
+
try {
|
|
101
|
+
const ret = wasm.wasmcompositeengine_engineName(this.__wbg_ptr);
|
|
102
|
+
deferred1_0 = ret[0];
|
|
103
|
+
deferred1_1 = ret[1];
|
|
104
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
105
|
+
} finally {
|
|
106
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* @returns {any}
|
|
111
|
+
*/
|
|
112
|
+
listRules() {
|
|
113
|
+
const ret = wasm.wasmcompositeengine_listRules(this.__wbg_ptr);
|
|
114
|
+
if (ret[2]) {
|
|
115
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
116
|
+
}
|
|
117
|
+
return takeFromExternrefTable0(ret[0]);
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* @param {CompositeEngineConfig} config
|
|
121
|
+
*/
|
|
122
|
+
constructor(config) {
|
|
123
|
+
const ret = wasm.wasmcompositeengine_new(config);
|
|
124
|
+
if (ret[2]) {
|
|
125
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
126
|
+
}
|
|
127
|
+
this.__wbg_ptr = ret[0];
|
|
128
|
+
WasmCompositeEngineFinalization.register(this, this.__wbg_ptr, this);
|
|
129
|
+
return this;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* @param {any} request
|
|
133
|
+
* @returns {any}
|
|
134
|
+
*/
|
|
135
|
+
validateAwsCliCommand(request) {
|
|
136
|
+
const ret = wasm.wasmcompositeengine_validateAwsCliCommand(this.__wbg_ptr, request);
|
|
63
137
|
if (ret[2]) {
|
|
64
138
|
throw takeFromExternrefTable0(ret[1]);
|
|
65
139
|
}
|
|
@@ -71,20 +145,20 @@ class WasmCelEngine {
|
|
|
71
145
|
* @param {string} file_path
|
|
72
146
|
* @returns {any}
|
|
73
147
|
*/
|
|
74
|
-
|
|
148
|
+
validateTemplate(template, options, file_path) {
|
|
75
149
|
const ptr0 = passArray8ToWasm0(template, wasm.__wbindgen_malloc);
|
|
76
150
|
const len0 = WASM_VECTOR_LEN;
|
|
77
151
|
const ptr1 = passStringToWasm0(file_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
78
152
|
const len1 = WASM_VECTOR_LEN;
|
|
79
|
-
const ret = wasm.
|
|
153
|
+
const ret = wasm.wasmcompositeengine_validateTemplate(this.__wbg_ptr, ptr0, len0, options, ptr1, len1);
|
|
80
154
|
if (ret[2]) {
|
|
81
155
|
throw takeFromExternrefTable0(ret[1]);
|
|
82
156
|
}
|
|
83
157
|
return takeFromExternrefTable0(ret[0]);
|
|
84
158
|
}
|
|
85
159
|
}
|
|
86
|
-
if (Symbol.dispose)
|
|
87
|
-
exports.
|
|
160
|
+
if (Symbol.dispose) WasmCompositeEngine.prototype[Symbol.dispose] = WasmCompositeEngine.prototype.free;
|
|
161
|
+
exports.WasmCompositeEngine = WasmCompositeEngine;
|
|
88
162
|
|
|
89
163
|
class WasmRegoEngine {
|
|
90
164
|
__destroy_into_raw() {
|
|
@@ -135,17 +209,11 @@ class WasmRegoEngine {
|
|
|
135
209
|
return this;
|
|
136
210
|
}
|
|
137
211
|
/**
|
|
138
|
-
* @param {
|
|
139
|
-
* @param {ValidateConfig} options
|
|
140
|
-
* @param {string} file_path
|
|
212
|
+
* @param {any} request
|
|
141
213
|
* @returns {any}
|
|
142
214
|
*/
|
|
143
|
-
|
|
144
|
-
const
|
|
145
|
-
const len0 = WASM_VECTOR_LEN;
|
|
146
|
-
const ptr1 = passStringToWasm0(file_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
147
|
-
const len1 = WASM_VECTOR_LEN;
|
|
148
|
-
const ret = wasm.wasmregoengine_validateDetailed(this.__wbg_ptr, ptr0, len0, options, ptr1, len1);
|
|
215
|
+
validateAwsCliCommand(request) {
|
|
216
|
+
const ret = wasm.wasmregoengine_validateAwsCliCommand(this.__wbg_ptr, request);
|
|
149
217
|
if (ret[2]) {
|
|
150
218
|
throw takeFromExternrefTable0(ret[1]);
|
|
151
219
|
}
|
|
@@ -157,12 +225,12 @@ class WasmRegoEngine {
|
|
|
157
225
|
* @param {string} file_path
|
|
158
226
|
* @returns {any}
|
|
159
227
|
*/
|
|
160
|
-
|
|
228
|
+
validateTemplate(template, options, file_path) {
|
|
161
229
|
const ptr0 = passArray8ToWasm0(template, wasm.__wbindgen_malloc);
|
|
162
230
|
const len0 = WASM_VECTOR_LEN;
|
|
163
231
|
const ptr1 = passStringToWasm0(file_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
164
232
|
const len1 = WASM_VECTOR_LEN;
|
|
165
|
-
const ret = wasm.
|
|
233
|
+
const ret = wasm.wasmregoengine_validateTemplate(this.__wbg_ptr, ptr0, len0, options, ptr1, len1);
|
|
166
234
|
if (ret[2]) {
|
|
167
235
|
throw takeFromExternrefTable0(ret[1]);
|
|
168
236
|
}
|
|
@@ -401,6 +469,12 @@ function __wbg_get_imports() {
|
|
|
401
469
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
402
470
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
403
471
|
},
|
|
472
|
+
__wbg___wbindgen_bigint_get_as_i64_d968e41184ae354f: function (arg0, arg1) {
|
|
473
|
+
const v = arg1;
|
|
474
|
+
const ret = typeof v === 'bigint' ? v : undefined;
|
|
475
|
+
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
476
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
477
|
+
},
|
|
404
478
|
__wbg___wbindgen_boolean_get_fa956cfa2d1bd751: function (arg0) {
|
|
405
479
|
const v = arg0;
|
|
406
480
|
const ret = typeof v === 'boolean' ? v : undefined;
|
|
@@ -417,6 +491,10 @@ function __wbg_get_imports() {
|
|
|
417
491
|
const ret = arg0 in arg1;
|
|
418
492
|
return ret;
|
|
419
493
|
},
|
|
494
|
+
__wbg___wbindgen_is_bigint_2f76dc55065b4273: function (arg0) {
|
|
495
|
+
const ret = typeof arg0 === 'bigint';
|
|
496
|
+
return ret;
|
|
497
|
+
},
|
|
420
498
|
__wbg___wbindgen_is_function_1ff95bcc5517c252: function (arg0) {
|
|
421
499
|
const ret = typeof arg0 === 'function';
|
|
422
500
|
return ret;
|
|
@@ -434,6 +512,10 @@ function __wbg_get_imports() {
|
|
|
434
512
|
const ret = arg0 === undefined;
|
|
435
513
|
return ret;
|
|
436
514
|
},
|
|
515
|
+
__wbg___wbindgen_jsval_eq_e659fcf7b0e32763: function (arg0, arg1) {
|
|
516
|
+
const ret = arg0 === arg1;
|
|
517
|
+
return ret;
|
|
518
|
+
},
|
|
437
519
|
__wbg___wbindgen_jsval_loose_eq_db4c3b15f63fc170: function (arg0, arg1) {
|
|
438
520
|
const ret = arg0 == arg1;
|
|
439
521
|
return ret;
|
|
@@ -485,6 +567,10 @@ function __wbg_get_imports() {
|
|
|
485
567
|
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
486
568
|
}, arguments);
|
|
487
569
|
},
|
|
570
|
+
__wbg_getTime_d6f070c088c9b5ed: function (arg0) {
|
|
571
|
+
const ret = arg0.getTime();
|
|
572
|
+
return ret;
|
|
573
|
+
},
|
|
488
574
|
__wbg_get_507a50627bffa49b: function (arg0, arg1) {
|
|
489
575
|
const ret = arg0[arg1 >>> 0];
|
|
490
576
|
return ret;
|
|
@@ -513,6 +599,16 @@ function __wbg_get_imports() {
|
|
|
513
599
|
const ret = result;
|
|
514
600
|
return ret;
|
|
515
601
|
},
|
|
602
|
+
__wbg_instanceof_Map_e5b5e3db98422fcc: function (arg0) {
|
|
603
|
+
let result;
|
|
604
|
+
try {
|
|
605
|
+
result = arg0 instanceof Map;
|
|
606
|
+
} catch (_) {
|
|
607
|
+
result = false;
|
|
608
|
+
}
|
|
609
|
+
const ret = result;
|
|
610
|
+
return ret;
|
|
611
|
+
},
|
|
516
612
|
__wbg_instanceof_Uint8Array_309b927aaf7a3fc7: function (arg0) {
|
|
517
613
|
let result;
|
|
518
614
|
try {
|
|
@@ -543,6 +639,10 @@ function __wbg_get_imports() {
|
|
|
543
639
|
const ret = arg0.length;
|
|
544
640
|
return ret;
|
|
545
641
|
},
|
|
642
|
+
__wbg_new_0_3da9e97f24fc69be: function () {
|
|
643
|
+
const ret = new Date();
|
|
644
|
+
return ret;
|
|
645
|
+
},
|
|
546
646
|
__wbg_new_227d7c05414eb861: function () {
|
|
547
647
|
const ret = new Error();
|
|
548
648
|
return ret;
|
|
@@ -661,6 +761,10 @@ const WasmCelEngineFinalization =
|
|
|
661
761
|
typeof FinalizationRegistry === 'undefined'
|
|
662
762
|
? { register: () => {}, unregister: () => {} }
|
|
663
763
|
: new FinalizationRegistry((ptr) => wasm.__wbg_wasmcelengine_free(ptr, 1));
|
|
764
|
+
const WasmCompositeEngineFinalization =
|
|
765
|
+
typeof FinalizationRegistry === 'undefined'
|
|
766
|
+
? { register: () => {}, unregister: () => {} }
|
|
767
|
+
: new FinalizationRegistry((ptr) => wasm.__wbg_wasmcompositeengine_free(ptr, 1));
|
|
664
768
|
const WasmRegoEngineFinalization =
|
|
665
769
|
typeof FinalizationRegistry === 'undefined'
|
|
666
770
|
? { register: () => {}, unregister: () => {} }
|
package/bindings_wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export const __wbg_wasmcelengine_free: (a: number, b: number) => void;
|
|
5
|
+
export const __wbg_wasmcompositeengine_free: (a: number, b: number) => void;
|
|
5
6
|
export const __wbg_wasmregoengine_free: (a: number, b: number) => void;
|
|
6
7
|
export const __wbg_wasmschemavalidator_free: (a: number, b: number) => void;
|
|
7
8
|
export const __wbg_wasmsemanticmodel_free: (a: number, b: number) => void;
|
|
@@ -10,7 +11,8 @@ export const version: () => [number, number];
|
|
|
10
11
|
export const wasmcelengine_engineName: (a: number) => [number, number];
|
|
11
12
|
export const wasmcelengine_listRules: (a: number) => [number, number, number];
|
|
12
13
|
export const wasmcelengine_new: (a: any) => [number, number, number];
|
|
13
|
-
export const
|
|
14
|
+
export const wasmcelengine_validateAwsCliCommand: (a: number, b: any) => [number, number, number];
|
|
15
|
+
export const wasmcelengine_validateTemplate: (
|
|
14
16
|
a: number,
|
|
15
17
|
b: number,
|
|
16
18
|
c: number,
|
|
@@ -18,7 +20,11 @@ export const wasmcelengine_validateDetailed: (
|
|
|
18
20
|
e: number,
|
|
19
21
|
f: number,
|
|
20
22
|
) => [number, number, number];
|
|
21
|
-
export const
|
|
23
|
+
export const wasmcompositeengine_engineName: (a: number) => [number, number];
|
|
24
|
+
export const wasmcompositeengine_listRules: (a: number) => [number, number, number];
|
|
25
|
+
export const wasmcompositeengine_new: (a: any) => [number, number, number];
|
|
26
|
+
export const wasmcompositeengine_validateAwsCliCommand: (a: number, b: any) => [number, number, number];
|
|
27
|
+
export const wasmcompositeengine_validateTemplate: (
|
|
22
28
|
a: number,
|
|
23
29
|
b: number,
|
|
24
30
|
c: number,
|
|
@@ -29,15 +35,8 @@ export const wasmcelengine_validateStandard: (
|
|
|
29
35
|
export const wasmregoengine_engineName: (a: number) => [number, number];
|
|
30
36
|
export const wasmregoengine_listRules: (a: number) => [number, number, number];
|
|
31
37
|
export const wasmregoengine_new: (a: any) => [number, number, number];
|
|
32
|
-
export const
|
|
33
|
-
|
|
34
|
-
b: number,
|
|
35
|
-
c: number,
|
|
36
|
-
d: any,
|
|
37
|
-
e: number,
|
|
38
|
-
f: number,
|
|
39
|
-
) => [number, number, number];
|
|
40
|
-
export const wasmregoengine_validateStandard: (
|
|
38
|
+
export const wasmregoengine_validateAwsCliCommand: (a: number, b: any) => [number, number, number];
|
|
39
|
+
export const wasmregoengine_validateTemplate: (
|
|
41
40
|
a: number,
|
|
42
41
|
b: number,
|
|
43
42
|
c: number,
|