@code-pushup/models 0.108.2 → 0.110.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-pushup/models",
3
- "version": "0.108.2",
3
+ "version": "0.110.0",
4
4
  "license": "MIT",
5
5
  "description": "Model definitions and validators for the Code PushUp CLI",
6
6
  "homepage": "https://github.com/code-pushup/cli/tree/main/packages/models#readme",
package/src/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { tableCellValueSchema, type TableCellValue, } from './lib/implementation/schemas.js';
2
- export { sourceFileLocationSchema, type SourceFileLocation, } from './lib/source.js';
2
+ export { sourceFileLocationSchema, sourceUrlLocationSchema, issueSourceSchema, type IssueSource, type SourceFileLocation, type SourceUrlLocation, } from './lib/source.js';
3
3
  export { auditDetailsSchema, auditOutputSchema, auditOutputsSchema, type AuditDetails, type AuditOutput, type AuditOutputs, } from './lib/audit-output.js';
4
4
  export { auditSchema, type Audit } from './lib/audit.js';
5
5
  export { cacheConfigObjectSchema, cacheConfigSchema, cacheConfigShorthandSchema, type CacheConfig, type CacheConfigObject, type CacheConfigShorthand, } from './lib/cache-config.js';
@@ -14,7 +14,7 @@ export { MAX_DESCRIPTION_LENGTH, MAX_ISSUE_MESSAGE_LENGTH, MAX_SLUG_LENGTH, MAX_
14
14
  export { fileNameSchema, filePathSchema, globPathSchema, materialIconSchema, nonnegativeNumberSchema, positiveIntSchema, scoreSchema, slugSchema, weightSchema, type MaterialIcon, } from './lib/implementation/schemas.js';
15
15
  export { exists } from './lib/implementation/utils.js';
16
16
  export { SchemaValidationError, validate, validateAsync, } from './lib/implementation/validate.js';
17
- export { issueSchema, issueSeveritySchema, type Issue, type IssueSeverity, } from './lib/issue.js';
17
+ export { fileIssueSchema, issueSchema, issueSeveritySchema, urlIssueSchema, type FileIssue, type Issue, type IssueSeverity, type UrlIssue, } from './lib/issue.js';
18
18
  export { formatSchema, persistConfigSchema, type Format, type PersistConfig, } from './lib/persist-config.js';
19
19
  export { pluginConfigSchema, pluginContextSchema, pluginMetaSchema, pluginScoreTargetsSchema, pluginUrlsSchema, type PluginConfig, type PluginContext, type PluginMeta, type PluginScoreTargets, type PluginUrls, } from './lib/plugin-config.js';
20
20
  export { auditReportSchema, pluginReportSchema, reportSchema, type AuditReport, type PluginReport, type Report, } from './lib/report.js';
package/src/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export { tableCellValueSchema, } from './lib/implementation/schemas.js';
2
- export { sourceFileLocationSchema, } from './lib/source.js';
2
+ export { sourceFileLocationSchema, sourceUrlLocationSchema, issueSourceSchema, } from './lib/source.js';
3
3
  export { auditDetailsSchema, auditOutputSchema, auditOutputsSchema, } from './lib/audit-output.js';
4
4
  export { auditSchema } from './lib/audit.js';
5
5
  export { cacheConfigObjectSchema, cacheConfigSchema, cacheConfigShorthandSchema, } from './lib/cache-config.js';
@@ -14,7 +14,7 @@ export { MAX_DESCRIPTION_LENGTH, MAX_ISSUE_MESSAGE_LENGTH, MAX_SLUG_LENGTH, MAX_
14
14
  export { fileNameSchema, filePathSchema, globPathSchema, materialIconSchema, nonnegativeNumberSchema, positiveIntSchema, scoreSchema, slugSchema, weightSchema, } from './lib/implementation/schemas.js';
15
15
  export { exists } from './lib/implementation/utils.js';
16
16
  export { SchemaValidationError, validate, validateAsync, } from './lib/implementation/validate.js';
17
- export { issueSchema, issueSeveritySchema, } from './lib/issue.js';
17
+ export { fileIssueSchema, issueSchema, issueSeveritySchema, urlIssueSchema, } from './lib/issue.js';
18
18
  export { formatSchema, persistConfigSchema, } from './lib/persist-config.js';
19
19
  export { pluginConfigSchema, pluginContextSchema, pluginMetaSchema, pluginScoreTargetsSchema, pluginUrlsSchema, } from './lib/plugin-config.js';
20
20
  export { auditReportSchema, pluginReportSchema, reportSchema, } from './lib/report.js';
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,GAErB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,wBAAwB,GAEzB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,GAInB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAc,MAAM,gBAAgB,CAAC;AACzD,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,0BAA0B,GAI3B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,oBAAoB,EACpB,iBAAiB,GAGlB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,YAAY,EAAe,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EACL,+BAA+B,EAC/B,2BAA2B,GAE5B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAmB,MAAM,sBAAsB,CAAC;AACzE,OAAO,EACL,cAAc,EACd,WAAW,GAIZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,gBAAgB,EAChB,6BAA6B,GAC9B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,GAC5B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,eAAe,EACf,gBAAgB,GACjB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,cAAc,EACd,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,uBAAuB,EACvB,iBAAiB,EACjB,WAAW,EACX,UAAU,EACV,YAAY,GAEb,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EACL,qBAAqB,EACrB,QAAQ,EACR,aAAa,GACd,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,WAAW,EACX,mBAAmB,GAGpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,YAAY,EACZ,mBAAmB,GAGpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,gBAAgB,GAMjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,GAIb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,GAQlB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,GAKrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,0BAA0B,EAC1B,oBAAoB,EACpB,uBAAuB,EACvB,WAAW,GAOZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,4BAA4B,EAC5B,sBAAsB,EACtB,kBAAkB,EAClB,UAAU,GAOX,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,kBAAkB,EAAqB,MAAM,wBAAwB,CAAC;AAC/E,OAAO,EAAE,+BAA+B,EAAE,MAAM,kCAAkC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,GAErB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,iBAAiB,GAIlB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,GAInB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAc,MAAM,gBAAgB,CAAC;AACzD,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,0BAA0B,GAI3B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,oBAAoB,EACpB,iBAAiB,GAGlB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,YAAY,EAAe,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EACL,+BAA+B,EAC/B,2BAA2B,GAE5B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAmB,MAAM,sBAAsB,CAAC;AACzE,OAAO,EACL,cAAc,EACd,WAAW,GAIZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,gBAAgB,EAChB,6BAA6B,GAC9B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,GAC5B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,eAAe,EACf,gBAAgB,GACjB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,cAAc,EACd,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,uBAAuB,EACvB,iBAAiB,EACjB,WAAW,EACX,UAAU,EACV,YAAY,GAEb,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EACL,qBAAqB,EACrB,QAAQ,EACR,aAAa,GACd,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,eAAe,EACf,WAAW,EACX,mBAAmB,EACnB,cAAc,GAKf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,YAAY,EACZ,mBAAmB,GAGpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,gBAAgB,GAMjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,GAIb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,GAQlB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,GAKrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,0BAA0B,EAC1B,oBAAoB,EACpB,uBAAuB,EACvB,WAAW,GAOZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,4BAA4B,EAC5B,sBAAsB,EACtB,kBAAkB,EAClB,UAAU,GAOX,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,kBAAkB,EAAqB,MAAM,wBAAwB,CAAC;AAC/E,OAAO,EAAE,+BAA+B,EAAE,MAAM,kCAAkC,CAAC"}
@@ -9,7 +9,7 @@ export declare const auditDetailsSchema: z.ZodObject<{
9
9
  info: "info";
10
10
  warning: "warning";
11
11
  }>;
12
- source: z.ZodOptional<z.ZodObject<{
12
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
13
13
  file: z.ZodString;
14
14
  position: z.ZodOptional<z.ZodObject<{
15
15
  startLine: z.ZodNumber;
@@ -17,7 +17,11 @@ export declare const auditDetailsSchema: z.ZodObject<{
17
17
  endLine: z.ZodOptional<z.ZodNumber>;
18
18
  endColumn: z.ZodOptional<z.ZodNumber>;
19
19
  }, z.core.$strip>>;
20
- }, z.core.$strip>>;
20
+ }, z.core.$strip>, z.ZodObject<{
21
+ url: z.ZodURL;
22
+ snippet: z.ZodOptional<z.ZodString>;
23
+ selector: z.ZodOptional<z.ZodString>;
24
+ }, z.core.$strip>]>>;
21
25
  }, z.core.$strip>>>;
