@bluewombat/isolation-git 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.
Files changed (50) hide show
  1. package/README.md +62 -0
  2. package/dist/branch-name.d.ts +2 -0
  3. package/dist/branch-name.d.ts.map +1 -0
  4. package/dist/branch-name.js +42 -0
  5. package/dist/branch-name.js.map +1 -0
  6. package/dist/child/run-child.d.ts +42 -0
  7. package/dist/child/run-child.d.ts.map +1 -0
  8. package/dist/child/run-child.js +121 -0
  9. package/dist/child/run-child.js.map +1 -0
  10. package/dist/copy-working-files.d.ts +40 -0
  11. package/dist/copy-working-files.d.ts.map +1 -0
  12. package/dist/copy-working-files.js +144 -0
  13. package/dist/copy-working-files.js.map +1 -0
  14. package/dist/fold.d.ts +6 -0
  15. package/dist/fold.d.ts.map +1 -0
  16. package/dist/fold.js +19 -0
  17. package/dist/fold.js.map +1 -0
  18. package/dist/git-merge.d.ts +37 -0
  19. package/dist/git-merge.d.ts.map +1 -0
  20. package/dist/git-merge.js +415 -0
  21. package/dist/git-merge.js.map +1 -0
  22. package/dist/git-worktree.d.ts +37 -0
  23. package/dist/git-worktree.d.ts.map +1 -0
  24. package/dist/git-worktree.js +68 -0
  25. package/dist/git-worktree.js.map +1 -0
  26. package/dist/index.d.ts +15 -0
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.js +13 -0
  29. package/dist/index.js.map +1 -0
  30. package/dist/isolation.d.ts +13 -0
  31. package/dist/isolation.d.ts.map +1 -0
  32. package/dist/isolation.js +43 -0
  33. package/dist/isolation.js.map +1 -0
  34. package/dist/reference.d.ts +15 -0
  35. package/dist/reference.d.ts.map +1 -0
  36. package/dist/reference.js +196 -0
  37. package/dist/reference.js.map +1 -0
  38. package/dist/run-env.d.ts +30 -0
  39. package/dist/run-env.d.ts.map +1 -0
  40. package/dist/run-env.js +49 -0
  41. package/dist/run-env.js.map +1 -0
  42. package/dist/strategy.d.ts +19 -0
  43. package/dist/strategy.d.ts.map +1 -0
  44. package/dist/strategy.js +44 -0
  45. package/dist/strategy.js.map +1 -0
  46. package/dist/types.d.ts +63 -0
  47. package/dist/types.d.ts.map +1 -0
  48. package/dist/types.js +2 -0
  49. package/dist/types.js.map +1 -0
  50. package/package.json +48 -0
