turbine-orm 0.49.0 → 0.50.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 +122 -39
- package/dist/cjs/adapters/cockroachdb.d.ts +39 -0
- package/dist/cjs/adapters/index.d.ts +110 -0
- package/dist/cjs/adapters/yugabytedb.d.ts +51 -0
- package/dist/cjs/cli/config.d.ts +181 -0
- package/dist/cjs/cli/config.js +32 -6
- package/dist/cjs/cli/destructive.d.ts +38 -0
- package/dist/cjs/cli/index.d.ts +359 -0
- package/dist/cjs/cli/index.js +228 -56
- package/dist/cjs/cli/loader.d.ts +61 -0
- package/dist/cjs/cli/mcp.d.ts +42 -0
- package/dist/cjs/cli/migrate.d.ts +356 -0
- package/dist/cjs/cli/migrate.js +131 -40
- package/dist/cjs/cli/observe-ui.d.ts +1 -0
- package/dist/cjs/cli/observe-ui.js +14 -5
- package/dist/cjs/cli/observe.d.ts +25 -0
- package/dist/cjs/cli/observe.js +49 -12
- package/dist/cjs/cli/pii-tags.d.ts +53 -0
- package/dist/cjs/cli/prisma-report.d.ts +33 -0
- package/dist/cjs/cli/prisma-report.js +73 -0
- package/dist/cjs/cli/prisma-resolve.d.ts +106 -0
- package/dist/cjs/cli/prisma-resolve.js +1 -0
- package/dist/cjs/cli/prisma-schema.d.ts +176 -0
- package/dist/cjs/cli/prisma-schema.js +82 -4
- package/dist/cjs/cli/rate-limit.d.ts +32 -0
- package/dist/cjs/cli/rate-limit.js +45 -0
- package/dist/cjs/cli/studio-demo.d.ts +43 -0
- package/dist/cjs/cli/studio-ui.generated.d.ts +1 -0
- package/dist/cjs/cli/studio.d.ts +207 -0
- package/dist/cjs/cli/studio.js +136 -71
- package/dist/cjs/cli/ui.d.ts +73 -0
- package/dist/cjs/cli/ui.js +51 -9
- package/dist/cjs/client.d.ts +837 -0
- package/dist/cjs/client.js +3 -0
- package/dist/cjs/dialect.d.ts +516 -0
- package/dist/cjs/dialect.js +37 -12
- package/dist/cjs/errors.d.ts +370 -0
- package/dist/cjs/generate.d.ts +137 -0
- package/dist/cjs/generate.js +39 -6
- package/dist/cjs/index-advisor.d.ts +153 -0
- package/dist/cjs/index-stats.d.ts +384 -0
- package/dist/cjs/index.d.ts +55 -0
- package/dist/cjs/index.js +7 -2
- package/dist/cjs/introspect.d.ts +269 -0
- package/dist/cjs/mssql.d.ts +232 -0
- package/dist/cjs/mssql.js +6 -0
- package/dist/cjs/mysql.d.ts +173 -0
- package/dist/cjs/mysql.js +16 -0
- package/dist/cjs/nested-write.d.ts +96 -0
- package/dist/cjs/nested-write.js +414 -24
- package/dist/cjs/observe.d.ts +115 -0
- package/dist/cjs/optional-peer-import.d.cts +72 -0
- package/dist/cjs/pipeline-submittable.d.ts +93 -0
- package/dist/cjs/pipeline.d.ts +71 -0
- package/dist/cjs/powdb-introspect.d.ts +84 -0
- package/dist/cjs/powdb.d.ts +931 -0
- package/dist/cjs/powdb.js +106 -21
- package/dist/cjs/powql.d.ts +592 -0
- package/dist/cjs/powql.js +42 -6
- package/dist/cjs/prisma-compat.d.ts +283 -0
- package/dist/cjs/prisma-compat.js +167 -9
- package/dist/cjs/query/aggregates.d.ts +92 -0
- package/dist/cjs/query/aggregates.js +7 -3
- package/dist/cjs/query/batched-loader.d.ts +193 -0
- package/dist/cjs/query/builder.d.ts +849 -0
- package/dist/cjs/query/builder.js +571 -65
- package/dist/cjs/query/compound-unique.d.ts +51 -0
- package/dist/cjs/query/deferred.d.ts +223 -0
- package/dist/cjs/query/filters.d.ts +201 -0
- package/dist/cjs/query/index.d.ts +14 -0
- package/dist/cjs/query/index.js +6 -1
- package/dist/cjs/query/relations.d.ts +609 -0
- package/dist/cjs/query/relations.js +693 -46
- package/dist/cjs/query/types.d.ts +1300 -0
- package/dist/cjs/query/utils.d.ts +209 -0
- package/dist/cjs/query/utils.js +208 -1
- package/dist/cjs/query/warn-registry.d.ts +68 -0
- package/dist/cjs/query/warn-registry.js +9 -0
- package/dist/cjs/query/where-compile.d.ts +139 -0
- package/dist/cjs/query/where.d.ts +548 -0
- package/dist/cjs/query/where.js +58 -22
- package/dist/cjs/query/writes.d.ts +172 -0
- package/dist/cjs/query/writes.js +105 -12
- package/dist/cjs/realtime.d.ts +70 -0
- package/dist/cjs/schema-builder.d.ts +354 -0
- package/dist/cjs/schema-metadata.d.ts +83 -0
- package/dist/cjs/schema-sql.d.ts +217 -0
- package/dist/cjs/schema-sql.js +23 -5
- package/dist/cjs/schema.d.ts +356 -0
- package/dist/cjs/schema.js +125 -0
- package/dist/cjs/seed.d.ts +15 -0
- package/dist/cjs/serverless.d.ts +142 -0
- package/dist/cjs/sqlite.d.ts +143 -0
- package/dist/cjs/sqlite.js +4 -0
- package/dist/cjs/typed-sql.d.ts +102 -0
- package/dist/cli/config.d.ts +18 -4
- package/dist/cli/config.js +31 -6
- package/dist/cli/index.d.ts +123 -0
- package/dist/cli/index.js +223 -58
- package/dist/cli/migrate.d.ts +59 -10
- package/dist/cli/migrate.js +128 -41
- package/dist/cli/observe-ui.d.ts +1 -1
- package/dist/cli/observe-ui.js +14 -5
- package/dist/cli/observe.d.ts +7 -1
- package/dist/cli/observe.js +48 -12
- package/dist/cli/prisma-report.d.ts +14 -0
- package/dist/cli/prisma-report.js +72 -0
- package/dist/cli/prisma-resolve.d.ts +6 -0
- package/dist/cli/prisma-resolve.js +1 -0
- package/dist/cli/prisma-schema.d.ts +62 -2
- package/dist/cli/prisma-schema.js +81 -4
- package/dist/cli/rate-limit.d.ts +32 -0
- package/dist/cli/rate-limit.js +40 -0
- package/dist/cli/studio.d.ts +5 -5
- package/dist/cli/studio.js +135 -70
- package/dist/cli/ui.d.ts +1 -1
- package/dist/cli/ui.js +51 -9
- package/dist/client.d.ts +40 -0
- package/dist/client.js +3 -0
- package/dist/dialect.d.ts +17 -1
- package/dist/dialect.js +37 -12
- package/dist/generate.js +40 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/mssql.js +6 -0
- package/dist/mysql.js +16 -0
- package/dist/nested-write.d.ts +2 -0
- package/dist/nested-write.js +415 -25
- package/dist/powdb.d.ts +4 -2
- package/dist/powdb.js +106 -21
- package/dist/powql.d.ts +5 -0
- package/dist/powql.js +42 -6
- package/dist/prisma-compat.d.ts +2 -0
- package/dist/prisma-compat.js +166 -8
- package/dist/query/aggregates.js +7 -3
- package/dist/query/builder.d.ts +292 -21
- package/dist/query/builder.js +570 -64
- package/dist/query/deferred.d.ts +39 -0
- package/dist/query/index.d.ts +1 -1
- package/dist/query/index.js +1 -1
- package/dist/query/relations.d.ts +173 -5
- package/dist/query/relations.js +688 -47
- package/dist/query/types.d.ts +123 -39
- package/dist/query/utils.d.ts +116 -0
- package/dist/query/utils.js +198 -0
- package/dist/query/warn-registry.d.ts +9 -0
- package/dist/query/warn-registry.js +9 -0
- package/dist/query/where.d.ts +38 -1
- package/dist/query/where.js +58 -23
- package/dist/query/writes.d.ts +42 -1
- package/dist/query/writes.js +104 -13
- package/dist/schema-sql.d.ts +14 -0
- package/dist/schema-sql.js +23 -5
- package/dist/schema.d.ts +38 -0
- package/dist/schema.js +123 -0
- package/dist/sqlite.js +4 -0
- package/package.json +77 -28
package/dist/schema.d.ts
CHANGED
|
@@ -220,6 +220,44 @@ export interface IndexMetadata {
|
|
|
220
220
|
export declare function pgTypeToTs(pgType: string, nullable: boolean): string;
|
|
221
221
|
/** Check if a Postgres type is a date/timestamp that needs Date parsing */
|
|
222
222
|
export declare function isDateType(pgType: string): boolean;
|
|
223
|
+
/**
|
|
224
|
+
* Classify a column type as a TIME-OF-DAY type (`time` / `timetz`), or `null`
|
|
225
|
+
* for anything else.
|
|
226
|
+
*
|
|
227
|
+
* These are deliberately NOT part of {@link isDateType}/`dateColumns`: a
|
|
228
|
+
* time-of-day value has no date part, so it is never coerced to a JS `Date` on
|
|
229
|
+
* read (Postgres hands back `09:00:00` and that is what the row carries). They
|
|
230
|
+
* still need their own classification on the WRITE path, because a JS `Date`
|
|
231
|
+
* bound straight through serializes as a full ISO timestamp
|
|
232
|
+
* (`1970-01-01T04:00:00.000-05:00`), which Postgres rejects for a `time`
|
|
233
|
+
* column with `22007 invalid input syntax for type time`.
|
|
234
|
+
*
|
|
235
|
+
* Recognizes the `udt_name` spellings introspection records (`time`, `timetz`),
|
|
236
|
+
* the SQL-standard long spellings, and a trailing precision suffix
|
|
237
|
+
* (`time(6)`), so MySQL and SQL Server `TIME` columns classify from their
|
|
238
|
+
* dialect type as well.
|
|
239
|
+
*/
|
|
240
|
+
export declare function timeOfDayKind(dbType: string | undefined): 'time' | 'timetz' | null;
|
|
241
|
+
/**
|
|
242
|
+
* Classify a column type as a ZONE-LESS date/timestamp type (`date`,
|
|
243
|
+
* `timestamp` = `timestamp without time zone`), or `null` for anything else.
|
|
244
|
+
*
|
|
245
|
+
* `timestamptz` is deliberately excluded: it carries a real instant, and the
|
|
246
|
+
* driver's local-offset serialization is CORRECT for it (Postgres converts the
|
|
247
|
+
* offset away). The two types here store the literal wall-clock fields they
|
|
248
|
+
* are given, so binding a JS `Date` through the driver stores the process's
|
|
249
|
+
* LOCAL calendar fields — in `America/Los_Angeles`, `2026-07-25T00:00:00Z`
|
|
250
|
+
* lands as `2026-07-24 17:00:00`. The read path already interprets an
|
|
251
|
+
* offset-less value as UTC (see `parseDbDate`), so the write path has to bind
|
|
252
|
+
* the UTC components for the round trip to be stable.
|
|
253
|
+
*
|
|
254
|
+
* Recognizes the `udt_name` spellings introspection records, the SQL-standard
|
|
255
|
+
* long spellings, and a trailing precision suffix (`timestamp(3)`).
|
|
256
|
+
* Deliberately does NOT recognize `datetime`: MySQL's `TIMESTAMP`/`DATETIME`
|
|
257
|
+
* are converted by the session time zone, so a UTC-component literal would be
|
|
258
|
+
* misread there. The callers additionally gate on the PostgreSQL dialect.
|
|
259
|
+
*/
|
|
260
|
+
export declare function localDateTimeKind(dbType: string | undefined): 'date' | 'timestamp' | null;
|
|
223
261
|
/** Get the Postgres array cast type for UNNEST batch inserts */
|
|
224
262
|
export declare function pgArrayType(pgType: string): string;
|
|
225
263
|
/** snake_case → camelCase */
|
package/dist/schema.js
CHANGED
|
@@ -78,26 +78,81 @@ const PG_TO_TS = {
|
|
|
78
78
|
vector: 'number[]',
|
|
79
79
|
};
|
|
80
80
|
const DATE_TYPES = new Set(['timestamptz', 'timestamp', 'date']);
|
|
81
|
+
/**
|
|
82
|
+
* Postgres type → the array cast `createMany`'s `UNNEST(ARRAY[...]::<type>)`
|
|
83
|
+
* applies to that column's value list.
|
|
84
|
+
*
|
|
85
|
+
* Every entry must be present for a type that has NO assignment cast from
|
|
86
|
+
* `text`: the `text[]` fallback below then produces text-typed UNNEST output
|
|
87
|
+
* and Postgres refuses the insert with `42804 column "x" is of type <t> but
|
|
88
|
+
* expression is of type text`. `varchar` / `char` / `bpchar` deliberately keep
|
|
89
|
+
* the `text[]` cast — `text` assignment-casts to all three, and pinning them
|
|
90
|
+
* would change already-emitted SQL for no behavioral gain.
|
|
91
|
+
*/
|
|
81
92
|
const PG_TO_ARRAY = {
|
|
93
|
+
// Numeric
|
|
82
94
|
int2: 'smallint[]',
|
|
83
95
|
int4: 'integer[]',
|
|
84
96
|
int8: 'bigint[]',
|
|
85
97
|
float4: 'real[]',
|
|
86
98
|
float8: 'double precision[]',
|
|
87
99
|
numeric: 'numeric[]',
|
|
100
|
+
money: 'money[]',
|
|
101
|
+
oid: 'oid[]',
|
|
88
102
|
bool: 'boolean[]',
|
|
103
|
+
// Character
|
|
89
104
|
text: 'text[]',
|
|
90
105
|
varchar: 'text[]',
|
|
91
106
|
char: 'text[]',
|
|
92
107
|
bpchar: 'text[]',
|
|
108
|
+
name: 'name[]',
|
|
109
|
+
citext: 'citext[]',
|
|
110
|
+
xml: 'xml[]',
|
|
93
111
|
uuid: 'uuid[]',
|
|
112
|
+
// Date / time. `time` and `timetz` were missing, so a `createMany` on a
|
|
113
|
+
// time-of-day column cast its values `text[]` and failed 42804 even though
|
|
114
|
+
// the per-value narrowing produced a valid `'09:00:00'` literal.
|
|
94
115
|
timestamptz: 'timestamptz[]',
|
|
95
116
|
timestamp: 'timestamp[]',
|
|
96
117
|
date: 'date[]',
|
|
118
|
+
time: 'time[]',
|
|
119
|
+
timetz: 'timetz[]',
|
|
120
|
+
interval: 'interval[]',
|
|
121
|
+
// JSON / binary
|
|
97
122
|
json: 'json[]',
|
|
98
123
|
jsonb: 'jsonb[]',
|
|
99
124
|
bytea: 'bytea[]',
|
|
125
|
+
// Network
|
|
100
126
|
inet: 'inet[]',
|
|
127
|
+
cidr: 'cidr[]',
|
|
128
|
+
macaddr: 'macaddr[]',
|
|
129
|
+
macaddr8: 'macaddr8[]',
|
|
130
|
+
// Geometric
|
|
131
|
+
point: 'point[]',
|
|
132
|
+
line: 'line[]',
|
|
133
|
+
lseg: 'lseg[]',
|
|
134
|
+
box: 'box[]',
|
|
135
|
+
path: 'path[]',
|
|
136
|
+
polygon: 'polygon[]',
|
|
137
|
+
circle: 'circle[]',
|
|
138
|
+
// Text search
|
|
139
|
+
tsvector: 'tsvector[]',
|
|
140
|
+
tsquery: 'tsquery[]',
|
|
141
|
+
// Ranges / multiranges
|
|
142
|
+
int4range: 'int4range[]',
|
|
143
|
+
int8range: 'int8range[]',
|
|
144
|
+
numrange: 'numrange[]',
|
|
145
|
+
tsrange: 'tsrange[]',
|
|
146
|
+
tstzrange: 'tstzrange[]',
|
|
147
|
+
daterange: 'daterange[]',
|
|
148
|
+
int4multirange: 'int4multirange[]',
|
|
149
|
+
int8multirange: 'int8multirange[]',
|
|
150
|
+
nummultirange: 'nummultirange[]',
|
|
151
|
+
tsmultirange: 'tsmultirange[]',
|
|
152
|
+
tstzmultirange: 'tstzmultirange[]',
|
|
153
|
+
datemultirange: 'datemultirange[]',
|
|
154
|
+
// pgvector
|
|
155
|
+
vector: 'vector[]',
|
|
101
156
|
};
|
|
102
157
|
/** Map a Postgres type to its TypeScript equivalent */
|
|
103
158
|
export function pgTypeToTs(pgType, nullable) {
|
|
@@ -114,6 +169,74 @@ export function pgTypeToTs(pgType, nullable) {
|
|
|
114
169
|
export function isDateType(pgType) {
|
|
115
170
|
return DATE_TYPES.has(pgType);
|
|
116
171
|
}
|
|
172
|
+
/**
|
|
173
|
+
* Classify a column type as a TIME-OF-DAY type (`time` / `timetz`), or `null`
|
|
174
|
+
* for anything else.
|
|
175
|
+
*
|
|
176
|
+
* These are deliberately NOT part of {@link isDateType}/`dateColumns`: a
|
|
177
|
+
* time-of-day value has no date part, so it is never coerced to a JS `Date` on
|
|
178
|
+
* read (Postgres hands back `09:00:00` and that is what the row carries). They
|
|
179
|
+
* still need their own classification on the WRITE path, because a JS `Date`
|
|
180
|
+
* bound straight through serializes as a full ISO timestamp
|
|
181
|
+
* (`1970-01-01T04:00:00.000-05:00`), which Postgres rejects for a `time`
|
|
182
|
+
* column with `22007 invalid input syntax for type time`.
|
|
183
|
+
*
|
|
184
|
+
* Recognizes the `udt_name` spellings introspection records (`time`, `timetz`),
|
|
185
|
+
* the SQL-standard long spellings, and a trailing precision suffix
|
|
186
|
+
* (`time(6)`), so MySQL and SQL Server `TIME` columns classify from their
|
|
187
|
+
* dialect type as well.
|
|
188
|
+
*/
|
|
189
|
+
export function timeOfDayKind(dbType) {
|
|
190
|
+
if (!dbType)
|
|
191
|
+
return null;
|
|
192
|
+
const t = dbType
|
|
193
|
+
.trim()
|
|
194
|
+
.toLowerCase()
|
|
195
|
+
// Precision can sit at the end (`time(6)`) or mid-spelling
|
|
196
|
+
// (`time(6) with time zone`), so strip it wherever it appears.
|
|
197
|
+
.replace(/\s*\(\s*\d+\s*\)\s*/, ' ')
|
|
198
|
+
.trim();
|
|
199
|
+
if (t === 'time' || t === 'time without time zone')
|
|
200
|
+
return 'time';
|
|
201
|
+
if (t === 'timetz' || t === 'time with time zone')
|
|
202
|
+
return 'timetz';
|
|
203
|
+
return null;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Classify a column type as a ZONE-LESS date/timestamp type (`date`,
|
|
207
|
+
* `timestamp` = `timestamp without time zone`), or `null` for anything else.
|
|
208
|
+
*
|
|
209
|
+
* `timestamptz` is deliberately excluded: it carries a real instant, and the
|
|
210
|
+
* driver's local-offset serialization is CORRECT for it (Postgres converts the
|
|
211
|
+
* offset away). The two types here store the literal wall-clock fields they
|
|
212
|
+
* are given, so binding a JS `Date` through the driver stores the process's
|
|
213
|
+
* LOCAL calendar fields — in `America/Los_Angeles`, `2026-07-25T00:00:00Z`
|
|
214
|
+
* lands as `2026-07-24 17:00:00`. The read path already interprets an
|
|
215
|
+
* offset-less value as UTC (see `parseDbDate`), so the write path has to bind
|
|
216
|
+
* the UTC components for the round trip to be stable.
|
|
217
|
+
*
|
|
218
|
+
* Recognizes the `udt_name` spellings introspection records, the SQL-standard
|
|
219
|
+
* long spellings, and a trailing precision suffix (`timestamp(3)`).
|
|
220
|
+
* Deliberately does NOT recognize `datetime`: MySQL's `TIMESTAMP`/`DATETIME`
|
|
221
|
+
* are converted by the session time zone, so a UTC-component literal would be
|
|
222
|
+
* misread there. The callers additionally gate on the PostgreSQL dialect.
|
|
223
|
+
*/
|
|
224
|
+
export function localDateTimeKind(dbType) {
|
|
225
|
+
if (!dbType)
|
|
226
|
+
return null;
|
|
227
|
+
const t = dbType
|
|
228
|
+
.trim()
|
|
229
|
+
.toLowerCase()
|
|
230
|
+
// Precision can sit at the end (`timestamp(3)`) or mid-spelling
|
|
231
|
+
// (`timestamp(3) without time zone`), so strip it wherever it appears.
|
|
232
|
+
.replace(/\s*\(\s*\d+\s*\)\s*/, ' ')
|
|
233
|
+
.trim();
|
|
234
|
+
if (t === 'date')
|
|
235
|
+
return 'date';
|
|
236
|
+
if (t === 'timestamp' || t === 'timestamp without time zone')
|
|
237
|
+
return 'timestamp';
|
|
238
|
+
return null;
|
|
239
|
+
}
|
|
117
240
|
/** Get the Postgres array cast type for UNNEST batch inserts */
|
|
118
241
|
export function pgArrayType(pgType) {
|
|
119
242
|
return PG_TO_ARRAY[pgType] ?? 'text[]';
|
package/dist/sqlite.js
CHANGED
|
@@ -454,6 +454,10 @@ export const sqliteDialect = {
|
|
|
454
454
|
buildUpsertStatement(input) {
|
|
455
455
|
return (`INSERT INTO ${input.table} (${input.insertColumns.join(', ')}) VALUES (${input.valuePlaceholders.join(', ')})` +
|
|
456
456
|
` ON CONFLICT (${input.conflictColumns.join(', ')}) DO UPDATE SET ${input.updateSetClauses.join(', ')}` +
|
|
457
|
+
// SQLite's upsert takes the same trailing conflict-UPDATE predicate as
|
|
458
|
+
// Postgres, so `supportsUpsertUpdateWhere` (inherited true) is honest and
|
|
459
|
+
// global filters restrict the UPDATE branch here too.
|
|
460
|
+
(input.updateWhere ? ` WHERE ${input.updateWhere}` : '') +
|
|
457
461
|
this.buildReturningClause(input.returning));
|
|
458
462
|
},
|
|
459
463
|
buildInsensitiveLike(column, paramRef) {
|
package/package.json
CHANGED
|
@@ -1,53 +1,99 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "turbine-orm",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.50.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
|
+
"//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).",
|
|
6
7
|
"exports": {
|
|
7
8
|
".": {
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
"import": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"require": {
|
|
14
|
+
"types": "./dist/cjs/index.d.ts",
|
|
15
|
+
"default": "./dist/cjs/index.js"
|
|
16
|
+
}
|
|
11
17
|
},
|
|
12
18
|
"./serverless": {
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
19
|
+
"import": {
|
|
20
|
+
"types": "./dist/serverless.d.ts",
|
|
21
|
+
"default": "./dist/serverless.js"
|
|
22
|
+
},
|
|
23
|
+
"require": {
|
|
24
|
+
"types": "./dist/cjs/serverless.d.ts",
|
|
25
|
+
"default": "./dist/cjs/serverless.js"
|
|
26
|
+
}
|
|
16
27
|
},
|
|
17
28
|
"./prisma-compat": {
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
29
|
+
"import": {
|
|
30
|
+
"types": "./dist/prisma-compat.d.ts",
|
|
31
|
+
"default": "./dist/prisma-compat.js"
|
|
32
|
+
},
|
|
33
|
+
"require": {
|
|
34
|
+
"types": "./dist/cjs/prisma-compat.d.ts",
|
|
35
|
+
"default": "./dist/cjs/prisma-compat.js"
|
|
36
|
+
}
|
|
21
37
|
},
|
|
22
38
|
"./sqlite": {
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
39
|
+
"import": {
|
|
40
|
+
"types": "./dist/sqlite.d.ts",
|
|
41
|
+
"default": "./dist/sqlite.js"
|
|
42
|
+
},
|
|
43
|
+
"require": {
|
|
44
|
+
"types": "./dist/cjs/sqlite.d.ts",
|
|
45
|
+
"default": "./dist/cjs/sqlite.js"
|
|
46
|
+
}
|
|
26
47
|
},
|
|
27
48
|
"./mysql": {
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
49
|
+
"import": {
|
|
50
|
+
"types": "./dist/mysql.d.ts",
|
|
51
|
+
"default": "./dist/mysql.js"
|
|
52
|
+
},
|
|
53
|
+
"require": {
|
|
54
|
+
"types": "./dist/cjs/mysql.d.ts",
|
|
55
|
+
"default": "./dist/cjs/mysql.js"
|
|
56
|
+
}
|
|
31
57
|
},
|
|
32
58
|
"./mssql": {
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
59
|
+
"import": {
|
|
60
|
+
"types": "./dist/mssql.d.ts",
|
|
61
|
+
"default": "./dist/mssql.js"
|
|
62
|
+
},
|
|
63
|
+
"require": {
|
|
64
|
+
"types": "./dist/cjs/mssql.d.ts",
|
|
65
|
+
"default": "./dist/cjs/mssql.js"
|
|
66
|
+
}
|
|
36
67
|
},
|
|
37
68
|
"./powdb": {
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
69
|
+
"import": {
|
|
70
|
+
"types": "./dist/powdb.d.ts",
|
|
71
|
+
"default": "./dist/powdb.js"
|
|
72
|
+
},
|
|
73
|
+
"require": {
|
|
74
|
+
"types": "./dist/cjs/powdb.d.ts",
|
|
75
|
+
"default": "./dist/cjs/powdb.js"
|
|
76
|
+
}
|
|
41
77
|
},
|
|
42
78
|
"./cli": {
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
79
|
+
"import": {
|
|
80
|
+
"types": "./dist/cli/config.d.ts",
|
|
81
|
+
"default": "./dist/cli/config.js"
|
|
82
|
+
},
|
|
83
|
+
"require": {
|
|
84
|
+
"types": "./dist/cjs/cli/config.d.ts",
|
|
85
|
+
"default": "./dist/cjs/cli/config.js"
|
|
86
|
+
}
|
|
46
87
|
},
|
|
47
88
|
"./adapters": {
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
89
|
+
"import": {
|
|
90
|
+
"types": "./dist/adapters/index.d.ts",
|
|
91
|
+
"default": "./dist/adapters/index.js"
|
|
92
|
+
},
|
|
93
|
+
"require": {
|
|
94
|
+
"types": "./dist/cjs/adapters/index.d.ts",
|
|
95
|
+
"default": "./dist/cjs/adapters/index.js"
|
|
96
|
+
}
|
|
51
97
|
}
|
|
52
98
|
},
|
|
53
99
|
"main": "./dist/cjs/index.js",
|
|
@@ -80,6 +126,7 @@
|
|
|
80
126
|
"lint:fix": "biome check --write src/",
|
|
81
127
|
"format": "biome format --write src/",
|
|
82
128
|
"check:error-codes": "tsx scripts/check-error-codes.ts",
|
|
129
|
+
"check:package": "publint --strict && attw --pack . --profile node16",
|
|
83
130
|
"prepublishOnly": "npm run build && npm run typecheck && npm run lint && npm run test:unit && npm run check:error-codes && npm run size",
|
|
84
131
|
"prepack": "node scripts/strip-prepare.mjs",
|
|
85
132
|
"postpack": "node scripts/restore-prepare.mjs",
|
|
@@ -105,6 +152,7 @@
|
|
|
105
152
|
"pg": "^8.13.1"
|
|
106
153
|
},
|
|
107
154
|
"devDependencies": {
|
|
155
|
+
"@arethetypeswrong/cli": "^0.18.2",
|
|
108
156
|
"@biomejs/biome": "^2.4.10",
|
|
109
157
|
"@size-limit/esbuild": "^12.1.0",
|
|
110
158
|
"@size-limit/file": "^12.1.0",
|
|
@@ -116,6 +164,7 @@
|
|
|
116
164
|
"lint-staged": "^17.0.8",
|
|
117
165
|
"mssql": "^12.7.0",
|
|
118
166
|
"mysql2": "^3.22.5",
|
|
167
|
+
"publint": "^0.3.16",
|
|
119
168
|
"size-limit": "^12.1.0",
|
|
120
169
|
"tsx": "^4.19.0",
|
|
121
170
|
"typescript": "^6.0.3"
|