22
26
  table: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
23
27
  title: z.ZodOptional<z.ZodString>;
@@ -69,7 +73,7 @@ export declare const auditOutputSchema: z.ZodObject<{
69
73
  info: "info";
70
74
  warning: "warning";
71
75
  }>;
72
- source: z.ZodOptional<z.ZodObject<{
76
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
73
77
  file: z.ZodString;
74
78
  position: z.ZodOptional<z.ZodObject<{
75
79
  startLine: z.ZodNumber;
@@ -77,7 +81,11 @@ export declare const auditOutputSchema: z.ZodObject<{
77
81
  endLine: z.ZodOptional<z.ZodNumber>;
78
82
  endColumn: z.ZodOptional<z.ZodNumber>;
79
83
  }, z.core.$strip>>;
80
- }, z.core.$strip>>;
84
+ }, z.core.$strip>, z.ZodObject<{
85
+ url: z.ZodURL;
86
+ snippet: z.ZodOptional<z.ZodString>;
87
+ selector: z.ZodOptional<z.ZodString>;
88
+ }, z.core.$strip>]>>;
81
89
  }, z.core.$strip>>>;
82
90
  table: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
83
91
  title: z.ZodOptional<z.ZodString>;
@@ -130,7 +138,7 @@ export declare const auditOutputsSchema: z.ZodArray<z.ZodObject<{
130
138
  info: "info";
131
139
  warning: "warning";
132
140
  }>;
133
- source: z.ZodOptional<z.ZodObject<{
141
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
134
142
  file: z.ZodString;
135
143
  position: z.ZodOptional<z.ZodObject<{
136
144
  startLine: z.ZodNumber;
@@ -138,7 +146,11 @@ export declare const auditOutputsSchema: z.ZodArray<z.ZodObject<{
138
146
  endLine: z.ZodOptional<z.ZodNumber>;
139
147
  endColumn: z.ZodOptional<z.ZodNumber>;
140
148
  }, z.core.$strip>>;
141
- }, z.core.$strip>>;
149
+ }, z.core.$strip>, z.ZodObject<{
150
+ url: z.ZodURL;
151
+ snippet: z.ZodOptional<z.ZodString>;
152
+ selector: z.ZodOptional<z.ZodString>;
153
+ }, z.core.$strip>]>>;
142
154
  }, z.core.$strip>>>;
143
155
  table: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
144
156
  title: z.ZodOptional<z.ZodString>;
@@ -886,7 +886,7 @@ export declare const unrefinedCoreConfigSchema: z.ZodObject<{
886
886
  info: "info";
887
887
  warning: "warning";
888
888
  }>;
889
- source: z.ZodOptional<z.ZodObject<{
889
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
890
890
  file: z.ZodString;
891
891
  position: z.ZodOptional<z.ZodObject<{
892
892
  startLine: z.ZodNumber;
@@ -894,7 +894,11 @@ export declare const unrefinedCoreConfigSchema: z.ZodObject<{
894
894
  endLine: z.ZodOptional<z.ZodNumber>;
895
895
  endColumn: z.ZodOptional<z.ZodNumber>;
896
896
  }, z.core.$strip>>;
897
- }, z.core.$strip>>;
897
+ }, z.core.$strip>, z.ZodObject<{
898
+ url: z.ZodURL;
899
+ snippet: z.ZodOptional<z.ZodString>;
900
+ selector: z.ZodOptional<z.ZodString>;
901
+ }, z.core.$strip>]>>;
898
902
  }, z.core.$strip>>>;
899
903
  table: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
900
904
  title: z.ZodOptional<z.ZodString>;
@@ -945,7 +949,7 @@ export declare const unrefinedCoreConfigSchema: z.ZodObject<{
945
949
  info: "info";
946
950
  warning: "warning";
947
951
  }>;
948
- source: z.ZodOptional<z.ZodObject<{
952
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
949
953
  file: z.ZodString;
950
954
  position: z.ZodOptional<z.ZodObject<{
951
955
  startLine: z.ZodNumber;
@@ -953,7 +957,11 @@ export declare const unrefinedCoreConfigSchema: z.ZodObject<{
953
957
  endLine: z.ZodOptional<z.ZodNumber>;
954
958
  endColumn: z.ZodOptional<z.ZodNumber>;
955
959
  }, z.core.$strip>>;
956
- }, z.core.$strip>>;
960
+ }, z.core.$strip>, z.ZodObject<{
961
+ url: z.ZodURL;
962
+ snippet: z.ZodOptional<z.ZodString>;
963
+ selector: z.ZodOptional<z.ZodString>;
964
+ }, z.core.$strip>]>>;
957
965
  }, z.core.$strip>>>;
958
966
  table: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
959
967
  title: z.ZodOptional<z.ZodString>;
@@ -1016,7 +1024,7 @@ export declare const unrefinedCoreConfigSchema: z.ZodObject<{
1016
1024
  info: "info";
1017
1025
  warning: "warning";
1018
1026
  }>;
1019
- source: z.ZodOptional<z.ZodObject<{
1027
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1020
1028
  file: z.ZodString;
1021
1029
  position: z.ZodOptional<z.ZodObject<{
1022
1030
  startLine: z.ZodNumber;
@@ -1024,7 +1032,11 @@ export declare const unrefinedCoreConfigSchema: z.ZodObject<{
1024
1032
  endLine: z.ZodOptional<z.ZodNumber>;
1025
1033
  endColumn: z.ZodOptional<z.ZodNumber>;
1026
1034
  }, z.core.$strip>>;
1027
- }, z.core.$strip>>;
1035
+ }, z.core.$strip>, z.ZodObject<{
1036
+ url: z.ZodURL;
1037
+ snippet: z.ZodOptional<z.ZodString>;
1038
+ selector: z.ZodOptional<z.ZodString>;
1039
+ }, z.core.$strip>]>>;
1028
1040
  }, z.core.$strip>>>;
