silosdk 0.0.0 → 0.0.2
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/source.cjs +161 -0
- package/dist/source.d.cts +29 -0
- package/dist/source.d.mts +29 -0
- package/dist/source.mjs +161 -0
- package/package.json +53 -2
- package/README.md +0 -1
package/dist/source.cjs
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
let expo_sqlite = require("expo-sqlite");
|
|
2
|
+
|
|
3
|
+
//#region src/source/index.ts
|
|
4
|
+
const sourceNames = /* @__PURE__ */ new Set();
|
|
5
|
+
const sourceNamePattern = /^[A-Za-z][A-Za-z0-9_-]*$/;
|
|
6
|
+
function source(name, defaults) {
|
|
7
|
+
assertSourceName(name);
|
|
8
|
+
assertFlatDefaults(name, defaults);
|
|
9
|
+
if (sourceNames.has(name)) throw new Error(`Source "${name}" is already registered. Define each source once and import the existing source instead.`);
|
|
10
|
+
sourceNames.add(name);
|
|
11
|
+
const schema = createSourceSchema(name, defaults);
|
|
12
|
+
return {
|
|
13
|
+
name,
|
|
14
|
+
defaults,
|
|
15
|
+
schema,
|
|
16
|
+
collectionOptions(options = {}) {
|
|
17
|
+
return {
|
|
18
|
+
id: name,
|
|
19
|
+
getKey: (item) => item.id,
|
|
20
|
+
schema,
|
|
21
|
+
startSync: options.startSync,
|
|
22
|
+
sync: { sync({ begin, write, commit, markReady, truncate }) {
|
|
23
|
+
const rows = loadRows(name);
|
|
24
|
+
begin();
|
|
25
|
+
truncate();
|
|
26
|
+
for (const row of rows) write({
|
|
27
|
+
type: "insert",
|
|
28
|
+
value: row
|
|
29
|
+
});
|
|
30
|
+
commit();
|
|
31
|
+
markReady();
|
|
32
|
+
} },
|
|
33
|
+
onInsert: async ({ transaction }) => {
|
|
34
|
+
await insertRows(name, transaction.mutations.map((mutation) => mutation.modified));
|
|
35
|
+
},
|
|
36
|
+
onUpdate: async ({ transaction }) => {
|
|
37
|
+
await updateRows(name, transaction.mutations);
|
|
38
|
+
},
|
|
39
|
+
onDelete: async ({ transaction }) => {
|
|
40
|
+
await deleteRows(name, transaction.mutations.map((mutation) => mutation.key));
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function assertSourceName(name) {
|
|
47
|
+
if (!sourceNamePattern.test(name)) throw new Error(`Source names must start with a letter and contain only letters, numbers, underscores, or hyphens. Received "${name}".`);
|
|
48
|
+
}
|
|
49
|
+
function assertFlatDefaults(sourceName, defaults) {
|
|
50
|
+
for (const [field, defaultValue] of Object.entries(defaults)) if (!isFieldValue(resolveDefault(defaultValue))) throw new Error(`Source "${sourceName}" field "${field}" must default to a string, number, boolean, null, or a function returning one of those values.`);
|
|
51
|
+
}
|
|
52
|
+
function createSourceSchema(sourceName, defaults) {
|
|
53
|
+
return { "~standard": {
|
|
54
|
+
version: 1,
|
|
55
|
+
vendor: "silo",
|
|
56
|
+
validate(value) {
|
|
57
|
+
if (!isRecord(value)) return failure("Expected a flat source row object.");
|
|
58
|
+
if (typeof value.id !== "string") return failure("Expected source row field \"id\" to be a string.", ["id"]);
|
|
59
|
+
const row = { id: value.id };
|
|
60
|
+
for (const [field, fieldValue] of Object.entries(value)) {
|
|
61
|
+
if (field === "id") continue;
|
|
62
|
+
if (!isFieldValue(fieldValue)) return failure(`Source "${sourceName}" field "${field}" must be a string, number, boolean, or null.`, [field]);
|
|
63
|
+
row[field] = fieldValue;
|
|
64
|
+
}
|
|
65
|
+
for (const [field, defaultValue] of Object.entries(defaults)) {
|
|
66
|
+
if (field in row) continue;
|
|
67
|
+
row[field] = resolveDefault(defaultValue);
|
|
68
|
+
}
|
|
69
|
+
return { value: row };
|
|
70
|
+
}
|
|
71
|
+
} };
|
|
72
|
+
}
|
|
73
|
+
function resolveDefault(value) {
|
|
74
|
+
const resolved = typeof value === "function" ? value() : value;
|
|
75
|
+
if (!isFieldValue(resolved)) throw new Error("Source defaults must resolve to a string, number, boolean, or null.");
|
|
76
|
+
return resolved;
|
|
77
|
+
}
|
|
78
|
+
function isRecord(value) {
|
|
79
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
80
|
+
}
|
|
81
|
+
function isFieldValue(value) {
|
|
82
|
+
return typeof value === "string" || typeof value === "number" || typeof value === "boolean" || value === null;
|
|
83
|
+
}
|
|
84
|
+
function failure(message, path) {
|
|
85
|
+
return { issues: [{
|
|
86
|
+
message,
|
|
87
|
+
path
|
|
88
|
+
}] };
|
|
89
|
+
}
|
|
90
|
+
let database;
|
|
91
|
+
function getDatabase() {
|
|
92
|
+
if (!database) {
|
|
93
|
+
database = (0, expo_sqlite.openDatabaseSync)("silo.db");
|
|
94
|
+
database.execSync(`
|
|
95
|
+
PRAGMA journal_mode = WAL;
|
|
96
|
+
|
|
97
|
+
CREATE TABLE IF NOT EXISTS sources (
|
|
98
|
+
source TEXT NOT NULL,
|
|
99
|
+
id TEXT NOT NULL,
|
|
100
|
+
data TEXT NOT NULL,
|
|
101
|
+
createdAt TEXT NOT NULL,
|
|
102
|
+
updatedAt TEXT NOT NULL,
|
|
103
|
+
version INTEGER NOT NULL DEFAULT 1,
|
|
104
|
+
PRIMARY KEY (source, id)
|
|
105
|
+
);
|
|
106
|
+
`);
|
|
107
|
+
}
|
|
108
|
+
return database;
|
|
109
|
+
}
|
|
110
|
+
function loadRows(sourceName) {
|
|
111
|
+
return getDatabase().getAllSync(`SELECT id, data FROM sources WHERE source = ?`, [sourceName]).map((row) => ({
|
|
112
|
+
id: row.id,
|
|
113
|
+
...JSON.parse(row.data)
|
|
114
|
+
}));
|
|
115
|
+
}
|
|
116
|
+
function insertRows(sourceName, rows) {
|
|
117
|
+
const db = getDatabase();
|
|
118
|
+
const timestamp = (/* @__PURE__ */ new Date()).toISOString();
|
|
119
|
+
db.withTransactionSync(() => {
|
|
120
|
+
for (const row of rows) {
|
|
121
|
+
const { id, ...data } = row;
|
|
122
|
+
db.runSync(`INSERT INTO sources (source, id, data, createdAt, updatedAt, version)
|
|
123
|
+
VALUES (?, ?, ?, ?, ?, 1)`, [
|
|
124
|
+
sourceName,
|
|
125
|
+
id,
|
|
126
|
+
JSON.stringify(data),
|
|
127
|
+
timestamp,
|
|
128
|
+
timestamp
|
|
129
|
+
]);
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
return Promise.resolve();
|
|
133
|
+
}
|
|
134
|
+
function updateRows(sourceName, mutations) {
|
|
135
|
+
const db = getDatabase();
|
|
136
|
+
const timestamp = (/* @__PURE__ */ new Date()).toISOString();
|
|
137
|
+
db.withTransactionSync(() => {
|
|
138
|
+
for (const mutation of mutations) {
|
|
139
|
+
const { id, ...data } = mutation.modified;
|
|
140
|
+
db.runSync(`UPDATE sources
|
|
141
|
+
SET data = ?, updatedAt = ?, version = version + 1
|
|
142
|
+
WHERE source = ? AND id = ?`, [
|
|
143
|
+
JSON.stringify(data),
|
|
144
|
+
timestamp,
|
|
145
|
+
sourceName,
|
|
146
|
+
String(mutation.key)
|
|
147
|
+
]);
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
return Promise.resolve();
|
|
151
|
+
}
|
|
152
|
+
function deleteRows(sourceName, ids) {
|
|
153
|
+
const db = getDatabase();
|
|
154
|
+
db.withTransactionSync(() => {
|
|
155
|
+
for (const id of ids) db.runSync(`DELETE FROM sources WHERE source = ? AND id = ?`, [sourceName, String(id)]);
|
|
156
|
+
});
|
|
157
|
+
return Promise.resolve();
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
//#endregion
|
|
161
|
+
exports.source = source;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
2
|
+
import { CollectionConfig } from "@tanstack/react-db";
|
|
3
|
+
|
|
4
|
+
//#region src/source/index.d.ts
|
|
5
|
+
type FieldValue = string | number | boolean | null;
|
|
6
|
+
type OptionalKeys<T extends object> = { [K in keyof T]-?: object extends Pick<T, K> ? K : never }[keyof T];
|
|
7
|
+
type RequiredKeys<T extends object> = Exclude<keyof T, OptionalKeys<T>>;
|
|
8
|
+
type InvalidDocumentKeys<T extends object> = { [K in keyof T]-?: Exclude<T[K], undefined> extends FieldValue ? never : K }[keyof T];
|
|
9
|
+
type DocumentData<T extends object> = InvalidDocumentKeys<T> extends never ? T : never;
|
|
10
|
+
type DefaultValue<T> = Exclude<T, undefined> | (() => Exclude<T, undefined>);
|
|
11
|
+
type SourceDefaults<T extends object> = { [K in RequiredKeys<DocumentData<T>>]: DefaultValue<DocumentData<T>[K]> } & { [K in OptionalKeys<DocumentData<T>>]?: DefaultValue<DocumentData<T>[K]> };
|
|
12
|
+
type SourceRow<T extends object> = {
|
|
13
|
+
id: string;
|
|
14
|
+
} & DocumentData<T>;
|
|
15
|
+
type SourceInput<T extends object> = {
|
|
16
|
+
id: string;
|
|
17
|
+
} & Partial<DocumentData<T>>;
|
|
18
|
+
type SourceCollectionOptions<T extends object> = {
|
|
19
|
+
startSync?: boolean;
|
|
20
|
+
};
|
|
21
|
+
type Source<T extends object> = {
|
|
22
|
+
readonly name: string;
|
|
23
|
+
readonly defaults: SourceDefaults<T>;
|
|
24
|
+
readonly schema: StandardSchemaV1<SourceInput<T>, SourceRow<T>>;
|
|
25
|
+
collectionOptions(options?: SourceCollectionOptions<T>): CollectionConfig<SourceRow<T>, string, StandardSchemaV1<SourceInput<T>, SourceRow<T>>>;
|
|
26
|
+
};
|
|
27
|
+
declare function source<T extends object>(name: string, defaults: SourceDefaults<T>): Source<T>;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { DefaultValue, DocumentData, FieldValue, Source, SourceCollectionOptions, SourceDefaults, SourceInput, SourceRow, source };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
2
|
+
import { CollectionConfig } from "@tanstack/react-db";
|
|
3
|
+
|
|
4
|
+
//#region src/source/index.d.ts
|
|
5
|
+
type FieldValue = string | number | boolean | null;
|
|
6
|
+
type OptionalKeys<T extends object> = { [K in keyof T]-?: object extends Pick<T, K> ? K : never }[keyof T];
|
|
7
|
+
type RequiredKeys<T extends object> = Exclude<keyof T, OptionalKeys<T>>;
|
|
8
|
+
type InvalidDocumentKeys<T extends object> = { [K in keyof T]-?: Exclude<T[K], undefined> extends FieldValue ? never : K }[keyof T];
|
|
9
|
+
type DocumentData<T extends object> = InvalidDocumentKeys<T> extends never ? T : never;
|
|
10
|
+
type DefaultValue<T> = Exclude<T, undefined> | (() => Exclude<T, undefined>);
|
|
11
|
+
type SourceDefaults<T extends object> = { [K in RequiredKeys<DocumentData<T>>]: DefaultValue<DocumentData<T>[K]> } & { [K in OptionalKeys<DocumentData<T>>]?: DefaultValue<DocumentData<T>[K]> };
|
|
12
|
+
type SourceRow<T extends object> = {
|
|
13
|
+
id: string;
|
|
14
|
+
} & DocumentData<T>;
|
|
15
|
+
type SourceInput<T extends object> = {
|
|
16
|
+
id: string;
|
|
17
|
+
} & Partial<DocumentData<T>>;
|
|
18
|
+
type SourceCollectionOptions<T extends object> = {
|
|
19
|
+
startSync?: boolean;
|
|
20
|
+
};
|
|
21
|
+
type Source<T extends object> = {
|
|
22
|
+
readonly name: string;
|
|
23
|
+
readonly defaults: SourceDefaults<T>;
|
|
24
|
+
readonly schema: StandardSchemaV1<SourceInput<T>, SourceRow<T>>;
|
|
25
|
+
collectionOptions(options?: SourceCollectionOptions<T>): CollectionConfig<SourceRow<T>, string, StandardSchemaV1<SourceInput<T>, SourceRow<T>>>;
|
|
26
|
+
};
|
|
27
|
+
declare function source<T extends object>(name: string, defaults: SourceDefaults<T>): Source<T>;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { DefaultValue, DocumentData, FieldValue, Source, SourceCollectionOptions, SourceDefaults, SourceInput, SourceRow, source };
|
package/dist/source.mjs
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { openDatabaseSync } from "expo-sqlite";
|
|
2
|
+
|
|
3
|
+
//#region src/source/index.ts
|
|
4
|
+
const sourceNames = /* @__PURE__ */ new Set();
|
|
5
|
+
const sourceNamePattern = /^[A-Za-z][A-Za-z0-9_-]*$/;
|
|
6
|
+
function source(name, defaults) {
|
|
7
|
+
assertSourceName(name);
|
|
8
|
+
assertFlatDefaults(name, defaults);
|
|
9
|
+
if (sourceNames.has(name)) throw new Error(`Source "${name}" is already registered. Define each source once and import the existing source instead.`);
|
|
10
|
+
sourceNames.add(name);
|
|
11
|
+
const schema = createSourceSchema(name, defaults);
|
|
12
|
+
return {
|
|
13
|
+
name,
|
|
14
|
+
defaults,
|
|
15
|
+
schema,
|
|
16
|
+
collectionOptions(options = {}) {
|
|
17
|
+
return {
|
|
18
|
+
id: name,
|
|
19
|
+
getKey: (item) => item.id,
|
|
20
|
+
schema,
|
|
21
|
+
startSync: options.startSync,
|
|
22
|
+
sync: { sync({ begin, write, commit, markReady, truncate }) {
|
|
23
|
+
const rows = loadRows(name);
|
|
24
|
+
begin();
|
|
25
|
+
truncate();
|
|
26
|
+
for (const row of rows) write({
|
|
27
|
+
type: "insert",
|
|
28
|
+
value: row
|
|
29
|
+
});
|
|
30
|
+
commit();
|
|
31
|
+
markReady();
|
|
32
|
+
} },
|
|
33
|
+
onInsert: async ({ transaction }) => {
|
|
34
|
+
await insertRows(name, transaction.mutations.map((mutation) => mutation.modified));
|
|
35
|
+
},
|
|
36
|
+
onUpdate: async ({ transaction }) => {
|
|
37
|
+
await updateRows(name, transaction.mutations);
|
|
38
|
+
},
|
|
39
|
+
onDelete: async ({ transaction }) => {
|
|
40
|
+
await deleteRows(name, transaction.mutations.map((mutation) => mutation.key));
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function assertSourceName(name) {
|
|
47
|
+
if (!sourceNamePattern.test(name)) throw new Error(`Source names must start with a letter and contain only letters, numbers, underscores, or hyphens. Received "${name}".`);
|
|
48
|
+
}
|
|
49
|
+
function assertFlatDefaults(sourceName, defaults) {
|
|
50
|
+
for (const [field, defaultValue] of Object.entries(defaults)) if (!isFieldValue(resolveDefault(defaultValue))) throw new Error(`Source "${sourceName}" field "${field}" must default to a string, number, boolean, null, or a function returning one of those values.`);
|
|
51
|
+
}
|
|
52
|
+
function createSourceSchema(sourceName, defaults) {
|
|
53
|
+
return { "~standard": {
|
|
54
|
+
version: 1,
|
|
55
|
+
vendor: "silo",
|
|
56
|
+
validate(value) {
|
|
57
|
+
if (!isRecord(value)) return failure("Expected a flat source row object.");
|
|
58
|
+
if (typeof value.id !== "string") return failure("Expected source row field \"id\" to be a string.", ["id"]);
|
|
59
|
+
const row = { id: value.id };
|
|
60
|
+
for (const [field, fieldValue] of Object.entries(value)) {
|
|
61
|
+
if (field === "id") continue;
|
|
62
|
+
if (!isFieldValue(fieldValue)) return failure(`Source "${sourceName}" field "${field}" must be a string, number, boolean, or null.`, [field]);
|
|
63
|
+
row[field] = fieldValue;
|
|
64
|
+
}
|
|
65
|
+
for (const [field, defaultValue] of Object.entries(defaults)) {
|
|
66
|
+
if (field in row) continue;
|
|
67
|
+
row[field] = resolveDefault(defaultValue);
|
|
68
|
+
}
|
|
69
|
+
return { value: row };
|
|
70
|
+
}
|
|
71
|
+
} };
|
|
72
|
+
}
|
|
73
|
+
function resolveDefault(value) {
|
|
74
|
+
const resolved = typeof value === "function" ? value() : value;
|
|
75
|
+
if (!isFieldValue(resolved)) throw new Error("Source defaults must resolve to a string, number, boolean, or null.");
|
|
76
|
+
return resolved;
|
|
77
|
+
}
|
|
78
|
+
function isRecord(value) {
|
|
79
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
80
|
+
}
|
|
81
|
+
function isFieldValue(value) {
|
|
82
|
+
return typeof value === "string" || typeof value === "number" || typeof value === "boolean" || value === null;
|
|
83
|
+
}
|
|
84
|
+
function failure(message, path) {
|
|
85
|
+
return { issues: [{
|
|
86
|
+
message,
|
|
87
|
+
path
|
|
88
|
+
}] };
|
|
89
|
+
}
|
|
90
|
+
let database;
|
|
91
|
+
function getDatabase() {
|
|
92
|
+
if (!database) {
|
|
93
|
+
database = openDatabaseSync("silo.db");
|
|
94
|
+
database.execSync(`
|
|
95
|
+
PRAGMA journal_mode = WAL;
|
|
96
|
+
|
|
97
|
+
CREATE TABLE IF NOT EXISTS sources (
|
|
98
|
+
source TEXT NOT NULL,
|
|
99
|
+
id TEXT NOT NULL,
|
|
100
|
+
data TEXT NOT NULL,
|
|
101
|
+
createdAt TEXT NOT NULL,
|
|
102
|
+
updatedAt TEXT NOT NULL,
|
|
103
|
+
version INTEGER NOT NULL DEFAULT 1,
|
|
104
|
+
PRIMARY KEY (source, id)
|
|
105
|
+
);
|
|
106
|
+
`);
|
|
107
|
+
}
|
|
108
|
+
return database;
|
|
109
|
+
}
|
|
110
|
+
function loadRows(sourceName) {
|
|
111
|
+
return getDatabase().getAllSync(`SELECT id, data FROM sources WHERE source = ?`, [sourceName]).map((row) => ({
|
|
112
|
+
id: row.id,
|
|
113
|
+
...JSON.parse(row.data)
|
|
114
|
+
}));
|
|
115
|
+
}
|
|
116
|
+
function insertRows(sourceName, rows) {
|
|
117
|
+
const db = getDatabase();
|
|
118
|
+
const timestamp = (/* @__PURE__ */ new Date()).toISOString();
|
|
119
|
+
db.withTransactionSync(() => {
|
|
120
|
+
for (const row of rows) {
|
|
121
|
+
const { id, ...data } = row;
|
|
122
|
+
db.runSync(`INSERT INTO sources (source, id, data, createdAt, updatedAt, version)
|
|
123
|
+
VALUES (?, ?, ?, ?, ?, 1)`, [
|
|
124
|
+
sourceName,
|
|
125
|
+
id,
|
|
126
|
+
JSON.stringify(data),
|
|
127
|
+
timestamp,
|
|
128
|
+
timestamp
|
|
129
|
+
]);
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
return Promise.resolve();
|
|
133
|
+
}
|
|
134
|
+
function updateRows(sourceName, mutations) {
|
|
135
|
+
const db = getDatabase();
|
|
136
|
+
const timestamp = (/* @__PURE__ */ new Date()).toISOString();
|
|
137
|
+
db.withTransactionSync(() => {
|
|
138
|
+
for (const mutation of mutations) {
|
|
139
|
+
const { id, ...data } = mutation.modified;
|
|
140
|
+
db.runSync(`UPDATE sources
|
|
141
|
+
SET data = ?, updatedAt = ?, version = version + 1
|
|
142
|
+
WHERE source = ? AND id = ?`, [
|
|
143
|
+
JSON.stringify(data),
|
|
144
|
+
timestamp,
|
|
145
|
+
sourceName,
|
|
146
|
+
String(mutation.key)
|
|
147
|
+
]);
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
return Promise.resolve();
|
|
151
|
+
}
|
|
152
|
+
function deleteRows(sourceName, ids) {
|
|
153
|
+
const db = getDatabase();
|
|
154
|
+
db.withTransactionSync(() => {
|
|
155
|
+
for (const id of ids) db.runSync(`DELETE FROM sources WHERE source = ? AND id = ?`, [sourceName, String(id)]);
|
|
156
|
+
});
|
|
157
|
+
return Promise.resolve();
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
//#endregion
|
|
161
|
+
export { source };
|
package/package.json
CHANGED
|
@@ -1,5 +1,56 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "silosdk",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"build": "tsdown",
|
|
7
|
+
"watch": "tsdown --watch",
|
|
8
|
+
"test": "vitest run",
|
|
9
|
+
"publish": "tsdown && npm publish"
|
|
10
|
+
},
|
|
11
|
+
"packageManager": "yarn@1.22.22",
|
|
12
|
+
"files": [
|
|
13
|
+
"dist/"
|
|
14
|
+
],
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@tanstack/react-db": "^0.1.86",
|
|
17
|
+
"@tanstack/react-query": "^5.101.0",
|
|
18
|
+
"@types/node": "^25.3.0",
|
|
19
|
+
"@types/react": "^19",
|
|
20
|
+
"expo-sqlite": "*",
|
|
21
|
+
"prettier": "^3.7.4",
|
|
22
|
+
"react-native": "0.85.0",
|
|
23
|
+
"tsdown": "^0.17.2",
|
|
24
|
+
"typescript": "^5.9.3",
|
|
25
|
+
"vitest": "^4.0.18"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@standard-schema/spec": "^1.0.0",
|
|
29
|
+
"@tanstack/react-db": "^0.1.86",
|
|
30
|
+
"@tanstack/react-query": "^5.101.0",
|
|
31
|
+
"nanoid": "5.1.6"
|
|
32
|
+
},
|
|
33
|
+
"peerDependencies": {
|
|
34
|
+
"expo-sqlite": "*",
|
|
35
|
+
"react": "^19",
|
|
36
|
+
"react-native": "0.85.x"
|
|
37
|
+
},
|
|
38
|
+
"prettier": {
|
|
39
|
+
"semi": false,
|
|
40
|
+
"singleQuote": true,
|
|
41
|
+
"trailingComma": "all",
|
|
42
|
+
"printWidth": 80,
|
|
43
|
+
"tabWidth": 2
|
|
44
|
+
},
|
|
45
|
+
"main": "./dist/source.cjs",
|
|
46
|
+
"module": "./dist/source.mjs",
|
|
47
|
+
"types": "./dist/source.d.cts",
|
|
48
|
+
"exports": {
|
|
49
|
+
"./source": {
|
|
50
|
+
"types": "./dist/source.d.mts",
|
|
51
|
+
"import": "./dist/source.mjs",
|
|
52
|
+
"require": "./dist/source.cjs"
|
|
53
|
+
},
|
|
54
|
+
"./package.json": "./package.json"
|
|
55
|
+
}
|
|
5
56
|
}
|
package/README.md
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# silosdk
|