@bytecodealliance/jco 1.15.3 → 1.15.4
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/wasm-tools.core.wasm +0 -0
- package/package.json +3 -2
- package/src/cmd/opt.js +1 -1
- package/src/cmd/transpile.d.ts +43 -1
- package/src/cmd/transpile.js +1 -1
- package/src/common.js +1 -1
- package/src/jco.js +1 -1
- package/types/common.d.ts +1 -1
|
Binary file
|
package/obj/wasm-tools.core.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bytecodealliance/jco",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.4",
|
|
4
4
|
"description": "JavaScript tooling for working with WebAssembly Components",
|
|
5
5
|
"homepage": "https://github.com/bytecodealliance/jco#readme",
|
|
6
6
|
"author": "Guy Bedford",
|
|
@@ -86,12 +86,13 @@
|
|
|
86
86
|
"@typescript-eslint/parser": "^8.39.1",
|
|
87
87
|
"commitlint": "^19.8.1",
|
|
88
88
|
"conventional-changelog-conventionalcommits": "^9.1.0",
|
|
89
|
-
"eslint": "^9.
|
|
89
|
+
"eslint": "^9.39.1",
|
|
90
90
|
"mime": "^4.0.7",
|
|
91
91
|
"puppeteer": "^24.16.2",
|
|
92
92
|
"semver": "^7.7.1",
|
|
93
93
|
"smol-toml": "^1.4.2",
|
|
94
94
|
"typescript": "^5.9.2",
|
|
95
|
+
"vite": "^7.1.5",
|
|
95
96
|
"vitest": "^3.2.4",
|
|
96
97
|
"which": "^2.0.2"
|
|
97
98
|
}
|
package/src/cmd/opt.js
CHANGED
package/src/cmd/transpile.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import type { Command } from 'commander';
|
|
2
|
+
|
|
1
3
|
export function types(witPath: any, opts: any): Promise<void>;
|
|
4
|
+
|
|
2
5
|
export function guestTypes(witPath: any, opts: any): Promise<void>;
|
|
6
|
+
|
|
3
7
|
/**
|
|
4
8
|
* @param {string} witPath
|
|
5
9
|
* @param {{
|
|
@@ -30,7 +34,45 @@ export function typesComponent(witPath: string, opts: {
|
|
|
30
34
|
}): Promise<{
|
|
31
35
|
[filename: string]: Uint8Array;
|
|
32
36
|
}>;
|
|
33
|
-
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
export function transpile(
|
|
40
|
+
componentPath: string,
|
|
41
|
+
opts: TranspilationOptions,
|
|
42
|
+
program: Command,
|
|
43
|
+
): Promise<TranspilationResult>;
|
|
44
|
+
|
|
45
|
+
type TranspilationOptions = {
|
|
46
|
+
name: string;
|
|
47
|
+
instantiation?: 'async' | 'sync';
|
|
48
|
+
importBindings?: 'js' | 'optimized' | 'hybrid' | 'direct-optimized';
|
|
49
|
+
map?: Record<string, string>;
|
|
50
|
+
asyncMode?: string;
|
|
51
|
+
asyncImports?: string[];
|
|
52
|
+
asyncExports?: string[];
|
|
53
|
+
asyncWasiImports?: string[];
|
|
54
|
+
asyncWasiExports?: string[];
|
|
55
|
+
validLiftingOptimization?: boolean;
|
|
56
|
+
tracing?: boolean;
|
|
57
|
+
nodejsCompat?: boolean;
|
|
58
|
+
tlaCompat?: boolean;
|
|
59
|
+
base64Cutoff?: boolean;
|
|
60
|
+
js?: boolean;
|
|
61
|
+
minify?: boolean;
|
|
62
|
+
optimize?: boolean;
|
|
63
|
+
namespacedExports?: boolean;
|
|
64
|
+
outDir?: string;
|
|
65
|
+
multiMemory?: boolean;
|
|
66
|
+
experimentalIdlImports?: boolean;
|
|
67
|
+
optArgs?: string[];
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
type TranspilationResult = {
|
|
71
|
+
files: FileBytes;
|
|
72
|
+
imports: string[];
|
|
73
|
+
exports: [string, 'function' | 'instance'][];
|
|
74
|
+
};
|
|
75
|
+
|
|
34
76
|
/**
|
|
35
77
|
*
|
|
36
78
|
* @param {Uint8Array} component
|
package/src/cmd/transpile.js
CHANGED
package/src/common.js
CHANGED
|
@@ -240,7 +240,7 @@ export async function resolveDefaultWITPath(witPath) {
|
|
|
240
240
|
}
|
|
241
241
|
|
|
242
242
|
/**
|
|
243
|
-
* Partial polyfill for 'node:
|
|
243
|
+
* Partial polyfill for 'node:util' `styleText()`
|
|
244
244
|
*
|
|
245
245
|
* @param {string | string[]} styles - styles to apply to the given text
|
|
246
246
|
* @param {string} text - text that should be styled
|
package/src/jco.js
CHANGED
package/types/common.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ export function writeFiles(files: Record<string, string>, summaryTitle: boolean)
|
|
|
55
55
|
*/
|
|
56
56
|
export function resolveDefaultWITPath(witPath?: string | undefined): Promise<string>;
|
|
57
57
|
/**
|
|
58
|
-
* Partial polyfill for 'node:
|
|
58
|
+
* Partial polyfill for 'node:util' `styleText()`
|
|
59
59
|
*
|
|
60
60
|
* @param {string | string[]} styles - styles to apply to the given text
|
|
61
61
|
* @param {string} text - text that should be styled
|