@todesktop/cli 1.15.0 → 1.15.1
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 +6 -2
- package/dist/cli.js +36 -3
- package/dist/cli.js.map +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@ Create a `todesktop.json` file in the root of your Electron project.
|
|
|
42
42
|
|
|
43
43
|
```json
|
|
44
44
|
{
|
|
45
|
-
"$schema": "https://unpkg.com/@todesktop/cli@1.
|
|
45
|
+
"$schema": "https://unpkg.com/@todesktop/cli@1.15.0/schemas/schema.json",
|
|
46
46
|
"schemaVersion": 1
|
|
47
47
|
"id": "your-todesktop-id",
|
|
48
48
|
"icon": "./desktop-icon.png",
|
|
@@ -272,7 +272,7 @@ To enable JSON validation and IntelliSense for your `todesktop.json` file in com
|
|
|
272
272
|
- For example, if using a hosted version of the schema:
|
|
273
273
|
```json
|
|
274
274
|
{
|
|
275
|
-
"$schema": "https://unpkg.com/@todesktop/cli@1.
|
|
275
|
+
"$schema": "https://unpkg.com/@todesktop/cli@1.15.0/schemas/schema.json",
|
|
276
276
|
"id": "your-todesktop-id"
|
|
277
277
|
}
|
|
278
278
|
```
|
|
@@ -1334,6 +1334,10 @@ Now, when we build your app on ToDesktop servers, it will also run your custom `
|
|
|
1334
1334
|
|
|
1335
1335
|
## Changelog
|
|
1336
1336
|
|
|
1337
|
+
### v1.15.1
|
|
1338
|
+
|
|
1339
|
+
- Update dependencies to latest non-breaking versions.
|
|
1340
|
+
|
|
1337
1341
|
### v1.15.0
|
|
1338
1342
|
|
|
1339
1343
|
- Add support for `todesktop.ts` configuration file with full TypeScript type checking and IntelliSense.
|
package/dist/cli.js
CHANGED
|
@@ -14,6 +14,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
14
14
|
return to;
|
|
15
15
|
};
|
|
16
16
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
17
21
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
18
22
|
mod
|
|
19
23
|
));
|
|
@@ -73,7 +77,10 @@ function sanitizeFields(obj) {
|
|
|
73
77
|
const lowerKey = key.toLowerCase();
|
|
74
78
|
const value = copy[key];
|
|
75
79
|
if (SENSITIVE_FIELD_KEY_SUBSTRINGS.some(
|
|
76
|
-
(substring) =>
|
|
80
|
+
(substring) => (
|
|
81
|
+
// Fields that start with `$` are references to secrets (and not secrets themselves) so keep them in logs because they are useful.
|
|
82
|
+
lowerKey.includes(substring) && !lowerKey.startsWith("$")
|
|
83
|
+
)
|
|
77
84
|
)) {
|
|
78
85
|
copy[key] = "[REDACTED]";
|
|
79
86
|
} else if (typeof value === "string" && isJWT(value)) {
|
|
@@ -344,7 +351,9 @@ var useExit_default = () => {
|
|
|
344
351
|
logger_default.debug({ error }, "Exit called");
|
|
345
352
|
let timeoutId;
|
|
346
353
|
Promise.race([
|
|
354
|
+
// flush the analytics to make sure all outstanding events are pushed to segment
|
|
347
355
|
new Promise((resolve5) => flush(() => resolve5())),
|
|
356
|
+
// If it takes longer than 1 second, resolve early to proceed with program exit
|
|
348
357
|
new Promise(
|
|
349
358
|
(resolve5) => timeoutId = setTimeout(() => resolve5(), 1e3)
|
|
350
359
|
)
|
|
@@ -491,7 +500,8 @@ var isPlatformBuildRunning = (platformBuild) => {
|
|
|
491
500
|
if (!platformBuild) {
|
|
492
501
|
return false;
|
|
493
502
|
}
|
|
494
|
-
return !platformBuild.shouldSkip &&
|
|
503
|
+
return !platformBuild.shouldSkip && // <-- Noteworthy
|
|
504
|
+
!["cancelled", "succeeded"].includes(platformBuild.status) && ("failed" !== platformBuild.status || platformBuild.numberOfAttemptedBuilds < 2);
|
|
495
505
|
};
|
|
496
506
|
|
|
497
507
|
// src/components/BuildProgress.tsx
|
|
@@ -967,6 +977,7 @@ var ProgressBar = ({ left, right, percent }) => /* @__PURE__ */ (0, import_jsx_r
|
|
|
967
977
|
ProgressBar.propTypes = {
|
|
968
978
|
left: import_prop_types6.default.number,
|
|
969
979
|
right: import_prop_types6.default.number,
|
|
980
|
+
// 0 -> 1
|
|
970
981
|
percent: import_prop_types6.default.number.isRequired
|
|
971
982
|
};
|
|
972
983
|
var ProgressBar_default = ProgressBar;
|
|
@@ -1245,6 +1256,7 @@ var packageJSON_default = (context) => {
|
|
|
1245
1256
|
dependencies: {
|
|
1246
1257
|
type: "object",
|
|
1247
1258
|
required: ["@todesktop/runtime"],
|
|
1259
|
+
// custom keyword that checks package names aren't included in dependencies
|
|
1248
1260
|
excludedDependencies: {
|
|
1249
1261
|
dependencyKey: "dependencies",
|
|
1250
1262
|
blacklist: ["@todesktop/cli"]
|
|
@@ -2999,19 +3011,36 @@ async function uploadApplicationSource({
|
|
|
2999
3011
|
);
|
|
3000
3012
|
let totalBytes = 0;
|
|
3001
3013
|
const files = [
|
|
3014
|
+
/*
|
|
3015
|
+
App files (stored in app/ in the ZIP)
|
|
3016
|
+
*/
|
|
3002
3017
|
...await getAppFiles(config2.appFiles, config2.appPath, appPkgJson),
|
|
3018
|
+
/*
|
|
3019
|
+
Optional extra content files (stored in extraContentFiles/ in the ZIP). Their
|
|
3020
|
+
paths within is the their relative path from the project root so
|
|
3021
|
+
there will be no issues with clashing filenames. We also don't
|
|
3022
|
+
also any file paths in our todesktop.json that are outside of the
|
|
3023
|
+
project directory
|
|
3024
|
+
*/
|
|
3003
3025
|
...(config2.extraContentFiles || []).map(({ from, to = "." }) => {
|
|
3004
3026
|
return {
|
|
3005
3027
|
from,
|
|
3006
3028
|
to: path7.join("extraContentFiles", to, path7.basename(from))
|
|
3007
3029
|
};
|
|
3008
3030
|
}),
|
|
3031
|
+
/*
|
|
3032
|
+
Optional extra resources (stored in extraResources/ in the ZIP).
|
|
3033
|
+
Similar to extra content files above
|
|
3034
|
+
*/
|
|
3009
3035
|
...(config2.extraResources || []).map(({ from, to = "." }) => {
|
|
3010
3036
|
return {
|
|
3011
3037
|
from,
|
|
3012
3038
|
to: path7.join("extraResources", to, path7.basename(from))
|
|
3013
3039
|
};
|
|
3014
3040
|
}),
|
|
3041
|
+
/*
|
|
3042
|
+
Icons (more may be added below)
|
|
3043
|
+
*/
|
|
3015
3044
|
{
|
|
3016
3045
|
from: config2.icon,
|
|
3017
3046
|
to: path7.join("icons", "appIcon" + path7.extname(config2.icon))
|
|
@@ -4665,7 +4694,9 @@ var SelectTable = ({ data, onSelect }) => {
|
|
|
4665
4694
|
});
|
|
4666
4695
|
};
|
|
4667
4696
|
const ItemComponent = ({
|
|
4697
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4668
4698
|
label,
|
|
4699
|
+
// Make it compatible to SelectInput type, not used actually
|
|
4669
4700
|
index,
|
|
4670
4701
|
isSelected
|
|
4671
4702
|
}) => {
|
|
@@ -5662,6 +5693,7 @@ function OsProgress({
|
|
|
5662
5693
|
error: "red",
|
|
5663
5694
|
done: "green",
|
|
5664
5695
|
skipped: "yellow"
|
|
5696
|
+
// Not used actually, just for type matching
|
|
5665
5697
|
};
|
|
5666
5698
|
const text = progress.message + (progress.state === "progress" ? "..." : "");
|
|
5667
5699
|
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
@@ -5912,6 +5944,7 @@ async function smokeTestWorkflow({
|
|
|
5912
5944
|
const stateMap = {
|
|
5913
5945
|
done: "complete",
|
|
5914
5946
|
progress: "complete",
|
|
5947
|
+
// Not actually used, just for TS
|
|
5915
5948
|
error: "progress-error",
|
|
5916
5949
|
canceled: "canceled"
|
|
5917
5950
|
};
|
|
@@ -5992,7 +6025,7 @@ var package_default = {
|
|
|
5992
6025
|
access: "public"
|
|
5993
6026
|
},
|
|
5994
6027
|
name: "@todesktop/cli",
|
|
5995
|
-
version: "1.
|
|
6028
|
+
version: "1.15.0",
|
|
5996
6029
|
license: "MIT",
|
|
5997
6030
|
author: "Dave Jeffery <dave@todesktop.com> (http://www.todesktop.com/)",
|
|
5998
6031
|
homepage: "https://todesktop.com/cli",
|