@cedarjs/cli 7.0.0-canary.3026 → 7.0.0-canary.3029
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/commands/setup.js
CHANGED
|
@@ -16,12 +16,11 @@ import * as setupNeon from "./setup/neon/neon.js";
|
|
|
16
16
|
import * as setupPackage from "./setup/package/package.js";
|
|
17
17
|
import * as setupRealtime from "./setup/realtime/realtime.js";
|
|
18
18
|
import * as setupServerFile from "./setup/server-file/serverFile.js";
|
|
19
|
-
import * as setupTsconfig from "./setup/tsconfig/tsconfig.js";
|
|
20
19
|
import * as setupUi from "./setup/ui/ui.js";
|
|
21
20
|
import * as setupUploads from "./setup/uploads/uploads.js";
|
|
22
21
|
const command = "setup <command>";
|
|
23
22
|
const description = "Initialize project config and install packages";
|
|
24
|
-
const builder = (yargs) => yargs.command(setupAuth).command(setupCache).command(setupDatabase).command(setupDeploy).command(setupDocker).command(setupGenerator).command(setupGraphql).command(setupI18n).command(setupJobs).command(setupMailer).command(setupMiddleware).command(setupMonitoring).command(setupNeon).command(setupPackage).command(setupRealtime).command(setupServerFile).command(
|
|
23
|
+
const builder = (yargs) => yargs.command(setupAuth).command(setupCache).command(setupDatabase).command(setupDeploy).command(setupDocker).command(setupGenerator).command(setupGraphql).command(setupI18n).command(setupJobs).command(setupMailer).command(setupMiddleware).command(setupMonitoring).command(setupNeon).command(setupPackage).command(setupRealtime).command(setupServerFile).command(setupUi).command(setupUploads).demandCommand().middleware(detectCedarVersion).epilogue(
|
|
25
24
|
`Also see the ${terminalLink(
|
|
26
25
|
"CedarJS CLI Reference",
|
|
27
26
|
"https://cedarjs.com/docs/cli-commands#setup"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/cli",
|
|
3
|
-
"version": "7.0.0-canary.
|
|
3
|
+
"version": "7.0.0-canary.3029",
|
|
4
4
|
"description": "The CedarJS Command Line",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -36,17 +36,17 @@
|
|
|
36
36
|
"@babel/preset-typescript": "7.29.7",
|
|
37
37
|
"@babel/traverse": "7.29.8",
|
|
38
38
|
"@babel/types": "7.29.8",
|
|
39
|
-
"@cedarjs/api-server": "7.0.0-canary.
|
|
40
|
-
"@cedarjs/babel-config": "7.0.0-canary.
|
|
41
|
-
"@cedarjs/cli-helpers": "7.0.0-canary.
|
|
42
|
-
"@cedarjs/internal": "7.0.0-canary.
|
|
43
|
-
"@cedarjs/prerender": "7.0.0-canary.
|
|
44
|
-
"@cedarjs/project-config": "7.0.0-canary.
|
|
45
|
-
"@cedarjs/structure": "7.0.0-canary.
|
|
46
|
-
"@cedarjs/telemetry": "7.0.0-canary.
|
|
47
|
-
"@cedarjs/utils": "7.0.0-canary.
|
|
48
|
-
"@cedarjs/vite": "7.0.0-canary.
|
|
49
|
-
"@cedarjs/web-server": "7.0.0-canary.
|
|
39
|
+
"@cedarjs/api-server": "7.0.0-canary.3029",
|
|
40
|
+
"@cedarjs/babel-config": "7.0.0-canary.3029",
|
|
41
|
+
"@cedarjs/cli-helpers": "7.0.0-canary.3029",
|
|
42
|
+
"@cedarjs/internal": "7.0.0-canary.3029",
|
|
43
|
+
"@cedarjs/prerender": "7.0.0-canary.3029",
|
|
44
|
+
"@cedarjs/project-config": "7.0.0-canary.3029",
|
|
45
|
+
"@cedarjs/structure": "7.0.0-canary.3029",
|
|
46
|
+
"@cedarjs/telemetry": "7.0.0-canary.3029",
|
|
47
|
+
"@cedarjs/utils": "7.0.0-canary.3029",
|
|
48
|
+
"@cedarjs/vite": "7.0.0-canary.3029",
|
|
49
|
+
"@cedarjs/web-server": "7.0.0-canary.3029",
|
|
50
50
|
"@listr2/prompt-adapter-enquirer": "4.3.0",
|
|
51
51
|
"@opentelemetry/api": "1.9.1",
|
|
52
52
|
"@opentelemetry/core": "1.30.1",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"yargs": "17.7.3"
|
|
95
95
|
},
|
|
96
96
|
"devDependencies": {
|
|
97
|
-
"@cedarjs/framework-tools": "7.0.0-canary.
|
|
97
|
+
"@cedarjs/framework-tools": "7.0.0-canary.3029",
|
|
98
98
|
"@prisma/dmmf": "7.8.0",
|
|
99
99
|
"@types/archiver": "^7.0.0",
|
|
100
100
|
"memfs": "4.68.1",
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { recordTelemetryAttributes } from "@cedarjs/cli-helpers";
|
|
2
|
-
const command = "tsconfig";
|
|
3
|
-
const description = "Set up tsconfig for web and api sides";
|
|
4
|
-
const builder = (yargs) => {
|
|
5
|
-
yargs.option("force", {
|
|
6
|
-
alias: "f",
|
|
7
|
-
default: false,
|
|
8
|
-
description: "Overwrite existing tsconfig.json files",
|
|
9
|
-
type: "boolean"
|
|
10
|
-
});
|
|
11
|
-
};
|
|
12
|
-
const handler = async (options) => {
|
|
13
|
-
recordTelemetryAttributes({
|
|
14
|
-
command: "setup tsconfig",
|
|
15
|
-
force: options.force
|
|
16
|
-
});
|
|
17
|
-
const { handler: handler2 } = await import("./tsconfigHandler.js");
|
|
18
|
-
return handler2(options);
|
|
19
|
-
};
|
|
20
|
-
export {
|
|
21
|
-
builder,
|
|
22
|
-
command,
|
|
23
|
-
description,
|
|
24
|
-
handler
|
|
25
|
-
};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import path from "path";
|
|
2
|
-
import { Listr } from "listr2";
|
|
3
|
-
import { terminalLink } from "termi-link";
|
|
4
|
-
import { colors as c } from "@cedarjs/cli-helpers";
|
|
5
|
-
import { errorTelemetry } from "@cedarjs/telemetry";
|
|
6
|
-
import {
|
|
7
|
-
getInstalledCedarVersion,
|
|
8
|
-
getPaths,
|
|
9
|
-
saveRemoteFileToDisk
|
|
10
|
-
} from "../../../lib/index.js";
|
|
11
|
-
const handler = async ({ force }) => {
|
|
12
|
-
const installedRwVersion = await getInstalledCedarVersion();
|
|
13
|
-
const GITHUB_VERSION_TAG = installedRwVersion.match("canary") ? "main" : `v${installedRwVersion}`;
|
|
14
|
-
const CRWA_TEMPLATE_URL = `https://raw.githubusercontent.com/redwoodjs/redwood/${GITHUB_VERSION_TAG}/packages/create-cedar-app/templates/ts`;
|
|
15
|
-
const tasks = new Listr(
|
|
16
|
-
[
|
|
17
|
-
{
|
|
18
|
-
title: "Creating tsconfig in web",
|
|
19
|
-
task: () => {
|
|
20
|
-
const webConfigPath = path.join(getPaths().web.base, "tsconfig.json");
|
|
21
|
-
const templateUrl = `${CRWA_TEMPLATE_URL}/web/tsconfig.json`;
|
|
22
|
-
return saveRemoteFileToDisk(templateUrl, webConfigPath, {
|
|
23
|
-
overwriteExisting: force
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
title: "Creating tsconfig in api",
|
|
29
|
-
task: () => {
|
|
30
|
-
const webConfigPath = path.join(getPaths().api.base, "tsconfig.json");
|
|
31
|
-
const templateUrl = `${CRWA_TEMPLATE_URL}/api/tsconfig.json`;
|
|
32
|
-
return saveRemoteFileToDisk(templateUrl, webConfigPath, {
|
|
33
|
-
overwriteExisting: force
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
title: "One more thing...",
|
|
39
|
-
task: (_ctx, task) => {
|
|
40
|
-
task.title = `One more thing...
|
|
41
|
-
|
|
42
|
-
${c.tip("Quick link to the docs on configuring TypeScript")}
|
|
43
|
-
${terminalLink("", "https://cedarjs.com/docs/typescript")}
|
|
44
|
-
`;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
],
|
|
48
|
-
{ rendererOptions: { collapseSubtasks: false } }
|
|
49
|
-
);
|
|
50
|
-
try {
|
|
51
|
-
await tasks.run();
|
|
52
|
-
} catch (e) {
|
|
53
|
-
const message = e instanceof Error ? e.message : String(e);
|
|
54
|
-
errorTelemetry(process.argv, message);
|
|
55
|
-
console.error(c.error(message));
|
|
56
|
-
const exitCode = e instanceof Error && "exitCode" in e && typeof e.exitCode === "number" ? e.exitCode : 1;
|
|
57
|
-
process.exit(exitCode);
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
export {
|
|
61
|
-
handler
|
|
62
|
-
};
|