1029
1041
  table: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1030
1042
  title: z.ZodOptional<z.ZodString>;
@@ -1075,7 +1087,7 @@ export declare const unrefinedCoreConfigSchema: z.ZodObject<{
1075
1087
  info: "info";
1076
1088
  warning: "warning";
1077
1089
  }>;
1078
- source: z.ZodOptional<z.ZodObject<{
1090
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1079
1091
  file: z.ZodString;
1080
1092
  position: z.ZodOptional<z.ZodObject<{
1081
1093
  startLine: z.ZodNumber;
@@ -1083,7 +1095,11 @@ export declare const unrefinedCoreConfigSchema: z.ZodObject<{
1083
1095
  endLine: z.ZodOptional<z.ZodNumber>;
1084
1096
  endColumn: z.ZodOptional<z.ZodNumber>;
1085
1097
  }, z.core.$strip>>;
1086
- }, z.core.$strip>>;
1098
+ }, z.core.$strip>, z.ZodObject<{
1099
+ url: z.ZodURL;
1100
+ snippet: z.ZodOptional<z.ZodString>;
1101
+ selector: z.ZodOptional<z.ZodString>;
1102
+ }, z.core.$strip>]>>;
1087
1103
  }, z.core.$strip>>>;
1088
1104
  table: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1089
1105
  title: z.ZodOptional<z.ZodString>;
@@ -2063,7 +2079,7 @@ export declare const coreConfigSchema: z.ZodObject<{
2063
2079
  info: "info";
2064
2080
  warning: "warning";
2065
2081
  }>;
2066
- source: z.ZodOptional<z.ZodObject<{
2082
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2067
2083
  file: z.ZodString;
2068
2084
  position: z.ZodOptional<z.ZodObject<{
2069
2085
  startLine: z.ZodNumber;
@@ -2071,7 +2087,11 @@ export declare const coreConfigSchema: z.ZodObject<{
2071
2087
  endLine: z.ZodOptional<z.ZodNumber>;
2072
2088
  endColumn: z.ZodOptional<z.ZodNumber>;
2073
2089
  }, z.core.$strip>>;
2074
- }, z.core.$strip>>;
2090
+ }, z.core.$strip>, z.ZodObject<{
2091
+ url: z.ZodURL;
2092
+ snippet: z.ZodOptional<z.ZodString>;
2093
+ selector: z.ZodOptional<z.ZodString>;
2094
+ }, z.core.$strip>]>>;
2075
2095
  }, z.core.$strip>>>;
2076
2096
  table: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2077
2097
  title: z.ZodOptional<z.ZodString>;
@@ -2122,7 +2142,7 @@ export declare const coreConfigSchema: z.ZodObject<{
2122
2142
  info: "info";
2123
2143
  warning: "warning";
2124
2144
  }>;
2125
- source: z.ZodOptional<z.ZodObject<{
2145
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2126
2146
  file: z.ZodString;
2127
2147
  position: z.ZodOptional<z.ZodObject<{
2128
2148
  startLine: z.ZodNumber;
@@ -2130,7 +2150,11 @@ export declare const coreConfigSchema: z.ZodObject<{
2130
2150
  endLine: z.ZodOptional<z.ZodNumber>;
2131
2151
  endColumn: z.ZodOptional<z.ZodNumber>;
2132
2152
  }, z.core.$strip>>;
2133
- }, z.core.$strip>>;
2153
+ }, z.core.$strip>, z.ZodObject<{
2154
+ url: z.ZodURL;
2155
+ snippet: z.ZodOptional<z.ZodString>;
2156
+ selector: z.ZodOptional<z.ZodString>;
2157
+ }, z.core.$strip>]>>;
2134
2158
  }, z.core.$strip>>>;
2135
2159
  table: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2136
2160
  title: z.ZodOptional<z.ZodString>;
@@ -2193,7 +2217,7 @@ export declare const coreConfigSchema: z.ZodObject<{
2193
2217
  info: "info";
2194
2218
  warning: "warning";
2195
2219
  }>;
2196
- source: z.ZodOptional<z.ZodObject<{
2220
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2197
2221
  file: z.ZodString;
2198
2222
  position: z.ZodOptional<z.ZodObject<{
2199
2223
  startLine: z.ZodNumber;
@@ -2201,7 +2225,11 @@ export declare const coreConfigSchema: z.ZodObject<{
2201
2225
  endLine: z.ZodOptional<z.ZodNumber>;
2202
2226
  endColumn: z.ZodOptional<z.ZodNumber>;
2203
2227
  }, z.core.$strip>>;
2204
- }, z.core.$strip>>;
2228
+ }, z.core.$strip>, z.ZodObject<{
2229
+ url: z.ZodURL;
2230
+ snippet: z.ZodOptional<z.ZodString>;
2231
+ selector: z.ZodOptional<z.ZodString>;
2232
+ }, z.core.$strip>]>>;
2205
2233
  }, z.core.$strip>>>;
2206
2234
  table: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2207
2235
  title: z.ZodOptional<z.ZodString>;
@@ -2252,7 +2280,7 @@ export declare const coreConfigSchema: z.ZodObject<{
2252
2280
  info: "info";
2253
2281
  warning: "warning";
2254
2282
  }>;
2255
- source: z.ZodOptional<z.ZodObject<{
2283
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2256
2284
  file: z.ZodString;
2257
2285
  position: z.ZodOptional<z.ZodObject<{
2258
2286
  startLine: z.ZodNumber;
@@ -2260,7 +2288,11 @@ export declare const coreConfigSchema: z.ZodObject<{
2260
2288
  endLine: z.ZodOptional<z.ZodNumber>;
2261
2289
  endColumn: z.ZodOptional<z.ZodNumber>;
2262
2290
  }, z.core.$strip>>;
2263
- }, z.core.$strip>>;
2291
+ }, z.core.$strip>, z.ZodObject<{
2292
+ url: z.ZodURL;
2293
+ snippet: z.ZodOptional<z.ZodString>;
2294
+ selector: z.ZodOptional<z.ZodString>;
2295
+ }, z.core.$strip>]>>;
2264
2296
  }, z.core.$strip>>>;
2265
2297
  table: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2266
2298
  title: z.ZodOptional<z.ZodString>;
@@ -3245,7 +3277,7 @@ export declare function refineCoreConfig(schema: typeof unrefinedCoreConfigSchem
3245
3277
  info: "info";
3246
3278
  warning: "warning";
3247
3279
  }>;
3248
- source: z.ZodOptional<z.ZodObject<{
3280
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
3249
3281
  file: z.ZodString;
3250
3282
  position: z.ZodOptional<z.ZodObject<{
3251
3283
  startLine: z.ZodNumber;
@@ -3253,7 +3285,11 @@ export declare function refineCoreConfig(schema: typeof unrefinedCoreConfigSchem
3253
3285
  endLine: z.ZodOptional<z.ZodNumber>;
3254
3286
  endColumn: z.ZodOptional<z.ZodNumber>;
3255
3287
  }, z.core.$strip>>;
3256
- }, z.core.$strip>>;
3288
+ }, z.core.$strip>, z.ZodObject<{
3289
+ url: z.ZodURL;
3290
+ snippet: z.ZodOptional<z.ZodString>;
3291
+ selector: z.ZodOptional<z.ZodString>;
3292
+ }, z.core.$strip>]>>;
3257
3293
  }, z.core.$strip>>>;
