better-sqlite3-multiple-ciphers 11.10.0 → 12.2.0
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/README.md +4 -4
- package/deps/sqlite3/sqlite3.c +3231 -1735
- package/deps/sqlite3/sqlite3.h +149 -89
- package/deps/sqlite3/sqlite3ext.h +4 -0
- package/deps/update-sqlite3mc.sh +2 -2
- package/package.json +9 -1
- package/src/better_sqlite3.cpp +10 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "better-sqlite3-multiple-ciphers",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.2.0",
|
|
4
4
|
"description": "better-sqlite3 with multiple-cipher encryption support",
|
|
5
5
|
"homepage": "https://github.com/m4heshd/better-sqlite3-multiple-ciphers",
|
|
6
6
|
"author": "Mahesh Bandara Wijerathna (m4heshd) <m4heshd@gmail.com>",
|
|
@@ -17,10 +17,18 @@
|
|
|
17
17
|
"lib/**",
|
|
18
18
|
"deps/**"
|
|
19
19
|
],
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": "20.x || 22.x || 23.x || 24.x"
|
|
22
|
+
},
|
|
20
23
|
"dependencies": {
|
|
21
24
|
"bindings": "^1.5.0",
|
|
22
25
|
"prebuild-install": "^7.1.1"
|
|
23
26
|
},
|
|
27
|
+
"overrides": {
|
|
28
|
+
"prebuild": {
|
|
29
|
+
"node-abi": "4.9.0"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
24
32
|
"devDependencies": {
|
|
25
33
|
"@types/node": "20.4.9",
|
|
26
34
|
"chai": "^4.3.8",
|
package/src/better_sqlite3.cpp
CHANGED
|
@@ -30,16 +30,19 @@ void SetPrototypeGetter(
|
|
|
30
30
|
);
|
|
31
31
|
#endif
|
|
32
32
|
}
|
|
33
|
-
#line
|
|
34
|
-
#
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
#line 183 "./src/util/macros.lzz"
|
|
34
|
+
#if defined(V8_ENABLE_SANDBOX)
|
|
35
|
+
// When V8 Sandbox is enabled (in newer Electron versions), we need to use Buffer::Copy
|
|
36
|
+
// instead of Buffer::New to ensure the ArrayBuffer backing store is allocated inside the sandbox
|
|
37
37
|
static inline v8::MaybeLocal<v8::Object> BufferSandboxNew(v8::Isolate* isolate, char* data, size_t length, void (*finalizeCallback)(char*, void*), void* finalizeHint) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
v8::MaybeLocal<v8::Object> buffer = node::Buffer::Copy(isolate, data, length);
|
|
39
|
+
finalizeCallback(data, finalizeHint);
|
|
40
|
+
return buffer;
|
|
41
41
|
}
|
|
42
42
|
#define SAFE_NEW_BUFFER(env, data, length, finalizeCallback, finalizeHint) BufferSandboxNew(env, data, length, finalizeCallback, finalizeHint)
|
|
43
|
+
#else
|
|
44
|
+
// When V8 Sandbox is not enabled, we can use the more efficient Buffer::New
|
|
45
|
+
#define SAFE_NEW_BUFFER(env, data, length, finalizeCallback, finalizeHint) node::Buffer::New(env, data, length, finalizeCallback, finalizeHint)
|
|
43
46
|
#endif
|
|
44
47
|
#line 39 "./src/util/binder.lzz"
|
|
45
48
|
static bool IsPlainObject(v8::Isolate* isolate, v8::Local<v8::Object> obj) {
|