@todesktop/cli 1.6.2-0 → 1.6.2-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 CHANGED
@@ -320,8 +320,8 @@ The DMG windows position and size. In most cases, you will only want to specify
320
320
 
321
321
  ```
322
322
  {
323
- "width": "400",
324
- "height": "300"
323
+ "width": 400,
324
+ "height": 300
325
325
  }
326
326
  ```
327
327
 
@@ -530,6 +530,12 @@ Default: The root [`icon`](#icon---string) is used.
530
530
 
531
531
  The path to your application's Mac desktop icon. It must be an ICNS or PNG.
532
532
 
533
+ ### `nodeVersion` - string
534
+
535
+ Example: `18.12.1`.
536
+
537
+ The version of Node.js that ToDesktop should use to build your app.
538
+
533
539
  ### `packageJson` - (optional) object
534
540
 
535
541
  Default: `{}`
@@ -721,6 +727,14 @@ Default: The root [`icon`](#icon---string) is used.
721
727
 
722
728
  The path to your application's Windows desktop icon. It must be an ICO, ICNS, or PNG.
723
729
 
730
+ #### `windows.nsisInclude` - (optional) string
731
+
732
+ Example: `build/installer.nsh`.
733
+
734
+ Default: `undefined`.
735
+
736
+ The path to NSIS script to customize installer.
737
+
724
738
  ## Build lifecycle hooks (package.json scripts)
725
739
 
726
740
  Sometimes you want to do something before or during the build process. For example, you might want to run a script before the build starts, or you might want to run a script after the files have been packaged. Our lifecycle hooks provide a way to do this.
package/dist/cli.js CHANGED
@@ -1034,6 +1034,7 @@ function resolveConfigPaths({
1034
1034
  var import_ajv3 = __toESM(require("ajv"));
1035
1035
  var import_ajv_formats2 = __toESM(require("ajv-formats"));
1036
1036
  var import_better_ajv_errors2 = __toESM(require("better-ajv-errors"));
1037
+ var import_ajv_semver = __toESM(require("ajv-semver"));
1037
1038
 
1038
1039
  // src/utilities/projectConfig/addCustomKeywords.ts
1039
1040
  var import_ajv2 = require("ajv");
@@ -1612,6 +1613,11 @@ var full_default = (context) => {
1612
1613
  }
1613
1614
  }
1614
1615
  },
1616
+ nodeVersion: {
1617
+ type: "string",
1618
+ semver: { validRange: true },
1619
+ minLength: 1
1620
+ },
1615
1621
  packageManager: {
1616
1622
  type: "string",
1617
1623
  enum: ["npm", "yarn", "pnpm"]
@@ -1698,7 +1704,15 @@ var full_default = (context) => {
1698
1704
  windows: {
1699
1705
  type: "object",
1700
1706
  properties: {
1701
- icon: getIconSchema(["ico"])
1707
+ icon: getIconSchema(["ico"]),
1708
+ nsisInclude: {
1709
+ type: "string",
1710
+ file: {
1711
+ from: context.projectRoot,
1712
+ extensions: ["nsh"],
1713
+ mustBeFile: true
1714
+ }
1715
+ }
1702
1716
  }
1703
1717
  }
1704
1718
  }
@@ -1713,6 +1727,7 @@ function validateConfig({
1713
1727
  const context = { projectRoot };
1714
1728
  const schema = full_default(context);
1715
1729
  const ajv = new import_ajv3.default({ allErrors: true });
1730
+ (0, import_ajv_semver.default)(ajv);
1716
1731
  (0, import_ajv_formats2.default)(ajv);
1717
1732
  addCustomKeywords_default(ajv, context);
1718
1733
  const validate = ajv.compile(schema);
@@ -2107,6 +2122,12 @@ var uploadApplicationSource_default = async ({ appId, appPkgJson, buildId, confi
2107
2122
  )
2108
2123
  });
2109
2124
  }
2125
+ if (config2.windows.nsisInclude) {
2126
+ files.push({
2127
+ from: config2.windows.nsisInclude,
2128
+ to: path8.join("other", "installer.nsh")
2129
+ });
2130
+ }
2110
2131
  }
2111
2132
  return uploadToS3_default({
2112
2133
  bucket: config2.bucket || void 0,
@@ -2238,7 +2259,8 @@ var runBuild_default = async ({ onEvent, shouldCodeSign = true, configPath }) =>
2238
2259
  appVersion: appPkgJson.version,
2239
2260
  buildId,
2240
2261
  userId: primaryUserId,
2241
- sourceArchiveDetails
2262
+ sourceArchiveDetails,
2263
+ nodeVersion: config2.nodeVersion
2242
2264
  });
2243
2265
  } catch (e) {
2244
2266
  e.message = `Failed while kicking off build; ${e.message}`;
@@ -4156,7 +4178,7 @@ var package_default = {
4156
4178
  access: "public"
4157
4179
  },
4158
4180
  name: "@todesktop/cli",
4159
- version: "1.6.1",
4181
+ version: "1.6.2-0",
4160
4182
  license: "MIT",
4161
4183
  author: "Dave Jeffery <dave@todesktop.com> (http://www.todesktop.com/)",
4162
4184
  homepage: "https://todesktop.com/cli",
@@ -4194,6 +4216,7 @@ var package_default = {
4194
4216
  "@sentry/node": "^5.27.2",
4195
4217
  ajv: "^8.11.2",
4196
4218
  "ajv-formats": "^2.1.1",
4219
+ "ajv-semver": "^1.0.5",
4197
4220
  "analytics-node": "^4.0.1",
4198
4221
  archiver: "^5.2.0",
4199
4222
  axios: "^0.21.1",
@@ -4236,7 +4259,7 @@ var package_default = {
4236
4259
  "xdg-basedir": "^4.0.0"
4237
4260
  },
4238
4261
  devDependencies: {
4239
- "@todesktop/shared": "^7.147.0",
4262
+ "@todesktop/shared": "^7.152.0",
4240
4263
  "@types/bunyan": "^1.8.6",
4241
4264
  "@types/react": "^18.0.26",
4242
4265
  "@typescript-eslint/eslint-plugin": "^5.46.1",