electron-cli 0.3.0-alpha.11 → 0.3.0-alpha.13
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/Cargo.lock +77 -1
- package/Cargo.toml +4 -1
- package/README.md +18 -3
- package/package.json +1 -1
- package/src/cli.rs +5 -3
- package/src/commands/make.rs +1364 -29
- package/src/commands/publish.rs +2 -2
- package/src/project.rs +1 -1
package/Cargo.lock
CHANGED
|
@@ -144,6 +144,18 @@ version = "1.11.1"
|
|
|
144
144
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
145
145
|
checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33"
|
|
146
146
|
|
|
147
|
+
[[package]]
|
|
148
|
+
name = "cab"
|
|
149
|
+
version = "0.6.0"
|
|
150
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
151
|
+
checksum = "171228650e6721d5acc0868a462cd864f49ac5f64e4a42cde270406e64e404d2"
|
|
152
|
+
dependencies = [
|
|
153
|
+
"byteorder",
|
|
154
|
+
"flate2",
|
|
155
|
+
"lzxd",
|
|
156
|
+
"time",
|
|
157
|
+
]
|
|
158
|
+
|
|
147
159
|
[[package]]
|
|
148
160
|
name = "camino"
|
|
149
161
|
version = "1.2.2"
|
|
@@ -163,6 +175,17 @@ dependencies = [
|
|
|
163
175
|
"shlex",
|
|
164
176
|
]
|
|
165
177
|
|
|
178
|
+
[[package]]
|
|
179
|
+
name = "cfb"
|
|
180
|
+
version = "0.14.0"
|
|
181
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
182
|
+
checksum = "a347dcabdae9c31b0825fd6a8bed285ec9c2acb89c47827126d52fa4f59cece3"
|
|
183
|
+
dependencies = [
|
|
184
|
+
"fnv",
|
|
185
|
+
"uuid",
|
|
186
|
+
"web-time",
|
|
187
|
+
]
|
|
188
|
+
|
|
166
189
|
[[package]]
|
|
167
190
|
name = "cfg-if"
|
|
168
191
|
version = "1.0.4"
|
|
@@ -353,25 +376,37 @@ checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e"
|
|
|
353
376
|
|
|
354
377
|
[[package]]
|
|
355
378
|
name = "electron-cli"
|
|
356
|
-
version = "0.3.0-alpha.
|
|
379
|
+
version = "0.3.0-alpha.13"
|
|
357
380
|
dependencies = [
|
|
358
381
|
"anyhow",
|
|
359
382
|
"apple-dmg",
|
|
383
|
+
"cab",
|
|
360
384
|
"camino",
|
|
361
385
|
"clap",
|
|
362
386
|
"fatfs",
|
|
363
387
|
"flate2",
|
|
364
388
|
"fscommon",
|
|
365
389
|
"md5",
|
|
390
|
+
"msi",
|
|
366
391
|
"plist",
|
|
367
392
|
"rpm",
|
|
368
393
|
"serde",
|
|
369
394
|
"serde_json",
|
|
370
395
|
"tar",
|
|
371
396
|
"ureq",
|
|
397
|
+
"uuid",
|
|
372
398
|
"zip",
|
|
373
399
|
]
|
|
374
400
|
|
|
401
|
+
[[package]]
|
|
402
|
+
name = "encoding_rs"
|
|
403
|
+
version = "0.8.35"
|
|
404
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
405
|
+
checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3"
|
|
406
|
+
dependencies = [
|
|
407
|
+
"cfg-if",
|
|
408
|
+
]
|
|
409
|
+
|
|
375
410
|
[[package]]
|
|
376
411
|
name = "enum-display-derive"
|
|
377
412
|
version = "0.1.1"
|
|
@@ -449,6 +484,12 @@ dependencies = [
|
|
|
449
484
|
"zlib-rs",
|
|
450
485
|
]
|
|
451
486
|
|
|
487
|
+
[[package]]
|
|
488
|
+
name = "fnv"
|
|
489
|
+
version = "1.0.7"
|
|
490
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
491
|
+
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
|
492
|
+
|
|
452
493
|
[[package]]
|
|
453
494
|
name = "foldhash"
|
|
454
495
|
version = "0.1.5"
|
|
@@ -809,6 +850,12 @@ version = "0.4.30"
|
|
|
809
850
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
810
851
|
checksum = "616ec5685824bcc94416c6d4a7a446eea774a31efd7062c8480ba6fd06d7a6e5"
|
|
811
852
|
|
|
853
|
+
[[package]]
|
|
854
|
+
name = "lzxd"
|
|
855
|
+
version = "0.2.6"
|
|
856
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
857
|
+
checksum = "7b29dffab797218e12e4df08ef5d15ab9efca2504038b1b32b9b32fc844b39c9"
|
|
858
|
+
|
|
812
859
|
[[package]]
|
|
813
860
|
name = "md5"
|
|
814
861
|
version = "0.7.0"
|
|
@@ -831,6 +878,18 @@ dependencies = [
|
|
|
831
878
|
"simd-adler32",
|
|
832
879
|
]
|
|
833
880
|
|
|
881
|
+
[[package]]
|
|
882
|
+
name = "msi"
|
|
883
|
+
version = "0.10.0"
|
|
884
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
885
|
+
checksum = "b0325f8473ef1f5c38ee42345e2cd1678299cbbfa169d1776654a2a682867420"
|
|
886
|
+
dependencies = [
|
|
887
|
+
"byteorder",
|
|
888
|
+
"cfb",
|
|
889
|
+
"encoding_rs",
|
|
890
|
+
"uuid",
|
|
891
|
+
]
|
|
892
|
+
|
|
834
893
|
[[package]]
|
|
835
894
|
name = "nom"
|
|
836
895
|
version = "8.0.0"
|
|
@@ -1197,6 +1256,12 @@ dependencies = [
|
|
|
1197
1256
|
"digest",
|
|
1198
1257
|
]
|
|
1199
1258
|
|
|
1259
|
+
[[package]]
|
|
1260
|
+
name = "sha1_smol"
|
|
1261
|
+
version = "1.0.1"
|
|
1262
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1263
|
+
checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d"
|
|
1264
|
+
|
|
1200
1265
|
[[package]]
|
|
1201
1266
|
name = "sha2"
|
|
1202
1267
|
version = "0.10.9"
|
|
@@ -1471,6 +1536,7 @@ checksum = "d258b83ceec21034727ecee8c382cfa6c3e133699b0742c64571814fb420c9f7"
|
|
|
1471
1536
|
dependencies = [
|
|
1472
1537
|
"getrandom 0.4.2",
|
|
1473
1538
|
"js-sys",
|
|
1539
|
+
"sha1_smol",
|
|
1474
1540
|
"wasm-bindgen",
|
|
1475
1541
|
]
|
|
1476
1542
|
|
|
@@ -1583,6 +1649,16 @@ dependencies = [
|
|
|
1583
1649
|
"semver",
|
|
1584
1650
|
]
|
|
1585
1651
|
|
|
1652
|
+
[[package]]
|
|
1653
|
+
name = "web-time"
|
|
1654
|
+
version = "1.1.0"
|
|
1655
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1656
|
+
checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb"
|
|
1657
|
+
dependencies = [
|
|
1658
|
+
"js-sys",
|
|
1659
|
+
"wasm-bindgen",
|
|
1660
|
+
]
|
|
1661
|
+
|
|
1586
1662
|
[[package]]
|
|
1587
1663
|
name = "webpki-roots"
|
|
1588
1664
|
version = "1.0.7"
|
package/Cargo.toml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "electron-cli"
|
|
3
|
-
version = "0.3.0-alpha.
|
|
3
|
+
version = "0.3.0-alpha.13"
|
|
4
4
|
edition = "2021"
|
|
5
5
|
description = "Experimental Rust CLI for Electron project diagnostics and workflow automation"
|
|
6
6
|
license = "MIT"
|
|
@@ -9,16 +9,19 @@ repository = "https://github.com/Ikana/electron-cli"
|
|
|
9
9
|
[dependencies]
|
|
10
10
|
anyhow = "1.0"
|
|
11
11
|
apple-dmg = "0.5"
|
|
12
|
+
cab = "0.6"
|
|
12
13
|
camino = { version = "1.1", features = ["serde1"] }
|
|
13
14
|
clap = { version = "4.6", features = ["derive"] }
|
|
14
15
|
fatfs = "0.3"
|
|
15
16
|
flate2 = { version = "1.1", default-features = false, features = ["rust_backend"] }
|
|
16
17
|
fscommon = "0.1"
|
|
17
18
|
md5 = "0.7"
|
|
19
|
+
msi = "0.10"
|
|
18
20
|
plist = "1"
|
|
19
21
|
rpm = { version = "0.24", default-features = false, features = ["payload", "gzip-compression"] }
|
|
20
22
|
serde = { version = "1.0", features = ["derive"] }
|
|
21
23
|
serde_json = "1.0"
|
|
22
24
|
tar = "0.4"
|
|
23
25
|
ureq = { version = "3.3", features = ["json"] }
|
|
26
|
+
uuid = { version = "1", features = ["v5"] }
|
|
24
27
|
zip = { version = "8.6.0", default-features = false, features = ["deflate-flate2-zlib-rs"] }
|
package/README.md
CHANGED
|
@@ -36,12 +36,12 @@ The Rust-native flow currently owns:
|
|
|
36
36
|
- `init --template minimal`: writes a local Electron starter without Electron Forge.
|
|
37
37
|
- `start`: launches the installed Electron runtime directly.
|
|
38
38
|
- `package`: copies the installed Electron runtime, app files, installed production dependency closure, app metadata, macOS icon, and extra resources into a local app bundle for the current platform and architecture.
|
|
39
|
-
- `make`: runs `package` and writes
|
|
39
|
+
- `make`: runs `package` and writes distributables under `out/make/<target>/<platform>/<arch>/`; it reads JSON-shaped `config.forge.makers` / `electronCli.makers` arrays when `--target` is omitted, and `--target` still forces one maker. ZIP works on all platforms, `--target dmg` writes a basic macOS disk image, `--target deb` / `--target rpm` write Linux packages, and `--target msi` writes a basic Windows Installer package.
|
|
40
40
|
- `publish`: runs `make` and publishes the distributable to a local directory with a manifest or to GitHub Releases.
|
|
41
41
|
|
|
42
42
|
The GitHub publisher creates or reuses a release, uploads the selected make artifact, and can replace an existing asset with `--force`. It reads `GITHUB_TOKEN` or `GH_TOKEN` and can infer `OWNER/REPO` from `package.json` `repository`, or you can pass `--github-repo`.
|
|
43
43
|
|
|
44
|
-
The DMG maker is currently a pure-Rust FAT32 image with the app bundle and an Applications entry. HFS+/APFS layout customization,
|
|
44
|
+
The DMG maker is currently a pure-Rust FAT32 image with the app bundle and an Applications entry. The MSI maker writes a compressed embedded CAB, Windows Installer database tables, and a Start Menu shortcut when the packaged executable is present. HFS+/APFS DMG layout customization, installer UI customization, Windows/Linux icon embedding, signing, and notarization are still TODO.
|
|
45
45
|
|
|
46
46
|
Package metadata can be configured in `package.json`:
|
|
47
47
|
|
|
@@ -54,12 +54,26 @@ Package metadata can be configured in `package.json`:
|
|
|
54
54
|
"appCategoryType": "public.app-category.developer-tools",
|
|
55
55
|
"icon": "assets/icon",
|
|
56
56
|
"extraResource": "assets/config.json"
|
|
57
|
+
},
|
|
58
|
+
"makers": [
|
|
59
|
+
{ "name": "@electron-forge/maker-zip" },
|
|
60
|
+
{ "name": "@electron-forge/maker-dmg", "platforms": ["darwin"] },
|
|
61
|
+
{ "name": "@electron-forge/maker-deb", "platforms": ["linux"] },
|
|
62
|
+
{ "name": "@electron-forge/maker-rpm", "platforms": ["linux"] },
|
|
63
|
+
{ "name": "@electron-forge/maker-wix", "platforms": ["win32"] }
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
"config": {
|
|
67
|
+
"forge": {
|
|
68
|
+
"makers": [
|
|
69
|
+
{ "name": "@electron-forge/maker-zip" }
|
|
70
|
+
]
|
|
57
71
|
}
|
|
58
72
|
}
|
|
59
73
|
}
|
|
60
74
|
```
|
|
61
75
|
|
|
62
|
-
The package command also reads JSON-shaped `config.forge.packagerConfig` and `electronPackagerConfig` entries for the same fields. JavaScript Forge config files are not evaluated.
|
|
76
|
+
The package command also reads JSON-shaped `config.forge.packagerConfig` and `electronPackagerConfig` entries for the same fields. The make command maps JSON-shaped Forge maker names to the Rust-native targets it supports: zip, dmg, deb, rpm, and wix/msi. JavaScript Forge config files are not evaluated.
|
|
63
77
|
|
|
64
78
|
## Install
|
|
65
79
|
|
|
@@ -97,6 +111,7 @@ cargo run -- make --dry-run
|
|
|
97
111
|
cargo run -- make --target dmg --dry-run
|
|
98
112
|
cargo run -- make --target deb --dry-run
|
|
99
113
|
cargo run -- make --target rpm --dry-run
|
|
114
|
+
cargo run -- make --target msi --platform win32 --dry-run
|
|
100
115
|
cargo run -- publish --dry-run
|
|
101
116
|
cargo run -- publish --publisher github --dry-run
|
|
102
117
|
cargo run -- publish --publisher github --github-repo OWNER/REPO --github-tag v0.1.0
|
package/package.json
CHANGED
package/src/cli.rs
CHANGED
|
@@ -164,9 +164,9 @@ pub struct MakeArgs {
|
|
|
164
164
|
#[arg(long)]
|
|
165
165
|
pub arch: Option<String>,
|
|
166
166
|
|
|
167
|
-
/// Maker target to run.
|
|
168
|
-
#[arg(long, value_enum
|
|
169
|
-
pub target: MakeTarget
|
|
167
|
+
/// Maker target to run. Overrides configured makers when provided.
|
|
168
|
+
#[arg(long, value_enum)]
|
|
169
|
+
pub target: Option<MakeTarget>,
|
|
170
170
|
|
|
171
171
|
/// Reuse an existing package output instead of running package first.
|
|
172
172
|
#[arg(long)]
|
|
@@ -289,6 +289,7 @@ impl PackageManager {
|
|
|
289
289
|
pub enum MakeTarget {
|
|
290
290
|
Deb,
|
|
291
291
|
Dmg,
|
|
292
|
+
Msi,
|
|
292
293
|
Rpm,
|
|
293
294
|
Zip,
|
|
294
295
|
}
|
|
@@ -298,6 +299,7 @@ impl MakeTarget {
|
|
|
298
299
|
match self {
|
|
299
300
|
MakeTarget::Deb => "deb",
|
|
300
301
|
MakeTarget::Dmg => "dmg",
|
|
302
|
+
MakeTarget::Msi => "msi",
|
|
301
303
|
MakeTarget::Rpm => "rpm",
|
|
302
304
|
MakeTarget::Zip => "zip",
|
|
303
305
|
}
|