diff --git a/.packages.json b/.packages.json index 9c40b94fb..ec52876db 100644 --- a/.packages.json +++ b/.packages.json @@ -4,8 +4,8 @@ "locales" ], "released": { - "commit": "4f010d5414fa666b354c8d17ac55beb58669dc06", - "version": "0.4.4" + "commit": "25de684da837dd553684e912490f92cf8c9c4e1f", + "version": "0.4.5" } }, "discord-bot": { @@ -17,7 +17,7 @@ ], "released": { "commit": "b6ecdcad78be7a44ef564afdfc9c51daedf38de8", - "version": "0.3.5" + "version": "0.3.6" } }, "java-edition": { @@ -30,8 +30,8 @@ "nbt" ], "released": { - "commit": "911a92fd30ee5faee325e1ff4abd9c2f5422125e", - "version": "0.3.5" + "commit": "25de684da837dd553684e912490f92cf8c9c4e1f", + "version": "0.3.6" } }, "json": { @@ -40,8 +40,8 @@ "locales" ], "released": { - "commit": "82eaccb245a70d978e518b75719e4ed546440928", - "version": "0.3.5" + "commit": "ad778e38026c1cadc82aac43329a19b69eb71686", + "version": "0.3.6" } }, "language-server": { @@ -52,14 +52,14 @@ "mcdoc" ], "released": { - "commit": "43f540325a818db7e58e99b2d83931ce19d707d1", - "version": "0.4.4" + "commit": "449e7c655e263425192fe41948904017543ad0cb", + "version": "0.4.5" } }, "locales": { "released": { - "commit": "c17cbdba4405789de701931fb9acf1c269c96367", - "version": "0.3.4" + "commit": "25de684da837dd553684e912490f92cf8c9c4e1f", + "version": "0.3.5" } }, "mcdoc": { @@ -68,8 +68,8 @@ "locales" ], "released": { - "commit": "09ee4cbc6af1c12954b9bd6da9197fc1ee4bf390", - "version": "0.3.5" + "commit": "25de684da837dd553684e912490f92cf8c9c4e1f", + "version": "0.3.6" } }, "mcdoc-cli": { @@ -78,8 +78,8 @@ "mcdoc" ], "released": { - "commit": "25de684da837dd553684e912490f92cf8c9c4e1f", - "version": "0.1.4" + "commit": "15961aa1c7ce7d4ea72f2a6fccf478c044d90281", + "version": "0.1.5" } }, "mcfunction": { @@ -88,8 +88,8 @@ "locales" ], "released": { - "commit": "cd8d097234844a0808496e972c3c8f2cc052d7c1", - "version": "0.2.6" + "commit": "09ee4cbc6af1c12954b9bd6da9197fc1ee4bf390", + "version": "0.2.7" } }, "nbt": { @@ -100,7 +100,7 @@ ], "released": { "commit": "b626aff40da287707d03c8d451989fb91ac5f9c3", - "version": "0.3.5" + "version": "0.3.6" } }, "playground": { @@ -112,7 +112,7 @@ ], "released": { "commit": "f0d861382044f94ea005b1cfd11fc7e2d57d5663", - "version": "0.2.5" + "version": "0.2.6" } }, "vscode-extension": { @@ -120,8 +120,8 @@ "language-server" ], "released": { - "commit": "f0d861382044f94ea005b1cfd11fc7e2d57d5663", - "version": "0.3.5" + "commit": "449e7c655e263425192fe41948904017543ad0cb", + "version": "0.3.6" } } } diff --git a/packages/mcdoc-cli/package.json b/packages/mcdoc-cli/package.json index 4470f2d23..4ef39c835 100644 --- a/packages/mcdoc-cli/package.json +++ b/packages/mcdoc-cli/package.json @@ -1,9 +1,9 @@ { "name": "@spyglassmc/mcdoc-cli", - "version": "0.1.4", + "version": "0.1.5", "type": "module", - "main": "lib/index.mjs", - "types": "lib/index.d.mts", + "main": "lib/index.js", + "types": "lib/index.d.ts", "contributors": [ { "name": "Misode", @@ -19,7 +19,7 @@ "test": "test/" }, "bin": { - "mcdoc": "lib/index.mjs" + "mcdoc": "lib/index.js" }, "scripts": { "release": "npm publish", diff --git a/packages/mcdoc-cli/src/index.mts b/packages/mcdoc-cli/src/index.ts similarity index 98% rename from packages/mcdoc-cli/src/index.mts rename to packages/mcdoc-cli/src/index.ts index a37a97d5a..d1e9ede35 100644 --- a/packages/mcdoc-cli/src/index.mts +++ b/packages/mcdoc-cli/src/index.ts @@ -1,4 +1,4 @@ -#!/usr/bin/env -S tsx +#!/usr/bin/env -S node import { dirname, join, parse, resolve } from 'path' import { fileURLToPath, pathToFileURL } from 'url' @@ -16,7 +16,6 @@ import { VanillaConfig, } from '@spyglassmc/core' import { NodeJsExternals } from '@spyglassmc/core/lib/nodejs.js' -import * as je from '@spyglassmc/java-edition' import * as mcdoc from '@spyglassmc/mcdoc' const parentPath = dirname(fileURLToPath(import.meta.url)) @@ -100,7 +99,8 @@ await CLI.scriptName('mcdoc') console.trace(message, ...params), } - const projectPath = resolve(parentPath, args.source) + const projectPath = resolve(process.cwd(), args.source) + await fileUtil.ensureDir(NodeJsExternals, projectPath) const service = new Service({ @@ -113,7 +113,7 @@ await CLI.scriptName('mcdoc') env: { dependencies: [] }, }), externals: NodeJsExternals, - initializers: [mcdoc.initialize, je.initialize], + initializers: [mcdoc.initialize], projectRoot: fileUtil.ensureEndingSlash( pathToFileURL(projectPath).toString(), ),