@chipmobilesdk/rn-local-db 0.4.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.
- package/CHANGELOG.md +137 -0
- package/README.md +69 -8
- package/lib/commonjs/adapter/budgets.js +79 -0
- package/lib/commonjs/adapter/budgets.js.map +1 -0
- package/lib/commonjs/adapter/collection.js +236 -0
- package/lib/commonjs/adapter/collection.js.map +1 -0
- package/lib/commonjs/adapter/deletion.js +291 -0
- package/lib/commonjs/adapter/deletion.js.map +1 -0
- package/lib/commonjs/adapter/handle.js +259 -0
- package/lib/commonjs/adapter/handle.js.map +1 -0
- package/lib/commonjs/adapter/index.js +67 -0
- package/lib/commonjs/adapter/index.js.map +1 -0
- package/lib/commonjs/adapter/lifecycle.js +176 -0
- package/lib/commonjs/adapter/lifecycle.js.map +1 -0
- package/lib/commonjs/adapter/schema-sync.js +124 -0
- package/lib/commonjs/adapter/schema-sync.js.map +1 -0
- package/lib/commonjs/adapter/transaction.js +58 -0
- package/lib/commonjs/adapter/transaction.js.map +1 -0
- package/lib/commonjs/artifacts/availability.js +90 -0
- package/lib/commonjs/artifacts/availability.js.map +1 -0
- package/lib/commonjs/artifacts/cascade.js +80 -0
- package/lib/commonjs/artifacts/cascade.js.map +1 -0
- package/lib/commonjs/artifacts/paths.js +31 -0
- package/lib/commonjs/artifacts/paths.js.map +1 -0
- package/lib/commonjs/artifacts/reconcile.js +55 -0
- package/lib/commonjs/artifacts/reconcile.js.map +1 -0
- package/lib/commonjs/artifacts/store.js +300 -0
- package/lib/commonjs/artifacts/store.js.map +1 -0
- package/lib/commonjs/contract/adapter.js +6 -0
- package/lib/commonjs/contract/adapter.js.map +1 -0
- package/lib/commonjs/contract/attachment.js +2 -0
- package/lib/commonjs/contract/attachment.js.map +1 -0
- package/lib/commonjs/contract/backup.js +2 -0
- package/lib/commonjs/contract/backup.js.map +1 -0
- package/lib/commonjs/contract/config.js +31 -0
- package/lib/commonjs/contract/config.js.map +1 -0
- package/lib/commonjs/contract/encryption.js +6 -0
- package/lib/commonjs/contract/encryption.js.map +1 -0
- package/lib/commonjs/contract/errors.js +64 -0
- package/lib/commonjs/contract/errors.js.map +1 -0
- package/lib/commonjs/contract/migration.js +6 -0
- package/lib/commonjs/contract/migration.js.map +1 -0
- package/lib/commonjs/contract/query.js +6 -0
- package/lib/commonjs/contract/query.js.map +1 -0
- package/lib/commonjs/contract/record.js +6 -0
- package/lib/commonjs/contract/record.js.map +1 -0
- package/lib/commonjs/contract/schema.js +2 -0
- package/lib/commonjs/contract/schema.js.map +1 -0
- package/lib/commonjs/contract/scope.js +2 -0
- package/lib/commonjs/contract/scope.js.map +1 -0
- package/lib/commonjs/contract/transaction.js +6 -0
- package/lib/commonjs/contract/transaction.js.map +1 -0
- package/lib/commonjs/crypto/chunked-cipher.js +147 -0
- package/lib/commonjs/crypto/chunked-cipher.js.map +1 -0
- package/lib/commonjs/crypto/derive.js +61 -0
- package/lib/commonjs/crypto/derive.js.map +1 -0
- package/lib/commonjs/crypto/key-provider.js +70 -0
- package/lib/commonjs/crypto/key-provider.js.map +1 -0
- package/lib/commonjs/crypto/provider.js +54 -0
- package/lib/commonjs/crypto/provider.js.map +1 -0
- package/lib/commonjs/diagnostics/dev-log.js +127 -0
- package/lib/commonjs/diagnostics/dev-log.js.map +1 -0
- package/lib/commonjs/diagnostics/errors.js +57 -0
- package/lib/commonjs/diagnostics/errors.js.map +1 -0
- package/lib/commonjs/diagnostics/faults.js +54 -0
- package/lib/commonjs/diagnostics/faults.js.map +1 -0
- package/lib/commonjs/diagnostics/map-native.js +98 -0
- package/lib/commonjs/diagnostics/map-native.js.map +1 -0
- package/lib/commonjs/diagnostics/redact.js +110 -0
- package/lib/commonjs/diagnostics/redact.js.map +1 -0
- package/lib/commonjs/index.js +70 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/migration/executor.js +136 -0
- package/lib/commonjs/migration/executor.js.map +1 -0
- package/lib/commonjs/migration/ledger.js +64 -0
- package/lib/commonjs/migration/ledger.js.map +1 -0
- package/lib/commonjs/migration/validate-chain.js +76 -0
- package/lib/commonjs/migration/validate-chain.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/platform/backup-android-verify.js +76 -0
- package/lib/commonjs/platform/backup-android-verify.js.map +1 -0
- package/lib/commonjs/platform/backup-ios.js +50 -0
- package/lib/commonjs/platform/backup-ios.js.map +1 -0
- package/lib/commonjs/platform/bytes.js +158 -0
- package/lib/commonjs/platform/bytes.js.map +1 -0
- package/lib/commonjs/platform/fs.js +59 -0
- package/lib/commonjs/platform/fs.js.map +1 -0
- package/lib/commonjs/platform/location.js +129 -0
- package/lib/commonjs/platform/location.js.map +1 -0
- package/lib/commonjs/query/budgets.js +95 -0
- package/lib/commonjs/query/budgets.js.map +1 -0
- package/lib/commonjs/query/compare.js +97 -0
- package/lib/commonjs/query/compare.js.map +1 -0
- package/lib/commonjs/query/cursor.js +97 -0
- package/lib/commonjs/query/cursor.js.map +1 -0
- package/lib/commonjs/query/filter.js +82 -0
- package/lib/commonjs/query/filter.js.map +1 -0
- package/lib/commonjs/query/paginate.js +48 -0
- package/lib/commonjs/query/paginate.js.map +1 -0
- package/lib/commonjs/query/sort.js +61 -0
- package/lib/commonjs/query/sort.js.map +1 -0
- package/lib/commonjs/query/validate.js +180 -0
- package/lib/commonjs/query/validate.js.map +1 -0
- package/lib/commonjs/schema/declare.js +47 -0
- package/lib/commonjs/schema/declare.js.map +1 -0
- package/lib/commonjs/schema/validate-config.js +115 -0
- package/lib/commonjs/schema/validate-config.js.map +1 -0
- package/lib/commonjs/scope/hash.js +107 -0
- package/lib/commonjs/scope/hash.js.map +1 -0
- package/lib/commonjs/scope/normalize.js +73 -0
- package/lib/commonjs/scope/normalize.js.map +1 -0
- package/lib/commonjs/scope/validate.js +81 -0
- package/lib/commonjs/scope/validate.js.map +1 -0
- package/lib/commonjs/sqlite/adapter.js +31 -0
- package/lib/commonjs/sqlite/adapter.js.map +1 -0
- package/lib/commonjs/sqlite/batch.js +218 -0
- package/lib/commonjs/sqlite/batch.js.map +1 -0
- package/lib/commonjs/sqlite/catalog.js +81 -0
- package/lib/commonjs/sqlite/catalog.js.map +1 -0
- package/lib/commonjs/sqlite/connection.js +210 -0
- package/lib/commonjs/sqlite/connection.js.map +1 -0
- package/lib/commonjs/sqlite/index-coverage.js +42 -0
- package/lib/commonjs/sqlite/index-coverage.js.map +1 -0
- package/lib/commonjs/sqlite/native.js +54 -0
- package/lib/commonjs/sqlite/native.js.map +1 -0
- package/lib/commonjs/sqlite/row-codec.js +192 -0
- package/lib/commonjs/sqlite/row-codec.js.map +1 -0
- package/lib/commonjs/sqlite/sql-builder.js +253 -0
- package/lib/commonjs/sqlite/sql-builder.js.map +1 -0
- package/lib/commonjs/sqlite/statements.js +54 -0
- package/lib/commonjs/sqlite/statements.js.map +1 -0
- package/lib/commonjs/sqlite/transaction-queue.js +79 -0
- package/lib/commonjs/sqlite/transaction-queue.js.map +1 -0
- package/lib/commonjs/sqlite/transactions.js +33 -0
- package/lib/commonjs/sqlite/transactions.js.map +1 -0
- package/lib/commonjs/sqlite/values.js +31 -0
- package/lib/commonjs/sqlite/values.js.map +1 -0
- package/lib/commonjs/testing/conformance/attachments.js +180 -0
- package/lib/commonjs/testing/conformance/attachments.js.map +1 -0
- package/lib/commonjs/testing/conformance/encryption.js +187 -0
- package/lib/commonjs/testing/conformance/encryption.js.map +1 -0
- package/lib/commonjs/testing/conformance/index.js +103 -0
- package/lib/commonjs/testing/conformance/index.js.map +1 -0
- package/lib/commonjs/testing/conformance/lifecycle.js +134 -0
- package/lib/commonjs/testing/conformance/lifecycle.js.map +1 -0
- package/lib/commonjs/testing/conformance/migrations.js +167 -0
- package/lib/commonjs/testing/conformance/migrations.js.map +1 -0
- package/lib/commonjs/testing/conformance/queries.js +278 -0
- package/lib/commonjs/testing/conformance/queries.js.map +1 -0
- package/lib/commonjs/testing/conformance/records.js +224 -0
- package/lib/commonjs/testing/conformance/records.js.map +1 -0
- package/lib/commonjs/testing/conformance/scopes.js +107 -0
- package/lib/commonjs/testing/conformance/scopes.js.map +1 -0
- package/lib/commonjs/testing/conformance/transactions.js +228 -0
- package/lib/commonjs/testing/conformance/transactions.js.map +1 -0
- package/lib/commonjs/testing/faults.js +38 -0
- package/lib/commonjs/testing/faults.js.map +1 -0
- package/lib/commonjs/testing/index.js +59 -0
- package/lib/commonjs/testing/index.js.map +1 -0
- package/lib/commonjs/testing/memory-adapter/attachments.js +145 -0
- package/lib/commonjs/testing/memory-adapter/attachments.js.map +1 -0
- package/lib/commonjs/testing/memory-adapter/collection.js +224 -0
- package/lib/commonjs/testing/memory-adapter/collection.js.map +1 -0
- package/lib/commonjs/testing/memory-adapter/index.js +366 -0
- package/lib/commonjs/testing/memory-adapter/index.js.map +1 -0
- package/lib/commonjs/testing/memory-adapter/migrations.js +126 -0
- package/lib/commonjs/testing/memory-adapter/migrations.js.map +1 -0
- package/lib/commonjs/testing/memory-adapter/reset.js +49 -0
- package/lib/commonjs/testing/memory-adapter/reset.js.map +1 -0
- package/lib/commonjs/testing/memory-adapter/store.js +107 -0
- package/lib/commonjs/testing/memory-adapter/store.js.map +1 -0
- package/lib/module/adapter/budgets.js +51 -0
- package/lib/module/adapter/budgets.js.map +1 -0
- package/lib/module/adapter/collection.js +232 -0
- package/lib/module/adapter/collection.js.map +1 -0
- package/lib/module/adapter/deletion.js +280 -0
- package/lib/module/adapter/deletion.js.map +1 -0
- package/lib/module/adapter/handle.js +254 -0
- package/lib/module/adapter/handle.js.map +1 -0
- package/lib/module/adapter/index.js +59 -0
- package/lib/module/adapter/index.js.map +1 -0
- package/lib/module/adapter/lifecycle.js +172 -0
- package/lib/module/adapter/lifecycle.js.map +1 -0
- package/lib/module/adapter/schema-sync.js +121 -0
- package/lib/module/adapter/schema-sync.js.map +1 -0
- package/lib/module/adapter/transaction.js +54 -0
- package/lib/module/adapter/transaction.js.map +1 -0
- package/lib/module/artifacts/availability.js +86 -0
- package/lib/module/artifacts/availability.js.map +1 -0
- package/lib/module/artifacts/cascade.js +75 -0
- package/lib/module/artifacts/cascade.js.map +1 -0
- package/lib/module/artifacts/paths.js +26 -0
- package/lib/module/artifacts/paths.js.map +1 -0
- package/lib/module/artifacts/reconcile.js +51 -0
- package/lib/module/artifacts/reconcile.js.map +1 -0
- package/lib/module/artifacts/store.js +289 -0
- package/lib/module/artifacts/store.js.map +1 -0
- package/lib/module/contract/adapter.js +4 -0
- package/lib/module/contract/adapter.js.map +1 -0
- package/lib/module/contract/attachment.js +2 -0
- package/lib/module/contract/attachment.js.map +1 -0
- package/lib/module/contract/backup.js +2 -0
- package/lib/module/contract/backup.js.map +1 -0
- package/lib/module/contract/config.js +27 -0
- package/lib/module/contract/config.js.map +1 -0
- package/lib/module/contract/encryption.js +4 -0
- package/lib/module/contract/encryption.js.map +1 -0
- package/lib/module/contract/errors.js +60 -0
- package/lib/module/contract/errors.js.map +1 -0
- package/lib/module/contract/migration.js +4 -0
- package/lib/module/contract/migration.js.map +1 -0
- package/lib/module/contract/query.js +4 -0
- package/lib/module/contract/query.js.map +1 -0
- package/lib/module/contract/record.js +4 -0
- package/lib/module/contract/record.js.map +1 -0
- package/lib/module/contract/schema.js +2 -0
- package/lib/module/contract/schema.js.map +1 -0
- package/lib/module/contract/scope.js +2 -0
- package/lib/module/contract/scope.js.map +1 -0
- package/lib/module/contract/transaction.js +4 -0
- package/lib/module/contract/transaction.js.map +1 -0
- package/lib/module/crypto/chunked-cipher.js +134 -0
- package/lib/module/crypto/chunked-cipher.js.map +1 -0
- package/lib/module/crypto/derive.js +56 -0
- package/lib/module/crypto/derive.js.map +1 -0
- package/lib/module/crypto/key-provider.js +67 -0
- package/lib/module/crypto/key-provider.js.map +1 -0
- package/lib/module/crypto/provider.js +49 -0
- package/lib/module/crypto/provider.js.map +1 -0
- package/lib/module/diagnostics/dev-log.js +120 -0
- package/lib/module/diagnostics/dev-log.js.map +1 -0
- package/lib/module/diagnostics/errors.js +44 -0
- package/lib/module/diagnostics/errors.js.map +1 -0
- package/lib/module/diagnostics/faults.js +47 -0
- package/lib/module/diagnostics/faults.js.map +1 -0
- package/lib/module/diagnostics/map-native.js +93 -0
- package/lib/module/diagnostics/map-native.js.map +1 -0
- package/lib/module/diagnostics/redact.js +102 -0
- package/lib/module/diagnostics/redact.js.map +1 -0
- package/lib/module/index.js +28 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/migration/executor.js +132 -0
- package/lib/module/migration/executor.js.map +1 -0
- package/lib/module/migration/ledger.js +57 -0
- package/lib/module/migration/ledger.js.map +1 -0
- package/lib/module/migration/validate-chain.js +70 -0
- package/lib/module/migration/validate-chain.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/platform/backup-android-verify.js +69 -0
- package/lib/module/platform/backup-android-verify.js.map +1 -0
- package/lib/module/platform/backup-ios.js +44 -0
- package/lib/module/platform/backup-ios.js.map +1 -0
- package/lib/module/platform/bytes.js +148 -0
- package/lib/module/platform/bytes.js.map +1 -0
- package/lib/module/platform/fs.js +54 -0
- package/lib/module/platform/fs.js.map +1 -0
- package/lib/module/platform/location.js +120 -0
- package/lib/module/platform/location.js.map +1 -0
- package/lib/module/query/budgets.js +88 -0
- package/lib/module/query/budgets.js.map +1 -0
- package/lib/module/query/compare.js +90 -0
- package/lib/module/query/compare.js.map +1 -0
- package/lib/module/query/cursor.js +91 -0
- package/lib/module/query/cursor.js.map +1 -0
- package/lib/module/query/filter.js +78 -0
- package/lib/module/query/filter.js.map +1 -0
- package/lib/module/query/paginate.js +40 -0
- package/lib/module/query/paginate.js.map +1 -0
- package/lib/module/query/sort.js +53 -0
- package/lib/module/query/sort.js.map +1 -0
- package/lib/module/query/validate.js +173 -0
- package/lib/module/query/validate.js.map +1 -0
- package/lib/module/schema/declare.js +37 -0
- package/lib/module/schema/declare.js.map +1 -0
- package/lib/module/schema/validate-config.js +111 -0
- package/lib/module/schema/validate-config.js.map +1 -0
- package/lib/module/scope/hash.js +102 -0
- package/lib/module/scope/hash.js.map +1 -0
- package/lib/module/scope/normalize.js +67 -0
- package/lib/module/scope/normalize.js.map +1 -0
- package/lib/module/scope/validate.js +76 -0
- package/lib/module/scope/validate.js.map +1 -0
- package/lib/module/sqlite/adapter.js +27 -0
- package/lib/module/sqlite/adapter.js.map +1 -0
- package/lib/module/sqlite/batch.js +214 -0
- package/lib/module/sqlite/batch.js.map +1 -0
- package/lib/module/sqlite/catalog.js +72 -0
- package/lib/module/sqlite/catalog.js.map +1 -0
- package/lib/module/sqlite/connection.js +206 -0
- package/lib/module/sqlite/connection.js.map +1 -0
- package/lib/module/sqlite/index-coverage.js +38 -0
- package/lib/module/sqlite/index-coverage.js.map +1 -0
- package/lib/module/sqlite/native.js +48 -0
- package/lib/module/sqlite/native.js.map +1 -0
- package/lib/module/sqlite/row-codec.js +176 -0
- package/lib/module/sqlite/row-codec.js.map +1 -0
- package/lib/module/sqlite/sql-builder.js +247 -0
- package/lib/module/sqlite/sql-builder.js.map +1 -0
- package/lib/module/sqlite/statements.js +49 -0
- package/lib/module/sqlite/statements.js.map +1 -0
- package/lib/module/sqlite/transaction-queue.js +75 -0
- package/lib/module/sqlite/transaction-queue.js.map +1 -0
- package/lib/module/sqlite/transactions.js +29 -0
- package/lib/module/sqlite/transactions.js.map +1 -0
- package/lib/module/sqlite/values.js +24 -0
- package/lib/module/sqlite/values.js.map +1 -0
- package/lib/module/testing/conformance/attachments.js +176 -0
- package/lib/module/testing/conformance/attachments.js.map +1 -0
- package/lib/module/testing/conformance/encryption.js +183 -0
- package/lib/module/testing/conformance/encryption.js.map +1 -0
- package/lib/module/testing/conformance/index.js +97 -0
- package/lib/module/testing/conformance/index.js.map +1 -0
- package/lib/module/testing/conformance/lifecycle.js +130 -0
- package/lib/module/testing/conformance/lifecycle.js.map +1 -0
- package/lib/module/testing/conformance/migrations.js +163 -0
- package/lib/module/testing/conformance/migrations.js.map +1 -0
- package/lib/module/testing/conformance/queries.js +274 -0
- package/lib/module/testing/conformance/queries.js.map +1 -0
- package/lib/module/testing/conformance/records.js +220 -0
- package/lib/module/testing/conformance/records.js.map +1 -0
- package/lib/module/testing/conformance/scopes.js +103 -0
- package/lib/module/testing/conformance/scopes.js.map +1 -0
- package/lib/module/testing/conformance/transactions.js +224 -0
- package/lib/module/testing/conformance/transactions.js.map +1 -0
- package/lib/module/testing/faults.js +16 -0
- package/lib/module/testing/faults.js.map +1 -0
- package/lib/module/testing/index.js +16 -0
- package/lib/module/testing/index.js.map +1 -0
- package/lib/module/testing/memory-adapter/attachments.js +142 -0
- package/lib/module/testing/memory-adapter/attachments.js.map +1 -0
- package/lib/module/testing/memory-adapter/collection.js +220 -0
- package/lib/module/testing/memory-adapter/collection.js.map +1 -0
- package/lib/module/testing/memory-adapter/index.js +351 -0
- package/lib/module/testing/memory-adapter/index.js.map +1 -0
- package/lib/module/testing/memory-adapter/migrations.js +122 -0
- package/lib/module/testing/memory-adapter/migrations.js.map +1 -0
- package/lib/module/testing/memory-adapter/reset.js +44 -0
- package/lib/module/testing/memory-adapter/reset.js.map +1 -0
- package/lib/module/testing/memory-adapter/store.js +94 -0
- package/lib/module/testing/memory-adapter/store.js.map +1 -0
- package/lib/typescript/commonjs/adapter/budgets.d.ts +19 -0
- package/lib/typescript/commonjs/adapter/budgets.d.ts.map +1 -0
- package/lib/typescript/commonjs/adapter/collection.d.ts +25 -0
- package/lib/typescript/commonjs/adapter/collection.d.ts.map +1 -0
- package/lib/typescript/commonjs/adapter/deletion.d.ts +48 -0
- package/lib/typescript/commonjs/adapter/deletion.d.ts.map +1 -0
- package/lib/typescript/commonjs/adapter/handle.d.ts +30 -0
- package/lib/typescript/commonjs/adapter/handle.d.ts.map +1 -0
- package/lib/typescript/commonjs/adapter/index.d.ts +30 -0
- package/lib/typescript/commonjs/adapter/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/adapter/lifecycle.d.ts +25 -0
- package/lib/typescript/commonjs/adapter/lifecycle.d.ts.map +1 -0
- package/lib/typescript/commonjs/adapter/schema-sync.d.ts +19 -0
- package/lib/typescript/commonjs/adapter/schema-sync.d.ts.map +1 -0
- package/lib/typescript/commonjs/adapter/transaction.d.ts +32 -0
- package/lib/typescript/commonjs/adapter/transaction.d.ts.map +1 -0
- package/lib/typescript/commonjs/artifacts/availability.d.ts +19 -0
- package/lib/typescript/commonjs/artifacts/availability.d.ts.map +1 -0
- package/lib/typescript/commonjs/artifacts/cascade.d.ts +26 -0
- package/lib/typescript/commonjs/artifacts/cascade.d.ts.map +1 -0
- package/lib/typescript/commonjs/artifacts/paths.d.ts +16 -0
- package/lib/typescript/commonjs/artifacts/paths.d.ts.map +1 -0
- package/lib/typescript/commonjs/artifacts/reconcile.d.ts +23 -0
- package/lib/typescript/commonjs/artifacts/reconcile.d.ts.map +1 -0
- package/lib/typescript/commonjs/artifacts/store.d.ts +45 -0
- package/lib/typescript/commonjs/artifacts/store.d.ts.map +1 -0
- package/lib/typescript/commonjs/contract/adapter.d.ts +55 -0
- package/lib/typescript/commonjs/contract/adapter.d.ts.map +1 -0
- package/lib/typescript/commonjs/contract/attachment.d.ts +84 -0
- package/lib/typescript/commonjs/contract/attachment.d.ts.map +1 -0
- package/lib/typescript/commonjs/contract/backup.d.ts +26 -0
- package/lib/typescript/commonjs/contract/backup.d.ts.map +1 -0
- package/lib/typescript/commonjs/contract/config.d.ts +50 -0
- package/lib/typescript/commonjs/contract/config.d.ts.map +1 -0
- package/lib/typescript/commonjs/contract/encryption.d.ts +31 -0
- package/lib/typescript/commonjs/contract/encryption.d.ts.map +1 -0
- package/lib/typescript/commonjs/contract/errors.d.ts +50 -0
- package/lib/typescript/commonjs/contract/errors.d.ts.map +1 -0
- package/lib/typescript/commonjs/contract/migration.d.ts +37 -0
- package/lib/typescript/commonjs/contract/migration.d.ts.map +1 -0
- package/lib/typescript/commonjs/contract/query.d.ts +79 -0
- package/lib/typescript/commonjs/contract/query.d.ts.map +1 -0
- package/lib/typescript/commonjs/contract/record.d.ts +43 -0
- package/lib/typescript/commonjs/contract/record.d.ts.map +1 -0
- package/lib/typescript/commonjs/contract/schema.d.ts +33 -0
- package/lib/typescript/commonjs/contract/schema.d.ts.map +1 -0
- package/lib/typescript/commonjs/contract/scope.d.ts +33 -0
- package/lib/typescript/commonjs/contract/scope.d.ts.map +1 -0
- package/lib/typescript/commonjs/contract/transaction.d.ts +66 -0
- package/lib/typescript/commonjs/contract/transaction.d.ts.map +1 -0
- package/lib/typescript/commonjs/crypto/chunked-cipher.d.ts +57 -0
- package/lib/typescript/commonjs/crypto/chunked-cipher.d.ts.map +1 -0
- package/lib/typescript/commonjs/crypto/derive.d.ts +28 -0
- package/lib/typescript/commonjs/crypto/derive.d.ts.map +1 -0
- package/lib/typescript/commonjs/crypto/key-provider.d.ts +30 -0
- package/lib/typescript/commonjs/crypto/key-provider.d.ts.map +1 -0
- package/lib/typescript/commonjs/crypto/provider.d.ts +35 -0
- package/lib/typescript/commonjs/crypto/provider.d.ts.map +1 -0
- package/lib/typescript/commonjs/diagnostics/dev-log.d.ts +35 -0
- package/lib/typescript/commonjs/diagnostics/dev-log.d.ts.map +1 -0
- package/lib/typescript/commonjs/diagnostics/errors.d.ts +34 -0
- package/lib/typescript/commonjs/diagnostics/errors.d.ts.map +1 -0
- package/lib/typescript/commonjs/diagnostics/faults.d.ts +26 -0
- package/lib/typescript/commonjs/diagnostics/faults.d.ts.map +1 -0
- package/lib/typescript/commonjs/diagnostics/map-native.d.ts +31 -0
- package/lib/typescript/commonjs/diagnostics/map-native.d.ts.map +1 -0
- package/lib/typescript/commonjs/diagnostics/redact.d.ts +70 -0
- package/lib/typescript/commonjs/diagnostics/redact.d.ts.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +30 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/migration/executor.d.ts +40 -0
- package/lib/typescript/commonjs/migration/executor.d.ts.map +1 -0
- package/lib/typescript/commonjs/migration/ledger.d.ts +34 -0
- package/lib/typescript/commonjs/migration/ledger.d.ts.map +1 -0
- package/lib/typescript/commonjs/migration/validate-chain.d.ts +20 -0
- package/lib/typescript/commonjs/migration/validate-chain.d.ts.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/platform/backup-android-verify.d.ts +30 -0
- package/lib/typescript/commonjs/platform/backup-android-verify.d.ts.map +1 -0
- package/lib/typescript/commonjs/platform/backup-ios.d.ts +26 -0
- package/lib/typescript/commonjs/platform/backup-ios.d.ts.map +1 -0
- package/lib/typescript/commonjs/platform/bytes.d.ts +36 -0
- package/lib/typescript/commonjs/platform/bytes.d.ts.map +1 -0
- package/lib/typescript/commonjs/platform/fs.d.ts +47 -0
- package/lib/typescript/commonjs/platform/fs.d.ts.map +1 -0
- package/lib/typescript/commonjs/platform/location.d.ts +53 -0
- package/lib/typescript/commonjs/platform/location.d.ts.map +1 -0
- package/lib/typescript/commonjs/query/budgets.d.ts +23 -0
- package/lib/typescript/commonjs/query/budgets.d.ts.map +1 -0
- package/lib/typescript/commonjs/query/compare.d.ts +42 -0
- package/lib/typescript/commonjs/query/compare.d.ts.map +1 -0
- package/lib/typescript/commonjs/query/cursor.d.ts +27 -0
- package/lib/typescript/commonjs/query/cursor.d.ts.map +1 -0
- package/lib/typescript/commonjs/query/filter.d.ts +11 -0
- package/lib/typescript/commonjs/query/filter.d.ts.map +1 -0
- package/lib/typescript/commonjs/query/paginate.d.ts +15 -0
- package/lib/typescript/commonjs/query/paginate.d.ts.map +1 -0
- package/lib/typescript/commonjs/query/sort.d.ts +19 -0
- package/lib/typescript/commonjs/query/sort.d.ts.map +1 -0
- package/lib/typescript/commonjs/query/validate.d.ts +15 -0
- package/lib/typescript/commonjs/query/validate.d.ts.map +1 -0
- package/lib/typescript/commonjs/schema/declare.d.ts +20 -0
- package/lib/typescript/commonjs/schema/declare.d.ts.map +1 -0
- package/lib/typescript/commonjs/schema/validate-config.d.ts +11 -0
- package/lib/typescript/commonjs/schema/validate-config.d.ts.map +1 -0
- package/lib/typescript/commonjs/scope/hash.d.ts +24 -0
- package/lib/typescript/commonjs/scope/hash.d.ts.map +1 -0
- package/lib/typescript/commonjs/scope/normalize.d.ts +46 -0
- package/lib/typescript/commonjs/scope/normalize.d.ts.map +1 -0
- package/lib/typescript/commonjs/scope/validate.d.ts +15 -0
- package/lib/typescript/commonjs/scope/validate.d.ts.map +1 -0
- package/lib/typescript/commonjs/sqlite/adapter.d.ts +16 -0
- package/lib/typescript/commonjs/sqlite/adapter.d.ts.map +1 -0
- package/lib/typescript/commonjs/sqlite/batch.d.ts +25 -0
- package/lib/typescript/commonjs/sqlite/batch.d.ts.map +1 -0
- package/lib/typescript/commonjs/sqlite/catalog.d.ts +34 -0
- package/lib/typescript/commonjs/sqlite/catalog.d.ts.map +1 -0
- package/lib/typescript/commonjs/sqlite/connection.d.ts +58 -0
- package/lib/typescript/commonjs/sqlite/connection.d.ts.map +1 -0
- package/lib/typescript/commonjs/sqlite/index-coverage.d.ts +18 -0
- package/lib/typescript/commonjs/sqlite/index-coverage.d.ts.map +1 -0
- package/lib/typescript/commonjs/sqlite/native.d.ts +48 -0
- package/lib/typescript/commonjs/sqlite/native.d.ts.map +1 -0
- package/lib/typescript/commonjs/sqlite/row-codec.d.ts +69 -0
- package/lib/typescript/commonjs/sqlite/row-codec.d.ts.map +1 -0
- package/lib/typescript/commonjs/sqlite/sql-builder.d.ts +34 -0
- package/lib/typescript/commonjs/sqlite/sql-builder.d.ts.map +1 -0
- package/lib/typescript/commonjs/sqlite/statements.d.ts +26 -0
- package/lib/typescript/commonjs/sqlite/statements.d.ts.map +1 -0
- package/lib/typescript/commonjs/sqlite/transaction-queue.d.ts +31 -0
- package/lib/typescript/commonjs/sqlite/transaction-queue.d.ts.map +1 -0
- package/lib/typescript/commonjs/sqlite/transactions.d.ts +26 -0
- package/lib/typescript/commonjs/sqlite/transactions.d.ts.map +1 -0
- package/lib/typescript/commonjs/sqlite/values.d.ts +13 -0
- package/lib/typescript/commonjs/sqlite/values.d.ts.map +1 -0
- package/lib/typescript/commonjs/testing/conformance/attachments.d.ts +4 -0
- package/lib/typescript/commonjs/testing/conformance/attachments.d.ts.map +1 -0
- package/lib/typescript/commonjs/testing/conformance/encryption.d.ts +4 -0
- package/lib/typescript/commonjs/testing/conformance/encryption.d.ts.map +1 -0
- package/lib/typescript/commonjs/testing/conformance/index.d.ts +58 -0
- package/lib/typescript/commonjs/testing/conformance/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/testing/conformance/lifecycle.d.ts +4 -0
- package/lib/typescript/commonjs/testing/conformance/lifecycle.d.ts.map +1 -0
- package/lib/typescript/commonjs/testing/conformance/migrations.d.ts +4 -0
- package/lib/typescript/commonjs/testing/conformance/migrations.d.ts.map +1 -0
- package/lib/typescript/commonjs/testing/conformance/queries.d.ts +4 -0
- package/lib/typescript/commonjs/testing/conformance/queries.d.ts.map +1 -0
- package/lib/typescript/commonjs/testing/conformance/records.d.ts +4 -0
- package/lib/typescript/commonjs/testing/conformance/records.d.ts.map +1 -0
- package/lib/typescript/commonjs/testing/conformance/scopes.d.ts +4 -0
- package/lib/typescript/commonjs/testing/conformance/scopes.d.ts.map +1 -0
- package/lib/typescript/commonjs/testing/conformance/transactions.d.ts +4 -0
- package/lib/typescript/commonjs/testing/conformance/transactions.d.ts.map +1 -0
- package/lib/typescript/commonjs/testing/faults.d.ts +13 -0
- package/lib/typescript/commonjs/testing/faults.d.ts.map +1 -0
- package/lib/typescript/commonjs/testing/index.d.ts +13 -0
- package/lib/typescript/commonjs/testing/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/testing/memory-adapter/attachments.d.ts +23 -0
- package/lib/typescript/commonjs/testing/memory-adapter/attachments.d.ts.map +1 -0
- package/lib/typescript/commonjs/testing/memory-adapter/collection.d.ts +19 -0
- package/lib/typescript/commonjs/testing/memory-adapter/collection.d.ts.map +1 -0
- package/lib/typescript/commonjs/testing/memory-adapter/index.d.ts +22 -0
- package/lib/typescript/commonjs/testing/memory-adapter/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/testing/memory-adapter/migrations.d.ts +11 -0
- package/lib/typescript/commonjs/testing/memory-adapter/migrations.d.ts.map +1 -0
- package/lib/typescript/commonjs/testing/memory-adapter/reset.d.ts +23 -0
- package/lib/typescript/commonjs/testing/memory-adapter/reset.d.ts.map +1 -0
- package/lib/typescript/commonjs/testing/memory-adapter/store.d.ts +54 -0
- package/lib/typescript/commonjs/testing/memory-adapter/store.d.ts.map +1 -0
- package/lib/typescript/module/adapter/budgets.d.ts +19 -0
- package/lib/typescript/module/adapter/budgets.d.ts.map +1 -0
- package/lib/typescript/module/adapter/collection.d.ts +25 -0
- package/lib/typescript/module/adapter/collection.d.ts.map +1 -0
- package/lib/typescript/module/adapter/deletion.d.ts +48 -0
- package/lib/typescript/module/adapter/deletion.d.ts.map +1 -0
- package/lib/typescript/module/adapter/handle.d.ts +30 -0
- package/lib/typescript/module/adapter/handle.d.ts.map +1 -0
- package/lib/typescript/module/adapter/index.d.ts +30 -0
- package/lib/typescript/module/adapter/index.d.ts.map +1 -0
- package/lib/typescript/module/adapter/lifecycle.d.ts +25 -0
- package/lib/typescript/module/adapter/lifecycle.d.ts.map +1 -0
- package/lib/typescript/module/adapter/schema-sync.d.ts +19 -0
- package/lib/typescript/module/adapter/schema-sync.d.ts.map +1 -0
- package/lib/typescript/module/adapter/transaction.d.ts +32 -0
- package/lib/typescript/module/adapter/transaction.d.ts.map +1 -0
- package/lib/typescript/module/artifacts/availability.d.ts +19 -0
- package/lib/typescript/module/artifacts/availability.d.ts.map +1 -0
- package/lib/typescript/module/artifacts/cascade.d.ts +26 -0
- package/lib/typescript/module/artifacts/cascade.d.ts.map +1 -0
- package/lib/typescript/module/artifacts/paths.d.ts +16 -0
- package/lib/typescript/module/artifacts/paths.d.ts.map +1 -0
- package/lib/typescript/module/artifacts/reconcile.d.ts +23 -0
- package/lib/typescript/module/artifacts/reconcile.d.ts.map +1 -0
- package/lib/typescript/module/artifacts/store.d.ts +45 -0
- package/lib/typescript/module/artifacts/store.d.ts.map +1 -0
- package/lib/typescript/module/contract/adapter.d.ts +55 -0
- package/lib/typescript/module/contract/adapter.d.ts.map +1 -0
- package/lib/typescript/module/contract/attachment.d.ts +84 -0
- package/lib/typescript/module/contract/attachment.d.ts.map +1 -0
- package/lib/typescript/module/contract/backup.d.ts +26 -0
- package/lib/typescript/module/contract/backup.d.ts.map +1 -0
- package/lib/typescript/module/contract/config.d.ts +50 -0
- package/lib/typescript/module/contract/config.d.ts.map +1 -0
- package/lib/typescript/module/contract/encryption.d.ts +31 -0
- package/lib/typescript/module/contract/encryption.d.ts.map +1 -0
- package/lib/typescript/module/contract/errors.d.ts +50 -0
- package/lib/typescript/module/contract/errors.d.ts.map +1 -0
- package/lib/typescript/module/contract/migration.d.ts +37 -0
- package/lib/typescript/module/contract/migration.d.ts.map +1 -0
- package/lib/typescript/module/contract/query.d.ts +79 -0
- package/lib/typescript/module/contract/query.d.ts.map +1 -0
- package/lib/typescript/module/contract/record.d.ts +43 -0
- package/lib/typescript/module/contract/record.d.ts.map +1 -0
- package/lib/typescript/module/contract/schema.d.ts +33 -0
- package/lib/typescript/module/contract/schema.d.ts.map +1 -0
- package/lib/typescript/module/contract/scope.d.ts +33 -0
- package/lib/typescript/module/contract/scope.d.ts.map +1 -0
- package/lib/typescript/module/contract/transaction.d.ts +66 -0
- package/lib/typescript/module/contract/transaction.d.ts.map +1 -0
- package/lib/typescript/module/crypto/chunked-cipher.d.ts +57 -0
- package/lib/typescript/module/crypto/chunked-cipher.d.ts.map +1 -0
- package/lib/typescript/module/crypto/derive.d.ts +28 -0
- package/lib/typescript/module/crypto/derive.d.ts.map +1 -0
- package/lib/typescript/module/crypto/key-provider.d.ts +30 -0
- package/lib/typescript/module/crypto/key-provider.d.ts.map +1 -0
- package/lib/typescript/module/crypto/provider.d.ts +35 -0
- package/lib/typescript/module/crypto/provider.d.ts.map +1 -0
- package/lib/typescript/module/diagnostics/dev-log.d.ts +35 -0
- package/lib/typescript/module/diagnostics/dev-log.d.ts.map +1 -0
- package/lib/typescript/module/diagnostics/errors.d.ts +34 -0
- package/lib/typescript/module/diagnostics/errors.d.ts.map +1 -0
- package/lib/typescript/module/diagnostics/faults.d.ts +26 -0
- package/lib/typescript/module/diagnostics/faults.d.ts.map +1 -0
- package/lib/typescript/module/diagnostics/map-native.d.ts +31 -0
- package/lib/typescript/module/diagnostics/map-native.d.ts.map +1 -0
- package/lib/typescript/module/diagnostics/redact.d.ts +70 -0
- package/lib/typescript/module/diagnostics/redact.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +30 -0
- package/lib/typescript/module/index.d.ts.map +1 -0
- package/lib/typescript/module/migration/executor.d.ts +40 -0
- package/lib/typescript/module/migration/executor.d.ts.map +1 -0
- package/lib/typescript/module/migration/ledger.d.ts +34 -0
- package/lib/typescript/module/migration/ledger.d.ts.map +1 -0
- package/lib/typescript/module/migration/validate-chain.d.ts +20 -0
- package/lib/typescript/module/migration/validate-chain.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/platform/backup-android-verify.d.ts +30 -0
- package/lib/typescript/module/platform/backup-android-verify.d.ts.map +1 -0
- package/lib/typescript/module/platform/backup-ios.d.ts +26 -0
- package/lib/typescript/module/platform/backup-ios.d.ts.map +1 -0
- package/lib/typescript/module/platform/bytes.d.ts +36 -0
- package/lib/typescript/module/platform/bytes.d.ts.map +1 -0
- package/lib/typescript/module/platform/fs.d.ts +47 -0
- package/lib/typescript/module/platform/fs.d.ts.map +1 -0
- package/lib/typescript/module/platform/location.d.ts +53 -0
- package/lib/typescript/module/platform/location.d.ts.map +1 -0
- package/lib/typescript/module/query/budgets.d.ts +23 -0
- package/lib/typescript/module/query/budgets.d.ts.map +1 -0
- package/lib/typescript/module/query/compare.d.ts +42 -0
- package/lib/typescript/module/query/compare.d.ts.map +1 -0
- package/lib/typescript/module/query/cursor.d.ts +27 -0
- package/lib/typescript/module/query/cursor.d.ts.map +1 -0
- package/lib/typescript/module/query/filter.d.ts +11 -0
- package/lib/typescript/module/query/filter.d.ts.map +1 -0
- package/lib/typescript/module/query/paginate.d.ts +15 -0
- package/lib/typescript/module/query/paginate.d.ts.map +1 -0
- package/lib/typescript/module/query/sort.d.ts +19 -0
- package/lib/typescript/module/query/sort.d.ts.map +1 -0
- package/lib/typescript/module/query/validate.d.ts +15 -0
- package/lib/typescript/module/query/validate.d.ts.map +1 -0
- package/lib/typescript/module/schema/declare.d.ts +20 -0
- package/lib/typescript/module/schema/declare.d.ts.map +1 -0
- package/lib/typescript/module/schema/validate-config.d.ts +11 -0
- package/lib/typescript/module/schema/validate-config.d.ts.map +1 -0
- package/lib/typescript/module/scope/hash.d.ts +24 -0
- package/lib/typescript/module/scope/hash.d.ts.map +1 -0
- package/lib/typescript/module/scope/normalize.d.ts +46 -0
- package/lib/typescript/module/scope/normalize.d.ts.map +1 -0
- package/lib/typescript/module/scope/validate.d.ts +15 -0
- package/lib/typescript/module/scope/validate.d.ts.map +1 -0
- package/lib/typescript/module/sqlite/adapter.d.ts +16 -0
- package/lib/typescript/module/sqlite/adapter.d.ts.map +1 -0
- package/lib/typescript/module/sqlite/batch.d.ts +25 -0
- package/lib/typescript/module/sqlite/batch.d.ts.map +1 -0
- package/lib/typescript/module/sqlite/catalog.d.ts +34 -0
- package/lib/typescript/module/sqlite/catalog.d.ts.map +1 -0
- package/lib/typescript/module/sqlite/connection.d.ts +58 -0
- package/lib/typescript/module/sqlite/connection.d.ts.map +1 -0
- package/lib/typescript/module/sqlite/index-coverage.d.ts +18 -0
- package/lib/typescript/module/sqlite/index-coverage.d.ts.map +1 -0
- package/lib/typescript/module/sqlite/native.d.ts +48 -0
- package/lib/typescript/module/sqlite/native.d.ts.map +1 -0
- package/lib/typescript/module/sqlite/row-codec.d.ts +69 -0
- package/lib/typescript/module/sqlite/row-codec.d.ts.map +1 -0
- package/lib/typescript/module/sqlite/sql-builder.d.ts +34 -0
- package/lib/typescript/module/sqlite/sql-builder.d.ts.map +1 -0
- package/lib/typescript/module/sqlite/statements.d.ts +26 -0
- package/lib/typescript/module/sqlite/statements.d.ts.map +1 -0
- package/lib/typescript/module/sqlite/transaction-queue.d.ts +31 -0
- package/lib/typescript/module/sqlite/transaction-queue.d.ts.map +1 -0
- package/lib/typescript/module/sqlite/transactions.d.ts +26 -0
- package/lib/typescript/module/sqlite/transactions.d.ts.map +1 -0
- package/lib/typescript/module/sqlite/values.d.ts +13 -0
- package/lib/typescript/module/sqlite/values.d.ts.map +1 -0
- package/lib/typescript/module/testing/conformance/attachments.d.ts +4 -0
- package/lib/typescript/module/testing/conformance/attachments.d.ts.map +1 -0
- package/lib/typescript/module/testing/conformance/encryption.d.ts +4 -0
- package/lib/typescript/module/testing/conformance/encryption.d.ts.map +1 -0
- package/lib/typescript/module/testing/conformance/index.d.ts +58 -0
- package/lib/typescript/module/testing/conformance/index.d.ts.map +1 -0
- package/lib/typescript/module/testing/conformance/lifecycle.d.ts +4 -0
- package/lib/typescript/module/testing/conformance/lifecycle.d.ts.map +1 -0
- package/lib/typescript/module/testing/conformance/migrations.d.ts +4 -0
- package/lib/typescript/module/testing/conformance/migrations.d.ts.map +1 -0
- package/lib/typescript/module/testing/conformance/queries.d.ts +4 -0
- package/lib/typescript/module/testing/conformance/queries.d.ts.map +1 -0
- package/lib/typescript/module/testing/conformance/records.d.ts +4 -0
- package/lib/typescript/module/testing/conformance/records.d.ts.map +1 -0
- package/lib/typescript/module/testing/conformance/scopes.d.ts +4 -0
- package/lib/typescript/module/testing/conformance/scopes.d.ts.map +1 -0
- package/lib/typescript/module/testing/conformance/transactions.d.ts +4 -0
- package/lib/typescript/module/testing/conformance/transactions.d.ts.map +1 -0
- package/lib/typescript/module/testing/faults.d.ts +13 -0
- package/lib/typescript/module/testing/faults.d.ts.map +1 -0
- package/lib/typescript/module/testing/index.d.ts +13 -0
- package/lib/typescript/module/testing/index.d.ts.map +1 -0
- package/lib/typescript/module/testing/memory-adapter/attachments.d.ts +23 -0
- package/lib/typescript/module/testing/memory-adapter/attachments.d.ts.map +1 -0
- package/lib/typescript/module/testing/memory-adapter/collection.d.ts +19 -0
- package/lib/typescript/module/testing/memory-adapter/collection.d.ts.map +1 -0
- package/lib/typescript/module/testing/memory-adapter/index.d.ts +22 -0
- package/lib/typescript/module/testing/memory-adapter/index.d.ts.map +1 -0
- package/lib/typescript/module/testing/memory-adapter/migrations.d.ts +11 -0
- package/lib/typescript/module/testing/memory-adapter/migrations.d.ts.map +1 -0
- package/lib/typescript/module/testing/memory-adapter/reset.d.ts +23 -0
- package/lib/typescript/module/testing/memory-adapter/reset.d.ts.map +1 -0
- package/lib/typescript/module/testing/memory-adapter/store.d.ts +54 -0
- package/lib/typescript/module/testing/memory-adapter/store.d.ts.map +1 -0
- package/package.json +51 -16
- package/src/crypto/provider.ts +7 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,142 @@
|
|
|
1
1
|
# @chipmobilesdk/rn-local-db
|
|
2
2
|
|
|
3
|
+
## 0.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Every peer range has an upper bound, and no package declares a peer it does not use. ([#21](https://github.com/operationd8979/chip-mobile-sdk/pull/21))
|
|
8
|
+
|
|
9
|
+
A peer range is now a caret, a tilde or an explicit `<`, except for `react` and
|
|
10
|
+
`react-native`: an app brings exactly one of each, so a floor is the only useful thing
|
|
11
|
+
to say about them. Every other peer is a library the app installs beside us, and an
|
|
12
|
+
open `>=` was a promise about versions nobody had run — mmkv 3→4 lost entitlements and
|
|
13
|
+
pending purchases exactly that way.
|
|
14
|
+
|
|
15
|
+
**Four of the new ceilings exclude a version that is already published**, so an app
|
|
16
|
+
that took the open range at its word may now see a peer warning. The new bound is the
|
|
17
|
+
major this release is tested against, which is the thing the old range failed to say:
|
|
18
|
+
|
|
19
|
+
| Peer | Was | Now | Published above the ceiling |
|
|
20
|
+
|---|---|---|---|
|
|
21
|
+
| `react-native-app-auth` (rn-auth) | `>=8` | `^8.0.0` | 9.0.0 |
|
|
22
|
+
| `react-native-keychain` (rn-auth) | `>=10` | `^10.0.0` | 11.0.0 |
|
|
23
|
+
| `@op-engineering/op-sqlite` (rn-local-db) | `>=17.1.0` | `^17.1.0` | 18.x, 19.x |
|
|
24
|
+
| `@react-native-firebase/messaging` (rn-notification) | `>=26.0.0` | `^26.0.0` | 27.x |
|
|
25
|
+
|
|
26
|
+
The others — `react-native-vision-camera` `^5.1.1`, `react-native-svg` `^15.15.0`,
|
|
27
|
+
`react-native-unistyles` `^3.2.0`, `@dr.pogodin/react-native-fs` `^2.39.2`,
|
|
28
|
+
`react-native-quick-crypto` `^1.0.0`, `react-native-notify-kit` `^10.5.0`,
|
|
29
|
+
`react-native-localize` `^3.7.0`, `react-native-mmkv` `^4.0.0` — exclude nothing that
|
|
30
|
+
exists today. rn-payment's mmkv range was already bounded (`>=4.0.0 <5`) and is now
|
|
31
|
+
written as the caret that means the same thing.
|
|
32
|
+
|
|
33
|
+
Peers nothing imports are gone. `rn-theme`, `rn-local-db` and `rn-notification` asked
|
|
34
|
+
for `react` without having a component or a hook between them; `rn-auth`, `rn-ai` and
|
|
35
|
+
`rn-i18n` asked for `react-native` without touching a React Native API (rn-auth reaches
|
|
36
|
+
both native modules through `lazyPeer`, rn-i18n formats on `Intl`); `rn-notification`
|
|
37
|
+
asked for `@react-native-firebase/app`, which messaging declares itself. `rn-ai` no
|
|
38
|
+
longer peers on `@chipmobilesdk/rn-auth` at all — it asks for a `TokenProvider`, a
|
|
39
|
+
two-method interface rn-auth's `auth` satisfies, so an app with its own token source
|
|
40
|
+
installs nothing extra. An app that enables push or signs in through rn-auth installs
|
|
41
|
+
the same packages as before; it is the manifest that stopped overstating.
|
|
42
|
+
|
|
43
|
+
`react-native-localize` is declared optional, which is what the code already did: the
|
|
44
|
+
time-zone reader goes through `lazyPeer` and falls back to `Intl` without it. The
|
|
45
|
+
`peerDependenciesMeta` entries that said `optional: false` are gone — that is npm's
|
|
46
|
+
default, and writing it down only invited the question of which peers were undecided.
|
|
47
|
+
|
|
48
|
+
`npm run check:manifests` now fails on an unbounded peer range, a peer nothing in
|
|
49
|
+
`src/` imports, and a `peerDependenciesMeta` entry for either, so the policy holds
|
|
50
|
+
without anyone remembering it.
|
|
51
|
+
|
|
52
|
+
- Every package now ships built JavaScript with declaration files, instead of asking the
|
|
53
|
+
app to compile its TypeScript. ([#22](https://github.com/operationd8979/chip-mobile-sdk/pull/22))
|
|
54
|
+
|
|
55
|
+
Each tarball carries `lib/commonjs`, `lib/module` and `lib/typescript` (built with
|
|
56
|
+
`react-native-builder-bob`), and `src/` alongside them. What that changes for a
|
|
57
|
+
consumer:
|
|
58
|
+
|
|
59
|
+
- **Nothing to add to `transformIgnorePatterns`.** `require` resolves to the CommonJS
|
|
60
|
+
build, so an app's Jest loads this package without being told to transform it. That
|
|
61
|
+
was the one thing every consuming app had to know about us (DEP-04).
|
|
62
|
+
- **Typechecking reads our `.d.ts`** rather than compiling our source under our
|
|
63
|
+
`tsconfig`. A consumer's stricter — or looser — settings no longer meet our code.
|
|
64
|
+
- **`import` resolves to ESM**, so a bundler can tree-shake what it does not use.
|
|
65
|
+
|
|
66
|
+
No exported name changed, and no subpath moved: `.`, `./testing`, `./push`,
|
|
67
|
+
`./advanced`, `./app-auth`, `./keychain` and rn-core's twelve subpaths resolve exactly
|
|
68
|
+
as before, each now with its own declarations for both module systems. publint and
|
|
69
|
+
`attw --profile node16` pass on all twelve packages, which they could not before.
|
|
70
|
+
|
|
71
|
+
Inside the monorepo nothing changed either, and that is deliberate: every subpath also
|
|
72
|
+
declares a private `chipmobilesdk-source` condition pointing at its TypeScript, and
|
|
73
|
+
Metro, Jest and `tsc` here ask for that condition first. The demo app bundles 371
|
|
74
|
+
modules straight from `packages/*/src`, so editing a package still changes the app with
|
|
75
|
+
no build step, and coverage is still measured on the source. The condition is named for
|
|
76
|
+
this organization rather than using the conventional `source` because third-party
|
|
77
|
+
packages declare that one too — `@dr.pogodin/react-native-fs` does — and asking for it
|
|
78
|
+
pulled their sources into our stricter compile.
|
|
79
|
+
|
|
80
|
+
`npm run build:packages` builds everything, `prepack` rebuilds before any `npm pack`,
|
|
81
|
+
and `lib/` is git-ignored: the published bytes are produced by the release, never
|
|
82
|
+
committed. `npm run check:manifests` now fails a package whose `main`, `module`,
|
|
83
|
+
`types`, `source` condition, `files`, build script or `prepack` do not match this shape.
|
|
84
|
+
|
|
85
|
+
### Patch Changes
|
|
86
|
+
|
|
87
|
+
- Each package's public API and its weight are now recorded in the repository, so a change
|
|
88
|
+
to either is reviewed rather than discovered. ([#23](https://github.com/operationd8979/chip-mobile-sdk/pull/23))
|
|
89
|
+
|
|
90
|
+
`packages/<pkg>/etc/*.api.md` is an api-extractor report per entrypoint — twenty-seven
|
|
91
|
+
of them, generated from the declarations the package publishes and committed. A renamed
|
|
92
|
+
type, a widened union, one more optional field: all of it shows up in a pull request's
|
|
93
|
+
diff. `npm run check:api` fails when a report is out of date and `npm run api:update`
|
|
94
|
+
rewrites them.
|
|
95
|
+
|
|
96
|
+
A report that moves now needs a **minor or major** changeset for that package.
|
|
97
|
+
`check:changesets` enforces it, because the report is generated from what the package
|
|
98
|
+
publishes, and a patch release that moves the public surface is how a consumer's build
|
|
99
|
+
breaks on `npm update`. A report added for the first time is a baseline, not a change.
|
|
100
|
+
`./testing` deliberately has no report: test doubles are not a surface a release is
|
|
101
|
+
gated on.
|
|
102
|
+
|
|
103
|
+
`npm run check:size` holds every entrypoint to a budget in `.size-limit.json`, measured
|
|
104
|
+
on the ESM build with peers and rn-core treated as external — they are what an app
|
|
105
|
+
installs beside us, not our weight. Each budget started at today's measurement plus five
|
|
106
|
+
per cent, so growth becomes a decision someone makes instead of a drift nobody sees. The
|
|
107
|
+
current figures run from 500 B (`rn-core/lazy`) to 19 kB (rn-notification).
|
|
108
|
+
|
|
109
|
+
No behaviour or API changed in this release; the entry is here so the changelog records
|
|
110
|
+
when the reports and the budgets began.
|
|
111
|
+
|
|
112
|
+
- The crypto footprint is written down, and the device gate for encryption is a checklist
|
|
113
|
+
someone can run. ([#21](https://github.com/operationd8979/chip-mobile-sdk/pull/21))
|
|
114
|
+
|
|
115
|
+
`@noble/hashes` was considered for HKDF and SHA, and declined (DEP-10). It removes no
|
|
116
|
+
dependency — `react-native-quick-crypto` stays for AES-GCM either way, so moving HKDF
|
|
117
|
+
out of it buys nothing at install time — while adding it would give this package a
|
|
118
|
+
second runtime dependency, against the rule that rn-core is the only one. The hashing
|
|
119
|
+
that genuinely had to work without a native module, the scope digest, is already plain
|
|
120
|
+
TypeScript. The README now states which primitive lives where and why, and when to
|
|
121
|
+
revisit.
|
|
122
|
+
|
|
123
|
+
`CipherModule` no longer declares `createHash`. Nothing called it: the scope digest is
|
|
124
|
+
computed in TypeScript precisely so a scope can be resolved by an app that never
|
|
125
|
+
enables encryption and may have no crypto module installed. The port now asks for the
|
|
126
|
+
two things the package actually uses, AES-256-GCM and `hkdfSync`.
|
|
127
|
+
|
|
128
|
+
The README's "Demo and validation" section gained **Device checks for the encrypted
|
|
129
|
+
database**: the steps to run after every op-sqlite or quick-crypto upgrade, with the
|
|
130
|
+
diagnostic each one must produce. It also stops claiming the LocalDB demo screens run
|
|
131
|
+
on the memory adapter — nothing overrides the adapter, so they exercise op-sqlite on
|
|
132
|
+
the device, which is what makes them evidence. Every step was run on a Pixel 3a
|
|
133
|
+
emulator (API 36, release build) before being written down: the four key-provider modes
|
|
134
|
+
answer `opened successfully`, `KEY_INVALID`, `KEY_PROVIDER_FAILED` and `KEY_INVALID`,
|
|
135
|
+
the wrong posture answers `ENCRYPTION_MISMATCH` with the data still readable, and a
|
|
136
|
+
32 MB artifact writes in 128 chunks.
|
|
137
|
+
- Updated dependencies ([#22](https://github.com/operationd8979/chip-mobile-sdk/pull/22), [#23](https://github.com/operationd8979/chip-mobile-sdk/pull/23)):
|
|
138
|
+
- @chipmobilesdk/rn-core@0.2.0
|
|
139
|
+
|
|
3
140
|
## 0.4.0
|
|
4
141
|
|
|
5
142
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -463,6 +463,25 @@ tag per chunk. Encryption and range decryption operate by chunk. A write from
|
|
|
463
463
|
`sourcePath` holds one chunk at a time; a write from base64 `content` first
|
|
464
464
|
decodes the complete input, so its memory grows with the artifact.
|
|
465
465
|
|
|
466
|
+
### Crypto footprint: what is native and what is not
|
|
467
|
+
|
|
468
|
+
| Primitive | Where | Why |
|
|
469
|
+
|---|---|---|
|
|
470
|
+
| SQLCipher (records) | `@op-engineering/op-sqlite`, built with the SQLCipher flag | Page-level encryption of the database file; nothing in JavaScript can do this |
|
|
471
|
+
| AES-256-GCM (artifacts) | `react-native-quick-crypto` | 256 KB chunks of a photo or recording; this is where native speed is the whole point |
|
|
472
|
+
| HKDF-SHA256 (per-artifact subkey) | `react-native-quick-crypto` | One hash per artifact write, in the module AES-GCM already requires |
|
|
473
|
+
| SHA-256 (scope digest) | plain TypeScript, `src/scope/hash.ts` | Runs on **every** scope resolution, including apps that never enable encryption and so may not have a crypto module installed at all |
|
|
474
|
+
|
|
475
|
+
**`@noble/hashes` was considered for HKDF and SHA, and declined** (DEP-10, WS4-08).
|
|
476
|
+
It would not remove a dependency: `react-native-quick-crypto` stays for AES-GCM
|
|
477
|
+
either way, so moving HKDF out of it buys nothing at install time, while adding
|
|
478
|
+
`@noble/hashes` would give this package a second runtime dependency — against the rule
|
|
479
|
+
that rn-core is the only one (`npm run check:manifests` enforces it) — or a vendored
|
|
480
|
+
copy to maintain. The hashing that genuinely had to work without a native module, the
|
|
481
|
+
scope digest, is already plain TypeScript and byte-for-byte equal to Node's
|
|
482
|
+
`createHash('sha256')` under test. Revisit only if quick-crypto stops shipping an
|
|
483
|
+
`hkdfSync`, or if AES-GCM moves out of it.
|
|
484
|
+
|
|
466
485
|
A key-provider failure while the device is locked is an **expected condition**, not a bug:
|
|
467
486
|
|
|
468
487
|
| Code | Means | Retryable |
|
|
@@ -699,9 +718,9 @@ Four are **hard limits** with a typed error. The rest are soft: exceeding them i
|
|
|
699
718
|
| Node (tooling) | 22.11+ |
|
|
700
719
|
| Android | `minSdkVersion` 24, `targetSdkVersion` 36 |
|
|
701
720
|
| iOS | 15.1+ |
|
|
702
|
-
| `@op-engineering/op-sqlite` |
|
|
703
|
-
| `@dr.pogodin/react-native-fs` |
|
|
704
|
-
| `react-native-quick-crypto` |
|
|
721
|
+
| `@op-engineering/op-sqlite` | `^17.1.0` |
|
|
722
|
+
| `@dr.pogodin/react-native-fs` | `^2.39.2` |
|
|
723
|
+
| `react-native-quick-crypto` | `^1.0.0` — **optional**, only for encryption. Its own peer `react-native-quick-base64` must also be in the **app's** `dependencies`: autolinking compiles only what the app declares, and without it the first encrypted attachment fails with `'QuickBase64' could not be found` |
|
|
705
724
|
|
|
706
725
|
**Storage location**: app-private documents directory, under `chipmobilesdk-localdb/`.
|
|
707
726
|
**Backup mechanism**: `NSURLIsExcludedFromBackupKey` on iOS; `dataExtractionRules` / `fullBackupContent` on Android.
|
|
@@ -733,9 +752,13 @@ Written for the privacy disclosure a consuming app has to make.
|
|
|
733
752
|
|
|
734
753
|
## Demo and validation
|
|
735
754
|
|
|
736
|
-
The demo app exposes ten `src/screens/LocalDb*Screen.tsx` scenarios
|
|
737
|
-
|
|
738
|
-
|
|
755
|
+
The demo app exposes ten `src/screens/LocalDb*Screen.tsx` scenarios. They run on the
|
|
756
|
+
**real** adapter — op-sqlite on the device — because nothing overrides it; only
|
|
757
|
+
`LocalDbDiagnosticsScreen` reaches for the testing entrypoint, and only for fault
|
|
758
|
+
injection. So the screens are evidence about native behaviour, which is the point of
|
|
759
|
+
the checklist below.
|
|
760
|
+
|
|
761
|
+
Node-side gates, from the repository root:
|
|
739
762
|
|
|
740
763
|
```bash
|
|
741
764
|
npm run typecheck --workspace @chipmobilesdk/rn-local-db
|
|
@@ -743,5 +766,43 @@ npm run pack:check --workspace @chipmobilesdk/rn-local-db
|
|
|
743
766
|
npm run validate
|
|
744
767
|
```
|
|
745
768
|
|
|
746
|
-
|
|
747
|
-
|
|
769
|
+
### Device checks for the encrypted database
|
|
770
|
+
|
|
771
|
+
SQLCipher and AES-GCM live in two native modules this package does not control
|
|
772
|
+
(`@op-engineering/op-sqlite`, `react-native-quick-crypto`), and neither is exercised by
|
|
773
|
+
a Jest run. **Run this after every upgrade of either one, and before a release that
|
|
774
|
+
touches encryption** (WS4-08). It takes a few minutes on one device.
|
|
775
|
+
|
|
776
|
+
```bash
|
|
777
|
+
# A release build: a debug bundle's timings say nothing about chunked AES-GCM.
|
|
778
|
+
npx react-native run-android --mode release # or: adb install -r <apk>
|
|
779
|
+
```
|
|
780
|
+
|
|
781
|
+
Then, in the app's sidebar:
|
|
782
|
+
|
|
783
|
+
1. **LocalDB · Encryption** → *Write to both*. The two scopes must disagree: `Guest
|
|
784
|
+
scope encrypted: false` reading back `Stored in the clear`, `Tenant scope encrypted:
|
|
785
|
+
true` reading back `Stored under a key`. If both report `false`, the app is missing
|
|
786
|
+
the SQLCipher build flag — the package answers `ENCRYPTION_UNAVAILABLE` rather than
|
|
787
|
+
writing plaintext, so check the flag before suspecting this package.
|
|
788
|
+
2. **Key provider** → each of the four modes, each followed by *Open with this key*.
|
|
789
|
+
The expected diagnostics are `opened successfully`, then `KEY_INVALID` (wrong key,
|
|
790
|
+
not retryable), `KEY_PROVIDER_FAILED` (device locked, **retryable**) and
|
|
791
|
+
`KEY_INVALID` again (no key returned — an empty key is an invalid one, not a
|
|
792
|
+
different condition). Then *Open with the wrong posture* → `ENCRYPTION_MISMATCH`,
|
|
793
|
+
and `Data still readable with the correct key: yes`. That last line is the one that
|
|
794
|
+
matters: none of these paths opens, truncates or recreates the database.
|
|
795
|
+
3. **Large artifacts** → *Write 1 MB*, *8 MB*, *32 MB*. All three must complete. The
|
|
796
|
+
32 MB run reports `128 chunk(s)`, which is the 256 KB chunking doing its job
|
|
797
|
+
(FR-107a), followed by a 256 KB range read and a reconcile with `0 orphans, 0
|
|
798
|
+
dangling`. The panel reports durations, not memory: watch the device's memory graph
|
|
799
|
+
while it runs, and it must not scale with the file.
|
|
800
|
+
4. **LocalDB · Attachments** → *Attach a file* (inventory shows `available · 16384
|
|
801
|
+
bytes`), *Read a byte range*, *Escape the managed area* (must be refused, not
|
|
802
|
+
served), then *Reconcile and reclaim* and read the counts.
|
|
803
|
+
|
|
804
|
+
Record the device, the OS version and the two native module versions with the result.
|
|
805
|
+
As of 2026-11, on a Pixel 3a emulator (API 36, release build, op-sqlite 17.1.3,
|
|
806
|
+
quick-crypto 1.1.6): every expectation above held, with the 32 MB write at 4,200 ms and
|
|
807
|
+
the 256 KB range read at 33 ms. Backup/restore and corruption recovery are not covered
|
|
808
|
+
here — corruption needs a deliberately damaged file — and remain separate gates.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.acquireHandleSlot = acquireHandleSlot;
|
|
7
|
+
Object.defineProperty(exports, "assertArtifactWithinBudget", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return _budgets.assertArtifactWithinBudget;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "assertBatchWithinBudget", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () {
|
|
16
|
+
return _budgets.assertBatchWithinBudget;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, "assertRecordWithinBudget", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () {
|
|
22
|
+
return _budgets.assertRecordWithinBudget;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
exports.releaseHandleSlot = releaseHandleSlot;
|
|
26
|
+
exports.resetHandleSlots = resetHandleSlots;
|
|
27
|
+
Object.defineProperty(exports, "serializedSize", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function () {
|
|
30
|
+
return _budgets.serializedSize;
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
var _config = require("../contract/config.js");
|
|
34
|
+
var _errors = require("../contract/errors.js");
|
|
35
|
+
var _errors2 = require("../diagnostics/errors.js");
|
|
36
|
+
var _budgets = require("../query/budgets.js");
|
|
37
|
+
/**
|
|
38
|
+
* Where the FR-088 budgets are actually enforced.
|
|
39
|
+
*
|
|
40
|
+
* The checks live in `query/budgets.ts` so both adapters share them; this
|
|
41
|
+
* module is the adapter-layer entry point, and exists so there is one place
|
|
42
|
+
* to answer "which budgets are hard?" — per-record size, batch size, page
|
|
43
|
+
* size, and artifact size, each with a typed error (FR-088a).
|
|
44
|
+
*
|
|
45
|
+
* The rest are soft by design. Exceeding 100,000 records in a collection is
|
|
46
|
+
* slow, not an error, and refusing the 100,001st write would destroy data an
|
|
47
|
+
* app already holds. Degraded behavior is documented in the README instead.
|
|
48
|
+
*/
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Concurrently open handles.
|
|
52
|
+
*
|
|
53
|
+
* Each one holds a native connection and its write-ahead log, so an app that
|
|
54
|
+
* leaks handles runs out of file descriptors rather than slowing down. Eight
|
|
55
|
+
* is generous for the multi-identity case FR-008b describes and low enough
|
|
56
|
+
* that a leak surfaces during development instead of in the field.
|
|
57
|
+
*/
|
|
58
|
+
let openHandles = 0;
|
|
59
|
+
function acquireHandleSlot() {
|
|
60
|
+
if (openHandles >= _config.Budgets.MAX_OPEN_HANDLES) {
|
|
61
|
+
(0, _errors2.raise)(_errors.DiagnosticCodes.OPEN_FAILED, {
|
|
62
|
+
message: 'too many database handles are open',
|
|
63
|
+
detail: {
|
|
64
|
+
count: openHandles,
|
|
65
|
+
limit: _config.Budgets.MAX_OPEN_HANDLES
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
openHandles += 1;
|
|
70
|
+
}
|
|
71
|
+
function releaseHandleSlot() {
|
|
72
|
+
openHandles = Math.max(0, openHandles - 1);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** Between tests. */
|
|
76
|
+
function resetHandleSlots() {
|
|
77
|
+
openHandles = 0;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=budgets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_config","require","_errors","_errors2","_budgets","openHandles","acquireHandleSlot","Budgets","MAX_OPEN_HANDLES","raise","DiagnosticCodes","OPEN_FAILED","message","detail","count","limit","releaseHandleSlot","Math","max","resetHandleSlots"],"sourceRoot":"../../../src","sources":["adapter/budgets.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAmBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAII,WAAW,GAAG,CAAC;AAEZ,SAASC,iBAAiBA,CAAA,EAAS;EACzC,IAAID,WAAW,IAAIE,eAAO,CAACC,gBAAgB,EAAE;IAC5C,IAAAC,cAAK,EAACC,uBAAe,CAACC,WAAW,EAAE;MAClCC,OAAO,EAAE,oCAAoC;MAC7CC,MAAM,EAAE;QAAEC,KAAK,EAAET,WAAW;QAAEU,KAAK,EAAER,eAAO,CAACC;MAAiB;IAC/D,CAAC,CAAC;EACH;EACAH,WAAW,IAAI,CAAC;AACjB;AAEO,SAASW,iBAAiBA,CAAA,EAAS;EACzCX,WAAW,GAAGY,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEb,WAAW,GAAG,CAAC,CAAC;AAC3C;;AAEA;AACO,SAASc,gBAAgBA,CAAA,EAAS;EACxCd,WAAW,GAAG,CAAC;AAChB","ignoreList":[]}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createSqlCollection = createSqlCollection;
|
|
7
|
+
var _errors = require("../contract/errors.js");
|
|
8
|
+
var _errors2 = require("../diagnostics/errors.js");
|
|
9
|
+
var _faults = require("../diagnostics/faults.js");
|
|
10
|
+
var _cursor = require("../query/cursor.js");
|
|
11
|
+
var _paginate = require("../query/paginate.js");
|
|
12
|
+
var _sort = require("../query/sort.js");
|
|
13
|
+
var _validate = require("../query/validate.js");
|
|
14
|
+
var _declare = require("../schema/declare.js");
|
|
15
|
+
var _rowCodec = require("../sqlite/row-codec.js");
|
|
16
|
+
var _sqlBuilder = require("../sqlite/sql-builder.js");
|
|
17
|
+
var _statements = require("../sqlite/statements.js");
|
|
18
|
+
var _budgets = require("./budgets.js");
|
|
19
|
+
/**
|
|
20
|
+
* Collection operations against a SQLite executor.
|
|
21
|
+
*
|
|
22
|
+
* The executor is either the connection or the transaction in flight on it,
|
|
23
|
+
* which is what gives read-your-own-writes for free (FR-043): a read inside a
|
|
24
|
+
* transaction runs on the same handle that made the writes, so it sees them,
|
|
25
|
+
* and a reader outside does not.
|
|
26
|
+
*
|
|
27
|
+
* Every semantic decision that could differ between the two adapters —
|
|
28
|
+
* which operators mean what, how nulls sort, what a cursor points at — is
|
|
29
|
+
* delegated to `query/`. This file decides only how to say it in SQL.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
const LIVE = 'deleted_at IS NULL';
|
|
33
|
+
function notFound(collection, id) {
|
|
34
|
+
(0, _errors2.raise)(_errors.DiagnosticCodes.RECORD_NOT_FOUND, {
|
|
35
|
+
message: 'record not found',
|
|
36
|
+
detail: {
|
|
37
|
+
collection,
|
|
38
|
+
recordId: id
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function createSqlCollection(context) {
|
|
43
|
+
const {
|
|
44
|
+
schema
|
|
45
|
+
} = context;
|
|
46
|
+
const table = `"${(0, _declare.collectionTable)(schema.name)}"`;
|
|
47
|
+
const selectColumns = ['id', 'payload', 'created_at', 'updated_at', 'deleted_at'].join(', ');
|
|
48
|
+
async function rowById(id, includeDeleted = false) {
|
|
49
|
+
const result = await context.executor().execute(`SELECT ${selectColumns} FROM ${table} WHERE id = ?${includeDeleted ? '' : ` AND ${LIVE}`}`, [id]);
|
|
50
|
+
return result.rows[0];
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
async insert(record) {
|
|
54
|
+
context.assertUsable();
|
|
55
|
+
(0, _faults.throwIfFaulted)('write');
|
|
56
|
+
const payload = (0, _budgets.assertRecordWithinBudget)(schema.name, record.data);
|
|
57
|
+
|
|
58
|
+
// One statement: a row that is already there is left untouched and
|
|
59
|
+
// reported, instead of a SELECT first and an INSERT after (LDB-08). The
|
|
60
|
+
// failure stays boring — nothing was written, and no engine error
|
|
61
|
+
// surfaces from inside a transaction.
|
|
62
|
+
const result = await context.executor().execute(...(0, _statements.insertStatement)(schema, record.id, record.data, context.now(), payload, 'ignore'));
|
|
63
|
+
if (result.rowsAffected === 0) {
|
|
64
|
+
(0, _errors2.raise)(_errors.DiagnosticCodes.RECORD_CONFLICT, {
|
|
65
|
+
message: 'record already exists',
|
|
66
|
+
detail: {
|
|
67
|
+
collection: schema.name,
|
|
68
|
+
recordId: record.id
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
operation: 'created',
|
|
74
|
+
id: record.id
|
|
75
|
+
};
|
|
76
|
+
},
|
|
77
|
+
async update(id, record) {
|
|
78
|
+
context.assertUsable();
|
|
79
|
+
(0, _faults.throwIfFaulted)('write');
|
|
80
|
+
const payload = (0, _budgets.assertRecordWithinBudget)(schema.name, record.data);
|
|
81
|
+
const result = await context.executor().execute(...(0, _statements.updateStatement)(schema, id, record.data, context.now(), payload, {
|
|
82
|
+
liveOnly: true
|
|
83
|
+
}));
|
|
84
|
+
if (result.rowsAffected === 0) {
|
|
85
|
+
// Creating the record instead would be a silent write to an id
|
|
86
|
+
// the caller believed already existed.
|
|
87
|
+
notFound(schema.name, id);
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
operation: 'updated',
|
|
91
|
+
id
|
|
92
|
+
};
|
|
93
|
+
},
|
|
94
|
+
async upsert(record) {
|
|
95
|
+
context.assertUsable();
|
|
96
|
+
(0, _faults.throwIfFaulted)('write');
|
|
97
|
+
const payload = (0, _budgets.assertRecordWithinBudget)(schema.name, record.data);
|
|
98
|
+
const now = context.now();
|
|
99
|
+
|
|
100
|
+
// An upsert over a soft-deleted record brings it back: the caller
|
|
101
|
+
// asked for this id to hold this data.
|
|
102
|
+
const update = async () => {
|
|
103
|
+
const result = await context.executor().execute(...(0, _statements.updateStatement)(schema, record.id, record.data, now, payload, {
|
|
104
|
+
restore: true
|
|
105
|
+
}));
|
|
106
|
+
return result.rowsAffected > 0;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
// The update is tried first: one round-trip for a record that exists,
|
|
110
|
+
// with no SELECT before it (LDB-08).
|
|
111
|
+
if (await update()) {
|
|
112
|
+
return {
|
|
113
|
+
operation: 'updated',
|
|
114
|
+
id: record.id
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
const inserted = await context.executor().execute(...(0, _statements.insertStatement)(schema, record.id, record.data, now, payload, 'ignore'));
|
|
118
|
+
if (inserted.rowsAffected > 0) {
|
|
119
|
+
return {
|
|
120
|
+
operation: 'created',
|
|
121
|
+
id: record.id
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
// Another write created the row between the two statements.
|
|
125
|
+
await update();
|
|
126
|
+
return {
|
|
127
|
+
operation: 'updated',
|
|
128
|
+
id: record.id
|
|
129
|
+
};
|
|
130
|
+
},
|
|
131
|
+
async get(id) {
|
|
132
|
+
context.assertUsable();
|
|
133
|
+
(0, _faults.throwIfFaulted)('read');
|
|
134
|
+
const row = await rowById(id);
|
|
135
|
+
if (!row) {
|
|
136
|
+
notFound(schema.name, id);
|
|
137
|
+
}
|
|
138
|
+
return (0, _rowCodec.decodeRow)(schema, row);
|
|
139
|
+
},
|
|
140
|
+
async find(id) {
|
|
141
|
+
context.assertUsable();
|
|
142
|
+
(0, _faults.throwIfFaulted)('read');
|
|
143
|
+
const row = await rowById(id);
|
|
144
|
+
return row ? (0, _rowCodec.decodeRow)(schema, row) : null;
|
|
145
|
+
},
|
|
146
|
+
async delete(id) {
|
|
147
|
+
context.assertUsable();
|
|
148
|
+
(0, _faults.throwIfFaulted)('write');
|
|
149
|
+
const result = await context.executor().execute(`DELETE FROM ${table} WHERE id = ?`, [id]);
|
|
150
|
+
if (result.rowsAffected === 0) {
|
|
151
|
+
notFound(schema.name, id);
|
|
152
|
+
}
|
|
153
|
+
return {
|
|
154
|
+
operation: 'deleted',
|
|
155
|
+
id
|
|
156
|
+
};
|
|
157
|
+
},
|
|
158
|
+
async softDelete(id) {
|
|
159
|
+
context.assertUsable();
|
|
160
|
+
(0, _faults.throwIfFaulted)('write');
|
|
161
|
+
if (!(0, _declare.hasSoftDelete)(schema)) {
|
|
162
|
+
(0, _errors2.raise)(_errors.DiagnosticCodes.CONFIG_INVALID, {
|
|
163
|
+
message: 'collection does not declare soft delete',
|
|
164
|
+
detail: {
|
|
165
|
+
collection: schema.name
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
const result = await context.executor().execute(`UPDATE ${table} SET deleted_at = ? WHERE id = ? AND ${LIVE}`, [context.now(), id]);
|
|
170
|
+
if (result.rowsAffected === 0) {
|
|
171
|
+
notFound(schema.name, id);
|
|
172
|
+
}
|
|
173
|
+
return {
|
|
174
|
+
operation: 'deleted',
|
|
175
|
+
id
|
|
176
|
+
};
|
|
177
|
+
},
|
|
178
|
+
async restore(id) {
|
|
179
|
+
context.assertUsable();
|
|
180
|
+
(0, _faults.throwIfFaulted)('write');
|
|
181
|
+
if (!(0, _declare.hasSoftDelete)(schema)) {
|
|
182
|
+
(0, _errors2.raise)(_errors.DiagnosticCodes.CONFIG_INVALID, {
|
|
183
|
+
message: 'collection does not declare soft delete',
|
|
184
|
+
detail: {
|
|
185
|
+
collection: schema.name
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
const result = await context.executor().execute(`UPDATE ${table} SET deleted_at = NULL WHERE id = ? AND deleted_at IS NOT NULL`, [id]);
|
|
190
|
+
if (result.rowsAffected === 0) {
|
|
191
|
+
notFound(schema.name, id);
|
|
192
|
+
}
|
|
193
|
+
return {
|
|
194
|
+
operation: 'restored',
|
|
195
|
+
id
|
|
196
|
+
};
|
|
197
|
+
},
|
|
198
|
+
async list(query) {
|
|
199
|
+
context.assertUsable();
|
|
200
|
+
(0, _faults.throwIfFaulted)('read');
|
|
201
|
+
(0, _validate.validateQuery)(schema, query);
|
|
202
|
+
const sort = (0, _sort.withStableTiebreaker)(query?.sort);
|
|
203
|
+
const size = (0, _paginate.resolvePageSize)(query?.page);
|
|
204
|
+
const filter = (0, _sqlBuilder.buildFilter)(query?.filter);
|
|
205
|
+
const clauses = [filter.sql];
|
|
206
|
+
const params = [...filter.params];
|
|
207
|
+
if (query?.includeSoftDeleted !== true) {
|
|
208
|
+
clauses.push(LIVE);
|
|
209
|
+
}
|
|
210
|
+
if (query?.page?.cursor) {
|
|
211
|
+
const keyset = (0, _sqlBuilder.buildKeysetPredicate)(sort, (0, _cursor.decodeCursor)(query.page.cursor, sort));
|
|
212
|
+
clauses.push(keyset.sql);
|
|
213
|
+
params.push(...keyset.params);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
// One row past the page, so `hasMore` is answered without a second
|
|
217
|
+
// query that could disagree with the first under a concurrent write.
|
|
218
|
+
const limit = (0, _paginate.fetchLimitFor)(size);
|
|
219
|
+
const result = await context.executor().execute(`SELECT ${selectColumns} FROM ${table} WHERE ${clauses.join(' AND ')} ORDER BY ${(0, _sqlBuilder.buildOrderBy)(sort)} LIMIT ?`, [...params, limit]);
|
|
220
|
+
return (0, _paginate.buildPage)(result.rows.map(row => (0, _rowCodec.decodeRow)(schema, row)), sort, size);
|
|
221
|
+
},
|
|
222
|
+
async count(filter) {
|
|
223
|
+
context.assertUsable();
|
|
224
|
+
(0, _faults.throwIfFaulted)('read');
|
|
225
|
+
if (filter) {
|
|
226
|
+
(0, _validate.validateQuery)(schema, {
|
|
227
|
+
filter
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
const built = (0, _sqlBuilder.buildFilter)(filter);
|
|
231
|
+
const result = await context.executor().execute(`SELECT count(*) AS total FROM ${table} WHERE ${built.sql} AND ${LIVE}`, built.params);
|
|
232
|
+
return Number(result.rows[0]?.total ?? 0);
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
//# sourceMappingURL=collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_errors","require","_errors2","_faults","_cursor","_paginate","_sort","_validate","_declare","_rowCodec","_sqlBuilder","_statements","_budgets","LIVE","notFound","collection","id","raise","DiagnosticCodes","RECORD_NOT_FOUND","message","detail","recordId","createSqlCollection","context","schema","table","collectionTable","name","selectColumns","join","rowById","includeDeleted","result","executor","execute","rows","insert","record","assertUsable","throwIfFaulted","payload","assertRecordWithinBudget","data","insertStatement","now","rowsAffected","RECORD_CONFLICT","operation","update","updateStatement","liveOnly","upsert","restore","inserted","get","row","decodeRow","find","delete","softDelete","hasSoftDelete","CONFIG_INVALID","list","query","validateQuery","sort","withStableTiebreaker","size","resolvePageSize","page","filter","buildFilter","clauses","sql","params","includeSoftDeleted","push","cursor","keyset","buildKeysetPredicate","decodeCursor","limit","fetchLimitFor","buildOrderBy","buildPage","map","count","built","Number","total"],"sourceRoot":"../../../src","sources":["adapter/collection.ts"],"mappings":";;;;;;AAaA,IAAAA,OAAA,GAAAC,OAAA;AAUA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,SAAA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