new-native-tools 3.1.27 → 3.1.28-master-166-1762848749

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/index.d.ts CHANGED
@@ -10,7 +10,18 @@ export interface ProfileVersion {
10
10
  }
11
11
  export declare function checkVersionInAllFolders(dirs: Array<string>): Array<ProfileVersion>
12
12
  export declare function generateZipPatch(oldFilePath: string, newFilePath: string): Promise<Array<number>>
13
+ /**
14
+ * Generates a zip patch file and returns the path to a temporary file if the patch is reasonable.
15
+ * Returns None if the patch would be larger than the original file size (or 90% for files > 3MB).
16
+ * The caller is responsible for cleaning up the temporary file.
17
+ */
18
+ export declare function generateZipPatchFile(oldFilePath: string, newFilePath: string): Promise<string | null>
13
19
  export declare function applyZipPatch(basePath: string, patch: Array<number>, targetPath: string): Promise<void>
20
+ /**
21
+ * Applies a zip patch from a file. Automatically cleans up temporary patch files
22
+ * created by generate_zip_patch_file, but leaves other files untouched for safety.
23
+ */
24
+ export declare function applyZipPatchFile(basePath: string, patchFilePath: string, targetPath: string): Promise<void>
14
25
  export declare function downloadWithProgress(url: string, callback: (...args: any[]) => any): object
15
26
  export declare function exportEntireLeveldb(dbPath: string): Promise<Record<string, any>>
16
27
  export declare function importLevelDb(levelDbPath: string, levelDbJsonData: string): Promise<void>
@@ -45,7 +56,7 @@ export interface Cookie {
45
56
  export declare function sqliteGetVersion(filepath: string): Promise<string>
46
57
  export declare function sqliteAddCookies(filepath: string, cookies: Array<Cookie>): Promise<void>
47
58
  export declare function sqliteGetCookies(filepath: string): Promise<Array<Cookie>>
48
- export declare function migrateCookiesDown(filepath: string): Promise<void>
59
+ export declare function migrateCookies(filepath: string): Promise<void>
49
60
  export declare function getSystemInfo(): unknown
50
61
  export declare function unzipToFolder(inputZip: string, outputDir: string): Promise<boolean>
51
62
  export declare function archivateFolder(outputFile: string, inputDir: string, fileList: Array<string>, excludeFileList?: Array<string> | undefined | null): Promise<boolean>
package/index.js CHANGED
@@ -310,11 +310,13 @@ if (!nativeBinding) {
310
310
  throw new Error(`Failed to load native binding`)
311
311
  }
312
312
 
313
- const { checkVersionInAllFolders, generateZipPatch, applyZipPatch, downloadWithProgress, exportEntireLeveldb, importLevelDb, proxyCheckHttp, proxyCheckSocks5H, proxyCheckSocks5, sqliteAddLoginPassword, createSqliteLoginDatabase, sqliteGetVersion, sqliteAddCookies, sqliteGetCookies, migrateCookiesDown, getSystemInfo, unzipToFolder, archivateFolder, validateArchive, setForegroundByPid, isProcessRunning, killProcessByPid, closeProcessByPid, tileWindowsEvenly, rustLoggerInit, getVersion } = nativeBinding
313
+ const { checkVersionInAllFolders, generateZipPatch, generateZipPatchFile, applyZipPatch, applyZipPatchFile, downloadWithProgress, exportEntireLeveldb, importLevelDb, proxyCheckHttp, proxyCheckSocks5H, proxyCheckSocks5, sqliteAddLoginPassword, createSqliteLoginDatabase, sqliteGetVersion, sqliteAddCookies, sqliteGetCookies, migrateCookies, getSystemInfo, unzipToFolder, archivateFolder, validateArchive, setForegroundByPid, isProcessRunning, killProcessByPid, closeProcessByPid, tileWindowsEvenly, rustLoggerInit, getVersion } = nativeBinding
314
314
 
315
315
  module.exports.checkVersionInAllFolders = checkVersionInAllFolders
316
316
  module.exports.generateZipPatch = generateZipPatch
317
+ module.exports.generateZipPatchFile = generateZipPatchFile
317
318
  module.exports.applyZipPatch = applyZipPatch
319
+ module.exports.applyZipPatchFile = applyZipPatchFile
318
320
  module.exports.downloadWithProgress = downloadWithProgress
319
321
  module.exports.exportEntireLeveldb = exportEntireLeveldb
320
322
  module.exports.importLevelDb = importLevelDb
@@ -326,7 +328,7 @@ module.exports.createSqliteLoginDatabase = createSqliteLoginDatabase
326
328
  module.exports.sqliteGetVersion = sqliteGetVersion
327
329
  module.exports.sqliteAddCookies = sqliteAddCookies
328
330
  module.exports.sqliteGetCookies = sqliteGetCookies
329
- module.exports.migrateCookiesDown = migrateCookiesDown
331
+ module.exports.migrateCookies = migrateCookies
330
332
  module.exports.getSystemInfo = getSystemInfo
331
333
  module.exports.unzipToFolder = unzipToFolder
332
334
  module.exports.archivateFolder = archivateFolder
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "new-native-tools",
3
- "version": "3.1.27",
3
+ "version": "3.1.28-master-166-1762848749",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "napi": {
@@ -41,10 +41,10 @@
41
41
  "version": "napi version"
42
42
  },
43
43
  "optionalDependencies": {
44
- "new-native-tools-win32-x64-msvc": "3.1.27",
45
- "new-native-tools-darwin-x64": "3.1.27",
46
- "new-native-tools-linux-x64-gnu": "3.1.27",
47
- "new-native-tools-darwin-arm64": "3.1.27",
48
- "new-native-tools-win32-ia32-msvc": "3.1.27"
44
+ "new-native-tools-darwin-arm64": "3.1.28",
45
+ "new-native-tools-darwin-x64": "3.1.28",
46
+ "new-native-tools-linux-x64-gnu": "3.1.28",
47
+ "new-native-tools-win32-ia32-msvc": "3.1.28",
48
+ "new-native-tools-win32-x64-msvc": "3.1.28"
49
49
  }
50
- }
50
+ }
Binary file
Binary file
Binary file
Binary file
Binary file