prisma-effect-kysely 1.9.2 → 1.10.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.
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Configuration for a single Unsupported field
3
+ */
4
+ export interface UnsupportedFieldConfig {
5
+ effectType: string;
6
+ dbType: string;
7
+ dbName: string;
8
+ required: boolean;
9
+ comment?: string;
10
+ }
11
+ /**
12
+ * Full configuration structure
13
+ */
14
+ export interface UnsupportedConfig {
15
+ models: Record<string, Record<string, UnsupportedFieldConfig>>;
16
+ }
17
+ /**
18
+ * Load unsupported fields configuration from JSON file
19
+ * Looks for prisma/unsupported-fields.json relative to schema location
20
+ */
21
+ export declare function loadUnsupportedConfig(schemaPath: string): UnsupportedConfig | null;
22
+ /**
23
+ * Get unsupported fields for a specific model
24
+ */
25
+ export declare function getUnsupportedFields(config: UnsupportedConfig | null, modelName: string): Record<string, UnsupportedFieldConfig>;
26
+ //# sourceMappingURL=unsupported-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unsupported-config.d.ts","sourceRoot":"","sources":["../../src/utils/unsupported-config.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC,CAAC;CAChE;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,iBAAiB,GAAG,IAAI,CAiBlF;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,iBAAiB,GAAG,IAAI,EAChC,SAAS,EAAE,MAAM,GAChB,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAGxC"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.loadUnsupportedConfig = loadUnsupportedConfig;
4
+ exports.getUnsupportedFields = getUnsupportedFields;
5
+ const fs_1 = require("fs");
6
+ const path_1 = require("path");
7
+ /**
8
+ * Load unsupported fields configuration from JSON file
9
+ * Looks for prisma/unsupported-fields.json relative to schema location
10
+ */
11
+ function loadUnsupportedConfig(schemaPath) {
12
+ try {
13
+ // Assume schema is in prisma/schema/ directory
14
+ // Config should be in prisma/unsupported-fields.json
15
+ const schemaDir = (0, path_1.dirname)((0, path_1.dirname)(schemaPath)); // Go up to prisma/
16
+ const configPath = (0, path_1.join)(schemaDir, 'unsupported-fields.json');
17
+ if (!(0, fs_1.existsSync)(configPath)) {
18
+ return null;
19
+ }
20
+ const content = (0, fs_1.readFileSync)(configPath, 'utf-8');
21
+ return JSON.parse(content);
22
+ }
23
+ catch (error) {
24
+ console.warn(`⚠️ Failed to load unsupported-fields.json: ${error}`);
25
+ return null;
26
+ }
27
+ }
28
+ /**
29
+ * Get unsupported fields for a specific model
30
+ */
31
+ function getUnsupportedFields(config, modelName) {
32
+ if (!config)
33
+ return {};
34
+ return config.models[modelName] || {};
35
+ }
36
+ //# sourceMappingURL=unsupported-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unsupported-config.js","sourceRoot":"","sources":["../../src/utils/unsupported-config.ts"],"names":[],"mappings":";;AAyBA,sDAiBC;AAKD,oDAMC;AArDD,2BAA8C;AAC9C,+BAAqC;AAoBrC;;;GAGG;AACH,SAAgB,qBAAqB,CAAC,UAAkB;IACtD,IAAI,CAAC;QACH,+CAA+C;QAC/C,qDAAqD;QACrD,MAAM,SAAS,GAAG,IAAA,cAAO,EAAC,IAAA,cAAO,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC,mBAAmB;QACnE,MAAM,UAAU,GAAG,IAAA,WAAI,EAAC,SAAS,EAAE,yBAAyB,CAAC,CAAC;QAE9D,IAAI,CAAC,IAAA,eAAU,EAAC,UAAU,CAAC,EAAE,CAAC;YAC5B,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,OAAO,GAAG,IAAA,iBAAY,EAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAClD,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAsB,CAAC;IAClD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,IAAI,CAAC,+CAA+C,KAAK,EAAE,CAAC,CAAC;QACrE,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;GAEG;AACH,SAAgB,oBAAoB,CAClC,MAAgC,EAChC,SAAiB;IAEjB,IAAI,CAAC,MAAM;QAAE,OAAO,EAAE,CAAC;IACvB,OAAO,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;AACxC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prisma-effect-kysely",
3
- "version": "1.9.2",
3
+ "version": "1.10.0",
4
4
  "description": "Prisma generator that creates Effect Schema types from Prisma schema compatible with Kysely",
