infra-kit 0.1.95 → 0.1.98

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 (34) hide show
  1. package/.eslintcache +1 -1
  2. package/.turbo/turbo-eslint-check.log +1 -1
  3. package/.turbo/turbo-prettier-check.log +1 -4
  4. package/.turbo/turbo-test.log +172 -63
  5. package/.turbo/turbo-ts-check.log +5 -6
  6. package/dist/cli.js +57 -36
  7. package/dist/cli.js.map +4 -4
  8. package/dist/mcp.js +24 -22
  9. package/dist/mcp.js.map +4 -4
  10. package/package.json +2 -2
  11. package/src/commands/config/config.ts +125 -0
  12. package/src/commands/config/index.ts +1 -0
  13. package/src/commands/doctor/doctor.ts +27 -18
  14. package/src/commands/init/init.ts +54 -1
  15. package/src/commands/release-create/release-create.ts +123 -72
  16. package/src/commands/release-create-batch/release-create-batch.ts +45 -21
  17. package/src/commands/worktrees-open/index.ts +1 -0
  18. package/src/commands/worktrees-open/worktrees-open.ts +197 -0
  19. package/src/commands/worktrees-remove/worktrees-remove.ts +4 -2
  20. package/src/entry/cli.ts +35 -6
  21. package/src/integrations/cmux/index.ts +1 -0
  22. package/src/integrations/cmux/list-workspace-titles.ts +42 -0
  23. package/src/integrations/cursor/index.ts +1 -0
  24. package/src/integrations/cursor/reconcile-workspace-folders.ts +90 -0
  25. package/src/lib/__tests__/infra-kit-config.test.ts +3 -1
  26. package/src/lib/git-utils/git-utils.ts +27 -8
  27. package/src/lib/infra-kit-config/index.ts +2 -2
  28. package/src/lib/infra-kit-config/infra-kit-config.ts +183 -37
  29. package/src/lib/version-utils/__tests__/next-version.test.ts +112 -0
  30. package/src/lib/version-utils/index.ts +11 -0
  31. package/src/lib/version-utils/load-existing-versions.ts +67 -0
  32. package/src/lib/version-utils/next-version.ts +148 -0
  33. package/src/mcp/tools/index.ts +2 -0
  34. package/tsconfig.tsbuildinfo +1 -1
@@ -1,82 +1,191 @@
1
1
 
2
- > infra-kit@0.1.95 test /Users/arthur/projects/infra-kit/apps/infra-kit/cli
2
+ > infra-kit@0.1.97 test /Users/arthur/projects/infra-kit/apps/infra-kit/cli
3
3
  > pnpm exec vitest run --reporter=dot
4
4
 
5
5
 
6
6
   RUN  v4.1.5 /Users/arthur/projects/infra-kit/apps/infra-kit/cli
7
7
 
8
- ··············xx··xx·····················
8
+ ··············xxxxxxx·····················
9
9
 
10
- ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 4 ⎯⎯⎯⎯⎯⎯⎯
10
+ ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 7 ⎯⎯⎯⎯⎯⎯⎯
11
11
 
12
12
   FAIL  src/lib/__tests__/infra-kit-config.test.ts > getInfraKitConfig > reads and validates a well-formed infra-kit.yml
