pake-cli 3.6.3 โ†’ 3.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -22,7 +22,7 @@ import * as psl from 'psl';
22
22
  import { InvalidArgumentError, program as program$1, Option } from 'commander';
23
23
 
24
24
  var name = "pake-cli";
25
- var version = "3.6.3";
25
+ var version = "3.6.4";
26
26
  var description = "๐Ÿคฑ๐Ÿป Turn any webpage into a desktop app with one command. ๐Ÿคฑ๐Ÿป ไธ€้”ฎๆ‰“ๅŒ…็ฝ‘้กต็”Ÿๆˆ่ฝป้‡ๆกŒ้ขๅบ”็”จใ€‚";
27
27
  var engines = {
28
28
  node: ">=18.0.0"
@@ -504,9 +504,9 @@ async function mergeConfig(url, options, tauriConf) {
504
504
  tauriConf.productName = name;
505
505
  tauriConf.identifier = identifier;
506
506
  tauriConf.version = appVersion;
507
- if (platform === 'linux') {
508
- tauriConf.mainBinaryName = `pake-${generateIdentifierSafeName(name)}`;
509
- }
507
+ // Always set mainBinaryName to ensure binary uniqueness
508
+ const linuxBinaryName = `pake-${generateLinuxPackageName(name)}`;
509
+ tauriConf.mainBinaryName = platform === 'linux' ? linuxBinaryName : `pake-${generateIdentifierSafeName(name)}`;
510
510
  if (platform == 'win32') {
511
511
  tauriConf.bundle.windows.wix.language[0] = installerLanguage;
512
512
  }
@@ -551,9 +551,9 @@ async function mergeConfig(url, options, tauriConf) {
551
551
  // Remove hardcoded desktop files and regenerate with correct app name
552
552
  delete tauriConf.bundle.linux.deb.files;
553
553
  // Generate correct desktop file configuration
554
- const appNameSafe = getSafeAppName(name);
555
- const identifier = `com.pake.${appNameSafe}`;
556
- const desktopFileName = `${identifier}.desktop`;
554
+ const linuxName = generateLinuxPackageName(name);
555
+ const desktopFileName = `com.pake.${linuxName}.desktop`;
556
+ const iconName = `${linuxName}_512`;
557
557
  // Create desktop file content
558
558
  // Determine if title contains Chinese characters for Name[zh_CN]
559
559
  const chineseName = title && /[\u4e00-\u9fa5]/.test(title) ? title : null;
@@ -563,11 +563,12 @@ Type=Application
563
563
  Name=${name}
564
564
  ${chineseName ? `Name[zh_CN]=${chineseName}` : ''}
565
565
  Comment=${name}
566
- Exec=pake-${appNameSafe}
567
- Icon=${appNameSafe}_512
568
- Categories=Network;WebBrowser;
566
+ Exec=${linuxBinaryName}
567
+ Icon=${iconName}
568
+ Categories=Network;WebBrowser;Utility;
569
569
  MimeType=text/html;text/xml;application/xhtml_xml;
570
570
  StartupNotify=true
571
+ Terminal=false
571
572
  `;
572
573
  // Write desktop file to src-tauri/assets directory where Tauri expects it
573
574
  const srcAssetsDir = path.join(npmDirectory, 'src-tauri/assets');
@@ -576,8 +577,16 @@ StartupNotify=true
576
577
  await fsExtra.writeFile(srcDesktopFilePath, desktopContent);
577
578
  // Set up desktop file in bundle configuration
578
579
  // Use absolute path from src-tauri directory to assets
580
+ const desktopInstallPath = `/usr/share/applications/${desktopFileName}`;
579
581
  tauriConf.bundle.linux.deb.files = {
580
- [`/usr/share/applications/${desktopFileName}`]: `assets/${desktopFileName}`,
582
+ [desktopInstallPath]: `assets/${desktopFileName}`,
583
+ };
584
+ // Add desktop file support for RPM
585
+ if (!tauriConf.bundle.linux.rpm) {
586
+ tauriConf.bundle.linux.rpm = {};
587
+ }
588
+ tauriConf.bundle.linux.rpm.files = {
589
+ [desktopInstallPath]: `assets/${desktopFileName}`,
581
590
  };
582
591
  const validTargets = [
583
592
  'deb',
@@ -615,7 +624,7 @@ StartupNotify=true
615
624
  },
616
625
  linux: {
617
626
  fileExt: '.png',
618
- path: `png/${safeAppName}_512.png`,
627
+ path: `png/${generateLinuxPackageName(name)}_512.png`,
619
628
  defaultIcon: 'png/icon_512.png',
620
629
  message: 'Linux icon must be .png and 512x512px.',
621
630
  },
@@ -1083,12 +1092,9 @@ class BaseBuilder {
1083
1092
  */
1084
1093
  getBinaryName(appName) {
1085
1094
  const extension = process.platform === 'win32' ? '.exe' : '';
1086
- // Linux uses the unique binary name we set in merge.ts
1087
- if (process.platform === 'linux') {
1088
- return `pake-${generateIdentifierSafeName(appName)}${extension}`;
1089
- }
1090
- // Windows and macOS use 'pake' as binary name
1091
- return `pake${extension}`;
1095
+ // Use unique binary name for all platforms to avoid conflicts
1096
+ const nameToUse = process.platform === 'linux' ? generateLinuxPackageName(appName) : generateIdentifierSafeName(appName);
1097
+ return `pake-${nameToUse}${extension}`;
1092
1098
  }
1093
1099
  /**
1094
1100
  * Check if this build has architecture-specific target
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pake-cli",
3
- "version": "3.6.3",
3
+ "version": "3.6.4",
4
4
  "description": "๐Ÿคฑ๐Ÿป Turn any webpage into a desktop app with one command. ๐Ÿคฑ๐Ÿป ไธ€้”ฎๆ‰“ๅŒ…็ฝ‘้กต็”Ÿๆˆ่ฝป้‡ๆกŒ้ขๅบ”็”จใ€‚",
5
5
  "engines": {
6
6
  "node": ">=18.0.0"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "windows": [
3
3
  {
4
- "url": "https://twitter.com/",
4
+ "url": "https://example.com",
5
5
  "url_type": "web",
6
6
  "hide_title_bar": false,
7
7
  "fullscreen": false,
@@ -1,6 +1,6 @@
1
1
  {
2
- "productName": "twitter",
3
- "identifier": "com.pake.4fd9c9",
2
+ "productName": "Final App",
3
+ "identifier": "com.pake.c984d0",
4
4
  "version": "1.0.0",
5
5
  "app": {
6
6
  "withGlobalTauri": true,
@@ -14,11 +14,15 @@
14
14
  },
15
15
  "bundle": {
16
16
  "icon": [
17
- "icons/icon.icns"
17
+ "icons/final_app.icns"
18
18
  ],
19
19
  "active": true,
20
20
  "targets": [
21
- "app"
21
+ "dmg"
22
+ ],
23
+ "resources": [
24
+ "icons/final_app.icns"
22
25
  ]
23
- }
26
+ },
27
+ "mainBinaryName": "pake-finalapp"
24
28
  }
@@ -1,5 +1,4 @@
1
1
  {
2
- "productName": "weekly",
3
2
  "bundle": {
4
3
  "icon": ["png/weekly_512.png"],
5
4
  "active": true,
@@ -1,11 +1,14 @@
1
1
  {
2
2
  "bundle": {
3
3
  "icon": [
4
- "icons/icon.icns"
4
+ "icons/final_app.icns"
5
5
  ],
6
6
  "active": true,
7
7
  "targets": [
8
- "app"
8
+ "dmg"
9
+ ],
10
+ "resources": [
11
+ "icons/final_app.icns"
9
12
  ]
10
13
  }
11
14
  }
@@ -2588,7 +2588,7 @@ dependencies = [
2588
2588
 
2589
2589
  [[package]]
2590
2590
  name = "pake"
2591
- version = "3.6.3"
2591
+ version = "3.6.4"
2592
2592
  dependencies = [
2593
2593
  "serde",
2594
2594
  "serde_json",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "pake"
3
- version = "3.6.3"
3
+ version = "3.6.4"
4
4
  description = "๐Ÿคฑ๐Ÿป Turn any webpage into a desktop app with Rust."
5
5
  authors = ["Tw93"]
6
6
  license = "MIT"
@@ -1,5 +1,4 @@
1
1
  {
2
- "productName": "weekly",
3
2
  "bundle": {
4
3
  "icon": ["png/weekly_512.png"],
5
4
  "active": true,