@todesktop/cli 1.9.1 → 1.9.2
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 +34 -1
- package/dist/cli.js +42 -6
- 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`.
|
|
@@ -591,6 +597,13 @@ Default: The root [`icon`](#icon---string) is used.
|
|
|
591
597
|
|
|
592
598
|
The path to your application's Mac desktop icon. It must be an ICNS or PNG.
|
|
593
599
|
|
|
600
|
+
#### `mac.provisioningProfile` - (optional) string
|
|
601
|
+
|
|
602
|
+
Default: No provisioning profile is used by default.
|
|
603
|
+
Example: `./mas.provisionprofile`.
|
|
604
|
+
|
|
605
|
+
The path to a provisioning profile for authorizing your application. This is required for Mac App Store.
|
|
606
|
+
|
|
594
607
|
#### `mac.requirements` - (optional) string
|
|
595
608
|
|
|
596
609
|
Example: `./requirements.txt`.
|
|
@@ -598,6 +611,20 @@ Default: No requirements file is used by default.
|
|
|
598
611
|
|
|
599
612
|
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
613
|
|
|
614
|
+
### `mas` - (optional) object
|
|
615
|
+
|
|
616
|
+
Default: We use default development settings for Mac App Store.
|
|
617
|
+
Example: `{ "type": "development" }`.
|
|
618
|
+
|
|
619
|
+
This object contains options that only apply to building the application for Mac App Store.
|
|
620
|
+
|
|
621
|
+
#### `mas.type` - (optional) string
|
|
622
|
+
|
|
623
|
+
Default: `"development"`
|
|
624
|
+
Example: `"distribution"`.
|
|
625
|
+
|
|
626
|
+
Whether to sign app for development or for distribution.
|
|
627
|
+
|
|
601
628
|
### `nodeVersion` - string
|
|
602
629
|
|
|
603
630
|
Example: `18.12.1`.
|
|
@@ -1062,9 +1089,15 @@ Now, when we build your app on ToDesktop servers, it will also run your custom `
|
|
|
1062
1089
|
|
|
1063
1090
|
## Changelog
|
|
1064
1091
|
|
|
1092
|
+
## v1.9.2
|
|
1093
|
+
|
|
1094
|
+
- Add support for `mas.type` in config.
|
|
1095
|
+
- Add support for `mac.provisioningProfile` in config.
|
|
1096
|
+
- Add support for specifying `buildVersion` in config.
|
|
1097
|
+
|
|
1065
1098
|
## v1.9.1
|
|
1066
1099
|
|
|
1067
|
-
- Add support for `includeSubNodeModules` in config
|
|
1100
|
+
- Add support for `includeSubNodeModules` in config.
|
|
1068
1101
|
|
|
1069
1102
|
## v1.9.0
|
|
1070
1103
|
|
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
|
|
@@ -1023,6 +1024,11 @@ function resolveConfigPaths({
|
|
|
1023
1024
|
if (config2.mac.entitlements) {
|
|
1024
1025
|
result.mac.entitlements = resolvePath(config2.mac.entitlements);
|
|
1025
1026
|
}
|
|
1027
|
+
if (config2.mac.provisioningProfile) {
|
|
1028
|
+
result.mac.provisioningProfile = resolvePath(
|
|
1029
|
+
config2.mac.provisioningProfile
|
|
1030
|
+
);
|
|
1031
|
+
}
|
|
1026
1032
|
if (config2.mac.requirements) {
|
|
1027
1033
|
result.mac.requirements = resolvePath(config2.mac.requirements);
|
|
1028
1034
|
}
|
|
@@ -1500,6 +1506,7 @@ var full_default = (context) => {
|
|
|
1500
1506
|
}
|
|
1501
1507
|
]
|
|
1502
1508
|
},
|
|
1509
|
+
buildVersion: { type: "string", minLength: 1 },
|
|
1503
1510
|
copyright: { type: "string", minLength: 1 },
|
|
1504
1511
|
electronMirror: {
|
|
1505
1512
|
type: "string",
|
|
@@ -1620,6 +1627,15 @@ var full_default = (context) => {
|
|
|
1620
1627
|
},
|
|
1621
1628
|
minLength: 1
|
|
1622
1629
|
},
|
|
1630
|
+
provisioningProfile: {
|
|
1631
|
+
type: "string",
|
|
1632
|
+
file: {
|
|
1633
|
+
from: context.projectRoot,
|
|
1634
|
+
extensions: ["provisionprofile"],
|
|
1635
|
+
mustBeFile: true
|
|
1636
|
+
},
|
|
1637
|
+
minLength: 1
|
|
1638
|
+
},
|
|
1623
1639
|
extendInfo: {
|
|
1624
1640
|
type: "object"
|
|
1625
1641
|
},
|
|
@@ -1635,6 +1651,15 @@ var full_default = (context) => {
|
|
|
1635
1651
|
}
|
|
1636
1652
|
}
|
|
1637
1653
|
},
|
|
1654
|
+
mas: {
|
|
1655
|
+
type: "object",
|
|
1656
|
+
properties: {
|
|
1657
|
+
type: {
|
|
1658
|
+
type: "string",
|
|
1659
|
+
enum: ["development", "distribution"]
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1662
|
+
},
|
|
1638
1663
|
dmg: {
|
|
1639
1664
|
type: "object",
|
|
1640
1665
|
properties: {
|
|
@@ -2294,6 +2319,12 @@ async function uploadApplicationSource({
|
|
|
2294
2319
|
to: path9.join("other", "mac", "entitlements.mac.plist")
|
|
2295
2320
|
});
|
|
2296
2321
|
}
|
|
2322
|
+
if (config2.mac.provisioningProfile) {
|
|
2323
|
+
files.push({
|
|
2324
|
+
from: config2.mac.provisioningProfile,
|
|
2325
|
+
to: path9.join("other", "mac", "mas.provisionprofile")
|
|
2326
|
+
});
|
|
2327
|
+
}
|
|
2297
2328
|
if (config2.mac.icon) {
|
|
2298
2329
|
files.push({
|
|
2299
2330
|
from: config2.mac.icon,
|
|
@@ -2463,8 +2494,11 @@ async function runBuild({
|
|
|
2463
2494
|
}
|
|
2464
2495
|
}
|
|
2465
2496
|
function addErrorMessage(e, message2) {
|
|
2497
|
+
var _a, _b;
|
|
2466
2498
|
let originalMessage = "";
|
|
2467
|
-
if (e
|
|
2499
|
+
if (import_axios2.default.isAxiosError(e) && ((_b = (_a = e.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message)) {
|
|
2500
|
+
originalMessage = e.response.data.message;
|
|
2501
|
+
} else if (e instanceof Error) {
|
|
2468
2502
|
originalMessage = e.message;
|
|
2469
2503
|
} else if (e && typeof e === "object") {
|
|
2470
2504
|
originalMessage = JSON.stringify(e);
|
|
@@ -2645,6 +2679,7 @@ var Login = ({ setIsLoggedIn }) => {
|
|
|
2645
2679
|
setActiveField(0);
|
|
2646
2680
|
};
|
|
2647
2681
|
const onSubmitLogin = async ({ email, accessToken }) => {
|
|
2682
|
+
var _a, _b;
|
|
2648
2683
|
setFailureMessage(null);
|
|
2649
2684
|
setIsSubmittingForm(true);
|
|
2650
2685
|
try {
|
|
@@ -2663,7 +2698,9 @@ var Login = ({ setIsLoggedIn }) => {
|
|
|
2663
2698
|
if (err.code === 500) {
|
|
2664
2699
|
setError(err);
|
|
2665
2700
|
} else {
|
|
2666
|
-
onFailure(
|
|
2701
|
+
onFailure(
|
|
2702
|
+
`Login unsuccessful: ${((_b = (_a = err == null ? void 0 : err.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) || err.message}`
|
|
2703
|
+
);
|
|
2667
2704
|
}
|
|
2668
2705
|
}
|
|
2669
2706
|
};
|
|
@@ -2738,8 +2775,6 @@ var LoginHOC = ({ children, isInteractive = true }) => {
|
|
|
2738
2775
|
const [isEffectDone, setEffectDone] = (0, import_react10.useState)(false);
|
|
2739
2776
|
const [error, setError] = (0, import_react10.useState)(null);
|
|
2740
2777
|
const { isRawModeSupported } = (0, import_ink16.useStdin)();
|
|
2741
|
-
const { stdout } = (0, import_ink16.useStdout)();
|
|
2742
|
-
const stdOutRedirected = !stdout.isTTY;
|
|
2743
2778
|
const onFailure = (message2, err = {}) => {
|
|
2744
2779
|
setError({
|
|
2745
2780
|
...err,
|
|
@@ -5166,7 +5201,7 @@ var package_default = {
|
|
|
5166
5201
|
access: "public"
|
|
5167
5202
|
},
|
|
5168
5203
|
name: "@todesktop/cli",
|
|
5169
|
-
version: "1.9.
|
|
5204
|
+
version: "1.9.1",
|
|
5170
5205
|
license: "MIT",
|
|
5171
5206
|
author: "Dave Jeffery <dave@todesktop.com> (http://www.todesktop.com/)",
|
|
5172
5207
|
homepage: "https://todesktop.com/cli",
|
|
@@ -5182,6 +5217,7 @@ var package_default = {
|
|
|
5182
5217
|
scripts: {
|
|
5183
5218
|
dev: "cp-cli dev.env .env && npm run build:dev && npm link",
|
|
5184
5219
|
"dev:prod": "cp-cli prod.env .env && npm run build && npm link",
|
|
5220
|
+
"dev:local:prod": "cp-cli prod-local.env .env && npm run build && npm link && cp-cli prod-local.env .env",
|
|
5185
5221
|
build: "esbuild src/index.ts --packages=external --bundle --sourcemap --platform=node --outfile=dist/cli.js && cp-cli prod.env .env",
|
|
5186
5222
|
"build:dev": "esbuild src/index.ts --packages=external --bundle --sourcemap --platform=node --outfile=dist/cli.js && cp-cli dev.env .env",
|
|
5187
5223
|
lint: "npm run lint:types && npm run lint:styles",
|
|
@@ -5246,7 +5282,7 @@ var package_default = {
|
|
|
5246
5282
|
"xdg-basedir": "^4.0.0"
|
|
5247
5283
|
},
|
|
5248
5284
|
devDependencies: {
|
|
5249
|
-
"@todesktop/shared": "^7.
|
|
5285
|
+
"@todesktop/shared": "^7.188.18",
|
|
5250
5286
|
"@types/bunyan": "^1.8.6",
|
|
5251
5287
|
"@types/node": "^20.8.4",
|
|
5252
5288
|
"@types/react": "^18.0.26",
|