@morlay/dsh-client-modules 0.2.10 → 0.2.11-alpha.2
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/dist/client.cjs +1153 -417
- package/dist/client.d.cts +1 -3
- package/dist/client.d.mts +1 -3
- package/dist/client.mjs +1 -2
- package/dist/index.cjs +7 -14
- package/dist/index.d.mts +1 -3
- package/dist/index.mjs +7 -14
- package/package.json +8 -8
package/dist/client.d.cts
CHANGED
package/dist/client.d.mts
CHANGED
package/dist/client.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { apply as apply$1 } from "@morlay/dsh-client-ui-primitives/client";
|
|
2
|
-
|
|
2
|
+
// src/client/index.ts
|
|
3
3
|
/** 恒 `undefined` 的可订阅快照(`useSyncExternalStore` 的入参形状)。 */
|
|
4
4
|
const NO_RELEASE_CHANGE = {
|
|
5
5
|
getSnapshot: () => void 0,
|
|
@@ -54,5 +54,4 @@ function installTerminalRecovery(ctx) {
|
|
|
54
54
|
};
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
|
-
//#endregion
|
|
58
57
|
export { apply };
|
package/dist/index.cjs
CHANGED
|
@@ -8,7 +8,7 @@ let node_crypto = require("node:crypto");
|
|
|
8
8
|
let _morlay_dsh_cordis_assets_styles = require("@morlay/dsh-cordis-assets/styles");
|
|
9
9
|
let rolldown = require("rolldown");
|
|
10
10
|
let vite = require("vite");
|
|
11
|
-
|
|
11
|
+
// src/trace.ts
|
|
12
12
|
/**
|
|
13
13
|
* 诊断细节(逐包预编译、逐请求那一类)的具名 logger。
|
|
14
14
|
*
|
|
@@ -29,8 +29,7 @@ function traceOf(ctx, name) {
|
|
|
29
29
|
logger.debug(format, ...args);
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
|
|
33
|
-
//#region src/config.ts
|
|
32
|
+
// src/config.ts
|
|
34
33
|
/**
|
|
35
34
|
* dev 形态的分流配置:profile 的 `dsh.dev.exclude` 点名的包**不算开发模块**。
|
|
36
35
|
*
|
|
@@ -87,8 +86,7 @@ async function devExcluded(profileDir) {
|
|
|
87
86
|
function isAggregated(name, patterns) {
|
|
88
87
|
return patterns.some((pattern) => pattern.test(name));
|
|
89
88
|
}
|
|
90
|
-
|
|
91
|
-
//#region src/resolve.ts
|
|
89
|
+
// src/resolve.ts
|
|
92
90
|
/** 路由前缀(沿用上游的 `/plugins`,页面上不改 URL 形态)。 */
|
|
93
91
|
const PLUGIN_ROUTE = "/plugins";
|
|
94
92
|
/** `@deepseek-ai/dsh-x` → `@deepseek-ai+dsh-x`:包名里的 `/` 在 URL 段里要转义。 */
|
|
@@ -343,8 +341,7 @@ async function clientHalfOf(root, subpath) {
|
|
|
343
341
|
const conventional = (0, node_path.join)(root, "src", "client", "index.ts");
|
|
344
342
|
return await exists(conventional) ? conventional : void 0;
|
|
345
343
|
}
|
|
346
|
-
|
|
347
|
-
//#region src/bundle.ts
|
|
344
|
+
// src/bundle.ts
|
|
348
345
|
/**
|
|
349
346
|
* 客户端资源的**联邦式**产出:一个包一份产物,三方的与我们的**没有本质区别**。
|
|
350
347
|
*
|
|
@@ -784,8 +781,7 @@ async function packageJsonNear(file) {
|
|
|
784
781
|
directory = parent;
|
|
785
782
|
}
|
|
786
783
|
}
|
|
787
|
-
|
|
788
|
-
//#region src/dirs.ts
|
|
784
|
+
// src/dirs.ts
|
|
789
785
|
/** 本包自己的根(页面的骨架、`node-stub` 与依赖解析的兜底基准都从它推)。 */
|
|
790
786
|
function packageRoot() {
|
|
791
787
|
return (0, node_path.dirname)((0, node_url.fileURLToPath)(new URL("../package.json", require("url").pathToFileURL(__filename).href)));
|
|
@@ -984,8 +980,7 @@ function dshClientRowsPlugin(options) {
|
|
|
984
980
|
}
|
|
985
981
|
};
|
|
986
982
|
}
|
|
987
|
-
|
|
988
|
-
//#region src/serve-vite.ts
|
|
983
|
+
// src/serve-vite.ts
|
|
989
984
|
function rowsOf(source) {
|
|
990
985
|
return source.rows();
|
|
991
986
|
}
|
|
@@ -1085,8 +1080,7 @@ async function startViteDev(ctx, options) {
|
|
|
1085
1080
|
hmr: options.httpServer !== void 0
|
|
1086
1081
|
};
|
|
1087
1082
|
}
|
|
1088
|
-
|
|
1089
|
-
//#region src/index.ts
|
|
1083
|
+
// src/index.ts
|
|
1090
1084
|
const name = "client-modules";
|
|
1091
1085
|
const inject = ["loader", "webServer"];
|
|
1092
1086
|
/**
|
|
@@ -1446,7 +1440,6 @@ function apply(ctx) {
|
|
|
1446
1440
|
handler: serve
|
|
1447
1441
|
}), "client-modules: /plugins route");
|
|
1448
1442
|
}
|
|
1449
|
-
//#endregion
|
|
1450
1443
|
exports.apply = apply;
|
|
1451
1444
|
exports.inject = inject;
|
|
1452
1445
|
exports.name = name;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Context } from "@deepseek-ai/cordis";
|
|
2
|
-
//#region src/index.d.ts
|
|
3
2
|
export declare const name = "client-modules";
|
|
4
3
|
export declare const inject: string[];
|
|
5
4
|
/** 一行 client 声明:包名与它的 client 半源文件。 */
|
|
@@ -18,5 +17,4 @@ export interface ClientRow {
|
|
|
18
17
|
* 按新 descriptor 拒掉(`missing "sessionId"`)。
|
|
19
18
|
*/
|
|
20
19
|
export declare function watchOf(root: string | undefined, entry: string): string[];
|
|
21
|
-
export declare function apply(ctx: Context): void;
|
|
22
|
-
//#endregion
|
|
20
|
+
export declare function apply(ctx: Context): void;
|
package/dist/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { createHash } from "node:crypto";
|
|
|
7
7
|
import { cssInlinePlugins } from "@morlay/dsh-cordis-assets/styles";
|
|
8
8
|
import { rolldown } from "rolldown";
|
|
9
9
|
import { createServer, esmExternalRequirePlugin } from "vite";
|
|
10
|
-
|
|
10
|
+
// src/trace.ts
|
|
11
11
|
/**
|
|
12
12
|
* 诊断细节(逐包预编译、逐请求那一类)的具名 logger。
|
|
13
13
|
*
|
|
@@ -28,8 +28,7 @@ function traceOf(ctx, name) {
|
|
|
28
28
|
logger.debug(format, ...args);
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
//#region src/config.ts
|
|
31
|
+
// src/config.ts
|
|
33
32
|
/**
|
|
34
33
|
* dev 形态的分流配置:profile 的 `dsh.dev.exclude` 点名的包**不算开发模块**。
|
|
35
34
|
*
|
|
@@ -86,8 +85,7 @@ async function devExcluded(profileDir) {
|
|
|
86
85
|
function isAggregated(name, patterns) {
|
|
87
86
|
return patterns.some((pattern) => pattern.test(name));
|
|
88
87
|
}
|
|
89
|
-
|
|
90
|
-
//#region src/resolve.ts
|
|
88
|
+
// src/resolve.ts
|
|
91
89
|
/** 路由前缀(沿用上游的 `/plugins`,页面上不改 URL 形态)。 */
|
|
92
90
|
const PLUGIN_ROUTE = "/plugins";
|
|
93
91
|
/** `@deepseek-ai/dsh-x` → `@deepseek-ai+dsh-x`:包名里的 `/` 在 URL 段里要转义。 */
|
|
@@ -342,8 +340,7 @@ async function clientHalfOf(root, subpath) {
|
|
|
342
340
|
const conventional = join(root, "src", "client", "index.ts");
|
|
343
341
|
return await exists(conventional) ? conventional : void 0;
|
|
344
342
|
}
|
|
345
|
-
|
|
346
|
-
//#region src/bundle.ts
|
|
343
|
+
// src/bundle.ts
|
|
347
344
|
/**
|
|
348
345
|
* 客户端资源的**联邦式**产出:一个包一份产物,三方的与我们的**没有本质区别**。
|
|
349
346
|
*
|
|
@@ -783,8 +780,7 @@ async function packageJsonNear(file) {
|
|
|
783
780
|
directory = parent;
|
|
784
781
|
}
|
|
785
782
|
}
|
|
786
|
-
|
|
787
|
-
//#region src/dirs.ts
|
|
783
|
+
// src/dirs.ts
|
|
788
784
|
/** 本包自己的根(页面的骨架、`node-stub` 与依赖解析的兜底基准都从它推)。 */
|
|
789
785
|
function packageRoot() {
|
|
790
786
|
return dirname(fileURLToPath(new URL("../package.json", import.meta.url)));
|
|
@@ -983,8 +979,7 @@ function dshClientRowsPlugin(options) {
|
|
|
983
979
|
}
|
|
984
980
|
};
|
|
985
981
|
}
|
|
986
|
-
|
|
987
|
-
//#region src/serve-vite.ts
|
|
982
|
+
// src/serve-vite.ts
|
|
988
983
|
function rowsOf(source) {
|
|
989
984
|
return source.rows();
|
|
990
985
|
}
|
|
@@ -1084,8 +1079,7 @@ async function startViteDev(ctx, options) {
|
|
|
1084
1079
|
hmr: options.httpServer !== void 0
|
|
1085
1080
|
};
|
|
1086
1081
|
}
|
|
1087
|
-
|
|
1088
|
-
//#region src/index.ts
|
|
1082
|
+
// src/index.ts
|
|
1089
1083
|
const name = "client-modules";
|
|
1090
1084
|
const inject = ["loader", "webServer"];
|
|
1091
1085
|
/**
|
|
@@ -1445,5 +1439,4 @@ function apply(ctx) {
|
|
|
1445
1439
|
handler: serve
|
|
1446
1440
|
}), "client-modules: /plugins route");
|
|
1447
1441
|
}
|
|
1448
|
-
//#endregion
|
|
1449
1442
|
export { apply, inject, name, watchOf };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@morlay/dsh-client-modules",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.11-alpha.2",
|
|
4
4
|
"description": "Dev-form web layer for dsh: serves the page, the app entry and every client resource through an in-process vite dev server (middleware mode) — the node-side counterpart of upstream @deepseek-ai/dsh-client-modules, with the module table replaced by vite's resolver, dependency prebundling and HMR.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"client",
|
|
@@ -36,26 +36,26 @@
|
|
|
36
36
|
"./locale/*.json": "./locale/*.json"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@deepseek-ai/dsh-client-ui-theme": "^0.2.
|
|
40
|
-
"@deepseek-ai/dsh-host-webserver": "^0.2.
|
|
41
|
-
"@morlay/dsh-client-ui-primitives": "0.0.
|
|
42
|
-
"@morlay/dsh-cordis-assets": "0.2.
|
|
39
|
+
"@deepseek-ai/dsh-client-ui-theme": "^0.2.2-alpha.2",
|
|
40
|
+
"@deepseek-ai/dsh-host-webserver": "^0.2.2-alpha.2",
|
|
41
|
+
"@morlay/dsh-client-ui-primitives": "0.0.14-alpha.2",
|
|
42
|
+
"@morlay/dsh-cordis-assets": "0.2.10-alpha.2",
|
|
43
43
|
"@oxc-project/runtime": "^0.153.0",
|
|
44
44
|
"lightningcss": "^1.30.0",
|
|
45
45
|
"vite": "^8.3.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@deepseek-ai/cordis": "^4.0.
|
|
48
|
+
"@deepseek-ai/cordis": "^4.0.6-alpha.1",
|
|
49
49
|
"@local/devkit": "0.1.0",
|
|
50
50
|
"@types/node": "^26.5.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@deepseek-ai/cordis": "^4.0.
|
|
53
|
+
"@deepseek-ai/cordis": "^4.0.6-alpha.1",
|
|
54
54
|
"react": "^18.3.1",
|
|
55
55
|
"rolldown": "^1.2.14"
|
|
56
56
|
},
|
|
57
57
|
"engines": {
|
|
58
|
-
"dsh": ">= 0.2.
|
|
58
|
+
"dsh": ">= 0.2.2-alpha.2 < 0.2.3",
|
|
59
59
|
"node": ">=24.11.0"
|
|
60
60
|
},
|
|
61
61
|
"dsh": {
|