Skip to content

Commit a5b2da8

Browse files
authored
Merge branch 'main' into db-event-rename
2 parents b29f99c + 62454dd commit a5b2da8

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

example/functions/main.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,33 +17,33 @@
1717
reference="hello",
1818
region=options.SupportedRegion.EUROPE_WEST1,
1919
)
20-
def on_write_example(event: db.Event[db.Change[object]]) -> None:
20+
def onwriteexample(event: db.Event[db.Change[object]]) -> None:
2121
print("Hello from db write event:", event)
2222

2323

2424
@db.on_value_created(reference="hello/{any_thing_here}/bar")
25-
def on_created_example(event: db.Event[object]) -> None:
25+
def oncreatedexample(event: db.Event[object]) -> None:
2626
print("Hello from db create event:", event)
2727

2828

2929
@db.on_value_deleted(reference="hello/{any_thing_here}/bar")
30-
def on_deleted_example(event: db.Event[object]) -> None:
30+
def ondeletedexample(event: db.Event[object]) -> None:
3131
print("Hello from db delete event:", event)
3232

3333

3434
@db.on_value_updated(reference="hello")
35-
def on_updated_example(event: db.Event[db.Change[object]]) -> None:
35+
def onupdatedexample(event: db.Event[db.Change[object]]) -> None:
3636
print("Hello from db updated event:", event)
3737

3838

3939
@https.on_request()
40-
def on_request_example(req: https.Request) -> https.Response:
40+
def onrequestexample(req: https.Request) -> https.Response:
4141
print("on request function data:", req.data)
4242
return https.Response("Hello from https on request function example")
4343

4444

4545
@https.on_call()
46-
def on_call_example(req: https.CallableRequest):
46+
def oncallexample(req: https.CallableRequest):
4747
print("on call function data:", req)
4848
if req.data == "error_test":
4949
raise https.HttpsError(
@@ -56,6 +56,6 @@ def on_call_example(req: https.CallableRequest):
5656

5757
@pubsub.on_message_published(
5858
topic="hello",)
59-
def on_message_published_example(
59+
def onmessagepublishedexample(
6060
event: pubsub.CloudEvent[pubsub.MessagePublishedData]) -> None:
6161
print("Hello from pubsub event:", event)

samples/basic_storage/functions/main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,31 @@
1010

1111

1212
@storage.on_object_finalized()
13-
def on_object_finalized_example(event: CloudEvent[StorageObjectData]):
13+
def onobjectfinalizedexample(event: CloudEvent[StorageObjectData]):
1414
"""
1515
This function will be triggered when a new object is created in the bucket.
1616
"""
1717
print(event)
1818

1919

2020
@storage.on_object_archived()
21-
def on_object_archived_example(event: CloudEvent[StorageObjectData]):
21+
def onobjectarchivedexample(event: CloudEvent[StorageObjectData]):
2222
"""
2323
This function will be triggered when an object is archived in the bucket.
2424
"""
2525
print(event)
2626

2727

2828
@storage.on_object_deleted()
29-
def on_object_deleted_example(event: CloudEvent[StorageObjectData]):
29+
def onobjectdeletedexample(event: CloudEvent[StorageObjectData]):
3030
"""
3131
This function will be triggered when an object is deleted in the bucket.
3232
"""
3333
print(event)
3434

3535

3636
@storage.on_object_metadata_updated()
37-
def on_object_metadata_updated_example(event: CloudEvent[StorageObjectData]):
37+
def onobjectmetadataupdatedexample(event: CloudEvent[StorageObjectData]):
3838
"""
3939
This function will be triggered when an object's metadata is updated in the bucket.
4040
"""

src/firebase_functions/private/serving.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ def functions_as_yaml(functions: dict) -> str:
6969
endpoints: dict[str, _manifest.ManifestEndpoint] = {}
7070
for name, function in functions.items():
7171
endpoint = function.__firebase_endpoint__
72-
# v2 function name(s) can only contain lower case letters, numbers, hyphens
73-
endpoints[name.replace("_", "-").lower()] = endpoint
72+
endpoints[name] = endpoint
7473
manifest_stack = _manifest.ManifestStack(endpoints=endpoints,
7574
params=list(
7675
_params._params.values()))

0 commit comments

Comments
 (0)