@todesktop/cli 1.6.1 → 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: `{}`
@@ -560,6 +566,14 @@ You can also set the version of a `dependency` (or `devDependency`), such as Ele
560
566
  }
561
567
  ```
562
568
 
569
+ ### `packageManager` - (optional) string
570
+
571
+ Default: If `yarn.lock` exists, `yarn` is used. If `pnpm-lock.yaml` or `shrinkwrap.yaml` exists, `pnpm` is used. Otherwise, `npm` is used.
572
+
573
+ Example: `yarn`
574
+
575
+ The package manager to use when installing dependencies. Valid values are `npm`, `yarn` or `npm`.
576
+
563
577
  ### `schemaVersion` - number
564
578
 
565
579
  Example: `1`.
@@ -713,6 +727,14 @@ Default: The root [`icon`](#icon---string) is used.
713
727
 
714
728
  The path to your application's Windows desktop icon. It must be an ICO, ICNS, or PNG.
715
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
+
716
738
  ## Build lifecycle hooks (package.json scripts)
717
739
 
718
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,15 @@ var full_default = (context) => {
1612
1613
  }
1613
1614
  }
1614
1615
  },
1616
+ nodeVersion: {
1617
+ type: "string",
1618
+ semver: { validRange: true },
1619
+ minLength: 1
1620
+ },
1621
+ packageManager: {
1622
+ type: "string",
1623
+ enum: ["npm", "yarn", "pnpm"]
1624
+ },
1615
1625
  schemaVersion: { type: "number", minimum: 1, maximum: 1 },
1616
1626
  snap: {
1617
1627
  type: "object",
@@ -1694,7 +1704,15 @@ var full_default = (context) => {
1694
1704
  windows: {
1695
1705
  type: "object",
1696
1706
  properties: {
1697
- 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
+ }
1698
1716
  }
1699
1717
  }
1700
1718
  }
@@ -1709,6 +1727,7 @@ function validateConfig({
1709
1727
  const context = { projectRoot };
1710
1728
  const schema = full_default(context);
1711
1729
  const ajv = new import_ajv3.default({ allErrors: true });
1730
+ (0, import_ajv_semver.default)(ajv);
1712
1731
  (0, import_ajv_formats2.default)(ajv);
1713
1732
  addCustomKeywords_default(ajv, context);
1714
1733
  const validate = ajv.compile(schema);
@@ -2103,6 +2122,12 @@ var uploadApplicationSource_default = async ({ appId, appPkgJson, buildId, confi
2103
2122
  )
2104
2123
  });
2105
2124
  }
2125
+ if (config2.windows.nsisInclude) {
2126
+ files.push({
2127
+ from: config2.windows.nsisInclude,
2128
+ to: path8.join("other", "installer.nsh")
2129
+ });
2130
+ }
2106
2131
  }
2107
2132
  return uploadToS3_default({
2108
2133
  bucket: config2.bucket || void 0,
@@ -2234,7 +2259,8 @@ var runBuild_default = async ({ onEvent, shouldCodeSign = true, configPath }) =>
2234
2259
  appVersion: appPkgJson.version,
2235
2260
  buildId,
2236
2261
  userId: primaryUserId,
2237
- sourceArchiveDetails
2262
+ sourceArchiveDetails,
2263
+ nodeVersion: config2.nodeVersion
2238
2264
  });
2239
2265
  } catch (e) {
2240
2266
  e.message = `Failed while kicking off build; ${e.message}`;
@@ -4152,7 +4178,7 @@ var package_default = {
4152
4178
  access: "public"
4153
4179
  },
4154
4180
  name: "@todesktop/cli",
4155
- version: "1.6.0",
4181
+ version: "1.6.2-0",
4156
4182
  license: "MIT",
4157
4183
  author: "Dave Jeffery <dave@todesktop.com> (http://www.todesktop.com/)",
4158
4184
  homepage: "https://todesktop.com/cli",
@@ -4190,6 +4216,7 @@ var package_default = {
4190
4216
  "@sentry/node": "^5.27.2",
4191
4217
  ajv: "^8.11.2",
4192
4218
  "ajv-formats": "^2.1.1",
4219
+ "ajv-semver": "^1.0.5",
4193
4220
  "analytics-node": "^4.0.1",
4194
4221
  archiver: "^5.2.0",
4195
4222
  axios: "^0.21.1",
@@ -4232,7 +4259,7 @@ var package_default = {
4232
4259
  "xdg-basedir": "^4.0.0"
4233
4260
  },
4234
4261
  devDependencies: {
4235
- "@todesktop/shared": "^7.147.0",
4262
+ "@todesktop/shared": "^7.152.0",
4236
4263
  "@types/bunyan": "^1.8.6",
4237
4264
  "@types/react": "^18.0.26",
4238
4265
  "@typescript-eslint/eslint-plugin": "^5.46.1",