@vmz/vmz 0.1.16 → 0.1.18

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 (131) hide show
  1. package/dist/application-cmd.d.ts +6 -16
  2. package/dist/application-cmd.js +34 -180
  3. package/dist/author-input.d.ts +40 -19
  4. package/dist/author-input.js +2 -16
  5. package/dist/build-assemble.d.ts +63 -41
  6. package/dist/build-assemble.js +42 -43
  7. package/dist/bundler-adapter.d.ts +46 -48
  8. package/dist/bundler-adapter.js +4 -43
  9. package/dist/cdn-policy.d.ts +77 -93
  10. package/dist/cdn-policy.js +10 -16
  11. package/dist/cli-localize.d.ts +34 -0
  12. package/dist/cli-localize.js +58 -0
  13. package/dist/cli.d.ts +8 -19
  14. package/dist/cli.js +69 -252
  15. package/dist/content-addressed-assets.d.ts +24 -10
  16. package/dist/content-addressed-assets.js +2 -7
  17. package/dist/delivery-profile.d.ts +54 -27
  18. package/dist/delivery-profile.js +15 -13
  19. package/dist/dev-session.d.ts +29 -23
  20. package/dist/dev-session.js +0 -21
  21. package/dist/dev-watch-roots.d.ts +34 -25
  22. package/dist/dev-watch-roots.js +0 -31
  23. package/dist/document-build.d.ts +22 -97
  24. package/dist/document-build.js +4 -19
  25. package/dist/document-check.d.ts +30 -53
  26. package/dist/document-check.js +14 -29
  27. package/dist/document-cmd.d.ts +3 -6
  28. package/dist/document-cmd.js +19 -79
  29. package/dist/document-designs.d.ts +5 -8
  30. package/dist/document-designs.js +2 -15
  31. package/dist/document-enrich.d.ts +52 -24
  32. package/dist/document-enrich.js +4 -32
  33. package/dist/document-evidence.d.ts +46 -43
  34. package/dist/document-evidence.js +6 -47
  35. package/dist/document-integrate.d.ts +13 -29
  36. package/dist/document-integrate.js +2 -13
  37. package/dist/document-interactive.d.ts +45 -67
  38. package/dist/document-interactive.js +9 -50
  39. package/dist/document-layout-render.d.ts +7 -16
  40. package/dist/document-layout-render.js +0 -17
  41. package/dist/document-locale.d.ts +12 -25
  42. package/dist/document-locale.js +3 -14
  43. package/dist/document-markdown.d.ts +9 -5
  44. package/dist/document-markdown.js +0 -4
  45. package/dist/document-routing-config.d.ts +7 -14
  46. package/dist/document-routing-config.js +0 -9
  47. package/dist/document-scan.d.ts +14 -18
  48. package/dist/document-scan.js +2 -23
  49. package/dist/document-schema.d.ts +154 -41
  50. package/dist/document-schema.js +0 -35
  51. package/dist/embedded-packaging.d.ts +20 -8
  52. package/dist/embedded-packaging.js +0 -1
  53. package/dist/explain-cmd.d.ts +4 -3
  54. package/dist/explain-cmd.js +16 -65
  55. package/dist/index.d.ts +70 -143
  56. package/dist/index.js +16 -136
  57. package/dist/invocation.d.ts +29 -50
  58. package/dist/invocation.js +11 -57
  59. package/dist/locale-check.d.ts +69 -70
  60. package/dist/locale-check.js +5 -66
  61. package/dist/locale-cmd.d.ts +2 -5
  62. package/dist/locale-cmd.js +62 -142
  63. package/dist/locale-delivery.d.ts +294 -191
  64. package/dist/locale-delivery.js +8 -94
  65. package/dist/locale-route-emit.d.ts +23 -9
  66. package/dist/locale-route-emit.js +0 -7
  67. package/dist/locale-router.d.ts +189 -162
  68. package/dist/locale-router.js +13 -122
  69. package/dist/locale-runtime.d.ts +292 -262
  70. package/dist/locale-runtime.js +8 -102
  71. package/dist/locale-schema.js +0 -1
  72. package/dist/locale-tooling.d.ts +100 -63
  73. package/dist/locale-tooling.js +7 -45
  74. package/dist/log.d.ts +22 -15
  75. package/dist/log.js +24 -21
  76. package/dist/native-addon.d.ts +10 -9
  77. package/dist/native-addon.js +1 -10
  78. package/dist/pack-client-packages.d.ts +5 -1
  79. package/dist/pack-client-packages.js +0 -6
  80. package/dist/pack.d.ts +17 -15
  81. package/dist/pack.js +0 -12
  82. package/dist/packages.d.ts +10 -23
  83. package/dist/packages.js +1 -37
  84. package/dist/plan-cmd.d.ts +6 -0
  85. package/dist/plan-cmd.js +35 -0
  86. package/dist/plugin-host.js +0 -1
  87. package/dist/port.d.ts +2 -10
  88. package/dist/port.js +2 -11
  89. package/dist/pretty-json.d.ts +9 -19
  90. package/dist/pretty-json.js +3 -17
  91. package/dist/production-observability.d.ts +37 -181
  92. package/dist/production-observability.js +1 -9
  93. package/dist/production-test-pack.d.ts +17 -3
  94. package/dist/production-test-pack.js +0 -2
  95. package/dist/public-static-assets.d.ts +6 -1
  96. package/dist/public-static-assets.js +0 -5
  97. package/dist/refactor-cmd.d.ts +3 -6
  98. package/dist/refactor-cmd.js +16 -69
  99. package/dist/release-cmd.d.ts +7 -6
  100. package/dist/release-cmd.js +17 -59
  101. package/dist/release-pack.d.ts +7 -3
  102. package/dist/release-pack.js +0 -6
  103. package/dist/resolve.d.ts +15 -19
  104. package/dist/resolve.js +1 -15
  105. package/dist/server-artifact.d.ts +30 -75
  106. package/dist/server-artifact.js +0 -10
  107. package/dist/server-language-backend.d.ts +22 -79
  108. package/dist/server-language-backend.js +0 -26
  109. package/dist/site-delivery.d.ts +46 -59
  110. package/dist/site-delivery.js +3 -8
  111. package/dist/site-favicon.d.ts +6 -1
  112. package/dist/site-favicon.js +0 -5
  113. package/dist/static-emit.d.ts +73 -103
  114. package/dist/static-emit.js +1 -26
  115. package/dist/test-cmd.d.ts +3 -5
  116. package/dist/test-cmd.js +15 -25
  117. package/dist/test-compile.js +0 -1
  118. package/dist/test-discover.js +0 -1
  119. package/dist/test-logic.js +0 -1
  120. package/dist/test-protocol.js +0 -1
  121. package/dist/toolchain-dx.d.ts +11 -0
  122. package/dist/toolchain-dx.js +10 -0
  123. package/dist/watch-diff.d.ts +4 -13
  124. package/dist/watch-diff.js +0 -17
  125. package/dist/wechat-packaging.d.ts +8 -7
  126. package/dist/wechat-packaging.js +0 -6
  127. package/locales/en-US/cli.json +105 -0
  128. package/locales/locales.json +4 -0
  129. package/package.json +15 -12
  130. package/dist/resolve-native-cli.d.ts +0 -14
  131. package/dist/resolve-native-cli.js +0 -84
