@bytecodealliance/jco 1.14.0 → 1.15.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/obj/js-component-bindgen-component.core.wasm +0 -0
- package/obj/js-component-bindgen-component.js +2 -6
- package/obj/wasm-tools.core.wasm +0 -0
- package/obj/wasm-tools.js +2 -6
- package/package.json +7 -6
- package/src/cmd/componentize.js +52 -12
- package/src/cmd/opt.js +38 -34
- package/src/cmd/run.js +8 -8
- package/src/cmd/transpile.js +171 -171
- package/src/cmd/types.js +39 -8
- package/src/cmd/wasm-tools.js +6 -6
- package/src/common.js +118 -25
- package/src/jco.js +28 -10
- package/types/api.d.ts.map +1 -0
- package/types/browser.d.ts.map +1 -0
- package/types/common.d.ts +80 -0
- package/types/common.d.ts.map +1 -0
- package/types/jco.d.ts.map +1 -0
- package/types/ora-shim.d.ts.map +1 -0
- package/src/api.d.ts.map +0 -1
- package/src/browser.d.ts.map +0 -1
- package/src/common.d.ts +0 -20
- package/src/common.d.ts.map +0 -1
- package/src/jco.d.ts.map +0 -1
- package/src/ora-shim.d.ts.map +0 -1
- /package/{src → types}/api.d.ts +0 -0
- /package/{src → types}/browser.d.ts +0 -0
- /package/{src → types}/jco.d.ts +0 -0
- /package/{src → types}/ora-shim.d.ts +0 -0
package/src/common.js
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { normalize, resolve, sep, dirname } from 'node:path';
|
|
2
2
|
import { tmpdir } from 'node:os';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
readFile,
|
|
5
|
+
writeFile,
|
|
6
|
+
rm,
|
|
7
|
+
mkdtemp,
|
|
8
|
+
mkdir,
|
|
9
|
+
stat,
|
|
10
|
+
} from 'node:fs/promises';
|
|
4
11
|
import { spawn } from 'node:child_process';
|
|
5
12
|
import { argv0 } from 'node:process';
|
|
6
13
|
import { platform } from 'node:process';
|
|
7
|
-
|
|
8
|
-
import c from 'chalk-template';
|
|
14
|
+
import * as nodeUtils from 'node:util';
|
|
9
15
|
|
|
10
16
|
export const isWindows = platform === 'win32';
|
|
11
17
|
|
|
@@ -27,6 +33,9 @@ export const ASYNC_WASI_EXPORTS = [
|
|
|
27
33
|
|
|
28
34
|
export const DEFAULT_ASYNC_MODE = 'sync';
|
|
29
35
|
|
|
36
|
+
/** Path of WIT files by default when one is not specified */
|
|
37
|
+
export const DEFAULT_WIT_PATH = './wit';
|
|
38
|
+
|
|
30
39
|
let _showSpinner = false;
|
|
31
40
|
export function setShowSpinner(val) {
|
|
32
41
|
_showSpinner = val;
|
|
@@ -64,16 +73,23 @@ export function fixedDigitDisplay(num, maxChars) {
|
|
|
64
73
|
return ' '.repeat(maxChars - str.length) + str;
|
|
65
74
|
}
|
|
66
75
|
|
|
67
|
-
|
|
68
|
-
|
|
76
|
+
/**
|
|
77
|
+
* Generate tabular output
|
|
78
|
+
*
|
|
79
|
+
* @param {string[][]} rows - data to put in rows
|
|
80
|
+
* @param {string[]} align - alignment of columns
|
|
81
|
+
* @returns string
|
|
82
|
+
*/
|
|
83
|
+
export function table(rows, align = []) {
|
|
84
|
+
if (rows.length === 0) {
|
|
69
85
|
return '';
|
|
70
86
|
}
|
|
71
|
-
const colLens =
|
|
87
|
+
const colLens = rows.reduce(
|
|
72
88
|
(maxLens, cur) => maxLens.map((len, i) => Math.max(len, cur[i].length)),
|
|
73
|
-
|
|
89
|
+
rows[0].map((cell) => cell.length)
|
|
74
90
|
);
|
|
75
91
|
let outTable = '';
|
|
76
|
-
for (const row of
|
|
92
|
+
for (const row of rows) {
|
|
77
93
|
for (const [i, cell] of row.entries()) {
|
|
78
94
|
if (align[i] === 'right') {
|
|
79
95
|
outTable += ' '.repeat(colLens[i] - cell.length) + cell;
|
|
@@ -90,27 +106,52 @@ export function table(data, align = []) {
|
|
|
90
106
|
* Securely creates a temporary directory and returns its path.
|
|
91
107
|
*
|
|
92
108
|
* The new directory is created using `fsPromises.mkdtemp()`.
|
|
109
|
+
*
|
|
110
|
+
* @returns {Promise<string>} A `Promise` that resovles to a created temporary directory path
|
|
93
111
|
*/
|
|
94
112
|
export async function getTmpDir() {
|
|
95
113
|
return await mkdtemp(normalize(tmpdir() + sep));
|
|
96
114
|
}
|
|
97
115
|
|
|
98
|
-
|
|
116
|
+
/**
|
|
117
|
+
* Read a given file, throwing a formatted error if one occurs
|
|
118
|
+
*
|
|
119
|
+
* @param {string} filePath - path to teh file to read
|
|
120
|
+
* @param {encoding} encoding - file encoding
|
|
121
|
+
* @returns {Promise<Buffer>} A promise that resolves to the contents of the file
|
|
122
|
+
*/
|
|
123
|
+
async function readFileCli(filePath, encoding) {
|
|
99
124
|
try {
|
|
100
|
-
return await readFile(
|
|
125
|
+
return await readFile(filePath, encoding);
|
|
101
126
|
} catch {
|
|
102
|
-
throw
|
|
127
|
+
throw `Unable to read file ${styleText('bold', filePath)}`;
|
|
103
128
|
}
|
|
104
129
|
}
|
|
105
130
|
export { readFileCli as readFile };
|
|
106
131
|
|
|
107
|
-
|
|
132
|
+
/**
|
|
133
|
+
* Spawn a command that processes a given wasm binary bytes with some
|
|
134
|
+
* command.
|
|
135
|
+
*
|
|
136
|
+
* The command invocations that are generated by this function
|
|
137
|
+
* take the following form:
|
|
138
|
+
*
|
|
139
|
+
* ```
|
|
140
|
+
* <cmd> <input wasm file> <...arguments> <output wasm file>
|
|
141
|
+
* ```
|
|
142
|
+
*
|
|
143
|
+
* @param {string} cmd - the command to run
|
|
144
|
+
* @param {Buffer<ArrayBufferLike>} inputWasmBytes - bytes that of the input WebAssembly binary
|
|
145
|
+
* @param {string[]} args - arguments to pass to the command (after the input file and before the output file)
|
|
146
|
+
* @returns {Promise<Buffer<ArrayBufferLike>>} A `Promise` that resolves when the command has exited
|
|
147
|
+
*/
|
|
148
|
+
export async function spawnIOTmp(cmd, inputWasmBytes, args) {
|
|
108
149
|
const tmpDir = await getTmpDir();
|
|
109
150
|
try {
|
|
110
151
|
const inFile = resolve(tmpDir, 'in.wasm');
|
|
111
152
|
let outFile = resolve(tmpDir, 'out.wasm');
|
|
112
153
|
|
|
113
|
-
await writeFile(inFile,
|
|
154
|
+
await writeFile(inFile, inputWasmBytes);
|
|
114
155
|
|
|
115
156
|
const cp = spawn(argv0, [cmd, inFile, ...args, outFile], {
|
|
116
157
|
stdio: 'pipe',
|
|
@@ -139,23 +180,75 @@ export async function spawnIOTmp(cmd, input, args) {
|
|
|
139
180
|
}
|
|
140
181
|
}
|
|
141
182
|
|
|
183
|
+
/**
|
|
184
|
+
* Given an object that has file names as keys and file contents as values,
|
|
185
|
+
* write out the files to a their locations.
|
|
186
|
+
*
|
|
187
|
+
* This function also prints out the files that were written
|
|
188
|
+
*
|
|
189
|
+
* @param {Record<string, string>} files - object which contains files to be written out
|
|
190
|
+
* @param {boolean} summaryTitle - whether to print the summary after writing out files
|
|
191
|
+
* @returns {Promise<void>>} A `Promise` that resolves when the fiels are all written
|
|
192
|
+
*
|
|
193
|
+
*/
|
|
142
194
|
export async function writeFiles(files, summaryTitle) {
|
|
143
195
|
await Promise.all(
|
|
144
|
-
Object.entries(files).map(async ([
|
|
145
|
-
await mkdir(dirname(
|
|
146
|
-
await writeFile(
|
|
196
|
+
Object.entries(files).map(async ([filePath, contents]) => {
|
|
197
|
+
await mkdir(dirname(filePath), { recursive: true });
|
|
198
|
+
await writeFile(filePath, contents);
|
|
147
199
|
})
|
|
148
200
|
);
|
|
149
201
|
if (!summaryTitle) {
|
|
150
202
|
return;
|
|
151
203
|
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
)}`);
|
|
204
|
+
|
|
205
|
+
let rows = Object.entries(files).map(([name, source]) => [
|
|
206
|
+
` - ${styleText('italic', name)} `,
|
|
207
|
+
`${styleText(['black', 'italic'], sizeStr(source.length))}`,
|
|
208
|
+
]);
|
|
209
|
+
console.log(`
|
|
210
|
+
${styleText('bold', summaryTitle + ":")}
|
|
211
|
+
|
|
212
|
+
${table(rows)}`);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Resolve the deafult WIT path, given a possibly
|
|
217
|
+
*
|
|
218
|
+
* @param {string | undefined} [witPath]
|
|
219
|
+
* @returns {Promise<string>}
|
|
220
|
+
*/
|
|
221
|
+
export async function resolveDefaultWITPath(witPath) {
|
|
222
|
+
if (witPath) {
|
|
223
|
+
return witPath;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
// Use a default/standard current-folder WIT directory (wit) if we can find it
|
|
227
|
+
const witDirExists = await stat(DEFAULT_WIT_PATH)
|
|
228
|
+
.then((p) => p.isDirectory())
|
|
229
|
+
.catch(() => false);
|
|
230
|
+
if (!witDirExists) {
|
|
231
|
+
throw new Error(
|
|
232
|
+
'Failed to determine WIT directory, please specify WIT directory argument'
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
witPath = resolve(DEFAULT_WIT_PATH);
|
|
236
|
+
console.error(
|
|
237
|
+
`no WIT directory specified, using detected WIT directory @ [${DEFAULT_WIT_PATH}]`
|
|
238
|
+
);
|
|
239
|
+
return witPath;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Partial polyfill for 'node:utils' `styleText()`
|
|
244
|
+
*
|
|
245
|
+
* @param {string | string[]} styles - styles to apply to the given text
|
|
246
|
+
* @param {string} text - text that should be styled
|
|
247
|
+
* @returns {string} The styled string
|
|
248
|
+
*/
|
|
249
|
+
export function styleText(styles, text) {
|
|
250
|
+
if (nodeUtils.styleText) {
|
|
251
|
+
return nodeUtils.styleText(styles, text);
|
|
252
|
+
}
|
|
253
|
+
return text;
|
|
161
254
|
}
|
package/src/jco.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import c from 'chalk-template';
|
|
4
3
|
import { program, Option } from 'commander';
|
|
5
4
|
|
|
6
5
|
import { opt } from './cmd/opt.js';
|
|
@@ -17,15 +16,16 @@ import {
|
|
|
17
16
|
componentWit,
|
|
18
17
|
} from './cmd/wasm-tools.js';
|
|
19
18
|
import { componentize } from './cmd/componentize.js';
|
|
19
|
+
import { styleText } from './common.js';
|
|
20
20
|
|
|
21
21
|
program
|
|
22
22
|
.name('jco')
|
|
23
23
|
.description(
|
|
24
|
-
|
|
24
|
+
`${styleText('bold', "jco - WebAssembly JS Component Tools")}\n JS Component Transpilation Bindgen & Wasm Tools for JS`
|
|
25
25
|
)
|
|
26
26
|
.usage('<command> [options]')
|
|
27
27
|
.enablePositionalOptions()
|
|
28
|
-
.version('1.
|
|
28
|
+
.version('1.15.0');
|
|
29
29
|
|
|
30
30
|
function myParseInt(value) {
|
|
31
31
|
return parseInt(value, 10);
|
|
@@ -41,6 +41,16 @@ function collectOptions(value, previous) {
|
|
|
41
41
|
return previous.concat([value]);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
/** Choices for features (enabling/disabling) */
|
|
45
|
+
const FEATURE_CHOICES = [
|
|
46
|
+
'clocks',
|
|
47
|
+
'http',
|
|
48
|
+
'random',
|
|
49
|
+
'stdio',
|
|
50
|
+
'fetch-event',
|
|
51
|
+
'all',
|
|
52
|
+
];
|
|
53
|
+
|
|
44
54
|
program
|
|
45
55
|
.command('componentize')
|
|
46
56
|
.description('Create a component from a JavaScript module')
|
|
@@ -58,9 +68,17 @@ program
|
|
|
58
68
|
new Option(
|
|
59
69
|
'-d, --disable <feature...>',
|
|
60
70
|
'disable WASI features'
|
|
61
|
-
).choices(
|
|
71
|
+
).choices(FEATURE_CHOICES)
|
|
72
|
+
)
|
|
73
|
+
.addOption(
|
|
74
|
+
new Option('--enable <feature...>', 'enable WASI features').choices(
|
|
75
|
+
FEATURE_CHOICES
|
|
76
|
+
)
|
|
77
|
+
)
|
|
78
|
+
.option(
|
|
79
|
+
'--debug',
|
|
80
|
+
'configure jco for debug (e.g. disable all features except stdio, etc)'
|
|
62
81
|
)
|
|
63
|
-
// .addOption(new Option('-e, --enable <feature...>', 'enable WASI features').choices(['http']))
|
|
64
82
|
.option(
|
|
65
83
|
'--preview2-adapter <adapter>',
|
|
66
84
|
'provide a custom preview2 adapter path'
|
|
@@ -186,10 +204,10 @@ program
|
|
|
186
204
|
.command('types')
|
|
187
205
|
.description('Generate types for the given WIT')
|
|
188
206
|
.usage('<wit-path> -o <out-dir>')
|
|
189
|
-
.argument('<wit-path>', 'path to a WIT file or directory')
|
|
207
|
+
.argument('[<wit-path>]', 'path to a WIT file or directory')
|
|
190
208
|
.option('--name <name>', 'custom output name')
|
|
191
209
|
.option('-n, --world-name <world>', 'WIT world to generate types for')
|
|
192
|
-
.
|
|
210
|
+
.option('-o, --out-dir <out-dir>', 'output directory')
|
|
193
211
|
.option(
|
|
194
212
|
'--tla-compat',
|
|
195
213
|
'generates types for the TLA compat output with an async $init promise export'
|
|
@@ -243,10 +261,10 @@ program
|
|
|
243
261
|
.command('guest-types')
|
|
244
262
|
.description('(experimental) Generate guest types for the given WIT')
|
|
245
263
|
.usage('<wit-path> -o <out-dir>')
|
|
246
|
-
.argument('<wit-path>', 'path to a WIT file or directory')
|
|
264
|
+
.argument('[<wit-path>]', 'path to a WIT file or directory')
|
|
247
265
|
.option('--name <name>', 'custom output name')
|
|
248
266
|
.option('-n, --world-name <world>', 'WIT world to generate types for')
|
|
249
|
-
.
|
|
267
|
+
.option('-o, --out-dir <out-dir>', 'output directory')
|
|
250
268
|
.option('-q, --quiet', 'disable output summary')
|
|
251
269
|
.option(
|
|
252
270
|
'--feature <feature>',
|
|
@@ -468,7 +486,7 @@ function asyncAction(cmd) {
|
|
|
468
486
|
} catch (e) {
|
|
469
487
|
process.stdout.write(`(jco ${cmd.name}) `);
|
|
470
488
|
if (typeof e === 'string') {
|
|
471
|
-
console.error(
|
|
489
|
+
console.error(`${styleText(['red', 'bold'], "Error")}: ${e}\n`);
|
|
472
490
|
} else {
|
|
473
491
|
console.error(e);
|
|
474
492
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.js"],"names":[],"mappings":"AAgBA;;;GAGG;AACH,8BAHW,UAAU,CAAC,GAAoC,CAAC,CAAC,CAAC,CAAC,GAClD,OAAO,CAAC,UAAU,CAAC,GAAoC,CAAC,CAAC,CAKpE;AACD;;;GAGG;AACH,2BAHW,UAAU,CAAC,GAAoC,CAAC,CAAC,CAAC,CAAC,GAClD,OAAO,CAAC,UAAU,CAAC,GAAoC,CAAC,CAAC,CAKpE;AACD;;;GAGG;AACH,qCAHW,UAAU,CAAC,GAA2C,CAAC,CAAC,CAAC,CAAC,GACzD,OAAO,CAAC,UAAU,CAAC,GAA2C,CAAC,CAAC,CAK3E;AACD;;;;GAIG;AACH,qCAJW,UAAU,CAAC,GAA2C,CAAC,CAAC,CAAC,CAAC,YAC1D,UAAU,CAAC,GAA2C,CAAC,CAAC,CAAC,CAAC,GACzD,OAAO,CAAC,UAAU,CAAC,GAA2C,CAAC,CAAC,CAK3E;AACD;;;GAGG;AACH,0CAHW,UAAU,CAAC,GAA6C,CAAC,CAAC,CAAC,CAAC,GAC3D,OAAO,CAAC,UAAU,CAAC,GAA6C,CAAC,CAAC,CAK7E;AACD;;;;GAIG;AACH,oCAJW,UAAU,CAAC,GAA0C,CAAC,CAAC,CAAC,CAAC,YACzD,UAAU,CAAC,GAA0C,CAAC,CAAC,CAAC,CAAC,GACxD,OAAO,CAAC,UAAU,CAAC,GAA0C,CAAC,CAAC,CAK1E;AACD;;;GAGG;AACH,qCAHW,UAAU,CAAC,GAA2C,CAAC,CAAC,CAAC,CAAC,GACzD,OAAO,CAAC,UAAU,CAAC,GAA2C,CAAC,CAAC,CAK3E;AACD,kDAKC;AACD,kDAKC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.js"],"names":[],"mappings":"AAMA,uDAGC;AAED,4DAGC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export function setShowSpinner(val: any): void;
|
|
2
|
+
export function getShowSpinner(): boolean;
|
|
3
|
+
export function sizeStr(num: any): string;
|
|
4
|
+
export function fixedDigitDisplay(num: any, maxChars: any): string;
|
|
5
|
+
/**
|
|
6
|
+
* Generate tabular output
|
|
7
|
+
*
|
|
8
|
+
* @param {string[][]} rows - data to put in rows
|
|
9
|
+
* @param {string[]} align - alignment of columns
|
|
10
|
+
* @returns string
|
|
11
|
+
*/
|
|
12
|
+
export function table(rows: string[][], align?: string[]): string;
|
|
13
|
+
/**
|
|
14
|
+
* Securely creates a temporary directory and returns its path.
|
|
15
|
+
*
|
|
16
|
+
* The new directory is created using `fsPromises.mkdtemp()`.
|
|
17
|
+
*
|
|
18
|
+
* @returns {Promise<string>} A `Promise` that resovles to a created temporary directory path
|
|
19
|
+
*/
|
|
20
|
+
export function getTmpDir(): Promise<string>;
|
|
21
|
+
/**
|
|
22
|
+
* Spawn a command that processes a given wasm binary bytes with some
|
|
23
|
+
* command.
|
|
24
|
+
*
|
|
25
|
+
* The command invocations that are generated by this function
|
|
26
|
+
* take the following form:
|
|
27
|
+
*
|
|
28
|
+
* ```
|
|
29
|
+
* <cmd> <input wasm file> <...arguments> <output wasm file>
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @param {string} cmd - the command to run
|
|
33
|
+
* @param {Buffer<ArrayBufferLike>} inputWasmBytes - bytes that of the input WebAssembly binary
|
|
34
|
+
* @param {string[]} args - arguments to pass to the command (after the input file and before the output file)
|
|
35
|
+
* @returns {Promise<Buffer<ArrayBufferLike>>} A `Promise` that resolves when the command has exited
|
|
36
|
+
*/
|
|
37
|
+
export function spawnIOTmp(cmd: string, inputWasmBytes: Buffer<ArrayBufferLike>, args: string[]): Promise<Buffer<ArrayBufferLike>>;
|
|
38
|
+
/**
|
|
39
|
+
* Given an object that has file names as keys and file contents as values,
|
|
40
|
+
* write out the files to a their locations.
|
|
41
|
+
*
|
|
42
|
+
* This function also prints out the files that were written
|
|
43
|
+
*
|
|
44
|
+
* @param {Record<string, string>} files - object which contains files to be written out
|
|
45
|
+
* @param {boolean} summaryTitle - whether to print the summary after writing out files
|
|
46
|
+
* @returns {Promise<void>>} A `Promise` that resolves when the fiels are all written
|
|
47
|
+
*
|
|
48
|
+
*/
|
|
49
|
+
export function writeFiles(files: Record<string, string>, summaryTitle: boolean): Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* Resolve the deafult WIT path, given a possibly
|
|
52
|
+
*
|
|
53
|
+
* @param {string | undefined} [witPath]
|
|
54
|
+
* @returns {Promise<string>}
|
|
55
|
+
*/
|
|
56
|
+
export function resolveDefaultWITPath(witPath?: string | undefined): Promise<string>;
|
|
57
|
+
/**
|
|
58
|
+
* Partial polyfill for 'node:utils' `styleText()`
|
|
59
|
+
*
|
|
60
|
+
* @param {string | string[]} styles - styles to apply to the given text
|
|
61
|
+
* @param {string} text - text that should be styled
|
|
62
|
+
* @returns {string} The styled string
|
|
63
|
+
*/
|
|
64
|
+
export function styleText(styles: string | string[], text: string): string;
|
|
65
|
+
export const isWindows: boolean;
|
|
66
|
+
export const ASYNC_WASI_IMPORTS: string[];
|
|
67
|
+
export const ASYNC_WASI_EXPORTS: string[];
|
|
68
|
+
export const DEFAULT_ASYNC_MODE: "sync";
|
|
69
|
+
/** Path of WIT files by default when one is not specified */
|
|
70
|
+
export const DEFAULT_WIT_PATH: "./wit";
|
|
71
|
+
export { readFileCli as readFile };
|
|
72
|
+
/**
|
|
73
|
+
* Read a given file, throwing a formatted error if one occurs
|
|
74
|
+
*
|
|
75
|
+
* @param {string} filePath - path to teh file to read
|
|
76
|
+
* @param {encoding} encoding - file encoding
|
|
77
|
+
* @returns {Promise<Buffer>} A promise that resolves to the contents of the file
|
|
78
|
+
*/
|
|
79
|
+
declare function readFileCli(filePath: string, encoding: any): Promise<Buffer>;
|
|
80
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.js"],"names":[],"mappings":"AAuCA,+CAEC;AACD,0CAIC;AAED,0CASC;AAED,mEAcC;AAED;;;;;;GAMG;AACH,4BAJW,MAAM,EAAE,EAAE,UACV,MAAM,EAAE,UAuBlB;AAED;;;;;;GAMG;AACH,6BAFa,OAAO,CAAC,MAAM,CAAC,CAI3B;AAkBD;;;;;;;;;;;;;;;GAeG;AACH,gCALW,MAAM,kBACN,MAAM,CAAC,eAAe,CAAC,QACvB,MAAM,EAAE,GACN,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAmC5C;AAED;;;;;;;;;;GAUG;AACH,kCALW,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,gBACtB,OAAO,GACL,OAAO,CAAC,IAAI,CAAC,CAsBzB;AAED;;;;;GAKG;AACH,gDAHW,MAAM,GAAG,SAAS,GAChB,OAAO,CAAC,MAAM,CAAC,CAqB3B;AAED;;;;;;GAMG;AACH,kCAJW,MAAM,GAAG,MAAM,EAAE,QACjB,MAAM,GACJ,MAAM,CAOlB;AA9OD,gCAA8C;AAE9C,0CASE;AAEF,0CAGE;AAEF,iCAAkC,MAAM,CAAC;AAEzC,6DAA6D;AAC7D,+BAAgC,OAAO,CAAC;;AA+ExC;;;;;;GAMG;AACH,uCAJW,MAAM,kBAEJ,OAAO,CAAC,MAAM,CAAC,CAQ3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jco.d.ts","sourceRoot":"","sources":["../src/jco.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ora-shim.d.ts","sourceRoot":"","sources":["../src/ora-shim.js"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,mCAEC;AAED;IACI,cAAU;IACV,aAAS;CACZ"}
|
package/src/api.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["api.js"],"names":[],"mappings":"AAgBA;;;GAGG;AACH,8BAHW,UAAU,CAAC,GAAoC,CAAC,CAAC,CAAC,CAAC,GAClD,OAAO,CAAC,UAAU,CAAC,GAAoC,CAAC,CAAC,CAKpE;AACD;;;GAGG;AACH,2BAHW,UAAU,CAAC,GAAoC,CAAC,CAAC,CAAC,CAAC,GAClD,OAAO,CAAC,UAAU,CAAC,GAAoC,CAAC,CAAC,CAKpE;AACD;;;GAGG;AACH,qCAHW,UAAU,CAAC,GAA2C,CAAC,CAAC,CAAC,CAAC,GACzD,OAAO,CAAC,UAAU,CAAC,GAA2C,CAAC,CAAC,CAK3E;AACD;;;;GAIG;AACH,qCAJW,UAAU,CAAC,GAA2C,CAAC,CAAC,CAAC,CAAC,YAC1D,UAAU,CAAC,GAA2C,CAAC,CAAC,CAAC,CAAC,GACzD,OAAO,CAAC,UAAU,CAAC,GAA2C,CAAC,CAAC,CAK3E;AACD;;;GAGG;AACH,0CAHW,UAAU,CAAC,GAA6C,CAAC,CAAC,CAAC,CAAC,GAC3D,OAAO,CAAC,UAAU,CAAC,GAA6C,CAAC,CAAC,CAK7E;AACD;;;;GAIG;AACH,oCAJW,UAAU,CAAC,GAA0C,CAAC,CAAC,CAAC,CAAC,YACzD,UAAU,CAAC,GAA0C,CAAC,CAAC,CAAC,CAAC,GACxD,OAAO,CAAC,UAAU,CAAC,GAA0C,CAAC,CAAC,CAK1E;AACD;;;GAGG;AACH,qCAHW,UAAU,CAAC,GAA2C,CAAC,CAAC,CAAC,CAAC,GACzD,OAAO,CAAC,UAAU,CAAC,GAA2C,CAAC,CAAC,CAK3E;AACD,kDAKC;AACD,kDAKC"}
|
package/src/browser.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["browser.js"],"names":[],"mappings":"AAMA,uDAGC;AAED,4DAGC"}
|
package/src/common.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export function setShowSpinner(val: any): void;
|
|
2
|
-
export function getShowSpinner(): boolean;
|
|
3
|
-
export function sizeStr(num: any): string;
|
|
4
|
-
export function fixedDigitDisplay(num: any, maxChars: any): string;
|
|
5
|
-
export function table(data: any, align?: any[]): string;
|
|
6
|
-
/**
|
|
7
|
-
* Securely creates a temporary directory and returns its path.
|
|
8
|
-
*
|
|
9
|
-
* The new directory is created using `fsPromises.mkdtemp()`.
|
|
10
|
-
*/
|
|
11
|
-
export function getTmpDir(): Promise<string>;
|
|
12
|
-
export function spawnIOTmp(cmd: any, input: any, args: any): Promise<Buffer<ArrayBufferLike>>;
|
|
13
|
-
export function writeFiles(files: any, summaryTitle: any): Promise<void>;
|
|
14
|
-
export const isWindows: boolean;
|
|
15
|
-
export const ASYNC_WASI_IMPORTS: string[];
|
|
16
|
-
export const ASYNC_WASI_EXPORTS: string[];
|
|
17
|
-
export const DEFAULT_ASYNC_MODE: "sync";
|
|
18
|
-
export { readFileCli as readFile };
|
|
19
|
-
declare function readFileCli(file: any, encoding: any): Promise<Buffer<ArrayBufferLike>>;
|
|
20
|
-
//# sourceMappingURL=common.d.ts.map
|
package/src/common.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["common.js"],"names":[],"mappings":"AA8BA,+CAEC;AACD,0CAIC;AAED,0CASC;AAED,mEAcC;AAED,wDAoBC;AAED;;;;GAIG;AACH,6CAEC;AAWD,8FAiCC;AAED,yEAmBC;AAvJD,gCAA8C;AAE9C,0CASE;AAEF,0CAGE;AAEF,iCAAkC,MAAM,CAAC;;AAsEzC,yFAMC"}
|
package/src/jco.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jco.d.ts","sourceRoot":"","sources":["jco.js"],"names":[],"mappings":""}
|
package/src/ora-shim.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ora-shim.d.ts","sourceRoot":"","sources":["ora-shim.js"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B,mCAEC;AAED;IACI,cAAU;IACV,aAAS;CACZ"}
|
/package/{src → types}/api.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
/package/{src → types}/jco.d.ts
RENAMED
|
File without changes
|
|
File without changes
|