clawatch 1.0.7 → 1.0.8

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.
@@ -0,0 +1,80 @@
1
+ # ===
2
+ # This configuration defines options specific to compiling SQLite itself.
3
+ # Compile-time options are loaded by the auto-generated file "defines.gypi".
4
+ # The --sqlite3 option can be provided to use a custom amalgamation instead.
5
+ # ===
6
+
7
+ {
8
+ 'includes': ['common.gypi'],
9
+ 'targets': [
10
+ {
11
+ 'target_name': 'locate_sqlite3',
12
+ 'type': 'none',
13
+ 'hard_dependency': 1,
14
+ 'conditions': [
15
+ ['sqlite3 == ""', {
16
+ 'actions': [{
17
+ 'action_name': 'copy_builtin_sqlite3',
18
+ 'inputs': [
19
+ 'sqlite3/sqlite3.c',
20
+ 'sqlite3/sqlite3.h',
21
+ 'sqlite3/sqlite3ext.h',
22
+ ],
23
+ 'outputs': [
24
+ '<(SHARED_INTERMEDIATE_DIR)/sqlite3/sqlite3.c',
25
+ '<(SHARED_INTERMEDIATE_DIR)/sqlite3/sqlite3.h',
26
+ '<(SHARED_INTERMEDIATE_DIR)/sqlite3/sqlite3ext.h',
27
+ ],
28
+ 'action': ['node', 'copy.js', '<(SHARED_INTERMEDIATE_DIR)/sqlite3', ''],
29
+ }],
30
+ }, {
31
+ 'actions': [{
32
+ 'action_name': 'copy_custom_sqlite3',
33
+ 'inputs': [
34
+ '<(sqlite3)/sqlite3.c',
35
+ '<(sqlite3)/sqlite3.h',
36
+ ],
37
+ 'outputs': [
38
+ '<(SHARED_INTERMEDIATE_DIR)/sqlite3/sqlite3.c',
39
+ '<(SHARED_INTERMEDIATE_DIR)/sqlite3/sqlite3.h',
40
+ ],
41
+ 'action': ['node', 'copy.js', '<(SHARED_INTERMEDIATE_DIR)/sqlite3', '<(sqlite3)'],
42
+ }],
43
+ }],
44
+ ],
45
+ },
46
+ {
47
+ 'target_name': 'sqlite3',
48
+ 'type': 'static_library',
49
+ 'dependencies': ['locate_sqlite3'],
50
+ 'sources': ['<(SHARED_INTERMEDIATE_DIR)/sqlite3/sqlite3.c'],
51
+ 'include_dirs': ['<(SHARED_INTERMEDIATE_DIR)/sqlite3/'],
52
+ 'direct_dependent_settings': {
53
+ 'include_dirs': ['<(SHARED_INTERMEDIATE_DIR)/sqlite3/'],
54
+ },
55
+ 'cflags': ['-std=c99', '-w'],
56
+ 'xcode_settings': {
57
+ 'OTHER_CFLAGS': ['-std=c99'],
58
+ 'WARNING_CFLAGS': ['-w'],
59
+ },
60
+ 'conditions': [
61
+ ['sqlite3 == ""', {
62
+ 'includes': ['defines.gypi'],
63
+ }, {
64
+ 'defines': [
65
+ # This is currently required by better-sqlite3.
66
+ 'SQLITE_ENABLE_COLUMN_METADATA',
67
+ ],
68
+ }]
69
+ ],
70
+ 'configurations': {
71
+ 'Debug': {
72
+ 'msvs_settings': { 'VCCLCompilerTool': { 'RuntimeLibrary': 1 } }, # static debug
73
+ },
74
+ 'Release': {
75
+ 'msvs_settings': { 'VCCLCompilerTool': { 'RuntimeLibrary': 0 } }, # static release
76
+ },
77
+ },
78
+ },
79
+ ],
80
+ }
@@ -0,0 +1,21 @@
1
+ #include <sqlite3ext.h>
2
+ SQLITE_EXTENSION_INIT1
3
+
4
+ /*
5
+ This SQLite extension is used only for testing purposes (npm test).
6
+ */
7
+
8
+ static void TestExtensionFunction(sqlite3_context* pCtx, int nVal, sqlite3_value** _) {
9
+ sqlite3_result_double(pCtx, (double)nVal);
10
+ }
11
+
12
+ #ifdef _WIN32
13
+ __declspec(dllexport)
14
+ #endif
15
+
16
+ int sqlite3_extension_init(sqlite3* db, char** pzErrMsg, const sqlite3_api_routines* pApi) {
17
+ SQLITE_EXTENSION_INIT2(pApi)
18
+ if (pzErrMsg != 0) *pzErrMsg = 0;
19
+ sqlite3_create_function(db, "testExtensionFunction", -1, SQLITE_UTF8, 0, TestExtensionFunction, 0, 0);
20
+ return SQLITE_OK;
21
+ }