@reliverse/dler 1.7.103 → 1.7.104

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 (83) hide show
  1. package/bin/app/add/add-local/core/templates.js +3 -3
  2. package/bin/app/add/cmd.js +1 -1
  3. package/bin/app/ai/cmd.js +2 -2
  4. package/bin/app/check/cmd.js +2 -2
  5. package/bin/app/cli/cmd.js +1 -1
  6. package/bin/app/cli/impl.js +1 -1
  7. package/bin/app/config/cmd.d.ts +6 -0
  8. package/bin/app/config/cmd.js +22 -8
  9. package/bin/app/config/constants.d.ts +1 -1
  10. package/bin/app/config/constants.js +1 -1
  11. package/bin/app/config/{cfg-core.js → core-cfg.js} +5 -5
  12. package/bin/app/config/{cfg-create.js → create.js} +14 -14
  13. package/bin/app/config/{cfg-def-utils.js → def-utils.js} +3 -7
  14. package/bin/app/config/{cfg-detect.js → detect.js} +4 -4
  15. package/bin/app/config/{cfg-gen-cfg.js → gen-cfg.js} +2 -2
  16. package/bin/app/config/{cfg-migrate.js → migrate.js} +1 -1
  17. package/bin/app/config/{cfg-path.js → path.js} +1 -1
  18. package/bin/app/config/prepare.d.ts +3 -2
  19. package/bin/app/config/prepare.js +647 -150
  20. package/bin/app/config/{cfg-read.js → read.js} +5 -5
  21. package/bin/app/config/{cfg-reltypes-content.js → reltypes-content.js} +1 -1
  22. package/bin/app/config/{cfg-reltypes-utils.js → reltypes-utils.js} +3 -3
  23. package/bin/app/config/{cfg-repair.js → repair.js} +4 -4
  24. package/bin/app/config/{cfg-unstable.js → unstable.js} +2 -2
  25. package/bin/app/config/{cfg-update.js → update.js} +5 -5
  26. package/bin/app/env/env-impl.js +1 -1
  27. package/bin/app/init/cmd-2.js +1 -1
  28. package/bin/app/init/init-utils/init-impl.js +1 -1
  29. package/bin/app/init/init-utils/init-utils.d.ts +1 -1
  30. package/bin/app/init/init-utils/init-utils.js +3 -3
  31. package/bin/app/init/init-utils/mm-deprecated/editor-menu.js +1 -1
  32. package/bin/app/init/use-template/cp-mod.js +3 -3
  33. package/bin/app/init/use-template/cp-modules/cli-main-modules/cli-menu-items/getMainMenuOptions.js +1 -1
  34. package/bin/app/init/use-template/cp-modules/git-deploy-prompts/utils-repo-exists.js +1 -1
  35. package/bin/app/invoke/cmd.js +1 -1
  36. package/bin/app/mkdist/cmd.js +2 -2
  37. package/bin/app/mrse/cmd.js +1 -1
  38. package/bin/app/mrse/mrse-impl.js +1 -1
  39. package/bin/app/providers/better-t-stack/types.d.ts +6 -6
  40. package/bin/app/providers/reliverse-stack/reliverse-stack-mod.js +1 -1
  41. package/bin/app/pub/cmd.js +2 -2
  42. package/bin/app/schema/cmd.js +1 -1
  43. package/bin/app/schema/schema-impl.js +1 -1
  44. package/bin/app/toolbox/cmd.js +1 -1
  45. package/bin/app/types/mod.d.ts +1 -1
  46. package/bin/app/utils/downloading/downloadRepo.js +1 -1
  47. package/bin/app/utils/handlers/handleCleanup.js +1 -1
  48. package/bin/app/utils/projectRepository.d.ts +1 -1
  49. package/bin/app/utils/prompts/askUsernameFrontend.js +1 -1
  50. package/bin/app/utils/schemaMemory.d.ts +1 -1
  51. package/bin/dler.js +3 -3
  52. package/bin/mod.d.ts +20 -20
  53. package/bin/mod.js +53 -53
  54. package/package.json +1 -1
  55. package/bin/app/config/cfg-prepare.d.ts +0 -2
  56. package/bin/app/config/cfg-prepare.js +0 -302
  57. /package/bin/app/config/{cfg-biome.d.ts → biome.d.ts} +0 -0
  58. /package/bin/app/config/{cfg-biome.js → biome.js} +0 -0
  59. /package/bin/app/config/{cfg-comments.d.ts → comments.d.ts} +0 -0
  60. /package/bin/app/config/{cfg-comments.js → comments.js} +0 -0
  61. /package/bin/app/config/{cfg-content.d.ts → content.d.ts} +0 -0
  62. /package/bin/app/config/{cfg-content.js → content.js} +0 -0
  63. /package/bin/app/config/{cfg-core.d.ts → core-cfg.d.ts} +0 -0
  64. /package/bin/app/config/{cfg-create.d.ts → create.d.ts} +0 -0
  65. /package/bin/app/config/{cfg-def-utils.d.ts → def-utils.d.ts} +0 -0
  66. /package/bin/app/config/{cfg-default.d.ts → default-cfg.d.ts} +0 -0
  67. /package/bin/app/config/{cfg-default.js → default-cfg.js} +0 -0
  68. /package/bin/app/config/{cfg-detect.d.ts → detect.d.ts} +0 -0
  69. /package/bin/app/config/{cfg-gen-cfg.d.ts → gen-cfg.d.ts} +0 -0
  70. /package/bin/app/config/{cfg-migrate.d.ts → migrate.d.ts} +0 -0
  71. /package/bin/app/config/{cfg-path.d.ts → path.d.ts} +0 -0
  72. /package/bin/app/config/{cfg-prompts.d.ts → prompts.d.ts} +0 -0
  73. /package/bin/app/config/{cfg-prompts.js → prompts.js} +0 -0
  74. /package/bin/app/config/{cfg-read.d.ts → read.d.ts} +0 -0
  75. /package/bin/app/config/{cfg-reltypes-content.d.ts → reltypes-content.d.ts} +0 -0
  76. /package/bin/app/config/{cfg-reltypes-utils.d.ts → reltypes-utils.d.ts} +0 -0
  77. /package/bin/app/config/{cfg-repair.d.ts → repair.d.ts} +0 -0
  78. /package/bin/app/config/{cfg-schema.d.ts → schema.d.ts} +0 -0
  79. /package/bin/app/config/{cfg-schema.js → schema.js} +0 -0
  80. /package/bin/app/config/{cfg-unstable.d.ts → unstable.d.ts} +0 -0
  81. /package/bin/app/config/{cfg-update.d.ts → update.d.ts} +0 -0
  82. /package/bin/app/config/{cfg-utils.d.ts → utils.d.ts} +0 -0
  83. /package/bin/app/config/{cfg-utils.js → utils.js} +0 -0
