inibase 1.1.6 → 1.1.7
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/index.d.ts +1 -1
- package/dist/index.js +5 -2
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export type pageInfo = {
|
|
|
40
40
|
export type Criteria = ({
|
|
41
41
|
[logic in "and" | "or"]?: Criteria | (string | number | boolean | null)[];
|
|
42
42
|
} & {
|
|
43
|
-
[key: string]: string | number | boolean | undefined | Criteria;
|
|
43
|
+
[key: string]: string | number | boolean | undefined | Criteria | (string | number | boolean)[];
|
|
44
44
|
}) | null;
|
|
45
45
|
type Entries<T> = {
|
|
46
46
|
[K in keyof T]: [K, T[K]];
|
package/dist/index.js
CHANGED
|
@@ -987,11 +987,14 @@ export default class Inibase {
|
|
|
987
987
|
}
|
|
988
988
|
const [searchResult, totalLines, linesNumbers] = await File.search(join(tablePath, `${key}${this.getFileExtension(tableName)}`), searchOperator ?? "=", searchComparedAtValue ?? null, searchLogicalOperator, allTrue ? searchIn : undefined, field?.type, field?.children, options.perPage, (options.page - 1) * options.perPage + 1, true, this.salt);
|
|
989
989
|
if (searchResult) {
|
|
990
|
-
|
|
990
|
+
const formatedSearchResult = Object.fromEntries(Object.entries(searchResult).map(([id, value]) => {
|
|
991
991
|
const nestedObj = {};
|
|
992
992
|
this._setNestedKey(nestedObj, key, value);
|
|
993
993
|
return [id, nestedObj];
|
|
994
|
-
}))
|
|
994
|
+
}));
|
|
995
|
+
RETURN = allTrue
|
|
996
|
+
? formatedSearchResult
|
|
997
|
+
: Utils.deepMerge(RETURN, formatedSearchResult);
|
|
995
998
|
this.totalItems.set(`${tableName}-${key}`, totalLines);
|
|
996
999
|
if (linesNumbers?.size) {
|
|
997
1000
|
if (searchIn) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "inibase",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Karim Amahtil",
|
|
@@ -69,9 +69,9 @@
|
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@biomejs/biome": "1.9.4",
|
|
72
|
-
"@evilmartians/lefthook": "^1.10.1",
|
|
73
72
|
"@types/bun": "^1.1.10",
|
|
74
73
|
"@types/node": "^22.7.4",
|
|
74
|
+
"lefthook": "^1.10.1",
|
|
75
75
|
"tinybench": "^3.0.7",
|
|
76
76
|
"typescript": "^5.7.2"
|
|
77
77
|
},
|