@cpp.js/package-sqlite3 1.0.0-beta.21

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.
Files changed (42) hide show
  1. package/LICENSE +91 -0
  2. package/README.md +47 -0
  3. package/cppjs-package-sqlite3.podspec +13 -0
  4. package/cppjs.build.js +21 -0
  5. package/cppjs.config.js +18 -0
  6. package/dist/prebuilt/Android-arm64-v8a/bin/sqlite3 +0 -0
  7. package/dist/prebuilt/Android-arm64-v8a/include/sqlite3.h +13425 -0
  8. package/dist/prebuilt/Android-arm64-v8a/include/sqlite3ext.h +719 -0
  9. package/dist/prebuilt/Android-arm64-v8a/lib/libsqlite3.la +41 -0
  10. package/dist/prebuilt/Android-arm64-v8a/lib/libsqlite3.so +0 -0
  11. package/dist/prebuilt/Android-arm64-v8a/lib/pkgconfig/sqlite3.pc +13 -0
  12. package/dist/prebuilt/Android-arm64-v8a/share/man/man1/sqlite3.1 +161 -0
  13. package/dist/prebuilt/CMakeLists.txt +44 -0
  14. package/dist/prebuilt/Emscripten-x86_64/bin/sqlite3 +5808 -0
  15. package/dist/prebuilt/Emscripten-x86_64/include/sqlite3.h +13425 -0
  16. package/dist/prebuilt/Emscripten-x86_64/include/sqlite3ext.h +719 -0
  17. package/dist/prebuilt/Emscripten-x86_64/lib/libsqlite3.a +0 -0
  18. package/dist/prebuilt/Emscripten-x86_64/lib/libsqlite3.la +41 -0
  19. package/dist/prebuilt/Emscripten-x86_64/lib/pkgconfig/sqlite3.pc +13 -0
  20. package/dist/prebuilt/Emscripten-x86_64/share/man/man1/sqlite3.1 +161 -0
  21. package/dist/prebuilt/iOS-iphoneos/bin/sqlite3 +0 -0
  22. package/dist/prebuilt/iOS-iphoneos/include/sqlite3.h +13425 -0
  23. package/dist/prebuilt/iOS-iphoneos/include/sqlite3ext.h +719 -0
  24. package/dist/prebuilt/iOS-iphoneos/lib/libsqlite3.a +0 -0
  25. package/dist/prebuilt/iOS-iphoneos/lib/libsqlite3.la +41 -0
  26. package/dist/prebuilt/iOS-iphoneos/lib/pkgconfig/sqlite3.pc +13 -0
  27. package/dist/prebuilt/iOS-iphoneos/share/man/man1/sqlite3.1 +161 -0
  28. package/dist/prebuilt/iOS-iphonesimulator/bin/sqlite3 +0 -0
  29. package/dist/prebuilt/iOS-iphonesimulator/include/sqlite3.h +13425 -0
  30. package/dist/prebuilt/iOS-iphonesimulator/include/sqlite3ext.h +719 -0
  31. package/dist/prebuilt/iOS-iphonesimulator/lib/libsqlite3.a +0 -0
  32. package/dist/prebuilt/iOS-iphonesimulator/lib/libsqlite3.la +41 -0
  33. package/dist/prebuilt/iOS-iphonesimulator/lib/pkgconfig/sqlite3.pc +13 -0
  34. package/dist/prebuilt/iOS-iphonesimulator/share/man/man1/sqlite3.1 +161 -0
  35. package/dist/prebuilt/sqlite3.xcframework/Info.plist +50 -0
  36. package/dist/prebuilt/sqlite3.xcframework/ios-arm64_arm64e/Headers/sqlite3.h +13425 -0
  37. package/dist/prebuilt/sqlite3.xcframework/ios-arm64_arm64e/Headers/sqlite3ext.h +719 -0
  38. package/dist/prebuilt/sqlite3.xcframework/ios-arm64_arm64e/libsqlite3.a +0 -0
  39. package/dist/prebuilt/sqlite3.xcframework/ios-arm64_arm64e_x86_64-simulator/Headers/sqlite3.h +13425 -0
  40. package/dist/prebuilt/sqlite3.xcframework/ios-arm64_arm64e_x86_64-simulator/Headers/sqlite3ext.h +719 -0
  41. package/dist/prebuilt/sqlite3.xcframework/ios-arm64_arm64e_x86_64-simulator/libsqlite3.a +0 -0
  42. package/package.json +33 -0
