@rebasepro/server 0.11.1-canary.gfadf355 → 0.12.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/api-keys/api-key-types.d.ts +6 -70
- package/dist/auth/builtin-auth-adapter.d.ts +11 -0
- package/dist/auth/registration-policy.d.ts +57 -0
- package/dist/boot/driver.d.ts +17 -3
- package/dist/boot/env.d.ts +16 -2
- package/dist/env.d.ts +5 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +121 -18
- package/dist/index.es.js.map +1 -1
- package/dist/init.d.ts +13 -0
- package/dist/{openapi-generator-DUocM036.js → openapi-generator-Bjzmb5cn.js} +3 -3
- package/dist/{openapi-generator-DUocM036.js.map → openapi-generator-Bjzmb5cn.js.map} +1 -1
- package/dist/{schema-editor-routes-CbKEoeiH.js → schema-editor-routes-DDxfOIid.js} +2 -2
- package/dist/{schema-editor-routes-CbKEoeiH.js.map → schema-editor-routes-DDxfOIid.js.map} +1 -1
- package/dist/{src-CyC3JXAq.js → src-CoOAMnBh.js} +4 -4
- package/dist/src-CoOAMnBh.js.map +1 -0
- package/dist/{src-DzAgLF8X.js → src-Ivjud8jD.js} +141 -109
- package/dist/src-Ivjud8jD.js.map +1 -0
- package/package.json +5 -5
- package/dist/src-CyC3JXAq.js.map +0 -1
- package/dist/src-DzAgLF8X.js.map +0 -1
|
@@ -357,6 +357,7 @@ var ADMIN_COLLECTION_KEYS = [
|
|
|
357
357
|
* @group Models
|
|
358
358
|
*/
|
|
359
359
|
var ADMIN_PROPERTY_KEYS = [
|
|
360
|
+
"canAddElements",
|
|
360
361
|
"clearable",
|
|
361
362
|
"columnWidth",
|
|
362
363
|
"customProps",
|
|
@@ -365,7 +366,10 @@ var ADMIN_PROPERTY_KEYS = [
|
|
|
365
366
|
"Field",
|
|
366
367
|
"Filter",
|
|
367
368
|
"filterOperators",
|
|
369
|
+
"fixedFilter",
|
|
368
370
|
"hideFromCollection",
|
|
371
|
+
"includeEntityLink",
|
|
372
|
+
"includeId",
|
|
369
373
|
"markdown",
|
|
370
374
|
"minimalistView",
|
|
371
375
|
"multiline",
|
|
@@ -373,12 +377,124 @@ var ADMIN_PROPERTY_KEYS = [
|
|
|
373
377
|
"previewAsTag",
|
|
374
378
|
"previewProperties",
|
|
375
379
|
"readOnly",
|
|
380
|
+
"sortable",
|
|
376
381
|
"spreadChildren",
|
|
377
382
|
"urlPreview",
|
|
378
383
|
"widget",
|
|
379
384
|
"widthPercentage"
|
|
380
385
|
];
|
|
381
386
|
//#endregion
|
|
387
|
+
//#region ../types/src/types/data_source.ts
|
|
388
|
+
/**
|
|
389
|
+
* The default data-source key, used when a collection does not name a
|
|
390
|
+
* `dataSource`. Shared by the frontend router and the backend driver
|
|
391
|
+
* registry so both agree on "the default database".
|
|
392
|
+
* @group Models
|
|
393
|
+
*/
|
|
394
|
+
var DEFAULT_DATA_SOURCE_KEY = "(default)";
|
|
395
|
+
/**
|
|
396
|
+
* Relation kinds assumed filterable when a driver does not say.
|
|
397
|
+
*
|
|
398
|
+
* `belongsTo` alone: its filter is a comparison on a column of the row being
|
|
399
|
+
* filtered, the one shape that needs no query construction a driver might not
|
|
400
|
+
* have. Everything else is a correlated subquery over another table.
|
|
401
|
+
*
|
|
402
|
+
* @group Models
|
|
403
|
+
*/
|
|
404
|
+
var DEFAULT_FILTERABLE_RELATION_KINDS = ["belongsTo"];
|
|
405
|
+
/** @group Models */
|
|
406
|
+
var POSTGRES_CAPABILITIES = {
|
|
407
|
+
key: "postgres",
|
|
408
|
+
label: "PostgreSQL",
|
|
409
|
+
supportsRelations: true,
|
|
410
|
+
supportsSubcollections: false,
|
|
411
|
+
supportsRLS: true,
|
|
412
|
+
supportsReferences: false,
|
|
413
|
+
supportsColumnTypes: true,
|
|
414
|
+
supportsRealtime: true,
|
|
415
|
+
supportsVectors: true,
|
|
416
|
+
filterOperators: ALL_WHERE_FILTER_OPS,
|
|
417
|
+
filterableRelationKinds: [
|
|
418
|
+
"belongsTo",
|
|
419
|
+
"manyToMany",
|
|
420
|
+
"hasMany",
|
|
421
|
+
"hasOne"
|
|
422
|
+
],
|
|
423
|
+
supportsSQLAdmin: true,
|
|
424
|
+
supportsDocumentAdmin: false,
|
|
425
|
+
supportsSchemaAdmin: true
|
|
426
|
+
};
|
|
427
|
+
/** @group Models */
|
|
428
|
+
var FIREBASE_CAPABILITIES = {
|
|
429
|
+
key: "firestore",
|
|
430
|
+
label: "Firebase / Firestore",
|
|
431
|
+
supportsRelations: false,
|
|
432
|
+
supportsSubcollections: true,
|
|
433
|
+
supportsRLS: false,
|
|
434
|
+
supportsReferences: true,
|
|
435
|
+
supportsColumnTypes: false,
|
|
436
|
+
supportsRealtime: true,
|
|
437
|
+
supportsVectors: false,
|
|
438
|
+
filterOperators: ALL_WHERE_FILTER_OPS.filter((op) => op !== "like" && op !== "ilike" && op !== "not-like" && op !== "not-ilike"),
|
|
439
|
+
filterableRelationKinds: [],
|
|
440
|
+
supportsSQLAdmin: false,
|
|
441
|
+
supportsDocumentAdmin: false,
|
|
442
|
+
supportsSchemaAdmin: false
|
|
443
|
+
};
|
|
444
|
+
/** @group Models */
|
|
445
|
+
var MONGODB_CAPABILITIES = {
|
|
446
|
+
key: "mongodb",
|
|
447
|
+
label: "MongoDB",
|
|
448
|
+
supportsRelations: false,
|
|
449
|
+
supportsSubcollections: true,
|
|
450
|
+
supportsRLS: false,
|
|
451
|
+
supportsReferences: true,
|
|
452
|
+
supportsColumnTypes: false,
|
|
453
|
+
supportsRealtime: false,
|
|
454
|
+
supportsVectors: false,
|
|
455
|
+
filterOperators: ALL_WHERE_FILTER_OPS,
|
|
456
|
+
filterableRelationKinds: [],
|
|
457
|
+
supportsSQLAdmin: false,
|
|
458
|
+
supportsDocumentAdmin: true,
|
|
459
|
+
supportsSchemaAdmin: true
|
|
460
|
+
};
|
|
461
|
+
/**
|
|
462
|
+
* Fallback capabilities when the driver is unknown.
|
|
463
|
+
* Enables everything so nothing is hidden unexpectedly.
|
|
464
|
+
* @group Models
|
|
465
|
+
*/
|
|
466
|
+
var DEFAULT_CAPABILITIES = {
|
|
467
|
+
key: "(default)",
|
|
468
|
+
label: "Default",
|
|
469
|
+
supportsRelations: true,
|
|
470
|
+
supportsSubcollections: true,
|
|
471
|
+
supportsRLS: true,
|
|
472
|
+
supportsReferences: true,
|
|
473
|
+
supportsColumnTypes: true,
|
|
474
|
+
supportsRealtime: true,
|
|
475
|
+
supportsVectors: true,
|
|
476
|
+
filterOperators: ALL_WHERE_FILTER_OPS,
|
|
477
|
+
filterableRelationKinds: DEFAULT_FILTERABLE_RELATION_KINDS,
|
|
478
|
+
supportsSQLAdmin: true,
|
|
479
|
+
supportsDocumentAdmin: true,
|
|
480
|
+
supportsSchemaAdmin: true
|
|
481
|
+
};
|
|
482
|
+
var CAPABILITIES_REGISTRY = {
|
|
483
|
+
postgres: POSTGRES_CAPABILITIES,
|
|
484
|
+
firestore: FIREBASE_CAPABILITIES,
|
|
485
|
+
mongodb: MONGODB_CAPABILITIES,
|
|
486
|
+
"(default)": DEFAULT_CAPABILITIES
|
|
487
|
+
};
|
|
488
|
+
/**
|
|
489
|
+
* Look up capabilities for a given engine key.
|
|
490
|
+
* If `engine` is undefined or not found, returns `DEFAULT_CAPABILITIES`.
|
|
491
|
+
* @group Models
|
|
492
|
+
*/
|
|
493
|
+
function getDataSourceCapabilities(engine) {
|
|
494
|
+
if (!engine) return POSTGRES_CAPABILITIES;
|
|
495
|
+
return CAPABILITIES_REGISTRY[engine] ?? DEFAULT_CAPABILITIES;
|
|
496
|
+
}
|
|
497
|
+
//#endregion
|
|
382
498
|
//#region ../types/src/types/collections.ts
|
|
383
499
|
/**
|
|
384
500
|
* Type guard for PostgreSQL collections.
|
|
@@ -396,6 +512,29 @@ function isPostgresCollectionConfig(collection) {
|
|
|
396
512
|
return !collection.engine || collection.engine === "postgres";
|
|
397
513
|
}
|
|
398
514
|
/**
|
|
515
|
+
* Narrows to the SQL collection fields — `table`, `relations`,
|
|
516
|
+
* `disableDefaultPolicies` — by asking the engine's declared capabilities
|
|
517
|
+
* rather than by naming Postgres.
|
|
518
|
+
*
|
|
519
|
+
* The two halves of this already existed and were never joined. The engine
|
|
520
|
+
* split (`PostgresCollectionConfig` / `FirebaseCollectionConfig` /
|
|
521
|
+
* `MongoDBCollectionConfig`) said which fields belong to which engine at the
|
|
522
|
+
* type level; {@link DataSourceCapabilities} said the same thing at runtime,
|
|
523
|
+
* down to a `supportsRelations` flag. So call sites guarded on the capability
|
|
524
|
+
* and then read a field the base type had to declare for them — which is why
|
|
525
|
+
* those fields were on the base, and why a MongoDB collection could be written
|
|
526
|
+
* with a `table`.
|
|
527
|
+
*
|
|
528
|
+
* Prefer this over {@link isPostgresCollectionConfig} wherever the question is
|
|
529
|
+
* "does this collection live in a SQL table", so a custom SQL engine
|
|
530
|
+
* registered through `registerDataSourceCapabilities` is included.
|
|
531
|
+
*
|
|
532
|
+
* @group Models
|
|
533
|
+
*/
|
|
534
|
+
function isRelationalCollectionConfig(collection) {
|
|
535
|
+
return getDataSourceCapabilities(collection.engine).supportsRelations;
|
|
536
|
+
}
|
|
537
|
+
/**
|
|
399
538
|
* Type guard for Firebase / Firestore collections.
|
|
400
539
|
* @group Models
|
|
401
540
|
*/
|
|
@@ -506,113 +645,6 @@ function isSQLAdmin(admin) {
|
|
|
506
645
|
return !!admin && typeof admin.executeSql === "function";
|
|
507
646
|
}
|
|
508
647
|
//#endregion
|
|
509
|
-
//#region ../types/src/types/data_source.ts
|
|
510
|
-
/**
|
|
511
|
-
* The default data-source key, used when a collection does not name a
|
|
512
|
-
* `dataSource`. Shared by the frontend router and the backend driver
|
|
513
|
-
* registry so both agree on "the default database".
|
|
514
|
-
* @group Models
|
|
515
|
-
*/
|
|
516
|
-
var DEFAULT_DATA_SOURCE_KEY = "(default)";
|
|
517
|
-
/**
|
|
518
|
-
* Relation kinds assumed filterable when a driver does not say.
|
|
519
|
-
*
|
|
520
|
-
* `belongsTo` alone: its filter is a comparison on a column of the row being
|
|
521
|
-
* filtered, the one shape that needs no query construction a driver might not
|
|
522
|
-
* have. Everything else is a correlated subquery over another table.
|
|
523
|
-
*
|
|
524
|
-
* @group Models
|
|
525
|
-
*/
|
|
526
|
-
var DEFAULT_FILTERABLE_RELATION_KINDS = ["belongsTo"];
|
|
527
|
-
/** @group Models */
|
|
528
|
-
var POSTGRES_CAPABILITIES = {
|
|
529
|
-
key: "postgres",
|
|
530
|
-
label: "PostgreSQL",
|
|
531
|
-
supportsRelations: true,
|
|
532
|
-
supportsSubcollections: false,
|
|
533
|
-
supportsRLS: true,
|
|
534
|
-
supportsReferences: false,
|
|
535
|
-
supportsColumnTypes: true,
|
|
536
|
-
supportsRealtime: true,
|
|
537
|
-
filterOperators: ALL_WHERE_FILTER_OPS,
|
|
538
|
-
filterableRelationKinds: [
|
|
539
|
-
"belongsTo",
|
|
540
|
-
"manyToMany",
|
|
541
|
-
"hasMany",
|
|
542
|
-
"hasOne"
|
|
543
|
-
],
|
|
544
|
-
supportsSQLAdmin: true,
|
|
545
|
-
supportsDocumentAdmin: false,
|
|
546
|
-
supportsSchemaAdmin: true
|
|
547
|
-
};
|
|
548
|
-
/** @group Models */
|
|
549
|
-
var FIREBASE_CAPABILITIES = {
|
|
550
|
-
key: "firestore",
|
|
551
|
-
label: "Firebase / Firestore",
|
|
552
|
-
supportsRelations: false,
|
|
553
|
-
supportsSubcollections: true,
|
|
554
|
-
supportsRLS: false,
|
|
555
|
-
supportsReferences: true,
|
|
556
|
-
supportsColumnTypes: false,
|
|
557
|
-
supportsRealtime: true,
|
|
558
|
-
filterOperators: ALL_WHERE_FILTER_OPS.filter((op) => op !== "like" && op !== "ilike" && op !== "not-like" && op !== "not-ilike"),
|
|
559
|
-
filterableRelationKinds: [],
|
|
560
|
-
supportsSQLAdmin: false,
|
|
561
|
-
supportsDocumentAdmin: false,
|
|
562
|
-
supportsSchemaAdmin: false
|
|
563
|
-
};
|
|
564
|
-
/** @group Models */
|
|
565
|
-
var MONGODB_CAPABILITIES = {
|
|
566
|
-
key: "mongodb",
|
|
567
|
-
label: "MongoDB",
|
|
568
|
-
supportsRelations: false,
|
|
569
|
-
supportsSubcollections: true,
|
|
570
|
-
supportsRLS: false,
|
|
571
|
-
supportsReferences: true,
|
|
572
|
-
supportsColumnTypes: false,
|
|
573
|
-
supportsRealtime: false,
|
|
574
|
-
filterOperators: ALL_WHERE_FILTER_OPS,
|
|
575
|
-
filterableRelationKinds: [],
|
|
576
|
-
supportsSQLAdmin: false,
|
|
577
|
-
supportsDocumentAdmin: true,
|
|
578
|
-
supportsSchemaAdmin: true
|
|
579
|
-
};
|
|
580
|
-
/**
|
|
581
|
-
* Fallback capabilities when the driver is unknown.
|
|
582
|
-
* Enables everything so nothing is hidden unexpectedly.
|
|
583
|
-
* @group Models
|
|
584
|
-
*/
|
|
585
|
-
var DEFAULT_CAPABILITIES = {
|
|
586
|
-
key: "(default)",
|
|
587
|
-
label: "Default",
|
|
588
|
-
supportsRelations: true,
|
|
589
|
-
supportsSubcollections: true,
|
|
590
|
-
supportsRLS: true,
|
|
591
|
-
supportsReferences: true,
|
|
592
|
-
supportsColumnTypes: true,
|
|
593
|
-
supportsRealtime: true,
|
|
594
|
-
filterOperators: ALL_WHERE_FILTER_OPS,
|
|
595
|
-
filterableRelationKinds: DEFAULT_FILTERABLE_RELATION_KINDS,
|
|
596
|
-
supportsSQLAdmin: true,
|
|
597
|
-
supportsDocumentAdmin: true,
|
|
598
|
-
supportsSchemaAdmin: true
|
|
599
|
-
};
|
|
600
|
-
var CAPABILITIES_REGISTRY = {
|
|
601
|
-
postgres: POSTGRES_CAPABILITIES,
|
|
602
|
-
firestore: FIREBASE_CAPABILITIES,
|
|
603
|
-
mongodb: MONGODB_CAPABILITIES,
|
|
604
|
-
"(default)": DEFAULT_CAPABILITIES
|
|
605
|
-
};
|
|
606
|
-
/**
|
|
607
|
-
* Look up capabilities for a given engine key.
|
|
608
|
-
* If `engine` is undefined or not found, returns `DEFAULT_CAPABILITIES`.
|
|
609
|
-
* @group Models
|
|
610
|
-
*/
|
|
611
|
-
function getDataSourceCapabilities(engine) {
|
|
612
|
-
if (!engine) return POSTGRES_CAPABILITIES;
|
|
613
|
-
return CAPABILITIES_REGISTRY[engine] ?? DEFAULT_CAPABILITIES;
|
|
614
|
-
}
|
|
615
|
-
//#endregion
|
|
616
648
|
//#region ../types/src/types/storage_source.ts
|
|
617
649
|
/**
|
|
618
650
|
* Describes a named storage backend — a place files live.
|
|
@@ -920,6 +952,6 @@ function computeSchemaVersion(collections) {
|
|
|
920
952
|
return `v1:${hex(h1)}${hex(h2)}`;
|
|
921
953
|
}
|
|
922
954
|
//#endregion
|
|
923
|
-
export {
|
|
955
|
+
export { EntityReference as C, RebaseApiError as D, Vector as E, RebaseClientError as O, toCanonicalOp as S, GeoPoint as T, ADMIN_COLLECTION_KEYS as _, findStorageSuffixCollision as a, NULL_OPS as b, isSQLAdmin as c, getCollectionDataPath as d, getDeclaredSubcollections as f, getDataSourceCapabilities as g, DEFAULT_DATA_SOURCE_KEY as h, DEFAULT_STORAGE_SOURCE_KEY as i, policy as l, isRelationalCollectionConfig as m, serializeCollections as n, normalizeStorageSources as o, isPostgresCollectionConfig as p, SCHEMA_VERSION_HEADER as r, storageEnvSuffix as s, computeSchemaVersion as t, isToMany as u, ADMIN_PROPERTY_KEYS as v, EntityRelation as w, REST_TO_CANONICAL as x, CANONICAL_TO_REST as y };
|
|
924
956
|
|
|
925
|
-
//# sourceMappingURL=src-
|
|
957
|
+
//# sourceMappingURL=src-Ivjud8jD.js.map
|