From e5783d6be53302d3b4097ff928acd4fc06f2b16d Mon Sep 17 00:00:00 2001 From: George Enciu Date: Sat, 8 Jul 2023 22:47:04 +0200 Subject: [PATCH] format write #7 --- .github/workflows/deploy.yml | 7 ++++-- .github/workflows/pr.yml | 4 +++- .../src/firestore/delete-collection.ts | 8 ++++--- nx.json | 6 ++++- tsconfig.base.json | 22 +++++-------------- 5 files changed, 23 insertions(+), 24 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index cfa5b58..d0b580d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,9 +2,9 @@ name: Build and deploy on: pull_request: types: - - "closed" + - 'closed' branches: - - "master" + - 'master' jobs: main: @@ -16,6 +16,9 @@ jobs: - uses: nrwl/nx-set-shas@v3 with: main-branch-name: 'master' + - uses: actions/setup-node@v3 + with: + node-version: 18 - run: npm ci - run: npx nx format:check diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 0121717..8f2fae5 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -2,7 +2,6 @@ name: Run on PR on: pull_request: - jobs: main: runs-on: ubuntu-latest @@ -13,6 +12,9 @@ jobs: - uses: nrwl/nx-set-shas@v3 with: main-branch-name: 'master' + - uses: actions/setup-node@v3 + with: + node-version: 18 - run: npm ci - run: npx nx format:check diff --git a/libs/test-helpers/src/firestore/delete-collection.ts b/libs/test-helpers/src/firestore/delete-collection.ts index f51aa7e..98747ce 100644 --- a/libs/test-helpers/src/firestore/delete-collection.ts +++ b/libs/test-helpers/src/firestore/delete-collection.ts @@ -1,7 +1,10 @@ export async function deleteCollection(collectionPath: string) { - const endpoint = process.env['FIRESTORE_EMULATOR_HOST'] as string - const project = process.env['GCLOUD_PROJECT'] as string + const endpoint = process.env['FIRESTORE_EMULATOR_HOST'] as string; + const project = process.env['GCLOUD_PROJECT'] as string; + console.log( + `http://${endpoint}/emulator/v1/projects/${project}/databases/(default)/documents/${collectionPath}` + ); const response = await fetch( `http://${endpoint}/emulator/v1/projects/${project}/databases/(default)/documents/${collectionPath}`, { @@ -12,4 +15,3 @@ export async function deleteCollection(collectionPath: string) { throw new Error('Trouble clearing Emulator: ' + (await response.text())); } } - diff --git a/nx.json b/nx.json index f85708b..c2cb096 100644 --- a/nx.json +++ b/nx.json @@ -21,7 +21,11 @@ "inputs": ["default", "^production"] }, "lint": { - "inputs": ["default", "{workspaceRoot}/.eslintrc.json", "{workspaceRoot}/.eslintignore"] + "inputs": [ + "default", + "{workspaceRoot}/.eslintrc.json", + "{workspaceRoot}/.eslintignore" + ] } }, "namedInputs": { diff --git a/tsconfig.base.json b/tsconfig.base.json index 5957936..1deb724 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -10,30 +10,18 @@ "importHelpers": true, "target": "es2015", "module": "esnext", - "lib": [ - "es2020", - "dom" - ], + "lib": ["es2020", "dom"], "skipLibCheck": true, "skipDefaultLibCheck": true, "baseUrl": ".", "paths": { - "@rovacc/clients": [ - "libs/clients/src/index.ts" - ], - "@rovacc/test-helpers": [ - "libs/test-helpers/src/index.ts" - ], - "@rovacc/training-events": [ - "libs/training-events/src/index.ts" - ], + "@rovacc/clients": ["libs/clients/src/index.ts"], + "@rovacc/test-helpers": ["libs/test-helpers/src/index.ts"], + "@rovacc/training-events": ["libs/training-events/src/index.ts"], "@rovacc/training-events-types": [ "libs/training-events-types/src/index.ts" ] } }, - "exclude": [ - "node_modules", - "tmp" - ] + "exclude": ["node_modules", "tmp"] }