@lunarhue/react-native-web-wa-sqlite 1.0.11 → 1.0.12
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 +2 -2
- package/package.json +1 -1
- package/src/types/index.d.ts +15 -15
- package/test/callbacks.test.js +2 -2
package/README.md
CHANGED
|
@@ -35,8 +35,8 @@ The default build produces ES6 modules + WASM, [synchronous and asynchronous](ht
|
|
|
35
35
|
Javascript wrappers for core SQLITE C API functions (and some others) are provided. Some convenience functions are also provided to reduce boilerplate. Here is sample code to load the library and call the API:
|
|
36
36
|
|
|
37
37
|
```javascript
|
|
38
|
-
import SQLiteESMFactory from 'wa-sqlite/dist/wa-sqlite.mjs';
|
|
39
|
-
import * as SQLite from 'wa-sqlite';
|
|
38
|
+
import SQLiteESMFactory from '@lunarhue/react-native-web-wa-sqlite/dist/wa-sqlite.mjs';
|
|
39
|
+
import * as SQLite from '@lunarhue/react-native-web-wa-sqlite';
|
|
40
40
|
|
|
41
41
|
async function hello() {
|
|
42
42
|
const module = await SQLiteESMFactory();
|
package/package.json
CHANGED
package/src/types/index.d.ts
CHANGED
|
@@ -157,14 +157,14 @@ declare interface SQLitePrepareOptions {
|
|
|
157
157
|
*
|
|
158
158
|
* ```javascript
|
|
159
159
|
* // Import an ES6 module factory function from one of the
|
|
160
|
-
* // package builds, either 'wa-sqlite.mjs' (synchronous) or
|
|
161
|
-
* // 'wa-sqlite-async.mjs' (asynchronous). You should only
|
|
160
|
+
* // package builds, either '@lunarhue/react-native-web-wa-sqlite.mjs' (synchronous) or
|
|
161
|
+
* // '@lunarhue/react-native-web-wa-sqlite-async.mjs' (asynchronous). You should only
|
|
162
162
|
* // use the asynchronous build if you plan to use an
|
|
163
163
|
* // asynchronous VFS or module.
|
|
164
|
-
* import SQLiteESMFactory from 'wa-sqlite/dist/wa-sqlite.mjs';
|
|
164
|
+
* import SQLiteESMFactory from '@lunarhue/react-native-web-wa-sqlite/dist/wa-sqlite.mjs';
|
|
165
165
|
*
|
|
166
166
|
* // Import the Javascript API wrappers.
|
|
167
|
-
* import * as SQLite from 'wa-sqlite';
|
|
167
|
+
* import * as SQLite from '@lunarhue/react-native-web-wa-sqlite';
|
|
168
168
|
*
|
|
169
169
|
* // Use an async function to simplify Promise handling.
|
|
170
170
|
* (async function() {
|
|
@@ -858,7 +858,7 @@ declare interface SQLiteAPI {
|
|
|
858
858
|
}
|
|
859
859
|
|
|
860
860
|
/** @ignore */
|
|
861
|
-
declare module 'wa-sqlite/src/sqlite-constants.js' {
|
|
861
|
+
declare module '@lunarhue/react-native-web-wa-sqlite/src/sqlite-constants.js' {
|
|
862
862
|
export const SQLITE_OK: 0;
|
|
863
863
|
export const SQLITE_ERROR: 1;
|
|
864
864
|
export const SQLITE_INTERNAL: 2;
|
|
@@ -1093,8 +1093,8 @@ declare module 'wa-sqlite/src/sqlite-constants.js' {
|
|
|
1093
1093
|
export const SQLITE_PREPARE_NO_VTAB: 0x04;
|
|
1094
1094
|
}
|
|
1095
1095
|
|
|
1096
|
-
declare module 'wa-sqlite' {
|
|
1097
|
-
export * from 'wa-sqlite/src/sqlite-constants.js';
|
|
1096
|
+
declare module '@lunarhue/react-native-web-wa-sqlite' {
|
|
1097
|
+
export * from '@lunarhue/react-native-web-wa-sqlite/src/sqlite-constants.js';
|
|
1098
1098
|
|
|
1099
1099
|
/**
|
|
1100
1100
|
* @ignore
|
|
@@ -1113,20 +1113,20 @@ declare module 'wa-sqlite' {
|
|
|
1113
1113
|
}
|
|
1114
1114
|
|
|
1115
1115
|
/** @ignore */
|
|
1116
|
-
declare module 'wa-sqlite/dist/wa-sqlite.mjs' {
|
|
1116
|
+
declare module '@lunarhue/react-native-web-wa-sqlite/dist/wa-sqlite.mjs' {
|
|
1117
1117
|
function ModuleFactory(config?: object): Promise<any>;
|
|
1118
1118
|
export = ModuleFactory;
|
|
1119
1119
|
}
|
|
1120
1120
|
|
|
1121
1121
|
/** @ignore */
|
|
1122
|
-
declare module 'wa-sqlite/dist/wa-sqlite-async.mjs' {
|
|
1122
|
+
declare module '@lunarhue/react-native-web-wa-sqlite/dist/wa-sqlite-async.mjs' {
|
|
1123
1123
|
function ModuleFactory(config?: object): Promise<any>;
|
|
1124
1124
|
export = ModuleFactory;
|
|
1125
1125
|
}
|
|
1126
1126
|
|
|
1127
1127
|
/** @ignore */
|
|
1128
|
-
declare module 'wa-sqlite/src/VFS.js' {
|
|
1129
|
-
export * from 'wa-sqlite/src/sqlite-constants.js';
|
|
1128
|
+
declare module '@lunarhue/react-native-web-wa-sqlite/src/VFS.js' {
|
|
1129
|
+
export * from '@lunarhue/react-native-web-wa-sqlite/src/sqlite-constants.js';
|
|
1130
1130
|
|
|
1131
1131
|
export class Base {
|
|
1132
1132
|
mxPathName: number;
|
|
@@ -1241,7 +1241,7 @@ declare module 'wa-sqlite/src/VFS.js' {
|
|
|
1241
1241
|
}
|
|
1242
1242
|
|
|
1243
1243
|
/** @ignore */
|
|
1244
|
-
declare module 'wa-sqlite/src/examples/IndexedDbVFS.js' {
|
|
1244
|
+
declare module '@lunarhue/react-native-web-wa-sqlite/src/examples/IndexedDbVFS.js' {
|
|
1245
1245
|
import * as VFS from "wa-sqlite/src/VFS.js";
|
|
1246
1246
|
export class IndexedDbVFS extends VFS.Base {
|
|
1247
1247
|
/**
|
|
@@ -1294,7 +1294,7 @@ declare module 'wa-sqlite/src/examples/IndexedDbVFS.js' {
|
|
|
1294
1294
|
}
|
|
1295
1295
|
|
|
1296
1296
|
/** @ignore */
|
|
1297
|
-
declare module 'wa-sqlite/src/examples/MemoryVFS.js' {
|
|
1297
|
+
declare module '@lunarhue/react-native-web-wa-sqlite/src/examples/MemoryVFS.js' {
|
|
1298
1298
|
import * as VFS from "wa-sqlite/src/VFS.js";
|
|
1299
1299
|
/** @ignore */
|
|
1300
1300
|
export class MemoryVFS extends VFS.Base {
|
|
@@ -1305,14 +1305,14 @@ declare module 'wa-sqlite/src/examples/MemoryVFS.js' {
|
|
|
1305
1305
|
}
|
|
1306
1306
|
|
|
1307
1307
|
/** @ignore */
|
|
1308
|
-
declare module 'wa-sqlite/src/examples/MemoryAsyncVFS.js' {
|
|
1308
|
+
declare module '@lunarhue/react-native-web-wa-sqlite/src/examples/MemoryAsyncVFS.js' {
|
|
1309
1309
|
import { MemoryVFS } from "wa-sqlite/src/examples/MemoryVFS.js";
|
|
1310
1310
|
export class MemoryAsyncVFS extends MemoryVFS {
|
|
1311
1311
|
}
|
|
1312
1312
|
}
|
|
1313
1313
|
|
|
1314
1314
|
/** @ignore */
|
|
1315
|
-
declare module 'wa-sqlite/src/examples/tag.js' {
|
|
1315
|
+
declare module '@lunarhue/react-native-web-wa-sqlite/src/examples/tag.js' {
|
|
1316
1316
|
/**
|
|
1317
1317
|
* @ignore
|
|
1318
1318
|
* Template tag builder. This function creates a tag with an API and
|
package/test/callbacks.test.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TestContext } from "./TestContext.js";
|
|
2
|
-
import AsyncifyFactory from 'wa-sqlite/dist/wa-sqlite-async.mjs';
|
|
3
|
-
import JSPIFactory from 'wa-sqlite/dist/wa-sqlite-jspi.mjs';
|
|
2
|
+
import AsyncifyFactory from '@lunarhue/react-native-web-wa-sqlite/dist/wa-sqlite-async.mjs';
|
|
3
|
+
import JSPIFactory from '@lunarhue/react-native-web-wa-sqlite/dist/wa-sqlite-jspi.mjs';
|
|
4
4
|
import * as SQLite from '../src/sqlite-api.js';
|
|
5
5
|
|
|
6
6
|
const FACTORIES = new Map([
|