@deepseek-ai/dsh-client-web 0.1.7-alpha.1 → 0.1.7-rc.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/index.js +8 -4
- package/lib/types/boot-client.d.ts +5 -2
- package/package.json +11 -11
package/lib/index.js
CHANGED
|
@@ -41,7 +41,8 @@ const STATE_LABELS = {
|
|
|
41
41
|
* Compose the client: `ctx.plugin(Loader)`, `loader.internal = modules`, one
|
|
42
42
|
* `loader.create({ name })` per manifest row, `loader.await()`, then
|
|
43
43
|
* {@link assertEntriesActive}. A row whose module cannot be imported is marked
|
|
44
|
-
* failed; the Loader logs its import error
|
|
44
|
+
* failed; the Loader logs its import error, the module system records it, and
|
|
45
|
+
* the audit rejects startup with that error text per entry.
|
|
45
46
|
* @param options - context, module system, manifest, optional progress sink.
|
|
46
47
|
* @returns resolves after every entry is active; rejects with the audit report otherwise.
|
|
47
48
|
*/
|
|
@@ -60,19 +61,22 @@ async function bootClient(options) {
|
|
|
60
61
|
await options.modules.entries.start(loader, manifest);
|
|
61
62
|
for (const entry of loader.entries()) if (entry.fiber === void 0) onEntryState?.(entry.options.name, "failed");
|
|
62
63
|
await loader.await();
|
|
63
|
-
assertEntriesActive(ctx);
|
|
64
|
+
assertEntriesActive(ctx, options.modules);
|
|
64
65
|
}
|
|
65
66
|
/**
|
|
66
67
|
* Reject entries that failed import/apply or still wait on missing services.
|
|
67
68
|
* @param ctx - root Context carrying the Loader.
|
|
69
|
+
* @param modules - the module system whose recorded import failures name why an entry
|
|
70
|
+
* has no fiber; a row with no record points at the console.
|
|
68
71
|
* @throws {Error} listing every non-active entry with its reason.
|
|
69
72
|
*/
|
|
70
|
-
function assertEntriesActive(ctx) {
|
|
73
|
+
function assertEntriesActive(ctx, modules) {
|
|
71
74
|
const failures = [];
|
|
72
75
|
for (const entry of ctx.loader.entries()) {
|
|
73
76
|
const name = entry.options.name;
|
|
74
77
|
if (entry.fiber === void 0) {
|
|
75
|
-
|
|
78
|
+
const importError = modules.importError(name);
|
|
79
|
+
failures.push(importError === void 0 ? `${name}: import failed (see console for the import error)` : `${name}: import failed: ${importError.message}`);
|
|
76
80
|
continue;
|
|
77
81
|
}
|
|
78
82
|
const state = STATE_LABELS[entry.fiber.state];
|
|
@@ -24,7 +24,8 @@ export interface ClientBootOptions {
|
|
|
24
24
|
* Compose the client: `ctx.plugin(Loader)`, `loader.internal = modules`, one
|
|
25
25
|
* `loader.create({ name })` per manifest row, `loader.await()`, then
|
|
26
26
|
* {@link assertEntriesActive}. A row whose module cannot be imported is marked
|
|
27
|
-
* failed; the Loader logs its import error
|
|
27
|
+
* failed; the Loader logs its import error, the module system records it, and
|
|
28
|
+
* the audit rejects startup with that error text per entry.
|
|
28
29
|
* @param options - context, module system, manifest, optional progress sink.
|
|
29
30
|
* @returns resolves after every entry is active; rejects with the audit report otherwise.
|
|
30
31
|
*/
|
|
@@ -32,7 +33,9 @@ export declare function bootClient(options: ClientBootOptions): Promise<void>;
|
|
|
32
33
|
/**
|
|
33
34
|
* Reject entries that failed import/apply or still wait on missing services.
|
|
34
35
|
* @param ctx - root Context carrying the Loader.
|
|
36
|
+
* @param modules - the module system whose recorded import failures name why an entry
|
|
37
|
+
* has no fiber; a row with no record points at the console.
|
|
35
38
|
* @throws {Error} listing every non-active entry with its reason.
|
|
36
39
|
*/
|
|
37
|
-
export declare function assertEntriesActive(ctx: Context): void;
|
|
40
|
+
export declare function assertEntriesActive(ctx: Context, modules: Pick<ClientModuleLoader, 'importError'>): void;
|
|
38
41
|
//# sourceMappingURL=boot-client.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-client-web",
|
|
3
3
|
"description": "Web boot kernel: static module table, Cordis loader, framework-free boot page, and UI-renderer handoff",
|
|
4
|
-
"version": "0.1.7-
|
|
4
|
+
"version": "0.1.7-rc.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -32,18 +32,18 @@
|
|
|
32
32
|
"react": "^18.2.0",
|
|
33
33
|
"react-dom": "^18.2.0",
|
|
34
34
|
"typescript": "^6.0.3",
|
|
35
|
-
"@deepseek-ai/
|
|
36
|
-
"@deepseek-ai/dsh-client-
|
|
37
|
-
"@deepseek-ai/dsh-client-
|
|
38
|
-
"@deepseek-ai/dsh-client-ui-
|
|
39
|
-
"@deepseek-ai/
|
|
40
|
-
"@deepseek-ai/
|
|
41
|
-
"@deepseek-ai/dsh-client-
|
|
42
|
-
"@deepseek-ai/
|
|
43
|
-
"@deepseek-ai/dsh-
|
|
35
|
+
"@deepseek-ai/cordis-plugin-loader": "~1.0.5",
|
|
36
|
+
"@deepseek-ai/dsh-client-modules": "0.1.7-rc.1",
|
|
37
|
+
"@deepseek-ai/dsh-client-store": "0.1.7-rc.1",
|
|
38
|
+
"@deepseek-ai/dsh-client-ui-dockkit": "0.1.7-rc.1",
|
|
39
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.1.7-rc.1",
|
|
40
|
+
"@deepseek-ai/dsh-client-ui-primitives": "0.1.7-rc.1",
|
|
41
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.1.7-rc.1",
|
|
42
|
+
"@deepseek-ai/cordis": "~4.0.4",
|
|
43
|
+
"@deepseek-ai/dsh-host-webserver": "0.1.7-rc.1"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"@deepseek-ai/cordis": "
|
|
46
|
+
"@deepseek-ai/cordis": "~4.0.4"
|
|
47
47
|
},
|
|
48
48
|
"files": [
|
|
49
49
|
"lib/index.js",
|