@reliverse/dler 1.7.64 → 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 (90) 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 +9 -9
  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/{bundlers/unified → providers}/build.js +1 -1
  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/{bundlers/unified → providers}/mkdist/mkdist-impl/utils/dts.d.ts +1 -1
  37. package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/mkdist/mkdist-impl/utils/vue-dts.d.ts +1 -1
  38. package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/mkdist/mkdist-impl/utils/vue-dts.js +1 -2
  39. package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/mkdist/mkdist-mod.d.ts +1 -1
  40. package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/build.d.ts +1 -1
  41. package/bin/libs/sdk/sdk-impl/build/providers/rollup/config.d.ts +2 -0
  42. package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/plugins/cjs.d.ts +1 -1
  43. package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/plugins/esbuild.d.ts +1 -1
  44. package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/stub.d.ts +1 -1
  45. package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/utils.d.ts +1 -1
  46. package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/watch.d.ts +1 -1
  47. package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/untyped/untyped-mod.d.ts +1 -1
  48. package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/utils.d.ts +1 -1
  49. package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/validate.d.ts +1 -1
  50. package/bin/libs/sdk/sdk-impl/config/info.js +1 -1
  51. package/bin/libs/sdk/sdk-impl/utils/exec/exec-mod.js +9 -7
  52. package/bin/libs/sdk/sdk-impl/utils/exec/exec-parse.js +15 -0
  53. package/bin/libs/sdk/sdk-impl/utils/pm/pm-meta.d.ts +27 -0
  54. package/bin/libs/sdk/sdk-impl/utils/pm/pm-meta.js +86 -0
  55. package/bin/libs/sdk/sdk-impl/utils/pm/pm-utils.js +19 -0
  56. package/bin/libs/sdk/sdk-mod.d.ts +30 -30
  57. package/bin/libs/sdk/sdk-mod.js +27 -27
  58. package/package.json +4 -1
  59. package/bin/libs/sdk/sdk-impl/build/bundlers/unified/mkdist/mkdist-impl/loaders/js.d.ts +0 -2
  60. package/bin/libs/sdk/sdk-impl/build/bundlers/unified/mkdist/mkdist-impl/loaders/sass.d.ts +0 -2
  61. package/bin/libs/sdk/sdk-impl/build/bundlers/unified/rollup/config.d.ts +0 -2
  62. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/auto.js +0 -0
  63. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/copy/copy-mod.js +0 -0
  64. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/mkdist/mkdist-impl/loader.js +0 -0
  65. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/mkdist/mkdist-impl/loaders/js.js +0 -0
  66. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/mkdist/mkdist-impl/loaders/loaders-mod.js +0 -0
  67. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/mkdist/mkdist-impl/loaders/postcss.js +0 -0
  68. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/mkdist/mkdist-impl/loaders/sass.js +0 -0
  69. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/mkdist/mkdist-impl/loaders/vue.js +0 -0
  70. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/mkdist/mkdist-impl/make.js +0 -0
  71. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/mkdist/mkdist-impl/utils/dts.js +0 -0
  72. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/mkdist/mkdist-impl/utils/fs.d.ts +0 -0
  73. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/mkdist/mkdist-impl/utils/fs.js +0 -0
  74. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/mkdist/mkdist-mod.js +0 -0
  75. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/build.js +0 -0
  76. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/config.js +0 -0
  77. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/plugins/cjs.js +0 -0
  78. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/plugins/esbuild.js +0 -0
  79. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/plugins/json.d.ts +0 -0
  80. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/plugins/json.js +0 -0
  81. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/plugins/raw.d.ts +0 -0
  82. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/plugins/raw.js +0 -0
  83. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/plugins/shebang.d.ts +0 -0
  84. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/plugins/shebang.js +0 -0
  85. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/stub.js +0 -0
  86. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/utils.js +0 -0
  87. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/rollup/watch.js +0 -0
  88. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/untyped/untyped-mod.js +0 -0
  89. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/utils.js +0 -0
  90. /package/bin/libs/sdk/sdk-impl/build/{bundlers/unified → providers}/validate.js +0 -0
package/README.md CHANGED
@@ -2,7 +2,9 @@
2
2
 
