@rebasepro/server 0.14.1 → 0.14.2-canary.gca521e9
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/api/logs-routes.d.ts +47 -8
- package/dist/{auth-BobZVd0j.js → auth-Cov94CTt.js} +2 -2
- package/dist/{auth-BobZVd0j.js.map → auth-Cov94CTt.js.map} +1 -1
- package/dist/{cron-store-CB1x-Ken.js → cron-store-DvabPKwA.js} +2 -2
- package/dist/{cron-store-CB1x-Ken.js.map → cron-store-DvabPKwA.js.map} +1 -1
- package/dist/index.es.js +70 -11
- package/dist/index.es.js.map +1 -1
- package/dist/{jobs-DR4SjGrD.js → jobs-DtxzEBEK.js} +2 -2
- package/dist/{jobs-DR4SjGrD.js.map → jobs-DtxzEBEK.js.map} +1 -1
- package/dist/logs-routes-CWBLQj2l.js +245 -0
- package/dist/logs-routes-CWBLQj2l.js.map +1 -0
- package/dist/{openapi-generator-DQeQ_q2f.js → openapi-generator-CkXIlxMM.js} +2 -2
- package/dist/{openapi-generator-DQeQ_q2f.js.map → openapi-generator-CkXIlxMM.js.map} +1 -1
- package/dist/{src-8XDWyDfR.js → src-Cx24hMDv.js} +44 -12
- package/dist/src-Cx24hMDv.js.map +1 -0
- package/package.json +5 -5
- package/dist/logs-routes-BYA72C_C.js +0 -100
- package/dist/logs-routes-BYA72C_C.js.map +0 -1
- package/dist/src-8XDWyDfR.js.map +0 -1
|
@@ -9,19 +9,34 @@ export interface LogEntry {
|
|
|
9
9
|
message: string;
|
|
10
10
|
metadata?: Record<string, unknown>;
|
|
11
11
|
}
|
|
12
|
+
/** What a caller can narrow the log by, in either direction (query or stream). */
|
|
13
|
+
export interface LogFilterOptions {
|
|
14
|
+
level?: string;
|
|
15
|
+
source?: string;
|
|
16
|
+
search?: string;
|
|
17
|
+
since?: string;
|
|
18
|
+
}
|
|
19
|
+
/** Notified for every entry pushed, in push order. */
|
|
20
|
+
export type LogListener = (entry: LogEntry) => void;
|
|
12
21
|
declare class LogRingBuffer {
|
|
13
22
|
private buffer;
|
|
14
23
|
private maxSize;
|
|
15
24
|
private idCounter;
|
|
25
|
+
private listeners;
|
|
16
26
|
constructor(maxSize?: number);
|
|
17
27
|
push(entry: Omit<LogEntry, "id">): void;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Follow the buffer. Returns the unsubscribe — call it, always: a listener
|
|
30
|
+
* left behind holds its whole closure, and on this class that closure is a
|
|
31
|
+
* pending-entry array.
|
|
32
|
+
*
|
|
33
|
+
* A listener must not log. It is called from inside `push`, so anything that
|
|
34
|
+
* reaches `addLog` from here recurses until the stack gives out.
|
|
35
|
+
*/
|
|
36
|
+
subscribe(listener: LogListener): () => void;
|
|
37
|
+
query(options: LogFilterOptions & {
|
|
22
38
|
limit?: number;
|
|
23
39
|
offset?: number;
|
|
24
|
-
since?: string;
|
|
25
40
|
}): {
|
|
26
41
|
entries: LogEntry[];
|
|
27
42
|
total: number;
|
|
@@ -31,7 +46,31 @@ declare class LogRingBuffer {
|
|
|
31
46
|
export declare const logBuffer: LogRingBuffer;
|
|
32
47
|
/** Add a log entry */
|
|
33
48
|
export declare function addLog(level: LogEntry["level"], source: LogEntry["source"], message: string, metadata?: Record<string, unknown>): void;
|
|
49
|
+
export interface LogMiddlewareOptions {
|
|
50
|
+
/**
|
|
51
|
+
* Paths this sink ignores, matched exactly against `c.req.path`.
|
|
52
|
+
*
|
|
53
|
+
* For requests whose only reason to exist is to read the log. Recording
|
|
54
|
+
* those makes the reader the loudest thing in its own output, and on a quiet
|
|
55
|
+
* server it is also the thing evicting real entries out of the ring.
|
|
56
|
+
*/
|
|
57
|
+
ignorePaths?: string[];
|
|
58
|
+
}
|
|
34
59
|
/** Hono middleware to log API requests */
|
|
35
|
-
export declare function logMiddleware(): MiddlewareHandler<HonoEnv>;
|
|
36
|
-
|
|
37
|
-
|
|
60
|
+
export declare function logMiddleware(options?: LogMiddlewareOptions): MiddlewareHandler<HonoEnv>;
|
|
61
|
+
/**
|
|
62
|
+
* The stream's timings, injectable only so they can be tested.
|
|
63
|
+
*
|
|
64
|
+
* The defaults above are the contract and nothing in production passes this. A
|
|
65
|
+
* heartbeat is a 25-second wait to observe, and a suite that cannot observe it is
|
|
66
|
+
* a suite where the keepalive can rot — which surfaces as "the tail dies after a
|
|
67
|
+
* few minutes behind the load balancer", months later, on someone else's cluster.
|
|
68
|
+
*/
|
|
69
|
+
export interface LogStreamTiming {
|
|
70
|
+
flushMs?: number;
|
|
71
|
+
heartbeatMs?: number;
|
|
72
|
+
maxPending?: number;
|
|
73
|
+
}
|
|
74
|
+
export declare function createLogsRoutes(timing?: LogStreamTiming): Hono<HonoEnv>;
|
|
75
|
+
declare const _default: Hono<HonoEnv, import("hono/types").BlankSchema, "/">;
|
|
76
|
+
export default _default;
|
|
@@ -2,7 +2,7 @@ import { createRequire as __createRequire } from "module";
|
|
|
2
2
|
import process from "process";
|
|
3
3
|
__createRequire(import.meta.url);
|
|
4
4
|
import { i as __toESM, n as __exportAll } from "./rolldown-runtime-DSJWtz9O.js";
|
|
5
|
-
import { C as ListLimitError, D as isAnonymousUid, E as ANONYMOUS_USER_ID, T as resolveClientListLimit, a as deserializeLogicalCondition, i as deserializeFilter, r as UnknownFilterOperatorError } from "./src-
|
|
5
|
+
import { C as ListLimitError, D as isAnonymousUid, E as ANONYMOUS_USER_ID, T as resolveClientListLimit, a as deserializeLogicalCondition, i as deserializeFilter, r as UnknownFilterOperatorError } from "./src-Cx24hMDv.js";
|
|
6
6
|
import "./src-Cz9nMgUR.js";
|
|
7
7
|
import { n as createDdlBootstrapper, o as revokeInternalTableSql, s as isSQLAdmin } from "./ddl-bootstrap-Cywoj8Ta.js";
|
|
8
8
|
import { S as canonicalStorageId, T as require_jsonwebtoken, _ as verifyMfaPendingToken, a as generateMfaPendingToken, c as getJwks, d as hasAsymmetricSigningKey, f as hashRefreshToken, g as verifyDownloadToken, h as verifyAccessToken, i as generateDownloadToken, l as getRefreshTokenExpiry, n as configureJwt, o as generateRefreshToken, p as isJwtConfigured, r as generateAccessToken, s as getAccessTokenExpiry, t as MAX_COOKIE_AGE_MS, u as getRefreshTokenTtlMs, w as tryCanonicalStorageKey } from "./jwt-VJyXTdQQ.js";
|
|
@@ -10503,4 +10503,4 @@ var auth_exports = /* @__PURE__ */ __exportAll({
|
|
|
10503
10503
|
//#endregion
|
|
10504
10504
|
export { extractUserFromToken as $, createDataRateLimiter as A, generateSecurePassword as B, createBuiltinAuthAdapter as C, isPublicStoragePath as Ct, string as D, object as E, resolveEmailLinkBase as F, getWelcomeEmailTemplate as G, getMagicLinkTemplate as H, resolveAuthHooks as I, html as J, RawHtml as K, hashPassword as L, SMTPEmailService as M, createEmailService as N, _coercedNumber as O, assertEmailLinkBases as P, createRequireAuth as Q, validatePasswordStrength as R, createJwksRoutes as S, PUBLIC_STORAGE_PREFIX as St, _enum as T, getPasswordResetTemplate as U, getEmailVerificationTemplate as V, getUserInvitationTemplate as W, createAdapterAuthMiddleware as X, raw as Y, createAuthMiddleware as Z, createLinkedinProvider as _, orderByEntriesToTuples as _t, createSpotifyProvider as a, requireAuth as at, pkceTokenParams as b, parseQueryOptions as bt, createGitLabProvider as c, createStorageApiKeyGuard as ct, createFacebookProvider as d, extractBearerToken as dt, fileTokenAuth as et, createAppleProvider as f, safeCompare as ft, createGitHubProvider as g, isOperationAllowed as gt, verifyOidcIdToken as h, httpMethodToOperation as ht, createApiKeyStore as i, requireAdmin as it, MemoryRateLimitStore as j, DEFAULT_FUNCTIONS_ANONYMOUS_LIMIT as k, createDiscordProvider as l, isApiKeyToken as lt, tryVerifyOidcIdToken as m, scopeDataDriver as mt, createCustomAuthAdapter as n, publicObjectAuth as nt, createSlackProvider as o, createApiKeyPreAuth as ot, createMicrosoftProvider as p, SERVICE_IDENTITY as pt, escapeHtml as q, createApiKeyRoutes as r, queryTokenAuth as rt, createBitbucketProvider as s, createFunctionApiKeyGuard as st, auth_exports as t, optionalAuth as tt, createTwitterProvider as u, validateApiKey as ut, createGoogleProvider as v, parseAggregateSelect as vt, ZodNumber as w, providerVerifiedEmail as x, resolveListLimitParam as xt, oauthCodeFlowSchema as y, parseGroupBy as yt, verifyPassword as z };
|
|
10505
10505
|
|
|
10506
|
-
//# sourceMappingURL=auth-
|
|
10506
|
+
//# sourceMappingURL=auth-Cov94CTt.js.map
|