show-me-the-env 0.96.1 → 0.96.2
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/.claude-plugin/plugin.json +1 -1
- package/package.json +1 -1
- package/src/load.mjs +5 -2
package/package.json
CHANGED
package/src/load.mjs
CHANGED
|
@@ -112,7 +112,10 @@ export function planLoad({ dataRoot, profile, home, platform = process.platform,
|
|
|
112
112
|
if (fresh) unchecked.add(key);
|
|
113
113
|
observed[key] = { digest: fresh ? null : have };
|
|
114
114
|
files.set(key, { target, bytes: w.bytes });
|
|
115
|
-
|
|
115
|
+
// The live file is a second resource key: two profile files may name one live file, and sharing
|
|
116
|
+
// it keeps the executor from running both writes at once, so the later one in plan order finds
|
|
117
|
+
// the file changed and stops as a conflict whatever --jobs is (scripts/benchmark.mjs plants this).
|
|
118
|
+
desired.push({ id: w.repo, adapterId: 'files', operation: 'configure', inputs: { repo: w.repo, live: w.live, sha256: want }, writes: [key], reads: ['file:' + target], soft: [...softAfterTools, ...ownLists(w.repo)], permissions: ['write-home'] });
|
|
116
119
|
}
|
|
117
120
|
// Signing keys the profile names and gpg here does not list as secret keys are imported once
|
|
118
121
|
// every secrets/ file of this load is written, since their secret key files are among them.
|
|
@@ -158,7 +161,7 @@ export async function applyLoad({ planned, approval, stateRoot, journal, jobs =
|
|
|
158
161
|
const filesAdapter = {
|
|
159
162
|
async observe(keys) { return Object.fromEntries(keys.map((k) => [k, planned.files.has(k) && !planned.unchecked?.has(k) ? fileDigest(planned.files.get(k).target) : null])); },
|
|
160
163
|
async apply(action) {
|
|
161
|
-
const key = action.resourceKeys
|
|
164
|
+
const key = action.resourceKeys.find((k) => planned.files.has(k));
|
|
162
165
|
const { target, bytes } = planned.files.get(key);
|
|
163
166
|
const out = ownedWrite({ journal, stateRoot, runId: id, actionId: action.actionId, resourceKey: key, file: target, bytes });
|
|
164
167
|
return { status: out.status, summary: 'wrote ' + action.inputs.repo, changedResources: out.status === 'changed' ? [key] : [], rollbackCapability: 'reversible' };
|