3
3
  [sponsor](https://github.com/sponsors/blefnk) — [discord](https://discord.gg/pb8ukbwpsj) — [github](https://github.com/reliverse/dler) — [npm](https://npmjs.com/@reliverse/dler)
4
4
 
5
- > @reliverse/dler (`/ˈdiː.lər/`, dealer) is a flexible, unified, and fully automated bundler for typescript/javascript projects that doubles as an npm/jsr publishing tool. beyond bundling, dler serves as a comprehensive codemod toolkit for modern typescript/javascript development.
5
+ > @reliverse/dler (`/ˈdiː.lər/`, dealer) is your package manager's best friend. dler extends bun, pnpm, yarn, and npm core functionality and goes far beyond.
6
+ >
7
+ > at its core, dler is a flexible, unified, and fully automated bundler for typescript/javascript projects that doubles as an npm/jsr publishing tool. beyond bundling, dler serves as a comprehensive codemod toolkit for modern typescript/javascript development.
6
8
 
7
9
  ## features
8
10
 
@@ -166,9 +168,47 @@ since dler is fully modular, build command is separated for its own build-in plu
166
168
  bun dler build ...
167
169
  ```
168
170
 
169
- ### 2. `pub`
171
+ #### 1.1. `build binary` - Standalone Executable Builder
172
+
173
+ creates standalone executables for different platforms using bun's `--compile` feature.
174
+
175
+ ```bash
176
+ # build for default targets (linux x64, windows x64, macos arm64)
177
+ bun dler build binary
178
+
179
+ # build for all supported platforms
180
+ bun dler build binary --targets=all
181
+
182
+ # build for specific platforms
183
+ bun dler build binary --targets=bun-linux-x64,bun-windows-x64
184
+
185
+ # build with optimization
186
+ bun dler build binary --bytecode --minify --sourcemap
187
+
188
+ # windows-specific options
189
+ bun dler build binary --windows-icon=icon.ico --windows-hide-console
190
+
191
+ # debugging options
192
+ bun dler build binary --no-compile --external=c12,terminal-kit,problematic-package
170
193
 
171
- pub command is separated for its own build-in plugin as well.
194
+ # list all available targets
195
+ bun dler build binary --targets=list
196
+ ```
197
+
198
+ **supported platforms:**
199
+
200
+ - linux: x64, x64-baseline, x64-modern, arm64 (with glibc/musl variants)
201
+ - windows: x64, x64-baseline, x64-modern (with .exe extension)
202
+ - macos: x64, arm64
203
+
204
+ **output files:**
205
+
206
+ - executables: `mycli-linux`, `mycli-windows.exe`, `mycli-darwin-arm64`
207
+ - bundled scripts: `mycli-linux.js`, `mycli-windows.js`, `mycli-darwin-arm64.js`
208
+
209
+ **typical file sizes:** 60-120mb per executable (includes bun runtime and dependencies)
210
+
211
+ ### 2. `pub`
172
212
 
173
213
  it already calls build command by itself, so you don't need to run `dler build` separately.
174
214
 
@@ -1,8 +1,4 @@
1
1
  declare const _default: import("@reliverse/rempts").Command<{
2
- dev: {
3
- description: string;
4
- type: "boolean";
5
- };
6
2
  imports: {
7
3
  description: string;
8
4
  type: "boolean";
@@ -3,10 +3,6 @@ import { defineArgs, defineCommand, inputPrompt } from "@reliverse/rempts";
3
3
  import { useAggregator } from "./impl.js";
4
4
  export default defineCommand({
5
5
  args: defineArgs({
6
- dev: {
7
- description: "Run in development mode",
8
- type: "boolean"
9
- },
10
6
  imports: {
11
7
  description: "If true, produce import lines instead of export lines",
12
8
  type: "boolean"
@@ -0,0 +1,106 @@
1
+ /**
2
+ * # Build for default targets (Linux x64, Windows x64, macOS ARM64)
3
+ * bun dler build binary
4
+ *
5
+ * # Build for all supported platforms
6
+ * bun dler build binary --targets=all
7
+ *
8
+ * # Build for specific platforms
9
+ * bun dler build binary --targets=bun-linux-x64,bun-windows-x64
10
+ *
11
+ * # Build with bytecode compilation for faster startup
12
+ * bun dler build binary --bytecode
13
+ *
14
+ * # Build without minification and source maps
15
+ * bun dler build binary --no-minify --no-sourcemap
16
+ *
17
+ * # Build with Windows icon and hidden console
18
+ * bun dler build binary --windows-icon=icon.ico --windows-hide-console
19
+ *
20
+ * # List all available targets
21
+ * bun dler build binary --targets=list
22
+ *
23
+ * # Build sequentially instead of parallel
24
+ * bun dler build binary --no-parallel
25
+ *
26
+ * # Custom output directory
27
+ * bun dler build binary --outdir=builds
28
+ *
29
+ * # Different input file
30
+ * bun dler build binary --input=src/different-cli.ts
31
+ *
32
+ * # Exclude specific packages from bundling
33
+ * bun dler build binary --external=c12,terminal-kit,problematic-package
34
+ *
35
+ * # Create bundled scripts instead of executables (for debugging)
36
+ * bun dler build binary --no-compile
37
+ *
38
+ * @see https://bun.com/docs/bundler/executables
39
+ */
40
+ declare const _default: import("@reliverse/rempts").Command<{
41
+ input: {
42
+ type: "string";
43
+ description: string;
44
+ default: string;
45
+ };
46
+ targets: {
47
+ type: "string";
48
+ description: string;
49
+ default: string;
50
+ };
51
+ outdir: {
52
+ type: "string";
53
+ description: string;
54
+ default: string;
55
+ };
56
+ minify: {
57
+ type: "boolean";
58
+ description: string;
59
+ default: true;
60
+ };
61
+ sourcemap: {
62
+ type: "boolean";
63
+ description: string;
64
+ default: true;
65
+ };
66
+ bytecode: {
67
+ type: "boolean";
68
+ description: string;
69
+ default: false;
70
+ };
71
+ clean: {
72
+ type: "boolean";
73
+ description: string;
74
+ default: true;
75
+ };
76
+ "windows-icon": {
77
+ type: "string";
78
+ description: string;
79
+ };
80
+ "windows-hide-console": {
81
+ type: "boolean";
82
+ description: string;
83
+ default: false;
84
+ };
85
+ "asset-naming": {
86
+ type: "string";
87
+ description: string;
88
+ default: string;
89
+ };
90
+ parallel: {
91
+ type: "boolean";
92
+ description: string;
93
+ default: true;
94
+ };
95
+ external: {
96
+ type: "array";
97
+ description: string;
98
+ default: string[];
99
+ };
100
+ "no-compile": {
101
+ type: "boolean";
102
+ description: string;
103
+ default: false;
104
+ };
105
+ }>;
106
+ export default _default;
@@ -0,0 +1,201 @@
1
+ import { join } from "@reliverse/pathkit";
2
+ import { existsSync, mkdir } from "@reliverse/relifso";
3
+ import { relinka } from "@reliverse/relinka";
4
+ import { defineCommand, defineArgs } from "@reliverse/rempts";
5
+ import {
6
+ listAvailableTargets,
7
+ parseTargets,
8
+ validateInputFile,
9
+ cleanOutputDir,
10
+ buildForTarget,
11
+ getOutputFileName
12
+ } from "../../../libs/sdk/sdk-impl/build/providers/bun/single-file.js";
13
+ export default defineCommand({
14
+ meta: {
15
+ name: "bundler",
16
+ description: "Bundle your project into standalone executables for different platforms"
17
+ },
18
+ args: defineArgs({
19
+ input: {
20
+ type: "string",
21
+ description: "Input TypeScript file to bundle",
22
+ default: "src/cli.ts"
23
+ },
24
+ targets: {
25
+ type: "string",
26
+ description: "Comma-separated list of targets to build for (use 'all' for all targets, 'list' to show available targets)",
27
+ default: "bun-linux-x64,bun-windows-x64,bun-darwin-arm64"
28
+ },
29
+ outdir: {
30
+ type: "string",
31
+ description: "Output directory for built executables",
32
+ default: "dist"
33
+ },
34
+ minify: {
35
+ type: "boolean",
36
+ description: "Minify the output",
37
+ default: true
38
+ },
39
+ sourcemap: {
40
+ type: "boolean",
41
+ description: "Generate source maps",
42
+ default: true
43
+ },
44
+ bytecode: {
45
+ type: "boolean",
46
+ description: "Enable bytecode compilation for faster startup",
47
+ default: false
48
+ },
49
+ clean: {
50
+ type: "boolean",
51
+ description: "Clean output directory before building",
52
+ default: true
53
+ },
54
+ "windows-icon": {
55
+ type: "string",
56
+ description: "Path to Windows .ico file for executable icon"
57
+ },
58
+ "windows-hide-console": {
59
+ type: "boolean",
60
+ description: "Hide console window on Windows",
61
+ default: false
62
+ },
63
+ "asset-naming": {
64
+ type: "string",
65
+ description: "Asset naming pattern",
66
+ default: "[name]-[hash].[ext]"
67
+ },
68
+ parallel: {
69
+ type: "boolean",
70
+ description: "Build targets in parallel",
71
+ default: true
72
+ },
73
+ external: {
74
+ type: "array",
75
+ description: "External dependencies to exclude from bundle",
76
+ default: ["c12", "terminal-kit"]
77
+ },
78
+ "no-compile": {
79
+ type: "boolean",
80
+ description: "Create a bundled script instead of standalone executable (for debugging terminal issues)",
81
+ default: false
82
+ }
83
+ }),
84
+ async run({ args }) {
85
+ try {
86
+ if (args.targets === "list") {
87
+ listAvailableTargets();
88
+ return;
89
+ }
90
+ validateInputFile(args.input);
91
+ const targets = parseTargets(args.targets);
92
+ if (targets.length === 0) {
93
+ relinka("error", "No valid targets specified");
94
+ return;
95
+ }
96
+ const options = {
97
+ minify: args.minify,
98
+ sourcemap: args.sourcemap,
99
+ bytecode: args.bytecode,
100
+ outdir: args.outdir,
101
+ clean: args.clean,
102
+ windowsIcon: args["windows-icon"],
103
+ windowsHideConsole: args["windows-hide-console"],
104
+ assetNaming: args["asset-naming"],
105
+ external: args.external,
106
+ compile: !args["no-compile"]
107
+ };
108
+ if (options.clean) {
109
+ await cleanOutputDir(options.outdir);
110
+ } else if (!existsSync(options.outdir)) {
111
+ await mkdir(options.outdir, { recursive: true });
112
+ }
113
+ const buildType = options.compile ? "executable(s)" : "bundled script(s)";
114
+ relinka("info", `Building ${targets.length} ${buildType} from ${args.input}`);
115
+ if (!options.compile) {
116
+ relinka("info", "Running in script bundle mode (--no-compile)");
117
+ }
118
+ if (options.external && options.external.length > 0) {
119
+ relinka(
120
+ "info",
121
+ `External dependencies (excluded from bundle): ${options.external.join(", ")}`
122
+ );
123
+ }
124
+ if (options.bytecode && options.compile) {
125
+ relinka("warn", "Bytecode compilation is experimental (Bun v1.1.30+)");
126
+ } else if (options.bytecode && !options.compile) {
127
+ relinka("warn", "Bytecode compilation is only available with --compile flag");
128
+ }
129
+ if (args.parallel && targets.length > 1) {
130
+ relinka("info", "Building targets in parallel...");
131
+ const buildPromises = targets.map((target) => buildForTarget(target, args.input, options));
132
+ const results = await Promise.allSettled(buildPromises);
133
+ let successCount = 0;
134
+ let failureCount = 0;
135
+ for (const result of results) {
136
+ if (result.status === "fulfilled") {
137
+ successCount++;
138
+ } else {
139
+ failureCount++;
140
+ relinka("error", `Build failed: ${result.reason}`);
141
+ }
142
+ }
143
+ relinka("info", `Build completed: ${successCount} succeeded, ${failureCount} failed`);
144
+ if (failureCount > 0) {
145
+ if (successCount === 0) {
146
+ relinka("error", `\u274C All builds failed! No executables were generated.`);
147
+ } else {
148
+ relinka(
149
+ "warn",
150
+ `\u26A0\uFE0F Build completed with ${failureCount} failure(s). ${successCount} executable(s) available in: ${options.outdir}`
151
+ );
152
+ }
153
+ } else {
154
+ relinka("success", `\u{1F389} Build completed! All executables available in: ${options.outdir}`);
155
+ }
156
+ } else {
157
+ relinka("info", "Building targets sequentially...");
158
+ let sequentialSuccessCount = 0;
159
+ let sequentialFailureCount = 0;
160
+ for (const target of targets) {
161
+ try {
162
+ await buildForTarget(target, args.input, options);
163
+ sequentialSuccessCount++;
164
+ } catch (error) {
165
+ sequentialFailureCount++;
166
+ }
167
+ }
168
+ if (sequentialFailureCount > 0) {
169
+ if (sequentialSuccessCount === 0) {
170
+ relinka("error", `\u274C All builds failed! No executables were generated.`);
171
+ } else {
172
+ relinka(
173
+ "warn",
174
+ `\u26A0\uFE0F Build completed with ${sequentialFailureCount} failure(s). ${sequentialSuccessCount} executable(s) available in: ${options.outdir}`
175
+ );
176
+ }
177
+ } else {
178
+ relinka("success", `\u{1F389} Build completed! All executables available in: ${options.outdir}`);
179
+ }
180
+ }
181
+ if (existsSync(options.outdir)) {
182
+ const fileType = options.compile ? "executables" : "bundled scripts";
183
+ relinka("info", `Generated ${fileType}:`);
184
+ for (const target of targets) {
185
+ const filePath = join(options.outdir, getOutputFileName(target, "dler", options.compile));
186
+ if (existsSync(filePath)) {
187
+ const stat = await Bun.file(filePath).size;
188
+ const sizeMB = (stat / (1024 * 1024)).toFixed(2);
189
+ relinka(
190
+ "info",
191
+ ` ${getOutputFileName(target, "dler", options.compile)} (${sizeMB} MB)`
192
+ );
193
+ }
194
+ }
195
+ }
196
+ } catch (error) {
197
+ relinka("error", `Build failed: ${error}`);
198
+ process.exit(1);
199
+ }
200
+ }
201
+ });
@@ -23,10 +23,11 @@ export default defineCommand({
23
23
  }
24
24
  }),
25
25
  async run({ args }) {
26
- await ensureDlerConfig(args.dev);
26
+ const isDev = args.dev || process.env.DLER_DEV_MODE === "true";
27
+ await ensureDlerConfig(isDev);
27
28
  const config = await getConfigDler();
28
29
  const { timer } = await dlerBuild(
29
- args.dev,
30
+ isDev,
30
31
  config,
31
32
  args.debugOnlyCopyNonBuildFiles,
32
33
  args.debugDontCopyNonBuildFiles
@@ -1,4 +1,8 @@
1
1
  declare const _default: import("@reliverse/rempts").Command<{
2
+ dev: {
3
+ type: "boolean";
4
+ description: string;
5
+ };
2
6
  directory: {
3
7
  type: "string";
4
8
  description: string;
@@ -39,10 +43,6 @@ declare const _default: import("@reliverse/rempts").Command<{
39
43
  type: "boolean";
40
44
  description: string;
41
45
  };
42
- dev: {
43
- type: "boolean";
44
- description: string;
45
- };
46
46
  peer: {
47
47
  type: "boolean";
48
48
  description: string;
@@ -14,6 +14,7 @@ import { checkPathExtensions } from "../../libs/sdk/sdk-impl/rules/reliverse/pat
14
14
  import { checkSelfInclude } from "../../libs/sdk/sdk-impl/rules/reliverse/self-include/self-include.js";
15
15
  import { checkTsConfigHealth } from "../../libs/sdk/sdk-impl/rules/reliverse/tsconfig-health/tsconfig-health.js";
16
16
  import { displayCheckResults } from "../../libs/sdk/sdk-impl/rules/rules-mod.js";
17
+ import { ensureDlerConfig } from "../../libs/sdk/sdk-mod.js";
17
18
  export default defineCommand({
18
19
  meta: {
19
20
  name: "check",
@@ -21,6 +22,10 @@ export default defineCommand({
21
22
  description: "Check your codebase for issues (deps, extensions, config, etc) or analyze dependencies."
22
23
  },
23
24
  args: defineArgs({
25
+ dev: {
26
+ type: "boolean",
27
+ description: "Runs the CLI in dev mode"
28
+ },
24
29
  // --- check args ---
25
30
  directory: {
26
31
  type: "string",
@@ -63,10 +68,6 @@ export default defineCommand({
63
68
  type: "boolean",
64
69
  description: "include Node.js built-in modules in the output (for deps)"
65
70
  },
66
- dev: {
67
- type: "boolean",
68
- description: "check devDependencies instead of dependencies (for deps)"
69
- },
70
71
  peer: {
71
72
  type: "boolean",
72
73
  description: "check peerDependencies instead of dependencies (for deps)"
@@ -86,6 +87,8 @@ export default defineCommand({
86
87
  }
87
88
  }),
88
89
  async run({ args }) {
90
+ const isDev = args.dev || process.env.DLER_DEV_MODE === "true";
91
+ await ensureDlerConfig(isDev);
89
92
  if (args.deps) {
90
93
  try {
91
94
  const directory = path.resolve(args.directory ?? ".");
@@ -96,7 +99,7 @@ export default defineCommand({
96
99
  ignorePatterns,
97
100
  json: args.json,
98
101
  builtins: args.builtins,
99
- dev: args.dev,
102
+ dev: isDev,
100
103
  peer: args.peer,
101
104
  optional: args.optional,
102
105
  fix: args.fix,
@@ -292,7 +295,7 @@ checking directory: ${directory}`);
292
295
  onProgress,
