@thymian/common-cli 0.2.0-canary.20260807-e5a00bb → 0.2.0-canary.20260810-ee25e32
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/default-config.d.ts.map +1 -1
- package/dist/default-config.js +1 -0
- package/dist/default-config.js.map +1 -1
- package/dist/flags/report-flag.d.ts +12 -0
- package/dist/flags/report-flag.d.ts.map +1 -0
- package/dist/flags/report-flag.js +25 -0
- package/dist/flags/report-flag.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/merge-inputs.d.ts +25 -3
- package/dist/merge-inputs.d.ts.map +1 -1
- package/dist/merge-inputs.js +33 -3
- package/dist/merge-inputs.js.map +1 -1
- package/dist/thymian-config-schema.d.ts +48 -1
- package/dist/thymian-config-schema.d.ts.map +1 -1
- package/dist/thymian-config-schema.js +49 -2
- package/dist/thymian-config-schema.js.map +1 -1
- package/dist/thymian-config-schema.json +49 -2
- package/dist/thymian-config.d.ts +17 -2
- package/dist/thymian-config.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-config.d.ts","sourceRoot":"","sources":["../src/default-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,eAAO,MAAM,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"default-config.d.ts","sourceRoot":"","sources":["../src/default-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,eAAO,MAAM,aAAa,EAAE,aAwB3B,CAAC"}
|
package/dist/default-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-config.js","sourceRoot":"","sources":["../src/default-config.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAAkB;IAC1C,cAAc,EAAE,EAAE;IAClB,OAAO,EAAE,EAAE;IACX,QAAQ,EAAE;QACR,yBAAyB;QACzB,2CAA2C;KAC5C;IACD,YAAY,EAAE,OAAO;IACrB,KAAK,EAAE,EAAE;IACT,OAAO,EAAE;QACP,6BAA6B,EAAE,EAAE;QACjC,yBAAyB,EAAE,EAAE;QAC7B,oCAAoC,EAAE,EAAE;QACxC,yBAAyB,EAAE,EAAE;QAC7B,0BAA0B,EAAE;YAC1B,OAAO,EAAE;gBACP,UAAU,EAAE,EAAE;aACf;SACF;QACD,6BAA6B,EAAE,EAAE;QACjC,+BAA+B,EAAE,EAAE;QACnC,qBAAqB,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"default-config.js","sourceRoot":"","sources":["../src/default-config.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAAkB;IAC1C,cAAc,EAAE,EAAE;IAClB,OAAO,EAAE,EAAE;IACX,QAAQ,EAAE;QACR,yBAAyB;QACzB,2CAA2C;KAC5C;IACD,YAAY,EAAE,OAAO;IACrB,KAAK,EAAE,EAAE;IACT,OAAO,EAAE;QACP,6BAA6B,EAAE,EAAE;QACjC,yBAAyB,EAAE,EAAE;QAC7B,oCAAoC,EAAE,EAAE;QACxC,yBAAyB,EAAE,EAAE;QAC7B,0BAA0B,EAAE;YAC1B,OAAO,EAAE;gBACP,UAAU,EAAE,EAAE;aACf;SACF;QACD,6BAA6B,EAAE,EAAE;QACjC,+BAA+B,EAAE,EAAE;QACnC,qBAAqB,EAAE,EAAE;QACzB,0BAA0B,EAAE,EAAE;KAC/B;CACF,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReportInput } from '@thymian/core';
|
|
2
|
+
/**
|
|
3
|
+
* Parse a `--report` flag value of the format `<type>:<location>` into a ReportInput.
|
|
4
|
+
* Both type and location are required (ADR-0017: no extension sniffing, no
|
|
5
|
+
* bare-path fallback); the location may itself contain colons (URLs, Windows paths).
|
|
6
|
+
*/
|
|
7
|
+
export declare function parseReportFlag(input: string): ReportInput;
|
|
8
|
+
export declare const reportFlag: import("@oclif/core/interfaces").FlagDefinition<ReportInput, import("@oclif/core/interfaces").CustomOptions, {
|
|
9
|
+
multiple: true;
|
|
10
|
+
requiredOrDefaulted: false;
|
|
11
|
+
}>;
|
|
12
|
+
//# sourceMappingURL=report-flag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report-flag.d.ts","sourceRoot":"","sources":["../../src/flags/report-flag.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,CAmB1D;AAED,eAAO,MAAM,UAAU;;;EAMrB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Errors, Flags } from '@oclif/core';
|
|
2
|
+
/**
|
|
3
|
+
* Parse a `--report` flag value of the format `<type>:<location>` into a ReportInput.
|
|
4
|
+
* Both type and location are required (ADR-0017: no extension sniffing, no
|
|
5
|
+
* bare-path fallback); the location may itself contain colons (URLs, Windows paths).
|
|
6
|
+
*/
|
|
7
|
+
export function parseReportFlag(input) {
|
|
8
|
+
const colonIndex = input.indexOf(':');
|
|
9
|
+
if (colonIndex === -1) {
|
|
10
|
+
throw new Errors.CLIError(`Invalid --report format: "${input}". Expected format: <type>:<location> (e.g. spectral:./report.json).`);
|
|
11
|
+
}
|
|
12
|
+
const type = input.slice(0, colonIndex);
|
|
13
|
+
const location = input.slice(colonIndex + 1);
|
|
14
|
+
if (!type || !location) {
|
|
15
|
+
throw new Errors.CLIError(`Invalid --report format: "${input}". Expected format: <type>:<location> (e.g. spectral:./report.json).`);
|
|
16
|
+
}
|
|
17
|
+
return { type, location };
|
|
18
|
+
}
|
|
19
|
+
export const reportFlag = Flags.custom({
|
|
20
|
+
description: 'External report input in the format <type>:<location> (e.g. spectral:./report.json).',
|
|
21
|
+
multiple: true,
|
|
22
|
+
helpValue: 'type:location',
|
|
23
|
+
parse: async (input) => parseReportFlag(input),
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=report-flag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report-flag.js","sourceRoot":"","sources":["../../src/flags/report-flag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAG5C;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,KAAa;IAC3C,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAEtC,IAAI,UAAU,KAAK,CAAC,CAAC,EAAE,CAAC;QACtB,MAAM,IAAI,MAAM,CAAC,QAAQ,CACvB,6BAA6B,KAAK,sEAAsE,CACzG,CAAC;IACJ,CAAC;IAED,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;IACxC,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;IAE7C,IAAI,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;QACvB,MAAM,IAAI,MAAM,CAAC,QAAQ,CACvB,6BAA6B,KAAK,sEAAsE,CACzG,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AAC5B,CAAC;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAc;IAClD,WAAW,EACT,sFAAsF;IACxF,QAAQ,EAAE,IAAI;IACd,SAAS,EAAE,eAAe;IAC1B,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC;CAC/C,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './base-cli-run-command.js';
|
|
2
2
|
export * from './default-config.js';
|
|
3
3
|
export * from './error-cache.js';
|
|
4
|
+
export * from './flags/report-flag.js';
|
|
4
5
|
export * from './flags/rule-set-flag.js';
|
|
5
6
|
export * from './flags/spec-flag.js';
|
|
6
7
|
export * from './flags/traffic-flag.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mBAAmB,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtE,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mBAAmB,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtE,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './base-cli-run-command.js';
|
|
2
2
|
export * from './default-config.js';
|
|
3
3
|
export * from './error-cache.js';
|
|
4
|
+
export * from './flags/report-flag.js';
|
|
4
5
|
export * from './flags/rule-set-flag.js';
|
|
5
6
|
export * from './flags/spec-flag.js';
|
|
6
7
|
export * from './flags/traffic-flag.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mBAAmB,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtE,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mBAAmB,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtE,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC"}
|
package/dist/merge-inputs.d.ts
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import { type RuleFilter, type RuleSeverity, type SpecificationInput, type TrafficInput } from '@thymian/core';
|
|
2
|
+
import type { RuleProfileName, RuleSetEntry } from './thymian-config.js';
|
|
3
|
+
/**
|
|
4
|
+
* A `ruleSets` entry normalized to its package name and resolved profile.
|
|
5
|
+
* A bare-string entry (or an object without `profile`) resolves to
|
|
6
|
+
* `recommended`.
|
|
7
|
+
*/
|
|
8
|
+
export interface NormalizedRuleSet {
|
|
9
|
+
name: string;
|
|
10
|
+
profile: RuleProfileName;
|
|
11
|
+
}
|
|
2
12
|
/**
|
|
3
13
|
* Merge specification inputs from config and CLI flags.
|
|
4
14
|
* Flag values are appended after config values.
|
|
@@ -10,10 +20,22 @@ export declare function mergeSpecifications(configSpecs: SpecificationInput[] |
|
|
|
10
20
|
*/
|
|
11
21
|
export declare function mergeTraffic(configTraffic: TrafficInput[] | undefined, flagTraffic: TrafficInput[] | undefined): TrafficInput[];
|
|
12
22
|
/**
|
|
13
|
-
* Merge rule set
|
|
14
|
-
*
|
|
23
|
+
* Merge rule set entries from config and CLI flags into normalized
|
|
24
|
+
* `{ name, profile }` selections. Flag values (always bare strings, resolving
|
|
25
|
+
* to `recommended`) are appended after config values. Duplicate package names
|
|
26
|
+
* are removed, keeping the first occurrence's profile selection.
|
|
27
|
+
*/
|
|
28
|
+
export declare function mergeRuleSets(configRuleSets: RuleSetEntry[] | undefined, flagRuleSets: string[] | undefined): NormalizedRuleSet[];
|
|
29
|
+
/**
|
|
30
|
+
* Split normalized rule-set selections into the specifier list (for the
|
|
31
|
+
* workflow `rules` payload) and the parallel specifier→profile map (for the
|
|
32
|
+
* additive `ruleProfiles` workflow input). Threading the profile selection
|
|
33
|
+
* this way leaves the existing `rules` payload shape unchanged.
|
|
15
34
|
*/
|
|
16
|
-
export declare function
|
|
35
|
+
export declare function toRuleSetInputs(ruleSets: NormalizedRuleSet[]): {
|
|
36
|
+
rules: string[];
|
|
37
|
+
ruleProfiles: Record<string, string>;
|
|
38
|
+
};
|
|
17
39
|
/**
|
|
18
40
|
* Resolve the effective rule severity from CLI flag and config.
|
|
19
41
|
* CLI flag takes precedence over config value.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge-inputs.d.ts","sourceRoot":"","sources":["../src/merge-inputs.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,YAAY,EAEjB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EAClB,MAAM,eAAe,CAAC;AAEvB;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,kBAAkB,EAAE,GAAG,SAAS,EAC7C,SAAS,EAAE,kBAAkB,EAAE,GAAG,SAAS,GAC1C,kBAAkB,EAAE,CAEtB;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,aAAa,EAAE,YAAY,EAAE,GAAG,SAAS,EACzC,WAAW,EAAE,YAAY,EAAE,GAAG,SAAS,GACtC,YAAY,EAAE,CAEhB;
|
|
1
|
+
{"version":3,"file":"merge-inputs.d.ts","sourceRoot":"","sources":["../src/merge-inputs.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,YAAY,EAEjB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EAClB,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEzE;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,kBAAkB,EAAE,GAAG,SAAS,EAC7C,SAAS,EAAE,kBAAkB,EAAE,GAAG,SAAS,GAC1C,kBAAkB,EAAE,CAEtB;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,aAAa,EAAE,YAAY,EAAE,GAAG,SAAS,EACzC,WAAW,EAAE,YAAY,EAAE,GAAG,SAAS,GACtC,YAAY,EAAE,CAEhB;AAcD;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,cAAc,EAAE,YAAY,EAAE,GAAG,SAAS,EAC1C,YAAY,EAAE,MAAM,EAAE,GAAG,SAAS,GACjC,iBAAiB,EAAE,CAcrB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,iBAAiB,EAAE,GAAG;IAC9D,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC,CAOA;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,cAAc,EAAE,YAAY,GAAG,SAAS,EACxC,YAAY,EAAE,MAAM,GAAG,SAAS,GAC/B,YAAY,CAMd;AAED;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,YAAY,GAAG,UAAU,CAO3E"}
|
package/dist/merge-inputs.js
CHANGED
|
@@ -14,11 +14,41 @@ export function mergeTraffic(configTraffic, flagTraffic) {
|
|
|
14
14
|
return [...(configTraffic ?? []), ...(flagTraffic ?? [])];
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
17
|
+
* Normalize a `ruleSets` entry to `{ name, profile }`. A bare string (or an
|
|
18
|
+
* object without `profile`) resolves to the `recommended` profile.
|
|
19
|
+
*/
|
|
20
|
+
function normalizeRuleSetEntry(entry) {
|
|
21
|
+
if (typeof entry === 'string') {
|
|
22
|
+
return { name: entry, profile: 'recommended' };
|
|
23
|
+
}
|
|
24
|
+
return { name: entry.name, profile: entry.profile ?? 'recommended' };
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Merge rule set entries from config and CLI flags into normalized
|
|
28
|
+
* `{ name, profile }` selections. Flag values (always bare strings, resolving
|
|
29
|
+
* to `recommended`) are appended after config values. Duplicate package names
|
|
30
|
+
* are removed, keeping the first occurrence's profile selection.
|
|
19
31
|
*/
|
|
20
32
|
export function mergeRuleSets(configRuleSets, flagRuleSets) {
|
|
21
|
-
|
|
33
|
+
const normalized = [...(configRuleSets ?? []), ...(flagRuleSets ?? [])].map(normalizeRuleSetEntry);
|
|
34
|
+
const byName = new Map();
|
|
35
|
+
for (const entry of normalized) {
|
|
36
|
+
if (!byName.has(entry.name)) {
|
|
37
|
+
byName.set(entry.name, entry);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return [...byName.values()];
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Split normalized rule-set selections into the specifier list (for the
|
|
44
|
+
* workflow `rules` payload) and the parallel specifier→profile map (for the
|
|
45
|
+
* additive `ruleProfiles` workflow input). Threading the profile selection
|
|
46
|
+
* this way leaves the existing `rules` payload shape unchanged.
|
|
47
|
+
*/
|
|
48
|
+
export function toRuleSetInputs(ruleSets) {
|
|
49
|
+
const rules = ruleSets.map((ruleSet) => ruleSet.name);
|
|
50
|
+
const ruleProfiles = Object.fromEntries(ruleSets.map((ruleSet) => [ruleSet.name, ruleSet.profile]));
|
|
51
|
+
return { rules, ruleProfiles };
|
|
22
52
|
}
|
|
23
53
|
/**
|
|
24
54
|
* Resolve the effective rule severity from CLI flag and config.
|
package/dist/merge-inputs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge-inputs.js","sourceRoot":"","sources":["../src/merge-inputs.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EAGnB,mBAAmB,GAGpB,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"merge-inputs.js","sourceRoot":"","sources":["../src/merge-inputs.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EAGnB,mBAAmB,GAGpB,MAAM,eAAe,CAAC;AAcvB;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CACjC,WAA6C,EAC7C,SAA2C;IAE3C,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,CAAC;AACxD,CAAC;AAED;;;GAGG;AACH,MAAM,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,CACrC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAC3D,CAAC;IAEF,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC;AACjC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CACjC,cAAwC,EACxC,YAAgC;IAEhC,IAAI,YAAY,IAAI,mBAAmB,CAAC,YAAY,CAAC,EAAE,CAAC;QACtD,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,OAAO,cAAc,IAAI,OAAO,CAAC;AACnC,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,wBAAwB,CAAC,QAAsB;IAC7D,IAAI,QAAQ,KAAK,KAAK,EAAE,CAAC;QACvB,OAAO,GAAG,EAAE,CAAC,KAAK,CAAC;IACrB,CAAC;IAED,OAAO,CAAC,IAAI,EAAE,EAAE,CACd,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,mBAAmB,CAAC,QAAQ,CAAC,CAAC;AAC7E,CAAC"}
|
|
@@ -64,12 +64,59 @@ export declare const thymianConfigSchema: {
|
|
|
64
64
|
};
|
|
65
65
|
};
|
|
66
66
|
};
|
|
67
|
+
reports: {
|
|
68
|
+
type: string;
|
|
69
|
+
description: string;
|
|
70
|
+
default: never[];
|
|
71
|
+
items: {
|
|
72
|
+
type: string;
|
|
73
|
+
required: string[];
|
|
74
|
+
additionalProperties: boolean;
|
|
75
|
+
properties: {
|
|
76
|
+
type: {
|
|
77
|
+
type: string;
|
|
78
|
+
minLength: number;
|
|
79
|
+
description: string;
|
|
80
|
+
};
|
|
81
|
+
location: {
|
|
82
|
+
description: string;
|
|
83
|
+
};
|
|
84
|
+
options: {
|
|
85
|
+
type: string;
|
|
86
|
+
additionalProperties: boolean;
|
|
87
|
+
description: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
};
|
|
67
92
|
ruleSets: {
|
|
68
93
|
type: string;
|
|
69
94
|
description: string;
|
|
70
95
|
default: string[];
|
|
71
96
|
items: {
|
|
72
|
-
|
|
97
|
+
oneOf: ({
|
|
98
|
+
type: string;
|
|
99
|
+
description: string;
|
|
100
|
+
required?: undefined;
|
|
101
|
+
additionalProperties?: undefined;
|
|
102
|
+
properties?: undefined;
|
|
103
|
+
} | {
|
|
104
|
+
type: string;
|
|
105
|
+
required: string[];
|
|
106
|
+
additionalProperties: boolean;
|
|
107
|
+
description: string;
|
|
108
|
+
properties: {
|
|
109
|
+
name: {
|
|
110
|
+
type: string;
|
|
111
|
+
description: string;
|
|
112
|
+
};
|
|
113
|
+
profile: {
|
|
114
|
+
type: string;
|
|
115
|
+
enum: string[];
|
|
116
|
+
description: string;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
})[];
|
|
73
120
|
};
|
|
74
121
|
};
|
|
75
122
|
ruleSeverity: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thymian-config-schema.d.ts","sourceRoot":"","sources":["../src/thymian-config-schema.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"thymian-config-schema.d.ts","sourceRoot":"","sources":["../src/thymian-config-schema.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqM/B,CAAC"}
|
|
@@ -54,14 +54,61 @@ export const thymianConfigSchema = {
|
|
|
54
54
|
},
|
|
55
55
|
},
|
|
56
56
|
},
|
|
57
|
+
reports: {
|
|
58
|
+
type: 'array',
|
|
59
|
+
description: 'Optional. External report inputs used by `thymian report convert`.',
|
|
60
|
+
default: [],
|
|
61
|
+
items: {
|
|
62
|
+
type: 'object',
|
|
63
|
+
required: ['type', 'location'],
|
|
64
|
+
additionalProperties: false,
|
|
65
|
+
properties: {
|
|
66
|
+
type: {
|
|
67
|
+
type: 'string',
|
|
68
|
+
minLength: 1,
|
|
69
|
+
description: 'For example `spectral`.',
|
|
70
|
+
},
|
|
71
|
+
location: { description: 'File path or supported path source.' },
|
|
72
|
+
options: {
|
|
73
|
+
type: 'object',
|
|
74
|
+
additionalProperties: true,
|
|
75
|
+
description: 'Report-specific options.',
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
},
|
|
57
80
|
ruleSets: {
|
|
58
81
|
type: 'array',
|
|
59
|
-
description: 'Optional. Rule set packages to load.',
|
|
82
|
+
description: 'Optional. Rule set packages to load. Each entry is either the package name (which resolves to the `recommended` profile) or an object `{ name, profile }` selecting `recommended | strict | minimal`.',
|
|
60
83
|
default: [
|
|
61
84
|
'@thymian/rules-rfc-9110',
|
|
62
85
|
'@thymian/rules-api-description-validation',
|
|
63
86
|
],
|
|
64
|
-
items: {
|
|
87
|
+
items: {
|
|
88
|
+
oneOf: [
|
|
89
|
+
{
|
|
90
|
+
type: 'string',
|
|
91
|
+
description: 'Rule set package name. Resolves to the `recommended` profile.',
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
type: 'object',
|
|
95
|
+
required: ['name'],
|
|
96
|
+
additionalProperties: false,
|
|
97
|
+
description: 'Rule set package with an explicit profile selection.',
|
|
98
|
+
properties: {
|
|
99
|
+
name: {
|
|
100
|
+
type: 'string',
|
|
101
|
+
description: 'Rule set package name.',
|
|
102
|
+
},
|
|
103
|
+
profile: {
|
|
104
|
+
type: 'string',
|
|
105
|
+
enum: ['recommended', 'strict', 'minimal'],
|
|
106
|
+
description: 'Recommended rule-configuration profile to apply. Defaults to `recommended`.',
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
],
|
|
111
|
+
},
|
|
65
112
|
},
|
|
66
113
|
ruleSeverity: {
|
|
67
114
|
type: 'string',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thymian-config-schema.js","sourceRoot":"","sources":["../src/thymian-config-schema.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,KAAK,EAAE,uBAAuB;IAC9B,WAAW,EACT,0OAA0O;IAC5O,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,CAAC,SAAS,CAAC;IACrB,oBAAoB,EAAE,KAAK;IAC3B,UAAU,EAAE;QACV,QAAQ,EAAE;YACR,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,4DAA4D;YACzE,OAAO,EAAE,IAAI;SACd;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC;YAC3D,WAAW,EAAE,uCAAuC;YACpD,OAAO,EAAE,MAAM;SAChB;QACD,cAAc,EAAE;YACd,IAAI,EAAE,OAAO;YACb,WAAW,EACT,6DAA6D;YAC/D,OAAO,EAAE,EAAE;YACX,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC;gBAC9B,oBAAoB,EAAE,KAAK;gBAC3B,UAAU,EAAE;oBACV,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,wBAAwB,EAAE;oBAC/D,QAAQ,EAAE,EAAE,WAAW,EAAE,qCAAqC,EAAE;oBAChE,OAAO,EAAE;wBACP,IAAI,EAAE,QAAQ;wBACd,oBAAoB,EAAE,IAAI;wBAC1B,WAAW,EAAE,iCAAiC;qBAC/C;iBACF;aACF;SACF;QACD,OAAO,EAAE;YACP,IAAI,EA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U,EAAE;4BACV,QAAQ,EAAE;gCACR,IAAI,EAAE,QAAQ;gCACd,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC;gCACtC,WAAW,EAAE,6BAA6B;6BAC3C;4BACD,OAAO,EAAE;gCACP,IAAI,EAAE,QAAQ;gCACd,oBAAoB,EAAE,IAAI;gCAC1B,WAAW,EAAE,wBAAwB;6BACtC;4BACD,WAAW,EAAE;gCACX,IAAI,EAAE,OAAO;gCACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gCACzB,WAAW,EACT,2HAA2H;6BAC9H;yBACF;qBACF;iBACF;aACF;SACF;QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,yDAAyD;SACvE;QACD,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,oDAAoD;YACjE,oBAAoB,EAAE;gBACpB,IAAI,EAAE,QAAQ;gBACd,oBAAoB,EAAE,KAAK;gBAC3B,UAAU,EAAE;oBACV,IAAI,EAAE;wBACJ,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,4BAA4B;qBAC1C;oBACD,OAAO,EAAE;wBACP,IAAI,EAAE,SAAS;wBACf,WAAW,EAAE,yCAAyC;qBACvD;oBACD,QAAQ,EAAE;wBACR,IAAI,EAAE,SAAS;wBACf,WAAW,EACT,uFAAuF;wBACzF,OAAO,EAAE,IAAI;qBACd;oBACD,OAAO,EAAE;wBACP,IAAI,EAAE,QAAQ;wBACd,oBAAoB,EAAE,IAAI;wBAC1B,WAAW,EAAE,0BAA0B;qBACxC;iBACF;aACF;SACF;KACF;CACF,CAAC"}
|
|
@@ -65,15 +65,62 @@
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
|
+
"reports": {
|
|
69
|
+
"type": "array",
|
|
70
|
+
"description": "External report inputs used by `thymian report convert`.",
|
|
71
|
+
"default": [],
|
|
72
|
+
"items": {
|
|
73
|
+
"type": "object",
|
|
74
|
+
"required": ["type", "location"],
|
|
75
|
+
"additionalProperties": false,
|
|
76
|
+
"properties": {
|
|
77
|
+
"type": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"minLength": 1,
|
|
80
|
+
"description": "Report format, for example `spectral`."
|
|
81
|
+
},
|
|
82
|
+
"location": {
|
|
83
|
+
"description": "File path or supported path source."
|
|
84
|
+
},
|
|
85
|
+
"options": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"additionalProperties": true,
|
|
88
|
+
"description": "Report-specific options."
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
68
93
|
"ruleSets": {
|
|
69
94
|
"type": "array",
|
|
70
|
-
"description": "Rule set packages to load.",
|
|
95
|
+
"description": "Rule set packages to load. Each entry is either the package name (which resolves to the `recommended` profile) or an object `{ name, profile }` selecting `recommended | strict | minimal`.",
|
|
71
96
|
"default": [
|
|
72
97
|
"@thymian/rules-rfc-9110",
|
|
73
98
|
"@thymian/rules-api-description-validation"
|
|
74
99
|
],
|
|
75
100
|
"items": {
|
|
76
|
-
"
|
|
101
|
+
"oneOf": [
|
|
102
|
+
{
|
|
103
|
+
"type": "string",
|
|
104
|
+
"description": "Rule set package name. Resolves to the `recommended` profile."
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"type": "object",
|
|
108
|
+
"required": ["name"],
|
|
109
|
+
"additionalProperties": false,
|
|
110
|
+
"description": "Rule set package with an explicit profile selection.",
|
|
111
|
+
"properties": {
|
|
112
|
+
"name": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"description": "Rule set package name."
|
|
115
|
+
},
|
|
116
|
+
"profile": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"enum": ["recommended", "strict", "minimal"],
|
|
119
|
+
"description": "Recommended rule-configuration profile to apply. Defaults to `recommended`."
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
]
|
|
77
124
|
}
|
|
78
125
|
},
|
|
79
126
|
"ruleSeverity": {
|
package/dist/thymian-config.d.ts
CHANGED
|
@@ -1,16 +1,31 @@
|
|
|
1
|
-
import type { LogLevel, RulesConfiguration, RuleSeverity, SpecificationInput, TrafficInput } from '@thymian/core';
|
|
1
|
+
import type { LogLevel, ReportInput, RulesConfiguration, RuleSeverity, SpecificationInput, TrafficInput } from '@thymian/core';
|
|
2
2
|
export interface ThymianPluginConfiguration<Options extends Record<PropertyKey, unknown> = Record<PropertyKey, unknown>> {
|
|
3
3
|
path?: string;
|
|
4
4
|
verbose?: boolean;
|
|
5
5
|
autoload?: boolean;
|
|
6
6
|
options?: Options;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Name of a recommended rule-configuration profile a rule-set package may ship
|
|
10
|
+
* via its `profiles` map. `recommended` is the default everywhere; opting into
|
|
11
|
+
* `strict` or `minimal` requires the object form of a `ruleSets` entry.
|
|
12
|
+
*/
|
|
13
|
+
export type RuleProfileName = 'recommended' | 'strict' | 'minimal';
|
|
14
|
+
/**
|
|
15
|
+
* A `ruleSets` entry. A bare string (or an object without `profile`) resolves
|
|
16
|
+
* to the `recommended` profile; the object form opts into another profile.
|
|
17
|
+
*/
|
|
18
|
+
export type RuleSetEntry = string | {
|
|
19
|
+
name: string;
|
|
20
|
+
profile?: RuleProfileName;
|
|
21
|
+
};
|
|
8
22
|
export interface ThymianConfig {
|
|
9
23
|
autoload?: boolean;
|
|
10
24
|
logLevel?: LogLevel;
|
|
11
25
|
specifications?: SpecificationInput[];
|
|
12
26
|
traffic?: TrafficInput[];
|
|
13
|
-
|
|
27
|
+
reports?: ReportInput[];
|
|
28
|
+
ruleSets?: RuleSetEntry[];
|
|
14
29
|
ruleSeverity?: RuleSeverity;
|
|
15
30
|
rules?: RulesConfiguration;
|
|
16
31
|
targetUrl?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thymian-config.d.ts","sourceRoot":"","sources":["../src/thymian-config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I,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,eAAe,CAAA;CAAE,CAAC;AAEhF,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,cAAc,CAAC,EAAE,kBAAkB,EAAE,CAAC;IACtC,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACxB,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;IAC1B,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,0BAA0B,CAAC,CAAC;CACrD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thymian/common-cli",
|
|
3
|
-
"version": "0.2.0-canary.
|
|
3
|
+
"version": "0.2.0-canary.20260810-ee25e32",
|
|
4
4
|
"description": "Shared CLI utilities, commands, and configuration management for Thymian",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"bugs": {
|
|
@@ -49,6 +49,6 @@
|
|
|
49
49
|
"wrap-ansi": "^7.0.0",
|
|
50
50
|
"string-width": "^4.2.3",
|
|
51
51
|
"@oclif/core": "^4.3.3",
|
|
52
|
-
"@thymian/core": "0.2.0-canary.
|
|
52
|
+
"@thymian/core": "0.2.0-canary.20260810-ee25e32"
|
|
53
53
|
}
|
|
54
54
|
}
|