@cedarjs/cli 5.0.0-canary.2326 → 5.0.0-canary.2328
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.
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { recordTelemetryAttributes } from "@cedarjs/cli-helpers";
|
|
2
|
+
const command = "neon";
|
|
3
|
+
const description = "Provision a Neon Postgres database and configure your project";
|
|
4
|
+
function builder(yargs) {
|
|
5
|
+
return yargs.option("force", {
|
|
6
|
+
alias: "f",
|
|
7
|
+
default: false,
|
|
8
|
+
description: "Overwrite existing DATABASE_URL in .env",
|
|
9
|
+
type: "boolean"
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
async function handler({ force }) {
|
|
13
|
+
recordTelemetryAttributes({
|
|
14
|
+
command: "setup neon",
|
|
15
|
+
force
|
|
16
|
+
});
|
|
17
|
+
const { handler: handler2 } = await import("./neonHandler.js");
|
|
18
|
+
return handler2({ force });
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
builder,
|
|
22
|
+
command,
|
|
23
|
+
description,
|
|
24
|
+
handler
|
|
25
|
+
};
|
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import execa from "execa";
|
|
4
|
+
import { Listr } from "listr2";
|
|
5
|
+
import { colors, getPaths, installPackages } from "@cedarjs/cli-helpers";
|
|
6
|
+
import { addWorkspacePackages } from "@cedarjs/cli-helpers/packageManager/packages";
|
|
7
|
+
import { errorTelemetry } from "@cedarjs/telemetry";
|
|
8
|
+
const cedarPaths = getPaths();
|
|
9
|
+
async function handler({ force }) {
|
|
10
|
+
const schemaPath = path.join(cedarPaths.api.base, "db", "schema.prisma");
|
|
11
|
+
const dbTsPath = path.join(cedarPaths.api.src, "lib", "db.ts");
|
|
12
|
+
const prismaConfigPathCjs = path.join(
|
|
13
|
+
cedarPaths.api.base,
|
|
14
|
+
"prisma.config.cjs"
|
|
15
|
+
);
|
|
16
|
+
const prismaConfigPathMts = path.join(
|
|
17
|
+
cedarPaths.api.base,
|
|
18
|
+
"prisma.config.mts"
|
|
19
|
+
);
|
|
20
|
+
const envPath = path.join(cedarPaths.base, ".env");
|
|
21
|
+
const rootPkgPath = path.join(cedarPaths.base, "package.json");
|
|
22
|
+
const apiPkgPath = path.join(cedarPaths.api.base, "package.json");
|
|
23
|
+
const dbTsTemplatePath = path.join(
|
|
24
|
+
import.meta.dirname,
|
|
25
|
+
"templates",
|
|
26
|
+
"db.ts.template"
|
|
27
|
+
);
|
|
28
|
+
let hasDirectDatabaseUrl = false;
|
|
29
|
+
if (fs.existsSync(envPath)) {
|
|
30
|
+
hasDirectDatabaseUrl = /^DATABASE_URL=/m.test(
|
|
31
|
+
fs.readFileSync(envPath, "utf-8")
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
const notes = [];
|
|
35
|
+
const tasks = new Listr(
|
|
36
|
+
[
|
|
37
|
+
{
|
|
38
|
+
title: "Checking current database configuration",
|
|
39
|
+
task: (ctx) => {
|
|
40
|
+
const schemaContent = fs.readFileSync(schemaPath, "utf-8");
|
|
41
|
+
ctx.schemaContent = schemaContent;
|
|
42
|
+
ctx.isSqlite = schemaContent.includes('provider = "sqlite"');
|
|
43
|
+
ctx.isPostgres = schemaContent.includes('provider = "postgresql"');
|
|
44
|
+
if (fs.existsSync(dbTsPath)) {
|
|
45
|
+
ctx.dbTsContent = fs.readFileSync(dbTsPath, "utf-8");
|
|
46
|
+
ctx.isNeon = ctx.dbTsContent.includes("PrismaPg");
|
|
47
|
+
} else {
|
|
48
|
+
ctx.isNeon = false;
|
|
49
|
+
}
|
|
50
|
+
if (!ctx.isSqlite && !ctx.isPostgres) {
|
|
51
|
+
ctx.unsupportedProvider = true;
|
|
52
|
+
notes.push(
|
|
53
|
+
colors.note(
|
|
54
|
+
"setup neon only supports migrating from SQLite to PostgreSQL. Your project uses a different database provider."
|
|
55
|
+
)
|
|
56
|
+
);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (!ctx.isPostgres) {
|
|
60
|
+
ctx.hasSqliteUsageOutsideDb = hasSqliteUsageOutsideDb(
|
|
61
|
+
cedarPaths.api.src,
|
|
62
|
+
dbTsPath
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
if (hasDirectDatabaseUrl && !force) {
|
|
66
|
+
ctx.skipWithNote = true;
|
|
67
|
+
notes.push(
|
|
68
|
+
colors.note(
|
|
69
|
+
"DATABASE_URL is already set in .env. Use --force to overwrite."
|
|
70
|
+
)
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
title: "Removing SQLite dependencies from api/package.json",
|
|
77
|
+
skip: (ctx) => {
|
|
78
|
+
if (ctx.unsupportedProvider) {
|
|
79
|
+
return "Unsupported database provider";
|
|
80
|
+
}
|
|
81
|
+
if (ctx.isPostgres) {
|
|
82
|
+
return "Already configured for PostgreSQL";
|
|
83
|
+
}
|
|
84
|
+
if (ctx.hasSqliteUsageOutsideDb) {
|
|
85
|
+
return "SQLite is in use outside db.ts \u2014 keeping packages";
|
|
86
|
+
}
|
|
87
|
+
return false;
|
|
88
|
+
},
|
|
89
|
+
task: () => {
|
|
90
|
+
const pkg = JSON.parse(fs.readFileSync(apiPkgPath, "utf-8"));
|
|
91
|
+
if (pkg.dependencies) {
|
|
92
|
+
delete pkg.dependencies["better-sqlite3"];
|
|
93
|
+
delete pkg.dependencies["@prisma/adapter-better-sqlite3"];
|
|
94
|
+
}
|
|
95
|
+
fs.writeFileSync(apiPkgPath, JSON.stringify(pkg, null, 2) + "\n");
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
title: "Removing better-sqlite3 dependenciesMeta",
|
|
100
|
+
skip: (ctx) => {
|
|
101
|
+
if (ctx.unsupportedProvider) {
|
|
102
|
+
return "Unsupported database provider";
|
|
103
|
+
}
|
|
104
|
+
if (ctx.isPostgres) {
|
|
105
|
+
return "Already configured for PostgreSQL";
|
|
106
|
+
}
|
|
107
|
+
if (ctx.hasSqliteUsageOutsideDb) {
|
|
108
|
+
return "SQLite is in use outside db.ts so we're keeping it installed";
|
|
109
|
+
}
|
|
110
|
+
return false;
|
|
111
|
+
},
|
|
112
|
+
task: () => {
|
|
113
|
+
if (!fs.existsSync(rootPkgPath)) {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
const pkg = JSON.parse(fs.readFileSync(rootPkgPath, "utf-8"));
|
|
117
|
+
if (pkg.dependenciesMeta?.["better-sqlite3"]) {
|
|
118
|
+
delete pkg.dependenciesMeta["better-sqlite3"];
|
|
119
|
+
if (Object.keys(pkg.dependenciesMeta).length === 0) {
|
|
120
|
+
delete pkg.dependenciesMeta;
|
|
121
|
+
}
|
|
122
|
+
fs.writeFileSync(rootPkgPath, JSON.stringify(pkg, null, 2) + "\n");
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
title: "Switching Prisma schema to PostgreSQL",
|
|
128
|
+
skip: (ctx) => {
|
|
129
|
+
if (ctx.unsupportedProvider) {
|
|
130
|
+
return "Unsupported database provider";
|
|
131
|
+
}
|
|
132
|
+
if (ctx.isPostgres) {
|
|
133
|
+
return "Schema is already configured for PostgreSQL";
|
|
134
|
+
}
|
|
135
|
+
return false;
|
|
136
|
+
},
|
|
137
|
+
task: (ctx) => {
|
|
138
|
+
const updated = ctx.schemaContent.replace(
|
|
139
|
+
'provider = "sqlite"',
|
|
140
|
+
'provider = "postgresql"'
|
|
141
|
+
);
|
|
142
|
+
fs.writeFileSync(schemaPath, updated);
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
title: "Updating database adapter",
|
|
147
|
+
skip: (ctx) => {
|
|
148
|
+
if (ctx.unsupportedProvider) {
|
|
149
|
+
return "Unsupported database provider";
|
|
150
|
+
}
|
|
151
|
+
if (ctx.isNeon) {
|
|
152
|
+
return "Database adapter is already configured for Neon (PrismaPg)";
|
|
153
|
+
}
|
|
154
|
+
if (ctx.skipWithNote) {
|
|
155
|
+
return "DATABASE_URL already configured \u2014 skipping adapter update";
|
|
156
|
+
}
|
|
157
|
+
return false;
|
|
158
|
+
},
|
|
159
|
+
task: () => {
|
|
160
|
+
const neonDbTs = fs.readFileSync(dbTsTemplatePath, "utf-8");
|
|
161
|
+
fs.writeFileSync(dbTsPath, neonDbTs);
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
title: "Updating Prisma config",
|
|
166
|
+
skip: (ctx) => {
|
|
167
|
+
if (ctx.unsupportedProvider) {
|
|
168
|
+
return "Unsupported database provider";
|
|
169
|
+
}
|
|
170
|
+
if (ctx.isNeon) {
|
|
171
|
+
return "Prisma config is already configured for Neon";
|
|
172
|
+
}
|
|
173
|
+
if (ctx.skipWithNote) {
|
|
174
|
+
return "DATABASE_URL already configured \u2014 skipping config update";
|
|
175
|
+
}
|
|
176
|
+
return false;
|
|
177
|
+
},
|
|
178
|
+
task: () => {
|
|
179
|
+
if (!fs.existsSync(prismaConfigPathCjs) && !fs.existsSync(prismaConfigPathMts)) {
|
|
180
|
+
throw new Error(
|
|
181
|
+
"No Prisma config file found. Expected prisma.config.cjs or prisma.config.mts in the api directory."
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
const configPath = fs.existsSync(prismaConfigPathCjs) ? prismaConfigPathCjs : prismaConfigPathMts;
|
|
185
|
+
const configContent = fs.readFileSync(configPath, "utf-8");
|
|
186
|
+
const updated = configContent.replace(
|
|
187
|
+
/env\(["']DATABASE_URL["']\)/,
|
|
188
|
+
"env('DIRECT_DATABASE_URL')"
|
|
189
|
+
);
|
|
190
|
+
fs.writeFileSync(configPath, updated);
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
title: "Adding required api packages...",
|
|
195
|
+
skip: (ctx) => ctx.unsupportedProvider,
|
|
196
|
+
task: async () => {
|
|
197
|
+
await addWorkspacePackages("api", ["@prisma/adapter-pg@7.8.0"], {
|
|
198
|
+
cwd: cedarPaths.api.base
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
title: "Provisioning Neon database",
|
|
204
|
+
skip: (ctx) => {
|
|
205
|
+
if (ctx.unsupportedProvider) {
|
|
206
|
+
return true;
|
|
207
|
+
}
|
|
208
|
+
if (hasDirectDatabaseUrl && !force) {
|
|
209
|
+
return true;
|
|
210
|
+
}
|
|
211
|
+
return false;
|
|
212
|
+
},
|
|
213
|
+
task: async (ctx) => {
|
|
214
|
+
const res = await fetch("https://neon.new/api/v1/database", {
|
|
215
|
+
method: "POST",
|
|
216
|
+
headers: { "Content-Type": "application/json" },
|
|
217
|
+
body: JSON.stringify({ ref: "cedarjs" })
|
|
218
|
+
});
|
|
219
|
+
if (!res.ok) {
|
|
220
|
+
throw new Error(`Neon API returned ${res.status} ${res.statusText}`);
|
|
221
|
+
}
|
|
222
|
+
const data = await res.json();
|
|
223
|
+
if (!data.connection_string || !data.expires_at || !data.claim_url) {
|
|
224
|
+
throw new Error(
|
|
225
|
+
"Neon API returned an invalid response\n\n" + JSON.stringify(data, null, 2)
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
ctx.databaseUrl = data.connection_string;
|
|
229
|
+
ctx.databaseUrlDirect = data.connection_string.replace(
|
|
230
|
+
"-pooler.",
|
|
231
|
+
"."
|
|
232
|
+
);
|
|
233
|
+
if (ctx.databaseUrlDirect === ctx.databaseUrl) {
|
|
234
|
+
throw new Error(
|
|
235
|
+
'Could not derive a direct (non-pooler) connection string from the Neon response. Expected the connection string to contain "-pooler." in the hostname.'
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
ctx.neonClaimUrl = data.claim_url;
|
|
239
|
+
ctx.neonClaimExpiry = new Date(data.expires_at).toUTCString();
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
title: "Writing database connection to .env",
|
|
244
|
+
skip: (ctx) => {
|
|
245
|
+
if (ctx.unsupportedProvider) {
|
|
246
|
+
return true;
|
|
247
|
+
}
|
|
248
|
+
if (hasDirectDatabaseUrl && !force) {
|
|
249
|
+
return true;
|
|
250
|
+
}
|
|
251
|
+
if (!ctx.databaseUrl) {
|
|
252
|
+
return "No database URL to write (Neon provisioning skipped)";
|
|
253
|
+
}
|
|
254
|
+
return false;
|
|
255
|
+
},
|
|
256
|
+
task: (ctx) => {
|
|
257
|
+
let envContent = "";
|
|
258
|
+
if (fs.existsSync(envPath)) {
|
|
259
|
+
envContent = fs.readFileSync(envPath, "utf-8");
|
|
260
|
+
if (force) {
|
|
261
|
+
const lines = envContent.split("\n");
|
|
262
|
+
const filtered = lines.filter(
|
|
263
|
+
(line) => !line.startsWith("DATABASE_URL=") && !line.startsWith("DIRECT_DATABASE_URL=")
|
|
264
|
+
);
|
|
265
|
+
envContent = filtered.join("\n").trimEnd();
|
|
266
|
+
}
|
|
267
|
+
if (envContent && !envContent.endsWith("\n")) {
|
|
268
|
+
envContent += "\n";
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
envContent += `DATABASE_URL=${ctx.databaseUrl}
|
|
272
|
+
`;
|
|
273
|
+
envContent += `DIRECT_DATABASE_URL=${ctx.databaseUrlDirect}
|
|
274
|
+
`;
|
|
275
|
+
fs.writeFileSync(envPath, envContent);
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
installPackages,
|
|
279
|
+
{
|
|
280
|
+
title: "Running Prisma migrations",
|
|
281
|
+
skip: (ctx) => {
|
|
282
|
+
if (ctx.unsupportedProvider) {
|
|
283
|
+
return true;
|
|
284
|
+
}
|
|
285
|
+
if (ctx.skipWithNote) {
|
|
286
|
+
return "DATABASE_URL already configured \u2014 skipping migration";
|
|
287
|
+
}
|
|
288
|
+
if (!ctx.databaseUrl) {
|
|
289
|
+
return "No database provisioned \u2014 skipping migration";
|
|
290
|
+
}
|
|
291
|
+
return false;
|
|
292
|
+
},
|
|
293
|
+
task: (ctx) => {
|
|
294
|
+
const result = execa.commandSync(
|
|
295
|
+
"yarn cedar prisma migrate dev --name init-neon",
|
|
296
|
+
{
|
|
297
|
+
cwd: cedarPaths.base,
|
|
298
|
+
stdio: ["inherit", "inherit", "pipe"],
|
|
299
|
+
reject: false,
|
|
300
|
+
env: {
|
|
301
|
+
...process.env,
|
|
302
|
+
DIRECT_DATABASE_URL: ctx.databaseUrlDirect
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
);
|
|
306
|
+
if (result.exitCode !== 0) {
|
|
307
|
+
throw new Error(
|
|
308
|
+
"Prisma migration failed:\n\n" + result.stderr + "\n\nYou can try running it manually:\n yarn cedar prisma migrate dev --name init-neon"
|
|
309
|
+
);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
title: "One more thing...",
|
|
315
|
+
task: (ctx, task) => {
|
|
316
|
+
if (ctx.unsupportedProvider) {
|
|
317
|
+
task.output = "Skipped \u2014 unsupported database provider";
|
|
318
|
+
return;
|
|
319
|
+
}
|
|
320
|
+
if (ctx.skipWithNote) {
|
|
321
|
+
task.output = "Skipped \u2014 DATABASE_URL already configured";
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
324
|
+
const claimMsg = [
|
|
325
|
+
colors.important(
|
|
326
|
+
"Your Neon database has been created and is ready to use!"
|
|
327
|
+
),
|
|
328
|
+
"",
|
|
329
|
+
`Claim URL: ${colors.underline(ctx.neonClaimUrl || "N/A")}`,
|
|
330
|
+
`Expires: ${ctx.neonClaimExpiry || "N/A"}`,
|
|
331
|
+
"",
|
|
332
|
+
"Claim your database to keep it beyond the expiration date."
|
|
333
|
+
];
|
|
334
|
+
notes.push(...claimMsg);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
],
|
|
338
|
+
{
|
|
339
|
+
exitOnError: false
|
|
340
|
+
}
|
|
341
|
+
);
|
|
342
|
+
try {
|
|
343
|
+
await tasks.run();
|
|
344
|
+
if (notes.length > 0) {
|
|
345
|
+
console.log();
|
|
346
|
+
console.log(notes.join("\n"));
|
|
347
|
+
}
|
|
348
|
+
} catch (e) {
|
|
349
|
+
if (isErrorWithMessage(e)) {
|
|
350
|
+
errorTelemetry(process.argv, e.message);
|
|
351
|
+
console.error(colors.error(e.message));
|
|
352
|
+
}
|
|
353
|
+
if (isErrorWithExitCode(e)) {
|
|
354
|
+
process.exit(e.exitCode);
|
|
355
|
+
}
|
|
356
|
+
process.exit(1);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
function isErrorWithMessage(e) {
|
|
360
|
+
return !!e && typeof e === "object" && "message" in e;
|
|
361
|
+
}
|
|
362
|
+
function isErrorWithExitCode(e) {
|
|
363
|
+
return !!e && typeof e === "object" && "exitCode" in e && typeof e.exitCode === "number";
|
|
364
|
+
}
|
|
365
|
+
function hasSqliteUsageOutsideDb(srcPath, dbTsPath) {
|
|
366
|
+
const sqlitePattern = /better-sqlite3|@prisma\/adapter-better-sqlite3/;
|
|
367
|
+
const files = fs.globSync("**/*.{ts,tsx,js,jsx}", { cwd: srcPath });
|
|
368
|
+
for (const file of files) {
|
|
369
|
+
const fullPath = path.join(srcPath, file);
|
|
370
|
+
if (fullPath === dbTsPath) {
|
|
371
|
+
continue;
|
|
372
|
+
}
|
|
373
|
+
try {
|
|
374
|
+
const content = fs.readFileSync(fullPath, "utf-8");
|
|
375
|
+
if (sqlitePattern.test(content)) {
|
|
376
|
+
return true;
|
|
377
|
+
}
|
|
378
|
+
} catch {
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
return false;
|
|
382
|
+
}
|
|
383
|
+
export {
|
|
384
|
+
handler
|
|
385
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { PrismaPg } from '@prisma/adapter-pg'
|
|
2
|
+
import { PrismaClient } from 'api/db/generated/prisma/client.mts'
|
|
3
|
+
|
|
4
|
+
import { emitLogLevels, handlePrismaLogging } from '@cedarjs/api/logger'
|
|
5
|
+
|
|
6
|
+
import { logger } from './logger.js'
|
|
7
|
+
|
|
8
|
+
export * from 'api/db/generated/prisma/client.mts'
|
|
9
|
+
|
|
10
|
+
if (!process.env.DATABASE_URL) {
|
|
11
|
+
throw new Error('DATABASE_URL environment variable is not set')
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL })
|
|
15
|
+
const prismaClient = new PrismaClient({
|
|
16
|
+
log: emitLogLevels(['info', 'warn', 'error']),
|
|
17
|
+
adapter,
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
handlePrismaLogging({
|
|
21
|
+
db: prismaClient,
|
|
22
|
+
logger,
|
|
23
|
+
logLevels: ['info', 'warn', 'error'],
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Global Prisma client extensions should be added here, as $extend
|
|
28
|
+
* returns a new instance.
|
|
29
|
+
* export const db = prismaClient.$extend(...)
|
|
30
|
+
* Add any .$on hooks before using $extend
|
|
31
|
+
*/
|
|
32
|
+
export const db = prismaClient
|
package/dist/commands/setup.js
CHANGED
|
@@ -11,6 +11,7 @@ import * as setupJobs from "./setup/jobs/jobs.js";
|
|
|
11
11
|
import * as setupMailer from "./setup/mailer/mailer.js";
|
|
12
12
|
import * as setupMiddleware from "./setup/middleware/middleware.js";
|
|
13
13
|
import * as setupMonitoring from "./setup/monitoring/monitoring.js";
|
|
14
|
+
import * as setupNeon from "./setup/neon/neon.js";
|
|
14
15
|
import * as setupPackage from "./setup/package/package.js";
|
|
15
16
|
import * as setupRealtime from "./setup/realtime/realtime.js";
|
|
16
17
|
import * as setupServerFile from "./setup/server-file/serverFile.js";
|
|
@@ -20,7 +21,7 @@ import * as setupUploads from "./setup/uploads/uploads.js";
|
|
|
20
21
|
import * as setupVite from "./setup/vite/vite.js";
|
|
21
22
|
const command = "setup <command>";
|
|
22
23
|
const description = "Initialize project config and install packages";
|
|
23
|
-
const builder = (yargs) => yargs.command(setupAuth).command(setupCache).command(setupDeploy).command(setupDocker).command(setupGenerator).command(setupGraphql).command(setupI18n).command(setupJobs).command(setupMailer).command(setupMiddleware).command(setupMonitoring).command(setupPackage).command(setupRealtime).command(setupServerFile).command(setupTsconfig).command(setupUi).command(setupUploads).command(setupVite).demandCommand().middleware(detectCedarVersion).epilogue(
|
|
24
|
+
const builder = (yargs) => yargs.command(setupAuth).command(setupCache).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(setupTsconfig).command(setupUi).command(setupUploads).command(setupVite).demandCommand().middleware(detectCedarVersion).epilogue(
|
|
24
25
|
`Also see the ${terminalLink(
|
|
25
26
|
"CedarJS CLI Reference",
|
|
26
27
|
"https://cedarjs.com/docs/cli-commands#setup"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/cli",
|
|
3
|
-
"version": "5.0.0-canary.
|
|
3
|
+
"version": "5.0.0-canary.2328",
|
|
4
4
|
"description": "The CedarJS Command Line",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/parser": "7.29.3",
|
|
35
35
|
"@babel/preset-typescript": "7.28.5",
|
|
36
|
-
"@cedarjs/api-server": "5.0.0-canary.
|
|
37
|
-
"@cedarjs/cli-helpers": "5.0.0-canary.
|
|
38
|
-
"@cedarjs/fastify-web": "5.0.0-canary.
|
|
39
|
-
"@cedarjs/internal": "5.0.0-canary.
|
|
40
|
-
"@cedarjs/prerender": "5.0.0-canary.
|
|
41
|
-
"@cedarjs/project-config": "5.0.0-canary.
|
|
42
|
-
"@cedarjs/structure": "5.0.0-canary.
|
|
43
|
-
"@cedarjs/telemetry": "5.0.0-canary.
|
|
44
|
-
"@cedarjs/utils": "5.0.0-canary.
|
|
45
|
-
"@cedarjs/vite": "5.0.0-canary.
|
|
46
|
-
"@cedarjs/web-server": "5.0.0-canary.
|
|
36
|
+
"@cedarjs/api-server": "5.0.0-canary.2328",
|
|
37
|
+
"@cedarjs/cli-helpers": "5.0.0-canary.2328",
|
|
38
|
+
"@cedarjs/fastify-web": "5.0.0-canary.2328",
|
|
39
|
+
"@cedarjs/internal": "5.0.0-canary.2328",
|
|
40
|
+
"@cedarjs/prerender": "5.0.0-canary.2328",
|
|
41
|
+
"@cedarjs/project-config": "5.0.0-canary.2328",
|
|
42
|
+
"@cedarjs/structure": "5.0.0-canary.2328",
|
|
43
|
+
"@cedarjs/telemetry": "5.0.0-canary.2328",
|
|
44
|
+
"@cedarjs/utils": "5.0.0-canary.2328",
|
|
45
|
+
"@cedarjs/vite": "5.0.0-canary.2328",
|
|
46
|
+
"@cedarjs/web-server": "5.0.0-canary.2328",
|
|
47
47
|
"@listr2/prompt-adapter-enquirer": "4.2.1",
|
|
48
48
|
"@opentelemetry/api": "1.9.0",
|
|
49
49
|
"@opentelemetry/core": "1.30.1",
|