Compare commits

...

2 Commits

Author SHA1 Message Date
Quixos Subtree Publisher db5e4a4aa8 Publish quixos-nix-helpers from 54e443af5dd963f1fa6f83f062f4943b46ad2535 2026-09-22 22:27:14 +00:00
Timothy J. Aveni f34ce87f55 Make Camino examples and scaffolds complete Yarn and Nix packages 2026-09-22 15:27:14 -07:00
2 changed files with 11 additions and 3 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
{
"version": 1,
"sourceRepo": "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/quixos",
"sourceCommit": "d74b619314718cce6da10800d278d6bcc04b71fa",
"sourceCommit": "54e443af5dd963f1fa6f83f062f4943b46ad2535",
"sourcePath": "quixos-instance/quixos-nix-helpers",
"exportName": "quixos-nix-helpers",
"mirrorRemote": "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/quixos-nix-helpers.git"
+10 -2
View File
@@ -36,6 +36,7 @@ async function packageDigest(directory) {
/** Merge at package granularity: a scope such as @types is not a reserved package. */
export async function installDependencies({ destination, application, defaults = [], selected = {}, reserved = [] }) {
const entries = new Map();
const authored = new Set();
for (const root of defaults) for (const [name, file] of await packages(root)) entries.set(name, file);
for (const [name, file] of Object.entries(selected)) entries.set(name, file);
if (application)
@@ -44,10 +45,17 @@ export async function installDependencies({ destination, application, defaults =
const canonical = entries.get(name);
if (!canonical || (await packageDigest(file)) !== (await packageDigest(canonical)))
throw Error("Application dependencies cannot substitute selected React/client types or checked SDK: " + name);
} else entries.set(name, file);
} else {
entries.set(name, file);
authored.add(name);
}
}
for (const [name, file] of entries) {
await fs.mkdir(path.dirname(path.join(destination, name)), { recursive: true });
await fs.symlink(file, path.join(destination, name));
// Application packages resolve siblings from this assembled node_modules.
// Keep SDK links canonical: copying those would duplicate branded types and
// React declarations from their own retained dependency closures.
if (authored.has(name)) await fs.cp(file, path.join(destination, name), { recursive: true, dereference: true });
else await fs.symlink(file, path.join(destination, name));
}
}