293
296
  json: args.json,
294
297
  builtins: args.builtins,
295
- dev: args.dev,
298
+ dev: isDev,
296
299
  peer: args.peer,
297
300
  optional: args.optional,
298
301
  fix: args.fix,
package/bin/app/cmds.d.ts CHANGED
@@ -15,3 +15,4 @@ export declare const getRenameCmd: () => Promise<Command>;
15
15
  export declare const getMagicCmd: () => Promise<Command>;
16
16
  export declare const getSplitCmd: () => Promise<Command>;
17
17
  export declare const getRmCmd: () => Promise<Command>;
18
+ export declare const getUpdateCmd: () => Promise<Command>;
package/bin/app/cmds.js CHANGED
@@ -15,3 +15,4 @@ export const getRenameCmd = async () => loadCommand("rename");
15
15
  export const getMagicCmd = async () => loadCommand("magic");
16
16
  export const getSplitCmd = async () => loadCommand("split");
17
17
  export const getRmCmd = async () => loadCommand("rm");
18
+ export const getUpdateCmd = async () => loadCommand("update");
@@ -1,7 +1,7 @@
1
1
  import { resolve } from "@reliverse/pathkit";
2
2
  import { defineArgs, defineCommand } from "@reliverse/rempts";
3
3
  import { dlerBuild } from "../build/impl.js";
