@tmlmobilidade/go-utils-exec 20260904.1059.6 → 20260905.126.6
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.
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* compression settings, and `.zip` file entry ordering.
|
|
5
5
|
* Files are hashed individually in streaming mode, then the filenames and
|
|
6
6
|
* individual hashes are sorted and combined into the final hash.
|
|
7
|
-
* @param
|
|
7
|
+
* @param filePath The path to the `.zip` file.
|
|
8
8
|
* @returns The SHA-256 hash of the `.zip` file contents.
|
|
9
9
|
*/
|
|
10
|
-
export declare function
|
|
10
|
+
export declare function getZipFileHash(filePath: string): Promise<string>;
|
|
@@ -10,14 +10,14 @@ import { getDirectoryFiles } from './get-directory-files.js';
|
|
|
10
10
|
* compression settings, and `.zip` file entry ordering.
|
|
11
11
|
* Files are hashed individually in streaming mode, then the filenames and
|
|
12
12
|
* individual hashes are sorted and combined into the final hash.
|
|
13
|
-
* @param
|
|
13
|
+
* @param filePath The path to the `.zip` file.
|
|
14
14
|
* @returns The SHA-256 hash of the `.zip` file contents.
|
|
15
15
|
*/
|
|
16
|
-
export async function
|
|
16
|
+
export async function getZipFileHash(filePath) {
|
|
17
17
|
//
|
|
18
18
|
//
|
|
19
19
|
// Initialize a new temporary directory and extract the ZIP file into it.
|
|
20
|
-
const temporaryDirectory = fs.mkdtempDisposableSync('
|
|
20
|
+
const temporaryDirectory = fs.mkdtempDisposableSync('get-zip-file-hash-');
|
|
21
21
|
await fs
|
|
22
22
|
.createReadStream(filePath)
|
|
23
23
|
.pipe(unzipper.Extract({ path: temporaryDirectory.path }))
|
package/dist/files/index.d.ts
CHANGED
package/dist/files/index.js
CHANGED