firebase-functions 4.2.0 → 4.3.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 (47) hide show
  1. package/lib/common/change.js +4 -4
  2. package/lib/common/encoding.d.ts +3 -2
  3. package/lib/common/encoding.js +4 -0
  4. package/lib/common/params.d.ts +4 -4
  5. package/lib/common/providers/database.js +1 -6
  6. package/lib/common/providers/firestore.d.ts +1 -0
  7. package/lib/common/providers/firestore.js +106 -0
  8. package/lib/common/providers/https.d.ts +3 -3
  9. package/lib/common/providers/https.js +28 -1
  10. package/lib/common/providers/identity.d.ts +3 -3
  11. package/lib/common/providers/tasks.d.ts +1 -1
  12. package/lib/common/timezone.d.ts +1 -1
  13. package/lib/common/utilities/path-pattern.js +5 -5
  14. package/lib/logger/index.d.ts +1 -1
  15. package/lib/params/index.d.ts +1 -1
  16. package/lib/params/types.d.ts +5 -5
  17. package/lib/v1/function-builder.d.ts +4 -2
  18. package/lib/v1/function-builder.js +7 -5
  19. package/lib/v1/function-configuration.d.ts +5 -5
  20. package/lib/v1/providers/auth.js +3 -3
  21. package/lib/v1/providers/firestore.d.ts +2 -2
  22. package/lib/v1/providers/firestore.js +4 -39
  23. package/lib/v1/providers/testLab.d.ts +4 -4
  24. package/lib/v2/index.d.ts +2 -1
  25. package/lib/v2/index.js +3 -1
  26. package/lib/v2/options.d.ts +8 -8
  27. package/lib/v2/providers/alerts/alerts.d.ts +3 -3
  28. package/lib/v2/providers/alerts/appDistribution.d.ts +2 -2
  29. package/lib/v2/providers/alerts/crashlytics.d.ts +2 -2
  30. package/lib/v2/providers/database.d.ts +3 -3
  31. package/lib/v2/providers/database.js +8 -2
  32. package/lib/v2/providers/eventarc.d.ts +2 -2
  33. package/lib/v2/providers/firestore.d.ts +91 -0
  34. package/lib/v2/providers/firestore.js +243 -0
  35. package/lib/v2/providers/https.d.ts +3 -3
  36. package/lib/v2/providers/identity.d.ts +2 -2
  37. package/lib/v2/providers/pubsub.d.ts +2 -2
  38. package/lib/v2/providers/remoteConfig.d.ts +2 -2
  39. package/lib/v2/providers/storage.d.ts +2 -2
  40. package/lib/v2/providers/tasks.d.ts +3 -3
  41. package/lib/v2/providers/testLab.d.ts +2 -2
  42. package/lib/v2/trace.d.ts +1 -1
  43. package/package.json +13 -6
  44. package/protos/README.md +15 -0
  45. package/protos/compiledFirestore.d.ts +1342 -0
  46. package/protos/compiledFirestore.js +3514 -0
  47. package/protos/update.sh +75 -0
@@ -0,0 +1,75 @@
1
+ #!/bin/bash
2
+
3
+ # The MIT License (MIT)
4
+ #
5
+ # Copyright (c) 2023 Firebase
6
+ #
7
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ # of this software and associated documentation files (the "Software"), to deal
9
+ # in the Software without restriction, including without limitation the rights
10
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ # copies of the Software, and to permit persons to whom the Software is
12
+ # furnished to do so, subject to the following conditions:
13
+ #
14
+ # The above copyright notice and this permission notice shall be included in all
15
+ # copies or substantial portions of the Software.
16
+ #
17
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ # SOFTWARE.
24
+
25
+ # vars
26
+ PROTOS_DIR="$(pwd)"
27
+ WORK_DIR=`mktemp -d`
28
+
29
+ # deletes the temp directory on exit
30
+ function cleanup {
31
+ rm -rf "$WORK_DIR"
32
+ echo "Deleted temp working directory $WORK_DIR"
33
+ rm -rf "${PROTOS_DIR}/data.proto" "${PROTOS_DIR}/any.proto" "${PROTOS_DIR}/google"
34
+ echo "Deleted copied protos"
35
+ }
36
+
37
+ # register the cleanup function to be called on the EXIT signal
38
+ trap cleanup EXIT
39
+
40
+ # Capture location of pbjs / pbts before we pushd.
41
+ PBJS="$(npm bin)/pbjs"
42
+ PBTS="$(npm bin)/pbts"
43
+
44
+ # enter working directory
45
+ pushd "$WORK_DIR"
46
+
47
+ git clone --depth 1 https://github.com/googleapis/google-cloudevents.git
48
+ git clone --depth 1 https://github.com/googleapis/googleapis.git
49
+ git clone --depth 1 https://github.com/google/protobuf.git
50
+
51
+ # make dirs
52
+ mkdir -p "${PROTOS_DIR}/google/type"
53
+
54
+ # copy protos
55
+ cp google-cloudevents/proto/google/events/cloud/firestore/v1/data.proto \
56
+ "${PROTOS_DIR}/"
57
+
58
+ cp protobuf/src/google/protobuf/any.proto \
59
+ "${PROTOS_DIR}/"
60
+
61
+ cp protobuf/src/google/protobuf/struct.proto \
62
+ "${PROTOS_DIR}/google/"
63
+
64
+ cp protobuf/src/google/protobuf/timestamp.proto \
65
+ "${PROTOS_DIR}/google/"
66
+
67
+ cp googleapis/google/type/latlng.proto \
68
+ "${PROTOS_DIR}/google/type/"
69
+
70
+ popd
71
+
72
+ "${PBJS}" -t static-module -w commonjs -o compiledFirestore.js \
73
+ data.proto any.proto
74
+
75
+ "${PBTS}" -o compiledFirestore.d.ts compiledFirestore.js