@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.
- package/README.md +19 -13
- package/dist/application-cmd.d.ts +1 -2
- package/dist/application-cmd.js +9 -10
- package/dist/bundler-adapter.d.ts +2 -3
- package/dist/bundler-adapter.js +2 -3
- package/dist/cdn-policy.d.ts +178 -0
- package/dist/cdn-policy.js +344 -0
- package/dist/cli.d.ts +10 -2
- package/dist/cli.js +179 -16
- package/dist/content-addressed-assets.d.ts +69 -0
- package/dist/content-addressed-assets.js +206 -0
- package/dist/dev-session.d.ts +2 -2
- package/dist/dev-session.js +51 -16
- package/dist/document-build.js +1 -2
- package/dist/document-check.d.ts +1 -1
- package/dist/document-check.js +4 -4
- package/dist/document-cmd.d.ts +1 -2
- package/dist/document-cmd.js +2 -3
- package/dist/document-designs.js +31 -3
- package/dist/document-enrich.js +2 -3
- package/dist/document-evidence.d.ts +4 -4
- package/dist/document-evidence.js +20 -12
- package/dist/document-integrate.d.ts +0 -1
- package/dist/document-integrate.js +0 -1
- package/dist/document-interactive.d.ts +11 -11
- package/dist/document-interactive.js +12 -13
- package/dist/document-locale.d.ts +1 -1
- package/dist/document-locale.js +1 -1
- package/dist/document-markdown.d.ts +1 -2
- package/dist/document-markdown.js +13 -7
- package/dist/document-scan.d.ts +4 -4
- package/dist/document-scan.js +4 -4
- package/dist/document-schema.d.ts +28 -29
- package/dist/document-schema.js +28 -29
- package/dist/explain-cmd.js +3 -3
- package/dist/index.d.ts +349 -789
- package/dist/index.js +109 -85
- package/dist/invocation.d.ts +68 -0
- package/dist/invocation.js +169 -0
- package/dist/locale-check.d.ts +19 -3
- package/dist/locale-check.js +130 -6
- package/dist/locale-cmd.js +6 -7
- package/dist/locale-delivery.d.ts +38 -38
- package/dist/locale-delivery.js +39 -40
- package/dist/locale-router.d.ts +39 -40
- package/dist/locale-router.js +39 -40
- package/dist/locale-runtime.d.ts +39 -39
- package/dist/locale-runtime.js +44 -45
- package/dist/locale-schema.d.ts +1 -2
- package/dist/locale-schema.js +1 -2
- package/dist/locale-tooling.d.ts +13 -13
- package/dist/locale-tooling.js +14 -15
- package/dist/log.d.ts +1 -1
- package/dist/log.js +1 -1
- package/dist/packages.d.ts +1 -2
- package/dist/packages.js +1 -2
- package/dist/plugin-host.d.ts +11 -3
- package/dist/plugin-host.js +21 -5
- package/dist/port.d.ts +10 -0
- package/dist/port.js +46 -0
- package/dist/production-observability.d.ts +286 -0
- package/dist/production-observability.js +469 -0
- package/dist/production-test-pack.d.ts +158 -0
- package/dist/production-test-pack.js +452 -0
- package/dist/refactor-cmd.d.ts +1 -1
- package/dist/refactor-cmd.js +6 -6
- package/dist/release-cmd.d.ts +8 -0
- package/dist/release-cmd.js +126 -0
- package/dist/release-pack.d.ts +96 -0
- package/dist/release-pack.js +337 -0
- package/dist/resolve-native-cli.d.ts +14 -0
- package/dist/resolve-native-cli.js +84 -0
- package/dist/resolve.d.ts +1 -2
- package/dist/resolve.js +1 -2
- package/dist/site-delivery.d.ts +134 -0
- package/dist/site-delivery.js +345 -0
- package/dist/static-emit.d.ts +136 -0
- package/dist/static-emit.js +463 -0
- package/dist/test-cmd.d.ts +2 -2
- package/dist/test-cmd.js +37 -17
- package/dist/watch-diff.d.ts +1 -1
- package/dist/watch-diff.js +1 -1
- package/package.json +32 -17
|
@@ -1,51 +1,50 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Document
|
|
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
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
8
|
+
* identity: PageIdentity,
|
|
9
|
+
* sourcePath: string,
|
|
10
|
+
* route?: string | null,
|
|
11
|
+
* anchors?: string[],
|
|
13
12
|
* }} PageRecord */
|
|
14
13
|
/** @typedef {{
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
14
|
+
* id: string,
|
|
15
|
+
* sourceRoot: string,
|
|
16
|
+
* pageKeys: string[],
|
|
18
17
|
* }} DocumentCollection */
|
|
19
18
|
/** @typedef {{
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
19
|
+
* collectionId: string,
|
|
20
|
+
* routeBase: string,
|
|
21
|
+
* mode: 'integrated' | 'standalone',
|
|
23
22
|
* }} DocumentMount */
|
|
24
23
|
/** @typedef {{
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
24
|
+
* code: string,
|
|
25
|
+
* severity: 'error' | 'warning',
|
|
26
|
+
* message: string,
|
|
27
|
+
* path?: string,
|
|
29
28
|
* }} DocumentDiagnostic */
|
|
30
29
|
/** @typedef {{
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
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
|
|
41
|
+
/** Static page view fragment — not a Doc IR. */
|
|
43
42
|
export declare const DOCUMENT_VIEW_SCHEMA = "vmz.document.view.v0";
|
|
44
|
-
/**
|
|
43
|
+
/** Evidence projection (fences + API refs) — not a Doc IR. */
|
|
45
44
|
export declare const DOCUMENT_EVIDENCE_SCHEMA = "vmz.document.evidence.v0";
|
|
46
|
-
/**
|
|
45
|
+
/** Search index (SearchRecord[]) — not a Doc IR. */
|
|
47
46
|
export declare const DOCUMENT_SEARCH_SCHEMA = "vmz.document.search.v0";
|
|
48
|
-
/**
|
|
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>;
|
package/dist/document-schema.js
CHANGED
|
@@ -1,52 +1,51 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
/**
|
|
3
|
-
* Document
|
|
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
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
9
|
+
* identity: PageIdentity,
|
|
10
|
+
* sourcePath: string,
|
|
11
|
+
* route?: string | null,
|
|
12
|
+
* anchors?: string[],
|
|
14
13
|
* }} PageRecord */
|
|
15
14
|
/** @typedef {{
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
15
|
+
* id: string,
|
|
16
|
+
* sourceRoot: string,
|
|
17
|
+
* pageKeys: string[],
|
|
19
18
|
* }} DocumentCollection */
|
|
20
19
|
/** @typedef {{
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
20
|
+
* collectionId: string,
|
|
21
|
+
* routeBase: string,
|
|
22
|
+
* mode: 'integrated' | 'standalone',
|
|
24
23
|
* }} DocumentMount */
|
|
25
24
|
/** @typedef {{
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
25
|
+
* code: string,
|
|
26
|
+
* severity: 'error' | 'warning',
|
|
27
|
+
* message: string,
|
|
28
|
+
* path?: string,
|
|
30
29
|
* }} DocumentDiagnostic */
|
|
31
30
|
/** @typedef {{
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
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
|
|
42
|
+
/** Static page view fragment — not a Doc IR. */
|
|
44
43
|
export const DOCUMENT_VIEW_SCHEMA = 'vmz.document.view.v0';
|
|
45
|
-
/**
|
|
44
|
+
/** Evidence projection (fences + API refs) — not a Doc IR. */
|
|
46
45
|
export const DOCUMENT_EVIDENCE_SCHEMA = 'vmz.document.evidence.v0';
|
|
47
|
-
/**
|
|
46
|
+
/** Search index (SearchRecord[]) — not a Doc IR. */
|
|
48
47
|
export const DOCUMENT_SEARCH_SCHEMA = 'vmz.document.search.v0';
|
|
49
|
-
/**
|
|
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']);
|
package/dist/explain-cmd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
/**
|
|
3
|
-
* `vmz explain` — DX causal explain queries
|
|
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(`
|
|
72
|
+
console.log(` ${from} -> ${to} (${e.reason})`);
|
|
73
73
|
}
|
|
74
74
|
if (chain.length === 0) {
|
|
75
|
-
console.log('
|
|
75
|
+
console.log(' (empty chain)');
|
|
76
76
|
}
|
|
77
77
|
return 0;
|
|
78
78
|
}
|