Compare commits

...

68 Commits

Author SHA1 Message Date
standardci
56b600dbdc chore(release): publish new version
- @standardnotes/analytics@2.19.6
 - @standardnotes/api-gateway@1.46.1
 - @standardnotes/auth-server@1.82.3
 - @standardnotes/domain-events-infra@1.9.61
 - @standardnotes/event-store@1.6.60
 - @standardnotes/files-server@1.9.6
 - @standardnotes/revisions-server@1.10.14
 - @standardnotes/scheduler-server@1.16.10
 - @standardnotes/syncing-server@1.29.1
 - @standardnotes/websockets-server@1.5.6
 - @standardnotes/workspace-server@1.19.9
2023-01-18 18:22:21 +00:00
Karol Sójko
80a013d0a3 fix: missing dependencies 2023-01-18 19:19:34 +01:00
Karol Sójko
7ef59bb74c chore(deps): upgrade newrelic 2023-01-18 19:19:07 +01:00
standardci
9cf1a9e25c chore(release): publish new version
- @standardnotes/auth-server@1.82.2
2023-01-18 16:51:51 +00:00
Aman Harwara
0fce6c0cd4 chore: update @standardnotes/features (#415) 2023-01-18 22:19:47 +05:30
standardci
2d444e9aa0 chore(release): publish new version
- @standardnotes/syncing-server@1.29.0
2023-01-18 08:03:57 +00:00
Karol Sójko
7c393b1125 feat(syncing-server): remove saving revisions in syncing-server database in favour of the revisions server 2023-01-18 09:01:46 +01:00
standardci
78ab4dc94d chore(release): publish new version
- @standardnotes/analytics@2.19.5
 - @standardnotes/auth-server@1.82.1
 - @standardnotes/event-store@1.6.59
 - @standardnotes/revisions-server@1.10.13
 - @standardnotes/scheduler-server@1.16.9
 - @standardnotes/syncing-server@1.28.10
 - @standardnotes/websockets-server@1.5.5
 - @standardnotes/workspace-server@1.19.8
2023-01-17 14:49:52 +00:00
Karol Sójko
6a5904cfaa chore(deps): upgrade mysql2 2023-01-17 15:47:43 +01:00
standardci
a6061ec2a9 chore(release): publish new version
- @standardnotes/revisions-server@1.10.12
2023-01-17 13:56:18 +00:00
Karol Sójko
51c777304b fix(revisions): fetching revisions metadata 2023-01-17 14:54:22 +01:00
standardci
fbd535f2c5 chore(release): publish new version
- @standardnotes/auth-server@1.82.0
2023-01-17 13:18:05 +00:00
Aman Harwara
7d456671c2 feat: super editor permissions migration (#414) 2023-01-17 18:45:20 +05:30
standardci
dd4924c925 chore(release): publish new version
- @standardnotes/analytics@2.19.4
 - @standardnotes/auth-server@1.81.11
 - @standardnotes/event-store@1.6.58
 - @standardnotes/revisions-server@1.10.11
 - @standardnotes/scheduler-server@1.16.8
 - @standardnotes/syncing-server@1.28.9
 - @standardnotes/workspace-server@1.19.7
2023-01-17 12:47:34 +00:00
Karol Sójko
f73129cd7e fix: allow to run typeorm in non-replica mode 2023-01-17 13:45:32 +01:00
standardci
4983c8741e chore(release): publish new version
- @standardnotes/revisions-server@1.10.10
2023-01-17 10:55:57 +00:00
Karol Sójko
c5798640ff fix(revisions): add debug logs for retrieving revisions metadata from mysql 2023-01-17 11:53:57 +01:00
standardci
5803a8018a chore(release): publish new version
- @standardnotes/revisions-server@1.10.9
2023-01-17 10:02:11 +00:00
Karol Sójko
e2aae8ac8a fix(revisions): response structure 2023-01-17 11:00:05 +01:00
Karol Sójko
2917aeeb32 fix: turn some of the applications into a utility publishing workflow 2023-01-17 10:24:45 +01:00
standardci
9377c03c3f chore(release): publish new version
- @standardnotes/syncing-server@1.28.8
2023-01-17 09:09:03 +00:00
Karol Sójko
9b926fbad6 fix(syncing-server-js): creating directory for revision dumps 2023-01-17 10:07:01 +01:00
Karol Sójko
8db19c3e2b fix(syncing-server-js): add debug logs for dumping items for revisions creation 2023-01-17 10:02:17 +01:00
standardci
ca970781c7 chore(release): publish new version
- @standardnotes/analytics@2.19.3
 - @standardnotes/auth-server@1.81.10
 - @standardnotes/domain-core@1.11.1
 - @standardnotes/revisions-server@1.10.8
 - @standardnotes/scheduler-server@1.16.7
 - @standardnotes/syncing-server@1.28.7
 - @standardnotes/workspace-server@1.19.6
2023-01-16 14:36:54 +00:00
Karol Sójko
e7beee2788 fix(revisions): add required role to revisions list response 2023-01-16 15:34:20 +01:00
standardci
d266eada88 chore(release): publish new version
- @standardnotes/revisions-server@1.10.7
2023-01-16 10:22:58 +00:00
Karol Sójko
11b8b078b4 fix(revisions): remove redundant specs 2023-01-16 11:20:58 +01:00
standardci
37912fa29a chore(release): publish new version
- @standardnotes/revisions-server@1.10.6
2023-01-16 10:14:55 +00:00
Karol Sójko
b97dafe6f3 fix(revisions): mapping to snake case 2023-01-16 11:12:29 +01:00
standardci
2a29151395 chore(release): publish new version
- @standardnotes/revisions-server@1.10.5
2023-01-16 10:01:02 +00:00
Karol Sójko
8b988d89c0 fix(revisions): response structure 2023-01-16 10:58:39 +01:00
standardci
c0908f1b58 chore(release): publish new version
- @standardnotes/api-gateway@1.46.0
2023-01-16 09:02:31 +00:00
Karol Sójko
bb46044f7c Merge pull request #366 from standardnotes/switch_revisions
feat(api-gateway): switch to fetching revisions from reivsions server
2023-01-16 10:00:37 +01:00
Karol Sójko
60b3dd6138 feat(api-gateway): add all revisions endpoints on v2 2023-01-16 09:40:07 +01:00
Karol Sójko
22c1f936c3 feat(api-gateway): switch to fetching revisions from reivsions server 2023-01-16 09:33:13 +01:00
standardci
e899874b04 chore(release): publish new version
- @standardnotes/api-gateway@1.45.3
2023-01-16 08:32:47 +00:00
Karol Sójko
04c6888cf6 fix(api-gateway): add noindex robots meta tag to api gateway homepage 2023-01-16 09:30:02 +01:00
standardci
29c56c6919 chore(release): publish new version
- @standardnotes/analytics@2.19.2
 - @standardnotes/api-gateway@1.45.2
 - @standardnotes/auth-server@1.81.9
 - @standardnotes/domain-events-infra@1.9.60
 - @standardnotes/domain-events@2.105.2
 - @standardnotes/event-store@1.6.57
 - @standardnotes/files-server@1.9.5
 - @standardnotes/revisions-server@1.10.4
 - @standardnotes/scheduler-server@1.16.6
 - @standardnotes/security@1.7.3
 - @standardnotes/syncing-server@1.28.6
 - @standardnotes/websockets-server@1.5.4
 - @standardnotes/workspace-server@1.19.5
2023-01-13 09:56:13 +00:00
Karol Sójko
c98ed9cc85 chore: update jsonwebtoken 2023-01-13 10:53:57 +01:00
standardci
88f7530c13 chore(release): publish new version
- @standardnotes/api-gateway@1.45.1
 - @standardnotes/files-server@1.9.4
2023-01-13 09:05:13 +00:00
Karol Sójko
bb820437af fix: add robots.txt setup for api-gateway and files server to disallow indexing 2023-01-13 10:03:03 +01:00
standardci
d1a4bd38e0 chore(release): publish new version
- @standardnotes/auth-server@1.81.8
2023-01-11 12:49:19 +00:00
Karol Sójko
d18f6ccd32 fix(auth): add relying party configuration options 2023-01-11 13:47:13 +01:00
standardci
aa317c964e chore(release): publish new version
- @standardnotes/auth-server@1.81.7
2023-01-09 14:31:00 +00:00
Karol Sójko
7ae8845ae9 fix(auth): failure messages for debug logs upon signing in with recovery codes 2023-01-09 15:28:35 +01:00
standardci
123a6dbe0c chore(release): publish new version
- @standardnotes/auth-server@1.81.6
2023-01-09 13:53:44 +00:00
Karol Sójko
dda8d79526 fix(auth): request parameters names 2023-01-09 14:51:48 +01:00
standardci
de5293955a chore(release): publish new version
- @standardnotes/auth-server@1.81.5
2023-01-09 12:59:21 +00:00
Karol Sójko
96669bff5b fix(auth): debuggin recovery sign in 2023-01-09 13:56:56 +01:00
standardci
a99762f004 chore(release): publish new version
- @standardnotes/auth-server@1.81.4
2023-01-09 12:49:05 +00:00
Karol Sójko
1fc3c9b83e fix(auth): error messages on account recovery 2023-01-09 13:47:11 +01:00
standardci
af86b6f664 chore(release): publish new version
- @standardnotes/auth-server@1.81.3
2023-01-09 11:58:44 +00:00
Karol Sójko
a0208dd5b3 fix(auth): remove mfa settings after recovery sign in 2023-01-09 12:56:50 +01:00
standardci
1c5c8b81d5 chore(release): publish new version
- @standardnotes/scheduler-server@1.16.5
2023-01-06 08:17:13 +00:00
Karol Sójko
79c3e33434 fix(scheduler): change email levels 2023-01-06 09:15:22 +01:00
standardci
5ab8729a31 chore(release): publish new version
- @standardnotes/auth-server@1.81.2
2023-01-05 13:36:08 +00:00
Karol Sójko
db0baf92f1 fix(auth): return type to include user 2023-01-05 14:33:34 +01:00
standardci
a8974094db chore(release): publish new version
- @standardnotes/auth-server@1.81.1
2023-01-05 11:31:08 +00:00
Karol Sójko
13c5c97ba7 fix(auth): allow retrieval of recovery codes setting 2023-01-05 12:28:56 +01:00
standardci
894ebb3edd chore(release): publish new version
- @standardnotes/api-gateway@1.45.0
 - @standardnotes/auth-server@1.81.0
2023-01-05 10:44:51 +00:00
Karol Sójko
cac899a7e5 feat(auth): add recovery sign in with recovery codes 2023-01-05 11:42:55 +01:00
standardci
901e0dd93b chore(release): publish new version
- @standardnotes/auth-server@1.80.0
 - @standardnotes/settings@1.19.0
 - @standardnotes/syncing-server@1.28.5
2023-01-04 14:31:36 +00:00
Karol Sójko
a360231fd0 feat(auth): add generating recovery codes 2023-01-04 15:29:15 +01:00
standardci
6ccc6ee42f chore(release): publish new version
- @standardnotes/auth-server@1.79.1
 - @standardnotes/syncing-server@1.28.4
2023-01-02 08:53:12 +00:00
Karol Sójko
9c72ad85a0 fix: remove @sentry/profiling-node integration as it is not compatible with ARM - fixes #383 2023-01-02 09:49:04 +01:00
Karol Sójko
fa6d80a753 fix: remove @sentry/profiling-node as it is not compatible with ARM - fixes #383 2023-01-02 09:46:42 +01:00
standardci
f6ab2ca9ba chore(release): publish new version
- @standardnotes/analytics@2.19.1
2022-12-30 14:08:32 +00:00
Karol Sójko
ba1e1ad5ad fix(analytics): remove unnecesary context from mixpanel events 2022-12-30 15:06:04 +01:00
504 changed files with 3248 additions and 71540 deletions

View File

@@ -11,19 +11,18 @@ on:
workflow_dispatch:
jobs:
call_server_application_workflow:
name: Server Application
uses: standardnotes/server/.github/workflows/common-server-application.yml@main
call_server_utility_workflow:
name: Server Utility
uses: standardnotes/server/.github/workflows/common-server-utility.yml@main
with:
service_name: analytics
workspace_name: "@standardnotes/analytics"
e2e_tag_parameter_name: analytics_image_tag
deploy_web: false
package_path: packages/analytics
secrets: inherit
newrelic:
needs: call_server_application_workflow
needs: call_server_utility_workflow
runs-on: ubuntu-latest

View File

@@ -0,0 +1,164 @@
name: Reusable Server Utility Workflow
on:
workflow_call:
inputs:
service_name:
required: true
type: string
workspace_name:
required: true
type: string
deploy_web:
required: false
default: true
type: boolean
deploy_worker:
required: false
default: true
type: boolean
package_path:
required: true
type: string
secrets:
DOCKER_USERNAME:
required: true
DOCKER_PASSWORD:
required: true
CI_PAT_TOKEN:
required: true
AWS_ACCESS_KEY_ID:
required: true
AWS_SECRET_ACCESS_KEY:
required: true
jobs:
build:
runs-on: ubuntu-latest
outputs:
temp_dir: ${{ steps.bundle-dir.outputs.temp_dir }}
steps:
- uses: actions/checkout@v3
- name: Create Bundle Dir
id: bundle-dir
run: echo "temp_dir=$(mktemp -d -t ${{ inputs.service_name }}-${{ github.sha }}-XXXXXXX)" >> $GITHUB_OUTPUT
- name: Cache build
id: cache-build
uses: actions/cache@v3
with:
path: |
packages/**/dist
${{ steps.bundle-dir.outputs.temp_dir }}
key: ${{ runner.os }}-${{ inputs.service_name }}-build-${{ github.sha }}
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Build
run: yarn build ${{ inputs.package_path }}
- name: Bundle
run: yarn workspace ${{ inputs.workspace_name }} bundle --no-compress --output-directory ${{ steps.bundle-dir.outputs.temp_dir }}
lint:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Cache build
id: cache-build
uses: actions/cache@v3
with:
path: |
packages/**/dist
${{ needs.build.outputs.temp_dir }}
key: ${{ runner.os }}-${{ inputs.service_name }}-build-${{ github.sha }}
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Build
if: steps.cache-build.outputs.cache-hit != 'true'
run: yarn build ${{ inputs.package_path }}
- name: Lint
run: yarn lint:${{ inputs.service_name }}
test:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Cache build
id: cache-build
uses: actions/cache@v3
with:
path: |
packages/**/dist
${{ needs.build.outputs.temp_dir }}
key: ${{ runner.os }}-${{ inputs.service_name }}-build-${{ github.sha }}
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Build
if: steps.cache-build.outputs.cache-hit != 'true'
run: yarn build ${{ inputs.package_path }}
- name: Test
run: yarn test ${{ inputs.package_path }}
publish:
needs: [ build, test, lint ]
name: Publish Docker Image
uses: standardnotes/server/.github/workflows/common-docker-image.yml@main
with:
service_name: ${{ inputs.service_name }}
bundle_dir: ${{ needs.build.outputs.temp_dir }}
package_path: ${{ inputs.package_path }}
workspace_name: ${{ inputs.workspace_name }}
secrets: inherit
deploy-web:
if: ${{ inputs.deploy_web }}
needs: publish
name: Deploy Web
uses: standardnotes/server/.github/workflows/common-deploy.yml@main
with:
service_name: ${{ inputs.service_name }}
docker_image: ${{ inputs.service_name }}:${{ github.sha }}
secrets: inherit
deploy-worker:
if: ${{ inputs.deploy_worker }}
needs: publish
name: Deploy Worker
uses: standardnotes/server/.github/workflows/common-deploy.yml@main
with:
service_name: ${{ inputs.service_name }}-worker
docker_image: ${{ inputs.service_name }}:${{ github.sha }}
secrets: inherit

View File

@@ -11,19 +11,18 @@ on:
workflow_dispatch:
jobs:
call_server_application_workflow:
name: Server Application
uses: standardnotes/server/.github/workflows/common-server-application.yml@main
call_server_utility_workflow:
name: Server Utility
uses: standardnotes/server/.github/workflows/common-server-utility.yml@main
with:
service_name: event-store
workspace_name: "@standardnotes/event-store"
e2e_tag_parameter_name: event_store_image_tag
deploy_web: false
package_path: packages/event-store
secrets: inherit
newrelic:
needs: call_server_application_workflow
needs: call_server_utility_workflow
runs-on: ubuntu-latest

View File

@@ -11,19 +11,18 @@ on:
workflow_dispatch:
jobs:
call_server_application_workflow:
name: Server Application
uses: standardnotes/server/.github/workflows/common-server-application.yml@main
call_server_utility_workflow:
name: Server Utility
uses: standardnotes/server/.github/workflows/common-server-utility.yml@main
with:
service_name: scheduler
workspace_name: "@standardnotes/scheduler-server"
e2e_tag_parameter_name: scheduler_image_tag
deploy_web: false
package_path: packages/scheduler
secrets: inherit
newrelic:
needs: call_server_application_workflow
needs: call_server_utility_workflow
runs-on: ubuntu-latest

View File

@@ -11,18 +11,17 @@ on:
workflow_dispatch:
jobs:
call_server_application_workflow:
name: Server Application
uses: standardnotes/server/.github/workflows/common-server-application.yml@main
call_server_utility_workflow:
name: Server Utility
uses: standardnotes/server/.github/workflows/common-server-utility.yml@main
with:
service_name: websockets
workspace_name: "@standardnotes/websockets-server"
e2e_tag_parameter_name: websockets_image_tag
package_path: packages/websockets
secrets: inherit
newrelic:
needs: call_server_application_workflow
needs: call_server_utility_workflow
runs-on: ubuntu-latest
steps:

View File

@@ -11,18 +11,17 @@ on:
workflow_dispatch:
jobs:
call_server_application_workflow:
name: Server Application
uses: standardnotes/server/.github/workflows/common-server-application.yml@main
call_server_utility_workflow:
name: Server Utility
uses: standardnotes/server/.github/workflows/common-server-utility.yml@main
with:
service_name: workspace
workspace_name: "@standardnotes/workspace-server"
e2e_tag_parameter_name: workspace_image_tag
package_path: packages/workspace
secrets: inherit
newrelic:
needs: call_server_application_workflow
needs: call_server_utility_workflow
runs-on: ubuntu-latest
steps:

421
.pnp.cjs generated
View File

@@ -128,13 +128,13 @@ const RAW_RUNTIME_STATE =
["@lerna-lite/run", "npm:1.6.0"],\
["@sentry/node", "npm:7.28.1"],\
["@types/jest", "npm:29.1.1"],\
["@types/newrelic", "npm:7.0.4"],\
["@types/newrelic", "npm:9.4.0"],\
["@types/node", "npm:18.11.9"],\
["@typescript-eslint/parser", "virtual:8859b278716fedf3e7458b5628625f7e35678c418626878559a0b816445001b7e24c55546f4677ba4c20b521aa0cf52cc33ac07deff171e383ada6eeab69933f#npm:5.40.1"],\
["eslint", "npm:8.19.0"],\
["eslint-config-prettier", "virtual:8859b278716fedf3e7458b5628625f7e35678c418626878559a0b816445001b7e24c55546f4677ba4c20b521aa0cf52cc33ac07deff171e383ada6eeab69933f#npm:8.5.0"],\
["ini", "npm:3.0.0"],\
["newrelic", "npm:9.6.0"],\
["newrelic", "npm:9.8.0"],\
["npm-check-updates", "npm:16.0.1"],\
["prettier", "npm:2.7.1"],\
["ts-node", "virtual:8859b278716fedf3e7458b5628625f7e35678c418626878559a0b816445001b7e24c55546f4677ba4c20b521aa0cf52cc33ac07deff171e383ada6eeab69933f#npm:10.9.1"],\
@@ -1130,6 +1130,18 @@ const RAW_RUNTIME_STATE =
"linkType": "HARD"\
}]\
]],\
["@contrast/fn-inspect", [\
["npm:3.3.0", {\
"packageLocation": "./.yarn/unplugged/@contrast-fn-inspect-npm-3.3.0-c6a8faa5b7/node_modules/@contrast/fn-inspect/",\
"packageDependencies": [\
["@contrast/fn-inspect", "npm:3.3.0"],\
["nan", "npm:2.16.0"],\
["node-gyp", "npm:9.0.0"],\
["node-gyp-build", "npm:4.5.0"]\
],\
"linkType": "HARD"\
}]\
]],\
["@cspotcode/source-map-support", [\
["npm:0.8.1", {\
"packageLocation": "./.yarn/cache/@cspotcode-source-map-support-npm-0.8.1-964f2de99d-4327d8e6e4.zip/node_modules/@cspotcode/source-map-support/",\
@@ -1196,25 +1208,25 @@ const RAW_RUNTIME_STATE =
}]\
]],\
["@grpc/grpc-js", [\
["npm:1.6.7", {\
"packageLocation": "./.yarn/cache/@grpc-grpc-js-npm-1.6.7-2e10ef0dbb-be24dd50f5.zip/node_modules/@grpc/grpc-js/",\
["npm:1.8.4", {\
"packageLocation": "./.yarn/cache/@grpc-grpc-js-npm-1.8.4-287c8bdac8-6367a2ee38.zip/node_modules/@grpc/grpc-js/",\
"packageDependencies": [\
["@grpc/grpc-js", "npm:1.6.7"],\
["@grpc/proto-loader", "npm:0.6.13"],\
["@grpc/grpc-js", "npm:1.8.4"],\
["@grpc/proto-loader", "npm:0.7.4"],\
["@types/node", "npm:18.0.3"]\
],\
"linkType": "HARD"\
}]\
]],\
["@grpc/proto-loader", [\
["npm:0.6.13", {\
"packageLocation": "./.yarn/cache/@grpc-proto-loader-npm-0.6.13-658ac26dfb-6272a0318b.zip/node_modules/@grpc/proto-loader/",\
["npm:0.7.4", {\
"packageLocation": "./.yarn/cache/@grpc-proto-loader-npm-0.7.4-43d91344a0-1f5d4211fe.zip/node_modules/@grpc/proto-loader/",\
"packageDependencies": [\
["@grpc/proto-loader", "npm:0.6.13"],\
["@grpc/proto-loader", "npm:0.7.4"],\
["@types/long", "npm:4.0.2"],\
["lodash.camelcase", "npm:4.3.0"],\
["long", "npm:4.0.0"],\
["protobufjs", "npm:6.11.3"],\
["protobufjs", "npm:7.1.2"],\
["yargs", "npm:16.2.0"]\
],\
"linkType": "HARD"\
@@ -1875,12 +1887,12 @@ const RAW_RUNTIME_STATE =
],\
"linkType": "SOFT"\
}],\
["virtual:f10080c2deb75096716a913b06010dcd94891c77539a757ab32210a1efc3ff91527b36d6c7c46e890db826160e0724553ca23acd0a8a734b5554c9600c71eb52#npm:5.0.0", {\
"packageLocation": "./.yarn/__virtual__/@newrelic-aws-sdk-virtual-ccf1e948b3/0/cache/@newrelic-aws-sdk-npm-5.0.0-7d9d10d58f-ed1dc3fa16.zip/node_modules/@newrelic/aws-sdk/",\
["virtual:4c49b89cbc97666c528d8405a7490a32a30cd8b65c1a61cb32c444f3a312dab1385405717f9866d113d67518b3d487f15de177279ba1a80f8958b28cad021846#npm:5.0.0", {\
"packageLocation": "./.yarn/__virtual__/@newrelic-aws-sdk-virtual-b32c5d232e/0/cache/@newrelic-aws-sdk-npm-5.0.0-7d9d10d58f-ed1dc3fa16.zip/node_modules/@newrelic/aws-sdk/",\
"packageDependencies": [\
["@newrelic/aws-sdk", "virtual:f10080c2deb75096716a913b06010dcd94891c77539a757ab32210a1efc3ff91527b36d6c7c46e890db826160e0724553ca23acd0a8a734b5554c9600c71eb52#npm:5.0.0"],\
["@newrelic/aws-sdk", "virtual:4c49b89cbc97666c528d8405a7490a32a30cd8b65c1a61cb32c444f3a312dab1385405717f9866d113d67518b3d487f15de177279ba1a80f8958b28cad021846#npm:5.0.0"],\
["@types/newrelic", null],\
["newrelic", "npm:9.6.0"]\
["newrelic", "npm:9.8.0"]\
],\
"packagePeers": [\
"@types/newrelic",\
@@ -1897,12 +1909,12 @@ const RAW_RUNTIME_STATE =
],\
"linkType": "SOFT"\
}],\
["virtual:f10080c2deb75096716a913b06010dcd94891c77539a757ab32210a1efc3ff91527b36d6c7c46e890db826160e0724553ca23acd0a8a734b5554c9600c71eb52#npm:7.0.0", {\
"packageLocation": "./.yarn/__virtual__/@newrelic-koa-virtual-613d84b4f1/0/cache/@newrelic-koa-npm-7.0.0-903c251b9f-0fc2298c8b.zip/node_modules/@newrelic/koa/",\
["virtual:4c49b89cbc97666c528d8405a7490a32a30cd8b65c1a61cb32c444f3a312dab1385405717f9866d113d67518b3d487f15de177279ba1a80f8958b28cad021846#npm:7.0.0", {\
"packageLocation": "./.yarn/__virtual__/@newrelic-koa-virtual-cc6a41398f/0/cache/@newrelic-koa-npm-7.0.0-903c251b9f-0fc2298c8b.zip/node_modules/@newrelic/koa/",\
"packageDependencies": [\
["@newrelic/koa", "virtual:f10080c2deb75096716a913b06010dcd94891c77539a757ab32210a1efc3ff91527b36d6c7c46e890db826160e0724553ca23acd0a8a734b5554c9600c71eb52#npm:7.0.0"],\
["@newrelic/koa", "virtual:4c49b89cbc97666c528d8405a7490a32a30cd8b65c1a61cb32c444f3a312dab1385405717f9866d113d67518b3d487f15de177279ba1a80f8958b28cad021846#npm:7.0.0"],\
["@types/newrelic", null],\
["newrelic", "npm:9.6.0"]\
["newrelic", "npm:9.8.0"]\
],\
"packagePeers": [\
"@types/newrelic",\
@@ -1932,12 +1944,12 @@ const RAW_RUNTIME_STATE =
],\
"linkType": "SOFT"\
}],\
["virtual:f10080c2deb75096716a913b06010dcd94891c77539a757ab32210a1efc3ff91527b36d6c7c46e890db826160e0724553ca23acd0a8a734b5554c9600c71eb52#npm:6.0.0", {\
"packageLocation": "./.yarn/__virtual__/@newrelic-superagent-virtual-37eb7b41a0/0/cache/@newrelic-superagent-npm-6.0.0-db8b77d0f3-b77997b792.zip/node_modules/@newrelic/superagent/",\
["virtual:4c49b89cbc97666c528d8405a7490a32a30cd8b65c1a61cb32c444f3a312dab1385405717f9866d113d67518b3d487f15de177279ba1a80f8958b28cad021846#npm:6.0.0", {\
"packageLocation": "./.yarn/__virtual__/@newrelic-superagent-virtual-dc0653ca20/0/cache/@newrelic-superagent-npm-6.0.0-db8b77d0f3-b77997b792.zip/node_modules/@newrelic/superagent/",\
"packageDependencies": [\
["@newrelic/superagent", "virtual:f10080c2deb75096716a913b06010dcd94891c77539a757ab32210a1efc3ff91527b36d6c7c46e890db826160e0724553ca23acd0a8a734b5554c9600c71eb52#npm:6.0.0"],\
["@newrelic/superagent", "virtual:4c49b89cbc97666c528d8405a7490a32a30cd8b65c1a61cb32c444f3a312dab1385405717f9866d113d67518b3d487f15de177279ba1a80f8958b28cad021846#npm:6.0.0"],\
["@types/newrelic", null],\
["newrelic", "npm:9.6.0"]\
["newrelic", "npm:9.8.0"]\
],\
"packagePeers": [\
"@types/newrelic",\
@@ -1958,8 +1970,8 @@ const RAW_RUNTIME_STATE =
"packageLocation": "./.yarn/__virtual__/@newrelic-winston-enricher-virtual-6b8c53ab3d/0/cache/@newrelic-winston-enricher-npm-4.0.0-ebaf2d0d28-3fc901cded.zip/node_modules/@newrelic/winston-enricher/",\
"packageDependencies": [\
["@newrelic/winston-enricher", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:4.0.0"],\
["@types/newrelic", "npm:7.0.4"],\
["newrelic", "npm:9.6.0"]\
["@types/newrelic", "npm:9.4.0"],\
["newrelic", "npm:9.8.0"]\
],\
"packagePeers": [\
"@types/newrelic",\
@@ -2485,16 +2497,6 @@ const RAW_RUNTIME_STATE =
}]\
]],\
["@sentry/core", [\
["npm:7.27.0", {\
"packageLocation": "./.yarn/cache/@sentry-core-npm-7.27.0-72a2ae90aa-1144287db2.zip/node_modules/@sentry/core/",\
"packageDependencies": [\
["@sentry/core", "npm:7.27.0"],\
["@sentry/types", "npm:7.27.0"],\
["@sentry/utils", "npm:7.27.0"],\
["tslib", "npm:1.14.1"]\
],\
"linkType": "HARD"\
}],\
["npm:7.28.1", {\
"packageLocation": "./.yarn/cache/@sentry-core-npm-7.28.1-a468033ea8-f29d747d3e.zip/node_modules/@sentry/core/",\
"packageDependencies": [\
@@ -2506,34 +2508,7 @@ const RAW_RUNTIME_STATE =
"linkType": "HARD"\
}]\
]],\
["@sentry/hub", [\
["npm:7.27.0", {\
"packageLocation": "./.yarn/cache/@sentry-hub-npm-7.27.0-1b008600c8-2d7e3252da.zip/node_modules/@sentry/hub/",\
"packageDependencies": [\
["@sentry/hub", "npm:7.27.0"],\
["@sentry/core", "npm:7.27.0"],\
["@sentry/types", "npm:7.27.0"],\
["@sentry/utils", "npm:7.27.0"],\
["tslib", "npm:1.14.1"]\
],\
"linkType": "HARD"\
}]\
]],\
["@sentry/node", [\
["npm:7.27.0", {\
"packageLocation": "./.yarn/cache/@sentry-node-npm-7.27.0-f1028265b5-b85cd47555.zip/node_modules/@sentry/node/",\
"packageDependencies": [\
["@sentry/node", "npm:7.27.0"],\
["@sentry/core", "npm:7.27.0"],\
["@sentry/types", "npm:7.27.0"],\
["@sentry/utils", "npm:7.27.0"],\
["cookie", "npm:0.4.2"],\
["https-proxy-agent", "npm:5.0.1"],\
["lru_map", "npm:0.3.3"],\
["tslib", "npm:1.14.1"]\
],\
"linkType": "HARD"\
}],\
["npm:7.28.1", {\
"packageLocation": "./.yarn/cache/@sentry-node-npm-7.28.1-b0e124fdfc-b4922d1f0a.zip/node_modules/@sentry/node/",\
"packageDependencies": [\
@@ -2549,35 +2524,7 @@ const RAW_RUNTIME_STATE =
"linkType": "HARD"\
}]\
]],\
["@sentry/profiling-node", [\
["npm:0.0.12", {\
"packageLocation": "./.yarn/unplugged/@sentry-profiling-node-npm-0.0.12-8aeba55fc9/node_modules/@sentry/profiling-node/",\
"packageDependencies": [\
["@sentry/profiling-node", "npm:0.0.12"],\
["@sentry/hub", "npm:7.27.0"],\
["@sentry/node", "npm:7.27.0"],\
["@sentry/tracing", "npm:7.27.0"],\
["@sentry/types", "npm:7.27.0"],\
["@sentry/utils", "npm:7.27.0"],\
["nan", "npm:2.17.0"],\
["node-abi", "npm:3.30.0"],\
["node-gyp", "npm:9.3.0"]\
],\
"linkType": "HARD"\
}]\
]],\
["@sentry/tracing", [\
["npm:7.27.0", {\
"packageLocation": "./.yarn/cache/@sentry-tracing-npm-7.27.0-7d217c54fa-26ea3ce5ae.zip/node_modules/@sentry/tracing/",\
"packageDependencies": [\
["@sentry/tracing", "npm:7.27.0"],\
["@sentry/core", "npm:7.27.0"],\
["@sentry/types", "npm:7.27.0"],\
["@sentry/utils", "npm:7.27.0"],\
["tslib", "npm:1.14.1"]\
],\
"linkType": "HARD"\
}],\
["npm:7.28.1", {\
"packageLocation": "./.yarn/cache/@sentry-tracing-npm-7.28.1-e15d453d8e-be501ca9d7.zip/node_modules/@sentry/tracing/",\
"packageDependencies": [\
@@ -2591,13 +2538,6 @@ const RAW_RUNTIME_STATE =
}]\
]],\
["@sentry/types", [\
["npm:7.27.0", {\
"packageLocation": "./.yarn/cache/@sentry-types-npm-7.27.0-67702fc3e1-20ace8aa51.zip/node_modules/@sentry/types/",\
"packageDependencies": [\
["@sentry/types", "npm:7.27.0"]\
],\
"linkType": "HARD"\
}],\
["npm:7.28.1", {\
"packageLocation": "./.yarn/cache/@sentry-types-npm-7.28.1-42d9a8574c-7dc6639cb7.zip/node_modules/@sentry/types/",\
"packageDependencies": [\
@@ -2607,15 +2547,6 @@ const RAW_RUNTIME_STATE =
}]\
]],\
["@sentry/utils", [\
["npm:7.27.0", {\
"packageLocation": "./.yarn/cache/@sentry-utils-npm-7.27.0-1935a93244-760c02397d.zip/node_modules/@sentry/utils/",\
"packageDependencies": [\
["@sentry/utils", "npm:7.27.0"],\
["@sentry/types", "npm:7.27.0"],\
["tslib", "npm:1.14.1"]\
],\
"linkType": "HARD"\
}],\
["npm:7.28.1", {\
"packageLocation": "./.yarn/cache/@sentry-utils-npm-7.28.1-71eaeb767f-a4b5f73db0.zip/node_modules/@sentry/utils/",\
"packageDependencies": [\
@@ -2716,7 +2647,7 @@ const RAW_RUNTIME_STATE =
["@types/ioredis", "npm:5.0.0"],\
["@types/jest", "npm:29.1.1"],\
["@types/mixpanel", "npm:2.14.4"],\
["@types/newrelic", "npm:7.0.4"],\
["@types/newrelic", "npm:9.4.0"],\
["@types/node", "npm:18.11.9"],\
["@typescript-eslint/eslint-plugin", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:5.30.5"],\
["aws-sdk", "npm:2.1260.0"],\
@@ -2728,8 +2659,8 @@ const RAW_RUNTIME_STATE =
["ioredis", "npm:5.2.4"],\
["jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.1.2"],\
["mixpanel", "npm:0.17.0"],\
["mysql2", "npm:2.3.3"],\
["newrelic", "npm:9.6.0"],\
["mysql2", "npm:3.0.1"],\
["newrelic", "npm:9.8.0"],\
["reflect-metadata", "npm:0.1.13"],\
["ts-jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.0.3"],\
["typeorm", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:0.3.10"],\
@@ -2771,8 +2702,8 @@ const RAW_RUNTIME_STATE =
["@types/express", "npm:4.17.14"],\
["@types/ioredis", "npm:5.0.0"],\
["@types/jest", "npm:29.1.1"],\
["@types/jsonwebtoken", "npm:8.5.9"],\
["@types/newrelic", "npm:7.0.4"],\
["@types/jsonwebtoken", "npm:9.0.1"],\
["@types/newrelic", "npm:9.4.0"],\
["@types/prettyjson", "npm:0.0.30"],\
["@typescript-eslint/eslint-plugin", "virtual:04783e12400851b8a3d76e71495851cc94959db6e62f04cb0a31190080629440b182d8c8eb4d7f2b04e281912f2783a5fd4d2c3c6ab68d38b7097246c93f4c19#npm:5.40.1"],\
["aws-sdk", "npm:2.1260.0"],\
@@ -2782,13 +2713,14 @@ const RAW_RUNTIME_STATE =
["eslint", "npm:8.25.0"],\
["eslint-plugin-prettier", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:4.2.1"],\
["express", "npm:4.18.2"],\
["express-robots-txt", "virtual:04783e12400851b8a3d76e71495851cc94959db6e62f04cb0a31190080629440b182d8c8eb4d7f2b04e281912f2783a5fd4d2c3c6ab68d38b7097246c93f4c19#npm:1.0.0"],\
["helmet", "npm:6.0.0"],\
["inversify", "npm:6.0.1"],\
["inversify-express-utils", "npm:6.4.3"],\
["ioredis", "npm:5.2.4"],\
["jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.1.2"],\
["jsonwebtoken", "npm:8.5.1"],\
["newrelic", "npm:9.6.0"],\
["jsonwebtoken", "npm:9.0.0"],\
["newrelic", "npm:9.8.0"],\
["nodemon", "npm:2.0.20"],\
["npm-check-updates", "npm:16.0.1"],\
["prettyjson", "npm:1.2.5"],\
@@ -2818,7 +2750,6 @@ const RAW_RUNTIME_STATE =
["@standardnotes/auth-server", "workspace:packages/auth"],\
["@newrelic/winston-enricher", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:4.0.0"],\
["@sentry/node", "npm:7.28.1"],\
["@sentry/profiling-node", "npm:0.0.12"],\
["@sentry/tracing", "npm:7.28.1"],\
["@simplewebauthn/server", "npm:6.2.2"],\
["@simplewebauthn/typescript-types", "npm:6.3.0-alpha.1"],\
@@ -2827,7 +2758,7 @@ const RAW_RUNTIME_STATE =
["@standardnotes/domain-core", "workspace:packages/domain-core"],\
["@standardnotes/domain-events", "workspace:packages/domain-events"],\
["@standardnotes/domain-events-infra", "workspace:packages/domain-events-infra"],\
["@standardnotes/features", "npm:1.53.1"],\
["@standardnotes/features", "npm:1.58.0"],\
["@standardnotes/predicates", "workspace:packages/predicates"],\
["@standardnotes/responses", "npm:1.11.1"],\
["@standardnotes/security", "workspace:packages/security"],\
@@ -2840,7 +2771,7 @@ const RAW_RUNTIME_STATE =
["@types/express", "npm:4.17.14"],\
["@types/ioredis", "npm:5.0.0"],\
["@types/jest", "npm:29.1.1"],\
["@types/newrelic", "npm:7.0.4"],\
["@types/newrelic", "npm:9.4.0"],\
["@types/otplib", "npm:10.0.0"],\
["@types/prettyjson", "npm:0.0.30"],\
["@types/ua-parser-js", "npm:0.7.36"],\
@@ -2859,8 +2790,8 @@ const RAW_RUNTIME_STATE =
["inversify-express-utils", "npm:6.4.3"],\
["ioredis", "npm:5.2.4"],\
["jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.1.2"],\
["mysql2", "npm:2.3.3"],\
["newrelic", "npm:9.6.0"],\
["mysql2", "npm:3.0.1"],\
["newrelic", "npm:9.8.0"],\
["nodemon", "npm:2.0.20"],\
["npm-check-updates", "npm:16.0.1"],\
["otplib", "npm:12.0.1"],\
@@ -2954,13 +2885,13 @@ const RAW_RUNTIME_STATE =
["@standardnotes/domain-events", "workspace:packages/domain-events"],\
["@types/ioredis", "npm:5.0.0"],\
["@types/jest", "npm:29.1.1"],\
["@types/newrelic", "npm:7.0.4"],\
["@types/newrelic", "npm:9.4.0"],\
["@typescript-eslint/eslint-plugin", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:5.30.5"],\
["aws-sdk", "npm:2.1260.0"],\
["eslint-plugin-prettier", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:4.2.1"],\
["ioredis", "npm:5.2.4"],\
["jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.1.2"],\
["newrelic", "npm:9.6.0"],\
["newrelic", "npm:9.8.0"],\
["reflect-metadata", "npm:0.1.13"],\
["sqs-consumer", "virtual:685a6222c3349423674bb7f0684ba34e2ab20912010f352e04dcf707a156e13183fc382e2417cb37a60f3e7b52fd0178c53181674890e1773eb83e190dc13378#npm:5.7.0"],\
["ts-jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.0.3"],\
@@ -2995,7 +2926,7 @@ const RAW_RUNTIME_STATE =
["@standardnotes/time", "workspace:packages/time"],\
["@types/ioredis", "npm:5.0.0"],\
["@types/jest", "npm:29.1.1"],\
["@types/newrelic", "npm:7.0.4"],\
["@types/newrelic", "npm:9.4.0"],\
["@types/nodemailer", "npm:6.4.6"],\
["@typescript-eslint/eslint-plugin", "virtual:04783e12400851b8a3d76e71495851cc94959db6e62f04cb0a31190080629440b182d8c8eb4d7f2b04e281912f2783a5fd4d2c3c6ab68d38b7097246c93f4c19#npm:5.40.1"],\
["aws-sdk", "npm:2.1260.0"],\
@@ -3005,8 +2936,8 @@ const RAW_RUNTIME_STATE =
["inversify", "npm:6.0.1"],\
["ioredis", "npm:5.2.4"],\
["jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.1.2"],\
["mysql2", "npm:2.3.3"],\
["newrelic", "npm:9.6.0"],\
["mysql2", "npm:3.0.1"],\
["newrelic", "npm:9.8.0"],\
["reflect-metadata", "npm:0.1.13"],\
["ts-jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.0.3"],\
["typeorm", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:0.3.10"],\
@@ -3038,6 +2969,17 @@ const RAW_RUNTIME_STATE =
["reflect-metadata", "npm:0.1.13"]\
],\
"linkType": "HARD"\
}],\
["npm:1.58.0", {\
"packageLocation": "./.yarn/cache/@standardnotes-features-npm-1.58.0-5a58b65873-028c13956a.zip/node_modules/@standardnotes/features/",\
"packageDependencies": [\
["@standardnotes/features", "npm:1.58.0"],\
["@standardnotes/auth", "npm:3.19.4"],\
["@standardnotes/common", "workspace:packages/common"],\
["@standardnotes/security", "workspace:packages/security"],\
["reflect-metadata", "npm:0.1.13"]\
],\
"linkType": "HARD"\
}]\
]],\
["@standardnotes/files-server", [\
@@ -3059,8 +3001,8 @@ const RAW_RUNTIME_STATE =
["@types/express", "npm:4.17.14"],\
["@types/ioredis", "npm:5.0.0"],\
["@types/jest", "npm:29.1.1"],\
["@types/jsonwebtoken", "npm:8.5.9"],\
["@types/newrelic", "npm:7.0.4"],\
["@types/jsonwebtoken", "npm:9.0.1"],\
["@types/newrelic", "npm:9.4.0"],\
["@types/prettyjson", "npm:0.0.30"],\
["@types/uuid", "npm:8.3.4"],\
["@typescript-eslint/eslint-plugin", "virtual:04783e12400851b8a3d76e71495851cc94959db6e62f04cb0a31190080629440b182d8c8eb4d7f2b04e281912f2783a5fd4d2c3c6ab68d38b7097246c93f4c19#npm:5.40.1"],\
@@ -3072,14 +3014,15 @@ const RAW_RUNTIME_STATE =
["eslint", "npm:8.25.0"],\
["eslint-plugin-prettier", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:4.2.1"],\
["express", "npm:4.18.2"],\
["express-robots-txt", "virtual:04783e12400851b8a3d76e71495851cc94959db6e62f04cb0a31190080629440b182d8c8eb4d7f2b04e281912f2783a5fd4d2c3c6ab68d38b7097246c93f4c19#npm:1.0.0"],\
["express-winston", "virtual:b442cf0427cc365d1c137f7340f9b81f9b204561afe791a8564ae9590c3a7fc4b5f793aaf8817b946f75a3cb64d03ef8790eb847f8b576b41e700da7b00c240c#npm:4.2.0"],\
["helmet", "npm:6.0.0"],\
["inversify", "npm:6.0.1"],\
["inversify-express-utils", "npm:6.4.3"],\
["ioredis", "npm:5.2.4"],\
["jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.1.2"],\
["jsonwebtoken", "npm:8.5.1"],\
["newrelic", "npm:9.6.0"],\
["jsonwebtoken", "npm:9.0.0"],\
["newrelic", "npm:9.8.0"],\
["nodemon", "npm:2.0.20"],\
["npm-check-updates", "npm:16.0.1"],\
["prettyjson", "npm:1.2.5"],\
@@ -3194,7 +3137,7 @@ const RAW_RUNTIME_STATE =
["@types/inversify-express-utils", "npm:2.0.0"],\
["@types/ioredis", "npm:5.0.0"],\
["@types/jest", "npm:29.1.1"],\
["@types/newrelic", "npm:7.0.4"],\
["@types/newrelic", "npm:9.4.0"],\
["@typescript-eslint/eslint-plugin", "virtual:04783e12400851b8a3d76e71495851cc94959db6e62f04cb0a31190080629440b182d8c8eb4d7f2b04e281912f2783a5fd4d2c3c6ab68d38b7097246c93f4c19#npm:5.40.1"],\
["aws-sdk", "npm:2.1260.0"],\
["cors", "npm:2.8.5"],\
@@ -3207,8 +3150,8 @@ const RAW_RUNTIME_STATE =
["inversify-express-utils", "npm:6.4.3"],\
["ioredis", "npm:5.2.4"],\
["jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.1.2"],\
["mysql2", "npm:2.3.3"],\
["newrelic", "npm:9.6.0"],\
["mysql2", "npm:3.0.1"],\
["newrelic", "npm:9.8.0"],\
["npm-check-updates", "npm:16.0.1"],\
["reflect-metadata", "npm:0.1.13"],\
["ts-jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.0.3"],\
@@ -3234,7 +3177,7 @@ const RAW_RUNTIME_STATE =
["@standardnotes/time", "workspace:packages/time"],\
["@types/ioredis", "npm:5.0.0"],\
["@types/jest", "npm:29.1.1"],\
["@types/newrelic", "npm:7.0.4"],\
["@types/newrelic", "npm:9.4.0"],\
["@types/node", "npm:18.11.9"],\
["@typescript-eslint/eslint-plugin", "virtual:04783e12400851b8a3d76e71495851cc94959db6e62f04cb0a31190080629440b182d8c8eb4d7f2b04e281912f2783a5fd4d2c3c6ab68d38b7097246c93f4c19#npm:5.40.1"],\
["aws-sdk", "npm:2.1260.0"],\
@@ -3245,8 +3188,8 @@ const RAW_RUNTIME_STATE =
["inversify", "npm:6.0.1"],\
["ioredis", "npm:5.2.4"],\
["jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.1.2"],\
["mysql2", "npm:2.3.3"],\
["newrelic", "npm:9.6.0"],\
["mysql2", "npm:3.0.1"],\
["newrelic", "npm:9.8.0"],\
["npm-check-updates", "npm:16.0.1"],\
["reflect-metadata", "npm:0.1.13"],\
["ts-jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.0.3"],\
@@ -3264,11 +3207,11 @@ const RAW_RUNTIME_STATE =
["@standardnotes/security", "workspace:packages/security"],\
["@standardnotes/common", "workspace:packages/common"],\
["@types/jest", "npm:29.1.1"],\
["@types/jsonwebtoken", "npm:8.5.9"],\
["@types/jsonwebtoken", "npm:9.0.1"],\
["@typescript-eslint/eslint-plugin", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:5.30.5"],\
["eslint-plugin-prettier", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:4.2.1"],\
["jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.1.2"],\
["jsonwebtoken", "npm:8.5.1"],\
["jsonwebtoken", "npm:9.0.0"],\
["reflect-metadata", "npm:0.1.13"],\
["ts-jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.0.3"],\
["typescript", "patch:typescript@npm%3A4.8.4#optional!builtin<compat/typescript>::version=4.8.4&hash=701156"]\
@@ -3288,13 +3231,13 @@ const RAW_RUNTIME_STATE =
["@lerna-lite/run", "npm:1.6.0"],\
["@sentry/node", "npm:7.28.1"],\
["@types/jest", "npm:29.1.1"],\
["@types/newrelic", "npm:7.0.4"],\
["@types/newrelic", "npm:9.4.0"],\
["@types/node", "npm:18.11.9"],\
["@typescript-eslint/parser", "virtual:8859b278716fedf3e7458b5628625f7e35678c418626878559a0b816445001b7e24c55546f4677ba4c20b521aa0cf52cc33ac07deff171e383ada6eeab69933f#npm:5.40.1"],\
["eslint", "npm:8.19.0"],\
["eslint-config-prettier", "virtual:8859b278716fedf3e7458b5628625f7e35678c418626878559a0b816445001b7e24c55546f4677ba4c20b521aa0cf52cc33ac07deff171e383ada6eeab69933f#npm:8.5.0"],\
["ini", "npm:3.0.0"],\
["newrelic", "npm:9.6.0"],\
["newrelic", "npm:9.8.0"],\
["npm-check-updates", "npm:16.0.1"],\
["prettier", "npm:2.7.1"],\
["ts-node", "virtual:8859b278716fedf3e7458b5628625f7e35678c418626878559a0b816445001b7e24c55546f4677ba4c20b521aa0cf52cc33ac07deff171e383ada6eeab69933f#npm:10.9.1"],\
@@ -3353,7 +3296,6 @@ const RAW_RUNTIME_STATE =
["@standardnotes/syncing-server", "workspace:packages/syncing-server"],\
["@newrelic/winston-enricher", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:4.0.0"],\
["@sentry/node", "npm:7.28.1"],\
["@sentry/profiling-node", "npm:0.0.12"],\
["@sentry/tracing", "npm:7.28.1"],\
["@standardnotes/common", "workspace:packages/common"],\
["@standardnotes/domain-core", "workspace:packages/domain-core"],\
@@ -3370,8 +3312,8 @@ const RAW_RUNTIME_STATE =
["@types/inversify-express-utils", "npm:2.0.0"],\
["@types/ioredis", "npm:5.0.0"],\
["@types/jest", "npm:29.1.1"],\
["@types/jsonwebtoken", "npm:8.5.9"],\
["@types/newrelic", "npm:7.0.4"],\
["@types/jsonwebtoken", "npm:9.0.1"],\
["@types/newrelic", "npm:9.4.0"],\
["@types/prettyjson", "npm:0.0.30"],\
["@types/ua-parser-js", "npm:0.7.36"],\
["@types/uuid", "npm:8.3.4"],\
@@ -3388,9 +3330,9 @@ const RAW_RUNTIME_STATE =
["inversify-express-utils", "npm:6.4.3"],\
["ioredis", "npm:5.2.4"],\
["jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.1.2"],\
["jsonwebtoken", "npm:8.5.1"],\
["mysql2", "npm:2.3.3"],\
["newrelic", "npm:9.6.0"],\
["jsonwebtoken", "npm:9.0.0"],\
["mysql2", "npm:3.0.1"],\
["newrelic", "npm:9.8.0"],\
["nodemon", "npm:2.0.20"],\
["npm-check-updates", "npm:16.0.1"],\
["prettyjson", "npm:1.2.5"],\
@@ -3464,7 +3406,7 @@ const RAW_RUNTIME_STATE =
["@types/express", "npm:4.17.14"],\
["@types/ioredis", "npm:5.0.0"],\
["@types/jest", "npm:29.1.1"],\
["@types/newrelic", "npm:7.0.4"],\
["@types/newrelic", "npm:9.4.0"],\
["@typescript-eslint/eslint-plugin", "virtual:04783e12400851b8a3d76e71495851cc94959db6e62f04cb0a31190080629440b182d8c8eb4d7f2b04e281912f2783a5fd4d2c3c6ab68d38b7097246c93f4c19#npm:5.40.1"],\
["aws-sdk", "npm:2.1260.0"],\
["axios", "npm:1.1.3"],\
@@ -3477,8 +3419,8 @@ const RAW_RUNTIME_STATE =
["inversify-express-utils", "npm:6.4.3"],\
["ioredis", "npm:5.2.4"],\
["jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.1.2"],\
["mysql2", "npm:2.3.3"],\
["newrelic", "npm:9.6.0"],\
["mysql2", "npm:3.0.1"],\
["newrelic", "npm:9.8.0"],\
["reflect-metadata", "npm:0.1.13"],\
["ts-jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.0.3"],\
["typeorm", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:0.3.10"],\
@@ -3507,7 +3449,7 @@ const RAW_RUNTIME_STATE =
["@types/express", "npm:4.17.14"],\
["@types/ioredis", "npm:5.0.0"],\
["@types/jest", "npm:29.1.1"],\
["@types/newrelic", "npm:7.0.4"],\
["@types/newrelic", "npm:9.4.0"],\
["@typescript-eslint/eslint-plugin", "virtual:04783e12400851b8a3d76e71495851cc94959db6e62f04cb0a31190080629440b182d8c8eb4d7f2b04e281912f2783a5fd4d2c3c6ab68d38b7097246c93f4c19#npm:5.40.1"],\
["aws-sdk", "npm:2.1260.0"],\
["cors", "npm:2.8.5"],\
@@ -3519,8 +3461,8 @@ const RAW_RUNTIME_STATE =
["inversify-express-utils", "npm:6.4.3"],\
["ioredis", "npm:5.2.4"],\
["jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.1.2"],\
["mysql2", "npm:2.3.3"],\
["newrelic", "npm:9.6.0"],\
["mysql2", "npm:3.0.1"],\
["newrelic", "npm:9.8.0"],\
["reflect-metadata", "npm:0.1.13"],\
["ts-jest", "virtual:fd909b174d079e30b336c4ce72c38a88c1e447767b1a8dd7655e07719a1e31b97807f0931368724fc78897ff15e6a6d00b83316c0f76d11f85111f342e08bb79#npm:29.0.3"],\
["typeorm", "virtual:c66bf20e88479ada0172094776519a9f51acc4731d22079b60a295bcec7ea42d5545cbce58a77a50d932bf953298799135e99707486e343da6d99ba1d167bdbd#npm:0.3.10"],\
@@ -3837,10 +3779,10 @@ const RAW_RUNTIME_STATE =
}]\
]],\
["@types/jsonwebtoken", [\
["npm:8.5.9", {\
"packageLocation": "./.yarn/cache/@types-jsonwebtoken-npm-8.5.9-79c2843a81-3f15a76cd5.zip/node_modules/@types/jsonwebtoken/",\
["npm:9.0.1", {\
"packageLocation": "./.yarn/cache/@types-jsonwebtoken-npm-9.0.1-5f660fdf38-44d3fccc6b.zip/node_modules/@types/jsonwebtoken/",\
"packageDependencies": [\
["@types/jsonwebtoken", "npm:8.5.9"],\
["@types/jsonwebtoken", "npm:9.0.1"],\
["@types/node", "npm:18.0.3"]\
],\
"linkType": "HARD"\
@@ -3911,10 +3853,10 @@ const RAW_RUNTIME_STATE =
}]\
]],\
["@types/newrelic", [\
["npm:7.0.4", {\
"packageLocation": "./.yarn/cache/@types-newrelic-npm-7.0.4-4f0b179b51-b44215b3ab.zip/node_modules/@types/newrelic/",\
["npm:9.4.0", {\
"packageLocation": "./.yarn/cache/@types-newrelic-npm-9.4.0-72a77bd5e6-adb12973e8.zip/node_modules/@types/newrelic/",\
"packageDependencies": [\
["@types/newrelic", "npm:7.0.4"]\
["@types/newrelic", "npm:9.4.0"]\
],\
"linkType": "HARD"\
}]\
@@ -7399,6 +7341,28 @@ const RAW_RUNTIME_STATE =
"linkType": "HARD"\
}]\
]],\
["express-robots-txt", [\
["npm:1.0.0", {\
"packageLocation": "./.yarn/cache/express-robots-txt-npm-1.0.0-dcc8bd8f0a-54f066f6c3.zip/node_modules/express-robots-txt/",\
"packageDependencies": [\
["express-robots-txt", "npm:1.0.0"]\
],\
"linkType": "SOFT"\
}],\
["virtual:04783e12400851b8a3d76e71495851cc94959db6e62f04cb0a31190080629440b182d8c8eb4d7f2b04e281912f2783a5fd4d2c3c6ab68d38b7097246c93f4c19#npm:1.0.0", {\
"packageLocation": "./.yarn/__virtual__/express-robots-txt-virtual-0a3eb9f2f5/0/cache/express-robots-txt-npm-1.0.0-dcc8bd8f0a-54f066f6c3.zip/node_modules/express-robots-txt/",\
"packageDependencies": [\
["express-robots-txt", "virtual:04783e12400851b8a3d76e71495851cc94959db6e62f04cb0a31190080629440b182d8c8eb4d7f2b04e281912f2783a5fd4d2c3c6ab68d38b7097246c93f4c19#npm:1.0.0"],\
["@types/express", "npm:4.17.14"],\
["express", "npm:4.18.2"]\
],\
"packagePeers": [\
"@types/express",\
"express"\
],\
"linkType": "HARD"\
}]\
]],\
["express-winston", [\
["npm:4.2.0", {\
"packageLocation": "./.yarn/cache/express-winston-npm-4.2.0-e4cfb26486-2d4b37671d.zip/node_modules/express-winston/",\
@@ -9866,6 +9830,17 @@ const RAW_RUNTIME_STATE =
["semver", "npm:5.7.1"]\
],\
"linkType": "HARD"\
}],\
["npm:9.0.0", {\
"packageLocation": "./.yarn/cache/jsonwebtoken-npm-9.0.0-36fd1594c0-7ccbd0b7bf.zip/node_modules/jsonwebtoken/",\
"packageDependencies": [\
["jsonwebtoken", "npm:9.0.0"],\
["jws", "npm:3.2.2"],\
["lodash", "npm:4.17.21"],\
["ms", "npm:2.1.3"],\
["semver", "npm:7.3.8"]\
],\
"linkType": "HARD"\
}]\
]],\
["jsrsasign", [\
@@ -10232,6 +10207,13 @@ const RAW_RUNTIME_STATE =
["long", "npm:4.0.0"]\
],\
"linkType": "HARD"\
}],\
["npm:5.2.1", {\
"packageLocation": "./.yarn/cache/long-npm-5.2.1-3a12730171-f81b18ff29.zip/node_modules/long/",\
"packageDependencies": [\
["long", "npm:5.2.1"]\
],\
"linkType": "HARD"\
}]\
]],\
["lowercase-keys", [\
@@ -10251,15 +10233,6 @@ const RAW_RUNTIME_STATE =
}]\
]],\
["lru-cache", [\
["npm:4.1.5", {\
"packageLocation": "./.yarn/cache/lru-cache-npm-4.1.5-ede304cc43-796f26ad92.zip/node_modules/lru-cache/",\
"packageDependencies": [\
["lru-cache", "npm:4.1.5"],\
["pseudomap", "npm:1.0.2"],\
["yallist", "npm:2.1.2"]\
],\
"linkType": "HARD"\
}],\
["npm:6.0.0", {\
"packageLocation": "./.yarn/cache/lru-cache-npm-6.0.0-b4c8668fe1-b2d72088dd.zip/node_modules/lru-cache/",\
"packageDependencies": [\
@@ -10274,6 +10247,13 @@ const RAW_RUNTIME_STATE =
["lru-cache", "npm:7.12.0"]\
],\
"linkType": "HARD"\
}],\
["npm:7.14.1", {\
"packageLocation": "./.yarn/cache/lru-cache-npm-7.14.1-d3ba9407b6-e4c8c073d9.zip/node_modules/lru-cache/",\
"packageDependencies": [\
["lru-cache", "npm:7.14.1"]\
],\
"linkType": "HARD"\
}]\
]],\
["lru_map", [\
@@ -10731,16 +10711,16 @@ const RAW_RUNTIME_STATE =
}]\
]],\
["mysql2", [\
["npm:2.3.3", {\
"packageLocation": "./.yarn/cache/mysql2-npm-2.3.3-fa543fff43-dda663a631.zip/node_modules/mysql2/",\
["npm:3.0.1", {\
"packageLocation": "./.yarn/cache/mysql2-npm-3.0.1-ceda50bb4d-6bbee1ee05.zip/node_modules/mysql2/",\
"packageDependencies": [\
["mysql2", "npm:2.3.3"],\
["mysql2", "npm:3.0.1"],\
["denque", "npm:2.1.0"],\
["generate-function", "npm:2.3.1"],\
["iconv-lite", "npm:0.6.3"],\
["long", "npm:4.0.0"],\
["lru-cache", "npm:6.0.0"],\
["named-placeholders", "npm:1.1.2"],\
["long", "npm:5.2.1"],\
["lru-cache", "npm:7.14.1"],\
["named-placeholders", "npm:1.1.3"],\
["seq-queue", "npm:0.0.5"],\
["sqlstring", "npm:2.3.3"]\
],\
@@ -10760,11 +10740,11 @@ const RAW_RUNTIME_STATE =
}]\
]],\
["named-placeholders", [\
["npm:1.1.2", {\
"packageLocation": "./.yarn/cache/named-placeholders-npm-1.1.2-5d4cbc92b0-24477df960.zip/node_modules/named-placeholders/",\
["npm:1.1.3", {\
"packageLocation": "./.yarn/cache/named-placeholders-npm-1.1.3-1b385febe5-1cd77eb10c.zip/node_modules/named-placeholders/",\
"packageDependencies": [\
["named-placeholders", "npm:1.1.2"],\
["lru-cache", "npm:4.1.5"]\
["named-placeholders", "npm:1.1.3"],\
["lru-cache", "npm:7.14.1"]\
],\
"linkType": "HARD"\
}]\
@@ -10777,14 +10757,6 @@ const RAW_RUNTIME_STATE =
["node-gyp", "npm:9.0.0"]\
],\
"linkType": "HARD"\
}],\
["npm:2.17.0", {\
"packageLocation": "./.yarn/unplugged/nan-npm-2.17.0-bf36a21d6f/node_modules/nan/",\
"packageDependencies": [\
["nan", "npm:2.17.0"],\
["node-gyp", "npm:9.0.0"]\
],\
"linkType": "HARD"\
}]\
]],\
["natural-compare", [\
@@ -10815,16 +10787,17 @@ const RAW_RUNTIME_STATE =
}]\
]],\
["newrelic", [\
["npm:9.6.0", {\
"packageLocation": "./.yarn/cache/newrelic-npm-9.6.0-f10080c2de-eb378acde1.zip/node_modules/newrelic/",\
["npm:9.8.0", {\
"packageLocation": "./.yarn/cache/newrelic-npm-9.8.0-4c49b89cbc-ed3b893298.zip/node_modules/newrelic/",\
"packageDependencies": [\
["newrelic", "npm:9.6.0"],\
["@grpc/grpc-js", "npm:1.6.7"],\
["@grpc/proto-loader", "npm:0.6.13"],\
["@newrelic/aws-sdk", "virtual:f10080c2deb75096716a913b06010dcd94891c77539a757ab32210a1efc3ff91527b36d6c7c46e890db826160e0724553ca23acd0a8a734b5554c9600c71eb52#npm:5.0.0"],\
["@newrelic/koa", "virtual:f10080c2deb75096716a913b06010dcd94891c77539a757ab32210a1efc3ff91527b36d6c7c46e890db826160e0724553ca23acd0a8a734b5554c9600c71eb52#npm:7.0.0"],\
["newrelic", "npm:9.8.0"],\
["@contrast/fn-inspect", "npm:3.3.0"],\
["@grpc/grpc-js", "npm:1.8.4"],\
["@grpc/proto-loader", "npm:0.7.4"],\
["@newrelic/aws-sdk", "virtual:4c49b89cbc97666c528d8405a7490a32a30cd8b65c1a61cb32c444f3a312dab1385405717f9866d113d67518b3d487f15de177279ba1a80f8958b28cad021846#npm:5.0.0"],\
["@newrelic/koa", "virtual:4c49b89cbc97666c528d8405a7490a32a30cd8b65c1a61cb32c444f3a312dab1385405717f9866d113d67518b3d487f15de177279ba1a80f8958b28cad021846#npm:7.0.0"],\
["@newrelic/native-metrics", "npm:9.0.0"],\
["@newrelic/superagent", "virtual:f10080c2deb75096716a913b06010dcd94891c77539a757ab32210a1efc3ff91527b36d6c7c46e890db826160e0724553ca23acd0a8a734b5554c9600c71eb52#npm:6.0.0"],\
["@newrelic/superagent", "virtual:4c49b89cbc97666c528d8405a7490a32a30cd8b65c1a61cb32c444f3a312dab1385405717f9866d113d67518b3d487f15de177279ba1a80f8958b28cad021846#npm:6.0.0"],\
["@tyriar/fibonacci-heap", "npm:2.0.9"],\
["concat-stream", "npm:2.0.0"],\
["https-proxy-agent", "npm:5.0.1"],\
@@ -10836,16 +10809,6 @@ const RAW_RUNTIME_STATE =
"linkType": "HARD"\
}]\
]],\
["node-abi", [\
["npm:3.30.0", {\
"packageLocation": "./.yarn/cache/node-abi-npm-3.30.0-38c31585f0-5a769beae1.zip/node_modules/node-abi/",\
"packageDependencies": [\
["node-abi", "npm:3.30.0"],\
["semver", "npm:7.3.7"]\
],\
"linkType": "HARD"\
}]\
]],\
["node-addon-api", [\
["npm:5.0.0", {\
"packageLocation": "./.yarn/unplugged/node-addon-api-npm-5.0.0-c0def7fecf/node_modules/node-addon-api/",\
@@ -10896,23 +10859,6 @@ const RAW_RUNTIME_STATE =
["which", "npm:2.0.2"]\
],\
"linkType": "HARD"\
}],\
["npm:9.3.0", {\
"packageLocation": "./.yarn/unplugged/node-gyp-npm-9.3.0-21c41a4dfd/node_modules/node-gyp/",\
"packageDependencies": [\
["node-gyp", "npm:9.3.0"],\
["env-paths", "npm:2.2.1"],\
["glob", "npm:7.2.3"],\
["graceful-fs", "npm:4.2.10"],\
["make-fetch-happen", "npm:10.1.8"],\
["nopt", "npm:6.0.0"],\
["npmlog", "npm:6.0.2"],\
["rimraf", "npm:3.0.2"],\
["semver", "npm:7.3.7"],\
["tar", "npm:6.1.11"],\
["which", "npm:2.0.2"]\
],\
"linkType": "HARD"\
}]\
]],\
["node-gyp-build", [\
@@ -10986,14 +10932,6 @@ const RAW_RUNTIME_STATE =
["abbrev", "npm:1.1.1"]\
],\
"linkType": "HARD"\
}],\
["npm:6.0.0", {\
"packageLocation": "./.yarn/cache/nopt-npm-6.0.0-5ea8050815-6ae5c083c5.zip/node_modules/nopt/",\
"packageDependencies": [\
["nopt", "npm:6.0.0"],\
["abbrev", "npm:1.1.1"]\
],\
"linkType": "HARD"\
}]\
]],\
["normalize-package-data", [\
@@ -11914,10 +11852,10 @@ const RAW_RUNTIME_STATE =
}]\
]],\
["protobufjs", [\
["npm:6.11.3", {\
"packageLocation": "./.yarn/unplugged/protobufjs-npm-6.11.3-566fb31188/node_modules/protobufjs/",\
["npm:7.1.2", {\
"packageLocation": "./.yarn/unplugged/protobufjs-npm-7.1.2-2e50888192/node_modules/protobufjs/",\
"packageDependencies": [\
["protobufjs", "npm:6.11.3"],\
["protobufjs", "npm:7.1.2"],\
["@protobufjs/aspromise", "npm:1.1.2"],\
["@protobufjs/base64", "npm:1.1.2"],\
["@protobufjs/codegen", "npm:2.0.4"],\
@@ -11928,9 +11866,8 @@ const RAW_RUNTIME_STATE =
["@protobufjs/path", "npm:1.1.2"],\
["@protobufjs/pool", "npm:1.1.0"],\
["@protobufjs/utf8", "npm:1.1.0"],\
["@types/long", "npm:4.0.2"],\
["@types/node", "npm:18.0.3"],\
["long", "npm:4.0.0"]\
["long", "npm:5.2.1"]\
],\
"linkType": "HARD"\
}]\
@@ -11971,15 +11908,6 @@ const RAW_RUNTIME_STATE =
"linkType": "HARD"\
}]\
]],\
["pseudomap", [\
["npm:1.0.2", {\
"packageLocation": "./.yarn/cache/pseudomap-npm-1.0.2-0d0e40fee0-33cfbb99ac.zip/node_modules/pseudomap/",\
"packageDependencies": [\
["pseudomap", "npm:1.0.2"]\
],\
"linkType": "HARD"\
}]\
]],\
["pstree.remy", [\
["npm:1.1.8", {\
"packageLocation": "./.yarn/cache/pstree.remy-npm-1.1.8-2dd5d55de2-f144e436fd.zip/node_modules/pstree.remy/",\
@@ -12623,6 +12551,14 @@ const RAW_RUNTIME_STATE =
["lru-cache", "npm:6.0.0"]\
],\
"linkType": "HARD"\
}],\
["npm:7.3.8", {\
"packageLocation": "./.yarn/cache/semver-npm-7.3.8-25a996cb4f-94ad80ee14.zip/node_modules/semver/",\
"packageDependencies": [\
["semver", "npm:7.3.8"],\
["lru-cache", "npm:6.0.0"]\
],\
"linkType": "HARD"\
}]\
]],\
["semver-diff", [\
@@ -13929,7 +13865,7 @@ const RAW_RUNTIME_STATE =
["mkdirp", "npm:1.0.4"],\
["mongodb", null],\
["mssql", null],\
["mysql2", "npm:2.3.3"],\
["mysql2", "npm:3.0.1"],\
["oracledb", null],\
["pg", null],\
["pg-native", null],\
@@ -14630,13 +14566,6 @@ const RAW_RUNTIME_STATE =
}]\
]],\
["yallist", [\
["npm:2.1.2", {\
"packageLocation": "./.yarn/cache/yallist-npm-2.1.2-2e38c366a3-f3ace13bed.zip/node_modules/yallist/",\
"packageDependencies": [\
["yallist", "npm:2.1.2"]\
],\
"linkType": "HARD"\
}],\
["npm:4.0.0", {\
"packageLocation": "./.yarn/cache/yallist-npm-4.0.0-b493d9e907-cd7fe32508.zip/node_modules/yallist/",\
"packageDependencies": [\

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,18 @@
Copyright 2022 Contrast Security, Inc
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,43 @@
# @contrast/fn-inspect
[![Test](https://github.com/Contrast-Security-Inc/node-fn-inspect/actions/workflows/test.yml/badge.svg)](https://github.com/Contrast-Security-Inc/node-fn-inspect/actions/workflows/test.yml)
This module exposes some useful information from the underlying v8 engine,
including:
- file and line number given a function reference
- code events (i.e. `'LAZY_COMPILE'`)
## Usage
Getting details about a function:
```js
const { funcInfo } = require('@contrast/fn-inspect');
function testFn() {}
const results = funcInfo(testFn);
// => { lineNumber: 2, column: 15, file: 'example.js', method: 'testFn', type: 'Function' }
```
Registering a listener for code events:
```js
const { setCodeEventListener } = require('@contrast/fn-inspect');
setCodeEventListener((event) => {
console.log(event);
});
```
## Building locally
`npm run build` will build the project for your current OS and architecture.
`npm run download` will pull the most recent build artifacts from GitHub.
## Publishing
Simply run `npm version` and `git push && git push --tags`. CI will take care of
releasing on taggedcommits.

View File

@@ -0,0 +1,36 @@
{
"variables" : {
"openssl_fips": "",
},
"targets": [
{
"target_name": "fninspect",
"sources": [
"src/addon.cc",
"src/code-events.cc",
"src/event-queue.cc",
"src/func-info.cc"
],
"include_dirs": [
"<!(node -e \"require('nan')\")"
],
"conditions": [
[
"OS == 'mac'",
{
"xcode_settings": {
"OTHER_CFLAGS": [
"-arch x86_64",
"-arch arm64"
],
"OTHER_LDFLAGS": [
"-arch x86_64",
"-arch arm64"
]
}
}
]
]
}
]
}

View File

@@ -0,0 +1,45 @@
/* eslint-disable @typescript-eslint/ban-types */
declare interface FunctionInfo {
file: string;
column: number;
lineNumber: number;
method: string;
type: 'AsyncFunction' | 'Function';
}
declare interface CodeEvent {
func: string;
lineNumber: number;
script: string;
type:
| 'Builtin'
| 'Callback'
| 'Eval'
| 'Function'
| 'InterpretedFunction'
| 'Handler'
| 'BytecodeHandler'
| 'LazyCompile'
| 'RegExp'
| 'Script'
| 'Stub'
| 'Relocation'
}
declare const fnInspect: {
/** Retrieves name, type, column, lineNumber and file from a function reference */
funcInfo(fn: Function): FunctionInfo | null;
/**
* Sets the function for processing v8 code events.
* Will start listening for code events if not already listening.
* starts a timer which polls for an available code event once every `interval` ms.
*/
setCodeEventListener(cb: (event: CodeEvent) => void, interval?: number): void;
/** Stop listening for v8 code events */
stopListening(): void;
};
export = fnInspect;

View File

@@ -0,0 +1,58 @@
'use strict';
const binding = require('node-gyp-build')(__dirname);
let codeEventsInited = false;
let codeEventListener = null;
let timer = null;
module.exports = {
/**
* Retrieves name, type, column, lineNumber and file from a function reference
*
* @param {Function} fn function reference to obtain info
* @return {FunctionInfo | null}
*/
funcInfo(fn) {
const info = binding.funcInfo(fn);
if (info === null) return null;
info.type = fn.constructor.name;
return info;
},
/**
* Sets the function for processing v8 code events.
* Will start listening for code events if not already listening.
* starts a timer which polls for an available code event once every `interval` value.
*
* @param {Function} cb callback function to call
* @param {number} [interval=1] how often to get code events in ms
*/
setCodeEventListener(cb, interval = 1) {
if (codeEventsInited) {
codeEventListener = cb;
return;
}
binding.initHandler();
codeEventsInited = true;
codeEventListener = cb;
timer = setInterval(() => {
const codeEvent = binding.getNextCodeEvent();
if (codeEvent) codeEventListener(codeEvent);
}, interval);
},
/**
* Stop listening for v8 code events
*/
stopListening() {
if (!codeEventsInited) return;
clearInterval(timer);
binding.deinitHandler();
codeEventListener = null;
codeEventsInited = false;
},
};

View File

@@ -0,0 +1,63 @@
{
"name": "@contrast/fn-inspect",
"version": "3.3.0",
"description": "Retrieve function name and line number from a function reference",
"keywords": [
"instrumentation"
],
"author": "Contrast Security",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/Contrast-Security-Inc/node-fn-inspect.git"
},
"bugs": {
"url": "https://github.com/Contrast-Security-Inc/node-fn-inspect/issues"
},
"homepage": "https://github.com/Contrast-Security-Inc/node-fn-inspect#readme",
"files": [
"prebuilds/",
"src/",
"binding.gyp",
"index.d.ts",
"index.js"
],
"main": "index.js",
"types": "index.d.ts",
"scripts": {
"install": "node-gyp-build",
"prepare": "husky install",
"build": "prebuildify -t 12.13.0 -t 14.15.0 -t 16.9.1 -t 18.7.0 --strip",
"build:linux": "prebuildify-cross -i centos7-devtoolset7 -i alpine -i linux-arm64 -t 12.13.0 -t 14.15.0 -t 16.9.1 -t 18.7.0 --strip",
"build:darwin": "npm run build -- --arch x64+arm64",
"build:win32": "npm run build",
"clean": "rimraf build/ coverage/ prebuilds/",
"download": "node scripts/download-artifacts.js",
"test": "c8 --reporter lcov --reporter text mocha .",
"test:valgrind": "valgrind --xml=yes --xml-file=./valgrind.xml --trace-children=yes --leak-check=full --show-leak-kinds=all mocha . && node scripts/parse-valgrind.js"
},
"engines": {
"node": ">=12.13.0"
},
"dependencies": {
"nan": "^2.16.0",
"node-gyp-build": "^4.4.0"
},
"devDependencies": {
"@contrast/eslint-config": "^3.1.1",
"@ls-lint/ls-lint": "^1.11.2",
"@octokit/rest": "^18.12.0",
"c8": "^7.11.3",
"chai": "^4.3.6",
"husky": "^8.0.1",
"inquirer": "^8.2.4",
"lint-staged": "^13.0.1",
"mocha": "^10.0.0",
"node-gyp": "^9.0.0",
"prebuildify": "^5.0.0",
"prebuildify-cross": "^5.0.0",
"rimraf": "^3.0.2",
"unzipper": "^0.10.11",
"xml-js": "^1.6.11"
}
}

View File

@@ -0,0 +1,14 @@
#include <nan.h>
#include "code-events.h"
#include "func-info.h"
NAN_MODULE_INIT(Init) {
NAN_EXPORT(target, initHandler);
NAN_EXPORT(target, deinitHandler);
NAN_EXPORT(target, getNextCodeEvent);
NAN_EXPORT(target, funcInfo);
}
NODE_MODULE(addon, Init)

View File

@@ -0,0 +1,75 @@
#include "code-events.h"
#include "event-queue.h"
using namespace v8;
class FnInspectCodeEventHandler : public CodeEventHandler {
public:
FnInspectCodeEventHandler(Isolate *isolate) : CodeEventHandler(isolate) {
this->isolate = isolate;
}
void Handle(CodeEvent *event) {
/*
* If Handle() is invoked from a worker thread (i.e. during
* garbage collection) we don't have access to the isolate
* so just bail
*/
if (Isolate::GetCurrent() != isolate) {
return;
}
events.enqueue(event);
}
EventNode *dequeue() {
return this->events.dequeue();
}
unsigned int eventCount() {
return this->events.length;
}
private:
Isolate *isolate;
EventQueue events;
};
FnInspectCodeEventHandler *handler;
NAN_METHOD(initHandler) {
handler = new FnInspectCodeEventHandler(info.GetIsolate());
handler->Enable();
}
NAN_METHOD(deinitHandler) {
handler->Disable();
delete handler;
handler = NULL;
}
NAN_METHOD(getNextCodeEvent) {
EventNode *node = handler->dequeue();
if (!node)
return;
Local<Object> obj = Nan::New<Object>();
Nan::Set(obj,
Nan::New("script").ToLocalChecked(),
Nan::New(node->script).ToLocalChecked());
Nan::Set(obj,
Nan::New("func").ToLocalChecked(),
Nan::New(node->func).ToLocalChecked());
Nan::Set(obj,
Nan::New("type").ToLocalChecked(),
Nan::New(node->type).ToLocalChecked());
Nan::Set(obj,
Nan::New("lineNumber").ToLocalChecked(),
Nan::New(node->lineNumber));
info.GetReturnValue().Set(obj);
delete node;
}

View File

@@ -0,0 +1,11 @@
#pragma once
#include <nan.h>
#include <v8-profiler.h>
#include <v8.h>
#include "event-queue.h"
NAN_METHOD(initHandler);
NAN_METHOD(deinitHandler);
NAN_METHOD(getNextCodeEvent);

View File

@@ -0,0 +1,61 @@
#include <v8-profiler.h>
#include <v8.h>
#include "event-queue.h"
using namespace v8;
EventQueue::EventQueue() {
this->head = NULL;
this->tail = NULL;
this->length = 0;
}
EventQueue::~EventQueue() {
EventNode *tmp;
while (this->head) {
tmp = this->head;
;
this->head = this->head->next;
delete tmp;
}
}
void EventQueue::enqueue(CodeEvent *event) {
if (Nan::Utf8String(event->GetScriptName()).length() == 0)
return;
EventNode *node = new EventNode();
node->type = strdup(CodeEvent::GetCodeEventTypeName(event->GetCodeType()));
node->script = strdup(*Nan::Utf8String(event->GetScriptName()));
node->func = strdup(*Nan::Utf8String(event->GetFunctionName()));
node->lineNumber = event->GetScriptLine();
if (this->tail) {
this->tail->next = node;
this->tail = node;
} else {
this->head = node;
this->tail = node;
}
this->length += 1;
}
EventNode *EventQueue::dequeue() {
EventNode *node = this->head;
if (!node)
return NULL;
this->head = this->head->next;
if (this->head == NULL) {
this->tail = NULL;
}
this->length -= 1;
return node;
}

View File

@@ -0,0 +1,46 @@
#pragma once
#include <nan.h>
#include <v8-profiler.h>
#include <v8.h>
using namespace v8;
class EventNode {
public:
char *type;
char *script;
char *func;
int lineNumber;
EventNode *next;
~EventNode() {
free(this->type);
free(this->script);
free(this->func);
}
};
/**
* Implements a simple queue of code events that can be
* consumed.
*
* Thread-Safety: There's no locking on these methods so
* they aren't thread safe. However this should be OK
* as the expectation is these methods are only ever called
* from the main JS thread and they are blocking, there will
* only ever be a single thread calling it as a time. We
* may want to revisit this if we ever want to support
* handling events from worker_threads.
*/
class EventQueue {
public:
EventQueue();
~EventQueue();
void enqueue(CodeEvent *event);
EventNode *dequeue();
unsigned int length;
private:
EventNode *head;
EventNode *tail;
};

View File

@@ -0,0 +1,28 @@
#include "func-info.h"
using namespace v8;
NAN_METHOD(funcInfo) {
if (info.Length() < 1 || info[0].IsEmpty() || !info[0]->IsFunction()) {
info.GetReturnValue().Set(Nan::Null());
return;
}
Local<Function> fn = info[0].As<Function>();
Local<Object> obj = Nan::New<Object>();
Local<Value> resourceName = fn->GetScriptOrigin().ResourceName();
if (!resourceName.IsEmpty()) {
Nan::Set(obj, Nan::New("file").ToLocalChecked(), resourceName);
Nan::Set(obj,
Nan::New("lineNumber").ToLocalChecked(),
Nan::New(fn->GetScriptLineNumber()));
Nan::Set(obj, Nan::New("method").ToLocalChecked(), fn->GetName());
Nan::Set(obj,
Nan::New("column").ToLocalChecked(),
Nan::New(fn->GetScriptColumnNumber()));
}
info.GetReturnValue().Set(obj);
}

View File

@@ -0,0 +1,6 @@
#pragma once
#include <nan.h>
#include <v8.h>
NAN_METHOD(funcInfo);

View File

@@ -1,21 +0,0 @@
MIT License
Copyright (c) 2022 Sentry
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -1,73 +0,0 @@
<p align="center">
<a href="https://sentry.io/?utm_source=github&utm_medium=logo" target="_blank">
<img src="https://sentry-brand.storage.googleapis.com/sentry-wordmark-dark-280x84.png" alt="Sentry" width="280" height="84">
</a>
</p>
# Official Sentry Profiling SDK for NodeJS (alpha ⚠️)
[![npm version](https://img.shields.io/npm/v/@sentry/profiling-node.svg)](https://www.npmjs.com/package/@sentry/profiling-node)
[![npm dm](https://img.shields.io/npm/dm/@sentry/profiling-node.svg)](https://www.npmjs.com/package/@sentry/profiling-node)
[![npm dt](https://img.shields.io/npm/dt/@sentry/profiling-node.svg)](https://www.npmjs.com/package/@sentry/profiling-node)
## Usage 🔥
```javascript
import * as Sentry from '@sentry/node';
import '@sentry/tracing';
import { ProfilingIntegration } from '@sentry/profiling-node';
Sentry.init({
dsn: 'https://7fa19397baaf433f919fbe02228d5470@o1137848.ingest.sentry.io/6625302',
debug: true,
tracesSampleRate: 1,
profilesSampleRate: 1, // Set profiling sampling rate.
integrations: [new ProfilingIntegration()]
});
```
Sentry SDK will now automatically profile all transactions, even the ones which may be started as a result of using an automatic instrumentation integration.
```javascript
const transaction = Sentry.startTransaction({ name: 'I will do some work' });
// The code between startTransaction and transaction.finish will be profiled
transaction.finish();
```
### Environment flags flags
The default mode of the v8 CpuProfiler is kLazyLogging which disables logging when no profiles are active - this is good because it does not add any overhead to the runtime, but the tradeoff is that it results in slow calls to startProfiling (this can exceed couple hundred ms from our tests). You can switch to eager logging which decreases the startup cost for the tradeoff of CPU overhead. You can do so by defining a `SENTRY_PROFILER_LOGGING_MODE` environment variable `eager|lazy` before running your script.
Example of starting a server with eager logging mode.
```javascript
SENTRY_PROFILER_LOGGING_MODE=eager node server.js
```
## FAQ 💭
### When should I not use this package
The package is still in alpha stage and we discourage using it in production systems while extensive testing is done. There is a possibility that adding this package may crash your entire node process (even when imported only in worker threads). We would also advise caution if you want to profile high throughput operations as starting the profiler adds some performance overhead and while we do have micro benchmarks to measure overhead, we have yet to properly test this on production system.
### Can the profiler leak PII to Sentry?
The profiler does not collect function arguments so leaking any PII is unlikely unless. We only collect a subset of the values which may identify the device and os that the profiler is running on - this is a smaller subset of the values already collected by the @sentry/node SDK.
The only way to leak PII would be if you are executing code like
```js
eval('function scriptFor${CUSTOMER_NAME}....');
```
In that case it is possible that the function name may end up being reported to Sentry.
### Will starting the profiler on main thread automatically profile worker threads too?
No. All instances of the profiler are scoped per thread (v8 isolate). In practice, this means that starting a transaction on thread A and delegating work to thread B will only result in sample stacks being collected from thread A. That said, nothing should prevent you from starting a transaction on thread B concurrently which will result in two independant profiles being sent to the Sentry backend. We currently do not do any correlation between such transactions, but we would be open to exploring the possibilities. Please file an issue if you have suggestions or specific use-cases in mind.
### How much overhead will this profiler add?
From our initial benchmark, it seems that most of the overhead is incurred from a call to startProfiling when no profiles are currently started - this is likely due to the fact that we use [kLazyLogging](https://v8docs.nodesource.com/node-18.2/d2/dc3/namespacev8.html#a7d16026419ddeaa475afc767a935c4cc) as the default option when we initialize the CpuProfiler. In our initial tests when benchmarking a simple express server, profiled requests would incur a performance penalty in the range of ~10ms. It is important to note that while the overhead is added, the majority of it is spent in startProfiling call and it seems that very little of it is actually added to the code executed between start and stop profiling calls.

View File

@@ -1,12 +0,0 @@
{
"targets": [
{
"target_name": "sentry_cpu_profiler",
"sources": [ "bindings/cpu_profiler.cc" ],
"defines": ["PROFILER_FORMAT=FORMAT_SAMPLED"],
'include_dirs': [
'<!(node -e "require(\'nan\')")'
]
},
]
}

View File

@@ -1,326 +0,0 @@
#include <unordered_map>
#include "nan.h"
#include "node.h"
#include "v8-profiler.h"
#define FORMAT_SAMPLED 2
#define FORMAT_RAW 1
#ifndef PROFILER_FORMAT
#define PROFILER_FORMAT FORMAT_SAMPLED
#endif
#ifndef FORMAT_BENCHMARK
#define FORMAT_BENCHMARK 0
#endif
// Isolate represents an instance of the v8 engine and can be entered at most by 1 thread at a
// given time. The Profiler is a context aware class that is bound to an isolate.
static const uint8_t MAX_STACK_DEPTH = 128;
static const float SAMPLING_FREQUENCY = 99.0; // 99 to avoid lockstep sampling
static const float SAMPLING_HZ = 1 / SAMPLING_FREQUENCY;
static const int SAMPLING_INTERVAL_US = static_cast<int>(SAMPLING_HZ * 1e6);
static const v8::CpuProfilingNamingMode NAMING_MODE = v8::CpuProfilingNamingMode::kDebugNaming;
v8::CpuProfilingLoggingMode LOGGING_MODE = v8::CpuProfilingLoggingMode::kLazyLogging;
// Allow users to override the default logging mode via env variable. This is useful
// because sometimes the flow of the profiled program can be to execute many sequential
// transaction - in that case, it may be preferable to set eager logging to avoid paying the
// high cost of profiling for each individual transaction (one example for this are jest
// tests when run with --runInBand option).
v8::CpuProfilingLoggingMode getLoggingMode(){
char* logging_mode = getenv("SENTRY_PROFILER_LOGGING_MODE");
if(logging_mode){
if(std::strcmp(logging_mode, "eager") == 0) {
return v8::CpuProfilingLoggingMode::kEagerLogging;
} if(std::strcmp(logging_mode, "lazy") == 0) {
return v8::CpuProfilingLoggingMode::kLazyLogging;
}
}
return LOGGING_MODE;
}
class Profiler {
public:
explicit Profiler(v8::Isolate* isolate):
cpu_profiler(
v8::CpuProfiler::New(isolate, NAMING_MODE, getLoggingMode())) {
node::AddEnvironmentCleanupHook(isolate, DeleteInstance, this);
}
v8::CpuProfiler* cpu_profiler;
static void DeleteInstance(void* data) {
Profiler* profiler = static_cast<Profiler*>(data);
profiler->cpu_profiler->Dispose();
delete profiler;
}
};
#if PROFILER_FORMAT == FORMAT_RAW || FORMAT_BENCHMARK == 1
v8::Local<v8::Object> CreateFrameGraphNode(
v8::Local<v8::String> name, v8::Local<v8::String> scriptName,
v8::Local<v8::Integer> scriptId, v8::Local<v8::Integer> lineNumber,
v8::Local<v8::Integer> columnNumber, v8::Local<v8::Integer> hitCount,
v8::Local<v8::Array> children) {
v8::Local<v8::Object> js_node = Nan::New<v8::Object>();
Nan::Set(js_node, Nan::New<v8::String>("name").ToLocalChecked(), name);
Nan::Set(js_node, Nan::New<v8::String>("file").ToLocalChecked(), scriptName);
Nan::Set(js_node, Nan::New<v8::String>("script_id").ToLocalChecked(), scriptId);
Nan::Set(js_node, Nan::New<v8::String>("line_number").ToLocalChecked(), lineNumber);
Nan::Set(js_node, Nan::New<v8::String>("column_number").ToLocalChecked(), columnNumber);
Nan::Set(js_node, Nan::New<v8::String>("hit_count").ToLocalChecked(), hitCount);
Nan::Set(js_node, Nan::New<v8::String>("children").ToLocalChecked(), children);
return js_node;
};
v8::Local<v8::Value> CreateFrameGraph(const CpuProfileNode* node) {
int32_t count = node->GetChildrenCount();
v8::Local<v8::Array> children = Nan::New<v8::Array>(count);
for (int32_t i = 0; i < count; i++) {
Nan::Set(children, i, CreateFrameGraph(node->GetChild(i)));
}
return CreateFrameGraphNode(
node->GetFunctionName(),
node->GetScriptResourceName(),
Nan::New<Integer>(node->GetScriptId()),
Nan::New<Integer>(node->GetLineNumber()),
Nan::New<Integer>(node->GetColumnNumber()),
Nan::New<Integer>(node->GetHitCount()),
children
);
};
#endif
#if PROFILER_FORMAT == FORMAT_SAMPLED || FORMAT_BENCHMARK == 1
v8::Local<v8::Object> CreateFrameNode(
v8::Local<v8::String> name, v8::Local<v8::String> scriptName, v8::Local<v8::Integer> line,
v8::Local<v8::Integer> column, std::vector<v8::CpuProfileDeoptInfo> deoptInfos) {
v8::Local<v8::Object> js_node = Nan::New<v8::Object>();
Nan::Set(js_node, Nan::New<v8::String>("name").ToLocalChecked(), name);
Nan::Set(js_node, Nan::New<v8::String>("file").ToLocalChecked(), scriptName);
Nan::Set(js_node, Nan::New<v8::String>("line").ToLocalChecked(), line);
Nan::Set(js_node, Nan::New<v8::String>("column").ToLocalChecked(), column);
// @TODO Deopt info needs to be added to backend
// size_t size = deoptInfos.size();
// if(size > 0) {
// v8::Local<v8::Array> deoptReasons = Nan::New<v8::Array>(size);
// for(size_t i = 0; i < size; i++) {
// Nan::Set(deoptReasons, i, Nan::New<v8::String>(deoptInfos[i].deopt_reason).ToLocalChecked());
// }
// Nan::Set(js_node, Nan::New<v8::String>("deopt_reasons").ToLocalChecked(), deoptReasons);
// };
return js_node;
};
v8::Local<v8::Object> CreateSample(uint32_t stack_id, int64_t sample_timestamp_us, uint32_t thread_id) {
v8::Local<v8::Object> js_node = Nan::New<v8::Object>();
Nan::Set(js_node, Nan::New<v8::String>("stack_id").ToLocalChecked(), Nan::New<v8::Number>(stack_id));
Nan::Set(js_node, Nan::New<v8::String>("thread_id").ToLocalChecked(), Nan::New<v8::String>(std::to_string(thread_id)).ToLocalChecked());
Nan::Set(js_node, Nan::New<v8::String>("elapsed_since_start_ns").ToLocalChecked(), Nan::New<v8::Number>(sample_timestamp_us * 1000));
return js_node;
};
std::string hashCpuProfilerNodeByPath(const v8::CpuProfileNode* node) {
std::string path = std::string();
std::string delimiter = std::string(";");
while (node != nullptr) {
path += std::to_string(node->GetNodeId());
path += delimiter;
node = node->GetParent();
}
return path;
}
std::tuple <v8::Local<v8::Value>, v8::Local<v8::Value>, v8::Local<v8::Value>> GetSamples(const v8::CpuProfile* profile, uint32_t thread_id) {
const int64_t profile_start_time_us = profile->GetStartTime();
const int sampleCount = profile->GetSamplesCount();
uint32_t unique_stack_id = 0;
uint32_t unique_frame_id = 0;
// Initialize the lookup tables for stacks and frames, both of these are indexed
// in the sample format we are using to optimize for size.
std::unordered_map<uint32_t, uint32_t> frame_lookup_table;
std::unordered_map<std::string, int> stack_lookup_table;
v8::Local<v8::Array> samples = Nan::New<v8::Array>(sampleCount);
v8::Local<v8::Array> stacks = Nan::New<v8::Array>();
v8::Local<v8::Array> frames = Nan::New<v8::Array>();
for (int i = 0; i < sampleCount; i++) {
uint32_t stack_index = unique_stack_id;
const v8::CpuProfileNode* node = profile->GetSample(i);
// If a node was only on top of the stack once, then it will only ever
// be inserted once and there is no need for hashing.
if (node->GetHitCount() > 1) {
std::string node_hash = hashCpuProfilerNodeByPath(node);
std::unordered_map<std::string, int>::iterator stack_index_cache_hit = stack_lookup_table.find(node_hash);
// If we have a hit, update the stack index, otherwise
// insert it into the hash table and continue.
if (stack_index_cache_hit != stack_lookup_table.end()) {
stack_index = stack_index_cache_hit->second;
}
else {
stack_lookup_table.insert({ node_hash, stack_index });
}
}
const v8::Local<v8::Value> sample = CreateSample(stack_index, profile->GetSampleTimestamp(i) - profile_start_time_us, thread_id);
// If stack index differs from the sample index that means the stack had been indexed.
if (stack_index != unique_stack_id) {
Nan::Set(samples, i, sample);
continue;
}
// A stack is a list of frames ordered from outermost (top) to innermost frame (bottom)
v8::Local<v8::Array> stack = Nan::New<v8::Array>();
uint32_t stack_depth = 0;
while (node != nullptr && stack_depth < MAX_STACK_DEPTH) {
const uint32_t nodeId = node->GetNodeId();
auto frame_index = frame_lookup_table.find(nodeId);
// If the frame does not exist in the index
if (frame_index == frame_lookup_table.end()) {
frame_lookup_table.insert({ nodeId, unique_frame_id });
Nan::Set(stack, stack_depth, Nan::New<v8::Number>(unique_frame_id));
Nan::Set(frames, unique_frame_id, CreateFrameNode(
node->GetFunctionName(),
node->GetScriptResourceName(),
Nan::New<v8::Integer>(node->GetLineNumber()),
Nan::New<v8::Integer>(node->GetColumnNumber()),
node->GetDeoptInfos()
));
unique_frame_id++;
}
else {
// If it was already indexed, just add it's id to the stack
Nan::Set(stack, stack_depth, Nan::New<v8::Number>(frame_index->second));
};
// Continue walking down the stack
node = node->GetParent();
stack_depth++;
}
Nan::Set(stacks, stack_index, stack);
Nan::Set(samples, i, sample);
unique_stack_id++;
};
return std::make_tuple(stacks, samples, frames);
};
#endif
v8::Local<v8::Value> CreateProfile(const v8::CpuProfile* profile, uint32_t thread_id) {
v8::Local<v8::Object> js_profile = Nan::New<v8::Object>();
Nan::Set(js_profile, Nan::New<v8::String>("profile_relative_started_at_ns").ToLocalChecked(), Nan::New<v8::Number>(profile->GetStartTime() * 1000));
Nan::Set(js_profile, Nan::New<v8::String>("profile_relative_ended_at_ns").ToLocalChecked(), Nan::New<v8::Number>(profile->GetEndTime() * 1000));
Nan::Set(js_profile, Nan::New<v8::String>("profiler_logging_mode").ToLocalChecked(), Nan::New<v8::String>(getLoggingMode() == v8::CpuProfilingLoggingMode::kEagerLogging ? "eager" : "lazy").ToLocalChecked());
#if PROFILER_FORMAT == FORMAT_SAMPLED || FORMAT_BENCHMARK == 1
std::tuple<v8::Local<v8::Value>, v8::Local<v8::Value>, v8::Local<v8::Value>> samples = GetSamples(profile, thread_id);
Nan::Set(js_profile, Nan::New<v8::String>("stacks").ToLocalChecked(), std::get<0>(samples));
Nan::Set(js_profile, Nan::New<v8::String>("samples").ToLocalChecked(), std::get<1>(samples));
Nan::Set(js_profile, Nan::New<v8::String>("frames").ToLocalChecked(), std::get<2>(samples));
#endif
#if PROFILER_FORMAT == FORMAT_RAW || FORMAT_BENCHMARK == 1
Nan::Set(js_profile, Nan::New<v8::String>("top_down_root").ToLocalChecked(), CreateFrameGraph(profile->GetTopDownRoot()));
#endif
return js_profile;
};
// StartProfiling(string title)
// https://v8docs.nodesource.com/node-18.2/d2/d34/classv8_1_1_cpu_profiler.html#aedf6a5ca49432ab665bc3a1ccf46cca4
static void StartProfiling(const v8::FunctionCallbackInfo<v8::Value>& args) {
if (args[0].IsEmpty()) {
return Nan::ThrowError("StartProfiling expects a string as first argument.");
};
if (!args[0]->IsString()) {
return Nan::ThrowError("StartProfiling requires a string as the first argument.");
};
v8::Local<v8::String> title = Nan::To<v8::String>(args[0]).ToLocalChecked();
v8::CpuProfilingOptions options = v8::CpuProfilingOptions{
v8::CpuProfilingMode::kCallerLineNumbers, v8::CpuProfilingOptions::kNoSampleLimit,
SAMPLING_INTERVAL_US };
Profiler* profiler = reinterpret_cast<Profiler*>(args.Data().As<v8::External>()->Value());
profiler->cpu_profiler->StartProfiling(title, options);
};
// StopProfiling(string title)
// https://v8docs.nodesource.com/node-18.2/d2/d34/classv8_1_1_cpu_profiler.html#a40ca4c8a8aa4c9233aa2a2706457cc80
static void StopProfiling(const v8::FunctionCallbackInfo<v8::Value>& args) {
if (args[0].IsEmpty()) {
return Nan::ThrowError("StopProfiling expects a string as first argument.");
};
if (!args[0]->IsString()) {
return Nan::ThrowError("StopProfiling expects a string as first argument.");
};
if (args[1].IsEmpty()) {
return Nan::ThrowError("StopProfiling expects a number as second argument.");
};
if (!args[1]->IsNumber()) {
return Nan::ThrowError("StopProfiling expects a thread_id of type number as second argument.");
};
Profiler* profiler = reinterpret_cast<Profiler*>(args.Data().As<v8::External>()->Value());
v8::CpuProfile* profile = profiler->cpu_profiler->StopProfiling(Nan::To<v8::String>(args[0]).ToLocalChecked());
// If for some reason stopProfiling was called with an invalid profile title or
// if that title had somehow been stopped already, profile will be null.
if (profile == nullptr) {
args.GetReturnValue().Set(Nan::Null());
return;
};
args.GetReturnValue().Set(CreateProfile(profile, Nan::To<uint32_t>(args[1]).FromJust()));
profile->Delete();
};
NODE_MODULE_INIT(/* exports, module, context */) {
v8::Isolate* isolate = context->GetIsolate();
Profiler* profiler = new Profiler(isolate);
v8::Local<v8::External> external = v8::External::New(isolate, profiler);
exports->Set(context,
Nan::New<v8::String>("startProfiling").ToLocalChecked(),
v8::FunctionTemplate::New(isolate, StartProfiling, external)->GetFunction(context).ToLocalChecked()).FromJust();
exports->Set(context,
Nan::New<v8::String>("stopProfiling").ToLocalChecked(),
v8::FunctionTemplate::New(isolate, StopProfiling, external)->GetFunction(context).ToLocalChecked()).FromJust();
}

View File

@@ -1,43 +0,0 @@
export declare function importCppBindingsModule(): PrivateV8CpuProfilerBindings;
interface Sample {
stack_id: number;
thread_id: string;
elapsed_since_start_ns: string;
}
declare type Stack = number[];
declare type Frame = {
function: string;
file: string;
line: number;
column: number;
};
export interface RawThreadCpuProfile {
stacks: Stack[];
samples: Sample[];
frames: Frame[];
profile_relative_started_at_ns: number;
profile_relative_ended_at_ns: number;
profiler_logging_mode: 'eager' | 'lazy';
}
export interface ThreadCpuProfile {
samples: Sample[];
stacks: Stack[];
frames: Frame[];
thread_metadata: Record<string, {
name?: string;
priority?: number;
}>;
queue_metadata?: Record<string, {
label: string;
}>;
}
interface PrivateV8CpuProfilerBindings {
startProfiling(name: string): void;
stopProfiling(name: string, threadId: number): RawThreadCpuProfile | null;
}
interface V8CpuProfilerBindings {
startProfiling(name: string): void;
stopProfiling(name: string): RawThreadCpuProfile | null;
}
declare const CpuProfilerBindings: V8CpuProfilerBindings;
export { CpuProfilerBindings };

View File

@@ -1,25 +0,0 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CpuProfilerBindings = exports.importCppBindingsModule = void 0;
const os_1 = __importDefault(require("os"));
const path_1 = __importDefault(require("path"));
const node_abi_1 = __importDefault(require("node-abi"));
const worker_threads_1 = require("worker_threads");
function importCppBindingsModule() {
const name = `sentry_cpu_profiler-v${node_abi_1.default.getAbi(process.versions.node, 'node')}-${os_1.default.platform()}-${os_1.default.arch()}.node`;
return require(path_1.default.join(__dirname, '..', 'binaries', name));
}
exports.importCppBindingsModule = importCppBindingsModule;
const privateBindings = importCppBindingsModule();
const CpuProfilerBindings = {
startProfiling(name) {
return privateBindings.startProfiling(name);
},
stopProfiling(name) {
return privateBindings.stopProfiling(name, worker_threads_1.threadId);
}
};
exports.CpuProfilerBindings = CpuProfilerBindings;

View File

@@ -1,6 +0,0 @@
/**
* Figures out if we're building with debug functionality.
*
* @returns true if this is a debug build
*/
export declare function isDebugBuild(): boolean;

View File

@@ -1,20 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isDebugBuild = void 0;
/**
* This module exists for optimizations in the build process through rollup and terser. We define some global
* constants, which can be overridden during build. By guarding certain pieces of code with functions that return these
* constants, we can control whether or not they appear in the final bundle. (Any code guarded by a false condition will
* never run, and will hence be dropped during treeshaking.) The two primary uses for this are stripping out calls to
* `logger` and preventing node-related code from appearing in browser bundles.
*/
const __SENTRY_DEBUG__ = true;
/**
* Figures out if we're building with debug functionality.
*
* @returns true if this is a debug build
*/
function isDebugBuild() {
return __SENTRY_DEBUG__;
}
exports.isDebugBuild = isDebugBuild;

View File

@@ -1,8 +0,0 @@
import type { Hub, TransactionContext, CustomSamplingContext, Transaction } from '@sentry/types';
declare type StartTransaction = (this: Hub, transactionContext: TransactionContext, customSamplingContext?: CustomSamplingContext) => Transaction;
export declare function __PRIVATE__wrapStartTransactionWithProfiling(startTransaction: StartTransaction): StartTransaction;
/**
* This patches the global object and injects the Profiling extensions methods
*/
export declare function addExtensionMethods(): void;
export {};

View File

@@ -1,126 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.addExtensionMethods = exports.__PRIVATE__wrapStartTransactionWithProfiling = void 0;
const hub_1 = require("@sentry/hub");
const utils_1 = require("@sentry/utils");
const env_1 = require("./env");
const cpu_profiler_1 = require("./cpu_profiler");
const MAX_PROFILE_DURATION_MS = 30 * 1000;
// Wraps startTransaction and stopTransaction with profiling related logic.
// startProfiling is called after the call to startTransaction in order to avoid our own code from
// being profiled. Because of that same reason, stopProfiling is called before the call to stopTransaction.
function __PRIVATE__wrapStartTransactionWithProfiling(startTransaction) {
return function wrappedStartTransaction(transactionContext, customSamplingContext) {
var _a;
const client = this.getClient();
// @ts-expect-error profilesSampleRate is not part of the options type yet
const profilesSampleRate = (_a = client === null || client === void 0 ? void 0 : client.getOptions().profilesSampleRate) !== null && _a !== void 0 ? _a : undefined;
const transaction = startTransaction.call(this, transactionContext, customSamplingContext);
// We create "unique" transaction names to avoid concurrent transactions with same names
// from being ignored by the profiler. From here on, only this transaction name should be used when
// calling the profiler methods. Note: we log the original name to the user to avoid confusion.
const uniqueTransactionName = `${transactionContext.name} ${(0, utils_1.uuid4)()}`;
if (profilesSampleRate === undefined) {
if ((0, env_1.isDebugBuild)()) {
utils_1.logger.log('[Profiling] Profiling disabled, enable it by setting `profilesSampleRate` option to SDK init call.');
}
return transaction;
}
if (Math.random() > profilesSampleRate) {
if ((0, env_1.isDebugBuild)()) {
utils_1.logger.log('[Profiling] Skip profiling transaction due to sampling.');
}
return transaction;
}
// We need to reference the original finish call to avoid creating an infinite loop
const originalFinish = transaction.finish.bind(transaction);
cpu_profiler_1.CpuProfilerBindings.startProfiling(uniqueTransactionName);
if ((0, env_1.isDebugBuild)()) {
utils_1.logger.log('[Profiling] started profiling transaction: ' + transactionContext.name);
}
// A couple of important things to note here:
// `CpuProfilerBindings.stopProfiling` will be scheduled to run in 30seconds in order to exceed max profile duration.
// Whichever of the two (transaction.finish/timeout) is first to run, the profiling will be stopped and the gathered profile
// will be processed when the original transaction is finished. Since onProfileHandler can be invoked multiple times in the
// event of an error or user mistake (calling transaction.finish multiple times), it is important that the behavior of onProfileHandler
// is idempotent as we do not want any timings or profiles to be overriden by the last call to onProfileHandler.
// After the original finish method is called, the event will be reported through the integration and delegated to transport.
let profile = null;
function onProfileHandler() {
// Check if the profile exists and return it the behavior has to be idempotent as users may call transaction.finish multiple times.
if (profile) {
if ((0, env_1.isDebugBuild)()) {
utils_1.logger.log('[Profiling] profile for:', transactionContext.name, 'already exists, returning early');
}
return profile;
}
profile = cpu_profiler_1.CpuProfilerBindings.stopProfiling(uniqueTransactionName);
if (maxDurationTimeoutID) {
global.clearTimeout(maxDurationTimeoutID);
maxDurationTimeoutID = undefined;
}
if ((0, env_1.isDebugBuild)()) {
utils_1.logger.log('[Profiling] stopped profiling of transaction: ' + transactionContext.name);
}
// In case of an overlapping transaction, stopProfiling may return null and silently ignore the overlapping profile.
if (!profile) {
if ((0, env_1.isDebugBuild)()) {
utils_1.logger.log('[Profiling] profiler returned null profile for: ' + transactionContext.name, 'this may indicate an overlapping transaction or a call to stopProfiling with a profile title that was never started');
}
return null;
}
return profile;
}
// Enqueue a timeout to prevent profiles from running over max duration.
let maxDurationTimeoutID = global.setTimeout(() => {
if ((0, env_1.isDebugBuild)()) {
utils_1.logger.log('[Profiling] max profile duration elapsed, stopping profiling for:', transactionContext.name);
}
onProfileHandler();
}, MAX_PROFILE_DURATION_MS);
function profilingWrappedTransactionFinish() {
// onProfileHandler should always return the same profile even if this is called multiple times.
// Always call onProfileHandler to ensure stopProfiling is called and the timeout is cleared.
const profile = onProfileHandler();
// @ts-expect-error profile is not a part of sdk metadata so we expect error until it becomes part of the official SDK.
transaction.setMetadata({ profile });
return originalFinish();
}
transaction.finish = profilingWrappedTransactionFinish;
return transaction;
};
}
exports.__PRIVATE__wrapStartTransactionWithProfiling = __PRIVATE__wrapStartTransactionWithProfiling;
/**
* Patches startTransaction and stopTransaction with profiling logic.
* @private
*/
function _addProfilingExtensionMethods() {
const carrier = (0, hub_1.getMainCarrier)();
if (!carrier.__SENTRY__) {
if ((0, env_1.isDebugBuild)()) {
utils_1.logger.log("[Profiling] Can't find main carrier, profiling won't work.");
}
return;
}
carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {};
if (!carrier.__SENTRY__.extensions['startTransaction']) {
if ((0, env_1.isDebugBuild)()) {
utils_1.logger.log('[Profiling] startTransaction does not exists, profiling will not work. Make sure you import @sentry/tracing package before @sentry/profiling-node as import order matters.');
}
return;
}
if ((0, env_1.isDebugBuild)()) {
utils_1.logger.log('[Profiling] startTransaction exists, patching it with profiling functionality...');
}
carrier.__SENTRY__.extensions['startTransaction'] = __PRIVATE__wrapStartTransactionWithProfiling(
// This is already patched by sentry/tracing, we are going to re-patch it...
carrier.__SENTRY__.extensions['startTransaction']);
}
/**
* This patches the global object and injects the Profiling extensions methods
*/
function addExtensionMethods() {
_addProfilingExtensionMethods();
}
exports.addExtensionMethods = addExtensionMethods;

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