@cedarjs/cli 5.0.0-canary.2585 → 5.0.0-canary.2586
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.
|
@@ -24,7 +24,7 @@ const validateName = (name) => {
|
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
const relationsForModel = (model) => {
|
|
27
|
-
return model
|
|
27
|
+
return model?.fields.filter((f) => f.relationName).map((field) => {
|
|
28
28
|
return field.name;
|
|
29
29
|
});
|
|
30
30
|
};
|
|
@@ -271,7 +271,7 @@ const modelRelatedVariables = (model) => {
|
|
|
271
271
|
listDisplayFunction: "truncate"
|
|
272
272
|
}
|
|
273
273
|
};
|
|
274
|
-
const relations = relationsForModel(model)
|
|
274
|
+
const relations = relationsForModel(model)?.map((relation) => relation);
|
|
275
275
|
const columns = model.fields.filter((field) => field.kind !== "object").map((column) => {
|
|
276
276
|
let validation;
|
|
277
277
|
const meta = componentMetadata[column.type];
|
|
@@ -283,7 +283,7 @@ const modelRelatedVariables = (model) => {
|
|
|
283
283
|
} else {
|
|
284
284
|
validation = column.isRequired ? componentMetadata.default.validation : null;
|
|
285
285
|
}
|
|
286
|
-
const isRelationalField = column.name.endsWith("Id") && relations
|
|
286
|
+
const isRelationalField = column.name.endsWith("Id") && relations?.some((relation) => column.name.includes(relation));
|
|
287
287
|
const isRequired = column.isRequired;
|
|
288
288
|
const isEnum = column.kind === "enum";
|
|
289
289
|
const isList = column.isList;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/cli",
|
|
3
|
-
"version": "5.0.0-canary.
|
|
3
|
+
"version": "5.0.0-canary.2586",
|
|
4
4
|
"description": "The CedarJS Command Line",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/parser": "7.29.7",
|
|
35
35
|
"@babel/preset-typescript": "7.29.7",
|
|
36
|
-
"@cedarjs/api-server": "5.0.0-canary.
|
|
37
|
-
"@cedarjs/cli-helpers": "5.0.0-canary.
|
|
38
|
-
"@cedarjs/fastify-web": "5.0.0-canary.
|
|
39
|
-
"@cedarjs/internal": "5.0.0-canary.
|
|
40
|
-
"@cedarjs/prerender": "5.0.0-canary.
|
|
41
|
-
"@cedarjs/project-config": "5.0.0-canary.
|
|
42
|
-
"@cedarjs/structure": "5.0.0-canary.
|
|
43
|
-
"@cedarjs/telemetry": "5.0.0-canary.
|
|
44
|
-
"@cedarjs/utils": "5.0.0-canary.
|
|
45
|
-
"@cedarjs/vite": "5.0.0-canary.
|
|
46
|
-
"@cedarjs/web-server": "5.0.0-canary.
|
|
36
|
+
"@cedarjs/api-server": "5.0.0-canary.2586",
|
|
37
|
+
"@cedarjs/cli-helpers": "5.0.0-canary.2586",
|
|
38
|
+
"@cedarjs/fastify-web": "5.0.0-canary.2586",
|
|
39
|
+
"@cedarjs/internal": "5.0.0-canary.2586",
|
|
40
|
+
"@cedarjs/prerender": "5.0.0-canary.2586",
|
|
41
|
+
"@cedarjs/project-config": "5.0.0-canary.2586",
|
|
42
|
+
"@cedarjs/structure": "5.0.0-canary.2586",
|
|
43
|
+
"@cedarjs/telemetry": "5.0.0-canary.2586",
|
|
44
|
+
"@cedarjs/utils": "5.0.0-canary.2586",
|
|
45
|
+
"@cedarjs/vite": "5.0.0-canary.2586",
|
|
46
|
+
"@cedarjs/web-server": "5.0.0-canary.2586",
|
|
47
47
|
"@listr2/prompt-adapter-enquirer": "4.2.1",
|
|
48
48
|
"@opentelemetry/api": "1.9.1",
|
|
49
49
|
"@opentelemetry/core": "1.30.1",
|