@electron-forge/maker-deb 6.0.1 → 6.0.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/LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ The MIT License (MIT)
2
+ Copyright (c) 2016 Samuel Attard
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
5
+ this software and associated documentation files (the "Software"), to deal in
6
+ the Software without restriction, including without limitation the rights to
7
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8
+ the Software, and to permit persons to whom the Software is furnished to do so,
9
+ subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@electron-forge/maker-deb",
3
- "version": "6.0.1",
3
+ "version": "6.0.2",
4
4
  "description": "Deb maker for Electron Forge",
5
5
  "repository": "https://github.com/electron/forge",
6
6
  "author": "Samuel Attard",
@@ -18,10 +18,14 @@
18
18
  "node": ">= 14.17.5"
19
19
  },
20
20
  "dependencies": {
21
- "@electron-forge/maker-base": "6.0.1",
22
- "@electron-forge/shared-types": "6.0.1"
21
+ "@electron-forge/maker-base": "^6.0.2",
22
+ "@electron-forge/shared-types": "^6.0.2"
23
23
  },
24
24
  "optionalDependencies": {
25
25
  "electron-installer-debian": "^3.0.0"
26
- }
26
+ },
27
+ "publishConfig": {
28
+ "access": "public"
29
+ },
30
+ "gitHead": "11cf4b58359c9881c05c06e0d62be575a0ed70d1"
27
31
  }
