cdk-from-cfn 0.175.0 → 0.177.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/index.d.ts +1 -0
- package/index.js +85 -78
- package/index_bg.wasm +0 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
package/index.js
CHANGED
@@ -22,71 +22,6 @@ function getStringFromWasm0(ptr, len) {
|
|
22
22
|
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
23
23
|
}
|
24
24
|
|
25
|
-
const heap = new Array(128).fill(undefined);
|
26
|
-
|
27
|
-
heap.push(undefined, null, true, false);
|
28
|
-
|
29
|
-
let heap_next = heap.length;
|
30
|
-
|
31
|
-
function addHeapObject(obj) {
|
32
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
33
|
-
const idx = heap_next;
|
34
|
-
heap_next = heap[idx];
|
35
|
-
|
36
|
-
heap[idx] = obj;
|
37
|
-
return idx;
|
38
|
-
}
|
39
|
-
|
40
|
-
let cachedDataViewMemory0 = null;
|
41
|
-
|
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);
|
45
|
-
}
|
46
|
-
return cachedDataViewMemory0;
|
47
|
-
}
|
48
|
-
|
49
|
-
function getObject(idx) { return heap[idx]; }
|
50
|
-
|
51
|
-
function dropObject(idx) {
|
52
|
-
if (idx < 132) return;
|
53
|
-
heap[idx] = heap_next;
|
54
|
-
heap_next = idx;
|
55
|
-
}
|
56
|
-
|
57
|
-
function takeObject(idx) {
|
58
|
-
const ret = getObject(idx);
|
59
|
-
dropObject(idx);
|
60
|
-
return ret;
|
61
|
-
}
|
62
|
-
|
63
|
-
function getArrayJsValueFromWasm0(ptr, len) {
|
64
|
-
ptr = ptr >>> 0;
|
65
|
-
const mem = getDataViewMemory0();
|
66
|
-
const result = [];
|
67
|
-
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
68
|
-
result.push(takeObject(mem.getUint32(i, true)));
|
69
|
-
}
|
70
|
-
return result;
|
71
|
-
}
|
72
|
-
/**
|
73
|
-
* Returns an array containing all supported language names.
|
74
|
-
* @returns {any[]}
|
75
|
-
*/
|
76
|
-
module.exports.supported_languages = function() {
|
77
|
-
try {
|
78
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
79
|
-
wasm.supported_languages(retptr);
|
80
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
81
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
82
|
-
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
83
|
-
wasm.__wbindgen_free(r0, r1 * 4, 4);
|
84
|
-
return v1;
|
85
|
-
} finally {
|
86
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
87
|
-
}
|
88
|
-
};
|
89
|
-
|
90
25
|
let WASM_VECTOR_LEN = 0;
|
91
26
|
|
92
27
|
let cachedTextEncoder = new TextEncoder('utf-8');
|
@@ -142,6 +77,42 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
142
77
|
WASM_VECTOR_LEN = offset;
|
143
78
|
return ptr;
|
144
79
|
}
|
80
|
+
|
81
|
+
let cachedDataViewMemory0 = null;
|
82
|
+
|
83
|
+
function getDataViewMemory0() {
|
84
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
85
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
86
|
+
}
|
87
|
+
return cachedDataViewMemory0;
|
88
|
+
}
|
89
|
+
|
90
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
91
|
+
ptr = ptr >>> 0;
|
92
|
+
const mem = getDataViewMemory0();
|
93
|
+
const result = [];
|
94
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
95
|
+
result.push(wasm.__wbindgen_export_3.get(mem.getUint32(i, true)));
|
96
|
+
}
|
97
|
+
wasm.__externref_drop_slice(ptr, len);
|
98
|
+
return result;
|
99
|
+
}
|
100
|
+
/**
|
101
|
+
* Returns an array containing all supported language names.
|
102
|
+
* @returns {any[]}
|
103
|
+
*/
|
104
|
+
module.exports.supported_languages = function() {
|
105
|
+
const ret = wasm.supported_languages();
|
106
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
107
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
108
|
+
return v1;
|
109
|
+
};
|
110
|
+
|
111
|
+
function takeFromExternrefTable0(idx) {
|
112
|
+
const value = wasm.__wbindgen_export_3.get(idx);
|
113
|
+
wasm.__externref_table_dealloc(idx);
|
114
|
+
return value;
|
115
|
+
}
|
145
116
|
/**
|
146
117
|
* Transforms the provided template into a CDK application in the specified
|
147
118
|
* language.
|
@@ -154,41 +125,75 @@ module.exports.transmute = function(template, language, stack_name) {
|
|
154
125
|
let deferred5_0;
|
155
126
|
let deferred5_1;
|
156
127
|
try {
|
157
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
158
128
|
const ptr0 = passStringToWasm0(template, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
159
129
|
const len0 = WASM_VECTOR_LEN;
|
160
130
|
const ptr1 = passStringToWasm0(language, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
161
131
|
const len1 = WASM_VECTOR_LEN;
|
162
132
|
const ptr2 = passStringToWasm0(stack_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
163
133
|
const len2 = WASM_VECTOR_LEN;
|
164
|
-
wasm.transmute(
|
165
|
-
var
|
166
|
-
var
|
167
|
-
|
168
|
-
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
169
|
-
var ptr4 = r0;
|
170
|
-
var len4 = r1;
|
171
|
-
if (r3) {
|
134
|
+
const ret = wasm.transmute(ptr0, len0, ptr1, len1, ptr2, len2);
|
135
|
+
var ptr4 = ret[0];
|
136
|
+
var len4 = ret[1];
|
137
|
+
if (ret[3]) {
|
172
138
|
ptr4 = 0; len4 = 0;
|
173
|
-
throw
|
139
|
+
throw takeFromExternrefTable0(ret[2]);
|
174
140
|
}
|
175
141
|
deferred5_0 = ptr4;
|
176
142
|
deferred5_1 = len4;
|
177
143
|
return getStringFromWasm0(ptr4, len4);
|
178
144
|
} finally {
|
179
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
180
145
|
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
181
146
|
}
|
182
147
|
};
|
183
148
|
|
149
|
+
module.exports.wasm_init = function() {
|
150
|
+
wasm.wasm_init();
|
151
|
+
};
|
152
|
+
|
153
|
+
module.exports.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
|
154
|
+
let deferred0_0;
|
155
|
+
let deferred0_1;
|
156
|
+
try {
|
157
|
+
deferred0_0 = arg0;
|
158
|
+
deferred0_1 = arg1;
|
159
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
160
|
+
} finally {
|
161
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
162
|
+
}
|
163
|
+
};
|
164
|
+
|
165
|
+
module.exports.__wbg_new_8a6f238a6ece86ea = function() {
|
166
|
+
const ret = new Error();
|
167
|
+
return ret;
|
168
|
+
};
|
169
|
+
|
170
|
+
module.exports.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
|
171
|
+
const ret = arg1.stack;
|
172
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
173
|
+
const len1 = WASM_VECTOR_LEN;
|
174
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
175
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
176
|
+
};
|
177
|
+
|
184
178
|
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
185
179
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
186
|
-
return
|
180
|
+
return ret;
|
181
|
+
};
|
182
|
+
|
183
|
+
module.exports.__wbindgen_init_externref_table = function() {
|
184
|
+
const table = wasm.__wbindgen_export_3;
|
185
|
+
const offset = table.grow(4);
|
186
|
+
table.set(0, undefined);
|
187
|
+
table.set(offset + 0, undefined);
|
188
|
+
table.set(offset + 1, null);
|
189
|
+
table.set(offset + 2, true);
|
190
|
+
table.set(offset + 3, false);
|
191
|
+
;
|
187
192
|
};
|
188
193
|
|
189
194
|
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
190
195
|
const ret = getStringFromWasm0(arg0, arg1);
|
191
|
-
return
|
196
|
+
return ret;
|
192
197
|
};
|
193
198
|
|
194
199
|
const path = require('path').join(__dirname, 'index_bg.wasm');
|
@@ -199,3 +204,5 @@ const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
|
|
199
204
|
wasm = wasmInstance.exports;
|
200
205
|
module.exports.__wasm = wasm;
|
201
206
|
|
207
|
+
wasm.__wbindgen_start();
|
208
|
+
|
package/index_bg.wasm
CHANGED
Binary file
|