package/LICENSE ADDED
@@ -0,0 +1,91 @@
1
+ License Information
2
+ ===================
3
+
4
+ SQLite Is Public Domain
5
+ -----------------------
6
+
7
+ The SQLite source code, including all of the files in the directories
8
+ listed in the bullets below are
9
+ [Public Domain](https://sqlite.org/copyright.html).
10
+ The authors have submitted written affidavits releasing their work to
11
+ the public for any use. Every byte of the public-domain code can be
12
+ traced back to the original authors. The files of this repository
13
+ that are public domain include the following:
14
+
15
+ * All of the primary SQLite source code files found in the
16
+ [src/ directory](https://sqlite.org/src/tree/src?type=tree&expand)
17
+ * All of the test cases and testing code in the
18
+ [test/ directory](https://sqlite.org/src/tree/test?type=tree&expand)
19
+ * All of the SQLite extension source code and test cases in the
20
+ [ext/ directory](https://sqlite.org/src/tree/ext?type=tree&expand)
21
+ * All code that ends up in the "sqlite3.c" and "sqlite3.h" build products
22
+ that actually implement the SQLite RDBMS.
23
+ * All of the code used to compile the
24
+ [command-line interface](https://sqlite.org/cli.html)
25
+ * All of the code used to build various utility programs such as
26
+ "sqldiff", "sqlite3_rsync", and "sqlite3_analyzer".
27
+
28
+
29
+ The public domain source files usually contain a header comment
30
+ similar to the following to make it clear that the software is
31
+ public domain.
32
+
33
+ > ~~~
34
+ The author disclaims copyright to this source code. In place of
35
+ a legal notice, here is a blessing:
36
+
37
+ * May you do good and not evil.
38
+ * May you find forgiveness for yourself and forgive others.
39
+ * May you share freely, never taking more than you give.
40
+ ~~~
41
+
42
+ Almost every file you find in this source repository will be
43
+ public domain. But there are a small number of exceptions:
44
+
45
+ Non-Public-Domain Code Included With This Source Repository AS A Convenience
46
+ ----------------------------------------------------------------------------
47
+
48
+ This repository contains a (relatively) small amount of non-public-domain
49
+ code used to help implement the configuration and build logic. In other
50
+ words, there are some non-public-domain files used to implement:
51
+
52
+ > ~~~
53
+ ./configure && make
54
+ ~~~
55
+
56
+ In all cases, the non-public-domain files included with this
57
+ repository have generous BSD-style licenses. So anyone is free to
58
+ use any of the code in this source repository for any purpose, though
59
+ attribution may be required to reuse or republish the configure and
60
+ build scripts. None of the non-public-domain code ever actually reaches
61
+ the build products, such as "sqlite3.c", however, so no attribution is
62
+ required to use SQLite itself. The non-public-domain code consists of
63
+ scripts used to help compile SQLite. The non-public-domain code is
64
+ technically not part of SQLite. The non-public-domain code is
65
+ included in this repository as a convenience to developers, so that those
66
+ who want to build SQLite do not need to go download a bunch of
67
+ third-party build scripts in order to compile SQLite.
68
+
69
+ Non-public-domain code included in this respository includes:
70
+
71
+ * The ["autosetup"](http://msteveb.github.io/autosetup/) configuration
72
+ system that is contained (mostly) the autosetup/ directory, but also
73
+ includes the "./configure" script at the top-level of this archive.
74
+ Autosetup has a separate BSD-style license. See the
75
+ [autosetup/LICENSE](http://msteveb.github.io/autosetup/license/)
76
+ for details.
77
+
78
+ * There are BSD-style licenses on some of the configuration
79
+ software found in the legacy autoconf/ directory and its
80
+ subdirectories.
81
+
82
+ The following unix shell command is can be run from the top-level
83
+ of this source repository in order to remove all non-public-domain
84
+ code:
85
+
86
+ > ~~~
87
+ rm -rf configure autosetup autoconf
88
+ ~~~
89
+
90
+ If you unpack this source repository and then run the command above, what
91
+ is left will be 100% public domain.
package/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # @cpp.js/package-sqlite3
2
+ **Precompiled sqlite3 library built with cpp.js for seamless integration in JavaScript, WebAssembly and React Native projects.**
3
+
4
+ <a href="https://www.npmjs.com/package/@cpp.js/package-sqlite3">
5
+ <img alt="NPM version" src="https://img.shields.io/npm/v/@cpp.js/package-sqlite3?style=for-the-badge" />
6
+ </a>
7
+ <a href="https://www.sqlite.org/copyright.html">
8
+ <img alt="License" src="https://img.shields.io/npm/l/%40cpp.js%2Fpackage-sqlite3?style=for-the-badge" />
9
+ </a>
10
+
11
+ ## Integration
12
+ Start by installing these package with the following command:
13
+
14
+ ```sh
15
+ npm install @cpp.js/package-sqlite3
16
+ ```
17
+
18
+ To enable the library, modify the cppjs.config.js file as shown below.
19
+ ```diff
20
+ +import sqlite3 from '@cpp.js/package-sqlite3/cppjs.config.js';
21
+
22
+ export default {
23
+ dependencies: [
24
+ + sqlite3
25
+ ]
26
+ paths: {
27
+ config: import.meta.url,
28
+ }
29
+ };
30
+ ```
31
+
32
+ ## Usage
33
+ Below are the steps to use the sqlite3 in your C++ or JavaScript code.
34
+
35
+ ### Usage in C++ Code
36
+ ```diff
37
+ +#include <sqlite3.h>
38
+
39
+ std::string Native::sample() {
40
+ + return std::string(sqlite3_libversion());
41
+ }
42
+ ```
43
+
44
+ ## License
45
+ This project includes the precompiled sqlite3 library, which is distributed under the [Public Domain License](https://www.sqlite.org/copyright.html).
46
+
47
+ Sqlite3 Homepage: <https://www.sqlite.org>
@@ -0,0 +1,13 @@
1
+ require "json"
2
+ package = JSON.parse(File.read(File.join(__dir__, "package.json")))
3
+
4
+ Pod::Spec.new do |s|
5
+ s.module_name = "sqlite3"
6
+ s.name = package["name"]
7
+ s.version = package["nativeVersion"]
8
+ s.summary = "SQLite is a C-language library that implements a small, fast, self-contained, high-reliability, full-featured, SQL database engine."
9
+ s.homepage = "https://www.sqlite.org"
10
+ s.author = "SQLite Authors"
11
+ s.source = { :http => "https://cpp.js.org" }
12
+ s.vendored_frameworks = 'z.xcframework', 'sqlite3.xcframework'
13
+ end
package/cppjs.build.js ADDED
@@ -0,0 +1,21 @@
1
+ const platformBuild = {
2
+ 'Emscripten-x86_64': ['--enable-shared=no', '--host=wasm32-unknown-emscripten'],
3
+ 'Android-arm64-v8a': ['--enable-static=no', '--host=aarch64-linux-android'],
4
+ 'iOS-iphoneos': ['--enable-shared=no', '--host=arm-apple-darwin'],
5
+ 'iOS-iphonesimulator': ['--enable-shared=no', '--host=x86_64-apple-darwin'],
6
+ };
7
+
8
+ export default {
9
+ getURL: (version) => {
10
+ const versionArray = version.split('.');
11
+ const VERSION = (versionArray[0] * 1000000 + versionArray[1] * 10000 + versionArray[2] * 100).toString();
12
+ return `https://www.sqlite.org/2024/sqlite-autoconf-${VERSION}.tar.gz`;
13
+ },
14
+ buildType: 'configure',
15
+ getBuildParams: (platform) => [
16
+ ...(platformBuild[platform] || []),
17
+ ],
18
+ env: [
19
+ 'CFLAGS="-DSQLITE_NOHAVE_SYSTEM -DSQLITE_DISABLE_LFS -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_NORMALIZE -DSQLITE_ENABLE_COLUMN_METADATA"',
20
+ ],
21
+ };
@@ -0,0 +1,18 @@
1
+ import zlib from '@cpp.js/package-zlib/cppjs.config.js';
2
+
3
+ export default {
4
+ general: {
5
+ name: 'sqlite3',
6
+ },
7
+ export: {
8
+ type: 'cmake',
9
+ },
10
+ dependencies: [
11
+ zlib,
12
+ ],
13
+ paths: {
14
+ config: import.meta.url,
15
+ base: '../..',
16
+ output: 'dist',
17
+ },
18
+ };