@@ -0,0 +1,15 @@
1
+ import type { ReferenceBackend } from "./types.js";
2
+ /**
3
+ * A reference work line, for git: a remote and a branch on it; and, when the
4
+ * manager says so, how the system is named on what it commits (`author`) and
5
+ * which environment variable holds the token git authenticates with
6
+ * (`credentialEnv`). Both become the git environment of this run — see
7
+ * `run-env.ts` — so the commits and the pushes are the system's, not the
8
+ * machine's.
9
+ *
10
+ * The copy is a single-branch clone whose `origin` is that remote — the shape
11
+ * the git Publisher pushes to and the git Refresher reads from, and the one
12
+ * they assume without an option to say otherwise.
13
+ */
14
+ export declare const gitReference: ReferenceBackend;
15
+ //# sourceMappingURL=reference.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reference.d.ts","sourceRoot":"","sources":["../src/reference.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAmB,gBAAgB,EAAsB,MAAM,YAAY,CAAC;AAaxF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,EAAE,gBAmC1B,CAAC"}
@@ -0,0 +1,196 @@
1
+ import { spawnSync } from "node:child_process";
2
+ import { existsSync, mkdirSync, statSync } from "node:fs";
3
+ import { dirname, join } from "node:path";
4
+ import { envFor, runEnv, setRunEnv } from "./run-env.js";
5
+ const KEYS = ["remote", "branch", "credentialEnv", "author"];
6
+ const REQUIRED = ["remote", "branch"];
7
+ const REMOTE = "origin";
8
+ /**
9
+ * A reference work line, for git: a remote and a branch on it; and, when the
10
+ * manager says so, how the system is named on what it commits (`author`) and
11
+ * which environment variable holds the token git authenticates with
12
+ * (`credentialEnv`). Both become the git environment of this run — see
13
+ * `run-env.ts` — so the commits and the pushes are the system's, not the
14
+ * machine's.
15
+ *
16
+ * The copy is a single-branch clone whose `origin` is that remote — the shape
17
+ * the git Publisher pushes to and the git Refresher reads from, and the one
18
+ * they assume without an option to say otherwise.
19
+ */
20
+ export const gitReference = {
21
+ parse(raw) {
22
+ for (const key of Object.keys(raw)) {
23
+ if (!KEYS.includes(key)) {
24
+ return {
25
+ ok: false,
26
+ reason: `unknown key "${key}" — a git reference has ${KEYS.join(", ")}`,
27
+ };
28
+ }
29
+ }
30
+ const remote = nonEmptyString(raw, "remote");
31
+ if (!remote.ok) {
32
+ return remote;
33
+ }
34
+ const branch = nonEmptyString(raw, "branch");
35
+ if (!branch.ok) {
36
+ return branch;
37
+ }
38
+ const credentialEnv = optionalString(raw, "credentialEnv");
39
+ if (!credentialEnv.ok) {
40
+ return credentialEnv;
41
+ }
42
+ const author = optionalAuthor(raw);
43
+ if (!author.ok) {
44
+ return author;
45
+ }
46
+ const reference = {
47
+ remote: remote.value,
48
+ branch: branch.value,
49
+ credentialEnv: credentialEnv.value,
50
+ author: author.value,
51
+ };
52
+ setRunEnv(envFor(reference));
53
+ return parsed(reference);
54
+ },
55
+ };
56
+ function optionalString(raw, key) {
57
+ const value = raw[key];
58
+ if (value === undefined) {
59
+ return { ok: true, value: undefined };
60
+ }
61
+ if (typeof value !== "string" || value.trim().length === 0) {
62
+ return { ok: false, reason: `"${key}" must be a non-empty string` };
63
+ }
64
+ return { ok: true, value: value.trim() };
65
+ }
66
+ /** `author` is `{ name, email }`, both non-empty; anything else is refused. */
67
+ function optionalAuthor(raw) {
68
+ const value = raw.author;
69
+ if (value === undefined) {
70
+ return { ok: true, value: undefined };
71
+ }
72
+ if (value === null || typeof value !== "object" || Array.isArray(value)) {
73
+ return { ok: false, reason: '"author" must be { name, email }' };
74
+ }
75
+ const { name, email } = value;
76
+ if (typeof name !== "string" || name.trim().length === 0) {
77
+ return { ok: false, reason: '"author.name" must be a non-empty string' };
78
+ }
79
+ if (typeof email !== "string" || email.trim().length === 0) {
80
+ return { ok: false, reason: '"author.email" must be a non-empty string' };
81
+ }
82
+ return { ok: true, value: { name: name.trim(), email: email.trim() } };
83
+ }
84
+ function nonEmptyString(raw, key) {
85
+ const value = raw[key];
86
+ if (value === undefined) {
87
+ return { ok: false, reason: `missing "${key}" — a git reference has ${REQUIRED.join(", ")}` };
88
+ }
89
+ if (typeof value !== "string" || value.trim().length === 0) {
90
+ return { ok: false, reason: `"${key}" must be a non-empty string` };
91
+ }
92
+ return { ok: true, value: value.trim() };
93
+ }
94
+ function parsed(reference) {
95
+ return {
96
+ ok: true,
97
+ summary: `${reference.remote} (${reference.branch})`,
98
+ target: reference.branch,
99
+ inspect: (path) => inspectCopy(reference, path),
100
+ materialize: async (path) => materializeCopy(reference, path),
101
+ env: runEnv(),
102
+ };
103
+ }
104
+ /**
105
+ * Whether what is at `path` is a copy of this reference: a git tree, whose
106
+ * `origin` is the remote, checked out on the branch. Anything else is somebody
107
+ * else's directory, and this system does not write over those.
108
+ */
109
+ function inspectCopy(reference, path) {
110
+ if (!existsSync(path)) {
111
+ return { kind: "missing" };
112
+ }
113
+ if (!statSync(path).isDirectory()) {
114
+ return { kind: "mismatch", reason: `${path} exists and is not a directory` };
115
+ }
116
+ if (!existsSync(join(path, ".git"))) {
117
+ return { kind: "mismatch", reason: `${path} is not a git tree` };
118
+ }
119
+ const url = git(["remote", "get-url", REMOTE], path);
120
+ if (!url.ok) {
121
+ return { kind: "mismatch", reason: `${path} has no "${REMOTE}" remote` };
122
+ }
123
+ if (sameRemote(url.stdout.trim(), reference.remote) === false) {
124
+ return {
125
+ kind: "mismatch",
126
+ reason: `${path} has "${REMOTE}" at ${url.stdout.trim()}, not ${reference.remote}`,
127
+ };
128
+ }
129
+ const branch = git(["symbolic-ref", "--short", "HEAD"], path);
130
+ const checkedOut = branch.ok ? branch.stdout.trim() : "a detached HEAD";
131
+ if (checkedOut !== reference.branch) {
132
+ return {
133
+ kind: "mismatch",
134
+ reason: `${path} is on "${checkedOut}", not "${reference.branch}"`,
135
+ };
136
+ }
137
+ return { kind: "matches" };
138
+ }
139
+ /** `.git` and a trailing slash are spelling, not a different remote. */
140
+ function sameRemote(a, b) {
141
+ const trim = (url) => url.replace(/\/+$/, "").replace(/\.git$/, "");
142
+ return trim(a) === trim(b);
143
+ }
144
+ /**
145
+ * A single-branch clone, after the branch has been shown to exist: a
146
+ * `git clone --branch` that misses fails with a message about a repository,
147
+ * not about the name that was wrong.
148
+ */
149
+ function materializeCopy(reference, path) {
150
+ const listed = git(["ls-remote", "--heads", reference.remote]);
151
+ if (!listed.ok) {
152
+ return {
153
+ ok: false,
154
+ reason: `cannot reach ${reference.remote}: ${listed.stderr.trim() || "git ls-remote failed"}`,
155
+ };
156
+ }
157
+ const names = [];
158
+ for (const line of listed.stdout.split("\n")) {
159
+ const ref = line.split("\t")[1];
160
+ if (ref?.startsWith("refs/heads/")) {
161
+ names.push(ref.slice("refs/heads/".length));
162
+ }
163
+ }
164
+ if (!names.includes(reference.branch)) {
165
+ return {
166
+ ok: false,
167
+ reason: `${reference.remote} has no branch "${reference.branch}". It has: ${names.join(", ")}`,
168
+ };
169
+ }
170
+ mkdirSync(dirname(path), { recursive: true });
171
+ const cloned = git([
172
+ "clone",
173
+ "--branch",
174
+ reference.branch,
175
+ "--single-branch",
176
+ reference.remote,
177
+ path,
178
+ ]);
179
+ if (!cloned.ok) {
180
+ return { ok: false, reason: cloned.stderr.trim() || "git clone failed" };
181
+ }
182
+ return { ok: true };
183
+ }
184
+ function git(argv, cwd) {
185
+ const result = spawnSync("git", argv, {
186
+ encoding: "utf8",
187
+ env: { ...process.env, ...runEnv() },
188
+ ...(cwd === undefined ? {} : { cwd }),
189
+ });
190
+ return {
191
+ ok: result.status === 0,
192
+ stdout: result.stdout ?? "",
193
+ stderr: result.stderr ?? String(result.error ?? ""),
194
+ };
195
+ }
196
+ //# sourceMappingURL=reference.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reference.js","sourceRoot":"","sources":["../src/reference.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MA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AC;QACf,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,kBAAkB,EAAE,CAAC;IAC3E,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;AACtB,CAAC;AAED,SAAS,GAAG,CAAC,IAAc,EAAE,GAAY;IACvC,MAAM,MAAM,GAAG,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE;QACpC,QAAQ,EAAE,MAAM;QAChB,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,GAAG,MAAM,EAAE,EAAE;QACpC,GAAG,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC;KACtC,CAAC,CAAC;IACH,OAAO;QACL,EAAE,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC;QACvB,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,EAAE;QAC3B,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC;KACpD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * The environment every git this package spawns runs with — the identity the
3
+ * system commits under, and how it authenticates against the remote. Both
4
+ * come from the reference the manager named, read once by `reference.parse`
5
+ * at boot; every later `git` (clone, ls-remote, fold) picks them up here.
6
+ *
7
+ * Nothing is written to disk: the credential helper is an inline shell
8
+ * function that reads the token from the environment at the moment git asks,
9
+ * so `.git/config` never holds it and a `git` run by hand in the copy does
10
+ * not either.
11
+ */
12
+ export type GitIdentity = {
13
+ name: string;
14
+ email: string;
15
+ };
16
+ /** What `reference.parse` decided for this run; empty until it ran. */
17
+ export declare function runEnv(): Record<string, string>;
18
+ export declare function setRunEnv(env: Record<string, string>): void;
19
+ /** For tests: back to a process that inherits its own git identity. */
20
+ export declare function clearRunEnv(): void;
21
+ /**
22
+ * Build the environment for one reference. `credentialEnv` names the
23
+ * variable the token is in; the helper reads it when git asks, and refuses a
24
+ * terminal prompt so a missing token fails rather than hangs.
25
+ */
26
+ export declare function envFor(input: {
27
+ author?: GitIdentity | undefined;
28
+ credentialEnv?: string | undefined;
29
+ }): Record<string, string>;
30
+ //# sourceMappingURL=run-env.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-env.d.ts","sourceRoot":"","sources":["../src/run-env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,MAAM,WAAW,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAI1D,uEAAuE;AACvE,wBAAgB,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAE/C;AAED,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAE3D;AAED,uEAAuE;AACvE,wBAAgB,WAAW,IAAI,IAAI,CAElC;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE;IAC5B,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAmBzB"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * The environment every git this package spawns runs with — the identity the
3
+ * system commits under, and how it authenticates against the remote. Both
4
+ * come from the reference the manager named, read once by `reference.parse`
5
+ * at boot; every later `git` (clone, ls-remote, fold) picks them up here.
6
+ *
7
+ * Nothing is written to disk: the credential helper is an inline shell
8
+ * function that reads the token from the environment at the moment git asks,
9
+ * so `.git/config` never holds it and a `git` run by hand in the copy does
10
+ * not either.
11
+ */
12
+ let current = {};
13
+ /** What `reference.parse` decided for this run; empty until it ran. */
14
+ export function runEnv() {
15
+ return { ...current };
16
+ }
17
+ export function setRunEnv(env) {
18
+ current = { ...env };
19
+ }
20
+ /** For tests: back to a process that inherits its own git identity. */
21
+ export function clearRunEnv() {
22
+ current = {};
23
+ }
24
+ /**
25
+ * Build the environment for one reference. `credentialEnv` names the
26
+ * variable the token is in; the helper reads it when git asks, and refuses a
27
+ * terminal prompt so a missing token fails rather than hangs.
28
+ */
29
+ export function envFor(input) {
30
+ const env = {};
31
+ if (input.author !== undefined) {
32
+ env.GIT_AUTHOR_NAME = input.author.name;
33
+ env.GIT_AUTHOR_EMAIL = input.author.email;
34
+ env.GIT_COMMITTER_NAME = input.author.name;
35
+ env.GIT_COMMITTER_EMAIL = input.author.email;
36
+ }
37
+ if (input.credentialEnv !== undefined) {
38
+ // An empty helper first: it clears the list, so the machine's own helpers
39
+ // (a keychain with the operator's account) are not asked before ours.
40
+ env.GIT_CONFIG_COUNT = "2";
41
+ env.GIT_CONFIG_KEY_0 = "credential.helper";
42
+ env.GIT_CONFIG_VALUE_0 = "";
43
+ env.GIT_CONFIG_KEY_1 = "credential.helper";
44
+ env.GIT_CONFIG_VALUE_1 = `!f() { echo username=x-access-token; echo "password=\${${input.credentialEnv}}"; }; f`;
45
+ env.GIT_TERMINAL_PROMPT = "0";
46
+ }
47
+ return env;
48
+ }
49
+ //# sourceMappingURL=run-env.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-env.js","sourceRoot":"","sources":["../src/run-env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,IAAI,OAAO,GAA2B,EAAE,CAAC;AAEzC,uEAAuE;AACvE,MAAM,UAAU,MAAM;IACpB,OAAO,EAAE,GAAG,OAAO,EAAE,CAAC;AACxB,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,GAA2B;IACnD,OAAO,GAAG,EAAE,GAAG,GAAG,EAAE,CAAC;AACvB,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,WAAW;IACzB,OAAO,GAAG,EAAE,CAAC;AACf,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,MAAM,CAAC,KAGtB;IACC,MAAM,GAAG,GAA2B,EAAE,CAAC;IACvC,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QAC/B,GAAG,CAAC,eAAe,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;QACxC,GAAG,CAAC,gBAAgB,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;QAC1C,GAAG,CAAC,kBAAkB,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;QAC3C,GAAG,CAAC,mBAAmB,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;IAC/C,CAAC;IACD,IAAI,KAAK,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;QACtC,0EAA0E;QAC1E,sEAAsE;QACtE,GAAG,CAAC,gBAAgB,GAAG,GAAG,CAAC;QAC3B,GAAG,CAAC,gBAAgB,GAAG,mBAAmB,CAAC;QAC3C,GAAG,CAAC,kBAAkB,GAAG,EAAE,CAAC;QAC5B,GAAG,CAAC,gBAAgB,GAAG,mBAAmB,CAAC;QAC3C,GAAG,CAAC,kBAAkB,GAAG,0DAA0D,KAAK,CAAC,aAAa,UAAU,CAAC;QACjH,GAAG,CAAC,mBAAmB,GAAG,GAAG,CAAC;IAChC,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { IsolationStrategy } from "./types.js";
2
+ /** The strategy as a config with no `isolationOptions` gets it. */
3
+ export declare const strategy: IsolationStrategy;
4
+ /**
5
+ * The strategy shaped by a Project's `workLine.isolationOptions`. Strict, like
6
+ * a manager's options: an unknown key or a wrong type stops `mason run`
7
+ * before it isolates anything.
8
+ *
9
+ * `exclude` replaces the default list (`.env`, `.env.*`) rather than adding
10
+ * to it: a Project that names its own list has looked at the default.
11
+ */
12
+ export declare function createStrategy(raw: Record<string, unknown>): {
13
+ ok: true;
14
+ strategy: IsolationStrategy;
15
+ } | {
16
+ ok: false;
17
+ reason: string;
18
+ };
19
+ //# sourceMappingURL=strategy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"strategy.d.ts","sourceRoot":"","sources":["../src/strategy.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD,mEAAmE;AACnE,eAAO,MAAM,QAAQ,EAAE,iBAKtB,CAAC;AAIF;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC3B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,iBAAiB,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAuB3E"}
@@ -0,0 +1,44 @@
1
+ import { branchNameOf } from "./branch-name.js";
2
+ import { DEFAULT_EXCLUDES } from "./copy-working-files.js";
3
+ import { gitFold } from "./fold.js";
4
+ import { createGitIsolation, gitIsolation } from "./isolation.js";
5
+ import { gitReference } from "./reference.js";
6
+ /** The strategy as a config with no `isolationOptions` gets it. */
7
+ export const strategy = {
8
+ isolation: gitIsolation,
9
+ fold: gitFold,
10
+ reference: gitReference,
11
+ refOf: branchNameOf,
12
+ };
13
+ const OPTION_KEYS = new Set(["exclude"]);
14
+ /**
15
+ * The strategy shaped by a Project's `workLine.isolationOptions`. Strict, like
16
+ * a manager's options: an unknown key or a wrong type stops `mason run`
17
+ * before it isolates anything.
18
+ *
19
+ * `exclude` replaces the default list (`.env`, `.env.*`) rather than adding
20
+ * to it: a Project that names its own list has looked at the default.
21
+ */
22
+ export function createStrategy(raw) {
23
+ for (const key of Object.keys(raw)) {
24
+ if (!OPTION_KEYS.has(key)) {
25
+ return {
26
+ ok: false,
27
+ reason: `isolationOptions "${key}" is not one @bluewombat/isolation-git reads (known: ${[...OPTION_KEYS].join(", ")}).`,
28
+ };
29
+ }
30
+ }
31
+ const exclude = raw.exclude === undefined ? DEFAULT_EXCLUDES : raw.exclude;
32
+ if (!Array.isArray(exclude) ||
33
+ exclude.some((entry) => typeof entry !== "string" || entry.trim().length === 0)) {
34
+ return {
35
+ ok: false,
36
+ reason: 'isolationOptions "exclude" must be a list of non-empty path patterns.',
37
+ };
38
+ }
39
+ return {
40
+ ok: true,
41
+ strategy: { ...strategy, isolation: createGitIsolation({ exclude: [...exclude] }) },
42
+ };
43
+ }
44
+ //# sourceMappingURL=strategy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"strategy.js","sourceRoot":"","sources":["../src/strategy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,mEAAmE;AACnE,MAAM,CAAC,MAAM,QAAQ,GAAsB;IACzC,SAAS,EAAE,YAAY;IACvB,IAAI,EAAE,OAAO;IACb,SAAS,EAAE,YAAY;IACvB,KAAK,EAAE,YAAY;CACpB,CAAC;AAEF,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AAEzC;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAC5B,GAA4B;IAE5B,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QACnC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YAC1B,OAAO;gBACL,EAAE,EAAE,KAAK;gBACT,MAAM,EAAE,qBAAqB,GAAG,wDAAwD,CAAC,GAAG,WAAW,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;aACxH,CAAC;QACJ,CAAC;IACH,CAAC;IACD,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC;IAC3E,IACE,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;QACvB,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,CAAC,EAC/E,CAAC;QACD,OAAO;YACL,EAAE,EAAE,KAAK;YACT,MAAM,EAAE,uEAAuE;SAChF,CAAC;IACJ,CAAC;IACD,OAAO;QACL,EAAE,EAAE,IAAI;QACR,QAAQ,EAAE,EAAE,GAAG,QAAQ,EAAE,SAAS,EAAE,kBAAkB,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC,EAAE,CAAC,EAAE;KACpF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,63 @@
1
+ import type { FoldBackend } from "@bluewombat/integrator";
2
+ import type { IsolationBackend } from "@bluewombat/isolator";
3
+ /** What is at a path today, held against the reference it should be a copy of. */
4
+ export type ReferenceCopyState = {
5
+ kind: "missing";
6
+ } | {
7
+ kind: "matches";
8
+ } | {
9
+ kind: "mismatch";
10
+ reason: string;
11
+ };
12
+ /**
13
+ * One reference work line, read and understood.
14
+ *
15
+ * Every method is bound to the value `parse` accepted, so nothing loosely typed
16
+ * travels past that one call.
17
+ */
18
+ export type ParsedReference = {
19
+ ok: true;
20
+ /** One line for `mason doctor` and the trace. */
21
+ summary: string;
22
+ /** The work line Host offers work to, and the Refresher's `--target`. */
23
+ target: string;
24
+ /** Offline. */
25
+ inspect(path: string): ReferenceCopyState;
26
+ /** Fetches a copy to `path`. Network. */
27
+ materialize(path: string): Promise<{
28
+ ok: true;
29
+ } | {
30
+ ok: false;
31
+ reason: string;
32
+ }>;
33
+ /**
34
+ * What every git process of this run must carry: the identity the system
35
+ * commits under, and how it authenticates. Host hands it to the slots it
36
+ * spawns on the work line (Publisher, Refresher); this package applies it
37
+ * to its own git calls.
38
+ */
39
+ env: Record<string, string>;
40
+ };
41
+ /**
42
+ * How this strategy reads what a manager names as the reference work line.
43
+ *
44
+ * `parse` is strict — an unknown key, a missing one, a wrong type — because the
45
+ * words are agreed between two packages with nothing checking them at compile
46
+ * time. A mistake has to stop `mason run` before it writes anything.
47
+ */
48
+ export type ReferenceBackend = {
49
+ parse(raw: Record<string, unknown>): ParsedReference | {
50
+ ok: false;
51
+ reason: string;
52
+ };
53
+ };
54
+ /** One Isolation method: how a Child is attached, and how it folds back. */
55
+ export type IsolationStrategy = {
56
+ isolation: IsolationBackend;
57
+ fold: FoldBackend;
58
+ /** Absent: this strategy cannot keep a copy of a reference work line. */
59
+ reference?: ReferenceBackend;
60
+ /** The branch a Child isolated under `id` lives on — a Publisher's `--ref`. */
61
+ refOf: (id: string) => string;
62
+ };
63
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,kFAAkF;AAClF,MAAM,MAAM,kBAAkB,GAC1B;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GACnB;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GACnB;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,IAAI,CAAC;IACT,iDAAiD;IACjD,OAAO,EAAE,MAAM,CAAC;IAChB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,eAAe;IACf,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,CAAC;IAC1C,yCAAyC;IACzC,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,EAAE,EAAE,IAAI,CAAA;KAAE,GAAG;QAAE,EAAE,EAAE,KAAK,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACjF;;;;;OAKG;IACH,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7B,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,eAAe,GAAG;QAAE,EAAE,EAAE,KAAK,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CACtF,CAAC;AAEF,4EAA4E;AAC5E,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE,gBAAgB,CAAC;IAC5B,IAAI,EAAE,WAAW,CAAC;IAClB,yEAAyE;IACzE,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,+EAA+E;IAC/E,KAAK,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,CAAC;CAC/B,CAAC"}
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@bluewombat/isolation-git",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "description": "Isolation strategy: git worktree attach, three-way merge fold.",
6
+ "keywords": [
7
+ "mason",
8
+ "bluewombat",
9
+ "isolation",
10
+ "git"
11
+ ],
12
+ "license": "MIT",
13
+ "homepage": "https://github.com/tilap/bluewombat/tree/main/packages/plugins/isolation-git#readme",
14
+ "bugs": "https://github.com/tilap/bluewombat/issues",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/tilap/bluewombat.git",
18
+ "directory": "packages/plugins/isolation-git"
19
+ },
20
+ "exports": {
21
+ ".": {
22
+ "types": "./dist/index.d.ts",
23
+ "import": "./dist/index.js"
24
+ }
25
+ },
26
+ "types": "./dist/index.d.ts",
27
+ "files": [
28
+ "dist",
29
+ "README.md"
30
+ ],
31
+ "publishConfig": {
32
+ "access": "public"
33
+ },
34
+ "engines": {
35
+ "node": ">=24.20.0"
36
+ },
37
+ "scripts": {
38
+ "lint": "biome check .",
39
+ "format": "biome check --write .",
40
+ "tsc": "tsc --noEmit",
41
+ "test": "tsx --test $(find src -name '*.test.ts')",
42
+ "build": "tsc -p tsconfig.build.json"
43
+ },
44
+ "dependencies": {
45
+ "@bluewombat/integrator": "^0.1.0",
46
+ "@bluewombat/isolator": "^0.1.0"
47
+ }
48
+ }