5
5
  "license": "MIT",
6
6
  "author": "Samuel Ho",
@@ -47,20 +47,6 @@
47
47
  "node": ">=18.0.0",
48
48
  "pnpm": ">=8.0.0"
49
49
  },
50
- "packageManager": "pnpm@10.0.0",
51
- "scripts": {
52
- "build": "tsc -p tsconfig.lib.json",
53
- "prepare": "husky",
54
- "test": "jest",
55
- "test:watch": "jest --watch",
56
- "test:coverage": "jest --coverage",
57
- "typecheck": "tsc --noEmit -p tsconfig.lib.json",
58
- "lint": "eslint .",
59
- "lint:fix": "eslint . --fix",
60
- "format": "prettier --write .",
61
- "format:check": "prettier --check .",
62
- "prepublishOnly": "npm run lint && npm run typecheck && npm run test && npm run build"
63
- },
64
50
  "lint-staged": {
65
51
  "*.ts": [
66
52
  "eslint --fix",
@@ -68,12 +54,12 @@
68
54
  ]
69
55
  },
70
56
  "dependencies": {
71
- "@prisma/generator-helper": "^6.17.0",
57
+ "@prisma/generator-helper": "^7.0.0",
72
58
  "prettier": "^3.6.2"
73
59
  },
74
60
  "peerDependencies": {
75
- "effect": "^3.18.4",
76
- "kysely": "^0.28.0"
61
+ "effect": "^3.19.6",
62
+ "kysely": "^0.28.8"
77
63
  },
78
64
  "peerDependenciesMeta": {
79
65
  "kysely": {
@@ -81,24 +67,36 @@
81
67
  }
82
68
  },
83
69
  "devDependencies": {
84
- "@eslint/js": "^9.37.0",
85
- "@prisma/internals": "^6.17.0",
86
- "@types/jest": "^29.5.14",
87
- "@types/node": "^22.18.8",
88
- "@typescript-eslint/eslint-plugin": "^8.46.0",
89
- "@typescript-eslint/parser": "^8.46.0",
90
- "eslint": "^9.37.0",
70
+ "@eslint/js": "^9.39.1",
71
+ "@prisma/internals": "^7.0.0",
72
+ "@types/jest": "^30.0.0",
73
+ "@types/node": "^24.10.1",
74
+ "@typescript-eslint/eslint-plugin": "^8.47.0",
75
+ "@typescript-eslint/parser": "^8.47.0",
76
+ "effect": "^3.19.6",
77
+ "eslint": "^9.39.1",
91
78
  "eslint-import-resolver-typescript": "^4.4.4",
92
79
  "eslint-plugin-import": "^2.32.0",
93
- "eslint-plugin-jest": "^29.0.1",
80
+ "eslint-plugin-jest": "^29.2.0",
94
81
  "husky": "^9.1.7",
95
- "jest": "^29.7.0",
96
- "kysely": "^0.28.7",
97
- "lint-staged": "^16.2.4",
98
- "prisma": "^6.17.0",
99
- "ts-jest": "^29.4.4",
82
+ "jest": "^30.2.0",
83
+ "kysely": "^0.28.8",
84
+ "lint-staged": "^16.2.7",
85
+ "prisma": "^6.19.0",
86
+ "ts-jest": "^29.4.5",
100
87
  "ts-node": "^10.9.2",
101
88
  "typescript": "^5.9.3",
102
- "typescript-eslint": "^8.46.0"
89
+ "typescript-eslint": "^8.47.0"
90
+ },
91
+ "scripts": {
92
+ "build": "tsc -p tsconfig.lib.json",
93
+ "test": "jest",
94
+ "test:watch": "jest --watch",
95
+ "test:coverage": "jest --coverage",
96
+ "typecheck": "tsc --noEmit -p tsconfig.lib.json",
97
+ "lint": "eslint .",
98
+ "lint:fix": "eslint . --fix",
99
+ "format": "prettier --write .",
100
+ "format:check": "prettier --check ."
103
101
  }
104
- }
102
+ }