electron-info 1.30.2 → 1.31.0
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/README.md +2 -2
- package/dist/ElectronInfo.d.ts +1 -51
- package/dist/FileService.d.ts +1 -1
- package/dist/HTTPService.d.ts +1 -2
- package/dist/cli.js +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/interfaces.d.ts +52 -0
- package/dist/interfaces.js +1 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -6,8 +6,8 @@ Get useful data about Electron releases. Uses [electron-releases](https://github
|
|
|
6
6
|
|
|
7
7
|
## Prerequisites
|
|
8
8
|
|
|
9
|
-
- [Node.js](https://nodejs.org)
|
|
10
|
-
- npm (preinstalled) or [yarn](https://
|
|
9
|
+
- [Node.js](https://nodejs.org)
|
|
10
|
+
- npm (preinstalled) or [yarn](https://yarnpkg.com)
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
package/dist/ElectronInfo.d.ts
CHANGED
|
@@ -1,54 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
chrome: string;
|
|
3
|
-
modules: string;
|
|
4
|
-
node: string;
|
|
5
|
-
openssl: string;
|
|
6
|
-
uv: string;
|
|
7
|
-
v8: string;
|
|
8
|
-
zlib: string;
|
|
9
|
-
}
|
|
10
|
-
export interface RawReleaseInfo {
|
|
11
|
-
deps?: RawDeps;
|
|
12
|
-
name: string;
|
|
13
|
-
node_id: string;
|
|
14
|
-
npm_dist_tags: string[];
|
|
15
|
-
npm_package_name?: string;
|
|
16
|
-
prerelease: boolean;
|
|
17
|
-
published_at: string;
|
|
18
|
-
tag_name: string;
|
|
19
|
-
total_downloads: number;
|
|
20
|
-
version: string;
|
|
21
|
-
}
|
|
22
|
-
export interface Options {
|
|
23
|
-
/** Enable debug logging. Default: `false`. */
|
|
24
|
-
debug?: boolean;
|
|
25
|
-
/** If Electron prereleases should be included. Default: `true`. */
|
|
26
|
-
electronPrereleases?: boolean;
|
|
27
|
-
/** Force downloading the latest release file. Default: `false`. */
|
|
28
|
-
forceUpdate?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Include only the latest release. Alias for `limit=1`. Ignores `limit`.
|
|
31
|
-
* Default: `false`.
|
|
32
|
-
*/
|
|
33
|
-
latest?: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Limit output of releases. Everything below 1 will be treated as no limit.
|
|
36
|
-
* Default: 0.
|
|
37
|
-
*/
|
|
38
|
-
limit?: number;
|
|
39
|
-
/**
|
|
40
|
-
* Can be a URL or a local path. Default:
|
|
41
|
-
* https://raw.githubusercontent.com/electron/releases/master/lite.json.
|
|
42
|
-
*/
|
|
43
|
-
releasesUrl?: string;
|
|
44
|
-
/**
|
|
45
|
-
* Use a custom temporary directory. If not defined, the system's temporary
|
|
46
|
-
* directory will be used.
|
|
47
|
-
*/
|
|
48
|
-
tempDirectory?: string;
|
|
49
|
-
/** Use a custom HTTP timeout in milliseconds. Default is `2000`. */
|
|
50
|
-
timeout?: number;
|
|
51
|
-
}
|
|
1
|
+
import type { Options, RawDeps, RawReleaseInfo } from './interfaces.js';
|
|
52
2
|
export declare const SupportedDependencies: RawDeps;
|
|
53
3
|
export declare class ElectronInfo {
|
|
54
4
|
private readonly fileService;
|
package/dist/FileService.d.ts
CHANGED
package/dist/HTTPService.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export type HTTPOptions = Pick<Options, 'debug' | 'timeout'>;
|
|
1
|
+
import type { HTTPOptions, RawReleaseInfo } from './interfaces.js';
|
|
3
2
|
export declare class HTTPService {
|
|
4
3
|
private readonly logger;
|
|
5
4
|
private readonly options;
|
package/dist/cli.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import fs from 'node:fs';
|
|
2
|
+
import fs from 'node:fs/promises';
|
|
3
3
|
import path from 'node:path';
|
|
4
4
|
import { program as commander } from 'commander';
|
|
5
5
|
import { ElectronInfo, SupportedDependencies } from './ElectronInfo.js';
|
|
6
6
|
const __dirname = import.meta.dirname;
|
|
7
7
|
const packageJsonPath = path.join(__dirname, '../package.json');
|
|
8
|
-
const { description, name, version } = JSON.parse(fs.
|
|
8
|
+
const { description, name, version } = JSON.parse(await fs.readFile(packageJsonPath, 'utf-8'));
|
|
9
9
|
let matchedCommand = false;
|
|
10
10
|
commander
|
|
11
11
|
.name(name)
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export interface RawDeps {
|
|
2
|
+
chrome: string;
|
|
3
|
+
modules: string;
|
|
4
|
+
node: string;
|
|
5
|
+
openssl: string;
|
|
6
|
+
uv: string;
|
|
7
|
+
v8: string;
|
|
8
|
+
zlib: string;
|
|
9
|
+
}
|
|
10
|
+
export interface RawReleaseInfo {
|
|
11
|
+
deps?: RawDeps;
|
|
12
|
+
name: string;
|
|
13
|
+
node_id: string;
|
|
14
|
+
npm_dist_tags: string[];
|
|
15
|
+
npm_package_name?: string;
|
|
16
|
+
prerelease: boolean;
|
|
17
|
+
published_at: string;
|
|
18
|
+
tag_name: string;
|
|
19
|
+
total_downloads: number;
|
|
20
|
+
version: string;
|
|
21
|
+
}
|
|
22
|
+
export interface Options {
|
|
23
|
+
/** Enable debug logging. Default: `false`. */
|
|
24
|
+
debug?: boolean;
|
|
25
|
+
/** If Electron prereleases should be included. Default: `true`. */
|
|
26
|
+
electronPrereleases?: boolean;
|
|
27
|
+
/** Force downloading the latest release file. Default: `false`. */
|
|
28
|
+
forceUpdate?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Include only the latest release. Alias for `limit=1`. Ignores `limit`.
|
|
31
|
+
* Default: `false`.
|
|
32
|
+
*/
|
|
33
|
+
latest?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Limit output of releases. Everything below 1 will be treated as no limit.
|
|
36
|
+
* Default: 0.
|
|
37
|
+
*/
|
|
38
|
+
limit?: number;
|
|
39
|
+
/**
|
|
40
|
+
* Can be a URL or a local path. Default:
|
|
41
|
+
* https://raw.githubusercontent.com/electron/releases/master/lite.json.
|
|
42
|
+
*/
|
|
43
|
+
releasesUrl?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Use a custom temporary directory. If not defined, the system's temporary
|
|
46
|
+
* directory will be used.
|
|
47
|
+
*/
|
|
48
|
+
tempDirectory?: string;
|
|
49
|
+
/** Use a custom HTTP timeout in milliseconds. Default is `2000`. */
|
|
50
|
+
timeout?: number;
|
|
51
|
+
}
|
|
52
|
+
export type HTTPOptions = Pick<Options, 'debug' | 'timeout'>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"vitest": "4.0.16"
|
|
21
21
|
},
|
|
22
22
|
"engines": {
|
|
23
|
-
"node": ">=
|
|
23
|
+
"node": ">= 21"
|
|
24
24
|
},
|
|
25
25
|
"exports": "./dist/index.js",
|
|
26
26
|
"files": [
|
|
@@ -47,6 +47,6 @@
|
|
|
47
47
|
"test": "vitest run"
|
|
48
48
|
},
|
|
49
49
|
"type": "module",
|
|
50
|
-
"version": "1.
|
|
51
|
-
"gitHead": "
|
|
50
|
+
"version": "1.31.0",
|
|
51
|
+
"gitHead": "b968c846095113cbe57fbdd34e4593a4dea8a1c9"
|
|
52
52
|
}
|