Compare commits

..

61 Commits

Author SHA1 Message Date
standardci
9fcadf8fbb chore(release): publish new version
- @standardnotes/api-gateway@1.51.0
 - @standardnotes/auth-server@1.104.0
2023-05-05 13:43:24 +00:00
Mo
f5ac8ac5e9 feat: change payment method endpoint 2023-05-05 08:27:06 -05:00
Karol Sójko
0a0b8aafaf fix: e2e tests matrix 2023-05-05 13:18:58 +02:00
standardci
097a7eae7e chore(release): publish new version
- @standardnotes/analytics@2.21.11
 - @standardnotes/api-gateway@1.50.2
 - @standardnotes/auth-server@1.103.2
 - @standardnotes/common@1.46.7
 - @standardnotes/domain-core@1.14.1
 - @standardnotes/domain-events-infra@1.10.3
 - @standardnotes/domain-events@2.110.1
 - @standardnotes/event-store@1.7.11
 - @standardnotes/files-server@1.11.2
 - @standardnotes/predicates@1.6.6
 - @standardnotes/revisions-server@1.13.2
 - @standardnotes/scheduler-server@1.17.15
 - @standardnotes/security@1.7.7
 - @standardnotes/settings@1.21.2
 - @standardnotes/sncrypto-node@1.13.2
 - @standardnotes/syncing-server@1.34.2
 - @standardnotes/time@1.14.3
 - @standardnotes/websockets-server@1.6.16
2023-05-05 09:36:42 +00:00
Karol Sójko
c0e43a0cf0 chore: fix eslint at monorepo level 2023-05-05 11:22:16 +02:00
Karol Sójko
d7926dd9d1 chore: fix eslint setup 2023-05-05 11:17:26 +02:00
Karol Sójko
da474741e6 chore: upgrade typeorm 2023-05-05 11:05:52 +02:00
Karol Sójko
a1e16031e0 fix: upgrade prettier 2023-05-05 11:02:11 +02:00
Karol Sójko
a229093b60 chore: upgrade eslint deps 2023-05-05 10:58:36 +02:00
Karol Sójko
1a64a1c34d chore: upgrade typescript 2023-05-05 10:53:25 +02:00
Karol Sójko
b8f49d2d45 chore: upgrade jest 2023-05-05 10:49:47 +02:00
Karol Sójko
990140c392 fix: remove unused imports 2023-05-05 10:47:37 +02:00
Karol Sójko
542b296018 fix: remove @standardnotes/config from files 2023-05-05 10:45:24 +02:00
Karol Sójko
c6122d33b9 fix: remove sentry 2023-05-05 10:44:22 +02:00
Karol Sójko
8c71066660 fix: upgrade yarn to 4.0.0-rc.43 2023-05-05 10:34:23 +02:00
Karol Sójko
a748164bf2 fix: remove redundant install steps from workflows 2023-05-05 10:28:19 +02:00
Karol Sójko
c427fa8790 chore: fix pr and publish workflows with install for node-gyp unplugged deps 2023-05-05 09:53:17 +02:00
standardci
093cc07c39 chore(release): publish new version
- @standardnotes/api-gateway@1.50.1
 - @standardnotes/files-server@1.11.1
