@reliverse/dler 1.6.2 → 1.6.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/bin/app/cmds.d.ts CHANGED
@@ -34,7 +34,6 @@ export declare function getCmdAgg(): Promise<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 @@ export declare function getCmdAgg(): Promise<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 @@ export declare function getCmdAgg(): Promise<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 @@ export declare function getCmdAgg(): Promise<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 declare function getCmdBuild(): Promise<import("@reliverse/rempts").Command<{
@@ -83,9 +77,20 @@ export declare function getCmdBuild(): Promise<import("@reliverse/rempts").Comma
83
77
  };
84
78
  }>>;
85
79
  export declare function getCmdCheck(): Promise<import("@reliverse/rempts").Command<{
86
- exampleArg: {
80
+ directory: {
87
81
  type: "string";
88
- default: string;
82
+ description: string;
83
+ };
84
+ checks: {
85
+ type: "string";
86
+ description: string;
87
+ };
88
+ strict: {
89
+ type: "boolean";
90
+ description: string;
91
+ };
92
+ json: {
93
+ type: "boolean";
89
94
  description: string;
90
95
  };
91
96
  }>>;
@@ -130,22 +135,39 @@ export declare function getCmdDeps(): Promise<import("@reliverse/rempts").Comman
130
135
  all: {
131
136
  type: "boolean";
132
137
  description: string;
133
- default: false;
134
138
  };
135
139
  ignore: {
136
140
  type: "string";
137
141
  description: string;
138
- default: string;
139
142
  };
140
143
  json: {
141
144
  type: "boolean";
142
145
  description: string;
143
- default: false;
144
146
  };
145
147
  builtins: {
146
148
  type: "boolean";
147
149
  description: string;
148
- default: false;
150
+ };
151
+ dev: {
152
+ type: "boolean";
153
+ description: string;
154
+ };
155
+ peer: {
156
+ type: "boolean";
157
+ description: string;
158
+ };
159
+ optional: {
160
+ type: "boolean";
161
+ description: string;
162
+ };
163
+ fix: {
164
+ type: "boolean";
165
+ description: string;
166
+ };
167
+ depth: {
168
+ type: "number";
169
+ description: string;
170
+ default: number;
149
171
  };
150
172
  }>>;
151
173
  export declare function getCmdInject(): Promise<import("@reliverse/rempts").Command<{
@@ -156,7 +178,6 @@ export declare function getCmdInject(): Promise<import("@reliverse/rempts").Comm
156
178
  cwd: {
157
179
  type: "string";
158
180
  description: string;
159
- required: false;
160
181
  };
161
182
  }>>;
162
183
  export declare function getCmdInjectExpect(): Promise<import("@reliverse/rempts").Command<{
@@ -186,7 +207,6 @@ export declare function getCmdLibs(): Promise<import("@reliverse/rempts").Comman
186
207
  };
187
208
  overwrite: {
188
209
  type: "boolean";
189
- default: false;
190
210
  description: string;
191
211
  };
192
212
  }>>;
@@ -246,7 +266,6 @@ export declare function getCmdMigrate(): Promise<import("@reliverse/rempts").Com
246
266
  dryRun: {
247
267
  type: "boolean";
248
268
  description: string;
249
- default: false;
250
269
  };
251
270
  }>>;
252
271
  export declare function getCmdPub(): Promise<import("@reliverse/rempts").Command<{
@@ -263,7 +282,6 @@ export declare function getCmdRelifso(): Promise<import("@reliverse/rempts").Com
263
282
  cwd: {
264
283
  type: "string";
265
284
  description: string;
266
- required: false;
267
285
  };
268
286
  }>>;
269
287
  export declare function getCmdRelifsoInit(): Promise<import("@reliverse/rempts").Command<{
@@ -274,30 +292,23 @@ export declare function getCmdRelifsoInit(): Promise<import("@reliverse/rempts")
274
292
  fileType: {
275
293
  type: "string";
276
294
  description: string;
277
- required: false;
278
295
  };
279
296
  destDir: {
280
297
  type: "string";
281
298
  description: string;
282
299
  default: string;
283
- required: false;
284
300
  };
285
301
  multiple: {
286
302
  type: "boolean";
287
303
  description: string;
288
- required: false;
289
- default: false;
290
304
  };
291
305
  parallel: {
292
306
  type: "boolean";
293
307
  description: string;
294
- required: false;
295
- default: false;
296
308
  };
297
309
  concurrency: {
298
310
  type: "string";
299
311
  description: string;
300
- required: false;
301
312
  default: string;
302
313
  };
303
314
  }>>;
