@cedarjs/cli 1.0.0-canary.12780 → 1.0.0-canary.12781
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/buildHandler.js +3 -3
- package/dist/commands/deploy/flightcontrolHandler.js +7 -7
- package/dist/commands/deploy/renderHandler.js +7 -7
- package/dist/commands/devHandler.js +1 -2
- package/dist/commands/experimental/setupOpentelemetryHandler.js +7 -3
- package/dist/commands/generate/dataMigration/dataMigration.js +8 -4
- package/dist/commands/prismaHandler.js +10 -18
- package/dist/commands/setup/deploy/providers/serverlessHandler.js +6 -4
- package/dist/commands/setup/jobs/jobsHandler.js +9 -6
- package/dist/commands/type-checkHandler.js +1 -2
- package/dist/commands/upgrade.js +1 -2
- package/dist/lib/generatePrismaClient.js +4 -20
- package/dist/lib/schemaHelpers.js +5 -2
- package/dist/lib/test.js +31 -28
- package/package.json +11 -11
|
@@ -29,14 +29,14 @@ const handler = async ({
|
|
|
29
29
|
const rwjsConfig = getConfig();
|
|
30
30
|
const useFragments = rwjsConfig.graphql?.fragments;
|
|
31
31
|
const useTrustedDocuments = rwjsConfig.graphql?.trustedDocuments;
|
|
32
|
-
const prismaSchemaExists = fs.existsSync(rwjsPaths.api.
|
|
32
|
+
const prismaSchemaExists = fs.existsSync(rwjsPaths.api.prismaConfig);
|
|
33
33
|
const prerenderRoutes = prerender && side.includes("web") ? detectPrerenderRoutes() : [];
|
|
34
34
|
const shouldGeneratePrismaClient = prisma && prismaSchemaExists && (side.includes("api") || prerenderRoutes.length > 0);
|
|
35
35
|
const tasks = [
|
|
36
36
|
shouldGeneratePrismaClient && {
|
|
37
37
|
title: "Generating Prisma Client...",
|
|
38
|
-
task: () => {
|
|
39
|
-
const { cmd, args } = generatePrismaCommand(
|
|
38
|
+
task: async () => {
|
|
39
|
+
const { cmd, args } = await generatePrismaCommand();
|
|
40
40
|
return execa(cmd, args, {
|
|
41
41
|
stdio: verbose ? "inherit" : "pipe",
|
|
42
42
|
shell: true,
|
|
@@ -16,9 +16,9 @@ const handler = async ({
|
|
|
16
16
|
dataMigrate,
|
|
17
17
|
serve
|
|
18
18
|
});
|
|
19
|
-
const
|
|
19
|
+
const cedarPaths = getPaths();
|
|
20
20
|
const execaConfig = {
|
|
21
|
-
cwd:
|
|
21
|
+
cwd: cedarPaths.base,
|
|
22
22
|
shell: true,
|
|
23
23
|
stdio: "inherit"
|
|
24
24
|
};
|
|
@@ -32,20 +32,20 @@ const handler = async ({
|
|
|
32
32
|
async function runApiCommands() {
|
|
33
33
|
if (!serve) {
|
|
34
34
|
console.log("Building api...");
|
|
35
|
-
await runExecaCommand("yarn
|
|
35
|
+
await runExecaCommand("yarn cedar build api --verbose");
|
|
36
36
|
if (prisma) {
|
|
37
37
|
console.log("Running database migrations...");
|
|
38
38
|
await runExecaCommand(
|
|
39
|
-
`node_modules/.bin/prisma migrate deploy --
|
|
39
|
+
`node_modules/.bin/prisma migrate deploy --config "${cedarPaths.api.prismaConfig}"`
|
|
40
40
|
);
|
|
41
41
|
}
|
|
42
42
|
if (dataMigrate) {
|
|
43
43
|
console.log("Running data migrations...");
|
|
44
|
-
await runExecaCommand("yarn
|
|
44
|
+
await runExecaCommand("yarn cedar dataMigrate up");
|
|
45
45
|
}
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
48
|
-
const serverFilePath = path.join(
|
|
48
|
+
const serverFilePath = path.join(cedarPaths.api.dist, "server.js");
|
|
49
49
|
const hasServerFile = fs.pathExistsSync(serverFilePath);
|
|
50
50
|
if (hasServerFile) {
|
|
51
51
|
execa(`yarn node ${serverFilePath}`, execaConfig);
|
|
@@ -56,7 +56,7 @@ const handler = async ({
|
|
|
56
56
|
}
|
|
57
57
|
async function runWebCommands() {
|
|
58
58
|
console.log("Building web...");
|
|
59
|
-
await runExecaCommand("yarn
|
|
59
|
+
await runExecaCommand("yarn cedar build web --verbose");
|
|
60
60
|
}
|
|
61
61
|
if (side === "api") {
|
|
62
62
|
await runApiCommands();
|
|
@@ -10,9 +10,9 @@ const handler = async ({ side, prisma, dataMigrate }) => {
|
|
|
10
10
|
prisma,
|
|
11
11
|
dataMigrate
|
|
12
12
|
});
|
|
13
|
-
const
|
|
13
|
+
const cedarPaths = getPaths();
|
|
14
14
|
const execaConfig = {
|
|
15
|
-
cwd:
|
|
15
|
+
cwd: cedarPaths.base,
|
|
16
16
|
shell: true,
|
|
17
17
|
stdio: "inherit"
|
|
18
18
|
};
|
|
@@ -20,14 +20,14 @@ const handler = async ({ side, prisma, dataMigrate }) => {
|
|
|
20
20
|
if (prisma) {
|
|
21
21
|
console.log("Running database migrations...");
|
|
22
22
|
execa.commandSync(
|
|
23
|
-
`node_modules/.bin/prisma migrate deploy --
|
|
23
|
+
`node_modules/.bin/prisma migrate deploy --config "${cedarPaths.api.prismaConfig}"`,
|
|
24
24
|
execaConfig
|
|
25
25
|
);
|
|
26
26
|
}
|
|
27
27
|
if (dataMigrate) {
|
|
28
28
|
console.log("Running data migrations...");
|
|
29
29
|
const packageJson = fs.readJsonSync(
|
|
30
|
-
path.join(
|
|
30
|
+
path.join(cedarPaths.base, "package.json")
|
|
31
31
|
);
|
|
32
32
|
const hasDataMigratePackage = !!packageJson.devDependencies["@cedarjs/cli-data-migrate"];
|
|
33
33
|
if (!hasDataMigratePackage) {
|
|
@@ -43,10 +43,10 @@ const handler = async ({ side, prisma, dataMigrate }) => {
|
|
|
43
43
|
].join("\n")
|
|
44
44
|
);
|
|
45
45
|
} else {
|
|
46
|
-
execa.commandSync("yarn
|
|
46
|
+
execa.commandSync("yarn cedar dataMigrate up", execaConfig);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
const serverFilePath = path.join(
|
|
49
|
+
const serverFilePath = path.join(cedarPaths.api.dist, "server.js");
|
|
50
50
|
const hasServerFile = fs.pathExistsSync(serverFilePath);
|
|
51
51
|
if (hasServerFile) {
|
|
52
52
|
execa(`yarn node ${serverFilePath}`, execaConfig);
|
|
@@ -57,7 +57,7 @@ const handler = async ({ side, prisma, dataMigrate }) => {
|
|
|
57
57
|
}
|
|
58
58
|
async function runWebCommands() {
|
|
59
59
|
execa.commandSync("yarn install", execaConfig);
|
|
60
|
-
execa.commandSync("yarn
|
|
60
|
+
execa.commandSync("yarn cedar build web --verbose", execaConfig);
|
|
61
61
|
}
|
|
62
62
|
if (side === "api") {
|
|
63
63
|
runApiCommands();
|
|
@@ -4,7 +4,11 @@ import execa from "execa";
|
|
|
4
4
|
import fs from "fs-extra";
|
|
5
5
|
import { Listr } from "listr2";
|
|
6
6
|
import { addApiPackages } from "@cedarjs/cli-helpers";
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
getConfigPath,
|
|
9
|
+
resolveFile,
|
|
10
|
+
getSchemaPath
|
|
11
|
+
} from "@cedarjs/project-config";
|
|
8
12
|
import { errorTelemetry } from "@cedarjs/telemetry";
|
|
9
13
|
import c from "../../lib/colors.js";
|
|
10
14
|
import { getPaths, transformTSToJS, writeFile } from "../../lib/index.js";
|
|
@@ -126,8 +130,8 @@ const handler = async ({ force, verbose }) => {
|
|
|
126
130
|
const prismaTasks = [
|
|
127
131
|
{
|
|
128
132
|
title: "Setup Prisma OpenTelemetry...",
|
|
129
|
-
task: (_ctx, task) => {
|
|
130
|
-
const schemaPath =
|
|
133
|
+
task: async (_ctx, task) => {
|
|
134
|
+
const schemaPath = await getSchemaPath(getPaths().api.prismaConfig);
|
|
131
135
|
const schemaContent = fs.readFileSync(schemaPath, {
|
|
132
136
|
encoding: "utf-8",
|
|
133
137
|
flag: "r"
|
|
@@ -4,6 +4,7 @@ import fs from "fs-extra";
|
|
|
4
4
|
import { Listr } from "listr2";
|
|
5
5
|
import { terminalLink } from "termi-link";
|
|
6
6
|
import { recordTelemetryAttributes } from "@cedarjs/cli-helpers";
|
|
7
|
+
import { getDataMigrationsPath } from "@cedarjs/project-config";
|
|
7
8
|
import c from "../../../lib/colors.js";
|
|
8
9
|
import { getPaths, writeFilesTask } from "../../../lib/index.js";
|
|
9
10
|
import { prepareForRollback } from "../../../lib/rollback.js";
|
|
@@ -29,13 +30,16 @@ const TEMPLATE_PATHS = {
|
|
|
29
30
|
"dataMigration.ts.template"
|
|
30
31
|
)
|
|
31
32
|
};
|
|
32
|
-
const files = ({ name, typescript }) => {
|
|
33
|
+
const files = async ({ name, typescript }) => {
|
|
33
34
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
34
35
|
const timestamp = now.split(".")[0].replace(/\D/g, "");
|
|
35
36
|
const basename = `${timestamp}-${paramCase(name)}`;
|
|
36
37
|
const extension = typescript ? "ts" : "js";
|
|
37
38
|
const outputFilename = basename + "." + extension;
|
|
38
|
-
const
|
|
39
|
+
const dataMigrationsPath = await getDataMigrationsPath(
|
|
40
|
+
getPaths().api.prismaConfig
|
|
41
|
+
);
|
|
42
|
+
const outputPath = path.join(dataMigrationsPath, outputFilename);
|
|
39
43
|
return {
|
|
40
44
|
[outputPath]: fs.readFileSync(TEMPLATE_PATHS[extension]).toString()
|
|
41
45
|
};
|
|
@@ -72,8 +76,8 @@ const handler = async (args) => {
|
|
|
72
76
|
[
|
|
73
77
|
{
|
|
74
78
|
title: "Generating data migration file...",
|
|
75
|
-
task: () => {
|
|
76
|
-
return writeFilesTask(files(args));
|
|
79
|
+
task: async () => {
|
|
80
|
+
return writeFilesTask(await files(args));
|
|
77
81
|
}
|
|
78
82
|
},
|
|
79
83
|
{
|
|
@@ -18,22 +18,14 @@ const handler = async ({ _, $0, commands = [], ...options }) => {
|
|
|
18
18
|
}
|
|
19
19
|
const hasHelpOption = options.help || options.h;
|
|
20
20
|
if (!hasHelpOption) {
|
|
21
|
-
if (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
console.error(c.error("No Prisma Schema found."));
|
|
28
|
-
console.error(`Redwood searched here '${rwjsPaths.api.dbSchema}'`);
|
|
29
|
-
console.error();
|
|
30
|
-
process.exit(1);
|
|
31
|
-
}
|
|
32
|
-
options.schema = `${rwjsPaths.api.dbSchema}`;
|
|
33
|
-
if (["seed", "diff"].includes(commands[1])) {
|
|
34
|
-
delete options.schema;
|
|
35
|
-
}
|
|
21
|
+
if (!fs.existsSync(rwjsPaths.api.prismaConfig)) {
|
|
22
|
+
console.error();
|
|
23
|
+
console.error(c.error("No Prisma config file found."));
|
|
24
|
+
console.error(`Cedar searched here '${rwjsPaths.api.prismaConfig}'`);
|
|
25
|
+
console.error();
|
|
26
|
+
process.exit(1);
|
|
36
27
|
}
|
|
28
|
+
options.config = `${rwjsPaths.api.prismaConfig}`;
|
|
37
29
|
}
|
|
38
30
|
const args = commands;
|
|
39
31
|
for (const [name, value] of Object.entries(options)) {
|
|
@@ -65,10 +57,10 @@ const handler = async ({ _, $0, commands = [], ...options }) => {
|
|
|
65
57
|
};
|
|
66
58
|
const printWrapInfo = () => {
|
|
67
59
|
const message = [
|
|
68
|
-
c.bold("
|
|
60
|
+
c.bold("Cedar CLI wraps Prisma CLI"),
|
|
69
61
|
"",
|
|
70
|
-
"Use `yarn
|
|
71
|
-
"Use `yarn prisma` to skip
|
|
62
|
+
"Use `yarn cedar prisma` to automatically pass `--config` and `--preview-feature` options.",
|
|
63
|
+
"Use `yarn prisma` to skip Cedar's automatic CLI options.",
|
|
72
64
|
"",
|
|
73
65
|
"Find more information in our docs:",
|
|
74
66
|
c.underline("https://cedarjs.com/docs/cli-commands#prisma")
|
|
@@ -2,6 +2,7 @@ import path from "path";
|
|
|
2
2
|
import fs from "fs-extra";
|
|
3
3
|
import { Listr } from "listr2";
|
|
4
4
|
import { recordTelemetryAttributes } from "@cedarjs/cli-helpers";
|
|
5
|
+
import { getSchemaPath } from "@cedarjs/project-config";
|
|
5
6
|
import { errorTelemetry } from "@cedarjs/telemetry";
|
|
6
7
|
import c from "../../../../lib/colors.js";
|
|
7
8
|
import {
|
|
@@ -56,15 +57,16 @@ const files = [
|
|
|
56
57
|
content: SERVERLESS_WEB_YML
|
|
57
58
|
}
|
|
58
59
|
];
|
|
59
|
-
const prismaBinaryTargetAdditions = () => {
|
|
60
|
-
const
|
|
60
|
+
const prismaBinaryTargetAdditions = async () => {
|
|
61
|
+
const schemaPath = await getSchemaPath(getPaths().api.prismaConfig);
|
|
62
|
+
const content = fs.readFileSync(schemaPath).toString();
|
|
61
63
|
if (!content.includes("rhel-openssl-1.0.x")) {
|
|
62
64
|
const result = content.replace(
|
|
63
65
|
/binaryTargets =.*\n/,
|
|
64
66
|
`binaryTargets = ["native", "rhel-openssl-1.0.x"]
|
|
65
67
|
`
|
|
66
68
|
);
|
|
67
|
-
fs.writeFileSync(
|
|
69
|
+
fs.writeFileSync(schemaPath, result);
|
|
68
70
|
}
|
|
69
71
|
};
|
|
70
72
|
const updateRedwoodTomlTask = () => {
|
|
@@ -119,7 +121,7 @@ const handler = async ({ force }) => {
|
|
|
119
121
|
}),
|
|
120
122
|
{
|
|
121
123
|
title: "Adding necessary Prisma binaries...",
|
|
122
|
-
task: () => prismaBinaryTargetAdditions()
|
|
124
|
+
task: async () => await prismaBinaryTargetAdditions()
|
|
123
125
|
},
|
|
124
126
|
printSetupNotes(notes)
|
|
125
127
|
],
|
|
@@ -3,6 +3,7 @@ import * as path from "node:path";
|
|
|
3
3
|
import prismaInternals from "@prisma/internals";
|
|
4
4
|
import { Listr } from "listr2";
|
|
5
5
|
import { addApiPackages } from "@cedarjs/cli-helpers";
|
|
6
|
+
import { getSchemaPath } from "@cedarjs/project-config";
|
|
6
7
|
import c from "../../../lib/colors.js";
|
|
7
8
|
import { getPaths, transformTSToJS, writeFile } from "../../../lib/index.js";
|
|
8
9
|
import { isTypeScriptProject } from "../../../lib/project.js";
|
|
@@ -25,14 +26,16 @@ model BackgroundJob {
|
|
|
25
26
|
}
|
|
26
27
|
`;
|
|
27
28
|
const getModelNames = async () => {
|
|
28
|
-
const
|
|
29
|
+
const schemaPath = await getSchemaPath(getPaths().api.prismaConfig);
|
|
30
|
+
const { schemas } = await getSchemaWithPath(schemaPath);
|
|
29
31
|
const schema = await getDMMF({ datamodel: schemas });
|
|
30
32
|
return schema.datamodel.models.map((model) => model.name);
|
|
31
33
|
};
|
|
32
|
-
const addDatabaseModel = () => {
|
|
33
|
-
const
|
|
34
|
+
const addDatabaseModel = async () => {
|
|
35
|
+
const schemaPath = await getSchemaPath(getPaths().api.prismaConfig);
|
|
36
|
+
const schema = fs.readFileSync(schemaPath, "utf-8");
|
|
34
37
|
const schemaWithUser = schema + MODEL_SCHEMA;
|
|
35
|
-
fs.writeFileSync(
|
|
38
|
+
fs.writeFileSync(schemaPath, schemaWithUser);
|
|
36
39
|
};
|
|
37
40
|
const tasks = async ({ force }) => {
|
|
38
41
|
const modelExists = (await getModelNames()).includes("BackgroundJob");
|
|
@@ -44,8 +47,8 @@ const tasks = async ({ force }) => {
|
|
|
44
47
|
[
|
|
45
48
|
{
|
|
46
49
|
title: "Creating job database model...",
|
|
47
|
-
task: () => {
|
|
48
|
-
addDatabaseModel();
|
|
50
|
+
task: async () => {
|
|
51
|
+
await addDatabaseModel();
|
|
49
52
|
},
|
|
50
53
|
skip: () => {
|
|
51
54
|
if (modelExists) {
|
package/dist/commands/upgrade.js
CHANGED
|
@@ -417,8 +417,7 @@ async function refreshPrismaClient(task, { verbose }) {
|
|
|
417
417
|
try {
|
|
418
418
|
await generatePrismaClient({
|
|
419
419
|
verbose,
|
|
420
|
-
force: false
|
|
421
|
-
schema: getPaths().api.dbSchema
|
|
420
|
+
force: false
|
|
422
421
|
});
|
|
423
422
|
} catch (e) {
|
|
424
423
|
task.skip("Refreshing the Prisma client caused an Error.");
|
|
@@ -2,35 +2,19 @@ import { createRequire } from "node:module";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import fs from "fs-extra";
|
|
4
4
|
import { runCommandTask, getPaths } from "../lib/index.js";
|
|
5
|
-
const
|
|
6
|
-
if (!fs.existsSync(schema)) {
|
|
7
|
-
console.log(
|
|
8
|
-
`Skipping database and Prisma client generation, no \`schema.prisma\` file found: \`${schema}\``
|
|
9
|
-
);
|
|
10
|
-
return true;
|
|
11
|
-
}
|
|
12
|
-
return false;
|
|
13
|
-
};
|
|
14
|
-
const generatePrismaCommand = (schema) => {
|
|
15
|
-
if (skipTask(schema)) {
|
|
16
|
-
return {};
|
|
17
|
-
}
|
|
5
|
+
const generatePrismaCommand = async () => {
|
|
18
6
|
const createdRequire = createRequire(import.meta.url);
|
|
19
7
|
const prismaIndexPath = createdRequire.resolve("prisma/build/index.js");
|
|
20
8
|
return {
|
|
21
9
|
cmd: `node "${prismaIndexPath}"`,
|
|
22
|
-
args: ["generate",
|
|
10
|
+
args: ["generate", `--config="${getPaths().api.prismaConfig}"`]
|
|
23
11
|
};
|
|
24
12
|
};
|
|
25
13
|
const generatePrismaClient = async ({
|
|
26
14
|
verbose = true,
|
|
27
15
|
force = true,
|
|
28
|
-
silent = false
|
|
29
|
-
schema = getPaths().api.dbSchema
|
|
16
|
+
silent = false
|
|
30
17
|
}) => {
|
|
31
|
-
if (skipTask(schema)) {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
18
|
if (!force) {
|
|
35
19
|
const prismaClientPath = path.join(
|
|
36
20
|
getPaths().base,
|
|
@@ -45,7 +29,7 @@ const generatePrismaClient = async ({
|
|
|
45
29
|
[
|
|
46
30
|
{
|
|
47
31
|
title: "Generating the Prisma client...",
|
|
48
|
-
...generatePrismaCommand(
|
|
32
|
+
...await generatePrismaCommand()
|
|
49
33
|
}
|
|
50
34
|
],
|
|
51
35
|
{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import prismaInternals from "@prisma/internals";
|
|
2
|
+
import { getSchemaPath } from "@cedarjs/project-config";
|
|
2
3
|
import { ensureUniquePlural } from "./pluralHelpers.js";
|
|
3
4
|
import { singularize, isPlural } from "./rwPluralize.js";
|
|
4
5
|
import { getPaths } from "./index.js";
|
|
@@ -62,8 +63,10 @@ const getEnum = async (name) => {
|
|
|
62
63
|
}
|
|
63
64
|
return model;
|
|
64
65
|
};
|
|
65
|
-
const getDataModel = async (
|
|
66
|
-
const
|
|
66
|
+
const getDataModel = async () => {
|
|
67
|
+
const prismaConfigPath = getPaths().api.prismaConfig;
|
|
68
|
+
const schemaPath = await getSchemaPath(prismaConfigPath);
|
|
69
|
+
const result = await getSchemaWithPath(schemaPath);
|
|
67
70
|
return result.schemas;
|
|
68
71
|
};
|
|
69
72
|
const getSchemaDefinitions = async () => {
|
package/dist/lib/test.js
CHANGED
|
@@ -10,7 +10,6 @@ vi.mock("@cedarjs/internal/dist/generate/generate", () => {
|
|
|
10
10
|
};
|
|
11
11
|
});
|
|
12
12
|
vi.mock("@cedarjs/project-config", async (importOriginal) => {
|
|
13
|
-
const path2 = await import("path");
|
|
14
13
|
const originalProjectConfig = await importOriginal();
|
|
15
14
|
return {
|
|
16
15
|
...originalProjectConfig,
|
|
@@ -19,44 +18,48 @@ vi.mock("@cedarjs/project-config", async (importOriginal) => {
|
|
|
19
18
|
return {
|
|
20
19
|
base: BASE_PATH,
|
|
21
20
|
api: {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
// this folder
|
|
25
|
-
dbSchema: path2.join(
|
|
21
|
+
prismaConfig: path.join(
|
|
22
|
+
// Current test folder
|
|
26
23
|
globalThis.__dirname,
|
|
27
24
|
"fixtures",
|
|
28
|
-
"
|
|
25
|
+
"prisma.config.cjs"
|
|
29
26
|
),
|
|
30
|
-
|
|
31
|
-
generators:
|
|
32
|
-
src:
|
|
33
|
-
jobs:
|
|
34
|
-
services:
|
|
35
|
-
directives:
|
|
36
|
-
graphql:
|
|
37
|
-
functions:
|
|
27
|
+
dataMigrations: path.join(BASE_PATH, "./api/dataMigrations"),
|
|
28
|
+
generators: path.join(BASE_PATH, "./api/generators"),
|
|
29
|
+
src: path.join(BASE_PATH, "./api/src"),
|
|
30
|
+
jobs: path.join(BASE_PATH, "./api/src/jobs"),
|
|
31
|
+
services: path.join(BASE_PATH, "./api/src/services"),
|
|
32
|
+
directives: path.join(BASE_PATH, "./api/src/directives"),
|
|
33
|
+
graphql: path.join(BASE_PATH, "./api/src/graphql"),
|
|
34
|
+
functions: path.join(BASE_PATH, "./api/src/functions")
|
|
38
35
|
},
|
|
39
36
|
web: {
|
|
40
|
-
base:
|
|
41
|
-
config:
|
|
42
|
-
src:
|
|
43
|
-
generators:
|
|
44
|
-
routes:
|
|
45
|
-
components:
|
|
46
|
-
layouts:
|
|
47
|
-
pages:
|
|
48
|
-
app:
|
|
37
|
+
base: path.join(BASE_PATH, "./web"),
|
|
38
|
+
config: path.join(BASE_PATH, "./web/config"),
|
|
39
|
+
src: path.join(BASE_PATH, "./web/src"),
|
|
40
|
+
generators: path.join(BASE_PATH, "./web/generators"),
|
|
41
|
+
routes: path.join(BASE_PATH, "web/src/Routes.js"),
|
|
42
|
+
components: path.join(BASE_PATH, "/web/src/components"),
|
|
43
|
+
layouts: path.join(BASE_PATH, "/web/src/layouts"),
|
|
44
|
+
pages: path.join(BASE_PATH, "/web/src/pages"),
|
|
45
|
+
app: path.join(BASE_PATH, "/web/src/App.js")
|
|
49
46
|
},
|
|
50
|
-
scripts:
|
|
47
|
+
scripts: path.join(BASE_PATH, "scripts"),
|
|
51
48
|
generated: {
|
|
52
|
-
base:
|
|
53
|
-
schema:
|
|
49
|
+
base: path.join(BASE_PATH, ".redwood"),
|
|
50
|
+
schema: path.join(BASE_PATH, ".redwood/schema.graphql"),
|
|
54
51
|
types: {
|
|
55
|
-
includes:
|
|
56
|
-
mirror:
|
|
52
|
+
includes: path.join(BASE_PATH, ".redwood/types/includes"),
|
|
53
|
+
mirror: path.join(BASE_PATH, ".redwood/types/mirror")
|
|
57
54
|
}
|
|
58
55
|
}
|
|
59
56
|
};
|
|
57
|
+
},
|
|
58
|
+
getSchemaPath: () => {
|
|
59
|
+
return path.join(globalThis.__dirname, "fixtures", "schema.prisma");
|
|
60
|
+
},
|
|
61
|
+
getDataMigrationsPath: () => {
|
|
62
|
+
return path.join(globalThis.__dirname, "fixtures", "migrations");
|
|
60
63
|
}
|
|
61
64
|
};
|
|
62
65
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/cli",
|
|
3
|
-
"version": "1.0.0-canary.
|
|
3
|
+
"version": "1.0.0-canary.12781+3646d1b08",
|
|
4
4
|
"description": "The CedarJS Command Line",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,15 +31,15 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@babel/preset-typescript": "7.27.1",
|
|
33
33
|
"@babel/runtime-corejs3": "7.27.6",
|
|
34
|
-
"@cedarjs/api-server": "1.0.0-canary.
|
|
35
|
-
"@cedarjs/cli-helpers": "1.0.0-canary.
|
|
36
|
-
"@cedarjs/fastify-web": "1.0.0-canary.
|
|
37
|
-
"@cedarjs/internal": "1.0.0-canary.
|
|
38
|
-
"@cedarjs/prerender": "1.0.0-canary.
|
|
39
|
-
"@cedarjs/project-config": "1.0.0-canary.
|
|
40
|
-
"@cedarjs/structure": "1.0.0-canary.
|
|
41
|
-
"@cedarjs/telemetry": "1.0.0-canary.
|
|
42
|
-
"@cedarjs/web-server": "1.0.0-canary.
|
|
34
|
+
"@cedarjs/api-server": "1.0.0-canary.12781",
|
|
35
|
+
"@cedarjs/cli-helpers": "1.0.0-canary.12781",
|
|
36
|
+
"@cedarjs/fastify-web": "1.0.0-canary.12781",
|
|
37
|
+
"@cedarjs/internal": "1.0.0-canary.12781",
|
|
38
|
+
"@cedarjs/prerender": "1.0.0-canary.12781",
|
|
39
|
+
"@cedarjs/project-config": "1.0.0-canary.12781",
|
|
40
|
+
"@cedarjs/structure": "1.0.0-canary.12781",
|
|
41
|
+
"@cedarjs/telemetry": "1.0.0-canary.12781",
|
|
42
|
+
"@cedarjs/web-server": "1.0.0-canary.12781",
|
|
43
43
|
"@listr2/prompt-adapter-enquirer": "2.0.16",
|
|
44
44
|
"@opentelemetry/api": "1.8.0",
|
|
45
45
|
"@opentelemetry/core": "1.22.0",
|
|
@@ -101,5 +101,5 @@
|
|
|
101
101
|
"publishConfig": {
|
|
102
102
|
"access": "public"
|
|
103
103
|
},
|
|
104
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "3646d1b08789be1ee38792889bc71cf331de1435"
|
|
105
105
|
}
|