@wbce-d9/api 9.26.5 → 9.27.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.
@@ -46,7 +46,9 @@ router.post('/:collection', collectionExists, asyncHandler(async (req, res, next
46
46
  return next();
47
47
  }), respond);
48
48
  const readHandler = asyncHandler(async (req, res, next) => {
49
- if (req.params['collection'].startsWith('directus_'))
49
+ // [issues-33] we allow directus_collections to be read as items for m2m collection visualization
50
+ if (req.params['collection'].valueOf() !== 'directus_collections' &&
51
+ req.params['collection'].startsWith('directus_'))
50
52
  throw new ForbiddenException();
51
53
  const service = new ItemsService(req.collection, {
52
54
  accountability: req.accountability,
@@ -1,12 +1,11 @@
1
1
  import { compress as compressSnappy, uncompress as uncompressSnappy } from 'snappy';
2
- import { compress as compressJSON, decompress as decompressJSON } from '@wbce-d9/utils';
3
2
  export async function compress(raw) {
4
3
  if (!raw)
5
4
  return raw;
6
- return await compressSnappy(compressJSON(raw));
5
+ return await compressSnappy(JSON.stringify(raw));
7
6
  }
8
7
  export async function decompress(compressed) {
9
8
  if (!compressed)
10
9
  return compressed;
11
- return decompressJSON((await uncompressSnappy(compressed, { asBuffer: false })));
10
+ return JSON.parse((await uncompressSnappy(compressed, { asBuffer: false })));
12
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wbce-d9/api",
3
- "version": "9.26.5",
3
+ "version": "9.27.0",
4
4
  "description": "Directus is a real-time API and App dashboard for managing SQL database content",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -143,20 +143,20 @@
143
143
  "uuid-validate": "0.0.3",
144
144
  "vm2": "^3.9.19",
145
145
  "wellknown": "0.5.0",
146
- "@wbce-d9/app": "9.26.4",
147
- "@wbce-d9/constants": "9.26.3",
146
+ "@wbce-d9/app": "9.28.0",
148
147
  "@wbce-d9/exceptions": "9.26.3",
149
- "@wbce-d9/extensions-sdk": "9.26.4",
148
+ "@wbce-d9/extensions-sdk": "9.26.5",
149
+ "@wbce-d9/constants": "9.26.3",
150
150
  "@wbce-d9/schema": "9.26.3",
151
+ "@wbce-d9/storage-driver-azure": "9.26.5",
151
152
  "@wbce-d9/specs": "9.26.3",
153
+ "@wbce-d9/storage-driver-cloudinary": "9.26.5",
154
+ "@wbce-d9/storage-driver-gcs": "9.26.5",
155
+ "@wbce-d9/storage-driver-local": "9.26.5",
152
156
  "@wbce-d9/storage": "9.26.3",
153
- "@wbce-d9/storage-driver-azure": "9.26.4",
154
- "@wbce-d9/storage-driver-cloudinary": "9.26.4",
155
- "@wbce-d9/storage-driver-gcs": "9.26.4",
156
- "@wbce-d9/storage-driver-local": "9.26.4",
157
- "@wbce-d9/storage-driver-s3": "9.26.5",
157
+ "@wbce-d9/storage-driver-s3": "9.26.7",
158
158
  "@wbce-d9/update-check": "9.26.3",
159
- "@wbce-d9/utils": "9.27.0"
159
+ "@wbce-d9/utils": "9.28.0"
160
160
  },
161
161
  "devDependencies": {
162
162
  "@ngneat/falso": "6.4.0",