@rebasepro/server 0.29.1 → 0.29.2
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-Crdllv9A.js → GCSStorageController-Bgrcn6Uh.js} +2 -2
- package/dist/{GCSStorageController-Crdllv9A.js.map → GCSStorageController-Bgrcn6Uh.js.map} +1 -1
- package/dist/{S3StorageController-C7x2Yaiz.js → S3StorageController-B27ibWz8.js} +2 -2
- package/dist/{S3StorageController-C7x2Yaiz.js.map → S3StorageController-B27ibWz8.js.map} +1 -1
- package/dist/{access-BNZBi9yL.js → access-BihomvkO.js} +5 -5
- package/dist/access-BihomvkO.js.map +1 -0
- package/dist/api/rest/api-generator.d.ts +9 -0
- package/dist/api/rest/auth-collection-writes.d.ts +2 -2
- package/dist/api/rest/field-access-query.d.ts +1 -1
- package/dist/api/rest/query-parser.d.ts +29 -5
- package/dist/api/types.d.ts +9 -0
- package/dist/{ast-schema-editor-D56sGr0L.js → ast-schema-editor-C0n8s_Z6.js} +2 -2
- package/dist/{ast-schema-editor-D56sGr0L.js.map → ast-schema-editor-C0n8s_Z6.js.map} +1 -1
- package/dist/auth/user-profile.d.ts +29 -0
- package/dist/{auth-CV82Wvq1.js → auth-C-RJT4VO.js} +7 -7
- package/dist/{auth-CV82Wvq1.js.map → auth-C-RJT4VO.js.map} +1 -1
- package/dist/auth_adapter-HFv5axIT.js.map +1 -1
- package/dist/{backup-BiAhhHKV.js → backup-D-ds7wml.js} +6 -6
- package/dist/{backup-BiAhhHKV.js.map → backup-D-ds7wml.js.map} +1 -1
- package/dist/boot/env.d.ts +4 -2
- package/dist/boot/options.d.ts +4 -2
- package/dist/boot/resource-adapters.d.ts +1 -1
- package/dist/{branch-routes-DqKPRFtb.js → branch-routes-ClQrYUyP.js} +2 -2
- package/dist/{branch-routes-DqKPRFtb.js.map → branch-routes-ClQrYUyP.js.map} +1 -1
- package/dist/{contract-routes-AD3hi7ad.js → contract-routes-BGXR9D5C.js} +2 -2
- package/dist/contract-routes-BGXR9D5C.js.map +1 -0
- package/dist/{cron-loader-D1zNARNU.js → cron-loader-BN24T-O1.js} +2 -2
- package/dist/{cron-loader-D1zNARNU.js.map → cron-loader-BN24T-O1.js.map} +1 -1
- package/dist/{cron-routes-BtB2VVTk.js → cron-routes-CjCWNcX6.js} +3 -3
- package/dist/{cron-routes-BtB2VVTk.js.map → cron-routes-CjCWNcX6.js.map} +1 -1
- package/dist/{cron-scheduler-DEKiJh_G.js → cron-scheduler-CM08t50L.js} +2 -2
- package/dist/{cron-scheduler-DEKiJh_G.js.map → cron-scheduler-CM08t50L.js.map} +1 -1
- package/dist/{cron-store-DcaNQIAr.js → cron-store-iv5yn27j.js} +3 -3
- package/dist/{cron-store-DcaNQIAr.js.map → cron-store-iv5yn27j.js.map} +1 -1
- package/dist/data_driver-D0mg1Y_x.js.map +1 -1
- package/dist/dist-2-J8_MGi.js +19359 -0
- package/dist/dist-2-J8_MGi.js.map +1 -0
- package/dist/dynamic-import-Bi3XK5y-.js.map +1 -1
- package/dist/{field-access-BHi-4uSo.js → field-access-BDyTY2D4.js} +2 -2
- package/dist/{field-access-BHi-4uSo.js.map → field-access-BDyTY2D4.js.map} +1 -1
- package/dist/{filter-dialect-Cbzt7lO9.js → filter-dialect-CgeSm3Kl.js} +17 -2
- package/dist/filter-dialect-CgeSm3Kl.js.map +1 -0
- package/dist/{function-routes-CdtIKSV8.js → function-routes-mSmsW34_.js} +23 -2
- package/dist/function-routes-mSmsW34_.js.map +1 -0
- package/dist/functions/context.d.ts +37 -0
- package/dist/functions/index.d.ts +2 -2
- package/dist/functions/index.js +22 -1
- package/dist/functions/index.js.map +1 -1
- package/dist/history/history-routes.d.ts +2 -1
- package/dist/{history-recorder-C8FBGUa9.js → history-recorder-BV34l2qf.js} +3 -3
- package/dist/{history-recorder-C8FBGUa9.js.map → history-recorder-BV34l2qf.js.map} +1 -1
- package/dist/{history-store-DL-ydprp.js → history-store-Dbyvv1KZ.js} +3 -3
- package/dist/{history-store-DL-ydprp.js.map → history-store-Dbyvv1KZ.js.map} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.es.js +280 -100
- package/dist/index.es.js.map +1 -1
- package/dist/init/health.d.ts +1 -1
- package/dist/init/surfaces.d.ts +2 -0
- package/dist/{internal-tables-D2IdQlUW.js → internal-tables-BmN-5QQr.js} +3 -1
- package/dist/internal-tables-BmN-5QQr.js.map +1 -0
- package/dist/jobs/job-store.d.ts +3 -1
- package/dist/{jobs-DK9ra01Y.js → jobs-D9RBf3Yb.js} +4 -4
- package/dist/jobs-D9RBf3Yb.js.map +1 -0
- package/dist/{jwt-iiP_ZZzR.js → jwt-C3dwSo1U.js} +2 -2
- package/dist/{jwt-iiP_ZZzR.js.map → jwt-C3dwSo1U.js.map} +1 -1
- package/dist/{keys-krxEEEj4.js → keys-DmK8vGhX.js} +2 -2
- package/dist/{keys-krxEEEj4.js.map → keys-DmK8vGhX.js.map} +1 -1
- package/dist/mcp/mcp-routes.d.ts +1 -1
- package/dist/mcp/mcp-view.d.ts +7 -0
- package/dist/mcp/oauth-store.d.ts +3 -1
- package/dist/{offline-Cy6woFyt-CbjOQGD1.js → offline-B6J1YUWF-CEJLzvJw.js} +71 -11
- package/dist/offline-B6J1YUWF-CEJLzvJw.js.map +1 -0
- package/dist/{offline-store-C2Sy3Kwl-C8KIwabG.js → offline-store-B7F5mimt-Bh5f-dWu.js} +55 -10
- package/dist/offline-store-B7F5mimt-Bh5f-dWu.js.map +1 -0
- package/dist/{openapi-generator-Cn-ytCH8.js → openapi-generator-1s5sWUnN.js} +3 -3
- package/dist/openapi-generator-1s5sWUnN.js.map +1 -0
- package/dist/{query-parser-CTiEg64k.js → query-parser-mFFiGEFV.js} +120 -29
- package/dist/query-parser-mFFiGEFV.js.map +1 -0
- package/dist/{rls-simulator-routes-5nbuDwWR.js → rls-simulator-routes-C7C3f57E.js} +3 -3
- package/dist/{rls-simulator-routes-5nbuDwWR.js.map → rls-simulator-routes-C7C3f57E.js.map} +1 -1
- package/dist/{schema-editor-routes-Bi8S1gn7.js → schema-editor-routes-BFRh4mHu.js} +3 -3
- package/dist/{schema-editor-routes-Bi8S1gn7.js.map → schema-editor-routes-BFRh4mHu.js.map} +1 -1
- package/dist/{sql-export-routes-XkcXbxw5.js → sql-export-routes-9nXTfyP_.js} +2 -2
- package/dist/{sql-export-routes-XkcXbxw5.js.map → sql-export-routes-9nXTfyP_.js.map} +1 -1
- package/dist/{sql-rows-C6GEc2oE.js → sql-rows-CIThkmuF.js} +2 -2
- package/dist/sql-rows-CIThkmuF.js.map +1 -0
- package/dist/{src-0nCWajy7.js → src-CE9LRXDq.js} +20 -4
- package/dist/src-CE9LRXDq.js.map +1 -0
- package/dist/topics/runtime.d.ts +1 -1
- package/dist/user-profile-C1UkoaJe.js +46 -0
- package/dist/user-profile-C1UkoaJe.js.map +1 -0
- package/package.json +5 -5
- package/dist/access-BNZBi9yL.js.map +0 -1
- package/dist/contract-routes-AD3hi7ad.js.map +0 -1
- package/dist/dist-BpP9FwVH.js +0 -19359
- package/dist/dist-BpP9FwVH.js.map +0 -1
- package/dist/filter-dialect-Cbzt7lO9.js.map +0 -1
- package/dist/function-routes-CdtIKSV8.js.map +0 -1
- package/dist/internal-tables-D2IdQlUW.js.map +0 -1
- package/dist/jobs-DK9ra01Y.js.map +0 -1
- package/dist/offline-Cy6woFyt-CbjOQGD1.js.map +0 -1
- package/dist/offline-store-C2Sy3Kwl-C8KIwabG.js.map +0 -1
- package/dist/openapi-generator-Cn-ytCH8.js.map +0 -1
- package/dist/query-parser-CTiEg64k.js.map +0 -1
- package/dist/sql-rows-C6GEc2oE.js.map +0 -1
- package/dist/src-0nCWajy7.js.map +0 -1
package/dist/index.es.js
CHANGED
|
@@ -4,46 +4,46 @@ globalThis.process ??= __rebaseProcess;
|
|
|
4
4
|
__rebaseCreateRequire(import.meta.url);
|
|
5
5
|
import { r as __require, t as __commonJSMin } from "./rolldown-runtime-dW7B1o5h.js";
|
|
6
6
|
import { a as RebaseClientError, i as RebaseApiError, n as MAX_LIST_LIMIT, o as isUnsupported, s as unsupportedMethod } from "./data_driver-D0mg1Y_x.js";
|
|
7
|
-
import { C as isFieldOperation, T as EntityRelation, _ as normalizeOrderBy, b as BATCH_REF_KEY, 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, x as FIELD_OPERATORS, y as withRelationReferencesOnly } from "./filter-dialect-
|
|
8
|
-
import { A as DEFAULT_STORAGE_SOURCE_KEY, B as RLS_ROLES_SQL, C as declaredQueueConsumers, D as resourceToStorageSource, E as resourceToDataSource, F as resourceEnvSuffix, G as isPostgresCollectionConfig, I as resourceKeyOf, J as getDataSourceCapabilities, L as resourceKind, M as DEFAULT_RESOURCE_KEY, N as buildResourceGraph, O as setQueueRuntime, P as resolveResourceRefs, R as resourceKinds, T as declaredSubscriptions, U as getCollectionDataPath, V as RLS_UID_SQL, W as getDeclaredSubcollections, Y as ALL_WHERE_FILTER_OPS, b as summarizeScopes, c as intersectScopes, g as scopeGrantsAny, h as scopeGrants, j as storageEnvSuffix, k as setTopicRuntime,
|
|
7
|
+
import { C as isFieldOperation, T as EntityRelation, _ as normalizeOrderBy, b as BATCH_REF_KEY, 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, x as FIELD_OPERATORS, y as withRelationReferencesOnly } from "./filter-dialect-CgeSm3Kl.js";
|
|
8
|
+
import { A as DEFAULT_STORAGE_SOURCE_KEY, B as RLS_ROLES_SQL, C as declaredQueueConsumers, D as resourceToStorageSource, E as resourceToDataSource, F as resourceEnvSuffix, G as isPostgresCollectionConfig, I as resourceKeyOf, J as getDataSourceCapabilities, L as resourceKind, M as DEFAULT_RESOURCE_KEY, N as buildResourceGraph, O as setQueueRuntime, P as resolveResourceRefs, R as resourceKinds, T as declaredSubscriptions, U as getCollectionDataPath, V as RLS_UID_SQL, W as getDeclaredSubcollections, Y as ALL_WHERE_FILTER_OPS, b as summarizeScopes, c as intersectScopes, g as scopeGrantsAny, h as scopeGrants, j as storageEnvSuffix, k as setTopicRuntime, p as parseScope, q as DEFAULT_DATA_SOURCE_KEY, rt as sortKeyToString, s as hasAdminRole, v as scopesForRoles, w as declaredRlsPolicyShape, z as RLS_JWT_SQL } from "./src-CE9LRXDq.js";
|
|
9
9
|
import { a as nestCollectionPatchPaths, c as ADMIN_PROPERTY_KEYS, i as isCollectionPatch, n as collectionPatchProblems, r as diffCollections, s as ADMIN_COLLECTION_KEYS, t as applyCollectionPatch } from "./collection_patch-BRu-BvDv.js";
|
|
10
|
-
import { a as restoresSoftDeletedRow, c as hydrateRegExp, d as hasForeignKeyOnTarget, f as isManyToMany, l as INCLUDE_COUNT_KEY, n as buildCollectionSchema, o as softDeleteFieldOf, r as idPropertyEntry, s as buildTenantSecurityRule, t as buildCollectionInputSchema, u as JUNCTION_PIVOT_KEY } from "./openapi-generator-
|
|
10
|
+
import { a as restoresSoftDeletedRow, c as hydrateRegExp, d as hasForeignKeyOnTarget, f as isManyToMany, l as INCLUDE_COUNT_KEY, n as buildCollectionSchema, o as softDeleteFieldOf, r as idPropertyEntry, s as buildTenantSecurityRule, t as buildCollectionInputSchema, u as JUNCTION_PIVOT_KEY } from "./openapi-generator-1s5sWUnN.js";
|
|
11
11
|
import { n as isAnonymousUid, r as policy } from "./policy-PdzX-Opd.js";
|
|
12
12
|
import { n as isSQLAdmin, r as isSchemaEditingAdmin } from "./backend-CaG_Jyso.js";
|
|
13
|
-
import { a as parseEnvBoolean, i as validateCronExpression, t as CronScheduler } from "./cron-scheduler-
|
|
13
|
+
import { a as parseEnvBoolean, i as validateCronExpression, t as CronScheduler } from "./cron-scheduler-CM08t50L.js";
|
|
14
14
|
import { c as simulationHeaders, t as AUTH_FLOW_HEADER } from "./auth_adapter-HFv5axIT.js";
|
|
15
15
|
import { n as isValidAppHost, r as reservedPrefixFor, t as SCHEMA_VERSION_HEADER } from "./project_manifest-R6y_KHms.js";
|
|
16
|
-
import { i as serializeCollections, n as createContractRoutes, r as computeSchemaVersion } from "./contract-routes-
|
|
17
|
-
import { A as isPublicObjectGrant, C as queryTokenAuth, D as userFromToken, E as requireAuth, F as decideImpersonation, G as isApiKeyToken, H as createApiKeyPreAuth, I as refuseUnhonouredImpersonation, J as extractBearerToken, K as resolveApiKey, M as storageObjectOfPath, N as storageRequestWildcard, O as PUBLIC_OBJECT_PRINCIPAL, Q as supportsRlsScoping, S as publicObjectAuth, T as requireAdmin, U as createFunctionScopeGuard, V as reportSimulatedContext, W as createTusScopeGuard, X as SERVICE_IDENTITY, Y as safeCompare, Z as scopeDataDriver, _ as createAuthMiddleware, at as httpMethodToOperation, b as fileTokenAuth, c as configureAccess, ct as isPublicStoragePath, d as keyOwnerResolverFor, et as isAccessTokenRevoked, f as processAccessControl, g as setDefaultAccessControl, h as requireScopeByMethod, it as refuseSimulatedWrite, j as requestedStorageObject, k as isDownloadTokenGrant, l as getAccessModel, lt as storageObjectPath, m as requireScope, n as accessModelFromCollections, ot as PUBLIC_STORAGE_PREFIX, q as validateApiKey, r as accessOf, s as callerScopes, st as isPublicStorageKey, u as hasScope, v as createRequireAuth, w as refuse$1, x as optionalAuth, y as extractUserFromToken } from "./access-
|
|
18
|
-
import { a as
|
|
16
|
+
import { i as serializeCollections, n as createContractRoutes, r as computeSchemaVersion } from "./contract-routes-BGXR9D5C.js";
|
|
17
|
+
import { A as isPublicObjectGrant, C as queryTokenAuth, D as userFromToken, E as requireAuth, F as decideImpersonation, G as isApiKeyToken, H as createApiKeyPreAuth, I as refuseUnhonouredImpersonation, J as extractBearerToken, K as resolveApiKey, M as storageObjectOfPath, N as storageRequestWildcard, O as PUBLIC_OBJECT_PRINCIPAL, Q as supportsRlsScoping, S as publicObjectAuth, T as requireAdmin, U as createFunctionScopeGuard, V as reportSimulatedContext, W as createTusScopeGuard, X as SERVICE_IDENTITY, Y as safeCompare, Z as scopeDataDriver, _ as createAuthMiddleware, at as httpMethodToOperation, b as fileTokenAuth, c as configureAccess, ct as isPublicStoragePath, d as keyOwnerResolverFor, et as isAccessTokenRevoked, f as processAccessControl, g as setDefaultAccessControl, h as requireScopeByMethod, it as refuseSimulatedWrite, j as requestedStorageObject, k as isDownloadTokenGrant, l as getAccessModel, lt as storageObjectPath, m as requireScope, n as accessModelFromCollections, ot as PUBLIC_STORAGE_PREFIX, q as validateApiKey, r as accessOf, s as callerScopes, st as isPublicStorageKey, u as hasScope, v as createRequireAuth, w as refuse$1, x as optionalAuth, y as extractUserFromToken } from "./access-BihomvkO.js";
|
|
18
|
+
import { a as parseWriteFilter, c as assertQueryFieldsReadable, d as cursorToStartAfter, f as decodeCursor$1, h as toDriverAggregateGroup, i as parseQueryOptions, l as assertReadableFields, m as toDriverAggregate, n as parseAggregateSelect, o as resolveListLimitParam, p as reconcileCursorOrder, r as parseGroupBy, s as assertNoHiddenAggregateNames, t as orderByEntriesToTuples, u as requestViewer } from "./query-parser-mFFiGEFV.js";
|
|
19
19
|
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";
|
|
20
20
|
import { n as suggestNearMiss, r as toSnakeCase } from "./strings.es-B7QLnHh2.js";
|
|
21
|
-
import { a as restrictedFieldNames, c as getTableName, d as relationDeclaringProperty, f as resolveCollectionRelations, l as isJunctionBackedRelation, m as toWireKey, n as canReadField, o as fieldKeyForColumn, p as resolveRelation, r as canWriteField, s as findRelation, t as apiHiddenFieldNames } from "./field-access-
|
|
22
|
-
import { c as createTransport, d as parseRebaseJson, h as unref, l as defaultCodeForStatus, m as withETag, o as createCollectionClient, p as etagOf, r as SDKQueryBuilder, u as invalidBulkBody } from "./offline-store-
|
|
23
|
-
import { $ as getEmailChangeNoticeTemplate, A as createDataRateLimitCheck, B as registerDevEmailSink, C as createJwksRoutes, D as AUTH_CONFIG_LIMIT, E as isBootstrapWindowOpen, F as activeDevEmailSink, G as validatePasswordStrength, H as createEmailService, I as clearActiveDevEmailSink, J as createAdapterAuthMiddleware, K as verifyPassword, L as createDevEmailSink, M as createRateLimiter, N as setSharedRateLimitStore, O as DEFAULT_FUNCTIONS_ANONYMOUS_LIMIT, P as MemoryRateLimitStore, Q as resolveEmailLinkBase, R as devEmailSinkFor, S as createApiKeyStore, T as configureUserPicking, U as resolveAuthHooks, V as SMTPEmailService, W as hashPassword, X as generateSecurePassword, Y as completeUserCreation, Z as assertEmailLinkBases, _ as oauthCodeFlowSchema, a as createBitbucketProvider, at as getUserInvitationTemplate, b as createApiKeyRoutes, c as createTwitterProvider, ct as RawHtml, d as createMicrosoftProvider, dt as raw, et as getEmailChangeTemplate, f as tryVerifyOidcIdToken, ft as createSqlRateLimitStore, g as createGoogleProvider, h as createLinkedinProvider, i as createSlackProvider, it as getPasswordResetTemplate, j as createDataRateLimiter, k as createAuthLimiters, l as createFacebookProvider, lt as escapeHtml, m as createGitHubProvider, mt as securityRuleToConditions, n as createCustomAuthAdapter, nt as getEmailVerificationTemplate, o as createGitLabProvider, ot as getWelcomeEmailTemplate, p as verifyOidcIdToken, pt as resolveRateLimitStoreKind, q as adapterRefusal, r as createSpotifyProvider, rt as getMagicLinkTemplate, s as createDiscordProvider, st as resolveEmailBranding, tt as getEmailOtpTemplate, u as createAppleProvider, ut as html, v as pkceTokenParams, w as createBuiltinAuthAdapter, x as createPersonalKeyRoutes, y as providerVerifiedEmail, z as extractLinks } from "./auth-
|
|
24
|
-
import "./resumable-upload-threshold-CKv-Ry0l.js";
|
|
25
|
-
import { i as revokeInternalTableSql, t as REBASE_INTERNAL_TABLES } from "./internal-tables-D2IdQlUW.js";
|
|
21
|
+
import { a as restrictedFieldNames, c as getTableName, d as relationDeclaringProperty, f as resolveCollectionRelations, l as isJunctionBackedRelation, m as toWireKey, n as canReadField, o as fieldKeyForColumn, p as resolveRelation, r as canWriteField, s as findRelation, t as apiHiddenFieldNames } from "./field-access-BDyTY2D4.js";
|
|
22
|
+
import { c as createTransport, d as parseRebaseJson, h as unref, l as defaultCodeForStatus, m as withETag, o as createCollectionClient, p as etagOf, r as SDKQueryBuilder, u as invalidBulkBody } from "./offline-store-B7F5mimt-Bh5f-dWu.js";
|
|
23
|
+
import { $ as getEmailChangeNoticeTemplate, A as createDataRateLimitCheck, B as registerDevEmailSink, C as createJwksRoutes, D as AUTH_CONFIG_LIMIT, E as isBootstrapWindowOpen, F as activeDevEmailSink, G as validatePasswordStrength, H as createEmailService, I as clearActiveDevEmailSink, J as createAdapterAuthMiddleware, K as verifyPassword, L as createDevEmailSink, M as createRateLimiter, N as setSharedRateLimitStore, O as DEFAULT_FUNCTIONS_ANONYMOUS_LIMIT, P as MemoryRateLimitStore, Q as resolveEmailLinkBase, R as devEmailSinkFor, S as createApiKeyStore, T as configureUserPicking, U as resolveAuthHooks, V as SMTPEmailService, W as hashPassword, X as generateSecurePassword, Y as completeUserCreation, Z as assertEmailLinkBases, _ as oauthCodeFlowSchema, a as createBitbucketProvider, at as getUserInvitationTemplate, b as createApiKeyRoutes, c as createTwitterProvider, ct as RawHtml, d as createMicrosoftProvider, dt as raw, et as getEmailChangeTemplate, f as tryVerifyOidcIdToken, ft as createSqlRateLimitStore, g as createGoogleProvider, h as createLinkedinProvider, i as createSlackProvider, it as getPasswordResetTemplate, j as createDataRateLimiter, k as createAuthLimiters, l as createFacebookProvider, lt as escapeHtml, m as createGitHubProvider, mt as securityRuleToConditions, n as createCustomAuthAdapter, nt as getEmailVerificationTemplate, o as createGitLabProvider, ot as getWelcomeEmailTemplate, p as verifyOidcIdToken, pt as resolveRateLimitStoreKind, q as adapterRefusal, r as createSpotifyProvider, rt as getMagicLinkTemplate, s as createDiscordProvider, st as resolveEmailBranding, tt as getEmailOtpTemplate, u as createAppleProvider, ut as html, v as pkceTokenParams, w as createBuiltinAuthAdapter, x as createPersonalKeyRoutes, y as providerVerifiedEmail, z as extractLinks } from "./auth-C-RJT4VO.js";
|
|
26
24
|
import { a as warnDeprecated, n as FilesFailedToLoadError } from "./dynamic-import-Bi3XK5y-.js";
|
|
27
|
-
import
|
|
25
|
+
import "./resumable-upload-threshold-CKv-Ry0l.js";
|
|
26
|
+
import { i as revokeInternalTableSql, t as REBASE_INTERNAL_TABLES } from "./internal-tables-BmN-5QQr.js";
|
|
27
|
+
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, y as verifyJwt } from "./jwt-C3dwSo1U.js";
|
|
28
28
|
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";
|
|
29
|
-
import { t as createCronStore } from "./cron-store-
|
|
29
|
+
import { t as createCronStore } from "./cron-store-iv5yn27j.js";
|
|
30
30
|
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-DpTMfX77.js";
|
|
31
31
|
import { n as HARD_DELETE_QUERY_PARAM, r as parseHardDelete } from "./soft-delete-params-DDRmxT2z.js";
|
|
32
|
-
import { a as canonicalStorageId, i as canonicalStorageBucket, n as InvalidStorageBucketError, o as canonicalStorageKey, r as InvalidStorageKeyError, t as InvalidListOptionsError } from "./keys-
|
|
32
|
+
import { a as canonicalStorageId, i as canonicalStorageBucket, n as InvalidStorageBucketError, o as canonicalStorageKey, r as InvalidStorageKeyError, t as InvalidListOptionsError } from "./keys-DmK8vGhX.js";
|
|
33
33
|
import { t as logMiddleware } from "./logs-routes-08LiyYua.js";
|
|
34
34
|
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-B-psYLaN.js";
|
|
35
|
-
import { t as S3StorageController } from "./S3StorageController-
|
|
36
|
-
import { t as GCSStorageController } from "./GCSStorageController-
|
|
35
|
+
import { t as S3StorageController } from "./S3StorageController-B27ibWz8.js";
|
|
36
|
+
import { t as GCSStorageController } from "./GCSStorageController-Bgrcn6Uh.js";
|
|
37
37
|
import { a as isHonoLike, i as loadFunctionsWithDiagnostics, n as loadFunctions, r as loadFunctionsFromDirectory } from "./function-loader-BzKo2Oiu.js";
|
|
38
|
-
import { a as getDriver, c as getSql, d as
|
|
38
|
+
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-mSmsW34_.js";
|
|
39
39
|
import "./proxy-LUsudeht.js";
|
|
40
40
|
import "./request-timeout-DW2OBWfJ.js";
|
|
41
41
|
import { t as FunctionSelectionError } from "./selection-CRpqKUbt.js";
|
|
42
|
-
import { a as loadCrons, i as loadCronJobsWithDiagnostics, n as declareCrons, r as loadCronJobsFromDirectory } from "./cron-loader-
|
|
43
|
-
import { t as createCronRoutes } from "./cron-routes-
|
|
44
|
-
import { a as listBackupObjects, c as readBackupBytes, i as backupStorageFromEnv, n as createBackupLinkRoutes, o as parseBackupDestination, r as createBackupRoutes, s as parseBackupTimestamp } from "./backup-
|
|
45
|
-
import { a as defaultBackoff, i as createJobQueue, n as createJobStore, o as currentAmbientTransaction, r as PermanentJobError } from "./jobs-
|
|
46
|
-
import { t as METRIC_SERIES } from "./history-store-
|
|
42
|
+
import { a as loadCrons, i as loadCronJobsWithDiagnostics, n as declareCrons, r as loadCronJobsFromDirectory } from "./cron-loader-BN24T-O1.js";
|
|
43
|
+
import { t as createCronRoutes } from "./cron-routes-CjCWNcX6.js";
|
|
44
|
+
import { a as listBackupObjects, c as readBackupBytes, i as backupStorageFromEnv, n as createBackupLinkRoutes, o as parseBackupDestination, r as createBackupRoutes, s as parseBackupTimestamp } from "./backup-D-ds7wml.js";
|
|
45
|
+
import { a as defaultBackoff, i as createJobQueue, n as createJobStore, o as currentAmbientTransaction, r as PermanentJobError } from "./jobs-D9RBf3Yb.js";
|
|
46
|
+
import { t as METRIC_SERIES } from "./history-store-Dbyvv1KZ.js";
|
|
47
47
|
import { createHash, createSign, randomBytes } from "node:crypto";
|
|
48
48
|
import * as path$2 from "node:path";
|
|
49
49
|
import path from "node:path";
|
|
@@ -1389,6 +1389,18 @@ function removeFunctions(o) {
|
|
|
1389
1389
|
}
|
|
1390
1390
|
return o;
|
|
1391
1391
|
}
|
|
1392
|
+
//#endregion
|
|
1393
|
+
//#region ../common/src/util/identity.ts
|
|
1394
|
+
/**
|
|
1395
|
+
* A key part as an address spells it. A day key's value may reach here as a
|
|
1396
|
+
* `Date` — the admin's view model holds dates as `Date`s, parsed from the
|
|
1397
|
+
* `YYYY-MM-DD` the wire carries, which is midnight UTC — and is written back
|
|
1398
|
+
* as that day, never as the `Date`'s text.
|
|
1399
|
+
*/
|
|
1400
|
+
function keyPart(value, key) {
|
|
1401
|
+
if (key.isDay && value instanceof Date && !isNaN(value.getTime())) return value.toISOString().slice(0, 10);
|
|
1402
|
+
return String(value ?? "");
|
|
1403
|
+
}
|
|
1392
1404
|
/**
|
|
1393
1405
|
* Derive a row's address from its key columns.
|
|
1394
1406
|
*
|
|
@@ -1398,8 +1410,8 @@ function removeFunctions(o) {
|
|
|
1398
1410
|
*/
|
|
1399
1411
|
function buildCompositeId(values, primaryKeys) {
|
|
1400
1412
|
if (primaryKeys.length === 0) return "";
|
|
1401
|
-
if (primaryKeys.length === 1) return
|
|
1402
|
-
return primaryKeys.map((pk) =>
|
|
1413
|
+
if (primaryKeys.length === 1) return keyPart(values[primaryKeys[0].fieldName], primaryKeys[0]);
|
|
1414
|
+
return primaryKeys.map((pk) => keyPart(values[pk.fieldName], pk)).join(":::");
|
|
1403
1415
|
}
|
|
1404
1416
|
/**
|
|
1405
1417
|
* The primary keys of a collection, as declared by its properties.
|
|
@@ -1427,7 +1439,8 @@ function getDeclaredPrimaryKeys(collection) {
|
|
|
1427
1439
|
keys.push({
|
|
1428
1440
|
fieldName,
|
|
1429
1441
|
type: prop.type === "number" ? "number" : "string",
|
|
1430
|
-
isUUID: prop.isId === "uuid"
|
|
1442
|
+
isUUID: prop.isId === "uuid",
|
|
1443
|
+
...prop.type === "date" ? { isDay: true } : {}
|
|
1431
1444
|
});
|
|
1432
1445
|
}
|
|
1433
1446
|
return keys;
|
|
@@ -1774,7 +1787,7 @@ function hasPropertyCallbacks(properties, callbackName) {
|
|
|
1774
1787
|
/**
|
|
1775
1788
|
* Recursively process properties to apply field-level hooks.
|
|
1776
1789
|
*/
|
|
1777
|
-
async function processProperties(properties, values, previousValues,
|
|
1790
|
+
async function processProperties(properties, values, previousValues, run, callbackName) {
|
|
1778
1791
|
if (!values || typeof values !== "object") return values;
|
|
1779
1792
|
const result = { ...values };
|
|
1780
1793
|
for (const [key, property] of Object.entries(properties)) {
|
|
@@ -1784,15 +1797,11 @@ async function processProperties(properties, values, previousValues, propsContex
|
|
|
1784
1797
|
if (property.type === "array" && Array.isArray(currentValue)) {
|
|
1785
1798
|
if (property.of && !Array.isArray(property.of)) currentValue = await Promise.all(currentValue.map(async (item, index) => {
|
|
1786
1799
|
const prevItem = Array.isArray(previousValue) ? previousValue[index] : void 0;
|
|
1787
|
-
return (await processProperties({ "_tmp": property.of }, { "_tmp": item }, { "_tmp": prevItem },
|
|
1800
|
+
return (await processProperties({ "_tmp": property.of }, { "_tmp": item }, { "_tmp": prevItem }, run, callbackName))["_tmp"];
|
|
1788
1801
|
}));
|
|
1789
|
-
} else if (property.type === "map" && property.properties && typeof currentValue === "object") currentValue = await processProperties(property.properties, currentValue, previousValue ?? {},
|
|
1802
|
+
} else if (property.type === "map" && property.properties && typeof currentValue === "object") currentValue = await processProperties(property.properties, currentValue, previousValue ?? {}, run, callbackName);
|
|
1790
1803
|
if (property.callbacks?.[callbackName]) {
|
|
1791
|
-
const cbRes = await Promise.resolve(property.callbacks
|
|
1792
|
-
...propsContext,
|
|
1793
|
-
value: currentValue,
|
|
1794
|
-
previousValue
|
|
1795
|
-
}));
|
|
1804
|
+
const cbRes = await Promise.resolve(run(property.callbacks, currentValue, previousValue));
|
|
1796
1805
|
if (cbRes !== void 0) currentValue = cbRes;
|
|
1797
1806
|
}
|
|
1798
1807
|
result[key] = currentValue;
|
|
@@ -1808,14 +1817,25 @@ var buildPropertyCallbacks = (properties) => {
|
|
|
1808
1817
|
const propertyCallbacks = {};
|
|
1809
1818
|
if (hasPropertyCallbacks(properties, "afterRead")) propertyCallbacks.afterRead = async (props) => {
|
|
1810
1819
|
const row = props.row;
|
|
1811
|
-
const processedValues = await processProperties(properties, row, row,
|
|
1820
|
+
const processedValues = await processProperties(properties, row, row, (callbacks, value, previousValue) => {
|
|
1821
|
+
const args = {
|
|
1822
|
+
...props,
|
|
1823
|
+
value,
|
|
1824
|
+
previousValue
|
|
1825
|
+
};
|
|
1826
|
+
return callbacks.afterRead?.(args);
|
|
1827
|
+
}, "afterRead");
|
|
1812
1828
|
return {
|
|
1813
1829
|
...props.row,
|
|
1814
1830
|
...processedValues
|
|
1815
1831
|
};
|
|
1816
1832
|
};
|
|
1817
1833
|
if (hasPropertyCallbacks(properties, "beforeSave")) propertyCallbacks.beforeSave = async (props) => {
|
|
1818
|
-
return await processProperties(properties, props.values, props.previousValues ?? {},
|
|
1834
|
+
return await processProperties(properties, props.values, props.previousValues ?? {}, (callbacks, value, previousValue) => callbacks.beforeSave?.({
|
|
1835
|
+
...props,
|
|
1836
|
+
value,
|
|
1837
|
+
previousValue
|
|
1838
|
+
}), "beforeSave");
|
|
1819
1839
|
};
|
|
1820
1840
|
return Object.keys(propertyCallbacks).length > 0 ? propertyCallbacks : void 0;
|
|
1821
1841
|
};
|
|
@@ -3508,6 +3528,7 @@ var assertBeforeQueryIsPostgresOnly = (collections) => {
|
|
|
3508
3528
|
var QueryBuilder = class {
|
|
3509
3529
|
collection;
|
|
3510
3530
|
params = { where: {} };
|
|
3531
|
+
/** Only `find` and `listen` are read; any {@link CollectionAccessor} is one. */
|
|
3511
3532
|
constructor(collection) {
|
|
3512
3533
|
this.collection = collection;
|
|
3513
3534
|
}
|
|
@@ -3914,7 +3935,10 @@ function createDriverAccessor(driver, slug, getPks = () => [], toViewModel, stor
|
|
|
3914
3935
|
aggregate: driver.restFetchService?.aggregate ? async (params) => {
|
|
3915
3936
|
const limit = (params.groupBy?.length ?? 0) > 0 ? params.limit : void 0;
|
|
3916
3937
|
const rows = await driver.restFetchService.aggregate(storedPath(), {
|
|
3917
|
-
aggregates: params.select.map(
|
|
3938
|
+
aggregates: params.select.map((select) => select.where ? {
|
|
3939
|
+
...toDriverAggregate(select),
|
|
3940
|
+
filter: deserializeFilter(select.where)
|
|
3941
|
+
} : toDriverAggregate(select)),
|
|
3918
3942
|
groupBy: params.groupBy?.map((group) => toDriverAggregateGroup(group)),
|
|
3919
3943
|
filter: params.where ? deserializeFilter(params.where) : void 0,
|
|
3920
3944
|
logical: params.logical,
|
|
@@ -3950,7 +3974,9 @@ function createDriverAccessor(driver, slug, getPks = () => [], toViewModel, stor
|
|
|
3950
3974
|
path: storedPath(),
|
|
3951
3975
|
rows: data,
|
|
3952
3976
|
upsert: options?.upsert,
|
|
3953
|
-
onConflict: options?.onConflict
|
|
3977
|
+
onConflict: options?.onConflict,
|
|
3978
|
+
...options?.where ? { conflictWhere: deserializeFilter(options.where) } : {},
|
|
3979
|
+
...options?.ignoreDuplicates ? { ignoreDuplicates: true } : {}
|
|
3954
3980
|
}), slug, getPks(), toViewModel);
|
|
3955
3981
|
} : void 0,
|
|
3956
3982
|
async update(id, data) {
|
|
@@ -3982,6 +4008,19 @@ function createDriverAccessor(driver, slug, getPks = () => [], toViewModel, stor
|
|
|
3982
4008
|
ids
|
|
3983
4009
|
});
|
|
3984
4010
|
} : void 0,
|
|
4011
|
+
updateWhere: driver.updateWhere ? async (query, data) => {
|
|
4012
|
+
return rowsToEntities(await driver.updateWhere({
|
|
4013
|
+
path: storedPath(),
|
|
4014
|
+
filter: query.where ? deserializeFilter(query.where) : void 0,
|
|
4015
|
+
logical: query.logical,
|
|
4016
|
+
values: data
|
|
4017
|
+
}), slug, getPks(), toViewModel);
|
|
4018
|
+
} : void 0,
|
|
4019
|
+
deleteWhere: driver.deleteWhere ? (query) => driver.deleteWhere({
|
|
4020
|
+
path: storedPath(),
|
|
4021
|
+
filter: query.where ? deserializeFilter(query.where) : void 0,
|
|
4022
|
+
logical: query.logical
|
|
4023
|
+
}) : void 0,
|
|
3985
4024
|
count: driver.count ? (params) => countRows(params) : void 0,
|
|
3986
4025
|
trash: {
|
|
3987
4026
|
find: (params) => findRows(params, "only"),
|
|
@@ -4325,7 +4364,9 @@ function toSdkCollectionClient(snap, slug = "collection") {
|
|
|
4325
4364
|
if (!snap.createMany) throw new Error("Bulk writes are not supported by this collection's data source. Fall back to create() per record.");
|
|
4326
4365
|
return (await snap.createMany(data, {
|
|
4327
4366
|
upsert: options?.upsert,
|
|
4328
|
-
onConflict: options?.onConflict
|
|
4367
|
+
onConflict: options?.onConflict,
|
|
4368
|
+
where: options?.where,
|
|
4369
|
+
ignoreDuplicates: options?.ignoreDuplicates
|
|
4329
4370
|
})).map(entityToRow);
|
|
4330
4371
|
},
|
|
4331
4372
|
/**
|
|
@@ -4342,10 +4383,12 @@ function toSdkCollectionClient(snap, slug = "collection") {
|
|
|
4342
4383
|
if (!snap.createMany) throw new Error("Upsert is not supported by this collection's data source: it needs a bulk write, which this driver does not implement. Fall back to create() or update().");
|
|
4343
4384
|
const row = (await snap.createMany([data], {
|
|
4344
4385
|
upsert: true,
|
|
4345
|
-
onConflict: options?.onConflict
|
|
4386
|
+
onConflict: options?.onConflict,
|
|
4387
|
+
where: options?.where,
|
|
4388
|
+
ignoreDuplicates: options?.ignoreDuplicates
|
|
4346
4389
|
}))[0];
|
|
4347
|
-
if (!row) throw new Error(`Upsert into "${slug}" returned no row.`);
|
|
4348
|
-
return entityToRow(row);
|
|
4390
|
+
if (!row && !options?.where && !options?.ignoreDuplicates) throw new Error(`Upsert into "${slug}" returned no row.`);
|
|
4391
|
+
return row ? entityToRow(row) : void 0;
|
|
4349
4392
|
},
|
|
4350
4393
|
async update(id, data, options) {
|
|
4351
4394
|
refuseUnhonouredWriteOptions("update", slug, options);
|
|
@@ -4365,6 +4408,16 @@ function toSdkCollectionClient(snap, slug = "collection") {
|
|
|
4365
4408
|
refuseUnhonouredWriteOptions("delete", slug, options);
|
|
4366
4409
|
return snap.delete(id);
|
|
4367
4410
|
},
|
|
4411
|
+
async updateWhere(query, data, options) {
|
|
4412
|
+
refuseUnhonouredWriteOptions("updateWhere", slug, options);
|
|
4413
|
+
if (!snap.updateWhere) throw new Error("Filtered updates are not supported by this collection's data source. Read the rows, then updateMany() them.");
|
|
4414
|
+
return (await snap.updateWhere(query, data)).map(entityToRow);
|
|
4415
|
+
},
|
|
4416
|
+
async deleteWhere(query, options) {
|
|
4417
|
+
refuseUnhonouredWriteOptions("deleteWhere", slug, options);
|
|
4418
|
+
if (!snap.deleteWhere) throw new Error("Filtered deletes are not supported by this collection's data source. Read the rows, then deleteMany() their ids.");
|
|
4419
|
+
return snap.deleteWhere(query);
|
|
4420
|
+
},
|
|
4368
4421
|
async deleteMany(ids, options) {
|
|
4369
4422
|
refuseUnhonouredWriteOptions("deleteMany", slug, options);
|
|
4370
4423
|
if (!Array.isArray(ids)) throw new RebaseClientError("deleteMany expects an array of ids.", { code: "INVALID_BULK_BODY" });
|
|
@@ -4478,11 +4531,35 @@ function wrapAsSdkData(entityData, options) {
|
|
|
4478
4531
|
}
|
|
4479
4532
|
return accessor;
|
|
4480
4533
|
}
|
|
4481
|
-
|
|
4534
|
+
const slugOf = (accessor) => options?.resolveAccessor?.(accessor) ?? toSnakeCase(accessor);
|
|
4535
|
+
const batch = async (operations) => {
|
|
4536
|
+
if (!Array.isArray(operations)) throw new RebaseClientError("batch expects an array of operations.", { code: "INVALID_BULK_BODY" });
|
|
4537
|
+
if (operations.length === 0) return {
|
|
4538
|
+
data: [],
|
|
4539
|
+
meta: { operations: 0 }
|
|
4540
|
+
};
|
|
4541
|
+
if (!options?.batchWrite) throw new RebaseClientError("This data source cannot write a batch atomically.", { code: "BATCH_UNSUPPORTED" });
|
|
4542
|
+
return {
|
|
4543
|
+
data: await options.batchWrite({ operations: operations.map((operation) => ({
|
|
4544
|
+
op: operation.op,
|
|
4545
|
+
path: slugOf(operation.collection),
|
|
4546
|
+
..."id" in operation ? { id: operation.id } : {},
|
|
4547
|
+
..."values" in operation ? { values: operation.values } : {},
|
|
4548
|
+
...operation.op === "upsert" && operation.onConflict ? { onConflict: operation.onConflict } : {},
|
|
4549
|
+
...operation.ref ? { ref: operation.ref } : {}
|
|
4550
|
+
})) }),
|
|
4551
|
+
meta: { operations: operations.length }
|
|
4552
|
+
};
|
|
4553
|
+
};
|
|
4554
|
+
return new Proxy({
|
|
4555
|
+
collection: getAccessor,
|
|
4556
|
+
batch
|
|
4557
|
+
}, { get(_target, prop) {
|
|
4482
4558
|
if (prop === "collection") return getAccessor;
|
|
4559
|
+
if (prop === "batch") return batch;
|
|
4483
4560
|
if (typeof prop === "symbol") return void 0;
|
|
4484
4561
|
if (prop === "then" || prop === "toJSON" || prop === "$$typeof") return void 0;
|
|
4485
|
-
return getAccessor(
|
|
4562
|
+
return getAccessor(slugOf(prop));
|
|
4486
4563
|
} });
|
|
4487
4564
|
}
|
|
4488
4565
|
/**
|
|
@@ -4506,7 +4583,10 @@ function wrapAsSdkData(entityData, options) {
|
|
|
4506
4583
|
* sets it (see {@link wrapAsSdkData}); untyped by default.
|
|
4507
4584
|
*/
|
|
4508
4585
|
function buildSdkData(driver, options) {
|
|
4509
|
-
return wrapAsSdkData(buildRebaseData(driver),
|
|
4586
|
+
return wrapAsSdkData(buildRebaseData(driver), {
|
|
4587
|
+
...options,
|
|
4588
|
+
...driver.batchWrite ? { batchWrite: (props) => driver.batchWrite(props) } : {}
|
|
4589
|
+
});
|
|
4510
4590
|
}
|
|
4511
4591
|
//#endregion
|
|
4512
4592
|
//#region ../common/src/data/call-context.ts
|
|
@@ -6994,7 +7074,7 @@ function createAuth(transport, options) {
|
|
|
6994
7074
|
*
|
|
6995
7075
|
* This is where an MFA-enrolled account's real session is minted, at
|
|
6996
7076
|
* `aal2` — so this client adopts the returned tokens and announces
|
|
6997
|
-
* `SIGNED_IN`, exactly
|
|
7077
|
+
* `SIGNED_IN`, exactly like any other sign-in. Pass the same
|
|
6998
7078
|
* `mfaToken` the challenge was opened with when finishing a sign-in.
|
|
6999
7079
|
*/
|
|
7000
7080
|
async verifyChallenge(challengeId, code, options) {
|
|
@@ -8732,7 +8812,7 @@ var RebaseWebSocketClient = class {
|
|
|
8732
8812
|
this.ws.onmessage = (event) => {
|
|
8733
8813
|
this.lastFrameAt = Date.now();
|
|
8734
8814
|
try {
|
|
8735
|
-
const message = parseRebaseJson(event.data);
|
|
8815
|
+
const message = parseRebaseJson(String(event.data));
|
|
8736
8816
|
this.handleWebSocketMessage(message);
|
|
8737
8817
|
} catch (error) {
|
|
8738
8818
|
console.error("Error parsing WebSocket message:", error);
|
|
@@ -10549,7 +10629,7 @@ var LazyOfflineManager = class {
|
|
|
10549
10629
|
keepsLastUser;
|
|
10550
10630
|
constructor(config, createInner) {
|
|
10551
10631
|
this.keepsLastUser = config.keepLastUser === true;
|
|
10552
|
-
import("./offline-
|
|
10632
|
+
import("./offline-B6J1YUWF-CEJLzvJw.js").then(({ OfflineManager: Engine }) => {
|
|
10553
10633
|
const engine = new Engine(config, createInner);
|
|
10554
10634
|
this.engine = engine;
|
|
10555
10635
|
const queued = this.queued;
|
|
@@ -10661,6 +10741,8 @@ var LazyOfflineManager = class {
|
|
|
10661
10741
|
upsert: async (data, options) => (await client()).upsert(data, options),
|
|
10662
10742
|
updateMany: async (updates, options) => (await client()).updateMany(updates, options),
|
|
10663
10743
|
deleteMany: async (ids, options) => (await client()).deleteMany(ids, options),
|
|
10744
|
+
updateWhere: async (query, data, options) => (await client()).updateWhere(query, data, options),
|
|
10745
|
+
deleteWhere: async (query, options) => (await client()).deleteWhere(query, options),
|
|
10664
10746
|
update: async (id, data, options) => (await client()).update(id, data, options),
|
|
10665
10747
|
delete: async (id, options) => (await client()).delete(id, options),
|
|
10666
10748
|
count: async (params) => (await client()).count(params),
|
|
@@ -11222,7 +11304,8 @@ var PROPERTY_KEYS_BY_TYPE = {
|
|
|
11222
11304
|
"columnType",
|
|
11223
11305
|
"mode",
|
|
11224
11306
|
"timezone",
|
|
11225
|
-
"autoValue"
|
|
11307
|
+
"autoValue",
|
|
11308
|
+
"isId"
|
|
11226
11309
|
],
|
|
11227
11310
|
geopoint: [],
|
|
11228
11311
|
binary: [],
|
|
@@ -11815,7 +11898,7 @@ var TENANT_FIELD_TYPES = /* @__PURE__ */ new Set([
|
|
|
11815
11898
|
* record, and `getTableName` and `getEffectiveSecurityRules` are both typed on
|
|
11816
11899
|
* the finished type. Nothing structural bridges the two, so the conversion is
|
|
11817
11900
|
* irreducible here; what it should not be is scattered, which is how two call
|
|
11818
|
-
* sites came to spell
|
|
11901
|
+
* sites came to spell the double cast to `CollectionConfig` independently.
|
|
11819
11902
|
*
|
|
11820
11903
|
* Both helpers read fields this module has already checked by the time they are
|
|
11821
11904
|
* called, and both are total on a record that is missing them — `getTableName`
|
|
@@ -11834,7 +11917,7 @@ function asCollectionConfig(collection) {
|
|
|
11834
11917
|
* `{ dataSource?: string; engine?: string; databaseId?: string }` — and what
|
|
11835
11918
|
* this file holds is a `Record<string, unknown>` straight out of the user's
|
|
11836
11919
|
* config, whose values are `unknown`. The call sites answered that mismatch
|
|
11837
|
-
* with `collection
|
|
11920
|
+
* with a double cast of `collection` to `CollectionConfig`, which names a type nothing
|
|
11838
11921
|
* here asks for and asserts far more than the question needs: a config
|
|
11839
11922
|
* declaring `engine: 42` was read as an engine and routed on.
|
|
11840
11923
|
*
|
|
@@ -11941,6 +12024,7 @@ function checkPrimaryKeyStrategy(collection, at, collect) {
|
|
|
11941
12024
|
const needs = property.isId === "increment" ? "number" : "string";
|
|
11942
12025
|
collect.error(`${at}.properties.${key}.isId`, `\`isId: "${property.isId}"\` needs a ${needs} property, and this one is \`type: "${String(property.type)}"\`. Any other string is read as a raw SQL default, so the column would get \`DEFAULT ${property.isId}\`, which Postgres refuses. ` + (property.isId === "increment" ? "Make the key `type: \"number\"`, or use `isId: \"uuid\"` for a string key." : "Make the key `type: \"string\"`, or use `isId: \"increment\"` for a number key."));
|
|
11943
12026
|
}
|
|
12027
|
+
if (property.type === "date" && (property.columnType !== "date" || property.isId !== true && property.isId !== "manual")) collect.error(`${at}.properties.${key}.isId`, "A `date` property can be part of the key only as a calendar day the caller supplies: `columnType: \"date\"` and `isId: \"manual\"` (or `true`)" + (property.columnType !== "date" ? `, and this one is \`columnType: "${String(property.columnType ?? "timestamp")}"\`.` : ".") + " To key on an instant, key on a string or number and keep the timestamp beside it.");
|
|
11944
12028
|
if (property.isId === "increment" && property.columnType !== void 0) collect.warn(`${at}.properties.${key}.columnType`, `\`columnType: "${String(property.columnType)}"\` is not read beside \`isId: "increment"\`. An increment key is \`INTEGER GENERATED BY DEFAULT AS IDENTITY\` on every path, because every foreign key and junction column that points at a numeric primary key is INTEGER — a wider key would be referenced by narrower columns. Remove the \`columnType\`.`);
|
|
11945
12029
|
}
|
|
11946
12030
|
}
|
|
@@ -14830,7 +14914,7 @@ function containsBatchRef(value) {
|
|
|
14830
14914
|
* of its own. (The Postgres socket calls the adapter's methods directly.)
|
|
14831
14915
|
*
|
|
14832
14916
|
* Every function here leaves any other collection, and an adapter without the
|
|
14833
|
-
* step, exactly as it was: the rows are then written
|
|
14917
|
+
* step, exactly as it was: the rows are then written like any table's.
|
|
14834
14918
|
*/
|
|
14835
14919
|
/** Whether `collection` is the auth collection — its rows are the users. */
|
|
14836
14920
|
function isAuthCollection(collection) {
|
|
@@ -14844,7 +14928,7 @@ function collectionAuthConfig(collection) {
|
|
|
14844
14928
|
/**
|
|
14845
14929
|
* Whether a create on `collection` is a user creation `adapter` performs: the
|
|
14846
14930
|
* collection is the auth collection and the adapter has the step. When not,
|
|
14847
|
-
* the door writes the row
|
|
14931
|
+
* the door writes the row like any other.
|
|
14848
14932
|
*/
|
|
14849
14933
|
function createsUsers(adapter, collection) {
|
|
14850
14934
|
return !!adapter?.prepareUserCreation && isAuthCollection(collection);
|
|
@@ -14976,7 +15060,7 @@ async function completeUserCreations(adapter, prepared, rows) {
|
|
|
14976
15060
|
* then {@link completeUserCreations}.
|
|
14977
15061
|
*
|
|
14978
15062
|
* `undefined` when the create is not a user creation ({@link createsUsers}) —
|
|
14979
|
-
* the door then writes the row
|
|
15063
|
+
* the door then writes the row like any other.
|
|
14980
15064
|
*/
|
|
14981
15065
|
async function createUserThroughAuthCollection(adapter, collection, body, caller, save) {
|
|
14982
15066
|
if (!createsUsers(adapter, collection)) return void 0;
|
|
@@ -15286,7 +15370,7 @@ var RestApiGenerator = class RestApiGenerator {
|
|
|
15286
15370
|
const userCreations = [];
|
|
15287
15371
|
operations.forEach((operation, index) => {
|
|
15288
15372
|
this.enforceApiKeyPermission({
|
|
15289
|
-
get:
|
|
15373
|
+
get: c.get,
|
|
15290
15374
|
req: { method: operation.op === "delete" ? "DELETE" : "POST" }
|
|
15291
15375
|
}, operation.collection, operation.op === "delete" ? "delete" : "write");
|
|
15292
15376
|
const collection = bySlug.get(operation.collection);
|
|
@@ -15394,6 +15478,18 @@ var RestApiGenerator = class RestApiGenerator {
|
|
|
15394
15478
|
throw ApiError.badRequest(`Operation ${index}: an ${operation.op} on "${collection.slug}", whose rows are the users, cannot carry a \`\$ref\`. Its user-administration checks run before the batch's transaction opens, where a reference is not yet a value. Name the user and the values directly.`, "INVALID_BATCH_REF");
|
|
15395
15479
|
}
|
|
15396
15480
|
/**
|
|
15481
|
+
* Refuse a filtered write on the collection whose rows are the users.
|
|
15482
|
+
*
|
|
15483
|
+
* A user update or delete runs administration checks per user before the
|
|
15484
|
+
* write's transaction opens (the last administrator, sessions to end), and
|
|
15485
|
+
* a filter does not name the users until it runs. Name them: `updateMany`
|
|
15486
|
+
* and `deleteMany` with their ids.
|
|
15487
|
+
*/
|
|
15488
|
+
assertNoFilteredUserWrite(collection) {
|
|
15489
|
+
if (!isAuthCollection(collection)) return;
|
|
15490
|
+
throw ApiError.badRequest(`"${collection.slug}" holds the users, whose updates and deletes are checked user by user before they run. A filter names no user until it runs: read the users, then update or delete them by id.`, "FILTERED_USER_WRITE");
|
|
15491
|
+
}
|
|
15492
|
+
/**
|
|
15397
15493
|
* A 404 that says which row was not found, and names the other reason.
|
|
15398
15494
|
*
|
|
15399
15495
|
* "Entity not found" was the entire message on five routes. It does not say
|
|
@@ -16095,6 +16191,12 @@ var RestApiGenerator = class RestApiGenerator {
|
|
|
16095
16191
|
if (body.upsert === true) assertNoUserUpsert(this.authAdapter, resolvedCollection);
|
|
16096
16192
|
const onConflict = resolveConflictTarget(body.onConflict, resolvedCollection);
|
|
16097
16193
|
if (onConflict && body.upsert !== true) throw ApiError.badRequest("`onConflict` names where an upsert matches, but `upsert` is not set. Send `upsert: true`, or drop `onConflict`.", "INVALID_BULK_BODY");
|
|
16194
|
+
if (body.ignoreDuplicates !== void 0 && typeof body.ignoreDuplicates !== "boolean") throw ApiError.badRequest("`ignoreDuplicates` must be a boolean.", "INVALID_BULK_BODY");
|
|
16195
|
+
const conflictWhere = body.where !== void 0 ? parseWriteFilter({ where: body.where }, {
|
|
16196
|
+
collection: resolvedCollection,
|
|
16197
|
+
viewer: requestViewer(c)
|
|
16198
|
+
}).filter : void 0;
|
|
16199
|
+
if ((conflictWhere || body.ignoreDuplicates === true) && body.upsert !== true) throw ApiError.badRequest("`where` and `ignoreDuplicates` say what an upsert does to a stored row, but `upsert` is not set. Send `upsert: true`, or drop them.", "INVALID_BULK_BODY");
|
|
16098
16200
|
if (!driver.saveMany) throw ApiError.badRequest("This collection's data source does not support bulk writes.", "BULK_UNSUPPORTED");
|
|
16099
16201
|
const userAdapter = body.upsert !== true && createsUsers(this.authAdapter, resolvedCollection) ? this.authAdapter : void 0;
|
|
16100
16202
|
rows.forEach((row, rowIndex) => {
|
|
@@ -16118,7 +16220,9 @@ var RestApiGenerator = class RestApiGenerator {
|
|
|
16118
16220
|
rows,
|
|
16119
16221
|
collection: resolvedCollection,
|
|
16120
16222
|
upsert: body.upsert === true,
|
|
16121
|
-
onConflict
|
|
16223
|
+
onConflict,
|
|
16224
|
+
...conflictWhere ? { conflictWhere } : {},
|
|
16225
|
+
...body.ignoreDuplicates === true ? { ignoreDuplicates: true } : {}
|
|
16122
16226
|
});
|
|
16123
16227
|
return {
|
|
16124
16228
|
data: written.map((row) => this.formatResponse(row)),
|
|
@@ -16131,6 +16235,32 @@ var RestApiGenerator = class RestApiGenerator {
|
|
|
16131
16235
|
const driver = this.getScopedDriver(c);
|
|
16132
16236
|
const path = collection.slug;
|
|
16133
16237
|
const body = await parseJsonBody(c);
|
|
16238
|
+
if (body?.updates === void 0 && (body?.where !== void 0 || body?.logical !== void 0)) {
|
|
16239
|
+
this.assertNoFilteredUserWrite(resolvedCollection);
|
|
16240
|
+
const { filter, logical } = parseWriteFilter(body, {
|
|
16241
|
+
collection: resolvedCollection,
|
|
16242
|
+
viewer: requestViewer(c)
|
|
16243
|
+
});
|
|
16244
|
+
if (typeof body.data !== "object" || body.data === null || Array.isArray(body.data)) throw ApiError.badRequest("A filtered update needs `data`: an object of the fields to set.", "INVALID_BULK_BODY");
|
|
16245
|
+
const data = body.data;
|
|
16246
|
+
assertKnownWriteFields(data, resolvedCollection, { viewer: requestViewer(c) });
|
|
16247
|
+
assertWriteValuesValid(data, resolvedCollection, {});
|
|
16248
|
+
assertFieldOpsValid(data, resolvedCollection, {});
|
|
16249
|
+
if (!driver.updateWhere) throw ApiError.badRequest("This collection's data source does not support filtered updates.", "BULK_UNSUPPORTED");
|
|
16250
|
+
return this.runIdempotent(c, body, async () => {
|
|
16251
|
+
const written = await driver.updateWhere({
|
|
16252
|
+
path,
|
|
16253
|
+
filter,
|
|
16254
|
+
logical,
|
|
16255
|
+
values: data,
|
|
16256
|
+
collection: resolvedCollection
|
|
16257
|
+
});
|
|
16258
|
+
return {
|
|
16259
|
+
data: written.map((row) => this.formatResponse(row)),
|
|
16260
|
+
meta: { written: written.length }
|
|
16261
|
+
};
|
|
16262
|
+
}, (result) => this.respondBulk(c, result, resolvedCollection));
|
|
16263
|
+
}
|
|
16134
16264
|
assertBulkShape(body?.updates, "updates", true);
|
|
16135
16265
|
const updates = body.updates;
|
|
16136
16266
|
if (updates.length === 0) return c.json({
|
|
@@ -16172,6 +16302,23 @@ var RestApiGenerator = class RestApiGenerator {
|
|
|
16172
16302
|
const driver = this.getScopedDriver(c);
|
|
16173
16303
|
const path = collection.slug;
|
|
16174
16304
|
const body = await parseJsonBody(c);
|
|
16305
|
+
if (body?.ids === void 0 && (body?.where !== void 0 || body?.logical !== void 0)) {
|
|
16306
|
+
this.assertNoFilteredUserWrite(resolvedCollection);
|
|
16307
|
+
const { filter, logical } = parseWriteFilter(body, {
|
|
16308
|
+
collection: resolvedCollection,
|
|
16309
|
+
viewer: requestViewer(c)
|
|
16310
|
+
});
|
|
16311
|
+
if (!driver.deleteWhere) throw ApiError.badRequest("This collection's data source does not support filtered deletes.", "BULK_UNSUPPORTED");
|
|
16312
|
+
return this.runIdempotent(c, body, async () => {
|
|
16313
|
+
return { meta: { deleted: await driver.deleteWhere({
|
|
16314
|
+
hard: parseHardDelete(c.req.query(HARD_DELETE_QUERY_PARAM)),
|
|
16315
|
+
path,
|
|
16316
|
+
filter,
|
|
16317
|
+
logical,
|
|
16318
|
+
collection: resolvedCollection
|
|
16319
|
+
}) } };
|
|
16320
|
+
}, (result) => this.respondBulk(c, result, resolvedCollection));
|
|
16321
|
+
}
|
|
16175
16322
|
assertBulkShape(body?.ids, "ids", false);
|
|
16176
16323
|
const ids = body.ids;
|
|
16177
16324
|
if (ids.length === 0) return c.json({ meta: { deleted: 0 } });
|
|
@@ -16316,7 +16463,7 @@ var RestApiGenerator = class RestApiGenerator {
|
|
|
16316
16463
|
if (parsed.id === "query") {
|
|
16317
16464
|
const nested = this.resolveNestedPath(parsed.collectionPath);
|
|
16318
16465
|
this.enforceSubcollectionApiKeyPermission({
|
|
16319
|
-
get:
|
|
16466
|
+
get: c.get,
|
|
16320
16467
|
req: { method: "GET" }
|
|
16321
16468
|
}, nested);
|
|
16322
16469
|
return this.listRows(c, nested.chain[nested.chain.length - 1], await this.queryDictFromRequest(c), nested.path);
|
|
@@ -16324,7 +16471,7 @@ var RestApiGenerator = class RestApiGenerator {
|
|
|
16324
16471
|
if (parsed.id === "count") {
|
|
16325
16472
|
const nested = this.resolveNestedPath(parsed.collectionPath);
|
|
16326
16473
|
this.enforceSubcollectionApiKeyPermission({
|
|
16327
|
-
get:
|
|
16474
|
+
get: c.get,
|
|
16328
16475
|
req: { method: "GET" }
|
|
16329
16476
|
}, nested);
|
|
16330
16477
|
return this.countRows(c, nested.chain[nested.chain.length - 1], await this.queryDictFromRequest(c), nested.path);
|
|
@@ -16502,10 +16649,16 @@ var RestApiGenerator = class RestApiGenerator {
|
|
|
16502
16649
|
const fetchService = driver.restFetchService;
|
|
16503
16650
|
if (!fetchService?.aggregate) throw new ApiError(501, "AGGREGATE_NOT_SUPPORTED", "Aggregates are not implemented for this backend's data driver.");
|
|
16504
16651
|
const groups = parseGroupBy(groupBy);
|
|
16505
|
-
const
|
|
16506
|
-
|
|
16652
|
+
const columnOf = (field) => field.split("->")[0].trim();
|
|
16653
|
+
const groupFields = (groups ?? []).map((group) => columnOf(typeof group === "string" ? group : group.field));
|
|
16654
|
+
const selected = aggregates.map((a) => ({
|
|
16655
|
+
fn: a.fn,
|
|
16656
|
+
field: a.field === void 0 ? void 0 : columnOf(a.field)
|
|
16657
|
+
}));
|
|
16658
|
+
assertReadableFields(selected.map((a) => a.field), collection, viewer, "select");
|
|
16507
16659
|
assertReadableFields(groupFields, collection, viewer, "groupBy");
|
|
16508
|
-
assertNoHiddenAggregateNames(
|
|
16660
|
+
assertNoHiddenAggregateNames(selected, groupFields, collection);
|
|
16661
|
+
for (const aggregate of aggregates) if (aggregate.filter) assertQueryFieldsReadable({ where: aggregate.filter }, collection, viewer);
|
|
16509
16662
|
const grouped = groups !== void 0 && groups.length > 0;
|
|
16510
16663
|
const orderBy = orderByEntriesToTuples(queryOptions.orderBy);
|
|
16511
16664
|
if (queryOptions.cursor || !grouped && (queryOptions.offset || orderBy)) throw ApiError.badRequest(queryOptions.cursor ? "An aggregate is not paged by cursor: `after` continues after a row, and a group is not one. Page the groups with `offset` or `page`." : "`offset`, `page` and `orderBy` page through the groups of an aggregate, and without `groupBy` it has one row. Add `groupBy`, or drop them.", "INVALID_AGGREGATE_WINDOW");
|
|
@@ -16743,14 +16896,14 @@ async function isHonoDefaultNotFound(res) {
|
|
|
16743
16896
|
}
|
|
16744
16897
|
/** Whether `onError` has been called on this app. */
|
|
16745
16898
|
function hasOwnErrorHandler(app) {
|
|
16746
|
-
const current = app
|
|
16899
|
+
const current = Reflect.get(app, "errorHandler");
|
|
16747
16900
|
if (typeof current !== "function") return true;
|
|
16748
16901
|
return current !== defaultErrorHandler();
|
|
16749
16902
|
}
|
|
16750
16903
|
/** Hono's own default, read once off an app nobody has configured. */
|
|
16751
16904
|
var cachedDefault;
|
|
16752
16905
|
function defaultErrorHandler() {
|
|
16753
|
-
if (cachedDefault === void 0) cachedDefault = new Hono()
|
|
16906
|
+
if (cachedDefault === void 0) cachedDefault = Reflect.get(new Hono(), "errorHandler");
|
|
16754
16907
|
return cachedDefault;
|
|
16755
16908
|
}
|
|
16756
16909
|
//#endregion
|
|
@@ -20620,11 +20773,11 @@ async function createStorageController(config) {
|
|
|
20620
20773
|
switch (config.type) {
|
|
20621
20774
|
case "local": return new LocalStorageController(config);
|
|
20622
20775
|
case "s3": {
|
|
20623
|
-
const { S3StorageController } = await import("./S3StorageController-
|
|
20776
|
+
const { S3StorageController } = await import("./S3StorageController-B27ibWz8.js").then((n) => n.n);
|
|
20624
20777
|
return new S3StorageController(config);
|
|
20625
20778
|
}
|
|
20626
20779
|
case "gcs": {
|
|
20627
|
-
const { GCSStorageController } = await import("./GCSStorageController-
|
|
20780
|
+
const { GCSStorageController } = await import("./GCSStorageController-Bgrcn6Uh.js").then((n) => n.n);
|
|
20628
20781
|
return new GCSStorageController(config);
|
|
20629
20782
|
}
|
|
20630
20783
|
default: throw new Error(`Unknown storage type: ${config.type}. Built-in types: local, s3, gcs. For other providers, implement the StorageController interface directly.`);
|
|
@@ -20866,7 +21019,7 @@ function noCollectionsCause(unprotected) {
|
|
|
20866
21019
|
* routes wherever and as often as the application asks.
|
|
20867
21020
|
*/
|
|
20868
21021
|
async function loadOpenApiGenerator() {
|
|
20869
|
-
const { generateOpenApiSpec } = await import("./openapi-generator-
|
|
21022
|
+
const { generateOpenApiSpec } = await import("./openapi-generator-1s5sWUnN.js").then((n) => n.i);
|
|
20870
21023
|
return generateOpenApiSpec;
|
|
20871
21024
|
}
|
|
20872
21025
|
/**
|
|
@@ -23295,11 +23448,10 @@ function resolveSurfaces(options, env = {}) {
|
|
|
23295
23448
|
* `options` decide.
|
|
23296
23449
|
*/
|
|
23297
23450
|
function resolveOwnership(options, env = {}) {
|
|
23298
|
-
const cronFromEnv = parseEnvBoolean(env.REBASE_CRON_SCHEDULER);
|
|
23299
23451
|
return {
|
|
23300
|
-
cronScheduler: options?.cronScheduler ??
|
|
23301
|
-
jobWorkers: options?.jobWorkers ?? true,
|
|
23302
|
-
rlsAudit: options?.rlsAudit ?? true
|
|
23452
|
+
cronScheduler: options?.cronScheduler ?? parseEnvBoolean(env.REBASE_CRON_SCHEDULER) ?? true,
|
|
23453
|
+
jobWorkers: options?.jobWorkers ?? parseEnvBoolean(env.REBASE_JOB_WORKERS) ?? true,
|
|
23454
|
+
rlsAudit: options?.rlsAudit ?? parseEnvBoolean(env.REBASE_RLS_AUDIT) ?? true
|
|
23303
23455
|
};
|
|
23304
23456
|
}
|
|
23305
23457
|
/** The surfaces a process is not serving. Literal: off is off, however it got there. */
|
|
@@ -26886,10 +27038,11 @@ function pick(args, names) {
|
|
|
26886
27038
|
return Object.fromEntries(names.filter((name) => args[name] !== void 0).map((name) => [name, args[name]]));
|
|
26887
27039
|
}
|
|
26888
27040
|
/** A screen's payload for its view: its block, and the configs it is drawn from, for this caller. */
|
|
26889
|
-
function viewPayload(resolved, ctx, title) {
|
|
27041
|
+
function viewPayload(resolved, ctx, title, readAt) {
|
|
26890
27042
|
return {
|
|
26891
27043
|
version: 1,
|
|
26892
27044
|
...title && { title },
|
|
27045
|
+
...readAt !== void 0 && { readAt },
|
|
26893
27046
|
blocks: [resolved.block],
|
|
26894
27047
|
collections: viewCollections(resolved.collections, ctx.collections, viewerOf(ctx), (collection) => ({
|
|
26895
27048
|
read: reaches(ctx, "data:read", collection),
|
|
@@ -26985,6 +27138,7 @@ var TOOLS = [
|
|
|
26985
27138
|
const collection = resolveCollection(ctx, args.collection, "data:read");
|
|
26986
27139
|
const { view, ...readArgs } = args;
|
|
26987
27140
|
const mode = view === void 0 ? void 0 : viewModeOf(view, "`view`");
|
|
27141
|
+
const readAt = Date.now();
|
|
26988
27142
|
const page = await readPage(readArgs, collection, ctx);
|
|
26989
27143
|
const block = {
|
|
26990
27144
|
collections: [collection],
|
|
@@ -27006,7 +27160,7 @@ var TOOLS = [
|
|
|
27006
27160
|
collection: collectionPath(collection),
|
|
27007
27161
|
title: collection.name,
|
|
27008
27162
|
...page,
|
|
27009
|
-
view: viewPayload(block, ctx),
|
|
27163
|
+
view: viewPayload(block, ctx, void 0, readAt),
|
|
27010
27164
|
idKey: idPropertyEntry(collection)?.[0] ?? "id",
|
|
27011
27165
|
columns: tableColumns(collection, ctx),
|
|
27012
27166
|
writable: reaches(ctx, "data:write", collection)
|
|
@@ -27076,12 +27230,13 @@ var TOOLS = [
|
|
|
27076
27230
|
async run(args, ctx) {
|
|
27077
27231
|
const title = optionalString(args.title, "`title`");
|
|
27078
27232
|
const block = await appBlock(args, ctx);
|
|
27233
|
+
const readAt = Date.now();
|
|
27079
27234
|
const seeds = await appSeeds(block.collections, ctx);
|
|
27080
27235
|
return {
|
|
27081
27236
|
...title && { title },
|
|
27082
27237
|
...block.summary,
|
|
27083
27238
|
view: {
|
|
27084
|
-
...viewPayload(block, ctx, title),
|
|
27239
|
+
...viewPayload(block, ctx, title, seeds.length > 0 ? readAt : void 0),
|
|
27085
27240
|
...seeds.length > 0 && { seeds }
|
|
27086
27241
|
}
|
|
27087
27242
|
};
|
|
@@ -28849,7 +29004,7 @@ var REPLACED_CONFIG_KEYS = {
|
|
|
28849
29004
|
*/
|
|
28850
29005
|
function assertNoReplacedResourceConfig(config) {
|
|
28851
29006
|
for (const [key, remedy] of Object.entries(REPLACED_CONFIG_KEYS)) {
|
|
28852
|
-
if (config
|
|
29007
|
+
if (Reflect.get(config, key) === void 0) continue;
|
|
28853
29008
|
throw new Error(`\`${key}\` is no longer read. Resources are declared in config code now, so that there is one place to look and nothing to merge.\n\n To migrate: ${remedy}.\n\nRefused rather than ignored: a key that is accepted and then does nothing is the failure this replaced.`);
|
|
28854
29009
|
}
|
|
28855
29010
|
}
|
|
@@ -29915,14 +30070,14 @@ function topicJobHandlers() {
|
|
|
29915
30070
|
const tasks = {};
|
|
29916
30071
|
for (const sub of declaredSubscriptions()) {
|
|
29917
30072
|
const task = topicTaskName(sub.topic, sub.name);
|
|
29918
|
-
tasks[task] =
|
|
30073
|
+
tasks[task] = async (ctx) => {
|
|
29919
30074
|
await sub.handler(ctx.payload, {
|
|
29920
30075
|
attempt: ctx.attempt,
|
|
29921
30076
|
topic: sub.topic,
|
|
29922
30077
|
subscription: sub.name,
|
|
29923
30078
|
signal: ctx.signal
|
|
29924
30079
|
});
|
|
29925
|
-
}
|
|
30080
|
+
};
|
|
29926
30081
|
}
|
|
29927
30082
|
return tasks;
|
|
29928
30083
|
}
|
|
@@ -30625,14 +30780,22 @@ async function buildRebaseBackend(options, announcements) {
|
|
|
30625
30780
|
logger.info("Authentication initialized");
|
|
30626
30781
|
} else logger.warn("Auth requested but default bootstrapper does not support initializeAuth");
|
|
30627
30782
|
}
|
|
30628
|
-
const
|
|
30783
|
+
const initializedTarget = (target) => {
|
|
30784
|
+
for (const [bootstrapper, initialized] of driverResults) if (bootstrapper === target.bootstrapper) return {
|
|
30785
|
+
...target,
|
|
30786
|
+
driverResult: initialized
|
|
30787
|
+
};
|
|
30788
|
+
return target;
|
|
30789
|
+
};
|
|
30790
|
+
const policyOutcome = await provisionCollectionPolicies(provisionable, initializedTarget(provisionTarget), {
|
|
30629
30791
|
introspecting: introspectCollections,
|
|
30630
30792
|
provision: provision.collections,
|
|
30631
30793
|
skipReason: provisionSkipReason
|
|
30632
30794
|
});
|
|
30633
|
-
for (const
|
|
30634
|
-
const mine = provisionableBy.get(
|
|
30795
|
+
for (const source of provisionTargets.slice(1)) {
|
|
30796
|
+
const mine = provisionableBy.get(source) ?? [];
|
|
30635
30797
|
if (mine.length === 0) continue;
|
|
30798
|
+
const target = initializedTarget(source);
|
|
30636
30799
|
if (provision.collections && !provisioningDisabled() && target.bootstrapper.ensureRlsRuntime) await target.bootstrapper.ensureRlsRuntime(target.driverResult);
|
|
30637
30800
|
await provisionCollectionPolicies(mine, target, {
|
|
30638
30801
|
introspecting: introspectCollections,
|
|
@@ -30700,7 +30863,7 @@ async function buildRebaseBackend(options, announcements) {
|
|
|
30700
30863
|
const platformTokenPreAuth = createPlatformTokenPreAuth(platformTokens);
|
|
30701
30864
|
let backupLinkRouter;
|
|
30702
30865
|
if (surfaces.admin) {
|
|
30703
|
-
const { createBackupLinkRoutes, backupDestinationFromEnv } = await import("./backup-
|
|
30866
|
+
const { createBackupLinkRoutes, backupDestinationFromEnv } = await import("./backup-D-ds7wml.js").then((n) => n.t);
|
|
30704
30867
|
backupLinkRouter = createBackupLinkRoutes({ getDestination: () => backupDestinationFromEnv(process.env) });
|
|
30705
30868
|
}
|
|
30706
30869
|
const apiKeyRouter = apiKeyStore && surfaces.admin ? createApiKeyRoutes({
|
|
@@ -30845,7 +31008,7 @@ async function buildRebaseBackend(options, announcements) {
|
|
|
30845
31008
|
]) {
|
|
30846
31009
|
const providerConfig = safeAuthConfig[key];
|
|
30847
31010
|
if (providerConfig && requiredFields.every((f) => Boolean(providerConfig[f]))) {
|
|
30848
|
-
const createFn = (await import("./auth-
|
|
31011
|
+
const createFn = (await import("./auth-C-RJT4VO.js").then((n) => n.t))[factory];
|
|
30849
31012
|
oauthProviders.push(createFn(providerConfig));
|
|
30850
31013
|
}
|
|
30851
31014
|
}
|
|
@@ -31079,7 +31242,7 @@ async function buildRebaseBackend(options, announcements) {
|
|
|
31079
31242
|
let schemaEditorRoutes;
|
|
31080
31243
|
let schemaSourceEditor;
|
|
31081
31244
|
if (!schemaEditorOff && config.collectionsDir) try {
|
|
31082
|
-
const editorModule = await import("./schema-editor-routes-
|
|
31245
|
+
const editorModule = await import("./schema-editor-routes-BFRh4mHu.js");
|
|
31083
31246
|
schemaSourceEditor = editorModule.createSchemaSourceEditor(config.collectionsDir);
|
|
31084
31247
|
schemaEditorRoutes = editorModule.createSchemaEditorRoutes(schemaSourceEditor);
|
|
31085
31248
|
} catch (err) {
|
|
@@ -31129,7 +31292,7 @@ async function buildRebaseBackend(options, announcements) {
|
|
|
31129
31292
|
let remoteEditingOff;
|
|
31130
31293
|
if (remoteRepo) {
|
|
31131
31294
|
try {
|
|
31132
|
-
remoteEditor = await import("./ast-schema-editor-
|
|
31295
|
+
remoteEditor = await import("./ast-schema-editor-C0n8s_Z6.js");
|
|
31133
31296
|
} catch (err) {
|
|
31134
31297
|
if (err?.code !== "ERR_MODULE_NOT_FOUND") throw err;
|
|
31135
31298
|
remoteEditingOff = {
|
|
@@ -31407,6 +31570,10 @@ async function buildRebaseBackend(options, announcements) {
|
|
|
31407
31570
|
resolveAccessor
|
|
31408
31571
|
});
|
|
31409
31572
|
Object.assign(serverClient, { dataAsAdmin: serverData });
|
|
31573
|
+
Object.assign(serverClient, { sqlAsAdmin: async (query, sqlOptions) => {
|
|
31574
|
+
if (!scopedDefaultDriver.sql) throw new Error(`rebase.sqlAsAdmin: the "${scopedDefaultDriver.key}" driver cannot run SQL under row-level security. Use rebase.dataAsAdmin, or rebase.sql for owner-level SQL.`);
|
|
31575
|
+
return scopedDefaultDriver.sql(query, sqlOptions);
|
|
31576
|
+
} });
|
|
31410
31577
|
delete serverClient.data;
|
|
31411
31578
|
logger.debug("Native data plane attached to singleton (bypasses HTTP loop)");
|
|
31412
31579
|
if (storageController) {
|
|
@@ -31467,7 +31634,7 @@ async function buildRebaseBackend(options, announcements) {
|
|
|
31467
31634
|
const loadFailures = [];
|
|
31468
31635
|
if ((config.functionsDir || config.functions) && surfaces.functions) {
|
|
31469
31636
|
const { functionList, readFunctionsDirectory } = await import("./function-loader-BzKo2Oiu.js").then((n) => n.t);
|
|
31470
|
-
const { createFunctionRoutes } = await import("./function-routes-
|
|
31637
|
+
const { createFunctionRoutes } = await import("./function-routes-mSmsW34_.js").then((n) => n.n);
|
|
31471
31638
|
const { createFunctionsRequestTimeout, resolveFunctionsTimeoutMs } = await import("./request-timeout-DW2OBWfJ.js").then((n) => n.t);
|
|
31472
31639
|
const { functions: functionRecord, problems, failed } = config.functions ? {
|
|
31473
31640
|
functions: config.functions,
|
|
@@ -31506,6 +31673,10 @@ async function buildRebaseBackend(options, announcements) {
|
|
|
31506
31673
|
if (c.get("user") && !c.get("scopes")) c.set("scopes", callerScopes(c));
|
|
31507
31674
|
return next();
|
|
31508
31675
|
});
|
|
31676
|
+
if (typeof adminIdentityRepo?.getUserById === "function" && typeof adminIdentityRepo.getUserIdentities === "function") {
|
|
31677
|
+
const { createUserProfileLoader } = await import("./user-profile-C1UkoaJe.js");
|
|
31678
|
+
functionsRouter.use("/*", createUserProfileLoader(adminIdentityRepo));
|
|
31679
|
+
}
|
|
31509
31680
|
if (rateLimitConfig) functionsRouter.use("/*", createDataRateLimiter({
|
|
31510
31681
|
...rateLimitConfig,
|
|
31511
31682
|
anonymous: rateLimitConfig.anonymousFunctions !== void 0 ? rateLimitConfig.anonymousFunctions : DEFAULT_FUNCTIONS_ANONYMOUS_LIMIT
|
|
@@ -31530,10 +31701,10 @@ async function buildRebaseBackend(options, announcements) {
|
|
|
31530
31701
|
/** How many cron jobs `start()` schedules in this process. */
|
|
31531
31702
|
let cronJobsToSchedule = 0;
|
|
31532
31703
|
if (surfaces.cron || (config.cronsDir || config.crons || storageSweepJobs.length > 0) && ownership.cronScheduler) {
|
|
31533
|
-
const { cronJobsFrom, readCronsDirectory, withHiddenPropertiesOf } = await import("./cron-loader-
|
|
31534
|
-
const { CronScheduler } = await import("./cron-scheduler-
|
|
31535
|
-
const { createCronRoutes } = await import("./cron-routes-
|
|
31536
|
-
const { createCronStore } = await import("./cron-store-
|
|
31704
|
+
const { cronJobsFrom, readCronsDirectory, withHiddenPropertiesOf } = await import("./cron-loader-BN24T-O1.js").then((n) => n.t);
|
|
31705
|
+
const { CronScheduler } = await import("./cron-scheduler-CM08t50L.js").then((n) => n.n);
|
|
31706
|
+
const { createCronRoutes } = await import("./cron-routes-CjCWNcX6.js").then((n) => n.n);
|
|
31707
|
+
const { createCronStore } = await import("./cron-store-iv5yn27j.js").then((n) => n.n);
|
|
31537
31708
|
const { crons: cronRecord, problems: cronProblems, failed: cronFailures } = config.crons ? {
|
|
31538
31709
|
crons: config.crons,
|
|
31539
31710
|
problems: [],
|
|
@@ -31598,7 +31769,7 @@ async function buildRebaseBackend(options, announcements) {
|
|
|
31598
31769
|
}
|
|
31599
31770
|
let metricsHistory;
|
|
31600
31771
|
try {
|
|
31601
|
-
const { createMetricsHistory } = await import("./history-recorder-
|
|
31772
|
+
const { createMetricsHistory } = await import("./history-recorder-BV34l2qf.js");
|
|
31602
31773
|
metricsHistory = createMetricsHistory(defaultDriver, { provision: provision.database });
|
|
31603
31774
|
if (metricsHistory) await metricsHistory.ensure();
|
|
31604
31775
|
} catch (err) {
|
|
@@ -31607,7 +31778,7 @@ async function buildRebaseBackend(options, announcements) {
|
|
|
31607
31778
|
}
|
|
31608
31779
|
let jobQueue;
|
|
31609
31780
|
if (jobsOptions?.enabled) {
|
|
31610
|
-
const { createJobStore, createJobQueue } = await import("./jobs-
|
|
31781
|
+
const { createJobStore, createJobQueue } = await import("./jobs-D9RBf3Yb.js").then((n) => n.t);
|
|
31611
31782
|
const store = createJobStore(defaultDriver, { provision: provision.database });
|
|
31612
31783
|
if (store) {
|
|
31613
31784
|
await store.ensureTable();
|
|
@@ -31652,7 +31823,7 @@ Use a driver that supports the job queue, or remove the declarations. Refusing t
|
|
|
31652
31823
|
let logsSurface;
|
|
31653
31824
|
let metaSurface;
|
|
31654
31825
|
if (surfaces.admin) {
|
|
31655
|
-
const { createBackupRoutes, backupDestinationFromEnv, readBackupSchedule } = await import("./backup-
|
|
31826
|
+
const { createBackupRoutes, backupDestinationFromEnv, readBackupSchedule } = await import("./backup-D-ds7wml.js").then((n) => n.t);
|
|
31656
31827
|
const backupRouter = new Hono();
|
|
31657
31828
|
applyAdminGate(backupRouter, "Backup", "backups:read");
|
|
31658
31829
|
const scheduler = cronScheduler;
|
|
@@ -31674,7 +31845,7 @@ Use a driver that supports the job queue, or remove the declarations. Refusing t
|
|
|
31674
31845
|
}
|
|
31675
31846
|
let rlsSimulatorSurface;
|
|
31676
31847
|
if (surfaces.admin) {
|
|
31677
|
-
const { createRlsSimulatorRoutes } = await import("./rls-simulator-routes-
|
|
31848
|
+
const { createRlsSimulatorRoutes } = await import("./rls-simulator-routes-C7C3f57E.js");
|
|
31678
31849
|
const rlsSimulatorRouter = new Hono();
|
|
31679
31850
|
applyAdminGate(rlsSimulatorRouter, "RLS simulator", "schema:read");
|
|
31680
31851
|
rlsSimulatorRouter.route("/", createRlsSimulatorRoutes({
|
|
@@ -31689,14 +31860,14 @@ Use a driver that supports the job queue, or remove the declarations. Refusing t
|
|
|
31689
31860
|
rlsSimulatorSurface = rlsSimulatorRouter;
|
|
31690
31861
|
}
|
|
31691
31862
|
if (surfaces.admin) {
|
|
31692
|
-
const { createSqlExportRoutes } = await import("./sql-export-routes-
|
|
31863
|
+
const { createSqlExportRoutes } = await import("./sql-export-routes-9nXTfyP_.js");
|
|
31693
31864
|
const sqlExportRouter = new Hono();
|
|
31694
31865
|
applyAdminGate(sqlExportRouter, "SQL export", "database:write");
|
|
31695
31866
|
sqlExportRouter.route("/", createSqlExportRoutes({ getAdmin: () => defaultDriver.admin }));
|
|
31696
31867
|
sqlExportSurface = sqlExportRouter;
|
|
31697
31868
|
}
|
|
31698
31869
|
if (surfaces.admin) {
|
|
31699
|
-
const { createBranchRoutes } = await import("./branch-routes-
|
|
31870
|
+
const { createBranchRoutes } = await import("./branch-routes-ClQrYUyP.js");
|
|
31700
31871
|
const branchRouter = new Hono();
|
|
31701
31872
|
applyAdminGate(branchRouter, "Branch review", "database:write");
|
|
31702
31873
|
branchRouter.route("/", createBranchRoutes({ getAdmin: () => defaultDriver.admin }));
|
|
@@ -31735,7 +31906,7 @@ Use a driver that supports the job queue, or remove the declarations. Refusing t
|
|
|
31735
31906
|
logsSurface = logsRouter;
|
|
31736
31907
|
}
|
|
31737
31908
|
if (surfaces.meta) {
|
|
31738
|
-
const { createContractRoutes } = await import("./contract-routes-
|
|
31909
|
+
const { createContractRoutes } = await import("./contract-routes-BGXR9D5C.js").then((n) => n.t);
|
|
31739
31910
|
const contractRouter = new Hono();
|
|
31740
31911
|
if (adminSurfacesGated) contractRouter.use("/contract", ...adminGate("schema:read"));
|
|
31741
31912
|
else {
|
|
@@ -31767,8 +31938,8 @@ Use a driver that supports the job queue, or remove the declarations. Refusing t
|
|
|
31767
31938
|
const callbackTargets = () => {
|
|
31768
31939
|
const targets = [collectionRegistry];
|
|
31769
31940
|
for (const key of [DEFAULT_DRIVER_ID, ...driverRegistry.list()]) {
|
|
31770
|
-
const
|
|
31771
|
-
if (
|
|
31941
|
+
const registry = collectionRegistryOf(driverRegistry.get(key));
|
|
31942
|
+
if (registry && !targets.includes(registry)) targets.push(registry);
|
|
31772
31943
|
}
|
|
31773
31944
|
return targets;
|
|
31774
31945
|
};
|
|
@@ -32129,7 +32300,7 @@ function realtimeSocketPath(basePath) {
|
|
|
32129
32300
|
* backend no MCP client calls never loads it.
|
|
32130
32301
|
*/
|
|
32131
32302
|
async function loadMcpApps() {
|
|
32132
|
-
const { MCP_APPS } = await import("./dist-
|
|
32303
|
+
const { MCP_APPS } = await import("./dist-2-J8_MGi.js");
|
|
32133
32304
|
return withProjectView(MCP_APPS, [...process.env.REBASE_MCP_VIEW ? [process.env.REBASE_MCP_VIEW] : [], ...servedFrontendPaths().map((frontend) => path.join(frontend, PROJECT_VIEW_FILE))], (file) => {
|
|
32134
32305
|
try {
|
|
32135
32306
|
return readFileSync(file, "utf8");
|
|
@@ -32143,9 +32314,18 @@ async function loadMcpApps() {
|
|
|
32143
32314
|
* app to the modules and names every view serves (`MCP_APP_MODULES`).
|
|
32144
32315
|
*/
|
|
32145
32316
|
async function loadAppCompiler() {
|
|
32146
|
-
const { compileApp } = await import("./dist-
|
|
32317
|
+
const { compileApp } = await import("./dist-2-J8_MGi.js");
|
|
32147
32318
|
return (source) => compileApp(source, MCP_APP_MODULES);
|
|
32148
32319
|
}
|
|
32320
|
+
/** The collection registry a driver carries, if it has one: not part of `DataDriver`, so found by looking. */
|
|
32321
|
+
function collectionRegistryOf(driver) {
|
|
32322
|
+
if (typeof driver !== "object" || driver === null || !("registry" in driver)) return void 0;
|
|
32323
|
+
const registry = driver.registry;
|
|
32324
|
+
return typeof registry === "object" && registry !== null && hasSlugGetter(registry) ? registry : void 0;
|
|
32325
|
+
}
|
|
32326
|
+
function hasSlugGetter(value) {
|
|
32327
|
+
return "get" in value && typeof value.get === "function";
|
|
32328
|
+
}
|
|
32149
32329
|
//#endregion
|
|
32150
32330
|
//#region src/backend/default-backend.ts
|
|
32151
32331
|
/**
|
|
@@ -37485,6 +37665,6 @@ function warnOnUnusableBundleShape(bundle) {
|
|
|
37485
37665
|
logger.warn(`This bundle declares collections at "${bundle.manifest.entry.collections}", but that directory did not resolve, so no collections were loaded and no tables will be created. Rebuild with \`rebase build\`.`);
|
|
37486
37666
|
}
|
|
37487
37667
|
//#endregion
|
|
37488
|
-
export { ACCOUNT_SCOPED_STORAGE_BASES, ApiError, BATCH_REF_KEY, BlockedUrlError, BundleError, CONCURRENT_DDL_SQLSTATES, CORS_EXPOSED_HEADERS, CollectionConfigError, 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, StoragePolicyError, TOPOLOGY_ENV_VARS, TransformCache, TusHandler, UPLOAD_COLLECTION_FIELD, UPLOAD_PROPERTY_FIELD, UnknownStorageSourceError, WEBHOOK_DELIVERY_TASK, WebhookDispatcher, _resetRebaseMock, _setRebaseMock, accessModelFromCollections, activeDevEmailSink, applyCollectionDefaults, assertAllowedOutboundUrl, assertCollectionConfigs, assertDistinctSuffixes, assertEmailLinkBases, assertEveryKindBindable, assertFieldOpsValid, assertIfMatch, assertNestedWriteAllowed, assertNoFieldOpsOnCreate, assertNoUserUpsert, assertQueryFieldsReadable, assertUploadWithinPathLimits, assertUploadWithinPropertyLimits, assertUserCreationBodyValid, assertWriteRequestValid, authJwt, authRoles, authUid, backupStorageFromEnv, blockedAddressReason, bootFromBundle, callerScopes, classifySurface, cleanupDevPortFile, clearActiveDevEmailSink, compileStoragePolicies, composeCallbacks, 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, createUserThroughAuthCollection, decideImpersonation, declareCrons, declaredErrorAnswer, declaredUniqueTargets, defaultBackoff, defineCron, defineFunction, devEmailSinkFor, drainBackgroundWork, envSuffixForKey, errorHandler, escapeHtml, extractLinks, extractUserFromToken, fileTokenAuth, findCollectionConfigProblems, generateSecurePassword, getAccessModel, getApiKey, getDriver, getEmailChangeNoticeTemplate, getEmailChangeTemplate, getEmailOtpTemplate, getEmailVerificationTemplate, getEnv, getJwks, getMagicLinkTemplate, getPasswordResetTemplate, getRequestId, getRoles, getSql, getUser, getUserId, getUserInvitationTemplate, getWelcomeEmailTemplate, hasAsymmetricSigningKey, hasFieldOps, hasRole, hasScope, hashPassword, html, httpMethodToOperation, identityResolved, implicitDeclaration, initializeDataSource, initializeDataSources, initializeRebaseBackend, installShutdownHandlers, installUnhandledRejectionHandler, isAcceptedFile, isAdmin, isApiKeyToken, isAuthAdapter, isAuthenticated, isConcurrentDdlRace, isDataException, isDatabaseAdapter, isDatabaseUnreachable, isDuplicateObjectRace, isLocalhostOrigin, isNodeRuntime, isTopologyEnvVar, isTransformableImage, isUncountedPath, lazyResource, listBackupObjects, listenWithPortRetry, loadBootEnv, loadBundle, loadBundleConfigExports, loadBundleSchema, loadCollectionsFromDirectory, loadCronJobsFromDirectory, loadCronJobsWithDiagnostics, loadCrons, loadEnv, loadFunctions, loadFunctionsFromDirectory, loadFunctionsWithDiagnostics, loadUsersCollection, logger, looksLikeFieldOp, mcpAppBaseUri, mcpViewToolInputSchema, oauthCodeFlowSchema, optionalAuth, overridableSecurityHeaders, parseBackupDestination, parseBackupTimestamp, parseFieldOp, parseTransformOptions, pendingBackgroundWork, pkceTokenParams, providerVerifiedEmail, queryTokenAuth, raw, rawQueryLoggingEnabled, readBackupBytes, readBundleManifest, readUploadPropertyContext, realtimeSocketPath, rebase, refuseUnhonouredImpersonation, registerDevEmailSink, registerResourceResolver, reportSimulatedContext, requireAdmin, requireAuth, requireDriver, requireEnv, requireRole, requireScope, resolveApiKey, resolveAuthHooks, resolveAuthOptions, resolveBatchRefs, resolveConflictTarget, resolveCorsOrigin, resolveDataSources, resolveEmailBranding, resolveEmailLinkBase, resolveEmailOptions, resolveRequireAuth, resolveStorageAccessControl, resolveStorageBackend, resolveStorageSources, resourceResolver, resourceResolvers, rowETag, runFromBundle, runtimeKey, safeCompare, schemaDriftRemedy, serveSPA, setDefaultBackend, setLogOutput, splitFieldOps, summarize as summarizeRlsScan, transformImage, tryVerifyOidcIdToken, unbindableKinds, unknownKeyPolicyFromEnv, validateApiKey, validateCronExpression, validatePasswordStrength, verifyCredential, verifyOidcIdToken, verifyPassword, versionProperty, versionedMcpAppUri, waitUntil, z };
|
|
37668
|
+
export { ACCOUNT_SCOPED_STORAGE_BASES, ApiError, BATCH_REF_KEY, BlockedUrlError, BundleError, CONCURRENT_DDL_SQLSTATES, CORS_EXPOSED_HEADERS, CollectionConfigError, 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, StoragePolicyError, TOPOLOGY_ENV_VARS, TransformCache, TusHandler, UPLOAD_COLLECTION_FIELD, UPLOAD_PROPERTY_FIELD, UnknownStorageSourceError, WEBHOOK_DELIVERY_TASK, WebhookDispatcher, _resetRebaseMock, _setRebaseMock, accessModelFromCollections, activeDevEmailSink, applyCollectionDefaults, assertAllowedOutboundUrl, assertCollectionConfigs, assertDistinctSuffixes, assertEmailLinkBases, assertEveryKindBindable, assertFieldOpsValid, assertIfMatch, assertNestedWriteAllowed, assertNoFieldOpsOnCreate, assertNoUserUpsert, assertQueryFieldsReadable, assertUploadWithinPathLimits, assertUploadWithinPropertyLimits, assertUserCreationBodyValid, assertWriteRequestValid, authJwt, authRoles, authUid, backupStorageFromEnv, blockedAddressReason, bootFromBundle, callerScopes, classifySurface, cleanupDevPortFile, clearActiveDevEmailSink, compileStoragePolicies, composeCallbacks, 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, createUserThroughAuthCollection, decideImpersonation, declareCrons, declaredErrorAnswer, declaredUniqueTargets, defaultBackoff, defineCron, defineFunction, devEmailSinkFor, drainBackgroundWork, envSuffixForKey, errorHandler, escapeHtml, extractLinks, extractUserFromToken, fileTokenAuth, findCollectionConfigProblems, generateSecurePassword, 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, isAuthenticated, isConcurrentDdlRace, isDataException, isDatabaseAdapter, isDatabaseUnreachable, isDuplicateObjectRace, isLocalhostOrigin, isNodeRuntime, isTopologyEnvVar, isTransformableImage, isUncountedPath, lazyResource, listBackupObjects, listenWithPortRetry, loadBootEnv, loadBundle, loadBundleConfigExports, loadBundleSchema, loadCollectionsFromDirectory, loadCronJobsFromDirectory, loadCronJobsWithDiagnostics, loadCrons, loadEnv, loadFunctions, loadFunctionsFromDirectory, loadFunctionsWithDiagnostics, loadUsersCollection, logger, looksLikeFieldOp, mcpAppBaseUri, mcpViewToolInputSchema, oauthCodeFlowSchema, optionalAuth, overridableSecurityHeaders, parseBackupDestination, parseBackupTimestamp, parseFieldOp, parseTransformOptions, pendingBackgroundWork, pkceTokenParams, providerVerifiedEmail, queryTokenAuth, raw, rawQueryLoggingEnabled, readBackupBytes, readBundleManifest, readUploadPropertyContext, realtimeSocketPath, rebase, refuseUnhonouredImpersonation, registerDevEmailSink, registerResourceResolver, reportSimulatedContext, requireAdmin, requireAuth, requireDriver, requireEnv, requireRole, requireScope, resolveApiKey, resolveAuthHooks, resolveAuthOptions, resolveBatchRefs, resolveConflictTarget, resolveCorsOrigin, resolveDataSources, resolveEmailBranding, resolveEmailLinkBase, resolveEmailOptions, resolveRequireAuth, resolveStorageAccessControl, resolveStorageBackend, resolveStorageSources, resourceResolver, resourceResolvers, rowETag, runFromBundle, runtimeKey, safeCompare, schemaDriftRemedy, serveSPA, setDefaultBackend, setLogOutput, splitFieldOps, summarize as summarizeRlsScan, transformImage, tryVerifyOidcIdToken, unbindableKinds, unknownKeyPolicyFromEnv, validateApiKey, validateCronExpression, validatePasswordStrength, verifyCredential, verifyOidcIdToken, verifyPassword, versionProperty, versionedMcpAppUri, waitUntil, z };
|
|
37489
37669
|
|
|
37490
37670
|
//# sourceMappingURL=index.es.js.map
|