@reliverse/dler 2.2.17 → 2.3.1
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 +190 -55
- package/dist/cli.js +5 -2
- package/dist/cmds/biome/cmd.d.ts +5 -1
- package/dist/cmds/biome/cmd.js +20 -29
- package/dist/cmds/biome/impl.js +26 -21
- package/dist/cmds/build/cmd.d.ts +91 -1
- package/dist/cmds/build/cmd.js +289 -580
- package/dist/cmds/clean/cmd.d.ts +14 -1
- package/dist/cmds/clean/cmd.js +61 -112
- package/dist/cmds/clean/impl.js +61 -76
- package/dist/cmds/clean/presets.js +2 -9
- package/dist/cmds/init/cmd.d.ts +9 -0
- package/dist/cmds/init/cmd.js +87 -0
- package/dist/cmds/publish/cmd.d.ts +32 -1
- package/dist/cmds/publish/cmd.js +125 -165
- package/dist/cmds/senv/cmd.d.ts +7 -1
- package/dist/cmds/senv/cmd.js +41 -80
- package/dist/cmds/test/cmd.d.ts +9 -0
- package/dist/cmds/test/cmd.js +157 -0
- package/dist/cmds/tsc/cache.d.ts +2 -2
- package/dist/cmds/tsc/cache.js +37 -19
- package/dist/cmds/tsc/cmd.d.ts +14 -1
- package/dist/cmds/tsc/cmd.js +44 -80
- package/dist/cmds/tsc/impl.js +42 -92
- package/dist/cmds/update/cmd.d.ts +11 -1
- package/dist/cmds/update/cmd.js +57 -81
- package/dist/cmds/update/impl.js +16 -30
- package/dist/cmds/update/utils.js +116 -82
- package/dist/mod.d.ts +3 -0
- package/dist/mod.js +6 -0
- package/dist/utils/find-entry.d.ts +1 -0
- package/dist/utils/find-entry.js +46 -0
- package/package.json +53 -30
- package/src/cli.ts +9 -0
- package/LICENSE +0 -21
- /package/dist/{cmds/const.d.ts → const.d.ts} +0 -0
- /package/dist/{cmds/const.js → const.js} +0 -0
package/README.md
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
#
|
|
1
|
+
# dler
|
|
2
2
|
|
|
3
3
|
> **@reliverse/dler** is an open-source CLI & framework which helps developers build TypeScript/JavaScript libraries and CLI tools easily. It provides ready-to-use primitives, so you don't have to write them from scratch.
|
|
4
4
|
|
|
5
|
-
[Sponsor](https://github.com/sponsors/blefnk) — [Discord](https://discord.gg/Pb8uKbwpsJ) — [GitHub](https://github.com/reliverse/dler) — [NPM](https://npmjs.com/@reliverse/dler) — [Introduction](https://blefnk.reliverse.org/blog/articles/package-managers)
|
|
6
|
-
|
|
7
5
|
## CLI Installation
|
|
8
6
|
|
|
9
7
|
```bash
|
|
@@ -37,89 +35,226 @@ import { logger } from "@reliverse/relinka";
|
|
|
37
35
|
logger.success("Hello, Reliverse!"); // > ✓ Hello, Reliverse!
|
|
38
36
|
```
|
|
39
37
|
|
|
40
|
-
##
|
|
38
|
+
## Usage
|
|
39
|
+
|
|
40
|
+
- `--port, -p` - Debugger port (default: 9229)
|
|
41
|
+
- `--cmdsDir` - Commands directory for codegen (default: commands)
|
|
42
|
+
- `--generate` - Enable/disable code generation (default: true)
|
|
43
|
+
- `--clearScreen` - Clear screen on reload (default: true)
|
|
44
|
+
|
|
45
|
+
**Note:** Development mode automatically generates TypeScript definitions from your commands when codegen is enabled in your config.
|
|
41
46
|
|
|
42
|
-
|
|
43
|
-
2. `@reliverse/build`
|
|
44
|
-
3. `@reliverse/config`
|
|
45
|
-
4. `@reliverse/helpers`
|
|
46
|
-
5. `@reliverse/relico`
|
|
47
|
-
6. `@reliverse/mapkit`
|
|
48
|
-
7. `@reliverse/rempts`
|
|
49
|
-
8. `@reliverse/relinka`
|
|
50
|
-
9. `@reliverse/matcha`
|
|
51
|
-
10. `@reliverse/typerso`
|
|
52
|
-
11. `@reliverse/rempts`
|
|
53
|
-
12. `@reliverse/dler-spinner`
|
|
54
|
-
13. `@reliverse/publish`
|
|
47
|
+
### Building
|
|
55
48
|
|
|
56
|
-
|
|
49
|
+
Build your CLI for production with automatic type generation:
|
|
57
50
|
|
|
58
|
-
|
|
51
|
+
```bash
|
|
52
|
+
# Traditional build (requires Bun runtime)
|
|
53
|
+
dler build
|
|
54
|
+
|
|
55
|
+
# Build standalone executables for specific platforms
|
|
56
|
+
dler build --targets darwin-arm64,linux-x64
|
|
59
57
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
3. `dler init` automatically generates a monorepo and the requested packages.
|
|
63
|
-
4. `dler integrate` automatically installs and configures integrations like Next.js, Ultracite/Biome, etc.
|
|
64
|
-
5. `dler perf` runs performance benchmarks for the requested target.
|
|
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 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).
|
|
58
|
+
# Build for the current platform only
|
|
59
|
+
dler build --targets native
|
|
71
60
|
|
|
72
|
-
|
|
61
|
+
# Build for all supported platforms
|
|
62
|
+
dler build --targets all
|
|
63
|
+
```
|
|
73
64
|
|
|
74
|
-
Docs for v2 will be available soon. For now, you can read the v1 docs, or check alpha docs in [relidocs](./relidocs) directory in the root of the project. For example, you can [learn Dler CLI defaults](./relidocs/DEFAULTS.md) there.
|
|
75
65
|
|
|
76
|
-
## v1 Docs
|
|
77
66
|
|
|
78
|
-
|
|
67
|
+
### Available Commands
|
|
79
68
|
|
|
80
|
-
|
|
69
|
+
- `dler init` - Initialize a new @reliverse/dler project
|
|
70
|
+
- `dler build` - Build your CLI for production
|
|
71
|
+
- `dler test` - Run tests with Bun test runner
|
|
72
|
+
- `dler release` - Release your CLI package
|
|
81
73
|
|
|
82
|
-
|
|
74
|
+
### Project Initialization
|
|
83
75
|
|
|
84
|
-
|
|
76
|
+
Create a new @reliverse/dler project:
|
|
85
77
|
|
|
86
78
|
```bash
|
|
87
|
-
|
|
79
|
+
# Interactive setup
|
|
80
|
+
dler init
|
|
81
|
+
|
|
82
|
+
# With project name
|
|
83
|
+
dler init my-cli
|
|
84
|
+
|
|
85
|
+
# Advanced template
|
|
86
|
+
dler init my-cli --template advanced
|
|
87
|
+
|
|
88
|
+
# Specify directory
|
|
89
|
+
dler init --name my-cli --dir ./projects
|
|
90
|
+
|
|
91
|
+
# Skip git/install
|
|
92
|
+
dler init --no-git --no-install
|
|
88
93
|
```
|
|
89
94
|
|
|
90
|
-
|
|
95
|
+
Init options:
|
|
96
|
+
|
|
97
|
+
- `--name, -n` - Project name
|
|
98
|
+
- `--template, -t` - Project template (basic/advanced/monorepo)
|
|
99
|
+
- `--dir, -d` - Directory to create project in
|
|
100
|
+
- `--git, -g` - Initialize git repository (default: true)
|
|
101
|
+
- `--install` - Install dependencies (default: true)
|
|
102
|
+
- `--package-manager, -p` - Package manager to use (bun/pnpm/yarn/npm)
|
|
91
103
|
|
|
92
|
-
|
|
104
|
+
### Testing
|
|
93
105
|
|
|
94
|
-
|
|
106
|
+
Run tests for your CLI:
|
|
95
107
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
108
|
+
```bash
|
|
109
|
+
# Run all tests
|
|
110
|
+
dler test
|
|
111
|
+
|
|
112
|
+
# Watch mode
|
|
113
|
+
dler test --watch
|
|
114
|
+
|
|
115
|
+
# Generate coverage
|
|
116
|
+
dler test --coverage
|
|
117
|
+
|
|
118
|
+
# Run tests in all workspace packages
|
|
119
|
+
dler test --all
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Test options:
|
|
99
123
|
|
|
100
|
-
|
|
124
|
+
- `--pattern, -p` - Test file patterns
|
|
125
|
+
- `--watch, -w` - Watch for changes
|
|
126
|
+
- `--coverage, -c` - Generate coverage report
|
|
127
|
+
- `--bail, -b` - Stop on first failure
|
|
128
|
+
- `--timeout` - Test timeout in milliseconds
|
|
129
|
+
- `--all` - Run tests in all packages (workspace mode)
|
|
101
130
|
|
|
102
|
-
|
|
131
|
+
### Releasing
|
|
132
|
+
|
|
133
|
+
Create a release of your CLI:
|
|
103
134
|
|
|
104
135
|
```bash
|
|
105
|
-
|
|
136
|
+
# Interactive release
|
|
137
|
+
dler release
|
|
138
|
+
|
|
139
|
+
# Specific version bump
|
|
140
|
+
dler release --version patch
|
|
141
|
+
dler release --version minor
|
|
142
|
+
dler release --version major
|
|
143
|
+
dler release --version 2.0.0
|
|
144
|
+
|
|
145
|
+
# Dry run
|
|
146
|
+
dler release --dry
|
|
147
|
+
|
|
148
|
+
# Release all workspace packages
|
|
149
|
+
dler release --all
|
|
106
150
|
```
|
|
107
151
|
|
|
108
|
-
|
|
152
|
+
Release options:
|
|
153
|
+
|
|
154
|
+
- `--version, -v` - Version to release (patch/minor/major/x.y.z)
|
|
155
|
+
- `--tag, -t` - Git tag format
|
|
156
|
+
- `--npm` - Publish to npm
|
|
157
|
+
- `--github` - Create GitHub release
|
|
158
|
+
- `--dry, -d` - Dry run - show what would be done
|
|
159
|
+
- `--all` - Release all packages (workspace mode)
|
|
160
|
+
|
|
161
|
+
### Build Options
|
|
162
|
+
|
|
163
|
+
The `build` command supports several options:
|
|
164
|
+
|
|
165
|
+
- `--entry, -e` - Entry file (defaults to auto-detect)
|
|
166
|
+
- `--outdir, -o` - Output directory (default: ./dist)
|
|
167
|
+
- `--outfile` - Output filename (for single executable)
|
|
168
|
+
- `--targets, -t` - Target platforms for compilation (comma-separated)
|
|
169
|
+
- `--minify, -m` - Minify output (default: true)
|
|
170
|
+
- `--sourcemap, -s` - Generate sourcemaps
|
|
171
|
+
- `--bytecode` - Enable bytecode compilation (experimental)
|
|
172
|
+
- `--runtime, -r` - Runtime target for non-compiled builds (bun/node)
|
|
173
|
+
- `--watch, -w` - Watch for changes
|
|
174
|
+
|
|
175
|
+
### Standalone Executables
|
|
176
|
+
|
|
177
|
+
Dler creates standalone executables when you specify target platforms. This bundles your CLI application with the Bun runtime into a single binary that can run without requiring Bun to be installed.
|
|
109
178
|
|
|
110
179
|
```bash
|
|
111
|
-
|
|
180
|
+
# Build for specific platforms
|
|
181
|
+
dler build --targets darwin-arm64,linux-x64,windows-x64
|
|
182
|
+
|
|
183
|
+
# Build for current platform only
|
|
184
|
+
dler build --targets native
|
|
185
|
+
|
|
186
|
+
# Build for all platforms
|
|
187
|
+
dler build --targets all
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Supported platforms:
|
|
191
|
+
|
|
192
|
+
- `darwin-arm64` - macOS Apple Silicon
|
|
193
|
+
- `darwin-x64` - macOS Intel
|
|
194
|
+
- `linux-arm64` - Linux ARM64
|
|
195
|
+
- `linux-x64` - Linux x64
|
|
196
|
+
- `windows-x64` - Windows x64
|
|
197
|
+
|
|
198
|
+
### Configuration
|
|
199
|
+
|
|
200
|
+
Create a `dler.config.ts` file in your project root:
|
|
201
|
+
|
|
202
|
+
```typescript
|
|
203
|
+
import { defineConfig } from '@reliverse/dler'
|
|
204
|
+
|
|
205
|
+
export default defineConfig({
|
|
206
|
+
name: 'my-cli',
|
|
207
|
+
version: '1.0.0',
|
|
208
|
+
|
|
209
|
+
build: {
|
|
210
|
+
entry: './src/cli.ts',
|
|
211
|
+
outdir: './dist',
|
|
212
|
+
targets: ['darwin-arm64', 'linux-x64'], // Compile for these platforms
|
|
213
|
+
compress: true, // Compress multi-platform builds
|
|
214
|
+
minify: true,
|
|
215
|
+
external: ['some-native-module']
|
|
216
|
+
},
|
|
217
|
+
|
|
218
|
+
dev: {
|
|
219
|
+
watch: true,
|
|
220
|
+
inspect: false
|
|
221
|
+
}
|
|
222
|
+
})
|
|
112
223
|
```
|
|
113
224
|
|
|
114
|
-
|
|
225
|
+
### Build Behavior
|
|
226
|
+
|
|
227
|
+
The build system works as follows:
|
|
228
|
+
|
|
229
|
+
1. **No targets specified** → Traditional JavaScript build
|
|
230
|
+
- Creates bundled `.js` files with shebangs
|
|
231
|
+
- Requires Bun (or Node.js) runtime to execute
|
|
232
|
+
- Supports multiple entry points
|
|
233
|
+
|
|
234
|
+
2. **Targets specified** → Standalone executables
|
|
235
|
+
- Creates native binaries with embedded Bun runtime
|
|
236
|
+
- No runtime dependencies required
|
|
237
|
+
- Single entry point only
|
|
238
|
+
- Platform-specific subdirectories for multiple targets
|
|
115
239
|
|
|
116
|
-
|
|
117
|
-
- 💛 Every dollar helps stop [russia's war crimes](https://war.ukraine.ua/russia-war-crimes) and saves lives.
|
|
240
|
+
## Development
|
|
118
241
|
|
|
119
|
-
|
|
242
|
+
To work on Dler itself:
|
|
120
243
|
|
|
121
|
-
|
|
244
|
+
```bash
|
|
245
|
+
# Install dependencies
|
|
246
|
+
bun install
|
|
247
|
+
|
|
248
|
+
# Run in development
|
|
249
|
+
bun run dev
|
|
250
|
+
|
|
251
|
+
# Build
|
|
252
|
+
bun run build
|
|
253
|
+
|
|
254
|
+
# Run tests
|
|
255
|
+
bun test
|
|
256
|
+
```
|
|
122
257
|
|
|
123
258
|
## License
|
|
124
259
|
|
|
125
|
-
|
|
260
|
+
MIT
|
package/dist/cli.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
import {
|
|
3
|
-
await
|
|
2
|
+
import { createApp } from "@reliverse/rempts-core";
|
|
3
|
+
const cli = await createApp({
|
|
4
|
+
entryFile: import.meta.path
|
|
5
|
+
});
|
|
6
|
+
await cli.run();
|
package/dist/cmds/biome/cmd.d.ts
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: import("@reliverse/rempts-core").Command<{
|
|
2
|
+
cwd: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
3
|
+
verbose: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
4
|
+
copyLogs: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
5
|
+
}, {}, string>;
|
|
2
6
|
export default _default;
|
package/dist/cmds/biome/cmd.js
CHANGED
|
@@ -1,44 +1,35 @@
|
|
|
1
1
|
import { logger } from "@reliverse/relinka";
|
|
2
|
-
import {
|
|
2
|
+
import { defineCommand, option } from "@reliverse/rempts-core";
|
|
3
|
+
import { type } from "arktype";
|
|
3
4
|
import { runBiomeCheck } from "./impl.js";
|
|
4
5
|
export default defineCommand({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
examples: [
|
|
9
|
-
"dler biome",
|
|
10
|
-
"dler biome --cwd /path/to/project",
|
|
11
|
-
"dler biome --verbose",
|
|
12
|
-
"dler biome --copy-logs",
|
|
13
|
-
"dler biome --verbose --copy-logs"
|
|
14
|
-
]
|
|
15
|
-
},
|
|
16
|
-
args: defineArgs({
|
|
17
|
-
cwd: {
|
|
18
|
-
type: "string",
|
|
6
|
+
description: "Run Biome linting and formatting check on workspace",
|
|
7
|
+
options: {
|
|
8
|
+
cwd: option(type("string | undefined"), {
|
|
19
9
|
description: "Working directory to run biome from (default: current directory)"
|
|
20
|
-
},
|
|
21
|
-
verbose: {
|
|
22
|
-
type: "boolean",
|
|
10
|
+
}),
|
|
11
|
+
verbose: option(type("boolean | undefined"), {
|
|
23
12
|
description: "Verbose mode (default: false)"
|
|
24
|
-
},
|
|
25
|
-
copyLogs: {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}),
|
|
31
|
-
run: async ({ args }) => {
|
|
13
|
+
}),
|
|
14
|
+
copyLogs: option(type("boolean | undefined"), {
|
|
15
|
+
description: "Copy diagnostics to clipboard (default: true, skipped in CI)"
|
|
16
|
+
})
|
|
17
|
+
},
|
|
18
|
+
handler: async ({ flags }) => {
|
|
32
19
|
try {
|
|
33
20
|
if (typeof process.versions.bun === "undefined") {
|
|
34
21
|
logger.error("\u274C This command requires Bun runtime. Sorry.");
|
|
35
22
|
process.exit(1);
|
|
36
23
|
}
|
|
24
|
+
const verbose = flags.verbose ?? false;
|
|
25
|
+
const copyLogs = flags.copyLogs ?? true;
|
|
37
26
|
const isCI = process.env.CI === "true" || !process.stdout.isTTY;
|
|
38
|
-
const shouldCopyLogs =
|
|
27
|
+
const shouldCopyLogs = copyLogs !== false && !isCI;
|
|
39
28
|
const result = await runBiomeCheck({
|
|
40
|
-
cwd:
|
|
41
|
-
|
|
29
|
+
cwd: flags.cwd || process.cwd(),
|
|
30
|
+
// Type '{}' is not assignable to type 'string'.
|
|
31
|
+
verbose,
|
|
32
|
+
// Type '{}' is not assignable to type 'boolean | undefined'.
|
|
42
33
|
copyLogs: shouldCopyLogs
|
|
43
34
|
});
|
|
44
35
|
if (!result.success) {
|
package/dist/cmds/biome/impl.js
CHANGED
|
@@ -33,14 +33,20 @@ const parseBiomeOutput = (output, cwd) => {
|
|
|
33
33
|
const infoPattern = /^\s+i\s+(.+)$/;
|
|
34
34
|
for (let i = 0; i < lines.length; i++) {
|
|
35
35
|
const line = lines[i];
|
|
36
|
-
if (!line)
|
|
36
|
+
if (!line) {
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
37
39
|
const fileMatch = line.match(fileLinePattern);
|
|
38
40
|
if (fileMatch) {
|
|
39
41
|
if (currentDiagnostic?.file) {
|
|
40
42
|
diagnostics.push(currentDiagnostic);
|
|
41
|
-
if (currentDiagnostic.severity === "error")
|
|
42
|
-
|
|
43
|
-
else if (currentDiagnostic.severity === "
|
|
43
|
+
if (currentDiagnostic.severity === "error") {
|
|
44
|
+
errors++;
|
|
45
|
+
} else if (currentDiagnostic.severity === "warning") {
|
|
46
|
+
warnings++;
|
|
47
|
+
} else if (currentDiagnostic.severity === "info") {
|
|
48
|
+
infos++;
|
|
49
|
+
}
|
|
44
50
|
}
|
|
45
51
|
const file = fileMatch[1];
|
|
46
52
|
const lineNum = fileMatch[2];
|
|
@@ -61,16 +67,18 @@ const parseBiomeOutput = (output, cwd) => {
|
|
|
61
67
|
}
|
|
62
68
|
continue;
|
|
63
69
|
}
|
|
64
|
-
if (!inDiagnostic
|
|
70
|
+
if (!(inDiagnostic && currentDiagnostic)) {
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
65
73
|
const errorMatch = line.match(errorPattern);
|
|
66
74
|
if (errorMatch) {
|
|
67
|
-
currentDiagnostic.message = errorMatch[1]?.trim();
|
|
75
|
+
currentDiagnostic.message = errorMatch[1]?.trim() ?? "";
|
|
68
76
|
currentDiagnostic.severity = "error";
|
|
69
77
|
continue;
|
|
70
78
|
}
|
|
71
79
|
const infoMatch = line.match(infoPattern);
|
|
72
80
|
if (infoMatch) {
|
|
73
|
-
currentDiagnostic.suggestion = infoMatch[1]?.trim();
|
|
81
|
+
currentDiagnostic.suggestion = infoMatch[1]?.trim() ?? "";
|
|
74
82
|
if (!currentDiagnostic.message) {
|
|
75
83
|
currentDiagnostic.severity = "info";
|
|
76
84
|
}
|
|
@@ -82,9 +90,13 @@ const parseBiomeOutput = (output, cwd) => {
|
|
|
82
90
|
}
|
|
83
91
|
if (currentDiagnostic?.file) {
|
|
84
92
|
diagnostics.push(currentDiagnostic);
|
|
85
|
-
if (currentDiagnostic.severity === "error")
|
|
86
|
-
|
|
87
|
-
else if (currentDiagnostic.severity === "
|
|
93
|
+
if (currentDiagnostic.severity === "error") {
|
|
94
|
+
errors++;
|
|
95
|
+
} else if (currentDiagnostic.severity === "warning") {
|
|
96
|
+
warnings++;
|
|
97
|
+
} else if (currentDiagnostic.severity === "info") {
|
|
98
|
+
infos++;
|
|
99
|
+
}
|
|
88
100
|
}
|
|
89
101
|
const summaryMatch = output.match(/Found (\d+) errors?/i);
|
|
90
102
|
const errorCount = summaryMatch?.[1];
|
|
@@ -143,9 +155,7 @@ const collectBiomeLogs = (result, cwd) => {
|
|
|
143
155
|
byRule.set(rule, existing);
|
|
144
156
|
}
|
|
145
157
|
for (const [rule, ruleDiags] of byRule) {
|
|
146
|
-
logs.push(
|
|
147
|
-
`\u{1F50D} ${rule} (${ruleDiags.length} occurrence${ruleDiags.length > 1 ? "s" : ""})`
|
|
148
|
-
);
|
|
158
|
+
logs.push(`\u{1F50D} ${rule} (${ruleDiags.length} occurrence${ruleDiags.length > 1 ? "s" : ""})`);
|
|
149
159
|
logs.push(` ${"\u2500".repeat(30)}`);
|
|
150
160
|
const firstDiag = ruleDiags[0];
|
|
151
161
|
if (firstDiag) {
|
|
@@ -185,7 +195,7 @@ const copyLogsToClipboard = async (result, cwd) => {
|
|
|
185
195
|
};
|
|
186
196
|
const formatOutput = (result, cwd) => {
|
|
187
197
|
logger.log("\u2501".repeat(60));
|
|
188
|
-
logger.log(
|
|
198
|
+
logger.log("\u{1F4CA} Biome Check Summary:");
|
|
189
199
|
logger.log(` \u{1F41B} Total errors: ${result.errors}`);
|
|
190
200
|
logger.log(` \u26A0\uFE0F Total warnings: ${result.warnings}`);
|
|
191
201
|
logger.log(` \u2139\uFE0F Total infos: ${result.infos}`);
|
|
@@ -202,9 +212,7 @@ const formatOutput = (result, cwd) => {
|
|
|
202
212
|
byRule.set(rule, existing);
|
|
203
213
|
}
|
|
204
214
|
for (const [rule, ruleDiags] of byRule) {
|
|
205
|
-
logger.error(
|
|
206
|
-
`\u{1F50D} ${rule} (${ruleDiags.length} occurrence${ruleDiags.length > 1 ? "s" : ""})`
|
|
207
|
-
);
|
|
215
|
+
logger.error(`\u{1F50D} ${rule} (${ruleDiags.length} occurrence${ruleDiags.length > 1 ? "s" : ""})`);
|
|
208
216
|
logger.error(` ${"\u2500".repeat(30)}`);
|
|
209
217
|
const firstDiag = ruleDiags[0];
|
|
210
218
|
if (firstDiag) {
|
|
@@ -234,10 +242,7 @@ export const runBiomeCheck = async (options = {}) => {
|
|
|
234
242
|
try {
|
|
235
243
|
const { stdout, stderr } = await runBiomeCommand(resolvedCwd);
|
|
236
244
|
const output = stdout + stderr;
|
|
237
|
-
const { diagnostics, errors, warnings, infos } = parseBiomeOutput(
|
|
238
|
-
output,
|
|
239
|
-
resolvedCwd
|
|
240
|
-
);
|
|
245
|
+
const { diagnostics, errors, warnings, infos } = parseBiomeOutput(output, resolvedCwd);
|
|
241
246
|
const filteredOutput = formatFilteredOutput(diagnostics, resolvedCwd);
|
|
242
247
|
const result = {
|
|
243
248
|
success: errors === 0,
|
package/dist/cmds/build/cmd.d.ts
CHANGED
|
@@ -1,2 +1,92 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: import("@reliverse/rempts-core").Command<{
|
|
2
|
+
ignore: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
3
|
+
filter: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
4
|
+
cwd: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
5
|
+
concurrency: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<number | undefined, {}>>;
|
|
6
|
+
stopOnError: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
7
|
+
verbose: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
8
|
+
watch: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
9
|
+
bundler: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
10
|
+
target: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
11
|
+
format: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
12
|
+
minify: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
13
|
+
minifyWhitespace: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
14
|
+
minifySyntax: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
15
|
+
minifyIdentifiers: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
16
|
+
sourcemap: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
17
|
+
splitting: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
18
|
+
external: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
19
|
+
bytecode: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
20
|
+
drop: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
21
|
+
packages: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
22
|
+
publicPath: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
23
|
+
root: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
24
|
+
define: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
25
|
+
naming: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
26
|
+
env: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
27
|
+
banner: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
28
|
+
footer: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
29
|
+
conditions: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
30
|
+
loader: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
31
|
+
ignoreDCEAnnotations: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
32
|
+
emitDCEAnnotations: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
33
|
+
throw: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
34
|
+
production: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
35
|
+
dev: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
36
|
+
library: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
37
|
+
react: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
38
|
+
node: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
39
|
+
monorepo: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
40
|
+
compile: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
41
|
+
allowPrivateBuild: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
42
|
+
replaceExports: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
43
|
+
replaceExportsIgnorePackages: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
44
|
+
loggerClearInternals: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
45
|
+
loggerClearInternalsIgnorePackages: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
46
|
+
cache: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
47
|
+
noCache: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
48
|
+
generateTypes: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
49
|
+
typeCheck: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
50
|
+
validateTsconfig: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
51
|
+
strictTsconfig: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
52
|
+
dtsProvider: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
53
|
+
maxConfigDepth: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<number | undefined, {}>>;
|
|
54
|
+
entryNaming: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
55
|
+
chunkNaming: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
56
|
+
assetNaming: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
57
|
+
noBundle: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
58
|
+
reactFastRefresh: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
59
|
+
noClearScreen: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
60
|
+
app: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
61
|
+
serverComponents: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
62
|
+
debugDumpServerFiles: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
63
|
+
debugNoMinify: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
64
|
+
bundleAnalyzer: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
65
|
+
performanceMonitoring: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
66
|
+
bundleSizeLimit: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<number | undefined, {}>>;
|
|
67
|
+
performanceBudget: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
68
|
+
imageOptimization: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
69
|
+
fontOptimization: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
70
|
+
cssOptimization: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
71
|
+
svgAsReact: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
72
|
+
cssModules: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
73
|
+
workerSupport: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
74
|
+
plugins: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
75
|
+
macros: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
76
|
+
sideEffects: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
77
|
+
devServer: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
78
|
+
port: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<number | undefined, {}>>;
|
|
79
|
+
open: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
80
|
+
html: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
81
|
+
cssChunking: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
82
|
+
publicAssets: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
83
|
+
assets: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
84
|
+
kind: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
85
|
+
entry: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
86
|
+
outdir: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
87
|
+
outfile: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
88
|
+
runtime: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<"bun" | "node" | undefined, {}>>;
|
|
89
|
+
targets: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<string | undefined, {}>>;
|
|
90
|
+
compress: import("@reliverse/rempts-core").CLIOption<import("arktype").BaseType<boolean | undefined, {}>>;
|
|
91
|
+
}, {}, string>;
|
|
2
92
|
export default _default;
|