@thymian/common-cli 0.2.1-canary.20260914-e32cebc → 0.2.1-canary.20260914-d1ab7f8

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.
@@ -1,4 +1,5 @@
1
1
  export declare const thymianConfigSchema: {
2
+ $schema: string;
2
3
  title: string;
3
4
  description: string;
4
5
  type: string;
@@ -125,6 +126,10 @@ export declare const thymianConfigSchema: {
125
126
  description: string;
126
127
  default: string;
127
128
  };
129
+ targetUrl: {
130
+ type: string;
131
+ description: string;
132
+ };
128
133
  rules: {
129
134
  type: string;
130
135
  description: string;
@@ -146,6 +151,16 @@ export declare const thymianConfigSchema: {
146
151
  enum: string[];
147
152
  description: string;
148
153
  };
154
+ type: {
155
+ type: string;
156
+ minItems: number;
157
+ uniqueItems: boolean;
158
+ items: {
159
+ type: string;
160
+ enum: string[];
161
+ };
162
+ description: string;
163
+ };
149
164
  options: {
150
165
  type: string;
151
166
  additionalProperties: boolean;
@@ -163,12 +178,9 @@ export declare const thymianConfigSchema: {
163
178
  })[];
164
179
  };
165
180
  };
166
- targetUrl: {
167
- type: string;
168
- description: string;
169
- };
170
181
  plugins: {
171
182
  type: string;
183
+ nullable: boolean;
172
184
  description: string;
173
185
  additionalProperties: {
174
186
  type: string;
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"thymian-config-schema.d.ts","sourceRoot":"","sources":["../src/thymian-config-schema.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAS,CAAC"}
@@ -1,189 +1,8 @@
1
- export const thymianConfigSchema = {
2
- title: 'Thymian Configuration',
3
- description: 'Top-level keys currently supported by the schema. Default values listed below apply when **no config file is found**; if a config file exists but omits a key, the effective value may differ (e.g., `ruleSets` becomes an empty array).',
4
- type: 'object',
5
- required: ['plugins'],
6
- additionalProperties: false,
7
- properties: {
8
- autoload: {
9
- type: 'boolean',
10
- description: 'Optional. Enables automatic plugin loading from `plugins`.',
11
- default: true,
12
- },
13
- logLevel: {
14
- type: 'string',
15
- enum: ['trace', 'debug', 'info', 'warn', 'error', 'silent'],
16
- description: 'Optional. Controls CLI log verbosity.',
17
- default: 'warn',
18
- },
19
- specifications: {
20
- type: 'array',
21
- description: 'Optional. API descriptions to load (usually OpenAPI files).',
22
- default: [],
23
- items: {
24
- type: 'object',
25
- required: ['type', 'location'],
26
- additionalProperties: false,
27
- properties: {
28
- type: { type: 'string', description: 'For example `openapi`.' },
29
- location: { description: 'File path or supported path source.' },
30
- options: {
31
- type: 'object',
32
- additionalProperties: true,
33
- description: 'Specification-specific options.',
34
- },
35
- },
36
- },
37
- },
38
- traffic: {
39
- type: 'array',
40
- description: 'Optional. Recorded traffic inputs used by `thymian analyze`.',
41
- default: [],
42
- items: {
43
- type: 'object',
44
- required: ['type', 'location'],
45
- additionalProperties: false,
46
- properties: {
47
- type: { type: 'string', description: 'For example `fixture`.' },
48
- location: { description: 'File path or supported path source.' },
49
- options: {
50
- type: 'object',
51
- additionalProperties: true,
52
- description: 'Traffic-specific options.',
53
- },
54
- },
55
- },
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
- },
80
- ruleSets: {
81
- type: 'array',
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`.',
83
- default: [
84
- '@thymian/rules-rfc-9110',
85
- '@thymian/rules-api-description-validation',
86
- ],
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
- },
112
- },
113
- ruleSeverity: {
114
- type: 'string',
115
- enum: ['off', 'error', 'warn', 'hint'],
116
- description: 'Optional. Minimum rule severity threshold.',
117
- default: 'error',
118
- },
119
- rules: {
120
- type: 'object',
121
- description: 'Optional. Per-rule configuration/overrides. Each key is a rule ID. The value can be a severity string (`off | error | warn | hint`) or a rule config object with `severity`, `skipOrigins`, and `options` fields.',
122
- default: {},
123
- additionalProperties: {
124
- oneOf: [
125
- {
126
- type: 'string',
127
- enum: ['error', 'warn', 'hint', 'off'],
128
- description: 'Shorthand to override only the rule severity.',
129
- },
130
- {
131
- type: 'object',
132
- additionalProperties: true,
133
- description: 'Full rule configuration object.',
134
- properties: {
135
- severity: {
136
- type: 'string',
137
- enum: ['error', 'warn', 'hint', 'off'],
138
- description: 'Override the rule severity.',
139
- },
140
- options: {
141
- type: 'object',
142
- additionalProperties: true,
143
- description: 'Rule-specific options.',
144
- },
145
- skipOrigins: {
146
- type: 'array',
147
- items: { type: 'string' },
148
- description: 'List of origin identifiers to ignore for this rule. When a result originates from one of these origins, it is suppressed.',
149
- },
150
- },
151
- },
152
- ],
153
- },
154
- },
155
- targetUrl: {
156
- type: 'string',
157
- description: 'Optional. Base URL used for live API testing workflows.',
158
- },
159
- plugins: {
160
- type: 'object',
161
- description: 'Required. Plugin registrations and plugin options.',
162
- additionalProperties: {
163
- type: 'object',
164
- additionalProperties: false,
165
- properties: {
166
- path: {
167
- type: 'string',
168
- description: 'Explicit module/file path.',
169
- },
170
- verbose: {
171
- type: 'boolean',
172
- description: 'Enable verbose logging for this plugin.',
173
- },
174
- autoload: {
175
- type: 'boolean',
176
- description: 'When set to `false`, this plugin is skipped even though it is listed under `plugins`.',
177
- default: true,
178
- },
179
- options: {
180
- type: 'object',
181
- additionalProperties: true,
182
- description: 'Plugin-specific options.',
183
- },
184
- },
185
- },
186
- },
187
- },
188
- };
1
+ // One schema, two surfaces: `thymian-config-schema.json` is what ajv validates
2
+ // against at runtime (see `validate-config.ts`) and what generates the
3
+ // published reference page. This module is the import-friendly surface for
4
+ // consumers of the package, re-exported from the package entry point, and by
5
+ // re-exporting rather than restating the schema it cannot drift from it.
6
+ import schema from './thymian-config-schema.json' with { type: 'json' };
7
+ export const thymianConfigSchema = schema;
189
8
  //# sourceMappingURL=thymian-config-schema.js.map
@@ -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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AQ;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"}
1
+ {"version":3,"file":"thymian-config-schema.js","sourceRoot":"","sources":["../src/thymian-config-schema.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,uEAAuE;AACvE,2EAA2E;AAC3E,6EAA6E;AAC7E,yEAAyE;AACzE,OAAO,MAAM,MAAM,8BAA8B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAExE,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC"}
@@ -135,7 +135,7 @@
135
135
  },
136
136
  "rules": {
137
137
  "type": "object",
138
- "description": "Per-rule configuration/overrides. Each key is a rule ID. The value can be a severity string (`off | error | warn | hint`) or a rule config object.",
138
+ "description": "Per-rule configuration/overrides. Each key is a rule ID. The value can be a severity string (`off | error | warn | hint`) or a rule config object with `severity`, `type`, `skipOrigins`, and `options` fields.",
139
139
  "default": {},
140
140
  "additionalProperties": {
141
141
  "oneOf": [
@@ -154,6 +154,16 @@
154
154
  "enum": ["error", "warn", "hint", "off"],
155
155
  "description": "Override the rule severity."
156
156
  },
157
+ "type": {
158
+ "type": "array",
159
+ "minItems": 1,
160
+ "uniqueItems": true,
161
+ "items": {
162
+ "type": "string",
163
+ "enum": ["static", "analytics", "test", "informational"]
164
+ },
165
+ "description": "The validation contexts this rule runs in, replacing the contexts the rule declares. `static` runs it in `thymian lint`, `analytics` in `thymian analyze`, `test` in `thymian test`. `informational` must be the only entry: it stops the rule executing while keeping it documented."
166
+ },
157
167
  "options": {
158
168
  "type": "object",
159
169
  "additionalProperties": true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thymian/common-cli",
3
- "version": "0.2.1-canary.20260914-e32cebc",
3
+ "version": "0.2.1-canary.20260914-d1ab7f8",
4
4
  "description": "Shared CLI utilities, commands, and configuration management for Thymian",
5
5
  "license": "AGPL-3.0-only",
6
6
  "bugs": {
@@ -52,6 +52,6 @@
52
52
  "wrap-ansi": "^7.0.0",
53
53
  "string-width": "^4.2.3",
54
54
  "@oclif/core": "^4.3.3",
55
- "@thymian/core": "0.2.1-canary.20260914-e32cebc"
55
+ "@thymian/core": "0.2.1-canary.20260914-d1ab7f8"
56
56
  }
57
57
  }