@kubb/cli 5.0.0-alpha.9 → 5.0.0-beta.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 +180 -27
- package/bin/kubb.js +6 -0
- package/dist/agent-Bx2yllmS.js +68 -0
- package/dist/agent-Bx2yllmS.js.map +1 -0
- package/dist/agent-CeLwj5im.cjs +70 -0
- package/dist/agent-CeLwj5im.cjs.map +1 -0
- package/dist/{chunk--u3MIqq1.js → chunk-BvFE5Tac.js} +1 -0
- package/dist/constants-B2JTeRBb.js +42 -0
- package/dist/constants-B2JTeRBb.js.map +1 -0
- package/dist/constants-BINTA5VZ.cjs +77 -0
- package/dist/constants-BINTA5VZ.cjs.map +1 -0
- package/dist/constants-BYGmiFs0.cjs +139 -0
- package/dist/constants-BYGmiFs0.cjs.map +1 -0
- package/dist/constants-DSJ-Xrbv.js +116 -0
- package/dist/constants-DSJ-Xrbv.js.map +1 -0
- package/dist/define-Bdn8j5VM.cjs +54 -0
- package/dist/define-Bdn8j5VM.cjs.map +1 -0
- package/dist/define-m_fp-Aqm.js +43 -0
- package/dist/define-m_fp-Aqm.js.map +1 -0
- package/dist/errors-CINO1EIv.js +43 -0
- package/dist/errors-CINO1EIv.js.map +1 -0
- package/dist/{errors-DBW0N9w4.cjs → errors-CLCjoSg0.cjs} +22 -6
- package/dist/errors-CLCjoSg0.cjs.map +1 -0
- package/dist/{generate-Rly1EXBN.js → generate-BLvcvoIj.js} +12 -6
- package/dist/generate-BLvcvoIj.js.map +1 -0
- package/dist/{generate-DU5zzc54.cjs → generate-drLxTAnz.cjs} +11 -5
- package/dist/generate-drLxTAnz.cjs.map +1 -0
- package/dist/index.cjs +52 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +53 -22
- package/dist/index.js.map +1 -1
- package/dist/init-CGu7JZEF.js +53 -0
- package/dist/init-CGu7JZEF.js.map +1 -0
- package/dist/init-CyCjvIEF.cjs +53 -0
- package/dist/init-CyCjvIEF.cjs.map +1 -0
- package/dist/mcp-Cq2sylQC.js +39 -0
- package/dist/mcp-Cq2sylQC.js.map +1 -0
- package/dist/mcp-DSF5gpI-.cjs +39 -0
- package/dist/mcp-DSF5gpI-.cjs.map +1 -0
- package/dist/{package-BJ6ionm6.cjs → package-DZ-6zAIO.cjs} +2 -2
- package/dist/package-DZ-6zAIO.cjs.map +1 -0
- package/dist/package-OLYIpjqw.js +6 -0
- package/dist/package-OLYIpjqw.js.map +1 -0
- package/dist/{generate-BHNyeQXl.js → run-Bfbr3RaM.js} +781 -502
- package/dist/run-Bfbr3RaM.js.map +1 -0
- package/dist/run-BzpYYOQs.js +121 -0
- package/dist/run-BzpYYOQs.js.map +1 -0
- package/dist/run-CCZ24VKk.js +51 -0
- package/dist/run-CCZ24VKk.js.map +1 -0
- package/dist/run-CF97BWVa.js +244 -0
- package/dist/run-CF97BWVa.js.map +1 -0
- package/dist/run-CQbj3ley.cjs +52 -0
- package/dist/run-CQbj3ley.cjs.map +1 -0
- package/dist/{generate-Cq5RDTBL.cjs → run-CVlrIZoW.cjs} +786 -507
- package/dist/run-CVlrIZoW.cjs.map +1 -0
- package/dist/run-D0hmRpHy.js +49 -0
- package/dist/run-D0hmRpHy.js.map +1 -0
- package/dist/run-DwdAwnLG.cjs +125 -0
- package/dist/run-DwdAwnLG.cjs.map +1 -0
- package/dist/run-Lr0Ctnu0.cjs +50 -0
- package/dist/run-Lr0Ctnu0.cjs.map +1 -0
- package/dist/run-YsoCk5we.cjs +248 -0
- package/dist/run-YsoCk5we.cjs.map +1 -0
- package/dist/{shell-7HPrTCJ5.cjs → shell-475fQKaX.cjs} +8 -3
- package/dist/shell-475fQKaX.cjs.map +1 -0
- package/dist/{shell-DqqWsHCD.js → shell-CN6DNqeC.js} +9 -4
- package/dist/shell-CN6DNqeC.js.map +1 -0
- package/dist/{telemetry-DZ7IrLAU.cjs → telemetry-B2iWkY5e.cjs} +53 -13
- package/dist/telemetry-B2iWkY5e.cjs.map +1 -0
- package/dist/{telemetry-BF3SMlH6.js → telemetry-BkektVz6.js} +52 -12
- package/dist/telemetry-BkektVz6.js.map +1 -0
- package/dist/validate-CAUqLaGt.js +26 -0
- package/dist/validate-CAUqLaGt.js.map +1 -0
- package/dist/validate-J6AEd5zK.cjs +26 -0
- package/dist/validate-J6AEd5zK.cjs.map +1 -0
- package/package.json +57 -48
- package/src/commands/agent/start.ts +27 -8
- package/src/commands/agent.ts +3 -1
- package/src/commands/generate.ts +39 -8
- package/src/commands/init.ts +40 -4
- package/src/commands/mcp.ts +28 -4
- package/src/commands/validate.ts +11 -4
- package/src/constants.ts +5 -80
- package/src/index.ts +12 -13
- package/src/loggers/clackLogger.ts +98 -88
- package/src/loggers/fileSystemLogger.ts +37 -25
- package/src/loggers/githubActionsLogger.ts +35 -48
- package/src/loggers/plainLogger.ts +33 -45
- package/src/loggers/types.ts +6 -0
- package/src/loggers/utils.ts +155 -9
- package/src/runners/agent/run.ts +113 -0
- package/src/runners/agent/utils.ts +98 -0
- package/src/runners/generate/run.ts +276 -0
- package/src/runners/generate/utils.ts +209 -0
- package/src/runners/init/run.ts +211 -0
- package/src/{utils/packageManager.ts → runners/init/utils.ts} +10 -0
- package/src/runners/mcp/run.ts +55 -0
- package/src/runners/validate/run.ts +63 -0
- package/src/{utils/telemetry.ts → telemetry.ts} +28 -8
- package/bin/kubb.cjs +0 -18
- package/dist/agent-5mmp7QzF.js +0 -56
- package/dist/agent-5mmp7QzF.js.map +0 -1
- package/dist/agent-BKphjOIF.cjs +0 -58
- package/dist/agent-BKphjOIF.cjs.map +0 -1
- package/dist/agent-BapvKB4r.cjs +0 -92
- package/dist/agent-BapvKB4r.cjs.map +0 -1
- package/dist/agent-CBrpIMMU.js +0 -88
- package/dist/agent-CBrpIMMU.js.map +0 -1
- package/dist/constants-D0XHAHeZ.cjs +0 -178
- package/dist/constants-D0XHAHeZ.cjs.map +0 -1
- package/dist/constants-DJM9zCXm.js +0 -131
- package/dist/constants-DJM9zCXm.js.map +0 -1
- package/dist/define--M_JMcDC.js +0 -25
- package/dist/define--M_JMcDC.js.map +0 -1
- package/dist/define-D6Kfm7-Z.cjs +0 -36
- package/dist/define-D6Kfm7-Z.cjs.map +0 -1
- package/dist/errors-6mF_WKxg.js +0 -27
- package/dist/errors-6mF_WKxg.js.map +0 -1
- package/dist/errors-DBW0N9w4.cjs.map +0 -1
- package/dist/generate-BHNyeQXl.js.map +0 -1
- package/dist/generate-Cq5RDTBL.cjs.map +0 -1
- package/dist/generate-DU5zzc54.cjs.map +0 -1
- package/dist/generate-Rly1EXBN.js.map +0 -1
- package/dist/init-BK6inBTR.cjs +0 -306
- package/dist/init-BK6inBTR.cjs.map +0 -1
- package/dist/init-BQ6zfsnw.js +0 -302
- package/dist/init-BQ6zfsnw.js.map +0 -1
- package/dist/init-CN1JFyGX.cjs +0 -25
- package/dist/init-CN1JFyGX.cjs.map +0 -1
- package/dist/init-iN7e1XwI.js +0 -25
- package/dist/init-iN7e1XwI.js.map +0 -1
- package/dist/jiti-Cd3S0xwr.cjs +0 -16
- package/dist/jiti-Cd3S0xwr.cjs.map +0 -1
- package/dist/jiti-e08mD2Ph.js +0 -11
- package/dist/jiti-e08mD2Ph.js.map +0 -1
- package/dist/mcp-BiGUvbWP.js +0 -41
- package/dist/mcp-BiGUvbWP.js.map +0 -1
- package/dist/mcp-CONmm_xT.cjs +0 -42
- package/dist/mcp-CONmm_xT.cjs.map +0 -1
- package/dist/mcp-T7Q4nWbT.cjs +0 -16
- package/dist/mcp-T7Q4nWbT.cjs.map +0 -1
- package/dist/mcp-eP1S40LZ.js +0 -16
- package/dist/mcp-eP1S40LZ.js.map +0 -1
- package/dist/package-BJ6ionm6.cjs.map +0 -1
- package/dist/package-BKZ0H3Zf.js +0 -6
- package/dist/package-BKZ0H3Zf.js.map +0 -1
- package/dist/shell-7HPrTCJ5.cjs.map +0 -1
- package/dist/shell-DqqWsHCD.js.map +0 -1
- package/dist/telemetry-BF3SMlH6.js.map +0 -1
- package/dist/telemetry-DZ7IrLAU.cjs.map +0 -1
- package/dist/validate-BImbbx1t.js +0 -41
- package/dist/validate-BImbbx1t.js.map +0 -1
- package/dist/validate-DAZdX_0i.js +0 -25
- package/dist/validate-DAZdX_0i.js.map +0 -1
- package/dist/validate-DucFMytl.cjs +0 -25
- package/dist/validate-DucFMytl.cjs.map +0 -1
- package/dist/validate-ujLCYSWU.cjs +0 -42
- package/dist/validate-ujLCYSWU.cjs.map +0 -1
- package/src/runners/agent.ts +0 -102
- package/src/runners/generate.ts +0 -343
- package/src/runners/init.ts +0 -323
- package/src/runners/mcp.ts +0 -32
- package/src/runners/validate.ts +0 -35
- package/src/types.ts +0 -11
- package/src/utils/Writables.ts +0 -17
- package/src/utils/executeHooks.ts +0 -45
- package/src/utils/flags.ts +0 -10
- package/src/utils/getCosmiConfig.ts +0 -71
- package/src/utils/getSummary.ts +0 -68
- package/src/utils/jiti.ts +0 -9
- package/src/utils/runHook.ts +0 -75
- package/src/utils/watcher.ts +0 -19
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import fs from 'node:fs'
|
|
2
|
+
import path from 'node:path'
|
|
3
|
+
import process from 'node:process'
|
|
4
|
+
import { styleText } from 'node:util'
|
|
5
|
+
import * as clack from '@clack/prompts'
|
|
6
|
+
import { detectPackageManager } from '@internals/utils'
|
|
7
|
+
import { availablePlugins, generateConfigFile, initDefaults, KUBB_CONFIG_FILENAME, type PluginOption } from '@internals/shared'
|
|
8
|
+
import { hasPackageJson, initPackageJson, installPackages } from './utils.ts'
|
|
9
|
+
|
|
10
|
+
function cancelAndExit(message = 'Operation cancelled.'): never {
|
|
11
|
+
clack.cancel(message)
|
|
12
|
+
process.exit(0)
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
type InitOptions = {
|
|
16
|
+
/**
|
|
17
|
+
* When `true`, skips all interactive prompts and uses default values.
|
|
18
|
+
*/
|
|
19
|
+
yes: boolean
|
|
20
|
+
/**
|
|
21
|
+
* Current `@kubb/cli` version string, shown in the outro and used for package installation.
|
|
22
|
+
*/
|
|
23
|
+
version: string
|
|
24
|
+
/**
|
|
25
|
+
* Input path flag value from `--input`. When provided, skips the input prompt.
|
|
26
|
+
*/
|
|
27
|
+
input?: string
|
|
28
|
+
/**
|
|
29
|
+
* Output directory flag value from `--output`. When provided, skips the output prompt.
|
|
30
|
+
*/
|
|
31
|
+
output?: string
|
|
32
|
+
/**
|
|
33
|
+
* Comma-separated plugin list from `--plugins`, e.g. `'plugin-ts,plugin-zod'`. When provided, skips the plugin selection prompt.
|
|
34
|
+
*/
|
|
35
|
+
plugins?: string
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Runs the interactive Kubb scaffolding wizard.
|
|
40
|
+
* Detects the package manager, prompts for input/output paths and plugins, installs packages, and writes `kubb.config.ts`.
|
|
41
|
+
* Pass `yes: true` to skip all prompts and use defaults.
|
|
42
|
+
*/
|
|
43
|
+
export async function run({ yes, version, input: inputFlag, output: outputFlag, plugins: pluginsFlag }: InitOptions): Promise<void> {
|
|
44
|
+
const cwd = process.cwd()
|
|
45
|
+
|
|
46
|
+
clack.intro(styleText('bgCyan', styleText('black', ' Kubb Init ')))
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Returns `flag` when provided, the `defaultValue` when `yes` is set,
|
|
50
|
+
* or calls `prompt()` for interactive input. Exits on cancellation.
|
|
51
|
+
*/
|
|
52
|
+
async function resolveOrPrompt<T>(flag: T | undefined, defaultValue: T, logLabel: string, prompt: () => Promise<T | symbol>): Promise<T> {
|
|
53
|
+
if (flag !== undefined) {
|
|
54
|
+
clack.log.info(`${logLabel}: ${styleText('cyan', String(flag))}`)
|
|
55
|
+
return flag
|
|
56
|
+
}
|
|
57
|
+
if (yes) {
|
|
58
|
+
clack.log.info(`${logLabel}: ${styleText('cyan', String(defaultValue))}`)
|
|
59
|
+
return defaultValue
|
|
60
|
+
}
|
|
61
|
+
const result = await prompt()
|
|
62
|
+
if (clack.isCancel(result)) cancelAndExit()
|
|
63
|
+
return result as T
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
try {
|
|
67
|
+
// Check/create package.json — detect package manager once after the block
|
|
68
|
+
if (!hasPackageJson(cwd)) {
|
|
69
|
+
if (!yes) {
|
|
70
|
+
const shouldInit = await clack.confirm({
|
|
71
|
+
message: 'No package.json found. Would you like to create one?',
|
|
72
|
+
initialValue: true,
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
if (clack.isCancel(shouldInit) || !shouldInit) {
|
|
76
|
+
cancelAndExit()
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const packageManager = detectPackageManager(cwd)
|
|
81
|
+
const spinner = clack.spinner()
|
|
82
|
+
spinner.start(`Initializing package.json with ${packageManager.name}`)
|
|
83
|
+
await initPackageJson(cwd, packageManager)
|
|
84
|
+
spinner.stop(`Created package.json with ${packageManager.name}`)
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const packageManager = detectPackageManager(cwd)
|
|
88
|
+
if (hasPackageJson(cwd)) {
|
|
89
|
+
clack.log.info(`Detected package manager: ${styleText('cyan', packageManager.name)}`)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Prompt for OpenAPI spec path
|
|
93
|
+
const inputPath = await resolveOrPrompt(inputFlag, initDefaults.inputPath, 'Using input path', () =>
|
|
94
|
+
clack.text({
|
|
95
|
+
message: 'Where is your OpenAPI specification located?',
|
|
96
|
+
placeholder: initDefaults.inputPath,
|
|
97
|
+
defaultValue: initDefaults.inputPath,
|
|
98
|
+
validate: (value) => {
|
|
99
|
+
if (!value) return 'Input path is required'
|
|
100
|
+
},
|
|
101
|
+
}),
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
// Prompt for output directory
|
|
105
|
+
const outputPath = await resolveOrPrompt(outputFlag, initDefaults.outputPath, 'Using output path', () =>
|
|
106
|
+
clack.text({
|
|
107
|
+
message: 'Where should the generated files be output?',
|
|
108
|
+
placeholder: initDefaults.outputPath,
|
|
109
|
+
defaultValue: initDefaults.outputPath,
|
|
110
|
+
validate: (value) => {
|
|
111
|
+
if (!value) return 'Output path is required'
|
|
112
|
+
},
|
|
113
|
+
}),
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
// Plugin selection
|
|
117
|
+
const defaultPlugins = availablePlugins.filter((p) => (initDefaults.plugins as readonly string[]).includes(p.value))
|
|
118
|
+
const pluginLabel = (plugins: PluginOption[]) => styleText('cyan', plugins.map((p) => p.label).join(', '))
|
|
119
|
+
|
|
120
|
+
let selectedPlugins: PluginOption[]
|
|
121
|
+
if (pluginsFlag) {
|
|
122
|
+
const requested = pluginsFlag
|
|
123
|
+
.split(',')
|
|
124
|
+
.map((v) => v.trim())
|
|
125
|
+
.filter(Boolean)
|
|
126
|
+
selectedPlugins = availablePlugins.filter((p) => requested.includes(p.value))
|
|
127
|
+
if (selectedPlugins.length === 0) {
|
|
128
|
+
selectedPlugins = defaultPlugins
|
|
129
|
+
clack.log.warn(`No valid plugins found in --plugins value; falling back to default: ${pluginLabel(defaultPlugins)}`)
|
|
130
|
+
} else {
|
|
131
|
+
clack.log.info(`Using plugins: ${pluginLabel(selectedPlugins)}`)
|
|
132
|
+
}
|
|
133
|
+
} else if (yes) {
|
|
134
|
+
selectedPlugins = defaultPlugins
|
|
135
|
+
clack.log.info(`Using plugins: ${pluginLabel(defaultPlugins)}`)
|
|
136
|
+
} else {
|
|
137
|
+
const values = await clack.multiselect({
|
|
138
|
+
message: 'Select plugins to use:',
|
|
139
|
+
options: availablePlugins.map(({ value, label, hint }) => ({ value, label, hint })),
|
|
140
|
+
initialValues: [...initDefaults.plugins],
|
|
141
|
+
required: true,
|
|
142
|
+
})
|
|
143
|
+
if (clack.isCancel(values)) cancelAndExit()
|
|
144
|
+
selectedPlugins = availablePlugins.filter((p) => (values as string[]).includes(p.value))
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Install packages
|
|
148
|
+
const packagesToInstall = ['kubb', ...selectedPlugins.map((p) => p.packageName)]
|
|
149
|
+
|
|
150
|
+
const spinner = clack.spinner()
|
|
151
|
+
spinner.start(`Installing ${packagesToInstall.length} packages with ${packageManager.name}`)
|
|
152
|
+
|
|
153
|
+
try {
|
|
154
|
+
await installPackages(packagesToInstall, packageManager, cwd)
|
|
155
|
+
spinner.stop(`Installed ${packagesToInstall.length} packages`)
|
|
156
|
+
} catch (error) {
|
|
157
|
+
spinner.stop('Installation failed')
|
|
158
|
+
throw error
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// Generate config file
|
|
162
|
+
const configSpinner = clack.spinner()
|
|
163
|
+
configSpinner.start(`Creating ${KUBB_CONFIG_FILENAME}`)
|
|
164
|
+
|
|
165
|
+
const configContent = generateConfigFile({ selectedPlugins, inputPath, outputPath })
|
|
166
|
+
const configPath = path.join(cwd, KUBB_CONFIG_FILENAME)
|
|
167
|
+
|
|
168
|
+
if (fs.existsSync(configPath)) {
|
|
169
|
+
configSpinner.stop(`${KUBB_CONFIG_FILENAME} already exists`)
|
|
170
|
+
|
|
171
|
+
if (!yes) {
|
|
172
|
+
const shouldOverwrite = await clack.confirm({
|
|
173
|
+
message: `${KUBB_CONFIG_FILENAME} already exists. Overwrite?`,
|
|
174
|
+
initialValue: false,
|
|
175
|
+
})
|
|
176
|
+
|
|
177
|
+
if (clack.isCancel(shouldOverwrite) || !shouldOverwrite) {
|
|
178
|
+
cancelAndExit('Keeping existing configuration. Packages have been installed.')
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
configSpinner.start(`Overwriting ${KUBB_CONFIG_FILENAME}`)
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
await fs.promises.writeFile(configPath, configContent, 'utf-8')
|
|
186
|
+
|
|
187
|
+
configSpinner.stop(`Created ${KUBB_CONFIG_FILENAME}`)
|
|
188
|
+
|
|
189
|
+
clack.outro(
|
|
190
|
+
styleText('green', '✓ All set!') +
|
|
191
|
+
'\n\n' +
|
|
192
|
+
styleText('dim', 'Next steps:') +
|
|
193
|
+
'\n' +
|
|
194
|
+
styleText('cyan', ` 1. Make sure your OpenAPI spec is at: ${inputPath}`) +
|
|
195
|
+
'\n' +
|
|
196
|
+
styleText('cyan', ' 2. Generate code with: npx kubb generate') +
|
|
197
|
+
'\n' +
|
|
198
|
+
styleText('cyan', ' Or start a stream server with: npx kubb agent start') +
|
|
199
|
+
'\n' +
|
|
200
|
+
styleText('cyan', ` 3. Find generated files in: ${outputPath}`) +
|
|
201
|
+
'\n\n' +
|
|
202
|
+
styleText('dim', `Using ${packageManager.name} • Kubb v${version}`),
|
|
203
|
+
)
|
|
204
|
+
} catch (error) {
|
|
205
|
+
clack.log.error(styleText('red', 'An error occurred during initialization'))
|
|
206
|
+
if (error instanceof Error) {
|
|
207
|
+
clack.log.error(error.message)
|
|
208
|
+
}
|
|
209
|
+
process.exit(1)
|
|
210
|
+
}
|
|
211
|
+
}
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import fs from 'node:fs'
|
|
2
2
|
import path from 'node:path'
|
|
3
|
+
import process from 'node:process'
|
|
3
4
|
import type { PackageManagerInfo, PackageManagerName } from '@internals/utils'
|
|
4
5
|
import { spawnAsync } from '@internals/utils'
|
|
5
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Returns `true` when a `package.json` exists at `cwd`.
|
|
9
|
+
*/
|
|
6
10
|
export function hasPackageJson(cwd: string = process.cwd()): boolean {
|
|
7
11
|
return fs.existsSync(path.join(cwd, 'package.json'))
|
|
8
12
|
}
|
|
9
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Initializes a new `package.json` at `cwd` using the detected package manager.
|
|
16
|
+
*/
|
|
10
17
|
export async function initPackageJson(cwd: string, packageManager: PackageManagerInfo): Promise<void> {
|
|
11
18
|
const commands: Record<PackageManagerName, string[]> = {
|
|
12
19
|
npm: ['init', '-y'],
|
|
@@ -18,6 +25,9 @@ export async function initPackageJson(cwd: string, packageManager: PackageManage
|
|
|
18
25
|
await spawnAsync(packageManager.name, commands[packageManager.name], { cwd })
|
|
19
26
|
}
|
|
20
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Installs the given packages at `cwd` using the detected package manager.
|
|
30
|
+
*/
|
|
21
31
|
export async function installPackages(packages: string[], packageManager: PackageManagerInfo, cwd: string = process.cwd()): Promise<void> {
|
|
22
32
|
await spawnAsync(packageManager.name, [...packageManager.installCommand, ...packages], { cwd })
|
|
23
33
|
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import process from 'node:process'
|
|
2
|
+
import { styleText } from 'node:util'
|
|
3
|
+
import { getErrorMessage } from '@internals/utils'
|
|
4
|
+
import type * as McpModule from '@kubb/mcp'
|
|
5
|
+
import { buildTelemetryEvent, sendTelemetry } from '../../telemetry.ts'
|
|
6
|
+
|
|
7
|
+
type McpOptions = {
|
|
8
|
+
/**
|
|
9
|
+
* Current `@kubb/cli` version string, used for the telemetry payload.
|
|
10
|
+
*/
|
|
11
|
+
version: string
|
|
12
|
+
/**
|
|
13
|
+
* TCP port for the HTTP MCP server. When `undefined`, the server uses stdio transport.
|
|
14
|
+
*/
|
|
15
|
+
port?: string
|
|
16
|
+
/**
|
|
17
|
+
* Hostname to bind to when running in HTTP mode.
|
|
18
|
+
*
|
|
19
|
+
* @default 'localhost'
|
|
20
|
+
*/
|
|
21
|
+
host?: string
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Starts the Kubb MCP server using `@kubb/mcp`.
|
|
26
|
+
* Exits the process with code 1 if `@kubb/mcp` is not installed.
|
|
27
|
+
*/
|
|
28
|
+
export async function run({ version, port, host }: McpOptions): Promise<void> {
|
|
29
|
+
let mod: typeof McpModule
|
|
30
|
+
try {
|
|
31
|
+
mod = (await import('@kubb/mcp')) as typeof McpModule
|
|
32
|
+
} catch (_e) {
|
|
33
|
+
console.error(styleText('red', 'The @kubb/mcp package is not installed.'))
|
|
34
|
+
console.error('')
|
|
35
|
+
console.error('Install it with:')
|
|
36
|
+
console.error(styleText('cyan', ' npm install @kubb/mcp'))
|
|
37
|
+
console.error(styleText('cyan', ' # or'))
|
|
38
|
+
console.error(styleText('cyan', ' pnpm install @kubb/mcp'))
|
|
39
|
+
console.error('')
|
|
40
|
+
process.exit(1)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const { run: startMcpServer } = mod
|
|
44
|
+
const hrStart = process.hrtime()
|
|
45
|
+
const report = (status: 'success' | 'failed') => sendTelemetry(buildTelemetryEvent({ command: 'mcp', kubbVersion: version, hrStart, status }))
|
|
46
|
+
try {
|
|
47
|
+
console.log(styleText('cyan', '⏳ Starting MCP server...'))
|
|
48
|
+
console.warn(styleText('yellow', 'This feature is still under development, use with caution'))
|
|
49
|
+
await startMcpServer(undefined, { port: port !== undefined ? Number(port) : undefined, host })
|
|
50
|
+
await report('success')
|
|
51
|
+
} catch (error) {
|
|
52
|
+
await report('failed')
|
|
53
|
+
console.error(getErrorMessage(error))
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import process from 'node:process'
|
|
2
|
+
import { styleText } from 'node:util'
|
|
3
|
+
import { getErrorMessage } from '@internals/utils'
|
|
4
|
+
import { buildTelemetryEvent, sendTelemetry } from '../../telemetry.ts'
|
|
5
|
+
|
|
6
|
+
type ValidateOptions = {
|
|
7
|
+
/**
|
|
8
|
+
* Path or URL to the OpenAPI/Swagger file to validate.
|
|
9
|
+
*/
|
|
10
|
+
input: string
|
|
11
|
+
/**
|
|
12
|
+
* Current `@kubb/cli` version string, used for the telemetry payload.
|
|
13
|
+
*/
|
|
14
|
+
version: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
type ValidateModule = typeof import('@kubb/adapter-oas')
|
|
18
|
+
type ValidateDependencies = {
|
|
19
|
+
/**
|
|
20
|
+
* Loads `@kubb/adapter-oas`. Injected so tests can substitute a mock.
|
|
21
|
+
*/
|
|
22
|
+
loadValidateModule: () => Promise<ValidateModule>
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Dynamically loads `@kubb/adapter-oas` for OpenAPI validation.
|
|
27
|
+
*/
|
|
28
|
+
export function loadValidateModule(): Promise<ValidateModule> {
|
|
29
|
+
return import('@kubb/adapter-oas') as Promise<ValidateModule>
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Validates an OpenAPI/Swagger file at `input` using `@kubb/adapter-oas`.
|
|
34
|
+
* Exits the process with code 1 on validation failure or missing dependency.
|
|
35
|
+
*/
|
|
36
|
+
export async function run({ input, version }: ValidateOptions, dependencies: ValidateDependencies = { loadValidateModule }): Promise<void> {
|
|
37
|
+
const hrStart = process.hrtime()
|
|
38
|
+
const report = (status: 'success' | 'failed') => sendTelemetry(buildTelemetryEvent({ command: 'validate', kubbVersion: version, hrStart, status }))
|
|
39
|
+
try {
|
|
40
|
+
const { adapterOas } = await dependencies.loadValidateModule()
|
|
41
|
+
const adapter = adapterOas()
|
|
42
|
+
if (!adapter.validate) {
|
|
43
|
+
throw new Error('The loaded adapter does not support validation.')
|
|
44
|
+
}
|
|
45
|
+
await adapter.validate(input, { throwOnError: true })
|
|
46
|
+
await report('success')
|
|
47
|
+
console.log('✅ Validation success')
|
|
48
|
+
} catch (error) {
|
|
49
|
+
await report('failed')
|
|
50
|
+
if (error instanceof Error && /@kubb\/adapter-oas/.test(error.message)) {
|
|
51
|
+
console.error(styleText('red', 'The @kubb/adapter-oas package is not installed.'))
|
|
52
|
+
console.error('')
|
|
53
|
+
console.error('Install it with:')
|
|
54
|
+
console.error(styleText('cyan', ' npm install @kubb/adapter-oas'))
|
|
55
|
+
console.error(styleText('cyan', ' # or'))
|
|
56
|
+
console.error(styleText('cyan', ' pnpm install @kubb/adapter-oas'))
|
|
57
|
+
console.error('')
|
|
58
|
+
}
|
|
59
|
+
console.error('❌ Validation failed')
|
|
60
|
+
console.error(getErrorMessage(error))
|
|
61
|
+
process.exit(1)
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -2,7 +2,7 @@ import { randomBytes } from 'node:crypto'
|
|
|
2
2
|
import os from 'node:os'
|
|
3
3
|
import process from 'node:process'
|
|
4
4
|
import { executeIfOnline, isCIEnvironment } from '@internals/utils'
|
|
5
|
-
import { OTLP_ENDPOINT } from '
|
|
5
|
+
import { OTLP_ENDPOINT } from './constants.ts'
|
|
6
6
|
|
|
7
7
|
// OpenTelemetry OTLP JSON types
|
|
8
8
|
// https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/trace/v1/trace.proto
|
|
@@ -96,8 +96,17 @@ type OtlpExportTraceServiceRequest = {
|
|
|
96
96
|
resourceSpans: OtlpResourceSpans[]
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
+
/**
|
|
100
|
+
* Anonymous plugin name and options snapshot sent with each telemetry event.
|
|
101
|
+
*/
|
|
99
102
|
export type TelemetryPlugin = {
|
|
103
|
+
/**
|
|
104
|
+
* Plugin name as registered in the Kubb config, e.g. `'@kubb/plugin-ts'`.
|
|
105
|
+
*/
|
|
100
106
|
name: string
|
|
107
|
+
/**
|
|
108
|
+
* anonymized plugin options snapshot — values are included but cannot be traced back to the user.
|
|
109
|
+
*/
|
|
101
110
|
options: Record<string, unknown>
|
|
102
111
|
}
|
|
103
112
|
|
|
@@ -114,16 +123,14 @@ type TelemetryEvent = {
|
|
|
114
123
|
}
|
|
115
124
|
|
|
116
125
|
/**
|
|
117
|
-
*
|
|
118
|
-
* Delegates to the canonical isCIEnvironment() from envDetection.
|
|
126
|
+
* Returns `true` when the current process runs inside a CI environment.
|
|
119
127
|
*/
|
|
120
128
|
export function isCi(): boolean {
|
|
121
129
|
return isCIEnvironment()
|
|
122
130
|
}
|
|
123
131
|
|
|
124
132
|
/**
|
|
125
|
-
*
|
|
126
|
-
* Respects the standard DO_NOT_TRACK convention used across development tools.
|
|
133
|
+
* Returns `true` when telemetry is disabled via `DO_NOT_TRACK` or `KUBB_DISABLE_TELEMETRY`.
|
|
127
134
|
*/
|
|
128
135
|
export function isTelemetryDisabled(): boolean {
|
|
129
136
|
return (
|
|
@@ -161,7 +168,15 @@ export function buildOtlpPayload(event: TelemetryEvent): OtlpExportTraceServiceR
|
|
|
161
168
|
kvlistValue: {
|
|
162
169
|
values: [
|
|
163
170
|
{ key: 'name', value: { stringValue: p.name } },
|
|
164
|
-
{
|
|
171
|
+
{
|
|
172
|
+
key: 'options',
|
|
173
|
+
value: {
|
|
174
|
+
stringValue: JSON.stringify({
|
|
175
|
+
...p.options,
|
|
176
|
+
usedEnumNames: undefined,
|
|
177
|
+
}),
|
|
178
|
+
},
|
|
179
|
+
},
|
|
165
180
|
],
|
|
166
181
|
},
|
|
167
182
|
}),
|
|
@@ -177,7 +192,10 @@ export function buildOtlpPayload(event: TelemetryEvent): OtlpExportTraceServiceR
|
|
|
177
192
|
resource: {
|
|
178
193
|
attributes: [
|
|
179
194
|
{ key: 'service.name', value: { stringValue: 'kubb-cli' } },
|
|
180
|
-
{
|
|
195
|
+
{
|
|
196
|
+
key: 'service.version',
|
|
197
|
+
value: { stringValue: event.kubbVersion },
|
|
198
|
+
},
|
|
181
199
|
{ key: 'telemetry.sdk.language', value: { stringValue: 'nodejs' } },
|
|
182
200
|
],
|
|
183
201
|
},
|
|
@@ -193,7 +211,9 @@ export function buildOtlpPayload(event: TelemetryEvent): OtlpExportTraceServiceR
|
|
|
193
211
|
startTimeUnixNano: String(startTimeNs),
|
|
194
212
|
endTimeUnixNano: String(endTimeNs),
|
|
195
213
|
attributes,
|
|
196
|
-
status: {
|
|
214
|
+
status: {
|
|
215
|
+
code: (event.status === 'success' ? 1 : 2) satisfies OtlpStatusCode,
|
|
216
|
+
},
|
|
197
217
|
},
|
|
198
218
|
],
|
|
199
219
|
},
|
package/bin/kubb.cjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
try {
|
|
3
|
-
const cachedSourceMaps = new Map()
|
|
4
|
-
|
|
5
|
-
require('source-map-support').install({
|
|
6
|
-
retrieveSourceMap(source) {
|
|
7
|
-
if (cachedSourceMaps.has(source)) {
|
|
8
|
-
return cachedSourceMaps.get(source)
|
|
9
|
-
}
|
|
10
|
-
return null
|
|
11
|
-
},
|
|
12
|
-
})
|
|
13
|
-
} catch (_err) {}
|
|
14
|
-
|
|
15
|
-
import('../dist/index.js').then(({ run }) => {
|
|
16
|
-
process.title = 'Kubb'
|
|
17
|
-
run(process.argv)
|
|
18
|
-
})
|
package/dist/agent-5mmp7QzF.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import "./chunk--u3MIqq1.js";
|
|
2
|
-
import { n as defineCommand } from "./define--M_JMcDC.js";
|
|
3
|
-
import { t as version } from "./package-BKZ0H3Zf.js";
|
|
4
|
-
import { o as agentDefaults } from "./constants-DJM9zCXm.js";
|
|
5
|
-
//#endregion
|
|
6
|
-
//#region src/commands/agent.ts
|
|
7
|
-
const command = defineCommand({
|
|
8
|
-
name: "agent",
|
|
9
|
-
description: "Manage the Kubb Agent server",
|
|
10
|
-
subCommands: [defineCommand({
|
|
11
|
-
name: "start",
|
|
12
|
-
description: "Start the Agent server",
|
|
13
|
-
options: {
|
|
14
|
-
config: {
|
|
15
|
-
type: "string",
|
|
16
|
-
description: "Path to the Kubb config",
|
|
17
|
-
short: "c"
|
|
18
|
-
},
|
|
19
|
-
port: {
|
|
20
|
-
type: "string",
|
|
21
|
-
description: `Port for the server (default: ${agentDefaults.port})`,
|
|
22
|
-
short: "p"
|
|
23
|
-
},
|
|
24
|
-
host: {
|
|
25
|
-
type: "string",
|
|
26
|
-
description: "Host for the server",
|
|
27
|
-
default: agentDefaults.host
|
|
28
|
-
},
|
|
29
|
-
"allow-write": {
|
|
30
|
-
type: "boolean",
|
|
31
|
-
description: "Allow writing generated files to the filesystem. When not set, no files are written and the config patch is not persisted.",
|
|
32
|
-
default: false
|
|
33
|
-
},
|
|
34
|
-
"allow-all": {
|
|
35
|
-
type: "boolean",
|
|
36
|
-
description: "Grant all permissions (implies --allow-write).",
|
|
37
|
-
default: false
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
async run({ values }) {
|
|
41
|
-
const { runAgentStart } = await import("./agent-CBrpIMMU.js");
|
|
42
|
-
await runAgentStart({
|
|
43
|
-
port: values.port !== void 0 ? values.port : void 0,
|
|
44
|
-
host: values.host,
|
|
45
|
-
configPath: values.config,
|
|
46
|
-
allowWrite: values["allow-write"],
|
|
47
|
-
allowAll: values["allow-all"],
|
|
48
|
-
version
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
})]
|
|
52
|
-
});
|
|
53
|
-
//#endregion
|
|
54
|
-
export { command };
|
|
55
|
-
|
|
56
|
-
//# sourceMappingURL=agent-5mmp7QzF.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent-5mmp7QzF.js","names":["command","startCommand"],"sources":["../src/commands/agent/start.ts","../src/commands/agent.ts"],"sourcesContent":["import { defineCommand } from '@internals/utils'\nimport { version } from '../../../package.json'\nimport { agentDefaults } from '../../constants.ts'\n\nexport const command = defineCommand({\n name: 'start',\n description: 'Start the Agent server',\n options: {\n config: { type: 'string', description: 'Path to the Kubb config', short: 'c' },\n port: { type: 'string', description: `Port for the server (default: ${agentDefaults.port})`, short: 'p' },\n host: { type: 'string', description: 'Host for the server', default: agentDefaults.host },\n 'allow-write': {\n type: 'boolean',\n description: 'Allow writing generated files to the filesystem. When not set, no files are written and the config patch is not persisted.',\n default: false,\n },\n 'allow-all': { type: 'boolean', description: 'Grant all permissions (implies --allow-write).', default: false },\n },\n async run({ values }) {\n const { runAgentStart } = await import('../../runners/agent.ts')\n\n await runAgentStart({\n port: values.port !== undefined ? values.port : undefined,\n host: values.host,\n configPath: values.config,\n allowWrite: values['allow-write'],\n allowAll: values['allow-all'],\n version,\n })\n },\n})\n","import { defineCommand } from '@internals/utils'\nimport { command as startCommand } from './agent/start.ts'\n\nexport const command = defineCommand({\n name: 'agent',\n description: 'Manage the Kubb Agent server',\n subCommands: [startCommand],\n})\n"],"mappings":";;;;;;ACGA,MAAa,UAAU,cAAc;CACnC,MAAM;CACN,aAAa;CACb,aAAa,CDFQ,cAAc;EACnC,MAAM;EACN,aAAa;EACb,SAAS;GACP,QAAQ;IAAE,MAAM;IAAU,aAAa;IAA2B,OAAO;IAAK;GAC9E,MAAM;IAAE,MAAM;IAAU,aAAa,iCAAiC,cAAc,KAAK;IAAI,OAAO;IAAK;GACzG,MAAM;IAAE,MAAM;IAAU,aAAa;IAAuB,SAAS,cAAc;IAAM;GACzF,eAAe;IACb,MAAM;IACN,aAAa;IACb,SAAS;IACV;GACD,aAAa;IAAE,MAAM;IAAW,aAAa;IAAkD,SAAS;IAAO;GAChH;EACD,MAAM,IAAI,EAAE,UAAU;GACpB,MAAM,EAAE,kBAAkB,MAAM,OAAO;AAEvC,SAAM,cAAc;IAClB,MAAM,OAAO,SAAS,KAAA,IAAY,OAAO,OAAO,KAAA;IAChD,MAAM,OAAO;IACb,YAAY,OAAO;IACnB,YAAY,OAAO;IACnB,UAAU,OAAO;IACjB;IACD,CAAC;;EAEL,CAAC,CCxB2B;CAC5B,CAAC"}
|
package/dist/agent-BKphjOIF.cjs
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
require("./chunk-ByKO4r7w.cjs");
|
|
2
|
-
const require_define = require("./define-D6Kfm7-Z.cjs");
|
|
3
|
-
const require_package = require("./package-BJ6ionm6.cjs");
|
|
4
|
-
const require_constants = require("./constants-D0XHAHeZ.cjs");
|
|
5
|
-
//#region src/commands/agent/start.ts
|
|
6
|
-
const command$1 = require_define.defineCommand({
|
|
7
|
-
name: "start",
|
|
8
|
-
description: "Start the Agent server",
|
|
9
|
-
options: {
|
|
10
|
-
config: {
|
|
11
|
-
type: "string",
|
|
12
|
-
description: "Path to the Kubb config",
|
|
13
|
-
short: "c"
|
|
14
|
-
},
|
|
15
|
-
port: {
|
|
16
|
-
type: "string",
|
|
17
|
-
description: `Port for the server (default: ${require_constants.agentDefaults.port})`,
|
|
18
|
-
short: "p"
|
|
19
|
-
},
|
|
20
|
-
host: {
|
|
21
|
-
type: "string",
|
|
22
|
-
description: "Host for the server",
|
|
23
|
-
default: require_constants.agentDefaults.host
|
|
24
|
-
},
|
|
25
|
-
"allow-write": {
|
|
26
|
-
type: "boolean",
|
|
27
|
-
description: "Allow writing generated files to the filesystem. When not set, no files are written and the config patch is not persisted.",
|
|
28
|
-
default: false
|
|
29
|
-
},
|
|
30
|
-
"allow-all": {
|
|
31
|
-
type: "boolean",
|
|
32
|
-
description: "Grant all permissions (implies --allow-write).",
|
|
33
|
-
default: false
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
async run({ values }) {
|
|
37
|
-
const { runAgentStart } = await Promise.resolve().then(() => require("./agent-BapvKB4r.cjs"));
|
|
38
|
-
await runAgentStart({
|
|
39
|
-
port: values.port !== void 0 ? values.port : void 0,
|
|
40
|
-
host: values.host,
|
|
41
|
-
configPath: values.config,
|
|
42
|
-
allowWrite: values["allow-write"],
|
|
43
|
-
allowAll: values["allow-all"],
|
|
44
|
-
version: require_package.version
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
//#endregion
|
|
49
|
-
//#region src/commands/agent.ts
|
|
50
|
-
const command = require_define.defineCommand({
|
|
51
|
-
name: "agent",
|
|
52
|
-
description: "Manage the Kubb Agent server",
|
|
53
|
-
subCommands: [command$1]
|
|
54
|
-
});
|
|
55
|
-
//#endregion
|
|
56
|
-
exports.command = command;
|
|
57
|
-
|
|
58
|
-
//# sourceMappingURL=agent-BKphjOIF.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent-BKphjOIF.cjs","names":["command","defineCommand","agentDefaults","defineCommand","startCommand"],"sources":["../src/commands/agent/start.ts","../src/commands/agent.ts"],"sourcesContent":["import { defineCommand } from '@internals/utils'\nimport { version } from '../../../package.json'\nimport { agentDefaults } from '../../constants.ts'\n\nexport const command = defineCommand({\n name: 'start',\n description: 'Start the Agent server',\n options: {\n config: { type: 'string', description: 'Path to the Kubb config', short: 'c' },\n port: { type: 'string', description: `Port for the server (default: ${agentDefaults.port})`, short: 'p' },\n host: { type: 'string', description: 'Host for the server', default: agentDefaults.host },\n 'allow-write': {\n type: 'boolean',\n description: 'Allow writing generated files to the filesystem. When not set, no files are written and the config patch is not persisted.',\n default: false,\n },\n 'allow-all': { type: 'boolean', description: 'Grant all permissions (implies --allow-write).', default: false },\n },\n async run({ values }) {\n const { runAgentStart } = await import('../../runners/agent.ts')\n\n await runAgentStart({\n port: values.port !== undefined ? values.port : undefined,\n host: values.host,\n configPath: values.config,\n allowWrite: values['allow-write'],\n allowAll: values['allow-all'],\n version,\n })\n },\n})\n","import { defineCommand } from '@internals/utils'\nimport { command as startCommand } from './agent/start.ts'\n\nexport const command = defineCommand({\n name: 'agent',\n description: 'Manage the Kubb Agent server',\n subCommands: [startCommand],\n})\n"],"mappings":";;;;;AAIA,MAAaA,YAAUC,eAAAA,cAAc;CACnC,MAAM;CACN,aAAa;CACb,SAAS;EACP,QAAQ;GAAE,MAAM;GAAU,aAAa;GAA2B,OAAO;GAAK;EAC9E,MAAM;GAAE,MAAM;GAAU,aAAa,iCAAiCC,kBAAAA,cAAc,KAAK;GAAI,OAAO;GAAK;EACzG,MAAM;GAAE,MAAM;GAAU,aAAa;GAAuB,SAASA,kBAAAA,cAAc;GAAM;EACzF,eAAe;GACb,MAAM;GACN,aAAa;GACb,SAAS;GACV;EACD,aAAa;GAAE,MAAM;GAAW,aAAa;GAAkD,SAAS;GAAO;EAChH;CACD,MAAM,IAAI,EAAE,UAAU;EACpB,MAAM,EAAE,kBAAkB,MAAA,QAAA,SAAA,CAAA,WAAA,QAAM,uBAAA,CAAA;AAEhC,QAAM,cAAc;GAClB,MAAM,OAAO,SAAS,KAAA,IAAY,OAAO,OAAO,KAAA;GAChD,MAAM,OAAO;GACb,YAAY,OAAO;GACnB,YAAY,OAAO;GACnB,UAAU,OAAO;GACjB,SAAA,gBAAA;GACD,CAAC;;CAEL,CAAC;;;AC3BF,MAAa,UAAUC,eAAAA,cAAc;CACnC,MAAM;CACN,aAAa;CACb,aAAa,CAACC,UAAa;CAC5B,CAAC"}
|