@sentry/junior-plugin-api 0.263.0 → 0.264.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/dist/index.d.ts +4 -4
- package/dist/index.js +11 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1089,16 +1089,16 @@ export type EventMatchFields = z.output<typeof eventMatchFieldsSchema>;
|
|
|
1089
1089
|
export declare function stableEventMatchKey(match: EventMatch | undefined): string;
|
|
1090
1090
|
/** Return whether trusted event data matches one exact match object. */
|
|
1091
1091
|
export declare function eventMatches(match: EventMatch | undefined, data: EventData | undefined): boolean;
|
|
1092
|
-
/** The identifier shape of one resource type. */
|
|
1092
|
+
/** The identifier shape of one resource type. Plain JSON, so API responses can carry it. */
|
|
1093
1093
|
export declare const eventIdentifierSchema: z.ZodObject<{
|
|
1094
1094
|
format: z.ZodString;
|
|
1095
|
-
pattern: z.
|
|
1095
|
+
pattern: z.ZodString;
|
|
1096
1096
|
}, z.core.$strict>;
|
|
1097
1097
|
export declare const pluginEventTypeSchema: z.ZodObject<{
|
|
1098
1098
|
type: z.ZodString;
|
|
1099
1099
|
identifier: z.ZodOptional<z.ZodObject<{
|
|
1100
1100
|
format: z.ZodString;
|
|
1101
|
-
pattern: z.
|
|
1101
|
+
pattern: z.ZodString;
|
|
1102
1102
|
}, z.core.$strict>>;
|
|
1103
1103
|
supportedEvents: z.ZodArray<z.ZodString>;
|
|
1104
1104
|
suggestedEvents: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -1118,7 +1118,7 @@ export declare const pluginEventsSchema: z.ZodObject<{
|
|
|
1118
1118
|
type: z.ZodString;
|
|
1119
1119
|
identifier: z.ZodOptional<z.ZodObject<{
|
|
1120
1120
|
format: z.ZodString;
|
|
1121
|
-
pattern: z.
|
|
1121
|
+
pattern: z.ZodString;
|
|
1122
1122
|
}, z.core.$strict>>;
|
|
1123
1123
|
supportedEvents: z.ZodArray<z.ZodString>;
|
|
1124
1124
|
suggestedEvents: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
package/dist/index.js
CHANGED
|
@@ -738,12 +738,20 @@ function eventMatches(match, data) {
|
|
|
738
738
|
}
|
|
739
739
|
return true;
|
|
740
740
|
}
|
|
741
|
-
|
|
741
|
+
function isRegExpSource(value) {
|
|
742
|
+
try {
|
|
743
|
+
new RegExp(value);
|
|
744
|
+
return true;
|
|
745
|
+
} catch {
|
|
746
|
+
return false;
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
/** The identifier shape of one resource type. Plain JSON, so API responses can carry it. */
|
|
742
750
|
const eventIdentifierSchema = z.object({
|
|
743
751
|
/** Shown to the agent, such as "owner/repo#number". */
|
|
744
752
|
format: z.string().trim().min(1).max(200),
|
|
745
|
-
/**
|
|
746
|
-
pattern: z.
|
|
753
|
+
/** RegExp source that matches a normalized identifier of this resource type. */
|
|
754
|
+
pattern: z.string().min(1).refine(isRegExpSource, { message: "Identifier pattern must be a valid regular expression." })
|
|
747
755
|
}).strict();
|
|
748
756
|
const pluginEventTypeSchema = z.object({
|
|
749
757
|
type: resourceTypeSchema,
|