@electron-forge/maker-deb 6.0.0-beta.7 → 6.0.0-beta.70

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
@@ -1,20 +1,18 @@
1
- # deb
1
+ ## maker-deb
2
2
 
3
- The deb target builds [`.deb` packages](https://en.wikipedia.org/wiki/Deb_%28file_format%29), which are the standard package format for Debian-based Linux distributions such as Ubuntu. You can only build the deb target on Linux or macOS machines with the `fakeroot` and `dpkg` packages installed.
3
+ `@electron-forge/maker-deb` builds .deb packages, which are the standard package format for Debian-based Linux distributions such as Ubuntu. You can only build the deb target on Linux or macOS machines with the fakeroot and dpkg packages installed.
4
4
 
5
- Configuration options are documented in [`MakerDebConfig`](https://js.electronforge.io/maker/deb/interfaces/makerdebconfig.html).
5
+ Configuration options are documented in [`MakerDebConfigOptions`](https://js.electronforge.io/interfaces/_electron_forge_maker_deb._internal_.MakerDebConfigOptions.html).
6
6
 
7
- ### Usage
8
-
9
- ```javascript
7
+ ```
10
8
  {
11
9
  name: '@electron-forge/maker-deb',
12
10
  config: {
13
11
  options: {
14
- maintainer: 'Joe Bloggs',
15
- homepage: 'https://example.com'
12
+ maintainer: 'The Forgers',
13
+ homepage: 'https://example.com',
14
+ icon: 'path/to/icon.svg'
16
15
  }
17
16
  }
18
17
  }
19
- ```
20
-
18
+ ```
package/dist/Config.d.ts CHANGED
@@ -13,15 +13,18 @@ export interface MakerDebConfigOptions {
13
13
  */
14
14
  productName?: string;
15
15
  /**
16
- * Generic name of the application (e.g. Text Editor), used in the GenericName field of the desktop specification.
16
+ * Generic name of the application (e.g. Text Editor), used in the GenericName field of the
17
+ * desktop specification.
17
18
  */
18
19
  genericName?: string;
19
20
  /**
20
- * Short description of the application, used in the Description field of the control specification.
21
+ * Short description of the application, used in the Description field of the control
22
+ * specification.
21
23
  */
22
24
  description?: string;
23
25
  /**
24
- * Long description of the application, used in the Description field of the control specification.
26
+ * Long description of the application, used in the Description field of the control
27
+ * specification.
25
28
  */
26
29
  productDescription?: string;
27
30
  /**
@@ -37,7 +40,12 @@ export interface MakerDebConfigOptions {
37
40
  *
38
41
  * Possible sections. Generated on https://packages.debian.org/unstable/ with:
39
42
  *
40
- * $$('#content dt a').map(n => {const ss = n.href.split('/'); return `'${ss[ss.length - 2]}'`; }).sort().join(' | ')
43
+ * ```javascript
44
+ * $$('#content dt a').map(n => {
45
+ * const ss = n.href.split('/');
46
+ * return `'${ss[ss.length - 2]}'`;
47
+ * }).sort().join(' | ')
48
+ * ```
41
49
  */
42
50
  section?: 'admin' | 'cli-mono' | 'comm' | 'database' | 'debian-installer' | 'debug' | 'devel' | 'doc' | 'editors' | 'education' | 'electronics' | 'embedded' | 'fonts' | 'games' | 'gnome' | 'gnu-r' | 'gnustep' | 'graphics' | 'hamradio' | 'haskell' | 'httpd' | 'interpreters' | 'introspection' | 'java' | 'javascript' | 'kde' | 'kernel' | 'libdevel' | 'libs' | 'lisp' | 'localization' | 'mail' | 'math' | 'metapackages' | 'misc' | 'net' | 'news' | 'ocaml' | 'oldlibs' | 'otherosfs' | 'perl' | 'php' | 'python' | 'ruby' | 'rust' | 'science' | 'shells' | 'sound' | 'tasks' | 'tex' | 'text' | 'utils' | 'vcs' | 'video' | 'virtual' | 'web' | 'x11' | 'xfce' | 'zope';
43
51
  /**
@@ -80,7 +88,8 @@ export interface MakerDebConfigOptions {
80
88
  */
81
89
  homepage?: string;
82
90
  /**
83
- * Relative path to the executable that will act as binary for the application, used in the Exec field of the desktop specification.
91
+ * Relative path to the executable that will act as binary for the application, used in the Exec
92
+ * field of the desktop specification.
84
93
  *
85
94
  * Defaults to options.name
86
95
  */
@@ -90,15 +99,17 @@ export interface MakerDebConfigOptions {
90
99
  */
91
100
  icon?: string;
92
101
  /**
93
- * Categories in which the application should be shown in a menu, used in the Categories field of the desktop specification.
102
+ * Categories in which the application should be shown in a menu, used in the Categories field
103
+ * of the desktop specification.
94
104
  *
95
105
  * Generated on https://specifications.freedesktop.org/menu-spec/latest/apa.html with:
96
106
  *
97
- * `(${$$('.informaltable tr td:first-child').map(td => `'${td.innerText}'`).join(' | ')})[]`
107
+ * `(${$$('.informaltable tr td:first-child').map(td => `'$\{td.innerText\}'`).join(' | ')})[]`
98
108
  */
99
109
  categories?: ('AudioVideo' | 'Audio' | 'Video' | 'Development' | 'Education' | 'Game' | 'Graphics' | 'Network' | 'Office' | 'Science' | 'Settings' | 'System' | 'Utility')[];
100
110
  /**
101
- * MIME types the application is able to open, used in the MimeType field of the desktop specification.
111
+ * MIME types the application is able to open, used in the MimeType field of the desktop
112
+ * specification.
102
113
  */
103
114
  mimeType?: string[];
104
115
  /**
@@ -106,9 +117,11 @@ export interface MakerDebConfigOptions {
106
117
  */
107
118
  lintianOverrides?: string[];
108
119
  /**
109
- * Path to package maintainer scripts with their corresponding name, used in the installation procedure:
120
+ * Path to package maintainer scripts with their corresponding name, used in the installation
121
+ * procedure.
110
122
  *
111
- * Read More: https://www.debian.org/doc/debian-policy/#package-maintainer-scripts-and-installation-procedure
123
+ * Read More:
124
+ * https://www.debian.org/doc/debian-policy/#package-maintainer-scripts-and-installation-procedure
112
125
  */
113
126
  scripts?: {
114
127
  preinst?: string;
@@ -124,3 +137,4 @@ export interface MakerDebConfigOptions {
124
137
  export interface MakerDebConfig {
125
138
  options?: MakerDebConfigOptions;
126
139
  }
140
+ //# sourceMappingURL=Config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../src/Config.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAqB;IACpC;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM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U,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,CACT,YAAY,GACZ,OAAO,GACP,OAAO,GACP,aAAa,GACb,WAAW,GACX,MAAM,GACN,UAAU,GACV,SAAS,GACT,QAAQ,GACR,SAAS,GACT,UAAU,GACV,QAAQ,GACR,SAAS,CACZ,EAAE,CAAC;IACJ;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B;;;;;;OAMG;IACH,OAAO,CAAC,EAAE;QACR,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,qBAAqB,CAAC;CACjC"}
package/dist/Config.js CHANGED
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
2
5
 
3
- require("source-map-support/register");
4
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbXX0=
6
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
@@ -1,10 +1,13 @@
1
- import MakerBase, { MakerOptions } from '@electron-forge/maker-base';
1
+ import { MakerBase, MakerOptions } from '@electron-forge/maker-base';
2
2
  import { ForgeArch, ForgePlatform } from '@electron-forge/shared-types';
3
3
  import { MakerDebConfig } from './Config';
4
- export declare function debianArch(nodeArch: ForgeArch): "i386" | "amd64" | "armhf" | "armel";
4
+ export declare function debianArch(nodeArch: ForgeArch): string;
5
5
  export default class MakerDeb extends MakerBase<MakerDebConfig> {
6
6
  name: string;
7
7
  defaultPlatforms: ForgePlatform[];
8
+ requiredExternalBinaries: string[];
8
9
  isSupportedOnCurrentPlatform(): boolean;
9
- make({dir, makeDir, targetArch, packageJSON}: MakerOptions): Promise<string[]>;
10
+ make({ dir, makeDir, targetArch }: MakerOptions): Promise<string[]>;
10
11
  }
12
+ export { MakerDeb, MakerDebConfig };
13
+ //# sourceMappingURL=MakerDeb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MakerDeb.d.ts","sourceRoot":"","sources":["../src/MakerDeb.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAExE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,wBAAgB,UAAU,CAAC,QAAQ,EAAE,SAAS,GAAG,MAAM,CAatD;AAED,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC7D,IAAI,SAAS;IAEb,gBAAgB,EAAE,aAAa,EAAE,CAAa;IAE9C,wBAAwB,EAAE,MAAM,EAAE,CAAwB;IAE1D,4BAA4B,IAAI,OAAO;IAIjC,IAAI,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;CAkB1E;AAED,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC"}
package/dist/MakerDeb.js CHANGED
@@ -1,92 +1,69 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "MakerDebConfig", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return _config.MakerDebConfig;
9
+ }
5
10
  });
6
11
  exports.debianArch = debianArch;
7
- exports.default = void 0;
8
-
9
- require("source-map-support/register");
10
-
11
- var _makerBase = _interopRequireDefault(require("@electron-forge/maker-base"));
12
-
12
+ exports.MakerDeb = exports.default = void 0;
13
13
  var _path = _interopRequireDefault(require("path"));
14
-
15
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
-
17
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _next(value) { step("next", value); } function _throw(err) { step("throw", err); } _next(); }); }; }
18
-
14
+ var _makerBase = require("@electron-forge/maker-base");
15
+ var _config = require("./Config");
16
+ function _interopRequireDefault(obj) {
17
+ return obj && obj.__esModule ? obj : {
18
+ default: obj
19
+ };
20
+ }
19
21
  function debianArch(nodeArch) {
20
- switch (nodeArch) {
21
- case 'ia32':
22
- return 'i386';
23
-
24
- case 'x64':
25
- return 'amd64';
26
-
27
- case 'armv7l':
28
- return 'armhf';
29
-
30
- case 'arm':
31
- return 'armel';
32
-
33
- default:
34
- return nodeArch;
35
- }
22
+ switch(nodeArch){
23
+ case 'ia32':
24
+ return 'i386';
25
+ case 'x64':
26
+ return 'amd64';
27
+ case 'armv7l':
28
+ return 'armhf';
29
+ case 'arm':
30
+ return 'armel';
31
+ default:
32
+ return nodeArch;
33
+ }
36
34
  }
