File tree Expand file tree Collapse file tree 2 files changed +17
-5
lines changed
Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -4,9 +4,9 @@ import * as path from 'path'
44import { realpathSync } from 'fs'
55import { fileURLToPath , pathToFileURL } from 'url'
66import { spawnSync , SpawnSyncReturns } from 'child_process'
7- import { createRequire } from 'node: module'
7+ import { createRequire } from 'module'
88
9- import parseArgs from 'minimist'
9+ import yargs from 'yargs/yargs' ;
1010
1111import { AWSAdapterProps } from '../adapter'
1212
@@ -16,7 +16,18 @@ export async function main(args: string[]): Promise<void> {
1616 let pulumiPaths : string [ ] | undefined
1717 let stackName : string | undefined
1818
19- const argv = parseArgs ( args . slice ( 2 ) )
19+ var argv = yargs ( process . argv . slice ( 2 ) )
20+ . usage ( 'Usage: $0 [options]' )
21+ . command ( '$0' , 'Destroy the pulumi stacks for sveltekit-adapter-aws-pulumi' )
22+ . example ( '$0' , 'count the lines in the given file' )
23+ . alias ( 'f' , 'file' )
24+ . nargs ( 'f' , 1 )
25+ . describe ( 'f' , 'Load a file' )
26+ . demandOption ( [ 'f' ] )
27+ . help ( 'h' )
28+ . alias ( 'h' , 'help' )
29+ . epilog ( 'copyright 2019' )
30+ . argv ;
2031
2132 let artifactPath = 'build'
2233
Original file line number Diff line number Diff line change 4545 "@types/mime" : " ^3.0.1" ,
4646 "@types/minimist" : " ^1.2.2" ,
4747 "@types/node" : " 18.14.0" ,
48+ "@types/yargs" : " ^17.0.24" ,
4849 "@vitest/coverage-c8" : " ^0.29.8" ,
4950 "copyfiles" : " ^2.4.1" ,
5051 "prettier" : " ^2.8.4" ,
5960 "dotenv" : " ^16.0.3" ,
6061 "folder-hash" : " ^4.0.4" ,
6162 "lodash" : " ^4.17.21" ,
62- "minimist " : " ^1.2.8 " ,
63- "sveltekit-adapter-aws-base " : " ^2.1 .1"
63+ "sveltekit-adapter-aws-base " : " ^2.1.1 " ,
64+ "yargs " : " ^17.7 .1"
6465 },
6566 "release" : {
6667 "branches" : [
You can’t perform that action at this time.
0 commit comments