3258
3294
  table: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
3259
3295
  title: z.ZodOptional<z.ZodString>;
@@ -3304,7 +3340,7 @@ export declare function refineCoreConfig(schema: typeof unrefinedCoreConfigSchem
3304
3340
  info: "info";
3305
3341
  warning: "warning";
3306
3342
  }>;
3307
- source: z.ZodOptional<z.ZodObject<{
3343
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
3308
3344
  file: z.ZodString;
3309
3345
  position: z.ZodOptional<z.ZodObject<{
3310
3346
  startLine: z.ZodNumber;
@@ -3312,7 +3348,11 @@ export declare function refineCoreConfig(schema: typeof unrefinedCoreConfigSchem
3312
3348
  endLine: z.ZodOptional<z.ZodNumber>;
3313
3349
  endColumn: z.ZodOptional<z.ZodNumber>;
3314
3350
  }, z.core.$strip>>;
3315
- }, z.core.$strip>>;
3351
+ }, z.core.$strip>, z.ZodObject<{
3352
+ url: z.ZodURL;
3353
+ snippet: z.ZodOptional<z.ZodString>;
3354
+ selector: z.ZodOptional<z.ZodString>;
3355
+ }, z.core.$strip>]>>;
3316
3356
  }, z.core.$strip>>>;
3317
3357
  table: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
3318
3358
  title: z.ZodOptional<z.ZodString>;
@@ -3375,7 +3415,7 @@ export declare function refineCoreConfig(schema: typeof unrefinedCoreConfigSchem
3375
3415
  info: "info";
3376
3416
  warning: "warning";
3377
3417
  }>;
3378
- source: z.ZodOptional<z.ZodObject<{
3418
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
3379
3419
  file: z.ZodString;
3380
3420
  position: z.ZodOptional<z.ZodObject<{
3381
3421
  startLine: z.ZodNumber;
@@ -3383,7 +3423,11 @@ export declare function refineCoreConfig(schema: typeof unrefinedCoreConfigSchem
3383
3423
  endLine: z.ZodOptional<z.ZodNumber>;
3384
3424
  endColumn: z.ZodOptional<z.ZodNumber>;
3385
3425
  }, z.core.$strip>>;
3386
- }, z.core.$strip>>;
3426
+ }, z.core.$strip>, z.ZodObject<{
3427
+ url: z.ZodURL;
3428
+ snippet: z.ZodOptional<z.ZodString>;
3429
+ selector: z.ZodOptional<z.ZodString>;
3430
+ }, z.core.$strip>]>>;
3387
3431
  }, z.core.$strip>>>;
3388
3432
  table: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
3389
3433
  title: z.ZodOptional<z.ZodString>;
@@ -3434,7 +3478,7 @@ export declare function refineCoreConfig(schema: typeof unrefinedCoreConfigSchem
3434
3478
  info: "info";
3435
3479
  warning: "warning";
3436
3480
  }>;
3437
- source: z.ZodOptional<z.ZodObject<{
3481
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
3438
3482
  file: z.ZodString;
3439
3483
  position: z.ZodOptional<z.ZodObject<{
3440
3484
  startLine: z.ZodNumber;
@@ -3442,7 +3486,11 @@ export declare function refineCoreConfig(schema: typeof unrefinedCoreConfigSchem
3442
3486
  endLine: z.ZodOptional<z.ZodNumber>;
3443
3487
  endColumn: z.ZodOptional<z.ZodNumber>;
3444
3488
  }, z.core.$strip>>;
3445
- }, z.core.$strip>>;
3489
+ }, z.core.$strip>, z.ZodObject<{
3490
+ url: z.ZodURL;
3491
+ snippet: z.ZodOptional<z.ZodString>;
3492
+ selector: z.ZodOptional<z.ZodString>;
3493
+ }, z.core.$strip>]>>;
3446
3494
  }, z.core.$strip>>>;
3447
3495
  table: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
3448
3496
  title: z.ZodOptional<z.ZodString>;
@@ -12,7 +12,7 @@ export declare const issueSchema: z.ZodObject<{
12
12
  info: "info";
13
13
  warning: "warning";
14
14
  }>;
15
- source: z.ZodOptional<z.ZodObject<{
15
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
16
16
  file: z.ZodString;
17
17
  position: z.ZodOptional<z.ZodObject<{
18
18
  startLine: z.ZodNumber;
@@ -20,6 +20,42 @@ export declare const issueSchema: z.ZodObject<{
20
20
  endLine: z.ZodOptional<z.ZodNumber>;
21
21
  endColumn: z.ZodOptional<z.ZodNumber>;
22
22
  }, z.core.$strip>>;
23
- }, z.core.$strip>>;
23
+ }, z.core.$strip>, z.ZodObject<{
24
+ url: z.ZodURL;
25
+ snippet: z.ZodOptional<z.ZodString>;
26
+ selector: z.ZodOptional<z.ZodString>;
27
+ }, z.core.$strip>]>>;
24
28
  }, z.core.$strip>;
25
29
  export type Issue = z.infer<typeof issueSchema>;
30
+ export declare const fileIssueSchema: z.ZodObject<{
31
+ message: z.ZodString;
32
+ severity: z.ZodEnum<{
33
+ error: "error";
34
+ info: "info";
35
+ warning: "warning";
36
+ }>;
37
+ source: z.ZodObject<{
38
+ file: z.ZodString;
39
+ position: z.ZodOptional<z.ZodObject<{
40
+ startLine: z.ZodNumber;
41
+ startColumn: z.ZodOptional<z.ZodNumber>;
42
+ endLine: z.ZodOptional<z.ZodNumber>;
43
+ endColumn: z.ZodOptional<z.ZodNumber>;
44
+ }, z.core.$strip>>;
45
+ }, z.core.$strip>;
46
+ }, z.core.$strip>;
47
+ export type FileIssue = z.infer<typeof fileIssueSchema>;
48
+ export declare const urlIssueSchema: z.ZodObject<{
49
+ message: z.ZodString;
50
+ severity: z.ZodEnum<{
51
+ error: "error";
52
+ info: "info";
53
+ warning: "warning";
54
+ }>;
55
+ source: z.ZodObject<{
56
+ url: z.ZodURL;
57
+ snippet: z.ZodOptional<z.ZodString>;
58
+ selector: z.ZodOptional<z.ZodString>;
59
+ }, z.core.$strip>;
60
+ }, z.core.$strip>;
61
+ export type UrlIssue = z.infer<typeof urlIssueSchema>;
package/src/lib/issue.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { MAX_ISSUE_MESSAGE_LENGTH } from './implementation/limits.js';
3
- import { sourceFileLocationSchema } from './source.js';
3
+ import { issueSourceSchema, sourceFileLocationSchema, sourceUrlLocationSchema, } from './source.js';
4
4
  export const issueSeveritySchema = z.enum(['info', 'warning', 'error']).meta({
5
5
  title: 'IssueSeverity',
6
6
  description: 'Severity level',
@@ -12,10 +12,22 @@ export const issueSchema = z
12
12
  .max(MAX_ISSUE_MESSAGE_LENGTH)
13
13
  .meta({ description: 'Descriptive error message' }),
14
14
  severity: issueSeveritySchema,
15
- source: sourceFileLocationSchema.optional(),
15
+ source: issueSourceSchema.optional(),
16
16
  })
