@electron-forge/publisher-base 7.10.1 → 8.0.0-alpha.1
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/Publisher.d.ts +51 -0
- package/dist/Publisher.d.ts.map +1 -0
- package/dist/Publisher.js +43 -0
- package/package.json +3 -3
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { ForgeListrTaskDefinition, ForgeMakeResult, ForgePlatform, IForgePublisher, ResolvedForgeConfig } from '@electron-forge/shared-types';
|
|
2
|
+
export interface PublisherOptions {
|
|
3
|
+
/**
|
|
4
|
+
* The base directory of the apps source code
|
|
5
|
+
*/
|
|
6
|
+
dir: string;
|
|
7
|
+
/**
|
|
8
|
+
* The results from running the make command
|
|
9
|
+
*/
|
|
10
|
+
makeResults: ForgeMakeResult[];
|
|
11
|
+
/**
|
|
12
|
+
* The raw forgeConfig this app is using.
|
|
13
|
+
*
|
|
14
|
+
* You probably shouldn't use this
|
|
15
|
+
*/
|
|
16
|
+
forgeConfig: ResolvedForgeConfig;
|
|
17
|
+
/**
|
|
18
|
+
* A method that allows the publisher to provide status / progress updates
|
|
19
|
+
* to the user. This method currently maps to setting the "output" line
|
|
20
|
+
* in the publisher listr task.
|
|
21
|
+
*/
|
|
22
|
+
setStatusLine: (statusLine: string) => void;
|
|
23
|
+
}
|
|
24
|
+
export default abstract class Publisher<C> implements IForgePublisher {
|
|
25
|
+
config: C;
|
|
26
|
+
protected platformsToPublishOn?: string[] | undefined;
|
|
27
|
+
abstract name: string;
|
|
28
|
+
defaultPlatforms?: ForgePlatform[];
|
|
29
|
+
/** @internal */
|
|
30
|
+
__isElectronForgePublisher: true;
|
|
31
|
+
/**
|
|
32
|
+
* @param config - A configuration object for this publisher
|
|
33
|
+
* @param platformsToPublishOn - If you want this maker to run on platforms different from `defaultPlatforms` you can provide those platforms here
|
|
34
|
+
*/
|
|
35
|
+
constructor(config: C, platformsToPublishOn?: string[] | undefined);
|
|
36
|
+
get platforms(): ForgePlatform[];
|
|
37
|
+
/**
|
|
38
|
+
* Publishers must implement this method to publish the artifacts returned from
|
|
39
|
+
* make calls. If any errors occur you must throw them, failing silently or simply
|
|
40
|
+
* logging will not propagate issues up to forge.
|
|
41
|
+
*
|
|
42
|
+
* Please note for a given version publish will be called multiple times, once
|
|
43
|
+
* for each set of "platform" and "arch". This means if you are publishing
|
|
44
|
+
* darwin and win32 artifacts to somewhere like GitHub on the first publish call
|
|
45
|
+
* you will have to create the version on GitHub and the second call will just
|
|
46
|
+
* be appending files to the existing version.
|
|
47
|
+
*/
|
|
48
|
+
publish(_opts: PublisherOptions): Promise<ForgeListrTaskDefinition[] | void>;
|
|
49
|
+
}
|
|
50
|
+
export { Publisher as PublisherBase };
|
|
51
|
+
//# sourceMappingURL=Publisher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Publisher.d.ts","sourceRoot":"","sources":["../src/Publisher.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,eAAe,EACf,aAAa,EACb,eAAe,EACf,mBAAmB,EACpB,MAAM,8BAA8B,CAAC;AAEtC,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,WAAW,EAAE,eAAe,EAAE,CAAC;IAC/B;;;;OAIG;IACH,WAAW,EAAE,mBAAmB,CAAC;IACjC;;;;OAIG;IACH,aAAa,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAED,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,SAAS,CAAC,CAAC,CAAE,YAAW,eAAe;IAa1D,MAAM,EAAE,CAAC;IAChB,SAAS,CAAC,oBAAoB,CAAC;IAbjC,SAAgB,IAAI,EAAE,MAAM,CAAC;IAEtB,gBAAgB,CAAC,EAAE,aAAa,EAAE,CAAC;IAE1C,gBAAgB;IAChB,0BAA0B,EAAG,IAAI,CAAC;IAElC;;;OAGG;gBAEM,MAAM,EAAE,CAAC,EACN,oBAAoB,CAAC,sBAAiB;IAUlD,IAAI,SAAS,IAAI,aAAa,EAAE,CAI/B;IAED;;;;;;;;;;OAUG;IACG,OAAO,CACX,KAAK,EAAE,gBAAgB,GACtB,OAAO,CAAC,wBAAwB,EAAE,GAAG,IAAI,CAAC;CAK9C;AAED,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PublisherBase = void 0;
|
|
4
|
+
class Publisher {
|
|
5
|
+
/**
|
|
6
|
+
* @param config - A configuration object for this publisher
|
|
7
|
+
* @param platformsToPublishOn - If you want this maker to run on platforms different from `defaultPlatforms` you can provide those platforms here
|
|
8
|
+
*/
|
|
9
|
+
constructor(config, platformsToPublishOn) {
|
|
10
|
+
this.config = config;
|
|
11
|
+
this.platformsToPublishOn = platformsToPublishOn;
|
|
12
|
+
this.config = config;
|
|
13
|
+
Object.defineProperty(this, '__isElectronForgePublisher', {
|
|
14
|
+
value: true,
|
|
15
|
+
enumerable: false,
|
|
16
|
+
configurable: false,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
get platforms() {
|
|
20
|
+
if (this.platformsToPublishOn)
|
|
21
|
+
return this.platformsToPublishOn;
|
|
22
|
+
if (this.defaultPlatforms)
|
|
23
|
+
return this.defaultPlatforms;
|
|
24
|
+
return ['win32', 'linux', 'darwin', 'mas'];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Publishers must implement this method to publish the artifacts returned from
|
|
28
|
+
* make calls. If any errors occur you must throw them, failing silently or simply
|
|
29
|
+
* logging will not propagate issues up to forge.
|
|
30
|
+
*
|
|
31
|
+
* Please note for a given version publish will be called multiple times, once
|
|
32
|
+
* for each set of "platform" and "arch". This means if you are publishing
|
|
33
|
+
* darwin and win32 artifacts to somewhere like GitHub on the first publish call
|
|
34
|
+
* you will have to create the version on GitHub and the second call will just
|
|
35
|
+
* be appending files to the existing version.
|
|
36
|
+
*/
|
|
37
|
+
async publish(_opts) {
|
|
38
|
+
throw new Error(`Publisher ${this.name} did not implement the publish method`);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.default = Publisher;
|
|
42
|
+
exports.PublisherBase = Publisher;
|
|
43
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUHVibGlzaGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL1B1Ymxpc2hlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUErQkEsTUFBOEIsU0FBUztJQVFyQzs7O09BR0c7SUFDSCxZQUNTLE1BQVMsRUFDTixvQkFBc0M7UUFEekMsV0FBTSxHQUFOLE1BQU0sQ0FBRztRQUNOLHlCQUFvQixHQUFwQixvQkFBb0IsQ0FBa0I7UUFFaEQsSUFBSSxDQUFDLE1BQU0sR0FBRyxNQUFNLENBQUM7UUFDckIsTUFBTSxDQUFDLGNBQWMsQ0FBQyxJQUFJLEVBQUUsNEJBQTRCLEVBQUU7WUFDeEQsS0FBSyxFQUFFLElBQUk7WUFDWCxVQUFVLEVBQUUsS0FBSztZQUNqQixZQUFZLEVBQUUsS0FBSztTQUNwQixDQUFDLENBQUM7SUFDTCxDQUFDO0lBRUQsSUFBSSxTQUFTO1FBQ1gsSUFBSSxJQUFJLENBQUMsb0JBQW9CO1lBQUUsT0FBTyxJQUFJLENBQUMsb0JBQW9CLENBQUM7UUFDaEUsSUFBSSxJQUFJLENBQUMsZ0JBQWdCO1lBQUUsT0FBTyxJQUFJLENBQUMsZ0JBQWdCLENBQUM7UUFDeEQsT0FBTyxDQUFDLE9BQU8sRUFBRSxPQUFPLEVBQUUsUUFBUSxFQUFFLEtBQUssQ0FBQyxDQUFDO0lBQzdDLENBQUM7SUFFRDs7Ozs7Ozs7OztPQVVHO0lBQ0gsS0FBSyxDQUFDLE9BQU8sQ0FDWCxLQUF1QjtRQUV2QixNQUFNLElBQUksS0FBSyxDQUNiLGFBQWEsSUFBSSxDQUFDLElBQUksdUNBQXVDLENBQzlELENBQUM7SUFDSixDQUFDO0NBQ0Y7QUFoREQsNEJBZ0RDO0FBRXFCLGtDQUFhIn0=
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@electron-forge/publisher-base",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0-alpha.1",
|
|
4
4
|
"description": "Base publisher for Electron Forge",
|
|
5
5
|
"repository": "https://github.com/electron/forge",
|
|
6
6
|
"author": "Samuel Attard",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"main": "dist/Publisher.js",
|
|
9
9
|
"typings": "dist/Publisher.d.ts",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@electron-forge/shared-types": "
|
|
11
|
+
"@electron-forge/shared-types": "8.0.0-alpha.1"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"vitest": "^3.1.3"
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"dist",
|
|
24
24
|
"src"
|
|
25
25
|
],
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "b9e0db1e38fafbeace24f539be01e32a4aeed258"
|
|
27
27
|
}
|