@cedarjs/cli 2.8.1-next.116 → 2.8.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.
Files changed (36) hide show
  1. package/dist/commands/build/buildHandler.js +6 -9
  2. package/dist/commands/build.js +1 -2
  3. package/dist/commands/check.js +4 -2
  4. package/dist/commands/console.js +2 -2
  5. package/dist/commands/consoleHandler.js +4 -10
  6. package/dist/commands/dev/devHandler.js +4 -1
  7. package/dist/commands/execHandler.js +4 -11
  8. package/dist/commands/generate/dataMigration/dataMigration.js +2 -1
  9. package/dist/commands/generate/realtime/realtimeHandler.js +3 -3
  10. package/dist/commands/generate/service/serviceHandler.js +2 -1
  11. package/dist/commands/generate.js +1 -8
  12. package/dist/commands/jobsHandler.js +2 -4
  13. package/dist/commands/lint.js +2 -2
  14. package/dist/commands/prerenderHandler.js +35 -65
  15. package/dist/commands/prismaHandler.js +18 -41
  16. package/dist/commands/setup/deploy/providers/coherenceHandler.js +3 -3
  17. package/dist/commands/setup/deploy/providers/flightcontrolHandler.js +12 -4
  18. package/dist/commands/setup/deploy/providers/renderHandler.js +12 -5
  19. package/dist/commands/setup/jobs/jobsHandler.js +4 -3
  20. package/dist/commands/setup/realtime/realtime.js +1 -1
  21. package/dist/commands/setup/realtime/realtimeHandler.js +1 -20
  22. package/dist/commands/setup/ui/libraries/tailwindcssHandler.js +1 -1
  23. package/dist/commands/test.js +1 -5
  24. package/dist/commands/testEsm.js +1 -5
  25. package/dist/commands/{test/testHandler.js → testHandler.js} +30 -43
  26. package/dist/commands/{test/testHandlerEsm.js → testHandlerEsm.js} +23 -38
  27. package/dist/commands/type-checkHandler.js +12 -21
  28. package/dist/commands/upgrade/upgradeHandler.js +9 -22
  29. package/dist/lib/background.js +0 -2
  30. package/dist/lib/generatePrismaClient.js +4 -4
  31. package/dist/lib/schemaHelpers.js +6 -3
  32. package/dist/lib/test.js +0 -10
  33. package/dist/telemetry/resource.js +3 -1
  34. package/dist/testLib/cells.js +3 -5
  35. package/package.json +19 -17
  36. package/dist/commands/test/datasourceWarning.js +0 -42