17
17
  .meta({
18
18
  title: 'Issue',
19
19
  description: 'Issue information',
20
20
  });
21
+ export const fileIssueSchema = issueSchema
22
+ .extend({ source: sourceFileLocationSchema })
23
+ .meta({
24
+ title: 'FileIssue',
25
+ description: 'Issue with a file source location',
26
+ });
27
+ export const urlIssueSchema = issueSchema
28
+ .extend({ source: sourceUrlLocationSchema })
29
+ .meta({
30
+ title: 'UrlIssue',
31
+ description: 'Issue with a URL source location',
32
+ });
21
33
  //# sourceMappingURL=issue.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"issue.js","sourceRoot":"","sources":["../../../src/lib/issue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEvD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;IAC3E,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,gBAAgB;CAC9B,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC;KACzB,MAAM,CAAC;IACN,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,GAAG,CAAC,wBAAwB,CAAC;SAC7B,IAAI,CAAC,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;IACrD,QAAQ,EAAE,mBAAmB;IAC7B,MAAM,EAAE,wBAAwB,CAAC,QAAQ,EAAE;CAC5C,CAAC;KACD,IAAI,CAAC;IACJ,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,mBAAmB;CACjC,CAAC,CAAC"}
1
+ {"version":3,"file":"issue.js","sourceRoot":"","sources":["../../../src/lib/issue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,aAAa,CAAC;AAErB,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;IAC3E,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,gBAAgB;CAC9B,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC;KACzB,MAAM,CAAC;IACN,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,GAAG,CAAC,wBAAwB,CAAC;SAC7B,IAAI,CAAC,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;IACrD,QAAQ,EAAE,mBAAmB;IAC7B,MAAM,EAAE,iBAAiB,CAAC,QAAQ,EAAE;CACrC,CAAC;KACD,IAAI,CAAC;IACJ,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,mBAAmB;CACjC,CAAC,CAAC;AAGL,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW;KACvC,MAAM,CAAC,EAAE,MAAM,EAAE,wBAAwB,EAAE,CAAC;KAC5C,IAAI,CAAC;IACJ,KAAK,EAAE,WAAW;IAClB,WAAW,EAAE,mCAAmC;CACjD,CAAC,CAAC;AAGL,MAAM,CAAC,MAAM,cAAc,GAAG,WAAW;KACtC,MAAM,CAAC,EAAE,MAAM,EAAE,uBAAuB,EAAE,CAAC;KAC3C,IAAI,CAAC;IACJ,KAAK,EAAE,UAAU;IACjB,WAAW,EAAE,kCAAkC;CAChD,CAAC,CAAC"}
@@ -894,7 +894,7 @@ export declare const pluginDataSchema: z.ZodObject<{
894
894
  info: "info";
895
895
  warning: "warning";
896
896
  }>;
897
- source: z.ZodOptional<z.ZodObject<{
897
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
898
898
  file: z.ZodString;
899
899
  position: z.ZodOptional<z.ZodObject<{
900
900
  startLine: z.ZodNumber;
@@ -902,7 +902,11 @@ export declare const pluginDataSchema: z.ZodObject<{
902
902
  endLine: z.ZodOptional<z.ZodNumber>;
903
903
  endColumn: z.ZodOptional<z.ZodNumber>;
904
904
  }, z.core.$strip>>;
905
- }, z.core.$strip>>;
905
+ }, z.core.$strip>, z.ZodObject<{
906
+ url: z.ZodURL;
907
+ snippet: z.ZodOptional<z.ZodString>;
908
+ selector: z.ZodOptional<z.ZodString>;
909
+ }, z.core.$strip>]>>;
906
910
  }, z.core.$strip>>>;
907
911
  table: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
908
912
  title: z.ZodOptional<z.ZodString>;
@@ -953,7 +957,7 @@ export declare const pluginDataSchema: z.ZodObject<{
953
957
  info: "info";
954
958
  warning: "warning";
955
959
  }>;
956
- source: z.ZodOptional<z.ZodObject<{
960
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
957
961
  file: z.ZodString;
958
962
  position: z.ZodOptional<z.ZodObject<{
959
963
  startLine: z.ZodNumber;
@@ -961,7 +965,11 @@ export declare const pluginDataSchema: z.ZodObject<{
961
965
  endLine: z.ZodOptional<z.ZodNumber>;
962
966
  endColumn: z.ZodOptional<z.ZodNumber>;
963
967
  }, z.core.$strip>>;
964
- }, z.core.$strip>>;
968
+ }, z.core.$strip>, z.ZodObject<{
969
+ url: z.ZodURL;
970
+ snippet: z.ZodOptional<z.ZodString>;
971
+ selector: z.ZodOptional<z.ZodString>;
972
+ }, z.core.$strip>]>>;
965
973
  }, z.core.$strip>>>;
966
974
  table: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
967
975
  title: z.ZodOptional<z.ZodString>;
@@ -1024,7 +1032,7 @@ export declare const pluginDataSchema: z.ZodObject<{
1024
1032
  info: "info";
1025
1033
  warning: "warning";
1026
1034
  }>;
1027
- source: z.ZodOptional<z.ZodObject<{
1035
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1028
1036
  file: z.ZodString;
1029
1037
  position: z.ZodOptional<z.ZodObject<{
1030
1038
  startLine: z.ZodNumber;
@@ -1032,7 +1040,11 @@ export declare const pluginDataSchema: z.ZodObject<{
1032
1040
  endLine: z.ZodOptional<z.ZodNumber>;
1033
1041
  endColumn: z.ZodOptional<z.ZodNumber>;
1034
1042
  }, z.core.$strip>>;
1035
- }, z.core.$strip>>;
1043
+ }, z.core.$strip>, z.ZodObject<{
1044
+ url: z.ZodURL;
1045
+ snippet: z.ZodOptional<z.ZodString>;
1046
+ selector: z.ZodOptional<z.ZodString>;
1047
+ }, z.core.$strip>]>>;
1036
1048
  }, z.core.$strip>>>;
1037
1049
  table: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1038
1050
  title: z.ZodOptional<z.ZodString>;
@@ -1083,7 +1095,7 @@ export declare const pluginDataSchema: z.ZodObject<{
1083
1095
  info: "info";
1084
1096
  warning: "warning";
1085
1097
  }>;
