@choochmeque/tauri-windows-bundle 0.1.16 → 0.1.17

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/README.md CHANGED
@@ -398,6 +398,9 @@ jobs:
398
398
  - name: Install dependencies
399
399
  run: pnpm install
400
400
 
401
+ - name: Install msixbundle-cli
402
+ run: cargo install msixbundle-cli
403
+
401
404
  - name: Build MSIX bundle
402
405
  run: pnpm tauri:windows:build --arch x64,arm64 --runner pnpm
403
406
 
package/dist/cli.js CHANGED
@@ -3,7 +3,7 @@ import { Command } from 'commander';
3
3
  import { createRequire } from 'node:module';
4
4
  import * as fs from 'node:fs';
5
5
  import * as path from 'node:path';
6
- import { Jimp } from 'jimp';
6
+ import { read, Image, write } from 'image-js';
7
7
  import { fileURLToPath } from 'node:url';
8
8
  import { glob } from 'glob';
9
9
  import { exec, spawn } from 'node:child_process';
@@ -40,7 +40,7 @@ function readTauriConfig(projectRoot) {
40
40
  return JSON.parse(content);
41
41
  }
42
42
  catch (error) {
43
- throw new Error(`Failed to parse tauri.conf.json: ${error instanceof Error ? error.message : error}`);
43
+ throw new Error(`Failed to parse tauri.conf.json: ${error instanceof Error ? error.message : error}`, { cause: error });
44
44
  }
45
45
  }
46
46
  function readTauriWindowsConfig(projectRoot) {
@@ -53,7 +53,7 @@ function readTauriWindowsConfig(projectRoot) {
53
53
  return JSON.parse(content);
54
54
  }
55
55
  catch (error) {
56
- throw new Error(`Failed to parse tauri.windows.conf.json: ${error instanceof Error ? error.message : error}`);
56
+ throw new Error(`Failed to parse tauri.windows.conf.json: ${error instanceof Error ? error.message : error}`, { cause: error });
57
57
  }
58
58
  }
59
59
  function readBundleConfig$1(windowsDir) {
@@ -66,7 +66,7 @@ function readBundleConfig$1(windowsDir) {
66
66
  return JSON.parse(content);
67
67
  }
68
68
  catch (error) {
69
- throw new Error(`Failed to parse bundle.config.json: ${error instanceof Error ? error.message : error}`);
69
+ throw new Error(`Failed to parse bundle.config.json: ${error instanceof Error ? error.message : error}`, { cause: error });
70
70
  }
71
71
  }
