@reliverse/dler 1.7.101 → 1.7.103
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/LICENSE +1 -1
- package/LICENSES +1 -1
- package/README.md +9 -12
- package/bin/app/better/auth/cmd.js +6 -5
- package/bin/app/build/postbuild.js +6 -4
- package/bin/app/build/prebuild.js +6 -3
- package/bin/app/cli/impl.d.ts +1 -3
- package/bin/app/cli/impl.js +5 -5
- package/bin/app/config/constants.d.ts +1 -1
- package/bin/app/config/constants.js +1 -1
- package/bin/app/db/messages.d.ts +1 -1
- package/bin/app/init/init-utils/mm-deprecated/editor-menu.js +6 -5
- package/bin/app/providers/better-t-stack/helpers/project-generation/create-readme.js +27 -27
- package/bin/app/providers/better-t-stack/helpers/project-generation/post-installation.js +22 -22
- package/bin/app/providers/better-t-stack/types.d.ts +7 -7
- package/bin/app/providers/better-t-stack/utils/display-config.d.ts +1 -1
- package/bin/app/providers/cmd.d.ts +74 -0
- package/bin/app/providers/{better-t-stack/index.js → cmd.js} +119 -102
- package/bin/app/rempts/cmd.js +2 -2
- package/bin/app/utils/badgeNotifiers.d.ts +2 -2
- package/bin/app/utils/projectRepository.d.ts +7 -7
- package/bin/dler-go +1 -1
- package/bin/dler-rust +1 -1
- package/bin/dler.js +17 -7
- package/package.json +8 -8
- package/bin/app/cmds.d.ts +0 -315
- package/bin/app/cmds.js +0 -61
- package/bin/app/providers/better-t-stack/index.d.ts +0 -2
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) Nazar Kornienko (blefnk), Bleverse, Reliverse
|
|
3
|
+
Copyright (c) 2025 Nazar Kornienko (blefnk), Bleverse, Reliverse
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/LICENSES
CHANGED
package/README.md
CHANGED
|
@@ -1,25 +1,22 @@
|
|
|
1
|
-
# Dler (prev. Reliverse Relidler)
|
|
1
|
+
# Dler (prev. Reliverse Relidler)
|
|
2
2
|
|
|
3
3
|
> **@reliverse/dler** is an open-source framework which helps developers build their TypeScript/JavaScript libraries and CLI tools with ease. It provides ready-to-use primitives, so you don't have to write them from scratch.
|
|
4
4
|
|
|
5
|
-
[Sponsor](https://github.com/sponsors/blefnk) — [Discord](https://discord.gg/Pb8uKbwpsJ) — [GitHub](https://github.com/reliverse/dler) — [NPM](https://npmjs.com/@reliverse/dler)
|
|
5
|
+
[Sponsor](https://github.com/sponsors/blefnk) — [Discord](https://discord.gg/Pb8uKbwpsJ) — [GitHub](https://github.com/reliverse/dler) — [NPM](https://npmjs.com/@reliverse/dler) — [Introduction](https://blefnk.reliverse.org/blog/articles/package-managers)
|
|
6
6
|
|
|
7
7
|
## Documentation
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
## Stand With Reliverse
|
|
12
|
-
|
|
13
|
-
- [Star the project repo](https://github.com/reliverse/dler) to help Reliverse community grow.
|
|
14
|
-
- Follow this project's author, [Nazar Kornienko](https://github.com/blefnk) & [Reliverse](https://github.com/reliverse), to get updates about new projects.
|
|
15
|
-
- [Become a sponsor](https://github.com/sponsors/blefnk) and power the next wave of tools that _just feel right_.
|
|
16
|
-
- Every bit of support helps keep the dream alive: dev tools that don't suck.
|
|
9
|
+
Visit [docs.reliverse.org/libraries/dler](https://docs.reliverse.org/libraries/dler) to learn how to install and use `@reliverse/dler` library.
|
|
17
10
|
|
|
18
11
|
## Stand With Ukraine
|
|
19
12
|
|
|
20
|
-
- 💙
|
|
13
|
+
- 💙 Please help fund drones, medkits, and victory. [Donate now](https://u24.gov.ua), it matters.
|
|
21
14
|
- 💛 Every dollar helps stop [russia's war crimes](https://war.ukraine.ua/russia-war-crimes) and saves lives.
|
|
22
15
|
|
|
16
|
+
## Stand With Reliverse
|
|
17
|
+
|
|
18
|
+
[Star the project repo](https://github.com/reliverse/dler) to help Reliverse community grow; Follow this project's author, [Nazar Kornienko](https://github.com/blefnk) & [Reliverse](https://github.com/reliverse), to get updates about new projects; [Become a sponsor](https://github.com/sponsors/blefnk) and power the next wave of tools that _just feel right_.
|
|
19
|
+
|
|
23
20
|
## License
|
|
24
21
|
|
|
25
|
-
[MIT](
|
|
22
|
+
Licensed under [MIT](LICENSE) © 2025 [Nazar Kornienko (blefnk)](https://github.com/blefnk), [Bleverse](https://bleverse.com), [Reliverse](https://github.com/reliverse)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import path from "@reliverse/pathkit";
|
|
2
2
|
import fs from "@reliverse/relifso";
|
|
3
3
|
import { relinka } from "@reliverse/relinka";
|
|
4
|
-
import { defineArgs, defineCommand
|
|
4
|
+
import { callCmd, defineArgs, defineCommand } from "@reliverse/rempts";
|
|
5
5
|
import { execaCommand } from "execa";
|
|
6
6
|
import MagicString from "magic-string";
|
|
7
|
-
import {
|
|
7
|
+
import { default as betterAuthGenerateCmd } from "./generate/cmd.js";
|
|
8
8
|
import { configPath, schemaPath } from "./consts.js";
|
|
9
9
|
const notice = `/**
|
|
10
10
|
* THIS FILE IS AUTO-GENERATED - DO NOT EDIT DIRECTLY
|
|
@@ -43,9 +43,10 @@ export default defineCommand({
|
|
|
43
43
|
relinka("error", "Schema file does not exist; tried:", args.schema);
|
|
44
44
|
process.exit(1);
|
|
45
45
|
}
|
|
46
|
-
await
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
await callCmd(betterAuthGenerateCmd, {
|
|
47
|
+
config: configPath,
|
|
48
|
+
output: schemaPath
|
|
49
|
+
});
|
|
49
50
|
const filePath = path.resolve(schemaPath);
|
|
50
51
|
const originalContent = await fs.readFile(filePath, "utf8");
|
|
51
52
|
const s = new MagicString(originalContent);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import path from "@reliverse/pathkit";
|
|
2
2
|
import fs from "@reliverse/relifso";
|
|
3
3
|
import { relinka } from "@reliverse/relinka";
|
|
4
|
-
import {
|
|
4
|
+
import { callCmd } from "@reliverse/rempts";
|
|
5
5
|
import { glob } from "tinyglobby";
|
|
6
|
-
import {
|
|
6
|
+
import { default as checkCmd } from "../check/cmd.js";
|
|
7
7
|
import { PROJECT_ROOT } from "../config/constants.js";
|
|
8
8
|
import { getConfigDler } from "../config/load.js";
|
|
9
9
|
import { applyMagicSpells } from "../magic/magic-apply.js";
|
|
@@ -170,8 +170,10 @@ const createPostBuildToolRunner = () => ({
|
|
|
170
170
|
"dler-check": {
|
|
171
171
|
name: "Dler Check",
|
|
172
172
|
async run() {
|
|
173
|
-
|
|
174
|
-
|
|
173
|
+
await callCmd(checkCmd, {
|
|
174
|
+
"no-exit": true,
|
|
175
|
+
"no-progress": true
|
|
176
|
+
});
|
|
175
177
|
}
|
|
176
178
|
}
|
|
177
179
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import path from "@reliverse/pathkit";
|
|
2
2
|
import fs from "@reliverse/relifso";
|
|
3
3
|
import { relinka } from "@reliverse/relinka";
|
|
4
|
-
import {
|
|
4
|
+
import { callCmd } from "@reliverse/rempts";
|
|
5
5
|
import { glob } from "tinyglobby";
|
|
6
|
-
import {
|
|
6
|
+
import { default as checkCmd } from "../check/cmd.js";
|
|
7
7
|
import { PROJECT_ROOT } from "../config/constants.js";
|
|
8
8
|
import { executeCommand, executeDlerHooks, isCommandAvailable } from "./ppb-utils.js";
|
|
9
9
|
const createToolRunner = () => ({
|
|
@@ -26,7 +26,10 @@ const createToolRunner = () => ({
|
|
|
26
26
|
"dler-check": {
|
|
27
27
|
name: "Dler Check",
|
|
28
28
|
async run() {
|
|
29
|
-
await
|
|
29
|
+
await callCmd(checkCmd, {
|
|
30
|
+
"no-exit": true,
|
|
31
|
+
"no-progress": true
|
|
32
|
+
});
|
|
30
33
|
}
|
|
31
34
|
}
|
|
32
35
|
});
|
package/bin/app/cli/impl.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import type { ParamsOmitSkipPN } from "../types/mod.js";
|
|
2
2
|
export declare function app(params: ParamsOmitSkipPN): Promise<void>;
|
|
3
|
-
export declare function showWebUiMenu(
|
|
4
|
-
isDev: boolean;
|
|
5
|
-
}): Promise<void>;
|
|
3
|
+
export declare function showWebUiMenu(): Promise<void>;
|
package/bin/app/cli/impl.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { callCmd, selectPrompt } from "@reliverse/rempts";
|
|
2
2
|
import { generate } from "random-words";
|
|
3
3
|
import { aiMenu } from "../ai/ai-menu.js";
|
|
4
|
-
import { getWebCmd } from "../cmds.js";
|
|
5
4
|
import { detectProject } from "../config/cfg-detect.js";
|
|
6
5
|
import { cliJsrPath, UNKNOWN_VALUE } from "../config/constants.js";
|
|
7
6
|
import { ad, getRandomMessage, getWelcomeTitle, premium } from "../db/messages.js";
|
|
@@ -15,6 +14,7 @@ import {
|
|
|
15
14
|
} from "../providers/reliverse-stack/reliverse-stack-mod.js";
|
|
16
15
|
import { showDevToolsMenu } from "../toolbox/toolbox-impl.js";
|
|
17
16
|
import { showNativeCliMenu } from "../utils/native-cli/nc-mod.js";
|
|
17
|
+
import { default as webCmd } from "../web/cmd.js";
|
|
18
18
|
export async function app(params) {
|
|
19
19
|
const { cwd, isDev, mrse, memory, config } = params;
|
|
20
20
|
const skipPrompts = config.skipPromptsUseAutoBehavior ?? false;
|
|
@@ -79,10 +79,10 @@ ${premium}`,
|
|
|
79
79
|
} else if (mainMenuOption === "ai") {
|
|
80
80
|
await aiMenu(config, false, memory);
|
|
81
81
|
} else if (mainMenuOption === "web-ui") {
|
|
82
|
-
await showWebUiMenu(
|
|
82
|
+
await showWebUiMenu();
|
|
83
83
|
}
|
|
84
84
|
await showEndPrompt();
|
|
85
85
|
}
|
|
86
|
-
export async function showWebUiMenu(
|
|
87
|
-
await
|
|
86
|
+
export async function showWebUiMenu() {
|
|
87
|
+
await callCmd(webCmd, {});
|
|
88
88
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const PROJECT_ROOT: string;
|
|
2
|
-
export declare const cliVersion = "1.7.
|
|
2
|
+
export declare const cliVersion = "1.7.103";
|
|
3
3
|
export declare const cliName = "@reliverse/rse";
|
|
4
4
|
export declare const rseName = "@reliverse/rse";
|
|
5
5
|
export declare const dlerName = "@reliverse/dler";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import os from "node:os";
|
|
2
2
|
import path from "@reliverse/pathkit";
|
|
3
3
|
export const PROJECT_ROOT = path.resolve(process.cwd());
|
|
4
|
-
const version = "1.7.
|
|
4
|
+
const version = "1.7.103";
|
|
5
5
|
export const cliVersion = version;
|
|
6
6
|
export const cliName = "@reliverse/rse";
|
|
7
7
|
export const rseName = "@reliverse/rse";
|
package/bin/app/db/messages.d.ts
CHANGED
|
@@ -8,6 +8,6 @@ export declare const randomWebsiteDetailsTitle: string[];
|
|
|
8
8
|
export declare const randomAdContent: string[];
|
|
9
9
|
export declare const getRandomAd: () => string;
|
|
10
10
|
export declare const ad: string;
|
|
11
|
-
export declare const premium:
|
|
11
|
+
export declare const premium: string;
|
|
12
12
|
export declare function getWelcomeTitle(username: string): string;
|
|
13
13
|
export declare function getRandomMessage(kind: "welcome" | "initial" | "category" | "subcategory" | "details"): string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { re } from "@reliverse/relico";
|
|
2
2
|
import { relinka } from "@reliverse/relinka";
|
|
3
|
-
import {
|
|
3
|
+
import { callCmd, inputPrompt, selectPrompt } from "@reliverse/rempts";
|
|
4
4
|
import { useLanguine } from "../../../add/add-local/i18n/languine.js";
|
|
5
|
-
import {
|
|
5
|
+
import { default as betterAuthCmd } from "../../../better/auth/cmd.js";
|
|
6
6
|
import { getProjectContent } from "../../../config/cfg-content.js";
|
|
7
7
|
import { envArgImpl } from "../../../env/env-impl.js";
|
|
8
8
|
import { manageDrizzleSchema } from "../../mm-deprecated/drizzle/manageDrizzleSchema.js";
|
|
@@ -148,9 +148,10 @@ export async function handleOpenProjectMenu(projects, isDev, memory, cwd, maskIn
|
|
|
148
148
|
relinka("info", "The following args will be passed to the rse auth command:");
|
|
149
149
|
relinka("log", `--config ${selectedProject.path}/src/lib/auth.ts`);
|
|
150
150
|
relinka("log", `--output ${selectedProject.path}/src/db/schema/user/tables.ts`);
|
|
151
|
-
await
|
|
152
|
-
|
|
153
|
-
|
|
151
|
+
await callCmd(betterAuthCmd, {
|
|
152
|
+
config: `${selectedProject.path}/src/lib/auth.ts`,
|
|
153
|
+
schema: `${selectedProject.path}/src/db/schema/user/tables.ts`
|
|
154
|
+
});
|
|
154
155
|
break;
|
|
155
156
|
}
|
|
156
157
|
case "git-deploy": {
|
|
@@ -32,7 +32,7 @@ function generateReadmeContent(options) {
|
|
|
32
32
|
const hasSvelte = frontend.includes("svelte");
|
|
33
33
|
const hasSolid = frontend.includes("solid");
|
|
34
34
|
const hasNuxt = frontend.includes("nuxt");
|
|
35
|
-
const
|
|
35
|
+
const packageManagercallCmd = packageManager === "npm" ? "npm run" : packageManager;
|
|
36
36
|
let webPort = "3001";
|
|
37
37
|
if (hasReactRouter || hasSvelte) {
|
|
38
38
|
webPort = "5173";
|
|
@@ -50,12 +50,12 @@ ${isConvex ? `
|
|
|
50
50
|
## Convex Setup
|
|
51
51
|
This project uses Convex as a backend. You'll need to set up Convex before running the app:
|
|
52
52
|
\`\`\`bash
|
|
53
|
-
${
|
|
53
|
+
${packageManagercallCmd} dev:setup
|
|
54
54
|
\`\`\`
|
|
55
|
-
Follow the prompts to create a new Convex project and connect it to your application.` : generateDatabaseSetup(database, auth,
|
|
55
|
+
Follow the prompts to create a new Convex project and connect it to your application.` : generateDatabaseSetup(database, auth, packageManagercallCmd, orm)}
|
|
56
56
|
Then, run the development server:
|
|
57
57
|
\`\`\`bash
|
|
58
|
-
${
|
|
58
|
+
${packageManagercallCmd} dev
|
|
59
59
|
\`\`\`
|
|
60
60
|
${hasTanstackRouter || hasReactRouter || hasNext || hasTanstackStart || hasSvelte || hasNuxt || hasSolid ? `Open [http://localhost:${webPort}](http://localhost:${webPort}) in your browser to see the web application.` : ""}
|
|
61
61
|
${hasNative ? "Use the Expo Go app to run the mobile application.\n" : ""}
|
|
@@ -69,7 +69,7 @@ ${hasTanstackRouter || hasReactRouter || hasNext || hasTanstackStart || hasSvelt
|
|
|
69
69
|
` : ""}${hasNative ? "\u2502 \u251C\u2500\u2500 native/ # Mobile application (React Native, Expo)\n" : ""}${addons.includes("starlight") ? "\u2502 \u251C\u2500\u2500 docs/ # Documentation site (Astro Starlight)\n" : ""}${isConvex ? "\u251C\u2500\u2500 packages/\n\u2502 \u2514\u2500\u2500 backend/ # Convex backend functions and schema\n" : `\u2502 \u2514\u2500\u2500 server/ # Backend API (${backend?.[0]?.toUpperCase() ?? ""}, ${api.toUpperCase()})`}
|
|
70
70
|
\`\`\`
|
|
71
71
|
## Available Scripts
|
|
72
|
-
${generateScriptsList(
|
|
72
|
+
${generateScriptsList(packageManagercallCmd, database, orm, auth, hasNative, addons, backend)}
|
|
73
73
|
`;
|
|
74
74
|
}
|
|
75
75
|
function generateFeaturesList(database, auth, addons, orm, runtime, frontend, backend, api) {
|
|
@@ -153,7 +153,7 @@ function generateFeaturesList(database, auth, addons, orm, runtime, frontend, ba
|
|
|
153
153
|
}
|
|
154
154
|
return addonsList.join("\n");
|
|
155
155
|
}
|
|
156
|
-
function generateDatabaseSetup(database, auth,
|
|
156
|
+
function generateDatabaseSetup(database, auth, packageManagercallCmd, orm) {
|
|
157
157
|
if (database === "none") {
|
|
158
158
|
return "";
|
|
159
159
|
}
|
|
@@ -162,7 +162,7 @@ function generateDatabaseSetup(database, auth, packageManagerRunCmd, orm) {
|
|
|
162
162
|
setup += `This project uses SQLite${orm === "drizzle" ? " with Drizzle ORM" : " with Prisma"}.
|
|
163
163
|
1. Start the local SQLite database:
|
|
164
164
|
\`\`\`bash
|
|
165
|
-
cd apps/server && ${
|
|
165
|
+
cd apps/server && ${packageManagercallCmd} db:local
|
|
166
166
|
\`\`\`
|
|
167
167
|
2. Update your \`.env\` file in the \`apps/server\` directory with the appropriate connection details if needed.
|
|
168
168
|
`;
|
|
@@ -185,61 +185,61 @@ cd apps/server && ${packageManagerRunCmd} db:local
|
|
|
185
185
|
setup += `
|
|
186
186
|
${auth ? "3" : "3"}. ${orm === "prisma" ? `Generate the Prisma client and push the schema:
|
|
187
187
|
\`\`\`bash
|
|
188
|
-
${
|
|
188
|
+
${packageManagercallCmd} db:push
|
|
189
189
|
\`\`\`` : orm === "drizzle" ? `Apply the schema to your database:
|
|
190
190
|
\`\`\`bash
|
|
191
|
-
${
|
|
191
|
+
${packageManagercallCmd} db:push
|
|
192
192
|
\`\`\`` : `Apply the schema to your database:
|
|
193
193
|
\`\`\`bash
|
|
194
|
-
${
|
|
194
|
+
${packageManagercallCmd} db:push
|
|
195
195
|
\`\`\``}
|
|
196
196
|
`;
|
|
197
197
|
return setup;
|
|
198
198
|
}
|
|
199
|
-
function generateScriptsList(
|
|
199
|
+
function generateScriptsList(packageManagercallCmd, database, orm, _auth, hasNative, addons, backend) {
|
|
200
200
|
const isConvex = backend === "convex";
|
|
201
|
-
let scripts = `- \`${
|
|
202
|
-
- \`${
|
|
203
|
-
- \`${
|
|
201
|
+
let scripts = `- \`${packageManagercallCmd} dev\`: Start all applications in development mode
|
|
202
|
+
- \`${packageManagercallCmd} build\`: Build all applications
|
|
203
|
+
- \`${packageManagercallCmd} dev:web\`: Start only the web application`;
|
|
204
204
|
if (isConvex) {
|
|
205
205
|
scripts += `
|
|
206
|
-
- \`${
|
|
206
|
+
- \`${packageManagercallCmd} dev:setup\`: Setup and configure your Convex project`;
|
|
207
207
|
} else {
|
|
208
208
|
scripts += `
|
|
209
|
-
- \`${
|
|
209
|
+
- \`${packageManagercallCmd} dev:server\`: Start only the server`;
|
|
210
210
|
}
|
|
211
211
|
scripts += `
|
|
212
|
-
- \`${
|
|
212
|
+
- \`${packageManagercallCmd} check-types\`: Check TypeScript types across all apps`;
|
|
213
213
|
if (hasNative) {
|
|
214
214
|
scripts += `
|
|
215
|
-
- \`${
|
|
215
|
+
- \`${packageManagercallCmd} dev:native\`: Start the React Native/Expo development server`;
|
|
216
216
|
}
|
|
217
217
|
if (database !== "none" && !isConvex) {
|
|
218
218
|
scripts += `
|
|
219
|
-
- \`${
|
|
220
|
-
- \`${
|
|
219
|
+
- \`${packageManagercallCmd} db:push\`: Push schema changes to database
|
|
220
|
+
- \`${packageManagercallCmd} db:studio\`: Open database studio UI`;
|
|
221
221
|
if (database === "sqlite" && orm === "drizzle") {
|
|
222
222
|
scripts += `
|
|
223
|
-
- \`cd apps/server && ${
|
|
223
|
+
- \`cd apps/server && ${packageManagercallCmd} db:local\`: Start the local SQLite database`;
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
if (addons.includes("biome")) {
|
|
227
227
|
scripts += `
|
|
228
|
-
- \`${
|
|
228
|
+
- \`${packageManagercallCmd} check\`: Run Biome formatting and linting`;
|
|
229
229
|
}
|
|
230
230
|
if (addons.includes("pwa")) {
|
|
231
231
|
scripts += `
|
|
232
|
-
- \`cd apps/web && ${
|
|
232
|
+
- \`cd apps/web && ${packageManagercallCmd} generate-pwa-assets\`: Generate PWA assets`;
|
|
233
233
|
}
|
|
234
234
|
if (addons.includes("tauri")) {
|
|
235
235
|
scripts += `
|
|
236
|
-
- \`cd apps/web && ${
|
|
237
|
-
- \`cd apps/web && ${
|
|
236
|
+
- \`cd apps/web && ${packageManagercallCmd} desktop:dev\`: Start Tauri desktop app in development
|
|
237
|
+
- \`cd apps/web && ${packageManagercallCmd} desktop:build\`: Build Tauri desktop app`;
|
|
238
238
|
}
|
|
239
239
|
if (addons.includes("starlight")) {
|
|
240
240
|
scripts += `
|
|
241
|
-
- \`cd apps/docs && ${
|
|
242
|
-
- \`cd apps/docs && ${
|
|
241
|
+
- \`cd apps/docs && ${packageManagercallCmd} dev\`: Start documentation site
|
|
242
|
+
- \`cd apps/docs && ${packageManagercallCmd} build\`: Build documentation site`;
|
|
243
243
|
}
|
|
244
244
|
return scripts;
|
|
245
245
|
}
|
|
@@ -14,15 +14,15 @@ export function displayPostInstallInstructions(config) {
|
|
|
14
14
|
backend
|
|
15
15
|
} = config;
|
|
16
16
|
const isConvex = backend === "convex";
|
|
17
|
-
const
|
|
17
|
+
const callCmd = packageManager === "npm" ? "npm run" : packageManager;
|
|
18
18
|
const cdCmd = `cd ${relativePath}`;
|
|
19
19
|
const hasHuskyOrBiome = addons?.includes("husky") || addons?.includes("biome");
|
|
20
|
-
const databaseInstructions = !isConvex && database !== "none" ? getDatabaseInstructions(database, orm,
|
|
21
|
-
const tauriInstructions = addons?.includes("tauri") ? getTauriInstructions(
|
|
22
|
-
const lintingInstructions = hasHuskyOrBiome ? getLintingInstructions(
|
|
20
|
+
const databaseInstructions = !isConvex && database !== "none" ? getDatabaseInstructions(database, orm, callCmd, runtime) : "";
|
|
21
|
+
const tauriInstructions = addons?.includes("tauri") ? getTauriInstructions(callCmd) : "";
|
|
22
|
+
const lintingInstructions = hasHuskyOrBiome ? getLintingInstructions(callCmd) : "";
|
|
23
23
|
const nativeInstructions = frontend?.includes("native-nativewind") || frontend?.includes("native-unistyles") ? getNativeInstructions(isConvex) : "";
|
|
24
24
|
const pwaInstructions = addons?.includes("pwa") && (frontend?.includes("react-router") || frontend?.includes("tanstack-router")) ? getPwaInstructions() : "";
|
|
25
|
-
const starlightInstructions = addons?.includes("starlight") ? getStarlightInstructions(
|
|
25
|
+
const starlightInstructions = addons?.includes("starlight") ? getStarlightInstructions(callCmd) : "";
|
|
26
26
|
const hasWeb = frontend?.some(
|
|
27
27
|
(f) => [
|
|
28
28
|
"tanstack-router",
|
|
@@ -50,15 +50,15 @@ ${re.cyan("1.")} ${cdCmd}
|
|
|
50
50
|
`;
|
|
51
51
|
}
|
|
52
52
|
if (isConvex) {
|
|
53
|
-
output += `${re.cyan(`${stepCounter++}.`)} ${
|
|
53
|
+
output += `${re.cyan(`${stepCounter++}.`)} ${callCmd} dev:setup ${re.dim(
|
|
54
54
|
"(this will guide you through Convex project setup)"
|
|
55
55
|
)}
|
|
56
56
|
`;
|
|
57
|
-
output += `${re.cyan(`${stepCounter++}.`)} ${
|
|
57
|
+
output += `${re.cyan(`${stepCounter++}.`)} ${callCmd} dev
|
|
58
58
|
`;
|
|
59
59
|
} else {
|
|
60
60
|
if (runtime !== "workers") {
|
|
61
|
-
output += `${re.cyan(`${stepCounter++}.`)} ${
|
|
61
|
+
output += `${re.cyan(`${stepCounter++}.`)} ${callCmd} dev
|
|
62
62
|
`;
|
|
63
63
|
}
|
|
64
64
|
if (runtime === "workers") {
|
|
@@ -140,14 +140,14 @@ instead of localhost or 127.0.0.1 for proper connectivity.
|
|
|
140
140
|
}
|
|
141
141
|
return instructions;
|
|
142
142
|
}
|
|
143
|
-
function getLintingInstructions(
|
|
143
|
+
function getLintingInstructions(callCmd) {
|
|
144
144
|
return `${re.bold("Linting and formatting:")}
|
|
145
145
|
${re.cyan(
|
|
146
146
|
"\u2022"
|
|
147
|
-
)} Format and lint fix: ${`${
|
|
147
|
+
)} Format and lint fix: ${`${callCmd} check`}
|
|
148
148
|
`;
|
|
149
149
|
}
|
|
150
|
-
function getDatabaseInstructions(database, orm,
|
|
150
|
+
function getDatabaseInstructions(database, orm, callCmd, runtime) {
|
|
151
151
|
const instructions = [];
|
|
152
152
|
if (orm === "prisma") {
|
|
153
153
|
if (database === "sqlite") {
|
|
@@ -166,14 +166,14 @@ function getDatabaseInstructions(database, orm, runCmd, runtime) {
|
|
|
166
166
|
follow the guidance provided in the error messages`
|
|
167
167
|
);
|
|
168
168
|
}
|
|
169
|
-
instructions.push(`${re.cyan("\u2022")} Apply schema: ${`${
|
|
170
|
-
instructions.push(`${re.cyan("\u2022")} Database UI: ${`${
|
|
169
|
+
instructions.push(`${re.cyan("\u2022")} Apply schema: ${`${callCmd} db:push`}`);
|
|
170
|
+
instructions.push(`${re.cyan("\u2022")} Database UI: ${`${callCmd} db:studio`}`);
|
|
171
171
|
} else if (orm === "drizzle") {
|
|
172
|
-
instructions.push(`${re.cyan("\u2022")} Apply schema: ${`${
|
|
173
|
-
instructions.push(`${re.cyan("\u2022")} Database UI: ${`${
|
|
172
|
+
instructions.push(`${re.cyan("\u2022")} Apply schema: ${`${callCmd} db:push`}`);
|
|
173
|
+
instructions.push(`${re.cyan("\u2022")} Database UI: ${`${callCmd} db:studio`}`);
|
|
174
174
|
if (database === "sqlite") {
|
|
175
175
|
instructions.push(
|
|
176
|
-
`${re.cyan("\u2022")} Start local DB (if needed): ${`cd apps/server && ${
|
|
176
|
+
`${re.cyan("\u2022")} Start local DB (if needed): ${`cd apps/server && ${callCmd} db:local`}`
|
|
177
177
|
);
|
|
178
178
|
}
|
|
179
179
|
} else if (orm === "none") {
|
|
@@ -182,15 +182,15 @@ follow the guidance provided in the error messages`
|
|
|
182
182
|
return instructions.length ? `${re.bold("Database commands:")}
|
|
183
183
|
${instructions.join("\n")}` : "";
|
|
184
184
|
}
|
|
185
|
-
function getTauriInstructions(
|
|
185
|
+
function getTauriInstructions(callCmd) {
|
|
186
186
|
return `
|
|
187
187
|
${re.bold("Desktop app with Tauri:")}
|
|
188
188
|
${re.cyan(
|
|
189
189
|
"\u2022"
|
|
190
|
-
)} Start desktop app: ${`cd apps/web && ${
|
|
190
|
+
)} Start desktop app: ${`cd apps/web && ${callCmd} desktop:dev`}
|
|
191
191
|
${re.cyan(
|
|
192
192
|
"\u2022"
|
|
193
|
-
)} Build desktop app: ${`cd apps/web && ${
|
|
193
|
+
)} Build desktop app: ${`cd apps/web && ${callCmd} desktop:build`}
|
|
194
194
|
${re.yellow(
|
|
195
195
|
"NOTE:"
|
|
196
196
|
)} Tauri requires Rust and platform-specific dependencies.
|
|
@@ -204,15 +204,15 @@ ${re.yellow(
|
|
|
204
204
|
)} There is a known compatibility issue between VitePWA and React Router v7.
|
|
205
205
|
See: https://github.com/vite-pwa/vite-plugin-pwa/issues/809`;
|
|
206
206
|
}
|
|
207
|
-
function getStarlightInstructions(
|
|
207
|
+
function getStarlightInstructions(callCmd) {
|
|
208
208
|
return `
|
|
209
209
|
${re.bold("Documentation with Starlight:")}
|
|
210
210
|
${re.cyan(
|
|
211
211
|
"\u2022"
|
|
212
|
-
)} Start docs site: ${`cd apps/docs && ${
|
|
212
|
+
)} Start docs site: ${`cd apps/docs && ${callCmd} dev`}
|
|
213
213
|
${re.cyan(
|
|
214
214
|
"\u2022"
|
|
215
|
-
)} Build docs site: ${`cd apps/docs && ${
|
|
215
|
+
)} Build docs site: ${`cd apps/docs && ${callCmd} build`}`;
|
|
216
216
|
}
|
|
217
217
|
function getNoOrmWarning() {
|
|
218
218
|
return `
|
|
@@ -9,8 +9,8 @@ export declare const DatabaseSchema: z.ZodEnum<{
|
|
|
9
9
|
export type Database = z.infer<typeof DatabaseSchema>;
|
|
10
10
|
export declare const ORMSchema: z.ZodEnum<{
|
|
11
11
|
none: "none";
|
|
12
|
-
mongoose: "mongoose";
|
|
13
12
|
drizzle: "drizzle";
|
|
13
|
+
mongoose: "mongoose";
|
|
14
14
|
prisma: "prisma";
|
|
15
15
|
}>;
|
|
16
16
|
export type ORM = z.infer<typeof ORMSchema>;
|
|
@@ -20,14 +20,14 @@ export declare const BackendSchema: z.ZodEnum<{
|
|
|
20
20
|
next: "next";
|
|
21
21
|
express: "express";
|
|
22
22
|
fastify: "fastify";
|
|
23
|
-
convex: "convex";
|
|
24
23
|
elysia: "elysia";
|
|
24
|
+
convex: "convex";
|
|
25
25
|
}>;
|
|
26
26
|
export type Backend = z.infer<typeof BackendSchema>;
|
|
27
27
|
export declare const RuntimeSchema: z.ZodEnum<{
|
|
28
28
|
bun: "bun";
|
|
29
|
-
node: "node";
|
|
30
29
|
none: "none";
|
|
30
|
+
node: "node";
|
|
31
31
|
workers: "workers";
|
|
32
32
|
}>;
|
|
33
33
|
export type Runtime = z.infer<typeof RuntimeSchema>;
|
|
@@ -36,8 +36,8 @@ export declare const FrontendSchema: z.ZodEnum<{
|
|
|
36
36
|
svelte: "svelte";
|
|
37
37
|
nuxt: "nuxt";
|
|
38
38
|
solid: "solid";
|
|
39
|
-
next: "next";
|
|
40
39
|
"react-router": "react-router";
|
|
40
|
+
next: "next";
|
|
41
41
|
"tanstack-router": "tanstack-router";
|
|
42
42
|
"tanstack-start": "tanstack-start";
|
|
43
43
|
"native-nativewind": "native-nativewind";
|
|
@@ -55,21 +55,21 @@ export declare const AddonsSchema: z.ZodEnum<{
|
|
|
55
55
|
}>;
|
|
56
56
|
export type Addons = z.infer<typeof AddonsSchema>;
|
|
57
57
|
export declare const ExamplesSchema: z.ZodEnum<{
|
|
58
|
-
ai: "ai";
|
|
59
58
|
none: "none";
|
|
59
|
+
ai: "ai";
|
|
60
60
|
todo: "todo";
|
|
61
61
|
}>;
|
|
62
62
|
export type Examples = z.infer<typeof ExamplesSchema>;
|
|
63
63
|
export declare const PackageManagerSchema: z.ZodEnum<{
|
|
64
|
-
bun: "bun";
|
|
65
64
|
npm: "npm";
|
|
65
|
+
bun: "bun";
|
|
66
66
|
pnpm: "pnpm";
|
|
67
67
|
}>;
|
|
68
68
|
export type PackageManager = z.infer<typeof PackageManagerSchema>;
|
|
69
69
|
export declare const DatabaseSetupSchema: z.ZodEnum<{
|
|
70
70
|
none: "none";
|
|
71
|
-
neon: "neon";
|
|
72
71
|
supabase: "supabase";
|
|
72
|
+
neon: "neon";
|
|
73
73
|
turso: "turso";
|
|
74
74
|
"prisma-postgres": "prisma-postgres";
|
|
75
75
|
"mongodb-atlas": "mongodb-atlas";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { ProjectConfig } from "../types.js";
|
|
2
|
-
export declare function displayConfig(config: Partial<ProjectConfig>):
|
|
2
|
+
export declare function displayConfig(config: Partial<ProjectConfig>): string;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
declare const _default: import("@reliverse/rempts").Command<{
|
|
2
|
+
projectName: {
|
|
3
|
+
type: "string";
|
|
4
|
+
description: string;
|
|
5
|
+
};
|
|
6
|
+
yes: {
|
|
7
|
+
type: "boolean";
|
|
8
|
+
description: string;
|
|
9
|
+
default: false;
|
|
10
|
+
};
|
|
11
|
+
database: {
|
|
12
|
+
type: "string";
|
|
13
|
+
description: string;
|
|
14
|
+
allowed: string[];
|
|
15
|
+
};
|
|
16
|
+
orm: {
|
|
17
|
+
type: "string";
|
|
18
|
+
description: string;
|
|
19
|
+
allowed: string[];
|
|
20
|
+
};
|
|
21
|
+
auth: {
|
|
22
|
+
type: "boolean";
|
|
23
|
+
description: string;
|
|
24
|
+
};
|
|
25
|
+
frontend: {
|
|
26
|
+
type: "array";
|
|
27
|
+
description: string;
|
|
28
|
+
allowed: string[];
|
|
29
|
+
};
|
|
30
|
+
addons: {
|
|
31
|
+
type: "array";
|
|
32
|
+
description: string;
|
|
33
|
+
allowed: string[];
|
|
34
|
+
};
|
|
35
|
+
examples: {
|
|
36
|
+
type: "array";
|
|
37
|
+
description: string;
|
|
38
|
+
allowed: string[];
|
|
39
|
+
};
|
|
40
|
+
git: {
|
|
41
|
+
type: "boolean";
|
|
42
|
+
description: string;
|
|
43
|
+
};
|
|
44
|
+
packageManager: {
|
|
45
|
+
type: "string";
|
|
46
|
+
description: string;
|
|
47
|
+
allowed: string[];
|
|
48
|
+
};
|
|
49
|
+
install: {
|
|
50
|
+
type: "boolean";
|
|
51
|
+
description: string;
|
|
52
|
+
};
|
|
53
|
+
dbSetup: {
|
|
54
|
+
type: "string";
|
|
55
|
+
description: string;
|
|
56
|
+
allowed: string[];
|
|
57
|
+
};
|
|
58
|
+
backend: {
|
|
59
|
+
type: "string";
|
|
60
|
+
description: string;
|
|
61
|
+
allowed: string[];
|
|
62
|
+
};
|
|
63
|
+
runtime: {
|
|
64
|
+
type: "string";
|
|
65
|
+
description: string;
|
|
66
|
+
allowed: string[];
|
|
67
|
+
};
|
|
68
|
+
api: {
|
|
69
|
+
type: "string";
|
|
70
|
+
description: string;
|
|
71
|
+
allowed: string[];
|
|
72
|
+
};
|
|
73
|
+
}>;
|
|
74
|
+
export default _default;
|