turbine-orm 0.93.1 → 0.94.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/README.md +49 -23
- package/dist/adapters/cockroachdb.d.ts +3 -3
- package/dist/adapters/cockroachdb.js +7 -11
- package/dist/adapters/index.d.ts +1 -1
- package/dist/adapters/yugabytedb.js +1 -1
- package/dist/better-sqlite3.d.ts +132 -0
- package/dist/better-sqlite3.js +303 -0
- package/dist/catalog-metadata.d.ts +250 -0
- package/dist/catalog-metadata.js +730 -0
- package/dist/cjs/adapters/cockroachdb.d.ts +3 -3
- package/dist/cjs/adapters/cockroachdb.js +7 -11
- package/dist/cjs/adapters/index.d.ts +1 -1
- package/dist/cjs/adapters/yugabytedb.js +1 -1
- package/dist/cjs/better-sqlite3.d.ts +132 -0
- package/dist/cjs/better-sqlite3.js +311 -0
- package/dist/cjs/catalog-metadata.d.ts +250 -0
- package/dist/cjs/catalog-metadata.js +747 -0
- package/dist/cjs/cli/compile-query.d.ts +6 -3
- package/dist/cjs/cli/compile-query.js +24 -3
- package/dist/cjs/cli/config.d.ts +35 -10
- package/dist/cjs/cli/config.js +173 -42
- package/dist/cjs/cli/d1-config.d.ts +14 -0
- package/dist/cjs/cli/d1-config.js +9 -0
- package/dist/cjs/cli/d1-local.d.ts +31 -0
- package/dist/cjs/cli/d1-local.js +298 -0
- package/dist/cjs/cli/d1-migrations.d.ts +16 -0
- package/dist/cjs/cli/d1-migrations.js +156 -0
- package/dist/cjs/cli/d1-project.d.ts +23 -0
- package/dist/cjs/cli/d1-project.js +314 -0
- package/dist/cjs/cli/d1-seed.d.ts +35 -0
- package/dist/cjs/cli/d1-seed.js +220 -0
- package/dist/cjs/cli/destructive.js +1 -2
- package/dist/cjs/cli/error-catalog.d.ts +3 -3
- package/dist/cjs/cli/error-catalog.js +21 -3
- package/dist/cjs/cli/index.d.ts +13 -8
- package/dist/cjs/cli/index.js +503 -71
- package/dist/cjs/cli/libsql-migrate-command.d.ts +5 -0
- package/dist/cjs/cli/libsql-migrate-command.js +82 -0
- package/dist/cjs/cli/libsql-migrate-status.d.ts +33 -0
- package/dist/cjs/cli/libsql-migrate-status.js +189 -0
- package/dist/cjs/cli/libsql-migrate.d.ts +14 -0
- package/dist/cjs/cli/libsql-migrate.js +522 -0
- package/dist/cjs/cli/libsql-project-config.d.ts +11 -0
- package/dist/cjs/cli/libsql-project-config.js +59 -0
- package/dist/cjs/cli/libsql-project.d.ts +52 -0
- package/dist/cjs/cli/libsql-project.js +409 -0
- package/dist/cjs/cli/libsql-seed-command.d.ts +29 -0
- package/dist/cjs/cli/libsql-seed-command.js +93 -0
- package/dist/cjs/cli/loader.d.ts +6 -5
- package/dist/cjs/cli/loader.js +53 -9
- package/dist/cjs/cli/mcp.d.ts +16 -1
- package/dist/cjs/cli/mcp.js +219 -125
- package/dist/cjs/cli/migrate.d.ts +2 -2
- package/dist/cjs/cli/migrate.js +29 -14
- package/dist/cjs/cli/mssql-doctor.d.ts +44 -0
- package/dist/cjs/cli/mssql-doctor.js +277 -0
- package/dist/cjs/cli/mssql-migrate-command.d.ts +9 -0
- package/dist/cjs/cli/mssql-migrate-command.js +230 -0
- package/dist/cjs/cli/mssql-migrate-connection.d.ts +51 -0
- package/dist/cjs/cli/mssql-migrate-connection.js +255 -0
- package/dist/cjs/cli/mssql-migrate-sql.d.ts +12 -0
- package/dist/cjs/cli/mssql-migrate-sql.js +282 -0
- package/dist/cjs/cli/mssql-migrate.d.ts +45 -0
- package/dist/cjs/cli/mssql-migrate.js +296 -0
- package/dist/cjs/cli/mssql-project.d.ts +34 -0
- package/dist/cjs/cli/mssql-project.js +171 -0
- package/dist/cjs/cli/mssql-seed.d.ts +7 -0
- package/dist/cjs/cli/mssql-seed.js +78 -0
- package/dist/cjs/cli/mssql-tools.d.ts +37 -0
- package/dist/cjs/cli/mssql-tools.js +354 -0
- package/dist/cjs/cli/mysql-doctor.d.ts +48 -0
- package/dist/cjs/cli/mysql-doctor.js +323 -0
- package/dist/cjs/cli/mysql-migrate-command.d.ts +7 -0
- package/dist/cjs/cli/mysql-migrate-command.js +290 -0
- package/dist/cjs/cli/mysql-migrate-sql.d.ts +18 -0
- package/dist/cjs/cli/mysql-migrate-sql.js +166 -0
- package/dist/cjs/cli/mysql-migrate.d.ts +77 -0
- package/dist/cjs/cli/mysql-migrate.js +619 -0
- package/dist/cjs/cli/mysql-project.d.ts +49 -0
- package/dist/cjs/cli/mysql-project.js +284 -0
- package/dist/cjs/cli/mysql-push-command.d.ts +7 -0
- package/dist/cjs/cli/mysql-push-command.js +94 -0
- package/dist/cjs/cli/mysql-push.d.ts +15 -0
- package/dist/cjs/cli/mysql-push.js +98 -0
- package/dist/cjs/cli/mysql-schema-command.d.ts +5 -0
- package/dist/cjs/cli/mysql-schema-command.js +58 -0
- package/dist/cjs/cli/mysql-schema-ddl.d.ts +37 -0
- package/dist/cjs/cli/mysql-schema-ddl.js +234 -0
- package/dist/cjs/cli/mysql-schema-snapshot.d.ts +21 -0
- package/dist/cjs/cli/mysql-schema-snapshot.js +127 -0
- package/dist/cjs/cli/mysql-schema.d.ts +27 -0
- package/dist/cjs/cli/mysql-schema.js +206 -0
- package/dist/cjs/cli/mysql-seed-loader.cjs +58 -0
- package/dist/cjs/cli/mysql-seed-loader.d.cts +3 -0
- package/dist/cjs/cli/mysql-seed.d.ts +6 -0
- package/dist/cjs/cli/mysql-seed.js +83 -0
- package/dist/cjs/cli/mysql-tools.d.ts +44 -0
- package/dist/cjs/cli/mysql-tools.js +336 -0
- package/dist/cjs/cli/no-follow.d.ts +29 -0
- package/dist/cjs/cli/no-follow.js +73 -0
- package/dist/cjs/cli/pii-predicate-guard.d.ts +1 -1
- package/dist/cjs/cli/pii-predicate-guard.js +2 -2
- package/dist/cjs/cli/pii-tags.d.ts +2 -2
- package/dist/cjs/cli/pii-tags.js +1 -1
- package/dist/cjs/cli/prisma-schema.js +2 -2
- package/dist/cjs/cli/sql-statements.d.ts +1 -1
- package/dist/cjs/cli/sql-statements.js +1 -1
- package/dist/cjs/cli/sqlite-doctor.d.ts +35 -0
- package/dist/cjs/cli/sqlite-doctor.js +400 -0
- package/dist/cjs/cli/sqlite-migrate-command.d.ts +4 -0
- package/dist/cjs/cli/sqlite-migrate-command.js +175 -0
- package/dist/cjs/cli/sqlite-migrate.d.ts +61 -0
- package/dist/cjs/cli/sqlite-migrate.js +692 -0
- package/dist/cjs/cli/sqlite-project.d.ts +42 -0
- package/dist/cjs/cli/sqlite-project.js +254 -0
- package/dist/cjs/cli/sqlite-schema-command.d.ts +4 -0
- package/dist/cjs/cli/sqlite-schema-command.js +82 -0
- package/dist/cjs/cli/sqlite-schema-ddl.d.ts +25 -0
- package/dist/cjs/cli/sqlite-schema-ddl.js +252 -0
- package/dist/cjs/cli/sqlite-schema.d.ts +25 -0
- package/dist/cjs/cli/sqlite-schema.js +334 -0
- package/dist/cjs/cli/sqlite-seed.d.ts +4 -0
- package/dist/cjs/cli/sqlite-seed.js +94 -0
- package/dist/cjs/cli/sqlite-tools.d.ts +24 -0
- package/dist/cjs/cli/sqlite-tools.js +169 -0
- package/dist/cjs/cli/studio.js +9 -9
- package/dist/cjs/cli/tool-capabilities.d.ts +72 -0
- package/dist/cjs/cli/tool-capabilities.js +120 -0
- package/dist/cjs/cli/tool-command.d.ts +11 -0
- package/dist/cjs/cli/tool-command.js +49 -0
- package/dist/cjs/cli/ui.d.ts +1 -1
- package/dist/cjs/cli/ui.js +1 -1
- package/dist/cjs/client.d.ts +20 -20
- package/dist/cjs/client.js +65 -344
- package/dist/cjs/connection-url.d.ts +1 -1
- package/dist/cjs/connection-url.js +1 -1
- package/dist/cjs/core.d.ts +58 -0
- package/dist/cjs/core.js +225 -0
- package/dist/cjs/d1/catalog-metadata.d.ts +5 -0
- package/dist/cjs/d1/catalog-metadata.js +230 -0
- package/dist/cjs/d1/catalog.d.ts +15 -0
- package/dist/cjs/d1/catalog.js +88 -0
- package/dist/cjs/d1/generate.d.ts +8 -0
- package/dist/cjs/d1/generate.js +163 -0
- package/dist/cjs/d1/introspect.d.ts +21 -0
- package/dist/cjs/d1/introspect.js +74 -0
- package/dist/cjs/d1/migrate.d.ts +29 -0
- package/dist/cjs/d1/migrate.js +222 -0
- package/dist/cjs/d1/migrations/sql.d.ts +2 -0
- package/dist/cjs/d1/migrations/sql.js +109 -0
- package/dist/cjs/d1/pool.d.ts +14 -0
- package/dist/cjs/d1/pool.js +90 -0
- package/dist/cjs/d1/sql.d.ts +5 -0
- package/dist/cjs/d1/sql.js +140 -0
- package/dist/cjs/d1/sqlite-dialect.d.ts +16 -0
- package/dist/cjs/d1/sqlite-dialect.js +579 -0
- package/dist/cjs/d1/types.d.ts +29 -0
- package/dist/cjs/d1/types.js +2 -0
- package/dist/cjs/d1.d.ts +53 -0
- package/dist/cjs/d1.js +220 -0
- package/dist/cjs/dialect.d.ts +33 -5
- package/dist/cjs/dialect.js +8 -6
- package/dist/cjs/errors.d.ts +38 -1
- package/dist/cjs/errors.js +72 -18
- package/dist/cjs/generate.d.ts +19 -3
- package/dist/cjs/generate.js +330 -97
- package/dist/cjs/global-filters-config.js +4 -4
- package/dist/cjs/index-advisor.js +6 -6
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +3 -2
- package/dist/cjs/introspect.d.ts +59 -356
- package/dist/cjs/introspect.js +158 -984
- package/dist/cjs/libsql/bindings.d.ts +2 -0
- package/dist/cjs/libsql/bindings.js +78 -0
- package/dist/cjs/libsql/dialect.d.ts +3 -0
- package/dist/cjs/libsql/dialect.js +48 -0
- package/dist/cjs/libsql/generate.d.ts +4 -0
- package/dist/cjs/libsql/generate.js +56 -0
- package/dist/cjs/libsql/introspect.d.ts +16 -0
- package/dist/cjs/libsql/introspect.js +295 -0
- package/dist/cjs/libsql/pool.d.ts +42 -0
- package/dist/cjs/libsql/pool.js +275 -0
- package/dist/cjs/libsql/seed-cleanup.d.ts +2 -0
- package/dist/cjs/libsql/seed-cleanup.js +19 -0
- package/dist/cjs/libsql/values.d.ts +20 -0
- package/dist/cjs/libsql/values.js +75 -0
- package/dist/cjs/libsql-seed.d.ts +19 -0
- package/dist/cjs/libsql-seed.js +50 -0
- package/dist/cjs/libsql.d.ts +28 -0
- package/dist/cjs/libsql.js +88 -0
- package/dist/cjs/live-query.d.ts +33 -0
- package/dist/cjs/live-query.js +172 -0
- package/dist/cjs/log-codes.d.ts +1 -1
- package/dist/cjs/log-codes.js +4 -0
- package/dist/cjs/mssql-seed.d.ts +27 -0
- package/dist/cjs/mssql-seed.js +118 -0
- package/dist/cjs/mssql.d.ts +7 -7
- package/dist/cjs/mssql.js +365 -53
- package/dist/cjs/mysql-seed.d.ts +25 -0
- package/dist/cjs/mysql-seed.js +169 -0
- package/dist/cjs/mysql.d.ts +18 -6
- package/dist/cjs/mysql.js +602 -94
- package/dist/cjs/neon-http/client.d.ts +95 -0
- package/dist/cjs/neon-http/client.js +291 -0
- package/dist/cjs/neon-http/sql.d.ts +3 -0
- package/dist/cjs/neon-http/sql.js +116 -0
- package/dist/cjs/neon-http.d.ts +5 -0
- package/dist/cjs/neon-http.js +8 -0
- package/dist/cjs/neon-ws/load-driver.cjs +44 -0
- package/dist/cjs/neon-ws/load-driver.d.cts +9 -0
- package/dist/cjs/neon-ws/recovery.d.ts +14 -0
- package/dist/cjs/neon-ws/recovery.js +69 -0
- package/dist/cjs/neon-ws/snapshot.d.ts +3 -0
- package/dist/cjs/neon-ws/snapshot.js +17 -0
- package/dist/cjs/neon-ws/transport.d.ts +112 -0
- package/dist/cjs/neon-ws/transport.js +290 -0
- package/dist/cjs/neon-ws.d.ts +26 -0
- package/dist/cjs/neon-ws.js +189 -0
- package/dist/cjs/nested-write.d.ts +34 -3
- package/dist/cjs/nested-write.js +117 -24
- package/dist/cjs/notification-hub/consumer.d.ts +22 -0
- package/dist/cjs/notification-hub/consumer.js +111 -0
- package/dist/cjs/notification-hub.d.ts +41 -0
- package/dist/cjs/notification-hub.js +373 -0
- package/dist/cjs/pg-catalog-text.d.ts +96 -0
- package/dist/cjs/pg-catalog-text.js +213 -0
- package/dist/cjs/pg-types.d.ts +46 -2
- package/dist/cjs/pipeline-submittable.d.ts +15 -5
- package/dist/cjs/pipeline-submittable.js +103 -48
- package/dist/cjs/pipeline.d.ts +5 -2
- package/dist/cjs/pipeline.js +111 -41
- package/dist/cjs/plan-divergence.d.ts +1 -1
- package/dist/cjs/plan-divergence.js +1 -1
- package/dist/cjs/powdb-introspect.d.ts +1 -1
- package/dist/cjs/powdb-introspect.js +5 -5
- package/dist/cjs/powdb-shared.d.ts +5 -5
- package/dist/cjs/powdb-shared.js +6 -5
- package/dist/cjs/powdb.d.ts +28 -10
- package/dist/cjs/powdb.js +80 -28
- package/dist/cjs/powql.d.ts +50 -28
- package/dist/cjs/powql.js +47 -33
- package/dist/cjs/prisma-compat.js +4 -5
- package/dist/cjs/prisma-schema-fingerprint.d.ts +1 -1
- package/dist/cjs/prisma-schema-fingerprint.js +1 -1
- package/dist/cjs/query/aggregates.d.ts +0 -13
- package/dist/cjs/query/aggregates.js +105 -238
- package/dist/cjs/query/batched-loader.d.ts +1 -1
- package/dist/cjs/query/batched-loader.js +18 -20
- package/dist/cjs/query/builder.d.ts +108 -144
- package/dist/cjs/query/builder.js +592 -893
- package/dist/cjs/query/compound-unique.d.ts +18 -3
- package/dist/cjs/query/compound-unique.js +110 -43
- package/dist/cjs/query/cursor-tuple.d.ts +17 -0
- package/dist/cjs/query/cursor-tuple.js +121 -0
- package/dist/cjs/query/expr.d.ts +2 -0
- package/dist/cjs/query/expr.js +40 -23
- package/dist/cjs/query/filters.d.ts +39 -7
- package/dist/cjs/query/filters.js +77 -19
- package/dist/cjs/query/normalize-args.d.ts +1 -1
- package/dist/cjs/query/normalize-args.js +7 -5
- package/dist/cjs/query/option-surface.d.ts +1 -1
- package/dist/cjs/query/option-surface.js +5 -3
- package/dist/cjs/query/pg-type-parsers.d.ts +126 -0
- package/dist/cjs/query/pg-type-parsers.js +306 -0
- package/dist/cjs/query/relation-names.d.ts +4 -2
- package/dist/cjs/query/relation-names.js +21 -12
- package/dist/cjs/query/relations.d.ts +19 -7
- package/dist/cjs/query/relations.js +329 -260
- package/dist/cjs/query/row-lock.js +3 -3
- package/dist/cjs/query/sql-comment.js +3 -3
- package/dist/cjs/query/stream-idle.d.ts +11 -1
- package/dist/cjs/query/stream-idle.js +53 -13
- package/dist/cjs/query/stream-signal.d.ts +21 -0
- package/dist/cjs/query/stream-signal.js +132 -0
- package/dist/cjs/query/temporal-parsers.d.ts +101 -0
- package/dist/cjs/query/temporal-parsers.js +362 -0
- package/dist/cjs/query/types.d.ts +67 -20
- package/dist/cjs/query/utils.d.ts +2 -878
- package/dist/cjs/query/utils.js +25 -2058
- package/dist/cjs/query/warn-registry.d.ts +1 -1
- package/dist/cjs/query/warn-registry.js +1 -1
- package/dist/cjs/query/where-compile.d.ts +4 -1
- package/dist/cjs/query/where-compile.js +18 -14
- package/dist/cjs/query/where.d.ts +14 -7
- package/dist/cjs/query/where.js +244 -436
- package/dist/cjs/query/writes.d.ts +33 -2
- package/dist/cjs/query/writes.js +104 -77
- package/dist/cjs/query-utils.d.ts +687 -0
- package/dist/cjs/query-utils.js +1444 -0
- package/dist/cjs/realtime.d.ts +1 -1
- package/dist/cjs/realtime.js +3 -3
- package/dist/cjs/schema-builder.js +2 -2
- package/dist/cjs/schema-metadata.d.ts +13 -3
- package/dist/cjs/schema-metadata.js +33 -5
- package/dist/cjs/schema-sql.d.ts +15 -24
- package/dist/cjs/schema-sql.js +53 -63
- package/dist/cjs/schema.d.ts +37 -2
- package/dist/cjs/schema.js +29 -2
- package/dist/cjs/seed.js +5 -5
- package/dist/cjs/serverless.d.ts +24 -71
- package/dist/cjs/serverless.js +24 -71
- package/dist/cjs/sql.d.ts +111 -0
- package/dist/cjs/sql.js +335 -0
- package/dist/cjs/sqlite-seed.d.ts +17 -0
- package/dist/cjs/sqlite-seed.js +31 -0
- package/dist/cjs/sqlite.d.ts +32 -19
- package/dist/cjs/sqlite.js +865 -652
- package/dist/cjs/supplied-pool-types.js +10 -9
- package/dist/cjs/transaction-control.js +6 -1
- package/dist/cjs/transaction-outcome.d.ts +61 -0
- package/dist/cjs/transaction-outcome.js +239 -0
- package/dist/cjs/transaction-state.d.ts +82 -13
- package/dist/cjs/transaction-state.js +222 -56
- package/dist/cjs/transaction-transport.d.ts +38 -0
- package/dist/cjs/transaction-transport.js +157 -0
- package/dist/cjs/typed-sql.d.ts +1 -1
- package/dist/cjs/typed-sql.js +1 -1
- package/dist/cli/compile-query.d.ts +6 -3
- package/dist/cli/compile-query.js +25 -4
- package/dist/cli/config.d.ts +35 -10
- package/dist/cli/config.js +170 -43
- package/dist/cli/d1-config.d.ts +14 -0
- package/dist/cli/d1-config.js +6 -0
- package/dist/cli/d1-local.d.ts +31 -0
- package/dist/cli/d1-local.js +285 -0
- package/dist/cli/d1-migrations.d.ts +16 -0
- package/dist/cli/d1-migrations.js +151 -0
- package/dist/cli/d1-project.d.ts +23 -0
- package/dist/cli/d1-project.js +304 -0
- package/dist/cli/d1-seed.d.ts +35 -0
- package/dist/cli/d1-seed.js +213 -0
- package/dist/cli/destructive.js +1 -2
- package/dist/cli/error-catalog.d.ts +3 -3
- package/dist/cli/error-catalog.js +21 -3
- package/dist/cli/index.d.ts +13 -8
- package/dist/cli/index.js +500 -71
- package/dist/cli/libsql-migrate-command.d.ts +5 -0
- package/dist/cli/libsql-migrate-command.js +77 -0
- package/dist/cli/libsql-migrate-status.d.ts +33 -0
- package/dist/cli/libsql-migrate-status.js +182 -0
- package/dist/cli/libsql-migrate.d.ts +14 -0
- package/dist/cli/libsql-migrate.js +516 -0
- package/dist/cli/libsql-project-config.d.ts +11 -0
- package/dist/cli/libsql-project-config.js +55 -0
- package/dist/cli/libsql-project.d.ts +52 -0
- package/dist/cli/libsql-project.js +391 -0
- package/dist/cli/libsql-seed-command.d.ts +29 -0
- package/dist/cli/libsql-seed-command.js +85 -0
- package/dist/cli/loader.d.ts +6 -5
- package/dist/cli/loader.js +50 -9
- package/dist/cli/mcp.d.ts +16 -1
- package/dist/cli/mcp.js +220 -127
- package/dist/cli/migrate.d.ts +2 -2
- package/dist/cli/migrate.js +29 -14
- package/dist/cli/mssql-doctor.d.ts +44 -0
- package/dist/cli/mssql-doctor.js +237 -0
- package/dist/cli/mssql-migrate-command.d.ts +9 -0
- package/dist/cli/mssql-migrate-command.js +192 -0
- package/dist/cli/mssql-migrate-connection.d.ts +51 -0
- package/dist/cli/mssql-migrate-connection.js +245 -0
- package/dist/cli/mssql-migrate-sql.d.ts +12 -0
- package/dist/cli/mssql-migrate-sql.js +275 -0
- package/dist/cli/mssql-migrate.d.ts +45 -0
- package/dist/cli/mssql-migrate.js +290 -0
- package/dist/cli/mssql-project.d.ts +34 -0
- package/dist/cli/mssql-project.js +160 -0
- package/dist/cli/mssql-seed.d.ts +7 -0
- package/dist/cli/mssql-seed.js +73 -0
- package/dist/cli/mssql-tools.d.ts +37 -0
- package/dist/cli/mssql-tools.js +341 -0
- package/dist/cli/mysql-doctor.d.ts +48 -0
- package/dist/cli/mysql-doctor.js +316 -0
- package/dist/cli/mysql-migrate-command.d.ts +7 -0
- package/dist/cli/mysql-migrate-command.js +285 -0
- package/dist/cli/mysql-migrate-sql.d.ts +18 -0
- package/dist/cli/mysql-migrate-sql.js +162 -0
- package/dist/cli/mysql-migrate.d.ts +77 -0
- package/dist/cli/mysql-migrate.js +606 -0
- package/dist/cli/mysql-project.d.ts +49 -0
- package/dist/cli/mysql-project.js +272 -0
- package/dist/cli/mysql-push-command.d.ts +7 -0
- package/dist/cli/mysql-push-command.js +89 -0
- package/dist/cli/mysql-push.d.ts +15 -0
- package/dist/cli/mysql-push.js +95 -0
- package/dist/cli/mysql-schema-command.d.ts +5 -0
- package/dist/cli/mysql-schema-command.js +54 -0
- package/dist/cli/mysql-schema-ddl.d.ts +37 -0
- package/dist/cli/mysql-schema-ddl.js +227 -0
- package/dist/cli/mysql-schema-snapshot.d.ts +21 -0
- package/dist/cli/mysql-schema-snapshot.js +119 -0
- package/dist/cli/mysql-schema.d.ts +27 -0
- package/dist/cli/mysql-schema.js +200 -0
- package/dist/cli/mysql-seed-loader.cjs +25 -0
- package/dist/cli/mysql-seed-loader.d.cts +3 -0
- package/dist/cli/mysql-seed.d.ts +6 -0
- package/dist/cli/mysql-seed.js +75 -0
- package/dist/cli/mysql-tools.d.ts +44 -0
- package/dist/cli/mysql-tools.js +290 -0
- package/dist/cli/no-follow.d.ts +29 -0
- package/dist/cli/no-follow.js +67 -0
- package/dist/cli/pii-predicate-guard.d.ts +1 -1
- package/dist/cli/pii-predicate-guard.js +2 -2
- package/dist/cli/pii-tags.d.ts +2 -2
- package/dist/cli/pii-tags.js +1 -1
- package/dist/cli/prisma-schema.js +2 -2
- package/dist/cli/sql-statements.d.ts +1 -1
- package/dist/cli/sql-statements.js +1 -1
- package/dist/cli/sqlite-doctor.d.ts +35 -0
- package/dist/cli/sqlite-doctor.js +392 -0
- package/dist/cli/sqlite-migrate-command.d.ts +4 -0
- package/dist/cli/sqlite-migrate-command.js +171 -0
- package/dist/cli/sqlite-migrate.d.ts +61 -0
- package/dist/cli/sqlite-migrate.js +681 -0
- package/dist/cli/sqlite-project.d.ts +42 -0
- package/dist/cli/sqlite-project.js +244 -0
- package/dist/cli/sqlite-schema-command.d.ts +4 -0
- package/dist/cli/sqlite-schema-command.js +79 -0
- package/dist/cli/sqlite-schema-ddl.d.ts +25 -0
- package/dist/cli/sqlite-schema-ddl.js +248 -0
- package/dist/cli/sqlite-schema.d.ts +25 -0
- package/dist/cli/sqlite-schema.js +330 -0
- package/dist/cli/sqlite-seed.d.ts +4 -0
- package/dist/cli/sqlite-seed.js +57 -0
- package/dist/cli/sqlite-tools.d.ts +24 -0
- package/dist/cli/sqlite-tools.js +163 -0
- package/dist/cli/studio.js +9 -9
- package/dist/cli/tool-capabilities.d.ts +72 -0
- package/dist/cli/tool-capabilities.js +114 -0
- package/dist/cli/tool-command.d.ts +11 -0
- package/dist/cli/tool-command.js +45 -0
- package/dist/cli/ui.d.ts +1 -1
- package/dist/cli/ui.js +1 -1
- package/dist/client.d.ts +20 -20
- package/dist/client.js +62 -341
- package/dist/connection-url.d.ts +1 -1
- package/dist/connection-url.js +1 -1
- package/dist/core.d.ts +58 -0
- package/dist/core.js +220 -0
- package/dist/d1/catalog-metadata.d.ts +5 -0
- package/dist/d1/catalog-metadata.js +227 -0
- package/dist/d1/catalog.d.ts +15 -0
- package/dist/d1/catalog.js +82 -0
- package/dist/d1/generate.d.ts +8 -0
- package/dist/d1/generate.js +160 -0
- package/dist/d1/introspect.d.ts +21 -0
- package/dist/d1/introspect.js +71 -0
- package/dist/d1/migrate.d.ts +29 -0
- package/dist/d1/migrate.js +217 -0
- package/dist/d1/migrations/sql.d.ts +2 -0
- package/dist/d1/migrations/sql.js +106 -0
- package/dist/d1/pool.d.ts +14 -0
- package/dist/d1/pool.js +86 -0
- package/dist/d1/sql.d.ts +5 -0
- package/dist/d1/sql.js +135 -0
- package/dist/d1/sqlite-dialect.d.ts +16 -0
- package/dist/d1/sqlite-dialect.js +572 -0
- package/dist/d1/types.d.ts +29 -0
- package/dist/d1/types.js +1 -0
- package/dist/d1.d.ts +53 -0
- package/dist/d1.js +215 -0
- package/dist/dialect.d.ts +33 -5
- package/dist/dialect.js +6 -4
- package/dist/errors.d.ts +38 -1
- package/dist/errors.js +68 -17
- package/dist/generate.d.ts +19 -3
- package/dist/generate.js +330 -97
- package/dist/global-filters-config.js +2 -2
- package/dist/index-advisor.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/introspect.d.ts +59 -356
- package/dist/introspect.js +116 -943
- package/dist/libsql/bindings.d.ts +2 -0
- package/dist/libsql/bindings.js +75 -0
- package/dist/libsql/dialect.d.ts +3 -0
- package/dist/libsql/dialect.js +45 -0
- package/dist/libsql/generate.d.ts +4 -0
- package/dist/libsql/generate.js +53 -0
- package/dist/libsql/introspect.d.ts +16 -0
- package/dist/libsql/introspect.js +289 -0
- package/dist/libsql/pool.d.ts +42 -0
- package/dist/libsql/pool.js +270 -0
- package/dist/libsql/seed-cleanup.d.ts +2 -0
- package/dist/libsql/seed-cleanup.js +15 -0
- package/dist/libsql/values.d.ts +20 -0
- package/dist/libsql/values.js +68 -0
- package/dist/libsql-seed.d.ts +19 -0
- package/dist/libsql-seed.js +46 -0
- package/dist/libsql.d.ts +28 -0
- package/dist/libsql.js +79 -0
- package/dist/live-query.d.ts +33 -0
- package/dist/live-query.js +169 -0
- package/dist/log-codes.d.ts +1 -1
- package/dist/log-codes.js +4 -0
- package/dist/mssql-seed.d.ts +27 -0
- package/dist/mssql-seed.js +114 -0
- package/dist/mssql.d.ts +7 -7
- package/dist/mssql.js +366 -54
- package/dist/mysql-seed.d.ts +25 -0
- package/dist/mysql-seed.js +165 -0
- package/dist/mysql.d.ts +18 -6
- package/dist/mysql.js +603 -95
- package/dist/neon-http/client.d.ts +95 -0
- package/dist/neon-http/client.js +286 -0
- package/dist/neon-http/sql.d.ts +3 -0
- package/dist/neon-http/sql.js +112 -0
- package/dist/neon-http.d.ts +5 -0
- package/dist/neon-http.js +2 -0
- package/dist/neon-ws/load-driver.cjs +11 -0
- package/dist/neon-ws/load-driver.d.cts +9 -0
- package/dist/neon-ws/recovery.d.ts +14 -0
- package/dist/neon-ws/recovery.js +66 -0
- package/dist/neon-ws/snapshot.d.ts +3 -0
- package/dist/neon-ws/snapshot.js +15 -0
- package/dist/neon-ws/transport.d.ts +112 -0
- package/dist/neon-ws/transport.js +286 -0
- package/dist/neon-ws.d.ts +26 -0
- package/dist/neon-ws.js +182 -0
- package/dist/nested-write.d.ts +34 -3
- package/dist/nested-write.js +114 -22
- package/dist/notification-hub/consumer.d.ts +22 -0
- package/dist/notification-hub/consumer.js +106 -0
- package/dist/notification-hub.d.ts +41 -0
- package/dist/notification-hub.js +370 -0
- package/dist/pg-catalog-text.d.ts +96 -0
- package/dist/pg-catalog-text.js +208 -0
- package/dist/pg-types.d.ts +46 -2
- package/dist/pipeline-submittable.d.ts +15 -5
- package/dist/pipeline-submittable.js +105 -50
- package/dist/pipeline.d.ts +5 -2
- package/dist/pipeline.js +113 -43
- package/dist/plan-divergence.d.ts +1 -1
- package/dist/plan-divergence.js +1 -1
- package/dist/powdb-introspect.d.ts +1 -1
- package/dist/powdb-introspect.js +5 -5
- package/dist/powdb-shared.d.ts +5 -5
- package/dist/powdb-shared.js +6 -5
- package/dist/powdb.d.ts +28 -10
- package/dist/powdb.js +80 -28
- package/dist/powql.d.ts +50 -28
- package/dist/powql.js +49 -35
- package/dist/prisma-compat.js +4 -5
- package/dist/prisma-schema-fingerprint.d.ts +1 -1
- package/dist/prisma-schema-fingerprint.js +1 -1
- package/dist/query/aggregates.d.ts +0 -13
- package/dist/query/aggregates.js +97 -230
- package/dist/query/batched-loader.d.ts +1 -1
- package/dist/query/batched-loader.js +5 -7
- package/dist/query/builder.d.ts +108 -144
- package/dist/query/builder.js +563 -864
- package/dist/query/compound-unique.d.ts +18 -3
- package/dist/query/compound-unique.js +99 -33
- package/dist/query/cursor-tuple.d.ts +17 -0
- package/dist/query/cursor-tuple.js +114 -0
- package/dist/query/expr.d.ts +2 -0
- package/dist/query/expr.js +32 -16
- package/dist/query/filters.d.ts +39 -7
- package/dist/query/filters.js +69 -14
- package/dist/query/normalize-args.d.ts +1 -1
- package/dist/query/normalize-args.js +4 -2
- package/dist/query/option-surface.d.ts +1 -1
- package/dist/query/option-surface.js +4 -2
- package/dist/query/pg-type-parsers.d.ts +126 -0
- package/dist/query/pg-type-parsers.js +296 -0
- package/dist/query/relation-names.d.ts +4 -2
- package/dist/query/relation-names.js +15 -7
- package/dist/query/relations.d.ts +19 -7
- package/dist/query/relations.js +293 -227
- package/dist/query/row-lock.js +1 -1
- package/dist/query/sql-comment.js +1 -1
- package/dist/query/stream-idle.d.ts +11 -1
- package/dist/query/stream-idle.js +51 -13
- package/dist/query/stream-signal.d.ts +21 -0
- package/dist/query/stream-signal.js +125 -0
- package/dist/query/temporal-parsers.d.ts +101 -0
- package/dist/query/temporal-parsers.js +354 -0
- package/dist/query/types.d.ts +67 -20
- package/dist/query/utils.d.ts +2 -878
- package/dist/query/utils.js +5 -2003
- package/dist/query/warn-registry.d.ts +1 -1
- package/dist/query/warn-registry.js +1 -1
- package/dist/query/where-compile.d.ts +4 -1
- package/dist/query/where-compile.js +14 -10
- package/dist/query/where.d.ts +14 -7
- package/dist/query/where.js +236 -430
- package/dist/query/writes.d.ts +33 -2
- package/dist/query/writes.js +90 -65
- package/dist/query-utils.d.ts +687 -0
- package/dist/query-utils.js +1390 -0
- package/dist/realtime.d.ts +1 -1
- package/dist/realtime.js +3 -3
- package/dist/schema-builder.js +2 -2
- package/dist/schema-metadata.d.ts +13 -3
- package/dist/schema-metadata.js +33 -5
- package/dist/schema-sql.d.ts +15 -24
- package/dist/schema-sql.js +50 -60
- package/dist/schema.d.ts +37 -2
- package/dist/schema.js +29 -2
- package/dist/seed.js +5 -5
- package/dist/serverless.d.ts +24 -71
- package/dist/serverless.js +24 -71
- package/dist/sql.d.ts +111 -0
- package/dist/sql.js +321 -0
- package/dist/sqlite-seed.d.ts +17 -0
- package/dist/sqlite-seed.js +27 -0
- package/dist/sqlite.d.ts +32 -19
- package/dist/sqlite.js +859 -648
- package/dist/supplied-pool-types.js +2 -1
- package/dist/transaction-control.js +6 -1
- package/dist/transaction-outcome.d.ts +61 -0
- package/dist/transaction-outcome.js +234 -0
- package/dist/transaction-state.d.ts +82 -13
- package/dist/transaction-state.js +220 -57
- package/dist/transaction-transport.d.ts +38 -0
- package/dist/transaction-transport.js +153 -0
- package/dist/typed-sql.d.ts +1 -1
- package/dist/typed-sql.js +1 -1
- package/package.json +239 -13
- package/skills/turbine-orm/SKILL.md +6 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "turbine-orm",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.94.0",
|
|
4
4
|
"description": "Postgres-native TypeScript ORM, runs on Neon, Vercel Postgres, Cloudflare, Supabase. Streaming cursors, typed errors, single-query nested relations. One dependency, no WASM engine",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"//exports": "Each subpath declares its types PER CONDITION. A single shared top-level \"types\" resolves to the ESM declarations for `require` too, which is TS1479 (\"is an ES module ... cannot be require()d\") for any CJS consumer on moduleResolution node16/nodenext. The require condition points at dist/cjs, which ships its own {\"type\":\"commonjs\"} package.json, so those declarations are CJS declarations. Gated in CI by publint + @arethetypeswrong/cli + a real .cts consumer typecheck (see the package-types job in ci.yml).",
|
|
@@ -15,6 +15,16 @@
|
|
|
15
15
|
"default": "./dist/cjs/index.js"
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
|
+
"./sql": {
|
|
19
|
+
"import": {
|
|
20
|
+
"types": "./dist/sql.d.ts",
|
|
21
|
+
"default": "./dist/sql.js"
|
|
22
|
+
},
|
|
23
|
+
"require": {
|
|
24
|
+
"types": "./dist/cjs/sql.d.ts",
|
|
25
|
+
"default": "./dist/cjs/sql.js"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
18
28
|
"./serverless": {
|
|
19
29
|
"import": {
|
|
20
30
|
"types": "./dist/serverless.d.ts",
|
|
@@ -45,6 +55,16 @@
|
|
|
45
55
|
"default": "./dist/cjs/sqlite.js"
|
|
46
56
|
}
|
|
47
57
|
},
|
|
58
|
+
"./sqlite/seed": {
|
|
59
|
+
"import": {
|
|
60
|
+
"types": "./dist/sqlite-seed.d.ts",
|
|
61
|
+
"default": "./dist/sqlite-seed.js"
|
|
62
|
+
},
|
|
63
|
+
"require": {
|
|
64
|
+
"types": "./dist/cjs/sqlite-seed.d.ts",
|
|
65
|
+
"default": "./dist/cjs/sqlite-seed.js"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
48
68
|
"./mysql": {
|
|
49
69
|
"import": {
|
|
50
70
|
"types": "./dist/mysql.d.ts",
|
|
@@ -55,6 +75,26 @@
|
|
|
55
75
|
"default": "./dist/cjs/mysql.js"
|
|
56
76
|
}
|
|
57
77
|
},
|
|
78
|
+
"./mysql/seed": {
|
|
79
|
+
"import": {
|
|
80
|
+
"types": "./dist/mysql-seed.d.ts",
|
|
81
|
+
"default": "./dist/mysql-seed.js"
|
|
82
|
+
},
|
|
83
|
+
"require": {
|
|
84
|
+
"types": "./dist/cjs/mysql-seed.d.ts",
|
|
85
|
+
"default": "./dist/cjs/mysql-seed.js"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"./mssql/seed": {
|
|
89
|
+
"import": {
|
|
90
|
+
"types": "./dist/mssql-seed.d.ts",
|
|
91
|
+
"default": "./dist/mssql-seed.js"
|
|
92
|
+
},
|
|
93
|
+
"require": {
|
|
94
|
+
"types": "./dist/cjs/mssql-seed.d.ts",
|
|
95
|
+
"default": "./dist/cjs/mssql-seed.js"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
58
98
|
"./mssql": {
|
|
59
99
|
"import": {
|
|
60
100
|
"types": "./dist/mssql.d.ts",
|
|
@@ -94,6 +134,146 @@
|
|
|
94
134
|
"types": "./dist/cjs/adapters/index.d.ts",
|
|
95
135
|
"default": "./dist/cjs/adapters/index.js"
|
|
96
136
|
}
|
|
137
|
+
},
|
|
138
|
+
"./neon-ws": {
|
|
139
|
+
"import": {
|
|
140
|
+
"types": "./dist/neon-ws.d.ts",
|
|
141
|
+
"default": "./dist/neon-ws.js"
|
|
142
|
+
},
|
|
143
|
+
"require": {
|
|
144
|
+
"types": "./dist/cjs/neon-ws.d.ts",
|
|
145
|
+
"default": "./dist/cjs/neon-ws.js"
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"./neon-http": {
|
|
149
|
+
"import": {
|
|
150
|
+
"types": "./dist/neon-http.d.ts",
|
|
151
|
+
"default": "./dist/neon-http.js"
|
|
152
|
+
},
|
|
153
|
+
"require": {
|
|
154
|
+
"types": "./dist/cjs/neon-http.d.ts",
|
|
155
|
+
"default": "./dist/cjs/neon-http.js"
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"./live-query": {
|
|
159
|
+
"import": {
|
|
160
|
+
"types": "./dist/live-query.d.ts",
|
|
161
|
+
"default": "./dist/live-query.js"
|
|
162
|
+
},
|
|
163
|
+
"require": {
|
|
164
|
+
"types": "./dist/cjs/live-query.d.ts",
|
|
165
|
+
"default": "./dist/cjs/live-query.js"
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"./notification-hub": {
|
|
169
|
+
"import": {
|
|
170
|
+
"types": "./dist/notification-hub.d.ts",
|
|
171
|
+
"default": "./dist/notification-hub.js"
|
|
172
|
+
},
|
|
173
|
+
"require": {
|
|
174
|
+
"types": "./dist/cjs/notification-hub.d.ts",
|
|
175
|
+
"default": "./dist/cjs/notification-hub.js"
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"./libsql": {
|
|
179
|
+
"import": {
|
|
180
|
+
"types": "./dist/libsql.d.ts",
|
|
181
|
+
"default": "./dist/libsql.js"
|
|
182
|
+
},
|
|
183
|
+
"require": {
|
|
184
|
+
"types": "./dist/cjs/libsql.d.ts",
|
|
185
|
+
"default": "./dist/cjs/libsql.js"
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
"./libsql/generate": {
|
|
189
|
+
"import": {
|
|
190
|
+
"types": "./dist/libsql/generate.d.ts",
|
|
191
|
+
"default": "./dist/libsql/generate.js"
|
|
192
|
+
},
|
|
193
|
+
"require": {
|
|
194
|
+
"types": "./dist/cjs/libsql/generate.d.ts",
|
|
195
|
+
"default": "./dist/cjs/libsql/generate.js"
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
"./libsql/introspect": {
|
|
199
|
+
"import": {
|
|
200
|
+
"types": "./dist/libsql/introspect.d.ts",
|
|
201
|
+
"default": "./dist/libsql/introspect.js"
|
|
202
|
+
},
|
|
203
|
+
"require": {
|
|
204
|
+
"types": "./dist/cjs/libsql/introspect.d.ts",
|
|
205
|
+
"default": "./dist/cjs/libsql/introspect.js"
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
"./core": {
|
|
209
|
+
"import": {
|
|
210
|
+
"types": "./dist/core.d.ts",
|
|
211
|
+
"default": "./dist/core.js"
|
|
212
|
+
},
|
|
213
|
+
"require": {
|
|
214
|
+
"types": "./dist/cjs/core.d.ts",
|
|
215
|
+
"default": "./dist/cjs/core.js"
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
"./d1": {
|
|
219
|
+
"import": {
|
|
220
|
+
"types": "./dist/d1.d.ts",
|
|
221
|
+
"default": "./dist/d1.js"
|
|
222
|
+
},
|
|
223
|
+
"require": {
|
|
224
|
+
"types": "./dist/cjs/d1.d.ts",
|
|
225
|
+
"default": "./dist/cjs/d1.js"
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"./libsql/seed": {
|
|
229
|
+
"import": {
|
|
230
|
+
"types": "./dist/libsql-seed.d.ts",
|
|
231
|
+
"default": "./dist/libsql-seed.js"
|
|
232
|
+
},
|
|
233
|
+
"require": {
|
|
234
|
+
"types": "./dist/cjs/libsql-seed.d.ts",
|
|
235
|
+
"default": "./dist/cjs/libsql-seed.js"
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
"./d1/introspect": {
|
|
239
|
+
"import": {
|
|
240
|
+
"types": "./dist/d1/introspect.d.ts",
|
|
241
|
+
"default": "./dist/d1/introspect.js"
|
|
242
|
+
},
|
|
243
|
+
"require": {
|
|
244
|
+
"types": "./dist/cjs/d1/introspect.d.ts",
|
|
245
|
+
"default": "./dist/cjs/d1/introspect.js"
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
"./d1/generate": {
|
|
249
|
+
"import": {
|
|
250
|
+
"types": "./dist/d1/generate.d.ts",
|
|
251
|
+
"default": "./dist/d1/generate.js"
|
|
252
|
+
},
|
|
253
|
+
"require": {
|
|
254
|
+
"types": "./dist/cjs/d1/generate.d.ts",
|
|
255
|
+
"default": "./dist/cjs/d1/generate.js"
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
"./better-sqlite3": {
|
|
259
|
+
"import": {
|
|
260
|
+
"types": "./dist/better-sqlite3.d.ts",
|
|
261
|
+
"default": "./dist/better-sqlite3.js"
|
|
262
|
+
},
|
|
263
|
+
"require": {
|
|
264
|
+
"types": "./dist/cjs/better-sqlite3.d.ts",
|
|
265
|
+
"default": "./dist/cjs/better-sqlite3.js"
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
"./d1/migrate": {
|
|
269
|
+
"import": {
|
|
270
|
+
"types": "./dist/d1/migrate.d.ts",
|
|
271
|
+
"default": "./dist/d1/migrate.js"
|
|
272
|
+
},
|
|
273
|
+
"require": {
|
|
274
|
+
"types": "./dist/cjs/d1/migrate.d.ts",
|
|
275
|
+
"default": "./dist/cjs/d1/migrate.js"
|
|
276
|
+
}
|
|
97
277
|
}
|
|
98
278
|
},
|
|
99
279
|
"//imports": "`#pg` is how the modules shared with the serverless entry reach node-postgres. It is `pg` itself everywhere except edge-light and browser, which get dist/pg-edge.js (see src/pg-edge.ts): those runtimes cannot bundle pg at all, and turbineHttp() never uses it. workerd is listed first so Cloudflare keeps the real driver (pg supports Workers). An imports target may be a bare package name, which is what keeps src/ runnable under tsx with no dist/ present. The CJS build (dist/cjs) is Node-only: scripts/finish-cjs-build.mjs rewrites its require(\"#pg\") to require(\"pg\"), because a require() resolves #imports against the NEAREST package.json (dist/cjs/package.json) and publint rejects a nested imports field. Edge bundlers resolve the import condition, i.e. the ESM files. `npm run check:edge` bundles the serverless entry for the edge conditions and fails on any pg or Node-builtin import.",
|
|
@@ -132,16 +312,16 @@
|
|
|
132
312
|
"dogfood": "tsx examples/dogfood.ts",
|
|
133
313
|
"test": "tsx --test --test-concurrency=1 src/test/*.test.ts",
|
|
134
314
|
"test:unit": "DATABASE_URL= tsx --test src/test/*.test.ts",
|
|
135
|
-
"//test:coverage": "Collection and reporting are SEPARATE, and the report is not c8's. c8 merges every process's V8 coverage into one ProcessCov before converting to istanbul, and that merge is not monotonic on a run this size: measured on this suite, query/relations.ts read 3043 covered lines at 240 process files and 1333 at 359, and a 448-test SUBSET read 91.88% where the full 5,819-test superset read 41.78%. scripts/coverage-report.mjs keeps every other c8 behaviour (same .c8rc.json, same reporters, same checkCoverages gate) and only moves the merge to the istanbul level, where it is additive and cannot go backwards. Collection
|
|
136
|
-
"test:coverage": "rm -rf coverage/tmp && mkdir -p coverage/tmp &&
|
|
315
|
+
"//test:coverage": "Collection and reporting are SEPARATE, and the report is not c8's. c8 merges every process's V8 coverage into one ProcessCov before converting to istanbul, and that merge is not monotonic on a run this size: measured on this suite, query/relations.ts read 3043 covered lines at 240 process files and 1333 at 359, and a 448-test SUBSET read 91.88% where the full 5,819-test superset read 41.78%. scripts/coverage-report.mjs keeps every other c8 behaviour (same .c8rc.json, same reporters, same checkCoverages gate) and only moves the merge to the istanbul level, where it is additive and cannot go backwards. Collection retains native NODE_V8_COVERAGE and adds inspector attribution only for same-process same-URL collisions. Each generated source and inline map is bound to its V8 scriptId before reporting; a URL-keyed cache cannot recover an overwritten transform map. The collector never invokes the broken V8 merge.",
|
|
316
|
+
"test:coverage": "rm -rf coverage/tmp && mkdir -p coverage/tmp && node tooling/coverage-regressions/collect.mjs --directory coverage/tmp -- node --import tsx --test --test-concurrency=1 src/test/*.test.ts && node scripts/coverage-report.mjs",
|
|
137
317
|
"//coverage:codegen": "The ratchet for the two code-generation modules, which .c8rc.json excludes from the main gate and which therefore sat in no gate at all. introspect.ts carries a stated correctness invariant (determinism) and generate.ts writes executable TypeScript from database-controlled identifiers, which is the highest-consequence untested code in the package. Both were excluded from all measurement. Same ratchet argument. Adds NO test execution: it re-reports the coverage `npm run test:coverage` already wrote to coverage/tmp, under .c8rc.codegen.json, so it must run AFTER that command. It goes through scripts/coverage-report.mjs rather than `c8 report` because the main collection is 418 process files, past the point where c8's own merge stops being monotonic (see //merge-bug in .c8rc.json). Floors, thresholds and the per-file reasoning live in .c8rc.codegen.json.",
|
|
138
318
|
"coverage:codegen": "node scripts/coverage-report.mjs --config .c8rc.codegen.json",
|
|
139
319
|
"//check:coverage-sync": "The three-way coupling between a coverage collection and the floors that hold it. A file can be added to coverage:cli:collect and then be held by NOTHING, which is not a missing gate but a slower lane enforcing a floor of zero, and it has happened twice (mcp.ts and error-catalog.ts each spent a release that way). The invariant is that every file in the collection is named by a per-file gate OR by the aggregate, NOT that the collection and the aggregate are equal: cli/index.ts is deliberately outside the aggregate, see //coverage:cli:gate:aggregate. It also refuses a gate that names a file nobody collects, which measures nothing and passes, and it fails closed on an empty parse. It runs FIRST in test:coverage:cli, ahead of the collection, because it needs no coverage data and its failure names the missing wiring instead of a number.",
|
|
140
320
|
"check:coverage-sync": "node scripts/check-coverage-gate-sync.mjs",
|
|
141
321
|
"//coverage:cli": "The CLI coverage gate, split into ONE collection run plus a per-file threshold check for every file in it, and an aggregate. c8 enforces a single threshold set per invocation and its --per-file applies the SAME numbers to every file, neither of which can express 'destructive.ts holds 100 while migrate.ts holds 70'. An aggregate-only floor lets the least-covered file spend the whole slack the best-covered file earned: at the measured 3623/2951 lines, migrate.ts could fall from 70.3% to 66.6% with the aggregate still green. So each file gets its OWN floor, checked by re-reporting the coverage already on disk (c8 report re-reads ./coverage/tmp, so this costs no extra test run). The aggregate check is kept as well: it catches all three sagging together inside their individual margins. Per-file gates run FIRST because their failure names the file. DATABASE_URL is neutralized on the collection run: these test files include live migration tests that create and drop tables, and this script runs from prepublishOnly.",
|
|
142
|
-
"test:coverage:cli": "npm run check:coverage-sync && npm run coverage:cli:collect && npm run coverage:cli:gate:destructive && npm run coverage:cli:gate:sql-statements && npm run coverage:cli:gate:pii-guard && npm run coverage:cli:gate:error-catalog && npm run coverage:cli:gate:mcp && npm run coverage:cli:gate:compile-query && npm run coverage:cli:gate:local-server-guard && npm run coverage:cli:gate:observe && npm run coverage:cli:gate:studio && npm run coverage:cli:gate:migrate && npm run coverage:cli:gate:index && npm run coverage:cli:gate:aggregate",
|
|
322
|
+
"test:coverage:cli": "npm run check:coverage-sync && npm run coverage:cli:collect && npm run coverage:cli:gate:destructive && npm run coverage:cli:gate:sql-statements && npm run coverage:cli:gate:pii-guard && npm run coverage:cli:gate:error-catalog && npm run coverage:cli:gate:mcp && npm run coverage:cli:gate:compile-query && npm run coverage:cli:gate:local-server-guard && npm run coverage:cli:gate:observe && npm run coverage:cli:gate:studio && npm run coverage:cli:gate:migrate && npm run coverage:cli:gate:index && npm run coverage:cli:gate:sqlite-tools && npm run coverage:cli:gate:tool-capabilities && npm run coverage:cli:gate:tool-command && npm run coverage:cli:gate:mssql-tools && npm run coverage:cli:gate:loader && npm run coverage:cli:gate:aggregate",
|
|
143
323
|
"//coverage:cli:collect": "--check-coverage=false is load-bearing, not tidying. c8 reads .c8rc.json for defaults, so this COLLECTION step was silently enforcing the MAIN gate's global thresholds against a src/cli-only file set. That is a gate nobody wrote and nobody wanted, and it went unnoticed only because the main floor was low enough (75) for the CLI aggregate (89.29) to clear it by accident. When the main floors were re-baselined to 93/89/78 (see //merge-bug in .c8rc.json) it started failing here, several steps before the per-file gates that are supposed to decide. Thresholds for these files belong to the coverage:cli:gate:* scripts, which pass their own explicitly.",
|
|
144
|
-
"coverage:cli:collect": "DATABASE_URL= c8 --all --check-coverage=false --reporter text --exclude 'src/test/**' --include src/cli/studio.ts --include src/cli/migrate.ts --include src/cli/destructive.ts --include src/cli/sql-statements.ts --include src/cli/pii-predicate-guard.ts --include src/cli/mcp.ts --include src/cli/compile-query.ts --include src/cli/error-catalog.ts --include src/cli/index.ts --include src/cli/local-server-guard.ts --include src/cli/observe.ts tsx --test src/test/studio-write.test.ts src/test/pii-guard-symmetry.test.ts src/test/studio-demo.test.ts src/test/studio.test.ts src/test/studio-security.test.ts src/test/migrate.test.ts src/test/migrations-pure.test.ts src/test/migrate-deploy.test.ts src/test/migrate-smoke-fixes.test.ts src/test/tracking-table-race.test.ts src/test/destructive-dynamic-assembly.test.ts src/test/destructive-migrations.test.ts src/test/backfill-recipe.test.ts src/test/cli.test.ts src/test/cli-diff-migration.test.ts src/test/cli-flags.test.ts src/test/cli-first-run.test.ts src/test/mcp.test.ts src/test/mcp-relations.test.ts src/test/mcp-pii.test.ts src/test/mcp-pii-round2.test.ts src/test/mcp-agent-tools.test.ts src/test/mcp-compile-query.test.ts src/test/mcp-perimeter-bounds.test.ts src/test/destructive-obfuscation.test.ts src/test/cli-init-schema.test.ts src/test/cli-introspect-options.test.ts src/test/mcp-transport-bounds.test.ts src/test/seed-schema.test.ts src/test/migrate-preview-and-report.test.ts src/test/destructive-quoting-forms.test.ts src/test/codegen-cli-destructive.test.ts src/test/codegen-cli-config.test.ts src/test/security-perimeter-local-servers.test.ts src/test/security-perimeter-mcp-secret-names.test.ts src/test/observe-cli.test.ts",
|
|
324
|
+
"coverage:cli:collect": "DATABASE_URL= c8 --all --check-coverage=false --reporter text --exclude 'src/test/**' --include src/cli/studio.ts --include src/cli/migrate.ts --include src/cli/destructive.ts --include src/cli/sql-statements.ts --include src/cli/pii-predicate-guard.ts --include src/cli/mcp.ts --include src/cli/compile-query.ts --include src/cli/error-catalog.ts --include src/cli/index.ts --include src/cli/local-server-guard.ts --include src/cli/observe.ts --include src/cli/sqlite-tools.ts --include src/cli/tool-capabilities.ts --include src/cli/tool-command.ts --include src/cli/mssql-tools.ts --include src/cli/loader.ts tsx --test src/test/migration-operations-postgres.test.ts src/test/migration-operations-sqlite.test.ts src/test/migration-operations-mysql.test.ts src/test/studio-write.test.ts src/test/pii-guard-symmetry.test.ts src/test/studio-demo.test.ts src/test/studio.test.ts src/test/studio-security.test.ts src/test/migrate.test.ts src/test/migrations-pure.test.ts src/test/migrate-deploy.test.ts src/test/migrate-smoke-fixes.test.ts src/test/tracking-table-race.test.ts src/test/destructive-dynamic-assembly.test.ts src/test/destructive-migrations.test.ts src/test/backfill-recipe.test.ts src/test/cli.test.ts src/test/cli-diff-migration.test.ts src/test/cli-flags.test.ts src/test/cli-first-run.test.ts src/test/mcp.test.ts src/test/mcp-relations.test.ts src/test/mcp-pii.test.ts src/test/mcp-pii-round2.test.ts src/test/mcp-agent-tools.test.ts src/test/mcp-compile-query.test.ts src/test/mcp-perimeter-bounds.test.ts src/test/destructive-obfuscation.test.ts src/test/cli-init-schema.test.ts src/test/cli-introspect-options.test.ts src/test/mcp-transport-bounds.test.ts src/test/seed-schema.test.ts src/test/migrate-preview-and-report.test.ts src/test/destructive-quoting-forms.test.ts src/test/codegen-cli-destructive.test.ts src/test/codegen-cli-config.test.ts src/test/security-perimeter-local-servers.test.ts src/test/security-perimeter-mcp-secret-names.test.ts src/test/observe-cli.test.ts src/test/sqlite-cli-project-command.test.ts src/test/sqlite-cli-project-config.test.ts src/test/sqlite-cli-project.test.ts src/test/sqlite-migrations.test.ts src/test/sqlite-schema.test.ts src/test/sqlite-schema-command.test.ts src/test/sqlite-seed.test.ts src/test/sqlite-seed-cli.test.ts src/test/sqlite-tools.test.ts src/test/mssql-tools.test.ts src/test/mssql-tools-lifecycle.test.ts src/test/cli-loader-tsx-fallbacks.test.ts src/test/cli-arg-safety.test.ts src/test/cli-first-run.paths.test.ts src/test/cli-init-secrets.test.ts src/test/cli-observe-url.test.ts src/test/cli-prisma-datasource-url.test.ts src/test/fix-cli-schema-file.test.ts src/test/fx-eng-cli.test.ts src/test/libsql-cli-admission.test.ts src/test/mysql-cli-migrations.test.ts src/test/mysql-cli-project-command.test.ts src/test/mysql-seed-cli.test.ts src/test/prisma-cli-schema-source.test.ts",
|
|
145
325
|
"coverage:cli:gate": "c8 report --all --exclude 'src/test/**' --reporter text --check-coverage",
|
|
146
326
|
"coverage:cli:gate:destructive": "npm run coverage:cli:gate -- --include src/cli/destructive.ts --lines 98 --statements 98 --branches 84 --functions 98",
|
|
147
327
|
"coverage:cli:gate:sql-statements": "npm run coverage:cli:gate -- --include src/cli/sql-statements.ts --lines 100 --statements 100 --branches 98 --functions 100",
|
|
@@ -151,8 +331,8 @@
|
|
|
151
331
|
"//coverage:cli:gate:compile-query": "compile_query's core: the CLOSED set of read operations an agent may compile, the sealed pool that makes 'never executes' structural rather than promised, and the aggregate-arg name harvest the PII refusal runs on. Every one of those is a refusal boundary, which is the same reason destructive.ts and pii-predicate-guard.ts carry their own floors. It gets a gate the SAME commit it joins coverage:cli:collect and the aggregate --include list, because a file in the collection with neither is collected and enforced by nothing, which is how mcp.ts and error-catalog.ts spent a release at a floor of zero. Floors measured 2026-08-15 at 100 lines / 100 statements / 94.21 branches / 100 functions.",
|
|
152
332
|
"coverage:cli:gate:compile-query": "npm run coverage:cli:gate -- --include src/cli/compile-query.ts --lines 100 --statements 100 --branches 94 --functions 100",
|
|
153
333
|
"coverage:cli:gate:error-catalog": "npm run coverage:cli:gate -- --include src/cli/error-catalog.ts --lines 100 --statements 100 --branches 90 --functions 100",
|
|
154
|
-
"//coverage:cli:gate:index": "cli/index.ts is the largest file in the repo (5,945 lines) and was in no coverage gate at all. The .c8rc.json //cli-gate argument for the other CLI files applies verbatim: coverage could fall to zero without anything noticing. The floors are LOW on purpose and are not a target: this file is argument parsing and command dispatch whose `process.exit` paths dominate any figure set over it, and the point of the gate is that the number cannot fall silently, not that it is high. MEASURED 2026-08-23 by `npm run coverage:cli:collect` (no database), read from the json-summary reporter rather than the text table, per the //cli-gate-measurements note: 32.62 lines / 32.62 statements / 75.62 branches / 20 functions, identical in isolation and in the nine-file collection. Floors sit about two points under. Raise as coverage improves; never lower one without recording why. It is deliberately NOT in coverage:cli:gate:aggregate, see that key's note.",
|
|
155
|
-
"coverage:cli:gate:index": "npm run coverage:cli:gate -- --include src/cli/index.ts --lines
|
|
334
|
+
"//coverage:cli:gate:index": "cli/index.ts is the largest file in the repo (5,945 lines) and was in no coverage gate at all. The .c8rc.json //cli-gate argument for the other CLI files applies verbatim: coverage could fall to zero without anything noticing. The floors are LOW on purpose and are not a target: this file is argument parsing and command dispatch whose `process.exit` paths dominate any figure set over it, and the point of the gate is that the number cannot fall silently, not that it is high. MEASURED 2026-08-23 by `npm run coverage:cli:collect` (no database), read from the json-summary reporter rather than the text table, per the //cli-gate-measurements note: 32.62 lines / 32.62 statements / 75.62 branches / 20 functions, identical in isolation and in the nine-file collection. Floors sat about two points under that reading. RE-MEASURED 2026-11-14 after the engine dispatch, config, help and refusal suites joined coverage:cli:collect (they run in the full suite but were not collected, so the file read 42.04 lines / 77.94 branches / 31.2 functions here while more of it ran elsewhere): 48.78 lines / 48.78 statements / 82.26 branches / 44.8 functions. Floors raised to sit about two points under the new reading. Raise as coverage improves; never lower one without recording why. It is deliberately NOT in coverage:cli:gate:aggregate, see that key's note.",
|
|
335
|
+
"coverage:cli:gate:index": "npm run coverage:cli:gate -- --include src/cli/index.ts --lines 46 --statements 46 --branches 80 --functions 42",
|
|
156
336
|
"coverage:cli:gate:local-server-guard": "npm run coverage:cli:gate -- --include src/cli/local-server-guard.ts --lines 100 --statements 100 --branches 96 --functions 100",
|
|
157
337
|
"//coverage:cli:gate:observe": "cli/observe.ts is the read-only metrics dashboard behind `turbine observe`: a loopback HTTP server with its own session token, one-time login ticket, Host allowlist, Origin check, rate limit and CSP, in front of two queries that run in read-only transactions. It was in no coverage gate at all (about 48 percent of lines were executed by the suites that happened to touch it), while Studio, which shares its perimeter, was. Floors MEASURED 2026-10-13 by `npm run coverage:cli:collect`, read from the json-summary reporter: 100 lines / 100 statements / 99.13 branches / 100 functions. THE COLLECTION BLANKS DATABASE_URL, so the figures are the no-database ones: the live-Postgres tests in observe-cli.test.ts skip here and are not counted, and with a database the figure is 99.14 branches and otherwise identical. That is by design: the fake pool and the fake Postgres wire server in that file reach every line without a database. The one uncovered branch is the non-Error arm of the server's 500 handler (`String(err)`), which a real pg pool never produces. Floors sit 2 points under. Held by this per-file gate only and NOT listed in coverage:cli:gate:aggregate, the same arrangement as local-server-guard.ts: that aggregate was baselined over the larger files and adding a 100 percent file would only move it. Raise as coverage improves; never lower one without recording why.",
|
|
158
338
|
"coverage:cli:gate:observe": "npm run coverage:cli:gate -- --include src/cli/observe.ts --lines 98 --statements 98 --branches 97 --functions 98",
|
|
@@ -166,6 +346,7 @@
|
|
|
166
346
|
"format": "biome format --write src/",
|
|
167
347
|
"check:error-codes": "tsx scripts/check-error-codes.ts",
|
|
168
348
|
"gen:capabilities": "tsx scripts/gen-capability-table.ts",
|
|
349
|
+
"gen:engine-support": "tsx scripts/gen-engine-support.ts",
|
|
169
350
|
"//check:error-prefix": "No message reaching a TurbineError may hand-write a `[turbine] ` prefix. formatErrorMessage prepends `[TURBINE_EXXX] ` unless the message already opens with that exact tag, and a hand-written `[turbine] ` never matches one, so the two stacked on roughly 355 of the package's throw sites. A prefix rule looks unnecessary because formatErrorMessage guarantees the [CODE] tag: true, and not the failure mode, which is the INTERACTION between the automatic tag and a manual one. Diagnostics that no code tag ever touches (console calls, stream writes, Studio HTTP bodies) keep the prefix and are named in the script's DIAGNOSTIC_SINKS.",
|
|
170
351
|
"check:error-prefix": "node scripts/check-error-prefix.mjs",
|
|
171
352
|
"check:changelog": "node scripts/check-changelog-headings.mjs",
|
|
@@ -182,6 +363,9 @@
|
|
|
182
363
|
"check:edge": "node scripts/check-edge-bundle.mjs",
|
|
183
364
|
"//check:pg-floor": "Installs the packed tarball next to EXACTLY the floor of dependencies.pg and imports every published entry point under both import and require. CI and dev machines only ever install the newest pg in range, so the floor is otherwise never exercised: a ^8.13.1 range shipped code that read pg.utils at load time, which pg first exports in 8.15.0, and 6 of the 8 entry points failed to import on 8.13 and 8.14. Packs dist/ itself when given no tarball, so it runs after `npm run build`. Called from prepublishOnly and from the pack-smoke job of both ci.yml and release.yml.",
|
|
184
365
|
"check:pg-floor": "node scripts/check-pg-floor.mjs",
|
|
366
|
+
"check:optional-pg-transports": "node scripts/check-optional-pg-transports.mjs",
|
|
367
|
+
"test:optional-pg-transports": "node --test tooling/optional-pg-transports/harness.test.mjs",
|
|
368
|
+
"check:sql-fragments": "node scripts/check-sql-fragments.mjs",
|
|
185
369
|
"prepublishOnly": "npm run build && npm run typecheck && npm run lint && npm run test:unit && npm run test:coverage:cli && npm run check:error-codes && npm run check:error-prefix && npm run check:changelog && npm run check:cycles && npm run check:skip-gates && npm run check:private-terms && npm run check:package && npm run check:package-types && npm run check:edge && npm run check:pg-floor && npm run size && npm run check:release-tests",
|
|
186
370
|
"prepack": "node scripts/strip-prepare.mjs",
|
|
187
371
|
"postpack": "node scripts/restore-prepare.mjs",
|
|
@@ -195,10 +379,30 @@
|
|
|
195
379
|
"site:deploy": "cd site && vercel --prod",
|
|
196
380
|
"gen:studio": "node scripts/build-studio-ui.mjs",
|
|
197
381
|
"pretypecheck": "npm run gen:studio",
|
|
198
|
-
"pretest": "
|
|
199
|
-
"pretest
|
|
200
|
-
"pretest:
|
|
201
|
-
"pretest:coverage
|
|
382
|
+
"//pretest": "A full build, not just gen:studio (which prebuild still runs), before every whole-suite run: tests in the suite import dist/ or the package by name, which resolves to dist/. Without it a fresh checkout (every CI job) fails them, and a stale dist/ tests old code while the run reports green. pretest:unit and pretest:coverage do the same for the same reason.",
|
|
383
|
+
"pretest": "npm run build",
|
|
384
|
+
"pretest:unit": "npm run build",
|
|
385
|
+
"pretest:coverage": "npm run build",
|
|
386
|
+
"pretest:coverage:cli": "npm run gen:studio",
|
|
387
|
+
"//coverage:cli:gate:tools": "The SQLite file ownership/read-only adapter, versioned effective discovery and single-shot CLI dispatcher share the MCP perimeter. Real SQLite tests include write and PII refusal controls, cleanup/shutdown races and actual CLI/MCP processes. Focused baseline: 99.23 lines/statements, 92.79 branches, 100 functions. Each module is held separately, outside the established aggregate; existing floors are unchanged.",
|
|
388
|
+
"coverage:cli:gate:sqlite-tools": "npm run coverage:cli:gate -- --include src/cli/sqlite-tools.ts --lines 96 --statements 96 --branches 90 --functions 98",
|
|
389
|
+
"coverage:cli:gate:tool-capabilities": "npm run coverage:cli:gate -- --include src/cli/tool-capabilities.ts --lines 96 --statements 96 --branches 90 --functions 98",
|
|
390
|
+
"coverage:cli:gate:tool-command": "npm run coverage:cli:gate -- --include src/cli/tool-command.ts --lines 96 --statements 96 --branches 90 --functions 98",
|
|
391
|
+
"coverage:cli:gate:mssql-tools": "npm run coverage:cli:gate -- --include src/cli/mssql-tools.ts --lines 97 --statements 97 --branches 80 --functions 98",
|
|
392
|
+
"//coverage:cli:gate:loader": "cli/loader.ts decides how a user TypeScript config or schema file gets loaded at all: it probes the project tsx install, picks between its programmatic APIs and legacy entries, and reports the real registration failure when one occurs. It was in no coverage gate, so its fallback entries (the legacy tsx/cjs side effect, a manifest that is not exported, an API entry with no register()) were never run by any collected suite. Held by this per-file gate only and NOT in the aggregate, the same arrangement as cli/index.ts. MEASURED 2026-11-14 by `npm run coverage:cli:collect` (no database), read from the json-summary reporter: 98.44 lines / 98.44 statements / 95.91 branches / 100 functions; the only uncovered lines are the Node without module.register() refusal, which no supported Node in CI reaches. Floors sit about two points under. A new test file for cli/loader.ts must be added to coverage:cli:collect or its coverage does not count here.",
|
|
393
|
+
"coverage:cli:gate:loader": "npm run coverage:cli:gate -- --include src/cli/loader.ts --lines 96 --statements 96 --branches 93 --functions 98",
|
|
394
|
+
"test:neon-http": "tsx --test src/test/neon-http.test.ts",
|
|
395
|
+
"test:neon-http:driver": "TURBINE_REQUIRE_NEON_HTTP_DRIVER=1 tsx --test src/test/neon-http-driver.test.ts",
|
|
396
|
+
"test:neon-http:native": "TURBINE_REQUIRE_NEON_HTTP_NATIVE=1 tsx --test src/test/neon-http-native.test.ts",
|
|
397
|
+
"test:neon-http:package": "node src/test/fixtures/neon-http/package-check.mjs",
|
|
398
|
+
"test:libsql": "tsx --test src/test/libsql*.test.ts && node src/test/fixtures/libsql-package.mjs",
|
|
399
|
+
"test:core": "tsx --test src/test/driver-neutral.test.ts src/test/driver-neutral-imports.test.ts src/test/driver-neutral-parsers.test.ts",
|
|
400
|
+
"test:core:packed": "node scripts/test-core-d1.mjs core",
|
|
401
|
+
"test:d1": "node scripts/test-core-d1.mjs d1",
|
|
402
|
+
"test:d1:catalog": "node --import tsx --test --test-concurrency=1 src/test/d1-introspection.test.ts src/test/fixtures/d1-introspection/consumers.test.ts src/test/fixtures/d1-introspection/graph.test.ts",
|
|
403
|
+
"test:d1:generation": "node src/test/fixtures/d1-generation/run.mjs",
|
|
404
|
+
"test:d1:migrations": "node src/test/fixtures/d1-native-migrations/run.mjs",
|
|
405
|
+
"build:optional-package": "node scripts/build-optional-package.mjs"
|
|
202
406
|
},
|
|
203
407
|
"engines": {
|
|
204
408
|
"node": ">=20.0.0"
|
|
@@ -226,13 +430,23 @@
|
|
|
226
430
|
"publint": "^0.3.24",
|
|
227
431
|
"size-limit": "^12.1.0",
|
|
228
432
|
"tsx": "^4.23.15",
|
|
229
|
-
"typescript": "^6.0.3"
|
|
433
|
+
"typescript": "^6.0.3",
|
|
434
|
+
"@neondatabase/serverless": "^1.2.0",
|
|
435
|
+
"ws": "^8.18.3",
|
|
436
|
+
"@edge-runtime/vm": "^5.0.0",
|
|
437
|
+
"@libsql/client": "^0.18.0",
|
|
438
|
+
"miniflare": "4.20260730.0",
|
|
439
|
+
"@cloudflare/workers-types": "5.20261106.1"
|
|
230
440
|
},
|
|
231
441
|
"peerDependencies": {
|
|
232
442
|
"@zvndev/powdb-client": ">=0.7.1 <1.0.0",
|
|
233
443
|
"@zvndev/powdb-embedded": ">=0.7.1 <1.0.0",
|
|
234
444
|
"mssql": "^10.0.0 || ^11.0.0 || ^12.0.0",
|
|
235
|
-
"mysql2": "^3.0.0"
|
|
445
|
+
"mysql2": "^3.0.0",
|
|
446
|
+
"@neondatabase/serverless": "^1.2.0",
|
|
447
|
+
"@libsql/client": "^0.18.0",
|
|
448
|
+
"better-sqlite3": "^12.11.1",
|
|
449
|
+
"miniflare": "4.20260730.0"
|
|
236
450
|
},
|
|
237
451
|
"peerDependenciesMeta": {
|
|
238
452
|
"@zvndev/powdb-client": {
|
|
@@ -246,6 +460,18 @@
|
|
|
246
460
|
},
|
|
247
461
|
"mysql2": {
|
|
248
462
|
"optional": true
|
|
463
|
+
},
|
|
464
|
+
"@neondatabase/serverless": {
|
|
465
|
+
"optional": true
|
|
466
|
+
},
|
|
467
|
+
"@libsql/client": {
|
|
468
|
+
"optional": true
|
|
469
|
+
},
|
|
470
|
+
"better-sqlite3": {
|
|
471
|
+
"optional": true
|
|
472
|
+
},
|
|
473
|
+
"miniflare": {
|
|
474
|
+
"optional": true
|
|
249
475
|
}
|
|
250
476
|
},
|
|
251
477
|
"keywords": [
|
|
@@ -105,7 +105,7 @@ at any depth; `AND` and `OR` take arrays.
|
|
|
105
105
|
To compare two columns, wrap the other one in `col()`, imported from
|
|
106
106
|
`turbine-orm`: `rindScore: { gt: col('aromaScore') }`. A plain `{ col: 'x' }`
|
|
107
107
|
object is refused with `TURBINE_E003`, and so is an operand that does not fit
|
|
108
|
-
its operator, such as an array for `equals` or `null` for `gt`.
|
|
108
|
+
its operator, such as an array for `equals` on a scalar column or `null` for `gt`. Whole-array equality is valid on an array column and can identify a unique array key.
|
|
109
109
|
|
|
110
110
|
A key whose value is `undefined` is left out, as in Prisma. When that empties
|
|
111
111
|
the whole `where`, `findFirst` throws `TURBINE_E003` instead of returning an
|
|
@@ -271,10 +271,11 @@ where: { guildId: 4, batchRef: 'WB-0007' } // equivalent
|
|
|
271
271
|
`update`, `delete` and `upsert` each require a `where` that identifies one row,
|
|
272
272
|
by the same rule as `findUnique`, and anything else is `TURBINE_E003` naming the
|
|
273
273
|
keys that would work. For an upsert the `where` names the row to update, and is
|
|
274
|
-
the `ON CONFLICT` target when `
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
`where
|
|
274
|
+
the `ON CONFLICT` target only when `where` is exactly one unique key and
|
|
275
|
+
`create` carries the same values. Extra predicates beside a unique key, two
|
|
276
|
+
separate unique keys, or values absent from `create` require a lookup by the
|
|
277
|
+
whole `where`, inside a transaction. An empty `update` or nested write also
|
|
278
|
+
requires that lookup. Use `updateMany` and `deleteMany` for
|
|
278
279
|
"every row matching a filter". They take no `limit`, `take`, `offset` or `skip`
|
|
279
280
|
(`TURBINE_E003`): to write a bounded batch, `findMany` the ids first, then pass
|
|
280
281
|
`where: { id: { in: ids } }`.
|