2023-05-04 10:36:26 +00:00
Karol Sójko
30f14820c6 feat: add cache type to e2e test suite 2023-05-04 12:20:37 +02:00
Karol Sójko
c8ea2ab199 fix: add env vars to control cache type for home server 2023-05-04 12:11:19 +02:00
standardci
d56bbacc0b chore(release): publish new version
- @standardnotes/auth-server@1.103.1
2023-05-04 09:39:16 +00:00
Karol Sójko
bb468a8b7e fix(auth): invalidate cross service token cache upon shared subscription accepting (#586) 2023-05-04 11:25:12 +02:00
standardci
7e99f4b078 chore(release): publish new version
- @standardnotes/files-server@1.11.0
2023-05-02 11:19:22 +00:00
Karol Sójko
14ce6dd818 feat(files): add in memory upload repository for home server purposes (#583) 2023-05-02 13:02:09 +02:00
standardci
063a3e425d chore(release): publish new version
- @standardnotes/api-gateway@1.50.0
2023-05-02 10:13:47 +00:00
Karol Sójko
0900dc75ac feat(api-gateway): add in memory cache for home server (#582) 2023-05-02 11:58:38 +02:00
standardci
aa8bd1f8dc chore(release): publish new version
- @standardnotes/analytics@2.21.10
 - @standardnotes/api-gateway@1.49.13
 - @standardnotes/auth-server@1.103.0
 - @standardnotes/domain-core@1.14.0
 - @standardnotes/files-server@1.10.14
 - @standardnotes/revisions-server@1.13.1
 - @standardnotes/scheduler-server@1.17.14
 - @standardnotes/settings@1.21.1
 - @standardnotes/syncing-server@1.34.1
 - @standardnotes/websockets-server@1.6.15
2023-05-02 09:57:55 +00:00
Karol Sójko
c71f7ff8ad feat: extract cache entry model to domain-core (#581)
* feat: extract cache entry model to domain-core

* fix(auth): rename cache table to be auth specific
2023-05-02 11:43:50 +02:00
standardci
fe18420913 chore(release): publish new version
- @standardnotes/auth-server@1.102.0
2023-05-01 13:07:13 +00:00
Karol Sójko
97124928df feat(auth): add sqlite driver repositories (#580)
* feat(auth): add pkce sqlite repository for home server

* feat(auth): add sqlite subscription token repository for home server
2023-05-01 14:50:36 +02:00
standardci
c108bfb12f chore(release): publish new version
- @standardnotes/auth-server@1.101.0
2023-05-01 12:05:53 +00:00
Karol Sójko
5fe6ed1462 feat(auth): add sqlite offline subscription token repository for home server (#579) 2023-05-01 13:50:24 +02:00
standardci
df5fcce769 chore(release): publish new version
- @standardnotes/auth-server@1.100.0
2023-05-01 11:26:33 +00:00
Karol Sójko
8f57ece7b8 feat(auth): add sqlite ephemeral session repository for home server (#578) 2023-05-01 13:09:47 +02:00
standardci
8a10d201c5 chore(release): publish new version
- @standardnotes/auth-server@1.99.0
2023-05-01 10:16:44 +00:00
Karol Sójko
9d7e63a7a7 feat(auth): add sqlite lock cache for home server (#577)
* feat(auth): add sqlite lock cache for home server

* fix(auth): lock repository binding
2023-05-01 12:02:52 +02:00
standardci
87c1ae2ac0 chore(release): publish new version
- @standardnotes/auth-server@1.98.0
2023-05-01 08:03:44 +00:00
Karol Sójko
56c922e715 feat(auth): add cache entries model (#576) 2023-05-01 09:49:27 +02:00
standardci
a29ac8e68f chore(release): publish new version
- @standardnotes/revisions-server@1.13.0
2023-04-28 11:14:22 +00:00
Karol Sójko
03f9c6039c feat(revisions): add sqlite driver (#575) 2023-04-28 13:00:24 +02:00
standardci
73d81df8cb chore(release): publish new version
- @standardnotes/analytics@2.21.9
 - @standardnotes/api-gateway@1.49.12
 - @standardnotes/auth-server@1.97.0
 - @standardnotes/domain-events-infra@1.10.2
 - @standardnotes/domain-events@2.110.0
 - @standardnotes/event-store@1.7.10
 - @standardnotes/files-server@1.10.13
 - @standardnotes/revisions-server@1.12.16
 - @standardnotes/scheduler-server@1.17.13
 - @standardnotes/settings@1.21.0
 - @standardnotes/syncing-server@1.34.0
 - @standardnotes/websockets-server@1.6.14
2023-04-27 10:38:44 +00:00
Karol Sójko
484f554339 feat: remove cloud backups (#574) 2023-04-27 12:23:30 +02:00
standardci
2ad864e68e chore(release): publish new version
- @standardnotes/syncing-server@1.33.0
2023-04-27 10:11:06 +00:00
Karol Sójko
723ff44151 feat: add syncing server sqlite driver (#573) 2023-04-27 11:53:24 +02:00
standardci
04e11cbbf7 chore(release): publish new version
- @standardnotes/analytics@2.21.8
 - @standardnotes/api-gateway@1.49.11
 - @standardnotes/auth-server@1.96.0
 - @standardnotes/domain-core@1.13.0
 - @standardnotes/files-server@1.10.12
 - @standardnotes/revisions-server@1.12.15
 - @standardnotes/scheduler-server@1.17.12
 - @standardnotes/settings@1.20.2
 - @standardnotes/syncing-server@1.32.8
 - @standardnotes/websockets-server@1.6.13
2023-04-27 09:31:37 +00:00
Karol Sójko
3aef5998df feat: sqlite driver for auth service (#572)
* wip: initial sqlite bootstrap

* wip: switch to sqlite3 as default db type

* wip: boilerplate data

* fix(auth): case sensitive register and login

* fix(auth): refactor username validations

* fix(auth): allow changing username to both username and email:

* fix(auth): lock middleware for recovery log in

* fix(domain-core): specs for invalid types

* fix(auth): lock middleware specs

* fix(auth): typeorm code arrangements

* fix: running e2e on both mysql and sqlite in ci
2023-04-27 11:17:01 +02:00
Karol Sójko
34018ae7eb chore: disable event-store deployments 2023-04-24 08:28:44 +02:00
standardci
2f9d8e776f chore(release): publish new version
- @standardnotes/analytics@2.21.7
 - @standardnotes/api-gateway@1.49.10
 - @standardnotes/auth-server@1.95.3
 - @standardnotes/domain-events-infra@1.10.1
 - @standardnotes/event-store@1.7.9
 - @standardnotes/files-server@1.10.11
 - @standardnotes/revisions-server@1.12.14
 - @standardnotes/scheduler-server@1.17.11
 - @standardnotes/syncing-server@1.32.7
 - @standardnotes/websockets-server@1.6.12
2023-04-21 12:29:01 +00:00
Karol Sójko
9503f0d963 chore(deps): upgrade newrelic deps 2023-04-21 14:11:47 +02:00
standardci
32aff3e3f4 chore(release): publish new version
- @standardnotes/analytics@2.21.6
 - @standardnotes/api-gateway@1.49.9
 - @standardnotes/auth-server@1.95.2
 - @standardnotes/domain-events-infra@1.10.0
 - @standardnotes/domain-events@2.109.0
 - @standardnotes/event-store@1.7.8
 - @standardnotes/files-server@1.10.10
 - @standardnotes/revisions-server@1.12.13
 - @standardnotes/scheduler-server@1.17.10
 - @standardnotes/syncing-server@1.32.6
 - @standardnotes/websockets-server@1.6.11
2023-04-21 08:19:39 +00:00
Karol Sójko
9b9f10d4ca feat(domain-events-infra): add SES email bounce notifications handler (#569)
* feat(domain-events-infra): add SES email bounce notifications handler

* fix(domain-events-infra): specs
2023-04-21 10:03:39 +02:00
standardci
e4f0cc6b37 chore(release): publish new version
- @standardnotes/auth-server@1.95.1
2023-04-20 10:13:23 +00:00
Karol Sójko
d211249086 fix(auth): add u2f permissions for pro users 2023-04-20 11:58:37 +02:00
Karol Sójko
0fc5db8aee fix(env): default u2f origins 2023-04-19 17:32:37 +02:00
standardci
0a2abef979 chore(release): publish new version
- @standardnotes/auth-server@1.95.0
2023-04-04 09:23:48 +00:00
Karol Sójko
8242f13aff feat(auth): add initial emergency access invitations model (#528) 2023-04-04 11:10:11 +02:00
standardci
7516ba7028 chore(release): publish new version
- @standardnotes/auth-server@1.94.1
2023-04-04 07:21:21 +00:00
Karol Sójko
3417407cbe fix(auth): change status code for updating a subscription setting without a subscription 2023-04-04 09:08:27 +02:00
standardci
720d046c00 chore(release): publish new version
- @standardnotes/auth-server@1.94.0
2023-04-03 14:08:48 +00:00
Karol Sójko
b88f560b07 fix(auth): feature service specs 2023-04-03 15:53:04 +02:00
Karol Sójko
51b264ca13 feat(auth): feature entitlement check for u2f endpoints 2023-04-03 15:43:32 +02:00
628 changed files with 533536 additions and 8070 deletions

View File

@@ -1,6 +1,5 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},

View File

@@ -19,6 +19,15 @@ on:
jobs:
e2e:
strategy:
matrix:
database: [ "mysql", "sqlite" ]
include:
- cache: "redis"
database: "mysql"
- cache: "memory"
database: "sqlite"
runs-on: ubuntu-latest
services:
@@ -38,6 +47,9 @@ jobs:
- name: Run Server
run: docker compose -f docker-compose.ci.yml up -d
env:
DB_TYPE: ${{ matrix.database }}
CACHE_TYPE: ${{ matrix.cache }}
- name: Wait for server to start
run: docker/is-available.sh http://localhost:3123 $(pwd)/logs

View File

@@ -1,38 +0,0 @@
name: Event Store
concurrency:
group: event-store
cancel-in-progress: true
on:
push:
tags:
- '*standardnotes/event-store*'
workflow_dispatch:
jobs:
call_server_application_workflow:
name: Server Application
uses: standardnotes/server/.github/workflows/common-server-application.yml@main
with:
service_name: event-store
workspace_name: "@standardnotes/event-store"
deploy_web: false
package_path: packages/event-store
secrets: inherit
newrelic:
needs: call_server_application_workflow
runs-on: ubuntu-latest
steps:
- name: Create New Relic deployment marker for Worker
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_EVENT_STORE_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"

View File

@@ -42,7 +42,6 @@ jobs:
with:
path: |
packages/**/dist
${{ needs.build.outputs.temp_dir }}
key: ${{ runner.os }}-build-${{ github.sha }}
- name: Set up Node
@@ -72,7 +71,6 @@ jobs:
with:
path: |
packages/**/dist
${{ needs.build.outputs.temp_dir }}
key: ${{ runner.os }}-build-${{ github.sha }}
- name: Set up Node

View File

@@ -42,7 +42,6 @@ jobs:
with:
path: |
packages/**/dist
${{ needs.build.outputs.temp_dir }}
key: ${{ runner.os }}-build-${{ github.sha }}
- name: Set up Node
@@ -72,7 +71,6 @@ jobs:
with:
path: |
packages/**/dist
${{ needs.build.outputs.temp_dir }}
key: ${{ runner.os }}-build-${{ github.sha }}
- name: Set up Node
@@ -112,6 +110,14 @@ jobs:
token: ${{ secrets.CI_PAT_TOKEN }}
fetch-depth: 0
- name: Cache build
id: cache-build
uses: actions/cache@v3
with:
path: |
packages/**/dist
key: ${{ runner.os }}-build-${{ github.sha }}
- name: Setup git config
run: |
git config --global user.name "standardci"

2
.gitignore vendored
View File

@@ -21,6 +21,8 @@ packages/files/uploads/*
data/*
!data/.gitkeep
packages/**/data/*
logs/*
!logs/.gitkeep

7588
.pnp.cjs generated

File diff suppressed because one or more lines are too long

102
.pnp.loader.mjs generated
View File

@@ -10,7 +10,8 @@ const SAFE_TIME = 456789e3;
const PortablePath = {
root: `/`,
dot: `.`
dot: `.`,
parent: `..`
};
const npath = Object.create(path);
const ppath = Object.create(path.posix);
@@ -1357,6 +1358,13 @@ class VirtualFS extends ProxiedFS {
}
}
const [major, minor] = process.versions.node.split(`.`).map((value) => parseInt(value, 10));
const HAS_CONSOLIDATED_HOOKS = major > 16 || major === 16 && minor >= 12;
const HAS_UNFLAGGED_JSON_MODULES = major > 17 || major === 17 && minor >= 5 || major === 16 && minor >= 15;
const HAS_JSON_IMPORT_ASSERTION_REQUIREMENT = major > 17 || major === 17 && minor >= 1 || major === 16 && minor > 14;
const WATCH_MODE_MESSAGE_USES_ARRAYS = major > 19 || major === 19 && minor >= 2 || major === 18 && minor >= 13;
const HAS_LAZY_LOADED_TRANSLATORS = major > 19 || major === 19 && minor >= 3;
const builtinModules = new Set(Module.builtinModules || Object.keys(process.binding(`natives`)));
const isBuiltinModule = (request) => request.startsWith(`node:`) || builtinModules.has(request);
function readPackageScope(checkPath) {
@@ -1384,11 +1392,6 @@ function readPackage(requestPath) {
return JSON.parse(fs.readFileSync(jsonPath, `utf8`));
}
const [major, minor] = process.versions.node.split(`.`).map((value) => parseInt(value, 10));
const HAS_CONSOLIDATED_HOOKS = major > 16 || major === 16 && minor >= 12;
const HAS_UNFLAGGED_JSON_MODULES = major > 17 || major === 17 && minor >= 5 || major === 16 && minor >= 15;
const HAS_JSON_IMPORT_ASSERTION_REQUIREMENT = major > 17 || major === 17 && minor >= 1 || major === 16 && minor > 14;
async function tryReadFile$1(path2) {
try {
return await fs.promises.readFile(path2, `utf8`);
@@ -1486,12 +1489,13 @@ async function load$1(urlString, context, nextLoad) {
throw err;
}
if (process.env.WATCH_REPORT_DEPENDENCIES && process.send) {
const pathToSend = pathToFileURL(
npath.fromPortablePath(
VirtualFS.resolveVirtual(npath.toPortablePath(filePath))
)
).href;
process.send({
"watch:import": pathToFileURL(
npath.fromPortablePath(
VirtualFS.resolveVirtual(npath.toPortablePath(filePath))
)
).href
"watch:import": WATCH_MODE_MESSAGE_USES_ARRAYS ? [pathToSend] : pathToSend
});
}
return {
@@ -1880,12 +1884,7 @@ function patternKeyCompare(a, b) {
return 1;
return 0;
}
function packageImportsResolve({
name,
base,
conditions,
readFileSyncFn
}) {
function packageImportsResolve({ name, base, conditions, readFileSyncFn }) {
if (name === "#" || StringPrototypeStartsWith(name, "#/") || StringPrototypeEndsWith(name, "/")) {
const reason = "is not a valid internal imports specifier name";
throw new ERR_INVALID_MODULE_SPECIFIER(name, reason, fileURLToPath(base));
@@ -2002,7 +2001,7 @@ async function resolve$1(originalSpecifier, context, nextResolve) {
let allowLegacyResolve = false;
if (dependencyNameMatch) {
const [, dependencyName, subPath] = dependencyNameMatch;
if (subPath === ``) {
if (subPath === `` && dependencyName !== `pnpapi`) {
const resolved = pnpapi.resolveToUnqualified(`${dependencyName}/package.json`, issuer);
if (resolved) {
const content = await tryReadFile$1(resolved);
@@ -2013,10 +2012,17 @@ async function resolve$1(originalSpecifier, context, nextResolve) {
}
}
}
const result = pnpapi.resolveRequest(specifier, issuer, {
conditions: new Set(conditions),
extensions: allowLegacyResolve ? void 0 : []
});
let result;
try {
result = pnpapi.resolveRequest(specifier, issuer, {
conditions: new Set(conditions),
extensions: allowLegacyResolve ? void 0 : []
});
} catch (err) {
if (err instanceof Error && `code` in err && err.code === `MODULE_NOT_FOUND`)
err.code = `ERR_MODULE_NOT_FOUND`;
throw err;
}
if (!result)
throw new Error(`Resolving '${specifier}' from '${issuer}' failed`);
const resultURL = pathToFileURL(result);
@@ -2032,32 +2038,34 @@ async function resolve$1(originalSpecifier, context, nextResolve) {
};
}
const binding = process.binding(`fs`);
const originalfstat = binding.fstat;
const ZIP_MASK = 4278190080;
const ZIP_MAGIC = 704643072;
binding.fstat = function(...args) {
const [fd, useBigint, req] = args;
if ((fd & ZIP_MASK) === ZIP_MAGIC && useBigint === false && req === void 0) {
try {
const stats = fs.fstatSync(fd);
return new Float64Array([
stats.dev,
stats.mode,
stats.nlink,
stats.uid,
stats.gid,
stats.rdev,
stats.blksize,
stats.ino,
stats.size,
stats.blocks
]);
} catch {
if (!HAS_LAZY_LOADED_TRANSLATORS) {
const binding = process.binding(`fs`);
const originalfstat = binding.fstat;
const ZIP_MASK = 4278190080;
const ZIP_MAGIC = 704643072;
binding.fstat = function(...args) {
const [fd, useBigint, req] = args;
if ((fd & ZIP_MASK) === ZIP_MAGIC && useBigint === false && req === void 0) {
try {
const stats = fs.fstatSync(fd);
return new Float64Array([
stats.dev,
stats.mode,
stats.nlink,
stats.uid,
stats.gid,
stats.rdev,
stats.blksize,
stats.ino,
stats.size,
stats.blocks
]);
} catch {
}
}
}
return originalfstat.apply(this, args);
};
return originalfstat.apply(this, args);
};
}
const resolve = resolve$1;
const getFormat = HAS_CONSOLIDATED_HOOKS ? void 0 : getFormat$1;

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.

Some files were not shown because too many files have changed in this diff Show More