@@ -309,34 +320,27 @@ export declare function getCmdRelifsoRename(): Promise<import("@reliverse/rempts
309
320
  prepareMyCLI: {
310
321
  type: "boolean";
311
322
  description: string;
312
- required: false;
313
323
  };
314
324
  revert: {
315
325
  type: "boolean";
316
326
  description: string;
317
- required: false;
318
327
  };
319
328
  source: {
320
329
  type: "string";
321
330
  description: string;
322
- required: false;
323
331
  };
324
332
  destination: {
325
333
  type: "string";
326
334
  description: string;
327
- required: false;
328
335
  };
329
336
  recursive: {
330
337
  type: "boolean";
331
338
  description: string;
332
- required: false;
333
339
  default: true;
334
340
  };
335
341
  useDtsTxtForPrepareMyCLI: {
336
342
  type: "boolean";
337
343
  description: string;
338
- required: false;
339
- default: false;
340
344
  };
341
345
  }>>;
342
346
  export declare function getCmdRelinka(): Promise<import("@reliverse/rempts").Command<{
@@ -364,12 +368,10 @@ export declare function getCmdRemptsCmd(): Promise<import("@reliverse/rempts").C
364
368
  };
365
369
  overwrite: {
366
370
  type: "boolean";
367
- default: false;
368
371
  description: string;
369
372
  };
370
373
  customCmdsRoot: {
371
374
  type: "string";
372
- default: string;
373
375
  description: string;
374
376
  };
375
377
  }>>;
@@ -385,7 +387,6 @@ export declare function getCmdRemptsCmdsTs(): Promise<import("@reliverse/rempts"
385
387
  };
386
388
  overwrite: {
387
389
  type: "boolean";
388
- default: false;
389
390
  description: string;
390
391
  };
391
392
  }>>;
@@ -411,12 +412,10 @@ export declare function getCmdSpell(): Promise<import("@reliverse/rempts").Comma
411
412
  files: {
412
413
  type: "string";
413
414
  description: string;
414
- default: string;
415
415
  };
416
416
  dryRun: {
417
417
  type: "boolean";
418
418
  description: string;
419
- default: false;
420
419
  };
421
420
  }>>;
422
421
  export declare function getCmdSplit(): Promise<import("@reliverse/rempts").Command<{
@@ -7,22 +7,39 @@ declare const _default: import("@reliverse/rempts").Command<{
7
7
  all: {
8
8
  type: "boolean";
9
9
  description: string;
10
- default: false;
11
10
  };
12
11
  ignore: {
13
12
  type: "string";
14
13
  description: string;
15
- default: string;
16
14
  };
17
15
  json: {
18
16
  type: "boolean";
19
17
  description: string;
20
- default: false;
21
18
  };
22
19
  builtins: {
23
20
  type: "boolean";
24
21
  description: string;
25
- default: false;
22
+ };
23
+ dev: {
24
+ type: "boolean";
25
+ description: string;
26
+ };
27
+ peer: {
28
+ type: "boolean";
29
+ description: string;
30
+ };
31
+ optional: {
32
+ type: "boolean";
33
+ description: string;
34
+ };
35
+ fix: {
36
+ type: "boolean";
37
+ description: string;
38
+ };
39
+ depth: {
40
+ type: "number";
41
+ description: string;
42
+ default: number;
26
43
  };
27
44
  }>;
28
45
  export default _default;
@@ -17,23 +17,40 @@ export default defineCommand({
17
17
  },
18
18
  all: {
19
19
  type: "boolean",
20
- description: "show all dependencies (both listed and not listed)",
21
- default: false
20
+ description: "show all dependencies (both listed and not listed)"
22
21
  },
23
22
  ignore: {
24
23
  type: "string",
25
- description: "comma-separated patterns to ignore",
26
- default: ""
24
+ description: "comma-separated patterns to ignore"
27
25
  },
28
26
  json: {
29
27
  type: "boolean",
30
- description: "output in JSON format",
31
- default: false
28
+ description: "output in JSON format"
32
29
  },
33
30
  builtins: {
34
31
  type: "boolean",
35
- description: "include Node.js built-in modules in the output",
36
- default: false
32
+ description: "include Node.js built-in modules in the output"
33
+ },
34
+ dev: {
35
+ type: "boolean",
36
+ description: "check devDependencies instead of dependencies"
37
+ },
38
+ peer: {
39
+ type: "boolean",
40
+ description: "check peerDependencies instead of dependencies"
41
+ },
42
+ optional: {
43
+ type: "boolean",
44
+ description: "check optionalDependencies instead of dependencies"
45
+ },
46
+ fix: {
47
+ type: "boolean",
48
+ description: "automatically add missing dependencies to package.json"
49
+ },
50
+ depth: {
51
+ type: "number",
52
+ description: "maximum directory depth to scan (0 for unlimited)",
53
+ default: 0
37
54
  }
38
55
  }),
