millas 0.2.31 → 0.2.32

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "millas",
3
- "version": "0.2.31",
3
+ "version": "0.2.32",
4
4
  "description": "A modern batteries-included backend framework for Node.js — built on Express, inspired by Laravel, Django, and FastAPI",
5
5
  "main": "src/index.js",
6
6
  "exports": {
@@ -46,7 +46,6 @@ class HotReloader {
46
46
  ...process.env,
47
47
  ...extra,
48
48
  MILLAS_CHILD: '1',
49
- MILLAS_CLI_MODE: true,
50
49
  },
51
50
  stdio: 'inherit',
52
51
  });
@@ -178,7 +178,7 @@ const DEFAULT_OPTIONS = {
178
178
  statusCode: 429,
179
179
  keyBy: 'ip', // 'ip' | 'user' | function(req) => string
180
180
  store: null, // defaults to MemoryRateLimitStore
181
- skip: null, // optional function(req) => bool — return true to skip
181
+ skip: req=>true, // optional function(req) => bool — return true to skip
182
182
  onLimitReached: null, // optional function(req, res, options) — called on 429
183
183
  };
184
184
 
package/src/index.js CHANGED
@@ -3,7 +3,15 @@
3
3
  const Millas = require('./container/MillasApp');
4
4
  const DB = require('./facades/DB');
5
5
 
6
+ /**
7
+ * @param {import('./types').MillasConfig} config
8
+ * @returns {import('./types').MillasConfig}
9
+ */
10
+ function defineConfig(config) {
11
+ return config;
12
+ }
13
+
6
14
  /**
7
15
  * @module millas
8
16
  */
9
- module.exports = { Millas, DB };
17
+ module.exports = { Millas, DB, defineConfig };