@electron-forge/shared-types 6.0.0-beta.6 → 6.0.0-beta.63
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/dist/index.d.ts +36 -17
- package/index.d.ts +135 -109
- package/package.json +7 -9
- package/tsconfig.json +26 -22
- package/doc/assets/css/main.css +0 -865
- package/doc/assets/css/main.css.map +0 -7
- package/doc/assets/images/icons.png +0 -0
- package/doc/assets/images/icons@2x.png +0 -0
- package/doc/assets/images/widgets.png +0 -0
- package/doc/assets/images/widgets@2x.png +0 -0
- package/doc/assets/js/main.js +0 -5
- package/doc/assets/js/search.js +0 -3
- package/doc/globals.html +0 -265
- package/doc/index.html +0 -267
- package/doc/interfaces/forgeconfig.html +0 -341
- package/doc/interfaces/forgemakeresult.html +0 -287
- package/doc/interfaces/iforgemaker.html +0 -239
- package/doc/interfaces/iforgeplugin.html +0 -334
- package/doc/interfaces/iforgeplugininterface.html +0 -268
- package/doc/interfaces/iforgepublisher.html +0 -239
- package/doc/interfaces/iforgeresolvablemaker.html +0 -253
- package/doc/interfaces/iforgeresolvablepublisher.html +0 -253
- package/doc/interfaces/startoptions.html +0 -344
- package/src/index.ts +0 -119
- package/tslint.json +0 -12
package/dist/index.d.ts
CHANGED
|
@@ -1,38 +1,42 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
/// <reference types="electron-packager" />
|
|
3
2
|
import { ChildProcess } from 'child_process';
|
|
4
|
-
import { Options } from 'electron-packager';
|
|
5
|
-
import { RebuildOptions } from 'electron-rebuild
|
|
6
|
-
export declare type
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
import { ArchOption, Options, TargetPlatform } from 'electron-packager';
|
|
4
|
+
import { RebuildOptions } from 'electron-rebuild';
|
|
5
|
+
export declare type ElectronProcess = ChildProcess & {
|
|
6
|
+
restarted: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare type ForgePlatform = TargetPlatform;
|
|
9
|
+
export declare type ForgeArch = ArchOption;
|
|
10
|
+
export declare type ForgeHookFn = (forgeConfig: ForgeConfig, ...args: any[]) => Promise<any>;
|
|
11
|
+
export declare type ForgeConfigPublisher = IForgeResolvablePublisher | IForgePublisher | string;
|
|
9
12
|
export interface IForgePluginInterface {
|
|
10
13
|
triggerHook(hookName: string, hookArgs: any[]): Promise<void>;
|
|
11
|
-
|
|
14
|
+
triggerMutatingHook<T>(hookName: string, item: T): Promise<any>;
|
|
15
|
+
overrideStartLogic(opts: StartOptions): Promise<StartResult>;
|
|
12
16
|
}
|
|
13
17
|
export interface ForgeConfig {
|
|
14
18
|
/**
|
|
15
19
|
* A string to uniquely identify artifacts of this build, will be appended
|
|
16
20
|
* to the out dir to generate a nested directory. E.g. out/current-timestamp
|
|
17
21
|
*
|
|
18
|
-
* If a function is provided it must
|
|
22
|
+
* If a function is provided, it must synchronously return the buildIdentifier
|
|
19
23
|
*/
|
|
20
24
|
buildIdentifier?: string | (() => string);
|
|
21
25
|
hooks?: {
|
|
22
26
|
[hookName: string]: ForgeHookFn;
|
|
23
27
|
};
|
|
24
28
|
/**
|
|
25
|
-
* @
|
|
29
|
+
* @internal
|
|
26
30
|
*/
|
|
27
31
|
pluginInterface: IForgePluginInterface;
|
|
28
32
|
/**
|
|
29
|
-
* An array of
|
|
33
|
+
* An array of Forge plugins or a tuple consisting of [pluginName, pluginOptions]
|
|
30
34
|
*/
|
|
31
|
-
plugins: (IForgePlugin | [string,
|
|
32
|
-
electronRebuildConfig: RebuildOptions
|
|
33
|
-
packagerConfig: Options
|
|
35
|
+
plugins: (IForgePlugin | [string, Record<string, unknown>])[];
|
|
36
|
+
electronRebuildConfig: Partial<RebuildOptions>;
|
|
37
|
+
packagerConfig: Partial<Options>;
|
|
34
38
|
makers: (IForgeResolvableMaker | IForgeMaker)[];
|
|
35
|
-
publishers:
|
|
39
|
+
publishers: ForgeConfigPublisher[];
|
|
36
40
|
}
|
|
37
41
|
export interface ForgeMakeResult {
|
|
38
42
|
/**
|
|
@@ -57,7 +61,7 @@ export interface IForgePlugin {
|
|
|
57
61
|
name: string;
|
|
58
62
|
init(dir: string, forgeConfig: ForgeConfig): void;
|
|
59
63
|
getHook?(hookName: string): ForgeHookFn | null;
|
|
60
|
-
startLogic?(opts: StartOptions): Promise<
|
|
64
|
+
startLogic?(opts: StartOptions): Promise<StartResult>;
|
|
61
65
|
}
|
|
62
66
|
export interface IForgeResolvableMaker {
|
|
63
67
|
name: string;
|
|
@@ -66,7 +70,7 @@ export interface IForgeResolvableMaker {
|
|
|
66
70
|
}
|
|
67
71
|
export interface IForgeMaker {
|
|
68
72
|
__isElectronForgeMaker: boolean;
|
|
69
|
-
platforms?:
|
|
73
|
+
readonly platforms?: ForgePlatform[];
|
|
70
74
|
}
|
|
71
75
|
export interface IForgeResolvablePublisher {
|
|
72
76
|
name: string;
|
|
@@ -75,7 +79,7 @@ export interface IForgeResolvablePublisher {
|
|
|
75
79
|
}
|
|
76
80
|
export interface IForgePublisher {
|
|
77
81
|
__isElectronForgePublisher: boolean;
|
|
78
|
-
platforms?:
|
|
82
|
+
readonly platforms?: ForgePlatform[];
|
|
79
83
|
}
|
|
80
84
|
export interface StartOptions {
|
|
81
85
|
/**
|
|
@@ -107,3 +111,18 @@ export interface StartOptions {
|
|
|
107
111
|
*/
|
|
108
112
|
inspect?: boolean;
|
|
109
113
|
}
|
|
114
|
+
export declare type StartResult = ElectronProcess | string | string[] | false;
|
|
115
|
+
export interface InitTemplateOptions {
|
|
116
|
+
copyCIFiles?: boolean;
|
|
117
|
+
}
|
|
118
|
+
export interface ForgeTemplate {
|
|
119
|
+
requiredForgeVersion?: string;
|
|
120
|
+
dependencies?: string[];
|
|
121
|
+
devDependencies?: string[];
|
|
122
|
+
initializeTemplate?: (dir: string, options: InitTemplateOptions) => Promise<void>;
|
|
123
|
+
}
|
|
124
|
+
export declare type PackagePerson = undefined | string | {
|
|
125
|
+
name: string;
|
|
126
|
+
email?: string;
|
|
127
|
+
url?: string;
|
|
128
|
+
};
|
package/index.d.ts
CHANGED
|
@@ -1,119 +1,145 @@
|
|
|
1
|
-
/* tslint:disable ter-indent */
|
|
2
|
-
|
|
3
1
|
import { ChildProcess } from 'child_process';
|
|
4
|
-
|
|
5
|
-
import {
|
|
2
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
3
|
+
import { ArchOption, Options, TargetPlatform } from 'electron-packager';
|
|
4
|
+
import { RebuildOptions } from 'electron-rebuild';
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
6
|
+
export type ElectronProcess = ChildProcess & { restarted: boolean };
|
|
7
|
+
|
|
8
|
+
export type ForgePlatform = TargetPlatform;
|
|
9
|
+
export type ForgeArch = ArchOption;
|
|
10
|
+
// Why: hooks have any number/kind of args/return values
|
|
11
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
12
|
+
export type ForgeHookFn = (forgeConfig: ForgeConfig, ...args: any[]) => Promise<any>;
|
|
13
|
+
export type ForgeConfigPublisher = IForgeResolvablePublisher | IForgePublisher | string;
|
|
14
|
+
export interface IForgePluginInterface {
|
|
15
|
+
triggerHook(hookName: string, hookArgs: any[]): Promise<void>;
|
|
16
|
+
triggerMutatingHook<T>(hookName: string, item: T): Promise<any>;
|
|
17
|
+
overrideStartLogic(opts: StartOptions): Promise<StartResult>;
|
|
18
|
+
}
|
|
19
|
+
/* eslint-enable @typescript-eslint/no-explicit-any */
|
|
20
|
+
export interface ForgeConfig {
|
|
21
|
+
/**
|
|
22
|
+
* A string to uniquely identify artifacts of this build, will be appended
|
|
23
|
+
* to the out dir to generate a nested directory. E.g. out/current-timestamp
|
|
24
|
+
*
|
|
25
|
+
* If a function is provided, it must synchronously return the buildIdentifier
|
|
26
|
+
*/
|
|
27
|
+
buildIdentifier?: string | (() => string);
|
|
28
|
+
hooks?: {
|
|
29
|
+
[hookName: string]: ForgeHookFn;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
pluginInterface: IForgePluginInterface;
|
|
35
|
+
/**
|
|
36
|
+
* An array of Forge plugins or a tuple consisting of [pluginName, pluginOptions]
|
|
37
|
+
*/
|
|
38
|
+
plugins: (IForgePlugin | [string, Record<string, unknown>])[];
|
|
39
|
+
electronRebuildConfig: Partial<RebuildOptions>;
|
|
40
|
+
packagerConfig: Partial<Options>;
|
|
41
|
+
makers: (IForgeResolvableMaker | IForgeMaker)[];
|
|
42
|
+
publishers: ForgeConfigPublisher[];
|
|
43
|
+
}
|
|
44
|
+
export interface ForgeMakeResult {
|
|
45
|
+
/**
|
|
46
|
+
* An array of paths to artifacts generated for this make run
|
|
47
|
+
*/
|
|
48
|
+
artifacts: string[];
|
|
49
|
+
/**
|
|
50
|
+
* The state of the package.json file when the make happened
|
|
51
|
+
*/
|
|
52
|
+
packageJSON: any; // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
53
|
+
/**
|
|
54
|
+
* The platform this make run was for
|
|
55
|
+
*/
|
|
56
|
+
platform: ForgePlatform;
|
|
57
|
+
/**
|
|
58
|
+
* The arch this make run was for
|
|
59
|
+
*/
|
|
60
|
+
arch: ForgeArch;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface IForgePlugin {
|
|
64
|
+
__isElectronForgePlugin: boolean;
|
|
65
|
+
name: string;
|
|
66
|
+
|
|
67
|
+
init(dir: string, forgeConfig: ForgeConfig): void;
|
|
68
|
+
getHook?(hookName: string): ForgeHookFn | null;
|
|
69
|
+
startLogic?(opts: StartOptions): Promise<StartResult>;
|
|
70
|
+
}
|
|
57
71
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
72
|
+
export interface IForgeResolvableMaker {
|
|
73
|
+
name: string;
|
|
74
|
+
platforms: ForgePlatform[] | null;
|
|
75
|
+
config: any; // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
76
|
+
}
|
|
61
77
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
78
|
+
export interface IForgeMaker {
|
|
79
|
+
__isElectronForgeMaker: boolean;
|
|
80
|
+
readonly platforms?: ForgePlatform[];
|
|
81
|
+
}
|
|
66
82
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
83
|
+
export interface IForgeResolvablePublisher {
|
|
84
|
+
name: string;
|
|
85
|
+
platforms?: ForgePlatform[] | null;
|
|
86
|
+
config?: any; // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
87
|
+
}
|
|
72
88
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
89
|
+
export interface IForgePublisher {
|
|
90
|
+
__isElectronForgePublisher: boolean;
|
|
91
|
+
readonly platforms?: ForgePlatform[];
|
|
92
|
+
}
|
|
77
93
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
94
|
+
export interface StartOptions {
|
|
95
|
+
/**
|
|
96
|
+
* The path to the electron forge project to run
|
|
97
|
+
*/
|
|
98
|
+
dir?: string;
|
|
99
|
+
/**
|
|
100
|
+
* The path (relative to dir) to the electron app to run relative to the project directory
|
|
101
|
+
*/
|
|
102
|
+
appPath?: string;
|
|
103
|
+
/**
|
|
104
|
+
* Whether to use sensible defaults or prompt the user visually
|
|
105
|
+
*/
|
|
106
|
+
interactive?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Enables advanced internal Electron debug calls
|
|
109
|
+
*/
|
|
110
|
+
enableLogging?: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Arguments to pass through to the launched Electron application
|
|
113
|
+
*/
|
|
114
|
+
args?: (string | number)[];
|
|
115
|
+
/**
|
|
116
|
+
* Runs the Electron process as if it were node, disables all Electron API's
|
|
117
|
+
*/
|
|
118
|
+
runAsNode?: boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Enables the node inspector, you can connect to this from chrome://inspect
|
|
121
|
+
*/
|
|
122
|
+
inspect?: boolean;
|
|
123
|
+
}
|
|
83
124
|
|
|
84
|
-
|
|
85
|
-
__isElectronForgePublisher: boolean;
|
|
86
|
-
platforms?: undefined;
|
|
87
|
-
}
|
|
125
|
+
export type StartResult = ElectronProcess | string | string[] | false;
|
|
88
126
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
* The path to the electron forge project to run
|
|
92
|
-
*/
|
|
93
|
-
dir?: string;
|
|
94
|
-
/**
|
|
95
|
-
* The path (relative to dir) to the electron app to run relative to the project directory
|
|
96
|
-
*/
|
|
97
|
-
appPath?: string;
|
|
98
|
-
/**
|
|
99
|
-
* Whether to use sensible defaults or prompt the user visually
|
|
100
|
-
*/
|
|
101
|
-
interactive?: boolean;
|
|
102
|
-
/**
|
|
103
|
-
* Enables advanced internal Electron debug calls
|
|
104
|
-
*/
|
|
105
|
-
enableLogging?: boolean;
|
|
106
|
-
/**
|
|
107
|
-
* Arguments to pass through to the launched Electron application
|
|
108
|
-
*/
|
|
109
|
-
args?: (string | number)[];
|
|
110
|
-
/**
|
|
111
|
-
* Runs the Electron process as if it were node, disables all Electron API's
|
|
112
|
-
*/
|
|
113
|
-
runAsNode?: boolean;
|
|
114
|
-
/**
|
|
115
|
-
* Enables the node inspector, you can connect to this from chrome://inspect
|
|
116
|
-
*/
|
|
117
|
-
inspect?: boolean;
|
|
118
|
-
}
|
|
127
|
+
export interface InitTemplateOptions {
|
|
128
|
+
copyCIFiles?: boolean;
|
|
119
129
|
}
|
|
130
|
+
|
|
131
|
+
export interface ForgeTemplate {
|
|
132
|
+
requiredForgeVersion?: string;
|
|
133
|
+
dependencies?: string[];
|
|
134
|
+
devDependencies?: string[];
|
|
135
|
+
initializeTemplate?: (dir: string, options: InitTemplateOptions) => Promise<void>;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export type PackagePerson =
|
|
139
|
+
| undefined
|
|
140
|
+
| string
|
|
141
|
+
| {
|
|
142
|
+
name: string;
|
|
143
|
+
email?: string;
|
|
144
|
+
url?: string;
|
|
145
|
+
};
|
package/package.json
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@electron-forge/shared-types",
|
|
3
|
-
"version": "6.0.0-beta.
|
|
4
|
-
"description": "Shared types across
|
|
3
|
+
"version": "6.0.0-beta.63",
|
|
4
|
+
"description": "Shared types across Electron Forge",
|
|
5
5
|
"repository": "https://github.com/electron-userland/electron-forge",
|
|
6
6
|
"author": "Samuel Attard",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"typings": "index.d.ts",
|
|
10
|
-
"scripts": {
|
|
11
|
-
"test": "echo No Tests For Shared Types"
|
|
12
|
-
},
|
|
13
10
|
"dependencies": {
|
|
14
|
-
"@
|
|
15
|
-
"electron-
|
|
16
|
-
"
|
|
11
|
+
"@electron-forge/async-ora": "6.0.0-beta.63",
|
|
12
|
+
"electron-packager": "^15.4.0",
|
|
13
|
+
"electron-rebuild": "^3.2.6",
|
|
14
|
+
"ora": "^5.0.0"
|
|
17
15
|
},
|
|
18
16
|
"engines": {
|
|
19
|
-
"node": ">=
|
|
17
|
+
"node": ">= 12.13.0"
|
|
20
18
|
}
|
|
21
19
|
}
|
package/tsconfig.json
CHANGED
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"module": "commonjs",
|
|
4
|
+
"target": "es2019",
|
|
5
|
+
"outDir": "dist",
|
|
6
|
+
"lib": [
|
|
7
|
+
"dom",
|
|
8
|
+
"es2019"
|
|
9
|
+
],
|
|
10
|
+
"sourceMap": true,
|
|
11
|
+
"rootDir": ".",
|
|
12
|
+
"experimentalDecorators": true,
|
|
13
|
+
"strict": true,
|
|
14
|
+
"esModuleInterop": true,
|
|
15
|
+
"declaration": true,
|
|
16
|
+
"typeRoots": [
|
|
17
|
+
"../../../node_modules/@types",
|
|
18
|
+
"../../../typings"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"exclude": [
|
|
22
|
+
"node_modules",
|
|
23
|
+
"dist",
|
|
24
|
+
"test",
|
|
25
|
+
"index.ts"
|
|
26
|
+
]
|
|
27
|
+
}
|