Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"@angular/platform-browser": "^9.0.0 || ^10.0.0 || ^11.0.0",
"@angular/platform-browser-dynamic": "^9.0.0 || ^10.0.0 || ^11.0.0",
"@angular/router": "^9.0.0 || ^10.0.0 || ^11.0.0",
"cookie": "^0.4.1",
"firebase": "^7.0.0 || ^8.0.0",
"firebase-admin": "^8.10.0",
"firebase-functions": "^3.6.0",
Expand All @@ -57,6 +58,7 @@
"husky": "^4.2.5",
"inquirer": "^6.2.2",
"inquirer-autocomplete-prompt": "^1.0.1",
"js-cookie": "^2.2.1",
"open": "^7.0.3",
"rxfire": "^3.9.7 || ^4.0.0",
"rxjs": "^6.5.3",
Expand All @@ -78,10 +80,13 @@
"@angular/compiler-cli": "^9.0.0 || ^10.0.0 || ^11.0.0",
"@angular/platform-server": "^9.0.0 || ^10.0.0 || ^11.0.0",
"@firebase/app-types": "^0.6.1",
"@nguniversal/express-engine": "^11.0.0",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix version

"@types/cookie": "^0.4.0",
"@types/fs-extra": "^7.0.0",
"@types/gzip-size": "^5.1.1",
"@types/inquirer": "^0.0.44",
"@types/jasmine": "^3.3.13",
"@types/js-cookie": "^2.2.6",
"@types/node": "^12.6.2 < 12.12.42",
"@types/request": "0.0.30",
"@types/semver": "^7.1.0",
Expand Down
4 changes: 3 additions & 1 deletion sample/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,6 @@ testem.log

# System Files
.DS_Store
Thumbs.db
Thumbs.db

/service-account.json
4 changes: 3 additions & 1 deletion sample/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@
"main": "server.ts",
"tsConfig": "tsconfig.server.json",
"bundleDependencies": true,
"externalDependencies": [ ]
"externalDependencies": [
"firebase-admin"
]
},
"configurations": {
"production": {
Expand Down
3 changes: 3 additions & 0 deletions sample/firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
],
"rewrites": [
{
"source": "yada",
"function": "yada"
}, {
"source": "**",
"function": "ssr"
}
Expand Down
5 changes: 5 additions & 0 deletions sample/functions/.firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "aftest-94085"
}
}
9 changes: 9 additions & 0 deletions sample/functions/firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"functions": {
"source": ".",
"predeploy": [
"npm run lint",
"npm run build"
]
}
}
13 changes: 7 additions & 6 deletions sample/functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@
"main": "lib/index.js",
"dependencies": {
"firebase-admin": "^9.2.0",
"firebase-functions": "^3.11.0",
"ssr-functions": "file:../dist/sample"
"firebase-functions": "^3.11.0"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^3.9.1",
"@typescript-eslint/parser": "^3.8.0",
"@types/express": "^4.17.9",
"@types/express-serve-static-core": "^4.17.14",
"@typescript-eslint/eslint-plugin": "^4.8.2",
"@typescript-eslint/parser": "^4.8.2",
"eslint": "^7.6.0",
"eslint-plugin-import": "^2.22.0",
"typescript": "^3.8.0",
"firebase-functions-test": "^0.2.0"
"firebase-functions-test": "^0.2.0",
"typescript": "^4.1.2"
},
"private": true
}
12 changes: 2 additions & 10 deletions sample/functions/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
import * as functions from 'firebase-functions';

// // Start writing Firebase Functions
// // https://firebase.google.com/docs/functions/typescript
//
// export const helloWorld = functions.https.onRequest((request, response) => {
// functions.logger.info("Hello logs!", {structuredData: true});
// response.send("Hello from Firebase!");
// });

// @ts-ignore
export const ssr = require('ssr-functions').ssr;
// Increase readability in Cloud Logging
import 'firebase-functions/lib/logger/compat';

export const yada = functions.https.onCall(() => {
return { time: new Date().getTime() };
Expand Down
Loading