@reliverse/dler 1.7.63 → 1.7.65

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 (93) hide show
  1. package/README.md +43 -3
  2. package/bin/app/agg/cmd.d.ts +0 -4
  3. package/bin/app/agg/cmd.js +0 -4
  4. package/bin/app/build/binary/cmd.d.ts +106 -0
  5. package/bin/app/build/binary/cmd.js +201 -0
  6. package/bin/app/build/cmd.js +3 -2
  7. package/bin/app/check/cmd.d.ts +4 -4
  8. package/bin/app/check/cmd.js +9 -6
  9. package/bin/app/cmds.d.ts +1 -0
  10. package/bin/app/cmds.js +1 -0
  11. package/bin/app/mkdist/cmd.js +4 -3
  12. package/bin/app/pub/cmd.js +3 -2
  13. package/bin/app/update/cmd.d.ts +31 -0
  14. package/bin/app/update/cmd.js +240 -0
  15. package/bin/app/x/cmd.d.ts +0 -5
  16. package/bin/app/x/cmd.js +5 -7
  17. package/bin/cli.js +33 -50
  18. package/bin/libs/cfg/cfg-impl/rse-config/rse-impl/rse-define.d.ts +13 -13
  19. package/bin/libs/sdk/sdk-impl/build/build-library.js +1 -1
  20. package/bin/libs/sdk/sdk-impl/build/build-regular.js +1 -1
  21. package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/auto.d.ts +1 -1
  22. package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/build.d.ts +1 -1
  23. package/bin/libs/sdk/sdk-impl/build/providers/build.js +351 -0
  24. package/bin/libs/sdk/sdk-impl/build/providers/bun/bun-build.d.ts +0 -0
  25. package/bin/libs/sdk/sdk-impl/build/providers/bun/bun-build.js +0 -0
  26. package/bin/libs/sdk/sdk-impl/build/providers/bun/single-file.d.ts +25 -0
  27. package/bin/libs/sdk/sdk-impl/build/providers/bun/single-file.js +133 -0
  28. package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/copy/copy-mod.d.ts +1 -1
  29. package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/mkdist/mkdist-impl/loader.d.ts +1 -1
  30. package/bin/libs/sdk/sdk-impl/build/providers/mkdist/mkdist-impl/loaders/js.d.ts +2 -0
  31. package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/mkdist/mkdist-impl/loaders/loaders-mod.d.ts +1 -1
  32. package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/mkdist/mkdist-impl/loaders/postcss.d.ts +1 -1
  33. package/bin/libs/sdk/sdk-impl/build/providers/mkdist/mkdist-impl/loaders/sass.d.ts +2 -0
  34. package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/mkdist/mkdist-impl/loaders/vue.d.ts +1 -1
  35. package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/mkdist/mkdist-impl/make.d.ts +1 -1
  36. package/bin/libs/sdk/sdk-impl/build/providers/mkdist/mkdist-impl/make.js +203 -0
  37. package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/mkdist/mkdist-impl/utils/dts.d.ts +1 -1
  38. package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/mkdist/mkdist-impl/utils/vue-dts.d.ts +1 -1
  39. package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/mkdist/mkdist-impl/utils/vue-dts.js +1 -2
  40. package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/mkdist/mkdist-mod.d.ts +1 -1
  41. package/bin/libs/sdk/sdk-impl/build/providers/mkdist/mkdist-mod.js +92 -0
  42. package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/build.d.ts +1 -1
  43. package/bin/libs/sdk/sdk-impl/build/providers/rollup/config.d.ts +2 -0
  44. package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/plugins/cjs.d.ts +1 -1
  45. package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/plugins/esbuild.d.ts +1 -1
  46. package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/stub.d.ts +1 -1
  47. package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/utils.d.ts +1 -1
  48. package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/watch.d.ts +1 -1
  49. package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/untyped/untyped-mod.d.ts +1 -1
  50. package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/utils.d.ts +1 -1
  51. package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/validate.d.ts +1 -1
  52. package/bin/libs/sdk/sdk-impl/config/info.js +1 -1
  53. package/bin/libs/sdk/sdk-impl/utils/exec/exec-mod.js +9 -7
  54. package/bin/libs/sdk/sdk-impl/utils/exec/exec-parse.js +15 -0
  55. package/bin/libs/sdk/sdk-impl/utils/pm/pm-meta.d.ts +27 -0
  56. package/bin/libs/sdk/sdk-impl/utils/pm/pm-meta.js +86 -0
  57. package/bin/libs/sdk/sdk-impl/utils/pm/pm-utils.js +19 -0
  58. package/bin/libs/sdk/sdk-mod.d.ts +30 -30
  59. package/bin/libs/sdk/sdk-mod.js +27 -27
  60. package/package.json +4 -1
  61. package/bin/libs/sdk/sdk-impl/build/bundlers/unified/build.js +0 -377
  62. package/bin/libs/sdk/sdk-impl/build/bundlers/unified/mkdist/mkdist-impl/loaders/js.d.ts +0 -2
  63. package/bin/libs/sdk/sdk-impl/build/bundlers/unified/mkdist/mkdist-impl/loaders/sass.d.ts +0 -2
  64. package/bin/libs/sdk/sdk-impl/build/bundlers/unified/mkdist/mkdist-impl/make.js +0 -213
  65. package/bin/libs/sdk/sdk-impl/build/bundlers/unified/mkdist/mkdist-mod.js +0 -107
  66. package/bin/libs/sdk/sdk-impl/build/bundlers/unified/rollup/config.d.ts +0 -2
  67. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/auto.js +0 -0
  68. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/copy/copy-mod.js +0 -0
  69. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/mkdist/mkdist-impl/loader.js +0 -0
  70. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/mkdist/mkdist-impl/loaders/js.js +0 -0
  71. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/mkdist/mkdist-impl/loaders/loaders-mod.js +0 -0
  72. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/mkdist/mkdist-impl/loaders/postcss.js +0 -0
  73. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/mkdist/mkdist-impl/loaders/sass.js +0 -0
  74. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/mkdist/mkdist-impl/loaders/vue.js +0 -0
  75. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/mkdist/mkdist-impl/utils/dts.js +0 -0
  76. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/mkdist/mkdist-impl/utils/fs.d.ts +0 -0
  77. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/mkdist/mkdist-impl/utils/fs.js +0 -0
  78. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/build.js +0 -0
  79. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/config.js +0 -0
  80. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/plugins/cjs.js +0 -0
  81. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/plugins/esbuild.js +0 -0
  82. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/plugins/json.d.ts +0 -0
  83. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/plugins/json.js +0 -0
  84. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/plugins/raw.d.ts +0 -0
  85. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/plugins/raw.js +0 -0
  86. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/plugins/shebang.d.ts +0 -0
  87. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/plugins/shebang.js +0 -0
  88. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/stub.js +0 -0
  89. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/utils.js +0 -0
  90. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/watch.js +0 -0
  91. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/untyped/untyped-mod.js +0 -0
  92. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/utils.js +0 -0
  93. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/validate.js +0 -0