@@ -1,9 +1,9 @@
1
1
  import { relinka } from "@reliverse/relinka";
2
2
  import { ofetch } from "ofetch";
3
- import { getRseConfigPath } from "../../../config/cfg-path.js";
4
- import { readRseConfig } from "../../../config/cfg-read.js";
5
- import { updateRseConfig } from "../../../config/cfg-update.js";
6
3
  import { UNKNOWN_VALUE } from "../../../config/constants.js";
4
+ import { getRseConfigPath } from "../../../config/path.js";
5
+ import { readRseConfig } from "../../../config/read.js";
6
+ import { updateRseConfig } from "../../../config/update.js";
7
7
  import { REPO_TEMPLATES } from "../../../utils/projectRepository.js";
8
8
  export async function checkForTemplateUpdate(projectConfig) {
9
9
  if (!projectConfig.projectTemplate || projectConfig.projectTemplate === UNKNOWN_VALUE) {
@@ -1,6 +1,6 @@
1
1
  import { relinka } from "@reliverse/relinka";
2
2
  import { defineCommand } from "@reliverse/rempts";
3
- import { getOrCreateRseConfig } from "../config/cfg-core.js";
3
+ import { getOrCreateRseConfig } from "../config/core-cfg.js";
4
4
  import { showManualBuilderMenu } from "../init/init-utils/init-impl.js";
5
5
  import { getOrCreateReliverseMemory } from "../utils/reliverseMemory.js";
6
6
  import { getCurrentWorkingDirectory } from "../utils/terminalHelpers.js";
package/bin/app/ai/cmd.js CHANGED
@@ -4,8 +4,8 @@ import { ensureOpenAIKey } from "./ai-impl/ai-auth.js";
4
4
  import { AGENT_NAMES } from "./ai-impl/ai-const.js";
5
5
  import { aiAgenticTool } from "./ai-impl/ai-tools.js";
6
6
  import { aiMenu } from "./ai-menu.js";
7
- import { getRseConfigPath } from "../config/cfg-path.js";
8
- import { readRseConfig } from "../config/cfg-read.js";
7
+ import { getRseConfigPath } from "../config/path.js";
8
+ import { readRseConfig } from "../config/read.js";
9
9
  import { getOrCreateReliverseMemory } from "../utils/reliverseMemory.js";
10
10
  import { getCurrentWorkingDirectory } from "../utils/terminalHelpers.js";
11
11
  export default defineCommand({
@@ -2,7 +2,7 @@ import path from "@reliverse/pathkit";
2
2
  import { re } from "@reliverse/relico";
3
3
  import { relinka } from "@reliverse/relinka";
4
4
  import { defineArgs, defineCommand, multiselectPrompt, selectPrompt } from "@reliverse/rempts";
5
- import { ensureDlerConfig } from "../config/prepare.js";
5
+ import { ensureReliverseConfig } from "../config/prepare.js";
6
6
  import { checkDlerConfigHealth } from "../rules/reliverse/dler-config-health/dler-config-health.js";
7
7
  import { checkFileExtensions } from "../rules/reliverse/file-extensions/file-extensions.js";
8
8
  import { analyzeDependencies } from "../rules/reliverse/missing-deps/analyzer.js";
@@ -88,7 +88,7 @@ export default defineCommand({
88
88
  }),
89
89
  async run({ args }) {
90
90
  const isDev = args.dev || process.env.DLER_DEV_MODE === "true";
91
- await ensureDlerConfig(isDev);
91
+ await ensureReliverseConfig(isDev, "ts");
92
92
  if (args.deps) {
93
93
  try {
94
94
  const directory = path.resolve(args.directory ?? ".");
@@ -1,8 +1,8 @@
1
1
  import fs, { ensuredir } from "@reliverse/relifso";
2
2
  import { relinka } from "@reliverse/relinka";
3
3
  import { defineCommand } from "@reliverse/rempts";
4
- import { getOrCreateRseConfig } from "../config/cfg-core.js";
5
4
  import { cliName, useLocalhost } from "../config/constants.js";
5
+ import { getOrCreateRseConfig } from "../config/core-cfg.js";
6
6
  import { showStartPrompt } from "../init/use-template/cp-modules/cli-main-modules/modules/showStartEndPrompt.js";
7
7
  import { authCheck } from "../login/login-impl.js";
8
8
  import { getOrCreateReliverseMemory } from "../utils/reliverseMemory.js";
@@ -1,8 +1,8 @@
1
1
  import { callCmd, selectPrompt } from "@reliverse/rempts";
2
2
  import { generate } from "random-words";
3
3
  import { aiMenu } from "../ai/ai-menu.js";
4
- import { detectProject } from "../config/cfg-detect.js";
5
4
  import { cliJsrPath, UNKNOWN_VALUE } from "../config/constants.js";
5
+ import { detectProject } from "../config/detect.js";
6
6
  import { ad, getRandomMessage, getWelcomeTitle, premium } from "../db/messages.js";
7
7
  import { showManualBuilderMenu } from "../init/init-utils/init-impl.js";
8
8
  import { getMainMenuOptions } from "../init/use-template/cp-modules/cli-main-modules/cli-menu-items/getMainMenuOptions.js";
@@ -14,5 +14,11 @@ declare const _default: import("@reliverse/rempts").Command<{
14
14
  description: string;
15
15
  default: false;
16
16
  };
17
+ type: {
18
+ type: "string";
19
+ description: string;
20
+ default: string;
21
+ choices: string[];
22
+ };
17
23
  }>;
18
24
  export default _default;
@@ -1,6 +1,7 @@
1
1
  import { relinka } from "@reliverse/relinka";
2
2
  import { defineArgs, defineCommand } from "@reliverse/rempts";
3
3
  import { ensureConfigMod } from "./core.js";
4
+ import { ensureReliverseConfig } from "./prepare.js";
4
5
  export default defineCommand({
5
6
  meta: {
6
7
  name: "config",
@@ -9,7 +10,7 @@ export default defineCommand({
9
10
  args: defineArgs({
10
11
  mode: {
11
12
  type: "string",
12
- description: "Config mode: copy-remote, copy-internal",
13
+ description: "Config mode: copy-remote, copy-internal, create",
13
14
  default: "copy-remote"
14
15
  },
15
16
  tool: {
@@ -21,17 +22,30 @@ export default defineCommand({
21
22
  type: "boolean",
22
23
  description: "Force update existing configuration",
23
24
  default: false
25
+ },
26
+ type: {
27
+ type: "string",
28
+ description: "Config file type: ts (TypeScript) or jsonc (JSON with comments)",
29
+ default: "ts",
30
+ choices: ["ts", "jsonc"]
24
31
  }
25
32
  }),
26
33
  run: async ({ args }) => {
27
- const { mode, tool, update } = args;
34
+ const { mode, tool, update, type } = args;
28
35
  try {
29
- await ensureConfigMod({
30
- tool,
31
- mode,
32
- forceUpdate: update
33
- });
34
- relinka("success", `Configuration for ${tool} has been ${update ? "updated" : "created"}`);
36
+ if (mode === "create") {
37
+ const configKind = type === "jsonc" ? "jsonc" : "ts";
38
+ const isDev = process.env.DLER_DEV_MODE === "true";
39
+ await ensureReliverseConfig(isDev, configKind);
40
+ relinka("success", `New ${configKind.toUpperCase()} configuration file has been created`);
41
+ } else {
42
+ await ensureConfigMod({
43
+ tool,
44
+ mode,
45
+ forceUpdate: update
46
+ });
47
+ relinka("success", `Configuration for ${tool} has been ${update ? "updated" : "created"}`);
48
+ }
35
49
  } catch (error) {
36
50
  relinka(
37
51
  "error",
@@ -1,5 +1,5 @@
1
1
  export declare const PROJECT_ROOT: string;
2
- export declare const cliVersion = "1.7.103";
2
+ export declare const cliVersion = "1.7.104";
3
3
  export declare const cliName = "@reliverse/rse";
4
4
  export declare const rseName = "@reliverse/rse";
5
5
  export declare const dlerName = "@reliverse/dler";
@@ -1,7 +1,7 @@
1
1
  import os from "node:os";
2
2
  import path from "@reliverse/pathkit";
3
3
  export const PROJECT_ROOT = path.resolve(process.cwd());
4
- const version = "1.7.103";
4
+ const version = "1.7.104";
5
5
  export const cliVersion = version;
6
6
  export const cliName = "@reliverse/rse";
7
7
  export const rseName = "@reliverse/rse";
@@ -1,12 +1,12 @@
1
1
  import path from "@reliverse/pathkit";
2
2
  import fs from "@reliverse/relifso";
3
3
  import { relinka } from "@reliverse/relinka";
4
- import { createRseConfig } from "./cfg-create.js";
5
- import { DEFAULT_CONFIG_RSE } from "./cfg-default.js";
6
- import { getRseConfigPath } from "./cfg-path.js";
7
- import { readRseConfig } from "./cfg-read.js";
8
- import { parseAndFixRseConfig } from "./cfg-repair.js";
9
4
  import { cliConfigJsonc, cliConfigTs, RSE_SCHEMA_DEV, UNKNOWN_VALUE } from "./constants.js";
5
+ import { createRseConfig } from "./create.js";
6
+ import { DEFAULT_CONFIG_RSE } from "./default-cfg.js";
7
+ import { getRseConfigPath } from "./path.js";
8
+ import { readRseConfig } from "./read.js";
9
+ import { parseAndFixRseConfig } from "./repair.js";
10
10
  export async function getOrCreateRseConfig({
11
11
  projectPath,
12
12
  isDev,
@@ -27,20 +27,7 @@ async function addDevDependency(pkgName, opts) {
27
27
  relinka("log", `${pkgName} already present in devDependencies in ${pkgPath}`);
28
28
  }
29
29
  }
30
- import { injectSectionComments } from "./cfg-comments.js";
31
- import { generateDefaultRulesForProject, getDefaultRseConfig } from "./cfg-def-utils.js";
32
- import { DEFAULT_CONFIG_RSE } from "./cfg-default.js";
33
- import { detectFeatures, getPackageJson } from "./cfg-detect.js";
34
- import { getRseConfigPath } from "./cfg-path.js";
35
- import { readRseConfig } from "./cfg-read.js";
36
- import { rseSchema } from "./cfg-schema.js";
37
- import {
38
- atomicWriteFile,
39
- cleanGitHubUrl,
40
- getBackupAndTempPaths,
41
- objectToCodeString,
42
- updateTsConfigInclude
43
- } from "./cfg-utils.js";
30
+ import { injectSectionComments } from "./comments.js";
44
31
  import {
45
32
  cliDomainDocs,
46
33
  DEFAULT_DOMAIN,
@@ -48,6 +35,19 @@ import {
48
35
  rseName,
49
36
  UNKNOWN_VALUE
50
37
  } from "./constants.js";
38
+ import { generateDefaultRulesForProject, getDefaultRseConfig } from "./def-utils.js";
39
+ import { DEFAULT_CONFIG_RSE } from "./default-cfg.js";
40
+ import { detectFeatures, getPackageJson } from "./detect.js";
41
+ import { getRseConfigPath } from "./path.js";
42
+ import { readRseConfig } from "./read.js";
43
+ import { rseSchema } from "./schema.js";
44
+ import {
45
+ atomicWriteFile,
46
+ cleanGitHubUrl,
47
+ getBackupAndTempPaths,
48
+ objectToCodeString,
49
+ updateTsConfigInclude
50
+ } from "./utils.js";
51
51
  export async function writeRseConfig(configPath, config, isDev, skipInstallPrompt = false, customPathToTypes) {
52
52
  if (await fs.pathExists(configPath)) {
53
53
  relinka("verbose", `Config file already exists at ${configPath}, skipping creation`);
@@ -3,14 +3,10 @@ import fs from "@reliverse/relifso";
3
3
  import { getUserPkgManager, runtimeInfo } from "@reliverse/runtime";
4
4
  import { safeDestr } from "destr";
5
5
  import { readPackageJSON } from "pkg-types";
6
- import { getBiomeConfig } from "./cfg-biome.js";
7
- import { DEFAULT_CONFIG_RSE } from "./cfg-default.js";
8
- import {
9
- detectFeatures,
10
- detectProjectFramework,
11
- getPackageJsonSafe
12
- } from "./cfg-detect.js";
6
+ import { getBiomeConfig } from "./biome.js";
13
7
  import { cliDomainDocs, DEFAULT_DOMAIN, rseName, UNKNOWN_VALUE } from "./constants.js";
8
+ import { DEFAULT_CONFIG_RSE } from "./default-cfg.js";
9
+ import { detectFeatures, detectProjectFramework, getPackageJsonSafe } from "./detect.js";
14
10
  export async function getDefaultRseConfig(projectPath, isDev, projectName, projectAuthor) {
15
11
  const packageJson = await getPackageJsonSafe(projectPath);
16
12
  const effectiveProjectName = packageJson?.name ?? projectName ?? UNKNOWN_VALUE;
@@ -2,10 +2,10 @@ import path from "@reliverse/pathkit";
2
2
  import fs from "@reliverse/relifso";
3
3
  import { relinka } from "@reliverse/relinka";
4
4
  import { readPackageJSON } from "pkg-types";
5
- import { getProjectContent } from "./cfg-content.js";
6
- import { PROJECT_FRAMEWORK_FILES } from "./cfg-default.js";
7
- import { getRseConfigPath } from "./cfg-path.js";
8
- import { readRseConfig } from "./cfg-read.js";
5
+ import { getProjectContent } from "./content.js";
6
+ import { PROJECT_FRAMEWORK_FILES } from "./default-cfg.js";
7
+ import { getRseConfigPath } from "./path.js";
8
+ import { readRseConfig } from "./read.js";
9
9
  export async function detectProjectFramework(projectPath) {
10
10
  const packageJson = await getPackageJson(projectPath);
11
11
  if (!packageJson) {
@@ -3,9 +3,9 @@ import fs, { ensuredir } from "@reliverse/relifso";
3
3
  import { relinka } from "@reliverse/relinka";
4
4
  import { destr } from "destr";
5
5
  import { execaCommand } from "execa";
6
- import { generateRseConfig } from "./cfg-create.js";
7
- import { getRseConfigPath } from "./cfg-path.js";
8
6
  import { CONFIG_CATEGORIES, UNKNOWN_VALUE } from "./constants.js";
7
+ import { generateRseConfig } from "./create.js";
8
+ import { getRseConfigPath } from "./path.js";
9
9
  async function generateBiomeConfig(projectPath) {
10
10
  const biomePath = path.join(projectPath, "biome.json");
11
11
  const biomeExists = await fs.pathExists(biomePath);
@@ -1,7 +1,7 @@
1
1
  import fs from "@reliverse/relifso";
2
2
  import { relinka } from "@reliverse/relinka";
3
3
  import { parseJSONC } from "confbox";
4
- import { updateRseConfig } from "./cfg-update.js";
4
+ import { updateRseConfig } from "./update.js";
5
5
  export async function migrateRseConfig(externalrseth, projectPath, isDev) {
6
6
  try {
7
7
  const content = await fs.readFile(externalrseth, "utf-8");
@@ -1,7 +1,7 @@
1
1
  import path from "@reliverse/pathkit";
2
2
  import fs from "@reliverse/relifso";
3
- import { askRseConfigType } from "./cfg-prompts.js";
4
3
  import { tsconfigJson } from "./constants.js";
4
+ import { askRseConfigType } from "./prompts.js";
5
5
  const configPathCache = /* @__PURE__ */ new Map();
6
6
  export async function getRseConfigPath(projectPath, isDev, skipPrompt, customTsconfigPath) {
7
7
  const cached = configPathCache.get(projectPath);
@@ -1,2 +1,3 @@
1
- export declare function ensureDlerConfig(isDev: boolean): Promise<void>;
2
- export declare function prepareDlerEnvironment(isDev: boolean): Promise<void>;
1
+ export type ConfigKind = "ts" | "jsonc";
2
+ export declare function ensureReliverseConfig(isDev: boolean, configKind?: ConfigKind): Promise<void>;
3
+ export declare function prepareReliverseEnvironment(isDev: boolean, configKind?: ConfigKind): Promise<void>;