@todesktop/cli 1.6.2-0 → 1.6.2-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/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
@@ -1140,6 +1140,7 @@ ${output}`);
1140
1140
  };
1141
1141
 
1142
1142
  // src/utilities/projectConfig/addCustomKeywords.ts
1143
+ var import_valid = __toESM(require("semver/ranges/valid"));
1143
1144
  var addCustomKeywords_default = (ajv, context) => {
1144
1145
  const addKeyword = (def) => {
1145
1146
  const validate = (schema, data) => {
@@ -1155,6 +1156,21 @@ var addCustomKeywords_default = (ajv, context) => {
1155
1156
  };
1156
1157
  ajv.addKeyword({ ...def, validate });
1157
1158
  };
1159
+ addKeyword({
1160
+ keyword: "validSemver",
1161
+ type: "string",
1162
+ validate: (schema, data) => {
1163
+ if (!(0, import_valid.default)(data)) {
1164
+ throw new import_ajv2.ValidationError([
1165
+ {
1166
+ keyword: "validSemver",
1167
+ message: `${data} must be a valid semantic version or version range`
1168
+ }
1169
+ ]);
1170
+ }
1171
+ return true;
1172
+ }
1173
+ });
1158
1174
  addKeyword({
1159
1175
  keyword: "excludedDependencies",
1160
1176
  validate: (schema, data) => {
@@ -1612,6 +1628,11 @@ var full_default = (context) => {
1612
1628
  }
1613
1629
  }
1614
1630
  },
1631
+ nodeVersion: {
1632
+ type: "string",
1633
+ validSemver: {},
1634
+ minLength: 1
1635
+ },
1615
1636
  packageManager: {
1616
1637
  type: "string",
1617
1638
  enum: ["npm", "yarn", "pnpm"]
@@ -1698,7 +1719,15 @@ var full_default = (context) => {
1698
1719
  windows: {
1699
1720
  type: "object",
1700
1721
  properties: {
1701
- icon: getIconSchema(["ico"])
1722
+ icon: getIconSchema(["ico"]),
1723
+ nsisInclude: {
1724
+ type: "string",
1725
+ file: {
1726
+ from: context.projectRoot,
1727
+ extensions: ["nsh"],
1728
+ mustBeFile: true
1729
+ }
1730
+ }
1702
1731
  }
1703
1732
  }
1704
1733
  }
@@ -2107,6 +2136,12 @@ var uploadApplicationSource_default = async ({ appId, appPkgJson, buildId, confi
2107
2136
  )
2108
2137
  });
2109
2138
  }
2139
+ if (config2.windows.nsisInclude) {
2140
+ files.push({
2141
+ from: config2.windows.nsisInclude,
2142
+ to: path8.join("other", "installer.nsh")
2143
+ });
2144
+ }
2110
2145
  }
2111
2146
  return uploadToS3_default({
2112
2147
  bucket: config2.bucket || void 0,
@@ -2238,7 +2273,8 @@ var runBuild_default = async ({ onEvent, shouldCodeSign = true, configPath }) =>
2238
2273
  appVersion: appPkgJson.version,
2239
2274
  buildId,
2240
2275
  userId: primaryUserId,
2241
- sourceArchiveDetails
2276
+ sourceArchiveDetails,
2277
+ nodeVersion: config2.nodeVersion
2242
2278
  });
2243
2279
  } catch (e) {
2244
2280
  e.message = `Failed while kicking off build; ${e.message}`;
@@ -4156,7 +4192,7 @@ var package_default = {
4156
4192
  access: "public"
4157
4193
  },
4158
4194
  name: "@todesktop/cli",
4159
- version: "1.6.1",
4195
+ version: "1.6.2-1",
4160
4196
  license: "MIT",
4161
4197
  author: "Dave Jeffery <dave@todesktop.com> (http://www.todesktop.com/)",
4162
4198
  homepage: "https://todesktop.com/cli",
@@ -4228,7 +4264,7 @@ var package_default = {
4228
4264
  "prop-types": "^15.7.2",
4229
4265
  react: "^17.0.2",
4230
4266
  "react-final-form": "^6.5.1",
4231
- semver: "^7.3.2",
4267
+ semver: "^7.3.8",
4232
4268
  "source-map-support": "^0.5.21",
4233
4269
  "stream-to-array": "^2.3.0",
4234
4270
  superagent: "^7.1.3",
@@ -4236,7 +4272,7 @@ var package_default = {
4236
4272
  "xdg-basedir": "^4.0.0"
4237
4273
  },
4238
4274
  devDependencies: {
4239
- "@todesktop/shared": "^7.147.0",
4275
+ "@todesktop/shared": "^7.152.0",
4240
4276
  "@types/bunyan": "^1.8.6",
4241
4277
  "@types/react": "^18.0.26",
4242
4278
  "@typescript-eslint/eslint-plugin": "^5.46.1",