@rebasepro/server 0.19.2-canary.g9b599d4 → 0.20.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/index.es.js +8 -3
- package/dist/index.es.js.map +1 -1
- package/dist/src-DqZ9YiGA.js.map +1 -1
- package/package.json +5 -5
package/dist/index.es.js
CHANGED
|
@@ -3949,10 +3949,12 @@ var RestApiGenerator = class {
|
|
|
3949
3949
|
const id = c.req.param("id");
|
|
3950
3950
|
const driver = this.getScopedDriver(c);
|
|
3951
3951
|
return this.runIdempotent(c, { id: String(id) }, async () => {
|
|
3952
|
+
const hardDelete = parseHardDelete(c.req.query(HARD_DELETE_QUERY_PARAM));
|
|
3952
3953
|
const existingEntity = await driver.fetchOne({
|
|
3953
3954
|
path: getCollectionDataPath(collection),
|
|
3954
3955
|
id: String(id),
|
|
3955
|
-
collection: resolvedCollection
|
|
3956
|
+
collection: resolvedCollection,
|
|
3957
|
+
withDeleted: hardDelete ? true : void 0
|
|
3956
3958
|
});
|
|
3957
3959
|
if (!existingEntity) throw this.entityNotFound(collection.slug, String(id));
|
|
3958
3960
|
const ifMatch = c.req.header(IF_MATCH_HEADER);
|
|
@@ -4115,13 +4117,15 @@ var RestApiGenerator = class {
|
|
|
4115
4117
|
if (!parsed || !parsed.id) return next();
|
|
4116
4118
|
const driver = this.getScopedDriver(c);
|
|
4117
4119
|
this.enforceSubcollectionApiKeyPermission(c, parsed.collectionPath);
|
|
4120
|
+
const hardDelete = parseHardDelete(c.req.query(HARD_DELETE_QUERY_PARAM));
|
|
4118
4121
|
const existingEntity = await driver.fetchOne({
|
|
4119
4122
|
path: parsed.collectionPath,
|
|
4120
|
-
id: parsed.id
|
|
4123
|
+
id: parsed.id,
|
|
4124
|
+
withDeleted: hardDelete ? true : void 0
|
|
4121
4125
|
});
|
|
4122
4126
|
if (!existingEntity) throw this.entityNotFound(parsed.collectionPath, parsed.id);
|
|
4123
4127
|
await driver.delete({
|
|
4124
|
-
hard:
|
|
4128
|
+
hard: hardDelete,
|
|
4125
4129
|
row: {
|
|
4126
4130
|
id: parsed.id,
|
|
4127
4131
|
path: parsed.collectionPath,
|
|
@@ -16627,6 +16631,7 @@ async function _initializeRebaseBackend(config) {
|
|
|
16627
16631
|
dir: config.collectionsDir
|
|
16628
16632
|
});
|
|
16629
16633
|
}
|
|
16634
|
+
enforceAuthSecretExclusion(activeCollections);
|
|
16630
16635
|
const introspectCollections = activeCollections.length === 0;
|
|
16631
16636
|
if (introspectCollections) logger.info("No collections declared — deriving them from the database schema");
|
|
16632
16637
|
else logger.debug("Serving declared collections");
|