@chipmobilesdk/rn-local-db 0.3.0 → 0.5.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 (705) hide show
  1. package/CHANGELOG.md +160 -1
  2. package/README.md +99 -19
  3. package/lib/commonjs/adapter/budgets.js +79 -0
  4. package/lib/commonjs/adapter/budgets.js.map +1 -0
  5. package/lib/commonjs/adapter/collection.js +236 -0
  6. package/lib/commonjs/adapter/collection.js.map +1 -0
  7. package/lib/commonjs/adapter/deletion.js +291 -0
  8. package/lib/commonjs/adapter/deletion.js.map +1 -0
  9. package/lib/commonjs/adapter/handle.js +259 -0
  10. package/lib/commonjs/adapter/handle.js.map +1 -0
  11. package/lib/commonjs/adapter/index.js +67 -0
  12. package/lib/commonjs/adapter/index.js.map +1 -0
  13. package/lib/commonjs/adapter/lifecycle.js +176 -0
  14. package/lib/commonjs/adapter/lifecycle.js.map +1 -0
  15. package/lib/commonjs/adapter/schema-sync.js +124 -0
  16. package/lib/commonjs/adapter/schema-sync.js.map +1 -0
  17. package/lib/commonjs/adapter/transaction.js +58 -0
  18. package/lib/commonjs/adapter/transaction.js.map +1 -0
  19. package/lib/commonjs/artifacts/availability.js +90 -0
  20. package/lib/commonjs/artifacts/availability.js.map +1 -0
  21. package/lib/commonjs/artifacts/cascade.js +80 -0
  22. package/lib/commonjs/artifacts/cascade.js.map +1 -0
  23. package/lib/commonjs/artifacts/paths.js +31 -0
  24. package/lib/commonjs/artifacts/paths.js.map +1 -0
  25. package/lib/commonjs/artifacts/reconcile.js +55 -0
  26. package/lib/commonjs/artifacts/reconcile.js.map +1 -0
  27. package/lib/commonjs/artifacts/store.js +300 -0
  28. package/lib/commonjs/artifacts/store.js.map +1 -0
  29. package/lib/commonjs/contract/adapter.js +6 -0
  30. package/lib/commonjs/contract/adapter.js.map +1 -0
  31. package/lib/commonjs/contract/attachment.js +2 -0
  32. package/lib/commonjs/contract/attachment.js.map +1 -0
  33. package/lib/commonjs/contract/backup.js +2 -0
  34. package/lib/commonjs/contract/backup.js.map +1 -0
  35. package/lib/commonjs/contract/config.js +31 -0
  36. package/lib/commonjs/contract/config.js.map +1 -0
  37. package/lib/commonjs/contract/encryption.js +6 -0
  38. package/lib/commonjs/contract/encryption.js.map +1 -0
  39. package/lib/commonjs/contract/errors.js +64 -0
  40. package/lib/commonjs/contract/errors.js.map +1 -0
  41. package/lib/commonjs/contract/migration.js +6 -0
  42. package/lib/commonjs/contract/migration.js.map +1 -0
  43. package/lib/commonjs/contract/query.js +6 -0
  44. package/lib/commonjs/contract/query.js.map +1 -0
  45. package/lib/commonjs/contract/record.js +6 -0
  46. package/lib/commonjs/contract/record.js.map +1 -0
  47. package/lib/commonjs/contract/schema.js +2 -0
  48. package/lib/commonjs/contract/schema.js.map +1 -0
  49. package/lib/commonjs/contract/scope.js +2 -0
  50. package/lib/commonjs/contract/scope.js.map +1 -0
  51. package/lib/commonjs/contract/transaction.js +6 -0
  52. package/lib/commonjs/contract/transaction.js.map +1 -0
  53. package/lib/commonjs/crypto/chunked-cipher.js +147 -0
  54. package/lib/commonjs/crypto/chunked-cipher.js.map +1 -0
  55. package/lib/commonjs/crypto/derive.js +61 -0
  56. package/lib/commonjs/crypto/derive.js.map +1 -0
  57. package/lib/commonjs/crypto/key-provider.js +70 -0
  58. package/lib/commonjs/crypto/key-provider.js.map +1 -0
  59. package/lib/commonjs/crypto/provider.js +54 -0
  60. package/lib/commonjs/crypto/provider.js.map +1 -0
  61. package/lib/commonjs/diagnostics/dev-log.js +127 -0
  62. package/lib/commonjs/diagnostics/dev-log.js.map +1 -0
  63. package/lib/commonjs/diagnostics/errors.js +57 -0
  64. package/lib/commonjs/diagnostics/errors.js.map +1 -0
  65. package/lib/commonjs/diagnostics/faults.js +54 -0
  66. package/lib/commonjs/diagnostics/faults.js.map +1 -0
  67. package/lib/commonjs/diagnostics/map-native.js +98 -0
  68. package/lib/commonjs/diagnostics/map-native.js.map +1 -0
  69. package/lib/commonjs/diagnostics/redact.js +110 -0
  70. package/lib/commonjs/diagnostics/redact.js.map +1 -0
  71. package/lib/commonjs/index.js +70 -0
  72. package/lib/commonjs/index.js.map +1 -0
  73. package/lib/commonjs/migration/executor.js +136 -0
  74. package/lib/commonjs/migration/executor.js.map +1 -0
  75. package/lib/commonjs/migration/ledger.js +64 -0
  76. package/lib/commonjs/migration/ledger.js.map +1 -0
  77. package/lib/commonjs/migration/validate-chain.js +76 -0
  78. package/lib/commonjs/migration/validate-chain.js.map +1 -0
  79. package/lib/commonjs/package.json +1 -0
  80. package/lib/commonjs/platform/backup-android-verify.js +76 -0
  81. package/lib/commonjs/platform/backup-android-verify.js.map +1 -0
  82. package/lib/commonjs/platform/backup-ios.js +50 -0
  83. package/lib/commonjs/platform/backup-ios.js.map +1 -0
  84. package/lib/commonjs/platform/bytes.js +158 -0
  85. package/lib/commonjs/platform/bytes.js.map +1 -0
  86. package/lib/commonjs/platform/fs.js +59 -0
  87. package/lib/commonjs/platform/fs.js.map +1 -0
  88. package/lib/commonjs/platform/location.js +129 -0
  89. package/lib/commonjs/platform/location.js.map +1 -0
  90. package/lib/commonjs/query/budgets.js +95 -0
  91. package/lib/commonjs/query/budgets.js.map +1 -0
  92. package/lib/commonjs/query/compare.js +97 -0
  93. package/lib/commonjs/query/compare.js.map +1 -0
  94. package/lib/commonjs/query/cursor.js +97 -0
  95. package/lib/commonjs/query/cursor.js.map +1 -0
  96. package/lib/commonjs/query/filter.js +82 -0
  97. package/lib/commonjs/query/filter.js.map +1 -0
  98. package/lib/commonjs/query/paginate.js +48 -0
  99. package/lib/commonjs/query/paginate.js.map +1 -0
  100. package/lib/commonjs/query/sort.js +61 -0
  101. package/lib/commonjs/query/sort.js.map +1 -0
  102. package/lib/commonjs/query/validate.js +180 -0
  103. package/lib/commonjs/query/validate.js.map +1 -0
  104. package/lib/commonjs/schema/declare.js +47 -0
  105. package/lib/commonjs/schema/declare.js.map +1 -0
  106. package/lib/commonjs/schema/validate-config.js +115 -0
  107. package/lib/commonjs/schema/validate-config.js.map +1 -0
  108. package/lib/commonjs/scope/hash.js +107 -0
  109. package/lib/commonjs/scope/hash.js.map +1 -0
  110. package/lib/commonjs/scope/normalize.js +73 -0
  111. package/lib/commonjs/scope/normalize.js.map +1 -0
  112. package/lib/commonjs/scope/validate.js +81 -0
  113. package/lib/commonjs/scope/validate.js.map +1 -0
  114. package/lib/commonjs/sqlite/adapter.js +31 -0
  115. package/lib/commonjs/sqlite/adapter.js.map +1 -0
  116. package/lib/commonjs/sqlite/batch.js +218 -0
  117. package/lib/commonjs/sqlite/batch.js.map +1 -0
  118. package/lib/commonjs/sqlite/catalog.js +81 -0
  119. package/lib/commonjs/sqlite/catalog.js.map +1 -0
  120. package/lib/commonjs/sqlite/connection.js +210 -0
  121. package/lib/commonjs/sqlite/connection.js.map +1 -0
  122. package/lib/commonjs/sqlite/index-coverage.js +42 -0
  123. package/lib/commonjs/sqlite/index-coverage.js.map +1 -0
  124. package/lib/commonjs/sqlite/native.js +54 -0
  125. package/lib/commonjs/sqlite/native.js.map +1 -0
  126. package/lib/commonjs/sqlite/row-codec.js +192 -0
  127. package/lib/commonjs/sqlite/row-codec.js.map +1 -0
  128. package/lib/commonjs/sqlite/sql-builder.js +253 -0
  129. package/lib/commonjs/sqlite/sql-builder.js.map +1 -0
  130. package/lib/commonjs/sqlite/statements.js +54 -0
  131. package/lib/commonjs/sqlite/statements.js.map +1 -0
  132. package/lib/commonjs/sqlite/transaction-queue.js +79 -0
  133. package/lib/commonjs/sqlite/transaction-queue.js.map +1 -0
  134. package/lib/commonjs/sqlite/transactions.js +33 -0
  135. package/lib/commonjs/sqlite/transactions.js.map +1 -0
  136. package/lib/commonjs/sqlite/values.js +31 -0
  137. package/lib/commonjs/sqlite/values.js.map +1 -0
  138. package/lib/commonjs/testing/conformance/attachments.js +180 -0
  139. package/lib/commonjs/testing/conformance/attachments.js.map +1 -0
  140. package/lib/commonjs/testing/conformance/encryption.js +187 -0
  141. package/lib/commonjs/testing/conformance/encryption.js.map +1 -0
  142. package/lib/commonjs/testing/conformance/index.js +103 -0
  143. package/lib/commonjs/testing/conformance/index.js.map +1 -0
  144. package/lib/commonjs/testing/conformance/lifecycle.js +134 -0
  145. package/lib/commonjs/testing/conformance/lifecycle.js.map +1 -0
  146. package/lib/commonjs/testing/conformance/migrations.js +167 -0
  147. package/lib/commonjs/testing/conformance/migrations.js.map +1 -0
  148. package/lib/commonjs/testing/conformance/queries.js +278 -0
  149. package/lib/commonjs/testing/conformance/queries.js.map +1 -0
  150. package/lib/commonjs/testing/conformance/records.js +224 -0
  151. package/lib/commonjs/testing/conformance/records.js.map +1 -0
  152. package/lib/commonjs/testing/conformance/scopes.js +107 -0
  153. package/lib/commonjs/testing/conformance/scopes.js.map +1 -0
  154. package/lib/commonjs/testing/conformance/transactions.js +228 -0
  155. package/lib/commonjs/testing/conformance/transactions.js.map +1 -0
  156. package/lib/commonjs/testing/faults.js +38 -0
  157. package/lib/commonjs/testing/faults.js.map +1 -0
  158. package/lib/commonjs/testing/index.js +59 -0
  159. package/lib/commonjs/testing/index.js.map +1 -0
  160. package/lib/commonjs/testing/memory-adapter/attachments.js +145 -0
  161. package/lib/commonjs/testing/memory-adapter/attachments.js.map +1 -0
  162. package/lib/commonjs/testing/memory-adapter/collection.js +224 -0
  163. package/lib/commonjs/testing/memory-adapter/collection.js.map +1 -0
  164. package/lib/commonjs/testing/memory-adapter/index.js +366 -0
  165. package/lib/commonjs/testing/memory-adapter/index.js.map +1 -0
  166. package/lib/commonjs/testing/memory-adapter/migrations.js +126 -0
  167. package/lib/commonjs/testing/memory-adapter/migrations.js.map +1 -0
  168. package/lib/commonjs/testing/memory-adapter/reset.js +49 -0
  169. package/lib/commonjs/testing/memory-adapter/reset.js.map +1 -0
  170. package/lib/commonjs/testing/memory-adapter/store.js +107 -0
  171. package/lib/commonjs/testing/memory-adapter/store.js.map +1 -0
  172. package/lib/module/adapter/budgets.js +51 -0
  173. package/lib/module/adapter/budgets.js.map +1 -0
  174. package/lib/module/adapter/collection.js +232 -0
  175. package/lib/module/adapter/collection.js.map +1 -0
  176. package/lib/module/adapter/deletion.js +280 -0
  177. package/lib/module/adapter/deletion.js.map +1 -0
  178. package/lib/module/adapter/handle.js +254 -0
  179. package/lib/module/adapter/handle.js.map +1 -0
  180. package/lib/module/adapter/index.js +59 -0
  181. package/lib/module/adapter/index.js.map +1 -0
  182. package/lib/module/adapter/lifecycle.js +172 -0
  183. package/lib/module/adapter/lifecycle.js.map +1 -0
  184. package/lib/module/adapter/schema-sync.js +121 -0
  185. package/lib/module/adapter/schema-sync.js.map +1 -0
  186. package/lib/module/adapter/transaction.js +54 -0
  187. package/lib/module/adapter/transaction.js.map +1 -0
  188. package/lib/module/artifacts/availability.js +86 -0
  189. package/lib/module/artifacts/availability.js.map +1 -0
  190. package/lib/module/artifacts/cascade.js +75 -0
  191. package/lib/module/artifacts/cascade.js.map +1 -0
  192. package/lib/module/artifacts/paths.js +26 -0
  193. package/lib/module/artifacts/paths.js.map +1 -0
  194. package/lib/module/artifacts/reconcile.js +51 -0
  195. package/lib/module/artifacts/reconcile.js.map +1 -0
  196. package/lib/module/artifacts/store.js +289 -0
  197. package/lib/module/artifacts/store.js.map +1 -0
  198. package/lib/module/contract/adapter.js +4 -0
  199. package/lib/module/contract/adapter.js.map +1 -0
  200. package/lib/module/contract/attachment.js +2 -0
  201. package/lib/module/contract/attachment.js.map +1 -0
  202. package/lib/module/contract/backup.js +2 -0
  203. package/lib/module/contract/backup.js.map +1 -0
  204. package/lib/module/contract/config.js +27 -0
  205. package/lib/module/contract/config.js.map +1 -0
  206. package/lib/module/contract/encryption.js +4 -0
  207. package/lib/module/contract/encryption.js.map +1 -0
  208. package/lib/module/contract/errors.js +60 -0
  209. package/lib/module/contract/errors.js.map +1 -0
  210. package/lib/module/contract/migration.js +4 -0
  211. package/lib/module/contract/migration.js.map +1 -0
  212. package/lib/module/contract/query.js +4 -0
  213. package/lib/module/contract/query.js.map +1 -0
  214. package/lib/module/contract/record.js +4 -0
  215. package/lib/module/contract/record.js.map +1 -0
  216. package/lib/module/contract/schema.js +2 -0
  217. package/lib/module/contract/schema.js.map +1 -0
  218. package/lib/module/contract/scope.js +2 -0
  219. package/lib/module/contract/scope.js.map +1 -0
  220. package/lib/module/contract/transaction.js +4 -0
  221. package/lib/module/contract/transaction.js.map +1 -0
  222. package/lib/module/crypto/chunked-cipher.js +134 -0
  223. package/lib/module/crypto/chunked-cipher.js.map +1 -0
  224. package/lib/module/crypto/derive.js +56 -0
  225. package/lib/module/crypto/derive.js.map +1 -0
  226. package/lib/module/crypto/key-provider.js +67 -0
  227. package/lib/module/crypto/key-provider.js.map +1 -0
  228. package/lib/module/crypto/provider.js +49 -0
  229. package/lib/module/crypto/provider.js.map +1 -0
  230. package/lib/module/diagnostics/dev-log.js +120 -0
  231. package/lib/module/diagnostics/dev-log.js.map +1 -0
  232. package/lib/module/diagnostics/errors.js +44 -0
  233. package/lib/module/diagnostics/errors.js.map +1 -0
  234. package/lib/module/diagnostics/faults.js +47 -0
  235. package/lib/module/diagnostics/faults.js.map +1 -0
  236. package/lib/module/diagnostics/map-native.js +93 -0
  237. package/lib/module/diagnostics/map-native.js.map +1 -0
  238. package/lib/module/diagnostics/redact.js +102 -0
  239. package/lib/module/diagnostics/redact.js.map +1 -0
  240. package/lib/module/index.js +28 -0
  241. package/lib/module/index.js.map +1 -0
  242. package/lib/module/migration/executor.js +132 -0
  243. package/lib/module/migration/executor.js.map +1 -0
  244. package/lib/module/migration/ledger.js +57 -0
  245. package/lib/module/migration/ledger.js.map +1 -0
  246. package/lib/module/migration/validate-chain.js +70 -0
  247. package/lib/module/migration/validate-chain.js.map +1 -0
  248. package/lib/module/package.json +1 -0
  249. package/lib/module/platform/backup-android-verify.js +69 -0
  250. package/lib/module/platform/backup-android-verify.js.map +1 -0
  251. package/lib/module/platform/backup-ios.js +44 -0
  252. package/lib/module/platform/backup-ios.js.map +1 -0
  253. package/lib/module/platform/bytes.js +148 -0
  254. package/lib/module/platform/bytes.js.map +1 -0
  255. package/lib/module/platform/fs.js +54 -0
  256. package/lib/module/platform/fs.js.map +1 -0
  257. package/lib/module/platform/location.js +120 -0
  258. package/lib/module/platform/location.js.map +1 -0
  259. package/lib/module/query/budgets.js +88 -0
  260. package/lib/module/query/budgets.js.map +1 -0
  261. package/lib/module/query/compare.js +90 -0
  262. package/lib/module/query/compare.js.map +1 -0
  263. package/lib/module/query/cursor.js +91 -0
  264. package/lib/module/query/cursor.js.map +1 -0
  265. package/lib/module/query/filter.js +78 -0
  266. package/lib/module/query/filter.js.map +1 -0
  267. package/lib/module/query/paginate.js +40 -0
  268. package/lib/module/query/paginate.js.map +1 -0
  269. package/lib/module/query/sort.js +53 -0
  270. package/lib/module/query/sort.js.map +1 -0
  271. package/lib/module/query/validate.js +173 -0
  272. package/lib/module/query/validate.js.map +1 -0
  273. package/lib/module/schema/declare.js +37 -0
  274. package/lib/module/schema/declare.js.map +1 -0
  275. package/lib/module/schema/validate-config.js +111 -0
  276. package/lib/module/schema/validate-config.js.map +1 -0
  277. package/lib/module/scope/hash.js +102 -0
  278. package/lib/module/scope/hash.js.map +1 -0
  279. package/lib/module/scope/normalize.js +67 -0
  280. package/lib/module/scope/normalize.js.map +1 -0
  281. package/lib/module/scope/validate.js +76 -0
  282. package/lib/module/scope/validate.js.map +1 -0
  283. package/lib/module/sqlite/adapter.js +27 -0
  284. package/lib/module/sqlite/adapter.js.map +1 -0
  285. package/lib/module/sqlite/batch.js +214 -0
  286. package/lib/module/sqlite/batch.js.map +1 -0
  287. package/lib/module/sqlite/catalog.js +72 -0
  288. package/lib/module/sqlite/catalog.js.map +1 -0
  289. package/lib/module/sqlite/connection.js +206 -0
  290. package/lib/module/sqlite/connection.js.map +1 -0
  291. package/lib/module/sqlite/index-coverage.js +38 -0
  292. package/lib/module/sqlite/index-coverage.js.map +1 -0
  293. package/lib/module/sqlite/native.js +48 -0
  294. package/lib/module/sqlite/native.js.map +1 -0
  295. package/lib/module/sqlite/row-codec.js +176 -0
  296. package/lib/module/sqlite/row-codec.js.map +1 -0
  297. package/lib/module/sqlite/sql-builder.js +247 -0
  298. package/lib/module/sqlite/sql-builder.js.map +1 -0
  299. package/lib/module/sqlite/statements.js +49 -0
  300. package/lib/module/sqlite/statements.js.map +1 -0
  301. package/lib/module/sqlite/transaction-queue.js +75 -0
  302. package/lib/module/sqlite/transaction-queue.js.map +1 -0
  303. package/lib/module/sqlite/transactions.js +29 -0
  304. package/lib/module/sqlite/transactions.js.map +1 -0
  305. package/lib/module/sqlite/values.js +24 -0
  306. package/lib/module/sqlite/values.js.map +1 -0
  307. package/lib/module/testing/conformance/attachments.js +176 -0
  308. package/lib/module/testing/conformance/attachments.js.map +1 -0
  309. package/lib/module/testing/conformance/encryption.js +183 -0
  310. package/lib/module/testing/conformance/encryption.js.map +1 -0
  311. package/lib/module/testing/conformance/index.js +97 -0
  312. package/lib/module/testing/conformance/index.js.map +1 -0
  313. package/lib/module/testing/conformance/lifecycle.js +130 -0
  314. package/lib/module/testing/conformance/lifecycle.js.map +1 -0
  315. package/lib/module/testing/conformance/migrations.js +163 -0
  316. package/lib/module/testing/conformance/migrations.js.map +1 -0
  317. package/lib/module/testing/conformance/queries.js +274 -0
  318. package/lib/module/testing/conformance/queries.js.map +1 -0
  319. package/lib/module/testing/conformance/records.js +220 -0
  320. package/lib/module/testing/conformance/records.js.map +1 -0
  321. package/lib/module/testing/conformance/scopes.js +103 -0
  322. package/lib/module/testing/conformance/scopes.js.map +1 -0
  323. package/lib/module/testing/conformance/transactions.js +224 -0
  324. package/lib/module/testing/conformance/transactions.js.map +1 -0
  325. package/lib/module/testing/faults.js +16 -0
  326. package/lib/module/testing/faults.js.map +1 -0
  327. package/lib/module/testing/index.js +16 -0
  328. package/lib/module/testing/index.js.map +1 -0
  329. package/lib/module/testing/memory-adapter/attachments.js +142 -0
  330. package/lib/module/testing/memory-adapter/attachments.js.map +1 -0
  331. package/lib/module/testing/memory-adapter/collection.js +220 -0
  332. package/lib/module/testing/memory-adapter/collection.js.map +1 -0
  333. package/lib/module/testing/memory-adapter/index.js +351 -0
  334. package/lib/module/testing/memory-adapter/index.js.map +1 -0
  335. package/lib/module/testing/memory-adapter/migrations.js +122 -0
  336. package/lib/module/testing/memory-adapter/migrations.js.map +1 -0
  337. package/lib/module/testing/memory-adapter/reset.js +44 -0
  338. package/lib/module/testing/memory-adapter/reset.js.map +1 -0
  339. package/lib/module/testing/memory-adapter/store.js +94 -0
  340. package/lib/module/testing/memory-adapter/store.js.map +1 -0
  341. package/lib/typescript/commonjs/adapter/budgets.d.ts +19 -0
  342. package/lib/typescript/commonjs/adapter/budgets.d.ts.map +1 -0
  343. package/lib/typescript/commonjs/adapter/collection.d.ts +25 -0
  344. package/lib/typescript/commonjs/adapter/collection.d.ts.map +1 -0
  345. package/lib/typescript/commonjs/adapter/deletion.d.ts +48 -0
  346. package/lib/typescript/commonjs/adapter/deletion.d.ts.map +1 -0
  347. package/lib/typescript/commonjs/adapter/handle.d.ts +30 -0
  348. package/lib/typescript/commonjs/adapter/handle.d.ts.map +1 -0
  349. package/lib/typescript/commonjs/adapter/index.d.ts +30 -0
  350. package/lib/typescript/commonjs/adapter/index.d.ts.map +1 -0
  351. package/lib/typescript/commonjs/adapter/lifecycle.d.ts +25 -0
  352. package/lib/typescript/commonjs/adapter/lifecycle.d.ts.map +1 -0
  353. package/lib/typescript/commonjs/adapter/schema-sync.d.ts +19 -0
  354. package/lib/typescript/commonjs/adapter/schema-sync.d.ts.map +1 -0
  355. package/lib/typescript/commonjs/adapter/transaction.d.ts +32 -0
  356. package/lib/typescript/commonjs/adapter/transaction.d.ts.map +1 -0
  357. package/lib/typescript/commonjs/artifacts/availability.d.ts +19 -0
  358. package/lib/typescript/commonjs/artifacts/availability.d.ts.map +1 -0
  359. package/lib/typescript/commonjs/artifacts/cascade.d.ts +26 -0
  360. package/lib/typescript/commonjs/artifacts/cascade.d.ts.map +1 -0
  361. package/lib/typescript/commonjs/artifacts/paths.d.ts +16 -0
  362. package/lib/typescript/commonjs/artifacts/paths.d.ts.map +1 -0
  363. package/lib/typescript/commonjs/artifacts/reconcile.d.ts +23 -0
  364. package/lib/typescript/commonjs/artifacts/reconcile.d.ts.map +1 -0
  365. package/lib/typescript/commonjs/artifacts/store.d.ts +45 -0
  366. package/lib/typescript/commonjs/artifacts/store.d.ts.map +1 -0
  367. package/lib/typescript/commonjs/contract/adapter.d.ts +55 -0
  368. package/lib/typescript/commonjs/contract/adapter.d.ts.map +1 -0
  369. package/lib/typescript/commonjs/contract/attachment.d.ts +84 -0
  370. package/lib/typescript/commonjs/contract/attachment.d.ts.map +1 -0
  371. package/lib/typescript/commonjs/contract/backup.d.ts +26 -0
  372. package/lib/typescript/commonjs/contract/backup.d.ts.map +1 -0
  373. package/lib/typescript/commonjs/contract/config.d.ts +50 -0
  374. package/lib/typescript/commonjs/contract/config.d.ts.map +1 -0
  375. package/lib/typescript/commonjs/contract/encryption.d.ts +31 -0
  376. package/lib/typescript/commonjs/contract/encryption.d.ts.map +1 -0
  377. package/lib/typescript/commonjs/contract/errors.d.ts +50 -0
  378. package/lib/typescript/commonjs/contract/errors.d.ts.map +1 -0
  379. package/lib/typescript/commonjs/contract/migration.d.ts +37 -0
  380. package/lib/typescript/commonjs/contract/migration.d.ts.map +1 -0
  381. package/lib/typescript/commonjs/contract/query.d.ts +79 -0
  382. package/lib/typescript/commonjs/contract/query.d.ts.map +1 -0
  383. package/lib/typescript/commonjs/contract/record.d.ts +43 -0
  384. package/lib/typescript/commonjs/contract/record.d.ts.map +1 -0
  385. package/lib/typescript/commonjs/contract/schema.d.ts +33 -0
  386. package/lib/typescript/commonjs/contract/schema.d.ts.map +1 -0
  387. package/lib/typescript/commonjs/contract/scope.d.ts +33 -0
  388. package/lib/typescript/commonjs/contract/scope.d.ts.map +1 -0
  389. package/lib/typescript/commonjs/contract/transaction.d.ts +66 -0
  390. package/lib/typescript/commonjs/contract/transaction.d.ts.map +1 -0
  391. package/lib/typescript/commonjs/crypto/chunked-cipher.d.ts +57 -0
  392. package/lib/typescript/commonjs/crypto/chunked-cipher.d.ts.map +1 -0
  393. package/lib/typescript/commonjs/crypto/derive.d.ts +28 -0
  394. package/lib/typescript/commonjs/crypto/derive.d.ts.map +1 -0
  395. package/lib/typescript/commonjs/crypto/key-provider.d.ts +30 -0
  396. package/lib/typescript/commonjs/crypto/key-provider.d.ts.map +1 -0
  397. package/lib/typescript/commonjs/crypto/provider.d.ts +35 -0
  398. package/lib/typescript/commonjs/crypto/provider.d.ts.map +1 -0
  399. package/lib/typescript/commonjs/diagnostics/dev-log.d.ts +35 -0
  400. package/lib/typescript/commonjs/diagnostics/dev-log.d.ts.map +1 -0
  401. package/lib/typescript/commonjs/diagnostics/errors.d.ts +34 -0
  402. package/lib/typescript/commonjs/diagnostics/errors.d.ts.map +1 -0
  403. package/lib/typescript/commonjs/diagnostics/faults.d.ts +26 -0
  404. package/lib/typescript/commonjs/diagnostics/faults.d.ts.map +1 -0
  405. package/lib/typescript/commonjs/diagnostics/map-native.d.ts +31 -0
  406. package/lib/typescript/commonjs/diagnostics/map-native.d.ts.map +1 -0
  407. package/lib/typescript/commonjs/diagnostics/redact.d.ts +70 -0
  408. package/lib/typescript/commonjs/diagnostics/redact.d.ts.map +1 -0
  409. package/lib/typescript/commonjs/index.d.ts +30 -0
  410. package/lib/typescript/commonjs/index.d.ts.map +1 -0
  411. package/lib/typescript/commonjs/migration/executor.d.ts +40 -0
  412. package/lib/typescript/commonjs/migration/executor.d.ts.map +1 -0
  413. package/lib/typescript/commonjs/migration/ledger.d.ts +34 -0
  414. package/lib/typescript/commonjs/migration/ledger.d.ts.map +1 -0
  415. package/lib/typescript/commonjs/migration/validate-chain.d.ts +20 -0
  416. package/lib/typescript/commonjs/migration/validate-chain.d.ts.map +1 -0
  417. package/lib/typescript/commonjs/package.json +1 -0
  418. package/lib/typescript/commonjs/platform/backup-android-verify.d.ts +30 -0
  419. package/lib/typescript/commonjs/platform/backup-android-verify.d.ts.map +1 -0
  420. package/lib/typescript/commonjs/platform/backup-ios.d.ts +26 -0
  421. package/lib/typescript/commonjs/platform/backup-ios.d.ts.map +1 -0
  422. package/lib/typescript/commonjs/platform/bytes.d.ts +36 -0
  423. package/lib/typescript/commonjs/platform/bytes.d.ts.map +1 -0
  424. package/lib/typescript/commonjs/platform/fs.d.ts +47 -0
  425. package/lib/typescript/commonjs/platform/fs.d.ts.map +1 -0
  426. package/lib/typescript/commonjs/platform/location.d.ts +53 -0
  427. package/lib/typescript/commonjs/platform/location.d.ts.map +1 -0
  428. package/lib/typescript/commonjs/query/budgets.d.ts +23 -0
  429. package/lib/typescript/commonjs/query/budgets.d.ts.map +1 -0
  430. package/lib/typescript/commonjs/query/compare.d.ts +42 -0
  431. package/lib/typescript/commonjs/query/compare.d.ts.map +1 -0
  432. package/lib/typescript/commonjs/query/cursor.d.ts +27 -0
  433. package/lib/typescript/commonjs/query/cursor.d.ts.map +1 -0
  434. package/lib/typescript/commonjs/query/filter.d.ts +11 -0
  435. package/lib/typescript/commonjs/query/filter.d.ts.map +1 -0
  436. package/lib/typescript/commonjs/query/paginate.d.ts +15 -0
  437. package/lib/typescript/commonjs/query/paginate.d.ts.map +1 -0
  438. package/lib/typescript/commonjs/query/sort.d.ts +19 -0
  439. package/lib/typescript/commonjs/query/sort.d.ts.map +1 -0
  440. package/lib/typescript/commonjs/query/validate.d.ts +15 -0
  441. package/lib/typescript/commonjs/query/validate.d.ts.map +1 -0
  442. package/lib/typescript/commonjs/schema/declare.d.ts +20 -0
  443. package/lib/typescript/commonjs/schema/declare.d.ts.map +1 -0
  444. package/lib/typescript/commonjs/schema/validate-config.d.ts +11 -0
  445. package/lib/typescript/commonjs/schema/validate-config.d.ts.map +1 -0
  446. package/lib/typescript/commonjs/scope/hash.d.ts +24 -0
  447. package/lib/typescript/commonjs/scope/hash.d.ts.map +1 -0
  448. package/lib/typescript/commonjs/scope/normalize.d.ts +46 -0
  449. package/lib/typescript/commonjs/scope/normalize.d.ts.map +1 -0
  450. package/lib/typescript/commonjs/scope/validate.d.ts +15 -0
  451. package/lib/typescript/commonjs/scope/validate.d.ts.map +1 -0
  452. package/lib/typescript/commonjs/sqlite/adapter.d.ts +16 -0
  453. package/lib/typescript/commonjs/sqlite/adapter.d.ts.map +1 -0
  454. package/lib/typescript/commonjs/sqlite/batch.d.ts +25 -0
  455. package/lib/typescript/commonjs/sqlite/batch.d.ts.map +1 -0
  456. package/lib/typescript/commonjs/sqlite/catalog.d.ts +34 -0
  457. package/lib/typescript/commonjs/sqlite/catalog.d.ts.map +1 -0
  458. package/lib/typescript/commonjs/sqlite/connection.d.ts +58 -0
  459. package/lib/typescript/commonjs/sqlite/connection.d.ts.map +1 -0
  460. package/lib/typescript/commonjs/sqlite/index-coverage.d.ts +18 -0
  461. package/lib/typescript/commonjs/sqlite/index-coverage.d.ts.map +1 -0
  462. package/lib/typescript/commonjs/sqlite/native.d.ts +48 -0
  463. package/lib/typescript/commonjs/sqlite/native.d.ts.map +1 -0
  464. package/lib/typescript/commonjs/sqlite/row-codec.d.ts +69 -0
  465. package/lib/typescript/commonjs/sqlite/row-codec.d.ts.map +1 -0
  466. package/lib/typescript/commonjs/sqlite/sql-builder.d.ts +34 -0
  467. package/lib/typescript/commonjs/sqlite/sql-builder.d.ts.map +1 -0
  468. package/lib/typescript/commonjs/sqlite/statements.d.ts +26 -0
  469. package/lib/typescript/commonjs/sqlite/statements.d.ts.map +1 -0
  470. package/lib/typescript/commonjs/sqlite/transaction-queue.d.ts +31 -0
  471. package/lib/typescript/commonjs/sqlite/transaction-queue.d.ts.map +1 -0
  472. package/lib/typescript/commonjs/sqlite/transactions.d.ts +26 -0
  473. package/lib/typescript/commonjs/sqlite/transactions.d.ts.map +1 -0
  474. package/lib/typescript/commonjs/sqlite/values.d.ts +13 -0
  475. package/lib/typescript/commonjs/sqlite/values.d.ts.map +1 -0
  476. package/lib/typescript/commonjs/testing/conformance/attachments.d.ts +4 -0
  477. package/lib/typescript/commonjs/testing/conformance/attachments.d.ts.map +1 -0
  478. package/lib/typescript/commonjs/testing/conformance/encryption.d.ts +4 -0
  479. package/lib/typescript/commonjs/testing/conformance/encryption.d.ts.map +1 -0
  480. package/lib/typescript/commonjs/testing/conformance/index.d.ts +58 -0
  481. package/lib/typescript/commonjs/testing/conformance/index.d.ts.map +1 -0
  482. package/lib/typescript/commonjs/testing/conformance/lifecycle.d.ts +4 -0
  483. package/lib/typescript/commonjs/testing/conformance/lifecycle.d.ts.map +1 -0
  484. package/lib/typescript/commonjs/testing/conformance/migrations.d.ts +4 -0
  485. package/lib/typescript/commonjs/testing/conformance/migrations.d.ts.map +1 -0
  486. package/lib/typescript/commonjs/testing/conformance/queries.d.ts +4 -0
  487. package/lib/typescript/commonjs/testing/conformance/queries.d.ts.map +1 -0
  488. package/lib/typescript/commonjs/testing/conformance/records.d.ts +4 -0
  489. package/lib/typescript/commonjs/testing/conformance/records.d.ts.map +1 -0
  490. package/lib/typescript/commonjs/testing/conformance/scopes.d.ts +4 -0
  491. package/lib/typescript/commonjs/testing/conformance/scopes.d.ts.map +1 -0
  492. package/lib/typescript/commonjs/testing/conformance/transactions.d.ts +4 -0
  493. package/lib/typescript/commonjs/testing/conformance/transactions.d.ts.map +1 -0
  494. package/lib/typescript/commonjs/testing/faults.d.ts +13 -0
  495. package/lib/typescript/commonjs/testing/faults.d.ts.map +1 -0
  496. package/lib/typescript/commonjs/testing/index.d.ts +13 -0
  497. package/lib/typescript/commonjs/testing/index.d.ts.map +1 -0
  498. package/lib/typescript/commonjs/testing/memory-adapter/attachments.d.ts +23 -0
  499. package/lib/typescript/commonjs/testing/memory-adapter/attachments.d.ts.map +1 -0
  500. package/lib/typescript/commonjs/testing/memory-adapter/collection.d.ts +19 -0
  501. package/lib/typescript/commonjs/testing/memory-adapter/collection.d.ts.map +1 -0
  502. package/lib/typescript/commonjs/testing/memory-adapter/index.d.ts +22 -0
  503. package/lib/typescript/commonjs/testing/memory-adapter/index.d.ts.map +1 -0
  504. package/lib/typescript/commonjs/testing/memory-adapter/migrations.d.ts +11 -0
  505. package/lib/typescript/commonjs/testing/memory-adapter/migrations.d.ts.map +1 -0
  506. package/lib/typescript/commonjs/testing/memory-adapter/reset.d.ts +23 -0
  507. package/lib/typescript/commonjs/testing/memory-adapter/reset.d.ts.map +1 -0
  508. package/lib/typescript/commonjs/testing/memory-adapter/store.d.ts +54 -0
  509. package/lib/typescript/commonjs/testing/memory-adapter/store.d.ts.map +1 -0
  510. package/lib/typescript/module/adapter/budgets.d.ts +19 -0
  511. package/lib/typescript/module/adapter/budgets.d.ts.map +1 -0
  512. package/lib/typescript/module/adapter/collection.d.ts +25 -0
  513. package/lib/typescript/module/adapter/collection.d.ts.map +1 -0
  514. package/lib/typescript/module/adapter/deletion.d.ts +48 -0
  515. package/lib/typescript/module/adapter/deletion.d.ts.map +1 -0
  516. package/lib/typescript/module/adapter/handle.d.ts +30 -0
  517. package/lib/typescript/module/adapter/handle.d.ts.map +1 -0
  518. package/lib/typescript/module/adapter/index.d.ts +30 -0
  519. package/lib/typescript/module/adapter/index.d.ts.map +1 -0
  520. package/lib/typescript/module/adapter/lifecycle.d.ts +25 -0
  521. package/lib/typescript/module/adapter/lifecycle.d.ts.map +1 -0
  522. package/lib/typescript/module/adapter/schema-sync.d.ts +19 -0
  523. package/lib/typescript/module/adapter/schema-sync.d.ts.map +1 -0
  524. package/lib/typescript/module/adapter/transaction.d.ts +32 -0
  525. package/lib/typescript/module/adapter/transaction.d.ts.map +1 -0
  526. package/lib/typescript/module/artifacts/availability.d.ts +19 -0
  527. package/lib/typescript/module/artifacts/availability.d.ts.map +1 -0
  528. package/lib/typescript/module/artifacts/cascade.d.ts +26 -0
  529. package/lib/typescript/module/artifacts/cascade.d.ts.map +1 -0
  530. package/lib/typescript/module/artifacts/paths.d.ts +16 -0
  531. package/lib/typescript/module/artifacts/paths.d.ts.map +1 -0
  532. package/lib/typescript/module/artifacts/reconcile.d.ts +23 -0
  533. package/lib/typescript/module/artifacts/reconcile.d.ts.map +1 -0
  534. package/lib/typescript/module/artifacts/store.d.ts +45 -0
  535. package/lib/typescript/module/artifacts/store.d.ts.map +1 -0
  536. package/lib/typescript/module/contract/adapter.d.ts +55 -0
  537. package/lib/typescript/module/contract/adapter.d.ts.map +1 -0
  538. package/lib/typescript/module/contract/attachment.d.ts +84 -0
  539. package/lib/typescript/module/contract/attachment.d.ts.map +1 -0
  540. package/lib/typescript/module/contract/backup.d.ts +26 -0
  541. package/lib/typescript/module/contract/backup.d.ts.map +1 -0
  542. package/lib/typescript/module/contract/config.d.ts +50 -0
  543. package/lib/typescript/module/contract/config.d.ts.map +1 -0
  544. package/lib/typescript/module/contract/encryption.d.ts +31 -0
  545. package/lib/typescript/module/contract/encryption.d.ts.map +1 -0
  546. package/lib/typescript/module/contract/errors.d.ts +50 -0
  547. package/lib/typescript/module/contract/errors.d.ts.map +1 -0
  548. package/lib/typescript/module/contract/migration.d.ts +37 -0
  549. package/lib/typescript/module/contract/migration.d.ts.map +1 -0
  550. package/lib/typescript/module/contract/query.d.ts +79 -0
  551. package/lib/typescript/module/contract/query.d.ts.map +1 -0
  552. package/lib/typescript/module/contract/record.d.ts +43 -0
  553. package/lib/typescript/module/contract/record.d.ts.map +1 -0
  554. package/lib/typescript/module/contract/schema.d.ts +33 -0
  555. package/lib/typescript/module/contract/schema.d.ts.map +1 -0
  556. package/lib/typescript/module/contract/scope.d.ts +33 -0
  557. package/lib/typescript/module/contract/scope.d.ts.map +1 -0
  558. package/lib/typescript/module/contract/transaction.d.ts +66 -0
  559. package/lib/typescript/module/contract/transaction.d.ts.map +1 -0
  560. package/lib/typescript/module/crypto/chunked-cipher.d.ts +57 -0
  561. package/lib/typescript/module/crypto/chunked-cipher.d.ts.map +1 -0
  562. package/lib/typescript/module/crypto/derive.d.ts +28 -0
  563. package/lib/typescript/module/crypto/derive.d.ts.map +1 -0
  564. package/lib/typescript/module/crypto/key-provider.d.ts +30 -0
  565. package/lib/typescript/module/crypto/key-provider.d.ts.map +1 -0
  566. package/lib/typescript/module/crypto/provider.d.ts +35 -0
  567. package/lib/typescript/module/crypto/provider.d.ts.map +1 -0
  568. package/lib/typescript/module/diagnostics/dev-log.d.ts +35 -0
  569. package/lib/typescript/module/diagnostics/dev-log.d.ts.map +1 -0
  570. package/lib/typescript/module/diagnostics/errors.d.ts +34 -0
  571. package/lib/typescript/module/diagnostics/errors.d.ts.map +1 -0
  572. package/lib/typescript/module/diagnostics/faults.d.ts +26 -0
  573. package/lib/typescript/module/diagnostics/faults.d.ts.map +1 -0
  574. package/lib/typescript/module/diagnostics/map-native.d.ts +31 -0
  575. package/lib/typescript/module/diagnostics/map-native.d.ts.map +1 -0
  576. package/lib/typescript/module/diagnostics/redact.d.ts +70 -0
  577. package/lib/typescript/module/diagnostics/redact.d.ts.map +1 -0
  578. package/lib/typescript/module/index.d.ts +30 -0
  579. package/lib/typescript/module/index.d.ts.map +1 -0
  580. package/lib/typescript/module/migration/executor.d.ts +40 -0
  581. package/lib/typescript/module/migration/executor.d.ts.map +1 -0
  582. package/lib/typescript/module/migration/ledger.d.ts +34 -0
  583. package/lib/typescript/module/migration/ledger.d.ts.map +1 -0
  584. package/lib/typescript/module/migration/validate-chain.d.ts +20 -0
  585. package/lib/typescript/module/migration/validate-chain.d.ts.map +1 -0
  586. package/lib/typescript/module/package.json +1 -0
  587. package/lib/typescript/module/platform/backup-android-verify.d.ts +30 -0
  588. package/lib/typescript/module/platform/backup-android-verify.d.ts.map +1 -0
  589. package/lib/typescript/module/platform/backup-ios.d.ts +26 -0
  590. package/lib/typescript/module/platform/backup-ios.d.ts.map +1 -0
  591. package/lib/typescript/module/platform/bytes.d.ts +36 -0
  592. package/lib/typescript/module/platform/bytes.d.ts.map +1 -0
  593. package/lib/typescript/module/platform/fs.d.ts +47 -0
  594. package/lib/typescript/module/platform/fs.d.ts.map +1 -0
  595. package/lib/typescript/module/platform/location.d.ts +53 -0
  596. package/lib/typescript/module/platform/location.d.ts.map +1 -0
  597. package/lib/typescript/module/query/budgets.d.ts +23 -0
  598. package/lib/typescript/module/query/budgets.d.ts.map +1 -0
  599. package/lib/typescript/module/query/compare.d.ts +42 -0
  600. package/lib/typescript/module/query/compare.d.ts.map +1 -0
  601. package/lib/typescript/module/query/cursor.d.ts +27 -0
  602. package/lib/typescript/module/query/cursor.d.ts.map +1 -0
  603. package/lib/typescript/module/query/filter.d.ts +11 -0
  604. package/lib/typescript/module/query/filter.d.ts.map +1 -0
  605. package/lib/typescript/module/query/paginate.d.ts +15 -0
  606. package/lib/typescript/module/query/paginate.d.ts.map +1 -0
  607. package/lib/typescript/module/query/sort.d.ts +19 -0
  608. package/lib/typescript/module/query/sort.d.ts.map +1 -0
  609. package/lib/typescript/module/query/validate.d.ts +15 -0
  610. package/lib/typescript/module/query/validate.d.ts.map +1 -0
  611. package/lib/typescript/module/schema/declare.d.ts +20 -0
  612. package/lib/typescript/module/schema/declare.d.ts.map +1 -0
  613. package/lib/typescript/module/schema/validate-config.d.ts +11 -0
  614. package/lib/typescript/module/schema/validate-config.d.ts.map +1 -0
  615. package/lib/typescript/module/scope/hash.d.ts +24 -0
  616. package/lib/typescript/module/scope/hash.d.ts.map +1 -0
  617. package/lib/typescript/module/scope/normalize.d.ts +46 -0
  618. package/lib/typescript/module/scope/normalize.d.ts.map +1 -0
  619. package/lib/typescript/module/scope/validate.d.ts +15 -0
  620. package/lib/typescript/module/scope/validate.d.ts.map +1 -0
  621. package/lib/typescript/module/sqlite/adapter.d.ts +16 -0
  622. package/lib/typescript/module/sqlite/adapter.d.ts.map +1 -0
  623. package/lib/typescript/module/sqlite/batch.d.ts +25 -0
  624. package/lib/typescript/module/sqlite/batch.d.ts.map +1 -0
  625. package/lib/typescript/module/sqlite/catalog.d.ts +34 -0
  626. package/lib/typescript/module/sqlite/catalog.d.ts.map +1 -0
  627. package/lib/typescript/module/sqlite/connection.d.ts +58 -0
  628. package/lib/typescript/module/sqlite/connection.d.ts.map +1 -0
  629. package/lib/typescript/module/sqlite/index-coverage.d.ts +18 -0
  630. package/lib/typescript/module/sqlite/index-coverage.d.ts.map +1 -0
  631. package/lib/typescript/module/sqlite/native.d.ts +48 -0
  632. package/lib/typescript/module/sqlite/native.d.ts.map +1 -0
  633. package/lib/typescript/module/sqlite/row-codec.d.ts +69 -0
  634. package/lib/typescript/module/sqlite/row-codec.d.ts.map +1 -0
  635. package/lib/typescript/module/sqlite/sql-builder.d.ts +34 -0
  636. package/lib/typescript/module/sqlite/sql-builder.d.ts.map +1 -0
  637. package/lib/typescript/module/sqlite/statements.d.ts +26 -0
  638. package/lib/typescript/module/sqlite/statements.d.ts.map +1 -0
  639. package/lib/typescript/module/sqlite/transaction-queue.d.ts +31 -0
  640. package/lib/typescript/module/sqlite/transaction-queue.d.ts.map +1 -0
  641. package/lib/typescript/module/sqlite/transactions.d.ts +26 -0
  642. package/lib/typescript/module/sqlite/transactions.d.ts.map +1 -0
  643. package/lib/typescript/module/sqlite/values.d.ts +13 -0
  644. package/lib/typescript/module/sqlite/values.d.ts.map +1 -0
  645. package/lib/typescript/module/testing/conformance/attachments.d.ts +4 -0
  646. package/lib/typescript/module/testing/conformance/attachments.d.ts.map +1 -0
  647. package/lib/typescript/module/testing/conformance/encryption.d.ts +4 -0
  648. package/lib/typescript/module/testing/conformance/encryption.d.ts.map +1 -0
  649. package/lib/typescript/module/testing/conformance/index.d.ts +58 -0
  650. package/lib/typescript/module/testing/conformance/index.d.ts.map +1 -0
  651. package/lib/typescript/module/testing/conformance/lifecycle.d.ts +4 -0
  652. package/lib/typescript/module/testing/conformance/lifecycle.d.ts.map +1 -0
  653. package/lib/typescript/module/testing/conformance/migrations.d.ts +4 -0
  654. package/lib/typescript/module/testing/conformance/migrations.d.ts.map +1 -0
  655. package/lib/typescript/module/testing/conformance/queries.d.ts +4 -0
  656. package/lib/typescript/module/testing/conformance/queries.d.ts.map +1 -0
  657. package/lib/typescript/module/testing/conformance/records.d.ts +4 -0
  658. package/lib/typescript/module/testing/conformance/records.d.ts.map +1 -0
  659. package/lib/typescript/module/testing/conformance/scopes.d.ts +4 -0
  660. package/lib/typescript/module/testing/conformance/scopes.d.ts.map +1 -0
  661. package/lib/typescript/module/testing/conformance/transactions.d.ts +4 -0
  662. package/lib/typescript/module/testing/conformance/transactions.d.ts.map +1 -0
  663. package/lib/typescript/module/testing/faults.d.ts +13 -0
  664. package/lib/typescript/module/testing/faults.d.ts.map +1 -0
  665. package/lib/typescript/module/testing/index.d.ts +13 -0
  666. package/lib/typescript/module/testing/index.d.ts.map +1 -0
  667. package/lib/typescript/module/testing/memory-adapter/attachments.d.ts +23 -0
  668. package/lib/typescript/module/testing/memory-adapter/attachments.d.ts.map +1 -0
  669. package/lib/typescript/module/testing/memory-adapter/collection.d.ts +19 -0
  670. package/lib/typescript/module/testing/memory-adapter/collection.d.ts.map +1 -0
  671. package/lib/typescript/module/testing/memory-adapter/index.d.ts +22 -0
  672. package/lib/typescript/module/testing/memory-adapter/index.d.ts.map +1 -0
  673. package/lib/typescript/module/testing/memory-adapter/migrations.d.ts +11 -0
  674. package/lib/typescript/module/testing/memory-adapter/migrations.d.ts.map +1 -0
  675. package/lib/typescript/module/testing/memory-adapter/reset.d.ts +23 -0
  676. package/lib/typescript/module/testing/memory-adapter/reset.d.ts.map +1 -0
  677. package/lib/typescript/module/testing/memory-adapter/store.d.ts +54 -0
  678. package/lib/typescript/module/testing/memory-adapter/store.d.ts.map +1 -0
  679. package/package.json +51 -16
  680. package/skills/sdk-rn-local-db/SKILL.md +1 -1
  681. package/src/adapter/budgets.ts +1 -10
  682. package/src/adapter/collection.ts +38 -66
  683. package/src/adapter/deletion.ts +48 -0
  684. package/src/adapter/handle.ts +311 -0
  685. package/src/adapter/lifecycle.ts +10 -338
  686. package/src/adapter/schema-sync.ts +155 -0
  687. package/src/artifacts/cascade.ts +0 -14
  688. package/src/artifacts/store.ts +60 -10
  689. package/src/contract/attachment.ts +24 -3
  690. package/src/contract/migration.ts +4 -1
  691. package/src/crypto/provider.ts +7 -3
  692. package/src/diagnostics/dev-log.ts +5 -1
  693. package/src/migration/executor.ts +27 -6
  694. package/src/migration/ledger.ts +18 -27
  695. package/src/platform/fs.ts +2 -8
  696. package/src/platform/location.ts +0 -3
  697. package/src/query/budgets.ts +32 -5
  698. package/src/schema/validate-config.ts +3 -53
  699. package/src/sqlite/batch.ts +40 -51
  700. package/src/sqlite/connection.ts +0 -9
  701. package/src/sqlite/row-codec.ts +5 -2
  702. package/src/sqlite/statements.ts +74 -0
  703. package/src/testing/index.ts +2 -0
  704. package/src/testing/memory-adapter/attachments.ts +146 -0
  705. package/src/testing/memory-adapter/index.ts +13 -111
