@electron-forge/shared-types 6.0.0-beta.61 → 6.0.0-beta.62
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 +7 -6
- package/index.d.ts +22 -14
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -12,27 +12,27 @@ export declare type ForgeConfigPublisher = IForgeResolvablePublisher | IForgePub
|
|
|
12
12
|
export interface IForgePluginInterface {
|
|
13
13
|
triggerHook(hookName: string, hookArgs: any[]): Promise<void>;
|
|
14
14
|
triggerMutatingHook<T>(hookName: string, item: T): Promise<any>;
|
|
15
|
-
overrideStartLogic(opts:
|
|
15
|
+
overrideStartLogic(opts: StartOptions): Promise<StartResult>;
|
|
16
16
|
}
|
|
17
17
|
export interface ForgeConfig {
|
|
18
18
|
/**
|
|
19
19
|
* A string to uniquely identify artifacts of this build, will be appended
|
|
20
20
|
* to the out dir to generate a nested directory. E.g. out/current-timestamp
|
|
21
21
|
*
|
|
22
|
-
* If a function is provided it must
|
|
22
|
+
* If a function is provided, it must synchronously return the buildIdentifier
|
|
23
23
|
*/
|
|
24
24
|
buildIdentifier?: string | (() => string);
|
|
25
25
|
hooks?: {
|
|
26
26
|
[hookName: string]: ForgeHookFn;
|
|
27
27
|
};
|
|
28
28
|
/**
|
|
29
|
-
* @
|
|
29
|
+
* @internal
|
|
30
30
|
*/
|
|
31
31
|
pluginInterface: IForgePluginInterface;
|
|
32
32
|
/**
|
|
33
33
|
* An array of Forge plugins or a tuple consisting of [pluginName, pluginOptions]
|
|
34
34
|
*/
|
|
35
|
-
plugins: (IForgePlugin | [string,
|
|
35
|
+
plugins: (IForgePlugin | [string, Record<string, unknown>])[];
|
|
36
36
|
electronRebuildConfig: Partial<RebuildOptions>;
|
|
37
37
|
packagerConfig: Partial<Options>;
|
|
38
38
|
makers: (IForgeResolvableMaker | IForgeMaker)[];
|
|
@@ -61,7 +61,7 @@ export interface IForgePlugin {
|
|
|
61
61
|
name: string;
|
|
62
62
|
init(dir: string, forgeConfig: ForgeConfig): void;
|
|
63
63
|
getHook?(hookName: string): ForgeHookFn | null;
|
|
64
|
-
startLogic?(opts: StartOptions): Promise<
|
|
64
|
+
startLogic?(opts: StartOptions): Promise<StartResult>;
|
|
65
65
|
}
|
|
66
66
|
export interface IForgeResolvableMaker {
|
|
67
67
|
name: string;
|
|
@@ -111,6 +111,7 @@ export interface StartOptions {
|
|
|
111
111
|
*/
|
|
112
112
|
inspect?: boolean;
|
|
113
113
|
}
|
|
114
|
+
export declare type StartResult = ElectronProcess | string | string[] | false;
|
|
114
115
|
export interface InitTemplateOptions {
|
|
115
116
|
copyCIFiles?: boolean;
|
|
116
117
|
}
|
|
@@ -118,7 +119,7 @@ export interface ForgeTemplate {
|
|
|
118
119
|
requiredForgeVersion?: string;
|
|
119
120
|
dependencies?: string[];
|
|
120
121
|
devDependencies?: string[];
|
|
121
|
-
initializeTemplate?: (dir: string, options: InitTemplateOptions) => void
|
|
122
|
+
initializeTemplate?: (dir: string, options: InitTemplateOptions) => Promise<void>;
|
|
122
123
|
}
|
|
123
124
|
export declare type PackagePerson = undefined | string | {
|
|
124
125
|
name: string;
|
package/index.d.ts
CHANGED
|
@@ -7,32 +7,35 @@ export type ElectronProcess = ChildProcess & { restarted: boolean };
|
|
|
7
7
|
|
|
8
8
|
export type ForgePlatform = TargetPlatform;
|
|
9
9
|
export type ForgeArch = ArchOption;
|
|
10
|
+
// Why: hooks have any number/kind of args/return values
|
|
11
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
10
12
|
export type ForgeHookFn = (forgeConfig: ForgeConfig, ...args: any[]) => Promise<any>;
|
|
11
13
|
export type ForgeConfigPublisher = IForgeResolvablePublisher | IForgePublisher | string;
|
|
12
14
|
export interface IForgePluginInterface {
|
|
13
15
|
triggerHook(hookName: string, hookArgs: any[]): Promise<void>;
|
|
14
16
|
triggerMutatingHook<T>(hookName: string, item: T): Promise<any>;
|
|
15
|
-
overrideStartLogic(opts:
|
|
17
|
+
overrideStartLogic(opts: StartOptions): Promise<StartResult>;
|
|
16
18
|
}
|
|
19
|
+
/* eslint-enable @typescript-eslint/no-explicit-any */
|
|
17
20
|
export interface ForgeConfig {
|
|
18
21
|
/**
|
|
19
22
|
* A string to uniquely identify artifacts of this build, will be appended
|
|
20
23
|
* to the out dir to generate a nested directory. E.g. out/current-timestamp
|
|
21
24
|
*
|
|
22
|
-
* If a function is provided it must
|
|
25
|
+
* If a function is provided, it must synchronously return the buildIdentifier
|
|
23
26
|
*/
|
|
24
27
|
buildIdentifier?: string | (() => string);
|
|
25
28
|
hooks?: {
|
|
26
29
|
[hookName: string]: ForgeHookFn;
|
|
27
30
|
};
|
|
28
31
|
/**
|
|
29
|
-
* @
|
|
32
|
+
* @internal
|
|
30
33
|
*/
|
|
31
34
|
pluginInterface: IForgePluginInterface;
|
|
32
35
|
/**
|
|
33
36
|
* An array of Forge plugins or a tuple consisting of [pluginName, pluginOptions]
|
|
34
37
|
*/
|
|
35
|
-
plugins: (IForgePlugin | [string,
|
|
38
|
+
plugins: (IForgePlugin | [string, Record<string, unknown>])[];
|
|
36
39
|
electronRebuildConfig: Partial<RebuildOptions>;
|
|
37
40
|
packagerConfig: Partial<Options>;
|
|
38
41
|
makers: (IForgeResolvableMaker | IForgeMaker)[];
|
|
@@ -46,7 +49,7 @@ export interface ForgeMakeResult {
|
|
|
46
49
|
/**
|
|
47
50
|
* The state of the package.json file when the make happened
|
|
48
51
|
*/
|
|
49
|
-
packageJSON: any;
|
|
52
|
+
packageJSON: any; // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
50
53
|
/**
|
|
51
54
|
* The platform this make run was for
|
|
52
55
|
*/
|
|
@@ -63,13 +66,13 @@ export interface IForgePlugin {
|
|
|
63
66
|
|
|
64
67
|
init(dir: string, forgeConfig: ForgeConfig): void;
|
|
65
68
|
getHook?(hookName: string): ForgeHookFn | null;
|
|
66
|
-
startLogic?(opts: StartOptions): Promise<
|
|
69
|
+
startLogic?(opts: StartOptions): Promise<StartResult>;
|
|
67
70
|
}
|
|
68
71
|
|
|
69
72
|
export interface IForgeResolvableMaker {
|
|
70
73
|
name: string;
|
|
71
74
|
platforms: ForgePlatform[] | null;
|
|
72
|
-
config: any;
|
|
75
|
+
config: any; // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
73
76
|
}
|
|
74
77
|
|
|
75
78
|
export interface IForgeMaker {
|
|
@@ -80,7 +83,7 @@ export interface IForgeMaker {
|
|
|
80
83
|
export interface IForgeResolvablePublisher {
|
|
81
84
|
name: string;
|
|
82
85
|
platforms?: ForgePlatform[] | null;
|
|
83
|
-
config?: any;
|
|
86
|
+
config?: any; // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
84
87
|
}
|
|
85
88
|
|
|
86
89
|
export interface IForgePublisher {
|
|
@@ -119,6 +122,8 @@ export interface StartOptions {
|
|
|
119
122
|
inspect?: boolean;
|
|
120
123
|
}
|
|
121
124
|
|
|
125
|
+
export type StartResult = ElectronProcess | string | string[] | false;
|
|
126
|
+
|
|
122
127
|
export interface InitTemplateOptions {
|
|
123
128
|
copyCIFiles?: boolean;
|
|
124
129
|
}
|
|
@@ -127,11 +132,14 @@ export interface ForgeTemplate {
|
|
|
127
132
|
requiredForgeVersion?: string;
|
|
128
133
|
dependencies?: string[];
|
|
129
134
|
devDependencies?: string[];
|
|
130
|
-
initializeTemplate?: (dir: string, options: InitTemplateOptions) => void
|
|
135
|
+
initializeTemplate?: (dir: string, options: InitTemplateOptions) => Promise<void>;
|
|
131
136
|
}
|
|
132
137
|
|
|
133
|
-
export type PackagePerson =
|
|
134
|
-
|
|
135
|
-
|
|
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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@electron-forge/shared-types",
|
|
3
|
-
"version": "6.0.0-beta.
|
|
3
|
+
"version": "6.0.0-beta.62",
|
|
4
4
|
"description": "Shared types across Electron Forge",
|
|
5
5
|
"repository": "https://github.com/electron-userland/electron-forge",
|
|
6
6
|
"author": "Samuel Attard",
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"typings": "index.d.ts",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@electron-forge/async-ora": "6.0.0-beta.
|
|
11
|
+
"@electron-forge/async-ora": "6.0.0-beta.62",
|
|
12
12
|
"electron-packager": "^15.4.0",
|
|
13
|
-
"electron-rebuild": "^3.2.
|
|
13
|
+
"electron-rebuild": "^3.2.6",
|
|
14
14
|
"ora": "^5.0.0"
|
|
15
15
|
},
|
|
16
16
|
"engines": {
|