infra-kit 0.1.90 → 0.1.91
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/.eslintcache +1 -1
- package/.turbo/turbo-eslint-check.log +5 -4
- package/.turbo/turbo-prettier-check.log +5 -4
- package/.turbo/turbo-test.log +18 -14
- package/.turbo/turbo-ts-check.log +5 -4
- package/dist/cli.js +23 -23
- package/dist/cli.js.map +4 -4
- package/dist/mcp.js +14 -14
- package/dist/mcp.js.map +3 -3
- package/package.json +1 -1
- package/src/commands/version/index.ts +1 -0
- package/src/commands/version/version.ts +38 -0
- package/src/entry/cli.ts +9 -1
- package/src/lib/infra-kit-config.ts +7 -1
- package/src/mcp/tools/index.ts +1 -0
- package/tsconfig.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { version, versionMcpTool } from './version'
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { z } from 'zod'
|
|
2
|
+
|
|
3
|
+
import { logger } from 'src/lib/logger'
|
|
4
|
+
import type { ToolsExecutionResult } from 'src/types'
|
|
5
|
+
|
|
6
|
+
import packageJson from '../../../package.json' with { type: 'json' }
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Print the infra-kit CLI version
|
|
10
|
+
*/
|
|
11
|
+
export const version = async (): Promise<ToolsExecutionResult> => {
|
|
12
|
+
const cliVersion = packageJson.version
|
|
13
|
+
|
|
14
|
+
logger.info(cliVersion)
|
|
15
|
+
|
|
16
|
+
const structuredContent = { version: cliVersion }
|
|
17
|
+
|
|
18
|
+
return {
|
|
19
|
+
content: [
|
|
20
|
+
{
|
|
21
|
+
type: 'text',
|
|
22
|
+
text: JSON.stringify(structuredContent, null, 2),
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
structuredContent,
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// MCP Tool Registration
|
|
30
|
+
export const versionMcpTool = {
|
|
31
|
+
name: 'version',
|
|
32
|
+
description: 'Print the installed infra-kit CLI version',
|
|
33
|
+
inputSchema: {},
|
|
34
|
+
outputSchema: {
|
|
35
|
+
version: z.string().describe('Installed infra-kit CLI version (from package.json)'),
|
|
36
|
+
},
|
|
37
|
+
handler: version,
|
|
38
|
+
}
|
package/src/entry/cli.ts
CHANGED
|
@@ -15,6 +15,7 @@ import { ghReleaseList } from 'src/commands/gh-release-list'
|
|
|
15
15
|
import { init } from 'src/commands/init'
|
|
16
16
|
import { releaseCreate } from 'src/commands/release-create'
|
|
17
17
|
import { releaseCreateBatch } from 'src/commands/release-create-batch'
|
|
18
|
+
import { version } from 'src/commands/version'
|
|
18
19
|
import { worktreesAdd } from 'src/commands/worktrees-add'
|
|
19
20
|
import { worktreesList } from 'src/commands/worktrees-list'
|
|
20
21
|
import { worktreesRemove } from 'src/commands/worktrees-remove'
|
|
@@ -176,6 +177,13 @@ program
|
|
|
176
177
|
await doctor()
|
|
177
178
|
})
|
|
178
179
|
|
|
180
|
+
program
|
|
181
|
+
.command('version')
|
|
182
|
+
.description('Print the installed infra-kit CLI version')
|
|
183
|
+
.action(async () => {
|
|
184
|
+
await version()
|
|
185
|
+
})
|
|
186
|
+
|
|
179
187
|
program
|
|
180
188
|
.command('env-status')
|
|
181
189
|
.description('Show Doppler authentication status and detected project info')
|
|
@@ -223,7 +231,7 @@ if (process.argv.length <= 2) {
|
|
|
223
231
|
'release-deliver',
|
|
224
232
|
]
|
|
225
233
|
const worktreeCommands = ['worktrees-add', 'worktrees-list', 'worktrees-remove', 'worktrees-sync']
|
|
226
|
-
const envCommands = ['doctor', 'init', 'env-status', 'env-list', 'env-load', 'env-clear']
|
|
234
|
+
const envCommands = ['doctor', 'init', 'version', 'env-status', 'env-list', 'env-load', 'env-clear']
|
|
227
235
|
|
|
228
236
|
const commandMap = new Map(
|
|
229
237
|
program.commands.map((cmd) => {
|
|
@@ -7,10 +7,16 @@ import { getProjectRoot } from 'src/lib/git-utils'
|
|
|
7
7
|
|
|
8
8
|
const INFRA_KIT_CONFIG_FILE = 'infra-kit.yml'
|
|
9
9
|
|
|
10
|
+
const jiraTaskManagerProviderSchema = z.object({
|
|
11
|
+
type: z.literal('jira'),
|
|
12
|
+
baseUrl: z.string().url(),
|
|
13
|
+
projectId: z.number().int().positive(),
|
|
14
|
+
})
|
|
15
|
+
|
|
10
16
|
const infraKitConfigSchema = z.object({
|
|
11
17
|
dopplerProjectName: z.string().min(1),
|
|
12
18
|
environments: z.array(z.string().min(1)).min(1),
|
|
13
|
-
taskManagerProvider: z.union([z.string(), z.literal(false)]),
|
|
19
|
+
taskManagerProvider: z.union([z.string(), z.literal(false), jiraTaskManagerProviderSchema]),
|
|
14
20
|
})
|
|
15
21
|
|
|
16
22
|
export type InfraKitConfig = z.infer<typeof infraKitConfigSchema>
|