electron-cli 0.3.0-alpha.15 → 0.3.0-alpha.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/Cargo.lock +2610 -88
- package/Cargo.toml +2 -1
- package/README.md +15 -3
- package/package.json +1 -1
- package/src/commands/package.rs +761 -0
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.17"
|
|
4
4
|
edition = "2021"
|
|
5
5
|
description = "Experimental Rust CLI for Electron project diagnostics and workflow automation"
|
|
6
6
|
license = "MIT"
|
|
@@ -8,6 +8,7 @@ repository = "https://github.com/Ikana/electron-cli"
|
|
|
8
8
|
|
|
9
9
|
[dependencies]
|
|
10
10
|
anyhow = "1.0"
|
|
11
|
+
apple-codesign = { version = "0.29", default-features = false }
|
|
11
12
|
apple-dmg = "0.5"
|
|
12
13
|
cab = "0.6"
|
|
13
14
|
camino = { version = "1.1", features = ["serde1"] }
|
package/README.md
CHANGED
|
@@ -35,13 +35,15 @@ The Rust-native flow currently owns:
|
|
|
35
35
|
|
|
36
36
|
- `init --template minimal`: writes a local Electron starter without Electron Forge.
|
|
37
37
|
- `start`: launches the installed Electron runtime directly.
|
|
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; it reads package metadata from `package.json`, JSON-shaped Forge config, and static Forge config files.
|
|
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; it reads package metadata from `package.json`, JSON-shaped Forge config, and static Forge config files, and can apply experimental Rust-native ad-hoc macOS bundle signatures.
|
|
39
39
|
- `make`: runs `package` and writes distributables under `out/make/<target>/<platform>/<arch>/`; it reads JSON-shaped `config.forge.makers` / `electronCli.makers` arrays and static Forge config files 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 distributables to a local directory with a manifest or to GitHub Releases; it reads JSON-shaped `config.forge.publishers` / `electronCli.publishers` arrays and static Forge config files when `--publisher` is omitted, and `--publisher` still forces one publisher.
|
|
41
41
|
|
|
42
42
|
The GitHub publisher creates or reuses a release, uploads selected make artifacts, and can replace an existing asset with `--force`. It reads `GITHUB_TOKEN` or `GH_TOKEN` and can infer `OWNER/REPO` from package metadata, Forge GitHub publisher config, or `package.json` `repository`. You can also pass `--github-repo`.
|
|
43
43
|
|
|
44
|
-
The
|
|
44
|
+
The package command recognizes macOS `packagerConfig.osxSign` and `packagerConfig.osxNotarize` options and reports the signing/notarization plan without serializing credential values. When `osxSign` is enabled on macOS and no certificate identity is configured, or the identity is `"-"`, `package` writes an experimental Rust-native ad-hoc signature for the generated `.app` bundle. Developer ID certificate/keychain signing and notarization execution are not implemented yet.
|
|
45
|
+
|
|
46
|
+
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, Developer ID signing execution, and notarization execution are still TODO.
|
|
45
47
|
|
|
46
48
|
Package metadata can be configured in `package.json`:
|
|
47
49
|
|
|
@@ -53,7 +55,15 @@ Package metadata can be configured in `package.json`:
|
|
|
53
55
|
"appBundleId": "com.example.my-app",
|
|
54
56
|
"appCategoryType": "public.app-category.developer-tools",
|
|
55
57
|
"icon": "assets/icon",
|
|
56
|
-
"extraResource": "assets/config.json"
|
|
58
|
+
"extraResource": "assets/config.json",
|
|
59
|
+
"osxSign": {
|
|
60
|
+
"identity": "-",
|
|
61
|
+
"entitlements": "assets/entitlements.plist",
|
|
62
|
+
"hardenedRuntime": true
|
|
63
|
+
},
|
|
64
|
+
"osxNotarize": {
|
|
65
|
+
"keychainProfile": "notary-profile"
|
|
66
|
+
}
|
|
57
67
|
},
|
|
58
68
|
"makers": [
|
|
59
69
|
{ "name": "@electron-forge/maker-zip" },
|
|
@@ -87,6 +97,8 @@ Package metadata can be configured in `package.json`:
|
|
|
87
97
|
}
|
|
88
98
|
```
|
|
89
99
|
|
|
100
|
+
Set `identity` to a Developer ID certificate name when you want the plan to reflect Forge-style release signing, but this project will report it as not executable until Rust-native certificate/keychain signing exists. Use `identity: "-"` or omit `identity` for the current ad-hoc signing path.
|
|
101
|
+
|
|
90
102
|
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. The publish command maps JSON-shaped publisher names to local and GitHub.
|
|
91
103
|
|
|
92
104
|
Static `forge.config.js`, `forge.config.cjs`, `forge.config.mjs`, and `forge.config.ts` files are parsed in Rust when they export an object literal directly or via a local `const`/`let`/`var` identifier. Dynamic JavaScript config that calls functions, reads environment state, or computes the config at runtime is not evaluated.
|