cdk-from-cfn 0.267.0 → 0.269.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 +7 -4
- package/index.js +71 -81
- package/index_bg.wasm +0 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Returns an array containing all supported language names.
|
|
6
|
+
*/
|
|
7
|
+
export function supported_languages(): any[];
|
|
8
|
+
|
|
3
9
|
/**
|
|
4
10
|
* Transforms the provided template into a CDK application in the specified
|
|
5
11
|
* language.
|
|
6
12
|
*/
|
|
7
13
|
export function transmute(template: string, language: string, stack_name: string): string;
|
|
8
|
-
|
|
9
|
-
* Returns an array containing all supported language names.
|
|
10
|
-
*/
|
|
11
|
-
export function supported_languages(): any[];
|
|
14
|
+
|
|
12
15
|
export function wasm_init(): void;
|
package/index.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
|
|
2
2
|
let imports = {};
|
|
3
3
|
imports['__wbindgen_placeholder__'] = module.exports;
|
|
4
|
-
let wasm;
|
|
5
|
-
const { TextDecoder, TextEncoder } = require(`util`);
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
6
|
+
ptr = ptr >>> 0;
|
|
7
|
+
const mem = getDataViewMemory0();
|
|
8
|
+
const result = [];
|
|
9
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
10
|
+
result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
|
|
12
11
|
}
|
|
13
|
-
|
|
12
|
+
wasm.__externref_drop_slice(ptr, len);
|
|
13
|
+
return result;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
let
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return
|
|
16
|
+
let cachedDataViewMemory0 = null;
|
|
17
|
+
function getDataViewMemory0() {
|
|
18
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
19
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
20
|
+
}
|
|
21
|
+
return cachedDataViewMemory0;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
function getStringFromWasm0(ptr, len) {
|
|
@@ -26,25 +26,15 @@ function getStringFromWasm0(ptr, len) {
|
|
|
26
26
|
return decodeText(ptr, len);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
let
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return cachedTextEncoder.encodeInto(arg, view);
|
|
29
|
+
let cachedUint8ArrayMemory0 = null;
|
|
30
|
+
function getUint8ArrayMemory0() {
|
|
31
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
32
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
33
|
+
}
|
|
34
|
+
return cachedUint8ArrayMemory0;
|
|
36
35
|
}
|
|
37
|
-
: function (arg, view) {
|
|
38
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
39
|
-
view.set(buf);
|
|
40
|
-
return {
|
|
41
|
-
read: arg.length,
|
|
42
|
-
written: buf.length
|
|
43
|
-
};
|
|
44
|
-
});
|
|
45
36
|
|
|
46
37
|
function passStringToWasm0(arg, malloc, realloc) {
|
|
47
|
-
|
|
48
38
|
if (realloc === undefined) {
|
|
49
39
|
const buf = cachedTextEncoder.encode(arg);
|
|
50
40
|
const ptr = malloc(buf.length, 1) >>> 0;
|
|
@@ -65,14 +55,13 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
65
55
|
if (code > 0x7F) break;
|
|
66
56
|
mem[ptr + offset] = code;
|
|
67
57
|
}
|
|
68
|
-
|
|
69
58
|
if (offset !== len) {
|
|
70
59
|
if (offset !== 0) {
|
|
71
60
|
arg = arg.slice(offset);
|
|
72
61
|
}
|
|
73
62
|
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
74
63
|
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
75
|
-
const ret =
|
|
64
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
76
65
|
|
|
77
66
|
offset += ret.written;
|
|
78
67
|
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
@@ -82,20 +71,45 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
82
71
|
return ptr;
|
|
83
72
|
}
|
|
84
73
|
|
|
85
|
-
|
|
74
|
+
function takeFromExternrefTable0(idx) {
|
|
75
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
76
|
+
wasm.__externref_table_dealloc(idx);
|
|
77
|
+
return value;
|
|
78
|
+
}
|
|
86
79
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
80
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
81
|
+
cachedTextDecoder.decode();
|
|
82
|
+
function decodeText(ptr, len) {
|
|
83
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const cachedTextEncoder = new TextEncoder();
|
|
87
|
+
|
|
88
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
89
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
90
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
91
|
+
view.set(buf);
|
|
92
|
+
return {
|
|
93
|
+
read: arg.length,
|
|
94
|
+
written: buf.length
|
|
95
|
+
};
|
|
90
96
|
}
|
|
91
|
-
return cachedDataViewMemory0;
|
|
92
97
|
}
|
|
93
98
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
99
|
+
let WASM_VECTOR_LEN = 0;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Returns an array containing all supported language names.
|
|
103
|
+
* @returns {any[]}
|
|
104
|
+
*/
|
|
105
|
+
function supported_languages() {
|
|
106
|
+
const ret = wasm.supported_languages();
|
|
107
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
108
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
109
|
+
return v1;
|
|
98
110
|
}
|
|
111
|
+
exports.supported_languages = supported_languages;
|
|
112
|
+
|
|
99
113
|
/**
|
|
100
114
|
* Transforms the provided template into a CDK application in the specified
|
|
101
115
|
* language.
|
|
@@ -104,7 +118,7 @@ function takeFromExternrefTable0(idx) {
|
|
|
104
118
|
* @param {string} stack_name
|
|
105
119
|
* @returns {string}
|
|
106
120
|
*/
|
|
107
|
-
|
|
121
|
+
function transmute(template, language, stack_name) {
|
|
108
122
|
let deferred5_0;
|
|
109
123
|
let deferred5_1;
|
|
110
124
|
try {
|
|
@@ -127,39 +141,20 @@ module.exports.transmute = function(template, language, stack_name) {
|
|
|
127
141
|
} finally {
|
|
128
142
|
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
129
143
|
}
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
function getArrayJsValueFromWasm0(ptr, len) {
|
|
133
|
-
ptr = ptr >>> 0;
|
|
134
|
-
const mem = getDataViewMemory0();
|
|
135
|
-
const result = [];
|
|
136
|
-
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
137
|
-
result.push(wasm.__wbindgen_export_3.get(mem.getUint32(i, true)));
|
|
138
|
-
}
|
|
139
|
-
wasm.__externref_drop_slice(ptr, len);
|
|
140
|
-
return result;
|
|
141
144
|
}
|
|
142
|
-
|
|
143
|
-
* Returns an array containing all supported language names.
|
|
144
|
-
* @returns {any[]}
|
|
145
|
-
*/
|
|
146
|
-
module.exports.supported_languages = function() {
|
|
147
|
-
const ret = wasm.supported_languages();
|
|
148
|
-
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
149
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
150
|
-
return v1;
|
|
151
|
-
};
|
|
145
|
+
exports.transmute = transmute;
|
|
152
146
|
|
|
153
|
-
|
|
147
|
+
function wasm_init() {
|
|
154
148
|
wasm.wasm_init();
|
|
155
|
-
}
|
|
149
|
+
}
|
|
150
|
+
exports.wasm_init = wasm_init;
|
|
156
151
|
|
|
157
|
-
|
|
152
|
+
exports.__wbg_Error_52673b7de5a0ca89 = function(arg0, arg1) {
|
|
158
153
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
159
154
|
return ret;
|
|
160
155
|
};
|
|
161
156
|
|
|
162
|
-
|
|
157
|
+
exports.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
|
|
163
158
|
let deferred0_0;
|
|
164
159
|
let deferred0_1;
|
|
165
160
|
try {
|
|
@@ -171,12 +166,12 @@ module.exports.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
|
|
|
171
166
|
}
|
|
172
167
|
};
|
|
173
168
|
|
|
174
|
-
|
|
169
|
+
exports.__wbg_new_8a6f238a6ece86ea = function() {
|
|
175
170
|
const ret = new Error();
|
|
176
171
|
return ret;
|
|
177
172
|
};
|
|
178
173
|
|
|
179
|
-
|
|
174
|
+
exports.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
|
|
180
175
|
const ret = arg1.stack;
|
|
181
176
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
182
177
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -184,30 +179,25 @@ module.exports.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
|
|
|
184
179
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
185
180
|
};
|
|
186
181
|
|
|
187
|
-
|
|
182
|
+
exports.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
188
183
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
189
184
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
190
185
|
return ret;
|
|
191
186
|
};
|
|
192
187
|
|
|
193
|
-
|
|
194
|
-
const table = wasm.
|
|
188
|
+
exports.__wbindgen_init_externref_table = function() {
|
|
189
|
+
const table = wasm.__wbindgen_externrefs;
|
|
195
190
|
const offset = table.grow(4);
|
|
196
191
|
table.set(0, undefined);
|
|
197
192
|
table.set(offset + 0, undefined);
|
|
198
193
|
table.set(offset + 1, null);
|
|
199
194
|
table.set(offset + 2, true);
|
|
200
195
|
table.set(offset + 3, false);
|
|
201
|
-
;
|
|
202
196
|
};
|
|
203
197
|
|
|
204
|
-
const
|
|
205
|
-
const
|
|
206
|
-
|
|
207
|
-
const
|
|
208
|
-
const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
|
|
209
|
-
wasm = wasmInstance.exports;
|
|
210
|
-
module.exports.__wasm = wasm;
|
|
198
|
+
const wasmPath = `${__dirname}/index_bg.wasm`;
|
|
199
|
+
const wasmBytes = require('fs').readFileSync(wasmPath);
|
|
200
|
+
const wasmModule = new WebAssembly.Module(wasmBytes);
|
|
201
|
+
const wasm = exports.__wasm = new WebAssembly.Instance(wasmModule, imports).exports;
|
|
211
202
|
|
|
212
203
|
wasm.__wbindgen_start();
|
|
213
|
-
|
package/index_bg.wasm
CHANGED
|
Binary file
|