@reliverse/dler 1.7.69 → 1.7.70

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.
Files changed (76) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +74 -98
  3. package/bin/app/build/cmd.js +0 -2
  4. package/bin/app/cmds.d.ts +1 -0
  5. package/bin/app/cmds.js +1 -0
  6. package/bin/app/get/cmd.d.ts +1 -0
  7. package/bin/app/get/cmd.js +1 -0
  8. package/bin/app/remove/cmd.d.ts +6 -0
  9. package/bin/app/remove/cmd.js +185 -1
  10. package/bin/app/update/cmd.d.ts +11 -0
  11. package/bin/app/update/cmd.js +277 -2
  12. package/bin/app/upgrade/cmd.d.ts +8 -0
  13. package/bin/app/upgrade/cmd.js +295 -0
  14. package/bin/cli.js +16 -10
  15. package/bin/libs/cfg/cfg-impl/cfg-consts.d.ts +1 -1
  16. package/bin/libs/cfg/cfg-impl/cfg-consts.js +1 -1
  17. package/bin/libs/cfg/cfg-mod.d.ts +1 -23
  18. package/bin/libs/cfg/cfg-mod.js +1 -85
  19. package/bin/libs/get/mod.d.ts +37 -0
  20. package/bin/libs/get/mod.js +509 -0
  21. package/bin/libs/sdk/sdk-impl/config/default.d.ts +1 -1
  22. package/bin/libs/sdk/sdk-impl/config/default.js +1 -1
  23. package/bin/libs/sdk/sdk-impl/config/info.js +1 -1
  24. package/bin/libs/sdk/sdk-impl/config/init.d.ts +1 -0
  25. package/bin/libs/sdk/sdk-impl/config/init.js +98 -5
  26. package/bin/libs/sdk/sdk-impl/config/load.js +4 -4
  27. package/bin/libs/sdk/sdk-impl/utils/exec/exec-mod.js +0 -8
  28. package/bin/libs/sdk/sdk-mod.d.ts +1 -1
  29. package/bin/libs/sdk/sdk-mod.js +1 -1
  30. package/bin/mod.d.ts +1 -1
  31. package/bin/mod.js +1 -1
  32. package/package.json +3 -9
  33. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-biome.d.ts +0 -2
  34. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-biome.js +0 -34
  35. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-comments.d.ts +0 -1
  36. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-comments.js +0 -57
  37. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-consts.d.ts +0 -34
  38. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-consts.js +0 -36
  39. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-content.d.ts +0 -14
  40. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-content.js +0 -15
  41. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-core.d.ts +0 -14
  42. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-core.js +0 -63
  43. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-create.d.ts +0 -36
  44. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-create.js +0 -275
  45. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-def-utils.d.ts +0 -6
  46. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-def-utils.js +0 -225
  47. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-default.d.ts +0 -3
  48. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-default.js +0 -155
  49. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-define.d.ts +0 -125
  50. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-define.js +0 -4
  51. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-detect.d.ts +0 -23
  52. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-detect.js +0 -347
  53. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-gen-cfg.d.ts +0 -3
  54. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-gen-cfg.js +0 -186
  55. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-migrate.d.ts +0 -5
  56. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-migrate.js +0 -56
  57. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-path.d.ts +0 -11
  58. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-path.js +0 -33
  59. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-prompts.d.ts +0 -5
  60. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-prompts.js +0 -12
  61. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-read.d.ts +0 -11
  62. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-read.js +0 -84
  63. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-repair.d.ts +0 -16
  64. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-repair.js +0 -137
  65. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-schema.d.ts +0 -130
  66. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-schema.js +0 -438
  67. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-types.d.ts +0 -75
  68. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-types.js +0 -0
  69. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-unstable.d.ts +0 -11
  70. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-unstable.js +0 -41
  71. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-update.d.ts +0 -10
  72. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-update.js +0 -152
  73. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-utils.d.ts +0 -17
  74. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-utils.js +0 -86
  75. package/bin/libs/cfg/cfg-impl/rse-config/rse-mod.d.ts +0 -20
  76. package/bin/libs/cfg/cfg-impl/rse-config/rse-mod.js +0 -20
