backend-manager 5.0.72 → 5.0.73
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/README.md +2 -2
- package/package.json +1 -1
- package/src/manager/helpers/middleware.js +1 -1
package/README.md
CHANGED
|
@@ -49,7 +49,7 @@ const { functions } = Manager.libraries;
|
|
|
49
49
|
// Create a custom function
|
|
50
50
|
exports.myEndpoint = functions
|
|
51
51
|
.runWith({ memory: '256MB', timeoutSeconds: 120 })
|
|
52
|
-
.https.onRequest((req, res) => Manager.Middleware(req, res).run('myEndpoint', {
|
|
52
|
+
.https.onRequest((req, res) => Manager.Middleware(req, res).run('myEndpoint', { /* options */ }));
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
Create `functions/routes/myEndpoint/index.js`:
|
|
@@ -282,7 +282,7 @@ Manager.Middleware(req, res).run('routeName', {
|
|
|
282
282
|
setupAnalytics: true, // Initialize analytics (default: true)
|
|
283
283
|
setupUsage: true, // Initialize usage tracking (default: true)
|
|
284
284
|
setupSettings: true, // Resolve settings from schema (default: true)
|
|
285
|
-
schema: 'routeName', // Schema file to use (default:
|
|
285
|
+
schema: 'routeName', // Schema file to use (default: same as route)
|
|
286
286
|
parseMultipartFormData: true, // Parse multipart uploads (default: true)
|
|
287
287
|
routesDir: '/routes', // Custom routes directory
|
|
288
288
|
schemasDir: '/schemas', // Custom schemas directory
|
package/package.json
CHANGED
|
@@ -36,7 +36,7 @@ Middleware.prototype.run = function (libPath, options) {
|
|
|
36
36
|
options.setupSettings = typeof options.setupSettings === 'undefined' ? true : options.setupSettings;
|
|
37
37
|
options.cleanSettings = typeof options.cleanSettings === 'undefined' ? true : options.cleanSettings;
|
|
38
38
|
options.includeNonSchemaSettings = typeof options.includeNonSchemaSettings === 'undefined' ? false : options.includeNonSchemaSettings;
|
|
39
|
-
options.schema = typeof options.schema === 'undefined' ?
|
|
39
|
+
options.schema = typeof options.schema === 'undefined' ? libPath : options.schema;
|
|
40
40
|
options.parseMultipartFormData = typeof options.parseMultipartFormData === 'undefined' ? true : options.parseMultipartFormData;
|
|
41
41
|
|
|
42
42
|
// Set base path
|