Compare commits

...

12 Commits

Author SHA1 Message Date
standardci
7e1fcebdd8 chore(release): publish new version
- @standardnotes/api-gateway@1.6.1
 - @standardnotes/auth-server@1.8.0
 - @standardnotes/common@1.25.0
 - @standardnotes/domain-events-infra@1.7.5
 - @standardnotes/domain-events@2.39.0
 - @standardnotes/files-server@1.4.0
 - @standardnotes/predicates@1.2.0
 - @standardnotes/scheduler-server@1.5.0
 - @standardnotes/security@1.2.0
 - @standardnotes/syncing-server@1.5.0
2022-07-06 10:04:10 +00:00
Karol Sójko
fd4ee2123d feat: add common package 2022-07-06 12:02:39 +02:00
standardci
62caa840ef chore(release): publish new version
- @standardnotes/api-gateway@1.6.0
 - @standardnotes/auth-server@1.7.0
 - @standardnotes/files-server@1.3.0
 - @standardnotes/scheduler-server@1.4.0
 - @standardnotes/syncing-server@1.4.0
 - @standardnotes/time@1.9.0
2022-07-06 09:47:24 +00:00
Karol Sójko
565e890973 feat: add time package 2022-07-06 11:46:04 +02:00
standardci
84c4642ced chore(release): publish new version
- @standardnotes/api-gateway@1.5.0
 - @standardnotes/auth-server@1.6.0
 - @standardnotes/domain-events-infra@1.7.4
 - @standardnotes/domain-events@2.38.0
 - @standardnotes/files-server@1.2.0
 - @standardnotes/scheduler-server@1.3.2
 - @standardnotes/security@1.1.0
 - @standardnotes/syncing-server@1.3.0
2022-07-06 09:28:38 +00:00
Karol Sójko
699164eba5 fix: deps to @standarnotes/security 2022-07-06 11:27:19 +02:00
Karol Sójko
d86928f1b4 feat: add security package 2022-07-06 11:24:32 +02:00
standardci
06fc077f1b chore(release): publish new version
- @standardnotes/analytics@1.8.1
 - @standardnotes/api-gateway@1.4.2
 - @standardnotes/auth-server@1.5.1
 - @standardnotes/domain-events-infra@1.7.3
 - @standardnotes/domain-events@2.37.1
 - @standardnotes/files-server@1.1.14
 - @standardnotes/predicates@1.1.1
 - @standardnotes/scheduler-server@1.3.1
 - @standardnotes/syncing-server@1.2.2
2022-07-06 09:20:41 +00:00
Karol Sójko
97ba31f345 fix: files included in distributable packages 2022-07-06 11:19:05 +02:00
standardci
a8795defc1 chore(release): publish new version
- @standardnotes/api-gateway@1.4.1
 - @standardnotes/auth-server@1.5.0
 - @standardnotes/domain-events-infra@1.7.2
 - @standardnotes/domain-events@2.37.0
 - @standardnotes/files-server@1.1.13
 - @standardnotes/predicates@1.1.0
 - @standardnotes/scheduler-server@1.3.0
 - @standardnotes/syncing-server@1.2.1
2022-07-06 08:52:19 +00:00
Karol Sójko
1b35cf7a39 fix: scheduler to predicates imports 2022-07-06 10:51:02 +02:00
Karol Sójko
ed62ed516f feat: add predicates package 2022-07-06 10:49:22 +02:00
157 changed files with 2448 additions and 168 deletions

160
.pnp.cjs generated
View File

