panrelease 0.15.0 → 0.16.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/package.json +1 -1
- package/pkg/panrelease.js +55 -55
- package/pkg/panrelease_bg.wasm +0 -0
- package/pkg/panrelease_bg.wasm.d.ts +1 -1
package/package.json
CHANGED
package/pkg/panrelease.js
CHANGED
|
@@ -4,7 +4,7 @@ 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
8
|
|
|
9
9
|
const heap = new Array(128).fill(undefined);
|
|
10
10
|
|
|
@@ -26,7 +26,9 @@ function takeObject(idx) {
|
|
|
26
26
|
return ret;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
let
|
|
29
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
30
|
+
|
|
31
|
+
cachedTextDecoder.decode();
|
|
30
32
|
|
|
31
33
|
let cachedUint8Memory0 = null;
|
|
32
34
|
|
|
@@ -37,6 +39,22 @@ function getUint8Memory0() {
|
|
|
37
39
|
return cachedUint8Memory0;
|
|
38
40
|
}
|
|
39
41
|
|
|
42
|
+
function getStringFromWasm0(ptr, len) {
|
|
43
|
+
ptr = ptr >>> 0;
|
|
44
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function addHeapObject(obj) {
|
|
48
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
49
|
+
const idx = heap_next;
|
|
50
|
+
heap_next = heap[idx];
|
|
51
|
+
|
|
52
|
+
heap[idx] = obj;
|
|
53
|
+
return idx;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
let WASM_VECTOR_LEN = 0;
|
|
57
|
+
|
|
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,13 @@ 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
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
189
|
+
|
|
190
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
191
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
192
|
+
getUint8Memory0().set(arg, ptr / 1);
|
|
193
|
+
WASM_VECTOR_LEN = arg.length;
|
|
194
|
+
return ptr;
|
|
195
|
+
}
|
|
195
196
|
|
|
196
197
|
function handleError(f, args) {
|
|
197
198
|
try {
|
|
@@ -200,13 +201,12 @@ function handleError(f, args) {
|
|
|
200
201
|
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
201
202
|
}
|
|
202
203
|
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
}
|
|
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,11 +229,15 @@ class ReifyRunArgs {
|
|
|
229
229
|
}
|
|
230
230
|
module.exports.ReifyRunArgs = ReifyRunArgs;
|
|
231
231
|
|
|
232
|
+
module.exports.__wbg_log_7f8525f34484f362 = function(arg0, arg1) {
|
|
233
|
+
console.log(getStringFromWasm0(arg0, arg1));
|
|
234
|
+
};
|
|
235
|
+
|
|
232
236
|
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
233
237
|
takeObject(arg0);
|
|
234
238
|
};
|
|
235
239
|
|
|
236
|
-
module.exports.
|
|
240
|
+
module.exports.__wbg_cwd_97cbc341b723986a = function(arg0) {
|
|
237
241
|
const ret = cwd();
|
|
238
242
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
239
243
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -241,29 +245,24 @@ module.exports.__wbg_cwd_6cc81e58cbab7b00 = function(arg0) {
|
|
|
241
245
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
242
246
|
};
|
|
243
247
|
|
|
244
|
-
module.exports.
|
|
245
|
-
|
|
248
|
+
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
249
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
250
|
+
return addHeapObject(ret);
|
|
246
251
|
};
|
|
247
252
|
|
|
248
|
-
module.exports.
|
|
249
|
-
const
|
|
250
|
-
const
|
|
251
|
-
|
|
252
|
-
var len1 = WASM_VECTOR_LEN;
|
|
253
|
+
module.exports.__wbg_readFileSync_76f34e6b7ae981ce = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
254
|
+
const ret = readFileSync(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
255
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
256
|
+
const len1 = WASM_VECTOR_LEN;
|
|
253
257
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
254
258
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
255
|
-
};
|
|
259
|
+
}, arguments) };
|
|
256
260
|
|
|
257
|
-
module.exports.
|
|
261
|
+
module.exports.__wbg_writeFileSync_28b9dd4359b74ebe = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
258
262
|
writeFileSync(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
|
|
259
263
|
}, arguments) };
|
|
260
264
|
|
|
261
|
-
module.exports.
|
|
262
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
263
|
-
return addHeapObject(ret);
|
|
264
|
-
};
|
|
265
|
-
|
|
266
|
-
module.exports.__wbg_execSync_31508369da459cc5 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
265
|
+
module.exports.__wbg_execSync_09b5de8ef8d0e5d9 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
267
266
|
let deferred0_0;
|
|
268
267
|
let deferred0_1;
|
|
269
268
|
try {
|
|
@@ -279,18 +278,19 @@ module.exports.__wbg_execSync_31508369da459cc5 = function() { return handleError
|
|
|
279
278
|
}
|
|
280
279
|
}, arguments) };
|
|
281
280
|
|
|
282
|
-
module.exports.
|
|
281
|
+
module.exports.__wbg_existsSync_31a7375fd56cf92a = function() { return handleError(function (arg0, arg1) {
|
|
283
282
|
const ret = existsSync(getStringFromWasm0(arg0, arg1));
|
|
284
283
|
return ret;
|
|
285
284
|
}, arguments) };
|
|
286
285
|
|
|
287
|
-
module.exports.
|
|
288
|
-
const
|
|
289
|
-
const
|
|
290
|
-
|
|
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
291
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
292
292
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
293
|
-
}
|
|
293
|
+
};
|
|
294
294
|
|
|
295
295
|
module.exports.__wbg_set_f975102236d3c502 = function(arg0, arg1, arg2) {
|
|
296
296
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
package/pkg/panrelease_bg.wasm
CHANGED
|
Binary file
|
|
@@ -5,5 +5,5 @@ export function __wbg_reifyrunargs_free(a: number): void;
|
|
|
5
5
|
export function run(a: number): void;
|
|
6
6
|
export function __wbindgen_malloc(a: number, b: number): number;
|
|
7
7
|
export function __wbindgen_realloc(a: number, b: number, c: number, d: number): number;
|
|
8
|
-
export function __wbindgen_exn_store(a: number): void;
|
|
9
8
|
export function __wbindgen_free(a: number, b: number, c: number): void;
|
|
9
|
+
export function __wbindgen_exn_store(a: number): void;
|