Skip to content

Commit 379eb90

Browse files
committed
feat: update cloud functions
1 parent fdd6aa7 commit 379eb90

File tree

23 files changed

+3409
-659
lines changed

23 files changed

+3409
-659
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,7 @@ dynamic_links/lib/firebase_options.dart
5757

5858
# ignore .firebaserc for all examples
5959
**/.firebaserc
60+
61+
**/GoogleService-Info.plist
62+
**/google-services.json
63+
**/firebase_app_id_file.json

cloud_functions/.firebaserc

Lines changed: 0 additions & 5 deletions
This file was deleted.

cloud_functions/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ You will want to call `flutterfire configure` before running this code so your p
1010

1111
In testing firebase_functions, we encourage you to try using the [emulators](https://firebase.google.com/docs/emulator-suite) before deploying to production. We have written a V1 function for your use. If you are interested in handling multiple requests concurrently and the power of [eventarc](https://cloud.google.com/eventarc/docs) + [cloudrun](https://cloud.google.com/run) function enviornments, we encourage you to look into [V2 functions](https://firebase.google.com/docs/functions/beta).
1212

13-
To start running the functions locally in this folder, run `firebase emulators:start`. This will automatically start the emulator suite to test the functions locally.
13+
To start running the functions locally in this folder, run `npm run build && firebase emulators:start`. This will automatically start the emulator suite to test the functions locally.
1414

1515
## Dart code
1616

@@ -24,4 +24,4 @@ FirebaseFunctions.instance
2424
.call();
2525
```
2626

27-
You can optionally supply a [`Map`](https://api.flutter.dev/flutter/dart-core/Map-class.html) object to the call method which will be passed as arguments to the cloud function. In this quickstart, `word` is the parameter that we are passing to the cloud function.
27+
You can optionally supply a [`Map`](https://api.flutter.dev/flutter/dart-core/Map-class.html) object to the call method which will be passed as arguments to the cloud function. In this quickstart, `word` is the parameter that we are passing to the cloud function.

cloud_functions/firebase.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
".git",
99
"firebase-debug.log",
1010
"firebase-debug.*.log"
11+
],
12+
"predeploy": [
13+
"npm --prefix \"$RESOURCE_DIR\" run lint",
14+
"npm --prefix \"$RESOURCE_DIR\" run build"
1115
]
1216
}
1317
],
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
es6: true,
5+
node: true,
6+
},
7+
extends: [
8+
"eslint:recommended",
9+
"plugin:import/errors",
10+
"plugin:import/warnings",
11+
"plugin:import/typescript",
12+
"google",
13+
"plugin:@typescript-eslint/recommended",
14+
],
15+
parser: "@typescript-eslint/parser",
16+
parserOptions: {
17+
project: ["tsconfig.json", "tsconfig.dev.json"],
18+
sourceType: "module",
19+
},
20+
ignorePatterns: [
21+
"/lib/**/*", // Ignore built files.
22+
],
23+
plugins: [
24+
"@typescript-eslint",
25+
"import",
26+
],
27+
rules: {
28+
"quotes": ["error", "double"],
29+
"import/no-unresolved": 0,
30+
"indent": ["error", 2],
31+
},
32+
};
Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
1-
*.log
2-
node_modules
1+
# Compiled JavaScript files
2+
lib/**/*.js
3+
lib/**/*.js.map
4+
5+
# TypeScript v1 declaration files
6+
typings/
7+
8+
# Node.js dependency directory
9+
node_modules/
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"tabWidth": 2
3+
}

cloud_functions/functions/index.js

Lines changed: 0 additions & 110 deletions
This file was deleted.

0 commit comments

Comments
 (0)