@aws/cloudformation-validate 1.3.0-beta → 1.5.0-beta

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 CHANGED
@@ -177,7 +177,7 @@ validator.free();
177
177
  interface StandardReport {
178
178
  filePath: string;
179
179
  status: "OK" | "ERROR"; // ERROR when the template fails to parse
180
- engineVersion: string;
180
+ version: string;
181
181
  metadata: ReportMetadata;
182
182
  performance: PerformanceMetrics;
183
183
  diagnostics: StandardDiagnostic[];
@@ -558,7 +558,7 @@ export type DetailLevel = 'STANDARD' | 'DETAILED';
558
558
  export interface DetailedReport {
559
559
  filePath: string;
560
560
  status: ReportStatus;
561
- engineVersion: string;
561
+ version: string;
562
562
  metadata: ReportMetadata;
563
563
  performance: PerformanceMetrics;
564
564
  diagnostics: DetailedDiagnostic[];
@@ -690,7 +690,7 @@ export type EngineType = 'REGO' | 'CEL';
690
690
  export interface StandardReport {
691
691
  filePath: string;
692
692
  status: ReportStatus;
693
- engineVersion: string;
693
+ version: string;
694
694
  metadata: ReportMetadata;
695
695
  performance: PerformanceMetrics;
696
696
  diagnostics: StandardDiagnostic[];
@@ -986,7 +986,7 @@ export class WasmSchemaValidator {
986
986
  listRules(): any;
987
987
  constructor();
988
988
  schemaCount(): number;
989
- validate(model: WasmSemanticModel, region: string): any;
989
+ validate(model: WasmSemanticModel, region?: string | null): any;
990
990
  }
991
991
 
992
992
  export class WasmSemanticModel {
package/bindings_wasm.js CHANGED
@@ -208,13 +208,13 @@ class WasmSchemaValidator {
208
208
  }
209
209
  /**
210
210
  * @param {WasmSemanticModel} model
211
- * @param {string} region
211
+ * @param {string | null} [region]
212
212
  * @returns {any}
213
213
  */
214
214
  validate(model, region) {
215
215
  _assertClass(model, WasmSemanticModel);
216
- const ptr0 = passStringToWasm0(region, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
217
- const len0 = WASM_VECTOR_LEN;
216
+ var ptr0 = isLikeNone(region) ? 0 : passStringToWasm0(region, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
217
+ var len0 = WASM_VECTOR_LEN;
218
218
  const ret = wasm.wasmschemavalidator_validate(this.__wbg_ptr, model.__wbg_ptr, ptr0, len0);
219
219
  if (ret[2]) {
220
220
  throw takeFromExternrefTable0(ret[1]);
Binary file
package/index.js CHANGED
@@ -64,7 +64,7 @@ class SchemaValidator {
64
64
  schemaCount() {
65
65
  return this.inner.schemaCount();
66
66
  }
67
- validate(template, region = 'us-east-1') {
67
+ validate(template, region) {
68
68
  const model = bridge.WasmSemanticModel.parse(template.readBytes());
69
69
  try {
70
70
  return this.inner.validate(model, region).diagnostics;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws/cloudformation-validate",
3
- "version": "1.3.0-beta",
3
+ "version": "1.5.0-beta",
4
4
  "description": "AWS CloudFormation Validate",
5
5
  "keywords": [
6
6
  "aws",