Compare commits

..

25 Commits

Author SHA1 Message Date
standardci 9b6baab1e0 chore(release): publish new version
- @standardnotes/analytics@2.19.12
 - @standardnotes/api-gateway@1.46.7
 - @standardnotes/auth-server@1.84.6
 - @standardnotes/domain-events-infra@1.9.67
 - @standardnotes/domain-events@2.106.2
 - @standardnotes/event-store@1.6.66
 - @standardnotes/files-server@1.9.12
 - @standardnotes/revisions-server@1.10.20
 - @standardnotes/scheduler-server@1.16.16
 - @standardnotes/syncing-server@1.29.8
 - @standardnotes/websockets-server@1.5.12
 - @standardnotes/workspace-server@1.19.15
2023-01-20 13:30:38 +00:00
Karol Sójko 3ba4e712dc chore: remove circular dep 2023-01-20 14:27:54 +01:00
Karol Sójko 5bf3ecdf42 Revert "chore: upgrade @standardnotes/* dependencies"
This reverts commit bd6fd472a6.
2023-01-20 14:26:58 +01:00
Karol Sójko bd6fd472a6 chore: upgrade @standardnotes/* dependencies 2023-01-20 14:08:55 +01:00
standardci 7f4776b52b chore(release): publish new version
- @standardnotes/analytics@2.19.11
 - @standardnotes/api-gateway@1.46.6
 - @standardnotes/auth-server@1.84.5
 - @standardnotes/common@1.46.4
 - @standardnotes/domain-core@1.11.2
 - @standardnotes/domain-events-infra@1.9.66
 - @standardnotes/domain-events@2.106.1
 - @standardnotes/event-store@1.6.65
 - @standardnotes/files-server@1.9.11
 - @standardnotes/predicates@1.6.5
 - @standardnotes/revisions-server@1.10.19
 - @standardnotes/scheduler-server@1.16.15
 - @standardnotes/security@1.7.6
 - @standardnotes/settings@1.19.1
 - @standardnotes/sncrypto-node@1.13.1
 - @standardnotes/syncing-server@1.29.7
 - @standardnotes/time@1.14.1
 - @standardnotes/websockets-server@1.5.11
 - @standardnotes/workspace-server@1.19.14
2023-01-20 10:59:12 +00:00
Karol Sójko d20f03127a chore(deps): upgrade eslint tools 2023-01-20 10:16:04 +01:00
Karol Sójko 4b6c7774e0 chore: bring back e2e tests 2023-01-20 09:54:30 +01:00
standardci d02bca8879 chore(release): publish new version
- @standardnotes/auth-server@1.84.4
2023-01-20 00:06:06 +00:00
moughxyz 5e654ccf94 temp: disable e2e tests 2023-01-19 18:03:54 -06:00
standardci 7d3e5c22fb chore(release): publish new version
- @standardnotes/auth-server@1.84.2
2023-01-19 23:29:14 +00:00
moughxyz 23eb61ee5f refactor: offlineRoles => roles 2023-01-19 17:27:20 -06:00
standardci 2cded4b2d1 chore(release): publish new version
- @standardnotes/auth-server@1.84.1
 - @standardnotes/syncing-server@1.29.6
2023-01-19 23:25:55 +00:00
moughxyz ba7662fc1e fix: strings for role names 2023-01-19 17:23:58 -06:00
standardci 832a48ac76 chore(release): publish new version
- @standardnotes/analytics@2.19.10
 - @standardnotes/api-gateway@1.46.5
 - @standardnotes/auth-server@1.84.0
 - @standardnotes/domain-events-infra@1.9.65
 - @standardnotes/domain-events@2.106.0
 - @standardnotes/event-store@1.6.64
 - @standardnotes/files-server@1.9.10
 - @standardnotes/revisions-server@1.10.18
 - @standardnotes/scheduler-server@1.16.14
 - @standardnotes/syncing-server@1.29.5
 - @standardnotes/websockets-server@1.5.10
 - @standardnotes/workspace-server@1.19.13
2023-01-19 22:31:28 +00:00
Mo 2db0c125fe feat: offline roles (#419) 2023-01-19 16:29:36 -06:00
standardci 20d9624bc6 chore(release): publish new version
- @standardnotes/auth-server@1.83.1
2023-01-19 19:40:49 +00:00
moughxyz f20ee68f50 Revert "feat: include roles in offline features request (#418)"
This reverts commit 2e7fdd93dd.
2023-01-19 13:38:46 -06:00
standardci cbf45ce3eb chore(release): publish new version
- @standardnotes/auth-server@1.83.0
2023-01-19 19:18:16 +00:00
Mo 2e7fdd93dd feat: include roles in offline features request (#418) 2023-01-19 13:16:16 -06:00
standardci 8ce38f82b5 chore(release): publish new version
- @standardnotes/analytics@2.19.9
 - @standardnotes/api-gateway@1.46.4
 - @standardnotes/auth-server@1.82.6
 - @standardnotes/domain-events-infra@1.9.64
 - @standardnotes/domain-events@2.105.5
 - @standardnotes/event-store@1.6.63
 - @standardnotes/files-server@1.9.9
 - @standardnotes/revisions-server@1.10.17
 - @standardnotes/scheduler-server@1.16.13
 - @standardnotes/syncing-server@1.29.4
 - @standardnotes/websockets-server@1.5.9
 - @standardnotes/workspace-server@1.19.12
2023-01-19 16:19:54 +00:00
Aman Harwara ec5429eeec fix: expected value for unit test (#417) 2023-01-19 21:47:32 +05:30
standardci 4b17c4045d chore(release): publish new version
- @standardnotes/analytics@2.19.8
 - @standardnotes/api-gateway@1.46.3
 - @standardnotes/auth-server@1.82.5
 - @standardnotes/common@1.46.3
 - @standardnotes/domain-events-infra@1.9.63
 - @standardnotes/domain-events@2.105.4
 - @standardnotes/event-store@1.6.62
 - @standardnotes/files-server@1.9.8
 - @standardnotes/predicates@1.6.4
 - @standardnotes/revisions-server@1.10.16
 - @standardnotes/scheduler-server@1.16.12
 - @standardnotes/security@1.7.5
 - @standardnotes/syncing-server@1.29.3
 - @standardnotes/websockets-server@1.5.8
 - @standardnotes/workspace-server@1.19.11
2023-01-19 14:13:50 +00:00
Karol Sójko aaf42e4693 refactor: remove Uuid from @standardnotes/common in favour of @standardnotes/domain-core definition 2023-01-19 15:11:47 +01:00
standardci 0e3cbfc40b chore(release): publish new version
- @standardnotes/analytics@2.19.7
 - @standardnotes/api-gateway@1.46.2
 - @standardnotes/auth-server@1.82.4
 - @standardnotes/common@1.46.2
 - @standardnotes/domain-events-infra@1.9.62
 - @standardnotes/domain-events@2.105.3
 - @standardnotes/event-store@1.6.61
 - @standardnotes/files-server@1.9.7
 - @standardnotes/predicates@1.6.3
 - @standardnotes/revisions-server@1.10.15
 - @standardnotes/scheduler-server@1.16.11
 - @standardnotes/security@1.7.4
 - @standardnotes/syncing-server@1.29.2
 - @standardnotes/websockets-server@1.5.7
 - @standardnotes/workspace-server@1.19.10
2023-01-19 13:08:22 +00:00
Karol Sójko a95ca05c10 refactor: remove RoleName from @standardnotes/common in favour of @standardnotes/domain-core definition 2023-01-19 14:05:48 +01:00
254 changed files with 1737 additions and 1352 deletions
Generated
+265 -442
View File
File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -327,7 +327,7 @@ endif
quiet_cmd_regen_makefile = ACTION Regenerating $@
cmd_regen_makefile = cd $(srcdir); /Users/karolsojko/workspace/server/.yarn/unplugged/node-gyp-npm-9.0.0-0eccfca4d1/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/Users/karolsojko/Library/Caches/node-gyp/18.12.1" "-Dnode_gyp_dir=/Users/karolsojko/workspace/server/.yarn/unplugged/node-gyp-npm-9.0.0-0eccfca4d1/node_modules/node-gyp" "-Dnode_lib_file=/Users/karolsojko/Library/Caches/node-gyp/18.12.1/<(target_arch)/node.lib" "-Dmodule_root_dir=/Users/karolsojko/workspace/server/.yarn/unplugged/@newrelic-native-metrics-npm-9.0.0-590d2e713a/node_modules/@newrelic/native-metrics" "-Dnode_engine=v8" "--depth=." "-Goutput_dir=." "--generator-output=build" -I/Users/karolsojko/workspace/server/.yarn/unplugged/@newrelic-native-metrics-npm-9.0.0-590d2e713a/node_modules/@newrelic/native-metrics/build/config.gypi -I/Users/karolsojko/workspace/server/.yarn/unplugged/node-gyp-npm-9.0.0-0eccfca4d1/node_modules/node-gyp/addon.gypi -I/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/common.gypi "--toplevel-dir=." binding.gyp
Makefile: $(srcdir)/build/config.gypi $(srcdir)/../../../../node-gyp-npm-9.0.0-0eccfca4d1/node_modules/node-gyp/addon.gypi $(srcdir)/../../../../../../../../Library/Caches/node-gyp/18.12.1/include/node/common.gypi $(srcdir)/binding.gyp
Makefile: $(srcdir)/../../../../../../../../Library/Caches/node-gyp/18.12.1/include/node/common.gypi $(srcdir)/build/config.gypi $(srcdir)/../../../../node-gyp-npm-9.0.0-0eccfca4d1/node_modules/node-gyp/addon.gypi $(srcdir)/binding.gyp
$(call do_cmd,regen_makefile)
# "all" is a concatenation of the "all" targets from all the included
@@ -0,0 +1 @@
cmd_Release/native_metrics.node := c++ -bundle -undefined dynamic_lookup -Wl,-search_paths_first -mmacosx-version-min=10.15 -arch x86_64 -L./Release -stdlib=libc++ -o Release/native_metrics.node Release/obj.target/native_metrics/src/native_metrics.o Release/obj.target/native_metrics/src/GCBinder.o Release/obj.target/native_metrics/src/LoopChecker.o
@@ -0,0 +1,153 @@
cmd_Release/obj.target/native_metrics/src/GCBinder.o := c++ -o Release/obj.target/native_metrics/src/GCBinder.o ../src/GCBinder.cpp '-DNODE_GYP_MODULE_NAME=native_metrics' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DNOMINMAX' '-DBUILDING_NODE_EXTENSION' -I/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node -I/Users/karolsojko/Library/Caches/node-gyp/18.12.1/src -I/Users/karolsojko/Library/Caches/node-gyp/18.12.1/deps/openssl/config -I/Users/karolsojko/Library/Caches/node-gyp/18.12.1/deps/openssl/openssl/include -I/Users/karolsojko/Library/Caches/node-gyp/18.12.1/deps/uv/include -I/Users/karolsojko/Library/Caches/node-gyp/18.12.1/deps/zlib -I/Users/karolsojko/Library/Caches/node-gyp/18.12.1/deps/v8/include -I../src -I../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan -O3 -gdwarf-2 -mmacosx-version-min=10.15 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++17 -stdlib=libc++ -fno-rtti -fno-exceptions -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/native_metrics/src/GCBinder.o.d.raw -c
Release/obj.target/native_metrics/src/GCBinder.o: ../src/GCBinder.cpp \
../src/GCBinder.hpp \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/node_version.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv/errno.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv/version.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv/unix.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv/threadpool.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv/darwin.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/node.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/cppgc/common.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8config.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-array-buffer.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-local-handle.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-internal.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-version.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-object.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-maybe.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-persistent-handle.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-weak-callback-info.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-primitive.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-data.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-value.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-traced-handle.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-container.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-context.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-snapshot.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-date.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-debug.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-script.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-message.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-exception.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-extension.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-external.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-function.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-function-callback.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-template.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-memory-span.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-initialization.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-callbacks.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-isolate.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-embedder-heap.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-microtask.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-statistics.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-promise.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-unwinder.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-embedder-state-scope.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-platform.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-json.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-locker.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-microtask-queue.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-primitive-object.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-proxy.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-regexp.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-typed-array.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-value-serializer.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-wasm.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/node_buffer.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/node_object_wrap.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_callbacks.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_callbacks_12_inl.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_maybe_43_inl.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_converters.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_converters_43_inl.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_new.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_implementation_12_inl.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_persistent_12_inl.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_weak.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_object_wrap.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_private.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_typedarray_contents.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_json.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_scriptorigin.h \
../src/Metric.hpp
../src/GCBinder.cpp:
../src/GCBinder.hpp:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/node_version.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv/errno.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv/version.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv/unix.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv/threadpool.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv/darwin.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/node.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/cppgc/common.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8config.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-array-buffer.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-local-handle.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-internal.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-version.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-object.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-maybe.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-persistent-handle.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-weak-callback-info.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-primitive.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-data.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-value.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-traced-handle.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-container.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-context.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-snapshot.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-date.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-debug.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-script.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-message.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-exception.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-extension.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-external.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-function.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-function-callback.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-template.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-memory-span.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-initialization.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-callbacks.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-isolate.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-embedder-heap.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-microtask.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-statistics.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-promise.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-unwinder.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-embedder-state-scope.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-platform.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-json.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-locker.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-microtask-queue.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-primitive-object.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-proxy.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-regexp.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-typed-array.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-value-serializer.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-wasm.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/node_buffer.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/node_object_wrap.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_callbacks.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_callbacks_12_inl.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_maybe_43_inl.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_converters.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_converters_43_inl.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_new.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_implementation_12_inl.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_persistent_12_inl.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_weak.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_object_wrap.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_private.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_typedarray_contents.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_json.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_scriptorigin.h:
../src/Metric.hpp:
@@ -0,0 +1,154 @@
cmd_Release/obj.target/native_metrics/src/LoopChecker.o := c++ -o Release/obj.target/native_metrics/src/LoopChecker.o ../src/LoopChecker.cpp '-DNODE_GYP_MODULE_NAME=native_metrics' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DNOMINMAX' '-DBUILDING_NODE_EXTENSION' -I/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node -I/Users/karolsojko/Library/Caches/node-gyp/18.12.1/src -I/Users/karolsojko/Library/Caches/node-gyp/18.12.1/deps/openssl/config -I/Users/karolsojko/Library/Caches/node-gyp/18.12.1/deps/openssl/openssl/include -I/Users/karolsojko/Library/Caches/node-gyp/18.12.1/deps/uv/include -I/Users/karolsojko/Library/Caches/node-gyp/18.12.1/deps/zlib -I/Users/karolsojko/Library/Caches/node-gyp/18.12.1/deps/v8/include -I../src -I../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan -O3 -gdwarf-2 -mmacosx-version-min=10.15 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++17 -stdlib=libc++ -fno-rtti -fno-exceptions -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/native_metrics/src/LoopChecker.o.d.raw -c
Release/obj.target/native_metrics/src/LoopChecker.o: \
../src/LoopChecker.cpp \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv/errno.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv/version.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv/unix.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv/threadpool.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv/darwin.h \
../src/LoopChecker.hpp \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/node_version.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/node.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/cppgc/common.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8config.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-array-buffer.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-local-handle.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-internal.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-version.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-object.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-maybe.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-persistent-handle.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-weak-callback-info.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-primitive.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-data.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-value.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-traced-handle.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-container.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-context.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-snapshot.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-date.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-debug.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-script.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-message.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-exception.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-extension.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-external.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-function.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-function-callback.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-template.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-memory-span.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-initialization.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-callbacks.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-isolate.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-embedder-heap.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-microtask.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-statistics.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-promise.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-unwinder.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-embedder-state-scope.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-platform.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-json.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-locker.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-microtask-queue.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-primitive-object.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-proxy.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-regexp.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-typed-array.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-value-serializer.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-wasm.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/node_buffer.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/node_object_wrap.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_callbacks.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_callbacks_12_inl.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_maybe_43_inl.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_converters.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_converters_43_inl.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_new.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_implementation_12_inl.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_persistent_12_inl.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_weak.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_object_wrap.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_private.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_typedarray_contents.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_json.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_scriptorigin.h \
../src/Metric.hpp
../src/LoopChecker.cpp:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv/errno.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv/version.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv/unix.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv/threadpool.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv/darwin.h:
../src/LoopChecker.hpp:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/node_version.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/node.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/cppgc/common.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8config.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-array-buffer.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-local-handle.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-internal.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-version.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-object.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-maybe.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-persistent-handle.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-weak-callback-info.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-primitive.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-data.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-value.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-traced-handle.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-container.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-context.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-snapshot.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-date.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-debug.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-script.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-message.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-exception.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-extension.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-external.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-function.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-function-callback.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-template.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-memory-span.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-initialization.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-callbacks.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-isolate.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-embedder-heap.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-microtask.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-statistics.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-promise.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-unwinder.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-embedder-state-scope.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-platform.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-json.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-locker.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-microtask-queue.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-primitive-object.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-proxy.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-regexp.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-typed-array.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-value-serializer.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-wasm.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/node_buffer.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/node_object_wrap.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_callbacks.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_callbacks_12_inl.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_maybe_43_inl.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_converters.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_converters_43_inl.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_new.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_implementation_12_inl.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_persistent_12_inl.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_weak.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_object_wrap.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_private.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_typedarray_contents.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_json.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_scriptorigin.h:
../src/Metric.hpp:
@@ -0,0 +1,154 @@
cmd_Release/obj.target/native_metrics/src/native_metrics.o := c++ -o Release/obj.target/native_metrics/src/native_metrics.o ../src/native_metrics.cpp '-DNODE_GYP_MODULE_NAME=native_metrics' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DNOMINMAX' '-DBUILDING_NODE_EXTENSION' -I/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node -I/Users/karolsojko/Library/Caches/node-gyp/18.12.1/src -I/Users/karolsojko/Library/Caches/node-gyp/18.12.1/deps/openssl/config -I/Users/karolsojko/Library/Caches/node-gyp/18.12.1/deps/openssl/openssl/include -I/Users/karolsojko/Library/Caches/node-gyp/18.12.1/deps/uv/include -I/Users/karolsojko/Library/Caches/node-gyp/18.12.1/deps/zlib -I/Users/karolsojko/Library/Caches/node-gyp/18.12.1/deps/v8/include -I../src -I../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan -O3 -gdwarf-2 -mmacosx-version-min=10.15 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -std=gnu++17 -stdlib=libc++ -fno-rtti -fno-exceptions -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/native_metrics/src/native_metrics.o.d.raw -c
Release/obj.target/native_metrics/src/native_metrics.o: \
../src/native_metrics.cpp \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/node_version.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv/errno.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv/version.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv/unix.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv/threadpool.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv/darwin.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/node.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/cppgc/common.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8config.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-array-buffer.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-local-handle.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-internal.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-version.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-object.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-maybe.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-persistent-handle.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-weak-callback-info.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-primitive.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-data.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-value.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-traced-handle.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-container.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-context.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-snapshot.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-date.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-debug.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-script.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-message.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-exception.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-extension.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-external.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-function.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-function-callback.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-template.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-memory-span.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-initialization.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-callbacks.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-isolate.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-embedder-heap.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-microtask.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-statistics.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-promise.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-unwinder.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-embedder-state-scope.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-platform.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-json.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-locker.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-microtask-queue.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-primitive-object.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-proxy.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-regexp.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-typed-array.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-value-serializer.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-wasm.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/node_buffer.h \
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/node_object_wrap.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_callbacks.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_callbacks_12_inl.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_maybe_43_inl.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_converters.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_converters_43_inl.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_new.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_implementation_12_inl.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_persistent_12_inl.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_weak.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_object_wrap.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_private.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_typedarray_contents.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_json.h \
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_scriptorigin.h \
../src/GCBinder.hpp ../src/Metric.hpp ../src/LoopChecker.hpp
../src/native_metrics.cpp:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/node_version.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv/errno.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv/version.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv/unix.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv/threadpool.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/uv/darwin.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/node.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/cppgc/common.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8config.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-array-buffer.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-local-handle.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-internal.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-version.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-object.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-maybe.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-persistent-handle.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-weak-callback-info.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-primitive.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-data.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-value.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-traced-handle.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-container.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-context.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-snapshot.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-date.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-debug.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-script.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-message.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-exception.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-extension.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-external.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-function.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-function-callback.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-template.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-memory-span.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-initialization.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-callbacks.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-isolate.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-embedder-heap.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-microtask.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-statistics.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-promise.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-unwinder.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-embedder-state-scope.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-platform.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-json.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-locker.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-microtask-queue.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-primitive-object.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-proxy.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-regexp.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-typed-array.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-value-serializer.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/v8-wasm.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/node_buffer.h:
/Users/karolsojko/Library/Caches/node-gyp/18.12.1/include/node/node_object_wrap.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_callbacks.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_callbacks_12_inl.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_maybe_43_inl.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_converters.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_converters_43_inl.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_new.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_implementation_12_inl.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_persistent_12_inl.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_weak.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_object_wrap.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_private.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_typedarray_contents.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_json.h:
../../../../../nan-npm-2.16.0-cac314a230/node_modules/nan/nan_scriptorigin.h:
../src/GCBinder.hpp:
../src/Metric.hpp:
../src/LoopChecker.hpp:
+1 -1
View File
@@ -51,7 +51,7 @@
"@types/newrelic": "^9.4.0",
"@types/node": "^18.11.9",
"@typescript-eslint/parser": "^5.40.1",
"eslint": "^8.17.0",
"eslint": "^8.32.0",
"eslint-config-prettier": "^8.5.0",
"ini": "^3.0.0",
"npm-check-updates": "^16.0.1",
+24
View File
@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.19.12](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.19.11...@standardnotes/analytics@2.19.12) (2023-01-20)
**Note:** Version bump only for package @standardnotes/analytics
## [2.19.11](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.19.10...@standardnotes/analytics@2.19.11) (2023-01-20)
**Note:** Version bump only for package @standardnotes/analytics
## [2.19.10](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.19.9...@standardnotes/analytics@2.19.10) (2023-01-19)
**Note:** Version bump only for package @standardnotes/analytics
## [2.19.9](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.19.8...@standardnotes/analytics@2.19.9) (2023-01-19)
**Note:** Version bump only for package @standardnotes/analytics
## [2.19.8](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.19.7...@standardnotes/analytics@2.19.8) (2023-01-19)
**Note:** Version bump only for package @standardnotes/analytics
## [2.19.7](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.19.6...@standardnotes/analytics@2.19.7) (2023-01-19)
**Note:** Version bump only for package @standardnotes/analytics
## [2.19.6](https://github.com/standardnotes/server/compare/@standardnotes/analytics@2.19.5...@standardnotes/analytics@2.19.6) (2023-01-18)
**Note:** Version bump only for package @standardnotes/analytics
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/analytics",
"version": "2.19.6",
"version": "2.19.12",
"engines": {
"node": ">=18.0.0 <19.0.0"
},
@@ -30,8 +30,8 @@
"@types/mixpanel": "^2.14.4",
"@types/newrelic": "^9.4.0",
"@types/node": "^18.11.9",
"@typescript-eslint/eslint-plugin": "^5.30.0",
"eslint": "^8.14.0",
"@typescript-eslint/eslint-plugin": "^5.48.2",
"eslint": "^8.32.0",
"eslint-plugin-prettier": "^4.2.1",
"jest": "^29.1.2",
"ts-jest": "^29.0.3",
@@ -1,9 +1,8 @@
import { Uuid } from '@standardnotes/common'
import { AnalyticsEntity } from './AnalyticsEntity'
export interface AnalyticsEntityRepositoryInterface {
save(analyticsEntity: AnalyticsEntity): Promise<AnalyticsEntity>
remove(analyticsEntity: AnalyticsEntity): Promise<void>
findOneByUserUuid(userUuid: Uuid): Promise<AnalyticsEntity | null>
findOneByUserUuid(userUuid: string): Promise<AnalyticsEntity | null>
findOneByUserEmail(email: string): Promise<AnalyticsEntity | null>
}
@@ -1,8 +1,8 @@
import { Either, Uuid } from '@standardnotes/common'
import { Either } from '@standardnotes/common'
export type GetUserAnalyticsIdDTO = Either<
{
userUuid: Uuid
userUuid: string
},
{
userEmail: string
@@ -1,4 +1,3 @@
import { Uuid } from '@standardnotes/common'
import { inject, injectable } from 'inversify'
import { Repository } from 'typeorm'
@@ -20,7 +19,7 @@ export class MySQLAnalyticsEntityRepository implements AnalyticsEntityRepository
.getOne()
}
async findOneByUserUuid(userUuid: Uuid): Promise<AnalyticsEntity | null> {
async findOneByUserUuid(userUuid: string): Promise<AnalyticsEntity | null> {
return this.ormRepository
.createQueryBuilder('analytics_entity')
.where('analytics_entity.user_uuid = :userUuid', { userUuid })
+24
View File
@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.46.7](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.46.6...@standardnotes/api-gateway@1.46.7) (2023-01-20)
**Note:** Version bump only for package @standardnotes/api-gateway
## [1.46.6](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.46.5...@standardnotes/api-gateway@1.46.6) (2023-01-20)
**Note:** Version bump only for package @standardnotes/api-gateway
## [1.46.5](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.46.4...@standardnotes/api-gateway@1.46.5) (2023-01-19)
**Note:** Version bump only for package @standardnotes/api-gateway
## [1.46.4](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.46.3...@standardnotes/api-gateway@1.46.4) (2023-01-19)
**Note:** Version bump only for package @standardnotes/api-gateway
## [1.46.3](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.46.2...@standardnotes/api-gateway@1.46.3) (2023-01-19)
**Note:** Version bump only for package @standardnotes/api-gateway
## [1.46.2](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.46.1...@standardnotes/api-gateway@1.46.2) (2023-01-19)
**Note:** Version bump only for package @standardnotes/api-gateway
## [1.46.1](https://github.com/standardnotes/api-gateway/compare/@standardnotes/api-gateway@1.46.0...@standardnotes/api-gateway@1.46.1) (2023-01-18)
**Note:** Version bump only for package @standardnotes/api-gateway
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/api-gateway",
"version": "1.46.1",
"version": "1.46.7",
"engines": {
"node": ">=18.0.0 <19.0.0"
},
@@ -22,7 +22,7 @@
"dependencies": {
"@newrelic/winston-enricher": "^4.0.0",
"@sentry/node": "^7.28.1",
"@standardnotes/common": "workspace:^",
"@standardnotes/domain-core": "workspace:^",
"@standardnotes/domain-events": "workspace:*",
"@standardnotes/domain-events-infra": "workspace:*",
"@standardnotes/security": "workspace:*",
@@ -51,8 +51,8 @@
"@types/jsonwebtoken": "^9.0.1",
"@types/newrelic": "^9.4.0",
"@types/prettyjson": "^0.0.30",
"@typescript-eslint/eslint-plugin": "^5.29.0",
"eslint": "^8.14.0",
"@typescript-eslint/eslint-plugin": "^5.48.2",
"eslint": "^8.32.0",
"eslint-plugin-prettier": "^4.0.0",
"jest": "^29.1.2",
"nodemon": "^2.0.19",
@@ -1,5 +1,5 @@
import { CrossServiceTokenData } from '@standardnotes/security'
import { RoleName } from '@standardnotes/common'
import { RoleName } from '@standardnotes/domain-core'
import { TimerInterface } from '@standardnotes/time'
import { NextFunction, Request, Response } from 'express'
import { inject, injectable } from 'inversify'
@@ -76,7 +76,7 @@ export class AuthMiddleware extends BaseMiddleware {
response.locals.freeUser =
decodedToken.roles.length === 1 &&
decodedToken.roles.find((role) => role.name === RoleName.CoreUser) !== undefined
decodedToken.roles.find((role) => role.name === RoleName.NAMES.CoreUser) !== undefined
if (this.crossServiceTokenCacheTTL && !crossServiceTokenFetchedFromCache) {
await this.crossServiceTokenCache.set({
@@ -1,5 +1,5 @@
import { CrossServiceTokenData } from '@standardnotes/security'
import { RoleName } from '@standardnotes/common'
import { RoleName } from '@standardnotes/domain-core'
import { NextFunction, Request, Response } from 'express'
import { inject, injectable } from 'inversify'
import { BaseMiddleware } from 'inversify-express-utils'
@@ -62,7 +62,7 @@ export class WebSocketAuthMiddleware extends BaseMiddleware {
response.locals.freeUser =
decodedToken.roles.length === 1 &&
decodedToken.roles.find((role) => role.name === RoleName.CoreUser) !== undefined
decodedToken.roles.find((role) => role.name === RoleName.NAMES.CoreUser) !== undefined
response.locals.userUuid = decodedToken.user.uuid
response.locals.roles = decodedToken.roles
} catch (error) {
+56
View File
@@ -3,6 +3,62 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.84.6](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.84.5...@standardnotes/auth-server@1.84.6) (2023-01-20)
### Reverts
* Revert "chore: upgrade @standardnotes/* dependencies" ([5bf3ecd](https://github.com/standardnotes/server/commit/5bf3ecdf42e1e5b9cb538cad08a18fb6e4054129))
## [1.84.5](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.84.4...@standardnotes/auth-server@1.84.5) (2023-01-20)
**Note:** Version bump only for package @standardnotes/auth-server
## [1.84.4](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.84.2...@standardnotes/auth-server@1.84.4) (2023-01-20)
**Note:** Version bump only for package @standardnotes/auth-server
## [1.84.2](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.84.1...@standardnotes/auth-server@1.84.2) (2023-01-19)
**Note:** Version bump only for package @standardnotes/auth-server
## [1.84.1](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.84.0...@standardnotes/auth-server@1.84.1) (2023-01-19)
### Bug Fixes
* strings for role names ([ba7662f](https://github.com/standardnotes/server/commit/ba7662fc1ea24548ab4ea287c5f34d6f27c6c923))
# [1.84.0](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.83.1...@standardnotes/auth-server@1.84.0) (2023-01-19)
### Features
* offline roles ([#419](https://github.com/standardnotes/server/issues/419)) ([2db0c12](https://github.com/standardnotes/server/commit/2db0c125fe5872c5898103c2388881ab416b5a99))
## [1.83.1](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.83.0...@standardnotes/auth-server@1.83.1) (2023-01-19)
### Reverts
* Revert "feat: include roles in offline features request (#418)" ([f20ee68](https://github.com/standardnotes/server/commit/f20ee68f504449b6ff37748c4d7f83c08bb4039d)), closes [#418](https://github.com/standardnotes/server/issues/418)
# [1.83.0](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.82.6...@standardnotes/auth-server@1.83.0) (2023-01-19)
### Features
* include roles in offline features request ([#418](https://github.com/standardnotes/server/issues/418)) ([2e7fdd9](https://github.com/standardnotes/server/commit/2e7fdd93dd3b07e0a9f2e72521251af1d15660d4))
## [1.82.6](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.82.5...@standardnotes/auth-server@1.82.6) (2023-01-19)
### Bug Fixes
* expected value for unit test ([#417](https://github.com/standardnotes/server/issues/417)) ([ec5429e](https://github.com/standardnotes/server/commit/ec5429eeec8ea6422ed6e0e798e0f16aa9f78c95))
## [1.82.5](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.82.4...@standardnotes/auth-server@1.82.5) (2023-01-19)
**Note:** Version bump only for package @standardnotes/auth-server
## [1.82.4](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.82.3...@standardnotes/auth-server@1.82.4) (2023-01-19)
**Note:** Version bump only for package @standardnotes/auth-server
## [1.82.3](https://github.com/standardnotes/server/compare/@standardnotes/auth-server@1.82.2...@standardnotes/auth-server@1.82.3) (2023-01-18)
**Note:** Version bump only for package @standardnotes/auth-server
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@standardnotes/auth-server",
"version": "1.82.3",
"version": "1.84.6",
"engines": {
"node": ">=18.0.0 <19.0.0"
},
@@ -42,7 +42,7 @@
"@standardnotes/domain-core": "workspace:^",
"@standardnotes/domain-events": "workspace:*",
"@standardnotes/domain-events-infra": "workspace:*",
"@standardnotes/features": "^1.58.0",
"@standardnotes/features": "^1.58.1",
"@standardnotes/predicates": "workspace:*",
"@standardnotes/responses": "^1.6.39",
"@standardnotes/security": "workspace:*",
@@ -81,8 +81,8 @@
"@types/prettyjson": "^0.0.30",
"@types/ua-parser-js": "^0.7.36",
"@types/uuid": "^8.3.0",
"@typescript-eslint/eslint-plugin": "^5.29.0",
"eslint": "^8.14.0",
"@typescript-eslint/eslint-plugin": "^5.48.2",
"eslint": "^8.32.0",
"eslint-plugin-prettier": "^4.0.0",
"jest": "^29.1.2",
"nodemon": "^2.0.19",
+1 -9
View File
@@ -121,14 +121,7 @@ import { RedisOfflineSubscriptionTokenRepository } from '../Infra/Redis/RedisOff
import { CreateOfflineSubscriptionToken } from '../Domain/UseCase/CreateOfflineSubscriptionToken/CreateOfflineSubscriptionToken'
import { AuthenticateOfflineSubscriptionToken } from '../Domain/UseCase/AuthenticateOfflineSubscriptionToken/AuthenticateOfflineSubscriptionToken'
import { SubscriptionCancelledEventHandler } from '../Domain/Handler/SubscriptionCancelledEventHandler'
import {
ContentDecoder,
ContentDecoderInterface,
ProtocolVersion,
Uuid,
UuidValidator,
ValidatorInterface,
} from '@standardnotes/common'
import { ContentDecoder, ContentDecoderInterface, ProtocolVersion } from '@standardnotes/common'
import { GetUserOfflineSubscription } from '../Domain/UseCase/GetUserOfflineSubscription/GetUserOfflineSubscription'
import { ApiGatewayOfflineAuthMiddleware } from '../Controller/ApiGatewayOfflineAuthMiddleware'
import { UserEmailChangedEventHandler } from '../Domain/Handler/UserEmailChangedEventHandler'
@@ -532,7 +525,6 @@ export class ContainerConfigLoader {
.bind<SelectorInterface<boolean>>(TYPES.BooleanSelector)
.toConstantValue(new DeterministicSelector<boolean>())
container.bind<UserSubscriptionServiceInterface>(TYPES.UserSubscriptionService).to(UserSubscriptionService)
container.bind<ValidatorInterface<Uuid>>(TYPES.UuidValidator).toConstantValue(new UuidValidator())
if (env.get('SNS_TOPIC_ARN', true)) {
container
-1
View File
@@ -207,7 +207,6 @@ const TYPES = {
ProtocolVersionSelector: Symbol.for('ProtocolVersionSelector'),
BooleanSelector: Symbol.for('BooleanSelector'),
UserSubscriptionService: Symbol.for('UserSubscriptionService'),
UuidValidator: Symbol.for('UuidValidator'),
}
export default TYPES
@@ -4,7 +4,7 @@ import { ApiGatewayAuthMiddleware } from './ApiGatewayAuthMiddleware'
import { NextFunction, Request, Response } from 'express'
import { Logger } from 'winston'
import { CrossServiceTokenData, TokenDecoderInterface } from '@standardnotes/security'
import { RoleName } from '@standardnotes/common'
import { RoleName } from '@standardnotes/domain-core'
describe('ApiGatewayAuthMiddleware', () => {
let tokenDecoder: TokenDecoderInterface<CrossServiceTokenData>
@@ -28,7 +28,7 @@ describe('ApiGatewayAuthMiddleware', () => {
roles: [
{
uuid: 'a-b-c',
name: RoleName.CoreUser,
name: RoleName.NAMES.CoreUser,
},
],
})
@@ -56,7 +56,7 @@ describe('ApiGatewayAuthMiddleware', () => {
expect(response.locals.roles).toEqual([
{
uuid: 'a-b-c',
name: RoleName.CoreUser,
name: RoleName.NAMES.CoreUser,
},
])
@@ -12,7 +12,6 @@ import {
SubscriptionInviteResponse,
SubscriptionServerInterface,
} from '@standardnotes/api'
import { RoleName } from '@standardnotes/common'
import { inject, injectable } from 'inversify'
import TYPES from '../Bootstrap/Types'
@@ -88,7 +87,7 @@ export class SubscriptionInvitesController implements SubscriptionServerInterfac
inviterEmail: params.inviterEmail as string,
inviterUuid: params.inviterUuid as string,
inviteeIdentifier: params.identifier,
inviterRoles: params.inviterRoles as RoleName[],
inviterRoles: params.inviterRoles as string[],
})
if (result.success) {
@@ -1,5 +1,5 @@
import { CrossServiceTokenData, TokenEncoderInterface } from '@standardnotes/security'
import { ErrorTag, RoleName } from '@standardnotes/common'
import { ErrorTag } from '@standardnotes/common'
import { SettingName } from '@standardnotes/settings'
import { Request, Response } from 'express'
import { inject } from 'inversify'
@@ -101,10 +101,10 @@ export class SubscriptionTokensController extends BaseHttpController {
return <{ uuid: string; email: string }>await this.userProjector.projectSimple(user)
}
private async projectRoles(roles: Array<Role>): Promise<Array<{ uuid: string; name: RoleName }>> {
private async projectRoles(roles: Array<Role>): Promise<Array<{ uuid: string; name: string }>> {
const roleProjections = []
for (const role of roles) {
roleProjections.push(<{ uuid: string; name: RoleName }>await this.roleProjector.projectSimple(role))
roleProjections.push(<{ uuid: string; name: string }>await this.roleProjector.projectSimple(role))
}
return roleProjections
@@ -4,27 +4,22 @@ import { Request, Response } from 'express'
import { results } from 'inversify-express-utils'
import { ValetTokenController } from './ValetTokenController'
import { CreateValetToken } from '../Domain/UseCase/CreateValetToken/CreateValetToken'
import { Uuid, ValidatorInterface } from '@standardnotes/common'
describe('ValetTokenController', () => {
let createValetToken: CreateValetToken
let uuidValidator: ValidatorInterface<Uuid>
let request: Request
let response: Response
const createController = () => new ValetTokenController(createValetToken, uuidValidator)
const createController = () => new ValetTokenController(createValetToken)
beforeEach(() => {
createValetToken = {} as jest.Mocked<CreateValetToken>
createValetToken.execute = jest.fn().mockReturnValue({ success: true, valetToken: 'foobar' })
uuidValidator = {} as jest.Mocked<ValidatorInterface<Uuid>>
uuidValidator.validate = jest.fn().mockReturnValue(true)
request = {
body: {
operation: 'write',
resources: ['1-2-3/2-3-4'],
resources: [{ remoteIdentifier: '00000000-0000-0000-0000-000000000000' }],
},
} as jest.Mocked<Request>
@@ -42,13 +37,13 @@ describe('ValetTokenController', () => {
expect(createValetToken.execute).toHaveBeenCalledWith({
operation: 'write',
userUuid: '1-2-3',
resources: ['1-2-3/2-3-4'],
resources: [{ remoteIdentifier: '00000000-0000-0000-0000-000000000000' }],
})
expect(await result.content.readAsStringAsync()).toEqual('{"success":true,"valetToken":"foobar"}')
})
it('should not create a valet token if the remote resource identifier is not a valid uuid', async () => {
uuidValidator.validate = jest.fn().mockReturnValue(false)
request.body.resources = ['00000000-0000-0000-0000-000000000000', 'invalid-uuid']
const httpResponse = <results.JsonResult>await createController().create(request, response)
const result = await httpResponse.executeAsync()
@@ -68,7 +63,7 @@ describe('ValetTokenController', () => {
expect(createValetToken.execute).toHaveBeenCalledWith({
operation: 'read',
userUuid: '1-2-3',
resources: ['1-2-3/2-3-4'],
resources: [{ remoteIdentifier: '00000000-0000-0000-0000-000000000000' }],
})
expect(await result.content.readAsStringAsync()).toEqual('{"success":true,"valetToken":"foobar"}')
})
@@ -106,7 +101,7 @@ describe('ValetTokenController', () => {
expect(createValetToken.execute).toHaveBeenCalledWith({
operation: 'write',
userUuid: '1-2-3',
resources: ['1-2-3/2-3-4'],
resources: [{ remoteIdentifier: '00000000-0000-0000-0000-000000000000' }],
})
expect(await result.content.readAsStringAsync()).toEqual('{"success":false}')
@@ -11,15 +11,13 @@ import { CreateValetTokenPayload } from '@standardnotes/responses'
import TYPES from '../Bootstrap/Types'
import { CreateValetToken } from '../Domain/UseCase/CreateValetToken/CreateValetToken'
import { ErrorTag, Uuid, ValidatorInterface } from '@standardnotes/common'
import { ErrorTag } from '@standardnotes/common'
import { ValetTokenOperation } from '@standardnotes/security'
import { Uuid } from '@standardnotes/domain-core'
@controller('/valet-tokens', TYPES.ApiGatewayAuthMiddleware)
export class ValetTokenController extends BaseHttpController {
constructor(
@inject(TYPES.CreateValetToken) private createValetKey: CreateValetToken,
@inject(TYPES.UuidValidator) private uuidValitor: ValidatorInterface<Uuid>,
) {
constructor(@inject(TYPES.CreateValetToken) private createValetKey: CreateValetToken) {
super()
}
@@ -40,7 +38,8 @@ export class ValetTokenController extends BaseHttpController {
}
for (const resource of payload.resources) {
if (!this.uuidValitor.validate(resource.remoteIdentifier)) {
const resourceUuidOrError = Uuid.create(resource.remoteIdentifier)
if (resourceUuidOrError.isFailed()) {
return this.json(
{
error: {
@@ -1,8 +1,8 @@
import { ProtocolVersion, Uuid } from '@standardnotes/common'
import { ProtocolVersion } from '@standardnotes/common'
export interface AuthResponse {
user: {
uuid: Uuid
uuid: string
email: string
protocolVersion: ProtocolVersion
}
@@ -1,5 +1,5 @@
import { SessionTokenData, TokenEncoderInterface } from '@standardnotes/security'
import { ProtocolVersion, Uuid } from '@standardnotes/common'
import { ProtocolVersion } from '@standardnotes/common'
import * as crypto from 'crypto'
import { inject, injectable } from 'inversify'
@@ -40,7 +40,7 @@ export class AuthResponseFactory20161215 implements AuthResponseFactoryInterface
return {
user: this.userProjector.projectSimple(dto.user) as {
uuid: Uuid
uuid: string
email: string
protocolVersion: ProtocolVersion
},
@@ -3,7 +3,7 @@ import {
SessionTokenData,
TokenEncoderInterface,
} from '@standardnotes/security'
import { ProtocolVersion, Uuid } from '@standardnotes/common'
import { ProtocolVersion } from '@standardnotes/common'
import { SessionBody } from '@standardnotes/responses'
import { inject, injectable } from 'inversify'
import { Logger } from 'winston'
@@ -49,7 +49,7 @@ export class AuthResponseFactory20200115 extends AuthResponseFactory20190520 {
session: sessionPayload,
key_params: this.keyParamsFactory.create(dto.user, true),
user: this.userProjector.projectSimple(dto.user) as {
uuid: Uuid
uuid: string
email: string
protocolVersion: ProtocolVersion
},
@@ -1,6 +1,6 @@
/* istanbul ignore file */
import { JSONString, ProtocolVersion, RoleName, Uuid } from '@standardnotes/common'
import { ProtocolVersion } from '@standardnotes/common'
import {
AccountDeletionRequestedEvent,
UserEmailChangedEvent,
@@ -105,7 +105,7 @@ export class DomainEventFactory implements DomainEventFactoryInterface {
}
}
createWebSocketMessageRequestedEvent(dto: { userUuid: Uuid; message: JSONString }): WebSocketMessageRequestedEvent {
createWebSocketMessageRequestedEvent(dto: { userUuid: string; message: string }): WebSocketMessageRequestedEvent {
return {
type: 'WEB_SOCKET_MESSAGE_REQUESTED',
createdAt: this.timer.getUTCDate(),
@@ -142,7 +142,7 @@ export class DomainEventFactory implements DomainEventFactoryInterface {
}
createPredicateVerifiedEvent(dto: {
userUuid: Uuid
userUuid: string
predicate: Predicate
predicateVerificationResult: PredicateVerificationResult
}): PredicateVerifiedEvent {
@@ -164,10 +164,10 @@ export class DomainEventFactory implements DomainEventFactoryInterface {
createSharedSubscriptionInvitationCanceledEvent(dto: {
inviterEmail: string
inviterSubscriptionId: number
inviterSubscriptionUuid: Uuid
inviterSubscriptionUuid: string
inviteeIdentifier: string
inviteeIdentifierType: InviteeIdentifierType
sharedSubscriptionInvitationUuid: Uuid
sharedSubscriptionInvitationUuid: string
}): SharedSubscriptionInvitationCanceledEvent {
return {
type: 'SHARED_SUBSCRIPTION_INVITATION_CANCELED',
@@ -291,9 +291,9 @@ export class DomainEventFactory implements DomainEventFactoryInterface {
}
createAccountDeletionRequestedEvent(dto: {
userUuid: Uuid
userUuid: string
userCreatedAtTimestamp: number
regularSubscriptionUuid: Uuid | undefined
regularSubscriptionUuid: string | undefined
}): AccountDeletionRequestedEvent {
return {
type: 'ACCOUNT_DELETION_REQUESTED',
@@ -347,7 +347,7 @@ export class DomainEventFactory implements DomainEventFactoryInterface {
}
}
createUserRolesChangedEvent(userUuid: string, email: string, currentRoles: RoleName[]): UserRolesChangedEvent {
createUserRolesChangedEvent(userUuid: string, email: string, currentRoles: string[]): UserRolesChangedEvent {
return {
type: 'USER_ROLES_CHANGED',
createdAt: this.timer.getUTCDate(),
@@ -1,4 +1,4 @@
import { Uuid, RoleName, ProtocolVersion, JSONString } from '@standardnotes/common'
import { ProtocolVersion, JSONString } from '@standardnotes/common'
import { Predicate, PredicateVerificationResult } from '@standardnotes/predicates'
import {
AccountDeletionRequestedEvent,
@@ -23,7 +23,7 @@ import { InviteeIdentifierType } from '../SharedSubscription/InviteeIdentifierTy
export interface DomainEventFactoryInterface {
createUserContentSizeRecalculationRequestedEvent(userUuid: string): UserContentSizeRecalculationRequestedEvent
createWebSocketMessageRequestedEvent(dto: { userUuid: Uuid; message: JSONString }): WebSocketMessageRequestedEvent
createWebSocketMessageRequestedEvent(dto: { userUuid: string; message: JSONString }): WebSocketMessageRequestedEvent
createEmailRequestedEvent(dto: {
userEmail: string
messageIdentifier: string
@@ -50,14 +50,14 @@ export interface DomainEventFactoryInterface {
userHasEmailsMuted: boolean,
): CloudBackupRequestedEvent
createAccountDeletionRequestedEvent(dto: {
userUuid: Uuid
userUuid: string
userCreatedAtTimestamp: number
regularSubscriptionUuid: Uuid | undefined
regularSubscriptionUuid: string | undefined
}): AccountDeletionRequestedEvent
createUserRolesChangedEvent(userUuid: string, email: string, currentRoles: RoleName[]): UserRolesChangedEvent
createUserRolesChangedEvent(userUuid: string, email: string, currentRoles: string[]): UserRolesChangedEvent
createUserEmailChangedEvent(userUuid: string, fromEmail: string, toEmail: string): UserEmailChangedEvent
createUserDisabledSessionUserAgentLoggingEvent(dto: {
userUuid: Uuid
userUuid: string
email: string
}): UserDisabledSessionUserAgentLoggingEvent
createSharedSubscriptionInvitationCreatedEvent(dto: {
@@ -70,13 +70,13 @@ export interface DomainEventFactoryInterface {
createSharedSubscriptionInvitationCanceledEvent(dto: {
inviterEmail: string
inviterSubscriptionId: number
inviterSubscriptionUuid: Uuid
inviterSubscriptionUuid: string
inviteeIdentifier: string
inviteeIdentifierType: InviteeIdentifierType
sharedSubscriptionInvitationUuid: Uuid
sharedSubscriptionInvitationUuid: string
}): SharedSubscriptionInvitationCanceledEvent
createPredicateVerifiedEvent(dto: {
userUuid: Uuid
userUuid: string
predicate: Predicate
predicateVerificationResult: PredicateVerificationResult
}): PredicateVerifiedEvent
@@ -1,12 +1,34 @@
import 'reflect-metadata'
import { Role } from '@standardnotes/security'
import { RoleName, SubscriptionName } from '@standardnotes/common'
import { SubscriptionName } from '@standardnotes/common'
import { RoleName } from '@standardnotes/domain-core'
import { RoleToSubscriptionMapInterface } from '../Role/RoleToSubscriptionMapInterface'
import { User } from '../User/User'
import { UserSubscription } from '../Subscription/UserSubscription'
jest.mock('@standardnotes/features', () => {
const original = jest.requireActual('@standardnotes/features')
return {
...original,
GetFeatures: jest.fn().mockImplementation(() => [
{
identifier: 'org.standardnotes.theme-autobiography',
permission_name: original.PermissionName.AutobiographyTheme,
expires_at: 555,
},
{
identifier: 'org.standardnotes.bold-editor',
permission_name: original.PermissionName.BoldEditor,
expires_at: 777,
},
]),
}
})
const { GetFeatures } = jest.requireMock('@standardnotes/features')
import { FeatureService } from './FeatureService'
import { Permission, PermissionName } from '@standardnotes/features'
import { OfflineUserSubscriptionRepositoryInterface } from '../Subscription/OfflineUserSubscriptionRepositoryInterface'
@@ -40,10 +62,10 @@ describe('FeatureService', () => {
.fn()
.mockImplementation((subscriptionName: SubscriptionName) => {
if (subscriptionName === SubscriptionName.PlusPlan) {
return RoleName.PlusUser
return RoleName.NAMES.PlusUser
}
if (subscriptionName === SubscriptionName.ProPlan) {
return RoleName.ProUser
return RoleName.NAMES.ProUser
}
return undefined
@@ -67,13 +89,13 @@ describe('FeatureService', () => {
}
role1 = {
name: RoleName.PlusUser,
name: RoleName.NAMES.PlusUser,
uuid: 'role-1-1-1',
permissions: Promise.resolve([permission1, permission3]),
} as jest.Mocked<Role>
role2 = {
name: RoleName.ProUser,
name: RoleName.NAMES.ProUser,
uuid: 'role-2-2-2',
permissions: Promise.resolve([permission2]),
} as jest.Mocked<Role>
@@ -159,9 +181,9 @@ describe('FeatureService', () => {
describe('offline subscribers', () => {
it('should return user features with `expires_at` field', async () => {
const features = await createService().getFeaturesForOfflineUser('test@test.com')
const featuresResponse = await createService().getFeaturesForOfflineUser('test@test.com')
expect(features).toEqual(
expect(featuresResponse.features).toEqual(
expect.arrayContaining([
expect.objectContaining({
identifier: 'org.standardnotes.theme-autobiography',
@@ -174,7 +196,7 @@ describe('FeatureService', () => {
it('should not return user features if a subscription could not be found', async () => {
offlineUserSubscriptionRepository.findByEmail = jest.fn().mockReturnValue([])
expect(await createService().getFeaturesForOfflineUser('test@test.com')).toEqual([])
expect(await createService().getFeaturesForOfflineUser('test@test.com')).toEqual({ features: [], roles: [] })
})
})
@@ -223,7 +245,7 @@ describe('FeatureService', () => {
it('should not return user features if those cannot be find for permissions', async () => {
role1 = {
name: RoleName.CoreUser,
name: RoleName.NAMES.CoreUser,
uuid: 'role-1-1-1',
permissions: Promise.resolve([permission4]),
} as jest.Mocked<Role>
@@ -302,8 +324,26 @@ describe('FeatureService', () => {
name: PermissionName.FilesBeta,
} as jest.Mocked<Permission>
GetFeatures.mockImplementation(() => [
{
identifier: 'org.standardnotes.theme-autobiography',
permission_name: PermissionName.AutobiographyTheme,
expires_at: 555,
},
{
identifier: 'org.standardnotes.bold-editor',
permission_name: PermissionName.BoldEditor,
expires_at: 777,
},
{
permission_name: PermissionName.FilesBeta,
expires_at: undefined,
no_expire: true,
},
])
const nonSubscriptionRole = {
name: RoleName.FilesBetaUser,
name: RoleName.NAMES.FilesBetaUser,
uuid: 'role-files-beta',
permissions: Promise.resolve([nonSubscriptionPermission]),
} as jest.Mocked<Role>
@@ -332,7 +372,6 @@ describe('FeatureService', () => {
expires_at: 777,
}),
expect.objectContaining({
identifier: 'org.standardnotes.files-beta',
expires_at: undefined,
no_expire: true,
}),
@@ -347,7 +386,7 @@ describe('FeatureService', () => {
.mockReturnValueOnce(SubscriptionName.ProPlan)
role2 = {
name: RoleName.ProUser,
name: RoleName.NAMES.ProUser,
uuid: 'role-2-2-2',
permissions: Promise.resolve([permission1, permission2]),
} as jest.Mocked<Role>
@@ -384,7 +423,7 @@ describe('FeatureService', () => {
subscription2.endsAt = lesserExpireAt
role2 = {
name: RoleName.ProUser,
name: RoleName.NAMES.ProUser,
uuid: 'role-2-2-2',
permissions: Promise.resolve([permission1, permission2]),
} as jest.Mocked<Role>
@@ -1,4 +1,4 @@
import { RoleName, SubscriptionName } from '@standardnotes/common'
import { SubscriptionName } from '@standardnotes/common'
import { FeatureDescription, GetFeatures } from '@standardnotes/features'
import { inject, injectable } from 'inversify'
import TYPES from '../../Bootstrap/Types'
@@ -21,7 +21,7 @@ export class FeatureService implements FeatureServiceInterface {
@inject(TYPES.Timer) private timer: TimerInterface,
) {}
async getFeaturesForOfflineUser(email: string): Promise<FeatureDescription[]> {
async getFeaturesForOfflineUser(email: string): Promise<{ features: FeatureDescription[]; roles: string[] }> {
const userSubscriptions = await this.offlineUserSubscriptionRepository.findByEmail(
email,
this.timer.getTimestampInMicroseconds(),
@@ -34,7 +34,11 @@ export class FeatureService implements FeatureServiceInterface {
}
}
return this.getFeaturesForSubscriptions(userSubscriptions, [...userRolesMap.values()])
const roles = [...userRolesMap.values()]
return {
features: await this.getFeaturesForSubscriptions(userSubscriptions, roles),
roles: roles.map((role) => role.name),
}
}
async getFeaturesForUser(user: User): Promise<Array<FeatureDescription>> {
@@ -117,7 +121,7 @@ export class FeatureService implements FeatureServiceInterface {
...featureForPermission,
expires_at: longestLastingSubscription ? longestLastingSubscription.endsAt : undefined,
no_expire: longestLastingSubscription ? false : true,
role_name: role.name as RoleName,
role_name: role.name,
})
continue
@@ -4,5 +4,5 @@ import { User } from '../User/User'
export interface FeatureServiceInterface {
getFeaturesForUser(user: User): Promise<Array<FeatureDescription>>
getFeaturesForOfflineUser(email: string): Promise<FeatureDescription[]>
getFeaturesForOfflineUser(email: string): Promise<{ features: FeatureDescription[]; roles: string[] }>
}
@@ -1,6 +1,7 @@
import 'reflect-metadata'
import { RoleName, SubscriptionName } from '@standardnotes/common'
import { SubscriptionName } from '@standardnotes/common'
import { RoleName } from '@standardnotes/domain-core'
import { SubscriptionExpiredEvent } from '@standardnotes/domain-events'
import { Logger } from 'winston'
@@ -39,7 +40,7 @@ describe('SubscriptionExpiredEventHandler', () => {
email: 'test@test.com',
roles: Promise.resolve([
{
name: RoleName.ProUser,
name: RoleName.NAMES.ProUser,
},
]),
} as jest.Mocked<User>
@@ -1,4 +1,3 @@
import { SubscriptionName } from '@standardnotes/common'
import { DomainEventHandlerInterface, SubscriptionExpiredEvent } from '@standardnotes/domain-events'
import { inject, injectable } from 'inversify'
import { Logger } from 'winston'
@@ -38,10 +37,7 @@ export class SubscriptionExpiredEventHandler implements DomainEventHandlerInterf
await this.removeRoleFromSubscriptionUsers(event.payload.subscriptionId, event.payload.subscriptionName)
}
private async removeRoleFromSubscriptionUsers(
subscriptionId: number,
subscriptionName: SubscriptionName,
): Promise<void> {
private async removeRoleFromSubscriptionUsers(subscriptionId: number, subscriptionName: string): Promise<void> {
const userSubscriptions = await this.userSubscriptionRepository.findBySubscriptionId(subscriptionId)
for (const userSubscription of userSubscriptions) {
await this.roleService.removeUserRole(await userSubscription.user, subscriptionName)
@@ -1,6 +1,7 @@
import 'reflect-metadata'
import { RoleName, SubscriptionName } from '@standardnotes/common'
import { SubscriptionName } from '@standardnotes/common'
import { RoleName } from '@standardnotes/domain-core'
import { SubscriptionPurchasedEvent } from '@standardnotes/domain-events'
import { Logger } from 'winston'
@@ -47,7 +48,7 @@ describe('SubscriptionPurchasedEventHandler', () => {
email: 'test@test.com',
roles: Promise.resolve([
{
name: RoleName.CoreUser,
name: RoleName.NAMES.CoreUser,
},
]),
} as jest.Mocked<User>
@@ -1,4 +1,3 @@
import { SubscriptionName } from '@standardnotes/common'
import { DomainEventHandlerInterface, SubscriptionPurchasedEvent } from '@standardnotes/domain-events'
import { inject, injectable } from 'inversify'
import { Logger } from 'winston'
@@ -65,7 +64,7 @@ export class SubscriptionPurchasedEventHandler implements DomainEventHandlerInte
)
}
private async addUserRole(user: User, subscriptionName: SubscriptionName): Promise<void> {
private async addUserRole(user: User, subscriptionName: string): Promise<void> {
await this.roleService.addUserRole(user, subscriptionName)
}
@@ -1,6 +1,7 @@
import 'reflect-metadata'
import { RoleName, SubscriptionName } from '@standardnotes/common'
import { SubscriptionName } from '@standardnotes/common'
import { RoleName } from '@standardnotes/domain-core'
import { SubscriptionReassignedEvent } from '@standardnotes/domain-events'
import { Logger } from 'winston'
@@ -45,7 +46,7 @@ describe('SubscriptionReassignedEventHandler', () => {
email: 'test@test.com',
roles: Promise.resolve([
{
name: RoleName.CoreUser,
name: RoleName.NAMES.CoreUser,
},
]),
} as jest.Mocked<User>
@@ -137,7 +138,7 @@ describe('SubscriptionReassignedEventHandler', () => {
email: 'test@test.com',
roles: Promise.resolve([
{
name: RoleName.CoreUser,
name: RoleName.NAMES.CoreUser,
},
]),
},
@@ -1,4 +1,3 @@
import { SubscriptionName } from '@standardnotes/common'
import { DomainEventHandlerInterface, SubscriptionReassignedEvent } from '@standardnotes/domain-events'
import { inject, injectable } from 'inversify'
import { Logger } from 'winston'
@@ -62,7 +61,7 @@ export class SubscriptionReassignedEventHandler implements DomainEventHandlerInt
)
}
private async addUserRole(user: User, subscriptionName: SubscriptionName): Promise<void> {
private async addUserRole(user: User, subscriptionName: string): Promise<void> {
await this.roleService.addUserRole(user, subscriptionName)
}
@@ -1,6 +1,7 @@
import 'reflect-metadata'
import { RoleName, SubscriptionName } from '@standardnotes/common'
import { SubscriptionName } from '@standardnotes/common'
import { RoleName } from '@standardnotes/domain-core'
import { SubscriptionRefundedEvent } from '@standardnotes/domain-events'
import { Logger } from 'winston'
@@ -39,7 +40,7 @@ describe('SubscriptionRefundedEventHandler', () => {
email: 'test@test.com',
roles: Promise.resolve([
{
name: RoleName.ProUser,
name: RoleName.NAMES.ProUser,
},
]),
} as jest.Mocked<User>
@@ -1,4 +1,3 @@
import { SubscriptionName } from '@standardnotes/common'
import { DomainEventHandlerInterface, SubscriptionRefundedEvent } from '@standardnotes/domain-events'
import { inject, injectable } from 'inversify'
import { Logger } from 'winston'
@@ -38,10 +37,7 @@ export class SubscriptionRefundedEventHandler implements DomainEventHandlerInter
await this.removeRoleFromSubscriptionUsers(event.payload.subscriptionId, event.payload.subscriptionName)
}
private async removeRoleFromSubscriptionUsers(
subscriptionId: number,
subscriptionName: SubscriptionName,
): Promise<void> {
private async removeRoleFromSubscriptionUsers(subscriptionId: number, subscriptionName: string): Promise<void> {
const userSubscriptions = await this.userSubscriptionRepository.findBySubscriptionId(subscriptionId)
for (const userSubscription of userSubscriptions) {
await this.roleService.removeUserRole(await userSubscription.user, subscriptionName)
@@ -1,6 +1,7 @@
import 'reflect-metadata'
import { RoleName, SubscriptionName } from '@standardnotes/common'
import { SubscriptionName } from '@standardnotes/common'
import { RoleName } from '@standardnotes/domain-core'
import { SubscriptionRenewedEvent } from '@standardnotes/domain-events'
import * as dayjs from 'dayjs'
import { Logger } from 'winston'
@@ -42,7 +43,7 @@ describe('SubscriptionRenewedEventHandler', () => {
email: 'test@test.com',
roles: Promise.resolve([
{
name: RoleName.CoreUser,
name: RoleName.NAMES.CoreUser,
},
]),
} as jest.Mocked<User>
@@ -4,7 +4,6 @@ import { inject, injectable } from 'inversify'
import TYPES from '../../Bootstrap/Types'
import { UserSubscriptionRepositoryInterface } from '../Subscription/UserSubscriptionRepositoryInterface'
import { OfflineUserSubscriptionRepositoryInterface } from '../Subscription/OfflineUserSubscriptionRepositoryInterface'
import { SubscriptionName } from '@standardnotes/common'
import { RoleServiceInterface } from '../Role/RoleServiceInterface'
import { UserRepositoryInterface } from '../User/UserRepositoryInterface'
import { Logger } from 'winston'
@@ -61,7 +60,7 @@ export class SubscriptionRenewedEventHandler implements DomainEventHandlerInterf
await this.addRoleToSubscriptionUsers(event.payload.subscriptionId, event.payload.subscriptionName)
}
private async addRoleToSubscriptionUsers(subscriptionId: number, subscriptionName: SubscriptionName): Promise<void> {
private async addRoleToSubscriptionUsers(subscriptionId: number, subscriptionName: string): Promise<void> {
const userSubscriptions = await this.userSubscriptionRepository.findBySubscriptionId(subscriptionId)
for (const userSubscription of userSubscriptions) {
const user = await userSubscription.user
@@ -1,6 +1,7 @@
import 'reflect-metadata'
import { ContentDecoderInterface, RoleName, SubscriptionName } from '@standardnotes/common'
import { ContentDecoderInterface, SubscriptionName } from '@standardnotes/common'
import { RoleName } from '@standardnotes/domain-core'
import { SubscriptionSyncRequestedEvent } from '@standardnotes/domain-events'
import { Logger } from 'winston'
@@ -55,7 +56,7 @@ describe('SubscriptionSyncRequestedEventHandler', () => {
email: 'test@test.com',
roles: Promise.resolve([
{
name: RoleName.CoreUser,
name: RoleName.NAMES.CoreUser,
},
]),
} as jest.Mocked<User>
@@ -144,7 +145,7 @@ describe('SubscriptionSyncRequestedEventHandler', () => {
email: 'test@test.com',
roles: Promise.resolve([
{
name: RoleName.CoreUser,
name: RoleName.NAMES.CoreUser,
},
]),
uuid: '123',
@@ -4,7 +4,8 @@ import { Logger } from 'winston'
import { User } from '../User/User'
import { UserRepositoryInterface } from '../User/UserRepositoryInterface'
import { RoleRepositoryInterface } from '../Role/RoleRepositoryInterface'
import { RoleName, SubscriptionName } from '@standardnotes/common'
import { SubscriptionName } from '@standardnotes/common'
import { RoleName } from '@standardnotes/domain-core'
import { Role } from '../Role/Role'
import { ClientServiceInterface } from '../Client/ClientServiceInterface'
@@ -39,7 +40,7 @@ describe('RoleService', () => {
beforeEach(() => {
basicRole = {
name: RoleName.CoreUser,
name: RoleName.NAMES.CoreUser,
permissions: Promise.resolve([
{
name: PermissionName.MarkdownBasicEditor,
@@ -48,7 +49,7 @@ describe('RoleService', () => {
} as jest.Mocked<Role>
proRole = {
name: RoleName.ProUser,
name: RoleName.NAMES.ProUser,
permissions: Promise.resolve([
{
name: PermissionName.DailyEmailBackup,
@@ -62,7 +63,7 @@ describe('RoleService', () => {
roleRepository.findOneByName = jest.fn().mockReturnValue(proRole)
roleToSubscriptionMap = {} as jest.Mocked<RoleToSubscriptionMapInterface>
roleToSubscriptionMap.getRoleNameForSubscriptionName = jest.fn().mockReturnValue(RoleName.ProUser)
roleToSubscriptionMap.getRoleNameForSubscriptionName = jest.fn().mockReturnValue(RoleName.NAMES.ProUser)
offlineUserSubscription = {
endsAt: 100,
@@ -97,7 +98,7 @@ describe('RoleService', () => {
it('should add role to user', async () => {
await createService().addUserRole(user, SubscriptionName.ProPlan)
expect(roleRepository.findOneByName).toHaveBeenCalledWith(RoleName.ProUser)
expect(roleRepository.findOneByName).toHaveBeenCalledWith(RoleName.NAMES.ProUser)
user.roles = Promise.resolve([basicRole, proRole])
expect(userRepository.save).toHaveBeenCalledWith(user)
})
@@ -113,7 +114,7 @@ describe('RoleService', () => {
await createService().addUserRole(user, SubscriptionName.ProPlan)
expect(roleRepository.findOneByName).toHaveBeenCalledWith(RoleName.ProUser)
expect(roleRepository.findOneByName).toHaveBeenCalledWith(RoleName.NAMES.ProUser)
expect(userRepository.save).toHaveBeenCalledWith(user)
expect(await user.roles).toHaveLength(2)
})
@@ -142,7 +143,7 @@ describe('RoleService', () => {
it('should set offline role to offline subscription', async () => {
await createService().setOfflineUserRole(offlineUserSubscription)
expect(roleRepository.findOneByName).toHaveBeenCalledWith(RoleName.ProUser)
expect(roleRepository.findOneByName).toHaveBeenCalledWith(RoleName.NAMES.ProUser)
expect(offlineUserSubscriptionRepository.save).toHaveBeenCalledWith({
endsAt: 100,
cancelled: false,
@@ -1,11 +1,10 @@
import { SubscriptionName } from '@standardnotes/common'
import { PermissionName } from '@standardnotes/features'
import { OfflineUserSubscription } from '../Subscription/OfflineUserSubscription'
import { User } from '../User/User'
export interface RoleServiceInterface {
addUserRole(user: User, subscriptionName: SubscriptionName): Promise<void>
addUserRole(user: User, subscriptionName: string): Promise<void>
setOfflineUserRole(offlineUserSubscription: OfflineUserSubscription): Promise<void>
removeUserRole(user: User, subscriptionName: SubscriptionName): Promise<void>
removeUserRole(user: User, subscriptionName: string): Promise<void>
userHasPermission(userUuid: string, permissionName: PermissionName): Promise<boolean>
}
@@ -1,6 +1,7 @@
import 'reflect-metadata'
import { RoleName, SubscriptionName } from '@standardnotes/common'
import { SubscriptionName } from '@standardnotes/common'
import { RoleName } from '@standardnotes/domain-core'
import { RoleToSubscriptionMap } from './RoleToSubscriptionMap'
import { Role } from './Role'
@@ -9,11 +10,11 @@ describe('RoleToSubscriptionMap', () => {
const createMap = () => new RoleToSubscriptionMap()
it('should return subscription name for role name', () => {
expect(createMap().getSubscriptionNameForRoleName(RoleName.ProUser)).toEqual(SubscriptionName.ProPlan)
expect(createMap().getSubscriptionNameForRoleName(RoleName.NAMES.ProUser)).toEqual(SubscriptionName.ProPlan)
})
it('should return role name for subscription name', () => {
expect(createMap().getRoleNameForSubscriptionName(SubscriptionName.PlusPlan)).toEqual(RoleName.PlusUser)
expect(createMap().getRoleNameForSubscriptionName(SubscriptionName.PlusPlan)).toEqual(RoleName.NAMES.PlusUser)
})
it('should not return role name for subscription name that does not exist', () => {
@@ -23,21 +24,21 @@ describe('RoleToSubscriptionMap', () => {
it('should filter our non subscription roles from an array of roles', () => {
const roles = [
{
name: RoleName.CoreUser,
name: RoleName.NAMES.CoreUser,
} as jest.Mocked<Role>,
{
name: RoleName.FilesBetaUser,
name: RoleName.NAMES.FilesBetaUser,
} as jest.Mocked<Role>,
{
name: RoleName.PlusUser,
name: RoleName.NAMES.PlusUser,
} as jest.Mocked<Role>,
]
expect(createMap().filterNonSubscriptionRoles(roles)).toEqual([
{
name: RoleName.CoreUser,
name: RoleName.NAMES.CoreUser,
},
{
name: RoleName.FilesBetaUser,
name: RoleName.NAMES.FilesBetaUser,
},
])
})
@@ -45,18 +46,18 @@ describe('RoleToSubscriptionMap', () => {
it('should filter our subscription roles from an array of roles', () => {
const roles = [
{
name: RoleName.CoreUser,
name: RoleName.NAMES.CoreUser,
} as jest.Mocked<Role>,
{
name: RoleName.FilesBetaUser,
name: RoleName.NAMES.FilesBetaUser,
} as jest.Mocked<Role>,
{
name: RoleName.PlusUser,
name: RoleName.NAMES.PlusUser,
} as jest.Mocked<Role>,
]
expect(createMap().filterSubscriptionRoles(roles)).toEqual([
{
name: RoleName.PlusUser,
name: RoleName.NAMES.PlusUser,
},
])
})
@@ -1,4 +1,5 @@
import { RoleName, SubscriptionName } from '@standardnotes/common'
import { SubscriptionName } from '@standardnotes/common'
import { RoleName } from '@standardnotes/domain-core'
import { injectable } from 'inversify'
import { Role } from './Role'
@@ -6,26 +7,26 @@ import { RoleToSubscriptionMapInterface } from './RoleToSubscriptionMapInterface
@injectable()
export class RoleToSubscriptionMap implements RoleToSubscriptionMapInterface {
private readonly roleNameToSubscriptionNameMap = new Map<RoleName, SubscriptionName>([
[RoleName.PlusUser, SubscriptionName.PlusPlan],
[RoleName.ProUser, SubscriptionName.ProPlan],
private readonly roleNameToSubscriptionNameMap = new Map<string, SubscriptionName>([
[RoleName.NAMES.PlusUser, SubscriptionName.PlusPlan],
[RoleName.NAMES.ProUser, SubscriptionName.ProPlan],
])
private readonly nonSubscriptionRoles = [RoleName.CoreUser, RoleName.FilesBetaUser]
private readonly nonSubscriptionRoles = [RoleName.NAMES.CoreUser, RoleName.NAMES.FilesBetaUser]
filterNonSubscriptionRoles(roles: Role[]): Array<Role> {
return roles.filter((role) => this.nonSubscriptionRoles.includes(role.name as RoleName))
return roles.filter((role) => this.nonSubscriptionRoles.includes(role.name))
}
filterSubscriptionRoles(roles: Role[]): Array<Role> {
return roles.filter((role) => !this.nonSubscriptionRoles.includes(role.name as RoleName))
return roles.filter((role) => !this.nonSubscriptionRoles.includes(role.name))
}
getSubscriptionNameForRoleName(roleName: RoleName): SubscriptionName | undefined {
getSubscriptionNameForRoleName(roleName: string): SubscriptionName | undefined {
return this.roleNameToSubscriptionNameMap.get(roleName)
}
getRoleNameForSubscriptionName(subscriptionName: SubscriptionName): RoleName | undefined {
getRoleNameForSubscriptionName(subscriptionName: SubscriptionName): string | undefined {
for (const [roleNameItem, subscriptionNameItem] of this.roleNameToSubscriptionNameMap) {
if (subscriptionNameItem === subscriptionName) {
return roleNameItem
@@ -1,9 +1,9 @@
import { RoleName, SubscriptionName } from '@standardnotes/common'
import { SubscriptionName } from '@standardnotes/common'
import { Role } from './Role'
export interface RoleToSubscriptionMapInterface {
filterNonSubscriptionRoles(roles: Role[]): Array<Role>
filterSubscriptionRoles(roles: Role[]): Array<Role>
getSubscriptionNameForRoleName(roleName: RoleName): SubscriptionName | undefined
getRoleNameForSubscriptionName(subscriptionName: SubscriptionName): RoleName | undefined
getSubscriptionNameForRoleName(roleName: string): SubscriptionName | undefined
getRoleNameForSubscriptionName(subscriptionName: SubscriptionName): string | undefined
}
@@ -1,4 +1,3 @@
import { Uuid } from '@standardnotes/common'
import { RevokedSession } from './RevokedSession'
export interface RevokedSessionRepositoryInterface {
@@ -6,5 +5,5 @@ export interface RevokedSessionRepositoryInterface {
findAllByUserUuid(userUuid: string): Promise<Array<RevokedSession>>
save(revokedSession: RevokedSession): Promise<RevokedSession>
remove(revokedSession: RevokedSession): Promise<RevokedSession>
clearUserAgentByUserUuid(userUuid: Uuid): Promise<void>
clearUserAgentByUserUuid(userUuid: string): Promise<void>
}
@@ -1,4 +1,3 @@
import { Uuid } from '@standardnotes/common'
import { Session } from './Session'
export interface SessionRepositoryInterface {
@@ -12,5 +11,5 @@ export interface SessionRepositoryInterface {
updatedTokenExpirationDates(uuid: string, accessExpiration: Date, refreshExpiration: Date): Promise<void>
save(session: Session): Promise<Session>
remove(session: Session): Promise<Session>
clearUserAgentByUserUuid(userUuid: Uuid): Promise<void>
clearUserAgentByUserUuid(userUuid: string): Promise<void>
}
@@ -7,7 +7,6 @@ import { TimerInterface } from '@standardnotes/time'
import { Logger } from 'winston'
import { LogSessionUserAgentOption, SettingName } from '@standardnotes/settings'
import { SessionBody } from '@standardnotes/responses'
import { Uuid } from '@standardnotes/common'
import { CryptoNode } from '@standardnotes/sncrypto-node'
import TYPES from '../../Bootstrap/Types'
@@ -226,7 +225,7 @@ export class SessionService implements SessionServiceInterface {
return this.revokedSessionRepository.save(revokedSession)
}
async deleteSessionByToken(token: string): Promise<Uuid | null> {
async deleteSessionByToken(token: string): Promise<string | null> {
const session = await this.getSessionFromToken(token)
if (session) {

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