@@ -3,64 +3,51 @@
3
3
  * Reuses the same Direct SSR path as serve-host (no second SSG runtime).
4
4
  */
5
5
  export declare const STATIC_DELIVERY_MANIFEST_SCHEMA = "vmz.static.delivery_manifest.v0";
6
- /**
7
- * @param {string} distDir
8
- * @param {{
9
- * origin?: string,
10
- * applicationId?: string,
11
- * staticParams?: Record<string, Array<Record<string, string>>>,
12
- * }} [opts]
13
- */
14
- export declare function emitWebStatic(distDir: any, opts?: {}): Promise<{
15
- manifest: {
16
- schema: string;
17
- applicationId: any;
18
- deliveryProfile: string;
19
- origin: string;
20
- generatedAt: string;
21
- spaFallback: boolean;
22
- errorDocuments: {
23
- status: number;
24
- path: string;
25
- }[];
26
- routes: {
27
- routeId: any;
28
- path: any;
29
- chunkId: any;
30
- htmlPath: any;
31
- classification: any;
32
- localeId: any;
33
- seo: {
34
- title: any;
35
- description: any;
36
- canonical: any;
37
- robots: any;
38
- alternates: any;
39
- };
40
- }[];
41
- skipped: any[];
42
- seoArtifacts: {
43
- sitemap: string;
44
- robots: string;
45
- };
46
- publicAssets: {
47
- schema: string;
48
- status: string;
49
- fileCount: number;
50
- source: any;
51
- };
6
+ export type EmitWebStaticOpts = {
7
+ origin?: string;
8
+ applicationId?: string;
9
+ staticParams?: Record<string, Array<Record<string, string>>>;
10
+ projectRoot?: string;
11
+ };
12
+ type StaticDeliveryManifest = {
13
+ schema: string;
14
+ applicationId: unknown;
15
+ deliveryProfile: string;
16
+ origin: string;
17
+ generatedAt: string;
18
+ spaFallback: boolean;
19
+ errorDocuments: Array<{
20
+ status: number;
21
+ path: string;
22
+ }>;
23
+ routes: unknown[];
24
+ skipped: unknown[];
25
+ seoArtifacts: {
26
+ sitemap: string;
27
+ robots: string;
52
28
  };
53
- htmlFiles: any[];
54
- skipped: any[];
55
- digest: any;
56
- assets: {
57
- schema: string;
58
- layout: string;
59
- immutable: boolean;
60
- objectCount: number;
61
- objects: any[];
62
- rewrittenHtml: number;
29
+ publicAssets: {
30
+ schema: unknown;
31
+ status: unknown;
32
+ fileCount: number;
33
+ source: string | null;
63
34
  };
35
+ manifestDigest?: string;
36
+ contentAddressedAssets?: Record<string, unknown>;
37
+ cdnPolicy?: unknown;
38
+ };
39
+ export declare function emitWebStatic(distDir: string, opts?: EmitWebStaticOpts): Promise<{
40
+ manifest: StaticDeliveryManifest;
41
+ htmlFiles: string[];
42
+ skipped: {
43
+ routeId: string;
44
+ path: string;
45
+ chunkId: string;
46
+ classification: string;
47
+ reason: string;
48
+ }[];
49
+ digest: string;
50
+ assets: import("./content-addressed-assets.js").ContentAddressedAssetsManifest;
64
51
  publicAssets: {
65
52
  schema: string;
66
53
  status: string;
@@ -76,47 +63,20 @@ export declare function emitWebStatic(distDir: any, opts?: {}): Promise<{
76
63
  files: any[];
77
64
  skippedConflicts: any[];
78
65
  };
79
- cdnPolicy: {
80
- schema: string;
81
- applicationId: any;
82
- deliveryProfile: string;
83
- origin: string;
84
- spaFallback: boolean;
85
- staticManifestDigest: any;
86
- redirects: any[];
87
- headers: ({
88
- match: string;
89
- headers: {
90
- 'cache-control': string;
91
- 'x-robots-tag'?: undefined;
92
- };
93
- } | {
94
- match: string;
95
- headers: {
96
- 'cache-control': string;
97
- 'x-robots-tag': string;
98
- };
99
- })[];
100
- errorDocuments: any;
101
- routes: any[];
102
- localeCache: {
103
- strategy: string;
104
- varyAcceptLanguage: boolean;
105
- defaultLocale: any;
106
- routeCount: number;
107
- locales: any[];
108
- };
109
- };
66
+ cdnPolicy: import("./cdn-policy.js").CdnPolicyManifest;
110
67
  cdnAdapters: {
111
68
  'local-static': {
112
69
  schema: string;
113
70
  adapterId: string;
114
- policyDigest: any;
71
+ policyDigest: string;
115
72
  host: string;
116
73
  spaFallback: boolean;
117
- redirects: any;
118
- headers: any;
119
- errorDocuments: any;
74
+ redirects: import("./cdn-policy.js").CdnRedirect[];
75
+ headers: {
76
+ match: string;
77
+ headers: Record<string, string | undefined>;
78
+ }[];
79
+ errorDocuments: unknown[];
120
80
  files: {
121
81
  _headers?: undefined;
122
82
  _redirects?: undefined;
@@ -124,12 +84,15 @@ export declare function emitWebStatic(distDir: any, opts?: {}): Promise<{
124
84
  } | {
125
85
  schema: string;
126
86
  adapterId: string;
127
- policyDigest: any;
87
+ policyDigest: string;
128
88
  host: string;
129
89
  spaFallback: boolean;
130
- redirects: any;
131
- headers: any;
132
- errorDocuments: any;
90
+ redirects: import("./cdn-policy.js").CdnRedirect[];
91
+ headers: {
92
+ match: string;
93
+ headers: Record<string, string | undefined>;
94
+ }[];
95
+ errorDocuments: unknown[];
133
96
  files: {
134
97
  _headers: string;
135
98
  _redirects: string;
@@ -138,12 +101,15 @@ export declare function emitWebStatic(distDir: any, opts?: {}): Promise<{
138
101
  netlify: {
139
102
  schema: string;
140
103
  adapterId: string;
141
- policyDigest: any;
104
+ policyDigest: string;
142
105
  host: string;
143
106
  spaFallback: boolean;
144
- redirects: any;
145
- headers: any;
146
- errorDocuments: any;
107
+ redirects: import("./cdn-policy.js").CdnRedirect[];
108
+ headers: {
109
+ match: string;
110
+ headers: Record<string, string | undefined>;
111
+ }[];
112
+ errorDocuments: unknown[];
147
113
  files: {
148
114
  _headers?: undefined;
149
115
  _redirects?: undefined;
@@ -151,12 +117,15 @@ export declare function emitWebStatic(distDir: any, opts?: {}): Promise<{
151
117
  } | {
152
118
  schema: string;
153
119
  adapterId: string;
154
- policyDigest: any;
120
+ policyDigest: string;
155
121
  host: string;
156
122
  spaFallback: boolean;
157
- redirects: any;
158
- headers: any;
159
- errorDocuments: any;
123
+ redirects: import("./cdn-policy.js").CdnRedirect[];
124
+ headers: {
125
+ match: string;
126
+ headers: Record<string, string | undefined>;
127
+ }[];
128
+ errorDocuments: unknown[];
160
129
  files: {
161
130
  _headers: string;
162
131
  _redirects: string;
@@ -164,3 +133,4 @@ export declare function emitWebStatic(distDir: any, opts?: {}): Promise<{
164
133
  };
165
134
  };
166
135
  }>;
136
+ export {};
@@ -2,7 +2,6 @@
2
2
  * A3-static: emit per-route HTML + 404 + SEO head + StaticDeliveryManifest.
3
3
  * Reuses the same Direct SSR path as serve-host (no second SSG runtime).
4
4
  */
5
- // @ts-nocheck
6
5
  import crypto from 'node:crypto';
7
6
  import fs from 'node:fs';
8
7
  import path from 'node:path';
@@ -19,14 +18,6 @@ import { emitPublicStaticAssets } from './public-static-assets.js';
19
18
  import { filePathPatternFromChunk, isRouteBoundaryStem, listPublicPageUnits, parsePathPattern, unitBrowserPathPattern } from './route-path.js';
20
19
  import { emitSiteFavicon, readSiteFaviconHeadHtml } from './site-favicon.js';
21
20
  export const STATIC_DELIVERY_MANIFEST_SCHEMA = 'vmz.static.delivery_manifest.v0';
22
- /**
23
- * @param {string} distDir
24
- * @param {{
25
- * origin?: string,
26
- * applicationId?: string,
27
- * staticParams?: Record<string, Array<Record<string, string>>>,
28
- * }} [opts]
29
- */
30
21
  export async function emitWebStatic(distDir, opts = {}) {
31
22
  const origin = String(opts.origin || process.env.VMZ_SITE_ORIGIN || 'https://example.test').replace(/\/$/, '');
32
23
  const applicationId = opts.applicationId || path.basename(path.dirname(distDir));
@@ -40,19 +31,7 @@ export async function emitWebStatic(distDir, opts = {}) {
40
31
  const host = await createRenderHost(distDir, { strictDeployment: true, preload: 'none' });
41
32
  const { renderToString, renderToStream } = host;
42
33
  const pageCatalog = listPageClientFiles(distDir);
43
- /** @type {Array<{
44
- * routeId: string,
45
- * path: string,
46
- * chunkId: string,
47
- * htmlPath: string,
48
- * classification: string,
49
- * title: string,
50
- * description: string,
51
- * canonical: string,
52
- * robots: string,
53
- * }>} */
54
34
  const generations = [];
55
- /** @type {Array<{ routeId: string, path: string, chunkId: string, classification: string, reason: string }>} */
56
35
  const skipped = [];
57
36
  for (const page of pageCatalog) {
58
37
  const pattern = page.pathPattern || patternFromSegs(page.segs);
@@ -227,7 +206,7 @@ export async function emitWebStatic(distDir, opts = {}) {
227
206
  schema: publicAssets.schema,
228
207
  status: publicAssets.status,
229
208
  fileCount: publicAssets.fileCount ?? 0,
230
- source: publicAssets.source || null,
209
+ source: 'source' in publicAssets && typeof publicAssets.source === 'string' ? publicAssets.source : null,
231
210
  },
232
211
  };
233
212
  const digest = sha256Hex(canonicalJson(manifest));
@@ -384,10 +363,6 @@ function guessRouteId(distDir, chunkId) {
384
363
  }
385
364
  return chunkId.split('/').pop() || chunkId;
386
365
  }
387
- /**
388
- * @param {any} Page
389
- * @param {{ params: Record<string, string>, props: Record<string, unknown>, pathname: string, origin: string }} ctx
390
- */
391
366
  async function resolvePageMeta(Page, ctx) {
392
367
  let raw = {};
393
368
  if (typeof Page.meta === 'function') {
@@ -2,8 +2,6 @@
2
2
  * `vmz test` command — discovery / build / filter / TestReport orchestration.
3
3
  * Semantics live in `@vmz/test` (optional peer — not installed with bare `@vmz/vmz`).
4
4
  */
5
- /**
6
- * @param {Record<string, string | boolean> & { _: string[] }} args
7
- * @returns {Promise<number>}
8
- */
9
- export declare function cmdTest(args: any): Promise<0 | 1 | 2>;
5
+ import type { Cli, Command, ParsedOptions } from '@vmz/commander';
6
+ export declare function registerTestCommand(cli: Cli | Command): void;
7
+ export declare function cmdTest(args: ParsedOptions): Promise<number>;
package/dist/test-cmd.js CHANGED
@@ -1,4 +1,3 @@
1
- // @ts-nocheck
2
1
  /**
3
2
  * `vmz test` command — discovery / build / filter / TestReport orchestration.
4
3
  * Semantics live in `@vmz/test` (optional peer — not installed with bare `@vmz/vmz`).
@@ -7,9 +6,19 @@ import path from 'node:path';
7
6
  import { createWorkspace } from './index.js';
8
7
  import { log } from './log.js';
9
8
  import { generatePrettyJson } from './pretty-json.js';
10
- /**
11
- * @returns {Promise<typeof import('@vmz/test')>}
12
- */
9
+ export function registerTestCommand(cli) {
10
+ cli.command('test', 'cli.cmd.test')
11
+ .option('--out-dir, -o <dir>', 'cli.opt.out-dir')
12
+ .option('--list', 'cli.opt.list')
13
+ .option('--json [file]', 'cli.opt.json')
14
+ .option('--mode <modes>', 'cli.opt.mode')
15
+ .option('--filter <pattern>', 'cli.opt.filter')
16
+ .option('--application <id>', 'cli.opt.application')
17
+ .option('--mounted <id>', 'cli.opt.mounted')
18
+ .option('--affected', 'cli.opt.affected')
19
+ .option('--target <id>', 'cli.opt.target')
20
+ .action((options) => cmdTest(options));
21
+ }
13
22
  async function loadTestPackage() {
14
23
  try {
15
24
  return await import('@vmz/test');
@@ -19,10 +28,6 @@ async function loadTestPackage() {
19
28
  throw new Error('`vmz test` needs `@vmz/test` (optional peer of `@vmz/vmz`).\n' + ' Install: pnpm add -D @vmz/test\n' + ` Detail: ${detail}`);
20
29
  }
21
30
  }
22
- /**
23
- * @param {Record<string, string | boolean> & { _: string[] }} args
24
- * @returns {Promise<number>}
25
- */
26
31
  export async function cmdTest(args) {
27
32
  let test;
28
33
  try {
@@ -36,7 +41,7 @@ export async function cmdTest(args) {
36
41
  const project = path.resolve(String(args._[0] || '.'));
37
42
  let modes;
38
43
  try {
39
- modes = parseModes(/** @type {string|boolean|undefined} */ (args.mode));
44
+ modes = parseModes(args.mode);
40
45
  }
41
46
  catch (e) {
42
47
  log.error(e instanceof Error ? e.message : String(e));
@@ -88,7 +93,6 @@ export async function cmdTest(args) {
88
93
  return file.includes(scopeId) || id.includes(scopeId);
89
94
  });
90
95
  }
91
- /** @type {null | { schema: string, reason: string, testIds: string[], affectedChunkIds: string[], status: string }} */
92
96
  let testSelection = null;
93
97
  if (wantAffected) {
94
98
  const outDir = outDirArg ? path.resolve(outDirArg) : path.join(project, 'dist');
@@ -135,15 +139,6 @@ export async function cmdTest(args) {
135
139
  else if (!modes.includes('all')) {
136
140
  selected = selected.filter((m) => Array.isArray(m.modes) && m.modes.some((x) => modes.includes(x)));
137
141
  }
138
- /** @type {Array<{
139
- * testId: string,
140
- * file: string,
141
- * modes: string[],
142
- * programId: string|null,
143
- * planId: string|null,
144
- * status: string,
145
- * diagnostics: unknown[],
146
- * }>} */
147
142
  let tests;
148
143
  if (wantList) {
149
144
  tests = selected.map((m) => {
@@ -172,11 +167,8 @@ export async function cmdTest(args) {
172
167
  (mm.includes('browser') && modeActive('browser')) ||
173
168
  (mm.includes('deployment') && modeActive('deployment')));
174
169
  });
175
- /** @type {string|null} */
176
170
  let buildOut = null;
177
- /** @type {unknown[]} */
178
171
  let buildDiags = [];
179
- /** @type {string|null} */
180
172
  let buildError = null;
181
173
  if (needsBuild) {
182
174
  const built = buildForCompile(project, outDirArg ? path.resolve(outDirArg) : undefined, {
@@ -201,7 +193,7 @@ export async function cmdTest(args) {
201
193
  programId: program.chunkId ? String(program.chunkId) : null,
202
194
  planId: plan.ref ? String(plan.ref) : plan.schema ? String(plan.schema) : null,
203
195
  status: 'skipped',
204
- diagnostics: /** @type {unknown[]} */ ([]),
196
+ diagnostics: [],
205
197
  };
206
198
  const doCompile = mModes.includes('compile') && modeActive('compile');
207
199
  const doLogic = mModes.includes('logic') && modeActive('logic');
@@ -226,9 +218,7 @@ export async function cmdTest(args) {
226
218
  tests.push(base);
227
219
  continue;
228
220
  }
229
- /** @type {unknown[]} */
230
221
  const diags = [];
231
- /** @type {string[]} */
232
222
  const statuses = [];
233
223
  if (doCompile) {
234
224
  const result = runCompileManifest(m, { outDir: buildOut });
@@ -1,3 +1,2 @@
1
- // @ts-nocheck
2
1
  /** @deprecated Import from `@vmz/test` — transitional re-export. */
3
2
  export { buildForCompile, resolveChunkArtifacts, runCompileManifest, } from '@vmz/test';
@@ -1,3 +1,2 @@
1
- // @ts-nocheck
2
1
  /** @deprecated Import from `@vmz/test` — transitional re-export. */
3
2
  export * from '@vmz/test/discover';
@@ -1,3 +1,2 @@
1
- // @ts-nocheck
2
1
  /** @deprecated Import from `@vmz/test` — transitional re-export. */
3
2
  export { createLogicHost, runLogicManifest, installHeadlessDocument } from '@vmz/test';
@@ -1,3 +1,2 @@
1
- // @ts-nocheck
2
1
  /** @deprecated Import from `@vmz/test` — transitional re-export. */
3
2
  export * from '@vmz/test/protocol';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Product wiring for `@vmz/commander` / `@vmz/diagnostic`.
3
+ *
4
+ * Locales **loading** is `@vmz/commander` (`createLocalizeFromLocales` / `.locales`).
5
+ * Product owns only `packages/runtimes/vmz/locales/` content + thin `cli-localize` wrapper.
6
+ * Help lists are derived from the command tree — do not reintroduce Usage walls.
7
+ */
8
+ export { createCli } from '@vmz/commander';
9
+ export type { LocalizePlugin } from '@vmz/commander';
10
+ export { VMZ_CLI_CATALOG_EN_US, createVmzCliLocalize, flattenCatalog, loadCliCatalog, loadCliLocalesManifest, resolveCliLocalesRoot, resolveVmzLocale, translateCatalog, vmzCliLocalize, } from './cli-localize.js';
11
+ export { formatDiagnostic, formatDiagnostics, t, } from '@vmz/diagnostic';
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Product wiring for `@vmz/commander` / `@vmz/diagnostic`.
3
+ *
4
+ * Locales **loading** is `@vmz/commander` (`createLocalizeFromLocales` / `.locales`).
5
+ * Product owns only `packages/runtimes/vmz/locales/` content + thin `cli-localize` wrapper.
6
+ * Help lists are derived from the command tree — do not reintroduce Usage walls.
7
+ */
8
+ export { createCli } from '@vmz/commander';
9
+ export { VMZ_CLI_CATALOG_EN_US, createVmzCliLocalize, flattenCatalog, loadCliCatalog, loadCliLocalesManifest, resolveCliLocalesRoot, resolveVmzLocale, translateCatalog, vmzCliLocalize, } from './cli-localize.js';
10
+ export { formatDiagnostic, formatDiagnostics, t, } from '@vmz/diagnostic';
@@ -1,17 +1,8 @@
1
1
  /**
2
2
  * Track per-file fingerprints so dev rebuilds only dirty leaves (session).
3
3
  */
4
- /**
5
- * @param {string} srcDir
6
- * @returns {Map<string, string>}
7
- */
8
- export declare function fileFingerprintMap(srcDir: any): Map<any, any>;
9
- /**
10
- * @param {Map<string, string>} prev
11
- * @param {Map<string, string>} next
12
- * @returns {{ changed: string[], deleted: string[] }}
13
- */
14
- export declare function diffFingerprints(prev: any, next: any): {
15
- changed: any[];
16
- deleted: any[];
4
+ export declare function fileFingerprintMap(srcDir: string): Map<string, string>;
5
+ export declare function diffFingerprints(prev: Map<string, string>, next: Map<string, string>): {
6
+ changed: string[];
7
+ deleted: string[];
17
8
  };
@@ -1,16 +1,10 @@
1
- // @ts-nocheck
2
1
  /**
3
2
  * Track per-file fingerprints so dev rebuilds only dirty leaves (session).
4
3
  */
5
4
  import { existsSync, readdirSync, statSync } from 'node:fs';
6
5
  import path from 'node:path';
7
6
  const WATCH_EXT = new Set(['.vmz', '.ts', '.tsx', '.js', '.mjs', '.css', '.json']);
8
- /**
9
- * @param {string} srcDir
10
- * @returns {Map<string, string>}
11
- */
12
7
  export function fileFingerprintMap(srcDir) {
13
- /** @type {Map<string, string>} */
14
8
  const map = new Map();
15
9
  walk(srcDir, (file) => {
16
10
  const st = statSync(file);
@@ -18,15 +12,8 @@ export function fileFingerprintMap(srcDir) {
18
12
  });
19
13
  return map;
20
14
  }
21
- /**
22
- * @param {Map<string, string>} prev
23
- * @param {Map<string, string>} next
24
- * @returns {{ changed: string[], deleted: string[] }}
25
- */
26
15
  export function diffFingerprints(prev, next) {
27
- /** @type {string[]} */
28
16
  const changed = [];
29
- /** @type {string[]} */
30
17
  const deleted = [];
31
18
  for (const [file, fp] of next) {
32
19
  if (prev.get(file) !== fp)
@@ -38,10 +25,6 @@ export function diffFingerprints(prev, next) {
38
25
  }
39
26
  return { changed, deleted };
40
27
  }
41
- /**
42
- * @param {string} dir
43
- * @param {(file: string) => void} fn
44
- */
45
28
  function walk(dir, fn) {
46
29
  if (!existsSync(dir))
47
30
  return;
@@ -8,15 +8,16 @@ export declare const WECHAT_PACKAGING_REL = "dist/_vmz/wechat-packaging.json";
8
8
  * @param {unknown} delivery
9
9
  * @returns {{ schema: string, appId: string, projectName?: string, title?: string }}
10
10
  */
11
- export declare function wechatPackagingFromDelivery(delivery: any): {
11
+ interface WechatPackagingSpec {
12
12
  schema: string;
13
- appId: any;
14
- };
13
+ appId: string;
14
+ projectName?: string;
15
+ title?: string;
16
+ }
17
+ export declare function wechatPackagingFromDelivery(delivery: unknown): WechatPackagingSpec;
15
18
  /**
16
19
  * Load `vmz.config.*` and write the WeChat packaging contract for the Rust packer.
17
20
  * @param {string} project
18
21
  */
19
- export declare function materializeWechatPackaging(project: any): {
20
- schema: string;
21
- appId: any;
22
- };
22
+ export declare function materializeWechatPackaging(project: any): WechatPackagingSpec;
23
+ export {};
@@ -2,7 +2,6 @@
2
2
  * Materialize `defineConfig({ delivery: { packaging: { wechat } } })` for wechat_pack.
3
3
  * Pure data only. Writes `dist/_vmz/wechat-packaging.json` (not a second config entry).
4
4
  */
5
- // @ts-nocheck
6
5
  import { existsSync, mkdirSync } from 'node:fs';
7
6
  import path from 'node:path';
8
7
  import { createJiti } from 'jiti';
@@ -24,15 +23,10 @@ function loadConfigSync(project) {
24
23
  }
25
24
  return null;
26
25
  }
27
- /**
28
- * @param {unknown} delivery
29
- * @returns {{ schema: string, appId: string, projectName?: string, title?: string }}
30
- */
31
26
  export function wechatPackagingFromDelivery(delivery) {
32
27
  const diagnostics = [];
33
28
  const packaging = pickDeliveryPackaging(delivery && typeof delivery === 'object' ? delivery : {}, diagnostics);
34
29
  const wechat = packaging && packaging.wechat ? packaging.wechat : {};
35
- /** @type {{ schema: string, appId: string, projectName?: string, title?: string }} */
36
30
  const out = {
37
31
  schema: WECHAT_PACKAGING_SCHEMA,
38
32
  appId: typeof wechat.appId === 'string' && wechat.appId.trim() ? wechat.appId.trim() : 'touristappid',