package/src/Config.ts ADDED
@@ -0,0 +1,213 @@
1
+ export interface MakerDebConfigOptions {
2
+ /**
3
+ * Name of the package (e.g. atom), used in the Package field of the control
4
+ * specification.
5
+ *
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
8
+ * least two characters long and must start with an alphanumeric character.
9
+ */
10
+ name?: string;
11
+ /**
12
+ * Name of the application (e.g. Atom), used in the Name field of the desktop specification.
13
+ */
14
+ productName?: string;
15
+ /**
16
+ * Generic name of the application (e.g. Text Editor), used in the GenericName field of the
17
+ * desktop specification.
18
+ */
19
+ genericName?: string;
20
+ /**
21
+ * Short description of the application, used in the Description field of the control
22
+ * specification.
23
+ */
24
+ description?: string;
25
+ /**
26
+ * Long description of the application, used in the Description field of the control
27
+ * specification.
28
+ */
29
+ productDescription?: string;
30
+ /**
31
+ * Version number of the package, used in the Version field of the control specification.
32
+ */
33
+ version?: string;
34
+ /**
35
+ * Revision number of the package, used in the Version field of the control specification.
36
+ */
37
+ revision?: string;
38
+ /**
39
+ * Application area into which the package has been classified.
40
+ *
41
+ * Possible sections. Generated on https://packages.debian.org/unstable/ with:
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';
110
+ /**
111
+ * How important is it to have the package installed.
112
+ *
113
+ * You can read more: https://www.debian.org/doc/debian-policy/#priorities
114
+ */
115
+ priority?: 'required' | 'important' | 'standard' | 'optional';
116
+ /**
117
+ * Estimate of the total amount of disk space required to install the named package,
118
+ * used in the Installed-Size field of the control specification.
119
+ */
120
+ size?: number;
121
+ /**
122
+ * Relationships to other packages, used in the Depends field of the control specification.
123
+ */
124
+ depends?: string[];
125
+ /**
126
+ * Relationships to other packages, used in the Recommends field of the control specification.
127
+ */
128
+ recommends?: string[];
129
+ /**
130
+ * Relationships to other packages, used in the Suggests field of the control specification.
131
+ */
132
+ suggests?: string[];
133
+ /**
134
+ * Relationships to other packages, used in the Enhances field of the control specification.
135
+ */
136
+ enhances?: string[];
137
+ /**
138
+ * Relationships to other packages, used in the Pre-Depends field of the control specification.
139
+ */
140
+ preDepends?: string[];
141
+ /**
142
+ * Maintainer of the package, used in the Maintainer field of the control specification.
143
+ */
144
+ maintainer?: string;
145
+ /**
146
+ * URL of the homepage for the package, used in the Homepage field of the control specification.
147
+ */
148
+ homepage?: string;
149
+ /**
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
+ *
153
+ * Defaults to options.name
154
+ */
155
+ bin?: string;
156
+ /**
157
+ * Path to a single image that will act as icon for the application:
158
+ */
159
+ icon?: string;
160
+ /**
161
+ * Categories in which the application should be shown in a menu, used in the Categories field
162
+ * of the desktop specification.
163
+ *
164
+ * Generated on https://specifications.freedesktop.org/menu-spec/latest/apa.html with:
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.
186
+ */
187
+ mimeType?: string[];
188
+ /**
189
+ * You can use these to quieten lintian.
190
+ */
191
+ lintianOverrides?: string[];
192
+ /**
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
198
+ */
199
+ scripts?: {
200
+ preinst?: string;
201
+ postinst?: string;
202
+ prerm?: string;
203
+ postrm?: string;
204
+ };
205
+ /**
206
+ * The absolute path to a custom template for the generated FreeDesktop.org desktop entry file.
207
+ */
208
+ desktopTemplate?: string;
209
+ }
210
+
211
+ export interface MakerDebConfig {
212
+ options?: MakerDebConfigOptions;
213
+ }
@@ -0,0 +1,54 @@
1
+ import path from 'path';
2
+
3
+ import { MakerBase, MakerOptions } from '@electron-forge/maker-base';
4
+ import { ForgeArch, ForgePlatform } from '@electron-forge/shared-types';
5
+
6
+ import { MakerDebConfig } from './Config';
7
+
8
+ export function debianArch(nodeArch: ForgeArch): string {
9
+ switch (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;
20
+ }
21
+ }
22
+
23
+ export default class MakerDeb extends MakerBase<MakerDebConfig> {
24
+ name = 'deb';
25
+
26
+ defaultPlatforms: ForgePlatform[] = ['linux'];
27
+
28
+ requiredExternalBinaries: string[] = ['dpkg', 'fakeroot'];
29
+
30
+ isSupportedOnCurrentPlatform(): boolean {
31
+ return this.isInstalled('electron-installer-debian');
32
+ }
33
+
34
+ async make({ dir, makeDir, targetArch }: MakerOptions): Promise<string[]> {
35
+ // eslint-disable-next-line node/no-missing-require
36
+ const installer = require('electron-installer-debian');
37
+
38
+ const outDir = path.resolve(makeDir, 'deb', targetArch);
39
+
40
+ await this.ensureDirectory(outDir);
41
+ const { packagePaths } = await installer({
42
+ options: {},
43
+ ...this.config,
44
+ arch: debianArch(targetArch),
45
+ src: dir,
46
+ dest: outDir,
47
+ rename: undefined,
48
+ });
49
+
50
+ return packagePaths;
51
+ }
52
+ }
53
+
54
+ export { MakerDeb, MakerDebConfig };
@@ -0,0 +1,119 @@
1
+ import path from 'path';
2
+
3
+ import { MakerBase, MakerOptions } from '@electron-forge/maker-base';
4
+ import { ForgeArch } from '@electron-forge/shared-types';
5
+ import { expect } from 'chai';
6
+ import proxyquire from 'proxyquire';
7
+ import { SinonStub, stub } from 'sinon';
8
+
9
+ import { MakerDebConfig } from '../src/Config';
10
+ import { debianArch } from '../src/MakerDeb';
11
+
12
+ type MakeFunction = (opts: Partial<MakerOptions>) => Promise<string[]>;
13
+
14
+ class MakerImpl extends MakerBase<MakerDebConfig> {
15
+ name = 'test';
16
+
17
+ defaultPlatforms = [];
18
+ }
19
+
20
+ describe('MakerDeb', () => {
21
+ let MakerDeb: typeof MakerImpl;
22
+ let eidStub: SinonStub;
23
+ let ensureDirectoryStub: SinonStub;
24
+ let config: MakerDebConfig;
25
+ let maker: MakerImpl;
26
+ let createMaker: () => void;
27
+
28
+ const dir = '/my/test/dir/out';
29
+ const makeDir = path.resolve('/foo/bar/make');
30
+ const appName = 'My Test App';
31
+ const targetArch = process.arch;
32
+ const packageJSON = { version: '1.2.3' };
33
+
34
+ beforeEach(() => {
35
+ ensureDirectoryStub = stub().returns(Promise.resolve());
36
+ eidStub = stub().returns({ packagePaths: ['/foo/bar.deb'] });
37
+ config = {};
38
+
39
+ MakerDeb = proxyquire.noPreserveCache().noCallThru().load('../src/MakerDeb', {
40
+ 'electron-installer-debian': eidStub,
41
+ }).default;
42
+ createMaker = () => {
43
+ maker = new MakerDeb(config, []);
44
+ maker.ensureDirectory = ensureDirectoryStub;
45
+ maker.prepareConfig(targetArch as ForgeArch);
46
+ };
47
+ createMaker();
48
+ });
49
+
50
+ it('should pass through correct defaults', async () => {
51
+ await (maker.make as MakeFunction)({
52
+ dir,
53
+ makeDir,
54
+ appName,
55
+ targetArch,
56
+ packageJSON,
57
+ });
58
+ const opts = eidStub.firstCall.args[0];
59
+ expect(opts).to.deep.equal({
60
+ arch: debianArch(process.arch as ForgeArch),
61
+ options: {},
62
+ src: dir,
63
+ dest: path.join(makeDir, 'deb', process.arch),
64
+ rename: undefined,
65
+ });
66
+ expect(maker.config).to.deep.equal(config);
67
+ });
68
+
69
+ it('should have config cascade correctly', async () => {
70
+ config = {
71
+ arch: 'overridden',
72
+ options: {
73
+ productName: 'Debian',
74
+ },
75
+ } as Record<string, unknown>;
76
+
77
+ createMaker();
78
+
79
+ await (maker.make as MakeFunction)({
80
+ dir,
81
+ makeDir,
82
+ appName,
83
+ targetArch,
84
+ packageJSON,
85
+ });
86
+ const opts = eidStub.firstCall.args[0];
87
+ expect(opts).to.deep.equal({
88
+ arch: debianArch(process.arch as ForgeArch),
89
+ options: {
90
+ productName: 'Debian',
91
+ },
92
+ src: dir,
93
+ dest: path.join(makeDir, 'deb', process.arch),
94
+ rename: undefined,
95
+ });
96
+ });
97
+
98
+ describe('debianArch', () => {
99
+ it('should convert ia32 to i386', () => {
100
+ expect(debianArch('ia32')).to.equal('i386');
101
+ });
102
+
103
+ it('should convert x64 to amd64', () => {
104
+ expect(debianArch('x64')).to.equal('amd64');
105
+ });
106
+
107
+ it('should convert arm to armel', () => {
108
+ expect(debianArch('arm')).to.equal('armel');
109
+ });
110
+
111
+ it('should convert armv7l to armhf', () => {
112
+ expect(debianArch('armv7l')).to.equal('armhf');
113
+ });
114
+
115
+ it('should leave unknown values alone', () => {
116
+ expect(debianArch('foo' as ForgeArch)).to.equal('foo');
117
+ });
118
+ });
119
+ });
package/dist/Config.d.ts DELETED
@@ -1,140 +0,0 @@
1
- export interface MakerDebConfigOptions {
2
- /**
3
- * Name of the package (e.g. atom), used in the Package field of the control
4
- * specification.
5
- *
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
8
- * least two characters long and must start with an alphanumeric character.
9
- */
10
- name?: string;
11
- /**
12
- * Name of the application (e.g. Atom), used in the Name field of the desktop specification.
13
- */
14
- productName?: string;
15
- /**
16
- * Generic name of the application (e.g. Text Editor), used in the GenericName field of the
17
- * desktop specification.
18
- */
19
- genericName?: string;
20
- /**
21
- * Short description of the application, used in the Description field of the control
22
- * specification.
23
- */
24
- description?: string;
25
- /**
26
- * Long description of the application, used in the Description field of the control
27
- * specification.
28
- */
29
- productDescription?: string;
30
- /**
31
- * Version number of the package, used in the Version field of the control specification.
32
- */
33
- version?: string;
34
- /**
35
- * Revision number of the package, used in the Version field of the control specification.
36
- */
37
- revision?: string;
38
- /**
39
- * Application area into which the package has been classified.
40
- *
41
- * Possible sections. Generated on https://packages.debian.org/unstable/ with:
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?: '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';
51
- /**
52
- * How important is it to have the package installed.
53
- *
54
- * You can read more: https://www.debian.org/doc/debian-policy/#priorities
55
- */
56
- priority?: 'required' | 'important' | 'standard' | 'optional';
57
- /**
58
- * Estimate of the total amount of disk space required to install the named package,
59
- * used in the Installed-Size field of the control specification.
60
- */
61
- size?: number;
62
- /**
63
- * Relationships to other packages, used in the Depends field of the control specification.
64
- */
65
- depends?: string[];
66
- /**
67
- * Relationships to other packages, used in the Recommends field of the control specification.
68
- */
69
- recommends?: string[];
70
- /**
71
- * Relationships to other packages, used in the Suggests field of the control specification.
72
- */
73
- suggests?: string[];
74
- /**
75
- * Relationships to other packages, used in the Enhances field of the control specification.
76
- */
77
- enhances?: string[];
78
- /**
79
- * Relationships to other packages, used in the Pre-Depends field of the control specification.
80
- */
81
- preDepends?: string[];
82
- /**
83
- * Maintainer of the package, used in the Maintainer field of the control specification.
84
- */
85
- maintainer?: string;
86
- /**
87
- * URL of the homepage for the package, used in the Homepage field of the control specification.
88
- */
89
- homepage?: string;
90
- /**
91
- * Relative path to the executable that will act as binary for the application, used in the Exec
92
- * field of the desktop specification.
93
- *
94
- * Defaults to options.name
95
- */
96
- bin?: string;
97
- /**
98
- * Path to a single image that will act as icon for the application:
99
- */
100
- icon?: string;
101
- /**
102
- * Categories in which the application should be shown in a menu, used in the Categories field
103
- * of the desktop specification.
104
- *
105
- * Generated on https://specifications.freedesktop.org/menu-spec/latest/apa.html with:
106
- *
107
- * `(${$$('.informaltable tr td:first-child').map(td => `'$\{td.innerText\}'`).join(' | ')})[]`
108
- */
109
- categories?: ('AudioVideo' | 'Audio' | 'Video' | 'Development' | 'Education' | 'Game' | 'Graphics' | 'Network' | 'Office' | 'Science' | 'Settings' | 'System' | 'Utility')[];
110
- /**
111
- * MIME types the application is able to open, used in the MimeType field of the desktop
112
- * specification.
113
- */
114
- mimeType?: string[];
115
- /**
116
- * You can use these to quieten lintian.
117
- */
118
- lintianOverrides?: string[];
119
- /**
120
- * Path to package maintainer scripts with their corresponding name, used in the installation
121
- * procedure.
122
- *
123
- * Read More:
124
- * https://www.debian.org/doc/debian-policy/#package-maintainer-scripts-and-installation-procedure
125
- */
126
- scripts?: {
127
- preinst?: string;
128
- postinst?: string;
129
- prerm?: string;
130
- postrm?: string;
131
- };
132
- /**
133
- * The absolute path to a custom template for the generated FreeDesktop.org desktop entry file.
134
- */
135
- desktopTemplate?: string;
136
- }
137
- export interface MakerDebConfig {
138
- options?: MakerDebConfigOptions;
139
- }
140
- //# sourceMappingURL=Config.d.ts.map
@@ -1 +0,0 @@
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,CAAC;IAC5B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;I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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 DELETED
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
-
6
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
@@ -1,13 +0,0 @@
1
- import { MakerBase, MakerOptions } from '@electron-forge/maker-base';
2
- import { ForgeArch, ForgePlatform } from '@electron-forge/shared-types';
3
- import { MakerDebConfig } from './Config';
4
- export declare function debianArch(nodeArch: ForgeArch): string;
5
- export default class MakerDeb extends MakerBase<MakerDebConfig> {
6
- name: string;
7
- defaultPlatforms: ForgePlatform[];
8
- requiredExternalBinaries: string[];
9
- isSupportedOnCurrentPlatform(): boolean;
10
- make({ dir, makeDir, targetArch }: MakerOptions): Promise<string[]>;
11
- }
12
- export { MakerDeb, MakerDebConfig };
13
- //# sourceMappingURL=MakerDeb.d.ts.map
@@ -1 +0,0 @@
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 DELETED
@@ -1,69 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "MakerDebConfig", {
6
- enumerable: true,
7
- get: function() {
8
- return _config.MakerDebConfig;
9
- }
10
- });
11
- exports.debianArch = debianArch;
12
- exports.MakerDeb = exports.default = void 0;
13
- var _path = _interopRequireDefault(require("path"));
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
- }
21
- function debianArch(nodeArch) {
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
- }
34
- }
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
- }
65
- }
66
- exports.default = MakerDeb;
67
- exports.MakerDeb = MakerDeb;
68
-
69
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9NYWtlckRlYi50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgcGF0aCBmcm9tICdwYXRoJztcblxuaW1wb3J0IHsgTWFrZXJCYXNlLCBNYWtlck9wdGlvbnMgfSBmcm9tICdAZWxlY3Ryb24tZm9yZ2UvbWFrZXItYmFzZSc7XG5pbXBvcnQgeyBGb3JnZUFyY2gsIEZvcmdlUGxhdGZvcm0gfSBmcm9tICdAZWxlY3Ryb24tZm9yZ2Uvc2hhcmVkLXR5cGVzJztcblxuaW1wb3J0IHsgTWFrZXJEZWJDb25maWcgfSBmcm9tICcuL0NvbmZpZyc7XG5cbmV4cG9ydCBmdW5jdGlvbiBkZWJpYW5BcmNoKG5vZGVBcmNoOiBGb3JnZUFyY2gpOiBzdHJ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