dubstack 0.1.3 → 0.2.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 (42) hide show
  1. package/README.md +22 -1
  2. package/dist/index.js +1084 -105
  3. package/dist/index.js.map +1 -1
  4. package/package.json +3 -2
  5. package/dist/commands/create.d.ts +0 -18
  6. package/dist/commands/create.d.ts.map +0 -1
  7. package/dist/commands/create.js +0 -35
  8. package/dist/commands/create.js.map +0 -1
  9. package/dist/commands/init.d.ts +0 -18
  10. package/dist/commands/init.d.ts.map +0 -1
  11. package/dist/commands/init.js +0 -41
  12. package/dist/commands/init.js.map +0 -1
  13. package/dist/commands/log.d.ts +0 -12
  14. package/dist/commands/log.d.ts.map +0 -1
  15. package/dist/commands/log.js +0 -77
  16. package/dist/commands/log.js.map +0 -1
  17. package/dist/commands/restack.d.ts +0 -33
  18. package/dist/commands/restack.d.ts.map +0 -1
  19. package/dist/commands/restack.js +0 -190
  20. package/dist/commands/restack.js.map +0 -1
  21. package/dist/commands/undo.d.ts +0 -21
  22. package/dist/commands/undo.d.ts.map +0 -1
  23. package/dist/commands/undo.js +0 -63
  24. package/dist/commands/undo.js.map +0 -1
  25. package/dist/index.d.ts +0 -20
  26. package/dist/index.d.ts.map +0 -1
  27. package/dist/lib/errors.d.ts +0 -15
  28. package/dist/lib/errors.d.ts.map +0 -1
  29. package/dist/lib/errors.js +0 -18
  30. package/dist/lib/errors.js.map +0 -1
  31. package/dist/lib/git.d.ts +0 -69
  32. package/dist/lib/git.d.ts.map +0 -1
  33. package/dist/lib/git.js +0 -184
  34. package/dist/lib/git.js.map +0 -1
  35. package/dist/lib/state.d.ts +0 -70
  36. package/dist/lib/state.d.ts.map +0 -1
  37. package/dist/lib/state.js +0 -110
  38. package/dist/lib/state.js.map +0 -1
  39. package/dist/lib/undo-log.d.ts +0 -33
  40. package/dist/lib/undo-log.d.ts.map +0 -1
  41. package/dist/lib/undo-log.js +0 -37
  42. package/dist/lib/undo-log.js.map +0 -1
