prisma-effect-kysely 2.0.3 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -7
- package/README.md +20 -0
- package/dist/effect/generator.d.ts.map +1 -1
- package/dist/effect/generator.js +4 -3
- package/dist/effect/generator.js.map +1 -1
- package/dist/generator/index.d.ts +2 -2
- package/dist/generator/index.d.ts.map +1 -1
- package/dist/generator/index.js +1 -1
- package/dist/generator/index.js.map +1 -1
- package/dist/kysely/helpers.d.ts +17 -10
- package/dist/kysely/helpers.d.ts.map +1 -1
- package/dist/kysely/helpers.js +15 -19
- package/dist/kysely/helpers.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`5b1bbea`](https://github.com/samuelho-dev/prisma-effect-kysely/commit/5b1bbea2f160d84049877b655f874974c47fe4b5) Thanks [@samuelho-dev](https://github.com/samuelho-dev)! - Select/Insert/Update aliases now use `StrictType` directly, so they match Effect schemas without index signatures and the old `*Strict` exports are gone.
|
|
8
|
+
|
|
9
|
+
- [`1590bc9`](https://github.com/samuelho-dev/prisma-effect-kysely/commit/1590bc9e7d02ad6e1ae4df0b465fa84de2eafcd1) Thanks [@samuelho-dev](https://github.com/samuelho-dev)! - Default `Select` / `Insert` / `Update` aliases now use strict typing (no `[key: string]: unknown`), so there is a single canonical type per schema and the extra `*Strict` exports/config switches have been removed.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`33fdc8e`](https://github.com/samuelho-dev/prisma-effect-kysely/commit/33fdc8e40e4658ceadef5ec64d78a0aeded4d96e) Thanks [@samuelho-dev](https://github.com/samuelho-dev)! - Ensure every generated Kysely schema returns the `Schema` interface by wrapping `Schema.make(...)` results with `Schema.asSchema()` and updating the mutable insert/update helpers to keep their runtime types aligned.
|
|
14
|
+
|
|
15
|
+
## 2.1.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- [`6104932`](https://github.com/samuelho-dev/prisma-effect-kysely/commit/6104932286e35b94a264ffedc0eadf3fa2e72124) Thanks [@samuelho-dev](https://github.com/samuelho-dev)! - Add strict Select/Insert/Update aliases plus generator options and helper exports so consumers can opt into index-signature-free Effect schemas.
|
|
20
|
+
|
|
3
21
|
## 2.0.3
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -340,7 +358,7 @@ None - This is a non-breaking enhancement. The change is purely additive at the
|
|
|
340
358
|
- **Solution**: OMIT generated fields entirely from Insertable schema (not make them optional) following @effect/sql's `Model.Generated` pattern
|
|
341
359
|
- **Implementation**:
|
|
342
360
|
- Simplified `generated()` to be just a marker annotation (no schema transformation)
|
|
343
|
-
- Updated `
|
|
361
|
+
- Updated `Insertable()` to filter out fields with `GeneratedId` annotation during AST reconstruction
|
|
344
362
|
- Removed unnecessary `GeneratedSchemas` interface
|
|
345
363
|
- Simplified `extractParametersFromTypeLiteral` (generated fields are now just markers)
|
|
346
364
|
- Removed `OptionalType` detection from `isOptionalType()` (only checks for `Union(T, Undefined)` pattern)
|
|
@@ -785,7 +803,7 @@ const status = ProductStatus.ACTIVE; // "ACTIVE"
|
|
|
785
803
|
### Fixed
|
|
786
804
|
|
|
787
805
|
- **Declaration File Type Preservation** - Fixed type inference when using compiled `.d.ts` files
|
|
788
|
-
- Added explicit return type annotations to `
|
|
806
|
+
- Added explicit return type annotations to `Selectable()`, `Insertable()`, and `Updateable()` helper functions
|
|
789
807
|
- Added explicit return type annotation to `getSchemas()` function
|
|
790
808
|
- Ensures TypeScript preserves `Selectable<Type>`, `Insertable<Type>`, and `Updateable<Type>` mapped types in declaration files
|
|
791
809
|
- Resolves type inference failures when consuming libraries use dist/ paths instead of source paths
|
|
@@ -793,13 +811,13 @@ const status = ProductStatus.ACTIVE; // "ACTIVE"
|
|
|
793
811
|
|
|
794
812
|
### Technical Details
|
|
795
813
|
|
|
796
|
-
**Problem**: When TypeScript compiled helper functions to `.d.ts` files, the return types of AST transformation functions (`
|
|
814
|
+
**Problem**: When TypeScript compiled helper functions to `.d.ts` files, the return types of AST transformation functions (`Selectable()`, `Insertable()`, `Updateable()`) were inferred as `S.Schema<unknown, unknown, never>` instead of preserving the Kysely mapped types. This caused downstream type resolution to fail when consumers used compiled declaration files (dist/ paths) instead of source files.
|
|
797
815
|
|
|
798
816
|
**Solution**: Added explicit return type annotations with type assertions to all helper functions:
|
|
799
817
|
|
|
800
|
-
- `
|
|
801
|
-
- `
|
|
802
|
-
- `
|
|
818
|
+
- `Selectable()` → `: S.Schema<Selectable<Type>, Selectable<Encoded>, never>`
|
|
819
|
+
- `Insertable()` → `: S.Schema<Insertable<Type>, Insertable<Encoded>, never>`
|
|
820
|
+
- `Updateable()` → `: S.Schema<Updateable<Type>, Updateable<Encoded>, never>`
|
|
803
821
|
- `getSchemas()` → `: Schemas<Type, Encoded>`
|
|
804
822
|
|
|
805
823
|
**Impact**: Projects using prisma-effect-kysely with TypeScript path aliases pointing to `dist/` directories (compiled output) will now have proper type inference. Generated types like `EmbeddingOperationSelect` will resolve to proper object types instead of `unknown`.
|
|
@@ -818,7 +836,7 @@ const status = ProductStatus.ACTIVE; // "ACTIVE"
|
|
|
818
836
|
### Fixed
|
|
819
837
|
|
|
820
838
|
- **TypeScript Type Compatibility** - Fixed `SchemaClass` to `Schema` conversion issues
|
|
821
|
-
- Added `S.asSchema()` wrapper to `
|
|
839
|
+
- Added `S.asSchema()` wrapper to `Selectable()`, `Insertable()`, and `Updateable()` helper functions
|
|
822
840
|
- Ensures generated schemas return `S.Schema<A, I, R>` interface instead of `S.SchemaClass<A, I, R>`
|
|
823
841
|
- Resolves TypeScript compilation errors when passing schemas to Effect's decode functions
|
|
824
842
|
- Uses Effect's official identity function for zero-runtime overhead type conversion
|
package/README.md
CHANGED
|
@@ -76,6 +76,26 @@ This ensures consistent TypeScript identifier naming while preserving the origin
|
|
|
76
76
|
|
|
77
77
|
Re-exports all generated types for easy importing
|
|
78
78
|
|
|
79
|
+
## Strict Type Aliases
|
|
80
|
+
|
|
81
|
+
The generator always emits strict `Select` / `Insert` / `Update` aliases (no extra suffix) that remove index signatures introduced by TypeScript’s structural typing rules. Under the hood we wrap the Effect schema output with the `StrictType<T>` helper:
|
|
82
|
+
|
|
83
|
+
```typescript
|
|
84
|
+
import type { StrictType } from 'prisma-effect-kysely';
|
|
85
|
+
|
|
86
|
+
export type UserSelect = StrictType<Schema.Schema.Type<typeof User.Selectable>>;
|
|
87
|
+
export type UserInsert = StrictType<Omit<Schema.Schema.Type<typeof User.Insertable>, 'id'>>;
|
|
88
|
+
export type UserUpdate = StrictType<Schema.Schema.Type<typeof User.Updateable>>;
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
If you need the original Effect schema type (with the index signature), read it directly from the schema:
|
|
92
|
+
|
|
93
|
+
```ts
|
|
94
|
+
type RawUserSelect = Schema.Schema.Type<typeof User.Selectable>;
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
The `StrictSelectable`, `StrictInsertable`, and `StrictUpdateable` helpers remain exported for advanced scenarios, but the generated aliases already apply the strict typing by default.
|
|
98
|
+
|
|
79
99
|
## Type Mappings
|
|
80
100
|
|
|
81
101
|
| Prisma Type | Effect Schema Type | Notes |
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/effect/generator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAQ3D;;GAEG;AACH,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,IAAI,CAAC,Q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AAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,EAAE;IAQ3D;;;;OAIG;IACH,mBAAmB,CAAC,QAAQ,EAAE,OAAO;IA2BrC;;OAEG;IACH,wBAAwB,CAAC,UAAU,EAAE,aAAa,EAAE;IAIpD;;OAEG;IACH,iCAAiC,CAAC,UAAU,EAAE,aAAa,EAAE;CAG9D"}
|
package/dist/effect/generator.js
CHANGED
|
@@ -58,9 +58,9 @@ ${fieldDefinitions}
|
|
|
58
58
|
? `Omit<Schema.Schema.Encoded<typeof ${name}.Insertable>, ${omittedFieldsUnion}>`
|
|
59
59
|
: `Schema.Schema.Encoded<typeof ${name}.Insertable>`;
|
|
60
60
|
// Application-side types (decoded - for repository layer)
|
|
61
|
-
const applicationTypes = `export type ${name}Select = Schema.Schema.Type<typeof ${name}.Selectable
|
|
62
|
-
export type ${name}Insert =
|
|
63
|
-
export type ${name}Update = Schema.Schema.Type<typeof ${name}.Updateable
|
|
61
|
+
const applicationTypes = `export type ${name}Select = StrictType<Schema.Schema.Type<typeof ${name}.Selectable>>;
|
|
62
|
+
export type ${name}Insert = StrictType<${insertType}>;
|
|
63
|
+
export type ${name}Update = StrictType<Schema.Schema.Type<typeof ${name}.Updateable>>;`;
|
|
64
64
|
// Database-side encoded types (for queries layer)
|
|
65
65
|
const encodedTypes = `export type ${name}SelectEncoded = Schema.Schema.Encoded<typeof ${name}.Selectable>;
|
|
66
66
|
export type ${name}InsertEncoded = ${insertEncodedType};
|
|
@@ -87,6 +87,7 @@ export type ${name}UpdateEncoded = Schema.Schema.Encoded<typeof ${name}.Updateab
|
|
|
87
87
|
`import { Schema } from "effect";`,
|
|
88
88
|
`import type { ColumnType } from "kysely";`,
|
|
89
89
|
`import { columnType, generated, getSchemas } from "prisma-effect-kysely";`,
|
|
90
|
+
`import type { StrictType } from "prisma-effect-kysely";`,
|
|
90
91
|
];
|
|
91
92
|
if (hasEnums) {
|
|
92
93
|
// Only import Schema wrappers (not plain enum types)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../src/effect/generator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,gCAAgC,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC5F,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD;;GAEG;AACH,MAAM,OAAO,eAAe;IACG;IAA7B,YAA6B,IAAmB;QAAnB,SAAI,GAAJ,IAAI,CAAe;IAAG,CAAC;IAEpD;;OAEG;IACH,aAAa,CAAC,KAAoC;QAChD,OAAO,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IAED;;OAEG;IACH,kBAAkB,CAAC,KAAiB,EAAE,MAA6B;QACjE,MAAM,gBAAgB,GAAG,MAAM;aAC5B,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;YACb,MAAM,SAAS,GAAG,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YACnD,OAAO,KAAK,KAAK,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QACzC,CAAC,CAAC;aACD,IAAI,CAAC,KAAK,CAAC,CAAC;QAEf,MAAM,cAAc,GAAG,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;QAExC,OAAO,MAAM,KAAK,CAAC,IAAI;eACZ,cAAc;EAC3B,gBAAgB;IACd,CAAC;IACH,CAAC;IAED;;OAEG;IACH,0BAA0B,CAAC,KAAiB;QAC1C,MAAM,cAAc,GAAG,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;QACxC,MAAM,qBAAqB,GAAG,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AQ,EAAE,CAAC;YACb,qDAAqD;YACrD,2CAA2C;YAC3C,0BAA0B;YAC1B,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK;iBAC1C,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;gBACT,MAAM,QAAQ,GAAG,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;gBACtC,OAAO,GAAG,QAAQ,QAAQ,CAAC;YAC7B,CAAC,CAAC;iBACD,IAAI,CAAC,IAAI,CAAC,CAAC;YAEd,OAAO,CAAC,IAAI,CAAC,YAAY,WAAW,uBAAuB,CAAC,CAAC;QAC/D,CAAC;QAED,OAAO,GAAG,MAAM,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;IAC9C,CAAC;IAED;;OAEG;IACH,wBAAwB,CAAC,UAA2B;QAClD,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,uBAAuB,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACrF,CAAC;IAED;;OAEG;IACH,iCAAiC,CAAC,UAA2B;QAC3D,OAAO,UAAU,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvE,CAAC;CACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
export type { GetTypes, Schemas } from '../kysely/helpers.js';
|
|
3
|
-
export { columnType, generated, getSchemas,
|
|
2
|
+
export type { GetTypes, Schemas, StrictInsertable, StrictSelectable, StrictType, StrictUpdateable, } from '../kysely/helpers.js';
|
|
3
|
+
export { columnType, generated, getSchemas, Insertable, Selectable, Updateable, } from '../kysely/helpers.js';
|
|
4
4
|
export declare const generator: void;
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generator/index.ts"],"names":[],"mappings":";AAYA,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generator/index.ts"],"names":[],"mappings":";AAYA,YAAY,EACV,QAAQ,EACR,OAAO,EACP,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,UAAU,EACV,SAAS,EACT,UAAU,EACV,UAAU,EACV,UAAU,EACV,UAAU,GACX,MAAM,sBAAsB,CAAC;AAE9B,eAAO,MAAM,SAAS,MAUpB,CAAC"}
|
package/dist/generator/index.js
CHANGED
|
@@ -6,7 +6,7 @@ const { generatorHandler } = pkg;
|
|
|
6
6
|
const require = createRequire(import.meta.url);
|
|
7
7
|
const packageJson = require('../../package.json');
|
|
8
8
|
// Re-export kysely helpers for generated code
|
|
9
|
-
export { columnType, generated, getSchemas,
|
|
9
|
+
export { columnType, generated, getSchemas, Insertable, Selectable, Updateable, } from '../kysely/helpers.js';
|
|
10
10
|
export const generator = generatorHandler({
|
|
11
11
|
onManifest: () => ({
|
|
12
12
|
version: packageJson.version,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generator/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,GAAG,MAAM,0BAA0B,CAAC;AAE3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,MAAM,EAAE,gBAAgB,EAAE,GAAG,GAAG,CAAC;AAEjC,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/C,MAAM,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generator/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,GAAG,MAAM,0BAA0B,CAAC;AAE3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,MAAM,EAAE,gBAAgB,EAAE,GAAG,GAAG,CAAC;AAEjC,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/C,MAAM,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAwB,CAAC;AAUzE,8CAA8C;AAC9C,OAAO,EACL,UAAU,EACV,SAAS,EACT,UAAU,EACV,UAAU,EACV,UAAU,EACV,UAAU,GACX,MAAM,sBAAsB,CAAC;AAE9B,MAAM,CAAC,MAAM,SAAS,GAAG,gBAAgB,CAAC;IACxC,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC;QACjB,OAAO,EAAE,WAAW,CAAC,OAAO;QAC5B,aAAa,EAAE,aAAa;QAC5B,UAAU,EAAE,gCAAgC;KAC7C,CAAC;IACF,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;QAC5B,MAAM,YAAY,GAAG,IAAI,qBAAqB,CAAC,OAAO,CAAC,CAAC;QACxD,MAAM,YAAY,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IACvC,CAAC;CACF,CAAC,CAAC"}
|
package/dist/kysely/helpers.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from 'effect';
|
|
2
|
-
import type { Insertable, Selectable, Updateable } from 'kysely';
|
|
2
|
+
import type { Insertable as KyselyInsertable, Selectable as KyselySelectable, Updateable as KyselyUpdateable } from 'kysely';
|
|
3
3
|
import type { DeepMutable } from 'effect/Types';
|
|
4
4
|
/**
|
|
5
5
|
* Runtime helpers for Kysely schema integration
|
|
@@ -22,22 +22,22 @@ export declare const columnType: <SType, SEncoded, SR, IType, IEncoded, IR, UTyp
|
|
|
22
22
|
*/
|
|
23
23
|
export declare const generated: <SType, SEncoded, R>(schema: Schema.Schema<SType, SEncoded, R>) => Schema.Schema<SType, SEncoded, R>;
|
|
24
24
|
/**
|
|
25
|
-
* Create
|
|
25
|
+
* Create Selectable schema from base schema
|
|
26
26
|
*/
|
|
27
|
-
type MutableInsert<Type> = DeepMutable<
|
|
28
|
-
type MutableUpdate<Type> = DeepMutable<
|
|
29
|
-
export declare const
|
|
27
|
+
type MutableInsert<Type> = DeepMutable<KyselyInsertable<Type>>;
|
|
28
|
+
type MutableUpdate<Type> = DeepMutable<KyselyUpdateable<Type>>;
|
|
29
|
+
export declare const Selectable: <Type, Encoded>(schema: Schema.Schema<Type, Encoded>) => Schema.Schema<KyselySelectable<Type>, KyselySelectable<Encoded>, never>;
|
|
30
30
|
/**
|
|
31
|
-
* Create
|
|
31
|
+
* Create Insertable schema from base schema
|
|
32
32
|
* Filters out generated fields (@effect/sql Model.Generated pattern)
|
|
33
33
|
*/
|
|
34
|
-
export declare const
|
|
34
|
+
export declare const Insertable: <Type, Encoded>(schema: Schema.Schema<Type, Encoded>) => Schema.Schema<MutableInsert<Type>, MutableInsert<Encoded>, never>;
|
|
35
35
|
/**
|
|
36
|
-
* Create
|
|
36
|
+
* Create Updateable schema from base schema
|
|
37
37
|
*/
|
|
38
|
-
export declare const
|
|
38
|
+
export declare const Updateable: <Type, Encoded>(schema: Schema.Schema<Type, Encoded>) => Schema.Schema<MutableUpdate<Type>, MutableUpdate<Encoded>, never>;
|
|
39
39
|
export interface Schemas<Type, Encoded> {
|
|
40
|
-
Selectable: Schema.Schema<
|
|
40
|
+
Selectable: Schema.Schema<KyselySelectable<Type>, KyselySelectable<Encoded>, never>;
|
|
41
41
|
Insertable: Schema.Schema<MutableInsert<Type>, MutableInsert<Encoded>, never>;
|
|
42
42
|
Updateable: Schema.Schema<MutableUpdate<Type>, MutableUpdate<Encoded>, never>;
|
|
43
43
|
}
|
|
@@ -51,5 +51,12 @@ export interface GetTypes<T extends Schemas<unknown, unknown>> {
|
|
|
51
51
|
Insertable: Schema.Schema.Type<T['Insertable']>;
|
|
52
52
|
Updateable: Schema.Schema.Type<T['Updateable']>;
|
|
53
53
|
}
|
|
54
|
+
type RemoveIndexSignature<T> = {
|
|
55
|
+
[K in keyof T as K extends string ? string extends K ? never : K : K extends number ? number extends K ? never : K : K extends symbol ? symbol extends K ? never : K : K]: T[K];
|
|
56
|
+
};
|
|
57
|
+
export type StrictType<T> = RemoveIndexSignature<T>;
|
|
58
|
+
export type StrictSelectable<T extends Schemas<unknown, unknown>> = StrictType<Schema.Schema.Type<T['Selectable']>>;
|
|
59
|
+
export type StrictInsertable<T extends Schemas<unknown, unknown>> = StrictType<Schema.Schema.Type<T['Insertable']>>;
|
|
60
|
+
export type StrictUpdateable<T extends Schemas<unknown, unknown>> = StrictType<Schema.Schema.Type<T['Updateable']>>;
|
|
54
61
|
export {};
|
|
55
62
|
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/kysely/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/kysely/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,KAAK,EACV,UAAU,IAAI,gBAAgB,EAC9B,UAAU,IAAI,gBAAgB,EAC9B,UAAU,IAAI,gBAAgB,EAC/B,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD;;;GAGG;AAEH,eAAO,MAAM,YAAY,eAA8B,CAAC;AACxD,eAAO,MAAM,WAAW,eAA6B,CAAC;AAQtD;;;GAGG;AACH,eAAO,MAAM,UAAU,GAAI,KAAK,EAAE,QAAQ,EAAE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M,GAC7B,MAAM,SAAS,CAAC,GACd,KAAK,GACL,CAAC,GACH,CAAC,SAAS,MAAM,GACd,MAAM,SAAS,CAAC,GACd,KAAK,GACL,CAAC,GACH,CAAC,SAAS,MAAM,GACd,MAAM,SAAS,CAAC,GACd,KAAK,GACL,CAAC,GACH,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,oBAAoB,CAAC,CAAC,CAAC,CAAC;AAEpD,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,UAAU,CAC5E,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CACpC,CAAC;AACF,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,UAAU,CAC5E,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CACpC,CAAC;AACF,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,UAAU,CAC5E,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CACpC,CAAC"}
|
package/dist/kysely/helpers.js
CHANGED
|
@@ -80,29 +80,28 @@ const extractParametersFromTypeLiteral = (ast, schemaType) => {
|
|
|
80
80
|
// Apply Schema.mutable() to regular fields for insert/updateSchema to make arrays mutable
|
|
81
81
|
// Safe for all types - no-op for non-arrays
|
|
82
82
|
if (schemaType === 'updateSchema' || schemaType === 'insertSchema') {
|
|
83
|
-
return new AST.PropertySignature(prop.name, Schema.mutable(Schema.make(prop.type)).ast, prop.isOptional, prop.isReadonly, prop.annotations);
|
|
83
|
+
return new AST.PropertySignature(prop.name, Schema.mutable(Schema.asSchema(Schema.make(prop.type))).ast, prop.isOptional, prop.isReadonly, prop.annotations);
|
|
84
84
|
}
|
|
85
85
|
// Generated fields are just markers now, return as-is
|
|
86
86
|
return prop;
|
|
87
87
|
})
|
|
88
88
|
.filter((prop) => prop.type._tag !== 'NeverKeyword');
|
|
89
89
|
};
|
|
90
|
-
export const
|
|
90
|
+
export const Selectable = (schema) => {
|
|
91
91
|
const { ast } = schema;
|
|
92
92
|
if (!AST.isTypeLiteral(ast)) {
|
|
93
|
-
return Schema.make(ast);
|
|
93
|
+
return Schema.asSchema(Schema.make(ast));
|
|
94
94
|
}
|
|
95
|
-
return Schema.make(new AST.TypeLiteral(extractParametersFromTypeLiteral(ast, 'selectSchema'), ast.indexSignatures, ast.annotations));
|
|
95
|
+
return Schema.asSchema(Schema.make(new AST.TypeLiteral(extractParametersFromTypeLiteral(ast, 'selectSchema'), ast.indexSignatures, ast.annotations)));
|
|
96
96
|
};
|
|
97
97
|
/**
|
|
98
|
-
* Create
|
|
98
|
+
* Create Insertable schema from base schema
|
|
99
99
|
* Filters out generated fields (@effect/sql Model.Generated pattern)
|
|
100
100
|
*/
|
|
101
|
-
export const
|
|
101
|
+
export const Insertable = (schema) => {
|
|
102
102
|
const { ast } = schema;
|
|
103
103
|
if (!AST.isTypeLiteral(ast)) {
|
|
104
|
-
|
|
105
|
-
return baseSchema;
|
|
104
|
+
return Schema.asSchema(Schema.make(ast));
|
|
106
105
|
}
|
|
107
106
|
// Extract and filter out generated fields entirely
|
|
108
107
|
const nonGeneratedProps = ast.propertySignatures.filter((prop) => !isGeneratedType(prop.type));
|
|
@@ -113,30 +112,27 @@ export const insertable = (schema) => {
|
|
|
113
112
|
const isOptional = isOptionalType(prop.type);
|
|
114
113
|
return new AST.PropertySignature(prop.name, prop.type, isOptional, prop.isReadonly, prop.annotations);
|
|
115
114
|
});
|
|
116
|
-
|
|
117
|
-
return insertSchema;
|
|
115
|
+
return Schema.asSchema(Schema.make(new AST.TypeLiteral(fields, ast.indexSignatures, ast.annotations)));
|
|
118
116
|
};
|
|
119
117
|
/**
|
|
120
|
-
* Create
|
|
118
|
+
* Create Updateable schema from base schema
|
|
121
119
|
*/
|
|
122
|
-
export const
|
|
120
|
+
export const Updateable = (schema) => {
|
|
123
121
|
const { ast } = schema;
|
|
124
122
|
if (!AST.isTypeLiteral(ast)) {
|
|
125
|
-
|
|
126
|
-
return baseSchema;
|
|
123
|
+
return Schema.asSchema(Schema.make(ast));
|
|
127
124
|
}
|
|
128
125
|
const extracted = extractParametersFromTypeLiteral(ast, 'updateSchema');
|
|
129
126
|
const res = new AST.TypeLiteral(extracted.map((prop) => new AST.PropertySignature(prop.name, AST.Union.make([prop.type, new AST.UndefinedKeyword()]), true, prop.isReadonly, prop.annotations)), ast.indexSignatures, ast.annotations);
|
|
130
|
-
|
|
131
|
-
return updateSchema;
|
|
127
|
+
return Schema.asSchema(Schema.make(res));
|
|
132
128
|
};
|
|
133
129
|
/**
|
|
134
130
|
* Generate all operational schemas (Selectable/Insertable/Updateable) from base schema
|
|
135
131
|
* Used in generated code
|
|
136
132
|
*/
|
|
137
133
|
export const getSchemas = (baseSchema) => ({
|
|
138
|
-
Selectable:
|
|
139
|
-
Insertable:
|
|
140
|
-
Updateable:
|
|
134
|
+
Selectable: Selectable(baseSchema),
|
|
135
|
+
Insertable: Insertable(baseSchema),
|
|
136
|
+
Updateable: Updateable(baseSchema),
|
|
141
137
|
});
|
|
142
138
|
//# sourceMappingURL=helpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/kysely/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,KAAK,GAAG,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/kysely/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,KAAK,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