@firebase-function-kits/delete-user-data 0.0.2-rc.1 → 0.0.2-rc.3
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 +17 -20
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js.map +1 -1
- package/lib/events.js.map +1 -1
- package/lib/export-config.js.map +1 -1
- package/lib/handlers.d.ts.map +1 -1
- package/lib/handlers.js +3 -1
- package/lib/handlers.js.map +1 -1
- package/lib/helpers.d.ts.map +1 -1
- package/lib/helpers.js.map +1 -1
- package/lib/index.d.ts +1 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +15 -4
- package/lib/index.js.map +1 -1
- package/lib/logs.d.ts +1 -0
- package/lib/logs.d.ts.map +1 -1
- package/lib/logs.js +5 -1
- package/lib/logs.js.map +1 -1
- package/lib/recursiveDelete.d.ts.map +1 -1
- package/lib/recursiveDelete.js.map +1 -1
- package/lib/runBatchPubSubDeletions.js.map +1 -1
- package/lib/runCustomSearchFunction.d.ts.map +1 -1
- package/lib/runCustomSearchFunction.js.map +1 -1
- package/lib/search.d.ts.map +1 -1
- package/lib/search.js.map +1 -1
- package/npm-shrinkwrap.json +18 -3
- package/package.json +3 -2
- package/src/handlers.ts +5 -1
- package/src/identity-shim.d.ts +32 -0
- package/src/index.ts +15 -4
- package/src/logs.ts +6 -0
- package/tests/context.test.ts +81 -0
- package/tests/handlers.test.ts +21 -2
- package/tests/index.test.ts +70 -0
- package/tsconfig.tsbuildinfo +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @firebase/delete-user-data
|
|
1
|
+
# @firebase-function-kits/delete-user-data
|
|
2
2
|
|
|
3
3
|
Delete user data across Firestore, RTDB, and Storage on account deletion. This
|
|
4
4
|
is the Delete User Data Firebase Extension as an npm package you add to your own
|
|
@@ -12,7 +12,7 @@ Firebase project; there is no hosted version, so you deploy them yourself.
|
|
|
12
12
|
## Install
|
|
13
13
|
|
|
14
14
|
```sh
|
|
15
|
-
npm install @firebase/delete-user-data
|
|
15
|
+
npm install @firebase-function-kits/delete-user-data
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
## Required IAM
|
|
@@ -41,7 +41,7 @@ export {
|
|
|
41
41
|
clearData,
|
|
42
42
|
handleSearch,
|
|
43
43
|
handleDeletion,
|
|
44
|
-
} from "@firebase/delete-user-data";
|
|
44
|
+
} from "@firebase-function-kits/delete-user-data";
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
and configure with a `.env` (or `.env.<projectId>`).
|
|
@@ -92,7 +92,7 @@ loads them at deploy time and prompts for any required values that are missing.
|
|
|
92
92
|
| `firestorePaths` | `FIRESTORE_PATHS` | no | (empty) | Comma-separated Firestore paths with `{UID}` |
|
|
93
93
|
| `firestoreDatabaseId` | `FIRESTORE_DATABASE_ID` | no | `(default)` | Firestore database id |
|
|
94
94
|
| `firestoreDeleteMode` | `FIRESTORE_DELETE_MODE` | no | `shallow` | `shallow` or `recursive` |
|
|
95
|
-
| `rtdbInstance` | `SELECTED_DATABASE_INSTANCE` | no | (empty) | RTDB instance id |
|
|
95
|
+
| `rtdbInstance` | `SELECTED_DATABASE_INSTANCE` | no | (empty) | RTDB instance id; required for RTDB deletion — without it `rtdbPaths` are skipped |
|
|
96
96
|
| `rtdbLocation` | `SELECTED_DATABASE_LOCATION` | no | `us-central1` | RTDB location |
|
|
97
97
|
| `rtdbPaths` | `RTDB_PATHS` | no | (empty) | Comma-separated RTDB paths with `{UID}` |
|
|
98
98
|
| `storageBucket` | `CLOUD_STORAGE_BUCKET` | no | default Storage bucket | Bucket to clear |
|
|
@@ -167,27 +167,20 @@ You can also override both names with `DISCOVERY_TOPIC_NAME` and
|
|
|
167
167
|
`DELETION_TOPIC_NAME`, which the extension did not allow. Change them together,
|
|
168
168
|
since one function publishes to a topic the other is triggered by.
|
|
169
169
|
|
|
170
|
-
### Realtime Database deletion no longer needs a database instance
|
|
171
|
-
|
|
172
|
-
The extension only cleared RTDB paths when both `SELECTED_DATABASE_INSTANCE`
|
|
173
|
-
and `SELECTED_DATABASE_LOCATION` were set. This kit clears them whenever
|
|
174
|
-
`RTDB_PATHS` is set, falling back to your project's default database when no
|
|
175
|
-
instance is named. Set `SELECTED_DATABASE_INSTANCE` explicitly if you are
|
|
176
|
-
targeting a secondary database, and leave `RTDB_PATHS` empty if you do not want
|
|
177
|
-
RTDB touched at all.
|
|
178
|
-
|
|
179
170
|
### Functions deploy to your default region
|
|
180
171
|
|
|
181
172
|
The extension deployed to the location you picked at install time. This kit
|
|
182
173
|
sets no region, so its functions deploy to your codebase's default
|
|
183
174
|
(`us-central1` unless you have changed it).
|
|
184
175
|
|
|
185
|
-
###
|
|
176
|
+
### All functions are 2nd gen
|
|
186
177
|
|
|
187
|
-
`handleSearch` and `handleDeletion` are
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
178
|
+
`clearData`, `handleSearch` and `handleDeletion` are all 2nd gen functions. Kits
|
|
179
|
+
do not support 1st gen endpoints, so `clearData` listens on the 2nd gen Firebase
|
|
180
|
+
Auth event `google.firebase.auth.user.v2.deleted` instead of the 1st gen
|
|
181
|
+
`user.delete` trigger. That event type is still beta in `firebase-functions`.
|
|
182
|
+
This mainly matters if you have infrastructure or alerting keyed to function
|
|
183
|
+
generation.
|
|
191
184
|
|
|
192
185
|
### Empty search fields no longer error
|
|
193
186
|
|
|
@@ -202,11 +195,15 @@ publish `firebase.extensions.delete-user-data.v1.firestore`, `.database` and
|
|
|
202
195
|
`.storage` with the same payloads. Path syntax (`{UID}` substitution, comma
|
|
203
196
|
separated lists, `{DEFAULT}` for the default Storage bucket), the shallow and
|
|
204
197
|
recursive Firestore delete modes, the search depth and field matching rules,
|
|
205
|
-
and the custom `SEARCH_FUNCTION` contract all behave as they did.
|
|
198
|
+
and the custom `SEARCH_FUNCTION` contract all behave as they did. RTDB
|
|
199
|
+
deletion also keeps the extension's gate: paths are only cleared when a
|
|
200
|
+
database URL can be derived from `SELECTED_DATABASE_INSTANCE` and
|
|
201
|
+
`SELECTED_DATABASE_LOCATION`; otherwise they are skipped with a
|
|
202
|
+
`Realtime Database paths are not configured, skipping` log.
|
|
206
203
|
|
|
207
204
|
## API surface
|
|
208
205
|
|
|
209
|
-
- **Main entry** (`@firebase/delete-user-data`): exports `clearData`,
|
|
206
|
+
- **Main entry** (`@firebase-function-kits/delete-user-data`): exports `clearData`,
|
|
210
207
|
`handleSearch`, and `handleDeletion`. The main entry reads environment
|
|
211
208
|
variables when the module loads, so use it from Firebase deploy/emulator/runtime.
|
|
212
209
|
For your own triggers, import from `./lib` instead.
|
package/lib/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAWH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAoI5D,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAWH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAoI5D,eAAO,MAAM,kBAAkB;;;CAGrB,CAAC;AAMX,wBAAgB,aAAa,IAAI,oBAAoB,CAqBpD"}
|
package/lib/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAwJH,sCAqBC;AA3KD,sDAQmC;AAGnC,MAAM,UAAU,GAAG,IAAA,qBAAY,EAAC,aAAa,CAAC,CAAC;AAE/C,MAAM,MAAM,GAAG;IACb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AAC,KAAK,EAAE;QACvD,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE;QACvC,YAAY,EAAE,MAAM,CAAC,YAAY,CAAC,KAAK,EAAE;QACzC,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC;QACvD,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE;QACrC,kBAAkB,EAAE,QAAQ,CAAC,MAAM,CAAC,kBAAkB,CAAC,KAAK,EAAE,CAAC;QAC/D,iBAAiB,EAAE,QAAQ,CAAC,MAAM,CAAC,iBAAiB,CAAC,KAAK,EAAE,CAAC;QAC7D,SAAS,EAAE,kBAAS,CAAC,KAAK,EAAE;KAC7B,CAAC;AACJ,CAAC"}
|
package/lib/events.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcH,oDASC;AArBD,kEAAoD;AAEpD,IAAI,YAA0C,CAAC;AAExC,MAAM,iBAAiB,GAAG,GAAS,EAAE;IAC1C,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB;QACzC,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE;YAC3D,iBAAiB,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB;SACnD,CAAC;QACJ,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC,CAAC;AANW,QAAA,iBAAiB,qBAM5B;AAEK,KAAK,UAAU,oBAAoB,CACxC,MAA4C,EAC5C,IAAY;IAEZ,IAAI,CAAC,YAAY;QAAE,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC5C,OAAO,YAAY,CAAC,OAAO,CAAC;QAC1B,IAAI,EAAE,2CAA2C,MAAM,EAAE;QACzD,IAAI;KACL,CAAC,CAAC;AACL,CAAC"}
|
package/lib/export-config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export-config.js","sourceRoot":"","sources":["../src/export-config.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG
|
|
1
|
+
{"version":3,"file":"export-config.js","sourceRoot":"","sources":["../src/export-config.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAsDH,kEAgCC;AAED,wCASC;AAvDD,MAAM,6BAA6B,GAAG,WAAW,CAAC;AAClD,MAAM,6BAA6B,GAAwB,SAAS,CAAC;AACrE,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAC/B,MAAM,qBAAqB,GAAG,eAAe,CAAC;AAC9C,SAAS,SAAS,CAChB,IAAwB,EACxB,UAAkB,EAClB,MAAc;IAEd,OAAO,IAAI,IAAI,OAAO,UAAU,IAAI,MAAM,EAAE,CAAC;AAC/C,CAAC;AAED,SAAgB,2BAA2B,CACzC,MAA4B;IAE5B,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;IACrC,OAAO;QACL,cAAc,EAAE,MAAM,CAAC,cAAc;QACrC,mBAAmB,EACjB,MAAM,CAAC,mBAAmB,IAAI,6BAA6B;QAC7D,mBAAmB,EACjB,MAAM,CAAC,mBAAmB,IAAI,6BAA6B;QAC7D,YAAY,EAAE,MAAM,CAAC,YAAY;QACjC,YAAY,EAAE,MAAM,CAAC,YAAY;QACjC,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,aAAa,EAAE,MAAM,CAAC,aAAa;QACnC,YAAY,EAAE,MAAM,CAAC,YAAY;QACjC,mBAAmB,EAAE,MAAM,CAAC,mBAAmB,IAAI,KAAK;QACxD,WAAW,EAAE,MAAM,CAAC,WAAW,IAAI,oBAAoB;QACvD,YAAY,EAAE,MAAM,CAAC,YAAY,IAAI,qBAAqB;QAC1D,cAAc,EAAE,MAAM,CAAC,cAAc;QACrC,UAAU;QACV,kBAAkB,EAAE,SAAS,CAC3B,MAAM,CAAC,kBAAkB,EACzB,UAAU,EACV,WAAW,CACZ;QACD,iBAAiB,EAAE,SAAS,CAC1B,MAAM,CAAC,iBAAiB,EACxB,UAAU,EACV,UAAU,CACX;QACD,SAAS,EAAE,MAAM,CAAC,SAAS;KAC5B,CAAC;AACJ,CAAC;AAED,SAAgB,cAAc,CAC5B,wBAA4C,EAC5C,wBAA4C;IAE5C,IAAI,CAAC,wBAAwB,IAAI,CAAC,wBAAwB;QAAE,OAAO,IAAI,CAAC;IACxE,IAAI,wBAAwB,KAAK,aAAa,EAAE,CAAC;QAC/C,OAAO,WAAW,wBAAwB,iBAAiB,CAAC;IAC9D,CAAC;IACD,OAAO,WAAW,wBAAwB,IAAI,wBAAwB,uBAAuB,CAAC;AAChG,CAAC"}
|
package/lib/handlers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../src/handlers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../src/handlers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAS7C,OAAO,EACL,KAAK,gBAAgB,EAEtB,MAAM,2BAA2B,CAAC;AAInC,MAAM,WAAW,cAAe,SAAQ,gBAAgB;IACtD,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC;IACrC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;IAC/B,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC;CACnC;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,wBAAsB,cAAc,CAClC,IAAI,EAAE,iBAAiB,EACvB,GAAG,EAAE,cAAc,GAClB,OAAO,CAAC,IAAI,CAAC,CAwCf;AAED,wBAAsB,YAAY,CAChC,IAAI,EAAE,iBAAiB,EACvB,GAAG,EAAE,cAAc,GAClB,OAAO,CAAC,IAAI,CAAC,CAgDf;AAED,wBAAsB,WAAW,CAC/B,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,cAAc,GAClB,OAAO,CAAC,IAAI,CAAC,CAkCf"}
|
package/lib/handlers.js
CHANGED
|
@@ -57,6 +57,7 @@ exports.handleClear = handleClear;
|
|
|
57
57
|
const firestore_1 = require("firebase-admin/firestore");
|
|
58
58
|
const lodash_chunk_1 = __importDefault(require("lodash.chunk"));
|
|
59
59
|
const events = __importStar(require("./events"));
|
|
60
|
+
const export_config_1 = require("./export-config");
|
|
60
61
|
const helpers_1 = require("./helpers");
|
|
61
62
|
const logs = __importStar(require("./logs"));
|
|
62
63
|
const recursiveDelete_1 = require("./recursiveDelete");
|
|
@@ -146,7 +147,8 @@ async function handleClear(uid, ctx) {
|
|
|
146
147
|
else {
|
|
147
148
|
logs.firestoreNotConfigured();
|
|
148
149
|
}
|
|
149
|
-
if (ctx.config.rtdbPaths
|
|
150
|
+
if (ctx.config.rtdbPaths &&
|
|
151
|
+
(0, export_config_1.getDatabaseUrl)(ctx.config.rtdbInstance, ctx.config.rtdbLocation)) {
|
|
150
152
|
promises.push(clearDatabaseData(ctx.config.rtdbPaths, uid, ctx));
|
|
151
153
|
}
|
|
152
154
|
else {
|
package/lib/handlers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handlers.js","sourceRoot":"","sources":["../src/handlers.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG
|
|
1
|
+
{"version":3,"file":"handlers.js","sourceRoot":"","sources":["../src/handlers.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCH,wCA2CC;AAED,oCAmDC;AAED,kCAqCC;AAtKD,wDAAqD;AACrD,gEAAiC;AACjC,iDAAmC;AACnC,mDAAiD;AACjD,uCAA+D;AAC/D,6CAA+B;AAC/B,uDAAoD;AACpD,uEAGmC;AACnC,uEAAoE;AACpE,qCAAkC;AAmB3B,KAAK,UAAU,cAAc,CAClC,IAAuB,EACvB,GAAmB;IAEnB,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IAC5B,MAAM,UAAU,GAAiC,EAAE,CAAC;IACpD,MAAM,YAAY,GAAa,EAAE,CAAC;IAElC,KAAK,MAAM,YAAY,IAAI,IAAA,sBAAK,EAAS,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC;QACrD,MAAM,KAAK,GAAG,GAAG,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;QACpC,KAAK,MAAM,IAAI,IAAI,YAAY,EAAE,CAAC;YAChC,MAAM,MAAM,GAAG,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YACvC,MAAM,WAAW,GAAG,MAAM,IAAA,0BAAgB,EACxC,MAAM,EACN,IAAI,EACJ,GAAG,EACH,GAAG,CAAC,MAAM,CAAC,YAAY,CACxB,CAAC;YAEF,IAAI,CAAC,WAAW,EAAE,CAAC;gBACjB,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACxB,SAAS;YACX,CAAC;YACD,IAAI,GAAG,CAAC,MAAM,CAAC,mBAAmB,KAAK,WAAW,EAAE,CAAC;gBACnD,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-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,iBAAiB,EAAa,MAAM,0BAA0B,CAAC;AAE7E,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,iBAAiB,EAAa,MAAM,0BAA0B,CAAC;AAE7E,eAAO,MAAM,gBAAgB,GAC3B,KAAK,iBAAiB,EACtB,MAAM,MAAM,EACZ,KAAK,MAAM,EACX,cAAc,MAAM,KACnB,OAAO,CAAC,OAAO,CAejB,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,OAAO,MAAM,EAAE,KAAK,MAAM,KAAG,MAAM,EACP,CAAC"}
|
package/lib/helpers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,wDAA6E;AAEtE,MAAM,gBAAgB,GAAG,KAAK,EACnC,GAAsB,EACtB,IAAY,EACZ,GAAW,EACX,YAAoB,EACF,EAAE;IACpB,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IACpC,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAE5C,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,GAAG,EAAE,CAAC;IACjC,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;QACpB,KAAK,MAAM,KAAK,IAAI,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;YAC5D,MAAM,UAAU,GAAG,QAAQ,CAAC,GAAG,CAAC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AAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC;AADjD,QAAA,gBAAgB,oBACiC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as functionsV1 from "firebase-functions/v1";
|
|
2
1
|
export * from "./lib";
|
|
3
|
-
export declare const clearData:
|
|
2
|
+
export declare const clearData: import("firebase-functions/core").CloudFunction<import("firebase-functions/core").CloudEvent<import("firebase-admin/auth").UserRecord>>;
|
|
4
3
|
export declare const handleSearch: import("firebase-functions/core").CloudFunction<import("firebase-functions/core").CloudEvent<import("firebase-functions/v2/pubsub").MessagePublishedData<any>>>;
|
|
5
4
|
export declare const handleDeletion: import("firebase-functions/core").CloudFunction<import("firebase-functions/core").CloudEvent<import("firebase-functions/v2/pubsub").MessagePublishedData<any>>>;
|
|
6
5
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAkCA,cAAc,OAAO,CAAC;AAqDtB,eAAO,MAAM,SAAS,yIASpB,CAAC;AAEH,eAAO,MAAM,YAAY,iKAKxB,CAAC;AAEF,eAAO,MAAM,cAAc,iKAK1B,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -55,8 +55,8 @@ exports.handleDeletion = exports.handleSearch = exports.clearData = void 0;
|
|
|
55
55
|
const pubsub_1 = require("@google-cloud/pubsub");
|
|
56
56
|
const admin = __importStar(require("firebase-admin"));
|
|
57
57
|
const firestore_1 = require("firebase-admin/firestore");
|
|
58
|
-
const functionsV1 = __importStar(require("firebase-functions/v1"));
|
|
59
58
|
const v2_1 = require("firebase-functions/v2");
|
|
59
|
+
const identity_1 = require("firebase-functions/v2/identity");
|
|
60
60
|
const pubsub_2 = require("firebase-functions/v2/pubsub");
|
|
61
61
|
const config_1 = require("./config");
|
|
62
62
|
const events = __importStar(require("./events"));
|
|
@@ -94,14 +94,25 @@ function getContext() {
|
|
|
94
94
|
ctx = {
|
|
95
95
|
firestore: (0, firestore_1.getFirestore)(resolved.firestoreDatabaseId),
|
|
96
96
|
storage: admin.storage(),
|
|
97
|
-
|
|
97
|
+
// Resolved on first use. Without a configured RTDB instance there is no
|
|
98
|
+
// databaseURL to initialize the app with, and admin.database() throws.
|
|
99
|
+
get database() {
|
|
100
|
+
return admin.database();
|
|
101
|
+
},
|
|
98
102
|
pubsub: new pubsub_1.PubSub({ projectId: resolved.projectId }),
|
|
99
103
|
config: resolved,
|
|
100
104
|
};
|
|
101
105
|
return ctx;
|
|
102
106
|
}
|
|
103
|
-
exports.clearData =
|
|
104
|
-
|
|
107
|
+
exports.clearData = (0, identity_1.onUserDeleted)((event) => {
|
|
108
|
+
// The Auth event delivers no user record when the payload envelope is empty,
|
|
109
|
+
// so bail before getContext() rather than initialising the SDKs for nothing.
|
|
110
|
+
const uid = event.data?.uid;
|
|
111
|
+
if (!uid) {
|
|
112
|
+
logs.deletionEventMissingUid(event.id);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
return (0, handlers_1.handleClear)(uid, getContext());
|
|
105
116
|
});
|
|
106
117
|
exports.handleSearch = (0, pubsub_2.onMessagePublished)({
|
|
107
118
|
topic: config_1.CONFIG_EXPRESSIONS.discoveryTopicName,
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,iDAA8C;AAC9C,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../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|
export declare const storagePath404: (path: string) => void;
|
|
23
23
|
export declare const storagePathError: (path: string, err: Error) => void;
|
|
24
24
|
export declare const customFunctionError: (err: Error) => void;
|
|
25
|
+
export declare const deletionEventMissingUid: (eventId: string) => void;
|
|
25
26
|
export declare function warnInvalidPaths(invalidPathCount: number, uid: string): void;
|
|
26
27
|
//# sourceMappingURL=logs.d.ts.map
|
package/lib/logs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logs.d.ts","sourceRoot":"","sources":["../src/logs.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AAEpE,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"logs.d.ts","sourceRoot":"","sources":["../src/logs.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AAEpE,eAAO,MAAM,QAAQ,GAAI,KAAK,MAAM,SAEnC,CAAC;AAEF,eAAO,MAAM,gBAAgB,YAE5B,CAAC;AAEF,eAAO,MAAM,iBAAiB,YAE7B,CAAC;AAEF,eAAO,MAAM,sBAAsB,YAElC,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,MAAM,MAAM,EAAE,WAAW,OAAO,SAMpE,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,MAAM,MAAM,EAAE,WAAW,OAAO,SAMrE,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,MAAM,MAAM,EAAE,KAAK,KAAK,SAE1D,CAAC;AAEF,eAAO,MAAM,IAAI,GAAI,QAAQ,4BAA4B,SAExD,CAAC;AAEF,eAAO,MAAM,WAAW,YAEvB,CAAC;AAEF,eAAO,MAAM,YAAY,YAExB,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,SAE3C,CAAC;AAEF,eAAO,MAAM,iBAAiB,YAE7B,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,SAE5C,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,EAAE,KAAK,KAAK,SAKrD,CAAC;AAEF,eAAO,MAAM,KAAK,GAAI,QAAQ,4BAA4B,SAEzD,CAAC;AAEF,eAAO,MAAM,cAAc,YAE1B,CAAC;AAEF,eAAO,MAAM,eAAe,YAE3B,CAAC;AAEF,eAAO,MAAM,oBAAoB,YAEhC,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,MAAM,MAAM,SAE9C,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,MAAM,MAAM,SAE/C,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,MAAM,MAAM,SAE1C,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,EAAE,KAAK,KAAK,SAExD,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,KAAK,KAAK,SAE7C,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,SAAS,MAAM,SAItD,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,gBAAgB,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,QAIrE"}
|
package/lib/logs.js
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.customFunctionError = exports.storagePathError = exports.storagePath404 = exports.storagePathDeleting = exports.storagePathDeleted = exports.storageNotConfigured = exports.storageDeleting = exports.storageDeleted = exports.start = exports.rtdbPathError = exports.rtdbPathDeleting = exports.rtdbNotConfigured = exports.rtdbPathDeleted = exports.rtdbDeleting = exports.rtdbDeleted = exports.init = exports.firestorePathError = exports.firestorePathDeleting = exports.firestorePathDeleted = exports.firestoreNotConfigured = exports.firestoreDeleting = exports.firestoreDeleted = exports.complete = void 0;
|
|
18
|
+
exports.deletionEventMissingUid = exports.customFunctionError = exports.storagePathError = exports.storagePath404 = exports.storagePathDeleting = exports.storagePathDeleted = exports.storageNotConfigured = exports.storageDeleting = exports.storageDeleted = exports.start = exports.rtdbPathError = exports.rtdbPathDeleting = exports.rtdbNotConfigured = exports.rtdbPathDeleted = exports.rtdbDeleting = exports.rtdbDeleted = exports.init = exports.firestorePathError = exports.firestorePathDeleting = exports.firestorePathDeleted = exports.firestoreNotConfigured = exports.firestoreDeleting = exports.firestoreDeleted = exports.complete = void 0;
|
|
19
19
|
exports.warnInvalidPaths = warnInvalidPaths;
|
|
20
20
|
const firebase_functions_1 = require("firebase-functions");
|
|
21
21
|
const complete = (uid) => {
|
|
@@ -110,6 +110,10 @@ const customFunctionError = (err) => {
|
|
|
110
110
|
firebase_functions_1.logger.error(`Call to custom hook function threw an error`, err);
|
|
111
111
|
};
|
|
112
112
|
exports.customFunctionError = customFunctionError;
|
|
113
|
+
const deletionEventMissingUid = (eventId) => {
|
|
114
|
+
firebase_functions_1.logger.error(`Auth deletion event ${eventId} carried no user id, so no data was deleted`);
|
|
115
|
+
};
|
|
116
|
+
exports.deletionEventMissingUid = deletionEventMissingUid;
|
|
113
117
|
function warnInvalidPaths(invalidPathCount, uid) {
|
|
114
118
|
firebase_functions_1.logger.warn(`Attempted to delete ${invalidPathCount} invalid paths for deleted user ${uid}`);
|
|
115
119
|
}
|
package/lib/logs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logs.js","sourceRoot":"","sources":["../src/logs.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG
|
|
1
|
+
{"version":3,"file":"logs.js","sourceRoot":"","sources":["../src/logs.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAkHH,4CAIC;AApHD,2DAA4C;AAGrC,MAAM,QAAQ,GAAG,CAAC,GAAW,EAAE,EAAE;IACtC,2BAAM,CAAC,GAAG,CAAC,uCAAuC,GAAG,EAAE,CAAC,CAAC;AAC3D,CAAC,CAAC;AAFW,QAAA,QAAQ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EF,SAAgB,gBAAgB,CAAC,gBAAwB,EAAE,GAAW;IACpE,2BAAM,CAAC,IAAI,CACT,uBAAuB,gBAAgB,mCAAmC,GAAG,EAAE,CAChF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recursiveDelete.d.ts","sourceRoot":"","sources":["../src/recursiveDelete.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAI7C,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"recursiveDelete.d.ts","sourceRoot":"","sources":["../src/recursiveDelete.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAI7C,eAAO,MAAM,eAAe,GAC1B,MAAM,MAAM,EACZ,IAAI,KAAK,CAAC,SAAS,CAAC,SAAS,kBAmB9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recursiveDelete.js","sourceRoot":"","sources":["../src/recursiveDelete.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAIH,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAEtB,MAAM,eAAe,GAAG,KAAK,EAClC,IAAY,EACZ,EAA6B,EAC7B,EAAE;IACF,qEAAqE;IACrE,MAAM,UAAU,GAAG,EAAE,CAAC,UAAU,EAAE,CAAC;IAEnC,UAAU,CAAC,YAAY,CAAC,CAAC,KAAK,EAAE,EAAE;QAChC,IAAI,KAAK,CAAC,cAAc,GAAG,kBAAkB,EAAE,CAAC;YAC9C,OAAO,IAAI,CAAC;QACd,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,IAAI,CAAC,6BAA6B,EAAE,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YACpE,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC,CAAC,CA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AAS,EAAE,UAAU,CAAC,CAAC;AAClD,CAAC,CAAC;AArBW,QAAA,eAAe,mBAqB1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runBatchPubSubDeletions.js","sourceRoot":"","sources":["../src/runBatchPubSubDeletions.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG
|
|
1
|
+
{"version":3,"file":"runBatchPubSubDeletions.js","sourceRoot":"","sources":["../src/runBatchPubSubDeletions.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;AA0BH,sCASC;AAED,0DAcC;AAhDD,gEAAiC;AAYjC,SAAS,SAAS,CAChB,MAAoC,EACpC,SAAiB;IAEjB,MAAM,SAAS,GACb,MAAM,CAAC,SAAS;QAChB,OAAO,CAAC,GAAG,CAAC,oBAAoB;QAChC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;IACzB,OAAO,SAAS,CAAC,CAAC,CAAC,YAAY,SAAS,WAAW,SAAS,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AAC7E,CAAC;AAEM,KAAK,UAAU,aAAa,CACjC,GAAW,EACX,KAAa,EACb,IAAY,EACZ,GAAqB;IAErB,MAAM,GAAG,CAAC,MAAM;SACb,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;SAC3D,cAAc,CAAC,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;AACpD,CAAC;AAEM,KAAK,UAAU,uBAAuB,CAC3C,KAAoB,EACpB,GAAW,EACX,GAAqB;IAErB,MAAM,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IACjC,IAAI,CAAC,cAAc,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC;QAAE,OAAO;IAC9D,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IAExC,KAAK,MAAM,YAAY,IAAI,IAAA,sBAAK,EAAS,cAAc,EAAE,GAAG,CAAC,EAAE,CAAC;QAC9D,MAAM,GAAG,CAAC,MAAM;aACb,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;aAC1D,cAAc,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;IAC5D,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runCustomSearchFunction.d.ts","sourceRoot":"","sources":["../src/runCustomSearchFunction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAGlE,eAAO,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"runCustomSearchFunction.d.ts","sourceRoot":"","sources":["../src/runCustomSearchFunction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAGlE,eAAO,MAAM,uBAAuB,GAClC,KAAK,MAAM,EACX,KAAK,gBAAgB,KACpB,OAAO,CAAC,IAAI,CAyBd,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runCustomSearchFunction.js","sourceRoot":"","sources":["../src/runCustomSearchFunction.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4DAA+B;AAC/B,
|
|
1
|
+
{"version":3,"file":"runCustomSearchFunction.js","sourceRoot":"","sources":["../src/runCustomSearchFunction.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4DA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AC;AAEnC,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../src/search.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EACL,KAAK,gBAAgB,EAEtB,MAAM,2BAA2B,CAAC;AAEnC,eAAO,MAAM,MAAM,GACjB,KAAK,MAAM,EACX,OAAO,MAAM,EACb,IAAI,KAAK,CAAC,SAAS,CAAC,SAAS,EAC7B,KAAK,gBAAgB,EACrB,WAAW,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,KAAK,CAAC,SAAS,CAAC,YAAY,CAAC,KACzE,OAAO,CAAC,IAAI,CAQd,CAAC"}
|
package/lib/search.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.js","sourceRoot":"","sources":["../src/search.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,uEAGmC;AAE5B,MAAM,MAAM,GAAG,KAAK,EACzB,GAAW,EACX,KAAa,EACb,EAA6B,EAC7B,GAAqB,EACrB,QAA0E,EAC3D,EAAE;IACjB,MAAM,WAAW,GAAG,CAAC,QAAQ;QAC3B,CAAC,CAAC,MAAM,EAAE,CAAC,eAAe,EAAE;QAC5B,CAAC,CAAC,MAAM,QAAQ,CAAC,eAAe,EAAE,CAAC;IAErC,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;QACrC,MAAM,IAAA,uCAAa,EAAC,GAAG,EAAE,KAAK,EAAE,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACxD,CAAC;AACH,CAAC,CAAC;AAdW,QAAA,MAAM,
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../src/search.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,uEAGmC;AAE5B,MAAM,MAAM,GAAG,KAAK,EACzB,GAAW,EACX,KAAa,EACb,EAA6B,EAC7B,GAAqB,EACrB,QAA0E,EAC3D,EAAE;IACjB,MAAM,WAAW,GAAG,CAAC,QAAQ;QAC3B,CAAC,CAAC,MAAM,EAAE,CAAC,eAAe,EAAE;QAC5B,CAAC,CAAC,MAAM,QAAQ,CAAC,eAAe,EAAE,CAAC;IAErC,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;QACrC,MAAM,IAAA,uCAAa,EAAC,GAAG,EAAE,KAAK,EAAE,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACxD,CAAC;AACH,CAAC,CAAC;AAdW,QAAA,MAAM,UAcjB"}
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firebase-function-kits/delete-user-data",
|
|
3
|
-
"version": "0.0.2-rc.
|
|
3
|
+
"version": "0.0.2-rc.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@firebase-function-kits/delete-user-data",
|
|
9
|
-
"version": "0.0.2-rc.
|
|
9
|
+
"version": "0.0.2-rc.3",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@google-cloud/pubsub": "^4.3.3",
|
|
13
13
|
"firebase-admin": "^13.2.0",
|
|
14
|
-
"firebase-functions": "7.3.2",
|
|
14
|
+
"firebase-functions": "^7.3.2",
|
|
15
15
|
"lodash.chunk": "^4.2.0",
|
|
16
16
|
"node-fetch": "^2.6.2"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@types/lodash.chunk": "^4.2.7",
|
|
20
20
|
"@types/node-fetch": "^2.6.2",
|
|
21
|
+
"typescript": "^5.9.3",
|
|
21
22
|
"vitest": "^4.1.10"
|
|
22
23
|
},
|
|
23
24
|
"engines": {
|
|
@@ -3792,6 +3793,20 @@
|
|
|
3792
3793
|
"url": "https://opencollective.com/express"
|
|
3793
3794
|
}
|
|
3794
3795
|
},
|
|
3796
|
+
"node_modules/typescript": {
|
|
3797
|
+
"version": "5.9.3",
|
|
3798
|
+
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
|
|
3799
|
+
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
|
|
3800
|
+
"dev": true,
|
|
3801
|
+
"license": "Apache-2.0",
|
|
3802
|
+
"bin": {
|
|
3803
|
+
"tsc": "bin/tsc",
|
|
3804
|
+
"tsserver": "bin/tsserver"
|
|
3805
|
+
},
|
|
3806
|
+
"engines": {
|
|
3807
|
+
"node": ">=14.17"
|
|
3808
|
+
}
|
|
3809
|
+
},
|
|
3795
3810
|
"node_modules/undici-types": {
|
|
3796
3811
|
"version": "8.3.0",
|
|
3797
3812
|
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.3.0.tgz",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firebase-function-kits/delete-user-data",
|
|
3
|
-
"version": "0.0.2-rc.
|
|
3
|
+
"version": "0.0.2-rc.3",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/firebase/extensions.git",
|
|
@@ -33,13 +33,14 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@google-cloud/pubsub": "^4.3.3",
|
|
35
35
|
"firebase-admin": "^13.2.0",
|
|
36
|
-
"firebase-functions": "7.3.2",
|
|
36
|
+
"firebase-functions": "^7.3.2",
|
|
37
37
|
"lodash.chunk": "^4.2.0",
|
|
38
38
|
"node-fetch": "^2.6.2"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/lodash.chunk": "^4.2.7",
|
|
42
42
|
"@types/node-fetch": "^2.6.2",
|
|
43
|
+
"typescript": "^5.9.3",
|
|
43
44
|
"vitest": "^4.1.10"
|
|
44
45
|
}
|
|
45
46
|
}
|
package/src/handlers.ts
CHANGED
|
@@ -19,6 +19,7 @@ import type { DocumentReference } from "firebase-admin/firestore";
|
|
|
19
19
|
import { FieldPath } from "firebase-admin/firestore";
|
|
20
20
|
import chunk from "lodash.chunk";
|
|
21
21
|
import * as events from "./events";
|
|
22
|
+
import { getDatabaseUrl } from "./export-config";
|
|
22
23
|
import { extractUserPaths, hasValidUserPath } from "./helpers";
|
|
23
24
|
import * as logs from "./logs";
|
|
24
25
|
import { recursiveDelete } from "./recursiveDelete";
|
|
@@ -156,7 +157,10 @@ export async function handleClear(
|
|
|
156
157
|
} else {
|
|
157
158
|
logs.firestoreNotConfigured();
|
|
158
159
|
}
|
|
159
|
-
if (
|
|
160
|
+
if (
|
|
161
|
+
ctx.config.rtdbPaths &&
|
|
162
|
+
getDatabaseUrl(ctx.config.rtdbInstance, ctx.config.rtdbLocation)
|
|
163
|
+
) {
|
|
160
164
|
promises.push(clearDatabaseData(ctx.config.rtdbPaths, uid, ctx));
|
|
161
165
|
} else {
|
|
162
166
|
logs.rtdbNotConfigured();
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Google LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import type { UserRecord } from "firebase-functions/v1/auth";
|
|
18
|
+
import type { CloudEvent, CloudFunction } from "firebase-functions/v2";
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* `onUserDeleted` ships in firebase-functions 7.3.2 and emits a `gcfv2`
|
|
22
|
+
* endpoint, but is marked `@beta @internal` upstream and so is stripped from
|
|
23
|
+
* the published type declarations. It is the only 2nd gen Firebase Auth
|
|
24
|
+
* deletion trigger, and kits reject 1st gen endpoints. Keep `firebase-functions`
|
|
25
|
+
* pinned exactly: this signature carries no stability guarantee. Delete this
|
|
26
|
+
* file once the export is public.
|
|
27
|
+
*/
|
|
28
|
+
declare module "firebase-functions/v2/identity" {
|
|
29
|
+
export function onUserDeleted(
|
|
30
|
+
handler: (event: CloudEvent<UserRecord>) => unknown
|
|
31
|
+
): CloudFunction<CloudEvent<UserRecord>>;
|
|
32
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
import { PubSub } from "@google-cloud/pubsub";
|
|
18
18
|
import * as admin from "firebase-admin";
|
|
19
19
|
import { getFirestore } from "firebase-admin/firestore";
|
|
20
|
-
import * as functionsV1 from "firebase-functions/v1";
|
|
21
20
|
import type { Role } from "firebase-functions/v2";
|
|
22
21
|
import { requiresRole } from "firebase-functions/v2";
|
|
22
|
+
import { onUserDeleted } from "firebase-functions/v2/identity";
|
|
23
23
|
import { onMessagePublished } from "firebase-functions/v2/pubsub";
|
|
24
24
|
import { CONFIG_EXPRESSIONS, configFromEnv } from "./config";
|
|
25
25
|
import * as events from "./events";
|
|
@@ -74,15 +74,26 @@ function getContext(): HandlerContext {
|
|
|
74
74
|
ctx = {
|
|
75
75
|
firestore: getFirestore(resolved.firestoreDatabaseId),
|
|
76
76
|
storage: admin.storage(),
|
|
77
|
-
|
|
77
|
+
// Resolved on first use. Without a configured RTDB instance there is no
|
|
78
|
+
// databaseURL to initialize the app with, and admin.database() throws.
|
|
79
|
+
get database() {
|
|
80
|
+
return admin.database();
|
|
81
|
+
},
|
|
78
82
|
pubsub: new PubSub({ projectId: resolved.projectId }),
|
|
79
83
|
config: resolved,
|
|
80
84
|
};
|
|
81
85
|
return ctx;
|
|
82
86
|
}
|
|
83
87
|
|
|
84
|
-
export const clearData =
|
|
85
|
-
|
|
88
|
+
export const clearData = onUserDeleted((event) => {
|
|
89
|
+
// The Auth event delivers no user record when the payload envelope is empty,
|
|
90
|
+
// so bail before getContext() rather than initialising the SDKs for nothing.
|
|
91
|
+
const uid = event.data?.uid;
|
|
92
|
+
if (!uid) {
|
|
93
|
+
logs.deletionEventMissingUid(event.id);
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
return handleClear(uid, getContext());
|
|
86
97
|
});
|
|
87
98
|
|
|
88
99
|
export const handleSearch = onMessagePublished(
|
package/src/logs.ts
CHANGED
|
@@ -120,6 +120,12 @@ export const customFunctionError = (err: Error) => {
|
|
|
120
120
|
logger.error(`Call to custom hook function threw an error`, err);
|
|
121
121
|
};
|
|
122
122
|
|
|
123
|
+
export const deletionEventMissingUid = (eventId: string) => {
|
|
124
|
+
logger.error(
|
|
125
|
+
`Auth deletion event ${eventId} carried no user id, so no data was deleted`
|
|
126
|
+
);
|
|
127
|
+
};
|
|
128
|
+
|
|
123
129
|
export function warnInvalidPaths(invalidPathCount: number, uid: string) {
|
|
124
130
|
logger.warn(
|
|
125
131
|
`Attempted to delete ${invalidPathCount} invalid paths for deleted user ${uid}`
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 Google LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { beforeEach, describe, expect, test, vi } from "vitest";
|
|
18
|
+
|
|
19
|
+
// Stands in for a project with no Realtime Database URL available, which is what
|
|
20
|
+
// an empty SELECTED_DATABASE_INSTANCE leaves behind.
|
|
21
|
+
const NO_DATABASE_URL = "Can't determine Firebase Database URL.";
|
|
22
|
+
|
|
23
|
+
vi.mock("../src/logs");
|
|
24
|
+
vi.mock("../src/handlers", async (importOriginal) => ({
|
|
25
|
+
...(await importOriginal<typeof import("../src/handlers")>()),
|
|
26
|
+
handleClear: vi.fn(),
|
|
27
|
+
}));
|
|
28
|
+
vi.mock("@google-cloud/pubsub", () => ({ PubSub: vi.fn() }));
|
|
29
|
+
vi.mock("firebase-admin/firestore", () => ({
|
|
30
|
+
getFirestore: vi.fn(() => ({})),
|
|
31
|
+
}));
|
|
32
|
+
vi.mock("firebase-admin", () => ({
|
|
33
|
+
apps: [],
|
|
34
|
+
credential: { applicationDefault: vi.fn() },
|
|
35
|
+
initializeApp: vi.fn(),
|
|
36
|
+
storage: vi.fn(() => ({})),
|
|
37
|
+
database: vi.fn(() => {
|
|
38
|
+
throw new Error(NO_DATABASE_URL);
|
|
39
|
+
}),
|
|
40
|
+
}));
|
|
41
|
+
|
|
42
|
+
import * as admin from "firebase-admin";
|
|
43
|
+
import type { HandlerContext } from "../src/handlers";
|
|
44
|
+
import { handleClear } from "../src/handlers";
|
|
45
|
+
import { clearData } from "../src/index";
|
|
46
|
+
|
|
47
|
+
function deletionEvent(uid: string) {
|
|
48
|
+
return {
|
|
49
|
+
specversion: "1.0",
|
|
50
|
+
id: "event-id",
|
|
51
|
+
type: "google.firebase.auth.user.v2.deleted",
|
|
52
|
+
source: "//identitytoolkit.googleapis.com/projects/test-project",
|
|
53
|
+
time: "2026-01-01T00:00:00.000Z",
|
|
54
|
+
data: { uid },
|
|
55
|
+
} as any;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
describe("handler context", () => {
|
|
59
|
+
beforeEach(() => {
|
|
60
|
+
vi.clearAllMocks();
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
test("builds without resolving the RTDB client", () => {
|
|
64
|
+
expect(() => clearData(deletionEvent("uid-1"))).not.toThrow();
|
|
65
|
+
|
|
66
|
+
expect(handleClear).toHaveBeenCalledOnce();
|
|
67
|
+
expect(admin.database).not.toHaveBeenCalled();
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
test("resolves the RTDB client when the deletion path reads it", () => {
|
|
71
|
+
clearData(deletionEvent("uid-2"));
|
|
72
|
+
|
|
73
|
+
const [, ctx] = vi.mocked(handleClear).mock.lastCall as [
|
|
74
|
+
string,
|
|
75
|
+
HandlerContext
|
|
76
|
+
];
|
|
77
|
+
|
|
78
|
+
expect(() => ctx.database).toThrow(NO_DATABASE_URL);
|
|
79
|
+
expect(admin.database).toHaveBeenCalled();
|
|
80
|
+
});
|
|
81
|
+
});
|
package/tests/handlers.test.ts
CHANGED
|
@@ -406,7 +406,11 @@ describe("handleClear", () => {
|
|
|
406
406
|
|
|
407
407
|
test("deletes the configured rtdb paths", async () => {
|
|
408
408
|
const ctx = makeContext({
|
|
409
|
-
config: {
|
|
409
|
+
config: {
|
|
410
|
+
rtdbPaths: "users/{UID},admins/{UID}",
|
|
411
|
+
rtdbInstance: "test-rtdb-instance",
|
|
412
|
+
rtdbLocation: "us-central1",
|
|
413
|
+
},
|
|
410
414
|
});
|
|
411
415
|
|
|
412
416
|
await handleClear(UID, ctx);
|
|
@@ -418,6 +422,17 @@ describe("handleClear", () => {
|
|
|
418
422
|
});
|
|
419
423
|
});
|
|
420
424
|
|
|
425
|
+
test("skips rtdb deletion when no database instance is configured", async () => {
|
|
426
|
+
const ctx = makeContext({
|
|
427
|
+
config: { rtdbPaths: "users/{UID}" },
|
|
428
|
+
});
|
|
429
|
+
|
|
430
|
+
await handleClear(UID, ctx);
|
|
431
|
+
|
|
432
|
+
expect(ctx.rtdbRemovals).toEqual([]);
|
|
433
|
+
expect(log.rtdbNotConfigured).toHaveBeenCalled();
|
|
434
|
+
});
|
|
435
|
+
|
|
421
436
|
test("deletes the configured storage paths", async () => {
|
|
422
437
|
const ctx = makeContext({
|
|
423
438
|
config: {
|
|
@@ -463,7 +478,11 @@ describe("handleClear", () => {
|
|
|
463
478
|
test("logs rtdb errors without failing", async () => {
|
|
464
479
|
const error = new Error("boom");
|
|
465
480
|
const ctx = makeContext({
|
|
466
|
-
config: {
|
|
481
|
+
config: {
|
|
482
|
+
rtdbPaths: "users/{UID}",
|
|
483
|
+
rtdbInstance: "test-rtdb-instance",
|
|
484
|
+
rtdbLocation: "us-central1",
|
|
485
|
+
},
|
|
467
486
|
rtdbError: error,
|
|
468
487
|
});
|
|
469
488
|
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2026 Google LLC
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { beforeEach, describe, expect, test, vi } from "vitest";
|
|
18
|
+
|
|
19
|
+
vi.mock("../src/logs");
|
|
20
|
+
vi.mock("../src/handlers", async (importOriginal) => ({
|
|
21
|
+
...(await importOriginal<typeof import("../src/handlers")>()),
|
|
22
|
+
handleClear: vi.fn(),
|
|
23
|
+
}));
|
|
24
|
+
|
|
25
|
+
import { handleClear } from "../src/handlers";
|
|
26
|
+
import { clearData } from "../src/index";
|
|
27
|
+
import * as logs from "../src/logs";
|
|
28
|
+
|
|
29
|
+
function deletionEvent(data: unknown) {
|
|
30
|
+
return {
|
|
31
|
+
specversion: "1.0",
|
|
32
|
+
id: "event-id",
|
|
33
|
+
type: "google.firebase.auth.user.v2.deleted",
|
|
34
|
+
source: "//identitytoolkit.googleapis.com/projects/test-project",
|
|
35
|
+
time: "2026-01-01T00:00:00.000Z",
|
|
36
|
+
data,
|
|
37
|
+
} as any;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
describe("clearData", () => {
|
|
41
|
+
beforeEach(() => {
|
|
42
|
+
vi.clearAllMocks();
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
// Kits reject gen1 endpoints, so the deploy fails if this regresses.
|
|
46
|
+
test("registers a gen2 Firebase Auth deletion trigger", () => {
|
|
47
|
+
const endpoint = (clearData as any).__endpoint;
|
|
48
|
+
|
|
49
|
+
expect(endpoint.platform).toBe("gcfv2");
|
|
50
|
+
expect(endpoint.eventTrigger.eventType).toBe(
|
|
51
|
+
"google.firebase.auth.user.v2.deleted"
|
|
52
|
+
);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
test("logs and skips deletion when the event carries no user record", () => {
|
|
56
|
+
expect(() => clearData(deletionEvent(undefined))).not.toThrow();
|
|
57
|
+
|
|
58
|
+
expect(handleClear).not.toHaveBeenCalled();
|
|
59
|
+
expect(logs.deletionEventMissingUid).toHaveBeenCalledWith("event-id");
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
test("logs and skips deletion when the user record has no uid", () => {
|
|
63
|
+
expect(() =>
|
|
64
|
+
clearData(deletionEvent({ email: "user@example.com" }))
|
|
65
|
+
).not.toThrow();
|
|
66
|
+
|
|
67
|
+
expect(handleClear).not.toHaveBeenCalled();
|
|
68
|
+
expect(logs.deletionEventMissingUid).toHaveBeenCalledWith("event-id");
|
|
69
|
+
});
|
|
70
|
+
});
|
package/tsconfig.tsbuildinfo
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"7.0.2","root":["./src/config.ts","./src/events.ts","./src/export-config.ts","./src/handlers.ts","./src/helpers.ts","./src/index.ts","./src/lib.ts","./src/logs.ts","./src/recursiveDelete.ts","./src/runBatchPubSubDeletions.ts","./src/runCustomSearchFunction.ts","./src/search.ts"],"packageJsons":["./node_modules/@firebase/app-types/package.json","./node_modules/@firebase/component/package.json","./node_modules/@firebase/database-types/package.json","./node_modules/@firebase/logger/package.json","./node_modules/@firebase/util/package.json","./node_modules/@google-cloud/firestore/package.json","./node_modules/@google-cloud/precise-date/package.json","./node_modules/@google-cloud/pubsub/package.json","./node_modules/@google-cloud/storage/build/cjs/package.json","./node_modules/@google-cloud/storage/package.json","./node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader/package.json","./node_modules/@grpc/grpc-js/package.json","./node_modules/@grpc/proto-loader/package.json","./node_modules/@js-sdsl/ordered-map/package.json","./node_modules/@opentelemetry/api/package.json","./node_modules/@types/body-parser/package.json","./node_modules/@types/connect/package.json","./node_modules/@types/cors/package.json","./node_modules/@types/express-serve-static-core/package.json","./node_modules/@types/express/package.json","./node_modules/@types/http-errors/package.json","./node_modules/@types/lodash.chunk/package.json","./node_modules/@types/lodash/package.json","./node_modules/@types/node-fetch/package.json","./node_modules/@types/node/package.json","./node_modules/@types/qs/package.json","./node_modules/@types/range-parser/package.json","./node_modules/@types/send/package.json","./node_modules/@types/serve-static/package.json","./node_modules/abort-controller/package.json","./node_modules/body-parser/package.json","./node_modules/cors/package.json","./node_modules/event-target-shim/package.json","./node_modules/express/package.json","./node_modules/firebase-admin/package.json","./node_modules/firebase-functions/package.json","./node_modules/form-data/package.json","./node_modules/gaxios/package.json","./node_modules/gcp-metadata/package.json","./node_modules/google-auth-library/package.json","./node_modules/google-gax/package.json","./node_modules/gtoken/package.json","./node_modules/http-errors/package.json","./node_modules/lodash.chunk/package.json","./node_modules/long/package.json","./node_modules/long/umd/package.json","./node_modules/node-fetch/package.json","./node_modules/p-defer/package.json","./node_modules/proto3-json-serializer/package.json","./node_modules/protobufjs/package.json","./node_modules/qs/package.json","./node_modules/range-parser/package.json","./node_modules/send/package.json","./node_modules/serve-static/package.json","./node_modules/string_decoder/package.json","./node_modules/teeny-request/package.json","./node_modules/undici-types/package.json","./package.json"],"missingPackageJsons":["./node_modules/@apollo/server/package.json","./node_modules/@as-integrations/express4/package.json","./node_modules/@firebase/logger/dist/package.json","./node_modules/@firebase/logger/dist/src/package.json","./node_modules/@firebase/util/dist/package.json","./node_modules/@google-cloud/firestore/types/package.json","./node_modules/@google-cloud/firestore/types/protos/package.json","./node_modules/@google-cloud/firestore/types/v1/package.json","./node_modules/@google-cloud/firestore/types/v1beta1/package.json","./node_modules/@google-cloud/precise-date/build/package.json","./node_modules/@google-cloud/precise-date/build/src/package.json","./node_modules/@google-cloud/pubsub/build/package.json","./node_modules/@google-cloud/pubsub/build/protos/package.json","./node_modules/@google-cloud/pubsub/build/src/package.json","./node_modules/@google-cloud/pubsub/build/src/publisher/package.json","./node_modules/@google-cloud/pubsub/build/src/v1/package.json","./node_modules/@google-cloud/storage/build/cjs/src/nodejs-common/package.json","./node_modules/@google-cloud/storage/build/cjs/src/package.json","./node_modules/@grpc/grpc-js/build/package.json","./node_modules/@grpc/grpc-js/build/src/client/package.json","./node_modules/@grpc/grpc-js/build/src/generated/google/package.json","./node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/package.json","./node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/package.json","./node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/package.json","./node_modules/@grpc/grpc-js/build/src/generated/grpc/package.json","./node_modules/@grpc/grpc-js/build/src/generated/package.json","./node_modules/@grpc/grpc-js/build/src/generated/xds/data/orca/package.json","./node_modules/@grpc/grpc-js/build/src/generated/xds/data/orca/v3/package.json","./node_modules/@grpc/grpc-js/build/src/generated/xds/data/package.json","./node_modules/@grpc/grpc-js/build/src/generated/xds/package.json","./node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/package.json","./node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/package.json","./node_modules/@grpc/grpc-js/build/src/generated/xds/service/package.json","./node_modules/@grpc/grpc-js/build/src/package.json","./node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader/build/package.json","./node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader/build/src/package.json","./node_modules/@grpc/grpc-js/node_modules/@js-sdsl/ordered-map/package.json","./node_modules/@grpc/grpc-js/node_modules/events/package.json","./node_modules/@grpc/grpc-js/node_modules/http2/package.json","./node_modules/@grpc/grpc-js/node_modules/long/package.json","./node_modules/@grpc/grpc-js/node_modules/net/package.json","./node_modules/@grpc/grpc-js/node_modules/protobufjs/ext/descriptor/package.json","./node_modules/@grpc/grpc-js/node_modules/protobufjs/package.json","./node_modules/@grpc/grpc-js/node_modules/stream/package.json","./node_modules/@grpc/grpc-js/node_modules/tls/package.json","./node_modules/@grpc/proto-loader/build/package.json","./node_modules/@grpc/proto-loader/build/src/package.json","./node_modules/@js-sdsl/ordered-map/dist/esm/package.json","./node_modules/@js-sdsl/ordered-map/dist/package.json","./node_modules/@opentelemetry/api/build/package.json","./node_modules/@opentelemetry/api/build/src/api/package.json","./node_modules/@opentelemetry/api/build/src/baggage/internal/package.json","./node_modules/@opentelemetry/api/build/src/baggage/package.json","./node_modules/@opentelemetry/api/build/src/common/package.json","./node_modules/@opentelemetry/api/build/src/context/package.json","./node_modules/@opentelemetry/api/build/src/diag/package.json","./node_modules/@opentelemetry/api/build/src/metrics/package.json","./node_modules/@opentelemetry/api/build/src/package.json","./node_modules/@opentelemetry/api/build/src/propagation/package.json","./node_modules/@opentelemetry/api/build/src/trace/internal/package.json","./node_modules/@opentelemetry/api/build/src/trace/package.json","./node_modules/@types/assert/package.json","./node_modules/@types/assert/strict/package.json","./node_modules/@types/async_hooks/package.json","./node_modules/@types/buffer/package.json","./node_modules/@types/child_process/package.json","./node_modules/@types/cluster/package.json","./node_modules/@types/console/package.json","./node_modules/@types/constants/package.json","./node_modules/@types/crypto/package.json","./node_modules/@types/dgram/package.json","./node_modules/@types/diagnostics_channel/package.json","./node_modules/@types/dns/package.json","./node_modules/@types/dns/promises/package.json","./node_modules/@types/domain/package.json","./node_modules/@types/events/package.json","./node_modules/@types/fs/package.json","./node_modules/@types/fs/promises/package.json","./node_modules/@types/http/package.json","./node_modules/@types/http2/package.json","./node_modules/@types/https/package.json","./node_modules/@types/inspector/package.json","./node_modules/@types/inspector/promises/package.json","./node_modules/@types/lodash/common/package.json","./node_modules/@types/module/package.json","./node_modules/@types/net/package.json","./node_modules/@types/node/assert/package.json","./node_modules/@types/node/dns/package.json","./node_modules/@types/node/fs/package.json","./node_modules/@types/node/inspector/package.json","./node_modules/@types/node/path/package.json","./node_modules/@types/node/readline/package.json","./node_modules/@types/node/stream/package.json","./node_modules/@types/node/test/package.json","./node_modules/@types/node/timers/package.json","./node_modules/@types/node/util/package.json","./node_modules/@types/node/web-globals/package.json","./node_modules/@types/node/zlib/package.json","./node_modules/@types/os/package.json","./node_modules/@types/path/package.json","./node_modules/@types/path/posix/package.json","./node_modules/@types/path/win32/package.json","./node_modules/@types/perf_hooks/package.json","./node_modules/@types/process/package.json","./node_modules/@types/punycode/package.json","./node_modules/@types/querystring/package.json","./node_modules/@types/readline/package.json","./node_modules/@types/readline/promises/package.json","./node_modules/@types/repl/package.json","./node_modules/@types/stream/consumers/package.json","./node_modules/@types/stream/iter/package.json","./node_modules/@types/stream/package.json","./node_modules/@types/stream/promises/package.json","./node_modules/@types/stream/web/package.json","./node_modules/@types/string_decoder/package.json","./node_modules/@types/timers/package.json","./node_modules/@types/timers/promises/package.json","./node_modules/@types/tls/package.json","./node_modules/@types/trace_events/package.json","./node_modules/@types/tty/package.json","./node_modules/@types/url/package.json","./node_modules/@types/util/package.json","./node_modules/@types/util/types/package.json","./node_modules/@types/v8/package.json","./node_modules/@types/vm/package.json","./node_modules/@types/wasi/package.json","./node_modules/@types/worker_threads/package.json","./node_modules/@types/zlib/package.json","./node_modules/abort-controller/dist/package.json","./node_modules/assert/package.json","./node_modules/assert/strict/package.json","./node_modules/async_hooks/package.json","./node_modules/buffer/package.json","./node_modules/child_process/package.json","./node_modules/cluster/package.json","./node_modules/connect/package.json","./node_modules/console/package.json","./node_modules/constants/package.json","./node_modules/crypto/package.json","./node_modules/dgram/package.json","./node_modules/diagnostics_channel/package.json","./node_modules/dns/package.json","./node_modules/dns/promises/package.json","./node_modules/domain/package.json","./node_modules/events/package.json","./node_modules/express-serve-static-core/package.json","./node_modules/firebase-admin/app-check/package.json","./node_modules/firebase-admin/app/package.json","./node_modules/firebase-admin/auth/package.json","./node_modules/firebase-admin/database/package.json","./node_modules/firebase-admin/eventarc/package.json","./node_modules/firebase-admin/firestore/package.json","./node_modules/firebase-admin/lib/app-check/package.json","./node_modules/firebase-admin/lib/app/package.json","./node_modules/firebase-admin/lib/auth/package.json","./node_modules/firebase-admin/lib/credential/package.json","./node_modules/firebase-admin/lib/database/package.json","./node_modules/firebase-admin/lib/eventarc/package.json","./node_modules/firebase-admin/lib/firestore/package.json","./node_modules/firebase-admin/lib/installations/package.json","./node_modules/firebase-admin/lib/instance-id/package.json","./node_modules/firebase-admin/lib/machine-learning/package.json","./node_modules/firebase-admin/lib/messaging/package.json","./node_modules/firebase-admin/lib/package.json","./node_modules/firebase-admin/lib/project-management/package.json","./node_modules/firebase-admin/lib/remote-config/package.json","./node_modules/firebase-admin/lib/security-rules/package.json","./node_modules/firebase-admin/lib/storage/package.json","./node_modules/firebase-admin/lib/utils/package.json","./node_modules/firebase-admin/node_modules/@firebase/database-types/package.json","./node_modules/firebase-admin/node_modules/@google-cloud/firestore/package.json","./node_modules/firebase-admin/node_modules/@google-cloud/storage/package.json","./node_modules/firebase-admin/node_modules/http/package.json","./node_modules/firebase-functions/lib/common/package.json","./node_modules/firebase-functions/lib/common/providers/package.json","./node_modules/firebase-functions/lib/logger/package.json","./node_modules/firebase-functions/lib/package.json","./node_modules/firebase-functions/lib/params/package.json","./node_modules/firebase-functions/lib/runtime/package.json","./node_modules/firebase-functions/lib/v1/package.json","./node_modules/firebase-functions/lib/v1/providers/package.json","./node_modules/firebase-functions/lib/v2/package.json","./node_modules/firebase-functions/lib/v2/providers/alerts/package.json","./node_modules/firebase-functions/lib/v2/providers/dataconnect/package.json","./node_modules/firebase-functions/lib/v2/providers/package.json","./node_modules/firebase-functions/params/package.json","./node_modules/firebase-functions/v1/package.json","./node_modules/firebase-functions/v2/package.json","./node_modules/firebase-functions/v2/pubsub/package.json","./node_modules/form-data/node_modules/http/package.json","./node_modules/form-data/node_modules/stream/package.json","./node_modules/fs/package.json","./node_modules/fs/promises/package.json","./node_modules/gaxios/build/package.json","./node_modules/gaxios/build/src/package.json","./node_modules/gcp-metadata/build/package.json","./node_modules/gcp-metadata/build/src/package.json","./node_modules/google-auth-library/build/package.json","./node_modules/google-auth-library/build/src/auth/googleauth/package.json","./node_modules/google-auth-library/build/src/auth/package.json","./node_modules/google-auth-library/build/src/crypto/package.json","./node_modules/google-auth-library/build/src/package.json","./node_modules/google-gax/build/package.json","./node_modules/google-gax/build/protos/package.json","./node_modules/google-gax/build/src/bundlingCalls/package.json","./node_modules/google-gax/build/src/longRunningCalls/package.json","./node_modules/google-gax/build/src/normalCalls/package.json","./node_modules/google-gax/build/src/package.json","./node_modules/google-gax/build/src/paginationCalls/package.json","./node_modules/google-gax/build/src/streamingCalls/package.json","./node_modules/graphql/package.json","./node_modules/gtoken/build/package.json","./node_modules/gtoken/build/src/package.json","./node_modules/http/package.json","./node_modules/http2/package.json","./node_modules/https/package.json","./node_modules/inspector/package.json","./node_modules/inspector/promises/package.json","./node_modules/lodash/package.json","./node_modules/module/package.json","./node_modules/net/package.json","./node_modules/os/package.json","./node_modules/path/package.json","./node_modules/path/posix/package.json","./node_modules/path/win32/package.json","./node_modules/perf_hooks/package.json","./node_modules/process/package.json","./node_modules/proto3-json-serializer/build/package.json","./node_modules/proto3-json-serializer/build/src/package.json","./node_modules/protobufjs/ext/descriptor/package.json","./node_modules/protobufjs/ext/package.json","./node_modules/protobufjs/minimal/package.json","./node_modules/punycode/package.json","./node_modules/querystring/package.json","./node_modules/readline/package.json","./node_modules/readline/promises/package.json","./node_modules/repl/package.json","./node_modules/stream/consumers/package.json","./node_modules/stream/iter/package.json","./node_modules/stream/package.json","./node_modules/stream/promises/package.json","./node_modules/stream/web/package.json","./node_modules/teeny-request/build/package.json","./node_modules/teeny-request/build/src/package.json","./node_modules/teeny-request/node_modules/http/package.json","./node_modules/teeny-request/node_modules/https/package.json","./node_modules/teeny-request/node_modules/stream/package.json","./node_modules/timers/package.json","./node_modules/timers/promises/package.json","./node_modules/tls/package.json","./node_modules/trace_events/package.json","./node_modules/tty/package.json","./node_modules/url/package.json","./node_modules/util/package.json","./node_modules/util/types/package.json","./node_modules/v8/package.json","./node_modules/vm/package.json","./node_modules/wasi/package.json","./node_modules/worker_threads/package.json","./node_modules/zlib/package.json"]}
|
|
1
|
+
{"root":["./src/config.ts","./src/events.ts","./src/export-config.ts","./src/handlers.ts","./src/helpers.ts","./src/identity-shim.d.ts","./src/index.ts","./src/lib.ts","./src/logs.ts","./src/recursiveDelete.ts","./src/runBatchPubSubDeletions.ts","./src/runCustomSearchFunction.ts","./src/search.ts"],"version":"5.9.3"}
|