@@ -1,125 +0,0 @@
1
- import type { RseConfig } from "./rse-types";
2
- export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
3
- version?: string | undefined;
4
- $schema?: "./schema.json" | "https://reliverse.org/schema.json" | undefined;
5
- projectName?: string | undefined;
6
- projectAuthor?: string | undefined;
7
- projectDescription?: string | undefined;
8
- projectLicense?: string | undefined;
9
- projectRepository?: string | undefined;
10
- projectDomain?: string | undefined;
11
- projectGitService?: "none" | "github" | "gitlab" | "bitbucket" | undefined;
12
- projectDeployService?: "none" | "vercel" | "netlify" | "railway" | "deno" | undefined;
13
- projectPackageManager?: "npm" | "bun" | "pnpm" | "yarn" | undefined;
14
- projectState?: "creating" | "created" | undefined;
15
- projectCategory?: "browser" | "cli" | "unknown" | "website" | "vscode" | "library" | "mobile" | undefined;
16
- projectSubcategory?: "unknown" | "e-commerce" | "tool" | undefined;
17
- projectFramework?: "vue" | "unknown" | "vscode" | "nextjs" | "vite" | "svelte" | "remix" | "astro" | "nuxt" | "solid" | "qwik" | "wxt" | "lynx" | "react-native" | "expo" | "capacitor" | "ionic" | "electron" | "tauri" | "neutralino" | "rempts" | "citty" | "commander" | "cac" | "meow" | "yargs" | "webextension" | "browser-extension" | "npm-jsr" | undefined;
18
- projectTemplate?: "unknown" | "blefnk/relivator-nextjs-template" | "blefnk/relivator-docker-template" | "blefnk/next-react-ts-src-minimal" | "blefnk/all-in-one-nextjs-template" | "blefnk/create-t3-app" | "blefnk/create-next-app" | "blefnk/astro-starlight-template" | "blefnk/versator-nextjs-template" | "blefnk/relivator-lynxjs-template" | "blefnk/relivator-react-native-template" | "reliverse/template-browser-extension" | "microsoft/vscode-extension-samples" | "microsoft/vscode-extension-template" | "rsetarter-template" | "blefnk/deno-cli-tutorial" | undefined;
19
- projectTemplateDate?: string | undefined;
20
- features?: {
21
- i18n?: boolean | undefined;
22
- analytics?: boolean | undefined;
23
- themeMode?: "light" | "dark" | "dark-light" | undefined;
24
- authentication?: boolean | undefined;
25
- api?: boolean | undefined;
26
- database?: boolean | undefined;
27
- testing?: boolean | undefined;
28
- docker?: boolean | undefined;
29
- ci?: boolean | undefined;
30
- commands?: string[] | undefined;
31
- webview?: string[] | undefined;
32
- language?: string[] | undefined;
33
- themes?: string[] | undefined;
34
- } | undefined;
35
- preferredLibraries?: {
36
- i18n?: "unknown" | "next-intl" | undefined;
37
- analytics?: "unknown" | "vercel" | undefined;
38
- authentication?: "unknown" | "better-auth" | "clerk" | "next-auth" | "supabase-auth" | "auth0" | undefined;
39
- api?: "unknown" | "hono" | "trpc" | "graphql" | "rest" | undefined;
40
- testing?: "bun" | "unknown" | "vitest" | "jest" | "playwright" | "cypress" | undefined;
41
- stateManagement?: "unknown" | "zustand" | "jotai" | "redux-toolkit" | undefined;
42
- formManagement?: "unknown" | "react-hook-form" | "formik" | undefined;
43
- styling?: "sass" | "unknown" | "tailwind" | "styled-components" | "css-modules" | undefined;
44
- uiComponents?: "unknown" | "shadcn-ui" | "chakra-ui" | "material-ui" | undefined;
45
- databaseLibrary?: "unknown" | "drizzle" | "prisma" | "supabase" | undefined;
46
- databaseProvider?: "unknown" | "pg" | "mysql" | "sqlite" | "mongodb" | undefined;
47
- linting?: "eslint" | "unknown" | undefined;
48
- formatting?: "biome" | "unknown" | undefined;
49
- payment?: "unknown" | "stripe" | undefined;
50
- monitoring?: "unknown" | "sentry" | undefined;
51
- logging?: "unknown" | "axiom" | undefined;
52
- forms?: "unknown" | "react-hook-form" | undefined;
53
- notifications?: "unknown" | "sonner" | undefined;
54
- search?: "unknown" | "algolia" | undefined;
55
- uploads?: "unknown" | "uploadthing" | undefined;
56
- validation?: "unknown" | "zod" | "typebox" | "valibot" | undefined;
57
- documentation?: "unknown" | "starlight" | "nextra" | undefined;
58
- icons?: "unknown" | "lucide" | undefined;
59
- mail?: "unknown" | "resend" | undefined;
60
- cache?: "unknown" | "redis" | undefined;
61
- storage?: "unknown" | "cloudflare" | undefined;
62
- cdn?: "unknown" | "cloudflare" | undefined;
63
- cms?: "unknown" | "contentlayer" | undefined;
64
- seo?: "unknown" | "next-seo" | undefined;
65
- motion?: "unknown" | "framer" | undefined;
66
- charts?: "unknown" | "recharts" | undefined;
67
- dates?: "unknown" | "dayjs" | undefined;
68
- markdown?: "unknown" | "mdx" | undefined;
69
- security?: "unknown" | "auth" | undefined;
70
- routing?: "unknown" | "next" | "react-router" | "tanstack-router" | undefined;
71
- } | undefined;
72
- codeStyle?: {
73
- lineWidth?: number | undefined;
74
- indentSize?: number | undefined;
75
- indentStyle?: "space" | "tab" | undefined;
76
- quoteMark?: "single" | "double" | undefined;
77
- semicolons?: boolean | undefined;
78
- trailingComma?: "none" | "es5" | "all" | undefined;
79
- bracketSpacing?: boolean | undefined;
80
- arrowParens?: "always" | "avoid" | undefined;
81
- tabWidth?: number | undefined;
82
- jsToTs?: boolean | undefined;
83
- dontRemoveComments?: boolean | undefined;
84
- shouldAddComments?: boolean | undefined;
85
- typeOrInterface?: "type" | "interface" | "mixed" | undefined;
86
- importOrRequire?: "import" | "require" | "mixed" | undefined;
87
- cjsToEsm?: boolean | undefined;
88
- modernize?: {
89
- replaceFs?: boolean | undefined;
90
- replacePath?: boolean | undefined;
91
- replaceHttp?: boolean | undefined;
92
- replaceProcess?: boolean | undefined;
93
- replaceConsole?: boolean | undefined;
94
- replaceEvents?: boolean | undefined;
95
- } | undefined;
96
- importSymbol?: string | undefined;
97
- } | undefined;
98
- monorepo?: {
99
- type?: "none" | "bun" | "pnpm" | "turborepo" | "nx" | undefined;
100
- packages?: string[] | undefined;
101
- sharedPackages?: string[] | undefined;
102
- } | undefined;
103
- ignoreDependencies?: string[] | undefined;
104
- customRules?: {
105
- [x: string]: unknown;
106
- } | undefined;
107
- multipleRepoCloneMode?: boolean | undefined;
108
- customUserFocusedRepos?: string[] | undefined;
109
- customDevsFocusedRepos?: string[] | undefined;
110
- hideRepoSuggestions?: boolean | undefined;
111
- customReposOnNewProject?: boolean | undefined;
112
- envComposerOpenBrowser?: boolean | undefined;
113
- repoBranch?: string | undefined;
114
- repoPrivacy?: "unknown" | "public" | "private" | undefined;
115
- projectArchitecture?: "unknown" | "fullstack" | "separated" | undefined;
116
- projectRuntime?: "node" | "bun" | "deno" | undefined;
117
- skipPromptsUseAutoBehavior?: boolean | undefined;
118
- deployBehavior?: "prompt" | "autoYes" | "autoNo" | undefined;
119
- depsBehavior?: "prompt" | "autoYes" | "autoNo" | undefined;
120
- gitBehavior?: "prompt" | "autoYes" | "autoNo" | undefined;
121
- i18nBehavior?: "prompt" | "autoYes" | "autoNo" | undefined;
122
- scriptsBehavior?: "prompt" | "autoYes" | "autoNo" | undefined;
123
- existingRepoBehavior?: "prompt" | "autoYes" | "autoNo" | "autoYesSkipCommit" | undefined;
124
- relinterConfirm?: "autoYes" | "promptOnce" | "promptEachFile" | undefined;
125
- };
@@ -1,4 +0,0 @@
1
- import { DEFAULT_CONFIG_RSE } from "./rse-default.js";
2
- export const defineConfigRse = (userConfig = {}) => {
3
- return { ...DEFAULT_CONFIG_RSE, ...userConfig };
4
- };
@@ -1,23 +0,0 @@
1
- import { type PackageJson } from "pkg-types";
2
- import type { ProjectFramework } from "./rse-types";
3
- import type { DetectedProject } from "./rse-types";
4
- export declare function detectProjectFramework(projectPath: string): Promise<ProjectFramework | null>;
5
- export declare function getPackageJson(projectPath: string): Promise<PackageJson | null>;
6
- export declare function getPackageJsonSafe(projectPath: string): Promise<PackageJson | null>;
7
- export declare function detectProject(projectPath: string, isDev: boolean): Promise<DetectedProject | null>;
8
- export declare function detectProjectsWithRseConfig(projectPath: string, isDev: boolean): Promise<DetectedProject[]>;
9
- export declare function detectFeatures(projectPath: string, packageJson: PackageJson | null): Promise<{
10
- i18n: boolean;
11
- analytics: boolean;
12
- themeMode: "light" | "dark" | "dark-light";
13
- authentication: boolean;
14
- api: boolean;
15
- database: boolean;
16
- testing: boolean;
17
- docker: boolean;
18
- ci: boolean;
19
- commands: string[];
20
- webview: string[];
21
- language: string[];
22
- themes: string[];
23
- }>;
@@ -1,347 +0,0 @@
1
- import path from "@reliverse/pathkit";
2
- import fs from "@reliverse/relifso";
3
- import { relinka } from "@reliverse/relinka";
4
- import { readPackageJSON } from "pkg-types";
5
- import { getProjectContent } from "./rse-content.js";
6
- import { PROJECT_FRAMEWORK_FILES } from "./rse-default.js";
7
- import { getRseConfigPath } from "./rse-path.js";
8
- import { readRseConfig } from "./rse-read.js";
9
- export async function detectProjectFramework(projectPath) {
10
- const packageJson = await getPackageJson(projectPath);
11
- if (!packageJson) {
12
- for (const [type, files] of Object.entries(PROJECT_FRAMEWORK_FILES)) {
13
- for (const file of files) {
14
- const [filePath = file] = file.split(":");
15
- if (filePath !== "package.json" && await fs.pathExists(path.join(projectPath, filePath))) {
16
- return type;
17
- }
18
- }
19
- }
20
- return null;
21
- }
22
- const deps = {
23
- ...packageJson.dependencies ?? {},
24
- ...packageJson.devDependencies ?? {}
25
- };
26
- const matches = [];
27
- for (const [type, files] of Object.entries(PROJECT_FRAMEWORK_FILES)) {
28
- for (const file of files) {
29
- const [filePath = file, packageName] = file.split(":");
30
- if (filePath === "package.json" && packageName) {
31
- if (packageName in deps) {
32
- matches.push({ type, priority: 1 });
33
- }
34
- }
35
- }
36
- }
37
- if (matches.length > 0) {
38
- const [firstMatch] = matches;
39
- return firstMatch?.type ?? null;
40
- }
41
- for (const [type, files] of Object.entries(PROJECT_FRAMEWORK_FILES)) {
42
- for (const file of files) {
43
- const [filePath = file] = file.split(":");
44
- if (filePath !== "package.json" && await fs.pathExists(path.join(projectPath, filePath))) {
45
- return type;
46
- }
47
- }
48
- }
49
- return null;
50
- }
51
- export async function getPackageJson(projectPath) {
52
- try {
53
- const packageJsonPath = path.join(projectPath, "package.json");
54
- if (!await fs.pathExists(packageJsonPath)) return null;
55
- return await readPackageJSON(projectPath);
56
- } catch (error) {
57
- const packageJsonPath = path.join(projectPath, "package.json");
58
- if (await fs.pathExists(packageJsonPath)) {
59
- relinka(
60
- "warn",
61
- "Could not read package.json:",
62
- error instanceof Error ? error.message : String(error)
63
- );
64
- }
65
- return null;
66
- }
67
- }
68
- export async function getPackageJsonSafe(projectPath) {
69
- const packageJsonPath = path.join(projectPath, "package.json");
70
- if (!await fs.pathExists(packageJsonPath)) return null;
71
- return await readPackageJSON(projectPath);
72
- }
73
- export async function detectProject(projectPath, isDev) {
74
- try {
75
- const { requiredContent, optionalContent } = await getProjectContent(projectPath);
76
- if (!requiredContent.filePackageJson) return null;
77
- const { configPath } = await getRseConfigPath(projectPath, isDev, false);
78
- if (!await fs.pathExists(configPath)) return null;
79
- const config = await readRseConfig(configPath, isDev);
80
- if (!config) return null;
81
- return {
82
- name: path.basename(projectPath),
83
- path: projectPath,
84
- config,
85
- needsDepsInstall: !optionalContent.dirNodeModules,
86
- hasGit: optionalContent.dirGit
87
- };
88
- } catch (error) {
89
- relinka(
90
- "warn",
91
- `Error processing ${projectPath}: ${error instanceof Error ? error.message : String(error)}`
92
- );
93
- return null;
94
- }
95
- }
96
- export async function detectProjectsWithRseConfig(projectPath, isDev) {
97
- const detected = [];
98
- const rootProject = await detectProject(projectPath, isDev);
99
- if (rootProject) detected.push(rootProject);
100
- try {
101
- const items = await fs.readdir(projectPath, { withFileTypes: true });
102
- const subProjects = await Promise.all(
103
- items.filter((item) => item.isDirectory()).map(async (item) => {
104
- const effectiveProjectPath = path.join(projectPath, item.name);
105
- return await detectProject(effectiveProjectPath, isDev);
106
- })
107
- );
108
- for (const project of subProjects) {
109
- if (project) detected.push(project);
110
- }
111
- } catch (error) {
112
- relinka(
113
- "warn",
114
- `Error reading directory ${projectPath}: ${error instanceof Error ? error.message : String(error)}`
115
- );
116
- }
117
- return detected;
118
- }
119
- export async function detectFeatures(projectPath, packageJson) {
120
- const deps = {
121
- ...packageJson?.dependencies ?? {},
122
- ...packageJson?.devDependencies ?? {}
123
- };
124
- const hasNextAuth = "next-auth" in deps;
125
- const hasClerk = "@clerk/nextjs" in deps;
126
- const hasBetterAuth = "better-auth" in deps;
127
- const hasAuth0 = "@auth0/nextjs-auth0" in deps;
128
- const hasPrisma = "@prisma/client" in deps;
129
- const hasDrizzle = "drizzle-orm" in deps;
130
- const hasSupabase = "@supabase/supabase-js" in deps;
131
- const hasMongoose = "mongoose" in deps;
132
- const hasPg = "pg" in deps || "@neondatabase/serverless" in deps;
133
- const hasMysql = "mysql" in deps || "mysql2" in deps;
134
- const hasSqlite = "sqlite" in deps || "sqlite3" in deps || "better-sqlite3" in deps;
135
- const hasMongo = "mongodb" in deps || "mongoose" in deps;
136
- const hasVercelAnalytics = "@vercel/analytics" in deps;
137
- const hasSegmentAnalytics = "@segment/analytics-next" in deps;
138
- const hasGoogleAnalytics = "ga-4-react" in deps || "react-ga" in deps;
139
- const hasPlausible = "next-plausible" in deps;
140
- const hasFathom = "fathom-client" in deps;
141
- const hasZustand = "zustand" in deps;
142
- const hasJotai = "jotai" in deps;
143
- const hasRedux = "@reduxjs/toolkit" in deps || "redux" in deps;
144
- const hasReactHookForm = "react-hook-form" in deps;
145
- const hasFormik = "formik" in deps;
146
- const hasTailwind = "tailwindcss" in deps;
147
- const hasStyledComponents = "styled-components" in deps;
148
- const hasCssModules = packageJson?.dependencies && Object.keys(deps).some((key) => key.includes("css-loader") || key.includes("css-modules"));
149
- const hasSass = "sass" in deps || "node-sass" in deps;
150
- const hasShadcnUi = await fs.pathExists(path.join(projectPath, "components/ui"));
151
- const hasChakraUi = "@chakra-ui/react" in deps;
152
- const hasMaterialUi = "@mui/material" in deps;
153
- const hasBunTest = packageJson?.scripts && Object.values(packageJson.scripts).some(
154
- (script) => script && typeof script === "string" && script.includes("bun test")
155
- );
156
- const hasVitest = "vitest" in deps;
157
- const hasJest = "jest" in deps;
158
- const hasPlaywright = "@playwright/test" in deps;
159
- const hasCypress = "cypress" in deps;
160
- const hasHono = "hono" in deps;
161
- const hasTrpc = "@trpc/server" in deps;
162
- const hasGraphql = "graphql" in deps || "apollo-server" in deps;
163
- const hasRest = await fs.pathExists(path.join(projectPath, "src/api")) || await fs.pathExists(path.join(projectPath, "src/app/api"));
164
- const hasEslint = "eslint" in deps;
165
- const hasBiome = "@biomejs/biome" in deps;
166
- const hasStripe = "stripe" in deps || "@stripe/stripe-js" in deps;
167
- const hasSentry = "@sentry/nextjs" in deps || "@sentry/react" in deps;
168
- const hasAxiom = "next-axiom" in deps;
169
- const hasSonner = "sonner" in deps;
170
- const hasAlgolia = "algoliasearch" in deps || "react-instantsearch" in deps;
171
- const hasUploadthing = "uploadthing" in deps;
172
- const hasZod = "zod" in deps;
173
- const hasTypebox = "@sinclair/typebox" in deps;
174
- const hasValibot = "valibot" in deps;
175
- const hasStarlight = "@astrojs/starlight" in deps;
176
- const hasNextra = "nextra" in deps;
177
- const hasLucide = "lucide-react" in deps;
178
- const hasResend = "resend" in deps;
179
- const hasRedis = "redis" in deps || "@upstash/redis" in deps;
180
- const hasCloudflare = "cloudflare" in deps || "@cloudflare/workers-types" in deps;
181
- const hasContentlayer = "contentlayer" in deps;
182
- const hasNextIntl = "next-intl" in deps;
183
- const hasI18next = "i18next" in deps || "react-i18next" in deps;
184
- const hasRosetta = "rosetta" in deps;
185
- const hasNextSeo = "next-seo" in deps;
186
- const hasFramer = "framer-motion" in deps;
187
- const hasRecharts = "recharts" in deps;
188
- const hasDayjs = "dayjs" in deps;
189
- const hasMdx = "mdx" in deps || "@next/mdx" in deps;
190
- const hasDocker = await fs.pathExists(path.join(projectPath, "Dockerfile"));
191
- const hasCI = await fs.pathExists(path.join(projectPath, ".github/workflows")) || await fs.pathExists(path.join(projectPath, ".gitlab-ci.yml"));
192
- const languages = ["typescript"];
193
- if ("python" in deps || await fs.pathExists(path.join(projectPath, "requirements.txt"))) {
194
- languages.push("python");
195
- }
196
- if (await fs.pathExists(path.join(projectPath, "go.mod"))) {
197
- languages.push("go");
198
- }
199
- if (await fs.pathExists(path.join(projectPath, "Cargo.toml"))) {
200
- languages.push("rust");
201
- }
202
- const themes = ["default"];
203
- if (hasTailwind) {
204
- themes.push("tailwind");
205
- }
206
- if (hasChakraUi) {
207
- themes.push("chakra");
208
- }
209
- if (hasMaterialUi) {
210
- themes.push("material");
211
- }
212
- if (hasStyledComponents) {
213
- themes.push("styled-components");
214
- }
215
- if (hasCssModules) {
216
- themes.push("css-modules");
217
- }
218
- if (hasSass) {
219
- themes.push("sass");
220
- }
221
- if (hasShadcnUi) {
222
- themes.push("shadcn");
223
- }
224
- if (hasZustand) {
225
- themes.push("zustand");
226
- }
227
- if (hasJotai) {
228
- themes.push("jotai");
229
- }
230
- if (hasRedux) {
231
- themes.push("redux");
232
- }
233
- if (hasReactHookForm) {
234
- themes.push("react-hook-form");
235
- }
236
- if (hasFormik) {
237
- themes.push("formik");
238
- }
239
- if (hasEslint) {
240
- themes.push("eslint");
241
- }
242
- if (hasBiome) {
243
- themes.push("biome");
244
- }
245
- if (hasStripe) {
246
- themes.push("stripe");
247
- }
248
- if (hasSentry) {
249
- themes.push("sentry");
250
- }
251
- if (hasAxiom) {
252
- themes.push("axiom");
253
- }
254
- if (hasSonner) {
255
- themes.push("sonner");
256
- }
257
- if (hasAlgolia) {
258
- themes.push("algolia");
259
- }
260
- if (hasUploadthing) {
261
- themes.push("uploadthing");
262
- }
263
- if (hasZod) {
264
- themes.push("zod");
265
- }
266
- if (hasTypebox) {
267
- themes.push("typebox");
268
- }
269
- if (hasValibot) {
270
- themes.push("valibot");
271
- }
272
- if (hasStarlight) {
273
- themes.push("starlight");
274
- }
275
- if (hasNextra) {
276
- themes.push("nextra");
277
- }
278
- if (hasLucide) {
279
- themes.push("lucide");
280
- }
281
- if (hasResend) {
282
- themes.push("resend");
283
- }
284
- if (hasRedis) {
285
- themes.push("redis");
286
- }
287
- if (hasCloudflare) {
288
- themes.push("cloudflare");
289
- }
290
- if (hasContentlayer) {
291
- themes.push("contentlayer");
292
- }
293
- if (hasNextSeo) {
294
- themes.push("next-seo");
295
- }
296
- if (hasFramer) {
297
- themes.push("framer-motion");
298
- }
299
- if (hasRecharts) {
300
- themes.push("recharts");
301
- }
302
- if (hasDayjs) {
303
- themes.push("dayjs");
304
- }
305
- if (hasMdx) {
306
- themes.push("mdx");
307
- }
308
- const webviews = [];
309
- if ("electron" in deps) {
310
- webviews.push("electron");
311
- }
312
- if ("tauri" in deps) {
313
- webviews.push("tauri");
314
- }
315
- if ("capacitor" in deps) {
316
- webviews.push("capacitor");
317
- }
318
- if ("react-native" in deps) {
319
- webviews.push("react-native");
320
- }
321
- const commands = [];
322
- if (packageJson?.scripts) {
323
- for (const [name] of Object.entries(packageJson.scripts)) {
324
- if (name !== "start" && name !== "build" && name !== "dev" && name !== "test") {
325
- commands.push(name);
326
- }
327
- }
328
- }
329
- const hasTestingFramework = !!(hasJest || hasVitest || hasPlaywright || hasCypress || hasBunTest);
330
- return {
331
- i18n: hasNextIntl || hasI18next || hasRosetta,
332
- analytics: hasVercelAnalytics || hasSegmentAnalytics || hasGoogleAnalytics || hasPlausible || hasFathom,
333
- themeMode: "dark-light",
334
- authentication: hasNextAuth || hasClerk || hasBetterAuth || hasAuth0 || hasSupabase,
335
- api: hasHono || hasTrpc || hasGraphql || hasRest,
336
- database: hasPrisma || hasDrizzle || hasSupabase || hasMongoose || hasPg || hasMysql || hasSqlite || hasMongo,
337
- testing: hasTestingFramework,
338
- docker: hasDocker,
339
- ci: hasCI,
340
- commands: commands.slice(0, 10),
341
- // Limit to 10 commands to avoid overly large configs
342
- webview: webviews,
343
- language: languages,
344
- themes: themes.slice(0, 20)
345
- // Limit to 20 themes to avoid overly large configs
346
- };
347
- }
@@ -1,3 +0,0 @@
1
- import type { DeploymentService } from "./rse-types";
2
- export declare function generateConfigFiles(projectPath: string, overwrite: boolean, projectName: string, deployService: DeploymentService, primaryDomain: string, frontendUsername: string, enableI18n: boolean, isDev: boolean, filesToGenerate?: string[]): Promise<void>;
3
- export declare function generateProjectConfigs(projectPath: string, projectName: string, frontendUsername: string, deployService: DeploymentService, primaryDomain: string, enableI18n: boolean, isDev: boolean): Promise<void>;