@equationalapplications/expo-llm-wiki 4.6.1 → 4.7.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/dist/{chunk-6DVBBIYR.mjs → chunk-I2HESFG7.mjs} +4 -3
- package/dist/chunk-I2HESFG7.mjs.map +1 -0
- package/dist/factory.js +3 -2
- package/dist/factory.js.map +1 -1
- package/dist/factory.mjs +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +3 -3
- package/dist/chunk-6DVBBIYR.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/adapter.ts
|
|
2
2
|
function createExpoAdapter(db) {
|
|
3
|
-
|
|
3
|
+
const adapter = {
|
|
4
4
|
execAsync: (sql) => db.execAsync(sql),
|
|
5
5
|
runAsync: async (sql, params = []) => {
|
|
6
6
|
const result = await db.runAsync(sql, params);
|
|
@@ -10,15 +10,16 @@ function createExpoAdapter(db) {
|
|
|
10
10
|
getFirstAsync: (sql, params = []) => db.getFirstAsync(sql, params),
|
|
11
11
|
withTransactionAsync: (fn) => {
|
|
12
12
|
let captured;
|
|
13
|
-
return db.withTransactionAsync(() => fn().then((v) => {
|
|
13
|
+
return db.withTransactionAsync(() => fn(adapter).then((v) => {
|
|
14
14
|
captured = v;
|
|
15
15
|
})).then(() => captured);
|
|
16
16
|
},
|
|
17
17
|
closeAsync: () => db.closeAsync()
|
|
18
18
|
};
|
|
19
|
+
return adapter;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
export {
|
|
22
23
|
createExpoAdapter
|
|
23
24
|
};
|
|
24
|
-
//# sourceMappingURL=chunk-
|
|
25
|
+
//# sourceMappingURL=chunk-I2HESFG7.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/adapter.ts"],"sourcesContent":["import type * as SQLite from 'expo-sqlite';\nimport type { SQLiteAdapter } from '@equationalapplications/core-llm-wiki';\n\nexport function createExpoAdapter(db: SQLite.SQLiteDatabase): SQLiteAdapter {\n const adapter: SQLiteAdapter = {\n execAsync: (sql) => db.execAsync(sql),\n runAsync: async (sql, params = []) => {\n const result = await db.runAsync(sql, params as any[]);\n return { changes: result.changes, lastInsertRowId: result.lastInsertRowId };\n },\n getAllAsync: (sql, params = []) => db.getAllAsync(sql, params as any[]),\n getFirstAsync: (sql, params = []) => db.getFirstAsync(sql, params as any[]),\n withTransactionAsync: <T>(fn: (tx: SQLiteAdapter) => Promise<T>): Promise<T> => {\n // expo-sqlite only accepts () => Promise<void>; capture the result to satisfy the generic interface\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let captured: any;\n return db.withTransactionAsync(() => fn(adapter).then(v => { captured = v; })).then(() => captured as T);\n },\n closeAsync: () => db.closeAsync(),\n };\n return adapter;\n}\n"],"mappings":";AAGO,SAAS,kBAAkB,IAA0C;AAC1E,QAAM,UAAyB;AAAA,IAC7B,WAAW,CAAC,QAAQ,GAAG,UAAU,GAAG;AAAA,IACpC,UAAU,OAAO,KAAK,SAAS,CAAC,MAAM;AACpC,YAAM,SAAS,MAAM,GAAG,SAAS,KAAK,MAAe;AACrD,aAAO,EAAE,SAAS,OAAO,SAAS,iBAAiB,OAAO,gBAAgB;AAAA,IAC5E;AAAA,IACA,aAAa,CAAC,KAAK,SAAS,CAAC,MAAM,GAAG,YAAY,KAAK,MAAe;AAAA,IACtE,eAAe,CAAC,KAAK,SAAS,CAAC,MAAM,GAAG,cAAc,KAAK,MAAe;AAAA,IAC1E,sBAAsB,CAAI,OAAsD;AAG9E,UAAI;AACJ,aAAO,GAAG,qBAAqB,MAAM,GAAG,OAAO,EAAE,KAAK,OAAK;AAAE,mBAAW;AAAA,MAAG,CAAC,CAAC,EAAE,KAAK,MAAM,QAAa;AAAA,IACzG;AAAA,IACA,YAAY,MAAM,GAAG,WAAW;AAAA,EAClC;AACA,SAAO;AACT;","names":[]}
|
package/dist/factory.js
CHANGED
|
@@ -27,7 +27,7 @@ var import_core_llm_wiki = require("@equationalapplications/core-llm-wiki");
|
|
|
27
27
|
|
|
28
28
|
// src/adapter.ts
|
|
29
29
|
function createExpoAdapter(db) {
|
|
30
|
-
|
|
30
|
+
const adapter = {
|
|
31
31
|
execAsync: (sql) => db.execAsync(sql),
|
|
32
32
|
runAsync: async (sql, params = []) => {
|
|
33
33
|
const result = await db.runAsync(sql, params);
|
|
@@ -37,12 +37,13 @@ function createExpoAdapter(db) {
|
|
|
37
37
|
getFirstAsync: (sql, params = []) => db.getFirstAsync(sql, params),
|
|
38
38
|
withTransactionAsync: (fn) => {
|
|
39
39
|
let captured;
|
|
40
|
-
return db.withTransactionAsync(() => fn().then((v) => {
|
|
40
|
+
return db.withTransactionAsync(() => fn(adapter).then((v) => {
|
|
41
41
|
captured = v;
|
|
42
42
|
})).then(() => captured);
|
|
43
43
|
},
|
|
44
44
|
closeAsync: () => db.closeAsync()
|
|
45
45
|
};
|
|
46
|
+
return adapter;
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
// src/factory.ts
|
package/dist/factory.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/factory.ts","../src/adapter.ts"],"sourcesContent":["import type * as SQLite from 'expo-sqlite';\nimport { WikiMemory, type WikiOptions } from '@equationalapplications/core-llm-wiki';\nimport { createExpoAdapter } from './adapter';\n\n/**\n * Create a WikiMemory instance from an expo-sqlite SQLiteDatabase.\n * This factory is exported as a separate subpath (`@equationalapplications/expo-llm-wiki/factory`)\n * so that callers can obtain `createWiki` without loading the React hooks\n * that `@equationalapplications/expo-llm-wiki`'s main entry re-exports from `@equationalapplications/react-llm-wiki`.\n */\nexport function createWiki(db: SQLite.SQLiteDatabase, options: WikiOptions): WikiMemory {\n return new WikiMemory(createExpoAdapter(db), options);\n}\n","import type * as SQLite from 'expo-sqlite';\nimport type { SQLiteAdapter } from '@equationalapplications/core-llm-wiki';\n\nexport function createExpoAdapter(db: SQLite.SQLiteDatabase): SQLiteAdapter {\n
|
|
1
|
+
{"version":3,"sources":["../src/factory.ts","../src/adapter.ts"],"sourcesContent":["import type * as SQLite from 'expo-sqlite';\nimport { WikiMemory, type WikiOptions } from '@equationalapplications/core-llm-wiki';\nimport { createExpoAdapter } from './adapter';\n\n/**\n * Create a WikiMemory instance from an expo-sqlite SQLiteDatabase.\n * This factory is exported as a separate subpath (`@equationalapplications/expo-llm-wiki/factory`)\n * so that callers can obtain `createWiki` without loading the React hooks\n * that `@equationalapplications/expo-llm-wiki`'s main entry re-exports from `@equationalapplications/react-llm-wiki`.\n */\nexport function createWiki(db: SQLite.SQLiteDatabase, options: WikiOptions): WikiMemory {\n return new WikiMemory(createExpoAdapter(db), options);\n}\n","import type * as SQLite from 'expo-sqlite';\nimport type { SQLiteAdapter } from '@equationalapplications/core-llm-wiki';\n\nexport function createExpoAdapter(db: SQLite.SQLiteDatabase): SQLiteAdapter {\n const adapter: SQLiteAdapter = {\n execAsync: (sql) => db.execAsync(sql),\n runAsync: async (sql, params = []) => {\n const result = await db.runAsync(sql, params as any[]);\n return { changes: result.changes, lastInsertRowId: result.lastInsertRowId };\n },\n getAllAsync: (sql, params = []) => db.getAllAsync(sql, params as any[]),\n getFirstAsync: (sql, params = []) => db.getFirstAsync(sql, params as any[]),\n withTransactionAsync: <T>(fn: (tx: SQLiteAdapter) => Promise<T>): Promise<T> => {\n // expo-sqlite only accepts () => Promise<void>; capture the result to satisfy the generic interface\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let captured: any;\n return db.withTransactionAsync(() => fn(adapter).then(v => { captured = v; })).then(() => captured as T);\n },\n closeAsync: () => db.closeAsync(),\n };\n return adapter;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,2BAA6C;;;ACEtC,SAAS,kBAAkB,IAA0C;AAC1E,QAAM,UAAyB;AAAA,IAC7B,WAAW,CAAC,QAAQ,GAAG,UAAU,GAAG;AAAA,IACpC,UAAU,OAAO,KAAK,SAAS,CAAC,MAAM;AACpC,YAAM,SAAS,MAAM,GAAG,SAAS,KAAK,MAAe;AACrD,aAAO,EAAE,SAAS,OAAO,SAAS,iBAAiB,OAAO,gBAAgB;AAAA,IAC5E;AAAA,IACA,aAAa,CAAC,KAAK,SAAS,CAAC,MAAM,GAAG,YAAY,KAAK,MAAe;AAAA,IACtE,eAAe,CAAC,KAAK,SAAS,CAAC,MAAM,GAAG,cAAc,KAAK,MAAe;AAAA,IAC1E,sBAAsB,CAAI,OAAsD;AAG9E,UAAI;AACJ,aAAO,GAAG,qBAAqB,MAAM,GAAG,OAAO,EAAE,KAAK,OAAK;AAAE,mBAAW;AAAA,MAAG,CAAC,CAAC,EAAE,KAAK,MAAM,QAAa;AAAA,IACzG;AAAA,IACA,YAAY,MAAM,GAAG,WAAW;AAAA,EAClC;AACA,SAAO;AACT;;;ADXO,SAAS,WAAW,IAA2B,SAAkC;AACtF,SAAO,IAAI,gCAAW,kBAAkB,EAAE,GAAG,OAAO;AACtD;","names":[]}
|
package/dist/factory.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -28,7 +28,7 @@ var import_core_llm_wiki = require("@equationalapplications/core-llm-wiki");
|
|
|
28
28
|
|
|
29
29
|
// src/adapter.ts
|
|
30
30
|
function createExpoAdapter(db) {
|
|
31
|
-
|
|
31
|
+
const adapter = {
|
|
32
32
|
execAsync: (sql) => db.execAsync(sql),
|
|
33
33
|
runAsync: async (sql, params = []) => {
|
|
34
34
|
const result = await db.runAsync(sql, params);
|
|
@@ -38,12 +38,13 @@ function createExpoAdapter(db) {
|
|
|
38
38
|
getFirstAsync: (sql, params = []) => db.getFirstAsync(sql, params),
|
|
39
39
|
withTransactionAsync: (fn) => {
|
|
40
40
|
let captured;
|
|
41
|
-
return db.withTransactionAsync(() => fn().then((v) => {
|
|
41
|
+
return db.withTransactionAsync(() => fn(adapter).then((v) => {
|
|
42
42
|
captured = v;
|
|
43
43
|
})).then(() => captured);
|
|
44
44
|
},
|
|
45
45
|
closeAsync: () => db.closeAsync()
|
|
46
46
|
};
|
|
47
|
+
return adapter;
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
// src/index.ts
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/adapter.ts"],"sourcesContent":["import type * as SQLite from 'expo-sqlite';\nimport { WikiMemory, type WikiOptions } from '@equationalapplications/core-llm-wiki';\nimport { createExpoAdapter } from './adapter';\n\n// Re-exports all core types and utilities. The `createWiki` exported below\n// intentionally shadows the one from @equationalapplications/core-llm-wiki, binding the expo-sqlite adapter.\nexport * from '@equationalapplications/core-llm-wiki';\nexport * from '@equationalapplications/react-llm-wiki';\n\nexport function createWiki(db: SQLite.SQLiteDatabase, options: WikiOptions): WikiMemory {\n return new WikiMemory(createExpoAdapter(db), options);\n}\n","import type * as SQLite from 'expo-sqlite';\nimport type { SQLiteAdapter } from '@equationalapplications/core-llm-wiki';\n\nexport function createExpoAdapter(db: SQLite.SQLiteDatabase): SQLiteAdapter {\n
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/adapter.ts"],"sourcesContent":["import type * as SQLite from 'expo-sqlite';\nimport { WikiMemory, type WikiOptions } from '@equationalapplications/core-llm-wiki';\nimport { createExpoAdapter } from './adapter';\n\n// Re-exports all core types and utilities. The `createWiki` exported below\n// intentionally shadows the one from @equationalapplications/core-llm-wiki, binding the expo-sqlite adapter.\nexport * from '@equationalapplications/core-llm-wiki';\nexport * from '@equationalapplications/react-llm-wiki';\n\nexport function createWiki(db: SQLite.SQLiteDatabase, options: WikiOptions): WikiMemory {\n return new WikiMemory(createExpoAdapter(db), options);\n}\n","import type * as SQLite from 'expo-sqlite';\nimport type { SQLiteAdapter } from '@equationalapplications/core-llm-wiki';\n\nexport function createExpoAdapter(db: SQLite.SQLiteDatabase): SQLiteAdapter {\n const adapter: SQLiteAdapter = {\n execAsync: (sql) => db.execAsync(sql),\n runAsync: async (sql, params = []) => {\n const result = await db.runAsync(sql, params as any[]);\n return { changes: result.changes, lastInsertRowId: result.lastInsertRowId };\n },\n getAllAsync: (sql, params = []) => db.getAllAsync(sql, params as any[]),\n getFirstAsync: (sql, params = []) => db.getFirstAsync(sql, params as any[]),\n withTransactionAsync: <T>(fn: (tx: SQLiteAdapter) => Promise<T>): Promise<T> => {\n // expo-sqlite only accepts () => Promise<void>; capture the result to satisfy the generic interface\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let captured: any;\n return db.withTransactionAsync(() => fn(adapter).then(v => { captured = v; })).then(() => captured as T);\n },\n closeAsync: () => db.closeAsync(),\n };\n return adapter;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,2BAA6C;;;ACEtC,SAAS,kBAAkB,IAA0C;AAC1E,QAAM,UAAyB;AAAA,IAC7B,WAAW,CAAC,QAAQ,GAAG,UAAU,GAAG;AAAA,IACpC,UAAU,OAAO,KAAK,SAAS,CAAC,MAAM;AACpC,YAAM,SAAS,MAAM,GAAG,SAAS,KAAK,MAAe;AACrD,aAAO,EAAE,SAAS,OAAO,SAAS,iBAAiB,OAAO,gBAAgB;AAAA,IAC5E;AAAA,IACA,aAAa,CAAC,KAAK,SAAS,CAAC,MAAM,GAAG,YAAY,KAAK,MAAe;AAAA,IACtE,eAAe,CAAC,KAAK,SAAS,CAAC,MAAM,GAAG,cAAc,KAAK,MAAe;AAAA,IAC1E,sBAAsB,CAAI,OAAsD;AAG9E,UAAI;AACJ,aAAO,GAAG,qBAAqB,MAAM,GAAG,OAAO,EAAE,KAAK,OAAK;AAAE,mBAAW;AAAA,MAAG,CAAC,CAAC,EAAE,KAAK,MAAM,QAAa;AAAA,IACzG;AAAA,IACA,YAAY,MAAM,GAAG,WAAW;AAAA,EAClC;AACA,SAAO;AACT;;;ADfA,0BAAc,kDANd;AAOA,0BAAc,mDAPd;AASO,SAAS,WAAW,IAA2B,SAAkC;AACtF,SAAO,IAAI,gCAAW,kBAAkB,EAAE,GAAG,OAAO;AACtD;","names":[]}
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equationalapplications/expo-llm-wiki",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.7.0",
|
|
4
4
|
"description": "Expo/React Native adapter for @equationalapplications/core-llm-wiki.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"registry": "https://registry.npmjs.org"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@equationalapplications/
|
|
32
|
-
"@equationalapplications/
|
|
31
|
+
"@equationalapplications/react-llm-wiki": "4.7.0",
|
|
32
|
+
"@equationalapplications/core-llm-wiki": "4.7.0"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"expo-sqlite": "^14.0.0 || ^15.0.0 || ^55.0.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/adapter.ts"],"sourcesContent":["import type * as SQLite from 'expo-sqlite';\nimport type { SQLiteAdapter } from '@equationalapplications/core-llm-wiki';\n\nexport function createExpoAdapter(db: SQLite.SQLiteDatabase): SQLiteAdapter {\n return {\n execAsync: (sql) => db.execAsync(sql),\n runAsync: async (sql, params = []) => {\n const result = await db.runAsync(sql, params as any[]);\n return { changes: result.changes, lastInsertRowId: result.lastInsertRowId };\n },\n getAllAsync: (sql, params = []) => db.getAllAsync(sql, params as any[]),\n getFirstAsync: (sql, params = []) => db.getFirstAsync(sql, params as any[]),\n withTransactionAsync: (fn) => {\n // expo-sqlite only accepts () => Promise<void>; capture the result to satisfy the generic interface\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let captured: any;\n return db.withTransactionAsync(() => fn().then(v => { captured = v; })).then(() => captured);\n },\n closeAsync: () => db.closeAsync(),\n };\n}\n"],"mappings":";AAGO,SAAS,kBAAkB,IAA0C;AAC1E,SAAO;AAAA,IACL,WAAW,CAAC,QAAQ,GAAG,UAAU,GAAG;AAAA,IACpC,UAAU,OAAO,KAAK,SAAS,CAAC,MAAM;AACpC,YAAM,SAAS,MAAM,GAAG,SAAS,KAAK,MAAe;AACrD,aAAO,EAAE,SAAS,OAAO,SAAS,iBAAiB,OAAO,gBAAgB;AAAA,IAC5E;AAAA,IACA,aAAa,CAAC,KAAK,SAAS,CAAC,MAAM,GAAG,YAAY,KAAK,MAAe;AAAA,IACtE,eAAe,CAAC,KAAK,SAAS,CAAC,MAAM,GAAG,cAAc,KAAK,MAAe;AAAA,IAC1E,sBAAsB,CAAC,OAAO;AAG5B,UAAI;AACJ,aAAO,GAAG,qBAAqB,MAAM,GAAG,EAAE,KAAK,OAAK;AAAE,mBAAW;AAAA,MAAG,CAAC,CAAC,EAAE,KAAK,MAAM,QAAQ;AAAA,IAC7F;AAAA,IACA,YAAY,MAAM,GAAG,WAAW;AAAA,EAClC;AACF;","names":[]}
|