@krapht/ork 1.0.0-alpha.1 → 1.0.0-alpha.10
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/README.md +3 -4
- package/dist/{__build_info__-D9lSlMFy.mjs → __build_info__-DFF18K8y.mjs} +72 -3
- package/dist/bin.mjs +579 -379
- package/dist/{clean-CA_Oi2Wl.mjs → clean-DVaEH9e7.mjs} +5 -2
- package/dist/{completion-DBGfL-gN.mjs → completion-Dv5kf598.mjs} +6 -6
- package/dist/context-CEaKOVmG.mjs +683 -0
- package/dist/{decide-CoIJh34e.mjs → decide-3l9q8UtX.mjs} +3 -3
- package/dist/{find-rBBk7Jui.mjs → find-DEjjOlTG.mjs} +1 -1
- package/dist/format-Cb5_m-Qd.mjs +191 -0
- package/dist/{in-a-run-DdAakpRR.mjs → in-a-run-BS9Nc-JW.mjs} +1 -1
- package/dist/{limits-BPM9wUlV.mjs → limits-BSwEjQST.mjs} +1 -1
- package/dist/{list-Bv5Lxu7z.mjs → list-Qxr6rwsY.mjs} +11 -4
- package/dist/{mcp-DM30MFBw.mjs → mcp-CslnG5wf.mjs} +6 -6
- package/dist/output-Bqljtmp_.mjs +40 -0
- package/dist/{pause-C7lJkSma.mjs → pause-D7OVB5Ac.mjs} +4 -4
- package/dist/{relay-BipJYszF.mjs → relay-EceRIebO.mjs} +2 -2
- package/dist/{remove-BDs9isB6.mjs → remove-0IQZVWmI.mjs} +14 -7
- package/dist/{send-nbkjf3sc.mjs → send-C0uwfUYi.mjs} +3 -3
- package/dist/{src-hrj2h0IZ.mjs → src-Df6KOIDC.mjs} +5678 -3245
- package/dist/{src-BxUJPGa5.mjs → src-cmmXKHn1.mjs} +265 -203
- package/dist/{src-B0TT7DBi.mjs → src-i5k2Y-kf.mjs} +35 -86
- package/dist/src-oaJYIddp.mjs +2255 -0
- package/dist/ui/THIRD_PARTY_LICENSES.txt +594 -0
- package/dist/ui/assets/app-C8uhHVYp.css +1 -0
- package/dist/ui/assets/app-qs8Lofv6.js +75 -0
- package/dist/ui/assets/{index-CPx74lFf.js → index-DV1ZaOk-.js} +3 -3
- package/dist/ui/assets/theme-CdXvqTQ6.js +1 -0
- package/dist/ui/index.html +2 -2
- package/dist/{ui-B98FSboa.mjs → ui-CBkHJdqk.mjs} +4 -4
- package/dist/{usage-EW7DI6Z7.mjs → usage-Cd8pEYyK.mjs} +5 -5
- package/dist/{watch-BAkSGaOp.mjs → watch-DW5R2OPO.mjs} +6 -6
- package/dist/{workflows-vsEohqa7.mjs → workflows-BT1gDRIV.mjs} +4 -3
- package/dist/{worktrees-Ahj9rdWK.mjs → worktrees-g1MQMGie.mjs} +78 -19
- package/package.json +2 -4
- package/dist/context-6x3kXREO.mjs +0 -274
- package/dist/format-zMmhqyLE.mjs +0 -427
- package/dist/output-TV_j7Ni0.mjs +0 -950
- package/dist/src-B9v0lDc6.mjs +0 -1204
- package/dist/ui/assets/app-BNT0SuIz.css +0 -1
- package/dist/ui/assets/app-CmkynZyW.js +0 -67
- package/dist/ui/assets/theme-3xH5jxKs.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { N as gitOk, j as removeWorktree } from "./src-Df6KOIDC.mjs";
|
|
2
2
|
// ../core/src/worktree/clean.ts
|
|
3
3
|
/**
|
|
4
4
|
* @file What `ork worktrees clean` and `ork worktrees remove` do with what
|
|
@@ -11,6 +11,7 @@ const keyOf = (item) => item.branch ?? item.path ?? `${item.runId}/${item.nodeId
|
|
|
11
11
|
/** The reasons no `force` overrides: removing would break something. */
|
|
12
12
|
const MAIN_CHECKOUT = "checked out in the main checkout";
|
|
13
13
|
const RUN_GOING = "its run is still going";
|
|
14
|
+
const NOT_ORKS = "not created by Ork";
|
|
14
15
|
const kept = (item, skip) => ({
|
|
15
16
|
item,
|
|
16
17
|
removeWorktree: false,
|
|
@@ -19,6 +20,7 @@ const kept = (item, skip) => ({
|
|
|
19
20
|
});
|
|
20
21
|
/** What clean does with one item. */
|
|
21
22
|
const cleanStep = (item, options) => {
|
|
23
|
+
if (!item.recorded) return kept(item, NOT_ORKS);
|
|
22
24
|
if (item.inMainCheckout) return kept(item, MAIN_CHECKOUT);
|
|
23
25
|
if (item.heldBy !== void 0) return kept(item, `checked out in ${item.heldBy}`);
|
|
24
26
|
if (options.live?.has(item.runId) === true) return kept(item, RUN_GOING);
|
|
@@ -45,7 +47,8 @@ const stepActs = (step) => step.removeWorktree || step.deleteBranch || stepPrune
|
|
|
45
47
|
* What `ork worktrees clean` would do. A worktree with uncommitted changes, an
|
|
46
48
|
* unmerged branch, or a detached worktree holding commits no branch has, is
|
|
47
49
|
* kept unless `force`; one checked out in the main checkout or in a worktree
|
|
48
|
-
* Ork didn't create,
|
|
50
|
+
* Ork didn't create, whose run is still going, or an `ork/` branch no run
|
|
51
|
+
* recorded creating, is kept even then.
|
|
49
52
|
*/
|
|
50
53
|
const planClean = (items, filter, options) => items.filter((item) => filter.runId === void 0 || item.runId === filter.runId).filter((item) => filter.key === void 0 || keyOf(item) === filter.key).filter((item) => !filter.merged || item.merged).map((item) => cleanStep(item, options));
|
|
51
54
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as builtinWorkflowNames, n as pendingDecisions, o as builtinWorkflowText, s as isBuiltinArg } from "./decide-
|
|
3
|
-
import { t as findRun } from "./find-
|
|
4
|
-
import { c as openStore, l as storePath, o as writeErr } from "./output-TV_j7Ni0.mjs";
|
|
1
|
+
import { D as openStore, O as storePath, Tn as placeFor, bt as liveStatus, mr as AGENT_DRIVERS, rr as NodeIdSchema, wn as placeFiles } from "./src-Df6KOIDC.mjs";
|
|
2
|
+
import { a as builtinWorkflowNames, n as pendingDecisions, o as builtinWorkflowText, s as isBuiltinArg } from "./decide-3l9q8UtX.mjs";
|
|
3
|
+
import { t as findRun } from "./find-DEjjOlTG.mjs";
|
|
5
4
|
import { a as findEntry, c as subcommandsOf, d as SHELL_SCRIPTS, l as COMPLETE_COMMAND, n as groupedEntries, r as argInfoOf, t as groupOf, u as SHELLS } from "./help-groups-BwYoAWsh.mjs";
|
|
6
|
-
import {
|
|
5
|
+
import { o as writeErr } from "./output-Bqljtmp_.mjs";
|
|
6
|
+
import { a as resolveWorkflowArg, n as WORKFLOW_SUFFIX } from "./workflows-BT1gDRIV.mjs";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import { parse } from "yaml";
|
|
9
9
|
import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
@@ -117,7 +117,7 @@ const decisions = {
|
|
|
117
117
|
};
|
|
118
118
|
const drivers = {
|
|
119
119
|
group: "drivers",
|
|
120
|
-
values: () =>
|
|
120
|
+
values: () => AGENT_DRIVERS.map((driver) => ({
|
|
121
121
|
value: driver.id,
|
|
122
122
|
description: driver.label
|
|
123
123
|
}))
|