@reliverse/dler 2.0.27 → 2.0.30
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.
- package/README.md +6 -4
- package/dist/cmds/build/cmd.js +82 -5
- package/dist/cmds/clean/cmd.js +4 -2
- package/dist/cmds/clean/impl.js +8 -3
- package/dist/cmds/init/cmd.js +0 -2
- package/dist/cmds/integrate/utils/context.js +1 -1
- package/dist/cmds/perf/impl.js +1 -7
- package/dist/cmds/port/impl.js +37 -13
- package/dist/cmds/publish/cmd.js +1 -3
- package/dist/cmds/senv/cmd.d.ts +2 -0
- package/dist/cmds/senv/cmd.js +384 -0
- package/dist/cmds/tsc/impl.js +6 -1
- package/dist/cmds/update/cmd.js +4 -8
- package/dist/cmds/update/impl.js +4 -8
- package/dist/cmds/update/utils.js +5 -11
- package/package.json +12 -12
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
```bash
|
|
10
10
|
# install as a dev dep:
|
|
11
11
|
bun add -D @reliverse/dler
|
|
12
|
-
# or
|
|
12
|
+
# or/and install globally:
|
|
13
13
|
bun i -g @reliverse/dler
|
|
14
14
|
```
|
|
15
15
|
|
|
@@ -63,9 +63,11 @@ All `@reliverse/dler` v2+ commands support both monorepo (recommended) and singl
|
|
|
63
63
|
4. `dler integrate` automatically installs and configures integrations like Next.js, Ultracite/Biome, etc.
|
|
64
64
|
5. `dler perf` runs performance benchmarks for the requested target.
|
|
65
65
|
6. `dler publish` publishes all packages to npm and jsr (soon). Handles version bumping, and different validations. Supports dler.ts configuration for per-package settings.
|
|
66
|
-
7. `dler
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
7. `dler senv` helps you manage system environment variables easily. Example: `dler senv --action append --name Path --value C:\Users\your-user-name\.local\bin` (on Windows it automates the following steps: System Properties →
|
|
67
|
+
Environment Variables → Edit User PATH → New → Add the path). The command is especially useful for Windows users, when you have too many vars so OS will not allow you to add more.
|
|
68
|
+
8. `dler shell` uses Bun's `$`, making it handy for running cross-platform custom terminal commands.
|
|
69
|
+
9. `dler tsc` finds TypeScript errors across all monorepo packages and shows only real ones (unlike the native `tsc`, which sometimes shows errors of its dependencies). It also has a `--copy-logs` flag that copies errors/warnings straight to your clipboard (with an inserted prompt for fixing them), so you can just hit Ctrl/Cmd+V and send it to AI.
|
|
70
|
+
10. `dler update` updates the dependencies of all packages to the latest version (yes, even across the monorepo).
|
|
69
71
|
|
|
70
72
|
## v2 Docs
|
|
71
73
|
|
package/dist/cmds/build/cmd.js
CHANGED
|
@@ -1,18 +1,38 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
applyPresets,
|
|
3
|
+
runBuildOnAllPackages,
|
|
4
|
+
validateAndExit
|
|
5
|
+
} from "@reliverse/dler-build";
|
|
6
|
+
import { replaceExportsInPackages } from "@reliverse/dler-helpers";
|
|
2
7
|
import {
|
|
3
8
|
defineCmd,
|
|
4
9
|
defineCmdArgs,
|
|
5
10
|
defineCmdCfg
|
|
6
11
|
} from "@reliverse/dler-launcher";
|
|
7
12
|
import { logger } from "@reliverse/dler-logger";
|
|
8
|
-
import { replaceExportsInPackages } from "@reliverse/dler-helpers";
|
|
9
13
|
const buildCmd = async (args) => {
|
|
10
14
|
try {
|
|
11
15
|
if (typeof process.versions.bun === "undefined") {
|
|
12
16
|
logger.error("\u274C This command requires Bun runtime. Sorry.");
|
|
13
17
|
process.exit(1);
|
|
14
18
|
}
|
|
15
|
-
const
|
|
19
|
+
const goOptions = {};
|
|
20
|
+
if (args.goProvider) goOptions.provider = args.goProvider;
|
|
21
|
+
if (args.goTargets) {
|
|
22
|
+
goOptions.targets = args.goTargets;
|
|
23
|
+
}
|
|
24
|
+
if (args.goOutputDir) goOptions.outputDir = args.goOutputDir;
|
|
25
|
+
if (args.goOutputName) goOptions.outputName = args.goOutputName;
|
|
26
|
+
if (args.goBuildMode) goOptions.buildMode = args.goBuildMode;
|
|
27
|
+
if (args.goLdflags) goOptions.ldflags = args.goLdflags;
|
|
28
|
+
if (args.goMainFile) goOptions.mainFile = args.goMainFile;
|
|
29
|
+
if (args.goVersion) goOptions.goVersion = args.goVersion;
|
|
30
|
+
if (args.goEnable !== void 0) goOptions.enable = args.goEnable;
|
|
31
|
+
const buildOptionsInput = { ...args };
|
|
32
|
+
if (Object.keys(goOptions).length > 0) {
|
|
33
|
+
buildOptionsInput.go = goOptions;
|
|
34
|
+
}
|
|
35
|
+
const buildOptions = applyPresets(buildOptionsInput);
|
|
16
36
|
validateAndExit(buildOptions);
|
|
17
37
|
const results = await runBuildOnAllPackages(args.ignore, args.cwd, {
|
|
18
38
|
...buildOptions,
|
|
@@ -24,7 +44,9 @@ const buildCmd = async (args) => {
|
|
|
24
44
|
const shouldReplaceExports = args.replaceExports === true;
|
|
25
45
|
if (shouldReplaceExports && !buildOptions.watch) {
|
|
26
46
|
if (args.verbose) {
|
|
27
|
-
logger.info(
|
|
47
|
+
logger.info(
|
|
48
|
+
"\n\u{1F4DD} Replacing exports from ./src/*.ts to ./dist/*.js after build..."
|
|
49
|
+
);
|
|
28
50
|
}
|
|
29
51
|
await replaceExportsInPackages({
|
|
30
52
|
direction: "ts-to-js",
|
|
@@ -411,6 +433,43 @@ const buildCmdArgs = defineCmdArgs({
|
|
|
411
433
|
allowPrivateBuild: {
|
|
412
434
|
type: "string",
|
|
413
435
|
description: "Allow building private packages (supports wildcards like @reliverse/* to build all packages starting with @reliverse/)"
|
|
436
|
+
},
|
|
437
|
+
// Go build options
|
|
438
|
+
goEnable: {
|
|
439
|
+
type: "boolean",
|
|
440
|
+
description: "Enable Go build (default: auto-detected if .go files exist)"
|
|
441
|
+
},
|
|
442
|
+
goProvider: {
|
|
443
|
+
type: "string",
|
|
444
|
+
description: "Go build provider: xgo (cross-compilation) or native (default: xgo)"
|
|
445
|
+
},
|
|
446
|
+
goTargets: {
|
|
447
|
+
type: "string",
|
|
448
|
+
description: "Go build targets (e.g., 'linux/amd64' or 'linux/amd64,windows/amd64')"
|
|
449
|
+
},
|
|
450
|
+
goOutputDir: {
|
|
451
|
+
type: "string",
|
|
452
|
+
description: "Go binary output directory (default: release)"
|
|
453
|
+
},
|
|
454
|
+
goOutputName: {
|
|
455
|
+
type: "string",
|
|
456
|
+
description: "Go binary name prefix (default: derived from package name)"
|
|
457
|
+
},
|
|
458
|
+
goBuildMode: {
|
|
459
|
+
type: "string",
|
|
460
|
+
description: "Go build mode: c-shared, c-archive, or exe (default: c-shared)"
|
|
461
|
+
},
|
|
462
|
+
goLdflags: {
|
|
463
|
+
type: "string",
|
|
464
|
+
description: "Go linker flags (default: '-s -w')"
|
|
465
|
+
},
|
|
466
|
+
goMainFile: {
|
|
467
|
+
type: "string",
|
|
468
|
+
description: "Main Go file to build (default: main.go)"
|
|
469
|
+
},
|
|
470
|
+
goVersion: {
|
|
471
|
+
type: "string",
|
|
472
|
+
description: "Go version for xgo (default: 1.20.3)"
|
|
414
473
|
}
|
|
415
474
|
});
|
|
416
475
|
const buildCmdCfg = defineCmdCfg({
|
|
@@ -544,7 +603,25 @@ const buildCmdCfg = defineCmdCfg({
|
|
|
544
603
|
"",
|
|
545
604
|
"# Note: dts-bundle-generator is the default provider for better bundling",
|
|
546
605
|
"# mkdist provider offers VFS-based processing with automatic relative import resolution",
|
|
547
|
-
"# Use --dtsProvider to override the default provider"
|
|
606
|
+
"# Use --dtsProvider to override the default provider",
|
|
607
|
+
"",
|
|
608
|
+
"# Go Build Examples:",
|
|
609
|
+
"dler build --go-provider xgo",
|
|
610
|
+
"dler build --go-provider native",
|
|
611
|
+
"dler build --go-targets linux/amd64",
|
|
612
|
+
"dler build --go-targets 'linux/amd64,windows/amd64,darwin/arm64'",
|
|
613
|
+
"dler build --go-output-dir release",
|
|
614
|
+
"dler build --go-output-name my-binary",
|
|
615
|
+
"dler build --go-build-mode c-shared",
|
|
616
|
+
"dler build --go-ldflags '-s -w -X main.version=1.0.0'",
|
|
617
|
+
"dler build --go-main-file main.go",
|
|
618
|
+
"dler build --go-version 1.21.0",
|
|
619
|
+
"dler build --go-enable",
|
|
620
|
+
"",
|
|
621
|
+
"# Note: Go build is auto-detected if .go files exist in the package",
|
|
622
|
+
"# Use --go-enable to explicitly enable, or configure in dler.ts",
|
|
623
|
+
"# Use --go-provider xgo for cross-compilation (requires xgo installed)",
|
|
624
|
+
"# Use --go-provider native for native builds (limited cross-compilation)"
|
|
548
625
|
]
|
|
549
626
|
});
|
|
550
627
|
export default defineCmd(buildCmd, buildCmdArgs, buildCmdCfg);
|
package/dist/cmds/clean/cmd.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { replaceExportsInPackages } from "@reliverse/dler-helpers";
|
|
1
2
|
import {
|
|
2
3
|
defineCmd,
|
|
3
4
|
defineCmdArgs,
|
|
4
5
|
defineCmdCfg
|
|
5
6
|
} from "@reliverse/dler-launcher";
|
|
6
7
|
import { logger } from "@reliverse/dler-logger";
|
|
7
|
-
import { replaceExportsInPackages } from "@reliverse/dler-helpers";
|
|
8
8
|
import { runCleanOnAllPackages } from "./impl.js";
|
|
9
9
|
const cleanCmd = async (args) => {
|
|
10
10
|
try {
|
|
@@ -15,7 +15,9 @@ const cleanCmd = async (args) => {
|
|
|
15
15
|
const shouldReplaceExports = args.replaceExports !== false;
|
|
16
16
|
if (shouldReplaceExports) {
|
|
17
17
|
if (args.verbose) {
|
|
18
|
-
logger.info(
|
|
18
|
+
logger.info(
|
|
19
|
+
"\u{1F4DD} Replacing exports from ./dist/*.js to ./src/*.ts before cleaning..."
|
|
20
|
+
);
|
|
19
21
|
}
|
|
20
22
|
await replaceExportsInPackages({
|
|
21
23
|
direction: "js-to-ts",
|
package/dist/cmds/clean/impl.js
CHANGED
|
@@ -201,8 +201,7 @@ const getCategoryForPattern = (pattern) => {
|
|
|
201
201
|
if (pattern.includes("dist")) return "build";
|
|
202
202
|
if (pattern.includes("_generated")) return "db";
|
|
203
203
|
if (pattern.includes(".basehub")) return "cms";
|
|
204
|
-
if (pattern.includes(".next") || pattern.includes(".expo"))
|
|
205
|
-
return "frontend";
|
|
204
|
+
if (pattern.includes(".next") || pattern.includes(".expo")) return "frontend";
|
|
206
205
|
if (pattern.includes(".source")) return "docs";
|
|
207
206
|
if (pattern.includes(".react-email")) return "email";
|
|
208
207
|
if (pattern.includes(".turbo") || pattern.includes(".vercel") || pattern.includes(".wrangler"))
|
|
@@ -367,7 +366,13 @@ const askConfirmation = async (force) => {
|
|
|
367
366
|
return true;
|
|
368
367
|
}
|
|
369
368
|
try {
|
|
370
|
-
|
|
369
|
+
const result = await confirmPrompt({
|
|
370
|
+
title: "Proceed with deletion?"
|
|
371
|
+
});
|
|
372
|
+
if (result.error || result.confirmed === null) {
|
|
373
|
+
return false;
|
|
374
|
+
}
|
|
375
|
+
return result.confirmed;
|
|
371
376
|
} catch {
|
|
372
377
|
return false;
|
|
373
378
|
}
|
package/dist/cmds/init/cmd.js
CHANGED
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
defineCmdCfg
|
|
6
6
|
} from "@reliverse/dler-launcher";
|
|
7
7
|
import { logger } from "@reliverse/dler-logger";
|
|
8
|
-
import { finalizePromptIO } from "@reliverse/dler-prompt";
|
|
9
8
|
import { $ } from "bun";
|
|
10
9
|
import {
|
|
11
10
|
generateAllPackages,
|
|
@@ -16,7 +15,6 @@ import { promptMonorepoConfig } from "./impl/prompts.js";
|
|
|
16
15
|
const initCmd = async () => {
|
|
17
16
|
try {
|
|
18
17
|
const config = await promptMonorepoConfig();
|
|
19
|
-
await finalizePromptIO();
|
|
20
18
|
logger.info("\n\u{1F528} Generating monorepo structure...\n");
|
|
21
19
|
await generateRootPackageJson(config);
|
|
22
20
|
await generateRootFiles(config);
|
|
@@ -107,7 +107,7 @@ export const selectTargetPackage = async (packages) => {
|
|
|
107
107
|
`Select target package (1-${packages.length})`,
|
|
108
108
|
"1"
|
|
109
109
|
);
|
|
110
|
-
const index = parseInt(answer, 10) - 1;
|
|
110
|
+
const index = Number.parseInt(answer, 10) - 1;
|
|
111
111
|
if (index >= 0 && index < packages.length) {
|
|
112
112
|
return packages[index];
|
|
113
113
|
}
|
package/dist/cmds/perf/impl.js
CHANGED
|
@@ -203,13 +203,7 @@ export class PerfAnalyzer {
|
|
|
203
203
|
verbose,
|
|
204
204
|
maxDepth: 10,
|
|
205
205
|
includeHidden: false,
|
|
206
|
-
excludePatterns: [
|
|
207
|
-
"node_modules",
|
|
208
|
-
".git",
|
|
209
|
-
".next",
|
|
210
|
-
"dist",
|
|
211
|
-
"build"
|
|
212
|
-
]
|
|
206
|
+
excludePatterns: ["node_modules", ".git", ".next", "dist", "build"]
|
|
213
207
|
});
|
|
214
208
|
}
|
|
215
209
|
async runMonorepoAnalysis() {
|
package/dist/cmds/port/impl.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { platform } from "node:os";
|
|
2
|
-
import { $ } from "bun";
|
|
3
2
|
import { logger } from "@reliverse/dler-logger";
|
|
3
|
+
import { $ } from "bun";
|
|
4
4
|
export async function killPort(port) {
|
|
5
5
|
const portStr = port.toString();
|
|
6
6
|
try {
|
|
@@ -32,15 +32,21 @@ export async function killPort(port) {
|
|
|
32
32
|
\u26A0\uFE0F UDP Port Detection - Important Information:`);
|
|
33
33
|
logger.info(` \u2022 UDP ports are connectionless and harder to detect`);
|
|
34
34
|
logger.info(` \u2022 Some UDP processes may not show up in netstat`);
|
|
35
|
-
logger.info(
|
|
36
|
-
|
|
35
|
+
logger.info(
|
|
36
|
+
` \u2022 UDP processes are often system services or drivers`
|
|
37
|
+
);
|
|
38
|
+
logger.info(
|
|
39
|
+
` \u2022 Killing UDP processes may require elevated privileges`
|
|
40
|
+
);
|
|
37
41
|
logger.info(` \u2022 Some UDP processes restart automatically`);
|
|
38
42
|
logger.info(`
|
|
39
43
|
\u{1F4A1} If you're having trouble with UDP port ${port}:`);
|
|
40
44
|
logger.info(` 1. Try running as Administrator`);
|
|
41
45
|
logger.info(` 2. Check if it's a system service: services.msc`);
|
|
42
46
|
logger.info(` 3. Use Task Manager to find the process by name`);
|
|
43
|
-
logger.info(
|
|
47
|
+
logger.info(
|
|
48
|
+
` 4. Restart the application that should use this port`
|
|
49
|
+
);
|
|
44
50
|
logger.info(` 5. Check Windows Firewall settings`);
|
|
45
51
|
}
|
|
46
52
|
const allLines = (tcpOutput + udpOutput).trim().split("\n");
|
|
@@ -119,17 +125,25 @@ export async function killPort(port) {
|
|
|
119
125
|
}
|
|
120
126
|
logger.info(`
|
|
121
127
|
\u26A0\uFE0F UDP Port Detection - Important Information:`);
|
|
122
|
-
logger.info(
|
|
128
|
+
logger.info(
|
|
129
|
+
` \u2022 UDP ports are connectionless and harder to detect`
|
|
130
|
+
);
|
|
123
131
|
logger.info(` \u2022 Some UDP processes may not show up in netstat`);
|
|
124
|
-
logger.info(
|
|
125
|
-
|
|
132
|
+
logger.info(
|
|
133
|
+
` \u2022 UDP processes are often system services or drivers`
|
|
134
|
+
);
|
|
135
|
+
logger.info(
|
|
136
|
+
` \u2022 Killing UDP processes may require elevated privileges`
|
|
137
|
+
);
|
|
126
138
|
logger.info(` \u2022 Some UDP processes restart automatically`);
|
|
127
139
|
logger.info(`
|
|
128
140
|
\u{1F4A1} If you're having trouble with UDP port ${port}:`);
|
|
129
141
|
logger.info(` 1. Try running as Administrator`);
|
|
130
142
|
logger.info(` 2. Check if it's a system service: services.msc`);
|
|
131
143
|
logger.info(` 3. Use Task Manager to find the process by name`);
|
|
132
|
-
logger.info(
|
|
144
|
+
logger.info(
|
|
145
|
+
` 4. Restart the application that should use this port`
|
|
146
|
+
);
|
|
133
147
|
logger.info(` 5. Check Windows Firewall settings`);
|
|
134
148
|
}
|
|
135
149
|
if (pids.size === 0) {
|
|
@@ -138,7 +152,9 @@ export async function killPort(port) {
|
|
|
138
152
|
logger.info(`
|
|
139
153
|
\u{1F50D} UDP Port Troubleshooting:`);
|
|
140
154
|
logger.info(` This might be a UDP-only port. Try these steps:`);
|
|
141
|
-
logger.info(
|
|
155
|
+
logger.info(
|
|
156
|
+
` 1. Check if any applications are using this port`
|
|
157
|
+
);
|
|
142
158
|
logger.info(` 2. Look for processes in Task Manager`);
|
|
143
159
|
logger.info(` 3. Try restarting your application`);
|
|
144
160
|
logger.info(` 4. Check Windows Defender or antivirus software`);
|
|
@@ -209,18 +225,26 @@ export async function killPort(port) {
|
|
|
209
225
|
\u26A0\uFE0F UDP Port Detection - Important Information:`);
|
|
210
226
|
logger.info(` \u2022 UDP ports are connectionless and harder to detect`);
|
|
211
227
|
logger.info(` \u2022 Some UDP processes may not show up in lsof`);
|
|
212
|
-
logger.info(
|
|
228
|
+
logger.info(
|
|
229
|
+
` \u2022 UDP processes are often system services or daemons`
|
|
230
|
+
);
|
|
213
231
|
logger.info(` \u2022 Killing UDP processes may require sudo privileges`);
|
|
214
232
|
logger.info(` \u2022 Some UDP processes restart automatically`);
|
|
215
233
|
logger.info(`
|
|
216
234
|
\u{1F4A1} If you're having trouble with UDP port ${port}:`);
|
|
217
|
-
logger.info(
|
|
235
|
+
logger.info(
|
|
236
|
+
` 1. Try running with sudo: sudo bun dler port kill --port ${port}`
|
|
237
|
+
);
|
|
218
238
|
logger.info(
|
|
219
239
|
` 2. Check if it's a system service: systemctl status <service>`
|
|
220
240
|
);
|
|
221
241
|
logger.info(` 3. Use ps aux | grep <port> to find the process`);
|
|
222
|
-
logger.info(
|
|
223
|
-
|
|
242
|
+
logger.info(
|
|
243
|
+
` 4. Restart the application that should use this port`
|
|
244
|
+
);
|
|
245
|
+
logger.info(
|
|
246
|
+
` 5. Check firewall settings: ufw status or iptables -L`
|
|
247
|
+
);
|
|
224
248
|
}
|
|
225
249
|
const pidList = Array.from(allPids);
|
|
226
250
|
for (const pid of pidList) {
|
package/dist/cmds/publish/cmd.js
CHANGED
|
@@ -47,9 +47,7 @@ const publishCmd = async (args) => {
|
|
|
47
47
|
}
|
|
48
48
|
process.exit(1);
|
|
49
49
|
}
|
|
50
|
-
logger.success(
|
|
51
|
-
"\nAll packages published successfully!"
|
|
52
|
-
);
|
|
50
|
+
logger.success("\nAll packages published successfully!");
|
|
53
51
|
if (args.verbose) {
|
|
54
52
|
for (const result of results.results) {
|
|
55
53
|
if (result.success && !result.warning) {
|
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
import {
|
|
2
|
+
defineCmd,
|
|
3
|
+
defineCmdArgs,
|
|
4
|
+
defineCmdCfg
|
|
5
|
+
} from "@reliverse/dler-launcher";
|
|
6
|
+
import { logger } from "@reliverse/dler-logger";
|
|
7
|
+
import fs from "fs/promises";
|
|
8
|
+
const isWindows = () => globalThis.Bun?.platform?.() === "win32" || process.platform === "win32";
|
|
9
|
+
const fileExists = async (path) => {
|
|
10
|
+
try {
|
|
11
|
+
await fs.access(path);
|
|
12
|
+
return true;
|
|
13
|
+
} catch {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
const normalizePathEntries = (raw) => {
|
|
18
|
+
const sep = isWindows() ? ";" : ":";
|
|
19
|
+
return raw.split(sep).map((s) => s.trim()).filter(Boolean);
|
|
20
|
+
};
|
|
21
|
+
const joinPathEntries = (entries) => isWindows() ? entries.join(";") : entries.join(":");
|
|
22
|
+
const normalizeEntry = (entry) => {
|
|
23
|
+
const trimmed = entry.trim();
|
|
24
|
+
if (isWindows()) {
|
|
25
|
+
return trimmed.replaceAll("/", "\\");
|
|
26
|
+
}
|
|
27
|
+
return trimmed;
|
|
28
|
+
};
|
|
29
|
+
const toComparable = (entry) => {
|
|
30
|
+
const normalized = normalizeEntry(entry);
|
|
31
|
+
return isWindows() ? normalized.toLowerCase() : normalized;
|
|
32
|
+
};
|
|
33
|
+
const uniqueByComparable = (entries) => {
|
|
34
|
+
const seen = /* @__PURE__ */ new Set();
|
|
35
|
+
const result = [];
|
|
36
|
+
for (const e of entries) {
|
|
37
|
+
const key = toComparable(e);
|
|
38
|
+
if (!seen.has(key)) {
|
|
39
|
+
seen.add(key);
|
|
40
|
+
result.push(e);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
const backupFile = async (path) => {
|
|
46
|
+
try {
|
|
47
|
+
if (!await fileExists(path)) return;
|
|
48
|
+
const now = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
|
|
49
|
+
const random = Math.random().toString(36).substring(2, 8);
|
|
50
|
+
const bak = `${path}.bak.${now}.${random}`;
|
|
51
|
+
await fs.copyFile(path, bak);
|
|
52
|
+
logger.info(`Backup created: ${bak}`);
|
|
53
|
+
} catch (error) {
|
|
54
|
+
logger.warn(`Failed to create backup for ${path}: ${error}`);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
const escapePowerShellString = (str) => {
|
|
58
|
+
return str.replace(/'/g, "''");
|
|
59
|
+
};
|
|
60
|
+
const runPowerShellGetUser = async (name) => {
|
|
61
|
+
const safeName = escapePowerShellString(name);
|
|
62
|
+
const command = `[Environment]::GetEnvironmentVariable('${safeName}', 'User')`;
|
|
63
|
+
const proc = Bun.spawn(["powershell", "-NoProfile", "-Command", command], {
|
|
64
|
+
stdout: "pipe",
|
|
65
|
+
stderr: "pipe"
|
|
66
|
+
});
|
|
67
|
+
const text = await new Response(proc.stdout).text();
|
|
68
|
+
await proc.exited;
|
|
69
|
+
return text.trim();
|
|
70
|
+
};
|
|
71
|
+
const runPowerShellSetUser = async (name, value) => {
|
|
72
|
+
const safeName = escapePowerShellString(name);
|
|
73
|
+
const safeValue = escapePowerShellString(value);
|
|
74
|
+
const command = `[Environment]::SetEnvironmentVariable('${safeName}', '${safeValue}', 'User')`;
|
|
75
|
+
const proc = Bun.spawn(["powershell", "-NoProfile", "-Command", command], {
|
|
76
|
+
stdout: "pipe",
|
|
77
|
+
stderr: "pipe"
|
|
78
|
+
});
|
|
79
|
+
await proc.exited;
|
|
80
|
+
if (proc.exitCode !== 0) {
|
|
81
|
+
const stderr = await new Response(proc.stderr).text();
|
|
82
|
+
throw new Error(`PowerShell command failed: ${stderr}`);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
const getHomeDirectory = () => {
|
|
86
|
+
if (isWindows()) {
|
|
87
|
+
return process.env.USERPROFILE || process.env.HOME || "";
|
|
88
|
+
}
|
|
89
|
+
return process.env.HOME || "";
|
|
90
|
+
};
|
|
91
|
+
const persistPosix = async (name, value) => {
|
|
92
|
+
const home = getHomeDirectory();
|
|
93
|
+
if (!home) {
|
|
94
|
+
throw new Error("Could not determine home directory");
|
|
95
|
+
}
|
|
96
|
+
const profile = `${home}/.profile`;
|
|
97
|
+
const escapedName = name.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
98
|
+
const re = new RegExp(`^\\s*export\\s+${escapedName}=.*$`, "m");
|
|
99
|
+
try {
|
|
100
|
+
const exists = await fileExists(profile);
|
|
101
|
+
if (!exists) {
|
|
102
|
+
await fs.writeFile(
|
|
103
|
+
profile,
|
|
104
|
+
`# created by dler senv
|
|
105
|
+
export ${name}="${value}"
|
|
106
|
+
`
|
|
107
|
+
);
|
|
108
|
+
logger.info(`Wrote new ${profile}`);
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
await backupFile(profile);
|
|
112
|
+
const content = await fs.readFile(profile, "utf8");
|
|
113
|
+
const newContent = re.test(content) ? content.replace(re, `export ${name}="${value}"`) : content + `
|
|
114
|
+
# added by dler senv
|
|
115
|
+
export ${name}="${value}"
|
|
116
|
+
`;
|
|
117
|
+
await fs.writeFile(profile, newContent);
|
|
118
|
+
logger.info(`Updated ${profile}`);
|
|
119
|
+
} catch (e) {
|
|
120
|
+
logger.error("Failed to persist to ~/.profile:");
|
|
121
|
+
logger.error(String(e));
|
|
122
|
+
throw e;
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
const persistPosixEditPath = async (name, entry, action) => {
|
|
126
|
+
const home = getHomeDirectory();
|
|
127
|
+
if (!home) {
|
|
128
|
+
throw new Error("Could not determine home directory");
|
|
129
|
+
}
|
|
130
|
+
const profile = `${home}/.profile`;
|
|
131
|
+
const escapedName = name.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
132
|
+
const re = new RegExp(`^\\s*export\\s+${escapedName}=["']?(.*)["']?$`, "m");
|
|
133
|
+
await backupFile(profile);
|
|
134
|
+
const exists = await fileExists(profile);
|
|
135
|
+
const content = exists ? await fs.readFile(profile, "utf8") : "";
|
|
136
|
+
const match = content.match(re);
|
|
137
|
+
const current = match ? match[1] : process.env[name] || "";
|
|
138
|
+
let entries = normalizePathEntries(current || "").map(normalizeEntry);
|
|
139
|
+
const normalizedEntry = normalizeEntry(entry);
|
|
140
|
+
if (action === "append") {
|
|
141
|
+
const set = new Set(entries.map(toComparable));
|
|
142
|
+
if (!set.has(toComparable(normalizedEntry))) {
|
|
143
|
+
entries.push(normalizedEntry);
|
|
144
|
+
}
|
|
145
|
+
} else {
|
|
146
|
+
const targetKey = toComparable(normalizedEntry);
|
|
147
|
+
const idx = entries.findIndex((e) => toComparable(e) === targetKey);
|
|
148
|
+
if (idx >= 0) entries.splice(idx, 1);
|
|
149
|
+
}
|
|
150
|
+
entries = uniqueByComparable(entries);
|
|
151
|
+
const newVal = joinPathEntries(entries);
|
|
152
|
+
const next = re.test(content) ? content.replace(re, `export ${name}="${newVal}"`) : content + `
|
|
153
|
+
# added by dler senv
|
|
154
|
+
export ${name}="${newVal}"
|
|
155
|
+
`;
|
|
156
|
+
await fs.writeFile(profile, next);
|
|
157
|
+
logger.info(`Persisted ${name} in ${profile}`);
|
|
158
|
+
};
|
|
159
|
+
const senvCmdArgs = defineCmdArgs({
|
|
160
|
+
action: {
|
|
161
|
+
type: "string",
|
|
162
|
+
required: true,
|
|
163
|
+
description: "Operation to perform: list|get|set|append|remove|contains"
|
|
164
|
+
},
|
|
165
|
+
name: {
|
|
166
|
+
type: "string",
|
|
167
|
+
description: "Environment variable name (optional for list)"
|
|
168
|
+
},
|
|
169
|
+
value: {
|
|
170
|
+
type: "string",
|
|
171
|
+
description: "Value for set/append/remove/contains"
|
|
172
|
+
},
|
|
173
|
+
persist: {
|
|
174
|
+
type: "boolean",
|
|
175
|
+
description: "Persist change to user environment (default: true)"
|
|
176
|
+
},
|
|
177
|
+
yes: {
|
|
178
|
+
type: "boolean",
|
|
179
|
+
description: "Skip interactive confirmation message"
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
const senvCmdCfg = defineCmdCfg({
|
|
183
|
+
name: "senv",
|
|
184
|
+
description: "Inspect and modify environment variables (process and user-level)",
|
|
185
|
+
examples: [
|
|
186
|
+
"dler senv --action list",
|
|
187
|
+
"dler senv --action list --name Path",
|
|
188
|
+
"dler senv --action get --name Path",
|
|
189
|
+
"dler senv --action set --name Path --value C\\\\bin",
|
|
190
|
+
"dler senv --action append --name Path --value C\\\\msys64\\\\ucrt64\\\\bin --yes",
|
|
191
|
+
"dler senv --action contains --name Path --value C\\\\bin"
|
|
192
|
+
]
|
|
193
|
+
});
|
|
194
|
+
const senvCmd = async (args) => {
|
|
195
|
+
try {
|
|
196
|
+
if (typeof process.versions.bun === "undefined") {
|
|
197
|
+
logger.error("\u274C This command requires Bun runtime. Sorry.");
|
|
198
|
+
process.exit(1);
|
|
199
|
+
}
|
|
200
|
+
const { action, name, value } = args;
|
|
201
|
+
const persist = args.persist ?? true;
|
|
202
|
+
const yes = args.yes ?? false;
|
|
203
|
+
const allowed = /* @__PURE__ */ new Set([
|
|
204
|
+
"list",
|
|
205
|
+
"get",
|
|
206
|
+
"set",
|
|
207
|
+
"append",
|
|
208
|
+
"remove",
|
|
209
|
+
"contains"
|
|
210
|
+
]);
|
|
211
|
+
if (!allowed.has(action)) {
|
|
212
|
+
logger.error(
|
|
213
|
+
"Unknown action. Allowed: list, get, set, append, remove, contains"
|
|
214
|
+
);
|
|
215
|
+
process.exit(2);
|
|
216
|
+
}
|
|
217
|
+
if (action === "list") {
|
|
218
|
+
if (name) {
|
|
219
|
+
logger.log(`${name}=${process.env[name] ?? ""}`);
|
|
220
|
+
} else {
|
|
221
|
+
for (const k of Object.keys(process.env).sort()) {
|
|
222
|
+
logger.log(`${k}=${process.env[k]}`);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
if (!name) {
|
|
228
|
+
logger.error("Name is required for this action");
|
|
229
|
+
process.exit(2);
|
|
230
|
+
}
|
|
231
|
+
if (action === "get") {
|
|
232
|
+
logger.log(process.env[name] ?? "");
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
if (action === "contains") {
|
|
236
|
+
if (!value) {
|
|
237
|
+
logger.error("Value required for contains");
|
|
238
|
+
process.exit(2);
|
|
239
|
+
}
|
|
240
|
+
const cur2 = process.env[name] ?? "";
|
|
241
|
+
const entries2 = normalizePathEntries(cur2).map(normalizeEntry);
|
|
242
|
+
const keys = new Set(entries2.map(toComparable));
|
|
243
|
+
process.exit(keys.has(toComparable(value)) ? 0 : 1);
|
|
244
|
+
}
|
|
245
|
+
if (action === "set") {
|
|
246
|
+
if (typeof value === "undefined") {
|
|
247
|
+
logger.error("Value required for set");
|
|
248
|
+
process.exit(2);
|
|
249
|
+
}
|
|
250
|
+
process.env[name] = value;
|
|
251
|
+
logger.info(`Set ${name} for current process.`);
|
|
252
|
+
if (persist) {
|
|
253
|
+
if (!yes) {
|
|
254
|
+
logger.info(
|
|
255
|
+
"Persisting to user environment (will create backup). Use --yes to skip this message."
|
|
256
|
+
);
|
|
257
|
+
}
|
|
258
|
+
if (isWindows()) {
|
|
259
|
+
try {
|
|
260
|
+
await runPowerShellSetUser(name, value);
|
|
261
|
+
logger.success(`Persisted ${name} to User environment (Windows).`);
|
|
262
|
+
} catch (e) {
|
|
263
|
+
logger.error("Failed to persist via PowerShell:");
|
|
264
|
+
logger.error(String(e));
|
|
265
|
+
}
|
|
266
|
+
} else {
|
|
267
|
+
try {
|
|
268
|
+
await persistPosix(name, value);
|
|
269
|
+
} catch (e) {
|
|
270
|
+
logger.error("Failed to persist on POSIX:");
|
|
271
|
+
logger.error(String(e));
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
if (!value) {
|
|
278
|
+
logger.error("Value required for append/remove");
|
|
279
|
+
process.exit(2);
|
|
280
|
+
}
|
|
281
|
+
const cur = process.env[name] ?? "";
|
|
282
|
+
const normalizedValue = normalizeEntry(value);
|
|
283
|
+
let entries = normalizePathEntries(cur).map(normalizeEntry);
|
|
284
|
+
if (action === "append") {
|
|
285
|
+
const keySet = new Set(entries.map(toComparable));
|
|
286
|
+
const targetKey = toComparable(normalizedValue);
|
|
287
|
+
if (keySet.has(targetKey)) {
|
|
288
|
+
logger.info("Entry already present \u2014 nothing to do.");
|
|
289
|
+
} else {
|
|
290
|
+
entries.push(normalizedValue);
|
|
291
|
+
entries = uniqueByComparable(entries);
|
|
292
|
+
const newVal = joinPathEntries(entries);
|
|
293
|
+
process.env[name] = newVal;
|
|
294
|
+
logger.info(`Appended to ${name} for current process.`);
|
|
295
|
+
if (persist) {
|
|
296
|
+
if (isWindows()) {
|
|
297
|
+
try {
|
|
298
|
+
const userVal = (await runPowerShellGetUser(name)).trim();
|
|
299
|
+
const userEntries = normalizePathEntries(userVal || "").map(
|
|
300
|
+
normalizeEntry
|
|
301
|
+
);
|
|
302
|
+
const uSet = new Set(userEntries.map(toComparable));
|
|
303
|
+
if (!uSet.has(targetKey)) {
|
|
304
|
+
userEntries.push(normalizedValue);
|
|
305
|
+
const uniqueEntries = uniqueByComparable(userEntries);
|
|
306
|
+
const joined = joinPathEntries(uniqueEntries);
|
|
307
|
+
await runPowerShellSetUser(name, joined);
|
|
308
|
+
logger.success(`Persisted append to User ${name} (Windows).`);
|
|
309
|
+
} else {
|
|
310
|
+
logger.info(
|
|
311
|
+
"User-level already contains the entry \u2014 no change."
|
|
312
|
+
);
|
|
313
|
+
}
|
|
314
|
+
} catch (e) {
|
|
315
|
+
logger.error("Failed to persist append on Windows:");
|
|
316
|
+
logger.error(String(e));
|
|
317
|
+
}
|
|
318
|
+
} else {
|
|
319
|
+
try {
|
|
320
|
+
await persistPosixEditPath(name, value, "append");
|
|
321
|
+
} catch (e) {
|
|
322
|
+
logger.error("Failed to persist append on POSIX:");
|
|
323
|
+
logger.error(String(e));
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
if (action === "remove") {
|
|
331
|
+
const targetKey = toComparable(normalizedValue);
|
|
332
|
+
const idx = entries.findIndex((e) => toComparable(e) === targetKey);
|
|
333
|
+
if (idx === -1) {
|
|
334
|
+
logger.info("Entry not present \u2014 nothing to remove.");
|
|
335
|
+
} else {
|
|
336
|
+
entries.splice(idx, 1);
|
|
337
|
+
entries = uniqueByComparable(entries);
|
|
338
|
+
const newVal = joinPathEntries(entries);
|
|
339
|
+
process.env[name] = newVal;
|
|
340
|
+
logger.info(`Removed entry from ${name} for current process.`);
|
|
341
|
+
if (persist) {
|
|
342
|
+
if (isWindows()) {
|
|
343
|
+
try {
|
|
344
|
+
const userVal = (await runPowerShellGetUser(name)).trim();
|
|
345
|
+
const userEntries = normalizePathEntries(userVal || "").map(
|
|
346
|
+
normalizeEntry
|
|
347
|
+
);
|
|
348
|
+
const i2 = userEntries.findIndex(
|
|
349
|
+
(e) => toComparable(e) === targetKey
|
|
350
|
+
);
|
|
351
|
+
if (i2 >= 0) {
|
|
352
|
+
userEntries.splice(i2, 1);
|
|
353
|
+
const uniqueEntries = uniqueByComparable(userEntries);
|
|
354
|
+
await runPowerShellSetUser(
|
|
355
|
+
name,
|
|
356
|
+
joinPathEntries(uniqueEntries)
|
|
357
|
+
);
|
|
358
|
+
logger.success(`Persisted removal to User ${name} (Windows).`);
|
|
359
|
+
} else {
|
|
360
|
+
logger.info("User-level did not contain entry \u2014 no change.");
|
|
361
|
+
}
|
|
362
|
+
} catch (e) {
|
|
363
|
+
logger.error("Failed to persist removal on Windows:");
|
|
364
|
+
logger.error(String(e));
|
|
365
|
+
}
|
|
366
|
+
} else {
|
|
367
|
+
try {
|
|
368
|
+
await persistPosixEditPath(name, value, "remove");
|
|
369
|
+
} catch (e) {
|
|
370
|
+
logger.error("Failed to persist removal on POSIX:");
|
|
371
|
+
logger.error(String(e));
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
378
|
+
} catch (e) {
|
|
379
|
+
logger.error("Fatal:");
|
|
380
|
+
logger.error(String(e));
|
|
381
|
+
process.exit(3);
|
|
382
|
+
}
|
|
383
|
+
};
|
|
384
|
+
export default defineCmd(senvCmd, senvCmdArgs, senvCmdCfg);
|
package/dist/cmds/tsc/impl.js
CHANGED
|
@@ -578,7 +578,12 @@ export const runTscOnAllPackages = async (ignore, cwd, options = {}) => {
|
|
|
578
578
|
if (verbose) {
|
|
579
579
|
logger.info("\u{1F680} Starting TypeScript checks...\n");
|
|
580
580
|
}
|
|
581
|
-
const summary = await collectAllResults(
|
|
581
|
+
const summary = await collectAllResults(
|
|
582
|
+
packages,
|
|
583
|
+
discoveryResult.monorepoRoot,
|
|
584
|
+
options,
|
|
585
|
+
cache
|
|
586
|
+
);
|
|
582
587
|
formatOutput(summary, verbose);
|
|
583
588
|
if (copyLogs && summary.hasErrors) {
|
|
584
589
|
await copyLogsToClipboard(summary);
|
package/dist/cmds/update/cmd.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getCurrentWorkingDirectory } from "@reliverse/dler-helpers";
|
|
1
2
|
import {
|
|
2
3
|
defineCmd,
|
|
3
4
|
defineCmdArgs,
|
|
@@ -5,6 +6,7 @@ import {
|
|
|
5
6
|
} from "@reliverse/dler-launcher";
|
|
6
7
|
import { logger } from "@reliverse/dler-logger";
|
|
7
8
|
import path from "path";
|
|
9
|
+
import { msgs } from "../const.js";
|
|
8
10
|
import {
|
|
9
11
|
checkPackageUpdatesForFile,
|
|
10
12
|
handleInstallation,
|
|
@@ -12,11 +14,7 @@ import {
|
|
|
12
14
|
updatePackageJsonFileDirectly,
|
|
13
15
|
validatePackageJson
|
|
14
16
|
} from "./impl.js";
|
|
15
|
-
import {
|
|
16
|
-
displayStructuredUpdateResults
|
|
17
|
-
} from "./utils.js";
|
|
18
|
-
import { msgs } from "../const.js";
|
|
19
|
-
import { getCurrentWorkingDirectory } from "@reliverse/dler-helpers";
|
|
17
|
+
import { displayStructuredUpdateResults } from "./utils.js";
|
|
20
18
|
const updateCmd = async (args) => {
|
|
21
19
|
try {
|
|
22
20
|
if (typeof process.versions.bun === "undefined") {
|
|
@@ -61,9 +59,7 @@ const updateCmd = async (args) => {
|
|
|
61
59
|
totalUpdated += updated;
|
|
62
60
|
if (updated > 0) {
|
|
63
61
|
const relativePath = path.relative(process.cwd(), packageJsonPath);
|
|
64
|
-
logger.debug(
|
|
65
|
-
`Updated ${updated} dependencies in ${relativePath}`
|
|
66
|
-
);
|
|
62
|
+
logger.debug(`Updated ${updated} dependencies in ${relativePath}`);
|
|
67
63
|
}
|
|
68
64
|
}
|
|
69
65
|
}
|
package/dist/cmds/update/impl.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import path from "path";
|
|
2
|
-
import fs from "fs/promises";
|
|
3
1
|
import { logger } from "@reliverse/dler-logger";
|
|
4
2
|
import pMap from "@reliverse/dler-mapper";
|
|
5
3
|
import { Glob } from "bun";
|
|
4
|
+
import fs from "fs/promises";
|
|
5
|
+
import path from "path";
|
|
6
6
|
import {
|
|
7
7
|
applyVersionUpdate,
|
|
8
8
|
checkPackageUpdate,
|
|
@@ -51,9 +51,7 @@ export async function prepareAllUpdateCandidates() {
|
|
|
51
51
|
);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
logger.debug(
|
|
55
|
-
`Processing ${packageJsonFiles.length} package.json files`
|
|
56
|
-
);
|
|
54
|
+
logger.debug(`Processing ${packageJsonFiles.length} package.json files`);
|
|
57
55
|
return { packageJsonFiles, fileDepsMap };
|
|
58
56
|
}
|
|
59
57
|
export async function checkPackageUpdatesForFile(fileDepsMap, args) {
|
|
@@ -150,8 +148,6 @@ export async function handleInstallation() {
|
|
|
150
148
|
logger.warn(
|
|
151
149
|
`Install failed: ${error instanceof Error ? error.message : String(error)}`
|
|
152
150
|
);
|
|
153
|
-
logger.log(
|
|
154
|
-
"Run 'bun install' manually to apply the changes"
|
|
155
|
-
);
|
|
151
|
+
logger.log("Run 'bun install' manually to apply the changes");
|
|
156
152
|
}
|
|
157
153
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import fs from "fs/promises";
|
|
2
1
|
import { logger } from "@reliverse/dler-logger";
|
|
2
|
+
import zeptomatch from "@reliverse/dler-matcher";
|
|
3
3
|
import { $ } from "bun";
|
|
4
|
+
import fs from "fs/promises";
|
|
4
5
|
import path from "path";
|
|
5
6
|
import semver from "semver";
|
|
6
|
-
import zeptomatch from "@reliverse/dler-matcher";
|
|
7
7
|
export function isNpmAlias(versionSpec) {
|
|
8
8
|
return versionSpec.startsWith("npm:");
|
|
9
9
|
}
|
|
@@ -326,9 +326,7 @@ export function displayStructuredUpdateResults(results, packageJsonFiles, fileDe
|
|
|
326
326
|
}
|
|
327
327
|
if (!showDetails) {
|
|
328
328
|
if (toUpdate.length === 0) {
|
|
329
|
-
logger.log(
|
|
330
|
-
`All ${upToDate.length} dependencies are already up to date`
|
|
331
|
-
);
|
|
329
|
+
logger.log(`All ${upToDate.length} dependencies are already up to date`);
|
|
332
330
|
} else {
|
|
333
331
|
logger.log(
|
|
334
332
|
`${toUpdate.length} dependencies can be updated across ${packageJsonFiles.length} package.json files`
|
|
@@ -368,9 +366,7 @@ export function displayStructuredUpdateResults(results, packageJsonFiles, fileDe
|
|
|
368
366
|
(r) => !r.updated && !r.error && r.semverCompatible
|
|
369
367
|
);
|
|
370
368
|
if (upToDateInFile.length > 0) {
|
|
371
|
-
logger.log(
|
|
372
|
-
` * ${upToDateInFile.length} deps are already up to date`
|
|
373
|
-
);
|
|
369
|
+
logger.log(` * ${upToDateInFile.length} deps are already up to date`);
|
|
374
370
|
}
|
|
375
371
|
const toUpdateInFile = fileResults.filter((r) => r.updated && !r.error);
|
|
376
372
|
if (toUpdateInFile.length > 0) {
|
|
@@ -417,9 +413,7 @@ export function displayStructuredUpdateResults(results, packageJsonFiles, fileDe
|
|
|
417
413
|
logger.log("");
|
|
418
414
|
}
|
|
419
415
|
if (toUpdate.length === 0) {
|
|
420
|
-
logger.log(
|
|
421
|
-
`All ${upToDate.length} dependencies are already up to date`
|
|
422
|
-
);
|
|
416
|
+
logger.log(`All ${upToDate.length} dependencies are already up to date`);
|
|
423
417
|
} else {
|
|
424
418
|
logger.success(
|
|
425
419
|
`Summary: ${toUpdate.length} dependencies can be updated across ${packageJsonFiles.length} package.json files`
|
package/package.json
CHANGED
|
@@ -2,27 +2,27 @@
|
|
|
2
2
|
"name": "@reliverse/dler",
|
|
3
3
|
"description": "@reliverse/dler is a framework which helps TypeScript and JavaScript developers create their libraries and CLI tools. It provides ready-to-use primitives, so you don't have to write them from scratch.",
|
|
4
4
|
"author": "reliverse",
|
|
5
|
-
"version": "2.0.
|
|
5
|
+
"version": "2.0.30",
|
|
6
6
|
"private": false,
|
|
7
7
|
"type": "module",
|
|
8
8
|
"bin": {
|
|
9
9
|
"dler": "dist/cli.js"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"c12": "^3.3.
|
|
12
|
+
"c12": "^3.3.2",
|
|
13
13
|
"semver": "^7.7.3",
|
|
14
14
|
"lookpath": "^1.2.3",
|
|
15
15
|
"clipboardy": "^5.0.0",
|
|
16
|
-
"@reliverse/dler-publish": "2.0.
|
|
17
|
-
"@reliverse/dler-bump": "2.0.
|
|
18
|
-
"@reliverse/dler-build": "2.0.
|
|
19
|
-
"@reliverse/dler-logger": "2.0.
|
|
20
|
-
"@reliverse/dler-matcher": "2.0.
|
|
21
|
-
"@reliverse/dler-launcher": "2.0.
|
|
22
|
-
"@reliverse/dler-prompt": "2.0.
|
|
23
|
-
"@reliverse/dler-helpers": "2.0.
|
|
24
|
-
"@reliverse/dler-pkg-tsc": "2.0.
|
|
25
|
-
"@reliverse/dler-mapper": "2.0.
|
|
16
|
+
"@reliverse/dler-publish": "2.0.30",
|
|
17
|
+
"@reliverse/dler-bump": "2.0.30",
|
|
18
|
+
"@reliverse/dler-build": "2.0.30",
|
|
19
|
+
"@reliverse/dler-logger": "2.0.30",
|
|
20
|
+
"@reliverse/dler-matcher": "2.0.30",
|
|
21
|
+
"@reliverse/dler-launcher": "2.0.30",
|
|
22
|
+
"@reliverse/dler-prompt": "2.0.30",
|
|
23
|
+
"@reliverse/dler-helpers": "2.0.30",
|
|
24
|
+
"@reliverse/dler-pkg-tsc": "2.0.30",
|
|
25
|
+
"@reliverse/dler-mapper": "2.0.30"
|
|
26
26
|
},
|
|
27
27
|
"keywords": [
|
|
28
28
|
"dler",
|