@todesktop/cli 1.9.1 → 1.9.3-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/.env +0 -2
- package/README.md +54 -1
- package/dist/cli.js +93 -7
- package/dist/cli.js.map +3 -3
- package/package.json +3 -2
package/.env
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
TODESKTOP_CLI_ENV=production
|
|
2
2
|
TODESKTOP_CLI_S3_BUCKET=todesktop-builds-prod
|
|
3
|
-
TODESKTOP_CLI_AWS_ACCESS_ID=AKIAS5AB4EBXRGDWLNWA
|
|
4
|
-
TODESKTOP_CLI_AWS_ACCESS_SECRET=dMfkMhhBZShh0thCgrLq+9fRqWTfac0VRCmdwcqT
|
|
5
3
|
TODESKTOP_CLI_FIREBASE_FUNCTIONS_BASE=https://us-central1-todesktop-prod1.cloudfunctions.net/
|
|
6
4
|
TODESKTOP_CLI_FIREBASE_API_KEY=AIzaSyB3bfv74OgIezU160UPDVXDP6c1ApNfc6M
|
|
7
5
|
TODESKTOP_CLI_FIREBASE_AUTH_DOMAIN=todesktop-prod1.firebaseapp.com
|
package/README.md
CHANGED
|
@@ -297,6 +297,12 @@ If you want to unpack only files that are required to be unpacked, you can set t
|
|
|
297
297
|
|
|
298
298
|
You can also specify a list of glob patterns to unpack.
|
|
299
299
|
|
|
300
|
+
### `buildVersion` - (optional) string
|
|
301
|
+
|
|
302
|
+
Default: auto-generated from build id
|
|
303
|
+
|
|
304
|
+
The build version. Maps to the CFBundleVersion on macOS, and FileVersion metadata property on Windows.
|
|
305
|
+
|
|
300
306
|
### `copyright` - (optional) string
|
|
301
307
|
|
|
302
308
|
Default: The `package.json` [productName](#recommendations-for-app-packagejson) / `name`.
|
|
@@ -598,6 +604,41 @@ Default: No requirements file is used by default.
|
|
|
598
604
|
|
|
599
605
|
The path to the [requirements file](https://developer.apple.com/library/archive/documentation/Security/Conceptual/CodeSigningGuide/RequirementLang/RequirementLang.html) used when signing your application.
|
|
600
606
|
|
|
607
|
+
### `mas` - (optional) object
|
|
608
|
+
|
|
609
|
+
Default: We use default development settings for Mac App Store.
|
|
610
|
+
Example: `{ "type": "development" }`.
|
|
611
|
+
|
|
612
|
+
This object contains options that only apply to building the application for Mac App Store.
|
|
613
|
+
|
|
614
|
+
#### `mas.entitlements` - (optional) string
|
|
615
|
+
|
|
616
|
+
Default: No entitlements file is provided by default.
|
|
617
|
+
Example: `./entitlements.mas.plist`.
|
|
618
|
+
|
|
619
|
+
The path to an entitlements file for signing your application. It must be a plist file.
|
|
620
|
+
|
|
621
|
+
#### `mas.entitlementsInherit` - (optional) string
|
|
622
|
+
|
|
623
|
+
Default: No entitlements file is provided by default.
|
|
624
|
+
Example: `./entitlementsInherit.mas.plist`.
|
|
625
|
+
|
|
626
|
+
The path to a child entitlements file for signing your application. It must be a plist file.
|
|
627
|
+
|
|
628
|
+
#### `mas.provisioningProfile` - (optional) string
|
|
629
|
+
|
|
630
|
+
Default: No provisioning profile is used by default.
|
|
631
|
+
Example: `./mas.provisionprofile`.
|
|
632
|
+
|
|
633
|
+
The path to a provisioning profile for authorizing your application.
|
|
634
|
+
|
|
635
|
+
#### `mas.type` - (optional) string
|
|
636
|
+
|
|
637
|
+
Default: `"development"`
|
|
638
|
+
Example: `"distribution"`.
|
|
639
|
+
|
|
640
|
+
Whether to sign app for development or for distribution.
|
|
641
|
+
|
|
601
642
|
### `nodeVersion` - string
|
|
602
643
|
|
|
603
644
|
Example: `18.12.1`.
|
|
@@ -1062,9 +1103,21 @@ Now, when we build your app on ToDesktop servers, it will also run your custom `
|
|
|
1062
1103
|
|
|
1063
1104
|
## Changelog
|
|
1064
1105
|
|
|
1106
|
+
## v1.9.3
|
|
1107
|
+
|
|
1108
|
+
- Add support for `mas.entitlements` in config.
|
|
1109
|
+
- Add support for `mas.entitlementsInherit` in config.
|
|
1110
|
+
- Add support for `mas.provisioningProfile` in config. Removed `mac.provisioningProfile` as a result.
|
|
1111
|
+
|
|
1112
|
+
## v1.9.2
|
|
1113
|
+
|
|
1114
|
+
- Add support for `mas.type` in config.
|
|
1115
|
+
- Add support for `mac.provisioningProfile` in config.
|
|
1116
|
+
- Add support for specifying `buildVersion` in config.
|
|
1117
|
+
|
|
1065
1118
|
## v1.9.1
|
|
1066
1119
|
|
|
1067
|
-
- Add support for `includeSubNodeModules` in config
|
|
1120
|
+
- Add support for `includeSubNodeModules` in config.
|
|
1068
1121
|
|
|
1069
1122
|
## v1.9.0
|
|
1070
1123
|
|
package/dist/cli.js
CHANGED
|
@@ -946,6 +946,7 @@ Preparation.propTypes = {
|
|
|
946
946
|
var Preparation_default = Preparation;
|
|
947
947
|
|
|
948
948
|
// src/commands/build/utilities/runBuild.ts
|
|
949
|
+
var import_axios2 = __toESM(require("axios"));
|
|
949
950
|
var import_pretty_bytes = __toESM(require("pretty-bytes"));
|
|
950
951
|
|
|
951
952
|
// src/utilities/postToFirebaseFunction.ts
|
|
@@ -1030,6 +1031,22 @@ function resolveConfigPaths({
|
|
|
1030
1031
|
result.mac.icon = resolvePath(config2.mac.icon);
|
|
1031
1032
|
}
|
|
1032
1033
|
}
|
|
1034
|
+
if (config2.mas) {
|
|
1035
|
+
result.mas = { ...config2.mas };
|
|
1036
|
+
if (config2.mas.entitlements) {
|
|
1037
|
+
result.mas.entitlements = resolvePath(config2.mas.entitlements);
|
|
1038
|
+
}
|
|
1039
|
+
if (config2.mas.entitlementsInherit) {
|
|
1040
|
+
result.mas.entitlementsInherit = resolvePath(
|
|
1041
|
+
config2.mas.entitlementsInherit
|
|
1042
|
+
);
|
|
1043
|
+
}
|
|
1044
|
+
if (config2.mas.provisioningProfile) {
|
|
1045
|
+
result.mas.provisioningProfile = resolvePath(
|
|
1046
|
+
config2.mas.provisioningProfile
|
|
1047
|
+
);
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1033
1050
|
if (config2.dmg) {
|
|
1034
1051
|
if (config2.dmg.background) {
|
|
1035
1052
|
result.dmg.background = resolvePath(config2.dmg.background);
|
|
@@ -1500,6 +1517,7 @@ var full_default = (context) => {
|
|
|
1500
1517
|
}
|
|
1501
1518
|
]
|
|
1502
1519
|
},
|
|
1520
|
+
buildVersion: { type: "string", minLength: 1 },
|
|
1503
1521
|
copyright: { type: "string", minLength: 1 },
|
|
1504
1522
|
electronMirror: {
|
|
1505
1523
|
type: "string",
|
|
@@ -1635,6 +1653,42 @@ var full_default = (context) => {
|
|
|
1635
1653
|
}
|
|
1636
1654
|
}
|
|
1637
1655
|
},
|
|
1656
|
+
mas: {
|
|
1657
|
+
type: "object",
|
|
1658
|
+
properties: {
|
|
1659
|
+
entitlements: {
|
|
1660
|
+
type: "string",
|
|
1661
|
+
file: {
|
|
1662
|
+
from: context.projectRoot,
|
|
1663
|
+
extensions: ["plist"],
|
|
1664
|
+
mustBeFile: true
|
|
1665
|
+
},
|
|
1666
|
+
minLength: 1
|
|
1667
|
+
},
|
|
1668
|
+
entitlementsInherit: {
|
|
1669
|
+
type: "string",
|
|
1670
|
+
file: {
|
|
1671
|
+
from: context.projectRoot,
|
|
1672
|
+
extensions: ["plist"],
|
|
1673
|
+
mustBeFile: true
|
|
1674
|
+
},
|
|
1675
|
+
minLength: 1
|
|
1676
|
+
},
|
|
1677
|
+
provisioningProfile: {
|
|
1678
|
+
type: "string",
|
|
1679
|
+
file: {
|
|
1680
|
+
from: context.projectRoot,
|
|
1681
|
+
extensions: ["provisionprofile"],
|
|
1682
|
+
mustBeFile: true
|
|
1683
|
+
},
|
|
1684
|
+
minLength: 1
|
|
1685
|
+
},
|
|
1686
|
+
type: {
|
|
1687
|
+
type: "string",
|
|
1688
|
+
enum: ["development", "distribution"]
|
|
1689
|
+
}
|
|
1690
|
+
}
|
|
1691
|
+
},
|
|
1638
1692
|
dmg: {
|
|
1639
1693
|
type: "object",
|
|
1640
1694
|
properties: {
|
|
@@ -2307,6 +2361,26 @@ async function uploadApplicationSource({
|
|
|
2307
2361
|
});
|
|
2308
2362
|
}
|
|
2309
2363
|
}
|
|
2364
|
+
if (config2.mas) {
|
|
2365
|
+
if (config2.mas.entitlements) {
|
|
2366
|
+
files.push({
|
|
2367
|
+
from: config2.mas.entitlements,
|
|
2368
|
+
to: path9.join("other", "mac", "entitlements.mas.plist")
|
|
2369
|
+
});
|
|
2370
|
+
}
|
|
2371
|
+
if (config2.mas.entitlementsInherit) {
|
|
2372
|
+
files.push({
|
|
2373
|
+
from: config2.mas.entitlementsInherit,
|
|
2374
|
+
to: path9.join("other", "mac", "entitlementsInherit.mas.plist")
|
|
2375
|
+
});
|
|
2376
|
+
}
|
|
2377
|
+
if (config2.mas.provisioningProfile) {
|
|
2378
|
+
files.push({
|
|
2379
|
+
from: config2.mas.provisioningProfile,
|
|
2380
|
+
to: path9.join("other", "mac", "mas.provisionprofile")
|
|
2381
|
+
});
|
|
2382
|
+
}
|
|
2383
|
+
}
|
|
2310
2384
|
if (config2.dmg) {
|
|
2311
2385
|
if (config2.dmg.background) {
|
|
2312
2386
|
files.push({
|
|
@@ -2463,8 +2537,11 @@ async function runBuild({
|
|
|
2463
2537
|
}
|
|
2464
2538
|
}
|
|
2465
2539
|
function addErrorMessage(e, message2) {
|
|
2540
|
+
var _a, _b;
|
|
2466
2541
|
let originalMessage = "";
|
|
2467
|
-
if (e
|
|
2542
|
+
if (import_axios2.default.isAxiosError(e) && ((_b = (_a = e.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message)) {
|
|
2543
|
+
originalMessage = e.response.data.message;
|
|
2544
|
+
} else if (e instanceof Error) {
|
|
2468
2545
|
originalMessage = e.message;
|
|
2469
2546
|
} else if (e && typeof e === "object") {
|
|
2470
2547
|
originalMessage = JSON.stringify(e);
|
|
@@ -2645,6 +2722,7 @@ var Login = ({ setIsLoggedIn }) => {
|
|
|
2645
2722
|
setActiveField(0);
|
|
2646
2723
|
};
|
|
2647
2724
|
const onSubmitLogin = async ({ email, accessToken }) => {
|
|
2725
|
+
var _a, _b;
|
|
2648
2726
|
setFailureMessage(null);
|
|
2649
2727
|
setIsSubmittingForm(true);
|
|
2650
2728
|
try {
|
|
@@ -2663,7 +2741,9 @@ var Login = ({ setIsLoggedIn }) => {
|
|
|
2663
2741
|
if (err.code === 500) {
|
|
2664
2742
|
setError(err);
|
|
2665
2743
|
} else {
|
|
2666
|
-
onFailure(
|
|
2744
|
+
onFailure(
|
|
2745
|
+
`Login unsuccessful: ${((_b = (_a = err == null ? void 0 : err.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) || err.message}`
|
|
2746
|
+
);
|
|
2667
2747
|
}
|
|
2668
2748
|
}
|
|
2669
2749
|
};
|
|
@@ -2738,8 +2818,6 @@ var LoginHOC = ({ children, isInteractive = true }) => {
|
|
|
2738
2818
|
const [isEffectDone, setEffectDone] = (0, import_react10.useState)(false);
|
|
2739
2819
|
const [error, setError] = (0, import_react10.useState)(null);
|
|
2740
2820
|
const { isRawModeSupported } = (0, import_ink16.useStdin)();
|
|
2741
|
-
const { stdout } = (0, import_ink16.useStdout)();
|
|
2742
|
-
const stdOutRedirected = !stdout.isTTY;
|
|
2743
2821
|
const onFailure = (message2, err = {}) => {
|
|
2744
2822
|
setError({
|
|
2745
2823
|
...err,
|
|
@@ -4273,13 +4351,20 @@ function isTestRunning(build) {
|
|
|
4273
4351
|
const { isFinished } = makeProgress(build);
|
|
4274
4352
|
return !isFinished;
|
|
4275
4353
|
}
|
|
4354
|
+
var defaultVM = {
|
|
4355
|
+
cpu: "",
|
|
4356
|
+
agentVersion: "",
|
|
4357
|
+
image: "",
|
|
4358
|
+
imageVersion: ""
|
|
4359
|
+
};
|
|
4276
4360
|
function makeProgress(build) {
|
|
4277
4361
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
4278
4362
|
const defaultProgress = {
|
|
4279
4363
|
message: "Starting",
|
|
4280
4364
|
progress: 0,
|
|
4281
4365
|
state: "progress",
|
|
4282
|
-
shouldSkip: false
|
|
4366
|
+
shouldSkip: false,
|
|
4367
|
+
vm: defaultVM
|
|
4283
4368
|
};
|
|
4284
4369
|
const linux = {
|
|
4285
4370
|
...defaultProgress,
|
|
@@ -5166,7 +5251,7 @@ var package_default = {
|
|
|
5166
5251
|
access: "public"
|
|
5167
5252
|
},
|
|
5168
5253
|
name: "@todesktop/cli",
|
|
5169
|
-
version: "1.9.
|
|
5254
|
+
version: "1.9.2",
|
|
5170
5255
|
license: "MIT",
|
|
5171
5256
|
author: "Dave Jeffery <dave@todesktop.com> (http://www.todesktop.com/)",
|
|
5172
5257
|
homepage: "https://todesktop.com/cli",
|
|
@@ -5182,6 +5267,7 @@ var package_default = {
|
|
|
5182
5267
|
scripts: {
|
|
5183
5268
|
dev: "cp-cli dev.env .env && npm run build:dev && npm link",
|
|
5184
5269
|
"dev:prod": "cp-cli prod.env .env && npm run build && npm link",
|
|
5270
|
+
"dev:local:prod": "cp-cli prod-local.env .env && npm run build && npm link && cp-cli prod-local.env .env",
|
|
5185
5271
|
build: "esbuild src/index.ts --packages=external --bundle --sourcemap --platform=node --outfile=dist/cli.js && cp-cli prod.env .env",
|
|
5186
5272
|
"build:dev": "esbuild src/index.ts --packages=external --bundle --sourcemap --platform=node --outfile=dist/cli.js && cp-cli dev.env .env",
|
|
5187
5273
|
lint: "npm run lint:types && npm run lint:styles",
|
|
@@ -5246,7 +5332,7 @@ var package_default = {
|
|
|
5246
5332
|
"xdg-basedir": "^4.0.0"
|
|
5247
5333
|
},
|
|
5248
5334
|
devDependencies: {
|
|
5249
|
-
"@todesktop/shared": "^7.
|
|
5335
|
+
"@todesktop/shared": "^7.188.30",
|
|
5250
5336
|
"@types/bunyan": "^1.8.6",
|
|
5251
5337
|
"@types/node": "^20.8.4",
|
|
5252
5338
|
"@types/react": "^18.0.26",
|