Skip to content

Commit

Permalink
Merge pull request #22 from Nhogs/develop
Browse files Browse the repository at this point in the history
update actions
  • Loading branch information
Popotojs authored May 24, 2022
2 parents 500c377 + 3eaf656 commit fba5377
Show file tree
Hide file tree
Showing 6 changed files with 4,533 additions and 3,257 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ jobs:
continue-on-error: true
- name: Run all the tests
run: firebase emulators:exec --project demo-nhogs-nestjs-firebase --import=e2e/import 'npm test'
- name: Send coverage report
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
- name: publish code coverage on CC
uses: paambaati/[email protected]
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ jobs:
- run: npm run build
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_AUTOMATION}}
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<p align="center">
<a href="https://github.com/Nhogs"><img alt="nhogs logo" width="96" src="https://nhogs.com/nhogs_192.png"></a>
</p>
<a href="https://nhogs.com"><img src="https://nhogs.com/nhogs_64.png" align="right" alt="nhogs-logo" title="NHOGS Interactive"></a>

# @nhogs/nestjs-firebase

Expand All @@ -26,10 +24,11 @@ $ npm i --save @nhogs/nestjs-firebase
First you need to have a running firebase project.
See [Add Firebase to your JavaScript project](https://firebase.google.com/docs/web/setup)

:warning: This module only uses Firebase client API
:warning: This module only uses Firebase client API

- [x] Use [Firebase client API](https://firebase.google.com/docs/web/setup)
- [ ] Use [Firebase admin SDK](https://firebase.google.com/docs/admin/setup)
- [ ] Use [Firebase admin SDK](https://firebase.google.com/docs/admin/setup)

### Module

Add the module in app imports with project settings
Expand Down
7 changes: 4 additions & 3 deletions lib/service/firestore/firestore.service.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { Inject, Injectable } from "@nestjs/common";
import { FirebaseApp } from "firebase/app";
import { FIREBASE_APP, FIREBASE_CONFIG } from "../../firebase.constants";
import { FirebaseConfig } from "../../interface";
import {
addDoc,
collection,
Expand All @@ -14,6 +16,7 @@ import {
endAt,
endBefore,
FieldPath,
FieldValue,
getDoc,
getDocs,
getFirestore,
Expand All @@ -37,8 +40,6 @@ import {
WithFieldValue,
writeBatch,
} from "firebase/firestore";
import { FIREBASE_APP, FIREBASE_CONFIG } from "../../firebase.constants";
import { FirebaseConfig } from "../../interface";

@Injectable()
export class FirestoreService {
Expand Down Expand Up @@ -194,7 +195,7 @@ export class FirestoreService {
return documentId();
}

serverTimestamp(): FieldPath {
serverTimestamp(): FieldValue {
return serverTimestamp();
}

Expand Down
Loading

0 comments on commit fba5377

Please sign in to comment.