infra-kit 0.1.85 → 0.1.88

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 (37) hide show
  1. package/.eslintcache +1 -1
  2. package/.turbo/turbo-eslint-check.log +1 -1
  3. package/.turbo/turbo-prettier-check.log +2 -2
  4. package/.turbo/turbo-prettier-fix.log +10 -0
  5. package/.turbo/turbo-test.log +3 -3
  6. package/.turbo/turbo-ts-check.log +1 -1
  7. package/dist/cli.js +32 -32
  8. package/dist/cli.js.map +4 -4
  9. package/dist/mcp.js +22 -22
  10. package/dist/mcp.js.map +4 -4
  11. package/package.json +3 -3
  12. package/src/commands/doctor/doctor.ts +15 -2
  13. package/src/commands/env-clear/env-clear.ts +2 -1
  14. package/src/commands/env-list/env-list.ts +6 -4
  15. package/src/commands/env-load/env-load.ts +9 -4
  16. package/src/commands/env-status/env-status.ts +2 -1
  17. package/src/commands/gh-merge-dev/gh-merge-dev.ts +8 -2
  18. package/src/commands/gh-release-deliver/gh-release-deliver.ts +3 -2
  19. package/src/commands/gh-release-deploy-all/gh-release-deploy-all.ts +18 -7
  20. package/src/commands/gh-release-deploy-selected/gh-release-deploy-selected.ts +23 -8
  21. package/src/commands/gh-release-list/gh-release-list.ts +2 -1
  22. package/src/commands/init/init.ts +45 -3
  23. package/src/commands/release-create/release-create.ts +3 -2
  24. package/src/commands/release-create-batch/release-create-batch.ts +5 -2
  25. package/src/commands/worktrees-add/worktrees-add.ts +26 -5
  26. package/src/commands/worktrees-list/worktrees-list.ts +2 -1
  27. package/src/commands/worktrees-remove/worktrees-remove.ts +14 -3
  28. package/src/commands/worktrees-sync/worktrees-sync.ts +2 -1
  29. package/src/entry/cli.ts +0 -18
  30. package/src/integrations/doppler/doppler-project.ts +4 -17
  31. package/src/lib/constants.ts +0 -10
  32. package/src/lib/infra-kit-config.ts +49 -0
  33. package/src/mcp/tools/index.ts +0 -2
  34. package/tsconfig.tsbuildinfo +1 -1
  35. package/.turbo/turbo-build.log +0 -11
  36. package/src/commands/gh-release-deploy-service/gh-release-deploy-service.ts +0 -193
  37. package/src/commands/gh-release-deploy-service/index.ts +0 -1
@@ -0,0 +1,49 @@
1
+ import fs from 'node:fs/promises'
2
+ import path from 'node:path'
3
+ import yaml from 'yaml'
4
+ import { z } from 'zod'
5
+
6
+ import { getProjectRoot } from 'src/lib/git-utils'
7
+
8
+ const INFRA_KIT_CONFIG_FILE = 'infra-kit.yml'
9
+
10
+ const infraKitConfigSchema = z.object({
11
+ dopplerProjectName: z.string().min(1),
12
+ environments: z.array(z.string().min(1)).min(1),
13
+ taskManagerProvider: z.union([z.string(), z.literal(false)]),
14
+ })
15
+
16
+ export type InfraKitConfig = z.infer<typeof infraKitConfigSchema>
17
+
18
+ let cached: Promise<InfraKitConfig> | null = null
19
+
20
+ export const getInfraKitConfig = async (): Promise<InfraKitConfig> => {
21
+ if (!cached) {
22
+ cached = loadInfraKitConfig()
23
+ }
24
+
25
+ return cached
26
+ }
27
+
28
+ const loadInfraKitConfig = async (): Promise<InfraKitConfig> => {
29
+ const projectRoot = await getProjectRoot()
30
+
31
+ const configPath = path.join(projectRoot, INFRA_KIT_CONFIG_FILE)
32
+
33
+ let raw: string
34
+
35
+ try {
36
+ raw = await fs.readFile(configPath, 'utf-8')
37
+ } catch {
38
+ throw new Error(`infra-kit.yml not found at ${configPath}`)
39
+ }
40
+
41
+ const parsed = yaml.parse(raw)
42
+ const result = infraKitConfigSchema.safeParse(parsed)
43
+
44
+ if (!result.success) {
45
+ throw new Error(`Invalid infra-kit.yml at ${configPath}: ${result.error.message}`)
46
+ }
47
+
48
+ return result.data
49
+ }
@@ -8,7 +8,6 @@ import { ghMergeDevMcpTool } from 'src/commands/gh-merge-dev'
8
8
  import { ghReleaseDeliverMcpTool } from 'src/commands/gh-release-deliver'
9
9
  import { ghReleaseDeployAllMcpTool } from 'src/commands/gh-release-deploy-all'
10
10
  import { ghReleaseDeploySelectedMcpTool } from 'src/commands/gh-release-deploy-selected'
11
- import { ghReleaseDeployServiceMcpTool } from 'src/commands/gh-release-deploy-service'
12
11
  import { ghReleaseListMcpTool } from 'src/commands/gh-release-list'
13
12
  import { releaseCreateMcpTool } from 'src/commands/release-create'
14
13
  import { releaseCreateBatchMcpTool } from 'src/commands/release-create-batch'
@@ -29,7 +28,6 @@ const tools = [
29
28
  ghReleaseDeliverMcpTool,
30
29
  ghReleaseDeployAllMcpTool,
31
30
  ghReleaseDeploySelectedMcpTool,
32
- ghReleaseDeployServiceMcpTool,
33
31
  ghReleaseListMcpTool,
34
32
  worktreesAddMcpTool,
35
33
  worktreesListMcpTool,