openadminjs 0.1.24 → 0.2.0
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 +97 -16
- package/dist/adapt-package-manager.d.ts +3 -0
- package/dist/adapt-package-manager.js +115 -0
- package/dist/adapt-package-manager.test.d.ts +1 -0
- package/dist/adapt-package-manager.test.js +76 -0
- package/dist/cli.e2e.test.d.ts +1 -0
- package/dist/cli.e2e.test.js +87 -0
- package/dist/create-project.d.ts +31 -2
- package/dist/create-project.js +296 -102
- package/dist/create-project.test.js +180 -4
- package/dist/database-providers.integration.test.d.ts +1 -0
- package/dist/database-providers.integration.test.js +64 -0
- package/dist/db-commands.d.ts +20 -0
- package/dist/db-commands.js +75 -0
- package/dist/db-commands.test.d.ts +1 -0
- package/dist/db-commands.test.js +27 -0
- package/dist/detect-package-manager.d.ts +8 -0
- package/dist/detect-package-manager.js +37 -0
- package/dist/doctor.d.ts +13 -0
- package/dist/doctor.js +203 -0
- package/dist/doctor.test.d.ts +1 -0
- package/dist/doctor.test.js +102 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +233 -141
- package/dist/index.test.js +7 -3
- package/dist/render-schema.d.ts +20 -0
- package/dist/render-schema.js +37 -0
- package/dist/render-schema.test.d.ts +1 -0
- package/dist/render-schema.test.js +57 -0
- package/dist/secrets.d.ts +24 -0
- package/dist/secrets.js +93 -0
- package/dist/secrets.test.d.ts +1 -0
- package/dist/secrets.test.js +36 -0
- package/dist/security.d.ts +13 -0
- package/dist/security.js +168 -0
- package/dist/security.test.d.ts +1 -0
- package/dist/security.test.js +54 -0
- package/dist/validate-name.d.ts +33 -0
- package/dist/validate-name.js +206 -0
- package/dist/validate-name.test.d.ts +1 -0
- package/dist/validate-name.test.js +63 -0
- package/package.json +26 -1
- package/template/README.md +22 -3
- package/template/apps/api/package.json +3 -0
- package/template/apps/api/src/common/json-field-codec.test.ts +76 -0
- package/template/apps/api/src/common/json-field-codec.ts +139 -0
- package/template/apps/api/src/common/prisma.service.test.ts +19 -0
- package/template/apps/api/src/common/prisma.service.ts +13 -0
- package/template/apps/api/src/graphql/graphql-apollo-config.test.ts +26 -0
- package/template/apps/api/src/graphql/graphql.module.ts +13 -1
- package/template/package.json +2 -0
- package/template/prisma/migrations/20260713120000_add_user_oidc_key_and_category_order/migration.sql +11 -0
package/dist/doctor.js
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import net from "node:net";
|
|
4
|
+
import { spawnSync } from "node:child_process";
|
|
5
|
+
import { detectPackageManager } from "./detect-package-manager.js";
|
|
6
|
+
import { isPackageManagerAvailable, MIN_NODE_MAJOR } from "./create-project.js";
|
|
7
|
+
import { inspectPassword, inspectSecret } from "./secrets.js";
|
|
8
|
+
function parseEnv(content) {
|
|
9
|
+
const env = {};
|
|
10
|
+
for (const line of content.split(/\r?\n/)) {
|
|
11
|
+
const trimmed = line.trim();
|
|
12
|
+
if (!trimmed || trimmed.startsWith("#"))
|
|
13
|
+
continue;
|
|
14
|
+
const eq = trimmed.indexOf("=");
|
|
15
|
+
if (eq < 0)
|
|
16
|
+
continue;
|
|
17
|
+
const key = trimmed.slice(0, eq).trim();
|
|
18
|
+
let value = trimmed.slice(eq + 1).trim();
|
|
19
|
+
if ((value.startsWith('"') && value.endsWith('"')) || (value.startsWith("'") && value.endsWith("'"))) {
|
|
20
|
+
value = value.slice(1, -1);
|
|
21
|
+
}
|
|
22
|
+
env[key] = value;
|
|
23
|
+
}
|
|
24
|
+
return env;
|
|
25
|
+
}
|
|
26
|
+
function readFileSafe(path) {
|
|
27
|
+
try {
|
|
28
|
+
return readFileSync(path, "utf8");
|
|
29
|
+
}
|
|
30
|
+
catch {
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
async function tcpReachable(host, port, timeoutMs = 1200) {
|
|
35
|
+
return new Promise((resolve) => {
|
|
36
|
+
const socket = net.createConnection({ host, port });
|
|
37
|
+
const done = (ok) => {
|
|
38
|
+
socket.destroy();
|
|
39
|
+
resolve(ok);
|
|
40
|
+
};
|
|
41
|
+
socket.setTimeout(timeoutMs, () => done(false));
|
|
42
|
+
socket.once("error", () => done(false));
|
|
43
|
+
socket.once("connect", () => done(true));
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
export async function runDoctorChecks(cwd, opts = {}) {
|
|
47
|
+
const results = [];
|
|
48
|
+
const add = (name, status, message) => results.push({ name, status, message });
|
|
49
|
+
const nodeMajor = Number(process.versions.node.split(".")[0]);
|
|
50
|
+
if (nodeMajor >= MIN_NODE_MAJOR)
|
|
51
|
+
add("node-version", "pass", `Node.js ${process.versions.node}`);
|
|
52
|
+
else
|
|
53
|
+
add("node-version", "fail", `Node.js ${process.versions.node} is below the required ${MIN_NODE_MAJOR}.`);
|
|
54
|
+
const pm = detectPackageManager(cwd);
|
|
55
|
+
if (opts.skipNetwork) {
|
|
56
|
+
add("package-manager", "pass", `Detected ${pm} (availability check skipped).`);
|
|
57
|
+
}
|
|
58
|
+
else if (isPackageManagerAvailable(pm)) {
|
|
59
|
+
add("package-manager", "pass", `${pm} is installed.`);
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
add("package-manager", "fail", `${pm} is not installed or not on PATH.`);
|
|
63
|
+
}
|
|
64
|
+
const hasNodeModules = existsSync(join(cwd, "node_modules"));
|
|
65
|
+
if (hasNodeModules)
|
|
66
|
+
add("node-modules", "pass", "Dependencies are installed.");
|
|
67
|
+
else
|
|
68
|
+
add("node-modules", "fail", `node_modules missing — run "${pm} install".`);
|
|
69
|
+
const schemaPath = join(cwd, "prisma", "schema.prisma");
|
|
70
|
+
const schema = readFileSafe(schemaPath);
|
|
71
|
+
if (schema)
|
|
72
|
+
add("prisma-schema", "pass", "prisma/schema.prisma present.");
|
|
73
|
+
else
|
|
74
|
+
add("prisma-schema", "fail", "prisma/schema.prisma is missing.");
|
|
75
|
+
const envPath = join(cwd, "apps", "api", ".env");
|
|
76
|
+
const envRaw = readFileSafe(envPath);
|
|
77
|
+
const env = envRaw ? parseEnv(envRaw) : {};
|
|
78
|
+
if (envRaw)
|
|
79
|
+
add("env-file", "pass", "apps/api/.env present.");
|
|
80
|
+
else
|
|
81
|
+
add("env-file", "fail", "apps/api/.env is missing.");
|
|
82
|
+
const requiredEnv = ["DATABASE_URL", "REDIS_URL", "JWT_SECRET", "JWT_REFRESH_SECRET"];
|
|
83
|
+
const missingEnv = requiredEnv.filter((k) => !env[k]);
|
|
84
|
+
if (envRaw) {
|
|
85
|
+
if (missingEnv.length === 0)
|
|
86
|
+
add("env-vars", "pass", "Required environment variables are set.");
|
|
87
|
+
else
|
|
88
|
+
add("env-vars", "fail", `Missing env vars: ${missingEnv.join(", ")}.`);
|
|
89
|
+
}
|
|
90
|
+
const prismaClient = existsSync(join(cwd, "node_modules", ".prisma", "client")) ||
|
|
91
|
+
existsSync(join(cwd, "node_modules", "@prisma", "client"));
|
|
92
|
+
if (prismaClient)
|
|
93
|
+
add("prisma-client", "pass", "Prisma Client is available.");
|
|
94
|
+
else
|
|
95
|
+
add("prisma-client", "warn", `Prisma Client not generated — run "${pm} db:migrate" or prisma generate.`);
|
|
96
|
+
// prisma validate (best-effort; only when deps + a local prisma binary exist)
|
|
97
|
+
const prismaBin = join(cwd, "node_modules", ".bin", process.platform === "win32" ? "prisma.cmd" : "prisma");
|
|
98
|
+
if (schema && existsSync(prismaBin)) {
|
|
99
|
+
const res = spawnSync(prismaBin, ["validate", "--schema", schemaPath], { cwd, encoding: "utf8" });
|
|
100
|
+
if (res.status === 0)
|
|
101
|
+
add("prisma-validate", "pass", "prisma validate succeeded.");
|
|
102
|
+
else
|
|
103
|
+
add("prisma-validate", "fail", `prisma validate failed: ${(res.stderr || res.stdout || "").trim().split("\n").pop() ?? "error"}`);
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
add("prisma-validate", "warn", "Skipped prisma validate (install dependencies first).");
|
|
107
|
+
}
|
|
108
|
+
// migration provider consistency
|
|
109
|
+
const lockPath = join(cwd, "prisma", "migrations", "migration_lock.toml");
|
|
110
|
+
const lockRaw = readFileSafe(lockPath);
|
|
111
|
+
// Read the provider from the `datasource` block, not the `generator` block.
|
|
112
|
+
const schemaProvider = schema
|
|
113
|
+
?.match(/datasource\s+\w+\s*\{[^}]*?provider\s*=\s*"([^"]+)"/m)?.[1];
|
|
114
|
+
const lockProvider = lockRaw?.match(/provider\s*=\s*"([^"]+)"/)?.[1];
|
|
115
|
+
if (lockRaw && schemaProvider && lockProvider) {
|
|
116
|
+
if (schemaProvider === lockProvider) {
|
|
117
|
+
add("migration-provider", "pass", `Migration provider matches schema (${schemaProvider}).`);
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
add("migration-provider", "fail", `Schema provider "${schemaProvider}" does not match migration_lock.toml "${lockProvider}".`);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
// incompatible migration SQL for non-postgres providers
|
|
124
|
+
if (schemaProvider && schemaProvider !== "postgresql" && lockProvider === "postgresql") {
|
|
125
|
+
add("migration-compat", "fail", "Migrations were generated for PostgreSQL but the schema uses a different provider.");
|
|
126
|
+
}
|
|
127
|
+
const pkgRaw = readFileSafe(join(cwd, "package.json"));
|
|
128
|
+
if (pkgRaw) {
|
|
129
|
+
try {
|
|
130
|
+
const scripts = JSON.parse(pkgRaw).scripts ?? {};
|
|
131
|
+
const requiredScripts = ["dev", "build", "test", "db:migrate", "db:seed"];
|
|
132
|
+
const missingScripts = requiredScripts.filter((s) => !scripts[s]);
|
|
133
|
+
if (missingScripts.length === 0)
|
|
134
|
+
add("root-scripts", "pass", "Required root scripts are present.");
|
|
135
|
+
else
|
|
136
|
+
add("root-scripts", "fail", `Missing root scripts: ${missingScripts.join(", ")}.`);
|
|
137
|
+
}
|
|
138
|
+
catch {
|
|
139
|
+
add("root-scripts", "fail", "Root package.json is not valid JSON.");
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
const lockfiles = ["pnpm-lock.yaml", "package-lock.json", "yarn.lock"].filter((f) => existsSync(join(cwd, f)));
|
|
143
|
+
if (lockfiles.length <= 1)
|
|
144
|
+
add("lockfiles", "pass", lockfiles.length ? `Single lockfile (${lockfiles[0]}).` : "No lockfile yet.");
|
|
145
|
+
else
|
|
146
|
+
add("lockfiles", "fail", `Conflicting lockfiles: ${lockfiles.join(", ")}.`);
|
|
147
|
+
if (!existsSync(join(cwd, ".gitignore")))
|
|
148
|
+
add("gitignore", "fail", ".gitignore is missing.");
|
|
149
|
+
else
|
|
150
|
+
add("gitignore", "pass", ".gitignore present.");
|
|
151
|
+
// .env tracked by git?
|
|
152
|
+
if (existsSync(join(cwd, ".git"))) {
|
|
153
|
+
const tracked = spawnSync("git", ["ls-files", "--error-unmatch", "apps/api/.env"], { cwd, stdio: "ignore" });
|
|
154
|
+
if (tracked.status === 0)
|
|
155
|
+
add("env-tracked", "fail", "apps/api/.env is tracked by Git — remove it and rotate secrets.");
|
|
156
|
+
else
|
|
157
|
+
add("env-tracked", "pass", "apps/api/.env is not tracked by Git.");
|
|
158
|
+
}
|
|
159
|
+
// weak secrets
|
|
160
|
+
if (envRaw) {
|
|
161
|
+
const weak = [];
|
|
162
|
+
const jwt = inspectSecret(env.JWT_SECRET, "JWT_SECRET");
|
|
163
|
+
const jwtR = inspectSecret(env.JWT_REFRESH_SECRET, "JWT_REFRESH_SECRET");
|
|
164
|
+
if (jwt.weak)
|
|
165
|
+
weak.push(jwt.reason);
|
|
166
|
+
if (jwtR.weak)
|
|
167
|
+
weak.push(jwtR.reason);
|
|
168
|
+
if (env.JWT_SECRET && env.JWT_SECRET === env.JWT_REFRESH_SECRET)
|
|
169
|
+
weak.push("JWT_SECRET equals JWT_REFRESH_SECRET");
|
|
170
|
+
const pw = inspectPassword(env.SUPERADMIN_PASSWORD);
|
|
171
|
+
if (env.SUPERADMIN_PASSWORD && pw.weak)
|
|
172
|
+
weak.push(pw.reason);
|
|
173
|
+
if (weak.length === 0)
|
|
174
|
+
add("secrets", "pass", "Secrets look strong.");
|
|
175
|
+
else
|
|
176
|
+
add("secrets", "fail", weak.join("; ") + ".");
|
|
177
|
+
}
|
|
178
|
+
// redis connectivity (only meaningful when configured)
|
|
179
|
+
if (env.REDIS_URL && !opts.skipNetwork) {
|
|
180
|
+
try {
|
|
181
|
+
const url = new URL(env.REDIS_URL);
|
|
182
|
+
const ok = await tcpReachable(url.hostname, Number(url.port) || 6379);
|
|
183
|
+
add("redis", ok ? "pass" : "warn", ok ? "Redis is reachable." : "Redis is not reachable (start it before running queues).");
|
|
184
|
+
}
|
|
185
|
+
catch {
|
|
186
|
+
add("redis", "warn", "REDIS_URL is not a valid URL.");
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
// database connectivity (skip for SQLite file URLs — no server to ping)
|
|
190
|
+
if (env.DATABASE_URL && !opts.skipNetwork && !env.DATABASE_URL.trim().toLowerCase().startsWith("file:")) {
|
|
191
|
+
try {
|
|
192
|
+
const url = new URL(env.DATABASE_URL);
|
|
193
|
+
const port = Number(url.port) || (schemaProvider === "mysql" ? 3306 : 5432);
|
|
194
|
+
const ok = await tcpReachable(url.hostname, port);
|
|
195
|
+
add("database", ok ? "pass" : "warn", ok ? "Database is reachable." : "Database is not reachable (is it running?).");
|
|
196
|
+
}
|
|
197
|
+
catch {
|
|
198
|
+
add("database", "warn", "DATABASE_URL is not a valid URL.");
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
const ok = !results.some((r) => r.status === "fail");
|
|
202
|
+
return { results, ok };
|
|
203
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { tmpdir } from "node:os";
|
|
4
|
+
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
|
5
|
+
import { runDoctorChecks } from "./doctor.js";
|
|
6
|
+
import { generateSecret } from "./secrets.js";
|
|
7
|
+
let dir;
|
|
8
|
+
function status(results, name) {
|
|
9
|
+
return results.find((r) => r.name === name)?.status;
|
|
10
|
+
}
|
|
11
|
+
function scaffoldHealthyProject(root) {
|
|
12
|
+
writeFileSync(join(root, "package.json"), JSON.stringify({
|
|
13
|
+
name: "demo",
|
|
14
|
+
packageManager: "pnpm@9.15.0",
|
|
15
|
+
scripts: { dev: "x", build: "x", test: "x", "db:migrate": "x", "db:seed": "x" }
|
|
16
|
+
}, null, 2));
|
|
17
|
+
writeFileSync(join(root, ".gitignore"), "node_modules\n.env\n.env.*\n!.env.example\n");
|
|
18
|
+
writeFileSync(join(root, "pnpm-lock.yaml"), "lockfileVersion: '9.0'\n");
|
|
19
|
+
mkdirSync(join(root, "prisma", "migrations"), { recursive: true });
|
|
20
|
+
writeFileSync(join(root, "prisma", "schema.prisma"), 'datasource db {\n provider = "postgresql"\n url = env("DATABASE_URL")\n}\n');
|
|
21
|
+
writeFileSync(join(root, "prisma", "migrations", "migration_lock.toml"), 'provider = "postgresql"\n');
|
|
22
|
+
mkdirSync(join(root, "apps", "api"), { recursive: true });
|
|
23
|
+
writeFileSync(join(root, "apps", "api", ".env"), [
|
|
24
|
+
"DATABASE_URL=postgresql://localhost:5432/demo?schema=public",
|
|
25
|
+
"REDIS_URL=redis://localhost:6379",
|
|
26
|
+
`JWT_SECRET=${generateSecret()}`,
|
|
27
|
+
`JWT_REFRESH_SECRET=${generateSecret()}`,
|
|
28
|
+
"SUPERADMIN_PASSWORD=a-strong-enough-password"
|
|
29
|
+
].join("\n") + "\n");
|
|
30
|
+
mkdirSync(join(root, "node_modules"), { recursive: true });
|
|
31
|
+
}
|
|
32
|
+
beforeEach(() => {
|
|
33
|
+
dir = mkdtempSync(join(tmpdir(), "oaj-doctor-"));
|
|
34
|
+
});
|
|
35
|
+
afterEach(() => {
|
|
36
|
+
rmSync(dir, { recursive: true, force: true });
|
|
37
|
+
});
|
|
38
|
+
describe("runDoctorChecks", () => {
|
|
39
|
+
it("passes core checks for a healthy project", async () => {
|
|
40
|
+
scaffoldHealthyProject(dir);
|
|
41
|
+
const { results, ok } = await runDoctorChecks(dir, { skipNetwork: true });
|
|
42
|
+
expect(status(results, "prisma-schema")).toBe("pass");
|
|
43
|
+
expect(status(results, "env-file")).toBe("pass");
|
|
44
|
+
expect(status(results, "env-vars")).toBe("pass");
|
|
45
|
+
expect(status(results, "root-scripts")).toBe("pass");
|
|
46
|
+
expect(status(results, "gitignore")).toBe("pass");
|
|
47
|
+
expect(status(results, "migration-provider")).toBe("pass");
|
|
48
|
+
expect(status(results, "secrets")).toBe("pass");
|
|
49
|
+
expect(status(results, "lockfiles")).toBe("pass");
|
|
50
|
+
expect(ok).toBe(true);
|
|
51
|
+
});
|
|
52
|
+
it("fails an unprepared project (missing schema, env, node_modules, gitignore)", async () => {
|
|
53
|
+
writeFileSync(join(dir, "package.json"), JSON.stringify({ name: "x", scripts: {} }));
|
|
54
|
+
const { results, ok } = await runDoctorChecks(dir, { skipNetwork: true });
|
|
55
|
+
expect(status(results, "prisma-schema")).toBe("fail");
|
|
56
|
+
expect(status(results, "env-file")).toBe("fail");
|
|
57
|
+
expect(status(results, "node-modules")).toBe("fail");
|
|
58
|
+
expect(status(results, "gitignore")).toBe("fail");
|
|
59
|
+
expect(ok).toBe(false);
|
|
60
|
+
});
|
|
61
|
+
it("detects provider mismatch between schema and migration_lock", async () => {
|
|
62
|
+
scaffoldHealthyProject(dir);
|
|
63
|
+
writeFileSync(join(dir, "prisma", "migrations", "migration_lock.toml"), 'provider = "mysql"\n');
|
|
64
|
+
const { results, ok } = await runDoctorChecks(dir, { skipNetwork: true });
|
|
65
|
+
expect(status(results, "migration-provider")).toBe("fail");
|
|
66
|
+
expect(ok).toBe(false);
|
|
67
|
+
});
|
|
68
|
+
it("detects weak/default secrets", async () => {
|
|
69
|
+
scaffoldHealthyProject(dir);
|
|
70
|
+
writeFileSync(join(dir, "apps", "api", ".env"), "DATABASE_URL=postgresql://localhost:5432/demo\nREDIS_URL=redis://localhost:6379\nJWT_SECRET=secret\nJWT_REFRESH_SECRET=secret\n");
|
|
71
|
+
const { results, ok } = await runDoctorChecks(dir, { skipNetwork: true });
|
|
72
|
+
expect(status(results, "secrets")).toBe("fail");
|
|
73
|
+
expect(ok).toBe(false);
|
|
74
|
+
});
|
|
75
|
+
it("passes doctor for a healthy SQLite project (no migration lock, file URL)", async () => {
|
|
76
|
+
writeFileSync(join(dir, "package.json"), JSON.stringify({
|
|
77
|
+
name: "sqlite-demo",
|
|
78
|
+
packageManager: "pnpm@9.15.0",
|
|
79
|
+
scripts: { dev: "x", build: "x", test: "x", "db:migrate": "x", "db:seed": "x" }
|
|
80
|
+
}, null, 2));
|
|
81
|
+
writeFileSync(join(dir, ".gitignore"), "node_modules\n.env\n.env.*\n!.env.example\n*.db\n");
|
|
82
|
+
writeFileSync(join(dir, "pnpm-lock.yaml"), "lockfileVersion: '9.0'\n");
|
|
83
|
+
mkdirSync(join(dir, "prisma"), { recursive: true });
|
|
84
|
+
writeFileSync(join(dir, "prisma", "schema.prisma"), 'datasource db {\n provider = "sqlite"\n url = env("DATABASE_URL")\n}\n');
|
|
85
|
+
mkdirSync(join(dir, "apps", "api"), { recursive: true });
|
|
86
|
+
writeFileSync(join(dir, "apps", "api", ".env"), [
|
|
87
|
+
"DATABASE_URL=file:./dev.db",
|
|
88
|
+
"REDIS_URL=redis://localhost:6379",
|
|
89
|
+
`JWT_SECRET=${generateSecret()}`,
|
|
90
|
+
`JWT_REFRESH_SECRET=${generateSecret()}`,
|
|
91
|
+
"SUPERADMIN_PASSWORD=a-strong-enough-password"
|
|
92
|
+
].join("\n") + "\n");
|
|
93
|
+
mkdirSync(join(dir, "node_modules"), { recursive: true });
|
|
94
|
+
const { results, ok } = await runDoctorChecks(dir, { skipNetwork: true });
|
|
95
|
+
expect(status(results, "prisma-schema")).toBe("pass");
|
|
96
|
+
expect(status(results, "env-file")).toBe("pass");
|
|
97
|
+
expect(status(results, "secrets")).toBe("pass");
|
|
98
|
+
// No migration_lock.toml for fresh SQLite projects — check is skipped, not failed
|
|
99
|
+
expect(status(results, "migration-provider")).toBeUndefined();
|
|
100
|
+
expect(ok).toBe(true);
|
|
101
|
+
});
|
|
102
|
+
});
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
export {};
|
|
2
|
+
export { createProject, createProjectInteractive, databaseUrl, defaultTemplateDir, printNextSteps, printSecurityNotice, toPackageName, type CreateProjectOptions, type CreateProjectResult, type DatabaseDriver, type PackageManager } from "./create-project.js";
|
|
3
|
+
export { modelNameToResourceSlug } from "./resource-slug.js";
|