Compare commits

..

10 Commits

Author SHA1 Message Date
standardci
033bc25d8f chore(release): publish new version
- @standardnotes/api-gateway@1.7.4
 - @standardnotes/auth-server@1.13.1
 - @standardnotes/scheduler-server@1.10.4
 - @standardnotes/syncing-server@1.6.34
2022-07-29 09:40:04 +00:00
Karol Sójko
31bd253a73 chore(deps): fix newrelic winston enricher initialization 2022-07-29 11:38:03 +02:00
standardci
2f4977be63 chore(release): publish new version
- @standardnotes/auth-server@1.13.0
2022-07-29 07:09:52 +00:00
Karol Sójko
35f931a708 feat(auth): remove crypto-random-string in favour of @standardnotes/sncrypto-node 2022-07-29 09:08:22 +02:00
standardci
3e23d8d5d5 chore(release): publish new version
- @standardnotes/api-gateway@1.7.3
 - @standardnotes/auth-server@1.12.2
 - @standardnotes/scheduler-server@1.10.3
 - @standardnotes/syncing-server@1.6.33
2022-07-29 06:35:21 +00:00
Karol Sójko
004de0a655 chore(deps): upgrade @newrelic/winston-enricher 2022-07-29 08:33:29 +02:00
standardci
47a1af4be1 chore(release): publish new version
- @standardnotes/scheduler-server@1.10.2
2022-07-29 06:30:08 +00:00
Karol Sójko
7b17c4caa8 chore(deps): upgrade inversify 2022-07-29 08:27:57 +02:00
standardci
fa29885b3f chore(release): publish new version
- @standardnotes/api-gateway@1.7.2
 - @standardnotes/files-server@1.5.30
 - @standardnotes/syncing-server@1.6.32
2022-07-27 11:40:47 +00:00
Karol Sójko
beece69f9e chore(deps): upgrade helmet 2022-07-27 13:39:19 +02:00
29 changed files with 129 additions and 130 deletions

72
.pnp.cjs generated
View File