1086
- source: z.ZodOptional<z.ZodObject<{
1098
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1087
1099
  file: z.ZodString;
1088
1100
  position: z.ZodOptional<z.ZodObject<{
1089
1101
  startLine: z.ZodNumber;
@@ -1091,7 +1103,11 @@ export declare const pluginDataSchema: z.ZodObject<{
1091
1103
  endLine: z.ZodOptional<z.ZodNumber>;
1092
1104
  endColumn: z.ZodOptional<z.ZodNumber>;
1093
1105
  }, z.core.$strip>>;
1094
- }, z.core.$strip>>;
1106
+ }, z.core.$strip>, z.ZodObject<{
1107
+ url: z.ZodURL;
1108
+ snippet: z.ZodOptional<z.ZodString>;
1109
+ selector: z.ZodOptional<z.ZodString>;
1110
+ }, z.core.$strip>]>>;
1095
1111
  }, z.core.$strip>>>;
1096
1112
  table: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1097
1113
  title: z.ZodOptional<z.ZodString>;
@@ -2036,7 +2052,7 @@ export declare const pluginConfigSchema: z.ZodObject<{
2036
2052
  info: "info";
2037
2053
  warning: "warning";
2038
2054
  }>;
2039
- source: z.ZodOptional<z.ZodObject<{
2055
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2040
2056
  file: z.ZodString;
2041
2057
  position: z.ZodOptional<z.ZodObject<{
2042
2058
  startLine: z.ZodNumber;
@@ -2044,7 +2060,11 @@ export declare const pluginConfigSchema: z.ZodObject<{
2044
2060
  endLine: z.ZodOptional<z.ZodNumber>;
2045
2061
  endColumn: z.ZodOptional<z.ZodNumber>;
2046
2062
  }, z.core.$strip>>;
2047
- }, z.core.$strip>>;
2063
+ }, z.core.$strip>, z.ZodObject<{
2064
+ url: z.ZodURL;
2065
+ snippet: z.ZodOptional<z.ZodString>;
2066
+ selector: z.ZodOptional<z.ZodString>;
2067
+ }, z.core.$strip>]>>;
2048
2068
  }, z.core.$strip>>>;
2049
2069
  table: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2050
2070
  title: z.ZodOptional<z.ZodString>;
@@ -2095,7 +2115,7 @@ export declare const pluginConfigSchema: z.ZodObject<{
2095
2115
  info: "info";
2096
2116
  warning: "warning";
2097
2117
  }>;
2098
- source: z.ZodOptional<z.ZodObject<{
2118
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2099
2119
  file: z.ZodString;
2100
2120
  position: z.ZodOptional<z.ZodObject<{
2101
2121
  startLine: z.ZodNumber;
@@ -2103,7 +2123,11 @@ export declare const pluginConfigSchema: z.ZodObject<{
2103
2123
  endLine: z.ZodOptional<z.ZodNumber>;
2104
2124
  endColumn: z.ZodOptional<z.ZodNumber>;
2105
2125
  }, z.core.$strip>>;
2106
- }, z.core.$strip>>;
2126
+ }, z.core.$strip>, z.ZodObject<{
2127
+ url: z.ZodURL;
2128
+ snippet: z.ZodOptional<z.ZodString>;
2129
+ selector: z.ZodOptional<z.ZodString>;
2130
+ }, z.core.$strip>]>>;
2107
2131
  }, z.core.$strip>>>;
2108
2132
  table: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2109
2133
  title: z.ZodOptional<z.ZodString>;
@@ -2166,7 +2190,7 @@ export declare const pluginConfigSchema: z.ZodObject<{
2166
2190
  info: "info";
2167
2191
  warning: "warning";
2168
2192
  }>;
2169
- source: z.ZodOptional<z.ZodObject<{
2193
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2170
2194
  file: z.ZodString;
2171
2195
  position: z.ZodOptional<z.ZodObject<{
2172
2196
  startLine: z.ZodNumber;
@@ -2174,7 +2198,11 @@ export declare const pluginConfigSchema: z.ZodObject<{
2174
2198
  endLine: z.ZodOptional<z.ZodNumber>;
2175
2199
  endColumn: z.ZodOptional<z.ZodNumber>;
2176
2200
  }, z.core.$strip>>;
2177
- }, z.core.$strip>>;
2201
+ }, z.core.$strip>, z.ZodObject<{
2202
+ url: z.ZodURL;
2203
+ snippet: z.ZodOptional<z.ZodString>;
2204
+ selector: z.ZodOptional<z.ZodString>;
2205
+ }, z.core.$strip>]>>;
2178
2206
  }, z.core.$strip>>>;
2179
2207
  table: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2180
2208
  title: z.ZodOptional<z.ZodString>;
@@ -2225,7 +2253,7 @@ export declare const pluginConfigSchema: z.ZodObject<{
2225
2253
  info: "info";
2226
2254
  warning: "warning";
2227
2255
  }>;
2228
- source: z.ZodOptional<z.ZodObject<{
2256
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2229
2257
  file: z.ZodString;
2230
2258
  position: z.ZodOptional<z.ZodObject<{
2231
2259
  startLine: z.ZodNumber;
@@ -2233,7 +2261,11 @@ export declare const pluginConfigSchema: z.ZodObject<{
2233
2261
  endLine: z.ZodOptional<z.ZodNumber>;
2234
2262
  endColumn: z.ZodOptional<z.ZodNumber>;
2235
2263
  }, z.core.$strip>>;
2236
- }, z.core.$strip>>;
2264
+ }, z.core.$strip>, z.ZodObject<{
2265
+ url: z.ZodURL;
2266
+ snippet: z.ZodOptional<z.ZodString>;
2267
+ selector: z.ZodOptional<z.ZodString>;
2268
+ }, z.core.$strip>]>>;
2237
2269
  }, z.core.$strip>>>;
2238
2270
  table: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2239
2271
  title: z.ZodOptional<z.ZodString>;
@@ -17,7 +17,7 @@ export declare const auditReportSchema: z.ZodObject<{
17
17
  info: "info";
18
18
  warning: "warning";
19
19
  }>;
20
- source: z.ZodOptional<z.ZodObject<{
20
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
21
21
  file: z.ZodString;
22
22
  position: z.ZodOptional<z.ZodObject<{
23
23
  startLine: z.ZodNumber;
@@ -25,7 +25,11 @@ export declare const auditReportSchema: z.ZodObject<{
25
25
  endLine: z.ZodOptional<z.ZodNumber>;
26
26
  endColumn: z.ZodOptional<z.ZodNumber>;
27
27
  }, z.core.$strip>>;
28
- }, z.core.$strip>>;
28
+ }, z.core.$strip>, z.ZodObject<{
29
+ url: z.ZodURL;
30
+ snippet: z.ZodOptional<z.ZodString>;
31
+ selector: z.ZodOptional<z.ZodString>;
32
+ }, z.core.$strip>]>>;
29
33
  }, z.core.$strip>>>;
30
34
  table: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
31
35
  title: z.ZodOptional<z.ZodString>;
@@ -952,7 +956,7 @@ export declare const pluginReportSchema: z.ZodObject<{
952
956
  info: "info";
953
957
  warning: "warning";
954
958
  }>;
