@vmz/vmz 0.1.30 → 0.1.32
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/dist/index.d.ts +2 -2
- package/dist/index.js +21 -11
- package/dist/pack.js +1 -1
- package/package.json +14 -14
package/dist/index.d.ts
CHANGED
|
@@ -30,9 +30,9 @@ export declare function getProtocolVersions(): ProtocolVersions;
|
|
|
30
30
|
export declare function handshake(host?: ProtocolVersions): void;
|
|
31
31
|
/** Resolve `@vmz/core` package `dist/` for runtime JS copies into app outDir. */
|
|
32
32
|
export declare function resolveCoreRuntimeDist(): string | null;
|
|
33
|
-
/** Runtime companions required by dist/vmz-serve-host.mjs relative imports. */
|
|
33
|
+
/** Runtime companions required by dist/_vmz/host/vmz-serve-host.mjs relative imports. */
|
|
34
34
|
export declare const SERVE_HOST_RUNTIME_FILES: ReadonlyArray<readonly [string, string]>;
|
|
35
|
-
/** Copy serve-host + registry bootstrap modules from `@vmz/core` into
|
|
35
|
+
/** Copy serve-host + registry bootstrap modules from `@vmz/core` into `_vmz/host/`. */
|
|
36
36
|
export declare function materializeServeHostRuntime(outDir: string, coreDist?: string | null): void;
|
|
37
37
|
/** Create a long-lived compile workspace. */
|
|
38
38
|
export declare function createWorkspace(options: WorkspaceOptions): VmzNativeAddon;
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Coarse-grained only — no transform hooks / per-AST callbacks.
|
|
4
4
|
*/
|
|
5
5
|
import { createRequire } from 'node:module';
|
|
6
|
-
import { copyFileSync, existsSync } from 'node:fs';
|
|
6
|
+
import { copyFileSync, existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
7
7
|
import path from 'node:path';
|
|
8
8
|
import { fileURLToPath } from 'node:url';
|
|
9
9
|
import { materializeWechatPackaging } from './wechat-packaging.js';
|
|
@@ -119,17 +119,17 @@ export function resolveCoreRuntimeDist() {
|
|
|
119
119
|
return nested;
|
|
120
120
|
return null;
|
|
121
121
|
}
|
|
122
|
-
/** Runtime companions required by dist/vmz-serve-host.mjs relative imports. */
|
|
122
|
+
/** Runtime companions required by dist/_vmz/host/vmz-serve-host.mjs relative imports. */
|
|
123
123
|
export const SERVE_HOST_RUNTIME_FILES = [
|
|
124
|
-
['serve-host.mjs', 'vmz-serve-host.mjs'],
|
|
125
|
-
['native-addon.js', 'native-addon.js'],
|
|
126
|
-
['list-client-components.js', 'list-client-components.js'],
|
|
127
|
-
['deployment-registry.js', 'deployment-registry.js'],
|
|
128
|
-
['render-host.js', 'render-host.js'],
|
|
129
|
-
['route-layout-chain.js', 'route-layout-chain.js'],
|
|
130
|
-
['localize-body-links.js', 'localize-body-links.js'],
|
|
124
|
+
['serve-host.mjs', '_vmz/host/vmz-serve-host.mjs'],
|
|
125
|
+
['native-addon.js', '_vmz/host/native-addon.js'],
|
|
126
|
+
['list-client-components.js', '_vmz/host/list-client-components.js'],
|
|
127
|
+
['deployment-registry.js', '_vmz/host/deployment-registry.js'],
|
|
128
|
+
['render-host.js', '_vmz/host/render-host.js'],
|
|
129
|
+
['route-layout-chain.js', '_vmz/host/route-layout-chain.js'],
|
|
130
|
+
['localize-body-links.js', '_vmz/host/localize-body-links.js'],
|
|
131
131
|
];
|
|
132
|
-
/** Copy serve-host + registry bootstrap modules from `@vmz/core` into
|
|
132
|
+
/** Copy serve-host + registry bootstrap modules from `@vmz/core` into `_vmz/host/`. */
|
|
133
133
|
export function materializeServeHostRuntime(outDir, coreDist = resolveCoreRuntimeDist()) {
|
|
134
134
|
if (!coreDist) {
|
|
135
135
|
throw new Error('materializeServeHostRuntime: @vmz/core dist not found');
|
|
@@ -140,8 +140,18 @@ export function materializeServeHostRuntime(outDir, coreDist = resolveCoreRuntim
|
|
|
140
140
|
if (!existsSync(src)) {
|
|
141
141
|
throw new Error(`materializeServeHostRuntime: missing ${src}`);
|
|
142
142
|
}
|
|
143
|
-
|
|
143
|
+
mkdirSync(path.dirname(dst), { recursive: true });
|
|
144
|
+
if (srcName === 'serve-host.mjs') {
|
|
145
|
+
// Nested under `_vmz/host/`: delivery-root `vmz-runtime.js` is two levels up.
|
|
146
|
+
const text = readFileSync(src, 'utf8').replace(/from\s+(['"])\.\/vmz-runtime\.js\1/g, 'from $1../../vmz-runtime.js$1');
|
|
147
|
+
writeFileSync(dst, text, 'utf8');
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
copyFileSync(src, dst);
|
|
151
|
+
}
|
|
144
152
|
}
|
|
153
|
+
const stub = path.join(outDir, 'vmz-serve-host.mjs');
|
|
154
|
+
writeFileSync(stub, "// Generated launcher — host companions live under `_vmz/host/` (0.1.31).\nimport './_vmz/host/vmz-serve-host.mjs';\n", 'utf8');
|
|
145
155
|
}
|
|
146
156
|
/** Create a long-lived compile workspace. */
|
|
147
157
|
export function createWorkspace(options) {
|
package/dist/pack.js
CHANGED
|
@@ -20,7 +20,7 @@ export const PACK_MANIFEST_SCHEMA = 'vmz.pack.manifest.v0';
|
|
|
20
20
|
export function ensureRuntimeCompanions(outDir, coreDist) {
|
|
21
21
|
if (!coreDist)
|
|
22
22
|
return [];
|
|
23
|
-
const names = ['dom-core.js', 'dom-ssr.js', 'dom.client.js', 'direct-host-box.js', 'unknown-component.js'];
|
|
23
|
+
const names = ['dom-core.js', 'dom-ssr.js', 'dom.client.js', 'dom.browser.js', 'direct-host-box.js', 'unknown-component.js'];
|
|
24
24
|
const copied = [];
|
|
25
25
|
for (const name of names) {
|
|
26
26
|
const src = path.join(coreDist, name);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vmz/vmz",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.32",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "VMZ Node toolchain — N-API workspace session + CLI (publish name @vmz/vmz)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -48,16 +48,16 @@
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@vmz/commander": "0.1.
|
|
52
|
-
"@vmz/core": "0.1.
|
|
53
|
-
"@vmz/diagnostic": "0.1.
|
|
54
|
-
"@vmz/plugin": "0.1.
|
|
55
|
-
"@vmz/protocol": "0.1.
|
|
51
|
+
"@vmz/commander": "0.1.32",
|
|
52
|
+
"@vmz/core": "0.1.32",
|
|
53
|
+
"@vmz/diagnostic": "0.1.32",
|
|
54
|
+
"@vmz/plugin": "0.1.32",
|
|
55
|
+
"@vmz/protocol": "0.1.32",
|
|
56
56
|
"jiti": "^2.6.1"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@vmz/plugin-markdown-it": "0.1.
|
|
60
|
-
"@vmz/test": "0.1.
|
|
59
|
+
"@vmz/plugin-markdown-it": "0.1.32",
|
|
60
|
+
"@vmz/test": "0.1.32",
|
|
61
61
|
"typescript": "^5.8.3"
|
|
62
62
|
},
|
|
63
63
|
"peerDependenciesMeta": {
|
|
@@ -92,12 +92,12 @@
|
|
|
92
92
|
"cli"
|
|
93
93
|
],
|
|
94
94
|
"optionalDependencies": {
|
|
95
|
-
"@vmz/vmz-win32-x64": "0.1.
|
|
96
|
-
"@vmz/vmz-win32-arm64": "0.1.
|
|
97
|
-
"@vmz/vmz-darwin-x64": "0.1.
|
|
98
|
-
"@vmz/vmz-darwin-arm64": "0.1.
|
|
99
|
-
"@vmz/vmz-linux-x64": "0.1.
|
|
100
|
-
"@vmz/vmz-linux-arm64": "0.1.
|
|
95
|
+
"@vmz/vmz-win32-x64": "0.1.32",
|
|
96
|
+
"@vmz/vmz-win32-arm64": "0.1.32",
|
|
97
|
+
"@vmz/vmz-darwin-x64": "0.1.32",
|
|
98
|
+
"@vmz/vmz-darwin-arm64": "0.1.32",
|
|
99
|
+
"@vmz/vmz-linux-x64": "0.1.32",
|
|
100
|
+
"@vmz/vmz-linux-arm64": "0.1.32"
|
|
101
101
|
},
|
|
102
102
|
"publishConfig": {
|
|
103
103
|
"access": "public"
|