@octane-xplat/build 0.0.0-nightly.g1b95ef7
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/LICENSE +21 -0
- package/README.md +5 -0
- package/dist/add-worker.js +66 -0
- package/dist/build-worker.js +287 -0
- package/dist/compatibility-check.js +155 -0
- package/dist/compatibility-data/compatibility.js +109 -0
- package/dist/compatibility-data/compatibility.json +298 -0
- package/dist/compatibility.js +240 -0
- package/dist/css-platform.js +236 -0
- package/dist/css-platform.types.d.ts +11 -0
- package/dist/dev-inspector.web.js +125 -0
- package/dist/dev-log-client.web.js +79 -0
- package/dist/dev-log-server.js +13 -0
- package/dist/devtools-worker.js +94 -0
- package/dist/doctor-checks.js +414 -0
- package/dist/doctor-tool.js +27 -0
- package/dist/env.js +3 -0
- package/dist/fmt-plan.js +149 -0
- package/dist/fonts-worker.js +31 -0
- package/dist/fonts.js +614 -0
- package/dist/inline-stylesheets.js +44 -0
- package/dist/linux/config.js +43 -0
- package/dist/linux/gtk-runtime.js +86 -0
- package/dist/linux/package.js +189 -0
- package/dist/linux-gtk/bindings.mjs +675 -0
- package/dist/linux-gtk/native-gi-projection.js +36 -0
- package/dist/linux-gtk/vite.d.ts +39 -0
- package/dist/linux-gtk/vite.js +281 -0
- package/dist/macos/config.js +136 -0
- package/dist/macos/core-ui.js +59 -0
- package/dist/macos/core-vite.js +122 -0
- package/dist/macos/doctor-checks.js +58 -0
- package/dist/macos/executables.js +39 -0
- package/dist/macos/jsc-host/runtime.js +134 -0
- package/dist/macos/native.js +286 -0
- package/dist/macos/runtime-package.js +30 -0
- package/dist/macos/tab-item.js +62 -0
- package/dist/macos/vite.d.ts +13 -0
- package/dist/macos/vite.js +22 -0
- package/dist/markdown.js +11 -0
- package/dist/mason-engine.js +20 -0
- package/dist/mcp/contracts/actions.js +133 -0
- package/dist/mcp/dev-bridge.js +363 -0
- package/dist/mcp/dev-socket.js +203 -0
- package/dist/mcp/dev-stack.js +134 -0
- package/dist/mcp/inspection/dom.web.js +46 -0
- package/dist/native-regex.js +123 -0
- package/dist/package-manager.js +106 -0
- package/dist/package-root.js +48 -0
- package/dist/patches.js +356 -0
- package/dist/route-config.js +53 -0
- package/dist/route-data.js +42 -0
- package/dist/route-generator.js +514 -0
- package/dist/route-path.js +29 -0
- package/dist/route-source.js +67 -0
- package/dist/targets.js +37 -0
- package/dist/tsconfig-envs.js +400 -0
- package/dist/tsconfig-pin.js +31 -0
- package/dist/tsrx-leaf.js +57 -0
- package/dist/typecheck-globals/macos.d.ts +21 -0
- package/dist/typecheck-globals/native.d.ts +42 -0
- package/dist/ui/src/markdown/markdown-ast.js +33 -0
- package/dist/ui/src/markdown/markdown-character-references.js +79 -0
- package/dist/ui/src/markdown/markdown-parse.js +1930 -0
- package/dist/ui/src/markdown/markdown-plugins.js +564 -0
- package/dist/ui/src/markdown/markdown-url.js +17 -0
- package/dist/updates-worker.js +34 -0
- package/dist/upgrade-worker.js +63 -0
- package/dist/vite-target.js +57 -0
- package/dist/vite.d.ts +125 -0
- package/dist/vite.js +797 -0
- package/dist/workshop-worker.js +181 -0
- package/package.json +74 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Alec Larson
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { installedPackageRoot } from "./package-root.js";
|
|
2
|
+
import { packageManagerFor } from "./package-manager.js";
|
|
3
|
+
import { readFileSync, realpathSync } from "node:fs";
|
|
4
|
+
import { createRequire } from "node:module";
|
|
5
|
+
import { join, sep } from "node:path";
|
|
6
|
+
import { pathToFileURL } from "node:url";
|
|
7
|
+
import { spawnSync } from "node:child_process";
|
|
8
|
+
// ../cli/src/add-worker.ts
|
|
9
|
+
async function addOperation(request) {
|
|
10
|
+
const project = realpathSync(process.cwd());
|
|
11
|
+
const manager = packageManagerFor(project);
|
|
12
|
+
const root = installedPackageRoot(project, "create-octane-xplat");
|
|
13
|
+
if (!root) {
|
|
14
|
+
const install = manager === "pnpm" ? `pnpm add -D create-octane-xplat@${request.frameworkVersion}` : `bun add --dev create-octane-xplat@${request.frameworkVersion}`;
|
|
15
|
+
throw new Error(`Install create-octane-xplat@${request.frameworkVersion} in the selected project (${install}) before enabling platforms`);
|
|
16
|
+
}
|
|
17
|
+
const pkg = JSON.parse(readFileSync(join(root, "package.json"), "utf8"));
|
|
18
|
+
if (pkg.version !== request.frameworkVersion) throw new Error(`Platform addition requires create-octane-xplat@${request.frameworkVersion}; the selected project has ${pkg.version}`);
|
|
19
|
+
const require = createRequire(join(project, "package.json"));
|
|
20
|
+
const load = async (name) => {
|
|
21
|
+
const entry = realpathSync(require.resolve("create-octane-xplat/" + name));
|
|
22
|
+
if (!entry.startsWith(root + sep)) throw new Error("Creator module escapes the selected installation");
|
|
23
|
+
return import(pathToFileURL(entry).href);
|
|
24
|
+
};
|
|
25
|
+
const scaffold = await load("scaffold"), compatibility = await load("compatibility");
|
|
26
|
+
const workspace = realpathSync(compatibility.compatibilityRoot(project));
|
|
27
|
+
if (typeof request.workspaceRoot !== "string" || realpathSync(request.workspaceRoot) !== workspace) throw new Error("Platform additions require the selected workspace identity");
|
|
28
|
+
const data = {
|
|
29
|
+
version: 1,
|
|
30
|
+
project,
|
|
31
|
+
root: workspace,
|
|
32
|
+
frameworkVersion: pkg.version
|
|
33
|
+
};
|
|
34
|
+
if (request.operation === "add-targets") return {
|
|
35
|
+
...data,
|
|
36
|
+
targets: scaffold.selectableTargets.map((id) => ({
|
|
37
|
+
id,
|
|
38
|
+
label: scaffold.targets[id].label,
|
|
39
|
+
note: scaffold.targets[id].note ?? "",
|
|
40
|
+
enabled: scaffold.targetEnabled(project, id)
|
|
41
|
+
}))
|
|
42
|
+
};
|
|
43
|
+
if (request.operation === "add-plan") {
|
|
44
|
+
if (typeof request.target !== "string" || !scaffold.selectableTargets.includes(request.target)) throw new Error("Unknown platform target");
|
|
45
|
+
if (typeof scaffold.planTarget !== "function") throw new Error("Update the selected creator package to obtain scaffold planning support");
|
|
46
|
+
return {
|
|
47
|
+
...data,
|
|
48
|
+
plan: scaffold.planTarget(project, request.target)
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
if (request.operation === "add-install") {
|
|
52
|
+
const windows = process.platform === "win32";
|
|
53
|
+
const result = spawnSync(windows ? `${manager} install --no-frozen-lockfile` : manager, windows ? [] : ["install", "--no-frozen-lockfile"], {
|
|
54
|
+
cwd: project,
|
|
55
|
+
stdio: "inherit",
|
|
56
|
+
shell: windows
|
|
57
|
+
});
|
|
58
|
+
if (result.error) throw result.error;
|
|
59
|
+
return {
|
|
60
|
+
...data,
|
|
61
|
+
exitCode: result.status ?? 1
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
throw new Error("Unknown platform operation");
|
|
65
|
+
}
|
|
66
|
+
export { addOperation };
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
import { srcUrl } from "./env.js";
|
|
2
|
+
import { existsSync, lstatSync, readFileSync, readdirSync, realpathSync, statSync, writeFileSync } from "node:fs";
|
|
3
|
+
import { createRequire } from "node:module";
|
|
4
|
+
import { basename, dirname, join, relative, resolve, sep } from "node:path";
|
|
5
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
6
|
+
import { createHash } from "node:crypto";
|
|
7
|
+
import { Console } from "node:console";
|
|
8
|
+
// ../cli/src/build-worker.ts
|
|
9
|
+
var protocol = "octane-build-worker";
|
|
10
|
+
var version = 1;
|
|
11
|
+
function projectViteEntry() {
|
|
12
|
+
let current = process.cwd();
|
|
13
|
+
for (;;) {
|
|
14
|
+
const packageRoot = join(current, "node_modules/vite");
|
|
15
|
+
if (existsSync(join(packageRoot, "package.json"))) {
|
|
16
|
+
const require = createRequire(join(current, "package.json"));
|
|
17
|
+
const entry = realpathSync(require.resolve("vite"));
|
|
18
|
+
if (!entry.startsWith(realpathSync(packageRoot) + sep)) throw new Error("Vite must resolve from the selected project");
|
|
19
|
+
return entry;
|
|
20
|
+
}
|
|
21
|
+
const parent = dirname(current);
|
|
22
|
+
if (parent === current) throw new Error("Install vite in the selected project (for example: bun add --dev vite).");
|
|
23
|
+
current = parent;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
var [, , requestFile, resultFile] = process.argv;
|
|
27
|
+
if (!requestFile || !resultFile) throw new Error("Usage: node build-worker.js REQUEST.json RESULT.json");
|
|
28
|
+
globalThis.console = new Console({
|
|
29
|
+
stdout: process.stderr,
|
|
30
|
+
stderr: process.stderr
|
|
31
|
+
});
|
|
32
|
+
var id = null;
|
|
33
|
+
var file;
|
|
34
|
+
var service = false;
|
|
35
|
+
var warnings = [];
|
|
36
|
+
try {
|
|
37
|
+
if (statSync(requestFile).size > 67108864) throw new Error("Worker request exceeds 64 MiB");
|
|
38
|
+
const request = JSON.parse(readFileSync(requestFile, "utf8"));
|
|
39
|
+
id = request.id;
|
|
40
|
+
if (request.protocol !== protocol || request.version !== version || typeof id !== "string") throw new Error("Unsupported build worker protocol");
|
|
41
|
+
if (typeof request.project !== "string" || realpathSync(request.project) !== realpathSync(process.cwd())) throw new Error("Worker project must match the selected working directory");
|
|
42
|
+
let data;
|
|
43
|
+
if ([
|
|
44
|
+
"add-targets",
|
|
45
|
+
"add-plan",
|
|
46
|
+
"add-install"
|
|
47
|
+
].includes(request.operation)) {
|
|
48
|
+
const { addOperation } = await import("./add-worker.js");
|
|
49
|
+
data = await addOperation(request);
|
|
50
|
+
} else if (request.operation === "workshop-build") {
|
|
51
|
+
const { workshopBuildOperation } = await import("./workshop-worker.js");
|
|
52
|
+
data = await workshopBuildOperation(request);
|
|
53
|
+
} else if (request.operation === "workshop-dev") {
|
|
54
|
+
service = true;
|
|
55
|
+
const { workshopService } = await import("./workshop-worker.js");
|
|
56
|
+
data = await workshopService(request, requestFile, resultFile);
|
|
57
|
+
} else if (request.operation === "devtools-desktop") {
|
|
58
|
+
service = true;
|
|
59
|
+
const { devtoolsDesktopService } = await import("./devtools-worker.js");
|
|
60
|
+
data = await devtoolsDesktopService(request, requestFile, resultFile);
|
|
61
|
+
} else if (request.operation === "devtools-web") {
|
|
62
|
+
const { devtoolsWebOperation } = await import("./devtools-worker.js");
|
|
63
|
+
data = await devtoolsWebOperation(request);
|
|
64
|
+
} else if (request.operation === "workshop-init-plan") {
|
|
65
|
+
const { workshopInitPlan } = await import("./workshop-worker.js");
|
|
66
|
+
data = await workshopInitPlan(request);
|
|
67
|
+
} else if (["workshop-list", "workshop-doctor"].includes(request.operation)) {
|
|
68
|
+
const { workshopInspection } = await import("./workshop-worker.js");
|
|
69
|
+
data = await workshopInspection(request);
|
|
70
|
+
} else if (request.operation === "fonts-plan") {
|
|
71
|
+
const { fontOperation } = await import("./fonts-worker.js");
|
|
72
|
+
data = await fontOperation(request, requestFile);
|
|
73
|
+
} else if (request.operation === "updates-check") {
|
|
74
|
+
const { checkUpdatesDependencies } = await import("./updates-worker.js");
|
|
75
|
+
data = checkUpdatesDependencies();
|
|
76
|
+
} else if (request.operation === "route-plan") {
|
|
77
|
+
const { planRoutes } = await import("./route-generator.js");
|
|
78
|
+
for (const key of ["directory", "output"]) if (request[key] !== void 0 && typeof request[key] !== "string") throw new Error(`Expected ${key} string`);
|
|
79
|
+
if (typeof request.bake !== "boolean") throw new Error("Expected bake boolean");
|
|
80
|
+
const plan = await planRoutes(process.cwd(), request.directory, request.output, {
|
|
81
|
+
bake: request.bake,
|
|
82
|
+
onWarn: (message) => warnings.push(message),
|
|
83
|
+
onSource: (source) => {
|
|
84
|
+
file = source;
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
data = {
|
|
88
|
+
version: 1,
|
|
89
|
+
count: plan.count,
|
|
90
|
+
outputs: [...plan.outputs].map(([file, source]) => ({
|
|
91
|
+
file,
|
|
92
|
+
source
|
|
93
|
+
}))
|
|
94
|
+
};
|
|
95
|
+
} else if ([
|
|
96
|
+
"upgrade-plan",
|
|
97
|
+
"upgrade-apply",
|
|
98
|
+
"upgrade-install",
|
|
99
|
+
"upgrade-verify"
|
|
100
|
+
].includes(request.operation)) {
|
|
101
|
+
const { upgradeOperation } = await import("./upgrade-worker.js");
|
|
102
|
+
data = upgradeOperation(request);
|
|
103
|
+
} else if (request.operation === "doctor") {
|
|
104
|
+
const platform = request.macosReport;
|
|
105
|
+
if (platform !== null && platform !== void 0) {
|
|
106
|
+
if (platform.version !== 1 || typeof platform.root !== "string" || realpathSync(platform.root) !== realpathSync(process.cwd()) || !Array.isArray(platform.rows) || platform.rows.length > 512 || !platform.rows.every((row) => row && typeof row.name === "string" && typeof row.ok === "boolean" && (row.detail === void 0 || typeof row.detail === "string") && (row.hint === void 0 || typeof row.hint === "string"))) throw new Error("Invalid selected-project macOS diagnostic report");
|
|
107
|
+
}
|
|
108
|
+
const { inspectDoctor } = await import("./doctor-checks.js");
|
|
109
|
+
const report = await inspectDoctor({ macosChecks: async () => {
|
|
110
|
+
if (!platform) throw new Error("Install or update @octane-xplat/macos-build for macOS diagnostics");
|
|
111
|
+
return platform.rows;
|
|
112
|
+
} });
|
|
113
|
+
data = {
|
|
114
|
+
version: 1,
|
|
115
|
+
root: realpathSync(process.cwd()),
|
|
116
|
+
...report
|
|
117
|
+
};
|
|
118
|
+
} else if (request.operation === "patches-check" || request.operation === "patches-apply") {
|
|
119
|
+
if (request.packageManager !== null && request.packageManager !== void 0 && !["bun", "pnpm"].includes(request.packageManager)) throw new Error("Expected bun or pnpm package manager");
|
|
120
|
+
const { packageManagerRoot, packageManagerFor } = await import("./package-manager.js");
|
|
121
|
+
const root = realpathSync(packageManagerRoot(process.cwd()));
|
|
122
|
+
const manager = packageManagerFor(process.cwd(), request.packageManager ?? void 0);
|
|
123
|
+
if (typeof request.workspaceRoot !== "string" || root !== realpathSync(request.workspaceRoot) || manager !== request.expectedManager) throw new Error("Patch workspace or package manager changed; retry the operation");
|
|
124
|
+
const { inspectPatches, applyPatches, patchStateDetail, canonicalPatchesDir } = await import("./patches.js");
|
|
125
|
+
if (!existsSync(join(canonicalPatchesDir, "manifest.json"))) throw new Error("Update the selected project's @octane-xplat/cli: canonical patch assets are missing");
|
|
126
|
+
if (request.operation === "patches-check") data = {
|
|
127
|
+
version: 1,
|
|
128
|
+
root,
|
|
129
|
+
manager,
|
|
130
|
+
rows: inspectPatches(process.cwd(), { packageManager: manager }).map((row) => ({
|
|
131
|
+
...row,
|
|
132
|
+
detail: patchStateDetail(row.state)
|
|
133
|
+
}))
|
|
134
|
+
};
|
|
135
|
+
else {
|
|
136
|
+
if (typeof request.force !== "boolean") throw new Error("Expected force boolean");
|
|
137
|
+
data = {
|
|
138
|
+
version: 1,
|
|
139
|
+
root,
|
|
140
|
+
manager,
|
|
141
|
+
report: applyPatches(process.cwd(), {
|
|
142
|
+
force: request.force,
|
|
143
|
+
packageManager: manager
|
|
144
|
+
})
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
} else if (request.operation === "linux-package") {
|
|
148
|
+
if (!["darwin", "linux"].includes(process.platform)) throw new Error("Linux packaging requires a POSIX build host");
|
|
149
|
+
const stage = request.stagingRoot;
|
|
150
|
+
const release = join(process.cwd(), "dist/linux");
|
|
151
|
+
if (typeof stage !== "string" || !lstatSync(stage).isDirectory() || dirname(realpathSync(stage)) !== realpathSync(release) || !basename(stage).startsWith(".xplat-linux-") || readdirSync(stage).length) throw new Error("Expected an empty native-owned Linux staging directory");
|
|
152
|
+
const { packageLinux } = await import("./linux/package.js");
|
|
153
|
+
data = await packageLinux(process.cwd(), {
|
|
154
|
+
stagingRoot: stage,
|
|
155
|
+
publish: false,
|
|
156
|
+
gtkRuntimeRoot: process.env.XPLAT_GTK_RUNTIME_PAYLOAD
|
|
157
|
+
});
|
|
158
|
+
} else if (request.operation === "fmt-plan") {
|
|
159
|
+
if (!Array.isArray(request.inputs) || !request.inputs.every((value) => typeof value === "string")) throw new Error("fmt-plan requires input paths");
|
|
160
|
+
if (request.stdin !== null && (!request.stdin || typeof request.stdin.path !== "string" || typeof request.stdin.source !== "string")) throw new Error("fmt-plan requires null or text stdin");
|
|
161
|
+
const { planFormat } = await import("./fmt-plan.js");
|
|
162
|
+
data = await planFormat(process.cwd(), request.inputs, request.stdin, async () => {
|
|
163
|
+
const { resolveProjectTool } = await import("./package-root.js");
|
|
164
|
+
const entry = resolveProjectTool(process.cwd(), "@octane-xplat/fmt");
|
|
165
|
+
if (!entry) throw new Error("Install @octane-xplat/fmt in the selected project (bun add --dev @octane-xplat/fmt).");
|
|
166
|
+
const { createFormatter } = await import(pathToFileURL(entry).href);
|
|
167
|
+
return createFormatter({ cwd: process.cwd() });
|
|
168
|
+
});
|
|
169
|
+
} else if (request.operation === "typecheck-config") {
|
|
170
|
+
const { loadEnvManifest, expandEnvPrograms } = await import("./tsconfig-envs.js");
|
|
171
|
+
const project = process.cwd();
|
|
172
|
+
const loaded = loadEnvManifest(project);
|
|
173
|
+
const configs = ["tsconfig.json"].filter((name) => existsSync(join(project, name))).map((name) => join(project, name));
|
|
174
|
+
if (loaded) {
|
|
175
|
+
const declared = loaded.manifest.environments;
|
|
176
|
+
const required = [...[
|
|
177
|
+
"native",
|
|
178
|
+
"ios",
|
|
179
|
+
"android",
|
|
180
|
+
"windows"
|
|
181
|
+
].some((name) => declared[name]) ? ["native"] : [], ...declared.macos ? ["macos"] : []];
|
|
182
|
+
const ambientRoot = [fileURLToPath(srcUrl(import.meta.url, "")), fileURLToPath(new URL(".", "" + import.meta.url))].find((root) => required.every((name) => existsSync(join(root, "typecheck-globals", name + ".d.ts"))));
|
|
183
|
+
if (!ambientRoot) throw new Error("Update the project's @octane-xplat/cli: required typecheck declarations are missing");
|
|
184
|
+
configs.push(...expandEnvPrograms(project, loaded, { ambientRoot }).map((program) => program.configPath));
|
|
185
|
+
} else if (existsSync(join(project, "tsconfig.native.json"))) configs.push(join(project, "tsconfig.native.json"));
|
|
186
|
+
data = {
|
|
187
|
+
version: 1,
|
|
188
|
+
configs
|
|
189
|
+
};
|
|
190
|
+
} else if (request.operation === "route-analyze") {
|
|
191
|
+
const { routeSourceMetadata } = await import("./route-source.js");
|
|
192
|
+
if (!Array.isArray(request.files)) throw new Error("route-analyze requires files");
|
|
193
|
+
data = request.files.map((entry) => {
|
|
194
|
+
if (typeof entry.file !== "string" || typeof entry.source !== "string") throw new Error("Expected route source strings");
|
|
195
|
+
file = entry.file;
|
|
196
|
+
return {
|
|
197
|
+
file,
|
|
198
|
+
sha256: createHash("sha256").update(entry.source).digest("hex"),
|
|
199
|
+
metadata: routeSourceMetadata(entry.source, file)
|
|
200
|
+
};
|
|
201
|
+
});
|
|
202
|
+
} else if (request.operation === "route-bake") {
|
|
203
|
+
const { assertRouteDataJson } = await import("./route-data.js");
|
|
204
|
+
if (!Array.isArray(request.loaders) || !Array.isArray(request.markdown)) throw new Error("route-bake requires loaders and markdown arrays");
|
|
205
|
+
const { mdToDoc } = await import("./markdown.js");
|
|
206
|
+
const result = Object.create(null);
|
|
207
|
+
for (const entry of request.markdown) {
|
|
208
|
+
if (typeof entry.name !== "string" || typeof entry.file !== "string" || typeof entry.source !== "string") throw new Error("Expected Markdown source strings");
|
|
209
|
+
file = entry.file;
|
|
210
|
+
const value = mdToDoc(entry.source);
|
|
211
|
+
assertRouteDataJson(value, entry.name, entry.file);
|
|
212
|
+
result[entry.name] = value;
|
|
213
|
+
}
|
|
214
|
+
if (request.loaders.length) {
|
|
215
|
+
const server = await (await import(pathToFileURL(projectViteEntry()).href)).createServer({
|
|
216
|
+
root: process.cwd(),
|
|
217
|
+
configFile: false,
|
|
218
|
+
logLevel: "silent",
|
|
219
|
+
server: { middlewareMode: true },
|
|
220
|
+
appType: "custom"
|
|
221
|
+
});
|
|
222
|
+
try {
|
|
223
|
+
for (const entry of request.loaders) {
|
|
224
|
+
if (typeof entry.name !== "string" || typeof entry.file !== "string") throw new Error("Expected loader references");
|
|
225
|
+
file = entry.file;
|
|
226
|
+
const module = await server.ssrLoadModule(resolve(process.cwd(), entry.file));
|
|
227
|
+
const loader = module?.loader ?? module?.default;
|
|
228
|
+
if (typeof loader !== "function") throw new Error(`baked route '${entry.name}' — ${relative(process.cwd(), resolve(entry.file))} must export a 'loader' function`);
|
|
229
|
+
const value = await loader({});
|
|
230
|
+
assertRouteDataJson(value, entry.name, entry.file);
|
|
231
|
+
result[entry.name] = value;
|
|
232
|
+
}
|
|
233
|
+
} finally {
|
|
234
|
+
await server.close();
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
data = result;
|
|
238
|
+
} else if (request.operation === "action-validate") {
|
|
239
|
+
if (!["input", "output"].includes(request.phase)) throw new Error("Expected action validation phase");
|
|
240
|
+
const { validateActionDeclaration, validateActionInput, validateActionOutput, actionAvailability, DEV_ACTIONS_DEFAULT_TIMEOUT_MS, DEV_ACTIONS_MAX_TIMEOUT_MS } = await import("./mcp/contracts/actions.js");
|
|
241
|
+
const declaration = validateActionDeclaration(request.action);
|
|
242
|
+
let policy;
|
|
243
|
+
if (request.includePolicy === true && declaration.length === 0) {
|
|
244
|
+
const action = request.action;
|
|
245
|
+
const availability = actionAvailability(action, request.platform);
|
|
246
|
+
const inapplicable = action.availability?.platforms !== void 0 && !action.availability.platforms.includes(request.platform);
|
|
247
|
+
policy = {
|
|
248
|
+
allowed: availability.ready || !inapplicable && Boolean(action.availability?.route),
|
|
249
|
+
reason: availability.reason ?? "",
|
|
250
|
+
externalEffects: Boolean(action.effects?.externalEffects),
|
|
251
|
+
serialized: action.execution?.concurrency !== "overlap",
|
|
252
|
+
cancellable: Boolean(action.execution?.cancellable),
|
|
253
|
+
timeoutMs: Math.min(action.execution?.timeoutMs ?? DEV_ACTIONS_DEFAULT_TIMEOUT_MS, DEV_ACTIONS_MAX_TIMEOUT_MS)
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
data = {
|
|
257
|
+
declaration,
|
|
258
|
+
...request.includePolicy === true ? { policy } : {},
|
|
259
|
+
checked: declaration.length ? null : request.phase === "input" ? validateActionInput(request.action.input, request.value) : validateActionOutput(request.action.result, request.value)
|
|
260
|
+
};
|
|
261
|
+
} else throw new Error(`Unsupported build operation: ${String(request.operation)}`);
|
|
262
|
+
writeFileSync(resultFile, JSON.stringify({
|
|
263
|
+
protocol,
|
|
264
|
+
version,
|
|
265
|
+
id,
|
|
266
|
+
ok: true,
|
|
267
|
+
data,
|
|
268
|
+
warnings
|
|
269
|
+
}));
|
|
270
|
+
} catch (error) {
|
|
271
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
272
|
+
console.error(`${file ? `${file}: ` : ""}${message}`);
|
|
273
|
+
writeFileSync(resultFile, JSON.stringify({
|
|
274
|
+
protocol,
|
|
275
|
+
version,
|
|
276
|
+
id,
|
|
277
|
+
ok: false,
|
|
278
|
+
warnings,
|
|
279
|
+
error: {
|
|
280
|
+
code: "build-operation-failed",
|
|
281
|
+
message,
|
|
282
|
+
file
|
|
283
|
+
}
|
|
284
|
+
}));
|
|
285
|
+
process.exitCode = 1;
|
|
286
|
+
if (service) setImmediate(() => process.exit(1));
|
|
287
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { packageManagerFor } from "./package-manager.js";
|
|
2
|
+
import { compatibility, dependencySections, managedPackage, managedSpecifier, projectProfile } from "./compatibility-data/compatibility.js";
|
|
3
|
+
import { masonCorePackage, masonFullPackage, masonLegacyPackage } from "./mason-engine.js";
|
|
4
|
+
import { localSpecifier, readPackage, readWorkspace, resolveCatalog, workspaceRoot } from "./compatibility.js";
|
|
5
|
+
import { existsSync, realpathSync } from "node:fs";
|
|
6
|
+
import { createRequire } from "node:module";
|
|
7
|
+
import { join, relative, resolve, sep } from "node:path";
|
|
8
|
+
import { execFileSync } from "node:child_process";
|
|
9
|
+
// ../cli/src/compatibility-check.ts
|
|
10
|
+
/** Resolve metadata without importing package code, including export-restricted packages. */
|
|
11
|
+
function installedPackage(from, name) {
|
|
12
|
+
const require = createRequire(join(from, "package.json"));
|
|
13
|
+
for (const path of require.resolve.paths(name) ?? []) {
|
|
14
|
+
const file = join(path, name, "package.json");
|
|
15
|
+
if (existsSync(file)) {
|
|
16
|
+
const dir = realpathSync(join(path, name));
|
|
17
|
+
return {
|
|
18
|
+
dir,
|
|
19
|
+
pkg: readPackage(join(dir, "package.json"))
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
var versionTuple = (version) => version.replace(/^v/, "").split(/[.-]/).slice(0, 3).map(Number);
|
|
25
|
+
var atLeast = (actual, minimum) => {
|
|
26
|
+
const left = versionTuple(actual);
|
|
27
|
+
const right = versionTuple(minimum);
|
|
28
|
+
if (left.length !== 3 || left.some(Number.isNaN)) return false;
|
|
29
|
+
for (let index = 0; index < 3; index++) if (left[index] !== right[index]) return left[index] > right[index];
|
|
30
|
+
return true;
|
|
31
|
+
};
|
|
32
|
+
function commandVersion(command, cwd) {
|
|
33
|
+
try {
|
|
34
|
+
const shell = process.platform === "win32" && ["bun", "pnpm"].includes(command);
|
|
35
|
+
return execFileSync(shell ? `${command} --version` : command, shell ? [] : ["--version"], {
|
|
36
|
+
cwd,
|
|
37
|
+
encoding: "utf8",
|
|
38
|
+
timeout: 1e4,
|
|
39
|
+
shell
|
|
40
|
+
}).trim();
|
|
41
|
+
} catch {
|
|
42
|
+
return "unavailable";
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/** Declarations and the reachable installed graph are independent checks. */
|
|
46
|
+
function inspectCompatibility(dir, tools) {
|
|
47
|
+
dir = realpathSync(resolve(dir));
|
|
48
|
+
const root = workspaceRoot(dir);
|
|
49
|
+
const manager = packageManagerFor(root);
|
|
50
|
+
const config = readWorkspace(root).toJS() ?? {};
|
|
51
|
+
const pkg = readPackage(join(dir, "package.json"));
|
|
52
|
+
const profile = projectProfile(pkg);
|
|
53
|
+
const rows = [];
|
|
54
|
+
const row = (name, ok, detail, hint = "run xplat upgrade, then bun run xplat doctor") => rows.push({
|
|
55
|
+
name,
|
|
56
|
+
ok,
|
|
57
|
+
detail,
|
|
58
|
+
...!ok && { hint }
|
|
59
|
+
});
|
|
60
|
+
const runtime = tools ?? {
|
|
61
|
+
node: commandVersion("node", dir),
|
|
62
|
+
[manager]: commandVersion(manager, dir)
|
|
63
|
+
};
|
|
64
|
+
row("compatibility Node", atLeast(runtime.node, compatibility.tools.nodeMinimum), `${runtime.node}; requires >=${compatibility.tools.nodeMinimum}`, `install Node >=${compatibility.tools.nodeMinimum}`);
|
|
65
|
+
row(`compatibility ${manager}`, manager === "bun" ? atLeast(runtime.bun ?? "", compatibility.tools.bun) : runtime.pnpm === compatibility.tools.pnpm, `${runtime[manager]}; expected ${compatibility.tools[manager]}`, `use ${manager} ${compatibility.tools[manager]}`);
|
|
66
|
+
const rootPkg = existsSync(join(root, "package.json")) ? readPackage(join(root, "package.json")) : pkg;
|
|
67
|
+
row("compatibility packageManager", rootPkg.packageManager?.split("+")[0] === `${manager}@${compatibility.tools[manager]}`, rootPkg.packageManager ?? "packageManager is missing");
|
|
68
|
+
const local = /* @__PURE__ */ new Set();
|
|
69
|
+
const declared = Object.assign({}, ...dependencySections.map((section) => pkg[section]));
|
|
70
|
+
const engine = profile === "windows" ? masonFullPackage : masonCorePackage;
|
|
71
|
+
const replacedEngines = [
|
|
72
|
+
masonCorePackage,
|
|
73
|
+
masonFullPackage,
|
|
74
|
+
masonLegacyPackage
|
|
75
|
+
].filter((name) => name !== engine);
|
|
76
|
+
for (const name of replacedEngines) if (declared[name]) row(`compatibility mason engine ${name}`, false, `${name} was replaced by ${engine}; both ship the native Mason framework`, "run bun run xplat upgrade");
|
|
77
|
+
for (const [name, spec] of Object.entries(declared)) {
|
|
78
|
+
if (!managedPackage(name, profile)) continue;
|
|
79
|
+
const resolved = resolveCatalog(spec, name, config);
|
|
80
|
+
if (localSpecifier(resolved)) {
|
|
81
|
+
local.add(name);
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
const expected = managedSpecifier(name, profile);
|
|
85
|
+
row(`compatibility pin ${name}`, resolved === expected, `${resolved}; expected ${expected}`);
|
|
86
|
+
}
|
|
87
|
+
if (declared.octane && !declared["@tsrx/oxc"] && !local.has("octane")) row("compatibility compiler peer @tsrx/oxc", false, "Octane requires the app to declare @tsrx/oxc");
|
|
88
|
+
if (declared["@octane-xplat/nativescript-octane"] && !declared[engine] && !replacedEngines.some((name) => declared[name]) && !local.has("@octane-xplat/nativescript-octane")) row(`compatibility mason engine ${engine}`, false, `the NativeScript driver requires ${engine} for container layout`, "run bun run xplat upgrade (or add the catalog pin)");
|
|
89
|
+
const queue = Object.keys(declared).map((name) => ({
|
|
90
|
+
from: dir,
|
|
91
|
+
name,
|
|
92
|
+
required: !pkg.optionalDependencies?.[name],
|
|
93
|
+
optionalPeer: false
|
|
94
|
+
}));
|
|
95
|
+
const visited = /* @__PURE__ */ new Set();
|
|
96
|
+
const checked = /* @__PURE__ */ new Set();
|
|
97
|
+
const singletons = /* @__PURE__ */ new Map();
|
|
98
|
+
const masonEngines = /* @__PURE__ */ new Map();
|
|
99
|
+
for (let index = 0; index < queue.length; index++) {
|
|
100
|
+
const { from, name, required, optionalPeer } = queue[index];
|
|
101
|
+
const installed = installedPackage(from, name);
|
|
102
|
+
if (!installed) {
|
|
103
|
+
const key = `${from}:${name}`;
|
|
104
|
+
if (required && (managedPackage(name, profile) || name === "@octane-xplat/nativescript-mason-core") && !checked.has(key)) {
|
|
105
|
+
checked.add(key);
|
|
106
|
+
row(`compatibility installed ${name}`, false, `package is not installed (required by ${relative(dir, from) || "."})`, "run bun install");
|
|
107
|
+
}
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
const { dir: location, pkg: dependency } = installed;
|
|
111
|
+
const identity = dependency.name ?? name;
|
|
112
|
+
if (!optionalPeer && [
|
|
113
|
+
"@octane-xplat/nativescript-mason-core",
|
|
114
|
+
"@octane-xplat/nativescript-masonkit",
|
|
115
|
+
"@triniwiz/nativescript-masonkit"
|
|
116
|
+
].includes(identity)) masonEngines.set(location, identity);
|
|
117
|
+
const managed = managedPackage(name, profile) ?? managedPackage(identity, profile);
|
|
118
|
+
if (managed?.singleton) {
|
|
119
|
+
const copies = singletons.get(identity) ?? /* @__PURE__ */ new Map();
|
|
120
|
+
copies.set(location, dependency.version);
|
|
121
|
+
singletons.set(identity, copies);
|
|
122
|
+
}
|
|
123
|
+
if (managed && !local.has(name) && !checked.has(`${name}:${location}`)) {
|
|
124
|
+
checked.add(`${name}:${location}`);
|
|
125
|
+
if (from === dir || managed.singleton) {
|
|
126
|
+
const expected = managed.version;
|
|
127
|
+
row(`compatibility installed ${name}`, dependency.version === expected, `${dependency.version} at ${relative(dir, location) || "."}; expected ${expected}`);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
if (visited.has(location)) continue;
|
|
131
|
+
visited.add(location);
|
|
132
|
+
for (const [child, spec] of Object.entries({
|
|
133
|
+
...dependency.dependencies,
|
|
134
|
+
...dependency.optionalDependencies,
|
|
135
|
+
...dependency.peerDependencies
|
|
136
|
+
})) {
|
|
137
|
+
if (localSpecifier(spec)) local.add(child);
|
|
138
|
+
const required = !dependency.optionalDependencies?.[child] && (Boolean(dependency.dependencies?.[child]) || !dependency.peerDependenciesMeta?.[child]?.optional);
|
|
139
|
+
queue.push({
|
|
140
|
+
from: location,
|
|
141
|
+
name: child,
|
|
142
|
+
required,
|
|
143
|
+
optionalPeer: Boolean(dependency.peerDependencies?.[child]) && !dependency.dependencies?.[child] && !dependency.optionalDependencies?.[child] && Boolean(dependency.peerDependenciesMeta?.[child]?.optional)
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
if (masonEngines.size) row("compatibility installed mason engines", masonEngines.size === 1 && [...masonEngines.values()][0] === engine, [...masonEngines].map(([path, name]) => `${name} (${relative(dir, path)})`).join(", "), `keep exactly one ${engine} copy in the app dependency graph`);
|
|
148
|
+
for (const [name, copies] of singletons) {
|
|
149
|
+
const bundled = [...copies].filter(([path]) => path === root || path.startsWith(root + sep));
|
|
150
|
+
const external = copies.size - bundled.length;
|
|
151
|
+
row(`compatibility singleton ${name}`, bundled.length === 1, bundled.length === 1 ? external ? `one runtime copy; ${external} in linked checkouts outside this install` : "one runtime copy" : `${copies.size} runtime copies: ${[...copies].map(([path, version]) => `${version} (${relative(dir, path)})`).join(", ")}`, "align dependency pins and remove nested runtime copies; run bun why " + name);
|
|
152
|
+
}
|
|
153
|
+
return rows;
|
|
154
|
+
}
|
|
155
|
+
export { inspectCompatibility };
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { existsSync, globSync, readFileSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { createRequire } from "node:module";
|
|
3
|
+
import { basename, dirname, join, resolve } from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { parse as parse$1 } from "yaml";
|
|
6
|
+
// ../create/compatibility.ts
|
|
7
|
+
var dir = dirname(fileURLToPath(import.meta.url));
|
|
8
|
+
var root = basename(dir) === "dist" ? dirname(dir) : dir;
|
|
9
|
+
var compatibility = createRequire(import.meta.url)(join(root, "compatibility.json"));
|
|
10
|
+
/** Look up a known framework package or a profile's external dependency pin. */
|
|
11
|
+
function managedPackage(name, profile = "default") {
|
|
12
|
+
if (compatibility.frameworkPackages.includes(name)) return {
|
|
13
|
+
version: compatibility.frameworkVersion,
|
|
14
|
+
group: "framework",
|
|
15
|
+
singleton: name === "@octane-xplat/ui" || name === "@octane-xplat/nativescript-octane"
|
|
16
|
+
};
|
|
17
|
+
const base = compatibility.packages[name];
|
|
18
|
+
return base ? {
|
|
19
|
+
...base,
|
|
20
|
+
...compatibility.profiles[profile]?.[name]
|
|
21
|
+
} : void 0;
|
|
22
|
+
}
|
|
23
|
+
/** Return the install specifier, keeping preview URLs separate from package versions. */
|
|
24
|
+
function managedSpecifier(name, profile = "default") {
|
|
25
|
+
const entry = managedPackage(name, profile);
|
|
26
|
+
return entry?.specifier ?? entry?.version;
|
|
27
|
+
}
|
|
28
|
+
/** Named catalog reserved for this compatibility profile. */
|
|
29
|
+
var managedCatalog = (profile = "default") => profile === "default" ? "xplat" : `xplat-${profile}`;
|
|
30
|
+
/** Installed dependency fields; library consumer peers intentionally keep their ranges. */
|
|
31
|
+
var dependencySections = [
|
|
32
|
+
"dependencies",
|
|
33
|
+
"devDependencies",
|
|
34
|
+
"optionalDependencies"
|
|
35
|
+
];
|
|
36
|
+
/** Select Windows preview pins, rejecting a package that also needs mobile pins. */
|
|
37
|
+
function projectProfile(pkg) {
|
|
38
|
+
const deps = Object.assign({}, ...dependencySections.map((section) => pkg[section]));
|
|
39
|
+
const windowsTarget = pkg.xplat?.targets?.windows;
|
|
40
|
+
const toolchain = windowsTarget?.toolchain;
|
|
41
|
+
const separateWindows = typeof toolchain === "string" && toolchain.trim() !== "";
|
|
42
|
+
const windows = deps["@nativescript/windows"] || windowsTarget && !separateWindows;
|
|
43
|
+
if (windows && (deps["@nativescript/ios"] || deps["@nativescript/android"])) throw new Error("Windows preview and mobile need separate workspace packages: their NativeScript pins differ");
|
|
44
|
+
return windows ? "windows" : "default";
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* An ancestor's workspace membership patterns: pnpm-workspace.yaml `packages`
|
|
48
|
+
* wins when the ancestor is not Bun-pinned, matching the CLI's root rules.
|
|
49
|
+
*/
|
|
50
|
+
function workspacePatterns(root) {
|
|
51
|
+
const yamlFile = join(root, "pnpm-workspace.yaml");
|
|
52
|
+
const pkgFile = join(root, "package.json");
|
|
53
|
+
const pkg = existsSync(pkgFile) ? JSON.parse(readFileSync(pkgFile, "utf8")) : {};
|
|
54
|
+
if (pkg.packageManager?.split("@")[0] !== "bun" && existsSync(yamlFile)) {
|
|
55
|
+
const packages = parse$1(readFileSync(yamlFile, "utf8"))?.packages;
|
|
56
|
+
return Array.isArray(packages) ? packages : [];
|
|
57
|
+
}
|
|
58
|
+
const patterns = Array.isArray(pkg.workspaces) ? pkg.workspaces : pkg.workspaces?.packages;
|
|
59
|
+
return Array.isArray(patterns) ? patterns : [];
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Find the workspace that owns this app, respecting package membership.
|
|
63
|
+
* Mirrors the CLI's packageManagerRoot: ancestors need a package.json or a
|
|
64
|
+
* pnpm-workspace.yaml, and membership comes from the manager's config home.
|
|
65
|
+
*/
|
|
66
|
+
function compatibilityRoot(appRoot) {
|
|
67
|
+
const app = resolve(appRoot);
|
|
68
|
+
for (let at = dirname(app); dirname(at) !== at; at = dirname(at)) {
|
|
69
|
+
if (!existsSync(join(at, "package.json")) && !existsSync(join(at, "pnpm-workspace.yaml"))) continue;
|
|
70
|
+
const patterns = workspacePatterns(at);
|
|
71
|
+
if (!patterns.length) continue;
|
|
72
|
+
const included = patterns.filter((p) => !p.startsWith("!"));
|
|
73
|
+
const exclude = ["**/node_modules/**", ...patterns.filter((p) => p.startsWith("!")).map((p) => p.slice(1))];
|
|
74
|
+
if (globSync(included, {
|
|
75
|
+
cwd: at,
|
|
76
|
+
exclude
|
|
77
|
+
}).some((p) => resolve(at, p) === app)) return at;
|
|
78
|
+
}
|
|
79
|
+
return app;
|
|
80
|
+
}
|
|
81
|
+
/** Add missing Bun catalog pins when enabling a target. Existing pins stay intact. */
|
|
82
|
+
function ensureCompatibilityCatalog(appRoot, pkg) {
|
|
83
|
+
const root = compatibilityRoot(appRoot);
|
|
84
|
+
const file = join(root, "package.json");
|
|
85
|
+
const owner = root === resolve(appRoot) ? pkg : JSON.parse(readFileSync(file, "utf8"));
|
|
86
|
+
mergeCompatibilityCatalog(pkg, owner);
|
|
87
|
+
if (owner !== pkg) writeFileSync(file, JSON.stringify(owner, null, " ") + "\n");
|
|
88
|
+
}
|
|
89
|
+
/** Catalog pins a package requests via `catalog:` specifiers, managed set only. */
|
|
90
|
+
function requestedCatalogPins(pkg) {
|
|
91
|
+
const profile = projectProfile(pkg);
|
|
92
|
+
const catalog = managedCatalog(profile);
|
|
93
|
+
const pins = {};
|
|
94
|
+
for (const section of dependencySections) for (const [name, spec] of Object.entries(pkg[section] ?? {})) if (spec === `catalog:${catalog}` && pins[name] === void 0) pins[name] = managedSpecifier(name, profile);
|
|
95
|
+
return {
|
|
96
|
+
catalog,
|
|
97
|
+
pins
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
/** Merge catalog policy without filesystem effects; shared by scaffold plans. */
|
|
101
|
+
function mergeCompatibilityCatalog(pkg, owner) {
|
|
102
|
+
if (Array.isArray(owner.workspaces)) owner.workspaces = { packages: owner.workspaces };
|
|
103
|
+
owner.workspaces ??= { packages: [] };
|
|
104
|
+
const catalogs = owner.catalogs ?? (owner.workspaces.catalogs ??= {});
|
|
105
|
+
const { catalog, pins } = requestedCatalogPins(pkg);
|
|
106
|
+
const target = catalogs[catalog] ??= {};
|
|
107
|
+
for (const [name, spec] of Object.entries(pins)) target[name] ??= spec;
|
|
108
|
+
}
|
|
109
|
+
export { compatibility, compatibilityRoot, dependencySections, ensureCompatibilityCatalog, managedCatalog, managedPackage, managedSpecifier, mergeCompatibilityCatalog, projectProfile, requestedCatalogPins };
|