@wbce-d9/api 12.1.0 → 12.2.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.
Files changed (3) hide show
  1. package/dist/app.js +5 -1
  2. package/dist/env.js +7 -0
  3. package/package.json +13 -13
package/dist/app.js CHANGED
@@ -83,7 +83,11 @@ export default async function createApp() {
83
83
  const app = express();
84
84
  app.disable('x-powered-by');
85
85
  app.set('trust proxy', env['IP_TRUST_PROXY']);
86
- app.set('query parser', (str) => qs.parse(str, { depth: 10 }));
86
+ app.set('query parser', (str) => qs.parse(str, {
87
+ depth: 10,
88
+ arrayLimit: env['QS_ARRAY_LIMIT'],
89
+ parameterLimit: env['QS_PARAMETER_LIMIT'],
90
+ }));
87
91
  app.use(helmet.contentSecurityPolicy(merge({
88
92
  useDefaults: true,
89
93
  directives: {
package/dist/env.js CHANGED
@@ -28,6 +28,9 @@ const allowedEnvironmentVars = [
28
28
  'ROBOTS_TXT',
29
29
  'MAX_RELATIONAL_DEPTH',
30
30
  'MAX_ITEMS_PER_QUERY',
31
+ // query parser
32
+ 'QS_ARRAY_LIMIT',
33
+ 'QS_PARAMETER_LIMIT',
31
34
  // server
32
35
  'SERVER_.+',
33
36
  // database
@@ -207,6 +210,8 @@ const defaults = {
207
210
  MAX_PAYLOAD_SIZE: '1mb',
208
211
  MAX_RELATIONAL_DEPTH: 10,
209
212
  MAX_ITEMS_PER_QUERY: -1,
213
+ QS_ARRAY_LIMIT: 100,
214
+ QS_PARAMETER_LIMIT: 1000,
210
215
  MAX_BATCH_MUTATION: Infinity,
211
216
  ROBOTS_TXT: 'User-agent: *\nDisallow: /',
212
217
  DB_EXCLUDE_TABLES: 'spatial_ref_sys,sysdiagrams',
@@ -298,6 +303,8 @@ const typeMap = {
298
303
  MAX_BATCH_MUTATION: 'number',
299
304
  SERVER_SHUTDOWN_TIMEOUT: 'number',
300
305
  MAX_ITEMS_PER_QUERY: 'number',
306
+ QS_ARRAY_LIMIT: 'number',
307
+ QS_PARAMETER_LIMIT: 'number',
301
308
  };
302
309
  let env = {
303
310
  ...defaults,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wbce-d9/api",
3
- "version": "12.1.0",
3
+ "version": "12.2.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": [
@@ -111,7 +111,7 @@
111
111
  "knex": "3.1.0",
112
112
  "ldapjs": "2.3.3",
113
113
  "liquidjs": "10.7.0",
114
- "lodash-es": "4.17.21",
114
+ "lodash-es": "4.17.23",
115
115
  "marked": "4.3.0",
116
116
  "micromustache": "8.0.3",
117
117
  "mime-types": "2.1.35",
@@ -129,7 +129,7 @@
129
129
  "pino-http": "8.3.3",
130
130
  "pino-http-print": "3.1.0",
131
131
  "pino-pretty": "10.0.0",
132
- "qs": "6.14.0",
132
+ "qs": "6.14.1",
133
133
  "rate-limiter-flexible": "2.4.1",
134
134
  "rollup": "3.29.5",
135
135
  "samlify": "2.10.0",
@@ -143,20 +143,20 @@
143
143
  "uuid": "9.0.0",
144
144
  "uuid-validate": "0.0.3",
145
145
  "wellknown": "0.5.0",
146
- "@wbce-d9/exceptions": "10.0.0",
147
- "@wbce-d9/app": "9.35.0",
148
- "@wbce-d9/extensions-sdk": "10.0.1",
149
146
  "@wbce-d9/constants": "10.0.0",
150
- "@wbce-d9/schema": "10.0.0",
147
+ "@wbce-d9/app": "9.35.1",
148
+ "@wbce-d9/exceptions": "10.0.0",
149
+ "@wbce-d9/extensions-sdk": "10.0.2",
151
150
  "@wbce-d9/specs": "9.26.5",
152
151
  "@wbce-d9/storage": "10.0.0",
153
- "@wbce-d9/storage-driver-gcs": "10.0.0",
154
- "@wbce-d9/storage-driver-azure": "10.0.0",
155
- "@wbce-d9/storage-driver-local": "10.0.0",
156
- "@wbce-d9/storage-driver-s3": "10.0.0",
152
+ "@wbce-d9/storage-driver-azure": "10.0.1",
153
+ "@wbce-d9/schema": "10.0.0",
154
+ "@wbce-d9/storage-driver-cloudinary": "10.0.1",
155
+ "@wbce-d9/storage-driver-local": "10.0.1",
156
+ "@wbce-d9/storage-driver-s3": "10.0.1",
157
+ "@wbce-d9/storage-driver-gcs": "10.0.1",
157
158
  "@wbce-d9/update-check": "10.0.1",
158
- "@wbce-d9/utils": "10.0.0",
159
- "@wbce-d9/storage-driver-cloudinary": "10.0.0"
159
+ "@wbce-d9/utils": "10.0.1"
160
160
  },
161
161
  "devDependencies": {
162
162
  "@ngneat/falso": "6.4.0",