@reliverse/dler 1.2.1 → 1.2.3

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 (73) hide show
  1. package/README.md +126 -61
  2. package/bin/app/build/cmd.js +17 -0
  3. package/bin/app/deps/impl/types.js +0 -0
  4. package/bin/{cli/args/inject → app/inject/impl}/ts-expect-error.txt +3 -3
  5. package/bin/app/libs/cmd.js +0 -0
  6. package/bin/app/mono/cmd.js +0 -0
  7. package/bin/app/pub/cmd.js +17 -0
  8. package/bin/app/relifso/cmd.js +5 -0
  9. package/bin/{cli/args/init/libs/reinit/reint-impl → app/relifso/impl}/reinit-mod.txt +5 -5
  10. package/bin/{cli/args/init/libs/reinit/reint-impl → app/relifso/impl}/templates/t-license.js +1 -1
  11. package/bin/app/relifso/impl/types.js +0 -0
  12. package/bin/app/relinka/cmd.js +0 -0
  13. package/bin/{cli/args/init/init-mod.txt → app/rempts/cmd.txt} +1 -1
  14. package/bin/{cli/args/init/cmd → app/rempts/impl}/index.js +5 -4
  15. package/bin/app/spell/cmd.js +0 -0
  16. package/bin/app/split/cmd.js +0 -0
  17. package/bin/{cli/args/tools/index.js → app/tools/cmd.js} +2 -2
  18. package/bin/{cli/args/tools/tools-impl.js → app/tools/impl.js} +15 -15
  19. package/bin/{tools.txt → app/tools/tools.txt} +1 -1
  20. package/bin/cli.js +104 -3
  21. package/bin/init.js +22 -6
  22. package/bin/libs/cfg/cfg-default.js +1 -0
  23. package/bin/libs/sdk/sdk-impl/build/build-library.js +68 -36
  24. package/bin/libs/sdk/sdk-impl/build/build-regular.js +22 -12
  25. package/bin/libs/sdk/sdk-impl/build/bundlers/unified/auto.js +1 -1
  26. package/bin/libs/sdk/sdk-impl/build/bundlers/unified/build.js +4 -7
  27. package/bin/libs/sdk/sdk-impl/build/bundlers/unified/mkdist/mkdist.js +3 -1
  28. package/bin/libs/sdk/sdk-impl/build/bundlers/unified/rollup/watch.js +3 -3
  29. package/bin/libs/sdk/sdk-impl/library-flow.js +1 -1
  30. package/bin/libs/sdk/sdk-impl/pub/pub-library.js +9 -9
  31. package/bin/libs/sdk/sdk-impl/pub/pub-regular.js +4 -4
  32. package/bin/libs/sdk/sdk-impl/regular-flow.js +17 -11
  33. package/bin/libs/sdk/sdk-impl/utils/tools/tools-impl.js +6 -6
  34. package/bin/libs/sdk/sdk-impl/utils/utils-build.js +2 -2
  35. package/bin/libs/sdk/sdk-impl/utils/utils-bump.js +4 -4
  36. package/bin/libs/sdk/sdk-impl/utils/utils-fs.js +2 -5
  37. package/bin/libs/sdk/sdk-impl/utils/utils-info.js +4 -4
  38. package/bin/libs/sdk/sdk-impl/utils/utils-jsr-json.js +3 -1
  39. package/bin/libs/sdk/sdk-impl/utils/utils-paths.js +6 -6
  40. package/bin/libs/sdk/sdk-impl/utils/utils-pkg-json-libs.js +2 -2
  41. package/bin/libs/sdk/sdk-impl/utils/utils-pkg-json-reg.js +8 -5
  42. package/bin/load.js +1 -1
  43. package/bin/mod.js +7 -39
  44. package/package.json +7 -8
  45. package/bin/cli/args/deps/deps-mod.js +0 -48
  46. package/bin/cli/args/init/libs/reinit/reinit-mod.js +0 -5
  47. package/bin/cli/args/init/types.js +0 -1
  48. package/bin/cli/args/spell/spell-mod.js +0 -44
  49. package/bin/cli/args/split/split-mod.js +0 -26
  50. /package/bin/{cli/args/agg/agg-mod.js → app/agg/cmd.js} +0 -0
  51. /package/bin/{cli/args/conv/conv-mod.js → app/auth/cmd.js} +0 -0
  52. /package/bin/{cli/args/deps/types.js → app/cmds.js} +0 -0
  53. /package/bin/{cli/args → app}/conv/README.md +0 -0
  54. /package/bin/{cli/args/init/libs/reinit/reint-impl/types.js → app/conv/cmd.js} +0 -0
  55. /package/bin/{cli/args/mono/mono-mod.js → app/deps/cmd.js} +0 -0
  56. /package/bin/{cli/args/deps → app/deps/impl}/analyzer.js +0 -0
  57. /package/bin/{cli/args/deps → app/deps/impl}/filesystem.js +0 -0
  58. /package/bin/{cli/args/deps → app/deps/impl}/formatter.js +0 -0
  59. /package/bin/{cli/args/deps → app/deps/impl}/parser.js +0 -0
  60. /package/bin/{cli/args → app}/inject/README.md +0 -0
  61. /package/bin/{cli/args/inject/inject-mod.js → app/inject/cmd.js} +0 -0
  62. /package/bin/{cli/args/inject → app/inject/impl}/arg-ts-expect-error.txt +0 -0
  63. /package/bin/{cli/args/inject → app/inject/impl}/inject-mod.txt +0 -0
  64. /package/bin/{cli/args/inject → app/inject/impl}/reinject.config.js +0 -0
  65. /package/bin/{cli/args/merger → app/merge}/README.md +0 -0
  66. /package/bin/{cli/args/merger/merger-mod.txt → app/merge/cmd.txt} +0 -0
  67. /package/bin/{cli/args/init/libs/reinit/reint-impl → app/relifso/impl}/const.js +0 -0
  68. /package/bin/{cli/args/init/libs/reinit/reint-impl → app/relifso/impl}/templates/t-gitignore.js +0 -0
  69. /package/bin/{cli/args/init/libs/reinit/reint-impl → app/relifso/impl}/templates/t-readme.js +0 -0
  70. /package/bin/{cli/args/init/libs/reinit/reint-impl → app/relifso/impl}/utils.js +0 -0
  71. /package/bin/{cli/args/init → app/rempts}/README.md +0 -0
  72. /package/bin/{cli/args → app}/split/README.md +0 -0
  73. /package/bin/{cli/args/split/split-impl.js → app/split/impl.js} +0 -0
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # dler (prev. relidler) • reliverse bundler
2
2
 
