prisma-effect-kysely 1.3.1 → 1.4.1
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 +81 -17
- package/README.md +6 -0
- package/dist/effect/generator.d.ts +1 -1
- package/dist/effect/generator.d.ts.map +1 -1
- package/dist/effect/generator.js +6 -5
- package/dist/effect/generator.js.map +1 -1
- package/dist/generator/index.js +1 -1
- package/dist/kysely/helpers.d.ts +6 -6
- package/dist/kysely/helpers.d.ts.map +1 -1
- package/dist/kysely/helpers.js +6 -6
- package/dist/kysely/helpers.js.map +1 -1
- package/dist/prisma/enum.d.ts +1 -6
- package/dist/prisma/enum.d.ts.map +1 -1
- package/dist/prisma/enum.js.map +1 -1
- package/dist/prisma/generator.d.ts +3 -39
- package/dist/prisma/generator.d.ts.map +1 -1
- package/dist/prisma/type.d.ts +4 -66
- package/dist/prisma/type.d.ts.map +1 -1
- package/dist/prisma/type.js.map +1 -1
- package/dist/utils/naming.d.ts +15 -0
- package/dist/utils/naming.d.ts.map +1 -0
- package/dist/utils/naming.js +41 -0
- package/dist/utils/naming.js.map +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,38 +5,102 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
## [1.
|
|
8
|
+
## [1.4.1] - 2025-10-09
|
|
9
9
|
|
|
10
10
|
### Fixed
|
|
11
11
|
|
|
12
|
-
- **
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
12
|
+
- **TypeScript Type Compatibility** - Fixed `SchemaClass` to `Schema` conversion issues
|
|
13
|
+
- Added `S.asSchema()` wrapper to `selectable()`, `insertable()`, and `updateable()` helper functions
|
|
14
|
+
- Ensures generated schemas return `S.Schema<A, I, R>` interface instead of `S.SchemaClass<A, I, R>`
|
|
15
|
+
- Resolves TypeScript compilation errors when passing schemas to Effect's decode functions
|
|
16
|
+
- Uses Effect's official identity function for zero-runtime overhead type conversion
|
|
17
|
+
|
|
18
|
+
- **Build Portability** - Fixed TypeScript TS2742 errors for portable type inference
|
|
19
|
+
- Added explicit return type annotations to DMMF utility functions
|
|
20
|
+
- Functions affected: `extractEnums()`, `getEnums()`, `getModels()`, `getModelFields()`, `filterInternalModels()`, `filterSchemaFields()`, `sortModels()`, `sortFields()`
|
|
21
|
+
- Ensures generated `.d.ts` files are portable across different TypeScript projects
|
|
17
22
|
|
|
18
23
|
### Technical Details
|
|
19
24
|
|
|
20
|
-
|
|
25
|
+
**Problem**: Effect Schema's `S.make()` returns `SchemaClass` for fluent API support, but TypeScript cannot structurally verify it implements the `Schema` interface due to constructor signature differences. This caused compilation errors when passing generated schemas to Effect's decode functions.
|
|
26
|
+
|
|
27
|
+
**Solution**: Wrapped all `S.make()` calls with `S.asSchema()`, Effect's official identity function that converts `SchemaClass` → `Schema` at the type level only (zero runtime cost).
|
|
28
|
+
|
|
29
|
+
**Impact**: Projects using `prisma-effect-kysely` v1.4.0 or earlier may have experienced TypeScript compilation errors when using `Schema.decode()` or `Schema.decodeUnknownSync()`. This release resolves those errors without requiring any code changes in consuming projects.
|
|
21
30
|
|
|
22
31
|
**Changed files:**
|
|
23
|
-
- `src/kysely/helpers.ts`:
|
|
24
|
-
- `src/
|
|
32
|
+
- `src/kysely/helpers.ts`: Added `S.asSchema()` wrappers (6 locations)
|
|
33
|
+
- `src/prisma/enum.ts`: Added return type annotation
|
|
34
|
+
- `src/prisma/generator.ts`: Added return type annotations (3 methods)
|
|
35
|
+
- `src/prisma/type.ts`: Added return type annotations (4 functions)
|
|
25
36
|
|
|
26
|
-
[1.
|
|
37
|
+
[1.4.1]: https://github.com/samuelho-dev/prisma-effect-kysely/compare/v1.4.0...v1.4.1
|
|
27
38
|
|
|
28
|
-
## [1.
|
|
39
|
+
## [1.4.0] - 2025-10-09
|
|
29
40
|
|
|
30
|
-
###
|
|
41
|
+
### Changed
|
|
42
|
+
|
|
43
|
+
- **Naming Standardization** - All exported schemas and types now use PascalCase regardless of Prisma model naming convention
|
|
44
|
+
- Fixes inconsistent naming when models use snake_case (e.g., `session_model_preference`)
|
|
45
|
+
- Generated exports: `SessionModelPreference`, `SessionModelPreferenceSelect`, etc. (instead of `session_model_preferenceSelect`)
|
|
46
|
+
- Internal base schemas preserve original names with underscore prefix (e.g., `_session_model_preference`)
|
|
47
|
+
- Applies to operational schemas and all type exports (Select, Insert, Update, Encoded variants)
|
|
31
48
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
49
|
+
### Added
|
|
50
|
+
|
|
51
|
+
- New `toPascalCase()` utility function for consistent TypeScript identifier generation
|
|
52
|
+
- Comprehensive tests for naming conversion (handles snake_case, kebab-case, camelCase, PascalCase)
|
|
53
|
+
- Test fixture `session_model_preference` to verify snake_case handling
|
|
36
54
|
|
|
37
55
|
### Technical Details
|
|
38
56
|
|
|
39
|
-
|
|
57
|
+
The generator now converts all model names to PascalCase when creating TypeScript exports using the new `toPascalCase()` utility. This ensures consistent, idiomatic TypeScript naming while preserving the original Prisma model names for internal schemas. The conversion handles snake_case, kebab-case, camelCase, and mixed formats.
|
|
58
|
+
|
|
59
|
+
**Impact**: Projects using snake_case model names will see different export names (breaking change for those projects). Projects using PascalCase models (recommended Prisma convention) will see no changes.
|
|
60
|
+
|
|
61
|
+
**Changed files:**
|
|
62
|
+
- `src/utils/naming.ts`: New naming utility
|
|
63
|
+
- `src/effect/generator.ts`: Updated to use PascalCase for all exports
|
|
64
|
+
- `src/__tests__/fixtures/test.prisma`: Added snake_case test model
|
|
65
|
+
- `src/__tests__/naming.test.ts`: New tests for naming utility
|
|
66
|
+
- `src/__tests__/generator.test.ts`: Added naming standardization tests
|
|
67
|
+
|
|
68
|
+
[1.4.0]: https://github.com/samuelho-dev/prisma-effect-kysely/compare/v1.3.1...v1.4.0
|
|
69
|
+
|
|
70
|
+
## [1.3.0] - 2025-01-09
|
|
71
|
+
|
|
72
|
+
### Added
|
|
73
|
+
|
|
74
|
+
- **Encoded type exports** - Generator now exports database-encoded types alongside application types
|
|
75
|
+
- `{Model}SelectEncoded` - Database-encoded type for `Schema.Schema.Encoded<typeof Model.Selectable>`
|
|
76
|
+
- `{Model}InsertEncoded` - Database-encoded type for `Schema.Schema.Encoded<typeof Model.Insertable>`
|
|
77
|
+
- `{Model}UpdateEncoded` - Database-encoded type for `Schema.Schema.Encoded<typeof Model.Updateable>`
|
|
78
|
+
- Comprehensive test coverage for Encoded type exports
|
|
79
|
+
|
|
80
|
+
### Changed
|
|
81
|
+
|
|
82
|
+
- `generateTypeExports()` method now generates both Application and Encoded type exports
|
|
83
|
+
- Queries layer can now use proper Encoded types instead of `any` workarounds
|
|
84
|
+
|
|
85
|
+
### Why This Matters
|
|
86
|
+
|
|
87
|
+
Effect Schema has bidirectional transformations:
|
|
88
|
+
- **Application types** (`Schema.Schema.Type`) - Decoded types with `Date` objects (for repository layer)
|
|
89
|
+
- **Database types** (`Schema.Schema.Encoded`) - Encoded types with ISO strings (for queries layer)
|
|
90
|
+
|
|
91
|
+
Previously, only Application types were exported, forcing queries to use `any` types. Now both sides of the transformation are properly typed.
|
|
92
|
+
|
|
93
|
+
**Example Usage:**
|
|
94
|
+
```typescript
|
|
95
|
+
import { agentInsertEncoded } from '@libs/types';
|
|
96
|
+
|
|
97
|
+
// Queries layer - uses Encoded types (ISO strings)
|
|
98
|
+
insert: (rowData: agentInsertEncoded) => db.insertInto('agent').values(rowData)
|
|
99
|
+
|
|
100
|
+
// Repository layer - uses Application types (Date objects)
|
|
101
|
+
const input: CreateAgentInput = { /* ... Date objects ... */ };
|
|
102
|
+
const encoded = Schema.encode(AgentSchemas.Insertable)(input); // Encoded to ISO strings
|
|
103
|
+
```
|
|
40
104
|
|
|
41
105
|
[1.3.0]: https://github.com/samuelho-dev/prisma-effect-kysely/compare/v1.2.1...v1.3.0
|
|
42
106
|
|
package/README.md
CHANGED
|
@@ -65,6 +65,12 @@ export const User = Schema.Struct({
|
|
|
65
65
|
export type User = Schema.Schema.Type<typeof User>;
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
+
**Naming Convention**: All exported schemas and types use PascalCase, regardless of the Prisma model naming convention:
|
|
69
|
+
- Model `User` → `User`, `UserSelect`, `UserInsert`
|
|
70
|
+
- Model `session_preference` → `SessionPreference`, `SessionPreferenceSelect`, `SessionPreferenceInsert`
|
|
71
|
+
|
|
72
|
+
This ensures consistent TypeScript identifier naming while preserving the original model names for internal schemas.
|
|
73
|
+
|
|
68
74
|
### index.ts
|
|
69
75
|
|
|
70
76
|
Re-exports all generated types for easy importing
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/effect/generator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAMrD;;GAEG;AACH,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,IAAI,CAAC,QAAQ;IAEhD;;OAEG;IACH,aAAa,CAAC,KAAK,EAAE,SAAS,IAAI,CAAC,aAAa,EAAE;IAIlD;;OAEG;IACH,kBAAkB,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,IAAI,CAAC,KAAK,EAAE;IAgBnE;;OAEG;IACH,0BAA0B,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK;IAO5C;;OAEG;IACH,mBAAmB,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK;IAiBrC;;OAEG;IACH,mBAAmB,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,EAAE;IAQ3D;;OAEG;IACH,mBAAmB,CAAC,QAAQ,EAAE,OAAO;CAkBtC"}
|
package/dist/effect/generator.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.EffectGenerator = void 0;
|
|
4
4
|
const enum_1 = require("./enum");
|
|
5
5
|
const type_1 = require("./type");
|
|
6
|
+
const naming_1 = require("../utils/naming");
|
|
6
7
|
/**
|
|
7
8
|
* Effect domain generator - orchestrates Effect Schema generation
|
|
8
9
|
*/
|
|
@@ -25,7 +26,7 @@ class EffectGenerator {
|
|
|
25
26
|
const fieldType = (0, type_1.buildFieldType)(field, this.dmmf);
|
|
26
27
|
return ` ${field.name}: ${fieldType}`;
|
|
27
28
|
})
|
|
28
|
-
.join(
|
|
29
|
+
.join(',\n');
|
|
29
30
|
const baseSchemaName = `_${model.name}`;
|
|
30
31
|
return `// ${model.name} Base Schema
|
|
31
32
|
export const ${baseSchemaName} = Schema.Struct({
|
|
@@ -37,14 +38,14 @@ ${fieldDefinitions}
|
|
|
37
38
|
*/
|
|
38
39
|
generateOperationalSchemas(model) {
|
|
39
40
|
const baseSchemaName = `_${model.name}`;
|
|
40
|
-
const operationalSchemaName = model.name;
|
|
41
|
+
const operationalSchemaName = (0, naming_1.toPascalCase)(model.name);
|
|
41
42
|
return `export const ${operationalSchemaName} = getSchemas(${baseSchemaName});`;
|
|
42
43
|
}
|
|
43
44
|
/**
|
|
44
45
|
* Generate TypeScript type exports
|
|
45
46
|
*/
|
|
46
47
|
generateTypeExports(model) {
|
|
47
|
-
const name = model.name;
|
|
48
|
+
const name = (0, naming_1.toPascalCase)(model.name);
|
|
48
49
|
// Application-side types (decoded - for repository layer)
|
|
49
50
|
const applicationTypes = `export type ${name}Select = Schema.Schema.Type<typeof ${name}.Selectable>;
|
|
50
51
|
export type ${name}Insert = Schema.Schema.Type<typeof ${name}.Insertable>;
|
|
@@ -78,10 +79,10 @@ export type ${name}UpdateEncoded = Schema.Schema.Encoded<typeof ${name}.Updateab
|
|
|
78
79
|
`import { columnType, generated, getSchemas } from "prisma-effect-kysely";`,
|
|
79
80
|
];
|
|
80
81
|
if (hasEnums) {
|
|
81
|
-
const enumNames = this.dmmf.datamodel.enums.map((e) => e.name).join(
|
|
82
|
+
const enumNames = this.dmmf.datamodel.enums.map((e) => e.name).join(', ');
|
|
82
83
|
imports.push(`import { ${enumNames} } from "./enums";`);
|
|
83
84
|
}
|
|
84
|
-
return `${header}\n\n${imports.join(
|
|
85
|
+
return `${header}\n\n${imports.join('\n')}`;
|
|
85
86
|
}
|
|
86
87
|
}
|
|
87
88
|
exports.EffectGenerator = EffectGenerator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../src/effect/generator.ts"],"names":[],"mappings":";;;AACA,iCAA2C;AAC3C,iCAAwC;
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../src/effect/generator.ts"],"names":[],"mappings":";;;AACA,iCAA2C;AAC3C,iCAAwC;AAExC,4CAA+C;AAE/C;;GAEG;AACH,MAAa,eAAe;IAC1B,YAA6B,IAAmB;QAAnB,SAAI,GAAJ,IAAI,CAAe;IAAG,CAAC;IAEpD;;OAEG;IACH,aAAa,CAAC,KAAoC;QAChD,OAAO,IAAA,wBAAiB,EAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IAED;;OAEG;IACH,kBAAkB,CAAC,KAAiB,EAAE,MAA6B;QACjE,MAAM,gBAAgB,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC;aACxC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;YACb,MAAM,SAAS,GAAG,IAAA,qBAAc,EAAC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YACnD,OAAO,KAAK,KAAK,CAAC,IAAI,KAAK,SA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AC;IAED;;OAEG;IACH,mBAAmB,CAAC,QAAiB;QACnC,MAAM,MAAM,GAAG;gBACH,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;;IAEpC,CAAC;QAED,MAAM,OAAO,GAAG;YACd,kCAAkC;YAClC,2EAA2E;SAC5E,CAAC;QAEF,IAAI,QAAQ,EAAE,CAAC;YACb,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC1E,OAAO,CAAC,IAAI,CAAC,YAAY,SAAS,oBAAoB,CAAC,CAAC;QAC1D,CAAC;QAED,OAAO,GAAG,MAAM,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;IAC9C,CAAC;CACF;AA3FD,0CA2FC"}
|
package/dist/generator/index.js
CHANGED
|
@@ -22,7 +22,7 @@ const orchestrator_1 = require("./orchestrator");
|
|
|
22
22
|
__exportStar(require("../kysely/helpers"), exports);
|
|
23
23
|
exports.generator = (0, generator_helper_1.generatorHandler)({
|
|
24
24
|
onManifest: () => ({
|
|
25
|
-
version: '1.
|
|
25
|
+
version: '1.4.0',
|
|
26
26
|
defaultOutput: './generated',
|
|
27
27
|
prettyName: 'Prisma Effect Kysely Generator',
|
|
28
28
|
}),
|
package/dist/kysely/helpers.d.ts
CHANGED
|
@@ -19,15 +19,15 @@ export declare const generated: <SType, SEncoded, R>(schema: S.Schema<SType, SEn
|
|
|
19
19
|
/**
|
|
20
20
|
* Create selectable schema from base schema
|
|
21
21
|
*/
|
|
22
|
-
export declare const selectable: <Type, Encoded>(schema: S.Schema<Type, Encoded>) => S.
|
|
22
|
+
export declare const selectable: <Type, Encoded>(schema: S.Schema<Type, Encoded>) => S.Schema<unknown, unknown, never>;
|
|
23
23
|
/**
|
|
24
24
|
* Create insertable schema from base schema
|
|
25
25
|
*/
|
|
26
|
-
export declare const insertable: <Type, Encoded>(schema: S.Schema<Type, Encoded>) => S.
|
|
26
|
+
export declare const insertable: <Type, Encoded>(schema: S.Schema<Type, Encoded>) => S.Schema<unknown, unknown, never>;
|
|
27
27
|
/**
|
|
28
28
|
* Create updateable schema from base schema
|
|
29
29
|
*/
|
|
30
|
-
export declare const updateable: <Type, Encoded>(schema: S.Schema<Type, Encoded>) => S.
|
|
30
|
+
export declare const updateable: <Type, Encoded>(schema: S.Schema<Type, Encoded>) => S.Schema<unknown, unknown, never>;
|
|
31
31
|
export interface Schemas<Type, Encoded> {
|
|
32
32
|
Selectable: S.Schema<Selectable<Type>, Selectable<Encoded>>;
|
|
33
33
|
Insertable: S.Schema<Insertable<Type>, Insertable<Encoded>>;
|
|
@@ -38,9 +38,9 @@ export interface Schemas<Type, Encoded> {
|
|
|
38
38
|
* Used in generated code
|
|
39
39
|
*/
|
|
40
40
|
export declare const getSchemas: <Type, Encoded>(baseSchema: S.Schema<Type, Encoded>) => {
|
|
41
|
-
Selectable: S.
|
|
42
|
-
Insertable: S.
|
|
43
|
-
Updateable: S.
|
|
41
|
+
Selectable: S.Schema<unknown, unknown, never>;
|
|
42
|
+
Insertable: S.Schema<unknown, unknown, never>;
|
|
43
|
+
Updateable: S.Schema<unknown, unknown, never>;
|
|
44
44
|
};
|
|
45
45
|
export interface GetTypes<T extends Schemas<unknown, unknown>> {
|
|
46
46
|
Selectable: S.Schema.Type<T['Selectable']>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/kysely/helpers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,eAAe,CAAC;AACnC,OAAO,EAGL,UAAU,EACV,UAAU,EACV,UAAU,EACX,MAAM,QAAQ,CAAC;AAEhB;;;GAGG;AAEH,eAAO,MAAM,YAAY,eAA8B,CAAC;AACxD,eAAO,MAAM,WAAW,eAA6B,CAAC;AAwBtD;;;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,CAAC,OAAO,EAAE,OAAO,CAAC;IAC3D,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC;IAC3C,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC;IAC3C,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC;CAC5C"}
|
package/dist/kysely/helpers.js
CHANGED
|
@@ -74,9 +74,9 @@ exports.generated = generated;
|
|
|
74
74
|
const selectable = (schema) => {
|
|
75
75
|
const { ast } = schema;
|
|
76
76
|
if (!AST.isTypeLiteral(ast)) {
|
|
77
|
-
return S.make(ast);
|
|
77
|
+
return S.asSchema(S.make(ast));
|
|
78
78
|
}
|
|
79
|
-
return S.make(new AST.TypeLiteral(extractParametersFromTypeLiteral(ast, 'selectSchema'), ast.indexSignatures, ast.annotations));
|
|
79
|
+
return S.asSchema(S.make(new AST.TypeLiteral(extractParametersFromTypeLiteral(ast, 'selectSchema'), ast.indexSignatures, ast.annotations)));
|
|
80
80
|
};
|
|
81
81
|
exports.selectable = selectable;
|
|
82
82
|
/**
|
|
@@ -85,11 +85,11 @@ exports.selectable = selectable;
|
|
|
85
85
|
const insertable = (schema) => {
|
|
86
86
|
const { ast } = schema;
|
|
87
87
|
if (!AST.isTypeLiteral(ast)) {
|
|
88
|
-
return S.make(ast);
|
|
88
|
+
return S.asSchema(S.make(ast));
|
|
89
89
|
}
|
|
90
90
|
const extracted = extractParametersFromTypeLiteral(ast, 'insertSchema');
|
|
91
91
|
const res = new AST.TypeLiteral(extracted.map((prop) => new AST.PropertySignature(prop.name, prop.type, isOptionalType(prop.type), prop.isReadonly, prop.annotations)), ast.indexSignatures, ast.annotations);
|
|
92
|
-
return S.make(res);
|
|
92
|
+
return S.asSchema(S.make(res));
|
|
93
93
|
};
|
|
94
94
|
exports.insertable = insertable;
|
|
95
95
|
/**
|
|
@@ -98,11 +98,11 @@ exports.insertable = insertable;
|
|
|
98
98
|
const updateable = (schema) => {
|
|
99
99
|
const { ast } = schema;
|
|
100
100
|
if (!AST.isTypeLiteral(ast)) {
|
|
101
|
-
return S.make(ast);
|
|
101
|
+
return S.asSchema(S.make(ast));
|
|
102
102
|
}
|
|
103
103
|
const extracted = extractParametersFromTypeLiteral(ast, 'updateSchema');
|
|
104
104
|
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);
|
|
105
|
-
return S.make(res);
|
|
105
|
+
return S.asSchema(S.make(res));
|
|
106
106
|
};
|
|
107
107
|
exports.updateable = updateable;
|
|
108
108
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/kysely/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sDAAwC;AACxC,iDAAmC;AASnC;;;GAGG;AAEU,QAAA,YAAY,GAAG,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AAC3C,QAAA,WAAW,GAAG,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;AAwBtD;;;GAGG;AACI,MAAM,UAAU,GAAG,CAWxB,YAA2C,EAC3C,YAA2C,EAC3C,YAA2C,EAC3C,EAAE;IACF,MAAM,OAAO,GAUT;QACF,YAAY;QACZ,YAAY;QACZ,YAAY;KACb,CAAC;IACF,OAAO,YAAY,CAAC,WAAW,CAAC,EAAE,CAAC,oBAAY,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;AAC/D,CAAC,CAAC;AA/BW,QAAA,UAAU,cA+BrB;AAEF;;;GAGG;AACI,MAAM,SAAS,GAAG,CACvB,MAAoC,EACpC,EAAE;IACF,MAAM,OAAO,GAAyC;QACp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Y,GAAG,CAAC,GAAY,EAAE,EAAE,CAAC,oBAAY,IAAI,GAAG,CAAC,WAAW,CAAC;AAEvE,MAAM,eAAe,GAAG,CAAC,GAAY,EAAE,EAAE,CAAC,mBAAW,IAAI,GAAG,CAAC,WAAW,CAAC;AAEzE,MAAM,cAAc,GAAG,CAAC,GAAY,EAAE,EAAE;IACtC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QACtB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,CACL,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAU,EAAE,EAAE,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC;QACzD,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAU,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAC9C,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,GAAY,EAAE,EAAE,CAClC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC;IAClB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,IAAI,CAClC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CACf,GAAG,KAAK,GAAG,CAAC,sBAAsB,CAAC,QAAQ,EAAE,IAAI,KAAK,KAAK,MAAM,CACpE,CAAC"}
|
package/dist/prisma/enum.d.ts
CHANGED
|
@@ -3,12 +3,7 @@ import type { DMMF } from "@prisma/generator-helper";
|
|
|
3
3
|
* Extract enum definitions from Prisma DMMF
|
|
4
4
|
* Handles @map directive for database-level enum values
|
|
5
5
|
*/
|
|
6
|
-
export declare function extractEnums(dmmf: DMMF.Document): readonly
|
|
7
|
-
name: string;
|
|
8
|
-
values: DMMF.EnumValue[];
|
|
9
|
-
dbName?: string | null;
|
|
10
|
-
documentation?: string;
|
|
11
|
-
}>>>[];
|
|
6
|
+
export declare function extractEnums(dmmf: DMMF.Document): readonly DMMF.DatamodelEnum[];
|
|
12
7
|
/**
|
|
13
8
|
* Get the database value for an enum value (respects @map directive)
|
|
14
9
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enum.d.ts","sourceRoot":"","sources":["../../src/prisma/enum.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAErD;;;GAGG;AACH,wBAAgB,YAAY,
|
|
1
|
+
{"version":3,"file":"enum.d.ts","sourceRoot":"","sources":["../../src/prisma/enum.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAErD;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,IAAI,CAAC,QAAQ,GAClB,SAAS,IAAI,CAAC,aAAa,EAAE,CAE/B;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,UAE3D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,IAAI,CAAC,aAAa,YAE1D"}
|
package/dist/prisma/enum.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enum.js","sourceRoot":"","sources":["../../src/prisma/enum.ts"],"names":[],"mappings":";;AAMA,
|
|
1
|
+
{"version":3,"file":"enum.js","sourceRoot":"","sources":["../../src/prisma/enum.ts"],"names":[],"mappings":";;AAMA,oCAIC;AAKD,gDAEC;AAKD,0CAEC;AAtBD;;;GAGG;AACH,SAAgB,YAAY,CAC1B,IAAmB;IAEnB,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;AAC9B,CAAC;AAED;;GAEG;AACH,SAAgB,kBAAkB,CAAC,SAAyB;IAC1D,OAAO,SAAS,CAAC,MAAM,IAAI,SAAS,CAAC,IAAI,CAAC;AAC5C,CAAC;AAED;;GAEG;AACH,SAAgB,eAAe,CAAC,OAA2B;IACzD,OAAO,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;AAChD,CAAC"}
|
|
@@ -9,50 +9,14 @@ export declare class PrismaGenerator {
|
|
|
9
9
|
/**
|
|
10
10
|
* Get all enums from DMMF
|
|
11
11
|
*/
|
|
12
|
-
getEnums(): readonly
|
|
13
|
-
name: string;
|
|
14
|
-
values: DMMF.EnumValue[];
|
|
15
|
-
dbName?: string | null;
|
|
16
|
-
documentation?: string;
|
|
17
|
-
}>>>[];
|
|
12
|
+
getEnums(): readonly DMMF.DatamodelEnum[];
|
|
18
13
|
/**
|
|
19
14
|
* Get all models from DMMF (filtered and sorted)
|
|
20
15
|
*/
|
|
21
|
-
getModels():
|
|
22
|
-
name: string;
|
|
23
|
-
dbName: string | null;
|
|
24
|
-
schema: string | null;
|
|
25
|
-
fields: DMMF.Field[];
|
|
26
|
-
uniqueFields: string[][];
|
|
27
|
-
uniqueIndexes: DMMF.uniqueIndex[];
|
|
28
|
-
documentation?: string;
|
|
29
|
-
primaryKey: DMMF.PrimaryKey | null;
|
|
30
|
-
isGenerated?: boolean;
|
|
31
|
-
}>[];
|
|
16
|
+
getModels(): readonly DMMF.Model[];
|
|
32
17
|
/**
|
|
33
18
|
* Get schema fields for a model (filtered and sorted)
|
|
34
19
|
*/
|
|
35
|
-
getModelFields(model: DMMF.Model):
|
|
36
|
-
kind: DMMF.FieldKind;
|
|
37
|
-
name: string;
|
|
38
|
-
isRequired: boolean;
|
|
39
|
-
isList: boolean;
|
|
40
|
-
isUnique: boolean;
|
|
41
|
-
isId: boolean;
|
|
42
|
-
isReadOnly: boolean;
|
|
43
|
-
isGenerated?: boolean;
|
|
44
|
-
isUpdatedAt?: boolean;
|
|
45
|
-
type: string;
|
|
46
|
-
nativeType?: [string, string[]] | null;
|
|
47
|
-
dbName?: string | null;
|
|
48
|
-
hasDefaultValue: boolean;
|
|
49
|
-
default?: DMMF.FieldDefault | DMMF.FieldDefaultScalar | DMMF.FieldDefaultScalar[];
|
|
50
|
-
relationFromFields?: string[];
|
|
51
|
-
relationToFields?: string[];
|
|
52
|
-
relationOnDelete?: string;
|
|
53
|
-
relationOnUpdate?: string;
|
|
54
|
-
relationName?: string;
|
|
55
|
-
documentation?: string;
|
|
56
|
-
}>[];
|
|
20
|
+
getModelFields(model: DMMF.Model): readonly DMMF.Field[];
|
|
57
21
|
}
|
|
58
22
|
//# sourceMappingURL=generator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/prisma/generator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAIrD;;;GAGG;AACH,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,IAAI,CAAC,QAAQ;IAEhD;;OAEG;IACH,QAAQ
|
|
1
|
+
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/prisma/generator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAIrD;;;GAGG;AACH,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,IAAI,CAAC,QAAQ;IAEhD;;OAEG;IACH,QAAQ,IAAI,SAAS,IAAI,CAAC,aAAa,EAAE;IAIzC;;OAEG;IACH,SAAS,IAAI,SAAS,IAAI,CAAC,KAAK,EAAE;IAOlC;;OAEG;IACH,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,GAAG,SAAS,IAAI,CAAC,KAAK,EAAE;CAIzD"}
|
package/dist/prisma/type.d.ts
CHANGED
|
@@ -27,42 +27,11 @@ export declare function isListField(field: DMMF.Field): boolean;
|
|
|
27
27
|
/**
|
|
28
28
|
* Filter models to exclude internal models (starting with _)
|
|
29
29
|
*/
|
|
30
|
-
export declare function filterInternalModels(models: readonly DMMF.Model[]):
|
|
31
|
-
name: string;
|
|
32
|
-
dbName: string | null;
|
|
33
|
-
schema: string | null;
|
|
34
|
-
fields: DMMF.Field[];
|
|
35
|
-
uniqueFields: string[][];
|
|
36
|
-
uniqueIndexes: DMMF.uniqueIndex[];
|
|
37
|
-
documentation?: string;
|
|
38
|
-
primaryKey: DMMF.PrimaryKey | null;
|
|
39
|
-
isGenerated?: boolean;
|
|
40
|
-
}>[];
|
|
30
|
+
export declare function filterInternalModels(models: readonly DMMF.Model[]): readonly DMMF.Model[];
|
|
41
31
|
/**
|
|
42
32
|
* Filter fields to only include scalar and enum fields (exclude relations)
|
|
43
33
|
*/
|
|
44
|
-
export declare function filterSchemaFields(fields: readonly DMMF.Field[]):
|
|
45
|
-
kind: DMMF.FieldKind;
|
|
46
|
-
name: string;
|
|
47
|
-
isRequired: boolean;
|
|
48
|
-
isList: boolean;
|
|
49
|
-
isUnique: boolean;
|
|
50
|
-
isId: boolean;
|
|
51
|
-
isReadOnly: boolean;
|
|
52
|
-
isGenerated?: boolean;
|
|
53
|
-
isUpdatedAt?: boolean;
|
|
54
|
-
type: string;
|
|
55
|
-
nativeType?: [string, string[]] | null;
|
|
56
|
-
dbName?: string | null;
|
|
57
|
-
hasDefaultValue: boolean;
|
|
58
|
-
default?: DMMF.FieldDefault | DMMF.FieldDefaultScalar | DMMF.FieldDefaultScalar[];
|
|
59
|
-
relationFromFields?: string[];
|
|
60
|
-
relationToFields?: string[];
|
|
61
|
-
relationOnDelete?: string;
|
|
62
|
-
relationOnUpdate?: string;
|
|
63
|
-
relationName?: string;
|
|
64
|
-
documentation?: string;
|
|
65
|
-
}>[];
|
|
34
|
+
export declare function filterSchemaFields(fields: readonly DMMF.Field[]): readonly DMMF.Field[];
|
|
66
35
|
/**
|
|
67
36
|
* Get the database table name for a model (respects @@map directive)
|
|
68
37
|
*/
|
|
@@ -70,40 +39,9 @@ export declare function getModelDbName(model: DMMF.Model): string;
|
|
|
70
39
|
/**
|
|
71
40
|
* Sort models alphabetically for deterministic output
|
|
72
41
|
*/
|
|
73
|
-
export declare function sortModels(models: readonly DMMF.Model[]):
|
|
74
|
-
name: string;
|
|
75
|
-
dbName: string | null;
|
|
76
|
-
schema: string | null;
|
|
77
|
-
fields: DMMF.Field[];
|
|
78
|
-
uniqueFields: string[][];
|
|
79
|
-
uniqueIndexes: DMMF.uniqueIndex[];
|
|
80
|
-
documentation?: string;
|
|
81
|
-
primaryKey: DMMF.PrimaryKey | null;
|
|
82
|
-
isGenerated?: boolean;
|
|
83
|
-
}>[];
|
|
42
|
+
export declare function sortModels(models: readonly DMMF.Model[]): readonly DMMF.Model[];
|
|
84
43
|
/**
|
|
85
44
|
* Sort fields alphabetically for deterministic output
|
|
86
45
|
*/
|
|
87
|
-
export declare function sortFields(fields: readonly DMMF.Field[]):
|
|
88
|
-
kind: DMMF.FieldKind;
|
|
89
|
-
name: string;
|
|
90
|
-
isRequired: boolean;
|
|
91
|
-
isList: boolean;
|
|
92
|
-
isUnique: boolean;
|
|
93
|
-
isId: boolean;
|
|
94
|
-
isReadOnly: boolean;
|
|
95
|
-
isGenerated?: boolean;
|
|
96
|
-
isUpdatedAt?: boolean;
|
|
97
|
-
type: string;
|
|
98
|
-
nativeType?: [string, string[]] | null;
|
|
99
|
-
dbName?: string | null;
|
|
100
|
-
hasDefaultValue: boolean;
|
|
101
|
-
default?: DMMF.FieldDefault | DMMF.FieldDefaultScalar | DMMF.FieldDefaultScalar[];
|
|
102
|
-
relationFromFields?: string[];
|
|
103
|
-
relationToFields?: string[];
|
|
104
|
-
relationOnDelete?: string;
|
|
105
|
-
relationOnUpdate?: string;
|
|
106
|
-
relationName?: string;
|
|
107
|
-
documentation?: string;
|
|
108
|
-
}>[];
|
|
46
|
+
export declare function sortFields(fields: readonly DMMF.Field[]): readonly DMMF.Field[];
|
|
109
47
|
//# sourceMappingURL=type.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../src/prisma/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAErD;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,WAoB5C;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,UAE/C;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,WAEhD;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,WAE1C;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,WAEhD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,WAE5C;AAED;;GAEG;AACH,wBAAgB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../src/prisma/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAErD;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,WAoB5C;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,UAE/C;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,WAEhD;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,WAE1C;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,WAEhD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,WAE5C;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,IAAI,CAAC,KAAK,EAAE,GAC5B,SAAS,IAAI,CAAC,KAAK,EAAE,CAEvB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,SAAS,IAAI,CAAC,KAAK,EAAE,GAC5B,SAAS,IAAI,CAAC,KAAK,EAAE,CAIvB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,UAE/C;AAED;;GAEG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,SAAS,IAAI,CAAC,KAAK,EAAE,GAC5B,SAAS,IAAI,CAAC,KAAK,EAAE,CAEvB;AAED;;GAEG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,SAAS,IAAI,CAAC,KAAK,EAAE,GAC5B,SAAS,IAAI,CAAC,KAAK,EAAE,CAEvB"}
|
package/dist/prisma/type.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../src/prisma/type.ts"],"names":[],"mappings":";;AAMA,kCAoBC;AAKD,wCAEC;AAKD,0CAEC;AAKD,8BAEC;AAKD,0CAEC;AAKD,kCAEC;AAKD,
|
|
1
|
+
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../src/prisma/type.ts"],"names":[],"mappings":";;AAMA,kCAoBC;AAKD,wCAEC;AAKD,0CAEC;AAKD,8BAEC;AAKD,0CAEC;AAKD,kCAEC;AAKD,oDAIC;AAKD,gDAMC;AAKD,wCAEC;AAKD,gCAIC;AAKD,gCAIC;AAxGD;;;GAGG;AACH,SAAgB,WAAW,CAAC,KAAiB;IAC3C,uCAAuC;IACvC,IAAI,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,KAAK,MAAM,EAAE,CAAC;QACrC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,sCAAsC;IACtC,IAAI,KAAK,CAAC,aAAa,EAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;QAC9C,OAAO,IAAI,CAAC;IACd,CAAC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AC;AAED;;GAEG;AACH,SAAgB,cAAc,CAAC,KAAiB;IAC9C,OAAO,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC;AACpC,CAAC;AAED;;GAEG;AACH,SAAgB,UAAU,CACxB,MAA6B;IAE7B,OAAO,MAAM,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AACrE,CAAC;AAED;;GAEG;AACH,SAAgB,UAAU,CACxB,MAA6B;IAE7B,OAAO,MAAM,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AACrE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Naming utilities for consistent TypeScript identifier generation
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Convert any string to PascalCase for TypeScript type names
|
|
6
|
+
* Handles: snake_case, camelCase, kebab-case, or mixed formats
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* toPascalCase('user') // 'User'
|
|
10
|
+
* toPascalCase('session_model_preference') // 'SessionModelPreference'
|
|
11
|
+
* toPascalCase('user-profile') // 'UserProfile'
|
|
12
|
+
* toPascalCase('userProfile') // 'UserProfile'
|
|
13
|
+
*/
|
|
14
|
+
export declare function toPascalCase(str: string): string;
|
|
15
|
+
//# sourceMappingURL=naming.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"naming.d.ts","sourceRoot":"","sources":["../../src/utils/naming.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAyBhD"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Naming utilities for consistent TypeScript identifier generation
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.toPascalCase = toPascalCase;
|
|
7
|
+
/**
|
|
8
|
+
* Convert any string to PascalCase for TypeScript type names
|
|
9
|
+
* Handles: snake_case, camelCase, kebab-case, or mixed formats
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* toPascalCase('user') // 'User'
|
|
13
|
+
* toPascalCase('session_model_preference') // 'SessionModelPreference'
|
|
14
|
+
* toPascalCase('user-profile') // 'UserProfile'
|
|
15
|
+
* toPascalCase('userProfile') // 'UserProfile'
|
|
16
|
+
*/
|
|
17
|
+
function toPascalCase(str) {
|
|
18
|
+
// Handle empty string
|
|
19
|
+
if (!str)
|
|
20
|
+
return str;
|
|
21
|
+
// Split on underscores, dashes, or spaces
|
|
22
|
+
const words = str.split(/[_-\s]+/);
|
|
23
|
+
// If no delimiters found, check if already camelCase/PascalCase
|
|
24
|
+
if (words.length === 1) {
|
|
25
|
+
// Split camelCase/PascalCase by capital letters
|
|
26
|
+
const camelWords = str.split(/(?=[A-Z])/);
|
|
27
|
+
if (camelWords.length > 1) {
|
|
28
|
+
return camelWords
|
|
29
|
+
.map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
|
|
30
|
+
.join('');
|
|
31
|
+
}
|
|
32
|
+
// Single word - just capitalize first letter
|
|
33
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
34
|
+
}
|
|
35
|
+
// Convert each word to PascalCase
|
|
36
|
+
return words
|
|
37
|
+
.filter((word) => word.length > 0) // Remove empty strings
|
|
38
|
+
.map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
|
|
39
|
+
.join('');
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=naming.js.map
|
|
@@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