@abloh/cli 0.1.4 → 1.0.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 (3) hide show
  1. package/dist/index.d.ts +26 -1
  2. package/dist/index.js +28425 -13709
  3. package/package.json +11 -9
package/dist/index.d.ts CHANGED
@@ -5,5 +5,30 @@ declare function gitMergeBase(cwd: string, base: string, head: string): Promise<
5
5
  * verify each ref resolves to a commit in the target repo before any work starts.
6
6
  */
7
7
  declare function assertCommitRef(cwd: string, flag: string, ref: string): Promise<void>;
8
+ /**
9
+ * Make `--base` usable before anything is checked against it, deepening a shallow checkout when
10
+ * that is what stands in the way.
11
+ *
12
+ * Runs BEFORE assertCommitRef and gitMergeBase, and it is the reason those two now describe a
13
+ * repository that could not be repaired rather than one that merely arrived incomplete. A checkout
14
+ * that already holds the base pays one `cat-file` and one `merge-base` for this, and touches no
15
+ * network; a depth-1 CI clone pays a bounded fetch and then runs.
16
+ *
17
+ * TWO CAUSES ARE PASSED THROUGH, and they are the two where nothing was attempted: a name this
18
+ * checkout does not have (`unknown-ref`), and a base that does not resolve in a repository with no
19
+ * remote. Both are the flag's own story, and `--base ref not found in <dir>: <ref>` names the flag
20
+ * the customer typed, which is the better sentence. Every other cause has already had its bounded
21
+ * repair tried and failed, so its remedy is the one to raise.
22
+ */
23
+ declare function ensureBaseUsable(cwd: string, base: string, head: string, onProgress?: (line: string) => void): Promise<void>;
24
+
25
+ /**
26
+ * The longest of the baseline's runs, in milliseconds, or undefined when there was no baseline.
27
+ *
28
+ * THE LONGEST rather than the mean, because this feeds a DEADLINE: a deadline set from an average
29
+ * is one half the observations already exceed. `--skip-baseline` leaves it undefined, and the
30
+ * engine then keeps its own default rather than deriving from a number nobody measured.
31
+ */
32
+ declare function longestBaselineRunMs(durationsMs: readonly number[] | undefined): number | undefined;
8
33
 
9
- export { assertCommitRef, gitMergeBase, gitRevParse };
34
+ export { assertCommitRef, ensureBaseUsable, gitMergeBase, gitRevParse, longestBaselineRunMs };