vize 0.730.0 → 0.732.0
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/bin/vize +6 -1
- package/dist/cli.mjs +2 -152
- package/dist/cli.mjs.map +1 -1
- package/dist/{config-A2w3OVmY.mjs → config-CeM51Uzs.mjs} +2 -2
- package/dist/config-CeM51Uzs.mjs.map +1 -0
- package/dist/{config-CwhfgzBn.d.mts → config-t-HbHscF.d.mts} +9 -1
- package/dist/config-t-HbHscF.d.mts.map +1 -0
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +1 -1
- package/dist/content-mapper-cli.d.mts +1 -0
- package/dist/content-mapper-cli.mjs +23 -0
- package/dist/content-mapper-cli.mjs.map +1 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/native-version-guard-Ck4rrm7v.mjs +161 -0
- package/dist/native-version-guard-Ck4rrm7v.mjs.map +1 -0
- package/package.json +2 -2
- package/pkl/jsonschema/LintRuleOptionsSchemaDefinitions.pkl +16 -0
- package/schemas/vize.config.schema.json +28 -0
- package/src/cli.ts +1 -28
- package/src/content-mapper-cli.ts +29 -0
- package/src/native-version-guard.ts +33 -0
- package/src/types/generated.ts +8 -0
- package/virtual-ts.d.cts +44 -0
- package/virtual-ts.d.mts +44 -0
- package/virtual-ts.d.ts +44 -0
- package/dist/config-A2w3OVmY.mjs.map +0 -1
- package/dist/config-CwhfgzBn.d.mts.map +0 -1
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
import { readFileSync, readSync, writeSync } from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
//#region src/content-mapper-launch.ts
|
|
6
|
+
const MAX_HEADER_BYTES = 8 * 1024;
|
|
7
|
+
const MAX_MESSAGE_BYTES = 64 * 1024 * 1024;
|
|
8
|
+
const idle = new Int32Array(new SharedArrayBuffer(4));
|
|
9
|
+
/** Error raised when the launcher receives invalid or incomplete content-mapper framing. */
|
|
10
|
+
var ContentMapperFramingError = class extends Error {};
|
|
11
|
+
function readSome(buffer, offset, length) {
|
|
12
|
+
for (;;) try {
|
|
13
|
+
return readSync(0, buffer, offset, length, null);
|
|
14
|
+
} catch (error) {
|
|
15
|
+
const code = error.code;
|
|
16
|
+
if (code === "EOF") return 0;
|
|
17
|
+
if (code !== "EAGAIN") throw error;
|
|
18
|
+
Atomics.wait(idle, 0, 0, 5);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
/** One frame body, or `null` at EOF before any header byte. */
|
|
22
|
+
function readFrame() {
|
|
23
|
+
const byte = Buffer.alloc(1);
|
|
24
|
+
let header = "";
|
|
25
|
+
let line = "";
|
|
26
|
+
let contentLength;
|
|
27
|
+
for (;;) {
|
|
28
|
+
if (header.length >= MAX_HEADER_BYTES) throw new ContentMapperFramingError("content-mapper headers exceed 8 KiB");
|
|
29
|
+
if (readSome(byte, 0, 1) === 0) {
|
|
30
|
+
if (header.length === 0) return null;
|
|
31
|
+
throw new ContentMapperFramingError("EOF inside content-mapper headers");
|
|
32
|
+
}
|
|
33
|
+
const char = byte.toString("latin1");
|
|
34
|
+
header += char;
|
|
35
|
+
line += char;
|
|
36
|
+
if (char !== "\n") continue;
|
|
37
|
+
if (line === "\r\n" || line === "\n") break;
|
|
38
|
+
const separator = line.indexOf(":");
|
|
39
|
+
if (separator >= 0 && line.slice(0, separator).toLowerCase() === "content-length") {
|
|
40
|
+
if (contentLength !== void 0) throw new ContentMapperFramingError("duplicate Content-Length header");
|
|
41
|
+
const value = line.slice(separator + 1).trim();
|
|
42
|
+
if (!/^\d+$/.test(value)) throw new ContentMapperFramingError("invalid Content-Length");
|
|
43
|
+
contentLength = Number(value);
|
|
44
|
+
}
|
|
45
|
+
line = "";
|
|
46
|
+
}
|
|
47
|
+
if (contentLength === void 0) throw new ContentMapperFramingError("missing Content-Length header");
|
|
48
|
+
if (contentLength > MAX_MESSAGE_BYTES) throw new ContentMapperFramingError("content-mapper message exceeds 64 MiB");
|
|
49
|
+
const body = Buffer.alloc(contentLength);
|
|
50
|
+
for (let offset = 0; offset < contentLength;) {
|
|
51
|
+
const read = readSome(body, offset, contentLength - offset);
|
|
52
|
+
if (read === 0) throw new ContentMapperFramingError("EOF inside a content-mapper message");
|
|
53
|
+
offset += read;
|
|
54
|
+
}
|
|
55
|
+
return body;
|
|
56
|
+
}
|
|
57
|
+
function writeFrame(value) {
|
|
58
|
+
const body = Buffer.from(JSON.stringify(value));
|
|
59
|
+
const frame = Buffer.concat([Buffer.from(`Content-Length: ${body.length}\r\n\r\n`), body]);
|
|
60
|
+
for (let offset = 0; offset < frame.length;) offset += writeSync(1, frame, offset);
|
|
61
|
+
}
|
|
62
|
+
const fail = (id, code, message) => writeFrame({
|
|
63
|
+
error: {
|
|
64
|
+
code,
|
|
65
|
+
message
|
|
66
|
+
},
|
|
67
|
+
id,
|
|
68
|
+
jsonrpc: "2.0"
|
|
69
|
+
});
|
|
70
|
+
function initializeProblem(params) {
|
|
71
|
+
if (typeof params !== "object" || params === null || Array.isArray(params)) return "Invalid initialize params: expected an object";
|
|
72
|
+
const { locale, positionEncodings } = params;
|
|
73
|
+
if (locale !== void 0 && locale !== null && typeof locale !== "string") return "Invalid initialize params: `locale` must be a string";
|
|
74
|
+
if (positionEncodings === void 0) return "Invalid initialize params: missing field `positionEncodings`";
|
|
75
|
+
if (!Array.isArray(positionEncodings) || positionEncodings.some((e) => typeof e !== "string")) return "Invalid initialize params: `positionEncodings` must be a string array";
|
|
76
|
+
if (!positionEncodings.includes("utf-8")) return "Vize requires the utf-8 position encoding";
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Answer the stream until `initialize` succeeds. `true` means the native
|
|
81
|
+
* server takes over initialized; `false` means the host closed the stream
|
|
82
|
+
* first and there is nothing to serve.
|
|
83
|
+
*/
|
|
84
|
+
function answerContentMapperInitialize() {
|
|
85
|
+
for (;;) {
|
|
86
|
+
const body = readFrame();
|
|
87
|
+
if (body === null) return false;
|
|
88
|
+
let request;
|
|
89
|
+
try {
|
|
90
|
+
const parsed = JSON.parse(body.toString("utf8"));
|
|
91
|
+
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) throw new Error("expected a request object");
|
|
92
|
+
request = parsed;
|
|
93
|
+
if (typeof request.method !== "string") throw new Error("missing field `method`");
|
|
94
|
+
} catch (error) {
|
|
95
|
+
fail(null, -32700, `Parse error: ${error.message}`);
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
const id = request.id ?? null;
|
|
99
|
+
if (request.method === "initialize") {
|
|
100
|
+
const problem = initializeProblem(request.params ?? null);
|
|
101
|
+
if (problem === null) {
|
|
102
|
+
writeFrame({
|
|
103
|
+
id,
|
|
104
|
+
jsonrpc: "2.0",
|
|
105
|
+
result: {
|
|
106
|
+
diagnosticSource: "vize",
|
|
107
|
+
positionEncoding: "utf-8"
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
return true;
|
|
111
|
+
}
|
|
112
|
+
fail(id, -32602, problem);
|
|
113
|
+
} else if ([
|
|
114
|
+
"openProject",
|
|
115
|
+
"closeProject",
|
|
116
|
+
"transform"
|
|
117
|
+
].includes(request.method)) fail(id, -32002, "Content mapper is not initialized");
|
|
118
|
+
else fail(id, -32601, `Method not found: ${request.method}`);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
//#endregion
|
|
122
|
+
//#region src/native-version.ts
|
|
123
|
+
/**
|
|
124
|
+
* Compares the `vize` CLI package with the installed `@vizejs/native` package.
|
|
125
|
+
*
|
|
126
|
+
* A mismatch must fail before the native binding loads. Otherwise `vize check`
|
|
127
|
+
* would type-check with a different release than the CLI the user invoked.
|
|
128
|
+
*/
|
|
129
|
+
function nativeVersionMismatchMessage(cliVersion, nativeVersion, env = process.env) {
|
|
130
|
+
if (env.VIZE_ALLOW_NATIVE_VERSION_MISMATCH === "1") return null;
|
|
131
|
+
if (typeof cliVersion !== "string" || cliVersion.length === 0) return "vize package version is missing. Reinstall the vize package before type checking.";
|
|
132
|
+
if (typeof nativeVersion !== "string" || nativeVersion.length === 0) return "@vizejs/native package version is missing. Reinstall dependencies so type checking uses one Vize release.";
|
|
133
|
+
if (cliVersion === nativeVersion) return null;
|
|
134
|
+
return `vize@${cliVersion} and @vizejs/native@${nativeVersion} are different versions. Reinstall dependencies so type checking uses one Vize release.`;
|
|
135
|
+
}
|
|
136
|
+
//#endregion
|
|
137
|
+
//#region src/native-version-guard.ts
|
|
138
|
+
const require = createRequire(import.meta.url);
|
|
139
|
+
function readPackageVersion(filename) {
|
|
140
|
+
return JSON.parse(readFileSync(filename, "utf8")).version;
|
|
141
|
+
}
|
|
142
|
+
/** Refuse a CLI package paired with a different native package version. */
|
|
143
|
+
function assertMatchingNativeVersion() {
|
|
144
|
+
const packageRoot = path.resolve(fileURLToPath(new URL(".", import.meta.url)), "..");
|
|
145
|
+
const cliVersion = readPackageVersion(path.join(packageRoot, "package.json"));
|
|
146
|
+
const nativeSpecifier = ["@vizejs/native", "package.json"].join("/");
|
|
147
|
+
let nativeVersion;
|
|
148
|
+
try {
|
|
149
|
+
nativeVersion = readPackageVersion(require.resolve(nativeSpecifier));
|
|
150
|
+
} catch (error) {
|
|
151
|
+
const code = typeof error === "object" && error !== null && "code" in error ? error.code : void 0;
|
|
152
|
+
if (code === "MODULE_NOT_FOUND" || code === "ERR_PACKAGE_PATH_NOT_EXPORTED") return;
|
|
153
|
+
throw error;
|
|
154
|
+
}
|
|
155
|
+
const message = nativeVersionMismatchMessage(cliVersion, nativeVersion);
|
|
156
|
+
if (message !== null) throw new Error(message);
|
|
157
|
+
}
|
|
158
|
+
//#endregion
|
|
159
|
+
export { ContentMapperFramingError as n, answerContentMapperInitialize as r, assertMatchingNativeVersion as t };
|
|
160
|
+
|
|
161
|
+
//# sourceMappingURL=native-version-guard-Ck4rrm7v.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-version-guard-Ck4rrm7v.mjs","names":[],"sources":["../src/content-mapper-launch.ts","../src/native-version.ts","../src/native-version-guard.ts"],"sourcesContent":["// The TypeScript host waits a fixed 5 s for the content mapper's `initialize`\n// reply, and the first `require()` of a freshly installed native addon can\n// take most of that (#12530). The reply only declares capabilities, so the\n// launcher answers it here and loads the addon afterwards. The native server\n// then reads the rest of the same stream, already initialized.\n//\n// Frames are read from fd 0 with exact lengths and no read-ahead, so every\n// later byte is left for the native reader. Until `initialize` succeeds this\n// replies as the native server does to an uninitialized stream.\nimport { readSync, writeSync } from \"node:fs\";\n\nconst MAX_HEADER_BYTES = 8 * 1024;\nconst MAX_MESSAGE_BYTES = 64 * 1024 * 1024;\nconst idle = new Int32Array(new SharedArrayBuffer(4));\n\n/** Error raised when the launcher receives invalid or incomplete content-mapper framing. */\nexport class ContentMapperFramingError extends Error {}\n\nfunction readSome(buffer: Buffer, offset: number, length: number): number {\n for (;;) {\n try {\n return readSync(0, buffer, offset, length, null);\n } catch (error) {\n const code = (error as NodeJS.ErrnoException).code;\n if (code === \"EOF\") return 0;\n if (code !== \"EAGAIN\") throw error;\n Atomics.wait(idle, 0, 0, 5);\n }\n }\n}\n\n/** One frame body, or `null` at EOF before any header byte. */\nfunction readFrame() {\n const byte = Buffer.alloc(1);\n let header = \"\";\n let line = \"\";\n let contentLength: number | undefined;\n for (;;) {\n if (header.length >= MAX_HEADER_BYTES) {\n throw new ContentMapperFramingError(\"content-mapper headers exceed 8 KiB\");\n }\n if (readSome(byte, 0, 1) === 0) {\n if (header.length === 0) return null;\n throw new ContentMapperFramingError(\"EOF inside content-mapper headers\");\n }\n const char = byte.toString(\"latin1\");\n header += char;\n line += char;\n if (char !== \"\\n\") continue;\n if (line === \"\\r\\n\" || line === \"\\n\") break;\n const separator = line.indexOf(\":\");\n if (separator >= 0 && line.slice(0, separator).toLowerCase() === \"content-length\") {\n if (contentLength !== undefined) {\n throw new ContentMapperFramingError(\"duplicate Content-Length header\");\n }\n const value = line.slice(separator + 1).trim();\n if (!/^\\d+$/.test(value)) throw new ContentMapperFramingError(\"invalid Content-Length\");\n contentLength = Number(value);\n }\n line = \"\";\n }\n if (contentLength === undefined) {\n throw new ContentMapperFramingError(\"missing Content-Length header\");\n }\n if (contentLength > MAX_MESSAGE_BYTES) {\n throw new ContentMapperFramingError(\"content-mapper message exceeds 64 MiB\");\n }\n const body = Buffer.alloc(contentLength);\n for (let offset = 0; offset < contentLength;) {\n const read = readSome(body, offset, contentLength - offset);\n if (read === 0) throw new ContentMapperFramingError(\"EOF inside a content-mapper message\");\n offset += read;\n }\n return body;\n}\n\nfunction writeFrame(value: unknown): void {\n const body = Buffer.from(JSON.stringify(value));\n const frame = Buffer.concat([Buffer.from(`Content-Length: ${body.length}\\r\\n\\r\\n`), body]);\n for (let offset = 0; offset < frame.length;) {\n offset += writeSync(1, frame, offset);\n }\n}\n\n// Key order follows the native server's sorted JSON objects.\nconst fail = (id: unknown, code: number, message: string) =>\n writeFrame({ error: { code, message }, id, jsonrpc: \"2.0\" });\n\nfunction initializeProblem(params: unknown): string | null {\n if (typeof params !== \"object\" || params === null || Array.isArray(params)) {\n return \"Invalid initialize params: expected an object\";\n }\n const { locale, positionEncodings } = params as Record<string, unknown>;\n if (locale !== undefined && locale !== null && typeof locale !== \"string\") {\n return \"Invalid initialize params: `locale` must be a string\";\n }\n if (positionEncodings === undefined) {\n return \"Invalid initialize params: missing field `positionEncodings`\";\n }\n if (!Array.isArray(positionEncodings) || positionEncodings.some((e) => typeof e !== \"string\")) {\n return \"Invalid initialize params: `positionEncodings` must be a string array\";\n }\n if (!positionEncodings.includes(\"utf-8\")) return \"Vize requires the utf-8 position encoding\";\n return null;\n}\n\n/**\n * Answer the stream until `initialize` succeeds. `true` means the native\n * server takes over initialized; `false` means the host closed the stream\n * first and there is nothing to serve.\n */\nexport function answerContentMapperInitialize(): boolean {\n for (;;) {\n const body = readFrame();\n if (body === null) return false;\n let request: Record<string, unknown>;\n try {\n const parsed: unknown = JSON.parse(body.toString(\"utf8\"));\n if (typeof parsed !== \"object\" || parsed === null || Array.isArray(parsed)) {\n throw new Error(\"expected a request object\");\n }\n request = parsed as Record<string, unknown>;\n if (typeof request.method !== \"string\") throw new Error(\"missing field `method`\");\n } catch (error) {\n fail(null, -32700, `Parse error: ${(error as Error).message}`);\n continue;\n }\n const id = request.id ?? null;\n if (request.method === \"initialize\") {\n const problem = initializeProblem(request.params ?? null);\n if (problem === null) {\n writeFrame({\n id,\n jsonrpc: \"2.0\",\n result: { diagnosticSource: \"vize\", positionEncoding: \"utf-8\" },\n });\n return true;\n }\n fail(id, -32602, problem);\n } else if ([\"openProject\", \"closeProject\", \"transform\"].includes(request.method as string)) {\n fail(id, -32002, \"Content mapper is not initialized\");\n } else {\n fail(id, -32601, `Method not found: ${request.method as string}`);\n }\n }\n}\n","/**\n * Compares the `vize` CLI package with the installed `@vizejs/native` package.\n *\n * A mismatch must fail before the native binding loads. Otherwise `vize check`\n * would type-check with a different release than the CLI the user invoked.\n */\nexport function nativeVersionMismatchMessage(\n cliVersion: unknown,\n nativeVersion: unknown,\n env: NodeJS.ProcessEnv = process.env,\n): string | null {\n if (env.VIZE_ALLOW_NATIVE_VERSION_MISMATCH === \"1\") return null;\n if (typeof cliVersion !== \"string\" || cliVersion.length === 0) {\n return \"vize package version is missing. Reinstall the vize package before type checking.\";\n }\n if (typeof nativeVersion !== \"string\" || nativeVersion.length === 0) {\n return \"@vizejs/native package version is missing. Reinstall dependencies so type checking uses one Vize release.\";\n }\n if (cliVersion === nativeVersion) return null;\n return `vize@${cliVersion} and @vizejs/native@${nativeVersion} are different versions. Reinstall dependencies so type checking uses one Vize release.`;\n}\n","import { readFileSync } from \"node:fs\";\nimport { createRequire } from \"node:module\";\nimport path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\n\nimport { nativeVersionMismatchMessage } from \"./native-version.js\";\n\nconst require = createRequire(import.meta.url);\n\nfunction readPackageVersion(filename: string): unknown {\n const parsed = JSON.parse(readFileSync(filename, \"utf8\")) as { version?: unknown };\n return parsed.version;\n}\n\n/** Refuse a CLI package paired with a different native package version. */\nexport function assertMatchingNativeVersion(): void {\n const packageRoot = path.resolve(fileURLToPath(new URL(\".\", import.meta.url)), \"..\");\n const cliVersion = readPackageVersion(path.join(packageRoot, \"package.json\"));\n // A joined specifier stays a runtime lookup. Pack must not inline the\n // build machine's @vizejs/native version over the installed package.\n const nativeSpecifier = [\"@vizejs/native\", \"package.json\"].join(\"/\");\n let nativeVersion: unknown;\n try {\n nativeVersion = readPackageVersion(require.resolve(nativeSpecifier));\n } catch (error) {\n const code =\n typeof error === \"object\" && error !== null && \"code\" in error ? error.code : undefined;\n if (code === \"MODULE_NOT_FOUND\" || code === \"ERR_PACKAGE_PATH_NOT_EXPORTED\") return;\n throw error;\n }\n const message = nativeVersionMismatchMessage(cliVersion, nativeVersion);\n if (message !== null) throw new Error(message);\n}\n"],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vize",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.732.0",
|
|
4
4
|
"description": "Vize - High-performance Vue.js toolchain in Rust",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"access": "public"
|
|
93
93
|
},
|
|
94
94
|
"dependencies": {
|
|
95
|
-
"@vizejs/native": "0.
|
|
95
|
+
"@vizejs/native": "0.732.0",
|
|
96
96
|
"oxc-transform": "0.157.0"
|
|
97
97
|
},
|
|
98
98
|
"devDependencies": {
|
|
@@ -176,6 +176,22 @@ lintRuleOptionsDef: JsonSchema = new JsonSchema {
|
|
|
176
176
|
}
|
|
177
177
|
["vue/sfc-element-order"] = ConfigArtifactDefinitions.sfcElementOrderOptionsDef
|
|
178
178
|
["vue/html-self-closing"] = ConfigArtifactDefinitions.htmlSelfClosingOptionsDef
|
|
179
|
+
["vue/html-button-has-type"] = new JsonSchema {
|
|
180
|
+
type = "object"
|
|
181
|
+
properties {
|
|
182
|
+
["button"] = new JsonSchema { type = "boolean"; default = true }
|
|
183
|
+
["submit"] = new JsonSchema { type = "boolean"; default = true }
|
|
184
|
+
["reset"] = new JsonSchema { type = "boolean"; default = true }
|
|
185
|
+
}
|
|
186
|
+
additionalProperties = false
|
|
187
|
+
}
|
|
188
|
+
["vue/no-use-v-if-with-v-for"] = new JsonSchema {
|
|
189
|
+
type = "object"
|
|
190
|
+
properties {
|
|
191
|
+
["allowUsingIterationVar"] = new JsonSchema { type = "boolean"; default = false }
|
|
192
|
+
}
|
|
193
|
+
additionalProperties = false
|
|
194
|
+
}
|
|
179
195
|
["vue/html-quotes"] = new JsonSchema {
|
|
180
196
|
oneOf = new Listing {
|
|
181
197
|
new JsonSchema {
|
|
@@ -802,6 +802,34 @@
|
|
|
802
802
|
},
|
|
803
803
|
"additionalProperties": false
|
|
804
804
|
},
|
|
805
|
+
"vue/html-button-has-type": {
|
|
806
|
+
"type": "object",
|
|
807
|
+
"properties": {
|
|
808
|
+
"button": {
|
|
809
|
+
"default": true,
|
|
810
|
+
"type": "boolean"
|
|
811
|
+
},
|
|
812
|
+
"submit": {
|
|
813
|
+
"default": true,
|
|
814
|
+
"type": "boolean"
|
|
815
|
+
},
|
|
816
|
+
"reset": {
|
|
817
|
+
"default": true,
|
|
818
|
+
"type": "boolean"
|
|
819
|
+
}
|
|
820
|
+
},
|
|
821
|
+
"additionalProperties": false
|
|
822
|
+
},
|
|
823
|
+
"vue/no-use-v-if-with-v-for": {
|
|
824
|
+
"type": "object",
|
|
825
|
+
"properties": {
|
|
826
|
+
"allowUsingIterationVar": {
|
|
827
|
+
"default": false,
|
|
828
|
+
"type": "boolean"
|
|
829
|
+
}
|
|
830
|
+
},
|
|
831
|
+
"additionalProperties": false
|
|
832
|
+
},
|
|
805
833
|
"vue/html-quotes": {
|
|
806
834
|
"oneOf": [
|
|
807
835
|
{
|
package/src/cli.ts
CHANGED
|
@@ -1,42 +1,15 @@
|
|
|
1
|
-
import { readFileSync } from "node:fs";
|
|
2
1
|
import { createRequire } from "node:module";
|
|
3
|
-
import path from "node:path";
|
|
4
|
-
import { fileURLToPath } from "node:url";
|
|
5
2
|
|
|
6
3
|
import {
|
|
7
4
|
answerContentMapperInitialize,
|
|
8
5
|
ContentMapperFramingError,
|
|
9
6
|
} from "./content-mapper-launch.js";
|
|
10
7
|
import { runInitCli } from "./init.js";
|
|
11
|
-
import {
|
|
8
|
+
import { assertMatchingNativeVersion } from "./native-version-guard.js";
|
|
12
9
|
import { runSetupCli } from "./setup.js";
|
|
13
10
|
|
|
14
11
|
const require = createRequire(import.meta.url);
|
|
15
12
|
|
|
16
|
-
function readPackageVersion(filename: string): unknown {
|
|
17
|
-
const parsed = JSON.parse(readFileSync(filename, "utf8")) as { version?: unknown };
|
|
18
|
-
return parsed.version;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function assertMatchingNativeVersion(): void {
|
|
22
|
-
const packageRoot = path.resolve(fileURLToPath(new URL(".", import.meta.url)), "..");
|
|
23
|
-
const cliVersion = readPackageVersion(path.join(packageRoot, "package.json"));
|
|
24
|
-
// A joined specifier stays a runtime lookup. Pack must not inline the
|
|
25
|
-
// build machine's @vizejs/native version over the installed package.
|
|
26
|
-
const nativeSpecifier = ["@vizejs/native", "package.json"].join("/");
|
|
27
|
-
let nativeVersion: unknown;
|
|
28
|
-
try {
|
|
29
|
-
nativeVersion = readPackageVersion(require.resolve(nativeSpecifier));
|
|
30
|
-
} catch (error) {
|
|
31
|
-
const code =
|
|
32
|
-
typeof error === "object" && error !== null && "code" in error ? error.code : undefined;
|
|
33
|
-
if (code === "MODULE_NOT_FOUND" || code === "ERR_PACKAGE_PATH_NOT_EXPORTED") return;
|
|
34
|
-
throw error;
|
|
35
|
-
}
|
|
36
|
-
const message = nativeVersionMismatchMessage(cliVersion, nativeVersion);
|
|
37
|
-
if (message !== null) throw new Error(message);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
13
|
function fail(error: unknown): void {
|
|
41
14
|
const message = error instanceof Error ? error.message : String(error);
|
|
42
15
|
process.stderr.write(`[vize] ${message}\n`);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
answerContentMapperInitialize,
|
|
5
|
+
ContentMapperFramingError,
|
|
6
|
+
} from "./content-mapper-launch.js";
|
|
7
|
+
import { assertMatchingNativeVersion } from "./native-version-guard.js";
|
|
8
|
+
|
|
9
|
+
const require = createRequire(import.meta.url);
|
|
10
|
+
|
|
11
|
+
try {
|
|
12
|
+
// Reply before package probing and addon loading; the host's `initialize`
|
|
13
|
+
// wait is fixed (#12530), and neither changes these static capabilities.
|
|
14
|
+
if (answerContentMapperInitialize()) {
|
|
15
|
+
assertMatchingNativeVersion();
|
|
16
|
+
const native = require("@vizejs/native") as typeof import("@vizejs/native");
|
|
17
|
+
native.runCli(["content-mapper", "--initialized"]);
|
|
18
|
+
}
|
|
19
|
+
} catch (error) {
|
|
20
|
+
if (error instanceof ContentMapperFramingError) {
|
|
21
|
+
// The native server reports a broken stream the same way.
|
|
22
|
+
process.stderr.write(`vize content-mapper: ${error.message}\n`);
|
|
23
|
+
process.exitCode = 1;
|
|
24
|
+
} else {
|
|
25
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
26
|
+
process.stderr.write(`[vize] ${message}\n`);
|
|
27
|
+
process.exitCode = 1;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { createRequire } from "node:module";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
|
|
6
|
+
import { nativeVersionMismatchMessage } from "./native-version.js";
|
|
7
|
+
|
|
8
|
+
const require = createRequire(import.meta.url);
|
|
9
|
+
|
|
10
|
+
function readPackageVersion(filename: string): unknown {
|
|
11
|
+
const parsed = JSON.parse(readFileSync(filename, "utf8")) as { version?: unknown };
|
|
12
|
+
return parsed.version;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** Refuse a CLI package paired with a different native package version. */
|
|
16
|
+
export function assertMatchingNativeVersion(): void {
|
|
17
|
+
const packageRoot = path.resolve(fileURLToPath(new URL(".", import.meta.url)), "..");
|
|
18
|
+
const cliVersion = readPackageVersion(path.join(packageRoot, "package.json"));
|
|
19
|
+
// A joined specifier stays a runtime lookup. Pack must not inline the
|
|
20
|
+
// build machine's @vizejs/native version over the installed package.
|
|
21
|
+
const nativeSpecifier = ["@vizejs/native", "package.json"].join("/");
|
|
22
|
+
let nativeVersion: unknown;
|
|
23
|
+
try {
|
|
24
|
+
nativeVersion = readPackageVersion(require.resolve(nativeSpecifier));
|
|
25
|
+
} catch (error) {
|
|
26
|
+
const code =
|
|
27
|
+
typeof error === "object" && error !== null && "code" in error ? error.code : undefined;
|
|
28
|
+
if (code === "MODULE_NOT_FOUND" || code === "ERR_PACKAGE_PATH_NOT_EXPORTED") return;
|
|
29
|
+
throw error;
|
|
30
|
+
}
|
|
31
|
+
const message = nativeVersionMismatchMessage(cliVersion, nativeVersion);
|
|
32
|
+
if (message !== null) throw new Error(message);
|
|
33
|
+
}
|
package/src/types/generated.ts
CHANGED
|
@@ -343,6 +343,14 @@ export interface LintRuleOptions {
|
|
|
343
343
|
svg?: "always" | "never" | "any";
|
|
344
344
|
math?: "always" | "never" | "any";
|
|
345
345
|
};
|
|
346
|
+
"vue/html-button-has-type"?: {
|
|
347
|
+
button?: boolean;
|
|
348
|
+
submit?: boolean;
|
|
349
|
+
reset?: boolean;
|
|
350
|
+
};
|
|
351
|
+
"vue/no-use-v-if-with-v-for"?: {
|
|
352
|
+
allowUsingIterationVar?: boolean;
|
|
353
|
+
};
|
|
346
354
|
"vue/html-quotes"?:
|
|
347
355
|
| ("double" | "single")
|
|
348
356
|
| {
|
package/virtual-ts.d.cts
CHANGED
|
@@ -265,6 +265,50 @@ export type $IsLibraryGenericExport<C> = C extends
|
|
|
265
265
|
? true
|
|
266
266
|
: false
|
|
267
267
|
: false;
|
|
268
|
+
// Per-usage aliases over `typeof Component`; `NoInfer<C>` and `keyof (C & {})` keep them non-distributive.
|
|
269
|
+
export type $UsageProps<C> =
|
|
270
|
+
NoInfer<C> extends { __vizeCheck: infer __F }
|
|
271
|
+
? $IsAny<__F> extends true
|
|
272
|
+
? $ComponentRawProps<C>
|
|
273
|
+
: Record<string, unknown>
|
|
274
|
+
: $ComponentRawProps<C>;
|
|
275
|
+
export type $UsageRequiredFallthrough<C> =
|
|
276
|
+
$FallthroughProps<C> extends infer __F
|
|
277
|
+
? [__F extends unknown ? ({} extends __F ? never : __F) : never] extends [never]
|
|
278
|
+
? $RequiredFallthroughProps<C, __F, never>
|
|
279
|
+
: $RequiredFallthroughProps<C, __F>
|
|
280
|
+
: never;
|
|
281
|
+
export type $UsageLibrary<C> =
|
|
282
|
+
NoInfer<C> extends { __vizeCheck: any } | { readonly __vizeComponentMarker: true }
|
|
283
|
+
? false
|
|
284
|
+
: NoInfer<C> extends (...args: any[]) => infer __R
|
|
285
|
+
? 0 extends 1 & __R
|
|
286
|
+
? false
|
|
287
|
+
: "__ctx" extends keyof __R
|
|
288
|
+
? true
|
|
289
|
+
: false
|
|
290
|
+
: false;
|
|
291
|
+
export type $UsagePropsBox<C> =
|
|
292
|
+
NoInfer<C> extends { new (...args: any[]): { $props: infer __P } }
|
|
293
|
+
? [__P]
|
|
294
|
+
: NoInfer<C> extends (props: infer __P, ...args: any[]) => any
|
|
295
|
+
? [__P]
|
|
296
|
+
: [];
|
|
297
|
+
export type $UsageEmitPropsBox<C> =
|
|
298
|
+
NoInfer<C> extends { __vizeEmitProps?: infer __EP } ? [__EP] : [];
|
|
299
|
+
export type $UsageNativeFallthroughBox<C> =
|
|
300
|
+
NoInfer<C> extends {
|
|
301
|
+
readonly __vizeNativeFallthroughRoot: true;
|
|
302
|
+
readonly __vizeFallthroughProps?: infer __F;
|
|
303
|
+
}
|
|
304
|
+
? "__vizeEmitProps" extends keyof {
|
|
305
|
+
[__K in keyof (C & {}) as string extends __K ? never : __K]: unknown;
|
|
306
|
+
}
|
|
307
|
+
? $IsAny<__F> extends true
|
|
308
|
+
? []
|
|
309
|
+
: [__F]
|
|
310
|
+
: []
|
|
311
|
+
: [];
|
|
268
312
|
export type $PropChecker<C, P, T> =
|
|
269
313
|
$IsAny<C> extends true
|
|
270
314
|
? (props: { readonly [K in keyof P]: P[K] } & Record<string, unknown>) => void
|
package/virtual-ts.d.mts
CHANGED
|
@@ -265,6 +265,50 @@ export type $IsLibraryGenericExport<C> = C extends
|
|
|
265
265
|
? true
|
|
266
266
|
: false
|
|
267
267
|
: false;
|
|
268
|
+
// Per-usage aliases over `typeof Component`; `NoInfer<C>` and `keyof (C & {})` keep them non-distributive.
|
|
269
|
+
export type $UsageProps<C> =
|
|
270
|
+
NoInfer<C> extends { __vizeCheck: infer __F }
|
|
271
|
+
? $IsAny<__F> extends true
|
|
272
|
+
? $ComponentRawProps<C>
|
|
273
|
+
: Record<string, unknown>
|
|
274
|
+
: $ComponentRawProps<C>;
|
|
275
|
+
export type $UsageRequiredFallthrough<C> =
|
|
276
|
+
$FallthroughProps<C> extends infer __F
|
|
277
|
+
? [__F extends unknown ? ({} extends __F ? never : __F) : never] extends [never]
|
|
278
|
+
? $RequiredFallthroughProps<C, __F, never>
|
|
279
|
+
: $RequiredFallthroughProps<C, __F>
|
|
280
|
+
: never;
|
|
281
|
+
export type $UsageLibrary<C> =
|
|
282
|
+
NoInfer<C> extends { __vizeCheck: any } | { readonly __vizeComponentMarker: true }
|
|
283
|
+
? false
|
|
284
|
+
: NoInfer<C> extends (...args: any[]) => infer __R
|
|
285
|
+
? 0 extends 1 & __R
|
|
286
|
+
? false
|
|
287
|
+
: "__ctx" extends keyof __R
|
|
288
|
+
? true
|
|
289
|
+
: false
|
|
290
|
+
: false;
|
|
291
|
+
export type $UsagePropsBox<C> =
|
|
292
|
+
NoInfer<C> extends { new (...args: any[]): { $props: infer __P } }
|
|
293
|
+
? [__P]
|
|
294
|
+
: NoInfer<C> extends (props: infer __P, ...args: any[]) => any
|
|
295
|
+
? [__P]
|
|
296
|
+
: [];
|
|
297
|
+
export type $UsageEmitPropsBox<C> =
|
|
298
|
+
NoInfer<C> extends { __vizeEmitProps?: infer __EP } ? [__EP] : [];
|
|
299
|
+
export type $UsageNativeFallthroughBox<C> =
|
|
300
|
+
NoInfer<C> extends {
|
|
301
|
+
readonly __vizeNativeFallthroughRoot: true;
|
|
302
|
+
readonly __vizeFallthroughProps?: infer __F;
|
|
303
|
+
}
|
|
304
|
+
? "__vizeEmitProps" extends keyof {
|
|
305
|
+
[__K in keyof (C & {}) as string extends __K ? never : __K]: unknown;
|
|
306
|
+
}
|
|
307
|
+
? $IsAny<__F> extends true
|
|
308
|
+
? []
|
|
309
|
+
: [__F]
|
|
310
|
+
: []
|
|
311
|
+
: [];
|
|
268
312
|
export type $PropChecker<C, P, T> =
|
|
269
313
|
$IsAny<C> extends true
|
|
270
314
|
? (props: { readonly [K in keyof P]: P[K] } & Record<string, unknown>) => void
|
package/virtual-ts.d.ts
CHANGED
|
@@ -265,6 +265,50 @@ export type $IsLibraryGenericExport<C> = C extends
|
|
|
265
265
|
? true
|
|
266
266
|
: false
|
|
267
267
|
: false;
|
|
268
|
+
// Per-usage aliases over `typeof Component`; `NoInfer<C>` and `keyof (C & {})` keep them non-distributive.
|
|
269
|
+
export type $UsageProps<C> =
|
|
270
|
+
NoInfer<C> extends { __vizeCheck: infer __F }
|
|
271
|
+
? $IsAny<__F> extends true
|
|
272
|
+
? $ComponentRawProps<C>
|
|
273
|
+
: Record<string, unknown>
|
|
274
|
+
: $ComponentRawProps<C>;
|
|
275
|
+
export type $UsageRequiredFallthrough<C> =
|
|
276
|
+
$FallthroughProps<C> extends infer __F
|
|
277
|
+
? [__F extends unknown ? ({} extends __F ? never : __F) : never] extends [never]
|
|
278
|
+
? $RequiredFallthroughProps<C, __F, never>
|
|
279
|
+
: $RequiredFallthroughProps<C, __F>
|
|
280
|
+
: never;
|
|
281
|
+
export type $UsageLibrary<C> =
|
|
282
|
+
NoInfer<C> extends { __vizeCheck: any } | { readonly __vizeComponentMarker: true }
|
|
283
|
+
? false
|
|
284
|
+
: NoInfer<C> extends (...args: any[]) => infer __R
|
|
285
|
+
? 0 extends 1 & __R
|
|
286
|
+
? false
|
|
287
|
+
: "__ctx" extends keyof __R
|
|
288
|
+
? true
|
|
289
|
+
: false
|
|
290
|
+
: false;
|
|
291
|
+
export type $UsagePropsBox<C> =
|
|
292
|
+
NoInfer<C> extends { new (...args: any[]): { $props: infer __P } }
|
|
293
|
+
? [__P]
|
|
294
|
+
: NoInfer<C> extends (props: infer __P, ...args: any[]) => any
|
|
295
|
+
? [__P]
|
|
296
|
+
: [];
|
|
297
|
+
export type $UsageEmitPropsBox<C> =
|
|
298
|
+
NoInfer<C> extends { __vizeEmitProps?: infer __EP } ? [__EP] : [];
|
|
299
|
+
export type $UsageNativeFallthroughBox<C> =
|
|
300
|
+
NoInfer<C> extends {
|
|
301
|
+
readonly __vizeNativeFallthroughRoot: true;
|
|
302
|
+
readonly __vizeFallthroughProps?: infer __F;
|
|
303
|
+
}
|
|
304
|
+
? "__vizeEmitProps" extends keyof {
|
|
305
|
+
[__K in keyof (C & {}) as string extends __K ? never : __K]: unknown;
|
|
306
|
+
}
|
|
307
|
+
? $IsAny<__F> extends true
|
|
308
|
+
? []
|
|
309
|
+
: [__F]
|
|
310
|
+
: []
|
|
311
|
+
: [];
|
|
268
312
|
export type $PropChecker<C, P, T> =
|
|
269
313
|
$IsAny<C> extends true
|
|
270
314
|
? (props: { readonly [K in keyof P]: P[K] } & Record<string, unknown>) => void
|