@cedarjs/record 1.1.1-next.21 → 1.1.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/dist/cjs/tasks/parse.js +5 -5
- package/dist/tasks/parse.js +7 -7
- package/package.json +7 -7
package/dist/cjs/tasks/parse.js
CHANGED
|
@@ -51,11 +51,11 @@ const indexLines = [
|
|
|
51
51
|
];
|
|
52
52
|
const modelImports = [];
|
|
53
53
|
const modelRequires = {};
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
const
|
|
57
|
-
(0, import_internals.getDMMF)({ datamodel:
|
|
58
|
-
|
|
54
|
+
let datamodel;
|
|
55
|
+
const parseDatamodel = () => {
|
|
56
|
+
const schema = (0, import_internals.getSchema)((0, import_project_config.getPaths)().api.dbSchema);
|
|
57
|
+
(0, import_internals.getDMMF)({ datamodel: schema }).then((schema2) => {
|
|
58
|
+
datamodel = schema2.datamodel;
|
|
59
59
|
try {
|
|
60
60
|
const dir = import_path.default.dirname(DATAMODEL_PATH);
|
|
61
61
|
if (!import_fs.default.existsSync(dir)) {
|
package/dist/tasks/parse.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
2
|
import path from "path";
|
|
3
|
-
import { getDMMF,
|
|
3
|
+
import { getDMMF, getSchema } from "@prisma/internals";
|
|
4
4
|
import * as esbuild from "esbuild";
|
|
5
|
-
import { getPaths
|
|
5
|
+
import { getPaths } from "@cedarjs/project-config";
|
|
6
6
|
const DATAMODEL_PATH = path.join(getPaths().api.models, "datamodel.js");
|
|
7
7
|
const MODELS_PATH = path.join(getPaths().api.src, "models");
|
|
8
8
|
const MODELS_INDEX_PATH = path.join(MODELS_PATH, "index.js");
|
|
@@ -19,11 +19,11 @@ const indexLines = [
|
|
|
19
19
|
];
|
|
20
20
|
const modelImports = [];
|
|
21
21
|
const modelRequires = {};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
getDMMF({ datamodel:
|
|
26
|
-
|
|
22
|
+
let datamodel;
|
|
23
|
+
const parseDatamodel = () => {
|
|
24
|
+
const schema = getSchema(getPaths().api.dbSchema);
|
|
25
|
+
getDMMF({ datamodel: schema }).then((schema2) => {
|
|
26
|
+
datamodel = schema2.datamodel;
|
|
27
27
|
try {
|
|
28
28
|
const dir = path.dirname(DATAMODEL_PATH);
|
|
29
29
|
if (!fs.existsSync(dir)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/record",
|
|
3
|
-
"version": "1.1.1
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/cedarjs/cedar.git",
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
"test:watch": "vitest watch"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@cedarjs/api": "1.1.1
|
|
33
|
-
"@cedarjs/project-config": "1.1.1
|
|
34
|
-
"@prisma/client": "
|
|
32
|
+
"@cedarjs/api": "1.1.1",
|
|
33
|
+
"@cedarjs/project-config": "1.1.1",
|
|
34
|
+
"@prisma/client": "5.20.0",
|
|
35
35
|
"camelcase": "6.3.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@cedarjs/framework-tools": "1.1.1
|
|
39
|
-
"@prisma/internals": "
|
|
38
|
+
"@cedarjs/framework-tools": "1.1.1",
|
|
39
|
+
"@prisma/internals": "5.20.0",
|
|
40
40
|
"esbuild": "0.25.9",
|
|
41
41
|
"publint": "0.3.12",
|
|
42
42
|
"tsx": "4.20.5",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "0c21e9ed1de0c7302295f3ca284924e48dd81afe"
|
|
49
49
|
}
|