@reliverse/dler 2.1.2 → 2.1.4
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/dist/cmds/build/cmd.js +40 -5
- package/dist/cmds/publish/cmd.js +14 -1
- package/package.json +11 -11
package/dist/cmds/build/cmd.js
CHANGED
|
@@ -16,6 +16,12 @@ const buildCmd = async (args) => {
|
|
|
16
16
|
logger.error("\u274C This command requires Bun runtime. Sorry.");
|
|
17
17
|
process.exit(1);
|
|
18
18
|
}
|
|
19
|
+
if (args.goOnly && args.tsOnly) {
|
|
20
|
+
logger.error(
|
|
21
|
+
"\u274C --go-only and --ts-only cannot be used together. Please use only one."
|
|
22
|
+
);
|
|
23
|
+
process.exit(1);
|
|
24
|
+
}
|
|
19
25
|
const goOptions = {};
|
|
20
26
|
if (args.goProvider) goOptions.provider = args.goProvider;
|
|
21
27
|
if (args.goTargets) {
|
|
@@ -34,10 +40,15 @@ const buildCmd = async (args) => {
|
|
|
34
40
|
}
|
|
35
41
|
const buildOptions = applyPresets(buildOptionsInput);
|
|
36
42
|
validateAndExit(buildOptions);
|
|
37
|
-
const results = await runBuildOnAllPackages(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
43
|
+
const results = await runBuildOnAllPackages(
|
|
44
|
+
args.ignore,
|
|
45
|
+
args.cwd,
|
|
46
|
+
{
|
|
47
|
+
...buildOptions,
|
|
48
|
+
allowPrivateBuild: args.allowPrivateBuild,
|
|
49
|
+
filter: args.filter
|
|
50
|
+
}
|
|
51
|
+
);
|
|
41
52
|
if (results.hasErrors) {
|
|
42
53
|
process.exit(1);
|
|
43
54
|
}
|
|
@@ -71,6 +82,10 @@ const buildCmdArgs = defineCmdArgs({
|
|
|
71
82
|
type: "string",
|
|
72
83
|
description: "Package(s) to ignore (supports wildcards like @reliverse/*)"
|
|
73
84
|
},
|
|
85
|
+
filter: {
|
|
86
|
+
type: "string",
|
|
87
|
+
description: "Package(s) to include (supports wildcards and comma-separated values like '@reliverse/dler-prompt,@reliverse/dler-build'). Takes precedence over --ignore when both are provided."
|
|
88
|
+
},
|
|
74
89
|
cwd: {
|
|
75
90
|
type: "string",
|
|
76
91
|
description: "Working directory (monorepo root)"
|
|
@@ -470,6 +485,14 @@ const buildCmdArgs = defineCmdArgs({
|
|
|
470
485
|
goVersion: {
|
|
471
486
|
type: "string",
|
|
472
487
|
description: "Go version for xgo (default: 1.20.3)"
|
|
488
|
+
},
|
|
489
|
+
goOnly: {
|
|
490
|
+
type: "boolean",
|
|
491
|
+
description: "Skip TypeScript builds and only build Go binaries (default: false)"
|
|
492
|
+
},
|
|
493
|
+
tsOnly: {
|
|
494
|
+
type: "boolean",
|
|
495
|
+
description: "Skip Go builds and only build TypeScript/JavaScript (default: false)"
|
|
473
496
|
}
|
|
474
497
|
});
|
|
475
498
|
const buildCmdCfg = defineCmdCfg({
|
|
@@ -477,6 +500,8 @@ const buildCmdCfg = defineCmdCfg({
|
|
|
477
500
|
description: "Build all workspace packages using configurable bundler (mkdist for libraries, bun for apps) with dler.ts configuration. Auto-detects frontend apps and libraries. Supports presets: --production, --dev, --library, --react, --node, --monorepo.",
|
|
478
501
|
examples: [
|
|
479
502
|
"dler build",
|
|
503
|
+
'dler build --filter "@reliverse/dler-prompt,@reliverse/dler-build"',
|
|
504
|
+
'dler build --filter "@reliverse/dler-*"',
|
|
480
505
|
'dler build --ignore "@reliverse/*"',
|
|
481
506
|
'dler build --ignore "@reliverse/dler-colors" --ignore "@reliverse/dler-v1"',
|
|
482
507
|
'dler build --ignore "@reliverse/dler-colors @reliverse/dler-v1"',
|
|
@@ -621,7 +646,17 @@ const buildCmdCfg = defineCmdCfg({
|
|
|
621
646
|
"# Note: Go build is auto-detected if .go files exist in the package",
|
|
622
647
|
"# Use --go-enable to explicitly enable, or configure in dler.ts",
|
|
623
648
|
"# Use --go-provider xgo for cross-compilation (requires xgo installed)",
|
|
624
|
-
"# Use --go-provider native for native builds (limited cross-compilation)"
|
|
649
|
+
"# Use --go-provider native for native builds (limited cross-compilation)",
|
|
650
|
+
"",
|
|
651
|
+
"# Build Type Selection Examples:",
|
|
652
|
+
"dler build --go-only",
|
|
653
|
+
"dler build --ts-only",
|
|
654
|
+
"dler build --go-only --go-targets linux/amd64",
|
|
655
|
+
"dler build --ts-only --target node --format cjs",
|
|
656
|
+
"",
|
|
657
|
+
"# Note: --go-only skips TypeScript builds and only builds Go binaries",
|
|
658
|
+
"# Note: --ts-only skips Go builds and only builds TypeScript/JavaScript",
|
|
659
|
+
"# Note: --go-only and --ts-only cannot be used together"
|
|
625
660
|
]
|
|
626
661
|
});
|
|
627
662
|
export default defineCmd(buildCmd, buildCmdArgs, buildCmdCfg);
|
package/dist/cmds/publish/cmd.js
CHANGED
|
@@ -44,7 +44,14 @@ const publishCmd = async (args) => {
|
|
|
44
44
|
bunRegistry: args.bunRegistry,
|
|
45
45
|
skipTip2FA: args.skipTip2FA
|
|
46
46
|
};
|
|
47
|
-
const results = await publishAllPackages(
|
|
47
|
+
const results = await publishAllPackages(
|
|
48
|
+
args.cwd,
|
|
49
|
+
args.ignore,
|
|
50
|
+
{
|
|
51
|
+
...options,
|
|
52
|
+
filter: args.filter
|
|
53
|
+
}
|
|
54
|
+
);
|
|
48
55
|
if (results.warningCount > 0) {
|
|
49
56
|
for (const result of results.results) {
|
|
50
57
|
if (result.warning) {
|
|
@@ -91,6 +98,10 @@ const publishCmdArgs = defineCmdArgs({
|
|
|
91
98
|
type: "string",
|
|
92
99
|
description: "Package(s) to ignore (supports wildcards like @reliverse/*)"
|
|
93
100
|
},
|
|
101
|
+
filter: {
|
|
102
|
+
type: "string",
|
|
103
|
+
description: "Package(s) to include (supports wildcards and comma-separated values like '@reliverse/dler-prompt,@reliverse/dler-build'). Takes precedence over --ignore when both are provided."
|
|
104
|
+
},
|
|
94
105
|
cwd: {
|
|
95
106
|
type: "string",
|
|
96
107
|
description: "Working directory (monorepo root)"
|
|
@@ -187,6 +198,8 @@ const publishCmdCfg = defineCmdCfg({
|
|
|
187
198
|
"dler publish",
|
|
188
199
|
"",
|
|
189
200
|
"# Monorepo examples:",
|
|
201
|
+
'dler publish --filter "@reliverse/dler-prompt,@reliverse/dler-build"',
|
|
202
|
+
'dler publish --filter "@reliverse/dler-*"',
|
|
190
203
|
'dler publish --ignore "@reliverse/*"',
|
|
191
204
|
'dler publish --ignore "@reliverse/dler-colors" --ignore "@reliverse/dler-v1"',
|
|
192
205
|
'dler publish --ignore "@reliverse/dler-colors @reliverse/dler-v1"',
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
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.1.
|
|
5
|
+
"version": "2.1.4",
|
|
6
6
|
"private": false,
|
|
7
7
|
"type": "module",
|
|
8
8
|
"bin": {
|
|
@@ -13,16 +13,16 @@
|
|
|
13
13
|
"semver": "^7.7.3",
|
|
14
14
|
"lookpath": "^1.2.3",
|
|
15
15
|
"clipboardy": "^5.0.0",
|
|
16
|
-
"@reliverse/dler-publish": "2.1.
|
|
17
|
-
"@reliverse/dler-bump": "2.1.
|
|
18
|
-
"@reliverse/dler-build": "2.1.
|
|
19
|
-
"@reliverse/dler-logger": "2.1.
|
|
20
|
-
"@reliverse/dler-matcher": "2.1.
|
|
21
|
-
"@reliverse/dler-launcher": "2.1.
|
|
22
|
-
"@reliverse/dler-prompt": "2.1.
|
|
23
|
-
"@reliverse/dler-helpers": "2.1.
|
|
24
|
-
"@reliverse/dler-pkg-tsc": "2.1.
|
|
25
|
-
"@reliverse/dler-mapper": "2.1.
|
|
16
|
+
"@reliverse/dler-publish": "2.1.4",
|
|
17
|
+
"@reliverse/dler-bump": "2.1.4",
|
|
18
|
+
"@reliverse/dler-build": "2.1.4",
|
|
19
|
+
"@reliverse/dler-logger": "2.1.4",
|
|
20
|
+
"@reliverse/dler-matcher": "2.1.4",
|
|
21
|
+
"@reliverse/dler-launcher": "2.1.4",
|
|
22
|
+
"@reliverse/dler-prompt": "2.1.4",
|
|
23
|
+
"@reliverse/dler-helpers": "2.1.4",
|
|
24
|
+
"@reliverse/dler-pkg-tsc": "2.1.4",
|
|
25
|
+
"@reliverse/dler-mapper": "2.1.4"
|
|
26
26
|
},
|
|
27
27
|
"keywords": [
|
|
28
28
|
"dler",
|