@aws/cloudformation-validate 1.3.0-beta → 1.4.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.
@@ -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.4.0-beta",
4
4
  "description": "AWS CloudFormation Validate",
5
5
  "keywords": [
6
6
  "aws",