Compare commits

...

121 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
standardci
02705ea3ad chore(release): publish new version
- @standardnotes/analytics@2.19.0
2022-12-30 11:44:19 +00:00
Karol Sójko
df6e3f06a6 feat(analytics): add mixpanel events tracking 2022-12-30 12:41:42 +01:00
standardci
1cb5ee9fd6 chore(release): publish new version
- @standardnotes/analytics@2.18.0
2022-12-30 07:41:42 +00:00
Karol Sójko
893d6176c3 feat(analytics): add mixpanel 2022-12-30 08:39:19 +01:00
standardci
2c1b512e40 chore(release): publish new version
- @standardnotes/api-gateway@1.44.0
 - @standardnotes/auth-server@1.79.0
2022-12-29 12:57:00 +00:00
Karol Sójko
de50d76800 feat(auth): add removing authenticator 2022-12-29 13:55:08 +01:00
standardci
401b78e477 chore(release): publish new version
- @standardnotes/api-gateway@1.43.0
 - @standardnotes/auth-server@1.78.0
2022-12-29 12:39:51 +00:00
Karol Sójko
01837eaea9 feat(auth): add listing authenticators 2022-12-29 13:37:30 +01:00
standardci
7df699353c chore(release): publish new version
- @standardnotes/auth-server@1.77.1
2022-12-29 11:57:38 +00:00
Karol Sójko
5455972be2 fix(auth): specs for verifying authenticator authentication response 2022-12-29 12:55:43 +01:00
standardci
57488bcd16 chore(release): publish new version
- @standardnotes/api-gateway@1.42.0
 - @standardnotes/auth-server@1.77.0
2022-12-29 10:31:18 +00:00
Karol Sójko
b6fda901ef feat(auth): add http endpoints for authenticators 2022-12-29 11:29:23 +01:00
standardci
14669df890 chore(release): publish new version
- @standardnotes/auth-server@1.76.0
2022-12-29 08:43:05 +00:00
Karol Sójko
64525a65f2 feat(auth): add verifying authenticator authentication response 2022-12-29 09:41:10 +01:00
standardci
61fc7efecb chore(release): publish new version
- @standardnotes/auth-server@1.75.0
2022-12-29 07:47:43 +00:00
Karol Sójko
8c7c1e4745 feat(auth): add generating authenticator authentication options 2022-12-29 08:45:32 +01:00
standardci
f64d30ec88 chore(release): publish new version
- @standardnotes/auth-server@1.74.1
2022-12-28 15:18:15 +00:00
Karol Sójko
384dfc8da4 fix(auth): migrations to not include unique index for credentials id 2022-12-28 16:16:10 +01:00
standardci
841784ae8c chore(release): publish new version
- @standardnotes/auth-server@1.74.0
2022-12-28 14:53:11 +00:00
Karol Sójko
f5683cfd94 feat(auth): add verifying authenticator registration response 2022-12-28 15:50:48 +01:00
standardci
0a420ce30e chore(release): publish new version
- @standardnotes/auth-server@1.73.1
2022-12-28 13:12:37 +00:00
Karol Sójko
a5e7132d3c fix(auth): temporarily remove credential id index due to mysql 5.6 limitations 2022-12-28 14:10:40 +01:00
standardci
6dfb2be4a2 chore(release): publish new version
- @standardnotes/auth-server@1.73.0
2022-12-28 13:09:57 +00:00
Karol Sójko
d81cbad550 Merge pull request #381 from standardnotes/authenticator_registration
feat(auth): add generating authencator registration options
2022-12-28 14:08:02 +01:00
Karol Sójko
51ad06b303 feat(auth): add generating authencator registration options 2022-12-28 13:56:06 +01:00
standardci
27048ad95c chore(release): publish new version
- @standardnotes/auth-server@1.72.0
2022-12-28 11:42:03 +00:00
Karol Sójko
fa9bf0b448 feat(auth): add authenticator challenges model 2022-12-28 12:40:13 +01:00
standardci
305190b64e chore(release): publish new version
- @standardnotes/auth-server@1.71.1
2022-12-28 11:27:35 +00:00
Karol Sójko
98e3d18335 fix(auth): credential id field type 2022-12-28 12:25:36 +01:00
standardci
72e398956b chore(release): publish new version
- @standardnotes/auth-server@1.71.0
2022-12-28 10:39:38 +00:00
Karol Sójko
1e69a13a97 feat(auth): add authenticators model 2022-12-28 11:37:06 +01:00
standardci
7f9e6e2f44 chore(release): publish new version
- @standardnotes/analytics@2.17.8
 - @standardnotes/api-gateway@1.41.3
 - @standardnotes/auth-server@1.70.9
 - @standardnotes/files-server@1.9.3
 - @standardnotes/revisions-server@1.10.3
 - @standardnotes/scheduler-server@1.16.4
 - @standardnotes/syncing-server@1.28.3
 - @standardnotes/websockets-server@1.5.3
 - @standardnotes/workspace-server@1.19.4