@@ -1,70 +0,0 @@
1
- /** A branch within a stack. */
2
- export interface Branch {
3
- /** Branch name, e.g. "feat/api-endpoint" */
4
- name: string;
5
- /** Set to "root" for the base branch (e.g. main). Omitted for children. */
6
- type?: "root";
7
- /** Name of the parent branch. `null` only for root branches. */
8
- parent: string | null;
9
- /** GitHub PR URL. Populated in Phase 2. */
10
- pr_link: string | null;
11
- }
12
- /** A stack of dependent branches. */
13
- export interface Stack {
14
- /** Unique identifier for this stack. */
15
- id: string;
16
- /** Ordered list of branches in the stack. */
17
- branches: Branch[];
18
- }
19
- /** Root state persisted to `.git/dubstack/state.json`. */
20
- export interface DubState {
21
- /** All tracked stacks in this repository. */
22
- stacks: Stack[];
23
- }
24
- /**
25
- * Returns the absolute path to the dubstack state file.
26
- * @throws {DubError} If not inside a git repository.
27
- */
28
- export declare function getStatePath(cwd: string): Promise<string>;
29
- /**
30
- * Returns the absolute path to the dubstack directory inside `.git`.
31
- * @throws {DubError} If not inside a git repository.
32
- */
33
- export declare function getDubDir(cwd: string): Promise<string>;
34
- /**
35
- * Reads and parses the dubstack state file.
36
- * @throws {DubError} If the state file is missing or contains invalid JSON.
37
- */
38
- export declare function readState(cwd: string): Promise<DubState>;
39
- /**
40
- * Writes the dubstack state to disk.
41
- * Creates the parent directory if it doesn't exist.
42
- */
43
- export declare function writeState(state: DubState, cwd: string): Promise<void>;
44
- /**
45
- * Initializes the dubstack state directory and file.
46
- * Idempotent — returns `"already_exists"` if already initialized.
47
- *
48
- * @returns `"created"` if freshly initialized, `"already_exists"` if state file already present.
49
- */
50
- export declare function initState(cwd: string): Promise<"created" | "already_exists">;
51
- /**
52
- * Finds the stack containing a given branch.
53
- * @returns The matching stack, or `undefined` if the branch isn't tracked.
54
- */
55
- export declare function findStackForBranch(state: DubState, name: string): Stack | undefined;
56
- /**
57
- * Adds a child branch to the state, linking it to its parent.
58
- *
59
- * Decision tree:
60
- * 1. If `child` already exists in any stack → throws `DubError` (no duplicates)
61
- * 2. If `parent` is found in an existing stack → appends child to that stack
62
- * 3. If `parent` is not in any stack → creates a new stack with parent as root
63
- *
64
- * @param state - The state to mutate (modified in place)
65
- * @param child - Name of the new branch
66
- * @param parent - Name of the parent branch
67
- * @throws {DubError} If child branch already exists in state
68
- */
69
- export declare function addBranchToStack(state: DubState, child: string, parent: string): void;
70
- //# sourceMappingURL=state.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/lib/state.ts"],"names":[],"mappings":"AAMA,+BAA+B;AAC/B,MAAM,WAAW,MAAM;IACtB,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,2EAA2E;IAC3E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,2CAA2C;IAC3C,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,qCAAqC;AACrC,MAAM,WAAW,KAAK;IACrB,wCAAwC;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,6CAA6C;IAC7C,QAAQ,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,0DAA0D;AAC1D,MAAM,WAAW,QAAQ;IACxB,6CAA6C;IAC7C,MAAM,EAAE,KAAK,EAAE,CAAC;CAChB;AAED;;;GAGG;AACH,wBAAsB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAG/D;AAED;;;GAGG;AACH,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAG5D;AAED;;;GAGG;AACH,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAa9D;AAED;;;GAGG;AACH,wBAAsB,UAAU,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAO5E;AAED;;;;;GAKG;AACH,wBAAsB,SAAS,CAC9B,GAAG,EAAE,MAAM,GACT,OAAO,CAAC,SAAS,GAAG,gBAAgB,CAAC,CAYvC;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CACjC,KAAK,EAAE,QAAQ,EACf,IAAI,EAAE,MAAM,GACV,KAAK,GAAG,SAAS,CAInB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAC/B,KAAK,EAAE,QAAQ,EACf,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GACZ,IAAI,CAsBN"}
package/dist/lib/state.js DELETED
@@ -1,110 +0,0 @@
1
- import * as crypto from "node:crypto";
2
- import * as fs from "node:fs";
3
- import * as path from "node:path";
4
- import { DubError } from "./errors.js";
5
- import { getRepoRoot } from "./git.js";
6
- /**
7
- * Returns the absolute path to the dubstack state file.
8
- * @throws {DubError} If not inside a git repository.
9
- */
10
- export async function getStatePath(cwd) {
11
- const root = await getRepoRoot(cwd);
12
- return path.join(root, ".git", "dubstack", "state.json");
13
- }
14
- /**
15
- * Returns the absolute path to the dubstack directory inside `.git`.
16
- * @throws {DubError} If not inside a git repository.
17
- */
18
- export async function getDubDir(cwd) {
19
- const root = await getRepoRoot(cwd);
20
- return path.join(root, ".git", "dubstack");
21
- }
22
- /**
23
- * Reads and parses the dubstack state file.
24
- * @throws {DubError} If the state file is missing or contains invalid JSON.
25
- */
26
- export async function readState(cwd) {
27
- const statePath = await getStatePath(cwd);
28
- if (!fs.existsSync(statePath)) {
29
- throw new DubError("DubStack is not initialized. Run 'dub init' first.");
30
- }
31
- try {
32
- const raw = fs.readFileSync(statePath, "utf-8");
33
- return JSON.parse(raw);
34
- }
35
- catch {
36
- throw new DubError("State file is corrupted. Delete .git/dubstack and run 'dub init' to re-initialize.");
37
- }
38
- }
39
- /**
40
- * Writes the dubstack state to disk.
41
- * Creates the parent directory if it doesn't exist.
42
- */
43
- export async function writeState(state, cwd) {
44
- const statePath = await getStatePath(cwd);
45
- const dir = path.dirname(statePath);
46
- if (!fs.existsSync(dir)) {
47
- fs.mkdirSync(dir, { recursive: true });
48
- }
49
- fs.writeFileSync(statePath, `${JSON.stringify(state, null, 2)}\n`);
50
- }
51
- /**
52
- * Initializes the dubstack state directory and file.
53
- * Idempotent — returns `"already_exists"` if already initialized.
54
- *
55
- * @returns `"created"` if freshly initialized, `"already_exists"` if state file already present.
56
- */
57
- export async function initState(cwd) {
58
- const statePath = await getStatePath(cwd);
59
- const dir = path.dirname(statePath);
60
- if (fs.existsSync(statePath)) {
61
- return "already_exists";
62
- }
63
- fs.mkdirSync(dir, { recursive: true });
64
- const emptyState = { stacks: [] };
65
- fs.writeFileSync(statePath, `${JSON.stringify(emptyState, null, 2)}\n`);
66
- return "created";
67
- }
68
- /**
69
- * Finds the stack containing a given branch.
70
- * @returns The matching stack, or `undefined` if the branch isn't tracked.
71
- */
72
- export function findStackForBranch(state, name) {
73
- return state.stacks.find((stack) => stack.branches.some((b) => b.name === name));
74
- }
75
- /**
76
- * Adds a child branch to the state, linking it to its parent.
77
- *
78
- * Decision tree:
79
- * 1. If `child` already exists in any stack → throws `DubError` (no duplicates)
80
- * 2. If `parent` is found in an existing stack → appends child to that stack
81
- * 3. If `parent` is not in any stack → creates a new stack with parent as root
82
- *
83
- * @param state - The state to mutate (modified in place)
84
- * @param child - Name of the new branch
85
- * @param parent - Name of the parent branch
86
- * @throws {DubError} If child branch already exists in state
87
- */
88
- export function addBranchToStack(state, child, parent) {
89
- if (findStackForBranch(state, child)) {
90
- throw new DubError(`Branch '${child}' is already tracked in a stack.`);
91
- }
92
- const childBranch = { name: child, parent, pr_link: null };
93
- const existingStack = findStackForBranch(state, parent);
94
- if (existingStack) {
95
- existingStack.branches.push(childBranch);
96
- }
97
- else {
98
- const rootBranch = {
99
- name: parent,
100
- type: "root",
101
- parent: null,
102
- pr_link: null,
103
- };
104
- state.stacks.push({
105
- id: crypto.randomUUID(),
106
- branches: [rootBranch, childBranch],
107
- });
108
- }
109
- }
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,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAClC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAC3C,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,gBAAgB,CAC/B,KAAe,EACf,KAAa,EACb,MAAc;IAEd,IAAI,kBAAkB,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC;QACtC,MAAM,IAAI,QAAQ,CAAC,WAAW,KAAK,kCAAkC,CAAC,CAAC;IACxE,CAAC;IAED,MAAM,WAAW,GAAW,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IACnE,MAAM,aAAa,GAAG,kBAAkB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAExD,IAAI,aAAa,EAAE,CAAC;QACnB,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC1C,CAAC;SAAM,CAAC;QACP,MAAM,UAAU,GAAW;YAC1B,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,IAAI;YACZ,OAAO,EAAE,IAAI;SACb,CAAC;QACF,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;YACjB,EAAE,EAAE,MAAM,CAAC,UAAU,EAAE;YACvB,QAAQ,EAAE,CAAC,UAAU,EAAE,WAAW,CAAC;SACnC,CAAC,CAAC;IACJ,CAAC;AACF,CAAC"}
@@ -1,33 +0,0 @@
1
- import type { DubState } from "./state.js";
2
- /**
3
- * Snapshot of system state before a mutation, used by `dub undo`.
4
- * Only one undo level is supported — each new mutation overwrites the previous snapshot.
5
- */
6
- export interface UndoEntry {
7
- /** Which command created this snapshot. */
8
- operation: "create" | "restack";
9
- /** ISO timestamp of when the snapshot was taken. */
10
- timestamp: string;
11
- /** The branch user was on before the operation. */
12
- previousBranch: string;
13
- /** Full copy of state.json before mutation. */
14
- previousState: DubState;
15
- /** Map of branch name → commit SHA before mutation. */
16
- branchTips: Record<string, string>;
17
- /** Branches created by this operation (to be deleted on undo). */
18
- createdBranches: string[];
19
- }
20
- /**
21
- * Saves an undo entry to disk. Overwrites any previous entry (1 level only).
22
- */
23
- export declare function saveUndoEntry(entry: UndoEntry, cwd: string): Promise<void>;
24
- /**
25
- * Reads the most recent undo entry.
26
- * @throws {DubError} If no undo entry exists.
27
- */
28
- export declare function readUndoEntry(cwd: string): Promise<UndoEntry>;
29
- /**
30
- * Deletes the undo entry file. Called after a successful undo.
31
- */
32
- export declare function clearUndoEntry(cwd: string): Promise<void>;
33
- //# sourceMappingURL=undo-log.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"undo-log.d.ts","sourceRoot":"","sources":["../../src/lib/undo-log.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAG3C;;;GAGG;AACH,MAAM,WAAW,SAAS;IACzB,2CAA2C;IAC3C,SAAS,EAAE,QAAQ,GAAG,SAAS,CAAC;IAChC,oDAAoD;IACpD,SAAS,EAAE,MAAM,CAAC;IAClB,mDAAmD;IACnD,cAAc,EAAE,MAAM,CAAC;IACvB,+CAA+C;IAC/C,aAAa,EAAE,QAAQ,CAAC;IACxB,uDAAuD;IACvD,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,kEAAkE;IAClE,eAAe,EAAE,MAAM,EAAE,CAAC;CAC1B;AAOD;;GAEG;AACH,wBAAsB,aAAa,CAClC,KAAK,EAAE,SAAS,EAChB,GAAG,EAAE,MAAM,GACT,OAAO,CAAC,IAAI,CAAC,CAGf;AAED;;;GAGG;AACH,wBAAsB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAOnE;AAED;;GAEG;AACH,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAK/D"}
@@ -1,37 +0,0 @@
1
- import * as fs from "node:fs";
2
- import * as path from "node:path";
3
- import { DubError } from "./errors.js";
4
- import { getDubDir } from "./state.js";
5
- async function getUndoPath(cwd) {
6
- const dubDir = await getDubDir(cwd);
7
- return path.join(dubDir, "undo.json");
8
- }
9
- /**
10
- * Saves an undo entry to disk. Overwrites any previous entry (1 level only).
11
- */
12
- export async function saveUndoEntry(entry, cwd) {
13
- const undoPath = await getUndoPath(cwd);
14
- fs.writeFileSync(undoPath, `${JSON.stringify(entry, null, 2)}\n`);
15
- }
16
- /**
17
- * Reads the most recent undo entry.
18
- * @throws {DubError} If no undo entry exists.
19
- */
20
- export async function readUndoEntry(cwd) {
21
- const undoPath = await getUndoPath(cwd);
22
- if (!fs.existsSync(undoPath)) {
23
- throw new DubError("Nothing to undo.");
24
- }
25
- const raw = fs.readFileSync(undoPath, "utf-8");
26
- return JSON.parse(raw);
27
- }
28
- /**
29
- * Deletes the undo entry file. Called after a successful undo.
30
- */
31
- export async function clearUndoEntry(cwd) {
32
- const undoPath = await getUndoPath(cwd);
33
- if (fs.existsSync(undoPath)) {
34
- fs.unlinkSync(undoPath);
35
- }
36
- }
37
- //# sourceMappingURL=undo-log.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"undo-log.js","sourceRoot":"","sources":["../../src/lib/undo-log.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAqBvC,KAAK,UAAU,WAAW,CAAC,GAAW;IACrC,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,GAAG,CAAC,CAAC;IACpC,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,WA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