@todesktop/cli 1.19.1 → 1.20.0-0
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 +11 -4
- package/dist/cli.js +62 -9
- package/dist/cli.js.map +2 -2
- package/dist/types.d.ts +47 -2
- package/package.json +2 -2
- package/schemas/schema.json +53 -3
package/README.md
CHANGED
|
@@ -48,7 +48,7 @@ Create a `todesktop.json` file in the root of your Electron project.
|
|
|
48
48
|
|
|
49
49
|
```json
|
|
50
50
|
{
|
|
51
|
-
"$schema": "https://unpkg.com/@todesktop/cli@1.
|
|
51
|
+
"$schema": "https://unpkg.com/@todesktop/cli@1.20.0-0/schemas/schema.json",
|
|
52
52
|
"schemaVersion": 1
|
|
53
53
|
"id": "your-todesktop-id",
|
|
54
54
|
"icon": "./desktop-icon.png",
|
|
@@ -413,7 +413,7 @@ To enable JSON validation and IntelliSense for your `todesktop.json` file in com
|
|
|
413
413
|
- For example, if using a hosted version of the schema:
|
|
414
414
|
```json
|
|
415
415
|
{
|
|
416
|
-
"$schema": "https://unpkg.com/@todesktop/cli@1.
|
|
416
|
+
"$schema": "https://unpkg.com/@todesktop/cli@1.20.0-0/schemas/schema.json",
|
|
417
417
|
"id": "your-todesktop-id"
|
|
418
418
|
}
|
|
419
419
|
```
|
|
@@ -1039,11 +1039,11 @@ effective `package.json` that ToDesktop will use.
|
|
|
1039
1039
|
|
|
1040
1040
|
### `packageManager` - (optional) string
|
|
1041
1041
|
|
|
1042
|
-
Default: If `yarn.lock` exists, `yarn` is used. If `pnpm-lock.yaml` or `shrinkwrap.yaml` exists, `pnpm` is used. Otherwise, `npm` is used.
|
|
1042
|
+
Default: If `bun.lockb` or `bun.lock` exists, `bun` is used. If `yarn.lock` exists, `yarn` is used. If `pnpm-lock.yaml` or `shrinkwrap.yaml` exists, `pnpm` is used. Otherwise, `npm` is used.
|
|
1043
1043
|
|
|
1044
1044
|
Example: `yarn`
|
|
1045
1045
|
|
|
1046
|
-
The package manager to use when installing dependencies. Valid values are `npm`, `yarn` or `
|
|
1046
|
+
The package manager to use when installing dependencies. Valid values are `npm`, `yarn`, `pnpm` or `bun`.
|
|
1047
1047
|
|
|
1048
1048
|
### `pnpmVersion` - string
|
|
1049
1049
|
|
|
@@ -1625,6 +1625,13 @@ Now, when we build your app on ToDesktop servers, it will also run your custom
|
|
|
1625
1625
|
|
|
1626
1626
|
## Changelog
|
|
1627
1627
|
|
|
1628
|
+
### 1.20.0
|
|
1629
|
+
|
|
1630
|
+
#### Minor Changes
|
|
1631
|
+
|
|
1632
|
+
- 3ae0eaf: Add support for Electron Fuses configuration
|
|
1633
|
+
- 6e11f24: Add Bun package manager support
|
|
1634
|
+
|
|
1628
1635
|
### 1.19.0
|
|
1629
1636
|
|
|
1630
1637
|
#### Minor Changes
|
package/dist/cli.js
CHANGED
|
@@ -409,6 +409,7 @@ var PlatformName;
|
|
|
409
409
|
})(PlatformName || (PlatformName = {}));
|
|
410
410
|
var PackageManager;
|
|
411
411
|
(function(PackageManager2) {
|
|
412
|
+
PackageManager2["bun"] = "bun";
|
|
412
413
|
PackageManager2["npm"] = "npm";
|
|
413
414
|
PackageManager2["pnpm"] = "pnpm";
|
|
414
415
|
PackageManager2["yarn"] = "yarn";
|
|
@@ -2476,6 +2477,7 @@ var schema_default = {
|
|
|
2476
2477
|
}
|
|
2477
2478
|
},
|
|
2478
2479
|
bytenode: { $ref: "#/definitions/bytenodeConfigProperty" },
|
|
2480
|
+
fuses: { $ref: "#/definitions/fusesConfigProperty" },
|
|
2479
2481
|
asar: { $ref: "#/definitions/asarProperty" },
|
|
2480
2482
|
asarUnpack: { $ref: "#/definitions/asarUnpackProperty" },
|
|
2481
2483
|
buildVersion: { $ref: "#/definitions/buildVersionProperty" },
|
|
@@ -2522,6 +2524,7 @@ var schema_default = {
|
|
|
2522
2524
|
nodeVersion: { $ref: "#/definitions/nodeVersionProperty" },
|
|
2523
2525
|
npmVersion: { $ref: "#/definitions/npmVersionProperty" },
|
|
2524
2526
|
pnpmVersion: { $ref: "#/definitions/pnpmVersionProperty" },
|
|
2527
|
+
bunVersion: { $ref: "#/definitions/bunVersionProperty" },
|
|
2525
2528
|
packageJson: { $ref: "#/definitions/packageJsonProperty" },
|
|
2526
2529
|
packageManager: { $ref: "#/definitions/packageManagerProperty" },
|
|
2527
2530
|
rebuildLibrary: { $ref: "#/definitions/rebuildLibraryProperty" },
|
|
@@ -2596,6 +2599,45 @@ var schema_default = {
|
|
|
2596
2599
|
}
|
|
2597
2600
|
]
|
|
2598
2601
|
},
|
|
2602
|
+
fusesConfigProperty: {
|
|
2603
|
+
type: "object",
|
|
2604
|
+
additionalProperties: false,
|
|
2605
|
+
description: "Configure Electron Fuses to enable or disable certain Electron features at package time. Fuses are compile-time feature flags that cannot be changed at runtime, providing security benefits. See https://www.electronjs.org/docs/latest/tutorial/fuses for more information.",
|
|
2606
|
+
properties: {
|
|
2607
|
+
runAsNode: {
|
|
2608
|
+
type: "boolean",
|
|
2609
|
+
description: "Controls whether the ELECTRON_RUN_AS_NODE environment variable is respected. When disabled, the env variable will be ignored. Default: true (enabled)."
|
|
2610
|
+
},
|
|
2611
|
+
enableCookieEncryption: {
|
|
2612
|
+
type: "boolean",
|
|
2613
|
+
description: "Controls whether the cookie store on disk is encrypted using OS-level cryptography. Default: false (disabled)."
|
|
2614
|
+
},
|
|
2615
|
+
enableNodeOptionsEnvironmentVariable: {
|
|
2616
|
+
type: "boolean",
|
|
2617
|
+
description: "Controls whether the NODE_OPTIONS environment variable is respected. When disabled, the env variable will be ignored. Default: true (enabled)."
|
|
2618
|
+
},
|
|
2619
|
+
enableNodeCliInspectArguments: {
|
|
2620
|
+
type: "boolean",
|
|
2621
|
+
description: "Controls whether command line arguments like --inspect are respected. When disabled, these arguments will be ignored. Default: true (enabled)."
|
|
2622
|
+
},
|
|
2623
|
+
enableEmbeddedAsarIntegrityValidation: {
|
|
2624
|
+
type: "boolean",
|
|
2625
|
+
description: "Controls whether Electron validates the integrity of the app.asar file. Requires the integrity block in the asar header. Default: false (disabled)."
|
|
2626
|
+
},
|
|
2627
|
+
onlyLoadAppFromAsar: {
|
|
2628
|
+
type: "boolean",
|
|
2629
|
+
description: "Controls whether Electron only loads the app from an asar archive. When enabled, Electron will not search for loose files. Default: false (disabled)."
|
|
2630
|
+
},
|
|
2631
|
+
loadBrowserProcessSpecificV8Snapshot: {
|
|
2632
|
+
type: "boolean",
|
|
2633
|
+
description: "Controls whether the browser process uses a V8 snapshot file located at browser_v8_context_snapshot.bin. Default: false (disabled)."
|
|
2634
|
+
},
|
|
2635
|
+
grantFileProtocolExtraPrivileges: {
|
|
2636
|
+
type: "boolean",
|
|
2637
|
+
description: "Controls whether pages loaded via file:// protocol get extra privileges. When disabled, file:// pages are more restricted. Requires Electron 29+. Default: true (enabled)."
|
|
2638
|
+
}
|
|
2639
|
+
}
|
|
2640
|
+
},
|
|
2599
2641
|
appFilesProperty: {
|
|
2600
2642
|
type: "array",
|
|
2601
2643
|
description: "This option allows you to decide which files get uploaded to be built on the ToDesktop servers. By default, all files in your app path are included in your app, except for `node_modules` and `.git`. Dependencies are installed on our build servers as there could be platform-specific postinstall steps.",
|
|
@@ -3089,6 +3131,13 @@ var schema_default = {
|
|
|
3089
3131
|
description: "The version of pnpm that ToDesktop should use for installation.",
|
|
3090
3132
|
examples: ["8.10.5"]
|
|
3091
3133
|
},
|
|
3134
|
+
bunVersionProperty: {
|
|
3135
|
+
type: "string",
|
|
3136
|
+
validSemver: {},
|
|
3137
|
+
minLength: 1,
|
|
3138
|
+
description: "The version of Bun that ToDesktop should use for installation.",
|
|
3139
|
+
examples: ["1.3.6"]
|
|
3140
|
+
},
|
|
3092
3141
|
packageJsonProperty: {
|
|
3093
3142
|
type: "object",
|
|
3094
3143
|
description: "If you want to override the default `package.json` configuration, use the `packageJson` property. For example, you can use this to override the `productName` or `version` properties.",
|
|
@@ -3096,10 +3145,10 @@ var schema_default = {
|
|
|
3096
3145
|
},
|
|
3097
3146
|
packageManagerProperty: {
|
|
3098
3147
|
type: "string",
|
|
3099
|
-
enum: ["npm", "yarn", "pnpm"],
|
|
3100
|
-
description: "The package manager to use when installing dependencies. Valid values are `npm`, `yarn` or `
|
|
3148
|
+
enum: ["npm", "yarn", "pnpm", "bun"],
|
|
3149
|
+
description: "The package manager to use when installing dependencies. Valid values are `npm`, `yarn`, `pnpm` or `bun`.",
|
|
3101
3150
|
examples: ["yarn"],
|
|
3102
|
-
default: "If `yarn.lock` exists, `yarn` is used. If `pnpm-lock.yaml` or `shrinkwrap.yaml` exists, `pnpm` is used. Otherwise, `npm` is used."
|
|
3151
|
+
default: "If `bun.lockb` or `bun.lock` exists, `bun` is used. If `yarn.lock` exists, `yarn` is used. If `pnpm-lock.yaml` or `shrinkwrap.yaml` exists, `pnpm` is used. Otherwise, `npm` is used."
|
|
3103
3152
|
},
|
|
3104
3153
|
rebuildLibraryProperty: {
|
|
3105
3154
|
type: "string",
|
|
@@ -3351,6 +3400,7 @@ var schema_default = {
|
|
|
3351
3400
|
},
|
|
3352
3401
|
appPath: { $ref: "#/definitions/appPathProperty" },
|
|
3353
3402
|
bytenode: { $ref: "#/definitions/bytenodeConfigProperty" },
|
|
3403
|
+
fuses: { $ref: "#/definitions/fusesConfigProperty" },
|
|
3354
3404
|
asar: { $ref: "#/definitions/asarProperty" },
|
|
3355
3405
|
asarUnpack: { $ref: "#/definitions/asarUnpackProperty" },
|
|
3356
3406
|
buildVersion: { $ref: "#/definitions/buildVersionProperty" },
|
|
@@ -3378,6 +3428,7 @@ var schema_default = {
|
|
|
3378
3428
|
nodeVersion: { $ref: "#/definitions/nodeVersionProperty" },
|
|
3379
3429
|
npmVersion: { $ref: "#/definitions/npmVersionProperty" },
|
|
3380
3430
|
pnpmVersion: { $ref: "#/definitions/pnpmVersionProperty" },
|
|
3431
|
+
bunVersion: { $ref: "#/definitions/bunVersionProperty" },
|
|
3381
3432
|
packageJson: { $ref: "#/definitions/packageJsonProperty" },
|
|
3382
3433
|
packageManager: { $ref: "#/definitions/packageManagerProperty" },
|
|
3383
3434
|
rebuildLibrary: { $ref: "#/definitions/rebuildLibraryProperty" },
|
|
@@ -4417,7 +4468,9 @@ var getAppFiles = async (globsInput, appPath, appPkgJson) => {
|
|
|
4417
4468
|
path8.join(appPath, "package-lock.json"),
|
|
4418
4469
|
path8.join(appPath, "yarn.lock"),
|
|
4419
4470
|
path8.join(appPath, "pnpm-lock.yaml"),
|
|
4420
|
-
path8.join(appPath, "shrinkwrap.yaml")
|
|
4471
|
+
path8.join(appPath, "shrinkwrap.yaml"),
|
|
4472
|
+
path8.join(appPath, "bun.lockb"),
|
|
4473
|
+
path8.join(appPath, "bun.lock")
|
|
4421
4474
|
);
|
|
4422
4475
|
} else {
|
|
4423
4476
|
globs.push("**");
|
|
@@ -7522,7 +7575,8 @@ async function getBuildAttributes({
|
|
|
7522
7575
|
id: appId,
|
|
7523
7576
|
nodeVersion,
|
|
7524
7577
|
npmVersion,
|
|
7525
|
-
pnpmVersion
|
|
7578
|
+
pnpmVersion,
|
|
7579
|
+
bunVersion
|
|
7526
7580
|
} = getProjectConfig(configPath).config;
|
|
7527
7581
|
const { id: userId } = await findAppUserId_default(appId);
|
|
7528
7582
|
const contextUserId = (_a2 = currentUser()) == null ? void 0 : _a2.uid;
|
|
@@ -7535,6 +7589,7 @@ async function getBuildAttributes({
|
|
|
7535
7589
|
nodeVersion,
|
|
7536
7590
|
npmVersion,
|
|
7537
7591
|
pnpmVersion,
|
|
7592
|
+
bunVersion,
|
|
7538
7593
|
userId
|
|
7539
7594
|
};
|
|
7540
7595
|
}
|
|
@@ -8633,7 +8688,7 @@ var package_default = {
|
|
|
8633
8688
|
access: "public"
|
|
8634
8689
|
},
|
|
8635
8690
|
name: "@todesktop/cli",
|
|
8636
|
-
version: "1.
|
|
8691
|
+
version: "1.20.0-0",
|
|
8637
8692
|
license: "MIT",
|
|
8638
8693
|
author: "Dave Jeffery <dave@todesktop.com> (http://www.todesktop.com/)",
|
|
8639
8694
|
homepage: "https://todesktop.com/cli",
|
|
@@ -8648,7 +8703,7 @@ var package_default = {
|
|
|
8648
8703
|
node: ">=16"
|
|
8649
8704
|
},
|
|
8650
8705
|
scripts: {
|
|
8651
|
-
build: "node scripts/esbuild.js",
|
|
8706
|
+
build: "npm run docs:generate && npm run types:generate && node scripts/esbuild.js",
|
|
8652
8707
|
dev: "node scripts/esbuild.js --link --watch --stage dev",
|
|
8653
8708
|
"dev:local:prod": "node scripts/esbuild.js --link --watch --stage prod-local",
|
|
8654
8709
|
"dev:prod": "node scripts/esbuild.js --link --watch",
|
|
@@ -8656,8 +8711,6 @@ var package_default = {
|
|
|
8656
8711
|
format: "prettier . --write && eslint --fix",
|
|
8657
8712
|
lint: "prettier . --check && eslint",
|
|
8658
8713
|
"types:generate": "node scripts/generate-types.js",
|
|
8659
|
-
release: "npm run docs:generate && npm run build && pnpx np --tag=latest",
|
|
8660
|
-
"release-beta": "npm run docs:generate && npm run build && npx np --any-branch --no-tests --tag=beta",
|
|
8661
8714
|
test: "ava",
|
|
8662
8715
|
"test:e2e": "node test/output-snapshots/output.test.js",
|
|
8663
8716
|
"test--watch": "npm test -- --watch",
|