panrelease 0.15.0 → 0.15.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 +1 -1
- package/pkg/panrelease.js +64 -64
- package/pkg/panrelease_bg.wasm +0 -0
package/package.json
CHANGED
package/pkg/panrelease.js
CHANGED
|
@@ -4,16 +4,43 @@ let wasm;
|
|
|
4
4
|
const { execSync } = require(`child_process`);
|
|
5
5
|
const { readFileSync, writeFileSync, existsSync } = require(`fs`);
|
|
6
6
|
const { cwd } = require(`process`);
|
|
7
|
-
const {
|
|
7
|
+
const { TextDecoder, TextEncoder } = require(`util`);
|
|
8
|
+
|
|
9
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
10
|
+
|
|
11
|
+
cachedTextDecoder.decode();
|
|
12
|
+
|
|
13
|
+
let cachedUint8Memory0 = null;
|
|
14
|
+
|
|
15
|
+
function getUint8Memory0() {
|
|
16
|
+
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
17
|
+
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
18
|
+
}
|
|
19
|
+
return cachedUint8Memory0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function getStringFromWasm0(ptr, len) {
|
|
23
|
+
ptr = ptr >>> 0;
|
|
24
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
25
|
+
}
|
|
8
26
|
|
|
9
27
|
const heap = new Array(128).fill(undefined);
|
|
10
28
|
|
|
11
29
|
heap.push(undefined, null, true, false);
|
|
12
30
|
|
|
13
|
-
function getObject(idx) { return heap[idx]; }
|
|
14
|
-
|
|
15
31
|
let heap_next = heap.length;
|
|
16
32
|
|
|
33
|
+
function addHeapObject(obj) {
|
|
34
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
35
|
+
const idx = heap_next;
|
|
36
|
+
heap_next = heap[idx];
|
|
37
|
+
|
|
38
|
+
heap[idx] = obj;
|
|
39
|
+
return idx;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function getObject(idx) { return heap[idx]; }
|
|
43
|
+
|
|
17
44
|
function dropObject(idx) {
|
|
18
45
|
if (idx < 132) return;
|
|
19
46
|
heap[idx] = heap_next;
|
|
@@ -28,15 +55,6 @@ function takeObject(idx) {
|
|
|
28
55
|
|
|
29
56
|
let WASM_VECTOR_LEN = 0;
|
|
30
57
|
|
|
31
|
-
let cachedUint8Memory0 = null;
|
|
32
|
-
|
|
33
|
-
function getUint8Memory0() {
|
|
34
|
-
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
35
|
-
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
36
|
-
}
|
|
37
|
-
return cachedUint8Memory0;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
58
|
let cachedTextEncoder = new TextEncoder('utf-8');
|
|
41
59
|
|
|
42
60
|
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
@@ -104,24 +122,6 @@ function getInt32Memory0() {
|
|
|
104
122
|
return cachedInt32Memory0;
|
|
105
123
|
}
|
|
106
124
|
|
|
107
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
108
|
-
|
|
109
|
-
cachedTextDecoder.decode();
|
|
110
|
-
|
|
111
|
-
function getStringFromWasm0(ptr, len) {
|
|
112
|
-
ptr = ptr >>> 0;
|
|
113
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
function addHeapObject(obj) {
|
|
117
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
118
|
-
const idx = heap_next;
|
|
119
|
-
heap_next = heap[idx];
|
|
120
|
-
|
|
121
|
-
heap[idx] = obj;
|
|
122
|
-
return idx;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
125
|
function debugString(val) {
|
|
126
126
|
// primitive types
|
|
127
127
|
const type = typeof val;
|
|
@@ -186,12 +186,6 @@ function debugString(val) {
|
|
|
186
186
|
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
187
187
|
return className;
|
|
188
188
|
}
|
|
189
|
-
/**
|
|
190
|
-
* @param {Array<any>} js_args
|
|
191
|
-
*/
|
|
192
|
-
module.exports.run = function(js_args) {
|
|
193
|
-
wasm.run(addHeapObject(js_args));
|
|
194
|
-
};
|
|
195
189
|
|
|
196
190
|
function handleError(f, args) {
|
|
197
191
|
try {
|
|
@@ -207,6 +201,12 @@ function passArray8ToWasm0(arg, malloc) {
|
|
|
207
201
|
WASM_VECTOR_LEN = arg.length;
|
|
208
202
|
return ptr;
|
|
209
203
|
}
|
|
204
|
+
/**
|
|
205
|
+
* @param {Array<any>} js_args
|
|
206
|
+
*/
|
|
207
|
+
module.exports.run = function(js_args) {
|
|
208
|
+
wasm.run(addHeapObject(js_args));
|
|
209
|
+
};
|
|
210
210
|
|
|
211
211
|
const ReifyRunArgsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
212
212
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -229,41 +229,24 @@ class ReifyRunArgs {
|
|
|
229
229
|
}
|
|
230
230
|
module.exports.ReifyRunArgs = ReifyRunArgs;
|
|
231
231
|
|
|
232
|
-
module.exports.
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
module.exports.__wbg_cwd_6cc81e58cbab7b00 = function(arg0) {
|
|
237
|
-
const ret = cwd();
|
|
238
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
239
|
-
const len1 = WASM_VECTOR_LEN;
|
|
240
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
241
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
242
|
-
};
|
|
243
|
-
|
|
244
|
-
module.exports.__wbg_log_c142934b4d83fb0c = function(arg0, arg1) {
|
|
245
|
-
console.log(getStringFromWasm0(arg0, arg1));
|
|
232
|
+
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
233
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
234
|
+
return addHeapObject(ret);
|
|
246
235
|
};
|
|
247
236
|
|
|
248
|
-
module.exports.
|
|
249
|
-
|
|
250
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
251
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
252
|
-
var len1 = WASM_VECTOR_LEN;
|
|
253
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
254
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
237
|
+
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
238
|
+
takeObject(arg0);
|
|
255
239
|
};
|
|
256
240
|
|
|
257
|
-
module.exports.
|
|
241
|
+
module.exports.__wbg_writeFileSync_d53fa3bf177530a4 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
258
242
|
writeFileSync(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
|
|
259
243
|
}, arguments) };
|
|
260
244
|
|
|
261
|
-
module.exports.
|
|
262
|
-
|
|
263
|
-
return addHeapObject(ret);
|
|
245
|
+
module.exports.__wbg_log_40820bb423827392 = function(arg0, arg1) {
|
|
246
|
+
console.log(getStringFromWasm0(arg0, arg1));
|
|
264
247
|
};
|
|
265
248
|
|
|
266
|
-
module.exports.
|
|
249
|
+
module.exports.__wbg_execSync_da9d050d9e50647c = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
267
250
|
let deferred0_0;
|
|
268
251
|
let deferred0_1;
|
|
269
252
|
try {
|
|
@@ -279,12 +262,20 @@ module.exports.__wbg_execSync_31508369da459cc5 = function() { return handleError
|
|
|
279
262
|
}
|
|
280
263
|
}, arguments) };
|
|
281
264
|
|
|
282
|
-
module.exports.
|
|
265
|
+
module.exports.__wbg_existsSync_22ae2f041ddeff9b = function() { return handleError(function (arg0, arg1) {
|
|
283
266
|
const ret = existsSync(getStringFromWasm0(arg0, arg1));
|
|
284
267
|
return ret;
|
|
285
268
|
}, arguments) };
|
|
286
269
|
|
|
287
|
-
module.exports.
|
|
270
|
+
module.exports.__wbg_cwd_9754a8d7cd20c152 = function(arg0) {
|
|
271
|
+
const ret = cwd();
|
|
272
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
273
|
+
const len1 = WASM_VECTOR_LEN;
|
|
274
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
275
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
module.exports.__wbg_readFileSync_8595c687544b2a1c = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
288
279
|
const ret = readFileSync(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
289
280
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
290
281
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -292,6 +283,15 @@ module.exports.__wbg_readFileSync_09ba85d465f2bf5c = function() { return handleE
|
|
|
292
283
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
293
284
|
}, arguments) };
|
|
294
285
|
|
|
286
|
+
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
287
|
+
const obj = getObject(arg1);
|
|
288
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
289
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
290
|
+
var len1 = WASM_VECTOR_LEN;
|
|
291
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
292
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
293
|
+
};
|
|
294
|
+
|
|
295
295
|
module.exports.__wbg_set_f975102236d3c502 = function(arg0, arg1, arg2) {
|
|
296
296
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
297
297
|
};
|
package/pkg/panrelease_bg.wasm
CHANGED
|
Binary file
|