@todesktop/cli 1.9.4 → 1.9.5
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 +23 -14
- package/dist/cli.js +46 -13
- package/dist/cli.js.map +2 -2
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -90,9 +90,9 @@ To build your app, run the following command inside the root of your Electron pr
|
|
|
90
90
|
todesktop build
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
-
When prompted to login, use
|
|
93
|
+
When prompted to login, use your email address and the accessToken from our dashboard. You can retrieve your access token by clicking on your name in the top right corner of the dashboard and selecting "Manage Access Token".
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
Once built, your app can then be downloaded and tested.
|
|
96
96
|
|
|
97
97
|
### Step 5: Release your app
|
|
98
98
|
|
|
@@ -183,8 +183,8 @@ todesktop build --async --webhook https://example.com/build-finished-webhook
|
|
|
183
183
|
|
|
184
184
|
The webhook receives a POST request with the following JSON body:
|
|
185
185
|
|
|
186
|
-
```
|
|
187
|
-
POST https://example.com/build-finished-webhook
|
|
186
|
+
```js
|
|
187
|
+
// POST https://example.com/build-finished-webhook
|
|
188
188
|
{
|
|
189
189
|
appId: string;
|
|
190
190
|
accountUserEmail: string;
|
|
@@ -462,7 +462,7 @@ Example:
|
|
|
462
462
|
]
|
|
463
463
|
```
|
|
464
464
|
|
|
465
|
-
- `ext` String |
|
|
465
|
+
- `ext` String | String[] - The extension (minus the leading period). e.g. png.
|
|
466
466
|
- `name` String - The name. e.g. PNG. Defaults to value of `ext`.
|
|
467
467
|
- `description` String - windows-only. The description.
|
|
468
468
|
- `icon` String - macOS and windows. Icon file name without extension. It points
|
|
@@ -553,7 +553,7 @@ Whether to include **all** of the submodules node_modules directories
|
|
|
553
553
|
### `mac` - (optional) object
|
|
554
554
|
|
|
555
555
|
Default: We have good default settings for Mac.
|
|
556
|
-
Example: `{ "entitlements": "./entitlements.mac.plist"`.
|
|
556
|
+
Example: `{ "entitlements": "./entitlements.mac.plist" }`.
|
|
557
557
|
|
|
558
558
|
This object contains some options that only apply to the building & releasing for MacOS.
|
|
559
559
|
|
|
@@ -582,9 +582,16 @@ Example: `./entitlements.mac.plist`.
|
|
|
582
582
|
|
|
583
583
|
The path to an entitlements file for signing your application. It must be a plist file.
|
|
584
584
|
|
|
585
|
+
#### `mac.entitlementsInherit` - (optional) string
|
|
586
|
+
|
|
587
|
+
Default: No entitlements file is provided by default.
|
|
588
|
+
Example: `./entitlementsInherit.mac.plist`.
|
|
589
|
+
|
|
590
|
+
The path to a child entitlements file for signing your application. It must be a plist file.
|
|
591
|
+
|
|
585
592
|
#### `mac.extendInfo` - (optional) object
|
|
586
593
|
|
|
587
|
-
Default: {}
|
|
594
|
+
Default: `{}`.
|
|
588
595
|
Example: `{ "NSUserNotificationAlertStyle": "alert" }`.
|
|
589
596
|
|
|
590
597
|
Extra entries for `Info.plist`.
|
|
@@ -1110,31 +1117,33 @@ Now, when we build your app on ToDesktop servers, it will also run your custom `
|
|
|
1110
1117
|
|
|
1111
1118
|
## Changelog
|
|
1112
1119
|
|
|
1113
|
-
|
|
1120
|
+
### v1.9.5
|
|
1114
1121
|
|
|
1115
1122
|
- Add support for `mas.x64ArchFiles` in config.
|
|
1123
|
+
- Fix: Build is only recognised as ongoing if it was created in the last 24 hours.
|
|
1124
|
+
- Add support for `mac.entitlementsInherit` in config.
|
|
1116
1125
|
|
|
1117
|
-
|
|
1126
|
+
### v1.9.4
|
|
1118
1127
|
|
|
1119
1128
|
- Fix: Mac URL download links are now formatted correctly.
|
|
1120
1129
|
|
|
1121
|
-
|
|
1130
|
+
### v1.9.3
|
|
1122
1131
|
|
|
1123
1132
|
- Add support for `mas.entitlements` in config.
|
|
1124
1133
|
- Add support for `mas.entitlementsInherit` in config.
|
|
1125
1134
|
- Add support for `mas.provisioningProfile` in config. Removed `mac.provisioningProfile` as a result.
|
|
1126
1135
|
|
|
1127
|
-
|
|
1136
|
+
### v1.9.2
|
|
1128
1137
|
|
|
1129
1138
|
- Add support for `mas.type` in config.
|
|
1130
1139
|
- Add support for `mac.provisioningProfile` in config.
|
|
1131
1140
|
- Add support for specifying `buildVersion` in config.
|
|
1132
1141
|
|
|
1133
|
-
|
|
1142
|
+
### v1.9.1
|
|
1134
1143
|
|
|
1135
1144
|
- Add support for `includeSubNodeModules` in config.
|
|
1136
1145
|
|
|
1137
|
-
|
|
1146
|
+
### v1.9.0
|
|
1138
1147
|
|
|
1139
1148
|
- You can now specify `@electron/rebuild` as a custom `rebuildLibrary` in your `todesktop.json` file.
|
|
1140
1149
|
|
|
@@ -1164,7 +1173,7 @@ Now, when we build your app on ToDesktop servers, it will also run your custom `
|
|
|
1164
1173
|
|
|
1165
1174
|
### v1.7.4
|
|
1166
1175
|
|
|
1167
|
-
- Fix: Linux/Windows platform links no longer have mac/zip
|
|
1176
|
+
- Fix: Linux/Windows platform links no longer have mac/zip/\[arch\] added to the end of the download URL
|
|
1168
1177
|
|
|
1169
1178
|
### v1.7.3
|
|
1170
1179
|
|
package/dist/cli.js
CHANGED
|
@@ -837,7 +837,7 @@ var MainLayout = ({
|
|
|
837
837
|
...previousState,
|
|
838
838
|
canCancelBuild: !import_is_ci3.default && isRawModeSupported && !isCancellingBuild && isBuildCancellable(build)
|
|
839
839
|
}));
|
|
840
|
-
}, [build, isCancellingBuild]);
|
|
840
|
+
}, [build, isCancellingBuild, isRawModeSupported]);
|
|
841
841
|
onInput(
|
|
842
842
|
async (input, key) => {
|
|
843
843
|
if (key.escape && canCancelBuild) {
|
|
@@ -1024,6 +1024,11 @@ function resolveConfigPaths({
|
|
|
1024
1024
|
if (config2.mac.entitlements) {
|
|
1025
1025
|
result.mac.entitlements = resolvePath(config2.mac.entitlements);
|
|
1026
1026
|
}
|
|
1027
|
+
if (config2.mac.entitlementsInherit) {
|
|
1028
|
+
result.mac.entitlementsInherit = resolvePath(
|
|
1029
|
+
config2.mac.entitlementsInherit
|
|
1030
|
+
);
|
|
1031
|
+
}
|
|
1027
1032
|
if (config2.mac.requirements) {
|
|
1028
1033
|
result.mac.requirements = resolvePath(config2.mac.requirements);
|
|
1029
1034
|
}
|
|
@@ -1638,6 +1643,15 @@ var full_default = (context) => {
|
|
|
1638
1643
|
},
|
|
1639
1644
|
minLength: 1
|
|
1640
1645
|
},
|
|
1646
|
+
entitlementsInherit: {
|
|
1647
|
+
type: "string",
|
|
1648
|
+
file: {
|
|
1649
|
+
from: context.projectRoot,
|
|
1650
|
+
extensions: ["plist"],
|
|
1651
|
+
mustBeFile: true
|
|
1652
|
+
},
|
|
1653
|
+
minLength: 1
|
|
1654
|
+
},
|
|
1641
1655
|
extendInfo: {
|
|
1642
1656
|
type: "object"
|
|
1643
1657
|
},
|
|
@@ -2351,6 +2365,12 @@ async function uploadApplicationSource({
|
|
|
2351
2365
|
to: path7.join("other", "mac", "entitlements.mac.plist")
|
|
2352
2366
|
});
|
|
2353
2367
|
}
|
|
2368
|
+
if (config2.mac.entitlementsInherit) {
|
|
2369
|
+
files.push({
|
|
2370
|
+
from: config2.mac.entitlementsInherit,
|
|
2371
|
+
to: path7.join("other", "mac", "entitlementsInherit.mac.plist")
|
|
2372
|
+
});
|
|
2373
|
+
}
|
|
2354
2374
|
if (config2.mac.icon) {
|
|
2355
2375
|
files.push({
|
|
2356
2376
|
from: config2.mac.icon,
|
|
@@ -2880,7 +2900,7 @@ var LoginHOC = ({ children, isInteractive = true }) => {
|
|
|
2880
2900
|
setEffectDone(true);
|
|
2881
2901
|
}
|
|
2882
2902
|
isAccessTokenValid();
|
|
2883
|
-
}, []);
|
|
2903
|
+
}, [isRawModeSupported]);
|
|
2884
2904
|
if (error && isInteractive) {
|
|
2885
2905
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ErrorDisplay, { error });
|
|
2886
2906
|
}
|
|
@@ -3123,7 +3143,7 @@ var ViewBuild = ({ commandUsed, id, configPath }) => {
|
|
|
3123
3143
|
firebaseUnsubscribe();
|
|
3124
3144
|
}
|
|
3125
3145
|
};
|
|
3126
|
-
}, [id]);
|
|
3146
|
+
}, [id, configPath]);
|
|
3127
3147
|
(0, import_react12.useEffect)(() => {
|
|
3128
3148
|
if (hasBuildEverFailed && shouldExitOnBuildFailure_default(build)) {
|
|
3129
3149
|
setTimeout(() => exit(new Error("Build has failed")), 10);
|
|
@@ -3200,7 +3220,11 @@ var ViewBuild_default = ViewBuild;
|
|
|
3200
3220
|
// src/commands/build/components/OngoingBuildGuard.tsx
|
|
3201
3221
|
var import_is_ci5 = __toESM(require("is-ci"));
|
|
3202
3222
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
3203
|
-
var OngoingBuildGuard = ({
|
|
3223
|
+
var OngoingBuildGuard = ({
|
|
3224
|
+
children,
|
|
3225
|
+
commandUsed,
|
|
3226
|
+
configPath
|
|
3227
|
+
}) => {
|
|
3204
3228
|
const { isRawModeSupported } = (0, import_ink20.useStdin)();
|
|
3205
3229
|
const onInput = useInput_default();
|
|
3206
3230
|
const exit = useExit_default();
|
|
@@ -3219,7 +3243,11 @@ var OngoingBuildGuard = ({ children, commandUsed, configPath }) => {
|
|
|
3219
3243
|
try {
|
|
3220
3244
|
const applicationId = getProjectConfig(configPath).config.id;
|
|
3221
3245
|
const { id } = await findAppUserId_default(applicationId);
|
|
3222
|
-
const
|
|
3246
|
+
const now = new Date();
|
|
3247
|
+
const twentyFourHoursAgo = new Date(
|
|
3248
|
+
now.getTime() - 24 * 60 * 60 * 1e3
|
|
3249
|
+
);
|
|
3250
|
+
const buildsResult = await firestore_default.doc(`users/${id}/applications/${applicationId}`).collection("builds").where("createdAt", ">=", twentyFourHoursAgo).orderBy("createdAt", "desc").limit(10).get();
|
|
3223
3251
|
const stateUpdates = {
|
|
3224
3252
|
appId: applicationId,
|
|
3225
3253
|
isLoading: false,
|
|
@@ -3250,7 +3278,7 @@ var OngoingBuildGuard = ({ children, commandUsed, configPath }) => {
|
|
|
3250
3278
|
}));
|
|
3251
3279
|
}
|
|
3252
3280
|
})();
|
|
3253
|
-
}, [builds, itemChosen, isLoading, isRawModeSupported]);
|
|
3281
|
+
}, [builds, itemChosen, isLoading, isRawModeSupported, configPath]);
|
|
3254
3282
|
if (isRawModeSupported) {
|
|
3255
3283
|
onInput(() => {
|
|
3256
3284
|
});
|
|
@@ -3264,9 +3292,9 @@ var OngoingBuildGuard = ({ children, commandUsed, configPath }) => {
|
|
|
3264
3292
|
if (itemChosen) {
|
|
3265
3293
|
logger_default.debug({ itemChosen }, "OngoingBuildGuard component: item chosen");
|
|
3266
3294
|
const build = builds.find(Boolean);
|
|
3267
|
-
if (itemChosen.value === "view") {
|
|
3295
|
+
if (itemChosen.value === "view" && build) {
|
|
3268
3296
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ViewBuild_default, { commandUsed, id: build.id });
|
|
3269
|
-
} else if (itemChosen.value === "cancel") {
|
|
3297
|
+
} else if (itemChosen.value === "cancel" && build && appId) {
|
|
3270
3298
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(CancelBuild_default, { appId, commandUsed, id: build.id, children });
|
|
3271
3299
|
} else if (itemChosen.value === "concurrent") {
|
|
3272
3300
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_jsx_runtime20.Fragment, { children });
|
|
@@ -3303,8 +3331,8 @@ var OngoingBuildGuard = ({ children, commandUsed, configPath }) => {
|
|
|
3303
3331
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_ink20.Text, { bold: true, children: multiple ? "There are ongoing builds " : "There is an ongoing build " }),
|
|
3304
3332
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_ink20.Text, { children: [
|
|
3305
3333
|
"(",
|
|
3306
|
-
latestBuild.appName,
|
|
3307
|
-
latestBuild.appVersion ? ` v${latestBuild.appVersion}` : "",
|
|
3334
|
+
latestBuild == null ? void 0 : latestBuild.appName,
|
|
3335
|
+
(latestBuild == null ? void 0 : latestBuild.appVersion) ? ` v${latestBuild.appVersion}` : "",
|
|
3308
3336
|
")"
|
|
3309
3337
|
] })
|
|
3310
3338
|
] }),
|
|
@@ -3764,7 +3792,10 @@ var ViewBuilds = ({
|
|
|
3764
3792
|
isInitialLoadComplete,
|
|
3765
3793
|
isLoading,
|
|
3766
3794
|
projectConfig,
|
|
3767
|
-
startAfter
|
|
3795
|
+
startAfter,
|
|
3796
|
+
configPath,
|
|
3797
|
+
format,
|
|
3798
|
+
count
|
|
3768
3799
|
]);
|
|
3769
3800
|
(0, import_react16.useEffect)(() => {
|
|
3770
3801
|
if (!hasMoreToLoad) {
|
|
@@ -5254,7 +5285,7 @@ var package_default = {
|
|
|
5254
5285
|
access: "public"
|
|
5255
5286
|
},
|
|
5256
5287
|
name: "@todesktop/cli",
|
|
5257
|
-
version: "1.9.
|
|
5288
|
+
version: "1.9.4",
|
|
5258
5289
|
license: "MIT",
|
|
5259
5290
|
author: "Dave Jeffery <dave@todesktop.com> (http://www.todesktop.com/)",
|
|
5260
5291
|
homepage: "https://todesktop.com/cli",
|
|
@@ -5275,6 +5306,7 @@ var package_default = {
|
|
|
5275
5306
|
"build:dev": "esbuild src/index.ts --packages=external --bundle --sourcemap --platform=node --outfile=dist/cli.js && cp-cli dev.env .env",
|
|
5276
5307
|
lint: "npm run lint:types && npm run lint:styles",
|
|
5277
5308
|
"lint:styles": "eslint src test .eslintrc.js && prettier --check .",
|
|
5309
|
+
format: "prettier --write .",
|
|
5278
5310
|
"lint:types": "tsc && tsc-strict",
|
|
5279
5311
|
"lint--fix": "eslint src test --fix",
|
|
5280
5312
|
release: "npm run build && npx np --tag=latest",
|
|
@@ -5335,8 +5367,9 @@ var package_default = {
|
|
|
5335
5367
|
"xdg-basedir": "^4.0.0"
|
|
5336
5368
|
},
|
|
5337
5369
|
devDependencies: {
|
|
5338
|
-
"@todesktop/shared": "^7.188.
|
|
5370
|
+
"@todesktop/shared": "^7.188.64",
|
|
5339
5371
|
"@types/bunyan": "^1.8.6",
|
|
5372
|
+
"@types/is-ci": "^3.0.4",
|
|
5340
5373
|
"@types/node": "^20.8.4",
|
|
5341
5374
|
"@types/react": "^18.0.26",
|
|
5342
5375
|
"@typescript-eslint/eslint-plugin": "^5.46.1",
|