File tree Expand file tree Collapse file tree 2 files changed +22
-22
lines changed
packages/cloudflare/src/cli Expand file tree Collapse file tree 2 files changed +22
-22
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11#!/usr/bin/env node
2- import { runCommand } from "./args.js" ;
2+
3+ import yargs from "yargs" ;
4+
5+ import { addBuildCommand } from "./commands/build.js" ;
6+ import { addDeployCommand } from "./commands/deploy.js" ;
7+ import { addPopulateCacheCommand } from "./commands/populate-cache.js" ;
8+ import { addPreviewCommand } from "./commands/preview.js" ;
9+ import { addUploadCommand } from "./commands/upload.js" ;
10+
11+ export function runCommand ( ) {
12+ let y = yargs ( process . argv . slice ( 2 ) )
13+ . scriptName ( "opennextjs-cloudflare" )
14+ . parserConfiguration ( { "unknown-options-as-args" : true } ) ;
15+
16+ y = addBuildCommand ( y ) ;
17+ y = addPreviewCommand ( y ) ;
18+ y = addDeployCommand ( y ) ;
19+ y = addUploadCommand ( y ) ;
20+ y = addPopulateCacheCommand ( y ) ;
21+
22+ return y . demandCommand ( 1 , 1 ) . parse ( ) ;
23+ }
324
425await runCommand ( ) ;
You can’t perform that action at this time.
0 commit comments