@instantdb/core 0.22.96-experimental.add-posthog-frontend.20386914944.1 → 0.22.96
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/__tests__/src/serializeSchema.test.ts +123 -0
- package/dist/commonjs/Reactor.d.ts +13 -1
- package/dist/commonjs/Reactor.d.ts.map +1 -1
- package/dist/commonjs/Reactor.js +72 -5
- package/dist/commonjs/Reactor.js.map +1 -1
- package/dist/commonjs/SyncTable.d.ts.map +1 -1
- package/dist/commonjs/SyncTable.js +7 -6
- package/dist/commonjs/SyncTable.js.map +1 -1
- package/dist/commonjs/createRouteHandler.d.ts +8 -0
- package/dist/commonjs/createRouteHandler.d.ts.map +1 -0
- package/dist/commonjs/createRouteHandler.js +66 -0
- package/dist/commonjs/createRouteHandler.js.map +1 -0
- package/dist/commonjs/framework.d.ts +77 -0
- package/dist/commonjs/framework.d.ts.map +1 -0
- package/dist/commonjs/framework.js +228 -0
- package/dist/commonjs/framework.js.map +1 -0
- package/dist/commonjs/index.d.ts +5 -1
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +7 -1
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/parseSchemaFromJSON.d.ts +3 -0
- package/dist/commonjs/parseSchemaFromJSON.d.ts.map +1 -0
- package/dist/commonjs/parseSchemaFromJSON.js +148 -0
- package/dist/commonjs/parseSchemaFromJSON.js.map +1 -0
- package/dist/commonjs/reactorTypes.d.ts +5 -4
- package/dist/commonjs/reactorTypes.d.ts.map +1 -1
- package/dist/commonjs/reactorTypes.js.map +1 -1
- package/dist/esm/Reactor.d.ts +13 -1
- package/dist/esm/Reactor.d.ts.map +1 -1
- package/dist/esm/Reactor.js +72 -5
- package/dist/esm/Reactor.js.map +1 -1
- package/dist/esm/SyncTable.d.ts.map +1 -1
- package/dist/esm/SyncTable.js +7 -6
- package/dist/esm/SyncTable.js.map +1 -1
- package/dist/esm/createRouteHandler.d.ts +8 -0
- package/dist/esm/createRouteHandler.d.ts.map +1 -0
- package/dist/esm/createRouteHandler.js +62 -0
- package/dist/esm/createRouteHandler.js.map +1 -0
- package/dist/esm/framework.d.ts +77 -0
- package/dist/esm/framework.d.ts.map +1 -0
- package/dist/esm/framework.js +188 -0
- package/dist/esm/framework.js.map +1 -0
- package/dist/esm/index.d.ts +5 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +5 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/parseSchemaFromJSON.d.ts +3 -0
- package/dist/esm/parseSchemaFromJSON.d.ts.map +1 -0
- package/dist/esm/parseSchemaFromJSON.js +144 -0
- package/dist/esm/parseSchemaFromJSON.js.map +1 -0
- package/dist/esm/reactorTypes.d.ts +5 -4
- package/dist/esm/reactorTypes.d.ts.map +1 -1
- package/dist/esm/reactorTypes.js.map +1 -1
- package/dist/standalone/index.js +2735 -2400
- package/dist/standalone/index.umd.cjs +3 -3
- package/package.json +2 -2
- package/src/Reactor.js +83 -6
- package/src/SyncTable.ts +18 -14
- package/src/createRouteHandler.ts +63 -0
- package/src/framework.ts +318 -0
- package/src/index.ts +9 -0
- package/src/parseSchemaFromJSON.ts +176 -0
- package/src/reactorTypes.ts +5 -4
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { i } from "./schema.js";
|
|
2
|
+
export const parseSchemaFromJSON = (s) => {
|
|
3
|
+
var _a, _b, _c, _d, _e, _f;
|
|
4
|
+
// Parse entities
|
|
5
|
+
const entities = {};
|
|
6
|
+
for (const [entityName, entityInfo] of Object.entries(s.entities)) {
|
|
7
|
+
const entityDef = entityInfo;
|
|
8
|
+
const attrs = {};
|
|
9
|
+
// Parse attributes
|
|
10
|
+
for (const [attrName, attrInfo] of Object.entries(entityDef.attrs)) {
|
|
11
|
+
const attrDef = attrInfo;
|
|
12
|
+
let attr;
|
|
13
|
+
// Create the appropriate attribute type
|
|
14
|
+
switch (attrDef.valueType) {
|
|
15
|
+
case 'string':
|
|
16
|
+
attr = i.string();
|
|
17
|
+
break;
|
|
18
|
+
case 'number':
|
|
19
|
+
attr = i.number();
|
|
20
|
+
break;
|
|
21
|
+
case 'boolean':
|
|
22
|
+
attr = i.boolean();
|
|
23
|
+
break;
|
|
24
|
+
case 'date':
|
|
25
|
+
attr = i.date();
|
|
26
|
+
break;
|
|
27
|
+
case 'json':
|
|
28
|
+
attr = i.json();
|
|
29
|
+
break;
|
|
30
|
+
default:
|
|
31
|
+
attr = i.json();
|
|
32
|
+
}
|
|
33
|
+
// Apply modifiers
|
|
34
|
+
if (!attrDef.required) {
|
|
35
|
+
attr = attr.optional();
|
|
36
|
+
}
|
|
37
|
+
if ((_a = attrDef.config) === null || _a === void 0 ? void 0 : _a.indexed) {
|
|
38
|
+
attr = attr.indexed();
|
|
39
|
+
}
|
|
40
|
+
if ((_b = attrDef.config) === null || _b === void 0 ? void 0 : _b.unique) {
|
|
41
|
+
attr = attr.unique();
|
|
42
|
+
}
|
|
43
|
+
attrs[attrName] = attr;
|
|
44
|
+
}
|
|
45
|
+
entities[entityName] = i.entity(attrs);
|
|
46
|
+
}
|
|
47
|
+
// Parse links
|
|
48
|
+
const links = s.links || {};
|
|
49
|
+
// Parse rooms
|
|
50
|
+
const rooms = {};
|
|
51
|
+
if (s.rooms) {
|
|
52
|
+
for (const [roomName, roomInfo] of Object.entries(s.rooms)) {
|
|
53
|
+
const roomDef = roomInfo;
|
|
54
|
+
// Parse presence
|
|
55
|
+
const presenceAttrs = {};
|
|
56
|
+
for (const [attrName, attrInfo] of Object.entries(roomDef.presence.attrs)) {
|
|
57
|
+
const attrDef = attrInfo;
|
|
58
|
+
let attr;
|
|
59
|
+
switch (attrDef.valueType) {
|
|
60
|
+
case 'string':
|
|
61
|
+
attr = i.string();
|
|
62
|
+
break;
|
|
63
|
+
case 'number':
|
|
64
|
+
attr = i.number();
|
|
65
|
+
break;
|
|
66
|
+
case 'boolean':
|
|
67
|
+
attr = i.boolean();
|
|
68
|
+
break;
|
|
69
|
+
case 'date':
|
|
70
|
+
attr = i.date();
|
|
71
|
+
break;
|
|
72
|
+
case 'json':
|
|
73
|
+
attr = i.json();
|
|
74
|
+
break;
|
|
75
|
+
default:
|
|
76
|
+
attr = i.json();
|
|
77
|
+
}
|
|
78
|
+
if (!attrDef.required) {
|
|
79
|
+
attr = attr.optional();
|
|
80
|
+
}
|
|
81
|
+
if ((_c = attrDef.config) === null || _c === void 0 ? void 0 : _c.indexed) {
|
|
82
|
+
attr = attr.indexed();
|
|
83
|
+
}
|
|
84
|
+
if ((_d = attrDef.config) === null || _d === void 0 ? void 0 : _d.unique) {
|
|
85
|
+
attr = attr.unique();
|
|
86
|
+
}
|
|
87
|
+
presenceAttrs[attrName] = attr;
|
|
88
|
+
}
|
|
89
|
+
// Parse topics
|
|
90
|
+
const topics = {};
|
|
91
|
+
if (roomDef.topics) {
|
|
92
|
+
for (const [topicName, topicInfo] of Object.entries(roomDef.topics)) {
|
|
93
|
+
const topicDef = topicInfo;
|
|
94
|
+
const topicAttrs = {};
|
|
95
|
+
for (const [attrName, attrInfo] of Object.entries(topicDef.attrs)) {
|
|
96
|
+
const attrDef = attrInfo;
|
|
97
|
+
let attr;
|
|
98
|
+
switch (attrDef.valueType) {
|
|
99
|
+
case 'string':
|
|
100
|
+
attr = i.string();
|
|
101
|
+
break;
|
|
102
|
+
case 'number':
|
|
103
|
+
attr = i.number();
|
|
104
|
+
break;
|
|
105
|
+
case 'boolean':
|
|
106
|
+
attr = i.boolean();
|
|
107
|
+
break;
|
|
108
|
+
case 'date':
|
|
109
|
+
attr = i.date();
|
|
110
|
+
break;
|
|
111
|
+
case 'json':
|
|
112
|
+
attr = i.json();
|
|
113
|
+
break;
|
|
114
|
+
default:
|
|
115
|
+
attr = i.json();
|
|
116
|
+
}
|
|
117
|
+
if (!attrDef.required) {
|
|
118
|
+
attr = attr.optional();
|
|
119
|
+
}
|
|
120
|
+
if ((_e = attrDef.config) === null || _e === void 0 ? void 0 : _e.indexed) {
|
|
121
|
+
attr = attr.indexed();
|
|
122
|
+
}
|
|
123
|
+
if ((_f = attrDef.config) === null || _f === void 0 ? void 0 : _f.unique) {
|
|
124
|
+
attr = attr.unique();
|
|
125
|
+
}
|
|
126
|
+
topicAttrs[attrName] = attr;
|
|
127
|
+
}
|
|
128
|
+
topics[topicName] = i.entity(topicAttrs);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
rooms[roomName] = {
|
|
132
|
+
presence: i.entity(presenceAttrs),
|
|
133
|
+
topics,
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
const resultingSchema = i.schema({
|
|
138
|
+
entities,
|
|
139
|
+
links,
|
|
140
|
+
rooms,
|
|
141
|
+
});
|
|
142
|
+
return resultingSchema;
|
|
143
|
+
};
|
|
144
|
+
//# sourceMappingURL=parseSchemaFromJSON.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseSchemaFromJSON.js","sourceRoot":"","sources":["../../src/parseSchemaFromJSON.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AAGhC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,CAAM,EAC2B,EAAE;;IACnC,iBAAiB;IACjB,MAAM,QAAQ,GAAwB,EAAE,CAAC;IAEzC,KAAK,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC;QAClE,MAAM,SAAS,GAAG,UAAiB,CAAC;QACpC,MAAM,KAAK,GAAwB,EAAE,CAAC;QAEtC,mBAAmB;QACnB,KAAK,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;YACnE,MAAM,OAAO,GAAG,QAAe,CAAC;YAChC,IAAI,IAAgC,CAAC;YAErC,wCAAwC;YACxC,QAAQ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,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;wBACxB,CAAC;wBAED,IAAI,MAAA,OAAO,CAAC,MAAM,0CAAE,MAAM,EAAE,CAAC;4BAC3B,IAAI,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;wBACvB,CAAC;wBAED,UAAU,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;oBAC9B,CAAC;oBAED,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;gBAC3C,CAAC;YACH,CAAC;YAED,KAAK,CAAC,QAAQ,CAAC,GAAG;gBAChB,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC;gBACjC,MAAM;aACP,CAAC;QACJ,CAAC;IACH,CAAC;IAED,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;QAC/B,QAAQ;QACR,KAAK;QACL,KAAK;KACN,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC;AACzB,CAAC,CAAC","sourcesContent":["import { i } from './schema.ts';\nimport { DataAttrDef, InstantSchemaDef } from './schemaTypes.ts';\n\nexport const parseSchemaFromJSON = (\n s: any,\n): InstantSchemaDef<any, any, any> => {\n // Parse entities\n const entities: Record<string, any> = {};\n\n for (const [entityName, entityInfo] of Object.entries(s.entities)) {\n const entityDef = entityInfo as any;\n const attrs: Record<string, any> = {};\n\n // Parse attributes\n for (const [attrName, attrInfo] of Object.entries(entityDef.attrs)) {\n const attrDef = attrInfo as any;\n let attr: DataAttrDef<any, any, any>;\n\n // Create the appropriate attribute type\n switch (attrDef.valueType) {\n case 'string':\n attr = i.string();\n break;\n case 'number':\n attr = i.number();\n break;\n case 'boolean':\n attr = i.boolean();\n break;\n case 'date':\n attr = i.date();\n break;\n case 'json':\n attr = i.json();\n break;\n default:\n attr = i.json();\n }\n\n // Apply modifiers\n if (!attrDef.required) {\n attr = attr.optional();\n }\n\n if (attrDef.config?.indexed) {\n attr = attr.indexed();\n }\n\n if (attrDef.config?.unique) {\n attr = attr.unique();\n }\n\n attrs[attrName] = attr;\n }\n\n entities[entityName] = i.entity(attrs);\n }\n\n // Parse links\n const links: Record<string, any> = s.links || {};\n\n // Parse rooms\n const rooms: Record<string, any> = {};\n\n if (s.rooms) {\n for (const [roomName, roomInfo] of Object.entries(s.rooms)) {\n const roomDef = roomInfo as any;\n\n // Parse presence\n const presenceAttrs: Record<string, any> = {};\n for (const [attrName, attrInfo] of Object.entries(\n roomDef.presence.attrs,\n )) {\n const attrDef = attrInfo as any;\n let attr: DataAttrDef<any, any, any>;\n\n switch (attrDef.valueType) {\n case 'string':\n attr = i.string();\n break;\n case 'number':\n attr = i.number();\n break;\n case 'boolean':\n attr = i.boolean();\n break;\n case 'date':\n attr = i.date();\n break;\n case 'json':\n attr = i.json();\n break;\n default:\n attr = i.json();\n }\n\n if (!attrDef.required) {\n attr = attr.optional();\n }\n\n if (attrDef.config?.indexed) {\n attr = attr.indexed();\n }\n\n if (attrDef.config?.unique) {\n attr = attr.unique();\n }\n\n presenceAttrs[attrName] = attr;\n }\n\n // Parse topics\n const topics: Record<string, any> = {};\n if (roomDef.topics) {\n for (const [topicName, topicInfo] of Object.entries(roomDef.topics)) {\n const topicDef = topicInfo as any;\n const topicAttrs: Record<string, any> = {};\n\n for (const [attrName, attrInfo] of Object.entries(topicDef.attrs)) {\n const attrDef = attrInfo as any;\n let attr: DataAttrDef<any, any, any>;\n\n switch (attrDef.valueType) {\n case 'string':\n attr = i.string();\n break;\n case 'number':\n attr = i.number();\n break;\n case 'boolean':\n attr = i.boolean();\n break;\n case 'date':\n attr = i.date();\n break;\n case 'json':\n attr = i.json();\n break;\n default:\n attr = i.json();\n }\n\n if (!attrDef.required) {\n attr = attr.optional();\n }\n\n if (attrDef.config?.indexed) {\n attr = attr.indexed();\n }\n\n if (attrDef.config?.unique) {\n attr = attr.unique();\n }\n\n topicAttrs[attrName] = attr;\n }\n\n topics[topicName] = i.entity(topicAttrs);\n }\n }\n\n rooms[roomName] = {\n presence: i.entity(presenceAttrs),\n topics,\n };\n }\n }\n\n const resultingSchema = i.schema({\n entities,\n links,\n rooms,\n });\n\n return resultingSchema;\n};\n"]}
|
|
@@ -5,11 +5,12 @@ export type QuerySubResult = {
|
|
|
5
5
|
attrsStore: AttrsStore;
|
|
6
6
|
pageInfo?: PageInfoResponse<any> | null | undefined;
|
|
7
7
|
aggregate?: any;
|
|
8
|
-
processedTxId
|
|
8
|
+
processedTxId?: number;
|
|
9
|
+
isExternal?: boolean;
|
|
9
10
|
};
|
|
10
11
|
export type QuerySub = {
|
|
11
12
|
q: Object;
|
|
12
|
-
eventId
|
|
13
|
+
eventId?: string;
|
|
13
14
|
lastAccessed?: number | null | undefined;
|
|
14
15
|
result?: QuerySubResult;
|
|
15
16
|
};
|
|
@@ -18,11 +19,11 @@ export type QuerySubResultInStorage = {
|
|
|
18
19
|
attrsStore: AttrsStoreJson;
|
|
19
20
|
pageInfo?: PageInfoResponse<any> | null | undefined;
|
|
20
21
|
aggregate?: any;
|
|
21
|
-
processedTxId
|
|
22
|
+
processedTxId?: number;
|
|
22
23
|
};
|
|
23
24
|
export type QuerySubInStorage = {
|
|
24
25
|
q: Object;
|
|
25
|
-
eventId
|
|
26
|
+
eventId?: string;
|
|
26
27
|
lastAccessed?: number | null | undefined;
|
|
27
28
|
result?: QuerySubResultInStorage;
|
|
28
29
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reactorTypes.d.ts","sourceRoot":"","sources":["../../src/reactorTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE1E,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,KAAK,CAAC;IACb,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,CAAC,EAAE,gBAAgB,CAAC,GAAG,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AAS,CAAC;IACzC,MAAM,CAAC,EAAE,uBAAuB,CAAC;CAClC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reactorTypes.js","sourceRoot":"","sources":["../../src/reactorTypes.ts"],"names":[],"mappings":"","sourcesContent":["import { PageInfoResponse } from './queryTypes.ts';\nimport { AttrsStore, AttrsStoreJson, Store, StoreJson } from './store.ts';\n\nexport type QuerySubResult = {\n store: Store;\n attrsStore: AttrsStore;\n pageInfo?: PageInfoResponse<any> | null | undefined;\n aggregate?: any;\n processedTxId
|
|
1
|
+
{"version":3,"file":"reactorTypes.js","sourceRoot":"","sources":["../../src/reactorTypes.ts"],"names":[],"mappings":"","sourcesContent":["import { PageInfoResponse } from './queryTypes.ts';\nimport { AttrsStore, AttrsStoreJson, Store, StoreJson } from './store.ts';\n\nexport type QuerySubResult = {\n store: Store;\n attrsStore: AttrsStore;\n pageInfo?: PageInfoResponse<any> | null | undefined;\n aggregate?: any;\n processedTxId?: number;\n isExternal?: boolean;\n};\n\nexport type QuerySub = {\n q: Object;\n eventId?: string;\n lastAccessed?: number | null | undefined;\n result?: QuerySubResult;\n};\n\nexport type QuerySubResultInStorage = {\n store: StoreJson;\n attrsStore: AttrsStoreJson;\n pageInfo?: PageInfoResponse<any> | null | undefined;\n aggregate?: any;\n processedTxId?: number;\n};\n\nexport type QuerySubInStorage = {\n q: Object;\n eventId?: string;\n lastAccessed?: number | null | undefined;\n result?: QuerySubResultInStorage;\n};\n"]}
|