13
- Error: Invalid infra-kit.yml at /tmp/infra-kit-config-test-aFHbmZ/infra-kit.yml: Invalid input: expected object, received undefined
14
- at envManagement
15
-  ❯ Module.getInfraKitConfig src/lib/infra-kit-config/infra-kit-config.ts:119:11
16
- 117|
17
- 118| if (!result.success) {
18
- 119| throw new Error(`Invalid infra-kit.yml at ${mainPath}: ${z.prettif…
19
-  | ^
20
- 120| }
13
+ Error: [vitest] No "getRepoName" export is defined on the "src/lib/git-utils" mock. Did you forget to return it from "vi.mock"?
14
+ If you need to partially mock a module, you can use "importOriginal" helper inside:
15
+ 
16
+ vi.mock(import("src/lib/git-utils"), async (importOriginal) => {
17
+ const actual = await importOriginal()
18
+ return {
19
+ ...actual,
20
+ // your mocked methods
21
+ }
22
+ })
23
+
24
+  ❯ getInfraKitConfigPaths src/lib/infra-kit-config/infra-kit-config.ts:104:29
25
+ 102| export const getInfraKitConfigPaths = async (): Promise<InfraKitConfig…
26
+ 103| const projectRoot = await getProjectRoot()
27
+ 104| const projectName = await getRepoName()
28
+  | ^
29
+ 105| const userConfigDir = path.join(os.homedir(), USER_CONFIG_DIR_NAME)
30
+ 106|
31
+  ❯ Module.getInfraKitConfig src/lib/infra-kit-config/infra-kit-config.ts:133:17
32
+  ❯ src/lib/__tests__/infra-kit-config.test.ts:62:19
33
+  ❯ withTmpRepo src/lib/__tests__/infra-kit-config.test.ts:41:5
34
+  ❯ src/lib/__tests__/infra-kit-config.test.ts:59:5
35
+
36
+ ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/7]⎯
37
+
38
+  FAIL  src/lib/__tests__/infra-kit-config.test.ts > getInfraKitConfig > accepts ide and taskManager when provided
39
+ Error: [vitest] No "getRepoName" export is defined on the "src/lib/git-utils" mock. Did you forget to return it from "vi.mock"?
40
+ If you need to partially mock a module, you can use "importOriginal" helper inside:
41
+ 
42
+ vi.mock(import("src/lib/git-utils"), async (importOriginal) => {
43
+ const actual = await importOriginal()
44
+ return {
45
+ ...actual,
46
+ // your mocked methods
47
+ }
48
+ })
49
+
50
+  ❯ getInfraKitConfigPaths src/lib/infra-kit-config/infra-kit-config.ts:104:29
51
+ 102| export const getInfraKitConfigPaths = async (): Promise<InfraKitConfig…
52
+ 103| const projectRoot = await getProjectRoot()
53
+ 104| const projectName = await getRepoName()
54
+  | ^
55
+ 105| const userConfigDir = path.join(os.homedir(), USER_CONFIG_DIR_NAME)
56
+ 106|
57
+  ❯ Module.getInfraKitConfig src/lib/infra-kit-config/infra-kit-config.ts:133:17
58
+  ❯ src/lib/__tests__/infra-kit-config.test.ts:93:19
59
+  ❯ withTmpRepo src/lib/__tests__/infra-kit-config.test.ts:41:5
60
+  ❯ src/lib/__tests__/infra-kit-config.test.ts:72:5
61
+
62
+ ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/7]⎯
63
+
64
+  FAIL  src/lib/__tests__/infra-kit-config.test.ts > getInfraKitConfig > rejects ide.cursor mode=workspace without workspaceConfigPath
65
+ AssertionError: expected [Function] to throw error matching /workspaceConfigPath/ but got '[vitest] No "getRepoName" export is d…'
66
+
67
+ - Expected:
68
+ /workspaceConfigPath/
69
+
70
+ + Received:
71
+ "[vitest] No \"getRepoName\" export is defined on the \"src/lib/git-utils\" mock. Did you forget to return it from \"vi.mock\"?
72
+ If you need to partially mock a module, you can use \"importOriginal\" helper inside:
73
+ "
74
+
75
+  ❯ src/lib/__tests__/infra-kit-config.test.ts:122:40
76
+ 120| )
21
77
  121|
22
-  ❯ src/lib/__tests__/infra-kit-config.test.ts:58:19
23
-  ❯ withTmpRepo src/lib/__tests__/infra-kit-config.test.ts:37:5
24
-  ❯ src/lib/__tests__/infra-kit-config.test.ts:55:5
25
-
26
- ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/4]⎯
27
-
28
-  FAIL  src/lib/__tests__/infra-kit-config.test.ts > getInfraKitConfig > accepts taskManagerProvider: false as a literal boolean
29
- Error: Invalid infra-kit.yml at /tmp/infra-kit-config-test-LfJLjS/infra-kit.yml: ✖ Invalid input: expected object, received undefined
30
- → at envManagement
31
-  ❯ Module.getInfraKitConfig src/lib/infra-kit-config/infra-kit-config.ts:119:11
32
- 117|
33
- 118| if (!result.success) {
34
- 119| throw new Error(`Invalid infra-kit.yml at ${mainPath}: ${z.prettif…
35
-  | ^
36
- 120| }
37
- 121|
38
-  ❯ src/lib/__tests__/infra-kit-config.test.ts:70:19
39
-  ❯ withTmpRepo src/lib/__tests__/infra-kit-config.test.ts:37:5
40
-  ❯ src/lib/__tests__/infra-kit-config.test.ts:67:5
41
-
42
- ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/4]⎯
78
+ 122| await expect(getInfraKitConfig()).rejects.toThrow(/workspaceConf…
79
+  | ^
80
+ 123| })
81
+ 124| })
82
+  ❯ withTmpRepo src/lib/__tests__/infra-kit-config.test.ts:41:11
83
+  ❯ src/lib/__tests__/infra-kit-config.test.ts:107:11
84
+
85
+ ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[3/7]⎯
86
+
87
+  FAIL  src/lib/__tests__/infra-kit-config.test.ts > getInfraKitConfig > throws when infra-kit.yml is missing
88
+ AssertionError: expected [Function] to throw error matching /not found/ but got '[vitest] No "getRepoName" export is d…'
89
+
90
+ - Expected:
91
+ /not found/
92
+
93
+ + Received:
94
+ "[vitest] No \"getRepoName\" export is defined on the \"src/lib/git-utils\" mock. Did you forget to return it from \"vi.mock\"?
95
+ If you need to partially mock a module, you can use \"importOriginal\" helper inside:
96
+ "
97
+
98
+  ❯ src/lib/__tests__/infra-kit-config.test.ts:128:40
99
+ 126| it('throws when infra-kit.yml is missing', async () => {
100
+ 127| await withTmpRepo(async () => {
101
+ 128| await expect(getInfraKitConfig()).rejects.toThrow(/not found/)
102
+  | ^
103
+ 129| })
104
+ 130| })
105
+  ❯ withTmpRepo src/lib/__tests__/infra-kit-config.test.ts:41:11
106
+  ❯ src/lib/__tests__/infra-kit-config.test.ts:127:11
107
+
108
+ ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[4/7]⎯
109
+
110
+  FAIL  src/lib/__tests__/infra-kit-config.test.ts > getInfraKitConfig > throws a descriptive error on schema violations
111
+ AssertionError: expected [Function] to throw error matching /Invalid infra-kit.yml/ but got '[vitest] No "getRepoName" export is d…'
112
+
113
+ - Expected:
114
+ /Invalid infra-kit.yml/
115
+
116
+ + Received:
117
+ "[vitest] No \"getRepoName\" export is defined on the \"src/lib/git-utils\" mock. Did you forget to return it from \"vi.mock\"?
118
+ If you need to partially mock a module, you can use \"importOriginal\" helper inside:
119
+ "
120
+
121
+  ❯ src/lib/__tests__/infra-kit-config.test.ts:139:40
122
+ 137| )
123
+ 138|
124
+ 139| await expect(getInfraKitConfig()).rejects.toThrow(/Invalid infra…
125
+  | ^
126
+ 140| })
127
+ 141| })
128
+  ❯ withTmpRepo src/lib/__tests__/infra-kit-config.test.ts:41:11
129
+  ❯ src/lib/__tests__/infra-kit-config.test.ts:133:11
130
+
131
+ ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[5/7]⎯
43
132
 