955
- source: z.ZodOptional<z.ZodObject<{
959
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
956
960
  file: z.ZodString;
957
961
  position: z.ZodOptional<z.ZodObject<{
958
962
  startLine: z.ZodNumber;
@@ -960,7 +964,11 @@ export declare const pluginReportSchema: z.ZodObject<{
960
964
  endLine: z.ZodOptional<z.ZodNumber>;
961
965
  endColumn: z.ZodOptional<z.ZodNumber>;
962
966
  }, z.core.$strip>>;
963
- }, z.core.$strip>>;
967
+ }, z.core.$strip>, z.ZodObject<{
968
+ url: z.ZodURL;
969
+ snippet: z.ZodOptional<z.ZodString>;
970
+ selector: z.ZodOptional<z.ZodString>;
971
+ }, z.core.$strip>]>>;
964
972
  }, z.core.$strip>>>;
965
973
  table: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
966
974
  title: z.ZodOptional<z.ZodString>;
@@ -1904,7 +1912,7 @@ export declare const reportSchema: z.ZodObject<{
1904
1912
  info: "info";
1905
1913
  warning: "warning";
1906
1914
  }>;
1907
- source: z.ZodOptional<z.ZodObject<{
1915
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1908
1916
  file: z.ZodString;
1909
1917
  position: z.ZodOptional<z.ZodObject<{
1910
1918
  startLine: z.ZodNumber;
@@ -1912,7 +1920,11 @@ export declare const reportSchema: z.ZodObject<{
1912
1920
  endLine: z.ZodOptional<z.ZodNumber>;
1913
1921
  endColumn: z.ZodOptional<z.ZodNumber>;
1914
1922
  }, z.core.$strip>>;
1915
- }, z.core.$strip>>;
1923
+ }, z.core.$strip>, z.ZodObject<{
1924
+ url: z.ZodURL;
1925
+ snippet: z.ZodOptional<z.ZodString>;
1926
+ selector: z.ZodOptional<z.ZodString>;
1927
+ }, z.core.$strip>]>>;
1916
1928
  }, z.core.$strip>>>;
1917
1929
  table: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
1918
1930
  title: z.ZodOptional<z.ZodString>;
@@ -13,7 +13,7 @@ export declare const outputTransformSchema: z.ZodPipe<z.ZodCustom<unknown, unkno
13
13
  info: "info";
14
14
  warning: "warning";
15
15
  }>;
16
- source: z.ZodOptional<z.ZodObject<{
16
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
17
17
  file: z.ZodString;
18
18
  position: z.ZodOptional<z.ZodObject<{
19
19
  startLine: z.ZodNumber;
@@ -21,7 +21,11 @@ export declare const outputTransformSchema: z.ZodPipe<z.ZodCustom<unknown, unkno
21
21
  endLine: z.ZodOptional<z.ZodNumber>;
22
22
  endColumn: z.ZodOptional<z.ZodNumber>;
23
23
  }, z.core.$strip>>;
24
- }, z.core.$strip>>;
24
+ }, z.core.$strip>, z.ZodObject<{
25
+ url: z.ZodURL;
26
+ snippet: z.ZodOptional<z.ZodString>;
27
+ selector: z.ZodOptional<z.ZodString>;
28
+ }, z.core.$strip>]>>;
25
29
  }, z.core.$strip>>>;
26
30
  table: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
27
31
  title: z.ZodOptional<z.ZodString>;
@@ -72,7 +76,7 @@ export declare const outputTransformSchema: z.ZodPipe<z.ZodCustom<unknown, unkno
72
76
  info: "info";
73
77
  warning: "warning";
74
78
  }>;
75
- source: z.ZodOptional<z.ZodObject<{
79
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
76
80
  file: z.ZodString;
77
81
  position: z.ZodOptional<z.ZodObject<{
78
82
  startLine: z.ZodNumber;
@@ -80,7 +84,11 @@ export declare const outputTransformSchema: z.ZodPipe<z.ZodCustom<unknown, unkno
80
84
  endLine: z.ZodOptional<z.ZodNumber>;
81
85
  endColumn: z.ZodOptional<z.ZodNumber>;
82
86
  }, z.core.$strip>>;
83
- }, z.core.$strip>>;
87
+ }, z.core.$strip>, z.ZodObject<{
88
+ url: z.ZodURL;
89
+ snippet: z.ZodOptional<z.ZodString>;
90
+ selector: z.ZodOptional<z.ZodString>;
91
+ }, z.core.$strip>]>>;
84
92
  }, z.core.$strip>>>;
85
93
  table: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
86
94
  title: z.ZodOptional<z.ZodString>;
@@ -149,7 +157,7 @@ export declare const runnerConfigSchema: z.ZodObject<{
149
157
  info: "info";
150
158
  warning: "warning";
151
159
  }>;
152
- source: z.ZodOptional<z.ZodObject<{
160
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
153
161
  file: z.ZodString;
154
162
  position: z.ZodOptional<z.ZodObject<{
155
163
  startLine: z.ZodNumber;
@@ -157,7 +165,11 @@ export declare const runnerConfigSchema: z.ZodObject<{
157
165
  endLine: z.ZodOptional<z.ZodNumber>;
158
166
  endColumn: z.ZodOptional<z.ZodNumber>;
159
167
  }, z.core.$strip>>;
160
- }, z.core.$strip>>;
168
+ }, z.core.$strip>, z.ZodObject<{
169
+ url: z.ZodURL;
170
+ snippet: z.ZodOptional<z.ZodString>;
171
+ selector: z.ZodOptional<z.ZodString>;
172
+ }, z.core.$strip>]>>;
161
173
  }, z.core.$strip>>>;
162
174
  table: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
163
175
  title: z.ZodOptional<z.ZodString>;
@@ -208,7 +220,7 @@ export declare const runnerConfigSchema: z.ZodObject<{
208
220
  info: "info";
209
221
  warning: "warning";
210
222
  }>;
211
- source: z.ZodOptional<z.ZodObject<{
223
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
212
224
  file: z.ZodString;
213
225
  position: z.ZodOptional<z.ZodObject<{
214
226
  startLine: z.ZodNumber;
@@ -216,7 +228,11 @@ export declare const runnerConfigSchema: z.ZodObject<{
216
228
  endLine: z.ZodOptional<z.ZodNumber>;
217
229
  endColumn: z.ZodOptional<z.ZodNumber>;
218
230
  }, z.core.$strip>>;
219
- }, z.core.$strip>>;
231
+ }, z.core.$strip>, z.ZodObject<{
232
+ url: z.ZodURL;
233
+ snippet: z.ZodOptional<z.ZodString>;
234
+ selector: z.ZodOptional<z.ZodString>;
235
+ }, z.core.$strip>]>>;
220
236
  }, z.core.$strip>>>;
221
237
  table: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
222
238
  title: z.ZodOptional<z.ZodString>;
@@ -281,7 +297,7 @@ export declare const runnerFunctionSchema: z.ZodPipe<z.ZodCustom<unknown, unknow
281
297
  info: "info";
282
298
  warning: "warning";
283
299
  }>;
