githolon 0.69.2 → 0.69.3
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/cli.mjs +12 -2
- package/package.json +3 -3
package/dist/cli.mjs
CHANGED
|
@@ -2988,6 +2988,7 @@ __export(governance_exports, {
|
|
|
2988
2988
|
rebirthPlanCommand: () => rebirthPlanCommand,
|
|
2989
2989
|
rebirthWorkspace: () => rebirthWorkspace,
|
|
2990
2990
|
renderRebirthImpact: () => renderRebirthImpact,
|
|
2991
|
+
resolveGovernanceHash: () => resolveGovernanceHash,
|
|
2991
2992
|
resolveGovernancePrincipal: () => resolveGovernancePrincipal,
|
|
2992
2993
|
signAndPostGovernance: () => signAndPostGovernance,
|
|
2993
2994
|
signAndPostOffer: () => signAndPostOffer,
|
|
@@ -3436,6 +3437,15 @@ certify-era ${ws}:`);
|
|
|
3436
3437
|
out2(` verify: githolon ledger verify ${ws} (expect GREEN with certifiedRanges naming the oids)`);
|
|
3437
3438
|
return 0;
|
|
3438
3439
|
}
|
|
3440
|
+
async function resolveGovernanceHash(cloud, domainKey, ws = "root", fetchImpl = fetch) {
|
|
3441
|
+
try {
|
|
3442
|
+
const d = await (await fetchImpl(`${cloud}/v2/workspaces/${ws}/domains`)).json();
|
|
3443
|
+
const h = d && d.currentLaw && d.currentLaw[domainKey];
|
|
3444
|
+
return typeof h === "string" && h.length > 0 ? h : void 0;
|
|
3445
|
+
} catch {
|
|
3446
|
+
return void 0;
|
|
3447
|
+
}
|
|
3448
|
+
}
|
|
3439
3449
|
async function parkedAreAllLawInstalls(engMod, eng, ws, oids) {
|
|
3440
3450
|
try {
|
|
3441
3451
|
const git4 = (await import("isomorphic-git")).default;
|
|
@@ -3795,9 +3805,9 @@ gov rebirth ${ws}:`);
|
|
|
3795
3805
|
}
|
|
3796
3806
|
}
|
|
3797
3807
|
const rebornAt = Date.now();
|
|
3798
|
-
const controllerHash = opts.controllerHash ??
|
|
3808
|
+
const controllerHash = opts.controllerHash ?? await resolveGovernanceHash(cloud, "workspaces");
|
|
3799
3809
|
if (typeof controllerHash !== "string") {
|
|
3800
|
-
err2("could not resolve root's governance
|
|
3810
|
+
err2("could not resolve root's governance (workspaces) law hash from root currentLaw (pass --controller-hash)");
|
|
3801
3811
|
return 1;
|
|
3802
3812
|
}
|
|
3803
3813
|
const res = author2(eng, "root", "workspaces", "rebirthWorkspace", { workspaceId, reason, rebornAt }, controllerHash, { authorSecret: seed, actor: "user:root-custodian" });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "githolon",
|
|
3
|
-
"version": "0.69.
|
|
3
|
+
"version": "0.69.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "githolon — the Nomos developer CLI: Rails-style generators for @githolon/dsl domains + the package compiler. Kernel-independent.",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@bjorn3/browser_wasi_shim": "0.4.2",
|
|
32
|
-
"@githolon/client": "^0.69.
|
|
33
|
-
"@githolon/dsl": "^0.69.
|
|
32
|
+
"@githolon/client": "^0.69.3",
|
|
33
|
+
"@githolon/dsl": "^0.69.3",
|
|
34
34
|
"isomorphic-git": "^1.38.4"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|