halfcycle 0.3.34 → 0.3.36
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/README.md +13 -0
- package/bin/bin.bundle.mjs +274 -43
- package/dist/banner-facts.d.ts +6 -2
- package/dist/banner-facts.d.ts.map +1 -1
- package/dist/bin.js +282 -298
- package/dist/bin.js.map +3 -3
- package/dist/build-record/render-v2.d.ts.map +1 -1
- package/dist/claude-version-probe.d.ts +44 -0
- package/dist/claude-version-probe.d.ts.map +1 -0
- package/dist/confirm-identity.d.ts +7 -0
- package/dist/confirm-identity.d.ts.map +1 -1
- package/dist/engagement-credential.d.ts +31 -23
- package/dist/engagement-credential.d.ts.map +1 -1
- package/dist/index.js +158 -233
- package/dist/index.js.map +1 -1
- package/dist/install-manifest.d.ts +32 -4
- package/dist/install-manifest.d.ts.map +1 -1
- package/dist/install.d.ts +52 -16
- package/dist/install.d.ts.map +1 -1
- package/dist/open-phase.d.ts +2 -1
- package/dist/open-phase.d.ts.map +1 -1
- package/dist/probe-mcp.d.ts +39 -7
- package/dist/probe-mcp.d.ts.map +1 -1
- package/dist/uninstall.d.ts +1 -1
- package/dist/uninstall.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/install.d.ts
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* (E1-T-09). The name is deliberately innocuous — it discloses nothing about
|
|
22
22
|
* Halfcycle's scaffold contents.
|
|
23
23
|
*/
|
|
24
|
-
import { SETTINGS_REL, WRITE_CAPABLE_TOOLS } from '@halfcycle/core';
|
|
24
|
+
import { BUNDLE_PIN_REL, SETTINGS_REL, WRITE_CAPABLE_TOOLS } from '@halfcycle/core';
|
|
25
25
|
export type EngagementType = 'self-build' | 'client';
|
|
26
26
|
export interface BundlePin {
|
|
27
27
|
version: string;
|
|
@@ -279,8 +279,8 @@ export declare const ZONE_B_DIR = ".workbench";
|
|
|
279
279
|
* depending on build mode — see the comment above `findBundleRoot`).
|
|
280
280
|
*/
|
|
281
281
|
export declare const BUNDLE_ROOT: string;
|
|
282
|
-
/** The committed pin. */
|
|
283
|
-
export
|
|
282
|
+
/** The committed pin. Its one home is `@halfcycle/core`; re-exported for the uninstaller. */
|
|
283
|
+
export { BUNDLE_PIN_REL };
|
|
284
284
|
/**
|
|
285
285
|
* The three files the installer merges into rather than owns. `SETTINGS_REL` lives
|
|
286
286
|
* with the hook table in `@halfcycle/core` and is re-exported here, as is
|
|
@@ -288,6 +288,8 @@ export declare const BUNDLE_PIN_REL = ".halfcycle/bundle.json";
|
|
|
288
288
|
*/
|
|
289
289
|
export { SETTINGS_REL, WRITE_CAPABLE_TOOLS };
|
|
290
290
|
export declare const GITIGNORE_REL = ".gitignore";
|
|
291
|
+
/** The attributes file the installer appends its line-ending rules to. */
|
|
292
|
+
export declare const GITATTRIBUTES_REL = ".gitattributes";
|
|
291
293
|
export interface ClosedWriteSet {
|
|
292
294
|
/** Files the installer writes whole. */
|
|
293
295
|
readonly files: ReadonlySet<string>;
|
|
@@ -303,6 +305,8 @@ export interface ClosedWriteSet {
|
|
|
303
305
|
readonly denyRuleSha256: ReadonlySet<string>;
|
|
304
306
|
/** Every line the installer appends to `.gitignore`. */
|
|
305
307
|
readonly gitignoreLines: ReadonlySet<string>;
|
|
308
|
+
/** Every line the installer appends to `.gitattributes`, retired scripts' included. */
|
|
309
|
+
readonly gitattributesLines: ReadonlySet<string>;
|
|
306
310
|
}
|
|
307
311
|
/**
|
|
308
312
|
* THE CLOSED WRITE SET, derived from the same constants the installer writes with
|
|
@@ -312,8 +316,11 @@ export interface ClosedWriteSet {
|
|
|
312
316
|
* deny rule or a `.gitignore` line is taken out only if the manifest records it AND
|
|
313
317
|
* it is one the installer generates: `HALFCYCLE_HOOK_COMMANDS` (the hook table's
|
|
314
318
|
* commands plus the retired ones — the set `generateSettingsJson` builds from), the
|
|
315
|
-
* hashes of `DENY_PATTERNS`,
|
|
316
|
-
* `REQUIRED_GITIGNORE_ENTRIES` plus the `.env.local` line older versions wrote
|
|
319
|
+
* hashes of `DENY_PATTERNS`, the `.gitignore` header plus
|
|
320
|
+
* `REQUIRED_GITIGNORE_ENTRIES` plus the `.env.local` line older versions wrote, and
|
|
321
|
+
* the `.gitattributes` header plus one LF rule per generated `.sh` path, current
|
|
322
|
+
* (`OWNED_GENERATED_HEADERS`) OR retired (`RETIRED_WRITE_SET_FILES`) — so a rule an
|
|
323
|
+
* earlier version wrote for a script a later one retires is still recognised.
|
|
317
324
|
* Without it a crafted manifest could name a developer's own hook, deny rule or
|
|
318
325
|
* ignore line and have uninstall delete it.
|
|
319
326
|
*
|
|
@@ -324,9 +331,10 @@ export interface ClosedWriteSet {
|
|
|
324
331
|
* that is not removed, whatever else it says.
|
|
325
332
|
*
|
|
326
333
|
* DERIVED, NOT LISTED. The command stubs come from `plugin.json`'s `commands[]`, the
|
|
327
|
-
* same array `copyManifestCommands` copies from; the hook scripts
|
|
328
|
-
*
|
|
329
|
-
*
|
|
334
|
+
* same array `copyManifestCommands` copies from; the hook scripts from
|
|
335
|
+
* `OWNED_GENERATED_HEADERS`, the table the owned-generated writes key on; the retired
|
|
336
|
+
* headers helper from `RETIRED_WRITE_SET_FILES`; the rest from the named constants
|
|
337
|
+
* their writers use. The directories are the
|
|
330
338
|
* ancestors of every member, so a new file under a new directory brings its
|
|
331
339
|
* directory with it. The writer and the remover therefore cannot hold two lists.
|
|
332
340
|
*/
|
|
@@ -419,8 +427,11 @@ export declare const USER_PROMPT_REMINDER_SENTENCE: string;
|
|
|
419
427
|
* protecting anyone: see DENY_PATTERNS for what these nine do and do not cover.
|
|
420
428
|
*/
|
|
421
429
|
export declare function generateSettingsJson(): string;
|
|
422
|
-
/**
|
|
423
|
-
|
|
430
|
+
/**
|
|
431
|
+
* What a retired generated file's removal found on disk and did about it
|
|
432
|
+
* (`removeLegacyCiStanza`, `removeRetiredMcpHeadersHelper`).
|
|
433
|
+
*/
|
|
434
|
+
export type RetiredFileRemoval = 'removed' | 'kept-foreign' | 'kept-uncommitted' | 'absent' | 'failed';
|
|
424
435
|
/**
|
|
425
436
|
* Delete `.halfcycle/ci-stanza.yml` when, and only when, BOTH hold (R-25 fix
|
|
426
437
|
* wave, F1): its opening line hashes to exactly one generation this installer
|
|
@@ -444,7 +455,7 @@ export type CiStanzaRemoval = 'removed' | 'kept-foreign' | 'kept-uncommitted' |
|
|
|
444
455
|
* reported, never thrown. Cleaning up a file this task retires must not fail an
|
|
445
456
|
* otherwise-successful install.
|
|
446
457
|
*/
|
|
447
|
-
export declare function removeLegacyCiStanza(targetRepo: string):
|
|
458
|
+
export declare function removeLegacyCiStanza(targetRepo: string): RetiredFileRemoval;
|
|
448
459
|
/**
|
|
449
460
|
* **THE INSTALLER WRITES NO `.env.example`, AND THIS IS WHERE THAT GENERATOR WAS.**
|
|
450
461
|
*
|
|
@@ -500,6 +511,20 @@ export declare const MCP_REGISTRATION_REL = ".mcp.json";
|
|
|
500
511
|
* `mcpServers` — one home, because two generated shell scripts now look for it and
|
|
501
512
|
* a literal typed twice is a literal that can disagree with itself. */
|
|
502
513
|
export declare const MCP_SERVER_KEY = "halfcycle";
|
|
514
|
+
/**
|
|
515
|
+
* Delete the retired `.halfcycle/mcp-headers.sh` when, and only when, BOTH hold —
|
|
516
|
+
* the rule `removeLegacyCiStanza` follows, applied to this path
|
|
517
|
+
* (`windows-client-seat`, AC5): its second line hashes to one of
|
|
518
|
+
* `MCP_HEADERS_KNOWN_HEADER_HASHES`, AND `isTrackedAndClean` holds. Anything else is
|
|
519
|
+
* KEPT and reported, never deleted. A committed edit below an untouched header passes
|
|
520
|
+
* both keys and is deleted; accepted, because git history keeps it.
|
|
521
|
+
*
|
|
522
|
+
* CALLED ONLY AFTER `.mcp.json` HAS BEEN REWRITTEN to `MCP_HEADERS_HELPER_COMMAND`.
|
|
523
|
+
* Until then the old registration still names this script, and deleting it would
|
|
524
|
+
* take the credential away from a session that has not been migrated. An install
|
|
525
|
+
* with no MCP origin rewrites no registration, so it removes nothing.
|
|
526
|
+
*/
|
|
527
|
+
export declare function removeRetiredMcpHeadersHelper(targetRepo: string): RetiredFileRemoval;
|
|
503
528
|
/**
|
|
504
529
|
* THE ONE HOME of *which generated files this installer claims as its own, and by
|
|
505
530
|
* what evidence* (#1103). Every entry is a client-tree path this package
|
|
@@ -533,13 +558,16 @@ export declare const MCP_SERVER_KEY = "halfcycle";
|
|
|
533
558
|
* generation (`#1112`). T-25 removed the generator itself; the four forms' hashes
|
|
534
559
|
* now live in `CI_STANZA_KNOWN_HEADER_HASHES`, evidence for a REMOVAL rather than
|
|
535
560
|
* a write.
|
|
561
|
+
*
|
|
562
|
+
* `.halfcycle/mcp-headers.sh` LEFT this table (`windows-client-seat`): nothing writes
|
|
563
|
+
* it any more. Its path is in `RETIRED_WRITE_SET_FILES` and its two header forms'
|
|
564
|
+
* hashes in `MCP_HEADERS_KNOWN_HEADER_HASHES`, the same move the CI stanza made.
|
|
536
565
|
*/
|
|
537
566
|
export declare const OWNED_GENERATED_HEADERS: {
|
|
538
567
|
readonly '.claude/hooks/guard-runner.sh': "# Governance hook wrapper — generated by";
|
|
539
568
|
readonly '.claude/hooks/user-prompt-reminder.sh': "# UserPromptSubmit house-rule reminder — generated by";
|
|
540
569
|
readonly '.claude/hooks/session-end-marker.sh': "# Session-end marker cleanup — generated by";
|
|
541
570
|
readonly '.claude/hooks/session-start-marker.sh': "# Session-start marker — generated by";
|
|
542
|
-
readonly '.halfcycle/mcp-headers.sh': "# Halfcycle MCP connection headers — generated by";
|
|
543
571
|
};
|
|
544
572
|
/**
|
|
545
573
|
* The header line every `.gitignore` block this installer appends opens with. One
|
|
@@ -547,6 +575,13 @@ export declare const OWNED_GENERATED_HEADERS: {
|
|
|
547
575
|
* is what lets a first-manifest run claim the blocks an older version appended.
|
|
548
576
|
*/
|
|
549
577
|
export declare const GITIGNORE_HEADER = "# Halfcycle \u2014 machine-local secrets/state and Zone-B (never push to client remote)";
|
|
578
|
+
/**
|
|
579
|
+
* The header line every `.gitattributes` block this installer appends opens with
|
|
580
|
+
* (`windows-install-hygiene.md`, AC1). Git for Windows usually clones with
|
|
581
|
+
* `core.autocrlf=true`, which would check the generated bash scripts out with CR
|
|
582
|
+
* line endings; the rules under this header pin them to LF in every clone.
|
|
583
|
+
*/
|
|
584
|
+
export declare const GITATTRIBUTES_HEADER = "# Halfcycle \u2014 generated scripts keep LF line endings";
|
|
550
585
|
/**
|
|
551
586
|
* Read the pinned bundle.json from a target repo and compare its version
|
|
552
587
|
* against the current bundle version. Returns the installed pin if present.
|
|
@@ -641,8 +676,8 @@ export declare function readBundlePin(targetRepoRoot: string): BundlePin | null;
|
|
|
641
676
|
* either way. Reading the process environment for a secret here is still the one
|
|
642
677
|
* thing the paragraph below exists to prevent, and is still not done.
|
|
643
678
|
*
|
|
644
|
-
* PARSES, NEVER SOURCES — a credential store is not code, exactly as the
|
|
645
|
-
* `mcp-headers
|
|
679
|
+
* PARSES, NEVER SOURCES — a credential store is not code, exactly as the runner's
|
|
680
|
+
* `mcp-headers` verb treats it (through core's `parseEnvText`).
|
|
646
681
|
*/
|
|
647
682
|
export declare function readPinnedEngagement(targetRepoRoot: string, home?: string): {
|
|
648
683
|
engagementId: string;
|
|
@@ -666,8 +701,9 @@ export declare function checkDrift(targetRepoRoot: string): {
|
|
|
666
701
|
* 4. vendored guard binary → .halfcycle/bin/bin.bundle.mjs (self-contained)
|
|
667
702
|
* 5. Governance-hook wiring (.claude/settings.json, guard-runner.sh,
|
|
668
703
|
* session-start-marker.sh, user-prompt-reminder.sh)
|
|
669
|
-
* 6. (nothing) — no CI stanza (removed at T-25); the MCP registration
|
|
670
|
-
*
|
|
704
|
+
* 6. (nothing) — no CI stanza (removed at T-25); the MCP registration
|
|
705
|
+
* (credentialed installs only — T-24), then the retired connection-headers
|
|
706
|
+
* helper's removal (`windows-client-seat`).
|
|
671
707
|
* NO env scaffold either: the installer writes no `.env.example` at all
|
|
672
708
|
* (operator decision, 2026-08-30)
|
|
673
709
|
* 7. .gitignore + project identity + the engagement credential (OUTSIDE the tree,
|
package/dist/install.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../src/install.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAOH,OAAO,
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../src/install.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAOH,OAAO,EACL,cAAc,EAGd,YAAY,EAEZ,mBAAmB,EACpB,MAAM,iBAAiB,CAAC;AA2CzB,MAAM,MAAM,cAAc,GAAG,YAAY,GAAG,QAAQ,CAAC;AAErD,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,cAAc,CAAC;IAC/B;;;;;OAKG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;;;;;;;;;;OAiBG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;;;;;;;OAaG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;;;;;;;;;;;;OAiBG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;;;;;;;;;;;;OAgBG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,cAAc,CAAC;IAC/B,kFAAkF;IAClF,UAAU,C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,CAAC,cAAc,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAMlH;AAmRD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,CAmc7E"}
|
package/dist/open-phase.d.ts
CHANGED
|
@@ -97,7 +97,8 @@ export interface RepoCredential {
|
|
|
97
97
|
* engagement this is*.
|
|
98
98
|
*
|
|
99
99
|
* READ, NEVER SOURCED — a credential store is not code, and this parses `KEY=value`
|
|
100
|
-
* lines exactly as the
|
|
100
|
+
* lines with core's `parseEnvText`, exactly as the runner's `mcp-headers` verb does
|
|
101
|
+
* (the editor's headers command since `windows-client-seat`). The process environment WINS
|
|
101
102
|
* when it carries a key, so an operator can point one command at a different plane
|
|
102
103
|
* without editing a file, and a CI job with no per-user store works by exporting
|
|
103
104
|
* them.
|
package/dist/open-phase.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-phase.d.ts","sourceRoot":"","sources":["../src/open-phase.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAIH,OAAO,EAIL,KAAK,kBAAkB,EACxB,MAAM,mBAAmB,CAAC;AAY3B;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB;IAChC,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,sFAAsF;AACtF,MAAM,WAAW,WAAW;IAC1B,iDAAiD;IACjD,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,qDAAqD;IACrD,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B;;;;OAIG;IACH,YAAY,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC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
|
* mint in `bin.ts`.
|
|
18
18
|
*
|
|
19
|
-
* **`initialize` is the probe** because it
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
19
|
+
* **`initialize` is the probe** because it identifies the server: a wrong
|
|
20
|
+
* origin 404s, a right one answers with its `serverInfo`. The alternative — a
|
|
21
|
+
* plain `GET /health` — would prove an origin is alive without proving it serves
|
|
22
|
+
* MCP, which is exactly the distinction that was missing.
|
|
23
|
+
*
|
|
24
|
+
* **It carries this machine's credential** (`windows-client-seat` AC4). This
|
|
25
|
+
* docblock used to say `initialize` was chosen because it needs no credential.
|
|
26
|
+
* That stops being true when delivery checks the bearer before any method runs,
|
|
27
|
+
* so the probe sends the same `Authorization: Bearer <token>` the editor's
|
|
28
|
+
* headers command sends. Three consequences, each deliberate:
|
|
29
|
+
*
|
|
30
|
+
* - **A 401 is its own outcome, not "unreachable".** The address answered, so
|
|
31
|
+
* the address is right; what was refused is the credential. The call site
|
|
32
|
+
* in `bin.ts` prints a different line for it, because the unreachable line
|
|
33
|
+
* tells the developer the service is down and to wait.
|
|
34
|
+
* - **Today's delivery still reads reachable.** It answers `initialize`
|
|
35
|
+
* without looking at the header, and an extra header changes nothing. This
|
|
36
|
+
* matters because the CLI that sends it publishes BEFORE delivery starts
|
|
37
|
+
* refusing.
|
|
38
|
+
* - **The credential goes to the recorded origin and nowhere else.** The URL
|
|
39
|
+
* is composed by `mcpEndpointUrl` from the same origin `.mcp.json` names, and
|
|
40
|
+
* redirects are NOT followed (`redirect: 'manual'`): a 3xx is reported, never
|
|
41
|
+
* chased, so no other host is ever sent the bearer by this call, whatever
|
|
42
|
+
* the fetch implementation does with `Authorization` across a redirect. A
|
|
43
|
+
* redirect is also not a working registration — a client that followed it
|
|
44
|
+
* would arrive at an origin the credential was not issued for — so calling
|
|
45
|
+
* it unreachable is the honest answer, not a lost case.
|
|
46
|
+
*
|
|
47
|
+
* The token never appears in a returned sentence: every `problem` below is
|
|
48
|
+
* built from the status, the timeout and the transport error's message only.
|
|
24
49
|
*
|
|
25
50
|
* INV-001: Node builtins and the global `fetch` only. No hosted import.
|
|
26
51
|
*/
|
|
@@ -30,9 +55,14 @@ export type McpProbe =
|
|
|
30
55
|
reached: true;
|
|
31
56
|
serverName: string;
|
|
32
57
|
}
|
|
33
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* It did not. `problem` is a plain-words sentence naming what happened.
|
|
60
|
+
* `credentialRefused` is true for exactly one answer — a 401 — where the
|
|
61
|
+
* address is right and the credential is what was turned away.
|
|
62
|
+
*/
|
|
34
63
|
| {
|
|
35
64
|
reached: false;
|
|
65
|
+
credentialRefused: boolean;
|
|
36
66
|
problem: string;
|
|
37
67
|
};
|
|
38
68
|
/**
|
|
@@ -42,6 +72,8 @@ export type McpProbe =
|
|
|
42
72
|
* is composed by `mcpEndpointUrl` — the SAME function that composes
|
|
43
73
|
* the literal url written into `.mcp.json` (T-24), so this probe
|
|
44
74
|
* cannot report an address the registration does not use.
|
|
75
|
+
* @param token This machine's credential for the project — the value the
|
|
76
|
+
* editor's headers command sends. Sent to that endpoint only.
|
|
45
77
|
*/
|
|
46
|
-
export declare function probeMcpOrigin(mcpUrl: string): Promise<McpProbe>;
|
|
78
|
+
export declare function probeMcpOrigin(mcpUrl: string, token: string): Promise<McpProbe>;
|
|
47
79
|
//# sourceMappingURL=probe-mcp.d.ts.map
|
package/dist/probe-mcp.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"probe-mcp.d.ts","sourceRoot":"","sources":["../src/probe-mcp.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"probe-mcp.d.ts","sourceRoot":"","sources":["../src/probe-mcp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAQH,MAAM,MAAM,QAAQ;AAClB,4FAA4F;AAC1F;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE;AACvC;;;;GAIG;GACD;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,iBAAiB,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpE;;;;;;;;;GASG;AACH,wBAAsB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CA4DrF"}
|
package/dist/uninstall.d.ts
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* template an earlier version wrote (`removeLegacyCiStanza`, which carries its
|
|
21
21
|
* own two keys: an exact known header and a clean committed copy);
|
|
22
22
|
* 4. remove the directories an install created, deepest first, when empty;
|
|
23
|
-
* 5. trim `.gitignore`;
|
|
23
|
+
* 5. trim `.gitignore`, then `.gitattributes`;
|
|
24
24
|
* 6. remove this machine's credential for the project, if asked;
|
|
25
25
|
* 7. only when nothing so far failed: the pin, the manifest, then `.halfcycle/`.
|
|
26
26
|
* A failure at 3–6 therefore leaves the pin and the manifest in place, and a rerun
|
package/dist/uninstall.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../src/uninstall.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;
|
|
1
|
+
{"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../src/uninstall.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAyCH,2BAA2B;AAC3B,eAAO,MAAM,sBAAsB,wBAAwB,CAAC;AAE5D,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;IACnC,iFAAiF;IACjF,QAAQ,CAAC,IAAI,CAAC,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