@apm-js-collab/code-transformer 0.6.0 → 0.7.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/package.json +6 -2
- package/pkg/orchestrion_js.d.ts +0 -31
- package/pkg/orchestrion_js.js +0 -552
- package/pkg/orchestrion_js_bg.wasm +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apm-js-collab/code-transformer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -17,9 +17,13 @@
|
|
|
17
17
|
"types": "./pkg/orchestrion_js.d.ts",
|
|
18
18
|
"scripts": {
|
|
19
19
|
"build": "wasm-pack build --target nodejs --release -- --features wasm",
|
|
20
|
-
"test": "
|
|
20
|
+
"test": "vitest run",
|
|
21
|
+
"test:watch": "vitest"
|
|
21
22
|
},
|
|
22
23
|
"devDependencies": {
|
|
24
|
+
"source-map": "^0.7.6",
|
|
25
|
+
"typescript": "^5.8.3",
|
|
26
|
+
"vitest": "^3.2.4",
|
|
23
27
|
"wasm-pack": "^0.13.1"
|
|
24
28
|
},
|
|
25
29
|
"volta": {
|
package/pkg/orchestrion_js.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
export function create(configs: InstrumentationConfig[], dc_module?: string | null): InstrumentationMatcher;
|
|
4
|
-
export interface InstrumentationConfig {
|
|
5
|
-
channelName: string;
|
|
6
|
-
module: ModuleMatcher;
|
|
7
|
-
functionQuery: FunctionQuery;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface ModuleMatcher {
|
|
11
|
-
name: string;
|
|
12
|
-
versionRange: Range;
|
|
13
|
-
filePath: string;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export type FunctionQuery = { className: string; methodName: string; kind: FunctionKind; index?: number } | { className: string; index?: number } | { methodName: string; kind: FunctionKind; index?: number } | { functionName: string; kind: FunctionKind; index?: number } | { expressionName: string; kind: FunctionKind; index?: number };
|
|
17
|
-
|
|
18
|
-
export type FunctionKind = "Sync" | "Async";
|
|
19
|
-
|
|
20
|
-
export type ModuleType = "esm" | "cjs" | "unknown";
|
|
21
|
-
|
|
22
|
-
export class InstrumentationMatcher {
|
|
23
|
-
private constructor();
|
|
24
|
-
free(): void;
|
|
25
|
-
getTransformer(module_name: string, version: string, file_path: string): Transformer | undefined;
|
|
26
|
-
}
|
|
27
|
-
export class Transformer {
|
|
28
|
-
private constructor();
|
|
29
|
-
free(): void;
|
|
30
|
-
transform(contents: string, is_module: ModuleType): string;
|
|
31
|
-
}
|
package/pkg/orchestrion_js.js
DELETED
|
@@ -1,552 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
let imports = {};
|
|
3
|
-
imports['__wbindgen_placeholder__'] = module.exports;
|
|
4
|
-
let wasm;
|
|
5
|
-
const { TextEncoder, TextDecoder } = require(`util`);
|
|
6
|
-
|
|
7
|
-
let WASM_VECTOR_LEN = 0;
|
|
8
|
-
|
|
9
|
-
let cachedUint8ArrayMemory0 = null;
|
|
10
|
-
|
|
11
|
-
function getUint8ArrayMemory0() {
|
|
12
|
-
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
13
|
-
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
14
|
-
}
|
|
15
|
-
return cachedUint8ArrayMemory0;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
let cachedTextEncoder = new TextEncoder('utf-8');
|
|
19
|
-
|
|
20
|
-
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
21
|
-
? function (arg, view) {
|
|
22
|
-
return cachedTextEncoder.encodeInto(arg, view);
|
|
23
|
-
}
|
|
24
|
-
: function (arg, view) {
|
|
25
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
26
|
-
view.set(buf);
|
|
27
|
-
return {
|
|
28
|
-
read: arg.length,
|
|
29
|
-
written: buf.length
|
|
30
|
-
};
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
34
|
-
|
|
35
|
-
if (realloc === undefined) {
|
|
36
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
37
|
-
const ptr = malloc(buf.length, 1) >>> 0;
|
|
38
|
-
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
39
|
-
WASM_VECTOR_LEN = buf.length;
|
|
40
|
-
return ptr;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
let len = arg.length;
|
|
44
|
-
let ptr = malloc(len, 1) >>> 0;
|
|
45
|
-
|
|
46
|
-
const mem = getUint8ArrayMemory0();
|
|
47
|
-
|
|
48
|
-
let offset = 0;
|
|
49
|
-
|
|
50
|
-
for (; offset < len; offset++) {
|
|
51
|
-
const code = arg.charCodeAt(offset);
|
|
52
|
-
if (code > 0x7F) break;
|
|
53
|
-
mem[ptr + offset] = code;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
if (offset !== len) {
|
|
57
|
-
if (offset !== 0) {
|
|
58
|
-
arg = arg.slice(offset);
|
|
59
|
-
}
|
|
60
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
61
|
-
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
62
|
-
const ret = encodeString(arg, view);
|
|
63
|
-
|
|
64
|
-
offset += ret.written;
|
|
65
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
WASM_VECTOR_LEN = offset;
|
|
69
|
-
return ptr;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
let cachedDataViewMemory0 = null;
|
|
73
|
-
|
|
74
|
-
function getDataViewMemory0() {
|
|
75
|
-
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
76
|
-
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
77
|
-
}
|
|
78
|
-
return cachedDataViewMemory0;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
function addToExternrefTable0(obj) {
|
|
82
|
-
const idx = wasm.__externref_table_alloc();
|
|
83
|
-
wasm.__wbindgen_export_4.set(idx, obj);
|
|
84
|
-
return idx;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
function handleError(f, args) {
|
|
88
|
-
try {
|
|
89
|
-
return f.apply(this, args);
|
|
90
|
-
} catch (e) {
|
|
91
|
-
const idx = addToExternrefTable0(e);
|
|
92
|
-
wasm.__wbindgen_exn_store(idx);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
function isLikeNone(x) {
|
|
97
|
-
return x === undefined || x === null;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
function debugString(val) {
|
|
101
|
-
// primitive types
|
|
102
|
-
const type = typeof val;
|
|
103
|
-
if (type == 'number' || type == 'boolean' || val == null) {
|
|
104
|
-
return `${val}`;
|
|
105
|
-
}
|
|
106
|
-
if (type == 'string') {
|
|
107
|
-
return `"${val}"`;
|
|
108
|
-
}
|
|
109
|
-
if (type == 'symbol') {
|
|
110
|
-
const description = val.description;
|
|
111
|
-
if (description == null) {
|
|
112
|
-
return 'Symbol';
|
|
113
|
-
} else {
|
|
114
|
-
return `Symbol(${description})`;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
if (type == 'function') {
|
|
118
|
-
const name = val.name;
|
|
119
|
-
if (typeof name == 'string' && name.length > 0) {
|
|
120
|
-
return `Function(${name})`;
|
|
121
|
-
} else {
|
|
122
|
-
return 'Function';
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
// objects
|
|
126
|
-
if (Array.isArray(val)) {
|
|
127
|
-
const length = val.length;
|
|
128
|
-
let debug = '[';
|
|
129
|
-
if (length > 0) {
|
|
130
|
-
debug += debugString(val[0]);
|
|
131
|
-
}
|
|
132
|
-
for(let i = 1; i < length; i++) {
|
|
133
|
-
debug += ', ' + debugString(val[i]);
|
|
134
|
-
}
|
|
135
|
-
debug += ']';
|
|
136
|
-
return debug;
|
|
137
|
-
}
|
|
138
|
-
// Test for built-in
|
|
139
|
-
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
140
|
-
let className;
|
|
141
|
-
if (builtInMatches && builtInMatches.length > 1) {
|
|
142
|
-
className = builtInMatches[1];
|
|
143
|
-
} else {
|
|
144
|
-
// Failed to match the standard '[object ClassName]'
|
|
145
|
-
return toString.call(val);
|
|
146
|
-
}
|
|
147
|
-
if (className == 'Object') {
|
|
148
|
-
// we're a user defined class or Object
|
|
149
|
-
// JSON.stringify avoids problems with cycles, and is generally much
|
|
150
|
-
// easier than looping through ownProperties of `val`.
|
|
151
|
-
try {
|
|
152
|
-
return 'Object(' + JSON.stringify(val) + ')';
|
|
153
|
-
} catch (_) {
|
|
154
|
-
return 'Object';
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
// errors
|
|
158
|
-
if (val instanceof Error) {
|
|
159
|
-
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
160
|
-
}
|
|
161
|
-
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
162
|
-
return className;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
166
|
-
|
|
167
|
-
cachedTextDecoder.decode();
|
|
168
|
-
|
|
169
|
-
function getStringFromWasm0(ptr, len) {
|
|
170
|
-
ptr = ptr >>> 0;
|
|
171
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
function takeFromExternrefTable0(idx) {
|
|
175
|
-
const value = wasm.__wbindgen_export_4.get(idx);
|
|
176
|
-
wasm.__externref_table_dealloc(idx);
|
|
177
|
-
return value;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
function passArrayJsValueToWasm0(array, malloc) {
|
|
181
|
-
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
182
|
-
for (let i = 0; i < array.length; i++) {
|
|
183
|
-
const add = addToExternrefTable0(array[i]);
|
|
184
|
-
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
185
|
-
}
|
|
186
|
-
WASM_VECTOR_LEN = array.length;
|
|
187
|
-
return ptr;
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* @param {InstrumentationConfig[]} configs
|
|
191
|
-
* @param {string | null} [dc_module]
|
|
192
|
-
* @returns {InstrumentationMatcher}
|
|
193
|
-
*/
|
|
194
|
-
module.exports.create = function(configs, dc_module) {
|
|
195
|
-
const ptr0 = passArrayJsValueToWasm0(configs, wasm.__wbindgen_malloc);
|
|
196
|
-
const len0 = WASM_VECTOR_LEN;
|
|
197
|
-
var ptr1 = isLikeNone(dc_module) ? 0 : passStringToWasm0(dc_module, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
198
|
-
var len1 = WASM_VECTOR_LEN;
|
|
199
|
-
const ret = wasm.create(ptr0, len0, ptr1, len1);
|
|
200
|
-
return InstrumentationMatcher.__wrap(ret);
|
|
201
|
-
};
|
|
202
|
-
|
|
203
|
-
const InstrumentationMatcherFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
204
|
-
? { register: () => {}, unregister: () => {} }
|
|
205
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_instrumentationmatcher_free(ptr >>> 0, 1));
|
|
206
|
-
|
|
207
|
-
class InstrumentationMatcher {
|
|
208
|
-
|
|
209
|
-
static __wrap(ptr) {
|
|
210
|
-
ptr = ptr >>> 0;
|
|
211
|
-
const obj = Object.create(InstrumentationMatcher.prototype);
|
|
212
|
-
obj.__wbg_ptr = ptr;
|
|
213
|
-
InstrumentationMatcherFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
214
|
-
return obj;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
__destroy_into_raw() {
|
|
218
|
-
const ptr = this.__wbg_ptr;
|
|
219
|
-
this.__wbg_ptr = 0;
|
|
220
|
-
InstrumentationMatcherFinalization.unregister(this);
|
|
221
|
-
return ptr;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
free() {
|
|
225
|
-
const ptr = this.__destroy_into_raw();
|
|
226
|
-
wasm.__wbg_instrumentationmatcher_free(ptr, 0);
|
|
227
|
-
}
|
|
228
|
-
/**
|
|
229
|
-
* @param {string} module_name
|
|
230
|
-
* @param {string} version
|
|
231
|
-
* @param {string} file_path
|
|
232
|
-
* @returns {Transformer | undefined}
|
|
233
|
-
*/
|
|
234
|
-
getTransformer(module_name, version, file_path) {
|
|
235
|
-
const ptr0 = passStringToWasm0(module_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
236
|
-
const len0 = WASM_VECTOR_LEN;
|
|
237
|
-
const ptr1 = passStringToWasm0(version, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
238
|
-
const len1 = WASM_VECTOR_LEN;
|
|
239
|
-
const ptr2 = passStringToWasm0(file_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
240
|
-
const len2 = WASM_VECTOR_LEN;
|
|
241
|
-
const ret = wasm.instrumentationmatcher_getTransformer(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
242
|
-
return ret === 0 ? undefined : Transformer.__wrap(ret);
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
module.exports.InstrumentationMatcher = InstrumentationMatcher;
|
|
246
|
-
|
|
247
|
-
const TransformerFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
248
|
-
? { register: () => {}, unregister: () => {} }
|
|
249
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_transformer_free(ptr >>> 0, 1));
|
|
250
|
-
|
|
251
|
-
class Transformer {
|
|
252
|
-
|
|
253
|
-
static __wrap(ptr) {
|
|
254
|
-
ptr = ptr >>> 0;
|
|
255
|
-
const obj = Object.create(Transformer.prototype);
|
|
256
|
-
obj.__wbg_ptr = ptr;
|
|
257
|
-
TransformerFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
258
|
-
return obj;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
__destroy_into_raw() {
|
|
262
|
-
const ptr = this.__wbg_ptr;
|
|
263
|
-
this.__wbg_ptr = 0;
|
|
264
|
-
TransformerFinalization.unregister(this);
|
|
265
|
-
return ptr;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
free() {
|
|
269
|
-
const ptr = this.__destroy_into_raw();
|
|
270
|
-
wasm.__wbg_transformer_free(ptr, 0);
|
|
271
|
-
}
|
|
272
|
-
/**
|
|
273
|
-
* @param {string} contents
|
|
274
|
-
* @param {ModuleType} is_module
|
|
275
|
-
* @returns {string}
|
|
276
|
-
*/
|
|
277
|
-
transform(contents, is_module) {
|
|
278
|
-
let deferred3_0;
|
|
279
|
-
let deferred3_1;
|
|
280
|
-
try {
|
|
281
|
-
const ptr0 = passStringToWasm0(contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
282
|
-
const len0 = WASM_VECTOR_LEN;
|
|
283
|
-
const ret = wasm.transformer_transform(this.__wbg_ptr, ptr0, len0, is_module);
|
|
284
|
-
var ptr2 = ret[0];
|
|
285
|
-
var len2 = ret[1];
|
|
286
|
-
if (ret[3]) {
|
|
287
|
-
ptr2 = 0; len2 = 0;
|
|
288
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
289
|
-
}
|
|
290
|
-
deferred3_0 = ptr2;
|
|
291
|
-
deferred3_1 = len2;
|
|
292
|
-
return getStringFromWasm0(ptr2, len2);
|
|
293
|
-
} finally {
|
|
294
|
-
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
module.exports.Transformer = Transformer;
|
|
299
|
-
|
|
300
|
-
module.exports.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
301
|
-
const ret = String(arg1);
|
|
302
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
303
|
-
const len1 = WASM_VECTOR_LEN;
|
|
304
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
305
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
306
|
-
};
|
|
307
|
-
|
|
308
|
-
module.exports.__wbg_buffer_609cc3eee51ed158 = function(arg0) {
|
|
309
|
-
const ret = arg0.buffer;
|
|
310
|
-
return ret;
|
|
311
|
-
};
|
|
312
|
-
|
|
313
|
-
module.exports.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
|
|
314
|
-
const ret = arg0.call(arg1);
|
|
315
|
-
return ret;
|
|
316
|
-
}, arguments) };
|
|
317
|
-
|
|
318
|
-
module.exports.__wbg_done_769e5ede4b31c67b = function(arg0) {
|
|
319
|
-
const ret = arg0.done;
|
|
320
|
-
return ret;
|
|
321
|
-
};
|
|
322
|
-
|
|
323
|
-
module.exports.__wbg_entries_3265d4158b33e5dc = function(arg0) {
|
|
324
|
-
const ret = Object.entries(arg0);
|
|
325
|
-
return ret;
|
|
326
|
-
};
|
|
327
|
-
|
|
328
|
-
module.exports.__wbg_get_67b2ba62fc30de12 = function() { return handleError(function (arg0, arg1) {
|
|
329
|
-
const ret = Reflect.get(arg0, arg1);
|
|
330
|
-
return ret;
|
|
331
|
-
}, arguments) };
|
|
332
|
-
|
|
333
|
-
module.exports.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {
|
|
334
|
-
const ret = arg0[arg1 >>> 0];
|
|
335
|
-
return ret;
|
|
336
|
-
};
|
|
337
|
-
|
|
338
|
-
module.exports.__wbg_getwithrefkey_1dc361bd10053bfe = function(arg0, arg1) {
|
|
339
|
-
const ret = arg0[arg1];
|
|
340
|
-
return ret;
|
|
341
|
-
};
|
|
342
|
-
|
|
343
|
-
module.exports.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function(arg0) {
|
|
344
|
-
let result;
|
|
345
|
-
try {
|
|
346
|
-
result = arg0 instanceof ArrayBuffer;
|
|
347
|
-
} catch (_) {
|
|
348
|
-
result = false;
|
|
349
|
-
}
|
|
350
|
-
const ret = result;
|
|
351
|
-
return ret;
|
|
352
|
-
};
|
|
353
|
-
|
|
354
|
-
module.exports.__wbg_instanceof_Map_f3469ce2244d2430 = function(arg0) {
|
|
355
|
-
let result;
|
|
356
|
-
try {
|
|
357
|
-
result = arg0 instanceof Map;
|
|
358
|
-
} catch (_) {
|
|
359
|
-
result = false;
|
|
360
|
-
}
|
|
361
|
-
const ret = result;
|
|
362
|
-
return ret;
|
|
363
|
-
};
|
|
364
|
-
|
|
365
|
-
module.exports.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function(arg0) {
|
|
366
|
-
let result;
|
|
367
|
-
try {
|
|
368
|
-
result = arg0 instanceof Uint8Array;
|
|
369
|
-
} catch (_) {
|
|
370
|
-
result = false;
|
|
371
|
-
}
|
|
372
|
-
const ret = result;
|
|
373
|
-
return ret;
|
|
374
|
-
};
|
|
375
|
-
|
|
376
|
-
module.exports.__wbg_isArray_a1eab7e0d067391b = function(arg0) {
|
|
377
|
-
const ret = Array.isArray(arg0);
|
|
378
|
-
return ret;
|
|
379
|
-
};
|
|
380
|
-
|
|
381
|
-
module.exports.__wbg_isSafeInteger_343e2beeeece1bb0 = function(arg0) {
|
|
382
|
-
const ret = Number.isSafeInteger(arg0);
|
|
383
|
-
return ret;
|
|
384
|
-
};
|
|
385
|
-
|
|
386
|
-
module.exports.__wbg_iterator_9a24c88df860dc65 = function() {
|
|
387
|
-
const ret = Symbol.iterator;
|
|
388
|
-
return ret;
|
|
389
|
-
};
|
|
390
|
-
|
|
391
|
-
module.exports.__wbg_length_a446193dc22c12f8 = function(arg0) {
|
|
392
|
-
const ret = arg0.length;
|
|
393
|
-
return ret;
|
|
394
|
-
};
|
|
395
|
-
|
|
396
|
-
module.exports.__wbg_length_e2d2a49132c1b256 = function(arg0) {
|
|
397
|
-
const ret = arg0.length;
|
|
398
|
-
return ret;
|
|
399
|
-
};
|
|
400
|
-
|
|
401
|
-
module.exports.__wbg_new_a12002a7f91c75be = function(arg0) {
|
|
402
|
-
const ret = new Uint8Array(arg0);
|
|
403
|
-
return ret;
|
|
404
|
-
};
|
|
405
|
-
|
|
406
|
-
module.exports.__wbg_next_25feadfc0913fea9 = function(arg0) {
|
|
407
|
-
const ret = arg0.next;
|
|
408
|
-
return ret;
|
|
409
|
-
};
|
|
410
|
-
|
|
411
|
-
module.exports.__wbg_next_6574e1a8a62d1055 = function() { return handleError(function (arg0) {
|
|
412
|
-
const ret = arg0.next();
|
|
413
|
-
return ret;
|
|
414
|
-
}, arguments) };
|
|
415
|
-
|
|
416
|
-
module.exports.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
|
|
417
|
-
arg0.set(arg1, arg2 >>> 0);
|
|
418
|
-
};
|
|
419
|
-
|
|
420
|
-
module.exports.__wbg_value_cd1ffa7b1ab794f1 = function(arg0) {
|
|
421
|
-
const ret = arg0.value;
|
|
422
|
-
return ret;
|
|
423
|
-
};
|
|
424
|
-
|
|
425
|
-
module.exports.__wbindgen_bigint_from_i64 = function(arg0) {
|
|
426
|
-
const ret = arg0;
|
|
427
|
-
return ret;
|
|
428
|
-
};
|
|
429
|
-
|
|
430
|
-
module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
431
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
432
|
-
return ret;
|
|
433
|
-
};
|
|
434
|
-
|
|
435
|
-
module.exports.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
|
|
436
|
-
const v = arg1;
|
|
437
|
-
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
438
|
-
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
439
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
440
|
-
};
|
|
441
|
-
|
|
442
|
-
module.exports.__wbindgen_boolean_get = function(arg0) {
|
|
443
|
-
const v = arg0;
|
|
444
|
-
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
445
|
-
return ret;
|
|
446
|
-
};
|
|
447
|
-
|
|
448
|
-
module.exports.__wbindgen_debug_string = function(arg0, arg1) {
|
|
449
|
-
const ret = debugString(arg1);
|
|
450
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
451
|
-
const len1 = WASM_VECTOR_LEN;
|
|
452
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
453
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
454
|
-
};
|
|
455
|
-
|
|
456
|
-
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
457
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
458
|
-
return ret;
|
|
459
|
-
};
|
|
460
|
-
|
|
461
|
-
module.exports.__wbindgen_in = function(arg0, arg1) {
|
|
462
|
-
const ret = arg0 in arg1;
|
|
463
|
-
return ret;
|
|
464
|
-
};
|
|
465
|
-
|
|
466
|
-
module.exports.__wbindgen_init_externref_table = function() {
|
|
467
|
-
const table = wasm.__wbindgen_export_4;
|
|
468
|
-
const offset = table.grow(4);
|
|
469
|
-
table.set(0, undefined);
|
|
470
|
-
table.set(offset + 0, undefined);
|
|
471
|
-
table.set(offset + 1, null);
|
|
472
|
-
table.set(offset + 2, true);
|
|
473
|
-
table.set(offset + 3, false);
|
|
474
|
-
;
|
|
475
|
-
};
|
|
476
|
-
|
|
477
|
-
module.exports.__wbindgen_is_bigint = function(arg0) {
|
|
478
|
-
const ret = typeof(arg0) === 'bigint';
|
|
479
|
-
return ret;
|
|
480
|
-
};
|
|
481
|
-
|
|
482
|
-
module.exports.__wbindgen_is_function = function(arg0) {
|
|
483
|
-
const ret = typeof(arg0) === 'function';
|
|
484
|
-
return ret;
|
|
485
|
-
};
|
|
486
|
-
|
|
487
|
-
module.exports.__wbindgen_is_object = function(arg0) {
|
|
488
|
-
const val = arg0;
|
|
489
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
490
|
-
return ret;
|
|
491
|
-
};
|
|
492
|
-
|
|
493
|
-
module.exports.__wbindgen_is_string = function(arg0) {
|
|
494
|
-
const ret = typeof(arg0) === 'string';
|
|
495
|
-
return ret;
|
|
496
|
-
};
|
|
497
|
-
|
|
498
|
-
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
499
|
-
const ret = arg0 === undefined;
|
|
500
|
-
return ret;
|
|
501
|
-
};
|
|
502
|
-
|
|
503
|
-
module.exports.__wbindgen_jsval_eq = function(arg0, arg1) {
|
|
504
|
-
const ret = arg0 === arg1;
|
|
505
|
-
return ret;
|
|
506
|
-
};
|
|
507
|
-
|
|
508
|
-
module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
509
|
-
const ret = arg0 == arg1;
|
|
510
|
-
return ret;
|
|
511
|
-
};
|
|
512
|
-
|
|
513
|
-
module.exports.__wbindgen_memory = function() {
|
|
514
|
-
const ret = wasm.memory;
|
|
515
|
-
return ret;
|
|
516
|
-
};
|
|
517
|
-
|
|
518
|
-
module.exports.__wbindgen_number_get = function(arg0, arg1) {
|
|
519
|
-
const obj = arg1;
|
|
520
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
521
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
522
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
523
|
-
};
|
|
524
|
-
|
|
525
|
-
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
526
|
-
const obj = arg1;
|
|
527
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
528
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
529
|
-
var len1 = WASM_VECTOR_LEN;
|
|
530
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
531
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
532
|
-
};
|
|
533
|
-
|
|
534
|
-
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
535
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
536
|
-
return ret;
|
|
537
|
-
};
|
|
538
|
-
|
|
539
|
-
module.exports.__wbindgen_throw = function(arg0, arg1) {
|
|
540
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
541
|
-
};
|
|
542
|
-
|
|
543
|
-
const path = require('path').join(__dirname, 'orchestrion_js_bg.wasm');
|
|
544
|
-
const bytes = require('fs').readFileSync(path);
|
|
545
|
-
|
|
546
|
-
const wasmModule = new WebAssembly.Module(bytes);
|
|
547
|
-
const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
|
|
548
|
-
wasm = wasmInstance.exports;
|
|
549
|
-
module.exports.__wasm = wasm;
|
|
550
|
-
|
|
551
|
-
wasm.__wbindgen_start();
|
|
552
|
-
|
|
Binary file
|