MCPcopy Create free account
hub / github.com/TanStack/cli / confirmCreateOptions

Function confirmCreateOptions

packages/cli/src/cli.ts:295–383  ·  view source on GitHub ↗
(finalOptions: Options)

Source from the content-addressed store, hash-verified

293 }
294
295 async function confirmCreateOptions(finalOptions: Options) {
296 const lines: Array<string> = []
297 lines.push(` Project: ${finalOptions.projectName}`)
298 lines.push(` Location: ${finalOptions.targetDir}`)
299 lines.push(` Framework: ${finalOptions.framework.name}`)
300 lines.push(` Mode: ${finalOptions.mode}`)
301 lines.push(` Package manager: ${finalOptions.packageManager}`)
302 if (finalOptions.starter) {
303 lines.push(` Template: ${finalOptions.starter.name}`)
304 }
305
306 const auth: Array<string> = []
307 const database: Array<string> = []
308 const orm: Array<string> = []
309 const deploy: Array<string> = []
310 const otherAddOns: Array<string> = []
311 for (const addOn of finalOptions.chosenAddOns) {
312 switch (addOn.category) {
313 case 'auth':
314 auth.push(addOn.name)
315 break
316 case 'database':
317 database.push(addOn.name)
318 break
319 case 'orm':
320 orm.push(addOn.name)
321 break
322 case 'deploy':
323 deploy.push(addOn.name)
324 break
325 default:
326 otherAddOns.push(addOn.name)
327 }
328 }
329
330 if (
331 auth.length +
332 database.length +
333 orm.length +
334 deploy.length +
335 otherAddOns.length >
336 0
337 ) {
338 lines.push('')
339 }
340 if (auth.length > 0) {
341 lines.push(` Auth: ${auth.join(', ')}`)
342 }
343 if (database.length > 0) {
344 lines.push(` Database: ${database.join(', ')}`)
345 }
346 if (orm.length > 0) {
347 lines.push(` ORM: ${orm.join(', ')}`)
348 }
349 if (deploy.length > 0) {
350 lines.push(` Deploy: ${deploy.join(', ')}`)
351 }
352 if (otherAddOns.length > 0) {

Callers 1

handleCreateFunction · 0.85

Calls 3

findExclusiveConflictsFunction · 0.85
warnMethod · 0.80
infoMethod · 0.65

Tested by

no test coverage detected