@sidekickdb/platform 0.0.0 → 2.0.1

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.
Files changed (197) hide show
  1. package/.tshy/build.json +8 -0
  2. package/.tshy/commonjs.json +16 -0
  3. package/.tshy/esm.json +15 -0
  4. package/.turbo/turbo-build.log +50 -0
  5. package/LICENSE.md +202 -0
  6. package/NOTICE +27 -0
  7. package/README.md +444 -2
  8. package/__tests__/src/apiURI.test.ts +58 -0
  9. package/__tests__/src/backupDownload.test.ts +427 -0
  10. package/__tests__/src/backups.test.ts +168 -0
  11. package/__tests__/src/clerk.test.ts +13 -0
  12. package/__tests__/src/consts.test.ts +11 -0
  13. package/__tests__/src/migrations.test.ts +885 -0
  14. package/__tests__/src/perms.test.ts +102 -0
  15. package/__tests__/src/rename.test.ts +126 -0
  16. package/__tests__/src/schema.push.e2e.test.ts +186 -0
  17. package/__tests__/src/schema.test.ts +644 -0
  18. package/__tests__/src/typescript-schema.test.ts +117 -0
  19. package/dist/commonjs/ProgressPromise.d.ts +18 -0
  20. package/dist/commonjs/ProgressPromise.d.ts.map +1 -0
  21. package/dist/commonjs/ProgressPromise.js +77 -0
  22. package/dist/commonjs/ProgressPromise.js.map +1 -0
  23. package/dist/commonjs/api.d.ts +480 -0
  24. package/dist/commonjs/api.d.ts.map +1 -0
  25. package/dist/commonjs/api.js +1132 -0
  26. package/dist/commonjs/api.js.map +1 -0
  27. package/dist/commonjs/backupDownload.d.ts +89 -0
  28. package/dist/commonjs/backupDownload.d.ts.map +1 -0
  29. package/dist/commonjs/backupDownload.js +357 -0
  30. package/dist/commonjs/backupDownload.js.map +1 -0
  31. package/dist/commonjs/backups.d.ts +146 -0
  32. package/dist/commonjs/backups.d.ts.map +1 -0
  33. package/dist/commonjs/backups.js +248 -0
  34. package/dist/commonjs/backups.js.map +1 -0
  35. package/dist/commonjs/clerk.d.ts +2 -0
  36. package/dist/commonjs/clerk.d.ts.map +1 -0
  37. package/dist/commonjs/clerk.js +29 -0
  38. package/dist/commonjs/clerk.js.map +1 -0
  39. package/dist/commonjs/consts.d.ts +11 -0
  40. package/dist/commonjs/consts.d.ts.map +1 -0
  41. package/dist/commonjs/consts.js +17 -0
  42. package/dist/commonjs/consts.js.map +1 -0
  43. package/dist/commonjs/crypto.d.ts +4 -0
  44. package/dist/commonjs/crypto.d.ts.map +1 -0
  45. package/dist/commonjs/crypto.js +26 -0
  46. package/dist/commonjs/crypto.js.map +1 -0
  47. package/dist/commonjs/index.d.ts +18 -0
  48. package/dist/commonjs/index.d.ts.map +1 -0
  49. package/dist/commonjs/index.js +61 -0
  50. package/dist/commonjs/index.js.map +1 -0
  51. package/dist/commonjs/migrationUtils.d.ts +4 -0
  52. package/dist/commonjs/migrationUtils.d.ts.map +1 -0
  53. package/dist/commonjs/migrationUtils.js +52 -0
  54. package/dist/commonjs/migrationUtils.js.map +1 -0
  55. package/dist/commonjs/migrations.d.ts +99 -0
  56. package/dist/commonjs/migrations.d.ts.map +1 -0
  57. package/dist/commonjs/migrations.js +597 -0
  58. package/dist/commonjs/migrations.js.map +1 -0
  59. package/dist/commonjs/oauth.d.ts +98 -0
  60. package/dist/commonjs/oauth.d.ts.map +1 -0
  61. package/dist/commonjs/oauth.js +277 -0
  62. package/dist/commonjs/oauth.js.map +1 -0
  63. package/dist/commonjs/oauthCommon.d.ts +12 -0
  64. package/dist/commonjs/oauthCommon.d.ts.map +1 -0
  65. package/dist/commonjs/oauthCommon.js +26 -0
  66. package/dist/commonjs/oauthCommon.js.map +1 -0
  67. package/dist/commonjs/package.json +3 -0
  68. package/dist/commonjs/perms.d.ts +3 -0
  69. package/dist/commonjs/perms.d.ts.map +1 -0
  70. package/dist/commonjs/perms.js +66 -0
  71. package/dist/commonjs/perms.js.map +1 -0
  72. package/dist/commonjs/relationships.d.ts +7 -0
  73. package/dist/commonjs/relationships.d.ts.map +1 -0
  74. package/dist/commonjs/relationships.js +46 -0
  75. package/dist/commonjs/relationships.js.map +1 -0
  76. package/dist/commonjs/schema.d.ts +161 -0
  77. package/dist/commonjs/schema.d.ts.map +1 -0
  78. package/dist/commonjs/schema.js +174 -0
  79. package/dist/commonjs/schema.js.map +1 -0
  80. package/dist/commonjs/serverOAuth.d.ts +25 -0
  81. package/dist/commonjs/serverOAuth.d.ts.map +1 -0
  82. package/dist/commonjs/serverOAuth.js +72 -0
  83. package/dist/commonjs/serverOAuth.js.map +1 -0
  84. package/dist/commonjs/typescript-schema.d.ts +17 -0
  85. package/dist/commonjs/typescript-schema.d.ts.map +1 -0
  86. package/dist/commonjs/typescript-schema.js +314 -0
  87. package/dist/commonjs/typescript-schema.js.map +1 -0
  88. package/dist/commonjs/util.d.ts +13 -0
  89. package/dist/commonjs/util.d.ts.map +1 -0
  90. package/dist/commonjs/util.js +55 -0
  91. package/dist/commonjs/util.js.map +1 -0
  92. package/dist/commonjs/version.d.ts +3 -0
  93. package/dist/commonjs/version.d.ts.map +1 -0
  94. package/dist/commonjs/version.js +5 -0
  95. package/dist/commonjs/version.js.map +1 -0
  96. package/dist/esm/ProgressPromise.d.ts +18 -0
  97. package/dist/esm/ProgressPromise.d.ts.map +1 -0
  98. package/dist/esm/ProgressPromise.js +73 -0
  99. package/dist/esm/ProgressPromise.js.map +1 -0
  100. package/dist/esm/api.d.ts +480 -0
  101. package/dist/esm/api.d.ts.map +1 -0
  102. package/dist/esm/api.js +1121 -0
  103. package/dist/esm/api.js.map +1 -0
  104. package/dist/esm/backupDownload.d.ts +89 -0
  105. package/dist/esm/backupDownload.d.ts.map +1 -0
  106. package/dist/esm/backupDownload.js +354 -0
  107. package/dist/esm/backupDownload.js.map +1 -0
  108. package/dist/esm/backups.d.ts +146 -0
  109. package/dist/esm/backups.d.ts.map +1 -0
  110. package/dist/esm/backups.js +237 -0
  111. package/dist/esm/backups.js.map +1 -0
  112. package/dist/esm/clerk.d.ts +2 -0
  113. package/dist/esm/clerk.d.ts.map +1 -0
  114. package/dist/esm/clerk.js +26 -0
  115. package/dist/esm/clerk.js.map +1 -0
  116. package/dist/esm/consts.d.ts +11 -0
  117. package/dist/esm/consts.d.ts.map +1 -0
  118. package/dist/esm/consts.js +13 -0
  119. package/dist/esm/consts.js.map +1 -0
  120. package/dist/esm/crypto.d.ts +4 -0
  121. package/dist/esm/crypto.d.ts.map +1 -0
  122. package/dist/esm/crypto.js +21 -0
  123. package/dist/esm/crypto.js.map +1 -0
  124. package/dist/esm/index.d.ts +18 -0
  125. package/dist/esm/index.d.ts.map +1 -0
  126. package/dist/esm/index.js +17 -0
  127. package/dist/esm/index.js.map +1 -0
  128. package/dist/esm/migrationUtils.d.ts +4 -0
  129. package/dist/esm/migrationUtils.d.ts.map +1 -0
  130. package/dist/esm/migrationUtils.js +47 -0
  131. package/dist/esm/migrationUtils.js.map +1 -0
  132. package/dist/esm/migrations.d.ts +99 -0
  133. package/dist/esm/migrations.d.ts.map +1 -0
  134. package/dist/esm/migrations.js +588 -0
  135. package/dist/esm/migrations.js.map +1 -0
  136. package/dist/esm/oauth.d.ts +98 -0
  137. package/dist/esm/oauth.d.ts.map +1 -0
  138. package/dist/esm/oauth.js +268 -0
  139. package/dist/esm/oauth.js.map +1 -0
  140. package/dist/esm/oauthCommon.d.ts +12 -0
  141. package/dist/esm/oauthCommon.d.ts.map +1 -0
  142. package/dist/esm/oauthCommon.js +22 -0
  143. package/dist/esm/oauthCommon.js.map +1 -0
  144. package/dist/esm/package.json +3 -0
  145. package/dist/esm/perms.d.ts +3 -0
  146. package/dist/esm/perms.d.ts.map +1 -0
  147. package/dist/esm/perms.js +62 -0
  148. package/dist/esm/perms.js.map +1 -0
  149. package/dist/esm/relationships.d.ts +7 -0
  150. package/dist/esm/relationships.d.ts.map +1 -0
  151. package/dist/esm/relationships.js +43 -0
  152. package/dist/esm/relationships.js.map +1 -0
  153. package/dist/esm/schema.d.ts +161 -0
  154. package/dist/esm/schema.d.ts.map +1 -0
  155. package/dist/esm/schema.js +158 -0
  156. package/dist/esm/schema.js.map +1 -0
  157. package/dist/esm/serverOAuth.d.ts +25 -0
  158. package/dist/esm/serverOAuth.d.ts.map +1 -0
  159. package/dist/esm/serverOAuth.js +68 -0
  160. package/dist/esm/serverOAuth.js.map +1 -0
  161. package/dist/esm/typescript-schema.d.ts +17 -0
  162. package/dist/esm/typescript-schema.d.ts.map +1 -0
  163. package/dist/esm/typescript-schema.js +310 -0
  164. package/dist/esm/typescript-schema.js.map +1 -0
  165. package/dist/esm/util.d.ts +13 -0
  166. package/dist/esm/util.d.ts.map +1 -0
  167. package/dist/esm/util.js +46 -0
  168. package/dist/esm/util.js.map +1 -0
  169. package/dist/esm/version.d.ts +3 -0
  170. package/dist/esm/version.d.ts.map +1 -0
  171. package/dist/esm/version.js +3 -0
  172. package/dist/esm/version.js.map +1 -0
  173. package/dist/standalone/index.js +13747 -0
  174. package/dist/standalone/index.umd.cjs +72 -0
  175. package/package.json +69 -3
  176. package/src/ProgressPromise.ts +97 -0
  177. package/src/api.ts +1903 -0
  178. package/src/backupDownload.ts +519 -0
  179. package/src/backups.ts +342 -0
  180. package/src/clerk.ts +24 -0
  181. package/src/consts.ts +22 -0
  182. package/src/crypto.ts +28 -0
  183. package/src/index.ts +147 -0
  184. package/src/migrationUtils.ts +56 -0
  185. package/src/migrations.ts +920 -0
  186. package/src/oauth.ts +390 -0
  187. package/src/oauthCommon.ts +38 -0
  188. package/src/perms.ts +81 -0
  189. package/src/relationships.ts +57 -0
  190. package/src/schema.ts +497 -0
  191. package/src/serverOAuth.ts +119 -0
  192. package/src/typescript-schema.ts +439 -0
  193. package/src/util.ts +77 -0
  194. package/src/version.ts +3 -0
  195. package/tsconfig.dev.json +14 -0
  196. package/tsconfig.json +14 -0
  197. package/vite.config.ts +19 -0
