@vmz/vmz 0.0.2 → 0.0.4

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.
Files changed (83) hide show
  1. package/README.md +19 -13
  2. package/dist/application-cmd.d.ts +1 -2
  3. package/dist/application-cmd.js +9 -10
  4. package/dist/bundler-adapter.d.ts +2 -3
  5. package/dist/bundler-adapter.js +2 -3
  6. package/dist/cdn-policy.d.ts +178 -0
  7. package/dist/cdn-policy.js +344 -0
  8. package/dist/cli.d.ts +10 -2
  9. package/dist/cli.js +179 -16
  10. package/dist/content-addressed-assets.d.ts +69 -0
  11. package/dist/content-addressed-assets.js +206 -0
  12. package/dist/dev-session.d.ts +2 -2
  13. package/dist/dev-session.js +51 -16
  14. package/dist/document-build.js +1 -2
  15. package/dist/document-check.d.ts +1 -1
  16. package/dist/document-check.js +4 -4
  17. package/dist/document-cmd.d.ts +1 -2
  18. package/dist/document-cmd.js +2 -3
  19. package/dist/document-designs.js +31 -3
  20. package/dist/document-enrich.js +2 -3
  21. package/dist/document-evidence.d.ts +4 -4
  22. package/dist/document-evidence.js +20 -12
  23. package/dist/document-integrate.d.ts +0 -1
  24. package/dist/document-integrate.js +0 -1
  25. package/dist/document-interactive.d.ts +11 -11
  26. package/dist/document-interactive.js +12 -13
  27. package/dist/document-locale.d.ts +1 -1
  28. package/dist/document-locale.js +1 -1
  29. package/dist/document-markdown.d.ts +1 -2
  30. package/dist/document-markdown.js +13 -7
  31. package/dist/document-scan.d.ts +4 -4
  32. package/dist/document-scan.js +4 -4
  33. package/dist/document-schema.d.ts +28 -29
  34. package/dist/document-schema.js +28 -29
  35. package/dist/explain-cmd.js +3 -3
  36. package/dist/index.d.ts +349 -789
  37. package/dist/index.js +109 -85
  38. package/dist/invocation.d.ts +68 -0
  39. package/dist/invocation.js +169 -0
  40. package/dist/locale-check.d.ts +19 -3
  41. package/dist/locale-check.js +130 -6
  42. package/dist/locale-cmd.js +6 -7
  43. package/dist/locale-delivery.d.ts +38 -38
  44. package/dist/locale-delivery.js +39 -40
  45. package/dist/locale-router.d.ts +39 -40
  46. package/dist/locale-router.js +39 -40
  47. package/dist/locale-runtime.d.ts +39 -39
  48. package/dist/locale-runtime.js +44 -45
  49. package/dist/locale-schema.d.ts +1 -2
  50. package/dist/locale-schema.js +1 -2
  51. package/dist/locale-tooling.d.ts +13 -13
  52. package/dist/locale-tooling.js +14 -15
  53. package/dist/log.d.ts +1 -1
  54. package/dist/log.js +1 -1
  55. package/dist/packages.d.ts +1 -2
  56. package/dist/packages.js +1 -2
  57. package/dist/plugin-host.d.ts +11 -3
  58. package/dist/plugin-host.js +21 -5
  59. package/dist/port.d.ts +10 -0
  60. package/dist/port.js +46 -0
  61. package/dist/production-observability.d.ts +286 -0
  62. package/dist/production-observability.js +469 -0
  63. package/dist/production-test-pack.d.ts +158 -0
  64. package/dist/production-test-pack.js +452 -0
  65. package/dist/refactor-cmd.d.ts +1 -1
  66. package/dist/refactor-cmd.js +6 -6
  67. package/dist/release-cmd.d.ts +8 -0
  68. package/dist/release-cmd.js +126 -0
  69. package/dist/release-pack.d.ts +96 -0
  70. package/dist/release-pack.js +337 -0
  71. package/dist/resolve-native-cli.d.ts +14 -0
  72. package/dist/resolve-native-cli.js +84 -0
  73. package/dist/resolve.d.ts +1 -2
  74. package/dist/resolve.js +1 -2
  75. package/dist/site-delivery.d.ts +134 -0
  76. package/dist/site-delivery.js +345 -0
  77. package/dist/static-emit.d.ts +136 -0
  78. package/dist/static-emit.js +463 -0
  79. package/dist/test-cmd.d.ts +2 -2
  80. package/dist/test-cmd.js +37 -17
  81. package/dist/watch-diff.d.ts +1 -1
  82. package/dist/watch-diff.js +1 -1
  83. package/package.json +32 -17
