@electron-forge/shared-types 6.0.0 → 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 +19 -0
- package/package.json +7 -5
- package/src/index.ts +219 -0
- package/tsconfig.json +1 -5
- package/dist/index.d.ts +0 -181
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -6
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/shared-types",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.2",
|
|
4
4
|
"description": "Shared types across Electron Forge",
|
|
5
5
|
"repository": "https://github.com/electron/forge",
|
|
6
6
|
"author": "Samuel Attard",
|
|
@@ -8,13 +8,15 @@
|
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"typings": "dist/index.d.ts",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@electron-forge/async-ora": "6.0.0",
|
|
12
11
|
"@electron/rebuild": "^3.2.10",
|
|
13
12
|
"electron-packager": "^17.1.1",
|
|
14
|
-
"listr2": "^5.0.3"
|
|
15
|
-
"ora": "^5.0.0"
|
|
13
|
+
"listr2": "^5.0.3"
|
|
16
14
|
},
|
|
17
15
|
"engines": {
|
|
18
16
|
"node": ">= 14.17.5"
|
|
19
|
-
}
|
|
17
|
+
},
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
21
|
+
"gitHead": "11cf4b58359c9881c05c06e0d62be575a0ed70d1"
|
|
20
22
|
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { ChildProcess } from 'child_process';
|
|
2
|
+
|
|
3
|
+
import { RebuildOptions } from '@electron/rebuild';
|
|
4
|
+
import { ArchOption, Options as ElectronPackagerOptions, TargetPlatform } from 'electron-packager';
|
|
5
|
+
import { ListrDefaultRenderer, ListrTask, ListrTaskWrapper } from 'listr2';
|
|
6
|
+
|
|
7
|
+
export type ForgeListrTask<T> = ListrTaskWrapper<T, ListrDefaultRenderer>;
|
|
8
|
+
export type ElectronProcess = ChildProcess & { restarted: boolean };
|
|
9
|
+
|
|
10
|
+
export type ForgePlatform = TargetPlatform;
|
|
11
|
+
export type ForgeArch = ArchOption;
|
|
12
|
+
export type ForgeConfigPublisher = IForgeResolvablePublisher | IForgePublisher;
|
|
13
|
+
export type ForgeConfigMaker = IForgeResolvableMaker | IForgeMaker;
|
|
14
|
+
export type ForgeConfigPlugin = IForgeResolvablePlugin | IForgePlugin;
|
|
15
|
+
|
|
16
|
+
export interface ForgeSimpleHookSignatures {
|
|
17
|
+
generateAssets: [platform: ForgePlatform, version: ForgeArch];
|
|
18
|
+
postStart: [appProcess: ElectronProcess];
|
|
19
|
+
prePackage: [platform: ForgePlatform, version: ForgeArch];
|
|
20
|
+
packageAfterCopy: [buildPath: string, electronVersion: string, platform: ForgePlatform, arch: ForgeArch];
|
|
21
|
+
packageAfterPrune: [buildPath: string, electronVersion: string, platform: ForgePlatform, arch: ForgeArch];
|
|
22
|
+
packageAfterExtract: [buildPath: string, electronVersion: string, platform: ForgePlatform, arch: ForgeArch];
|
|
23
|
+
postPackage: [
|
|
24
|
+
packageResult: {
|
|
25
|
+
platform: ForgePlatform;
|
|
26
|
+
arch: ForgeArch;
|
|
27
|
+
outputPaths: string[];
|
|
28
|
+
}
|
|
29
|
+
];
|
|
30
|
+
preMake: [];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface ForgeMutatingHookSignatures {
|
|
34
|
+
postMake: [makeResults: ForgeMakeResult[]];
|
|
35
|
+
resolveForgeConfig: [currentConfig: ResolvedForgeConfig];
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
37
|
+
readPackageJson: [packageJson: Record<string, any>];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export type ForgeHookName = keyof (ForgeSimpleHookSignatures & ForgeMutatingHookSignatures);
|
|
41
|
+
export type ForgeSimpleHookFn<Hook extends keyof ForgeSimpleHookSignatures> = (
|
|
42
|
+
forgeConfig: ResolvedForgeConfig,
|
|
43
|
+
...args: ForgeSimpleHookSignatures[Hook]
|
|
44
|
+
) => Promise<void>;
|
|
45
|
+
export type ForgeMutatingHookFn<Hook extends keyof ForgeMutatingHookSignatures> = (
|
|
46
|
+
forgeConfig: ResolvedForgeConfig,
|
|
47
|
+
...args: ForgeMutatingHookSignatures[Hook]
|
|
48
|
+
) => Promise<ForgeMutatingHookSignatures[Hook][0] | undefined>;
|
|
49
|
+
export type ForgeHookFn<Hook extends ForgeHookName> = Hook extends keyof ForgeSimpleHookSignatures
|
|
50
|
+
? ForgeSimpleHookFn<Hook>
|
|
51
|
+
: Hook extends keyof ForgeMutatingHookSignatures
|
|
52
|
+
? ForgeMutatingHookFn<Hook>
|
|
53
|
+
: never;
|
|
54
|
+
export type ForgeHookMap = {
|
|
55
|
+
[S in ForgeHookName]?: ForgeHookFn<S>;
|
|
56
|
+
};
|
|
57
|
+
export type ForgeMultiHookMap = {
|
|
58
|
+
[S in ForgeHookName]?: ForgeHookFn<S> | ForgeHookFn<S>[];
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export interface IForgePluginInterface {
|
|
62
|
+
triggerHook<Hook extends keyof ForgeSimpleHookSignatures>(hookName: Hook, hookArgs: ForgeSimpleHookSignatures[Hook]): Promise<void>;
|
|
63
|
+
getHookListrTasks<Hook extends keyof ForgeSimpleHookSignatures>(
|
|
64
|
+
hookName: Hook,
|
|
65
|
+
hookArgs: ForgeSimpleHookSignatures[Hook]
|
|
66
|
+
): Promise<ForgeListrTaskDefinition[]>;
|
|
67
|
+
triggerMutatingHook<Hook extends keyof ForgeMutatingHookSignatures>(
|
|
68
|
+
hookName: Hook,
|
|
69
|
+
item: ForgeMutatingHookSignatures[Hook][0]
|
|
70
|
+
): Promise<ForgeMutatingHookSignatures[Hook][0]>;
|
|
71
|
+
overrideStartLogic(opts: StartOptions): Promise<StartResult>;
|
|
72
|
+
}
|
|
73
|
+
/* eslint-enable @typescript-eslint/no-explicit-any */
|
|
74
|
+
|
|
75
|
+
export type ForgeRebuildOptions = Omit<RebuildOptions, 'buildPath' | 'electronVersion' | 'arch'>;
|
|
76
|
+
export type ForgePackagerOptions = Omit<ElectronPackagerOptions, 'dir' | 'arch' | 'platform' | 'out' | 'electronVersion'>;
|
|
77
|
+
export interface ResolvedForgeConfig {
|
|
78
|
+
/**
|
|
79
|
+
* A string to uniquely identify artifacts of this build, will be appended
|
|
80
|
+
* to the out dir to generate a nested directory. E.g. out/current-timestamp
|
|
81
|
+
*
|
|
82
|
+
* If a function is provided, it must synchronously return the buildIdentifier
|
|
83
|
+
*/
|
|
84
|
+
buildIdentifier?: string | (() => string);
|
|
85
|
+
hooks?: ForgeHookMap;
|
|
86
|
+
/**
|
|
87
|
+
* @internal
|
|
88
|
+
*/
|
|
89
|
+
pluginInterface: IForgePluginInterface;
|
|
90
|
+
/**
|
|
91
|
+
* An array of Forge plugins or a tuple consisting of [pluginName, pluginOptions]
|
|
92
|
+
*/
|
|
93
|
+
plugins: ForgeConfigPlugin[];
|
|
94
|
+
rebuildConfig: ForgeRebuildOptions;
|
|
95
|
+
packagerConfig: ForgePackagerOptions;
|
|
96
|
+
makers: ForgeConfigMaker[];
|
|
97
|
+
publishers: ForgeConfigPublisher[];
|
|
98
|
+
}
|
|
99
|
+
export type ForgeConfig = Partial<Omit<ResolvedForgeConfig, 'pluginInterface'>>;
|
|
100
|
+
export interface ForgeMakeResult {
|
|
101
|
+
/**
|
|
102
|
+
* An array of paths to artifacts generated for this make run
|
|
103
|
+
*/
|
|
104
|
+
artifacts: string[];
|
|
105
|
+
/**
|
|
106
|
+
* The state of the package.json file when the make happened
|
|
107
|
+
*/
|
|
108
|
+
packageJSON: any; // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
109
|
+
/**
|
|
110
|
+
* The platform this make run was for
|
|
111
|
+
*/
|
|
112
|
+
platform: ForgePlatform;
|
|
113
|
+
/**
|
|
114
|
+
* The arch this make run was for
|
|
115
|
+
*/
|
|
116
|
+
arch: ForgeArch;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export interface IForgeResolvablePlugin {
|
|
120
|
+
name: string;
|
|
121
|
+
config?: any; // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export interface IForgePlugin {
|
|
125
|
+
/** @internal */
|
|
126
|
+
__isElectronForgePlugin: boolean;
|
|
127
|
+
name: string;
|
|
128
|
+
|
|
129
|
+
init(dir: string, forgeConfig: ResolvedForgeConfig): void;
|
|
130
|
+
getHooks?(): ForgeMultiHookMap;
|
|
131
|
+
startLogic?(opts: StartOptions): Promise<StartResult>;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export interface IForgeResolvableMaker {
|
|
135
|
+
name: string;
|
|
136
|
+
config: any; // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
137
|
+
enabled?: boolean;
|
|
138
|
+
platforms?: ForgePlatform[] | null;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export interface IForgeMaker {
|
|
142
|
+
/** @internal */
|
|
143
|
+
__isElectronForgeMaker: boolean;
|
|
144
|
+
readonly platforms?: ForgePlatform[];
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export interface IForgeResolvablePublisher {
|
|
148
|
+
name: string;
|
|
149
|
+
platforms?: ForgePlatform[] | null;
|
|
150
|
+
config?: any; // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export interface IForgePublisher {
|
|
154
|
+
/** @internal */
|
|
155
|
+
__isElectronForgePublisher: boolean;
|
|
156
|
+
readonly platforms?: ForgePlatform[];
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export interface StartOptions {
|
|
160
|
+
/**
|
|
161
|
+
* The path to the electron forge project to run
|
|
162
|
+
*/
|
|
163
|
+
dir?: string;
|
|
164
|
+
/**
|
|
165
|
+
* The path (relative to dir) to the electron app to run relative to the project directory
|
|
166
|
+
*/
|
|
167
|
+
appPath?: string;
|
|
168
|
+
/**
|
|
169
|
+
* Whether to use sensible defaults or prompt the user visually
|
|
170
|
+
*/
|
|
171
|
+
interactive?: boolean;
|
|
172
|
+
/**
|
|
173
|
+
* Enables advanced internal Electron debug calls
|
|
174
|
+
*/
|
|
175
|
+
enableLogging?: boolean;
|
|
176
|
+
/**
|
|
177
|
+
* Arguments to pass through to the launched Electron application
|
|
178
|
+
*/
|
|
179
|
+
args?: (string | number)[];
|
|
180
|
+
/**
|
|
181
|
+
* Runs the Electron process as if it were node, disables all Electron API's
|
|
182
|
+
*/
|
|
183
|
+
runAsNode?: boolean;
|
|
184
|
+
/**
|
|
185
|
+
* Enables the node inspector, you can connect to this from chrome://inspect
|
|
186
|
+
*/
|
|
187
|
+
inspect?: boolean;
|
|
188
|
+
/**
|
|
189
|
+
* Enables the node inspector, you can connect to this from chrome://inspect
|
|
190
|
+
* Pauses the execution on first JavaScript line until debugger connects.
|
|
191
|
+
*/
|
|
192
|
+
inspectBrk?: boolean;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export type InnerStartResult = ElectronProcess | string | string[] | false;
|
|
196
|
+
export type StartResult = InnerStartResult | { tasks: ForgeListrTaskDefinition[]; result: InnerStartResult };
|
|
197
|
+
|
|
198
|
+
export interface InitTemplateOptions {
|
|
199
|
+
copyCIFiles?: boolean;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
203
|
+
export type ForgeListrTaskDefinition = ListrTask<never>;
|
|
204
|
+
|
|
205
|
+
export interface ForgeTemplate {
|
|
206
|
+
requiredForgeVersion?: string;
|
|
207
|
+
dependencies?: string[];
|
|
208
|
+
devDependencies?: string[];
|
|
209
|
+
initializeTemplate?: (dir: string, options: InitTemplateOptions) => Promise<void | ForgeListrTaskDefinition[]>;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export type PackagePerson =
|
|
213
|
+
| undefined
|
|
214
|
+
| string
|
|
215
|
+
| {
|
|
216
|
+
name: string;
|
|
217
|
+
email?: string;
|
|
218
|
+
url?: string;
|
|
219
|
+
};
|
package/tsconfig.json
CHANGED
package/dist/index.d.ts
DELETED
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { ChildProcess } from 'child_process';
|
|
3
|
-
import { OraImpl } from '@electron-forge/async-ora';
|
|
4
|
-
import { RebuildOptions } from '@electron/rebuild';
|
|
5
|
-
import { ArchOption, Options as ElectronPackagerOptions, TargetPlatform } from 'electron-packager';
|
|
6
|
-
import { ListrDefaultRenderer, ListrTask, ListrTaskWrapper } from 'listr2';
|
|
7
|
-
export declare type ForgeListrTask<T> = ListrTaskWrapper<T, ListrDefaultRenderer>;
|
|
8
|
-
export declare type ElectronProcess = ChildProcess & {
|
|
9
|
-
restarted: boolean;
|
|
10
|
-
};
|
|
11
|
-
export declare type ForgePlatform = TargetPlatform;
|
|
12
|
-
export declare type ForgeArch = ArchOption;
|
|
13
|
-
export declare type ForgeConfigPublisher = IForgeResolvablePublisher | IForgePublisher;
|
|
14
|
-
export declare type ForgeConfigMaker = IForgeResolvableMaker | IForgeMaker;
|
|
15
|
-
export declare type ForgeConfigPlugin = IForgeResolvablePlugin | IForgePlugin;
|
|
16
|
-
export interface ForgeSimpleHookSignatures {
|
|
17
|
-
generateAssets: [platform: ForgePlatform, version: ForgeArch];
|
|
18
|
-
postStart: [appProcess: ElectronProcess];
|
|
19
|
-
prePackage: [platform: ForgePlatform, version: ForgeArch];
|
|
20
|
-
packageAfterCopy: [buildPath: string, electronVersion: string, platform: ForgePlatform, arch: ForgeArch];
|
|
21
|
-
packageAfterPrune: [buildPath: string, electronVersion: string, platform: ForgePlatform, arch: ForgeArch];
|
|
22
|
-
packageAfterExtract: [buildPath: string, electronVersion: string, platform: ForgePlatform, arch: ForgeArch];
|
|
23
|
-
postPackage: [
|
|
24
|
-
packageResult: {
|
|
25
|
-
platform: ForgePlatform;
|
|
26
|
-
arch: ForgeArch;
|
|
27
|
-
outputPaths: string[];
|
|
28
|
-
spinner?: OraImpl;
|
|
29
|
-
}
|
|
30
|
-
];
|
|
31
|
-
preMake: [];
|
|
32
|
-
}
|
|
33
|
-
export interface ForgeMutatingHookSignatures {
|
|
34
|
-
postMake: [makeResults: ForgeMakeResult[]];
|
|
35
|
-
resolveForgeConfig: [currentConfig: ResolvedForgeConfig];
|
|
36
|
-
readPackageJson: [packageJson: Record<string, any>];
|
|
37
|
-
}
|
|
38
|
-
export declare type ForgeHookName = keyof (ForgeSimpleHookSignatures & ForgeMutatingHookSignatures);
|
|
39
|
-
export declare type ForgeSimpleHookFn<Hook extends keyof ForgeSimpleHookSignatures> = (forgeConfig: ResolvedForgeConfig, ...args: ForgeSimpleHookSignatures[Hook]) => Promise<void>;
|
|
40
|
-
export declare type ForgeMutatingHookFn<Hook extends keyof ForgeMutatingHookSignatures> = (forgeConfig: ResolvedForgeConfig, ...args: ForgeMutatingHookSignatures[Hook]) => Promise<ForgeMutatingHookSignatures[Hook][0] | undefined>;
|
|
41
|
-
export declare type ForgeHookFn<Hook extends ForgeHookName> = Hook extends keyof ForgeSimpleHookSignatures ? ForgeSimpleHookFn<Hook> : Hook extends keyof ForgeMutatingHookSignatures ? ForgeMutatingHookFn<Hook> : never;
|
|
42
|
-
export declare type ForgeHookMap = {
|
|
43
|
-
[S in ForgeHookName]?: ForgeHookFn<S>;
|
|
44
|
-
};
|
|
45
|
-
export interface IForgePluginInterface {
|
|
46
|
-
triggerHook<Hook extends keyof ForgeSimpleHookSignatures>(hookName: Hook, hookArgs: ForgeSimpleHookSignatures[Hook]): Promise<void>;
|
|
47
|
-
triggerMutatingHook<Hook extends keyof ForgeMutatingHookSignatures>(hookName: Hook, item: ForgeMutatingHookSignatures[Hook][0]): Promise<ForgeMutatingHookSignatures[Hook][0]>;
|
|
48
|
-
overrideStartLogic(opts: StartOptions): Promise<StartResult>;
|
|
49
|
-
}
|
|
50
|
-
export declare type ForgeRebuildOptions = Omit<RebuildOptions, 'buildPath' | 'electronVersion' | 'arch'>;
|
|
51
|
-
export declare type ForgePackagerOptions = Omit<ElectronPackagerOptions, 'dir' | 'arch' | 'platform' | 'out' | 'electronVersion'>;
|
|
52
|
-
export interface ResolvedForgeConfig {
|
|
53
|
-
/**
|
|
54
|
-
* A string to uniquely identify artifacts of this build, will be appended
|
|
55
|
-
* to the out dir to generate a nested directory. E.g. out/current-timestamp
|
|
56
|
-
*
|
|
57
|
-
* If a function is provided, it must synchronously return the buildIdentifier
|
|
58
|
-
*/
|
|
59
|
-
buildIdentifier?: string | (() => string);
|
|
60
|
-
hooks?: ForgeHookMap;
|
|
61
|
-
/**
|
|
62
|
-
* @internal
|
|
63
|
-
*/
|
|
64
|
-
pluginInterface: IForgePluginInterface;
|
|
65
|
-
/**
|
|
66
|
-
* An array of Forge plugins or a tuple consisting of [pluginName, pluginOptions]
|
|
67
|
-
*/
|
|
68
|
-
plugins: ForgeConfigPlugin[];
|
|
69
|
-
rebuildConfig: ForgeRebuildOptions;
|
|
70
|
-
packagerConfig: ForgePackagerOptions;
|
|
71
|
-
makers: ForgeConfigMaker[];
|
|
72
|
-
publishers: ForgeConfigPublisher[];
|
|
73
|
-
}
|
|
74
|
-
export declare type ForgeConfig = Partial<Omit<ResolvedForgeConfig, 'pluginInterface'>>;
|
|
75
|
-
export interface ForgeMakeResult {
|
|
76
|
-
/**
|
|
77
|
-
* An array of paths to artifacts generated for this make run
|
|
78
|
-
*/
|
|
79
|
-
artifacts: string[];
|
|
80
|
-
/**
|
|
81
|
-
* The state of the package.json file when the make happened
|
|
82
|
-
*/
|
|
83
|
-
packageJSON: any;
|
|
84
|
-
/**
|
|
85
|
-
* The platform this make run was for
|
|
86
|
-
*/
|
|
87
|
-
platform: ForgePlatform;
|
|
88
|
-
/**
|
|
89
|
-
* The arch this make run was for
|
|
90
|
-
*/
|
|
91
|
-
arch: ForgeArch;
|
|
92
|
-
}
|
|
93
|
-
export interface IForgeResolvablePlugin {
|
|
94
|
-
name: string;
|
|
95
|
-
config?: any;
|
|
96
|
-
}
|
|
97
|
-
export interface IForgePlugin {
|
|
98
|
-
/** @internal */
|
|
99
|
-
__isElectronForgePlugin: boolean;
|
|
100
|
-
name: string;
|
|
101
|
-
init(dir: string, forgeConfig: ResolvedForgeConfig): void;
|
|
102
|
-
getHooks?(): ForgeHookMap;
|
|
103
|
-
startLogic?(opts: StartOptions): Promise<StartResult>;
|
|
104
|
-
}
|
|
105
|
-
export interface IForgeResolvableMaker {
|
|
106
|
-
name: string;
|
|
107
|
-
config: any;
|
|
108
|
-
enabled?: boolean;
|
|
109
|
-
platforms?: ForgePlatform[] | null;
|
|
110
|
-
}
|
|
111
|
-
export interface IForgeMaker {
|
|
112
|
-
/** @internal */
|
|
113
|
-
__isElectronForgeMaker: boolean;
|
|
114
|
-
readonly platforms?: ForgePlatform[];
|
|
115
|
-
}
|
|
116
|
-
export interface IForgeResolvablePublisher {
|
|
117
|
-
name: string;
|
|
118
|
-
platforms?: ForgePlatform[] | null;
|
|
119
|
-
config?: any;
|
|
120
|
-
}
|
|
121
|
-
export interface IForgePublisher {
|
|
122
|
-
/** @internal */
|
|
123
|
-
__isElectronForgePublisher: boolean;
|
|
124
|
-
readonly platforms?: ForgePlatform[];
|
|
125
|
-
}
|
|
126
|
-
export interface StartOptions {
|
|
127
|
-
/**
|
|
128
|
-
* The path to the electron forge project to run
|
|
129
|
-
*/
|
|
130
|
-
dir?: string;
|
|
131
|
-
/**
|
|
132
|
-
* The path (relative to dir) to the electron app to run relative to the project directory
|
|
133
|
-
*/
|
|
134
|
-
appPath?: string;
|
|
135
|
-
/**
|
|
136
|
-
* Whether to use sensible defaults or prompt the user visually
|
|
137
|
-
*/
|
|
138
|
-
interactive?: boolean;
|
|
139
|
-
/**
|
|
140
|
-
* Enables advanced internal Electron debug calls
|
|
141
|
-
*/
|
|
142
|
-
enableLogging?: boolean;
|
|
143
|
-
/**
|
|
144
|
-
* Arguments to pass through to the launched Electron application
|
|
145
|
-
*/
|
|
146
|
-
args?: (string | number)[];
|
|
147
|
-
/**
|
|
148
|
-
* Runs the Electron process as if it were node, disables all Electron API's
|
|
149
|
-
*/
|
|
150
|
-
runAsNode?: boolean;
|
|
151
|
-
/**
|
|
152
|
-
* Enables the node inspector, you can connect to this from chrome://inspect
|
|
153
|
-
*/
|
|
154
|
-
inspect?: boolean;
|
|
155
|
-
/**
|
|
156
|
-
* Enables the node inspector, you can connect to this from chrome://inspect
|
|
157
|
-
* Pauses the execution on first JavaScript line until debugger connects.
|
|
158
|
-
*/
|
|
159
|
-
inspectBrk?: boolean;
|
|
160
|
-
}
|
|
161
|
-
export declare type InnerStartResult = ElectronProcess | string | string[] | false;
|
|
162
|
-
export declare type StartResult = InnerStartResult | {
|
|
163
|
-
tasks: ForgeListrTaskDefinition[];
|
|
164
|
-
result: InnerStartResult;
|
|
165
|
-
};
|
|
166
|
-
export interface InitTemplateOptions {
|
|
167
|
-
copyCIFiles?: boolean;
|
|
168
|
-
}
|
|
169
|
-
export declare type ForgeListrTaskDefinition = ListrTask<any>;
|
|
170
|
-
export interface ForgeTemplate {
|
|
171
|
-
requiredForgeVersion?: string;
|
|
172
|
-
dependencies?: string[];
|
|
173
|
-
devDependencies?: string[];
|
|
174
|
-
initializeTemplate?: (dir: string, options: InitTemplateOptions) => Promise<void | ForgeListrTaskDefinition[]>;
|
|
175
|
-
}
|
|
176
|
-
export declare type PackagePerson = undefined | string | {
|
|
177
|
-
name: string;
|
|
178
|
-
email?: string;
|
|
179
|
-
url?: string;
|
|
180
|
-
};
|
|
181
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,OAAO,IAAI,uBAAuB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnG,OAAO,EAAE,oBAAoB,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE3E,oBAAY,cAAc,CAAC,CAAC,IAAI,gBAAgB,CAAC,CAAC,EAA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