2022-12-28 07:07:42 +00:00
Karol Sójko
d3c6c0d48e chore(upgrade): sentry deps 2022-12-28 08:05:42 +01:00
Karol Sójko
6c83476fd2 chore: workflow disptach name 2022-12-27 15:50:40 +01:00
Karol Sójko
9cdf7e2c51 Revert "feat: add workflow for tagging latest versions as stable"
This reverts commit a2c484e0f3.
2022-12-27 15:37:32 +01:00
Karol Sójko
599119e14e chore: move e2e test suite to self-hosted repo 2022-12-27 15:00:11 +01:00
Karol Sójko
a2c484e0f3 feat: add workflow for tagging latest versions as stable 2022-12-27 14:43:36 +01:00
standardci
97ff4d5ac2 chore(release): publish new version
- @standardnotes/auth-server@1.70.8
2022-12-20 20:24:56 +00:00
Karol Sójko
5255cfbb25 fix(auth): move tracing sessions to session creation instead of cross service token creation 2022-12-20 21:22:24 +01:00
standardci
780358368b chore(release): publish new version
- @standardnotes/auth-server@1.70.7
2022-12-20 19:55:43 +00:00
Karol Sójko
cf0b918913 fix(auth): change severity on tracing session errors - most probably hazardous reads 2022-12-20 20:53:26 +01:00
standardci
4ea690204e chore(release): publish new version
- @standardnotes/auth-server@1.70.6
2022-12-20 18:54:47 +00:00
Karol Sójko
14eb775749 fix(auth): query for session traces 2022-12-20 19:52:32 +01:00
standardci
bf4a3be6d9 chore(release): publish new version
- @standardnotes/auth-server@1.70.5
2022-12-20 18:48:19 +00:00
Karol Sójko
b9e1e47871 fix(auth): add session traces index 2022-12-20 19:46:05 +01:00
standardci
ff532ecb22 chore(release): publish new version
- @standardnotes/scheduler-server@1.16.3
2022-12-20 18:21:59 +00:00
Karol Sójko
eb21872db1 fix(scheduler): new pricing for subscription encouragement email 2022-12-20 19:19:59 +01:00
standardci
8e3df184dc chore(release): publish new version
- @standardnotes/analytics@2.17.7
2022-12-20 14:43:24 +00:00
Karol Sójko
b34bbcac8b fix(analytics): monthly numbers of active users 2022-12-20 15:41:03 +01:00
standardci
226965a1d7 chore(release): publish new version
- @standardnotes/analytics@2.17.6
2022-12-20 14:04:05 +00:00
Karol Sójko
17b2ea126c fix(analytics): filtered counts for user activity check 2022-12-20 15:02:09 +01:00
standardci
59fc4a089c chore(release): publish new version
- @standardnotes/analytics@2.17.5
2022-12-20 13:16:57 +00:00
Karol Sójko
ef26dc8cbb fix(analytics): accessing analytics in report 2022-12-20 14:13:54 +01:00
610 changed files with 6657 additions and 71751 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

@@ -190,9 +190,9 @@ jobs:
uses: convictional/trigger-workflow-and-wait@master
with:
owner: standardnotes
repo: e2e
repo: self-hosted
github_token: ${{ secrets.CI_PAT_TOKEN }}
workflow_file_name: testing-with-stable-client.yml
workflow_file_name: testing-with-updating-client-and-server.yml
wait_interval: 30
client_payload: '{"${{ inputs.e2e_tag_parameter_name }}": "${{ github.sha }}"}'
propagate_failure: true

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:

745
.pnp.cjs generated

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

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"
}
}

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