@sidekickdb/core 2.0.1 → 3.0.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.
Files changed (320) hide show
  1. package/__example__/standalone.esm.html +1 -1
  2. package/__example__/standalone.umd.html +2 -2
  3. package/__tests__/src/Reactor.test.ts +70 -25
  4. package/__tests__/src/batchedFrames.test.ts +110 -0
  5. package/__tests__/src/createRouteHandler.test.ts +30 -0
  6. package/__tests__/src/data/zeneca/triples.json +6 -6
  7. package/__tests__/src/dataForQueryMemo.test.ts +4 -4
  8. package/__tests__/src/datalog.test.ts +2 -2
  9. package/__tests__/src/devtool.test.ts +2 -2
  10. package/__tests__/src/endpoints.test.ts +2 -2
  11. package/__tests__/src/infiniteQuery.test.ts +142 -0
  12. package/__tests__/src/notifyScope.test.ts +6 -6
  13. package/__tests__/src/queryValidation.test.ts +3 -3
  14. package/__tests__/src/schema.test.ts +6 -6
  15. package/__tests__/src/serializeSchema.test.ts +2 -2
  16. package/__tests__/src/{instaml.test.ts → sideml.test.ts} +106 -112
  17. package/__tests__/src/{instaql.bench.ts → sideql.bench.ts} +1 -1
  18. package/__tests__/src/{instaql.test.ts → sideql.test.ts} +25 -34
  19. package/__tests__/src/{instaqlInference.test.ts → sideqlInference.test.ts} +1 -1
  20. package/__tests__/src/store.test.ts +32 -32
  21. package/__tests__/src/transactionValidation.test.ts +4 -4
  22. package/__tests__/src/utils/e2e.ts +8 -8
  23. package/dist/commonjs/Connection.d.ts +1 -0
  24. package/dist/commonjs/Connection.d.ts.map +1 -1
  25. package/dist/commonjs/Connection.js +19 -3
  26. package/dist/commonjs/Connection.js.map +1 -1
  27. package/dist/commonjs/IndexedDBStorage.d.ts.map +1 -1
  28. package/dist/commonjs/IndexedDBStorage.js +3 -160
  29. package/dist/commonjs/IndexedDBStorage.js.map +1 -1
  30. package/dist/commonjs/Reactor.d.ts +7 -7
  31. package/dist/commonjs/Reactor.d.ts.map +1 -1
  32. package/dist/commonjs/Reactor.js +37 -38
  33. package/dist/commonjs/Reactor.js.map +1 -1
  34. package/dist/commonjs/{InstantError.d.ts → SidekickError.d.ts} +2 -2
  35. package/dist/commonjs/SidekickError.d.ts.map +1 -0
  36. package/dist/commonjs/{InstantError.js → SidekickError.js} +7 -7
  37. package/dist/commonjs/SidekickError.js.map +1 -0
  38. package/dist/commonjs/Stream.d.ts +5 -5
  39. package/dist/commonjs/Stream.d.ts.map +1 -1
  40. package/dist/commonjs/Stream.js +14 -14
  41. package/dist/commonjs/Stream.js.map +1 -1
  42. package/dist/commonjs/SyncTable.d.ts +3 -3
  43. package/dist/commonjs/SyncTable.d.ts.map +1 -1
  44. package/dist/commonjs/SyncTable.js +7 -7
  45. package/dist/commonjs/SyncTable.js.map +1 -1
  46. package/dist/commonjs/attrTypes.d.ts +11 -11
  47. package/dist/commonjs/attrTypes.d.ts.map +1 -1
  48. package/dist/commonjs/attrTypes.js.map +1 -1
  49. package/dist/commonjs/coreTypes.d.ts +4 -4
  50. package/dist/commonjs/coreTypes.d.ts.map +1 -1
  51. package/dist/commonjs/coreTypes.js.map +1 -1
  52. package/dist/commonjs/createRouteHandler.d.ts +1 -1
  53. package/dist/commonjs/createRouteHandler.d.ts.map +1 -1
  54. package/dist/commonjs/createRouteHandler.js +5 -5
  55. package/dist/commonjs/createRouteHandler.js.map +1 -1
  56. package/dist/commonjs/devtool.js +13 -6
  57. package/dist/commonjs/devtool.js.map +1 -1
  58. package/dist/commonjs/endpoints.d.ts +2 -2
  59. package/dist/commonjs/endpoints.d.ts.map +1 -1
  60. package/dist/commonjs/endpoints.js +3 -3
  61. package/dist/commonjs/endpoints.js.map +1 -1
  62. package/dist/commonjs/framework.d.ts +4 -4
  63. package/dist/commonjs/framework.d.ts.map +1 -1
  64. package/dist/commonjs/framework.js +5 -5
  65. package/dist/commonjs/framework.js.map +1 -1
  66. package/dist/commonjs/helperTypes.d.ts +24 -24
  67. package/dist/commonjs/helperTypes.d.ts.map +1 -1
  68. package/dist/commonjs/helperTypes.js.map +1 -1
  69. package/dist/commonjs/index.d.ts +36 -36
  70. package/dist/commonjs/index.d.ts.map +1 -1
  71. package/dist/commonjs/index.js +36 -36
  72. package/dist/commonjs/index.js.map +1 -1
  73. package/dist/commonjs/infiniteQuery.d.ts +7 -7
  74. package/dist/commonjs/infiniteQuery.d.ts.map +1 -1
  75. package/dist/commonjs/infiniteQuery.js +16 -3
  76. package/dist/commonjs/infiniteQuery.js.map +1 -1
  77. package/dist/commonjs/model/{instaqlResult.d.ts → sideqlResult.d.ts} +2 -2
  78. package/dist/commonjs/model/sideqlResult.d.ts.map +1 -0
  79. package/dist/commonjs/model/{instaqlResult.js → sideqlResult.js} +2 -2
  80. package/dist/commonjs/model/sideqlResult.js.map +1 -0
  81. package/dist/commonjs/notifyScope.js +3 -3
  82. package/dist/commonjs/notifyScope.js.map +1 -1
  83. package/dist/commonjs/parseSchemaFromJSON.d.ts +2 -2
  84. package/dist/commonjs/parseSchemaFromJSON.d.ts.map +1 -1
  85. package/dist/commonjs/parseSchemaFromJSON.js.map +1 -1
  86. package/dist/commonjs/queryTypes.d.ts +32 -32
  87. package/dist/commonjs/queryTypes.d.ts.map +1 -1
  88. package/dist/commonjs/queryTypes.js.map +1 -1
  89. package/dist/commonjs/routeHandlerProtocol.d.ts +7 -7
  90. package/dist/commonjs/routeHandlerProtocol.d.ts.map +1 -1
  91. package/dist/commonjs/routeHandlerProtocol.js.map +1 -1
  92. package/dist/commonjs/rulesTypes.d.ts +20 -20
  93. package/dist/commonjs/rulesTypes.d.ts.map +1 -1
  94. package/dist/commonjs/rulesTypes.js.map +1 -1
  95. package/dist/commonjs/sanityCheckQueries.d.ts +3 -3
  96. package/dist/commonjs/sanityCheckQueries.d.ts.map +1 -1
  97. package/dist/commonjs/sanityCheckQueries.js.map +1 -1
  98. package/dist/commonjs/schema.d.ts +3 -3
  99. package/dist/commonjs/schema.d.ts.map +1 -1
  100. package/dist/commonjs/schema.js +2 -2
  101. package/dist/commonjs/schema.js.map +1 -1
  102. package/dist/commonjs/schemaTypes.d.ts +8 -8
  103. package/dist/commonjs/schemaTypes.d.ts.map +1 -1
  104. package/dist/commonjs/schemaTypes.js +9 -9
  105. package/dist/commonjs/schemaTypes.js.map +1 -1
  106. package/dist/commonjs/{instaml.d.ts → sideml.d.ts} +1 -1
  107. package/dist/commonjs/sideml.d.ts.map +1 -0
  108. package/dist/commonjs/{instaml.js → sideml.js} +10 -7
  109. package/dist/commonjs/sideml.js.map +1 -0
  110. package/dist/commonjs/{instaql.d.ts → sideql.d.ts} +1 -1
  111. package/dist/commonjs/sideql.d.ts.map +1 -0
  112. package/dist/commonjs/{instaql.js → sideql.js} +1 -1
  113. package/dist/commonjs/sideql.js.map +1 -0
  114. package/dist/commonjs/{instatx.d.ts → sidetx.d.ts} +1 -1
  115. package/dist/commonjs/sidetx.d.ts.map +1 -0
  116. package/dist/commonjs/{instatx.js → sidetx.js} +1 -1
  117. package/dist/commonjs/sidetx.js.map +1 -0
  118. package/dist/commonjs/store.d.ts +22 -22
  119. package/dist/commonjs/store.d.ts.map +1 -1
  120. package/dist/commonjs/store.js +0 -2
  121. package/dist/commonjs/store.js.map +1 -1
  122. package/dist/commonjs/transactionValidation.d.ts +1 -1
  123. package/dist/commonjs/transactionValidation.d.ts.map +1 -1
  124. package/dist/commonjs/transactionValidation.js +2 -2
  125. package/dist/commonjs/transactionValidation.js.map +1 -1
  126. package/dist/commonjs/utils/dates.js +31 -31
  127. package/dist/commonjs/utils/dates.js.map +1 -1
  128. package/dist/commonjs/utils/fetch.d.ts +7 -7
  129. package/dist/commonjs/utils/fetch.d.ts.map +1 -1
  130. package/dist/commonjs/utils/fetch.js +8 -8
  131. package/dist/commonjs/utils/fetch.js.map +1 -1
  132. package/dist/commonjs/utils/flags.d.ts +2 -2
  133. package/dist/commonjs/utils/flags.d.ts.map +1 -1
  134. package/dist/commonjs/utils/flags.js +4 -4
  135. package/dist/commonjs/utils/flags.js.map +1 -1
  136. package/dist/commonjs/utils/linkIndex.d.ts +2 -2
  137. package/dist/commonjs/utils/linkIndex.d.ts.map +1 -1
  138. package/dist/commonjs/utils/linkIndex.js.map +1 -1
  139. package/dist/commonjs/warningToggle.d.ts +1 -1
  140. package/dist/commonjs/warningToggle.d.ts.map +1 -1
  141. package/dist/commonjs/warningToggle.js +3 -3
  142. package/dist/commonjs/warningToggle.js.map +1 -1
  143. package/dist/esm/Connection.d.ts +1 -0
  144. package/dist/esm/Connection.d.ts.map +1 -1
  145. package/dist/esm/Connection.js +18 -3
  146. package/dist/esm/Connection.js.map +1 -1
  147. package/dist/esm/IndexedDBStorage.d.ts.map +1 -1
  148. package/dist/esm/IndexedDBStorage.js +4 -161
  149. package/dist/esm/IndexedDBStorage.js.map +1 -1
  150. package/dist/esm/Reactor.d.ts +7 -7
  151. package/dist/esm/Reactor.d.ts.map +1 -1
  152. package/dist/esm/Reactor.js +38 -39
  153. package/dist/esm/Reactor.js.map +1 -1
  154. package/dist/esm/{InstantError.d.ts → SidekickError.d.ts} +2 -2
  155. package/dist/esm/SidekickError.d.ts.map +1 -0
  156. package/dist/esm/{InstantError.js → SidekickError.js} +5 -5
  157. package/dist/esm/SidekickError.js.map +1 -0
  158. package/dist/esm/Stream.d.ts +5 -5
  159. package/dist/esm/Stream.d.ts.map +1 -1
  160. package/dist/esm/Stream.js +12 -12
  161. package/dist/esm/Stream.js.map +1 -1
  162. package/dist/esm/SyncTable.d.ts +3 -3
  163. package/dist/esm/SyncTable.d.ts.map +1 -1
  164. package/dist/esm/SyncTable.js +3 -3
  165. package/dist/esm/SyncTable.js.map +1 -1
  166. package/dist/esm/attrTypes.d.ts +11 -11
  167. package/dist/esm/attrTypes.d.ts.map +1 -1
  168. package/dist/esm/attrTypes.js.map +1 -1
  169. package/dist/esm/coreTypes.d.ts +4 -4
  170. package/dist/esm/coreTypes.d.ts.map +1 -1
  171. package/dist/esm/coreTypes.js.map +1 -1
  172. package/dist/esm/createRouteHandler.d.ts +1 -1
  173. package/dist/esm/createRouteHandler.d.ts.map +1 -1
  174. package/dist/esm/createRouteHandler.js +3 -3
  175. package/dist/esm/createRouteHandler.js.map +1 -1
  176. package/dist/esm/devtool.js +13 -6
  177. package/dist/esm/devtool.js.map +1 -1
  178. package/dist/esm/endpoints.d.ts +2 -2
  179. package/dist/esm/endpoints.d.ts.map +1 -1
  180. package/dist/esm/endpoints.js +3 -3
  181. package/dist/esm/endpoints.js.map +1 -1
  182. package/dist/esm/framework.d.ts +4 -4
  183. package/dist/esm/framework.d.ts.map +1 -1
  184. package/dist/esm/framework.js +6 -6
  185. package/dist/esm/framework.js.map +1 -1
  186. package/dist/esm/helperTypes.d.ts +24 -24
  187. package/dist/esm/helperTypes.d.ts.map +1 -1
  188. package/dist/esm/helperTypes.js.map +1 -1
  189. package/dist/esm/index.d.ts +36 -36
  190. package/dist/esm/index.d.ts.map +1 -1
  191. package/dist/esm/index.js +33 -33
  192. package/dist/esm/index.js.map +1 -1
  193. package/dist/esm/infiniteQuery.d.ts +7 -7
  194. package/dist/esm/infiniteQuery.d.ts.map +1 -1
  195. package/dist/esm/infiniteQuery.js +16 -3
  196. package/dist/esm/infiniteQuery.js.map +1 -1
  197. package/dist/esm/model/{instaqlResult.d.ts → sideqlResult.d.ts} +2 -2
  198. package/dist/esm/model/sideqlResult.d.ts.map +1 -0
  199. package/dist/esm/model/{instaqlResult.js → sideqlResult.js} +2 -2
  200. package/dist/esm/model/sideqlResult.js.map +1 -0
  201. package/dist/esm/notifyScope.js +3 -3
  202. package/dist/esm/notifyScope.js.map +1 -1
  203. package/dist/esm/parseSchemaFromJSON.d.ts +2 -2
  204. package/dist/esm/parseSchemaFromJSON.d.ts.map +1 -1
  205. package/dist/esm/parseSchemaFromJSON.js.map +1 -1
  206. package/dist/esm/queryTypes.d.ts +32 -32
  207. package/dist/esm/queryTypes.d.ts.map +1 -1
  208. package/dist/esm/queryTypes.js.map +1 -1
  209. package/dist/esm/routeHandlerProtocol.d.ts +7 -7
  210. package/dist/esm/routeHandlerProtocol.d.ts.map +1 -1
  211. package/dist/esm/routeHandlerProtocol.js.map +1 -1
  212. package/dist/esm/rulesTypes.d.ts +20 -20
  213. package/dist/esm/rulesTypes.d.ts.map +1 -1
  214. package/dist/esm/rulesTypes.js.map +1 -1
  215. package/dist/esm/sanityCheckQueries.d.ts +3 -3
  216. package/dist/esm/sanityCheckQueries.d.ts.map +1 -1
  217. package/dist/esm/sanityCheckQueries.js.map +1 -1
  218. package/dist/esm/schema.d.ts +3 -3
  219. package/dist/esm/schema.d.ts.map +1 -1
  220. package/dist/esm/schema.js +3 -3
  221. package/dist/esm/schema.js.map +1 -1
  222. package/dist/esm/schemaTypes.d.ts +8 -8
  223. package/dist/esm/schemaTypes.d.ts.map +1 -1
  224. package/dist/esm/schemaTypes.js +5 -5
  225. package/dist/esm/schemaTypes.js.map +1 -1
  226. package/dist/esm/{instaml.d.ts → sideml.d.ts} +1 -1
  227. package/dist/esm/sideml.d.ts.map +1 -0
  228. package/dist/esm/{instaml.js → sideml.js} +6 -3
  229. package/dist/esm/sideml.js.map +1 -0
  230. package/dist/esm/{instaql.d.ts → sideql.d.ts} +1 -1
  231. package/dist/esm/sideql.d.ts.map +1 -0
  232. package/dist/esm/{instaql.js → sideql.js} +1 -1
  233. package/dist/esm/sideql.js.map +1 -0
  234. package/dist/esm/{instatx.d.ts → sidetx.d.ts} +1 -1
  235. package/dist/esm/sidetx.d.ts.map +1 -0
  236. package/dist/esm/{instatx.js → sidetx.js} +1 -1
  237. package/dist/esm/sidetx.js.map +1 -0
  238. package/dist/esm/store.d.ts +22 -22
  239. package/dist/esm/store.d.ts.map +1 -1
  240. package/dist/esm/store.js +0 -2
  241. package/dist/esm/store.js.map +1 -1
  242. package/dist/esm/transactionValidation.d.ts +1 -1
  243. package/dist/esm/transactionValidation.d.ts.map +1 -1
  244. package/dist/esm/transactionValidation.js +1 -1
  245. package/dist/esm/transactionValidation.js.map +1 -1
  246. package/dist/esm/utils/dates.js +31 -31
  247. package/dist/esm/utils/dates.js.map +1 -1
  248. package/dist/esm/utils/fetch.d.ts +7 -7
  249. package/dist/esm/utils/fetch.d.ts.map +1 -1
  250. package/dist/esm/utils/fetch.js +6 -6
  251. package/dist/esm/utils/fetch.js.map +1 -1
  252. package/dist/esm/utils/flags.d.ts +2 -2
  253. package/dist/esm/utils/flags.d.ts.map +1 -1
  254. package/dist/esm/utils/flags.js +3 -3
  255. package/dist/esm/utils/flags.js.map +1 -1
  256. package/dist/esm/utils/linkIndex.d.ts +2 -2
  257. package/dist/esm/utils/linkIndex.d.ts.map +1 -1
  258. package/dist/esm/utils/linkIndex.js.map +1 -1
  259. package/dist/esm/warningToggle.d.ts +1 -1
  260. package/dist/esm/warningToggle.d.ts.map +1 -1
  261. package/dist/esm/warningToggle.js +1 -1
  262. package/dist/esm/warningToggle.js.map +1 -1
  263. package/dist/standalone/index.js +2705 -2791
  264. package/dist/standalone/index.umd.cjs +9 -6
  265. package/package.json +2 -2
  266. package/src/Connection.ts +18 -3
  267. package/src/IndexedDBStorage.ts +3 -181
  268. package/src/Reactor.js +40 -39
  269. package/src/{InstantError.ts → SidekickError.ts} +4 -4
  270. package/src/Stream.ts +35 -32
  271. package/src/SyncTable.ts +6 -6
  272. package/src/attrTypes.ts +15 -11
  273. package/src/coreTypes.ts +5 -5
  274. package/src/createRouteHandler.ts +9 -7
  275. package/src/devtool.ts +13 -6
  276. package/src/endpoints.ts +4 -4
  277. package/src/framework.ts +13 -13
  278. package/src/helperTypes.ts +37 -37
  279. package/src/index.ts +123 -123
  280. package/src/infiniteQuery.ts +39 -22
  281. package/src/model/{instaqlResult.js → sideqlResult.js} +1 -1
  282. package/src/notifyScope.ts +3 -3
  283. package/src/parseSchemaFromJSON.ts +2 -2
  284. package/src/queryTypes.ts +55 -55
  285. package/src/routeHandlerProtocol.ts +8 -8
  286. package/src/rulesTypes.ts +23 -23
  287. package/src/sanityCheckQueries.ts +9 -9
  288. package/src/schema.ts +3 -3
  289. package/src/schemaTypes.ts +11 -9
  290. package/src/{instaml.ts → sideml.ts} +17 -14
  291. package/src/{instaql.ts → sideql.ts} +5 -5
  292. package/src/store.ts +35 -36
  293. package/src/transactionValidation.ts +1 -1
  294. package/src/utils/dates.ts +31 -31
  295. package/src/utils/fetch.ts +13 -13
  296. package/src/utils/flags.ts +3 -3
  297. package/src/utils/linkIndex.ts +2 -2
  298. package/src/warningToggle.ts +1 -1
  299. package/vite.config.ts +1 -1
  300. package/dist/commonjs/InstantError.d.ts.map +0 -1
  301. package/dist/commonjs/InstantError.js.map +0 -1
  302. package/dist/commonjs/instaml.d.ts.map +0 -1
  303. package/dist/commonjs/instaml.js.map +0 -1
  304. package/dist/commonjs/instaql.d.ts.map +0 -1
  305. package/dist/commonjs/instaql.js.map +0 -1
  306. package/dist/commonjs/instatx.d.ts.map +0 -1
  307. package/dist/commonjs/instatx.js.map +0 -1
  308. package/dist/commonjs/model/instaqlResult.d.ts.map +0 -1
  309. package/dist/commonjs/model/instaqlResult.js.map +0 -1
  310. package/dist/esm/InstantError.d.ts.map +0 -1
  311. package/dist/esm/InstantError.js.map +0 -1
  312. package/dist/esm/instaml.d.ts.map +0 -1
  313. package/dist/esm/instaml.js.map +0 -1
  314. package/dist/esm/instaql.d.ts.map +0 -1
  315. package/dist/esm/instaql.js.map +0 -1
  316. package/dist/esm/instatx.d.ts.map +0 -1
  317. package/dist/esm/instatx.js.map +0 -1
  318. package/dist/esm/model/instaqlResult.d.ts.map +0 -1
  319. package/dist/esm/model/instaqlResult.js.map +0 -1
  320. /package/src/{instatx.ts → sidetx.ts} +0 -0
