@koishi-ce/client 1.0.0 → 1.0.1

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/lib/bin.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as build } from "./src-Bxzzi1Rx.mjs";
2
+ import { t as build } from "./src-lTfcJ1xA.mjs";
3
3
  import { existsSync } from "node:fs";
4
4
  import { resolve } from "node:path";
5
5
  //#endregion
@@ -16,7 +16,7 @@ import { resolve } from "node:path";
16
16
  const { version } = {
17
17
  name: "@koishi-ce/client",
18
18
  description: "Koishi Console Client",
19
- version: "1.0.0",
19
+ version: "1.0.1",
20
20
  type: "module",
21
21
  main: "client/index.ts",
22
22
  exports: {
package/lib/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { n as createServer, t as build } from "./src-Bxzzi1Rx.mjs";
1
+ import { n as createServer, t as build } from "./src-lTfcJ1xA.mjs";
2
2
  export { build, createServer };
@@ -90,7 +90,10 @@ async function build(root, config = {}) {
90
90
  define: { "process.env.NODE_ENV": "\"production\"" }
91
91
  }, config));
92
92
  for (const item of results[0]?.output ?? []) {
93
- const dest = `${root}/dist/${item.fileName === "index.mjs" ? "index.js" : item.fileName}`;
93
+ let fileName = item.fileName;
94
+ if (fileName === "index.mjs") fileName = "index.js";
95
+ if (fileName === "index.css") fileName = "style.css";
96
+ const dest = `${root}/dist/${fileName}`;
94
97
  if (item.type === "asset") {
95
98
  if (item.source === void 0) continue;
96
99
  await Bun.write(dest, item.source);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@koishi-ce/client",
3
3
  "description": "Koishi Console Client",
4
- "version": "1.0.0",
4
+ "version": "1.0.1",
5
5
  "type": "module",
6
6
  "main": "client/index.ts",
7
7
  "exports": {
package/src/index.ts CHANGED
@@ -175,9 +175,13 @@ export async function build(root: string, config: vite.UserConfig = {}) {
175
175
  // build.write: false 让构建结果留在内存里,由这里手动落盘,
176
176
  // 以便对文件名和 JS 产物做后处理
177
177
  for (const item of results[0]?.output ?? []) {
178
- // lib es 格式的产物名是 index.mjs,统一改名为 index.js
179
- // (rolldown output 条目是冻结对象,不能原地改写)
180
- const fileName = item.fileName === "index.mjs" ? "index.js" : item.fileName;
178
+ // lib es 格式的产物名是 index.mjs,统一改名为 index.js;css 产物
179
+ // 默认名是 index.css,统一改名为 style.css(console 服务端的
180
+ // resolveEntry 按该约定探测并下发)。rolldown output 条目是
181
+ // 冻结对象,不能原地改写
182
+ let fileName = item.fileName;
183
+ if (fileName === "index.mjs") fileName = "index.js";
184
+ if (fileName === "index.css") fileName = "style.css";
181
185
  const dest = `${root}/dist/${fileName}`;
182
186
  if (item.type === "asset") {
183
187
  if (item.source === undefined) continue;