@rebasepro/server 0.33.1 → 0.34.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/{GCSStorageController-kCv5MH2B.js → GCSStorageController-DKv7oDo7.js} +3 -3
- package/dist/{GCSStorageController-kCv5MH2B.js.map → GCSStorageController-DKv7oDo7.js.map} +1 -1
- package/dist/{S3StorageController-DqK533Sl.js → S3StorageController-CIQ2_mC5.js} +3 -3
- package/dist/{S3StorageController-DqK533Sl.js.map → S3StorageController-CIQ2_mC5.js.map} +1 -1
- package/dist/{access-CRQBlEZY.js → access-BdsIXo_L.js} +4 -4
- package/dist/{access-CRQBlEZY.js.map → access-BdsIXo_L.js.map} +1 -1
- package/dist/api/rest/api-generator.d.ts +11 -1
- package/dist/auth/api-keys/api-key-routes.d.ts +10 -1
- package/dist/auth/auth-hooks.d.ts +1 -1
- package/dist/auth/builtin-auth-adapter.d.ts +2 -0
- package/dist/auth/capabilities.d.ts +12 -0
- package/dist/auth/platform-signin-routes.d.ts +85 -0
- package/dist/auth/platform-token.d.ts +33 -0
- package/dist/auth/routes.d.ts +8 -0
- package/dist/auth/scope-routes.d.ts +7 -0
- package/dist/auth/seed-admin.d.ts +2 -0
- package/dist/{auth-BmwAqVP4.js → auth-CHOmnYwu.js} +370 -22
- package/dist/auth-CHOmnYwu.js.map +1 -0
- package/dist/{backup-CVNce2jz.js → backup-M37yPYpz.js} +6 -6
- package/dist/{backup-CVNce2jz.js.map → backup-M37yPYpz.js.map} +1 -1
- package/dist/boot/bundle.d.ts +12 -0
- package/dist/boot/env.d.ts +1 -0
- package/dist/{branch-routes-aLDaGOD1.js → branch-routes-Cl-Oa3CL.js} +2 -2
- package/dist/{branch-routes-aLDaGOD1.js.map → branch-routes-Cl-Oa3CL.js.map} +1 -1
- package/dist/{contract-routes-a4ZbN1h3.js → contract-routes-Dkxl-2B_.js} +3 -3
- package/dist/{contract-routes-a4ZbN1h3.js.map → contract-routes-Dkxl-2B_.js.map} +1 -1
- package/dist/{cron-loader-CWhyA5eR.js → cron-loader-BWahenzQ.js} +2 -2
- package/dist/{cron-loader-CWhyA5eR.js.map → cron-loader-BWahenzQ.js.map} +1 -1
- package/dist/{cron-routes-CMGAz1my.js → cron-routes-Cq6O3oPR.js} +4 -4
- package/dist/{cron-routes-CMGAz1my.js.map → cron-routes-Cq6O3oPR.js.map} +1 -1
- package/dist/{cron-scheduler-DQBdkkfb.js → cron-scheduler-B25NuV7o.js} +2 -2
- package/dist/{cron-scheduler-DQBdkkfb.js.map → cron-scheduler-B25NuV7o.js.map} +1 -1
- package/dist/{cron-store-CjUydRyp.js → cron-store-B1IStnKM.js} +2 -2
- package/dist/{cron-store-CjUydRyp.js.map → cron-store-B1IStnKM.js.map} +1 -1
- package/dist/dist-D_R0Khut.js +19354 -0
- package/dist/dist-D_R0Khut.js.map +1 -0
- package/dist/email/link-base.d.ts +21 -0
- package/dist/email/types.d.ts +4 -0
- package/dist/{filter-dialect-nsQ2ozPY.js → filter-dialect-DgWkoXt7.js} +2 -2
- package/dist/{filter-dialect-nsQ2ozPY.js.map → filter-dialect-DgWkoXt7.js.map} +1 -1
- package/dist/{function-loader-Cihj_r86.js → function-loader-C23HVFx8.js} +2 -2
- package/dist/{function-loader-Cihj_r86.js.map → function-loader-C23HVFx8.js.map} +1 -1
- package/dist/{function-routes-CWaldgEj.js → function-routes-DBKL2azw.js} +2 -2
- package/dist/{function-routes-CWaldgEj.js.map → function-routes-DBKL2azw.js.map} +1 -1
- package/dist/{history-recorder-B8TJMEfO.js → history-recorder-C5gixsU3.js} +16 -3
- package/dist/history-recorder-C5gixsU3.js.map +1 -0
- package/dist/history-store-c_cm9R3w.js +459 -0
- package/dist/history-store-c_cm9R3w.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +281 -240
- package/dist/index.es.js.map +1 -1
- package/dist/{jobs-IJX3fE3X.js → jobs-uqvEGTfs.js} +2 -2
- package/dist/{jobs-IJX3fE3X.js.map → jobs-uqvEGTfs.js.map} +1 -1
- package/dist/{jwt-BuEprb39.js → jwt-B_5zx-7y.js} +3 -3
- package/dist/{jwt-BuEprb39.js.map → jwt-B_5zx-7y.js.map} +1 -1
- package/dist/{keys-C8gpPIOG.js → keys-C0g4vwP5.js} +2 -2
- package/dist/{keys-C8gpPIOG.js.map → keys-C0g4vwP5.js.map} +1 -1
- package/dist/{load-schema-BvRxAuaD.js → load-schema-aNynBztw.js} +2 -2
- package/dist/{load-schema-BvRxAuaD.js.map → load-schema-aNynBztw.js.map} +1 -1
- package/dist/{logs-routes-BAq2ZxuY.js → logs-routes-D2NGM5Pa.js} +2 -2
- package/dist/{logs-routes-BAq2ZxuY.js.map → logs-routes-D2NGM5Pa.js.map} +1 -1
- package/dist/metrics/history-recorder.d.ts +10 -1
- package/dist/metrics/history-store.d.ts +122 -7
- package/dist/metrics/index.d.ts +24 -2
- package/dist/{offline-ET6xI1ZO-CIdB1ilf.js → offline-ET6xI1ZO-Du75S8J1.js} +4 -4
- package/dist/{offline-ET6xI1ZO-CIdB1ilf.js.map → offline-ET6xI1ZO-Du75S8J1.js.map} +1 -1
- package/dist/{offline-store-DtmBwmKE-CzyvC_Zj.js → offline-store-DtmBwmKE-CEakGPWn.js} +3 -3
- package/dist/{offline-store-DtmBwmKE-CzyvC_Zj.js.map → offline-store-DtmBwmKE-CEakGPWn.js.map} +1 -1
- package/dist/{openapi-generator-CCLtAJ2s.js → openapi-generator-B7EbCjhN.js} +2 -2
- package/dist/{openapi-generator-CCLtAJ2s.js.map → openapi-generator-B7EbCjhN.js.map} +1 -1
- package/dist/{project-root-CuCOXvbk.js → project-root-BTQAiPki.js} +2 -2
- package/dist/{project-root-CuCOXvbk.js.map → project-root-BTQAiPki.js.map} +1 -1
- package/dist/{proxy-DUUXXoQo.js → proxy-0fGXJapt.js} +2 -2
- package/dist/{proxy-DUUXXoQo.js.map → proxy-0fGXJapt.js.map} +1 -1
- package/dist/{query-parser-C9l1eFov.js → query-parser-DwERE0rm.js} +3 -3
- package/dist/{query-parser-C9l1eFov.js.map → query-parser-DwERE0rm.js.map} +1 -1
- package/dist/{request-timeout-DOu8ItLQ.js → request-timeout-DdbFS6ef.js} +3 -3
- package/dist/{request-timeout-DOu8ItLQ.js.map → request-timeout-DdbFS6ef.js.map} +1 -1
- package/dist/{rls-simulator-routes-DIAjffhq.js → rls-simulator-routes-Cjv8yY1V.js} +3 -3
- package/dist/{rls-simulator-routes-DIAjffhq.js.map → rls-simulator-routes-Cjv8yY1V.js.map} +1 -1
- package/dist/{schema-editor-routes-qWGWBPi0.js → schema-editor-routes-CwdoGYKu.js} +4 -4
- package/dist/{schema-editor-routes-qWGWBPi0.js.map → schema-editor-routes-CwdoGYKu.js.map} +1 -1
- package/dist/{schema-tables-BneB2KZ7.js → schema-tables-DUThMxen.js} +3 -3
- package/dist/{schema-tables-BneB2KZ7.js.map → schema-tables-DUThMxen.js.map} +1 -1
- package/dist/{schema-tables-routes-BBZJK8_S.js → schema-tables-routes-Ch52xLqF.js} +4 -4
- package/dist/{schema-tables-routes-BBZJK8_S.js.map → schema-tables-routes-Ch52xLqF.js.map} +1 -1
- package/dist/{securityRuleToConditions-Cj5ZR7TS.js → securityRuleToConditions-DXPY_Z-x.js} +2 -2
- package/dist/{securityRuleToConditions-Cj5ZR7TS.js.map → securityRuleToConditions-DXPY_Z-x.js.map} +1 -1
- package/dist/{selection-BB8ejqa2.js → selection-BiTJ-Tiy.js} +2 -2
- package/dist/{selection-BB8ejqa2.js.map → selection-BiTJ-Tiy.js.map} +1 -1
- package/dist/{sql-export-routes-CPXI3qZ7.js → sql-export-routes-BYt7G2v-.js} +2 -2
- package/dist/{sql-export-routes-CPXI3qZ7.js.map → sql-export-routes-BYt7G2v-.js.map} +1 -1
- package/dist/{src-BdPKCs9u.js → src--EBfCtYm.js} +2 -2
- package/dist/src--EBfCtYm.js.map +1 -0
- package/dist/storage/routes.d.ts +6 -0
- package/dist/{table-source-editor-D3m_VMwN.js → table-source-editor-P5zp7lOn.js} +3 -3
- package/dist/{table-source-editor-D3m_VMwN.js.map → table-source-editor-P5zp7lOn.js.map} +1 -1
- package/package.json +5 -5
- package/dist/auth-BmwAqVP4.js.map +0 -1
- package/dist/dist-C1vNURUy.js +0 -19354
- package/dist/dist-C1vNURUy.js.map +0 -1
- package/dist/history-recorder-B8TJMEfO.js.map +0 -1
- package/dist/history-store-DzrJeEKv.js +0 -233
- package/dist/history-store-DzrJeEKv.js.map +0 -1
- package/dist/src-BdPKCs9u.js.map +0 -1
package/dist/index.es.js
CHANGED
|
@@ -2,45 +2,45 @@ import { createRequire as __rebaseCreateRequire } from "module";
|
|
|
2
2
|
import __rebaseProcess from "process";
|
|
3
3
|
globalThis.process ??= __rebaseProcess;
|
|
4
4
|
__rebaseCreateRequire(import.meta.url);
|
|
5
|
-
import { $ as compareStaticRoutes, $t as
|
|
5
|
+
import { $ as compareStaticRoutes, $t as DEFAULT_DATA_SOURCE_KEY, Bn as __require, Bt as declaredSubscriptions, C as isTextColumnType, Cn as JUNCTION_PIVOT_KEY, Et as summarizeScopes, F as isPublicStorageKey, Fn as RebaseClientError, Ft as simulationHeaders, G as isUiTablePreferences, Gt as DEFAULT_STORAGE_SOURCE_KEY, H as FIELD_OPERATORS, Ht as resourceToStorageSource, I as isPublicStoragePath, In as isUnsupported, It as parseEnvBoolean, J as MCP_APP_MODULES, Jt as buildResourceGraph, K as mergeUiTablePreferences, Kt as storageEnvSuffix, L as storageObjectPath, Ln as unsupportedMethod, M as toDriverAggregateGroup, Mn as sortKeyToString, N as storageTargetsInText, Ot as AUTH_FLOW_HEADER, P as PUBLIC_STORAGE_PREFIX, Pn as RebaseApiError, Q as SCHEMA_VERSION_HEADER, Qt as resourceKinds, Rn as __commonJSMin, Rt as declaredQueueConsumers, S as isTemporalColumnType, Sn as INCLUDE_COUNT_KEY, Ut as setQueueRuntime, V as BATCH_REF_KEY, Vt as resourceToDataSource, W as isFieldOperation, Wt as setTopicRuntime, X as isContentHashedFileName, Xt as resourceKeyOf, Y as computeSchemaVersion, Yt as resourceEnvSuffix, Z as LEGACY_LAYOUT_REMEDY, Zt as resourceKind, _ as sql, a as defineAuthTable, at as validateStaticRoute, bt as scopeGrants, c as isAuthTableDef, en as getDataSourceCapabilities, et as isValidAppHost, f as rel, fn as RLS_JWT_SQL, ft as hasAdminRole, g as pgEnum, h as isColumnBuilder, i as parseTablePatches, in as isSchemaEditingAdmin, it as reservedPrefixFor, j as toDriverAggregate, l as isTableDef, m as col, mn as RLS_UID_SQL, n as TablePatchError, nt as parseAppAddress, o as defineTable, pn as RLS_ROLES_SQL, pt as intersectScopes, q as uiTablePreferencesProblems, qt as DEFAULT_RESOURCE_KEY, rn as isSQLAdmin, rt as parseFrameAncestor, s as defineView, tt as matchStaticRoute, u as isViewDef, vn as isAnonymousUid, vt as parseScope, wn as ALL_WHERE_FILTER_OPS, wt as scopesForRoles, x as isNumericColumnType, xn as policy, xt as scopeGrantsAny, y as json, z as MAX_LIST_LIMIT } from "./src--EBfCtYm.js";
|
|
6
6
|
import { a as logger, c as setLogLevel, d as hostEnv, i as logLevelEnabled, l as setLogOutput, o as rawQueryLoggingEnabled, r as describeCauseChain, s as redactSensitiveText, t as _setLogLineHook } from "./logger-SigQ2oZJ.js";
|
|
7
|
-
import { $ as
|
|
7
|
+
import { $ as adapterRefusal, A as verifyPlatformToken, B as MemoryRateLimitStore, C as createJwksRoutes, Ct as walkJsonShape, D as createPlatformTokenPreAuth, E as PLATFORM_MCP_SCOPES, F as createDataRateLimitCheck, G as extractLinks, H as clearActiveDevEmailSink, I as createDataRateLimiter, J as createEmailService, K as registerDevEmailSink, L as createRateLimiter, M as AUTH_CONFIG_LIMIT, N as DEFAULT_FUNCTIONS_ANONYMOUS_LIMIT, O as isPlatformToken, P as createAuthLimiters, Q as verifyPassword, R as requestClientAddress, S as createApiKeyStore, St as formatJsonPath, T as configureUserPicking, U as createDevEmailSink, V as activeDevEmailSink, W as devEmailSinkFor, X as hashPassword, Y as resolveAuthHooks, Z as validatePasswordStrength, _ as oauthCodeFlowSchema, _t as escapeHtml, a as createBitbucketProvider, at as magicLinkUrlProblem, b as createApiKeyRoutes, bt as createSqlRateLimitStore, c as createTwitterProvider, ct as getEmailChangeTemplate, d as createMicrosoftProvider, dt as getMagicLinkTemplate, et as createAdapterAuthMiddleware, f as tryVerifyOidcIdToken, ft as getPasswordResetTemplate, g as createGoogleProvider, gt as RawHtml, h as createLinkedinProvider, ht as resolveEmailBranding, i as createSlackProvider, it as assertEmailLinkBases, j as isBootstrapWindowOpen, k as platformTokensFromEnv, l as createFacebookProvider, lt as getEmailOtpTemplate, m as createGitHubProvider, mt as getWelcomeEmailTemplate, n as createCustomAuthAdapter, nt as completeUserCreation, o as createGitLabProvider, ot as resolveEmailLinkBase, p as verifyOidcIdToken, pt as getUserInvitationTemplate, q as SMTPEmailService, r as createSpotifyProvider, rt as generateSecurePassword, s as createDiscordProvider, st as getEmailChangeNoticeTemplate, tt as createAdapterCallerResolution, u as createAppleProvider, ut as getEmailVerificationTemplate, v as pkceTokenParams, vt as html, w as createBuiltinAuthAdapter, x as createPersonalKeyRoutes, xt as resolveRateLimitStoreKind, y as providerVerifiedEmail, yt as raw, z as setSharedRateLimitStore } from "./auth-CHOmnYwu.js";
|
|
8
8
|
import { r as toSnakeCase } from "./strings.es-k0kjzQBh.js";
|
|
9
|
-
import { a as serializeTables, c as policyTableFromDescriptor, i as schemaViewKey, o as servedTableSlugs, r as schemaViewFor, s as tableEffectiveRules } from "./schema-tables-
|
|
10
|
-
import { a as textMaxLength, i as firstDuplicate, n as buildTableSchema, o as validationPattern, s as isSoftDeleteRestore, t as buildTableInputSchema } from "./openapi-generator-
|
|
11
|
-
import { c as createTransport, f as withETag, l as defaultCodeForStatus, p as unref, r as SDKQueryBuilder, s as createTableClient, u as invalidBulkBody } from "./offline-store-DtmBwmKE-
|
|
9
|
+
import { a as serializeTables, c as policyTableFromDescriptor, i as schemaViewKey, o as servedTableSlugs, r as schemaViewFor, s as tableEffectiveRules } from "./schema-tables-DUThMxen.js";
|
|
10
|
+
import { a as textMaxLength, i as firstDuplicate, n as buildTableSchema, o as validationPattern, s as isSoftDeleteRestore, t as buildTableInputSchema } from "./openapi-generator-B7EbCjhN.js";
|
|
11
|
+
import { c as createTransport, f as withETag, l as defaultCodeForStatus, p as unref, r as SDKQueryBuilder, s as createTableClient, u as invalidBulkBody } from "./offline-store-DtmBwmKE-CEakGPWn.js";
|
|
12
12
|
import "./resumable-upload-threshold-CKv-Ry0l.js";
|
|
13
13
|
import { a as revokeInternalTableSql, n as REBASE_INTERNAL_TABLES, t as LOAD_REQUEST_ROLES_PLPGSQL } from "./internal-tables-XxM_NdR_.js";
|
|
14
14
|
import { a as warnDeprecated, n as FilesFailedToLoadError } from "./dynamic-import-Bi3XK5y-.js";
|
|
15
15
|
import { i as canReadColumn, n as apiHiddenKeys, o as canWriteColumn, s as canWriteRelation, u as restrictedKeys } from "./access-D1CTJSLK.js";
|
|
16
|
-
import { a as loadBackendSchema, d as isSchemaDefinitionError, i as isSchemaLoadError, n as compileLoadedSchema, r as compileSchemaDefs, t as SchemaLoadError } from "./load-schema-
|
|
17
|
-
import { a as parseWriteFilter, c as assertQueryFieldsReadable, d as relationOf, f as relationsOfKind, h as reconcileCursorOrder, i as parseQueryOptions, l as assertReadableFields, m as decodeCursor$1, n as parseAggregateSelect, o as resolveListLimitParam, p as cursorToStartAfter, r as parseGroupBy, s as assertNoHiddenAggregateNames, t as orderByEntriesToTuples, u as requestViewer } from "./query-parser-
|
|
18
|
-
import { _ as normalizeOrderBy, c as collectAllPages, g as OrderBySpecError, l as paginateFind, m as normalizeInclude, p as mergeIncludeSpecs, r as deserializeFilter, t as RESERVED_QUERY_KEYS, u as resolveFindWindow, v as serializeOrderBy } from "./filter-dialect-
|
|
19
|
-
import { C as randomHex, E as sha256Hex, S as constantTimeEqual, T as sha256Bytes, b as normalizePemFromEnv, d as hasAsymmetricSigningKey, g as setDefaultJwtService, h as processJwtService, l as getJwks, m as jwtOf, n as configureJwt, r as createJwtService
|
|
16
|
+
import { a as loadBackendSchema, d as isSchemaDefinitionError, i as isSchemaLoadError, n as compileLoadedSchema, r as compileSchemaDefs, t as SchemaLoadError } from "./load-schema-aNynBztw.js";
|
|
17
|
+
import { a as parseWriteFilter, c as assertQueryFieldsReadable, d as relationOf, f as relationsOfKind, h as reconcileCursorOrder, i as parseQueryOptions, l as assertReadableFields, m as decodeCursor$1, n as parseAggregateSelect, o as resolveListLimitParam, p as cursorToStartAfter, r as parseGroupBy, s as assertNoHiddenAggregateNames, t as orderByEntriesToTuples, u as requestViewer } from "./query-parser-DwERE0rm.js";
|
|
18
|
+
import { _ as normalizeOrderBy, c as collectAllPages, g as OrderBySpecError, l as paginateFind, m as normalizeInclude, p as mergeIncludeSpecs, r as deserializeFilter, t as RESERVED_QUERY_KEYS, u as resolveFindWindow, v as serializeOrderBy } from "./filter-dialect-DgWkoXt7.js";
|
|
19
|
+
import { C as randomHex, E as sha256Hex, S as constantTimeEqual, T as sha256Bytes, b as normalizePemFromEnv, d as hasAsymmetricSigningKey, g as setDefaultJwtService, h as processJwtService, l as getJwks, m as jwtOf, n as configureJwt, r as createJwtService } from "./jwt-B_5zx-7y.js";
|
|
20
20
|
import { a as isConcurrentDdlRace, c as provisioningExec, l as withoutLeadingComments, o as isDuplicateObjectRace, r as createDdlBootstrapper, s as isSchemaChange, t as CONCURRENT_DDL_SQLSTATES } from "./ddl-bootstrap-DhCuwhHM.js";
|
|
21
|
-
import { t as createCronStore } from "./cron-store-
|
|
21
|
+
import { t as createCronStore } from "./cron-store-B1IStnKM.js";
|
|
22
22
|
import { a as isDataException, c as dbConnectionErrorCounts, i as errorHandler, n as DATABASE_UNAVAILABLE_MESSAGE, o as isDatabaseUnreachable, r as declaredErrorAnswer, s as schemaDriftRemedy, t as ApiError } from "./errors-NVbAQU25.js";
|
|
23
23
|
import { n as HARD_DELETE_QUERY_PARAM, r as parseHardDelete } from "./soft-delete-params-Dhn0qKFv.js";
|
|
24
|
-
import { $ as supportsRlsScoping, A as isDownloadTokenGrant, C as publicObjectAuth, D as requireAuth, E as requireAdmin, G as createTusScopeGuard, H as reportSimulatedContext, I as decideImpersonation, J as validateApiKey, K as isApiKeyToken, L as refuseUnhonouredImpersonation, M as requestedStorageObject, N as storageObjectOfPath, O as userFromToken, P as storageRequestWildcard, Q as scopeDataDriver, S as optionalAuth, T as refuse$1, U as createApiKeyPreAuth, W as createFunctionScopeGuard, X as safeCompare, Y as extractBearerToken, Z as SERVICE_IDENTITY, _ as setDefaultAccessControl, at as refuseSimulatedWrite, b as extractUserFromToken, c as configureAccess, d as keyOwnerResolverFor, f as processAccessControl, g as scopeMissing, h as requireScopeByMethod, j as isPublicObjectGrant, k as PUBLIC_OBJECT_PRINCIPAL, l as getAccessModel, m as requireScope, n as accessModelFromAuthTable, ot as httpMethodToOperation, q as resolveApiKey, r as accessOf, s as callerScopes, tt as isAccessTokenRevoked, u as hasScope, v as createAuthMiddleware, w as queryTokenAuth, x as fileTokenAuth, y as createRequireAuth } from "./access-
|
|
25
|
-
import { a as canonicalStorageId, i as canonicalStorageBucket, n as InvalidStorageBucketError, o as canonicalStorageKey, r as InvalidStorageKeyError, t as InvalidListOptionsError } from "./keys-
|
|
26
|
-
import { t as logMiddleware } from "./logs-routes-
|
|
24
|
+
import { $ as supportsRlsScoping, A as isDownloadTokenGrant, C as publicObjectAuth, D as requireAuth, E as requireAdmin, G as createTusScopeGuard, H as reportSimulatedContext, I as decideImpersonation, J as validateApiKey, K as isApiKeyToken, L as refuseUnhonouredImpersonation, M as requestedStorageObject, N as storageObjectOfPath, O as userFromToken, P as storageRequestWildcard, Q as scopeDataDriver, S as optionalAuth, T as refuse$1, U as createApiKeyPreAuth, W as createFunctionScopeGuard, X as safeCompare, Y as extractBearerToken, Z as SERVICE_IDENTITY, _ as setDefaultAccessControl, at as refuseSimulatedWrite, b as extractUserFromToken, c as configureAccess, d as keyOwnerResolverFor, f as processAccessControl, g as scopeMissing, h as requireScopeByMethod, j as isPublicObjectGrant, k as PUBLIC_OBJECT_PRINCIPAL, l as getAccessModel, m as requireScope, n as accessModelFromAuthTable, ot as httpMethodToOperation, q as resolveApiKey, r as accessOf, s as callerScopes, tt as isAccessTokenRevoked, u as hasScope, v as createAuthMiddleware, w as queryTokenAuth, x as fileTokenAuth, y as createRequireAuth } from "./access-BdsIXo_L.js";
|
|
25
|
+
import { a as canonicalStorageId, i as canonicalStorageBucket, n as InvalidStorageBucketError, o as canonicalStorageKey, r as InvalidStorageKeyError, t as InvalidListOptionsError } from "./keys-C0g4vwP5.js";
|
|
26
|
+
import { t as logMiddleware } from "./logs-routes-D2NGM5Pa.js";
|
|
27
27
|
import { a as fileWebStream, d as IMAGE_MIME_TYPES, i as bytesView, l as DEFAULT_MAX_FILE_SIZE, n as ObjectTooLargeError, o as meteredChunks, s as readStreamFully, t as validateUploadedFile, u as DOCUMENT_MIME_TYPES } from "./upload-validation-BnIwo78L.js";
|
|
28
|
-
import { t as S3StorageController } from "./S3StorageController-
|
|
29
|
-
import { t as GCSStorageController } from "./GCSStorageController-
|
|
30
|
-
import { t as schemaCallerOf } from "./schema-tables-routes-
|
|
31
|
-
import { i as usesVersionedMigrations, n as commitPathsFor, r as findProjectRoot } from "./project-root-
|
|
32
|
-
import { a as isHonoLike, i as loadFunctionsWithDiagnostics, n as loadFunctions, r as loadFunctionsFromDirectory } from "./function-loader-
|
|
33
|
-
import { a as getDriver, c as getSql, d as getUserProfile, f as hasRole, g as requireDriver, h as isAuthenticated, i as getApiKey, l as getUser, m as isAdmin, o as getRequestId, p as identityResolved, r as requireRole, s as getRoles, t as createFunctionRoutes, u as getUserId } from "./function-routes-
|
|
34
|
-
import "./proxy-
|
|
35
|
-
import "./request-timeout-
|
|
36
|
-
import { t as FunctionSelectionError } from "./selection-
|
|
37
|
-
import { a as loadCrons, i as loadCronJobsWithDiagnostics, n as declareCrons, r as loadCronJobsFromDirectory } from "./cron-loader-
|
|
38
|
-
import { i as validateCronExpression, t as CronScheduler } from "./cron-scheduler-
|
|
39
|
-
import { t as createCronRoutes } from "./cron-routes-
|
|
40
|
-
import { a as listBackupObjects, c as readBackupBytes, i as backupStorageFromEnv, n as createBackupLinkRoutes, o as parseBackupDestination, r as createBackupRoutes, s as parseBackupTimestamp } from "./backup-
|
|
41
|
-
import { a as defaultBackoff, i as createJobQueue, n as createJobStore, o as currentAmbientTransaction, r as PermanentJobError } from "./jobs-
|
|
42
|
-
import {
|
|
43
|
-
import { n as createContractRoutes } from "./contract-routes-
|
|
28
|
+
import { t as S3StorageController } from "./S3StorageController-CIQ2_mC5.js";
|
|
29
|
+
import { t as GCSStorageController } from "./GCSStorageController-DKv7oDo7.js";
|
|
30
|
+
import { t as schemaCallerOf } from "./schema-tables-routes-Ch52xLqF.js";
|
|
31
|
+
import { i as usesVersionedMigrations, n as commitPathsFor, r as findProjectRoot } from "./project-root-BTQAiPki.js";
|
|
32
|
+
import { a as isHonoLike, i as loadFunctionsWithDiagnostics, n as loadFunctions, r as loadFunctionsFromDirectory } from "./function-loader-C23HVFx8.js";
|
|
33
|
+
import { a as getDriver, c as getSql, d as getUserProfile, f as hasRole, g as requireDriver, h as isAuthenticated, i as getApiKey, l as getUser, m as isAdmin, o as getRequestId, p as identityResolved, r as requireRole, s as getRoles, t as createFunctionRoutes, u as getUserId } from "./function-routes-DBKL2azw.js";
|
|
34
|
+
import "./proxy-0fGXJapt.js";
|
|
35
|
+
import "./request-timeout-DdbFS6ef.js";
|
|
36
|
+
import { t as FunctionSelectionError } from "./selection-BiTJ-Tiy.js";
|
|
37
|
+
import { a as loadCrons, i as loadCronJobsWithDiagnostics, n as declareCrons, r as loadCronJobsFromDirectory } from "./cron-loader-BWahenzQ.js";
|
|
38
|
+
import { i as validateCronExpression, t as CronScheduler } from "./cron-scheduler-B25NuV7o.js";
|
|
39
|
+
import { t as createCronRoutes } from "./cron-routes-Cq6O3oPR.js";
|
|
40
|
+
import { a as listBackupObjects, c as readBackupBytes, i as backupStorageFromEnv, n as createBackupLinkRoutes, o as parseBackupDestination, r as createBackupRoutes, s as parseBackupTimestamp } from "./backup-M37yPYpz.js";
|
|
41
|
+
import { a as defaultBackoff, i as createJobQueue, n as createJobStore, o as currentAmbientTransaction, r as PermanentJobError } from "./jobs-uqvEGTfs.js";
|
|
42
|
+
import { i as RECORDED_SURFACES, n as MAX_HISTORY_MINUTES, r as METRIC_SERIES, t as HISTORY_BUCKETS } from "./history-store-c_cm9R3w.js";
|
|
43
|
+
import { n as createContractRoutes } from "./contract-routes-Dkxl-2B_.js";
|
|
44
44
|
import { createCipheriv, createECDH, createHash, createHmac, createPrivateKey, createSign, randomBytes, sign } from "node:crypto";
|
|
45
45
|
import * as path$2 from "node:path";
|
|
46
46
|
import path from "node:path";
|
|
@@ -4792,6 +4792,28 @@ function createAuth(transport, options) {
|
|
|
4792
4792
|
};
|
|
4793
4793
|
}
|
|
4794
4794
|
/**
|
|
4795
|
+
* Sign in with a token the platform hosting the backend minted for a
|
|
4796
|
+
* project's owner (`POST /auth/platform-signin`). The admin panel reads it
|
|
4797
|
+
* from its address, where the platform's console put it; see
|
|
4798
|
+
* `@rebasepro/app`'s `platform-signin.ts`.
|
|
4799
|
+
*/
|
|
4800
|
+
async function signInWithPlatformToken(token) {
|
|
4801
|
+
const res = await getFetch()(authUrl("/platform-signin"), {
|
|
4802
|
+
method: "POST",
|
|
4803
|
+
headers: { "Content-Type": "application/json" },
|
|
4804
|
+
body: JSON.stringify({ token }),
|
|
4805
|
+
credentials: authFlowMode === "cookie" ? "include" : void 0
|
|
4806
|
+
});
|
|
4807
|
+
const body = await res.json().catch(() => ({}));
|
|
4808
|
+
if (!res.ok) throwApiError(res.status, body, res.statusText);
|
|
4809
|
+
const session = handleAuthResponse(body, "SIGNED_IN");
|
|
4810
|
+
return {
|
|
4811
|
+
user: session.user,
|
|
4812
|
+
accessToken: session.accessToken,
|
|
4813
|
+
refreshToken: session.refreshToken
|
|
4814
|
+
};
|
|
4815
|
+
}
|
|
4816
|
+
/**
|
|
4795
4817
|
* Ask for a six-digit sign-in code by email.
|
|
4796
4818
|
*
|
|
4797
4819
|
* Answers the same thing whether or not the address has an account — do not
|
|
@@ -5247,6 +5269,7 @@ function createAuth(transport, options) {
|
|
|
5247
5269
|
confirmEmailChange,
|
|
5248
5270
|
sendMagicLink,
|
|
5249
5271
|
verifyMagicLink,
|
|
5272
|
+
signInWithPlatformToken,
|
|
5250
5273
|
sendEmailOtp,
|
|
5251
5274
|
verifyEmailOtp,
|
|
5252
5275
|
startDeviceLogin,
|
|
@@ -8734,7 +8757,7 @@ var LazyOfflineManager = class {
|
|
|
8734
8757
|
keepsLastUser;
|
|
8735
8758
|
constructor(config, createInner) {
|
|
8736
8759
|
this.keepsLastUser = config.keepLastUser === true;
|
|
8737
|
-
import("./offline-ET6xI1ZO-
|
|
8760
|
+
import("./offline-ET6xI1ZO-Du75S8J1.js").then(({ OfflineManager: Engine }) => {
|
|
8738
8761
|
const engine = new Engine(config, createInner);
|
|
8739
8762
|
this.engine = engine;
|
|
8740
8763
|
const queued = this.queued;
|
|
@@ -12466,6 +12489,25 @@ function rowIdentity(row, table) {
|
|
|
12466
12489
|
return Object.fromEntries(keys.map((key) => [key, row[key] ?? null]));
|
|
12467
12490
|
}
|
|
12468
12491
|
/**
|
|
12492
|
+
* Refuse an address with the wrong number of parts for a table's key.
|
|
12493
|
+
*
|
|
12494
|
+
* A table keyed on `(agency_id, id)` is addressed as `<agency_id>:::<id>`.
|
|
12495
|
+
* Given `/proposals/p1`, the parts did not match, the read found nothing, and
|
|
12496
|
+
* the answer was the 404 that says the row "may be hidden from this caller by
|
|
12497
|
+
* row-level security", which sent the caller to the policies. Exported for
|
|
12498
|
+
* the test.
|
|
12499
|
+
*/
|
|
12500
|
+
function assertKeyAddress(table, id) {
|
|
12501
|
+
const keys = table.primaryKey;
|
|
12502
|
+
if (keys.length < 2) return;
|
|
12503
|
+
const parts = id.split(":::").length;
|
|
12504
|
+
if (parts === keys.length) return;
|
|
12505
|
+
throw new ApiError(400, "COMPOSITE_KEY_ADDRESS", `'${table.slug}' has a composite key (${keys.join(", ")}), and '${id}' names ${parts} of its ${keys.length} parts. Address a row as /${table.slug}/${keys.map((key) => `<${key}>`).join(":::")}, each part URL-encoded.`, {
|
|
12506
|
+
collection: table.slug,
|
|
12507
|
+
primaryKey: keys
|
|
12508
|
+
});
|
|
12509
|
+
}
|
|
12510
|
+
/**
|
|
12469
12511
|
* A live key presented on a different request than the one it was claimed for.
|
|
12470
12512
|
*
|
|
12471
12513
|
* Refused rather than replayed, because the replay is the dangerous answer: a
|
|
@@ -13391,6 +13433,7 @@ var RestApiGenerator = class RestApiGenerator {
|
|
|
13391
13433
|
this.router.get(`${basePath}/:id`, async (c) => {
|
|
13392
13434
|
this.enforceApiKeyPermission(c, table.slug);
|
|
13393
13435
|
const id = c.req.param("id");
|
|
13436
|
+
assertKeyAddress(table, String(id));
|
|
13394
13437
|
const queryDict = c.req.queries();
|
|
13395
13438
|
const queryOptions = this.parseQuery(queryDict, {
|
|
13396
13439
|
table,
|
|
@@ -13588,6 +13631,7 @@ var RestApiGenerator = class RestApiGenerator {
|
|
|
13588
13631
|
this.enforceApiKeyPermission(c, table.slug);
|
|
13589
13632
|
const driver = this.getScopedDriver(c);
|
|
13590
13633
|
const body = await parseJsonBody(c);
|
|
13634
|
+
assertKeyAddress(table, String(c.req.param("id")));
|
|
13591
13635
|
return this.updateRow(c, driver, ownRow(table.slug), String(c.req.param("id")), body);
|
|
13592
13636
|
};
|
|
13593
13637
|
/**
|
|
@@ -13633,6 +13677,7 @@ var RestApiGenerator = class RestApiGenerator {
|
|
|
13633
13677
|
this.router.delete(`${basePath}/:id`, async (c) => {
|
|
13634
13678
|
this.enforceApiKeyPermission(c, table.slug);
|
|
13635
13679
|
const driver = this.getScopedDriver(c);
|
|
13680
|
+
assertKeyAddress(table, String(c.req.param("id")));
|
|
13636
13681
|
return this.deleteRow(c, driver, ownRow(table.slug), String(c.req.param("id")));
|
|
13637
13682
|
});
|
|
13638
13683
|
}
|
|
@@ -17961,6 +18006,20 @@ function createStorageRoutes(config) {
|
|
|
17961
18006
|
});
|
|
17962
18007
|
return router;
|
|
17963
18008
|
}
|
|
18009
|
+
/**
|
|
18010
|
+
* A storage hook's reader with nothing but reads on it: `table(slug).find`
|
|
18011
|
+
* and `findById`. The object it wraps can write; this one cannot, whatever
|
|
18012
|
+
* the hook does with it at run time.
|
|
18013
|
+
*/
|
|
18014
|
+
function readOnlyAuthorizeData(data) {
|
|
18015
|
+
return Object.freeze({ table(slug) {
|
|
18016
|
+
const table = data.table(slug);
|
|
18017
|
+
return Object.freeze({
|
|
18018
|
+
find: (query) => table.find(query),
|
|
18019
|
+
findById: (id) => table.findById(id)
|
|
18020
|
+
});
|
|
18021
|
+
} });
|
|
18022
|
+
}
|
|
17964
18023
|
//#endregion
|
|
17965
18024
|
//#region src/storage/index.ts
|
|
17966
18025
|
/**
|
|
@@ -17973,11 +18032,11 @@ async function createStorageController(config) {
|
|
|
17973
18032
|
switch (config.type) {
|
|
17974
18033
|
case "local": return new LocalStorageController(config);
|
|
17975
18034
|
case "s3": {
|
|
17976
|
-
const { S3StorageController } = await import("./S3StorageController-
|
|
18035
|
+
const { S3StorageController } = await import("./S3StorageController-CIQ2_mC5.js").then((n) => n.n);
|
|
17977
18036
|
return new S3StorageController(config);
|
|
17978
18037
|
}
|
|
17979
18038
|
case "gcs": {
|
|
17980
|
-
const { GCSStorageController } = await import("./GCSStorageController-
|
|
18039
|
+
const { GCSStorageController } = await import("./GCSStorageController-DKv7oDo7.js").then((n) => n.n);
|
|
17981
18040
|
return new GCSStorageController(config);
|
|
17982
18041
|
}
|
|
17983
18042
|
default: throw new Error(`Unknown storage type: ${config.type}. Built-in types: local, s3, gcs. For other providers, implement the StorageController interface directly.`);
|
|
@@ -18219,7 +18278,7 @@ function noCollectionsCause(unprotected) {
|
|
|
18219
18278
|
* routes wherever and as often as the application asks.
|
|
18220
18279
|
*/
|
|
18221
18280
|
async function loadOpenApiGenerator() {
|
|
18222
|
-
const { generateOpenApiSpec } = await import("./openapi-generator-
|
|
18281
|
+
const { generateOpenApiSpec } = await import("./openapi-generator-B7EbCjhN.js").then((n) => n.r);
|
|
18223
18282
|
return generateOpenApiSpec;
|
|
18224
18283
|
}
|
|
18225
18284
|
/**
|
|
@@ -26090,174 +26149,6 @@ function rpcError(id, code, message) {
|
|
|
26090
26149
|
};
|
|
26091
26150
|
}
|
|
26092
26151
|
//#endregion
|
|
26093
|
-
//#region src/auth/platform-token.ts
|
|
26094
|
-
/** Marks a bearer token as a platform token. */
|
|
26095
|
-
var PLATFORM_TOKEN_PREFIX = "rpt_";
|
|
26096
|
-
/**
|
|
26097
|
-
* Everything a platform token can be granted on this server's admin surfaces.
|
|
26098
|
-
*
|
|
26099
|
-
* Adding a scope here is a decision about what the platform may do inside a
|
|
26100
|
-
* customer's app on a person's behalf, and belongs in its own change.
|
|
26101
|
-
* `cron:write` (run a job, switch one on or off) was added with the hosted
|
|
26102
|
-
* Rebase connector (docs/hosted-mcp-connector.md), whose `cron` tool takes a
|
|
26103
|
-
* confirmed second call before it sends one.
|
|
26104
|
-
*/
|
|
26105
|
-
var PLATFORM_TOKEN_SCOPES = ["cron:read", "cron:write"];
|
|
26106
|
-
/**
|
|
26107
|
-
* What a platform token can be granted on the platform's MCP endpoint, and
|
|
26108
|
-
* only there: the app's own MCP data tools. Never on `/api/data`, the socket,
|
|
26109
|
-
* the public `/mcp`, or an admin surface. Added with the hosted connector, in
|
|
26110
|
-
* the same review as `cron:write`.
|
|
26111
|
-
*/
|
|
26112
|
-
var PLATFORM_MCP_SCOPES = [
|
|
26113
|
-
"data:read",
|
|
26114
|
-
"data:write",
|
|
26115
|
-
"data:delete"
|
|
26116
|
-
];
|
|
26117
|
-
/** How far ahead of this server's clock an `iat` may sit. */
|
|
26118
|
-
var CLOCK_SKEW_SECONDS = 60;
|
|
26119
|
-
/** The environment variables a platform sets to turn platform tokens on. */
|
|
26120
|
-
var PLATFORM_TOKEN_KEY_ENV = "REBASE_PLATFORM_TOKEN_KEY";
|
|
26121
|
-
var PLATFORM_TOKEN_AUDIENCE_ENV = "REBASE_PLATFORM_TOKEN_AUDIENCE";
|
|
26122
|
-
function isPlatformToken(token) {
|
|
26123
|
-
return token.startsWith(PLATFORM_TOKEN_PREFIX);
|
|
26124
|
-
}
|
|
26125
|
-
var PEM_BLOCK = /-----BEGIN PUBLIC KEY-----[\s\S]+?-----END PUBLIC KEY-----/g;
|
|
26126
|
-
/**
|
|
26127
|
-
* The PEM blocks in an env value: real newlines, `\n`-escaped ones (what a
|
|
26128
|
-
* one-line `.env` holds), or the whole thing base64-encoded.
|
|
26129
|
-
*/
|
|
26130
|
-
function parsePublicKeys(value) {
|
|
26131
|
-
let text = value.trim();
|
|
26132
|
-
if (!text.includes("-----BEGIN")) try {
|
|
26133
|
-
text = atob(text);
|
|
26134
|
-
} catch {
|
|
26135
|
-
return [];
|
|
26136
|
-
}
|
|
26137
|
-
text = text.replace(/\\n/g, "\n");
|
|
26138
|
-
return [...text.matchAll(PEM_BLOCK)].map((match) => match[0]);
|
|
26139
|
-
}
|
|
26140
|
-
/** Whether a PEM block is an EC P-256 public key WebCrypto can verify with. */
|
|
26141
|
-
async function isP256PublicKey(pem) {
|
|
26142
|
-
const body = pem.replace(/-----(BEGIN|END) PUBLIC KEY-----/g, "").replace(/\s+/g, "");
|
|
26143
|
-
try {
|
|
26144
|
-
const der = Uint8Array.from(atob(body), (char) => char.charCodeAt(0));
|
|
26145
|
-
await crypto.subtle.importKey("spki", der, {
|
|
26146
|
-
name: "ECDSA",
|
|
26147
|
-
namedCurve: "P-256"
|
|
26148
|
-
}, false, ["verify"]);
|
|
26149
|
-
return true;
|
|
26150
|
-
} catch {
|
|
26151
|
-
return false;
|
|
26152
|
-
}
|
|
26153
|
-
}
|
|
26154
|
-
/**
|
|
26155
|
-
* Read the platform-token configuration from the environment.
|
|
26156
|
-
*
|
|
26157
|
-
* `undefined` when platform tokens are off — neither variable set, which is
|
|
26158
|
-
* every self-hosted server — or misconfigured. A misconfiguration is logged and
|
|
26159
|
-
* leaves them off rather than failing the boot: the platform set these values,
|
|
26160
|
-
* the app's owner cannot fix them, and the app serving traffic matters more
|
|
26161
|
-
* than its cron history being readable from the CLI.
|
|
26162
|
-
*/
|
|
26163
|
-
async function platformTokensFromEnv(env) {
|
|
26164
|
-
const rawKey = env[PLATFORM_TOKEN_KEY_ENV]?.trim();
|
|
26165
|
-
const audience = env[PLATFORM_TOKEN_AUDIENCE_ENV]?.trim();
|
|
26166
|
-
if (!rawKey && !audience) return void 0;
|
|
26167
|
-
if (!rawKey || !audience) {
|
|
26168
|
-
logger.warn(`[Auth] Platform tokens are OFF: ${rawKey ? PLATFORM_TOKEN_AUDIENCE_ENV : PLATFORM_TOKEN_KEY_ENV} is not set. Both are needed — the key to verify a token with, the audience to bind it to this project.`);
|
|
26169
|
-
return;
|
|
26170
|
-
}
|
|
26171
|
-
const candidates = parsePublicKeys(rawKey);
|
|
26172
|
-
const publicKeys = [];
|
|
26173
|
-
for (const pem of candidates) if (await isP256PublicKey(pem)) publicKeys.push(pem);
|
|
26174
|
-
if (publicKeys.length === 0 || publicKeys.length !== candidates.length) {
|
|
26175
|
-
logger.warn(`[Auth] Platform tokens are OFF: ${PLATFORM_TOKEN_KEY_ENV} must hold one or more PEM-encoded EC P-256 public keys ("-----BEGIN PUBLIC KEY-----"); ${candidates.length === 0 ? "it holds none" : `${candidates.length - publicKeys.length} of its ${candidates.length} is not one`}.`);
|
|
26176
|
-
return;
|
|
26177
|
-
}
|
|
26178
|
-
logger.info("Platform tokens accepted on admin surfaces", {
|
|
26179
|
-
audience,
|
|
26180
|
-
keys: publicKeys.length,
|
|
26181
|
-
scopes: PLATFORM_TOKEN_SCOPES
|
|
26182
|
-
});
|
|
26183
|
-
return {
|
|
26184
|
-
publicKeys,
|
|
26185
|
-
audience
|
|
26186
|
-
};
|
|
26187
|
-
}
|
|
26188
|
-
/** Narrow a claim to a non-empty string. */
|
|
26189
|
-
function stringClaim(claims, name) {
|
|
26190
|
-
const value = claims[name];
|
|
26191
|
-
return typeof value === "string" && value.length > 0 ? value : void 0;
|
|
26192
|
-
}
|
|
26193
|
-
/**
|
|
26194
|
-
* Verify a presented platform token: signature, issuer, audience, lifetime, and
|
|
26195
|
-
* the scopes it may be granted here.
|
|
26196
|
-
*/
|
|
26197
|
-
async function verifyPlatformToken(token, config, nowSeconds = Math.floor(Date.now() / 1e3), grantable = PLATFORM_TOKEN_SCOPES) {
|
|
26198
|
-
if (!isPlatformToken(token)) return { refusal: "Not a platform token" };
|
|
26199
|
-
const jws = token.slice(4);
|
|
26200
|
-
let claims;
|
|
26201
|
-
for (const key of config.publicKeys) try {
|
|
26202
|
-
claims = await verifyJwt(jws, key, { algorithms: ["ES256"] });
|
|
26203
|
-
break;
|
|
26204
|
-
} catch {}
|
|
26205
|
-
if (!claims) return { refusal: "Invalid or expired platform token" };
|
|
26206
|
-
if (claims.iss !== "rebase-cloud") return { refusal: "This platform token was not issued by the platform" };
|
|
26207
|
-
if (!(Array.isArray(claims.aud) ? claims.aud : [claims.aud]).includes(config.audience)) return { refusal: "This platform token was issued for a different project" };
|
|
26208
|
-
const iat = claims.iat;
|
|
26209
|
-
const exp = claims.exp;
|
|
26210
|
-
if (typeof iat !== "number" || typeof exp !== "number") return { refusal: "A platform token must carry iat and exp" };
|
|
26211
|
-
if (exp - iat > 600) return { refusal: `A platform token may live at most 600 seconds` };
|
|
26212
|
-
if (iat > nowSeconds + CLOCK_SKEW_SECONDS) return { refusal: "This platform token was issued in the future" };
|
|
26213
|
-
const subject = stringClaim(claims, "sub");
|
|
26214
|
-
if (!subject) return { refusal: "A platform token must name who it acts for (sub)" };
|
|
26215
|
-
const scopes = (stringClaim(claims, "scope") ?? "").split(/\s+/).filter(Boolean).filter((scope) => grantable.includes(scope));
|
|
26216
|
-
if (scopes.length === 0) return { refusal: `This platform token carries no scope this server grants to the platform here (${grantable.join(", ")})` };
|
|
26217
|
-
const tokenId = stringClaim(claims, "jti");
|
|
26218
|
-
return {
|
|
26219
|
-
subject,
|
|
26220
|
-
scopes,
|
|
26221
|
-
...tokenId ? { tokenId } : {}
|
|
26222
|
-
};
|
|
26223
|
-
}
|
|
26224
|
-
/**
|
|
26225
|
-
* Authenticate an `rpt_` bearer token ahead of an admin gate.
|
|
26226
|
-
*
|
|
26227
|
-
* Mounted where the `rk_` pre-auth is, and shaped like it: a request it does not
|
|
26228
|
-
* recognise passes through untouched, a recognised one either becomes a caller
|
|
26229
|
-
* with narrowed `scopes` or is refused here. The gate's scope check then decides
|
|
26230
|
-
* — so a token holding `cron:read` reads cron, and is a 403 on every other
|
|
26231
|
-
* surface.
|
|
26232
|
-
*
|
|
26233
|
-
* With `config` undefined, platform tokens are off on this server; an `rpt_`
|
|
26234
|
-
* token is still recognised, so its holder learns that rather than the generic
|
|
26235
|
-
* "invalid token" a JWT parser would answer.
|
|
26236
|
-
*/
|
|
26237
|
-
function createPlatformTokenPreAuth(config) {
|
|
26238
|
-
return async (c, next) => {
|
|
26239
|
-
if (c.get("user")) return next();
|
|
26240
|
-
const token = extractBearerToken(c.req.header("authorization"));
|
|
26241
|
-
if (token === void 0 || !isPlatformToken(token)) return next();
|
|
26242
|
-
if (!config) return errorHandler(new ApiError(401, "PLATFORM_TOKENS_OFF", `This server does not accept platform tokens: ${PLATFORM_TOKEN_KEY_ENV} and ${PLATFORM_TOKEN_AUDIENCE_ENV} are not set. The platform hosting it sets them when it deploys.`, void 0, true), c);
|
|
26243
|
-
const verified = await verifyPlatformToken(token, config);
|
|
26244
|
-
if ("refusal" in verified) return errorHandler(new ApiError(401, "INVALID_PLATFORM_TOKEN", verified.refusal, void 0, true), c);
|
|
26245
|
-
c.set("user", {
|
|
26246
|
-
uid: `platform:${verified.subject}`,
|
|
26247
|
-
roles: []
|
|
26248
|
-
});
|
|
26249
|
-
c.set("scopes", verified.scopes);
|
|
26250
|
-
logger.info("[Auth] Platform token accepted", {
|
|
26251
|
-
subject: verified.subject,
|
|
26252
|
-
jti: verified.tokenId,
|
|
26253
|
-
scopes: verified.scopes,
|
|
26254
|
-
method: c.req.method,
|
|
26255
|
-
path: c.req.path
|
|
26256
|
-
});
|
|
26257
|
-
return next();
|
|
26258
|
-
};
|
|
26259
|
-
}
|
|
26260
|
-
//#endregion
|
|
26261
26152
|
//#region src/mcp/platform-mcp.ts
|
|
26262
26153
|
/** Where it is mounted, under `basePath`. */
|
|
26263
26154
|
var PLATFORM_MCP_PATH = "/admin/mcp";
|
|
@@ -26332,7 +26223,7 @@ function createScopeRoutes(options) {
|
|
|
26332
26223
|
const router = new Hono();
|
|
26333
26224
|
router.onError(errorHandler);
|
|
26334
26225
|
if (options.apiKeyPreAuth) router.use("/*", options.apiKeyPreAuth);
|
|
26335
|
-
router.use("/*", createRequireAuth({
|
|
26226
|
+
router.use("/*", options.require ?? createRequireAuth({
|
|
26336
26227
|
serviceKey: options.serviceKey,
|
|
26337
26228
|
resolveRoles: options.resolveRoles,
|
|
26338
26229
|
revocationRepo: options.revocationRepo
|
|
@@ -26533,7 +26424,7 @@ async function seedInitialAdmin(users, env = process.env) {
|
|
|
26533
26424
|
const email = env.REBASE_ADMIN_EMAIL?.trim();
|
|
26534
26425
|
const password = env.REBASE_ADMIN_PASSWORD;
|
|
26535
26426
|
if (!email && !password) {
|
|
26536
|
-
if (users && !isBootstrapWindowOpen(env)) try {
|
|
26427
|
+
if (users && !isBootstrapWindowOpen(env) && !env.REBASE_PLATFORM_TOKEN_KEY?.trim()) try {
|
|
26537
26428
|
const existing = await users.listUsers({ limit: 1 });
|
|
26538
26429
|
if ((existing.total ?? existing.users.length) === 0) logger.warn("⚠️ No users exist and REBASE_ADMIN_EMAIL is not set. In production the first account to register is NOT promoted to admin; set REBASE_ADMIN_EMAIL and REBASE_ADMIN_PASSWORD before the first sign-up, or assign the admin role with the service key.");
|
|
26539
26430
|
} catch {}
|
|
@@ -27441,10 +27332,54 @@ function createSourceBundle(options) {
|
|
|
27441
27332
|
hooksModule: resolveModule(hooks),
|
|
27442
27333
|
functionsDir: resolve(options.functions),
|
|
27443
27334
|
cronsDir: resolve(options.crons),
|
|
27444
|
-
staticApps:
|
|
27335
|
+
staticApps: sourceStaticApps(dir)
|
|
27445
27336
|
};
|
|
27446
27337
|
}
|
|
27447
27338
|
/**
|
|
27339
|
+
* The static apps `rebase dev` serves from this process: the ones in
|
|
27340
|
+
* `rebase.json` with no build step (`output` is the directory itself, and no
|
|
27341
|
+
* `build`), straight from their sources. An app with a build is Vite's, which
|
|
27342
|
+
* `rebase dev` runs on its own port.
|
|
27343
|
+
*
|
|
27344
|
+
* A no-build site (plain HTML, a script tag) used to be served by `rebase
|
|
27345
|
+
* build && rebase start` and by nothing in `rebase dev`, which printed only
|
|
27346
|
+
* "No frontend/ directory found": such a site could not be developed against
|
|
27347
|
+
* the dev server at all. Exported for the test.
|
|
27348
|
+
*/
|
|
27349
|
+
function sourceStaticApps(projectRoot) {
|
|
27350
|
+
let manifest;
|
|
27351
|
+
try {
|
|
27352
|
+
manifest = JSON.parse(fs$1.readFileSync(path$1.join(projectRoot, "rebase.json"), "utf-8"));
|
|
27353
|
+
} catch {
|
|
27354
|
+
return [];
|
|
27355
|
+
}
|
|
27356
|
+
const apps = typeof manifest === "object" && manifest !== null ? manifest.apps : void 0;
|
|
27357
|
+
if (typeof apps !== "object" || apps === null) return [];
|
|
27358
|
+
const out = [];
|
|
27359
|
+
for (const [name, raw] of Object.entries(apps)) {
|
|
27360
|
+
if (typeof raw !== "object" || raw === null) continue;
|
|
27361
|
+
const app = raw;
|
|
27362
|
+
if (app.type !== "static" || typeof app.root !== "string" || typeof app.output !== "string") continue;
|
|
27363
|
+
if (typeof app.build === "string" && app.build.trim() !== "") continue;
|
|
27364
|
+
const root = path$1.resolve(projectRoot, app.root);
|
|
27365
|
+
const output = path$1.resolve(projectRoot, app.output);
|
|
27366
|
+
if (root !== output || !fs$1.existsSync(path$1.join(output, "index.html"))) continue;
|
|
27367
|
+
const address = parseAppAddress(typeof app.path === "string" ? app.path : "/");
|
|
27368
|
+
if (!address.ok) {
|
|
27369
|
+
logger.warn(`Static app "${name}" is not served by the dev server: its path ${address.reason}.`);
|
|
27370
|
+
continue;
|
|
27371
|
+
}
|
|
27372
|
+
if (reservedPrefixFor(address.address.path)) continue;
|
|
27373
|
+
out.push({
|
|
27374
|
+
path: address.address.path,
|
|
27375
|
+
...address.address.host ? { host: address.address.host.toLowerCase() } : {},
|
|
27376
|
+
dir: output,
|
|
27377
|
+
spa: app.spa !== false
|
|
27378
|
+
});
|
|
27379
|
+
}
|
|
27380
|
+
return out.sort(compareStaticApps);
|
|
27381
|
+
}
|
|
27382
|
+
/**
|
|
27448
27383
|
* Import one of the project's backend modules, fatally when it is there and
|
|
27449
27384
|
* cannot be imported: every declaration in it would be gone, and the process
|
|
27450
27385
|
* would come up with a different access model than the project declares,
|
|
@@ -29850,14 +29785,16 @@ async function buildRebaseBackend(options, announcements) {
|
|
|
29850
29785
|
const platformTokenPreAuth = createPlatformTokenPreAuth(platformTokens);
|
|
29851
29786
|
let backupLinkRouter;
|
|
29852
29787
|
if (surfaces.admin) {
|
|
29853
|
-
const { createBackupLinkRoutes, backupDestinationFromEnv } = await import("./backup-
|
|
29788
|
+
const { createBackupLinkRoutes, backupDestinationFromEnv } = await import("./backup-M37yPYpz.js").then((n) => n.t);
|
|
29854
29789
|
backupLinkRouter = createBackupLinkRoutes({ getDestination: () => backupDestinationFromEnv(process.env) });
|
|
29855
29790
|
}
|
|
29791
|
+
const requireCaller = authAdapter ? { require: createAdapterCallerResolution(authAdapter).require } : {};
|
|
29856
29792
|
const apiKeyRouter = apiKeyStore && surfaces.admin ? createApiKeyRoutes({
|
|
29857
29793
|
store: apiKeyStore,
|
|
29858
29794
|
serviceKey: internalServiceKey,
|
|
29859
29795
|
targets: keyTargets,
|
|
29860
|
-
...adminGateIdentity
|
|
29796
|
+
...adminGateIdentity,
|
|
29797
|
+
...requireCaller
|
|
29861
29798
|
}) : void 0;
|
|
29862
29799
|
let personalKeyRouter;
|
|
29863
29800
|
if (apiKeyStore && surfaces.auth) {
|
|
@@ -29868,13 +29805,15 @@ async function buildRebaseBackend(options, announcements) {
|
|
|
29868
29805
|
enabled: personalKeysEnabled,
|
|
29869
29806
|
serviceKey: internalServiceKey,
|
|
29870
29807
|
targets: keyTargets,
|
|
29871
|
-
...adminGateIdentity
|
|
29808
|
+
...adminGateIdentity,
|
|
29809
|
+
...requireCaller
|
|
29872
29810
|
}));
|
|
29873
29811
|
}
|
|
29874
29812
|
const scopeRouter = createScopeRoutes({
|
|
29875
29813
|
serviceKey: internalServiceKey,
|
|
29876
29814
|
apiKeyPreAuth,
|
|
29877
|
-
...adminGateIdentity
|
|
29815
|
+
...adminGateIdentity,
|
|
29816
|
+
...requireCaller
|
|
29878
29817
|
});
|
|
29879
29818
|
const rateLimitWindowMs = config.rateLimit?.windowMs ?? 900 * 1e3;
|
|
29880
29819
|
const sharedRateLimitStore = config.rateLimit?.store ?? (resolveRateLimitStoreKind(process.env) === "sql" ? createSqlRateLimitStore(defaultDriver, { provision: provision.database }) : void 0);
|
|
@@ -29915,7 +29854,8 @@ async function buildRebaseBackend(options, announcements) {
|
|
|
29915
29854
|
const capabilities = await authAdapter.getCapabilities();
|
|
29916
29855
|
return c.json({
|
|
29917
29856
|
...capabilities,
|
|
29918
|
-
storage: Boolean(storageRegistry || storageController)
|
|
29857
|
+
storage: Boolean(storageRegistry || storageController),
|
|
29858
|
+
...platformTokens && authAdapter?.id === "rebase-builtin" ? { platformSignIn: platformTokens.signInUrl ? { url: platformTokens.signInUrl } : {} } : {}
|
|
29919
29859
|
});
|
|
29920
29860
|
};
|
|
29921
29861
|
const adapterRouter = (router, kind) => {
|
|
@@ -30025,7 +29965,7 @@ async function buildRebaseBackend(options, announcements) {
|
|
|
30025
29965
|
]) {
|
|
30026
29966
|
const providerConfig = safeAuthConfig[key];
|
|
30027
29967
|
if (providerConfig && requiredFields.every((f) => Boolean(providerConfig[f]))) {
|
|
30028
|
-
const createFn = (await import("./auth-
|
|
29968
|
+
const createFn = (await import("./auth-CHOmnYwu.js").then((n) => n.t))[factory];
|
|
30029
29969
|
oauthProviders.push(createFn(providerConfig));
|
|
30030
29970
|
}
|
|
30031
29971
|
}
|
|
@@ -30057,7 +29997,11 @@ async function buildRebaseBackend(options, announcements) {
|
|
|
30057
29997
|
requireEmailVerification: safeAuthConfig.requireEmailVerification ?? false,
|
|
30058
29998
|
refreshTokenReuseIntervalSeconds: safeAuthConfig.refreshTokenReuseIntervalSeconds,
|
|
30059
29999
|
refreshTokenReuse: safeAuthConfig.refreshTokenReuse,
|
|
30060
|
-
magicLinkCreatesUsers: safeAuthConfig.magicLinkCreatesUsers ?? false
|
|
30000
|
+
magicLinkCreatesUsers: safeAuthConfig.magicLinkCreatesUsers ?? false,
|
|
30001
|
+
platformSignIn: platformTokens ? {
|
|
30002
|
+
tokens: platformTokens,
|
|
30003
|
+
usedTokens: rateLimitStore
|
|
30004
|
+
} : void 0
|
|
30061
30005
|
});
|
|
30062
30006
|
if (safeAuthConfig.requireEmailVerification && !authConfigResult.emailService?.isConfigured()) throw new Error("auth.requireEmailVerification is on, but no email service is configured, so no address could ever be verified and nobody could sign in with a password. Configure auth.email (SMTP_* or the email settings), or turn requireEmailVerification off.");
|
|
30063
30007
|
if (safeAuthConfig.cookieAuth) {
|
|
@@ -30292,11 +30236,11 @@ async function buildRebaseBackend(options, announcements) {
|
|
|
30292
30236
|
let schemaEditorOff = schemaEditorUnavailable();
|
|
30293
30237
|
let schemaEditorRoutes;
|
|
30294
30238
|
let tableSourceEditor;
|
|
30295
|
-
const loadTableSourceEditor = (dir) => tableSourceEditor ??= import("./schema-editor-routes-
|
|
30239
|
+
const loadTableSourceEditor = (dir) => tableSourceEditor ??= import("./schema-editor-routes-CwdoGYKu.js").then((module) => module.createTableSourceEditor(dir));
|
|
30296
30240
|
const tsMorphMissing = (err) => typeof err === "object" && err !== null && "code" in err && err.code === "ERR_MODULE_NOT_FOUND";
|
|
30297
30241
|
if (!schemaEditorOff && config.schemaDir) try {
|
|
30298
30242
|
const editor = await loadTableSourceEditor(config.schemaDir);
|
|
30299
|
-
schemaEditorRoutes = (await import("./schema-editor-routes-
|
|
30243
|
+
schemaEditorRoutes = (await import("./schema-editor-routes-CwdoGYKu.js")).createSchemaEditorRoutes(editor, { getAdmin: () => defaultDriver.admin });
|
|
30300
30244
|
} catch (err) {
|
|
30301
30245
|
if (tsMorphMissing(err)) {
|
|
30302
30246
|
schemaEditorOff = {
|
|
@@ -30351,7 +30295,7 @@ async function buildRebaseBackend(options, announcements) {
|
|
|
30351
30295
|
let remoteEditingOff;
|
|
30352
30296
|
if (remoteRepo) {
|
|
30353
30297
|
try {
|
|
30354
|
-
remoteEditor = await import("./table-source-editor-
|
|
30298
|
+
remoteEditor = await import("./table-source-editor-P5zp7lOn.js").then((n) => n.u);
|
|
30355
30299
|
} catch (err) {
|
|
30356
30300
|
if (err?.code !== "ERR_MODULE_NOT_FOUND") throw err;
|
|
30357
30301
|
remoteEditingOff = {
|
|
@@ -30754,7 +30698,7 @@ async function buildRebaseBackend(options, announcements) {
|
|
|
30754
30698
|
const scopedDefaultDriver = await scopeDataDriver(defaultDriver, serviceIdentity);
|
|
30755
30699
|
const resolveAccessor = createAccessorSlugResolver(() => tableRegistry.list());
|
|
30756
30700
|
const defaultData = buildSdkData(scopedDefaultDriver, { resolveAccessor });
|
|
30757
|
-
storageAuthorizeData.current =
|
|
30701
|
+
storageAuthorizeData.current = readOnlyAuthorizeData(buildSdkData(defaultDriver, { resolveAccessor }));
|
|
30758
30702
|
const dataSourcesByKey = {};
|
|
30759
30703
|
for (const driverKey of driverRegistry.list()) {
|
|
30760
30704
|
if (driverKey === "(default)") continue;
|
|
@@ -30857,9 +30801,9 @@ async function buildRebaseBackend(options, announcements) {
|
|
|
30857
30801
|
/** Function and cron files that failed to import, for `requireFilesLoaded`. */
|
|
30858
30802
|
const loadFailures = [];
|
|
30859
30803
|
if ((config.functionsDir || config.functions) && surfaces.functions) {
|
|
30860
|
-
const { functionList, readFunctionsDirectory } = await import("./function-loader-
|
|
30861
|
-
const { createFunctionRoutes } = await import("./function-routes-
|
|
30862
|
-
const { createFunctionsRequestTimeout, resolveFunctionsTimeoutMs } = await import("./request-timeout-
|
|
30804
|
+
const { functionList, readFunctionsDirectory } = await import("./function-loader-C23HVFx8.js").then((n) => n.t);
|
|
30805
|
+
const { createFunctionRoutes } = await import("./function-routes-DBKL2azw.js").then((n) => n.n);
|
|
30806
|
+
const { createFunctionsRequestTimeout, resolveFunctionsTimeoutMs } = await import("./request-timeout-DdbFS6ef.js").then((n) => n.t);
|
|
30863
30807
|
const { functions: functionRecord, problems, failed } = config.functions ? {
|
|
30864
30808
|
functions: config.functions,
|
|
30865
30809
|
problems: [],
|
|
@@ -30867,7 +30811,7 @@ async function buildRebaseBackend(options, announcements) {
|
|
|
30867
30811
|
} : await readFunctionsDirectory(config.functionsDir);
|
|
30868
30812
|
loadFailures.push(...failed);
|
|
30869
30813
|
const allFunctions = functionList(functionRecord);
|
|
30870
|
-
const { selectFunctions } = await import("./selection-
|
|
30814
|
+
const { selectFunctions } = await import("./selection-BiTJ-Tiy.js").then((n) => n.n);
|
|
30871
30815
|
const loadedFunctions = selectFunctions(allFunctions, config.functionsSelection);
|
|
30872
30816
|
servedFunctionNames = loadedFunctions.map((fn) => fn.name);
|
|
30873
30817
|
if (loadedFunctions.length !== allFunctions.length) logger.info("Serving a subset of this bundle's functions", {
|
|
@@ -30916,7 +30860,7 @@ async function buildRebaseBackend(options, announcements) {
|
|
|
30916
30860
|
}
|
|
30917
30861
|
const forwardsFunctionsOnlyInProcess = !surfaces.functions && !surfaces.auth && !surfaces.data && !surfaces.storage && !surfaces.admin && !surfaces.meta;
|
|
30918
30862
|
if (config.functionsUpstream && !surfaces.functions) {
|
|
30919
|
-
const { createFunctionsProxy } = await import("./proxy-
|
|
30863
|
+
const { createFunctionsProxy } = await import("./proxy-0fGXJapt.js").then((n) => n.t);
|
|
30920
30864
|
functionsSurface = createFunctionsProxy({ upstream: config.functionsUpstream });
|
|
30921
30865
|
logger.info(forwardsFunctionsOnlyInProcess ? "Forwarding this process's own function calls (rebase.functions) to another process" : "Forwarding custom functions to another process", { upstream: config.functionsUpstream });
|
|
30922
30866
|
}
|
|
@@ -30925,10 +30869,10 @@ async function buildRebaseBackend(options, announcements) {
|
|
|
30925
30869
|
/** How many cron jobs `start()` schedules in this process. */
|
|
30926
30870
|
let cronJobsToSchedule = 0;
|
|
30927
30871
|
if (surfaces.cron || (config.cronsDir || config.crons || storageSweepJobs.length > 0) && ownership.cronScheduler) {
|
|
30928
|
-
const { cronJobsFrom, readCronsDirectory, withHiddenPropertiesOf } = await import("./cron-loader-
|
|
30929
|
-
const { CronScheduler } = await import("./cron-scheduler-
|
|
30930
|
-
const { createCronRoutes } = await import("./cron-routes-
|
|
30931
|
-
const { createCronStore } = await import("./cron-store-
|
|
30872
|
+
const { cronJobsFrom, readCronsDirectory, withHiddenPropertiesOf } = await import("./cron-loader-BWahenzQ.js").then((n) => n.t);
|
|
30873
|
+
const { CronScheduler } = await import("./cron-scheduler-B25NuV7o.js").then((n) => n.n);
|
|
30874
|
+
const { createCronRoutes } = await import("./cron-routes-Cq6O3oPR.js").then((n) => n.n);
|
|
30875
|
+
const { createCronStore } = await import("./cron-store-B1IStnKM.js").then((n) => n.n);
|
|
30932
30876
|
const { crons: cronRecord, problems: cronProblems, failed: cronFailures } = config.crons ? {
|
|
30933
30877
|
crons: config.crons,
|
|
30934
30878
|
problems: [],
|
|
@@ -30993,7 +30937,7 @@ async function buildRebaseBackend(options, announcements) {
|
|
|
30993
30937
|
}
|
|
30994
30938
|
let metricsHistory;
|
|
30995
30939
|
try {
|
|
30996
|
-
const { createMetricsHistory } = await import("./history-recorder-
|
|
30940
|
+
const { createMetricsHistory } = await import("./history-recorder-C5gixsU3.js");
|
|
30997
30941
|
metricsHistory = createMetricsHistory(defaultDriver, { provision: provision.database });
|
|
30998
30942
|
if (metricsHistory) await metricsHistory.ensure();
|
|
30999
30943
|
} catch (err) {
|
|
@@ -31002,7 +30946,7 @@ async function buildRebaseBackend(options, announcements) {
|
|
|
31002
30946
|
}
|
|
31003
30947
|
let jobQueue;
|
|
31004
30948
|
if (jobsOptions?.enabled) {
|
|
31005
|
-
const { createJobStore, createJobQueue } = await import("./jobs-
|
|
30949
|
+
const { createJobStore, createJobQueue } = await import("./jobs-uqvEGTfs.js").then((n) => n.t);
|
|
31006
30950
|
const store = createJobStore(defaultDriver, { provision: provision.database });
|
|
31007
30951
|
if (store) {
|
|
31008
30952
|
await store.ensureTable();
|
|
@@ -31050,7 +30994,7 @@ Use a driver that supports the job queue, or remove the declarations. Refusing t
|
|
|
31050
30994
|
/** Who `/api/docs` is served to by default: the schema endpoint's callers (see `init/docs`). */
|
|
31051
30995
|
let docsAudience;
|
|
31052
30996
|
if (surfaces.admin) {
|
|
31053
|
-
const { createBackupRoutes, backupDestinationFromEnv, readBackupSchedule } = await import("./backup-
|
|
30997
|
+
const { createBackupRoutes, backupDestinationFromEnv, readBackupSchedule } = await import("./backup-M37yPYpz.js").then((n) => n.t);
|
|
31054
30998
|
const backupRouter = new Hono();
|
|
31055
30999
|
applyAdminGate(backupRouter, "Backup", "backups:read");
|
|
31056
31000
|
const scheduler = cronScheduler;
|
|
@@ -31072,7 +31016,7 @@ Use a driver that supports the job queue, or remove the declarations. Refusing t
|
|
|
31072
31016
|
}
|
|
31073
31017
|
let rlsSimulatorSurface;
|
|
31074
31018
|
if (surfaces.admin) {
|
|
31075
|
-
const { createRlsSimulatorRoutes } = await import("./rls-simulator-routes-
|
|
31019
|
+
const { createRlsSimulatorRoutes } = await import("./rls-simulator-routes-Cjv8yY1V.js");
|
|
31076
31020
|
const rlsSimulatorRouter = new Hono();
|
|
31077
31021
|
applyAdminGate(rlsSimulatorRouter, "RLS simulator", "schema:read");
|
|
31078
31022
|
rlsSimulatorRouter.route("/", createRlsSimulatorRoutes({
|
|
@@ -31084,14 +31028,14 @@ Use a driver that supports the job queue, or remove the declarations. Refusing t
|
|
|
31084
31028
|
rlsSimulatorSurface = rlsSimulatorRouter;
|
|
31085
31029
|
}
|
|
31086
31030
|
if (surfaces.admin) {
|
|
31087
|
-
const { createSqlExportRoutes } = await import("./sql-export-routes-
|
|
31031
|
+
const { createSqlExportRoutes } = await import("./sql-export-routes-BYt7G2v-.js");
|
|
31088
31032
|
const sqlExportRouter = new Hono();
|
|
31089
31033
|
applyAdminGate(sqlExportRouter, "SQL export", "database:write");
|
|
31090
31034
|
sqlExportRouter.route("/", createSqlExportRoutes({ getAdmin: () => defaultDriver.admin }));
|
|
31091
31035
|
sqlExportSurface = sqlExportRouter;
|
|
31092
31036
|
}
|
|
31093
31037
|
if (surfaces.admin) {
|
|
31094
|
-
const { createBranchRoutes } = await import("./branch-routes-
|
|
31038
|
+
const { createBranchRoutes } = await import("./branch-routes-Cl-Oa3CL.js");
|
|
31095
31039
|
const branchRouter = new Hono();
|
|
31096
31040
|
applyAdminGate(branchRouter, "Branch review", "database:write");
|
|
31097
31041
|
branchRouter.route("/", createBranchRoutes({ getAdmin: () => defaultDriver.admin }));
|
|
@@ -31123,14 +31067,14 @@ Use a driver that supports the job queue, or remove the declarations. Refusing t
|
|
|
31123
31067
|
devMailSurface = devMailRouter;
|
|
31124
31068
|
}
|
|
31125
31069
|
if (surfaces.admin) {
|
|
31126
|
-
const { createLogsRoutes } = await import("./logs-routes-
|
|
31070
|
+
const { createLogsRoutes } = await import("./logs-routes-D2NGM5Pa.js").then((n) => n.n);
|
|
31127
31071
|
const logsRouter = new Hono();
|
|
31128
31072
|
applyAdminGate(logsRouter, "Logs", "logs:read");
|
|
31129
31073
|
logsRouter.route("/", createLogsRoutes({}, { closeSignal: longLivedResponses.signal }));
|
|
31130
31074
|
logsSurface = logsRouter;
|
|
31131
31075
|
}
|
|
31132
31076
|
if (surfaces.meta) {
|
|
31133
|
-
const { createContractRoutes } = await import("./contract-routes-
|
|
31077
|
+
const { createContractRoutes } = await import("./contract-routes-Dkxl-2B_.js").then((n) => n.t);
|
|
31134
31078
|
const contractRouter = new Hono();
|
|
31135
31079
|
if (adminSurfacesGated) contractRouter.use("/contract", ...adminGate("schema:read"));
|
|
31136
31080
|
else {
|
|
@@ -31140,7 +31084,7 @@ Use a driver that supports the job queue, or remove the declarations. Refusing t
|
|
|
31140
31084
|
} }, 404));
|
|
31141
31085
|
warnOnMount("meta", "Contract endpoint disabled: no auth is configured (no adapter or no jwtSecret), and it would otherwise expose the full schema to anyone. `/api/meta/schema-version` is still served.");
|
|
31142
31086
|
}
|
|
31143
|
-
const { createSchemaTablesService, createSchemaTablesRoutes } = await import("./schema-tables-routes-
|
|
31087
|
+
const { createSchemaTablesService, createSchemaTablesRoutes } = await import("./schema-tables-routes-Ch52xLqF.js").then((n) => n.n);
|
|
31144
31088
|
const schemaTables = createSchemaTablesService({
|
|
31145
31089
|
tableRegistry,
|
|
31146
31090
|
policySource: () => servedPolicyTables,
|
|
@@ -31560,7 +31504,7 @@ function realtimeSocketPath(basePath) {
|
|
|
31560
31504
|
* backend no MCP client calls never loads it.
|
|
31561
31505
|
*/
|
|
31562
31506
|
async function loadMcpApps() {
|
|
31563
|
-
const { MCP_APPS } = await import("./dist-
|
|
31507
|
+
const { MCP_APPS } = await import("./dist-D_R0Khut.js");
|
|
31564
31508
|
return withProjectView(MCP_APPS, [...process.env.REBASE_MCP_VIEW ? [process.env.REBASE_MCP_VIEW] : [], ...servedFrontendPaths().map((frontend) => path.join(frontend, PROJECT_VIEW_FILE))], (file) => {
|
|
31565
31509
|
try {
|
|
31566
31510
|
return readFileSync(file, "utf8");
|
|
@@ -31574,7 +31518,7 @@ async function loadMcpApps() {
|
|
|
31574
31518
|
* app to the modules and names every view serves (`MCP_APP_MODULES`).
|
|
31575
31519
|
*/
|
|
31576
31520
|
async function loadAppCompiler() {
|
|
31577
|
-
const { compileApp } = await import("./dist-
|
|
31521
|
+
const { compileApp } = await import("./dist-D_R0Khut.js");
|
|
31578
31522
|
return (source) => compileApp(source, MCP_APP_MODULES);
|
|
31579
31523
|
}
|
|
31580
31524
|
/**
|
|
@@ -33442,6 +33386,14 @@ var bootEnvExtension = z$1.object({
|
|
|
33442
33386
|
*/
|
|
33443
33387
|
EMAIL_LOGO_URL: z$1.string().optional(),
|
|
33444
33388
|
/**
|
|
33389
|
+
* Where an emailed magic link points. A base (`https://app.example.com`)
|
|
33390
|
+
* gets `/auth/magic-link?token=…` appended, as `FRONTEND_URL` does; a URL
|
|
33391
|
+
* with `{token}` in it is the whole link (`https://app.example.com/app.html#ml={token}`),
|
|
33392
|
+
* for a frontend that does not serve `/auth/magic-link`. Unset, the base is
|
|
33393
|
+
* `FRONTEND_URL`.
|
|
33394
|
+
*/
|
|
33395
|
+
MAGIC_LINK_URL: z$1.string().optional(),
|
|
33396
|
+
/**
|
|
33445
33397
|
* Serve the bundle's static/admin assets from this process.
|
|
33446
33398
|
*
|
|
33447
33399
|
* Default on, because a self-hosted single-container deployment is the case
|
|
@@ -34751,6 +34703,8 @@ function hasAbsoluteLinkBase(value) {
|
|
|
34751
34703
|
* and the auth routes report the missing service for themselves.
|
|
34752
34704
|
*/
|
|
34753
34705
|
function resolveEmailOptions(env) {
|
|
34706
|
+
const magicLinkProblem = magicLinkUrlProblem(env.MAGIC_LINK_URL);
|
|
34707
|
+
if (magicLinkProblem) logger.warn(`[Auth] ${magicLinkProblem}`);
|
|
34754
34708
|
if (!env.SMTP_HOST) {
|
|
34755
34709
|
if (env.NODE_ENV === "production") return void 0;
|
|
34756
34710
|
if (!hasAbsoluteLinkBase(env.FRONTEND_URL)) return void 0;
|
|
@@ -34759,7 +34713,8 @@ function resolveEmailOptions(env) {
|
|
|
34759
34713
|
sendEmail: registerDevEmailSink(createDevEmailSink()).sendEmail,
|
|
34760
34714
|
appName: env.APP_NAME,
|
|
34761
34715
|
logoUrl: env.EMAIL_LOGO_URL,
|
|
34762
|
-
resetPasswordUrl: env.FRONTEND_URL
|
|
34716
|
+
resetPasswordUrl: env.FRONTEND_URL,
|
|
34717
|
+
...env.MAGIC_LINK_URL ? { magicLinkUrl: env.MAGIC_LINK_URL } : {}
|
|
34763
34718
|
};
|
|
34764
34719
|
}
|
|
34765
34720
|
return {
|
|
@@ -34776,7 +34731,8 @@ function resolveEmailOptions(env) {
|
|
|
34776
34731
|
},
|
|
34777
34732
|
appName: env.APP_NAME,
|
|
34778
34733
|
logoUrl: env.EMAIL_LOGO_URL,
|
|
34779
|
-
resetPasswordUrl: env.FRONTEND_URL
|
|
34734
|
+
resetPasswordUrl: env.FRONTEND_URL,
|
|
34735
|
+
...env.MAGIC_LINK_URL ? { magicLinkUrl: env.MAGIC_LINK_URL } : {}
|
|
34780
34736
|
};
|
|
34781
34737
|
}
|
|
34782
34738
|
/**
|
|
@@ -34967,6 +34923,22 @@ var UNCOUNTED_PATHS = /* @__PURE__ */ new Set([
|
|
|
34967
34923
|
function isUncountedPath(pathname) {
|
|
34968
34924
|
return UNCOUNTED_PATHS.has(pathname);
|
|
34969
34925
|
}
|
|
34926
|
+
/**
|
|
34927
|
+
* Whether a request's `status` label counts as an error.
|
|
34928
|
+
*
|
|
34929
|
+
* A 5xx and nothing else: the server failed. A 4xx is the caller's mistake and
|
|
34930
|
+
* a working API answers plenty of them. This is THE definition — the stored
|
|
34931
|
+
* per-minute error series use it, and the control plane's rollup of
|
|
34932
|
+
* `rebase_requests_total` (`metrics-rollup.ts` in the cloud console) applies
|
|
34933
|
+
* the same rule to the same label, which a test on each side pins to one table
|
|
34934
|
+
* of statuses.
|
|
34935
|
+
*/
|
|
34936
|
+
function isErrorStatus(status) {
|
|
34937
|
+
return (status ?? "").startsWith("5");
|
|
34938
|
+
}
|
|
34939
|
+
function isRecordedSurface(surface) {
|
|
34940
|
+
return RECORDED_SURFACES.some((s) => s === surface);
|
|
34941
|
+
}
|
|
34970
34942
|
var LATENCY_BUCKETS_MS = [
|
|
34971
34943
|
5,
|
|
34972
34944
|
10,
|
|
@@ -35091,6 +35063,27 @@ var MetricsRegistry = class MetricsRegistry {
|
|
|
35091
35063
|
if (bucket === -1) bucket = LATENCY_BUCKETS_MS.length;
|
|
35092
35064
|
hist.counts[bucket] += 1;
|
|
35093
35065
|
}
|
|
35066
|
+
/**
|
|
35067
|
+
* Requests and errors since this process started, summed per recorded
|
|
35068
|
+
* surface. Read by the history sampler to compute per-minute deltas; the
|
|
35069
|
+
* surfaces it does not record (`admin`, `meta`, `other`) are left out.
|
|
35070
|
+
*/
|
|
35071
|
+
requestTotalsBySurface() {
|
|
35072
|
+
const totals = {};
|
|
35073
|
+
for (const [key, count] of this.requests) {
|
|
35074
|
+
const labels = MetricsRegistry.parseLabels(key);
|
|
35075
|
+
const surface = labels.surface;
|
|
35076
|
+
if (!isRecordedSurface(surface)) continue;
|
|
35077
|
+
const entry = totals[surface] ?? {
|
|
35078
|
+
requests: 0,
|
|
35079
|
+
errors: 0
|
|
35080
|
+
};
|
|
35081
|
+
entry.requests += count;
|
|
35082
|
+
if (isErrorStatus(labels.status)) entry.errors += count;
|
|
35083
|
+
totals[surface] = entry;
|
|
35084
|
+
}
|
|
35085
|
+
return totals;
|
|
35086
|
+
}
|
|
35094
35087
|
incrementCounter(name, labels = {}, by = 1) {
|
|
35095
35088
|
const key = MetricsRegistry.namedKey(name, labels);
|
|
35096
35089
|
if (!this.counters.has(key) && this.counters.size >= MAX_SERIES) return;
|
|
@@ -35290,7 +35283,7 @@ function createMetricsMiddleware(basePath = "/api") {
|
|
|
35290
35283
|
* When a token is configured it is required, and compared in constant time — a
|
|
35291
35284
|
* timing oracle on a metrics token is a small thing, but it is free to avoid.
|
|
35292
35285
|
*/
|
|
35293
|
-
function createMetricsRoutes(registry, token, history) {
|
|
35286
|
+
function createMetricsRoutes(registry, token, history, historyBatch) {
|
|
35294
35287
|
const router = new Hono();
|
|
35295
35288
|
const authorized = (c) => {
|
|
35296
35289
|
if (!token) return true;
|
|
@@ -35302,6 +35295,52 @@ function createMetricsRoutes(registry, token, history) {
|
|
|
35302
35295
|
return c.text(registry.render(), 200, { "Content-Type": "text/plain; version=0.0.4; charset=utf-8" });
|
|
35303
35296
|
});
|
|
35304
35297
|
/**
|
|
35298
|
+
* Several series over a window, bucketed in SQL.
|
|
35299
|
+
*
|
|
35300
|
+
* Registered before `/history` only for readability; Hono matches the
|
|
35301
|
+
* exact path either way. The overview reads ten series at once, and a
|
|
35302
|
+
* week at one-minute resolution is 10,080 points a series — so the window
|
|
35303
|
+
* is bucketed where the rows are, not in the browser.
|
|
35304
|
+
*/
|
|
35305
|
+
router.get("/history/batch", async (c) => {
|
|
35306
|
+
if (!authorized(c)) return c.text("Unauthorized", 401);
|
|
35307
|
+
if (!historyBatch) return c.json({
|
|
35308
|
+
error: "history_unavailable",
|
|
35309
|
+
message: "This deployment stores no metrics history. It needs a SQL driver and a role that provisions schema."
|
|
35310
|
+
}, 501);
|
|
35311
|
+
const names = (c.req.query("series") ?? "").split(",").map((s) => s.trim()).filter(Boolean);
|
|
35312
|
+
if (names.length === 0 || names.length > 16) return c.json({
|
|
35313
|
+
error: "invalid_series",
|
|
35314
|
+
message: `Name between 1 and 16 series, comma-separated.`
|
|
35315
|
+
}, 400);
|
|
35316
|
+
const series = [];
|
|
35317
|
+
for (const name of names) {
|
|
35318
|
+
const known = METRIC_SERIES.find((s) => s === name);
|
|
35319
|
+
if (!known) return c.json({
|
|
35320
|
+
error: "unknown_series",
|
|
35321
|
+
message: `Unknown series "${name}". Available: ${METRIC_SERIES.join(", ")}.`
|
|
35322
|
+
}, 400);
|
|
35323
|
+
series.push(known);
|
|
35324
|
+
}
|
|
35325
|
+
const minutesRaw = c.req.query("minutes") ?? "60";
|
|
35326
|
+
const minutes = Number(minutesRaw);
|
|
35327
|
+
if (!Number.isInteger(minutes) || minutes < 1 || minutes > 20160) return c.json({
|
|
35328
|
+
error: "invalid_minutes",
|
|
35329
|
+
message: `minutes must be a whole number from 1 to ${MAX_HISTORY_MINUTES}.`
|
|
35330
|
+
}, 400);
|
|
35331
|
+
const bucketRaw = Number(c.req.query("bucket") ?? "1");
|
|
35332
|
+
const bucket = HISTORY_BUCKETS.find((b) => b === bucketRaw);
|
|
35333
|
+
if (bucket === void 0) return c.json({
|
|
35334
|
+
error: "invalid_bucket",
|
|
35335
|
+
message: `bucket must be one of ${HISTORY_BUCKETS.join(", ")} (minutes).`
|
|
35336
|
+
}, 400);
|
|
35337
|
+
return c.json({
|
|
35338
|
+
minutes,
|
|
35339
|
+
bucket,
|
|
35340
|
+
series: await historyBatch(series, minutes, bucket)
|
|
35341
|
+
});
|
|
35342
|
+
});
|
|
35343
|
+
/**
|
|
35305
35344
|
* The same numbers, over time.
|
|
35306
35345
|
*
|
|
35307
35346
|
* Deliberately part of the runtime rather than of any console: a
|
|
@@ -36528,8 +36567,10 @@ async function bootFromBundle(options = {}) {
|
|
|
36528
36567
|
}));
|
|
36529
36568
|
recordDatabasePools(metrics.registry, meteredSources);
|
|
36530
36569
|
stopDatabaseProbe = startDatabaseProbe(metrics.registry, meteredSources);
|
|
36570
|
+
const registry = metrics.registry;
|
|
36571
|
+
backend.metricsHistory?.countRequestsFrom(() => registry.requestTotalsBySurface());
|
|
36531
36572
|
recordRealtimeCounts(metrics.registry, backend.realtimeService);
|
|
36532
|
-
app.route("/metrics", createMetricsRoutes(metrics.registry, env.REBASE_METRICS_TOKEN, backend.metricsHistory?.read));
|
|
36573
|
+
app.route("/metrics", createMetricsRoutes(metrics.registry, env.REBASE_METRICS_TOKEN, backend.metricsHistory?.read, backend.metricsHistory?.readBatch));
|
|
36533
36574
|
}
|
|
36534
36575
|
if (env.REBASE_SERVE_STATIC) {
|
|
36535
36576
|
for (const shadowed of staticAppsShadowedByApi(bundle.staticApps, env.REBASE_BASE_PATH)) logger.error(`Static app at ${shadowed.path} is under the API's base path ${env.REBASE_BASE_PATH} (REBASE_BASE_PATH), so it is never served. Move the app in rebase.json, or the API with REBASE_BASE_PATH.`);
|
|
@@ -36918,6 +36959,6 @@ function warnOnUnusableBundleShape(bundle) {
|
|
|
36918
36959
|
logger.warn(`This bundle declares tables at "${bundle.manifest.entry.tables}", but that directory did not resolve, so no tables were loaded and none will be created. Rebuild with \`rebase build\`.`);
|
|
36919
36960
|
}
|
|
36920
36961
|
//#endregion
|
|
36921
|
-
export { ACCOUNT_SCOPED_STORAGE_BASES, ApiError, BATCH_REF_KEY, BlockedUrlError, BundleError, CONCURRENT_DDL_SQLSTATES, CORS_EXPOSED_HEADERS, CronScheduler, DATABASE_UNAVAILABLE_MESSAGE, DATA_SCOPE_VOCABULARY, DEFAULT_DRIVER_ID, DEFAULT_MAX_FILE_SIZE, DEFAULT_REFERRER_POLICY, DEFAULT_STORAGE_ID, DOCUMENT_MIME_TYPES, DefaultDriverRegistry, DefaultStorageRegistry, ETAG_HEADER, FIELD_OPERATORS, GCSStorageController, IF_MATCH_HEADER, IMAGE_MIME_TYPES, LocalStorageController, MCP_APP_URI, MCP_VIEW_TOOLS, McpToolError, MetricsRegistry, ObjectTooLargeError, PermanentJobError, RUNTIME_BUNDLE_MOUNT, RUNTIME_DEFAULT_MAX_BODY_SIZE, RUNTIME_HEALTH_PATH, RUNTIME_LIVENESS_PATH, RUNTIME_MIN_TERMINATION_GRACE_SECONDS, RUNTIME_PRESTOP_DRAIN_SECONDS, RUNTIME_PROBE_PATHS, RUNTIME_STARTUP_BUDGET_SECONDS, RawHtml, S3StorageController, SHOW_APP_CODE_GUIDE, SHOW_APP_ESSENTIALS, SHOW_APP_GUIDE_TOOL, SMTPEmailService, SchemaLoadError, StoragePolicyError, TOPOLOGY_ENV_VARS, TableRegistry, TransformCache, TusHandler, UPLOAD_COLUMN_FIELD, UPLOAD_TABLE_FIELD, UnknownStorageSourceError, WEBHOOK_DELIVERY_TASK, WebhookDispatcher, _resetRebaseMock, _setRebaseMock, accessModelFromAuthTable, activeDevEmailSink, assertAllowedOutboundUrl, assertDistinctSuffixes, assertEmailLinkBases, assertEveryKindBindable, assertFieldOpsValid, assertIfMatch, assertNestedWriteAllowed, assertNoFieldOpsOnCreate, assertNoUserUpsert, assertQueryFieldsReadable, assertUploadWithinColumnLimits, assertUploadWithinPathLimits, assertUserCreationBodyValid, assertWriteRequestValid, authJwt, authRoles, authUid, backupStorageFromEnv, blockedAddressReason, bootFromBundle, callerScopes, classifySurface, cleanupDevPortFile, clearActiveDevEmailSink, col, compileLoadedSchema, compileSchemaDefs, compileStoragePolicies, configureAccess, configureJwt, createAppleProvider, createBackupLinkRoutes, createBackupRoutes, createBitbucketProvider, createBuiltinAuthAdapter, createCallContext, createContractRoutes, createCronRoutes, createCronStore, createCustomAuthAdapter, createDdlBootstrapper, createDevEmailSink, createDiscordProvider, createEmailService, createFacebookProvider, createFunctionRoutes, createGitHubProvider, createGitLabProvider, createGoogleProvider, createHistoryRoutes, createJobQueue, createJobStore, createJwksRoutes, createJwtService, createLinkedinProvider, createMetricsMiddleware, createMetricsRoutes, createMicrosoftProvider, createRebaseBackend, createRlsAudit, createSlackProvider, createSourceBundle, createSpotifyProvider, createStorageController, createStorageRoutes, createTwitterProvider, createUnconfiguredEmailService, createUploadConstraintResolver, createUploadPathResolver, createUserThroughAuthTable, createWebPushSender, decideImpersonation, declareCrons, declaredErrorAnswer, declaredUniqueTargets, defaultBackoff, defineAuthTable, defineCron, defineFunction, defineTable, defineView, describeMismatch, devEmailSinkFor, drainBackgroundWork, envSuffixForKey, errorHandler, escapeHtml, extractLinks, extractUserFromToken, fileTokenAuth, generateSecurePassword, generateVapidKeys, getAccessModel, getApiKey, getDriver, getEmailChangeNoticeTemplate, getEmailChangeTemplate, getEmailOtpTemplate, getEmailVerificationTemplate, getEnv, getJwks, getMagicLinkTemplate, getPasswordResetTemplate, getRequestId, getRoles, getSql, getUser, getUserId, getUserInvitationTemplate, getUserProfile, getWelcomeEmailTemplate, hasAsymmetricSigningKey, hasFieldOps, hasRole, hasScope, hashPassword, html, httpMethodToOperation, identityResolved, implicitDeclaration, initializeDataSource, initializeDataSources, initializeRebaseBackend, installShutdownHandlers, installUnhandledRejectionHandler, isAcceptedFile, isAdmin, isApiKeyToken, isAuthAdapter, isAuthTable, isAuthTableDef, isAuthenticated, isConcurrentDdlRace, isDataException, isDatabaseAdapter, isDatabaseUnreachable, isDuplicateObjectRace, isLocalhostOrigin, isNodeRuntime, isSchemaLoadError, isTableDef, isTopologyEnvVar, isTransformableImage, isUncountedPath, isViewDef, json, lazyResource, listBackupObjects, listenWithPortRetry, loadBackendSchema, loadBootEnv, loadBundle, loadBundleProjectExports, loadBundleSchema, loadCronJobsFromDirectory, loadCronJobsWithDiagnostics, loadCrons, loadEnv, loadFunctions, loadFunctionsFromDirectory, loadFunctionsWithDiagnostics, logger, looksLikeFieldOp, mcpAppBaseUri, mcpViewToolInputSchema, oauthCodeFlowSchema, optionalAuth, overridableSecurityHeaders, parseBackupDestination, parseBackupTimestamp, parseFieldOp, parseTransformOptions, pendingBackgroundWork, pgEnum, pkceTokenParams, policy, providerVerifiedEmail, queryTokenAuth, raw, rawQueryLoggingEnabled, readBackupBytes, readBundleManifest, readUploadColumnContext, realtimeSocketPath, rebase, refuseUnhonouredImpersonation, registerDevEmailSink, registerResourceResolver, rel, reportSimulatedContext, requireAdmin, requireAuth, requireDriver, requireEnv, requireRole, requireScope, resolveApiKey, resolveAuthHooks, resolveAuthOptions, resolveBatchRefs, resolveConflictTarget, resolveCorsOrigin, resolveDataSources, resolveDeclaredTables, resolveEmailBranding, resolveEmailLinkBase, resolveEmailOptions, resolveModulePath, resolveRequireAuth, resolveStorageAccessControl, resolveStorageBackend, resolveStorageSources, resourceResolver, resourceResolvers, rowETag, runFromBundle, runtimeKey, safeCompare, schemaDriftRemedy, serveSPA, setDefaultBackend, setLogOutput, showAppArtifactGuide, splitFieldOps, sql, subscriptionIdOf, summarize as summarizeRlsScan, transformImage, tryVerifyOidcIdToken, unbindableKinds, validateApiKey, validateCronExpression, validatePasswordStrength, verifyCredential, verifyOidcIdToken, verifyPassword, versionColumn, versionedMcpAppUri, waitUntil, z };
|
|
36962
|
+
export { ACCOUNT_SCOPED_STORAGE_BASES, ApiError, BATCH_REF_KEY, BlockedUrlError, BundleError, CONCURRENT_DDL_SQLSTATES, CORS_EXPOSED_HEADERS, CronScheduler, DATABASE_UNAVAILABLE_MESSAGE, DATA_SCOPE_VOCABULARY, DEFAULT_DRIVER_ID, DEFAULT_MAX_FILE_SIZE, DEFAULT_REFERRER_POLICY, DEFAULT_STORAGE_ID, DOCUMENT_MIME_TYPES, DefaultDriverRegistry, DefaultStorageRegistry, ETAG_HEADER, FIELD_OPERATORS, GCSStorageController, IF_MATCH_HEADER, IMAGE_MIME_TYPES, LocalStorageController, MCP_APP_URI, MCP_VIEW_TOOLS, McpToolError, MetricsRegistry, ObjectTooLargeError, PermanentJobError, RUNTIME_BUNDLE_MOUNT, RUNTIME_DEFAULT_MAX_BODY_SIZE, RUNTIME_HEALTH_PATH, RUNTIME_LIVENESS_PATH, RUNTIME_MIN_TERMINATION_GRACE_SECONDS, RUNTIME_PRESTOP_DRAIN_SECONDS, RUNTIME_PROBE_PATHS, RUNTIME_STARTUP_BUDGET_SECONDS, RawHtml, S3StorageController, SHOW_APP_CODE_GUIDE, SHOW_APP_ESSENTIALS, SHOW_APP_GUIDE_TOOL, SMTPEmailService, SchemaLoadError, StoragePolicyError, TOPOLOGY_ENV_VARS, TableRegistry, TransformCache, TusHandler, UPLOAD_COLUMN_FIELD, UPLOAD_TABLE_FIELD, UnknownStorageSourceError, WEBHOOK_DELIVERY_TASK, WebhookDispatcher, _resetRebaseMock, _setRebaseMock, accessModelFromAuthTable, activeDevEmailSink, assertAllowedOutboundUrl, assertDistinctSuffixes, assertEmailLinkBases, assertEveryKindBindable, assertFieldOpsValid, assertIfMatch, assertNestedWriteAllowed, assertNoFieldOpsOnCreate, assertNoUserUpsert, assertQueryFieldsReadable, assertUploadWithinColumnLimits, assertUploadWithinPathLimits, assertUserCreationBodyValid, assertWriteRequestValid, authJwt, authRoles, authUid, backupStorageFromEnv, blockedAddressReason, bootFromBundle, callerScopes, classifySurface, cleanupDevPortFile, clearActiveDevEmailSink, col, compileLoadedSchema, compileSchemaDefs, compileStoragePolicies, configureAccess, configureJwt, createAppleProvider, createBackupLinkRoutes, createBackupRoutes, createBitbucketProvider, createBuiltinAuthAdapter, createCallContext, createContractRoutes, createCronRoutes, createCronStore, createCustomAuthAdapter, createDdlBootstrapper, createDevEmailSink, createDiscordProvider, createEmailService, createFacebookProvider, createFunctionRoutes, createGitHubProvider, createGitLabProvider, createGoogleProvider, createHistoryRoutes, createJobQueue, createJobStore, createJwksRoutes, createJwtService, createLinkedinProvider, createMetricsMiddleware, createMetricsRoutes, createMicrosoftProvider, createRebaseBackend, createRlsAudit, createSlackProvider, createSourceBundle, createSpotifyProvider, createStorageController, createStorageRoutes, createTwitterProvider, createUnconfiguredEmailService, createUploadConstraintResolver, createUploadPathResolver, createUserThroughAuthTable, createWebPushSender, decideImpersonation, declareCrons, declaredErrorAnswer, declaredUniqueTargets, defaultBackoff, defineAuthTable, defineCron, defineFunction, defineTable, defineView, describeMismatch, devEmailSinkFor, drainBackgroundWork, envSuffixForKey, errorHandler, escapeHtml, extractLinks, extractUserFromToken, fileTokenAuth, generateSecurePassword, generateVapidKeys, getAccessModel, getApiKey, getDriver, getEmailChangeNoticeTemplate, getEmailChangeTemplate, getEmailOtpTemplate, getEmailVerificationTemplate, getEnv, getJwks, getMagicLinkTemplate, getPasswordResetTemplate, getRequestId, getRoles, getSql, getUser, getUserId, getUserInvitationTemplate, getUserProfile, getWelcomeEmailTemplate, hasAsymmetricSigningKey, hasFieldOps, hasRole, hasScope, hashPassword, html, httpMethodToOperation, identityResolved, implicitDeclaration, initializeDataSource, initializeDataSources, initializeRebaseBackend, installShutdownHandlers, installUnhandledRejectionHandler, isAcceptedFile, isAdmin, isApiKeyToken, isAuthAdapter, isAuthTable, isAuthTableDef, isAuthenticated, isConcurrentDdlRace, isDataException, isDatabaseAdapter, isDatabaseUnreachable, isDuplicateObjectRace, isErrorStatus, isLocalhostOrigin, isNodeRuntime, isSchemaLoadError, isTableDef, isTopologyEnvVar, isTransformableImage, isUncountedPath, isViewDef, json, lazyResource, listBackupObjects, listenWithPortRetry, loadBackendSchema, loadBootEnv, loadBundle, loadBundleProjectExports, loadBundleSchema, loadCronJobsFromDirectory, loadCronJobsWithDiagnostics, loadCrons, loadEnv, loadFunctions, loadFunctionsFromDirectory, loadFunctionsWithDiagnostics, logger, looksLikeFieldOp, mcpAppBaseUri, mcpViewToolInputSchema, oauthCodeFlowSchema, optionalAuth, overridableSecurityHeaders, parseBackupDestination, parseBackupTimestamp, parseFieldOp, parseTransformOptions, pendingBackgroundWork, pgEnum, pkceTokenParams, policy, providerVerifiedEmail, queryTokenAuth, raw, rawQueryLoggingEnabled, readBackupBytes, readBundleManifest, readUploadColumnContext, realtimeSocketPath, rebase, refuseUnhonouredImpersonation, registerDevEmailSink, registerResourceResolver, rel, reportSimulatedContext, requireAdmin, requireAuth, requireDriver, requireEnv, requireRole, requireScope, resolveApiKey, resolveAuthHooks, resolveAuthOptions, resolveBatchRefs, resolveConflictTarget, resolveCorsOrigin, resolveDataSources, resolveDeclaredTables, resolveEmailBranding, resolveEmailLinkBase, resolveEmailOptions, resolveModulePath, resolveRequireAuth, resolveStorageAccessControl, resolveStorageBackend, resolveStorageSources, resourceResolver, resourceResolvers, rowETag, runFromBundle, runtimeKey, safeCompare, schemaDriftRemedy, serveSPA, setDefaultBackend, setLogOutput, showAppArtifactGuide, splitFieldOps, sql, subscriptionIdOf, summarize as summarizeRlsScan, transformImage, tryVerifyOidcIdToken, unbindableKinds, validateApiKey, validateCronExpression, validatePasswordStrength, verifyCredential, verifyOidcIdToken, verifyPassword, versionColumn, versionedMcpAppUri, waitUntil, z };
|
|
36922
36963
|
|
|
36923
36964
|
//# sourceMappingURL=index.es.js.map
|