284
- source: z.ZodOptional<z.ZodObject<{
300
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
285
301
  file: z.ZodString;
286
302
  position: z.ZodOptional<z.ZodObject<{
287
303
  startLine: z.ZodNumber;
@@ -289,7 +305,11 @@ export declare const runnerFunctionSchema: z.ZodPipe<z.ZodCustom<unknown, unknow
289
305
  endLine: z.ZodOptional<z.ZodNumber>;
290
306
  endColumn: z.ZodOptional<z.ZodNumber>;
291
307
  }, z.core.$strip>>;
292
- }, z.core.$strip>>;
308
+ }, z.core.$strip>, z.ZodObject<{
309
+ url: z.ZodURL;
310
+ snippet: z.ZodOptional<z.ZodString>;
311
+ selector: z.ZodOptional<z.ZodString>;
312
+ }, z.core.$strip>]>>;
293
313
  }, z.core.$strip>>>;
294
314
  table: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
295
315
  title: z.ZodOptional<z.ZodString>;
@@ -340,7 +360,7 @@ export declare const runnerFunctionSchema: z.ZodPipe<z.ZodCustom<unknown, unknow
340
360
  info: "info";
341
361
  warning: "warning";
342
362
  }>;
343
- source: z.ZodOptional<z.ZodObject<{
363
+ source: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
344
364
  file: z.ZodString;
345
365
  position: z.ZodOptional<z.ZodObject<{
346
366
  startLine: z.ZodNumber;
@@ -348,7 +368,11 @@ export declare const runnerFunctionSchema: z.ZodPipe<z.ZodCustom<unknown, unknow
348
368
  endLine: z.ZodOptional<z.ZodNumber>;
349
369
  endColumn: z.ZodOptional<z.ZodNumber>;
350
370
  }, z.core.$strip>>;
351
- }, z.core.$strip>>;
371
+ }, z.core.$strip>, z.ZodObject<{
372
+ url: z.ZodURL;
373
+ snippet: z.ZodOptional<z.ZodString>;
374
+ selector: z.ZodOptional<z.ZodString>;
375
+ }, z.core.$strip>]>>;
352
376
  }, z.core.$strip>>>;
353
377
  table: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
354
378
  title: z.ZodOptional<z.ZodString>;
@@ -9,3 +9,23 @@ export declare const sourceFileLocationSchema: z.ZodObject<{
9
9
  }, z.core.$strip>>;
10
10
  }, z.core.$strip>;
11
11
  export type SourceFileLocation = z.infer<typeof sourceFileLocationSchema>;
12
+ export declare const sourceUrlLocationSchema: z.ZodObject<{
13
+ url: z.ZodURL;
14
+ snippet: z.ZodOptional<z.ZodString>;
15
+ selector: z.ZodOptional<z.ZodString>;
16
+ }, z.core.$strip>;
17
+ export type SourceUrlLocation = z.infer<typeof sourceUrlLocationSchema>;
18
+ export declare const issueSourceSchema: z.ZodUnion<readonly [z.ZodObject<{
19
+ file: z.ZodString;
20
+ position: z.ZodOptional<z.ZodObject<{
21
+ startLine: z.ZodNumber;
22
+ startColumn: z.ZodOptional<z.ZodNumber>;
23
+ endLine: z.ZodOptional<z.ZodNumber>;
24
+ endColumn: z.ZodOptional<z.ZodNumber>;
25
+ }, z.core.$strip>>;
26
+ }, z.core.$strip>, z.ZodObject<{
27
+ url: z.ZodURL;
28
+ snippet: z.ZodOptional<z.ZodString>;
29
+ selector: z.ZodOptional<z.ZodString>;
30
+ }, z.core.$strip>]>;
31
+ export type IssueSource = z.infer<typeof issueSourceSchema>;
package/src/lib/source.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { filePathSchema, filePositionSchema, } from './implementation/schemas.js';
2
+ import { filePathSchema, filePositionSchema, urlSchema, } from './implementation/schemas.js';
3
3
  export const sourceFileLocationSchema = z
4
4
  .object({
5
5
  file: filePathSchema.meta({
@@ -11,4 +11,26 @@ export const sourceFileLocationSchema = z
11
11
  title: 'SourceFileLocation',
12
12
  description: 'Source file location',
13
13
  });
14
+ export const sourceUrlLocationSchema = z
15
+ .object({
16
+ url: urlSchema.meta({
17
+ description: 'URL of the web page where the issue was found',
18
+ }),
19
+ snippet: z.string().optional().meta({
20
+ description: 'HTML snippet of the element',
21
+ }),
22
+ selector: z.string().optional().meta({
23
+ description: 'CSS selector to locate the element',
24
+ }),
25
+ })
26
+ .meta({
27
+ title: 'SourceUrlLocation',
28
+ description: 'Location of a DOM element in a web page',
29
+ });
30
+ export const issueSourceSchema = z
31
+ .union([sourceFileLocationSchema, sourceUrlLocationSchema])
32
+ .meta({
33
+ title: 'IssueSource',
34
+ description: 'Source location of an issue (file path or URL)',
35
+ });
14
36
  //# sourceMappingURL=source.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"source.js","sourceRoot":"","sources":["../../../src/lib/source.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,cAAc,EACd,kBAAkB,GACnB,MAAM,6BAA6B,CAAC;AAErC,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC;KACtC,MAAM,CAAC;IACN,IAAI,EAAE,cAAc,CAAC,IAAI,CAAC;QACxB,WAAW,EAAE,0CAA0C;KACxD,CAAC;IACF,QAAQ,EAAE,kBAAkB,CAAC,QAAQ,EAAE;CACxC,CAAC;KACD,IAAI,CAAC;IACJ,KAAK,EAAE,oBAAoB;IAC3B,WAAW,EAAE,sBAAsB;CACpC,CAAC,CAAC"}
1
+ {"version":3,"file":"source.js","sourceRoot":"","sources":["../../../src/lib/source.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,SAAS,GACV,MAAM,6BAA6B,CAAC;AAErC,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC;KACtC,MAAM,CAAC;IACN,IAAI,EAAE,cAAc,CAAC,IAAI,CAAC;QACxB,WAAW,EAAE,0CAA0C;KACxD,CAAC;IACF,QAAQ,EAAE,kBAAkB,CAAC,QAAQ,EAAE;CACxC,CAAC;KACD,IAAI,CAAC;IACJ,KAAK,EAAE,oBAAoB;IAC3B,WAAW,EAAE,sBAAsB;CACpC,CAAC,CAAC;AAIL,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC;KACrC,MAAM,CAAC;IACN,GAAG,EAAE,SAAS,CAAC,IAAI,CAAC;QAClB,WAAW,EAAE,+CAA+C;KAC7D,CAAC;IACF,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC;QAClC,WAAW,EAAE,6BAA6B;KAC3C,CAAC;IACF,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC;QACnC,WAAW,EAAE,oCAAoC;KAClD,CAAC;CACH,CAAC;KACD,IAAI,CAAC;IACJ,KAAK,EAAE,mBAAmB;IAC1B,WAAW,EAAE,yCAAyC;CACvD,CAAC,CAAC;AAIL,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC;KAC/B,KAAK,CAAC,CAAC,wBAAwB,EAAE,uBAAuB,CAAC,CAAC;KAC1D,IAAI,CAAC;IACJ,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,gDAAgD;CAC9D,CAAC,CAAC"}