3
- [💖 github sponsors](https://github.com/sponsors/blefnk) [💬 discord](https://discord.gg/pb8ukbwpsj) [✨ repo](https://github.com/reliverse/dler) [📦 npm](https://npmjs.com/@reliverse/dler) [📚 docs](https://docs.reliverse.org/reliverse/dler)
3
+ > @reliverse/dler (`/ˈdiː.lər/`, dealer) is a flexible, unified, and fully automated bundler for typescript and javascript projects, as well as an npm and jsr publishing tool. dler is not only a bundler, it also tries to serve as the most powerful codemod toolkit for js/ts.
4
4
 
5
- > @reliverse/dler (`/ˈdiː.lər/`, dealer) is a flexible, unified, and fully automated bundler for typescript and javascript projects, as well as an npm and jsr publishing tool.
5
+ [sponsor](https://github.com/sponsors/blefnk) — [discord](https://discord.gg/pb8ukbwpsj) [repo](https://github.com/reliverse/dler) [npm](https://npmjs.com/@reliverse/dler) [docs](https://docs.reliverse.org/reliverse/dler)
6
6
 
7
7
  ## features
8
8
 
9
- - 😘 replacement for `unbuild`
9
+ - 😘 replacement for `unjs/unbuild`
10
10
  - ⚡ `dler` works via cli and sdk
11
11
  - 📦 automated npm/jsr publishing
12
12
  - ✅ ensures reliable js/ts builds
@@ -122,77 +122,41 @@ bun dev # bun src/mod.ts --dev
122
122
  dler [build|pub] # if installed globally
123
123
  ```
124
124
 
125
- absolutely! here’s your improved section, now listing all available spell types:
126
-
127
- ---
128
-
129
125
  ## 🔌 plugins
130
126
 
131
- dler ships with a flexible plugin system and **10 built-in plugins** (from [@reliverse/addons](https://reliverse.org/addons)).
132
-
133
- ### 1. `magic-spells-dler-plugin`
134
-
135
- **available spell types:**
136
-
137
- - `replace-line` — injects contents from one file into another
138
- - `rename-file` — renames the current file
139
- - `remove-comment` — removes a specific comment from code
140
- - `remove-line` — removes a specific line from code
141
- - `remove-file` — deletes the current file
142
- - `transform-content` — applies a transformation to the file content
143
- - `copy-file` — copies the current file to a new location
144
- - `move-file` — moves the current file to a new location
145
- - `insert-at` — inserts content at a specific position in the file
146
-
147
- **params:**
148
-
149
- params are optional and comma-separated.
127
+ dler ships with a flexible plugin system and **15 built-in plugins** (from [@reliverse/addons](https://reliverse.org/addons)).
150
128
 
151
- currently, only the first param is supported:
129
+ feel free to create your own plugins. plugins can be implemented as built-in directly in `src/app/plugin-name/impl/*` and then imported from `src/app/plugin-name/cmd.ts`; or implemented in your own library and then imported from `src/app/plugin-name/cmd.ts`.
152
130
 
153
- - `hooked` (boolean, default: `false`)
154
- - `false`: dler handles the spell automatically at postbuild
155
- - `true`: disables default behavior, so you can trigger the spell yourself (e.g. from your own cli function)
156
-
157
- more params coming soon...
131
+ ### 1. `agg`
158
132
 
159
- **usage examples:**
133
+ generates aggregator file with content like `import { getsomething } from "./utils.js"`.
160
134
 
161
- - `export * from "../../types.js"; // <dler-replace-line-{hooked=false}>` — injects file contents at this line
162
- - `// @ts-expect-error <dler-remove-comment-{hooked=false}>` removes just this comment
163
- - `// <dler-remove-line-{hooked=false}>` — removes this line
164
- - `// <dler-remove-file-{hooked=false}>` — deletes this file
165
- - `// <dler-rename-file-"tsconfig.json"-{hooked=false}>` — renames this file (runs at postbuild because `hooked=false`)
166
-
167
- **using `hooked=true`:**
135
+ ```bash
136
+ dler agg ...
137
+ ```
168
138
 
169
- - `// <dler-rename-file-"tsconfig.json"-{hooked=true}>` — renames the file, but only when you trigger it yourself (hooked from your side)
139
+ ### 2. `auth`
170
140
 
171
- **triggering spells:**
141
+ best friend of auth+db libs like [better-auth](https://better-auth.com) and [drizzle-orm](https://orm.drizzle.team).
172
142
 
173
- from dler’s cli:
143
+ ```bash
144
+ dler auth better-auth generate
145
+ ```
174
146
 
175
- - `dler spell --trigger rename-file,... --files tsconfig.json,...`
176
- - `dler spell --trigger all`
177
- - `dler spell`
147
+ ### 3. `build`
178
148
 
179
- from your own code:
149
+ since dler is fully modular, build command is separated for its own build-in plugin as well.
180
150
 
181
- ```ts
182
- await dler.spell({ spells: ["rename-file"], files: [] });
183
- // await dler.spell({}) // means all spells and all files
184
- // spell: ["all"] // means all spells
185
- // spell: [] // means all spells
186
- // files: [] // means all files
151
+ ```bash
152
+ dler build ...
187
153
  ```
188
154
 
189
- p.s. [see how rse cli uses hooked=true](https://github.com/reliverse/rse/blob/main/src/postbuild.ts)
190
-
191
- here’s an extended and improved section for your readme, keeping your lowercase style and adding clarity, options, and a bit more detail:
155
+ ### 4. `conv`
192
156
 
193
- ---
157
+ not yet documented.
194
158
 
195
- ### 2. `deps-dler-plugin`
159
+ ### 5. `deps`
196
160
 
197
161
  finds missing dependencies in your project by scanning your code for imports and comparing them to your `package.json`.
198
162
 
@@ -239,7 +203,11 @@ dler deps --all --directory ./src --include-builtins
239
203
  missing dependencies are shown only once, even if used in multiple files.
240
204
  deep imports like `dep/some/file` or `@org/dep/some/thing` are always resolved to their root package.
241
205
 
242
- ### 3. `libraries-dler-plugin`
206
+ ### 6. `inject`
207
+
208
+ not yet documented.
209
+
210
+ ### 7. `libs`
243
211
 
244
212
  builds and publishes specific subdirectories of your main project as standalone packages.
245
213
 
@@ -275,9 +243,106 @@ libslist: {
275
243
 
276
244
  - more magic commands coming soon...
277
245
 
278
- ---
246
+ ### 8. `merge`
247
+
248
+ not yet documented.
249
+
250
+ ### 9. `mono`
251
+
252
+ not yet documented.
253
+
254
+ ### 10. `pub`
255
+
256
+ pub command is separated for its own build-in plugin as well.
257
+
258
+ it already calls build command by itself, so you don't need to run `dler build` separately.
259
+
260
+ ```bash
261
+ dler pub ...
262
+ ```
263
+
264
+ ### 11. `relifso`
265
+
266
+ ```bash
267
+ dler relifso init ...
268
+ ```
269
+
270
+ ### 12. `relinka`
271
+
272
+ @reliverse/relinka's best friend. learn more in its [docs](https://github.com/reliverse/relinka).
273
+
274
+ ```bash
275
+ dler relinka --console-to-relinka
276
+ ```
277
+
278
+ ### 13. `rempts`
279
+
280
+ @reliverse/rempts's best friend. learn more in its [docs](https://github.com/reliverse/rempts).
281
+
282
+ ```bash
283
+ dler rempts init --cmd my-cmd-1
284
+ dler rempts init --cmds
285
+ ```
286
+
287
+ ### 14. `spell`
288
+
289
+ **available spell types:**
290
+
291
+ - `replace-line` — injects contents from one file into another
292
+ - `rename-file` — renames the current file
293
+ - `remove-comment` — removes a specific comment from code
294
+ - `remove-line` — removes a specific line from code
295
+ - `remove-file` — deletes the current file
296
+ - `transform-content` — applies a transformation to the file content
297
+ - `copy-file` — copies the current file to a new location
298
+ - `move-file` — moves the current file to a new location
299
+ - `insert-at` — inserts content at a specific position in the file
300
+
301
+ **params:**
302
+
303
+ params are optional and comma-separated.
304
+
305
+ currently, only the first param is supported:
306
+
307
+ - `hooked` (boolean, default: `false`)
308
+ - `false`: dler handles the spell automatically at postbuild
309
+ - `true`: disables default behavior, so you can trigger the spell yourself (e.g. from your own cli function)
310
+
311
+ more params coming soon...
312
+
313
+ **usage examples:**
314
+
315
+ - `export * from "../../types.js"; // <dler-replace-line-{hooked=false}>` — injects file contents at this line
316
+ - `// @ts-expect-error <dler-remove-comment-{hooked=false}>` — removes just this comment
317
+ - `// <dler-remove-line-{hooked=false}>` — removes this line
318
+ - `// <dler-remove-file-{hooked=false}>` — deletes this file
319
+ - `// <dler-rename-file-"tsconfig.json"-{hooked=false}>` — renames this file (runs at postbuild because `hooked=false`)
320
+
321
+ **using `hooked=true`:**
322
+
323
+ - `// <dler-rename-file-"tsconfig.json"-{hooked=true}>` — renames the file, but only when you trigger it yourself (hooked from your side)
324
+
325
+ **triggering spells:**
326
+
327
+ from dler’s cli:
328
+
329
+ - `dler spell --trigger rename-file,... --files tsconfig.json,...`
330
+ - `dler spell --trigger all`
331
+ - `dler spell`
332
+
333
+ from your own code:
334
+
335
+ ```ts
336
+ await dler.spell({ spells: ["rename-file"], files: [] });
337
+ // await dler.spell({}) // means all spells and all files
338
+ // spell: ["all"] // means all spells
339
+ // spell: [] // means all spells
340
+ // files: [] // means all files
341
+ ```
342
+
343
+ p.s. [see how rse cli uses hooked=true](https://github.com/reliverse/rse/blob/main/src/postbuild.ts)
279
344
 
280
- ### 4. `tools-dler-plugin`
345
+ ### 15. `tools`
281
346
 
282
347
  lets you run standalone dler features directly from the cli:
283
348
 
@@ -0,0 +1,17 @@
1
+ import { defineArgs, defineCommand } from "@reliverse/rempts";
2
+ import { dlerBuild } from "../../cli.js";
3
+ export default defineCommand({
4
+ meta: {
5
+ name: "build",
6
+ description: "Build the project"
7
+ },
8
+ args: defineArgs({
9
+ dev: {
10
+ type: "boolean",
11
+ description: "Runs the CLI in dev mode"
12
+ }
13
+ }),
14
+ async run({ args }) {
15
+ await dlerBuild(args.dev);
16
+ }
17
+ });
File without changes
@@ -129,7 +129,7 @@ async function runTscAndParseErrors(
129
129
  // In case of error, try to extract the output.
130
130
  const combined = (error.all as string) || "";
131
131
  if (!combined) {
132
- relinka("info", `TSC returned no error lines. Possibly no TS errors?`);
132
+ relinka("log", `TSC returned no error lines. Possibly no TS errors?`);
133
133
  return [];
134
134
  }
135
135
 
@@ -191,7 +191,7 @@ async function injectCommentIntoFiles(
191
191
  lineNums.sort((a, b) => b - a);
192
192
  const absPath = path.resolve(filePath);
193
193
  relinka(
194
- "info",
194
+ "log",
195
195
  `Injecting into ${absPath} at lines: ${lineNums.join(", ")}`,
196
196
  );
197
197
 
@@ -235,7 +235,7 @@ export async function useTsExpectError(args: {
235
235
  }
236
236
 
237
237
  if (usedAuto) {
238
- relinka("info", "Running TSC to discover error lines...");
238
+ relinka("log", "Running TSC to discover error lines...");
239
239
  const tscCommand = userConfig.tscCommand!;
240
240
  try {
241
241
  const discovered = await runTscAndParseErrors(tscCommand, args.tscPaths);
File without changes
File without changes
@@ -0,0 +1,17 @@
1
+ import { defineArgs, defineCommand } from "@reliverse/rempts";
2
+ import { dlerPub } from "../../cli.js";
3
+ export default defineCommand({
4
+ meta: {
5
+ name: "build",
6
+ description: "Build the project"
7
+ },
8
+ args: defineArgs({
9
+ dev: {
10
+ type: "boolean",
11
+ description: "Runs the CLI in dev mode"
12
+ }
13
+ }),
14
+ async run({ args }) {
15
+ await dlerPub(args.dev);
16
+ }
17
+ });
@@ -0,0 +1,5 @@
1
+ export { FILE_TYPES } from "./impl/const.js";
2
+ export { gitignoreTemplate } from "./impl/templates/t-gitignore.js";
3
+ export { licenseTemplate } from "./impl/templates/t-license.js";
4
+ export { readmeTemplate } from "./impl/templates/t-readme.js";
5
+ export { escapeMarkdownCodeBlocks } from "./impl/utils.js";
@@ -197,7 +197,7 @@ async function doInitFile(
197
197
  }
198
198
  if (maybeNewDest !== resolvedDestPath) {
199
199
  // e.g., attach-index was chosen
200
- relinka("info", `attach-index or rename => ${maybeNewDest}`);
200
+ relinka("log", `attach-index or rename => ${maybeNewDest}`);
201
201
  return await finalizeInit(
202
202
  req,
203
203
  initBehaviour,
@@ -268,7 +268,7 @@ async function runCopy(
268
268
  }
269
269
 
270
270
  relinka(
271
- "info",
271
+ "log",
272
272
  `Attempting copy:
273
273
  - Source Dir: ${resolvedSrcDir}
274
274
  - Source Path: ${sourcePath}
@@ -283,7 +283,7 @@ async function runCopy(
283
283
  throw new Error(`Source file not found: ${sourcePath}`);
284
284
  }
285
285
  await fs.copy(sourcePath, resolvedDestPath, { overwrite: true });
286
- relinka("info", `Copied file: ${chosenVariation} -> ${resolvedDestPath}`);
286
+ relinka("log", `Copied file: ${chosenVariation} -> ${resolvedDestPath}`);
287
287
  return {
288
288
  requested: req,
289
289
  finalPath: resolvedDestPath,
@@ -305,7 +305,7 @@ async function runCopy(
305
305
  }
306
306
  await fs.copy(fallbackFullPath, resolvedDestPath, { overwrite: true });
307
307
  relinka(
308
- "info",
308
+ "log",
309
309
  `Fallback copy: ${fallbackSource} -> ${resolvedDestPath}`,
310
310
  );
311
311
  return {
@@ -390,6 +390,6 @@ async function attachIndex(originalPath: string) {
390
390
  newPath = path.join(dir, `${base}.${counter}${ext}`);
391
391
  counter++;
392
392
  }
393
- relinka("info", `Attaching index => ${newPath}`);
393
+ relinka("log", `Attaching index => ${newPath}`);
394
394
  return newPath;
395
395
  }
@@ -1,6 +1,6 @@
1
1
  export const licenseTemplate = `# MIT License
2
2
 
3
- Copyright (c) 2025 Nazar Kornienko (blefnk), Reliverse
3
+ Copyright (c) Nazar Kornienko (blefnk), Reliverse
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
File without changes
File without changes
@@ -76,7 +76,7 @@ const main = defineCommand({
76
76
  });
77
77
 
78
78
  if (chosen.length === 0) {
79
- relinka("info", "No file types selected. Exiting...");
79
+ relinka("log", "No file types selected. Exiting...");
80
80
  return;
81
81
  }
82
82
 
@@ -12,7 +12,8 @@ export default defineCommand({
12
12
  cmd: {
13
13
  type: "array",
14
14
  required: true,
15
- description: "Names of commands to initialize"
15
+ description: "Names of commands to initialize",
16
+ options: ["cmd1", "cmd2", "cmd3"]
16
17
  },
17
18
  force: {
18
19
  type: "boolean",
@@ -35,7 +36,7 @@ export default defineCommand({
35
36
  fs.mkdirSync(dirPath, { recursive: true });
36
37
  const content = generateCommandTemplate(cmdName);
37
38
  fs.writeFileSync(filePath, content, "utf-8");
38
- relinka("info", `\u2705 Created new command: ${filePath}`);
39
+ relinka("log", `\u2705 Created new command: ${filePath}`);
39
40
  }
40
41
  }
41
42
  });
@@ -58,8 +59,8 @@ export default defineCommand({
58
59
  },
59
60
  },
60
61
  async run({ args }) {
61
- relinka("info", "Command '${cmdName}' executed.");
62
- relinka("info", "Received args:", args);
62
+ relinka("log", "Command '${cmdName}' executed.");
63
+ relinka("log", "Received args:", args);
63
64
  },
64
65
  });
65
66
  `;
File without changes
File without changes
@@ -1,7 +1,7 @@
1
1
  import { relinka } from "@reliverse/relinka";
2
2
  import { defineCommand } from "@reliverse/rempts";
3
3
  import path from "pathe";
4
- import { printUsage, useAggregator } from "./tools-impl.js";
4
+ import { printUsage, useAggregator } from "./impl.js";
5
5
  const TOOLS = ["agg"];
6
6
  export default defineCommand({
7
7
  meta: {
@@ -52,7 +52,7 @@ export default defineCommand({
52
52
  }
53
53
  if (!TOOLS.includes(args.tool)) {
54
54
  relinka("error", `Error: Invalid tool: ${args.tool}`);
55
- relinka("info", `Available tools: ${TOOLS.join(", ")}`);
55
+ relinka("log", `Available tools: ${TOOLS.join(", ")}`);
56
56
  printUsage(isDev);
57
57
  process.exit(1);
58
58
  }
@@ -28,7 +28,7 @@ export async function useAggregator({
28
28
  const exts = [".ts", ".js"];
29
29
  if (verbose)
30
30
  relinka(
31
- "info",
31
+ "log",
32
32
  `Scanning directory ${inputDir} for files with extensions: ${exts.join(
33
33
  ", "
34
34
  )}`
@@ -61,7 +61,7 @@ export async function useAggregator({
61
61
  const allLines = aggregatorLinesArrays.flat();
62
62
  if (sortLines) {
63
63
  allLines.sort();
64
- if (verbose) relinka("info", "Sorted aggregator lines alphabetically.");
64
+ if (verbose) relinka("log", "Sorted aggregator lines alphabetically.");
65
65
  }
66
66
  if (outFile.startsWith(inputDir)) {
67
67
  relinka(
@@ -83,7 +83,7 @@ ${AGGREGATOR_END}
83
83
  if (overrideFile) {
84
84
  finalText = aggregatorBlock;
85
85
  if (verbose) {
86
- relinka("info", "Override mode: rewriting entire file.");
86
+ relinka("log", "Override mode: rewriting entire file.");
87
87
  }
88
88
  } else {
89
89
  let existingContent = "";
@@ -91,12 +91,12 @@ ${AGGREGATOR_END}
91
91
  existingContent = await fs.readFile(outFile, "utf8");
92
92
  } catch {
93
93
  if (verbose)
94
- relinka("info", "Aggregator file does not exist. Creating new one.");
94
+ relinka("log", "Aggregator file does not exist. Creating new one.");
95
95
  }
96
96
  if (existingContent?.includes(AGGREGATOR_START) && existingContent.includes(AGGREGATOR_END)) {
97
97
  if (verbose) {
98
98
  relinka(
99
- "info",
99
+ "log",
100
100
  "Existing aggregator block found. Updating auto-generated section."
101
101
  );
102
102
  }
@@ -109,7 +109,7 @@ ${AGGREGATOR_END}
109
109
  if (existingContent) {
110
110
  if (verbose)
111
111
  relinka(
112
- "info",
112
+ "log",
113
113
  "No aggregator block found. Appending auto-generated section."
114
114
  );
115
115
  finalText = `${existingContent.trim()}
@@ -160,7 +160,7 @@ async function collectFiles(dir, exts, recursive, ignoreDirs, verbose, includeIn
160
160
  if (entry.isDirectory()) {
161
161
  if (ignoreDirs.includes(entry.name)) {
162
162
  if (verbose) {
163
- relinka("info", `Skipping ignored directory: ${fullPath}`);
163
+ relinka("log", `Skipping ignored directory: ${fullPath}`);
164
164
  }
165
165
  continue;
166
166
  }
@@ -179,13 +179,13 @@ async function collectFiles(dir, exts, recursive, ignoreDirs, verbose, includeIn
179
179
  } else if (entry.isFile()) {
180
180
  if (!includeInternal && path.basename(fullPath).startsWith(internalMarker)) {
181
181
  if (verbose) {
182
- relinka("info", `Skipping internal file: ${fullPath}`);
182
+ relinka("log", `Skipping internal file: ${fullPath}`);
183
183
  }
184
184
  continue;
185
185
  }
186
186
  if (exts.some((ext) => entry.name.toLowerCase().endsWith(ext))) {
187
187
  if (verbose) {
188
- relinka("info", `Found file: ${fullPath}`);
188
+ relinka("log", `Found file: ${fullPath}`);
189
189
  }
190
190
  found.push(fullPath);
191
191
  }
@@ -275,21 +275,21 @@ function guessStarImportIdentifier(filePath) {
275
275
  return identifier || "file";
276
276
  }
277
277
  export function printUsage(isDev) {
278
- relinka("info", "====================");
279
- relinka("info", "TOOLS USAGE EXAMPLES");
280
- relinka("info", "====================");
278
+ relinka("log", "====================");
279
+ relinka("log", "TOOLS USAGE EXAMPLES");
280
+ relinka("log", "====================");
281
281
  relinka(
282
- "info",
282
+ "log",
283
283
  `${isDev ? "bun dev:agg" : "dler tools"} --tool agg --input <dir> --out <file> [options]`
284
284
  );
285
285
  if (isDev) {
286
286
  relinka(
287
- "info",
287
+ "log",
288
288
  "bun dev:tools agg --input src/libs/sdk/sdk-impl --out src/libs/sdk/sdk-mod.ts --recursive --named --strip src/libs/sdk"
289
289
  );
290
290
  } else {
291
291
  relinka(
292
- "info",
292
+ "log",
293
293
  "dler tools --tool agg --input src/libs --out aggregator.ts --recursive --named"
294
294
  );
295
295
  }
@@ -60,7 +60,7 @@ const tools = defineCommand()
60
60
  }
61
61
  if (!TOOLS.includes(args.tool as string)) {
62
62
  relinka("error", `Error: Invalid tool: ${args.tool}`);
63
- relinka("info", `Available tools: ${TOOLS.join(", ")}`);
63
+ relinka("log", `Available tools: ${TOOLS.join(", ")}`);
64
64
  printUsage(isDev);
65
65
  process.exit(1);
66
66
  }
package/bin/cli.js CHANGED
@@ -10,7 +10,7 @@ import { handleDlerError } from "./libs/sdk/sdk-impl/utils/utils-error.js";
10
10
  import { finalizeBuild } from "./libs/sdk/sdk-impl/utils/utils-info.js";
11
11
  import { createPerfTimer } from "./libs/sdk/sdk-impl/utils/utils-perf.js";
12
12
  import { loadConfig } from "./load.js";
13
- export async function dler(isDev) {
13
+ export async function dlerBuild(isDev) {
14
14
  const timer = createPerfTimer();
15
15
  try {
16
16
  const config = await loadConfig();
@@ -18,7 +18,7 @@ export async function dler(isDev) {
18
18
  config.commonPubPause = true;
19
19
  config.bumpDisable = true;
20
20
  relinka(
21
- "info",
21
+ "log",
22
22
  "Development mode: Publishing paused and version bumping disabled."
23
23
  );
24
24
  }
@@ -67,7 +67,108 @@ export async function dler(isDev) {
67
67
  config.transpileStub,
68
68
  config.transpileWatch,
69
69
  config.distJsrGenTsconfig,
70
- config.coreDeclarations
70
+ config.coreDeclarations,
71
+ { coreDescription: config.coreDescription }
72
+ );
73
+ await processLibraryFlow(
74
+ timer,
75
+ isDev,
76
+ config.libsActMode,
77
+ config.libsList,
78
+ config.distJsrDryRun,
79
+ config.distJsrFailOnWarn,
80
+ config.libsDirDist,
81
+ config.libsDirSrc,
82
+ config.commonPubPause,
83
+ config.commonPubRegistry,
84
+ config.distNpmOutFilesExt,
85
+ config.distNpmBuilder,
86
+ config.coreEntrySrcDir,
87
+ config.rmDepsMode,
88
+ config.rmDepsPatterns,
89
+ config.transpileEsbuild,
90
+ config.transpileTarget,
91
+ config.transpileFormat,
92
+ config.transpileSplitting,
93
+ config.transpileSourcemap,
94
+ config.transpilePublicPath,
95
+ config.distJsrBuilder,
96
+ config.transpileStub,
97
+ config.transpileWatch,
98
+ config.distJsrOutFilesExt
99
+ );
100
+ await finalizeBuild(
101
+ timer,
102
+ config.commonPubPause,
103
+ config.libsList,
104
+ config.distNpmDirName,
105
+ config.distJsrDirName,
106
+ config.libsDirDist,
107
+ isDev
108
+ );
109
+ } catch (error) {
110
+ handleDlerError(error, timer);
111
+ }
112
+ }
113
+ export async function dlerPub(isDev) {
114
+ const timer = createPerfTimer();
115
+ try {
116
+ const config = await loadConfig();
117
+ if (isDev) {
118
+ config.commonPubPause = true;
119
+ config.bumpDisable = true;
120
+ relinka(
121
+ "log",
122
+ "Development mode: Publishing paused and version bumping disabled."
123
+ );
124
+ }
125
+ if (config.logsFreshFile) {
126
+ await fs.remove(path.join(PROJECT_ROOT, config.logsFileName));
127
+ }
128
+ await removeDistFolders(
129
+ config.distNpmDirName,
130
+ config.distJsrDirName,
131
+ config.libsDirDist,
132
+ config.libsList
133
+ );
134
+ if (!config.bumpDisable) {
135
+ await bumpHandler(
136
+ config.bumpMode,
137
+ config.bumpDisable,
138
+ config.commonPubPause,
139
+ config.bumpFilter
140
+ );
141
+ }
142
+ await processRegularFlow(
143
+ timer,
144
+ isDev,
145
+ config.coreIsCLI,
146
+ config.libsActMode,
147
+ config.commonPubRegistry,
148
+ config.coreEntrySrcDir,
149
+ config.distNpmDirName,
150
+ config.distNpmBuilder,
151
+ config.coreEntryFile,
152
+ config.distJsrDryRun,
153
+ config.distJsrFailOnWarn,
154
+ config.commonPubPause,
155
+ config.distJsrDirName,
156
+ config.distJsrBuilder,
157
+ config.transpileTarget,
158
+ config.transpileFormat,
159
+ config.transpileSplitting,
160
+ config.transpileMinify,
161
+ config.transpileSourcemap,
162
+ config.transpilePublicPath,
163
+ config.distJsrAllowDirty,
164
+ config.distJsrSlowTypes,
165
+ config.distNpmOutFilesExt,
166
+ config.rmDepsMode,
167
+ config.transpileStub,
168
+ config.transpileWatch,
169
+ config.distJsrGenTsconfig,
170
+ config.coreDeclarations,
171
+ { coreDescription: config.coreDescription }
71
172
  );
72
173
  await processLibraryFlow(
73
174
  timer,