@rebasepro/server 0.21.1 → 0.22.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/auth/exclude-auth-secrets.d.ts +35 -3
- package/dist/{auth-BS4WBA10.js → auth-CCDpk2rn.js} +12 -9
- package/dist/auth-CCDpk2rn.js.map +1 -0
- package/dist/{cron-routes-B_wlLybo.js → cron-routes-B7CRGfiq.js} +2 -2
- package/dist/{cron-routes-B_wlLybo.js.map → cron-routes-B7CRGfiq.js.map} +1 -1
- package/dist/{cron-store-Dp0X7zRB.js → cron-store-BYGZFNWk.js} +2 -2
- package/dist/{cron-store-Dp0X7zRB.js.map → cron-store-BYGZFNWk.js.map} +1 -1
- package/dist/ddl-bootstrap-CfNvxMuK.js.map +1 -1
- package/dist/{history-recorder-5VKT7nss.js → history-recorder-BQmB0P_j.js} +2 -2
- package/dist/{history-recorder-5VKT7nss.js.map → history-recorder-BQmB0P_j.js.map} +1 -1
- package/dist/{history-store-By2R_G1b.js → history-store-CetkrBBD.js} +2 -2
- package/dist/{history-store-By2R_G1b.js.map → history-store-CetkrBBD.js.map} +1 -1
- package/dist/index.es.js +73 -59
- package/dist/index.es.js.map +1 -1
- package/dist/init/global-callbacks.d.ts +21 -0
- package/dist/{jobs-1IkI4Lle.js → jobs-Bjr8DZAi.js} +2 -2
- package/dist/{jobs-1IkI4Lle.js.map → jobs-Bjr8DZAi.js.map} +1 -1
- package/dist/{openapi-generator-BDpoKZQ9.js → openapi-generator-D8uFz-LW.js} +2 -2
- package/dist/{openapi-generator-BDpoKZQ9.js.map → openapi-generator-D8uFz-LW.js.map} +1 -1
- package/dist/{query-parser-C-rl30ce.js → query-parser-BleZmY18.js} +2 -2
- package/dist/{query-parser-C-rl30ce.js.map → query-parser-BleZmY18.js.map} +1 -1
- package/dist/{src-Caz7nREj.js → src-1vL-I1Po.js} +232 -120
- package/dist/src-1vL-I1Po.js.map +1 -0
- package/package.json +5 -5
- package/dist/auth-BS4WBA10.js.map +0 -1
- package/dist/src-Caz7nREj.js.map +0 -1
package/dist/index.es.js
CHANGED
|
@@ -2,16 +2,16 @@ 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 { A as createDataSourceRegistry, B as
|
|
5
|
+
import { A as createDataSourceRegistry, B as fieldKeyForColumn, D as restrictedFieldNames, E as effectiveAccess, F as revokeInternalTableSql, G as enumToObjectEntries, H as getTableName, I as getJunctionConfigForRelation, J as hydrateRegExp, K as buildCompositeId, L as getEffectiveSecurityRules, M as resolveDataSource, N as authSecretsMissingExclusion, O as assertBeforeQueryIsPostgresOnly, Q as unref, S as cursorToStartAfter, T as canWriteField, V as findRelation, W as resolveCollectionRelations, X as suggestNearMiss, Y as splitSearchTerms, Z as toSnakeCase, _t as isUnsupported, at as isFieldOperation, c as collectAllPages, ct as JUNCTION_PIVOT_KEY, dt as EntityReference, ft as EntityRelation, g as topLevelIncludeNames, gt as RebaseClientError, h as serializeInclude, ht as RebaseApiError, it as hasFieldOperation, j as isRelationalCollection, k as CollectionRegistry, l as paginateFind, lt as isManyToMany, mt as Vector, n as buildSdkData, nt as BATCH_REF_KEY, o as serializeFilter, p as mergeIncludeSpecs, pt as GeoPoint, q as resolvePrimaryKeys, rt as FIELD_OPERATORS, s as serializeLogicalCondition, t as buildRoutedRebaseData, u as resolveFindWindow, v as normalizeOrderBy, vt as unsupportedMethod, y as serializeOrderBy, z as securityRuleToConditions } from "./src-1vL-I1Po.js";
|
|
6
6
|
import { E as DEFAULT_DATA_SOURCE_KEY, F as sortKeyToString, I as toCanonicalOp, P as parseRelationAggregateSort, S as getCollectionDataPath, _ as resourceKinds, a as resourceToStorageSource, b as RLS_UID_SQL, c as DEFAULT_STORAGE_SOURCE_KEY, d as DEFAULT_RESOURCE_KEY, f as buildResourceGraph, g as resourceKind, h as resourceKeyOf, i as resourceToDataSource, l as findStorageSuffixCollision, m as resourceEnvSuffix, n as declaredQueueConsumers, o as setQueueRuntime, p as resolveResourceRefs, r as declaredSubscriptions, s as setTopicRuntime, u as storageEnvSuffix, v as RLS_JWT_SQL, w as isPostgresCollectionConfig, y as RLS_ROLES_SQL } from "./src-Br6ARbs6.js";
|
|
7
7
|
import { n as ADMIN_PROPERTY_KEYS, t as ADMIN_COLLECTION_KEYS } from "./admin_block-DxKLmdiv.js";
|
|
8
8
|
import { a as isDuplicateObjectRace, i as isConcurrentDdlRace, n as createDdlBootstrapper, o as isSQLAdmin, s as isSchemaEditingAdmin, t as CONCURRENT_DDL_SQLSTATES } from "./ddl-bootstrap-CfNvxMuK.js";
|
|
9
9
|
import { i as parseEnvBoolean, r as validateCronExpression, t as CronScheduler } from "./cron-scheduler-COPQxlEq.js";
|
|
10
10
|
import { i as SCHEMA_VERSION_HEADER, n as createContractRoutes, r as computeSchemaVersion } from "./contract-routes-eLxV0le1.js";
|
|
11
|
-
import { $ as requireAdmin, A as defaultAuthLimiter, B as resolveEmailLinkBase, C as providerVerifiedEmail, Ct as raw, D as DEFAULT_FUNCTIONS_ANONYMOUS_LIMIT, Dt as isPublicStoragePath, E as isBootstrapWindowOpen, Et as PUBLIC_STORAGE_PREFIX, F as extractLinks, G as createAdapterAuthMiddleware, H as hashPassword, I as registerDevEmailSink, J as extractUserFromToken, K as createAuthMiddleware, L as SMTPEmailService, M as activeDevEmailSink, N as clearActiveDevEmailSink, O as createDataRateLimiter, P as createDevEmailSink, Q as queryTokenAuth, R as createEmailService, S as pkceTokenParams, St as html, T as createBuiltinAuthAdapter, Tt as isOperationAllowed, U as validatePasswordStrength, V as resolveAuthHooks, W as verifyPassword, X as optionalAuth, Y as fileTokenAuth, Z as publicObjectAuth, _ as verifyOidcIdToken, _t as getUserInvitationTemplate, a as resolveRateLimitStoreKind, at as validateApiKey, b as createGoogleProvider, bt as RawHtml, c as createSlackProvider, ct as SERVICE_IDENTITY, d as createDiscordProvider, dt as completeUserCreation, et as requireAuth, f as createTwitterProvider, ft as generateSecurePassword, g as tryVerifyOidcIdToken, gt as getPasswordResetTemplate, h as createMicrosoftProvider, ht as getMagicLinkTemplate, i as createApiKeyStore, it as isApiKeyToken, j as MemoryRateLimitStore, k as createRateLimiter, l as createBitbucketProvider, lt as scopeDataDriver, m as createAppleProvider, mt as getEmailVerificationTemplate, n as createCustomAuthAdapter, nt as createFunctionApiKeyGuard, o as createSqlRateLimitStore, ot as extractBearerToken, p as createFacebookProvider, pt as getEmailOtpTemplate, q as createRequireAuth, r as createApiKeyRoutes, rt as createStorageApiKeyGuard, s as createSpotifyProvider, st as safeCompare, tt as createApiKeyPreAuth, u as createGitLabProvider, ut as supportsRlsScoping, v as createGitHubProvider, vt as getWelcomeEmailTemplate, w as createJwksRoutes, wt as httpMethodToOperation, x as oauthCodeFlowSchema, xt as escapeHtml, y as createLinkedinProvider, yt as resolveEmailBranding, z as assertEmailLinkBases } from "./auth-
|
|
11
|
+
import { $ as requireAdmin, A as defaultAuthLimiter, B as resolveEmailLinkBase, C as providerVerifiedEmail, Ct as raw, D as DEFAULT_FUNCTIONS_ANONYMOUS_LIMIT, Dt as isPublicStoragePath, E as isBootstrapWindowOpen, Et as PUBLIC_STORAGE_PREFIX, F as extractLinks, G as createAdapterAuthMiddleware, H as hashPassword, I as registerDevEmailSink, J as extractUserFromToken, K as createAuthMiddleware, L as SMTPEmailService, M as activeDevEmailSink, N as clearActiveDevEmailSink, O as createDataRateLimiter, P as createDevEmailSink, Q as queryTokenAuth, R as createEmailService, S as pkceTokenParams, St as html, T as createBuiltinAuthAdapter, Tt as isOperationAllowed, U as validatePasswordStrength, V as resolveAuthHooks, W as verifyPassword, X as optionalAuth, Y as fileTokenAuth, Z as publicObjectAuth, _ as verifyOidcIdToken, _t as getUserInvitationTemplate, a as resolveRateLimitStoreKind, at as validateApiKey, b as createGoogleProvider, bt as RawHtml, c as createSlackProvider, ct as SERVICE_IDENTITY, d as createDiscordProvider, dt as completeUserCreation, et as requireAuth, f as createTwitterProvider, ft as generateSecurePassword, g as tryVerifyOidcIdToken, gt as getPasswordResetTemplate, h as createMicrosoftProvider, ht as getMagicLinkTemplate, i as createApiKeyStore, it as isApiKeyToken, j as MemoryRateLimitStore, k as createRateLimiter, l as createBitbucketProvider, lt as scopeDataDriver, m as createAppleProvider, mt as getEmailVerificationTemplate, n as createCustomAuthAdapter, nt as createFunctionApiKeyGuard, o as createSqlRateLimitStore, ot as extractBearerToken, p as createFacebookProvider, pt as getEmailOtpTemplate, q as createRequireAuth, r as createApiKeyRoutes, rt as createStorageApiKeyGuard, s as createSpotifyProvider, st as safeCompare, tt as createApiKeyPreAuth, u as createGitLabProvider, ut as supportsRlsScoping, v as createGitHubProvider, vt as getWelcomeEmailTemplate, w as createJwksRoutes, wt as httpMethodToOperation, x as oauthCodeFlowSchema, xt as escapeHtml, y as createLinkedinProvider, yt as resolveEmailBranding, z as assertEmailLinkBases } from "./auth-CCDpk2rn.js";
|
|
12
12
|
import { i as rawQueryLoggingEnabled, n as describeCauseChain, o as setLogLevel, r as logger, s as hostEnv } from "./logger-DO2PZc4i.js";
|
|
13
13
|
import { i as schemaDriftRemedy, n as declaredErrorAnswer, r as errorHandler, t as ApiError } from "./errors-DWsX4yTd.js";
|
|
14
|
-
import { a as resolveListLimitParam, c as HARD_DELETE_QUERY_PARAM, i as parseQueryOptions, l as parseHardDelete, n as parseAggregateSelect, o as assertReadableFields, r as parseGroupBy, s as requestViewer, t as orderByEntriesToTuples } from "./query-parser-
|
|
14
|
+
import { a as resolveListLimitParam, c as HARD_DELETE_QUERY_PARAM, i as parseQueryOptions, l as parseHardDelete, n as parseAggregateSelect, o as assertReadableFields, r as parseGroupBy, s as requestViewer, t as orderByEntriesToTuples } from "./query-parser-BleZmY18.js";
|
|
15
15
|
import { D as sha256Bytes, O as sha256Hex, S as normalizePemFromEnv, T as randomHex, _ as verifyAccessToken, a as generateMcpAccessToken, f as hasAsymmetricSigningKey, g as signPurposeToken, i as generateDownloadToken, l as getJwks, m as isJwtConfigured, n as configureJwt, w as constantTimeEqual, x as verifyPurposeToken, y as verifyMcpAccessToken } from "./jwt-C4OW-DNq.js";
|
|
16
16
|
import { a as canonicalStorageKey, i as canonicalStorageId, n as InvalidStorageKeyError, r as canonicalStorageBucket, t as InvalidStorageBucketError } from "./keys-Qfc4XieN.js";
|
|
17
17
|
import { t as logMiddleware } from "./logs-routes-3EEzPjhl.js";
|
|
@@ -24,11 +24,11 @@ import "./proxy-Czngl3p9.js";
|
|
|
24
24
|
import "./request-timeout-C_4C2BeR.js";
|
|
25
25
|
import { t as FunctionSelectionError } from "./selection-CRpqKUbt.js";
|
|
26
26
|
import { n as loadCronJobsFromDirectory, r as loadCronJobsWithDiagnostics } from "./cron-loader-CQjvjpEw.js";
|
|
27
|
-
import { t as createCronRoutes } from "./cron-routes-
|
|
28
|
-
import { t as createCronStore } from "./cron-store-
|
|
27
|
+
import { t as createCronRoutes } from "./cron-routes-B7CRGfiq.js";
|
|
28
|
+
import { t as createCronStore } from "./cron-store-BYGZFNWk.js";
|
|
29
29
|
import { a as parseBackupTimestamp, i as parseBackupDestination, n as createBackupRoutes, o as readBackupBytes, r as listBackupObjects } from "./backup-DzI9jLwc.js";
|
|
30
|
-
import { a as currentAmbientTransaction, i as createJobStore, n as createJobQueue, r as defaultBackoff } from "./jobs-
|
|
31
|
-
import { t as METRIC_SERIES } from "./history-store-
|
|
30
|
+
import { a as currentAmbientTransaction, i as createJobStore, n as createJobQueue, r as defaultBackoff } from "./jobs-Bjr8DZAi.js";
|
|
31
|
+
import { t as METRIC_SERIES } from "./history-store-CetkrBBD.js";
|
|
32
32
|
import { createHash, createSign, randomBytes } from "node:crypto";
|
|
33
33
|
import * as fs$3 from "fs";
|
|
34
34
|
import fs, { existsSync } from "fs";
|
|
@@ -7379,7 +7379,7 @@ async function mountOpenApiDocs(app, basePath, enableSwagger, serverCollections,
|
|
|
7379
7379
|
basePath,
|
|
7380
7380
|
requireAuth
|
|
7381
7381
|
}));
|
|
7382
|
-
const { generateOpenApiSpec } = await import("./openapi-generator-
|
|
7382
|
+
const { generateOpenApiSpec } = await import("./openapi-generator-D8uFz-LW.js");
|
|
7383
7383
|
generateOpenApiSpecFn = generateOpenApiSpec;
|
|
7384
7384
|
if (isPublic) app.get(`${basePath}/docs`, (c) => spec(c));
|
|
7385
7385
|
else app.get(`${basePath}/docs`, createRequireAuth({}), requireAdmin, (c) => spec(c));
|
|
@@ -8834,6 +8834,33 @@ function injectCallbackClient(results, client) {
|
|
|
8834
8834
|
return injected;
|
|
8835
8835
|
}
|
|
8836
8836
|
//#endregion
|
|
8837
|
+
//#region src/init/global-callbacks.ts
|
|
8838
|
+
/**
|
|
8839
|
+
* Hand the backend's global callbacks to one driver.
|
|
8840
|
+
*
|
|
8841
|
+
* `initializeRebaseBackend({ callbacks })` is declared once, on the backend,
|
|
8842
|
+
* but no driver resolves callbacks from the backend's `collectionRegistry`:
|
|
8843
|
+
* each builds a registry of its own in `initializeDriver` and reads global
|
|
8844
|
+
* callbacks from that. So they are given to each driver here, by the
|
|
8845
|
+
* coordinator, rather than left for every driver to remember to ask for.
|
|
8846
|
+
*
|
|
8847
|
+
* Refuses rather than skipping, in two cases.
|
|
8848
|
+
*
|
|
8849
|
+
* - **A registry that cannot take them.** Every collection that driver serves
|
|
8850
|
+
* would run with the global hooks off, an `afterRead` that masks PII among
|
|
8851
|
+
* them, and nothing would say so.
|
|
8852
|
+
* - **A global `beforeQuery` on a driver that does not compile one.** Only
|
|
8853
|
+
* `@rebasepro/server-postgres` narrows a read before running it. Anywhere
|
|
8854
|
+
* else the hook is a row filter that filters nothing, which is the refusal
|
|
8855
|
+
* `assertBeforeQueryIsPostgresOnly` makes for a collection's own hook.
|
|
8856
|
+
*/
|
|
8857
|
+
function handGlobalCallbacksTo(driverId, engine, driverResult, callbacks) {
|
|
8858
|
+
if (callbacks.beforeQuery && engine !== "postgres") throw new Error(`callbacks.beforeQuery: a global \`beforeQuery\` narrows every collection's reads before they are compiled, which is a Postgres feature, and data source "${driverId}" is served by \`${engine}\`. Its collections would keep returning every row the engine allows. Declare the hook on the Postgres collections that need it instead. Redaction that works on every engine is \`afterRead\`.`);
|
|
8859
|
+
const registry = driverResult.collectionRegistry;
|
|
8860
|
+
if (!registry?.setGlobalCallbacks) throw new Error(`callbacks: data source "${driverId}" (\`${engine}\`) returned no collection registry that accepts global callbacks, so the ones declared on \`initializeRebaseBackend({ callbacks })\` would not run on any of its collections. Return a \`collectionRegistry\` implementing \`setGlobalCallbacks\` from the adapter's \`initializeDriver\`, or move the hooks onto each collection's \`callbacks\`.`);
|
|
8861
|
+
registry.setGlobalCallbacks(callbacks);
|
|
8862
|
+
}
|
|
8863
|
+
//#endregion
|
|
8837
8864
|
//#region src/init/process-safety.ts
|
|
8838
8865
|
/**
|
|
8839
8866
|
* Installed once per process. The singleton is process-global for the same
|
|
@@ -10685,57 +10712,31 @@ function warnOnAuthCollectionDataCallbacks(collection) {
|
|
|
10685
10712
|
* So the framework restates it. Not by rejecting the collection — a boot failure
|
|
10686
10713
|
* over a field a developer never thought about is a bad trade, and an existing
|
|
10687
10714
|
* deployment would stop rather than start protecting itself — but by adding the
|
|
10688
|
-
* flag and saying so. Which columns count is
|
|
10689
|
-
*
|
|
10690
|
-
*
|
|
10691
|
-
|
|
10692
|
-
|
|
10693
|
-
* The column names the default users collection marks `excludeFromApi`.
|
|
10694
|
-
*
|
|
10695
|
-
* Keyed by *column*, not by property name, because the whole point is to match a
|
|
10696
|
-
* redeclaration that chose different property names — the control plane's copy
|
|
10697
|
-
* spelled them `password_hash` and `email_verification_token` where the default
|
|
10698
|
-
* says `passwordHash` and `emailVerificationToken`.
|
|
10715
|
+
* flag and saying so. Which columns count is decided once, by
|
|
10716
|
+
* {@link authSecretsMissingExclusion} in `@rebasepro/common`, and every
|
|
10717
|
+
* `CollectionRegistry` applies the same rule to the copies it makes — which is
|
|
10718
|
+
* how the panel, building its registry from the project's file as written,
|
|
10719
|
+
* agrees with the server.
|
|
10699
10720
|
*/
|
|
10700
|
-
function defaultExcludedColumns() {
|
|
10701
|
-
const properties = defaultUsersCollection.properties ?? {};
|
|
10702
|
-
const columns = /* @__PURE__ */ new Set();
|
|
10703
|
-
for (const [key, property] of Object.entries(properties)) {
|
|
10704
|
-
if (!property?.excludeFromApi) continue;
|
|
10705
|
-
columns.add(property.columnName ?? key);
|
|
10706
|
-
columns.add(key);
|
|
10707
|
-
}
|
|
10708
|
-
return columns;
|
|
10709
|
-
}
|
|
10710
|
-
/** Is this collection the one the auth subsystem stores users in? */
|
|
10711
|
-
function isAuthCollection(collection) {
|
|
10712
|
-
const auth = collection.auth;
|
|
10713
|
-
if (auth === true) return true;
|
|
10714
|
-
return Boolean(auth && typeof auth === "object" && auth.enabled === true);
|
|
10715
|
-
}
|
|
10716
10721
|
/**
|
|
10717
10722
|
* Force `excludeFromApi` onto the auth collection's secret columns.
|
|
10718
10723
|
*
|
|
10719
|
-
* Mutates in place
|
|
10720
|
-
*
|
|
10721
|
-
*
|
|
10724
|
+
* Mutates in place, for what reads the collection configs directly rather than a
|
|
10725
|
+
* registry's normalized copies. Run it before the collections are handed on, so
|
|
10726
|
+
* those readers never see a config without the flag.
|
|
10722
10727
|
*
|
|
10723
10728
|
* @returns the columns it had to fix, per collection — for the caller to log and
|
|
10724
10729
|
* for tests to assert on.
|
|
10725
10730
|
*/
|
|
10726
10731
|
function enforceAuthSecretExclusion(collections) {
|
|
10727
|
-
const secrets = defaultExcludedColumns();
|
|
10728
10732
|
const fixed = [];
|
|
10729
10733
|
for (const raw of collections) {
|
|
10730
10734
|
const collection = raw;
|
|
10731
|
-
if (!collection?.properties
|
|
10732
|
-
const columns =
|
|
10733
|
-
for (const
|
|
10734
|
-
|
|
10735
|
-
|
|
10736
|
-
if (!secrets.has(column) && !secrets.has(key)) continue;
|
|
10737
|
-
property.excludeFromApi = true;
|
|
10738
|
-
columns.push(key);
|
|
10735
|
+
if (!collection?.properties) continue;
|
|
10736
|
+
const columns = authSecretsMissingExclusion(collection);
|
|
10737
|
+
for (const key of columns) {
|
|
10738
|
+
const property = collection.properties[key];
|
|
10739
|
+
if (property) property.excludeFromApi = true;
|
|
10739
10740
|
}
|
|
10740
10741
|
if (columns.length > 0) fixed.push({
|
|
10741
10742
|
slug: collection.slug ?? "(unnamed)",
|
|
@@ -15475,16 +15476,23 @@ function matchesLogical(row, condition) {
|
|
|
15475
15476
|
* cached row does not carry — a local list may therefore be missing rows the
|
|
15476
15477
|
* server would have returned, which is why {@link isExactlyEvaluable} refuses
|
|
15477
15478
|
* to call a search query exact.
|
|
15479
|
+
*
|
|
15480
|
+
* Every term has to match, but they may match different fields — the same rule
|
|
15481
|
+
* both drivers apply, and the one that finds `sebastian melendez` on a row that
|
|
15482
|
+
* keeps the two halves of a name in separate fields. Matching the typed string
|
|
15483
|
+
* as a whole found neither that row nor, because the space was part of the
|
|
15484
|
+
* needle, anything at all for `sebastian `.
|
|
15478
15485
|
*/
|
|
15479
15486
|
function matchesSearch(row, searchString) {
|
|
15480
15487
|
if (!searchString) return true;
|
|
15481
|
-
const
|
|
15482
|
-
if (
|
|
15483
|
-
|
|
15484
|
-
|
|
15485
|
-
if (typeof value === "
|
|
15486
|
-
|
|
15487
|
-
|
|
15488
|
+
const terms = splitSearchTerms(searchString).map((term) => term.toLowerCase());
|
|
15489
|
+
if (terms.length === 0) return true;
|
|
15490
|
+
const values = Object.values(row);
|
|
15491
|
+
return terms.every((term) => values.some((value) => {
|
|
15492
|
+
if (typeof value === "string") return value.toLowerCase().includes(term);
|
|
15493
|
+
if (typeof value === "number") return String(value).includes(term);
|
|
15494
|
+
return false;
|
|
15495
|
+
}));
|
|
15488
15496
|
}
|
|
15489
15497
|
/** Does this row belong in the result set for `params`, ignoring pagination? */
|
|
15490
15498
|
function matchesParams(row, params) {
|
|
@@ -18932,6 +18940,7 @@ async function _initializeRebaseBackend(config) {
|
|
|
18932
18940
|
provision: config.provisionSchema ?? true
|
|
18933
18941
|
}
|
|
18934
18942
|
});
|
|
18943
|
+
if (config.callbacks) handGlobalCallbacksTo(b.id || bootstrapper.type, bootstrapper.type, driverResult, config.callbacks);
|
|
18935
18944
|
delegates[b.id || bootstrapper.type] = driverResult.driver;
|
|
18936
18945
|
driverResults.set(bootstrapper, driverResult);
|
|
18937
18946
|
if (introspectCollections) {
|
|
@@ -19171,7 +19180,7 @@ async function _initializeRebaseBackend(config) {
|
|
|
19171
19180
|
]) {
|
|
19172
19181
|
const providerConfig = safeAuthConfig[key];
|
|
19173
19182
|
if (providerConfig && requiredFields.every((f) => Boolean(providerConfig[f]))) {
|
|
19174
|
-
const createFn = (await import("./auth-
|
|
19183
|
+
const createFn = (await import("./auth-CCDpk2rn.js").then((n) => n.t))[factory];
|
|
19175
19184
|
oauthProviders.push(createFn(providerConfig));
|
|
19176
19185
|
}
|
|
19177
19186
|
}
|
|
@@ -19676,8 +19685,8 @@ async function _initializeRebaseBackend(config) {
|
|
|
19676
19685
|
if (surfaces.cron || config.cronsDir && ownership.cronScheduler) {
|
|
19677
19686
|
const { loadCronJobsWithDiagnostics } = await import("./cron-loader-CQjvjpEw.js").then((n) => n.t);
|
|
19678
19687
|
const { CronScheduler } = await import("./cron-scheduler-COPQxlEq.js").then((n) => n.n);
|
|
19679
|
-
const { createCronRoutes } = await import("./cron-routes-
|
|
19680
|
-
const { createCronStore } = await import("./cron-store-
|
|
19688
|
+
const { createCronRoutes } = await import("./cron-routes-B7CRGfiq.js").then((n) => n.n);
|
|
19689
|
+
const { createCronStore } = await import("./cron-store-BYGZFNWk.js").then((n) => n.n);
|
|
19681
19690
|
const { jobs: loadedCronJobs, problems: cronProblems } = config.cronsDir ? await loadCronJobsWithDiagnostics(config.cronsDir) : {
|
|
19682
19691
|
jobs: [],
|
|
19683
19692
|
problems: []
|
|
@@ -19734,7 +19743,7 @@ async function _initializeRebaseBackend(config) {
|
|
|
19734
19743
|
}
|
|
19735
19744
|
let metricsHistory;
|
|
19736
19745
|
try {
|
|
19737
|
-
const { createMetricsHistory } = await import("./history-recorder-
|
|
19746
|
+
const { createMetricsHistory } = await import("./history-recorder-BQmB0P_j.js");
|
|
19738
19747
|
metricsHistory = createMetricsHistory(defaultDriver);
|
|
19739
19748
|
if (metricsHistory) {
|
|
19740
19749
|
await metricsHistory.ensure();
|
|
@@ -19746,7 +19755,7 @@ async function _initializeRebaseBackend(config) {
|
|
|
19746
19755
|
}
|
|
19747
19756
|
let jobQueue;
|
|
19748
19757
|
if (config.jobs?.enabled) {
|
|
19749
|
-
const { createJobStore, createJobQueue } = await import("./jobs-
|
|
19758
|
+
const { createJobStore, createJobQueue } = await import("./jobs-Bjr8DZAi.js").then((n) => n.t);
|
|
19750
19759
|
const store = createJobStore(defaultDriver);
|
|
19751
19760
|
if (store) {
|
|
19752
19761
|
await store.ensureTable();
|
|
@@ -19885,6 +19894,11 @@ Use a driver that supports the job queue, or remove the declarations. Refusing t
|
|
|
19885
19894
|
return targets;
|
|
19886
19895
|
};
|
|
19887
19896
|
const setCollectionCallbacks = (slug, callbacks) => {
|
|
19897
|
+
const declared = collectionRegistry.get(slug);
|
|
19898
|
+
if (declared) assertBeforeQueryIsPostgresOnly([{
|
|
19899
|
+
...declared,
|
|
19900
|
+
callbacks
|
|
19901
|
+
}]);
|
|
19888
19902
|
let attached = 0;
|
|
19889
19903
|
const replaced = /* @__PURE__ */ new Set();
|
|
19890
19904
|
for (const registry of callbackTargets()) {
|