backend-manager 2.5.124 → 2.6.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/CHANGELOG.md +24 -0
- package/package.json +2 -2
- package/src/manager/index.js +17 -14
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# CHANGELOG
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
6
|
+
|
|
7
|
+
## Changelog Categories
|
|
8
|
+
|
|
9
|
+
- `BREAKING` for breaking changes.
|
|
10
|
+
- `Added` for new features.
|
|
11
|
+
- `Changed` for changes in existing functionality.
|
|
12
|
+
- `Deprecated` for soon-to-be removed features.
|
|
13
|
+
- `Removed` for now removed features.
|
|
14
|
+
- `Fixed` for any bug fixes.
|
|
15
|
+
- `Security` in case of vulnerabilities.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## [2.6.0] - 2023-09-05
|
|
20
|
+
### Added
|
|
21
|
+
- Identity Platform auth/before-create.js
|
|
22
|
+
- Identity Platform auth/before-signin.js
|
|
23
|
+
- Disable these by passing `options.setupFunctionsIdentity: false`
|
|
24
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "backend-manager",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"description": "Quick tools for developing Firebase functions",
|
|
5
5
|
"main": "src/manager/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -66,4 +66,4 @@
|
|
|
66
66
|
"wonderful-log": "^1.0.5",
|
|
67
67
|
"yargs": "^17.7.2"
|
|
68
68
|
}
|
|
69
|
-
}
|
|
69
|
+
}
|
package/src/manager/index.js
CHANGED
|
@@ -38,6 +38,7 @@ Manager.prototype.init = function (exporter, options) {
|
|
|
38
38
|
options.log = typeof options.log === 'undefined' ? false : options.log;
|
|
39
39
|
options.setupFunctions = typeof options.setupFunctions === 'undefined' ? true : options.setupFunctions;
|
|
40
40
|
options.setupFunctionsLegacy = typeof options.setupFunctionsLegacy === 'undefined' ? true : options.setupFunctionsLegacy;
|
|
41
|
+
options.setupFunctionsIdentity = typeof options.setupFunctionsIdentity === 'undefined' ? true : options.setupFunctionsIdentity;
|
|
41
42
|
options.initializeLocalStorage = typeof options.initializeLocalStorage === 'undefined' ? false : options.initializeLocalStorage;
|
|
42
43
|
options.resourceZone = typeof options.resourceZone === 'undefined' ? 'us-central1' : options.resourceZone;
|
|
43
44
|
options.sentry = typeof options.sentry === 'undefined' ? true : options.sentry;
|
|
@@ -371,21 +372,23 @@ Manager.prototype.init = function (exporter, options) {
|
|
|
371
372
|
}
|
|
372
373
|
|
|
373
374
|
// Events
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
375
|
+
if (options.setupFunctionsIdentity) {
|
|
376
|
+
exporter.bm_authBeforeCreate =
|
|
377
|
+
self.libraries.functions
|
|
378
|
+
.runWith({memory: '256MB', timeoutSeconds: 60})
|
|
379
|
+
.auth.user()
|
|
380
|
+
.beforeCreate(async (user, context) => {
|
|
381
|
+
return self._process((new (require(`${core}/events/auth/before-create.js`))()).init(self, { user: user, context: context}))
|
|
382
|
+
});
|
|
381
383
|
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
384
|
+
exporter.bm_authBeforeSignIn =
|
|
385
|
+
self.libraries.functions
|
|
386
|
+
.runWith({memory: '256MB', timeoutSeconds: 60})
|
|
387
|
+
.auth.user()
|
|
388
|
+
.beforeSignIn(async (user, context) => {
|
|
389
|
+
return self._process((new (require(`${core}/events/auth/before-signin.js`))()).init(self, { user: user, context: context}))
|
|
390
|
+
});
|
|
391
|
+
}
|
|
389
392
|
|
|
390
393
|
exporter.bm_authOnCreate =
|
|
391
394
|
self.libraries.functions
|