@@ -0,0 +1,310 @@
1
+ import { parse } from '@babel/parser';
2
+ import { i } from '@sidekickdb/core';
3
+ /**
4
+ * Converts a Babel AST node into a JavaScript object/value,
5
+ * suitable for JSON serialization.
6
+ * Throws errors for unsupported AST structures.
7
+ * @param {Node | null} node - The Babel AST node to convert.
8
+ * @returns {JsonValue | null} The JavaScript representation.
9
+ * @throws {Error} If the AST node or its structure is not convertible to JSON.
10
+ */
11
+ export function astToJson(node) {
12
+ if (!node) {
13
+ return null;
14
+ }
15
+ switch (node.type) {
16
+ case 'ObjectExpression':
17
+ const objNode = node;
18
+ return objNode.properties.reduce((obj, prop) => {
19
+ if (prop.type === 'ObjectProperty') {
20
+ const objectProperty = prop;
21
+ let key;
22
+ if (objectProperty.key.type === 'Identifier') {
23
+ key = objectProperty.key.name;
24
+ }
25
+ else if (objectProperty.key.type === 'StringLiteral' ||
26
+ objectProperty.key.type === 'NumericLiteral') {
27
+ key = objectProperty.key
28
+ .value;
29
+ }
30
+ else {
31
+ throw new Error(`Unsupported key type in ObjectProperty: ${objectProperty.key.type}`);
32
+ }
33
+ obj[key] = astToJson(objectProperty.value);
34
+ }
35
+ else if (prop.type !== 'SpreadElement' &&
36
+ prop.type !== 'ObjectMethod') {
37
+ throw new Error(
38
+ // @ts-expect-error: prop is `never` here
39
+ `Unsupported property type in ObjectExpression: ${prop.type}`);
40
+ }
41
+ return obj;
42
+ }, {});
43
+ case 'ArrayExpression':
44
+ const arrNode = node;
45
+ return arrNode.elements
46
+ .map((element) => {
47
+ if (element && element.type === 'SpreadElement') {
48
+ return undefined;
49
+ }
50
+ return astToJson(element);
51
+ })
52
+ .filter((value) => value !== undefined);
53
+ case 'ObjectProperty':
54
+ const objPropNode = node;
55
+ let objectPropertyKey;
56
+ if (objPropNode.key.type === 'Identifier') {
57
+ objectPropertyKey = objPropNode.key.name;
58
+ }
59
+ else if (objPropNode.key.type === 'StringLiteral' ||
60
+ objPropNode.key.type === 'NumericLiteral') {
61
+ objectPropertyKey = objPropNode.key
62
+ .value;
63
+ }
64
+ else {
65
+ throw new Error(`Unsupported key type for standalone ObjectProperty: ${objPropNode.key.type}`);
66
+ }
67
+ const newObj = {};
68
+ newObj[objectPropertyKey] = astToJson(objPropNode.value);
69
+ return newObj;
70
+ case 'StringLiteral':
71
+ case 'NumericLiteral':
72
+ case 'BooleanLiteral':
73
+ return node.value;
74
+ case 'NullLiteral':
75
+ return null;
76
+ default:
77
+ throw new Error(`Unsupported AST node type for JSON conversion: ${node.type}`);
78
+ }
79
+ }
80
+ function keyName(property) {
81
+ switch (property.key.type) {
82
+ case 'Identifier':
83
+ return property.key.name;
84
+ case 'StringLiteral':
85
+ return property.key.value;
86
+ default:
87
+ throw new Error(`Could not extract entities, expected object key to be an \`Identifier\` or \`StringLiteral\`, got \`${property.key.type}\`.`);
88
+ }
89
+ }
90
+ function entityNodeToEntityDef(etype, node) {
91
+ const attrs = {};
92
+ for (const property of node.properties) {
93
+ if (property.type !== 'ObjectProperty') {
94
+ throw new Error(`Expected i.entity for \`${etype}\` to contain only \`ObjectProperty\`, got \`${property.type}\`.`);
95
+ }
96
+ const label = keyName(property);
97
+ const props = [];
98
+ if (property.value.type !== 'CallExpression') {
99
+ throw new Error(`Could not extract \`${etype}.${label}\`. Expected a call to \`i.string()\`, \`i.number()\`, etc. Got something else.`);
100
+ }
101
+ let next = property.value;
102
+ if (label === 'path') {
103
+ }
104
+ let attrDef = null;
105
+ while (next) {
106
+ if (next.callee.type !== 'MemberExpression' ||
107
+ next.callee.property.type !== 'Identifier' ||
108
+ !(next.callee.object.type === 'CallExpression' ||
109
+ (next.callee.object.type === 'Identifier' &&
110
+ next.callee.object.name === 'i'))) {
111
+ throw new Error(`Could not extract \`${etype}.${label}\`. Expected a call to \`i.string()\`, \`i.number()\`, etc. Got something else.`);
112
+ }
113
+ if (next.callee.object.type === 'CallExpression') {
114
+ props.push(next.callee.property.name);
115
+ next = next.callee.object;
116
+ }
117
+ else {
118
+ switch (next.callee.property.name) {
119
+ case 'string': {
120
+ attrDef = i.string();
121
+ break;
122
+ }
123
+ case 'number': {
124
+ attrDef = i.number();
125
+ break;
126
+ }
127
+ case 'boolean': {
128
+ attrDef = i.boolean();
129
+ break;
130
+ }
131
+ case 'date': {
132
+ attrDef = i.date();
133
+ break;
134
+ }
135
+ case 'json': {
136
+ attrDef = i.json();
137
+ break;
138
+ }
139
+ case 'any': {
140
+ attrDef = i.any();
141
+ break;
142
+ }
143
+ }
144
+ next = null;
145
+ }
146
+ }
147
+ if (!attrDef) {
148
+ throw new Error(`Could not extract \`${etype}.${label}\`. Found no call to \`i.string()\`, \`i.number()\`, etc.`);
149
+ }
150
+ for (const prop of props.reverse()) {
151
+ switch (prop) {
152
+ case 'indexed': {
153
+ attrDef = attrDef.indexed();
154
+ break;
155
+ }
156
+ case 'unique': {
157
+ attrDef = attrDef.unique();
158
+ break;
159
+ }
160
+ case 'optional': {
161
+ attrDef = attrDef.optional();
162
+ break;
163
+ }
164
+ case 'clientRequired': {
165
+ attrDef = attrDef.clientRequired();
166
+ break;
167
+ }
168
+ default: {
169
+ throw new Error(`Could not extract \`${etype}.${label}\`. Found a call to \`${prop}()\` that is not recognized.`);
170
+ }
171
+ }
172
+ }
173
+ attrs[label] = attrDef;
174
+ }
175
+ return i.entity(attrs);
176
+ }
177
+ function entitiesNodeToEntitiesDef(node) {
178
+ const entities = {};
179
+ for (const property of node.properties) {
180
+ if (property.type !== 'ObjectProperty') {
181
+ throw new Error(`Expected entities to contain only \`ObjectProperty\`, got \`${property.type}\`.`);
182
+ }
183
+ const etype = keyName(property);
184
+ if (property.value.type !== 'CallExpression' ||
185
+ property.value.callee.type !== 'MemberExpression' ||
186
+ property.value.callee.object.type !== 'Identifier' ||
187
+ property.value.callee.object.name !== 'i' ||
188
+ property.value.arguments.length !== 1 ||
189
+ property.value.arguments[0].type !== 'ObjectExpression') {
190
+ throw new Error(`Could not extract entity \`${etype}\`. Expected a call to \`i.entity()\`, got something else.`);
191
+ }
192
+ entities[etype] = entityNodeToEntityDef(etype, property.value.arguments[0]);
193
+ }
194
+ return entities;
195
+ }
196
+ function roomNodeToRoomDef(roomName, node) {
197
+ let presence = null;
198
+ let topics = undefined;
199
+ for (const property of node.properties) {
200
+ if (property.type !== 'ObjectProperty') {
201
+ throw new Error(`Expected entities to contain only \`ObjectProperty\`, got \`${property.type}\`.`);
202
+ }
203
+ const propName = keyName(property);
204
+ switch (propName) {
205
+ case 'topics': {
206
+ if (property.value.type !== 'ObjectExpression') {
207
+ throw new Error(`Could not exxtract \`rooms.${roomName}.topics\`. Expected an object, got \`${property.value.type}\`.`);
208
+ }
209
+ topics = entitiesNodeToEntitiesDef(property.value);
210
+ break;
211
+ }
212
+ case 'presence': {
213
+ if (property.value.type !== 'CallExpression' ||
214
+ property.value.callee.type !== 'MemberExpression' ||
215
+ property.value.callee.object.type !== 'Identifier' ||
216
+ property.value.callee.object.name !== 'i' ||
217
+ property.value.arguments.length !== 1 ||
218
+ property.value.arguments[0].type !== 'ObjectExpression') {
219
+ throw new Error(`Could not extract \`rooms.${roomName}.presence\`. Expected a call to \`i.entity()\`, got something else.`);
220
+ }
221
+ presence = entityNodeToEntityDef(roomName, property.value.arguments[0]);
222
+ break;
223
+ }
224
+ default: {
225
+ throw new Error(`Could not extract \`rooms.${roomName}\`. Unexpected property \`${propName}\`.`);
226
+ }
227
+ }
228
+ }
229
+ if (!presence) {
230
+ throw new Error(`Could not extract room ${roomName}, \`presence\` key was missing from room definition.`);
231
+ }
232
+ return { presence, topics };
233
+ }
234
+ function roomsNodeToRoomsDef(node) {
235
+ const rooms = {};
236
+ for (const property of node.properties) {
237
+ if (property.type !== 'ObjectProperty') {
238
+ throw new Error(`Expected entities to contain only \`ObjectProperty\`, got \`${property.type}\`.`);
239
+ }
240
+ const roomName = keyName(property);
241
+ if (property.value.type !== 'ObjectExpression') {
242
+ throw new Error(`Could not extract room \`${roomName}\`. Expected an object with topics and presence keys, got \`${property.value.type}\`.`);
243
+ }
244
+ rooms[roomName] = roomNodeToRoomDef(roomName, property.value);
245
+ }
246
+ return rooms;
247
+ }
248
+ function astToSchemaDef(ast) {
249
+ let entities = null;
250
+ let links = {};
251
+ let rooms = {};
252
+ for (const n of ast.program.body) {
253
+ if (n.type !== 'VariableDeclaration' ||
254
+ n.declarations.length !== 1 ||
255
+ n.declarations[0].id.type !== 'Identifier' ||
256
+ n.declarations[0].id.name !== '_schema') {
257
+ continue;
258
+ }
259
+ const node = n.declarations[0];
260
+ if (!node.init ||
261
+ node.init.type !== 'CallExpression' ||
262
+ node.init.callee.type !== 'MemberExpression' ||
263
+ node.init.callee.object.type !== 'Identifier' ||
264
+ node.init.callee.object.name !== 'i' ||
265
+ node.init.arguments.length !== 1 ||
266
+ node.init.arguments[0].type !== 'ObjectExpression') {
267
+ throw new Error(`Could not extract schema. Expected a call to \`i.schema()\`, got something else.`);
268
+ }
269
+ for (const property of node.init.arguments[0].properties) {
270
+ if (property.type !== 'ObjectProperty') {
271
+ throw new Error(`Could not extra schema property, expected an \`ObjectProperty\`, got \`${property.type}\'.`);
272
+ }
273
+ const section = keyName(property);
274
+ if (property.value.type !== 'ObjectExpression') {
275
+ throw new Error(`Failed to extract ${section}, expected an \`ObjectExpression\`, got \`${property.value.type}\`.`);
276
+ }
277
+ switch (keyName(property)) {
278
+ case 'entities': {
279
+ entities = entitiesNodeToEntitiesDef(property.value);
280
+ break;
281
+ }
282
+ case 'links': {
283
+ links = astToJson(property.value) || {};
284
+ break;
285
+ }
286
+ case 'rooms': {
287
+ rooms = roomsNodeToRoomsDef(property.value);
288
+ break;
289
+ }
290
+ }
291
+ }
292
+ }
293
+ if (!entities) {
294
+ throw new Error('Could not extract schema, did not find any entities.');
295
+ }
296
+ return i.schema({ entities, links, rooms });
297
+ }
298
+ export function schemaTypescriptFileToInstantSchema(content, sourceFilename = 'instant.schema.ts') {
299
+ const ast = parse(content, {
300
+ sourceFilename,
301
+ sourceType: 'module',
302
+ errorRecovery: false,
303
+ plugins: ['typescript'],
304
+ });
305
+ if (ast.errors?.length) {
306
+ throw new Error(`Could not parse schema file. ${ast.errors[0].reasonCode}.`);
307
+ }
308
+ return astToSchemaDef(ast);
309
+ }
310
+ //# sourceMappingURL=typescript-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,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KAAK,CAClG,CAAC;YACJ,CAAC;YACD,QAAQ,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;gBAC1B,KAAK,UAAU,CAAC,CAAC,CAAC;oBAChB,QAAQ,GAAG,yBAAyB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;oBACrD,MAAM;gBACR,CAAC;gBACD,KAAK,OAAO,CAAC,CAAC,CAAC;oBACb,KAAK,GAAG,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;oBACxC,MAAM;gBACR,CAAC;gBACD,KAAK,OAAO,CAAC,CAAC,CAAC;oBACb,KAAK,GAAG,mBAAmB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;oBAC5C,MAAM;gBACR,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;IAC1E,CAAC;IAED,OAAO,CAAC,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,mCAAmC,CACjD,OAAe,EACf,iBAAyB,mBAAmB;IAE5C,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,EAAE;QACzB,cAAc;QACd,UAAU,EAAE,QAAQ;QACpB,aAAa,EAAE,KAAK;QACpB,OAAO,EAAE,CAAC,YAAY,CAAC;KACxB,CAAC,CAAC;IACH,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CACb,gCAAgC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,UAAU,GAAG,CAC5D,CAAC;IACJ,CAAC;IAED,OAAO,cAAc,CAAC,GAAG,CAAC,CAAC;AAC7B,CAAC","sourcesContent":["import { parse, type ParseResult, type File } from '@babel/parser';\nimport type {\n CallExpression,\n ObjectExpression,\n ObjectProperty,\n Node,\n Expression,\n Identifier,\n StringLiteral,\n NumericLiteral,\n ArrayExpression,\n SpreadElement,\n BooleanLiteral,\n} from '@babel/types';\n\nimport { GenericSchemaDef } from './util.ts';\nimport { AttrsDefs, DataAttrDef, i } from '@sidekickdb/core';\n\ntype JsonValue =\n | string\n | number\n | boolean\n | null\n | JsonValue[]\n | { [key: string]: JsonValue };\n\n/**\n * Converts a Babel AST node into a JavaScript object/value,\n * suitable for JSON serialization.\n * Throws errors for unsupported AST structures.\n * @param {Node | null} node - The Babel AST node to convert.\n * @returns {JsonValue | null} The JavaScript representation.\n * @throws {Error} If the AST node or its structure is not convertible to JSON.\n */\nexport function astToJson(node: Node | null): JsonValue | null {\n if (!node) {\n return null;\n }\n\n switch (node.type) {\n case 'ObjectExpression':\n const objNode = node as ObjectExpression;\n return objNode.properties.reduce(\n (obj: { [key: string]: JsonValue }, prop) => {\n if (prop.type === 'ObjectProperty') {\n const objectProperty = prop as ObjectProperty;\n let key: string | number;\n if (objectProperty.key.type === 'Identifier') {\n key = (objectProperty.key as Identifier).name;\n } else if (\n objectProperty.key.type === 'StringLiteral' ||\n objectProperty.key.type === 'NumericLiteral'\n ) {\n key = (objectProperty.key as StringLiteral | NumericLiteral)\n .value;\n } else {\n throw new Error(\n `Unsupported key type in ObjectProperty: ${objectProperty.key.type}`,\n );\n }\n obj[key] = astToJson(objectProperty.value);\n } else if (\n prop.type !== 'SpreadElement' &&\n prop.type !== 'ObjectMethod'\n ) {\n throw new Error(\n // @ts-expect-error: prop is `never` here\n `Unsupported property type in ObjectExpression: ${prop.type}`,\n );\n }\n return obj;\n },\n {},\n );\n\n case 'ArrayExpression':\n const arrNode = node as ArrayExpression;\n return arrNode.elements\n .map((element) => {\n if (element && element.type === 'SpreadElement') {\n return undefined;\n }\n return astToJson(element as Expression | SpreadElement | null);\n })\n .filter((value) => value !== undefined) as JsonValue[];\n\n case 'ObjectProperty':\n const objPropNode = node as ObjectProperty;\n let objectPropertyKey: string | number;\n if (objPropNode.key.type === 'Identifier') {\n objectPropertyKey = (objPropNode.key as Identifier).name;\n } else if (\n objPropNode.key.type === 'StringLiteral' ||\n objPropNode.key.type === 'NumericLiteral'\n ) {\n objectPropertyKey = (objPropNode.key as StringLiteral | NumericLiteral)\n .value;\n } else {\n throw new Error(\n `Unsupported key type for standalone ObjectProperty: ${objPropNode.key.type}`,\n );\n }\n const newObj: { [key: string]: JsonValue } = {};\n newObj[objectPropertyKey] = astToJson(objPropNode.value);\n return newObj;\n\n case 'StringLiteral':\n case 'NumericLiteral':\n case 'BooleanLiteral':\n return (node as StringLiteral | NumericLiteral | BooleanLiteral).value;\n\n case 'NullLiteral':\n return null;\n\n default:\n throw new Error(\n `Unsupported AST node type for JSON conversion: ${node.type}`,\n );\n }\n}\n\nfunction keyName(property: ObjectProperty): string {\n switch (property.key.type) {\n case 'Identifier':\n return property.key.name;\n case 'StringLiteral':\n return property.key.value;\n default:\n throw new Error(\n `Could not extract entities, expected object key to be an \\`Identifier\\` or \\`StringLiteral\\`, got \\`${property.key.type}\\`.`,\n );\n }\n}\n\nfunction entityNodeToEntityDef(\n etype: string,\n node: ObjectExpression,\n): GenericSchemaDef['entities'][string] {\n const attrs: AttrsDefs = {};\n for (const property of node.properties) {\n if (property.type !== 'ObjectProperty') {\n throw new Error(\n `Expected i.entity for \\`${etype}\\` to contain only \\`ObjectProperty\\`, got \\`${property.type}\\`.`,\n );\n }\n const label = keyName(property);\n\n const props = [];\n\n if (property.value.type !== 'CallExpression') {\n throw new Error(\n `Could not extract \\`${etype}.${label}\\`. Expected a call to \\`i.string()\\`, \\`i.number()\\`, etc. Got something else.`,\n );\n }\n let next: CallExpression | null = property.value;\n if (label === 'path') {\n }\n let attrDef: DataAttrDef<string, boolean, boolean> | null = null;\n while (next) {\n if (\n next.callee.type !== 'MemberExpression' ||\n next.callee.property.type !== 'Identifier' ||\n !(\n next.callee.object.type === 'CallExpression' ||\n (next.callee.object.type === 'Identifier' &&\n next.callee.object.name === 'i')\n )\n ) {\n throw new Error(\n `Could not extract \\`${etype}.${label}\\`. Expected a call to \\`i.string()\\`, \\`i.number()\\`, etc. Got something else.`,\n );\n }\n\n if (next.callee.object.type === 'CallExpression') {\n props.push(next.callee.property.name);\n next = next.callee.object;\n } else {\n switch (next.callee.property.name) {\n case 'string': {\n attrDef = i.string();\n break;\n }\n case 'number': {\n attrDef = i.number();\n break;\n }\n case 'boolean': {\n attrDef = i.boolean();\n break;\n }\n case 'date': {\n attrDef = i.date();\n break;\n }\n case 'json': {\n attrDef = i.json();\n break;\n }\n case 'any': {\n attrDef = i.any();\n break;\n }\n }\n next = null;\n }\n }\n\n if (!attrDef) {\n throw new Error(\n `Could not extract \\`${etype}.${label}\\`. Found no call to \\`i.string()\\`, \\`i.number()\\`, etc.`,\n );\n }\n\n for (const prop of props.reverse()) {\n switch (prop) {\n case 'indexed': {\n attrDef = attrDef.indexed();\n break;\n }\n case 'unique': {\n attrDef = attrDef.unique();\n break;\n }\n case 'optional': {\n attrDef = attrDef.optional();\n break;\n }\n case 'clientRequired': {\n attrDef = attrDef.clientRequired();\n break;\n }\n default: {\n throw new Error(\n `Could not extract \\`${etype}.${label}\\`. Found a call to \\`${prop}()\\` that is not recognized.`,\n );\n }\n }\n }\n\n attrs[label] = attrDef;\n }\n\n return i.entity(attrs);\n}\n\nfunction entitiesNodeToEntitiesDef(\n node: ObjectExpression,\n): GenericSchemaDef['entities'] {\n const entities: GenericSchemaDef['entities'] = {};\n for (const property of node.properties) {\n if (property.type !== 'ObjectProperty') {\n throw new Error(\n `Expected entities to contain only \\`ObjectProperty\\`, got \\`${property.type}\\`.`,\n );\n }\n const etype = keyName(property);\n if (\n property.value.type !== 'CallExpression' ||\n property.value.callee.type !== 'MemberExpression' ||\n property.value.callee.object.type !== 'Identifier' ||\n property.value.callee.object.name !== 'i' ||\n property.value.arguments.length !== 1 ||\n property.value.arguments[0].type !== 'ObjectExpression'\n ) {\n throw new Error(\n `Could not extract entity \\`${etype}\\`. Expected a call to \\`i.entity()\\`, got something else.`,\n );\n }\n entities[etype] = entityNodeToEntityDef(etype, property.value.arguments[0]);\n }\n\n return entities;\n}\n\nfunction roomNodeToRoomDef(\n roomName: string,\n node: ObjectExpression,\n): GenericSchemaDef['rooms'][string] {\n let presence: GenericSchemaDef['rooms'][string]['presence'] | null = null;\n let topics: GenericSchemaDef['rooms'][string]['topics'] | undefined =\n undefined;\n for (const property of node.properties) {\n if (property.type !== 'ObjectProperty') {\n throw new Error(\n `Expected entities to contain only \\`ObjectProperty\\`, got \\`${property.type}\\`.`,\n );\n }\n const propName = keyName(property);\n switch (propName) {\n case 'topics': {\n if (property.value.type !== 'ObjectExpression') {\n throw new Error(\n `Could not exxtract \\`rooms.${roomName}.topics\\`. Expected an object, got \\`${property.value.type}\\`.`,\n );\n }\n topics = entitiesNodeToEntitiesDef(property.value);\n break;\n }\n case 'presence': {\n if (\n property.value.type !== 'CallExpression' ||\n property.value.callee.type !== 'MemberExpression' ||\n property.value.callee.object.type !== 'Identifier' ||\n property.value.callee.object.name !== 'i' ||\n property.value.arguments.length !== 1 ||\n property.value.arguments[0].type !== 'ObjectExpression'\n ) {\n throw new Error(\n `Could not extract \\`rooms.${roomName}.presence\\`. Expected a call to \\`i.entity()\\`, got something else.`,\n );\n }\n presence = entityNodeToEntityDef(roomName, property.value.arguments[0]);\n break;\n }\n default: {\n throw new Error(\n `Could not extract \\`rooms.${roomName}\\`. Unexpected property \\`${propName}\\`.`,\n );\n }\n }\n }\n if (!presence) {\n throw new Error(\n `Could not extract room ${roomName}, \\`presence\\` key was missing from room definition.`,\n );\n }\n return { presence, topics };\n}\n\nfunction roomsNodeToRoomsDef(\n node: ObjectExpression,\n): GenericSchemaDef['rooms'] {\n const rooms: GenericSchemaDef['rooms'] = {};\n for (const property of node.properties) {\n if (property.type !== 'ObjectProperty') {\n throw new Error(\n `Expected entities to contain only \\`ObjectProperty\\`, got \\`${property.type}\\`.`,\n );\n }\n\n const roomName = keyName(property);\n\n if (property.value.type !== 'ObjectExpression') {\n throw new Error(\n `Could not extract room \\`${roomName}\\`. Expected an object with topics and presence keys, got \\`${property.value.type}\\`.`,\n );\n }\n\n rooms[roomName] = roomNodeToRoomDef(roomName, property.value);\n }\n\n return rooms;\n}\n\nfunction astToSchemaDef(ast: ParseResult<File>): GenericSchemaDef {\n let entities: GenericSchemaDef['entities'] | null = null;\n let links = {};\n let rooms = {};\n\n for (const n of ast.program.body) {\n if (\n n.type !== 'VariableDeclaration' ||\n n.declarations.length !== 1 ||\n n.declarations[0].id.type !== 'Identifier' ||\n n.declarations[0].id.name !== '_schema'\n ) {\n continue;\n }\n\n const node = n.declarations[0];\n\n if (\n !node.init ||\n node.init.type !== 'CallExpression' ||\n node.init.callee.type !== 'MemberExpression' ||\n node.init.callee.object.type !== 'Identifier' ||\n node.init.callee.object.name !== 'i' ||\n node.init.arguments.length !== 1 ||\n node.init.arguments[0].type !== 'ObjectExpression'\n ) {\n throw new Error(\n `Could not extract schema. Expected a call to \\`i.schema()\\`, got something else.`,\n );\n }\n\n for (const property of node.init.arguments[0].properties) {\n if (property.type !== 'ObjectProperty') {\n throw new Error(\n `Could not extra schema property, expected an \\`ObjectProperty\\`, got \\`${property.type}\\'.`,\n );\n }\n const section = keyName(property);\n if (property.value.type !== 'ObjectExpression') {\n throw new Error(\n `Failed to extract ${section}, expected an \\`ObjectExpression\\`, got \\`${property.value.type}\\`.`,\n );\n }\n switch (keyName(property)) {\n case 'entities': {\n entities = entitiesNodeToEntitiesDef(property.value);\n break;\n }\n case 'links': {\n links = astToJson(property.value) || {};\n break;\n }\n case 'rooms': {\n rooms = roomsNodeToRoomsDef(property.value);\n break;\n }\n }\n }\n }\n\n if (!entities) {\n throw new Error('Could not extract schema, did not find any entities.');\n }\n\n return i.schema({ entities, links, rooms });\n}\n\nexport function schemaTypescriptFileToInstantSchema(\n content: string,\n sourceFilename: string = 'instant.schema.ts',\n): GenericSchemaDef {\n const ast = parse(content, {\n sourceFilename,\n sourceType: 'module',\n errorRecovery: false,\n plugins: ['typescript'],\n });\n if (ast.errors?.length) {\n throw new Error(\n `Could not parse schema file. ${ast.errors[0].reasonCode}.`,\n );\n }\n\n return astToSchemaDef(ast);\n}\n"]}
@@ -0,0 +1,13 @@
1
+ import { AttrsDefs, CardinalityKind, EntityDef, InstantDBAttr, InstantDBCheckedDataType, InstantDBInferredType, InstantSchemaDef, LinksDef, RoomsDef } from '@sidekickdb/core';
2
+ export declare function sortedEntries<T>(o: Record<string, T>): [string, T][];
3
+ export declare function capitalizeFirstLetter(string: string): string;
4
+ export declare const rels: Record<string, CardinalityKind[]>;
5
+ export declare function indentLines(s: string, n?: number): string;
6
+ export declare function joinWithTrailingSep(arr: string[], sep: string, trailingSep?: string): string;
7
+ export declare function deriveClientType(attr: InstantDBAttr): {
8
+ type: InstantDBCheckedDataType | InstantDBInferredType | 'any';
9
+ origin: 'checked' | 'inferred' | 'unknown';
10
+ };
11
+ export declare function formatKey(key: string): string;
12
+ export type GenericSchemaDef = InstantSchemaDef<Record<string, EntityDef<AttrsDefs, any, any>>, LinksDef<Record<string, EntityDef<AttrsDefs, any, any>>>, RoomsDef>;
13
+ //# sourceMappingURL=util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,eAAe,EACf,SAAS,EACT,aAAa,EACb,wBAAwB,EACxB,qBAAqB,EACrB,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACT,MAAM,kBAAkB,CAAC;AAE1B,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAEpE;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,EAAE,CAKlD,CAAC;AAEF,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,SAAI,UAS3C;AAED,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,MAAM,EAAE,EACb,GAAG,EAAE,MAAM,EACX,WAAW,GAAE,MAAY,GACxB,MAAM,CAMR;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,aAAa,GAAG;IACrD,IAAI,EAAE,wBAAwB,GAAG,qBAAqB,GAAG,KAAK,CAAC;IAC/D,MAAM,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;CAC5C,CAMA;AAED,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,UASpC;AAED,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,CAC7C,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,SAAS,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,EAC9C,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,SAAS,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,EACxD,QAAQ,CACT,CAAC"}
@@ -0,0 +1,46 @@
1
+ export function sortedEntries(o) {
2
+ return Object.entries(o).sort(([a], [b]) => a.localeCompare(b));
3
+ }
4
+ export function capitalizeFirstLetter(string) {
5
+ return string.charAt(0).toUpperCase() + string.slice(1);
6
+ }
7
+ export const rels = {
8
+ 'many-false': ['many', 'many'],
9
+ 'one-true': ['one', 'one'],
10
+ 'many-true': ['many', 'one'],
11
+ 'one-false': ['one', 'many'],
12
+ };
13
+ export function indentLines(s, n = 2) {
14
+ if (!s) {
15
+ return s;
16
+ }
17
+ const space = ' '.repeat(n);
18
+ return s
19
+ .split('\n')
20
+ .map((l) => `${space}${l}`)
21
+ .join('\n');
22
+ }
23
+ export function joinWithTrailingSep(arr, sep, trailingSep = sep) {
24
+ const s = arr.join(sep);
25
+ if (arr.length) {
26
+ return s + trailingSep;
27
+ }
28
+ return s;
29
+ }
30
+ export function deriveClientType(attr) {
31
+ if (attr['checked-data-type']) {
32
+ return { type: attr['checked-data-type'], origin: 'checked' };
33
+ }
34
+ return { type: 'any', origin: 'unknown' };
35
+ }
36
+ export function formatKey(key) {
37
+ return `"${key}"`;
38
+ // It would be nice to generate unquoted keys, but we use JSON.stringify
39
+ // for some things so we can't be consistent with it unless we write our own
40
+ // stringify function. If we do, here's the code for formatting keys:
41
+ // if (/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(key)) {
42
+ // return key;
43
+ // }
44
+ // return `"${key}"`;
45
+ }
46
+ //# sourceMappingURL=util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":"AAYA,MAAM,UAAU,aAAa,CAAI,CAAoB;IACnD,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;AAClE,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,MAAc;IAClD,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC1D,CAAC;AAED,MAAM,CAAC,MAAM,IAAI,GAAsC;IACrD,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;IAC9B,UAAU,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;IAC1B,WAAW,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC;IAC5B,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,MAAM,UAAU,WAAW,CAAC,CAAS,EAAE,CAAC,GAAG,CAAC;IAC1C,IAAI,CAAC,CAAC,EAAE,CAAC;QACP,OAAO,CAAC,CAAC;IACX,CAAC;IACD,MAAM,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAC5B,OAAO,CAAC;SACL,KAAK,CAAC,IAAI,CAAC;SACX,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC;SAC1B,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,GAAa,EACb,GAAW,EACX,cAAsB,GAAG;IAEzB,MAAM,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACxB,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;QACf,OAAO,CAAC,GAAG,WAAW,CAAC;IACzB,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAAmB;IAIlD,IAAI,IAAI,CAAC,mBAAmB,CAAC,EAAE,CAAC;QAC9B,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,mBAAmB,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;IAChE,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;AAC5C,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,GAAW;IACnC,OAAO,IAAI,GAAG,GAAG,CAAC;IAClB,wEAAwE;IACxE,4EAA4E;IAC5E,qEAAqE;IACrE,gDAAgD;IAChD,gBAAgB;IAChB,IAAI;IACJ,qBAAqB;AACvB,CAAC","sourcesContent":["import {\n AttrsDefs,\n CardinalityKind,\n EntityDef,\n InstantDBAttr,\n InstantDBCheckedDataType,\n InstantDBInferredType,\n InstantSchemaDef,\n LinksDef,\n RoomsDef,\n} from '@sidekickdb/core';\n\nexport function sortedEntries<T>(o: Record<string, T>): [string, T][] {\n return Object.entries(o).sort(([a], [b]) => a.localeCompare(b));\n}\n\nexport function capitalizeFirstLetter(string: string): string {\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\n\nexport const rels: Record<string, CardinalityKind[]> = {\n 'many-false': ['many', 'many'],\n 'one-true': ['one', 'one'],\n 'many-true': ['many', 'one'],\n 'one-false': ['one', 'many'],\n};\n\nexport function indentLines(s: string, n = 2) {\n if (!s) {\n return s;\n }\n const space = ' '.repeat(n);\n return s\n .split('\\n')\n .map((l) => `${space}${l}`)\n .join('\\n');\n}\n\nexport function joinWithTrailingSep(\n arr: string[],\n sep: string,\n trailingSep: string = sep,\n): string {\n const s = arr.join(sep);\n if (arr.length) {\n return s + trailingSep;\n }\n return s;\n}\n\nexport function deriveClientType(attr: InstantDBAttr): {\n type: InstantDBCheckedDataType | InstantDBInferredType | 'any';\n origin: 'checked' | 'inferred' | 'unknown';\n} {\n if (attr['checked-data-type']) {\n return { type: attr['checked-data-type'], origin: 'checked' };\n }\n\n return { type: 'any', origin: 'unknown' };\n}\n\nexport function formatKey(key: string) {\n return `\"${key}\"`;\n // It would be nice to generate unquoted keys, but we use JSON.stringify\n // for some things so we can't be consistent with it unless we write our own\n // stringify function. If we do, here's the code for formatting keys:\n // if (/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(key)) {\n // return key;\n // }\n // return `\"${key}\"`;\n}\n\nexport type GenericSchemaDef = InstantSchemaDef<\n Record<string, EntityDef<AttrsDefs, any, any>>,\n LinksDef<Record<string, EntityDef<AttrsDefs, any, any>>>,\n RoomsDef\n>;\n"]}
@@ -0,0 +1,3 @@
1
+ import { version } from '@sidekickdb/version';
2
+ export default version;
3
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,eAAe,OAAO,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { version } from '@sidekickdb/version';
2
+ export default version;
3
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,eAAe,OAAO,CAAC","sourcesContent":["import { version } from '@sidekickdb/version';\n\nexport default version;\n"]}