39
56
  async run({ args }) {
@@ -45,7 +62,12 @@ export default defineCommand({
45
62
  showAll: args.all,
46
63
  ignorePatterns,
47
64
  json: args.json,
48
- builtins: args.builtins
65
+ builtins: args.builtins,
66
+ dev: args.dev,
67
+ peer: args.peer,
68
+ optional: args.optional,
69
+ fix: args.fix,
70
+ depth: args.depth
49
71
  };
50
72
  console.log(re.gray(`Scanning directory: ${directory}`));
51
73
  const result = await analyzeDependencies(options);
@@ -12,6 +12,11 @@ export type FinderOptions = {
12
12
  ignorePatterns: string[];
13
13
  json: boolean;
14
14
  builtins: boolean;
15
+ dev: boolean;
16
+ peer: boolean;
17
+ optional: boolean;
18
+ fix: boolean;
19
+ depth: number;
15
20
  };
16
21
  export type DependencyResult = {
17
22
  missingDependencies: string[];
@@ -0,0 +1,2 @@
1
+ import type { CheckResult, FileCheckOptions } from "../../../libs/sdk/sdk-types.js";
2
+ export declare function checkMissingDependencies(options: FileCheckOptions): Promise<CheckResult>;
@@ -0,0 +1,57 @@
1
+ import { IGNORE_PATTERNS } from "../../../libs/sdk/sdk-impl/constants.js";
2
+ import { analyzeDependencies } from "./analyzer.js";
3
+ export async function checkMissingDependencies(options) {
4
+ const startTime = Date.now();
5
+ const issues = [];
6
+ const {
7
+ directory,
8
+ json = false,
9
+ builtins = true,
10
+ dev = false,
11
+ peer = false,
12
+ optional = false,
13
+ fix = false,
14
+ depth = 0
15
+ } = options;
16
+ try {
17
+ const result = await analyzeDependencies({
18
+ directory,
19
+ showAll: false,
20
+ ignorePatterns: Array.from(IGNORE_PATTERNS),
21
+ json,
22
+ builtins,
23
+ dev,
24
+ peer,
25
+ optional,
26
+ fix,
27
+ depth
28
+ });
29
+ for (const dep of result.missingDependencies) {
30
+ issues.push({
31
+ file: "package.json",
32
+ message: `missing dependency: ${dep}`,
33
+ type: "missing-dependency"
34
+ });
35
+ }
36
+ for (const dep of result.builtinModules) {
37
+ issues.push({
38
+ file: "package.json",
39
+ message: `using builtin module: ${dep}`,
40
+ type: "builtin-module"
41
+ });
42
+ }
43
+ return {
44
+ success: issues.length === 0,
45
+ issues,
46
+ stats: {
47
+ filesChecked: result.allDependencies.length,
48
+ importsChecked: result.allDependencies.length,
49
+ timeElapsed: Date.now() - startTime
50
+ }
51
+ };
52
+ } catch (error) {
53
+ throw new Error(
54
+ `failed to check missing dependencies: ${error instanceof Error ? error.message : "unknown error"}`
55
+ );
56
+ }
57
+ }
@@ -6,7 +6,6 @@ declare const _default: import("@reliverse/rempts").Command<{
6
6
  cwd: {
7
7
  type: "string";
8
8
  description: string;
9
- required: false;
10
9
  };
11
10
  }>;
12
11
  export default _default;
@@ -13,8 +13,7 @@ export default defineCommand({
13
13
  },
14
14
  cwd: {
15
15
  type: "string",
16
- description: "The working directory to run the CLI in",
17
- required: false
16
+ description: "The working directory to run the CLI in"
18
17
  }
19
18
  },
20
19
  run: async ({ args }) => {
@@ -6,7 +6,6 @@ declare const _default: import("@reliverse/rempts").Command<{
6
6
  };
7
7
  overwrite: {
8
8
  type: "boolean";
9
- default: false;
10
9
  description: string;
11
10
  };
12
11
  }>;
@@ -17,7 +17,6 @@ export default defineCommand({
17
17
  },
18
18
  overwrite: {
19
19
  type: "boolean",
20
- default: false,
21
20
  description: "Overwrite existing libraries"
22
21
  }
23
22
  }),
@@ -11,7 +11,6 @@ declare const _default: import("@reliverse/rempts").Command<{
11
11
  dryRun: {
12
12
  type: "boolean";
13
13
  description: string;
14
- default: false;
15
14
  };
16
15
  }>;
17
16
  export default _default;
@@ -22,8 +22,7 @@ export default defineCommand({
22
22
  },
23
23
  dryRun: {
24
24
  type: "boolean",
25
- description: "Preview changes without applying them",
26
- default: false
25
+ description: "Preview changes without applying them"
27
26
  }
28
27
  }),
29
28
  async run({ args }) {
@@ -6,7 +6,6 @@ declare const _default: import("@reliverse/rempts").Command<{
6
6
  cwd: {
7
7
  type: "string";
8
8
  description: string;
9
- required: false;
10
9
  };
11
10
  }>;
12
11
  export default _default;
@@ -13,8 +13,7 @@ export default defineCommand({
13
13
  },
14
14
  cwd: {
15
15
  type: "string",
16
- description: "The working directory to run the CLI in",
17
- required: false
16
+ description: "The working directory to run the CLI in"
18
17
  }
19
18
  },
20
19
  run: async ({ args }) => {
@@ -6,30 +6,23 @@ declare const _default: import("@reliverse/rempts").Command<{
6
6
  fileType: {
7
7
  type: "string";
8
8
  description: string;
9
- required: false;
10
9
  };
11
10
  destDir: {
12
11
  type: "string";
13
12
  description: string;
14
13
  default: string;
15
- required: false;
16
14
  };
17
15
  multiple: {
18
16
  type: "boolean";
19
17
  description: string;
20
- required: false;
21
- default: false;
22
18
  };
23
19
  parallel: {
24
20
  type: "boolean";
25
21
  description: string;
26
- required: false;
27
- default: false;
28
22
  };
29
23
  concurrency: {
30
24
  type: "string";
31
25
  description: string;
32
- required: false;
33
26
  default: string;
34
27
  };
35
28
  }>;
@@ -19,31 +19,24 @@ export default defineCommand({
19
19
  },
20
20
  fileType: {
21
21
  type: "string",
22
- description: "File type to initialize (e.g. 'md:README')",
23
- required: false
22
+ description: "File type to initialize (e.g. 'md:README')"
24
23
  },
25
24
  destDir: {
26
25
  type: "string",
27
26
  description: "Destination directory",
28
- default: ".",
29
- required: false
27
+ default: "."
30
28
  },
31
29
  multiple: {
32
30
  type: "boolean",
33
- description: "Whether to select multiple file types from the library",
34
- required: false,
35
- default: false
31
+ description: "Whether to select multiple file types from the library"
36
32
  },
37
33
  parallel: {
38
34
  type: "boolean",
39
- description: "Run tasks in parallel",
40
- required: false,
41
- default: false
35
+ description: "Run tasks in parallel"
42
36
  },
43
37
  concurrency: {
44
38
  type: "string",
45
39
  description: "Concurrency limit if parallel is true",
46
- required: false,
47
40
  default: "4"
48
41
  }
49
42
  },
@@ -6,34 +6,27 @@ declare const _default: import("@reliverse/rempts").Command<{
6
6
  prepareMyCLI: {
7
7
  type: "boolean";
8
8
  description: string;
9
- required: false;
10
9
  };
11
10
  revert: {
12
11
  type: "boolean";
13
12
  description: string;
14
- required: false;
15
13
  };
16
14
  source: {
17
15
  type: "string";
18
16
  description: string;
19
- required: false;
20
17
  };
21
18
  destination: {
22
19
  type: "string";
23
20
  description: string;
24
- required: false;
25
21
  };
26
22
  recursive: {
27
23
  type: "boolean";
28
24
  description: string;
29
- required: false;
30
25
  default: true;
31
26
  };
32
27
  useDtsTxtForPrepareMyCLI: {
33
28
  type: "boolean";
34
29
  description: string;
35
- required: false;
36
- default: false;
37
30
  };
38
31
  }>;
39
32
  export default _default;
@@ -127,35 +127,28 @@ export default defineCommand({
127
127
  },
128
128
  prepareMyCLI: {
129
129
  type: "boolean",
130
- description: "Prepare CLI by renaming files",
131
- required: false
130
+ description: "Prepare CLI by renaming files"
132
131
  },
133
132
  revert: {
134
133
  type: "boolean",
135
- description: "Revert renamed files back to original names",
136
- required: false
134
+ description: "Revert renamed files back to original names"
137
135
  },
138
136
  source: {
139
137
  type: "string",
140
- description: "Source file or directory to rename",
141
- required: false
138
+ description: "Source file or directory to rename"
142
139
  },
143
140
  destination: {
144
141
  type: "string",
145
- description: "Destination name for the rename operation",
146
- required: false
142
+ description: "Destination name for the rename operation"
147
143
  },
148
144
  recursive: {
149
145
  type: "boolean",
150
146
  description: "Recursively process all files in subdirectories (default: true)",
151
- required: false,
152
147
  default: true
153
148
  },
154
149
  useDtsTxtForPrepareMyCLI: {
155
150
  type: "boolean",
156
- description: "Use .d.ts.txt extension for .d.ts files in prepareMyCLI mode (default: false)",
157
- required: false,
158
- default: false
151
+ description: "Use .d.ts.txt extension for .d.ts files in prepareMyCLI mode (default: false)"
159
152
  }
160
153
  },
161
154
  async run({ args }) {
@@ -6,12 +6,10 @@ declare const _default: import("@reliverse/rempts").Command<{
6
6
  };
7
7
  overwrite: {
8
8
  type: "boolean";
9
- default: false;
10
9
  description: string;
11
10
  };
12
11
  customCmdsRoot: {
13
12
  type: "string";
14
- default: string;
15
13
  description: string;
16
14
  };
17
15
  }>;
@@ -18,12 +18,10 @@ export default defineCommand({
18
18
  },
19
19
  overwrite: {
20
20
  type: "boolean",
21
- default: false,
22
21
  description: "Overwrite existing commands"
23
22
  },
24
23
  customCmdsRoot: {
25
24
  type: "string",
26
- default: "",
27
25
  description: "Root directory for custom commands"
28
26
  }
29
27
  }),
@@ -10,7 +10,6 @@ declare const _default: import("@reliverse/rempts").Command<{
10
10
  };
11
11
  overwrite: {
12
12
  type: "boolean";
13
- default: false;
14
13
  description: string;
15
14
  };
16
15
  }>;
@@ -20,7 +20,6 @@ export default defineCommand({
20
20
  },
21
21
  overwrite: {
22
22
  type: "boolean",
23
- default: false,
24
23
  description: "Overwrite existing file (default: false)"
25
24
  }
26
25
  }),