harness-config-manager 0.1.0
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 +1547 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +584 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/config.d.ts +7 -0
- package/dist/commands/config.js +49 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/context.d.ts +24 -0
- package/dist/commands/context.js +329 -0
- package/dist/commands/context.js.map +1 -0
- package/dist/commands/export.d.ts +19 -0
- package/dist/commands/export.js +116 -0
- package/dist/commands/export.js.map +1 -0
- package/dist/commands/import.d.ts +33 -0
- package/dist/commands/import.js +81 -0
- package/dist/commands/import.js.map +1 -0
- package/dist/commands/info.d.ts +19 -0
- package/dist/commands/info.js +235 -0
- package/dist/commands/info.js.map +1 -0
- package/dist/commands/init.d.ts +5 -0
- package/dist/commands/init.js +116 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/install.d.ts +119 -0
- package/dist/commands/install.js +533 -0
- package/dist/commands/install.js.map +1 -0
- package/dist/commands/list.d.ts +9 -0
- package/dist/commands/list.js +102 -0
- package/dist/commands/list.js.map +1 -0
- package/dist/commands/params.d.ts +58 -0
- package/dist/commands/params.js +366 -0
- package/dist/commands/params.js.map +1 -0
- package/dist/commands/refs.d.ts +60 -0
- package/dist/commands/refs.js +329 -0
- package/dist/commands/refs.js.map +1 -0
- package/dist/commands/registry.d.ts +18 -0
- package/dist/commands/registry.js +173 -0
- package/dist/commands/registry.js.map +1 -0
- package/dist/commands/status.d.ts +10 -0
- package/dist/commands/status.js +83 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/targets.d.ts +8 -0
- package/dist/commands/targets.js +61 -0
- package/dist/commands/targets.js.map +1 -0
- package/dist/commands/uninstall.d.ts +71 -0
- package/dist/commands/uninstall.js +322 -0
- package/dist/commands/uninstall.js.map +1 -0
- package/dist/commands/update.d.ts +66 -0
- package/dist/commands/update.js +384 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/commands/validate.d.ts +3 -0
- package/dist/commands/validate.js +38 -0
- package/dist/commands/validate.js.map +1 -0
- package/dist/core/bundle.d.ts +49 -0
- package/dist/core/bundle.js +326 -0
- package/dist/core/bundle.js.map +1 -0
- package/dist/core/config.d.ts +65 -0
- package/dist/core/config.js +112 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/conflicts.d.ts +67 -0
- package/dist/core/conflicts.js +300 -0
- package/dist/core/conflicts.js.map +1 -0
- package/dist/core/context.d.ts +139 -0
- package/dist/core/context.js +432 -0
- package/dist/core/context.js.map +1 -0
- package/dist/core/deps.d.ts +62 -0
- package/dist/core/deps.js +339 -0
- package/dist/core/deps.js.map +1 -0
- package/dist/core/errors.d.ts +21 -0
- package/dist/core/errors.js +26 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/executor.d.ts +9 -0
- package/dist/core/executor.js +139 -0
- package/dist/core/executor.js.map +1 -0
- package/dist/core/flavors.d.ts +128 -0
- package/dist/core/flavors.js +386 -0
- package/dist/core/flavors.js.map +1 -0
- package/dist/core/frontmatter.d.ts +6 -0
- package/dist/core/frontmatter.js +20 -0
- package/dist/core/frontmatter.js.map +1 -0
- package/dist/core/fsx.d.ts +40 -0
- package/dist/core/fsx.js +180 -0
- package/dist/core/fsx.js.map +1 -0
- package/dist/core/github.d.ts +37 -0
- package/dist/core/github.js +157 -0
- package/dist/core/github.js.map +1 -0
- package/dist/core/harnesses.d.ts +142 -0
- package/dist/core/harnesses.js +215 -0
- package/dist/core/harnesses.js.map +1 -0
- package/dist/core/hash.d.ts +12 -0
- package/dist/core/hash.js +34 -0
- package/dist/core/hash.js.map +1 -0
- package/dist/core/logger.d.ts +16 -0
- package/dist/core/logger.js +36 -0
- package/dist/core/logger.js.map +1 -0
- package/dist/core/overlap.d.ts +79 -0
- package/dist/core/overlap.js +155 -0
- package/dist/core/overlap.js.map +1 -0
- package/dist/core/parameters.d.ts +249 -0
- package/dist/core/parameters.js +944 -0
- package/dist/core/parameters.js.map +1 -0
- package/dist/core/paths.d.ts +20 -0
- package/dist/core/paths.js +35 -0
- package/dist/core/paths.js.map +1 -0
- package/dist/core/planner.d.ts +36 -0
- package/dist/core/planner.js +364 -0
- package/dist/core/planner.js.map +1 -0
- package/dist/core/prompt.d.ts +52 -0
- package/dist/core/prompt.js +197 -0
- package/dist/core/prompt.js.map +1 -0
- package/dist/core/refmap.d.ts +91 -0
- package/dist/core/refmap.js +331 -0
- package/dist/core/refmap.js.map +1 -0
- package/dist/core/refs.d.ts +297 -0
- package/dist/core/refs.js +801 -0
- package/dist/core/refs.js.map +1 -0
- package/dist/core/registry.d.ts +119 -0
- package/dist/core/registry.js +363 -0
- package/dist/core/registry.js.map +1 -0
- package/dist/core/rename.d.ts +36 -0
- package/dist/core/rename.js +74 -0
- package/dist/core/rename.js.map +1 -0
- package/dist/core/rollback.d.ts +38 -0
- package/dist/core/rollback.js +226 -0
- package/dist/core/rollback.js.map +1 -0
- package/dist/core/semver.d.ts +56 -0
- package/dist/core/semver.js +214 -0
- package/dist/core/semver.js.map +1 -0
- package/dist/core/state.d.ts +99 -0
- package/dist/core/state.js +196 -0
- package/dist/core/state.js.map +1 -0
- package/dist/core/store.d.ts +30 -0
- package/dist/core/store.js +54 -0
- package/dist/core/store.js.map +1 -0
- package/dist/core/types.d.ts +515 -0
- package/dist/core/types.js +49 -0
- package/dist/core/types.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/merge/blocks.d.ts +48 -0
- package/dist/merge/blocks.js +0 -0
- package/dist/merge/blocks.js.map +1 -0
- package/dist/merge/json-merge.d.ts +66 -0
- package/dist/merge/json-merge.js +176 -0
- package/dist/merge/json-merge.js.map +1 -0
- package/dist/merge/toml.d.ts +48 -0
- package/dist/merge/toml.js +118 -0
- package/dist/merge/toml.js.map +1 -0
- package/dist/targets/claude-code.d.ts +11 -0
- package/dist/targets/claude-code.js +94 -0
- package/dist/targets/claude-code.js.map +1 -0
- package/dist/targets/copilot.d.ts +13 -0
- package/dist/targets/copilot.js +126 -0
- package/dist/targets/copilot.js.map +1 -0
- package/dist/targets/index.d.ts +20 -0
- package/dist/targets/index.js +60 -0
- package/dist/targets/index.js.map +1 -0
- package/dist/targets/opencode.d.ts +32 -0
- package/dist/targets/opencode.js +172 -0
- package/dist/targets/opencode.js.map +1 -0
- package/dist/targets/pi.d.ts +42 -0
- package/dist/targets/pi.js +134 -0
- package/dist/targets/pi.js.map +1 -0
- package/dist/targets/reasonix.d.ts +27 -0
- package/dist/targets/reasonix.js +192 -0
- package/dist/targets/reasonix.js.map +1 -0
- package/dist/targets/shared.d.ts +33 -0
- package/dist/targets/shared.js +109 -0
- package/dist/targets/shared.js.map +1 -0
- package/dist/targets/types.d.ts +40 -0
- package/dist/targets/types.js +17 -0
- package/dist/targets/types.js.map +1 -0
- package/docs/authoring-bundles.md +828 -0
- package/package.json +74 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The installation ledger: which bundles are installed, into which target and
|
|
3
|
+
* scope, and exactly which items each one owns.
|
|
4
|
+
*
|
|
5
|
+
* Project scope writes `.hcm/state.json` next to the code so it can be
|
|
6
|
+
* committed; user scope writes `~/.hcm/state.json`.
|
|
7
|
+
*/
|
|
8
|
+
import { type InstallationRecord, type Receipt, type Scope, type StateFile, type TargetId } from './types.js';
|
|
9
|
+
export declare function readState(scope: Scope, cwd: string): Promise<StateFile>;
|
|
10
|
+
export declare function writeState(scope: Scope, cwd: string, state: StateFile): Promise<void>;
|
|
11
|
+
export declare function findInstallation(scope: Scope, cwd: string, bundle: string, target: TargetId): Promise<InstallationRecord | undefined>;
|
|
12
|
+
/** All installations of a bundle in a scope, across targets. */
|
|
13
|
+
export declare function findInstallations(scope: Scope, cwd: string, bundle: string): Promise<InstallationRecord[]>;
|
|
14
|
+
export declare function upsertInstallation(scope: Scope, cwd: string, record: InstallationRecord): Promise<void>;
|
|
15
|
+
export declare function removeInstallation(scope: Scope, cwd: string, id: string): Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* Edit the ledger in one read-modify-write. `mutate` returns true when it
|
|
18
|
+
* changed something; nothing is written otherwise, so a no-op leaves the file
|
|
19
|
+
* (and its timestamp) alone.
|
|
20
|
+
*/
|
|
21
|
+
export declare function mutateInstallations(scope: Scope, cwd: string, mutate: (installations: InstallationRecord[]) => boolean): Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* Add or drop the receipt for a marker block, so that taking a section out of
|
|
24
|
+
* `CLAUDE.md` by hand -- with `hcm context remove` -- does not leave the ledger
|
|
25
|
+
* claiming an item that is no longer there. Returns true when it changed
|
|
26
|
+
* something.
|
|
27
|
+
*
|
|
28
|
+
* Does nothing when the bundle has no installation record for that target: a
|
|
29
|
+
* section can be cached and managed without one, and inventing a record here
|
|
30
|
+
* would give `hcm uninstall` something it never installed.
|
|
31
|
+
*/
|
|
32
|
+
export declare function setBlockReceipt(installations: InstallationRecord[], id: string, block: {
|
|
33
|
+
path: string;
|
|
34
|
+
blockId: string;
|
|
35
|
+
}, present: boolean): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* One installation's stake in one item.
|
|
38
|
+
*
|
|
39
|
+
* Ownership is not exclusive. Two bundles that ship the same shared asset --
|
|
40
|
+
* because one depends on the other, or because both wrap the same service --
|
|
41
|
+
* write it once and *both* claim it. The item goes away when the last claim
|
|
42
|
+
* does, which is what makes uninstalling one of them safe.
|
|
43
|
+
*/
|
|
44
|
+
export interface Claim {
|
|
45
|
+
/** The installation record id holding the claim. */
|
|
46
|
+
id: string;
|
|
47
|
+
bundle: string;
|
|
48
|
+
target: TargetId;
|
|
49
|
+
scope: Scope;
|
|
50
|
+
/** What was written, where the receipt records a hash. Blocks have none. */
|
|
51
|
+
hash?: string;
|
|
52
|
+
}
|
|
53
|
+
export interface ClaimFilter {
|
|
54
|
+
/**
|
|
55
|
+
* Ignore these installations' claims -- the ones being removed. A run that
|
|
56
|
+
* takes several away at once has to discount all of them, or each would look
|
|
57
|
+
* like a reason to keep the others' items.
|
|
58
|
+
*/
|
|
59
|
+
excludeIds?: string[];
|
|
60
|
+
/** Ignore every installation of this bundle, in any target or scope. */
|
|
61
|
+
excludeBundle?: string;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Every claim on every item hcm has installed, keyed by absolute location.
|
|
65
|
+
*
|
|
66
|
+
* Absolute, and across both scopes and all targets, because the sharing is
|
|
67
|
+
* real: Claude Code and Pi write the same `.mcp.json`, OpenCode and Pi the same
|
|
68
|
+
* `AGENTS.md`. Keying by scope-relative path would leave each target thinking
|
|
69
|
+
* it was alone in a file it is not.
|
|
70
|
+
*/
|
|
71
|
+
export declare function collectClaims(cwd: string, filter?: ClaimFilter): Promise<Map<string, Claim[]>>;
|
|
72
|
+
/**
|
|
73
|
+
* The items *this* bundle has already written, wherever it is installed, keyed
|
|
74
|
+
* the same way. Reinstalling over your own untouched item is a replacement, not
|
|
75
|
+
* a conflict -- which is what makes `hcm update` work without `--force` while a
|
|
76
|
+
* hand-edited item still stops it.
|
|
77
|
+
*/
|
|
78
|
+
export declare function ownedReceipts(cwd: string, bundle: string): Promise<Map<string, Receipt>>;
|
|
79
|
+
/**
|
|
80
|
+
* The keys a receipt claims, rooted at `scopeRoot`. An array receipt claims
|
|
81
|
+
* each of its items separately, since another bundle may have contributed only
|
|
82
|
+
* some of them.
|
|
83
|
+
*/
|
|
84
|
+
export declare function claimKeys(receipt: Receipt, scopeRoot: string): {
|
|
85
|
+
key: string;
|
|
86
|
+
hash?: string;
|
|
87
|
+
}[];
|
|
88
|
+
/** The key prefix for one file: an absolute path, compared case-insensitively. */
|
|
89
|
+
export declare function claimPath(scopeRoot: string, relativePath: string): string;
|
|
90
|
+
/** The claims held on a key by anyone other than `id`. */
|
|
91
|
+
export declare function heldBy(claims: Map<string, Claim[]>, key: string, id?: string): Claim[];
|
|
92
|
+
/** Distinct bundle names in a set of claims, for messages. */
|
|
93
|
+
export declare function claimingBundles(claims: Claim[]): string[];
|
|
94
|
+
/**
|
|
95
|
+
* Installations that named `bundle` as a dependency, in the same scope and
|
|
96
|
+
* target -- which is the granularity an installation exists at, so it is the
|
|
97
|
+
* granularity "still needed" is decided at.
|
|
98
|
+
*/
|
|
99
|
+
export declare function findDependents(scope: Scope, cwd: string, bundle: string, target?: TargetId): Promise<InstallationRecord[]>;
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The installation ledger: which bundles are installed, into which target and
|
|
3
|
+
* scope, and exactly which items each one owns.
|
|
4
|
+
*
|
|
5
|
+
* Project scope writes `.hcm/state.json` next to the code so it can be
|
|
6
|
+
* committed; user scope writes `~/.hcm/state.json`.
|
|
7
|
+
*/
|
|
8
|
+
import { fromPosix, readJsonIfExists, writeJson } from './fsx.js';
|
|
9
|
+
import { stateFile } from './paths.js';
|
|
10
|
+
import { getTarget } from '../targets/index.js';
|
|
11
|
+
import { installationId, isPreexisting, } from './types.js';
|
|
12
|
+
const EMPTY = { version: 1, installations: [] };
|
|
13
|
+
export async function readState(scope, cwd) {
|
|
14
|
+
const state = await readJsonIfExists(stateFile(scope, cwd));
|
|
15
|
+
if (!state || !Array.isArray(state.installations))
|
|
16
|
+
return { ...EMPTY, installations: [] };
|
|
17
|
+
return state;
|
|
18
|
+
}
|
|
19
|
+
export async function writeState(scope, cwd, state) {
|
|
20
|
+
await writeJson(stateFile(scope, cwd), state);
|
|
21
|
+
}
|
|
22
|
+
export async function findInstallation(scope, cwd, bundle, target) {
|
|
23
|
+
const state = await readState(scope, cwd);
|
|
24
|
+
const id = installationId(bundle, target, scope);
|
|
25
|
+
return state.installations.find((record) => record.id === id);
|
|
26
|
+
}
|
|
27
|
+
/** All installations of a bundle in a scope, across targets. */
|
|
28
|
+
export async function findInstallations(scope, cwd, bundle) {
|
|
29
|
+
const state = await readState(scope, cwd);
|
|
30
|
+
return state.installations.filter((record) => record.bundle === bundle);
|
|
31
|
+
}
|
|
32
|
+
export async function upsertInstallation(scope, cwd, record) {
|
|
33
|
+
const state = await readState(scope, cwd);
|
|
34
|
+
const index = state.installations.findIndex((existing) => existing.id === record.id);
|
|
35
|
+
if (index >= 0)
|
|
36
|
+
state.installations[index] = record;
|
|
37
|
+
else
|
|
38
|
+
state.installations.push(record);
|
|
39
|
+
await writeState(scope, cwd, state);
|
|
40
|
+
}
|
|
41
|
+
export async function removeInstallation(scope, cwd, id) {
|
|
42
|
+
const state = await readState(scope, cwd);
|
|
43
|
+
state.installations = state.installations.filter((record) => record.id !== id);
|
|
44
|
+
await writeState(scope, cwd, state);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Edit the ledger in one read-modify-write. `mutate` returns true when it
|
|
48
|
+
* changed something; nothing is written otherwise, so a no-op leaves the file
|
|
49
|
+
* (and its timestamp) alone.
|
|
50
|
+
*/
|
|
51
|
+
export async function mutateInstallations(scope, cwd, mutate) {
|
|
52
|
+
const state = await readState(scope, cwd);
|
|
53
|
+
if (!mutate(state.installations))
|
|
54
|
+
return;
|
|
55
|
+
await writeState(scope, cwd, state);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Add or drop the receipt for a marker block, so that taking a section out of
|
|
59
|
+
* `CLAUDE.md` by hand -- with `hcm context remove` -- does not leave the ledger
|
|
60
|
+
* claiming an item that is no longer there. Returns true when it changed
|
|
61
|
+
* something.
|
|
62
|
+
*
|
|
63
|
+
* Does nothing when the bundle has no installation record for that target: a
|
|
64
|
+
* section can be cached and managed without one, and inventing a record here
|
|
65
|
+
* would give `hcm uninstall` something it never installed.
|
|
66
|
+
*/
|
|
67
|
+
export function setBlockReceipt(installations, id, block, present) {
|
|
68
|
+
const record = installations.find((candidate) => candidate.id === id);
|
|
69
|
+
if (!record)
|
|
70
|
+
return false;
|
|
71
|
+
const index = record.receipts.findIndex((receipt) => receipt.op === 'block' && receipt.path === block.path && receipt.blockId === block.blockId);
|
|
72
|
+
if (present) {
|
|
73
|
+
if (index >= 0)
|
|
74
|
+
return false;
|
|
75
|
+
record.receipts.push({ op: 'block', ...block, syntax: 'markdown' });
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
if (index < 0)
|
|
79
|
+
return false;
|
|
80
|
+
record.receipts.splice(index, 1);
|
|
81
|
+
return true;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Every claim on every item hcm has installed, keyed by absolute location.
|
|
85
|
+
*
|
|
86
|
+
* Absolute, and across both scopes and all targets, because the sharing is
|
|
87
|
+
* real: Claude Code and Pi write the same `.mcp.json`, OpenCode and Pi the same
|
|
88
|
+
* `AGENTS.md`. Keying by scope-relative path would leave each target thinking
|
|
89
|
+
* it was alone in a file it is not.
|
|
90
|
+
*/
|
|
91
|
+
export async function collectClaims(cwd, filter = {}) {
|
|
92
|
+
const claims = new Map();
|
|
93
|
+
const excluded = new Set(filter.excludeIds ?? []);
|
|
94
|
+
for (const scope of ['project', 'user']) {
|
|
95
|
+
const state = await readState(scope, cwd);
|
|
96
|
+
for (const record of state.installations) {
|
|
97
|
+
if (excluded.has(record.id))
|
|
98
|
+
continue;
|
|
99
|
+
if (filter.excludeBundle && record.bundle === filter.excludeBundle)
|
|
100
|
+
continue;
|
|
101
|
+
const scopeRoot = getTarget(record.target).scopeRoot(record.scope, cwd);
|
|
102
|
+
for (const receipt of record.receipts) {
|
|
103
|
+
// An adopted item was there before hcm and is nobody's to remove, so it
|
|
104
|
+
// is no claim at all -- another bundle may adopt the same one happily.
|
|
105
|
+
if (isPreexisting(receipt))
|
|
106
|
+
continue;
|
|
107
|
+
for (const { key, hash } of claimKeys(receipt, scopeRoot)) {
|
|
108
|
+
const held = claims.get(key);
|
|
109
|
+
const claim = {
|
|
110
|
+
id: record.id,
|
|
111
|
+
bundle: record.bundle,
|
|
112
|
+
target: record.target,
|
|
113
|
+
scope: record.scope,
|
|
114
|
+
...(hash ? { hash } : {}),
|
|
115
|
+
};
|
|
116
|
+
if (held)
|
|
117
|
+
held.push(claim);
|
|
118
|
+
else
|
|
119
|
+
claims.set(key, [claim]);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return claims;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* The items *this* bundle has already written, wherever it is installed, keyed
|
|
128
|
+
* the same way. Reinstalling over your own untouched item is a replacement, not
|
|
129
|
+
* a conflict -- which is what makes `hcm update` work without `--force` while a
|
|
130
|
+
* hand-edited item still stops it.
|
|
131
|
+
*/
|
|
132
|
+
export async function ownedReceipts(cwd, bundle) {
|
|
133
|
+
const owned = new Map();
|
|
134
|
+
for (const scope of ['project', 'user']) {
|
|
135
|
+
const state = await readState(scope, cwd);
|
|
136
|
+
for (const record of state.installations) {
|
|
137
|
+
if (record.bundle !== bundle)
|
|
138
|
+
continue;
|
|
139
|
+
const scopeRoot = getTarget(record.target).scopeRoot(record.scope, cwd);
|
|
140
|
+
for (const receipt of record.receipts) {
|
|
141
|
+
for (const { key } of claimKeys(receipt, scopeRoot))
|
|
142
|
+
owned.set(key, receipt);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return owned;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* The keys a receipt claims, rooted at `scopeRoot`. An array receipt claims
|
|
150
|
+
* each of its items separately, since another bundle may have contributed only
|
|
151
|
+
* some of them.
|
|
152
|
+
*/
|
|
153
|
+
export function claimKeys(receipt, scopeRoot) {
|
|
154
|
+
const at = claimPath(scopeRoot, receipt.path);
|
|
155
|
+
switch (receipt.op) {
|
|
156
|
+
case 'file':
|
|
157
|
+
return [{ key: `${at}::file`, hash: receipt.hash }];
|
|
158
|
+
case 'json-value':
|
|
159
|
+
return [{ key: `${at}::json:${receipt.pointer.join('.')}`, hash: receipt.hash }];
|
|
160
|
+
case 'json-array-item':
|
|
161
|
+
return receipt.hashes.map((hash) => ({
|
|
162
|
+
key: `${at}::item:${receipt.pointer.join('.')}:${hash}`,
|
|
163
|
+
hash,
|
|
164
|
+
}));
|
|
165
|
+
case 'block':
|
|
166
|
+
return [{ key: `${at}::block:${receipt.blockId}` }];
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
/** The key prefix for one file: an absolute path, compared case-insensitively. */
|
|
170
|
+
export function claimPath(scopeRoot, relativePath) {
|
|
171
|
+
return fromPosix(scopeRoot, relativePath).toLowerCase();
|
|
172
|
+
}
|
|
173
|
+
/** The claims held on a key by anyone other than `id`. */
|
|
174
|
+
export function heldBy(claims, key, id) {
|
|
175
|
+
const held = claims.get(key) ?? [];
|
|
176
|
+
return id ? held.filter((claim) => claim.id !== id) : held;
|
|
177
|
+
}
|
|
178
|
+
/** Distinct bundle names in a set of claims, for messages. */
|
|
179
|
+
export function claimingBundles(claims) {
|
|
180
|
+
return [...new Set(claims.map((claim) => claim.bundle))].sort();
|
|
181
|
+
}
|
|
182
|
+
// ---------------------------------------------------------------------------
|
|
183
|
+
// Dependencies
|
|
184
|
+
// ---------------------------------------------------------------------------
|
|
185
|
+
/**
|
|
186
|
+
* Installations that named `bundle` as a dependency, in the same scope and
|
|
187
|
+
* target -- which is the granularity an installation exists at, so it is the
|
|
188
|
+
* granularity "still needed" is decided at.
|
|
189
|
+
*/
|
|
190
|
+
export async function findDependents(scope, cwd, bundle, target) {
|
|
191
|
+
const state = await readState(scope, cwd);
|
|
192
|
+
return state.installations.filter((record) => (target === undefined || record.target === target) &&
|
|
193
|
+
record.bundle !== bundle &&
|
|
194
|
+
(record.dependencies ?? []).some((dependency) => dependency.name === bundle));
|
|
195
|
+
}
|
|
196
|
+
//# sourceMappingURL=state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../src/core/state.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,SAAS,EAAE,MA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E,CAAC;AAClE,CAAC;AAED,8EAA8E;AAC9E,eAAe;AACf,8EAA8E;AAE9E;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,KAAY,EACZ,GAAW,EACX,MAAc,EACd,MAAiB;IAEjB,MAAM,KAAK,GAAG,MAAM,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC1C,OAAO,KAAK,CAAC,aAAa,CAAC,MAAM,CAC/B,CAAC,MAAM,EAAE,EAAE,CACT,CAAC,MAAM,KAAK,SAAS,IAAI,MAAM,CAAC,MAAM,KAAK,MAAM,CAAC;QAClD,MAAM,CAAC,MAAM,KAAK,MAAM;QACxB,CAAC,MAAM,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,KAAK,MAAM,CAAC,CAC/E,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The bundle store: one directory per registry entry, holding the bundle's
|
|
3
|
+
* files. Registering copies a bundle in; `hcm update` refreshes the copy;
|
|
4
|
+
* `hcm registry remove` deletes it.
|
|
5
|
+
*
|
|
6
|
+
* The point is that a registered bundle is a *snapshot*. Installing twice a
|
|
7
|
+
* month apart installs the same thing both times, whether the origin was a
|
|
8
|
+
* GitHub ref that has since moved or a working directory you have been editing.
|
|
9
|
+
* `hcm registry add --dev` opts out: those entries are referenced in place, so
|
|
10
|
+
* edit-then-reinstall picks up changes with nothing to refresh.
|
|
11
|
+
*/
|
|
12
|
+
import type { BundleSource, RegistryEntry } from './types.js';
|
|
13
|
+
/**
|
|
14
|
+
* The store directory name for an entry: id first so the folders sort the way
|
|
15
|
+
* `hcm registry list` prints them, and the name so the folder is recognisable.
|
|
16
|
+
*/
|
|
17
|
+
export declare function storeSlug(entry: Pick<RegistryEntry, 'id' | 'name'>): string;
|
|
18
|
+
/** Absolute path of one entry's directory in the store. */
|
|
19
|
+
export declare function storeEntryDir(slug: string): Promise<string>;
|
|
20
|
+
/**
|
|
21
|
+
* Copy a bundle into the store, replacing whatever was there. `from` is a
|
|
22
|
+
* directory that already holds the bundle -- a working copy for a local source,
|
|
23
|
+
* or a freshly downloaded tarball for a GitHub one.
|
|
24
|
+
*/
|
|
25
|
+
export declare function saveToStore(slug: string, from: string): Promise<string>;
|
|
26
|
+
/** Fetch a source and snapshot it into the store, returning the stored path. */
|
|
27
|
+
export declare function populateStore(slug: string, source: BundleSource, options?: {
|
|
28
|
+
refresh?: boolean;
|
|
29
|
+
}): Promise<string>;
|
|
30
|
+
export declare function removeFromStore(slug: string): Promise<boolean>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The bundle store: one directory per registry entry, holding the bundle's
|
|
3
|
+
* files. Registering copies a bundle in; `hcm update` refreshes the copy;
|
|
4
|
+
* `hcm registry remove` deletes it.
|
|
5
|
+
*
|
|
6
|
+
* The point is that a registered bundle is a *snapshot*. Installing twice a
|
|
7
|
+
* month apart installs the same thing both times, whether the origin was a
|
|
8
|
+
* GitHub ref that has since moved or a working directory you have been editing.
|
|
9
|
+
* `hcm registry add --dev` opts out: those entries are referenced in place, so
|
|
10
|
+
* edit-then-reinstall picks up changes with nothing to refresh.
|
|
11
|
+
*/
|
|
12
|
+
import path from 'node:path';
|
|
13
|
+
import { copyDir, isDirectory, removeDir } from './fsx.js';
|
|
14
|
+
import { resolveSource } from './github.js';
|
|
15
|
+
import { storeDir } from './paths.js';
|
|
16
|
+
/** Directories that are never part of a bundle, however it was authored. */
|
|
17
|
+
const NOT_PART_OF_A_BUNDLE = ['.git', 'node_modules', '.hcm'];
|
|
18
|
+
/**
|
|
19
|
+
* The store directory name for an entry: id first so the folders sort the way
|
|
20
|
+
* `hcm registry list` prints them, and the name so the folder is recognisable.
|
|
21
|
+
*/
|
|
22
|
+
export function storeSlug(entry) {
|
|
23
|
+
const safeName = entry.name.replace(/[^\w.-]+/g, '-').replace(/^-+|-+$/g, '');
|
|
24
|
+
return `${entry.id}-${safeName || 'bundle'}`;
|
|
25
|
+
}
|
|
26
|
+
/** Absolute path of one entry's directory in the store. */
|
|
27
|
+
export async function storeEntryDir(slug) {
|
|
28
|
+
return path.join(await storeDir(), slug);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Copy a bundle into the store, replacing whatever was there. `from` is a
|
|
32
|
+
* directory that already holds the bundle -- a working copy for a local source,
|
|
33
|
+
* or a freshly downloaded tarball for a GitHub one.
|
|
34
|
+
*/
|
|
35
|
+
export async function saveToStore(slug, from) {
|
|
36
|
+
const destination = await storeEntryDir(slug);
|
|
37
|
+
// Replace rather than merge: a file deleted upstream must disappear here too.
|
|
38
|
+
await removeDir(destination);
|
|
39
|
+
await copyDir(from, destination, NOT_PART_OF_A_BUNDLE);
|
|
40
|
+
return destination;
|
|
41
|
+
}
|
|
42
|
+
/** Fetch a source and snapshot it into the store, returning the stored path. */
|
|
43
|
+
export async function populateStore(slug, source, options = {}) {
|
|
44
|
+
const origin = await resolveSource(source, options);
|
|
45
|
+
return saveToStore(slug, origin);
|
|
46
|
+
}
|
|
47
|
+
export async function removeFromStore(slug) {
|
|
48
|
+
const target = await storeEntryDir(slug);
|
|
49
|
+
if (!(await isDirectory(target)))
|
|
50
|
+
return false;
|
|
51
|
+
await removeDir(target);
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/core/store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CA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