@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 @@
1
+ {"version":3,"names":["_config","require","_errors","_errors2","_faults","_mapNative","_fs","_bytes","_budgets","_chunkedCipher","_values","_paths","CREATE_ATTACHMENTS","CREATE_OWNER_INDEX","ensureAttachmentTable","executor","execute","toReference","row","reference","id","text","contentType","content_type","size","num","createdAt","created_at","owner_collection","owner_id","owner","collection","chunkSize","maybeNum","chunk_size","chunkCount","chunk_count","readReference","result","rows","listReferences","map","listReferencesFor","insertReference","deleteReference","rowsAffected","writePlaintext","path","content","fileSystem","writeFile","writeEncrypted","key","source","header","headerFor","Budgets","ARTIFACT_CHUNK_BYTES","bytesToBase64","encodeHeader","index","chunk","chunkPlaintextLength","appendFile","encryptChunk","sourceFileOf","input","sourcePath","startsWith","slice","length","byteSourceFor","file","raise","DiagnosticCodes","CONFIG_INVALID","message","detail","attachmentId","plaintext","base64ToBytes","offset","subarray","stat","error","raiseNative","operation","read","writeArtifact","context","throwIfFaulted","assertArtifactWithinBudget","artifactPath","layout","scopeKey","artifactKey","chunking","mkdir","artifactsDirectory","copyFile","removeIfPresent","now","readPlaintext","range","readFile","readEncrypted","headerBytes","HEADER_BYTES","decodeHeader","from","to","Math","min","plaintextSize","first","floor","last","pieces","stored","TAG_BYTES","chunkOffset","decrypted","decryptChunk","chunkStart","push","max","concatBytes","readArtifact","isStorageError","ATTACHMENT_MISSING","cause","removeArtifact","deferred","hadReference","add","removedRecords","removedArtifacts","orphanedReferences","failedRemovals","removed"],"sourceRoot":"../../../src","sources":["artifacts/store.ts"],"mappings":";;;;;;;;;;;;;AAwBA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,GAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAEA,IAAAO,QAAA,GAAAP,OAAA;AACA,IAAAQ,cAAA,GAAAR,OAAA;AAYA,IAAAS,OAAA,GAAAT,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AA9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAiCA,MAAMW,kBAAkB,GAAG;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AAEF,MAAMC,kBAAkB,GACvB,4FAA4F;AAWtF,eAAeC,qBAAqBA,CAACC,QAAkB,EAAiB;EAC9E,MAAMA,QAAQ,CAACC,OAAO,CAACJ,kBAAkB,CAAC;EAC1C,MAAMG,QAAQ,CAACC,OAAO,CAACH,kBAAkB,CAAC;AAC3C;AAEA,SAASI,WAAWA,CAACC,GAA4B,EAAuB;EACvE,MAAMC,SAA8B,GAAG;IACtCC,EAAE,EAAE,IAAAC,YAAI,EAACH,GAAG,CAACE,EAAE,CAAC;IAChBE,WAAW,EAAE,IAAAD,YAAI,EAACH,GAAG,CAACK,YAAY,CAAC;IACnCC,IAAI,EAAE,IAAAC,WAAG,EAACP,GAAG,CAACM,IAAI,CAAC;IACnBE,SAAS,EAAE,IAAAD,WAAG,EAACP,GAAG,CAACS,UAAU;EAC9B,CAAC;EACD,IAAIT,GAAG,CAACU,gBAAgB,IAAI,IAAI,IAAIV,GAAG,CAACW,QAAQ,IAAI,IAAI,EAAE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ingURL=adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["contract/adapter.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=attachment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["contract/attachment.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=backup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["contract/backup.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Budgets = void 0;
7
+ /**
8
+ * Database configuration: everything an app supplies at open time.
9
+ *
10
+ * Immutable for the handle's lifetime. Scope in particular is bound here and
11
+ * never changes (FR-008a) — there is no switchScope, and no operation takes a
12
+ * scope argument, which is what makes cross-scope leakage inexpressible
13
+ * rather than merely prevented.
14
+ */
15
+
16
+ /** Phase-one budgets (FR-088). Confirmed against the harness during validation. */
17
+ const Budgets = exports.Budgets = {
18
+ MAX_RECORDS_PER_COLLECTION: 100_000,
19
+ MAX_RECORD_BYTES: 256 * 1024,
20
+ MAX_BATCH_OPERATIONS: 1_000,
21
+ MAX_PAGE_SIZE: 500,
22
+ MAX_COLLECTIONS_PER_DATABASE: 50,
23
+ MAX_ATTACHMENT_REFERENCES_PER_SCOPE: 50_000,
24
+ MAX_ARTIFACT_BYTES: 100 * 1024 * 1024,
25
+ MAX_OPEN_HANDLES: 8,
26
+ /** Plaintext chunk size for encrypted artifacts (research.md R4). */
27
+ ARTIFACT_CHUNK_BYTES: 256 * 1024
28
+ };
29
+
30
+ /** Names a scope for the operations that legitimately need to (FR-059). */
31
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Budgets","exports","MAX_RECORDS_PER_COLLECTION","MAX_RECORD_BYTES","MAX_BATCH_OPERATIONS","MAX_PAGE_SIZE","MAX_COLLECTIONS_PER_DATABASE","MAX_ATTACHMENT_REFERENCES_PER_SCOPE","MAX_ARTIFACT_BYTES","MAX_OPEN_HANDLES","ARTIFACT_CHUNK_BYTES"],"sourceRoot":"../../../src","sources":["contract/config.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA;AACO,MAAMA,OAAO,GAAAC,OAAA,CAAAD,OAAA,GAAG;EACtBE,0BAA0B,EAAE,OAAO;EACnCC,gBAAgB,EAAE,GAAG,GAAG,IAAI;EAC5BC,oBAAoB,EAAE,KAAK;EAC3BC,aAAa,EAAE,GAAG;EAClBC,4BAA4B,EAAE,EAAE;EAChCC,mCAAmC,EAAE,MAAM;EAC3CC,kBAAkB,EAAE,GAAG,GAAG,IAAI,GAAG,IAAI;EACrCC,gBAAgB,EAAE,CAAC;EACnB;EACAC,oBAAoB,EAAE,GAAG,GAAG;AAC7B,CAAU;;AAiBV","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=encryption.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["contract/encryption.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.RETRYABLE_CODES = exports.DiagnosticCodes = void 0;
7
+ /**
8
+ * Diagnostic codes.
9
+ *
10
+ * Stable identifiers so an app can choose a response without parsing a
11
+ * message (FR-074, FR-082). Disk-full, filesystem-access, and corruption stay
12
+ * distinct rather than collapsing into a generic write failure (FR-076) —
13
+ * an app frees space for one, retries after unlock for another, and offers a
14
+ * reset for the third.
15
+ *
16
+ * Full table with recommended recovery per code:
17
+ * specs/008-rn-local-db-package/contracts/errors.md
18
+ */
19
+
20
+ const DiagnosticCodes = exports.DiagnosticCodes = {
21
+ // Configuration and scope
22
+ CONFIG_INVALID: 'CONFIG_INVALID',
23
+ INVALID_SCOPE: 'INVALID_SCOPE',
24
+ MIGRATION_CONFIG_INVALID: 'MIGRATION_CONFIG_INVALID',
25
+ // Open and lifecycle
26
+ OPEN_FAILED: 'OPEN_FAILED',
27
+ CLOSED_HANDLE: 'CLOSED_HANDLE',
28
+ SCOPE_DELETED: 'SCOPE_DELETED',
29
+ CORRUPTION: 'CORRUPTION',
30
+ STORAGE_ACCESS: 'STORAGE_ACCESS',
31
+ // Migration
32
+ MIGRATION_FAILED: 'MIGRATION_FAILED',
33
+ SCHEMA_DOWNGRADE: 'SCHEMA_DOWNGRADE',
34
+ // Records and writes
35
+ RECORD_NOT_FOUND: 'RECORD_NOT_FOUND',
36
+ RECORD_CONFLICT: 'RECORD_CONFLICT',
37
+ RECORD_TOO_LARGE: 'RECORD_TOO_LARGE',
38
+ BATCH_TOO_LARGE: 'BATCH_TOO_LARGE',
39
+ DISK_FULL: 'DISK_FULL',
40
+ WRITE_FAILED: 'WRITE_FAILED',
41
+ // Query
42
+ QUERY_INVALID: 'QUERY_INVALID',
43
+ PAGE_SIZE_INVALID: 'PAGE_SIZE_INVALID',
44
+ CURSOR_INVALID: 'CURSOR_INVALID',
45
+ // Transaction
46
+ TRANSACTION_FAILED: 'TRANSACTION_FAILED',
47
+ TRANSACTION_STATE: 'TRANSACTION_STATE',
48
+ // Attachments
49
+ ATTACHMENT_MISSING: 'ATTACHMENT_MISSING',
50
+ ATTACHMENT_OUT_OF_BOUNDS: 'ATTACHMENT_OUT_OF_BOUNDS',
51
+ ATTACHMENT_WRITE_FAILED: 'ATTACHMENT_WRITE_FAILED',
52
+ ATTACHMENT_UNDECRYPTABLE: 'ATTACHMENT_UNDECRYPTABLE',
53
+ // Encryption
54
+ KEY_INVALID: 'KEY_INVALID',
55
+ KEY_PROVIDER_FAILED: 'KEY_PROVIDER_FAILED',
56
+ ENCRYPTION_MISMATCH: 'ENCRYPTION_MISMATCH',
57
+ ENCRYPTION_UNAVAILABLE: 'ENCRYPTION_UNAVAILABLE'
58
+ };
59
+ /**
60
+ * Codes worth retrying. `KEY_PROVIDER_FAILED` is here because a locked device
61
+ * is an expected condition, not a bug (FR-102).
62
+ */
63
+ const RETRYABLE_CODES = exports.RETRYABLE_CODES = new Set([DiagnosticCodes.OPEN_FAILED, DiagnosticCodes.DISK_FULL, DiagnosticCodes.WRITE_FAILED, DiagnosticCodes.STORAGE_ACCESS, DiagnosticCodes.TRANSACTION_FAILED, DiagnosticCodes.MIGRATION_FAILED, DiagnosticCodes.ATTACHMENT_WRITE_FAILED, DiagnosticCodes.KEY_PROVIDER_FAILED]);
64
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["DiagnosticCodes","exports","CONFIG_INVALID","INVALID_SCOPE","MIGRATION_CONFIG_INVALID","OPEN_FAILED","CLOSED_HANDLE","SCOPE_DELETED","CORRUPTION","STORAGE_ACCESS","MIGRATION_FAILED","SCHEMA_DOWNGRADE","RECORD_NOT_FOUND","RECORD_CONFLICT","RECORD_TOO_LARGE","BATCH_TOO_LARGE","DISK_FULL","WRITE_FAILED","QUERY_INVALID","PAGE_SIZE_INVALID","CURSOR_INVALID","TRANSACTION_FAILED","TRANSACTION_STATE","ATTACHMENT_MISSING","ATTACHMENT_OUT_OF_BOUNDS","ATTACHMENT_WRITE_FAILED","ATTACHMENT_UNDECRYPTABLE","KEY_INVALID","KEY_PROVIDER_FAILED","ENCRYPTION_MISMATCH","ENCRYPTION_UNAVAILABLE","RETRYABLE_CODES","Set"],"sourceRoot":"../../../src","sources":["contract/errors.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO,MAAMA,eAAe,GAAAC,OAAA,CAAAD,eAAA,GAAG;EAC9B;EACAE,cAAc,EAA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";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=migration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["contract/migration.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["contract/query.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=record.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["contract/record.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["contract/schema.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=scope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["contract/scope.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=transaction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["contract/transaction.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,147 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.TAG_BYTES = exports.MAGIC = exports.HEADER_BYTES = exports.FORMAT_VERSION = exports.ALGORITHM = void 0;
7
+ exports.chunkCountFor = chunkCountFor;
8
+ exports.chunkOffset = chunkOffset;
9
+ exports.chunkPlaintextLength = chunkPlaintextLength;
10
+ exports.decodeHeader = decodeHeader;
11
+ exports.decryptChunk = decryptChunk;
12
+ exports.encodeHeader = encodeHeader;
13
+ exports.encryptChunk = encryptChunk;
14
+ exports.encryptedLength = encryptedLength;
15
+ exports.headerFor = headerFor;
16
+ var _config = require("../contract/config.js");
17
+ var _errors = require("../contract/errors.js");
18
+ var _errors2 = require("../diagnostics/errors.js");
19
+ var _derive = require("./derive.js");
20
+ var _provider = require("./provider.js");
21
+ var _bytes = require("../platform/bytes.js");
22
+ /**
23
+ * The chunked AES-256-GCM artifact format.
24
+ *
25
+ * Whole-file encryption was rejected because a 100 MB artifact would have to
26
+ * be held in memory twice — plaintext and ciphertext — which breaks FR-107a's
27
+ * flat memory bound and every PERF-001 budget along with it (research.md R4).
28
+ * Chunking keeps exactly one 256 KB chunk in flight regardless of artifact
29
+ * size.
30
+ *
31
+ * ```text
32
+ * [ header 22 bytes ] magic | format version | chunk size | chunk count | plaintext size
33
+ * [ chunk 0 ] ciphertext(≤ chunkSize) | auth tag (16)
34
+ * [ chunk 1 ] …
35
+ * ```
36
+ *
37
+ * The auth tag follows each chunk rather than sitting in the header, which is
38
+ * a deliberate departure from the sketch in storage-layout.md. A tag is only
39
+ * known after its chunk has been encrypted, and the filesystem peer appends —
40
+ * it cannot seek back to patch a header. Collecting every tag before writing
41
+ * anything would mean buffering the whole ciphertext, which is the thing this
42
+ * format exists to avoid. Inline tags keep the write append-only and leave
43
+ * every chunk at a computable offset.
44
+ *
45
+ * A failing tag on read is `ATTACHMENT_UNDECRYPTABLE`, deliberately distinct
46
+ * from `ATTACHMENT_MISSING` (FR-107c): one is a wrong key or a tampered file
47
+ * and may be recoverable, the other is data that is simply gone.
48
+ */
49
+
50
+ const MAGIC = exports.MAGIC = 'LDB1';
51
+ const FORMAT_VERSION = exports.FORMAT_VERSION = 1;
52
+ const HEADER_BYTES = exports.HEADER_BYTES = 22;
53
+ const TAG_BYTES = exports.TAG_BYTES = 16;
54
+ const ALGORITHM = exports.ALGORITHM = 'aes-256-gcm';
55
+ function chunkCountFor(plaintextSize, chunkSize) {
56
+ return plaintextSize === 0 ? 0 : Math.ceil(plaintextSize / chunkSize);
57
+ }
58
+ function encodeHeader(header) {
59
+ const bytes = new Uint8Array(HEADER_BYTES);
60
+ for (let index = 0; index < 4; index += 1) {
61
+ bytes[index] = MAGIC.charCodeAt(index);
62
+ }
63
+ // Big-endian, as DataView writes by default; the on-disk format is unchanged.
64
+ const view = new DataView(bytes.buffer);
65
+ view.setUint16(4, header.formatVersion);
66
+ view.setUint32(6, header.chunkSize);
67
+ view.setUint32(10, header.chunkCount);
68
+ // Split across two 32-bit writes: artifact sizes stay well inside the safe
69
+ // integer range, and this avoids depending on BigInt in Hermes.
70
+ view.setUint32(14, Math.floor(header.plaintextSize / 0x100000000));
71
+ view.setUint32(18, header.plaintextSize % 0x100000000);
72
+ return bytes;
73
+ }
74
+ function decodeHeader(bytes) {
75
+ if (bytes.length < HEADER_BYTES || (0, _bytes.asciiAt)(bytes, 0, 4) !== MAGIC) {
76
+ (0, _errors2.raise)(_errors.DiagnosticCodes.ATTACHMENT_UNDECRYPTABLE, {
77
+ message: 'artifact header is not a recognised encrypted artifact'
78
+ });
79
+ }
80
+ const view = new DataView(bytes.buffer, bytes.byteOffset, HEADER_BYTES);
81
+ return {
82
+ formatVersion: view.getUint16(4),
83
+ chunkSize: view.getUint32(6),
84
+ chunkCount: view.getUint32(10),
85
+ plaintextSize: view.getUint32(14) * 0x100000000 + view.getUint32(18)
86
+ };
87
+ }
88
+
89
+ /** Plaintext length of chunk `index`; the last one is usually short. */
90
+ function chunkPlaintextLength(header, index) {
91
+ const start = index * header.chunkSize;
92
+ return Math.max(0, Math.min(header.chunkSize, header.plaintextSize - start));
93
+ }
94
+
95
+ /**
96
+ * Byte offset of chunk `index` in the file.
97
+ *
98
+ * Every chunk but the last is full, so the offset is arithmetic rather than a
99
+ * table lookup — which is what lets a range read seek straight to the chunk
100
+ * it needs instead of walking the file.
101
+ */
102
+ function chunkOffset(header, index) {
103
+ return HEADER_BYTES + index * (header.chunkSize + TAG_BYTES);
104
+ }
105
+ function encryptedLength(header) {
106
+ if (header.chunkCount === 0) {
107
+ return HEADER_BYTES;
108
+ }
109
+ const lastIndex = header.chunkCount - 1;
110
+ return chunkOffset(header, lastIndex) + chunkPlaintextLength(header, lastIndex) + TAG_BYTES;
111
+ }
112
+
113
+ /** One chunk in, ciphertext with its tag appended out. */
114
+ function encryptChunk(key, index, plaintext) {
115
+ const cipher = (0, _provider.cipherModule)().createCipheriv(ALGORITHM, key, (0, _derive.nonceForChunk)(index));
116
+ return (0, _bytes.concatBytes)([new Uint8Array(cipher.update(plaintext)), new Uint8Array(cipher.final()), new Uint8Array(cipher.getAuthTag())]);
117
+ }
118
+ function decryptChunk(key, index, stored) {
119
+ if (stored.length < TAG_BYTES) {
120
+ (0, _errors2.raise)(_errors.DiagnosticCodes.ATTACHMENT_UNDECRYPTABLE, {
121
+ message: 'artifact chunk is truncated'
122
+ });
123
+ }
124
+ const body = stored.subarray(0, stored.length - TAG_BYTES);
125
+ const tag = stored.subarray(stored.length - TAG_BYTES);
126
+ const decipher = (0, _provider.cipherModule)().createDecipheriv(ALGORITHM, key, (0, _derive.nonceForChunk)(index));
127
+ decipher.setAuthTag(tag);
128
+ try {
129
+ return (0, _bytes.concatBytes)([new Uint8Array(decipher.update(body)), new Uint8Array(decipher.final())]);
130
+ } catch (error) {
131
+ // A failing tag is the only signal that separates "exists but will not
132
+ // decrypt" from "missing", and an app responds to them differently.
133
+ (0, _errors2.raise)(_errors.DiagnosticCodes.ATTACHMENT_UNDECRYPTABLE, {
134
+ message: 'artifact chunk failed authentication',
135
+ cause: error
136
+ });
137
+ }
138
+ }
139
+ function headerFor(plaintextSize, chunkSize = _config.Budgets.ARTIFACT_CHUNK_BYTES) {
140
+ return {
141
+ formatVersion: FORMAT_VERSION,
142
+ chunkSize,
143
+ chunkCount: chunkCountFor(plaintextSize, chunkSize),
144
+ plaintextSize
145
+ };
146
+ }
147
+ //# sourceMappingURL=chunked-cipher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_config","require","_errors","_errors2","_derive","_provider","_bytes","MAGIC","exports","FORMAT_VERSION","HEADER_BYTES","TAG_BYTES","ALGORITHM","chunkCountFor","plaintextSize","chunkSize","Math","ceil","encodeHeader","header","bytes","Uint8Array","index","charCodeAt","view","DataView","buffer","setUint16","formatVersion","setUint32","chunkCount","floor","decodeHeader","length","asciiAt","raise","DiagnosticCodes","ATTACHMENT_UNDECRYPTABLE","message","byteOffset","getUint16","getUint32","chunkPlaintextLength","start","max","min","chunkOffset","encryptedLength","lastIndex","encryptChunk","key","plaintext","cipher","cipherModule","createCipheriv","nonceForChunk","concatBytes","update","final","getAuthTag","decryptChunk","stored","body","subarray","tag","decipher","createDecipheriv","setAuthTag","error","cause","headerFor","Budgets","ARTIFACT_CHUNK_BYTES"],"sourceRoot":"../../../src","sources":["crypto/chunked-cipher.ts"],"mappings":";;;;;;;;;;;;;;;AA4BA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASO,MAAMM,KAAK,GAAAC,OAAA,CAAAD,KAAA,GAAG,MAAM;AACpB,MAAME,cAAc,GAAAD,OAAA,CAAAC,cAAA,GAAG,CAAC;AACxB,MAAMC,YAAY,GAAAF,OAAA,CAAAE,YAAA,GAAG,EAAE;AACvB,MAAMC,SAAS,GAAAH,OAAA,CAAAG,SAAA,GAAG,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KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;EAC9F,CAAC,CAAC,OAAOU,KAAK,EAAE;IACf;IACA;IACA,IAAAjC,cAAK,EAACC,uBAAe,CAACC,wBAAwB,EAAE;MAC/CC,OAAO,EAAE,sCAAsC;MAC/C+B,KAAK,EAAED;IACR,CAAC,CAAC;EACH;AACD;AAEO,SAASE,SAASA,CACxBxD,aAAqB,EACrBC,SAAS,GAAGwD,eAAO,CAACC,oBAAoB,EACvB;EACjB,OAAO;IACN5C,aAAa,EAAEnB,cAAc;IAC7BM,SAAS;IACTe,UAAU,EAAEjB,aAAa,CAACC,aAAa,EAAEC,SAAS,CAAC;IACnDD;EACD,CAAC;AACF","ignoreList":[]}
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.deriveArtifactKey = deriveArtifactKey;
7
+ exports.nonceForChunk = nonceForChunk;
8
+ var _provider = require("./provider.js");
9
+ var _bytes = require("../platform/bytes.js");
10
+ /**
11
+ * Per-artifact key derivation.
12
+ *
13
+ * The database key is handed straight to SQLCipher. Using that same material
14
+ * as the AES-GCM key for artifacts would mean the two keystreams share a
15
+ * secret, so a weakness in either one — a nonce collision in the artifact
16
+ * format, a padding oracle in the database format — becomes a weakness in
17
+ * both. HKDF costs one hash and removes the coupling entirely (research.md
18
+ * R4).
19
+ *
20
+ * The artifact id is the HKDF `info`, so two artifacts under the same
21
+ * database key derive different subkeys. That is what makes the deterministic
22
+ * nonce scheme safe: a nonce is only ever reused with a different key.
23
+ */
24
+
25
+ const HKDF_DIGEST = 'sha256';
26
+ const KEY_BYTES = 32;
27
+ const NONCE_BYTES = 12;
28
+ function bytesOf(value) {
29
+ return (0, _bytes.utf8Bytes)(value);
30
+ }
31
+
32
+ /** 32 bytes, one artifact, one database key. */
33
+ function deriveArtifactKey(databaseKey, scopeKey, attachmentId) {
34
+ const derived = (0, _provider.cipherModule)().hkdfSync(HKDF_DIGEST, bytesOf(databaseKey),
35
+ // The scope digest as salt keeps two scopes holding an artifact under
36
+ // the same id from deriving the same subkey.
37
+ bytesOf(scopeKey), bytesOf(`chipmobilesdk-localdb/artifact/${attachmentId}`), KEY_BYTES);
38
+ return new Uint8Array(derived);
39
+ }
40
+
41
+ /**
42
+ * Deterministic 12-byte nonce from the chunk index.
43
+ *
44
+ * Deterministic rather than random because a random nonce would have to be
45
+ * stored per chunk, and because uniqueness is already guaranteed one level
46
+ * up: the key is unique per artifact, so an index that is unique within the
47
+ * artifact is unique under that key. The remaining four bytes are a fixed
48
+ * domain tag rather than padding, so a nonce from this scheme can never
49
+ * collide with one from a future scheme that uses the same counter space.
50
+ */
51
+ function nonceForChunk(index) {
52
+ const nonce = new Uint8Array(NONCE_BYTES);
53
+ const view = new DataView(nonce.buffer);
54
+ view.setUint32(0, 0x4c444231, false); // "LDB1"
55
+ // Split across two 32-bit writes rather than a BigInt: chunk indexes stay
56
+ // far inside the safe integer range, and Hermes is happier without one.
57
+ view.setUint32(4, Math.floor(index / 0x100000000), false);
58
+ view.setUint32(8, index % 0x100000000, false);
59
+ return nonce;
60
+ }
61
+ //# sourceMappingURL=derive.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_provider","require","_bytes","HKDF_DIGEST","KEY_BYTES","NONCE_BYTES","bytesOf","value","utf8Bytes","deriveArtifactKey","databaseKey","scopeKey","attachmentId","derived","cipherModule","hkdfSync","Uint8Array","nonceForChunk","index","nonce","view","DataView","buffer","setUint32","Math","floor"],"sourceRoot":"../../../src","sources":["crypto/derive.ts"],"mappings":";;;;;;;AAeA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA,MAAME,WAAW,GAAG,QAAQ;AAC5B,MAAMC,SAAS,GAAG,EAAE;AACpB,MAAMC,WAAW,GAAG,EAAE;AAEtB,SAASC,OAAOA,CAACC,KAAa,EAAc;EAC3C,OAAO,IAAAC,gBAAS,EAACD,KAAK,CAAC;AACxB;;AAEA;AACO,SAASE,iBAAiBA,CAChCC,WAAmB,EACnBC,QAAgB,EAChBC,YAAoB,EACP;EACb,MAAMC,OAAO,GAAG,IAAAC,sBAAY,EAAC,CAAC,CAACC,QAAQ,CACtCZ,WAAW,EACXG,OAAO,CAACI,WAAW,CAAC;EACpB;EACA;EACAJ,OAAO,CAACK,QAAQ,CAAC,EACjBL,OAAO,CAAC,kCAAkCM,YAAY,EAAE,CAAC,EACzDR,SACD,CAAC;EACD,OAAO,IAAIY,UAAU,CAACH,OAAO,CAAC;AAC/B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASI,aAAaA,CAACC,KAAa,EAAc;EACxD,MAAMC,KAAK,GAAG,IAAIH,UAAU,CAACX,WAAW,CAAC;EACzC,MAAMe,IAAI,GAAG,IAAIC,QAAQ,CAACF,KAAK,CAACG,MAAM,CAAC;EACvCF,IAAI,CAACG,SAAS,CAAC,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC;EACtC;EACA;EACAH,IAAI,CAACG,SAAS,CAAC,CAAC,EAAEC,IAAI,CAACC,KAAK,CAACP,KAAK,GAAG,WAAW,CAAC,EAAE,KAAK,CAAC;EACzDE,IAAI,CAACG,SAAS,CAAC,CAAC,EAAEL,KAAK,GAAG,WAAW,EAAE,KAAK,CAAC;EAC7C,OAAOC,KAAK;AACb","ignoreList":[]}
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.acquireKey = acquireKey;
7
+ var _errors = require("../contract/errors.js");
8
+ var _errors2 = require("../diagnostics/errors.js");
9
+ var _faults = require("../diagnostics/faults.js");
10
+ /**
11
+ * Key acquisition, scoped to one handle's lifetime.
12
+ *
13
+ * The package never generates, derives from its own material, persists,
14
+ * caches beyond the handle, transmits, or returns a key (FR-098). What it
15
+ * does is ask the app for one at open and hold it exactly as long as the
16
+ * connection that needs it — which is also why no keychain library appears in
17
+ * this package's dependencies (LIB-004).
18
+ *
19
+ * The provider receives the resolved scope, so an app can key per identity.
20
+ * That is not a convenience: it is what makes destroying one identity's key a
21
+ * meaningful answer to a deletion request, rather than a gesture that leaves
22
+ * the data readable under a shared key (FR-104).
23
+ */
24
+
25
+ /**
26
+ * A key with an explicit end of life.
27
+ *
28
+ * Handing the string around directly would leave copies wherever it was
29
+ * passed. A handle that can be released gives the connection one place to
30
+ * drop it, and gives `key-hygiene.test.ts` something to assert against.
31
+ */
32
+
33
+ async function acquireKey(encryption, scope) {
34
+ let key;
35
+ (0, _faults.throwIfFaulted)('keyProvider');
36
+ try {
37
+ key = await encryption.keyProvider.getKey(scope);
38
+ } catch (error) {
39
+ // A locked device is an expected condition, not a bug (FR-102), which
40
+ // is why this code is retryable and distinct from an invalid key.
41
+ (0, _errors2.raise)(_errors.DiagnosticCodes.KEY_PROVIDER_FAILED, {
42
+ message: 'key provider failed',
43
+ cause: error
44
+ });
45
+ }
46
+ if (typeof key !== 'string' || key.length === 0) {
47
+ (0, _errors2.raise)(_errors.DiagnosticCodes.KEY_INVALID, {
48
+ message: 'key provider returned no usable key'
49
+ });
50
+ }
51
+ let released = false;
52
+ return {
53
+ value() {
54
+ if (released || key === null) {
55
+ (0, _errors2.raise)(_errors.DiagnosticCodes.KEY_INVALID, {
56
+ message: 'key material has already been released'
57
+ });
58
+ }
59
+ return key;
60
+ },
61
+ release() {
62
+ released = true;
63
+ key = null;
64
+ },
65
+ get released() {
66
+ return released;
67
+ }
68
+ };
69
+ }
70
+ //# sourceMappingURL=key-provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_errors","require","_errors2","_faults","acquireKey","encryption","scope","key","throwIfFaulted","keyProvider","getKey","error","raise","DiagnosticCodes","KEY_PROVIDER_FAILED","message","cause","length","KEY_INVALID","released","value","release"],"sourceRoot":"../../../src","sources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+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.cipherModule = cipherModule;
7
+ exports.isCipherAvailable = isCipherAvailable;
8
+ exports.setCipherModule = setCipherModule;
9
+ var _rnCore = require("@chipmobilesdk/rn-core");
10
+ var _errors = require("../contract/errors.js");
11
+ var _errors2 = require("../diagnostics/errors.js");
12
+ /**
13
+ * The cipher peer, behind one lazy accessor.
14
+ *
15
+ * Marked optional in `peerDependenciesMeta`: an app that never enables
16
+ * encryption should not have to install a native crypto module. That makes
17
+ * "the peer is absent" a supported state rather than a broken install, so it
18
+ * reports `ENCRYPTION_UNAVAILABLE` — the same code as a missing SQLCipher
19
+ * build flag, because from the app's side it is the same problem: encryption
20
+ * was asked for and cannot be delivered (research.md R1a).
21
+ */
22
+
23
+ /**
24
+ * The two things this package asks of a cipher: AES-256-GCM for artifacts, and
25
+ * HKDF to derive each artifact's subkey. Hashing is not among them — the scope
26
+ * digest is SHA-256 in plain TypeScript (`scope/hash.ts`), because it runs on
27
+ * every scope resolution including the ones that never open an encrypted
28
+ * database, where a native module may not be installed at all (WS4-08).
29
+ */
30
+
31
+ /** Loaded on first use (rn-core's lazy peer); optional, so absence is a normal answer. */
32
+ const cipher = (0, _rnCore.lazyPeer)('react-native-quick-crypto', () => {
33
+ // Inside `try`, so Metro bundles an app that leaves this optional peer out.
34
+ try {
35
+ return require('react-native-quick-crypto');
36
+ } catch (cause) {
37
+ throw cause;
38
+ }
39
+ });
40
+
41
+ /** Swap the module. Tests only; `null` goes back to the real one. */
42
+ function setCipherModule(module) {
43
+ cipher.override(module ?? undefined);
44
+ }
45
+ function isCipherAvailable() {
46
+ return cipher.isAvailable();
47
+ }
48
+ function cipherModule() {
49
+ return cipher.require((_peer, cause) => new _errors2.StorageError(_errors.DiagnosticCodes.ENCRYPTION_UNAVAILABLE, {
50
+ message: 'cipher peer is not installed',
51
+ cause
52
+ }));
53
+ }
54
+ //# sourceMappingURL=provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_rnCore","require","_errors","_errors2","cipher","lazyPeer","cause","setCipherModule","module","override","undefined","isCipherAvailable","isAvailable","cipherModule","_peer","StorageError","DiagnosticCodes","ENCRYPTION_UNAVAILABLE","message"],"sourceRoot":"../../../src","sources":["crypto/provider.ts"],"mappings":";;;;;;;;AAWA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;;AA6BA;AACA,MAAMG,MAAM,GAAG,IAAAC,gBAAQ,EAAC,2BAA2B,EAAE,MAAM;EAC1D;EACA,IAAI;IACH,OAAOJ,OAAO,CAAC,2BAA2B,CAAC;EAC5C,CAAC,CAAC,OAAOK,KAAK,EAAE;IACf,MAAMA,KAAK;EACZ;AACD,CAAC,CAAC;;AAEF;AACO,SAASC,eAAeA,CAACC,MAA2B,EAAQ;EAClEJ,MAAM,CAACK,QAAQ,CAACD,MAAM,IAAIE,SAAS,CAAC;AACrC;AAEO,SAASC,iBAAiBA,CAAA,EAAY;EAC5C,OAAOP,MAAM,CAACQ,WAAW,CAAC,CAAC;AAC5B;AAEO,SAASC,YAAYA,CAAA,EAAiB;EAC5C,OAAOT,MAAM,CAACH,OAAO,CACpB,CAACa,KAAK,EAAER,KAAK,KACZ,IAAIS,qBAAY,CAACC,uBAAe,CAACC,sBAAsB,EAAE;IACxDC,OAAO,EAAE,8BAA8B;IACvCZ;EACD,CAAC,CACH,CAAC;AACF","ignoreList":[]}