1+ #!/usr/bin/env node
12import chalk from 'chalk' ;
23import { InvalidArgumentError , program , Option } from 'commander' ;
34import log from 'loglevel' ;
@@ -19,7 +20,7 @@ import { fileTypeFromBuffer } from 'file-type';
1920import * as psl from 'psl' ;
2021
2122var name = "pake-cli" ;
22- var version$1 = "3.2.0-beta1 " ;
23+ var version$1 = "3.2.0-beta11 " ;
2324var description = "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 利用 Rust 轻松构建轻量级多端桌面应用。" ;
2425var engines = {
2526 node : ">=16.0.0"
@@ -60,13 +61,12 @@ var scripts = {
6061 "cli:dev" : "cross-env NODE_ENV=development rollup -c rollup.config.js -w" ,
6162 "cli:build" : "cross-env NODE_ENV=production rollup -c rollup.config.js" ,
6263 test : "npm run cli:build && PAKE_CREATE_APP=1 node tests/index.js" ,
63- format : "npx prettier --write . --ignore-unknown && cd src-tauri && cargo fmt --verbose" ,
64+ format : "prettier --write . --ignore-unknown && cd src-tauri && cargo fmt --verbose" ,
6465 "hooks:setup" : "bash .githooks/setup.sh" ,
65- postinstall : "npm run hooks:setup" ,
6666 prepublishOnly : "npm run cli:build"
6767} ;
6868var type = "module" ;
69- var exports = "./dist/pake .js" ;
69+ var exports = "./dist/cli .js" ;
7070var license = "MIT" ;
7171var dependencies = {
7272 "@tauri-apps/api" : "^2.7.0" ,
@@ -79,6 +79,7 @@ var dependencies = {
7979 "fs-extra" : "^11.3.1" ,
8080 loglevel : "^1.9.2" ,
8181 ora : "^8.2.0" ,
82+ "pake-cli" : "file:.yalc/pake-cli" ,
8283 prompts : "^2.4.2" ,
8384 psl : "^1.15.0" ,
8485 "tmp-promise" : "^3.0.3" ,
@@ -99,6 +100,7 @@ var devDependencies = {
99100 "@types/update-notifier" : "^6.0.8" ,
100101 "app-root-path" : "^3.1.0" ,
101102 "cross-env" : "^7.0.3" ,
103+ prettier : "^3.4.2" ,
102104 rollup : "^4.46.2" ,
103105 "rollup-plugin-typescript2" : "^0.36.0" ,
104106 tslib : "^2.8.1" ,
@@ -449,11 +451,18 @@ async function mergeConfig(url, options, tauriConf) {
449451 const srcTauriDir = path . join ( npmDirectory , 'src-tauri' ) ;
450452 await fsExtra . ensureDir ( tauriConfigDirectory ) ;
451453 // Copy source config files to .pake directory (as templates)
452- const sourceFiles = [ 'tauri.conf.json' , 'tauri.macos.conf.json' , 'tauri.windows.conf.json' , 'tauri.linux.conf.json' , 'pake.json' ] ;
454+ const sourceFiles = [
455+ 'tauri.conf.json' ,
456+ 'tauri.macos.conf.json' ,
457+ 'tauri.windows.conf.json' ,
458+ 'tauri.linux.conf.json' ,
459+ 'pake.json' ,
460+ ] ;
453461 await Promise . all ( sourceFiles . map ( async ( file ) => {
454462 const sourcePath = path . join ( srcTauriDir , file ) ;
455463 const destPath = path . join ( tauriConfigDirectory , file ) ;
456- if ( await fsExtra . pathExists ( sourcePath ) && ! ( await fsExtra . pathExists ( destPath ) ) ) {
464+ if ( ( await fsExtra . pathExists ( sourcePath ) ) &&
465+ ! ( await fsExtra . pathExists ( destPath ) ) ) {
457466 await fsExtra . copy ( sourcePath , destPath ) ;
458467 }
459468 } ) ) ;
@@ -1125,7 +1134,9 @@ program
11251134 . default ( DEFAULT_PAKE_OPTIONS . hideOnClose )
11261135 . hideHelp ( ) )
11271136 . addOption ( new Option ( '--title <string>' , 'Window title' ) . hideHelp ( ) )
1128- . addOption ( new Option ( '--incognito' , 'Launch app in incognito/private mode' ) . default ( DEFAULT_PAKE_OPTIONS . incognito ) )
1137+ . addOption ( new Option ( '--incognito' , 'Launch app in incognito/private mode' )
1138+ . default ( DEFAULT_PAKE_OPTIONS . incognito )
1139+ . hideHelp ( ) )
11291140 . addOption ( new Option ( '--installer-language <string>' , 'Installer language' )
11301141 . default ( DEFAULT_PAKE_OPTIONS . installerLanguage )
11311142 . hideHelp ( ) )
0 commit comments