@@ -1,51 +1,50 @@
1
1
  /**
2
- * Document D0 Contract — schema constants & diagnostic codes.
3
- * Design: 规划设计/vmz/19 §2.3 · D0
2
+ * Document contract — schema constants & diagnostic codes.
4
3
  *
5
4
  * Not a Doc IR: this is a filesystem/manifest projection only.
6
5
  */
7
6
  /** @typedef {{ pageKey: string, locale: string }} PageIdentity */
8
7
  /** @typedef {{
9
- * identity: PageIdentity,
10
- * sourcePath: string,
11
- * route?: string | null,
12
- * anchors?: string[],
8
+ * identity: PageIdentity,
9
+ * sourcePath: string,
10
+ * route?: string | null,
11
+ * anchors?: string[],
13
12
  * }} PageRecord */
14
13
  /** @typedef {{
15
- * id: string,
16
- * sourceRoot: string,
17
- * pageKeys: string[],
14
+ * id: string,
15
+ * sourceRoot: string,
16
+ * pageKeys: string[],
18
17
  * }} DocumentCollection */
19
18
  /** @typedef {{
20
- * collectionId: string,
21
- * routeBase: string,
22
- * mode: 'integrated' | 'standalone',
19
+ * collectionId: string,
20
+ * routeBase: string,
21
+ * mode: 'integrated' | 'standalone',
23
22
  * }} DocumentMount */
24
23
  /** @typedef {{
25
- * code: string,
26
- * severity: 'error' | 'warning',
27
- * message: string,
28
- * path?: string,
24
+ * code: string,
25
+ * severity: 'error' | 'warning',
26
+ * message: string,
27
+ * path?: string,
29
28
  * }} DocumentDiagnostic */
30
29
  /** @typedef {{
31
- * schema: typeof DOCUMENT_MANIFEST_SCHEMA,
32
- * root: string,
33
- * defaultLocale: string | null,
34
- * locales: string[],
35
- * localeLabels: Record<string, string>,
36
- * collections: DocumentCollection[],
37
- * mounts: DocumentMount[],
38
- * pages: PageRecord[],
39
- * diagnostics: DocumentDiagnostic[],
30
+ * schema: typeof DOCUMENT_MANIFEST_SCHEMA,
31
+ * root: string,
32
+ * defaultLocale: string | null,
33
+ * locales: string[],
34
+ * localeLabels: Record<string, string>,
35
+ * collections: DocumentCollection[],
36
+ * mounts: DocumentMount[],
37
+ * pages: PageRecord[],
38
+ * diagnostics: DocumentDiagnostic[],
40
39
  * }} DocumentManifest */
41
40
  export declare const DOCUMENT_MANIFEST_SCHEMA = "vmz.document.manifest.v0";
42
- /** Static page view fragment (D1) — not a Doc IR. */
41
+ /** Static page view fragment — not a Doc IR. */
43
42
  export declare const DOCUMENT_VIEW_SCHEMA = "vmz.document.view.v0";
44
- /** D2 evidence projection (fences + API refs) — not a Doc IR. */
43
+ /** Evidence projection (fences + API refs) — not a Doc IR. */
45
44
  export declare const DOCUMENT_EVIDENCE_SCHEMA = "vmz.document.evidence.v0";
46
- /** D3 search index (SearchRecord[]) — not a Doc IR. */
45
+ /** Search index (SearchRecord[]) — not a Doc IR. */
47
46
  export declare const DOCUMENT_SEARCH_SCHEMA = "vmz.document.search.v0";
48
- /** D3 island-only resume plan for search/playground — not a Doc IR. */
47
+ /** Island-only resume plan for search/playground — not a Doc IR. */
49
48
  export declare const DOCUMENT_ISLANDS_SCHEMA = "vmz.document.islands.v0";
50
49
  /** Top-level non-locale reserved names under /documents */
51
50
  export declare const DOCUMENT_RESERVED_TOP: Set<string>;
@@ -1,52 +1,51 @@
1
1
  // @ts-nocheck
2
2
  /**
3
- * Document D0 Contract — schema constants & diagnostic codes.
4
- * Design: 规划设计/vmz/19 §2.3 · D0
3
+ * Document contract — schema constants & diagnostic codes.
5
4
  *
6
5
  * Not a Doc IR: this is a filesystem/manifest projection only.
7
6
  */
8
7
  /** @typedef {{ pageKey: string, locale: string }} PageIdentity */
