panrelease 0.9.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/README.md ADDED
@@ -0,0 +1,36 @@
1
+ # Panrelease
2
+
3
+ ## Quick start
4
+
5
+ Install using npm:
6
+
7
+ ```shell
8
+ npm i --save-dev panrelease
9
+ ```
10
+
11
+ Or yarn:
12
+
13
+ ```shell
14
+ yarn add -D panrelease
15
+ ```
16
+
17
+ Write a configuration file:
18
+
19
+ ```toml
20
+ [vcs]
21
+ software = "Git"
22
+
23
+ [modules.root]
24
+ path = "."
25
+ packageManager = "Npm"
26
+ ```
27
+
28
+ Add custom script in your package.json
29
+
30
+ ```json
31
+ {
32
+ "scripts": {
33
+ "rel": "panrelease release"
34
+ }
35
+ }
36
+ ```
package/bin/index.js ADDED
@@ -0,0 +1,4 @@
1
+ #! /usr/bin/env node
2
+
3
+ const panrelease = require('../pkg/panrelease.js');
4
+ panrelease.run(process.argv.slice(1));
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "panrelease",
3
+ "version": "0.9.1",
4
+ "description": "Utility to release software",
5
+ "keywords": [ "cli", "tool", "git", "release" ],
6
+ "homepage": "https://github.com/dghilardi/panrelease",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/dghilardi/panrelease.git"
10
+ },
11
+ "author": "Davide Ghilardi <dghila@d71.dev>",
12
+ "main": "index.js",
13
+ "license": "MIT",
14
+ "bin": {
15
+ "env-reify": "./bin/index.js"
16
+ },
17
+ "scripts": {
18
+ "panrelease": "./bin/index.js"
19
+ }
20
+ }
@@ -0,0 +1,11 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * @param {Array<any>} js_args
5
+ */
6
+ export function run(js_args: Array<any>): void;
7
+ /**
8
+ */
9
+ export class ReifyRunArgs {
10
+ free(): void;
11
+ }
@@ -0,0 +1,402 @@
1
+ let imports = {};
2
+ imports['__wbindgen_placeholder__'] = module.exports;
3
+ let wasm;
4
+ const { execSync } = require(`child_process`);
5
+ const { readFileSync, writeFileSync, existsSync } = require(`fs`);
6
+ const { cwd } = require(`process`);
7
+ const { TextEncoder, TextDecoder } = require(`util`);
8
+
9
+ const heap = new Array(128).fill(undefined);
10
+
11
+ heap.push(undefined, null, true, false);
12
+
13
+ function getObject(idx) { return heap[idx]; }
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;
78
+ }
79
+
80
+ let WASM_VECTOR_LEN = 0;
81
+
82
+ let cachedUint8Memory0 = null;
83
+
84
+ function getUint8Memory0() {
85
+ if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
86
+ cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
87
+ }
88
+ return cachedUint8Memory0;
89
+ }
90
+
91
+ let cachedTextEncoder = new TextEncoder('utf-8');
92
+
93
+ const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
94
+ ? function (arg, view) {
95
+ return cachedTextEncoder.encodeInto(arg, view);
96
+ }
97
+ : function (arg, view) {
98
+ const buf = cachedTextEncoder.encode(arg);
99
+ view.set(buf);
100
+ return {
101
+ read: arg.length,
102
+ written: buf.length
103
+ };
104
+ });
105
+
106
+ function passStringToWasm0(arg, malloc, realloc) {
107
+
108
+ if (realloc === undefined) {
109
+ const buf = cachedTextEncoder.encode(arg);
110
+ const ptr = malloc(buf.length);
111
+ getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
112
+ WASM_VECTOR_LEN = buf.length;
113
+ return ptr;
114
+ }
115
+
116
+ let len = arg.length;
117
+ let ptr = malloc(len);
118
+
119
+ const mem = getUint8Memory0();
120
+
121
+ let offset = 0;
122
+
123
+ for (; offset < len; offset++) {
124
+ const code = arg.charCodeAt(offset);
125
+ if (code > 0x7F) break;
126
+ mem[ptr + offset] = code;
127
+ }
128
+
129
+ if (offset !== len) {
130
+ if (offset !== 0) {
131
+ arg = arg.slice(offset);
132
+ }
133
+ ptr = realloc(ptr, len, len = offset + arg.length * 3);
134
+ const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
135
+ const ret = encodeString(arg, view);
136
+
137
+ offset += ret.written;
138
+ }
139
+
140
+ WASM_VECTOR_LEN = offset;
141
+ return ptr;
142
+ }
143
+
144
+ let cachedInt32Memory0 = null;
145
+
146
+ function getInt32Memory0() {
147
+ if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
148
+ cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
149
+ }
150
+ return cachedInt32Memory0;
151
+ }
152
+
153
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
154
+
155
+ cachedTextDecoder.decode();
156
+
157
+ function getStringFromWasm0(ptr, len) {
158
+ return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
159
+ }
160
+
161
+ let heap_next = heap.length;
162
+
163
+ function addHeapObject(obj) {
164
+ if (heap_next === heap.length) heap.push(heap.length + 1);
165
+ const idx = heap_next;
166
+ heap_next = heap[idx];
167
+
168
+ heap[idx] = obj;
169
+ return idx;
170
+ }
171
+
172
+ function dropObject(idx) {
173
+ if (idx < 132) return;
174
+ heap[idx] = heap_next;
175
+ heap_next = idx;
176
+ }
177
+
178
+ function takeObject(idx) {
179
+ const ret = getObject(idx);
180
+ dropObject(idx);
181
+ return ret;
182
+ }
183
+
184
+ function isLikeNone(x) {
185
+ return x === undefined || x === null;
186
+ }
187
+ /**
188
+ * @param {Array<any>} js_args
189
+ */
190
+ module.exports.run = function(js_args) {
191
+ wasm.run(addHeapObject(js_args));
192
+ };
193
+
194
+ function handleError(f, args) {
195
+ try {
196
+ return f.apply(this, args);
197
+ } catch (e) {
198
+ wasm.__wbindgen_exn_store(addHeapObject(e));
199
+ }
200
+ }
201
+
202
+ function passArray8ToWasm0(arg, malloc) {
203
+ const ptr = malloc(arg.length * 1);
204
+ getUint8Memory0().set(arg, ptr / 1);
205
+ WASM_VECTOR_LEN = arg.length;
206
+ return ptr;
207
+ }
208
+
209
+ const ReifyRunArgsFinalization = new FinalizationRegistry(ptr => wasm.__wbg_reifyrunargs_free(ptr));
210
+ /**
211
+ */
212
+ class ReifyRunArgs {
213
+
214
+ __destroy_into_raw() {
215
+ const ptr = this.ptr;
216
+ this.ptr = 0;
217
+ ReifyRunArgsFinalization.unregister(this);
218
+ return ptr;
219
+ }
220
+
221
+ free() {
222
+ const ptr = this.__destroy_into_raw();
223
+ wasm.__wbg_reifyrunargs_free(ptr);
224
+ }
225
+ }
226
+ module.exports.ReifyRunArgs = ReifyRunArgs;
227
+
228
+ module.exports.__wbindgen_debug_string = function(arg0, arg1) {
229
+ const ret = debugString(getObject(arg1));
230
+ const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
231
+ const len0 = WASM_VECTOR_LEN;
232
+ getInt32Memory0()[arg0 / 4 + 1] = len0;
233
+ getInt32Memory0()[arg0 / 4 + 0] = ptr0;
234
+ };
235
+
236
+ module.exports.__wbindgen_throw = function(arg0, arg1) {
237
+ throw new Error(getStringFromWasm0(arg0, arg1));
238
+ };
239
+
240
+ module.exports.__wbg_get_27fe3dac1c4d0224 = function(arg0, arg1) {
241
+ const ret = getObject(arg0)[arg1 >>> 0];
242
+ return addHeapObject(ret);
243
+ };
244
+
245
+ module.exports.__wbg_length_e498fbc24f9c1d4f = function(arg0) {
246
+ const ret = getObject(arg0).length;
247
+ return ret;
248
+ };
249
+
250
+ module.exports.__wbg_new_b525de17f44a8943 = function() {
251
+ const ret = new Array();
252
+ return addHeapObject(ret);
253
+ };
254
+
255
+ module.exports.__wbindgen_number_new = function(arg0) {
256
+ const ret = arg0;
257
+ return addHeapObject(ret);
258
+ };
259
+
260
+ module.exports.__wbindgen_object_drop_ref = function(arg0) {
261
+ takeObject(arg0);
262
+ };
263
+
264
+ module.exports.__wbg_new_f841cc6f2098f4b5 = function() {
265
+ const ret = new Map();
266
+ return addHeapObject(ret);
267
+ };
268
+
269
+ module.exports.__wbg_new_f9876326328f45ed = function() {
270
+ const ret = new Object();
271
+ return addHeapObject(ret);
272
+ };
273
+
274
+ module.exports.__wbindgen_is_string = function(arg0) {
275
+ const ret = typeof(getObject(arg0)) === 'string';
276
+ return ret;
277
+ };
278
+
279
+ module.exports.__wbindgen_string_get = function(arg0, arg1) {
280
+ const obj = getObject(arg1);
281
+ const ret = typeof(obj) === 'string' ? obj : undefined;
282
+ var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
283
+ var len0 = WASM_VECTOR_LEN;
284
+ getInt32Memory0()[arg0 / 4 + 1] = len0;
285
+ getInt32Memory0()[arg0 / 4 + 0] = ptr0;
286
+ };
287
+
288
+ module.exports.__wbindgen_string_new = function(arg0, arg1) {
289
+ const ret = getStringFromWasm0(arg0, arg1);
290
+ return addHeapObject(ret);
291
+ };
292
+
293
+ module.exports.__wbg_set_17224bc548dd1d7b = function(arg0, arg1, arg2) {
294
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
295
+ };
296
+
297
+ module.exports.__wbg_set_388c4c6422704173 = function(arg0, arg1, arg2) {
298
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
299
+ return addHeapObject(ret);
300
+ };
301
+
302
+ module.exports.__wbg_getTime_7c59072d1651a3cf = function(arg0) {
303
+ const ret = getObject(arg0).getTime();
304
+ return ret;
305
+ };
306
+
307
+ module.exports.__wbg_new0_25059e40b1c02766 = function() {
308
+ const ret = new Date();
309
+ return addHeapObject(ret);
310
+ };
311
+
312
+ module.exports.__wbg_log_c059c6f470577558 = function(arg0, arg1) {
313
+ console.log(getStringFromWasm0(arg0, arg1));
314
+ };
315
+
316
+ module.exports.__wbindgen_error_new = function(arg0, arg1) {
317
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
318
+ return addHeapObject(ret);
319
+ };
320
+
321
+ module.exports.__wbindgen_bigint_from_i64 = function(arg0) {
322
+ const ret = arg0;
323
+ return addHeapObject(ret);
324
+ };
325
+
326
+ module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
327
+ const ret = BigInt.asUintN(64, arg0);
328
+ return addHeapObject(ret);
329
+ };
330
+
331
+ module.exports.__wbg_set_841ac57cff3d672b = function(arg0, arg1, arg2) {
332
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
333
+ };
334
+
335
+ module.exports.__wbg_writeFileSync_e8bb5580bb5c6bd4 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
336
+ writeFileSync(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3));
337
+ }, arguments) };
338
+
339
+ module.exports.__wbg_existsSync_fb10e5a433786fd9 = function() { return handleError(function (arg0, arg1) {
340
+ const ret = existsSync(getStringFromWasm0(arg0, arg1));
341
+ return ret;
342
+ }, arguments) };
343
+
344
+ module.exports.__wbg_new_abda76e883ba8a5f = function() {
345
+ const ret = new Error();
346
+ return addHeapObject(ret);
347
+ };
348
+
349
+ module.exports.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {
350
+ const ret = getObject(arg1).stack;
351
+ const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
352
+ const len0 = WASM_VECTOR_LEN;
353
+ getInt32Memory0()[arg0 / 4 + 1] = len0;
354
+ getInt32Memory0()[arg0 / 4 + 0] = ptr0;
355
+ };
356
+
357
+ module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
358
+ try {
359
+ console.error(getStringFromWasm0(arg0, arg1));
360
+ } finally {
361
+ wasm.__wbindgen_free(arg0, arg1);
362
+ }
363
+ };
364
+
365
+ module.exports.__wbg_cwd_8c1281d554302dce = function(arg0) {
366
+ const ret = cwd();
367
+ const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
368
+ const len0 = WASM_VECTOR_LEN;
369
+ getInt32Memory0()[arg0 / 4 + 1] = len0;
370
+ getInt32Memory0()[arg0 / 4 + 0] = ptr0;
371
+ };
372
+
373
+ module.exports.__wbg_readFileSync_c1ecb8b65a8509c6 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
374
+ const ret = readFileSync(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
375
+ const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
376
+ const len0 = WASM_VECTOR_LEN;
377
+ getInt32Memory0()[arg0 / 4 + 1] = len0;
378
+ getInt32Memory0()[arg0 / 4 + 0] = ptr0;
379
+ }, arguments) };
380
+
381
+ module.exports.__wbg_execSync_e6f83dbbef768643 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
382
+ try {
383
+ const ret = execSync(getStringFromWasm0(arg1, arg2), takeObject(arg3));
384
+ const ptr0 = passArray8ToWasm0(ret, wasm.__wbindgen_malloc);
385
+ const len0 = WASM_VECTOR_LEN;
386
+ getInt32Memory0()[arg0 / 4 + 1] = len0;
387
+ getInt32Memory0()[arg0 / 4 + 0] = ptr0;
388
+ } finally {
389
+ wasm.__wbindgen_free(arg1, arg2);
390
+ }
391
+ }, arguments) };
392
+
393
+ const path = require('path').join(__dirname, 'panrelease_bg.wasm');
394
+ const bytes = require('fs').readFileSync(path);
395
+
396
+ const wasmModule = new WebAssembly.Module(bytes);
397
+ const wasmInstance = new WebAssembly.Instance(wasmModule, imports);
398
+ wasm = wasmInstance.exports;
399
+ module.exports.__wasm = wasm;
400
+
401
+ wasm.__wbindgen_start();
402
+
Binary file
@@ -0,0 +1,11 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export const memory: WebAssembly.Memory;
4
+ export function main(a: number, b: number): number;
5
+ export function __wbg_reifyrunargs_free(a: number): void;
6
+ 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;
10
+ export function __wbindgen_exn_store(a: number): void;
11
+ export function __wbindgen_start(): void;