@cedarjs/cli 3.0.0-canary.13248 → 3.0.0-canary.13250
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.
|
@@ -25,7 +25,7 @@ const parseSchema = async (model) => {
|
|
|
25
25
|
});
|
|
26
26
|
return { scalarFields, relations, foreignKeys };
|
|
27
27
|
};
|
|
28
|
-
|
|
28
|
+
function scenarioFieldValue(field) {
|
|
29
29
|
const randFloat = Math.random() * 1e7;
|
|
30
30
|
const randInt = parseInt(Math.random() * 1e7);
|
|
31
31
|
const randIntArray = [
|
|
@@ -48,6 +48,9 @@ const scenarioFieldValue = (field) => {
|
|
|
48
48
|
case "Json":
|
|
49
49
|
return { foo: "bar" };
|
|
50
50
|
case "String":
|
|
51
|
+
if (field.name?.toLowerCase().includes("email")) {
|
|
52
|
+
return field.isUnique ? `foo${randInt}@bar.com` : "foo@bar.com";
|
|
53
|
+
}
|
|
51
54
|
return field.isUnique ? `String${randInt}` : "String";
|
|
52
55
|
case "Bytes":
|
|
53
56
|
return `new Uint8Array([${randIntArray}])`;
|
|
@@ -57,7 +60,7 @@ const scenarioFieldValue = (field) => {
|
|
|
57
60
|
}
|
|
58
61
|
}
|
|
59
62
|
}
|
|
60
|
-
}
|
|
63
|
+
}
|
|
61
64
|
const fieldsToScenario = async (scalarFields, relations, foreignKeys) => {
|
|
62
65
|
const data = {};
|
|
63
66
|
scalarFields.forEach((field) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/cli",
|
|
3
|
-
"version": "3.0.0-canary.
|
|
3
|
+
"version": "3.0.0-canary.13250+1f0031d23",
|
|
4
4
|
"description": "The CedarJS Command Line",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,15 +33,15 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/preset-typescript": "7.28.5",
|
|
35
35
|
"@babel/runtime-corejs3": "7.28.4",
|
|
36
|
-
"@cedarjs/api-server": "3.0.0-canary.
|
|
37
|
-
"@cedarjs/cli-helpers": "3.0.0-canary.
|
|
38
|
-
"@cedarjs/fastify-web": "3.0.0-canary.
|
|
39
|
-
"@cedarjs/internal": "3.0.0-canary.
|
|
40
|
-
"@cedarjs/prerender": "3.0.0-canary.
|
|
41
|
-
"@cedarjs/project-config": "3.0.0-canary.
|
|
42
|
-
"@cedarjs/structure": "3.0.0-canary.
|
|
43
|
-
"@cedarjs/telemetry": "3.0.0-canary.
|
|
44
|
-
"@cedarjs/web-server": "3.0.0-canary.
|
|
36
|
+
"@cedarjs/api-server": "3.0.0-canary.13250",
|
|
37
|
+
"@cedarjs/cli-helpers": "3.0.0-canary.13250",
|
|
38
|
+
"@cedarjs/fastify-web": "3.0.0-canary.13250",
|
|
39
|
+
"@cedarjs/internal": "3.0.0-canary.13250",
|
|
40
|
+
"@cedarjs/prerender": "3.0.0-canary.13250",
|
|
41
|
+
"@cedarjs/project-config": "3.0.0-canary.13250",
|
|
42
|
+
"@cedarjs/structure": "3.0.0-canary.13250",
|
|
43
|
+
"@cedarjs/telemetry": "3.0.0-canary.13250",
|
|
44
|
+
"@cedarjs/web-server": "3.0.0-canary.13250",
|
|
45
45
|
"@listr2/prompt-adapter-enquirer": "2.0.16",
|
|
46
46
|
"@opentelemetry/api": "1.8.0",
|
|
47
47
|
"@opentelemetry/core": "1.22.0",
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"publishConfig": {
|
|
104
104
|
"access": "public"
|
|
105
105
|
},
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "1f0031d23e4f8956de6ddcfec7a3f9d47d9a96a4"
|
|
107
107
|
}
|