cdk-from-cfn 0.297.0 → 0.299.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.
Files changed (3) hide show
  1. package/index.js +107 -107
  2. package/index_bg.wasm +0 -0
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -1,6 +1,107 @@
1
+ /* @ts-self-types="./index.d.ts" */
1
2
 
2
- let imports = {};
3
- imports['__wbindgen_placeholder__'] = module.exports;
3
+ /**
4
+ * Returns an array containing all supported language names.
5
+ * @returns {any[]}
6
+ */
7
+ function supported_languages() {
8
+ const ret = wasm.supported_languages();
9
+ var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
10
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
11
+ return v1;
12
+ }
13
+ exports.supported_languages = supported_languages;
14
+
15
+ /**
16
+ * Transforms the provided template into a CDK application in the specified
17
+ * language.
18
+ * @param {string} template
19
+ * @param {string} language
20
+ * @param {string} class_name
21
+ * @param {string | null} [class_type]
22
+ * @returns {string}
23
+ */
24
+ function transmute(template, language, class_name, class_type) {
25
+ let deferred6_0;
26
+ let deferred6_1;
27
+ try {
28
+ const ptr0 = passStringToWasm0(template, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
29
+ const len0 = WASM_VECTOR_LEN;
30
+ const ptr1 = passStringToWasm0(language, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
31
+ const len1 = WASM_VECTOR_LEN;
32
+ const ptr2 = passStringToWasm0(class_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
33
+ const len2 = WASM_VECTOR_LEN;
34
+ var ptr3 = isLikeNone(class_type) ? 0 : passStringToWasm0(class_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
35
+ var len3 = WASM_VECTOR_LEN;
36
+ const ret = wasm.transmute(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
37
+ var ptr5 = ret[0];
38
+ var len5 = ret[1];
39
+ if (ret[3]) {
40
+ ptr5 = 0; len5 = 0;
41
+ throw takeFromExternrefTable0(ret[2]);
42
+ }
43
+ deferred6_0 = ptr5;
44
+ deferred6_1 = len5;
45
+ return getStringFromWasm0(ptr5, len5);
46
+ } finally {
47
+ wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
48
+ }
49
+ }
50
+ exports.transmute = transmute;
51
+
52
+ function wasm_init() {
53
+ wasm.wasm_init();
54
+ }
55
+ exports.wasm_init = wasm_init;
56
+ function __wbg_get_imports() {
57
+ const import0 = {
58
+ __proto__: null,
59
+ __wbg_Error_3639a60ed15f87e7: function(arg0, arg1) {
60
+ const ret = Error(getStringFromWasm0(arg0, arg1));
61
+ return ret;
62
+ },
63
+ __wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {
64
+ let deferred0_0;
65
+ let deferred0_1;
66
+ try {
67
+ deferred0_0 = arg0;
68
+ deferred0_1 = arg1;
69
+ console.error(getStringFromWasm0(arg0, arg1));
70
+ } finally {
71
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
72
+ }
73
+ },
74
+ __wbg_new_227d7c05414eb861: function() {
75
+ const ret = new Error();
76
+ return ret;
77
+ },
78
+ __wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
79
+ const ret = arg1.stack;
80
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
81
+ const len1 = WASM_VECTOR_LEN;
82
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
83
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
84
+ },
85
+ __wbindgen_cast_0000000000000001: function(arg0, arg1) {
86
+ // Cast intrinsic for `Ref(String) -> Externref`.
87
+ const ret = getStringFromWasm0(arg0, arg1);
88
+ return ret;
89
+ },
90
+ __wbindgen_init_externref_table: function() {
91
+ const table = wasm.__wbindgen_externrefs;
92
+ const offset = table.grow(4);
93
+ table.set(0, undefined);
94
+ table.set(offset + 0, undefined);
95
+ table.set(offset + 1, null);
96
+ table.set(offset + 2, true);
97
+ table.set(offset + 3, false);
98
+ },
99
+ };
100
+ return {
101
+ __proto__: null,
102
+ "./index_bg.js": import0,
103
+ };
104
+ }
4
105
 
5
106
  function getArrayJsValueFromWasm0(ptr, len) {
6
107
  ptr = ptr >>> 0;
@@ -22,8 +123,7 @@ function getDataViewMemory0() {
22
123
  }
23
124
 
24
125
  function getStringFromWasm0(ptr, len) {
25
- ptr = ptr >>> 0;
26
- return decodeText(ptr, len);
126
+ return decodeText(ptr >>> 0, len);
27
127
  }
28
128
 
29
129
  let cachedUint8ArrayMemory0 = null;
@@ -97,114 +197,14 @@ if (!('encodeInto' in cachedTextEncoder)) {
97
197
  read: arg.length,
98
198
  written: buf.length
99
199
  };
100
- }
200
+ };
101
201
  }
102
202
 
103
203
  let WASM_VECTOR_LEN = 0;
104
204
 
105
- /**
106
- * Returns an array containing all supported language names.
107
- * @returns {any[]}
108
- */
109
- function supported_languages() {
110
- const ret = wasm.supported_languages();
111
- var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
112
- wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
113
- return v1;
114
- }
115
- exports.supported_languages = supported_languages;
116
-
117
- /**
118
- * Transforms the provided template into a CDK application in the specified
119
- * language.
120
- * @param {string} template
121
- * @param {string} language
122
- * @param {string} class_name
123
- * @param {string | null} [class_type]
124
- * @returns {string}
125
- */
126
- function transmute(template, language, class_name, class_type) {
127
- let deferred6_0;
128
- let deferred6_1;
129
- try {
130
- const ptr0 = passStringToWasm0(template, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
131
- const len0 = WASM_VECTOR_LEN;
132
- const ptr1 = passStringToWasm0(language, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
133
- const len1 = WASM_VECTOR_LEN;
134
- const ptr2 = passStringToWasm0(class_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
135
- const len2 = WASM_VECTOR_LEN;
136
- var ptr3 = isLikeNone(class_type) ? 0 : passStringToWasm0(class_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
137
- var len3 = WASM_VECTOR_LEN;
138
- const ret = wasm.transmute(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
139
- var ptr5 = ret[0];
140
- var len5 = ret[1];
141
- if (ret[3]) {
142
- ptr5 = 0; len5 = 0;
143
- throw takeFromExternrefTable0(ret[2]);
144
- }
145
- deferred6_0 = ptr5;
146
- deferred6_1 = len5;
147
- return getStringFromWasm0(ptr5, len5);
148
- } finally {
149
- wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
150
- }
151
- }
152
- exports.transmute = transmute;
153
-
154
- function wasm_init() {
155
- wasm.wasm_init();
156
- }
157
- exports.wasm_init = wasm_init;
158
-
159
- exports.__wbg_Error_52673b7de5a0ca89 = function(arg0, arg1) {
160
- const ret = Error(getStringFromWasm0(arg0, arg1));
161
- return ret;
162
- };
163
-
164
- exports.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
165
- let deferred0_0;
166
- let deferred0_1;
167
- try {
168
- deferred0_0 = arg0;
169
- deferred0_1 = arg1;
170
- console.error(getStringFromWasm0(arg0, arg1));
171
- } finally {
172
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
173
- }
174
- };
175
-
176
- exports.__wbg_new_8a6f238a6ece86ea = function() {
177
- const ret = new Error();
178
- return ret;
179
- };
180
-
181
- exports.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
182
- const ret = arg1.stack;
183
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
184
- const len1 = WASM_VECTOR_LEN;
185
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
186
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
187
- };
188
-
189
- exports.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
190
- // Cast intrinsic for `Ref(String) -> Externref`.
191
- const ret = getStringFromWasm0(arg0, arg1);
192
- return ret;
193
- };
194
-
195
- exports.__wbindgen_init_externref_table = function() {
196
- const table = wasm.__wbindgen_externrefs;
197
- const offset = table.grow(4);
198
- table.set(0, undefined);
199
- table.set(offset + 0, undefined);
200
- table.set(offset + 1, null);
201
- table.set(offset + 2, true);
202
- table.set(offset + 3, false);
203
- };
204
-
205
205
  const wasmPath = `${__dirname}/index_bg.wasm`;
206
206
  const wasmBytes = require('fs').readFileSync(wasmPath);
207
207
  const wasmModule = new WebAssembly.Module(wasmBytes);
208
- const wasm = exports.__wasm = new WebAssembly.Instance(wasmModule, imports).exports;
209
-
208
+ let wasmInstance = new WebAssembly.Instance(wasmModule, __wbg_get_imports());
209
+ let wasm = wasmInstance.exports;
210
210
  wasm.__wbindgen_start();
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.297.0",
4
+ "version": "0.299.0",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",