@reliverse/dler 1.7.113 → 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 (154) 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 +9 -9
  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} +474 -228
  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/startEndPrompts.d.ts +8 -2
  110. package/bin/app/utils/startEndPrompts.js +43 -12
  111. package/bin/app/utils/utils-build.d.ts +2 -2
  112. package/bin/app/utils/utils-clean.d.ts +1 -1
  113. package/bin/app/utils/utils-deps.d.ts +2 -2
  114. package/bin/app/utils/utils-determine.d.ts +1 -1
  115. package/bin/app/utils/utils-jsr-json.d.ts +2 -2
  116. package/bin/app/utils/utils-package-json-libraries.d.ts +3 -3
  117. package/bin/app/utils/utils-package-json-regular.d.ts +2 -2
  118. package/bin/dler.js +2 -92
  119. package/bin/mod.d.ts +431 -438
  120. package/bin/mod.js +36 -27
  121. package/package.json +12 -10
  122. package/bin/app/agg/cmd.d.ts +0 -72
  123. package/bin/app/agg/cmd.js +0 -128
  124. package/bin/app/cli/cmd.d.ts +0 -12
  125. package/bin/app/cli/cmd.js +0 -56
  126. package/bin/app/cli/impl.d.ts +0 -3
  127. package/bin/app/cli/impl.js +0 -88
  128. package/bin/app/config/default-cfg.d.ts +0 -3
  129. package/bin/app/config/default-cfg.js +0 -155
  130. package/bin/app/config/default.d.ts +0 -6
  131. package/bin/app/config/default.js +0 -159
  132. package/bin/app/config/schema.d.ts +0 -130
  133. package/bin/app/config/schema.js +0 -443
  134. package/bin/app/init/use-template/cp-modules/cli-main-modules/cli-menu-items/getMainMenuOptions.d.ts +0 -12
  135. package/bin/app/init/use-template/cp-modules/cli-main-modules/cli-menu-items/getMainMenuOptions.js +0 -69
  136. package/bin/app/init/use-template/cp-modules/cli-main-modules/modules/showStartEndPrompt.d.ts +0 -2
  137. package/bin/app/init/use-template/cp-modules/cli-main-modules/modules/showStartEndPrompt.js +0 -26
  138. package/bin/app/schema/schema-impl.d.ts +0 -2
  139. package/bin/app/schema/schema-impl.js +0 -24
  140. package/bin/app/update/cmd.d.ts +0 -103
  141. package/bin/app/update/cmd.js +0 -299
  142. package/bin/app/utils/native-cli/nc-impl.d.ts +0 -15
  143. package/bin/app/utils/native-cli/nc-impl.js +0 -154
  144. package/bin/app/utils/native-cli/nc-mod.d.ts +0 -3
  145. package/bin/app/utils/native-cli/nc-mod.js +0 -44
  146. package/bin/app/web/README.md +0 -149
  147. package/bin/app/web/cmd.d.ts +0 -2
  148. package/bin/app/web/cmd.js +0 -11
  149. package/bin/dler-go +0 -4
  150. package/bin/dler-rust +0 -4
  151. /package/bin/app/{config/reltypes-content.d.ts → schema/gen.d.ts} +0 -0
  152. /package/bin/app/{config/reltypes-utils.d.ts → schema/utils.d.ts} +0 -0
  153. /package/bin/app/utils/{hasOnlyRseConfig.d.ts → hasOnlyReliverseConfig.d.ts} +0 -0
  154. /package/bin/app/utils/{hasOnlyRseConfig.js → hasOnlyReliverseConfig.js} +0 -0
@@ -1,25 +1,25 @@
1
1
  import { z } from "zod";
2
2
  export declare const DatabaseSchema: z.ZodEnum<{
3
3
  none: "none";
4
- sqlite: "sqlite";
5
- postgres: "postgres";
6
4
  mysql: "mysql";
5
+ sqlite: "sqlite";
7
6
  mongodb: "mongodb";
7
+ postgres: "postgres";
8
8
  }>;
