Skip to content

Commit

Permalink
fix: format code to external libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
temarusanov committed Jul 7, 2023
1 parent cb94b03 commit 450245a
Show file tree
Hide file tree
Showing 19 changed files with 2,033 additions and 19,332 deletions.
6 changes: 2 additions & 4 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"extends": [
"@commitlint/config-conventional"
],
"extends": ["@commitlint/config-conventional"],
"rules": {}
}
}
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ Checkout documentation: https://temarusanov.github.io/dev-notes/workspace/gettin
- [ ] GraphQL format error
- [x] Disable any rule in eslint


## Installing

### Install Ansible
Expand Down
4 changes: 2 additions & 2 deletions apps/api/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import {
} from '@nestjs/apollo'
import { Module } from '@nestjs/common'
import { GraphQLModule } from '@nestjs/graphql'
import { HealthChecksModule } from '@tematools/health-checks'
import { NatsModule } from '@tematools/nats'
import { EventloopFrozenDetectorModule } from 'core-eventloop-frozen-detector'
import { HealthChecksModule } from 'core-health-checks'
import { NatsModule } from 'core/nats'
import * as env from 'env-var'
import { SampleModule } from 'sample'

Expand Down
9 changes: 4 additions & 5 deletions libs/core/health-checks/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ This file was generated using [@jscutlery/semver](https://github.com/jscutlery/s

# 0.1.0 (2023-07-07)


### Features

* add details field to healthcheck ([701b0bb](https://github.com/temarusanov/nx/commit/701b0bb79e5a7255f3f5b3727b777fd12dd25e9a))
* add healthy boolean field to indicators ([d980277](https://github.com/temarusanov/nx/commit/d980277f32e1f935a1b617f1d50525de17d32867))
* **health:** refactor lib ([d5c0654](https://github.com/temarusanov/nx/commit/d5c065413c233e84f7f3230c4e7a8c7ae78fee25))
* **libs:** add healthcheck ([5c46bca](https://github.com/temarusanov/nx/commit/5c46bca7dbdf76624d822bb21d04041830b438cf))
- add details field to healthcheck ([701b0bb](https://github.com/temarusanov/nx/commit/701b0bb79e5a7255f3f5b3727b777fd12dd25e9a))
- add healthy boolean field to indicators ([d980277](https://github.com/temarusanov/nx/commit/d980277f32e1f935a1b617f1d50525de17d32867))
- **health:** refactor lib ([d5c0654](https://github.com/temarusanov/nx/commit/d5c065413c233e84f7f3230c4e7a8c7ae78fee25))
- **libs:** add healthcheck ([5c46bca](https://github.com/temarusanov/nx/commit/5c46bca7dbdf76624d822bb21d04041830b438cf))
3 changes: 1 addition & 2 deletions libs/core/health-checks/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"name": "@tematools/health-checks",
"version": "0.1.0"
"name": "@tematools/health-checks"
}
13 changes: 4 additions & 9 deletions libs/core/health-checks/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,20 @@
"projectType": "library",
"targets": {
"build": {
"clean": true,
"executor": "@nx/js:tsc",
"outputs": [
"{options.outputPath}"
],
"outputs": ["{options.outputPath}"],
"options": {
"buildableProjectDepsInPackageJsonType": "dependencies",
"outputPath": "dist/libs/core/health-checks",
"main": "libs/core/health-checks/src/index.ts",
"tsConfig": "libs/core/health-checks/tsconfig.lib.json",
"assets": [
"libs/core/health-checks/*.md"
]
"assets": ["libs/core/health-checks/*.md"]
}
},
"publish": {
"command": "node tools/scripts/publish.mjs health-checks {args.ver} {args.tag}",
"dependsOn": [
"build"
]
"dependsOn": ["build"]
},
"version": {
"executor": "@jscutlery/semver:version"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { Injectable } from '@nestjs/common'
import { HealthIndicator, HealthIndicatorResult } from 'core-health-checks'
import {
HealthIndicator,
HealthIndicatorResult,
} from '@tematools/health-checks'

import { SamplePrismaService } from '../sample-services/sample-prisma.service'

Expand Down
8 changes: 8 additions & 0 deletions libs/sample/src/lib/sample-nats/sample-nats.controller.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
import { Controller, Logger } from '@nestjs/common'
import {
Consume,
ConsumePayload,
ConsumerAcks,
Reply,
ReplyPayload,
ReplyResponse,
} from '@tematools/nats'
import { AckPolicy } from 'nats'

import {
Expand Down
2 changes: 1 addition & 1 deletion libs/sample/src/lib/sample-nats/sample-nats.stream.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Injectable, OnModuleInit } from '@nestjs/common'
import { NatsJetStreamClientService, PublishOptions } from 'libs/src'
import { NatsJetStreamClientService, PublishOptions } from '@tematools/nats'
import { PubAck, RetentionPolicy, StorageType } from 'nats'

export enum SampleNatsJetStreamSubjectsEnum {
Expand Down
2 changes: 1 addition & 1 deletion libs/sample/src/lib/sample.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DynamicModule, Module, Provider, Type } from '@nestjs/common'
import { HEALTH_CHECKS_PROVIDER } from 'core-health-checks'
import { HEALTH_CHECKS_PROVIDER } from '@tematools/health-checks'
import { CustomInjectorModule } from 'nestjs-custom-injector'

import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
Reply,
ReplyPayload,
ReplyResponse,
} from 'core/nats'
} from '@tematools/nats'

export enum <%= className %>NatsRoutesEnum {
PING = '<%= fileName %>.ping',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Injectable, OnModuleInit } from '@nestjs/common'
import { NatsJetStreamClientService, PublishOptions } from 'core/nats'
import { NatsJetStreamClientService, PublishOptions } from '@tematools/nats'
import { PubAck, RetentionPolicy, StorageType } from 'nats'

export enum <%= className %>NatsJetStreamSubjectsEnum {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
patch<%= className %>Config,
} from './<%= fileName %>-configs/<%= fileName %>-module.config'
import { <%= className %>Resolver } from './<%= fileName %>-graphql/<%= fileName %>.resolver'
import { HEALTH_CHECKS_PROVIDER } from 'core-health-checks'
import { HEALTH_CHECKS_PROVIDER } from '@tematools/health-checks'
import { <%= className %>PrismaConnectionHealthIndicator } from './<%= fileName %>-indicators/<%= fileName %>-prisma-connection.health'
import { <%= className %>PrismaService } from './<%= fileName %>-services/<%= fileName %>-prisma.service'
import { <%= className %>NatsController } from './<%= fileName %>-nats/<%= fileName %>-nats.controller'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Injectable } from '@nestjs/common'
import { HealthIndicator, HealthIndicatorResult } from 'core-health-checks'
import { HealthIndicator, HealthIndicatorResult } from '@tematools/health-checks'
import { <%= className %>PrismaService } from '../<%= fileName %>-services/<%= fileName %>-prisma.service'

@Injectable()
Expand Down
31 changes: 7 additions & 24 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,21 @@
},
"targetDefaults": {
"build": {
"dependsOn": [
"^build"
],
"inputs": [
"production",
"^production"
]
"dependsOn": ["^build"],
"inputs": ["production", "^production"]
},
"test": {
"inputs": [
"default",
"^production",
"{workspaceRoot}/jest.preset.js"
]
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"]
},
"lint": {
"inputs": [
"default",
"{workspaceRoot}/.eslintrc.json"
]
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"]
},
"prisma:generate": {
"inputs": [
"{projectRoot}/**/schema.prisma"
]
"inputs": ["{projectRoot}/**/schema.prisma"]
}
},
"namedInputs": {
"default": [
"{projectRoot}/**/*",
"sharedGlobals"
],
"default": ["{projectRoot}/**/*", "sharedGlobals"],
"production": [
"default",
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
Expand All @@ -66,4 +49,4 @@
"analyzeSourceFiles": true
}
}
}
}
Loading

0 comments on commit 450245a

Please sign in to comment.