@aventara/cli 0.1.0-pilot.3 → 0.1.0-pilot.4
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 +3 -3
- package/dist/plan/project.planner.js +10 -0
- package/dist/templates/docs.links.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -67,9 +67,9 @@ when you confirm, or with `--yes`; where nobody can be asked, the run stops and
|
|
|
67
67
|
| `test/app.e2e-spec.ts` — one edit: a `GET /api/_contract` → 200 test after Nest's `GET /` test; left alone when the file is not Nest's | you |
|
|
68
68
|
| `src/main.ts` — one edit after `NestFactory.create`: `app.enableCors(…)` for the comma-separated origins in `CORS_ORIGINS`, and CORS off when it is unset or empty, then a commented-out platform-level rate limiter (`express-rate-limit`; Nest's `@nestjs/throttler` is a guard, which does not run on Aventara's routes); left alone when the file already configures CORS, printed when it has no such line | you |
|
|
69
69
|
| `.env` (`DATABASE_URL`, and `CORS_ORIGINS="http://localhost:5173,http://localhost:3001"` appended unless a line sets it), `.gitignore` (`/src/generated/`, `/dev.db*`, `.env`) | you |
|
|
70
|
-
| `package.json` — `@aventara/*` at this CLI's version, `prisma`, `@prisma/client` and the driver at `7.10.0`; `aventara:prepare`, `postinstall`, and the `.env` on the start scripts and `test:e2e` (`--env-file`, `--env-file-if-exists`) | you |
|
|
70
|
+
| `package.json` — `@aventara/*` at this CLI's version, `prisma`, `@prisma/client` and the driver at `7.10.0`; `aventara:prepare`, run by `postinstall` and by `prebuild`, `prestart`, `prestart:dev` and `prestart:debug`, and the `.env` on the start scripts and `test:e2e` (`--env-file`, `--env-file-if-exists`) | you |
|
|
71
71
|
| `pnpm-workspace.yaml` (pnpm only) — `allowBuilds` for Prisma's and SQLite's install scripts | you |
|
|
72
|
-
| `src/generated/prisma/**`, `src/generated/aventara/discovery.artifact.ts` | **generated** by `aventara:prepare` (run on every install); never edit |
|
|
72
|
+
| `src/generated/prisma/**`, `src/generated/aventara/discovery.artifact.ts` | **generated** by `aventara:prepare` (run on every install, build and start, so a schema change needs only a restart); never edit |
|
|
73
73
|
|
|
74
74
|
### Next steps it prints
|
|
75
75
|
|
|
@@ -114,7 +114,7 @@ whenever the schema or the configuration does: fetch it again, and regenerate th
|
|
|
114
114
|
|
|
115
115
|
## Supported
|
|
116
116
|
|
|
117
|
-
NestJS 12; Node `^22.18.0 || >=24.2.0` (
|
|
117
|
+
NestJS 12; Node `^22.18.0 || >=24.2.0` (on any other Node the bin refuses in one sentence naming that range;
|
|
118
118
|
on Node 22 use npm ≥ 11 — Node 22's bundled npm 10 cannot install Nest 12's own scaffold; a CommonJS project's jest
|
|
119
119
|
e2e needs Node ≥ 24.9, Nest's and Jest's limit); npm and pnpm (yarn is not supported); ESM and
|
|
120
120
|
CommonJS projects; Prisma 7 (`^7.10.0`) on SQLite and PostgreSQL. The ORMs, majors, databases and drivers on offer are
|
|
@@ -5,6 +5,12 @@ import { appendEnvEntryIfAbsent, mergeEnvFile, mergeGitignore, mergePackageManif
|
|
|
5
5
|
import { APP_MODULE, } from "../project/project.inspector.js";
|
|
6
6
|
import { SCAFFOLD_ENTRYPOINT, } from "../templates/template.registry.js";
|
|
7
7
|
export const PREPARE_SCRIPT = "aventara:prepare";
|
|
8
|
+
const PREPARED_SCRIPTS = [
|
|
9
|
+
"build",
|
|
10
|
+
"start",
|
|
11
|
+
"start:dev",
|
|
12
|
+
"start:debug",
|
|
13
|
+
];
|
|
8
14
|
const START_SCRIPTS = {
|
|
9
15
|
start: { from: "nest start", to: "nest start --env-file .env" },
|
|
10
16
|
"start:dev": {
|
|
@@ -155,6 +161,10 @@ export function planInit(input) {
|
|
|
155
161
|
scripts: {
|
|
156
162
|
[PREPARE_SCRIPT]: scaffold.prepare,
|
|
157
163
|
postinstall: `${packageManager} run ${PREPARE_SCRIPT}`,
|
|
164
|
+
...Object.fromEntries(PREPARED_SCRIPTS.map((script) => [
|
|
165
|
+
`pre${script}`,
|
|
166
|
+
`${packageManager} run ${PREPARE_SCRIPT}`,
|
|
167
|
+
])),
|
|
158
168
|
},
|
|
159
169
|
rewrites: inspection.usesNestConfig
|
|
160
170
|
? {}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const DOCS_BASE_URL = "https
|
|
1
|
+
export const DOCS_BASE_URL = "https://aventara-docs.vercel.app";
|
|
2
2
|
export const RATE_LIMITING_DOCS = `${DOCS_BASE_URL}/docs/limits-and-safety#rate-limiting`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aventara/cli",
|
|
3
|
-
"version": "0.1.0-pilot.
|
|
3
|
+
"version": "0.1.0-pilot.4",
|
|
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
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"prebuild": "node scripts/adapter-catalog.generator.ts",
|
|
26
|
-
"build": "tsc -p tsconfig.json --removeComments --declaration false
|
|
26
|
+
"build": "tsc -p tsconfig.json --removeComments --declaration false",
|
|
27
27
|
"typecheck": "tsc -p tsconfig.typecheck.json --noEmit",
|
|
28
28
|
"test": "vitest run --typecheck --config ../../vitest.config.mts --root .",
|
|
29
29
|
"lint": "biome lint src scripts"
|