@@ -117,11 +117,9 @@ const getCellGqlQuery = (ast) => {
117
117
  traverse(ast, {
118
118
  ExportNamedDeclaration({ node }) {
119
119
  if (node.exportKind === "value" && types.isVariableDeclaration(node.declaration)) {
120
- const exportedQueryNode = node.declaration.declarations.find(
121
- (d) => {
122
- return types.isIdentifier(d.id) && d.id.name === "QUERY" && types.isTaggedTemplateExpression(d.init);
123
- }
124
- );
120
+ const exportedQueryNode = node.declaration.declarations.find((d) => {
121
+ return types.isIdentifier(d.id) && d.id.name === "QUERY" && types.isTaggedTemplateExpression(d.init);
122
+ });
125
123
  if (exportedQueryNode) {
126
124
  const templateExpression = exportedQueryNode.init;
127
125
  cellQuery = templateExpression.quasi.quasis[0].value.raw;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/cli",
3
- "version": "2.8.1-next.116+784d2c048",
3
+ "version": "2.8.1",
4
4
  "description": "The CedarJS Command Line",
5
5
  "repository": {
6
6
  "type": "git",
@@ -31,18 +31,19 @@
31
31
  "test:watch": "vitest watch"
32
32
  },
33
33
  "dependencies": {
34
- "@babel/parser": "7.29.2",
34
+ "@babel/parser": "7.29.0",
35
35
  "@babel/preset-typescript": "7.28.5",
36
- "@cedarjs/api-server": "2.8.1-next.116+784d2c048",
37
- "@cedarjs/cli-helpers": "2.8.1-next.116+784d2c048",
38
- "@cedarjs/fastify-web": "2.8.1-next.116+784d2c048",
39
- "@cedarjs/internal": "2.8.1-next.116+784d2c048",
40
- "@cedarjs/prerender": "2.8.1-next.116+784d2c048",
41
- "@cedarjs/project-config": "2.8.1-next.116+784d2c048",
42
- "@cedarjs/structure": "2.8.1-next.116+784d2c048",
43
- "@cedarjs/telemetry": "2.8.1-next.116+784d2c048",
44
- "@cedarjs/utils": "2.8.1-next.116+784d2c048",
45
- "@cedarjs/web-server": "2.8.1-next.116+784d2c048",
36
+ "@babel/runtime-corejs3": "7.29.0",
37
+ "@cedarjs/api-server": "2.8.1",
38
+ "@cedarjs/cli-helpers": "2.8.1",
39
+ "@cedarjs/fastify-web": "2.8.1",
40
+ "@cedarjs/internal": "2.8.1",
41
+ "@cedarjs/prerender": "2.8.1",
42
+ "@cedarjs/project-config": "2.8.1",
43
+ "@cedarjs/structure": "2.8.1",
44
+ "@cedarjs/telemetry": "2.8.1",
45
+ "@cedarjs/utils": "2.8.1",
46
+ "@cedarjs/web-server": "2.8.1",
46
47
  "@listr2/prompt-adapter-enquirer": "4.2.1",
47
48
  "@opentelemetry/api": "1.9.0",
48
49
  "@opentelemetry/core": "1.30.1",
@@ -50,7 +51,7 @@
50
51
  "@opentelemetry/resources": "1.30.1",
51
52
  "@opentelemetry/sdk-trace-node": "1.30.1",
52
53
  "@opentelemetry/semantic-conventions": "1.38.0",
53
- "@prisma/internals": "7.5.0",
54
+ "@prisma/internals": "6.19.2",
54
55
  "ansis": "4.2.0",
55
56
  "archiver": "7.0.1",
56
57
  "boxen": "5.1.2",
@@ -59,6 +60,7 @@
59
60
  "ci-info": "4.4.0",
60
61
  "concurrently": "9.2.1",
61
62
  "configstore": "7.1.0",
63
+ "core-js": "3.48.0",
62
64
  "cross-env": "7.0.3",
63
65
  "decamelize": "6.0.1",
64
66
  "dotenv-defaults": "5.0.2",
@@ -76,14 +78,14 @@
76
78
  "pluralize": "8.0.0",
77
79
  "portfinder": "1.0.38",
78
80
  "prettier": "3.8.1",
79
- "prisma": "7.5.0",
81
+ "prisma": "6.19.2",
80
82
  "prompts": "2.4.2",
81
83
  "recast": "0.23.11",
82
84
  "rimraf": "6.1.3",
83
85
  "semver": "7.7.4",
84
86
  "smol-toml": "1.6.0",
85
87
  "string-env-interpolation": "1.0.1",
86
- "systeminformation": "5.31.4",
88
+ "systeminformation": "5.31.2",
87
89
  "termi-link": "1.1.0",
88
90
  "title-case": "3.0.3",
89
91
  "unionfs": "4.6.0",
@@ -95,7 +97,7 @@
95
97
  "@babel/cli": "7.28.6",
96
98
  "@babel/core": "^7.26.10",
97
99
  "@types/archiver": "^7.0.0",
98
- "memfs": "4.56.11",
100
+ "memfs": "4.56.10",
99
101
  "node-ssh": "13.2.1",
100
102
  "ts-dedent": "2.2.0",
101
103
  "tsx": "4.21.0",
@@ -105,5 +107,5 @@
105
107
  "publishConfig": {
106
108
  "access": "public"
107
109
  },
108
- "gitHead": "784d2c0484936b2d853e5b316d167602bd80d996"
110
+ "gitHead": "b1a808f72ff10c72375d0ff2c0be03631a1b79a2"
109
111
  }
@@ -1,42 +0,0 @@
1
- import fs from "node:fs";
2
- import Enquirer from "enquirer";
3
- import { getPaths } from "@cedarjs/project-config";
4
- async function warnIfNonStandardDatasourceUrl({ force } = {}) {
5
- const cedarPaths = getPaths();
6
- if (!fs.existsSync(cedarPaths.api.prismaConfig)) {
7
- return;
8
- }
9
- const prismaConfig = await fs.promises.readFile(
10
- cedarPaths.api.prismaConfig,
11
- "utf-8"
12
- );
13
- const prismaConfigLines = prismaConfig.split("\n");
14
- for (const line of prismaConfigLines) {
15
- const envVarName = (line.match(
16
- /^\s*url: process\.env\.(\w+),?(\s*\/\/.*)?$/
17
- ) ?? line.match(/^\s*url: env\(['"](\w+)['"]\),?(\s*\/\/.*)?$/) ?? line.match(/[{,] url: process\.env\.(\w+)(?:,| })/) ?? line.match(/[{,] url: env\(['"](\w+)['"]\)(?:,| })/))?.[1];
18
- if (envVarName && envVarName !== "DATABASE_URL") {
19
- if (force) {
20
- return;
21
- }
22
- console.warn(
23
- `Found a non-standard prisma config datasource url env var: "${envVarName}".
24
- Cedar will not override this env var, potentially running destructive commands against your production database.`
25
- );
26
- const { proceed } = await Enquirer.prompt({
27
- type: "confirm",
28
- name: "proceed",
29
- message: "Are you sure you want to run tests against this database?",
30
- initial: false
31
- });
32
- if (!proceed) {
33
- console.log("Aborting.");
34
- process.exit(1);
35
- }
36
- return;
37
- }
38
- }
39
- }
40
- export {
41
- warnIfNonStandardDatasourceUrl
42
- };