@rebasepro/server 0.12.1-canary.gf5f1d39 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/GCSStorageController-BEmDYFKc.js +216 -0
- package/dist/GCSStorageController-BEmDYFKc.js.map +1 -0
- package/dist/S3StorageController-B2EDXXMH.js +249 -0
- package/dist/S3StorageController-B2EDXXMH.js.map +1 -0
- package/dist/admin_block-CcSGdH7M.js +124 -0
- package/dist/admin_block-CcSGdH7M.js.map +1 -0
- package/dist/api/rest/write-validation.d.ts +22 -0
- package/dist/auth/bearer-token.d.ts +26 -0
- package/dist/auth/index.d.ts +1 -1
- package/dist/auth/middleware.d.ts +2 -0
- package/dist/auth/rate-limiter.d.ts +0 -11
- package/dist/auth/require-auth.d.ts +39 -0
- package/dist/auth-CuC9M2x6.js +8961 -0
- package/dist/auth-CuC9M2x6.js.map +1 -0
- package/dist/backend-CIxN4FVm.js +15 -0
- package/dist/backend-CIxN4FVm.js.map +1 -0
- package/dist/backup-CVggVhR2.js +163 -0
- package/dist/backup-CVggVhR2.js.map +1 -0
- package/dist/boot/boot.d.ts +53 -0
- package/dist/boot/driver.d.ts +35 -6
- package/dist/boot/fetch-bundle.d.ts +43 -0
- package/dist/boot/version-skew.d.ts +77 -0
- package/dist/contract-routes-Dj8i5AiM.js +264 -0
- package/dist/contract-routes-Dj8i5AiM.js.map +1 -0
- package/dist/cron/cron-scheduler.d.ts +34 -0
- package/dist/cron-loader-B1S2MCSl.js +63 -0
- package/dist/cron-loader-B1S2MCSl.js.map +1 -0
- package/dist/cron-routes-CrQ0tK-_.js +62 -0
- package/dist/cron-routes-CrQ0tK-_.js.map +1 -0
- package/dist/cron-scheduler-B3RFt0HS.js +647 -0
- package/dist/cron-scheduler-B3RFt0HS.js.map +1 -0
- package/dist/cron-store-BywZsyfZ.js +164 -0
- package/dist/cron-store-BywZsyfZ.js.map +1 -0
- package/dist/dynamic-import-Dvh-K5fl.js.map +1 -1
- package/dist/errors-CgkCzoj7.js +226 -0
- package/dist/errors-CgkCzoj7.js.map +1 -0
- package/dist/function-loader-B_1fYfUY.js +86 -0
- package/dist/function-loader-B_1fYfUY.js.map +1 -0
- package/dist/function-routes-C0cLIy3N.js +28 -0
- package/dist/function-routes-C0cLIy3N.js.map +1 -0
- package/dist/functions/define-function.d.ts +2 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.es.js +8123 -17984
- package/dist/index.es.js.map +1 -1
- package/dist/init.d.ts +21 -5
- package/dist/{jwt-D-eI6TTu.js → jwt-DD6EtpGj.js} +32 -13
- package/dist/{jwt-D-eI6TTu.js.map → jwt-DD6EtpGj.js.map} +1 -1
- package/dist/logger-BYU66ENZ.js.map +1 -1
- package/dist/logs-routes-BYA72C_C.js +100 -0
- package/dist/logs-routes-BYA72C_C.js.map +1 -0
- package/dist/{openapi-generator-Bjzmb5cn.js → openapi-generator-BEwyiaAr.js} +9 -3
- package/dist/openapi-generator-BEwyiaAr.js.map +1 -0
- package/dist/{schema-editor-routes-DDxfOIid.js → schema-editor-routes-CbF20Mf1.js} +4 -3
- package/dist/{schema-editor-routes-DDxfOIid.js.map → schema-editor-routes-CbF20Mf1.js.map} +1 -1
- package/dist/singleton.d.ts +4 -2
- package/dist/{src-CoOAMnBh.js → src-Cum9kox5.js} +501 -86
- package/dist/src-Cum9kox5.js.map +1 -0
- package/dist/src-_qQ3RNCK.js +279 -0
- package/dist/src-_qQ3RNCK.js.map +1 -0
- package/dist/types-DSnOC4mF.js +38 -0
- package/dist/types-DSnOC4mF.js.map +1 -0
- package/package.json +10 -10
- package/dist/openapi-generator-Bjzmb5cn.js.map +0 -1
- package/dist/src-CoOAMnBh.js.map +0 -1
- package/dist/src-Ivjud8jD.js +0 -957
- package/dist/src-Ivjud8jD.js.map +0 -1
- /package/dist/{chunk-DSJWtz9O.js → rolldown-runtime-DSJWtz9O.js} +0 -0
package/dist/init.d.ts
CHANGED
|
@@ -428,11 +428,7 @@ export interface RebaseBackendConfig {
|
|
|
428
428
|
/** Runtime version reported by the contract endpoint. Informational. */
|
|
429
429
|
runtimeVersion?: string;
|
|
430
430
|
}
|
|
431
|
-
|
|
432
|
-
* Type guard to detect whether the `auth` config is an `AuthAdapter`
|
|
433
|
-
* (has a `verifyRequest` method) vs a plain `RebaseAuthConfig` (plain object).
|
|
434
|
-
*/
|
|
435
|
-
export declare function isAuthAdapter(auth: RebaseAuthConfig | AuthAdapter): auth is AuthAdapter;
|
|
431
|
+
export { isAuthAdapter } from "./auth/require-auth";
|
|
436
432
|
/**
|
|
437
433
|
* Type guard to detect whether `database` is a `DatabaseAdapter`.
|
|
438
434
|
*/
|
|
@@ -480,4 +476,24 @@ export interface RebaseBackendInstance {
|
|
|
480
476
|
*/
|
|
481
477
|
shutdown(timeoutMs?: number): Promise<void>;
|
|
482
478
|
}
|
|
479
|
+
/**
|
|
480
|
+
* Present a `DatabaseAdapter` as a `BackendBootstrapper`.
|
|
481
|
+
*
|
|
482
|
+
* The `config.database` convenience path — one adapter, no explicit source keys
|
|
483
|
+
* — funnels through here. `adapterToBootstrapper` in `boot/driver.ts` does the
|
|
484
|
+
* same job for the multi-source path, and the two stay separate because only
|
|
485
|
+
* that one carries a registry id and a default flag; this path has exactly one
|
|
486
|
+
* driver and needs neither.
|
|
487
|
+
*
|
|
488
|
+
* Extracted from the middle of `initializeRebaseBackend` so it can be tested.
|
|
489
|
+
* Both wrappers rebuild the bootstrapper field by field, which means any
|
|
490
|
+
* capability nobody remembers to list is dropped in silence — no type error,
|
|
491
|
+
* because every one of them is optional, and no runtime error either, because
|
|
492
|
+
* the caller's own fallback for "driver does not implement this" is to skip.
|
|
493
|
+
* That is not hypothetical: `ensureCollectionSchema` was missing from both
|
|
494
|
+
* wrappers for months, so every managed tenant booted with no collection tables
|
|
495
|
+
* and 500'd on every data route. `bootstrapper-forwarding.test.ts` now asserts
|
|
496
|
+
* both wrappers pass through the whole optional surface.
|
|
497
|
+
*/
|
|
498
|
+
export declare function wrapDatabaseAdapter(dbAdapter: DatabaseAdapter): BackendBootstrapper;
|
|
483
499
|
export declare function initializeRebaseBackend(config: RebaseBackendConfig): Promise<RebaseBackendInstance>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __createRequire } from "module";
|
|
2
2
|
import process from "process";
|
|
3
3
|
__createRequire(import.meta.url);
|
|
4
|
-
import { i as __toESM, n as __exportAll, r as __require, t as __commonJSMin } from "./
|
|
4
|
+
import { i as __toESM, n as __exportAll, r as __require, t as __commonJSMin } from "./rolldown-runtime-DSJWtz9O.js";
|
|
5
5
|
import { t as logger } from "./logger-BYU66ENZ.js";
|
|
6
6
|
import { createHash, randomBytes } from "crypto";
|
|
7
7
|
//#region ../../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js
|
|
@@ -111,7 +111,13 @@ var require_param_bytes_for_alg = /* @__PURE__ */ __commonJSMin(((exports, modul
|
|
|
111
111
|
var require_ecdsa_sig_formatter = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
112
112
|
var Buffer = require_safe_buffer().Buffer;
|
|
113
113
|
var getParamBytesForAlg = require_param_bytes_for_alg();
|
|
114
|
-
var MAX_OCTET = 128
|
|
114
|
+
var MAX_OCTET = 128;
|
|
115
|
+
var CLASS_UNIVERSAL = 0;
|
|
116
|
+
var PRIMITIVE_BIT = 32;
|
|
117
|
+
var TAG_SEQ = 16;
|
|
118
|
+
var TAG_INT = 2;
|
|
119
|
+
var ENCODED_TAG_SEQ = TAG_SEQ | PRIMITIVE_BIT | CLASS_UNIVERSAL << 6;
|
|
120
|
+
var ENCODED_TAG_INT = TAG_INT | CLASS_UNIVERSAL << 6;
|
|
115
121
|
function base64Url(base64) {
|
|
116
122
|
return base64.replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
117
123
|
}
|
|
@@ -2423,9 +2429,16 @@ var require_lodash_includes = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
2423
2429
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
2424
2430
|
*/
|
|
2425
2431
|
/** Used as references for various `Number` constants. */
|
|
2426
|
-
var INFINITY = Infinity
|
|
2432
|
+
var INFINITY = Infinity;
|
|
2433
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
2434
|
+
var MAX_INTEGER = 17976931348623157e292;
|
|
2435
|
+
var NAN = NaN;
|
|
2427
2436
|
/** `Object#toString` result references. */
|
|
2428
|
-
var argsTag = "[object Arguments]"
|
|
2437
|
+
var argsTag = "[object Arguments]";
|
|
2438
|
+
var funcTag = "[object Function]";
|
|
2439
|
+
var genTag = "[object GeneratorFunction]";
|
|
2440
|
+
var stringTag = "[object String]";
|
|
2441
|
+
var symbolTag = "[object Symbol]";
|
|
2429
2442
|
/** Used to match leading and trailing whitespace. */
|
|
2430
2443
|
var reTrim = /^\s+|\s+$/g;
|
|
2431
2444
|
/** Used to detect bad signed hexadecimal string values. */
|
|
@@ -2547,7 +2560,8 @@ var require_lodash_includes = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
2547
2560
|
var objectToString = objectProto.toString;
|
|
2548
2561
|
/** Built-in value references. */
|
|
2549
2562
|
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
2550
|
-
var nativeKeys = overArg(Object.keys, Object)
|
|
2563
|
+
var nativeKeys = overArg(Object.keys, Object);
|
|
2564
|
+
var nativeMax = Math.max;
|
|
2551
2565
|
/**
|
|
2552
2566
|
* Creates an array of the enumerable property names of the array-like `value`.
|
|
2553
2567
|
*
|
|
@@ -2908,7 +2922,7 @@ var require_lodash_includes = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
2908
2922
|
function toFinite(value) {
|
|
2909
2923
|
if (!value) return value === 0 ? value : 0;
|
|
2910
2924
|
value = toNumber(value);
|
|
2911
|
-
if (value === INFINITY || value === -
|
|
2925
|
+
if (value === INFINITY || value === -Infinity) return (value < 0 ? -1 : 1) * MAX_INTEGER;
|
|
2912
2926
|
return value === value ? value : 0;
|
|
2913
2927
|
}
|
|
2914
2928
|
/**
|
|
@@ -3115,7 +3129,9 @@ var require_lodash_isinteger = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
3115
3129
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
3116
3130
|
*/
|
|
3117
3131
|
/** Used as references for various `Number` constants. */
|
|
3118
|
-
var INFINITY = Infinity
|
|
3132
|
+
var INFINITY = Infinity;
|
|
3133
|
+
var MAX_INTEGER = 17976931348623157e292;
|
|
3134
|
+
var NAN = NaN;
|
|
3119
3135
|
/** `Object#toString` result references. */
|
|
3120
3136
|
var symbolTag = "[object Symbol]";
|
|
3121
3137
|
/** Used to match leading and trailing whitespace. */
|
|
@@ -3265,7 +3281,7 @@ var require_lodash_isinteger = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
3265
3281
|
function toFinite(value) {
|
|
3266
3282
|
if (!value) return value === 0 ? value : 0;
|
|
3267
3283
|
value = toNumber(value);
|
|
3268
|
-
if (value === INFINITY || value === -
|
|
3284
|
+
if (value === INFINITY || value === -Infinity) return (value < 0 ? -1 : 1) * MAX_INTEGER;
|
|
3269
3285
|
return value === value ? value : 0;
|
|
3270
3286
|
}
|
|
3271
3287
|
/**
|
|
@@ -3450,7 +3466,8 @@ var require_lodash_isplainobject = /* @__PURE__ */ __commonJSMin(((exports, modu
|
|
|
3450
3466
|
};
|
|
3451
3467
|
}
|
|
3452
3468
|
/** Used for built-in method references. */
|
|
3453
|
-
var funcProto = Function.prototype
|
|
3469
|
+
var funcProto = Function.prototype;
|
|
3470
|
+
var objectProto = Object.prototype;
|
|
3454
3471
|
/** Used to resolve the decompiled source of functions. */
|
|
3455
3472
|
var funcToString = funcProto.toString;
|
|
3456
3473
|
/** Used to check objects for own properties. */
|
|
@@ -3632,7 +3649,9 @@ var require_lodash_once = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3632
3649
|
/** Used as the `TypeError` message for "Functions" methods. */
|
|
3633
3650
|
var FUNC_ERROR_TEXT = "Expected a function";
|
|
3634
3651
|
/** Used as references for various `Number` constants. */
|
|
3635
|
-
var INFINITY = Infinity
|
|
3652
|
+
var INFINITY = Infinity;
|
|
3653
|
+
var MAX_INTEGER = 17976931348623157e292;
|
|
3654
|
+
var NAN = NaN;
|
|
3636
3655
|
/** `Object#toString` result references. */
|
|
3637
3656
|
var symbolTag = "[object Symbol]";
|
|
3638
3657
|
/** Used to match leading and trailing whitespace. */
|
|
@@ -3801,7 +3820,7 @@ var require_lodash_once = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3801
3820
|
function toFinite(value) {
|
|
3802
3821
|
if (!value) return value === 0 ? value : 0;
|
|
3803
3822
|
value = toNumber(value);
|
|
3804
|
-
if (value === INFINITY || value === -
|
|
3823
|
+
if (value === INFINITY || value === -Infinity) return (value < 0 ? -1 : 1) * MAX_INTEGER;
|
|
3805
3824
|
return value === value ? value : 0;
|
|
3806
3825
|
}
|
|
3807
3826
|
/**
|
|
@@ -4154,7 +4173,7 @@ var jwtConfig = {
|
|
|
4154
4173
|
* Validates the secret strength to prevent deployment with default/weak secrets.
|
|
4155
4174
|
*/
|
|
4156
4175
|
function configureJwt(config) {
|
|
4157
|
-
const weakSecrets = new Set([
|
|
4176
|
+
const weakSecrets = /* @__PURE__ */ new Set([
|
|
4158
4177
|
"secret",
|
|
4159
4178
|
"jwt-secret",
|
|
4160
4179
|
"jwt_secret",
|
|
@@ -4342,4 +4361,4 @@ function verifyDownloadToken(token) {
|
|
|
4342
4361
|
//#endregion
|
|
4343
4362
|
export { generateRefreshToken as a, getRefreshTokenTtlMs as c, verifyAccessToken as d, verifyDownloadToken as f, generateDownloadToken as i, hashRefreshToken as l, configureJwt as n, getAccessTokenExpiry as o, require_jsonwebtoken as p, generateAccessToken as r, getRefreshTokenExpiry as s, MAX_COOKIE_AGE_MS as t, jwt_exports as u };
|
|
4344
4363
|
|
|
4345
|
-
//# sourceMappingURL=jwt-
|
|
4364
|
+
//# sourceMappingURL=jwt-DD6EtpGj.js.map
|