@@ -0,0 +1,34 @@
1
+ /**
2
+ * The catalog: one registry per logical database, listing the scopes that
3
+ * exist.
4
+ *
5
+ * This is the only structure that spans scopes, so it is deliberately the
6
+ * smallest thing that answers the questions the package must answer without
7
+ * opening every scope file. It holds a digest, timestamps, and two posture
8
+ * flags — **no raw scope components** (FR-014), so a device with full disk
9
+ * access cannot mine it for identities or tenant names even though the
10
+ * catalog itself is never encrypted.
11
+ *
12
+ * The `deleting` flag is the load-bearing part. It is written before a scope
13
+ * deletion begins and cleared last, so a crash at any point leaves the
14
+ * interruption visible on the next open. Clearing it first would make an
15
+ * interrupted deletion look complete — the exact failure FR-063 exists to
16
+ * prevent.
17
+ */
18
+ import type { ScopeDeletionState } from '../contract/scope.js';
19
+ import type { Connection } from './connection.js';
20
+ export type CatalogEntry = {
21
+ scopeKey: string;
22
+ createdAt: number;
23
+ deletionState: ScopeDeletionState;
24
+ backupPosture: 'excluded' | 'included';
25
+ encrypted: boolean;
26
+ };
27
+ export declare function ensureCatalog(connection: Connection): Promise<void>;
28
+ export declare function readEntry(connection: Connection, scopeKey: string): Promise<CatalogEntry | null>;
29
+ export declare function listEntries(connection: Connection): Promise<CatalogEntry[]>;
30
+ export declare function registerScope(connection: Connection, entry: CatalogEntry): Promise<void>;
31
+ export declare function markDeleting(connection: Connection, scopeKey: string): Promise<void>;
32
+ /** Cleared last, on purpose. See the note at the top of this file. */
33
+ export declare function clearScope(connection: Connection, scopeKey: string): Promise<void>;
34
+ //# sourceMappingURL=catalog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../../src/sqlite/catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAmB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAc,CAAC;AAG/C,MAAM,MAAM,YAAY,GAAG;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,kBAAkB,CAAC;IAClC,aAAa,EAAE,UAAU,GAAG,UAAU,CAAC;IACvC,SAAS,EAAE,OAAO,CAAC;CACnB,CAAC;AAUF,wBAAsB,aAAa,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAEzE;AAED,wBAAsB,SAAS,CAC9B,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,MAAM,GACd,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAgB9B;AAED,wBAAsB,WAAW,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAWjF;AAED,wBAAsB,aAAa,CAAC,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAgB9F;AAED,wBAAsB,YAAY,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAK1F;AAED,sEAAsE;AACtE,wBAAsB,UAAU,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAExF"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * One connection per database file.
3
+ *
4
+ * Two things about this file carry design weight:
5
+ *
6
+ * **Scope isolation is the file boundary.** A connection is opened against
7
+ * one scope's `data.db`, whose directory is named by the scope digest and
8
+ * never by the components (FR-014). No SQL this package could generate — and
9
+ * none a future bug could generate — reaches another scope's rows, because
10
+ * they are in a file this connection never opened (research.md R2).
11
+ *
12
+ * **A transaction owns the connection while it runs, and only its own
13
+ * executor reaches it.** Every operation queues on the connection, and a
14
+ * transaction holds the queue until it settles. Work issued through the
15
+ * connection meanwhile — a background sync, a second screen — waits and then
16
+ * runs on its own, rather than joining the transaction and vanishing with its
17
+ * rollback. Until 0.2.0 `execute` routed into whatever transaction was in
18
+ * flight, which is how an unrelated write was lost. Work meant to be part of
19
+ * the transaction goes through the executor the transaction hands out
20
+ * (`tx.collection`, `tx.attachments`).
21
+ */
22
+ import { type ExecuteResult, type SqlValue } from './native.js';
23
+ export type Executor = {
24
+ execute(sql: string, params?: SqlValue[]): Promise<ExecuteResult>;
25
+ };
26
+ /**
27
+ * The executor a transaction body runs against, plus the one control it
28
+ * needs. `rollback` is handed to the body rather than returned from
29
+ * `transaction`, so an explicit abort cannot outlive the transaction it
30
+ * belongs to.
31
+ */
32
+ export type TransactionExecutor = Executor & {
33
+ rollback(): Promise<void>;
34
+ };
35
+ export type Connection = Executor & {
36
+ readonly path: string;
37
+ readonly encrypted: boolean;
38
+ transaction<R>(fn: (tx: TransactionExecutor) => Promise<R>): Promise<R>;
39
+ executeBatch(commands: [string, SqlValue[]?][]): Promise<void>;
40
+ close(): Promise<void>;
41
+ };
42
+ export type OpenConnectionOptions = {
43
+ /** Absolute path to the database file, already inside the managed area. */
44
+ path: string;
45
+ encryptionKey?: string;
46
+ };
47
+ export declare function openConnection(options: OpenConnectionOptions): Promise<Connection>;
48
+ /**
49
+ * Confirm a freshly opened database is readable.
50
+ *
51
+ * Deliberately not `PRAGMA integrity_check`: that walks the whole file and
52
+ * would put open time far past the 150-millisecond budget on a large scope.
53
+ * One trivial read is enough to surface the failures that matter at open —
54
+ * a wrong key, a truncated file, a malformed header — because all three fail
55
+ * it, and the error mapping keeps them distinguishable (FR-076, FR-078).
56
+ */
57
+ export declare function assertReadable(connection: Connection): Promise<void>;
58
+ //# sourceMappingURL=connection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../../../../src/sqlite/connection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAOH,OAAO,EAEN,KAAK,aAAa,EAGlB,KAAK,QAAQ,EACb,MAAM,aAAU,CAAC;AAElB,MAAM,MAAM,QAAQ,GAAG;IACtB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;CAClE,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG;IAC5C,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,WAAW,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,mBAAmB,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACxE,YAAY,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/D,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IACnC,2EAA2E;IAC3E,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AASF,wBAAsB,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,UAAU,CAAC,CAsIxF;AAED;;;;;;;;GAQG;AACH,wBAAsB,cAAc,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAE1E"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * "Is this query covered by an index?", answered by the engine rather than by
3
+ * inspection of the declarations (FR-037).
4
+ *
5
+ * Reading the schema would answer what the developer intended; `EXPLAIN QUERY
6
+ * PLAN` answers what SQLite will actually do, and the two diverge exactly
7
+ * where it matters — a filter on an indexed field that the planner declines
8
+ * because of a type mismatch or a leading wildcard still reports as "indexed"
9
+ * if you only read declarations.
10
+ *
11
+ * Exposed as a development-mode diagnostic. It runs an extra statement, so an
12
+ * app calling it on every list would pay for it.
13
+ */
14
+ import type { IndexCoverageReport, Query, SortKey } from '../contract/query.js';
15
+ import type { CollectionSchema } from '../contract/schema.js';
16
+ import type { Executor } from './connection.js';
17
+ export declare function explainQuery(executor: Executor, schema: CollectionSchema, query: Query | undefined, sort: SortKey[]): Promise<IndexCoverageReport>;
18
+ //# sourceMappingURL=index-coverage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-coverage.d.ts","sourceRoot":"","sources":["../../../../src/sqlite/index-coverage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAmB,CAAC;AAC7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAoB,CAAC;AAE3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAc,CAAC;AAO7C,wBAAsB,YAAY,CACjC,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,gBAAgB,EACxB,KAAK,EAAE,KAAK,GAAG,SAAS,EACxB,IAAI,EAAE,OAAO,EAAE,GACb,OAAO,CAAC,mBAAmB,CAAC,CAwB9B"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * The storage engine peer, behind one lazy accessor.
3
+ *
4
+ * Every native call the package makes to SQLite passes through this type.
5
+ * Note what is missing: `executeSync`. op-sqlite ships it, and using it would
6
+ * put a database read on the interface thread — the one thing PERF-001's
7
+ * 16-millisecond rule cannot survive (research.md R9). A surface that cannot
8
+ * express the synchronous call is a stronger guarantee than a review comment.
9
+ */
10
+ export type SqlValue = string | number | boolean | null | undefined;
11
+ export type ExecuteResult = {
12
+ rows: Record<string, unknown>[];
13
+ rowsAffected: number;
14
+ };
15
+ export type NativeTransaction = {
16
+ execute(sql: string, params?: SqlValue[]): Promise<ExecuteResult>;
17
+ commit(): Promise<void>;
18
+ rollback(): Promise<void>;
19
+ };
20
+ export type NativeDatabase = {
21
+ execute(sql: string, params?: SqlValue[]): Promise<ExecuteResult>;
22
+ executeBatch(commands: [string, SqlValue[]?][]): Promise<ExecuteResult>;
23
+ transaction<T>(fn: (tx: NativeTransaction) => Promise<T>): Promise<T>;
24
+ close(): Promise<void>;
25
+ delete(): Promise<void>;
26
+ };
27
+ export type OpenOptions = {
28
+ name: string;
29
+ location?: string;
30
+ /** SQLCipher only. Never logged, never persisted, never returned (FR-098). */
31
+ encryptionKey?: string;
32
+ };
33
+ export type Engine = {
34
+ open(options: OpenOptions): NativeDatabase;
35
+ isSQLCipher?: () => boolean;
36
+ };
37
+ /** Swap the engine. Tests only; `null` goes back to the real one. */
38
+ export declare function setEngine(next: Engine | null): void;
39
+ export declare function engine(): Engine;
40
+ /**
41
+ * Whether SQLCipher is compiled into this build.
42
+ *
43
+ * A build flag in the consuming app, not a separate peer (research.md R1a).
44
+ * An app that enables encryption without it must fail loudly rather than
45
+ * write plaintext to a file it believes is encrypted.
46
+ */
47
+ export declare function isEncryptionAvailable(): boolean;
48
+ //# sourceMappingURL=native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native.d.ts","sourceRoot":"","sources":["../../../../src/sqlite/native.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;AAEpE,MAAM,MAAM,aAAa,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IAChC,YAAY,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC/B,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IAClE,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACxB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC5B,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IAClE,YAAY,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IACxE,WAAW,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,iBAAiB,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACtE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG;IACpB,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,cAAc,CAAC;IAC3C,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC;CAC5B,CAAC;AAYF,qEAAqE;AACrE,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAEnD;AAED,wBAAgB,MAAM,IAAI,MAAM,CAQ/B;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,IAAI,OAAO,CAG/C"}
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Table shape, and the payload-as-truth rule.
3
+ *
4
+ * Every read reconstructs the record from `payload` alone. The projected
5
+ * `f_*` columns are written on every write and consulted only by `WHERE` and
6
+ * `ORDER BY` — never by a read path (research.md R6).
7
+ *
8
+ * That single rule is what makes two requirements structural rather than
9
+ * carefully maintained. FR-018's byte fidelity holds because nothing else is
10
+ * consulted to rebuild a record, and FR-019's explicit-null versus
11
+ * absent-field distinction holds because a NULL projected column cannot be
12
+ * ambiguous if no read ever looks at it.
13
+ */
14
+ import type { StorableRecordData, StoredRecord } from '../contract/record.js';
15
+ import type { CollectionSchema, FieldDeclaration } from '../contract/schema.js';
16
+ import type { SqlValue } from './native.js';
17
+ export declare const RESERVED_COLUMNS: string[];
18
+ export declare function createTableSql(schema: CollectionSchema): string;
19
+ export declare function addColumnSql(schema: CollectionSchema, field: FieldDeclaration): string;
20
+ /**
21
+ * The name an index has in the database file.
22
+ *
23
+ * Index names are database-wide in SQLite, but declared per collection. Until
24
+ * 0.2.0 the declared name was used as is, so a second collection declaring an
25
+ * index of the same name hit `IF NOT EXISTS` and silently got no index — a
26
+ * UNIQUE constraint included. The double underscore keeps a declared name from
27
+ * colliding with the package's own `<table>_live` index.
28
+ */
29
+ export declare function physicalIndexName(schema: CollectionSchema, declaredName: string): string;
30
+ /** The declared name back from a physical one, for reporting to the app. */
31
+ export declare function declaredIndexName(schema: CollectionSchema, physicalName: string): string;
32
+ export declare function createIndexSql(schema: CollectionSchema): string[];
33
+ /**
34
+ * Project a declared field for the WHERE and ORDER BY columns.
35
+ *
36
+ * Anything that is not a comparable primitive projects to NULL. A nested
37
+ * object has no defensible ordering, and inventing one would make a filter
38
+ * silently match records a consumer never meant to select.
39
+ */
40
+ export declare function projectValue(data: StorableRecordData, field: FieldDeclaration): SqlValue;
41
+ export declare function projectedValues(schema: CollectionSchema, data: StorableRecordData): SqlValue[];
42
+ export declare function projectedColumnNames(schema: CollectionSchema): string[];
43
+ /** Serialize on the way in, so a caller mutating its object cannot change
44
+ * what is stored (FR-022). */
45
+ export declare function encodePayload(data: StorableRecordData): string;
46
+ export type CollectionRow = {
47
+ id: string;
48
+ payload: string;
49
+ created_at?: number | null;
50
+ updated_at?: number | null;
51
+ deleted_at?: number | null;
52
+ };
53
+ /**
54
+ * Rebuild a record from the payload column and nothing else.
55
+ *
56
+ * The timestamp and soft-delete fields are surfaced only when the collection
57
+ * declared them, so a consumer cannot come to depend on a field the schema
58
+ * never promised.
59
+ */
60
+ export declare function decodeRow<T extends StorableRecordData>(schema: CollectionSchema, row: Record<string, unknown>): StoredRecord<T>;
61
+ export type WriteColumns = {
62
+ columns: string[];
63
+ values: SqlValue[];
64
+ };
65
+ export declare function insertColumns(schema: CollectionSchema, id: string, data: StorableRecordData, now: number,
66
+ /** The payload already serialized by the budget check, to avoid a second pass. */
67
+ payload?: string): WriteColumns;
68
+ export declare function updateAssignments(schema: CollectionSchema, data: StorableRecordData, now: number, payload?: string): WriteColumns;
69
+ //# sourceMappingURL=row-codec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"row-codec.d.ts","sourceRoot":"","sources":["../../../../src/sqlite/row-codec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,uBAAoB,CAAC;AAC3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,uBAAoB,CAAC;AAE7E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAU,CAAC;AAGzC,eAAO,MAAM,gBAAgB,UAA8D,CAAC;AAgB5F,wBAAgB,cAAc,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAU/D;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,gBAAgB,EAAE,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAItF;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAExF;AAED,4EAA4E;AAC5E,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAGxF;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,EAAE,CAejE;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,gBAAgB,GAAG,QAAQ,CAkBxF;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,gBAAgB,EAAE,IAAI,EAAE,kBAAkB,GAAG,QAAQ,EAAE,CAE9F;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,EAAE,CAEvE;AAED;8BAC8B;AAC9B,wBAAgB,aAAa,CAAC,IAAI,EAAE,kBAAkB,GAAG,MAAM,CAE9D;AAED,MAAM,MAAM,aAAa,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,kBAAkB,EACrD,MAAM,EAAE,gBAAgB,EACxB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC1B,YAAY,CAAC,CAAC,CAAC,CAiBjB;AAED,MAAM,MAAM,YAAY,GAAG;IAC1B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,QAAQ,EAAE,CAAC;CACnB,CAAC;AAEF,wBAAgB,aAAa,CAC5B,MAAM,EAAE,gBAAgB,EACxB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,kBAAkB,EACxB,GAAG,EAAE,MAAM;AACX,kFAAkF;AAClF,OAAO,GAAE,MAA4B,GACnC,YAAY,CAkBd;AAED,wBAAgB,iBAAiB,CAChC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,kBAAkB,EACxB,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,MAA4B,GACnC,YAAY,CAcd"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Filter tree to parameterized SQL.
3
+ *
4
+ * Nothing a consumer supplies is ever concatenated into a statement. Field
5
+ * names are resolved through the schema first — validation has already run
6
+ * and rejected anything undeclared (FR-034) — so the only identifiers that
7
+ * reach SQL are ones this package generated from a declaration it checked.
8
+ * Values bind as parameters, without exception. Injection stops being a thing
9
+ * to remember and becomes a thing the shape of the code prevents.
10
+ *
11
+ * The other half of this file is keyset pagination. `OFFSET` was rejected for
12
+ * two measured reasons (research.md R6): it degrades linearly at the 100,000
13
+ * record budget because the engine still walks the skipped rows, and it
14
+ * shifts pages under concurrent writes so a record can be skipped or returned
15
+ * twice — the exact failure SC-007 forbids.
16
+ */
17
+ import type { FilterNode, FilterValue, SortKey } from '../contract/query.js';
18
+ import type { SqlValue } from './native.js';
19
+ export type SqlFragment = {
20
+ sql: string;
21
+ params: SqlValue[];
22
+ };
23
+ export declare function buildFilter(node: FilterNode | undefined): SqlFragment;
24
+ export declare function buildOrderBy(sort: SortKey[]): string;
25
+ /**
26
+ * The keyset predicate: everything strictly after the cursor position.
27
+ *
28
+ * Lexicographic across the sort keys — equal on the first means the second
29
+ * decides, down to the `id` tiebreaker that guarantees a total order. NULL is
30
+ * treated as smaller than every value, matching both SQLite's default
31
+ * ordering and `compareValues`, so the two adapters page identically.
32
+ */
33
+ export declare function buildKeysetPredicate(sort: SortKey[], anchor: FilterValue[]): SqlFragment;
34
+ //# sourceMappingURL=sql-builder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sql-builder.d.ts","sourceRoot":"","sources":["../../../../src/sqlite/sql-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,sBAAmB,CAAC;AAE1E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAU,CAAC;AAEzC,MAAM,MAAM,WAAW,GAAG;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,QAAQ,EAAE,CAAC;CACnB,CAAC;AAuIF,wBAAgB,WAAW,CAAC,IAAI,EAAE,UAAU,GAAG,SAAS,GAAG,WAAW,CAsBrE;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,MAAM,CAIpD;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,WAAW,CA8CxF"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * The write statements, built in one place (LDB-12).
3
+ *
4
+ * The collection API and the batch each used to assemble their own INSERT and
5
+ * UPDATE text. Two copies of the same rule is how a batch upsert came to treat
6
+ * a soft-deleted row differently from a collection upsert.
7
+ */
8
+ import type { CollectionSchema } from '../contract/schema.js';
9
+ import type { SqlValue } from './native.js';
10
+ import { insertColumns } from './row-codec.js';
11
+ export type Statement = [sql: string, params: SqlValue[]];
12
+ type RecordData = Parameters<typeof insertColumns>[2];
13
+ /**
14
+ * `ignore` leaves a row that already holds the id untouched and reports zero
15
+ * rows affected, so a conflict is detected without a SELECT beforehand.
16
+ */
17
+ export declare function insertStatement(schema: CollectionSchema, id: string, data: RecordData, now: number, payload: string, onConflict?: 'fail' | 'ignore'): Statement;
18
+ export type UpdateOptions = {
19
+ /** Clear `deleted_at`: an upsert over a soft-deleted record brings it back. */
20
+ restore?: boolean;
21
+ /** Match only a record that is not soft-deleted. */
22
+ liveOnly?: boolean;
23
+ };
24
+ export declare function updateStatement(schema: CollectionSchema, id: string, data: RecordData, now: number, payload: string, options?: UpdateOptions): Statement;
25
+ export {};
26
+ //# sourceMappingURL=statements.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"statements.d.ts","sourceRoot":"","sources":["../../../../src/sqlite/statements.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAoB,CAAC;AAE3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAU,CAAC;AACzC,OAAO,EAAE,aAAa,EAAqB,MAAM,gBAAa,CAAC;AAE/D,MAAM,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;AAE1D,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;AAiBtD;;;GAGG;AACH,wBAAgB,eAAe,CAC9B,MAAM,EAAE,gBAAgB,EACxB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,UAAU,EAChB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,EACf,UAAU,GAAE,MAAM,GAAG,QAAiB,GACpC,SAAS,CAIX;AAED,MAAM,MAAM,aAAa,GAAG;IAC3B,+EAA+E;IAC/E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,wBAAgB,eAAe,CAC9B,MAAM,EAAE,gBAAgB,EACxB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,UAAU,EAChB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,aAAkB,GACzB,SAAS,CAWX"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * The per-handle queue that keeps a transaction to itself.
3
+ *
4
+ * A transaction holds the queue until it settles; work arriving meanwhile
5
+ * through the handle waits its turn and then runs on its own, instead of
6
+ * joining the transaction and vanishing with its rollback (LDB-01). Shared by
7
+ * the SQLite connection and the memory adapter so both isolate the same way.
8
+ *
9
+ * Pure: no engine, no React, so the memory adapter can use it without loading
10
+ * native code.
11
+ */
12
+ /**
13
+ * How long work through the handle waits behind a transaction before it is
14
+ * refused.
15
+ *
16
+ * Not a performance budget: it exists for the one wait that never ends. A
17
+ * transaction body that awaits the handle's own `collection()` or
18
+ * `attachments()` is waiting on work queued behind itself. Until 0.2.0 that
19
+ * work ran inside the transaction; now it is refused after this long with a
20
+ * message naming `tx.collection()` / `tx.attachments()`, and the transaction
21
+ * rolls back, rather than both waiting forever.
22
+ */
23
+ export declare const TRANSACTION_WAIT_LIMIT_MS = 10000;
24
+ export type TransactionQueue = {
25
+ /** Ordinary work. Bounded by `TRANSACTION_WAIT_LIMIT_MS` when it queues behind a transaction. */
26
+ run<T>(work: () => Promise<T>): Promise<T>;
27
+ /** A transaction: holds the queue for as long as `work` runs. */
28
+ runTransaction<T>(work: () => Promise<T>): Promise<T>;
29
+ };
30
+ export declare function createTransactionQueue(waitLimitMs?: number): TransactionQueue;
31
+ //# sourceMappingURL=transaction-queue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transaction-queue.d.ts","sourceRoot":"","sources":["../../../../src/sqlite/transaction-queue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,yBAAyB,QAAS,CAAC;AAEhD,MAAM,MAAM,gBAAgB,GAAG;IAC9B,iGAAiG;IACjG,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3C,iEAAiE;IACjE,cAAc,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CACtD,CAAC;AAEF,wBAAgB,sBAAsB,CACrC,WAAW,GAAE,MAAkC,GAC7C,gBAAgB,CAiDlB"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * The transaction primitive.
3
+ *
4
+ * A transaction never spans two scopes, and not because a check forbids it:
5
+ * a transaction runs on one connection, a connection is opened against one
6
+ * scope's file, and the public surface offers no way to reach a second one
7
+ * from inside. FR-038 is a type error rather than a runtime one (research.md
8
+ * R2).
9
+ *
10
+ * Rollback fidelity is SQLite's, not this package's. A failure at any step
11
+ * unwinds through the engine's own `ROLLBACK`, which is the only way SC-006's
12
+ * "identical to its pre-transaction state, every time" survives a process
13
+ * kill halfway through.
14
+ */
15
+ import type { Connection, TransactionExecutor } from './connection.js';
16
+ /**
17
+ * Run `body` inside one transaction on one scope.
18
+ *
19
+ * Deliberately thin. The interesting behavior — read-your-own-writes,
20
+ * terminal-state rejection, what a settled transaction does when used again —
21
+ * belongs to `adapter/transaction.ts`, where both adapters can be held to the
22
+ * same rules.
23
+ */
24
+ export declare function runInTransaction<R>(connection: Connection, body: (tx: TransactionExecutor) => Promise<R>): Promise<R>;
25
+ export type { TransactionExecutor };
26
+ //# sourceMappingURL=transactions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../../../../src/sqlite/transactions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,iBAAc,CAAC;AAEpE;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EACjC,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,CAAC,EAAE,EAAE,mBAAmB,KAAK,OAAO,CAAC,CAAC,CAAC,GAC3C,OAAO,CAAC,CAAC,CAAC,CAEZ;AAED,YAAY,EAAE,mBAAmB,EAAE,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Reading values back out of a result row.
3
+ *
4
+ * The engine hands back `unknown` per column, and every read site would
5
+ * otherwise repeat the same `String(...)` / `Number(...)` coercion with a
6
+ * slightly different null check. One place to do it means one place where the
7
+ * "NULL means absent, not empty string" rule is decided.
8
+ */
9
+ export declare function text(value: unknown): string;
10
+ export declare function num(value: unknown): number;
11
+ export declare function maybeText(value: unknown): string | null;
12
+ export declare function maybeNum(value: unknown): number | null;
13
+ //# sourceMappingURL=values.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"values.d.ts","sourceRoot":"","sources":["../../../../src/sqlite/values.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,wBAAgB,IAAI,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAE3C;AAED,wBAAgB,GAAG,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAE1C;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAEvD;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAEtD"}
@@ -0,0 +1,4 @@
1
+ import type { ConformanceContext } from './index.js';
2
+ /** US7: artifacts the package owns, and the reconciliation that keeps them honest. */
3
+ export declare function registerAttachmentConformance(context: ConformanceContext): void;
4
+ //# sourceMappingURL=attachments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachments.d.ts","sourceRoot":"","sources":["../../../../../src/testing/conformance/attachments.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAS,CAAC;AAElD,sFAAsF;AACtF,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI,CAoI/E"}
@@ -0,0 +1,4 @@
1
+ import type { ConformanceContext } from './index.js';
2
+ /** US10: opt-in encryption, and failures that stay apart from each other. */
3
+ export declare function registerEncryptionConformance(context: ConformanceContext): void;
4
+ //# sourceMappingURL=encryption.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encryption.d.ts","sourceRoot":"","sources":["../../../../../src/testing/conformance/encryption.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAS,CAAC;AAElD,6EAA6E;AAC7E,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI,CA+I/E"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * The conformance suite: the executable definition of what the package
3
+ * guarantees (FR-092).
4
+ *
5
+ * Exported rather than kept internal so a consuming team can run it against
6
+ * their own adapter if one ever exists, and so both of ours are held to
7
+ * exactly the same standard rather than to two similar-looking test files.
8
+ */
9
+ import type { StorageAdapter } from '../../contract/adapter.js';
10
+ import type { DatabaseConfig, ScopeTargetConfig } from '../../contract/config.js';
11
+ import type { EncryptionConfig } from '../../contract/encryption.js';
12
+ import type { ScopeDescriptor } from '../../contract/scope.js';
13
+ export type ConformanceContext = {
14
+ adapter: StorageAdapter;
15
+ /** A fresh config for the given scope, using the standard test schema. */
16
+ configFor(scope: ScopeDescriptor, overrides?: Partial<DatabaseConfig>): DatabaseConfig;
17
+ /**
18
+ * How an app names a scope for deletion.
19
+ *
20
+ * Carries the encryption config when the run is encrypted, because that is
21
+ * how a real consumer calls it: `ScopeTargetConfig.encryption` exists so
22
+ * deletion can report what it removed rather than guessing at it.
23
+ */
24
+ scopeTargetFor(scope: ScopeDescriptor): ScopeTargetConfig;
25
+ reset(): Promise<void>;
26
+ /**
27
+ * Reach past the package and delete an artifact the way the operating
28
+ * system does when it reclaims storage. Each adapter supplies its own,
29
+ * because the suite cannot simulate this through the public API without
30
+ * asking the package to break its own guarantee.
31
+ */
32
+ removeArtifactBehindTheScenes(scopeKey: string, attachmentId: string): Promise<void>;
33
+ /** The other direction: a reference whose artifact survives. */
34
+ removeReferenceBehindTheScenes(scopeKey: string, attachmentId: string): Promise<void>;
35
+ };
36
+ export type ConformanceHooks = Pick<ConformanceContext, 'removeArtifactBehindTheScenes' | 'removeReferenceBehindTheScenes'>;
37
+ export type ConformanceOptions = {
38
+ /** Sections the adapter knowingly cannot satisfy, with a documented reason. */
39
+ skip?: ConformanceSection[];
40
+ /**
41
+ * Run every section against an encrypted database (FR-105).
42
+ *
43
+ * The suite is the contract, so the contract has to hold in both postures
44
+ * — an encrypted database that quietly behaved differently would be a
45
+ * second implementation nobody tested.
46
+ */
47
+ encryption?: EncryptionConfig | undefined;
48
+ };
49
+ export type ConformanceSection = 'records' | 'scopes' | 'queries' | 'transactions' | 'migrations' | 'lifecycle' | 'attachments' | 'encryption';
50
+ export declare const TEST_COLLECTIONS: DatabaseConfig['collections'];
51
+ export declare function makeConformanceContext(adapter: StorageAdapter, reset: () => Promise<void>, hooks: ConformanceHooks, defaults?: Partial<DatabaseConfig>): ConformanceContext;
52
+ /**
53
+ * Registers the whole suite against one adapter. Both adapters call this with
54
+ * the same arguments; any difference in outcome is a divergence that must be
55
+ * documented under FR-096 or fixed.
56
+ */
57
+ export declare function runConformanceSuite(factory: () => StorageAdapter, reset: () => Promise<void>, hooks: ConformanceHooks, options?: ConformanceOptions): void;
58
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/testing/conformance/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,0BAAuB,CAAC;AAC/E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAsB,CAAC;AAU5D,MAAM,MAAM,kBAAkB,GAAG;IAChC,OAAO,EAAE,cAAc,CAAC;IACxB,0EAA0E;IAC1E,SAAS,CAAC,KAAK,EAAE,eAAe,EAAE,SAAS,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,cAAc,CAAC;IACvF;;;;;;OAMG;IACH,cAAc,CAAC,KAAK,EAAE,eAAe,GAAG,iBAAiB,CAAC;IAC1D,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB;;;;;OAKG;IACH,6BAA6B,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrF,gEAAgE;IAChE,8BAA8B,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtF,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAClC,kBAAkB,EAClB,+BAA+B,GAAG,gCAAgC,CAClE,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAChC,+EAA+E;IAC/E,IAAI,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAC5B;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC;CAC1C,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAC3B,SAAS,GACT,QAAQ,GACR,SAAS,GACT,cAAc,GACd,YAAY,GACZ,WAAW,GACX,aAAa,GACb,YAAY,CAAC;AAEhB,eAAO,MAAM,gBAAgB,EAAE,cAAc,CAAC,aAAa,CAiB1D,CAAC;AAEF,wBAAgB,sBAAsB,CACrC,OAAO,EAAE,cAAc,EACvB,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,EAC1B,KAAK,EAAE,gBAAgB,EACvB,QAAQ,GAAE,OAAO,CAAC,cAAc,CAAM,GACpC,kBAAkB,CAwBpB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAClC,OAAO,EAAE,MAAM,cAAc,EAC7B,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,EAC1B,KAAK,EAAE,gBAAgB,EACvB,OAAO,GAAE,kBAAuB,GAC9B,IAAI,CA0BN"}
@@ -0,0 +1,4 @@
1
+ import type { ConformanceContext } from './index.js';
2
+ /** US6: sign-out retains; deletion happens only when asked, and only where asked. */
3
+ export declare function registerLifecycleConformance(context: ConformanceContext): void;
4
+ //# sourceMappingURL=lifecycle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../../../src/testing/conformance/lifecycle.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAS,CAAC;AAElD,qFAAqF;AACrF,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI,CA8F9E"}
@@ -0,0 +1,4 @@
1
+ import type { ConformanceContext } from './index.js';
2
+ /** US5: ordered, once-only migrations that fail loudly. */
3
+ export declare function registerMigrationConformance(context: ConformanceContext): void;
4
+ //# sourceMappingURL=migrations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../../../../src/testing/conformance/migrations.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAS,CAAC;AAElD,2DAA2D;AAC3D,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI,CA0K9E"}
@@ -0,0 +1,4 @@
1
+ import type { ConformanceContext } from './index.js';
2
+ /** US3: filter, sort, page, count — and paging that loses nothing. */
3
+ export declare function registerQueryConformance(context: ConformanceContext): void;
4
+ //# sourceMappingURL=queries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../../../src/testing/conformance/queries.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAS,CAAC;AAElD,sEAAsE;AACtE,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI,CAsM1E"}
@@ -0,0 +1,4 @@
1
+ import type { ConformanceContext } from './index.js';
2
+ /** US1: durable CRUD, and the four value conditions staying distinguishable. */
3
+ export declare function registerRecordConformance(context: ConformanceContext): void;
4
+ //# sourceMappingURL=records.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"records.d.ts","sourceRoot":"","sources":["../../../../../src/testing/conformance/records.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAS,CAAC;AAElD,gFAAgF;AAChF,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI,CAmK3E"}
@@ -0,0 +1,4 @@
1
+ import type { ConformanceContext } from './index.js';
2
+ /** US2: scope isolation, proven with unfiltered reads and colliding ids. */
3
+ export declare function registerScopeConformance(context: ConformanceContext): void;
4
+ //# sourceMappingURL=scopes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../../../../../src/testing/conformance/scopes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAS,CAAC;AAElD,4EAA4E;AAC5E,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI,CAiF1E"}
@@ -0,0 +1,4 @@
1
+ import type { ConformanceContext } from './index.js';
2
+ /** US4: all-or-nothing writes. */
3
+ export declare function registerTransactionConformance(context: ConformanceContext): void;
4
+ //# sourceMappingURL=transactions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../../../../../src/testing/conformance/transactions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAS,CAAC;AAElD,kCAAkC;AAClC,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI,CA+IhF"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Fault injection, exposed only through the `./testing` entrypoint.
3
+ *
4
+ * Produces the same typed errors the on-device implementation produces, so a
5
+ * consumer can test its recovery paths without a device that is actually out
6
+ * of space or actually corrupt (FR-095). The registry itself lives in
7
+ * `diagnostics/faults.ts`, because the *checks* have to run in production code
8
+ * for the demo app's panel to exercise the real adapter — only the ability to
9
+ * arm one is kept behind this entrypoint.
10
+ */
11
+ export { activeFaults, clearFaults, injectFault, throwIfFaulted, type FaultPoint, type FaultSpec, } from '../diagnostics/faults.js';
12
+ export { DiagnosticCodes } from '../contract/errors.js';
13
+ //# sourceMappingURL=faults.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"faults.d.ts","sourceRoot":"","sources":["../../../../src/testing/faults.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACN,YAAY,EACZ,WAAW,EACX,WAAW,EACX,cAAc,EACd,KAAK,UAAU,EACf,KAAK,SAAS,GACd,MAAM,0BAAuB,CAAC;AAE/B,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAoB,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * `@chipmobilesdk/rn-local-db/testing`
3
+ *
4
+ * Test-only surface, kept behind its own entrypoint so the in-memory engine
5
+ * never reaches a consuming app's production bundle (research.md R10).
6
+ */
7
+ export { createMemoryAdapter, type MemoryAdapterOptions } from './memory-adapter/index.js';
8
+ export { memoryConformanceHooks, resetMemoryAdapter, seedRecords } from './memory-adapter/reset.js';
9
+ export { clearFaults, injectFault, type FaultPoint, type FaultSpec } from './faults.js';
10
+ /** Makes `openDatabase` and the deletion functions use the given adapter; `null` restores the device one. */
11
+ export { setStorageAdapter } from '../adapter/index.js';
12
+ export { runConformanceSuite, type ConformanceContext, type ConformanceHooks, type ConformanceOptions, type ConformanceSection, } from './conformance/index.js';
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/testing/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,mBAAmB,EAAE,KAAK,oBAAoB,EAAE,MAAM,2BAAkB,CAAC;AAClF,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,2BAAwB,CAAC;AACjG,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,aAAU,CAAC;AACrF,6GAA6G;AAC7G,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAY,CAAC;AAC/C,OAAO,EACN,mBAAmB,EACnB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,GACvB,MAAM,wBAAe,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * The in-memory adapter's attachments (FR-091).
3
+ *
4
+ * The same surface the SQLite adapter exposes, over the store's maps: written
5
+ * whole rather than chunked, no filesystem, and a `sourcePath` read through the
6
+ * `readSourceFile` option a test supplies. Divergences are documented in the
7
+ * package README.
8
+ */
9
+ import type { Attachments } from '../../contract/adapter.js';
10
+ import type { MemoryScopeStore } from './store.js';
11
+ import type { MemoryAdapterOptions } from './index.js';
12
+ /** What one artifact removal has to wait for: the transaction that caused it. */
13
+ export interface Deferred {
14
+ add(id: string): void;
15
+ }
16
+ export interface MemoryAttachmentDeps {
17
+ store: MemoryScopeStore;
18
+ options: MemoryAdapterOptions;
19
+ now: () => number;
20
+ assertOpen: () => void;
21
+ }
22
+ export declare function createMemoryAttachments(deps: MemoryAttachmentDeps): (deferred?: Deferred) => Attachments;
23
+ //# sourceMappingURL=attachments.d.ts.map