release: WRNexusJS 0.8.0
This commit is contained in:
@@ -22,8 +22,10 @@ test("scaffoldApp creates a comprehensive .gitignore", () => {
|
||||
".wrnexus/",
|
||||
".env.*",
|
||||
"!.env.example",
|
||||
"!.env.*.example",
|
||||
"*.log",
|
||||
"*.db",
|
||||
"uploads/",
|
||||
"coverage/",
|
||||
"mobile/android/",
|
||||
".vscode/",
|
||||
@@ -47,6 +49,79 @@ test("scaffoldApp includes production build and start scripts", () => {
|
||||
expect(pkg.scripts.build).toBe("wrnexus build .");
|
||||
expect(pkg.scripts.start).toBe("bun dist/server.js");
|
||||
expect(pkg.scripts.production).toBe("bun run build && bun run start");
|
||||
expect(pkg.scripts.typecheck).toBe("tsc --noEmit");
|
||||
expect(pkg.scripts.test).toBe("wrnexus test .");
|
||||
expect(pkg.scripts.check).toBe(
|
||||
"bun run typecheck && bun run lint && bun run test && bun run format:check",
|
||||
);
|
||||
} finally {
|
||||
rmSync(parent, { recursive: true, force: true });
|
||||
}
|
||||
});
|
||||
|
||||
test("scaffoldApp includes the complete v0.8 configuration and starter structure", () => {
|
||||
const parent = mkdtempSync(join(tmpdir(), "wrnexus-create-"));
|
||||
const root = join(parent, "complete-app");
|
||||
|
||||
try {
|
||||
scaffoldApp(root, "complete-app");
|
||||
const pkg = JSON.parse(readFileSync(join(root, "package.json"), "utf8"));
|
||||
const config = readFileSync(join(root, "wrnexus.config.ts"), "utf8");
|
||||
|
||||
for (const packageName of [
|
||||
"@wrnexus/auth",
|
||||
"@wrnexus/captcha",
|
||||
"@wrnexus/db",
|
||||
"@wrnexus/encryption",
|
||||
"@wrnexus/i18n",
|
||||
"@wrnexus/image",
|
||||
"@wrnexus/jwt",
|
||||
"@wrnexus/observability",
|
||||
"@wrnexus/realtime",
|
||||
"@wrnexus/security",
|
||||
"@wrnexus/store",
|
||||
"@wrnexus/ui",
|
||||
"@wrnexus/uploader",
|
||||
"@wrnexus/validation",
|
||||
]) {
|
||||
expect(pkg.dependencies[packageName]).toBe(currentCliVersion());
|
||||
}
|
||||
|
||||
for (const block of [
|
||||
"plugins:",
|
||||
"imports:",
|
||||
"types:",
|
||||
"stores:",
|
||||
"compatibility:",
|
||||
"performance:",
|
||||
"observability:",
|
||||
"tenancy:",
|
||||
"build:",
|
||||
"navigation:",
|
||||
"devToolbar:",
|
||||
"theme:",
|
||||
"i18n:",
|
||||
"db:",
|
||||
"databases:",
|
||||
"storage:",
|
||||
"realtime:",
|
||||
"profiles:",
|
||||
]) {
|
||||
expect(config).toContain(block);
|
||||
}
|
||||
|
||||
for (const relative of [
|
||||
".env.example",
|
||||
".env.test.example",
|
||||
"app/locales/en.json",
|
||||
"app/db/migrations/0001_init.sql",
|
||||
"app/db/seed.ts",
|
||||
"app/schemas/contact.ts",
|
||||
"app/realtime/chat.ts",
|
||||
"test/smoke.test.ts",
|
||||
]) {
|
||||
expect(existsSync(join(root, relative))).toBe(true);
|
||||
}
|
||||
} finally {
|
||||
rmSync(parent, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user