@nwutils/getter 0.3.1 → 0.3.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nwutils/getter",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Get NW.js and related binaries for Linux, MacOS and Windows.",
5
5
  "keywords": [
6
6
  "NW.js",
@@ -47,7 +47,7 @@
47
47
  },
48
48
  "dependencies": {
49
49
  "semver": "^7.8.5",
50
- "tar": "^7.5.22",
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.
@@ -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
@@ -1,3 +1,4 @@
1
+ export default get;
1
2
  export type Options = {
2
3
  /**
3
4
  * Runtime version
@@ -66,4 +67,3 @@ export type Options = {
66
67
  * @returns {Promise<void>}
67
68
  */
68
69
  declare function get(options: Options): Promise<void>;
69
- export default get;
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 declare function headersFileName(version: string): string;
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.