electron-cli 0.3.0-alpha.12 → 0.3.0-alpha.14

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 CHANGED
@@ -376,7 +376,7 @@ checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e"
376
376
 
377
377
  [[package]]
378
378
  name = "electron-cli"
379
- version = "0.3.0-alpha.12"
379
+ version = "0.3.0-alpha.14"
380
380
  dependencies = [
381
381
  "anyhow",
382
382
  "apple-dmg",
package/Cargo.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "electron-cli"
3
- version = "0.3.0-alpha.12"
3
+ version = "0.3.0-alpha.14"
4
4
  edition = "2021"
5
5
  description = "Experimental Rust CLI for Electron project diagnostics and workflow automation"
6
6
  license = "MIT"
package/README.md CHANGED
@@ -36,10 +36,10 @@ 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 a distributable under `out/make/<target>/<platform>/<arch>/`; 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
- - `publish`: runs `make` and publishes the distributable to a local directory with a manifest or to GitHub Releases.
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
+ - `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 when `--publisher` is omitted, and `--publisher` still forces one publisher.
41
41
 
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`.
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
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
 
@@ -54,12 +54,40 @@ 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
+ "publishers": [
66
+ { "name": "local", "config": { "to": "out/publish/local", "channel": "alpha" } },
67
+ {
68
+ "name": "@electron-forge/publisher-github",
69
+ "config": {
70
+ "repository": { "owner": "example", "name": "my-app" },
71
+ "draft": true,
72
+ "prerelease": true
73
+ }
74
+ }
75
+ ]
76
+ },
77
+ "config": {
78
+ "forge": {
79
+ "makers": [
80
+ { "name": "@electron-forge/maker-zip" }
81
+ ],
82
+ "publishers": [
83
+ { "name": "@electron-forge/publisher-github" }
84
+ ]
57
85
  }
58
86
  }
59
87
  }
60
88
  ```
61
89
 
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.
90
+ 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. JavaScript Forge config files are not evaluated.
63
91
 
64
92
  ## Install
65
93
 
@@ -125,7 +153,7 @@ The inspection and planning commands support `--json` so agents and scripts can
125
153
  `start --dry-run --json` shows the Electron executable that will be launched.
126
154
  `package --dry-run --json` shows the runtime, app file, metadata, icon, and extra-resource copy plan.
127
155
  `make --dry-run --json` shows the package prerequisite and selected maker artifact path.
128
- `publish --dry-run --json` shows the make prerequisite plus either the local destination/manifest path or the GitHub release/upload plan.
156
+ `publish --dry-run --json` shows the make prerequisite plus either the local destination/manifest path or the GitHub release/upload plan. When multiple configured makers or publishers apply, the JSON output contains a `publishes` array.
129
157
 
130
158
  ```sh
131
159
  electron-cli plan --json
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electron-cli",
3
- "version": "0.3.0-alpha.12",
3
+ "version": "0.3.0-alpha.14",
4
4
  "description": "Experimental Rust CLI for Electron project diagnostics and workflow automation",
5
5
  "license": "MIT",
6
6
  "repository": {
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, default_value_t = MakeTarget::Zip)]
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)]
@@ -207,17 +207,17 @@ pub struct PublishArgs {
207
207
  #[arg(long)]
208
208
  pub arch: Option<String>,
209
209
 
210
- /// Maker target whose artifact should be published.
211
- #[arg(long, value_enum, default_value_t = MakeTarget::Zip)]
212
- pub target: MakeTarget,
210
+ /// Maker target whose artifact should be published. Overrides configured makers when provided.
211
+ #[arg(long, value_enum)]
212
+ pub target: Option<MakeTarget>,
213
213
 
214
- /// Publisher target to use.
215
- #[arg(long, value_enum, default_value_t = PublishTarget::Local)]
216
- pub publisher: PublishTarget,
214
+ /// Publisher target to use. Overrides configured publishers when provided.
215
+ #[arg(long, value_enum)]
216
+ pub publisher: Option<PublishTarget>,
217
217
 
218
218
  /// Destination for local published artifacts.
219
- #[arg(long, default_value = "out/publish/local", value_name = "PATH")]
220
- pub to: PathBuf,
219
+ #[arg(long, value_name = "PATH")]
220
+ pub to: Option<PathBuf>,
221
221
 
222
222
  /// GitHub repository to publish to, in OWNER/REPO form.
223
223
  #[arg(long, value_name = "OWNER/REPO")]
@@ -240,12 +240,12 @@ pub struct PublishArgs {
240
240
  pub github_prerelease: bool,
241
241
 
242
242
  /// GitHub API base URL, useful for GitHub Enterprise.
243
- #[arg(long, default_value = "https://api.github.com", value_name = "URL")]
244
- pub github_api_url: String,
243
+ #[arg(long, value_name = "URL")]
244
+ pub github_api_url: Option<String>,
245
245
 
246
246
  /// Release channel label written into the publish manifest.
247
- #[arg(long, default_value = "default")]
248
- pub channel: String,
247
+ #[arg(long)]
248
+ pub channel: Option<String>,
249
249
 
250
250
  /// Reuse an existing make artifact instead of running package and make first.
251
251
  #[arg(long)]
@@ -306,7 +306,7 @@ impl MakeTarget {
306
306
  }
307
307
  }
308
308
 
309
- #[derive(Debug, Clone, Copy, ValueEnum)]
309
+ #[derive(Debug, Clone, Copy, PartialEq, Eq, ValueEnum)]
310
310
  #[value(rename_all = "lower")]
311
311
  pub enum PublishTarget {
312
312
  Github,