@vmz/vmz 0.3.6 → 0.3.7

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.
@@ -8,7 +8,6 @@ import path from 'node:path';
8
8
  import { fileURLToPath } from 'node:url';
9
9
  import { materializeServeHostRuntime, SERVE_HOST_RUNTIME_FILES } from '../host-materialize/serve-host-runtime.js';
10
10
  import { resolveCoreRuntimeDist } from './runtime-dist.js';
11
- import { materializeWechatPackaging } from './wechat-packaging.js';
12
11
  export { resolveCoreRuntimeDist } from './runtime-dist.js';
13
12
  export { loadHostRuntimeFilesManifest, serveHostRuntimeFilePairs } from '../host-materialize/host-runtime-files.js';
14
13
  export { materializeServeHostRuntime, SERVE_HOST_RUNTIME_FILES } from '../host-materialize/serve-host-runtime.js';
@@ -125,25 +124,7 @@ export function createWorkspace(options) {
125
124
  pluginProtocol: protocol.pluginProtocol,
126
125
  },
127
126
  });
128
- const pack = ws.lowerMiniprogramWechatPackaging.bind(ws);
129
- const wrappedPack = () => {
130
- materializeWechatPackaging(options.root);
131
- return pack();
132
- };
133
- try {
134
- ws.lowerMiniprogramWechatPackaging = wrappedPack;
135
- return ws;
136
- }
137
- catch {
138
- return new Proxy(ws, {
139
- get(target, prop, receiver) {
140
- if (prop === 'lowerMiniprogramWechatPackaging')
141
- return wrappedPack;
142
- const value = Reflect.get(target, prop, receiver);
143
- return typeof value === 'function' ? value.bind(target) : value;
144
- },
145
- });
146
- }
127
+ return ws;
147
128
  }
148
129
  /** frozen application composition protocol catalog. */
