bun-query-builder 0.2.28 → 0.2.30
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/dist/bin/cli.js +564 -371
- package/dist/browser.d.ts +2 -2
- package/dist/client.d.ts +7 -0
- package/dist/db.d.ts +29 -4
- package/dist/faker-compat.d.ts +83 -0
- package/dist/index.d.ts +1 -0
- package/dist/orm.d.ts +3 -3
- package/dist/schema.d.ts +2 -2
- package/dist/sql-fragments.d.ts +69 -0
- package/dist/src/index.js +564 -370
- package/dist/type-inference.d.ts +3 -3
- package/package.json +1 -1
package/dist/type-inference.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { FactoryFaker } from './faker-compat';
|
|
2
2
|
import type { ValidationType } from './schema';
|
|
3
3
|
// Local mirror of the runtime PivotColumnAttribute shape (kept structural so we
|
|
4
4
|
// don't take a hard dep on schema.ts at the type-inference layer).
|
|
@@ -20,7 +20,7 @@ declare interface InferableAttribute<T = unknown> {
|
|
|
20
20
|
rule: ValidationType
|
|
21
21
|
message?: Record<string, string>
|
|
22
22
|
}
|
|
23
|
-
factory?: (faker:
|
|
23
|
+
factory?: (faker: FactoryFaker) => InferType<T>
|
|
24
24
|
}
|
|
25
25
|
/** Minimal model definition shape for type inference */
|
|
26
26
|
declare interface InferableModelDefinition {
|
|
@@ -119,7 +119,7 @@ declare type SnakeCase<S extends string> = S extends `${infer C}${infer Rest}`
|
|
|
119
119
|
// Single attribute type inference
|
|
120
120
|
// ============================================================================
|
|
121
121
|
declare type InferSingleAttributeType<TAttr> = TAttr extends { type: infer T } ? InferType<T> :
|
|
122
|
-
TAttr extends { factory: (faker:
|
|
122
|
+
TAttr extends { factory: (faker: FactoryFaker) => infer R } ? R :
|
|
123
123
|
TAttr extends { validation: { rule: infer R } } ? InferType<R> :
|
|
124
124
|
TAttr extends { default: infer D } ? D :
|
|
125
125
|
unknown;
|
package/package.json
CHANGED