9
9
  export type Database = z.infer<typeof DatabaseSchema>;
10
10
  export declare const ORMSchema: z.ZodEnum<{
11
11
  none: "none";
12
12
  drizzle: "drizzle";
13
- mongoose: "mongoose";
14
13
  prisma: "prisma";
14
+ mongoose: "mongoose";
15
15
  }>;
16
16
  export type ORM = z.infer<typeof ORMSchema>;
17
17
  export declare const BackendSchema: z.ZodEnum<{
18
18
  none: "none";
19
19
  hono: "hono";
20
+ next: "next";
20
21
  express: "express";
21
22
  fastify: "fastify";
22
- next: "next";
23
23
  elysia: "elysia";
24
24
  convex: "convex";
25
25
  }>;
@@ -37,8 +37,8 @@ export declare const FrontendSchema: z.ZodEnum<{
37
37
  nuxt: "nuxt";
38
38
  solid: "solid";
39
39
  next: "next";
40
- "tanstack-router": "tanstack-router";
41
40
  "react-router": "react-router";
41
+ "tanstack-router": "tanstack-router";
42
42
  "tanstack-start": "tanstack-start";
43
43
  "native-nativewind": "native-nativewind";
44
44
  "native-unistyles": "native-unistyles";
@@ -47,17 +47,17 @@ export type Frontend = z.infer<typeof FrontendSchema>;
47
47
  export declare const AddonsSchema: z.ZodEnum<{
48
48
  none: "none";
49
49
  biome: "biome";
50
- turborepo: "turborepo";
51
50
  tauri: "tauri";
52
- pwa: "pwa";
53
51
  starlight: "starlight";
52
+ turborepo: "turborepo";
53
+ pwa: "pwa";
54
54
  husky: "husky";
55
55
  }>;
56
56
  export type Addons = z.infer<typeof AddonsSchema>;
57
57
  export declare const ExamplesSchema: z.ZodEnum<{
58
58
  none: "none";
59
- ai: "ai";
60
59
  todo: "todo";
60
+ ai: "ai";
61
61
  }>;
62
62
  export type Examples = z.infer<typeof ExamplesSchema>;
63
63
  export declare const PackageManagerSchema: z.ZodEnum<{
@@ -68,8 +68,8 @@ export declare const PackageManagerSchema: z.ZodEnum<{
68
68
  export type PackageManager = z.infer<typeof PackageManagerSchema>;
69
69
  export declare const DatabaseSetupSchema: z.ZodEnum<{
70
70
  none: "none";
71
- neon: "neon";
72
71
  supabase: "supabase";
72
+ neon: "neon";
73
73
  turso: "turso";
74
74
  "prisma-postgres": "prisma-postgres";
75
75
  "mongodb-atlas": "mongodb-atlas";
@@ -0,0 +1,3 @@
1
+ {
2
+ "sync": true
3
+ }
@@ -4,7 +4,7 @@ import fs from "@reliverse/relifso";
4
4
  import { relinka } from "@reliverse/relinka";
5
5
  import { selectPrompt } from "@reliverse/rempts";
6
6
  import { endTitle, UNKNOWN_VALUE } from "../../config/constants.js";
7
- import { detectProjectsWithRseConfig } from "../../config/detect.js";
7
+ import { detectProjectsWithReliverseConfig } from "../../config/detect.js";
8
8
  import { getRandomMessage } from "../../db/messages.js";
9
9
  import { handleOpenProjectMenu } from "../../init/init-utils/mm-deprecated/editor-menu.js";
10
10
  import { createMobileProject } from "../../init/use-template/cp-mod.js";
@@ -140,7 +140,7 @@ export async function showOpenProjectMenu(params) {
140
140
  const { cwd, isDev, memory, config } = params;
141
141
  const searchPath = isDev ? path.join(cwd, "tests-runtime") : cwd;
142
142
  if (await fs.pathExists(searchPath)) {
143
- const detectedProjects = await detectProjectsWithRseConfig(searchPath, isDev);
143
+ const detectedProjects = await detectProjectsWithReliverseConfig(searchPath, isDev);
144
144
  await handleOpenProjectMenu(detectedProjects, isDev, memory, cwd, true, config);
145
145
  }
146
146
  }
@@ -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
  * Possible template options for VS Code extensions
@@ -28,10 +28,10 @@ export declare function configureVSCodeExtension(): Promise<{
28
28
  activation: "onCommand" | "onLanguage" | "startup";
29
29
  publisher: string;
30
30
  }>;
31
- export declare function optionCreateVSCodeExtension(projectName: string, cwd: string, isDev: boolean, memory: ReliverseMemory, config: RseConfig, skipPrompts: boolean): Promise<void>;
32
- export declare function optionCreateBrowserExtension(projectName: string, cwd: string, isDev: boolean, memory: ReliverseMemory, config: RseConfig, skipPrompts: boolean): Promise<void>;
31
+ export declare function optionCreateVSCodeExtension(projectName: string, cwd: string, isDev: boolean, memory: ReliverseMemory, config: ReliverseConfig, skipPrompts: boolean): Promise<void>;
32
+ export declare function optionCreateBrowserExtension(projectName: string, cwd: string, isDev: boolean, memory: ReliverseMemory, config: ReliverseConfig, skipPrompts: boolean): Promise<void>;
33
33
  /**
34
34
  * Orchestrates the creation of a Web project.
35
35
  * If `isMultiConfig` is true, we loop through `mrse` array.
36
36
  */
37
- export declare function optionCreateWebProject(projectName: string, cwd: string, isDev: boolean, memory: ReliverseMemory, config: RseConfig, isMultiConfig: boolean, mrse: RseConfig[], skipPrompts: boolean): Promise<void>;
37
+ export declare function optionCreateWebProject(projectName: string, cwd: string, isDev: boolean, memory: ReliverseMemory, config: ReliverseConfig, isMultiConfig: boolean, mrse: ReliverseConfig[], skipPrompts: boolean): Promise<void>;
@@ -1,4 +1,14 @@
1
1
  declare const _default: import("@reliverse/rempts").Command<{
2
+ ci: {
3
+ type: "boolean";
4
+ description: string;
5
+ default: boolean;
6
+ };
7
+ cwd: {
8
+ type: "string";
9
+ description: string;
10
+ default: string;
11
+ };
2
12
  dev: {
3
13
  type: "boolean";
4
14
  description: string;
@@ -1,27 +1,42 @@
1
- import { relinka } from "@reliverse/relinka";
2
1
  import { defineArgs, defineCommand } from "@reliverse/rempts";
3
2
  import { getConfigDler } from "../config/load.js";
4
- import { ensureReliverseConfig, prepareReliverseEnvironment } from "../config/prepare.js";
5
- import { dlerPub } from "./impl.js";
3
+ import { commonEndActions, commonStartActions } from "../utils/common.js";
4
+ import { getCurrentWorkingDirectory } from "../utils/terminalHelpers.js";
6
5
  import { createPerfTimer } from "../utils/utils-perf.js";
6
+ import { dlerPub } from "./impl.js";
7
7
  export default defineCommand({
8
8
  meta: {
9
- name: "pub",
10
- description: "Build and publish the project"
9
+ name: "publish",
10
+ description: ""
11
11
  },
12
12
  args: defineArgs({
13
+ // Common args
14
+ ci: {
15
+ type: "boolean",
16
+ description: "ci",
17
+ default: !process.stdout.isTTY || !!process.env["CI"]
18
+ },
19
+ cwd: {
20
+ type: "string",
21
+ description: "cwd",
22
+ default: getCurrentWorkingDirectory()
23
+ },
13
24
  dev: {
14
25
  type: "boolean",
15
- description: "Runs the CLI in dev mode"
26
+ description: "dev"
16
27
  }
28
+ // Command specific args
29
+ // ...
17
30
  }),
18
- async run({ args }) {
19
- const isDev = args.dev;
20
- await prepareReliverseEnvironment(isDev, "ts");
21
- relinka("verbose", `Running in ${isDev ? "dev" : "prod"} mode`);
22
- await ensureReliverseConfig(isDev, "ts");
23
- const config = await getConfigDler();
31
+ run: async ({ args }) => {
32
+ const { ci, cwd, dev } = args;
33
+ const isCI = Boolean(ci);
34
+ const isDev = Boolean(dev);
35
+ const strCwd = String(cwd);
36
+ await commonStartActions({ isCI, isDev, strCwd });
24
37
  const timer = createPerfTimer();
38
+ const config = await getConfigDler();
25
39
  await dlerPub(timer, isDev, config);
40
+ await commonEndActions();
26
41
  }
27
42
  });
@@ -1,7 +1,8 @@
1
- import type { DlerConfig, PerfTimer } from "../types/mod.js";
1
+ import type { ReliverseConfig } from "../schema/mod.js";
2
+ import type { PerfTimer } from "../types/mod.js";
2
3
  /**
3
4
  * Main entry point for the dler build and publish process.
4
5
  * Handles building and publishing for both main project and libraries.
5
6
  * @see `src-ts/app/build/impl.ts` for build main function implementation.
6
7
  */
7
- export declare function dlerPub(timer: PerfTimer, isDev: boolean, config?: DlerConfig): Promise<void>;
8
+ export declare function dlerPub(timer: PerfTimer, isDev: boolean, config?: ReliverseConfig): Promise<void>;
@@ -72,7 +72,7 @@ export default defineCommand({
72
72
  if (await fs.pathExists(defaultCmdsRoot)) {
73
73
  cmdsRoot = defaultCmdsRoot;
74
74
  } else {
75
- const { cmdsRoot: configCmdsRoot, cliFile } = await handleDlerConfig();
75
+ const { cmdsRoot: configCmdsRoot, cliFile } = await handleReliverseConfig();
76
76
  cmdsRoot = configCmdsRoot;
77
77
  cliFilePath = cliFile;
78
78
  }
@@ -162,7 +162,7 @@ await callCmd(cmd, [
162
162
  }
163
163
  }
164
164
  });
165
- async function handleDlerConfig() {
165
+ async function handleReliverseConfig() {
166
166
  const dlerConfigPath = path.resolve("reliverse.ts");
167
167
  let cmdsRoot = "src-ts/app";
168
168
  let cliFilePath = "";
@@ -1,2 +1,2 @@
1
1
  import type { CheckResult } from "../../../types/mod.js";
2
- export declare function checkDlerConfigHealth(): Promise<CheckResult>;
2
+ export declare function checkReliverseConfigHealth(): Promise<CheckResult>;
@@ -1,5 +1,5 @@
1
1
  import { getConfigDler } from "../../../config/load.js";
2
- export async function checkDlerConfigHealth() {
2
+ export async function checkReliverseConfigHealth() {
3
3
  const startTime = Date.now();
4
4
  const issues = [];
5
5
  try {
@@ -1,16 +1,16 @@
1
1
  import { relinka } from "@reliverse/relinka";
2
2
  import { defineCommand } from "@reliverse/rempts";
3
3
  import { cliConfigJsonc } from "../config/constants.js";
4
- import { generateSchemaFile } from "../config/schema.js";
4
+ import { generateSchemaFile } from "../config/impl/typebox.js";
5
5
  export default defineCommand({
6
6
  meta: {
7
7
  name: "schema",
8
- description: `Generate JSON schema for ${cliConfigJsonc} configuration`,
8
+ description: `Generate schema.json for ${cliConfigJsonc} configuration`,
9
9
  hidden: true
10
10
  },
11
11
  run: async () => {
12
12
  try {
13
- await generateSchemaFile();
13
+ await generateSchemaFile({});
14
14
  relinka("success", `Generated schema.json for ${cliConfigJsonc} successfully!`);
15
15
  } catch (error) {
16
16
  relinka(