panrelease 0.12.2 → 0.13.9

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 CHANGED
@@ -1,18 +1,26 @@
1
1
  {
2
2
  "name": "panrelease",
3
- "version": "0.12.2",
3
+ "version": "0.13.9",
4
4
  "description": "Utility to release software",
5
- "keywords": [ "cli", "tool", "git", "release" ],
5
+ "keywords": [
6
+ "cli",
7
+ "tool",
8
+ "git",
9
+ "release"
10
+ ],
6
11
  "homepage": "https://github.com/dghilardi/panrelease",
7
12
  "repository": {
8
13
  "type": "git",
9
- "url": "https://github.com/dghilardi/panrelease.git"
14
+ "url": "git+https://github.com/dghilardi/panrelease.git"
10
15
  },
11
16
  "author": "Davide Ghilardi <dghila@d71.dev>",
17
+ "publishConfig": {
18
+ "registry": "https://registry.npmjs.org"
19
+ },
12
20
  "main": "index.js",
13
21
  "license": "MIT",
14
22
  "bin": {
15
- "panrelease": "./bin/index.js"
23
+ "panrelease": "bin/index.js"
16
24
  },
17
25
  "scripts": {
18
26
  "panrelease": "./bin/index.js"
package/pkg/panrelease.js CHANGED
@@ -12,69 +12,18 @@ heap.push(undefined, null, true, false);
12
12
 
13
13
  function getObject(idx) { return heap[idx]; }
14
14
 
15
- function debugString(val) {
16
- // primitive types
17
- const type = typeof val;
18
- if (type == 'number' || type == 'boolean' || val == null) {
19
- return `${val}`;
20
- }
21
- if (type == 'string') {
22
- return `"${val}"`;
23
- }
24
- if (type == 'symbol') {
25
- const description = val.description;
26
- if (description == null) {
27
- return 'Symbol';
28
- } else {
29
- return `Symbol(${description})`;
30
- }
31
- }
32
- if (type == 'function') {
33
- const name = val.name;
34
- if (typeof name == 'string' && name.length > 0) {
35
- return `Function(${name})`;
36
- } else {
37
- return 'Function';
38
- }
39
- }
40
- // objects
41
- if (Array.isArray(val)) {
42
- const length = val.length;
43
- let debug = '[';
44
- if (length > 0) {
45
- debug += debugString(val[0]);
46
- }
47
- for(let i = 1; i < length; i++) {
48
- debug += ', ' + debugString(val[i]);
49
- }
50
- debug += ']';
51
- return debug;
52
- }
53
- // Test for built-in
54
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
55
- let className;
56
- if (builtInMatches.length > 1) {
57
- className = builtInMatches[1];
58
- } else {
59
- // Failed to match the standard '[object ClassName]'
60
- return toString.call(val);
61
- }
62
- if (className == 'Object') {
63
- // we're a user defined class or Object
64
- // JSON.stringify avoids problems with cycles, and is generally much
65
- // easier than looping through ownProperties of `val`.
66
- try {
67
- return 'Object(' + JSON.stringify(val) + ')';
68
- } catch (_) {
69
- return 'Object';
70
- }
71
- }
72
- // errors
73
- if (val instanceof Error) {
74
- return `${val.name}: ${val.message}\n${val.stack}`;
75
- }
76
- // TODO we could test for more things here, like `Set`s and `Map`s.
77
- return className;
15
+ let heap_next = heap.length;
16
+
17
+ function dropObject(idx) {
18
+ if (idx < 132) return;
19
+ heap[idx] = heap_next;
20
+ heap_next = idx;
21
+ }
22
+
23
+ function takeObject(idx) {
24
+ const ret = getObject(idx);
25
+ dropObject(idx);
26
+ return ret;
78
27
  }
79
28
 
80
29
  let WASM_VECTOR_LEN = 0;
@@ -107,14 +56,14 @@ function passStringToWasm0(arg, malloc, realloc) {
107
56
 
108
57
  if (realloc === undefined) {
109
58
  const buf = cachedTextEncoder.encode(arg);
110
- const ptr = malloc(buf.length) >>> 0;
59
+ const ptr = malloc(buf.length, 1) >>> 0;
111
60
  getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
112
61
  WASM_VECTOR_LEN = buf.length;
113
62
  return ptr;
114
63
  }
115
64
 
116
65
  let len = arg.length;
117
- let ptr = malloc(len) >>> 0;
66
+ let ptr = malloc(len, 1) >>> 0;
118
67
 
119
68
  const mem = getUint8Memory0();
120
69
 
@@ -130,17 +79,22 @@ function passStringToWasm0(arg, malloc, realloc) {
130
79
  if (offset !== 0) {
131
80
  arg = arg.slice(offset);
132
81
  }
133
- ptr = realloc(ptr, len, len = offset + arg.length * 3) >>> 0;
82
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
134
83
  const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
135
84
  const ret = encodeString(arg, view);
136
85
 
137
86
  offset += ret.written;
87
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
138
88
  }
139
89
 
140
90
  WASM_VECTOR_LEN = offset;
141
91
  return ptr;
142
92
  }
143
93
 
94
+ function isLikeNone(x) {
95
+ return x === undefined || x === null;
96
+ }
97
+
144
98
  let cachedInt32Memory0 = null;
145
99
 
146
100
  function getInt32Memory0() {
@@ -159,8 +113,6 @@ function getStringFromWasm0(ptr, len) {
159
113
  return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
160
114
  }
161
115
 
162
- let heap_next = heap.length;
163
-
164
116
  function addHeapObject(obj) {
165
117
  if (heap_next === heap.length) heap.push(heap.length + 1);
166
118
  const idx = heap_next;
@@ -170,21 +122,76 @@ function addHeapObject(obj) {
170
122
  return idx;
171
123
  }
172
124
 
173
- function dropObject(idx) {
174
- if (idx < 132) return;
175
- heap[idx] = heap_next;
176
- heap_next = idx;
177
- }
178
-
179
- function takeObject(idx) {
180
- const ret = getObject(idx);
181
- dropObject(idx);
182
- return ret;
183
- }
184
-
185
- function isLikeNone(x) {
186
- return x === undefined || x === null;
125
+ function debugString(val) {
126
+ // primitive types
127
+ const type = typeof val;
128
+ if (type == 'number' || type == 'boolean' || val == null) {
129
+ return `${val}`;
130
+ }
131
+ if (type == 'string') {
132
+ return `"${val}"`;
133
+ }
134
+ if (type == 'symbol') {
135
+ const description = val.description;
136
+ if (description == null) {
137
+ return 'Symbol';
138
+ } else {
139
+ return `Symbol(${description})`;
140
+ }
141
+ }
142
+ if (type == 'function') {
143
+ const name = val.name;
144
+ if (typeof name == 'string' && name.length > 0) {
145
+ return `Function(${name})`;
146
+ } else {
147
+ return 'Function';
148
+ }
149
+ }
150
+ // objects
151
+ if (Array.isArray(val)) {
152
+ const length = val.length;
153
+ let debug = '[';
154
+ if (length > 0) {
155
+ debug += debugString(val[0]);
156
+ }
157
+ for(let i = 1; i < length; i++) {
158
+ debug += ', ' + debugString(val[i]);
159
+ }
160
+ debug += ']';
161
+ return debug;
162
+ }
163
+ // Test for built-in
164
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
165
+ let className;
166
+ if (builtInMatches.length > 1) {
167
+ className = builtInMatches[1];
168
+ } else {
169
+ // Failed to match the standard '[object ClassName]'
170
+ return toString.call(val);
171
+ }
172
+ if (className == 'Object') {
173
+ // we're a user defined class or Object
174
+ // JSON.stringify avoids problems with cycles, and is generally much
175
+ // easier than looping through ownProperties of `val`.
176
+ try {
177
+ return 'Object(' + JSON.stringify(val) + ')';
178
+ } catch (_) {
179
+ return 'Object';
180
+ }
181
+ }
182
+ // errors
183
+ if (val instanceof Error) {
184
+ return `${val.name}: ${val.message}\n${val.stack}`;
185
+ }
186
+ // TODO we could test for more things here, like `Set`s and `Map`s.
187
+ return className;
187
188
  }
189
+ /**
190
+ * @param {Array<any>} js_args
191
+ */
192
+ module.exports.run = function(js_args) {
193
+ wasm.run(addHeapObject(js_args));
194
+ };
188
195
 
189
196
  function handleError(f, args) {
190
197
  try {
@@ -195,19 +202,15 @@ function handleError(f, args) {
195
202
  }
196
203
 
197
204
  function passArray8ToWasm0(arg, malloc) {
198
- const ptr = malloc(arg.length * 1) >>> 0;
205
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
199
206
  getUint8Memory0().set(arg, ptr / 1);
200
207
  WASM_VECTOR_LEN = arg.length;
201
208
  return ptr;
202
209
  }
203
- /**
204
- * @param {Array<any>} js_args
205
- */
206
- module.exports.run = function(js_args) {
207
- wasm.run(addHeapObject(js_args));
208
- };
209
210
 
210
- const ReifyRunArgsFinalization = new FinalizationRegistry(ptr => wasm.__wbg_reifyrunargs_free(ptr >>> 0));
211
+ const ReifyRunArgsFinalization = (typeof FinalizationRegistry === 'undefined')
212
+ ? { register: () => {}, unregister: () => {} }
213
+ : new FinalizationRegistry(ptr => wasm.__wbg_reifyrunargs_free(ptr >>> 0));
211
214
  /**
212
215
  */
213
216
  class ReifyRunArgs {
@@ -226,55 +229,16 @@ class ReifyRunArgs {
226
229
  }
227
230
  module.exports.ReifyRunArgs = ReifyRunArgs;
228
231
 
229
- module.exports.__wbindgen_debug_string = function(arg0, arg1) {
230
- const ret = debugString(getObject(arg1));
231
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
232
- const len1 = WASM_VECTOR_LEN;
233
- getInt32Memory0()[arg0 / 4 + 1] = len1;
234
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
235
- };
236
-
237
- module.exports.__wbindgen_throw = function(arg0, arg1) {
238
- throw new Error(getStringFromWasm0(arg0, arg1));
239
- };
240
-
241
- module.exports.__wbg_get_e52aaca45f37b337 = function(arg0, arg1) {
242
- const ret = getObject(arg0)[arg1 >>> 0];
243
- return addHeapObject(ret);
244
- };
245
-
246
- module.exports.__wbg_length_070e3265c186df02 = function(arg0) {
247
- const ret = getObject(arg0).length;
248
- return ret;
249
- };
250
-
251
- module.exports.__wbg_new_18bc2084e9a3e1ff = function() {
252
- const ret = new Array();
253
- return addHeapObject(ret);
254
- };
255
-
256
- module.exports.__wbindgen_number_new = function(arg0) {
257
- const ret = arg0;
258
- return addHeapObject(ret);
259
- };
260
-
261
232
  module.exports.__wbindgen_object_drop_ref = function(arg0) {
262
233
  takeObject(arg0);
263
234
  };
264
235
 
265
- module.exports.__wbg_new_b6fd0149e79ffce8 = function() {
266
- const ret = new Map();
267
- return addHeapObject(ret);
268
- };
269
-
270
- module.exports.__wbg_new_7befa02319b36069 = function() {
271
- const ret = new Object();
272
- return addHeapObject(ret);
273
- };
236
+ module.exports.__wbg_writeFileSync_9426f87d52a770e1 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
237
+ writeFileSync(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
238
+ }, arguments) };
274
239
 
275
- module.exports.__wbindgen_is_string = function(arg0) {
276
- const ret = typeof(getObject(arg0)) === 'string';
277
- return ret;
240
+ module.exports.__wbg_log_2b55bafeeb586499 = function(arg0, arg1) {
241
+ console.log(getStringFromWasm0(arg0, arg1));
278
242
  };
279
243
 
280
244
  module.exports.__wbindgen_string_get = function(arg0, arg1) {
@@ -286,27 +250,69 @@ module.exports.__wbindgen_string_get = function(arg0, arg1) {
286
250
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
287
251
  };
288
252
 
289
- module.exports.__wbindgen_string_new = function(arg0, arg1) {
290
- const ret = getStringFromWasm0(arg0, arg1);
253
+ module.exports.__wbindgen_error_new = function(arg0, arg1) {
254
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
291
255
  return addHeapObject(ret);
292
256
  };
293
257
 
294
- module.exports.__wbg_set_aee8682c7ee9ac44 = function(arg0, arg1, arg2) {
295
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
258
+ module.exports.__wbg_execSync_d2d024c804aee339 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
259
+ let deferred0_0;
260
+ let deferred0_1;
261
+ try {
262
+ deferred0_0 = arg1;
263
+ deferred0_1 = arg2;
264
+ const ret = execSync(getStringFromWasm0(arg1, arg2), takeObject(arg3));
265
+ const ptr2 = passArray8ToWasm0(ret, wasm.__wbindgen_malloc);
266
+ const len2 = WASM_VECTOR_LEN;
267
+ getInt32Memory0()[arg0 / 4 + 1] = len2;
268
+ getInt32Memory0()[arg0 / 4 + 0] = ptr2;
269
+ } finally {
270
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
271
+ }
272
+ }, arguments) };
273
+
274
+ module.exports.__wbg_existsSync_0ca80cc34d58152b = function() { return handleError(function (arg0, arg1) {
275
+ const ret = existsSync(getStringFromWasm0(arg0, arg1));
276
+ return ret;
277
+ }, arguments) };
278
+
279
+ module.exports.__wbg_cwd_6c59f4d1ce2d767a = function(arg0) {
280
+ const ret = cwd();
281
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
282
+ const len1 = WASM_VECTOR_LEN;
283
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
284
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
296
285
  };
297
286
 
298
- module.exports.__wbg_set_6c1b2b7b73337778 = function(arg0, arg1, arg2) {
299
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
287
+ module.exports.__wbg_readFileSync_7f72a974fd5741b8 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
288
+ const ret = readFileSync(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
289
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
290
+ const len1 = WASM_VECTOR_LEN;
291
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
292
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
293
+ }, arguments) };
294
+
295
+ module.exports.__wbg_set_f975102236d3c502 = function(arg0, arg1, arg2) {
296
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
297
+ };
298
+
299
+ module.exports.__wbindgen_number_new = function(arg0) {
300
+ const ret = arg0;
300
301
  return addHeapObject(ret);
301
302
  };
302
303
 
303
- module.exports.__wbg_getTime_1f655755b697302c = function(arg0) {
304
- const ret = getObject(arg0).getTime();
305
- return ret;
304
+ module.exports.__wbindgen_bigint_from_i64 = function(arg0) {
305
+ const ret = arg0;
306
+ return addHeapObject(ret);
306
307
  };
307
308
 
308
- module.exports.__wbg_new0_d2a7d711adb0fe0f = function() {
309
- const ret = new Date();
309
+ module.exports.__wbindgen_string_new = function(arg0, arg1) {
310
+ const ret = getStringFromWasm0(arg0, arg1);
311
+ return addHeapObject(ret);
312
+ };
313
+
314
+ module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
315
+ const ret = BigInt.asUintN(64, arg0);
310
316
  return addHeapObject(ret);
311
317
  };
312
318
 
@@ -331,73 +337,70 @@ module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
331
337
  deferred0_1 = arg1;
332
338
  console.error(getStringFromWasm0(arg0, arg1));
333
339
  } finally {
334
- wasm.__wbindgen_free(deferred0_0, deferred0_1);
340
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
335
341
  }
336
342
  };
337
343
 
338
- module.exports.__wbindgen_error_new = function(arg0, arg1) {
339
- const ret = new Error(getStringFromWasm0(arg0, arg1));
344
+ module.exports.__wbg_new_d9bc3a0147634640 = function() {
345
+ const ret = new Map();
340
346
  return addHeapObject(ret);
341
347
  };
342
348
 
343
- module.exports.__wbindgen_bigint_from_i64 = function(arg0) {
344
- const ret = arg0;
349
+ module.exports.__wbg_new_16b304a2cfa7ff4a = function() {
350
+ const ret = new Array();
345
351
  return addHeapObject(ret);
346
352
  };
347
353
 
348
- module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
349
- const ret = BigInt.asUintN(64, arg0);
354
+ module.exports.__wbg_new_72fb9a18b5ae2624 = function() {
355
+ const ret = new Object();
350
356
  return addHeapObject(ret);
351
357
  };
352
358
 
353
- module.exports.__wbg_set_bd72c078edfa51ad = function(arg0, arg1, arg2) {
354
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
359
+ module.exports.__wbg_set_8417257aaedc936b = function(arg0, arg1, arg2) {
360
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
361
+ return addHeapObject(ret);
355
362
  };
356
363
 
357
- module.exports.__wbg_writeFileSync_895f70fb25b6eb38 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
358
- writeFileSync(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
359
- }, arguments) };
364
+ module.exports.__wbg_new0_7d84e5b2cd9fdc73 = function() {
365
+ const ret = new Date();
366
+ return addHeapObject(ret);
367
+ };
360
368
 
361
- module.exports.__wbg_existsSync_a726ca5c2e9d6edd = function() { return handleError(function (arg0, arg1) {
362
- const ret = existsSync(getStringFromWasm0(arg0, arg1));
369
+ module.exports.__wbg_getTime_2bc4375165f02d15 = function(arg0) {
370
+ const ret = getObject(arg0).getTime();
363
371
  return ret;
364
- }, arguments) };
372
+ };
365
373
 
366
- module.exports.__wbg_log_60ec10830f37296b = function(arg0, arg1) {
367
- console.log(getStringFromWasm0(arg0, arg1));
374
+ module.exports.__wbg_get_bd8e338fbd5f5cc8 = function(arg0, arg1) {
375
+ const ret = getObject(arg0)[arg1 >>> 0];
376
+ return addHeapObject(ret);
368
377
  };
369
378
 
370
- module.exports.__wbg_cwd_6d4103aef4b4171b = function(arg0) {
371
- const ret = cwd();
372
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
373
- const len1 = WASM_VECTOR_LEN;
374
- getInt32Memory0()[arg0 / 4 + 1] = len1;
375
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
379
+ module.exports.__wbg_set_d4638f722068f043 = function(arg0, arg1, arg2) {
380
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
376
381
  };
377
382
 
378
- module.exports.__wbg_readFileSync_c24156fef4803b37 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
379
- const ret = readFileSync(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
383
+ module.exports.__wbg_length_cd7af8117672b8b8 = function(arg0) {
384
+ const ret = getObject(arg0).length;
385
+ return ret;
386
+ };
387
+
388
+ module.exports.__wbindgen_is_string = function(arg0) {
389
+ const ret = typeof(getObject(arg0)) === 'string';
390
+ return ret;
391
+ };
392
+
393
+ module.exports.__wbindgen_throw = function(arg0, arg1) {
394
+ throw new Error(getStringFromWasm0(arg0, arg1));
395
+ };
396
+
397
+ module.exports.__wbindgen_debug_string = function(arg0, arg1) {
398
+ const ret = debugString(getObject(arg1));
380
399
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
381
400
  const len1 = WASM_VECTOR_LEN;
382
401
  getInt32Memory0()[arg0 / 4 + 1] = len1;
383
402
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
384
- }, arguments) };
385
-
386
- module.exports.__wbg_execSync_d8268e844972718d = function() { return handleError(function (arg0, arg1, arg2, arg3) {
387
- let deferred0_0;
388
- let deferred0_1;
389
- try {
390
- deferred0_0 = arg1;
391
- deferred0_1 = arg2;
392
- const ret = execSync(getStringFromWasm0(arg1, arg2), takeObject(arg3));
393
- const ptr2 = passArray8ToWasm0(ret, wasm.__wbindgen_malloc);
394
- const len2 = WASM_VECTOR_LEN;
395
- getInt32Memory0()[arg0 / 4 + 1] = len2;
396
- getInt32Memory0()[arg0 / 4 + 0] = ptr2;
397
- } finally {
398
- wasm.__wbindgen_free(deferred0_0, deferred0_1);
399
- }
400
- }, arguments) };
403
+ };
401
404
 
402
405
  const path = require('path').join(__dirname, 'panrelease_bg.wasm');
403
406
  const bytes = require('fs').readFileSync(path);
@@ -407,5 +410,3 @@ const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
407
410
  wasm = wasmInstance.exports;
408
411
  module.exports.__wasm = wasm;
409
412
 
410
- wasm.__wbindgen_start();
411
-
Binary file
@@ -1,11 +1,9 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
- export function main(a: number, b: number): number;
5
4
  export function __wbg_reifyrunargs_free(a: number): void;
6
5
  export function run(a: number): void;
7
- export function __wbindgen_malloc(a: number): number;
8
- export function __wbindgen_realloc(a: number, b: number, c: number): number;
9
- export function __wbindgen_free(a: number, b: number): void;
6
+ export function __wbindgen_malloc(a: number, b: number): number;
7
+ export function __wbindgen_realloc(a: number, b: number, c: number, d: number): number;
10
8
  export function __wbindgen_exn_store(a: number): void;
11
- export function __wbindgen_start(): void;
9
+ export function __wbindgen_free(a: number, b: number, c: number): void;