cdk-from-cfn 0.162.0 → 0.162.1

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/index.d.ts CHANGED
@@ -1,16 +1,16 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  /**
4
- * Returns an array containing all supported language names.
5
- * @returns {any[]}
6
- */
4
+ * Returns an array containing all supported language names.
5
+ * @returns {any[]}
6
+ */
7
7
  export function supported_languages(): any[];
8
8
  /**
9
- * Transforms the provided template into a CDK application in the specified
10
- * language.
11
- * @param {string} template
12
- * @param {string} language
13
- * @param {string} stack_name
14
- * @returns {string}
15
- */
9
+ * Transforms the provided template into a CDK application in the specified
10
+ * language.
11
+ * @param {string} template
12
+ * @param {string} language
13
+ * @param {string} stack_name
14
+ * @returns {string}
15
+ */
16
16
  export function transmute(template: string, language: string, stack_name: string): string;
package/index.js CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  let imports = {};
2
3
  imports['__wbindgen_placeholder__'] = module.exports;
3
4
  let wasm;
@@ -7,18 +8,18 @@ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true
7
8
 
8
9
  cachedTextDecoder.decode();
9
10
 
10
- let cachedUint8Memory0 = null;
11
+ let cachedUint8ArrayMemory0 = null;
11
12
 
12
- function getUint8Memory0() {
13
- if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
14
- cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
13
+ function getUint8ArrayMemory0() {
14
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
15
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
15
16
  }
16
- return cachedUint8Memory0;
17
+ return cachedUint8ArrayMemory0;
17
18
  }
18
19
 
19
20
  function getStringFromWasm0(ptr, len) {
20
21
  ptr = ptr >>> 0;
21
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
22
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
22
23
  }
23
24
 
24
25
  const heap = new Array(128).fill(undefined);
@@ -36,22 +37,13 @@ function addHeapObject(obj) {
36
37
  return idx;
37
38
  }
38
39
 
39
- let cachedInt32Memory0 = null;
40
-
41
- function getInt32Memory0() {
42
- if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
43
- cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
44
- }
45
- return cachedInt32Memory0;
46
- }
47
-
48
- let cachedUint32Memory0 = null;
40
+ let cachedDataViewMemory0 = null;
49
41
 
50
- function getUint32Memory0() {
51
- if (cachedUint32Memory0 === null || cachedUint32Memory0.byteLength === 0) {
52
- cachedUint32Memory0 = new Uint32Array(wasm.memory.buffer);
42
+ function getDataViewMemory0() {
43
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
44
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
53
45
  }
54
- return cachedUint32Memory0;
46
+ return cachedDataViewMemory0;
55
47
  }
56
48
 
57
49
  function getObject(idx) { return heap[idx]; }
@@ -70,24 +62,23 @@ function takeObject(idx) {
70
62
 
71
63
  function getArrayJsValueFromWasm0(ptr, len) {
72
64
  ptr = ptr >>> 0;
73
- const mem = getUint32Memory0();
74
- const slice = mem.subarray(ptr / 4, ptr / 4 + len);
65
+ const mem = getDataViewMemory0();
75
66
  const result = [];
76
- for (let i = 0; i < slice.length; i++) {
77
- result.push(takeObject(slice[i]));
67
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
68
+ result.push(takeObject(mem.getUint32(i, true)));
78
69
  }
79
70
  return result;
80
71
  }
81
72
  /**
82
- * Returns an array containing all supported language names.
83
- * @returns {any[]}
84
- */
73
+ * Returns an array containing all supported language names.
74
+ * @returns {any[]}
75
+ */
85
76
  module.exports.supported_languages = function() {
86
77
  try {
87
78
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
88
79
  wasm.supported_languages(retptr);
89
- var r0 = getInt32Memory0()[retptr / 4 + 0];
90
- var r1 = getInt32Memory0()[retptr / 4 + 1];
80
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
81
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
91
82
  var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
92
83
  wasm.__wbindgen_free(r0, r1 * 4, 4);
93
84
  return v1;
@@ -118,7 +109,7 @@ function passStringToWasm0(arg, malloc, realloc) {
118
109
  if (realloc === undefined) {
119
110
  const buf = cachedTextEncoder.encode(arg);
120
111
  const ptr = malloc(buf.length, 1) >>> 0;
121
- getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
112
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
122
113
  WASM_VECTOR_LEN = buf.length;
123
114
  return ptr;
124
115
  }
@@ -126,7 +117,7 @@ function passStringToWasm0(arg, malloc, realloc) {
126
117
  let len = arg.length;
127
118
  let ptr = malloc(len, 1) >>> 0;
128
119
 
129
- const mem = getUint8Memory0();
120
+ const mem = getUint8ArrayMemory0();
130
121
 
131
122
  let offset = 0;
132
123
 
@@ -141,7 +132,7 @@ function passStringToWasm0(arg, malloc, realloc) {
141
132
  arg = arg.slice(offset);
142
133
  }
143
134
  ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
144
- const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
135
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
145
136
  const ret = encodeString(arg, view);
146
137
 
147
138
  offset += ret.written;
@@ -152,13 +143,13 @@ function passStringToWasm0(arg, malloc, realloc) {
152
143
  return ptr;
153
144
  }
154
145
  /**
155
- * Transforms the provided template into a CDK application in the specified
156
- * language.
157
- * @param {string} template
158
- * @param {string} language
159
- * @param {string} stack_name
160
- * @returns {string}
161
- */
146
+ * Transforms the provided template into a CDK application in the specified
147
+ * language.
148
+ * @param {string} template
149
+ * @param {string} language
150
+ * @param {string} stack_name
151
+ * @returns {string}
152
+ */
162
153
  module.exports.transmute = function(template, language, stack_name) {
163
154
  let deferred5_0;
164
155
  let deferred5_1;
@@ -171,10 +162,10 @@ module.exports.transmute = function(template, language, stack_name) {
171
162
  const ptr2 = passStringToWasm0(stack_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
172
163
  const len2 = WASM_VECTOR_LEN;
173
164
  wasm.transmute(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
174
- var r0 = getInt32Memory0()[retptr / 4 + 0];
175
- var r1 = getInt32Memory0()[retptr / 4 + 1];
176
- var r2 = getInt32Memory0()[retptr / 4 + 2];
177
- var r3 = getInt32Memory0()[retptr / 4 + 3];
165
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
166
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
167
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
168
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
178
169
  var ptr4 = r0;
179
170
  var len4 = r1;
180
171
  if (r3) {
package/index_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cdk-from-cfn",
3
3
  "description": "Turn AWS CloudFormation templates into AWS CDK applications",
4
- "version": "0.162.0",
4
+ "version": "0.162.1",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",