@reliverse/dler 1.6.3 → 1.6.5
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 +49 -1
- package/bin/app/agg/cmd.d.ts +0 -6
- package/bin/app/agg/cmd.js +6 -12
- package/bin/app/check/cmd.d.ts +16 -2
- package/bin/app/check/cmd.js +477 -25
- package/bin/app/cmds.d.ts +34 -35
- package/bin/app/deps/cmd.d.ts +21 -4
- package/bin/app/deps/cmd.js +31 -9
- package/bin/app/deps/impl/deps-types.d.ts +5 -0
- package/bin/app/deps/impl/wrapper.d.ts +2 -0
- package/bin/app/deps/impl/wrapper.js +57 -0
- package/bin/app/inject/cmd.d.ts +0 -1
- package/bin/app/inject/cmd.js +1 -2
- package/bin/app/libs/cmd.d.ts +0 -1
- package/bin/app/libs/cmd.js +0 -1
- package/bin/app/migrate/cmd.d.ts +0 -1
- package/bin/app/migrate/cmd.js +1 -2
- package/bin/app/relifso/cmd.d.ts +0 -1
- package/bin/app/relifso/cmd.js +1 -2
- package/bin/app/relifso/init/cmd.d.ts +0 -7
- package/bin/app/relifso/init/cmd.js +4 -11
- package/bin/app/relifso/rename/cmd.d.ts +0 -7
- package/bin/app/relifso/rename/cmd.js +5 -12
- package/bin/app/rempts/cmd/cmd.d.ts +0 -2
- package/bin/app/rempts/cmd/cmd.js +0 -2
- package/bin/app/rempts/cmdsTs/cmd.d.ts +0 -1
- package/bin/app/rempts/cmdsTs/cmd.js +0 -1
- package/bin/app/spell/cmd.d.ts +0 -2
- package/bin/app/spell/cmd.js +2 -4
- package/bin/init/info.js +1 -1
- package/bin/libs/sdk/sdk-impl/constants.d.ts +1 -0
- package/bin/libs/sdk/sdk-impl/constants.js +13 -0
- package/bin/libs/sdk/sdk-types.d.ts +31 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -150,6 +150,52 @@ bun tools:agg # shortcut for:
|
|
|
150
150
|
bun src/cli.ts tools --dev --tool agg --input src/libs/sdk/sdk-impl --out src/libs/sdk/sdk-mod.ts --recursive --named --strip src/libs/sdk
|
|
151
151
|
```
|
|
152
152
|
|
|
153
|
+
### 1.5. `check`
|
|
154
|
+
|
|
155
|
+
checks your project for common issues and potential improvements. This command performs several types of checks:
|
|
156
|
+
|
|
157
|
+
- **File Extensions**: Validates that files have the correct extensions based on their location and module resolution strategy
|
|
158
|
+
- Enforces `.ts` files in source and JSR distributions
|
|
159
|
+
- Enforces `.js` files in NPM distributions
|
|
160
|
+
- Supports `.css` and `.json` files in all environments
|
|
161
|
+
- Adapts to your module resolution strategy (bundler/nodenext)
|
|
162
|
+
|
|
163
|
+
- **Path Extensions**: Ensures import statements use the correct file extensions
|
|
164
|
+
- Validates import paths match your module resolution strategy
|
|
165
|
+
- Checks for proper extension usage in import statements
|
|
166
|
+
- Supports both relative and absolute imports
|
|
167
|
+
|
|
168
|
+
- **Dependencies**: Identifies missing dependencies in your project
|
|
169
|
+
- Scans all source files for imports
|
|
170
|
+
- Compares against package.json
|
|
171
|
+
- Reports missing dependencies
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
# Fully interactive mode (when no args provided)
|
|
175
|
+
dler check
|
|
176
|
+
|
|
177
|
+
# Mixed mode (some args provided, prompts for the rest)
|
|
178
|
+
dler check --directory src
|
|
179
|
+
dler check --checks file-extensions,path-extensions
|
|
180
|
+
dler check --strict
|
|
181
|
+
|
|
182
|
+
# Fully automated mode (all args provided)
|
|
183
|
+
dler check --directory src --checks file-extensions,path-extensions --strict
|
|
184
|
+
|
|
185
|
+
# Output in JSON format
|
|
186
|
+
dler check --json
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**arguments:**
|
|
190
|
+
|
|
191
|
+
- `--directory`: directory to check (src, dist-npm, dist-jsr, dist-libs/npm, dist-libs/jsr, or all)
|
|
192
|
+
- `--checks`: comma-separated list of checks to run (missing-dependencies, file-extensions, path-extensions)
|
|
193
|
+
- `--strict`: enable strict mode (requires explicit extensions)
|
|
194
|
+
- `--json`: output results in JSON format
|
|
195
|
+
|
|
196
|
+
**pro tip:**
|
|
197
|
+
the command will prompt you only for the arguments you haven't provided. for example, if you specify `--directory` but not `--checks`, it will only prompt you to select which checks to run.
|
|
198
|
+
|
|
153
199
|
### 2. `build`
|
|
154
200
|
|
|
155
201
|
since dler is fully modular, build command is separated for its own build-in plugin as well.
|
|
@@ -164,7 +210,7 @@ not yet documented.
|
|
|
164
210
|
|
|
165
211
|
### 4. `deps`
|
|
166
212
|
|
|
167
|
-
finds missing dependencies in your project by scanning your code for imports and comparing them to your `package.json`.
|
|
213
|
+
finds missing dependencies in your project by scanning your code for imports and comparing them to your `package.json`. This command is particularly useful for maintaining clean dependency lists and preventing runtime errors.
|
|
168
214
|
|
|
169
215
|
**what it does:**
|
|
170
216
|
|
|
@@ -179,6 +225,7 @@ finds missing dependencies in your project by scanning your code for imports and
|
|
|
179
225
|
- can also show all used dependencies (listed and missing)
|
|
180
226
|
- optionally includes node.js built-in modules in the report
|
|
181
227
|
- outputs results in a readable format or as json
|
|
228
|
+
- exits with error code 1 if missing dependencies are found
|
|
182
229
|
|
|
183
230
|
**usage examples:**
|
|
184
231
|
|
|
@@ -463,6 +510,7 @@ bun add @reliverse/dler-sdk
|
|
|
463
510
|
- [ ] allow plugins to extend dler's `defineconfig`
|
|
464
511
|
- [ ] support configuration via `.config/rse.{ts,jsonc}`
|
|
465
512
|
- [ ] make config file optional with sensible defaults
|
|
513
|
+
- [ ] use [@reliverse/remdn](https://github.com/reliverse/remdn) to generate npm/jsr readme
|
|
466
514
|
|
|
467
515
|
## related
|
|
468
516
|
|
package/bin/app/agg/cmd.d.ts
CHANGED
|
@@ -34,7 +34,6 @@ declare const _default: import("@reliverse/rempts").Command<{
|
|
|
34
34
|
sort: {
|
|
35
35
|
description: string;
|
|
36
36
|
type: "boolean";
|
|
37
|
-
default: false;
|
|
38
37
|
};
|
|
39
38
|
header: {
|
|
40
39
|
description: string;
|
|
@@ -43,12 +42,10 @@ declare const _default: import("@reliverse/rempts").Command<{
|
|
|
43
42
|
verbose: {
|
|
44
43
|
description: string;
|
|
45
44
|
type: "boolean";
|
|
46
|
-
default: false;
|
|
47
45
|
};
|
|
48
46
|
includeInternal: {
|
|
49
47
|
description: string;
|
|
50
48
|
type: "boolean";
|
|
51
|
-
default: false;
|
|
52
49
|
};
|
|
53
50
|
internalMarker: {
|
|
54
51
|
description: string;
|
|
@@ -58,7 +55,6 @@ declare const _default: import("@reliverse/rempts").Command<{
|
|
|
58
55
|
override: {
|
|
59
56
|
description: string;
|
|
60
57
|
type: "boolean";
|
|
61
|
-
default: false;
|
|
62
58
|
};
|
|
63
59
|
extensions: {
|
|
64
60
|
description: string;
|
|
@@ -68,12 +64,10 @@ declare const _default: import("@reliverse/rempts").Command<{
|
|
|
68
64
|
separateTypesFile: {
|
|
69
65
|
description: string;
|
|
70
66
|
type: "boolean";
|
|
71
|
-
default: false;
|
|
72
67
|
};
|
|
73
68
|
typesOut: {
|
|
74
69
|
description: string;
|
|
75
70
|
type: "string";
|
|
76
|
-
required: false;
|
|
77
71
|
};
|
|
78
72
|
}>;
|
|
79
73
|
export default _default;
|
package/bin/app/agg/cmd.js
CHANGED
|
@@ -37,8 +37,7 @@ export default defineCommand({
|
|
|
37
37
|
},
|
|
38
38
|
sort: {
|
|
39
39
|
description: "Sort aggregated lines alphabetically",
|
|
40
|
-
type: "boolean"
|
|
41
|
-
default: false
|
|
40
|
+
type: "boolean"
|
|
42
41
|
},
|
|
43
42
|
header: {
|
|
44
43
|
description: "Add a header comment to the aggregator output",
|
|
@@ -46,13 +45,11 @@ export default defineCommand({
|
|
|
46
45
|
},
|
|
47
46
|
verbose: {
|
|
48
47
|
description: "Enable verbose logging",
|
|
49
|
-
type: "boolean"
|
|
50
|
-
default: false
|
|
48
|
+
type: "boolean"
|
|
51
49
|
},
|
|
52
50
|
includeInternal: {
|
|
53
51
|
description: "Include files marked as internal (starting with #)",
|
|
54
|
-
type: "boolean"
|
|
55
|
-
default: false
|
|
52
|
+
type: "boolean"
|
|
56
53
|
},
|
|
57
54
|
internalMarker: {
|
|
58
55
|
description: "Marker for internal files (default: #)",
|
|
@@ -61,8 +58,7 @@ export default defineCommand({
|
|
|
61
58
|
},
|
|
62
59
|
override: {
|
|
63
60
|
description: "Override entire file instead of updating only the aggregator block",
|
|
64
|
-
type: "boolean"
|
|
65
|
-
default: false
|
|
61
|
+
type: "boolean"
|
|
66
62
|
},
|
|
67
63
|
extensions: {
|
|
68
64
|
description: "Comma-separated list of file extensions to process (default: .ts,.js,.mts,.cts,.mjs,.cjs)",
|
|
@@ -71,13 +67,11 @@ export default defineCommand({
|
|
|
71
67
|
},
|
|
72
68
|
separateTypesFile: {
|
|
73
69
|
description: "Create a separate file for type exports",
|
|
74
|
-
type: "boolean"
|
|
75
|
-
default: false
|
|
70
|
+
type: "boolean"
|
|
76
71
|
},
|
|
77
72
|
typesOut: {
|
|
78
73
|
description: "Output file path for types (used when separateTypesFile is true)",
|
|
79
|
-
type: "string"
|
|
80
|
-
required: false
|
|
74
|
+
type: "string"
|
|
81
75
|
}
|
|
82
76
|
}),
|
|
83
77
|
async run({ args }) {
|
package/bin/app/check/cmd.d.ts
CHANGED
|
@@ -1,7 +1,21 @@
|
|
|
1
|
+
import type { CheckResult, FileCheckOptions } from "../../libs/sdk/sdk-types.js";
|
|
2
|
+
export declare function checkFileExtensions(options: FileCheckOptions): Promise<CheckResult>;
|
|
3
|
+
export declare function checkPathExtensions(options: FileCheckOptions): Promise<CheckResult>;
|
|
1
4
|
declare const _default: import("@reliverse/rempts").Command<{
|
|
2
|
-
|
|
5
|
+
directory: {
|
|
3
6
|
type: "string";
|
|
4
|
-
|
|
7
|
+
description: string;
|
|
8
|
+
};
|
|
9
|
+
checks: {
|
|
10
|
+
type: "string";
|
|
11
|
+
description: string;
|
|
12
|
+
};
|
|
13
|
+
strict: {
|
|
14
|
+
type: "boolean";
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
json: {
|
|
18
|
+
type: "boolean";
|
|
5
19
|
description: string;
|
|
6
20
|
};
|
|
7
21
|
}>;
|