@reliverse/dler 1.7.86 → 1.7.88

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 (52) hide show
  1. package/README.md +1 -1
  2. package/bin/app/build/postbuild.js +1 -1
  3. package/bin/app/build/ppb-utils.js +1 -1
  4. package/bin/app/build/prebuild.js +1 -1
  5. package/bin/app/catalog/cmd.js +1 -1
  6. package/bin/app/create/cmd.js +5 -5
  7. package/bin/app/fs/cmd.js +6 -6
  8. package/bin/app/init/cmd.js +1 -1
  9. package/bin/app/install/cmd.js +1 -1
  10. package/bin/app/libs/cmd.js +2 -2
  11. package/bin/app/merge/cmd.js +2 -2
  12. package/bin/app/migrate/cmd.js +46 -43
  13. package/bin/app/migrate/codemods/anything-bun.js +25 -25
  14. package/bin/app/migrate/codemods/console-relinka.js +1 -1
  15. package/bin/app/pack/cmd.js +7 -7
  16. package/bin/app/remove/cmd.js +1 -1
  17. package/bin/app/rempts/cmd.js +4 -4
  18. package/bin/app/update/cmd.js +20 -22
  19. package/bin/app/upgrade/cmd.js +10 -4
  20. package/bin/app/x/cmd.js +6 -6
  21. package/bin/libs/cfg/cfg-impl/cfg-dler.d.ts +116 -0
  22. package/bin/libs/cfg/cfg-impl/cfg-dler.js +76 -1
  23. package/bin/libs/get/get-impl/get-core.js +19 -16
  24. package/bin/libs/sdk/sdk-impl/build/build-library.js +6 -6
  25. package/bin/libs/sdk/sdk-impl/build/build-regular.js +4 -4
  26. package/bin/libs/sdk/sdk-impl/build/providers/build.js +3 -3
  27. package/bin/libs/sdk/sdk-impl/build/providers/rollup/watch.js +2 -2
  28. package/bin/libs/sdk/sdk-impl/config/default.js +76 -1
  29. package/bin/libs/sdk/sdk-impl/config/info.js +1 -1
  30. package/bin/libs/sdk/sdk-impl/config/load.js +1 -1
  31. package/bin/libs/sdk/sdk-impl/config/prepare.js +4 -4
  32. package/bin/libs/sdk/sdk-impl/config/types.d.ts +115 -0
  33. package/bin/libs/sdk/sdk-impl/library-flow.js +3 -3
  34. package/bin/libs/sdk/sdk-impl/magic/magic-apply.js +9 -9
  35. package/bin/libs/sdk/sdk-impl/pub/pub-library.js +5 -5
  36. package/bin/libs/sdk/sdk-impl/pub/pub-regular.js +10 -4
  37. package/bin/libs/sdk/sdk-impl/regular-flow.js +8 -8
  38. package/bin/libs/sdk/sdk-impl/utils/agg/agg-1.js +5 -3
  39. package/bin/libs/sdk/sdk-impl/utils/agg/agg-2.js +1 -1
  40. package/bin/libs/sdk/sdk-impl/utils/agg/agg-3.js +7 -7
  41. package/bin/libs/sdk/sdk-impl/utils/fs-rename.js +10 -10
  42. package/bin/libs/sdk/sdk-impl/utils/init/init-impl.js +1 -1
  43. package/bin/libs/sdk/sdk-impl/utils/pm/pm-catalog.js +4 -4
  44. package/bin/libs/sdk/sdk-impl/utils/resolve-cross-libs.js +24 -15
  45. package/bin/libs/sdk/sdk-impl/utils/utils-build.js +1 -1
  46. package/bin/libs/sdk/sdk-impl/utils/utils-clean.js +1 -1
  47. package/bin/libs/sdk/sdk-impl/utils/utils-error-cwd.js +2 -2
  48. package/bin/libs/sdk/sdk-impl/utils/utils-fs.js +1 -1
  49. package/bin/libs/sdk/sdk-impl/utils/utils-package-json-libraries.js +1 -1
  50. package/bin/libs/sdk/sdk-impl/utils/utils-package-json-regular.js +1 -1
  51. package/bin/libs/sdk/sdk-mod.d.ts +1 -1
  52. package/package.json +2 -2
@@ -334,7 +334,7 @@ async function updatePackageJsonFile(packageJsonPath, dependencies, updatesToApp
334
334
  }