72
72
  function getWindowsDir(projectRoot) {
@@ -85,7 +85,7 @@ function resolveVersion(version, tauriConfigDir) {
85
85
  }
86
86
  catch (error) {
87
87
  if (error instanceof SyntaxError) {
88
- throw new Error(`Failed to parse ${version} as JSON: ${error.message}`);
88
+ throw new Error(`Failed to parse ${version} as JSON: ${error.message}`, { cause: error });
89
89
  }
90
90
  throw error;
91
91
  }
@@ -271,14 +271,14 @@ async function generateWideTile(tauriIconsDir, outputPath) {
271
271
  const iconPath = path.join(tauriIconsDir, iconName);
272
272
  if (fs.existsSync(iconPath)) {
273
273
  try {
274
- const image = await Jimp.read(iconPath);
274
+ const image = await read(iconPath);
275
275
  const iconSize = 150; // Height of the wide tile
276
- const resized = image.clone().resize({ w: iconSize, h: iconSize });
277
- // Create 310x150 canvas with transparent background
278
- const canvas = new Jimp({ width: 310, height: 150, color: 0x00000000 });
276
+ const resized = image.resize({ width: iconSize, height: iconSize });
277
+ // Create 310x150 canvas with transparent background (RGBA)
278
+ const canvas = new Image(310, 150, { colorModel: 'RGBA' });
279
279
  const x = Math.floor((310 - iconSize) / 2);
280
- canvas.composite(resized, x, 0);
281
- await canvas.write(outputPath);
280
+ resized.copyTo(canvas, { origin: { column: x, row: 0 } });
281
+ await write(outputPath, canvas);
282
282
  return true;
283
283
  }
284
284
  catch {
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as fs from 'node:fs';
2
2
  import * as path from 'node:path';
3
- import { Jimp } from 'jimp';
3
+ import { read, Image, write } from 'image-js';
4
4
  import { fileURLToPath } from 'node:url';
5
5
  import { glob } from 'glob';
6
6
  import { exec, spawn } from 'node:child_process';
@@ -121,7 +121,7 @@ function readTauriConfig(projectRoot) {
121
121
  return JSON.parse(content);
122
122
  }
123
123
  catch (error) {
124
- throw new Error(`Failed to parse tauri.conf.json: ${error instanceof Error ? error.message : error}`);
124
+ throw new Error(`Failed to parse tauri.conf.json: ${error instanceof Error ? error.message : error}`, { cause: error });
125
125
  }
126
126
  }
127
127
  function readTauriWindowsConfig(projectRoot) {
@@ -134,7 +134,7 @@ function readTauriWindowsConfig(projectRoot) {
134
134
  return JSON.parse(content);
135
135
  }
136
136
  catch (error) {
137
- throw new Error(`Failed to parse tauri.windows.conf.json: ${error instanceof Error ? error.message : error}`);
137
+ throw new Error(`Failed to parse tauri.windows.conf.json: ${error instanceof Error ? error.message : error}`, { cause: error });
138
138
  }
139
139
  }
140
140
  function readBundleConfig$1(windowsDir) {
@@ -147,7 +147,7 @@ function readBundleConfig$1(windowsDir) {
147
147
  return JSON.parse(content);
148
148
  }
149
149
  catch (error) {
150
- throw new Error(`Failed to parse bundle.config.json: ${error instanceof Error ? error.message : error}`);
150
+ throw new Error(`Failed to parse bundle.config.json: ${error instanceof Error ? error.message : error}`, { cause: error });
151
151
  }
152
152
  }
153
153
  function getWindowsDir(projectRoot) {
@@ -166,7 +166,7 @@ function resolveVersion(version, tauriConfigDir) {
166
166
  }
167
167
  catch (error) {
168
168
  if (error instanceof SyntaxError) {
169
- throw new Error(`Failed to parse ${version} as JSON: ${error.message}`);
169
+ throw new Error(`Failed to parse ${version} as JSON: ${error.message}`, { cause: error });
170
170
  }
171
171
  throw error;
172
172
  }
@@ -268,14 +268,14 @@ async function generateWideTile(tauriIconsDir, outputPath) {
268
268
  const iconPath = path.join(tauriIconsDir, iconName);
269
269
  if (fs.existsSync(iconPath)) {
270
270
  try {
271
- const image = await Jimp.read(iconPath);
271
+ const image = await read(iconPath);
272
272
  const iconSize = 150; // Height of the wide tile
273
- const resized = image.clone().resize({ w: iconSize, h: iconSize });
274
- // Create 310x150 canvas with transparent background
275
- const canvas = new Jimp({ width: 310, height: 150, color: 0x00000000 });
273
+ const resized = image.resize({ width: iconSize, height: iconSize });
274
+ // Create 310x150 canvas with transparent background (RGBA)
275
+ const canvas = new Image(310, 150, { colorModel: 'RGBA' });
276
276
  const x = Math.floor((310 - iconSize) / 2);
277
- canvas.composite(resized, x, 0);
278
- await canvas.write(outputPath);
277
+ resized.copyTo(canvas, { origin: { column: x, row: 0 } });
278
+ await write(outputPath, canvas);
279
279
  return true;
280
280
  }
281
281
  catch {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@choochmeque/tauri-windows-bundle",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
4
4
  "description": "MSIX packaging tool for Tauri apps - Windows Store ready bundles",
5
5
  "type": "module",
6
6
  "bin": {
@@ -27,23 +27,23 @@
27
27
  "templates"
28
28
  ],
29
29
  "dependencies": {
30
- "commander": "^14.0.2",
31
- "glob": "^13.0.0",
32
- "jimp": "^1.6.0"
30
+ "commander": "^14.0.3",
31
+ "glob": "^13.0.6",
32
+ "image-js": "^1.4.0"
33
33
  },
34
34
  "devDependencies": {
35
- "@eslint/js": "^9.0.0",
36
- "@rollup/plugin-node-resolve": "^16.0.0",
37
- "@rollup/plugin-typescript": "^12.0.0",
38
- "@types/node": "^25.0.3",
39
- "@vitest/coverage-v8": "^4.0.0",
40
- "eslint": "^9.0.0",
41
- "prettier": "^3.0.0",
42
- "rollup": "^4.0.0",
43
- "tslib": "^2.6.0",
44
- "typescript": "^5.3.3",
45
- "typescript-eslint": "^8.0.0",
46
- "vitest": "^4.0.0"
35
+ "@eslint/js": "^10.0.1",
36
+ "@rollup/plugin-node-resolve": "^16.0.3",
37
+ "@rollup/plugin-typescript": "^12.3.0",
38
+ "@types/node": "^25.5.0",
39
+ "@vitest/coverage-v8": "^4.1.0",
40
+ "eslint": "^10.0.3",
41
+ "prettier": "^3.8.1",
42
+ "rollup": "^4.59.0",
43
+ "tslib": "^2.8.1",
44
+ "typescript": "^5.9.3",
45
+ "typescript-eslint": "^8.57.1",
46
+ "vitest": "^4.1.0"
47
47
  },
48
48
  "scripts": {
49
49
  "build": "rollup -c",