@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,162 +1 @@
1
1
  export { handleReplacements } from "../utils/replacements/reps-mod.js";
2
- export const DEFAULT_CONFIG_DLER = {
3
- bumpDisable: false,
4
- bumpFilter: ["package.json", "reliverse.ts"],
5
- bumpMode: "patch",
6
- bumpSet: "",
7
- commonPubPause: true,
8
- commonPubRegistry: "npm",
9
- commonVerbose: false,
10
- displayBuildPubLogs: true,
11
- coreDeclarations: true,
12
- coreDescription: "",
13
- coreEntryFile: "mod.ts",
14
- coreEntrySrcDir: "src",
15
- coreBuildOutDir: "bin",
16
- coreIsCLI: { enabled: false, scripts: {} },
17
- distJsrAllowDirty: true,
18
- distJsrBuilder: "jsr",
19
- distJsrDirName: "dist-jsr",
20
- distJsrDryRun: false,
21
- distJsrFailOnWarn: false,
22
- distJsrGenTsconfig: false,
23
- distJsrOutFilesExt: "ts",
24
- distJsrSlowTypes: true,
25
- distNpmBuilder: "mkdist",
26
- distNpmDirName: "dist-npm",
27
- distNpmOutFilesExt: "js",
28
- libsActMode: "main-project-only",
29
- libsDirDist: "dist-libs",
30
- libsDirSrc: "src/libs",
31
- libsList: {},
32
- logsFileName: ".logs/relinka.log",
33
- logsFreshFile: true,
34
- // Dependency filtering
35
- filterDepsPatterns: {
36
- global: ["@types", "biome", "eslint", "knip", "prettier", "typescript", "@reliverse/dler"],
37
- "dist-npm": [],
38
- "dist-jsr": [],
39
- "dist-libs": {}
40
- },
41
- // Code quality tools
42
- runBeforeBuild: [],
43
- // tsc, eslint, biome, knip, dler-check
44
- runAfterBuild: [],
45
- // dler-check
46
- // Build hooks
47
- hooksBeforeBuild: [
48
- // async () => {
49
- // await someAsyncOperation();
50
- // }
51
- ],
52
- hooksAfterBuild: [
53
- // async () => {
54
- // await someAsyncOperation();
55
- // }
56
- ],
57
- postBuildSettings: {
58
- deleteDistTmpAfterBuild: true
59
- },
60
- // Build setup
61
- transpileFailOnWarn: false,
62
- transpileEsbuild: "es2023",
63
- transpileFormat: "esm",
64
- transpileMinify: true,
65
- transpilePublicPath: "/",
66
- transpileSourcemap: "none",
67
- transpileSplitting: false,
68
- transpileStub: false,
69
- transpileTarget: "node",
70
- transpileWatch: false,
71
- // Publish artifacts configuration
72
- publishArtifacts: {
73
- global: ["package.json", "README.md", "LICENSE"],
74
- "dist-jsr": [],
75
- "dist-npm": [],
76
- "dist-libs": {}
77
- },
78
- // Files with these extensions will be built
79
- // Any other files will be copied as-is to dist
80
- buildPreExtensions: ["ts", "js"],
81
- // If you need to exclude some ts/js files from being built,
82
- // you can store them in the dirs with buildTemplatesDir name
83
- buildTemplatesDir: "templates",
84
- // Integrated relinka logger configuration
85
- relinka: {
86
- verbose: false,
87
- dirs: {
88
- maxLogFiles: 5
89
- },
90
- disableColors: false,
91
- logFile: {
92
- outputPath: "logs.log",
93
- nameWithDate: "disable",
94
- freshLogFile: true
95
- },
96
- saveLogsToFile: true,
97
- timestamp: {
98
- enabled: false,
99
- format: "HH:mm:ss"
100
- },
101
- cleanupInterval: 1e4,
102
- // 10 seconds
103
- bufferSize: 4096,
104
- // 4KB
105
- maxBufferAge: 5e3,
106
- // 5 seconds
107
- levels: {
108
- success: {
109
- symbol: "\u2713",
110
- fallbackSymbol: "[OK]",
111
- color: "greenBright",
112
- spacing: 3
113
- },
114
- info: {
115
- symbol: "i",
116
- fallbackSymbol: "[i]",
117
- color: "cyanBright",
118
- spacing: 3
119
- },
120
- error: {
121
- symbol: "\u2716",
122
- fallbackSymbol: "[ERR]",
123
- color: "redBright",
124
- spacing: 3
125
- },
126
- warn: {
127
- symbol: "\u26A0",
128
- fallbackSymbol: "[WARN]",
129
- color: "yellowBright",
130
- spacing: 3
131
- },
132
- fatal: {
133
- symbol: "\u203C",
134
- fallbackSymbol: "[FATAL]",
135
- color: "redBright",
136
- spacing: 3
137
- },
138
- verbose: {
139
- symbol: "\u2727",
140
- fallbackSymbol: "[VERBOSE]",
141
- color: "gray",
142
- spacing: 3
143
- },
144
- internal: {
145
- symbol: "\u2699",
146
- fallbackSymbol: "[INTERNAL]",
147
- color: "magentaBright",
148
- spacing: 3
149
- },
150
- log: { symbol: "\u2502", fallbackSymbol: "|", color: "dim", spacing: 3 },
151
- message: {
152
- symbol: "\u{1F7A0}",
153
- fallbackSymbol: "[MSG]",
154
- color: "cyan",
155
- spacing: 3
156
- }
157
- }
158
- }
159
- };
160
- export const defineConfig = (userConfig = {}) => {
161
- return { ...DEFAULT_CONFIG_DLER, ...userConfig };
162
- };
@@ -39,4 +39,5 @@ export declare function handleRecursiveUpdates(args: UpdateArgs, options: Packag
39
39
  export declare function handleWorkspaceUpdates(args: UpdateArgs, options: PackageCheckOptions): Promise<number>;
40
40
  export declare function displayUpdateSummary(totalUpdated: number, args: UpdateArgs, isMonorepoProject: boolean, shouldUpdateWorkspaces: boolean): void;
41
41
  export declare function handleInstallation(args: UpdateArgs, effectiveLinker: string, packageJson: any): Promise<void>;
42
+ export declare function handleToolUpgrades(args: any): Promise<void>;
42
43
  export {};
@@ -1,4 +1,5 @@
1
1
  import path from "@reliverse/pathkit";
2
+ import { re } from "@reliverse/relico";
2
3
  import fs from "@reliverse/relifso";
3
4
  import { relinka } from "@reliverse/relinka";
4
5
  import { multiselectPrompt } from "@reliverse/rempts";
@@ -18,7 +19,15 @@ import {
18
19
  runInstallCommand,
19
20
  runInstallCommandWithFilter,
20
21
  updatePackageJsonFile,
21
- updateWorkspacePackages
22
+ updateWorkspacePackages,
23
+ upgradeBun,
24
+ upgradeDlerGlobal,
25
+ upgradeDlerLocal,
26
+ upgradeGit,
27
+ upgradeNode,
28
+ upgradeNpm,
29
+ upgradePnpm,
30
+ upgradeYarn
22
31
  } from "./utils.js";
23
32
  export async function validateUpdateArgs(args) {
24
33
  const exclusiveFlags = [
@@ -258,3 +267,95 @@ export async function handleInstallation(args, effectiveLinker, packageJson) {
258
267
  relinka("log", `Run '${packageManager.command} install' manually to apply the changes`);
259
268
  }
260
269
  }
270
+ export async function handleToolUpgrades(args) {
271
+ const toolUpgradeFunctions = [
272
+ { name: "dler (local)", fn: upgradeDlerLocal },
273
+ { name: "dler (global)", fn: upgradeDlerGlobal },
274
+ { name: "git", fn: upgradeGit },
275
+ { name: "node.js", fn: upgradeNode },
276
+ { name: "npm", fn: upgradeNpm },
277
+ { name: "bun", fn: upgradeBun },
278
+ { name: "yarn", fn: upgradeYarn },
279
+ { name: "pnpm", fn: upgradePnpm }
280
+ ];
281
+ let results = [];
282
+ if (args["upgrade-interactive"]) {
283
+ const preliminaryResults = await Promise.all(
284
+ toolUpgradeFunctions.map(async ({ fn }) => await fn())
285
+ );
286
+ const availableTools = toolUpgradeFunctions.map((tool, index) => ({
287
+ ...tool,
288
+ result: preliminaryResults[index]
289
+ })).filter(({ result }) => result && result.status !== "not-found");
290
+ if (availableTools.length === 0) {
291
+ relinka("warn", "No tools available for upgrade");
292
+ return;
293
+ }
294
+ const selectedTools = await multiselectPrompt({
295
+ title: "Select tools to upgrade",
296
+ displayInstructions: true,
297
+ options: [
298
+ { label: "Exit", value: "exit" },
299
+ ...availableTools.map(({ name, result }) => {
300
+ const isUpToDate = result && result.status === "up-to-date";
301
+ const hasErrors = result && result.status === "error";
302
+ const canUpgrade = result && result.status === "upgraded";
303
+ let label = name;
304
+ if (isUpToDate) {
305
+ label += " (up-to-date)";
306
+ } else if (hasErrors) {
307
+ label += " (has errors)";
308
+ } else if (canUpgrade) {
309
+ label += " (can be upgraded)";
310
+ }
311
+ return {
312
+ label: isUpToDate || hasErrors ? re.gray(label) : label,
313
+ value: name,
314
+ disabled: isUpToDate || hasErrors,
315
+ hint: hasErrors ? result.message : void 0
316
+ };
317
+ })
318
+ ]
319
+ });
320
+ if (selectedTools.length === 0 || selectedTools.includes("exit")) {
321
+ relinka("info", "Exiting upgrade process");
322
+ return;
323
+ }
324
+ const actualSelectedTools = selectedTools.filter((tool) => tool !== "exit");
325
+ relinka("info", `Upgrading ${actualSelectedTools.length} selected tools...`);
326
+ for (const toolName of actualSelectedTools) {
327
+ const tool = availableTools.find((t) => t.name === toolName);
328
+ if (tool) {
329
+ const result = await tool.fn();
330
+ results.push(result);
331
+ }
332
+ }
333
+ } else {
334
+ results = await Promise.all(toolUpgradeFunctions.map(async ({ fn }) => await fn()));
335
+ }
336
+ const upgraded = results.filter((r) => r.status === "upgraded");
337
+ const upToDate = results.filter((r) => r.status === "up-to-date");
338
+ const notFound = results.filter((r) => r.status === "not-found");
339
+ const errors = results.filter((r) => r.status === "error");
340
+ if (upgraded.length > 0) {
341
+ relinka("success", `Upgraded ${upgraded.length} tools:`);
342
+ upgraded.forEach(
343
+ (r) => relinka("verbose", ` \u2713 ${r.tool}${r.message ? ` - ${r.message}` : ""}`)
344
+ );
345
+ }
346
+ if (upToDate.length > 0) {
347
+ relinka("info", `${upToDate.length} tools already up-to-date:`);
348
+ upToDate.forEach(
349
+ (r) => relinka("verbose", ` \u2022 ${r.tool}${r.message ? ` - ${r.message}` : ""}`)
350
+ );
351
+ }
352
+ if (notFound.length > 0) {
353
+ relinka("warn", `${notFound.length} tools not installed (skipped):`);
354
+ notFound.forEach((r) => relinka("verbose", ` - ${r.tool}`));
355
+ }
356
+ if (errors.length > 0) {
357
+ relinka("error", `${errors.length} tools had errors:`);
358
+ errors.forEach((r) => relinka("verbose", ` \u2717 ${r.tool}${r.message ? ` - ${r.message}` : ""}`));
359
+ }
360
+ relinka("success", "Upgrade check completed!");
361
+ }
@@ -0,0 +1,3 @@
1
+ import type { CommonArgs } from "../types/mod";
2
+ export declare function commonStartActions({ strCwd, isCI, isDev }: CommonArgs): Promise<void>;
3
+ export declare function commonEndActions(): Promise<void>;
@@ -0,0 +1,28 @@
1
+ import { relinka } from "@reliverse/relinka";
2
+ import { prepareReliverseEnvironment } from "../config/prepare.js";
3
+ import { showEndPrompt, showStartPrompt } from "./startEndPrompts.js";
4
+ export async function commonStartActions({ strCwd, isCI, isDev }) {
5
+ if (!isCI) {
6
+ await showStartPrompt(isDev, false);
7
+ }
8
+ if (isDev) {
9
+ relinka.log("Running the CLI in dev mode.");
10
+ }
11
+ if (!process.versions.bun) {
12
+ relinka.warn(
13
+ "Rse CLI is currently optimized for Bun only. Unexpected behavior may occur with other runtimes."
14
+ );
15
+ relinka.warn("To avoid issues, it's strongly recommended to install Bun: https://bun.sh/get");
16
+ }
17
+ if (isCI) {
18
+ relinka.warn(
19
+ "To proceed in CI mode, use subcommands and their flags: rse --help OR rse <command> --help"
20
+ );
21
+ process.exit(0);
22
+ }
23
+ await prepareReliverseEnvironment(strCwd, isDev, "ts");
24
+ }
25
+ export async function commonEndActions() {
26
+ await showEndPrompt();
27
+ process.exit(0);
28
+ }
@@ -1,4 +1,4 @@
1
- import type { RseConfig } from "../types/mod.js";
1
+ import type { ReliverseConfig } from "../schema/mod.js";
2
2
  /**
3
3
  * A string literal union for either 'gitBehavior' or 'deployBehavior'
4
4
  */
@@ -8,5 +8,5 @@ type DecisionKey = "gitBehavior" | "deployBehavior";
8
8
  * - The config's behavior key (autoYes, autoNo, prompt)
9
9
  * - Whether skipPrompts is true
10
10
  */
11
- export declare function decide(config: RseConfig, behaviorKey: DecisionKey, title: string, content: string | undefined, defaultValue: boolean, skipPrompts: boolean): Promise<boolean>;
11
+ export declare function decide(config: ReliverseConfig, behaviorKey: DecisionKey, title: string, content: string | undefined, defaultValue: boolean, skipPrompts: boolean): Promise<boolean>;
12
12
  export {};
@@ -1,4 +1,4 @@
1
- import type { RseConfig } from "../../types/mod.js";
1
+ import type { ReliverseConfig } from "../../schema/mod.js";
2
2
  /**
3
3
  * Defines the options for downloading a project from a remote repository.
4
4
  */
@@ -14,7 +14,7 @@ interface DownloadRepoOptions {
14
14
  force?: boolean;
15
15
  forceClean?: boolean;
16
16
  preserveGit?: boolean;
17
- config?: RseConfig | undefined;
17
+ config?: ReliverseConfig | undefined;
18
18
  returnTime?: boolean;
19
19
  returnSize?: boolean;
20
20
  returnConcurrency?: boolean;
@@ -11,7 +11,7 @@ import { simpleGit } from "simple-git";
11
11
  import { extract } from "tar";
12
12
  import { promisify } from "util";
13
13
  import { cliConfigJsonc, cliConfigTs, cliHomeRepos } from "../../config/constants.js";
14
- import { getRseConfigPath } from "../../config/path.js";
14
+ import { getReliverseConfigPath } from "../../config/path.js";
15
15
  import { initGitDir } from "../../init/use-template/cp-modules/git-deploy-prompts/git.js";
16
16
  const execAsync = promisify(exec);
17
17
  async function getFolderSize(directory, skipDirs = []) {
@@ -173,10 +173,10 @@ export async function downloadRepo({
173
173
  await ensuredir(projectPath);
174
174
  const parentDir = dirname(projectPath);
175
175
  try {
176
- await getRseConfigPath(parentDir, isDev, true);
176
+ await getReliverseConfigPath(parentDir, isDev, true);
177
177
  } catch (_error) {
178
178
  }
179
- const { configPath: projectConfigPath } = await getRseConfigPath(projectPath, isDev, true);
179
+ const { configPath: projectConfigPath } = await getReliverseConfigPath(projectPath, isDev, true);
180
180
  const hasConfig = await fs.pathExists(projectConfigPath);
181
181
  if (hasConfig) {
182
182
  const choice = await selectPrompt({
@@ -1,4 +1,4 @@
1
- import type { RseConfig } from "../../types/mod.js";
1
+ import type { ReliverseConfig } from "../../schema/mod.js";
2
2
  import { type DownloadResult } from "./downloadRepo.js";
3
3
  export declare function handleDownload({ cwd, isDev, skipPrompts, projectPath, projectName, selectedRepo, githubToken, config, preserveGit, install, isCustom, isTemplateDownload, cache, }: {
4
4
  cwd: string;
@@ -9,7 +9,7 @@ export declare function handleDownload({ cwd, isDev, skipPrompts, projectPath, p
9
9
  selectedRepo: string;
10
10
  githubToken?: string | undefined;
11
11
  preserveGit?: boolean | undefined;
12
- config?: RseConfig | undefined;
12
+ config?: ReliverseConfig | undefined;
13
13
  install?: boolean | undefined;
14
14
  isCustom?: boolean | undefined;
15
15
  isTemplateDownload: boolean;
@@ -1,4 +1,5 @@
1
- import type { LibConfig, PerfTimer } from "../types/mod.js";
1
+ import type { LibConfig } from "../schema/mod.js";
2
+ import type { PerfTimer } from "../types/mod.js";
2
3
  /**
3
4
  * Finalizes the build process and reports completion.
4
5
  */
@@ -3,7 +3,7 @@ import fs from "@reliverse/relifso";
3
3
  import { relinka } from "@reliverse/relinka";
4
4
  import { confirmPrompt, multiselectPrompt, selectPrompt } from "@reliverse/rempts";
5
5
  import { destr } from "destr";
6
- import { readRseConfig } from "../../config/read.js";
6
+ import { readReliverseConfig } from "../../config/read.js";
7
7
  import { removeComments } from "../codemods/removeComments.js";
8
8
  import { getUnusedDependencies } from "../codemods/removeUnusedDeps.js";
9
9
  import { uninstallDependencies } from "./dependencies.js";
@@ -28,7 +28,7 @@ export async function handleCleanup(cwd, configPath, isDev) {
28
28
  );
29
29
  }
30
30
  try {
31
- const rules = await readRseConfig(configPath, isDev);
31
+ const rules = await readReliverseConfig(configPath, isDev);
32
32
  if (rules?.ignoreDependencies) {
33
33
  rules.ignoreDependencies.forEach((dep) => ignoredDeps.add(dep));
34
34
  }
@@ -1,2 +1,2 @@
1
- import type { RseConfig } from "../../types/mod.js";
2
- export declare function handleCodemods(rules: RseConfig, cwd: string): Promise<void>;
1
+ import type { ReliverseConfig } from "../../schema/mod.js";
2
+ export declare function handleCodemods(rules: ReliverseConfig, cwd: string): Promise<void>;
@@ -1,8 +1,7 @@
1
- import type { Static } from "@sinclair/typebox";
2
- import { rseSchema } from "../config/schema.js";
1
+ import type { ProjectCategory, ProjectTemplate } from "../schema/mod.js";
3
2
  import { type RepoInfo } from "./schemaTemplate";
4
- export type RepoFromSchema = NonNullable<Static<(typeof rseSchema)["properties"]["projectTemplate"]>>;
5
- export type CategoryFromSchema = NonNullable<Static<(typeof rseSchema)["properties"]["projectCategory"]>>;
3
+ export type RepoFromSchema = NonNullable<ProjectTemplate>;
4
+ export type CategoryFromSchema = NonNullable<ProjectCategory>;
6
5
  export interface CloneOrTemplateRepo {
7
6
  id: RepoFromSchema;
8
7
  author: string;
@@ -1,2 +1,2 @@
1
- import type { RseConfig } from "../../types/mod.js";
2
- export declare function askUsernameFrontend(config: RseConfig, shouldAskIfExists: boolean): Promise<string | null>;
1
+ import type { ReliverseConfig } from "../../schema/mod.js";
2
+ export declare function askUsernameFrontend(config: ReliverseConfig, shouldAskIfExists: boolean): Promise<string | null>;
@@ -1,7 +1,7 @@
1
1
  import { re } from "@reliverse/relico";
2
2
  import { deleteLastLine, inputPrompt } from "@reliverse/rempts";
3
3
  import { DEFAULT_CLI_USERNAME } from "../../config/constants.js";
4
- import { updateRseConfig } from "../../config/update.js";
4
+ import { updateReliverseConfig } from "../../config/update.js";
5
5
  export async function askUsernameFrontend(config, shouldAskIfExists) {
6
6
  if (!shouldAskIfExists && config.projectAuthor && config.projectAuthor !== "")
7
7
  return config.projectAuthor;
@@ -20,10 +20,10 @@ export async function askUsernameFrontend(config, shouldAskIfExists) {
20
20
  if (hasPreviousName) {
21
21
  return previousName;
22
22
  }
23
- await updateRseConfig(process.cwd(), { projectAuthor: DEFAULT_CLI_USERNAME }, false);
23
+ await updateReliverseConfig(process.cwd(), { projectAuthor: DEFAULT_CLI_USERNAME }, false);
24
24
  deleteLastLine();
25
25
  return DEFAULT_CLI_USERNAME;
26
26
  }
27
- await updateRseConfig(process.cwd(), { projectAuthor: trimmedInput }, false);
27
+ await updateReliverseConfig(process.cwd(), { projectAuthor: trimmedInput }, false);
28
28
  return trimmedInput;
29
29
  }
@@ -432,7 +432,7 @@ export async function resolveAllCrossLibs(strategy = "inline", alias = "~", subF
432
432
  );
433
433
  }
434
434
  }
435
- async function loadDlerConfig() {
435
+ async function loadReliverseConfig() {
436
436
  try {
437
437
  const jiti = createJiti(import.meta.url);
438
438
  const config = await jiti.import("reliverse.ts", { default: true });
@@ -504,7 +504,7 @@ async function resolveCrossLibsViaPackage(libBinDir, alias = "~", buildPreExtens
504
504
  `[resolve-cross-libs] Invalid libBinDir structure: ${libBinDir}, could not extract library name or subfolder`
505
505
  );
506
506
  }
507
- const { libsList } = await loadDlerConfig();
507
+ const { libsList } = await loadReliverseConfig();
508
508
  const libDirToPackageMap = createLibDirToPackageMap(libsList);
509
509
  const files = await findSourceFiles(libBinDir, buildPreExtensions, buildTemplatesDir);
510
510
  const modifiedFiles = [];
@@ -20,8 +20,8 @@ export declare const memorySchema: import("@sinclair/typebox").TObject<{
20
20
  vercelKey: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
21
21
  openaiKey: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
22
22
  name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
23
- githubUsername: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
24
23
  email: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
24
+ githubUsername: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
25
25
  vercelTeamId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
26
26
  vercelTeamSlug: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
27
27
  }>;
@@ -1,2 +1,8 @@
1
- export declare const getPkgName: () => string;
2
- export declare const getPkgVersion: () => string;
1
+ export declare function readPackageJSON(): Promise<{
2
+ name?: string;
3
+ version?: string;
4
+ }>;
5
+ export declare const getPkgName: () => Promise<string>;
6
+ export declare const getPkgVersion: () => Promise<string>;
7
+ export declare function showStartPrompt(isDev: boolean, showRuntimeInfo: boolean): Promise<void>;
8
+ export declare function showEndPrompt(): Promise<void>;
@@ -1,14 +1,45 @@
1
1
  import { relinka } from "@reliverse/relinka";
2
- import { readPackageJSON } from "pkg-types";
3
- const pkgInfo = {
4
- name: "unknown",
5
- version: "0.0.0"
2
+ import { endPrompt, startPrompt } from "@reliverse/rempts";
3
+ import { isBun, isBunPM, isBunRuntime } from "@reliverse/runtime";
4
+ import { readPackageJSON as readPkgJSON } from "pkg-types";
5
+ import { cliVersion, dlerName } from "../config/constants.js";
6
+ export async function readPackageJSON() {
7
+ try {
8
+ const pkg = await readPkgJSON();
9
+ return { name: pkg.name, version: pkg.version };
10
+ } catch (error) {
11
+ relinka("warn", "Could not read package.json, using default values");
12
+ return {};
13
+ }
14
+ }
15
+ export const getPkgName = async () => {
16
+ const pkg = await readPackageJSON();
17
+ return pkg.name || "unknown";
6
18
  };
7
- readPackageJSON().then((pkg) => {
8
- pkgInfo.name = pkg.name || "unknown";
9
- pkgInfo.version = pkg.version || "0.0.0";
10
- }).catch(() => {
11
- relinka("warn", "Could not read package.json, using default values");
12
- });
13
- export const getPkgName = () => pkgInfo.name;
14
- export const getPkgVersion = () => pkgInfo.version;
19
+ export const getPkgVersion = async () => {
20
+ const pkg = await readPackageJSON();
21
+ return pkg.version || "0.0.0";
22
+ };
23
+ export async function showStartPrompt(isDev, showRuntimeInfo) {
24
+ await startPrompt({
25
+ titleColor: "inverse",
26
+ clearConsole: true,
27
+ packageName: dlerName,
28
+ packageVersion: cliVersion,
29
+ isDev
30
+ });
31
+ if (showRuntimeInfo) {
32
+ console.log("isBunRuntime:", isBunRuntime());
33
+ console.log("isBunPM:", await isBunPM());
34
+ console.log("isBun:", isBun);
35
+ }
36
+ }
37
+ export async function showEndPrompt() {
38
+ await endPrompt({
39
+ title: "\u2502 \u2764\uFE0F Please consider supporting rse development: https://github.com/sponsors/blefnk",
40
+ titleAnimation: "glitch",
41
+ titleColor: "dim",
42
+ titleTypography: "bold",
43
+ titleAnimationDelay: 800
44
+ });
45
+ }
@@ -1,4 +1,4 @@
1
- import type { DlerConfig, NpmOutExt, Sourcemap } from "../types/mod.js";
1
+ import type { NpmOutExt, ReliverseConfig, Sourcemap } from "../schema/mod.js";
2
2
  /**
3
3
  * Converts the Unified build sourcemap option to a Bun-friendly value.
4
4
  * @param transpileSourcemap - The sourcemap configuration ('none', 'inline', 'linked', 'external', true, false).
@@ -28,6 +28,6 @@ export declare function getUnifiedSourcemapOption(transpileSourcemap: Sourcemap)
28
28
  * @returns An object containing the new base name of the entry file.
29
29
  * @throws If the expected source entry file is not found in the output directory.
30
30
  */
31
- export declare function renameEntryFile(isJsr: boolean, outDirBin: string, originalEntryFileBasename: string, unifiedBundlerOutExt: NpmOutExt, distJsrOutFilesExt: NpmOutExt, config: DlerConfig): Promise<{
31
+ export declare function renameEntryFile(isJsr: boolean, outDirBin: string, originalEntryFileBasename: string, unifiedBundlerOutExt: NpmOutExt, distJsrOutFilesExt: NpmOutExt, config: ReliverseConfig): Promise<{
32
32
  updatedEntryFile: string;
33
33
  }>;
@@ -1,4 +1,4 @@
1
- import type { LibConfig } from "../types/mod.js";
1
+ import type { LibConfig } from "../schema/mod.js";
2
2
  /**
3
3
  * Recursively removes any existing distribution folders.
4
4
  */
@@ -1,5 +1,5 @@
1
- import type { DlerConfig } from "../types/mod.js";
1
+ import type { ReliverseConfig } from "../schema/mod.js";
2
2
  /**
3
3
  * Filters out development dependencies from a dependency record.
4
4
  */
5
- export declare function filterDeps(deps: Record<string, string> | undefined, clearUnused: boolean, outDirBin: string, isJsr: boolean, config: DlerConfig, libName?: string): Promise<Record<string, string>>;
5
+ export declare function filterDeps(deps: Record<string, string> | undefined, clearUnused: boolean, outDirBin: string, isJsr: boolean, config: ReliverseConfig, libName?: string): Promise<Record<string, string>>;
@@ -1,4 +1,4 @@
1
- import type { LibConfig } from "../types/mod.js";
1
+ import type { LibConfig } from "../schema/mod.js";
2
2
  /**
3
3
  * Determines the distribution name based on the file path and build type.
4
4
  * This function is used for logging and determining output paths.
@@ -1,8 +1,8 @@
1
- import type { DlerConfig, LibConfig } from "../types/mod.js";
1
+ import type { LibConfig, ReliverseConfig } from "../schema/mod.js";
2
2
  /**
3
3
  * Generates a jsr.json configuration file for JSR distributions.
4
4
  */
5
- export declare function createJsrJSON(outDirRoot: string, isLib: boolean, libsList: Record<string, LibConfig>, config: DlerConfig, libName?: string, pkgDescription?: string): Promise<void>;
5
+ export declare function createJsrJSON(outDirRoot: string, isLib: boolean, libsList: Record<string, LibConfig>, config: ReliverseConfig, libName?: string, pkgDescription?: string): Promise<void>;
6
6
  /**
7
7
  * Renames .tsx files by replacing the .tsx extension with -tsx.txt.
8
8
  */
@@ -1,10 +1,10 @@
1
- import type { DlerConfig, LibConfig, NpmOutExt } from "../types/mod.js";
1
+ import type { LibConfig, NpmOutExt, ReliverseConfig } from "../schema/mod.js";
2
2
  /**
3
3
  * Creates a package.json for a lib distribution.
4
4
  */
5
- export declare function library_createPackageJSON(libName: string, npmOutDir: string, jsrOutDir: string, effectivePubRegistry: "npm" | "jsr" | "npm-jsr" | undefined, libsList: Record<string, LibConfig>, config: DlerConfig, unifiedBundlerOutExt: NpmOutExt): Promise<void>;
5
+ export declare function library_createPackageJSON(libName: string, npmOutDir: string, jsrOutDir: string, effectivePubRegistry: "npm" | "jsr" | "npm-jsr" | undefined, libsList: Record<string, LibConfig>, config: ReliverseConfig, unifiedBundlerOutExt: NpmOutExt): Promise<void>;
6
6
  /**
7
7
  * Creates a JSR configuration file for a library.
8
8
  */
9
- declare function library_createJsrConfig(libName: string, pkgJsonDir: string, libsList: Record<string, LibConfig>, config: DlerConfig): Promise<void>;
9
+ declare function library_createJsrConfig(libName: string, pkgJsonDir: string, libsList: Record<string, LibConfig>, config: ReliverseConfig): Promise<void>;
10
10
  export { library_createJsrConfig };
@@ -1,8 +1,8 @@
1
- import type { DlerConfig, NpmOutExt } from "../types/mod.js";
1
+ import type { NpmOutExt, ReliverseConfig } from "../schema/mod.js";
2
2
  /**
3
3
  * Creates a package.json for the main distribution.
4
4
  */
5
5
  export declare function regular_createPackageJSON(outDirRoot: string, isJsr: boolean, coreIsCLI: {
6
6
  enabled: boolean;
7
7
  scripts: Record<string, string>;
8
- }, unifiedBundlerOutExt: NpmOutExt, config: DlerConfig, coreDescription: string, coreBuildOutDir?: string): Promise<void>;
8
+ }, unifiedBundlerOutExt: NpmOutExt, config: ReliverseConfig, coreDescription: string, coreBuildOutDir?: string): Promise<void>;