mirror of
https://github.com/standardnotes/server
synced 2026-05-13 09:57:18 -04:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2707e87554 | |||
| 4b40c59e7e | |||
| f2e8579f95 | |||
| 57118c85e3 | |||
| 8ddc7b0a58 | |||
| bc63d0aeea | |||
| 9def26e809 | |||
| 74ac709bb5 | |||
| 1f749fad49 | |||
| 13c85d4331 |
@@ -4751,6 +4751,7 @@ const RAW_RUNTIME_STATE =
|
|||||||
["@types/jest", "npm:29.5.1"],\
|
["@types/jest", "npm:29.5.1"],\
|
||||||
["@types/jsonwebtoken", "npm:9.0.2"],\
|
["@types/jsonwebtoken", "npm:9.0.2"],\
|
||||||
["@types/newrelic", "npm:9.13.0"],\
|
["@types/newrelic", "npm:9.13.0"],\
|
||||||
|
["@types/node", "npm:20.2.5"],\
|
||||||
["@types/prettyjson", "npm:0.0.30"],\
|
["@types/prettyjson", "npm:0.0.30"],\
|
||||||
["@typescript-eslint/eslint-plugin", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:5.59.2"],\
|
["@typescript-eslint/eslint-plugin", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:5.59.2"],\
|
||||||
["@typescript-eslint/parser", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:5.59.2"],\
|
["@typescript-eslint/parser", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:5.59.2"],\
|
||||||
@@ -4811,6 +4812,7 @@ const RAW_RUNTIME_STATE =
|
|||||||
["@types/ioredis", "npm:5.0.0"],\
|
["@types/ioredis", "npm:5.0.0"],\
|
||||||
["@types/jest", "npm:29.5.1"],\
|
["@types/jest", "npm:29.5.1"],\
|
||||||
["@types/newrelic", "npm:9.13.0"],\
|
["@types/newrelic", "npm:9.13.0"],\
|
||||||
|
["@types/node", "npm:20.2.5"],\
|
||||||
["@types/otplib", "npm:10.0.0"],\
|
["@types/otplib", "npm:10.0.0"],\
|
||||||
["@types/prettyjson", "npm:0.0.30"],\
|
["@types/prettyjson", "npm:0.0.30"],\
|
||||||
["@types/ua-parser-js", "npm:0.7.36"],\
|
["@types/ua-parser-js", "npm:0.7.36"],\
|
||||||
@@ -4874,6 +4876,7 @@ const RAW_RUNTIME_STATE =
|
|||||||
"packageDependencies": [\
|
"packageDependencies": [\
|
||||||
["@standardnotes/domain-core", "workspace:packages/domain-core"],\
|
["@standardnotes/domain-core", "workspace:packages/domain-core"],\
|
||||||
["@types/jest", "npm:29.5.1"],\
|
["@types/jest", "npm:29.5.1"],\
|
||||||
|
["@types/node", "npm:20.2.5"],\
|
||||||
["@types/uuid", "npm:8.3.4"],\
|
["@types/uuid", "npm:8.3.4"],\
|
||||||
["@typescript-eslint/eslint-plugin", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:5.59.2"],\
|
["@typescript-eslint/eslint-plugin", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:5.59.2"],\
|
||||||
["@typescript-eslint/parser", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:5.59.2"],\
|
["@typescript-eslint/parser", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:5.59.2"],\
|
||||||
@@ -5019,6 +5022,7 @@ const RAW_RUNTIME_STATE =
|
|||||||
["@types/jest", "npm:29.5.1"],\
|
["@types/jest", "npm:29.5.1"],\
|
||||||
["@types/jsonwebtoken", "npm:9.0.2"],\
|
["@types/jsonwebtoken", "npm:9.0.2"],\
|
||||||
["@types/newrelic", "npm:9.13.0"],\
|
["@types/newrelic", "npm:9.13.0"],\
|
||||||
|
["@types/node", "npm:20.2.5"],\
|
||||||
["@types/prettyjson", "npm:0.0.30"],\
|
["@types/prettyjson", "npm:0.0.30"],\
|
||||||
["@types/uuid", "npm:8.3.4"],\
|
["@types/uuid", "npm:8.3.4"],\
|
||||||
["@typescript-eslint/eslint-plugin", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:5.59.2"],\
|
["@typescript-eslint/eslint-plugin", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:5.59.2"],\
|
||||||
@@ -5153,6 +5157,7 @@ const RAW_RUNTIME_STATE =
|
|||||||
["@types/express", "npm:4.17.17"],\
|
["@types/express", "npm:4.17.17"],\
|
||||||
["@types/jest", "npm:29.5.1"],\
|
["@types/jest", "npm:29.5.1"],\
|
||||||
["@types/newrelic", "npm:9.13.0"],\
|
["@types/newrelic", "npm:9.13.0"],\
|
||||||
|
["@types/node", "npm:20.2.5"],\
|
||||||
["@typescript-eslint/eslint-plugin", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:5.59.2"],\
|
["@typescript-eslint/eslint-plugin", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:5.59.2"],\
|
||||||
["@typescript-eslint/parser", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:5.59.2"],\
|
["@typescript-eslint/parser", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:5.59.2"],\
|
||||||
["cors", "npm:2.8.5"],\
|
["cors", "npm:2.8.5"],\
|
||||||
@@ -5338,6 +5343,7 @@ const RAW_RUNTIME_STATE =
|
|||||||
["@types/jest", "npm:29.5.1"],\
|
["@types/jest", "npm:29.5.1"],\
|
||||||
["@types/jsonwebtoken", "npm:9.0.2"],\
|
["@types/jsonwebtoken", "npm:9.0.2"],\
|
||||||
["@types/newrelic", "npm:9.13.0"],\
|
["@types/newrelic", "npm:9.13.0"],\
|
||||||
|
["@types/node", "npm:20.2.5"],\
|
||||||
["@types/prettyjson", "npm:0.0.30"],\
|
["@types/prettyjson", "npm:0.0.30"],\
|
||||||
["@types/ua-parser-js", "npm:0.7.36"],\
|
["@types/ua-parser-js", "npm:0.7.36"],\
|
||||||
["@types/uuid", "npm:8.3.4"],\
|
["@types/uuid", "npm:8.3.4"],\
|
||||||
|
|||||||
@@ -3,6 +3,22 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [2.23.5](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.23.4...@standardnotes/analytics@2.23.5) (2023-06-01)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/analytics
|
||||||
|
|
||||||
|
## [2.23.4](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.23.3...@standardnotes/analytics@2.23.4) (2023-05-31)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/analytics
|
||||||
|
|
||||||
|
## [2.23.3](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.23.2...@standardnotes/analytics@2.23.3) (2023-05-31)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/analytics
|
||||||
|
|
||||||
|
## [2.23.2](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.23.1...@standardnotes/analytics@2.23.2) (2023-05-31)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/analytics
|
||||||
|
|
||||||
## [2.23.1](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.23.0...@standardnotes/analytics@2.23.1) (2023-05-30)
|
## [2.23.1](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.23.0...@standardnotes/analytics@2.23.1) (2023-05-30)
|
||||||
|
|
||||||
**Note:** Version bump only for package @standardnotes/analytics
|
**Note:** Version bump only for package @standardnotes/analytics
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@standardnotes/analytics",
|
"name": "@standardnotes/analytics",
|
||||||
"version": "2.23.1",
|
"version": "2.23.5",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.0.0 <21.0.0"
|
"node": ">=18.0.0 <21.0.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,6 +3,26 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.62.2](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.62.1...@standardnotes/api-gateway@1.62.2) (2023-06-01)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/api-gateway
|
||||||
|
|
||||||
|
## [1.62.1](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.62.0...@standardnotes/api-gateway@1.62.1) (2023-05-31)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/api-gateway
|
||||||
|
|
||||||
|
# [1.62.0](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.61.5...@standardnotes/api-gateway@1.62.0) (2023-05-31)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **home-server:** add custom home server logs ([#619](https://github.com/standardnotes/api-gateway/issues/619)) ([bc63d0a](https://github.com/standardnotes/api-gateway/commit/bc63d0aeea86abbb4a144b2682b7070d7bdfe878))
|
||||||
|
|
||||||
|
## [1.61.5](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.61.4...@standardnotes/api-gateway@1.61.5) (2023-05-31)
|
||||||
|
|
||||||
|
### Reverts
|
||||||
|
|
||||||
|
* Revert "Revert "feat: make home server components publishable (#617)"" ([13c85d4](https://github.com/standardnotes/api-gateway/commit/13c85d43318caa0fb53726f13ea581ba4a5f816b)), closes [#617](https://github.com/standardnotes/api-gateway/issues/617)
|
||||||
|
|
||||||
## [1.61.4](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.61.3...@standardnotes/api-gateway@1.61.4) (2023-05-31)
|
## [1.61.4](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.61.3...@standardnotes/api-gateway@1.61.4) (2023-05-31)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "@standardnotes/api-gateway",
|
"name": "@standardnotes/api-gateway",
|
||||||
"version": "1.61.4",
|
"version": "1.62.2",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.0.0 <21.0.0"
|
"node": ">=18.0.0 <21.0.0"
|
||||||
},
|
},
|
||||||
"private": true,
|
|
||||||
"description": "API Gateway For Standard Notes Services",
|
"description": "API Gateway For Standard Notes Services",
|
||||||
"main": "dist/src/index.js",
|
"main": "dist/src/index.js",
|
||||||
"types": "dist/src/index.d.ts",
|
"types": "dist/src/index.d.ts",
|
||||||
@@ -15,6 +14,9 @@
|
|||||||
"repository": "git@github.com:standardnotes/api-gateway.git",
|
"repository": "git@github.com:standardnotes/api-gateway.git",
|
||||||
"author": "Karol Sójko <karol@standardnotes.com>",
|
"author": "Karol Sójko <karol@standardnotes.com>",
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "public"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"clean": "rm -fr dist",
|
"clean": "rm -fr dist",
|
||||||
"build": "tsc --build",
|
"build": "tsc --build",
|
||||||
@@ -52,6 +54,7 @@
|
|||||||
"@types/jest": "^29.5.1",
|
"@types/jest": "^29.5.1",
|
||||||
"@types/jsonwebtoken": "^9.0.1",
|
"@types/jsonwebtoken": "^9.0.1",
|
||||||
"@types/newrelic": "^9.13.0",
|
"@types/newrelic": "^9.13.0",
|
||||||
|
"@types/node": "^20.2.5",
|
||||||
"@types/prettyjson": "^0.0.30",
|
"@types/prettyjson": "^0.0.30",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.59.2",
|
"@typescript-eslint/eslint-plugin": "^5.59.2",
|
||||||
"@typescript-eslint/parser": "^5.59.2",
|
"@typescript-eslint/parser": "^5.59.2",
|
||||||
|
|||||||
@@ -21,12 +21,13 @@ import { EndpointResolverInterface } from '../Service/Resolver/EndpointResolverI
|
|||||||
import { EndpointResolver } from '../Service/Resolver/EndpointResolver'
|
import { EndpointResolver } from '../Service/Resolver/EndpointResolver'
|
||||||
import { RequiredCrossServiceTokenMiddleware } from '../Controller/RequiredCrossServiceTokenMiddleware'
|
import { RequiredCrossServiceTokenMiddleware } from '../Controller/RequiredCrossServiceTokenMiddleware'
|
||||||
import { OptionalCrossServiceTokenMiddleware } from '../Controller/OptionalCrossServiceTokenMiddleware'
|
import { OptionalCrossServiceTokenMiddleware } from '../Controller/OptionalCrossServiceTokenMiddleware'
|
||||||
|
import { Transform } from 'stream'
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||||
const newrelicFormatter = require('@newrelic/winston-enricher')
|
const newrelicFormatter = require('@newrelic/winston-enricher')
|
||||||
|
|
||||||
export class ContainerConfigLoader {
|
export class ContainerConfigLoader {
|
||||||
async load(serviceContainer?: ServiceContainerInterface): Promise<Container> {
|
async load(configuration?: { serviceContainer?: ServiceContainerInterface; logger?: Transform }): Promise<Container> {
|
||||||
const env: Env = new Env()
|
const env: Env = new Env()
|
||||||
env.load()
|
env.load()
|
||||||
|
|
||||||
@@ -40,13 +41,17 @@ export class ContainerConfigLoader {
|
|||||||
winstonFormatters.push(newrelicWinstonFormatter())
|
winstonFormatters.push(newrelicWinstonFormatter())
|
||||||
}
|
}
|
||||||
|
|
||||||
const logger = winston.createLogger({
|
if (configuration?.logger) {
|
||||||
level: env.get('LOG_LEVEL') || 'info',
|
container.bind<winston.Logger>(TYPES.Logger).toConstantValue(configuration.logger as winston.Logger)
|
||||||
format: winston.format.combine(...winstonFormatters),
|
} else {
|
||||||
transports: [new winston.transports.Console({ level: env.get('LOG_LEVEL') || 'info' })],
|
const logger = winston.createLogger({
|
||||||
defaultMeta: { service: 'api-gateway' },
|
level: env.get('LOG_LEVEL') || 'info',
|
||||||
})
|
format: winston.format.combine(...winstonFormatters),
|
||||||
container.bind<winston.Logger>(TYPES.Logger).toConstantValue(logger)
|
transports: [new winston.transports.Console({ level: env.get('LOG_LEVEL') || 'info' })],
|
||||||
|
defaultMeta: { service: 'api-gateway' },
|
||||||
|
})
|
||||||
|
container.bind<winston.Logger>(TYPES.Logger).toConstantValue(logger)
|
||||||
|
}
|
||||||
|
|
||||||
if (!isConfiguredForHomeServer) {
|
if (!isConfiguredForHomeServer) {
|
||||||
const redisUrl = env.get('REDIS_URL')
|
const redisUrl = env.get('REDIS_URL')
|
||||||
@@ -91,12 +96,14 @@ export class ContainerConfigLoader {
|
|||||||
|
|
||||||
// Services
|
// Services
|
||||||
if (isConfiguredForHomeServer) {
|
if (isConfiguredForHomeServer) {
|
||||||
if (!serviceContainer) {
|
if (!configuration?.serviceContainer) {
|
||||||
throw new Error('Service container is required when configured for home server')
|
throw new Error('Service container is required when configured for home server')
|
||||||
}
|
}
|
||||||
container
|
container
|
||||||
.bind<ServiceProxyInterface>(TYPES.ServiceProxy)
|
.bind<ServiceProxyInterface>(TYPES.ServiceProxy)
|
||||||
.toConstantValue(new DirectCallServiceProxy(serviceContainer, container.get(TYPES.FILES_SERVER_URL)))
|
.toConstantValue(
|
||||||
|
new DirectCallServiceProxy(configuration.serviceContainer, container.get(TYPES.FILES_SERVER_URL)),
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
container.bind<ServiceProxyInterface>(TYPES.ServiceProxy).to(HttpServiceProxy)
|
container.bind<ServiceProxyInterface>(TYPES.ServiceProxy).to(HttpServiceProxy)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,19 @@
|
|||||||
import { ServiceContainerInterface, ServiceIdentifier, ServiceInterface } from '@standardnotes/domain-core'
|
import { ServiceContainerInterface, ServiceIdentifier, ServiceInterface } from '@standardnotes/domain-core'
|
||||||
|
|
||||||
import { ContainerConfigLoader } from './Container'
|
import { ContainerConfigLoader } from './Container'
|
||||||
|
import { Transform } from 'stream'
|
||||||
|
|
||||||
export class Service implements ServiceInterface {
|
export class Service implements ServiceInterface {
|
||||||
|
private logger: Transform | undefined
|
||||||
|
|
||||||
constructor(private serviceContainer: ServiceContainerInterface) {
|
constructor(private serviceContainer: ServiceContainerInterface) {
|
||||||
this.serviceContainer.register(this.getId(), this)
|
this.serviceContainer.register(this.getId(), this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setLogger(logger: Transform): void {
|
||||||
|
this.logger = logger
|
||||||
|
}
|
||||||
|
|
||||||
async handleRequest(_request: never, _response: never, _endpointOrMethodIdentifier: string): Promise<unknown> {
|
async handleRequest(_request: never, _response: never, _endpointOrMethodIdentifier: string): Promise<unknown> {
|
||||||
throw new Error('Requests are handled via inversify-express at ApiGateway level')
|
throw new Error('Requests are handled via inversify-express at ApiGateway level')
|
||||||
}
|
}
|
||||||
@@ -14,7 +21,10 @@ export class Service implements ServiceInterface {
|
|||||||
async getContainer(): Promise<unknown> {
|
async getContainer(): Promise<unknown> {
|
||||||
const config = new ContainerConfigLoader()
|
const config = new ContainerConfigLoader()
|
||||||
|
|
||||||
return config.load(this.serviceContainer)
|
return config.load({
|
||||||
|
serviceContainer: this.serviceContainer,
|
||||||
|
logger: this.logger,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
getId(): ServiceIdentifier {
|
getId(): ServiceIdentifier {
|
||||||
|
|||||||
@@ -1,2 +1 @@
|
|||||||
export * from './Service'
|
export * from './Service'
|
||||||
export * from './Types'
|
|
||||||
|
|||||||
@@ -3,6 +3,30 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.115.2](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.115.1...@standardnotes/auth-server@1.115.2) (2023-06-01)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/auth-server
|
||||||
|
|
||||||
|
## [1.115.1](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.115.0...@standardnotes/auth-server@1.115.1) (2023-05-31)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/auth-server
|
||||||
|
|
||||||
|
# [1.115.0](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.114.6...@standardnotes/auth-server@1.115.0) (2023-05-31)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **home-server:** add custom home server logs ([#619](https://github.com/standardnotes/server/issues/619)) ([bc63d0a](https://github.com/standardnotes/server/commit/bc63d0aeea86abbb4a144b2682b7070d7bdfe878))
|
||||||
|
|
||||||
|
## [1.114.6](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.114.5...@standardnotes/auth-server@1.114.6) (2023-05-31)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/auth-server
|
||||||
|
|
||||||
|
## [1.114.5](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.114.4...@standardnotes/auth-server@1.114.5) (2023-05-31)
|
||||||
|
|
||||||
|
### Reverts
|
||||||
|
|
||||||
|
* Revert "Revert "feat: make home server components publishable (#617)"" ([13c85d4](https://github.com/standardnotes/server/commit/13c85d43318caa0fb53726f13ea581ba4a5f816b)), closes [#617](https://github.com/standardnotes/server/issues/617)
|
||||||
|
|
||||||
## [1.114.4](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.114.3...@standardnotes/auth-server@1.114.4) (2023-05-31)
|
## [1.114.4](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.114.3...@standardnotes/auth-server@1.114.4) (2023-05-31)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -1,15 +1,17 @@
|
|||||||
{
|
{
|
||||||
"name": "@standardnotes/auth-server",
|
"name": "@standardnotes/auth-server",
|
||||||
"version": "1.114.4",
|
"version": "1.115.2",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.0.0 <21.0.0"
|
"node": ">=18.0.0 <21.0.0"
|
||||||
},
|
},
|
||||||
"private": true,
|
|
||||||
"description": "Auth Server",
|
"description": "Auth Server",
|
||||||
"main": "dist/src/index.js",
|
"main": "dist/src/index.js",
|
||||||
"typings": "dist/src/index.d.ts",
|
"typings": "dist/src/index.d.ts",
|
||||||
"author": "Karol Sójko <karol@standardnotes.com>",
|
"author": "Karol Sójko <karol@standardnotes.com>",
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "public"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"clean": "rm -fr dist",
|
"clean": "rm -fr dist",
|
||||||
"setup:env": "cp .env.sample .env",
|
"setup:env": "cp .env.sample .env",
|
||||||
@@ -80,6 +82,7 @@
|
|||||||
"@types/ioredis": "^5.0.0",
|
"@types/ioredis": "^5.0.0",
|
||||||
"@types/jest": "^29.5.1",
|
"@types/jest": "^29.5.1",
|
||||||
"@types/newrelic": "^9.13.0",
|
"@types/newrelic": "^9.13.0",
|
||||||
|
"@types/node": "^20.2.5",
|
||||||
"@types/otplib": "^10.0.0",
|
"@types/otplib": "^10.0.0",
|
||||||
"@types/prettyjson": "^0.0.30",
|
"@types/prettyjson": "^0.0.30",
|
||||||
"@types/ua-parser-js": "^0.7.36",
|
"@types/ua-parser-js": "^0.7.36",
|
||||||
|
|||||||
@@ -250,6 +250,7 @@ import { HomeServerUsersController } from '../Infra/InversifyExpressUtils/HomeSe
|
|||||||
import { HomeServerValetTokenController } from '../Infra/InversifyExpressUtils/HomeServer/HomeServerValetTokenController'
|
import { HomeServerValetTokenController } from '../Infra/InversifyExpressUtils/HomeServer/HomeServerValetTokenController'
|
||||||
import { HomeServerWebSocketsController } from '../Infra/InversifyExpressUtils/HomeServer/HomeServerWebSocketsController'
|
import { HomeServerWebSocketsController } from '../Infra/InversifyExpressUtils/HomeServer/HomeServerWebSocketsController'
|
||||||
import { HomeServerSessionsController } from '../Infra/InversifyExpressUtils/HomeServer/HomeServerSessionsController'
|
import { HomeServerSessionsController } from '../Infra/InversifyExpressUtils/HomeServer/HomeServerSessionsController'
|
||||||
|
import { Transform } from 'stream'
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||||
const newrelicFormatter = require('@newrelic/winston-enricher')
|
const newrelicFormatter = require('@newrelic/winston-enricher')
|
||||||
@@ -258,6 +259,7 @@ export class ContainerConfigLoader {
|
|||||||
async load(configuration?: {
|
async load(configuration?: {
|
||||||
controllerConatiner?: ControllerContainerInterface
|
controllerConatiner?: ControllerContainerInterface
|
||||||
directCallDomainEventPublisher?: DirectCallDomainEventPublisher
|
directCallDomainEventPublisher?: DirectCallDomainEventPublisher
|
||||||
|
logger?: Transform
|
||||||
}): Promise<Container> {
|
}): Promise<Container> {
|
||||||
const directCallDomainEventPublisher =
|
const directCallDomainEventPublisher =
|
||||||
configuration?.directCallDomainEventPublisher ?? new DirectCallDomainEventPublisher()
|
configuration?.directCallDomainEventPublisher ?? new DirectCallDomainEventPublisher()
|
||||||
@@ -290,13 +292,17 @@ export class ContainerConfigLoader {
|
|||||||
winstonFormatters.push(newrelicWinstonFormatter())
|
winstonFormatters.push(newrelicWinstonFormatter())
|
||||||
}
|
}
|
||||||
|
|
||||||
const logger = winston.createLogger({
|
if (configuration?.logger) {
|
||||||
level: env.get('LOG_LEVEL') || 'info',
|
container.bind<winston.Logger>(TYPES.Auth_Logger).toConstantValue(configuration.logger as winston.Logger)
|
||||||
format: winston.format.combine(...winstonFormatters),
|
} else {
|
||||||
transports: [new winston.transports.Console({ level: env.get('LOG_LEVEL') || 'info' })],
|
const logger = winston.createLogger({
|
||||||
defaultMeta: { service: 'auth' },
|
level: env.get('LOG_LEVEL') || 'info',
|
||||||
})
|
format: winston.format.combine(...winstonFormatters),
|
||||||
container.bind<winston.Logger>(TYPES.Auth_Logger).toConstantValue(logger)
|
transports: [new winston.transports.Console({ level: env.get('LOG_LEVEL') || 'info' })],
|
||||||
|
defaultMeta: { service: 'auth' },
|
||||||
|
})
|
||||||
|
container.bind<winston.Logger>(TYPES.Auth_Logger).toConstantValue(logger)
|
||||||
|
}
|
||||||
|
|
||||||
container.bind<TimerInterface>(TYPES.Auth_Timer).toConstantValue(new Timer())
|
container.bind<TimerInterface>(TYPES.Auth_Timer).toConstantValue(new Timer())
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,11 @@ import {
|
|||||||
|
|
||||||
import { ContainerConfigLoader } from './Container'
|
import { ContainerConfigLoader } from './Container'
|
||||||
import { DirectCallDomainEventPublisher } from '@standardnotes/domain-events-infra'
|
import { DirectCallDomainEventPublisher } from '@standardnotes/domain-events-infra'
|
||||||
|
import { Transform } from 'stream'
|
||||||
|
|
||||||
export class Service implements ServiceInterface {
|
export class Service implements ServiceInterface {
|
||||||
|
private logger: Transform | undefined
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private serviceContainer: ServiceContainerInterface,
|
private serviceContainer: ServiceContainerInterface,
|
||||||
private controllerContainer: ControllerContainerInterface,
|
private controllerContainer: ControllerContainerInterface,
|
||||||
@@ -17,6 +20,10 @@ export class Service implements ServiceInterface {
|
|||||||
this.serviceContainer.register(this.getId(), this)
|
this.serviceContainer.register(this.getId(), this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setLogger(logger: Transform): void {
|
||||||
|
this.logger = logger
|
||||||
|
}
|
||||||
|
|
||||||
async handleRequest(request: never, response: never, endpointOrMethodIdentifier: string): Promise<unknown> {
|
async handleRequest(request: never, response: never, endpointOrMethodIdentifier: string): Promise<unknown> {
|
||||||
const method = this.controllerContainer.get(endpointOrMethodIdentifier)
|
const method = this.controllerContainer.get(endpointOrMethodIdentifier)
|
||||||
|
|
||||||
@@ -33,6 +40,7 @@ export class Service implements ServiceInterface {
|
|||||||
return config.load({
|
return config.load({
|
||||||
controllerConatiner: this.controllerContainer,
|
controllerConatiner: this.controllerContainer,
|
||||||
directCallDomainEventPublisher: this.directCallDomainEventPublisher,
|
directCallDomainEventPublisher: this.directCallDomainEventPublisher,
|
||||||
|
logger: this.logger,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,12 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.48.2](https://github.com/standardnotes/server/compare/@standardnotes/common@1.48.0...@standardnotes/common@1.48.2) (2023-05-31)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **common:** bump version ([74ac709](https://github.com/standardnotes/server/commit/74ac709bb5e78aa5a01db34592873a42674ce138))
|
||||||
|
|
||||||
# [1.48.0](https://github.com/standardnotes/server/compare/@standardnotes/common@1.47.1...@standardnotes/common@1.48.0) (2023-05-30)
|
# [1.48.0](https://github.com/standardnotes/server/compare/@standardnotes/common@1.47.1...@standardnotes/common@1.48.0) (2023-05-30)
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@standardnotes/common",
|
"name": "@standardnotes/common",
|
||||||
"version": "1.48.0",
|
"version": "1.48.2",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.0.0 <21.0.0"
|
"node": ">=18.0.0 <21.0.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,6 +3,12 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
# [1.17.0](https://github.com/standardnotes/server/compare/@standardnotes/domain-core@1.16.2...@standardnotes/domain-core@1.17.0) (2023-05-31)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **home-server:** add custom home server logs ([#619](https://github.com/standardnotes/server/issues/619)) ([bc63d0a](https://github.com/standardnotes/server/commit/bc63d0aeea86abbb4a144b2682b7070d7bdfe878))
|
||||||
|
|
||||||
## [1.16.2](https://github.com/standardnotes/server/compare/@standardnotes/domain-core@1.16.0...@standardnotes/domain-core@1.16.2) (2023-05-30)
|
## [1.16.2](https://github.com/standardnotes/server/compare/@standardnotes/domain-core@1.16.0...@standardnotes/domain-core@1.16.2) (2023-05-30)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@standardnotes/domain-core",
|
"name": "@standardnotes/domain-core",
|
||||||
"version": "1.16.2",
|
"version": "1.17.0",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.0.0 <21.0.0"
|
"node": ">=18.0.0 <21.0.0"
|
||||||
},
|
},
|
||||||
@@ -27,6 +27,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^29.5.1",
|
"@types/jest": "^29.5.1",
|
||||||
|
"@types/node": "^20.2.5",
|
||||||
"@types/uuid": "^8.3.0",
|
"@types/uuid": "^8.3.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.59.2",
|
"@typescript-eslint/eslint-plugin": "^5.59.2",
|
||||||
"@typescript-eslint/parser": "^5.59.2",
|
"@typescript-eslint/parser": "^5.59.2",
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
import { ServiceIdentifier } from './ServiceIdentifier'
|
import { ServiceIdentifier } from './ServiceIdentifier'
|
||||||
|
import { Transform } from 'stream'
|
||||||
|
|
||||||
export interface ServiceInterface {
|
export interface ServiceInterface {
|
||||||
getContainer(): Promise<unknown>
|
getContainer(): Promise<unknown>
|
||||||
|
setLogger(logger: Transform): void
|
||||||
getId(): ServiceIdentifier
|
getId(): ServiceIdentifier
|
||||||
handleRequest(request: never, response: never, endpointOrMethodIdentifier: string): Promise<unknown>
|
handleRequest(request: never, response: never, endpointOrMethodIdentifier: string): Promise<unknown>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.12.3](https://github.com/standardnotes/server/compare/@standardnotes/domain-events-infra@1.12.2...@standardnotes/domain-events-infra@1.12.3) (2023-05-31)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/domain-events-infra
|
||||||
|
|
||||||
## [1.12.2](https://github.com/standardnotes/server/compare/@standardnotes/domain-events-infra@1.12.0...@standardnotes/domain-events-infra@1.12.2) (2023-05-30)
|
## [1.12.2](https://github.com/standardnotes/server/compare/@standardnotes/domain-events-infra@1.12.0...@standardnotes/domain-events-infra@1.12.2) (2023-05-30)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@standardnotes/domain-events-infra",
|
"name": "@standardnotes/domain-events-infra",
|
||||||
"version": "1.12.2",
|
"version": "1.12.3",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.0.0 <21.0.0"
|
"node": ">=18.0.0 <21.0.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [2.111.3](https://github.com/standardnotes/server/compare/@standardnotes/domain-events@2.111.2...@standardnotes/domain-events@2.111.3) (2023-05-31)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/domain-events
|
||||||
|
|
||||||
## [2.111.2](https://github.com/standardnotes/server/compare/@standardnotes/domain-events@2.111.0...@standardnotes/domain-events@2.111.2) (2023-05-30)
|
## [2.111.2](https://github.com/standardnotes/server/compare/@standardnotes/domain-events@2.111.0...@standardnotes/domain-events@2.111.2) (2023-05-30)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@standardnotes/domain-events",
|
"name": "@standardnotes/domain-events",
|
||||||
"version": "2.111.2",
|
"version": "2.111.3",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.0.0 <21.0.0"
|
"node": ">=18.0.0 <21.0.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,6 +3,14 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.9.4](https://github.com/standardnotes/server/compare/@standardnotes/event-store@1.9.3...@standardnotes/event-store@1.9.4) (2023-06-01)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/event-store
|
||||||
|
|
||||||
|
## [1.9.3](https://github.com/standardnotes/server/compare/@standardnotes/event-store@1.9.2...@standardnotes/event-store@1.9.3) (2023-05-31)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/event-store
|
||||||
|
|
||||||
## [1.9.2](https://github.com/standardnotes/server/compare/@standardnotes/event-store@1.9.1...@standardnotes/event-store@1.9.2) (2023-05-31)
|
## [1.9.2](https://github.com/standardnotes/server/compare/@standardnotes/event-store@1.9.1...@standardnotes/event-store@1.9.2) (2023-05-31)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@standardnotes/event-store",
|
"name": "@standardnotes/event-store",
|
||||||
"version": "1.9.2",
|
"version": "1.9.4",
|
||||||
"description": "Event Store Service",
|
"description": "Event Store Service",
|
||||||
"private": true,
|
"private": true,
|
||||||
"main": "dist/src/index.js",
|
"main": "dist/src/index.js",
|
||||||
|
|||||||
@@ -3,6 +3,26 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.16.2](https://github.com/standardnotes/files/compare/@standardnotes/files-server@1.16.1...@standardnotes/files-server@1.16.2) (2023-06-01)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/files-server
|
||||||
|
|
||||||
|
## [1.16.1](https://github.com/standardnotes/files/compare/@standardnotes/files-server@1.16.0...@standardnotes/files-server@1.16.1) (2023-05-31)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/files-server
|
||||||
|
|
||||||
|
# [1.16.0](https://github.com/standardnotes/files/compare/@standardnotes/files-server@1.15.4...@standardnotes/files-server@1.16.0) (2023-05-31)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **home-server:** add custom home server logs ([#619](https://github.com/standardnotes/files/issues/619)) ([bc63d0a](https://github.com/standardnotes/files/commit/bc63d0aeea86abbb4a144b2682b7070d7bdfe878))
|
||||||
|
|
||||||
|
## [1.15.4](https://github.com/standardnotes/files/compare/@standardnotes/files-server@1.15.3...@standardnotes/files-server@1.15.4) (2023-05-31)
|
||||||
|
|
||||||
|
### Reverts
|
||||||
|
|
||||||
|
* Revert "Revert "feat: make home server components publishable (#617)"" ([13c85d4](https://github.com/standardnotes/files/commit/13c85d43318caa0fb53726f13ea581ba4a5f816b)), closes [#617](https://github.com/standardnotes/files/issues/617)
|
||||||
|
|
||||||
## [1.15.3](https://github.com/standardnotes/files/compare/@standardnotes/files-server@1.15.2...@standardnotes/files-server@1.15.3) (2023-05-30)
|
## [1.15.3](https://github.com/standardnotes/files/compare/@standardnotes/files-server@1.15.2...@standardnotes/files-server@1.15.3) (2023-05-30)
|
||||||
|
|
||||||
### Reverts
|
### Reverts
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "@standardnotes/files-server",
|
"name": "@standardnotes/files-server",
|
||||||
"version": "1.15.3",
|
"version": "1.16.2",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.0.0 <21.0.0"
|
"node": ">=18.0.0 <21.0.0"
|
||||||
},
|
},
|
||||||
"private": true,
|
|
||||||
"description": "Standard Notes Files Server",
|
"description": "Standard Notes Files Server",
|
||||||
"main": "dist/src/index.js",
|
"main": "dist/src/index.js",
|
||||||
"typings": "dist/src/index.d.ts",
|
"typings": "dist/src/index.d.ts",
|
||||||
@@ -13,6 +12,9 @@
|
|||||||
"Karol Sójko <karol@standardnotes.com>"
|
"Karol Sójko <karol@standardnotes.com>"
|
||||||
],
|
],
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "public"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"clean": "rm -fr dist",
|
"clean": "rm -fr dist",
|
||||||
"setup:env": "cp .env.sample .env",
|
"setup:env": "cp .env.sample .env",
|
||||||
@@ -62,6 +64,7 @@
|
|||||||
"@types/jest": "^29.5.1",
|
"@types/jest": "^29.5.1",
|
||||||
"@types/jsonwebtoken": "^9.0.1",
|
"@types/jsonwebtoken": "^9.0.1",
|
||||||
"@types/newrelic": "^9.13.0",
|
"@types/newrelic": "^9.13.0",
|
||||||
|
"@types/node": "^20.2.5",
|
||||||
"@types/prettyjson": "^0.0.30",
|
"@types/prettyjson": "^0.0.30",
|
||||||
"@types/uuid": "^8.3.0",
|
"@types/uuid": "^8.3.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.59.2",
|
"@typescript-eslint/eslint-plugin": "^5.59.2",
|
||||||
|
|||||||
@@ -47,9 +47,13 @@ import { MarkFilesToBeRemoved } from '../Domain/UseCase/MarkFilesToBeRemoved/Mar
|
|||||||
import { AccountDeletionRequestedEventHandler } from '../Domain/Handler/AccountDeletionRequestedEventHandler'
|
import { AccountDeletionRequestedEventHandler } from '../Domain/Handler/AccountDeletionRequestedEventHandler'
|
||||||
import { SharedSubscriptionInvitationCanceledEventHandler } from '../Domain/Handler/SharedSubscriptionInvitationCanceledEventHandler'
|
import { SharedSubscriptionInvitationCanceledEventHandler } from '../Domain/Handler/SharedSubscriptionInvitationCanceledEventHandler'
|
||||||
import { InMemoryUploadRepository } from '../Infra/InMemory/InMemoryUploadRepository'
|
import { InMemoryUploadRepository } from '../Infra/InMemory/InMemoryUploadRepository'
|
||||||
|
import { Transform } from 'stream'
|
||||||
|
|
||||||
export class ContainerConfigLoader {
|
export class ContainerConfigLoader {
|
||||||
async load(configuration?: { directCallDomainEventPublisher?: DirectCallDomainEventPublisher }): Promise<Container> {
|
async load(configuration?: {
|
||||||
|
directCallDomainEventPublisher?: DirectCallDomainEventPublisher
|
||||||
|
logger?: Transform
|
||||||
|
}): Promise<Container> {
|
||||||
const directCallDomainEventPublisher =
|
const directCallDomainEventPublisher =
|
||||||
configuration?.directCallDomainEventPublisher ?? new DirectCallDomainEventPublisher()
|
configuration?.directCallDomainEventPublisher ?? new DirectCallDomainEventPublisher()
|
||||||
|
|
||||||
@@ -60,8 +64,11 @@ export class ContainerConfigLoader {
|
|||||||
|
|
||||||
const isConfiguredForHomeServer = env.get('CACHE_TYPE') === 'memory'
|
const isConfiguredForHomeServer = env.get('CACHE_TYPE') === 'memory'
|
||||||
|
|
||||||
const logger = this.createLogger({ env })
|
if (configuration?.logger) {
|
||||||
container.bind<winston.Logger>(TYPES.Files_Logger).toConstantValue(logger)
|
container.bind<winston.Logger>(TYPES.Files_Logger).toConstantValue(configuration.logger as winston.Logger)
|
||||||
|
} else {
|
||||||
|
container.bind<winston.Logger>(TYPES.Files_Logger).toConstantValue(this.createLogger({ env }))
|
||||||
|
}
|
||||||
|
|
||||||
container.bind<TimerInterface>(TYPES.Files_Timer).toConstantValue(new Timer())
|
container.bind<TimerInterface>(TYPES.Files_Timer).toConstantValue(new Timer())
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,11 @@ import { ServiceContainerInterface, ServiceIdentifier, ServiceInterface } from '
|
|||||||
import { DirectCallDomainEventPublisher } from '@standardnotes/domain-events-infra'
|
import { DirectCallDomainEventPublisher } from '@standardnotes/domain-events-infra'
|
||||||
|
|
||||||
import { ContainerConfigLoader } from './Container'
|
import { ContainerConfigLoader } from './Container'
|
||||||
|
import { Transform } from 'stream'
|
||||||
|
|
||||||
export class Service implements ServiceInterface {
|
export class Service implements ServiceInterface {
|
||||||
|
private logger: Transform | undefined
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private serviceContainer: ServiceContainerInterface,
|
private serviceContainer: ServiceContainerInterface,
|
||||||
private directCallDomainEventPublisher: DirectCallDomainEventPublisher,
|
private directCallDomainEventPublisher: DirectCallDomainEventPublisher,
|
||||||
@@ -11,6 +14,10 @@ export class Service implements ServiceInterface {
|
|||||||
this.serviceContainer.register(this.getId(), this)
|
this.serviceContainer.register(this.getId(), this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setLogger(logger: Transform): void {
|
||||||
|
this.logger = logger
|
||||||
|
}
|
||||||
|
|
||||||
async handleRequest(_request: never, _response: never, _endpointOrMethodIdentifier: string): Promise<unknown> {
|
async handleRequest(_request: never, _response: never, _endpointOrMethodIdentifier: string): Promise<unknown> {
|
||||||
throw new Error('Requests are handled via inversify-express at ApiGateway level')
|
throw new Error('Requests are handled via inversify-express at ApiGateway level')
|
||||||
}
|
}
|
||||||
@@ -20,6 +27,7 @@ export class Service implements ServiceInterface {
|
|||||||
|
|
||||||
return config.load({
|
return config.load({
|
||||||
directCallDomainEventPublisher: this.directCallDomainEventPublisher,
|
directCallDomainEventPublisher: this.directCallDomainEventPublisher,
|
||||||
|
logger: this.logger,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,28 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.7.2](https://github.com/standardnotes/server/compare/@standardnotes/home-server@1.7.1...@standardnotes/home-server@1.7.2) (2023-06-01)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/home-server
|
||||||
|
|
||||||
|
## [1.7.1](https://github.com/standardnotes/server/compare/@standardnotes/home-server@1.7.0...@standardnotes/home-server@1.7.1) (2023-05-31)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/home-server
|
||||||
|
|
||||||
|
# [1.7.0](https://github.com/standardnotes/server/compare/@standardnotes/home-server@1.6.7...@standardnotes/home-server@1.7.0) (2023-05-31)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **home-server:** add custom home server logs ([#619](https://github.com/standardnotes/server/issues/619)) ([bc63d0a](https://github.com/standardnotes/server/commit/bc63d0aeea86abbb4a144b2682b7070d7bdfe878))
|
||||||
|
|
||||||
|
## [1.6.7](https://github.com/standardnotes/server/compare/@standardnotes/home-server@1.6.6...@standardnotes/home-server@1.6.7) (2023-05-31)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/home-server
|
||||||
|
|
||||||
|
## [1.6.6](https://github.com/standardnotes/server/compare/@standardnotes/home-server@1.6.5...@standardnotes/home-server@1.6.6) (2023-05-31)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/home-server
|
||||||
|
|
||||||
## [1.6.5](https://github.com/standardnotes/server/compare/@standardnotes/home-server@1.6.4...@standardnotes/home-server@1.6.5) (2023-05-31)
|
## [1.6.5](https://github.com/standardnotes/server/compare/@standardnotes/home-server@1.6.4...@standardnotes/home-server@1.6.5) (2023-05-31)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { HomeServer } from '../src/Bootstrap/HomeServer'
|
import { HomeServer } from '../src/Server/HomeServer'
|
||||||
|
|
||||||
const homeServer = new HomeServer()
|
const homeServer = new HomeServer()
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@standardnotes/home-server",
|
"name": "@standardnotes/home-server",
|
||||||
"version": "1.6.5",
|
"version": "1.7.2",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.0.0 <21.0.0"
|
"node": ">=18.0.0 <21.0.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
export * from './HomeServer'
|
|
||||||
+69
-10
@@ -1,7 +1,7 @@
|
|||||||
import 'reflect-metadata'
|
import 'reflect-metadata'
|
||||||
|
|
||||||
import { ControllerContainer, ServiceContainer } from '@standardnotes/domain-core'
|
import { ControllerContainer, ServiceContainer } from '@standardnotes/domain-core'
|
||||||
import { Service as ApiGatewayService, TYPES as ApiGatewayTYPES } from '@standardnotes/api-gateway'
|
import { Service as ApiGatewayService } from '@standardnotes/api-gateway'
|
||||||
import { Service as FilesService } from '@standardnotes/files-server'
|
import { Service as FilesService } from '@standardnotes/files-server'
|
||||||
import { DirectCallDomainEventPublisher } from '@standardnotes/domain-events-infra'
|
import { DirectCallDomainEventPublisher } from '@standardnotes/domain-events-infra'
|
||||||
import { Service as AuthService } from '@standardnotes/auth-server'
|
import { Service as AuthService } from '@standardnotes/auth-server'
|
||||||
@@ -11,24 +11,39 @@ import { Container } from 'inversify'
|
|||||||
import { InversifyExpressServer } from 'inversify-express-utils'
|
import { InversifyExpressServer } from 'inversify-express-utils'
|
||||||
import helmet from 'helmet'
|
import helmet from 'helmet'
|
||||||
import * as cors from 'cors'
|
import * as cors from 'cors'
|
||||||
|
import * as http from 'http'
|
||||||
import { text, json, Request, Response, NextFunction } from 'express'
|
import { text, json, Request, Response, NextFunction } from 'express'
|
||||||
import * as winston from 'winston'
|
import * as winston from 'winston'
|
||||||
|
import { PassThrough } from 'stream'
|
||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||||
const robots = require('express-robots-txt')
|
const robots = require('express-robots-txt')
|
||||||
|
|
||||||
import { Env } from './Env'
|
import { Env } from '../Bootstrap/Env'
|
||||||
|
import { HomeServerInterface } from './HomeServerInterface'
|
||||||
|
|
||||||
|
export class HomeServer implements HomeServerInterface {
|
||||||
|
private serverInstance: http.Server | undefined
|
||||||
|
|
||||||
export class HomeServer {
|
|
||||||
async start(): Promise<void> {
|
async start(): Promise<void> {
|
||||||
const controllerContainer = new ControllerContainer()
|
const controllerContainer = new ControllerContainer()
|
||||||
const serviceContainer = new ServiceContainer()
|
const serviceContainer = new ServiceContainer()
|
||||||
const directCallDomainEventPublisher = new DirectCallDomainEventPublisher()
|
const directCallDomainEventPublisher = new DirectCallDomainEventPublisher()
|
||||||
|
|
||||||
|
const env: Env = new Env()
|
||||||
|
env.load()
|
||||||
|
|
||||||
|
this.configureLoggers(env)
|
||||||
|
|
||||||
const apiGatewayService = new ApiGatewayService(serviceContainer)
|
const apiGatewayService = new ApiGatewayService(serviceContainer)
|
||||||
|
apiGatewayService.setLogger(winston.loggers.get('api-gateway'))
|
||||||
const authService = new AuthService(serviceContainer, controllerContainer, directCallDomainEventPublisher)
|
const authService = new AuthService(serviceContainer, controllerContainer, directCallDomainEventPublisher)
|
||||||
|
authService.setLogger(winston.loggers.get('auth-server'))
|
||||||
const syncingService = new SyncingService(serviceContainer, controllerContainer, directCallDomainEventPublisher)
|
const syncingService = new SyncingService(serviceContainer, controllerContainer, directCallDomainEventPublisher)
|
||||||
|
syncingService.setLogger(winston.loggers.get('syncing-server'))
|
||||||
const revisionsService = new RevisionsService(serviceContainer, controllerContainer, directCallDomainEventPublisher)
|
const revisionsService = new RevisionsService(serviceContainer, controllerContainer, directCallDomainEventPublisher)
|
||||||
|
revisionsService.setLogger(winston.loggers.get('revisions-server'))
|
||||||
const filesService = new FilesService(serviceContainer, directCallDomainEventPublisher)
|
const filesService = new FilesService(serviceContainer, directCallDomainEventPublisher)
|
||||||
|
filesService.setLogger(winston.loggers.get('files-server'))
|
||||||
|
|
||||||
const container = Container.merge(
|
const container = Container.merge(
|
||||||
(await apiGatewayService.getContainer()) as Container,
|
(await apiGatewayService.getContainer()) as Container,
|
||||||
@@ -38,9 +53,6 @@ export class HomeServer {
|
|||||||
(await filesService.getContainer()) as Container,
|
(await filesService.getContainer()) as Container,
|
||||||
)
|
)
|
||||||
|
|
||||||
const env: Env = new Env()
|
|
||||||
env.load()
|
|
||||||
|
|
||||||
const server = new InversifyExpressServer(container)
|
const server = new InversifyExpressServer(container)
|
||||||
|
|
||||||
server.setConfig((app) => {
|
server.setConfig((app) => {
|
||||||
@@ -81,7 +93,7 @@ export class HomeServer {
|
|||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
const logger: winston.Logger = container.get(ApiGatewayTYPES.Logger)
|
const logger: winston.Logger = winston.loggers.get('home-server')
|
||||||
|
|
||||||
server.setErrorConfig((app) => {
|
server.setErrorConfig((app) => {
|
||||||
app.use((error: Record<string, unknown>, _request: Request, response: Response, _next: NextFunction) => {
|
app.use((error: Record<string, unknown>, _request: Request, response: Response, _next: NextFunction) => {
|
||||||
@@ -96,10 +108,57 @@ export class HomeServer {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
const serverInstance = server.build()
|
this.serverInstance = server.build().listen(env.get('PORT', true) ? +env.get('PORT', true) : 3000)
|
||||||
|
|
||||||
serverInstance.listen(env.get('PORT', true) ? +env.get('PORT', true) : 3000)
|
|
||||||
|
|
||||||
logger.info(`Server started on port ${process.env.PORT}`)
|
logger.info(`Server started on port ${process.env.PORT}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async stop(): Promise<void> {
|
||||||
|
if (this.serverInstance) {
|
||||||
|
this.serverInstance.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async restart(): Promise<void> {
|
||||||
|
await this.stop()
|
||||||
|
await this.start()
|
||||||
|
}
|
||||||
|
|
||||||
|
async isRunning(): Promise<boolean> {
|
||||||
|
if (!this.serverInstance) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.serverInstance.address() !== null
|
||||||
|
}
|
||||||
|
|
||||||
|
logs(): NodeJS.ReadableStream {
|
||||||
|
const passThroughStream = new PassThrough()
|
||||||
|
|
||||||
|
for (const logger of winston.loggers.loggers.values()) {
|
||||||
|
logger.stream({ start: -1 }).pipe(passThroughStream, { end: false })
|
||||||
|
}
|
||||||
|
|
||||||
|
return passThroughStream
|
||||||
|
}
|
||||||
|
|
||||||
|
private configureLoggers(env: Env): void {
|
||||||
|
const winstonFormatters = [winston.format.splat(), winston.format.json()]
|
||||||
|
|
||||||
|
for (const loggerName of [
|
||||||
|
'auth-server',
|
||||||
|
'syncing-server',
|
||||||
|
'revisions-server',
|
||||||
|
'files-server',
|
||||||
|
'api-gateway',
|
||||||
|
'home-server',
|
||||||
|
]) {
|
||||||
|
winston.loggers.add(loggerName, {
|
||||||
|
level: env.get('LOG_LEVEL') || 'info',
|
||||||
|
format: winston.format.combine(...winstonFormatters),
|
||||||
|
transports: [new winston.transports.Console({ level: env.get('LOG_LEVEL') || 'info' })],
|
||||||
|
defaultMeta: { service: loggerName },
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
export interface HomeServerInterface {
|
||||||
|
start(): Promise<void>
|
||||||
|
stop(): Promise<void>
|
||||||
|
restart(): Promise<void>
|
||||||
|
isRunning(): Promise<boolean>
|
||||||
|
logs(): NodeJS.ReadableStream
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
export * from './HomeServer'
|
||||||
|
export * from './HomeServerInterface'
|
||||||
@@ -1 +1 @@
|
|||||||
export * from './Bootstrap'
|
export * from './Server'
|
||||||
|
|||||||
@@ -3,6 +3,30 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.20.2](https://github.com/standardnotes/server/compare/@standardnotes/revisions-server@1.20.1...@standardnotes/revisions-server@1.20.2) (2023-06-01)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/revisions-server
|
||||||
|
|
||||||
|
## [1.20.1](https://github.com/standardnotes/server/compare/@standardnotes/revisions-server@1.20.0...@standardnotes/revisions-server@1.20.1) (2023-05-31)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/revisions-server
|
||||||
|
|
||||||
|
# [1.20.0](https://github.com/standardnotes/server/compare/@standardnotes/revisions-server@1.19.6...@standardnotes/revisions-server@1.20.0) (2023-05-31)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **home-server:** add custom home server logs ([#619](https://github.com/standardnotes/server/issues/619)) ([bc63d0a](https://github.com/standardnotes/server/commit/bc63d0aeea86abbb4a144b2682b7070d7bdfe878))
|
||||||
|
|
||||||
|
## [1.19.6](https://github.com/standardnotes/server/compare/@standardnotes/revisions-server@1.19.5...@standardnotes/revisions-server@1.19.6) (2023-05-31)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/revisions-server
|
||||||
|
|
||||||
|
## [1.19.5](https://github.com/standardnotes/server/compare/@standardnotes/revisions-server@1.19.4...@standardnotes/revisions-server@1.19.5) (2023-05-31)
|
||||||
|
|
||||||
|
### Reverts
|
||||||
|
|
||||||
|
* Revert "Revert "feat: make home server components publishable (#617)"" ([13c85d4](https://github.com/standardnotes/server/commit/13c85d43318caa0fb53726f13ea581ba4a5f816b)), closes [#617](https://github.com/standardnotes/server/issues/617)
|
||||||
|
|
||||||
## [1.19.4](https://github.com/standardnotes/server/compare/@standardnotes/revisions-server@1.19.3...@standardnotes/revisions-server@1.19.4) (2023-05-31)
|
## [1.19.4](https://github.com/standardnotes/server/compare/@standardnotes/revisions-server@1.19.3...@standardnotes/revisions-server@1.19.4) (2023-05-31)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -1,16 +1,18 @@
|
|||||||
{
|
{
|
||||||
"name": "@standardnotes/revisions-server",
|
"name": "@standardnotes/revisions-server",
|
||||||
"version": "1.19.4",
|
"version": "1.20.2",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.0.0 <21.0.0"
|
"node": ">=18.0.0 <21.0.0"
|
||||||
},
|
},
|
||||||
"private": true,
|
|
||||||
"description": "Revisions Server",
|
"description": "Revisions Server",
|
||||||
"main": "dist/src/index.js",
|
"main": "dist/src/index.js",
|
||||||
"typings": "dist/src/index.d.ts",
|
"typings": "dist/src/index.d.ts",
|
||||||
"repository": "git@github.com:standardnotes/server.git",
|
"repository": "git@github.com:standardnotes/server.git",
|
||||||
"author": "Karol Sójko <karol@standardnotes.com>",
|
"author": "Karol Sójko <karol@standardnotes.com>",
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "public"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"clean": "rm -fr dist",
|
"clean": "rm -fr dist",
|
||||||
"setup:env": "cp .env.sample .env",
|
"setup:env": "cp .env.sample .env",
|
||||||
@@ -52,6 +54,7 @@
|
|||||||
"@types/express": "^4.17.14",
|
"@types/express": "^4.17.14",
|
||||||
"@types/jest": "^29.5.1",
|
"@types/jest": "^29.5.1",
|
||||||
"@types/newrelic": "^9.13.0",
|
"@types/newrelic": "^9.13.0",
|
||||||
|
"@types/node": "^20.2.5",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.59.2",
|
"@typescript-eslint/eslint-plugin": "^5.59.2",
|
||||||
"@typescript-eslint/parser": "^5.59.2",
|
"@typescript-eslint/parser": "^5.59.2",
|
||||||
"eslint": "^8.39.0",
|
"eslint": "^8.39.0",
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ import { FSDumpRepository } from '../Infra/FS/FSDumpRepository'
|
|||||||
import { S3DumpRepository } from '../Infra/S3/S3ItemDumpRepository'
|
import { S3DumpRepository } from '../Infra/S3/S3ItemDumpRepository'
|
||||||
import { RevisionItemStringMapper } from '../Mapping/RevisionItemStringMapper'
|
import { RevisionItemStringMapper } from '../Mapping/RevisionItemStringMapper'
|
||||||
import { HomeServerRevisionsController } from '../Infra/InversifyExpress/HomeServer/HomeServerRevisionsController'
|
import { HomeServerRevisionsController } from '../Infra/InversifyExpress/HomeServer/HomeServerRevisionsController'
|
||||||
|
import { Transform } from 'stream'
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||||
const newrelicFormatter = require('@newrelic/winston-enricher')
|
const newrelicFormatter = require('@newrelic/winston-enricher')
|
||||||
@@ -54,6 +55,7 @@ export class ContainerConfigLoader {
|
|||||||
async load(configuration?: {
|
async load(configuration?: {
|
||||||
controllerConatiner?: ControllerContainerInterface
|
controllerConatiner?: ControllerContainerInterface
|
||||||
directCallDomainEventPublisher?: DirectCallDomainEventPublisher
|
directCallDomainEventPublisher?: DirectCallDomainEventPublisher
|
||||||
|
logger?: Transform
|
||||||
}): Promise<Container> {
|
}): Promise<Container> {
|
||||||
const directCallDomainEventPublisher =
|
const directCallDomainEventPublisher =
|
||||||
configuration?.directCallDomainEventPublisher ?? new DirectCallDomainEventPublisher()
|
configuration?.directCallDomainEventPublisher ?? new DirectCallDomainEventPublisher()
|
||||||
@@ -71,24 +73,28 @@ export class ContainerConfigLoader {
|
|||||||
|
|
||||||
container.bind<Env>(TYPES.Revisions_Env).toConstantValue(env)
|
container.bind<Env>(TYPES.Revisions_Env).toConstantValue(env)
|
||||||
|
|
||||||
container.bind<winston.Logger>(TYPES.Revisions_Logger).toDynamicValue((context: interfaces.Context) => {
|
if (configuration?.logger) {
|
||||||
const env: Env = context.container.get(TYPES.Revisions_Env)
|
container.bind<winston.Logger>(TYPES.Revisions_Logger).toConstantValue(configuration.logger as winston.Logger)
|
||||||
|
} else {
|
||||||
|
container.bind<winston.Logger>(TYPES.Revisions_Logger).toDynamicValue((context: interfaces.Context) => {
|
||||||
|
const env: Env = context.container.get(TYPES.Revisions_Env)
|
||||||
|
|
||||||
const newrelicWinstonFormatter = newrelicFormatter(winston)
|
const newrelicWinstonFormatter = newrelicFormatter(winston)
|
||||||
const winstonFormatters = [winston.format.splat(), winston.format.json()]
|
const winstonFormatters = [winston.format.splat(), winston.format.json()]
|
||||||
if (env.get('NEW_RELIC_ENABLED', true) === 'true') {
|
if (env.get('NEW_RELIC_ENABLED', true) === 'true') {
|
||||||
winstonFormatters.push(newrelicWinstonFormatter())
|
winstonFormatters.push(newrelicWinstonFormatter())
|
||||||
}
|
}
|
||||||
|
|
||||||
const logger = winston.createLogger({
|
const logger = winston.createLogger({
|
||||||
level: env.get('LOG_LEVEL') || 'info',
|
level: env.get('LOG_LEVEL') || 'info',
|
||||||
format: winston.format.combine(...winstonFormatters),
|
format: winston.format.combine(...winstonFormatters),
|
||||||
transports: [new winston.transports.Console({ level: env.get('LOG_LEVEL') || 'info' })],
|
transports: [new winston.transports.Console({ level: env.get('LOG_LEVEL') || 'info' })],
|
||||||
defaultMeta: { service: 'revisions' },
|
defaultMeta: { service: 'revisions' },
|
||||||
|
})
|
||||||
|
|
||||||
|
return logger
|
||||||
})
|
})
|
||||||
|
}
|
||||||
return logger
|
|
||||||
})
|
|
||||||
|
|
||||||
container.bind(TYPES.Revisions_NEW_RELIC_ENABLED).toConstantValue(env.get('NEW_RELIC_ENABLED', true))
|
container.bind(TYPES.Revisions_NEW_RELIC_ENABLED).toConstantValue(env.get('NEW_RELIC_ENABLED', true))
|
||||||
container.bind(TYPES.Revisions_VERSION).toConstantValue(env.get('VERSION'))
|
container.bind(TYPES.Revisions_VERSION).toConstantValue(env.get('VERSION'))
|
||||||
|
|||||||
@@ -7,8 +7,11 @@ import {
|
|||||||
|
|
||||||
import { ContainerConfigLoader } from './Container'
|
import { ContainerConfigLoader } from './Container'
|
||||||
import { DirectCallDomainEventPublisher } from '@standardnotes/domain-events-infra'
|
import { DirectCallDomainEventPublisher } from '@standardnotes/domain-events-infra'
|
||||||
|
import { Transform } from 'stream'
|
||||||
|
|
||||||
export class Service implements ServiceInterface {
|
export class Service implements ServiceInterface {
|
||||||
|
private logger: Transform | undefined
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private serviceContainer: ServiceContainerInterface,
|
private serviceContainer: ServiceContainerInterface,
|
||||||
private controllerContainer: ControllerContainerInterface,
|
private controllerContainer: ControllerContainerInterface,
|
||||||
@@ -17,6 +20,10 @@ export class Service implements ServiceInterface {
|
|||||||
this.serviceContainer.register(this.getId(), this)
|
this.serviceContainer.register(this.getId(), this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setLogger(logger: Transform): void {
|
||||||
|
this.logger = logger
|
||||||
|
}
|
||||||
|
|
||||||
async handleRequest(request: never, response: never, endpointOrMethodIdentifier: string): Promise<unknown> {
|
async handleRequest(request: never, response: never, endpointOrMethodIdentifier: string): Promise<unknown> {
|
||||||
const method = this.controllerContainer.get(endpointOrMethodIdentifier)
|
const method = this.controllerContainer.get(endpointOrMethodIdentifier)
|
||||||
|
|
||||||
@@ -33,6 +40,7 @@ export class Service implements ServiceInterface {
|
|||||||
return config.load({
|
return config.load({
|
||||||
controllerConatiner: this.controllerContainer,
|
controllerConatiner: this.controllerContainer,
|
||||||
directCallDomainEventPublisher: this.directCallDomainEventPublisher,
|
directCallDomainEventPublisher: this.directCallDomainEventPublisher,
|
||||||
|
logger: this.logger,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,18 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.19.4](https://github.com/standardnotes/server/compare/@standardnotes/scheduler-server@1.19.3...@standardnotes/scheduler-server@1.19.4) (2023-06-01)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/scheduler-server
|
||||||
|
|
||||||
|
## [1.19.3](https://github.com/standardnotes/server/compare/@standardnotes/scheduler-server@1.19.2...@standardnotes/scheduler-server@1.19.3) (2023-05-31)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/scheduler-server
|
||||||
|
|
||||||
|
## [1.19.2](https://github.com/standardnotes/server/compare/@standardnotes/scheduler-server@1.19.1...@standardnotes/scheduler-server@1.19.2) (2023-05-31)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/scheduler-server
|
||||||
|
|
||||||
## [1.19.1](https://github.com/standardnotes/server/compare/@standardnotes/scheduler-server@1.19.0...@standardnotes/scheduler-server@1.19.1) (2023-05-30)
|
## [1.19.1](https://github.com/standardnotes/server/compare/@standardnotes/scheduler-server@1.19.0...@standardnotes/scheduler-server@1.19.1) (2023-05-30)
|
||||||
|
|
||||||
**Note:** Version bump only for package @standardnotes/scheduler-server
|
**Note:** Version bump only for package @standardnotes/scheduler-server
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@standardnotes/scheduler-server",
|
"name": "@standardnotes/scheduler-server",
|
||||||
"version": "1.19.1",
|
"version": "1.19.4",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.0.0 <21.0.0"
|
"node": ">=18.0.0 <21.0.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.7.10](https://github.com/standardnotes/server/compare/@standardnotes/security@1.7.8...@standardnotes/security@1.7.10) (2023-05-31)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/security
|
||||||
|
|
||||||
## [1.7.8](https://github.com/standardnotes/server/compare/@standardnotes/security@1.7.7...@standardnotes/security@1.7.8) (2023-05-09)
|
## [1.7.8](https://github.com/standardnotes/server/compare/@standardnotes/security@1.7.7...@standardnotes/security@1.7.8) (2023-05-09)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@standardnotes/security",
|
"name": "@standardnotes/security",
|
||||||
"version": "1.7.8",
|
"version": "1.7.10",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.0.0 <21.0.0"
|
"node": ">=18.0.0 <21.0.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.21.7](https://github.com/standardnotes/server/compare/@standardnotes/settings@1.21.6...@standardnotes/settings@1.21.7) (2023-05-31)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/settings
|
||||||
|
|
||||||
## [1.21.6](https://github.com/standardnotes/server/compare/@standardnotes/settings@1.21.5...@standardnotes/settings@1.21.6) (2023-05-30)
|
## [1.21.6](https://github.com/standardnotes/server/compare/@standardnotes/settings@1.21.5...@standardnotes/settings@1.21.6) (2023-05-30)
|
||||||
|
|
||||||
**Note:** Version bump only for package @standardnotes/settings
|
**Note:** Version bump only for package @standardnotes/settings
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@standardnotes/settings",
|
"name": "@standardnotes/settings",
|
||||||
"version": "1.21.6",
|
"version": "1.21.7",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.0.0 <21.0.0"
|
"node": ">=18.0.0 <21.0.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,6 +3,30 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.41.2](https://github.com/standardnotes/syncing-server-js/compare/@standardnotes/syncing-server@1.41.1...@standardnotes/syncing-server@1.41.2) (2023-06-01)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/syncing-server
|
||||||
|
|
||||||
|
## [1.41.1](https://github.com/standardnotes/syncing-server-js/compare/@standardnotes/syncing-server@1.41.0...@standardnotes/syncing-server@1.41.1) (2023-05-31)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/syncing-server
|
||||||
|
|
||||||
|
# [1.41.0](https://github.com/standardnotes/syncing-server-js/compare/@standardnotes/syncing-server@1.40.6...@standardnotes/syncing-server@1.41.0) (2023-05-31)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **home-server:** add custom home server logs ([#619](https://github.com/standardnotes/syncing-server-js/issues/619)) ([bc63d0a](https://github.com/standardnotes/syncing-server-js/commit/bc63d0aeea86abbb4a144b2682b7070d7bdfe878))
|
||||||
|
|
||||||
|
## [1.40.6](https://github.com/standardnotes/syncing-server-js/compare/@standardnotes/syncing-server@1.40.5...@standardnotes/syncing-server@1.40.6) (2023-05-31)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/syncing-server
|
||||||
|
|
||||||
|
## [1.40.5](https://github.com/standardnotes/syncing-server-js/compare/@standardnotes/syncing-server@1.40.4...@standardnotes/syncing-server@1.40.5) (2023-05-31)
|
||||||
|
|
||||||
|
### Reverts
|
||||||
|
|
||||||
|
* Revert "Revert "feat: make home server components publishable (#617)"" ([13c85d4](https://github.com/standardnotes/syncing-server-js/commit/13c85d43318caa0fb53726f13ea581ba4a5f816b)), closes [#617](https://github.com/standardnotes/syncing-server-js/issues/617)
|
||||||
|
|
||||||
## [1.40.4](https://github.com/standardnotes/syncing-server-js/compare/@standardnotes/syncing-server@1.40.3...@standardnotes/syncing-server@1.40.4) (2023-05-31)
|
## [1.40.4](https://github.com/standardnotes/syncing-server-js/compare/@standardnotes/syncing-server@1.40.3...@standardnotes/syncing-server@1.40.4) (2023-05-31)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -1,16 +1,18 @@
|
|||||||
{
|
{
|
||||||
"name": "@standardnotes/syncing-server",
|
"name": "@standardnotes/syncing-server",
|
||||||
"version": "1.40.4",
|
"version": "1.41.2",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.0.0 <21.0.0"
|
"node": ">=18.0.0 <21.0.0"
|
||||||
},
|
},
|
||||||
"private": true,
|
|
||||||
"description": "Syncing Server",
|
"description": "Syncing Server",
|
||||||
"main": "dist/src/index.js",
|
"main": "dist/src/index.js",
|
||||||
"typings": "dist/src/index.d.ts",
|
"typings": "dist/src/index.d.ts",
|
||||||
"repository": "git@github.com:standardnotes/syncing-server-js.git",
|
"repository": "git@github.com:standardnotes/syncing-server-js.git",
|
||||||
"author": "Karol Sójko <karol@standardnotes.com>",
|
"author": "Karol Sójko <karol@standardnotes.com>",
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "public"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"clean": "rm -fr dist",
|
"clean": "rm -fr dist",
|
||||||
"setup:env": "cp .env.sample .env",
|
"setup:env": "cp .env.sample .env",
|
||||||
@@ -64,6 +66,7 @@
|
|||||||
"@types/jest": "^29.5.1",
|
"@types/jest": "^29.5.1",
|
||||||
"@types/jsonwebtoken": "^9.0.1",
|
"@types/jsonwebtoken": "^9.0.1",
|
||||||
"@types/newrelic": "^9.13.0",
|
"@types/newrelic": "^9.13.0",
|
||||||
|
"@types/node": "^20.2.5",
|
||||||
"@types/prettyjson": "^0.0.30",
|
"@types/prettyjson": "^0.0.30",
|
||||||
"@types/ua-parser-js": "^0.7.36",
|
"@types/ua-parser-js": "^0.7.36",
|
||||||
"@types/uuid": "^8.3.0",
|
"@types/uuid": "^8.3.0",
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ import { AuthHttpService } from '../Infra/HTTP/AuthHttpService'
|
|||||||
import { S3ItemBackupService } from '../Infra/S3/S3ItemBackupService'
|
import { S3ItemBackupService } from '../Infra/S3/S3ItemBackupService'
|
||||||
import { ControllerContainer, ControllerContainerInterface } from '@standardnotes/domain-core'
|
import { ControllerContainer, ControllerContainerInterface } from '@standardnotes/domain-core'
|
||||||
import { HomeServerItemsController } from '../Infra/InversifyExpressUtils/HomeServer/HomeServerItemsController'
|
import { HomeServerItemsController } from '../Infra/InversifyExpressUtils/HomeServer/HomeServerItemsController'
|
||||||
|
import { Transform } from 'stream'
|
||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||||
const newrelicFormatter = require('@newrelic/winston-enricher')
|
const newrelicFormatter = require('@newrelic/winston-enricher')
|
||||||
|
|
||||||
@@ -83,6 +84,7 @@ export class ContainerConfigLoader {
|
|||||||
async load(configuration?: {
|
async load(configuration?: {
|
||||||
controllerConatiner?: ControllerContainerInterface
|
controllerConatiner?: ControllerContainerInterface
|
||||||
directCallDomainEventPublisher?: DirectCallDomainEventPublisher
|
directCallDomainEventPublisher?: DirectCallDomainEventPublisher
|
||||||
|
logger?: Transform
|
||||||
}): Promise<Container> {
|
}): Promise<Container> {
|
||||||
const directCallDomainEventPublisher =
|
const directCallDomainEventPublisher =
|
||||||
configuration?.directCallDomainEventPublisher ?? new DirectCallDomainEventPublisher()
|
configuration?.directCallDomainEventPublisher ?? new DirectCallDomainEventPublisher()
|
||||||
@@ -100,24 +102,28 @@ export class ContainerConfigLoader {
|
|||||||
|
|
||||||
container.bind<Env>(TYPES.Sync_Env).toConstantValue(env)
|
container.bind<Env>(TYPES.Sync_Env).toConstantValue(env)
|
||||||
|
|
||||||
container.bind<winston.Logger>(TYPES.Sync_Logger).toDynamicValue((context: interfaces.Context) => {
|
if (configuration?.logger) {
|
||||||
const env: Env = context.container.get(TYPES.Sync_Env)
|
container.bind<winston.Logger>(TYPES.Sync_Logger).toConstantValue(configuration.logger as winston.Logger)
|
||||||
|
} else {
|
||||||
|
container.bind<winston.Logger>(TYPES.Sync_Logger).toDynamicValue((context: interfaces.Context) => {
|
||||||
|
const env: Env = context.container.get(TYPES.Sync_Env)
|
||||||
|
|
||||||
const newrelicWinstonFormatter = newrelicFormatter(winston)
|
const newrelicWinstonFormatter = newrelicFormatter(winston)
|
||||||
const winstonFormatters = [winston.format.splat(), winston.format.json()]
|
const winstonFormatters = [winston.format.splat(), winston.format.json()]
|
||||||
if (env.get('NEW_RELIC_ENABLED', true) === 'true') {
|
if (env.get('NEW_RELIC_ENABLED', true) === 'true') {
|
||||||
winstonFormatters.push(newrelicWinstonFormatter())
|
winstonFormatters.push(newrelicWinstonFormatter())
|
||||||
}
|
}
|
||||||
|
|
||||||
const logger = winston.createLogger({
|
const logger = winston.createLogger({
|
||||||
level: env.get('LOG_LEVEL') || 'info',
|
level: env.get('LOG_LEVEL') || 'info',
|
||||||
format: winston.format.combine(...winstonFormatters),
|
format: winston.format.combine(...winstonFormatters),
|
||||||
transports: [new winston.transports.Console({ level: env.get('LOG_LEVEL') || 'info' })],
|
transports: [new winston.transports.Console({ level: env.get('LOG_LEVEL') || 'info' })],
|
||||||
defaultMeta: { service: 'syncing-server' },
|
defaultMeta: { service: 'syncing-server' },
|
||||||
|
})
|
||||||
|
|
||||||
|
return logger
|
||||||
})
|
})
|
||||||
|
}
|
||||||
return logger
|
|
||||||
})
|
|
||||||
|
|
||||||
if (isConfiguredForHomeServer) {
|
if (isConfiguredForHomeServer) {
|
||||||
container
|
container
|
||||||
|
|||||||
@@ -7,8 +7,11 @@ import {
|
|||||||
|
|
||||||
import { ContainerConfigLoader } from './Container'
|
import { ContainerConfigLoader } from './Container'
|
||||||
import { DirectCallDomainEventPublisher } from '@standardnotes/domain-events-infra'
|
import { DirectCallDomainEventPublisher } from '@standardnotes/domain-events-infra'
|
||||||
|
import { Transform } from 'stream'
|
||||||
|
|
||||||
export class Service implements ServiceInterface {
|
export class Service implements ServiceInterface {
|
||||||
|
private logger: Transform | undefined
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private serviceContainer: ServiceContainerInterface,
|
private serviceContainer: ServiceContainerInterface,
|
||||||
private controllerContainer: ControllerContainerInterface,
|
private controllerContainer: ControllerContainerInterface,
|
||||||
@@ -17,6 +20,10 @@ export class Service implements ServiceInterface {
|
|||||||
this.serviceContainer.register(this.getId(), this)
|
this.serviceContainer.register(this.getId(), this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setLogger(logger: Transform): void {
|
||||||
|
this.logger = logger
|
||||||
|
}
|
||||||
|
|
||||||
async handleRequest(request: never, response: never, endpointOrMethodIdentifier: string): Promise<unknown> {
|
async handleRequest(request: never, response: never, endpointOrMethodIdentifier: string): Promise<unknown> {
|
||||||
const method = this.controllerContainer.get(endpointOrMethodIdentifier)
|
const method = this.controllerContainer.get(endpointOrMethodIdentifier)
|
||||||
|
|
||||||
@@ -33,6 +40,7 @@ export class Service implements ServiceInterface {
|
|||||||
return config.load({
|
return config.load({
|
||||||
controllerConatiner: this.controllerContainer,
|
controllerConatiner: this.controllerContainer,
|
||||||
directCallDomainEventPublisher: this.directCallDomainEventPublisher,
|
directCallDomainEventPublisher: this.directCallDomainEventPublisher,
|
||||||
|
logger: this.logger,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,12 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.14.6](https://github.com/standardnotes/server/compare/@standardnotes/time@1.14.4...@standardnotes/time@1.14.6) (2023-06-01)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **time:** bump version ([4b40c59](https://github.com/standardnotes/server/commit/4b40c59e7e5935fbf5d5c94ad7dee1cbe3c183cb))
|
||||||
|
|
||||||
## [1.14.4](https://github.com/standardnotes/server/compare/@standardnotes/time@1.14.3...@standardnotes/time@1.14.4) (2023-05-09)
|
## [1.14.4](https://github.com/standardnotes/server/compare/@standardnotes/time@1.14.3...@standardnotes/time@1.14.4) (2023-05-09)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@standardnotes/time",
|
"name": "@standardnotes/time",
|
||||||
"version": "1.14.4",
|
"version": "1.14.6",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.0.0 <21.0.0"
|
"node": ">=18.0.0 <21.0.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,6 +3,18 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.8.4](https://github.com/standardnotes/server/compare/@standardnotes/websockets-server@1.8.3...@standardnotes/websockets-server@1.8.4) (2023-05-31)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/websockets-server
|
||||||
|
|
||||||
|
## [1.8.3](https://github.com/standardnotes/server/compare/@standardnotes/websockets-server@1.8.2...@standardnotes/websockets-server@1.8.3) (2023-05-31)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/websockets-server
|
||||||
|
|
||||||
|
## [1.8.2](https://github.com/standardnotes/server/compare/@standardnotes/websockets-server@1.8.1...@standardnotes/websockets-server@1.8.2) (2023-05-31)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @standardnotes/websockets-server
|
||||||
|
|
||||||
## [1.8.1](https://github.com/standardnotes/server/compare/@standardnotes/websockets-server@1.8.0...@standardnotes/websockets-server@1.8.1) (2023-05-30)
|
## [1.8.1](https://github.com/standardnotes/server/compare/@standardnotes/websockets-server@1.8.0...@standardnotes/websockets-server@1.8.1) (2023-05-30)
|
||||||
|
|
||||||
**Note:** Version bump only for package @standardnotes/websockets-server
|
**Note:** Version bump only for package @standardnotes/websockets-server
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@standardnotes/websockets-server",
|
"name": "@standardnotes/websockets-server",
|
||||||
"version": "1.8.1",
|
"version": "1.8.4",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.0.0 <21.0.0"
|
"node": ">=18.0.0 <21.0.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4281,6 +4281,7 @@ __metadata:
|
|||||||
"@types/jest": "npm:^29.5.1"
|
"@types/jest": "npm:^29.5.1"
|
||||||
"@types/jsonwebtoken": "npm:^9.0.1"
|
"@types/jsonwebtoken": "npm:^9.0.1"
|
||||||
"@types/newrelic": "npm:^9.13.0"
|
"@types/newrelic": "npm:^9.13.0"
|
||||||
|
"@types/node": "npm:^20.2.5"
|
||||||
"@types/prettyjson": "npm:^0.0.30"
|
"@types/prettyjson": "npm:^0.0.30"
|
||||||
"@typescript-eslint/eslint-plugin": "npm:^5.59.2"
|
"@typescript-eslint/eslint-plugin": "npm:^5.59.2"
|
||||||
"@typescript-eslint/parser": "npm:^5.59.2"
|
"@typescript-eslint/parser": "npm:^5.59.2"
|
||||||
@@ -4355,6 +4356,7 @@ __metadata:
|
|||||||
"@types/ioredis": "npm:^5.0.0"
|
"@types/ioredis": "npm:^5.0.0"
|
||||||
"@types/jest": "npm:^29.5.1"
|
"@types/jest": "npm:^29.5.1"
|
||||||
"@types/newrelic": "npm:^9.13.0"
|
"@types/newrelic": "npm:^9.13.0"
|
||||||
|
"@types/node": "npm:^20.2.5"
|
||||||
"@types/otplib": "npm:^10.0.0"
|
"@types/otplib": "npm:^10.0.0"
|
||||||
"@types/prettyjson": "npm:^0.0.30"
|
"@types/prettyjson": "npm:^0.0.30"
|
||||||
"@types/ua-parser-js": "npm:^0.7.36"
|
"@types/ua-parser-js": "npm:^0.7.36"
|
||||||
@@ -4414,6 +4416,7 @@ __metadata:
|
|||||||
resolution: "@standardnotes/domain-core@workspace:packages/domain-core"
|
resolution: "@standardnotes/domain-core@workspace:packages/domain-core"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/jest": "npm:^29.5.1"
|
"@types/jest": "npm:^29.5.1"
|
||||||
|
"@types/node": "npm:^20.2.5"
|
||||||
"@types/uuid": "npm:^8.3.0"
|
"@types/uuid": "npm:^8.3.0"
|
||||||
"@typescript-eslint/eslint-plugin": "npm:^5.59.2"
|
"@typescript-eslint/eslint-plugin": "npm:^5.59.2"
|
||||||
"@typescript-eslint/parser": "npm:^5.59.2"
|
"@typescript-eslint/parser": "npm:^5.59.2"
|
||||||
@@ -4549,6 +4552,7 @@ __metadata:
|
|||||||
"@types/jest": "npm:^29.5.1"
|
"@types/jest": "npm:^29.5.1"
|
||||||
"@types/jsonwebtoken": "npm:^9.0.1"
|
"@types/jsonwebtoken": "npm:^9.0.1"
|
||||||
"@types/newrelic": "npm:^9.13.0"
|
"@types/newrelic": "npm:^9.13.0"
|
||||||
|
"@types/node": "npm:^20.2.5"
|
||||||
"@types/prettyjson": "npm:^0.0.30"
|
"@types/prettyjson": "npm:^0.0.30"
|
||||||
"@types/uuid": "npm:^8.3.0"
|
"@types/uuid": "npm:^8.3.0"
|
||||||
"@typescript-eslint/eslint-plugin": "npm:^5.59.2"
|
"@typescript-eslint/eslint-plugin": "npm:^5.59.2"
|
||||||
@@ -4675,6 +4679,7 @@ __metadata:
|
|||||||
"@types/express": "npm:^4.17.14"
|
"@types/express": "npm:^4.17.14"
|
||||||
"@types/jest": "npm:^29.5.1"
|
"@types/jest": "npm:^29.5.1"
|
||||||
"@types/newrelic": "npm:^9.13.0"
|
"@types/newrelic": "npm:^9.13.0"
|
||||||
|
"@types/node": "npm:^20.2.5"
|
||||||
"@typescript-eslint/eslint-plugin": "npm:^5.59.2"
|
"@typescript-eslint/eslint-plugin": "npm:^5.59.2"
|
||||||
"@typescript-eslint/parser": "npm:^5.59.2"
|
"@typescript-eslint/parser": "npm:^5.59.2"
|
||||||
cors: "npm:2.8.5"
|
cors: "npm:2.8.5"
|
||||||
@@ -4850,6 +4855,7 @@ __metadata:
|
|||||||
"@types/jest": "npm:^29.5.1"
|
"@types/jest": "npm:^29.5.1"
|
||||||
"@types/jsonwebtoken": "npm:^9.0.1"
|
"@types/jsonwebtoken": "npm:^9.0.1"
|
||||||
"@types/newrelic": "npm:^9.13.0"
|
"@types/newrelic": "npm:^9.13.0"
|
||||||
|
"@types/node": "npm:^20.2.5"
|
||||||
"@types/prettyjson": "npm:^0.0.30"
|
"@types/prettyjson": "npm:^0.0.30"
|
||||||
"@types/ua-parser-js": "npm:^0.7.36"
|
"@types/ua-parser-js": "npm:^0.7.36"
|
||||||
"@types/uuid": "npm:^8.3.0"
|
"@types/uuid": "npm:^8.3.0"
|
||||||
@@ -5343,7 +5349,7 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@types/node@npm:^20.2.0":
|
"@types/node@npm:^20.2.0, @types/node@npm:^20.2.5":
|
||||||
version: 20.2.5
|
version: 20.2.5
|
||||||
resolution: "@types/node@npm:20.2.5"
|
resolution: "@types/node@npm:20.2.5"
|
||||||
checksum: 55e4f8d08e3c225e48e012e04458d6c1db5af6e4991e3abb003b82d3f10018a14742c0512b27991cb02e54768be560ea1fe4c17208e04273247132c9eb07499a
|
checksum: 55e4f8d08e3c225e48e012e04458d6c1db5af6e4991e3abb003b82d3f10018a14742c0512b27991cb02e54768be560ea1fe4c17208e04273247132c9eb07499a
|
||||||
|
|||||||
Reference in New Issue
Block a user