@reliverse/dler 1.7.114 → 1.7.115

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 (155) hide show
  1. package/bin/app/add/add-local/core/templates.d.ts +3 -3
  2. package/bin/app/add/add-local/core/templates.js +8 -8
  3. package/bin/app/add/cmd.js +2 -2
  4. package/bin/app/ai/ai-impl/ai-chat.d.ts +2 -2
  5. package/bin/app/ai/ai-impl/ai-types.d.ts +2 -2
  6. package/bin/app/ai/ai-impl/relinter/relinter.d.ts +2 -2
  7. package/bin/app/ai/ai-menu.d.ts +2 -2
  8. package/bin/app/ai/cmd.js +4 -4
  9. package/bin/app/better/auth/cmd.js +1 -6
  10. package/bin/app/build/build-library.d.ts +5 -4
  11. package/bin/app/build/build-regular.d.ts +4 -3
  12. package/bin/app/build/cmd.d.ts +10 -0
  13. package/bin/app/build/cmd.js +29 -12
  14. package/bin/app/build/impl.d.ts +3 -2
  15. package/bin/app/build/library-flow.d.ts +5 -4
  16. package/bin/app/build/postbuild.d.ts +2 -2
  17. package/bin/app/build/postbuild.js +0 -6
  18. package/bin/app/build/prebuild.d.ts +2 -2
  19. package/bin/app/build/prebuild.js +0 -6
  20. package/bin/app/build/regular-flow.d.ts +4 -3
  21. package/bin/app/check/cmd.js +2 -2
  22. package/bin/app/config/constants.d.ts +1 -1
  23. package/bin/app/config/constants.js +1 -1
  24. package/bin/app/config/content.d.ts +1 -1
  25. package/bin/app/config/content.js +2 -2
  26. package/bin/app/config/core-cfg.d.ts +5 -5
  27. package/bin/app/config/core-cfg.js +27 -16
  28. package/bin/app/config/create.d.ts +6 -5
  29. package/bin/app/config/create.js +13 -22
  30. package/bin/app/config/def-utils.d.ts +3 -3
  31. package/bin/app/config/def-utils.js +10 -8
  32. package/bin/app/config/detect.d.ts +4 -2
  33. package/bin/app/config/detect.js +36 -6
  34. package/bin/app/config/gen-cfg.js +4 -4
  35. package/bin/app/config/load.d.ts +2 -2
  36. package/bin/app/config/load.js +1 -1
  37. package/bin/app/config/migrate.d.ts +1 -1
  38. package/bin/app/config/migrate.js +7 -3
  39. package/bin/app/config/path.d.ts +1 -1
  40. package/bin/app/config/path.js +3 -3
  41. package/bin/app/config/prepare.d.ts +1 -1
  42. package/bin/app/config/prepare.js +83 -81
  43. package/bin/app/config/prompts.d.ts +1 -1
  44. package/bin/app/config/prompts.js +1 -1
  45. package/bin/app/config/read.d.ts +3 -3
  46. package/bin/app/config/read.js +13 -35
  47. package/bin/app/config/repair.d.ts +2 -2
  48. package/bin/app/config/repair.js +12 -12
  49. package/bin/app/config/unstable.d.ts +3 -3
  50. package/bin/app/config/unstable.js +2 -14
  51. package/bin/app/config/update.d.ts +3 -3
  52. package/bin/app/config/update.js +41 -48
  53. package/bin/app/env/env-impl.js +2 -2
  54. package/bin/app/init/cmd-2.js +2 -2
  55. package/bin/app/init/init-utils/init-utils.js +7 -7
  56. package/bin/app/init/init-utils/mm-deprecated/editor-menu.d.ts +3 -2
  57. package/bin/app/init/init-utils/mm-deprecated/editor-menu.js +1 -6
  58. package/bin/app/init/use-template/cp-impl.d.ts +5 -4
  59. package/bin/app/init/use-template/cp-mod.d.ts +3 -3
  60. package/bin/app/init/use-template/cp-mod.js +5 -5
  61. package/bin/app/init/use-template/cp-modules/cli-main-modules/cli-menu-items/showCloneProjectMenu.d.ts +2 -2
  62. package/bin/app/init/use-template/cp-modules/compose-env-file/cef-impl.d.ts +2 -2
  63. package/bin/app/init/use-template/cp-modules/compose-env-file/cef-mod.d.ts +2 -2
  64. package/bin/app/init/use-template/cp-modules/git-deploy-prompts/deploy.d.ts +4 -3
  65. package/bin/app/init/use-template/cp-modules/git-deploy-prompts/gdp-mod.d.ts +5 -4
  66. package/bin/app/init/use-template/cp-modules/git-deploy-prompts/git.d.ts +6 -5
  67. package/bin/app/init/use-template/cp-modules/git-deploy-prompts/github.d.ts +2 -2
  68. package/bin/app/init/use-template/cp-modules/git-deploy-prompts/utils-private-repo.d.ts +2 -2
  69. package/bin/app/init/use-template/cp-modules/git-deploy-prompts/utils-private-repo.js +6 -3
  70. package/bin/app/init/use-template/cp-modules/git-deploy-prompts/utils-repo-exists.d.ts +3 -2
  71. package/bin/app/init/use-template/cp-modules/git-deploy-prompts/utils-repo-exists.js +4 -4
  72. package/bin/app/invoke/cmd.js +2 -2
  73. package/bin/app/mrse/cmd.js +2 -2
  74. package/bin/app/mrse/mrse-impl.js +2 -2
  75. package/bin/app/providers/better-t-stack/types.d.ts +5 -5
  76. package/bin/app/providers/package.json +3 -0
  77. package/bin/app/providers/reliverse-stack/reliverse-stack-mod.js +2 -2
  78. package/bin/app/providers/reliverse-stack/rs-impl.d.ts +4 -4
  79. package/bin/app/pub/cmd.d.ts +10 -0
  80. package/bin/app/pub/cmd.js +27 -12
  81. package/bin/app/pub/impl.d.ts +3 -2
  82. package/bin/app/rempts/cmd.js +2 -2
  83. package/bin/app/rules/reliverse/dler-config-health/dler-config-health.d.ts +1 -1
  84. package/bin/app/rules/reliverse/dler-config-health/dler-config-health.js +1 -1
  85. package/bin/app/schema/cmd.js +3 -3
  86. package/bin/app/{config/reltypes-content.js → schema/gen.js} +475 -229
  87. package/bin/app/schema/mod.d.ts +1224 -0
  88. package/bin/app/schema/mod.js +329 -0
  89. package/bin/app/{config/reltypes-utils.js → schema/utils.js} +6 -3
  90. package/bin/app/toolbox/cmd.js +2 -2
  91. package/bin/app/toolbox/toolbox-impl.d.ts +3 -2
  92. package/bin/app/types/mod.d.ts +10 -1518
  93. package/bin/app/types/mod.js +0 -161
  94. package/bin/app/update/impl.d.ts +1 -0
  95. package/bin/app/update/impl.js +102 -1
  96. package/bin/app/utils/common.d.ts +3 -0
  97. package/bin/app/utils/common.js +28 -0
  98. package/bin/app/utils/decideHelper.d.ts +2 -2
  99. package/bin/app/utils/downloading/downloadRepo.d.ts +2 -2
  100. package/bin/app/utils/downloading/downloadRepo.js +3 -3
  101. package/bin/app/utils/downloading/handleDownload.d.ts +2 -2
  102. package/bin/app/utils/finalize.d.ts +2 -1
  103. package/bin/app/utils/handlers/handleCleanup.js +2 -2
  104. package/bin/app/utils/handlers/handleCodemods.d.ts +2 -2
  105. package/bin/app/utils/projectRepository.d.ts +3 -4
  106. package/bin/app/utils/prompts/askUsernameFrontend.d.ts +2 -2
  107. package/bin/app/utils/prompts/askUsernameFrontend.js +3 -3
  108. package/bin/app/utils/resolve-cross-libs.js +2 -2
  109. package/bin/app/utils/schemaMemory.d.ts +1 -1
  110. package/bin/app/utils/startEndPrompts.d.ts +8 -2
  111. package/bin/app/utils/startEndPrompts.js +43 -12
  112. package/bin/app/utils/utils-build.d.ts +2 -2
  113. package/bin/app/utils/utils-clean.d.ts +1 -1
  114. package/bin/app/utils/utils-deps.d.ts +2 -2
  115. package/bin/app/utils/utils-determine.d.ts +1 -1
  116. package/bin/app/utils/utils-jsr-json.d.ts +2 -2
  117. package/bin/app/utils/utils-package-json-libraries.d.ts +3 -3
  118. package/bin/app/utils/utils-package-json-regular.d.ts +2 -2
  119. package/bin/dler.js +2 -92
  120. package/bin/mod.d.ts +431 -438
  121. package/bin/mod.js +36 -27
  122. package/package.json +10 -10
  123. package/bin/app/agg/cmd.d.ts +0 -72
  124. package/bin/app/agg/cmd.js +0 -128
  125. package/bin/app/cli/cmd.d.ts +0 -12
  126. package/bin/app/cli/cmd.js +0 -56
  127. package/bin/app/cli/impl.d.ts +0 -3
  128. package/bin/app/cli/impl.js +0 -88
  129. package/bin/app/config/default-cfg.d.ts +0 -3
  130. package/bin/app/config/default-cfg.js +0 -155
  131. package/bin/app/config/default.d.ts +0 -6
  132. package/bin/app/config/default.js +0 -159
  133. package/bin/app/config/schema.d.ts +0 -130
  134. package/bin/app/config/schema.js +0 -443
  135. package/bin/app/init/use-template/cp-modules/cli-main-modules/cli-menu-items/getMainMenuOptions.d.ts +0 -12
  136. package/bin/app/init/use-template/cp-modules/cli-main-modules/cli-menu-items/getMainMenuOptions.js +0 -69
  137. package/bin/app/init/use-template/cp-modules/cli-main-modules/modules/showStartEndPrompt.d.ts +0 -2
  138. package/bin/app/init/use-template/cp-modules/cli-main-modules/modules/showStartEndPrompt.js +0 -26
  139. package/bin/app/schema/schema-impl.d.ts +0 -2
  140. package/bin/app/schema/schema-impl.js +0 -24
  141. package/bin/app/update/cmd.d.ts +0 -103
  142. package/bin/app/update/cmd.js +0 -299
  143. package/bin/app/utils/native-cli/nc-impl.d.ts +0 -15
  144. package/bin/app/utils/native-cli/nc-impl.js +0 -154
  145. package/bin/app/utils/native-cli/nc-mod.d.ts +0 -3
  146. package/bin/app/utils/native-cli/nc-mod.js +0 -44
  147. package/bin/app/web/README.md +0 -149
  148. package/bin/app/web/cmd.d.ts +0 -2
  149. package/bin/app/web/cmd.js +0 -11
  150. package/bin/dler-go +0 -4
  151. package/bin/dler-rust +0 -4
  152. /package/bin/app/{config/reltypes-content.d.ts → schema/gen.d.ts} +0 -0
  153. /package/bin/app/{config/reltypes-utils.d.ts → schema/utils.d.ts} +0 -0
  154. /package/bin/app/utils/{hasOnlyRseConfig.d.ts → hasOnlyReliverseConfig.d.ts} +0 -0
  155. /package/bin/app/utils/{hasOnlyRseConfig.js → hasOnlyReliverseConfig.js} +0 -0
