@jskit-ai/shell-web 0.1.117 → 0.1.119

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.
@@ -1,7 +1,7 @@
1
1
  export default Object.freeze({
2
2
  packageVersion: 1,
3
3
  packageId: "@jskit-ai/shell-web",
4
- version: "0.1.117",
4
+ version: "0.1.119",
5
5
  kind: "runtime",
6
6
  description: "Web shell layout runtime with outlet-based placement contributions.",
7
7
  dependsOn: [],
@@ -30,6 +30,10 @@ export default Object.freeze({
30
30
  metadata: {
31
31
  client: {
32
32
  optimizeDeps: {
33
+ include: [
34
+ "@jskit-ai/shell-web/client/placement",
35
+ "@jskit-ai/shell-web/client/error"
36
+ ],
33
37
  exclude: [
34
38
  "@jskit-ai/shell-web/client"
35
39
  ]
@@ -307,7 +311,7 @@ export default Object.freeze({
307
311
  dependencies: {
308
312
  runtime: {
309
313
  "@mdi/js": "^7.4.47",
310
- "@jskit-ai/kernel": "0.1.119"
314
+ "@jskit-ai/kernel": "0.1.120"
311
315
  },
312
316
  dev: {}
313
317
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jskit-ai/shell-web",
3
- "version": "0.1.117",
3
+ "version": "0.1.119",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "test": "node --test"
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@mdi/js": "^7.4.47",
31
- "@jskit-ai/kernel": "0.1.119"
31
+ "@jskit-ai/kernel": "0.1.120"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "pinia": "^3.0.4",
@@ -38,6 +38,13 @@ function readTopology(id = "", owner = "") {
38
38
  : [];
39
39
  }
40
40
 
41
+ function readPackageImportSpecifiers(source = "") {
42
+ return Array.from(
43
+ String(source || "").matchAll(/\bfrom\s+["'](@jskit-ai\/[^"']+)["']/gu),
44
+ (match) => match[1]
45
+ );
46
+ }
47
+
41
48
  function readClientContainerTokens() {
42
49
  const tokens = descriptor?.metadata?.apiSummary?.containerTokens?.client;
43
50
  return Array.isArray(tokens) ? tokens : [];
@@ -315,11 +322,43 @@ test("shell-web placement topology seeds global actions as a semantic shell plac
315
322
  assert.match(source, /outlet: "shell-layout:supporting-side-panel"/);
316
323
  });
317
324
 
318
- test("shell-web descriptor metadata advertises adaptive shell outlets, default links, and installs the scaffold page", () => {
325
+ test("shell-web descriptor pre-optimizes package subpaths reached only through dynamic base-shell modules", async () => {
326
+ const [providerSource, placementSource, placementTopologySource, errorSource] = await Promise.all([
327
+ readFile(path.join(PACKAGE_DIR, "src", "client", "providers", "ShellWebClientProvider.js"), "utf8"),
328
+ readFile(path.join(PACKAGE_DIR, "templates", "src", "placement.js"), "utf8"),
329
+ readFile(path.join(PACKAGE_DIR, "templates", "src", "placementTopology.js"), "utf8"),
330
+ readFile(path.join(PACKAGE_DIR, "templates", "src", "error.js"), "utf8")
331
+ ]);
332
+
333
+ assert.deepEqual(
334
+ Array.from(
335
+ new Set(
336
+ Array.from(
337
+ providerSource.matchAll(/\bimport\(["'](\/src\/[^"']+)["']\)/gu),
338
+ (match) => match[1]
339
+ )
340
+ )
341
+ ),
342
+ ["/src/placement.js", "/src/placementTopology.js", "/src/error.js"]
343
+ );
344
+ assert.deepEqual(readPackageImportSpecifiers(placementSource), [
345
+ "@jskit-ai/shell-web/client/placement"
346
+ ]);
347
+ assert.deepEqual(readPackageImportSpecifiers(placementTopologySource), []);
348
+ assert.deepEqual(readPackageImportSpecifiers(errorSource), [
349
+ "@jskit-ai/shell-web/client/error"
350
+ ]);
351
+
352
+ assert.deepEqual(descriptor?.metadata?.client?.optimizeDeps?.include, [
353
+ "@jskit-ai/shell-web/client/placement",
354
+ "@jskit-ai/shell-web/client/error"
355
+ ]);
319
356
  assert.deepEqual(descriptor?.metadata?.client?.optimizeDeps?.exclude, [
320
357
  "@jskit-ai/shell-web/client"
321
358
  ]);
359
+ });
322
360
 
361
+ test("shell-web descriptor metadata advertises adaptive shell outlets, default links, and installs the scaffold page", () => {
323
362
  assert.deepEqual(readClientContainerTokens(), [
324
363
  "runtime.web-placement.client",
325
364
  "runtime.web-bootstrap.client",