44
133
   FAIL  src/lib/__tests__/infra-kit-config.test.ts > getInfraKitConfig > re-reads the file when mtime changes (long-running MCP scenario)
45
- Error: Invalid infra-kit.yml at /tmp/infra-kit-config-test-3TTyaI/infra-kit.yml: Invalid input: expected object, received undefined
46
- at envManagement
47
-  ❯ Module.getInfraKitConfig src/lib/infra-kit-config/infra-kit-config.ts:119:11
48
- 117|
49
- 118| if (!result.success) {
50
- 119| throw new Error(`Invalid infra-kit.yml at ${mainPath}: ${z.prettif…
51
-  | ^
52
- 120| }
53
- 121|
54
-  ❯ src/lib/__tests__/infra-kit-config.test.ts:99:21
55
-  ❯ withTmpRepo src/lib/__tests__/infra-kit-config.test.ts:37:5
56
-  ❯ src/lib/__tests__/infra-kit-config.test.ts:94:5
57
-
58
- ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[3/4]⎯
134
+ Error: [vitest] No "getRepoName" export is defined on the "src/lib/git-utils" mock. Did you forget to return it from "vi.mock"?
135
+ If you need to partially mock a module, you can use "importOriginal" helper inside:
136
+ 
137
+ vi.mock(import("src/lib/git-utils"), async (importOriginal) => {
138
+ const actual = await importOriginal()
139
+ return {
140
+ ...actual,
141
+ // your mocked methods
142
+ }
143
+ })
144
+
145
+  ❯ getInfraKitConfigPaths src/lib/infra-kit-config/infra-kit-config.ts:104:29
146
+ 102| export const getInfraKitConfigPaths = async (): Promise<InfraKitConfig…
147
+ 103| const projectRoot = await getProjectRoot()
148
+ 104| const projectName = await getRepoName()
149
+  | ^
150
+ 105| const userConfigDir = path.join(os.homedir(), USER_CONFIG_DIR_NAME)
151
+ 106|
152
+  ❯ Module.getInfraKitConfig src/lib/infra-kit-config/infra-kit-config.ts:133:17
153
+  ❯ src/lib/__tests__/infra-kit-config.test.ts:149:21
154
+  ❯ withTmpRepo src/lib/__tests__/infra-kit-config.test.ts:41:5
155
+  ❯ src/lib/__tests__/infra-kit-config.test.ts:144:5
156
+
157
+ ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[6/7]⎯
59
158
 
60
159
   FAIL  src/lib/__tests__/infra-kit-config.test.ts > getInfraKitConfig > returns the cached value on repeated calls when mtime is unchanged
61
- Error: Invalid infra-kit.yml at /tmp/infra-kit-config-test-NVWLAa/infra-kit.yml: Invalid input: expected object, received undefined
62
- at envManagement
63
-  ❯ Module.getInfraKitConfig src/lib/infra-kit-config/infra-kit-config.ts:119:11
64
- 117|
65
- 118| if (!result.success) {
66
- 119| throw new Error(`Invalid infra-kit.yml at ${mainPath}: ${z.prettif…
67
-  | ^
68
- 120| }
69
- 121|
70
-  ❯ src/lib/__tests__/infra-kit-config.test.ts:122:17
71
-  ❯ withTmpRepo src/lib/__tests__/infra-kit-config.test.ts:37:5
72
-  ❯ src/lib/__tests__/infra-kit-config.test.ts:117:5
73
-
74
- ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[4/4]⎯
160
+ Error: [vitest] No "getRepoName" export is defined on the "src/lib/git-utils" mock. Did you forget to return it from "vi.mock"?
161
+ If you need to partially mock a module, you can use "importOriginal" helper inside:
162
+ 
163
+ vi.mock(import("src/lib/git-utils"), async (importOriginal) => {
164
+ const actual = await importOriginal()
165
+ return {
166
+ ...actual,
167
+ // your mocked methods
168
+ }
169
+ })
170
+
171
+  ❯ getInfraKitConfigPaths src/lib/infra-kit-config/infra-kit-config.ts:104:29
172
+ 102| export const getInfraKitConfigPaths = async (): Promise<InfraKitConfig…
173
+ 103| const projectRoot = await getProjectRoot()
174
+ 104| const projectName = await getRepoName()
175
+  | ^
176
+ 105| const userConfigDir = path.join(os.homedir(), USER_CONFIG_DIR_NAME)
177
+ 106|
178
+  ❯ Module.getInfraKitConfig src/lib/infra-kit-config/infra-kit-config.ts:133:17
179
+  ❯ src/lib/__tests__/infra-kit-config.test.ts:172:17
180
+  ❯ withTmpRepo src/lib/__tests__/infra-kit-config.test.ts:41:5
181
+  ❯ src/lib/__tests__/infra-kit-config.test.ts:167:5
182
+
183
+ ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[7/7]⎯
75
184
 
76
185
 
77
186
   Test Files  1 failed | 3 passed (4)
78
-  Tests  4 failed | 37 passed (41)
79
-  Start at  16:29:20
80
-  Duration  324ms (transform 123ms, setup 37ms, import 286ms, tests 29ms, environment 0ms)
187
+  Tests  7 failed | 35 passed (42)
188
+  Start at  16:42:26
189
+  Duration  289ms (transform 125ms, setup 32ms, import 272ms, tests 27ms, environment 0ms)
81
190
 
82
191
   ELIFECYCLE  Test failed. See above for more details.
@@ -1,10 +1,9 @@
1
1
 
2
- > infra-kit@0.1.95 ts-check /Users/arthur/projects/infra-kit/apps/infra-kit/cli
2
+ > infra-kit@0.1.97 ts-check /Users/arthur/projects/infra-kit/apps/infra-kit/cli
3
3
  > tsc --noEmit
4
4
 
5
- src/lib/__tests__/infra-kit-config.test.ts(60,18): error TS2339: Property 'dopplerProjectName' does not exist on type '{ environments: string[]; envManagement: { provider: "doppler"; config: { name: string; }; }; ide?: { provider: "cursor"; config: { mode: "workspace" | "windows"; workspaceConfigPath?: string | undefined; }; } | undefined; taskManager?: { ...; } | undefined; }'.
6
- src/lib/__tests__/infra-kit-config.test.ts(62,18): error TS2339: Property 'taskManagerProvider' does not exist on type '{ environments: string[]; envManagement: { provider: "doppler"; config: { name: string; }; }; ide?: { provider: "cursor"; config: { mode: "workspace" | "windows"; workspaceConfigPath?: string | undefined; }; } | undefined; taskManager?: { ...; } | undefined; }'.
7
- src/lib/__tests__/infra-kit-config.test.ts(72,18): error TS2339: Property 'taskManagerProvider' does not exist on type '{ environments: string[]; envManagement: { provider: "doppler"; config: { name: string; }; }; ide?: { provider: "cursor"; config: { mode: "workspace" | "windows"; workspaceConfigPath?: string | undefined; }; } | undefined; taskManager?: { ...; } | undefined; }'.
8
- src/lib/__tests__/infra-kit-config.test.ts(101,20): error TS2339: Property 'dopplerProjectName' does not exist on type '{ environments: string[]; envManagement: { provider: "doppler"; config: { name: string; }; }; ide?: { provider: "cursor"; config: { mode: "workspace" | "windows"; workspaceConfigPath?: string | undefined; }; } | undefined; taskManager?: { ...; } | undefined; }'.
9
- src/lib/__tests__/infra-kit-config.test.ts(111,21): error TS2339: Property 'dopplerProjectName' does not exist on type '{ environments: string[]; envManagement: { provider: "doppler"; config: { name: string; }; }; ide?: { provider: "cursor"; config: { mode: "workspace" | "windows"; workspaceConfigPath?: string | undefined; }; } | undefined; taskManager?: { ...; } | undefined; }'.
5
+ src/commands/config/config.ts(69,38): error TS2339: Property 'projectSlug' does not exist on type 'InfraKitConfigPaths'.
6
+ src/commands/config/config.ts(79,24): error TS2339: Property 'projectSlug' does not exist on type 'InfraKitConfigPaths'.
7
+ src/commands/config/config.ts(108,57): error TS2339: Property 'projectSlug' does not exist on type 'InfraKitConfigPaths'.
8
+ src/commands/doctor/doctor.ts(144,54): error TS2339: Property 'projectSlug' does not exist on type 'InfraKitConfigPaths'.
10
9
   ELIFECYCLE  Command failed with exit code 2.