@bytecodealliance/jco 1.19.0 → 1.21.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/LICENSE +220 -0
- package/README.md +1 -1
- package/obj/js-component-bindgen-component.core.wasm +0 -0
- package/obj/js-component-bindgen-component.js +1491 -497
- package/obj/wasm-tools.core.wasm +0 -0
- package/obj/wasm-tools.js +1635 -545
- package/package.json +98 -96
- package/src/api.js +11 -16
- package/src/cmd/transpile.js +7 -0
- package/src/jco.js +1 -1
- package/types/api.d.ts +17 -23
- package/types/api.d.ts.map +1 -1
- package/{src → types}/cmd/componentize.d.ts +1 -1
- package/types/cmd/componentize.d.ts.map +1 -0
- package/{src → types}/cmd/opt.d.ts +7 -10
- package/types/cmd/opt.d.ts.map +1 -0
- package/{src → types}/cmd/run.d.ts +1 -1
- package/types/cmd/run.d.ts.map +1 -0
- package/types/cmd/transpile.d.ts +62 -0
- package/types/cmd/transpile.d.ts.map +1 -0
- package/types/cmd/types.d.ts +45 -0
- package/types/cmd/types.d.ts.map +1 -0
- package/{src → types}/cmd/wasm-tools.d.ts +1 -1
- package/types/cmd/wasm-tools.d.ts.map +1 -0
- package/src/cmd/componentize.d.ts.map +0 -1
- package/src/cmd/opt.d.ts.map +0 -1
- package/src/cmd/run.d.ts.map +0 -1
- package/src/cmd/transpile.d.ts +0 -138
- package/src/cmd/transpile.d.ts.map +0 -1
- package/src/cmd/types.d.ts +0 -38
- package/src/cmd/wasm-tools.d.ts.map +0 -1
package/src/cmd/transpile.d.ts
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import type { Command } from "commander";
|
|
2
|
-
|
|
3
|
-
export function types(witPath: any, opts: any): Promise<void>;
|
|
4
|
-
|
|
5
|
-
export function guestTypes(witPath: any, opts: any): Promise<void>;
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @param {string} witPath
|
|
9
|
-
* @param {{
|
|
10
|
-
* name?: string,
|
|
11
|
-
* worldName?: string,
|
|
12
|
-
* instantiation?: 'async' | 'sync',
|
|
13
|
-
* tlaCompat?: bool,
|
|
14
|
-
* asyncMode?: string,
|
|
15
|
-
* asyncImports?: string[],
|
|
16
|
-
* asyncExports?: string[],
|
|
17
|
-
* outDir?: string,
|
|
18
|
-
* features?: string[] | 'all',
|
|
19
|
-
* guest?: bool,
|
|
20
|
-
* strict?: bool,
|
|
21
|
-
* }} opts
|
|
22
|
-
* @returns {Promise<{ [filename: string]: Uint8Array }>}
|
|
23
|
-
*/
|
|
24
|
-
export function typesComponent(
|
|
25
|
-
witPath: string,
|
|
26
|
-
opts: {
|
|
27
|
-
name?: string;
|
|
28
|
-
worldName?: string;
|
|
29
|
-
instantiation?: "async" | "sync";
|
|
30
|
-
tlaCompat?: boolean;
|
|
31
|
-
asyncMode?: string;
|
|
32
|
-
asyncImports?: string[];
|
|
33
|
-
asyncExports?: string[];
|
|
34
|
-
outDir?: string;
|
|
35
|
-
features?: string[] | "all";
|
|
36
|
-
guest?: boolean;
|
|
37
|
-
strict?: boolean;
|
|
38
|
-
},
|
|
39
|
-
): Promise<{
|
|
40
|
-
[filename: string]: Uint8Array;
|
|
41
|
-
}>;
|
|
42
|
-
|
|
43
|
-
export function transpile(
|
|
44
|
-
componentPath: string,
|
|
45
|
-
opts: TranspilationOptions,
|
|
46
|
-
program: Command,
|
|
47
|
-
): Promise<TranspilationResult>;
|
|
48
|
-
|
|
49
|
-
type TranspilationOptions = {
|
|
50
|
-
name: string;
|
|
51
|
-
instantiation?: "async" | "sync";
|
|
52
|
-
importBindings?: "js" | "optimized" | "hybrid" | "direct-optimized";
|
|
53
|
-
map?: Record<string, string>;
|
|
54
|
-
asyncMode?: string;
|
|
55
|
-
asyncImports?: string[];
|
|
56
|
-
asyncExports?: string[];
|
|
57
|
-
asyncWasiImports?: string[];
|
|
58
|
-
asyncWasiExports?: string[];
|
|
59
|
-
validLiftingOptimization?: boolean;
|
|
60
|
-
tracing?: boolean;
|
|
61
|
-
nodejsCompat?: boolean;
|
|
62
|
-
tlaCompat?: boolean;
|
|
63
|
-
base64Cutoff?: boolean;
|
|
64
|
-
js?: boolean;
|
|
65
|
-
minify?: boolean;
|
|
66
|
-
optimize?: boolean;
|
|
67
|
-
namespacedExports?: boolean;
|
|
68
|
-
outDir?: string;
|
|
69
|
-
multiMemory?: boolean;
|
|
70
|
-
experimentalIdlImports?: boolean;
|
|
71
|
-
optArgs?: string[];
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
type TranspilationResult = {
|
|
75
|
-
files: FileBytes;
|
|
76
|
-
imports: string[];
|
|
77
|
-
exports: [string, "function" | "instance"][];
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
*
|
|
82
|
-
* @param {Uint8Array} component
|
|
83
|
-
* @param {{
|
|
84
|
-
* name: string,
|
|
85
|
-
* instantiation?: 'async' | 'sync',
|
|
86
|
-
* importBindings?: 'js' | 'optimized' | 'hybrid' | 'direct-optimized',
|
|
87
|
-
* map?: Record<string, string>,
|
|
88
|
-
* asyncMode?: string,
|
|
89
|
-
* asyncImports?: string[],
|
|
90
|
-
* asyncExports?: string[],
|
|
91
|
-
* validLiftingOptimization?: bool,
|
|
92
|
-
* tracing?: bool,
|
|
93
|
-
* nodejsCompat?: bool,
|
|
94
|
-
* tlaCompat?: bool,
|
|
95
|
-
* base64Cutoff?: bool,
|
|
96
|
-
* js?: bool,
|
|
97
|
-
* minify?: bool,
|
|
98
|
-
* optimize?: bool,
|
|
99
|
-
* namespacedExports?: bool,
|
|
100
|
-
* outDir?: string,
|
|
101
|
-
* multiMemory?: bool,
|
|
102
|
-
* experimentalIdlImports?: bool,
|
|
103
|
-
* optArgs?: string[],
|
|
104
|
-
* }} opts
|
|
105
|
-
* @returns {Promise<{ files: { [filename: string]: Uint8Array }, imports: string[], exports: [string, 'function' | 'instance'][] }>}
|
|
106
|
-
*/
|
|
107
|
-
export function transpileComponent(
|
|
108
|
-
component: Uint8Array,
|
|
109
|
-
opts?: {
|
|
110
|
-
name: string;
|
|
111
|
-
instantiation?: "async" | "sync";
|
|
112
|
-
importBindings?: "js" | "optimized" | "hybrid" | "direct-optimized";
|
|
113
|
-
map?: Record<string, string>;
|
|
114
|
-
asyncMode?: string;
|
|
115
|
-
asyncImports?: string[];
|
|
116
|
-
asyncExports?: string[];
|
|
117
|
-
validLiftingOptimization?: boolean;
|
|
118
|
-
tracing?: boolean;
|
|
119
|
-
nodejsCompat?: boolean;
|
|
120
|
-
tlaCompat?: boolean;
|
|
121
|
-
base64Cutoff?: boolean;
|
|
122
|
-
js?: boolean;
|
|
123
|
-
minify?: boolean;
|
|
124
|
-
optimize?: boolean;
|
|
125
|
-
namespacedExports?: boolean;
|
|
126
|
-
outDir?: string;
|
|
127
|
-
multiMemory?: boolean;
|
|
128
|
-
experimentalIdlImports?: boolean;
|
|
129
|
-
optArgs?: string[];
|
|
130
|
-
},
|
|
131
|
-
): Promise<{
|
|
132
|
-
files: {
|
|
133
|
-
[filename: string]: Uint8Array;
|
|
134
|
-
};
|
|
135
|
-
imports: string[];
|
|
136
|
-
exports: [string, "function" | "instance"][];
|
|
137
|
-
}>;
|
|
138
|
-
//# sourceMappingURL=transpile.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transpile.d.ts","sourceRoot":"","sources":["transpile.js"],"names":[],"mappings":"AA+CA,8DAGC;AAED,mEAMC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wCAfW,MAAM,QACN;IACN,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACjC,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,MAAM,CAAC,EAAE,MA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AAC;IAAC,OAAO,EAAE,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CAAC,EAAE,CAAA;CAAE,CAAC,CAyTnI"}
|
package/src/cmd/types.d.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
export function types(witPath: any, opts: any): Promise<void>;
|
|
2
|
-
export function guestTypes(witPath: any, opts: any): Promise<void>;
|
|
3
|
-
/**
|
|
4
|
-
* @param {string} witPath
|
|
5
|
-
* @param {{
|
|
6
|
-
* name?: string,
|
|
7
|
-
* worldName?: string,
|
|
8
|
-
* instantiation?: 'async' | 'sync',
|
|
9
|
-
* tlaCompat?: bool,
|
|
10
|
-
* asyncMode?: string,
|
|
11
|
-
* asyncImports?: string[],
|
|
12
|
-
* asyncExports?: string[],
|
|
13
|
-
* outDir?: string,
|
|
14
|
-
* features?: string[] | 'all',
|
|
15
|
-
* guest?: bool,
|
|
16
|
-
* strict?: bool,
|
|
17
|
-
* }} opts
|
|
18
|
-
* @returns {Promise<{ [filename: string]: Uint8Array }>}
|
|
19
|
-
*/
|
|
20
|
-
export function typesComponent(
|
|
21
|
-
witPath: string,
|
|
22
|
-
opts: {
|
|
23
|
-
name?: string;
|
|
24
|
-
worldName?: string;
|
|
25
|
-
instantiation?: "async" | "sync";
|
|
26
|
-
tlaCompat?: boolean;
|
|
27
|
-
asyncMode?: string;
|
|
28
|
-
asyncImports?: string[];
|
|
29
|
-
asyncExports?: string[];
|
|
30
|
-
outDir?: string;
|
|
31
|
-
features?: string[] | "all";
|
|
32
|
-
guest?: boolean;
|
|
33
|
-
strict?: boolean;
|
|
34
|
-
},
|
|
35
|
-
): Promise<{
|
|
36
|
-
[filename: string]: Uint8Array;
|
|
37
|
-
}>;
|
|
38
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"wasm-tools.d.ts","sourceRoot":"","sources":["wasm-tools.js"],"names":[],"mappings":"AAOA,2DAKC;AAED,2DASC;AAED,kEASC;AAED,kEAsBC;AAED,oEAaC;AAED,iEAUC;AAED,kEAiCC"}
|