9
8
  /** @typedef {{
10
- * identity: PageIdentity,
11
- * sourcePath: string,
12
- * route?: string | null,
13
- * anchors?: string[],
9
+ * identity: PageIdentity,
10
+ * sourcePath: string,
11
+ * route?: string | null,
12
+ * anchors?: string[],
14
13
  * }} PageRecord */
15
14
  /** @typedef {{
16
- * id: string,
17
- * sourceRoot: string,
18
- * pageKeys: string[],
15
+ * id: string,
16
+ * sourceRoot: string,
17
+ * pageKeys: string[],
19
18
  * }} DocumentCollection */
20
19
  /** @typedef {{
21
- * collectionId: string,
22
- * routeBase: string,
23
- * mode: 'integrated' | 'standalone',
20
+ * collectionId: string,
21
+ * routeBase: string,
22
+ * mode: 'integrated' | 'standalone',
24
23
  * }} DocumentMount */
25
24
  /** @typedef {{
26
- * code: string,
27
- * severity: 'error' | 'warning',
28
- * message: string,
29
- * path?: string,
25
+ * code: string,
26
+ * severity: 'error' | 'warning',
27
+ * message: string,
28
+ * path?: string,
30
29
  * }} DocumentDiagnostic */
31
30
  /** @typedef {{
32
- * schema: typeof DOCUMENT_MANIFEST_SCHEMA,
33
- * root: string,
34
- * defaultLocale: string | null,
35
- * locales: string[],
36
- * localeLabels: Record<string, string>,
37
- * collections: DocumentCollection[],
38
- * mounts: DocumentMount[],
39
- * pages: PageRecord[],
40
- * diagnostics: DocumentDiagnostic[],
31
+ * schema: typeof DOCUMENT_MANIFEST_SCHEMA,
32
+ * root: string,
33
+ * defaultLocale: string | null,
34
+ * locales: string[],
35
+ * localeLabels: Record<string, string>,
36
+ * collections: DocumentCollection[],
37
+ * mounts: DocumentMount[],
38
+ * pages: PageRecord[],
39
+ * diagnostics: DocumentDiagnostic[],
41
40
  * }} DocumentManifest */
42
41
  export const DOCUMENT_MANIFEST_SCHEMA = 'vmz.document.manifest.v0';
43
- /** Static page view fragment (D1) — not a Doc IR. */
42
+ /** Static page view fragment — not a Doc IR. */
44
43
  export const DOCUMENT_VIEW_SCHEMA = 'vmz.document.view.v0';
45
- /** D2 evidence projection (fences + API refs) — not a Doc IR. */
44
+ /** Evidence projection (fences + API refs) — not a Doc IR. */
46
45
  export const DOCUMENT_EVIDENCE_SCHEMA = 'vmz.document.evidence.v0';
47
- /** D3 search index (SearchRecord[]) — not a Doc IR. */
46
+ /** Search index (SearchRecord[]) — not a Doc IR. */
48
47
  export const DOCUMENT_SEARCH_SCHEMA = 'vmz.document.search.v0';
49
- /** D3 island-only resume plan for search/playground — not a Doc IR. */
48
+ /** Island-only resume plan for search/playground — not a Doc IR. */
50
49
  export const DOCUMENT_ISLANDS_SCHEMA = 'vmz.document.islands.v0';
51
50
  /** Top-level non-locale reserved names under /documents */
52
51
  export const DOCUMENT_RESERVED_TOP = new Set(['package.json', 'documents.config.ts', 'documents.config.json', 'documents.config.js', 'public']);
@@ -1,6 +1,6 @@
1
1
  // @ts-nocheck
2
2
  /**
3
- * `vmz explain` — DX causal explain queries (doc 21).
3
+ * `vmz explain` — DX causal explain queries .
4
4
  *
5
5
  * @param {string[]} argv args after `explain`
6
6
  */
@@ -69,10 +69,10 @@ export function cmdExplain(argv) {
69
69
  for (const e of chain) {
70
70
  const from = e.from ? `${e.from.kind}:${e.from.id}` : '?';
71
71
  const to = e.to ? `${e.to.kind}:${e.to.id}` : '?';
72
- console.log(` ${from} -> ${to} (${e.reason})`);
72
+ console.log(` ${from} -> ${to} (${e.reason})`);
73
73
  }
74
74
  if (chain.length === 0) {
75
- console.log(' (empty chain)');
75
+ console.log(' (empty chain)');
76
76
  }
77
77
  return 0;
78
78
  }