37
-
38
- class MakerDeb extends _makerBase.default {
39
- constructor(...args) {
40
- var _temp;
41
-
42
- return _temp = super(...args), Object.defineProperty(this, "name", {
43
- configurable: true,
44
- enumerable: true,
45
- writable: true,
46
- value: 'deb'
47
- }), Object.defineProperty(this, "defaultPlatforms", {
48
- configurable: true,
49
- enumerable: true,
50
- writable: true,
51
- value: ['linux']
52
- }), _temp;
53
- }
54
-
55
- isSupportedOnCurrentPlatform() {
56
- return this.isInstalled('electron-installer-debian') && process.platform === 'linux';
57
- }
58
-
59
- make({
60
- dir,
61
- makeDir,
62
- targetArch,
63
- packageJSON
64
- }) {
65
- var _this = this;
66
-
67
- return _asyncToGenerator(function* () {
68
- const installer = require('electron-installer-debian');
69
-
70
- const arch = debianArch(targetArch);
71
- const name = (_this.config.options || {}).name || packageJSON.name;
72
- const versionedName = `${name}_${packageJSON.version}_${arch}`;
73
-
74
- const outPath = _path.default.resolve(makeDir, `${versionedName}.deb`);
75
-
76
- yield _this.ensureFile(outPath);
77
- yield installer(Object.assign({
78
- options: {}
79
- }, _this.config, {
80
- arch,
81
- src: dir,
82
- dest: _path.default.dirname(outPath),
83
- rename: undefined
84
- }));
85
- return [outPath];
86
- })();
87
- }
88
-
35
+ class MakerDeb extends _makerBase.MakerBase {
36
+ isSupportedOnCurrentPlatform() {
37
+ return this.isInstalled('electron-installer-debian');
38
+ }
39
+ async make({ dir , makeDir , targetArch }) {
40
+ // eslint-disable-next-line node/no-missing-require
41
+ const installer = require('electron-installer-debian');
42
+ const outDir = _path.default.resolve(makeDir, 'deb', targetArch);
43
+ await this.ensureDirectory(outDir);
44
+ const { packagePaths } = await installer({
45
+ options: {},
46
+ ...this.config,
47
+ arch: debianArch(targetArch),
48
+ src: dir,
49
+ dest: outDir,
50
+ rename: undefined
51
+ });
52
+ return packagePaths;
53
+ }
54
+ constructor(...args){
55
+ super(...args);
56
+ this.name = 'deb';
57
+ this.defaultPlatforms = [
58
+ 'linux'
59
+ ];
60
+ this.requiredExternalBinaries = [
61
+ 'dpkg',
62
+ 'fakeroot'
63
+ ];
64
+ }
89
65
  }
90
-
91
66
  exports.default = MakerDeb;
92
- //# s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25zKSB7XG4gICAgY29uc3QgaW5zdGFsbGVyID0gcmVxdWlyZSgnZWxlY3Ryb24taW5zdGFsbGVyLWRlYmlhbicpO1xuXG4gICAgY29uc3QgYXJjaCA9IGRlYmlhbkFyY2godGFyZ2V0QXJjaCk7XG4gICAgY29uc3QgbmFtZSA9ICh0aGlzLmNvbmZpZy5vcHRpb25zIHx8IHt9KS5uYW1lIHx8IHBhY2thZ2VKU09OLm5hbWU7XG4gICAgY29uc3QgdmVyc2lvbmVkTmFtZSA9IGAke25hbWV9XyR7cGFja2FnZUpTT04udmVyc2lvbn1fJHthcmNofWA7XG4gICAgY29uc3Qgb3V0UGF0aCA9IHBhdGgucmVzb2x2ZShtYWtlRGlyLCBgJHt2ZXJzaW9uZWROYW1lfS5kZWJgKTtcblxuICAgIGF3YWl0IHRoaXMuZW5zdXJlRmlsZShvdXRQYXRoKTtcblxuICAgIGF3YWl0IGluc3RhbGxlcihPYmplY3QuYXNzaWduKHtcbiAgICAgIG9wdGlvbnM6IHt9LFxuICAgIH0sIHRoaXMuY29uZmlnLCB7XG4gICAgICBhcmNoLFxuICAgICAgc3JjOiBkaXIsXG4gICAgICBkZXN0OiBwYXRoLmRpcm5hbWUob3V0UGF0aCksXG4gICAgICByZW5hbWU6IHVuZGVmaW5lZCxcbiAgICB9KSk7XG5cbiAgICByZXR1cm4gW291dFBhdGhdO1xuICB9XG59XG4iXX0=
67
+ exports.MakerDeb = MakerDeb;
68
+
69
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9NYWtlckRlYi50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgcGF0aCBmcm9tICdwYXRoJztcblxuaW1wb3J0IHsgTWFrZXJCYXNlLCBNYWtlck9wdGlvbnMgfSBmcm9tICdAZWxlY3Ryb24tZm9yZ2UvbWFrZXItYmFzZSc7XG5pbXBvcnQgeyBGb3JnZUFyY2gsIEZvcmdlUGxhdGZv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xDQUFDLENBQUNJLFlBQVksRUFBQyxDQUFDLEdBQUcsS0FBSyxDQUFDTixTQUFTLENBQUMsQ0FBQztZQUN4Q08sT0FBTyxFQUFFLENBQUMsQ0FBQztlQUNSLElBQUksQ0FBQ0MsTUFBTTtZQUNkQyxJQUFJLEVBQUVuQixVQUFVLENBQUNTLFVBQVU7WUFDM0JXLEdBQUcsRUFBRWIsR0FBRztZQUNSYyxJQUFJLEVBQUVULE1BQU07WUFDWlUsTUFBTSxFQUFFQyxTQUFTO1FBQ25CLENBQUM7UUFFRCxNQUFNLENBQUNQLFlBQVk7SUFDckIsQ0FBQzs7O1FBNUJZLElBNkJkLENBNUJDUSxJQUFJLEdBQUcsQ0FBSztRQURDLElBNkJkLENBMUJDQyxnQkFBZ0IsR0FBb0IsQ0FBQztZQUFBLENBQU87UUFBQSxDQUFDO1FBSGhDLElBNkJkLENBeEJDQyx3QkFBd0IsR0FBYSxDQUFDO1lBQUEsQ0FBTTtZQUFFLENBQVU7UUFBQSxDQUFDOzs7a0JBTHRDeEIsUUFBUTtRQStCcEJBLFFBQVEsR0FBUkEsUUFBUSJ9
package/index.ts ADDED
@@ -0,0 +1,5 @@
1
+ // ⚠️ AUTOGENERATED ⚠️ AUTOGENERATED ⚠️ AUTOGENERATED ⚠️
2
+ // This file was automatically generated by `tools/gen-ts-glue.ts`. Do not modify directly if you want to keep your changes.
3
+ export * from "./src/MakerDeb";
4
+ import defaultExport from "./src/MakerDeb";
5
+ export default defaultExport;
package/package.json CHANGED
@@ -1,30 +1,27 @@
1
1
  {
2
2
  "name": "@electron-forge/maker-deb",
3
- "version": "6.0.0-beta.7",
3
+ "version": "6.0.0-beta.70",
4
4
  "description": "Deb maker for Electron Forge",
5
- "repository": "https://github.com/electron-userland/electron-forge",
5
+ "repository": "https://github.com/electron/forge",
6
6
  "author": "Samuel Attard",
7
7
  "license": "MIT",
8
8
  "main": "dist/MakerDeb.js",
9
9
  "typings": "dist/MakerDeb.d.ts",
10
- "scripts": {
11
- "test": "mocha --require ts-node/register test/**/*_spec.ts test/**/**/*_spec.ts --opts ../../../mocha.opts"
12
- },
13
10
  "devDependencies": {
14
- "chai": "^4.0.0",
11
+ "chai": "^4.3.3",
15
12
  "chai-as-promised": "^7.0.0",
16
- "mocha": "^5.0.0",
17
- "proxyquire": "^2.0.1",
18
- "sinon": "^4.1.2"
13
+ "mocha": "^9.0.1",
14
+ "proxyquire": "^2.1.3",
15
+ "sinon": "^13.0.1"
19
16
  },
20
17
  "engines": {
21
- "node": ">= 6.0"
18
+ "node": ">= 14.17.5"
22
19
  },
23
20
  "dependencies": {
24
- "@electron-forge/maker-base": "6.0.0-beta.7",
25
- "@electron-forge/shared-types": "6.0.0-beta.7"
21
+ "@electron-forge/maker-base": "6.0.0-beta.70",
22
+ "@electron-forge/shared-types": "6.0.0-beta.70"
26
23
  },
27
24
  "optionalDependencies": {
28
- "electron-installer-debian": "^0.8.0"
25
+ "electron-installer-debian": "^3.0.0"
29
26
  }
30
27
  }
package/src/Config.ts CHANGED
@@ -2,9 +2,9 @@ export interface MakerDebConfigOptions {
2
2
  /**
3
3
  * Name of the package (e.g. atom), used in the Package field of the control
4
4
  * specification.
5
- *
5
+ *
6
6
  * Package names [...] must consist only of lower case letters (a-z), digits
7
- * (0-9), plus (+) and minus (-) signs, and periods (.). They must be at
7
+ * (0-9), plus (+) and minus (-) signs, and periods (.). They must be at
8
8
  * least two characters long and must start with an alphanumeric character.
9
9
  */
10
10
  name?: string;
@@ -13,15 +13,18 @@ export interface MakerDebConfigOptions {
13
13
  */
14
14
  productName?: string;
15
15
  /**
16
- * Generic name of the application (e.g. Text Editor), used in the GenericName field of the desktop specification.
16
+ * Generic name of the application (e.g. Text Editor), used in the GenericName field of the
17
+ * desktop specification.
17
18
  */
18
19
  genericName?: string;
19
20
  /**
20
- * Short description of the application, used in the Description field of the control specification.
21
+ * Short description of the application, used in the Description field of the control
22
+ * specification.
21
23
  */
22
24
  description?: string;
23
25
  /**
24
- * Long description of the application, used in the Description field of the control specification.
26
+ * Long description of the application, used in the Description field of the control
27
+ * specification.
25
28
  */
26
29
  productDescription?: string;
27
30
  /**
@@ -34,15 +37,79 @@ export interface MakerDebConfigOptions {
34
37
  revision?: string;
35
38
  /**
36
39
  * Application area into which the package has been classified.
37
- *
40
+ *
38
41
  * Possible sections. Generated on https://packages.debian.org/unstable/ with:
39
- *
40
- * $$('#content dt a').map(n => {const ss = n.href.split('/'); return `'${ss[ss.length - 2]}'`; }).sort().join(' | ')
41
- */
42
- section?: 'admin' | 'cli-mono' | 'comm' | 'database' | 'debian-installer' | 'debug' | 'devel' | 'doc' | 'editors' | 'education' | 'electronics' | 'embedded' | 'fonts' | 'games' | 'gnome' | 'gnu-r' | 'gnustep' | 'graphics' | 'hamradio' | 'haskell' | 'httpd' | 'interpreters' | 'introspection' | 'java' | 'javascript' | 'kde' | 'kernel' | 'libdevel' | 'libs' | 'lisp' | 'localization' | 'mail' | 'math' | 'metapackages' | 'misc' | 'net' | 'news' | 'ocaml' | 'oldlibs' | 'otherosfs' | 'perl' | 'php' | 'python' | 'ruby' | 'rust' | 'science' | 'shells' | 'sound' | 'tasks' | 'tex' | 'text' | 'utils' | 'vcs' | 'video' | 'virtual' | 'web' | 'x11' | 'xfce' | 'zope';
42
+ *
43
+ * ```javascript
44
+ * $$('#content dt a').map(n => {
45
+ * const ss = n.href.split('/');
46
+ * return `'${ss[ss.length - 2]}'`;
47
+ * }).sort().join(' | ')
48
+ * ```
49
+ */
50
+ section?:
51
+ | 'admin'
52
+ | 'cli-mono'
53
+ | 'comm'
54
+ | 'database'
55
+ | 'debian-installer'
56
+ | 'debug'
57
+ | 'devel'
58
+ | 'doc'
59
+ | 'editors'
60
+ | 'education'
61
+ | 'electronics'
62
+ | 'embedded'
63
+ | 'fonts'
64
+ | 'games'
65
+ | 'gnome'
66
+ | 'gnu-r'
67
+ | 'gnustep'
68
+ | 'graphics'
69
+ | 'hamradio'
70
+ | 'haskell'
71
+ | 'httpd'
72
+ | 'interpreters'
73
+ | 'introspection'
74
+ | 'java'
75
+ | 'javascript'
76
+ | 'kde'
77
+ | 'kernel'
78
+ | 'libdevel'
79
+ | 'libs'
80
+ | 'lisp'
81
+ | 'localization'
82
+ | 'mail'
83
+ | 'math'
84
+ | 'metapackages'
85
+ | 'misc'
86
+ | 'net'
87
+ | 'news'
88
+ | 'ocaml'
89
+ | 'oldlibs'
90
+ | 'otherosfs'
91
+ | 'perl'
92
+ | 'php'
93
+ | 'python'
94
+ | 'ruby'
95
+ | 'rust'
96
+ | 'science'
97
+ | 'shells'
98
+ | 'sound'
99
+ | 'tasks'
100
+ | 'tex'
101
+ | 'text'
102
+ | 'utils'
103
+ | 'vcs'
104
+ | 'video'
105
+ | 'virtual'
106
+ | 'web'
107
+ | 'x11'
108
+ | 'xfce'
109
+ | 'zope';
43
110
  /**
44
111
  * How important is it to have the package installed.
45
- *
112
+ *
46
113
  * You can read more: https://www.debian.org/doc/debian-policy/#priorities
47
114
  */
48
115
  priority?: 'required' | 'important' | 'standard' | 'optional';
@@ -80,8 +147,9 @@ export interface MakerDebConfigOptions {
80
147
  */
81
148
  homepage?: string;
82
149
  /**
83
- * Relative path to the executable that will act as binary for the application, used in the Exec field of the desktop specification.
84
- *
150
+ * Relative path to the executable that will act as binary for the application, used in the Exec
151
+ * field of the desktop specification.
152
+ *
85
153
  * Defaults to options.name
86
154
  */
87
155
  bin?: string;
@@ -90,15 +158,31 @@ export interface MakerDebConfigOptions {
90
158
  */
91
159
  icon?: string;
92
160
  /**
93
- * Categories in which the application should be shown in a menu, used in the Categories field of the desktop specification.
94
- *
161
+ * Categories in which the application should be shown in a menu, used in the Categories field
162
+ * of the desktop specification.
163
+ *
95
164
  * Generated on https://specifications.freedesktop.org/menu-spec/latest/apa.html with:
96
- *
97
- * `(${$$('.informaltable tr td:first-child').map(td => `'${td.innerText}'`).join(' | ')})[]`
98
- */
99
- categories?: ('AudioVideo' | 'Audio' | 'Video' | 'Development' | 'Education' | 'Game' | 'Graphics' | 'Network' | 'Office' | 'Science' | 'Settings' | 'System' | 'Utility')[];
100
- /**
101
- * MIME types the application is able to open, used in the MimeType field of the desktop specification.
165
+ *
166
+ * `(${$$('.informaltable tr td:first-child').map(td => `'$\{td.innerText\}'`).join(' | ')})[]`
167
+ */
168
+ categories?: (
169
+ | 'AudioVideo'
170
+ | 'Audio'
171
+ | 'Video'
172
+ | 'Development'
173
+ | 'Education'
174
+ | 'Game'
175
+ | 'Graphics'
176
+ | 'Network'
177
+ | 'Office'
178
+ | 'Science'
179
+ | 'Settings'
180
+ | 'System'
181
+ | 'Utility'
182
+ )[];
183
+ /**
184
+ * MIME types the application is able to open, used in the MimeType field of the desktop
185
+ * specification.
102
186
  */
103
187
  mimeType?: string[];
104
188
  /**
@@ -106,9 +190,11 @@ export interface MakerDebConfigOptions {
106
190
  */
107
191
  lintianOverrides?: string[];
108
192
  /**
109
- * Path to package maintainer scripts with their corresponding name, used in the installation procedure:
110
- *
111
- * Read More: https://www.debian.org/doc/debian-policy/#package-maintainer-scripts-and-installation-procedure
193
+ * Path to package maintainer scripts with their corresponding name, used in the installation
194
+ * procedure.
195
+ *
196
+ * Read More:
197
+ * https://www.debian.org/doc/debian-policy/#package-maintainer-scripts-and-installation-procedure
112
198
  */
113
199
  scripts?: {
114
200
  preinst?: string;
package/src/MakerDeb.ts CHANGED
@@ -1,51 +1,54 @@
1
- import MakerBase, { MakerOptions } from '@electron-forge/maker-base';
2
- import { ForgeArch, ForgePlatform } from '@electron-forge/shared-types';
3
1
  import path from 'path';
4
2
 
3
+ import { MakerBase, MakerOptions } from '@electron-forge/maker-base';
4
+ import { ForgeArch, ForgePlatform } from '@electron-forge/shared-types';
5
+
5
6
  import { MakerDebConfig } from './Config';
6
7
 
7
- export function debianArch(nodeArch: ForgeArch) {
8
+ export function debianArch(nodeArch: ForgeArch): string {
8
9
  switch (nodeArch) {
9
- case 'ia32': return 'i386';
10
- case 'x64': return 'amd64';
11
- case 'armv7l': return 'armhf';
12
- case 'arm': return 'armel';
13
- default: return nodeArch;
10
+ case 'ia32':
11
+ return 'i386';
12
+ case 'x64':
13
+ return 'amd64';
14
+ case 'armv7l':
15
+ return 'armhf';
16
+ case 'arm':
17
+ return 'armel';
18
+ default:
19
+ return nodeArch;
14
20
  }
15
21
  }
16
22
 
17
23
  export default class MakerDeb extends MakerBase<MakerDebConfig> {
18
24
  name = 'deb';
25
+
19
26
  defaultPlatforms: ForgePlatform[] = ['linux'];
20
27
 
21
- isSupportedOnCurrentPlatform() {
22
- return this.isInstalled('electron-installer-debian') && process.platform === 'linux';
28
+ requiredExternalBinaries: string[] = ['dpkg', 'fakeroot'];
29
+
30
+ isSupportedOnCurrentPlatform(): boolean {
31
+ return this.isInstalled('electron-installer-debian');
23
32
  }
24
33
 
25
- async make({
26
- dir,
27
- makeDir,
28
- targetArch,
29
- packageJSON,
30
- }: MakerOptions) {
34
+ async make({ dir, makeDir, targetArch }: MakerOptions): Promise<string[]> {
35
+ // eslint-disable-next-line node/no-missing-require
31
36
  const installer = require('electron-installer-debian');
32
37
 
33
- const arch = debianArch(targetArch);
34
- const name = (this.config.options || {}).name || packageJSON.name;
35
- const versionedName = `${name}_${packageJSON.version}_${arch}`;
36
- const outPath = path.resolve(makeDir, `${versionedName}.deb`);
37
-
38
- await this.ensureFile(outPath);
38
+ const outDir = path.resolve(makeDir, 'deb', targetArch);
39
39
 
40
- await installer(Object.assign({
40
+ await this.ensureDirectory(outDir);
41
+ const { packagePaths } = await installer({
41
42
  options: {},
42
- }, this.config, {
43
- arch,
43
+ ...this.config,
44
+ arch: debianArch(targetArch),
44
45
  src: dir,
45
- dest: path.dirname(outPath),
46
+ dest: outDir,
46
47
  rename: undefined,
47
- }));
48
+ });
48
49
 
49
- return [outPath];
50
+ return packagePaths;
50
51
  }
51
52
  }
53
+
54
+ export { MakerDeb, MakerDebConfig };