Compare commits

...

13 Commits

Author SHA1 Message Date
standardci
9def26e809 chore(release): publish new version
- @standardnotes/analytics@2.23.2
 - @standardnotes/auth-server@1.114.6
 - @standardnotes/common@1.48.2
 - @standardnotes/home-server@1.6.7
 - @standardnotes/revisions-server@1.19.6
 - @standardnotes/syncing-server@1.40.6
 - @standardnotes/websockets-server@1.8.2
2023-05-31 11:30:02 +00:00
Karol Sójko
74ac709bb5 fix(common): bump version 2023-05-31 13:14:31 +02:00
standardci
1f749fad49 chore(release): publish new version
- @standardnotes/api-gateway@1.61.5
 - @standardnotes/auth-server@1.114.5
 - @standardnotes/files-server@1.15.4
 - @standardnotes/home-server@1.6.6
 - @standardnotes/revisions-server@1.19.5
 - @standardnotes/syncing-server@1.40.5
2023-05-31 11:12:46 +00:00
Karol Sójko
13c85d4331 Revert "Revert "feat: make home server components publishable (#617)""
This reverts commit 1a8daef79d.
2023-05-31 12:59:20 +02:00
standardci
77d2099cdb chore(release): publish new version
- @standardnotes/api-gateway@1.61.4
 - @standardnotes/auth-server@1.114.4
 - @standardnotes/event-store@1.9.2
 - @standardnotes/home-server@1.6.5
 - @standardnotes/revisions-server@1.19.4
 - @standardnotes/syncing-server@1.40.4
2023-05-31 08:55:39 +00:00
Karol Sójko
56a312f217 fix(home-server): make the package publishable 2023-05-31 10:41:49 +02:00
standardci
aa2b3dac49 chore(release): publish new version
- @standardnotes/api-gateway@1.61.3
 - @standardnotes/auth-server@1.114.3
 - @standardnotes/files-server@1.15.3
 - @standardnotes/home-server@1.6.4
 - @standardnotes/revisions-server@1.19.3
 - @standardnotes/syncing-server@1.40.3
2023-05-30 16:05:01 +00:00
Karol Sójko
1a8daef79d Revert "feat: make home server components publishable (#617)"
This reverts commit 55fd873b37.
2023-05-30 17:47:23 +02:00
standardci
a83d133f93 chore(release): publish new version
- @standardnotes/analytics@2.23.1
 - @standardnotes/api-gateway@1.61.2
 - @standardnotes/auth-server@1.114.2
 - @standardnotes/domain-core@1.16.2
 - @standardnotes/domain-events-infra@1.12.2
 - @standardnotes/domain-events@2.111.2
 - @standardnotes/event-store@1.9.1
 - @standardnotes/files-server@1.15.2
 - @standardnotes/home-server@1.6.3
 - @standardnotes/revisions-server@1.19.2
 - @standardnotes/scheduler-server@1.19.1
 - @standardnotes/settings@1.21.6
 - @standardnotes/syncing-server@1.40.2
 - @standardnotes/websockets-server@1.8.1
2023-05-30 12:27:45 +00:00
Karol Sójko
b0d01dffd9 fix: bump version manually to publish packages 2023-05-30 14:10:51 +02:00
Karol Sójko
b74e7ce86d fix: add @lerna-lite/publish 2023-05-30 13:54:28 +02:00
standardci
671f7a7074 chore(release): publish new version
- @standardnotes/api-gateway@1.61.0
 - @standardnotes/auth-server@1.114.0
 - @standardnotes/files-server@1.15.0
 - @standardnotes/home-server@1.6.2
 - @standardnotes/revisions-server@1.19.0
 - @standardnotes/syncing-server@1.40.0
2023-05-30 11:51:38 +00:00
Karol Sójko
55fd873b37 feat: make home server components publishable (#617) 2023-05-30 13:37:49 +02:00
87 changed files with 1822 additions and 143 deletions

763
.pnp.cjs generated

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -24,6 +24,7 @@
"@commitlint/config-conventional": "^17.0.2",
"@lerna-lite/cli": "^2.3.0",
"@lerna-lite/list": "^2.3.0",
"@lerna-lite/publish": "^2.4.0",
"@lerna-lite/run": "^2.3.0",
"@lerna-lite/version": "^2.3.0",
"@types/jest": "^29.5.1",

View File

@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [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)
**Note:** Version bump only for package @standardnotes/analytics
# [2.23.0](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.22.5...@standardnotes/analytics@2.23.0) (2023-05-30)
### Features

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/analytics",
"version": "2.23.0",
"version": "2.23.2",
"engines": {
"node": ">=18.0.0 <21.0.0"
},

View File

@@ -3,6 +3,36 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [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)
### Bug Fixes
* **home-server:** make the package publishable ([56a312f](https://github.com/standardnotes/api-gateway/commit/56a312f21730b32b766c358a5ceb0865722bac46))
## [1.61.3](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.61.2...@standardnotes/api-gateway@1.61.3) (2023-05-30)
### Reverts
* Revert "feat: make home server components publishable (#617)" ([1a8daef](https://github.com/standardnotes/api-gateway/commit/1a8daef79d55a8cdee1632b294b897176af64b26)), closes [#617](https://github.com/standardnotes/api-gateway/issues/617)
## [1.61.2](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.61.0...@standardnotes/api-gateway@1.61.2) (2023-05-30)
### Bug Fixes
* bump version manually to publish packages ([b0d01df](https://github.com/standardnotes/api-gateway/commit/b0d01dffd91557c67eac2940d9270bca208c1128))
# [1.61.0](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.60.0...@standardnotes/api-gateway@1.61.0) (2023-05-30)
### Features
* make home server components publishable ([#617](https://github.com/standardnotes/api-gateway/issues/617)) ([55fd873](https://github.com/standardnotes/api-gateway/commit/55fd873b375e204dc9b0477b2cc6ed4582e5b603))
# [1.60.0](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.59.0...@standardnotes/api-gateway@1.60.0) (2023-05-30)
### Features

View File

@@ -1,10 +1,9 @@
{
"name": "@standardnotes/api-gateway",
"version": "1.60.0",
"version": "1.61.5",
"engines": {
"node": ">=18.0.0 <21.0.0"
},
"private": true,
"description": "API Gateway For Standard Notes Services",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
@@ -13,8 +12,11 @@
"dist/src/**/*.d.ts"
],
"repository": "git@github.com:standardnotes/api-gateway.git",
"author": "Karol Sójko <karolsojko@standardnotes.com>",
"author": "Karol Sójko <karol@standardnotes.com>",
"license": "AGPL-3.0-or-later",
"publishConfig": {
"access": "public"
},
"scripts": {
"clean": "rm -fr dist",
"build": "tsc --build",

View File

@@ -3,6 +3,40 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [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)
### Bug Fixes
* **home-server:** make the package publishable ([56a312f](https://github.com/standardnotes/server/commit/56a312f21730b32b766c358a5ceb0865722bac46))
## [1.114.3](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.114.2...@standardnotes/auth-server@1.114.3) (2023-05-30)
### Reverts
* Revert "feat: make home server components publishable (#617)" ([1a8daef](https://github.com/standardnotes/server/commit/1a8daef79d55a8cdee1632b294b897176af64b26)), closes [#617](https://github.com/standardnotes/server/issues/617)
## [1.114.2](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.114.0...@standardnotes/auth-server@1.114.2) (2023-05-30)
### Bug Fixes
* bump version manually to publish packages ([b0d01df](https://github.com/standardnotes/server/commit/b0d01dffd91557c67eac2940d9270bca208c1128))
# [1.114.0](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.113.0...@standardnotes/auth-server@1.114.0) (2023-05-30)
### Features
* make home server components publishable ([#617](https://github.com/standardnotes/server/issues/617)) ([55fd873](https://github.com/standardnotes/server/commit/55fd873b375e204dc9b0477b2cc6ed4582e5b603))
# [1.113.0](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.112.0...@standardnotes/auth-server@1.113.0) (2023-05-30)
### Features

View File

@@ -1,15 +1,17 @@
{
"name": "@standardnotes/auth-server",
"version": "1.113.0",
"version": "1.114.6",
"engines": {
"node": ">=18.0.0 <21.0.0"
},
"private": true,
"description": "Auth Server",
"main": "dist/src/index.js",
"typings": "dist/src/index.d.ts",
"author": "Karol Sójko <karolsojko@standardnotes.com>",
"author": "Karol Sójko <karol@standardnotes.com>",
"license": "AGPL-3.0-or-later",
"publishConfig": {
"access": "public"
},
"scripts": {
"clean": "rm -fr dist",
"setup:env": "cp .env.sample .env",

View File

@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
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)
### Features

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/common",
"version": "1.48.0",
"version": "1.48.2",
"engines": {
"node": ">=18.0.0 <21.0.0"
},

View File

@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [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
* bump version manually to publish packages ([b0d01df](https://github.com/standardnotes/server/commit/b0d01dffd91557c67eac2940d9270bca208c1128))
# [1.16.0](https://github.com/standardnotes/server/compare/@standardnotes/domain-core@1.15.0...@standardnotes/domain-core@1.16.0) (2023-05-29)
### Features

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/domain-core",
"version": "1.16.0",
"version": "1.16.2",
"engines": {
"node": ">=18.0.0 <21.0.0"
},

View File

@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [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
* bump version manually to publish packages ([b0d01df](https://github.com/standardnotes/server/commit/b0d01dffd91557c67eac2940d9270bca208c1128))
# [1.12.0](https://github.com/standardnotes/server/compare/@standardnotes/domain-events-infra@1.11.2...@standardnotes/domain-events-infra@1.12.0) (2023-05-17)
### Features

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/domain-events-infra",
"version": "1.12.0",
"version": "1.12.2",
"engines": {
"node": ">=18.0.0 <21.0.0"
},

View File

@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [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
* bump version manually to publish packages ([b0d01df](https://github.com/standardnotes/server/commit/b0d01dffd91557c67eac2940d9270bca208c1128))
# [2.111.0](https://github.com/standardnotes/server/compare/@standardnotes/domain-events@2.110.2...@standardnotes/domain-events@2.111.0) (2023-05-17)
### Features

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/domain-events",
"version": "2.111.0",
"version": "2.111.2",
"engines": {
"node": ">=18.0.0 <21.0.0"
},

View File

@@ -3,6 +3,16 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [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
* **home-server:** make the package publishable ([56a312f](https://github.com/standardnotes/server/commit/56a312f21730b32b766c358a5ceb0865722bac46))
## [1.9.1](https://github.com/standardnotes/server/compare/@standardnotes/event-store@1.9.0...@standardnotes/event-store@1.9.1) (2023-05-30)
**Note:** Version bump only for package @standardnotes/event-store
# [1.9.0](https://github.com/standardnotes/server/compare/@standardnotes/event-store@1.8.3...@standardnotes/event-store@1.9.0) (2023-05-30)
### Features

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/event-store",
"version": "1.9.0",
"version": "1.9.2",
"description": "Event Store Service",
"private": true,
"main": "dist/src/index.js",
@@ -16,7 +16,7 @@
"test": "jest --coverage --config=./jest.config.js --maxWorkers=50%",
"worker": "yarn node dist/bin/worker.js"
},
"author": "Karol Sójko <karolsojko@standardnotes.com>",
"author": "Karol Sójko <karol@standardnotes.com>",
"license": "AGPL-3.0-or-later",
"devDependencies": {
"@types/ioredis": "^5.0.0",

View File

@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [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)
### Reverts
* Revert "feat: make home server components publishable (#617)" ([1a8daef](https://github.com/standardnotes/files/commit/1a8daef79d55a8cdee1632b294b897176af64b26)), closes [#617](https://github.com/standardnotes/files/issues/617)
## [1.15.2](https://github.com/standardnotes/files/compare/@standardnotes/files-server@1.15.0...@standardnotes/files-server@1.15.2) (2023-05-30)
### Bug Fixes
* bump version manually to publish packages ([b0d01df](https://github.com/standardnotes/files/commit/b0d01dffd91557c67eac2940d9270bca208c1128))
# [1.15.0](https://github.com/standardnotes/files/compare/@standardnotes/files-server@1.14.0...@standardnotes/files-server@1.15.0) (2023-05-30)
### Features
* make home server components publishable ([#617](https://github.com/standardnotes/files/issues/617)) ([55fd873](https://github.com/standardnotes/files/commit/55fd873b375e204dc9b0477b2cc6ed4582e5b603))
# [1.14.0](https://github.com/standardnotes/files/compare/@standardnotes/files-server@1.13.0...@standardnotes/files-server@1.14.0) (2023-05-30)
### Features

View File

@@ -1,10 +1,9 @@
{
"name": "@standardnotes/files-server",
"version": "1.14.0",
"version": "1.15.4",
"engines": {
"node": ">=18.0.0 <21.0.0"
},
"private": true,
"description": "Standard Notes Files Server",
"main": "dist/src/index.js",
"typings": "dist/src/index.d.ts",
@@ -13,6 +12,9 @@
"Karol Sójko <karol@standardnotes.com>"
],
"license": "AGPL-3.0-or-later",
"publishConfig": {
"access": "public"
},
"scripts": {
"clean": "rm -fr dist",
"setup:env": "cp .env.sample .env",

View File

@@ -3,6 +3,32 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [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)
### Bug Fixes
* **home-server:** make the package publishable ([56a312f](https://github.com/standardnotes/server/commit/56a312f21730b32b766c358a5ceb0865722bac46))
## [1.6.4](https://github.com/standardnotes/server/compare/@standardnotes/home-server@1.6.3...@standardnotes/home-server@1.6.4) (2023-05-30)
**Note:** Version bump only for package @standardnotes/home-server
## [1.6.3](https://github.com/standardnotes/server/compare/@standardnotes/home-server@1.6.2...@standardnotes/home-server@1.6.3) (2023-05-30)
**Note:** Version bump only for package @standardnotes/home-server
## [1.6.2](https://github.com/standardnotes/server/compare/@standardnotes/home-server@1.6.1...@standardnotes/home-server@1.6.2) (2023-05-30)
**Note:** Version bump only for package @standardnotes/home-server
## [1.6.1](https://github.com/standardnotes/server/compare/@standardnotes/home-server@1.6.0...@standardnotes/home-server@1.6.1) (2023-05-30)
**Note:** Version bump only for package @standardnotes/home-server

View File

@@ -1,108 +1,8 @@
import 'reflect-metadata'
import { HomeServer } from '../src/Bootstrap/HomeServer'
import { ControllerContainer, ServiceContainer } from '@standardnotes/domain-core'
import { Service as ApiGatewayService, TYPES as ApiGatewayTYPES } from '@standardnotes/api-gateway'
import { Service as FilesService } from '@standardnotes/files-server'
import { DirectCallDomainEventPublisher } from '@standardnotes/domain-events-infra'
import { Service as AuthService } from '@standardnotes/auth-server'
import { Service as SyncingService } from '@standardnotes/syncing-server'
import { Service as RevisionsService } from '@standardnotes/revisions-server'
import { Container } from 'inversify'
import { InversifyExpressServer } from 'inversify-express-utils'
import helmet from 'helmet'
import * as cors from 'cors'
import { text, json, Request, Response, NextFunction } from 'express'
import * as winston from 'winston'
// eslint-disable-next-line @typescript-eslint/no-var-requires
const robots = require('express-robots-txt')
const homeServer = new HomeServer()
import { Env } from '../src/Bootstrap/Env'
const startServer = async (): Promise<void> => {
const controllerContainer = new ControllerContainer()
const serviceContainer = new ServiceContainer()
const directCallDomainEventPublisher = new DirectCallDomainEventPublisher()
const apiGatewayService = new ApiGatewayService(serviceContainer)
const authService = new AuthService(serviceContainer, controllerContainer, directCallDomainEventPublisher)
const syncingService = new SyncingService(serviceContainer, controllerContainer, directCallDomainEventPublisher)
const revisionsService = new RevisionsService(serviceContainer, controllerContainer, directCallDomainEventPublisher)
const filesService = new FilesService(serviceContainer, directCallDomainEventPublisher)
const container = Container.merge(
(await apiGatewayService.getContainer()) as Container,
(await authService.getContainer()) as Container,
(await syncingService.getContainer()) as Container,
(await revisionsService.getContainer()) as Container,
(await filesService.getContainer()) as Container,
)
const env: Env = new Env()
env.load()
const server = new InversifyExpressServer(container)
server.setConfig((app) => {
/* eslint-disable */
app.use(helmet({
contentSecurityPolicy: {
directives: {
defaultSrc: ["https: 'self'"],
baseUri: ["'self'"],
childSrc: ["*", "blob:"],
connectSrc: ["*"],
fontSrc: ["*", "'self'"],
formAction: ["'self'"],
frameAncestors: ["*", "*.standardnotes.org", "*.standardnotes.com"],
frameSrc: ["*", "blob:"],
imgSrc: ["'self'", "*", "data:"],
manifestSrc: ["'self'"],
mediaSrc: ["'self'"],
objectSrc: ["'self'"],
scriptSrc: ["'self'"],
styleSrc: ["'self'"]
}
}
}))
/* eslint-enable */
app.use(json({ limit: '50mb' }))
app.use(
text({
type: ['text/plain', 'application/x-www-form-urlencoded', 'application/x-www-form-urlencoded; charset=utf-8'],
}),
)
app.use(cors())
app.use(
robots({
UserAgent: '*',
Disallow: '/',
}),
)
})
const logger: winston.Logger = container.get(ApiGatewayTYPES.Logger)
server.setErrorConfig((app) => {
app.use((error: Record<string, unknown>, _request: Request, response: Response, _next: NextFunction) => {
logger.error(error.stack)
response.status(500).send({
error: {
message:
"Unfortunately, we couldn't handle your request. Please try again or contact our support if the error persists.",
},
})
})
})
const serverInstance = server.build()
serverInstance.listen(env.get('PORT', true) ? +env.get('PORT', true) : 3000)
logger.info(`Server started on port ${process.env.PORT}`)
}
Promise.resolve(startServer()).catch((error) => {
Promise.resolve(homeServer.start()).catch((error) => {
// eslint-disable-next-line no-console
console.log(`Could not start server: ${error.message}`)
})

View File

@@ -1,15 +1,17 @@
{
"name": "@standardnotes/home-server",
"version": "1.6.1",
"version": "1.6.7",
"engines": {
"node": ">=18.0.0 <21.0.0"
},
"private": true,
"description": "Standard Notes Home Server",
"main": "dist/src/index.js",
"typings": "dist/src/index.d.ts",
"repository": "git@github.com:standardnotes/server.git",
"author": "Karol Sójko <karolsojko@standardnotes.com>",
"author": "Karol Sójko <karol@standardnotes.com>",
"publishConfig": {
"access": "public"
},
"license": "AGPL-3.0-or-later",
"scripts": {
"clean": "rm -fr dist",

View File

@@ -0,0 +1,105 @@
import 'reflect-metadata'
import { ControllerContainer, ServiceContainer } from '@standardnotes/domain-core'
import { Service as ApiGatewayService, TYPES as ApiGatewayTYPES } from '@standardnotes/api-gateway'
import { Service as FilesService } from '@standardnotes/files-server'
import { DirectCallDomainEventPublisher } from '@standardnotes/domain-events-infra'
import { Service as AuthService } from '@standardnotes/auth-server'
import { Service as SyncingService } from '@standardnotes/syncing-server'
import { Service as RevisionsService } from '@standardnotes/revisions-server'
import { Container } from 'inversify'
import { InversifyExpressServer } from 'inversify-express-utils'
import helmet from 'helmet'
import * as cors from 'cors'
import { text, json, Request, Response, NextFunction } from 'express'
import * as winston from 'winston'
// eslint-disable-next-line @typescript-eslint/no-var-requires
const robots = require('express-robots-txt')
import { Env } from './Env'
export class HomeServer {
async start(): Promise<void> {
const controllerContainer = new ControllerContainer()
const serviceContainer = new ServiceContainer()
const directCallDomainEventPublisher = new DirectCallDomainEventPublisher()
const apiGatewayService = new ApiGatewayService(serviceContainer)
const authService = new AuthService(serviceContainer, controllerContainer, directCallDomainEventPublisher)
const syncingService = new SyncingService(serviceContainer, controllerContainer, directCallDomainEventPublisher)
const revisionsService = new RevisionsService(serviceContainer, controllerContainer, directCallDomainEventPublisher)
const filesService = new FilesService(serviceContainer, directCallDomainEventPublisher)
const container = Container.merge(
(await apiGatewayService.getContainer()) as Container,
(await authService.getContainer()) as Container,
(await syncingService.getContainer()) as Container,
(await revisionsService.getContainer()) as Container,
(await filesService.getContainer()) as Container,
)
const env: Env = new Env()
env.load()
const server = new InversifyExpressServer(container)
server.setConfig((app) => {
/* eslint-disable */
app.use(helmet({
contentSecurityPolicy: {
directives: {
defaultSrc: ["https: 'self'"],
baseUri: ["'self'"],
childSrc: ["*", "blob:"],
connectSrc: ["*"],
fontSrc: ["*", "'self'"],
formAction: ["'self'"],
frameAncestors: ["*", "*.standardnotes.org", "*.standardnotes.com"],
frameSrc: ["*", "blob:"],
imgSrc: ["'self'", "*", "data:"],
manifestSrc: ["'self'"],
mediaSrc: ["'self'"],
objectSrc: ["'self'"],
scriptSrc: ["'self'"],
styleSrc: ["'self'"]
}
}
}))
/* eslint-enable */
app.use(json({ limit: '50mb' }))
app.use(
text({
type: ['text/plain', 'application/x-www-form-urlencoded', 'application/x-www-form-urlencoded; charset=utf-8'],
}),
)
app.use(cors())
app.use(
robots({
UserAgent: '*',
Disallow: '/',
}),
)
})
const logger: winston.Logger = container.get(ApiGatewayTYPES.Logger)
server.setErrorConfig((app) => {
app.use((error: Record<string, unknown>, _request: Request, response: Response, _next: NextFunction) => {
logger.error(error.stack)
response.status(500).send({
error: {
message:
"Unfortunately, we couldn't handle your request. Please try again or contact our support if the error persists.",
},
})
})
})
const serverInstance = server.build()
serverInstance.listen(env.get('PORT', true) ? +env.get('PORT', true) : 3000)
logger.info(`Server started on port ${process.env.PORT}`)
}
}

View File

@@ -0,0 +1 @@
export * from './HomeServer'

View File

@@ -0,0 +1 @@
export * from './Bootstrap'

View File

@@ -3,6 +3,40 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [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)
### Bug Fixes
* **home-server:** make the package publishable ([56a312f](https://github.com/standardnotes/server/commit/56a312f21730b32b766c358a5ceb0865722bac46))
## [1.19.3](https://github.com/standardnotes/server/compare/@standardnotes/revisions-server@1.19.2...@standardnotes/revisions-server@1.19.3) (2023-05-30)
### Reverts
* Revert "feat: make home server components publishable (#617)" ([1a8daef](https://github.com/standardnotes/server/commit/1a8daef79d55a8cdee1632b294b897176af64b26)), closes [#617](https://github.com/standardnotes/server/issues/617)
## [1.19.2](https://github.com/standardnotes/server/compare/@standardnotes/revisions-server@1.19.0...@standardnotes/revisions-server@1.19.2) (2023-05-30)
### Bug Fixes
* bump version manually to publish packages ([b0d01df](https://github.com/standardnotes/server/commit/b0d01dffd91557c67eac2940d9270bca208c1128))
# [1.19.0](https://github.com/standardnotes/server/compare/@standardnotes/revisions-server@1.18.0...@standardnotes/revisions-server@1.19.0) (2023-05-30)
### Features
* make home server components publishable ([#617](https://github.com/standardnotes/server/issues/617)) ([55fd873](https://github.com/standardnotes/server/commit/55fd873b375e204dc9b0477b2cc6ed4582e5b603))
# [1.18.0](https://github.com/standardnotes/server/compare/@standardnotes/revisions-server@1.17.0...@standardnotes/revisions-server@1.18.0) (2023-05-30)
### Features

View File

@@ -1,16 +1,18 @@
{
"name": "@standardnotes/revisions-server",
"version": "1.18.0",
"version": "1.19.6",
"engines": {
"node": ">=18.0.0 <21.0.0"
},
"private": true,
"description": "Revisions Server",
"main": "dist/src/index.js",
"typings": "dist/src/index.d.ts",
"repository": "git@github.com:standardnotes/server.git",
"author": "Karol Sójko <karolsojko@standardnotes.com>",
"author": "Karol Sójko <karol@standardnotes.com>",
"license": "AGPL-3.0-or-later",
"publishConfig": {
"access": "public"
},
"scripts": {
"clean": "rm -fr dist",
"setup:env": "cp .env.sample .env",

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.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
# [1.19.0](https://github.com/standardnotes/server/compare/@standardnotes/scheduler-server@1.18.5...@standardnotes/scheduler-server@1.19.0) (2023-05-30)
### Features

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/scheduler-server",
"version": "1.19.0",
"version": "1.19.1",
"engines": {
"node": ">=18.0.0 <21.0.0"
},

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.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
## [1.21.5](https://github.com/standardnotes/server/compare/@standardnotes/settings@1.21.4...@standardnotes/settings@1.21.5) (2023-05-29)
**Note:** Version bump only for package @standardnotes/settings

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/settings",
"version": "1.21.5",
"version": "1.21.6",
"engines": {
"node": ">=18.0.0 <21.0.0"
},

View File

@@ -3,6 +3,40 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [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)
### Bug Fixes
* **home-server:** make the package publishable ([56a312f](https://github.com/standardnotes/syncing-server-js/commit/56a312f21730b32b766c358a5ceb0865722bac46))
## [1.40.3](https://github.com/standardnotes/syncing-server-js/compare/@standardnotes/syncing-server@1.40.2...@standardnotes/syncing-server@1.40.3) (2023-05-30)
### Reverts
* Revert "feat: make home server components publishable (#617)" ([1a8daef](https://github.com/standardnotes/syncing-server-js/commit/1a8daef79d55a8cdee1632b294b897176af64b26)), closes [#617](https://github.com/standardnotes/syncing-server-js/issues/617)
## [1.40.2](https://github.com/standardnotes/syncing-server-js/compare/@standardnotes/syncing-server@1.40.0...@standardnotes/syncing-server@1.40.2) (2023-05-30)
### Bug Fixes
* bump version manually to publish packages ([b0d01df](https://github.com/standardnotes/syncing-server-js/commit/b0d01dffd91557c67eac2940d9270bca208c1128))
# [1.40.0](https://github.com/standardnotes/syncing-server-js/compare/@standardnotes/syncing-server@1.39.0...@standardnotes/syncing-server@1.40.0) (2023-05-30)
### Features
* make home server components publishable ([#617](https://github.com/standardnotes/syncing-server-js/issues/617)) ([55fd873](https://github.com/standardnotes/syncing-server-js/commit/55fd873b375e204dc9b0477b2cc6ed4582e5b603))
# [1.39.0](https://github.com/standardnotes/syncing-server-js/compare/@standardnotes/syncing-server@1.38.0...@standardnotes/syncing-server@1.39.0) (2023-05-30)
### Features

View File

@@ -1,16 +1,18 @@
{
"name": "@standardnotes/syncing-server",
"version": "1.39.0",
"version": "1.40.6",
"engines": {
"node": ">=18.0.0 <21.0.0"
},
"private": true,
"description": "Syncing Server",
"main": "dist/src/index.js",
"typings": "dist/src/index.d.ts",
"repository": "git@github.com:standardnotes/syncing-server-js.git",
"author": "Karol Sójko <karolsojko@standardnotes.com>",
"author": "Karol Sójko <karol@standardnotes.com>",
"license": "AGPL-3.0-or-later",
"publishConfig": {
"access": "public"
},
"scripts": {
"clean": "rm -fr dist",
"setup:env": "cp .env.sample .env",

View File

@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [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)
**Note:** Version bump only for package @standardnotes/websockets-server
# [1.8.0](https://github.com/standardnotes/server/compare/@standardnotes/websockets-server@1.7.5...@standardnotes/websockets-server@1.8.0) (2023-05-30)
### Features

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/websockets-server",
"version": "1.8.0",
"version": "1.8.2",
"engines": {
"node": ">=18.0.0 <21.0.0"
},

682
yarn.lock

File diff suppressed because it is too large Load Diff