mutano 3.0.7 → 3.0.8
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 +4 -4
- package/dist/main.js +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -90,16 +90,16 @@ export interface InsertableUser {
|
|
|
90
90
|
|
|
91
91
|
**Kysely Types:**
|
|
92
92
|
```typescript
|
|
93
|
-
export interface
|
|
93
|
+
export interface User {
|
|
94
94
|
id: Generated<number>;
|
|
95
95
|
name: string;
|
|
96
96
|
email: string;
|
|
97
97
|
role: 'admin' | 'user';
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
export type
|
|
101
|
-
export type
|
|
102
|
-
export type
|
|
100
|
+
export type SelectableUser = Selectable<User>;
|
|
101
|
+
export type InsertableUser = Insertable<User>;
|
|
102
|
+
export type UpdateableUser = Updateable<User>;
|
|
103
103
|
```
|
|
104
104
|
|
|
105
105
|
## Configuration
|
package/dist/main.js
CHANGED
|
@@ -544,7 +544,7 @@ function generateKyselyContent({
|
|
|
544
544
|
`;
|
|
545
545
|
content += `// This interface defines the structure of the '${table}' table
|
|
546
546
|
`;
|
|
547
|
-
content += `export interface ${pascalTable}
|
|
547
|
+
content += `export interface ${pascalTable} {
|
|
548
548
|
`;
|
|
549
549
|
for (const desc of describes) {
|
|
550
550
|
const fieldName = isCamelCase ? camelCase(desc.Field) : desc.Field;
|
|
@@ -560,11 +560,11 @@ function generateKyselyContent({
|
|
|
560
560
|
content += "}\n\n";
|
|
561
561
|
content += `// Use these types for inserting, selecting and updating the table
|
|
562
562
|
`;
|
|
563
|
-
content += `export type Selectable${pascalTable} = Selectable<${pascalTable}
|
|
563
|
+
content += `export type Selectable${pascalTable} = Selectable<${pascalTable}>;
|
|
564
564
|
`;
|
|
565
|
-
content += `export type Insertable${pascalTable} = Insertable<${pascalTable}
|
|
565
|
+
content += `export type Insertable${pascalTable} = Insertable<${pascalTable}>;
|
|
566
566
|
`;
|
|
567
|
-
content += `export type Updateable${pascalTable} = Updateable<${pascalTable}
|
|
567
|
+
content += `export type Updateable${pascalTable} = Updateable<${pascalTable}>;
|
|
568
568
|
`;
|
|
569
569
|
return content;
|
|
570
570
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mutano",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.8",
|
|
5
5
|
"description": "Converts Prisma/MySQL/PostgreSQL/SQLite schemas to Zod/TS/Kysely interfaces",
|
|
6
6
|
"author": "Alisson Cavalcante Agiani <thelinuxlich@gmail.com>",
|
|
7
7
|
"license": "MIT",
|