@@ -32,6 +32,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"name": "@standardnotes/auth-server",\
"reference": "workspace:packages/auth"\
},\
{\
"name": "@standardnotes/common",\
"reference": "workspace:packages/common"\
},\
{\
"name": "@standardnotes/domain-events",\
"reference": "workspace:packages/domain-events"\
@@ -44,13 +48,25 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"name": "@standardnotes/files-server",\
"reference": "workspace:packages/files"\
},\
{\
"name": "@standardnotes/predicates",\
"reference": "workspace:packages/predicates"\
},\
{\
"name": "@standardnotes/scheduler-server",\
"reference": "workspace:packages/scheduler"\
},\
{\
"name": "@standardnotes/security",\
"reference": "workspace:packages/security"\
},\
{\
"name": "@standardnotes/syncing-server",\
"reference": "workspace:packages/syncing-server"\
},\
{\
"name": "@standardnotes/time",\
"reference": "workspace:packages/time"\
}\
],\
"enableTopLevelFallback": true,\
@@ -59,12 +75,16 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
["@standardnotes/analytics", ["workspace:packages/analytics"]],\
["@standardnotes/api-gateway", ["workspace:packages/api-gateway"]],\
["@standardnotes/auth-server", ["workspace:packages/auth"]],\
["@standardnotes/common", ["workspace:packages/common"]],\
["@standardnotes/domain-events", ["workspace:packages/domain-events"]],\
["@standardnotes/domain-events-infra", ["workspace:packages/domain-events-infra"]],\
["@standardnotes/files-server", ["workspace:packages/files"]],\
["@standardnotes/predicates", ["workspace:packages/predicates"]],\
["@standardnotes/scheduler-server", ["workspace:packages/scheduler"]],\
["@standardnotes/security", ["workspace:packages/security"]],\
["@standardnotes/server-monorepo", ["workspace:."]],\
["@standardnotes/syncing-server", ["workspace:packages/syncing-server"]]\
["@standardnotes/syncing-server", ["workspace:packages/syncing-server"]],\
["@standardnotes/time", ["workspace:packages/time"]]\
],\
"fallbackPool": [\
],\
@@ -2652,7 +2672,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"packageDependencies": [\
["@standardnotes/api", "npm:1.1.19"],\
["@standardnotes/auth", "npm:3.19.4"],\
["@standardnotes/common", "npm:1.23.1"],\
["@standardnotes/common", "workspace:packages/common"],\
["@standardnotes/encryption", "npm:1.12.0"],\
["@standardnotes/responses", "npm:1.6.39"],\
["@standardnotes/services", "npm:1.15.0"],\
@@ -2669,10 +2689,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
["@newrelic/winston-enricher", "virtual:04783e12400851b8a3d76e71495851cc94959db6e62f04cb0a31190080629440b182d8c8eb4d7f2b04e281912f2783a5fd4d2c3c6ab68d38b7097246c93f4c19#npm:2.1.2"],\
["@sentry/node", "npm:7.5.0"],\
["@standardnotes/analytics", "workspace:packages/analytics"],\
["@standardnotes/auth", "npm:3.19.4"],\
["@standardnotes/domain-events", "workspace:packages/domain-events"],\
["@standardnotes/domain-events-infra", "workspace:packages/domain-events-infra"],\
["@standardnotes/time", "npm:1.7.1"],\
["@standardnotes/security", "workspace:packages/security"],\
["@standardnotes/time", "workspace:packages/time"],\
["@types/cors", "npm:2.8.12"],\
["@types/express", "npm:4.17.13"],\
["@types/ioredis", "npm:4.28.10"],\
@@ -2710,7 +2730,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"packageLocation": "./.yarn/cache/@standardnotes-auth-npm-3.19.4-29b35c1352-84ac9e669e.zip/node_modules/@standardnotes/auth/",\
"packageDependencies": [\
["@standardnotes/auth", "npm:3.19.4"],\
["@standardnotes/common", "npm:1.23.1"],\
["@standardnotes/common", "workspace:packages/common"],\
["jsonwebtoken", "npm:8.5.1"]\
],\
"linkType": "HARD"\
@@ -2725,17 +2745,17 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
["@sentry/node", "npm:7.5.0"],\
["@standardnotes/analytics", "workspace:packages/analytics"],\
["@standardnotes/api", "npm:1.1.19"],\
["@standardnotes/auth", "npm:3.19.4"],\
["@standardnotes/common", "npm:1.23.1"],\
["@standardnotes/common", "workspace:packages/common"],\
["@standardnotes/domain-events", "workspace:packages/domain-events"],\
["@standardnotes/domain-events-infra", "workspace:packages/domain-events-infra"],\
["@standardnotes/features", "npm:1.50.0"],\
["@standardnotes/predicates", "workspace:packages/predicates"],\
["@standardnotes/responses", "npm:1.6.39"],\
["@standardnotes/scheduler", "npm:1.1.2"],\
["@standardnotes/security", "workspace:packages/security"],\
["@standardnotes/settings", "npm:1.15.0"],\
["@standardnotes/sncrypto-common", "npm:1.9.0"],\
["@standardnotes/sncrypto-node", "npm:1.8.3"],\
["@standardnotes/time", "npm:1.7.1"],\
["@standardnotes/time", "workspace:packages/time"],\
["@types/bcryptjs", "npm:2.4.2"],\
["@types/cors", "npm:2.8.12"],\
["@types/express", "npm:4.17.13"],\
@@ -2778,12 +2798,19 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
}]\
]],\
["@standardnotes/common", [\
["npm:1.23.1", {\
"packageLocation": "./.yarn/cache/@standardnotes-common-npm-1.23.1-ed73dbb679-f498f4c469.zip/node_modules/@standardnotes/common/",\
["workspace:packages/common", {\
"packageLocation": "./packages/common/",\
"packageDependencies": [\
["@standardnotes/common", "npm:1.23.1"]\
["@standardnotes/common", "workspace:packages/common"],\
["@types/jest", "npm:27.5.2"],\
["@types/node", "npm:18.0.3"],\
["@typescript-eslint/eslint-plugin", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:5.30.5"],\
["eslint-plugin-prettier", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:4.2.1"],\
["jest", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:27.5.1"],\
["reflect-metadata", "npm:0.1.13"],\
["ts-jest", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:27.1.5"]\
],\
"linkType": "HARD"\
"linkType": "SOFT"\
}]\
]],\
["@standardnotes/config", [\
@@ -2805,10 +2832,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"packageLocation": "./packages/domain-events/",\
"packageDependencies": [\
["@standardnotes/domain-events", "workspace:packages/domain-events"],\
["@standardnotes/auth", "npm:3.19.4"],\
["@standardnotes/common", "npm:1.23.1"],\
["@standardnotes/common", "workspace:packages/common"],\
["@standardnotes/features", "npm:1.50.0"],\
["@standardnotes/scheduler", "npm:1.1.2"],\
["@standardnotes/predicates", "workspace:packages/predicates"],\
["@standardnotes/security", "workspace:packages/security"],\
["@types/jest", "npm:28.1.4"],\
["@typescript-eslint/eslint-plugin", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:5.30.5"],\
["eslint-plugin-prettier", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:4.2.1"],\
@@ -2847,7 +2874,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"packageLocation": "./.yarn/cache/@standardnotes-encryption-npm-1.12.0-eb2342c675-1a28653b1e.zip/node_modules/@standardnotes/encryption/",\
"packageDependencies": [\
["@standardnotes/encryption", "npm:1.12.0"],\
["@standardnotes/common", "npm:1.23.1"],\
["@standardnotes/common", "workspace:packages/common"],\
["@standardnotes/models", "npm:1.14.0"],\
["@standardnotes/responses", "npm:1.6.39"],\
["@standardnotes/services", "npm:1.15.0"],\
@@ -2864,7 +2891,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"packageDependencies": [\
["@standardnotes/features", "npm:1.50.0"],\
["@standardnotes/auth", "npm:3.19.4"],\
["@standardnotes/common", "npm:1.23.1"],\
["@standardnotes/common", "workspace:packages/common"],\
["reflect-metadata", "npm:0.1.13"]\
],\
"linkType": "HARD"\
@@ -2876,14 +2903,14 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"packageDependencies": [\
["@standardnotes/files-server", "workspace:packages/files"],\
["@sentry/node", "npm:7.5.0"],\
["@standardnotes/auth", "npm:3.19.4"],\
["@standardnotes/common", "npm:1.23.1"],\
["@standardnotes/common", "workspace:packages/common"],\
["@standardnotes/config", "npm:2.4.3"],\
["@standardnotes/domain-events", "workspace:packages/domain-events"],\
["@standardnotes/domain-events-infra", "workspace:packages/domain-events-infra"],\
["@standardnotes/security", "workspace:packages/security"],\
["@standardnotes/sncrypto-common", "npm:1.9.0"],\
["@standardnotes/sncrypto-node", "npm:1.8.3"],\
["@standardnotes/time", "npm:1.7.1"],\
["@standardnotes/time", "workspace:packages/time"],\
["@types/connect-busboy", "npm:1.0.0"],\
["@types/cors", "npm:2.8.12"],\
["@types/express", "npm:4.17.13"],\
@@ -2927,7 +2954,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"packageLocation": "./.yarn/cache/@standardnotes-models-npm-1.14.0-6f064d99e7-bfb9d517b6.zip/node_modules/@standardnotes/models/",\
"packageDependencies": [\
["@standardnotes/models", "npm:1.14.0"],\
["@standardnotes/common", "npm:1.23.1"],\
["@standardnotes/common", "workspace:packages/common"],\
["@standardnotes/features", "npm:1.50.0"],\
["@standardnotes/responses", "npm:1.6.39"],\
["@standardnotes/utils", "npm:1.6.12"],\
@@ -2942,35 +2969,41 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"packageLocation": "./.yarn/cache/@standardnotes-payloads-npm-1.5.1-45dffe2f5c-65c28421e7.zip/node_modules/@standardnotes/payloads/",\
"packageDependencies": [\
["@standardnotes/payloads", "npm:1.5.1"],\
["@standardnotes/common", "npm:1.23.1"],\
["@standardnotes/common", "workspace:packages/common"],\
["@standardnotes/features", "npm:1.50.0"],\
["@standardnotes/utils", "npm:1.6.12"]\
],\
"linkType": "HARD"\
}]\
]],\
["@standardnotes/predicates", [\
["workspace:packages/predicates", {\
"packageLocation": "./packages/predicates/",\
"packageDependencies": [\
["@standardnotes/predicates", "workspace:packages/predicates"],\
["@standardnotes/common", "workspace:packages/common"],\
["@types/jest", "npm:27.5.2"],\
["@typescript-eslint/eslint-plugin", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:5.30.5"],\
["eslint-plugin-prettier", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:4.2.1"],\
["jest", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:27.5.1"],\
["reflect-metadata", "npm:0.1.13"],\
["ts-jest", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:27.1.5"]\
],\
"linkType": "SOFT"\
}]\
]],\
["@standardnotes/responses", [\
["npm:1.6.39", {\
"packageLocation": "./.yarn/cache/@standardnotes-responses-npm-1.6.39-395f4c2d65-0ea1d4d5b8.zip/node_modules/@standardnotes/responses/",\
"packageDependencies": [\
["@standardnotes/responses", "npm:1.6.39"],\
["@standardnotes/auth", "npm:3.19.4"],\
["@standardnotes/common", "npm:1.23.1"],\
["@standardnotes/common", "workspace:packages/common"],\
["@standardnotes/features", "npm:1.50.0"]\
],\
"linkType": "HARD"\
}]\
]],\
["@standardnotes/scheduler", [\
["npm:1.1.2", {\
"packageLocation": "./.yarn/cache/@standardnotes-scheduler-npm-1.1.2-78f89314fb-68642a0874.zip/node_modules/@standardnotes/scheduler/",\
"packageDependencies": [\
["@standardnotes/scheduler", "npm:1.1.2"],\
["@standardnotes/common", "npm:1.23.1"]\
],\
"linkType": "HARD"\
}]\
]],\
["@standardnotes/scheduler-server", [\
["workspace:packages/scheduler", {\
"packageLocation": "./packages/scheduler/",\
@@ -2978,11 +3011,11 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
["@standardnotes/scheduler-server", "workspace:packages/scheduler"],\
["@newrelic/winston-enricher", "virtual:04783e12400851b8a3d76e71495851cc94959db6e62f04cb0a31190080629440b182d8c8eb4d7f2b04e281912f2783a5fd4d2c3c6ab68d38b7097246c93f4c19#npm:2.1.2"],\
["@sentry/node", "npm:7.5.0"],\
["@standardnotes/common", "npm:1.23.1"],\
["@standardnotes/common", "workspace:packages/common"],\
["@standardnotes/domain-events", "workspace:packages/domain-events"],\
["@standardnotes/domain-events-infra", "workspace:packages/domain-events-infra"],\
["@standardnotes/scheduler", "npm:1.1.2"],\
["@standardnotes/time", "npm:1.7.1"],\
["@standardnotes/predicates", "workspace:packages/predicates"],\
["@standardnotes/time", "workspace:packages/time"],\
["@types/ioredis", "npm:4.28.10"],\
["@types/jest", "npm:28.1.4"],\
["@types/newrelic", "npm:7.0.3"],\
@@ -3006,6 +3039,24 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"linkType": "SOFT"\
}]\
]],\
["@standardnotes/security", [\
["workspace:packages/security", {\
"packageLocation": "./packages/security/",\
"packageDependencies": [\
["@standardnotes/security", "workspace:packages/security"],\
["@standardnotes/common", "workspace:packages/common"],\
["@types/jest", "npm:27.5.2"],\
["@types/jsonwebtoken", "npm:8.5.8"],\
["@typescript-eslint/eslint-plugin", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:5.30.5"],\
["eslint-plugin-prettier", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:4.2.1"],\
["jest", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:27.5.1"],\
["jsonwebtoken", "npm:8.5.1"],\
["reflect-metadata", "npm:0.1.13"],\
["ts-jest", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:27.1.5"]\
],\
"linkType": "SOFT"\
}]\
]],\
["@standardnotes/server-monorepo", [\
["workspace:.", {\
"packageLocation": "./",\
@@ -3039,7 +3090,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"packageDependencies": [\
["@standardnotes/services", "npm:1.15.0"],\
["@standardnotes/auth", "npm:3.19.4"],\
["@standardnotes/common", "npm:1.23.1"],\
["@standardnotes/common", "workspace:packages/common"],\
["@standardnotes/models", "npm:1.14.0"],\
["@standardnotes/responses", "npm:1.6.39"],\
["@standardnotes/utils", "npm:1.6.12"],\
@@ -3084,14 +3135,14 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
["@newrelic/winston-enricher", "virtual:04783e12400851b8a3d76e71495851cc94959db6e62f04cb0a31190080629440b182d8c8eb4d7f2b04e281912f2783a5fd4d2c3c6ab68d38b7097246c93f4c19#npm:2.1.2"],\
["@sentry/node", "npm:7.5.0"],\
["@standardnotes/analytics", "workspace:packages/analytics"],\
["@standardnotes/auth", "npm:3.19.4"],\
["@standardnotes/common", "npm:1.23.1"],\
["@standardnotes/common", "workspace:packages/common"],\
["@standardnotes/domain-events", "workspace:packages/domain-events"],\
["@standardnotes/domain-events-infra", "workspace:packages/domain-events-infra"],\
["@standardnotes/payloads", "npm:1.5.1"],\
["@standardnotes/responses", "npm:1.6.39"],\
["@standardnotes/security", "workspace:packages/security"],\
["@standardnotes/settings", "npm:1.15.0"],\
["@standardnotes/time", "npm:1.7.1"],\
["@standardnotes/time", "workspace:packages/time"],\
["@types/cors", "npm:2.8.12"],\
["@types/dotenv", "npm:8.2.0"],\
["@types/express", "npm:4.17.13"],\
@@ -3133,15 +3184,21 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
}]\
]],\
["@standardnotes/time", [\
["npm:1.7.1", {\
"packageLocation": "./.yarn/cache/@standardnotes-time-npm-1.7.1-e6859705d5-ccb9c4af73.zip/node_modules/@standardnotes/time/",\
["workspace:packages/time", {\
"packageLocation": "./packages/time/",\
"packageDependencies": [\
["@standardnotes/time", "npm:1.7.1"],\
["@standardnotes/time", "workspace:packages/time"],\
["@types/jest", "npm:27.5.2"],\
["@types/microtime", "npm:2.1.0"],\
["@typescript-eslint/eslint-plugin", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:5.30.5"],\
["dayjs", "npm:1.11.3"],\
["eslint-plugin-prettier", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:4.2.1"],\
["jest", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:27.5.1"],\
["microtime", "npm:3.1.0"],\
["reflect-metadata", "npm:0.1.13"]\
["reflect-metadata", "npm:0.1.13"],\
["ts-jest", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:27.1.5"]\
],\
"linkType": "HARD"\
"linkType": "SOFT"\
}]\
]],\
["@standardnotes/utils", [\
@@ -3149,7 +3206,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"packageLocation": "./.yarn/cache/@standardnotes-utils-npm-1.6.12-8fa8d7d09b-e177b1fa51.zip/node_modules/@standardnotes/utils/",\
"packageDependencies": [\
["@standardnotes/utils", "npm:1.6.12"],\
["@standardnotes/common", "npm:1.23.1"],\
["@standardnotes/common", "workspace:packages/common"],\
["dompurify", "npm:2.3.8"],\
["lodash", "npm:4.17.21"]\
],\
@@ -3476,6 +3533,15 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
"linkType": "HARD"\
}]\
]],\
["@types/microtime", [\
["npm:2.1.0", {\
"packageLocation": "./.yarn/cache/@types-microtime-npm-2.1.0-111ed89518-6c23131fe4.zip/node_modules/@types/microtime/",\
"packageDependencies": [\
["@types/microtime", "npm:2.1.0"]\
],\
"linkType": "HARD"\
}]\
]],\
["@types/mime", [\
["npm:1.3.2", {\
"packageLocation": "./.yarn/cache/@types-mime-npm-1.3.2-ea71878ab3-0493368244.zip/node_modules/@types/mime/",\

Binary file not shown.

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.8.1](https://github.com/standardnotes/server/compare/@standardnotes/analytics@1.8.0...@standardnotes/analytics@1.8.1) (2022-07-06)
### Bug Fixes
* files included in distributable packages ([97ba31f](https://github.com/standardnotes/server/commit/97ba31f345fc95df0c15a348f0461fb9e5bcb923))
# 1.8.0 (2022-07-06)
### Features

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/analytics",
"version": "1.8.0",
"version": "1.8.1",
"engines": {
"node": ">=14.0.0 <17.0.0"
},
@@ -9,7 +9,8 @@
"author": "Standard Notes",
"types": "dist/src/index.d.ts",
"files": [
"dist/src"
"dist/src/**/*.js",
"dist/src/**/*.d.ts"
],
"publishConfig": {
"access": "public"

View File

@@ -3,6 +3,34 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.6.1](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.6.0...@standardnotes/api-gateway@1.6.1) (2022-07-06)
**Note:** Version bump only for package @standardnotes/api-gateway
# [1.6.0](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.5.0...@standardnotes/api-gateway@1.6.0) (2022-07-06)
### Features
* add time package ([565e890](https://github.com/standardnotes/api-gateway/commit/565e890973b1d96544bb750fdd700d58f8dad088))
# [1.5.0](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.4.2...@standardnotes/api-gateway@1.5.0) (2022-07-06)
### Bug Fixes
* deps to @standarnotes/security ([699164e](https://github.com/standardnotes/api-gateway/commit/699164eba553cd07fb50f7a06ae8991028167603))
### Features
* add security package ([d86928f](https://github.com/standardnotes/api-gateway/commit/d86928f1b4b5feda8c330ed8ee0bf9de0fc12ae7))
## [1.4.2](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.4.1...@standardnotes/api-gateway@1.4.2) (2022-07-06)
**Note:** Version bump only for package @standardnotes/api-gateway
## [1.4.1](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.4.0...@standardnotes/api-gateway@1.4.1) (2022-07-06)
**Note:** Version bump only for package @standardnotes/api-gateway
# [1.4.0](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.3.5...@standardnotes/api-gateway@1.4.0) (2022-07-06)
### Features

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/api-gateway",
"version": "1.4.0",
"version": "1.6.1",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -25,10 +25,10 @@
"@newrelic/winston-enricher": "^2.1.0",
"@sentry/node": "^7.3.0",
"@standardnotes/analytics": "workspace:*",
"@standardnotes/auth": "3.19.4",
"@standardnotes/domain-events": "workspace:*",
"@standardnotes/domain-events-infra": "workspace:*",
"@standardnotes/time": "^1.7.1",
"@standardnotes/security": "workspace:*",
"@standardnotes/time": "workspace:*",
"aws-sdk": "^2.1160.0",
"axios": "0.24.0",
"cors": "2.8.5",

View File

@@ -1,4 +1,4 @@
import { CrossServiceTokenData } from '@standardnotes/auth'
import { CrossServiceTokenData } from '@standardnotes/security'
import { TimerInterface } from '@standardnotes/time'
import { NextFunction, Request, Response } from 'express'
import { inject, injectable } from 'inversify'

View File

@@ -1,4 +1,4 @@
import { OfflineUserTokenData, CrossServiceTokenData } from '@standardnotes/auth'
import { OfflineUserTokenData, CrossServiceTokenData } from '@standardnotes/security'
import { NextFunction, Request, Response } from 'express'
import { inject, injectable } from 'inversify'
import { BaseMiddleware } from 'inversify-express-utils'

View File

@@ -3,6 +3,42 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [1.8.0](https://github.com/standardnotes/auth/compare/@standardnotes/auth-server@1.7.0...@standardnotes/auth-server@1.8.0) (2022-07-06)
### Features
* add common package ([fd4ee21](https://github.com/standardnotes/auth/commit/fd4ee2123dc72b4d8755504d57bced608c1ab928))
# [1.7.0](https://github.com/standardnotes/auth/compare/@standardnotes/auth-server@1.6.0...@standardnotes/auth-server@1.7.0) (2022-07-06)
### Features
* add time package ([565e890](https://github.com/standardnotes/auth/commit/565e890973b1d96544bb750fdd700d58f8dad088))
# [1.6.0](https://github.com/standardnotes/auth/compare/@standardnotes/auth-server@1.5.1...@standardnotes/auth-server@1.6.0) (2022-07-06)
### Bug Fixes
* deps to @standarnotes/security ([699164e](https://github.com/standardnotes/auth/commit/699164eba553cd07fb50f7a06ae8991028167603))
### Features
* add security package ([d86928f](https://github.com/standardnotes/auth/commit/d86928f1b4b5feda8c330ed8ee0bf9de0fc12ae7))
## [1.5.1](https://github.com/standardnotes/auth/compare/@standardnotes/auth-server@1.5.0...@standardnotes/auth-server@1.5.1) (2022-07-06)
**Note:** Version bump only for package @standardnotes/auth-server
# [1.5.0](https://github.com/standardnotes/auth/compare/@standardnotes/auth-server@1.4.0...@standardnotes/auth-server@1.5.0) (2022-07-06)
### Bug Fixes
* scheduler to predicates imports ([1b35cf7](https://github.com/standardnotes/auth/commit/1b35cf7a392fbe6c4b49889f92ffab6ddd7bb181))
### Features
* add predicates package ([ed62ed5](https://github.com/standardnotes/auth/commit/ed62ed516f5cf8784975f41680366bf0518ce491))
# [1.4.0](https://github.com/standardnotes/auth/compare/@standardnotes/auth-server@1.3.14...@standardnotes/auth-server@1.4.0) (2022-07-06)
### Features

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/auth-server",
"version": "1.4.0",
"version": "1.8.0",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -35,17 +35,17 @@
"@sentry/node": "^7.3.0",
"@standardnotes/analytics": "workspace:*",
"@standardnotes/api": "^1.1.19",
"@standardnotes/auth": "^3.19.4",
"@standardnotes/common": "^1.23.1",
"@standardnotes/common": "workspace:*",
"@standardnotes/domain-events": "workspace:*",
"@standardnotes/domain-events-infra": "workspace:*",
"@standardnotes/features": "^1.47.0",
"@standardnotes/predicates": "workspace:*",
"@standardnotes/responses": "^1.6.39",
"@standardnotes/scheduler": "^1.1.2",
"@standardnotes/security": "workspace:*",
"@standardnotes/settings": "^1.15.0",
"@standardnotes/sncrypto-common": "^1.9.0",
"@standardnotes/sncrypto-node": "^1.8.3",
"@standardnotes/time": "^1.7.1",
"@standardnotes/time": "workspace:*",
"aws-sdk": "^2.1159.0",
"axios": "0.24.0",
"bcryptjs": "2.4.3",

View File

@@ -143,7 +143,7 @@ import {
TokenEncoder,
TokenEncoderInterface,
ValetTokenData,
} from '@standardnotes/auth'
} from '@standardnotes/security'
import { FileUploadedEventHandler } from '../Domain/Handler/FileUploadedEventHandler'
import { CreateValetToken } from '../Domain/UseCase/CreateValetToken/CreateValetToken'
import { CreateListedAccount } from '../Domain/UseCase/CreateListedAccount/CreateListedAccount'

View File

@@ -3,7 +3,7 @@ import 'reflect-metadata'
import { ApiGatewayAuthMiddleware } from './ApiGatewayAuthMiddleware'
import { NextFunction, Request, Response } from 'express'
import { Logger } from 'winston'
import { CrossServiceTokenData, TokenDecoderInterface } from '@standardnotes/auth'
import { CrossServiceTokenData, TokenDecoderInterface } from '@standardnotes/security'
import { RoleName } from '@standardnotes/common'
describe('ApiGatewayAuthMiddleware', () => {

View File

@@ -1,4 +1,4 @@
import { CrossServiceTokenData, TokenDecoderInterface } from '@standardnotes/auth'
import { CrossServiceTokenData, TokenDecoderInterface } from '@standardnotes/security'
import { NextFunction, Request, Response } from 'express'
import { inject, injectable } from 'inversify'
import { BaseMiddleware } from 'inversify-express-utils'

View File

@@ -3,7 +3,7 @@ import 'reflect-metadata'
import { ApiGatewayOfflineAuthMiddleware } from './ApiGatewayOfflineAuthMiddleware'
import { NextFunction, Request, Response } from 'express'
import { Logger } from 'winston'
import { OfflineUserTokenData, TokenDecoderInterface } from '@standardnotes/auth'
import { OfflineUserTokenData, TokenDecoderInterface } from '@standardnotes/security'
describe('ApiGatewayOfflineAuthMiddleware', () => {
let tokenDecoder: TokenDecoderInterface<OfflineUserTokenData>

View File

@@ -1,4 +1,4 @@
import { OfflineUserTokenData, TokenDecoderInterface } from '@standardnotes/auth'
import { OfflineUserTokenData, TokenDecoderInterface } from '@standardnotes/security'
import { NextFunction, Request, Response } from 'express'
import { inject, injectable } from 'inversify'
import { BaseMiddleware } from 'inversify-express-utils'

View File

@@ -11,7 +11,7 @@ import { CreateOfflineSubscriptionTokenResponse } from '../Domain/UseCase/Create
import { AuthenticateOfflineSubscriptionToken } from '../Domain/UseCase/AuthenticateOfflineSubscriptionToken/AuthenticateOfflineSubscriptionToken'
import { OfflineUserSubscription } from '../Domain/Subscription/OfflineUserSubscription'
import { GetUserOfflineSubscription } from '../Domain/UseCase/GetUserOfflineSubscription/GetUserOfflineSubscription'
import { OfflineUserTokenData, TokenEncoderInterface } from '@standardnotes/auth'
import { OfflineUserTokenData, TokenEncoderInterface } from '@standardnotes/security'
import { SubscriptionName } from '@standardnotes/common'
import { Logger } from 'winston'

View File

@@ -14,7 +14,7 @@ import { AuthenticateOfflineSubscriptionToken } from '../Domain/UseCase/Authenti
import { CreateOfflineSubscriptionToken } from '../Domain/UseCase/CreateOfflineSubscriptionToken/CreateOfflineSubscriptionToken'
import { GetUserOfflineSubscription } from '../Domain/UseCase/GetUserOfflineSubscription/GetUserOfflineSubscription'
import { Logger } from 'winston'
import { OfflineUserTokenData, TokenEncoderInterface } from '@standardnotes/auth'
import { OfflineUserTokenData, TokenEncoderInterface } from '@standardnotes/security'
@controller('/offline')
export class OfflineController extends BaseHttpController {

View File

@@ -10,7 +10,7 @@ import { GetActiveSessionsForUser } from '../Domain/UseCase/GetActiveSessionsFor
import { AuthenticateRequest } from '../Domain/UseCase/AuthenticateRequest'
import { User } from '../Domain/User/User'
import { Role } from '../Domain/Role/Role'
import { CrossServiceTokenData, TokenEncoderInterface } from '@standardnotes/auth'
import { CrossServiceTokenData, TokenEncoderInterface } from '@standardnotes/security'
import { GetUserAnalyticsId } from '../Domain/UseCase/GetUserAnalyticsId/GetUserAnalyticsId'
describe('SessionsController', () => {

View File

@@ -16,7 +16,7 @@ import { Role } from '../Domain/Role/Role'
import { User } from '../Domain/User/User'
import { ProjectorInterface } from '../Projection/ProjectorInterface'
import { SessionProjector } from '../Projection/SessionProjector'
import { CrossServiceTokenData, TokenEncoderInterface } from '@standardnotes/auth'
import { CrossServiceTokenData, TokenEncoderInterface } from '@standardnotes/security'
import { RoleName } from '@standardnotes/common'
import { GetUserAnalyticsId } from '../Domain/UseCase/GetUserAnalyticsId/GetUserAnalyticsId'

View File

@@ -1,4 +1,4 @@
import { Role } from '@standardnotes/auth'
import { Role } from '@standardnotes/security'
import { Request, Response } from 'express'
import { inject } from 'inversify'
import {

View File

@@ -12,7 +12,7 @@ import { ProjectorInterface } from '../Projection/ProjectorInterface'
import { Role } from '../Domain/Role/Role'
import { SettingServiceInterface } from '../Domain/Setting/SettingServiceInterface'
import { Setting } from '../Domain/Setting/Setting'
import { CrossServiceTokenData, TokenEncoderInterface } from '@standardnotes/auth'
import { CrossServiceTokenData, TokenEncoderInterface } from '@standardnotes/security'
import { GetUserAnalyticsId } from '../Domain/UseCase/GetUserAnalyticsId/GetUserAnalyticsId'
describe('SubscriptionTokensController', () => {

View File

@@ -1,4 +1,4 @@
import { CrossServiceTokenData, TokenEncoderInterface } from '@standardnotes/auth'
import { CrossServiceTokenData, TokenEncoderInterface } from '@standardnotes/security'
import { ErrorTag, RoleName } from '@standardnotes/common'
import { SettingName } from '@standardnotes/settings'
import { Request, Response } from 'express'

View File

@@ -1,6 +1,6 @@
import 'reflect-metadata'
import { SessionTokenData, TokenEncoderInterface } from '@standardnotes/auth'
import { SessionTokenData, TokenEncoderInterface } from '@standardnotes/security'
import { Logger } from 'winston'
import { ProjectorInterface } from '../../Projection/ProjectorInterface'

View File

@@ -1,4 +1,4 @@
import { SessionTokenData, TokenEncoderInterface } from '@standardnotes/auth'
import { SessionTokenData, TokenEncoderInterface } from '@standardnotes/security'
import { Uuid } from '@standardnotes/common'
import * as crypto from 'crypto'

View File

@@ -1,4 +1,4 @@
import { SessionTokenData, TokenEncoderInterface } from '@standardnotes/auth'
import { SessionTokenData, TokenEncoderInterface } from '@standardnotes/security'
import 'reflect-metadata'
import { Logger } from 'winston'

View File

@@ -1,6 +1,6 @@
import 'reflect-metadata'
import { SessionTokenData, TokenEncoderInterface } from '@standardnotes/auth'
import { SessionTokenData, TokenEncoderInterface } from '@standardnotes/security'
import { SessionBody } from '@standardnotes/responses'
import { Logger } from 'winston'

View File

@@ -2,7 +2,7 @@ import {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
SessionTokenData,
TokenEncoderInterface,
} from '@standardnotes/auth'
} from '@standardnotes/security'
import { Uuid } from '@standardnotes/common'
import { SessionBody } from '@standardnotes/responses'
import { inject, injectable } from 'inversify'

View File

@@ -1,6 +1,6 @@
import 'reflect-metadata'
import { SessionTokenData, TokenDecoderInterface } from '@standardnotes/auth'
import { SessionTokenData, TokenDecoderInterface } from '@standardnotes/security'
import { RevokedSession } from '../Session/RevokedSession'
import { Session } from '../Session/Session'

View File

@@ -1,4 +1,4 @@
import { SessionTokenData, TokenDecoderInterface } from '@standardnotes/auth'
import { SessionTokenData, TokenDecoderInterface } from '@standardnotes/security'
import { inject, injectable } from 'inversify'
import TYPES from '../../Bootstrap/Types'
import { SessionServiceInterface } from '../Session/SessionServiceInterface'

View File

@@ -1,7 +1,7 @@
import 'reflect-metadata'
import { EmailMessageIdentifier, RoleName } from '@standardnotes/common'
import { PredicateName, PredicateAuthority, PredicateVerificationResult } from '@standardnotes/scheduler'
import { PredicateName, PredicateAuthority, PredicateVerificationResult } from '@standardnotes/predicates'
import { TimerInterface } from '@standardnotes/time'
import { DomainEventFactory } from './DomainEventFactory'

View File

@@ -16,7 +16,7 @@ import {
DomainEventService,
EmailMessageRequestedEvent,
} from '@standardnotes/domain-events'
import { Predicate, PredicateVerificationResult } from '@standardnotes/scheduler'
import { Predicate, PredicateVerificationResult } from '@standardnotes/predicates'
import { TimerInterface } from '@standardnotes/time'
import { inject, injectable } from 'inversify'
import TYPES from '../../Bootstrap/Types'

View File

@@ -1,5 +1,5 @@
import { Uuid, RoleName, EmailMessageIdentifier } from '@standardnotes/common'
import { Predicate, PredicateVerificationResult } from '@standardnotes/scheduler'
import { Predicate, PredicateVerificationResult } from '@standardnotes/predicates'
import {
AccountDeletionRequestedEvent,
CloudBackupRequestedEvent,

View File

@@ -1,6 +1,6 @@
import 'reflect-metadata'
import { Role } from '@standardnotes/auth'
import { Role } from '@standardnotes/security'
import { RoleName, SubscriptionName } from '@standardnotes/common'
import { RoleToSubscriptionMapInterface } from '../Role/RoleToSubscriptionMapInterface'

View File

@@ -1,6 +1,6 @@
import { DomainEventHandlerInterface, ExtensionKeyGrantedEvent } from '@standardnotes/domain-events'
import { SettingName } from '@standardnotes/settings'
import { OfflineFeaturesTokenData } from '@standardnotes/auth'
import { OfflineFeaturesTokenData } from '@standardnotes/security'
import { ContentDecoderInterface } from '@standardnotes/common'
import { inject, injectable } from 'inversify'
import { Logger } from 'winston'

View File

@@ -7,7 +7,7 @@ import {
PredicateVerificationRequestedEventPayload,
PredicateVerifiedEvent,
} from '@standardnotes/domain-events'
import { Predicate, PredicateVerificationResult } from '@standardnotes/scheduler'
import { Predicate, PredicateVerificationResult } from '@standardnotes/predicates'
import { Logger } from 'winston'
import { DomainEventFactoryInterface } from '../Event/DomainEventFactoryInterface'

View File

@@ -1,4 +1,4 @@
import { OfflineFeaturesTokenData } from '@standardnotes/auth'
import { OfflineFeaturesTokenData } from '@standardnotes/security'
import { DomainEventHandlerInterface, SubscriptionSyncRequestedEvent } from '@standardnotes/domain-events'
import { inject, injectable } from 'inversify'
import { Logger } from 'winston'

View File

@@ -1,6 +1,6 @@
import 'reflect-metadata'
import { TokenEncoderInterface, ValetTokenData } from '@standardnotes/auth'
import { TokenEncoderInterface, ValetTokenData } from '@standardnotes/security'
import { CreateValetToken } from './CreateValetToken'
import { TimerInterface } from '@standardnotes/time'
import { UserSubscription } from '../../Subscription/UserSubscription'

View File

@@ -1,7 +1,7 @@
import { inject, injectable } from 'inversify'
import { SubscriptionName } from '@standardnotes/common'
import { TimerInterface } from '@standardnotes/time'
import { TokenEncoderInterface, ValetTokenData } from '@standardnotes/auth'
import { TokenEncoderInterface, ValetTokenData } from '@standardnotes/security'
import { CreateValetTokenPayload, CreateValetTokenResponseData } from '@standardnotes/responses'
import { SubscriptionSettingName } from '@standardnotes/settings'

View File

@@ -7,7 +7,7 @@ import { VerifyMFA } from './VerifyMFA'
import { Setting } from '../Setting/Setting'
import { SettingServiceInterface } from '../Setting/SettingServiceInterface'
import { SettingName } from '@standardnotes/settings'
import { SelectorInterface } from '@standardnotes/auth'
import { SelectorInterface } from '@standardnotes/security'
import { LockRepositoryInterface } from '../User/LockRepositoryInterface'
describe('VerifyMFA', () => {

View File

@@ -12,7 +12,7 @@ import { UseCaseInterface } from './UseCaseInterface'
import { VerifyMFADTO } from './VerifyMFADTO'
import { VerifyMFAResponse } from './VerifyMFAResponse'
import { SettingServiceInterface } from '../Setting/SettingServiceInterface'
import { SelectorInterface } from '@standardnotes/auth'
import { SelectorInterface } from '@standardnotes/security'
import { LockRepositoryInterface } from '../User/LockRepositoryInterface'
@injectable()

View File

@@ -1,6 +1,6 @@
import 'reflect-metadata'
import { PredicateName, PredicateVerificationResult, PredicateAuthority } from '@standardnotes/scheduler'
import { PredicateName, PredicateVerificationResult, PredicateAuthority } from '@standardnotes/predicates'
import { Setting } from '../../Setting/Setting'
import { SettingRepositoryInterface } from '../../Setting/SettingRepositoryInterface'

View File

@@ -1,5 +1,5 @@
import { Uuid } from '@standardnotes/common'
import { PredicateName, PredicateVerificationResult } from '@standardnotes/scheduler'
import { PredicateName, PredicateVerificationResult } from '@standardnotes/predicates'
import { EmailBackupFrequency, SettingName } from '@standardnotes/settings'
import { inject, injectable } from 'inversify'

View File

@@ -1,5 +1,5 @@
import { Uuid } from '@standardnotes/common'
import { Predicate } from '@standardnotes/scheduler'
import { Predicate } from '@standardnotes/predicates'
export type VerifyPredicateDTO = {
predicate: Predicate

View File

@@ -1,4 +1,4 @@
import { PredicateVerificationResult } from '@standardnotes/scheduler'
import { PredicateVerificationResult } from '@standardnotes/predicates'
export type VerifyPredicateResponse = {
predicateVerificationResult: PredicateVerificationResult

View File

@@ -1,6 +1,6 @@
import 'reflect-metadata'
import { SelectorInterface } from '@standardnotes/auth'
import { SelectorInterface } from '@standardnotes/security'
import { ProtocolVersion } from '@standardnotes/common'
import { KeyParamsFactory } from './KeyParamsFactory'

View File

@@ -6,7 +6,7 @@ import { inject, injectable } from 'inversify'
import TYPES from '../../Bootstrap/Types'
import { KeyParamsFactoryInterface } from './KeyParamsFactoryInterface'
import { User } from './User'
import { SelectorInterface } from '@standardnotes/auth'
import { SelectorInterface } from '@standardnotes/security'
@injectable()
export class KeyParamsFactory implements KeyParamsFactoryInterface {

View File

@@ -0,0 +1 @@
dist

View File

@@ -0,0 +1,6 @@
{
"extends": "../../.eslintrc",
"parserOptions": {
"project": "./linter.tsconfig.json"
}
}

View File

@@ -0,0 +1,264 @@
# Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# 1.25.0 (2022-07-06)
### Features
* add common package ([fd4ee21](https://github.com/standardnotes/server/commit/fd4ee2123dc72b4d8755504d57bced608c1ab928))
## [1.23.2](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.23.1...@standardnotes/common@1.23.2) (2022-07-04)
### Bug Fixes
* add missing reflect-metadata package ([70aa494](https://github.com/standardnotes/snjs/commit/70aa4943a3fde70d4360055db22cb5388fc3f76e))
## [1.23.1](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.23.0...@standardnotes/common@1.23.1) (2022-06-27)
### Bug Fixes
* add email message identifier for files email campaign ([affa300](https://github.com/standardnotes/snjs/commit/affa3005b6933165e262227282198310f0a65cb3))
# [1.23.0](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.22.0...@standardnotes/common@1.23.0) (2022-06-15)
### Features
* add email requested events ([4d501fa](https://github.com/standardnotes/snjs/commit/4d501faedad44ff23782db1704956a6c19365fb6))
# [1.22.0](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.21.0...@standardnotes/common@1.22.0) (2022-05-22)
### Features
* optional files navigation ([#745](https://github.com/standardnotes/snjs/issues/745)) ([8512166](https://github.com/standardnotes/snjs/commit/851216615478b57b11a570173f94ee598bec31c0))
# [1.21.0](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.20.1...@standardnotes/common@1.21.0) (2022-05-17)
### Features
* remove basic user role and core subscription plan ([#741](https://github.com/standardnotes/snjs/issues/741)) ([7800ecd](https://github.com/standardnotes/snjs/commit/7800ecd119e7bbb5872d48bd7806b5d0f5522c0e))
## [1.20.1](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.20.0...@standardnotes/common@1.20.1) (2022-05-16)
**Note:** Version bump only for package @standardnotes/common
# [1.20.0](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.19.8...@standardnotes/common@1.20.0) (2022-05-16)
### Features
* remove basic user role and core subscription plan names ([304e232](https://github.com/standardnotes/snjs/commit/304e232e738456a93374de869117b5579e8a8f57))
## [1.19.8](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.19.6...@standardnotes/common@1.19.8) (2022-05-04)
**Note:** Version bump only for package @standardnotes/common
## [1.19.7](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.19.6...@standardnotes/common@1.19.7) (2022-05-04)
**Note:** Version bump only for package @standardnotes/common
## [1.19.6](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.19.5...@standardnotes/common@1.19.6) (2022-04-22)
**Note:** Version bump only for package @standardnotes/common
## [1.19.5](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.19.4...@standardnotes/common@1.19.5) (2022-04-21)
### Bug Fixes
* abort key recovery after aborted challenge ([#703](https://github.com/standardnotes/snjs/issues/703)) ([a67fb7e](https://github.com/standardnotes/snjs/commit/a67fb7e8cde41a5c9fadf545933e35d525faeaf0))
## [1.19.4](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.19.3...@standardnotes/common@1.19.4) (2022-04-15)
**Note:** Version bump only for package @standardnotes/common
## [1.19.3](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.19.2...@standardnotes/common@1.19.3) (2022-04-11)
**Note:** Version bump only for package @standardnotes/common
## [1.19.2](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.19.1...@standardnotes/common@1.19.2) (2022-04-01)
**Note:** Version bump only for package @standardnotes/common
## [1.19.1](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.19.0...@standardnotes/common@1.19.1) (2022-03-31)
**Note:** Version bump only for package @standardnotes/common
# [1.19.0](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.18.0...@standardnotes/common@1.19.0) (2022-03-31)
### Features
* encryption and models packages ([#679](https://github.com/standardnotes/snjs/issues/679)) ([5e03d48](https://github.com/standardnotes/snjs/commit/5e03d48aba7e3dd266117201139ab869b1f70cc9))
# [1.18.0](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.17.0...@standardnotes/common@1.18.0) (2022-03-30)
### Features
* files-beta role ([#678](https://github.com/standardnotes/snjs/issues/678)) ([f1ae62f](https://github.com/standardnotes/snjs/commit/f1ae62ff05e361dc551f1a0d047feabd129d0f76))
# [1.17.0](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.16.2...@standardnotes/common@1.17.0) (2022-03-22)
### Features
* add read only access error tag ([c3c7b4c](https://github.com/standardnotes/snjs/commit/c3c7b4c12f9b23dfc8e4bf1d4af43f6307f64190))
## [1.16.2](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.16.1...@standardnotes/common@1.16.2) (2022-03-21)
**Note:** Version bump only for package @standardnotes/common
## [1.16.1](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.16.0...@standardnotes/common@1.16.1) (2022-03-18)
### Bug Fixes
* add demo user role ([aa7ebc8](https://github.com/standardnotes/snjs/commit/aa7ebc84ef1160688d2767b86a32719ce68a257b))
# [1.16.0](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.15.3...@standardnotes/common@1.16.0) (2022-03-16)
### Features
* delete file functionality ([#657](https://github.com/standardnotes/snjs/issues/657)) ([edec4f7](https://github.com/standardnotes/snjs/commit/edec4f7a65ef557ed5f47be4dddcf2b659ee28b4))
## [1.15.4](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.15.3...@standardnotes/common@1.15.4) (2022-03-16)
**Note:** Version bump only for package @standardnotes/common
## [1.15.3](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.15.1...@standardnotes/common@1.15.3) (2022-02-28)
### Bug Fixes
* add pseudo change to get lerna to trigger ([41e6817](https://github.com/standardnotes/snjs/commit/41e6817bbf726b0932cdf16f58622328b9e42803))
## [1.15.2](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.15.1...@standardnotes/common@1.15.2) (2022-02-28)
### Bug Fixes
* add pseudo change to get lerna to trigger ([41e6817](https://github.com/standardnotes/snjs/commit/41e6817bbf726b0932cdf16f58622328b9e42803))
## [1.15.1](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.15.0...@standardnotes/common@1.15.1) (2022-02-27)
**Note:** Version bump only for package @standardnotes/common
# [1.15.0](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.14.1...@standardnotes/common@1.15.0) (2022-02-25)
### Features
* extract core functionalities to separate packages ([#610](https://github.com/standardnotes/snjs/issues/610)) ([801547a](https://github.com/standardnotes/snjs/commit/801547a71614ad51a92fb249eaa184ed46a44aac))
## [1.14.1](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.14.0...@standardnotes/common@1.14.1) (2022-02-24)
**Note:** Version bump only for package @standardnotes/common
# [1.14.0](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.13.0...@standardnotes/common@1.14.0) (2022-02-22)
### Features
* extract services package ([#605](https://github.com/standardnotes/snjs/issues/605)) ([3966b10](https://github.com/standardnotes/snjs/commit/3966b10745c10ef5bb92871abb13ceb4ea631362))
# [1.13.0](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.12.0...@standardnotes/common@1.13.0) (2022-02-22)
### Features
* extract SNJS utils as a separate package ([#604](https://github.com/standardnotes/snjs/issues/604)) ([b28195c](https://github.com/standardnotes/snjs/commit/b28195c20be788eec8dabc44c5aff518f074cdd9))
# [1.12.0](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.11.0...@standardnotes/common@1.12.0) (2022-02-18)
### Features
* add item integrity hash model ([975474a](https://github.com/standardnotes/snjs/commit/975474a04c4b11edea381235fe38273db59fa770))
# [1.11.0](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.10.0...@standardnotes/common@1.11.0) (2022-02-16)
### Features
* add paid roles definition ([3432608](https://github.com/standardnotes/snjs/commit/34326086c16000397d994054e807dd3589b536db))
# [1.10.0](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.9.0...@standardnotes/common@1.10.0) (2022-02-10)
### Features
* move role names and suscription names from auth to common package ([5358c03](https://github.com/standardnotes/snjs/commit/5358c03ef113597bcdcf7b0f3e730c8014885a0f))
# [1.9.0](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.8.0...@standardnotes/common@1.9.0) (2022-02-07)
### Features
* dynamic features based on runtime env ([#590](https://github.com/standardnotes/snjs/issues/590)) ([060861a](https://github.com/standardnotes/snjs/commit/060861a6c5bc179e3e1987c2b63490888e153bbb))
# [1.8.0](https://github.com/standardnotes/snjs/compare/@standardnotes/common@1.7.0...@standardnotes/common@1.8.0) (2022-01-15)
### Bug Fixes
* correct gitignore paths ([cefc0cf](https://github.com/standardnotes/snjs/commit/cefc0cfcf98e3e5378e055b8c46931b53b23195e))
* include dist in static components ([d17ce0f](https://github.com/standardnotes/snjs/commit/d17ce0f67045c6e4c97bf4577709aa58794e72e6))
### Features
* remove server extension type ([#552](https://github.com/standardnotes/snjs/issues/552)) ([aa542f3](https://github.com/standardnotes/snjs/commit/aa542f3124c60fa81a0b271030b3c35415c54a62))
# 1.7.0 (2021-12-23)
### Features
* rename email backup setting to email backup frequency ([25e7b46](https://github.com/standardnotes/snjs/commit/25e7b4620834711ac7f513ae893898c5eab1af53))
## 1.6.3 (2021-12-23)
### Bug Fixes
* lock package versions ([8aa2ce6](https://github.com/standardnotes/snjs/commit/8aa2ce676b57598ab72840adf851869d8e769022))
## 1.6.2 (2021-12-23)
### Bug Fixes
* add publishing from package version by lerna ([80433d0](https://github.com/standardnotes/snjs/commit/80433d044f258095753482b8322d73aba3d9a9e4))
## 1.6.1 (2021-12-23)
### Bug Fixes
* remove the ammend commit from lerna versioning ([f0400d9](https://github.com/standardnotes/snjs/commit/f0400d9a2f5a04eaece2e4c16da71166a2ddb251))
# 1.6.0 (2021-12-23)
### Features
* add one drive backup frequency setting ([#522](https://github.com/standardnotes/snjs/issues/522)) ([c27827f](https://github.com/standardnotes/snjs/commit/c27827f8c7969dd32511c9c75122ece372132c83))
## 1.5.4 (2021-12-23)
### Bug Fixes
* remove running tests upon deployment - ensured on PR status checks ([#523](https://github.com/standardnotes/snjs/issues/523)) ([5c795d1](https://github.com/standardnotes/snjs/commit/5c795d17b583d02955773576384e622c3ef7f418))
## 1.5.3 (2021-12-23)
### Bug Fixes
* pr template ([#518](https://github.com/standardnotes/snjs/issues/518)) ([b445bb6](https://github.com/standardnotes/snjs/commit/b445bb64841217ae27c2514887629235be95d2a3))
## 1.5.2 (2021-12-23)
### Bug Fixes
* checkout with personal access token ([773c1ef](https://github.com/standardnotes/snjs/commit/773c1ef91c4452ad411e928342060dcb59428e3c))
## 1.5.1 (2021-12-22)
### Bug Fixes
* gpg signing with CI StandardNotes user ([d72f61c](https://github.com/standardnotes/snjs/commit/d72f61c23cd15b31d37340cc756d16526634b9ee))
# 1.5.0 (2021-12-22)
### Bug Fixes
* versioning and package dependencies ([#509](https://github.com/standardnotes/snjs/issues/509)) ([fe1df94](https://github.com/standardnotes/snjs/commit/fe1df94eff3e90bcf9ba0cf45bdc44ac49204c71))
### Features
* add content decoder to common package ([504cf10](https://github.com/standardnotes/snjs/commit/504cf10d83c9cba6e8ee79ce138847a293a2f9e0))
* add ContentType to common package ([#401](https://github.com/standardnotes/snjs/issues/401)) ([1152c02](https://github.com/standardnotes/snjs/commit/1152c020e30e60996b4830b66e07ec4183bbac24))
* add SN|Privileges to content types ([#444](https://github.com/standardnotes/snjs/issues/444)) ([0eee358](https://github.com/standardnotes/snjs/commit/0eee3581e5f9f41f227c824adc92a0e15b8fa4b4))
* extract settings and common package ([#372](https://github.com/standardnotes/snjs/issues/372)) ([4f89688](https://github.com/standardnotes/snjs/commit/4f89688054cdae88c001287c9fb3431debd0136c))
* remove legacy mfa ([#495](https://github.com/standardnotes/snjs/issues/495)) ([b0498f4](https://github.com/standardnotes/snjs/commit/b0498f4fad85367e1b57c6deacb5d313331bf8db))
* upgrade node engine versions to latest active LTS ([#462](https://github.com/standardnotes/snjs/issues/462)) ([686fc15](https://github.com/standardnotes/snjs/commit/686fc15030d302b474ebb7ef1cd4dcc48ec42359))

View File

@@ -0,0 +1,19 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
const base = require('../../jest.config');
module.exports = {
...base,
globals: {
'ts-jest': {
tsconfig: 'tsconfig.json',
},
},
coverageThreshold: {
global: {
branches: 14,
functions: 13,
lines: 14,
statements: 14
}
}
};

View File

@@ -0,0 +1,4 @@
{
"extends": "./tsconfig.json",
"exclude": ["dist"]
}

View File

@@ -0,0 +1,39 @@
{
"name": "@standardnotes/common",
"version": "1.25.0",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
"description": "Common types and utilities for Standard Notes projects",
"main": "dist/src/index.js",
"author": "Standard Notes",
"types": "dist/src/index.d.ts",
"files": [
"dist/src/**/*.js",
"dist/src/**/*.d.ts"
],
"publishConfig": {
"access": "public"
},
"license": "AGPL-3.0-or-later",
"scripts": {
"clean": "rm -fr dist",
"prestart": "yarn clean",
"start": "tsc -p tsconfig.json --watch",
"prebuild": "yarn clean",
"build": "tsc -p tsconfig.json",
"lint": "eslint . --ext .ts",
"test:unit": "jest spec --coverage"
},
"devDependencies": {
"@types/jest": "^27.4.1",
"@types/node": "^18.0.0",
"@typescript-eslint/eslint-plugin": "^5.30.0",
"eslint-plugin-prettier": "^4.2.1",
"jest": "^27.5.1",
"ts-jest": "^27.1.3"
},
"dependencies": {
"reflect-metadata": "^0.1.13"
}
}

View File

@@ -0,0 +1,37 @@
import 'reflect-metadata'
import { ContentDecoder } from './ContentDecoder'
describe('ContentDecoder', () => {
const createDecoder = () => new ContentDecoder()
it('should decode content', () => {
const content = '000eyJmb28iOiJiYXIifQ=='
expect(createDecoder().decode(content)).toEqual({
foo: 'bar',
})
})
it('should decode content without padding', () => {
const content = 'eyJmb28iOiJiYXIifQ=='
expect(createDecoder().decode(content, 0)).toEqual({
foo: 'bar',
})
})
it('should encode content', () => {
expect(
createDecoder().encode({
foo: 'bar',
}),
).toEqual('000eyJmb28iOiJiYXIifQ==')
})
it('should return empty object on decoding failure', () => {
const content = '032400eyJmb28iOiJiYXIifQ=='
expect(createDecoder().decode(content)).toEqual({})
})
})

View File

@@ -0,0 +1,23 @@
import { ContentDecoderInterface } from './ContentDecoderInterface'
export class ContentDecoder implements ContentDecoderInterface {
decode(content: string, leftPaddingLength = 3): Record<string, unknown> {
try {
const contentToDecode = leftPaddingLength > 0 ? content.substring(leftPaddingLength) : content
const contentBuffer = Buffer.from(contentToDecode, 'base64')
const decodedContent = contentBuffer.toString()
return JSON.parse(decodedContent)
} catch (error) {
return {}
}
}
encode(content: Record<string, unknown>, leftPaddingLength = 3): string | undefined {
const stringifiedContent = JSON.stringify(content)
const encodedContent = Buffer.from(stringifiedContent).toString('base64')
return encodedContent.padStart(encodedContent.length + leftPaddingLength, '0')
}
}

View File

@@ -0,0 +1,4 @@
export interface ContentDecoderInterface {
decode(content: string, leftPaddingLength?: number): Record<string, unknown>
encode(content: Record<string, unknown>, leftPaddingLength?: number): string | undefined
}

View File

@@ -0,0 +1,44 @@
/* istanbul ignore file */
export enum ContentType {
Any = '*',
Item = 'SF|Item',
RootKey = 'SN|RootKey|NoSync',
ItemsKey = 'SN|ItemsKey',
EncryptedStorage = 'SN|EncryptedStorage',
Privileges = 'SN|Privileges',
Note = 'Note',
Tag = 'Tag',
SmartView = 'SN|SmartTag',
Component = 'SN|Component',
Editor = 'SN|Editor',
ActionsExtension = 'Extension',
UserPrefs = 'SN|UserPreferences',
HistorySession = 'SN|HistorySession',
Theme = 'SN|Theme',
File = 'SN|File',
FilesafeCredentials = 'SN|FileSafe|Credentials',
FilesafeFileMetadata = 'SN|FileSafe|FileMetadata',
FilesafeIntegration = 'SN|FileSafe|Integration',
ExtensionRepo = 'SN|ExtensionRepo',
Unknown = 'Unknown',
}
export function DisplayStringForContentType(contentType: ContentType): string | undefined {
const map: Partial<Record<ContentType, string>> = {
[ContentType.ActionsExtension]: 'action-based extension',
[ContentType.Component]: 'component',
[ContentType.Editor]: 'editor',
[ContentType.File]: 'file',
[ContentType.FilesafeCredentials]: 'FileSafe credential',
[ContentType.FilesafeFileMetadata]: 'FileSafe file',
[ContentType.FilesafeIntegration]: 'FileSafe integration',
[ContentType.ItemsKey]: 'encryption key',
[ContentType.Note]: 'note',
[ContentType.SmartView]: 'smart view',
[ContentType.Tag]: 'tag',
[ContentType.Theme]: 'theme',
[ContentType.UserPrefs]: 'user preferences',
}
return map[contentType]
}

View File

@@ -0,0 +1,2 @@
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export type AnyRecord = Partial<Record<string, any>>

View File

@@ -0,0 +1 @@
export type ApplicationIdentifier = string

View File

@@ -0,0 +1 @@
export type MicrosecondsTimestamp = number

View File

@@ -0,0 +1 @@
export type Uuid = string

View File

@@ -0,0 +1,18 @@
export enum EmailMessageIdentifier {
WELCOME_EMAIL = 'WELCOME_EMAIL',
ACCOUNT_CLAIM = 'ACCOUNT_CLAIM',
ACTIVATION_CODE = 'ACTIVATION_CODE',
VERSION_ADOPTION_REPORT = 'VERSION_ADOPTION_REPORT',
FAILED_DROPBOX_BACKUP = 'FAILED_DROPBOX_BACKUP',
FAILED_GOOGLE_DRIVE_BACKUP = 'FAILED_GOOGLE_DRIVE_BACKUP',
FAILED_ONE_DRIVE_BACKUP = 'FAILED_ONE_DRIVE_BACKUP',
DATA_BACKUP = 'DATA_BACKUP',
FAILED_BACKUP_ATTACHMENT_TOO_BIG = 'FAILED_BACKUP_ATTACHMENT_TOO_BIG',
OFFLINE_SUBSCRIPTION_ACCESS = 'OFFLINE_SUBSCRIPTION_ACCESS',
SIGN_IN = 'SIGN_IN',
SHARED_SUBSCRIPTION_INVITATION = 'SHARED_SUBSCRIPTION_INVITATION',
ENCOURAGE_EMAIL_BACKUPS = 'ENCOURAGE_EMAIL_BACKUPS',
ENCOURAGE_SUBSCRIPTION_PURCHASING = 'ENCOURAGE_SUBSCRIPTION_PURCHASING',
EXIT_INTERVIEW = 'EXIT_INTERVIEW',
MARKETING_CAMPAIGN_FILES = 'MARKETING_CAMPAIGN_FILES',
}

View File

@@ -0,0 +1,12 @@
/* istanbul ignore file */
export enum ErrorTag {
MfaInvalid = 'mfa-invalid',
MfaRequired = 'mfa-required',
RefreshTokenInvalid = 'invalid-refresh-token',
RefreshTokenExpired = 'expired-refresh-token',
AccessTokenExpired = 'expired-access-token',
ParametersInvalid = 'invalid-parameters',
RevokedSession = 'revoked-session',
AuthInvalid = 'invalid-auth',
ReadOnlyAccess = 'read-only-access',
}

View File

@@ -0,0 +1,6 @@
import { KeyParamsContent001 } from './KeyParamsContent001'
import { KeyParamsContent002 } from './KeyParamsContent002'
import { KeyParamsContent003 } from './KeyParamsContent003'
import { KeyParamsContent004 } from './KeyParamsContent004'
export type AnyKeyParamsContent = KeyParamsContent001 | KeyParamsContent002 | KeyParamsContent003 | KeyParamsContent004

View File

@@ -0,0 +1,10 @@
import { ProtocolVersion } from '../Protocol/ProtocolVersion'
import { KeyParamsOrigination } from './KeyParamsOrigination'
export type BaseKeyParams = {
/** Seconds since creation date */
created?: string
/** The event that lead to the creation of these params */
origination?: KeyParamsOrigination
version: ProtocolVersion
}

View File

@@ -0,0 +1,8 @@
import { BaseKeyParams } from './BaseKeyParams'
export type KeyParamsContent001 = BaseKeyParams & {
email: string
pw_cost: number
pw_salt: string
pw_nonce: string
}

View File

@@ -0,0 +1,8 @@
import { BaseKeyParams } from './BaseKeyParams'
export type KeyParamsContent002 = BaseKeyParams & {
email: string
pw_cost: number
pw_salt: string
pw_nonce: string
}

View File

@@ -0,0 +1,6 @@
import { BaseKeyParams } from './BaseKeyParams'
export type KeyParamsContent003 = BaseKeyParams & {
identifier: string
pw_nonce: string
}

View File

@@ -0,0 +1,6 @@
import { BaseKeyParams } from './BaseKeyParams'
export type KeyParamsContent004 = Required<BaseKeyParams> & {
identifier: string
pw_nonce: string
}

View File

@@ -0,0 +1,8 @@
export enum KeyParamsOrigination {
Registration = 'registration',
EmailChange = 'email-change',
PasswordChange = 'password-change',
ProtocolUpgrade = 'protocol-upgrade',
PasscodeCreate = 'passcode-create',
PasscodeChange = 'passcode-change',
}

View File

@@ -0,0 +1,56 @@
export enum ProtocolVersion {
V001 = '001',
V002 = '002',
V003 = '003',
V004 = '004',
}
export const ProtocolVersionLatest = ProtocolVersion.V004
/** The last protocol version to not use root-key based items keys */
export const ProtocolVersionLastNonrootItemsKey = ProtocolVersion.V003
export const ProtocolExpirationDates: Partial<Record<ProtocolVersion, number>> = Object.freeze({
[ProtocolVersion.V001]: Date.parse('2018-01-01'),
[ProtocolVersion.V002]: Date.parse('2020-01-01'),
})
export function isProtocolVersionExpired(version: ProtocolVersion) {
const expireDate = ProtocolExpirationDates[version]
if (!expireDate) {
return false
}
const expired = new Date().getTime() > expireDate
return expired
}
export const ProtocolVersionLength = 3
export function protocolVersionFromEncryptedString(string: string): ProtocolVersion {
const version = string.substring(0, ProtocolVersionLength) as ProtocolVersion
if (Object.values(ProtocolVersion).includes(version)) {
return version
}
throw Error(`Unrecognized protocol version ${version}`)
}
/**
* -1 if a < b
* 0 if a == b
* 1 if a > b
*/
export function compareVersions(a: ProtocolVersion, b: ProtocolVersion): number {
const aNum = Number(a)
const bNum = Number(b)
return aNum - bNum
}
export function leftVersionGreaterThanOrEqualToRight(a: ProtocolVersion, b: ProtocolVersion): boolean {
return compareVersions(a, b) >= 0
}
export function isVersionLessThanOrEqualTo(input: ProtocolVersion, compareTo: ProtocolVersion): boolean {
return compareVersions(input, compareTo) <= 0
}

View File

@@ -0,0 +1,4 @@
/* istanbul ignore file */
import { RoleName } from './RoleName'
export const PaidRoles = [RoleName.CoreUser, RoleName.PlusUser, RoleName.ProUser]

View File

@@ -0,0 +1,7 @@
/* istanbul ignore file */
export enum RoleName {
CoreUser = 'CORE_USER',
PlusUser = 'PLUS_USER',
ProUser = 'PRO_USER',
FilesBetaUser = 'FILES_BETA_USER',
}

View File

@@ -0,0 +1,5 @@
/* istanbul ignore file */
export enum SubscriptionName {
PlusPlan = 'PLUS_PLAN',
ProPlan = 'PRO_PLAN',
}

View File

@@ -0,0 +1,20 @@
export * from './Content/ContentType'
export * from './Content/ContentDecoder'
export * from './Content/ContentDecoderInterface'
export * from './DataType/AnyRecord'
export * from './DataType/MicrosecondsTimestamp'
export * from './DataType/Uuid'
export * from './DataType/ApplicationIdentifier'
export * from './Email/EmailMessageIdentifier'
export * from './Error/ErrorTag'
export * from './KeyParams/AnyKeyParamsContent'
export * from './KeyParams/BaseKeyParams'
export * from './KeyParams/KeyParamsContent001'
export * from './KeyParams/KeyParamsContent002'
export * from './KeyParams/KeyParamsContent003'
export * from './KeyParams/KeyParamsContent004'
export * from './KeyParams/KeyParamsOrigination'
export * from './Protocol/ProtocolVersion'
export * from './Role/PaidRoles'
export * from './Role/RoleName'
export * from './Subscription/SubscriptionName'

View File

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

View File

@@ -0,0 +1,11 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"composite": true,
"outDir": "./dist",
},
"include": [
"src/**/*"
],
"references": []
}

View File

@@ -3,6 +3,24 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.7.5](https://github.com/standardnotes/server/compare/@standardnotes/domain-events-infra@1.7.4...@standardnotes/domain-events-infra@1.7.5) (2022-07-06)
**Note:** Version bump only for package @standardnotes/domain-events-infra
## [1.7.4](https://github.com/standardnotes/server/compare/@standardnotes/domain-events-infra@1.7.3...@standardnotes/domain-events-infra@1.7.4) (2022-07-06)
**Note:** Version bump only for package @standardnotes/domain-events-infra
## [1.7.3](https://github.com/standardnotes/server/compare/@standardnotes/domain-events-infra@1.7.2...@standardnotes/domain-events-infra@1.7.3) (2022-07-06)
### Bug Fixes
* files included in distributable packages ([97ba31f](https://github.com/standardnotes/server/commit/97ba31f345fc95df0c15a348f0461fb9e5bcb923))
## [1.7.2](https://github.com/standardnotes/server/compare/@standardnotes/domain-events-infra@1.7.1...@standardnotes/domain-events-infra@1.7.2) (2022-07-06)
**Note:** Version bump only for package @standardnotes/domain-events-infra
## [1.7.1](https://github.com/standardnotes/server/compare/@standardnotes/domain-events-infra@1.7.0...@standardnotes/domain-events-infra@1.7.1) (2022-07-06)
**Note:** Version bump only for package @standardnotes/domain-events-infra

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/domain-events-infra",
"version": "1.7.1",
"version": "1.7.5",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -8,7 +8,8 @@
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
"files": [
"dist/src"
"dist/src/**/*.js",
"dist/src/**/*.d.ts"
],
"publishConfig": {
"access": "public"

View File

@@ -3,6 +3,38 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [2.39.0](https://github.com/standardnotes/server/compare/@standardnotes/domain-events@2.38.0...@standardnotes/domain-events@2.39.0) (2022-07-06)
### Features
* add common package ([fd4ee21](https://github.com/standardnotes/server/commit/fd4ee2123dc72b4d8755504d57bced608c1ab928))
# [2.38.0](https://github.com/standardnotes/server/compare/@standardnotes/domain-events@2.37.1...@standardnotes/domain-events@2.38.0) (2022-07-06)
### Bug Fixes
* deps to @standarnotes/security ([699164e](https://github.com/standardnotes/server/commit/699164eba553cd07fb50f7a06ae8991028167603))
### Features
* add security package ([d86928f](https://github.com/standardnotes/server/commit/d86928f1b4b5feda8c330ed8ee0bf9de0fc12ae7))
## [2.37.1](https://github.com/standardnotes/server/compare/@standardnotes/domain-events@2.37.0...@standardnotes/domain-events@2.37.1) (2022-07-06)
### Bug Fixes
* files included in distributable packages ([97ba31f](https://github.com/standardnotes/server/commit/97ba31f345fc95df0c15a348f0461fb9e5bcb923))
# [2.37.0](https://github.com/standardnotes/server/compare/@standardnotes/domain-events@2.36.0...@standardnotes/domain-events@2.37.0) (2022-07-06)
### Bug Fixes
* scheduler to predicates imports ([1b35cf7](https://github.com/standardnotes/server/commit/1b35cf7a392fbe6c4b49889f92ffab6ddd7bb181))
### Features
* add predicates package ([ed62ed5](https://github.com/standardnotes/server/commit/ed62ed516f5cf8784975f41680366bf0518ce491))
# [2.36.0](https://github.com/standardnotes/server/compare/@standardnotes/domain-events@2.35.0...@standardnotes/domain-events@2.36.0) (2022-07-06)
### Features

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/domain-events",
"version": "2.36.0",
"version": "2.39.0",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -8,7 +8,8 @@
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
"files": [
"dist/src"
"dist/src/**/*.js",
"dist/src/**/*.d.ts"
],
"publishConfig": {
"access": "public"
@@ -23,10 +24,10 @@
"test:unit": "jest spec --coverage --passWithNoTests"
},
"dependencies": {
"@standardnotes/auth": "^3.19.4",
"@standardnotes/common": "^1.23.1",
"@standardnotes/common": "workspace:*",
"@standardnotes/features": "^1.47.0",
"@standardnotes/scheduler": "^1.1.2",
"@standardnotes/predicates": "workspace:*",
"@standardnotes/security": "workspace:*",
"reflect-metadata": "^0.1.13"
},
"devDependencies": {

View File

@@ -1,4 +1,4 @@
import { Predicate } from '@standardnotes/scheduler'
import { Predicate } from '@standardnotes/predicates'
export interface PredicateVerificationRequestedEventPayload {
predicate: Predicate

View File

@@ -1,4 +1,4 @@
import { Predicate, PredicateVerificationResult } from '@standardnotes/scheduler'
import { Predicate, PredicateVerificationResult } from '@standardnotes/predicates'
export interface PredicateVerifiedEventPayload {
predicate: Predicate

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.4.0](https://github.com/standardnotes/files/compare/@standardnotes/files-server@1.3.0...@standardnotes/files-server@1.4.0) (2022-07-06)
### Features
* add common package ([fd4ee21](https://github.com/standardnotes/files/commit/fd4ee2123dc72b4d8755504d57bced608c1ab928))
# [1.3.0](https://github.com/standardnotes/files/compare/@standardnotes/files-server@1.2.0...@standardnotes/files-server@1.3.0) (2022-07-06)
### Features
* add time package ([565e890](https://github.com/standardnotes/files/commit/565e890973b1d96544bb750fdd700d58f8dad088))
# [1.2.0](https://github.com/standardnotes/files/compare/@standardnotes/files-server@1.1.14...@standardnotes/files-server@1.2.0) (2022-07-06)
### Bug Fixes
* deps to @standarnotes/security ([699164e](https://github.com/standardnotes/files/commit/699164eba553cd07fb50f7a06ae8991028167603))
### Features
* add security package ([d86928f](https://github.com/standardnotes/files/commit/d86928f1b4b5feda8c330ed8ee0bf9de0fc12ae7))
## [1.1.14](https://github.com/standardnotes/files/compare/@standardnotes/files-server@1.1.13...@standardnotes/files-server@1.1.14) (2022-07-06)
**Note:** Version bump only for package @standardnotes/files-server
## [1.1.13](https://github.com/standardnotes/files/compare/@standardnotes/files-server@1.1.12...@standardnotes/files-server@1.1.13) (2022-07-06)
**Note:** Version bump only for package @standardnotes/files-server
## [1.1.12](https://github.com/standardnotes/files/compare/@standardnotes/files-server@1.1.11...@standardnotes/files-server@1.1.12) (2022-07-06)
**Note:** Version bump only for package @standardnotes/files-server

View File

@@ -1,6 +1,6 @@
{
"name": "@standardnotes/files-server",
"version": "1.1.12",
"version": "1.4.0",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
@@ -27,13 +27,13 @@
},
"dependencies": {
"@sentry/node": "^7.3.0",
"@standardnotes/auth": "^3.19.4",
"@standardnotes/common": "^1.23.1",
"@standardnotes/common": "workspace:*",
"@standardnotes/domain-events": "workspace:*",
"@standardnotes/domain-events-infra": "workspace:*",
"@standardnotes/security": "workspace:*",
"@standardnotes/sncrypto-common": "^1.9.0",
"@standardnotes/sncrypto-node": "^1.8.3",
"@standardnotes/time": "^1.7.1",
"@standardnotes/time": "workspace:*",
"aws-sdk": "^2.1158.0",
"connect-busboy": "^1.0.0",
"cors": "^2.8.5",

View File

@@ -7,7 +7,7 @@ import { Env } from './Env'
import TYPES from './Types'
import { UploadFileChunk } from '../Domain/UseCase/UploadFileChunk/UploadFileChunk'
import { ValetTokenAuthMiddleware } from '../Controller/ValetTokenAuthMiddleware'
import { TokenDecoder, TokenDecoderInterface, ValetTokenData } from '@standardnotes/auth'
import { TokenDecoder, TokenDecoderInterface, ValetTokenData } from '@standardnotes/security'
import { Timer, TimerInterface } from '@standardnotes/time'
import { DomainEventFactoryInterface } from '../Domain/Event/DomainEventFactoryInterface'
import { DomainEventFactory } from '../Domain/Event/DomainEventFactory'

View File

@@ -3,7 +3,7 @@ import 'reflect-metadata'
import { ValetTokenAuthMiddleware } from './ValetTokenAuthMiddleware'
import { NextFunction, Request, Response } from 'express'
import { Logger } from 'winston'
import { TokenDecoderInterface, ValetTokenData } from '@standardnotes/auth'
import { TokenDecoderInterface, ValetTokenData } from '@standardnotes/security'
describe('ValetTokenAuthMiddleware', () => {
let tokenDecoder: TokenDecoderInterface<ValetTokenData>

View File

@@ -1,4 +1,4 @@
import { TokenDecoderInterface, ValetTokenData } from '@standardnotes/auth'
import { TokenDecoderInterface, ValetTokenData } from '@standardnotes/security'
import { NextFunction, Request, Response } from 'express'
import { inject, injectable } from 'inversify'
import { BaseMiddleware } from 'inversify-express-utils'

View File

@@ -0,0 +1 @@
dist

View File

@@ -0,0 +1,6 @@
{
"extends": "../../.eslintrc",
"parserOptions": {
"project": "./linter.tsconfig.json"
}
}

View File

@@ -0,0 +1,42 @@
# Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [1.2.0](https://github.com/standardnotes/server/compare/@standardnotes/predicates@1.1.1...@standardnotes/predicates@1.2.0) (2022-07-06)
### Features
* add common package ([fd4ee21](https://github.com/standardnotes/server/commit/fd4ee2123dc72b4d8755504d57bced608c1ab928))
## [1.1.1](https://github.com/standardnotes/server/compare/@standardnotes/predicates@1.1.0...@standardnotes/predicates@1.1.1) (2022-07-06)
### Bug Fixes
* files included in distributable packages ([97ba31f](https://github.com/standardnotes/server/commit/97ba31f345fc95df0c15a348f0461fb9e5bcb923))
# 1.1.0 (2022-07-06)
### Features
* add predicates package ([ed62ed5](https://github.com/standardnotes/server/commit/ed62ed516f5cf8784975f41680366bf0518ce491))
## [1.1.3](https://github.com/standardnotes/snjs/compare/@standardnotes/scheduler@1.1.2...@standardnotes/scheduler@1.1.3) (2022-07-04)
### Bug Fixes
* add missing reflect-metadata package to all packages ([ce3a5bb](https://github.com/standardnotes/snjs/commit/ce3a5bbf3f1d2276ac4abc3eec3c6a44c8c3ba9b))
## [1.1.2](https://github.com/standardnotes/snjs/compare/@standardnotes/scheduler@1.1.1...@standardnotes/scheduler@1.1.2) (2022-06-27)
**Note:** Version bump only for package @standardnotes/scheduler
## [1.1.1](https://github.com/standardnotes/snjs/compare/@standardnotes/scheduler@1.1.0...@standardnotes/scheduler@1.1.1) (2022-06-15)
**Note:** Version bump only for package @standardnotes/scheduler
# 1.1.0 (2022-06-13)
### Features
* add scheduler package ([251a2b5](https://github.com/standardnotes/snjs/commit/251a2b57937c4fcf3d23efd71dd6762a8df4496c))

View File

@@ -0,0 +1,11 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
const base = require('../../jest.config');
module.exports = {
...base,
globals: {
'ts-jest': {
tsconfig: 'tsconfig.json',
},
}
};

View File

@@ -0,0 +1,4 @@
{
"extends": "./tsconfig.json",
"exclude": ["dist"]
}

View File

@@ -0,0 +1,39 @@
{
"name": "@standardnotes/predicates",
"version": "1.2.0",
"engines": {
"node": ">=16.0.0 <17.0.0"
},
"description": "Utils and models required for scheduling jobs",
"main": "dist/src/index.js",
"author": "Standard Notes",
"types": "dist/src/index.d.ts",
"files": [
"dist/src/**/*.js",
"dist/src/**/*.d.ts"
],
"publishConfig": {
"access": "public"
},
"license": "AGPL-3.0-or-later",
"scripts": {
"clean": "rm -fr dist",
"prestart": "yarn clean",
"start": "tsc -p tsconfig.json --watch",
"prebuild": "yarn clean",
"build": "tsc -p tsconfig.json",
"lint": "eslint . --ext .ts",
"test:unit": "jest spec --coverage --passWithNoTests"
},
"devDependencies": {
"@types/jest": "^27.4.1",
"@typescript-eslint/eslint-plugin": "^5.30.0",
"eslint-plugin-prettier": "^4.2.1",
"jest": "^27.5.1",
"ts-jest": "^27.1.3"
},
"dependencies": {
"@standardnotes/common": "workspace:*",
"reflect-metadata": "^0.1.13"
}
}

View File

@@ -0,0 +1,10 @@
import { Uuid } from '@standardnotes/common'
import { PredicateAuthority } from './PredicateAuthority'
import { PredicateName } from './PredicateName'
export type Predicate = {
jobUuid: Uuid
name: PredicateName
authority: PredicateAuthority
}

View File

@@ -0,0 +1,4 @@
export enum PredicateAuthority {
Auth = 'auth',
SyncingServer = 'syncing-server',
}

View File

@@ -0,0 +1,4 @@
export enum PredicateName {
EmailBackupsEnabled = 'email-backups-enabled',
SubscriptionPurchased = 'subscription-purchased',
}

View File

@@ -0,0 +1,4 @@
export enum PredicateVerificationResult {
Affirmed = 'affirmed',
Denied = 'denied',
}

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