@@ -17,10 +17,9 @@ import axios from 'axios';
1717import { dir } from 'tmp-promise' ;
1818import { fileTypeFromBuffer } from 'file-type' ;
1919import * as psl from 'psl' ;
20- import isUrl from 'is-url' ;
2120
2221var name = "pake-cli" ;
23- var version$1 = "3.1.2 " ;
22+ var version$1 = "3.2.0-beta " ;
2423var description = "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 利用 Rust 轻松构建轻量级多端桌面应用。" ;
2524var engines = {
2625 node : ">=16.0.0"
@@ -68,42 +67,40 @@ var type = "module";
6867var exports = "./dist/pake.js" ;
6968var license = "MIT" ;
7069var dependencies = {
71- "@tauri-apps/api" : "^2.2.0" ,
72- "@tauri-apps/cli" : "^2.2.5" ,
73- axios : "^1.7.9" ,
74- chalk : "^5.4.1" ,
75- commander : "^13.1.0" ,
76- execa : "^9.5.2" ,
77- "file-type" : "^20.0.0" ,
78- "fs-extra" : "^11.3.0" ,
79- "is-url" : "^1.2.4" ,
70+ "@tauri-apps/api" : "^2.7.0" ,
71+ "@tauri-apps/cli" : "^2.7.1" ,
72+ axios : "^1.11.0" ,
73+ chalk : "^5.5.0" ,
74+ commander : "^11.1.0" ,
75+ execa : "^9.6.0" ,
76+ "file-type" : "^18.7.0" ,
77+ "fs-extra" : "^11.3.1" ,
8078 loglevel : "^1.9.2" ,
81- ora : "^8.1.1 " ,
79+ ora : "^8.2.0 " ,
8280 prompts : "^2.4.2" ,
8381 psl : "^1.15.0" ,
8482 "tmp-promise" : "^3.0.3" ,
8583 "update-notifier" : "^7.3.1"
8684} ;
8785var devDependencies = {
8886 "@rollup/plugin-alias" : "^5.1.1" ,
89- "@rollup/plugin-commonjs" : "^28.0.2 " ,
87+ "@rollup/plugin-commonjs" : "^28.0.6 " ,
9088 "@rollup/plugin-json" : "^6.1.0" ,
9189 "@rollup/plugin-replace" : "^6.0.2" ,
9290 "@rollup/plugin-terser" : "^0.4.4" ,
9391 "@types/fs-extra" : "^11.0.4" ,
94- "@types/is-url" : "^1.2.32" ,
95- "@types/node" : "^22.10.8" ,
92+ "@types/node" : "^20.19.10" ,
9693 "@types/page-icon" : "^0.3.6" ,
9794 "@types/prompts" : "^2.4.9" ,
98- "@types/psl" : "^1.1.3 " ,
95+ "@types/psl" : "^1.11.0 " ,
9996 "@types/tmp" : "^0.2.6" ,
10097 "@types/update-notifier" : "^6.0.8" ,
10198 "app-root-path" : "^3.1.0" ,
10299 "cross-env" : "^7.0.3" ,
103- rollup : "^4.31.0 " ,
100+ rollup : "^4.46.2 " ,
104101 "rollup-plugin-typescript2" : "^0.36.0" ,
105102 tslib : "^2.8.1" ,
106- typescript : "^5.7.3 "
103+ typescript : "^5.9.2 "
107104} ;
108105var packageJson = {
109106 name : name ,
@@ -125,7 +122,7 @@ var packageJson = {
125122
126123var windows = [
127124 {
128- url : "https://weread.qq.com /" ,
125+ url : "https://weekly.tw93.fun /" ,
129126 url_type : "web" ,
130127 hide_title_bar : true ,
131128 fullscreen : false ,
@@ -162,13 +159,13 @@ var pakeConf = {
162159 proxy_url : proxy_url
163160} ;
164161
165- var productName$1 = "WeRead " ;
166- var identifier = "com.pake.weread " ;
162+ var productName$1 = "Weekly " ;
163+ var identifier = "com.pake.weekly " ;
167164var version = "1.0.0" ;
168165var app = {
169166 withGlobalTauri : true ,
170167 trayIcon : {
171- iconPath : "png/weread_512 .png" ,
168+ iconPath : "png/weekly_512 .png" ,
172169 iconAsTemplate : false ,
173170 id : "pake-tray"
174171 }
@@ -186,12 +183,12 @@ var CommonConf = {
186183
187184var bundle$2 = {
188185 icon : [
189- "png/weread_256 .ico" ,
190- "png/weread_32 .ico"
186+ "png/weekly_256 .ico" ,
187+ "png/weekly_32 .ico"
191188 ] ,
192189 active : true ,
193190 resources : [
194- "png/weread_32 .ico"
191+ "png/weekly_32 .ico"
195192 ] ,
196193 targets : [
197194 "msi"
@@ -212,7 +209,7 @@ var WinConf = {
212209
213210var bundle$1 = {
214211 icon : [
215- "icons/weread .icns"
212+ "icons/weekly .icns"
216213 ] ,
217214 active : true ,
218215 macOS : {
@@ -228,7 +225,7 @@ var MacConf = {
228225var productName = "we-read" ;
229226var bundle = {
230227 icon : [
231- "png/weread_512 .png"
228+ "png/weekly .png"
232229 ] ,
233230 active : true ,
234231 linux : {
@@ -238,7 +235,7 @@ var bundle = {
238235 "wget"
239236 ] ,
240237 files : {
241- "/usr/share/applications/com-pake-weread .desktop" : "assets/com-pake-weread .desktop"
238+ "/usr/share/applications/com-pake-weekly .desktop" : "assets/com-pake-weekly .desktop"
242239 }
243240 }
244241 } ,
@@ -794,7 +791,6 @@ const DEFAULT_PAKE_OPTIONS = {
794791 height : 780 ,
795792 width : 1200 ,
796793 fullscreen : false ,
797- resizable : true ,
798794 hideTitleBar : false ,
799795 alwaysOnTop : false ,
800796 appVersion : '1.0.0' ,
@@ -907,11 +903,12 @@ function appendProtocol(inputUrl) {
907903// Normalizes the URL by ensuring it has a protocol and is valid.
908904function normalizeUrl ( urlToNormalize ) {
909905 const urlWithProtocol = appendProtocol ( urlToNormalize ) ;
910- if ( isUrl ( urlWithProtocol ) ) {
906+ try {
907+ new URL ( urlWithProtocol ) ;
911908 return urlWithProtocol ;
912909 }
913- else {
914- throw new Error ( `Your url "${ urlWithProtocol } " is invalid` ) ;
910+ catch ( err ) {
911+ throw new Error ( `Your url "${ urlWithProtocol } " is invalid: ${ err . message } ` ) ;
915912 }
916913}
917914
@@ -938,6 +935,11 @@ async function handleOptions(options, url) {
938935 const namePrompt = await promptText ( promptMessage , defaultName ) ;
939936 name = namePrompt || defaultName ;
940937 }
938+ // Handle platform-specific name formatting
939+ if ( name && platform === 'linux' ) {
940+ // Convert to lowercase and replace spaces with dashes for Linux
941+ name = name . toLowerCase ( ) . replace ( / \s + / g, '-' ) ;
942+ }
941943 if ( ! isValidName ( name , platform ) ) {
942944 const LINUX_NAME_ERROR = `✕ Name should only include lowercase letters, numbers, and dashes (not leading dashes). Examples: com-123-xxx, 123pan, pan123, weread, we-read, 123.` ;
943945 const DEFAULT_NAME_ERROR = `✕ Name should only include letters, numbers, dashes, and spaces (not leading dashes and spaces). Examples: 123pan, 123Pan, Pan123, weread, WeRead, WERead, we-read, We Read, 123.` ;
@@ -996,12 +998,7 @@ program
996998 // Refer to https://github.com/tj/commander.js#custom-option-processing, turn string array into a string connected with custom connectors.
997999 // If the platform is Linux, use `-` as the connector, and convert all characters to lowercase.
9981000 // For example, Google Translate will become google-translate.
999- . option ( '--name <string...>' , 'Application name' , ( value , previous ) => {
1000- const platform = process . platform ;
1001- const connector = platform === 'linux' ? '-' : ' ' ;
1002- const name = previous === undefined ? value : `${ previous } ${ connector } ${ value } ` ;
1003- return platform === 'linux' ? name . toLowerCase ( ) : name ;
1004- } )
1001+ . option ( '--name <string>' , 'Application name' )
10051002 . option ( '--icon <string>' , 'Application icon' , DEFAULT_PAKE_OPTIONS . icon )
10061003 . option ( '--width <number>' , 'Window width' , validateNumberInput , DEFAULT_PAKE_OPTIONS . width )
10071004 . option ( '--height <number>' , 'Window height' , validateNumberInput , DEFAULT_PAKE_OPTIONS . height )
@@ -1021,7 +1018,7 @@ program
10211018 return previous ? [ ...previous , ...files ] : files ;
10221019} , DEFAULT_PAKE_OPTIONS . inject )
10231020 . option ( '--debug' , 'Debug build and more output' , DEFAULT_PAKE_OPTIONS . debug )
1024- . addOption ( new Option ( '--proxy-url <url>' , 'Proxy URL for all network requests' )
1021+ . addOption ( new Option ( '--proxy-url <url>' , 'Proxy URL for all network requests (http://, https://, socks5://) ' )
10251022 . default ( DEFAULT_PAKE_OPTIONS . proxyUrl )
10261023 . hideHelp ( ) )
10271024 . addOption ( new Option ( '--user-agent <string>' , 'Custom user agent' )
0 commit comments