@aventara/cli 1.0.0-rc.4 → 1.0.0-rc.9
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/CHANGELOG.md +53 -0
- package/README.md +41 -3
- package/dist/catalog/host-entry.interface.js +10 -0
- package/dist/catalog/host.catalog.generated.js +32 -0
- package/dist/command/command.parser.js +55 -3
- package/dist/plan/host-plan.interface.js +1 -0
- package/dist/plan/nest-host.planner.js +131 -0
- package/dist/plan/next-host.planner.js +133 -0
- package/dist/plan/project.planner.js +81 -166
- package/dist/project/project.inspector.js +52 -13
- package/dist/run/command.runner.js +37 -19
- package/dist/run/init.orchestrator.js +46 -29
- package/dist/run/new.orchestrator.js +100 -25
- package/dist/skill/agent-skill.generated.js +2 -2
- package/dist/templates/next-server.entry.js +5 -0
- package/dist/templates/prisma7/prisma7-nest.templates.js +242 -0
- package/dist/templates/prisma7/prisma7-next.templates.js +182 -0
- package/dist/templates/prisma7/prisma7-orm.templates.js +180 -0
- package/dist/templates/prisma7/prisma7.templates.js +7 -411
- package/package.json +2 -2
|
@@ -1,416 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { EXPOSURE_DOCS } from "../docs.links.js";
|
|
5
|
-
import { SCAFFOLD_API, } from "../template.registry.js";
|
|
6
|
-
const CLIENT_OUTPUT = "src/generated/prisma";
|
|
7
|
-
const SCHEMA = "prisma/schema.prisma";
|
|
8
|
-
const CONFIG_FILE = "src/aventara.config.ts";
|
|
9
|
-
const ADAPTER_FILE = "src/aventara.adapter.ts";
|
|
10
|
-
function resourcesTreeBeside(artifact) {
|
|
11
|
-
return `${path.posix.dirname(artifact)}/resources.generated`;
|
|
12
|
-
}
|
|
13
|
-
const CONFIG_FILES = ["prisma7.config.ts", "prisma.config.ts"];
|
|
14
|
-
const DRIVER_PREFIX = "@prisma/adapter-";
|
|
15
|
-
const NEW_SERVICE = {
|
|
16
|
-
file: "src/prisma.service.ts",
|
|
17
|
-
exportName: "PrismaService",
|
|
18
|
-
};
|
|
19
|
-
const NEW_MODULE = {
|
|
20
|
-
file: "src/prisma.service.ts",
|
|
21
|
-
exportName: "PrismaModule",
|
|
22
|
-
};
|
|
23
|
-
const PROVIDERS = {
|
|
24
|
-
sqlite: {
|
|
25
|
-
driverClass: "PrismaBetterSqlite3",
|
|
26
|
-
driverOptions: "{ url }",
|
|
27
|
-
databaseUrl: "file:./dev.db",
|
|
28
|
-
gitignore: ["/dev.db*"],
|
|
29
|
-
nativeBuilds: ["@prisma/engines", "better-sqlite3", "prisma"],
|
|
30
|
-
},
|
|
31
|
-
postgresql: {
|
|
32
|
-
driverClass: "PrismaPg",
|
|
33
|
-
driverOptions: "{ connectionString: url }",
|
|
34
|
-
databaseUrl: "postgresql://johndoe:randompassword@localhost:5432/mydb?schema=public",
|
|
35
|
-
gitignore: [],
|
|
36
|
-
nativeBuilds: ["@prisma/engines", "prisma"],
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
function specifier(from, to, js) {
|
|
40
|
-
const relative = path.posix.relative(path.posix.dirname(from), to);
|
|
41
|
-
return `${relative.startsWith(".") ? relative : `./${relative}`}${js}`;
|
|
42
|
-
}
|
|
43
|
-
function schema(input) {
|
|
44
|
-
return [
|
|
45
|
-
"generator client {",
|
|
46
|
-
` provider = "${input.entry.generators[0]}"`,
|
|
47
|
-
` output = "../${CLIENT_OUTPUT}"`,
|
|
48
|
-
...(input.moduleKind === "cjs" ? [' moduleFormat = "cjs"'] : []),
|
|
49
|
-
"}",
|
|
50
|
-
"",
|
|
51
|
-
"datasource db {",
|
|
52
|
-
` provider = "${input.provider}"`,
|
|
53
|
-
"}",
|
|
54
|
-
"",
|
|
55
|
-
"model User {",
|
|
56
|
-
" id Int @id @default(autoincrement())",
|
|
57
|
-
" email String @unique",
|
|
58
|
-
" name String?",
|
|
59
|
-
"}",
|
|
60
|
-
"",
|
|
61
|
-
].join("\n");
|
|
62
|
-
}
|
|
63
|
-
function prismaConfig() {
|
|
64
|
-
return [
|
|
65
|
-
"import { existsSync } from 'node:fs';",
|
|
66
|
-
"import { defineConfig } from 'prisma/config';",
|
|
67
|
-
"",
|
|
68
|
-
"// Prisma reads DATABASE_URL from the environment and does not load .env itself.",
|
|
69
|
-
"if (existsSync('.env')) {",
|
|
70
|
-
" process.loadEnvFile('.env');",
|
|
71
|
-
"}",
|
|
72
|
-
"",
|
|
73
|
-
"export default defineConfig({",
|
|
74
|
-
` schema: '${SCHEMA}',`,
|
|
75
|
-
" migrations: {",
|
|
76
|
-
" path: 'prisma/migrations',",
|
|
77
|
-
" },",
|
|
78
|
-
" datasource: {",
|
|
79
|
-
" url: process.env.DATABASE_URL,",
|
|
80
|
-
" },",
|
|
81
|
-
"});",
|
|
82
|
-
"",
|
|
83
|
-
].join("\n");
|
|
84
|
-
}
|
|
85
|
-
function prismaService(input) {
|
|
86
|
-
const provider = PROVIDERS[input.provider];
|
|
87
|
-
const driver = input.entry.drivers[input.provider];
|
|
88
|
-
return [
|
|
89
|
-
"import { Injectable, Module, type OnModuleDestroy } from '@nestjs/common';",
|
|
90
|
-
`import { ${provider.driverClass} } from '${driver}';`,
|
|
91
|
-
`import { PrismaClient } from '${specifier(NEW_SERVICE.file, `${input.clientOutput}/client`, input.js)}';`,
|
|
92
|
-
"",
|
|
93
|
-
"@Injectable()",
|
|
94
|
-
"export class PrismaService extends PrismaClient implements OnModuleDestroy {",
|
|
95
|
-
" constructor() {",
|
|
96
|
-
" const url = process.env.DATABASE_URL;",
|
|
97
|
-
" if (!url) {",
|
|
98
|
-
" // Thrown while Nest builds the application, before it listens.",
|
|
99
|
-
" throw new Error(",
|
|
100
|
-
" 'DATABASE_URL is not set: put it in .env (the start scripts load it) or in the environment.',",
|
|
101
|
-
" );",
|
|
102
|
-
" }",
|
|
103
|
-
` super({ adapter: new ${provider.driverClass}(${provider.driverOptions}) });`,
|
|
104
|
-
" }",
|
|
105
|
-
"",
|
|
106
|
-
" async onModuleDestroy(): Promise<void> {",
|
|
107
|
-
" await this.$disconnect();",
|
|
108
|
-
" }",
|
|
109
|
-
"}",
|
|
110
|
-
"",
|
|
111
|
-
"@Module({ providers: [PrismaService], exports: [PrismaService] })",
|
|
112
|
-
"export class PrismaModule {}",
|
|
113
|
-
"",
|
|
114
|
-
].join("\n");
|
|
115
|
-
}
|
|
116
|
-
function aventaraConfig(js, artifact) {
|
|
117
|
-
return [
|
|
118
|
-
"import type { AvDiagnostic } from '@aventara/core';",
|
|
119
|
-
"import { Logger } from '@nestjs/common';",
|
|
120
|
-
`import { aventaraResources } from '${specifier(CONFIG_FILE, resourcesTreeBeside(artifact), js)}';`,
|
|
121
|
-
"",
|
|
122
|
-
"const logger = new Logger('Aventara');",
|
|
123
|
-
"",
|
|
124
|
-
"/**",
|
|
125
|
-
" * Aventara's configuration: where the API is mounted (`api`), and what you add",
|
|
126
|
-
" * to it (`exposed` and `exemptions`, `pipelines`, and the per-Resource",
|
|
127
|
-
" * `resources` tree).",
|
|
128
|
-
" * AventaraModule (app.module.ts) builds the framework from it and the adapter",
|
|
129
|
-
" * (src/aventara.adapter.ts). aventara-build, in the aventara:prepare script,",
|
|
130
|
-
" * runs this file to compile its Contracts, so keep its top level free of side",
|
|
131
|
-
" * effects: no connection, no request.",
|
|
132
|
-
" */",
|
|
133
|
-
"export const aventaraConfig = {",
|
|
134
|
-
` api: '${SCAFFOLD_API}',`,
|
|
135
|
-
" // Everything the adapter offers is exposed. List what to hide under",
|
|
136
|
-
" // `exemptions`, or set `exposed: false` and list what to expose instead.",
|
|
137
|
-
` // See: ${EXPOSURE_DOCS}`,
|
|
138
|
-
" exposed: true,",
|
|
139
|
-
" // Every Resource you define with defineResource() in its own file under",
|
|
140
|
-
" // src/resources/ (named <name>.resource.ts), gathered by aventara-build in",
|
|
141
|
-
" // the aventara:prepare script: a new Resource file needs no line here. When",
|
|
142
|
-
" // a Resource gives a layer a block, that layer takes its tree once, e.g.",
|
|
143
|
-
" // client: { resources: aventaraResources.client },",
|
|
144
|
-
" resources: aventaraResources.root,",
|
|
145
|
-
" // When something fails inside the server, the caller gets a plain 500 and",
|
|
146
|
-
" // Aventara logs one line naming the request. This logs the error itself,",
|
|
147
|
-
" // with its stack, through Nest's logger.",
|
|
148
|
-
" diagnostics: (diagnostic: AvDiagnostic) => {",
|
|
149
|
-
" const { error } = diagnostic;",
|
|
150
|
-
" logger.error(",
|
|
151
|
-
` \`\${diagnostic.code} (request \${diagnostic.requestId}): raw error\`,`,
|
|
152
|
-
" error instanceof Error ? error.stack : String(error),",
|
|
153
|
-
" );",
|
|
154
|
-
" },",
|
|
155
|
-
"} as const;",
|
|
156
|
-
"",
|
|
157
|
-
].join("\n");
|
|
158
|
-
}
|
|
159
|
-
function aventaraAdapter(input) {
|
|
160
|
-
return [
|
|
161
|
-
`import { describePrismaAdapter } from '${input.entry.adapterPackage}';`,
|
|
162
|
-
`import { discovery } from '${specifier(ADAPTER_FILE, input.artifact.replace(/\.ts$/, ""), input.js)}';`,
|
|
163
|
-
"",
|
|
164
|
-
"/**",
|
|
165
|
-
" * The Prisma adapter's description: your schema's model, as the aventara:prepare",
|
|
166
|
-
" * script discovered it (`discovery`), and the database it runs on. aventara-build",
|
|
167
|
-
" * compiles the Contracts from it; app.module.ts builds the adapter from it with",
|
|
168
|
-
" * the Prisma client.",
|
|
169
|
-
" */",
|
|
170
|
-
"export default describePrismaAdapter({",
|
|
171
|
-
" discovery,",
|
|
172
|
-
` provider: '${input.provider}',`,
|
|
173
|
-
` driver: '${input.entry.drivers[input.provider]}',`,
|
|
174
|
-
"});",
|
|
175
|
-
"",
|
|
176
|
-
].join("\n");
|
|
177
|
-
}
|
|
178
|
-
function prepare(input) {
|
|
179
|
-
return [
|
|
180
|
-
input.entry.bin,
|
|
181
|
-
`--schema ${input.schema}`,
|
|
182
|
-
`--client ${input.clientOutput}`,
|
|
183
|
-
`--provider ${input.provider}`,
|
|
184
|
-
`--driver ${input.entry.drivers[input.provider]}`,
|
|
185
|
-
`--out ${input.artifact}`,
|
|
186
|
-
`--config ${CONFIG_FILE}`,
|
|
187
|
-
].join(" ");
|
|
188
|
-
}
|
|
189
|
-
function appModule(service, module, adapterPackage, js) {
|
|
190
|
-
const from = "src/app.module.ts";
|
|
191
|
-
const sameFile = service.file === module.file;
|
|
192
|
-
return {
|
|
193
|
-
imports: [
|
|
194
|
-
`import { createPrismaAdapter } from '${adapterPackage}';`,
|
|
195
|
-
`import adapter from '${specifier(from, ADAPTER_FILE.replace(/\.ts$/, ""), js)}';`,
|
|
196
|
-
`import { aventaraConfig } from '${specifier(from, CONFIG_FILE.replace(/\.ts$/, ""), js)}';`,
|
|
197
|
-
...(sameFile
|
|
198
|
-
? [
|
|
199
|
-
`import { ${module.exportName}, ${service.exportName} } from '${specifier(from, service.file.replace(/\.ts$/, ""), js)}';`,
|
|
200
|
-
]
|
|
201
|
-
: [
|
|
202
|
-
`import { ${module.exportName} } from '${specifier(from, module.file.replace(/\.ts$/, ""), js)}';`,
|
|
203
|
-
`import { ${service.exportName} } from '${specifier(from, service.file.replace(/\.ts$/, ""), js)}';`,
|
|
204
|
-
]),
|
|
205
|
-
],
|
|
206
|
-
entries: [
|
|
207
|
-
`${module.exportName},`,
|
|
208
|
-
[
|
|
209
|
-
"AventaraModule.forRootAsync({",
|
|
210
|
-
` imports: [${module.exportName}],`,
|
|
211
|
-
` inject: [${service.exportName}],`,
|
|
212
|
-
` useFactory: async (prisma: ${service.exportName}) => ({`,
|
|
213
|
-
" config: {",
|
|
214
|
-
" ...aventaraConfig,",
|
|
215
|
-
" adapter: await createPrismaAdapter({",
|
|
216
|
-
" ...adapter,",
|
|
217
|
-
service.clientMember === undefined
|
|
218
|
-
? " client: prisma,"
|
|
219
|
-
: ` client: prisma.${service.clientMember},`,
|
|
220
|
-
" }),",
|
|
221
|
-
" },",
|
|
222
|
-
" }),",
|
|
223
|
-
"}),",
|
|
224
|
-
].join("\n"),
|
|
225
|
-
],
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
function scaffold(input) {
|
|
229
|
-
const js = input.moduleKind === "esm" ? ".js" : "";
|
|
230
|
-
const floor = lowestVersionOf(input.entry.range);
|
|
231
|
-
const provider = PROVIDERS[input.provider];
|
|
232
|
-
const driver = input.entry.drivers[input.provider];
|
|
233
|
-
const run = input.packageManager === "pnpm" ? "pnpm exec" : "npx";
|
|
234
|
-
const artifact = "src/generated/aventara/discovery.artifact.ts";
|
|
235
|
-
return {
|
|
236
|
-
files: [
|
|
237
|
-
{ path: SCHEMA, content: schema(input) },
|
|
238
|
-
{ path: "prisma.config.ts", content: prismaConfig() },
|
|
239
|
-
{
|
|
240
|
-
path: NEW_SERVICE.file,
|
|
241
|
-
content: prismaService({ ...input, clientOutput: CLIENT_OUTPUT, js }),
|
|
242
|
-
},
|
|
243
|
-
{ path: CONFIG_FILE, content: aventaraConfig(js, artifact) },
|
|
244
|
-
{
|
|
245
|
-
path: ADAPTER_FILE,
|
|
246
|
-
content: aventaraAdapter({ ...input, artifact, js }),
|
|
247
|
-
},
|
|
248
|
-
],
|
|
249
|
-
env: { DATABASE_URL: provider.databaseUrl },
|
|
250
|
-
gitignore: ["/src/generated/", ...provider.gitignore],
|
|
251
|
-
dependencies: { [input.entry.orm.package]: floor, [driver]: floor },
|
|
252
|
-
devDependencies: { prisma: floor },
|
|
253
|
-
prepare: prepare({
|
|
254
|
-
...input,
|
|
255
|
-
schema: SCHEMA,
|
|
256
|
-
clientOutput: CLIENT_OUTPUT,
|
|
257
|
-
artifact,
|
|
258
|
-
}),
|
|
259
|
-
appModule: appModule(NEW_SERVICE, NEW_MODULE, input.entry.adapterPackage, js),
|
|
260
|
-
nativeBuilds: provider.nativeBuilds,
|
|
261
|
-
nextSteps: [
|
|
262
|
-
...(input.provider === "postgresql"
|
|
263
|
-
? ["Set DATABASE_URL in .env to your PostgreSQL database."]
|
|
264
|
-
: []),
|
|
265
|
-
`Create the database tables: ${run} prisma db push`,
|
|
266
|
-
],
|
|
267
|
-
};
|
|
268
|
-
}
|
|
269
|
-
function reuse(input) {
|
|
270
|
-
const js = input.moduleKind === "esm" ? ".js" : "";
|
|
271
|
-
const { facts } = input;
|
|
272
|
-
return {
|
|
273
|
-
files: [
|
|
274
|
-
...(input.writeService
|
|
275
|
-
? [
|
|
276
|
-
{
|
|
277
|
-
path: NEW_SERVICE.file,
|
|
278
|
-
content: prismaService({
|
|
279
|
-
entry: input.entry,
|
|
280
|
-
provider: facts.provider,
|
|
281
|
-
clientOutput: facts.clientOutput,
|
|
282
|
-
js,
|
|
283
|
-
}),
|
|
284
|
-
},
|
|
285
|
-
]
|
|
286
|
-
: []),
|
|
287
|
-
{ path: CONFIG_FILE, content: aventaraConfig(js, input.artifact) },
|
|
288
|
-
{
|
|
289
|
-
path: ADAPTER_FILE,
|
|
290
|
-
content: aventaraAdapter({
|
|
291
|
-
entry: input.entry,
|
|
292
|
-
provider: facts.provider,
|
|
293
|
-
artifact: input.artifact,
|
|
294
|
-
js,
|
|
295
|
-
}),
|
|
296
|
-
},
|
|
297
|
-
],
|
|
298
|
-
env: {},
|
|
299
|
-
gitignore: [`/${path.posix.dirname(input.artifact)}/`],
|
|
300
|
-
dependencies: {},
|
|
301
|
-
devDependencies: {},
|
|
302
|
-
prepare: prepare({
|
|
303
|
-
entry: input.entry,
|
|
304
|
-
schema: facts.schema,
|
|
305
|
-
clientOutput: facts.clientOutput,
|
|
306
|
-
provider: facts.provider,
|
|
307
|
-
artifact: input.artifact,
|
|
308
|
-
}),
|
|
309
|
-
appModule: appModule(input.service, input.module, input.entry.adapterPackage, js),
|
|
310
|
-
nativeBuilds: [],
|
|
311
|
-
nextSteps: [],
|
|
312
|
-
};
|
|
313
|
-
}
|
|
314
|
-
function schemaLocation(directory, manifest) {
|
|
315
|
-
for (const config of CONFIG_FILES) {
|
|
316
|
-
const file = path.join(directory, config);
|
|
317
|
-
if (existsSync(file)) {
|
|
318
|
-
const declared = /\bschema\s*:\s*['"]([^'"]+)['"]/.exec(readFileSync(file, "utf8"))?.[1];
|
|
319
|
-
if (declared !== undefined) {
|
|
320
|
-
return path.posix.normalize(declared);
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
const prisma = manifest.prisma;
|
|
325
|
-
return typeof prisma?.schema === "string"
|
|
326
|
-
? path.posix.normalize(prisma.schema)
|
|
327
|
-
: SCHEMA;
|
|
328
|
-
}
|
|
329
|
-
function schemaFiles(directory, schemaPath) {
|
|
330
|
-
const full = path.join(directory, schemaPath);
|
|
331
|
-
if (!existsSync(full)) {
|
|
332
|
-
return [];
|
|
333
|
-
}
|
|
334
|
-
if (!statSync(full).isDirectory()) {
|
|
335
|
-
return [schemaPath];
|
|
336
|
-
}
|
|
337
|
-
return readdirSync(full, { recursive: true, withFileTypes: true })
|
|
338
|
-
.filter((entry) => entry.isFile() && entry.name.endsWith(".prisma"))
|
|
339
|
-
.map((entry) => path
|
|
340
|
-
.relative(directory, path.join(entry.parentPath, entry.name))
|
|
341
|
-
.split(path.sep)
|
|
342
|
-
.join("/"))
|
|
343
|
-
.sort();
|
|
344
|
-
}
|
|
345
|
-
function blocks(text, kind) {
|
|
346
|
-
return [
|
|
347
|
-
...text.matchAll(new RegExp(`^\\s*${kind}\\s+\\w+\\s*\\{([^}]*)\\}`, "gm")),
|
|
348
|
-
].map((match) => match[1]);
|
|
349
|
-
}
|
|
350
|
-
function setting(block, name) {
|
|
351
|
-
return new RegExp(`^\\s*${name}\\s*=\\s*"([^"]*)"`, "m").exec(block)?.[1];
|
|
352
|
-
}
|
|
353
|
-
function readProject(directory, manifest) {
|
|
354
|
-
const schemaPath = schemaLocation(directory, manifest);
|
|
355
|
-
let provider;
|
|
356
|
-
let generator;
|
|
357
|
-
let clientOutput;
|
|
358
|
-
for (const file of schemaFiles(directory, schemaPath)) {
|
|
359
|
-
const text = readFileSync(path.join(directory, file), "utf8").replace(/\/\/.*$/gm, "");
|
|
360
|
-
provider ??= blocks(text, "datasource")
|
|
361
|
-
.map((block) => setting(block, "provider"))
|
|
362
|
-
.find((value) => value !== undefined);
|
|
363
|
-
for (const block of blocks(text, "generator")) {
|
|
364
|
-
const declared = setting(block, "provider");
|
|
365
|
-
const output = setting(block, "output");
|
|
366
|
-
if (generator === undefined || /^prisma-client/.test(declared ?? "")) {
|
|
367
|
-
generator = declared;
|
|
368
|
-
clientOutput =
|
|
369
|
-
output === undefined
|
|
370
|
-
? undefined
|
|
371
|
-
: path.posix.normalize(path.posix.join(path.posix.dirname(file), output));
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
const dependencies = [
|
|
376
|
-
...Object.keys(manifest.dependencies ?? {}),
|
|
377
|
-
...Object.keys(manifest.devDependencies ?? {}),
|
|
378
|
-
];
|
|
379
|
-
return {
|
|
380
|
-
schema: schemaPath,
|
|
381
|
-
provider,
|
|
382
|
-
generator,
|
|
383
|
-
clientOutput,
|
|
384
|
-
drivers: dependencies.filter((name) => name.startsWith(DRIVER_PREFIX)),
|
|
385
|
-
};
|
|
386
|
-
}
|
|
387
|
-
function clientShape(facts) {
|
|
388
|
-
return {
|
|
389
|
-
clientClass: "PrismaClient",
|
|
390
|
-
importsClient: (imported, file) => {
|
|
391
|
-
if (!imported.startsWith(".")) {
|
|
392
|
-
return imported === "@prisma/client";
|
|
393
|
-
}
|
|
394
|
-
if (facts.clientOutput === undefined) {
|
|
395
|
-
return false;
|
|
396
|
-
}
|
|
397
|
-
const resolved = path.posix
|
|
398
|
-
.join(path.posix.dirname(file), imported)
|
|
399
|
-
.replace(/\.(js|ts)$/, "");
|
|
400
|
-
return (resolved === facts.clientOutput ||
|
|
401
|
-
resolved === `${facts.clientOutput}/client` ||
|
|
402
|
-
resolved === `${facts.clientOutput}/index`);
|
|
403
|
-
},
|
|
404
|
-
skip: facts.clientOutput === undefined
|
|
405
|
-
? ["src/generated"]
|
|
406
|
-
: ["src/generated", facts.clientOutput],
|
|
407
|
-
};
|
|
408
|
-
}
|
|
1
|
+
import { PRISMA7_NEST_TEMPLATES } from "./prisma7-nest.templates.js";
|
|
2
|
+
import { PRISMA7_NEXT_TEMPLATES } from "./prisma7-next.templates.js";
|
|
3
|
+
import { clientShape, PROVIDERS, readProject, } from "./prisma7-orm.templates.js";
|
|
409
4
|
export const PRISMA7_TEMPLATES = {
|
|
410
5
|
providers: PROVIDERS,
|
|
411
|
-
scaffold,
|
|
412
6
|
readProject,
|
|
413
7
|
clientShape,
|
|
414
|
-
|
|
415
|
-
|
|
8
|
+
hosts: {
|
|
9
|
+
nest: PRISMA7_NEST_TEMPLATES,
|
|
10
|
+
next: PRISMA7_NEXT_TEMPLATES,
|
|
11
|
+
},
|
|
416
12
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aventara/cli",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.9",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"description": "Scaffolds an Aventara server: `aventara new` for a new NestJS project, `aventara init` for an existing one.",
|
|
6
6
|
"type": "module",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"typescript": "^5.9.2"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
|
-
"prebuild": "node scripts/adapter-catalog.generator.ts && node scripts/agent-skill.generator.ts",
|
|
26
|
+
"prebuild": "node scripts/adapter-catalog.generator.ts && node ../../scripts/build/host-catalog.generator.ts --out src/catalog/host.catalog.generated.ts && node scripts/agent-skill.generator.ts",
|
|
27
27
|
"build": "node ../../scripts/build/build-output.cleaner.ts dist && tsc -p tsconfig.json --removeComments",
|
|
28
28
|
"typecheck": "tsc -p tsconfig.typecheck.json --noEmit",
|
|
29
29
|
"test": "vitest run --typecheck --config ../../vitest.config.mts --root .",
|