@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,8 +1,8 @@
1
1
  import { z } from "zod";
2
2
  export declare const DatabaseSchema: z.ZodEnum<{
3
3
  none: "none";
4
- sqlite: "sqlite";
5
4
  mysql: "mysql";
5
+ sqlite: "sqlite";
6
6
  mongodb: "mongodb";
7
7
  postgres: "postgres";
8
8
  }>;
@@ -10,8 +10,8 @@ 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<{
@@ -46,18 +46,18 @@ export declare const FrontendSchema: z.ZodEnum<{
46
46
  export type Frontend = z.infer<typeof FrontendSchema>;
47
47
  export declare const AddonsSchema: z.ZodEnum<{
48
48
  none: "none";
49
- tauri: "tauri";
50
49
  biome: "biome";
51
- turborepo: "turborepo";
50
+ tauri: "tauri";
52
51
  starlight: "starlight";
52
+ turborepo: "turborepo";
53
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<{
@@ -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(