@reqlan/cli 0.7.11 → 0.9.0
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 +50 -0
- package/README.template.md +2 -0
- package/out/argv.d.ts +8 -0
- package/out/argv.js +11 -0
- package/out/argv.js.map +1 -0
- package/out/commands/analyse.js +1 -11
- package/out/commands/analyse.js.map +1 -1
- package/out/commands/barrel.d.ts +1 -1
- package/out/commands/barrel.js +1 -1
- package/out/commands/check.d.ts +25 -0
- package/out/commands/check.js +124 -0
- package/out/commands/check.js.map +1 -0
- package/out/format-broken-refs.d.ts +21 -0
- package/out/format-broken-refs.js +61 -0
- package/out/format-broken-refs.js.map +1 -0
- package/out/main.js +8 -1
- package/out/main.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -40,10 +40,60 @@ The ideas index is shared application memory at `<workspace>/.reqlan/ideas-index
|
|
|
40
40
|
- [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=reqlan.reqlan-extension)
|
|
41
41
|
- [Open VSX](https://open-vsx.org/extension/reqlan/reqlan-extension)
|
|
42
42
|
- [GitHub repository](https://github.com/littletuna4/reqlan)
|
|
43
|
+
- [Discord](https://discord.gg/R487KDVfmA)
|
|
44
|
+
- [Sponsor](https://github.com/sponsors/littletuna4)
|
|
43
45
|
- [Contact](mailto:reqlan@reqlan.com)
|
|
44
46
|
|
|
45
47
|
## Changelog
|
|
46
48
|
|
|
49
|
+
### 0.9.0
|
|
50
|
+
|
|
51
|
+
#### Minor Changes
|
|
52
|
+
|
|
53
|
+
- 7c6eca5: add skip gitignored targets
|
|
54
|
+
|
|
55
|
+
#### Patch Changes
|
|
56
|
+
|
|
57
|
+
- c219dbe: ci sequencing fix for deployment
|
|
58
|
+
- d6b6246: build fix and cicd refinement
|
|
59
|
+
- 9b788d2: fix ci
|
|
60
|
+
- 900a2fd: testing fixes and cicd changes.
|
|
61
|
+
- 70bcb70: Add `check` skip-targets, and rebuild the ideas index when extract rules change so stale inline-code file refs drop.
|
|
62
|
+
- 7c6eca5: Add `check --skip-gitignored-targets` so CI can omit missing files that Git ignore rules exclude.
|
|
63
|
+
- 70bcb70: Move testin in ci, add ignore check targets to check function for ci environment, fix folder references in ci environemnt.
|
|
64
|
+
- 76546b3: fix ci testting.
|
|
65
|
+
- Updated dependencies [c219dbe]
|
|
66
|
+
- Updated dependencies [7c6eca5]
|
|
67
|
+
- Updated dependencies [d6b6246]
|
|
68
|
+
- Updated dependencies [9b788d2]
|
|
69
|
+
- Updated dependencies [900a2fd]
|
|
70
|
+
- Updated dependencies [70bcb70]
|
|
71
|
+
- Updated dependencies [7c6eca5]
|
|
72
|
+
- Updated dependencies [70bcb70]
|
|
73
|
+
- Updated dependencies [76546b3]
|
|
74
|
+
- @reqlan/analytical@1.13.0
|
|
75
|
+
|
|
76
|
+
### 0.8.0
|
|
77
|
+
|
|
78
|
+
#### Minor Changes
|
|
79
|
+
|
|
80
|
+
- 15b6a53: Add `reqlan check` so CI can report unresolved idea, comment, and file references.
|
|
81
|
+
- 15b6a53: Add check; and fix broken references.
|
|
82
|
+
|
|
83
|
+
#### Patch Changes
|
|
84
|
+
|
|
85
|
+
- Updated dependencies [15b6a53]
|
|
86
|
+
- Updated dependencies [15b6a53]
|
|
87
|
+
- @reqlan/analytical@1.12.0
|
|
88
|
+
|
|
89
|
+
### 0.7.12
|
|
90
|
+
|
|
91
|
+
#### Patch Changes
|
|
92
|
+
|
|
93
|
+
- 9571467: Update site; and a few little bug fixes
|
|
94
|
+
- Updated dependencies [9571467]
|
|
95
|
+
- @reqlan/analytical@1.11.3
|
|
96
|
+
|
|
47
97
|
### 0.7.11
|
|
48
98
|
|
|
49
99
|
#### Patch Changes
|
package/README.template.md
CHANGED
|
@@ -40,6 +40,8 @@ The ideas index is shared application memory at `<workspace>/.reqlan/ideas-index
|
|
|
40
40
|
- [{{VSC_LABEL}}]({{VSC_URL}})
|
|
41
41
|
- [{{OPENVSX_LABEL}}]({{OPENVSX_URL}})
|
|
42
42
|
- [GitHub repository]({{GITHUB_URL}})
|
|
43
|
+
- [{{DISCORD_LABEL}}]({{DISCORD_URL}})
|
|
44
|
+
- [{{SPONSOR_LABEL}}]({{SPONSOR_URL}})
|
|
43
45
|
- [Contact]({{EMAIL_URL}})
|
|
44
46
|
|
|
45
47
|
## Changelog
|
package/out/argv.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* rq:["../../../reqlan rq/cli/cli_package.rq".pnpm_extra_args]
|
|
3
|
+
*
|
|
4
|
+
* Drop a lone `--` that package managers insert between the script and extra args.
|
|
5
|
+
* `pnpm run check -- --skip-target glob` becomes `reqlan check -- --skip-target glob`.
|
|
6
|
+
* Clipanion treats `--` as end of options, so `--skip-target` would then be a command.
|
|
7
|
+
*/
|
|
8
|
+
export declare function argvForClipanion(argv: string[]): string[];
|
package/out/argv.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* rq:["../../../reqlan rq/cli/cli_package.rq".pnpm_extra_args]
|
|
3
|
+
*
|
|
4
|
+
* Drop a lone `--` that package managers insert between the script and extra args.
|
|
5
|
+
* `pnpm run check -- --skip-target glob` becomes `reqlan check -- --skip-target glob`.
|
|
6
|
+
* Clipanion treats `--` as end of options, so `--skip-target` would then be a command.
|
|
7
|
+
*/
|
|
8
|
+
export function argvForClipanion(argv) {
|
|
9
|
+
return argv.filter(arg => arg !== '--');
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=argv.js.map
|
package/out/argv.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"argv.js","sourceRoot":"","sources":["../src/argv.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAc;IAC3C,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,IAAI,CAAC,CAAC;AAC5C,CAAC"}
|
package/out/commands/analyse.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Command, Option } from 'clipanion';
|
|
2
2
|
import { withAnalysisApi } from '../runtime.js';
|
|
3
3
|
import { emit } from '../output.js';
|
|
4
|
+
import { formatBrokenRefs } from '../format-broken-refs.js';
|
|
4
5
|
/**
|
|
5
6
|
* rq:["../../../../reqlan rq/core_analysis/core.rq".test_references]
|
|
6
7
|
* rq:["../../../../reqlan rq/cli/cli_package.rq".commands]
|
|
@@ -38,17 +39,6 @@ function formatCompletion(formatIdea, summary) {
|
|
|
38
39
|
formatIdeaList(formatIdea, summary.deprecated.slice(0, 12), '## Deprecated (sample)')
|
|
39
40
|
].join('\n\n');
|
|
40
41
|
}
|
|
41
|
-
function formatBrokenRefs(rows) {
|
|
42
|
-
if (rows.length === 0) {
|
|
43
|
-
return '## Broken references\n(none)';
|
|
44
|
-
}
|
|
45
|
-
const lines = rows.map(row => {
|
|
46
|
-
const line = (row.sourceLine ?? 0) + 1;
|
|
47
|
-
const source = row.sourceName ? ` ${row.sourceName}` : '';
|
|
48
|
-
return `- ${row.fileUri}:${line}${source} [${row.kind}] ${row.label}`;
|
|
49
|
-
});
|
|
50
|
-
return `## Broken references (${rows.length})\n${lines.join('\n')}`;
|
|
51
|
-
}
|
|
52
42
|
export class AnalyseCommand extends Command {
|
|
53
43
|
constructor() {
|
|
54
44
|
super(...arguments);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyse.js","sourceRoot":"","sources":["../../src/commands/analyse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"analyse.js","sourceRoot":"","sources":["../../src/commands/analyse.ts"],"names":[],"mappings":"AAAA,OAAO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IACD,QAAQ,EAAE;QACN,CAAC,sBAAsB,EAAE,YAAY,CAAC;QACtC,CAAC,cAAc,EAAE,oDAAoD,CAAC;QACtE,CAAC,cAAc,EAAE,+BAA+B,CAAC;QACjD,CAAC,mBAAmB,EAAE,0BAA0B,CAAC;QACjD,CAAC,2CAA2C,EAAE,6DAA6D,CAAC;KAC/G;CACJ,CAAC,AAdmB,CAclB"}
|
package/out/commands/barrel.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Command } from 'clipanion';
|
|
2
2
|
/**
|
|
3
|
-
* rq:["
|
|
3
|
+
* rq:["../../../../reqlan rq/extension/features-commands.rq".barrel_page]
|
|
4
4
|
*/
|
|
5
5
|
export declare class BarrelCommand extends Command {
|
|
6
6
|
static paths: string[][];
|
package/out/commands/barrel.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Command, Option } from 'clipanion';
|
|
|
2
2
|
import { resolve } from 'node:path';
|
|
3
3
|
import { emit } from '../output.js';
|
|
4
4
|
/**
|
|
5
|
-
* rq:["
|
|
5
|
+
* rq:["../../../../reqlan rq/extension/features-commands.rq".barrel_page]
|
|
6
6
|
*/
|
|
7
7
|
export class BarrelCommand extends Command {
|
|
8
8
|
constructor() {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* rq:["../../../../reqlan rq/core_analysis/check.rq".check]
|
|
3
|
+
* rq:["../../../../reqlan rq/core_analysis/check.rq".check_order_by_target]
|
|
4
|
+
* rq:["../../../../reqlan rq/core_analysis/check.rq".check_wildcard_sparse]
|
|
5
|
+
* rq:["../../../../reqlan rq/core_analysis/check.rq".check_wildcard_zero]
|
|
6
|
+
* rq:["../../../../reqlan rq/core_analysis/check.rq".check_wildcard_one]
|
|
7
|
+
* rq:["../../../../reqlan rq/core_analysis/check.rq".check_skip_targets]
|
|
8
|
+
* rq:["../../../../reqlan rq/core_analysis/check.rq".check_skip_gitignored_targets]
|
|
9
|
+
* rq:["../../../../reqlan rq/cli/cli_package.rq".commands]
|
|
10
|
+
* rq:["../../../../reqlan rq/language/syntax.rq".comment_reference_ignore]
|
|
11
|
+
*/
|
|
12
|
+
import { Command } from 'clipanion';
|
|
13
|
+
export declare class CheckCommand extends Command {
|
|
14
|
+
static paths: string[][];
|
|
15
|
+
static usage: import("clipanion").Usage;
|
|
16
|
+
glob: string | undefined;
|
|
17
|
+
cwd: string | undefined;
|
|
18
|
+
json: boolean;
|
|
19
|
+
pipe: boolean;
|
|
20
|
+
wildcardZero: string;
|
|
21
|
+
wildcardOne: string;
|
|
22
|
+
skipTargets: string[] | undefined;
|
|
23
|
+
skipGitignoredTargets: boolean;
|
|
24
|
+
execute(): Promise<number>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* rq:["../../../../reqlan rq/core_analysis/check.rq".check]
|
|
3
|
+
* rq:["../../../../reqlan rq/core_analysis/check.rq".check_order_by_target]
|
|
4
|
+
* rq:["../../../../reqlan rq/core_analysis/check.rq".check_wildcard_sparse]
|
|
5
|
+
* rq:["../../../../reqlan rq/core_analysis/check.rq".check_wildcard_zero]
|
|
6
|
+
* rq:["../../../../reqlan rq/core_analysis/check.rq".check_wildcard_one]
|
|
7
|
+
* rq:["../../../../reqlan rq/core_analysis/check.rq".check_skip_targets]
|
|
8
|
+
* rq:["../../../../reqlan rq/core_analysis/check.rq".check_skip_gitignored_targets]
|
|
9
|
+
* rq:["../../../../reqlan rq/cli/cli_package.rq".commands]
|
|
10
|
+
* rq:["../../../../reqlan rq/language/syntax.rq".comment_reference_ignore]
|
|
11
|
+
*/
|
|
12
|
+
import { Command, Option } from 'clipanion';
|
|
13
|
+
import { withAnalysisApi } from '../runtime.js';
|
|
14
|
+
import { emit } from '../output.js';
|
|
15
|
+
import { formatCheckIssues, formatCheckPipe } from '../format-broken-refs.js';
|
|
16
|
+
const HANDLING_VALUES = 'warn, error, or off';
|
|
17
|
+
function parseHandling(flag, value) {
|
|
18
|
+
const normalised = value.trim().toLowerCase();
|
|
19
|
+
if (normalised === 'warn' || normalised === 'warning' || normalised === 'error' || normalised === 'off') {
|
|
20
|
+
return normalised === 'warning' ? 'warn' : normalised;
|
|
21
|
+
}
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
export class CheckCommand extends Command {
|
|
25
|
+
constructor() {
|
|
26
|
+
super(...arguments);
|
|
27
|
+
this.glob = Option.String('--glob', {
|
|
28
|
+
description: 'Optional path glob that limits the check to a subset of the base'
|
|
29
|
+
});
|
|
30
|
+
this.cwd = Option.String('--cwd', {
|
|
31
|
+
description: 'Workspace root (default: walk from cwd, or REQLAN_WORKSPACE)'
|
|
32
|
+
});
|
|
33
|
+
this.json = Option.Boolean('--json', false, {
|
|
34
|
+
description: 'Emit machine-readable JSON'
|
|
35
|
+
});
|
|
36
|
+
this.pipe = Option.Boolean('--pipe', false, {
|
|
37
|
+
description: 'Emit one issue per line for pipes'
|
|
38
|
+
});
|
|
39
|
+
this.wildcardZero = Option.String('--wildcard-zero', 'warn', {
|
|
40
|
+
description: `How to handle a wildcard that matches 0 ideas (${HANDLING_VALUES})`
|
|
41
|
+
});
|
|
42
|
+
this.wildcardOne = Option.String('--wildcard-one', 'warn', {
|
|
43
|
+
description: `How to handle a wildcard that matches 1 idea (${HANDLING_VALUES})`
|
|
44
|
+
});
|
|
45
|
+
this.skipTargets = Option.Array('--skip-target', {
|
|
46
|
+
description: 'Omit issues whose missing target matches this glob (repeatable)'
|
|
47
|
+
});
|
|
48
|
+
this.skipGitignoredTargets = Option.Boolean('--skip-gitignored-targets', false, {
|
|
49
|
+
description: 'Omit file-reference issues whose missing target is gitignored'
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
async execute() {
|
|
53
|
+
if (this.json && this.pipe) {
|
|
54
|
+
this.context.stderr.write('Specify only one of --json or --pipe.\n');
|
|
55
|
+
return 1;
|
|
56
|
+
}
|
|
57
|
+
const wildcardZero = parseHandling('--wildcard-zero', this.wildcardZero);
|
|
58
|
+
if (!wildcardZero) {
|
|
59
|
+
this.context.stderr.write(`--wildcard-zero must be ${HANDLING_VALUES}.\n`);
|
|
60
|
+
return 1;
|
|
61
|
+
}
|
|
62
|
+
const wildcardOne = parseHandling('--wildcard-one', this.wildcardOne);
|
|
63
|
+
if (!wildcardOne) {
|
|
64
|
+
this.context.stderr.write(`--wildcard-one must be ${HANDLING_VALUES}.\n`);
|
|
65
|
+
return 1;
|
|
66
|
+
}
|
|
67
|
+
try {
|
|
68
|
+
return await withAnalysisApi(this.cwd, async (api) => {
|
|
69
|
+
const rows = await api.check({
|
|
70
|
+
pathGlob: this.glob,
|
|
71
|
+
wildcardZero,
|
|
72
|
+
wildcardOne,
|
|
73
|
+
skipTargets: this.skipTargets,
|
|
74
|
+
skipGitignoredTargets: this.skipGitignoredTargets
|
|
75
|
+
});
|
|
76
|
+
if (this.json) {
|
|
77
|
+
emit(rows, true);
|
|
78
|
+
}
|
|
79
|
+
else if (this.pipe) {
|
|
80
|
+
const body = formatCheckPipe(rows);
|
|
81
|
+
if (body.length > 0) {
|
|
82
|
+
emit(body, false);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
emit(formatCheckIssues(rows), false);
|
|
87
|
+
}
|
|
88
|
+
return rows.length > 0 ? 1 : 0;
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
catch (error) {
|
|
92
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
93
|
+
this.context.stderr.write(`${message}\n`);
|
|
94
|
+
return 1;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
CheckCommand.paths = [['check']];
|
|
99
|
+
CheckCommand.usage = Command.Usage({
|
|
100
|
+
description: 'Check that requirement, comment, and code references resolve.',
|
|
101
|
+
details: `
|
|
102
|
+
Wraps the ideas index and reports unresolved idea references, comment
|
|
103
|
+
references, and missing code files. Lines after //rq-ignore-error are skipped.
|
|
104
|
+
Issues are ordered by the missing target so shared broken refs group together.
|
|
105
|
+
Wildcard references that match 0 ideas use --wildcard-zero (default warn).
|
|
106
|
+
Wildcard references that match 1 idea use --wildcard-one (default warn).
|
|
107
|
+
Each flag is warn, error, or off.
|
|
108
|
+
Repeat --skip-target <glob> to omit issues whose missing target matches a glob.
|
|
109
|
+
--skip-gitignored-targets omits missing file targets that Git ignore rules ignore.
|
|
110
|
+
Exit status is 1 when the command finds issues.
|
|
111
|
+
Use --json or --pipe for machine output.
|
|
112
|
+
`,
|
|
113
|
+
examples: [
|
|
114
|
+
['Check the workspace', '$0 check'],
|
|
115
|
+
['JSON output', '$0 check --json'],
|
|
116
|
+
['Pipe output', '$0 check --pipe'],
|
|
117
|
+
['Limit to a path glob', '$0 check --glob "reqlan rq/**"'],
|
|
118
|
+
['Treat empty wildcards as errors', '$0 check --wildcard-zero error'],
|
|
119
|
+
['Skip singleton-wildcard warnings', '$0 check --wildcard-one off'],
|
|
120
|
+
['Skip gitignored Cursor paths', '$0 check --skip-target "**/.cursor/**"'],
|
|
121
|
+
['Skip gitignored file targets', '$0 check --skip-gitignored-targets']
|
|
122
|
+
]
|
|
123
|
+
});
|
|
124
|
+
//# sourceMappingURL=check.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../src/commands/check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE9E,MAAM,eAAe,GAAG,qBAAqB,CAAC;AAE9C,SAAS,aAAa,CAAC,IAAY,EAAE,KAAa;IAC9C,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW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../reqlan rq/core_analysis/check.rq".check]
|
|
4
|
+
* rq:["../../../reqlan rq/core_analysis/check.rq".check_order_by_target]
|
|
5
|
+
* rq:["../../../reqlan rq/core_analysis/check.rq".check_wildcard_sparse]
|
|
6
|
+
* rq:["../../../reqlan rq/core_analysis/core.rq".test_references]
|
|
7
|
+
*/
|
|
8
|
+
export interface BrokenRefRow {
|
|
9
|
+
fileUri: string;
|
|
10
|
+
sourceName?: string | null;
|
|
11
|
+
kind: string;
|
|
12
|
+
label: string;
|
|
13
|
+
sourceLine?: number | null;
|
|
14
|
+
severity?: string | null;
|
|
15
|
+
matchCount?: number | null;
|
|
16
|
+
}
|
|
17
|
+
export declare function formatBrokenRefs(rows: BrokenRefRow[]): string;
|
|
18
|
+
export declare function formatCheckIssues(rows: BrokenRefRow[]): string;
|
|
19
|
+
export declare function formatCheckPipe(rows: BrokenRefRow[]): string;
|
|
20
|
+
/** Quote a path when it contains spaces or other characters that break `path:line`. */
|
|
21
|
+
export declare function formatPathWithLine(fileUri: string, line: number): string;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared formatters for unresolved-reference rows.
|
|
3
|
+
* rq:["../../../reqlan rq/core_analysis/check.rq".check]
|
|
4
|
+
* rq:["../../../reqlan rq/core_analysis/check.rq".check_order_by_target]
|
|
5
|
+
* rq:["../../../reqlan rq/core_analysis/check.rq".check_wildcard_sparse]
|
|
6
|
+
* rq:["../../../reqlan rq/core_analysis/core.rq".test_references]
|
|
7
|
+
*/
|
|
8
|
+
export function formatBrokenRefs(rows) {
|
|
9
|
+
if (rows.length === 0) {
|
|
10
|
+
return '## Broken references\n(none)';
|
|
11
|
+
}
|
|
12
|
+
const lines = rows.map(row => formatBrokenRefLine(row, '- '));
|
|
13
|
+
return `## Broken references (${rows.length})\n${lines.join('\n')}`;
|
|
14
|
+
}
|
|
15
|
+
export function formatCheckIssues(rows) {
|
|
16
|
+
if (rows.length === 0) {
|
|
17
|
+
return 'No issues.';
|
|
18
|
+
}
|
|
19
|
+
const parts = [`## Issues (${rows.length})`];
|
|
20
|
+
let lastLabel;
|
|
21
|
+
for (const row of rows) {
|
|
22
|
+
if (row.label !== lastLabel) {
|
|
23
|
+
parts.push('');
|
|
24
|
+
parts.push(row.label);
|
|
25
|
+
lastLabel = row.label;
|
|
26
|
+
}
|
|
27
|
+
const line = (row.sourceLine ?? 0) + 1;
|
|
28
|
+
const source = row.sourceName ? ` ${row.sourceName}` : '';
|
|
29
|
+
parts.push(`- ${formatPathWithLine(row.fileUri, line)}${source} ${formatKindSuffix(row)}`);
|
|
30
|
+
}
|
|
31
|
+
return parts.join('\n');
|
|
32
|
+
}
|
|
33
|
+
export function formatCheckPipe(rows) {
|
|
34
|
+
return rows.map(row => formatBrokenRefLine(row, '')).join('\n');
|
|
35
|
+
}
|
|
36
|
+
function formatBrokenRefLine(row, prefix) {
|
|
37
|
+
const line = (row.sourceLine ?? 0) + 1;
|
|
38
|
+
const source = row.sourceName ? ` ${row.sourceName}` : '';
|
|
39
|
+
return `${prefix}${formatPathWithLine(row.fileUri, line)}${source} ${formatKindSuffix(row)} ${row.label}`;
|
|
40
|
+
}
|
|
41
|
+
function formatKindSuffix(row) {
|
|
42
|
+
const warning = row.severity === 'warning' ? ' warning' : '';
|
|
43
|
+
const count = row.matchCount === 0
|
|
44
|
+
? ' 0 matches'
|
|
45
|
+
: row.matchCount === 1
|
|
46
|
+
? ' 1 match'
|
|
47
|
+
: '';
|
|
48
|
+
return `[${row.kind}]${warning}${count}`;
|
|
49
|
+
}
|
|
50
|
+
/** Quote a path when it contains spaces or other characters that break `path:line`. */
|
|
51
|
+
export function formatPathWithLine(fileUri, line) {
|
|
52
|
+
if (isSafeUnquotedPath(fileUri)) {
|
|
53
|
+
return `${fileUri}:${line}`;
|
|
54
|
+
}
|
|
55
|
+
const escaped = fileUri.replace(/\\/g, '\\\\').replace(/"/g, '\\"');
|
|
56
|
+
return `"${escaped}":${line}`;
|
|
57
|
+
}
|
|
58
|
+
function isSafeUnquotedPath(fileUri) {
|
|
59
|
+
return /^[A-Za-z0-9._/\-]+$/.test(fileUri);
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=format-broken-refs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-broken-refs.js","sourceRoot":"","sources":["../src/format-broken-refs.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAYH,MAAM,UAAU,gBAAgB,CAAC,IAAoB;IACjD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACpB,OAAO,8BAA8B,CAAC;IAC1C,CAAC;IACD,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,mBAAmB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;IAC9D,OAAO,yBAAyB,IAAI,CAAC,MAAM,MAAM,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;AACxE,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,IAAoB;IAClD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACpB,OAAO,YAAY,CAAC;IACxB,CAAC;IACD,MAAM,KAAK,GAAa,CAAC,cAAc,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IACvD,IAAI,SAA6B,CAAC;IAClC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACrB,IAAI,GAAG,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YAC1B,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACf,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACtB,SAAS,GAAG,GAAG,CAAC,KAAK,CAAC;QAC1B,CAAC;QACD,MAAM,IAAI,GAAG,CAAC,GAAG,CAAC,UAAU,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACvC,MAAM,MAAM,GAAG,GAAG,CAAC,UAA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C,EAAE,CAAC;IACf,OAAO,IAAI,GAAG,CAAC,IAAI,IAAI,OAAO,GAAG,KAAK,EAAE,CAAC;AAC7C,CAAC;AAED,uFAAuF;AACvF,MAAM,UAAU,kBAAkB,CAAC,OAAe,EAAE,IAAY;IAC5D,IAAI,kBAAkB,CAAC,OAAO,CAAC,EAAE,CAAC;QAC9B,OAAO,GAAG,OAAO,IAAI,IAAI,EAAE,CAAC;IAChC,CAAC;IACD,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACpE,OAAO,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;AAClC,CAAC;AAED,SAAS,kBAAkB,CAAC,OAAe;IACvC,OAAO,qBAAqB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC/C,CAAC"}
|
package/out/main.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* rq:["../../../reqlan rq/cli/cli_package.rq".pnpm_extra_args]
|
|
3
|
+
* rq:["../../../reqlan rq/cli/cli_package.rq".commands]
|
|
4
|
+
*/
|
|
1
5
|
import { Cli, Builtins } from 'clipanion';
|
|
2
6
|
import { readFileSync } from 'node:fs';
|
|
3
7
|
import { dirname, resolve } from 'node:path';
|
|
@@ -8,6 +12,8 @@ import { SearchCommand } from './commands/search.js';
|
|
|
8
12
|
import { ExportCommand } from './commands/export.js';
|
|
9
13
|
import { InitCommand } from './commands/init.js';
|
|
10
14
|
import { BarrelCommand } from './commands/barrel.js';
|
|
15
|
+
import { CheckCommand } from './commands/check.js';
|
|
16
|
+
import { argvForClipanion } from './argv.js';
|
|
11
17
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
12
18
|
const packageJson = JSON.parse(readFileSync(resolve(__dirname, '..', 'package.json'), 'utf8'));
|
|
13
19
|
const cli = new Cli({
|
|
@@ -23,5 +29,6 @@ cli.register(SearchCommand);
|
|
|
23
29
|
cli.register(ExportCommand);
|
|
24
30
|
cli.register(InitCommand);
|
|
25
31
|
cli.register(BarrelCommand);
|
|
26
|
-
|
|
32
|
+
cli.register(CheckCommand);
|
|
33
|
+
await cli.runExit(argvForClipanion(process.argv.slice(2)));
|
|
27
34
|
//# sourceMappingURL=main.js.map
|
package/out/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM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,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reqlan/cli",
|
|
3
3
|
"description": "CLI for parsing, analysing, and exporting reqlan requirement graphs",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.9.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "AGPL-3.0-only",
|
|
7
7
|
"repository": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"clipanion": "3.2.1",
|
|
28
|
-
"@reqlan/analytical": "1.
|
|
28
|
+
"@reqlan/analytical": "1.13.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"shx": "~0.4.0",
|