new-native-tools 3.1.16 → 3.1.18
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 +2 -0
- package/index.js +27 -11
- package/package.json +6 -6
- package/tools.darwin-arm64.node +0 -0
- package/tools.darwin-x64.node +0 -0
- package/tools.linux-x64-gnu.node +0 -0
- package/tools.win32-ia32-msvc.node +0 -0
- package/tools.win32-x64-msvc.node +0 -0
package/index.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ export interface Cookie {
|
|
|
38
38
|
expirationDate: number
|
|
39
39
|
httpOnly?: boolean
|
|
40
40
|
secure?: boolean
|
|
41
|
+
sameSite?: string
|
|
41
42
|
}
|
|
42
43
|
export declare function sqliteGetVersion(filepath: string): Promise<string>
|
|
43
44
|
export declare function sqliteAddCookies(filepath: string, cookies: Array<Cookie>): Promise<void>
|
|
@@ -46,6 +47,7 @@ export declare function migrateCookiesDown(filepath: string): Promise<void>
|
|
|
46
47
|
export declare function getSystemInfo(): unknown
|
|
47
48
|
export declare function unzipToFolder(inputZip: string, outputDir: string): Promise<boolean>
|
|
48
49
|
export declare function archivateFolder(outputFile: string, inputDir: string, fileList: Array<string>, excludeFileList?: Array<string> | undefined | null): Promise<boolean>
|
|
50
|
+
export declare function validateArchive(archivePath: string): Promise<boolean>
|
|
49
51
|
export declare function setForegroundByPid(pid: number): boolean | number
|
|
50
52
|
export declare function isProcessRunning(pid: number): boolean
|
|
51
53
|
export declare function killProcessByPid(pid: number): number
|
package/index.js
CHANGED
|
@@ -224,17 +224,32 @@ switch (platform) {
|
|
|
224
224
|
}
|
|
225
225
|
break
|
|
226
226
|
case 'arm':
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
227
|
+
if (isMusl()) {
|
|
228
|
+
localFileExisted = existsSync(
|
|
229
|
+
join(__dirname, 'tools.linux-arm-musleabihf.node')
|
|
230
|
+
)
|
|
231
|
+
try {
|
|
232
|
+
if (localFileExisted) {
|
|
233
|
+
nativeBinding = require('./tools.linux-arm-musleabihf.node')
|
|
234
|
+
} else {
|
|
235
|
+
nativeBinding = require('new-native-tools-linux-arm-musleabihf')
|
|
236
|
+
}
|
|
237
|
+
} catch (e) {
|
|
238
|
+
loadError = e
|
|
239
|
+
}
|
|
240
|
+
} else {
|
|
241
|
+
localFileExisted = existsSync(
|
|
242
|
+
join(__dirname, 'tools.linux-arm-gnueabihf.node')
|
|
243
|
+
)
|
|
244
|
+
try {
|
|
245
|
+
if (localFileExisted) {
|
|
246
|
+
nativeBinding = require('./tools.linux-arm-gnueabihf.node')
|
|
247
|
+
} else {
|
|
248
|
+
nativeBinding = require('new-native-tools-linux-arm-gnueabihf')
|
|
249
|
+
}
|
|
250
|
+
} catch (e) {
|
|
251
|
+
loadError = e
|
|
235
252
|
}
|
|
236
|
-
} catch (e) {
|
|
237
|
-
loadError = e
|
|
238
253
|
}
|
|
239
254
|
break
|
|
240
255
|
case 'riscv64':
|
|
@@ -295,7 +310,7 @@ if (!nativeBinding) {
|
|
|
295
310
|
throw new Error(`Failed to load native binding`)
|
|
296
311
|
}
|
|
297
312
|
|
|
298
|
-
const { checkVersionInAllFolders, generateZipPatch, applyZipPatch, downloadWithProgress, exportEntireLeveldb, importLevelDb, proxyCheckHttp, proxyCheckSocks5H, proxyCheckSocks5, sqliteAddLoginPassword, createSqliteLoginDatabase, sqliteGetVersion, sqliteAddCookies, sqliteGetCookies, migrateCookiesDown, getSystemInfo, unzipToFolder, archivateFolder, setForegroundByPid, isProcessRunning, killProcessByPid, closeProcessByPid, tileWindowsEvenly, rustLoggerInit, getVersion } = nativeBinding
|
|
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
|
|
299
314
|
|
|
300
315
|
module.exports.checkVersionInAllFolders = checkVersionInAllFolders
|
|
301
316
|
module.exports.generateZipPatch = generateZipPatch
|
|
@@ -315,6 +330,7 @@ module.exports.migrateCookiesDown = migrateCookiesDown
|
|
|
315
330
|
module.exports.getSystemInfo = getSystemInfo
|
|
316
331
|
module.exports.unzipToFolder = unzipToFolder
|
|
317
332
|
module.exports.archivateFolder = archivateFolder
|
|
333
|
+
module.exports.validateArchive = validateArchive
|
|
318
334
|
module.exports.setForegroundByPid = setForegroundByPid
|
|
319
335
|
module.exports.isProcessRunning = isProcessRunning
|
|
320
336
|
module.exports.killProcessByPid = killProcessByPid
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "new-native-tools",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.18",
|
|
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.
|
|
45
|
-
"new-native-tools-darwin-x64": "3.1.
|
|
46
|
-
"new-native-tools-linux-x64-gnu": "3.1.
|
|
47
|
-
"new-native-tools-darwin-arm64": "3.1.
|
|
48
|
-
"new-native-tools-win32-ia32-msvc": "3.1.
|
|
44
|
+
"new-native-tools-win32-x64-msvc": "3.1.18",
|
|
45
|
+
"new-native-tools-darwin-x64": "3.1.18",
|
|
46
|
+
"new-native-tools-linux-x64-gnu": "3.1.18",
|
|
47
|
+
"new-native-tools-darwin-arm64": "3.1.18",
|
|
48
|
+
"new-native-tools-win32-ia32-msvc": "3.1.18"
|
|
49
49
|
}
|
|
50
50
|
}
|
package/tools.darwin-arm64.node
CHANGED
|
Binary file
|
package/tools.darwin-x64.node
CHANGED
|
Binary file
|
package/tools.linux-x64-gnu.node
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|