@@ -1868,27 +1868,23 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
}]\
]],\
["@newrelic/winston-enricher", [\
["npm:2.1.2", {\
"packageLocation": "./.yarn/cache/@newrelic-winston-enricher-npm-2.1.2-732878a1b2-d001c13166.zip/node_modules/@newrelic/winston-enricher/",\
["npm:4.0.0", {\
"packageLocation": "./.yarn/cache/@newrelic-winston-enricher-npm-4.0.0-ebaf2d0d28-f737e7d952.zip/node_modules/@newrelic/winston-enricher/",\
"packageDependencies": [\
["@newrelic/winston-enricher", "npm:2.1.2"]\
["@newrelic/winston-enricher", "npm:4.0.0"]\
],\
"linkType": "SOFT"\
}],\
["virtual:04783e12400851b8a3d76e71495851cc94959db6e62f04cb0a31190080629440b182d8c8eb4d7f2b04e281912f2783a5fd4d2c3c6ab68d38b7097246c93f4c19#npm:2.1.2", {\
"packageLocation": "./.yarn/__virtual__/@newrelic-winston-enricher-virtual-193127fbcd/0/cache/@newrelic-winston-enricher-npm-2.1.2-732878a1b2-d001c13166.zip/node_modules/@newrelic/winston-enricher/",\
["virtual:04783e12400851b8a3d76e71495851cc94959db6e62f04cb0a31190080629440b182d8c8eb4d7f2b04e281912f2783a5fd4d2c3c6ab68d38b7097246c93f4c19#npm:4.0.0", {\
"packageLocation": "./.yarn/__virtual__/@newrelic-winston-enricher-virtual-766a341e22/0/cache/@newrelic-winston-enricher-npm-4.0.0-ebaf2d0d28-f737e7d952.zip/node_modules/@newrelic/winston-enricher/",\
"packageDependencies": [\
["@newrelic/winston-enricher", "virtual:04783e12400851b8a3d76e71495851cc94959db6e62f04cb0a31190080629440b182d8c8eb4d7f2b04e281912f2783a5fd4d2c3c6ab68d38b7097246c93f4c19#npm:2.1.2"],\
["@newrelic/winston-enricher", "virtual:04783e12400851b8a3d76e71495851cc94959db6e62f04cb0a31190080629440b182d8c8eb4d7f2b04e281912f2783a5fd4d2c3c6ab68d38b7097246c93f4c19#npm:4.0.0"],\
["@types/newrelic", "npm:7.0.3"],\
["@types/winston", null],\
["newrelic", "npm:8.14.1"],\
["winston", "npm:3.8.1"]\
["newrelic", "npm:8.14.1"]\
],\
"packagePeers": [\
"@types/newrelic",\
"@types/winston",\
"newrelic",\
"winston"\
"newrelic"\
],\
"linkType": "HARD"\
}]\
@@ -2508,7 +2504,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"packageLocation": "./packages/api-gateway/",\
"packageDependencies": [\
["@standardnotes/api-gateway", "workspace:packages/api-gateway"],\
["@newrelic/winston-enricher", "virtual:04783e12400851b8a3d76e71495851cc94959db6e62f04cb0a31190080629440b182d8c8eb4d7f2b04e281912f2783a5fd4d2c3c6ab68d38b7097246c93f4c19#npm:2.1.2"],\
["@newrelic/winston-enricher", "virtual:04783e12400851b8a3d76e71495851cc94959db6e62f04cb0a31190080629440b182d8c8eb4d7f2b04e281912f2783a5fd4d2c3c6ab68d38b7097246c93f4c19#npm:4.0.0"],\
["@sentry/node", "npm:7.5.0"],\
["@standardnotes/analytics", "workspace:packages/analytics"],\
["@standardnotes/domain-events", "workspace:packages/domain-events"],\
@@ -2530,7 +2526,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
["eslint", "npm:8.19.0"],\
["eslint-plugin-prettier", "virtual:04783e12400851b8a3d76e71495851cc94959db6e62f04cb0a31190080629440b182d8c8eb4d7f2b04e281912f2783a5fd4d2c3c6ab68d38b7097246c93f4c19#npm:4.2.1"],\
["express", "npm:4.18.1"],\
["helmet", "npm:4.4.1"],\
["helmet", "npm:5.1.1"],\
["inversify", "npm:6.0.1"],\
["inversify-express-utils", "npm:6.4.3"],\
["ioredis", "npm:5.2.0"],\
@@ -2563,7 +2559,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"packageLocation": "./packages/auth/",\
"packageDependencies": [\
["@standardnotes/auth-server", "workspace:packages/auth"],\
["@newrelic/winston-enricher", "virtual:04783e12400851b8a3d76e71495851cc94959db6e62f04cb0a31190080629440b182d8c8eb4d7f2b04e281912f2783a5fd4d2c3c6ab68d38b7097246c93f4c19#npm:2.1.2"],\
["@newrelic/winston-enricher", "virtual:04783e12400851b8a3d76e71495851cc94959db6e62f04cb0a31190080629440b182d8c8eb4d7f2b04e281912f2783a5fd4d2c3c6ab68d38b7097246c93f4c19#npm:4.0.0"],\
["@sentry/node", "npm:7.5.0"],\
["@standardnotes/analytics", "workspace:packages/analytics"],\
["@standardnotes/api", "npm:1.1.19"],\
@@ -2593,7 +2589,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
["axios", "npm:0.27.2"],\
["bcryptjs", "npm:2.4.3"],\
["cors", "npm:2.8.5"],\
["crypto-random-string", "npm:3.3.0"],\
["dayjs", "npm:1.11.3"],\
["dotenv", "npm:16.0.1"],\
["eslint", "npm:8.19.0"],\
@@ -2782,7 +2777,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
["eslint-plugin-prettier", "virtual:04783e12400851b8a3d76e71495851cc94959db6e62f04cb0a31190080629440b182d8c8eb4d7f2b04e281912f2783a5fd4d2c3c6ab68d38b7097246c93f4c19#npm:4.2.1"],\
["express", "npm:4.18.1"],\
["express-winston", "virtual:b442cf0427cc365d1c137f7340f9b81f9b204561afe791a8564ae9590c3a7fc4b5f793aaf8817b946f75a3cb64d03ef8790eb847f8b576b41e700da7b00c240c#npm:4.2.0"],\
["helmet", "npm:4.6.0"],\
["helmet", "npm:5.1.1"],\
["inversify", "npm:6.0.1"],\
["inversify-express-utils", "npm:6.4.3"],\
["ioredis", "npm:5.2.0"],\
@@ -2861,7 +2856,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"packageLocation": "./packages/scheduler/",\
"packageDependencies": [\
["@standardnotes/scheduler-server", "workspace:packages/scheduler"],\
["@newrelic/winston-enricher", "virtual:04783e12400851b8a3d76e71495851cc94959db6e62f04cb0a31190080629440b182d8c8eb4d7f2b04e281912f2783a5fd4d2c3c6ab68d38b7097246c93f4c19#npm:2.1.2"],\
["@newrelic/winston-enricher", "virtual:04783e12400851b8a3d76e71495851cc94959db6e62f04cb0a31190080629440b182d8c8eb4d7f2b04e281912f2783a5fd4d2c3c6ab68d38b7097246c93f4c19#npm:4.0.0"],\
["@sentry/node", "npm:7.5.0"],\
["@standardnotes/common", "workspace:packages/common"],\
["@standardnotes/domain-events", "workspace:packages/domain-events"],\
@@ -2877,7 +2872,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
["dayjs", "npm:1.11.3"],\
["dotenv", "npm:16.0.1"],\
["eslint-plugin-prettier", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:4.2.1"],\
["inversify", "npm:5.0.5"],\
["inversify", "npm:6.0.1"],\
["ioredis", "npm:5.2.0"],\
["jest", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:28.1.2"],\
["mysql2", "npm:2.3.3"],\
@@ -2996,7 +2991,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"packageLocation": "./packages/syncing-server/",\
"packageDependencies": [\
["@standardnotes/syncing-server", "workspace:packages/syncing-server"],\
["@newrelic/winston-enricher", "virtual:04783e12400851b8a3d76e71495851cc94959db6e62f04cb0a31190080629440b182d8c8eb4d7f2b04e281912f2783a5fd4d2c3c6ab68d38b7097246c93f4c19#npm:2.1.2"],\
["@newrelic/winston-enricher", "virtual:04783e12400851b8a3d76e71495851cc94959db6e62f04cb0a31190080629440b182d8c8eb4d7f2b04e281912f2783a5fd4d2c3c6ab68d38b7097246c93f4c19#npm:4.0.0"],\
["@sentry/node", "npm:7.5.0"],\
["@standardnotes/analytics", "workspace:packages/analytics"],\
["@standardnotes/common", "workspace:packages/common"],\
@@ -3026,7 +3021,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
["eslint", "npm:8.19.0"],\
["eslint-plugin-prettier", "virtual:04783e12400851b8a3d76e71495851cc94959db6e62f04cb0a31190080629440b182d8c8eb4d7f2b04e281912f2783a5fd4d2c3c6ab68d38b7097246c93f4c19#npm:4.2.1"],\
["express", "npm:4.18.1"],\
["helmet", "npm:4.3.1"],\
["helmet", "npm:5.1.1"],\
["inversify", "npm:6.0.1"],\
["inversify-express-utils", "npm:6.4.3"],\
["ioredis", "npm:5.2.0"],\
@@ -5513,14 +5508,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
}]\
]],\
["crypto-random-string", [\
["npm:3.3.0", {\
"packageLocation": "./.yarn/cache/crypto-random-string-npm-3.3.0-4f73472f10-deff986631.zip/node_modules/crypto-random-string/",\
"packageDependencies": [\
["crypto-random-string", "npm:3.3.0"],\
["type-fest", "npm:0.8.1"]\
],\
"linkType": "HARD"\
}],\
["npm:4.0.0", {\
"packageLocation": "./.yarn/cache/crypto-random-string-npm-4.0.0-b9f0f76168-91f148f27b.zip/node_modules/crypto-random-string/",\
"packageDependencies": [\
@@ -7233,24 +7220,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
}]\
]],\
["helmet", [\
["npm:4.3.1", {\
"packageLocation": "./.yarn/cache/helmet-npm-4.3.1-22cd4b53d2-47f59d8b99.zip/node_modules/helmet/",\
["npm:5.1.1", {\
"packageLocation": "./.yarn/cache/helmet-npm-5.1.1-d12265628c-b72ba26cc4.zip/node_modules/helmet/",\
"packageDependencies": [\
["helmet", "npm:4.3.1"]\
],\
"linkType": "HARD"\
}],\
["npm:4.4.1", {\
"packageLocation": "./.yarn/cache/helmet-npm-4.4.1-286ac392ee-cfe385e185.zip/node_modules/helmet/",\
"packageDependencies": [\
["helmet", "npm:4.4.1"]\
],\
"linkType": "HARD"\
}],\
["npm:4.6.0", {\
"packageLocation": "./.yarn/cache/helmet-npm-4.6.0-f244fd965c-139ad678d1.zip/node_modules/helmet/",\
"packageDependencies": [\
["helmet", "npm:4.6.0"]\
["helmet", "npm:5.1.1"]\
],\
"linkType": "HARD"\
}]\
@@ -7578,13 +7551,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
}]\
]],\
["inversify", [\
["npm:5.0.5", {\
"packageLocation": "./.yarn/cache/inversify-npm-5.0.5-4d1f1420a9-a4bf1a6a62.zip/node_modules/inversify/",\
"packageDependencies": [\
["inversify", "npm:5.0.5"]\
],\
"linkType": "HARD"\
}],\
["npm:6.0.1", {\
"packageLocation": "./.yarn/cache/inversify-npm-6.0.1-39ef6784da-b6c9b56ef7.zip/node_modules/inversify/",\
"packageDependencies": [\

Binary file not shown.

View File

@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.7.4](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.7.3...@standardnotes/api-gateway@1.7.4) (2022-07-29)
**Note:** Version bump only for package @standardnotes/api-gateway
## [1.7.3](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.7.2...@standardnotes/api-gateway@1.7.3) (2022-07-29)
**Note:** Version bump only for package @standardnotes/api-gateway
## [1.7.2](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.7.1...@standardnotes/api-gateway@1.7.2) (2022-07-27)
**Note:** Version bump only for package @standardnotes/api-gateway
## [1.7.1](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.7.0...@standardnotes/api-gateway@1.7.1) (2022-07-27)
**Note:** Version bump only for package @standardnotes/api-gateway

View File

@@ -23,7 +23,7 @@ import '../src/Controller/v1/SubscriptionInvitesController'
import '../src/Controller/v2/PaymentsControllerV2'
import '../src/Controller/v2/ActionsControllerV2'
import * as helmet from 'helmet'
import helmet from 'helmet'
import * as cors from 'cors'
import { text, json, Request, Response, NextFunction, RequestHandler, ErrorRequestHandler } from 'express'
import * as winston from 'winston'

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/api-gateway",
"version": "1.7.1",
"version": "1.7.4",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -22,7 +22,7 @@
"upgrade:snjs": "yarn ncu -u '@standardnotes/*'"
},
"dependencies": {
"@newrelic/winston-enricher": "^2.1.0",
"@newrelic/winston-enricher": "^4.0.0",
"@sentry/node": "^7.3.0",
"@standardnotes/analytics": "workspace:*",
"@standardnotes/domain-events": "workspace:*",
@@ -34,7 +34,7 @@
"cors": "2.8.5",
"dotenv": "^16.0.1",
"express": "^4.18.1",
"helmet": "4.4.1",
"helmet": "^5.1.1",
"inversify": "^6.0.1",
"inversify-express-utils": "^6.4.3",
"ioredis": "^5.2.0",

View File

@@ -24,7 +24,7 @@ import { CrossServiceTokenCacheInterface } from '../Service/Cache/CrossServiceTo
import { RedisCrossServiceTokenCache } from '../Infra/Redis/RedisCrossServiceTokenCache'
// eslint-disable-next-line @typescript-eslint/no-var-requires
const newrelicWinstonEnricher = require('@newrelic/winston-enricher')
const newrelicFormatter = require('@newrelic/winston-enricher')
export class ContainerConfigLoader {
async load(): Promise<Container> {
@@ -33,9 +33,10 @@ export class ContainerConfigLoader {
const container = new Container()
const newrelicWinstonFormatter = newrelicFormatter(winston)
const winstonFormatters = [winston.format.splat(), winston.format.json()]
if (env.get('NEW_RELIC_ENABLED', true) === 'true') {
winstonFormatters.push(newrelicWinstonEnricher())
winstonFormatters.push(newrelicWinstonFormatter())
}
const logger = winston.createLogger({

View File

@@ -3,6 +3,20 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.13.1](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.13.0...@standardnotes/auth-server@1.13.1) (2022-07-29)
**Note:** Version bump only for package @standardnotes/auth-server
# [1.13.0](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.12.2...@standardnotes/auth-server@1.13.0) (2022-07-29)
### Features
* **auth:** remove crypto-random-string in favour of @standardnotes/sncrypto-node ([35f931a](https://github.com/standardnotes/server/commit/35f931a708c7fead65fd40a9b4214a223831a5dc))
## [1.12.2](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.12.1...@standardnotes/auth-server@1.12.2) (2022-07-29)
**Note:** Version bump only for package @standardnotes/auth-server
## [1.12.1](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.12.0...@standardnotes/auth-server@1.12.1) (2022-07-27)
**Note:** Version bump only for package @standardnotes/auth-server

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/auth-server",
"version": "1.12.1",
"version": "1.13.1",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -30,7 +30,7 @@
"upgrade:snjs": "yarn ncu -u '@standardnotes/*'"
},
"dependencies": {
"@newrelic/winston-enricher": "^2.1.0",
"@newrelic/winston-enricher": "^4.0.0",
"@sentry/node": "^7.3.0",
"@standardnotes/analytics": "workspace:*",
"@standardnotes/api": "^1.1.19",
@@ -49,7 +49,6 @@
"axios": "^0.27.2",
"bcryptjs": "2.4.3",
"cors": "2.8.5",
"crypto-random-string": "3.3.0",
"dayjs": "^1.11.3",
"dotenv": "^16.0.1",
"express": "^4.18.1",

View File

@@ -193,7 +193,7 @@ import { PredicateVerificationRequestedEventHandler } from '../Domain/Handler/Pr
import { MuteMarketingEmails } from '../Domain/UseCase/MuteMarketingEmails/MuteMarketingEmails'
// eslint-disable-next-line @typescript-eslint/no-var-requires
const newrelicWinstonEnricher = require('@newrelic/winston-enricher')
const newrelicFormatter = require('@newrelic/winston-enricher')
export class ContainerConfigLoader {
async load(): Promise<Container> {
@@ -215,9 +215,10 @@ export class ContainerConfigLoader {
container.bind(TYPES.Redis).toConstantValue(redis)
const newrelicWinstonFormatter = newrelicFormatter(winston)
const winstonFormatters = [winston.format.splat(), winston.format.json()]
if (env.get('NEW_RELIC_ENABLED', true) === 'true') {
winstonFormatters.push(newrelicWinstonEnricher())
winstonFormatters.push(newrelicWinstonFormatter())
}
const logger = winston.createLogger({

View File

@@ -13,6 +13,7 @@ import { RevokedSession } from './RevokedSession'
import { SettingServiceInterface } from '../Setting/SettingServiceInterface'
import { LogSessionUserAgentOption } from '@standardnotes/settings'
import { Setting } from '../Setting/Setting'
import { CryptoNode } from '@standardnotes/sncrypto-node'
describe('SessionService', () => {
let sessionRepository: SessionRepositoryInterface
@@ -25,6 +26,7 @@ describe('SessionService', () => {
let deviceDetector: UAParser
let timer: TimerInterface
let logger: winston.Logger
let cryptoNode: CryptoNode
const createService = () =>
new SessionService(
@@ -37,6 +39,7 @@ describe('SessionService', () => {
123,
234,
settingService,
cryptoNode,
)
beforeEach(() => {
@@ -96,6 +99,10 @@ describe('SessionService', () => {
logger.warn = jest.fn()
logger.error = jest.fn()
logger.debug = jest.fn()
cryptoNode = {} as jest.Mocked<CryptoNode>
cryptoNode.generateRandomKey = jest.fn().mockReturnValue('foo bar')
cryptoNode.base64URLEncode = jest.fn().mockReturnValue('foobar')
})
it('should mark a revoked session as received', async () => {

View File

@@ -1,7 +1,6 @@
import * as crypto from 'crypto'
import * as winston from 'winston'
import * as dayjs from 'dayjs'
import * as cryptoRandomString from 'crypto-random-string'
import { UAParser } from 'ua-parser-js'
import { inject, injectable } from 'inversify'
import { v4 as uuidv4 } from 'uuid'
@@ -20,6 +19,7 @@ import { SettingServiceInterface } from '../Setting/SettingServiceInterface'
import { LogSessionUserAgentOption, SettingName } from '@standardnotes/settings'
import { SessionBody } from '@standardnotes/responses'
import { Uuid } from '@standardnotes/common'
import { CryptoNode } from '@standardnotes/sncrypto-node'
@injectable()
export class SessionService implements SessionServiceInterface {
@@ -35,6 +35,7 @@ export class SessionService implements SessionServiceInterface {
@inject(TYPES.ACCESS_TOKEN_AGE) private accessTokenAge: number,
@inject(TYPES.REFRESH_TOKEN_AGE) private refreshTokenAge: number,
@inject(TYPES.SettingService) private settingService: SettingServiceInterface,
@inject(TYPES.CryptoNode) private cryptoNode: CryptoNode,
) {}
async createNewSessionForUser(dto: {
@@ -263,8 +264,8 @@ export class SessionService implements SessionServiceInterface {
}
private async createTokens(session: Session): Promise<SessionBody> {
const accessToken = cryptoRandomString({ length: 16, type: 'url-safe' })
const refreshToken = cryptoRandomString({ length: 16, type: 'url-safe' })
const accessToken = this.cryptoNode.base64URLEncode(await this.cryptoNode.generateRandomKey(48))
const refreshToken = this.cryptoNode.base64URLEncode(await this.cryptoNode.generateRandomKey(48))
const hashedAccessToken = crypto.createHash('sha256').update(accessToken).digest('hex')
const hashedRefreshToken = crypto.createHash('sha256').update(refreshToken).digest('hex')

View File

@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.5.30](https://github.com/standardnotes/files/compare/@standardnotes/files-server@1.5.29...@standardnotes/files-server@1.5.30) (2022-07-27)
**Note:** Version bump only for package @standardnotes/files-server
## [1.5.29](https://github.com/standardnotes/files/compare/@standardnotes/files-server@1.5.28...@standardnotes/files-server@1.5.29) (2022-07-27)
**Note:** Version bump only for package @standardnotes/files-server

View File

@@ -8,7 +8,7 @@ import * as busboy from 'connect-busboy'
import '../src/Controller/HealthCheckController'
import '../src/Controller/FilesController'
import * as helmet from 'helmet'
import helmet from 'helmet'
import * as cors from 'cors'
import { urlencoded, json, raw, Request, Response, NextFunction, RequestHandler, ErrorRequestHandler } from 'express'
import * as winston from 'winston'

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/files-server",
"version": "1.5.29",
"version": "1.5.30",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -41,7 +41,7 @@
"dotenv": "^16.0.1",
"express": "^4.18.1",
"express-winston": "^4.0.5",
"helmet": "^4.3.1",
"helmet": "^5.1.1",
"inversify": "^6.0.1",
"inversify-express-utils": "^6.4.3",
"ioredis": "^5.2.0",

View File

@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.10.4](https://github.com/standardnotes/server/compare/@standardnotes/scheduler-server@1.10.3...@standardnotes/scheduler-server@1.10.4) (2022-07-29)
**Note:** Version bump only for package @standardnotes/scheduler-server
## [1.10.3](https://github.com/standardnotes/server/compare/@standardnotes/scheduler-server@1.10.2...@standardnotes/scheduler-server@1.10.3) (2022-07-29)
**Note:** Version bump only for package @standardnotes/scheduler-server
## [1.10.2](https://github.com/standardnotes/server/compare/@standardnotes/scheduler-server@1.10.1...@standardnotes/scheduler-server@1.10.2) (2022-07-29)
**Note:** Version bump only for package @standardnotes/scheduler-server
## [1.10.1](https://github.com/standardnotes/server/compare/@standardnotes/scheduler-server@1.10.0...@standardnotes/scheduler-server@1.10.1) (2022-07-27)
**Note:** Version bump only for package @standardnotes/scheduler-server

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/scheduler-server",
"version": "1.10.1",
"version": "1.10.4",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -24,7 +24,7 @@
"upgrade:snjs": "yarn ncu -u '@standardnotes/*'"
},
"dependencies": {
"@newrelic/winston-enricher": "^2.1.0",
"@newrelic/winston-enricher": "^4.0.0",
"@sentry/node": "^7.3.0",
"@standardnotes/common": "workspace:*",
"@standardnotes/domain-events": "workspace:*",
@@ -34,7 +34,7 @@
"aws-sdk": "^2.1158.0",
"dayjs": "^1.11.3",
"dotenv": "^16.0.1",
"inversify": "5.0.5",
"inversify": "^6.0.1",
"ioredis": "^5.2.0",
"mysql2": "^2.3.3",
"newrelic": "^8.14.1",

View File

@@ -38,7 +38,7 @@ import { UserRegisteredEventHandler } from '../Domain/Handler/UserRegisteredEven
import { SubscriptionCancelledEventHandler } from '../Domain/Handler/SubscriptionCancelledEventHandler'
// eslint-disable-next-line @typescript-eslint/no-var-requires
const newrelicWinstonEnricher = require('@newrelic/winston-enricher')
const newrelicFormatter = require('@newrelic/winston-enricher')
export class ContainerConfigLoader {
async load(): Promise<Container> {
@@ -60,9 +60,10 @@ export class ContainerConfigLoader {
container.bind(TYPES.Redis).toConstantValue(redis)
const newrelicWinstonFormatter = newrelicFormatter(winston)
const winstonFormatters = [winston.format.splat(), winston.format.json()]
if (env.get('NEW_RELIC_ENABLED', true) === 'true') {
winstonFormatters.push(newrelicWinstonEnricher())
winstonFormatters.push(newrelicWinstonFormatter())
}
const logger = winston.createLogger({

View File

@@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.6.34](https://github.com/standardnotes/syncing-server-js/compare/@standardnotes/syncing-server@1.6.33...@standardnotes/syncing-server@1.6.34) (2022-07-29)
**Note:** Version bump only for package @standardnotes/syncing-server
## [1.6.33](https://github.com/standardnotes/syncing-server-js/compare/@standardnotes/syncing-server@1.6.32...@standardnotes/syncing-server@1.6.33) (2022-07-29)
**Note:** Version bump only for package @standardnotes/syncing-server
## [1.6.32](https://github.com/standardnotes/syncing-server-js/compare/@standardnotes/syncing-server@1.6.31...@standardnotes/syncing-server@1.6.32) (2022-07-27)
**Note:** Version bump only for package @standardnotes/syncing-server
## [1.6.31](https://github.com/standardnotes/syncing-server-js/compare/@standardnotes/syncing-server@1.6.30...@standardnotes/syncing-server@1.6.31) (2022-07-27)
**Note:** Version bump only for package @standardnotes/syncing-server

View File

@@ -8,7 +8,7 @@ import '../src/Controller/HealthCheckController'
import '../src/Controller/RevisionsController'
import '../src/Controller/ItemsController'
import * as helmet from 'helmet'
import helmet from 'helmet'
import * as cors from 'cors'
import { urlencoded, json, Request, Response, NextFunction, RequestHandler, ErrorRequestHandler } from 'express'
import * as winston from 'winston'

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/syncing-server",
"version": "1.6.31",
"version": "1.6.34",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -24,7 +24,7 @@
"upgrade:snjs": "yarn ncu -u '@standardnotes/*'"
},
"dependencies": {
"@newrelic/winston-enricher": "^2.1.0",
"@newrelic/winston-enricher": "^4.0.0",
"@sentry/node": "^7.3.0",
"@standardnotes/analytics": "workspace:*",
"@standardnotes/common": "workspace:*",
@@ -40,7 +40,7 @@
"cors": "2.8.5",
"dotenv": "^16.0.1",
"express": "^4.18.1",
"helmet": "4.3.1",
"helmet": "^5.1.1",
"inversify": "^6.0.1",
"inversify-express-utils": "^6.4.3",
"ioredis": "^5.2.0",

View File

@@ -86,7 +86,7 @@ import { ItemRepositoryInterface } from '../Domain/Item/ItemRepositoryInterface'
import { Repository } from 'typeorm'
// eslint-disable-next-line @typescript-eslint/no-var-requires
const newrelicWinstonEnricher = require('@newrelic/winston-enricher')
const newrelicFormatter = require('@newrelic/winston-enricher')
export class ContainerConfigLoader {
private readonly DEFAULT_CONTENT_SIZE_TRANSFER_LIMIT = 10_000_000
@@ -110,9 +110,10 @@ export class ContainerConfigLoader {
container.bind(TYPES.Redis).toConstantValue(redis)
const newrelicWinstonFormatter = newrelicFormatter(winston)
const winstonFormatters = [winston.format.splat(), winston.format.json()]
if (env.get('NEW_RELIC_ENABLED', true) === 'true') {
winstonFormatters.push(newrelicWinstonEnricher())
winstonFormatters.push(newrelicWinstonFormatter())
}
const logger = winston.createLogger({

View File

@@ -1260,13 +1260,12 @@ __metadata:
languageName: node
linkType: hard
"@newrelic/winston-enricher@npm:^2.1.0":
version: 2.1.2
resolution: "@newrelic/winston-enricher@npm:2.1.2"
"@newrelic/winston-enricher@npm:^4.0.0":
version: 4.0.0
resolution: "@newrelic/winston-enricher@npm:4.0.0"
peerDependencies:
newrelic: ">=6.2.0"
winston: ^3.0.0
checksum: d001c131665470be698912accf3782b1b2871f5f2f0711527d423b47e967912ebe873da99f3cdfb0d367c62ac90aab87f448ac5ce89bae9a91a36d049b024003
newrelic: ">=8.13.0"
checksum: f737e7d9528b69ab771d0dd7d2262400291de60791767e09d477f700f1221df734a3f6a13b8907b909b4c190ccf20d4d3380d691f378422e789a2b448ab4fc7c
languageName: node
linkType: hard
@@ -1767,7 +1766,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@standardnotes/api-gateway@workspace:packages/api-gateway"
dependencies:
"@newrelic/winston-enricher": ^2.1.0
"@newrelic/winston-enricher": ^4.0.0
"@sentry/node": ^7.3.0
"@standardnotes/analytics": "workspace:*"
"@standardnotes/domain-events": "workspace:*"
@@ -1789,7 +1788,7 @@ __metadata:
eslint: ^8.14.0
eslint-plugin-prettier: ^4.0.0
express: ^4.18.1
helmet: 4.4.1
helmet: ^5.1.1
inversify: ^6.0.1
inversify-express-utils: ^6.4.3
ioredis: ^5.2.0
@@ -1823,7 +1822,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@standardnotes/auth-server@workspace:packages/auth"
dependencies:
"@newrelic/winston-enricher": ^2.1.0
"@newrelic/winston-enricher": ^4.0.0
"@sentry/node": ^7.3.0
"@standardnotes/analytics": "workspace:*"
"@standardnotes/api": ^1.1.19
@@ -1853,7 +1852,6 @@ __metadata:
axios: ^0.27.2
bcryptjs: 2.4.3
cors: 2.8.5
crypto-random-string: 3.3.0
dayjs: ^1.11.3
dotenv: ^16.0.1
eslint: ^8.14.0
@@ -2039,7 +2037,7 @@ __metadata:
eslint-plugin-prettier: ^4.0.0
express: ^4.18.1
express-winston: ^4.0.5
helmet: ^4.3.1
helmet: ^5.1.1
inversify: ^6.0.1
inversify-express-utils: ^6.4.3
ioredis: ^5.2.0
@@ -2111,7 +2109,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@standardnotes/scheduler-server@workspace:packages/scheduler"
dependencies:
"@newrelic/winston-enricher": ^2.1.0
"@newrelic/winston-enricher": ^4.0.0
"@sentry/node": ^7.3.0
"@standardnotes/common": "workspace:*"
"@standardnotes/domain-events": "workspace:*"
@@ -2127,7 +2125,7 @@ __metadata:
dayjs: ^1.11.3
dotenv: ^16.0.1
eslint-plugin-prettier: ^4.0.0
inversify: 5.0.5
inversify: ^6.0.1
ioredis: ^5.2.0
jest: ^28.1.2
mysql2: ^2.3.3
@@ -2233,7 +2231,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@standardnotes/syncing-server@workspace:packages/syncing-server"
dependencies:
"@newrelic/winston-enricher": ^2.1.0
"@newrelic/winston-enricher": ^4.0.0
"@sentry/node": ^7.3.0
"@standardnotes/analytics": "workspace:*"
"@standardnotes/common": "workspace:*"
@@ -2263,7 +2261,7 @@ __metadata:
eslint: ^8.14.0
eslint-plugin-prettier: ^4.0.0
express: ^4.18.1
helmet: 4.3.1
helmet: ^5.1.1
inversify: ^6.0.1
inversify-express-utils: ^6.4.3
ioredis: ^5.2.0
@@ -4220,15 +4218,6 @@ __metadata:
languageName: node
linkType: hard
"crypto-random-string@npm:3.3.0":
version: 3.3.0
resolution: "crypto-random-string@npm:3.3.0"
dependencies:
type-fest: ^0.8.1
checksum: deff9866311a3a17ffd26ecdcebbbe9e1e12cf2fca5dd6e89993c9a03342d6da83f9f82cb0bfd7b31265d45eea710f376bc2af37bf3b053ef0cade920b8b04ba
languageName: node
linkType: hard
"crypto-random-string@npm:^4.0.0":
version: 4.0.0
resolution: "crypto-random-string@npm:4.0.0"
@@ -5610,24 +5599,10 @@ __metadata:
languageName: node
linkType: hard
"helmet@npm:4.3.1":
version: 4.3.1
resolution: "helmet@npm:4.3.1"
checksum: 47f59d8b9935eec24dadc5ce83bb7c149fc72f9355d3655babf0518740326b97fb83dc5f566cdcaf97753988003973848eb336ad3c784803a13e5056bca92bf7
languageName: node
linkType: hard
"helmet@npm:4.4.1":
version: 4.4.1
resolution: "helmet@npm:4.4.1"
checksum: cfe385e185e1ef6e4cd2ade4c54e160b05dd0454f270a663c528a8666402cbcad14e0ff0df09567fa62b0b4ac3371bbd1c8a253f6e7af37656a22339fe98c869
languageName: node
linkType: hard
"helmet@npm:^4.3.1":
version: 4.6.0
resolution: "helmet@npm:4.6.0"
checksum: 139ad678d1cab207b043c206f50f6744eff2ef1f463e4626d36718b45b337485c77d10260ef9d89d292fa678da5153d86b08172b3b365cc8e680241015ed3a49
"helmet@npm:^5.1.1":
version: 5.1.1
resolution: "helmet@npm:5.1.1"
checksum: b72ba26cc431804ad3b8ecdc18db95409a492cbb7a7e825efc27fc502b9433fec39fc083f2aad4fe7ed1a89a4287560b59f4435f9689eebbae6a2b61a1ec1b7d
languageName: node
linkType: hard
@@ -5928,13 +5903,6 @@ __metadata:
languageName: node
linkType: hard
"inversify@npm:5.0.5":
version: 5.0.5
resolution: "inversify@npm:5.0.5"
checksum: a4bf1a6a62cacfeb7f82f85c4c00eea2326cd6e30d5d47582a6323ef8aacc5adc72f9aa3d86c373e27387b4ed37fcab7cfac728cdd5bdb252c6d27f849a151f1
languageName: node
linkType: hard
"inversify@npm:^6.0.1":
version: 6.0.1
resolution: "inversify@npm:6.0.1"