better-sqlite3-multiple-ciphers 12.4.1 → 12.4.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.
@@ -368,6 +368,10 @@ struct sqlite3_api_routines {
368
368
  int (*set_clientdata)(sqlite3*, const char*, void*, void(*)(void*));
369
369
  /* Version 3.50.0 and later */
370
370
  int (*setlk_timeout)(sqlite3*,int,int);
371
+ /* Version 3.51.0 and later */
372
+ int (*set_errmsg)(sqlite3*,int,const char*);
373
+ int (*db_status64)(sqlite3*,int,sqlite3_int64*,sqlite3_int64*,int);
374
+
371
375
  };
372
376
 
373
377
  /*
@@ -703,6 +707,9 @@ typedef int (*sqlite3_loadext_entry)(
703
707
  #define sqlite3_set_clientdata sqlite3_api->set_clientdata
704
708
  /* Version 3.50.0 and later */
705
709
  #define sqlite3_setlk_timeout sqlite3_api->setlk_timeout
710
+ /* Version 3.51.0 and later */
711
+ #define sqlite3_set_errmsg sqlite3_api->set_errmsg
712
+ #define sqlite3_db_status64 sqlite3_api->db_status64
706
713
  #endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */
707
714
 
708
715
  #if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
@@ -21,8 +21,8 @@
21
21
  # ===
22
22
 
23
23
  YEAR="2025"
24
- VERSION="3500400"
25
- SQLITE3MC_VERSION="v2.2.4"
24
+ VERSION="3510000"
25
+ SQLITE3MC_VERSION="v2.2.5"
26
26
 
27
27
  # Defines below are sorted alphabetically
28
28
  DEFINES="
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "better-sqlite3-multiple-ciphers",
3
- "version": "12.4.1",
3
+ "version": "12.4.6",
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>",
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "overrides": {
28
28
  "prebuild": {
29
- "node-abi": "4.13.1"
29
+ "node-abi": "4.15.0"
30
30
  }
31
31
  },
