diff --git a/.github/workflows/ci-report-coverage.yml b/.github/workflows/ci-report-coverage.yml index bcfef7e..a38ac3a 100644 --- a/.github/workflows/ci-report-coverage.yml +++ b/.github/workflows/ci-report-coverage.yml @@ -14,7 +14,17 @@ on: workflow_dispatch: jobs: + check-token: + runs-on: ubuntu-latest + outputs: + has-token: ${{ steps.check.outputs.has-token }} + steps: + - id: check + run: echo "has-token=${{ secrets.COVERALLS_REPO_TOKEN != '' }}" >> "$GITHUB_OUTPUT" + test-report-coverage: + needs: check-token + if: github.event.pull_request.draft != true && needs.check-token.outputs.has-token == 'true' runs-on: ubuntu-latest steps: diff --git a/README.md b/README.md index 1c21a32..ad55107 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Zajno's Toolbox -[![Coverage Status](https://coveralls.io/repos/github/Zajno/common-utils/badge.svg)](https://coveralls.io/github/Zajno/common-utils) -[![CI](https://github.com/Zajno/common-utils/actions/workflows/ci-report-coverage.yml/badge.svg)](https://github.com/Zajno/common-utils/actions/workflows/ci-report-coverage.yml) +[![Coverage Status](https://coveralls.io/repos/github/idudinov/common-utils/badge.svg)](https://coveralls.io/github/idudinov/common-utils) +[![CI](https://github.com/idudinov/common-utils/actions/workflows/ci-report-coverage.yml/badge.svg)](https://github.com/idudinov/common-utils/actions/workflows/ci-report-coverage.yml) A monorepo for Zajno's internal tools and utilities. diff --git a/packages/common-firebase/README.md b/packages/common-firebase/README.md index 3babb4c..87051d6 100644 --- a/packages/common-firebase/README.md +++ b/packages/common-firebase/README.md @@ -1,6 +1,6 @@ # Zajno's Toolbox for Firebase projects -Moved from [Zajno/common-firebase](https://github.com/Zajno/common-firebase). +Moved from [Zajno/common-firebase](https://github.com/Zajno/common-firebase). Now maintained at [idudinov/common-utils](https://github.com/idudinov/common-utils). Extension for [`@zajno/common`](../common), which adds more tools for development projects based on [Firebase](https://firebase.google.com/). diff --git a/packages/common-firebase/package.json b/packages/common-firebase/package.json index 33b92d2..a80091f 100644 --- a/packages/common-firebase/package.json +++ b/packages/common-firebase/package.json @@ -6,14 +6,14 @@ "type": "module", "repository": { "type": "git", - "url": "git+https://github.com/Zajno/common-utils.git" + "url": "git+https://github.com/idudinov/common-utils.git" }, "author": "Zajno (https://zajno.com)", "license": "MIT", "bugs": { - "url": "https://github.com/Zajno/common-utils/issues" + "url": "https://github.com/idudinov/common-utils/issues" }, - "homepage": "https://github.com/Zajno/common-utils/tree/main/packages/common-firebase#readme", + "homepage": "https://github.com/idudinov/common-utils/tree/main/packages/common-firebase#readme", "scripts": { "clean": "scripty", "dev": "scripty", diff --git a/packages/common-firebase/src/server/functions/loader.ts b/packages/common-firebase/src/server/functions/loader.ts index b1020c9..85fc076 100644 --- a/packages/common-firebase/src/server/functions/loader.ts +++ b/packages/common-firebase/src/server/functions/loader.ts @@ -53,7 +53,7 @@ export function wrapLoaderFunction, TArgs extends any[]>(w const lazyPromise = new LazyPromise(workerLoader); return (async (...args: TArgs) => { const handler = await lazyPromise.promise; - return handler(...args); + return handler?.(...args); }) as TFn; } diff --git a/packages/common-firebase/src/server/pubsub/index.ts b/packages/common-firebase/src/server/pubsub/index.ts index 5761fe7..aed30aa 100644 --- a/packages/common-firebase/src/server/pubsub/index.ts +++ b/packages/common-firebase/src/server/pubsub/index.ts @@ -95,10 +95,10 @@ export namespace PubSub { } const pubsub = await this._instanceLoader.promise; - const topic = pubsub.topic(name); + const topic = pubsub?.topic(name); try { - await topic.publishMessage({ json: data }); + await topic?.publishMessage({ json: data }); } catch (e) { logger.value?.error('Failed to publish error ', e); } diff --git a/packages/common-mobx/README.md b/packages/common-mobx/README.md index 133bd02..686091f 100644 --- a/packages/common-mobx/README.md +++ b/packages/common-mobx/README.md @@ -1,6 +1,6 @@ # Zajno's Toolbox – MobX -Moved from [Zajno/common-mobx](https://github.com/Zajno/common-mobx). +Moved from [Zajno/common-mobx](https://github.com/Zajno/common-mobx). Now maintained at [idudinov/common-utils](https://github.com/idudinov/common-utils). This library is an extension for [`@zajno/common`](../common), which adds more tools but based on [MobX](https://mobx.js.org/) library. diff --git a/packages/common-mobx/package.json b/packages/common-mobx/package.json index 3ea7a0f..7ecd69e 100644 --- a/packages/common-mobx/package.json +++ b/packages/common-mobx/package.json @@ -6,14 +6,14 @@ "type": "module", "repository": { "type": "git", - "url": "git+https://github.com/Zajno/common-utils.git" + "url": "git+https://github.com/idudinov/common-utils.git" }, "author": "Zajno (https://zajno.com)", "license": "MIT", "bugs": { - "url": "https://github.com/Zajno/common-utils/issues" + "url": "https://github.com/idudinov/common-utils/issues" }, - "homepage": "https://github.com/Zajno/common-utils/tree/main/packages/common-mobx#readme", + "homepage": "https://github.com/idudinov/common-utils/tree/main/packages/common-mobx#readme", "scripts": { "clean": "scripty", "dev": "scripty", diff --git a/packages/common-web/README.md b/packages/common-web/README.md index 32fac29..cf1e5e3 100644 --- a/packages/common-web/README.md +++ b/packages/common-web/README.md @@ -1,6 +1,6 @@ # Zajno's Toolbox – Web -Moved from [Zajno/common-web](https://github.com/Zajno/common-web). +Moved from [Zajno/common-web](https://github.com/Zajno/common-web). Now maintained at [idudinov/common-utils](https://github.com/idudinov/common-utils). This library is an extension for [`@zajno/common`](../common), which adds more tools for Web development (mostly based on browser features). diff --git a/packages/common-web/package.json b/packages/common-web/package.json index 0a2c4a8..3cd2bf4 100644 --- a/packages/common-web/package.json +++ b/packages/common-web/package.json @@ -6,14 +6,14 @@ "type": "module", "repository": { "type": "git", - "url": "git+https://github.com/Zajno/common-utils.git" + "url": "git+https://github.com/idudinov/common-utils.git" }, "author": "Zajno (https://zajno.com)", "license": "MIT", "bugs": { - "url": "https://github.com/Zajno/common-utils/issues" + "url": "https://github.com/idudinov/common-utils/issues" }, - "homepage": "https://github.com/Zajno/common-utils/tree/main/packages/common-web#readme", + "homepage": "https://github.com/idudinov/common-utils/tree/main/packages/common-web#readme", "scripts": { "clean": "scripty", "dev": "scripty", diff --git a/packages/common/README.md b/packages/common/README.md index a8c3326..7a0fd45 100644 --- a/packages/common/README.md +++ b/packages/common/README.md @@ -1,6 +1,6 @@ # Zajno's Toolbox -[![Coverage Status](https://coveralls.io/repos/github/Zajno/common-utils/badge.svg?branch=main)](https://coveralls.io/github/Zajno/common-utils?branch=main) +[![Coverage Status](https://coveralls.io/repos/github/idudinov/common-utils/badge.svg?branch=main)](https://coveralls.io/github/idudinov/common-utils?branch=main) This is a library with a useful utils/helpers to share across our projects. diff --git a/packages/common/package.json b/packages/common/package.json index 2d5c530..f4fa2e6 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -6,14 +6,14 @@ "type": "module", "repository": { "type": "git", - "url": "git+https://github.com/Zajno/common-utils.git" + "url": "git+https://github.com/idudinov/common-utils.git" }, "author": "Zajno (https://zajno.com)", "license": "MIT", "bugs": { - "url": "https://github.com/Zajno/common-utils/issues" + "url": "https://github.com/idudinov/common-utils/issues" }, - "homepage": "https://github.com/Zajno/common-utils/tree/main/packages/common#readme", + "homepage": "https://github.com/idudinov/common-utils/tree/main/packages/common#readme", "scripts": { "clean": "scripty", "dev": "scripty", diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 6943554..4973fc4 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -5,14 +5,14 @@ "private": false, "repository": { "type": "git", - "url": "git+https://github.com/Zajno/common-utils.git" + "url": "git+https://github.com/idudinov/common-utils.git" }, "author": "Zajno (https://zajno.com)", "license": "MIT", "bugs": { - "url": "https://github.com/Zajno/common-utils/issues" + "url": "https://github.com/idudinov/common-utils/issues" }, - "homepage": "https://github.com/Zajno/common-utils/tree/main/packages/eslint-config#readme", + "homepage": "https://github.com/idudinov/common-utils/tree/main/packages/eslint-config#readme", "keywords": [ "zajno", "eslint",