@solaqua/gji 0.12.0 → 0.12.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.
@@ -1,7 +1,6 @@
1
1
  import { formatBytes } from "./format-bytes.js";
2
2
  export function createBootstrapReporter(write, json, measureCloneSize = false) {
3
3
  return {
4
- emitCachedFailureWarnings: !json,
5
4
  measureCloneSize: measureCloneSize && !json,
6
5
  write,
7
6
  cloned: (directory) => {
@@ -1,9 +1,8 @@
1
- import { type CloneFailureStore } from "./clone-failure-store.js";
2
1
  import { type CommandRunner } from "./command-runner.js";
3
2
  import type { DependencyBootstrapMode } from "./config.js";
4
3
  import { type CloneDirectory } from "./dir-clone.js";
5
4
  export type BootstrapKind = "dependency" | "build-cache" | "sync-file";
6
- export type BootstrapState = "seeded" | "repaired" | "installed" | "fallback" | "skipped" | "failed";
5
+ export type BootstrapState = "seeded" | "repaired" | "installed" | "repair-only" | "skipped" | "failed";
7
6
  export type BootstrapStrategy = "cow-then-repair" | "repair-only" | "install-only";
8
7
  export type BootstrapCommandRunner = CommandRunner;
9
8
  export interface BootstrapPreparationContext {
@@ -11,11 +10,14 @@ export interface BootstrapPreparationContext {
11
10
  sourceRoot: string;
12
11
  worktreePath: string;
13
12
  }
14
- export interface BootstrapExecutionContext {
13
+ interface BootstrapCommandExecutionContext {
15
14
  runCommand: BootstrapCommandRunner;
16
15
  stderr: (chunk: string) => void;
17
16
  stdout: (chunk: string) => void;
18
17
  }
18
+ export interface BootstrapExecutionContext extends BootstrapCommandExecutionContext {
19
+ input: BootstrapTargetInput;
20
+ }
19
21
  export interface BootstrapTarget {
20
22
  adapter: string;
21
23
  kind: BootstrapKind;
@@ -26,19 +28,13 @@ export interface BootstrapTarget {
26
28
  targetPath: string;
27
29
  repairCommand: string;
28
30
  repairState: "repaired" | "installed";
29
- existingBeforeBootstrap: boolean;
31
+ shell: boolean;
32
+ initialInput: Exclude<BootstrapTargetInput, "seed">;
30
33
  }
31
- export type BootstrapTargetOwnership = "adapter" | "syncDirs" | "empty" | "preserve";
34
+ export type BootstrapTargetInput = "clean" | "preserve" | "seed";
32
35
  export interface BootstrapRepairFailureContext {
36
+ input: BootstrapTargetInput;
33
37
  target: BootstrapTarget;
34
- ownership: BootstrapTargetOwnership;
35
- targetExistedBeforeRepair: boolean;
36
- }
37
- export interface BootstrapOutputMetadata {
38
- adapter: string;
39
- kind: BootstrapKind;
40
- target: string;
41
- repairCommand: string;
42
38
  }
43
39
  export interface BootstrapAdapter {
44
40
  readonly kind: BootstrapKind;
@@ -49,7 +45,6 @@ export interface BootstrapAdapter {
49
45
  seedPath(target: BootstrapTarget): string;
50
46
  repair(target: BootstrapTarget, context: BootstrapExecutionContext): Promise<void>;
51
47
  canSeed(target: BootstrapTarget): Promise<boolean>;
52
- output(target: BootstrapTarget): BootstrapOutputMetadata;
53
48
  shouldRetryAfterRepairFailure(context: BootstrapRepairFailureContext): boolean;
54
49
  cleanupAfterRepairFailure(context: BootstrapRepairFailureContext): Promise<void>;
55
50
  }
@@ -58,7 +53,6 @@ export interface DependencyBootstrapPlan {
58
53
  targets: readonly PlannedBootstrapTarget[];
59
54
  }
60
55
  export interface PlannedBootstrapTarget {
61
- adapter: BootstrapAdapter;
62
56
  target: BootstrapTarget;
63
57
  seedable: boolean;
64
58
  }
@@ -81,7 +75,6 @@ export interface DependencyBootstrapReport {
81
75
  }
82
76
  export interface DependencyBootstrapDependencies {
83
77
  cloneDirectory?: CloneDirectory;
84
- failureStore?: CloneFailureStore;
85
78
  runCommand?: BootstrapCommandRunner;
86
79
  stderr?: (chunk: string) => void;
87
80
  stdout?: (chunk: string) => void;
@@ -124,6 +117,6 @@ export declare function detectDependencyBootstrapCandidate(context: {
124
117
  }): Promise<DependencyBootstrapCandidate | null>;
125
118
  export declare function previewDependencyBootstrap(plan: DependencyBootstrapPlan): DependencyBootstrapPreview;
126
119
  export declare function executeDependencyBootstrap(plan: DependencyBootstrapPlan, options: DependencyBootstrapDependencies & {
127
- repoRoot: string;
128
120
  reporter: DependencyBootstrapReporter;
129
121
  }): Promise<DependencyBootstrapReport>;
122
+ export {};