MCPcopy
hub / github.com/QwikDev/qwik / runCommand

Function runCommand

packages/qwik/src/cli/run.ts:95–137  ·  view source on GitHub ↗
(app: AppCommand)

Source from the content-addressed store, hash-verified

93}
94
95async function runCommand(app: AppCommand) {
96 switch (app.task) {
97 case 'add': {
98 await runAddCommand(app);
99 return;
100 }
101 case 'build': {
102 await runBuildCommand(app);
103 return;
104 }
105 case 'help': {
106 printHelp(app);
107 return;
108 }
109 case 'new': {
110 await runNewCommand(app);
111 return;
112 }
113 case 'joke': {
114 await runJokeCommand();
115 return;
116 }
117 case 'migrate-v2': {
118 await runV2Migration(app);
119 return;
120 }
121 case 'check-client': {
122 await runQwikClientCommand(app);
123 return;
124 }
125 case 'version': {
126 printVersion();
127 return;
128 }
129 }
130
131 if (typeof app.task === 'string') {
132 console.log(red(`Unrecognized qwik command: ${app.task}`) + '\n');
133 }
134
135 await printHelp(app);
136 process.exit(1);
137}
138
139async function printHelp(app: AppCommand) {
140 const pmRun = pmRunCmd();

Callers 2

runCliFunction · 0.70
printHelpFunction · 0.70

Calls 8

runAddCommandFunction · 0.90
runBuildCommandFunction · 0.90
runNewCommandFunction · 0.90
runJokeCommandFunction · 0.90
runV2MigrationFunction · 0.90
runQwikClientCommandFunction · 0.90
printHelpFunction · 0.85
printVersionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…