@todesktop/cli 1.9.7 → 1.10.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/README.md CHANGED
@@ -901,6 +901,14 @@ Default: `undefined`.
901
901
 
902
902
  The path to NSIS script to customize installer.
903
903
 
904
+ #### `windows.publisherName` - (optional) array of strings
905
+
906
+ Example: `["ABC Limited"]`.
907
+
908
+ Default: Default to the common name from your code signing certificate.
909
+
910
+ The publisher name, exactly as in your code signing certificate. Several names can be provided. Defaults to common name from your code signing certificate. You should typically not include this property in your configuration unless you wish to transition to a new certificate in the future.
911
+
904
912
  ## Build lifecycle hooks (package.json scripts)
905
913
 
906
914
  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.
@@ -1117,9 +1125,14 @@ Now, when we build your app on ToDesktop servers, it will also run your custom `
1117
1125
 
1118
1126
  ## Changelog
1119
1127
 
1128
+ ### v1.10.0
1129
+
1130
+ - Throw error if unsupported properties are provided in `todesktop.json`
1131
+
1120
1132
  ### v1.9.8
1121
1133
 
1122
1134
  - Chore: bump dependencies
1135
+ - Add support for `windows.publisherName`
1123
1136
 
1124
1137
  ### v1.9.7
1125
1138
 
package/dist/cli.js CHANGED
@@ -1472,6 +1472,7 @@ var full_default = (context) => {
1472
1472
  return {
1473
1473
  type: "object",
1474
1474
  required: ["id", "icon", "schemaVersion"],
1475
+ additionalProperties: false,
1475
1476
  properties: {
1476
1477
  appBuilderLibVersion: {
1477
1478
  type: "string",
@@ -1537,6 +1538,7 @@ var full_default = (context) => {
1537
1538
  items: {
1538
1539
  type: "object",
1539
1540
  required: ["from"],
1541
+ additionalProperties: false,
1540
1542
  properties: {
1541
1543
  from: {
1542
1544
  type: "string",
@@ -1551,6 +1553,7 @@ var full_default = (context) => {
1551
1553
  items: {
1552
1554
  type: "object",
1553
1555
  required: ["from"],
1556
+ additionalProperties: false,
1554
1557
  properties: {
1555
1558
  from: {
1556
1559
  type: "string",
@@ -1565,6 +1568,7 @@ var full_default = (context) => {
1565
1568
  items: {
1566
1569
  type: "object",
1567
1570
  required: ["ext"],
1571
+ additionalProperties: false,
1568
1572
  properties: {
1569
1573
  ext: getItemOrArrayOfItemsSchema({
1570
1574
  type: "string",
@@ -1612,6 +1616,7 @@ var full_default = (context) => {
1612
1616
  icon: getIconSchema(),
1613
1617
  linux: {
1614
1618
  type: "object",
1619
+ additionalProperties: false,
1615
1620
  properties: {
1616
1621
  category: { type: "string", minLength: 1 },
1617
1622
  icon: getIconSchema(),
@@ -1625,6 +1630,7 @@ var full_default = (context) => {
1625
1630
  },
1626
1631
  mac: {
1627
1632
  type: "object",
1633
+ additionalProperties: false,
1628
1634
  properties: {
1629
1635
  category: { type: "string", minLength: 1 },
1630
1636
  additionalBinariesToSign: {
@@ -1669,6 +1675,7 @@ var full_default = (context) => {
1669
1675
  },
1670
1676
  mas: {
1671
1677
  type: "object",
1678
+ additionalProperties: false,
1672
1679
  properties: {
1673
1680
  entitlements: {
1674
1681
  type: "string",
@@ -1708,6 +1715,7 @@ var full_default = (context) => {
1708
1715
  },
1709
1716
  dmg: {
1710
1717
  type: "object",
1718
+ additionalProperties: false,
1711
1719
  properties: {
1712
1720
  background: {
1713
1721
  type: "string",
@@ -1727,6 +1735,7 @@ var full_default = (context) => {
1727
1735
  type: "array",
1728
1736
  items: {
1729
1737
  type: "object",
1738
+ additionalProperties: false,
1730
1739
  properties: {
1731
1740
  x: { type: "number" },
1732
1741
  y: { type: "number" }
@@ -1735,6 +1744,7 @@ var full_default = (context) => {
1735
1744
  },
1736
1745
  window: {
1737
1746
  type: "object",
1747
+ additionalProperties: false,
1738
1748
  properties: {
1739
1749
  x: { type: "number" },
1740
1750
  y: { type: "number" },
@@ -1770,6 +1780,7 @@ var full_default = (context) => {
1770
1780
  schemaVersion: { type: "number", minimum: 1, maximum: 1 },
1771
1781
  snap: {
1772
1782
  type: "object",
1783
+ additionalProperties: false,
1773
1784
  properties: {
1774
1785
  after: {
1775
1786
  type: "array",
@@ -1848,10 +1859,12 @@ var full_default = (context) => {
1848
1859
  },
1849
1860
  windows: {
1850
1861
  type: "object",
1862
+ additionalProperties: false,
1851
1863
  properties: {
1852
1864
  icon: getIconSchema(["ico"]),
1853
1865
  nsisCustomBinary: {
1854
1866
  type: "object",
1867
+ additionalProperties: false,
1855
1868
  properties: {
1856
1869
  checksum: { type: "string" },
1857
1870
  debugLogging: { type: "boolean" },
@@ -1866,6 +1879,13 @@ var full_default = (context) => {
1866
1879
  extensions: ["nsh"],
1867
1880
  mustBeFile: true
1868
1881
  }
1882
+ },
1883
+ publisherName: {
1884
+ type: "array",
1885
+ items: {
1886
+ type: "string",
1887
+ minLength: 1
1888
+ }
1869
1889
  }
1870
1890
  }
1871
1891
  }
@@ -1884,6 +1904,15 @@ function validateConfig({
1884
1904
  (0, import_ajv_formats2.default)(ajv);
1885
1905
  addCustomKeywords_default(ajv, context);
1886
1906
  const validate = ajv.compile(schema);
1907
+ if (config2.productName) {
1908
+ throw new Error(
1909
+ `todesktop.json invalid.
1910
+
1911
+ The "productName" property is no longer supported in todesktop.json. Please remove it and add it to your app's package.json instead.
1912
+
1913
+ We made this change because Electron also uses the "productName" if it exists in your app's package.json. If you do not add it to your package.json, your app name will default to the value of the "name" property in your package.json.`
1914
+ );
1915
+ }
1887
1916
  if (!validate(config2)) {
1888
1917
  const output = (0, import_better_ajv_errors2.default)(schema, config2, validate.errors, {
1889
1918
  indent: 2
@@ -1895,15 +1924,6 @@ Learn more here: https://www.npmjs.com/package/@todesktop/cli#project-configurat
1895
1924
  ${output}`
1896
1925
  );
1897
1926
  }
1898
- if (config2.productName) {
1899
- throw new Error(
1900
- `todesktop.json invalid.
1901
-
1902
- The "productName" property is no longer supported in todesktop.json. Please remove it and add it to your app's package.json instead.
1903
-
1904
- We made this change because Electron also uses the "productName" if it exists in your app's package.json. If you do not add it to your package.json, your app name will default to the value of the "name" property in your package.json.`
1905
- );
1906
- }
1907
1927
  }
1908
1928
 
1909
1929
  // src/utilities/projectConfig/computeFullProjectConfig.ts
@@ -5290,7 +5310,7 @@ var package_default = {
5290
5310
  access: "public"
5291
5311
  },
5292
5312
  name: "@todesktop/cli",
5293
- version: "1.9.6",
5313
+ version: "1.9.8",
5294
5314
  license: "MIT",
5295
5315
  author: "Dave Jeffery <dave@todesktop.com> (http://www.todesktop.com/)",
5296
5316
  homepage: "https://todesktop.com/cli",
@@ -5372,7 +5392,7 @@ var package_default = {
5372
5392
  "xdg-basedir": "^4.0.0"
5373
5393
  },
5374
5394
  devDependencies: {
5375
- "@todesktop/shared": "^7.188.79",
5395
+ "@todesktop/shared": "^7.188.80",
5376
5396
  "@types/bunyan": "^1.8.6",
5377
5397
  "@types/is-ci": "^3.0.4",
5378
5398
  "@types/node": "^20.8.4",