335
335
  async function updateWorkspacePackages(workspacePaths, args, options) {
336
336
  if (workspacePaths.length === 0) return 0;
337
- relinka("info", `Scanning ${workspacePaths.length} workspace packages...`);
337
+ relinka("log", `Scanning ${workspacePaths.length} workspace packages...`);
338
338
  let totalWorkspaceUpdated = 0;
339
339
  for (const packageJsonPath of workspacePaths) {
340
340
  try {
@@ -392,13 +392,13 @@ function displayUpdateResults(results) {
392
392
  }
393
393
  }
394
394
  if (upToDate.length > 0) {
395
- relinka("success", `${upToDate.length} dependencies are up to date`);
395
+ relinka("log", `${upToDate.length} deps are already up to date`);
396
396
  }
397
397
  if (toUpdate.length === 0) {
398
- relinka("success", `All ${upToDate.length} deps are already up to date`);
398
+ relinka("verbose", `All ${upToDate.length} deps are already up to date`);
399
399
  return;
400
400
  }
401
- relinka("info", `${toUpdate.length} dependencies can be updated:`);
401
+ relinka("log", `${toUpdate.length} deps can be updated:`);
402
402
  const byLocation = /* @__PURE__ */ new Map();
403
403
  for (const update of toUpdate) {
404
404
  const location = update.location || "unknown";
@@ -551,7 +551,7 @@ async function handleGlobalUpdates(args) {
551
551
  relinka("error", "No supported package managers found");
552
552
  return process.exit(1);
553
553
  }
554
- relinka("info", `Found package managers: ${availablePackageManagers.join(", ")}`);
554
+ relinka("log", `Found package managers: ${availablePackageManagers.join(", ")}`);
555
555
  const allGlobalPackages = {};
556
556
  for (const pm of availablePackageManagers) {
557
557
  const packages = await getGlobalPackages(pm);
@@ -581,7 +581,7 @@ async function handleGlobalUpdates(args) {
581
581
  relinka("warn", "No global packages to update");
582
582
  return;
583
583
  }
584
- relinka("info", `Checking ${filteredPackages.length} global packages for updates...`);
584
+ relinka("log", `Checking ${filteredPackages.length} global packages for updates...`);
585
585
  const results = await pMap(
586
586
  filteredPackages,
587
587
  async (packageName) => {
@@ -629,13 +629,13 @@ async function handleGlobalUpdates(args) {
629
629
  }
630
630
  }
631
631
  if (upToDate.length > 0) {
632
- relinka("success", `${upToDate.length} global packages are up to date`);
632
+ relinka("log", `${upToDate.length} global packages are up to date`);
633
633
  }
634
634
  if (toUpdate.length === 0) {
635
- relinka("success", "All global packages are up to date");
635
+ relinka("log", "All global packages are up to date");
636
636
  return;
637
637
  }
638
- relinka("info", `${toUpdate.length} global packages can be updated:`);
638
+ relinka("log", `${toUpdate.length} global packages can be updated:`);
639
639
  for (const update of toUpdate) {
640
640
  relinka(
641
641
  "log",
@@ -671,15 +671,15 @@ async function handleGlobalUpdates(args) {
671
671
  ]
672
672
  });
673
673
  if (selectedPackages.length === 0 || selectedPackages.includes("exit")) {
674
- relinka("info", "Exiting global update process");
674
+ relinka("log", "Exiting global update process");
675
675
  return;
676
676
  }
677
677
  const actualSelectedPackages = selectedPackages.filter((pkg) => pkg !== "exit");
678
678
  toUpdate = toUpdate.filter((update) => actualSelectedPackages.includes(update.package));
679
- relinka("info", `Updating ${actualSelectedPackages.length} selected global packages...`);
679
+ relinka("log", `Updating ${actualSelectedPackages.length} selected global packages...`);
680
680
  }
681
681
  if (args["dry-run"]) {
682
- relinka("info", "Dry run mode - no changes were made");
682
+ relinka("log", "Dry run mode - no changes were made");
683
683
  return;
684
684
  }
685
685
  let successCount = 0;
@@ -689,7 +689,7 @@ async function handleGlobalUpdates(args) {
689
689
  successCount++;
690
690
  }
691
691
  }
692
- relinka("success", `Successfully updated ${successCount}/${toUpdate.length} global packages`);
692
+ relinka("log", `Successfully updated ${successCount}/${toUpdate.length} global packages`);
693
693
  }
694
694
  export default defineCommand({
695
695
  meta: {
@@ -931,15 +931,15 @@ export default defineCommand({
931
931
  ]
932
932
  });
933
933
  if (selectedPackages.length === 0 || selectedPackages.includes("exit")) {
934
- relinka("info", "Exiting update process");
934
+ relinka("log", "Exiting update process");
935
935
  return;
936
936
  }
937
937
  const actualSelectedPackages = selectedPackages.filter((pkg) => pkg !== "exit");
938
938
  toUpdate = toUpdate.filter((update) => actualSelectedPackages.includes(update.package));
939
- relinka("info", `Updating ${actualSelectedPackages.length} selected dependencies...`);
939
+ relinka("log", `Updating ${actualSelectedPackages.length} selected dependencies...`);
940
940
  }
941
941
  if (args["dry-run"]) {
942
- relinka("info", "Dry run mode - no changes were made");
942
+ relinka("log", "Dry run mode - no changes were made");
943
943
  return;
944
944
  }
945
945
  const rootUpdated = await updatePackageJsonFile(
@@ -960,8 +960,6 @@ export default defineCommand({
960
960
  );
961
961
  const recursiveUpdated = await updateWorkspacePackages(otherPackageJsons, args, options);
962
962
  totalUpdated += recursiveUpdated;
963
- } else {
964
- relinka("info", "No additional package.json files found for recursive update");
965
963
  }
966
964
  } else {
967
965
  const isMonorepoProject = await isMonorepo(process.cwd());
@@ -979,7 +977,7 @@ export default defineCommand({
979
977
  relinka("warn", "No workspace packages found but --all-workspaces flag was provided");
980
978
  }
981
979
  } else if (isMonorepoProject) {
982
- relinka("info", "Skipping workspace packages due to --root-only flag");
980
+ relinka("log", "Skipping workspace packages due to --root-only flag");
983
981
  }
984
982
  }
985
983
  if (args.recursive) {
@@ -997,9 +995,9 @@ export default defineCommand({
997
995
  `Updated ${totalUpdated} dependencies across workspace (root + workspaces)`
998
996
  );
999
997
  } else if (isMonorepoProject) {
1000
- relinka("success", `Updated ${totalUpdated} dependencies in root package.json only`);
998
+ relinka("log", `Updated ${totalUpdated} dependencies in root package.json only`);
1001
999
  } else {
1002
- relinka("success", `Updated ${totalUpdated} dependencies`);
1000
+ relinka("log", `Updated ${totalUpdated} dependencies`);
1003
1001
  }
1004
1002
  }
1005
1003
  const packageManager = await detectPackageManager(process.cwd());
@@ -1027,7 +1025,7 @@ export default defineCommand({
1027
1025
  "warn",
1028
1026
  `Install failed: ${error instanceof Error ? error.message : String(error)}`
1029
1027
  );
1030
- relinka("info", `Run '${packageManager.command} install' manually to apply the changes`);
1028
+ relinka("log", `Run '${packageManager.command} install' manually to apply the changes`);
1031
1029
  }
1032
1030
  } else {
1033
1031
  relinka("warn", "Could not detect package manager. Please run install manually.");
@@ -90,19 +90,25 @@ export default defineCommand({
90
90
  const errors = results.filter((r) => r.status === "error");
91
91
  if (upgraded.length > 0) {
92
92
  relinka("success", `Upgraded ${upgraded.length} tools:`);
93
- upgraded.forEach((r) => relinka("log", ` \u2713 ${r.tool}${r.message ? ` - ${r.message}` : ""}`));
93
+ upgraded.forEach(
94
+ (r) => relinka("verbose", ` \u2713 ${r.tool}${r.message ? ` - ${r.message}` : ""}`)
95
+ );
94
96
  }
95
97
  if (upToDate.length > 0) {
96
98
  relinka("info", `${upToDate.length} tools already up-to-date:`);
97
- upToDate.forEach((r) => relinka("log", ` \u2022 ${r.tool}${r.message ? ` - ${r.message}` : ""}`));
99
+ upToDate.forEach(
100
+ (r) => relinka("verbose", ` \u2022 ${r.tool}${r.message ? ` - ${r.message}` : ""}`)
101
+ );
98
102
  }
99
103
  if (notFound.length > 0) {
100
104
  relinka("warn", `${notFound.length} tools not installed (skipped):`);
101
- notFound.forEach((r) => relinka("log", ` - ${r.tool}`));
105
+ notFound.forEach((r) => relinka("verbose", ` - ${r.tool}`));
102
106
  }
103
107
  if (errors.length > 0) {
104
108
  relinka("error", `${errors.length} tools had errors:`);
105
- errors.forEach((r) => relinka("log", ` \u2717 ${r.tool}${r.message ? ` - ${r.message}` : ""}`));
109
+ errors.forEach(
110
+ (r) => relinka("verbose", ` \u2717 ${r.tool}${r.message ? ` - ${r.message}` : ""}`)
111
+ );
106
112
  }
107
113
  relinka("success", "Upgrade check completed!");
108
114
  }
package/bin/app/x/cmd.js CHANGED
@@ -117,7 +117,7 @@ export default defineCommand({
117
117
  relinka.error(`Cannot detect package manager in \`${cwd}\``);
118
118
  return process.exit(1);
119
119
  }
120
- relinka.log(
120
+ relinka.verbose(
121
121
  `Detected package manager in \`${cwd}\`: \`${packageManager.name}@${packageManager.version}\``
122
122
  );
123
123
  break;
@@ -143,7 +143,7 @@ export default defineCommand({
143
143
  relinka.error("No command provided");
144
144
  return process.exit(1);
145
145
  }
146
- relinka.log(`Executing: ${target}`);
146
+ relinka.verbose(`Executing: ${target}`);
147
147
  const result = x(command, commandArgs, {
148
148
  nodeOptions: {
149
149
  cwd: options.cwd ? path.resolve(options.cwd) : process.cwd(),
@@ -172,7 +172,7 @@ export default defineCommand({
172
172
  }
173
173
  default: {
174
174
  relinka.error(`Unknown action: ${action}`);
175
- relinka.log("Available actions: detect, run, exec, or package name to run directly");
175
+ relinka.verbose("Available actions: detect, run, exec, or package name to run directly");
176
176
  return process.exit(1);
177
177
  }
178
178
  }
@@ -200,7 +200,7 @@ async function runPackage({
200
200
  }
201
201
  if (forcedPmFlags.length === 1) {
202
202
  pmName = forcedPmFlags[0][0];
203
- relinka.log(`Forcing package manager: ${pmName}`);
203
+ relinka.verbose(`Forcing package manager: ${pmName}`);
204
204
  } else {
205
205
  const packageManager = await detectPackageManager(workingDir);
206
206
  if (!packageManager) {
@@ -236,8 +236,8 @@ async function runPackage({
236
236
  }
237
237
  runCommand.push(packageName);
238
238
  runCommand.push(...packageArgs);
239
- relinka.log(`Running package: ${packageName}`);
240
- relinka.log(`Using command: ${runCommand.join(" ")}`);
239
+ relinka.verbose(`Running package: ${packageName}`);
240
+ relinka.verbose(`Using command: ${runCommand.join(" ")}`);
241
241
  const result = x(runCommand[0], runCommand.slice(1), {
242
242
  nodeOptions: {
243
243
  cwd: workingDir,
@@ -1,3 +1,111 @@
1
+ /** Configuration for directory-related settings. */
2
+ export interface RelinkaDirsConfig {
3
+ maxLogFiles?: number;
4
+ }
5
+ /** Log level types used by the logger. */
6
+ export type LogLevel = "error" | "fatal" | "info" | "success" | "verbose" | "warn" | "log" | "internal" | "null" | "step" | "box" | "message";
7
+ /** Configuration for a single log level. */
8
+ export interface LogLevelConfig {
9
+ /**
10
+ * Symbol to display for this log level.
11
+ * @see https://symbl.cc
12
+ */
13
+ symbol: string;
14
+ /**
15
+ * Fallback symbol to use if Unicode is not supported.
16
+ */
17
+ fallbackSymbol: string;
18
+ /**
19
+ * Color to use for this log level.
20
+ */
21
+ color: string;
22
+ /**
23
+ * Number of spaces after the symbol/fallback
24
+ */
25
+ spacing?: number;
26
+ }
27
+ /** Configuration for all log levels. */
28
+ export type LogLevelsConfig = Partial<Record<LogLevel, LogLevelConfig>>;
29
+ /**
30
+ * Configuration options for the Relinka logger.
31
+ * All properties are optional to allow for partial configuration.
32
+ * Defaults will be applied during initialization.
33
+ */
34
+ export interface RelinkaConfig {
35
+ /**
36
+ * Enables verbose (aka debug) mode for detailed logging.
37
+ *
38
+ * `true` here works only for end-users of CLIs/libs when theirs developers
39
+ * has been awaited for user's config via `@reliverse/relinka`'s `await relinkaConfig;`
40
+ */
41
+ verbose?: boolean;
42
+ /**
43
+ * Configuration for directory-related settings.
44
+ * - `maxLogFiles`: The maximum number of log files to keep before cleanup.
45
+ */
46
+ dirs?: RelinkaDirsConfig;
47
+ /**
48
+ * Disables color output in the console.
49
+ */
50
+ disableColors?: boolean;
51
+ /**
52
+ * Configuration for log file output.
53
+ */
54
+ logFile?: {
55
+ /**
56
+ * Path to the log file.
57
+ */
58
+ outputPath?: string;
59
+ /**
60
+ * How to handle date in the filename.
61
+ * - `disable`: No date prefix/suffix
62
+ * - `append-before`: Add date before the filename (e.g., "2024-01-15-log.txt")
63
+ * - `append-after`: Add date after the filename (e.g., "log-2024-01-15.txt")
64
+ */
65
+ nameWithDate?: "disable" | "append-before" | "append-after";
66
+ /**
67
+ * If true, clears the log file when relinkaConfig is executed with supportFreshLogFile: true.
68
+ * This is useful for starting with a clean log file on each run.
69
+ */
70
+ freshLogFile?: boolean;
71
+ };
72
+ /**
73
+ * If true, logs will be saved to a file.
74
+ */
75
+ saveLogsToFile?: boolean;
76
+ /**
77
+ * Configuration for timestamp in log messages.
78
+ */
79
+ timestamp?: {
80
+ /**
81
+ * If true, timestamps will be added to log messages.
82
+ */
83
+ enabled: boolean;
84
+ /**
85
+ * The format for timestamps. Default is YYYY-MM-DD HH:mm:ss.SSS
86
+ */
87
+ format?: string;
88
+ };
89
+ /**
90
+ * Allows to customize the log levels.
91
+ */
92
+ levels?: LogLevelsConfig;
93
+ /**
94
+ * Controls how often the log cleanup runs (in milliseconds)
95
+ * Default: 10000 (10 seconds)
96
+ */
97
+ cleanupInterval?: number;
98
+ /**
99
+ * Maximum size of the log write buffer before flushing to disk (in bytes)
100
+ * Default: 4096 (4KB)
101
+ */
102
+ bufferSize?: number;
103
+ /**
104
+ * Maximum time to hold logs in buffer before flushing to disk (in milliseconds)
105
+ * Default: 5000 (5 seconds)
106
+ */
107
+ maxBufferAge?: number;
108
+ }
1
109
  /**
2
110
  * Defines the configuration for building and publishing packages. This includes: versioning,
3
111
  * build settings, publishing options, libraries-dler-plugin built-in plugin, and more.
@@ -504,6 +612,13 @@ export interface DlerConfig {
504
612
  * @default "templates"
505
613
  */
506
614
  buildTemplatesDir: string;
615
+ /**
616
+ * Integrated relinka logger configuration.
617
+ * @see https://github.com/reliverse/relinka
618
+ *
619
+ * @default See DEFAULT_RELINKA_CONFIG in defaults
620
+ */
621
+ relinka: RelinkaConfig;
507
622
  }
508
623
  export type BumpMode = "patch" | "minor" | "major" | "auto" | "manual";
509
624
  /**
@@ -693,4 +808,5 @@ export declare const defineConfig: (userConfig?: Partial<DlerConfig>) => {
693
808
  };
694
809
  buildPreExtensions: string[];
695
810
  buildTemplatesDir: string;
811
+ relinka: RelinkaConfig;
696
812
  };
@@ -79,7 +79,82 @@ export const DEFAULT_CONFIG_DLER = {
79
79
  buildPreExtensions: ["ts", "js"],
80
80
  // If you need to exclude some ts/js files from being built,
81
81
  // you can store them in the dirs with buildTemplatesDir name
82
- buildTemplatesDir: "templates"
82
+ buildTemplatesDir: "templates",
83
+ // Integrated relinka logger configuration
84
+ relinka: {
85
+ verbose: false,
86
+ dirs: {
87
+ maxLogFiles: 5
88
+ },
89
+ disableColors: false,
90
+ logFile: {
91
+ outputPath: "logs.log",
92
+ nameWithDate: "disable",
93
+ freshLogFile: true
94
+ },
95
+ saveLogsToFile: true,
96
+ timestamp: {
97
+ enabled: false,
98
+ format: "HH:mm:ss"
99
+ },
100
+ cleanupInterval: 1e4,
101
+ // 10 seconds
102
+ bufferSize: 4096,
103
+ // 4KB
104
+ maxBufferAge: 5e3,
105
+ // 5 seconds
106
+ levels: {
107
+ success: {
108
+ symbol: "\u2713",
109
+ fallbackSymbol: "[OK]",
110
+ color: "greenBright",
111
+ spacing: 3
112
+ },
113
+ info: {
114
+ symbol: "i",
115
+ fallbackSymbol: "[i]",
116
+ color: "cyanBright",
117
+ spacing: 3
118
+ },
119
+ error: {
120
+ symbol: "\u2716",
121
+ fallbackSymbol: "[ERR]",
122
+ color: "redBright",
123
+ spacing: 3
124
+ },
125
+ warn: {
126
+ symbol: "\u26A0",
127
+ fallbackSymbol: "[WARN]",
128
+ color: "yellowBright",
129
+ spacing: 3
130
+ },
131
+ fatal: {
132
+ symbol: "\u203C",
133
+ fallbackSymbol: "[FATAL]",
134
+ color: "redBright",
135
+ spacing: 3
136
+ },
137
+ verbose: {
138
+ symbol: "\u2727",
139
+ fallbackSymbol: "[VERBOSE]",
140
+ color: "gray",
141
+ spacing: 3
142
+ },
143
+ internal: {
144
+ symbol: "\u2699",
145
+ fallbackSymbol: "[INTERNAL]",
146
+ color: "magentaBright",
147
+ spacing: 3
148
+ },
149
+ log: { symbol: "\u2502", fallbackSymbol: "|", color: "dim", spacing: 3 },
150
+ message: {
151
+ symbol: "\u{1F7A0}",
152
+ fallbackSymbol: "[MSG]",
153
+ color: "cyan",
154
+ spacing: 3
155
+ }
156
+ }
157
+ }
83
158
  };
84
159
  export const defineConfig = (userConfig = {}) => {
85
160
  return { ...DEFAULT_CONFIG_DLER, ...userConfig };
@@ -24,8 +24,8 @@ export async function installDlerStandalone(installDir, appsPath, args) {
24
24
  const binaryPath = path.resolve(installDir, binaryInfo.localName);
25
25
  if (args["dry-run"]) {
26
26
  relinka("info", "Dry run mode - would download:");
27
- relinka("log", ` From: ${downloadUrl}`);
28
- relinka("log", ` To: ${binaryPath}`);
27
+ relinka("verbose", ` From: ${downloadUrl}`);
28
+ relinka("verbose", ` To: ${binaryPath}`);
29
29
  return;
30
30
  }
31
31
  await downloadBinary(downloadUrl, binaryPath);
@@ -54,7 +54,7 @@ export async function installFromGitHub(repoUrl, installDir, appsPath, args) {
54
54
  const asset = findBinaryAsset(release.assets, args.binary);
55
55
  if (!asset) {
56
56
  relinka("error", "Available assets:");
57
- release.assets.forEach((a) => relinka("log", ` - ${a.name}`));
57
+ release.assets.forEach((a) => relinka("verbose", ` - ${a.name}`));
58
58
  throw new Error(`No suitable binary found for your platform`);
59
59
  }
60
60
  const binaryName = args.binary || asset.name;
@@ -62,9 +62,9 @@ export async function installFromGitHub(repoUrl, installDir, appsPath, args) {
62
62
  const binaryKey = path.basename(binaryName, path.extname(binaryName));
63
63
  if (args["dry-run"]) {
64
64
  relinka("info", "Dry run mode - would download:");
65
- relinka("log", ` Asset: ${asset.name}`);
66
- relinka("log", ` From: ${asset.browser_download_url}`);
67
- relinka("log", ` To: ${binaryPath}`);
65
+ relinka("verbose", ` Asset: ${asset.name}`);
66
+ relinka("verbose", ` From: ${asset.browser_download_url}`);
67
+ relinka("verbose", ` To: ${binaryPath}`);
68
68
  return;
69
69
  }
70
70
  await downloadBinary(asset.browser_download_url, binaryPath);
@@ -184,15 +184,18 @@ export async function checkPowerShellVersion() {
184
184
  const isVersionValid = major > 7 || major === 7 && minor >= 5;
185
185
  if (!isVersionValid) {
186
186
  relinka("error", "\u274C PowerShell 7.5+ is required for dler installation on Windows");
187
- relinka("log", ` Current version: ${versionString}`);
188
- relinka("log", ` Required version: 7.5.0 or higher`);
189
- relinka("log", "");
187
+ relinka("verbose", ` Current version: ${versionString}`);
188
+ relinka("verbose", ` Required version: 7.5.0 or higher`);
189
+ relinka("verbose", "");
190
190
  relinka("info", "\u{1F527} To install PowerShell 7.5+:");
191
- relinka("log", " \u2022 Visit: https://github.com/PowerShell/PowerShell/releases");
192
- relinka("log", " \u2022 Or use Windows Package Manager: winget install Microsoft.PowerShell");
193
- relinka("log", " \u2022 Or use Chocolatey: choco install powershell-core");
194
- relinka("log", " \u2022 Or use Scoop: scoop install pwsh");
195
- relinka("log", "");
191
+ relinka("verbose", " \u2022 Visit: https://github.com/PowerShell/PowerShell/releases");
192
+ relinka(
193
+ "verbose",
194
+ " \u2022 Or use Windows Package Manager: winget install Microsoft.PowerShell"
195
+ );
196
+ relinka("verbose", " \u2022 Or use Chocolatey: choco install powershell-core");
197
+ relinka("verbose", " \u2022 Or use Scoop: scoop install pwsh");
198
+ relinka("verbose", "");
196
199
  relinka("info", "After installation, restart your terminal and try again.");
197
200
  process.exit(1);
198
201
  }
@@ -261,7 +264,7 @@ async function checkGlobalDlerConflicts(force) {
261
264
  });
262
265
  relinka("warn", "\n\u{1F527} To avoid conflicts, please remove the global installation(s) first:");
263
266
  conflicts.forEach((conflict) => {
264
- relinka("log", ` ${conflict.command}`);
267
+ relinka("verbose", ` ${conflict.command}`);
265
268
  });
266
269
  relinka(
267
270
  "info",
@@ -417,7 +420,7 @@ async function ensureInPath(installDir) {
417
420
  } catch (error) {
418
421
  relinka("warn", `Failed to automatically modify PATH: ${error}`);
419
422
  relinka("warn", "Please add manually:");
420
- relinka("log", `Add ${installDir} to your PATH environment variable`);
423
+ relinka("verbose", `Add ${installDir} to your PATH environment variable`);
421
424
  relinka(
422
425
  "log",
423
426
  "You can do this through Environment Variables > System Properties > Path > Edit"
@@ -44,7 +44,7 @@ export async function library_buildLibrary(options) {
44
44
  }
45
45
  async function executeBuildTasks(options) {
46
46
  const { libName, npm, jsr, effectivePubRegistry } = options;
47
- relinka("log", `Executing build tasks for ${libName} (Registry: ${effectivePubRegistry})...`);
47
+ relinka("verbose", `Executing build tasks for ${libName} (Registry: ${effectivePubRegistry})...`);
48
48
  const buildTasks = [];
49
49
  if (effectivePubRegistry === "jsr" || effectivePubRegistry === "npm-jsr") {
50
50
  if (!jsr) {
@@ -79,7 +79,7 @@ async function library_buildJsrDist(options) {
79
79
  const jsrOptions = options.jsr;
80
80
  const { jsrOutDir, distJsrBuilder, distJsrOutFilesExt } = jsrOptions;
81
81
  const targetType = "jsr";
82
- relinka("log", `[JSR] Initializing JSR build for ${libName}...`);
82
+ relinka("verbose", `[JSR] Initializing JSR build for ${libName}...`);
83
83
  const libSourceDirResolved = path.resolve(PROJECT_ROOT, options.mainDir);
84
84
  const entryFilePathResolved = path.resolve(libSourceDirResolved, libMainFile);
85
85
  const outputDirRootResolved = path.resolve(PROJECT_ROOT, jsrOutDir);
@@ -139,7 +139,7 @@ async function library_buildNpmDist(options) {
139
139
  const distJsrOutFilesExt = options.jsr?.distJsrOutFilesExt || "ts";
140
140
  const targetType = "npm";
141
141
  const distName = determineDistName(npmOutDir, false, libsList);
142
- relinka("log", `[NPM:${distName}] Initializing NPM build for ${libName}...`);
142
+ relinka("verbose", `[NPM:${distName}] Initializing NPM build for ${libName}...`);
143
143
  const outputDirRootResolved = path.resolve(PROJECT_ROOT, npmOutDir);
144
144
  const outputDirBinResolved = path.resolve(outputDirRootResolved, BIN_DIR_NAME);
145
145
  await fs.ensureDir(outputDirRootResolved);
@@ -216,10 +216,10 @@ async function library_buildDistributionTarget(params) {
216
216
  } = options;
217
217
  const isJsr = targetType === "jsr";
218
218
  const logPrefix = isJsr ? "[JSR]" : `[NPM:${determineDistName(path.relative(PROJECT_ROOT, outputDirRoot), false, libsList)}]`;
219
- relinka("log", `${logPrefix} Starting build target processing...`);
219
+ relinka("verbose", `${logPrefix} Starting build target processing...`);
220
220
  await fs.ensureDir(outputDirRoot);
221
221
  await fs.ensureDir(outputDirBin);
222
- relinka("log", `${logPrefix} Using builder: ${builder}`);
222
+ relinka("verbose", `${logPrefix} Using builder: ${builder}`);
223
223
  const bundleRequest = {
224
224
  builder,
225
225
  entryPoint: entryFilePath,
@@ -256,7 +256,7 @@ async function library_buildDistributionTarget(params) {
256
256
  effectivePubRegistry: options.effectivePubRegistry
257
257
  };
258
258
  await library_performCommonBuildSteps(commonStepsParams);
259
- relinka("log", `${logPrefix} Completed build target processing.`);
259
+ relinka("verbose", `${logPrefix} Completed build target processing.`);
260
260
  }
261
261
  async function library_bundleWithBuilder(params) {
262
262
  const { builder, ...executorParams } = params;
@@ -24,7 +24,7 @@ export async function regular_buildJsrDist(isDev, isJsr, coreIsCLI, coreEntrySrc
24
24
  const outDirBin = path.join(outDirRoot, config.coreBuildOutDir || "bin");
25
25
  const singleFile = path.join(process.cwd(), coreEntrySrcDir, coreEntryFile);
26
26
  const srcDir = path.join(process.cwd(), coreEntrySrcDir);
27
- relinka("log", `Building JSR distribution (isDev=${isDev}, isJsr=${isJsr})...`);
27
+ relinka("verbose", `Building JSR distribution (isDev=${isDev}, isJsr=${isJsr})...`);
28
28
  try {
29
29
  await fs.ensureDir(outDirBin);
30
30
  await regular_bundleWithBuilder(distJsrBuilder, {
@@ -90,7 +90,7 @@ export async function regular_buildNpmDist(isDev, coreIsCLI, coreEntrySrcDir, di
90
90
  const outDirBin = path.join(outDirRoot, config.coreBuildOutDir || "bin");
91
91
  const singleFile = path.join(process.cwd(), coreEntrySrcDir, coreEntryFile);
92
92
  const srcDir = path.join(process.cwd(), coreEntrySrcDir);
93
- relinka("log", `Building NPM distribution (isDev=${isDev})...`);
93
+ relinka("verbose", `Building NPM distribution (isDev=${isDev})...`);
94
94
  try {
95
95
  await fs.ensureDir(outDirBin);
96
96
  await regular_bundleWithBuilder(distNpmBuilder, {
@@ -187,7 +187,7 @@ async function regular_bundleUsingBun(coreEntryFile, outDirBin, transpileTarget,
187
187
  }
188
188
  }
189
189
  async function regular_bundleUsingJsr(src, dest) {
190
- relinka("log", `Starting regular_bundleUsingJsr: ${src} -> ${dest}`);
190
+ relinka("verbose", `Starting regular_bundleUsingJsr: ${src} -> ${dest}`);
191
191
  await fs.ensureDir(path.dirname(dest));
192
192
  const stats = await fs.stat(src);
193
193
  if (!stats.isDirectory()) {
@@ -331,7 +331,7 @@ async function regular_performCommonBuildSteps({
331
331
  coreDescription,
332
332
  coreBuildOutDir
333
333
  }) {
334
- relinka("log", `Performing common build steps in ${outDirBin} (regular)`);
334
+ relinka("verbose", `Performing common build steps in ${outDirBin} (regular)`);
335
335
  relinka(
336
336
  "info",
337
337
  `[${isJsr ? "dist-jsr" : "dist-npm"}] Performing alias path conversion in ${outDirBin}`
@@ -154,7 +154,7 @@ async function _build(rootDir, inputConfig, buildConfig, pkg, cleanedDirs, _tran
154
154
  isLib
155
155
  });
156
156
  shouldStopAtStep(5);
157
- relinka("log", "Build-specific configuration merged with defaults");
157
+ relinka("verbose", "Build-specific configuration merged with defaults");
158
158
  relinka("verbose", `Build options: clean=${options.clean}, parallel=${options.parallel}`);
159
159
  relinka("verbose", `Declaration files: ${options.declaration ? "enabled" : "disabled"}`);
160
160
  options.outDir = resolve(options.rootDir, options.outDir);
@@ -233,7 +233,7 @@ ${options.entries.map((entry) => ` ${dumpObject(entry)}`).join("\n ")}
233
233
  continue;
234
234
  }
235
235
  cleanedDirs.push(dir);
236
- relinka("log", `Cleaning dist directory: \`./${relative(process.cwd(), dir)}\``);
236
+ relinka("verbose", `Cleaning dist directory: \`./${relative(process.cwd(), dir)}\``);
237
237
  await rmdir(dir);
238
238
  await fsp.mkdir(dir, { recursive: true });
239
239
  }
@@ -315,7 +315,7 @@ ${entry.modules.filter((m) => m.id.includes("node_modules")).sort((a, b) => (b.b
315
315
  return ` \u{1F4E6} ${rPath(m.id)}${m.bytes ? ` (${prettyBytes(m.bytes)})` : ""}`;
316
316
  }).join("\n")}`;
317
317
  }
318
- relinka("log", entry.chunk ? line : line);
318
+ relinka("verbose", entry.chunk ? line : line);
319
319
  }
320
320
  const elapsedTime = getElapsedPerfTime(timer);
321
321
  const transpileFormattedTime = prettyMilliseconds(elapsedTime, {
@@ -17,10 +17,10 @@ export function rollupWatch(rollupOptions) {
17
17
  );
18
18
  relinka("warn", "[dler] [rollup] Watch mode is experimental and may be unstable");
19
19
  transpileWatcher.on("change", (id, { event }) => {
20
- relinka("log", `${relative(".", id)} was ${event}d`);
20
+ relinka("verbose", `${relative(".", id)} was ${event}d`);
21
21
  });
22
22
  transpileWatcher.on("restart", () => {
23
- relinka("log", "[dler] [rollup] Rebuilding bundle");
23
+ relinka("verbose", "[dler] [rollup] Rebuilding bundle");
24
24
  });
25
25
  transpileWatcher.on("event", (event) => {
26
26
  if (event.code === "END") {