MCPcopy Index your code
hub / github.com/Waishnav/devspace / main

Function main

src/cli.ts:22–49  ·  view source on GitHub ↗
(argv: string[])

Source from the content-addressed store, hash-verified

20const SUPPORTED_NODE_RANGE = ">=20.12 <27";
21
22async function main(argv: string[]): Promise<void> {
23 assertSupportedNode();
24
25 const [rawCommand, ...args] = argv;
26 const command = normalizeCommand(rawCommand);
27
28 switch (command) {
29 case "serve":
30 await ensureConfigured();
31 await serve();
32 return;
33 case "init":
34 await runInit({ force: args.includes("--force") });
35 return;
36 case "doctor":
37 await runDoctor();
38 return;
39 case "config":
40 runConfigCommand(args);
41 return;
42 case "help":
43 printHelp();
44 return;
45 case "version":
46 printVersion();
47 return;
48 }
49}
50
51function normalizeCommand(command: string | undefined): Command {
52 if (!command || command === "serve" || command === "start") return "serve";

Callers 1

cli.tsFile · 0.85

Calls 9

assertSupportedNodeFunction · 0.85
normalizeCommandFunction · 0.85
ensureConfiguredFunction · 0.85
serveFunction · 0.85
runInitFunction · 0.85
runDoctorFunction · 0.85
runConfigCommandFunction · 0.85
printHelpFunction · 0.85
printVersionFunction · 0.85

Tested by

no test coverage detected