veloce-ts 0.1.0 → 0.1.2
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/CHANGELOG.md +16 -1
- package/bin/veloce.ts +1 -1
- package/dist/cjs/src/cli/index.js +17 -17
- package/dist/cjs/src/cli/index.js.map +3 -3
- package/dist/esm/{chunk-8wrnr45g.js → chunk-hnr45hnn.js} +17 -17
- package/dist/esm/chunk-hnr45hnn.js.map +10 -0
- package/dist/esm/src/cli/index.js +1 -1
- package/package.json +2 -2
- package/dist/esm/chunk-8wrnr45g.js.map +0 -10
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.1.2] - 2025-10-13
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- Fixed CLI templates to use correct package name `veloce-ts` instead of `VeloceTS`
|
|
14
|
+
- Fixed all import statements in generated projects
|
|
15
|
+
|
|
16
|
+
## [0.1.1] - 2025-10-13
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
- Fixed CLI binary path to use compiled dist files instead of source files
|
|
20
|
+
|
|
21
|
+
## [0.1.0] - 2025-10-12
|
|
22
|
+
|
|
10
23
|
### Added
|
|
11
24
|
- Initial release of veloce-ts framework
|
|
12
25
|
- Decorator-based routing with @Controller, @Get, @Post, @Put, @Delete, @Patch
|
|
@@ -39,5 +52,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
39
52
|
- CLI tooling
|
|
40
53
|
- Testing utilities
|
|
41
54
|
|
|
42
|
-
[Unreleased]: https://github.com/AlfredoMejia3001/veloce-ts/compare/v0.1.
|
|
55
|
+
[Unreleased]: https://github.com/AlfredoMejia3001/veloce-ts/compare/v0.1.2...HEAD
|
|
56
|
+
[0.1.2]: https://github.com/AlfredoMejia3001/veloce-ts/compare/v0.1.1...v0.1.2
|
|
57
|
+
[0.1.1]: https://github.com/AlfredoMejia3001/veloce-ts/compare/v0.1.0...v0.1.1
|
|
43
58
|
[0.1.0]: https://github.com/AlfredoMejia3001/veloce-ts/releases/tag/v0.1.0
|
package/bin/veloce.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
import '../src/cli/index';
|
|
2
|
+
import '../dist/cjs/src/cli/index.js';
|
|
@@ -26,7 +26,7 @@ Expecting one of '${q.join("', '")}'`);if(this._lifeCycleHooks[$])this._lifeCycl
|
|
|
26
26
|
Expecting one of '${q.join("', '")}'`);let B=`${$}Help`;return this.on(B,(X)=>{let Y;if(typeof z==="function")Y=z({error:X.error,command:X.command});else Y=z;if(Y)X.write(`${Y}
|
|
27
27
|
`)}),this}_outputHelpIfRequested($){let z=this._getHelpOption();if(z&&$.find((B)=>z.is(B)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function Z$($){return $.map((z)=>{if(!z.startsWith("--inspect"))return z;let q,B="127.0.0.1",X="9229",Y;if((Y=z.match(/^(--inspect(-brk)?)$/))!==null)q=Y[1];else if((Y=z.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(q=Y[1],/^\d+$/.test(Y[3]))X=Y[3];else B=Y[3];else if((Y=z.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)q=Y[1],B=Y[3],X=Y[4];if(q&&X!=="0")return`${q}=${B}:${parseInt(X)+1}`;return z})}function h(){if(T.env.NO_COLOR||T.env.FORCE_COLOR==="0"||T.env.FORCE_COLOR==="false")return!1;if(T.env.FORCE_COLOR||T.env.CLICOLOR_FORCE!==void 0)return!0;return}l.Command=g;l.useColor=h});var U$=S((G)=>{var{Argument:_$}=A(),{Command:c}=Q$(),{CommanderError:p$,InvalidArgumentError:J$}=N(),{Help:n$}=C(),{Option:R$}=x();G.program=new c;G.createCommand=($)=>new c($);G.createOption=($,z)=>new R$($,z);G.createArgument=($,z)=>new _$($,z);G.Command=c;G.Option=R$;G.Argument=_$;G.Help=n$;G.CommanderError=p$;G.InvalidArgumentError=J$;G.InvalidOptionArgumentError=J$});var M$={};F(M$,{registerNewCommand:()=>r$});function r$($){$.command("new").description("Create a new VeloceTS project").argument("<name>","Project name").option("-t, --template <template>","Project template (rest, graphql, websocket, fullstack)","rest").action(async(z,q)=>{await t$(z,q)})}async function t$($,z){let q=L.join(process.cwd(),$);if(L$.existsSync(q))console.error(`Error: Directory "${$}" already exists`),process.exit(1);console.log(`Creating new VeloceTS project: ${$}`),console.log(`Template: ${z.template}`);try{switch(await H.mkdir(q,{recursive:!0}),await H.mkdir(L.join(q,"src"),{recursive:!0}),await H.mkdir(L.join(q,"src","controllers"),{recursive:!0}),await a$(q,$),await o$(q),await e$(q),await $z(q,$,z.template),z.template){case"rest":await zz(q);break;case"graphql":await qz(q);break;case"websocket":await Bz(q);break;case"fullstack":await Xz(q);break}console.log(`
|
|
28
28
|
✓ Project created successfully!`),console.log(`
|
|
29
|
-
Next steps:`),console.log(` cd ${$}`),console.log(" bun install"),console.log(" bun run dev")}catch(B){console.error("Error creating project:",B),process.exit(1)}}async function a$($,z){let q={name:z,version:"0.1.0",description:"A
|
|
29
|
+
Next steps:`),console.log(` cd ${$}`),console.log(" bun install"),console.log(" bun run dev")}catch(B){console.error("Error creating project:",B),process.exit(1)}}async function a$($,z){let q={name:z,version:"0.1.0",description:"A Veloce-TS application",type:"module",main:"./dist/index.js",scripts:{dev:"bun --watch src/index.ts",build:"bun build src/index.ts --outdir dist --target bun",start:"bun run dist/index.js","generate:openapi":"bun run node_modules/veloce-ts/bin/veloce.ts generate openapi","generate:client":"bun run node_modules/veloce-ts/bin/veloce.ts generate client"},dependencies:{"veloce-ts":"^0.1.0",hono:"^4.0.0","reflect-metadata":"^0.2.0",zod:"^3.22.0"},devDependencies:{"@types/bun":"latest",typescript:"^5.3.0"}};await H.writeFile(L.join($,"package.json"),JSON.stringify(q,null,2))}async function o$($){let z={compilerOptions:{target:"ES2022",module:"ESNext",lib:["ES2022"],moduleResolution:"bundler",experimentalDecorators:!0,emitDecoratorMetadata:!0,strict:!0,esModuleInterop:!0,skipLibCheck:!0,forceConsistentCasingInFileNames:!0,resolveJsonModule:!0,outDir:"./dist",rootDir:"./src"},include:["src/**/*"],exclude:["node_modules","dist"]};await H.writeFile(L.join($,"tsconfig.json"),JSON.stringify(z,null,2))}async function e$($){await H.writeFile(L.join($,".gitignore"),`node_modules/
|
|
30
30
|
dist/
|
|
31
31
|
*.log
|
|
32
32
|
.env
|
|
@@ -59,7 +59,7 @@ bun run build
|
|
|
59
59
|
|
|
60
60
|
Visit http://localhost:3000/docs to see the API documentation.
|
|
61
61
|
`;await H.writeFile(L.join($,"README.md"),B)}async function zz($){await H.writeFile(L.join($,"src","index.ts"),`import 'reflect-metadata';
|
|
62
|
-
import { Veloce } from '
|
|
62
|
+
import { Veloce } from 'veloce-ts';
|
|
63
63
|
import { UserController } from './controllers/user.controller';
|
|
64
64
|
|
|
65
65
|
const app = new Veloce({
|
|
@@ -76,7 +76,7 @@ app.listen(3000, () => {
|
|
|
76
76
|
console.log('Server running on http://localhost:3000');
|
|
77
77
|
console.log('Docs available at http://localhost:3000/docs');
|
|
78
78
|
});
|
|
79
|
-
`);let q=`import { Controller, Get, Post, Body, Param } from '
|
|
79
|
+
`);let q=`import { Controller, Get, Post, Body, Param } from 'veloce-ts';
|
|
80
80
|
import { z } from 'zod';
|
|
81
81
|
|
|
82
82
|
const UserSchema = z.object({
|
|
@@ -112,8 +112,8 @@ export class UserController {
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
`;await H.writeFile(L.join($,"src","controllers","user.controller.ts"),q)}async function qz($){await H.mkdir(L.join($,"src","resolvers"),{recursive:!0});let z=`import 'reflect-metadata';
|
|
115
|
-
import { Veloce } from '
|
|
116
|
-
import { GraphQLPlugin } from '
|
|
115
|
+
import { Veloce } from 'veloce-ts';
|
|
116
|
+
import { GraphQLPlugin } from 'veloce-ts/plugins';
|
|
117
117
|
import { UserResolver } from './resolvers/user.resolver';
|
|
118
118
|
|
|
119
119
|
const app = new Veloce({
|
|
@@ -130,7 +130,7 @@ app.listen(3000, () => {
|
|
|
130
130
|
console.log('Server running on http://localhost:3000');
|
|
131
131
|
console.log('GraphQL Playground at http://localhost:3000/graphql');
|
|
132
132
|
});
|
|
133
|
-
`;await H.writeFile(L.join($,"src","index.ts"),z);let q=`import { Resolver, Query, Mutation, Arg } from '
|
|
133
|
+
`;await H.writeFile(L.join($,"src","index.ts"),z);let q=`import { Resolver, Query, Mutation, Arg } from 'veloce-ts/graphql';
|
|
134
134
|
import { z } from 'zod';
|
|
135
135
|
|
|
136
136
|
const UserSchema = z.object({
|
|
@@ -166,8 +166,8 @@ export class UserResolver {
|
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
`;await H.writeFile(L.join($,"src","resolvers","user.resolver.ts"),q)}async function Bz($){await H.mkdir(L.join($,"src","websockets"),{recursive:!0});let z=`import 'reflect-metadata';
|
|
169
|
-
import { Veloce } from '
|
|
170
|
-
import { WebSocketPlugin } from '
|
|
169
|
+
import { Veloce } from 'veloce-ts';
|
|
170
|
+
import { WebSocketPlugin } from 'veloce-ts/plugins';
|
|
171
171
|
import { ChatWebSocket } from './websockets/chat.websocket';
|
|
172
172
|
|
|
173
173
|
const app = new Veloce({
|
|
@@ -184,9 +184,9 @@ app.listen(3000, () => {
|
|
|
184
184
|
console.log('Server running on http://localhost:3000');
|
|
185
185
|
console.log('WebSocket endpoint at ws://localhost:3000/ws/chat');
|
|
186
186
|
});
|
|
187
|
-
`;await H.writeFile(L.join($,"src","index.ts"),z);let q=`import { WebSocket, OnConnect, OnMessage, OnDisconnect } from '
|
|
187
|
+
`;await H.writeFile(L.join($,"src","index.ts"),z);let q=`import { WebSocket, OnConnect, OnMessage, OnDisconnect } from 'veloce-ts/websocket';
|
|
188
188
|
import { z } from 'zod';
|
|
189
|
-
import type { WebSocketConnection } from '
|
|
189
|
+
import type { WebSocketConnection } from 'veloce-ts/websocket';
|
|
190
190
|
|
|
191
191
|
const MessageSchema = z.object({
|
|
192
192
|
type: z.enum(['message', 'join', 'leave']),
|
|
@@ -221,8 +221,8 @@ export class ChatWebSocket {
|
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
`;await H.writeFile(L.join($,"src","websockets","chat.websocket.ts"),q)}async function Xz($){await H.mkdir(L.join($,"src","controllers"),{recursive:!0}),await H.mkdir(L.join($,"src","resolvers"),{recursive:!0}),await H.mkdir(L.join($,"src","websockets"),{recursive:!0});let z=`import 'reflect-metadata';
|
|
224
|
-
import { Veloce } from '
|
|
225
|
-
import { GraphQLPlugin, WebSocketPlugin } from '
|
|
224
|
+
import { Veloce } from 'veloce-ts';
|
|
225
|
+
import { GraphQLPlugin, WebSocketPlugin } from 'veloce-ts/plugins';
|
|
226
226
|
import { UserController } from './controllers/user.controller';
|
|
227
227
|
import { UserResolver } from './resolvers/user.resolver';
|
|
228
228
|
import { ChatWebSocket } from './websockets/chat.websocket';
|
|
@@ -252,7 +252,7 @@ app.listen(3000, () => {
|
|
|
252
252
|
console.log('GraphQL Playground at http://localhost:3000/graphql');
|
|
253
253
|
console.log('WebSocket endpoint at ws://localhost:3000/ws/chat');
|
|
254
254
|
});
|
|
255
|
-
`;await H.writeFile(L.join($,"src","index.ts"),z);let q=`import { Controller, Get, Post, Body, Param } from '
|
|
255
|
+
`;await H.writeFile(L.join($,"src","index.ts"),z);let q=`import { Controller, Get, Post, Body, Param } from 'veloce-ts';
|
|
256
256
|
import { z } from 'zod';
|
|
257
257
|
|
|
258
258
|
const UserSchema = z.object({
|
|
@@ -287,7 +287,7 @@ export class UserController {
|
|
|
287
287
|
return { message: 'User created', user };
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
|
-
`;await H.writeFile(L.join($,"src","controllers","user.controller.ts"),q);let B=`import { Resolver, Query, Mutation, Arg } from '
|
|
290
|
+
`;await H.writeFile(L.join($,"src","controllers","user.controller.ts"),q);let B=`import { Resolver, Query, Mutation, Arg } from 'veloce-ts/graphql';
|
|
291
291
|
import { z } from 'zod';
|
|
292
292
|
|
|
293
293
|
const UserSchema = z.object({
|
|
@@ -322,9 +322,9 @@ export class UserResolver {
|
|
|
322
322
|
return user;
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
`;await H.writeFile(L.join($,"src","resolvers","user.resolver.ts"),B);let X=`import { WebSocket, OnConnect, OnMessage, OnDisconnect } from '
|
|
325
|
+
`;await H.writeFile(L.join($,"src","resolvers","user.resolver.ts"),B);let X=`import { WebSocket, OnConnect, OnMessage, OnDisconnect } from 'veloce-ts/websocket';
|
|
326
326
|
import { z } from 'zod';
|
|
327
|
-
import type { WebSocketConnection } from '
|
|
327
|
+
import type { WebSocketConnection } from 'veloce-ts/websocket';
|
|
328
328
|
|
|
329
329
|
const MessageSchema = z.object({
|
|
330
330
|
type: z.enum(['message', 'join', 'leave']),
|
|
@@ -422,4 +422,4 @@ export class APIClient {
|
|
|
422
422
|
`;return z}function Sz($,z=" "){let q="";if($.properties)for(let[B,X]of Object.entries($.properties)){let Y=X,Z=!$.required?.includes(B),Q=y$(Y);q+=`${z}${B}${Z?"?":""}: ${Q};
|
|
423
423
|
`}return q}function y$($){if($.type==="string")return"string";if($.type==="number"||$.type==="integer")return"number";if($.type==="boolean")return"boolean";if($.type==="array")return`${$.items?y$($.items):"any"}[]`;if($.type==="object")return"Record<string, any>";return"any"}var I,E,i;var j$=j(()=>{I=require("fs/promises"),E=require("path"),i=require("fs")});var T$=O$(U$()),{program:kz,createCommand:fz,createArgument:Oz,createOption:Cz,CommanderError:bz,InvalidArgumentError:xz,InvalidOptionArgumentError:vz,Command:H$,Argument:uz,Option:hz,Help:gz}=T$.default;var A$=require("fs"),P$=require("path"),Ez=()=>{try{let $=P$.join(process.cwd(),"package.json");return JSON.parse(A$.readFileSync($,"utf-8")).version||"0.1.0"}catch{return"0.1.0"}},V=new H$;V.name("veloce").description("A modern, fast web framework for TypeScript inspired by FastAPI").version(Ez(),"-v, --version","Display version number").helpOption("-h, --help","Display help for command");async function Iz(){let{registerNewCommand:$}=await Promise.resolve().then(() => (G$(),M$)),{registerDevCommand:z}=await Promise.resolve().then(() => (I$(),E$)),{registerBuildCommand:q}=await Promise.resolve().then(() => (D$(),V$)),{registerGenerateCommand:B}=await Promise.resolve().then(() => (j$(),F$));$(V),z(V),q(V),B(V),V.parse(process.argv)}Iz().catch(($)=>{console.error("CLI error:",$),process.exit(1)});
|
|
424
424
|
|
|
425
|
-
//# debugId=
|
|
425
|
+
//# debugId=AD523F2AC9AC339064756E2164756E21
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
"const maxDistance = 3;\n\nfunction editDistance(a, b) {\n // https://en.wikipedia.org/wiki/Damerau–Levenshtein_distance\n // Calculating optimal string alignment distance, no substring is edited more than once.\n // (Simple implementation.)\n\n // Quick early exit, return worst case.\n if (Math.abs(a.length - b.length) > maxDistance)\n return Math.max(a.length, b.length);\n\n // distance between prefix substrings of a and b\n const d = [];\n\n // pure deletions turn a into empty string\n for (let i = 0; i <= a.length; i++) {\n d[i] = [i];\n }\n // pure insertions turn empty string into b\n for (let j = 0; j <= b.length; j++) {\n d[0][j] = j;\n }\n\n // fill matrix\n for (let j = 1; j <= b.length; j++) {\n for (let i = 1; i <= a.length; i++) {\n let cost = 1;\n if (a[i - 1] === b[j - 1]) {\n cost = 0;\n } else {\n cost = 1;\n }\n d[i][j] = Math.min(\n d[i - 1][j] + 1, // deletion\n d[i][j - 1] + 1, // insertion\n d[i - 1][j - 1] + cost, // substitution\n );\n // transposition\n if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) {\n d[i][j] = Math.min(d[i][j], d[i - 2][j - 2] + 1);\n }\n }\n }\n\n return d[a.length][b.length];\n}\n\n/**\n * Find close matches, restricted to same number of edits.\n *\n * @param {string} word\n * @param {string[]} candidates\n * @returns {string}\n */\n\nfunction suggestSimilar(word, candidates) {\n if (!candidates || candidates.length === 0) return '';\n // remove possible duplicates\n candidates = Array.from(new Set(candidates));\n\n const searchingOptions = word.startsWith('--');\n if (searchingOptions) {\n word = word.slice(2);\n candidates = candidates.map((candidate) => candidate.slice(2));\n }\n\n let similar = [];\n let bestDistance = maxDistance;\n const minSimilarity = 0.4;\n candidates.forEach((candidate) => {\n if (candidate.length <= 1) return; // no one character guesses\n\n const distance = editDistance(word, candidate);\n const length = Math.max(word.length, candidate.length);\n const similarity = (length - distance) / length;\n if (similarity > minSimilarity) {\n if (distance < bestDistance) {\n // better edit distance, throw away previous worse matches\n bestDistance = distance;\n similar = [candidate];\n } else if (distance === bestDistance) {\n similar.push(candidate);\n }\n }\n });\n\n similar.sort((a, b) => a.localeCompare(b));\n if (searchingOptions) {\n similar = similar.map((candidate) => `--${candidate}`);\n }\n\n if (similar.length > 1) {\n return `\\n(Did you mean one of ${similar.join(', ')}?)`;\n }\n if (similar.length === 1) {\n return `\\n(Did you mean ${similar[0]}?)`;\n }\n return '';\n}\n\nexports.suggestSimilar = suggestSimilar;\n",
|
|
10
10
|
"const EventEmitter = require('node:events').EventEmitter;\nconst childProcess = require('node:child_process');\nconst path = require('node:path');\nconst fs = require('node:fs');\nconst process = require('node:process');\n\nconst { Argument, humanReadableArgName } = require('./argument.js');\nconst { CommanderError } = require('./error.js');\nconst { Help, stripColor } = require('./help.js');\nconst { Option, DualOptions } = require('./option.js');\nconst { suggestSimilar } = require('./suggestSimilar');\n\nclass Command extends EventEmitter {\n /**\n * Initialize a new `Command`.\n *\n * @param {string} [name]\n */\n\n constructor(name) {\n super();\n /** @type {Command[]} */\n this.commands = [];\n /** @type {Option[]} */\n this.options = [];\n this.parent = null;\n this._allowUnknownOption = false;\n this._allowExcessArguments = false;\n /** @type {Argument[]} */\n this.registeredArguments = [];\n this._args = this.registeredArguments; // deprecated old name\n /** @type {string[]} */\n this.args = []; // cli args with options removed\n this.rawArgs = [];\n this.processedArgs = []; // like .args but after custom processing and collecting variadic\n this._scriptPath = null;\n this._name = name || '';\n this._optionValues = {};\n this._optionValueSources = {}; // default, env, cli etc\n this._storeOptionsAsProperties = false;\n this._actionHandler = null;\n this._executableHandler = false;\n this._executableFile = null; // custom name for executable\n this._executableDir = null; // custom search directory for subcommands\n this._defaultCommandName = null;\n this._exitCallback = null;\n this._aliases = [];\n this._combineFlagAndOptionalValue = true;\n this._description = '';\n this._summary = '';\n this._argsDescription = undefined; // legacy\n this._enablePositionalOptions = false;\n this._passThroughOptions = false;\n this._lifeCycleHooks = {}; // a hash of arrays\n /** @type {(boolean | string)} */\n this._showHelpAfterError = false;\n this._showSuggestionAfterError = true;\n this._savedState = null; // used in save/restoreStateBeforeParse\n\n // see configureOutput() for docs\n this._outputConfiguration = {\n writeOut: (str) => process.stdout.write(str),\n writeErr: (str) => process.stderr.write(str),\n outputError: (str, write) => write(str),\n getOutHelpWidth: () =>\n process.stdout.isTTY ? process.stdout.columns : undefined,\n getErrHelpWidth: () =>\n process.stderr.isTTY ? process.stderr.columns : undefined,\n getOutHasColors: () =>\n useColor() ?? (process.stdout.isTTY && process.stdout.hasColors?.()),\n getErrHasColors: () =>\n useColor() ?? (process.stderr.isTTY && process.stderr.hasColors?.()),\n stripColor: (str) => stripColor(str),\n };\n\n this._hidden = false;\n /** @type {(Option | null | undefined)} */\n this._helpOption = undefined; // Lazy created on demand. May be null if help option is disabled.\n this._addImplicitHelpCommand = undefined; // undecided whether true or false yet, not inherited\n /** @type {Command} */\n this._helpCommand = undefined; // lazy initialised, inherited\n this._helpConfiguration = {};\n /** @type {string | undefined} */\n this._helpGroupHeading = undefined; // soft initialised when added to parent\n /** @type {string | undefined} */\n this._defaultCommandGroup = undefined;\n /** @type {string | undefined} */\n this._defaultOptionGroup = undefined;\n }\n\n /**\n * Copy settings that are useful to have in common across root command and subcommands.\n *\n * (Used internally when adding a command using `.command()` so subcommands inherit parent settings.)\n *\n * @param {Command} sourceCommand\n * @return {Command} `this` command for chaining\n */\n copyInheritedSettings(sourceCommand) {\n this._outputConfiguration = sourceCommand._outputConfiguration;\n this._helpOption = sourceCommand._helpOption;\n this._helpCommand = sourceCommand._helpCommand;\n this._helpConfiguration = sourceCommand._helpConfiguration;\n this._exitCallback = sourceCommand._exitCallback;\n this._storeOptionsAsProperties = sourceCommand._storeOptionsAsProperties;\n this._combineFlagAndOptionalValue =\n sourceCommand._combineFlagAndOptionalValue;\n this._allowExcessArguments = sourceCommand._allowExcessArguments;\n this._enablePositionalOptions = sourceCommand._enablePositionalOptions;\n this._showHelpAfterError = sourceCommand._showHelpAfterError;\n this._showSuggestionAfterError = sourceCommand._showSuggestionAfterError;\n\n return this;\n }\n\n /**\n * @returns {Command[]}\n * @private\n */\n\n _getCommandAndAncestors() {\n const result = [];\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n for (let command = this; command; command = command.parent) {\n result.push(command);\n }\n return result;\n }\n\n /**\n * Define a command.\n *\n * There are two styles of command: pay attention to where to put the description.\n *\n * @example\n * // Command implemented using action handler (description is supplied separately to `.command`)\n * program\n * .command('clone <source> [destination]')\n * .description('clone a repository into a newly created directory')\n * .action((source, destination) => {\n * console.log('clone command called');\n * });\n *\n * // Command implemented using separate executable file (description is second parameter to `.command`)\n * program\n * .command('start <service>', 'start named service')\n * .command('stop [service]', 'stop named service, or all if no name supplied');\n *\n * @param {string} nameAndArgs - command name and arguments, args are `<required>` or `[optional]` and last may also be `variadic...`\n * @param {(object | string)} [actionOptsOrExecDesc] - configuration options (for action), or description (for executable)\n * @param {object} [execOpts] - configuration options (for executable)\n * @return {Command} returns new command for action handler, or `this` for executable command\n */\n\n command(nameAndArgs, actionOptsOrExecDesc, execOpts) {\n let desc = actionOptsOrExecDesc;\n let opts = execOpts;\n if (typeof desc === 'object' && desc !== null) {\n opts = desc;\n desc = null;\n }\n opts = opts || {};\n const [, name, args] = nameAndArgs.match(/([^ ]+) *(.*)/);\n\n const cmd = this.createCommand(name);\n if (desc) {\n cmd.description(desc);\n cmd._executableHandler = true;\n }\n if (opts.isDefault) this._defaultCommandName = cmd._name;\n cmd._hidden = !!(opts.noHelp || opts.hidden); // noHelp is deprecated old name for hidden\n cmd._executableFile = opts.executableFile || null; // Custom name for executable file, set missing to null to match constructor\n if (args) cmd.arguments(args);\n this._registerCommand(cmd);\n cmd.parent = this;\n cmd.copyInheritedSettings(this);\n\n if (desc) return this;\n return cmd;\n }\n\n /**\n * Factory routine to create a new unattached command.\n *\n * See .command() for creating an attached subcommand, which uses this routine to\n * create the command. You can override createCommand to customise subcommands.\n *\n * @param {string} [name]\n * @return {Command} new command\n */\n\n createCommand(name) {\n return new Command(name);\n }\n\n /**\n * You can customise the help with a subclass of Help by overriding createHelp,\n * or by overriding Help properties using configureHelp().\n *\n * @return {Help}\n */\n\n createHelp() {\n return Object.assign(new Help(), this.configureHelp());\n }\n\n /**\n * You can customise the help by overriding Help properties using configureHelp(),\n * or with a subclass of Help by overriding createHelp().\n *\n * @param {object} [configuration] - configuration options\n * @return {(Command | object)} `this` command for chaining, or stored configuration\n */\n\n configureHelp(configuration) {\n if (configuration === undefined) return this._helpConfiguration;\n\n this._helpConfiguration = configuration;\n return this;\n }\n\n /**\n * The default output goes to stdout and stderr. You can customise this for special\n * applications. You can also customise the display of errors by overriding outputError.\n *\n * The configuration properties are all functions:\n *\n * // change how output being written, defaults to stdout and stderr\n * writeOut(str)\n * writeErr(str)\n * // change how output being written for errors, defaults to writeErr\n * outputError(str, write) // used for displaying errors and not used for displaying help\n * // specify width for wrapping help\n * getOutHelpWidth()\n * getErrHelpWidth()\n * // color support, currently only used with Help\n * getOutHasColors()\n * getErrHasColors()\n * stripColor() // used to remove ANSI escape codes if output does not have colors\n *\n * @param {object} [configuration] - configuration options\n * @return {(Command | object)} `this` command for chaining, or stored configuration\n */\n\n configureOutput(configuration) {\n if (configuration === undefined) return this._outputConfiguration;\n\n this._outputConfiguration = {\n ...this._outputConfiguration,\n ...configuration,\n };\n return this;\n }\n\n /**\n * Display the help or a custom message after an error occurs.\n *\n * @param {(boolean|string)} [displayHelp]\n * @return {Command} `this` command for chaining\n */\n showHelpAfterError(displayHelp = true) {\n if (typeof displayHelp !== 'string') displayHelp = !!displayHelp;\n this._showHelpAfterError = displayHelp;\n return this;\n }\n\n /**\n * Display suggestion of similar commands for unknown commands, or options for unknown options.\n *\n * @param {boolean} [displaySuggestion]\n * @return {Command} `this` command for chaining\n */\n showSuggestionAfterError(displaySuggestion = true) {\n this._showSuggestionAfterError = !!displaySuggestion;\n return this;\n }\n\n /**\n * Add a prepared subcommand.\n *\n * See .command() for creating an attached subcommand which inherits settings from its parent.\n *\n * @param {Command} cmd - new subcommand\n * @param {object} [opts] - configuration options\n * @return {Command} `this` command for chaining\n */\n\n addCommand(cmd, opts) {\n if (!cmd._name) {\n throw new Error(`Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()`);\n }\n\n opts = opts || {};\n if (opts.isDefault) this._defaultCommandName = cmd._name;\n if (opts.noHelp || opts.hidden) cmd._hidden = true; // modifying passed command due to existing implementation\n\n this._registerCommand(cmd);\n cmd.parent = this;\n cmd._checkForBrokenPassThrough();\n\n return this;\n }\n\n /**\n * Factory routine to create a new unattached argument.\n *\n * See .argument() for creating an attached argument, which uses this routine to\n * create the argument. You can override createArgument to return a custom argument.\n *\n * @param {string} name\n * @param {string} [description]\n * @return {Argument} new argument\n */\n\n createArgument(name, description) {\n return new Argument(name, description);\n }\n\n /**\n * Define argument syntax for command.\n *\n * The default is that the argument is required, and you can explicitly\n * indicate this with <> around the name. Put [] around the name for an optional argument.\n *\n * @example\n * program.argument('<input-file>');\n * program.argument('[output-file]');\n *\n * @param {string} name\n * @param {string} [description]\n * @param {(Function|*)} [parseArg] - custom argument processing function or default value\n * @param {*} [defaultValue]\n * @return {Command} `this` command for chaining\n */\n argument(name, description, parseArg, defaultValue) {\n const argument = this.createArgument(name, description);\n if (typeof parseArg === 'function') {\n argument.default(defaultValue).argParser(parseArg);\n } else {\n argument.default(parseArg);\n }\n this.addArgument(argument);\n return this;\n }\n\n /**\n * Define argument syntax for command, adding multiple at once (without descriptions).\n *\n * See also .argument().\n *\n * @example\n * program.arguments('<cmd> [env]');\n *\n * @param {string} names\n * @return {Command} `this` command for chaining\n */\n\n arguments(names) {\n names\n .trim()\n .split(/ +/)\n .forEach((detail) => {\n this.argument(detail);\n });\n return this;\n }\n\n /**\n * Define argument syntax for command, adding a prepared argument.\n *\n * @param {Argument} argument\n * @return {Command} `this` command for chaining\n */\n addArgument(argument) {\n const previousArgument = this.registeredArguments.slice(-1)[0];\n if (previousArgument?.variadic) {\n throw new Error(\n `only the last argument can be variadic '${previousArgument.name()}'`,\n );\n }\n if (\n argument.required &&\n argument.defaultValue !== undefined &&\n argument.parseArg === undefined\n ) {\n throw new Error(\n `a default value for a required argument is never used: '${argument.name()}'`,\n );\n }\n this.registeredArguments.push(argument);\n return this;\n }\n\n /**\n * Customise or override default help command. By default a help command is automatically added if your command has subcommands.\n *\n * @example\n * program.helpCommand('help [cmd]');\n * program.helpCommand('help [cmd]', 'show help');\n * program.helpCommand(false); // suppress default help command\n * program.helpCommand(true); // add help command even if no subcommands\n *\n * @param {string|boolean} enableOrNameAndArgs - enable with custom name and/or arguments, or boolean to override whether added\n * @param {string} [description] - custom description\n * @return {Command} `this` command for chaining\n */\n\n helpCommand(enableOrNameAndArgs, description) {\n if (typeof enableOrNameAndArgs === 'boolean') {\n this._addImplicitHelpCommand = enableOrNameAndArgs;\n if (enableOrNameAndArgs && this._defaultCommandGroup) {\n // make the command to store the group\n this._initCommandGroup(this._getHelpCommand());\n }\n return this;\n }\n\n const nameAndArgs = enableOrNameAndArgs ?? 'help [command]';\n const [, helpName, helpArgs] = nameAndArgs.match(/([^ ]+) *(.*)/);\n const helpDescription = description ?? 'display help for command';\n\n const helpCommand = this.createCommand(helpName);\n helpCommand.helpOption(false);\n if (helpArgs) helpCommand.arguments(helpArgs);\n if (helpDescription) helpCommand.description(helpDescription);\n\n this._addImplicitHelpCommand = true;\n this._helpCommand = helpCommand;\n // init group unless lazy create\n if (enableOrNameAndArgs || description) this._initCommandGroup(helpCommand);\n\n return this;\n }\n\n /**\n * Add prepared custom help command.\n *\n * @param {(Command|string|boolean)} helpCommand - custom help command, or deprecated enableOrNameAndArgs as for `.helpCommand()`\n * @param {string} [deprecatedDescription] - deprecated custom description used with custom name only\n * @return {Command} `this` command for chaining\n */\n addHelpCommand(helpCommand, deprecatedDescription) {\n // If not passed an object, call through to helpCommand for backwards compatibility,\n // as addHelpCommand was originally used like helpCommand is now.\n if (typeof helpCommand !== 'object') {\n this.helpCommand(helpCommand, deprecatedDescription);\n return this;\n }\n\n this._addImplicitHelpCommand = true;\n this._helpCommand = helpCommand;\n this._initCommandGroup(helpCommand);\n return this;\n }\n\n /**\n * Lazy create help command.\n *\n * @return {(Command|null)}\n * @package\n */\n _getHelpCommand() {\n const hasImplicitHelpCommand =\n this._addImplicitHelpCommand ??\n (this.commands.length &&\n !this._actionHandler &&\n !this._findCommand('help'));\n\n if (hasImplicitHelpCommand) {\n if (this._helpCommand === undefined) {\n this.helpCommand(undefined, undefined); // use default name and description\n }\n return this._helpCommand;\n }\n return null;\n }\n\n /**\n * Add hook for life cycle event.\n *\n * @param {string} event\n * @param {Function} listener\n * @return {Command} `this` command for chaining\n */\n\n hook(event, listener) {\n const allowedValues = ['preSubcommand', 'preAction', 'postAction'];\n if (!allowedValues.includes(event)) {\n throw new Error(`Unexpected value for event passed to hook : '${event}'.\nExpecting one of '${allowedValues.join(\"', '\")}'`);\n }\n if (this._lifeCycleHooks[event]) {\n this._lifeCycleHooks[event].push(listener);\n } else {\n this._lifeCycleHooks[event] = [listener];\n }\n return this;\n }\n\n /**\n * Register callback to use as replacement for calling process.exit.\n *\n * @param {Function} [fn] optional callback which will be passed a CommanderError, defaults to throwing\n * @return {Command} `this` command for chaining\n */\n\n exitOverride(fn) {\n if (fn) {\n this._exitCallback = fn;\n } else {\n this._exitCallback = (err) => {\n if (err.code !== 'commander.executeSubCommandAsync') {\n throw err;\n } else {\n // Async callback from spawn events, not useful to throw.\n }\n };\n }\n return this;\n }\n\n /**\n * Call process.exit, and _exitCallback if defined.\n *\n * @param {number} exitCode exit code for using with process.exit\n * @param {string} code an id string representing the error\n * @param {string} message human-readable description of the error\n * @return never\n * @private\n */\n\n _exit(exitCode, code, message) {\n if (this._exitCallback) {\n this._exitCallback(new CommanderError(exitCode, code, message));\n // Expecting this line is not reached.\n }\n process.exit(exitCode);\n }\n\n /**\n * Register callback `fn` for the command.\n *\n * @example\n * program\n * .command('serve')\n * .description('start service')\n * .action(function() {\n * // do work here\n * });\n *\n * @param {Function} fn\n * @return {Command} `this` command for chaining\n */\n\n action(fn) {\n const listener = (args) => {\n // The .action callback takes an extra parameter which is the command or options.\n const expectedArgsCount = this.registeredArguments.length;\n const actionArgs = args.slice(0, expectedArgsCount);\n if (this._storeOptionsAsProperties) {\n actionArgs[expectedArgsCount] = this; // backwards compatible \"options\"\n } else {\n actionArgs[expectedArgsCount] = this.opts();\n }\n actionArgs.push(this);\n\n return fn.apply(this, actionArgs);\n };\n this._actionHandler = listener;\n return this;\n }\n\n /**\n * Factory routine to create a new unattached option.\n *\n * See .option() for creating an attached option, which uses this routine to\n * create the option. You can override createOption to return a custom option.\n *\n * @param {string} flags\n * @param {string} [description]\n * @return {Option} new option\n */\n\n createOption(flags, description) {\n return new Option(flags, description);\n }\n\n /**\n * Wrap parseArgs to catch 'commander.invalidArgument'.\n *\n * @param {(Option | Argument)} target\n * @param {string} value\n * @param {*} previous\n * @param {string} invalidArgumentMessage\n * @private\n */\n\n _callParseArg(target, value, previous, invalidArgumentMessage) {\n try {\n return target.parseArg(value, previous);\n } catch (err) {\n if (err.code === 'commander.invalidArgument') {\n const message = `${invalidArgumentMessage} ${err.message}`;\n this.error(message, { exitCode: err.exitCode, code: err.code });\n }\n throw err;\n }\n }\n\n /**\n * Check for option flag conflicts.\n * Register option if no conflicts found, or throw on conflict.\n *\n * @param {Option} option\n * @private\n */\n\n _registerOption(option) {\n const matchingOption =\n (option.short && this._findOption(option.short)) ||\n (option.long && this._findOption(option.long));\n if (matchingOption) {\n const matchingFlag =\n option.long && this._findOption(option.long)\n ? option.long\n : option.short;\n throw new Error(`Cannot add option '${option.flags}'${this._name && ` to command '${this._name}'`} due to conflicting flag '${matchingFlag}'\n- already used by option '${matchingOption.flags}'`);\n }\n\n this._initOptionGroup(option);\n this.options.push(option);\n }\n\n /**\n * Check for command name and alias conflicts with existing commands.\n * Register command if no conflicts found, or throw on conflict.\n *\n * @param {Command} command\n * @private\n */\n\n _registerCommand(command) {\n const knownBy = (cmd) => {\n return [cmd.name()].concat(cmd.aliases());\n };\n\n const alreadyUsed = knownBy(command).find((name) =>\n this._findCommand(name),\n );\n if (alreadyUsed) {\n const existingCmd = knownBy(this._findCommand(alreadyUsed)).join('|');\n const newCmd = knownBy(command).join('|');\n throw new Error(\n `cannot add command '${newCmd}' as already have command '${existingCmd}'`,\n );\n }\n\n this._initCommandGroup(command);\n this.commands.push(command);\n }\n\n /**\n * Add an option.\n *\n * @param {Option} option\n * @return {Command} `this` command for chaining\n */\n addOption(option) {\n this._registerOption(option);\n\n const oname = option.name();\n const name = option.attributeName();\n\n // store default value\n if (option.negate) {\n // --no-foo is special and defaults foo to true, unless a --foo option is already defined\n const positiveLongFlag = option.long.replace(/^--no-/, '--');\n if (!this._findOption(positiveLongFlag)) {\n this.setOptionValueWithSource(\n name,\n option.defaultValue === undefined ? true : option.defaultValue,\n 'default',\n );\n }\n } else if (option.defaultValue !== undefined) {\n this.setOptionValueWithSource(name, option.defaultValue, 'default');\n }\n\n // handler for cli and env supplied values\n const handleOptionValue = (val, invalidValueMessage, valueSource) => {\n // val is null for optional option used without an optional-argument.\n // val is undefined for boolean and negated option.\n if (val == null && option.presetArg !== undefined) {\n val = option.presetArg;\n }\n\n // custom processing\n const oldValue = this.getOptionValue(name);\n if (val !== null && option.parseArg) {\n val = this._callParseArg(option, val, oldValue, invalidValueMessage);\n } else if (val !== null && option.variadic) {\n val = option._collectValue(val, oldValue);\n }\n\n // Fill-in appropriate missing values. Long winded but easy to follow.\n if (val == null) {\n if (option.negate) {\n val = false;\n } else if (option.isBoolean() || option.optional) {\n val = true;\n } else {\n val = ''; // not normal, parseArg might have failed or be a mock function for testing\n }\n }\n this.setOptionValueWithSource(name, val, valueSource);\n };\n\n this.on('option:' + oname, (val) => {\n const invalidValueMessage = `error: option '${option.flags}' argument '${val}' is invalid.`;\n handleOptionValue(val, invalidValueMessage, 'cli');\n });\n\n if (option.envVar) {\n this.on('optionEnv:' + oname, (val) => {\n const invalidValueMessage = `error: option '${option.flags}' value '${val}' from env '${option.envVar}' is invalid.`;\n handleOptionValue(val, invalidValueMessage, 'env');\n });\n }\n\n return this;\n }\n\n /**\n * Internal implementation shared by .option() and .requiredOption()\n *\n * @return {Command} `this` command for chaining\n * @private\n */\n _optionEx(config, flags, description, fn, defaultValue) {\n if (typeof flags === 'object' && flags instanceof Option) {\n throw new Error(\n 'To add an Option object use addOption() instead of option() or requiredOption()',\n );\n }\n const option = this.createOption(flags, description);\n option.makeOptionMandatory(!!config.mandatory);\n if (typeof fn === 'function') {\n option.default(defaultValue).argParser(fn);\n } else if (fn instanceof RegExp) {\n // deprecated\n const regex = fn;\n fn = (val, def) => {\n const m = regex.exec(val);\n return m ? m[0] : def;\n };\n option.default(defaultValue).argParser(fn);\n } else {\n option.default(fn);\n }\n\n return this.addOption(option);\n }\n\n /**\n * Define option with `flags`, `description`, and optional argument parsing function or `defaultValue` or both.\n *\n * The `flags` string contains the short and/or long flags, separated by comma, a pipe or space. A required\n * option-argument is indicated by `<>` and an optional option-argument by `[]`.\n *\n * See the README for more details, and see also addOption() and requiredOption().\n *\n * @example\n * program\n * .option('-p, --pepper', 'add pepper')\n * .option('--pt, --pizza-type <TYPE>', 'type of pizza') // required option-argument\n * .option('-c, --cheese [CHEESE]', 'add extra cheese', 'mozzarella') // optional option-argument with default\n * .option('-t, --tip <VALUE>', 'add tip to purchase cost', parseFloat) // custom parse function\n *\n * @param {string} flags\n * @param {string} [description]\n * @param {(Function|*)} [parseArg] - custom option processing function or default value\n * @param {*} [defaultValue]\n * @return {Command} `this` command for chaining\n */\n\n option(flags, description, parseArg, defaultValue) {\n return this._optionEx({}, flags, description, parseArg, defaultValue);\n }\n\n /**\n * Add a required option which must have a value after parsing. This usually means\n * the option must be specified on the command line. (Otherwise the same as .option().)\n *\n * The `flags` string contains the short and/or long flags, separated by comma, a pipe or space.\n *\n * @param {string} flags\n * @param {string} [description]\n * @param {(Function|*)} [parseArg] - custom option processing function or default value\n * @param {*} [defaultValue]\n * @return {Command} `this` command for chaining\n */\n\n requiredOption(flags, description, parseArg, defaultValue) {\n return this._optionEx(\n { mandatory: true },\n flags,\n description,\n parseArg,\n defaultValue,\n );\n }\n\n /**\n * Alter parsing of short flags with optional values.\n *\n * @example\n * // for `.option('-f,--flag [value]'):\n * program.combineFlagAndOptionalValue(true); // `-f80` is treated like `--flag=80`, this is the default behaviour\n * program.combineFlagAndOptionalValue(false) // `-fb` is treated like `-f -b`\n *\n * @param {boolean} [combine] - if `true` or omitted, an optional value can be specified directly after the flag.\n * @return {Command} `this` command for chaining\n */\n combineFlagAndOptionalValue(combine = true) {\n this._combineFlagAndOptionalValue = !!combine;\n return this;\n }\n\n /**\n * Allow unknown options on the command line.\n *\n * @param {boolean} [allowUnknown] - if `true` or omitted, no error will be thrown for unknown options.\n * @return {Command} `this` command for chaining\n */\n allowUnknownOption(allowUnknown = true) {\n this._allowUnknownOption = !!allowUnknown;\n return this;\n }\n\n /**\n * Allow excess command-arguments on the command line. Pass false to make excess arguments an error.\n *\n * @param {boolean} [allowExcess] - if `true` or omitted, no error will be thrown for excess arguments.\n * @return {Command} `this` command for chaining\n */\n allowExcessArguments(allowExcess = true) {\n this._allowExcessArguments = !!allowExcess;\n return this;\n }\n\n /**\n * Enable positional options. Positional means global options are specified before subcommands which lets\n * subcommands reuse the same option names, and also enables subcommands to turn on passThroughOptions.\n * The default behaviour is non-positional and global options may appear anywhere on the command line.\n *\n * @param {boolean} [positional]\n * @return {Command} `this` command for chaining\n */\n enablePositionalOptions(positional = true) {\n this._enablePositionalOptions = !!positional;\n return this;\n }\n\n /**\n * Pass through options that come after command-arguments rather than treat them as command-options,\n * so actual command-options come before command-arguments. Turning this on for a subcommand requires\n * positional options to have been enabled on the program (parent commands).\n * The default behaviour is non-positional and options may appear before or after command-arguments.\n *\n * @param {boolean} [passThrough] for unknown options.\n * @return {Command} `this` command for chaining\n */\n passThroughOptions(passThrough = true) {\n this._passThroughOptions = !!passThrough;\n this._checkForBrokenPassThrough();\n return this;\n }\n\n /**\n * @private\n */\n\n _checkForBrokenPassThrough() {\n if (\n this.parent &&\n this._passThroughOptions &&\n !this.parent._enablePositionalOptions\n ) {\n throw new Error(\n `passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`,\n );\n }\n }\n\n /**\n * Whether to store option values as properties on command object,\n * or store separately (specify false). In both cases the option values can be accessed using .opts().\n *\n * @param {boolean} [storeAsProperties=true]\n * @return {Command} `this` command for chaining\n */\n\n storeOptionsAsProperties(storeAsProperties = true) {\n if (this.options.length) {\n throw new Error('call .storeOptionsAsProperties() before adding options');\n }\n if (Object.keys(this._optionValues).length) {\n throw new Error(\n 'call .storeOptionsAsProperties() before setting option values',\n );\n }\n this._storeOptionsAsProperties = !!storeAsProperties;\n return this;\n }\n\n /**\n * Retrieve option value.\n *\n * @param {string} key\n * @return {object} value\n */\n\n getOptionValue(key) {\n if (this._storeOptionsAsProperties) {\n return this[key];\n }\n return this._optionValues[key];\n }\n\n /**\n * Store option value.\n *\n * @param {string} key\n * @param {object} value\n * @return {Command} `this` command for chaining\n */\n\n setOptionValue(key, value) {\n return this.setOptionValueWithSource(key, value, undefined);\n }\n\n /**\n * Store option value and where the value came from.\n *\n * @param {string} key\n * @param {object} value\n * @param {string} source - expected values are default/config/env/cli/implied\n * @return {Command} `this` command for chaining\n */\n\n setOptionValueWithSource(key, value, source) {\n if (this._storeOptionsAsProperties) {\n this[key] = value;\n } else {\n this._optionValues[key] = value;\n }\n this._optionValueSources[key] = source;\n return this;\n }\n\n /**\n * Get source of option value.\n * Expected values are default | config | env | cli | implied\n *\n * @param {string} key\n * @return {string}\n */\n\n getOptionValueSource(key) {\n return this._optionValueSources[key];\n }\n\n /**\n * Get source of option value. See also .optsWithGlobals().\n * Expected values are default | config | env | cli | implied\n *\n * @param {string} key\n * @return {string}\n */\n\n getOptionValueSourceWithGlobals(key) {\n // global overwrites local, like optsWithGlobals\n let source;\n this._getCommandAndAncestors().forEach((cmd) => {\n if (cmd.getOptionValueSource(key) !== undefined) {\n source = cmd.getOptionValueSource(key);\n }\n });\n return source;\n }\n\n /**\n * Get user arguments from implied or explicit arguments.\n * Side-effects: set _scriptPath if args included script. Used for default program name, and subcommand searches.\n *\n * @private\n */\n\n _prepareUserArgs(argv, parseOptions) {\n if (argv !== undefined && !Array.isArray(argv)) {\n throw new Error('first parameter to parse must be array or undefined');\n }\n parseOptions = parseOptions || {};\n\n // auto-detect argument conventions if nothing supplied\n if (argv === undefined && parseOptions.from === undefined) {\n if (process.versions?.electron) {\n parseOptions.from = 'electron';\n }\n // check node specific options for scenarios where user CLI args follow executable without scriptname\n const execArgv = process.execArgv ?? [];\n if (\n execArgv.includes('-e') ||\n execArgv.includes('--eval') ||\n execArgv.includes('-p') ||\n execArgv.includes('--print')\n ) {\n parseOptions.from = 'eval'; // internal usage, not documented\n }\n }\n\n // default to using process.argv\n if (argv === undefined) {\n argv = process.argv;\n }\n this.rawArgs = argv.slice();\n\n // extract the user args and scriptPath\n let userArgs;\n switch (parseOptions.from) {\n case undefined:\n case 'node':\n this._scriptPath = argv[1];\n userArgs = argv.slice(2);\n break;\n case 'electron':\n // @ts-ignore: because defaultApp is an unknown property\n if (process.defaultApp) {\n this._scriptPath = argv[1];\n userArgs = argv.slice(2);\n } else {\n userArgs = argv.slice(1);\n }\n break;\n case 'user':\n userArgs = argv.slice(0);\n break;\n case 'eval':\n userArgs = argv.slice(1);\n break;\n default:\n throw new Error(\n `unexpected parse option { from: '${parseOptions.from}' }`,\n );\n }\n\n // Find default name for program from arguments.\n if (!this._name && this._scriptPath)\n this.nameFromFilename(this._scriptPath);\n this._name = this._name || 'program';\n\n return userArgs;\n }\n\n /**\n * Parse `argv`, setting options and invoking commands when defined.\n *\n * Use parseAsync instead of parse if any of your action handlers are async.\n *\n * Call with no parameters to parse `process.argv`. Detects Electron and special node options like `node --eval`. Easy mode!\n *\n * Or call with an array of strings to parse, and optionally where the user arguments start by specifying where the arguments are `from`:\n * - `'node'`: default, `argv[0]` is the application and `argv[1]` is the script being run, with user arguments after that\n * - `'electron'`: `argv[0]` is the application and `argv[1]` varies depending on whether the electron application is packaged\n * - `'user'`: just user arguments\n *\n * @example\n * program.parse(); // parse process.argv and auto-detect electron and special node flags\n * program.parse(process.argv); // assume argv[0] is app and argv[1] is script\n * program.parse(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]\n *\n * @param {string[]} [argv] - optional, defaults to process.argv\n * @param {object} [parseOptions] - optionally specify style of options with from: node/user/electron\n * @param {string} [parseOptions.from] - where the args are from: 'node', 'user', 'electron'\n * @return {Command} `this` command for chaining\n */\n\n parse(argv, parseOptions) {\n this._prepareForParse();\n const userArgs = this._prepareUserArgs(argv, parseOptions);\n this._parseCommand([], userArgs);\n\n return this;\n }\n\n /**\n * Parse `argv`, setting options and invoking commands when defined.\n *\n * Call with no parameters to parse `process.argv`. Detects Electron and special node options like `node --eval`. Easy mode!\n *\n * Or call with an array of strings to parse, and optionally where the user arguments start by specifying where the arguments are `from`:\n * - `'node'`: default, `argv[0]` is the application and `argv[1]` is the script being run, with user arguments after that\n * - `'electron'`: `argv[0]` is the application and `argv[1]` varies depending on whether the electron application is packaged\n * - `'user'`: just user arguments\n *\n * @example\n * await program.parseAsync(); // parse process.argv and auto-detect electron and special node flags\n * await program.parseAsync(process.argv); // assume argv[0] is app and argv[1] is script\n * await program.parseAsync(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]\n *\n * @param {string[]} [argv]\n * @param {object} [parseOptions]\n * @param {string} parseOptions.from - where the args are from: 'node', 'user', 'electron'\n * @return {Promise}\n */\n\n async parseAsync(argv, parseOptions) {\n this._prepareForParse();\n const userArgs = this._prepareUserArgs(argv, parseOptions);\n await this._parseCommand([], userArgs);\n\n return this;\n }\n\n _prepareForParse() {\n if (this._savedState === null) {\n this.saveStateBeforeParse();\n } else {\n this.restoreStateBeforeParse();\n }\n }\n\n /**\n * Called the first time parse is called to save state and allow a restore before subsequent calls to parse.\n * Not usually called directly, but available for subclasses to save their custom state.\n *\n * This is called in a lazy way. Only commands used in parsing chain will have state saved.\n */\n saveStateBeforeParse() {\n this._savedState = {\n // name is stable if supplied by author, but may be unspecified for root command and deduced during parsing\n _name: this._name,\n // option values before parse have default values (including false for negated options)\n // shallow clones\n _optionValues: { ...this._optionValues },\n _optionValueSources: { ...this._optionValueSources },\n };\n }\n\n /**\n * Restore state before parse for calls after the first.\n * Not usually called directly, but available for subclasses to save their custom state.\n *\n * This is called in a lazy way. Only commands used in parsing chain will have state restored.\n */\n restoreStateBeforeParse() {\n if (this._storeOptionsAsProperties)\n throw new Error(`Can not call parse again when storeOptionsAsProperties is true.\n- either make a new Command for each call to parse, or stop storing options as properties`);\n\n // clear state from _prepareUserArgs\n this._name = this._savedState._name;\n this._scriptPath = null;\n this.rawArgs = [];\n // clear state from setOptionValueWithSource\n this._optionValues = { ...this._savedState._optionValues };\n this._optionValueSources = { ...this._savedState._optionValueSources };\n // clear state from _parseCommand\n this.args = [];\n // clear state from _processArguments\n this.processedArgs = [];\n }\n\n /**\n * Throw if expected executable is missing. Add lots of help for author.\n *\n * @param {string} executableFile\n * @param {string} executableDir\n * @param {string} subcommandName\n */\n _checkForMissingExecutable(executableFile, executableDir, subcommandName) {\n if (fs.existsSync(executableFile)) return;\n\n const executableDirMessage = executableDir\n ? `searched for local subcommand relative to directory '${executableDir}'`\n : 'no directory for search for local subcommand, use .executableDir() to supply a custom directory';\n const executableMissing = `'${executableFile}' does not exist\n - if '${subcommandName}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ${executableDirMessage}`;\n throw new Error(executableMissing);\n }\n\n /**\n * Execute a sub-command executable.\n *\n * @private\n */\n\n _executeSubCommand(subcommand, args) {\n args = args.slice();\n let launchWithNode = false; // Use node for source targets so do not need to get permissions correct, and on Windows.\n const sourceExt = ['.js', '.ts', '.tsx', '.mjs', '.cjs'];\n\n function findFile(baseDir, baseName) {\n // Look for specified file\n const localBin = path.resolve(baseDir, baseName);\n if (fs.existsSync(localBin)) return localBin;\n\n // Stop looking if candidate already has an expected extension.\n if (sourceExt.includes(path.extname(baseName))) return undefined;\n\n // Try all the extensions.\n const foundExt = sourceExt.find((ext) =>\n fs.existsSync(`${localBin}${ext}`),\n );\n if (foundExt) return `${localBin}${foundExt}`;\n\n return undefined;\n }\n\n // Not checking for help first. Unlikely to have mandatory and executable, and can't robustly test for help flags in external command.\n this._checkForMissingMandatoryOptions();\n this._checkForConflictingOptions();\n\n // executableFile and executableDir might be full path, or just a name\n let executableFile =\n subcommand._executableFile || `${this._name}-${subcommand._name}`;\n let executableDir = this._executableDir || '';\n if (this._scriptPath) {\n let resolvedScriptPath; // resolve possible symlink for installed npm binary\n try {\n resolvedScriptPath = fs.realpathSync(this._scriptPath);\n } catch {\n resolvedScriptPath = this._scriptPath;\n }\n executableDir = path.resolve(\n path.dirname(resolvedScriptPath),\n executableDir,\n );\n }\n\n // Look for a local file in preference to a command in PATH.\n if (executableDir) {\n let localFile = findFile(executableDir, executableFile);\n\n // Legacy search using prefix of script name instead of command name\n if (!localFile && !subcommand._executableFile && this._scriptPath) {\n const legacyName = path.basename(\n this._scriptPath,\n path.extname(this._scriptPath),\n );\n if (legacyName !== this._name) {\n localFile = findFile(\n executableDir,\n `${legacyName}-${subcommand._name}`,\n );\n }\n }\n executableFile = localFile || executableFile;\n }\n\n launchWithNode = sourceExt.includes(path.extname(executableFile));\n\n let proc;\n if (process.platform !== 'win32') {\n if (launchWithNode) {\n args.unshift(executableFile);\n // add executable arguments to spawn\n args = incrementNodeInspectorPort(process.execArgv).concat(args);\n\n proc = childProcess.spawn(process.argv[0], args, { stdio: 'inherit' });\n } else {\n proc = childProcess.spawn(executableFile, args, { stdio: 'inherit' });\n }\n } else {\n this._checkForMissingExecutable(\n executableFile,\n executableDir,\n subcommand._name,\n );\n args.unshift(executableFile);\n // add executable arguments to spawn\n args = incrementNodeInspectorPort(process.execArgv).concat(args);\n proc = childProcess.spawn(process.execPath, args, { stdio: 'inherit' });\n }\n\n if (!proc.killed) {\n // testing mainly to avoid leak warnings during unit tests with mocked spawn\n const signals = ['SIGUSR1', 'SIGUSR2', 'SIGTERM', 'SIGINT', 'SIGHUP'];\n signals.forEach((signal) => {\n process.on(signal, () => {\n if (proc.killed === false && proc.exitCode === null) {\n // @ts-ignore because signals not typed to known strings\n proc.kill(signal);\n }\n });\n });\n }\n\n // By default terminate process when spawned process terminates.\n const exitCallback = this._exitCallback;\n proc.on('close', (code) => {\n code = code ?? 1; // code is null if spawned process terminated due to a signal\n if (!exitCallback) {\n process.exit(code);\n } else {\n exitCallback(\n new CommanderError(\n code,\n 'commander.executeSubCommandAsync',\n '(close)',\n ),\n );\n }\n });\n proc.on('error', (err) => {\n // @ts-ignore: because err.code is an unknown property\n if (err.code === 'ENOENT') {\n this._checkForMissingExecutable(\n executableFile,\n executableDir,\n subcommand._name,\n );\n // @ts-ignore: because err.code is an unknown property\n } else if (err.code === 'EACCES') {\n throw new Error(`'${executableFile}' not executable`);\n }\n if (!exitCallback) {\n process.exit(1);\n } else {\n const wrappedError = new CommanderError(\n 1,\n 'commander.executeSubCommandAsync',\n '(error)',\n );\n wrappedError.nestedError = err;\n exitCallback(wrappedError);\n }\n });\n\n // Store the reference to the child process\n this.runningCommand = proc;\n }\n\n /**\n * @private\n */\n\n _dispatchSubcommand(commandName, operands, unknown) {\n const subCommand = this._findCommand(commandName);\n if (!subCommand) this.help({ error: true });\n\n subCommand._prepareForParse();\n let promiseChain;\n promiseChain = this._chainOrCallSubCommandHook(\n promiseChain,\n subCommand,\n 'preSubcommand',\n );\n promiseChain = this._chainOrCall(promiseChain, () => {\n if (subCommand._executableHandler) {\n this._executeSubCommand(subCommand, operands.concat(unknown));\n } else {\n return subCommand._parseCommand(operands, unknown);\n }\n });\n return promiseChain;\n }\n\n /**\n * Invoke help directly if possible, or dispatch if necessary.\n * e.g. help foo\n *\n * @private\n */\n\n _dispatchHelpCommand(subcommandName) {\n if (!subcommandName) {\n this.help();\n }\n const subCommand = this._findCommand(subcommandName);\n if (subCommand && !subCommand._executableHandler) {\n subCommand.help();\n }\n\n // Fallback to parsing the help flag to invoke the help.\n return this._dispatchSubcommand(\n subcommandName,\n [],\n [this._getHelpOption()?.long ?? this._getHelpOption()?.short ?? '--help'],\n );\n }\n\n /**\n * Check this.args against expected this.registeredArguments.\n *\n * @private\n */\n\n _checkNumberOfArguments() {\n // too few\n this.registeredArguments.forEach((arg, i) => {\n if (arg.required && this.args[i] == null) {\n this.missingArgument(arg.name());\n }\n });\n // too many\n if (\n this.registeredArguments.length > 0 &&\n this.registeredArguments[this.registeredArguments.length - 1].variadic\n ) {\n return;\n }\n if (this.args.length > this.registeredArguments.length) {\n this._excessArguments(this.args);\n }\n }\n\n /**\n * Process this.args using this.registeredArguments and save as this.processedArgs!\n *\n * @private\n */\n\n _processArguments() {\n const myParseArg = (argument, value, previous) => {\n // Extra processing for nice error message on parsing failure.\n let parsedValue = value;\n if (value !== null && argument.parseArg) {\n const invalidValueMessage = `error: command-argument value '${value}' is invalid for argument '${argument.name()}'.`;\n parsedValue = this._callParseArg(\n argument,\n value,\n previous,\n invalidValueMessage,\n );\n }\n return parsedValue;\n };\n\n this._checkNumberOfArguments();\n\n const processedArgs = [];\n this.registeredArguments.forEach((declaredArg, index) => {\n let value = declaredArg.defaultValue;\n if (declaredArg.variadic) {\n // Collect together remaining arguments for passing together as an array.\n if (index < this.args.length) {\n value = this.args.slice(index);\n if (declaredArg.parseArg) {\n value = value.reduce((processed, v) => {\n return myParseArg(declaredArg, v, processed);\n }, declaredArg.defaultValue);\n }\n } else if (value === undefined) {\n value = [];\n }\n } else if (index < this.args.length) {\n value = this.args[index];\n if (declaredArg.parseArg) {\n value = myParseArg(declaredArg, value, declaredArg.defaultValue);\n }\n }\n processedArgs[index] = value;\n });\n this.processedArgs = processedArgs;\n }\n\n /**\n * Once we have a promise we chain, but call synchronously until then.\n *\n * @param {(Promise|undefined)} promise\n * @param {Function} fn\n * @return {(Promise|undefined)}\n * @private\n */\n\n _chainOrCall(promise, fn) {\n // thenable\n if (promise?.then && typeof promise.then === 'function') {\n // already have a promise, chain callback\n return promise.then(() => fn());\n }\n // callback might return a promise\n return fn();\n }\n\n /**\n *\n * @param {(Promise|undefined)} promise\n * @param {string} event\n * @return {(Promise|undefined)}\n * @private\n */\n\n _chainOrCallHooks(promise, event) {\n let result = promise;\n const hooks = [];\n this._getCommandAndAncestors()\n .reverse()\n .filter((cmd) => cmd._lifeCycleHooks[event] !== undefined)\n .forEach((hookedCommand) => {\n hookedCommand._lifeCycleHooks[event].forEach((callback) => {\n hooks.push({ hookedCommand, callback });\n });\n });\n if (event === 'postAction') {\n hooks.reverse();\n }\n\n hooks.forEach((hookDetail) => {\n result = this._chainOrCall(result, () => {\n return hookDetail.callback(hookDetail.hookedCommand, this);\n });\n });\n return result;\n }\n\n /**\n *\n * @param {(Promise|undefined)} promise\n * @param {Command} subCommand\n * @param {string} event\n * @return {(Promise|undefined)}\n * @private\n */\n\n _chainOrCallSubCommandHook(promise, subCommand, event) {\n let result = promise;\n if (this._lifeCycleHooks[event] !== undefined) {\n this._lifeCycleHooks[event].forEach((hook) => {\n result = this._chainOrCall(result, () => {\n return hook(this, subCommand);\n });\n });\n }\n return result;\n }\n\n /**\n * Process arguments in context of this command.\n * Returns action result, in case it is a promise.\n *\n * @private\n */\n\n _parseCommand(operands, unknown) {\n const parsed = this.parseOptions(unknown);\n this._parseOptionsEnv(); // after cli, so parseArg not called on both cli and env\n this._parseOptionsImplied();\n operands = operands.concat(parsed.operands);\n unknown = parsed.unknown;\n this.args = operands.concat(unknown);\n\n if (operands && this._findCommand(operands[0])) {\n return this._dispatchSubcommand(operands[0], operands.slice(1), unknown);\n }\n if (\n this._getHelpCommand() &&\n operands[0] === this._getHelpCommand().name()\n ) {\n return this._dispatchHelpCommand(operands[1]);\n }\n if (this._defaultCommandName) {\n this._outputHelpIfRequested(unknown); // Run the help for default command from parent rather than passing to default command\n return this._dispatchSubcommand(\n this._defaultCommandName,\n operands,\n unknown,\n );\n }\n if (\n this.commands.length &&\n this.args.length === 0 &&\n !this._actionHandler &&\n !this._defaultCommandName\n ) {\n // probably missing subcommand and no handler, user needs help (and exit)\n this.help({ error: true });\n }\n\n this._outputHelpIfRequested(parsed.unknown);\n this._checkForMissingMandatoryOptions();\n this._checkForConflictingOptions();\n\n // We do not always call this check to avoid masking a \"better\" error, like unknown command.\n const checkForUnknownOptions = () => {\n if (parsed.unknown.length > 0) {\n this.unknownOption(parsed.unknown[0]);\n }\n };\n\n const commandEvent = `command:${this.name()}`;\n if (this._actionHandler) {\n checkForUnknownOptions();\n this._processArguments();\n\n let promiseChain;\n promiseChain = this._chainOrCallHooks(promiseChain, 'preAction');\n promiseChain = this._chainOrCall(promiseChain, () =>\n this._actionHandler(this.processedArgs),\n );\n if (this.parent) {\n promiseChain = this._chainOrCall(promiseChain, () => {\n this.parent.emit(commandEvent, operands, unknown); // legacy\n });\n }\n promiseChain = this._chainOrCallHooks(promiseChain, 'postAction');\n return promiseChain;\n }\n if (this.parent?.listenerCount(commandEvent)) {\n checkForUnknownOptions();\n this._processArguments();\n this.parent.emit(commandEvent, operands, unknown); // legacy\n } else if (operands.length) {\n if (this._findCommand('*')) {\n // legacy default command\n return this._dispatchSubcommand('*', operands, unknown);\n }\n if (this.listenerCount('command:*')) {\n // skip option check, emit event for possible misspelling suggestion\n this.emit('command:*', operands, unknown);\n } else if (this.commands.length) {\n this.unknownCommand();\n } else {\n checkForUnknownOptions();\n this._processArguments();\n }\n } else if (this.commands.length) {\n checkForUnknownOptions();\n // This command has subcommands and nothing hooked up at this level, so display help (and exit).\n this.help({ error: true });\n } else {\n checkForUnknownOptions();\n this._processArguments();\n // fall through for caller to handle after calling .parse()\n }\n }\n\n /**\n * Find matching command.\n *\n * @private\n * @return {Command | undefined}\n */\n _findCommand(name) {\n if (!name) return undefined;\n return this.commands.find(\n (cmd) => cmd._name === name || cmd._aliases.includes(name),\n );\n }\n\n /**\n * Return an option matching `arg` if any.\n *\n * @param {string} arg\n * @return {Option}\n * @package\n */\n\n _findOption(arg) {\n return this.options.find((option) => option.is(arg));\n }\n\n /**\n * Display an error message if a mandatory option does not have a value.\n * Called after checking for help flags in leaf subcommand.\n *\n * @private\n */\n\n _checkForMissingMandatoryOptions() {\n // Walk up hierarchy so can call in subcommand after checking for displaying help.\n this._getCommandAndAncestors().forEach((cmd) => {\n cmd.options.forEach((anOption) => {\n if (\n anOption.mandatory &&\n cmd.getOptionValue(anOption.attributeName()) === undefined\n ) {\n cmd.missingMandatoryOptionValue(anOption);\n }\n });\n });\n }\n\n /**\n * Display an error message if conflicting options are used together in this.\n *\n * @private\n */\n _checkForConflictingLocalOptions() {\n const definedNonDefaultOptions = this.options.filter((option) => {\n const optionKey = option.attributeName();\n if (this.getOptionValue(optionKey) === undefined) {\n return false;\n }\n return this.getOptionValueSource(optionKey) !== 'default';\n });\n\n const optionsWithConflicting = definedNonDefaultOptions.filter(\n (option) => option.conflictsWith.length > 0,\n );\n\n optionsWithConflicting.forEach((option) => {\n const conflictingAndDefined = definedNonDefaultOptions.find((defined) =>\n option.conflictsWith.includes(defined.attributeName()),\n );\n if (conflictingAndDefined) {\n this._conflictingOption(option, conflictingAndDefined);\n }\n });\n }\n\n /**\n * Display an error message if conflicting options are used together.\n * Called after checking for help flags in leaf subcommand.\n *\n * @private\n */\n _checkForConflictingOptions() {\n // Walk up hierarchy so can call in subcommand after checking for displaying help.\n this._getCommandAndAncestors().forEach((cmd) => {\n cmd._checkForConflictingLocalOptions();\n });\n }\n\n /**\n * Parse options from `argv` removing known options,\n * and return argv split into operands and unknown arguments.\n *\n * Side effects: modifies command by storing options. Does not reset state if called again.\n *\n * Examples:\n *\n * argv => operands, unknown\n * --known kkk op => [op], []\n * op --known kkk => [op], []\n * sub --unknown uuu op => [sub], [--unknown uuu op]\n * sub -- --unknown uuu op => [sub --unknown uuu op], []\n *\n * @param {string[]} args\n * @return {{operands: string[], unknown: string[]}}\n */\n\n parseOptions(args) {\n const operands = []; // operands, not options or values\n const unknown = []; // first unknown option and remaining unknown args\n let dest = operands;\n\n function maybeOption(arg) {\n return arg.length > 1 && arg[0] === '-';\n }\n\n const negativeNumberArg = (arg) => {\n // return false if not a negative number\n if (!/^-\\d*\\.?\\d+(e[+-]?\\d+)?$/.test(arg)) return false;\n // negative number is ok unless digit used as an option in command hierarchy\n return !this._getCommandAndAncestors().some((cmd) =>\n cmd.options\n .map((opt) => opt.short)\n .some((short) => /^-\\d$/.test(short)),\n );\n };\n\n // parse options\n let activeVariadicOption = null;\n let activeGroup = null; // working through group of short options, like -abc\n let i = 0;\n while (i < args.length || activeGroup) {\n const arg = activeGroup ?? args[i++];\n activeGroup = null;\n\n // literal\n if (arg === '--') {\n if (dest === unknown) dest.push(arg);\n dest.push(...args.slice(i));\n break;\n }\n\n if (\n activeVariadicOption &&\n (!maybeOption(arg) || negativeNumberArg(arg))\n ) {\n this.emit(`option:${activeVariadicOption.name()}`, arg);\n continue;\n }\n activeVariadicOption = null;\n\n if (maybeOption(arg)) {\n const option = this._findOption(arg);\n // recognised option, call listener to assign value with possible custom processing\n if (option) {\n if (option.required) {\n const value = args[i++];\n if (value === undefined) this.optionMissingArgument(option);\n this.emit(`option:${option.name()}`, value);\n } else if (option.optional) {\n let value = null;\n // historical behaviour is optional value is following arg unless an option\n if (\n i < args.length &&\n (!maybeOption(args[i]) || negativeNumberArg(args[i]))\n ) {\n value = args[i++];\n }\n this.emit(`option:${option.name()}`, value);\n } else {\n // boolean flag\n this.emit(`option:${option.name()}`);\n }\n activeVariadicOption = option.variadic ? option : null;\n continue;\n }\n }\n\n // Look for combo options following single dash, eat first one if known.\n if (arg.length > 2 && arg[0] === '-' && arg[1] !== '-') {\n const option = this._findOption(`-${arg[1]}`);\n if (option) {\n if (\n option.required ||\n (option.optional && this._combineFlagAndOptionalValue)\n ) {\n // option with value following in same argument\n this.emit(`option:${option.name()}`, arg.slice(2));\n } else {\n // boolean option\n this.emit(`option:${option.name()}`);\n // remove the processed option and keep processing group\n activeGroup = `-${arg.slice(2)}`;\n }\n continue;\n }\n }\n\n // Look for known long flag with value, like --foo=bar\n if (/^--[^=]+=/.test(arg)) {\n const index = arg.indexOf('=');\n const option = this._findOption(arg.slice(0, index));\n if (option && (option.required || option.optional)) {\n this.emit(`option:${option.name()}`, arg.slice(index + 1));\n continue;\n }\n }\n\n // Not a recognised option by this command.\n // Might be a command-argument, or subcommand option, or unknown option, or help command or option.\n\n // An unknown option means further arguments also classified as unknown so can be reprocessed by subcommands.\n // A negative number in a leaf command is not an unknown option.\n if (\n dest === operands &&\n maybeOption(arg) &&\n !(this.commands.length === 0 && negativeNumberArg(arg))\n ) {\n dest = unknown;\n }\n\n // If using positionalOptions, stop processing our options at subcommand.\n if (\n (this._enablePositionalOptions || this._passThroughOptions) &&\n operands.length === 0 &&\n unknown.length === 0\n ) {\n if (this._findCommand(arg)) {\n operands.push(arg);\n unknown.push(...args.slice(i));\n break;\n } else if (\n this._getHelpCommand() &&\n arg === this._getHelpCommand().name()\n ) {\n operands.push(arg, ...args.slice(i));\n break;\n } else if (this._defaultCommandName) {\n unknown.push(arg, ...args.slice(i));\n break;\n }\n }\n\n // If using passThroughOptions, stop processing options at first command-argument.\n if (this._passThroughOptions) {\n dest.push(arg, ...args.slice(i));\n break;\n }\n\n // add arg\n dest.push(arg);\n }\n\n return { operands, unknown };\n }\n\n /**\n * Return an object containing local option values as key-value pairs.\n *\n * @return {object}\n */\n opts() {\n if (this._storeOptionsAsProperties) {\n // Preserve original behaviour so backwards compatible when still using properties\n const result = {};\n const len = this.options.length;\n\n for (let i = 0; i < len; i++) {\n const key = this.options[i].attributeName();\n result[key] =\n key === this._versionOptionName ? this._version : this[key];\n }\n return result;\n }\n\n return this._optionValues;\n }\n\n /**\n * Return an object containing merged local and global option values as key-value pairs.\n *\n * @return {object}\n */\n optsWithGlobals() {\n // globals overwrite locals\n return this._getCommandAndAncestors().reduce(\n (combinedOptions, cmd) => Object.assign(combinedOptions, cmd.opts()),\n {},\n );\n }\n\n /**\n * Display error message and exit (or call exitOverride).\n *\n * @param {string} message\n * @param {object} [errorOptions]\n * @param {string} [errorOptions.code] - an id string representing the error\n * @param {number} [errorOptions.exitCode] - used with process.exit\n */\n error(message, errorOptions) {\n // output handling\n this._outputConfiguration.outputError(\n `${message}\\n`,\n this._outputConfiguration.writeErr,\n );\n if (typeof this._showHelpAfterError === 'string') {\n this._outputConfiguration.writeErr(`${this._showHelpAfterError}\\n`);\n } else if (this._showHelpAfterError) {\n this._outputConfiguration.writeErr('\\n');\n this.outputHelp({ error: true });\n }\n\n // exit handling\n const config = errorOptions || {};\n const exitCode = config.exitCode || 1;\n const code = config.code || 'commander.error';\n this._exit(exitCode, code, message);\n }\n\n /**\n * Apply any option related environment variables, if option does\n * not have a value from cli or client code.\n *\n * @private\n */\n _parseOptionsEnv() {\n this.options.forEach((option) => {\n if (option.envVar && option.envVar in process.env) {\n const optionKey = option.attributeName();\n // Priority check. Do not overwrite cli or options from unknown source (client-code).\n if (\n this.getOptionValue(optionKey) === undefined ||\n ['default', 'config', 'env'].includes(\n this.getOptionValueSource(optionKey),\n )\n ) {\n if (option.required || option.optional) {\n // option can take a value\n // keep very simple, optional always takes value\n this.emit(`optionEnv:${option.name()}`, process.env[option.envVar]);\n } else {\n // boolean\n // keep very simple, only care that envVar defined and not the value\n this.emit(`optionEnv:${option.name()}`);\n }\n }\n }\n });\n }\n\n /**\n * Apply any implied option values, if option is undefined or default value.\n *\n * @private\n */\n _parseOptionsImplied() {\n const dualHelper = new DualOptions(this.options);\n const hasCustomOptionValue = (optionKey) => {\n return (\n this.getOptionValue(optionKey) !== undefined &&\n !['default', 'implied'].includes(this.getOptionValueSource(optionKey))\n );\n };\n this.options\n .filter(\n (option) =>\n option.implied !== undefined &&\n hasCustomOptionValue(option.attributeName()) &&\n dualHelper.valueFromOption(\n this.getOptionValue(option.attributeName()),\n option,\n ),\n )\n .forEach((option) => {\n Object.keys(option.implied)\n .filter((impliedKey) => !hasCustomOptionValue(impliedKey))\n .forEach((impliedKey) => {\n this.setOptionValueWithSource(\n impliedKey,\n option.implied[impliedKey],\n 'implied',\n );\n });\n });\n }\n\n /**\n * Argument `name` is missing.\n *\n * @param {string} name\n * @private\n */\n\n missingArgument(name) {\n const message = `error: missing required argument '${name}'`;\n this.error(message, { code: 'commander.missingArgument' });\n }\n\n /**\n * `Option` is missing an argument.\n *\n * @param {Option} option\n * @private\n */\n\n optionMissingArgument(option) {\n const message = `error: option '${option.flags}' argument missing`;\n this.error(message, { code: 'commander.optionMissingArgument' });\n }\n\n /**\n * `Option` does not have a value, and is a mandatory option.\n *\n * @param {Option} option\n * @private\n */\n\n missingMandatoryOptionValue(option) {\n const message = `error: required option '${option.flags}' not specified`;\n this.error(message, { code: 'commander.missingMandatoryOptionValue' });\n }\n\n /**\n * `Option` conflicts with another option.\n *\n * @param {Option} option\n * @param {Option} conflictingOption\n * @private\n */\n _conflictingOption(option, conflictingOption) {\n // The calling code does not know whether a negated option is the source of the\n // value, so do some work to take an educated guess.\n const findBestOptionFromValue = (option) => {\n const optionKey = option.attributeName();\n const optionValue = this.getOptionValue(optionKey);\n const negativeOption = this.options.find(\n (target) => target.negate && optionKey === target.attributeName(),\n );\n const positiveOption = this.options.find(\n (target) => !target.negate && optionKey === target.attributeName(),\n );\n if (\n negativeOption &&\n ((negativeOption.presetArg === undefined && optionValue === false) ||\n (negativeOption.presetArg !== undefined &&\n optionValue === negativeOption.presetArg))\n ) {\n return negativeOption;\n }\n return positiveOption || option;\n };\n\n const getErrorMessage = (option) => {\n const bestOption = findBestOptionFromValue(option);\n const optionKey = bestOption.attributeName();\n const source = this.getOptionValueSource(optionKey);\n if (source === 'env') {\n return `environment variable '${bestOption.envVar}'`;\n }\n return `option '${bestOption.flags}'`;\n };\n\n const message = `error: ${getErrorMessage(option)} cannot be used with ${getErrorMessage(conflictingOption)}`;\n this.error(message, { code: 'commander.conflictingOption' });\n }\n\n /**\n * Unknown option `flag`.\n *\n * @param {string} flag\n * @private\n */\n\n unknownOption(flag) {\n if (this._allowUnknownOption) return;\n let suggestion = '';\n\n if (flag.startsWith('--') && this._showSuggestionAfterError) {\n // Looping to pick up the global options too\n let candidateFlags = [];\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n let command = this;\n do {\n const moreFlags = command\n .createHelp()\n .visibleOptions(command)\n .filter((option) => option.long)\n .map((option) => option.long);\n candidateFlags = candidateFlags.concat(moreFlags);\n command = command.parent;\n } while (command && !command._enablePositionalOptions);\n suggestion = suggestSimilar(flag, candidateFlags);\n }\n\n const message = `error: unknown option '${flag}'${suggestion}`;\n this.error(message, { code: 'commander.unknownOption' });\n }\n\n /**\n * Excess arguments, more than expected.\n *\n * @param {string[]} receivedArgs\n * @private\n */\n\n _excessArguments(receivedArgs) {\n if (this._allowExcessArguments) return;\n\n const expected = this.registeredArguments.length;\n const s = expected === 1 ? '' : 's';\n const forSubcommand = this.parent ? ` for '${this.name()}'` : '';\n const message = `error: too many arguments${forSubcommand}. Expected ${expected} argument${s} but got ${receivedArgs.length}.`;\n this.error(message, { code: 'commander.excessArguments' });\n }\n\n /**\n * Unknown command.\n *\n * @private\n */\n\n unknownCommand() {\n const unknownName = this.args[0];\n let suggestion = '';\n\n if (this._showSuggestionAfterError) {\n const candidateNames = [];\n this.createHelp()\n .visibleCommands(this)\n .forEach((command) => {\n candidateNames.push(command.name());\n // just visible alias\n if (command.alias()) candidateNames.push(command.alias());\n });\n suggestion = suggestSimilar(unknownName, candidateNames);\n }\n\n const message = `error: unknown command '${unknownName}'${suggestion}`;\n this.error(message, { code: 'commander.unknownCommand' });\n }\n\n /**\n * Get or set the program version.\n *\n * This method auto-registers the \"-V, --version\" option which will print the version number.\n *\n * You can optionally supply the flags and description to override the defaults.\n *\n * @param {string} [str]\n * @param {string} [flags]\n * @param {string} [description]\n * @return {(this | string | undefined)} `this` command for chaining, or version string if no arguments\n */\n\n version(str, flags, description) {\n if (str === undefined) return this._version;\n this._version = str;\n flags = flags || '-V, --version';\n description = description || 'output the version number';\n const versionOption = this.createOption(flags, description);\n this._versionOptionName = versionOption.attributeName();\n this._registerOption(versionOption);\n\n this.on('option:' + versionOption.name(), () => {\n this._outputConfiguration.writeOut(`${str}\\n`);\n this._exit(0, 'commander.version', str);\n });\n return this;\n }\n\n /**\n * Set the description.\n *\n * @param {string} [str]\n * @param {object} [argsDescription]\n * @return {(string|Command)}\n */\n description(str, argsDescription) {\n if (str === undefined && argsDescription === undefined)\n return this._description;\n this._description = str;\n if (argsDescription) {\n this._argsDescription = argsDescription;\n }\n return this;\n }\n\n /**\n * Set the summary. Used when listed as subcommand of parent.\n *\n * @param {string} [str]\n * @return {(string|Command)}\n */\n summary(str) {\n if (str === undefined) return this._summary;\n this._summary = str;\n return this;\n }\n\n /**\n * Set an alias for the command.\n *\n * You may call more than once to add multiple aliases. Only the first alias is shown in the auto-generated help.\n *\n * @param {string} [alias]\n * @return {(string|Command)}\n */\n\n alias(alias) {\n if (alias === undefined) return this._aliases[0]; // just return first, for backwards compatibility\n\n /** @type {Command} */\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n let command = this;\n if (\n this.commands.length !== 0 &&\n this.commands[this.commands.length - 1]._executableHandler\n ) {\n // assume adding alias for last added executable subcommand, rather than this\n command = this.commands[this.commands.length - 1];\n }\n\n if (alias === command._name)\n throw new Error(\"Command alias can't be the same as its name\");\n const matchingCommand = this.parent?._findCommand(alias);\n if (matchingCommand) {\n // c.f. _registerCommand\n const existingCmd = [matchingCommand.name()]\n .concat(matchingCommand.aliases())\n .join('|');\n throw new Error(\n `cannot add alias '${alias}' to command '${this.name()}' as already have command '${existingCmd}'`,\n );\n }\n\n command._aliases.push(alias);\n return this;\n }\n\n /**\n * Set aliases for the command.\n *\n * Only the first alias is shown in the auto-generated help.\n *\n * @param {string[]} [aliases]\n * @return {(string[]|Command)}\n */\n\n aliases(aliases) {\n // Getter for the array of aliases is the main reason for having aliases() in addition to alias().\n if (aliases === undefined) return this._aliases;\n\n aliases.forEach((alias) => this.alias(alias));\n return this;\n }\n\n /**\n * Set / get the command usage `str`.\n *\n * @param {string} [str]\n * @return {(string|Command)}\n */\n\n usage(str) {\n if (str === undefined) {\n if (this._usage) return this._usage;\n\n const args = this.registeredArguments.map((arg) => {\n return humanReadableArgName(arg);\n });\n return []\n .concat(\n this.options.length || this._helpOption !== null ? '[options]' : [],\n this.commands.length ? '[command]' : [],\n this.registeredArguments.length ? args : [],\n )\n .join(' ');\n }\n\n this._usage = str;\n return this;\n }\n\n /**\n * Get or set the name of the command.\n *\n * @param {string} [str]\n * @return {(string|Command)}\n */\n\n name(str) {\n if (str === undefined) return this._name;\n this._name = str;\n return this;\n }\n\n /**\n * Set/get the help group heading for this subcommand in parent command's help.\n *\n * @param {string} [heading]\n * @return {Command | string}\n */\n\n helpGroup(heading) {\n if (heading === undefined) return this._helpGroupHeading ?? '';\n this._helpGroupHeading = heading;\n return this;\n }\n\n /**\n * Set/get the default help group heading for subcommands added to this command.\n * (This does not override a group set directly on the subcommand using .helpGroup().)\n *\n * @example\n * program.commandsGroup('Development Commands:);\n * program.command('watch')...\n * program.command('lint')...\n * ...\n *\n * @param {string} [heading]\n * @returns {Command | string}\n */\n commandsGroup(heading) {\n if (heading === undefined) return this._defaultCommandGroup ?? '';\n this._defaultCommandGroup = heading;\n return this;\n }\n\n /**\n * Set/get the default help group heading for options added to this command.\n * (This does not override a group set directly on the option using .helpGroup().)\n *\n * @example\n * program\n * .optionsGroup('Development Options:')\n * .option('-d, --debug', 'output extra debugging')\n * .option('-p, --profile', 'output profiling information')\n *\n * @param {string} [heading]\n * @returns {Command | string}\n */\n optionsGroup(heading) {\n if (heading === undefined) return this._defaultOptionGroup ?? '';\n this._defaultOptionGroup = heading;\n return this;\n }\n\n /**\n * @param {Option} option\n * @private\n */\n _initOptionGroup(option) {\n if (this._defaultOptionGroup && !option.helpGroupHeading)\n option.helpGroup(this._defaultOptionGroup);\n }\n\n /**\n * @param {Command} cmd\n * @private\n */\n _initCommandGroup(cmd) {\n if (this._defaultCommandGroup && !cmd.helpGroup())\n cmd.helpGroup(this._defaultCommandGroup);\n }\n\n /**\n * Set the name of the command from script filename, such as process.argv[1],\n * or require.main.filename, or __filename.\n *\n * (Used internally and public although not documented in README.)\n *\n * @example\n * program.nameFromFilename(require.main.filename);\n *\n * @param {string} filename\n * @return {Command}\n */\n\n nameFromFilename(filename) {\n this._name = path.basename(filename, path.extname(filename));\n\n return this;\n }\n\n /**\n * Get or set the directory for searching for executable subcommands of this command.\n *\n * @example\n * program.executableDir(__dirname);\n * // or\n * program.executableDir('subcommands');\n *\n * @param {string} [path]\n * @return {(string|null|Command)}\n */\n\n executableDir(path) {\n if (path === undefined) return this._executableDir;\n this._executableDir = path;\n return this;\n }\n\n /**\n * Return program help documentation.\n *\n * @param {{ error: boolean }} [contextOptions] - pass {error:true} to wrap for stderr instead of stdout\n * @return {string}\n */\n\n helpInformation(contextOptions) {\n const helper = this.createHelp();\n const context = this._getOutputContext(contextOptions);\n helper.prepareContext({\n error: context.error,\n helpWidth: context.helpWidth,\n outputHasColors: context.hasColors,\n });\n const text = helper.formatHelp(this, helper);\n if (context.hasColors) return text;\n return this._outputConfiguration.stripColor(text);\n }\n\n /**\n * @typedef HelpContext\n * @type {object}\n * @property {boolean} error\n * @property {number} helpWidth\n * @property {boolean} hasColors\n * @property {function} write - includes stripColor if needed\n *\n * @returns {HelpContext}\n * @private\n */\n\n _getOutputContext(contextOptions) {\n contextOptions = contextOptions || {};\n const error = !!contextOptions.error;\n let baseWrite;\n let hasColors;\n let helpWidth;\n if (error) {\n baseWrite = (str) => this._outputConfiguration.writeErr(str);\n hasColors = this._outputConfiguration.getErrHasColors();\n helpWidth = this._outputConfiguration.getErrHelpWidth();\n } else {\n baseWrite = (str) => this._outputConfiguration.writeOut(str);\n hasColors = this._outputConfiguration.getOutHasColors();\n helpWidth = this._outputConfiguration.getOutHelpWidth();\n }\n const write = (str) => {\n if (!hasColors) str = this._outputConfiguration.stripColor(str);\n return baseWrite(str);\n };\n return { error, write, hasColors, helpWidth };\n }\n\n /**\n * Output help information for this command.\n *\n * Outputs built-in help, and custom text added using `.addHelpText()`.\n *\n * @param {{ error: boolean } | Function} [contextOptions] - pass {error:true} to write to stderr instead of stdout\n */\n\n outputHelp(contextOptions) {\n let deprecatedCallback;\n if (typeof contextOptions === 'function') {\n deprecatedCallback = contextOptions;\n contextOptions = undefined;\n }\n\n const outputContext = this._getOutputContext(contextOptions);\n /** @type {HelpTextEventContext} */\n const eventContext = {\n error: outputContext.error,\n write: outputContext.write,\n command: this,\n };\n\n this._getCommandAndAncestors()\n .reverse()\n .forEach((command) => command.emit('beforeAllHelp', eventContext));\n this.emit('beforeHelp', eventContext);\n\n let helpInformation = this.helpInformation({ error: outputContext.error });\n if (deprecatedCallback) {\n helpInformation = deprecatedCallback(helpInformation);\n if (\n typeof helpInformation !== 'string' &&\n !Buffer.isBuffer(helpInformation)\n ) {\n throw new Error('outputHelp callback must return a string or a Buffer');\n }\n }\n outputContext.write(helpInformation);\n\n if (this._getHelpOption()?.long) {\n this.emit(this._getHelpOption().long); // deprecated\n }\n this.emit('afterHelp', eventContext);\n this._getCommandAndAncestors().forEach((command) =>\n command.emit('afterAllHelp', eventContext),\n );\n }\n\n /**\n * You can pass in flags and a description to customise the built-in help option.\n * Pass in false to disable the built-in help option.\n *\n * @example\n * program.helpOption('-?, --help' 'show help'); // customise\n * program.helpOption(false); // disable\n *\n * @param {(string | boolean)} flags\n * @param {string} [description]\n * @return {Command} `this` command for chaining\n */\n\n helpOption(flags, description) {\n // Support enabling/disabling built-in help option.\n if (typeof flags === 'boolean') {\n if (flags) {\n if (this._helpOption === null) this._helpOption = undefined; // reenable\n if (this._defaultOptionGroup) {\n // make the option to store the group\n this._initOptionGroup(this._getHelpOption());\n }\n } else {\n this._helpOption = null; // disable\n }\n return this;\n }\n\n // Customise flags and description.\n this._helpOption = this.createOption(\n flags ?? '-h, --help',\n description ?? 'display help for command',\n );\n // init group unless lazy create\n if (flags || description) this._initOptionGroup(this._helpOption);\n\n return this;\n }\n\n /**\n * Lazy create help option.\n * Returns null if has been disabled with .helpOption(false).\n *\n * @returns {(Option | null)} the help option\n * @package\n */\n _getHelpOption() {\n // Lazy create help option on demand.\n if (this._helpOption === undefined) {\n this.helpOption(undefined, undefined);\n }\n return this._helpOption;\n }\n\n /**\n * Supply your own option to use for the built-in help option.\n * This is an alternative to using helpOption() to customise the flags and description etc.\n *\n * @param {Option} option\n * @return {Command} `this` command for chaining\n */\n addHelpOption(option) {\n this._helpOption = option;\n this._initOptionGroup(option);\n return this;\n }\n\n /**\n * Output help information and exit.\n *\n * Outputs built-in help, and custom text added using `.addHelpText()`.\n *\n * @param {{ error: boolean }} [contextOptions] - pass {error:true} to write to stderr instead of stdout\n */\n\n help(contextOptions) {\n this.outputHelp(contextOptions);\n let exitCode = Number(process.exitCode ?? 0); // process.exitCode does allow a string or an integer, but we prefer just a number\n if (\n exitCode === 0 &&\n contextOptions &&\n typeof contextOptions !== 'function' &&\n contextOptions.error\n ) {\n exitCode = 1;\n }\n // message: do not have all displayed text available so only passing placeholder.\n this._exit(exitCode, 'commander.help', '(outputHelp)');\n }\n\n /**\n * // Do a little typing to coordinate emit and listener for the help text events.\n * @typedef HelpTextEventContext\n * @type {object}\n * @property {boolean} error\n * @property {Command} command\n * @property {function} write\n */\n\n /**\n * Add additional text to be displayed with the built-in help.\n *\n * Position is 'before' or 'after' to affect just this command,\n * and 'beforeAll' or 'afterAll' to affect this command and all its subcommands.\n *\n * @param {string} position - before or after built-in help\n * @param {(string | Function)} text - string to add, or a function returning a string\n * @return {Command} `this` command for chaining\n */\n\n addHelpText(position, text) {\n const allowedValues = ['beforeAll', 'before', 'after', 'afterAll'];\n if (!allowedValues.includes(position)) {\n throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${allowedValues.join(\"', '\")}'`);\n }\n\n const helpEvent = `${position}Help`;\n this.on(helpEvent, (/** @type {HelpTextEventContext} */ context) => {\n let helpStr;\n if (typeof text === 'function') {\n helpStr = text({ error: context.error, command: context.command });\n } else {\n helpStr = text;\n }\n // Ignore falsy value when nothing to output.\n if (helpStr) {\n context.write(`${helpStr}\\n`);\n }\n });\n return this;\n }\n\n /**\n * Output help information if help flags specified\n *\n * @param {Array} args - array of options to search for help flags\n * @private\n */\n\n _outputHelpIfRequested(args) {\n const helpOption = this._getHelpOption();\n const helpRequested = helpOption && args.find((arg) => helpOption.is(arg));\n if (helpRequested) {\n this.outputHelp();\n // (Do not have all displayed text available so only passing placeholder.)\n this._exit(0, 'commander.helpDisplayed', '(outputHelp)');\n }\n }\n}\n\n/**\n * Scan arguments and increment port number for inspect calls (to avoid conflicts when spawning new command).\n *\n * @param {string[]} args - array of arguments from node.execArgv\n * @returns {string[]}\n * @private\n */\n\nfunction incrementNodeInspectorPort(args) {\n // Testing for these options:\n // --inspect[=[host:]port]\n // --inspect-brk[=[host:]port]\n // --inspect-port=[host:]port\n return args.map((arg) => {\n if (!arg.startsWith('--inspect')) {\n return arg;\n }\n let debugOption;\n let debugHost = '127.0.0.1';\n let debugPort = '9229';\n let match;\n if ((match = arg.match(/^(--inspect(-brk)?)$/)) !== null) {\n // e.g. --inspect\n debugOption = match[1];\n } else if (\n (match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+)$/)) !== null\n ) {\n debugOption = match[1];\n if (/^\\d+$/.test(match[3])) {\n // e.g. --inspect=1234\n debugPort = match[3];\n } else {\n // e.g. --inspect=localhost\n debugHost = match[3];\n }\n } else if (\n (match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+):(\\d+)$/)) !== null\n ) {\n // e.g. --inspect=localhost:1234\n debugOption = match[1];\n debugHost = match[3];\n debugPort = match[4];\n }\n\n if (debugOption && debugPort !== '0') {\n return `${debugOption}=${debugHost}:${parseInt(debugPort) + 1}`;\n }\n return arg;\n });\n}\n\n/**\n * @returns {boolean | undefined}\n * @package\n */\nfunction useColor() {\n // Test for common conventions.\n // NB: the observed behaviour is in combination with how author adds color! For example:\n // - we do not test NODE_DISABLE_COLORS, but util:styletext does\n // - we do test NO_COLOR, but Chalk does not\n //\n // References:\n // https://no-color.org\n // https://bixense.com/clicolors/\n // https://github.com/nodejs/node/blob/0a00217a5f67ef4a22384cfc80eb6dd9a917fdc1/lib/internal/tty.js#L109\n // https://github.com/chalk/supports-color/blob/c214314a14bcb174b12b3014b2b0a8de375029ae/index.js#L33\n // (https://force-color.org recent web page from 2023, does not match major javascript implementations)\n\n if (\n process.env.NO_COLOR ||\n process.env.FORCE_COLOR === '0' ||\n process.env.FORCE_COLOR === 'false'\n )\n return false;\n if (process.env.FORCE_COLOR || process.env.CLICOLOR_FORCE !== undefined)\n return true;\n return undefined;\n}\n\nexports.Command = Command;\nexports.useColor = useColor; // exporting for tests\n",
|
|
11
11
|
"const { Argument } = require('./lib/argument.js');\nconst { Command } = require('./lib/command.js');\nconst { CommanderError, InvalidArgumentError } = require('./lib/error.js');\nconst { Help } = require('./lib/help.js');\nconst { Option } = require('./lib/option.js');\n\nexports.program = new Command();\n\nexports.createCommand = (name) => new Command(name);\nexports.createOption = (flags, description) => new Option(flags, description);\nexports.createArgument = (name, description) => new Argument(name, description);\n\n/**\n * Expose classes\n */\n\nexports.Command = Command;\nexports.Option = Option;\nexports.Argument = Argument;\nexports.Help = Help;\n\nexports.CommanderError = CommanderError;\nexports.InvalidArgumentError = InvalidArgumentError;\nexports.InvalidOptionArgumentError = InvalidArgumentError; // Deprecated\n",
|
|
12
|
-
"import { Command } from 'commander';\r\nimport { mkdir, writeFile } from 'fs/promises';\r\nimport { join } from 'path';\r\nimport { existsSync } from 'fs';\r\n\r\ntype Template = 'rest' | 'graphql' | 'websocket' | 'fullstack';\r\n\r\ninterface ProjectOptions {\r\n template: Template;\r\n}\r\n\r\nexport function registerNewCommand(program: Command): void {\r\n program\r\n .command('new')\r\n .description('Create a new VeloceTS project')\r\n .argument('<name>', 'Project name')\r\n .option('-t, --template <template>', 'Project template (rest, graphql, websocket, fullstack)', 'rest')\r\n .action(async (name: string, options: ProjectOptions) => {\r\n await createProject(name, options);\r\n });\r\n}\r\n\r\nasync function createProject(name: string, options: ProjectOptions): Promise<void> {\r\n const projectPath = join(process.cwd(), name);\r\n\r\n // Check if directory already exists\r\n if (existsSync(projectPath)) {\r\n console.error(`Error: Directory \"${name}\" already exists`);\r\n process.exit(1);\r\n }\r\n\r\n console.log(`Creating new VeloceTS project: ${name}`);\r\n console.log(`Template: ${options.template}`);\r\n\r\n try {\r\n // Create project directory\r\n await mkdir(projectPath, { recursive: true });\r\n\r\n // Create subdirectories\r\n await mkdir(join(projectPath, 'src'), { recursive: true });\r\n await mkdir(join(projectPath, 'src', 'controllers'), { recursive: true });\r\n\r\n // Generate files based on template\r\n await generatePackageJson(projectPath, name);\r\n await generateTsConfig(projectPath);\r\n await generateGitignore(projectPath);\r\n await generateReadme(projectPath, name, options.template);\r\n\r\n switch (options.template) {\r\n case 'rest':\r\n await generateRestTemplate(projectPath);\r\n break;\r\n case 'graphql':\r\n await generateGraphQLTemplate(projectPath);\r\n break;\r\n case 'websocket':\r\n await generateWebSocketTemplate(projectPath);\r\n break;\r\n case 'fullstack':\r\n await generateFullstackTemplate(projectPath);\r\n break;\r\n }\r\n\r\n console.log('\\n✓ Project created successfully!');\r\n console.log('\\nNext steps:');\r\n console.log(` cd ${name}`);\r\n console.log(' bun install');\r\n console.log(' bun run dev');\r\n } catch (error) {\r\n console.error('Error creating project:', error);\r\n process.exit(1);\r\n }\r\n}\r\n\r\nasync function generatePackageJson(projectPath: string, name: string): Promise<void> {\r\n const packageJson = {\r\n name,\r\n version: '0.1.0',\r\n description: 'A VeloceTS application',\r\n type: 'module',\r\n main: './dist/index.js',\r\n scripts: {\r\n dev: 'bun --watch src/index.ts',\r\n build: 'bun build src/index.ts --outdir dist --target bun',\r\n start: 'bun run dist/index.js',\r\n 'generate:openapi': 'bun run node_modules/VeloceTS/bin/veloce.ts generate openapi',\r\n 'generate:client': 'bun run node_modules/VeloceTS/bin/veloce.ts generate client',\r\n },\r\n dependencies: {\r\n 'VeloceTS': '^0.1.0',\r\n hono: '^4.0.0',\r\n 'reflect-metadata': '^0.2.0',\r\n zod: '^3.22.0',\r\n },\r\n devDependencies: {\r\n '@types/bun': 'latest',\r\n typescript: '^5.3.0',\r\n },\r\n };\r\n\r\n await writeFile(\r\n join(projectPath, 'package.json'),\r\n JSON.stringify(packageJson, null, 2)\r\n );\r\n}\r\n\r\nasync function generateTsConfig(projectPath: string): Promise<void> {\r\n const tsConfig = {\r\n compilerOptions: {\r\n target: 'ES2022',\r\n module: 'ESNext',\r\n lib: ['ES2022'],\r\n moduleResolution: 'bundler',\r\n experimentalDecorators: true,\r\n emitDecoratorMetadata: true,\r\n strict: true,\r\n esModuleInterop: true,\r\n skipLibCheck: true,\r\n forceConsistentCasingInFileNames: true,\r\n resolveJsonModule: true,\r\n outDir: './dist',\r\n rootDir: './src',\r\n },\r\n include: ['src/**/*'],\r\n exclude: ['node_modules', 'dist'],\r\n };\r\n\r\n await writeFile(\r\n join(projectPath, 'tsconfig.json'),\r\n JSON.stringify(tsConfig, null, 2)\r\n );\r\n}\r\n\r\nasync function generateGitignore(projectPath: string): Promise<void> {\r\n const gitignore = `node_modules/\r\ndist/\r\n*.log\r\n.env\r\n.DS_Store\r\n`;\r\n\r\n await writeFile(join(projectPath, '.gitignore'), gitignore);\r\n}\r\n\r\nasync function generateReadme(projectPath: string, name: string, template: Template): Promise<void> {\r\n const readme = `# ${name}\r\n\r\nA VeloceTS application using the ${template} template.\r\n\r\n## Getting Started\r\n\r\nInstall dependencies:\r\n\r\n\\`\\`\\`bash\r\nbun install\r\n\\`\\`\\`\r\n\r\nRun the development server:\r\n\r\n\\`\\`\\`bash\r\nbun run dev\r\n\\`\\`\\`\r\n\r\nBuild for production:\r\n\r\n\\`\\`\\`bash\r\nbun run build\r\n\\`\\`\\`\r\n\r\n## Documentation\r\n\r\nVisit http://localhost:3000/docs to see the API documentation.\r\n`;\r\n\r\n await writeFile(join(projectPath, 'README.md'), readme);\r\n}\r\n\r\nasync function generateRestTemplate(projectPath: string): Promise<void> {\r\n // Create main entry point\r\n const mainFile = `import 'reflect-metadata';\r\nimport { Veloce } from 'VeloceTS';\r\nimport { UserController } from './controllers/user.controller';\r\n\r\nconst app = new Veloce({\r\n title: 'My REST API',\r\n version: '1.0.0',\r\n docs: true,\r\n});\r\n\r\n// Register controllers\r\napp.include(UserController);\r\n\r\n// Start server\r\napp.listen(3000, () => {\r\n console.log('Server running on http://localhost:3000');\r\n console.log('Docs available at http://localhost:3000/docs');\r\n});\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'index.ts'), mainFile);\r\n\r\n // Create example controller\r\n const controllerFile = `import { Controller, Get, Post, Body, Param } from 'VeloceTS';\r\nimport { z } from 'zod';\r\n\r\nconst UserSchema = z.object({\r\n name: z.string(),\r\n email: z.string().email(),\r\n age: z.number().min(0).optional(),\r\n});\r\n\r\ntype User = z.infer<typeof UserSchema>;\r\n\r\n@Controller('/users')\r\nexport class UserController {\r\n private users: User[] = [];\r\n\r\n @Get('/')\r\n async getUsers() {\r\n return { users: this.users };\r\n }\r\n\r\n @Get('/:id')\r\n async getUser(@Param('id') id: string) {\r\n const user = this.users[parseInt(id)];\r\n if (!user) {\r\n throw new Error('User not found');\r\n }\r\n return user;\r\n }\r\n\r\n @Post('/')\r\n async createUser(@Body(UserSchema) user: User) {\r\n this.users.push(user);\r\n return { message: 'User created', user };\r\n }\r\n}\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'controllers', 'user.controller.ts'), controllerFile);\r\n}\r\n\r\nasync function generateGraphQLTemplate(projectPath: string): Promise<void> {\r\n await mkdir(join(projectPath, 'src', 'resolvers'), { recursive: true });\r\n\r\n const mainFile = `import 'reflect-metadata';\r\nimport { Veloce } from 'VeloceTS';\r\nimport { GraphQLPlugin } from 'VeloceTS/plugins';\r\nimport { UserResolver } from './resolvers/user.resolver';\r\n\r\nconst app = new Veloce({\r\n title: 'My GraphQL API',\r\n version: '1.0.0',\r\n});\r\n\r\n// Enable GraphQL\r\napp.usePlugin(new GraphQLPlugin({\r\n resolvers: [UserResolver],\r\n}));\r\n\r\napp.listen(3000, () => {\r\n console.log('Server running on http://localhost:3000');\r\n console.log('GraphQL Playground at http://localhost:3000/graphql');\r\n});\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'index.ts'), mainFile);\r\n\r\n const resolverFile = `import { Resolver, Query, Mutation, Arg } from 'VeloceTS/graphql';\r\nimport { z } from 'zod';\r\n\r\nconst UserSchema = z.object({\r\n id: z.string(),\r\n name: z.string(),\r\n email: z.string().email(),\r\n});\r\n\r\ntype User = z.infer<typeof UserSchema>;\r\n\r\n@Resolver()\r\nexport class UserResolver {\r\n private users: User[] = [];\r\n\r\n @Query()\r\n async users(): Promise<User[]> {\r\n return this.users;\r\n }\r\n\r\n @Query()\r\n async user(@Arg('id', z.string()) id: string): Promise<User | null> {\r\n return this.users.find(u => u.id === id) || null;\r\n }\r\n\r\n @Mutation()\r\n async createUser(\r\n @Arg('name', z.string()) name: string,\r\n @Arg('email', z.string().email()) email: string\r\n ): Promise<User> {\r\n const user = { id: Date.now().toString(), name, email };\r\n this.users.push(user);\r\n return user;\r\n }\r\n}\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'resolvers', 'user.resolver.ts'), resolverFile);\r\n}\r\n\r\nasync function generateWebSocketTemplate(projectPath: string): Promise<void> {\r\n await mkdir(join(projectPath, 'src', 'websockets'), { recursive: true });\r\n\r\n const mainFile = `import 'reflect-metadata';\r\nimport { Veloce } from 'VeloceTS';\r\nimport { WebSocketPlugin } from 'VeloceTS/plugins';\r\nimport { ChatWebSocket } from './websockets/chat.websocket';\r\n\r\nconst app = new Veloce({\r\n title: 'My WebSocket API',\r\n version: '1.0.0',\r\n});\r\n\r\n// Enable WebSocket\r\napp.usePlugin(new WebSocketPlugin({\r\n handlers: [ChatWebSocket],\r\n}));\r\n\r\napp.listen(3000, () => {\r\n console.log('Server running on http://localhost:3000');\r\n console.log('WebSocket endpoint at ws://localhost:3000/ws/chat');\r\n});\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'index.ts'), mainFile);\r\n\r\n const websocketFile = `import { WebSocket, OnConnect, OnMessage, OnDisconnect } from 'VeloceTS/websocket';\r\nimport { z } from 'zod';\r\nimport type { WebSocketConnection } from 'VeloceTS/websocket';\r\n\r\nconst MessageSchema = z.object({\r\n type: z.enum(['message', 'join', 'leave']),\r\n content: z.string(),\r\n username: z.string(),\r\n});\r\n\r\n@WebSocket('/ws/chat')\r\nexport class ChatWebSocket {\r\n @OnConnect()\r\n handleConnect(connection: WebSocketConnection) {\r\n console.log('Client connected:', connection.id);\r\n connection.send({ type: 'system', content: 'Welcome to the chat!' });\r\n }\r\n\r\n @OnMessage(MessageSchema)\r\n async handleMessage(connection: WebSocketConnection, message: z.infer<typeof MessageSchema>) {\r\n console.log('Received message:', message);\r\n \r\n // Broadcast to all clients\r\n connection.broadcast({\r\n type: 'message',\r\n username: message.username,\r\n content: message.content,\r\n timestamp: new Date().toISOString(),\r\n });\r\n }\r\n\r\n @OnDisconnect()\r\n handleDisconnect(connection: WebSocketConnection) {\r\n console.log('Client disconnected:', connection.id);\r\n }\r\n}\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'websockets', 'chat.websocket.ts'), websocketFile);\r\n}\r\n\r\nasync function generateFullstackTemplate(projectPath: string): Promise<void> {\r\n await mkdir(join(projectPath, 'src', 'controllers'), { recursive: true });\r\n await mkdir(join(projectPath, 'src', 'resolvers'), { recursive: true });\r\n await mkdir(join(projectPath, 'src', 'websockets'), { recursive: true });\r\n\r\n // Generate main file\r\n const mainFile = `import 'reflect-metadata';\r\nimport { Veloce } from 'VeloceTS';\r\nimport { GraphQLPlugin, WebSocketPlugin } from 'VeloceTS/plugins';\r\nimport { UserController } from './controllers/user.controller';\r\nimport { UserResolver } from './resolvers/user.resolver';\r\nimport { ChatWebSocket } from './websockets/chat.websocket';\r\n\r\nconst app = new Veloce({\r\n title: 'My Fullstack API',\r\n version: '1.0.0',\r\n docs: true,\r\n});\r\n\r\n// REST API\r\napp.include(UserController);\r\n\r\n// GraphQL\r\napp.usePlugin(new GraphQLPlugin({\r\n resolvers: [UserResolver],\r\n}));\r\n\r\n// WebSocket\r\napp.usePlugin(new WebSocketPlugin({\r\n handlers: [ChatWebSocket],\r\n}));\r\n\r\napp.listen(3000, () => {\r\n console.log('Server running on http://localhost:3000');\r\n console.log('REST API docs at http://localhost:3000/docs');\r\n console.log('GraphQL Playground at http://localhost:3000/graphql');\r\n console.log('WebSocket endpoint at ws://localhost:3000/ws/chat');\r\n});\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'index.ts'), mainFile);\r\n\r\n // Generate REST controller\r\n const controllerFile = `import { Controller, Get, Post, Body, Param } from 'VeloceTS';\r\nimport { z } from 'zod';\r\n\r\nconst UserSchema = z.object({\r\n name: z.string(),\r\n email: z.string().email(),\r\n age: z.number().min(0).optional(),\r\n});\r\n\r\ntype User = z.infer<typeof UserSchema>;\r\n\r\n@Controller('/users')\r\nexport class UserController {\r\n private users: User[] = [];\r\n\r\n @Get('/')\r\n async getUsers() {\r\n return { users: this.users };\r\n }\r\n\r\n @Get('/:id')\r\n async getUser(@Param('id') id: string) {\r\n const user = this.users[parseInt(id)];\r\n if (!user) {\r\n throw new Error('User not found');\r\n }\r\n return user;\r\n }\r\n\r\n @Post('/')\r\n async createUser(@Body(UserSchema) user: User) {\r\n this.users.push(user);\r\n return { message: 'User created', user };\r\n }\r\n}\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'controllers', 'user.controller.ts'), controllerFile);\r\n\r\n // Generate GraphQL resolver\r\n const resolverFile = `import { Resolver, Query, Mutation, Arg } from 'VeloceTS/graphql';\r\nimport { z } from 'zod';\r\n\r\nconst UserSchema = z.object({\r\n id: z.string(),\r\n name: z.string(),\r\n email: z.string().email(),\r\n});\r\n\r\ntype User = z.infer<typeof UserSchema>;\r\n\r\n@Resolver()\r\nexport class UserResolver {\r\n private users: User[] = [];\r\n\r\n @Query()\r\n async users(): Promise<User[]> {\r\n return this.users;\r\n }\r\n\r\n @Query()\r\n async user(@Arg('id', z.string()) id: string): Promise<User | null> {\r\n return this.users.find(u => u.id === id) || null;\r\n }\r\n\r\n @Mutation()\r\n async createUser(\r\n @Arg('name', z.string()) name: string,\r\n @Arg('email', z.string().email()) email: string\r\n ): Promise<User> {\r\n const user = { id: Date.now().toString(), name, email };\r\n this.users.push(user);\r\n return user;\r\n }\r\n}\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'resolvers', 'user.resolver.ts'), resolverFile);\r\n\r\n // Generate WebSocket handler\r\n const websocketFile = `import { WebSocket, OnConnect, OnMessage, OnDisconnect } from 'VeloceTS/websocket';\r\nimport { z } from 'zod';\r\nimport type { WebSocketConnection } from 'VeloceTS/websocket';\r\n\r\nconst MessageSchema = z.object({\r\n type: z.enum(['message', 'join', 'leave']),\r\n content: z.string(),\r\n username: z.string(),\r\n});\r\n\r\n@WebSocket('/ws/chat')\r\nexport class ChatWebSocket {\r\n @OnConnect()\r\n handleConnect(connection: WebSocketConnection) {\r\n console.log('Client connected:', connection.id);\r\n connection.send({ type: 'system', content: 'Welcome to the chat!' });\r\n }\r\n\r\n @OnMessage(MessageSchema)\r\n async handleMessage(connection: WebSocketConnection, message: z.infer<typeof MessageSchema>) {\r\n console.log('Received message:', message);\r\n \r\n // Broadcast to all clients\r\n connection.broadcast({\r\n type: 'message',\r\n username: message.username,\r\n content: message.content,\r\n timestamp: new Date().toISOString(),\r\n });\r\n }\r\n\r\n @OnDisconnect()\r\n handleDisconnect(connection: WebSocketConnection) {\r\n console.log('Client disconnected:', connection.id);\r\n }\r\n}\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'websockets', 'chat.websocket.ts'), websocketFile);\r\n}\r\n",
|
|
12
|
+
"import { Command } from 'commander';\r\nimport { mkdir, writeFile } from 'fs/promises';\r\nimport { join } from 'path';\r\nimport { existsSync } from 'fs';\r\n\r\ntype Template = 'rest' | 'graphql' | 'websocket' | 'fullstack';\r\n\r\ninterface ProjectOptions {\r\n template: Template;\r\n}\r\n\r\nexport function registerNewCommand(program: Command): void {\r\n program\r\n .command('new')\r\n .description('Create a new VeloceTS project')\r\n .argument('<name>', 'Project name')\r\n .option('-t, --template <template>', 'Project template (rest, graphql, websocket, fullstack)', 'rest')\r\n .action(async (name: string, options: ProjectOptions) => {\r\n await createProject(name, options);\r\n });\r\n}\r\n\r\nasync function createProject(name: string, options: ProjectOptions): Promise<void> {\r\n const projectPath = join(process.cwd(), name);\r\n\r\n // Check if directory already exists\r\n if (existsSync(projectPath)) {\r\n console.error(`Error: Directory \"${name}\" already exists`);\r\n process.exit(1);\r\n }\r\n\r\n console.log(`Creating new VeloceTS project: ${name}`);\r\n console.log(`Template: ${options.template}`);\r\n\r\n try {\r\n // Create project directory\r\n await mkdir(projectPath, { recursive: true });\r\n\r\n // Create subdirectories\r\n await mkdir(join(projectPath, 'src'), { recursive: true });\r\n await mkdir(join(projectPath, 'src', 'controllers'), { recursive: true });\r\n\r\n // Generate files based on template\r\n await generatePackageJson(projectPath, name);\r\n await generateTsConfig(projectPath);\r\n await generateGitignore(projectPath);\r\n await generateReadme(projectPath, name, options.template);\r\n\r\n switch (options.template) {\r\n case 'rest':\r\n await generateRestTemplate(projectPath);\r\n break;\r\n case 'graphql':\r\n await generateGraphQLTemplate(projectPath);\r\n break;\r\n case 'websocket':\r\n await generateWebSocketTemplate(projectPath);\r\n break;\r\n case 'fullstack':\r\n await generateFullstackTemplate(projectPath);\r\n break;\r\n }\r\n\r\n console.log('\\n✓ Project created successfully!');\r\n console.log('\\nNext steps:');\r\n console.log(` cd ${name}`);\r\n console.log(' bun install');\r\n console.log(' bun run dev');\r\n } catch (error) {\r\n console.error('Error creating project:', error);\r\n process.exit(1);\r\n }\r\n}\r\n\r\nasync function generatePackageJson(projectPath: string, name: string): Promise<void> {\r\n const packageJson = {\r\n name,\r\n version: '0.1.0',\r\n description: 'A Veloce-TS application',\r\n type: 'module',\r\n main: './dist/index.js',\r\n scripts: {\r\n dev: 'bun --watch src/index.ts',\r\n build: 'bun build src/index.ts --outdir dist --target bun',\r\n start: 'bun run dist/index.js',\r\n 'generate:openapi': 'bun run node_modules/veloce-ts/bin/veloce.ts generate openapi',\r\n 'generate:client': 'bun run node_modules/veloce-ts/bin/veloce.ts generate client',\r\n },\r\n dependencies: {\r\n 'veloce-ts': '^0.1.0',\r\n hono: '^4.0.0',\r\n 'reflect-metadata': '^0.2.0',\r\n zod: '^3.22.0',\r\n },\r\n devDependencies: {\r\n '@types/bun': 'latest',\r\n typescript: '^5.3.0',\r\n },\r\n };\r\n\r\n await writeFile(\r\n join(projectPath, 'package.json'),\r\n JSON.stringify(packageJson, null, 2)\r\n );\r\n}\r\n\r\nasync function generateTsConfig(projectPath: string): Promise<void> {\r\n const tsConfig = {\r\n compilerOptions: {\r\n target: 'ES2022',\r\n module: 'ESNext',\r\n lib: ['ES2022'],\r\n moduleResolution: 'bundler',\r\n experimentalDecorators: true,\r\n emitDecoratorMetadata: true,\r\n strict: true,\r\n esModuleInterop: true,\r\n skipLibCheck: true,\r\n forceConsistentCasingInFileNames: true,\r\n resolveJsonModule: true,\r\n outDir: './dist',\r\n rootDir: './src',\r\n },\r\n include: ['src/**/*'],\r\n exclude: ['node_modules', 'dist'],\r\n };\r\n\r\n await writeFile(\r\n join(projectPath, 'tsconfig.json'),\r\n JSON.stringify(tsConfig, null, 2)\r\n );\r\n}\r\n\r\nasync function generateGitignore(projectPath: string): Promise<void> {\r\n const gitignore = `node_modules/\r\ndist/\r\n*.log\r\n.env\r\n.DS_Store\r\n`;\r\n\r\n await writeFile(join(projectPath, '.gitignore'), gitignore);\r\n}\r\n\r\nasync function generateReadme(projectPath: string, name: string, template: Template): Promise<void> {\r\n const readme = `# ${name}\r\n\r\nA VeloceTS application using the ${template} template.\r\n\r\n## Getting Started\r\n\r\nInstall dependencies:\r\n\r\n\\`\\`\\`bash\r\nbun install\r\n\\`\\`\\`\r\n\r\nRun the development server:\r\n\r\n\\`\\`\\`bash\r\nbun run dev\r\n\\`\\`\\`\r\n\r\nBuild for production:\r\n\r\n\\`\\`\\`bash\r\nbun run build\r\n\\`\\`\\`\r\n\r\n## Documentation\r\n\r\nVisit http://localhost:3000/docs to see the API documentation.\r\n`;\r\n\r\n await writeFile(join(projectPath, 'README.md'), readme);\r\n}\r\n\r\nasync function generateRestTemplate(projectPath: string): Promise<void> {\r\n // Create main entry point\r\n const mainFile = `import 'reflect-metadata';\r\nimport { Veloce } from 'veloce-ts';\r\nimport { UserController } from './controllers/user.controller';\r\n\r\nconst app = new Veloce({\r\n title: 'My REST API',\r\n version: '1.0.0',\r\n docs: true,\r\n});\r\n\r\n// Register controllers\r\napp.include(UserController);\r\n\r\n// Start server\r\napp.listen(3000, () => {\r\n console.log('Server running on http://localhost:3000');\r\n console.log('Docs available at http://localhost:3000/docs');\r\n});\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'index.ts'), mainFile);\r\n\r\n // Create example controller\r\n const controllerFile = `import { Controller, Get, Post, Body, Param } from 'veloce-ts';\r\nimport { z } from 'zod';\r\n\r\nconst UserSchema = z.object({\r\n name: z.string(),\r\n email: z.string().email(),\r\n age: z.number().min(0).optional(),\r\n});\r\n\r\ntype User = z.infer<typeof UserSchema>;\r\n\r\n@Controller('/users')\r\nexport class UserController {\r\n private users: User[] = [];\r\n\r\n @Get('/')\r\n async getUsers() {\r\n return { users: this.users };\r\n }\r\n\r\n @Get('/:id')\r\n async getUser(@Param('id') id: string) {\r\n const user = this.users[parseInt(id)];\r\n if (!user) {\r\n throw new Error('User not found');\r\n }\r\n return user;\r\n }\r\n\r\n @Post('/')\r\n async createUser(@Body(UserSchema) user: User) {\r\n this.users.push(user);\r\n return { message: 'User created', user };\r\n }\r\n}\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'controllers', 'user.controller.ts'), controllerFile);\r\n}\r\n\r\nasync function generateGraphQLTemplate(projectPath: string): Promise<void> {\r\n await mkdir(join(projectPath, 'src', 'resolvers'), { recursive: true });\r\n\r\n const mainFile = `import 'reflect-metadata';\r\nimport { Veloce } from 'veloce-ts';\r\nimport { GraphQLPlugin } from 'veloce-ts/plugins';\r\nimport { UserResolver } from './resolvers/user.resolver';\r\n\r\nconst app = new Veloce({\r\n title: 'My GraphQL API',\r\n version: '1.0.0',\r\n});\r\n\r\n// Enable GraphQL\r\napp.usePlugin(new GraphQLPlugin({\r\n resolvers: [UserResolver],\r\n}));\r\n\r\napp.listen(3000, () => {\r\n console.log('Server running on http://localhost:3000');\r\n console.log('GraphQL Playground at http://localhost:3000/graphql');\r\n});\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'index.ts'), mainFile);\r\n\r\n const resolverFile = `import { Resolver, Query, Mutation, Arg } from 'veloce-ts/graphql';\r\nimport { z } from 'zod';\r\n\r\nconst UserSchema = z.object({\r\n id: z.string(),\r\n name: z.string(),\r\n email: z.string().email(),\r\n});\r\n\r\ntype User = z.infer<typeof UserSchema>;\r\n\r\n@Resolver()\r\nexport class UserResolver {\r\n private users: User[] = [];\r\n\r\n @Query()\r\n async users(): Promise<User[]> {\r\n return this.users;\r\n }\r\n\r\n @Query()\r\n async user(@Arg('id', z.string()) id: string): Promise<User | null> {\r\n return this.users.find(u => u.id === id) || null;\r\n }\r\n\r\n @Mutation()\r\n async createUser(\r\n @Arg('name', z.string()) name: string,\r\n @Arg('email', z.string().email()) email: string\r\n ): Promise<User> {\r\n const user = { id: Date.now().toString(), name, email };\r\n this.users.push(user);\r\n return user;\r\n }\r\n}\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'resolvers', 'user.resolver.ts'), resolverFile);\r\n}\r\n\r\nasync function generateWebSocketTemplate(projectPath: string): Promise<void> {\r\n await mkdir(join(projectPath, 'src', 'websockets'), { recursive: true });\r\n\r\n const mainFile = `import 'reflect-metadata';\r\nimport { Veloce } from 'veloce-ts';\r\nimport { WebSocketPlugin } from 'veloce-ts/plugins';\r\nimport { ChatWebSocket } from './websockets/chat.websocket';\r\n\r\nconst app = new Veloce({\r\n title: 'My WebSocket API',\r\n version: '1.0.0',\r\n});\r\n\r\n// Enable WebSocket\r\napp.usePlugin(new WebSocketPlugin({\r\n handlers: [ChatWebSocket],\r\n}));\r\n\r\napp.listen(3000, () => {\r\n console.log('Server running on http://localhost:3000');\r\n console.log('WebSocket endpoint at ws://localhost:3000/ws/chat');\r\n});\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'index.ts'), mainFile);\r\n\r\n const websocketFile = `import { WebSocket, OnConnect, OnMessage, OnDisconnect } from 'veloce-ts/websocket';\r\nimport { z } from 'zod';\r\nimport type { WebSocketConnection } from 'veloce-ts/websocket';\r\n\r\nconst MessageSchema = z.object({\r\n type: z.enum(['message', 'join', 'leave']),\r\n content: z.string(),\r\n username: z.string(),\r\n});\r\n\r\n@WebSocket('/ws/chat')\r\nexport class ChatWebSocket {\r\n @OnConnect()\r\n handleConnect(connection: WebSocketConnection) {\r\n console.log('Client connected:', connection.id);\r\n connection.send({ type: 'system', content: 'Welcome to the chat!' });\r\n }\r\n\r\n @OnMessage(MessageSchema)\r\n async handleMessage(connection: WebSocketConnection, message: z.infer<typeof MessageSchema>) {\r\n console.log('Received message:', message);\r\n \r\n // Broadcast to all clients\r\n connection.broadcast({\r\n type: 'message',\r\n username: message.username,\r\n content: message.content,\r\n timestamp: new Date().toISOString(),\r\n });\r\n }\r\n\r\n @OnDisconnect()\r\n handleDisconnect(connection: WebSocketConnection) {\r\n console.log('Client disconnected:', connection.id);\r\n }\r\n}\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'websockets', 'chat.websocket.ts'), websocketFile);\r\n}\r\n\r\nasync function generateFullstackTemplate(projectPath: string): Promise<void> {\r\n await mkdir(join(projectPath, 'src', 'controllers'), { recursive: true });\r\n await mkdir(join(projectPath, 'src', 'resolvers'), { recursive: true });\r\n await mkdir(join(projectPath, 'src', 'websockets'), { recursive: true });\r\n\r\n // Generate main file\r\n const mainFile = `import 'reflect-metadata';\r\nimport { Veloce } from 'veloce-ts';\r\nimport { GraphQLPlugin, WebSocketPlugin } from 'veloce-ts/plugins';\r\nimport { UserController } from './controllers/user.controller';\r\nimport { UserResolver } from './resolvers/user.resolver';\r\nimport { ChatWebSocket } from './websockets/chat.websocket';\r\n\r\nconst app = new Veloce({\r\n title: 'My Fullstack API',\r\n version: '1.0.0',\r\n docs: true,\r\n});\r\n\r\n// REST API\r\napp.include(UserController);\r\n\r\n// GraphQL\r\napp.usePlugin(new GraphQLPlugin({\r\n resolvers: [UserResolver],\r\n}));\r\n\r\n// WebSocket\r\napp.usePlugin(new WebSocketPlugin({\r\n handlers: [ChatWebSocket],\r\n}));\r\n\r\napp.listen(3000, () => {\r\n console.log('Server running on http://localhost:3000');\r\n console.log('REST API docs at http://localhost:3000/docs');\r\n console.log('GraphQL Playground at http://localhost:3000/graphql');\r\n console.log('WebSocket endpoint at ws://localhost:3000/ws/chat');\r\n});\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'index.ts'), mainFile);\r\n\r\n // Generate REST controller\r\n const controllerFile = `import { Controller, Get, Post, Body, Param } from 'veloce-ts';\r\nimport { z } from 'zod';\r\n\r\nconst UserSchema = z.object({\r\n name: z.string(),\r\n email: z.string().email(),\r\n age: z.number().min(0).optional(),\r\n});\r\n\r\ntype User = z.infer<typeof UserSchema>;\r\n\r\n@Controller('/users')\r\nexport class UserController {\r\n private users: User[] = [];\r\n\r\n @Get('/')\r\n async getUsers() {\r\n return { users: this.users };\r\n }\r\n\r\n @Get('/:id')\r\n async getUser(@Param('id') id: string) {\r\n const user = this.users[parseInt(id)];\r\n if (!user) {\r\n throw new Error('User not found');\r\n }\r\n return user;\r\n }\r\n\r\n @Post('/')\r\n async createUser(@Body(UserSchema) user: User) {\r\n this.users.push(user);\r\n return { message: 'User created', user };\r\n }\r\n}\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'controllers', 'user.controller.ts'), controllerFile);\r\n\r\n // Generate GraphQL resolver\r\n const resolverFile = `import { Resolver, Query, Mutation, Arg } from 'veloce-ts/graphql';\r\nimport { z } from 'zod';\r\n\r\nconst UserSchema = z.object({\r\n id: z.string(),\r\n name: z.string(),\r\n email: z.string().email(),\r\n});\r\n\r\ntype User = z.infer<typeof UserSchema>;\r\n\r\n@Resolver()\r\nexport class UserResolver {\r\n private users: User[] = [];\r\n\r\n @Query()\r\n async users(): Promise<User[]> {\r\n return this.users;\r\n }\r\n\r\n @Query()\r\n async user(@Arg('id', z.string()) id: string): Promise<User | null> {\r\n return this.users.find(u => u.id === id) || null;\r\n }\r\n\r\n @Mutation()\r\n async createUser(\r\n @Arg('name', z.string()) name: string,\r\n @Arg('email', z.string().email()) email: string\r\n ): Promise<User> {\r\n const user = { id: Date.now().toString(), name, email };\r\n this.users.push(user);\r\n return user;\r\n }\r\n}\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'resolvers', 'user.resolver.ts'), resolverFile);\r\n\r\n // Generate WebSocket handler\r\n const websocketFile = `import { WebSocket, OnConnect, OnMessage, OnDisconnect } from 'veloce-ts/websocket';\r\nimport { z } from 'zod';\r\nimport type { WebSocketConnection } from 'veloce-ts/websocket';\r\n\r\nconst MessageSchema = z.object({\r\n type: z.enum(['message', 'join', 'leave']),\r\n content: z.string(),\r\n username: z.string(),\r\n});\r\n\r\n@WebSocket('/ws/chat')\r\nexport class ChatWebSocket {\r\n @OnConnect()\r\n handleConnect(connection: WebSocketConnection) {\r\n console.log('Client connected:', connection.id);\r\n connection.send({ type: 'system', content: 'Welcome to the chat!' });\r\n }\r\n\r\n @OnMessage(MessageSchema)\r\n async handleMessage(connection: WebSocketConnection, message: z.infer<typeof MessageSchema>) {\r\n console.log('Received message:', message);\r\n \r\n // Broadcast to all clients\r\n connection.broadcast({\r\n type: 'message',\r\n username: message.username,\r\n content: message.content,\r\n timestamp: new Date().toISOString(),\r\n });\r\n }\r\n\r\n @OnDisconnect()\r\n handleDisconnect(connection: WebSocketConnection) {\r\n console.log('Client disconnected:', connection.id);\r\n }\r\n}\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'websockets', 'chat.websocket.ts'), websocketFile);\r\n}\r\n",
|
|
13
13
|
"import { Command } from 'commander';\r\nimport { spawn } from 'child_process';\r\nimport { existsSync } from 'fs';\r\nimport { join } from 'path';\r\n\r\ninterface DevOptions {\r\n port?: number;\r\n watch?: string;\r\n}\r\n\r\nexport function registerDevCommand(program: Command): void {\r\n program\r\n .command('dev')\r\n .description('Start development server with hot reload')\r\n .option('-p, --port <port>', 'Port to run the server on', '3000')\r\n .option('-w, --watch <path>', 'Additional paths to watch', 'src')\r\n .action(async (options: DevOptions) => {\r\n await startDevServer(options);\r\n });\r\n}\r\n\r\nasync function startDevServer(options: DevOptions): Promise<void> {\r\n const entryPoint = join(process.cwd(), 'src', 'index.ts');\r\n\r\n // Check if entry point exists\r\n if (!existsSync(entryPoint)) {\r\n console.error('Error: src/index.ts not found');\r\n console.error('Make sure you are in a VeloceTS project directory');\r\n process.exit(1);\r\n }\r\n\r\n console.log('Starting development server...');\r\n console.log(`Watching: ${options.watch || 'src'}`);\r\n console.log(`Port: ${options.port || 3000}`);\r\n console.log('\\nPress Ctrl+C to stop\\n');\r\n\r\n // Use Bun's built-in watch mode\r\n const bunArgs = ['--watch', '--hot', entryPoint];\r\n\r\n // Set environment variables\r\n const env = {\r\n ...process.env,\r\n NODE_ENV: 'development',\r\n PORT: options.port?.toString() || '3000',\r\n };\r\n\r\n const bunProcess = spawn('bun', bunArgs, {\r\n stdio: 'inherit',\r\n env,\r\n shell: true,\r\n });\r\n\r\n // Handle process cleanup\r\n const cleanup = () => {\r\n console.log('\\nShutting down development server...');\r\n bunProcess.kill('SIGTERM');\r\n process.exit(0);\r\n };\r\n\r\n process.on('SIGINT', cleanup);\r\n process.on('SIGTERM', cleanup);\r\n\r\n bunProcess.on('error', (error) => {\r\n console.error('Failed to start development server:', error);\r\n process.exit(1);\r\n });\r\n\r\n bunProcess.on('exit', (code) => {\r\n if (code !== 0 && code !== null) {\r\n console.error(`Development server exited with code ${code}`);\r\n process.exit(code);\r\n }\r\n });\r\n}\r\n",
|
|
14
14
|
"import { Command } from 'commander';\r\nimport { existsSync } from 'fs';\r\nimport { join } from 'path';\r\nimport { rm, mkdir } from 'fs/promises';\r\n\r\ninterface BuildOptions {\r\n minify?: boolean;\r\n sourcemap?: boolean;\r\n outdir?: string;\r\n format?: 'esm' | 'cjs' | 'both';\r\n}\r\n\r\nexport function registerBuildCommand(program: Command): void {\r\n program\r\n .command('build')\r\n .description('Build project for production')\r\n .option('-m, --minify', 'Minify output', false)\r\n .option('-s, --sourcemap', 'Generate sourcemaps', true)\r\n .option('-o, --outdir <dir>', 'Output directory', 'dist')\r\n .option('-f, --format <format>', 'Output format (esm, cjs, both)', 'both')\r\n .action(async (options: BuildOptions) => {\r\n await buildProject(options);\r\n });\r\n}\r\n\r\nasync function buildProject(options: BuildOptions): Promise<void> {\r\n const entryPoint = join(process.cwd(), 'src', 'index.ts');\r\n\r\n // Check if entry point exists\r\n if (!existsSync(entryPoint)) {\r\n console.error('Error: src/index.ts not found');\r\n console.error('Make sure you are in a VeloceTS project directory');\r\n process.exit(1);\r\n }\r\n\r\n console.log('Building project for production...');\r\n console.log(`Format: ${options.format || 'both'}`);\r\n console.log(`Minify: ${options.minify ? 'yes' : 'no'}`);\r\n console.log(`Sourcemap: ${options.sourcemap ? 'yes' : 'no'}`);\r\n\r\n const outdir = options.outdir || 'dist';\r\n\r\n try {\r\n // Clean output directory\r\n if (existsSync(outdir)) {\r\n await rm(outdir, { recursive: true, force: true });\r\n }\r\n await mkdir(outdir, { recursive: true });\r\n\r\n const format = options.format || 'both';\r\n const formats = format === 'both' ? ['esm', 'cjs'] : [format];\r\n\r\n for (const fmt of formats) {\r\n console.log(`\\nBuilding ${fmt.toUpperCase()}...`);\r\n await buildFormat(entryPoint, outdir, fmt as 'esm' | 'cjs', options);\r\n }\r\n\r\n console.log('\\n✓ Build completed successfully!');\r\n console.log(`\\nOutput directory: ${outdir}`);\r\n } catch (error) {\r\n console.error('Build failed:', error);\r\n process.exit(1);\r\n }\r\n}\r\n\r\nasync function buildFormat(\r\n entryPoint: string,\r\n outdir: string,\r\n format: 'esm' | 'cjs',\r\n options: BuildOptions\r\n): Promise<void> {\r\n const outputDir = join(outdir, format);\r\n await mkdir(outputDir, { recursive: true });\r\n\r\n const buildResult = await Bun.build({\r\n entrypoints: [entryPoint],\r\n outdir: outputDir,\r\n target: 'bun',\r\n format: format === 'esm' ? 'esm' : 'cjs',\r\n minify: options.minify || false,\r\n sourcemap: options.sourcemap !== false ? 'external' : 'none',\r\n splitting: format === 'esm',\r\n external: [\r\n 'hono',\r\n 'zod',\r\n 'reflect-metadata',\r\n 'commander',\r\n 'zod-to-json-schema',\r\n ],\r\n });\r\n\r\n if (!buildResult.success) {\r\n console.error(`Failed to build ${format}:`);\r\n for (const log of buildResult.logs) {\r\n console.error(log);\r\n }\r\n throw new Error(`Build failed for ${format}`);\r\n }\r\n\r\n console.log(` ✓ ${format.toUpperCase()} build complete`);\r\n console.log(` Files: ${buildResult.outputs.length}`);\r\n \r\n const totalSize = buildResult.outputs.reduce((sum, output) => sum + output.size, 0);\r\n console.log(` Size: ${(totalSize / 1024).toFixed(2)} KB`);\r\n}\r\n",
|
|
15
15
|
"import { Command } from 'commander';\r\nimport { writeFile, mkdir } from 'fs/promises';\r\nimport { join } from 'path';\r\nimport { existsSync } from 'fs';\r\n\r\nexport function registerGenerateCommand(program: Command): void {\r\n const generateCommand = program\r\n .command('generate')\r\n .description('Generate code and documentation')\r\n .alias('g');\r\n\r\n // Generate OpenAPI spec\r\n generateCommand\r\n .command('openapi')\r\n .description('Generate OpenAPI specification')\r\n .option('-o, --output <file>', 'Output file path', 'openapi.json')\r\n .action(async (options: { output: string }) => {\r\n await generateOpenAPI(options);\r\n });\r\n\r\n // Generate TypeScript client\r\n generateCommand\r\n .command('client')\r\n .description('Generate TypeScript client from OpenAPI spec')\r\n .option('-i, --input <file>', 'OpenAPI spec file', 'openapi.json')\r\n .option('-o, --output <dir>', 'Output directory', 'src/client')\r\n .action(async (options: { input: string; output: string }) => {\r\n await generateClient(options);\r\n });\r\n}\r\n\r\nasync function generateOpenAPI(options: { output: string }): Promise<void> {\r\n console.log('Generating OpenAPI specification...');\r\n\r\n try {\r\n // Import the application to extract metadata\r\n const appPath = join(process.cwd(), 'src', 'index.ts');\r\n\r\n if (!existsSync(appPath)) {\r\n console.error('Error: src/index.ts not found');\r\n console.error('Make sure you are in a FastAPI-TS project directory');\r\n process.exit(1);\r\n }\r\n\r\n // Dynamically import the app\r\n const appModule = await import(appPath);\r\n const app = appModule.default || appModule.app;\r\n\r\n if (!app || typeof app.getMetadata !== 'function') {\r\n console.error('Error: Could not find VeloceTS app instance');\r\n console.error('Make sure your src/index.ts exports the app or sets it as default');\r\n process.exit(1);\r\n }\r\n\r\n // Generate OpenAPI spec from metadata\r\n const metadata = app.getMetadata();\r\n const spec = generateOpenAPISpec(metadata, app);\r\n\r\n // Write to file\r\n const outputPath = join(process.cwd(), options.output);\r\n await writeFile(outputPath, JSON.stringify(spec, null, 2));\r\n\r\n console.log(`✓ OpenAPI spec generated: ${options.output}`);\r\n } catch (error) {\r\n console.error('Failed to generate OpenAPI spec:', error);\r\n process.exit(1);\r\n }\r\n}\r\n\r\nfunction generateOpenAPISpec(metadata: any, app: any): any {\r\n const routes = metadata.getRoutes();\r\n\r\n const spec = {\r\n openapi: '3.0.0',\r\n info: {\r\n title: app.config?.title || 'Veloce API',\r\n version: app.config?.version || '1.0.0',\r\n description: app.config?.description || 'API built with Veloce',\r\n },\r\n paths: {} as Record<string, any>,\r\n components: {\r\n schemas: {},\r\n },\r\n };\r\n\r\n // Build paths from routes\r\n for (const route of routes) {\r\n const path = route.path;\r\n const method = route.method.toLowerCase();\r\n\r\n if (!spec.paths[path]) {\r\n spec.paths[path] = {};\r\n }\r\n\r\n spec.paths[path][method] = {\r\n summary: route.docs?.summary || `${method.toUpperCase()} ${path}`,\r\n description: route.docs?.description,\r\n tags: route.docs?.tags || [],\r\n parameters: extractParameters(route),\r\n requestBody: extractRequestBody(route),\r\n responses: {\r\n '200': {\r\n description: 'Successful response',\r\n content: {\r\n 'application/json': {\r\n schema: { type: 'object' },\r\n },\r\n },\r\n },\r\n },\r\n };\r\n }\r\n\r\n return spec;\r\n}\r\n\r\nfunction extractParameters(route: any): any[] {\r\n const params: any[] = [];\r\n\r\n for (const param of route.parameters || []) {\r\n if (param.type === 'query' || param.type === 'param' || param.type === 'header') {\r\n params.push({\r\n name: param.name || 'unknown',\r\n in: param.type === 'param' ? 'path' : param.type,\r\n required: param.required || false,\r\n schema: { type: 'string' },\r\n });\r\n }\r\n }\r\n\r\n return params;\r\n}\r\n\r\nfunction extractRequestBody(route: any): any | undefined {\r\n const bodyParam = route.parameters?.find((p: any) => p.type === 'body');\r\n\r\n if (!bodyParam) {\r\n return undefined;\r\n }\r\n\r\n return {\r\n required: true,\r\n content: {\r\n 'application/json': {\r\n schema: { type: 'object' },\r\n },\r\n },\r\n };\r\n}\r\n\r\nasync function generateClient(options: { input: string; output: string }): Promise<void> {\r\n console.log('Generating TypeScript client...');\r\n\r\n try {\r\n const specPath = join(process.cwd(), options.input);\r\n\r\n if (!existsSync(specPath)) {\r\n console.error(`Error: OpenAPI spec not found at ${options.input}`);\r\n console.error('Run \"veloce generate openapi\" first');\r\n process.exit(1);\r\n }\r\n\r\n // Read OpenAPI spec\r\n const specFile = await Bun.file(specPath).text();\r\n const spec = JSON.parse(specFile);\r\n\r\n // Create output directory\r\n const outputDir = join(process.cwd(), options.output);\r\n await mkdir(outputDir, { recursive: true });\r\n\r\n // Generate client code\r\n const clientCode = generateClientCode(spec);\r\n\r\n // Write client file\r\n const clientPath = join(outputDir, 'client.ts');\r\n await writeFile(clientPath, clientCode);\r\n\r\n // Generate types file\r\n const typesCode = generateTypesCode(spec);\r\n const typesPath = join(outputDir, 'types.ts');\r\n await writeFile(typesPath, typesCode);\r\n\r\n console.log(`✓ TypeScript client generated in ${options.output}`);\r\n console.log(` - ${options.output}/client.ts`);\r\n console.log(` - ${options.output}/types.ts`);\r\n } catch (error) {\r\n console.error('Failed to generate client:', error);\r\n process.exit(1);\r\n }\r\n}\r\n\r\nfunction generateClientCode(spec: any): string {\r\n const baseUrl = spec.servers?.[0]?.url || 'http://localhost:3000';\r\n\r\n let code = `// Generated TypeScript client for ${spec.info.title}\r\n// Version: ${spec.info.version}\r\n\r\nimport type * as Types from './types';\r\n\r\nexport class APIClient {\r\n constructor(private baseUrl: string = '${baseUrl}') {}\r\n\r\n private async request<T>(\r\n method: string,\r\n path: string,\r\n options?: {\r\n params?: Record<string, any>;\r\n body?: any;\r\n headers?: Record<string, string>;\r\n }\r\n ): Promise<T> {\r\n const url = new URL(path, this.baseUrl);\r\n\r\n if (options?.params) {\r\n Object.entries(options.params).forEach(([key, value]) => {\r\n url.searchParams.append(key, String(value));\r\n });\r\n }\r\n\r\n const response = await fetch(url.toString(), {\r\n method,\r\n headers: {\r\n 'Content-Type': 'application/json',\r\n ...options?.headers,\r\n },\r\n body: options?.body ? JSON.stringify(options.body) : undefined,\r\n });\r\n\r\n if (!response.ok) {\r\n throw new Error(\\`API request failed: \\${response.statusText}\\`);\r\n }\r\n\r\n return response.json();\r\n }\r\n\r\n`;\r\n\r\n // Generate methods for each endpoint\r\n for (const [path, methods] of Object.entries(spec.paths || {})) {\r\n for (const [method, operation] of Object.entries(methods as any)) {\r\n const methodName = generateMethodName(method, path, operation);\r\n const methodCode = generateMethodCode(method, path, operation);\r\n code += methodCode + '\\n';\r\n }\r\n }\r\n\r\n code += '}\\n';\r\n\r\n return code;\r\n}\r\n\r\nfunction generateMethodName(method: string, path: string, operation: any): string {\r\n // Use operationId if available, otherwise generate from path\r\n if (operation.operationId) {\r\n return operation.operationId;\r\n }\r\n\r\n // Convert path to camelCase method name\r\n const cleanPath = path\r\n .replace(/\\{|\\}/g, '')\r\n .replace(/\\//g, '_')\r\n .replace(/^_/, '')\r\n .replace(/_([a-z])/g, (_, letter) => letter.toUpperCase());\r\n\r\n return `${method}${cleanPath.charAt(0).toUpperCase() + cleanPath.slice(1)}`;\r\n}\r\n\r\nfunction generateMethodCode(method: string, path: string, operation: any): string {\r\n const methodName = generateMethodName(method, path, operation);\r\n const hasBody = method === 'post' || method === 'put' || method === 'patch';\r\n const hasParams = operation.parameters?.some((p: any) => p.in === 'query');\r\n const hasPathParams = operation.parameters?.some((p: any) => p.in === 'path');\r\n\r\n let params: string[] = [];\r\n let pathParamNames: string[] = [];\r\n\r\n if (hasPathParams) {\r\n const pathParams = operation.parameters.filter((p: any) => p.in === 'path');\r\n pathParamNames = pathParams.map((p: any) => p.name);\r\n params.push(...pathParams.map((p: any) => `${p.name}: string`));\r\n }\r\n\r\n if (hasBody) {\r\n params.push('body: any');\r\n }\r\n\r\n if (hasParams) {\r\n params.push('params?: Record<string, any>');\r\n }\r\n\r\n const paramsStr = params.length > 0 ? params.join(', ') : '';\r\n\r\n // Replace path parameters\r\n let finalPath = path;\r\n for (const paramName of pathParamNames) {\r\n finalPath = finalPath.replace(`{${paramName}}`, `\\${${paramName}}`);\r\n }\r\n\r\n return ` async ${methodName}(${paramsStr}): Promise<any> {\r\n return this.request('${method.toUpperCase()}', \\`${finalPath}\\`, {\r\n ${hasBody ? 'body,' : ''}\r\n ${hasParams ? 'params,' : ''}\r\n });\r\n }\r\n`;\r\n}\r\n\r\nfunction generateTypesCode(spec: any): string {\r\n let code = `// Generated types for ${spec.info.title}\r\n// Version: ${spec.info.version}\r\n\r\n`;\r\n\r\n // Generate types from schemas\r\n if (spec.components?.schemas) {\r\n for (const [name, schema] of Object.entries(spec.components.schemas)) {\r\n code += `export interface ${name} {\\n`;\r\n code += generateInterfaceProperties(schema as any);\r\n code += '}\\n\\n';\r\n }\r\n }\r\n\r\n return code;\r\n}\r\n\r\nfunction generateInterfaceProperties(schema: any, indent: string = ' '): string {\r\n let props = '';\r\n\r\n if (schema.properties) {\r\n for (const [propName, propSchema] of Object.entries(schema.properties)) {\r\n const prop = propSchema as any;\r\n const optional = !schema.required?.includes(propName);\r\n const type = mapJsonSchemaType(prop);\r\n props += `${indent}${propName}${optional ? '?' : ''}: ${type};\\n`;\r\n }\r\n }\r\n\r\n return props;\r\n}\r\n\r\nfunction mapJsonSchemaType(schema: any): string {\r\n if (schema.type === 'string') return 'string';\r\n if (schema.type === 'number' || schema.type === 'integer') return 'number';\r\n if (schema.type === 'boolean') return 'boolean';\r\n if (schema.type === 'array') {\r\n const itemType = schema.items ? mapJsonSchemaType(schema.items) : 'any';\r\n return `${itemType}[]`;\r\n }\r\n if (schema.type === 'object') return 'Record<string, any>';\r\n return 'any';\r\n}\r\n",
|
|
16
16
|
"import commander from './index.js';\n\n// wrapper to provide named exports for ESM.\nexport const {\n program,\n createCommand,\n createArgument,\n createOption,\n CommanderError,\n InvalidArgumentError,\n InvalidOptionArgumentError, // deprecated old name\n Command,\n Argument,\n Option,\n Help,\n} = commander;\n",
|
|
17
17
|
"#!/usr/bin/env bun\r\nimport { Command } from 'commander';\r\nimport { readFileSync } from 'fs';\r\nimport { join } from 'path';\r\n\r\n// Get package.json version\r\nconst getVersion = (): string => {\r\n try {\r\n const packagePath = join(process.cwd(), 'package.json');\r\n const packageJson = JSON.parse(readFileSync(packagePath, 'utf-8'));\r\n return packageJson.version || '0.1.0';\r\n } catch {\r\n return '0.1.0';\r\n }\r\n};\r\n\r\nconst program = new Command();\r\n\r\nprogram\r\n .name('veloce')\r\n .description('A modern, fast web framework for TypeScript inspired by FastAPI')\r\n .version(getVersion(), '-v, --version', 'Display version number')\r\n .helpOption('-h, --help', 'Display help for command');\r\n\r\n// Import and register subcommands\r\nasync function main() {\r\n const { registerNewCommand } = await import('./commands/new');\r\n const { registerDevCommand } = await import('./commands/dev');\r\n const { registerBuildCommand } = await import('./commands/build');\r\n const { registerGenerateCommand } = await import('./commands/generate');\r\n\r\n registerNewCommand(program);\r\n registerDevCommand(program);\r\n registerBuildCommand(program);\r\n registerGenerateCommand(program);\r\n\r\n // Parse arguments\r\n program.parse(process.argv);\r\n}\r\n\r\nmain().catch((error) => {\r\n console.error('CLI error:', error);\r\n process.exit(1);\r\n});\r\n"
|
|
18
18
|
],
|
|
19
|
-
"mappings": ";sxBAGA,MAAM,UAAuB,KAAM,CAOjC,WAAW,CAAC,EAAU,EAAM,EAAS,CACnC,MAAM,CAAO,EAEb,MAAM,kBAAkB,KAAM,KAAK,WAAW,EAC9C,KAAK,KAAO,KAAK,YAAY,KAC7B,KAAK,KAAO,EACZ,KAAK,SAAW,EAChB,KAAK,YAAc,OAEvB,CAKA,MAAM,UAA6B,CAAe,CAKhD,WAAW,CAAC,EAAS,CACnB,MAAM,EAAG,4BAA6B,CAAO,EAE7C,MAAM,kBAAkB,KAAM,KAAK,WAAW,EAC9C,KAAK,KAAO,KAAK,YAAY,KAEjC,CAEA,EAAQ,eAAiB,EACzB,EAAQ,qBAAuB,kBCtC/B,IAAQ,6BAER,MAAM,CAAS,CAUb,WAAW,CAAC,EAAM,EAAa,CAQ7B,OAPA,KAAK,YAAc,GAAe,GAClC,KAAK,SAAW,GAChB,KAAK,SAAW,OAChB,KAAK,aAAe,OACpB,KAAK,wBAA0B,OAC/B,KAAK,WAAa,OAEV,EAAK,QACN,IACH,KAAK,SAAW,GAChB,KAA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I,CACF,IAAM,EAAc,QAAK,QAAQ,IAAI,EAAG,cAAc,EAEtD,OADoB,KAAK,MAAM,gBAAa,EAAa,OAAO,CAAC,EAC9C,SAAW,QAC9B,KAAM,CACN,MAAO,UAIL,EAAU,IAAI,GAEpB,EACG,KAAK,QAAQ,EACb,YAAY,iEAAiE,EAC7E,QAAQ,GAAW,EAAG,gBAAiB,wBAAwB,EAC/D,WAAW,aAAc,0BAA0B,EAGtD,eAAe,EAAI,EAAG,CACpB,IAAQ,sBAAuB,+CACvB,sBAAuB,+CACvB,wBAAyB,+CACzB,2BAA4B,8CAEpC,EAAmB,CAAO,EAC1B,EAAmB,CAAO,EAC1B,EAAqB,CAAO,EAC5B,EAAwB,CAAO,EAG/B,EAAQ,MAAM,QAAQ,IAAI,EAG5B,GAAK,EAAE,MAAM,CAAC,IAAU,CACtB,QAAQ,MAAM,aAAc,CAAK,EACjC,QAAQ,KAAK,CAAC,EACf",
|
|
20
|
+
"debugId": "AD523F2AC9AC339064756E2164756E21",
|
|
21
21
|
"names": []
|
|
22
22
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import"./chunk-42h6trpf.js";import{mkdir as H,writeFile as D}from"fs/promises";import{join as A}from"path";import{existsSync as M}from"fs";function y(q){q.command("new").description("Create a new VeloceTS project").argument("<name>","Project name").option("-t, --template <template>","Project template (rest, graphql, websocket, fullstack)","rest").action(async(B,z)=>{await N(B,z)})}async function N(q,B){let z=A(process.cwd(),q);if(M(z))console.error(`Error: Directory "${q}" already exists`),process.exit(1);console.log(`Creating new VeloceTS project: ${q}`),console.log(`Template: ${B.template}`);try{switch(await H(z,{recursive:!0}),await H(A(z,"src"),{recursive:!0}),await H(A(z,"src","controllers"),{recursive:!0}),await O(z,q),await U(z),await V(z),await X(z,q,B.template),B.template){case"rest":await Y(z);break;case"graphql":await Z(z);break;case"websocket":await _(z);break;case"fullstack":await $(z);break}console.log(`
|
|
3
3
|
\u2713 Project created successfully!`),console.log(`
|
|
4
|
-
Next steps:`),console.log(` cd ${q}`),console.log(" bun install"),console.log(" bun run dev")}catch(I){console.error("Error creating project:",I),process.exit(1)}}async function O(q,B){let z={name:B,version:"0.1.0",description:"A
|
|
4
|
+
Next steps:`),console.log(` cd ${q}`),console.log(" bun install"),console.log(" bun run dev")}catch(I){console.error("Error creating project:",I),process.exit(1)}}async function O(q,B){let z={name:B,version:"0.1.0",description:"A Veloce-TS application",type:"module",main:"./dist/index.js",scripts:{dev:"bun --watch src/index.ts",build:"bun build src/index.ts --outdir dist --target bun",start:"bun run dist/index.js","generate:openapi":"bun run node_modules/veloce-ts/bin/veloce.ts generate openapi","generate:client":"bun run node_modules/veloce-ts/bin/veloce.ts generate client"},dependencies:{"veloce-ts":"^0.1.0",hono:"^4.0.0","reflect-metadata":"^0.2.0",zod:"^3.22.0"},devDependencies:{"@types/bun":"latest",typescript:"^5.3.0"}};await D(A(q,"package.json"),JSON.stringify(z,null,2))}async function U(q){let B={compilerOptions:{target:"ES2022",module:"ESNext",lib:["ES2022"],moduleResolution:"bundler",experimentalDecorators:!0,emitDecoratorMetadata:!0,strict:!0,esModuleInterop:!0,skipLibCheck:!0,forceConsistentCasingInFileNames:!0,resolveJsonModule:!0,outDir:"./dist",rootDir:"./src"},include:["src/**/*"],exclude:["node_modules","dist"]};await D(A(q,"tsconfig.json"),JSON.stringify(B,null,2))}async function V(q){await D(A(q,".gitignore"),`node_modules/
|
|
5
5
|
dist/
|
|
6
6
|
*.log
|
|
7
7
|
.env
|
|
@@ -34,7 +34,7 @@ bun run build
|
|
|
34
34
|
|
|
35
35
|
Visit http://localhost:3000/docs to see the API documentation.
|
|
36
36
|
`;await D(A(q,"README.md"),I)}async function Y(q){await D(A(q,"src","index.ts"),`import 'reflect-metadata';
|
|
37
|
-
import { Veloce } from '
|
|
37
|
+
import { Veloce } from 'veloce-ts';
|
|
38
38
|
import { UserController } from './controllers/user.controller';
|
|
39
39
|
|
|
40
40
|
const app = new Veloce({
|
|
@@ -51,7 +51,7 @@ app.listen(3000, () => {
|
|
|
51
51
|
console.log('Server running on http://localhost:3000');
|
|
52
52
|
console.log('Docs available at http://localhost:3000/docs');
|
|
53
53
|
});
|
|
54
|
-
`);let z=`import { Controller, Get, Post, Body, Param } from '
|
|
54
|
+
`);let z=`import { Controller, Get, Post, Body, Param } from 'veloce-ts';
|
|
55
55
|
import { z } from 'zod';
|
|
56
56
|
|
|
57
57
|
const UserSchema = z.object({
|
|
@@ -87,8 +87,8 @@ export class UserController {
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
`;await D(A(q,"src","controllers","user.controller.ts"),z)}async function Z(q){await H(A(q,"src","resolvers"),{recursive:!0});let B=`import 'reflect-metadata';
|
|
90
|
-
import { Veloce } from '
|
|
91
|
-
import { GraphQLPlugin } from '
|
|
90
|
+
import { Veloce } from 'veloce-ts';
|
|
91
|
+
import { GraphQLPlugin } from 'veloce-ts/plugins';
|
|
92
92
|
import { UserResolver } from './resolvers/user.resolver';
|
|
93
93
|
|
|
94
94
|
const app = new Veloce({
|
|
@@ -105,7 +105,7 @@ app.listen(3000, () => {
|
|
|
105
105
|
console.log('Server running on http://localhost:3000');
|
|
106
106
|
console.log('GraphQL Playground at http://localhost:3000/graphql');
|
|
107
107
|
});
|
|
108
|
-
`;await D(A(q,"src","index.ts"),B);let z=`import { Resolver, Query, Mutation, Arg } from '
|
|
108
|
+
`;await D(A(q,"src","index.ts"),B);let z=`import { Resolver, Query, Mutation, Arg } from 'veloce-ts/graphql';
|
|
109
109
|
import { z } from 'zod';
|
|
110
110
|
|
|
111
111
|
const UserSchema = z.object({
|
|
@@ -141,8 +141,8 @@ export class UserResolver {
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
`;await D(A(q,"src","resolvers","user.resolver.ts"),z)}async function _(q){await H(A(q,"src","websockets"),{recursive:!0});let B=`import 'reflect-metadata';
|
|
144
|
-
import { Veloce } from '
|
|
145
|
-
import { WebSocketPlugin } from '
|
|
144
|
+
import { Veloce } from 'veloce-ts';
|
|
145
|
+
import { WebSocketPlugin } from 'veloce-ts/plugins';
|
|
146
146
|
import { ChatWebSocket } from './websockets/chat.websocket';
|
|
147
147
|
|
|
148
148
|
const app = new Veloce({
|
|
@@ -159,9 +159,9 @@ app.listen(3000, () => {
|
|
|
159
159
|
console.log('Server running on http://localhost:3000');
|
|
160
160
|
console.log('WebSocket endpoint at ws://localhost:3000/ws/chat');
|
|
161
161
|
});
|
|
162
|
-
`;await D(A(q,"src","index.ts"),B);let z=`import { WebSocket, OnConnect, OnMessage, OnDisconnect } from '
|
|
162
|
+
`;await D(A(q,"src","index.ts"),B);let z=`import { WebSocket, OnConnect, OnMessage, OnDisconnect } from 'veloce-ts/websocket';
|
|
163
163
|
import { z } from 'zod';
|
|
164
|
-
import type { WebSocketConnection } from '
|
|
164
|
+
import type { WebSocketConnection } from 'veloce-ts/websocket';
|
|
165
165
|
|
|
166
166
|
const MessageSchema = z.object({
|
|
167
167
|
type: z.enum(['message', 'join', 'leave']),
|
|
@@ -196,8 +196,8 @@ export class ChatWebSocket {
|
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
198
|
`;await D(A(q,"src","websockets","chat.websocket.ts"),z)}async function $(q){await H(A(q,"src","controllers"),{recursive:!0}),await H(A(q,"src","resolvers"),{recursive:!0}),await H(A(q,"src","websockets"),{recursive:!0});let B=`import 'reflect-metadata';
|
|
199
|
-
import { Veloce } from '
|
|
200
|
-
import { GraphQLPlugin, WebSocketPlugin } from '
|
|
199
|
+
import { Veloce } from 'veloce-ts';
|
|
200
|
+
import { GraphQLPlugin, WebSocketPlugin } from 'veloce-ts/plugins';
|
|
201
201
|
import { UserController } from './controllers/user.controller';
|
|
202
202
|
import { UserResolver } from './resolvers/user.resolver';
|
|
203
203
|
import { ChatWebSocket } from './websockets/chat.websocket';
|
|
@@ -227,7 +227,7 @@ app.listen(3000, () => {
|
|
|
227
227
|
console.log('GraphQL Playground at http://localhost:3000/graphql');
|
|
228
228
|
console.log('WebSocket endpoint at ws://localhost:3000/ws/chat');
|
|
229
229
|
});
|
|
230
|
-
`;await D(A(q,"src","index.ts"),B);let z=`import { Controller, Get, Post, Body, Param } from '
|
|
230
|
+
`;await D(A(q,"src","index.ts"),B);let z=`import { Controller, Get, Post, Body, Param } from 'veloce-ts';
|
|
231
231
|
import { z } from 'zod';
|
|
232
232
|
|
|
233
233
|
const UserSchema = z.object({
|
|
@@ -262,7 +262,7 @@ export class UserController {
|
|
|
262
262
|
return { message: 'User created', user };
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
|
-
`;await D(A(q,"src","controllers","user.controller.ts"),z);let I=`import { Resolver, Query, Mutation, Arg } from '
|
|
265
|
+
`;await D(A(q,"src","controllers","user.controller.ts"),z);let I=`import { Resolver, Query, Mutation, Arg } from 'veloce-ts/graphql';
|
|
266
266
|
import { z } from 'zod';
|
|
267
267
|
|
|
268
268
|
const UserSchema = z.object({
|
|
@@ -297,9 +297,9 @@ export class UserResolver {
|
|
|
297
297
|
return user;
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
|
-
`;await D(A(q,"src","resolvers","user.resolver.ts"),I);let K=`import { WebSocket, OnConnect, OnMessage, OnDisconnect } from '
|
|
300
|
+
`;await D(A(q,"src","resolvers","user.resolver.ts"),I);let K=`import { WebSocket, OnConnect, OnMessage, OnDisconnect } from 'veloce-ts/websocket';
|
|
301
301
|
import { z } from 'zod';
|
|
302
|
-
import type { WebSocketConnection } from '
|
|
302
|
+
import type { WebSocketConnection } from 'veloce-ts/websocket';
|
|
303
303
|
|
|
304
304
|
const MessageSchema = z.object({
|
|
305
305
|
type: z.enum(['message', 'join', 'leave']),
|
|
@@ -335,4 +335,4 @@ export class ChatWebSocket {
|
|
|
335
335
|
}
|
|
336
336
|
`;await D(A(q,"src","websockets","chat.websocket.ts"),K)}export{y as registerNewCommand};
|
|
337
337
|
|
|
338
|
-
//# debugId=
|
|
338
|
+
//# debugId=FCF2CF36E112B7F464756E2164756E21
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["..\\..\\src\\cli\\commands\\new.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import { Command } from 'commander';\r\nimport { mkdir, writeFile } from 'fs/promises';\r\nimport { join } from 'path';\r\nimport { existsSync } from 'fs';\r\n\r\ntype Template = 'rest' | 'graphql' | 'websocket' | 'fullstack';\r\n\r\ninterface ProjectOptions {\r\n template: Template;\r\n}\r\n\r\nexport function registerNewCommand(program: Command): void {\r\n program\r\n .command('new')\r\n .description('Create a new VeloceTS project')\r\n .argument('<name>', 'Project name')\r\n .option('-t, --template <template>', 'Project template (rest, graphql, websocket, fullstack)', 'rest')\r\n .action(async (name: string, options: ProjectOptions) => {\r\n await createProject(name, options);\r\n });\r\n}\r\n\r\nasync function createProject(name: string, options: ProjectOptions): Promise<void> {\r\n const projectPath = join(process.cwd(), name);\r\n\r\n // Check if directory already exists\r\n if (existsSync(projectPath)) {\r\n console.error(`Error: Directory \"${name}\" already exists`);\r\n process.exit(1);\r\n }\r\n\r\n console.log(`Creating new VeloceTS project: ${name}`);\r\n console.log(`Template: ${options.template}`);\r\n\r\n try {\r\n // Create project directory\r\n await mkdir(projectPath, { recursive: true });\r\n\r\n // Create subdirectories\r\n await mkdir(join(projectPath, 'src'), { recursive: true });\r\n await mkdir(join(projectPath, 'src', 'controllers'), { recursive: true });\r\n\r\n // Generate files based on template\r\n await generatePackageJson(projectPath, name);\r\n await generateTsConfig(projectPath);\r\n await generateGitignore(projectPath);\r\n await generateReadme(projectPath, name, options.template);\r\n\r\n switch (options.template) {\r\n case 'rest':\r\n await generateRestTemplate(projectPath);\r\n break;\r\n case 'graphql':\r\n await generateGraphQLTemplate(projectPath);\r\n break;\r\n case 'websocket':\r\n await generateWebSocketTemplate(projectPath);\r\n break;\r\n case 'fullstack':\r\n await generateFullstackTemplate(projectPath);\r\n break;\r\n }\r\n\r\n console.log('\\n✓ Project created successfully!');\r\n console.log('\\nNext steps:');\r\n console.log(` cd ${name}`);\r\n console.log(' bun install');\r\n console.log(' bun run dev');\r\n } catch (error) {\r\n console.error('Error creating project:', error);\r\n process.exit(1);\r\n }\r\n}\r\n\r\nasync function generatePackageJson(projectPath: string, name: string): Promise<void> {\r\n const packageJson = {\r\n name,\r\n version: '0.1.0',\r\n description: 'A Veloce-TS application',\r\n type: 'module',\r\n main: './dist/index.js',\r\n scripts: {\r\n dev: 'bun --watch src/index.ts',\r\n build: 'bun build src/index.ts --outdir dist --target bun',\r\n start: 'bun run dist/index.js',\r\n 'generate:openapi': 'bun run node_modules/veloce-ts/bin/veloce.ts generate openapi',\r\n 'generate:client': 'bun run node_modules/veloce-ts/bin/veloce.ts generate client',\r\n },\r\n dependencies: {\r\n 'veloce-ts': '^0.1.0',\r\n hono: '^4.0.0',\r\n 'reflect-metadata': '^0.2.0',\r\n zod: '^3.22.0',\r\n },\r\n devDependencies: {\r\n '@types/bun': 'latest',\r\n typescript: '^5.3.0',\r\n },\r\n };\r\n\r\n await writeFile(\r\n join(projectPath, 'package.json'),\r\n JSON.stringify(packageJson, null, 2)\r\n );\r\n}\r\n\r\nasync function generateTsConfig(projectPath: string): Promise<void> {\r\n const tsConfig = {\r\n compilerOptions: {\r\n target: 'ES2022',\r\n module: 'ESNext',\r\n lib: ['ES2022'],\r\n moduleResolution: 'bundler',\r\n experimentalDecorators: true,\r\n emitDecoratorMetadata: true,\r\n strict: true,\r\n esModuleInterop: true,\r\n skipLibCheck: true,\r\n forceConsistentCasingInFileNames: true,\r\n resolveJsonModule: true,\r\n outDir: './dist',\r\n rootDir: './src',\r\n },\r\n include: ['src/**/*'],\r\n exclude: ['node_modules', 'dist'],\r\n };\r\n\r\n await writeFile(\r\n join(projectPath, 'tsconfig.json'),\r\n JSON.stringify(tsConfig, null, 2)\r\n );\r\n}\r\n\r\nasync function generateGitignore(projectPath: string): Promise<void> {\r\n const gitignore = `node_modules/\r\ndist/\r\n*.log\r\n.env\r\n.DS_Store\r\n`;\r\n\r\n await writeFile(join(projectPath, '.gitignore'), gitignore);\r\n}\r\n\r\nasync function generateReadme(projectPath: string, name: string, template: Template): Promise<void> {\r\n const readme = `# ${name}\r\n\r\nA VeloceTS application using the ${template} template.\r\n\r\n## Getting Started\r\n\r\nInstall dependencies:\r\n\r\n\\`\\`\\`bash\r\nbun install\r\n\\`\\`\\`\r\n\r\nRun the development server:\r\n\r\n\\`\\`\\`bash\r\nbun run dev\r\n\\`\\`\\`\r\n\r\nBuild for production:\r\n\r\n\\`\\`\\`bash\r\nbun run build\r\n\\`\\`\\`\r\n\r\n## Documentation\r\n\r\nVisit http://localhost:3000/docs to see the API documentation.\r\n`;\r\n\r\n await writeFile(join(projectPath, 'README.md'), readme);\r\n}\r\n\r\nasync function generateRestTemplate(projectPath: string): Promise<void> {\r\n // Create main entry point\r\n const mainFile = `import 'reflect-metadata';\r\nimport { Veloce } from 'veloce-ts';\r\nimport { UserController } from './controllers/user.controller';\r\n\r\nconst app = new Veloce({\r\n title: 'My REST API',\r\n version: '1.0.0',\r\n docs: true,\r\n});\r\n\r\n// Register controllers\r\napp.include(UserController);\r\n\r\n// Start server\r\napp.listen(3000, () => {\r\n console.log('Server running on http://localhost:3000');\r\n console.log('Docs available at http://localhost:3000/docs');\r\n});\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'index.ts'), mainFile);\r\n\r\n // Create example controller\r\n const controllerFile = `import { Controller, Get, Post, Body, Param } from 'veloce-ts';\r\nimport { z } from 'zod';\r\n\r\nconst UserSchema = z.object({\r\n name: z.string(),\r\n email: z.string().email(),\r\n age: z.number().min(0).optional(),\r\n});\r\n\r\ntype User = z.infer<typeof UserSchema>;\r\n\r\n@Controller('/users')\r\nexport class UserController {\r\n private users: User[] = [];\r\n\r\n @Get('/')\r\n async getUsers() {\r\n return { users: this.users };\r\n }\r\n\r\n @Get('/:id')\r\n async getUser(@Param('id') id: string) {\r\n const user = this.users[parseInt(id)];\r\n if (!user) {\r\n throw new Error('User not found');\r\n }\r\n return user;\r\n }\r\n\r\n @Post('/')\r\n async createUser(@Body(UserSchema) user: User) {\r\n this.users.push(user);\r\n return { message: 'User created', user };\r\n }\r\n}\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'controllers', 'user.controller.ts'), controllerFile);\r\n}\r\n\r\nasync function generateGraphQLTemplate(projectPath: string): Promise<void> {\r\n await mkdir(join(projectPath, 'src', 'resolvers'), { recursive: true });\r\n\r\n const mainFile = `import 'reflect-metadata';\r\nimport { Veloce } from 'veloce-ts';\r\nimport { GraphQLPlugin } from 'veloce-ts/plugins';\r\nimport { UserResolver } from './resolvers/user.resolver';\r\n\r\nconst app = new Veloce({\r\n title: 'My GraphQL API',\r\n version: '1.0.0',\r\n});\r\n\r\n// Enable GraphQL\r\napp.usePlugin(new GraphQLPlugin({\r\n resolvers: [UserResolver],\r\n}));\r\n\r\napp.listen(3000, () => {\r\n console.log('Server running on http://localhost:3000');\r\n console.log('GraphQL Playground at http://localhost:3000/graphql');\r\n});\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'index.ts'), mainFile);\r\n\r\n const resolverFile = `import { Resolver, Query, Mutation, Arg } from 'veloce-ts/graphql';\r\nimport { z } from 'zod';\r\n\r\nconst UserSchema = z.object({\r\n id: z.string(),\r\n name: z.string(),\r\n email: z.string().email(),\r\n});\r\n\r\ntype User = z.infer<typeof UserSchema>;\r\n\r\n@Resolver()\r\nexport class UserResolver {\r\n private users: User[] = [];\r\n\r\n @Query()\r\n async users(): Promise<User[]> {\r\n return this.users;\r\n }\r\n\r\n @Query()\r\n async user(@Arg('id', z.string()) id: string): Promise<User | null> {\r\n return this.users.find(u => u.id === id) || null;\r\n }\r\n\r\n @Mutation()\r\n async createUser(\r\n @Arg('name', z.string()) name: string,\r\n @Arg('email', z.string().email()) email: string\r\n ): Promise<User> {\r\n const user = { id: Date.now().toString(), name, email };\r\n this.users.push(user);\r\n return user;\r\n }\r\n}\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'resolvers', 'user.resolver.ts'), resolverFile);\r\n}\r\n\r\nasync function generateWebSocketTemplate(projectPath: string): Promise<void> {\r\n await mkdir(join(projectPath, 'src', 'websockets'), { recursive: true });\r\n\r\n const mainFile = `import 'reflect-metadata';\r\nimport { Veloce } from 'veloce-ts';\r\nimport { WebSocketPlugin } from 'veloce-ts/plugins';\r\nimport { ChatWebSocket } from './websockets/chat.websocket';\r\n\r\nconst app = new Veloce({\r\n title: 'My WebSocket API',\r\n version: '1.0.0',\r\n});\r\n\r\n// Enable WebSocket\r\napp.usePlugin(new WebSocketPlugin({\r\n handlers: [ChatWebSocket],\r\n}));\r\n\r\napp.listen(3000, () => {\r\n console.log('Server running on http://localhost:3000');\r\n console.log('WebSocket endpoint at ws://localhost:3000/ws/chat');\r\n});\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'index.ts'), mainFile);\r\n\r\n const websocketFile = `import { WebSocket, OnConnect, OnMessage, OnDisconnect } from 'veloce-ts/websocket';\r\nimport { z } from 'zod';\r\nimport type { WebSocketConnection } from 'veloce-ts/websocket';\r\n\r\nconst MessageSchema = z.object({\r\n type: z.enum(['message', 'join', 'leave']),\r\n content: z.string(),\r\n username: z.string(),\r\n});\r\n\r\n@WebSocket('/ws/chat')\r\nexport class ChatWebSocket {\r\n @OnConnect()\r\n handleConnect(connection: WebSocketConnection) {\r\n console.log('Client connected:', connection.id);\r\n connection.send({ type: 'system', content: 'Welcome to the chat!' });\r\n }\r\n\r\n @OnMessage(MessageSchema)\r\n async handleMessage(connection: WebSocketConnection, message: z.infer<typeof MessageSchema>) {\r\n console.log('Received message:', message);\r\n \r\n // Broadcast to all clients\r\n connection.broadcast({\r\n type: 'message',\r\n username: message.username,\r\n content: message.content,\r\n timestamp: new Date().toISOString(),\r\n });\r\n }\r\n\r\n @OnDisconnect()\r\n handleDisconnect(connection: WebSocketConnection) {\r\n console.log('Client disconnected:', connection.id);\r\n }\r\n}\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'websockets', 'chat.websocket.ts'), websocketFile);\r\n}\r\n\r\nasync function generateFullstackTemplate(projectPath: string): Promise<void> {\r\n await mkdir(join(projectPath, 'src', 'controllers'), { recursive: true });\r\n await mkdir(join(projectPath, 'src', 'resolvers'), { recursive: true });\r\n await mkdir(join(projectPath, 'src', 'websockets'), { recursive: true });\r\n\r\n // Generate main file\r\n const mainFile = `import 'reflect-metadata';\r\nimport { Veloce } from 'veloce-ts';\r\nimport { GraphQLPlugin, WebSocketPlugin } from 'veloce-ts/plugins';\r\nimport { UserController } from './controllers/user.controller';\r\nimport { UserResolver } from './resolvers/user.resolver';\r\nimport { ChatWebSocket } from './websockets/chat.websocket';\r\n\r\nconst app = new Veloce({\r\n title: 'My Fullstack API',\r\n version: '1.0.0',\r\n docs: true,\r\n});\r\n\r\n// REST API\r\napp.include(UserController);\r\n\r\n// GraphQL\r\napp.usePlugin(new GraphQLPlugin({\r\n resolvers: [UserResolver],\r\n}));\r\n\r\n// WebSocket\r\napp.usePlugin(new WebSocketPlugin({\r\n handlers: [ChatWebSocket],\r\n}));\r\n\r\napp.listen(3000, () => {\r\n console.log('Server running on http://localhost:3000');\r\n console.log('REST API docs at http://localhost:3000/docs');\r\n console.log('GraphQL Playground at http://localhost:3000/graphql');\r\n console.log('WebSocket endpoint at ws://localhost:3000/ws/chat');\r\n});\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'index.ts'), mainFile);\r\n\r\n // Generate REST controller\r\n const controllerFile = `import { Controller, Get, Post, Body, Param } from 'veloce-ts';\r\nimport { z } from 'zod';\r\n\r\nconst UserSchema = z.object({\r\n name: z.string(),\r\n email: z.string().email(),\r\n age: z.number().min(0).optional(),\r\n});\r\n\r\ntype User = z.infer<typeof UserSchema>;\r\n\r\n@Controller('/users')\r\nexport class UserController {\r\n private users: User[] = [];\r\n\r\n @Get('/')\r\n async getUsers() {\r\n return { users: this.users };\r\n }\r\n\r\n @Get('/:id')\r\n async getUser(@Param('id') id: string) {\r\n const user = this.users[parseInt(id)];\r\n if (!user) {\r\n throw new Error('User not found');\r\n }\r\n return user;\r\n }\r\n\r\n @Post('/')\r\n async createUser(@Body(UserSchema) user: User) {\r\n this.users.push(user);\r\n return { message: 'User created', user };\r\n }\r\n}\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'controllers', 'user.controller.ts'), controllerFile);\r\n\r\n // Generate GraphQL resolver\r\n const resolverFile = `import { Resolver, Query, Mutation, Arg } from 'veloce-ts/graphql';\r\nimport { z } from 'zod';\r\n\r\nconst UserSchema = z.object({\r\n id: z.string(),\r\n name: z.string(),\r\n email: z.string().email(),\r\n});\r\n\r\ntype User = z.infer<typeof UserSchema>;\r\n\r\n@Resolver()\r\nexport class UserResolver {\r\n private users: User[] = [];\r\n\r\n @Query()\r\n async users(): Promise<User[]> {\r\n return this.users;\r\n }\r\n\r\n @Query()\r\n async user(@Arg('id', z.string()) id: string): Promise<User | null> {\r\n return this.users.find(u => u.id === id) || null;\r\n }\r\n\r\n @Mutation()\r\n async createUser(\r\n @Arg('name', z.string()) name: string,\r\n @Arg('email', z.string().email()) email: string\r\n ): Promise<User> {\r\n const user = { id: Date.now().toString(), name, email };\r\n this.users.push(user);\r\n return user;\r\n }\r\n}\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'resolvers', 'user.resolver.ts'), resolverFile);\r\n\r\n // Generate WebSocket handler\r\n const websocketFile = `import { WebSocket, OnConnect, OnMessage, OnDisconnect } from 'veloce-ts/websocket';\r\nimport { z } from 'zod';\r\nimport type { WebSocketConnection } from 'veloce-ts/websocket';\r\n\r\nconst MessageSchema = z.object({\r\n type: z.enum(['message', 'join', 'leave']),\r\n content: z.string(),\r\n username: z.string(),\r\n});\r\n\r\n@WebSocket('/ws/chat')\r\nexport class ChatWebSocket {\r\n @OnConnect()\r\n handleConnect(connection: WebSocketConnection) {\r\n console.log('Client connected:', connection.id);\r\n connection.send({ type: 'system', content: 'Welcome to the chat!' });\r\n }\r\n\r\n @OnMessage(MessageSchema)\r\n async handleMessage(connection: WebSocketConnection, message: z.infer<typeof MessageSchema>) {\r\n console.log('Received message:', message);\r\n \r\n // Broadcast to all clients\r\n connection.broadcast({\r\n type: 'message',\r\n username: message.username,\r\n content: message.content,\r\n timestamp: new Date().toISOString(),\r\n });\r\n }\r\n\r\n @OnDisconnect()\r\n handleDisconnect(connection: WebSocketConnection) {\r\n console.log('Client disconnected:', connection.id);\r\n }\r\n}\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'websockets', 'chat.websocket.ts'), websocketFile);\r\n}\r\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";4BACA,gBAAS,eAAO,oBAChB,eAAS,aACT,qBAAS,WAQF,SAAS,CAAkB,CAAC,EAAwB,CACzD,EACG,QAAQ,KAAK,EACb,YAAY,+BAA+B,EAC3C,SAAS,SAAU,cAAc,EACjC,OAAO,4BAA6B,yDAA0D,MAAM,EACpG,OAAO,MAAO,EAAc,IAA4B,CACvD,MAAM,EAAc,EAAM,CAAO,EAClC,EAGL,eAAe,CAAa,CAAC,EAAc,EAAwC,CACjF,IAAM,EAAc,EAAK,QAAQ,IAAI,EAAG,CAAI,EAG5C,GAAI,EAAW,CAAW,EACxB,QAAQ,MAAM,qBAAqB,mBAAsB,EACzD,QAAQ,KAAK,CAAC,EAGhB,QAAQ,IAAI,kCAAkC,GAAM,EACpD,QAAQ,IAAI,aAAa,EAAQ,UAAU,EAE3C,GAAI,CAcF,OAZA,MAAM,EAAM,EAAa,CAAE,UAAW,EAAK,CAAC,EAG5C,MAAM,EAAM,EAAK,EAAa,KAAK,EAAG,CAAE,UAAW,EAAK,CAAC,EACzD,MAAM,EAAM,EAAK,EAAa,MAAO,aAAa,EAAG,CAAE,UAAW,EAAK,CAAC,EAGxE,MAAM,EAAoB,EAAa,CAAI,EAC3C,MAAM,EAAiB,CAAW,EAClC,MAAM,EAAkB,CAAW,EACnC,MAAM,EAAe,EAAa,EAAM,EAAQ,QA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AAA;AAAA;AAAA;AAAA,EAkCjB,MAAM,EAAU,EAAK,EAAa,MAAO,UAAU,EAAG,CAAQ,EAG9D,IAAM,EAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAqCvB,MAAM,EAAU,EAAK,EAAa,MAAO,cAAe,oBAAoB,EAAG,CAAc,EAG7F,IAAM,EAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAqCrB,MAAM,EAAU,EAAK,EAAa,MAAO,YAAa,kBAAkB,EAAG,CAAY,EAGvF,IAAM,EAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAsCtB,MAAM,EAAU,EAAK,EAAa,MAAO,aAAc,mBAAmB,EAAG,CAAa",
|
|
8
|
+
"debugId": "FCF2CF36E112B7F464756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|
|
@@ -25,6 +25,6 @@ Expecting one of '${J.join("', '")}'`);if(this._lifeCycleHooks[q])this._lifeCycl
|
|
|
25
25
|
`),this.outputHelp({error:!0});let J=z||{},Q=J.exitCode||1,X=J.code||"commander.error";this._exit(Q,X,q)}_parseOptionsEnv(){this.options.forEach((q)=>{if(q.envVar&&q.envVar in G.env){let z=q.attributeName();if(this.getOptionValue(z)===void 0||["default","config","env"].includes(this.getOptionValueSource(z)))if(q.required||q.optional)this.emit(`optionEnv:${q.name()}`,G.env[q.envVar]);else this.emit(`optionEnv:${q.name()}`)}})}_parseOptionsImplied(){let q=new Pq(this.options),z=(J)=>{return this.getOptionValue(J)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(J))};this.options.filter((J)=>J.implied!==void 0&&z(J.attributeName())&&q.valueFromOption(this.getOptionValue(J.attributeName()),J)).forEach((J)=>{Object.keys(J.implied).filter((Q)=>!z(Q)).forEach((Q)=>{this.setOptionValueWithSource(Q,J.implied[Q],"implied")})})}missingArgument(q){let z=`error: missing required argument '${q}'`;this.error(z,{code:"commander.missingArgument"})}optionMissingArgument(q){let z=`error: option '${q.flags}' argument missing`;this.error(z,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(q){let z=`error: required option '${q.flags}' not specified`;this.error(z,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(q,z){let J=(Y)=>{let Z=Y.attributeName(),_=this.getOptionValue(Z),T=this.options.find((R)=>R.negate&&Z===R.attributeName()),$=this.options.find((R)=>!R.negate&&Z===R.attributeName());if(T&&(T.presetArg===void 0&&_===!1||T.presetArg!==void 0&&_===T.presetArg))return T;return $||Y},Q=(Y)=>{let Z=J(Y),_=Z.attributeName();if(this.getOptionValueSource(_)==="env")return`environment variable '${Z.envVar}'`;return`option '${Z.flags}'`},X=`error: ${Q(q)} cannot be used with ${Q(z)}`;this.error(X,{code:"commander.conflictingOption"})}unknownOption(q){if(this._allowUnknownOption)return;let z="";if(q.startsWith("--")&&this._showSuggestionAfterError){let Q=[],X=this;do{let Y=X.createHelp().visibleOptions(X).filter((Z)=>Z.long).map((Z)=>Z.long);Q=Q.concat(Y),X=X.parent}while(X&&!X._enablePositionalOptions);z=g(q,Q)}let J=`error: unknown option '${q}'${z}`;this.error(J,{code:"commander.unknownOption"})}_excessArguments(q){if(this._allowExcessArguments)return;let z=this.registeredArguments.length,J=z===1?"":"s",X=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${z} argument${J} but got ${q.length}.`;this.error(X,{code:"commander.excessArguments"})}unknownCommand(){let q=this.args[0],z="";if(this._showSuggestionAfterError){let Q=[];this.createHelp().visibleCommands(this).forEach((X)=>{if(Q.push(X.name()),X.alias())Q.push(X.alias())}),z=g(q,Q)}let J=`error: unknown command '${q}'${z}`;this.error(J,{code:"commander.unknownCommand"})}version(q,z,J){if(q===void 0)return this._version;this._version=q,z=z||"-V, --version",J=J||"output the version number";let Q=this.createOption(z,J);return this._versionOptionName=Q.attributeName(),this._registerOption(Q),this.on("option:"+Q.name(),()=>{this._outputConfiguration.writeOut(`${q}
|
|
26
26
|
`),this._exit(0,"commander.version",q)}),this}description(q,z){if(q===void 0&&z===void 0)return this._description;if(this._description=q,z)this._argsDescription=z;return this}summary(q){if(q===void 0)return this._summary;return this._summary=q,this}alias(q){if(q===void 0)return this._aliases[0];let z=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler)z=this.commands[this.commands.length-1];if(q===z._name)throw Error("Command alias can't be the same as its name");let J=this.parent?._findCommand(q);if(J){let Q=[J.name()].concat(J.aliases()).join("|");throw Error(`cannot add alias '${q}' to command '${this.name()}' as already have command '${Q}'`)}return z._aliases.push(q),this}aliases(q){if(q===void 0)return this._aliases;return q.forEach((z)=>this.alias(z)),this}usage(q){if(q===void 0){if(this._usage)return this._usage;let z=this.registeredArguments.map((J)=>{return Sq(J)});return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?z:[]).join(" ")}return this._usage=q,this}name(q){if(q===void 0)return this._name;return this._name=q,this}helpGroup(q){if(q===void 0)return this._helpGroupHeading??"";return this._helpGroupHeading=q,this}commandsGroup(q){if(q===void 0)return this._defaultCommandGroup??"";return this._defaultCommandGroup=q,this}optionsGroup(q){if(q===void 0)return this._defaultOptionGroup??"";return this._defaultOptionGroup=q,this}_initOptionGroup(q){if(this._defaultOptionGroup&&!q.helpGroupHeading)q.helpGroup(this._defaultOptionGroup)}_initCommandGroup(q){if(this._defaultCommandGroup&&!q.helpGroup())q.helpGroup(this._defaultCommandGroup)}nameFromFilename(q){return this._name=U.basename(q,U.extname(q)),this}executableDir(q){if(q===void 0)return this._executableDir;return this._executableDir=q,this}helpInformation(q){let z=this.createHelp(),J=this._getOutputContext(q);z.prepareContext({error:J.error,helpWidth:J.helpWidth,outputHasColors:J.hasColors});let Q=z.formatHelp(this,z);if(J.hasColors)return Q;return this._outputConfiguration.stripColor(Q)}_getOutputContext(q){q=q||{};let z=!!q.error,J,Q,X;if(z)J=(Z)=>this._outputConfiguration.writeErr(Z),Q=this._outputConfiguration.getErrHasColors(),X=this._outputConfiguration.getErrHelpWidth();else J=(Z)=>this._outputConfiguration.writeOut(Z),Q=this._outputConfiguration.getOutHasColors(),X=this._outputConfiguration.getOutHelpWidth();return{error:z,write:(Z)=>{if(!Q)Z=this._outputConfiguration.stripColor(Z);return J(Z)},hasColors:Q,helpWidth:X}}outputHelp(q){let z;if(typeof q==="function")z=q,q=void 0;let J=this._getOutputContext(q),Q={error:J.error,write:J.write,command:this};this._getCommandAndAncestors().reverse().forEach((Y)=>Y.emit("beforeAllHelp",Q)),this.emit("beforeHelp",Q);let X=this.helpInformation({error:J.error});if(z){if(X=z(X),typeof X!=="string"&&!Buffer.isBuffer(X))throw Error("outputHelp callback must return a string or a Buffer")}if(J.write(X),this._getHelpOption()?.long)this.emit(this._getHelpOption().long);this.emit("afterHelp",Q),this._getCommandAndAncestors().forEach((Y)=>Y.emit("afterAllHelp",Q))}helpOption(q,z){if(typeof q==="boolean"){if(q){if(this._helpOption===null)this._helpOption=void 0;if(this._defaultOptionGroup)this._initOptionGroup(this._getHelpOption())}else this._helpOption=null;return this}if(this._helpOption=this.createOption(q??"-h, --help",z??"display help for command"),q||z)this._initOptionGroup(this._helpOption);return this}_getHelpOption(){if(this._helpOption===void 0)this.helpOption(void 0,void 0);return this._helpOption}addHelpOption(q){return this._helpOption=q,this._initOptionGroup(q),this}help(q){this.outputHelp(q);let z=Number(G.exitCode??0);if(z===0&&q&&typeof q!=="function"&&q.error)z=1;this._exit(z,"commander.help","(outputHelp)")}addHelpText(q,z){let J=["beforeAll","before","after","afterAll"];if(!J.includes(q))throw Error(`Unexpected value for position to addHelpText.
|
|
27
27
|
Expecting one of '${J.join("', '")}'`);let Q=`${q}Help`;return this.on(Q,(X)=>{let Y;if(typeof z==="function")Y=z({error:X.error,command:X.command});else Y=z;if(Y)X.write(`${Y}
|
|
28
|
-
`)}),this}_outputHelpIfRequested(q){let z=this._getHelpOption();if(z&&q.find((Q)=>z.is(Q)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function c(q){return q.map((z)=>{if(!z.startsWith("--inspect"))return z;let J,Q="127.0.0.1",X="9229",Y;if((Y=z.match(/^(--inspect(-brk)?)$/))!==null)J=Y[1];else if((Y=z.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(J=Y[1],/^\d+$/.test(Y[3]))X=Y[3];else Q=Y[3];else if((Y=z.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)J=Y[1],Q=Y[3],X=Y[4];if(J&&X!=="0")return`${J}=${Q}:${parseInt(X)+1}`;return z})}function y(){if(G.env.NO_COLOR||G.env.FORCE_COLOR==="0"||G.env.FORCE_COLOR==="false")return!1;if(G.env.FORCE_COLOR||G.env.CLICOLOR_FORCE!==void 0)return!0;return}Iq.Command=A;Iq.useColor=y});var s=H((Fq)=>{var{Argument:m}=P(),{Command:w}=l(),{CommanderError:Dq,InvalidArgumentError:d}=W(),{Help:Nq}=V(),{Option:p}=D();Fq.program=new w;Fq.createCommand=(q)=>new w(q);Fq.createOption=(q,z)=>new p(q,z);Fq.createArgument=(q,z)=>new m(q,z);Fq.Command=w;Fq.Option=p;Fq.Argument=m;Fq.Help=Nq;Fq.CommanderError=Dq;Fq.InvalidArgumentError=d;Fq.InvalidOptionArgumentError=d});var i=j(s(),1),{program:nq,createCommand:aq,createArgument:oq,createOption:eq,CommanderError:qz,InvalidArgumentError:zz,InvalidOptionArgumentError:Jz,Command:t,Argument:Qz,Option:Xz,Help:Yz}=i.default;import{readFileSync as uq}from"fs";import{join as gq}from"path";var cq=()=>{try{let q=gq(process.cwd(),"package.json");return JSON.parse(uq(q,"utf-8")).version||"0.1.0"}catch{return"0.1.0"}},S=new t;S.name("veloce").description("A modern, fast web framework for TypeScript inspired by FastAPI").version(cq(),"-v, --version","Display version number").helpOption("-h, --help","Display help for command");async function lq(){let{registerNewCommand:q}=await import("../../chunk-
|
|
28
|
+
`)}),this}_outputHelpIfRequested(q){let z=this._getHelpOption();if(z&&q.find((Q)=>z.is(Q)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function c(q){return q.map((z)=>{if(!z.startsWith("--inspect"))return z;let J,Q="127.0.0.1",X="9229",Y;if((Y=z.match(/^(--inspect(-brk)?)$/))!==null)J=Y[1];else if((Y=z.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(J=Y[1],/^\d+$/.test(Y[3]))X=Y[3];else Q=Y[3];else if((Y=z.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)J=Y[1],Q=Y[3],X=Y[4];if(J&&X!=="0")return`${J}=${Q}:${parseInt(X)+1}`;return z})}function y(){if(G.env.NO_COLOR||G.env.FORCE_COLOR==="0"||G.env.FORCE_COLOR==="false")return!1;if(G.env.FORCE_COLOR||G.env.CLICOLOR_FORCE!==void 0)return!0;return}Iq.Command=A;Iq.useColor=y});var s=H((Fq)=>{var{Argument:m}=P(),{Command:w}=l(),{CommanderError:Dq,InvalidArgumentError:d}=W(),{Help:Nq}=V(),{Option:p}=D();Fq.program=new w;Fq.createCommand=(q)=>new w(q);Fq.createOption=(q,z)=>new p(q,z);Fq.createArgument=(q,z)=>new m(q,z);Fq.Command=w;Fq.Option=p;Fq.Argument=m;Fq.Help=Nq;Fq.CommanderError=Dq;Fq.InvalidArgumentError=d;Fq.InvalidOptionArgumentError=d});var i=j(s(),1),{program:nq,createCommand:aq,createArgument:oq,createOption:eq,CommanderError:qz,InvalidArgumentError:zz,InvalidOptionArgumentError:Jz,Command:t,Argument:Qz,Option:Xz,Help:Yz}=i.default;import{readFileSync as uq}from"fs";import{join as gq}from"path";var cq=()=>{try{let q=gq(process.cwd(),"package.json");return JSON.parse(uq(q,"utf-8")).version||"0.1.0"}catch{return"0.1.0"}},S=new t;S.name("veloce").description("A modern, fast web framework for TypeScript inspired by FastAPI").version(cq(),"-v, --version","Display version number").helpOption("-h, --help","Display help for command");async function lq(){let{registerNewCommand:q}=await import("../../chunk-hnr45hnn.js"),{registerDevCommand:z}=await import("../../chunk-qfsjy9bg.js"),{registerBuildCommand:J}=await import("../../chunk-0zxhx5b8.js"),{registerGenerateCommand:Q}=await import("../../chunk-82f2j0k2.js");q(S),z(S),J(S),Q(S),S.parse(process.argv)}lq().catch((q)=>{console.error("CLI error:",q),process.exit(1)});
|
|
29
29
|
|
|
30
30
|
//# debugId=655C7FC36D2E165864756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "veloce-ts",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "A modern, fast web framework for TypeScript inspired by FastAPI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
|
@@ -146,4 +146,4 @@
|
|
|
146
146
|
"peerDependencies": {
|
|
147
147
|
"typescript": ">=5.0.0"
|
|
148
148
|
}
|
|
149
|
-
}
|
|
149
|
+
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["..\\..\\src\\cli\\commands\\new.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import { Command } from 'commander';\r\nimport { mkdir, writeFile } from 'fs/promises';\r\nimport { join } from 'path';\r\nimport { existsSync } from 'fs';\r\n\r\ntype Template = 'rest' | 'graphql' | 'websocket' | 'fullstack';\r\n\r\ninterface ProjectOptions {\r\n template: Template;\r\n}\r\n\r\nexport function registerNewCommand(program: Command): void {\r\n program\r\n .command('new')\r\n .description('Create a new VeloceTS project')\r\n .argument('<name>', 'Project name')\r\n .option('-t, --template <template>', 'Project template (rest, graphql, websocket, fullstack)', 'rest')\r\n .action(async (name: string, options: ProjectOptions) => {\r\n await createProject(name, options);\r\n });\r\n}\r\n\r\nasync function createProject(name: string, options: ProjectOptions): Promise<void> {\r\n const projectPath = join(process.cwd(), name);\r\n\r\n // Check if directory already exists\r\n if (existsSync(projectPath)) {\r\n console.error(`Error: Directory \"${name}\" already exists`);\r\n process.exit(1);\r\n }\r\n\r\n console.log(`Creating new VeloceTS project: ${name}`);\r\n console.log(`Template: ${options.template}`);\r\n\r\n try {\r\n // Create project directory\r\n await mkdir(projectPath, { recursive: true });\r\n\r\n // Create subdirectories\r\n await mkdir(join(projectPath, 'src'), { recursive: true });\r\n await mkdir(join(projectPath, 'src', 'controllers'), { recursive: true });\r\n\r\n // Generate files based on template\r\n await generatePackageJson(projectPath, name);\r\n await generateTsConfig(projectPath);\r\n await generateGitignore(projectPath);\r\n await generateReadme(projectPath, name, options.template);\r\n\r\n switch (options.template) {\r\n case 'rest':\r\n await generateRestTemplate(projectPath);\r\n break;\r\n case 'graphql':\r\n await generateGraphQLTemplate(projectPath);\r\n break;\r\n case 'websocket':\r\n await generateWebSocketTemplate(projectPath);\r\n break;\r\n case 'fullstack':\r\n await generateFullstackTemplate(projectPath);\r\n break;\r\n }\r\n\r\n console.log('\\n✓ Project created successfully!');\r\n console.log('\\nNext steps:');\r\n console.log(` cd ${name}`);\r\n console.log(' bun install');\r\n console.log(' bun run dev');\r\n } catch (error) {\r\n console.error('Error creating project:', error);\r\n process.exit(1);\r\n }\r\n}\r\n\r\nasync function generatePackageJson(projectPath: string, name: string): Promise<void> {\r\n const packageJson = {\r\n name,\r\n version: '0.1.0',\r\n description: 'A VeloceTS application',\r\n type: 'module',\r\n main: './dist/index.js',\r\n scripts: {\r\n dev: 'bun --watch src/index.ts',\r\n build: 'bun build src/index.ts --outdir dist --target bun',\r\n start: 'bun run dist/index.js',\r\n 'generate:openapi': 'bun run node_modules/VeloceTS/bin/veloce.ts generate openapi',\r\n 'generate:client': 'bun run node_modules/VeloceTS/bin/veloce.ts generate client',\r\n },\r\n dependencies: {\r\n 'VeloceTS': '^0.1.0',\r\n hono: '^4.0.0',\r\n 'reflect-metadata': '^0.2.0',\r\n zod: '^3.22.0',\r\n },\r\n devDependencies: {\r\n '@types/bun': 'latest',\r\n typescript: '^5.3.0',\r\n },\r\n };\r\n\r\n await writeFile(\r\n join(projectPath, 'package.json'),\r\n JSON.stringify(packageJson, null, 2)\r\n );\r\n}\r\n\r\nasync function generateTsConfig(projectPath: string): Promise<void> {\r\n const tsConfig = {\r\n compilerOptions: {\r\n target: 'ES2022',\r\n module: 'ESNext',\r\n lib: ['ES2022'],\r\n moduleResolution: 'bundler',\r\n experimentalDecorators: true,\r\n emitDecoratorMetadata: true,\r\n strict: true,\r\n esModuleInterop: true,\r\n skipLibCheck: true,\r\n forceConsistentCasingInFileNames: true,\r\n resolveJsonModule: true,\r\n outDir: './dist',\r\n rootDir: './src',\r\n },\r\n include: ['src/**/*'],\r\n exclude: ['node_modules', 'dist'],\r\n };\r\n\r\n await writeFile(\r\n join(projectPath, 'tsconfig.json'),\r\n JSON.stringify(tsConfig, null, 2)\r\n );\r\n}\r\n\r\nasync function generateGitignore(projectPath: string): Promise<void> {\r\n const gitignore = `node_modules/\r\ndist/\r\n*.log\r\n.env\r\n.DS_Store\r\n`;\r\n\r\n await writeFile(join(projectPath, '.gitignore'), gitignore);\r\n}\r\n\r\nasync function generateReadme(projectPath: string, name: string, template: Template): Promise<void> {\r\n const readme = `# ${name}\r\n\r\nA VeloceTS application using the ${template} template.\r\n\r\n## Getting Started\r\n\r\nInstall dependencies:\r\n\r\n\\`\\`\\`bash\r\nbun install\r\n\\`\\`\\`\r\n\r\nRun the development server:\r\n\r\n\\`\\`\\`bash\r\nbun run dev\r\n\\`\\`\\`\r\n\r\nBuild for production:\r\n\r\n\\`\\`\\`bash\r\nbun run build\r\n\\`\\`\\`\r\n\r\n## Documentation\r\n\r\nVisit http://localhost:3000/docs to see the API documentation.\r\n`;\r\n\r\n await writeFile(join(projectPath, 'README.md'), readme);\r\n}\r\n\r\nasync function generateRestTemplate(projectPath: string): Promise<void> {\r\n // Create main entry point\r\n const mainFile = `import 'reflect-metadata';\r\nimport { Veloce } from 'VeloceTS';\r\nimport { UserController } from './controllers/user.controller';\r\n\r\nconst app = new Veloce({\r\n title: 'My REST API',\r\n version: '1.0.0',\r\n docs: true,\r\n});\r\n\r\n// Register controllers\r\napp.include(UserController);\r\n\r\n// Start server\r\napp.listen(3000, () => {\r\n console.log('Server running on http://localhost:3000');\r\n console.log('Docs available at http://localhost:3000/docs');\r\n});\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'index.ts'), mainFile);\r\n\r\n // Create example controller\r\n const controllerFile = `import { Controller, Get, Post, Body, Param } from 'VeloceTS';\r\nimport { z } from 'zod';\r\n\r\nconst UserSchema = z.object({\r\n name: z.string(),\r\n email: z.string().email(),\r\n age: z.number().min(0).optional(),\r\n});\r\n\r\ntype User = z.infer<typeof UserSchema>;\r\n\r\n@Controller('/users')\r\nexport class UserController {\r\n private users: User[] = [];\r\n\r\n @Get('/')\r\n async getUsers() {\r\n return { users: this.users };\r\n }\r\n\r\n @Get('/:id')\r\n async getUser(@Param('id') id: string) {\r\n const user = this.users[parseInt(id)];\r\n if (!user) {\r\n throw new Error('User not found');\r\n }\r\n return user;\r\n }\r\n\r\n @Post('/')\r\n async createUser(@Body(UserSchema) user: User) {\r\n this.users.push(user);\r\n return { message: 'User created', user };\r\n }\r\n}\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'controllers', 'user.controller.ts'), controllerFile);\r\n}\r\n\r\nasync function generateGraphQLTemplate(projectPath: string): Promise<void> {\r\n await mkdir(join(projectPath, 'src', 'resolvers'), { recursive: true });\r\n\r\n const mainFile = `import 'reflect-metadata';\r\nimport { Veloce } from 'VeloceTS';\r\nimport { GraphQLPlugin } from 'VeloceTS/plugins';\r\nimport { UserResolver } from './resolvers/user.resolver';\r\n\r\nconst app = new Veloce({\r\n title: 'My GraphQL API',\r\n version: '1.0.0',\r\n});\r\n\r\n// Enable GraphQL\r\napp.usePlugin(new GraphQLPlugin({\r\n resolvers: [UserResolver],\r\n}));\r\n\r\napp.listen(3000, () => {\r\n console.log('Server running on http://localhost:3000');\r\n console.log('GraphQL Playground at http://localhost:3000/graphql');\r\n});\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'index.ts'), mainFile);\r\n\r\n const resolverFile = `import { Resolver, Query, Mutation, Arg } from 'VeloceTS/graphql';\r\nimport { z } from 'zod';\r\n\r\nconst UserSchema = z.object({\r\n id: z.string(),\r\n name: z.string(),\r\n email: z.string().email(),\r\n});\r\n\r\ntype User = z.infer<typeof UserSchema>;\r\n\r\n@Resolver()\r\nexport class UserResolver {\r\n private users: User[] = [];\r\n\r\n @Query()\r\n async users(): Promise<User[]> {\r\n return this.users;\r\n }\r\n\r\n @Query()\r\n async user(@Arg('id', z.string()) id: string): Promise<User | null> {\r\n return this.users.find(u => u.id === id) || null;\r\n }\r\n\r\n @Mutation()\r\n async createUser(\r\n @Arg('name', z.string()) name: string,\r\n @Arg('email', z.string().email()) email: string\r\n ): Promise<User> {\r\n const user = { id: Date.now().toString(), name, email };\r\n this.users.push(user);\r\n return user;\r\n }\r\n}\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'resolvers', 'user.resolver.ts'), resolverFile);\r\n}\r\n\r\nasync function generateWebSocketTemplate(projectPath: string): Promise<void> {\r\n await mkdir(join(projectPath, 'src', 'websockets'), { recursive: true });\r\n\r\n const mainFile = `import 'reflect-metadata';\r\nimport { Veloce } from 'VeloceTS';\r\nimport { WebSocketPlugin } from 'VeloceTS/plugins';\r\nimport { ChatWebSocket } from './websockets/chat.websocket';\r\n\r\nconst app = new Veloce({\r\n title: 'My WebSocket API',\r\n version: '1.0.0',\r\n});\r\n\r\n// Enable WebSocket\r\napp.usePlugin(new WebSocketPlugin({\r\n handlers: [ChatWebSocket],\r\n}));\r\n\r\napp.listen(3000, () => {\r\n console.log('Server running on http://localhost:3000');\r\n console.log('WebSocket endpoint at ws://localhost:3000/ws/chat');\r\n});\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'index.ts'), mainFile);\r\n\r\n const websocketFile = `import { WebSocket, OnConnect, OnMessage, OnDisconnect } from 'VeloceTS/websocket';\r\nimport { z } from 'zod';\r\nimport type { WebSocketConnection } from 'VeloceTS/websocket';\r\n\r\nconst MessageSchema = z.object({\r\n type: z.enum(['message', 'join', 'leave']),\r\n content: z.string(),\r\n username: z.string(),\r\n});\r\n\r\n@WebSocket('/ws/chat')\r\nexport class ChatWebSocket {\r\n @OnConnect()\r\n handleConnect(connection: WebSocketConnection) {\r\n console.log('Client connected:', connection.id);\r\n connection.send({ type: 'system', content: 'Welcome to the chat!' });\r\n }\r\n\r\n @OnMessage(MessageSchema)\r\n async handleMessage(connection: WebSocketConnection, message: z.infer<typeof MessageSchema>) {\r\n console.log('Received message:', message);\r\n \r\n // Broadcast to all clients\r\n connection.broadcast({\r\n type: 'message',\r\n username: message.username,\r\n content: message.content,\r\n timestamp: new Date().toISOString(),\r\n });\r\n }\r\n\r\n @OnDisconnect()\r\n handleDisconnect(connection: WebSocketConnection) {\r\n console.log('Client disconnected:', connection.id);\r\n }\r\n}\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'websockets', 'chat.websocket.ts'), websocketFile);\r\n}\r\n\r\nasync function generateFullstackTemplate(projectPath: string): Promise<void> {\r\n await mkdir(join(projectPath, 'src', 'controllers'), { recursive: true });\r\n await mkdir(join(projectPath, 'src', 'resolvers'), { recursive: true });\r\n await mkdir(join(projectPath, 'src', 'websockets'), { recursive: true });\r\n\r\n // Generate main file\r\n const mainFile = `import 'reflect-metadata';\r\nimport { Veloce } from 'VeloceTS';\r\nimport { GraphQLPlugin, WebSocketPlugin } from 'VeloceTS/plugins';\r\nimport { UserController } from './controllers/user.controller';\r\nimport { UserResolver } from './resolvers/user.resolver';\r\nimport { ChatWebSocket } from './websockets/chat.websocket';\r\n\r\nconst app = new Veloce({\r\n title: 'My Fullstack API',\r\n version: '1.0.0',\r\n docs: true,\r\n});\r\n\r\n// REST API\r\napp.include(UserController);\r\n\r\n// GraphQL\r\napp.usePlugin(new GraphQLPlugin({\r\n resolvers: [UserResolver],\r\n}));\r\n\r\n// WebSocket\r\napp.usePlugin(new WebSocketPlugin({\r\n handlers: [ChatWebSocket],\r\n}));\r\n\r\napp.listen(3000, () => {\r\n console.log('Server running on http://localhost:3000');\r\n console.log('REST API docs at http://localhost:3000/docs');\r\n console.log('GraphQL Playground at http://localhost:3000/graphql');\r\n console.log('WebSocket endpoint at ws://localhost:3000/ws/chat');\r\n});\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'index.ts'), mainFile);\r\n\r\n // Generate REST controller\r\n const controllerFile = `import { Controller, Get, Post, Body, Param } from 'VeloceTS';\r\nimport { z } from 'zod';\r\n\r\nconst UserSchema = z.object({\r\n name: z.string(),\r\n email: z.string().email(),\r\n age: z.number().min(0).optional(),\r\n});\r\n\r\ntype User = z.infer<typeof UserSchema>;\r\n\r\n@Controller('/users')\r\nexport class UserController {\r\n private users: User[] = [];\r\n\r\n @Get('/')\r\n async getUsers() {\r\n return { users: this.users };\r\n }\r\n\r\n @Get('/:id')\r\n async getUser(@Param('id') id: string) {\r\n const user = this.users[parseInt(id)];\r\n if (!user) {\r\n throw new Error('User not found');\r\n }\r\n return user;\r\n }\r\n\r\n @Post('/')\r\n async createUser(@Body(UserSchema) user: User) {\r\n this.users.push(user);\r\n return { message: 'User created', user };\r\n }\r\n}\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'controllers', 'user.controller.ts'), controllerFile);\r\n\r\n // Generate GraphQL resolver\r\n const resolverFile = `import { Resolver, Query, Mutation, Arg } from 'VeloceTS/graphql';\r\nimport { z } from 'zod';\r\n\r\nconst UserSchema = z.object({\r\n id: z.string(),\r\n name: z.string(),\r\n email: z.string().email(),\r\n});\r\n\r\ntype User = z.infer<typeof UserSchema>;\r\n\r\n@Resolver()\r\nexport class UserResolver {\r\n private users: User[] = [];\r\n\r\n @Query()\r\n async users(): Promise<User[]> {\r\n return this.users;\r\n }\r\n\r\n @Query()\r\n async user(@Arg('id', z.string()) id: string): Promise<User | null> {\r\n return this.users.find(u => u.id === id) || null;\r\n }\r\n\r\n @Mutation()\r\n async createUser(\r\n @Arg('name', z.string()) name: string,\r\n @Arg('email', z.string().email()) email: string\r\n ): Promise<User> {\r\n const user = { id: Date.now().toString(), name, email };\r\n this.users.push(user);\r\n return user;\r\n }\r\n}\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'resolvers', 'user.resolver.ts'), resolverFile);\r\n\r\n // Generate WebSocket handler\r\n const websocketFile = `import { WebSocket, OnConnect, OnMessage, OnDisconnect } from 'VeloceTS/websocket';\r\nimport { z } from 'zod';\r\nimport type { WebSocketConnection } from 'VeloceTS/websocket';\r\n\r\nconst MessageSchema = z.object({\r\n type: z.enum(['message', 'join', 'leave']),\r\n content: z.string(),\r\n username: z.string(),\r\n});\r\n\r\n@WebSocket('/ws/chat')\r\nexport class ChatWebSocket {\r\n @OnConnect()\r\n handleConnect(connection: WebSocketConnection) {\r\n console.log('Client connected:', connection.id);\r\n connection.send({ type: 'system', content: 'Welcome to the chat!' });\r\n }\r\n\r\n @OnMessage(MessageSchema)\r\n async handleMessage(connection: WebSocketConnection, message: z.infer<typeof MessageSchema>) {\r\n console.log('Received message:', message);\r\n \r\n // Broadcast to all clients\r\n connection.broadcast({\r\n type: 'message',\r\n username: message.username,\r\n content: message.content,\r\n timestamp: new Date().toISOString(),\r\n });\r\n }\r\n\r\n @OnDisconnect()\r\n handleDisconnect(connection: WebSocketConnection) {\r\n console.log('Client disconnected:', connection.id);\r\n }\r\n}\r\n`;\r\n\r\n await writeFile(join(projectPath, 'src', 'websockets', 'chat.websocket.ts'), websocketFile);\r\n}\r\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": ";4BACA,gBAAS,eAAO,oBAChB,eAAS,aACT,qBAAS,WAQF,SAAS,CAAkB,CAAC,EAAwB,CACzD,EACG,QAAQ,KAAK,EACb,YAAY,+BAA+B,EAC3C,SAAS,SAAU,cAAc,EACjC,OAAO,4BAA6B,yDAA0D,MAAM,EACpG,OAAO,MAAO,EAAc,IAA4B,CACvD,MAAM,EAAc,EAAM,CAAO,EAClC,EAGL,eAAe,CAAa,CAAC,EAAc,EAAwC,CACjF,IAAM,EAAc,EAAK,QAAQ,IAAI,EAAG,CAAI,EAG5C,GAAI,EAAW,CAAW,EACxB,QAAQ,MAAM,qBAAqB,mBAAsB,EACzD,QAAQ,KAAK,CAAC,EAGhB,QAAQ,IAAI,kCAAkC,GAAM,EACpD,QAAQ,IAAI,aAAa,EAAQ,UAAU,EAE3C,GAAI,CAcF,OAZA,MAAM,EAAM,EAAa,CAAE,UAAW,EAAK,CAAC,EAG5C,MAAM,EAAM,EAAK,EAAa,KAAK,EAAG,CAAE,UAAW,EAAK,CAAC,EACzD,MAAM,EAAM,EAAK,EAAa,MAAO,aAAa,EAAG,CAAE,UAAW,EAAK,CAAC,EAGxE,MAAM,EAAoB,EAAa,CAAI,EAC3C,MAAM,EAAiB,CAAW,EAClC,MAAM,EAAkB,CAAW,EACnC,MAAM,EAAe,EAAa,EAAM,EAAQ,QAAQ,EAEhD,EAAQ,cACT,OACH,MAAM,EAAqB,CAAW,EACtC,UACG,UACH,MAAM,EAAwB,CAAW,EACzC,UACG,YACH,MAAM,EAA0B,CAAW,EAC3C,UACG,YACH,MAAM,EAA0B,CAAW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