@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,30 @@
1
+ /**
2
+ * Android backup posture: verified and reported, never enforced.
3
+ *
4
+ * Android decides backup participation from `android:dataExtractionRules` in
5
+ * the app's manifest. That is build-time and app-owned, and this package
6
+ * authors no native code, so it cannot contribute an entry and cannot change
7
+ * the answer at runtime (research.md R5).
8
+ *
9
+ * What it can do is check the one thing that silently breaks the documented
10
+ * fix: the rule the README tells an app to ship addresses the `file` domain,
11
+ * which is the app's `files/` directory. If the managed root did not land
12
+ * under that directory, the app can ship the XML exactly as documented and
13
+ * still have an unprotected database. That mismatch is detectable here, and
14
+ * an app learning it from this report is the whole point of FR-111 — the
15
+ * alternative is learning it from an incident.
16
+ */
17
+ import type { EffectivePosture } from '../contract/backup.js';
18
+ import { type StorageLayout } from './location.js';
19
+ export declare function isAndroid(): boolean;
20
+ /** The `path` an app's exclusion rule must name for the root it actually got. */
21
+ export declare function coveragePathFor(layout: StorageLayout): string | null;
22
+ export declare function androidPosture(layout: StorageLayout, includeInPlatformBackup: boolean): EffectivePosture;
23
+ /**
24
+ * The posture the handle reports (FR-111).
25
+ *
26
+ * Split by platform rather than smoothed over, because a consumer writing a
27
+ * privacy disclosure needs to know which of the two answers it is holding.
28
+ */
29
+ export declare function effectivePostureFor(layout: StorageLayout, includeInPlatformBackup: boolean, iosPostureFor: (include: boolean) => EffectivePosture): EffectivePosture;
30
+ //# sourceMappingURL=backup-android-verify.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backup-android-verify.d.ts","sourceRoot":"","sources":["../../../../src/platform/backup-android-verify.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAoB,CAAC;AAC3D,OAAO,EAAoC,KAAK,aAAa,EAAE,MAAM,eAAY,CAAC;AAElF,wBAAgB,SAAS,IAAI,OAAO,CAEnC;AAED,iFAAiF;AACjF,wBAAgB,eAAe,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,GAAG,IAAI,CAQpE;AAED,wBAAgB,cAAc,CAC7B,MAAM,EAAE,aAAa,EACrB,uBAAuB,EAAE,OAAO,GAC9B,gBAAgB,CA8BlB;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAClC,MAAM,EAAE,aAAa,EACrB,uBAAuB,EAAE,OAAO,EAChC,aAAa,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,gBAAgB,GACnD,gBAAgB,CAKlB"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * iOS backup exclusion.
3
+ *
4
+ * `NSURLIsExcludedFromBackupKey` is set on the managed root at creation, and
5
+ * the attribute is inherited by everything beneath it — so one call covers
6
+ * the catalog, every scope database, and every artifact, including ones
7
+ * created years later. Setting it per file would leave a window in which a
8
+ * freshly written artifact is backed up before the attribute lands.
9
+ *
10
+ * This is the half of FR-109 the package can actually enforce. Android is
11
+ * manifest-owned; see backup-android-verify.ts and research.md R5.
12
+ */
13
+ import type { EffectivePosture } from '../contract/backup.js';
14
+ import type { StorageLayout } from './location.js';
15
+ export declare function isIos(): boolean;
16
+ /**
17
+ * Create the managed root with the exclusion attribute already on it.
18
+ *
19
+ * Idempotent: `mkdir` on an existing directory re-applies the attribute,
20
+ * which matters because an app that flips the posture between launches must
21
+ * get the new one without a reinstall.
22
+ */
23
+ export declare function ensureManagedRoot(layout: StorageLayout, includeInPlatformBackup: boolean): Promise<void>;
24
+ /** What the package can state about iOS, where it enforces rather than reports. */
25
+ export declare function iosPosture(includeInPlatformBackup: boolean): EffectivePosture;
26
+ //# sourceMappingURL=backup-ios.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backup-ios.d.ts","sourceRoot":"","sources":["../../../../src/platform/backup-ios.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAoB,CAAC;AAE3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAY,CAAC;AAEhD,wBAAgB,KAAK,IAAI,OAAO,CAE/B;AAED;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACtC,MAAM,EAAE,aAAa,EACrB,uBAAuB,EAAE,OAAO,GAC9B,OAAO,CAAC,IAAI,CAAC,CAKf;AAED,mFAAmF;AACnF,wBAAgB,UAAU,CAAC,uBAAuB,EAAE,OAAO,GAAG,gBAAgB,CAO7E"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Byte handling without Node's `Buffer`.
3
+ *
4
+ * Hermes has no global `Buffer`, and `react-native-quick-crypto` installs one
5
+ * only when the app calls its `install()` — which nothing in this package or its
6
+ * documentation asked for. Until 0.2.0 attachment writes and reads used the
7
+ * global anyway, so on a device every attachment operation threw. Everything
8
+ * here is plain `Uint8Array` and a self-contained base64 codec, identical on
9
+ * Hermes and in Node.
10
+ */
11
+ /**
12
+ * Codecs Hermes and Node provide but React Native's type declarations omit.
13
+ * Read through this view so the package type-checks without DOM or Node types.
14
+ */
15
+ interface HostCodecs {
16
+ atob?: (data: string) => string;
17
+ btoa?: (data: string) => string;
18
+ TextEncoder?: new () => {
19
+ encode(input: string): Uint8Array;
20
+ };
21
+ TextDecoder?: new () => {
22
+ decode(input: Uint8Array): string;
23
+ };
24
+ }
25
+ export declare const host: HostCodecs;
26
+ export declare function base64ToBytes(base64: string): Uint8Array;
27
+ export declare function bytesToBase64(bytes: Uint8Array): string;
28
+ /** UTF-8 encoding. `TextEncoder` is in Hermes and Node; the loop is the fallback. */
29
+ export declare function utf8Bytes(value: string): Uint8Array;
30
+ /** UTF-8 decoding, the inverse of `utf8Bytes`. */
31
+ export declare function utf8String(bytes: Uint8Array): string;
32
+ export declare function concatBytes(parts: readonly Uint8Array[]): Uint8Array;
33
+ /** The ASCII text of `length` bytes from `start`, for magic numbers. */
34
+ export declare function asciiAt(bytes: Uint8Array, start: number, length: number): string;
35
+ export {};
36
+ //# sourceMappingURL=bytes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bytes.d.ts","sourceRoot":"","sources":["../../../../src/platform/bytes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAcH;;;GAGG;AACH,UAAU,UAAU;IACnB,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAChC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAChC,WAAW,CAAC,EAAE,UAAU;QAAE,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAAA;KAAE,CAAC;IAC9D,WAAW,CAAC,EAAE,UAAU;QAAE,MAAM,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAAA;KAAE,CAAC;CAC9D;AAED,eAAO,MAAM,IAAI,EAA4B,UAAU,CAAC;AAOxD,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAkCxD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAgCvD;AAED,qFAAqF;AACrF,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAUnD;AAED,kDAAkD;AAClD,wBAAgB,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CASpD;AAID,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,UAAU,EAAE,GAAG,UAAU,CASpE;AAED,wEAAwE;AACxE,wBAAgB,OAAO,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAMhF"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * The filesystem peer, behind one lazy accessor.
3
+ *
4
+ * Required lazily for the same reason the engine is: a consuming app that
5
+ * only ever runs the in-memory adapter in tests must not have to install a
6
+ * native module to import this package. Confining the require to `platform/`
7
+ * also keeps the native surface four directories wide, which is the layering
8
+ * rule the ESLint config enforces.
9
+ */
10
+ export type FileStat = {
11
+ path: string;
12
+ size: number;
13
+ mtime: number;
14
+ isFile(): boolean;
15
+ isDirectory(): boolean;
16
+ };
17
+ export type MkdirOptions = {
18
+ /** iOS only. Set at creation so nothing beneath it is ever backed up. */
19
+ NSURLIsExcludedFromBackupKey?: boolean;
20
+ };
21
+ /**
22
+ * Only what the package actually uses. The peer's upload and download
23
+ * helpers are deliberately absent from this type: the package must never
24
+ * make a network request (FR-084, SC-016), and a surface that cannot express
25
+ * one is a stronger guarantee than a rule that says not to.
26
+ */
27
+ export type FileSystem = {
28
+ DocumentDirectoryPath: string;
29
+ mkdir(path: string, options?: MkdirOptions): Promise<void>;
30
+ writeFile(path: string, contents: string, encoding?: string): Promise<void>;
31
+ appendFile(path: string, contents: string, encoding?: string): Promise<void>;
32
+ readFile(path: string, encoding?: string): Promise<string>;
33
+ /** Chunked read at an offset — what FR-107a's flat memory bound rests on. */
34
+ read(path: string, length: number, position: number, encoding?: string): Promise<string>;
35
+ /** One native call, no bytes through JS: how an unencrypted file becomes an artifact. */
36
+ copyFile(from: string, into: string): Promise<void>;
37
+ stat(path: string): Promise<FileStat>;
38
+ readdir(path: string): Promise<string[]>;
39
+ unlink(path: string): Promise<void>;
40
+ exists(path: string): Promise<boolean>;
41
+ };
42
+ /** Swap the peer. Tests and the demo app's in-memory mode only; `null` restores it. */
43
+ export declare function setFileSystem(module: FileSystem | null): void;
44
+ export declare function fileSystem(): FileSystem;
45
+ /** Remove a path, treating "already gone" as success (FR-062). */
46
+ export declare function removeIfPresent(path: string): Promise<boolean>;
47
+ //# sourceMappingURL=fs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../../../src/platform/fs.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH,MAAM,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,IAAI,OAAO,CAAC;IAClB,WAAW,IAAI,OAAO,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IAC1B,yEAAyE;IACzE,4BAA4B,CAAC,EAAE,OAAO,CAAC;CACvC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG;IACxB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3D,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5E,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7E,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC3D,6EAA6E;IAC7E,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACzF,yFAAyF;IACzF,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IACtC,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACzC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACvC,CAAC;AAYF,uFAAuF;AACvF,wBAAgB,aAAa,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,GAAG,IAAI,CAE7D;AAED,wBAAgB,UAAU,IAAI,UAAU,CAQvC;AAED,kEAAkE;AAClE,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAOpE"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * The managed storage area, and the single guard every filesystem call routes
3
+ * through.
4
+ *
5
+ * POL-011(b) flags media-and-files as a risk because this package deletes
6
+ * files from disk on cascade. The mitigation is that there is exactly one
7
+ * function that turns a caller's intent into a path, and it refuses anything
8
+ * outside the root. One choke point is what makes SC-013a's filesystem
9
+ * tracing pass reliably rather than usually.
10
+ */
11
+ export declare const MANAGED_ROOT_NAME = "chipmobilesdk-localdb";
12
+ export declare const CATALOG_FILE = "catalog.db";
13
+ export declare const SCOPES_DIR = "scopes";
14
+ export declare const DATA_FILE = "data.db";
15
+ export declare const ARTIFACTS_DIR = "artifacts";
16
+ /** Normalize separators and collapse redundant segments. No `..` survives. */
17
+ export declare function normalizePath(path: string): string;
18
+ export type StorageLayout = {
19
+ /** Absolute path to the managed root for one logical database. */
20
+ root: string;
21
+ catalogPath: string;
22
+ scopePath(scopeKey: string): string;
23
+ scopeDataPath(scopeKey: string): string;
24
+ scopeArtifactsPath(scopeKey: string): string;
25
+ artifactPath(scopeKey: string, attachmentId: string): string;
26
+ };
27
+ /**
28
+ * An attachment id must be a safe single path segment.
29
+ *
30
+ * Shared by both adapters rather than left to the one that touches a
31
+ * filesystem. The in-memory adapter has no paths to escape, but a consumer
32
+ * whose tests accept `../../etc/passwd` and whose device build refuses it has
33
+ * a test suite that stops predicting the device — which is the one thing the
34
+ * adapter exists to avoid (FR-096).
35
+ */
36
+ export declare function assertValidAttachmentId(attachmentId: string): void;
37
+ export declare function createLayout(documentDirectory: string, databaseName: string): StorageLayout;
38
+ /**
39
+ * The layout for one logical database, rooted at the app's private documents
40
+ * directory.
41
+ *
42
+ * Resolved lazily through the filesystem peer rather than captured at module
43
+ * load, so importing this package does not require the peer to be installed —
44
+ * a consumer running only the in-memory adapter never reaches this function.
45
+ */
46
+ export declare function layoutFor(databaseName: string): StorageLayout;
47
+ /**
48
+ * The guard. Every read, write, and delete passes through this, and anything
49
+ * resolving outside the managed root is refused before it reaches the
50
+ * filesystem (FR-073, FR-073f).
51
+ */
52
+ export declare function assertWithinManagedArea(layout: StorageLayout, candidate: string): string;
53
+ //# sourceMappingURL=location.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"location.d.ts","sourceRoot":"","sources":["../../../../src/platform/location.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,eAAO,MAAM,iBAAiB,0BAA0B,CAAC;AACzD,eAAO,MAAM,YAAY,eAAe,CAAC;AACzC,eAAO,MAAM,UAAU,WAAW,CAAC;AACnC,eAAO,MAAM,SAAS,YAAY,CAAC;AACnC,eAAO,MAAM,aAAa,cAAc,CAAC;AAEzC,8EAA8E;AAC9E,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAelD;AAED,MAAM,MAAM,aAAa,GAAG;IAC3B,kEAAkE;IAClE,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IACpC,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IACxC,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7C,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;CAC7D,CAAC;AAWF;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAMlE;AAED,wBAAgB,YAAY,CAAC,iBAAiB,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,aAAa,CA0B3F;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,YAAY,EAAE,MAAM,GAAG,aAAa,CAE7D;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAWxF"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Budget enforcement.
3
+ *
4
+ * Per-record size, page size, and batch size are HARD limits reported through
5
+ * typed errors (FR-088a). The rest are soft: exceeding them must not crash,
6
+ * hang, or drop data silently, and the degraded behavior is documented.
7
+ */
8
+ import type { StorableRecordData } from '../contract/record.js';
9
+ /**
10
+ * UTF-8 length of a string, counted rather than encoded: measuring a 256 KB
11
+ * record used to allocate a 256 KB byte array just to read its length.
12
+ */
13
+ export declare function utf8Length(value: string): number;
14
+ /** UTF-8 byte length of the serialized payload — what actually hits disk. */
15
+ export declare function serializedSize(data: StorableRecordData): number;
16
+ /**
17
+ * Checks the size budget and returns the serialized payload, so the write that
18
+ * follows stores this string instead of serializing the record a second time.
19
+ */
20
+ export declare function assertRecordWithinBudget(collection: string, data: StorableRecordData): string;
21
+ export declare function assertBatchWithinBudget(count: number): void;
22
+ export declare function assertArtifactWithinBudget(id: string, size: number): void;
23
+ //# sourceMappingURL=budgets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"budgets.d.ts","sourceRoot":"","sources":["../../../../src/query/budgets.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAoB,CAAC;AAG7D;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAiBhD;AAED,6EAA6E;AAC7E,wBAAgB,cAAc,CAAC,IAAI,EAAE,kBAAkB,GAAG,MAAM,CAE/D;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,GAAG,MAAM,CAa7F;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAO3D;AAED,wBAAgB,0BAA0B,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAWzE"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Comparison and field access semantics.
3
+ *
4
+ * Defined once here, used by the in-memory adapter directly and by the SQL
5
+ * builder for validation and cursor construction. Two implementations of
6
+ * these rules would drift, and the drift would show up as a conformance
7
+ * divergence that hides a real bug (research.md R8).
8
+ */
9
+ import type { FilterValue } from '../contract/query.js';
10
+ import type { StorableRecordData, StorableValue } from '../contract/record.js';
11
+ /**
12
+ * A field is one of three things, and the difference is the whole point of
13
+ * FR-019: present with a value, present and null, or absent.
14
+ */
15
+ export type FieldLookup = {
16
+ present: true;
17
+ value: Exclude<StorableValue, null>;
18
+ } | {
19
+ present: true;
20
+ value: null;
21
+ } | {
22
+ present: false;
23
+ };
24
+ export declare function lookupField(data: StorableRecordData, field: string): FieldLookup;
25
+ /**
26
+ * Ordering for values of the same declared type.
27
+ *
28
+ * Null sorts before every non-null value, matching SQLite's default so the
29
+ * two adapters agree without the SQL builder emitting NULLS FIRST/LAST
30
+ * clauses that older SQLite versions do not support.
31
+ */
32
+ export declare function compareValues(a: FilterValue, b: FilterValue): number;
33
+ /** Only primitives can be compared; a nested object is never a filter target. */
34
+ export declare function asFilterValue(value: StorableValue): FilterValue | undefined;
35
+ /**
36
+ * Byte order, not locale collation.
37
+ *
38
+ * A locale-aware sort would make the reported order depend on device
39
+ * settings, so two phones holding identical data would report it differently.
40
+ */
41
+ export declare function byteOrder(a: string, b: string): number;
42
+ //# sourceMappingURL=compare.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compare.d.ts","sourceRoot":"","sources":["../../../../src/query/compare.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,uBAAoB,CAAC;AAE5E;;;GAGG;AACH,MAAM,MAAM,WAAW,GACpB;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,OAAO,CAAC,aAAa,EAAE,IAAI,CAAC,CAAA;CAAE,GACtD;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,IAAI,CAAA;CAAE,GAC9B;IAAE,OAAO,EAAE,KAAK,CAAA;CAAE,CAAC;AAEtB,wBAAgB,WAAW,CAAC,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,GAAG,WAAW,CAShF;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,GAAG,MAAM,CAyBpE;AAED,iFAAiF;AACjF,wBAAgB,aAAa,CAAC,KAAK,EAAE,aAAa,GAAG,WAAW,GAAG,SAAS,CAU3E;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAKtD"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Keyset pagination cursors.
3
+ *
4
+ * Keyset rather than OFFSET for two reasons, both of which SC-007 measures:
5
+ * OFFSET degrades linearly at the 100,000-record budget because the engine
6
+ * still walks the skipped rows, and it shifts pages under concurrent writes
7
+ * so a record can be skipped or returned twice. A cursor anchored to the last
8
+ * row's sort values has neither problem.
9
+ */
10
+ import type { FilterValue, SortKey } from '../contract/query.js';
11
+ import type { StoredRecord } from '../contract/record.js';
12
+ export type CursorPayload = {
13
+ /** Sort key fields and directions, so a cursor cannot be reused across shapes. */
14
+ k: string;
15
+ /** The last row's values, in sort-key order. */
16
+ v: FilterValue[];
17
+ };
18
+ export declare function encodeCursor(record: StoredRecord, sort: SortKey[]): string;
19
+ export declare function decodeCursor(cursor: string, sort: SortKey[]): FilterValue[];
20
+ /**
21
+ * Is this record strictly after the cursor position, under the sort order?
22
+ *
23
+ * Lexicographic across the sort keys: equal on the first key means the second
24
+ * decides, and so on down to the id tiebreaker that guarantees a total order.
25
+ */
26
+ export declare function isAfterCursor(record: StoredRecord, sort: SortKey[], anchor: FilterValue[]): boolean;
27
+ //# sourceMappingURL=cursor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../../../src/query/cursor.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,sBAAmB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAoB,CAAC;AAMvD,MAAM,MAAM,aAAa,GAAG;IAC3B,kFAAkF;IAClF,CAAC,EAAE,MAAM,CAAC;IACV,gDAAgD;IAChD,CAAC,EAAE,WAAW,EAAE,CAAC;CACjB,CAAC;AAoBF,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,MAAM,CAM1E;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,WAAW,EAAE,CAqB3E;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAC5B,MAAM,EAAE,YAAY,EACpB,IAAI,EAAE,OAAO,EAAE,EACf,MAAM,EAAE,WAAW,EAAE,GACnB,OAAO,CAeT"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Filter evaluation over a plain record.
3
+ *
4
+ * The in-memory adapter runs this directly. The SQLite adapter translates the
5
+ * same validated tree to SQL. Both must agree, which is why the semantics
6
+ * live here rather than in either of them.
7
+ */
8
+ import type { FilterNode } from '../contract/query.js';
9
+ import type { StorableRecordData } from '../contract/record.js';
10
+ export declare function evaluateFilter(data: StorableRecordData, node: FilterNode): boolean;
11
+ //# sourceMappingURL=filter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../../../src/query/filter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAe,MAAM,sBAAmB,CAAC;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAoB,CAAC;AAO7D,wBAAgB,cAAc,CAAC,IAAI,EAAE,kBAAkB,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAiElF"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Page assembly over already-filtered, already-sorted records.
3
+ *
4
+ * Shared so the in-memory adapter and the SQLite adapter produce identical
5
+ * pages, including the `hasMore` signal and when a cursor is emitted.
6
+ */
7
+ import type { PageRequest, ResultPage, SortKey } from '../contract/query.js';
8
+ import type { StorableRecordData, StoredRecord } from '../contract/record.js';
9
+ export declare const DEFAULT_PAGE_SIZE = 50;
10
+ export declare function resolvePageSize(page: PageRequest | undefined): number;
11
+ /** Fetch one extra row to answer `hasMore` without a second count query. */
12
+ export declare function fetchLimitFor(size: number): number;
13
+ export declare function applyCursor<T extends StoredRecord>(records: T[], sort: SortKey[], cursor: string | undefined): T[];
14
+ export declare function buildPage<T extends StorableRecordData>(records: StoredRecord<T>[], sort: SortKey[], size: number): ResultPage<T>;
15
+ //# sourceMappingURL=paginate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paginate.d.ts","sourceRoot":"","sources":["../../../../src/query/paginate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,sBAAmB,CAAC;AAC1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,uBAAoB,CAAC;AAG3E,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,wBAAgB,eAAe,CAAC,IAAI,EAAE,WAAW,GAAG,SAAS,GAAG,MAAM,CAErE;AAED,4EAA4E;AAC5E,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAElD;AAED,wBAAgB,WAAW,CAAC,CAAC,SAAS,YAAY,EACjD,OAAO,EAAE,CAAC,EAAE,EACZ,IAAI,EAAE,OAAO,EAAE,EACf,MAAM,EAAE,MAAM,GAAG,SAAS,GACxB,CAAC,EAAE,CAML;AAED,wBAAgB,SAAS,CAAC,CAAC,SAAS,kBAAkB,EACrD,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,EAC1B,IAAI,EAAE,OAAO,EAAE,EACf,IAAI,EAAE,MAAM,GACV,UAAU,CAAC,CAAC,CAAC,CAWf"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Sort ordering.
3
+ *
4
+ * The record id is always appended as the final sort key (FR-031). Without a
5
+ * tiebreaker, records with equal sort values come back in whatever order the
6
+ * engine happens to produce, which makes keyset pagination lose or repeat
7
+ * rows — the exact failure SC-007 forbids.
8
+ */
9
+ import type { SortKey } from '../contract/query.js';
10
+ import type { StoredRecord } from '../contract/record.js';
11
+ import { asFilterValue } from './compare.js';
12
+ export declare const ID_SORT_KEY: SortKey;
13
+ /** Append `id ASC` unless the caller already sorted by it. */
14
+ export declare function withStableTiebreaker(sort: SortKey[] | undefined): SortKey[];
15
+ /** Sort values come from the record id or from a declared field. */
16
+ export declare function sortValueOf(record: StoredRecord, field: string): ReturnType<typeof asFilterValue>;
17
+ export declare function compareRecords(a: StoredRecord, b: StoredRecord, sort: SortKey[]): number;
18
+ export declare function sortRecords<T extends StoredRecord>(records: T[], sort: SortKey[]): T[];
19
+ //# sourceMappingURL=sort.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sort.d.ts","sourceRoot":"","sources":["../../../../src/query/sort.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAmB,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAoB,CAAC;AACvD,OAAO,EAAE,aAAa,EAA8B,MAAM,cAAW,CAAC;AAEtE,eAAO,MAAM,WAAW,EAAE,OAA2C,CAAC;AAEtE,8DAA8D;AAC9D,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,SAAS,GAAG,OAAO,EAAE,CAM3E;AAED,oEAAoE;AACpE,wBAAgB,WAAW,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAWjG;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,MAAM,CAYxF;AAED,wBAAgB,WAAW,CAAC,CAAC,SAAS,YAAY,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,CAEtF"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Query validation, run before any SQL is built.
3
+ *
4
+ * Two things fall out of validating first: FR-034 is satisfied, and no
5
+ * consumer-supplied string ever reaches SQL construction — field names are
6
+ * resolved through the schema to a known column, and values bind as
7
+ * parameters. Injection stops being a thing to remember.
8
+ */
9
+ import type { FilterNode, Query, SortKey } from '../contract/query.js';
10
+ import type { CollectionSchema } from '../contract/schema.js';
11
+ export declare function validateFilter(collection: CollectionSchema, node: FilterNode): void;
12
+ export declare function validateSort(collection: CollectionSchema, sort: SortKey[]): void;
13
+ export declare function validatePageSize(size: number): void;
14
+ export declare function validateQuery(collection: CollectionSchema, query: Query | undefined): void;
15
+ //# sourceMappingURL=validate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../src/query/validate.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAe,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAmB,CAAC;AACjF,OAAO,KAAK,EAAE,gBAAgB,EAAa,MAAM,uBAAoB,CAAC;AA0CtE,wBAAgB,cAAc,CAAC,UAAU,EAAE,gBAAgB,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI,CA8EnF;AAED,wBAAgB,YAAY,CAAC,UAAU,EAAE,gBAAgB,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAYhF;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAOnD;AAED,wBAAgB,aAAa,CAAC,UAAU,EAAE,gBAAgB,EAAE,KAAK,EAAE,KAAK,GAAG,SAAS,GAAG,IAAI,CAa1F"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Schema lookup helpers shared by both adapters.
3
+ *
4
+ * Declaring a field makes it queryable — it does not restrict what a record
5
+ * may contain. `isQueryable` is the single answer to "may a filter or sort
6
+ * reference this?", so both adapters reject the same field names (FR-034).
7
+ */
8
+ import type { CollectionSchema, FieldDeclaration } from '../contract/schema.js';
9
+ export type SchemaIndex = ReadonlyMap<string, CollectionSchema>;
10
+ export declare function indexSchemas(collections: CollectionSchema[]): SchemaIndex;
11
+ export declare function fieldOf(collection: CollectionSchema, name: string): FieldDeclaration | undefined;
12
+ export declare function isQueryable(collection: CollectionSchema, name: string): boolean;
13
+ export declare function hasSoftDelete(collection: CollectionSchema): boolean;
14
+ export declare function hasTimestamps(collection: CollectionSchema): boolean;
15
+ /** Column name for a projected queryable field. Prefixed to avoid colliding
16
+ * with the reserved columns (`id`, `payload`, `created_at`, ...). */
17
+ export declare function projectedColumn(field: string): string;
18
+ /** Table name for a collection, prefixed for the same reason. */
19
+ export declare function collectionTable(name: string): string;
20
+ //# sourceMappingURL=declare.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"declare.d.ts","sourceRoot":"","sources":["../../../../src/schema/declare.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,uBAAoB,CAAC;AAE7E,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;AAEhE,wBAAgB,YAAY,CAAC,WAAW,EAAE,gBAAgB,EAAE,GAAG,WAAW,CAEzE;AAED,wBAAgB,OAAO,CAAC,UAAU,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS,CAEhG;AAED,wBAAgB,WAAW,CAAC,UAAU,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAE/E;AAED,wBAAgB,aAAa,CAAC,UAAU,EAAE,gBAAgB,GAAG,OAAO,CAEnE;AAED,wBAAgB,aAAa,CAAC,UAAU,EAAE,gBAAgB,GAAG,OAAO,CAEnE;AAED;qEACqE;AACrE,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAErD;AAED,iEAAiE;AACjE,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEpD"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Configuration validation.
3
+ *
4
+ * Runs to completion before any write and before any migration executes
5
+ * (FR-006, FR-053). Order matters: scope first, then collections, then the
6
+ * migration chain — so a consumer fixes the outermost problem first rather
7
+ * than chasing a downstream symptom.
8
+ */
9
+ import { type DatabaseConfig } from '../contract/config.js';
10
+ export declare function validateConfig(config: DatabaseConfig): void;
11
+ //# sourceMappingURL=validate-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-config.d.ts","sourceRoot":"","sources":["../../../../src/schema/validate-config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,uBAAoB,CAAC;AAiElE,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAiC3D"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Scope key derivation.
3
+ *
4
+ * The directory a scope lives in is named by the SHA-256 digest of its
5
+ * canonical descriptor, never by the components themselves. FR-014 requires
6
+ * scope components be treated as sensitive, and a directory named after an
7
+ * email address puts that address in plaintext on disk — visible even when
8
+ * the database itself is encrypted, and carried into any crash report that
9
+ * includes a file path.
10
+ *
11
+ * Hashing also removes filesystem charset and length limits from the problem,
12
+ * which is what lets validation reject rather than sanitize (research.md R2).
13
+ *
14
+ * Implemented in pure TypeScript rather than over a native crypto peer so the
15
+ * scope layer stays importable from anywhere in the package, including the
16
+ * in-memory adapter running under Jest.
17
+ *
18
+ * Verified against Node's own SHA-256 in scope-resolution.test.ts — a wrong
19
+ * digest would silently merge or split scopes, so it is checked against a
20
+ * reference implementation rather than against a snapshot of this one.
21
+ */
22
+ export declare function utf8ByteLength(input: string): number;
23
+ export declare function sha256Hex(input: string): string;
24
+ //# sourceMappingURL=hash.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hash.d.ts","sourceRoot":"","sources":["../../../../src/scope/hash.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAgDH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CA0D/C"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Scope descriptor normalization.
3
+ *
4
+ * The package normalizes and validates; it never repairs. A component it
5
+ * cannot represent safely is an error (FR-013), because silently sanitizing
6
+ * one is how two different descriptors end up sharing a directory — which
7
+ * would be a cross-scope leak dressed up as a convenience.
8
+ */
9
+ import type { ScopeDescriptor, ScopeKind } from '../contract/scope.js';
10
+ /**
11
+ * Separates components in the canonical form.
12
+ *
13
+ * NUL rather than a printable character: a component containing the separator
14
+ * could forge another descriptor's canonical string, and every printable
15
+ * candidate occurs in legitimate identity data. Tenant names contain spaces,
16
+ * identifiers contain colons and slashes, emails contain "@" and ".". NUL
17
+ * occurs in none of them, so reserving it costs consumers nothing.
18
+ */
19
+ export declare const COMPONENT_SEPARATOR = "\0";
20
+ /**
21
+ * Control characters are rejected wholesale rather than only the separator.
22
+ * They have no place in an identity component, and they would be trouble in a
23
+ * log line or a diagnostic even where they could not forge a canonical
24
+ * string.
25
+ */
26
+ export declare const CONTROL_CHARACTER: RegExp;
27
+ export declare const MAX_COMPONENT_BYTES = 512;
28
+ /** Fixed order, so the canonical form is stable across callers. */
29
+ export declare const COMPONENT_ORDER: readonly ["kind", "id", "tenant", "app", "environment", "namespace"];
30
+ export declare const SCOPE_KINDS: readonly ScopeKind[];
31
+ /**
32
+ * NFC, trimmed, case preserved.
33
+ *
34
+ * Case is preserved deliberately: the package does not know whether a
35
+ * consumer's identity system is case-sensitive, and folding case would merge
36
+ * two scopes the app considers distinct.
37
+ */
38
+ export declare function normalizeComponent(value: string): string;
39
+ export type NormalizedScope = {
40
+ kind: ScopeKind;
41
+ components: Record<string, string>;
42
+ canonical: string;
43
+ };
44
+ /** Normalize without validating. Callers must validate first. */
45
+ export declare function normalizeDescriptor(descriptor: ScopeDescriptor): NormalizedScope;
46
+ //# sourceMappingURL=normalize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../../../src/scope/normalize.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,sBAAmB,CAAC;AAEpE;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,OAAW,CAAC;AAE5C;;;;;GAKG;AAEH,eAAO,MAAM,iBAAiB,QAA0B,CAAC;AAEzD,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC,mEAAmE;AACnE,eAAO,MAAM,eAAe,sEAAuE,CAAC;AAEpG,eAAO,MAAM,WAAW,EAAE,SAAS,SAAS,EAM3C,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAExD;AAED,MAAM,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,SAAS,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,SAAS,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,iEAAiE;AACjE,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,eAAe,GAAG,eAAe,CAoBhF"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Scope validation and resolution.
3
+ *
4
+ * Validate, never repair (FR-013). The package never invents, derives, or
5
+ * defaults an identity of its own (FR-008).
6
+ */
7
+ import type { ResolvedScope, ScopeDescriptor } from '../contract/scope.js';
8
+ export declare function validateDescriptor(descriptor: ScopeDescriptor | undefined | null): void;
9
+ /**
10
+ * Deterministic: identical descriptors always resolve to the same scope, and
11
+ * descriptors differing in any component always resolve to different ones
12
+ * (FR-010).
13
+ */
14
+ export declare function resolveScope(descriptor: ScopeDescriptor): ResolvedScope;
15
+ //# sourceMappingURL=validate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../src/scope/validate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,sBAAmB,CAAC;AAqCxE,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,eAAe,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,CAuBvF;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,eAAe,GAAG,aAAa,CAOvE"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * The on-device adapter.
3
+ *
4
+ * Deliberately a seam rather than an implementation. Everything it composes
5
+ * lives in `adapter/`, `migration/`, `artifacts/`, and this directory, so the
6
+ * in-memory adapter can be held to the same contract by the same conformance
7
+ * suite (FR-092) without either one being the "real" version the other
8
+ * approximates.
9
+ *
10
+ * Reached only through the lazy require in `adapter/index.ts`, so a consumer
11
+ * that runs the in-memory adapter in tests never loads the native peers.
12
+ */
13
+ import type { StorageAdapter } from '../contract/adapter.js';
14
+ import { type OpenOptions } from '../adapter/lifecycle.js';
15
+ export declare function createSqliteAdapter(options?: OpenOptions): StorageAdapter;
16
+ //# sourceMappingURL=adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/sqlite/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAqB,CAAC;AAE1D,OAAO,EAAsB,KAAK,WAAW,EAAE,MAAM,yBAAsB,CAAC;AAE5E,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,WAAgB,GAAG,cAAc,CAQ7E"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Batch writes: many operations, one atomic unit, one outcome (FR-028).
3
+ *
4
+ * Every statement is resolved before any of them runs. That ordering is the
5
+ * point: a conflict or a missing record is reported with the database still
6
+ * untouched, so "the batch failed" and "the batch was partly applied" are
7
+ * never the same event. The statements then go to the engine's own
8
+ * `executeBatch`, which wraps them in a single transaction — the batch is
9
+ * atomic because SQLite makes it atomic, not because this file is careful.
10
+ *
11
+ * Resolution keeps an overlay of what earlier operations in the same batch
12
+ * did, so `insert` followed by `update` on the same id resolves against the
13
+ * batch's own effect rather than against the database as it was before it.
14
+ */
15
+ import type { CollectionSchema } from '../contract/schema.js';
16
+ import type { BatchOperation, BatchOutcome } from '../contract/transaction.js';
17
+ import type { Connection } from './connection.js';
18
+ export type BatchContext = {
19
+ connection: Connection;
20
+ /** Raises CONFIG_INVALID for a collection the schema never declared. */
21
+ schemaFor(name: string): CollectionSchema;
22
+ now(): number;
23
+ };
24
+ export declare function runBatch(context: BatchContext, operations: BatchOperation[]): Promise<BatchOutcome>;
25
+ //# sourceMappingURL=batch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"batch.d.ts","sourceRoot":"","sources":["../../../../src/sqlite/batch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,4BAAyB,CAAC;AAI5E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAc,CAAC;AAG/C,MAAM,MAAM,YAAY,GAAG;IAC1B,UAAU,EAAE,UAAU,CAAC;IACvB,wEAAwE;IACxE,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,CAAC;IAC1C,GAAG,IAAI,MAAM,CAAC;CACd,CAAC;AAgJF,wBAAsB,QAAQ,CAC7B,OAAO,EAAE,YAAY,EACrB,UAAU,EAAE,cAAc,EAAE,GAC1B,OAAO,CAAC,YAAY,CAAC,CAqDvB"}