@nwutils/getter 0.3.1 → 0.3.3
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 +3 -1
- package/package.json +4 -4
- package/src/verify.js +3 -3
- package/types/decompress.d.ts +2 -2
- package/types/main.d.ts +1 -1
- package/types/node.d.ts +1 -1
- package/types/verify.d.ts +3 -3
package/LICENSE
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2014-2021 Steffen Müller
|
|
4
|
+
Copyright (c) 2026 Ayushman Chhabra
|
|
5
|
+
Copyright (c) 2026-present NW.js Utilities and contributors
|
|
4
6
|
|
|
5
7
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
8
|
this software and associated documentation files (the "Software"), to deal in
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nwutils/getter",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "Get NW.js and related binaries for Linux, MacOS and Windows.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NW.js",
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
],
|
|
11
11
|
"author": {
|
|
12
12
|
"name": "Ayushman Chhabra",
|
|
13
|
-
"url": "https://ayushmanchhabra.com"
|
|
13
|
+
"url": "https://ayushmanchhabra.com/"
|
|
14
14
|
},
|
|
15
15
|
"maintainers": [
|
|
16
16
|
{
|
|
17
17
|
"name": "Ayushman Chhabra",
|
|
18
|
-
"url": "https://ayushmanchhabra.com"
|
|
18
|
+
"url": "https://ayushmanchhabra.com/"
|
|
19
19
|
}
|
|
20
20
|
],
|
|
21
21
|
"contributors": [
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"semver": "^7.8.5",
|
|
50
|
-
"tar": "^7.5.
|
|
50
|
+
"tar": "^7.5.23",
|
|
51
51
|
"yauzl-promise": "^4.0.0"
|
|
52
52
|
},
|
|
53
53
|
"devEngines": {
|
package/src/verify.js
CHANGED
|
@@ -8,14 +8,14 @@ import request from "./request.js";
|
|
|
8
8
|
* Verify the SHA256 checksum of downloaded artifacts.
|
|
9
9
|
* @async
|
|
10
10
|
* @function
|
|
11
|
-
* @param {string} version - Version of NW.js.
|
|
12
|
-
* @param {string} platform - Platform of NW.js.
|
|
13
|
-
* @param {string} arch - Architecture of NW.js.
|
|
14
11
|
* @param {string} shaUrl - URL to get the shasum text file from.
|
|
15
12
|
* @param {string} shaOut - File path to shasum text file.
|
|
16
13
|
* @param {string} cacheDir - File path to cache directory.
|
|
17
14
|
* @param {boolean} ffmpeg - Toggle between community (true) and official (false) ffmpeg binary
|
|
18
15
|
* @param {boolean} shaSum - Throws error if true, otherwise logs a warning. Applies to both a checksum mismatch and `expectedFile` never being checked at all.
|
|
16
|
+
* @param {string} version - Version of NW.js.
|
|
17
|
+
* @param {string} platform - Platform of NW.js.
|
|
18
|
+
* @param {string} arch - Architecture of NW.js.
|
|
19
19
|
* @param {string} expectedFile - Relative path, as listed in the SHASUMS file, that this call is actually relying on being verified. Other listed files that don't exist locally (eg. other platforms) are still skipped silently - only `expectedFile` going unchecked is treated as a failure, since that means the caller's "integrity verified" belief was never actually true.
|
|
20
20
|
* @throws {Error}
|
|
21
21
|
* @returns {Promise<boolean>} - Returns true if the checksums match.
|
package/types/decompress.d.ts
CHANGED
|
@@ -11,6 +11,6 @@
|
|
|
11
11
|
* @returns {Promise<void>}
|
|
12
12
|
*/
|
|
13
13
|
export default function decompress(filePath: string, cacheDir: string, limits?: {
|
|
14
|
-
maxEntries?: number;
|
|
15
|
-
maxTotalExtractedSize?: number;
|
|
14
|
+
maxEntries?: number | undefined;
|
|
15
|
+
maxTotalExtractedSize?: number | undefined;
|
|
16
16
|
}): Promise<void>;
|
package/types/main.d.ts
CHANGED
package/types/node.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @param {string} version - Runtime version
|
|
6
6
|
* @returns {string} - eg. "node-v0.111.3.tar.gz" or "nw-headers-v0.107.0.tar.gz"
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
8
|
+
export function headersFileName(version: string): string;
|
|
9
9
|
/**
|
|
10
10
|
* Download NW.js's Node.js headers.
|
|
11
11
|
* @async
|
package/types/verify.d.ts
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* Verify the SHA256 checksum of downloaded artifacts.
|
|
3
3
|
* @async
|
|
4
4
|
* @function
|
|
5
|
-
* @param {string} version - Version of NW.js.
|
|
6
|
-
* @param {string} platform - Platform of NW.js.
|
|
7
|
-
* @param {string} arch - Architecture of NW.js.
|
|
8
5
|
* @param {string} shaUrl - URL to get the shasum text file from.
|
|
9
6
|
* @param {string} shaOut - File path to shasum text file.
|
|
10
7
|
* @param {string} cacheDir - File path to cache directory.
|
|
11
8
|
* @param {boolean} ffmpeg - Toggle between community (true) and official (false) ffmpeg binary
|
|
12
9
|
* @param {boolean} shaSum - Throws error if true, otherwise logs a warning. Applies to both a checksum mismatch and `expectedFile` never being checked at all.
|
|
10
|
+
* @param {string} version - Version of NW.js.
|
|
11
|
+
* @param {string} platform - Platform of NW.js.
|
|
12
|
+
* @param {string} arch - Architecture of NW.js.
|
|
13
13
|
* @param {string} expectedFile - Relative path, as listed in the SHASUMS file, that this call is actually relying on being verified. Other listed files that don't exist locally (eg. other platforms) are still skipped silently - only `expectedFile` going unchecked is treated as a failure, since that means the caller's "integrity verified" belief was never actually true.
|
|
14
14
|
* @throws {Error}
|
|
15
15
|
* @returns {Promise<boolean>} - Returns true if the checksums match.
|