@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,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TRANSACTION_WAIT_LIMIT_MS = void 0;
|
|
7
|
+
exports.createTransactionQueue = createTransactionQueue;
|
|
8
|
+
var _errors = require("../contract/errors.js");
|
|
9
|
+
var _errors2 = require("../diagnostics/errors.js");
|
|
10
|
+
/**
|
|
11
|
+
* The per-handle queue that keeps a transaction to itself.
|
|
12
|
+
*
|
|
13
|
+
* A transaction holds the queue until it settles; work arriving meanwhile
|
|
14
|
+
* through the handle waits its turn and then runs on its own, instead of
|
|
15
|
+
* joining the transaction and vanishing with its rollback (LDB-01). Shared by
|
|
16
|
+
* the SQLite connection and the memory adapter so both isolate the same way.
|
|
17
|
+
*
|
|
18
|
+
* Pure: no engine, no React, so the memory adapter can use it without loading
|
|
19
|
+
* native code.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* How long work through the handle waits behind a transaction before it is
|
|
24
|
+
* refused.
|
|
25
|
+
*
|
|
26
|
+
* Not a performance budget: it exists for the one wait that never ends. A
|
|
27
|
+
* transaction body that awaits the handle's own `collection()` or
|
|
28
|
+
* `attachments()` is waiting on work queued behind itself. Until 0.2.0 that
|
|
29
|
+
* work ran inside the transaction; now it is refused after this long with a
|
|
30
|
+
* message naming `tx.collection()` / `tx.attachments()`, and the transaction
|
|
31
|
+
* rolls back, rather than both waiting forever.
|
|
32
|
+
*/
|
|
33
|
+
const TRANSACTION_WAIT_LIMIT_MS = exports.TRANSACTION_WAIT_LIMIT_MS = 10_000;
|
|
34
|
+
function createTransactionQueue(waitLimitMs = TRANSACTION_WAIT_LIMIT_MS) {
|
|
35
|
+
/** Tail of the queue. Never rejects, so one failure cannot stall the rest. */
|
|
36
|
+
let tail = Promise.resolve();
|
|
37
|
+
/** Transactions queued or running. Only work behind one of them can deadlock. */
|
|
38
|
+
let transactions = 0;
|
|
39
|
+
const enqueue = work => {
|
|
40
|
+
const run = tail.then(work, work);
|
|
41
|
+
tail = run.catch(() => undefined);
|
|
42
|
+
return run;
|
|
43
|
+
};
|
|
44
|
+
return {
|
|
45
|
+
run(work) {
|
|
46
|
+
if (transactions === 0) {
|
|
47
|
+
return enqueue(work);
|
|
48
|
+
}
|
|
49
|
+
let abandoned = false;
|
|
50
|
+
let timer;
|
|
51
|
+
const started = enqueue(() => {
|
|
52
|
+
clearTimeout(timer);
|
|
53
|
+
// Refused while waiting: it must not run late, after its caller was
|
|
54
|
+
// already told it failed.
|
|
55
|
+
return abandoned ? Promise.resolve(undefined) : work();
|
|
56
|
+
});
|
|
57
|
+
const refused = new Promise((_, reject) => {
|
|
58
|
+
timer = setTimeout(() => {
|
|
59
|
+
abandoned = true;
|
|
60
|
+
try {
|
|
61
|
+
(0, _errors2.raise)(_errors.DiagnosticCodes.TRANSACTION_STATE, {
|
|
62
|
+
message: 'waited too long behind an in-flight transaction; inside a transaction body use tx.collection() and tx.attachments(), not the handle'
|
|
63
|
+
});
|
|
64
|
+
} catch (error) {
|
|
65
|
+
reject(error);
|
|
66
|
+
}
|
|
67
|
+
}, waitLimitMs);
|
|
68
|
+
});
|
|
69
|
+
return Promise.race([started, refused]);
|
|
70
|
+
},
|
|
71
|
+
runTransaction(work) {
|
|
72
|
+
transactions += 1;
|
|
73
|
+
return enqueue(work).finally(() => {
|
|
74
|
+
transactions -= 1;
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=transaction-queue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_errors","require","_errors2","TRANSACTION_WAIT_LIMIT_MS","exports","createTransactionQueue","waitLimitMs","tail","Promise","resolve","transactions","enqueue","work","run","then","catch","undefined","abandoned","timer","started","clearTimeout","refused","_","reject","setTimeout","raise","DiagnosticCodes","TRANSACTION_STATE","message","error","race","runTransaction","finally"],"sourceRoot":"../../../src","sources":["sqlite/transaction-queue.ts"],"mappings":";;;;;;;AAYA,IAAAA,OAAA,GAA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,MAAM,CAACM,KAAK,CAAC;UACd;QACD,CAAC,EAAEvB,WAAW,CAAC;MAChB,CAAC,CAAC;MACF,OAAOE,OAAO,CAACsB,IAAI,CAAC,CAACX,OAAO,EAAEE,OAAO,CAAC,CAAC;IACxC,CAAC;IAEDU,cAAcA,CAAInB,IAAsB,EAAc;MACrDF,YAAY,IAAI,CAAC;MACjB,OAAOC,OAAO,CAACC,IAAI,CAAC,CAACoB,OAAO,CAAC,MAAM;QAClCtB,YAAY,IAAI,CAAC;MAClB,CAAC,CAAC;IACH;EACD,CAAC;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.runInTransaction = runInTransaction;
|
|
7
|
+
/**
|
|
8
|
+
* The transaction primitive.
|
|
9
|
+
*
|
|
10
|
+
* A transaction never spans two scopes, and not because a check forbids it:
|
|
11
|
+
* a transaction runs on one connection, a connection is opened against one
|
|
12
|
+
* scope's file, and the public surface offers no way to reach a second one
|
|
13
|
+
* from inside. FR-038 is a type error rather than a runtime one (research.md
|
|
14
|
+
* R2).
|
|
15
|
+
*
|
|
16
|
+
* Rollback fidelity is SQLite's, not this package's. A failure at any step
|
|
17
|
+
* unwinds through the engine's own `ROLLBACK`, which is the only way SC-006's
|
|
18
|
+
* "identical to its pre-transaction state, every time" survives a process
|
|
19
|
+
* kill halfway through.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Run `body` inside one transaction on one scope.
|
|
24
|
+
*
|
|
25
|
+
* Deliberately thin. The interesting behavior — read-your-own-writes,
|
|
26
|
+
* terminal-state rejection, what a settled transaction does when used again —
|
|
27
|
+
* belongs to `adapter/transaction.ts`, where both adapters can be held to the
|
|
28
|
+
* same rules.
|
|
29
|
+
*/
|
|
30
|
+
function runInTransaction(connection, body) {
|
|
31
|
+
return connection.transaction(body);
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=transactions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["runInTransaction","connection","body","transaction"],"sourceRoot":"../../../src","sources":["sqlite/transactions.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,gBAAgBA,CAC/BC,UAAsB,EACtBC,IAA6C,EAChC;EACb,OAAOD,UAAU,CAACE,WAAW,CAACD,IAAI,CAAC;AACpC","ignoreList":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.maybeNum = maybeNum;
|
|
7
|
+
exports.maybeText = maybeText;
|
|
8
|
+
exports.num = num;
|
|
9
|
+
exports.text = text;
|
|
10
|
+
/**
|
|
11
|
+
* Reading values back out of a result row.
|
|
12
|
+
*
|
|
13
|
+
* The engine hands back `unknown` per column, and every read site would
|
|
14
|
+
* otherwise repeat the same `String(...)` / `Number(...)` coercion with a
|
|
15
|
+
* slightly different null check. One place to do it means one place where the
|
|
16
|
+
* "NULL means absent, not empty string" rule is decided.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
function text(value) {
|
|
20
|
+
return typeof value === 'string' ? value : String(value);
|
|
21
|
+
}
|
|
22
|
+
function num(value) {
|
|
23
|
+
return typeof value === 'number' ? value : Number(value);
|
|
24
|
+
}
|
|
25
|
+
function maybeText(value) {
|
|
26
|
+
return value == null ? null : text(value);
|
|
27
|
+
}
|
|
28
|
+
function maybeNum(value) {
|
|
29
|
+
return value == null ? null : num(value);
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=values.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["text","value","String","num","Number","maybeText","maybeNum"],"sourceRoot":"../../../src","sources":["sqlite/values.ts"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO,SAASA,IAAIA,CAACC,KAAc,EAAU;EAC5C,OAAO,OAAOA,KAAK,KAAK,QAAQ,GAAGA,KAAK,GAAGC,MAAM,CAACD,KAAkC,CAAC;AACtF;AAEO,SAASE,GAAGA,CAACF,KAAc,EAAU;EAC3C,OAAO,OAAOA,KAAK,KAAK,QAAQ,GAAGA,KAAK,GAAGG,MAAM,CAACH,KAAwB,CAAC;AAC5E;AAEO,SAASI,SAASA,CAACJ,KAAc,EAAiB;EACxD,OAAOA,KAAK,IAAI,IAAI,GAAG,IAAI,GAAGD,IAAI,CAACC,KAAK,CAAC;AAC1C;AAEO,SAASK,QAAQA,CAACL,KAAc,EAAiB;EACvD,OAAOA,KAAK,IAAI,IAAI,GAAG,IAAI,GAAGE,GAAG,CAACF,KAAK,CAAC;AACzC","ignoreList":[]}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.registerAttachmentConformance = registerAttachmentConformance;
|
|
7
|
+
var _errors = require("../../contract/errors.js");
|
|
8
|
+
var _errors2 = require("../../diagnostics/errors.js");
|
|
9
|
+
var _bytes = require("../../platform/bytes.js");
|
|
10
|
+
/** US7: artifacts the package owns, and the reconciliation that keeps them honest. */
|
|
11
|
+
function registerAttachmentConformance(context) {
|
|
12
|
+
describe('conformance: attachments', () => {
|
|
13
|
+
beforeEach(() => context.reset());
|
|
14
|
+
const scope = {
|
|
15
|
+
kind: 'guest'
|
|
16
|
+
};
|
|
17
|
+
const content = (0, _bytes.bytesToBase64)((0, _bytes.utf8Bytes)('hello attachment'));
|
|
18
|
+
it('stores a reference alongside the artifact', async () => {
|
|
19
|
+
const handle = await context.adapter.open(context.configFor(scope));
|
|
20
|
+
const attachments = handle.attachments();
|
|
21
|
+
const reference = await attachments.write({
|
|
22
|
+
id: 'a1',
|
|
23
|
+
owner: {
|
|
24
|
+
collection: 'notes',
|
|
25
|
+
id: 'n1'
|
|
26
|
+
},
|
|
27
|
+
contentType: 'text/plain',
|
|
28
|
+
content
|
|
29
|
+
});
|
|
30
|
+
expect(reference.size).toBe((0, _bytes.base64ToBytes)(content).length);
|
|
31
|
+
expect(await attachments.read('a1')).toBe(content);
|
|
32
|
+
expect((await attachments.availability('a1')).state).toBe('available');
|
|
33
|
+
await handle.close();
|
|
34
|
+
});
|
|
35
|
+
it('reads a byte range without materialising the whole artifact', async () => {
|
|
36
|
+
const handle = await context.adapter.open(context.configFor(scope));
|
|
37
|
+
const attachments = handle.attachments();
|
|
38
|
+
await attachments.write({
|
|
39
|
+
id: 'a1',
|
|
40
|
+
contentType: 'text/plain',
|
|
41
|
+
content
|
|
42
|
+
});
|
|
43
|
+
const slice = await attachments.read('a1', {
|
|
44
|
+
offset: 0,
|
|
45
|
+
length: 5
|
|
46
|
+
});
|
|
47
|
+
expect((0, _bytes.utf8String)((0, _bytes.base64ToBytes)(slice))).toBe('hello');
|
|
48
|
+
await handle.close();
|
|
49
|
+
});
|
|
50
|
+
it('lists the attachments belonging to a record', async () => {
|
|
51
|
+
const handle = await context.adapter.open(context.configFor(scope));
|
|
52
|
+
const attachments = handle.attachments();
|
|
53
|
+
await attachments.write({
|
|
54
|
+
id: 'a1',
|
|
55
|
+
owner: {
|
|
56
|
+
collection: 'notes',
|
|
57
|
+
id: 'n1'
|
|
58
|
+
},
|
|
59
|
+
contentType: 'text/plain',
|
|
60
|
+
content
|
|
61
|
+
});
|
|
62
|
+
await attachments.write({
|
|
63
|
+
id: 'a2',
|
|
64
|
+
contentType: 'text/plain',
|
|
65
|
+
content
|
|
66
|
+
});
|
|
67
|
+
const owned = await attachments.listFor({
|
|
68
|
+
collection: 'notes',
|
|
69
|
+
id: 'n1'
|
|
70
|
+
});
|
|
71
|
+
expect(owned.map(r => r.id)).toEqual(['a1']);
|
|
72
|
+
await handle.close();
|
|
73
|
+
});
|
|
74
|
+
it('reports a missing artifact without making the record unreadable', async () => {
|
|
75
|
+
const handle = await context.adapter.open(context.configFor(scope));
|
|
76
|
+
await handle.collection('notes').insert({
|
|
77
|
+
id: 'n1',
|
|
78
|
+
data: {
|
|
79
|
+
title: 'has media'
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
const attachments = handle.attachments();
|
|
83
|
+
await attachments.write({
|
|
84
|
+
id: 'a1',
|
|
85
|
+
owner: {
|
|
86
|
+
collection: 'notes',
|
|
87
|
+
id: 'n1'
|
|
88
|
+
},
|
|
89
|
+
contentType: 'text/plain',
|
|
90
|
+
content
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
// Remove the artifact behind the package's back.
|
|
94
|
+
await context.removeArtifactBehindTheScenes(handle.scopeKey, 'a1');
|
|
95
|
+
expect((await attachments.availability('a1')).state).toBe('missing');
|
|
96
|
+
expect((await handle.collection('notes').get('n1')).data.title).toBe('has media');
|
|
97
|
+
await handle.close();
|
|
98
|
+
});
|
|
99
|
+
it('finds an orphaned artifact and a dangling reference', async () => {
|
|
100
|
+
const handle = await context.adapter.open(context.configFor(scope));
|
|
101
|
+
const attachments = handle.attachments();
|
|
102
|
+
await attachments.write({
|
|
103
|
+
id: 'a1',
|
|
104
|
+
contentType: 'text/plain',
|
|
105
|
+
content
|
|
106
|
+
});
|
|
107
|
+
await context.removeReferenceBehindTheScenes(handle.scopeKey, 'a1');
|
|
108
|
+
await attachments.write({
|
|
109
|
+
id: 'a2',
|
|
110
|
+
contentType: 'text/plain',
|
|
111
|
+
content
|
|
112
|
+
});
|
|
113
|
+
await context.removeArtifactBehindTheScenes(handle.scopeKey, 'a2');
|
|
114
|
+
const report = await attachments.reconcile();
|
|
115
|
+
expect(report.orphanedArtifacts).toEqual(['a1']);
|
|
116
|
+
expect(report.danglingReferences).toEqual(['a2']);
|
|
117
|
+
const removed = await attachments.reconcile({
|
|
118
|
+
removeOrphans: true
|
|
119
|
+
});
|
|
120
|
+
expect(removed.removedArtifacts).toEqual(['a1']);
|
|
121
|
+
expect((await attachments.reconcile()).orphanedArtifacts).toEqual([]);
|
|
122
|
+
await handle.close();
|
|
123
|
+
});
|
|
124
|
+
it('rolls a reference back with its transaction', async () => {
|
|
125
|
+
const handle = await context.adapter.open(context.configFor(scope));
|
|
126
|
+
try {
|
|
127
|
+
await handle.transaction(async tx => {
|
|
128
|
+
await tx.collection('notes').insert({
|
|
129
|
+
id: 'n1',
|
|
130
|
+
data: {
|
|
131
|
+
title: 'x'
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
await tx.attachments().write({
|
|
135
|
+
id: 'a1',
|
|
136
|
+
contentType: 'text/plain',
|
|
137
|
+
content
|
|
138
|
+
});
|
|
139
|
+
throw new Error('injected');
|
|
140
|
+
});
|
|
141
|
+
} catch {
|
|
142
|
+
// Expected.
|
|
143
|
+
}
|
|
144
|
+
expect(await handle.collection('notes').find('n1')).toBeNull();
|
|
145
|
+
// The reference is gone; the artifact on disk is not, which is
|
|
146
|
+
// exactly why reconciliation exists.
|
|
147
|
+
const report = await handle.attachments().reconcile();
|
|
148
|
+
expect(report.orphanedArtifacts).toEqual(['a1']);
|
|
149
|
+
await handle.close();
|
|
150
|
+
});
|
|
151
|
+
it('rejects an artifact over the size budget', async () => {
|
|
152
|
+
const handle = await context.adapter.open(context.configFor(scope));
|
|
153
|
+
const huge = (0, _bytes.bytesToBase64)(new Uint8Array(101 * 1024 * 1024));
|
|
154
|
+
let thrown;
|
|
155
|
+
try {
|
|
156
|
+
await handle.attachments().write({
|
|
157
|
+
id: 'big',
|
|
158
|
+
contentType: 'application/octet-stream',
|
|
159
|
+
content: huge
|
|
160
|
+
});
|
|
161
|
+
} catch (error) {
|
|
162
|
+
thrown = error;
|
|
163
|
+
}
|
|
164
|
+
expect((0, _errors2.isCode)(thrown, _errors.DiagnosticCodes.ATTACHMENT_WRITE_FAILED)).toBe(true);
|
|
165
|
+
await handle.close();
|
|
166
|
+
});
|
|
167
|
+
it('removes artifacts when the scope is deleted', async () => {
|
|
168
|
+
const handle = await context.adapter.open(context.configFor(scope));
|
|
169
|
+
await handle.attachments().write({
|
|
170
|
+
id: 'a1',
|
|
171
|
+
contentType: 'text/plain',
|
|
172
|
+
content
|
|
173
|
+
});
|
|
174
|
+
await handle.close();
|
|
175
|
+
const outcome = await context.adapter.deleteScopeData(context.scopeTargetFor(scope));
|
|
176
|
+
expect(outcome.removedArtifacts).toContain('a1');
|
|
177
|
+
});
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
//# sourceMappingURL=attachments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_errors","require","_errors2","_bytes","registerAttachmentConformance","context","describe","beforeEach","reset","scope","kind","content","bytesToBase64","utf8Bytes","it","handle","adapter","open","configFor","attachments","reference","write","id","owner","collection","contentType","expect","size","toBe","base64ToBytes","length","read","availability","state","close","slice","offset","utf8String","owned","listFor","map","r","toEqual","insert","data","title","removeArtifactBehindTheScenes","scopeKey","get","removeReferenceBehindTheScenes","report","reconcile","orphanedArtifacts","danglingReferences","removed","removeOrphans","removedArtifacts","transaction","tx","Error","find","toBeNull","huge","Uint8Array","thrown","error","isCode","DiagnosticCodes","ATTACHMENT_WRITE_FAILED","outcome","deleteScopeData","scopeTargetFor","toContain"],"sourceRoot":"../../../../src","sources":["testing/conformance/attachments.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAGA;AACO,SAASG,6BAA6BA,CAACC,OAA2B,EAAQ;EAChFC,QAAQ,CAAC,0BAA0B,EAAE,MAAM;IAC1CC,UAAU,CAAC,MAAMF,OAAO,CAACG,KAAK,CAAC,CAAC,CAAC;IAEjC,MAAMC,KAAK,GAAG;M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,eAAM,EAACF,MAAM,EAAEG,uBAAe,CAACC,uBAAuB,CAAC,CAAC,CAACxC,IAAI,CAAC,IAAI,CAAC;MAC1E,MAAMb,MAAM,CAACmB,KAAK,CAAC,CAAC;IACrB,CAAC,CAAC;IAEFpB,EAAE,CAAC,6CAA6C,EAAE,YAAY;MAC7D,MAAMC,MAAM,GAAG,MAAMV,OAAO,CAACW,OAAO,CAACC,IAAI,CAACZ,OAAO,CAACa,SAAS,CAACT,KAAK,CAAC,CAAC;MACnE,MAAMM,MAAM,CAACI,WAAW,CAAC,CAAC,CAACE,KAAK,CAAC;QAAEC,EAAE,EAAE,IAAI;QAAEG,WAAW,EAAE,YAAY;QAAEd;MAAQ,CAAC,CAAC;MAClF,MAAMI,MAAM,CAACmB,KAAK,CAAC,CAAC;MAEpB,MAAMmC,OAAO,GAAG,MAAMhE,OAAO,CAACW,OAAO,CAACsD,eAAe,CAACjE,OAAO,CAACkE,cAAc,CAAC9D,KAAK,CAAC,CAAC;MACpFiB,MAAM,CAAC2C,OAAO,CAACb,gBAAgB,CAAC,CAACgB,SAAS,CAAC,IAAI,CAAC;IACjD,CAAC,CAAC;EACH,CAAC,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.registerEncryptionConformance = registerEncryptionConformance;
|
|
7
|
+
var _errors = require("../../contract/errors.js");
|
|
8
|
+
var _errors2 = require("../../diagnostics/errors.js");
|
|
9
|
+
var _bytes = require("../../platform/bytes.js");
|
|
10
|
+
/** US10: opt-in encryption, and failures that stay apart from each other. */
|
|
11
|
+
function registerEncryptionConformance(context) {
|
|
12
|
+
describe('conformance: encryption', () => {
|
|
13
|
+
beforeEach(() => context.reset());
|
|
14
|
+
const scope = {
|
|
15
|
+
kind: 'identity',
|
|
16
|
+
id: 'encrypted'
|
|
17
|
+
};
|
|
18
|
+
const keyProvider = {
|
|
19
|
+
getKey: async () => 'a-correct-key-32-bytes-long-value'
|
|
20
|
+
};
|
|
21
|
+
const encrypted = {
|
|
22
|
+
enabled: true,
|
|
23
|
+
keyProvider
|
|
24
|
+
};
|
|
25
|
+
it('reports its own posture', async () => {
|
|
26
|
+
const handle = await context.adapter.open(context.configFor(scope, {
|
|
27
|
+
encryption: encrypted
|
|
28
|
+
}));
|
|
29
|
+
expect(handle.isEncrypted).toBe(true);
|
|
30
|
+
await handle.close();
|
|
31
|
+
const plain = await context.adapter.open(context.configFor({
|
|
32
|
+
kind: 'identity',
|
|
33
|
+
id: 'plain'
|
|
34
|
+
}, {
|
|
35
|
+
encryption: undefined
|
|
36
|
+
}));
|
|
37
|
+
expect(plain.isEncrypted).toBe(false);
|
|
38
|
+
await plain.close();
|
|
39
|
+
});
|
|
40
|
+
it('stores and returns records unchanged under encryption', async () => {
|
|
41
|
+
const handle = await context.adapter.open(context.configFor(scope, {
|
|
42
|
+
encryption: encrypted
|
|
43
|
+
}));
|
|
44
|
+
const data = {
|
|
45
|
+
title: 'secret',
|
|
46
|
+
score: 1,
|
|
47
|
+
nested: {
|
|
48
|
+
deep: [1, null, true]
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
await handle.collection('notes').insert({
|
|
52
|
+
id: 'a',
|
|
53
|
+
data
|
|
54
|
+
});
|
|
55
|
+
expect((await handle.collection('notes').get('a')).data).toEqual(data);
|
|
56
|
+
await handle.close();
|
|
57
|
+
const reopened = await context.adapter.open(context.configFor(scope, {
|
|
58
|
+
encryption: encrypted
|
|
59
|
+
}));
|
|
60
|
+
expect((await reopened.collection('notes').get('a')).data).toEqual(data);
|
|
61
|
+
await reopened.close();
|
|
62
|
+
});
|
|
63
|
+
it('round-trips an artifact under encryption, including a byte range', async () => {
|
|
64
|
+
const handle = await context.adapter.open(context.configFor(scope, {
|
|
65
|
+
encryption: encrypted
|
|
66
|
+
}));
|
|
67
|
+
const content = (0, _bytes.bytesToBase64)((0, _bytes.utf8Bytes)('hello encrypted attachment'));
|
|
68
|
+
await handle.attachments().write({
|
|
69
|
+
id: 'a1',
|
|
70
|
+
contentType: 'text/plain',
|
|
71
|
+
content
|
|
72
|
+
});
|
|
73
|
+
expect(await handle.attachments().read('a1')).toBe(content);
|
|
74
|
+
const slice = await handle.attachments().read('a1', {
|
|
75
|
+
offset: 6,
|
|
76
|
+
length: 9
|
|
77
|
+
});
|
|
78
|
+
expect((0, _bytes.utf8String)((0, _bytes.base64ToBytes)(slice))).toBe('encrypted');
|
|
79
|
+
expect((await handle.attachments().availability('a1')).state).toBe('available');
|
|
80
|
+
await handle.close();
|
|
81
|
+
});
|
|
82
|
+
it('reports a key-provider failure separately from an invalid key', async () => {
|
|
83
|
+
let thrown;
|
|
84
|
+
try {
|
|
85
|
+
await context.adapter.open(context.configFor(scope, {
|
|
86
|
+
encryption: {
|
|
87
|
+
enabled: true,
|
|
88
|
+
keyProvider: {
|
|
89
|
+
getKey: async () => {
|
|
90
|
+
throw new Error('device is locked');
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}));
|
|
95
|
+
} catch (error) {
|
|
96
|
+
thrown = error;
|
|
97
|
+
}
|
|
98
|
+
expect((0, _errors2.isCode)(thrown, _errors.DiagnosticCodes.KEY_PROVIDER_FAILED)).toBe(true);
|
|
99
|
+
let empty;
|
|
100
|
+
try {
|
|
101
|
+
await context.adapter.open(context.configFor(scope, {
|
|
102
|
+
encryption: {
|
|
103
|
+
enabled: true,
|
|
104
|
+
keyProvider: {
|
|
105
|
+
getKey: async () => ''
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}));
|
|
109
|
+
} catch (error) {
|
|
110
|
+
empty = error;
|
|
111
|
+
}
|
|
112
|
+
expect((0, _errors2.isCode)(empty, _errors.DiagnosticCodes.KEY_INVALID)).toBe(true);
|
|
113
|
+
});
|
|
114
|
+
it('reports a posture mismatch rather than opening or converting', async () => {
|
|
115
|
+
const plain = await context.adapter.open(context.configFor(scope));
|
|
116
|
+
await plain.collection('notes').insert({
|
|
117
|
+
id: 'a',
|
|
118
|
+
data: {
|
|
119
|
+
title: 'plaintext'
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
await plain.close();
|
|
123
|
+
let thrown;
|
|
124
|
+
try {
|
|
125
|
+
await context.adapter.open(context.configFor(scope, {
|
|
126
|
+
encryption: encrypted
|
|
127
|
+
}));
|
|
128
|
+
} catch (error) {
|
|
129
|
+
thrown = error;
|
|
130
|
+
}
|
|
131
|
+
expect((0, _errors2.isCode)(thrown, _errors.DiagnosticCodes.ENCRYPTION_MISMATCH)).toBe(true);
|
|
132
|
+
|
|
133
|
+
// Nothing was converted, truncated, or discarded.
|
|
134
|
+
const reopened = await context.adapter.open(context.configFor(scope));
|
|
135
|
+
expect((await reopened.collection('notes').get('a')).data.title).toBe('plaintext');
|
|
136
|
+
await reopened.close();
|
|
137
|
+
});
|
|
138
|
+
it('gives the key provider the scope, so an app can key per identity', async () => {
|
|
139
|
+
const seen = [];
|
|
140
|
+
const recording = {
|
|
141
|
+
getKey: async resolved => {
|
|
142
|
+
seen.push(resolved.key);
|
|
143
|
+
return `key-for-${resolved.key}`;
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
for (const id of ['alice', 'bob']) {
|
|
147
|
+
const handle = await context.adapter.open(context.configFor({
|
|
148
|
+
kind: 'identity',
|
|
149
|
+
id
|
|
150
|
+
}, {
|
|
151
|
+
encryption: {
|
|
152
|
+
enabled: true,
|
|
153
|
+
keyProvider: recording
|
|
154
|
+
}
|
|
155
|
+
}));
|
|
156
|
+
await handle.close();
|
|
157
|
+
}
|
|
158
|
+
expect(seen).toHaveLength(2);
|
|
159
|
+
expect(new Set(seen).size).toBe(2);
|
|
160
|
+
for (const key of seen) {
|
|
161
|
+
expect(key).toMatch(/^[0-9a-f]{64}$/);
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
it('keeps an encrypted scope isolated from an unencrypted sibling', async () => {
|
|
165
|
+
const secure = await context.adapter.open(context.configFor({
|
|
166
|
+
kind: 'identity',
|
|
167
|
+
id: 'secure'
|
|
168
|
+
}, {
|
|
169
|
+
encryption: encrypted
|
|
170
|
+
}));
|
|
171
|
+
await secure.collection('notes').insert({
|
|
172
|
+
id: 'shared',
|
|
173
|
+
data: {
|
|
174
|
+
title: 'secure'
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
await secure.close();
|
|
178
|
+
const open = await context.adapter.open(context.configFor({
|
|
179
|
+
kind: 'identity',
|
|
180
|
+
id: 'open'
|
|
181
|
+
}));
|
|
182
|
+
expect(await open.collection('notes').find('shared')).toBeNull();
|
|
183
|
+
await open.close();
|
|
184
|
+
});
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
//# sourceMappingURL=encryption.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_errors","require","_errors2","_bytes","registerEncryptionConformance","context","describe","beforeEach","reset","scope","kind","id","keyProvider","getKey","encrypted","enabled","it","handle","adapter","open","configFor","encryption","expect","isEncrypted","toBe","close","plain","undefined","data","title","score","nested","deep","collection","insert","get","toEqual","reopened","content","bytesToBase64","utf8Bytes","attachments","write","contentType","read","slice","offset","length","utf8String","base64ToBytes","availability","state","thrown","Error","error","isCode","DiagnosticCodes","KEY_PROVIDER_FAILED","empty","KEY_INVALID","ENCRYPTION_MISMATCH","seen","recording","resolved","push","key","toHaveLength","Set","size","toMatch","secure","find","toBeNull"],"sourceRoot":"../../../../src","sources":["testing/conformance/encryption.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAGA;AACO,SAASG,6BAA6BA,CAACC,OAA2B,EAAQ;EAChFC,QAAQ,CAAC,yBAAyB,EAAE,MAAM;IACzCC,UAAU,CAAC,MAAMF,OAAO,CAACG,KAA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AU,EAAEP;MAAU,CAAC,CAChF,CAAC;MACD,MAAMwD,MAAM,CAACrC,UAAU,CAAC,OAAO,CAAC,CAACC,MAAM,CAAC;QAAEvB,EAAE,EAAE,QAAQ;QAAEiB,IAAI,EAAE;UAAEC,KAAK,EAAE;QAAS;MAAE,CAAC,CAAC;MACpF,MAAMyC,MAAM,CAAC7C,KAAK,CAAC,CAAC;MAEpB,MAAMN,IAAI,GAAG,MAAMd,OAAO,CAACa,OAAO,CAACC,IAAI,CAACd,OAAO,CAACe,SAAS,CAAC;QAAEV,IAAI,EAAE,UAAU;QAAEC,EAAE,EAAE;MAAO,CAAC,CAAC,CAAC;MAC5FW,MAAM,CAAC,MAAMH,IAAI,CAACc,UAAU,CAAC,OAAO,CAAC,CAACsC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;MAChE,MAAMrD,IAAI,CAACM,KAAK,CAAC,CAAC;IACnB,CAAC,CAAC;EACH,CAAC,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TEST_COLLECTIONS = void 0;
|
|
7
|
+
exports.makeConformanceContext = makeConformanceContext;
|
|
8
|
+
exports.runConformanceSuite = runConformanceSuite;
|
|
9
|
+
var _records = require("./records.js");
|
|
10
|
+
var _scopes = require("./scopes.js");
|
|
11
|
+
var _queries = require("./queries.js");
|
|
12
|
+
var _transactions = require("./transactions.js");
|
|
13
|
+
var _migrations = require("./migrations.js");
|
|
14
|
+
var _lifecycle = require("./lifecycle.js");
|
|
15
|
+
var _attachments = require("./attachments.js");
|
|
16
|
+
var _encryption = require("./encryption.js");
|
|
17
|
+
/**
|
|
18
|
+
* The conformance suite: the executable definition of what the package
|
|
19
|
+
* guarantees (FR-092).
|
|
20
|
+
*
|
|
21
|
+
* Exported rather than kept internal so a consuming team can run it against
|
|
22
|
+
* their own adapter if one ever exists, and so both of ours are held to
|
|
23
|
+
* exactly the same standard rather than to two similar-looking test files.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
const TEST_COLLECTIONS = exports.TEST_COLLECTIONS = [{
|
|
27
|
+
name: 'notes',
|
|
28
|
+
fields: [{
|
|
29
|
+
name: 'title',
|
|
30
|
+
type: 'string'
|
|
31
|
+
}, {
|
|
32
|
+
name: 'score',
|
|
33
|
+
type: 'number'
|
|
34
|
+
}, {
|
|
35
|
+
name: 'done',
|
|
36
|
+
type: 'boolean'
|
|
37
|
+
}, {
|
|
38
|
+
name: 'updated',
|
|
39
|
+
type: 'timestamp'
|
|
40
|
+
}],
|
|
41
|
+
indexes: [{
|
|
42
|
+
name: 'notes_by_score',
|
|
43
|
+
fields: ['score']
|
|
44
|
+
}],
|
|
45
|
+
softDelete: true,
|
|
46
|
+
timestamps: true
|
|
47
|
+
}, {
|
|
48
|
+
name: 'plain',
|
|
49
|
+
fields: [{
|
|
50
|
+
name: 'label',
|
|
51
|
+
type: 'string'
|
|
52
|
+
}]
|
|
53
|
+
}];
|
|
54
|
+
function makeConformanceContext(adapter, reset, hooks, defaults = {}) {
|
|
55
|
+
return {
|
|
56
|
+
adapter,
|
|
57
|
+
reset,
|
|
58
|
+
...hooks,
|
|
59
|
+
configFor(scope, overrides = {}) {
|
|
60
|
+
return {
|
|
61
|
+
name: 'conformance',
|
|
62
|
+
scope,
|
|
63
|
+
schemaVersion: 1,
|
|
64
|
+
collections: TEST_COLLECTIONS,
|
|
65
|
+
migrations: [{
|
|
66
|
+
version: 1,
|
|
67
|
+
migrate: async () => {}
|
|
68
|
+
}],
|
|
69
|
+
...defaults,
|
|
70
|
+
...overrides
|
|
71
|
+
};
|
|
72
|
+
},
|
|
73
|
+
scopeTargetFor(scope) {
|
|
74
|
+
return {
|
|
75
|
+
name: 'conformance',
|
|
76
|
+
scope,
|
|
77
|
+
...(defaults.encryption ? {
|
|
78
|
+
encryption: defaults.encryption
|
|
79
|
+
} : {})
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Registers the whole suite against one adapter. Both adapters call this with
|
|
87
|
+
* the same arguments; any difference in outcome is a divergence that must be
|
|
88
|
+
* documented under FR-096 or fixed.
|
|
89
|
+
*/
|
|
90
|
+
function runConformanceSuite(factory, reset, hooks, options = {}) {
|
|
91
|
+
const skip = new Set(options.skip ?? []);
|
|
92
|
+
const context = makeConformanceContext(factory(), reset, hooks, options.encryption ? {
|
|
93
|
+
encryption: options.encryption
|
|
94
|
+
} : {});
|
|
95
|
+
const sections = [['records', _records.registerRecordConformance], ['scopes', _scopes.registerScopeConformance], ['queries', _queries.registerQueryConformance], ['transactions', _transactions.registerTransactionConformance], ['migrations', _migrations.registerMigrationConformance], ['lifecycle', _lifecycle.registerLifecycleConformance], ['attachments', _attachments.registerAttachmentConformance], ['encryption', _encryption.registerEncryptionConformance]];
|
|
96
|
+
for (const [name, register] of sections) {
|
|
97
|
+
if (skip.has(name)) {
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
register(context);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_records","require","_scopes","_queries","_transactions","_migrations","_lifecycle","_attachments","_encryption","TEST_COLLECTIONS","exports","name","fields","type","indexes","softDelete","timestamps","makeConformanceContext","adapter","reset","hooks","defaults","configFor","scope","overrides","schemaVersion","collections","migrations","version","migrate","scopeTargetFor","encryption","runConformanceSuite","factory","options","skip","Set","context","sections","registerRecordConformance","registerScopeConformance","registerQueryConformance","registerTransactionConformance","registerMigrationConformance","registerLifecycleConformance","registerAttachmentConformance","registerEncryptionConformance","register","has"],"sourceRoot":"../../../../src","sources":["testing/conformance/index.ts"],"mappings":";;;;;;;;AAaA,IAAAA,QAAA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