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.
Files changed (157) hide show
  1. package/README.md +122 -39
  2. package/dist/cjs/adapters/cockroachdb.d.ts +39 -0
  3. package/dist/cjs/adapters/index.d.ts +110 -0
  4. package/dist/cjs/adapters/yugabytedb.d.ts +51 -0
  5. package/dist/cjs/cli/config.d.ts +181 -0
  6. package/dist/cjs/cli/config.js +32 -6
  7. package/dist/cjs/cli/destructive.d.ts +38 -0
  8. package/dist/cjs/cli/index.d.ts +359 -0
  9. package/dist/cjs/cli/index.js +228 -56
  10. package/dist/cjs/cli/loader.d.ts +61 -0
  11. package/dist/cjs/cli/mcp.d.ts +42 -0
  12. package/dist/cjs/cli/migrate.d.ts +356 -0
  13. package/dist/cjs/cli/migrate.js +131 -40
  14. package/dist/cjs/cli/observe-ui.d.ts +1 -0
  15. package/dist/cjs/cli/observe-ui.js +14 -5
  16. package/dist/cjs/cli/observe.d.ts +25 -0
  17. package/dist/cjs/cli/observe.js +49 -12
  18. package/dist/cjs/cli/pii-tags.d.ts +53 -0
  19. package/dist/cjs/cli/prisma-report.d.ts +33 -0
  20. package/dist/cjs/cli/prisma-report.js +73 -0
  21. package/dist/cjs/cli/prisma-resolve.d.ts +106 -0
  22. package/dist/cjs/cli/prisma-resolve.js +1 -0
  23. package/dist/cjs/cli/prisma-schema.d.ts +176 -0
  24. package/dist/cjs/cli/prisma-schema.js +82 -4
  25. package/dist/cjs/cli/rate-limit.d.ts +32 -0
  26. package/dist/cjs/cli/rate-limit.js +45 -0
  27. package/dist/cjs/cli/studio-demo.d.ts +43 -0
  28. package/dist/cjs/cli/studio-ui.generated.d.ts +1 -0
  29. package/dist/cjs/cli/studio.d.ts +207 -0
  30. package/dist/cjs/cli/studio.js +136 -71
  31. package/dist/cjs/cli/ui.d.ts +73 -0
  32. package/dist/cjs/cli/ui.js +51 -9
  33. package/dist/cjs/client.d.ts +837 -0
  34. package/dist/cjs/client.js +3 -0
  35. package/dist/cjs/dialect.d.ts +516 -0
  36. package/dist/cjs/dialect.js +37 -12
  37. package/dist/cjs/errors.d.ts +370 -0
  38. package/dist/cjs/generate.d.ts +137 -0
  39. package/dist/cjs/generate.js +39 -6
  40. package/dist/cjs/index-advisor.d.ts +153 -0
  41. package/dist/cjs/index-stats.d.ts +384 -0
  42. package/dist/cjs/index.d.ts +55 -0
  43. package/dist/cjs/index.js +7 -2
  44. package/dist/cjs/introspect.d.ts +269 -0
  45. package/dist/cjs/mssql.d.ts +232 -0
  46. package/dist/cjs/mssql.js +6 -0
  47. package/dist/cjs/mysql.d.ts +173 -0
  48. package/dist/cjs/mysql.js +16 -0
  49. package/dist/cjs/nested-write.d.ts +96 -0
  50. package/dist/cjs/nested-write.js +414 -24
  51. package/dist/cjs/observe.d.ts +115 -0
  52. package/dist/cjs/optional-peer-import.d.cts +72 -0
  53. package/dist/cjs/pipeline-submittable.d.ts +93 -0
  54. package/dist/cjs/pipeline.d.ts +71 -0
  55. package/dist/cjs/powdb-introspect.d.ts +84 -0
  56. package/dist/cjs/powdb.d.ts +931 -0
  57. package/dist/cjs/powdb.js +106 -21
  58. package/dist/cjs/powql.d.ts +592 -0
  59. package/dist/cjs/powql.js +42 -6
  60. package/dist/cjs/prisma-compat.d.ts +283 -0
  61. package/dist/cjs/prisma-compat.js +167 -9
  62. package/dist/cjs/query/aggregates.d.ts +92 -0
  63. package/dist/cjs/query/aggregates.js +7 -3
  64. package/dist/cjs/query/batched-loader.d.ts +193 -0
  65. package/dist/cjs/query/builder.d.ts +849 -0
  66. package/dist/cjs/query/builder.js +571 -65
  67. package/dist/cjs/query/compound-unique.d.ts +51 -0
  68. package/dist/cjs/query/deferred.d.ts +223 -0
  69. package/dist/cjs/query/filters.d.ts +201 -0
  70. package/dist/cjs/query/index.d.ts +14 -0
  71. package/dist/cjs/query/index.js +6 -1
  72. package/dist/cjs/query/relations.d.ts +609 -0
  73. package/dist/cjs/query/relations.js +693 -46
  74. package/dist/cjs/query/types.d.ts +1300 -0
  75. package/dist/cjs/query/utils.d.ts +209 -0
  76. package/dist/cjs/query/utils.js +208 -1
  77. package/dist/cjs/query/warn-registry.d.ts +68 -0
  78. package/dist/cjs/query/warn-registry.js +9 -0
  79. package/dist/cjs/query/where-compile.d.ts +139 -0
  80. package/dist/cjs/query/where.d.ts +548 -0
  81. package/dist/cjs/query/where.js +58 -22
  82. package/dist/cjs/query/writes.d.ts +172 -0
  83. package/dist/cjs/query/writes.js +105 -12
  84. package/dist/cjs/realtime.d.ts +70 -0
  85. package/dist/cjs/schema-builder.d.ts +354 -0
  86. package/dist/cjs/schema-metadata.d.ts +83 -0
  87. package/dist/cjs/schema-sql.d.ts +217 -0
  88. package/dist/cjs/schema-sql.js +23 -5
  89. package/dist/cjs/schema.d.ts +356 -0
  90. package/dist/cjs/schema.js +125 -0
  91. package/dist/cjs/seed.d.ts +15 -0
  92. package/dist/cjs/serverless.d.ts +142 -0
  93. package/dist/cjs/sqlite.d.ts +143 -0
  94. package/dist/cjs/sqlite.js +4 -0
  95. package/dist/cjs/typed-sql.d.ts +102 -0
  96. package/dist/cli/config.d.ts +18 -4
  97. package/dist/cli/config.js +31 -6
  98. package/dist/cli/index.d.ts +123 -0
  99. package/dist/cli/index.js +223 -58
  100. package/dist/cli/migrate.d.ts +59 -10
  101. package/dist/cli/migrate.js +128 -41
  102. package/dist/cli/observe-ui.d.ts +1 -1
  103. package/dist/cli/observe-ui.js +14 -5
  104. package/dist/cli/observe.d.ts +7 -1
  105. package/dist/cli/observe.js +48 -12
  106. package/dist/cli/prisma-report.d.ts +14 -0
  107. package/dist/cli/prisma-report.js +72 -0
  108. package/dist/cli/prisma-resolve.d.ts +6 -0
  109. package/dist/cli/prisma-resolve.js +1 -0
  110. package/dist/cli/prisma-schema.d.ts +62 -2
  111. package/dist/cli/prisma-schema.js +81 -4
  112. package/dist/cli/rate-limit.d.ts +32 -0
  113. package/dist/cli/rate-limit.js +40 -0
  114. package/dist/cli/studio.d.ts +5 -5
  115. package/dist/cli/studio.js +135 -70
  116. package/dist/cli/ui.d.ts +1 -1
  117. package/dist/cli/ui.js +51 -9
  118. package/dist/client.d.ts +40 -0
  119. package/dist/client.js +3 -0
  120. package/dist/dialect.d.ts +17 -1
  121. package/dist/dialect.js +37 -12
  122. package/dist/generate.js +40 -7
  123. package/dist/index.d.ts +1 -1
  124. package/dist/index.js +1 -1
  125. package/dist/mssql.js +6 -0
  126. package/dist/mysql.js +16 -0
  127. package/dist/nested-write.d.ts +2 -0
  128. package/dist/nested-write.js +415 -25
  129. package/dist/powdb.d.ts +4 -2
  130. package/dist/powdb.js +106 -21
  131. package/dist/powql.d.ts +5 -0
  132. package/dist/powql.js +42 -6
  133. package/dist/prisma-compat.d.ts +2 -0
  134. package/dist/prisma-compat.js +166 -8
  135. package/dist/query/aggregates.js +7 -3
  136. package/dist/query/builder.d.ts +292 -21
  137. package/dist/query/builder.js +570 -64
  138. package/dist/query/deferred.d.ts +39 -0
  139. package/dist/query/index.d.ts +1 -1
  140. package/dist/query/index.js +1 -1
  141. package/dist/query/relations.d.ts +173 -5
  142. package/dist/query/relations.js +688 -47
  143. package/dist/query/types.d.ts +123 -39
  144. package/dist/query/utils.d.ts +116 -0
  145. package/dist/query/utils.js +198 -0
  146. package/dist/query/warn-registry.d.ts +9 -0
  147. package/dist/query/warn-registry.js +9 -0
  148. package/dist/query/where.d.ts +38 -1
  149. package/dist/query/where.js +58 -23
  150. package/dist/query/writes.d.ts +42 -1
  151. package/dist/query/writes.js +104 -13
  152. package/dist/schema-sql.d.ts +14 -0
  153. package/dist/schema-sql.js +23 -5
  154. package/dist/schema.d.ts +38 -0
  155. package/dist/schema.js +123 -0
  156. package/dist/sqlite.js +4 -0
  157. 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.49.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
