Publish quixos-protocol from c4319441699b7b8c5af7e70dade6e4ad8cccddea
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"version": 1,
|
||||
"sourceRepo": "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/quixos",
|
||||
"sourceCommit": "e4075003e669be0e307ec8c0585cccb1bd08276a",
|
||||
"sourceCommit": "c4319441699b7b8c5af7e70dade6e4ad8cccddea",
|
||||
"sourcePath": "quixos-protocol",
|
||||
"exportName": "quixos-protocol",
|
||||
"mirrorRemote": "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/quixos-protocol.git"
|
||||
|
||||
@@ -481,13 +481,13 @@ export const applyPinUpgrades = async (
|
||||
quixos: compiled.lock.quixos,
|
||||
directResources: [...compiled.directResources.entries()].map(([bindingKey, node]) => {
|
||||
const [kind, binding] = bindingKey.split("\0");
|
||||
return { kind, binding, resourceKey: node.key, directory: node.directory };
|
||||
return { kind, binding, resourceKey: node.key, directory: path.relative(plan.workbench, node.directory) };
|
||||
}),
|
||||
resources: [...resources.values()].map((node) => ({
|
||||
key: node.key,
|
||||
kind: node.kind,
|
||||
source: node.source,
|
||||
directory: node.directory,
|
||||
directory: path.relative(plan.workbench, node.directory),
|
||||
...(node.resource.kind === "build"
|
||||
? {}
|
||||
: {
|
||||
|
||||
@@ -8,6 +8,7 @@ import { execFile as callback } from "node:child_process";
|
||||
import {
|
||||
planPinUpgrades,
|
||||
applyPinUpgrades,
|
||||
discoverUpgradeSpec,
|
||||
reviewUpgradeCandidate,
|
||||
type UpgradeEffects,
|
||||
} from "../src/capability-language/pin-upgrades.js";
|
||||
@@ -153,6 +154,21 @@ test(
|
||||
await run(workbench, "git", ["--git-dir", path.join(workbench, "remotes/named.git"), "show-ref"]),
|
||||
new RegExp(commit),
|
||||
);
|
||||
assert.equal(graph.resources[0].directory, "resources/Named");
|
||||
assert.equal(graph.directResources[0].directory, "resources/Named");
|
||||
// A retained workbench can move without keeping its original absolute path
|
||||
// alive. Recovery journals remain bound to their original writer/root.
|
||||
const relocated = `${workbench}-relocated`;
|
||||
context.after(() => fs.rm(relocated, { recursive: true, force: true }));
|
||||
await fs.cp(workbench, relocated, { recursive: true });
|
||||
const discovered = await discoverUpgradeSpec(relocated);
|
||||
assert.equal(discovered.nodes[1]!.directory, "resources/Named");
|
||||
const relocatedPlan = await planPinUpgrades(relocated, { ...discovered, bootstrap: true });
|
||||
assert.equal(relocatedPlan.workbench, relocated);
|
||||
assert.deepEqual(
|
||||
relocatedPlan.nodes.map((node) => node.directory),
|
||||
["resources/Named", "root"],
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user