mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 13:28:27 +00:00
chore: remove recursive
This commit is contained in:
@@ -13,11 +13,9 @@ const AUTH_REFRESH_INTERVAL = 60 * 1000;
|
|||||||
const HEART_BEAT_INTERVAL = 15 * 1000;
|
const HEART_BEAT_INTERVAL = 15 * 1000;
|
||||||
|
|
||||||
export const sseServiceFactory = (bus: TEventBusService, redis: Redis) => {
|
export const sseServiceFactory = (bus: TEventBusService, redis: Redis) => {
|
||||||
let heartbeatInterval: NodeJS.Timeout | null = null;
|
|
||||||
|
|
||||||
const clients = new Set<EventStreamClient>();
|
const clients = new Set<EventStreamClient>();
|
||||||
|
|
||||||
heartbeatInterval = setInterval(() => {
|
const heartbeatInterval = setInterval(() => {
|
||||||
for (const client of clients) {
|
for (const client of clients) {
|
||||||
if (client.stream.closed) continue;
|
if (client.stream.closed) continue;
|
||||||
void client.ping();
|
void client.ping();
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ export function createEventStreamClient(redis: Redis, options: IEventStreamClien
|
|||||||
...(hasConditions
|
...(hasConditions
|
||||||
? {
|
? {
|
||||||
environment: r.conditions?.environmentSlug ?? "",
|
environment: r.conditions?.environmentSlug ?? "",
|
||||||
secretPath: r.conditions?.recursive ? { $glob: `${secretPath}/**` } : secretPath
|
secretPath: { $glob: secretPath }
|
||||||
}
|
}
|
||||||
: {})
|
: {})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,8 +117,7 @@ export const EventRegisterSchema = z.object({
|
|||||||
conditions: z
|
conditions: z
|
||||||
.object({
|
.object({
|
||||||
secretPath: z.string().optional().default("/"),
|
secretPath: z.string().optional().default("/"),
|
||||||
environmentSlug: z.string(),
|
environmentSlug: z.string()
|
||||||
recursive: z.boolean().optional().default(false)
|
|
||||||
})
|
})
|
||||||
.optional()
|
.optional()
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ export const registerEventRouter = async (server: FastifyZodProvider) => {
|
|||||||
description: "Subscribe to project events",
|
description: "Subscribe to project events",
|
||||||
body: z.object({
|
body: z.object({
|
||||||
projectId: z.string().trim().describe(EventSubscriptions.SUBSCRIBE_PROJECT_EVENTS.projectId),
|
projectId: z.string().trim().describe(EventSubscriptions.SUBSCRIBE_PROJECT_EVENTS.projectId),
|
||||||
register: z.array(EventRegisterSchema).max(10)
|
register: z.array(EventRegisterSchema).min(1).max(10)
|
||||||
}),
|
}),
|
||||||
produces: ["text/event-stream"]
|
produces: ["text/event-stream"]
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user