diff --git a/packages/controller/controller.ts b/packages/controller/controller.ts index 4736aba0..ba863ae9 100644 --- a/packages/controller/controller.ts +++ b/packages/controller/controller.ts @@ -32,7 +32,7 @@ import { ConsoleTransport, levels, logger } from "@clusterio/lib"; import Controller from "./src/Controller.js"; import UserManager from "./src/UserManager.js"; import UserRecord from "./src/UserRecord.js"; -import packageConfig from "./package.json" with { type: "json" }; +import packageConfig from "@clusterio/controller/package.json" with { type: "json" }; // globals let controller: Controller; diff --git a/packages/controller/src/WsServer.ts b/packages/controller/src/WsServer.ts index db582ec1..9e5b2dd4 100644 --- a/packages/controller/src/WsServer.ts +++ b/packages/controller/src/WsServer.ts @@ -12,7 +12,7 @@ import ControlConnection from "./ControlConnection.js"; import HostConnection from "./HostConnection.js"; import WsServerConnector from "./WsServerConnector.js"; -import packageConfig from "../package.json" with { type: "json" }; +import packageConfig from "@clusterio/controller/package.json" with { type: "json" }; const wsMessageCounter = new lib.Counter( "clusterio_controller_websocket_message_total", diff --git a/packages/ctl/.npmignore b/packages/ctl/.npmignore new file mode 100644 index 00000000..5bfde2b7 --- /dev/null +++ b/packages/ctl/.npmignore @@ -0,0 +1 @@ +# Without an .npmignore pnpm packs using the repository .gitignore, which leaves out dist/ diff --git a/packages/ctl/ctl.ts b/packages/ctl/ctl.ts index 55f2d944..0de27ee7 100755 --- a/packages/ctl/ctl.ts +++ b/packages/ctl/ctl.ts @@ -7,7 +7,7 @@ import fs from "node:fs/promises"; import yargs, { type Argv } from "yargs"; import path from "path"; -import packageConfig from "./package.json" with { type: "json" }; +import packageConfig from "@clusterio/ctl/package.json" with { type: "json" }; import { strict as assert } from "assert"; // Reduce startup time by lazy compiling schemas. diff --git a/packages/host/.npmignore b/packages/host/.npmignore new file mode 100644 index 00000000..5bfde2b7 --- /dev/null +++ b/packages/host/.npmignore @@ -0,0 +1 @@ +# Without an .npmignore pnpm packs using the repository .gitignore, which leaves out dist/ diff --git a/packages/host/host.ts b/packages/host/host.ts index cd050cb0..8d31e071 100755 --- a/packages/host/host.ts +++ b/packages/host/host.ts @@ -15,7 +15,7 @@ import fs from "node:fs/promises"; import path from "path"; import yargs from "yargs"; -import packageConfig from "./package.json" with { type: "json" }; +import packageConfig from "@clusterio/host/package.json" with { type: "json" }; import winston from "winston"; import "winston-daily-rotate-file"; diff --git a/packages/lib/package.json b/packages/lib/package.json index e23c4b8c..5f6f94b3 100644 --- a/packages/lib/package.json +++ b/packages/lib/package.json @@ -25,11 +25,17 @@ "type": "module", "imports": { "#WebSocket": { - "node": "./src/link/WebSocket.node.ts", + "node": { + "types": "./src/link/WebSocket.node.ts", + "default": "./dist/node/src/link/WebSocket.node.js" + }, "import": "./src/link/WebSocket.browser.ts" }, "#is_deep_strict_equal": { - "node": "./src/is_deep_strict_equal.node.ts", + "node": { + "types": "./src/is_deep_strict_equal.node.ts", + "default": "./dist/node/src/is_deep_strict_equal.node.js" + }, "import": "./src/is_deep_strict_equal.browser.ts" } }, diff --git a/packages/web_ui/.npmignore b/packages/web_ui/.npmignore new file mode 100644 index 00000000..5bfde2b7 --- /dev/null +++ b/packages/web_ui/.npmignore @@ -0,0 +1 @@ +# Without an .npmignore pnpm packs using the repository .gitignore, which leaves out dist/