@@ -1,11 +1,11 @@
1
1
  import { test, expect } from 'vitest';
2
- import * as instaml from '../../src/instaml';
3
- import * as instatx from '../../src/instatx';
2
+ import * as sideml from '../../src/sideml';
3
+ import * as sidetx from '../../src/sidetx';
4
4
  import zenecaAttrs from './data/zeneca/attrs.json';
5
5
  import zenecaTriples from './data/zeneca/triples.json';
6
6
  import { createStore, transact, AttrsStoreClass } from '../../src/store';
7
7
  import uuid from '../../src/utils/id';
8
- import { i, InstantDBAttr } from '../../src/index';
8
+ import { i, SidekickDBAttr } from '../../src/index';
9
9
 
10
10
  const zenecaAttrToId = zenecaAttrs.reduce((res, x) => {
11
11
  // @ts-expect-error
@@ -30,8 +30,8 @@ const store = createStore(
30
30
  test('simple update transform', () => {
31
31
  const testId = uuid();
32
32
 
33
- const ops = instatx.tx.books[testId].update({ title: 'New Title' });
34
- const result = instaml.transform({ attrsStore: zenecaAttrsStore }, ops);
33
+ const ops = sidetx.tx.books[testId].update({ title: 'New Title' });
34
+ const result = sideml.transform({ attrsStore: zenecaAttrsStore }, ops);
35
35
 
36
36
  const expected = [
37
37
  // @ts-expect-error
@@ -49,11 +49,11 @@ test('simple update transform', () => {
49
49
  test('undefined is ignored in update', () => {
50
50
  const testId = uuid();
51
51
 
52
- const ops = instatx.tx.users[testId].update({
52
+ const ops = sidetx.tx.users[testId].update({
53
53
  handle: 'bobby',
54
54
  fullName: undefined,
55
55
  });
56
- const result = instaml.transform({ attrsStore: zenecaAttrsStore }, ops);
56
+ const result = sideml.transform({ attrsStore: zenecaAttrsStore }, ops);
57
57
 
58
58
  const expected = [
59
59
  // @ts-expect-error
@@ -71,11 +71,11 @@ test('undefined is ignored in update', () => {
71
71
  test('ignores id attrs', () => {
72
72
  const testId = uuid();
73
73
 
74
- const ops = instatx.tx.books[testId].update({
74
+ const ops = sidetx.tx.books[testId].update({
75
75
  title: 'New Title',
76
76
  id: 'ploop',
77
77
  });
78
- const result = instaml.transform({ attrsStore: zenecaAttrsStore }, ops);
78
+ const result = sideml.transform({ attrsStore: zenecaAttrsStore }, ops);
79
79
 
80
80
  const expected = [
81
81
  // @ts-expect-error
@@ -92,9 +92,9 @@ test('ignores id attrs', () => {
92
92
  test("optimistically adds attrs if they don't exist", () => {
93
93
  const testId = uuid();
94
94
 
95
- const ops = instatx.tx.books[testId].update({ newAttr: 'New Title' });
95
+ const ops = sidetx.tx.books[testId].update({ newAttr: 'New Title' });
96
96
 
97
- const result = instaml.transform({ attrsStore: zenecaAttrsStore }, ops);
97
+ const result = sideml.transform({ attrsStore: zenecaAttrsStore }, ops);
98
98
 
99
99
  const expected = [
100
100
  [
@@ -121,16 +121,16 @@ test("optimistically adds attrs if they don't exist", () => {
121
121
  });
122
122
 
123
123
  test('lookup resolves attr ids', () => {
124
- const ops = instatx.tx.users[
125
- instatx.lookup('email', 'stopa@instantdb.com')
124
+ const ops = sidetx.tx.users[
125
+ sidetx.lookup('email', 'stopa@example.com')
126
126
  ].update({
127
127
  handle: 'stopa',
128
128
  });
129
129
 
130
130
  // @ts-expect-error
131
- const stopaLookup = [zenecaAttrToId['users/email'], 'stopa@instantdb.com'];
131
+ const stopaLookup = [zenecaAttrToId['users/email'], 'stopa@example.com'];
132
132
 
133
- const result = instaml.transform({ attrsStore: zenecaAttrsStore }, ops);
133
+ const result = sideml.transform({ attrsStore: zenecaAttrsStore }, ops);
134
134
 
135
135
  const expected = [
136
136
  // @ts-expect-error
@@ -146,9 +146,7 @@ test('lookup resolves attr ids', () => {
146
146
  });
147
147
 
148
148
  test('lookup creates unique attrs for custom lookups', () => {
149
- const ops = instatx.tx.users[
150
- instatx.lookup('newAttr', 'newAttrValue')
151
- ].update({
149
+ const ops = sidetx.tx.users[sidetx.lookup('newAttr', 'newAttrValue')].update({
152
150
  handle: 'stopa',
153
151
  });
154
152
 
@@ -158,7 +156,7 @@ test('lookup creates unique attrs for custom lookups', () => {
158
156
  'newAttrValue',
159
157
  ];
160
158
 
161
- const result = instaml.transform({ attrsStore: zenecaAttrsStore }, ops);
159
+ const result = sideml.transform({ attrsStore: zenecaAttrsStore }, ops);
162
160
  const expected = [
163
161
  [
164
162
  'add-attr',
@@ -187,11 +185,11 @@ test('lookup creates unique attrs for custom lookups', () => {
187
185
 
188
186
  test('lookup creates unique attrs for lookups in link values', () => {
189
187
  const uid = uuid();
190
- const ops = instatx.tx.users[uid]
188
+ const ops = sidetx.tx.users[uid]
191
189
  .update({})
192
- .link({ posts: instatx.lookup('slug', 'life-is-good') });
190
+ .link({ posts: sidetx.lookup('slug', 'life-is-good') });
193
191
 
194
- const result = instaml.transform(
192
+ const result = sideml.transform(
195
193
  { attrsStore: new AttrsStoreClass({}, null) },
196
194
  ops,
197
195
  );
@@ -246,14 +244,14 @@ test('lookup creates unique attrs for lookups in link values', () => {
246
244
 
247
245
  test('lookup creates unique attrs for lookups in link values with arrays', () => {
248
246
  const uid = uuid();
249
- const ops = instatx.tx.users[uid].update({}).link({
247
+ const ops = sidetx.tx.users[uid].update({}).link({
250
248
  posts: [
251
- instatx.lookup('slug', 'life-is-good'),
252
- instatx.lookup('slug', 'check-this-out'),
249
+ sidetx.lookup('slug', 'life-is-good'),
250
+ sidetx.lookup('slug', 'check-this-out'),
253
251
  ],
254
252
  });
255
253
 
256
- const result = instaml.transform(
254
+ const result = sideml.transform(
257
255
  { attrsStore: new AttrsStoreClass({}, null) },
258
256
  ops,
259
257
  );
@@ -319,9 +317,9 @@ test('lookup creates unique attrs for lookups in link values with arrays', () =>
319
317
 
320
318
  test('lookup creates unique attrs for lookups in link values when fwd-ident exists', () => {
321
319
  const uid = uuid();
322
- const ops = instatx.tx.users[uid]
320
+ const ops = sidetx.tx.users[uid]
323
321
  .update({})
324
- .link({ posts: instatx.lookup('slug', 'life-is-good') });
322
+ .link({ posts: sidetx.lookup('slug', 'life-is-good') });
325
323
 
326
324
  const attrId = uuid();
327
325
  const existingRefAttr = {
@@ -332,9 +330,9 @@ test('lookup creates unique attrs for lookups in link values when fwd-ident exis
332
330
  cardinality: 'one',
333
331
  'unique?': true,
334
332
  'index?': true,
335
- } as unknown as InstantDBAttr;
333
+ } as unknown as SidekickDBAttr;
336
334
 
337
- const result = instaml.transform(
335
+ const result = sideml.transform(
338
336
  { attrsStore: new AttrsStoreClass({ [attrId]: existingRefAttr }, null) },
339
337
  ops,
340
338
  );
@@ -376,9 +374,9 @@ test('lookup creates unique attrs for lookups in link values when fwd-ident exis
376
374
 
377
375
  test('lookup creates unique attrs for lookups in link values when rev-ident exists', () => {
378
376
  const uid = uuid();
379
- const ops = instatx.tx.users[uid]
377
+ const ops = sidetx.tx.users[uid]
380
378
  .update({})
381
- .link({ posts: instatx.lookup('slug', 'life-is-good') });
379
+ .link({ posts: sidetx.lookup('slug', 'life-is-good') });
382
380
 
383
381
  const attrId = uuid();
384
382
  const existingRefAttr = {
@@ -389,9 +387,9 @@ test('lookup creates unique attrs for lookups in link values when rev-ident exis
389
387
  cardinality: 'one',
390
388
  'unique?': true,
391
389
  'index?': true,
392
- } as unknown as InstantDBAttr;
390
+ } as unknown as SidekickDBAttr;
393
391
 
394
- const result = instaml.transform(
392
+ const result = sideml.transform(
395
393
  { attrsStore: new AttrsStoreClass({ [attrId]: existingRefAttr }, null) },
396
394
  ops,
397
395
  );
@@ -433,9 +431,9 @@ test('lookup creates unique attrs for lookups in link values when rev-ident exis
433
431
 
434
432
  test("lookup doesn't override attrs for lookups in link values", () => {
435
433
  const uid = uuid();
436
- const ops = instatx.tx.users[uid]
434
+ const ops = sidetx.tx.users[uid]
437
435
  .update({})
438
- .link({ posts: instatx.lookup('slug', 'life-is-good') });
436
+ .link({ posts: sidetx.lookup('slug', 'life-is-good') });
439
437
 
440
438
  const refAttrId = uuid();
441
439
  const userIdAttrId = uuid();
@@ -451,7 +449,7 @@ test("lookup doesn't override attrs for lookups in link values", () => {
451
449
  cardinality: 'one',
452
450
  'unique?': true,
453
451
  'index?': true,
454
- } as unknown as InstantDBAttr,
452
+ } as unknown as SidekickDBAttr,
455
453
  [userIdAttrId]: {
456
454
  id: userIdAttrId,
457
455
  'forward-identity': [uuid(), 'users', 'id'],
@@ -459,7 +457,7 @@ test("lookup doesn't override attrs for lookups in link values", () => {
459
457
  cardinality: 'one',
460
458
  'unique?': true,
461
459
  'index?': false,
462
- } as unknown as InstantDBAttr,
460
+ } as unknown as SidekickDBAttr,
463
461
  [postsSlugAttrId]: {
464
462
  id: postsSlugAttrId,
465
463
  'forward-identity': [uuid(), 'posts', 'slug'],
@@ -467,12 +465,12 @@ test("lookup doesn't override attrs for lookups in link values", () => {
467
465
  cardinality: 'one',
468
466
  'unique?': true,
469
467
  'index?': true,
470
- } as unknown as InstantDBAttr,
468
+ } as unknown as SidekickDBAttr,
471
469
  },
472
470
  null,
473
471
  );
474
472
 
475
- const result = instaml.transform({ attrsStore }, ops);
473
+ const result = sideml.transform({ attrsStore }, ops);
476
474
 
477
475
  expect(result).toEqual([
478
476
  ['add-triple', uid, userIdAttrId, uid],
@@ -494,7 +492,7 @@ test("lookup doesn't override attrs for lookups in self links", () => {
494
492
  cardinality: 'one',
495
493
  'unique?': true,
496
494
  'index?': false,
497
- } as unknown as InstantDBAttr,
495
+ } as unknown as SidekickDBAttr,
498
496
  [postsSlugAttrId]: {
499
497
  id: postsSlugAttrId,
500
498
  'forward-identity': [uuid(), 'posts', 'slug'],
@@ -502,7 +500,7 @@ test("lookup doesn't override attrs for lookups in self links", () => {
502
500
  cardinality: 'one',
503
501
  'unique?': true,
504
502
  'index?': true,
505
- } as unknown as InstantDBAttr,
503
+ } as unknown as SidekickDBAttr,
506
504
  [refAttrId]: {
507
505
  id: refAttrId,
508
506
  'forward-identity': [uuid(), 'posts', 'parent'],
@@ -511,24 +509,24 @@ test("lookup doesn't override attrs for lookups in self links", () => {
511
509
  cardinality: 'one',
512
510
  'unique?': true,
513
511
  'index?': true,
514
- } as unknown as InstantDBAttr,
512
+ } as unknown as SidekickDBAttr,
515
513
  },
516
514
  null,
517
515
  );
518
516
 
519
- const ops1 = instatx.tx.posts[instatx.lookup('slug', 'life-is-good')]
517
+ const ops1 = sidetx.tx.posts[sidetx.lookup('slug', 'life-is-good')]
520
518
  .update({})
521
- .link({ parent: instatx.lookup('slug', 'life-is-good') });
519
+ .link({ parent: sidetx.lookup('slug', 'life-is-good') });
522
520
 
523
- const result1 = instaml.transform({ attrsStore }, ops1);
521
+ const result1 = sideml.transform({ attrsStore }, ops1);
524
522
 
525
523
  expect(result1.filter((x) => x[0] !== 'add-triple')).toEqual([]);
526
524
 
527
- const ops2 = instatx.tx.posts[instatx.lookup('slug', 'life-is-good')]
525
+ const ops2 = sidetx.tx.posts[sidetx.lookup('slug', 'life-is-good')]
528
526
  .update({})
529
- .link({ child: instatx.lookup('slug', 'life-is-good') });
527
+ .link({ child: sidetx.lookup('slug', 'life-is-good') });
530
528
 
531
- const result2 = instaml.transform({ attrsStore }, ops2);
529
+ const result2 = sideml.transform({ attrsStore }, ops2);
532
530
 
533
531
  expect(result2.filter((x) => x[0] !== 'add-triple')).toEqual([]);
534
532
  });
@@ -536,8 +534,8 @@ test("lookup doesn't override attrs for lookups in self links", () => {
536
534
  test('lookup creates unique ref attrs for ref lookup', () => {
537
535
  const uid = uuid();
538
536
  const ops = [
539
- instatx.tx.users[uid].update({}),
540
- instatx.tx.user_prefs[instatx.lookup('users.id', uid)].update({}),
537
+ sidetx.tx.users[uid].update({}),
538
+ sidetx.tx.user_prefs[sidetx.lookup('users.id', uid)].update({}),
541
539
  ];
542
540
 
543
541
  const lookup = [
@@ -546,7 +544,7 @@ test('lookup creates unique ref attrs for ref lookup', () => {
546
544
  uid,
547
545
  ];
548
546
 
549
- const result = instaml.transform(
547
+ const result = sideml.transform(
550
548
  { attrsStore: new AttrsStoreClass({}, null) },
551
549
  ops,
552
550
  );
@@ -601,9 +599,9 @@ test('lookup creates unique ref attrs for ref lookup', () => {
601
599
  test('lookup creates unique ref attrs for ref lookup in link value', () => {
602
600
  const uid = uuid();
603
601
  const ops = [
604
- instatx.tx.users[uid]
602
+ sidetx.tx.users[uid]
605
603
  .update({})
606
- .link({ user_prefs: instatx.lookup('users.id', uid) }),
604
+ .link({ user_prefs: sidetx.lookup('users.id', uid) }),
607
605
  ];
608
606
 
609
607
  const lookup = [
@@ -612,7 +610,7 @@ test('lookup creates unique ref attrs for ref lookup in link value', () => {
612
610
  uid,
613
611
  ];
614
612
 
615
- const result = instaml.transform(
613
+ const result = sideml.transform(
616
614
  { attrsStore: new AttrsStoreClass({}, null) },
617
615
  ops,
618
616
  );
@@ -656,11 +654,11 @@ test('lookup creates unique ref attrs for ref lookup in link value', () => {
656
654
  test('lookups create entities from links', () => {
657
655
  const bookshelfId = uuid();
658
656
 
659
- const ops = instatx.tx.users[instatx.lookup('handle', 'bobby_newuser')].link({
657
+ const ops = sidetx.tx.users[sidetx.lookup('handle', 'bobby_newuser')].link({
660
658
  bookshelves: bookshelfId,
661
659
  });
662
660
 
663
- const result = instaml.transform({ attrsStore: zenecaAttrsStore }, ops);
661
+ const result = sideml.transform({ attrsStore: zenecaAttrsStore }, ops);
664
662
  // @ts-expect-error
665
663
  const expectedLookup = [zenecaAttrToId['users/handle'], 'bobby_newuser'];
666
664
  const expected = [
@@ -684,13 +682,11 @@ test('lookups create entities from links', () => {
684
682
  test('lookups create entities from unlinks', () => {
685
683
  const bookshelfId = uuid();
686
684
 
687
- const ops = instatx.tx.users[
688
- instatx.lookup('handle', 'bobby_newuser')
689
- ].unlink({
685
+ const ops = sidetx.tx.users[sidetx.lookup('handle', 'bobby_newuser')].unlink({
690
686
  bookshelves: bookshelfId,
691
687
  });
692
688
 
693
- const result = instaml.transform({ attrsStore: zenecaAttrsStore }, ops);
689
+ const result = sideml.transform({ attrsStore: zenecaAttrsStore }, ops);
694
690
  // @ts-expect-error
695
691
  const expectedLookup = [zenecaAttrToId['users/handle'], 'bobby_newuser'];
696
692
  const expected = [
@@ -714,8 +710,8 @@ test('lookups create entities from unlinks', () => {
714
710
  test('mode: update', () => {
715
711
  // create
716
712
  var id = uuid();
717
- var ops = instatx.tx.users[id].update({ handle: 'test' });
718
- var result = instaml.transform(
713
+ var ops = sidetx.tx.users[id].update({ handle: 'test' });
714
+ var result = sideml.transform(
719
715
  { attrsStore: zenecaAttrsStore, stores: [store] },
720
716
  ops,
721
717
  );
@@ -724,10 +720,10 @@ test('mode: update', () => {
724
720
  }
725
721
 
726
722
  // update by id
727
- ops = instatx.tx.users['ce942051-2d74-404a-9c7d-4aa3f2d54ae4'].update({
723
+ ops = sidetx.tx.users['ce942051-2d74-404a-9c7d-4aa3f2d54ae4'].update({
728
724
  handle: 'joe2',
729
725
  });
730
- result = instaml.transform(
726
+ result = sideml.transform(
731
727
  { attrsStore: zenecaAttrsStore, stores: [store] },
732
728
  ops,
733
729
  );
@@ -736,10 +732,10 @@ test('mode: update', () => {
736
732
  }
737
733
 
738
734
  // update by lookup
739
- ops = instatx.tx.users[instatx.lookup('email', 'stopa@instantdb.com')].update(
740
- { handle: 'stopa2' },
741
- );
742
- result = instaml.transform(
735
+ ops = sidetx.tx.users[sidetx.lookup('email', 'stopa@example.com')].update({
736
+ handle: 'stopa2',
737
+ });
738
+ result = sideml.transform(
743
739
  { attrsStore: zenecaAttrsStore, stores: [store] },
744
740
  ops,
745
741
  );
@@ -748,8 +744,8 @@ test('mode: update', () => {
748
744
  }
749
745
 
750
746
  // forced mode
751
- var ops = instatx.tx.users[id].update({ handle: 'test' }, { upsert: false });
752
- var result = instaml.transform(
747
+ var ops = sidetx.tx.users[id].update({ handle: 'test' }, { upsert: false });
748
+ var result = sideml.transform(
753
749
  { attrsStore: zenecaAttrsStore, stores: [store] },
754
750
  ops,
755
751
  );
@@ -757,11 +753,11 @@ test('mode: update', () => {
757
753
  expect(txStep[4]).toEqual({ mode: 'update' });
758
754
  }
759
755
 
760
- var ops = instatx.tx.users['ce942051-2d74-404a-9c7d-4aa3f2d54ae4'].update(
756
+ var ops = sidetx.tx.users['ce942051-2d74-404a-9c7d-4aa3f2d54ae4'].update(
761
757
  { handle: 'test' },
762
758
  { upsert: true },
763
759
  );
764
- var result = instaml.transform(
760
+ var result = sideml.transform(
765
761
  { attrsStore: zenecaAttrsStore, stores: [store] },
766
762
  ops,
767
763
  );
@@ -772,10 +768,10 @@ test('mode: update', () => {
772
768
 
773
769
  test('it throws if you use an invalid link attr', () => {
774
770
  expect(() =>
775
- instaml.transform(
771
+ sideml.transform(
776
772
  { attrsStore: new AttrsStoreClass({}, null) },
777
- instatx.tx.users[
778
- instatx.lookup('user_pref.email', 'test@example.com')
773
+ sidetx.tx.users[
774
+ sidetx.lookup('user_pref.email', 'test@example.com')
779
775
  ].update({
780
776
  a: 1,
781
777
  }),
@@ -796,7 +792,7 @@ test("it doesn't throw if you have a period in your attr", () => {
796
792
  'index?': true,
797
793
  'unique?': true,
798
794
  'value-type': 'blob',
799
- } as unknown as InstantDBAttr,
795
+ } as unknown as SidekickDBAttr,
800
796
  [iid]: {
801
797
  id: iid,
802
798
  cardinality: 'one',
@@ -804,7 +800,7 @@ test("it doesn't throw if you have a period in your attr", () => {
804
800
  'index?': true,
805
801
  'unique?': false,
806
802
  'value-type': 'blob',
807
- } as unknown as InstantDBAttr,
803
+ } as unknown as SidekickDBAttr,
808
804
  [pid]: {
809
805
  id: pid,
810
806
  cardinality: 'one',
@@ -812,15 +808,15 @@ test("it doesn't throw if you have a period in your attr", () => {
812
808
  'index?': false,
813
809
  'unique?': false,
814
810
  'value-type': 'blob',
815
- } as unknown as InstantDBAttr,
811
+ } as unknown as SidekickDBAttr,
816
812
  },
817
813
  null,
818
814
  );
819
815
 
820
816
  expect(
821
- instaml.transform(
817
+ sideml.transform(
822
818
  { attrsStore },
823
- instatx.tx.users[instatx.lookup('attr.with.dot', 'value')].update({
819
+ sidetx.tx.users[sidetx.lookup('attr.with.dot', 'value')].update({
824
820
  a: 1,
825
821
  }),
826
822
  ),
@@ -834,11 +830,11 @@ test("it doesn't create duplicate ref attrs", () => {
834
830
  const aid = uuid();
835
831
  const bid = uuid();
836
832
  const ops = [
837
- instatx.tx.nsA[aid].update({}).link({ nsB: bid }),
838
- instatx.tx.nsB[bid].update({}).link({ nsA: aid }),
833
+ sidetx.tx.nsA[aid].update({}).link({ nsB: bid }),
834
+ sidetx.tx.nsB[bid].update({}).link({ nsA: aid }),
839
835
  ];
840
836
 
841
- const result = instaml.transform(
837
+ const result = sideml.transform(
842
838
  { attrsStore: new AttrsStoreClass({}, null) },
843
839
  ops,
844
840
  );
@@ -919,7 +915,7 @@ test('Schema: uses info in `attrs` and `links`', () => {
919
915
 
920
916
  const commentId = uuid();
921
917
  const bookId = uuid();
922
- const ops = instatx.tx.comments[commentId]
918
+ const ops = sidetx.tx.comments[commentId]
923
919
  .update({
924
920
  slug: 'test-slug',
925
921
  })
@@ -927,7 +923,7 @@ test('Schema: uses info in `attrs` and `links`', () => {
927
923
  book: bookId,
928
924
  });
929
925
 
930
- const result = instaml.transform(
926
+ const result = sideml.transform(
931
927
  {
932
928
  attrsStore: zenecaAttrsStore,
933
929
  schema: schema,
@@ -1009,11 +1005,11 @@ test("Schema: doesn't create duplicate ref attrs", () => {
1009
1005
  const commentId = uuid();
1010
1006
  const bookId = uuid();
1011
1007
  const ops = [
1012
- instatx.tx.comments[commentId].update({}).link({ book: bookId }),
1013
- instatx.tx.books[bookId].update({}).link({ comments: commentId }),
1008
+ sidetx.tx.comments[commentId].update({}).link({ book: bookId }),
1009
+ sidetx.tx.books[bookId].update({}).link({ comments: commentId }),
1014
1010
  ];
1015
1011
 
1016
- const result = instaml.transform(
1012
+ const result = sideml.transform(
1017
1013
  { attrsStore: zenecaAttrsStore, schema },
1018
1014
  ops,
1019
1015
  );
@@ -1064,11 +1060,9 @@ test('Schema: lookup creates unique attrs for custom lookups', () => {
1064
1060
  },
1065
1061
  });
1066
1062
 
1067
- const ops = instatx.tx.users[instatx.lookup('nickname', 'stopanator')].update(
1068
- {
1069
- handle: 'stopa',
1070
- },
1071
- );
1063
+ const ops = sidetx.tx.users[sidetx.lookup('nickname', 'stopanator')].update({
1064
+ handle: 'stopa',
1065
+ });
1072
1066
 
1073
1067
  const lookup = [
1074
1068
  // The attr is going to be created, so we don't know its value yet
@@ -1076,7 +1070,7 @@ test('Schema: lookup creates unique attrs for custom lookups', () => {
1076
1070
  'stopanator',
1077
1071
  ];
1078
1072
 
1079
- const result = instaml.transform(
1073
+ const result = sideml.transform(
1080
1074
  { attrsStore: zenecaAttrsStore, schema },
1081
1075
  ops,
1082
1076
  );
@@ -1131,11 +1125,11 @@ test('Schema: lookup creates unique attrs for lookups in link values', () => {
1131
1125
  });
1132
1126
 
1133
1127
  const uid = uuid();
1134
- const ops = instatx.tx.users[uid]
1128
+ const ops = sidetx.tx.users[uid]
1135
1129
  .update({})
1136
- .link({ authoredPosts: instatx.lookup('slug', 'life-is-good') });
1130
+ .link({ authoredPosts: sidetx.lookup('slug', 'life-is-good') });
1137
1131
 
1138
- const result = instaml.transform(
1132
+ const result = sideml.transform(
1139
1133
  { attrsStore: new AttrsStoreClass({}, null), schema },
1140
1134
  ops,
1141
1135
  );
@@ -1215,14 +1209,14 @@ test('Schema: lookup creates unique attrs for lookups in link values with arrays
1215
1209
  });
1216
1210
 
1217
1211
  const uid = uuid();
1218
- const ops = instatx.tx.users[uid].update({}).link({
1212
+ const ops = sidetx.tx.users[uid].update({}).link({
1219
1213
  authoredPosts: [
1220
- instatx.lookup('slug', 'life-is-good'),
1221
- instatx.lookup('slug', 'check-this-out'),
1214
+ sidetx.lookup('slug', 'life-is-good'),
1215
+ sidetx.lookup('slug', 'check-this-out'),
1222
1216
  ],
1223
1217
  });
1224
1218
 
1225
- const result = instaml.transform(
1219
+ const result = sideml.transform(
1226
1220
  { attrsStore: new AttrsStoreClass({}, null), schema },
1227
1221
  ops,
1228
1222
  );
@@ -1311,8 +1305,8 @@ test('Schema: lookup creates unique ref attrs for ref lookup', () => {
1311
1305
 
1312
1306
  const uid = uuid();
1313
1307
  const ops = [
1314
- instatx.tx.users[uid].update({}),
1315
- instatx.tx.user_prefs[instatx.lookup('user.id', uid)].update({}),
1308
+ sidetx.tx.users[uid].update({}),
1309
+ sidetx.tx.user_prefs[sidetx.lookup('user.id', uid)].update({}),
1316
1310
  ];
1317
1311
 
1318
1312
  const lookup = [
@@ -1321,7 +1315,7 @@ test('Schema: lookup creates unique ref attrs for ref lookup', () => {
1321
1315
  uid,
1322
1316
  ];
1323
1317
 
1324
- const result = instaml.transform(
1318
+ const result = sideml.transform(
1325
1319
  { attrsStore: new AttrsStoreClass({}, null), schema },
1326
1320
  ops,
1327
1321
  );
@@ -1396,9 +1390,9 @@ test('Schema: lookup creates unique ref attrs for ref lookup in link value', ()
1396
1390
  });
1397
1391
  const uid = uuid();
1398
1392
  const ops = [
1399
- instatx.tx.users[uid]
1393
+ sidetx.tx.users[uid]
1400
1394
  .update({})
1401
- .link({ user_pref: instatx.lookup('user.id', uid) }),
1395
+ .link({ user_pref: sidetx.lookup('user.id', uid) }),
1402
1396
  ];
1403
1397
 
1404
1398
  const lookup = [
@@ -1407,7 +1401,7 @@ test('Schema: lookup creates unique ref attrs for ref lookup in link value', ()
1407
1401
  uid,
1408
1402
  ];
1409
1403
 
1410
- const result = instaml.transform(
1404
+ const result = sideml.transform(
1411
1405
  { attrsStore: new AttrsStoreClass({}, null), schema },
1412
1406
  ops,
1413
1407
  );
@@ -1463,7 +1457,7 @@ test('Schema: populates checked-data-type', () => {
1463
1457
  });
1464
1458
 
1465
1459
  const commentId = uuid();
1466
- const ops = instatx.tx.comments[commentId].update({
1460
+ const ops = sidetx.tx.comments[commentId].update({
1467
1461
  s: 'str',
1468
1462
  n: 'num',
1469
1463
  d: 'date',
@@ -1472,7 +1466,7 @@ test('Schema: populates checked-data-type', () => {
1472
1466
  j: 'json',
1473
1467
  });
1474
1468
 
1475
- const result = instaml.transform(
1469
+ const result = sideml.transform(
1476
1470
  {
1477
1471
  attrsStore: zenecaAttrsStore,
1478
1472
  schema: schema,
@@ -1584,8 +1578,8 @@ test('Schema: populates checked-data-type', () => {
1584
1578
  }
1585
1579
  });
1586
1580
 
1587
- test('instatx should not be too permissive', () => {
1588
- const ops = instatx.tx.books[uuid()].update({
1581
+ test('sidetx should not be too permissive', () => {
1582
+ const ops = sidetx.tx.books[uuid()].update({
1589
1583
  title: 'New Title',
1590
1584
  // @ts-expect-error: testing invalid states
1591
1585
  }).this_is_an_unknown_op;
@@ -3,7 +3,7 @@ import { bench } from 'vitest';
3
3
  import zenecaAttrs from './data/zeneca/attrs.json';
4
4
  import zenecaTriples from './data/zeneca/triples.json';
5
5
  import { createStore, AttrsStoreClass } from '../../src/store';
6
- import query from '../../src/instaql';
6
+ import query from '../../src/sideql';
7
7
 
8
8
  const zenecaAttrsStore = new AttrsStoreClass(
9
9
  zenecaAttrs.reduce((res, x) => {