From 668916f2e88552de871b6015d0b38fc27e951592 Mon Sep 17 00:00:00 2001 From: Elmer Bulthuis Date: Fri, 18 Jul 2025 09:26:56 +0200 Subject: [PATCH 1/6] add (and use) compilation scripts --- crates/xtask/src/build/workspace.rs | 2 +- package.json | 3 ++- packages/jco/package.json | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/crates/xtask/src/build/workspace.rs b/crates/xtask/src/build/workspace.rs index c3c8fd878..664b5b6e5 100644 --- a/crates/xtask/src/build/workspace.rs +++ b/crates/xtask/src/build/workspace.rs @@ -15,6 +15,6 @@ pub(crate) fn run(release: bool) -> anyhow::Result<()> { } // Build Jco TS code - cmd!(sh, "npx -w @bytecodealliance/jco tsc -p tsconfig.json").read()?; + cmd!(sh, "npm run tsc").read()?; Ok(()) } diff --git a/package.json b/package.json index f6b573229..77356e131 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "build:types:preview3-shim": "cargo xtask generate wasi-types preview3", "fmt": "npm run fmt --ws --if-present", "lint": "npm run lint --ws --if-present", - "lint:fix": "npm run lint:fix --ws --if-present" + "lint:fix": "npm run lint:fix --ws --if-present", + "tsc": "npm run --workspaces --if-present tsc" } } diff --git a/packages/jco/package.json b/packages/jco/package.json index ca8d19bcb..238f07a3f 100644 --- a/packages/jco/package.json +++ b/packages/jco/package.json @@ -63,7 +63,8 @@ "lint:fix": "npm run lint -- --fix", "test": "vitest run -c test/vitest.ts", "test:lts": "vitest run -c test/vitest.lts.ts", - "prepack": "cargo xtask build release" + "prepack": "cargo xtask build release", + "tsc": "tsc --build" }, "dependencies": { "@bytecodealliance/componentize-js": "^0.18.3", From db9d30d9e6ed286869c92ec638b296733adf37ae Mon Sep 17 00:00:00 2001 From: Elmer Bulthuis Date: Fri, 18 Jul 2025 09:38:49 +0200 Subject: [PATCH 2/6] ignores tsbuildinfo --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 3e86e2ea5..51c2ca4b5 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ # Typescript /src/**/*.d.ts /src/**/*.d.ts.map +*.tsbuildinfo # Docs /docs/book From 8c80d1bbf04e51c58baf3816678741e46dcc3ce6 Mon Sep 17 00:00:00 2001 From: Elmer Bulthuis Date: Fri, 18 Jul 2025 09:41:05 +0200 Subject: [PATCH 3/6] updates lock and artifacts --- package-lock.json | 301 +------------------------------ packages/jco/src/api.d.ts | 14 +- packages/jco/src/api.d.ts.map | 2 +- packages/jco/src/common.d.ts | 2 + packages/jco/src/common.d.ts.map | 2 +- 5 files changed, 12 insertions(+), 309 deletions(-) diff --git a/package-lock.json b/package-lock.json index e925792db..315e56011 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,39 +29,6 @@ "@bytecodealliance/jco": "^1.11.1" } }, - "examples/components/add/node_modules/@bytecodealliance/jco": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/@bytecodealliance/jco/-/jco-1.11.3.tgz", - "integrity": "sha512-Ynv0GDj9iAp+cS03UGg+ss4uo/Hx5e4FyjcFDBfkRt9qJsqbL2AnPqgO/ORNlSXg9zu9PTNC0uGgE7/Vklcn/w==", - "license": "(Apache-2.0 WITH LLVM-exception)", - "dependencies": { - "@bytecodealliance/componentize-js": "^0.17.0", - "@bytecodealliance/preview2-shim": "^0.17.2", - "binaryen": "^123.0.0", - "chalk-template": "^1", - "commander": "^12", - "mkdirp": "^3", - "ora": "^8", - "terser": "^5" - }, - "bin": { - "jco": "src/jco.js" - } - }, - "examples/components/add/node_modules/@bytecodealliance/jco/node_modules/@bytecodealliance/componentize-js": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@bytecodealliance/componentize-js/-/componentize-js-0.17.0.tgz", - "integrity": "sha512-FDgO5UPipfjyq5OghSB4JW313LkQJK3Sl647WH1jvIuYAyCq1j+bMt+Q66c3UF6IVs6PneNTGfGSjYgzID/k0w==", - "workspaces": [ - "." - ], - "dependencies": { - "@bytecodealliance/jco": "^1.9.1", - "@bytecodealliance/weval": "^0.3.3", - "@bytecodealliance/wizer": "^7.0.5", - "es-module-lexer": "^1.6.0" - } - }, "examples/components/adder": { "name": "adder-wasm", "dependencies": { @@ -69,78 +36,12 @@ "@bytecodealliance/jco": "^1.11.1" } }, - "examples/components/adder/node_modules/@bytecodealliance/jco": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/@bytecodealliance/jco/-/jco-1.11.3.tgz", - "integrity": "sha512-Ynv0GDj9iAp+cS03UGg+ss4uo/Hx5e4FyjcFDBfkRt9qJsqbL2AnPqgO/ORNlSXg9zu9PTNC0uGgE7/Vklcn/w==", - "license": "(Apache-2.0 WITH LLVM-exception)", - "dependencies": { - "@bytecodealliance/componentize-js": "^0.17.0", - "@bytecodealliance/preview2-shim": "^0.17.2", - "binaryen": "^123.0.0", - "chalk-template": "^1", - "commander": "^12", - "mkdirp": "^3", - "ora": "^8", - "terser": "^5" - }, - "bin": { - "jco": "src/jco.js" - } - }, - "examples/components/adder/node_modules/@bytecodealliance/jco/node_modules/@bytecodealliance/componentize-js": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@bytecodealliance/componentize-js/-/componentize-js-0.17.0.tgz", - "integrity": "sha512-FDgO5UPipfjyq5OghSB4JW313LkQJK3Sl647WH1jvIuYAyCq1j+bMt+Q66c3UF6IVs6PneNTGfGSjYgzID/k0w==", - "workspaces": [ - "." - ], - "dependencies": { - "@bytecodealliance/jco": "^1.9.1", - "@bytecodealliance/weval": "^0.3.3", - "@bytecodealliance/wizer": "^7.0.5", - "es-module-lexer": "^1.6.0" - } - }, "examples/components/host-logging": { "dependencies": { "@bytecodealliance/componentize-js": "^0.18.3", "@bytecodealliance/jco": "^1.11.1" } }, - "examples/components/host-logging/node_modules/@bytecodealliance/jco": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/@bytecodealliance/jco/-/jco-1.11.3.tgz", - "integrity": "sha512-Ynv0GDj9iAp+cS03UGg+ss4uo/Hx5e4FyjcFDBfkRt9qJsqbL2AnPqgO/ORNlSXg9zu9PTNC0uGgE7/Vklcn/w==", - "license": "(Apache-2.0 WITH LLVM-exception)", - "dependencies": { - "@bytecodealliance/componentize-js": "^0.17.0", - "@bytecodealliance/preview2-shim": "^0.17.2", - "binaryen": "^123.0.0", - "chalk-template": "^1", - "commander": "^12", - "mkdirp": "^3", - "ora": "^8", - "terser": "^5" - }, - "bin": { - "jco": "src/jco.js" - } - }, - "examples/components/host-logging/node_modules/@bytecodealliance/jco/node_modules/@bytecodealliance/componentize-js": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@bytecodealliance/componentize-js/-/componentize-js-0.17.0.tgz", - "integrity": "sha512-FDgO5UPipfjyq5OghSB4JW313LkQJK3Sl647WH1jvIuYAyCq1j+bMt+Q66c3UF6IVs6PneNTGfGSjYgzID/k0w==", - "workspaces": [ - "." - ], - "dependencies": { - "@bytecodealliance/jco": "^1.9.1", - "@bytecodealliance/weval": "^0.3.3", - "@bytecodealliance/wizer": "^7.0.5", - "es-module-lexer": "^1.6.0" - } - }, "examples/components/http-hello-world": { "name": "http-hello-world-wasm", "dependencies": { @@ -151,78 +52,12 @@ "terminate": "^2.8.0" } }, - "examples/components/http-hello-world/node_modules/@bytecodealliance/jco": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/@bytecodealliance/jco/-/jco-1.11.3.tgz", - "integrity": "sha512-Ynv0GDj9iAp+cS03UGg+ss4uo/Hx5e4FyjcFDBfkRt9qJsqbL2AnPqgO/ORNlSXg9zu9PTNC0uGgE7/Vklcn/w==", - "license": "(Apache-2.0 WITH LLVM-exception)", - "dependencies": { - "@bytecodealliance/componentize-js": "^0.17.0", - "@bytecodealliance/preview2-shim": "^0.17.2", - "binaryen": "^123.0.0", - "chalk-template": "^1", - "commander": "^12", - "mkdirp": "^3", - "ora": "^8", - "terser": "^5" - }, - "bin": { - "jco": "src/jco.js" - } - }, - "examples/components/http-hello-world/node_modules/@bytecodealliance/jco/node_modules/@bytecodealliance/componentize-js": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@bytecodealliance/componentize-js/-/componentize-js-0.17.0.tgz", - "integrity": "sha512-FDgO5UPipfjyq5OghSB4JW313LkQJK3Sl647WH1jvIuYAyCq1j+bMt+Q66c3UF6IVs6PneNTGfGSjYgzID/k0w==", - "workspaces": [ - "." - ], - "dependencies": { - "@bytecodealliance/jco": "^1.9.1", - "@bytecodealliance/weval": "^0.3.3", - "@bytecodealliance/wizer": "^7.0.5", - "es-module-lexer": "^1.6.0" - } - }, "examples/components/http-server-fetch-handler": { "dependencies": { "@bytecodealliance/componentize-js": "^0.18.3", "@bytecodealliance/jco": "^1.11.1" } }, - "examples/components/http-server-fetch-handler/node_modules/@bytecodealliance/jco": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/@bytecodealliance/jco/-/jco-1.11.3.tgz", - "integrity": "sha512-Ynv0GDj9iAp+cS03UGg+ss4uo/Hx5e4FyjcFDBfkRt9qJsqbL2AnPqgO/ORNlSXg9zu9PTNC0uGgE7/Vklcn/w==", - "license": "(Apache-2.0 WITH LLVM-exception)", - "dependencies": { - "@bytecodealliance/componentize-js": "^0.17.0", - "@bytecodealliance/preview2-shim": "^0.17.2", - "binaryen": "^123.0.0", - "chalk-template": "^1", - "commander": "^12", - "mkdirp": "^3", - "ora": "^8", - "terser": "^5" - }, - "bin": { - "jco": "src/jco.js" - } - }, - "examples/components/http-server-fetch-handler/node_modules/@bytecodealliance/jco/node_modules/@bytecodealliance/componentize-js": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@bytecodealliance/componentize-js/-/componentize-js-0.17.0.tgz", - "integrity": "sha512-FDgO5UPipfjyq5OghSB4JW313LkQJK3Sl647WH1jvIuYAyCq1j+bMt+Q66c3UF6IVs6PneNTGfGSjYgzID/k0w==", - "workspaces": [ - "." - ], - "dependencies": { - "@bytecodealliance/jco": "^1.9.1", - "@bytecodealliance/weval": "^0.3.3", - "@bytecodealliance/wizer": "^7.0.5", - "es-module-lexer": "^1.6.0" - } - }, "examples/components/http-server-hono": { "license": "MIT", "dependencies": { @@ -238,80 +73,12 @@ "typescript": "^5.8.3" } }, - "examples/components/http-server-hono/node_modules/@bytecodealliance/jco": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/@bytecodealliance/jco/-/jco-1.11.3.tgz", - "integrity": "sha512-Ynv0GDj9iAp+cS03UGg+ss4uo/Hx5e4FyjcFDBfkRt9qJsqbL2AnPqgO/ORNlSXg9zu9PTNC0uGgE7/Vklcn/w==", - "dev": true, - "license": "(Apache-2.0 WITH LLVM-exception)", - "dependencies": { - "@bytecodealliance/componentize-js": "^0.17.0", - "@bytecodealliance/preview2-shim": "^0.17.2", - "binaryen": "^123.0.0", - "chalk-template": "^1", - "commander": "^12", - "mkdirp": "^3", - "ora": "^8", - "terser": "^5" - }, - "bin": { - "jco": "src/jco.js" - } - }, - "examples/components/http-server-hono/node_modules/@bytecodealliance/jco/node_modules/@bytecodealliance/componentize-js": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@bytecodealliance/componentize-js/-/componentize-js-0.17.0.tgz", - "integrity": "sha512-FDgO5UPipfjyq5OghSB4JW313LkQJK3Sl647WH1jvIuYAyCq1j+bMt+Q66c3UF6IVs6PneNTGfGSjYgzID/k0w==", - "dev": true, - "workspaces": [ - "." - ], - "dependencies": { - "@bytecodealliance/jco": "^1.9.1", - "@bytecodealliance/weval": "^0.3.3", - "@bytecodealliance/wizer": "^7.0.5", - "es-module-lexer": "^1.6.0" - } - }, "examples/components/node-fetch": { "dependencies": { "@bytecodealliance/componentize-js": "^0.18.3", "@bytecodealliance/jco": "^1.11.1" } }, - "examples/components/node-fetch/node_modules/@bytecodealliance/jco": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/@bytecodealliance/jco/-/jco-1.11.3.tgz", - "integrity": "sha512-Ynv0GDj9iAp+cS03UGg+ss4uo/Hx5e4FyjcFDBfkRt9qJsqbL2AnPqgO/ORNlSXg9zu9PTNC0uGgE7/Vklcn/w==", - "license": "(Apache-2.0 WITH LLVM-exception)", - "dependencies": { - "@bytecodealliance/componentize-js": "^0.17.0", - "@bytecodealliance/preview2-shim": "^0.17.2", - "binaryen": "^123.0.0", - "chalk-template": "^1", - "commander": "^12", - "mkdirp": "^3", - "ora": "^8", - "terser": "^5" - }, - "bin": { - "jco": "src/jco.js" - } - }, - "examples/components/node-fetch/node_modules/@bytecodealliance/jco/node_modules/@bytecodealliance/componentize-js": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@bytecodealliance/componentize-js/-/componentize-js-0.17.0.tgz", - "integrity": "sha512-FDgO5UPipfjyq5OghSB4JW313LkQJK3Sl647WH1jvIuYAyCq1j+bMt+Q66c3UF6IVs6PneNTGfGSjYgzID/k0w==", - "workspaces": [ - "." - ], - "dependencies": { - "@bytecodealliance/jco": "^1.9.1", - "@bytecodealliance/weval": "^0.3.3", - "@bytecodealliance/wizer": "^7.0.5", - "es-module-lexer": "^1.6.0" - } - }, "examples/components/string-reverse": { "name": "string-reverse-wasm", "dependencies": { @@ -326,72 +93,6 @@ "@bytecodealliance/jco": "^1.11.1" } }, - "examples/components/string-reverse-upper/node_modules/@bytecodealliance/jco": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/@bytecodealliance/jco/-/jco-1.11.3.tgz", - "integrity": "sha512-Ynv0GDj9iAp+cS03UGg+ss4uo/Hx5e4FyjcFDBfkRt9qJsqbL2AnPqgO/ORNlSXg9zu9PTNC0uGgE7/Vklcn/w==", - "license": "(Apache-2.0 WITH LLVM-exception)", - "dependencies": { - "@bytecodealliance/componentize-js": "^0.17.0", - "@bytecodealliance/preview2-shim": "^0.17.2", - "binaryen": "^123.0.0", - "chalk-template": "^1", - "commander": "^12", - "mkdirp": "^3", - "ora": "^8", - "terser": "^5" - }, - "bin": { - "jco": "src/jco.js" - } - }, - "examples/components/string-reverse-upper/node_modules/@bytecodealliance/jco/node_modules/@bytecodealliance/componentize-js": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@bytecodealliance/componentize-js/-/componentize-js-0.17.0.tgz", - "integrity": "sha512-FDgO5UPipfjyq5OghSB4JW313LkQJK3Sl647WH1jvIuYAyCq1j+bMt+Q66c3UF6IVs6PneNTGfGSjYgzID/k0w==", - "workspaces": [ - "." - ], - "dependencies": { - "@bytecodealliance/jco": "^1.9.1", - "@bytecodealliance/weval": "^0.3.3", - "@bytecodealliance/wizer": "^7.0.5", - "es-module-lexer": "^1.6.0" - } - }, - "examples/components/string-reverse/node_modules/@bytecodealliance/jco": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/@bytecodealliance/jco/-/jco-1.11.3.tgz", - "integrity": "sha512-Ynv0GDj9iAp+cS03UGg+ss4uo/Hx5e4FyjcFDBfkRt9qJsqbL2AnPqgO/ORNlSXg9zu9PTNC0uGgE7/Vklcn/w==", - "license": "(Apache-2.0 WITH LLVM-exception)", - "dependencies": { - "@bytecodealliance/componentize-js": "^0.17.0", - "@bytecodealliance/preview2-shim": "^0.17.2", - "binaryen": "^123.0.0", - "chalk-template": "^1", - "commander": "^12", - "mkdirp": "^3", - "ora": "^8", - "terser": "^5" - }, - "bin": { - "jco": "src/jco.js" - } - }, - "examples/components/string-reverse/node_modules/@bytecodealliance/jco/node_modules/@bytecodealliance/componentize-js": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/@bytecodealliance/componentize-js/-/componentize-js-0.17.0.tgz", - "integrity": "sha512-FDgO5UPipfjyq5OghSB4JW313LkQJK3Sl647WH1jvIuYAyCq1j+bMt+Q66c3UF6IVs6PneNTGfGSjYgzID/k0w==", - "workspaces": [ - "." - ], - "dependencies": { - "@bytecodealliance/jco": "^1.9.1", - "@bytecodealliance/weval": "^0.3.3", - "@bytecodealliance/wizer": "^7.0.5", - "es-module-lexer": "^1.6.0" - } - }, "examples/components/webidl-book-library": { "name": "webidl-book-library-wasm", "devDependencies": { @@ -5761,7 +5462,7 @@ }, "packages/jco": { "name": "@bytecodealliance/jco", - "version": "1.12.0-rc.1", + "version": "1.12.0", "license": "(Apache-2.0 WITH LLVM-exception)", "dependencies": { "@bytecodealliance/componentize-js": "^0.18.3", diff --git a/packages/jco/src/api.d.ts b/packages/jco/src/api.d.ts index 6bef5ad12..6c9fce0a8 100644 --- a/packages/jco/src/api.d.ts +++ b/packages/jco/src/api.d.ts @@ -2,39 +2,39 @@ * @param {Parameters[0]} binary * @return {Promise>} */ -export function print(binary: Parameters[0]): Promise>; +export function print(binary: Parameters[0]): Promise>; /** * @param {Parameters[0]} wat * @return {Promise>} */ -export function parse(wat: Parameters[0]): Promise>; +export function parse(wat: Parameters[0]): Promise>; /** * @param {Parameters[0]} binary * @return {Promise>} */ -export function componentWit(binary: Parameters[0]): Promise>; +export function componentWit(binary: Parameters[0]): Promise>; /** * @param {Parameters[0]} binary * @param {Parameters[1]} adapters * @return {Promise>} */ -export function componentNew(binary: Parameters[0], adapters: Parameters[1]): Promise>; +export function componentNew(binary: Parameters[0], adapters: Parameters[1]): Promise>; /** * @param {Parameters[0]} embedOpts * @return {Promise>} */ -export function componentEmbed(embedOpts: Parameters[0]): Promise>; +export function componentEmbed(embedOpts: Parameters[0]): Promise>; /** * @param {Parameters[0]} binary * @param {Parameters[1]} metadata * @return {Promise>} */ -export function metadataAdd(binary: Parameters[0], metadata: Parameters[1]): Promise>; +export function metadataAdd(binary: Parameters[0], metadata: Parameters[1]): Promise>; /** * @param {Parameters[0]} binary * @return {Promise>} */ -export function metadataShow(binary: Parameters[0]): Promise>; +export function metadataShow(binary: Parameters[0]): Promise>; export function preview1AdapterCommandPath(): URL; export function preview1AdapterReactorPath(): URL; export { optimizeComponent as opt } from "./cmd/opt.js"; diff --git a/packages/jco/src/api.d.ts.map b/packages/jco/src/api.d.ts.map index da3dcb6e1..80287a46a 100644 --- a/packages/jco/src/api.d.ts.map +++ b/packages/jco/src/api.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["api.js"],"names":[],"mappings":"AAgBA;;;GAGG;AACH,8BAHW,UAAU,CAAC,OAAO,sBAAsB,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,GAClD,OAAO,CAAC,UAAU,CAAC,OAAO,sBAAsB,EAAE,KAAK,CAAC,CAAC,CAKpE;AACD;;;GAGG;AACH,2BAHW,UAAU,CAAC,OAAO,sBAAsB,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,GAClD,OAAO,CAAC,UAAU,CAAC,OAAO,sBAAsB,EAAE,KAAK,CAAC,CAAC,CAKpE;AACD;;;GAGG;AACH,qCAHW,UAAU,CAAC,OAAO,sBAAsB,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,GACzD,OAAO,CAAC,UAAU,CAAC,OAAO,sBAAsB,EAAE,YAAY,CAAC,CAAC,CAK3E;AACD;;;;GAIG;AACH,qCAJW,UAAU,CAAC,OAAO,sBAAsB,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,YAC1D,UAAU,CAAC,OAAO,sBAAsB,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,GACzD,OAAO,CAAC,UAAU,CAAC,OAAO,sBAAsB,EAAE,YAAY,CAAC,CAAC,CAK3E;AACD;;;GAGG;AACH,0CAHW,UAAU,CAAC,OAAO,sBAAsB,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,GAC3D,OAAO,CAAC,UAAU,CAAC,OAAO,sBAAsB,EAAE,cAAc,CAAC,CAAC,CAK7E;AACD;;;;GAIG;AACH,oCAJW,UAAU,CAAC,OAAO,sBAAsB,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,YACzD,UAAU,CAAC,OAAO,sBAAsB,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,GACxD,OAAO,CAAC,UAAU,CAAC,OAAO,sBAAsB,EAAE,WAAW,CAAC,CAAC,CAK1E;AACD;;;GAGG;AACH,qCAHW,UAAU,CAAC,OAAO,sBAAsB,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,GACzD,OAAO,CAAC,UAAU,CAAC,OAAO,sBAAsB,EAAE,YAAY,CAAC,CAAC,CAK3E;AACD,kDAKC;AACD,kDAKC"} \ No newline at end of file +{"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"} \ No newline at end of file diff --git a/packages/jco/src/common.d.ts b/packages/jco/src/common.d.ts index 8c0f1be49..ce40069d1 100644 --- a/packages/jco/src/common.d.ts +++ b/packages/jco/src/common.d.ts @@ -12,6 +12,8 @@ export function getTmpDir(): Promise; export function spawnIOTmp(cmd: any, input: any, args: any): Promise>; export function writeFiles(files: any, summaryTitle: any): Promise; export const isWindows: boolean; +export const ASYNC_WASI_IMPORTS: string[]; +export const ASYNC_WASI_EXPORTS: string[]; export { readFileCli as readFile }; declare function readFileCli(file: any, encoding: any): Promise>; //# sourceMappingURL=common.d.ts.map \ No newline at end of file diff --git a/packages/jco/src/common.d.ts.map b/packages/jco/src/common.d.ts.map index aff35feef..054680cf6 100644 --- a/packages/jco/src/common.d.ts.map +++ b/packages/jco/src/common.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["common.js"],"names":[],"mappings":"AA2BA,+CAEC;AACD,0CAIC;AAED,0CASC;AAED,mEAcC;AAED,wDAoBC;AAED;;;;GAIG;AACH,6CAEC;AAWD,8FAiCC;AAED,yEAmBC;AArJD,gCAA8C;;AAsF9C,yFAMC"} \ No newline at end of file +{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["common.js"],"names":[],"mappings":"AA4BA,+CAEC;AACD,0CAIC;AAED,0CASC;AAED,mEAcC;AAED,wDAoBC;AAED;;;;GAIG;AACH,6CAEC;AAWD,8FAiCC;AAED,yEAmBC;AArJD,gCAA8C;AAE9C,0CASE;AAEF,0CAGE;;AAsEF,yFAMC"} \ No newline at end of file From 730d87ee6b413ceb1618bb4c8f210d55585c7259 Mon Sep 17 00:00:00 2001 From: Elmer Bulthuis Date: Sat, 19 Jul 2025 15:58:09 +0200 Subject: [PATCH 4/6] chore(build): rename task to build:ts --- crates/xtask/src/build/workspace.rs | 4 ++-- package.json | 4 ++-- packages/jco/package.json | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/xtask/src/build/workspace.rs b/crates/xtask/src/build/workspace.rs index 664b5b6e5..b98d3cbfb 100644 --- a/crates/xtask/src/build/workspace.rs +++ b/crates/xtask/src/build/workspace.rs @@ -14,7 +14,7 @@ pub(crate) fn run(release: bool) -> anyhow::Result<()> { cmd!(sh, "cargo build --workspace --target wasm32-wasip1").read()?; } - // Build Jco TS code - cmd!(sh, "npm run tsc").read()?; + // Compiles code in all packages where applicable + cmd!(sh, "npm run build:ts").read()?; Ok(()) } diff --git a/package.json b/package.json index 77356e131..9c3e18a53 100644 --- a/package.json +++ b/package.json @@ -21,9 +21,9 @@ "build:release": "cargo xtask build release", "build:types:preview2-shim": "cargo xtask generate wasi-types preview2", "build:types:preview3-shim": "cargo xtask generate wasi-types preview3", + "build:ts": "npm run --workspaces --if-present build:ts", "fmt": "npm run fmt --ws --if-present", "lint": "npm run lint --ws --if-present", - "lint:fix": "npm run lint:fix --ws --if-present", - "tsc": "npm run --workspaces --if-present tsc" + "lint:fix": "npm run lint:fix --ws --if-present" } } diff --git a/packages/jco/package.json b/packages/jco/package.json index 238f07a3f..9ed432c17 100644 --- a/packages/jco/package.json +++ b/packages/jco/package.json @@ -58,13 +58,13 @@ "build": "cargo xtask build debug", "build:release": "cargo xtask build release", "build:types:preview2-shim": "npm run build:types:preview2-shim --include-workspace-root", + "build:ts": "tsc --build", "fmt": "prettier . --write", "lint": "eslint -c ../../eslint.config.mjs --ext .js src test", "lint:fix": "npm run lint -- --fix", "test": "vitest run -c test/vitest.ts", "test:lts": "vitest run -c test/vitest.lts.ts", - "prepack": "cargo xtask build release", - "tsc": "tsc --build" + "prepack": "cargo xtask build release" }, "dependencies": { "@bytecodealliance/componentize-js": "^0.18.3", From 4770fcac67c139022fdbf58b56e1031b5b6cf784 Mon Sep 17 00:00:00 2001 From: Elmer Bulthuis Date: Tue, 22 Jul 2025 11:52:28 +0200 Subject: [PATCH 5/6] remove dist --- packages/jco/dist/api.d.ts | 42 --------------- packages/jco/dist/api.d.ts.map | 1 - packages/jco/dist/browser.d.ts | 4 -- packages/jco/dist/browser.d.ts.map | 1 - packages/jco/dist/cmd/componentize.d.ts | 2 - packages/jco/dist/cmd/componentize.d.ts.map | 1 - packages/jco/dist/cmd/opt.d.ts | 20 ------- packages/jco/dist/cmd/opt.d.ts.map | 1 - packages/jco/dist/cmd/run.d.ts | 3 -- packages/jco/dist/cmd/run.d.ts.map | 1 - packages/jco/dist/cmd/transpile.d.ts | 60 --------------------- packages/jco/dist/cmd/transpile.d.ts.map | 1 - packages/jco/dist/cmd/types.d.ts | 41 -------------- packages/jco/dist/cmd/types.d.ts.map | 1 - packages/jco/dist/cmd/wasm-tools.d.ts | 8 --- packages/jco/dist/cmd/wasm-tools.d.ts.map | 1 - packages/jco/dist/common.d.ts | 19 ------- packages/jco/dist/common.d.ts.map | 1 - packages/jco/dist/jco.d.ts | 3 -- packages/jco/dist/jco.d.ts.map | 1 - packages/jco/dist/ora-shim.d.ts | 8 --- packages/jco/dist/ora-shim.d.ts.map | 1 - 22 files changed, 221 deletions(-) delete mode 100644 packages/jco/dist/api.d.ts delete mode 100644 packages/jco/dist/api.d.ts.map delete mode 100644 packages/jco/dist/browser.d.ts delete mode 100644 packages/jco/dist/browser.d.ts.map delete mode 100644 packages/jco/dist/cmd/componentize.d.ts delete mode 100644 packages/jco/dist/cmd/componentize.d.ts.map delete mode 100644 packages/jco/dist/cmd/opt.d.ts delete mode 100644 packages/jco/dist/cmd/opt.d.ts.map delete mode 100644 packages/jco/dist/cmd/run.d.ts delete mode 100644 packages/jco/dist/cmd/run.d.ts.map delete mode 100644 packages/jco/dist/cmd/transpile.d.ts delete mode 100644 packages/jco/dist/cmd/transpile.d.ts.map delete mode 100644 packages/jco/dist/cmd/types.d.ts delete mode 100644 packages/jco/dist/cmd/types.d.ts.map delete mode 100644 packages/jco/dist/cmd/wasm-tools.d.ts delete mode 100644 packages/jco/dist/cmd/wasm-tools.d.ts.map delete mode 100644 packages/jco/dist/common.d.ts delete mode 100644 packages/jco/dist/common.d.ts.map delete mode 100644 packages/jco/dist/jco.d.ts delete mode 100644 packages/jco/dist/jco.d.ts.map delete mode 100644 packages/jco/dist/ora-shim.d.ts delete mode 100644 packages/jco/dist/ora-shim.d.ts.map diff --git a/packages/jco/dist/api.d.ts b/packages/jco/dist/api.d.ts deleted file mode 100644 index 6c9fce0a8..000000000 --- a/packages/jco/dist/api.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * @param {Parameters[0]} binary - * @return {Promise>} - */ -export function print(binary: Parameters[0]): Promise>; -/** - * @param {Parameters[0]} wat - * @return {Promise>} - */ -export function parse(wat: Parameters[0]): Promise>; -/** - * @param {Parameters[0]} binary - * @return {Promise>} - */ -export function componentWit(binary: Parameters[0]): Promise>; -/** - * @param {Parameters[0]} binary - * @param {Parameters[1]} adapters - * @return {Promise>} - */ -export function componentNew(binary: Parameters[0], adapters: Parameters[1]): Promise>; -/** - * @param {Parameters[0]} embedOpts - * @return {Promise>} - */ -export function componentEmbed(embedOpts: Parameters[0]): Promise>; -/** - * @param {Parameters[0]} binary - * @param {Parameters[1]} metadata - * @return {Promise>} - */ -export function metadataAdd(binary: Parameters[0], metadata: Parameters[1]): Promise>; -/** - * @param {Parameters[0]} binary - * @return {Promise>} - */ -export function metadataShow(binary: Parameters[0]): Promise>; -export function preview1AdapterCommandPath(): URL; -export function preview1AdapterReactorPath(): URL; -export { optimizeComponent as opt } from "./cmd/opt.js"; -export { transpileComponent as transpile, typesComponent as types } from "./cmd/transpile.js"; -//# sourceMappingURL=api.d.ts.map \ No newline at end of file diff --git a/packages/jco/dist/api.d.ts.map b/packages/jco/dist/api.d.ts.map deleted file mode 100644 index e5f444df5..000000000 --- a/packages/jco/dist/api.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"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"} \ No newline at end of file diff --git a/packages/jco/dist/browser.d.ts b/packages/jco/dist/browser.d.ts deleted file mode 100644 index b4050040b..000000000 --- a/packages/jco/dist/browser.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export function generate(...args: any[]): Promise; -export function generateTypes(...args: any[]): Promise; -export { generate as transpile }; -//# sourceMappingURL=browser.d.ts.map \ No newline at end of file diff --git a/packages/jco/dist/browser.d.ts.map b/packages/jco/dist/browser.d.ts.map deleted file mode 100644 index 5bd6b2a39..000000000 --- a/packages/jco/dist/browser.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.js"],"names":[],"mappings":"AAMA,uDAGC;AAED,4DAGC"} \ No newline at end of file diff --git a/packages/jco/dist/cmd/componentize.d.ts b/packages/jco/dist/cmd/componentize.d.ts deleted file mode 100644 index c06790b79..000000000 --- a/packages/jco/dist/cmd/componentize.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function componentize(jsSource: any, opts: any): Promise; -//# sourceMappingURL=componentize.d.ts.map \ No newline at end of file diff --git a/packages/jco/dist/cmd/componentize.d.ts.map b/packages/jco/dist/cmd/componentize.d.ts.map deleted file mode 100644 index 1282d0194..000000000 --- a/packages/jco/dist/cmd/componentize.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"componentize.d.ts","sourceRoot":"","sources":["../../src/cmd/componentize.js"],"names":[],"mappings":"AAKA,sEAyDC"} \ No newline at end of file diff --git a/packages/jco/dist/cmd/opt.d.ts b/packages/jco/dist/cmd/opt.d.ts deleted file mode 100644 index 9171a6c3d..000000000 --- a/packages/jco/dist/cmd/opt.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -export function opt(componentPath: any, opts: any, program: any): Promise; -/** - * - * @param {Uint8Array} componentBytes - * @param {{ quiet: boolean, asyncify?: boolean, optArgs?: string[], noVerify?: boolean }} opts? - * @returns {Promise<{ component: Uint8Array, compressionInfo: { beforeBytes: number, afterBytes: number }[] >} - */ -export function optimizeComponent(componentBytes: Uint8Array, opts: { - quiet: boolean; - asyncify?: boolean; - optArgs?: string[]; - noVerify?: boolean; -}): Promise<{ - component: Uint8Array; - compressionInfo: { - beforeBytes: number; - afterBytes: number; - }[]; -}>; -//# sourceMappingURL=opt.d.ts.map \ No newline at end of file diff --git a/packages/jco/dist/cmd/opt.d.ts.map b/packages/jco/dist/cmd/opt.d.ts.map deleted file mode 100644 index cbb027873..000000000 --- a/packages/jco/dist/cmd/opt.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"opt.d.ts","sourceRoot":"","sources":["../../src/cmd/opt.js"],"names":[],"mappings":"AAgBA,gFAgDC;AAgBD;;;;;GAKG;AACH,kDAJW,UAAU,QACV;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,GAC5E,OAAO,CAAC;IAAE,SAAS,EAAE,UAAU,CAAC;IAAC,eAAe,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAAA,CAAE,CA+L7G"} \ No newline at end of file diff --git a/packages/jco/dist/cmd/run.d.ts b/packages/jco/dist/cmd/run.d.ts deleted file mode 100644 index c4a4b5647..000000000 --- a/packages/jco/dist/cmd/run.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function run(componentPath: any, args: any, opts: any): Promise; -export function serve(componentPath: any, args: any, opts: any): Promise; -//# sourceMappingURL=run.d.ts.map \ No newline at end of file diff --git a/packages/jco/dist/cmd/run.d.ts.map b/packages/jco/dist/cmd/run.d.ts.map deleted file mode 100644 index 254a5f2bf..000000000 --- a/packages/jco/dist/cmd/run.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/cmd/run.js"],"names":[],"mappings":"AAWA,6EAwBC;AAED,+EAqCC"} \ No newline at end of file diff --git a/packages/jco/dist/cmd/transpile.d.ts b/packages/jco/dist/cmd/transpile.d.ts deleted file mode 100644 index ad554f925..000000000 --- a/packages/jco/dist/cmd/transpile.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -export function transpile(witPath: any, opts: any, program: any): Promise; -/** - * Execute the bundled pre-transpiled component that can perform component transpilation, - * for the given component. - * - * @param {Uint8Array} component - * @param {{ - * name: string, - * instantiation?: 'async' | 'sync', - * importBindings?: 'js' | 'optimized' | 'hybrid' | 'direct-optimized', - * map?: Record, - * asyncMode?: string, - * asyncImports?: string[], - * asyncExports?: string[], - * validLiftingOptimization?: bool, - * tracing?: bool, - * nodejsCompat?: bool, - * tlaCompat?: bool, - * base64Cutoff?: bool, - * js?: bool, - * minify?: bool, - * optimize?: bool, - * namespacedExports?: bool, - * outDir?: string, - * multiMemory?: bool, - * experimentalIdlImports?: bool, - * optArgs?: string[], - * }} opts - * @returns {Promise<{ files: { [filename: string]: Uint8Array }, imports: string[], exports: [string, 'function' | 'instance'][] }>} - */ -export function transpileComponent(component: Uint8Array, opts?: { - name: string; - instantiation?: "async" | "sync"; - importBindings?: "js" | "optimized" | "hybrid" | "direct-optimized"; - map?: Record; - asyncMode?: string; - asyncImports?: string[]; - asyncExports?: string[]; - validLiftingOptimization?: bool; - tracing?: bool; - nodejsCompat?: bool; - tlaCompat?: bool; - base64Cutoff?: bool; - js?: bool; - minify?: bool; - optimize?: bool; - namespacedExports?: bool; - outDir?: string; - multiMemory?: bool; - experimentalIdlImports?: bool; - optArgs?: string[]; -}): Promise<{ - files: { - [filename: string]: Uint8Array; - }; - imports: string[]; - exports: [string, "function" | "instance"][]; -}>; -export { types, guestTypes, typesComponent } from "./types.js"; -//# sourceMappingURL=transpile.d.ts.map \ No newline at end of file diff --git a/packages/jco/dist/cmd/transpile.d.ts.map b/packages/jco/dist/cmd/transpile.d.ts.map deleted file mode 100644 index 845197950..000000000 --- a/packages/jco/dist/cmd/transpile.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"transpile.d.ts","sourceRoot":"","sources":["../../src/cmd/transpile.js"],"names":[],"mappings":"AA6BA,gFA8CC;AAqBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,8CAzBW,UAAU,SACV;IACN,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACjC,cAAc,CAAC,EAAE,IAAI,GAAG,WAAW,GAAG,QAAQ,GAAG,kBAAkB,CAAC;IACpE,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,wBAAwB,CAAC,EAAE,IAAI,CAAC;IAChC,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB,EAAE,CAAC,EAAE,IAAI,CAAC;IACV,MAAM,CAAC,EAAE,IAAI,CAAC;IACd,QAAQ,CAAC,EAAE,IAAI,CAAC;IAChB,iBAAiB,CAAC,EAAE,IAAI,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,sBAAsB,CAAC,EAAE,IAAI,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB,GACS,OAAO,CAAC;IAAE,KAAK,EAAE;QAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAA;KAAE,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CAAC,EAAE,CAAA;CAAE,CAAC,CAkUnI"} \ No newline at end of file diff --git a/packages/jco/dist/cmd/types.d.ts b/packages/jco/dist/cmd/types.d.ts deleted file mode 100644 index 9da644fbc..000000000 --- a/packages/jco/dist/cmd/types.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -export function types(witPath: any, opts: any): Promise; -export function guestTypes(witPath: any, opts: any): Promise; -/** - * @param {string} witPath - * @param {{ - * name?: string, - * worldName?: string, - * instantiation?: 'async' | 'sync', - * tlaCompat?: bool, - * asyncMode?: string, - * asyncImports?: string[], - * asyncExports?: string[], - * outDir?: string, - * allFeatures?: bool, - * feature?: string[] | 'all', // backwards compat - * features?: string[] | 'all', - * asyncWasiImports?: string[], - * asyncWasiExports?: string[], - * guest?: bool, - * }} opts - * @returns {Promise<{ [filename: string]: Uint8Array }>} - */ -export function typesComponent(witPath: string, opts: { - name?: string; - worldName?: string; - instantiation?: "async" | "sync"; - tlaCompat?: bool; - asyncMode?: string; - asyncImports?: string[]; - asyncExports?: string[]; - outDir?: string; - allFeatures?: bool; - feature?: string[] | "all"; - features?: string[] | "all"; - asyncWasiImports?: string[]; - asyncWasiExports?: string[]; - guest?: bool; -}): Promise<{ - [filename: string]: Uint8Array; -}>; -//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/jco/dist/cmd/types.d.ts.map b/packages/jco/dist/cmd/types.d.ts.map deleted file mode 100644 index d0bc8bd26..000000000 --- a/packages/jco/dist/cmd/types.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/cmd/types.js"],"names":[],"mappings":"AAkBA,8DAGC;AAED,mEAQC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wCAnBW,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,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,KAAK,CAAC,EAAE,IAAI,CAAC;CACd,GACS,OAAO,CAAC;IAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAA;CAAE,CAAC,CAqEvD"} \ No newline at end of file diff --git a/packages/jco/dist/cmd/wasm-tools.d.ts b/packages/jco/dist/cmd/wasm-tools.d.ts deleted file mode 100644 index a130192b7..000000000 --- a/packages/jco/dist/cmd/wasm-tools.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export function parse(file: any, opts: any): Promise; -export function print(file: any, opts: any): Promise; -export function componentWit(file: any, opts: any): Promise; -export function componentNew(file: any, opts: any): Promise; -export function componentEmbed(file: any, opts: any): Promise; -export function metadataAdd(file: any, opts: any): Promise; -export function metadataShow(file: any, opts: any): Promise; -//# sourceMappingURL=wasm-tools.d.ts.map \ No newline at end of file diff --git a/packages/jco/dist/cmd/wasm-tools.d.ts.map b/packages/jco/dist/cmd/wasm-tools.d.ts.map deleted file mode 100644 index 0790453e2..000000000 --- a/packages/jco/dist/cmd/wasm-tools.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"wasm-tools.d.ts","sourceRoot":"","sources":["../../src/cmd/wasm-tools.js"],"names":[],"mappings":"AAeA,2DAKC;AAED,2DASC;AAED,kEASC;AAED,kEAyDC;AAED,oEAcC;AAED,iEAUC;AAED,kEAoCC"} \ No newline at end of file diff --git a/packages/jco/dist/common.d.ts b/packages/jco/dist/common.d.ts deleted file mode 100644 index 9527e34b7..000000000 --- a/packages/jco/dist/common.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -export function setShowSpinner(val: any): void; -export function getShowSpinner(): boolean; -export function sizeStr(num: any): string | undefined; -export function fixedDigitDisplay(num: any, maxChars: any): string; -export function table(data: any, align?: any[]): string; -/** - * Securely creates a temporary directory and returns its path. - * - * The new directory is created using `fsPromises.mkdtemp()`. - */ -export function getTmpDir(): Promise; -export function spawnIOTmp(cmd: any, input: any, args: any): Promise>; -export function writeFiles(files: any, summaryTitle: any): Promise; -export const isWindows: boolean; -export const ASYNC_WASI_IMPORTS: string[]; -export const ASYNC_WASI_EXPORTS: string[]; -export { readFileCli as readFile }; -declare function readFileCli(file: any, encoding: any): Promise>; -//# sourceMappingURL=common.d.ts.map \ No newline at end of file diff --git a/packages/jco/dist/common.d.ts.map b/packages/jco/dist/common.d.ts.map deleted file mode 100644 index d0e756c80..000000000 --- a/packages/jco/dist/common.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.js"],"names":[],"mappings":"AA4BA,+CAEC;AACD,0CAIC;AAED,sDASC;AAED,mEAcC;AAED,wDAoBC;AAED;;;;GAIG;AACH,6CAEC;AAWD,8FAiCC;AAED,yEAmBC;AArJD,gCAA8C;AAE9C,0CASE;AAEF,0CAGE;;AAsEF,yFAMC"} \ No newline at end of file diff --git a/packages/jco/dist/jco.d.ts b/packages/jco/dist/jco.d.ts deleted file mode 100644 index 21be8ccad..000000000 --- a/packages/jco/dist/jco.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node -export {}; -//# sourceMappingURL=jco.d.ts.map \ No newline at end of file diff --git a/packages/jco/dist/jco.d.ts.map b/packages/jco/dist/jco.d.ts.map deleted file mode 100644 index c46fd0987..000000000 --- a/packages/jco/dist/jco.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"jco.d.ts","sourceRoot":"","sources":["../src/jco.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/packages/jco/dist/ora-shim.d.ts b/packages/jco/dist/ora-shim.d.ts deleted file mode 100644 index bbf72b797..000000000 --- a/packages/jco/dist/ora-shim.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** Browser shim for Ora */ -export default function ora(): Ora; -declare class Ora { - start(): void; - stop(): void; -} -export {}; -//# sourceMappingURL=ora-shim.d.ts.map \ No newline at end of file diff --git a/packages/jco/dist/ora-shim.d.ts.map b/packages/jco/dist/ora-shim.d.ts.map deleted file mode 100644 index fa205a893..000000000 --- a/packages/jco/dist/ora-shim.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"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"} \ No newline at end of file From 16efffc5639d5678895cf96460999bbefa5037bc Mon Sep 17 00:00:00 2001 From: Elmer Bulthuis Date: Tue, 22 Jul 2025 12:02:14 +0200 Subject: [PATCH 6/6] fix any in api.d.ts --- packages/jco/src/api.d.ts | 14 +++++++------- packages/jco/src/api.d.ts.map | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/jco/src/api.d.ts b/packages/jco/src/api.d.ts index 6c9fce0a8..6bef5ad12 100644 --- a/packages/jco/src/api.d.ts +++ b/packages/jco/src/api.d.ts @@ -2,39 +2,39 @@ * @param {Parameters[0]} binary * @return {Promise>} */ -export function print(binary: Parameters[0]): Promise>; +export function print(binary: Parameters[0]): Promise>; /** * @param {Parameters[0]} wat * @return {Promise>} */ -export function parse(wat: Parameters[0]): Promise>; +export function parse(wat: Parameters[0]): Promise>; /** * @param {Parameters[0]} binary * @return {Promise>} */ -export function componentWit(binary: Parameters[0]): Promise>; +export function componentWit(binary: Parameters[0]): Promise>; /** * @param {Parameters[0]} binary * @param {Parameters[1]} adapters * @return {Promise>} */ -export function componentNew(binary: Parameters[0], adapters: Parameters[1]): Promise>; +export function componentNew(binary: Parameters[0], adapters: Parameters[1]): Promise>; /** * @param {Parameters[0]} embedOpts * @return {Promise>} */ -export function componentEmbed(embedOpts: Parameters[0]): Promise>; +export function componentEmbed(embedOpts: Parameters[0]): Promise>; /** * @param {Parameters[0]} binary * @param {Parameters[1]} metadata * @return {Promise>} */ -export function metadataAdd(binary: Parameters[0], metadata: Parameters[1]): Promise>; +export function metadataAdd(binary: Parameters[0], metadata: Parameters[1]): Promise>; /** * @param {Parameters[0]} binary * @return {Promise>} */ -export function metadataShow(binary: Parameters[0]): Promise>; +export function metadataShow(binary: Parameters[0]): Promise>; export function preview1AdapterCommandPath(): URL; export function preview1AdapterReactorPath(): URL; export { optimizeComponent as opt } from "./cmd/opt.js"; diff --git a/packages/jco/src/api.d.ts.map b/packages/jco/src/api.d.ts.map index 80287a46a..da3dcb6e1 100644 --- a/packages/jco/src/api.d.ts.map +++ b/packages/jco/src/api.d.ts.map @@ -1 +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"} \ No newline at end of file +{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["api.js"],"names":[],"mappings":"AAgBA;;;GAGG;AACH,8BAHW,UAAU,CAAC,OAAO,sBAAsB,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,GAClD,OAAO,CAAC,UAAU,CAAC,OAAO,sBAAsB,EAAE,KAAK,CAAC,CAAC,CAKpE;AACD;;;GAGG;AACH,2BAHW,UAAU,CAAC,OAAO,sBAAsB,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,GAClD,OAAO,CAAC,UAAU,CAAC,OAAO,sBAAsB,EAAE,KAAK,CAAC,CAAC,CAKpE;AACD;;;GAGG;AACH,qCAHW,UAAU,CAAC,OAAO,sBAAsB,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,GACzD,OAAO,CAAC,UAAU,CAAC,OAAO,sBAAsB,EAAE,YAAY,CAAC,CAAC,CAK3E;AACD;;;;GAIG;AACH,qCAJW,UAAU,CAAC,OAAO,sBAAsB,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,YAC1D,UAAU,CAAC,OAAO,sBAAsB,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,GACzD,OAAO,CAAC,UAAU,CAAC,OAAO,sBAAsB,EAAE,YAAY,CAAC,CAAC,CAK3E;AACD;;;GAGG;AACH,0CAHW,UAAU,CAAC,OAAO,sBAAsB,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,GAC3D,OAAO,CAAC,UAAU,CAAC,OAAO,sBAAsB,EAAE,cAAc,CAAC,CAAC,CAK7E;AACD;;;;GAIG;AACH,oCAJW,UAAU,CAAC,OAAO,sBAAsB,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,YACzD,UAAU,CAAC,OAAO,sBAAsB,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,GACxD,OAAO,CAAC,UAAU,CAAC,OAAO,sBAAsB,EAAE,WAAW,CAAC,CAAC,CAK1E;AACD;;;GAGG;AACH,qCAHW,UAAU,CAAC,OAAO,sBAAsB,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,GACzD,OAAO,CAAC,UAAU,CAAC,OAAO,sBAAsB,EAAE,YAAY,CAAC,CAAC,CAK3E;AACD,kDAKC;AACD,kDAKC"} \ No newline at end of file