4
- import { mkdist } from "../../libs/sdk/sdk-impl/build/bundlers/unified/mkdist/mkdist-impl/make.js";
4
+ import { mkdist } from "../../libs/sdk/sdk-impl/build/providers/mkdist/mkdist-impl/make.js";
5
5
  import { ensureDlerConfig } from "../../libs/sdk/sdk-impl/config/init.js";
6
6
  export default defineCommand({
7
7
  meta: {
@@ -89,6 +89,7 @@ export default defineCommand({
89
89
  }
90
90
  }),
91
91
  async run({ args }) {
92
+ const isDev = args.dev || process.env.DLER_DEV_MODE === "true";
92
93
  if (args.mkdistOnly) {
93
94
  const {
94
95
  result: { writtenFiles }
@@ -113,7 +114,7 @@ export default defineCommand({
113
114
  console.log(writtenFiles.map((f) => `- ${f}`).join("\n"));
114
115
  process.exit(0);
115
116
  }
116
- await ensureDlerConfig(args.dev);
117
- await dlerBuild(args.dev);
117
+ await ensureDlerConfig(isDev);
118
+ await dlerBuild(isDev);
118
119
  }
119
120
  });
@@ -14,8 +14,9 @@ export default defineCommand({
14
14
  }
15
15
  }),
16
16
  async run({ args }) {
17
- await ensureDlerConfig(args.dev);
17
+ const isDev = args.dev || process.env.DLER_DEV_MODE === "true";
18
+ await ensureDlerConfig(isDev);
18
19
  const config = await getConfigDler();
19
- await dlerPub(args.dev, config);
20
+ await dlerPub(isDev, config);
20
21
  }
21
22
  });
@@ -0,0 +1,31 @@
1
+ declare const _default: import("@reliverse/rempts").Command<{
2
+ name: {
3
+ type: "array";
4
+ description: string;
5
+ };
6
+ ignore: {
7
+ type: "array";
8
+ description: string;
9
+ };
10
+ "dev-only": {
11
+ type: "boolean";
12
+ description: string;
13
+ default: false;
14
+ };
15
+ "prod-only": {
16
+ type: "boolean";
17
+ description: string;
18
+ default: false;
19
+ };
20
+ "dry-run": {
21
+ type: "boolean";
22
+ description: string;
23
+ default: false;
24
+ };
25
+ concurrency: {
26
+ type: "number";
27
+ description: string;
28
+ default: number;
29
+ };
30
+ }>;
31
+ export default _default;