@cplieger/deadset-ts 8.0.0-dev.6 → 8.0.0-dev.8
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/bin/mapper-connection.js +2 -1
- package/dist/bin/node-host.js +24 -5
- package/dist/src/analysis.js +37 -56
- package/dist/src/automatic-types.js +10 -29
- package/dist/src/build-scripts.js +17 -29
- package/dist/src/component-layer.js +4 -2
- package/dist/src/components.js +2 -3
- package/dist/src/config.js +6 -82
- package/dist/src/configuration-files.js +27 -168
- package/dist/src/configured-declarations.js +15 -20
- package/dist/src/consumers.js +2 -2
- package/dist/src/contract/config.generated.js +544 -0
- package/dist/src/contract/contract.generated.js +13 -0
- package/dist/src/contract/report.generated.js +3 -2
- package/dist/src/conventions.js +20 -60
- package/dist/src/dependencies.js +25 -43
- package/dist/src/discover.js +14 -40
- package/dist/src/edges.js +38 -122
- package/dist/src/element-access.js +4 -6
- package/dist/src/entry-point-gaps.js +2 -8
- package/dist/src/entry-points.js +3 -10
- package/dist/src/enum-group.js +3 -10
- package/dist/src/erased-stores.js +4 -6
- package/dist/src/exempt-classes.js +0 -4
- package/dist/src/exempt.js +6 -22
- package/dist/src/file-facts.js +2 -25
- package/dist/src/findings/completion.js +5 -4
- package/dist/src/findings/emitters.js +1 -1
- package/dist/src/findings/intra-function.js +1 -1
- package/dist/src/findings/non-code-artifacts.js +2 -2
- package/dist/src/findings/reads-and-writes.js +2 -1
- package/dist/src/findings/self-check.js +3 -2
- package/dist/src/findings/unused-declarations.js +1 -1
- package/dist/src/findings/visibility-narrowing.js +2 -2
- package/dist/src/findings-pass.js +7 -12
- package/dist/src/framework-lifecycle.js +7 -7
- package/dist/src/fs/document.js +59 -0
- package/dist/src/fs/manifest.js +43 -0
- package/dist/src/fs/tree.js +88 -0
- package/dist/src/git-ignore.js +34 -25
- package/dist/src/html-entries.js +6 -33
- package/dist/src/in-operands.js +2 -1
- package/dist/src/injection-container.js +1 -1
- package/dist/src/intra-function-parts.js +10 -13
- package/dist/src/inventory.js +2 -21
- package/dist/src/json-document.js +198 -67
- package/dist/src/keyof-comparisons.js +4 -6
- package/dist/src/kinds.js +0 -7
- package/dist/src/manifest.js +5 -43
- package/dist/src/mdx-entries.js +3 -26
- package/dist/src/partial.js +2 -1
- package/dist/src/paths.js +26 -15
- package/dist/src/position.js +2 -1
- package/dist/src/print.js +11 -79
- package/dist/src/product.js +13 -0
- package/dist/src/references.js +14 -27
- package/dist/src/report-schema.js +3 -225
- package/dist/src/report.js +22 -31
- package/dist/src/reporters/sarif.js +4 -2
- package/dist/src/reporters/template.js +4 -19
- package/dist/src/resolve.js +245 -724
- package/dist/src/roots.js +7 -17
- package/dist/src/run.js +55 -61
- package/dist/src/schema.js +320 -343
- package/dist/src/scope.js +34 -103
- package/dist/src/serialization-contract.js +5 -9
- package/dist/src/session.js +2 -1
- package/dist/src/suppress-file.js +21 -25
- package/dist/src/suppress.js +3 -3
- package/dist/src/symbol-keys.js +3 -5
- package/dist/src/template-field.js +9 -19
- package/dist/src/test-globals.js +6 -28
- package/dist/src/test-joins.js +6 -6
- package/dist/src/text/compare.js +26 -0
- package/dist/src/text/glob.js +194 -0
- package/dist/src/text/shell.js +159 -0
- package/dist/src/{yaml-document.js → text/yaml.js} +38 -0
- package/dist/src/type-errors.js +14 -38
- package/dist/src/unseen-loads.js +2 -9
- package/dist/src/unwrap.js +23 -0
- package/dist/src/usage.js +10 -0
- package/dist/src/verbs/analyze.js +25 -26
- package/dist/src/verbs/describe.js +4 -4
- package/dist/src/verbs/explain.js +8 -6
- package/dist/src/verbs/print-projects.js +4 -3
- package/dist/src/verbs/print-retained.js +2 -1
- package/dist/src/verbs/print-roots.js +2 -1
- package/dist/src/verbs/version.js +2 -1
- package/dist/src/workflow-steps.js +9 -46
- package/dist/src/workspace-manifests.js +2 -2
- package/dist/src/workspace-programs.js +5 -3
- package/dist/src/workspace-resolution.js +13 -17
- package/dist/src/workspace.js +28 -116
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/analysis.ts +55 -76
- package/src/automatic-types.ts +11 -29
- package/src/build-scripts.ts +17 -38
- package/src/component-layer.ts +4 -2
- package/src/components.ts +2 -4
- package/src/config.ts +31 -296
- package/src/configuration-files.ts +27 -170
- package/src/configured-declarations.ts +18 -23
- package/src/consumers.ts +4 -4
- package/src/contract/config.generated.ts +798 -0
- package/src/contract/contract.generated.ts +25 -0
- package/src/contract/report.generated.ts +3 -2
- package/src/conventions.ts +26 -74
- package/src/dependencies.ts +32 -50
- package/src/discover.ts +15 -40
- package/src/edges.ts +41 -140
- package/src/element-access.ts +4 -7
- package/src/entry-point-gaps.ts +3 -9
- package/src/entry-points.ts +2 -13
- package/src/enum-group.ts +2 -11
- package/src/erased-stores.ts +3 -7
- package/src/exempt-classes.ts +0 -5
- package/src/exempt.ts +8 -30
- package/src/file-facts.ts +6 -24
- package/src/findings/completion.ts +5 -6
- package/src/findings/emitter.ts +2 -2
- package/src/findings/emitters.ts +1 -1
- package/src/findings/intra-function.ts +1 -1
- package/src/findings/non-code-artifacts.ts +4 -4
- package/src/findings/reads-and-writes.ts +2 -1
- package/src/findings/self-check.ts +3 -2
- package/src/findings/unused-declarations.ts +1 -1
- package/src/findings/visibility-narrowing.ts +2 -2
- package/src/findings-pass.ts +9 -15
- package/src/framework-lifecycle.ts +7 -7
- package/src/fs/document.ts +74 -0
- package/src/fs/manifest.ts +52 -0
- package/src/fs/tree.ts +110 -0
- package/src/git-ignore.ts +38 -25
- package/src/host.ts +12 -5
- package/src/html-entries.ts +6 -33
- package/src/in-operands.ts +2 -1
- package/src/injection-container.ts +1 -1
- package/src/intra-function-parts.ts +10 -14
- package/src/inventory.ts +2 -20
- package/src/json-document.ts +241 -76
- package/src/keyof-comparisons.ts +3 -7
- package/src/kinds.ts +0 -8
- package/src/manifest.ts +5 -46
- package/src/mdx-entries.ts +3 -26
- package/src/partial.ts +2 -1
- package/src/paths.ts +27 -15
- package/src/position.ts +2 -1
- package/src/print.ts +12 -92
- package/src/product.ts +18 -0
- package/src/references.ts +14 -29
- package/src/report-schema.ts +3 -301
- package/src/report.ts +24 -34
- package/src/reporters/sarif.ts +4 -4
- package/src/reporters/template.ts +4 -20
- package/src/resolve.ts +283 -1114
- package/src/roots.ts +7 -20
- package/src/run.ts +57 -75
- package/src/schema.ts +391 -388
- package/src/scope.ts +40 -126
- package/src/serialization-contract.ts +5 -10
- package/src/session.ts +2 -1
- package/src/suppress-file.ts +21 -29
- package/src/suppress.ts +3 -3
- package/src/symbol-keys.ts +2 -5
- package/src/template-field.ts +15 -25
- package/src/test-globals.ts +9 -27
- package/src/test-joins.ts +6 -8
- package/src/text/compare.ts +27 -0
- package/src/text/glob.ts +210 -0
- package/src/text/shell.ts +161 -0
- package/src/{yaml-document.ts → text/yaml.ts} +46 -0
- package/src/type-errors.ts +25 -36
- package/src/unseen-loads.ts +1 -12
- package/src/unwrap.ts +34 -0
- package/src/usage.ts +10 -0
- package/src/verbs/analyze.ts +32 -42
- package/src/verbs/describe.ts +4 -4
- package/src/verbs/explain.ts +8 -10
- package/src/verbs/print-projects.ts +4 -3
- package/src/verbs/print-retained.ts +2 -1
- package/src/verbs/print-roots.ts +2 -1
- package/src/verbs/verb.ts +2 -2
- package/src/verbs/version.ts +2 -1
- package/src/workflow-steps.ts +9 -44
- package/src/workspace-manifests.ts +2 -2
- package/src/workspace-programs.ts +5 -3
- package/src/workspace-resolution.ts +21 -17
- package/src/workspace.ts +35 -121
- package/dist/src/glob.js +0 -65
- package/dist/src/pnpm-workspace.js +0 -120
- package/src/glob.ts +0 -67
- package/src/pnpm-workspace.ts +0 -135
|
@@ -0,0 +1,544 @@
|
|
|
1
|
+
// Code generated by scripts/gen-config.ts from the Contract copy under fixtures/ (npm run gen). DO NOT EDIT.
|
|
2
|
+
export const SETTINGS = [
|
|
3
|
+
{
|
|
4
|
+
key: "contract_version",
|
|
5
|
+
role: "setting",
|
|
6
|
+
read: true,
|
|
7
|
+
default: "8.0.0",
|
|
8
|
+
value: { type: "string", pattern: "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
|
|
9
|
+
},
|
|
10
|
+
{ key: "target", role: "section", read: true },
|
|
11
|
+
{
|
|
12
|
+
key: "target.kind",
|
|
13
|
+
role: "setting",
|
|
14
|
+
read: true,
|
|
15
|
+
required: true,
|
|
16
|
+
value: {
|
|
17
|
+
oneOf: [
|
|
18
|
+
{ type: "string", enum: ["application", "library"] },
|
|
19
|
+
{
|
|
20
|
+
type: "object",
|
|
21
|
+
additionalProperties: false,
|
|
22
|
+
required: ["ts"],
|
|
23
|
+
properties: { ts: { type: "string", enum: ["application", "library"] } },
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
perLanguage: ["go", "ts"],
|
|
28
|
+
},
|
|
29
|
+
{ key: "analysis", role: "section", read: true },
|
|
30
|
+
{ key: "analysis.languages", role: "setting", read: false },
|
|
31
|
+
{
|
|
32
|
+
key: "analysis.min_confidence",
|
|
33
|
+
role: "setting",
|
|
34
|
+
read: true,
|
|
35
|
+
default: "probable",
|
|
36
|
+
option: "min-confidence",
|
|
37
|
+
value: { type: "string", enum: ["certain", "probable", "possible"] },
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
key: "analysis.generated_files",
|
|
41
|
+
role: "setting",
|
|
42
|
+
read: true,
|
|
43
|
+
default: "exclude",
|
|
44
|
+
value: { type: "string", enum: ["exclude", "include"] },
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
key: "analysis.consumer_tests",
|
|
48
|
+
role: "setting",
|
|
49
|
+
read: true,
|
|
50
|
+
default: "test",
|
|
51
|
+
value: { type: "string", enum: ["test", "production"] },
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
key: "analysis.configurations",
|
|
55
|
+
role: "setting",
|
|
56
|
+
read: true,
|
|
57
|
+
default: [],
|
|
58
|
+
value: {
|
|
59
|
+
type: "array",
|
|
60
|
+
items: {
|
|
61
|
+
oneOf: [
|
|
62
|
+
{
|
|
63
|
+
type: "object",
|
|
64
|
+
additionalProperties: false,
|
|
65
|
+
required: ["id", "os", "arch"],
|
|
66
|
+
properties: {
|
|
67
|
+
id: { type: "string", minLength: 1 },
|
|
68
|
+
os: { type: "string", minLength: 1 },
|
|
69
|
+
arch: { type: "string", minLength: 1 },
|
|
70
|
+
tags: { type: "array", uniqueItems: true, items: { type: "string", minLength: 1 } },
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
type: "object",
|
|
75
|
+
additionalProperties: false,
|
|
76
|
+
required: ["id", "project"],
|
|
77
|
+
properties: {
|
|
78
|
+
id: { type: "string", minLength: 1 },
|
|
79
|
+
project: {
|
|
80
|
+
type: "string",
|
|
81
|
+
minLength: 1,
|
|
82
|
+
pattern: "^(?:[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.\\.[^/\\x00-\\x1f\\x7f]+)(?:/(?:[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.[^/.\\x00-\\x1f\\x7f][^/\\x00-\\x1f\\x7f]*|\\.\\.[^/\\x00-\\x1f\\x7f]+))*$",
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
{ key: "analysis.matrix", role: "section", read: true },
|
|
91
|
+
{
|
|
92
|
+
key: "analysis.matrix.complete",
|
|
93
|
+
role: "setting",
|
|
94
|
+
read: true,
|
|
95
|
+
default: false,
|
|
96
|
+
value: { type: "boolean" },
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
key: "analysis.template_dirs",
|
|
100
|
+
role: "setting",
|
|
101
|
+
read: true,
|
|
102
|
+
default: [],
|
|
103
|
+
value: { type: "array", uniqueItems: true, items: { type: "string", minLength: 1 } },
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
key: "analysis.template_delimiters",
|
|
107
|
+
role: "setting",
|
|
108
|
+
read: true,
|
|
109
|
+
default: { left: "{{", right: "}}" },
|
|
110
|
+
value: {
|
|
111
|
+
type: "object",
|
|
112
|
+
additionalProperties: false,
|
|
113
|
+
required: ["left", "right"],
|
|
114
|
+
properties: {
|
|
115
|
+
left: { type: "string", minLength: 1 },
|
|
116
|
+
right: { type: "string", minLength: 1 },
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
{ key: "consumers", role: "section", read: true },
|
|
121
|
+
{
|
|
122
|
+
key: "consumers.complete",
|
|
123
|
+
role: "setting",
|
|
124
|
+
read: true,
|
|
125
|
+
default: false,
|
|
126
|
+
value: { type: "boolean" },
|
|
127
|
+
},
|
|
128
|
+
{ key: "roots", role: "section", read: true },
|
|
129
|
+
{
|
|
130
|
+
key: "roots.patterns",
|
|
131
|
+
role: "setting",
|
|
132
|
+
read: true,
|
|
133
|
+
default: [],
|
|
134
|
+
value: { type: "array", uniqueItems: true, items: { type: "string", minLength: 1 } },
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
key: "severity",
|
|
138
|
+
role: "keyed",
|
|
139
|
+
read: true,
|
|
140
|
+
default: {},
|
|
141
|
+
value: { type: "string", enum: ["allow", "warn", "deny"] },
|
|
142
|
+
keyPattern: "^DS[0-9]{2}([0-9]{2})?$",
|
|
143
|
+
values: [
|
|
144
|
+
"DS10",
|
|
145
|
+
"DS1001",
|
|
146
|
+
"DS1002",
|
|
147
|
+
"DS1003",
|
|
148
|
+
"DS1004",
|
|
149
|
+
"DS1005",
|
|
150
|
+
"DS1006",
|
|
151
|
+
"DS11",
|
|
152
|
+
"DS1101",
|
|
153
|
+
"DS1102",
|
|
154
|
+
"DS1103",
|
|
155
|
+
"DS1104",
|
|
156
|
+
"DS12",
|
|
157
|
+
"DS1201",
|
|
158
|
+
"DS1202",
|
|
159
|
+
"DS1203",
|
|
160
|
+
"DS13",
|
|
161
|
+
"DS1301",
|
|
162
|
+
"DS14",
|
|
163
|
+
"DS1401",
|
|
164
|
+
"DS1402",
|
|
165
|
+
"DS1403",
|
|
166
|
+
"DS1404",
|
|
167
|
+
"DS1405",
|
|
168
|
+
"DS1406",
|
|
169
|
+
"DS15",
|
|
170
|
+
"DS1501",
|
|
171
|
+
"DS1502",
|
|
172
|
+
"DS1503",
|
|
173
|
+
"DS16",
|
|
174
|
+
"DS1601",
|
|
175
|
+
"DS1602",
|
|
176
|
+
"DS17",
|
|
177
|
+
"DS1701",
|
|
178
|
+
"DS1702",
|
|
179
|
+
"DS9001",
|
|
180
|
+
"DS9002",
|
|
181
|
+
"DS9005",
|
|
182
|
+
],
|
|
183
|
+
},
|
|
184
|
+
{ key: "exemptions", role: "section", read: true },
|
|
185
|
+
{
|
|
186
|
+
key: "exemptions.disabled",
|
|
187
|
+
role: "setting",
|
|
188
|
+
read: true,
|
|
189
|
+
default: [],
|
|
190
|
+
value: {
|
|
191
|
+
type: "array",
|
|
192
|
+
uniqueItems: true,
|
|
193
|
+
items: {
|
|
194
|
+
type: "string",
|
|
195
|
+
enum: [
|
|
196
|
+
"interface-satisfaction",
|
|
197
|
+
"encoding-reflection",
|
|
198
|
+
"format-verb-contract",
|
|
199
|
+
"errors-duck-typing",
|
|
200
|
+
"enum-group",
|
|
201
|
+
"generated-file",
|
|
202
|
+
"linkname-cgo-asm-plugin",
|
|
203
|
+
"template-field",
|
|
204
|
+
"reflective-lookup",
|
|
205
|
+
"decorator",
|
|
206
|
+
"injection-container",
|
|
207
|
+
"framework-lifecycle",
|
|
208
|
+
"serialization-contract",
|
|
209
|
+
],
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
{ key: "reporters", role: "section", read: true },
|
|
214
|
+
{
|
|
215
|
+
key: "reporters.formats",
|
|
216
|
+
role: "setting",
|
|
217
|
+
read: true,
|
|
218
|
+
default: ["text"],
|
|
219
|
+
value: {
|
|
220
|
+
type: "array",
|
|
221
|
+
uniqueItems: true,
|
|
222
|
+
minItems: 1,
|
|
223
|
+
items: { type: "string", enum: ["text", "json", "github", "sarif", "template"] },
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
key: "reporters.sort",
|
|
228
|
+
role: "setting",
|
|
229
|
+
read: true,
|
|
230
|
+
default: "position",
|
|
231
|
+
option: "sort",
|
|
232
|
+
value: { type: "string", enum: ["position", "size"] },
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
key: "reporters.cascade",
|
|
236
|
+
role: "setting",
|
|
237
|
+
read: true,
|
|
238
|
+
default: "roots",
|
|
239
|
+
option: "cascade",
|
|
240
|
+
value: { type: "string", enum: ["roots", "full"] },
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
key: "reporters.max_findings",
|
|
244
|
+
role: "setting",
|
|
245
|
+
read: true,
|
|
246
|
+
default: 0,
|
|
247
|
+
option: "max-findings",
|
|
248
|
+
value: { type: "integer", minimum: 0, maximum: 9007199254740991 },
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
key: "reporters.fail_on",
|
|
252
|
+
role: "setting",
|
|
253
|
+
read: true,
|
|
254
|
+
default: "deny",
|
|
255
|
+
option: "fail-on",
|
|
256
|
+
value: { type: "string", enum: ["allow", "warn", "deny"] },
|
|
257
|
+
},
|
|
258
|
+
{ key: "providers", role: "section", read: false },
|
|
259
|
+
{ key: "providers.analyzers", role: "setting", read: false },
|
|
260
|
+
{ key: "go", role: "section", read: false },
|
|
261
|
+
{ key: "ts", role: "section", read: true },
|
|
262
|
+
{
|
|
263
|
+
key: "ts.test_files",
|
|
264
|
+
role: "setting",
|
|
265
|
+
read: true,
|
|
266
|
+
default: [
|
|
267
|
+
"**/*.test.{ts,tsx,mts,cts}",
|
|
268
|
+
"**/*.test-d.{ts,tsx,mts,cts}",
|
|
269
|
+
"**/*.spec-d.{ts,tsx,mts,cts}",
|
|
270
|
+
"**/*.spec.*",
|
|
271
|
+
"**/__tests__/**",
|
|
272
|
+
"**/__mocks__/**",
|
|
273
|
+
"**/test-d/**",
|
|
274
|
+
],
|
|
275
|
+
value: {
|
|
276
|
+
type: "array",
|
|
277
|
+
uniqueItems: true,
|
|
278
|
+
minItems: 1,
|
|
279
|
+
items: { type: "string", minLength: 1 },
|
|
280
|
+
},
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
key: "ts.entry_files",
|
|
284
|
+
role: "setting",
|
|
285
|
+
read: true,
|
|
286
|
+
default: [],
|
|
287
|
+
value: { type: "array", uniqueItems: true, items: { type: "string", minLength: 1 } },
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
key: "ts.component_extensions",
|
|
291
|
+
role: "setting",
|
|
292
|
+
read: true,
|
|
293
|
+
default: [".vue", ".svelte", ".astro"],
|
|
294
|
+
value: {
|
|
295
|
+
type: "array",
|
|
296
|
+
uniqueItems: true,
|
|
297
|
+
items: { type: "string", pattern: "^\\.[A-Za-z0-9]+$" },
|
|
298
|
+
},
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
key: "ts.disabled_conventions",
|
|
302
|
+
role: "setting",
|
|
303
|
+
read: true,
|
|
304
|
+
default: [],
|
|
305
|
+
value: {
|
|
306
|
+
type: "array",
|
|
307
|
+
uniqueItems: true,
|
|
308
|
+
items: { type: "string", pattern: "^[a-z][a-z0-9]*(-[a-z0-9]+)*$" },
|
|
309
|
+
},
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
key: "ts.injection_registrations",
|
|
313
|
+
role: "setting",
|
|
314
|
+
read: true,
|
|
315
|
+
default: [],
|
|
316
|
+
value: {
|
|
317
|
+
type: "array",
|
|
318
|
+
items: {
|
|
319
|
+
oneOf: [
|
|
320
|
+
{
|
|
321
|
+
type: "object",
|
|
322
|
+
additionalProperties: false,
|
|
323
|
+
required: ["symbol"],
|
|
324
|
+
properties: { symbol: { type: "string", pattern: "^ts://" } },
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
type: "object",
|
|
328
|
+
additionalProperties: false,
|
|
329
|
+
required: ["module", "name"],
|
|
330
|
+
properties: {
|
|
331
|
+
module: { type: "string", pattern: "^[^./#]" },
|
|
332
|
+
name: { type: "string", minLength: 1 },
|
|
333
|
+
},
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
type: "object",
|
|
337
|
+
additionalProperties: false,
|
|
338
|
+
required: ["global"],
|
|
339
|
+
properties: { global: { type: "string", minLength: 1 } },
|
|
340
|
+
},
|
|
341
|
+
],
|
|
342
|
+
},
|
|
343
|
+
},
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
key: "ts.lifecycle_contracts",
|
|
347
|
+
role: "setting",
|
|
348
|
+
read: true,
|
|
349
|
+
default: [],
|
|
350
|
+
value: {
|
|
351
|
+
type: "array",
|
|
352
|
+
items: {
|
|
353
|
+
type: "object",
|
|
354
|
+
additionalProperties: false,
|
|
355
|
+
required: ["members"],
|
|
356
|
+
anyOf: [
|
|
357
|
+
{ required: ["components"], properties: { components: { minItems: 1 } } },
|
|
358
|
+
{ required: ["bases"], properties: { bases: { minItems: 1 } } },
|
|
359
|
+
],
|
|
360
|
+
properties: {
|
|
361
|
+
components: {
|
|
362
|
+
type: "array",
|
|
363
|
+
items: {
|
|
364
|
+
oneOf: [
|
|
365
|
+
{
|
|
366
|
+
type: "object",
|
|
367
|
+
additionalProperties: false,
|
|
368
|
+
required: ["symbol"],
|
|
369
|
+
properties: { symbol: { type: "string", pattern: "^ts://" } },
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
type: "object",
|
|
373
|
+
additionalProperties: false,
|
|
374
|
+
required: ["module", "name"],
|
|
375
|
+
properties: {
|
|
376
|
+
module: { type: "string", pattern: "^[^./#]" },
|
|
377
|
+
name: { type: "string", minLength: 1 },
|
|
378
|
+
},
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
type: "object",
|
|
382
|
+
additionalProperties: false,
|
|
383
|
+
required: ["global"],
|
|
384
|
+
properties: { global: { type: "string", minLength: 1 } },
|
|
385
|
+
},
|
|
386
|
+
],
|
|
387
|
+
},
|
|
388
|
+
},
|
|
389
|
+
bases: {
|
|
390
|
+
type: "array",
|
|
391
|
+
items: {
|
|
392
|
+
oneOf: [
|
|
393
|
+
{
|
|
394
|
+
type: "object",
|
|
395
|
+
additionalProperties: false,
|
|
396
|
+
required: ["symbol"],
|
|
397
|
+
properties: { symbol: { type: "string", pattern: "^ts://" } },
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
type: "object",
|
|
401
|
+
additionalProperties: false,
|
|
402
|
+
required: ["module", "name"],
|
|
403
|
+
properties: {
|
|
404
|
+
module: { type: "string", pattern: "^[^./#]" },
|
|
405
|
+
name: { type: "string", minLength: 1 },
|
|
406
|
+
},
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
type: "object",
|
|
410
|
+
additionalProperties: false,
|
|
411
|
+
required: ["global"],
|
|
412
|
+
properties: { global: { type: "string", minLength: 1 } },
|
|
413
|
+
},
|
|
414
|
+
],
|
|
415
|
+
},
|
|
416
|
+
},
|
|
417
|
+
members: {
|
|
418
|
+
type: "array",
|
|
419
|
+
uniqueItems: true,
|
|
420
|
+
minItems: 1,
|
|
421
|
+
items: { type: "string", minLength: 1 },
|
|
422
|
+
},
|
|
423
|
+
},
|
|
424
|
+
},
|
|
425
|
+
},
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
key: "ts.serializers",
|
|
429
|
+
role: "setting",
|
|
430
|
+
read: true,
|
|
431
|
+
default: [],
|
|
432
|
+
value: {
|
|
433
|
+
type: "array",
|
|
434
|
+
items: {
|
|
435
|
+
oneOf: [
|
|
436
|
+
{
|
|
437
|
+
type: "object",
|
|
438
|
+
additionalProperties: false,
|
|
439
|
+
required: ["symbol"],
|
|
440
|
+
properties: { symbol: { type: "string", pattern: "^ts://" } },
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
type: "object",
|
|
444
|
+
additionalProperties: false,
|
|
445
|
+
required: ["module", "name"],
|
|
446
|
+
properties: {
|
|
447
|
+
module: { type: "string", pattern: "^[^./#]" },
|
|
448
|
+
name: { type: "string", minLength: 1 },
|
|
449
|
+
},
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
type: "object",
|
|
453
|
+
additionalProperties: false,
|
|
454
|
+
required: ["global"],
|
|
455
|
+
properties: { global: { type: "string", minLength: 1 } },
|
|
456
|
+
},
|
|
457
|
+
],
|
|
458
|
+
},
|
|
459
|
+
},
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
key: "ts.roots_complete",
|
|
463
|
+
role: "setting",
|
|
464
|
+
read: true,
|
|
465
|
+
default: false,
|
|
466
|
+
value: { type: "boolean" },
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
key: "provenance",
|
|
470
|
+
role: "ignored",
|
|
471
|
+
read: true,
|
|
472
|
+
value: { type: "string", pattern: "^(default|(repository|central|flag): [^\\r\\n]+)$" },
|
|
473
|
+
keyPattern: "^[a-z][a-z_]*(\\.[A-Za-z0-9_]+)*$",
|
|
474
|
+
},
|
|
475
|
+
];
|
|
476
|
+
/** The bound on a configuration document, in bytes. */
|
|
477
|
+
export const CONFIG_MAX_BYTES = 1048576;
|
|
478
|
+
/** The scope document's schema, as the validator reads it. */
|
|
479
|
+
export const SCOPE_SCHEMA = {
|
|
480
|
+
type: "object",
|
|
481
|
+
additionalProperties: false,
|
|
482
|
+
required: ["target"],
|
|
483
|
+
properties: {
|
|
484
|
+
target: {
|
|
485
|
+
type: "object",
|
|
486
|
+
additionalProperties: false,
|
|
487
|
+
required: ["path"],
|
|
488
|
+
properties: {
|
|
489
|
+
id: { type: "string", minLength: 1 },
|
|
490
|
+
role: { type: "string", enum: ["target"] },
|
|
491
|
+
path: { type: "string", minLength: 1 },
|
|
492
|
+
},
|
|
493
|
+
},
|
|
494
|
+
workspace: { type: "string", minLength: 1 },
|
|
495
|
+
consumers: {
|
|
496
|
+
type: "array",
|
|
497
|
+
items: {
|
|
498
|
+
type: "object",
|
|
499
|
+
additionalProperties: false,
|
|
500
|
+
required: ["path"],
|
|
501
|
+
properties: {
|
|
502
|
+
id: { type: "string", minLength: 1 },
|
|
503
|
+
role: { type: "string", enum: ["consumer"] },
|
|
504
|
+
path: { type: "string", minLength: 1 },
|
|
505
|
+
},
|
|
506
|
+
},
|
|
507
|
+
},
|
|
508
|
+
},
|
|
509
|
+
};
|
|
510
|
+
/** The edges document's schema, as the validator reads it. */
|
|
511
|
+
export const EDGES_SCHEMA = {
|
|
512
|
+
type: "object",
|
|
513
|
+
additionalProperties: false,
|
|
514
|
+
required: ["edges"],
|
|
515
|
+
properties: {
|
|
516
|
+
description: { type: "string" },
|
|
517
|
+
edges: {
|
|
518
|
+
type: "object",
|
|
519
|
+
propertyNames: { $ref: "#/$defs/edge_identifier" },
|
|
520
|
+
additionalProperties: {
|
|
521
|
+
type: "object",
|
|
522
|
+
additionalProperties: false,
|
|
523
|
+
required: ["provides", "used_by"],
|
|
524
|
+
properties: {
|
|
525
|
+
because: { type: "string" },
|
|
526
|
+
provides: { $ref: "#/$defs/reference" },
|
|
527
|
+
used_by: { $ref: "#/$defs/reference" },
|
|
528
|
+
},
|
|
529
|
+
},
|
|
530
|
+
},
|
|
531
|
+
},
|
|
532
|
+
$defs: {
|
|
533
|
+
reference: {
|
|
534
|
+
type: "string",
|
|
535
|
+
allOf: [
|
|
536
|
+
{ pattern: "^[a-z][a-z0-9]*://[^ \\t\\r\\n#]+#[^ \\t\\r\\n]*$" },
|
|
537
|
+
{
|
|
538
|
+
pattern: "^(?:[^'\\[*]|'(?:[^'\\\\]|\\\\[^\\r\\n])*'|\\[[^\\]]*\\])*(?:'(?:[^'\\\\]|\\\\[^\\r\\n])*\\\\?|\\[[^\\]]*)?$",
|
|
539
|
+
},
|
|
540
|
+
],
|
|
541
|
+
},
|
|
542
|
+
edge_identifier: { type: "string", pattern: "^[A-Za-z0-9_.-]+(/[A-Za-z0-9_.-]+)*$" },
|
|
543
|
+
},
|
|
544
|
+
};
|
|
@@ -19,6 +19,19 @@ export const FORMATS = [
|
|
|
19
19
|
"sarif",
|
|
20
20
|
"template",
|
|
21
21
|
];
|
|
22
|
+
/** Each analyzed language's row: its analyzer, the names that mark it and the directories it skips. */
|
|
23
|
+
export const LANGUAGE_ROWS = {
|
|
24
|
+
go: {
|
|
25
|
+
analyzer: "deadset-go",
|
|
26
|
+
markers: ["go.mod"],
|
|
27
|
+
skippedDirectories: ["node_modules", "testdata", "vendor", ".*", "_*"],
|
|
28
|
+
},
|
|
29
|
+
ts: {
|
|
30
|
+
analyzer: "deadset-ts",
|
|
31
|
+
markers: ["tsconfig*.json"],
|
|
32
|
+
skippedDirectories: ["node_modules", ".git"],
|
|
33
|
+
},
|
|
34
|
+
};
|
|
22
35
|
export const EXIT_CLEAN = 0;
|
|
23
36
|
export const EXIT_FINDINGS = 1;
|
|
24
37
|
export const EXIT_USAGE = 2;
|
|
@@ -235,7 +235,7 @@ export const REPORT_SCHEMAS = {
|
|
|
235
235
|
additionalProperties: false,
|
|
236
236
|
required: ["edge", "side", "symbol", "state"],
|
|
237
237
|
properties: {
|
|
238
|
-
edge: {
|
|
238
|
+
edge: { $ref: "finding.schema.json#/$defs/edge_identifier" },
|
|
239
239
|
side: { type: "string", enum: ["provides", "used_by"] },
|
|
240
240
|
symbol: { type: "string" },
|
|
241
241
|
state: { type: "string", enum: ["live", "dead", "absent"] },
|
|
@@ -609,7 +609,7 @@ export const REPORT_SCHEMAS = {
|
|
|
609
609
|
uniqueItems: true,
|
|
610
610
|
items: { type: "string", minLength: 1 },
|
|
611
611
|
},
|
|
612
|
-
edge: {
|
|
612
|
+
edge: { $ref: "#/$defs/edge_identifier" },
|
|
613
613
|
sides: {
|
|
614
614
|
type: "array",
|
|
615
615
|
minItems: 1,
|
|
@@ -765,6 +765,7 @@ export const REPORT_SCHEMAS = {
|
|
|
765
765
|
},
|
|
766
766
|
],
|
|
767
767
|
$defs: {
|
|
768
|
+
edge_identifier: { type: "string", pattern: "^[A-Za-z0-9_.-]+(/[A-Za-z0-9_.-]+)*$" },
|
|
768
769
|
position: {
|
|
769
770
|
type: "object",
|
|
770
771
|
additionalProperties: false,
|