@@ -0,0 +1,240 @@
1
+ import path from "@reliverse/pathkit";
2
+ import fs from "@reliverse/relifso";
3
+ import { relinka } from "@reliverse/relinka";
4
+ import { defineArgs, defineCommand } from "@reliverse/rempts";
5
+ import { $ } from "bun";
6
+ import pMap from "p-map";
7
+ import { readPackageJSON } from "pkg-types";
8
+ import semver from "semver";
9
+ import { latestVersion } from "../../libs/sdk/sdk-impl/utils/pm/pm-meta.js";
10
+ function isNpmAlias(versionSpec) {
11
+ return versionSpec.startsWith("npm:");
12
+ }
13
+ function isWorkspaceDependency(versionSpec) {
14
+ return versionSpec.startsWith("workspace:");
15
+ }
16
+ function isCatalogDependency(versionSpec) {
17
+ return versionSpec.startsWith("catalog:");
18
+ }
19
+ function isSemverCompatible(currentVersionRange, latestVersion2) {
20
+ try {
21
+ if (isNpmAlias(currentVersionRange)) {
22
+ return false;
23
+ }
24
+ if (isWorkspaceDependency(currentVersionRange)) {
25
+ return false;
26
+ }
27
+ if (isCatalogDependency(currentVersionRange)) {
28
+ return false;
29
+ }
30
+ if (!currentVersionRange.startsWith("^") && !currentVersionRange.startsWith("~")) {
31
+ return false;
32
+ }
33
+ return semver.satisfies(latestVersion2, currentVersionRange);
34
+ } catch {
35
+ return false;
36
+ }
37
+ }
38
+ async function fetchVersionFromRegistry(packageName) {
39
+ const response = await fetch(`https://registry.npmjs.org/${packageName}/latest`);
40
+ if (!response.ok) {
41
+ throw new Error(`HTTP ${response.status}: ${response.statusText}`);
42
+ }
43
+ const data = await response.json();
44
+ return data.version;
45
+ }
46
+ async function getLatestVersion(packageName) {
47
+ try {
48
+ return await latestVersion(packageName);
49
+ } catch (error) {
50
+ const errorMessage = error instanceof Error ? error.message : String(error);
51
+ try {
52
+ return await fetchVersionFromRegistry(packageName);
53
+ } catch (fallbackError) {
54
+ throw new Error(
55
+ `Latest version main check and npm registry fallback failed. Main check error: ${errorMessage}. Registry error: ${fallbackError instanceof Error ? fallbackError.message : String(fallbackError)}`
56
+ );
57
+ }
58
+ }
59
+ }
60
+ export default defineCommand({
61
+ meta: {
62
+ name: "update",
63
+ description: "Update dependencies to the latest version"
64
+ },
65
+ args: defineArgs({
66
+ name: {
67
+ type: "array",
68
+ description: "The names of the dependencies to update (leave empty to update all)"
69
+ },
70
+ ignore: {
71
+ type: "array",
72
+ description: "The names of the dependencies to ignore when --name is not provided"
73
+ },
74
+ "dev-only": {
75
+ type: "boolean",
76
+ description: "Update only devDependencies",
77
+ default: false
78
+ },
79
+ "prod-only": {
80
+ type: "boolean",
81
+ description: "Update only dependencies (production)",
82
+ default: false
83
+ },
84
+ "dry-run": {
85
+ type: "boolean",
86
+ description: "Show what would be updated without making changes",
87
+ default: false
88
+ },
89
+ concurrency: {
90
+ type: "number",
91
+ description: "Number of concurrent version checks",
92
+ default: 5
93
+ }
94
+ }),
95
+ async run({ args }) {
96
+ try {
97
+ const packageJsonPath = path.resolve(process.cwd(), "package.json");
98
+ if (!await fs.pathExists(packageJsonPath)) {
99
+ relinka("error", "No package.json found in current directory");
100
+ return process.exit(1);
101
+ }
102
+ relinka("info", "Reading package.json...");
103
+ const packageJson = await readPackageJSON();
104
+ const dependencies = packageJson.dependencies || {};
105
+ const devDependencies = packageJson.devDependencies || {};
106
+ let targetDeps = {};
107
+ if (args["dev-only"] && args["prod-only"]) {
108
+ relinka("error", "Cannot specify both --dev and --prod flags");
109
+ return process.exit(1);
110
+ }
111
+ if (args["dev-only"]) {
112
+ targetDeps = { ...devDependencies };
113
+ } else if (args["prod-only"]) {
114
+ targetDeps = { ...dependencies };
115
+ } else {
116
+ targetDeps = { ...dependencies, ...devDependencies };
117
+ }
118
+ const depsToUpdate = Object.keys(targetDeps);
119
+ let filteredDeps = [];
120
+ if (args.name && args.name.length > 0) {
121
+ filteredDeps = args.name.filter((dep) => dep in targetDeps);
122
+ const notFound = args.name.filter((dep) => !(dep in targetDeps));
123
+ if (notFound.length > 0) {
124
+ relinka("warn", `Dependencies not found: ${notFound.join(", ")}`);
125
+ }
126
+ } else {
127
+ const ignoreList = args.ignore || [];
128
+ filteredDeps = depsToUpdate.filter((dep) => !ignoreList.includes(dep));
129
+ }
130
+ const semverDeps = filteredDeps.filter((dep) => {
131
+ const versionSpec = targetDeps[dep];
132
+ return versionSpec && (versionSpec.startsWith("^") || versionSpec.startsWith("~"));
133
+ });
134
+ if (semverDeps.length === 0) {
135
+ relinka(
136
+ "warn",
137
+ "No dependencies to update (only semver-compatible dependencies with ^ or ~ prefixes are supported)"
138
+ );
139
+ return;
140
+ }
141
+ relinka("info", `Checking ${semverDeps.length} dependencies for updates...`);
142
+ const results = await pMap(
143
+ semverDeps,
144
+ async (dep) => {
145
+ const currentVersion = targetDeps[dep];
146
+ if (!currentVersion) {
147
+ return {
148
+ package: dep,
149
+ currentVersion: "unknown",
150
+ latestVersion: "unknown",
151
+ updated: false,
152
+ error: "Current version not found",
153
+ semverCompatible: false
154
+ };
155
+ }
156
+ try {
157
+ const latest = await getLatestVersion(dep);
158
+ const cleanCurrent = currentVersion.replace(/^[\^~]/, "");
159
+ const isCompatible = isSemverCompatible(currentVersion, latest);
160
+ return {
161
+ package: dep,
162
+ currentVersion: cleanCurrent,
163
+ latestVersion: latest,
164
+ updated: latest !== cleanCurrent && isCompatible,
165
+ semverCompatible: isCompatible
166
+ };
167
+ } catch (error) {
168
+ return {
169
+ package: dep,
170
+ currentVersion,
171
+ latestVersion: currentVersion,
172
+ updated: false,
173
+ error: error instanceof Error ? error.message : String(error),
174
+ semverCompatible: false
175
+ };
176
+ }
177
+ },
178
+ { concurrency: args.concurrency }
179
+ );
180
+ const toUpdate = results.filter((r) => r.updated && !r.error);
181
+ const errors = results.filter((r) => r.error);
182
+ const upToDate = results.filter((r) => !r.updated && !r.error && r.semverCompatible);
183
+ if (errors.length > 0) {
184
+ relinka("warn", `Failed to check ${errors.length} dependencies:`);
185
+ for (const error of errors) {
186
+ relinka("warn", ` ${error.package}: ${error.error}`);
187
+ }
188
+ }
189
+ if (upToDate.length > 0) {
190
+ relinka("success", `${upToDate.length} dependencies are up to date`);
191
+ }
192
+ if (toUpdate.length === 0) {
193
+ relinka("info", "All dependencies are up to date");
194
+ return;
195
+ }
196
+ relinka("info", `${toUpdate.length} dependencies can be updated:`);
197
+ for (const update of toUpdate) {
198
+ relinka("log", ` ${update.package}: ${update.currentVersion} \u2192 ${update.latestVersion}`);
199
+ }
200
+ if (args["dry-run"]) {
201
+ relinka("info", "Dry run mode - no changes were made");
202
+ return;
203
+ }
204
+ relinka("info", "Updating package.json...");
205
+ const updatedPackageJson = { ...packageJson };
206
+ for (const update of toUpdate) {
207
+ const dep = update.package;
208
+ const newVersion = `^${update.latestVersion}`;
209
+ if (dependencies[dep]) {
210
+ if (!updatedPackageJson.dependencies) updatedPackageJson.dependencies = {};
211
+ updatedPackageJson.dependencies[dep] = newVersion;
212
+ }
213
+ if (devDependencies[dep]) {
214
+ if (!updatedPackageJson.devDependencies) updatedPackageJson.devDependencies = {};
215
+ updatedPackageJson.devDependencies[dep] = newVersion;
216
+ }
217
+ }
218
+ await fs.writeFile(
219
+ packageJsonPath,
220
+ JSON.stringify(updatedPackageJson, null, 2) + "\n",
221
+ "utf8"
222
+ );
223
+ relinka("success", `Updated ${toUpdate.length} dependencies in package.json`);
224
+ if (typeof Bun !== "undefined") {
225
+ await $`bun install`;
226
+ if (packageJson.scripts?.check) {
227
+ await $`bun check`;
228
+ }
229
+ } else {
230
+ relinka("info", "Run your package manager's install command to apply the changes");
231
+ }
232
+ } catch (error) {
233
+ relinka(
234
+ "error",
235
+ `Failed to update dependencies: ${error instanceof Error ? error.message : String(error)}`
236
+ );
237
+ process.exit(1);
238
+ }
239
+ }
240
+ });
@@ -18,11 +18,6 @@ declare const _default: import("@reliverse/rempts").Command<{
18
18
  description: string;
19
19
  required: false;
20
20
  };