149
130
  export function queryApplicationProtocolCatalog() {
@@ -183,9 +164,12 @@ export function lowerMiniprogramToolingDeployJson(rootPath) {
183
164
  const native = loadNative();
184
165
  return native.lowerMiniprogramToolingDeployJson(rootPath);
185
166
  }
167
+ /**
168
+ * Consume the prepared `dist/_vmz/wechat-packaging.json` snapshot.
169
+ * Callers that start from a config must `await prepareWechatPackaging(rootPath)` first.
170
+ */
186
171
  export function lowerMiniprogramWechatPackagingJson(rootPath) {
187
172
  const native = loadNative();
188
- materializeWechatPackaging(rootPath);
189
173
  return native.lowerMiniprogramWechatPackagingJson(rootPath);
190
174
  }
191
175
  export function lowerMiniprogramMultiAdapterJson(rootPath) {
@@ -307,7 +291,7 @@ export { CDN_POLICY_MANIFEST_SCHEMA, CDN_ADAPTER_PROJECTION_SCHEMA, CACHE_HTML,
307
291
  export { SITE_DELIVERY_CONTRACT_SCHEMA, SITE_DELIVERY_RESOLUTION_SCHEMA, defineSite, normalizeSiteDelivery, normalizeSourceProbe, resolveSiteRelease, probeReleaseDirectory, emitSiteDelivery, } from './site-delivery.js';
308
292
  export { EMBEDDED_RESOURCE_INDEX_SCHEMA, emitEmbeddedPackaging } from './embedded-packaging.js';
309
293
  export { SERVER_LANG_IDS, SERVER_LANG_ALIASES, SERVER_LANGUAGE_BACKENDS, resolveServerLanguage, assertLangRuntimePair, } from './server-language-backend.js';
310
- export { WECHAT_PACKAGING_SCHEMA, WECHAT_PACKAGING_REL, wechatPackagingFromDelivery, materializeWechatPackaging } from './wechat-packaging.js';
294
+ export { WECHAT_PACKAGING_SCHEMA, WECHAT_PACKAGING_REL, wechatPackagingFromDelivery, materializeWechatPackaging, prepareWechatPackaging, } from './wechat-packaging.js';
311
295
  export { DELIVERY_PROFILE_AUTHORING_SCHEMA, BUILD_PROFILE_SELECTION_SCHEMA, ASSEMBLIES, SERVER_RUNTIMES, BUILTIN_PROFILES, pickSiteAuthoring, pickDeliveryPackaging, normalizeProfileArtifactName, resolveProfileArtifactDir, normalizeDeliveryAuthoring, selectBuildProfile, semanticIdsForAssembly, } from '../delivery/delivery-profile.js';
312
296
  export { PACK_MANIFEST_SCHEMA, packFromDeploymentIr, ensureRuntimeCompanions } from './pack.js';
313
297
  export { SERVER_ARTIFACT_SCHEMA, HTTP_CONTRACT_SCHEMA, SERVER_RUNTIME_ADAPTER_SCHEMA, emitServerArtifact, projectServerRuntimeAdapter, } from './server-artifact.js';
@@ -16,8 +16,15 @@ interface WechatPackagingSpec {
16
16
  }
17
17
  export declare function wechatPackagingFromDelivery(delivery: unknown): WechatPackagingSpec;
18
18
  /**
19
- * Load `vmz.config.*` and write the WeChat packaging contract for the Rust packer.
19
+ * Write the WeChat packaging contract from an already-evaluated delivery snapshot.
20
+ * Sync by contract: the native packer must consume prepared data, never read a config.
21
+ * @param {string} project
22
+ * @param {unknown} delivery
23
+ */
24
+ export declare function materializeWechatPackaging(project: string, delivery: unknown): WechatPackagingSpec;
25
+ /**
26
+ * Async host entry: evaluate `vmz.config.*` once, then prepare the packaging snapshot.
20
27
  * @param {string} project
21
28
  */
22
- export declare function materializeWechatPackaging(project: any): WechatPackagingSpec;
29
+ export declare function prepareWechatPackaging(project: string): Promise<WechatPackagingSpec>;
23
30
  export {};
@@ -2,27 +2,13 @@
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
- import { existsSync, mkdirSync } from 'node:fs';
5
+ import { mkdirSync } from 'node:fs';
6
6
  import path from 'node:path';
7
- import { createJiti } from 'jiti';
8
7
  import { pickDeliveryPackaging } from '../delivery/delivery-profile.js';
9
8
  import { writePrettyJsonFile } from './pretty-json.js';
9
+ import { loadVmzConfig } from './plugin-host.js';
10
10
  export const WECHAT_PACKAGING_SCHEMA = 'vmz.target.wechat_packaging.v0';
11
11
  export const WECHAT_PACKAGING_REL = 'dist/_vmz/wechat-packaging.json';
12
- const CONFIG_NAMES = ['vmz.config.ts', 'vmz.config.mts', 'vmz.config.mjs', 'vmz.config.js'];
13
- function loadConfigSync(project) {
14
- for (const name of CONFIG_NAMES) {
15
- const full = path.join(project, name);
16
- if (!existsSync(full))
17
- continue;
18
- const jiti = createJiti(import.meta.url, {
19
- interopDefault: true,
20
- moduleCache: false,
21
- });
22
- return jiti(full);
23
- }
24
- return null;
25
- }
26
12
  export function wechatPackagingFromDelivery(delivery) {
27
13
  const diagnostics = [];
28
14
  const packaging = pickDeliveryPackaging(delivery && typeof delivery === 'object' ? delivery : {}, diagnostics);
@@ -40,14 +26,23 @@ export function wechatPackagingFromDelivery(delivery) {
40
26
  return out;
41
27
  }
42
28
  /**
43
- * Load `vmz.config.*` and write the WeChat packaging contract for the Rust packer.
29
+ * Write the WeChat packaging contract from an already-evaluated delivery snapshot.
30
+ * Sync by contract: the native packer must consume prepared data, never read a config.
44
31
  * @param {string} project
32
+ * @param {unknown} delivery
45
33
  */
46
- export function materializeWechatPackaging(project) {
47
- const cfg = loadConfigSync(project);
48
- const spec = wechatPackagingFromDelivery(cfg?.delivery);
34
+ export function materializeWechatPackaging(project, delivery) {
35
+ const spec = wechatPackagingFromDelivery(delivery);
49
36
  const abs = path.join(project, WECHAT_PACKAGING_REL);
50
37
  mkdirSync(path.dirname(abs), { recursive: true });
51
38
  writePrettyJsonFile(abs, spec);
52
39
  return spec;
53
40
  }
41
+ /**
42
+ * Async host entry: evaluate `vmz.config.*` once, then prepare the packaging snapshot.
43
+ * @param {string} project
44
+ */
45
+ export async function prepareWechatPackaging(project) {
46
+ const cfg = await loadVmzConfig(project);
47
+ return materializeWechatPackaging(project, cfg.delivery);
48
+ }
@@ -1,126 +1,126 @@
1
- {
2
- "cli.intro.project": "vmz — Node toolchain host (`@vmz/vmz`, N-API)",
3
- "cli.intro.global": "vmz — global install (help/version only). Pin `@vmz/vmz` in the app (`pnpm add -D @vmz/vmz`) and run `pnpm exec vmz <command>`. A global `vmz` re-execs the nearest project bin when present.",
4
- "cli.cmd.check": "Check project via Workspace",
5
- "cli.cmd.build": "Build project via Workspace",
6
- "cli.cmd.serve": "Serve dist (optional --build)",
7
- "cli.cmd.dev": "Rebuild session",
8
- "cli.cmd.format": "Format workspace surfaces and .vmz via vmz.config format",
9
- "cli.opt.format-no-javascript": "Skip JS/TS workspace format",
10
- "cli.opt.format-no-rust": "Skip cargo fmt",
11
- "cli.opt.format-no-vmz": "Skip .vmz author format",
12
- "cli.cmd.lint": "Lint (= check) via N-API",
13
- "cli.cmd.test": "Native test discover / report",
14
- "cli.cmd.document": "Project /documents domain",
15
- "cli.cmd.document.check": "Check locale tree + links/anchors + evidence",
16
- "cli.cmd.document.build": "Static HTML + view + evidence + designs CSS",
17
- "cli.cmd.locale": "Locale domain",
18
- "cli.cmd.locale.check": "Check locales.json5 + catalogs + param contracts",
19
- "cli.cmd.locale.list": "List LocaleIds",
20
- "cli.cmd.locale.emit-types": "Emit #locales/* .d.ts stubs",
21
- "cli.cmd.locale.rename": "MessageId rename plan",
22
- "cli.cmd.locale.runtime-check": "LocaleContext / FormatterContext / SSR parity",
23
- "cli.cmd.locale.router-check": "Route realization / canonical / hreflang",
24
- "cli.cmd.locale.delivery-check": "Multi-host LocaleDeliveryResolution",
25
- "cli.cmd.locale.explain": "Explain MessageId",
26
- "cli.cmd.locale.diff": "Diff two locales",
27
- "cli.cmd.locale.extract": "Hardcoded text sink check",
28
- "cli.cmd.locale.pseudo": "Pseudo-localize catalog",
29
- "cli.cmd.locale.conformance": "Cross-host MessageId/hash conformance",
30
- "cli.cmd.application": "Application Collection / Mount",
31
- "cli.cmd.application.check": "Validate descriptors + applications.config.json5",
32
- "cli.cmd.application.list": "List ApplicationIds / collections / mounts",
33
- "cli.cmd.application.schemas": "Print frozen protocol catalog JSON",
34
- "cli.cmd.application.relocatable": "ApplicationBase / non_relocatable_url proof",
35
- "cli.cmd.application.relocate": "Apply ApplicationBase to relocation manifest",
36
- "cli.cmd.application.artifacts": "ApplicationArtifact + MountTable boundary",
37
- "cli.cmd.application.isolation": "Isolation namespaces + failure containment",
38
- "cli.cmd.application.composition": "Catalog consumption + cross-app Link hrefs",
39
- "cli.cmd.application.dev": "Sessions / affected / proxy / mounted tests",
40
- "cli.cmd.artifact": "Release pack / publish / rollback / diff",
41
- "cli.cmd.artifact.pack": "Write dist/_vmz manifests + envelope",
42
- "cli.cmd.artifact.publish": "Pack + publish under dist/releases",
43
- "cli.cmd.artifact.rollback": "Restore PREVIOUS pointer",
44
- "cli.cmd.artifact.current": "Print CURRENT digest",
45
- "cli.cmd.artifact.diff": "Structured file digest diff",
46
- "cli.cmd.refactor": "DX rename plans / apply",
47
- "cli.cmd.refactor.rename": "Plan or apply a workspace rename",
48
- "cli.cmd.explain": "DX causal explain",
49
- "cli.cmd.github-actions": "Monitor GitHub Actions via Rust GitHub REST monitor (status|wait)",
50
- "cli.cmd.plan": "Dump frozen Rust plans via N-API",
51
- "cli.cmd.plan.locale": "LocalePlan from locales/",
52
- "cli.cmd.plan.document-route": "DocumentRoutePlan from documents/",
53
- "cli.cmd.version": "Show host + native protocol versions",
54
- "cli.opt.out-dir": "Workspace output root (default: dist)",
55
- "cli.opt.release": "Release build (omit serve-host; pack minify; proof)",
56
- "cli.opt.profile": "Delivery profile id",
57
- "cli.opt.target": "browser | mini-program-wechat (or test affected alias)",
58
- "cli.opt.origin": "Site origin for web-static",
59
- "cli.opt.host": "Listen host",
60
- "cli.opt.port": "Listen port",
61
- "cli.opt.poll-ms": "Dev watch poll interval",
62
- "cli.opt.build": "Build before serve",
63
- "cli.opt.check": "Format check-only / extract fail on CJK",
64
- "cli.opt.deny-warnings": "Treat warnings as errors",
65
- "cli.opt.level": "Diagnostic verbosity: error | warn | info (default warn)",
66
- "cli.opt.info-level": "Show advice diagnostics and progress (same as --level info)",
67
- "cli.opt.diag-style": "Diagnostic layout: pretty | compact (default pretty)",
68
- "cli.opt.json": "Write JSON to stdout or file",
69
- "cli.opt.root": "Project root",
70
- "cli.opt.out": "Output directory",
71
- "cli.opt.strict": "Strict coverage / require defaultLocale",
72
- "cli.opt.list": "List discovered tests",
73
- "cli.opt.mode": "compile|logic|browser|ssr|resume|deployment|all",
74
- "cli.opt.filter": "Filter by test id or file",
75
- "cli.opt.application": "Run only tests for ApplicationId",
76
- "cli.opt.mounted": "Relocation + host-boundary tests for ApplicationId",
77
- "cli.opt.affected": "Select tests from dirty VPG units",
78
- "cli.opt.locale": "Requested locale id",
79
- "cli.opt.delivery": "Delivery id",
80
- "cli.opt.timezone": "Formatter time zone",
81
- "cli.opt.production": "Fail pseudo in production",
82
- "cli.opt.base": "ApplicationBase path",
83
- "cli.opt.dirty": "Dirty file path for affected planning (repeatable)",
84
- "cli.opt.releases": "Releases root directory",
85
- "cli.opt.app-id": "applicationId for envelope",
86
- "cli.opt.refactor.kind": "route_id|field|method|component|capability",
87
- "cli.opt.refactor.from": "Rename from id",
88
- "cli.opt.refactor.to": "Rename to id",
89
- "cli.opt.refactor.scope": "Optional chunk scope",
90
- "cli.opt.apply": "Apply workspace edit plan",
91
- "cli.opt.explain": "Include rename explain chain",
92
- "cli.opt.explain.target": "Generic Workspace.explain target",
93
- "cli.opt.gha.mode": "status (one-shot) or wait (poll until completed)",
94
- "cli.opt.gha.workflow": "Workflow file name (e.g. ci.yml) or numeric id",
95
- "cli.opt.gha.run-id": "Watch a specific workflow run id",
96
- "cli.opt.gha.ref": "Commit SHA filter (head_sha)",
97
- "cli.opt.gha.branch": "Branch name filter",
98
- "cli.opt.gha.owner": "Repository owner (default GITHUB_REPOSITORY)",
99
- "cli.opt.gha.repo": "Repository name (default GITHUB_REPOSITORY)",
100
- "cli.opt.gha.token": "GitHub token (default GITHUB_TOKEN / GH_TOKEN)",
101
- "cli.opt.gha.timeout-minutes": "Max wait minutes for mode=wait",
102
- "cli.opt.gha.interval-seconds": "Poll interval seconds for mode=wait",
103
- "cli.opt.gha.required-conclusion": "Required conclusion when mode=wait (default success)",
104
- "cli.err.unknown_plan_kind": "unknown plan kind `{kind}` (locale | document-route)",
105
- "cli.err.gha.mode": "unknown --mode {mode} (status | wait)",
106
- "cli.err.gha.repo": "set --owner/--repo or GITHUB_REPOSITORY (owner/repo)",
107
- "cli.err.invalid_level": "unknown --level `{level}` (error | warn | info)",
108
- "cli.err.invalid_style": "unknown --style `{style}` (pretty | compact)",
109
- "cli.err.unknown_target": "unknown --target {target} (browser | mini-program-wechat)",
110
- "cli.err.document_build_aborted": "document build aborted due to diagnostics",
111
- "cli.err.locale_rename_usage": "usage: vmz locale rename <from-message-id> <to-message-id>",
112
- "cli.err.locale_explain_usage": "usage: vmz locale explain <message-id> [project]",
113
- "cli.err.locale_diff_usage": "usage: vmz locale diff <base-locale> <target-locale> [project]",
114
- "cli.err.locale_pseudo_usage": "usage: vmz locale pseudo <source-locale> [project]",
115
- "cli.err.application_relocate_manifest": "relocate requires a relocation manifest JSON path",
116
- "cli.err.application_relocate_base": "relocate requires --base <ApplicationBase>",
117
- "cli.err.artifact_diff_usage": "artifact diff requires <aDigest> <bDigest>",
118
- "cli.err.refactor_rename_usage": "rename requires --kind, --from, and --to",
119
- "cli.err.explain_style_usage": "usage: vmz explain style <node> [path]",
120
- "cli.err.explain_usage": "usage: vmz explain style <node> [path] | vmz explain <target> [path]",
121
- "cli.err.project_bin_missing": "found project `vmz` / `@vmz/vmz` but bin/vmz.js is missing.",
122
- "cli.err.global_needs_project": "this `vmz` is a global install (mode=global); project commands need a project install.",
123
- "cli.err.global_install_hint": "Install in the app: pnpm add -D @vmz/vmz",
124
- "cli.err.global_run_hint": "Then run: pnpm exec vmz <command>",
125
- "cli.err.global_developer_hint": "(developer mode: run from vmz-framework packages/runtimes/vmz source — full CLI)"
126
- }
1
+ {
2
+ "cli.intro.project": "vmz — Node toolchain host (`@vmz/vmz`, N-API)",
3
+ "cli.intro.global": "vmz — global install (help/version only). Pin `@vmz/vmz` in the app (`pnpm add -D @vmz/vmz`) and run `pnpm exec vmz <command>`. A global `vmz` re-execs the nearest project bin when present.",
4
+ "cli.cmd.check": "Check project via Workspace",
5
+ "cli.cmd.build": "Build project via Workspace",
6
+ "cli.cmd.serve": "Serve dist (optional --build)",
7
+ "cli.cmd.dev": "Rebuild session",
8
+ "cli.cmd.format": "Format workspace surfaces and .vmz via vmz.config format",
9
+ "cli.opt.format-no-javascript": "Skip JS/TS workspace format",
10
+ "cli.opt.format-no-rust": "Skip cargo fmt",
11
+ "cli.opt.format-no-vmz": "Skip .vmz author format",
12
+ "cli.cmd.lint": "Lint (= check) via N-API",
13
+ "cli.cmd.test": "Native test discover / report",
14
+ "cli.cmd.document": "Project /documents domain",
15
+ "cli.cmd.document.check": "Check locale tree + links/anchors + evidence",
16
+ "cli.cmd.document.build": "Static HTML + view + evidence + designs CSS",
17
+ "cli.cmd.locale": "Locale domain",
18
+ "cli.cmd.locale.check": "Check locales.json5 + catalogs + param contracts",
19
+ "cli.cmd.locale.list": "List LocaleIds",
20
+ "cli.cmd.locale.emit-types": "Emit #locales/* .d.ts stubs",
21
+ "cli.cmd.locale.rename": "MessageId rename plan",
22
+ "cli.cmd.locale.runtime-check": "LocaleContext / FormatterContext / SSR parity",
23
+ "cli.cmd.locale.router-check": "Route realization / canonical / hreflang",
24
+ "cli.cmd.locale.delivery-check": "Multi-host LocaleDeliveryResolution",
25
+ "cli.cmd.locale.explain": "Explain MessageId",
26
+ "cli.cmd.locale.diff": "Diff two locales",
27
+ "cli.cmd.locale.extract": "Hardcoded text sink check",
28
+ "cli.cmd.locale.pseudo": "Pseudo-localize catalog",
29
+ "cli.cmd.locale.conformance": "Cross-host MessageId/hash conformance",
30
+ "cli.cmd.application": "Application Collection / Mount",
31
+ "cli.cmd.application.check": "Validate descriptors + applications.config.json5",
32
+ "cli.cmd.application.list": "List ApplicationIds / collections / mounts",
33
+ "cli.cmd.application.schemas": "Print frozen protocol catalog JSON",
34
+ "cli.cmd.application.relocatable": "ApplicationBase / non_relocatable_url proof",
35
+ "cli.cmd.application.relocate": "Apply ApplicationBase to relocation manifest",
36
+ "cli.cmd.application.artifacts": "ApplicationArtifact + MountTable boundary",
37
+ "cli.cmd.application.isolation": "Isolation namespaces + failure containment",
38
+ "cli.cmd.application.composition": "Catalog consumption + cross-app Link hrefs",
39
+ "cli.cmd.application.dev": "Sessions / affected / proxy / mounted tests",
40
+ "cli.cmd.artifact": "Release pack / publish / rollback / diff",
41
+ "cli.cmd.artifact.pack": "Write dist/_vmz manifests + envelope",
42
+ "cli.cmd.artifact.publish": "Pack + publish under dist/releases",
43
+ "cli.cmd.artifact.rollback": "Restore PREVIOUS pointer",
44
+ "cli.cmd.artifact.current": "Print CURRENT digest",
45
+ "cli.cmd.artifact.diff": "Structured file digest diff",
46
+ "cli.cmd.refactor": "DX rename plans / apply",
47
+ "cli.cmd.refactor.rename": "Plan or apply a workspace rename",
48
+ "cli.cmd.explain": "DX causal explain",
49
+ "cli.cmd.github-actions": "Monitor GitHub Actions via Rust GitHub REST monitor (status|wait)",
50
+ "cli.cmd.plan": "Dump frozen Rust plans via N-API",
51
+ "cli.cmd.plan.locale": "LocalePlan from locales/",
52
+ "cli.cmd.plan.document-route": "DocumentRoutePlan from documents/",
53
+ "cli.cmd.version": "Show host + native protocol versions",
54
+ "cli.opt.out-dir": "Workspace output root (default: dist)",
55
+ "cli.opt.release": "Release build (omit serve-host; pack minify; proof)",
56
+ "cli.opt.profile": "Delivery profile id",
57
+ "cli.opt.target": "browser | mini-program-wechat (or test affected alias)",
58
+ "cli.opt.origin": "Site origin for web-static",
59
+ "cli.opt.host": "Listen host",
60
+ "cli.opt.port": "Listen port",
61
+ "cli.opt.poll-ms": "Dev watch poll interval",
62
+ "cli.opt.build": "Build before serve",
63
+ "cli.opt.check": "Format check-only / extract fail on CJK",
64
+ "cli.opt.deny-warnings": "Treat warnings as errors",
65
+ "cli.opt.level": "Diagnostic verbosity: error | warn | info (default warn)",
66
+ "cli.opt.info-level": "Show advice diagnostics and progress (same as --level info)",
67
+ "cli.opt.diag-style": "Diagnostic layout: pretty | compact (default pretty)",
68
+ "cli.opt.json": "Write JSON to stdout or file",
69
+ "cli.opt.root": "Project root",
70
+ "cli.opt.out": "Output directory",
71
+ "cli.opt.strict": "Strict coverage / require defaultLocale",
72
+ "cli.opt.list": "List discovered tests",
73
+ "cli.opt.mode": "compile|logic|browser|ssr|resume|deployment|all",
74
+ "cli.opt.filter": "Filter by test id or file",
75
+ "cli.opt.application": "Run only tests for ApplicationId",
76
+ "cli.opt.mounted": "Relocation + host-boundary tests for ApplicationId",
77
+ "cli.opt.affected": "Select tests from dirty VPG units",
78
+ "cli.opt.locale": "Requested locale id",
79
+ "cli.opt.delivery": "Delivery id",
80
+ "cli.opt.timezone": "Formatter time zone",
81
+ "cli.opt.production": "Fail pseudo in production",
82
+ "cli.opt.base": "ApplicationBase path",
83
+ "cli.opt.dirty": "Dirty file path for affected planning (repeatable)",
84
+ "cli.opt.releases": "Releases root directory",
85
+ "cli.opt.app-id": "applicationId for envelope",
86
+ "cli.opt.refactor.kind": "route_id|field|method|component|capability",
87
+ "cli.opt.refactor.from": "Rename from id",
88
+ "cli.opt.refactor.to": "Rename to id",
89
+ "cli.opt.refactor.scope": "Optional chunk scope",
90
+ "cli.opt.apply": "Apply workspace edit plan",
91
+ "cli.opt.explain": "Include rename explain chain",
92
+ "cli.opt.explain.target": "Generic Workspace.explain target",
93
+ "cli.opt.gha.mode": "status (one-shot) or wait (poll until completed)",
94
+ "cli.opt.gha.workflow": "Workflow file name (e.g. ci.yml) or numeric id",
95
+ "cli.opt.gha.run-id": "Watch a specific workflow run id",
96
+ "cli.opt.gha.ref": "Commit SHA filter (head_sha)",
97
+ "cli.opt.gha.branch": "Branch name filter",
98
+ "cli.opt.gha.owner": "Repository owner (default GITHUB_REPOSITORY)",
99
+ "cli.opt.gha.repo": "Repository name (default GITHUB_REPOSITORY)",
100
+ "cli.opt.gha.token": "GitHub token (default GITHUB_TOKEN / GH_TOKEN)",
101
+ "cli.opt.gha.timeout-minutes": "Max wait minutes for mode=wait",
102
+ "cli.opt.gha.interval-seconds": "Poll interval seconds for mode=wait",
103
+ "cli.opt.gha.required-conclusion": "Required conclusion when mode=wait (default success)",
104
+ "cli.err.unknown_plan_kind": "unknown plan kind `{kind}` (locale | document-route)",
105
+ "cli.err.gha.mode": "unknown --mode {mode} (status | wait)",
106
+ "cli.err.gha.repo": "set --owner/--repo or GITHUB_REPOSITORY (owner/repo)",
107
+ "cli.err.invalid_level": "unknown --level `{level}` (error | warn | info)",
108
+ "cli.err.invalid_style": "unknown --style `{style}` (pretty | compact)",
109
+ "cli.err.unknown_target": "unknown --target {target} (browser | mini-program-wechat)",
110
+ "cli.err.document_build_aborted": "document build aborted due to diagnostics",
111
+ "cli.err.locale_rename_usage": "usage: vmz locale rename <from-message-id> <to-message-id>",
112
+ "cli.err.locale_explain_usage": "usage: vmz locale explain <message-id> [project]",
113
+ "cli.err.locale_diff_usage": "usage: vmz locale diff <base-locale> <target-locale> [project]",
114
+ "cli.err.locale_pseudo_usage": "usage: vmz locale pseudo <source-locale> [project]",
115
+ "cli.err.application_relocate_manifest": "relocate requires a relocation manifest JSON path",
116
+ "cli.err.application_relocate_base": "relocate requires --base <ApplicationBase>",
117
+ "cli.err.artifact_diff_usage": "artifact diff requires <aDigest> <bDigest>",
118
+ "cli.err.refactor_rename_usage": "rename requires --kind, --from, and --to",
119
+ "cli.err.explain_style_usage": "usage: vmz explain style <node> [path]",
120
+ "cli.err.explain_usage": "usage: vmz explain style <node> [path] | vmz explain <target> [path]",
121
+ "cli.err.project_bin_missing": "found project `vmz` / `@vmz/vmz` but bin/vmz.js is missing.",
122
+ "cli.err.global_needs_project": "this `vmz` is a global install (mode=global); project commands need a project install.",
123
+ "cli.err.global_install_hint": "Install in the app: pnpm add -D @vmz/vmz",
124
+ "cli.err.global_run_hint": "Then run: pnpm exec vmz <command>",
125
+ "cli.err.global_developer_hint": "(developer mode: run from vmz-framework packages/runtimes/vmz source — full CLI)"
126
+ }
@@ -2,6 +2,10 @@
2
2
  "diag.message": "{message}",
3
3
  "diag.detail": "{detail}",
4
4
  "commander::action_failed": "Command failed: {message}",
5
+ "commander::unknown_command": "Unknown command `{cmd}`.",
6
+ "commander::unknown_option": "Unknown option `{option}`.",
7
+ "commander::missing_option_value": "Missing value for option `{option}`.",
8
+ "commander::parse_failed": "Parse failed: {detail}",
5
9
 
6
10
  "vmz::template::illegal_directive": "Illegal or unsupported directive in `<template>`: {detail}",
7
11
  "vmz::template::parse_failed": "Failed to parse `<template>`: {detail}",
@@ -150,5 +154,7 @@
150
154
  "vmz::target::mini_platform_private_schema": "{detail}",
151
155
  "vmz::target::mini_shared_fork": "{detail}",
152
156
  "vmz::target::mini_static_slice_catalog_only": "{detail}",
153
- "vmz::target::mini_route_server_style_catalog_only": "{detail}"
157
+ "vmz::target::mini_route_server_style_catalog_only": "{detail}",
158
+ "vmz::config::load_failed": "failed to load project config: {detail}",
159
+ "vmz::plugin::invalid_entry": "invalid plugin entry: {detail}"
154
160
  }
@@ -150,5 +150,7 @@
150
150
  "vmz::target::mini_platform_private_schema": "{detail}",
151
151
  "vmz::target::mini_shared_fork": "{detail}",
152
152
  "vmz::target::mini_static_slice_catalog_only": "{detail}",
153
- "vmz::target::mini_route_server_style_catalog_only": "{detail}"
153
+ "vmz::target::mini_route_server_style_catalog_only": "{detail}",
154
+ "vmz::config::load_failed": "无法加载项目配置:{detail}",
155
+ "vmz::plugin::invalid_entry": "插件入口无效:{detail}"
154
156
  }
package/package.json CHANGED
@@ -3,24 +3,26 @@
3
3
  "vmz": "./bin/vmz.js"
4
4
  },
5
5
  "dependencies": {
6
- "@vmz/commander": "0.3.6",
7
- "@vmz/core": "0.3.6",
8
- "@vmz/diagnostic": "0.3.6",
9
- "@vmz/plugin": "0.3.6",
10
- "@vmz/protocol": "0.3.6",
11
- "jiti": "^2.6.1"
6
+ "@vmz/commander": "0.3.7",
7
+ "@vmz/core": "0.3.7",
8
+ "@vmz/diagnostic": "0.3.7",
9
+ "@vmz/plugin": "0.3.7",
10
+ "@vmz/protocol": "0.3.7"
12
11
  },
13
12
  "description": "VMZ Node toolchain — N-API workspace session + CLI (publish name @vmz/vmz)",
14
13
  "devDependencies": {
15
14
  "@types/node": "^22.15.0",
16
- "@vmz/plugin": "0.3.6",
17
- "@vmz/plugin-katex": "0.3.6",
18
- "@vmz/plugin-markdown-it": "0.3.6",
19
- "@vmz/plugin-shiki": "0.3.6",
20
- "@vmz/test": "0.3.6",
15
+ "@vmz/plugin": "0.3.7",
16
+ "@vmz/plugin-katex": "0.3.7",
17
+ "@vmz/plugin-markdown-it": "0.3.7",
18
+ "@vmz/plugin-shiki": "0.3.7",
19
+ "@vmz/test": "0.3.7",
21
20
  "linkedom": "^0.18.13",
22
21
  "typescript": "^5.8.3",
23
- "vmz-plugin-conformance": "0.3.6"
22
+ "vmz-plugin-conformance": "0.3.7"
23
+ },
24
+ "engines": {
25
+ "node": ">=24.12.0"
24
26
  },
25
27
  "exports": {
26
28
  ".": {
@@ -78,16 +80,16 @@
78
80
  "main": "./dist/index.js",
79
81
  "name": "@vmz/vmz",
80
82
  "optionalDependencies": {
81
- "@vmz/vmz-darwin-arm64": "0.3.6",
82
- "@vmz/vmz-darwin-x64": "0.3.6",
83
- "@vmz/vmz-linux-arm64": "0.3.6",
84
- "@vmz/vmz-linux-x64": "0.3.6",
85
- "@vmz/vmz-win32-arm64": "0.3.6",
86
- "@vmz/vmz-win32-x64": "0.3.6"
83
+ "@vmz/vmz-darwin-arm64": "0.3.7",
84
+ "@vmz/vmz-darwin-x64": "0.3.7",
85
+ "@vmz/vmz-linux-arm64": "0.3.7",
86
+ "@vmz/vmz-linux-x64": "0.3.7",
87
+ "@vmz/vmz-win32-arm64": "0.3.7",
88
+ "@vmz/vmz-win32-x64": "0.3.7"
87
89
  },
88
90
  "peerDependencies": {
89
- "@vmz/plugin-markdown-it": "0.3.6",
90
- "@vmz/test": "0.3.6",
91
+ "@vmz/plugin-markdown-it": "0.3.7",
92
+ "@vmz/test": "0.3.7",
91
93
  "typescript": "^5.8.3"
92
94
  },
93
95
  "peerDependenciesMeta": {
@@ -120,5 +122,5 @@
120
122
  },
121
123
  "type": "module",
122
124
  "types": "./dist/index.d.ts",
123
- "version": "0.3.6"
125
+ "version": "0.3.7"
124
126
  }