32
32
  "devDependencies": {
@@ -1,69 +1,74 @@
1
- #include <climits>
2
- #include <cstdio>
3
- #include <cstring>
4
- #include <string>
5
- #include <vector>
6
- #include <set>
7
- #include <unordered_map>
8
- #include <algorithm>
9
- #include <mutex>
10
- #include <sqlite3.h>
11
- #include <node.h>
12
- #include <node_object_wrap.h>
13
- #include <node_buffer.h>
14
-
15
- struct Addon;
16
- class Database;
17
- class Statement;
18
- class StatementIterator;
19
- class Backup;
20
-
21
- #include "util/macros.cpp"
22
- #include "util/helpers.cpp"
23
- #include "util/constants.cpp"
24
- #include "util/bind-map.cpp"
25
- #include "util/data-converter.cpp"
26
- #include "util/data.cpp"
27
- #if defined(NODE_MODULE_VERSION) && NODE_MODULE_VERSION >= 127
28
- #include "util/row-builder.cpp"
29
- #endif
30
-
31
- #include "objects/backup.hpp"
32
- #include "objects/statement.hpp"
33
- #include "objects/database.hpp"
34
- #include "addon.cpp"
35
- #include "objects/statement-iterator.hpp"
36
-
37
- #include "util/query-macros.cpp"
38
- #include "util/custom-function.cpp"
39
- #include "util/custom-aggregate.cpp"
40
- #include "util/custom-table.cpp"
41
- #include "util/binder.cpp"
42
-
43
- #include "objects/backup.cpp"
44
- #include "objects/statement.cpp"
45
- #include "objects/database.cpp"
46
- #include "objects/statement-iterator.cpp"
47
-
48
- NODE_MODULE_INIT(/* exports, context */) {
49
- v8::Isolate* isolate = context->GetIsolate();
50
- v8::HandleScope scope(isolate);
51
- Addon::ConfigureURI();
52
-
53
- // Initialize addon instance.
54
- Addon* addon = new Addon(isolate);
55
- v8::Local<v8::External> data = v8::External::New(isolate, addon);
56
- node::AddEnvironmentCleanupHook(isolate, Addon::Cleanup, addon);
57
-
58
- // Create and export native-backed classes and functions.
59
- exports->Set(context, InternalizedFromLatin1(isolate, "Database"), Database::Init(isolate, data)).FromJust();
60
- exports->Set(context, InternalizedFromLatin1(isolate, "Statement"), Statement::Init(isolate, data)).FromJust();
61
- exports->Set(context, InternalizedFromLatin1(isolate, "StatementIterator"), StatementIterator::Init(isolate, data)).FromJust();
62
- exports->Set(context, InternalizedFromLatin1(isolate, "Backup"), Backup::Init(isolate, data)).FromJust();
63
- exports->Set(context, InternalizedFromLatin1(isolate, "setErrorConstructor"), v8::FunctionTemplate::New(isolate, Addon::JS_setErrorConstructor, data)->GetFunction(context).ToLocalChecked()).FromJust();
64
-
65
- // Store addon instance data.
66
- addon->Statement.Reset(isolate, exports->Get(context, InternalizedFromLatin1(isolate, "Statement")).ToLocalChecked().As<v8::Function>());
67
- addon->StatementIterator.Reset(isolate, exports->Get(context, InternalizedFromLatin1(isolate, "StatementIterator")).ToLocalChecked().As<v8::Function>());
68
- addon->Backup.Reset(isolate, exports->Get(context, InternalizedFromLatin1(isolate, "Backup")).ToLocalChecked().As<v8::Function>());
69
- }
1
+ #include <climits>
2
+ #include <cstdio>
3
+ #include <cstring>
4
+ #include <string>
5
+ #include <vector>
6
+ #include <set>
7
+ #include <unordered_map>
8
+ #include <algorithm>
9
+ #include <mutex>
10
+ #include <sqlite3.h>
11
+ #include <node.h>
12
+ #include <node_object_wrap.h>
13
+ #include <node_buffer.h>
14
+
15
+ struct Addon;
16
+ class Database;
17
+ class Statement;
18
+ class StatementIterator;
19
+ class Backup;
20
+
21
+ #include "util/macros.cpp"
22
+ #include "util/helpers.cpp"
23
+ #include "util/constants.cpp"
24
+ #include "util/bind-map.cpp"
25
+ #include "util/data-converter.cpp"
26
+ #include "util/data.cpp"
27
+ #if defined(NODE_MODULE_VERSION) && NODE_MODULE_VERSION >= 127
28
+ #include "util/row-builder.cpp"
29
+ #endif
30
+
31
+ #include "objects/backup.hpp"
32
+ #include "objects/statement.hpp"
33
+ #include "objects/database.hpp"
34
+ #include "addon.cpp"
35
+ #include "objects/statement-iterator.hpp"
36
+
37
+ #include "util/query-macros.cpp"
38
+ #include "util/custom-function.cpp"
39
+ #include "util/custom-aggregate.cpp"
40
+ #include "util/custom-table.cpp"
41
+ #include "util/binder.cpp"
42
+
43
+ #include "objects/backup.cpp"
44
+ #include "objects/statement.cpp"
45
+ #include "objects/database.cpp"
46
+ #include "objects/statement-iterator.cpp"
47
+
48
+ NODE_MODULE_INIT(/* exports, context */) {
49
+ #if defined(NODE_MODULE_VERSION) && NODE_MODULE_VERSION >= 140
50
+ // Use Isolate::GetCurrent as stated in deprecation message within v8_context.h 13.9.72320122
51
+ v8::Isolate* isolate = v8::Isolate::GetCurrent();
52
+ #else
53
+ v8::Isolate* isolate = context->GetIsolate();
54
+ #endif
55
+ v8::HandleScope scope(isolate);
56
+ Addon::ConfigureURI();
57
+
58
+ // Initialize addon instance.
59
+ Addon* addon = new Addon(isolate);
60
+ v8::Local<v8::External> data = v8::External::New(isolate, addon);
61
+ node::AddEnvironmentCleanupHook(isolate, Addon::Cleanup, addon);
62
+
63
+ // Create and export native-backed classes and functions.
64
+ exports->Set(context, InternalizedFromLatin1(isolate, "Database"), Database::Init(isolate, data)).FromJust();
65
+ exports->Set(context, InternalizedFromLatin1(isolate, "Statement"), Statement::Init(isolate, data)).FromJust();
66
+ exports->Set(context, InternalizedFromLatin1(isolate, "StatementIterator"), StatementIterator::Init(isolate, data)).FromJust();
67
+ exports->Set(context, InternalizedFromLatin1(isolate, "Backup"), Backup::Init(isolate, data)).FromJust();
68
+ exports->Set(context, InternalizedFromLatin1(isolate, "setErrorConstructor"), v8::FunctionTemplate::New(isolate, Addon::JS_setErrorConstructor, data)->GetFunction(context).ToLocalChecked()).FromJust();
69
+
70
+ // Store addon instance data.
71
+ addon->Statement.Reset(isolate, exports->Get(context, InternalizedFromLatin1(isolate, "Statement")).ToLocalChecked().As<v8::Function>());
72
+ addon->StatementIterator.Reset(isolate, exports->Get(context, InternalizedFromLatin1(isolate, "StatementIterator")).ToLocalChecked().As<v8::Function>());
73
+ addon->Backup.Reset(isolate, exports->Get(context, InternalizedFromLatin1(isolate, "Backup")).ToLocalChecked().As<v8::Function>());
74
+ }