21
- dev: {
22
- type: "boolean";
23
- alias: string;
24
- description: string;
25
- };
26
21
  global: {
27
22
  type: "boolean";
28
23
  alias: string;
package/bin/app/x/cmd.js CHANGED
@@ -37,11 +37,6 @@ export default defineCommand({
37
37
  description: "Package name or script name",
38
38
  required: false
39
39
  },
40
- dev: {
41
- type: "boolean",
42
- alias: "D",
43
- description: "Add as dev dependency"
44
- },
45
40
  global: {
46
41
  type: "boolean",
47
42
  alias: "g",
@@ -104,11 +99,12 @@ export default defineCommand({
104
99
  },
105
100
  linter: {
106
101
  type: "boolean",
107
- description: "Run latest checks after updating dependencies",
102
+ description: "Run linter checks after updating dependencies",
108
103
  default: false
109
104
  }
110
105
  }),
111
106
  async run({ args }) {
107
+ console.log("DEBUG: x command starting with args:", args);
112
108
  const {
113
109
  action,
114
110
  name,
@@ -127,6 +123,7 @@ export default defineCommand({
127
123
  case "install":
128
124
  case "i":
129
125
  case "add":
126
+ console.log("DEBUG: install case, name:", name, "options:", options);
130
127
  await (name ? addDependency(name, options) : installDependencies(options));
131
128
  break;
132
129
  case "remove":
@@ -256,7 +253,8 @@ export default defineCommand({
256
253
  case "latest": {
257
254
  await updateDependencies(true, options);
258
255
  if (linter) {
259
- await runCmd(await getCheckCmd(), ["--no-exit", "--no-progress"]);
256
+ const checkCmd = await getCheckCmd();
257
+ await runCmd(checkCmd, ["--no-exit", "--no-progress"]);
260
258
  }
261
259
  break;
262
260
  }
package/bin/cli.js CHANGED
@@ -1,4 +1,3 @@
1
- import { re } from "@reliverse/relico";
2
1
  import { relinka } from "@reliverse/relinka";
3
2
  import {
4
3
  runMain,
@@ -9,17 +8,16 @@ import {
9
8
  runCmd
10
9
  } from "@reliverse/rempts";
11
10
  import { promptAggCommand } from "./app/agg/run.js";
12
- import { getBuildCmd, getPubCmd, getInitCmd, getRenameCmd } from "./app/cmds.js";
11
+ import { getBuildCmd, getPubCmd, getUpdateCmd } from "./app/cmds.js";
13
12
  import { showEndPrompt, showStartPrompt } from "./libs/sdk/sdk-impl/config/info.js";
14
13
  import { ensureDlerConfig } from "./libs/sdk/sdk-impl/config/init.js";
15
- import { getConfigDler } from "./libs/sdk/sdk-impl/config/load.js";
16
- const INTERACTIVE_CMDS = ["agg", "build", "pub"];
14
+ const MENU_CMDS = ["agg", "build", "pub", "update"];
17
15
  const main = defineCommand({
18
16
  meta: {
19
17
  name: "dler",
20
- description: `Interactively runs selected dler's command.
21
- However, NI (non-interactive) mode is more powerful, to see NI mode available commands and arguments: 'dler --help' (or 'dler <command> --help')
22
- Available interactive commands: ${INTERACTIVE_CMDS.join(", ")}`
18
+ description: `Displays dler's command menu.
19
+ To see ALL available commands and arguments, run: 'dler --help' (or 'dler <command> --help')
20
+ Available menu commands: ${MENU_CMDS.join(", ")}`
23
21
  },
24
22
  onLauncherInit() {
25
23
  const isBun = process.versions.bun;
@@ -42,9 +40,9 @@ Available interactive commands: ${INTERACTIVE_CMDS.join(", ")}`
42
40
  }
43
41
  }),
44
42
  async run({ args }) {
45
- const isDev = args.dev;
43
+ const isDev = args.dev || process.env.DLER_DEV_MODE === "true";
46
44
  relinka("verbose", `Running in ${isDev ? "dev" : "prod"} mode`);
47
- await ensureDlerConfig(args.dev);
45
+ await ensureDlerConfig(isDev);
48
46
  const isCI = process.env.CI === "true";
49
47
  const isNonInteractive = !process.stdout.isTTY;
50
48
  if (isCI || isNonInteractive) {
@@ -55,50 +53,35 @@ Available interactive commands: ${INTERACTIVE_CMDS.join(", ")}`
55
53
  showUsage(main);
56
54
  process.exit(0);
57
55
  }
58
- await showStartPrompt(args.dev);
59
- const config = await getConfigDler();
60
- const hasValidCLIConfig = config.coreIsCLI?.enabled && config.coreIsCLI?.scripts && Object.keys(config.coreIsCLI.scripts).length > 0;
61
- const options = [
62
- { value: "build", label: "build project" },
63
- { value: "pub", label: "publish project" },
64
- { value: "agg", label: "aggregate libs" },
65
- { separator: true },
66
- { value: "utils", label: re.bold("UTILS"), disabled: true },
67
- { separator: true },
68
- { value: "copy", label: "copy files" },
69
- { value: "init", label: "init files" },
70
- { value: "remdn", label: "run remdn", hint: "undocs alternative" }
71
- ];
72
- if (hasValidCLIConfig) {
73
- options.push(
74
- {
75
- value: "rename-prepare",
76
- label: "[experimental] my project is a bootstrapper cli (apply rename optimizations)"
77
- },
78
- {
79
- value: "rename-prepare-revert",
80
- label: "[experimental] revert rename cli files optimizations"
81
- }
82
- );
83
- }
56
+ await showStartPrompt(isDev);
84
57
  const cmdToRun = await selectPrompt({
85
- title: "Select a command to run",
86
- options
58
+ title: "Select a command to run (run 'dler --help' to see all available commands)",
59
+ options: [
60
+ { value: "build", label: "build project" },
61
+ { value: "pub", label: "publish project" },
62
+ { value: "update", label: "update deps" },
63
+ { value: "agg", label: "aggregate" },
64
+ { value: "exit", label: "exit" }
65
+ ]
87
66
  });
88
- if (cmdToRun === "agg") {
89
- await promptAggCommand();
90
- } else if (cmdToRun === "build") {
91
- await runCmd(await getBuildCmd(), [`--dev=${args.dev} --no-pub`]);
92
- } else if (cmdToRun === "pub") {
93
- await runCmd(await getPubCmd(), [`--dev=${args.dev}`]);
94
- } else if (cmdToRun === "init") {
95
- await runCmd(await getInitCmd(), []);
96
- } else if (cmdToRun === "rename-prepare") {
97
- await runCmd(await getRenameCmd(), ["--prepareMyCLI"]);
98
- } else if (cmdToRun === "rename-prepare-revert") {
99
- await runCmd(await getRenameCmd(), ["--prepareMyCLI", "--revert"]);
67
+ switch (cmdToRun) {
68
+ case "build": {
69
+ await runCmd(await getBuildCmd(), [`--dev=${isDev} --no-pub`]);
70
+ break;
71
+ }
72
+ case "pub": {
73
+ await runCmd(await getPubCmd(), [`--dev=${isDev}`]);
74
+ break;
75
+ }
76
+ case "agg": {
77
+ await promptAggCommand();
78
+ break;
79
+ }
80
+ case "update": {
81
+ await runCmd(await getUpdateCmd(), []);
82
+ break;
83
+ }
100
84
  }
101
- relinka("log", " ");
102
85
  await showEndPrompt();
103
86
  }
104
87
  });
@@ -1,24 +1,23 @@
1
1
  import type { RseConfig } from "./rse-types";
2
2
  export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
3
- version?: string | undefined;
4
3
  $schema?: "./schema.json" | "https://reliverse.org/schema.json" | undefined;
5
4
  projectName?: string | undefined;
6
5
  projectAuthor?: string | undefined;
7
6
  projectDescription?: string | undefined;
7
+ version?: string | undefined;
8
8
  projectLicense?: string | undefined;
9
9
  projectRepository?: string | undefined;
10
10
  projectDomain?: string | undefined;
11
11
  projectGitService?: "none" | "github" | "gitlab" | "bitbucket" | undefined;
12
12
  projectDeployService?: "none" | "vercel" | "netlify" | "railway" | "deno" | undefined;
13
- projectPackageManager?: "bun" | "pnpm" | "npm" | "yarn" | undefined;
13
+ projectPackageManager?: "pnpm" | "bun" | "npm" | "yarn" | undefined;
14
14
  projectState?: "creating" | "created" | undefined;
15
- projectCategory?: "browser" | "cli" | "unknown" | "website" | "vscode" | "library" | "mobile" | undefined;
15
+ projectCategory?: "cli" | "unknown" | "website" | "vscode" | "browser" | "library" | "mobile" | undefined;
16
16
  projectSubcategory?: "unknown" | "e-commerce" | "tool" | undefined;
17
- projectFramework?: "rempts" | "npm-jsr" | "vue" | "svelte" | "unknown" | "vscode" | "nextjs" | "vite" | "remix" | "astro" | "nuxt" | "solid" | "qwik" | "wxt" | "lynx" | "react-native" | "expo" | "capacitor" | "ionic" | "electron" | "tauri" | "neutralino" | "citty" | "commander" | "cac" | "meow" | "yargs" | "webextension" | "browser-extension" | undefined;
17
+ projectFramework?: "unknown" | "vscode" | "nextjs" | "vite" | "svelte" | "remix" | "astro" | "nuxt" | "solid" | "qwik" | "vue" | "wxt" | "lynx" | "react-native" | "expo" | "capacitor" | "ionic" | "electron" | "tauri" | "neutralino" | "rempts" | "citty" | "commander" | "cac" | "meow" | "yargs" | "webextension" | "browser-extension" | "npm-jsr" | undefined;
18
18
  projectTemplate?: "unknown" | "blefnk/relivator-nextjs-template" | "blefnk/relivator-docker-template" | "blefnk/next-react-ts-src-minimal" | "blefnk/all-in-one-nextjs-template" | "blefnk/create-t3-app" | "blefnk/create-next-app" | "blefnk/astro-starlight-template" | "blefnk/versator-nextjs-template" | "blefnk/relivator-lynxjs-template" | "blefnk/relivator-react-native-template" | "reliverse/template-browser-extension" | "microsoft/vscode-extension-samples" | "microsoft/vscode-extension-template" | "rsetarter-template" | "blefnk/deno-cli-tutorial" | undefined;
19
19
  projectTemplateDate?: string | undefined;
20
20
  features?: {
21
- commands?: string[] | undefined;
22
21
  i18n?: boolean | undefined;
23
22
  analytics?: boolean | undefined;
24
23
  themeMode?: "light" | "dark" | "dark-light" | undefined;
@@ -28,23 +27,23 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
28
27
  testing?: boolean | undefined;
29
28
  docker?: boolean | undefined;
30
29
  ci?: boolean | undefined;
30
+ commands?: string[] | undefined;
31
31
  webview?: string[] | undefined;
32
32
  language?: string[] | undefined;
33
33
  themes?: string[] | undefined;
34
34
  } | undefined;
35
35
  preferredLibraries?: {
36
- search?: "unknown" | "algolia" | undefined;
37
36
  i18n?: "unknown" | "next-intl" | undefined;
38
37
  analytics?: "unknown" | "vercel" | undefined;
39
38
  authentication?: "unknown" | "better-auth" | "clerk" | "next-auth" | "supabase-auth" | "auth0" | undefined;
40
39
  api?: "unknown" | "hono" | "trpc" | "graphql" | "rest" | undefined;
41
- testing?: "bun" | "jest" | "vitest" | "unknown" | "playwright" | "cypress" | undefined;
40
+ testing?: "unknown" | "bun" | "vitest" | "jest" | "playwright" | "cypress" | undefined;
42
41
  stateManagement?: "unknown" | "zustand" | "jotai" | "redux-toolkit" | undefined;
43
42
  formManagement?: "unknown" | "react-hook-form" | "formik" | undefined;
44
43
  styling?: "unknown" | "tailwind" | "styled-components" | "css-modules" | "sass" | undefined;
45
44
  uiComponents?: "unknown" | "shadcn-ui" | "chakra-ui" | "material-ui" | undefined;
46
45
  databaseLibrary?: "unknown" | "drizzle" | "prisma" | "supabase" | undefined;
47
- databaseProvider?: "pg" | "unknown" | "mysql" | "sqlite" | "mongodb" | undefined;
46
+ databaseProvider?: "unknown" | "pg" | "mysql" | "sqlite" | "mongodb" | undefined;
48
47
  linting?: "unknown" | "eslint" | undefined;
49
48
  formatting?: "unknown" | "biome" | undefined;
50
49
  payment?: "unknown" | "stripe" | undefined;
@@ -52,12 +51,13 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
52
51
  logging?: "unknown" | "axiom" | undefined;
53
52
  forms?: "unknown" | "react-hook-form" | undefined;
54
53
  notifications?: "unknown" | "sonner" | undefined;
54
+ search?: "unknown" | "algolia" | undefined;
55
55
  uploads?: "unknown" | "uploadthing" | undefined;
56
56
  validation?: "unknown" | "zod" | "typebox" | "valibot" | undefined;
57
57
  documentation?: "unknown" | "starlight" | "nextra" | undefined;
58
58
  icons?: "unknown" | "lucide" | undefined;
59
59
  mail?: "unknown" | "resend" | undefined;
60
- cache?: "redis" | "unknown" | undefined;
60
+ cache?: "unknown" | "redis" | undefined;
61
61
  storage?: "unknown" | "cloudflare" | undefined;
62
62
  cdn?: "unknown" | "cloudflare" | undefined;
63
63
  cms?: "unknown" | "contentlayer" | undefined;
@@ -67,7 +67,7 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
67
67
  dates?: "unknown" | "dayjs" | undefined;
68
68
  markdown?: "unknown" | "mdx" | undefined;
69
69
  security?: "unknown" | "auth" | undefined;
70
- routing?: "next" | "unknown" | "react-router" | "tanstack-router" | undefined;
70
+ routing?: "unknown" | "next" | "react-router" | "tanstack-router" | undefined;
71
71
  } | undefined;
72
72
  codeStyle?: {
73
73
  lineWidth?: number | undefined;
@@ -83,7 +83,7 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
83
83
  dontRemoveComments?: boolean | undefined;
84
84
  shouldAddComments?: boolean | undefined;
85
85
  typeOrInterface?: "type" | "interface" | "mixed" | undefined;
86
- importOrRequire?: "import" | "require" | "mixed" | undefined;
86
+ importOrRequire?: "mixed" | "import" | "require" | undefined;
87
87
  cjsToEsm?: boolean | undefined;
88
88
  modernize?: {
89
89
  replaceFs?: boolean | undefined;
@@ -96,7 +96,7 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
96
96
  importSymbol?: string | undefined;
97
97
  } | undefined;
98
98
  monorepo?: {
99
- type?: "none" | "bun" | "turborepo" | "nx" | "pnpm" | undefined;
99
+ type?: "none" | "turborepo" | "nx" | "pnpm" | "bun" | undefined;
100
100
  packages?: string[] | undefined;
101
101
  sharedPackages?: string[] | undefined;
102
102
  } | undefined;
@@ -113,7 +113,7 @@ export declare const defineConfigRse: (userConfig?: Partial<RseConfig>) => {
113
113
  repoBranch?: string | undefined;
114
114
  repoPrivacy?: "unknown" | "public" | "private" | undefined;
115
115
  projectArchitecture?: "unknown" | "fullstack" | "separated" | undefined;
116
- projectRuntime?: "bun" | "node" | "deno" | undefined;
116
+ projectRuntime?: "bun" | "deno" | "node" | undefined;
117
117
  skipPromptsUseAutoBehavior?: boolean | undefined;
118
118
  deployBehavior?: "prompt" | "autoYes" | "autoNo" | undefined;
119
119
  depsBehavior?: "prompt" | "autoYes" | "autoNo" | undefined;
@@ -9,7 +9,7 @@ import { build as bunBuild } from "bun";
9
9
  import pAll from "p-all";
10
10
  import prettyBytes from "pretty-bytes";
11
11
  import prettyMilliseconds from "pretty-ms";
12
- import { unifiedBuild } from "./bundlers/unified/build.js";
12
+ import { unifiedBuild } from "./providers/build.js";
13
13
  import {
14
14
  getBunSourcemapOption,
15
15
  getUnifiedSourcemapOption
@@ -3,7 +3,7 @@ import fs from "@reliverse/relifso";
3
3
  import { relinka } from "@reliverse/relinka";
4
4
  import { build as bunBuild } from "bun";
5
5
  import prettyMilliseconds from "pretty-ms";
6
- import { unifiedBuild } from "./bundlers/unified/build.js";
6
+ import { unifiedBuild } from "./providers/build.js";
7
7
  import {
8
8
  getBunSourcemapOption,
9
9
  getUnifiedSourcemapOption
@@ -1,3 +1,3 @@
1
- import type { BuildPreset } from "../../../sdk-types.js";
1
+ import type { BuildPreset } from "../../sdk-types.js";
2
2
  export declare function definePreset(preset: BuildPreset): BuildPreset;
3
3
  export declare const autoPreset: BuildPreset;
@@ -1,4 +1,4 @@
1
- import type { UnifiedBuildConfig } from "../../../sdk-types.js";
1
+ import type { UnifiedBuildConfig } from "../../sdk-types.js";
2
2
  export declare function unifiedBuild(inputSourceDir: string, coreIsCLI: {
3
3
  enabled: boolean;
4
4
  scripts: Record<string, string>;