@cedarjs/cli 5.0.6 → 5.0.7-next.219
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/README.md +7 -10
- package/dist/cfw.js +3 -1
- package/dist/commands/build/buildHandler.js +14 -6
- package/dist/commands/console.js +5 -3
- package/dist/commands/dev/devHandler.js +34 -4
- package/dist/commands/dev.js +3 -0
- package/dist/commands/experimental/setupOpentelemetryHandler.js +1 -1
- package/dist/commands/generate/job/jobHandler.js +5 -7
- package/dist/commands/generate/package/packageHandler.js +3 -6
- package/dist/commands/generate/scaffold/scaffoldHandler.js +73 -4
- package/dist/commands/generate/sdl/sdlHandler.js +9 -33
- package/dist/commands/generate/yargsHandlerHelpers.js +0 -6
- package/dist/commands/lint.js +1 -61
- package/dist/commands/prismaHandler.js +3 -6
- package/dist/commands/serve.js +21 -22
- package/dist/commands/serveBothHandler.js +4 -4
- package/dist/commands/setup/auth/auth.js +1 -1
- package/dist/commands/setup/database/database.js +15 -0
- package/dist/commands/setup/database/postgres.js +19 -0
- package/dist/commands/setup/database/postgresHandler.js +194 -0
- package/dist/commands/setup/deploy/helpers/index.js +9 -39
- package/dist/commands/setup/deploy/providers/flightcontrolHandler.js +17 -5
- package/dist/commands/setup/deploy/providers/renderHandler.js +4 -20
- package/dist/commands/setup/deploy/templates/render.js +24 -14
- package/dist/commands/setup/docker/templates/Dockerfile.yarn +2 -5
- package/dist/commands/setup/docker/templates/docker-compose.dev.yml +1 -1
- package/dist/commands/setup/docker/templates/docker-compose.prod.yml +2 -5
- package/dist/commands/setup/graphql/features/fragments/appGqlConfigTransform.js +6 -3
- package/dist/commands/setup/neon/neonHandler.js +96 -254
- package/dist/commands/setup/ui/libraries/tailwindcssHandler.js +0 -1
- package/dist/commands/setup.js +2 -1
- package/dist/lib/exec.js +5 -8
- package/dist/lib/index.js +22 -6
- package/dist/lib/updateCheck.js +34 -6
- package/dist/telemetry/resource.js +3 -8
- package/package.json +20 -21
- package/dist/commands/consoleHandler.js +0 -75
- /package/dist/commands/setup/{neon → database}/templates/db.ts.template +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/cli",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.7-next.219",
|
|
4
4
|
"description": "The CedarJS Command Line",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,20 +31,23 @@
|
|
|
31
31
|
"test:watch": "vitest watch"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
+
"@babel/core": "^7.26.10",
|
|
34
35
|
"@babel/parser": "7.29.7",
|
|
35
36
|
"@babel/preset-typescript": "7.29.7",
|
|
36
|
-
"@
|
|
37
|
-
"@
|
|
38
|
-
"@cedarjs/
|
|
39
|
-
"@cedarjs/
|
|
40
|
-
"@cedarjs/
|
|
41
|
-
"@cedarjs/
|
|
42
|
-
"@cedarjs/
|
|
43
|
-
"@cedarjs/
|
|
44
|
-
"@cedarjs/
|
|
45
|
-
"@cedarjs/
|
|
46
|
-
"@cedarjs/
|
|
47
|
-
"@
|
|
37
|
+
"@babel/traverse": "7.29.7",
|
|
38
|
+
"@babel/types": "7.29.7",
|
|
39
|
+
"@cedarjs/api-server": "5.0.7-next.219",
|
|
40
|
+
"@cedarjs/babel-config": "5.0.7-next.219",
|
|
41
|
+
"@cedarjs/cli-helpers": "5.0.7-next.219",
|
|
42
|
+
"@cedarjs/internal": "5.0.7-next.219",
|
|
43
|
+
"@cedarjs/prerender": "5.0.7-next.219",
|
|
44
|
+
"@cedarjs/project-config": "5.0.7-next.219",
|
|
45
|
+
"@cedarjs/structure": "5.0.7-next.219",
|
|
46
|
+
"@cedarjs/telemetry": "5.0.7-next.219",
|
|
47
|
+
"@cedarjs/utils": "5.0.7-next.219",
|
|
48
|
+
"@cedarjs/vite": "5.0.7-next.219",
|
|
49
|
+
"@cedarjs/web-server": "5.0.7-next.219",
|
|
50
|
+
"@listr2/prompt-adapter-enquirer": "4.3.0",
|
|
48
51
|
"@opentelemetry/api": "1.9.1",
|
|
49
52
|
"@opentelemetry/core": "1.30.1",
|
|
50
53
|
"@opentelemetry/exporter-trace-otlp-http": "0.57.2",
|
|
@@ -52,7 +55,7 @@
|
|
|
52
55
|
"@opentelemetry/sdk-trace-node": "1.30.1",
|
|
53
56
|
"@opentelemetry/semantic-conventions": "1.41.1",
|
|
54
57
|
"@prisma/internals": "7.8.0",
|
|
55
|
-
"ansis": "4.
|
|
58
|
+
"ansis": "4.3.1",
|
|
56
59
|
"archiver": "7.0.1",
|
|
57
60
|
"boxen": "5.1.2",
|
|
58
61
|
"camel-case": "4.1.2",
|
|
@@ -61,7 +64,6 @@
|
|
|
61
64
|
"ci-info": "4.4.0",
|
|
62
65
|
"concurrently": "9.2.4",
|
|
63
66
|
"configstore": "7.1.0",
|
|
64
|
-
"cross-env": "7.0.3",
|
|
65
67
|
"decamelize": "6.0.1",
|
|
66
68
|
"dotenv-defaults": "5.0.2",
|
|
67
69
|
"enquirer": "2.4.1",
|
|
@@ -69,7 +71,7 @@
|
|
|
69
71
|
"execa": "5.1.1",
|
|
70
72
|
"fast-glob": "3.3.3",
|
|
71
73
|
"humanize-string": "2.1.0",
|
|
72
|
-
"jscodeshift": "17.
|
|
74
|
+
"jscodeshift": "17.4.0",
|
|
73
75
|
"jsonc-parser": "3.3.1",
|
|
74
76
|
"latest-version": "9.0.0",
|
|
75
77
|
"listr2": "10.2.2",
|
|
@@ -80,8 +82,6 @@
|
|
|
80
82
|
"prettier": "3.8.4",
|
|
81
83
|
"prisma": "7.8.0",
|
|
82
84
|
"prompts": "2.4.2",
|
|
83
|
-
"recast": "0.23.11",
|
|
84
|
-
"rimraf": "6.1.3",
|
|
85
85
|
"semver": "7.7.4",
|
|
86
86
|
"smol-toml": "1.6.1",
|
|
87
87
|
"srvx": "0.11.16",
|
|
@@ -94,15 +94,14 @@
|
|
|
94
94
|
"yargs": "17.7.3"
|
|
95
95
|
},
|
|
96
96
|
"devDependencies": {
|
|
97
|
-
"@
|
|
98
|
-
"@babel/core": "^7.26.10",
|
|
97
|
+
"@cedarjs/framework-tools": "5.0.7-next.219",
|
|
99
98
|
"@prisma/dmmf": "7.8.0",
|
|
100
99
|
"@types/archiver": "^7.0.0",
|
|
101
100
|
"memfs": "4.64.0",
|
|
102
101
|
"node-ssh": "13.2.1",
|
|
103
102
|
"ts-dedent": "2.3.0",
|
|
104
103
|
"typescript": "5.9.3",
|
|
105
|
-
"vitest": "
|
|
104
|
+
"vitest": "4.1.10"
|
|
106
105
|
},
|
|
107
106
|
"engines": {
|
|
108
107
|
"node": ">=24"
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import fs from "node:fs";
|
|
2
|
-
import { createRequire } from "node:module";
|
|
3
|
-
import path from "node:path";
|
|
4
|
-
import repl from "node:repl";
|
|
5
|
-
import { registerApiSideBabelHook } from "@cedarjs/babel-config";
|
|
6
|
-
import { recordTelemetryAttributes } from "@cedarjs/cli-helpers";
|
|
7
|
-
import { getPaths } from "../lib/index.js";
|
|
8
|
-
const paths = getPaths();
|
|
9
|
-
function isREPLServerWithHistory(replServer) {
|
|
10
|
-
return "history" in replServer && "lines" in replServer;
|
|
11
|
-
}
|
|
12
|
-
const loadPrismaClient = (replContext) => {
|
|
13
|
-
const createdRequire = createRequire(import.meta.url);
|
|
14
|
-
const { db } = createdRequire(path.join(paths.api.lib, "db"));
|
|
15
|
-
db[/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")] = "PrismaClient";
|
|
16
|
-
replContext.db = db;
|
|
17
|
-
};
|
|
18
|
-
const consoleHistoryFile = path.join(paths.generated.base, "console_history");
|
|
19
|
-
const persistConsoleHistory = (r) => {
|
|
20
|
-
const lines = isREPLServerWithHistory(r) ? r.lines : [];
|
|
21
|
-
fs.appendFileSync(
|
|
22
|
-
consoleHistoryFile,
|
|
23
|
-
lines.filter((line) => line.trim()).join("\n") + "\n",
|
|
24
|
-
"utf8"
|
|
25
|
-
);
|
|
26
|
-
};
|
|
27
|
-
const loadConsoleHistory = async (r) => {
|
|
28
|
-
try {
|
|
29
|
-
const history = await fs.promises.readFile(consoleHistoryFile, "utf8");
|
|
30
|
-
if (isREPLServerWithHistory(r)) {
|
|
31
|
-
history.split("\n").reverse().map((line) => r.history.push(line));
|
|
32
|
-
}
|
|
33
|
-
} catch {
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
const handler = (_options) => {
|
|
37
|
-
recordTelemetryAttributes({
|
|
38
|
-
command: "console"
|
|
39
|
-
});
|
|
40
|
-
registerApiSideBabelHook({
|
|
41
|
-
plugins: [
|
|
42
|
-
[
|
|
43
|
-
"babel-plugin-module-resolver",
|
|
44
|
-
{
|
|
45
|
-
alias: {
|
|
46
|
-
src: paths.api.src
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
"rwjs-console-module-resolver"
|
|
50
|
-
]
|
|
51
|
-
]
|
|
52
|
-
});
|
|
53
|
-
const r = repl.start();
|
|
54
|
-
const defaultEval = r.eval;
|
|
55
|
-
const asyncEval = (cmd, context, filename, callback) => {
|
|
56
|
-
defaultEval.call(r, cmd, context, filename, async (err, result) => {
|
|
57
|
-
if (err) {
|
|
58
|
-
callback(err, null);
|
|
59
|
-
} else {
|
|
60
|
-
try {
|
|
61
|
-
callback(null, await Promise.resolve(result));
|
|
62
|
-
} catch (err2) {
|
|
63
|
-
callback(err2 instanceof Error ? err2 : new Error(String(err2)), null);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
};
|
|
68
|
-
r.eval = asyncEval;
|
|
69
|
-
loadConsoleHistory(r);
|
|
70
|
-
r.addListener("close", () => persistConsoleHistory(r));
|
|
71
|
-
loadPrismaClient(r.context);
|
|
72
|
-
};
|
|
73
|
-
export {
|
|
74
|
-
handler
|
|
75
|
-
};
|
|
File without changes
|