- "types": "./dist/index.d.ts",
9
- "import": "./dist/index.js",
10
- "require": "./dist/cjs/index.js"
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
- "types": "./dist/serverless.d.ts",
14
- "import": "./dist/serverless.js",
15
- "require": "./dist/cjs/serverless.js"
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
- "types": "./dist/prisma-compat.d.ts",
19
- "import": "./dist/prisma-compat.js",
20
- "require": "./dist/cjs/prisma-compat.js"
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
- "types": "./dist/sqlite.d.ts",
24
- "import": "./dist/sqlite.js",
25
- "require": "./dist/cjs/sqlite.js"
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
- "types": "./dist/mysql.d.ts",
29
- "import": "./dist/mysql.js",
30
- "require": "./dist/cjs/mysql.js"
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
- "types": "./dist/mssql.d.ts",
34
- "import": "./dist/mssql.js",
35
- "require": "./dist/cjs/mssql.js"
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
- "types": "./dist/powdb.d.ts",
39
- "import": "./dist/powdb.js",
40
- "require": "./dist/cjs/powdb.js"
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
- "types": "./dist/cli/config.d.ts",
44
- "import": "./dist/cli/config.js",
45
- "require": "./dist/cjs/cli/config.js"
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
- "types": "./dist/adapters/index.d.ts",
49
- "import": "./dist/adapters/index.js",
50
- "require": "./dist/cjs/adapters/index.js"
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"