@@ -1,12 +1,10 @@
1
1
  import fs from "@reliverse/relifso";
2
2
  import { relinka } from "@reliverse/relinka";
3
- import { Value } from "@sinclair/typebox/value";
4
3
  import { parseJSONC } from "confbox";
5
- import { writeRseConfig } from "./create.js";
6
- import { DEFAULT_CONFIG_RSE } from "./default-cfg.js";
7
- import { getRseConfigPath } from "./path.js";
8
- import { rseSchema } from "./schema.js";
4
+ import { writeReliverseConfig } from "./create.js";
5
+ import { getReliverseConfigPath } from "./path.js";
9
6
  import { getBackupAndTempPaths } from "./utils.js";
7
+ import { DEFAULT_CONFIG_RELIVERSE } from "../schema/mod.js";
10
8
  function deepMerge(target, source) {
11
9
  const result = { ...target };
12
10
  for (const key in source) {
@@ -61,30 +59,25 @@ function filterMemoryFields(config) {
61
59
  const { code, key, ...rest } = config;
62
60
  return rest;
63
61
  }
64
- export async function updateRseConfig(projectPath, updates, isDev) {
65
- const { configPath } = await getRseConfigPath(projectPath, isDev, false);
62
+ export async function updateReliverseConfig(projectPath, updates, isDev) {
63
+ const { configPath } = await getReliverseConfigPath(projectPath, isDev, false);
66
64
  const { backupPath, tempPath } = getBackupAndTempPaths(configPath);
67
65
  try {
68
66
  let existingConfig = {};
69
67
  if (await fs.pathExists(configPath)) {
70
68
  const existingContent = await fs.readFile(configPath, "utf-8");
71
69
  const parsed = parseJSONC(existingContent);
72
- if (Value.Check(rseSchema, parsed)) {
73
- existingConfig = parsed;
74
- } else {
75
- relinka("warn", "Invalid config schema, starting fresh");
76
- }
70
+ if (parsed && typeof parsed === "object") existingConfig = parsed;
77
71
  }
78
72
  const filteredUpdates = filterMemoryFields(updates);
79
- const mergedConfig = deepMerge(existingConfig, filteredUpdates);
80
- if (!Value.Check(rseSchema, mergedConfig)) {
81
- const issues = [...Value.Errors(rseSchema, mergedConfig)].map(
82
- (err) => `Path "${err.path}": ${err.message}`
83
- );
84
- relinka("error", "Invalid config after merge:", issues.join("; "));
85
- return false;
86
- }
87
- const differences = findObjectDifferences(existingConfig, mergedConfig);
73
+ const mergedConfig = deepMerge(
74
+ existingConfig,
75
+ filteredUpdates
76
+ );
77
+ const differences = findObjectDifferences(
78
+ existingConfig,
79
+ mergedConfig
80
+ );
88
81
  if (differences.length === 0) {
89
82
  relinka("verbose", "No changes detected in config, skipping update");
90
83
  return true;
@@ -96,7 +89,7 @@ export async function updateRseConfig(projectPath, updates, isDev) {
96
89
  if (await fs.pathExists(configPath)) {
97
90
  await fs.copy(configPath, backupPath);
98
91
  }
99
- await writeRseConfig(configPath, mergedConfig, isDev);
92
+ await writeReliverseConfig(configPath, mergedConfig, isDev);
100
93
  if (await fs.pathExists(backupPath)) {
101
94
  await fs.remove(backupPath);
102
95
  }
@@ -121,32 +114,32 @@ export async function updateRseConfig(projectPath, updates, isDev) {
121
114
  }
122
115
  export function mergeWithDefaults(partial) {
123
116
  return {
124
- ...DEFAULT_CONFIG_RSE,
117
+ ...DEFAULT_CONFIG_RELIVERSE,
125
118
  ...partial,
126
- features: {
127
- ...DEFAULT_CONFIG_RSE.features,
128
- ...partial.features ?? {}
129
- },
130
- codeStyle: {
131
- ...DEFAULT_CONFIG_RSE.codeStyle ?? {},
132
- ...partial.codeStyle ?? {},
133
- modernize: {
134
- ...DEFAULT_CONFIG_RSE.codeStyle?.modernize ?? {},
135
- ...partial.codeStyle?.modernize ?? {}
136
- }
137
- },
138
- preferredLibraries: {
139
- ...DEFAULT_CONFIG_RSE.preferredLibraries,
140
- ...partial.preferredLibraries ?? {}
141
- },
142
- monorepo: {
143
- ...DEFAULT_CONFIG_RSE.monorepo,
144
- ...partial.monorepo ?? {}
145
- },
146
- customRules: {
147
- ...DEFAULT_CONFIG_RSE.customRules,
148
- ...partial.customRules ?? {}
149
- },
150
- ignoreDependencies: partial.ignoreDependencies ?? DEFAULT_CONFIG_RSE.ignoreDependencies
119
+ features: partial.features ? {
120
+ ...DEFAULT_CONFIG_RELIVERSE.features,
121
+ ...partial.features
122
+ } : DEFAULT_CONFIG_RELIVERSE.features,
123
+ codeStyle: partial.codeStyle ? {
124
+ ...DEFAULT_CONFIG_RELIVERSE.codeStyle ?? {},
125
+ ...partial.codeStyle,
126
+ modernize: partial.codeStyle.modernize ? {
127
+ ...DEFAULT_CONFIG_RELIVERSE.codeStyle?.modernize ?? {},
128
+ ...partial.codeStyle.modernize
129
+ } : DEFAULT_CONFIG_RELIVERSE.codeStyle?.modernize
130
+ } : DEFAULT_CONFIG_RELIVERSE.codeStyle,
131
+ preferredLibraries: partial.preferredLibraries ? {
132
+ ...DEFAULT_CONFIG_RELIVERSE.preferredLibraries,
133
+ ...partial.preferredLibraries
134
+ } : DEFAULT_CONFIG_RELIVERSE.preferredLibraries,
135
+ monorepo: partial.monorepo ? {
136
+ ...DEFAULT_CONFIG_RELIVERSE.monorepo,
137
+ ...partial.monorepo
138
+ } : DEFAULT_CONFIG_RELIVERSE.monorepo,
139
+ customRules: partial.customRules ? {
140
+ ...DEFAULT_CONFIG_RELIVERSE.customRules,
141
+ ...partial.customRules
142
+ } : DEFAULT_CONFIG_RELIVERSE.customRules,
143
+ ignoreDependencies: partial.ignoreDependencies ?? DEFAULT_CONFIG_RELIVERSE.ignoreDependencies
151
144
  };
152
145
  }
@@ -1,13 +1,13 @@
1
1
  import { relinka } from "@reliverse/relinka";
2
2
  import { confirmPrompt } from "@reliverse/rempts";
3
3
  import { FALLBACK_ENV_EXAMPLE_URL } from "../config/constants.js";
4
- import { getOrCreateRseConfig } from "../config/core-cfg.js";
4
+ import { getOrCreateReliverseConfig } from "../config/core-cfg.js";
5
5
  import { composeEnvFile } from "../init/use-template/cp-modules/compose-env-file/cef-mod.js";
6
6
  import { getCurrentWorkingDirectory } from "../utils/terminalHelpers.js";
7
7
  export async function envArgImpl(isDev, pathToProject) {
8
8
  try {
9
9
  const projectPath = pathToProject ?? getCurrentWorkingDirectory();
10
- const { config } = await getOrCreateRseConfig({
10
+ const { config } = await getOrCreateReliverseConfig({
11
11
  projectPath,
12
12
  isDev,
13
13
  overrides: {}
@@ -2,7 +2,7 @@ import path from "@reliverse/pathkit";
2
2
  import fs from "@reliverse/relifso";
3
3
  import { relinka } from "@reliverse/relinka";
4
4
  import { defineCommand } from "@reliverse/rempts";
5
- import { getOrCreateRseConfig } from "../config/core-cfg.js";
5
+ import { getOrCreateReliverseConfig } from "../config/core-cfg.js";
6
6
  import { showManualBuilderMenu } from "./init-utils/init-impl.js";
7
7
  import { initMinimalrseProject } from "./init-utils/init-utils.js";
8
8
  import { askProjectName } from "../utils/prompts/askProjectName.js";
@@ -30,7 +30,7 @@ export default defineCommand({
30
30
  const { dev: isDev, target } = args;
31
31
  const cwd = getCurrentWorkingDirectory();
32
32
  const memory = await getOrCreateReliverseMemory();
33
- const { config } = await getOrCreateRseConfig({
33
+ const { config } = await getOrCreateReliverseConfig({
34
34
  projectPath: cwd,
35
35
  isDev,
36
36
  overrides: {}
@@ -22,8 +22,8 @@ import { getOrCreateReliverseMemory } from "../../utils/reliverseMemory.js";
22
22
  import { findTsconfigUp } from "../../utils/tsconfigHelpers.js";
23
23
  import { createTSConfig } from "../../utils/utils-tsconfig.js";
24
24
  import { getProjectContent } from "../../config/content.js";
25
- import { getOrCreateRseConfig } from "../../config/core-cfg.js";
26
- import { detectProjectsWithRseConfig } from "../../config/detect.js";
25
+ import { getOrCreateReliverseConfig } from "../../config/core-cfg.js";
26
+ import { detectProjectsWithReliverseConfig } from "../../config/detect.js";
27
27
  const NEW_PROJECT_OPTION = "new-project";
28
28
  const EXIT_OPTION = "exit";
29
29
  function buildProjectSelectionMenuOptions(cwd, detectedProjects, directoryEmpty) {
@@ -50,7 +50,7 @@ function buildProjectSelectionMenuOptions(cwd, detectedProjects, directoryEmpty)
50
50
  }
51
51
  export async function handleProjectSelectionMenu(cwd, isDev) {
52
52
  try {
53
- const detectedProjects = await detectProjectsWithRseConfig(cwd, isDev);
53
+ const detectedProjects = await detectProjectsWithReliverseConfig(cwd, isDev);
54
54
  const directoryEmpty = await isDirectoryEmpty(cwd);
55
55
  const menuData = buildProjectSelectionMenuOptions(cwd, detectedProjects, directoryEmpty);
56
56
  const selectedOption = await selectPrompt(menuData);
@@ -90,7 +90,7 @@ export async function initMinimalrseProject(projectPath, projectName, isDev) {
90
90
  relinka("warn", "No parent-level tsconfig.json found in dev mode.");
91
91
  }
92
92
  }
93
- const { config } = await getOrCreateRseConfig({
93
+ const { config } = await getOrCreateReliverseConfig({
94
94
  projectPath,
95
95
  isDev,
96
96
  overrides: { projectFramework },
@@ -160,7 +160,7 @@ export async function showExistingProjectMenu(cwd, isDev) {
160
160
  const { updateAvailable, updateInfo } = await getTemplateUpdateInfo(
161
161
  cwd,
162
162
  isDev,
163
- requiredContent.fileRseConfig
163
+ requiredContent.fileReliverseConfig
164
164
  );
165
165
  const menuOptions = buildExistingProjectMenuOptions(depsMissing, updateAvailable, updateInfo);
166
166
  const promptContent = getPromptContent(depsMissing, updateAvailable);
@@ -220,7 +220,7 @@ function buildExistingProjectMenuOptions(depsMissing, updateAvailable, updateInf
220
220
  return menuOptions;
221
221
  }
222
222
  export function determineProjectStatus(requiredContent) {
223
- const hasrse = Boolean(requiredContent.fileRseConfig);
223
+ const hasrse = Boolean(requiredContent.fileReliverseConfig);
224
224
  const hasPackageJson = Boolean(requiredContent.filePackageJson);
225
225
  const isExistingProject = Object.values(requiredContent).every(Boolean);
226
226
  if (!hasrse && hasPackageJson) return "new";
@@ -230,7 +230,7 @@ export function determineProjectStatus(requiredContent) {
230
230
  export async function handleNewProject(cwd, isDev) {
231
231
  try {
232
232
  relinka("info", "Setting up rse config for this project...");
233
- await getOrCreateRseConfig({
233
+ await getOrCreateReliverseConfig({
234
234
  projectPath: cwd,
235
235
  isDev,
236
236
  overrides: {}
@@ -1,3 +1,4 @@
1
- import type { DetectedProject, RseConfig } from "../../../types/mod.js";
1
+ import type { ReliverseConfig } from "../../../schema/mod.js";
2
+ import type { DetectedProject } from "../../../types/mod.js";
2
3
  import type { ReliverseMemory } from "../../../utils/schemaMemory.js";
3
- export declare function handleOpenProjectMenu(projects: DetectedProject[], isDev: boolean, memory: ReliverseMemory, cwd: string, maskInput: boolean, config: RseConfig): Promise<void>;
4
+ export declare function handleOpenProjectMenu(projects: DetectedProject[], isDev: boolean, memory: ReliverseMemory, cwd: string, maskInput: boolean, config: ReliverseConfig): Promise<void>;
@@ -1,8 +1,7 @@
1
1
  import { re } from "@reliverse/relico";
2
2
  import { relinka } from "@reliverse/relinka";
3
- import { callCmd, inputPrompt, selectPrompt } from "@reliverse/rempts";
3
+ import { inputPrompt, selectPrompt } from "@reliverse/rempts";
4
4
  import { useLanguine } from "../../../add/add-local/i18n/languine.js";
5
- import { default as betterAuthCmd } from "../../../better/auth/cmd.js";
6
5
  import { getProjectContent } from "../../../config/content.js";
7
6
  import { envArgImpl } from "../../../env/env-impl.js";
8
7
  import { manageDrizzleSchema } from "../../mm-deprecated/drizzle/manageDrizzleSchema.js";
@@ -148,10 +147,6 @@ export async function handleOpenProjectMenu(projects, isDev, memory, cwd, maskIn
148
147
  relinka("info", "The following args will be passed to the rse auth command:");
149
148
  relinka("log", `--config ${selectedProject.path}/src/lib/auth.ts`);
150
149
  relinka("log", `--output ${selectedProject.path}/src/db/schema/user/tables.ts`);
151
- await callCmd(betterAuthCmd, {
152
- config: `${selectedProject.path}/src/lib/auth.ts`,
153
- schema: `${selectedProject.path}/src/db/schema/user/tables.ts`
154
- });
155
150
  break;
156
151
  }
157
152
  case "git-deploy": {
@@ -1,15 +1,16 @@
1
- import type { Behavior, ProjectConfigReturn, RseConfig } from "../../types/mod.js";
1
+ import type { ReliverseConfig } from "../../schema/mod.js";
2
+ import type { Behavior, ProjectConfigReturn } from "../../types/mod.js";
2
3
  import type { RepoOption } from "../../utils/projectRepository.js";
3
4
  import type { ReliverseMemory } from "../../utils/schemaMemory.js";
4
5
  /**
5
6
  * Asks or auto-fills project details (username, projectName, domain).
6
7
  */
7
- export declare function initializeProjectConfig(projectName: string, _memory: ReliverseMemory, config: RseConfig, skipPrompts: boolean, isDev: boolean, cwd: string): Promise<ProjectConfigReturn>;
8
+ export declare function initializeProjectConfig(projectName: string, _memory: ReliverseMemory, config: ReliverseConfig, skipPrompts: boolean, isDev: boolean, cwd: string): Promise<ProjectConfigReturn>;
8
9
  /**
9
10
  * Sets up i18n if needed and not already present.
10
11
  * Uses config.i18nBehavior to determine automatic behavior.
11
12
  */
12
- export declare function setupI18nSupport(projectPath: string, config: RseConfig): Promise<boolean>;
13
+ export declare function setupI18nSupport(projectPath: string, config: ReliverseConfig): Promise<boolean>;
13
14
  /**
14
15
  * Decides whether to install deps based on config or user input.
15
16
  */
@@ -17,7 +18,7 @@ export declare function shouldInstallDependencies(behavior: Behavior, isDev: boo
17
18
  /**
18
19
  * Installs dependencies and checks optional DB push script.
19
20
  */
20
- export declare function handleDependencies(projectPath: string, config: RseConfig): Promise<{
21
+ export declare function handleDependencies(projectPath: string, config: ReliverseConfig): Promise<{
21
22
  shouldInstallDeps: boolean;
22
23
  shouldRunDbPush: boolean;
23
24
  }>;
@@ -1,4 +1,4 @@
1
- import type { RseConfig } from "../../types/mod.js";
1
+ import type { ReliverseConfig } from "../../schema/mod.js";
2
2
  import type { RepoOption } from "../../utils/projectRepository.js";
3
3
  import type { ReliverseMemory } from "../../utils/schemaMemory.js";
4
4
  /**
@@ -10,7 +10,7 @@ export declare function createWebProject({ initialProjectName, selectedRepo, mes
10
10
  selectedRepo: RepoOption;
11
11
  message: string;
12
12
  isDev: boolean;
13
- config: RseConfig;
13
+ config: ReliverseConfig;
14
14
  memory: ReliverseMemory;
15
15
  cwd: string;
16
16
  skipPrompts: boolean;
@@ -24,7 +24,7 @@ export declare function createMobileProject({ initialProjectName, selectedRepo,
24
24
  selectedRepo: RepoOption;
25
25
  message: string;
26
26
  isDev: boolean;
27
- config: RseConfig;
27
+ config: ReliverseConfig;
28
28
  memory: ReliverseMemory;
29
29
  cwd: string;
30
30
  skipPrompts: boolean;
@@ -3,8 +3,8 @@ import { relinka } from "@reliverse/relinka";
3
3
  import { confirmPrompt } from "@reliverse/rempts";
4
4
  import { FALLBACK_ENV_EXAMPLE_URL } from "../../config/constants.js";
5
5
  import { generateProjectConfigs } from "../../config/gen-cfg.js";
6
- import { getRseConfigPath } from "../../config/path.js";
7
- import { updateRseConfig } from "../../config/update.js";
6
+ import { getReliverseConfigPath } from "../../config/path.js";
7
+ import { updateReliverseConfig } from "../../config/update.js";
8
8
  import { handleDownload } from "../../utils/downloading/handleDownload.js";
9
9
  import { isMrseProject } from "../../utils/mrseHelpers.js";
10
10
  import { handleReplacements } from "../../utils/replacements/reps-mod.js";
@@ -52,7 +52,7 @@ export async function createWebProject({
52
52
  isTemplateDownload: true,
53
53
  cache: false
54
54
  });
55
- const result = await getRseConfigPath(projectPath, isDev, skipPrompts);
55
+ const result = await getReliverseConfigPath(projectPath, isDev, skipPrompts);
56
56
  if (!result) {
57
57
  throw new Error("Failed to get rseg path.");
58
58
  }
@@ -121,7 +121,7 @@ export async function createWebProject({
121
121
  frontendUsername
122
122
  });
123
123
  if (deployService !== "vercel" || primaryDomain !== initialDomain) {
124
- await updateRseConfig(
124
+ await updateReliverseConfig(
125
125
  projectPath,
126
126
  {
127
127
  projectDeployService: deployService,
@@ -173,7 +173,7 @@ export async function createMobileProject({
173
173
  isTemplateDownload: true,
174
174
  cache: false
175
175
  });
176
- const result = await getRseConfigPath(projectPath, isDev, skipPrompts);
176
+ const result = await getReliverseConfigPath(projectPath, isDev, skipPrompts);
177
177
  if (!result) {
178
178
  throw new Error("Failed to get rseg path.");
179
179
  }
@@ -1,4 +1,4 @@
1
- import type { RseConfig } from "../../../../../types/mod.js";
1
+ import type { ReliverseConfig } from "../../../../../schema/mod.js";
2
2
  import type { ReliverseMemory } from "../../../../../utils/schemaMemory.js";
3
3
  /**
4
4
  * Main function to show the clone project menu and handle user selection.
@@ -6,6 +6,6 @@ import type { ReliverseMemory } from "../../../../../utils/schemaMemory.js";
6
6
  export declare function showCloneProjectMenu({ isDev, cwd, config, memory, }: {
7
7
  isDev: boolean;
8
8
  cwd: string;
9
- config: RseConfig;
9
+ config: ReliverseConfig;
10
10
  memory: ReliverseMemory;
11
11
  }): Promise<void>;
@@ -1,4 +1,4 @@
1
- import type { RseConfig } from "../../../../types/mod.js";
1
+ import type { ReliverseConfig } from "../../../../schema/mod.js";
2
2
  export declare function ensureExampleExists(projectPath: string, fallbackEnvExampleURL: string): Promise<boolean>;
3
3
  export declare function ensureEnvExists(projectPath: string): Promise<boolean>;
4
4
  /**
@@ -11,6 +11,6 @@ export declare function getMissingKeys(projectPath: string): Promise<string[]>;
11
11
  export declare function copyFromExisting(projectPath: string, sourcePath: string): Promise<boolean>;
12
12
  export declare function getEnvPath(projectPath: string): string;
13
13
  export declare function fetchEnvExampleContent(urlResource: string): Promise<string | null>;
14
- export declare function promptAndSetMissingValues(missingKeys: string[], envPath: string, maskInput: boolean, config: RseConfig, wasEnvCopied?: boolean, isMrse?: boolean, projectPath?: string, skipPrompts?: boolean): Promise<void>;
14
+ export declare function promptAndSetMissingValues(missingKeys: string[], envPath: string, maskInput: boolean, config: ReliverseConfig, wasEnvCopied?: boolean, isMrse?: boolean, projectPath?: string, skipPrompts?: boolean): Promise<void>;
15
15
  export declare function saveLastEnvFilePath(envPath: string): Promise<void>;
16
16
  export declare function getLastEnvFilePath(): Promise<string | null>;
@@ -1,2 +1,2 @@
1
- import type { RseConfig } from "../../../../types/mod.js";
2
- export declare function composeEnvFile(projectPath: string, fallbackEnvExampleURL: string, maskInput: boolean, skipPrompts: boolean, config: RseConfig | null, isMrse: boolean): Promise<void>;
1
+ import type { ReliverseConfig } from "../../../../schema/mod.js";
2
+ export declare function composeEnvFile(projectPath: string, fallbackEnvExampleURL: string, maskInput: boolean, skipPrompts: boolean, config: ReliverseConfig | null, isMrse: boolean): Promise<void>;
@@ -1,9 +1,10 @@
1
- import type { DeploymentService, RseConfig } from "../../../../types/mod.js";
1
+ import type { ReliverseConfig } from "../../../../schema/mod.js";
2
+ import type { DeploymentService } from "../../../../types/mod.js";
2
3
  import type { InstanceGithub } from "../../../../utils/instanceGithub.js";
3
4
  import type { InstanceVercel } from "../../../../utils/instanceVercel.js";
4
5
  import type { ReliverseMemory } from "../../../../utils/schemaMemory.js";
5
- export declare function selectDeploymentService(config: RseConfig): Promise<DeploymentService>;
6
- export declare function deployProject(githubInstance: InstanceGithub, vercelInstance: InstanceVercel, vercelToken: string, githubToken: string, skipPrompts: boolean, projectName: string, config: RseConfig, projectPath: string, primaryDomain: string, memory: ReliverseMemory, deployMode: "new" | "update", githubUsername: string): Promise<{
6
+ export declare function selectDeploymentService(config: ReliverseConfig): Promise<DeploymentService>;
7
+ export declare function deployProject(githubInstance: InstanceGithub, vercelInstance: InstanceVercel, vercelToken: string, githubToken: string, skipPrompts: boolean, projectName: string, config: ReliverseConfig, projectPath: string, primaryDomain: string, memory: ReliverseMemory, deployMode: "new" | "update", githubUsername: string): Promise<{
7
8
  deployService: DeploymentService | "none";
8
9
  primaryDomain: string;
9
10
  isDeployed: boolean;
@@ -1,4 +1,5 @@
1
- import type { DeploymentService, RseConfig } from "../../../../types/mod.js";
1
+ import type { ReliverseConfig } from "../../../../schema/mod.js";
2
+ import type { DeploymentService } from "../../../../types/mod.js";
2
3
  import { type InstanceGithub } from "../../../../utils/instanceGithub.js";
3
4
  import type { RepoOption } from "../../../../utils/projectRepository.js";
4
5
  import type { ReliverseMemory } from "../../../../utils/schemaMemory.js";
@@ -13,14 +14,14 @@ interface GithubSetupResult {
13
14
  /**
14
15
  * Initializes the local git repository.
15
16
  */
16
- export declare function handleGitInit(cwd: string, isDev: boolean, projectName: string, projectPath: string, config: RseConfig, isTemplateDownload: boolean): Promise<boolean>;
17
+ export declare function handleGitInit(cwd: string, isDev: boolean, projectName: string, projectPath: string, config: ReliverseConfig, isTemplateDownload: boolean): Promise<boolean>;
17
18
  /**
18
19
  * Configures a GitHub repository:
19
20
  * - Prompts for a GitHub username if needed.
20
21
  * - Uses handleGithubRepo to create or select an existing repository.
21
22
  * - Re-reads memory for the GitHub token and initializes the Octokit instance.
22
23
  */
23
- export declare function configureGithubRepo(githubInstance: InstanceGithub, githubToken: string, skipPrompts: boolean, cwd: string, isDev: boolean, memory: ReliverseMemory, config: RseConfig, projectName: string, projectPath: string, maskInput: boolean, selectedTemplate: RepoOption, isTemplateDownload: boolean, githubUsername: string): Promise<GithubSetupResult>;
24
+ export declare function configureGithubRepo(githubInstance: InstanceGithub, githubToken: string, skipPrompts: boolean, cwd: string, isDev: boolean, memory: ReliverseMemory, config: ReliverseConfig, projectName: string, projectPath: string, maskInput: boolean, selectedTemplate: RepoOption, isTemplateDownload: boolean, githubUsername: string): Promise<GithubSetupResult>;
24
25
  /**
25
26
  * Orchestrates the entire deployment flow.
26
27
  * It first asks whether the user wishes to use GitHub, then:
@@ -31,7 +32,7 @@ export declare function configureGithubRepo(githubInstance: InstanceGithub, gith
31
32
  export declare function promptGitDeploy({ isLib, projectName, config, projectPath, primaryDomain: initialPrimaryDomain, hasDbPush, shouldRunDbPush, shouldInstallDeps, isDev, memory, cwd, maskInput, skipPrompts, selectedTemplate, isTemplateDownload, frontendUsername, }: {
32
33
  isLib: boolean;
33
34
  projectName: string;
34
- config: RseConfig;
35
+ config: ReliverseConfig;
35
36
  projectPath: string;
36
37
  primaryDomain: string;
37
38
  hasDbPush: boolean;
@@ -1,5 +1,6 @@
1
1
  import type { SimpleGit } from "simple-git";
2
- import type { GitModParams, RseConfig } from "../../../../types/mod.js";
2
+ import type { ReliverseConfig } from "../../../../schema/mod.js";
3
+ import type { GitModParams } from "../../../../types/mod.js";
3
4
  import type { InstanceGithub } from "../../../../utils/instanceGithub.js";
4
5
  import type { RepoOption } from "../../../../utils/projectRepository.js";
5
6
  import type { ReliverseMemory } from "../../../../utils/schemaMemory.js";
@@ -7,7 +8,7 @@ import type { ReliverseMemory } from "../../../../utils/schemaMemory.js";
7
8
  * Initializes Git repository in effectiveDir if not already present.
8
9
  * Also renames the default branch to config.repoBranch if provided.
9
10
  */
10
- export declare function initializeGitRepo(git: SimpleGit, alreadyGit: boolean, config: RseConfig, isTemplateDownload: boolean): Promise<void>;
11
+ export declare function initializeGitRepo(git: SimpleGit, alreadyGit: boolean, config: ReliverseConfig, isTemplateDownload: boolean): Promise<void>;
11
12
  /**
12
13
  * Initializes a git repository for the given project.
13
14
  * If allowReInit is true and a repository exists, it is removed and reinitialized.
@@ -15,7 +16,7 @@ export declare function initializeGitRepo(git: SimpleGit, alreadyGit: boolean, c
15
16
  export declare function initGitDir(params: GitModParams & {
16
17
  allowReInit: boolean;
17
18
  createCommit: boolean;
18
- config: RseConfig;
19
+ config: ReliverseConfig;
19
20
  isTemplateDownload: boolean;
20
21
  }): Promise<boolean>;
21
22
  /**
@@ -24,7 +25,7 @@ export declare function initGitDir(params: GitModParams & {
24
25
  */
25
26
  export declare function createCommit(params: GitModParams & {
26
27
  message?: string;
27
- config: RseConfig;
28
+ config: ReliverseConfig;
28
29
  isTemplateDownload: boolean;
29
30
  }): Promise<boolean>;
30
31
  /**
@@ -35,7 +36,7 @@ export declare function createCommit(params: GitModParams & {
35
36
  export declare function handleGithubRepo(params: GitModParams & {
36
37
  skipPrompts: boolean;
37
38
  memory: ReliverseMemory;
38
- config: RseConfig;
39
+ config: ReliverseConfig;
39
40
  maskInput: boolean;
40
41
  selectedTemplate: RepoOption;
41
42
  isTemplateDownload: boolean;
@@ -1,8 +1,8 @@
1
- import type { RseConfig } from "../../../../types/mod.js";
1
+ import type { ReliverseConfig } from "../../../../schema/mod.js";
2
2
  import { type InstanceGithub } from "../../../../utils/instanceGithub.js";
3
3
  export declare function checkGithubRepoOwnership(githubInstance: InstanceGithub, owner: string, repo: string): Promise<{
4
4
  exists: boolean;
5
5
  isOwner: boolean;
6
6
  defaultBranch?: string;
7
7
  }>;
8
- export declare function createGithubRepo(githubInstance: InstanceGithub, repoName: string, repoOwner: string, projectPath: string, isDev: boolean, cwd: string, config: RseConfig, isTemplateDownload: boolean): Promise<boolean>;
8
+ export declare function createGithubRepo(githubInstance: InstanceGithub, repoName: string, repoOwner: string, projectPath: string, isDev: boolean, cwd: string, config: ReliverseConfig, isTemplateDownload: boolean): Promise<boolean>;
@@ -4,9 +4,9 @@ import type { ReliverseMemory } from "../../../../utils/schemaMemory.js";
4
4
  */
5
5
  export declare function archiveExistingRepoContent(repoUrl: string, projectPath: string): Promise<{
6
6
  success: boolean;
7
- externalRseConfig?: string;
7
+ externalReliverseConfig?: string;
8
8
  }>;
9
9
  export declare function handleExistingRepoContent(memory: ReliverseMemory, repoOwner: string, repoName: string, projectPath: string): Promise<{
10
10
  success: boolean;
11
- externalRseConfig?: string;
11
+ externalReliverseConfig?: string;
12
12
  }>;
@@ -125,7 +125,7 @@ export async function archiveExistingRepoContent(repoUrl, projectPath) {
125
125
  }
126
126
  return {
127
127
  success: true,
128
- ...externalrseth && { externalRseConfig: externalrseth }
128
+ ...externalrseth && { externalReliverseConfig: externalrseth }
129
129
  };
130
130
  } catch (error) {
131
131
  relinka(
@@ -145,14 +145,17 @@ export async function archiveExistingRepoContent(repoUrl, projectPath) {
145
145
  export async function handleExistingRepoContent(memory, repoOwner, repoName, projectPath) {
146
146
  try {
147
147
  const repoUrl = `https://oauth2:${memory.githubKey}@github.com/${repoOwner}/${repoName}.git`;
148
- const { success, externalRseConfig } = await archiveExistingRepoContent(repoUrl, projectPath);
148
+ const { success, externalReliverseConfig } = await archiveExistingRepoContent(
149
+ repoUrl,
150
+ projectPath
151
+ );
149
152
  if (!success) {
150
153
  throw new Error("Failed to retrieve repository git data");
151
154
  }
152
155
  relinka("success", "Retrieved repository git directory data");
153
156
  return {
154
157
  success: true,
155
- ...externalRseConfig && { externalRseConfig }
158
+ ...externalReliverseConfig && { externalReliverseConfig }
156
159
  };
157
160
  } catch (error) {
158
161
  relinka(
@@ -1,9 +1,10 @@
1
- import type { GitModParams, RseConfig } from "../../../../types/mod.js";
1
+ import type { ReliverseConfig } from "../../../../schema/mod.js";
2
+ import type { GitModParams } from "../../../../types/mod.js";
2
3
  import type { RepoOption } from "../../../../utils/projectRepository.js";
3
4
  import type { ReliverseMemory } from "../../../../utils/schemaMemory.js";
4
5
  export declare function handleExistingRepo(params: GitModParams & {
5
6
  memory: ReliverseMemory;
6
- config: RseConfig;
7
+ config: ReliverseConfig;
7
8
  githubUsername: string;
8
9
  selectedTemplate: RepoOption;
9
10
  }, shouldCommitAndPush: boolean, isDev: boolean): Promise<boolean>;
@@ -1,14 +1,14 @@
1
1
  import { relinka } from "@reliverse/relinka";
2
2
  import { simpleGit } from "simple-git";
3
3
  import { cliName } from "../../../../config/constants.js";
4
- import { migrateRseConfig } from "../../../../config/migrate.js";
4
+ import { migrateReliverseConfig } from "../../../../config/migrate.js";
5
5
  import { getEffectiveDir } from "../../../../utils/getEffectiveDir.js";
6
6
  import { handleReplacements } from "../../../../utils/replacements/reps-mod.js";
7
7
  import { handleExistingRepoContent } from "./utils-private-repo.js";
8
8
  export async function handleExistingRepo(params, shouldCommitAndPush, isDev) {
9
9
  const effectiveDir = getEffectiveDir(params);
10
10
  relinka("info", `Using existing repo: ${params.githubUsername}/${params.projectName}`);
11
- const { success: repoSuccess, externalRseConfig } = await handleExistingRepoContent(
11
+ const { success: repoSuccess, externalReliverseConfig } = await handleExistingRepoContent(
12
12
  params.memory,
13
13
  params.githubUsername,
14
14
  params.projectName,
@@ -17,8 +17,8 @@ export async function handleExistingRepo(params, shouldCommitAndPush, isDev) {
17
17
  if (!repoSuccess) {
18
18
  throw new Error("Failed to handle existing repository content");
19
19
  }
20
- if (externalRseConfig) {
21
- await migrateRseConfig(externalRseConfig, effectiveDir, isDev);
20
+ if (externalReliverseConfig) {
21
+ await migrateReliverseConfig(externalReliverseConfig, effectiveDir, isDev);
22
22
  }
23
23
  await handleReplacements(
24
24
  effectiveDir,
@@ -1,7 +1,7 @@
1
1
  import { relinka } from "@reliverse/relinka";
2
2
  import { confirmPrompt, defineCommand, inputPrompt, selectPrompt } from "@reliverse/rempts";
3
3
  import { execaCommand } from "execa";
4
- import { getOrCreateRseConfig } from "../config/core-cfg.js";
4
+ import { getOrCreateReliverseConfig } from "../config/core-cfg.js";
5
5
  import { getCurrentWorkingDirectory } from "../utils/terminalHelpers.js";
6
6
  const DANGEROUS_COMMANDS = ["login", "logout", "memory", "schema", "studio", "update", "upload"];
7
7
  const SAFE_COMMANDS = [
@@ -96,7 +96,7 @@ export default defineCommand({
96
96
  interactive
97
97
  } = args;
98
98
  const cwd = getCurrentWorkingDirectory();
99
- const { config } = await getOrCreateRseConfig({
99
+ const { config } = await getOrCreateReliverseConfig({
100
100
  projectPath: cwd,
101
101
  isDev,
102
102
  overrides: {}
@@ -7,7 +7,7 @@ import { execaCommand } from "execa";
7
7
  import { jsonrepair } from "jsonrepair";
8
8
  import { builders, loadFile, writeFile } from "magicast";
9
9
  import { UNKNOWN_VALUE } from "../config/constants.js";
10
- import { generateRseConfig } from "../config/create.js";
10
+ import { generateReliverseConfig } from "../config/create.js";
11
11
  import {
12
12
  downloadFileFromGitHub,
13
13
  ensureEnvCacheDir,
@@ -338,7 +338,7 @@ export const genCfg: GenCfg[] = [
338
338
  }
339
339
  const githubUsername = UNKNOWN_VALUE;
340
340
  const skipInstallPrompt = !useJsonc && isDev;
341
- await generateRseConfig({
341
+ await generateReliverseConfig({
342
342
  projectName,
343
343
  frontendUsername: UNKNOWN_VALUE,
344
344
  deployService: "vercel",
@@ -3,7 +3,7 @@ import fs, { ensuredir } from "@reliverse/relifso";
3
3
  import { relinka } from "@reliverse/relinka";
4
4
  import { confirmPrompt } from "@reliverse/rempts";
5
5
  import { homeDir } from "../config/constants.js";
6
- import { getOrCreateRseConfig } from "../config/core-cfg.js";
6
+ import { getOrCreateReliverseConfig } from "../config/core-cfg.js";
7
7
  import { initGithubSDK } from "../utils/instanceGithub.js";
8
8
  import { askUsernameFrontend } from "../utils/prompts/askUsernameFrontend.js";
9
9
  import { getOrCreateReliverseMemory } from "../utils/reliverseMemory.js";
@@ -56,7 +56,7 @@ export async function downloadFileFromGitHub(repo, filePath, branch = "main", us
56
56
  content: "Regardless of your choice, your data will be securely stored on your device."
57
57
  });
58
58
  const memory = await getOrCreateReliverseMemory();
59
- const { config } = await getOrCreateRseConfig({
59
+ const { config } = await getOrCreateReliverseConfig({
60
60
  projectPath: process.cwd(),
61
61
  isDev: false,
62
62
  overrides: {}