@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.
- package/CHANGELOG.md +160 -1
- package/README.md +99 -19
- 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/skills/sdk-rn-local-db/SKILL.md +1 -1
- package/src/adapter/budgets.ts +1 -10
- package/src/adapter/collection.ts +38 -66
- package/src/adapter/deletion.ts +48 -0
- package/src/adapter/handle.ts +311 -0
- package/src/adapter/lifecycle.ts +10 -338
- package/src/adapter/schema-sync.ts +155 -0
- package/src/artifacts/cascade.ts +0 -14
- package/src/artifacts/store.ts +60 -10
- package/src/contract/attachment.ts +24 -3
- package/src/contract/migration.ts +4 -1
- package/src/crypto/provider.ts +7 -3
- package/src/diagnostics/dev-log.ts +5 -1
- package/src/migration/executor.ts +27 -6
- package/src/migration/ledger.ts +18 -27
- package/src/platform/fs.ts +2 -8
- package/src/platform/location.ts +0 -3
- package/src/query/budgets.ts +32 -5
- package/src/schema/validate-config.ts +3 -53
- package/src/sqlite/batch.ts +40 -51
- package/src/sqlite/connection.ts +0 -9
- package/src/sqlite/row-codec.ts +5 -2
- package/src/sqlite/statements.ts +74 -0
- package/src/testing/index.ts +2 -0
- package/src/testing/memory-adapter/attachments.ts +146 -0
- package/src/testing/memory-adapter/index.ts +13 -111
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The catalog: one registry per logical database, listing the scopes that
|
|
3
|
+
* exist.
|
|
4
|
+
*
|
|
5
|
+
* This is the only structure that spans scopes, so it is deliberately the
|
|
6
|
+
* smallest thing that answers the questions the package must answer without
|
|
7
|
+
* opening every scope file. It holds a digest, timestamps, and two posture
|
|
8
|
+
* flags — **no raw scope components** (FR-014), so a device with full disk
|
|
9
|
+
* access cannot mine it for identities or tenant names even though the
|
|
10
|
+
* catalog itself is never encrypted.
|
|
11
|
+
*
|
|
12
|
+
* The `deleting` flag is the load-bearing part. It is written before a scope
|
|
13
|
+
* deletion begins and cleared last, so a crash at any point leaves the
|
|
14
|
+
* interruption visible on the next open. Clearing it first would make an
|
|
15
|
+
* interrupted deletion look complete — the exact failure FR-063 exists to
|
|
16
|
+
* prevent.
|
|
17
|
+
*/
|
|
18
|
+
import type { ScopeDeletionState } from '../contract/scope.js';
|
|
19
|
+
import type { Connection } from './connection.js';
|
|
20
|
+
export type CatalogEntry = {
|
|
21
|
+
scopeKey: string;
|
|
22
|
+
createdAt: number;
|
|
23
|
+
deletionState: ScopeDeletionState;
|
|
24
|
+
backupPosture: 'excluded' | 'included';
|
|
25
|
+
encrypted: boolean;
|
|
26
|
+
};
|
|
27
|
+
export declare function ensureCatalog(connection: Connection): Promise<void>;
|
|
28
|
+
export declare function readEntry(connection: Connection, scopeKey: string): Promise<CatalogEntry | null>;
|
|
29
|
+
export declare function listEntries(connection: Connection): Promise<CatalogEntry[]>;
|
|
30
|
+
export declare function registerScope(connection: Connection, entry: CatalogEntry): Promise<void>;
|
|
31
|
+
export declare function markDeleting(connection: Connection, scopeKey: string): Promise<void>;
|
|
32
|
+
/** Cleared last, on purpose. See the note at the top of this file. */
|
|
33
|
+
export declare function clearScope(connection: Connection, scopeKey: string): Promise<void>;
|
|
34
|
+
//# sourceMappingURL=catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../../src/sqlite/catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAmB,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAc,CAAC;AAG/C,MAAM,MAAM,YAAY,GAAG;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,kBAAkB,CAAC;IAClC,aAAa,EAAE,UAAU,GAAG,UAAU,CAAC;IACvC,SAAS,EAAE,OAAO,CAAC;CACnB,CAAC;AAUF,wBAAsB,aAAa,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAEzE;AAED,wBAAsB,SAAS,CAC9B,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,MAAM,GACd,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAgB9B;AAED,wBAAsB,WAAW,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAWjF;AAED,wBAAsB,aAAa,CAAC,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAgB9F;AAED,wBAAsB,YAAY,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAK1F;AAED,sEAAsE;AACtE,wBAAsB,UAAU,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAExF"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One connection per database file.
|
|
3
|
+
*
|
|
4
|
+
* Two things about this file carry design weight:
|
|
5
|
+
*
|
|
6
|
+
* **Scope isolation is the file boundary.** A connection is opened against
|
|
7
|
+
* one scope's `data.db`, whose directory is named by the scope digest and
|
|
8
|
+
* never by the components (FR-014). No SQL this package could generate — and
|
|
9
|
+
* none a future bug could generate — reaches another scope's rows, because
|
|
10
|
+
* they are in a file this connection never opened (research.md R2).
|
|
11
|
+
*
|
|
12
|
+
* **A transaction owns the connection while it runs, and only its own
|
|
13
|
+
* executor reaches it.** Every operation queues on the connection, and a
|
|
14
|
+
* transaction holds the queue until it settles. Work issued through the
|
|
15
|
+
* connection meanwhile — a background sync, a second screen — waits and then
|
|
16
|
+
* runs on its own, rather than joining the transaction and vanishing with its
|
|
17
|
+
* rollback. Until 0.2.0 `execute` routed into whatever transaction was in
|
|
18
|
+
* flight, which is how an unrelated write was lost. Work meant to be part of
|
|
19
|
+
* the transaction goes through the executor the transaction hands out
|
|
20
|
+
* (`tx.collection`, `tx.attachments`).
|
|
21
|
+
*/
|
|
22
|
+
import { type ExecuteResult, type SqlValue } from './native.js';
|
|
23
|
+
export type Executor = {
|
|
24
|
+
execute(sql: string, params?: SqlValue[]): Promise<ExecuteResult>;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* The executor a transaction body runs against, plus the one control it
|
|
28
|
+
* needs. `rollback` is handed to the body rather than returned from
|
|
29
|
+
* `transaction`, so an explicit abort cannot outlive the transaction it
|
|
30
|
+
* belongs to.
|
|
31
|
+
*/
|
|
32
|
+
export type TransactionExecutor = Executor & {
|
|
33
|
+
rollback(): Promise<void>;
|
|
34
|
+
};
|
|
35
|
+
export type Connection = Executor & {
|
|
36
|
+
readonly path: string;
|
|
37
|
+
readonly encrypted: boolean;
|
|
38
|
+
transaction<R>(fn: (tx: TransactionExecutor) => Promise<R>): Promise<R>;
|
|
39
|
+
executeBatch(commands: [string, SqlValue[]?][]): Promise<void>;
|
|
40
|
+
close(): Promise<void>;
|
|
41
|
+
};
|
|
42
|
+
export type OpenConnectionOptions = {
|
|
43
|
+
/** Absolute path to the database file, already inside the managed area. */
|
|
44
|
+
path: string;
|
|
45
|
+
encryptionKey?: string;
|
|
46
|
+
};
|
|
47
|
+
export declare function openConnection(options: OpenConnectionOptions): Promise<Connection>;
|
|
48
|
+
/**
|
|
49
|
+
* Confirm a freshly opened database is readable.
|
|
50
|
+
*
|
|
51
|
+
* Deliberately not `PRAGMA integrity_check`: that walks the whole file and
|
|
52
|
+
* would put open time far past the 150-millisecond budget on a large scope.
|
|
53
|
+
* One trivial read is enough to surface the failures that matter at open —
|
|
54
|
+
* a wrong key, a truncated file, a malformed header — because all three fail
|
|
55
|
+
* it, and the error mapping keeps them distinguishable (FR-076, FR-078).
|
|
56
|
+
*/
|
|
57
|
+
export declare function assertReadable(connection: Connection): Promise<void>;
|
|
58
|
+
//# sourceMappingURL=connection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../../../../src/sqlite/connection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAOH,OAAO,EAEN,KAAK,aAAa,EAGlB,KAAK,QAAQ,EACb,MAAM,aAAU,CAAC;AAElB,MAAM,MAAM,QAAQ,GAAG;IACtB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;CAClE,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG;IAC5C,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,WAAW,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,mBAAmB,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACxE,YAAY,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/D,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IACnC,2EAA2E;IAC3E,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AASF,wBAAsB,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,UAAU,CAAC,CAsIxF;AAED;;;;;;;;GAQG;AACH,wBAAsB,cAAc,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAE1E"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* "Is this query covered by an index?", answered by the engine rather than by
|
|
3
|
+
* inspection of the declarations (FR-037).
|
|
4
|
+
*
|
|
5
|
+
* Reading the schema would answer what the developer intended; `EXPLAIN QUERY
|
|
6
|
+
* PLAN` answers what SQLite will actually do, and the two diverge exactly
|
|
7
|
+
* where it matters — a filter on an indexed field that the planner declines
|
|
8
|
+
* because of a type mismatch or a leading wildcard still reports as "indexed"
|
|
9
|
+
* if you only read declarations.
|
|
10
|
+
*
|
|
11
|
+
* Exposed as a development-mode diagnostic. It runs an extra statement, so an
|
|
12
|
+
* app calling it on every list would pay for it.
|
|
13
|
+
*/
|
|
14
|
+
import type { IndexCoverageReport, Query, SortKey } from '../contract/query.js';
|
|
15
|
+
import type { CollectionSchema } from '../contract/schema.js';
|
|
16
|
+
import type { Executor } from './connection.js';
|
|
17
|
+
export declare function explainQuery(executor: Executor, schema: CollectionSchema, query: Query | undefined, sort: SortKey[]): Promise<IndexCoverageReport>;
|
|
18
|
+
//# sourceMappingURL=index-coverage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-coverage.d.ts","sourceRoot":"","sources":["../../../../src/sqlite/index-coverage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAmB,CAAC;AAC7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAoB,CAAC;AAE3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAc,CAAC;AAO7C,wBAAsB,YAAY,CACjC,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,gBAAgB,EACxB,KAAK,EAAE,KAAK,GAAG,SAAS,EACxB,IAAI,EAAE,OAAO,EAAE,GACb,OAAO,CAAC,mBAAmB,CAAC,CAwB9B"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The storage engine peer, behind one lazy accessor.
|
|
3
|
+
*
|
|
4
|
+
* Every native call the package makes to SQLite passes through this type.
|
|
5
|
+
* Note what is missing: `executeSync`. op-sqlite ships it, and using it would
|
|
6
|
+
* put a database read on the interface thread — the one thing PERF-001's
|
|
7
|
+
* 16-millisecond rule cannot survive (research.md R9). A surface that cannot
|
|
8
|
+
* express the synchronous call is a stronger guarantee than a review comment.
|
|
9
|
+
*/
|
|
10
|
+
export type SqlValue = string | number | boolean | null | undefined;
|
|
11
|
+
export type ExecuteResult = {
|
|
12
|
+
rows: Record<string, unknown>[];
|
|
13
|
+
rowsAffected: number;
|
|
14
|
+
};
|
|
15
|
+
export type NativeTransaction = {
|
|
16
|
+
execute(sql: string, params?: SqlValue[]): Promise<ExecuteResult>;
|
|
17
|
+
commit(): Promise<void>;
|
|
18
|
+
rollback(): Promise<void>;
|
|
19
|
+
};
|
|
20
|
+
export type NativeDatabase = {
|
|
21
|
+
execute(sql: string, params?: SqlValue[]): Promise<ExecuteResult>;
|
|
22
|
+
executeBatch(commands: [string, SqlValue[]?][]): Promise<ExecuteResult>;
|
|
23
|
+
transaction<T>(fn: (tx: NativeTransaction) => Promise<T>): Promise<T>;
|
|
24
|
+
close(): Promise<void>;
|
|
25
|
+
delete(): Promise<void>;
|
|
26
|
+
};
|
|
27
|
+
export type OpenOptions = {
|
|
28
|
+
name: string;
|
|
29
|
+
location?: string;
|
|
30
|
+
/** SQLCipher only. Never logged, never persisted, never returned (FR-098). */
|
|
31
|
+
encryptionKey?: string;
|
|
32
|
+
};
|
|
33
|
+
export type Engine = {
|
|
34
|
+
open(options: OpenOptions): NativeDatabase;
|
|
35
|
+
isSQLCipher?: () => boolean;
|
|
36
|
+
};
|
|
37
|
+
/** Swap the engine. Tests only; `null` goes back to the real one. */
|
|
38
|
+
export declare function setEngine(next: Engine | null): void;
|
|
39
|
+
export declare function engine(): Engine;
|
|
40
|
+
/**
|
|
41
|
+
* Whether SQLCipher is compiled into this build.
|
|
42
|
+
*
|
|
43
|
+
* A build flag in the consuming app, not a separate peer (research.md R1a).
|
|
44
|
+
* An app that enables encryption without it must fail loudly rather than
|
|
45
|
+
* write plaintext to a file it believes is encrypted.
|
|
46
|
+
*/
|
|
47
|
+
export declare function isEncryptionAvailable(): boolean;
|
|
48
|
+
//# sourceMappingURL=native.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native.d.ts","sourceRoot":"","sources":["../../../../src/sqlite/native.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;AAEpE,MAAM,MAAM,aAAa,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IAChC,YAAY,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC/B,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IAClE,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACxB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC5B,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IAClE,YAAY,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IACxE,WAAW,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,iBAAiB,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACtE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG;IACpB,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,cAAc,CAAC;IAC3C,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC;CAC5B,CAAC;AAYF,qEAAqE;AACrE,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAEnD;AAED,wBAAgB,MAAM,IAAI,MAAM,CAQ/B;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,IAAI,OAAO,CAG/C"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Table shape, and the payload-as-truth rule.
|
|
3
|
+
*
|
|
4
|
+
* Every read reconstructs the record from `payload` alone. The projected
|
|
5
|
+
* `f_*` columns are written on every write and consulted only by `WHERE` and
|
|
6
|
+
* `ORDER BY` — never by a read path (research.md R6).
|
|
7
|
+
*
|
|
8
|
+
* That single rule is what makes two requirements structural rather than
|
|
9
|
+
* carefully maintained. FR-018's byte fidelity holds because nothing else is
|
|
10
|
+
* consulted to rebuild a record, and FR-019's explicit-null versus
|
|
11
|
+
* absent-field distinction holds because a NULL projected column cannot be
|
|
12
|
+
* ambiguous if no read ever looks at it.
|
|
13
|
+
*/
|
|
14
|
+
import type { StorableRecordData, StoredRecord } from '../contract/record.js';
|
|
15
|
+
import type { CollectionSchema, FieldDeclaration } from '../contract/schema.js';
|
|
16
|
+
import type { SqlValue } from './native.js';
|
|
17
|
+
export declare const RESERVED_COLUMNS: string[];
|
|
18
|
+
export declare function createTableSql(schema: CollectionSchema): string;
|
|
19
|
+
export declare function addColumnSql(schema: CollectionSchema, field: FieldDeclaration): string;
|
|
20
|
+
/**
|
|
21
|
+
* The name an index has in the database file.
|
|
22
|
+
*
|
|
23
|
+
* Index names are database-wide in SQLite, but declared per collection. Until
|
|
24
|
+
* 0.2.0 the declared name was used as is, so a second collection declaring an
|
|
25
|
+
* index of the same name hit `IF NOT EXISTS` and silently got no index — a
|
|
26
|
+
* UNIQUE constraint included. The double underscore keeps a declared name from
|
|
27
|
+
* colliding with the package's own `<table>_live` index.
|
|
28
|
+
*/
|
|
29
|
+
export declare function physicalIndexName(schema: CollectionSchema, declaredName: string): string;
|
|
30
|
+
/** The declared name back from a physical one, for reporting to the app. */
|
|
31
|
+
export declare function declaredIndexName(schema: CollectionSchema, physicalName: string): string;
|
|
32
|
+
export declare function createIndexSql(schema: CollectionSchema): string[];
|
|
33
|
+
/**
|
|
34
|
+
* Project a declared field for the WHERE and ORDER BY columns.
|
|
35
|
+
*
|
|
36
|
+
* Anything that is not a comparable primitive projects to NULL. A nested
|
|
37
|
+
* object has no defensible ordering, and inventing one would make a filter
|
|
38
|
+
* silently match records a consumer never meant to select.
|
|
39
|
+
*/
|
|
40
|
+
export declare function projectValue(data: StorableRecordData, field: FieldDeclaration): SqlValue;
|
|
41
|
+
export declare function projectedValues(schema: CollectionSchema, data: StorableRecordData): SqlValue[];
|
|
42
|
+
export declare function projectedColumnNames(schema: CollectionSchema): string[];
|
|
43
|
+
/** Serialize on the way in, so a caller mutating its object cannot change
|
|
44
|
+
* what is stored (FR-022). */
|
|
45
|
+
export declare function encodePayload(data: StorableRecordData): string;
|
|
46
|
+
export type CollectionRow = {
|
|
47
|
+
id: string;
|
|
48
|
+
payload: string;
|
|
49
|
+
created_at?: number | null;
|
|
50
|
+
updated_at?: number | null;
|
|
51
|
+
deleted_at?: number | null;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Rebuild a record from the payload column and nothing else.
|
|
55
|
+
*
|
|
56
|
+
* The timestamp and soft-delete fields are surfaced only when the collection
|
|
57
|
+
* declared them, so a consumer cannot come to depend on a field the schema
|
|
58
|
+
* never promised.
|
|
59
|
+
*/
|
|
60
|
+
export declare function decodeRow<T extends StorableRecordData>(schema: CollectionSchema, row: Record<string, unknown>): StoredRecord<T>;
|
|
61
|
+
export type WriteColumns = {
|
|
62
|
+
columns: string[];
|
|
63
|
+
values: SqlValue[];
|
|
64
|
+
};
|
|
65
|
+
export declare function insertColumns(schema: CollectionSchema, id: string, data: StorableRecordData, now: number,
|
|
66
|
+
/** The payload already serialized by the budget check, to avoid a second pass. */
|
|
67
|
+
payload?: string): WriteColumns;
|
|
68
|
+
export declare function updateAssignments(schema: CollectionSchema, data: StorableRecordData, now: number, payload?: string): WriteColumns;
|
|
69
|
+
//# sourceMappingURL=row-codec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row-codec.d.ts","sourceRoot":"","sources":["../../../../src/sqlite/row-codec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,uBAAoB,CAAC;AAC3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,uBAAoB,CAAC;AAE7E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAU,CAAC;AAGzC,eAAO,MAAM,gBAAgB,UAA8D,CAAC;AAgB5F,wBAAgB,cAAc,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAU/D;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,gBAAgB,EAAE,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAItF;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAExF;AAED,4EAA4E;AAC5E,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAGxF;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,EAAE,CAejE;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,gBAAgB,GAAG,QAAQ,CAkBxF;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,gBAAgB,EAAE,IAAI,EAAE,kBAAkB,GAAG,QAAQ,EAAE,CAE9F;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,EAAE,CAEvE;AAED;8BAC8B;AAC9B,wBAAgB,aAAa,CAAC,IAAI,EAAE,kBAAkB,GAAG,MAAM,CAE9D;AAED,MAAM,MAAM,aAAa,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,kBAAkB,EACrD,MAAM,EAAE,gBAAgB,EACxB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC1B,YAAY,CAAC,CAAC,CAAC,CAiBjB;AAED,MAAM,MAAM,YAAY,GAAG;IAC1B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,QAAQ,EAAE,CAAC;CACnB,CAAC;AAEF,wBAAgB,aAAa,CAC5B,MAAM,EAAE,gBAAgB,EACxB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,kBAAkB,EACxB,GAAG,EAAE,MAAM;AACX,kFAAkF;AAClF,OAAO,GAAE,MAA4B,GACnC,YAAY,CAkBd;AAED,wBAAgB,iBAAiB,CAChC,MAAM,EAAE,gBAAgB,EACxB,IAAI,EAAE,kBAAkB,EACxB,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,MAA4B,GACnC,YAAY,CAcd"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Filter tree to parameterized SQL.
|
|
3
|
+
*
|
|
4
|
+
* Nothing a consumer supplies is ever concatenated into a statement. Field
|
|
5
|
+
* names are resolved through the schema first — validation has already run
|
|
6
|
+
* and rejected anything undeclared (FR-034) — so the only identifiers that
|
|
7
|
+
* reach SQL are ones this package generated from a declaration it checked.
|
|
8
|
+
* Values bind as parameters, without exception. Injection stops being a thing
|
|
9
|
+
* to remember and becomes a thing the shape of the code prevents.
|
|
10
|
+
*
|
|
11
|
+
* The other half of this file is keyset pagination. `OFFSET` was rejected for
|
|
12
|
+
* two measured reasons (research.md R6): it degrades linearly at the 100,000
|
|
13
|
+
* record budget because the engine still walks the skipped rows, and it
|
|
14
|
+
* shifts pages under concurrent writes so a record can be skipped or returned
|
|
15
|
+
* twice — the exact failure SC-007 forbids.
|
|
16
|
+
*/
|
|
17
|
+
import type { FilterNode, FilterValue, SortKey } from '../contract/query.js';
|
|
18
|
+
import type { SqlValue } from './native.js';
|
|
19
|
+
export type SqlFragment = {
|
|
20
|
+
sql: string;
|
|
21
|
+
params: SqlValue[];
|
|
22
|
+
};
|
|
23
|
+
export declare function buildFilter(node: FilterNode | undefined): SqlFragment;
|
|
24
|
+
export declare function buildOrderBy(sort: SortKey[]): string;
|
|
25
|
+
/**
|
|
26
|
+
* The keyset predicate: everything strictly after the cursor position.
|
|
27
|
+
*
|
|
28
|
+
* Lexicographic across the sort keys — equal on the first means the second
|
|
29
|
+
* decides, down to the `id` tiebreaker that guarantees a total order. NULL is
|
|
30
|
+
* treated as smaller than every value, matching both SQLite's default
|
|
31
|
+
* ordering and `compareValues`, so the two adapters page identically.
|
|
32
|
+
*/
|
|
33
|
+
export declare function buildKeysetPredicate(sort: SortKey[], anchor: FilterValue[]): SqlFragment;
|
|
34
|
+
//# sourceMappingURL=sql-builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sql-builder.d.ts","sourceRoot":"","sources":["../../../../src/sqlite/sql-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,sBAAmB,CAAC;AAE1E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAU,CAAC;AAEzC,MAAM,MAAM,WAAW,GAAG;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,QAAQ,EAAE,CAAC;CACnB,CAAC;AAuIF,wBAAgB,WAAW,CAAC,IAAI,EAAE,UAAU,GAAG,SAAS,GAAG,WAAW,CAsBrE;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,MAAM,CAIpD;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,WAAW,CA8CxF"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The write statements, built in one place (LDB-12).
|
|
3
|
+
*
|
|
4
|
+
* The collection API and the batch each used to assemble their own INSERT and
|
|
5
|
+
* UPDATE text. Two copies of the same rule is how a batch upsert came to treat
|
|
6
|
+
* a soft-deleted row differently from a collection upsert.
|
|
7
|
+
*/
|
|
8
|
+
import type { CollectionSchema } from '../contract/schema.js';
|
|
9
|
+
import type { SqlValue } from './native.js';
|
|
10
|
+
import { insertColumns } from './row-codec.js';
|
|
11
|
+
export type Statement = [sql: string, params: SqlValue[]];
|
|
12
|
+
type RecordData = Parameters<typeof insertColumns>[2];
|
|
13
|
+
/**
|
|
14
|
+
* `ignore` leaves a row that already holds the id untouched and reports zero
|
|
15
|
+
* rows affected, so a conflict is detected without a SELECT beforehand.
|
|
16
|
+
*/
|
|
17
|
+
export declare function insertStatement(schema: CollectionSchema, id: string, data: RecordData, now: number, payload: string, onConflict?: 'fail' | 'ignore'): Statement;
|
|
18
|
+
export type UpdateOptions = {
|
|
19
|
+
/** Clear `deleted_at`: an upsert over a soft-deleted record brings it back. */
|
|
20
|
+
restore?: boolean;
|
|
21
|
+
/** Match only a record that is not soft-deleted. */
|
|
22
|
+
liveOnly?: boolean;
|
|
23
|
+
};
|
|
24
|
+
export declare function updateStatement(schema: CollectionSchema, id: string, data: RecordData, now: number, payload: string, options?: UpdateOptions): Statement;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=statements.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"statements.d.ts","sourceRoot":"","sources":["../../../../src/sqlite/statements.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAoB,CAAC;AAE3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAU,CAAC;AACzC,OAAO,EAAE,aAAa,EAAqB,MAAM,gBAAa,CAAC;AAE/D,MAAM,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC;AAE1D,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;AAiBtD;;;GAGG;AACH,wBAAgB,eAAe,CAC9B,MAAM,EAAE,gBAAgB,EACxB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,UAAU,EAChB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,EACf,UAAU,GAAE,MAAM,GAAG,QAAiB,GACpC,SAAS,CAIX;AAED,MAAM,MAAM,aAAa,GAAG;IAC3B,+EAA+E;IAC/E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,wBAAgB,eAAe,CAC9B,MAAM,EAAE,gBAAgB,EACxB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,UAAU,EAChB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,aAAkB,GACzB,SAAS,CAWX"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The per-handle queue that keeps a transaction to itself.
|
|
3
|
+
*
|
|
4
|
+
* A transaction holds the queue until it settles; work arriving meanwhile
|
|
5
|
+
* through the handle waits its turn and then runs on its own, instead of
|
|
6
|
+
* joining the transaction and vanishing with its rollback (LDB-01). Shared by
|
|
7
|
+
* the SQLite connection and the memory adapter so both isolate the same way.
|
|
8
|
+
*
|
|
9
|
+
* Pure: no engine, no React, so the memory adapter can use it without loading
|
|
10
|
+
* native code.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* How long work through the handle waits behind a transaction before it is
|
|
14
|
+
* refused.
|
|
15
|
+
*
|
|
16
|
+
* Not a performance budget: it exists for the one wait that never ends. A
|
|
17
|
+
* transaction body that awaits the handle's own `collection()` or
|
|
18
|
+
* `attachments()` is waiting on work queued behind itself. Until 0.2.0 that
|
|
19
|
+
* work ran inside the transaction; now it is refused after this long with a
|
|
20
|
+
* message naming `tx.collection()` / `tx.attachments()`, and the transaction
|
|
21
|
+
* rolls back, rather than both waiting forever.
|
|
22
|
+
*/
|
|
23
|
+
export declare const TRANSACTION_WAIT_LIMIT_MS = 10000;
|
|
24
|
+
export type TransactionQueue = {
|
|
25
|
+
/** Ordinary work. Bounded by `TRANSACTION_WAIT_LIMIT_MS` when it queues behind a transaction. */
|
|
26
|
+
run<T>(work: () => Promise<T>): Promise<T>;
|
|
27
|
+
/** A transaction: holds the queue for as long as `work` runs. */
|
|
28
|
+
runTransaction<T>(work: () => Promise<T>): Promise<T>;
|
|
29
|
+
};
|
|
30
|
+
export declare function createTransactionQueue(waitLimitMs?: number): TransactionQueue;
|
|
31
|
+
//# sourceMappingURL=transaction-queue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-queue.d.ts","sourceRoot":"","sources":["../../../../src/sqlite/transaction-queue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,yBAAyB,QAAS,CAAC;AAEhD,MAAM,MAAM,gBAAgB,GAAG;IAC9B,iGAAiG;IACjG,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3C,iEAAiE;IACjE,cAAc,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CACtD,CAAC;AAEF,wBAAgB,sBAAsB,CACrC,WAAW,GAAE,MAAkC,GAC7C,gBAAgB,CAiDlB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The transaction primitive.
|
|
3
|
+
*
|
|
4
|
+
* A transaction never spans two scopes, and not because a check forbids it:
|
|
5
|
+
* a transaction runs on one connection, a connection is opened against one
|
|
6
|
+
* scope's file, and the public surface offers no way to reach a second one
|
|
7
|
+
* from inside. FR-038 is a type error rather than a runtime one (research.md
|
|
8
|
+
* R2).
|
|
9
|
+
*
|
|
10
|
+
* Rollback fidelity is SQLite's, not this package's. A failure at any step
|
|
11
|
+
* unwinds through the engine's own `ROLLBACK`, which is the only way SC-006's
|
|
12
|
+
* "identical to its pre-transaction state, every time" survives a process
|
|
13
|
+
* kill halfway through.
|
|
14
|
+
*/
|
|
15
|
+
import type { Connection, TransactionExecutor } from './connection.js';
|
|
16
|
+
/**
|
|
17
|
+
* Run `body` inside one transaction on one scope.
|
|
18
|
+
*
|
|
19
|
+
* Deliberately thin. The interesting behavior — read-your-own-writes,
|
|
20
|
+
* terminal-state rejection, what a settled transaction does when used again —
|
|
21
|
+
* belongs to `adapter/transaction.ts`, where both adapters can be held to the
|
|
22
|
+
* same rules.
|
|
23
|
+
*/
|
|
24
|
+
export declare function runInTransaction<R>(connection: Connection, body: (tx: TransactionExecutor) => Promise<R>): Promise<R>;
|
|
25
|
+
export type { TransactionExecutor };
|
|
26
|
+
//# sourceMappingURL=transactions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../../../../src/sqlite/transactions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,iBAAc,CAAC;AAEpE;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EACjC,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,CAAC,EAAE,EAAE,mBAAmB,KAAK,OAAO,CAAC,CAAC,CAAC,GAC3C,OAAO,CAAC,CAAC,CAAC,CAEZ;AAED,YAAY,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reading values back out of a result row.
|
|
3
|
+
*
|
|
4
|
+
* The engine hands back `unknown` per column, and every read site would
|
|
5
|
+
* otherwise repeat the same `String(...)` / `Number(...)` coercion with a
|
|
6
|
+
* slightly different null check. One place to do it means one place where the
|
|
7
|
+
* "NULL means absent, not empty string" rule is decided.
|
|
8
|
+
*/
|
|
9
|
+
export declare function text(value: unknown): string;
|
|
10
|
+
export declare function num(value: unknown): number;
|
|
11
|
+
export declare function maybeText(value: unknown): string | null;
|
|
12
|
+
export declare function maybeNum(value: unknown): number | null;
|
|
13
|
+
//# sourceMappingURL=values.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"values.d.ts","sourceRoot":"","sources":["../../../../src/sqlite/values.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,wBAAgB,IAAI,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAE3C;AAED,wBAAgB,GAAG,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAE1C;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAEvD;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAEtD"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ConformanceContext } from './index.js';
|
|
2
|
+
/** US7: artifacts the package owns, and the reconciliation that keeps them honest. */
|
|
3
|
+
export declare function registerAttachmentConformance(context: ConformanceContext): void;
|
|
4
|
+
//# sourceMappingURL=attachments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attachments.d.ts","sourceRoot":"","sources":["../../../../../src/testing/conformance/attachments.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAS,CAAC;AAElD,sFAAsF;AACtF,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI,CAoI/E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encryption.d.ts","sourceRoot":"","sources":["../../../../../src/testing/conformance/encryption.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAS,CAAC;AAElD,6EAA6E;AAC7E,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI,CA+I/E"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The conformance suite: the executable definition of what the package
|
|
3
|
+
* guarantees (FR-092).
|
|
4
|
+
*
|
|
5
|
+
* Exported rather than kept internal so a consuming team can run it against
|
|
6
|
+
* their own adapter if one ever exists, and so both of ours are held to
|
|
7
|
+
* exactly the same standard rather than to two similar-looking test files.
|
|
8
|
+
*/
|
|
9
|
+
import type { StorageAdapter } from '../../contract/adapter.js';
|
|
10
|
+
import type { DatabaseConfig, ScopeTargetConfig } from '../../contract/config.js';
|
|
11
|
+
import type { EncryptionConfig } from '../../contract/encryption.js';
|
|
12
|
+
import type { ScopeDescriptor } from '../../contract/scope.js';
|
|
13
|
+
export type ConformanceContext = {
|
|
14
|
+
adapter: StorageAdapter;
|
|
15
|
+
/** A fresh config for the given scope, using the standard test schema. */
|
|
16
|
+
configFor(scope: ScopeDescriptor, overrides?: Partial<DatabaseConfig>): DatabaseConfig;
|
|
17
|
+
/**
|
|
18
|
+
* How an app names a scope for deletion.
|
|
19
|
+
*
|
|
20
|
+
* Carries the encryption config when the run is encrypted, because that is
|
|
21
|
+
* how a real consumer calls it: `ScopeTargetConfig.encryption` exists so
|
|
22
|
+
* deletion can report what it removed rather than guessing at it.
|
|
23
|
+
*/
|
|
24
|
+
scopeTargetFor(scope: ScopeDescriptor): ScopeTargetConfig;
|
|
25
|
+
reset(): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Reach past the package and delete an artifact the way the operating
|
|
28
|
+
* system does when it reclaims storage. Each adapter supplies its own,
|
|
29
|
+
* because the suite cannot simulate this through the public API without
|
|
30
|
+
* asking the package to break its own guarantee.
|
|
31
|
+
*/
|
|
32
|
+
removeArtifactBehindTheScenes(scopeKey: string, attachmentId: string): Promise<void>;
|
|
33
|
+
/** The other direction: a reference whose artifact survives. */
|
|
34
|
+
removeReferenceBehindTheScenes(scopeKey: string, attachmentId: string): Promise<void>;
|
|
35
|
+
};
|
|
36
|
+
export type ConformanceHooks = Pick<ConformanceContext, 'removeArtifactBehindTheScenes' | 'removeReferenceBehindTheScenes'>;
|
|
37
|
+
export type ConformanceOptions = {
|
|
38
|
+
/** Sections the adapter knowingly cannot satisfy, with a documented reason. */
|
|
39
|
+
skip?: ConformanceSection[];
|
|
40
|
+
/**
|
|
41
|
+
* Run every section against an encrypted database (FR-105).
|
|
42
|
+
*
|
|
43
|
+
* The suite is the contract, so the contract has to hold in both postures
|
|
44
|
+
* — an encrypted database that quietly behaved differently would be a
|
|
45
|
+
* second implementation nobody tested.
|
|
46
|
+
*/
|
|
47
|
+
encryption?: EncryptionConfig | undefined;
|
|
48
|
+
};
|
|
49
|
+
export type ConformanceSection = 'records' | 'scopes' | 'queries' | 'transactions' | 'migrations' | 'lifecycle' | 'attachments' | 'encryption';
|
|
50
|
+
export declare const TEST_COLLECTIONS: DatabaseConfig['collections'];
|
|
51
|
+
export declare function makeConformanceContext(adapter: StorageAdapter, reset: () => Promise<void>, hooks: ConformanceHooks, defaults?: Partial<DatabaseConfig>): ConformanceContext;
|
|
52
|
+
/**
|
|
53
|
+
* Registers the whole suite against one adapter. Both adapters call this with
|
|
54
|
+
* the same arguments; any difference in outcome is a divergence that must be
|
|
55
|
+
* documented under FR-096 or fixed.
|
|
56
|
+
*/
|
|
57
|
+
export declare function runConformanceSuite(factory: () => StorageAdapter, reset: () => Promise<void>, hooks: ConformanceHooks, options?: ConformanceOptions): void;
|
|
58
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/testing/conformance/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,0BAAuB,CAAC;AAC/E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAsB,CAAC;AAU5D,MAAM,MAAM,kBAAkB,GAAG;IAChC,OAAO,EAAE,cAAc,CAAC;IACxB,0EAA0E;IAC1E,SAAS,CAAC,KAAK,EAAE,eAAe,EAAE,SAAS,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,cAAc,CAAC;IACvF;;;;;;OAMG;IACH,cAAc,CAAC,KAAK,EAAE,eAAe,GAAG,iBAAiB,CAAC;IAC1D,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB;;;;;OAKG;IACH,6BAA6B,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrF,gEAAgE;IAChE,8BAA8B,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtF,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAClC,kBAAkB,EAClB,+BAA+B,GAAG,gCAAgC,CAClE,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAChC,+EAA+E;IAC/E,IAAI,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAC5B;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC;CAC1C,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAC3B,SAAS,GACT,QAAQ,GACR,SAAS,GACT,cAAc,GACd,YAAY,GACZ,WAAW,GACX,aAAa,GACb,YAAY,CAAC;AAEhB,eAAO,MAAM,gBAAgB,EAAE,cAAc,CAAC,aAAa,CAiB1D,CAAC;AAEF,wBAAgB,sBAAsB,CACrC,OAAO,EAAE,cAAc,EACvB,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,EAC1B,KAAK,EAAE,gBAAgB,EACvB,QAAQ,GAAE,OAAO,CAAC,cAAc,CAAM,GACpC,kBAAkB,CAwBpB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAClC,OAAO,EAAE,MAAM,cAAc,EAC7B,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,EAC1B,KAAK,EAAE,gBAAgB,EACvB,OAAO,GAAE,kBAAuB,GAC9B,IAAI,CA0BN"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ConformanceContext } from './index.js';
|
|
2
|
+
/** US6: sign-out retains; deletion happens only when asked, and only where asked. */
|
|
3
|
+
export declare function registerLifecycleConformance(context: ConformanceContext): void;
|
|
4
|
+
//# sourceMappingURL=lifecycle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../../../src/testing/conformance/lifecycle.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAS,CAAC;AAElD,qFAAqF;AACrF,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI,CA8F9E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../../../../src/testing/conformance/migrations.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAS,CAAC;AAElD,2DAA2D;AAC3D,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI,CA0K9E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../../../src/testing/conformance/queries.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAS,CAAC;AAElD,sEAAsE;AACtE,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI,CAsM1E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"records.d.ts","sourceRoot":"","sources":["../../../../../src/testing/conformance/records.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAS,CAAC;AAElD,gFAAgF;AAChF,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI,CAmK3E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../../../../../src/testing/conformance/scopes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAS,CAAC;AAElD,4EAA4E;AAC5E,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI,CAiF1E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../../../../../src/testing/conformance/transactions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAS,CAAC;AAElD,kCAAkC;AAClC,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI,CA+IhF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fault injection, exposed only through the `./testing` entrypoint.
|
|
3
|
+
*
|
|
4
|
+
* Produces the same typed errors the on-device implementation produces, so a
|
|
5
|
+
* consumer can test its recovery paths without a device that is actually out
|
|
6
|
+
* of space or actually corrupt (FR-095). The registry itself lives in
|
|
7
|
+
* `diagnostics/faults.ts`, because the *checks* have to run in production code
|
|
8
|
+
* for the demo app's panel to exercise the real adapter — only the ability to
|
|
9
|
+
* arm one is kept behind this entrypoint.
|
|
10
|
+
*/
|
|
11
|
+
export { activeFaults, clearFaults, injectFault, throwIfFaulted, type FaultPoint, type FaultSpec, } from '../diagnostics/faults.js';
|
|
12
|
+
export { DiagnosticCodes } from '../contract/errors.js';
|
|
13
|
+
//# sourceMappingURL=faults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"faults.d.ts","sourceRoot":"","sources":["../../../../src/testing/faults.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACN,YAAY,EACZ,WAAW,EACX,WAAW,EACX,cAAc,EACd,KAAK,UAAU,EACf,KAAK,SAAS,GACd,MAAM,0BAAuB,CAAC;AAE/B,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAoB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@chipmobilesdk/rn-local-db/testing`
|
|
3
|
+
*
|
|
4
|
+
* Test-only surface, kept behind its own entrypoint so the in-memory engine
|
|
5
|
+
* never reaches a consuming app's production bundle (research.md R10).
|
|
6
|
+
*/
|
|
7
|
+
export { createMemoryAdapter, type MemoryAdapterOptions } from './memory-adapter/index.js';
|
|
8
|
+
export { memoryConformanceHooks, resetMemoryAdapter, seedRecords } from './memory-adapter/reset.js';
|
|
9
|
+
export { clearFaults, injectFault, type FaultPoint, type FaultSpec } from './faults.js';
|
|
10
|
+
/** Makes `openDatabase` and the deletion functions use the given adapter; `null` restores the device one. */
|
|
11
|
+
export { setStorageAdapter } from '../adapter/index.js';
|
|
12
|
+
export { runConformanceSuite, type ConformanceContext, type ConformanceHooks, type ConformanceOptions, type ConformanceSection, } from './conformance/index.js';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/testing/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,mBAAmB,EAAE,KAAK,oBAAoB,EAAE,MAAM,2BAAkB,CAAC;AAClF,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,2BAAwB,CAAC;AACjG,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,aAAU,CAAC;AACrF,6GAA6G;AAC7G,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAY,CAAC;AAC/C,OAAO,EACN,mBAAmB,EACnB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,GACvB,MAAM,wBAAe,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The in-memory adapter's attachments (FR-091).
|
|
3
|
+
*
|
|
4
|
+
* The same surface the SQLite adapter exposes, over the store's maps: written
|
|
5
|
+
* whole rather than chunked, no filesystem, and a `sourcePath` read through the
|
|
6
|
+
* `readSourceFile` option a test supplies. Divergences are documented in the
|
|
7
|
+
* package README.
|
|
8
|
+
*/
|
|
9
|
+
import type { Attachments } from '../../contract/adapter.js';
|
|
10
|
+
import type { MemoryScopeStore } from './store.js';
|
|
11
|
+
import type { MemoryAdapterOptions } from './index.js';
|
|
12
|
+
/** What one artifact removal has to wait for: the transaction that caused it. */
|
|
13
|
+
export interface Deferred {
|
|
14
|
+
add(id: string): void;
|
|
15
|
+
}
|
|
16
|
+
export interface MemoryAttachmentDeps {
|
|
17
|
+
store: MemoryScopeStore;
|
|
18
|
+
options: MemoryAdapterOptions;
|
|
19
|
+
now: () => number;
|
|
20
|
+
assertOpen: () => void;
|
|
21
|
+
}
|
|
22
|
+
export declare function createMemoryAttachments(deps: MemoryAttachmentDeps): (deferred?: Deferred) => Attachments;
|
|
23
|
+
//# sourceMappingURL=attachments.d.ts.map
|