Compare commits

..

97 Commits

Author SHA1 Message Date
Mo
a6082a38b8 feat: delete outbound invites 2023-07-26 05:24:20 -05:00
Mo
2410f90fb6 new: return replacebility_identifier for asym messages 2023-07-21 15:07:19 -05:00
Mo
58daf930fb feat: revisions migration 2023-06-28 10:41:56 -05:00
Mo
7840c8f353 chore: remove unused endpoint 2023-06-28 09:17:54 -05:00
Mo
d5280648b5 fix: delete shared vault after deleting its users 2023-06-23 14:19:37 -05:00
Mo
c9e37f852c fix: include server item in some vault conflict types 2023-06-19 16:46:23 -05:00
Mo
c565e83ece refactor: remove specified items key id from shared vaults 2023-06-19 16:28:37 -05:00
Mo
74b94b4028 feat: replace existing invite before sending new 2023-06-16 14:06:20 -05:00
Mo
baa5ca92d4 feat: asymmetric message replaceability identifier 2023-06-12 10:32:23 -05:00
Mo
eef73c07db chore: build 2023-06-12 09:43:38 -05:00
Mo
a1e089b269 chore: lint 2023-06-12 08:29:35 -05:00
Mo
e2aea4d5c3 fix: asymmetric messages migration 2023-06-12 06:12:39 -05:00
Mo
315dea4620 chore: yarn 2023-06-12 05:10:09 -05:00
Mo
52a9913269 chore: lint 2023-06-11 21:15:55 -05:00
Mo
7d3235c514 refactor: remove sender public key from asymmetric messages 2023-06-11 16:04:13 -05:00
Mo
950af121cd feat: asymmetric messages 2023-06-07 11:19:16 -05:00
Mo
781e2a4685 refactor: remove invite type from vault invites 2023-06-07 10:55:06 -05:00
Mo
9610e47f78 refactor(wip): remove contacts model 2023-06-07 10:46:10 -05:00
Mo
f5ff7d9c97 feat: contact signing key 2023-06-07 06:48:48 -05:00
Mo
5bf9c4cff6 feat(wip): deterministic keypairs 2023-06-06 17:14:47 -05:00
Mo
d040429575 feat(wip): signing keypair 2023-06-06 13:27:31 -05:00
Mo
911d84d7c1 feat(wip): signing keypair 2023-06-05 16:22:59 -05:00
Mo
3a855ded95 chore: types 2023-06-05 15:43:26 -05:00
Mo
f5b6e943cb chore: add user event when vault is deleted 2023-06-04 16:14:49 -05:00
Mo
cad48d727a fix: types 2023-06-04 15:35:07 -05:00
Mo
ce900df132 refactor: remove key system identifier from shared vaults 2023-06-04 05:48:50 -05:00
Mo
97bcfb6ff2 fix: optional vault save operation 2023-06-03 17:25:28 -05:00
Mo
2fcfe05b04 refactor: remove removed shared vault user 2023-06-03 17:12:30 -05:00
Mo
f86740b295 feat(wip): user event syncing 2023-06-03 10:33:30 -05:00
Mo
f204454773 feat(wip): user events 2023-06-03 10:20:35 -05:00
Mo
19e14a88a7 refactor: shared vault filter 2023-06-03 06:54:54 -05:00
Mo
c077ad7037 refactor: rename groups to shared vaults 2023-06-02 20:12:36 -05:00
Mo
51e52ed9ff fix: group filter 2023-06-02 07:20:49 -05:00
Mo
dfa53647f3 chore: types 2023-06-01 15:11:16 -05:00
Mo
914fd1b26c chore: types 2023-06-01 09:28:14 -05:00
Mo
0b824a493d refactor: service dependencies 2023-06-01 08:58:29 -05:00
Mo
07ae120e2a refactor(wip): vault system identifier 2023-05-31 16:07:13 -05:00
Mo
9323ca79c6 refactor: rename vaults to groups 2023-05-31 11:42:36 -05:00
Mo
ed48350d3e feat: on the fly vault creation during sync 2023-05-31 09:01:26 -05:00
Mo
9953860a61 chore: remove unused permission 2023-05-31 08:12:36 -05:00
Mo
cc236c60ec fix: vault owner cannot delete own vault user 2023-05-30 17:30:04 -05:00
Mo
a56973e9cd feat: removed_vault_user model 2023-05-30 13:58:07 -05:00
Mo
706daa8f15 refactor: make item.userUuid non-null again 2023-05-30 09:56:46 -05:00
Mo
c752775a1c wip: vault sync filter 2023-05-30 08:18:01 -05:00
Mo
5bdbf54495 wip: vault files 2023-05-29 12:45:40 -05:00
Mo
9db1381ebf feat: vault files 2023-05-29 05:59:09 -05:00
Mo
94deab2ee0 refactor: vault files 2023-05-28 14:11:31 -05:00
Mo
690f18708a feat: created_by_uuid 2023-05-28 12:31:54 -05:00
Mo
4a87114f91 chore: lint 2023-05-28 11:09:15 -05:00
Mo
cd92f7827c refactor: rename groups to vaults 2023-05-28 10:30:10 -05:00
Mo
fc0f25e740 chore: permissions 2023-05-27 15:22:02 -05:00
Mo
f27f5c9b37 refactor: remove item links 2023-05-26 09:10:20 -05:00
Mo
86f57581df feat: group files 2023-05-26 09:00:46 -05:00
Mo
829bdf96ce feat: last edited by uuid 2023-05-25 14:01:32 -05:00
Mo
86dbfda80a fix: non admin user should be able to remove their own items from group 2023-05-25 09:25:19 -05:00
Mo
7854f6f9ec fix: item deletion 2023-05-25 04:57:58 -05:00
Mo
379fc2d39b feat: snjs version sync filter 2023-05-25 04:29:13 -05:00
Mo
1cadd8addf fix: patch user endpoint 2023-05-25 04:01:47 -05:00
Mo
a0127a6b9f wip: e2e tests 2023-05-24 06:59:10 -05:00
Mo
df818b757b fix: event handler 2023-05-23 11:32:20 -05:00
Mo
f874abab1e chore: lint 2023-05-23 08:54:54 -05:00
Mo
3be78dab85 wip: e2e tests 2023-05-23 06:05:25 -05:00
Mo
d5f15b85e6 chore: lint 2023-05-22 16:49:46 -05:00
Mo
6af3a2d9bc chore: lint 2023-05-22 11:53:51 -05:00
Mo
bb632cabd3 wip: e2e tests 2023-05-22 09:16:14 -05:00
Mo
5cf0617403 wip: e2e tests 2023-05-22 07:29:12 -05:00
Mo
42aa572375 chore: lint 2023-05-21 14:04:48 -05:00
Mo
27befd6c70 wip: group keys 2023-05-21 07:07:17 -05:00
Mo
16671c3f48 wip: set up invites 2023-05-20 07:27:13 -05:00
Mo
0bbefbf899 wip: add group invites model 2023-05-19 15:42:48 -05:00
Mo
1841c800e6 refactor: rename group user endpoints 2023-05-19 15:22:47 -05:00
Mo
e439830818 refactor: rename group user key to group user 2023-05-19 15:12:36 -05:00
Mo
c416ed6078 wip: default rotation 2023-05-19 12:59:28 -05:00
Mo
417b0257cf wip: e2e tests 2023-05-19 08:27:02 -05:00
Mo
50e95448f0 wip: e2e tests 2023-05-18 14:59:54 -05:00
Mo
ca24a6051b wip: meta response public key 2023-05-18 11:01:02 -05:00
Mo
c578e2742f wip: group deletion 2023-05-18 08:11:02 -05:00
Mo
6ad3d66007 wip: e2e tests 2023-05-17 14:39:03 -05:00
Mo
f6d80d89f4 wip: e2e tests 2023-05-17 11:37:36 -05:00
Mo
a01e35f2c2 wip: e2e tests 2023-05-17 08:09:31 -05:00
Mo
b5d40b2b70 wip: e2e tests 2023-05-17 05:57:05 -05:00
Mo
412827bb4f wip: proto complete 2023-05-16 15:13:08 -05:00
Mo
301ca6386f refactor: move user key factory out of directory due to ide issues with rename 2023-05-16 08:20:56 -05:00
Mo
245d809068 refactor: group user to group user key 2023-05-16 08:05:23 -05:00
Mo
ff030391a4 wip: usecases 2023-05-16 07:36:25 -05:00
Mo
8ffeae8642 wip: remove group_item entity in favor or item.group_uuid 2023-05-15 09:35:20 -05:00
Mo
6120591998 refactor: rename item shares to item links 2023-05-14 13:04:46 -05:00
Mo
d532e052d6 refactor: remove public key from share model 2023-05-14 06:34:30 -05:00
Mo
1de21a7ba9 refactor: better error handling 2023-05-13 08:32:07 -05:00
Mo
432c15ca94 feat: random share token 2023-05-12 10:34:43 -05:00
Mo
5ca7132c2d refactor: authentication 2023-05-12 10:28:18 -05:00
Mo
d97fb09517 fix: missing import 2023-05-12 06:28:59 -05:00
Mo
96420e9942 feat: share durations 2023-05-11 16:49:04 -05:00
Mo
297bfedf6a feat: file sharing 2023-05-11 08:11:45 -05:00
Mo
cb014a98cf fix: remove authentication for getting shared item 2023-05-10 13:28:01 -05:00
Mo
dbd0acab2c fix: functionality 2023-05-10 07:19:02 -05:00
Mo
add91d8c0c feat(wip): item shares 2023-05-10 05:40:22 -05:00
4806 changed files with 605469 additions and 58509 deletions

View File

@@ -15,7 +15,6 @@ DB_TYPE=mysql
REDIS_PORT=6379
REDIS_HOST=cache
CACHE_TYPE=redis
########
# KEYS #

6
.github/ci.env vendored
View File

@@ -4,14 +4,12 @@ DB_USERNAME=std_notes_user
DB_PASSWORD=changeme123
DB_DATABASE=standard_notes_db
DB_PORT=3306
DB_DEBUG_LEVEL=all
DB_SQLITE_DATABASE_PATH=standard_notes_db
REDIS_PORT=6379
REDIS_HOST=cache
AUTH_SERVER_ACCESS_TOKEN_AGE=4
AUTH_SERVER_REFRESH_TOKEN_AGE=10
AUTH_SERVER_EPHEMERAL_SESSION_AGE=300
SYNCING_SERVER_REVISIONS_FREQUENCY=2
SYNCING_SERVER_REVISIONS_FREQUENCY=5
AUTH_SERVER_LOG_LEVEL=debug
SYNCING_SERVER_LOG_LEVEL=debug
FILES_SERVER_LOG_LEVEL=debug
@@ -26,5 +24,3 @@ MYSQL_ROOT_PASSWORD=changeme123
AUTH_JWT_SECRET=f95259c5e441f5a4646d76422cfb3df4c4488842901aa50b6c51b8be2e0040e9
AUTH_SERVER_ENCRYPTION_SERVER_KEY=1087415dfde3093797f9a7ca93a49e7d7aa1861735eb0d32aae9c303b8c3d060
VALET_TOKEN_SECRET=4b886819ebe1e908077c6cae96311b48a8416bd60cc91c03060e15bdf6b30d1f
SYNCING_SERVER_CONTENT_SIZE_TRANSFER_LIMIT=1000000

View File

@@ -9,141 +9,91 @@ updates:
directory: "/"
schedule:
interval: "daily"
allow:
- dependency-type: "direct"
- package-ecosystem: "npm"
directory: "/packages/analytics"
schedule:
interval: "daily"
allow:
- dependency-type: "direct"
- package-ecosystem: "npm"
directory: "/packages/api-gateway"
schedule:
interval: "daily"
allow:
- dependency-type: "direct"
- package-ecosystem: "npm"
directory: "/packages/auth"
schedule:
interval: "daily"
allow:
- dependency-type: "direct"
- package-ecosystem: "npm"
directory: "/packages/common"
schedule:
interval: "daily"
allow:
- dependency-type: "direct"
- package-ecosystem: "npm"
directory: "/packages/domain-core"
schedule:
interval: "daily"
allow:
- dependency-type: "direct"
- package-ecosystem: "npm"
directory: "/packages/domain-events"
schedule:
interval: "daily"
allow:
- dependency-type: "direct"
- package-ecosystem: "npm"
directory: "/packages/domain-events-infra"
schedule:
interval: "daily"
allow:
- dependency-type: "direct"
- package-ecosystem: "npm"
directory: "/packages/event-store"
schedule:
interval: "daily"
allow:
- dependency-type: "direct"
- package-ecosystem: "npm"
directory: "/packages/files"
schedule:
interval: "daily"
allow:
- dependency-type: "direct"
- package-ecosystem: "npm"
directory: "/packages/home-server"
schedule:
interval: "daily"
allow:
- dependency-type: "direct"
- package-ecosystem: "npm"
directory: "/packages/predicates"
schedule:
interval: "daily"
allow:
- dependency-type: "direct"
- package-ecosystem: "npm"
directory: "/packages/revisions"
schedule:
interval: "daily"
allow:
- dependency-type: "direct"
- package-ecosystem: "npm"
directory: "/packages/scheduler"
schedule:
interval: "daily"
allow:
- dependency-type: "direct"
- package-ecosystem: "npm"
directory: "/packages/security"
schedule:
interval: "daily"
allow:
- dependency-type: "direct"
- package-ecosystem: "npm"
directory: "/packages/settings"
schedule:
interval: "daily"
allow:
- dependency-type: "direct"
- package-ecosystem: "npm"
directory: "/packages/sncrypto-node"
schedule:
interval: "daily"
allow:
- dependency-type: "direct"
- package-ecosystem: "npm"
directory: "/packages/syncing-server"
schedule:
interval: "daily"
allow:
- dependency-type: "direct"
- package-ecosystem: "npm"
directory: "/packages/time"
schedule:
interval: "daily"
allow:
- dependency-type: "direct"
- package-ecosystem: "npm"
directory: "/packages/websockets"
schedule:
interval: "daily"
allow:
- dependency-type: "direct"
- package-ecosystem: "github-actions"
directory: "/"

View File

@@ -20,3 +20,19 @@ jobs:
deploy_web: false
package_path: packages/analytics
secrets: inherit
newrelic:
needs: call_server_application_workflow
runs-on: ubuntu-latest
steps:
- name: Create New Relic deployment marker for Worker
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_ANALYTICS_WORKER_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"

View File

@@ -20,3 +20,17 @@ jobs:
deploy_worker: false
package_path: packages/api-gateway
secrets: inherit
newrelic:
needs: call_server_application_workflow
runs-on: ubuntu-latest
steps:
- name: Create New Relic deployment marker for Web
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_API_GATEWAY_WEB_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"

View File

@@ -19,3 +19,27 @@ jobs:
workspace_name: "@standardnotes/auth-server"
package_path: packages/auth
secrets: inherit
newrelic:
needs: call_server_application_workflow
runs-on: ubuntu-latest
steps:
- name: Create New Relic deployment marker for Web
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_AUTH_WEB_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"
- name: Create New Relic deployment marker for Worker
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_AUTH_WORKER_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"

View File

@@ -24,7 +24,7 @@ jobs:
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v3
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

View File

@@ -27,18 +27,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- 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
@@ -52,16 +57,20 @@ jobs:
- name: Build
if: steps.cache-build.outputs.cache-hit != 'true'
run: yarn build
run: yarn build ${{ inputs.package_path }}
- name: Bundle
if: steps.cache-build.outputs.cache-hit != 'true'
run: yarn workspace ${{ inputs.workspace_name }} bundle --no-compress --output-directory ${{ steps.bundle-dir.outputs.temp_dir }}
- name: Login to Docker Hub
uses: docker/login-action@v3
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v3
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@@ -69,7 +78,7 @@ jobs:
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
uses: aws-actions/amazon-ecr-login@v1
- name: Set up QEMU
uses: docker/setup-qemu-action@master
@@ -81,11 +90,11 @@ jobs:
uses: docker/setup-buildx-action@master
- name: Publish Docker image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v3
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ${{ inputs.package_path }}/Dockerfile
context: ${{ steps.bundle-dir.outputs.temp_dir }}
file: ${{ steps.bundle-dir.outputs.temp_dir }}/${{ inputs.package_path }}/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |

View File

@@ -7,20 +7,52 @@ on:
type: string
default: latest
description: The Docker image tag used for SNJS container
suite:
type: string
default: all
description: The test suite to run
secrets:
DOCKER_USERNAME:
required: true
DOCKER_PASSWORD:
required: true
AWS_ACCESS_KEY_ID:
required: true
AWS_SECRET_ACCESS_KEY:
required: true
jobs:
e2e-self-hosted:
uses: standardnotes/server/.github/workflows/e2e-self-hosted.yml@main
with:
snjs_image_tag: ${{ inputs.snjs_image_tag }}
suite: ${{ inputs.suite }}
e2e:
strategy:
matrix:
database: [ "mysql", "sqlite" ]
include:
- cache: "redis"
database: "mysql"
- cache: "memory"
database: "sqlite"
e2e-home-server:
uses: standardnotes/server/.github/workflows/e2e-home-server.yml@main
with:
snjs_image_tag: ${{ inputs.snjs_image_tag }}
suite: ${{ inputs.suite }}
runs-on: ubuntu-latest
services:
snjs:
image: standardnotes/snjs:${{ inputs.snjs_image_tag }}
ports:
- 9001:9001
steps:
- uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Run Server
run: docker compose -f docker-compose.ci.yml up -d
env:
DB_TYPE: ${{ matrix.database }}
CACHE_TYPE: ${{ matrix.cache }}
- name: Wait for server to start
run: docker/is-available.sh http://localhost:3123 $(pwd)/logs
- name: Run E2E Test Suite
run: yarn dlx mocha-headless-chrome --timeout 1200000 -f http://localhost:9001/mocha/test.html

View File

@@ -17,10 +17,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
@@ -35,7 +35,7 @@ jobs:
uses: docker/setup-buildx-action@master
- name: Publish Docker image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v3
with:
builder: ${{ steps.buildx.outputs.name }}
context: .

View File

@@ -1,105 +0,0 @@
name: E2E Home Server Test Suite
on:
workflow_call:
inputs:
snjs_image_tag:
type: string
default: latest
description: The Docker image tag used for SNJS container
suite:
type: string
default: all
description: The test suite to run
jobs:
e2e-home-server:
name: (Home Server) E2E Test Suite
strategy:
fail-fast: false
matrix:
db_type: [mysql, sqlite]
cache_type: [redis, memory]
runs-on: ubuntu-latest
services:
snjs:
image: standardnotes/snjs:${{ inputs.snjs_image_tag }}
ports:
- 9001:9001
cache:
image: redis
ports:
- 6379:6379
db:
image: mysql
ports:
- 3306:3306
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: standardnotes
MYSQL_USER: standardnotes
MYSQL_PASSWORD: standardnotes
steps:
- uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Install Dependencies
run: yarn install --immutable
- name: Build
run: yarn build
- name: Copy dotenv file
run: cp packages/home-server/.env.sample packages/home-server/.env
- name: Fill in env variables
run: |
sed -i "s/JWT_SECRET=/JWT_SECRET=$(openssl rand -hex 32)/g" packages/home-server/.env
sed -i "s/AUTH_JWT_SECRET=/AUTH_JWT_SECRET=$(openssl rand -hex 32)/g" packages/home-server/.env
sed -i "s/ENCRYPTION_SERVER_KEY=/ENCRYPTION_SERVER_KEY=$(openssl rand -hex 32)/g" packages/home-server/.env
sed -i "s/PSEUDO_KEY_PARAMS_KEY=/PSEUDO_KEY_PARAMS_KEY=$(openssl rand -hex 32)/g" packages/home-server/.env
sed -i "s/VALET_TOKEN_SECRET=/VALET_TOKEN_SECRET=$(openssl rand -hex 32)/g" packages/home-server/.env
echo "ACCESS_TOKEN_AGE=4" >> packages/home-server/.env
echo "REFRESH_TOKEN_AGE=10" >> packages/home-server/.env
echo "REVISIONS_FREQUENCY=2" >> packages/home-server/.env
echo "CONTENT_SIZE_TRANSFER_LIMIT=1000000" >> packages/home-server/.env
echo "DB_HOST=localhost" >> packages/home-server/.env
echo "DB_PORT=3306" >> packages/home-server/.env
echo "DB_DATABASE=standardnotes" >> packages/home-server/.env
echo "DB_SQLITE_DATABASE_PATH=homeserver.db" >> packages/home-server/.env
echo "DB_USERNAME=standardnotes" >> packages/home-server/.env
echo "DB_PASSWORD=standardnotes" >> packages/home-server/.env
echo "DB_TYPE=${{ matrix.db_type }}" >> packages/home-server/.env
echo "DB_DEBUG_LEVEL=all" >> packages/home-server/.env
echo "REDIS_URL=redis://localhost:6379" >> packages/home-server/.env
echo "CACHE_TYPE=${{ matrix.cache_type }}" >> packages/home-server/.env
echo "FILES_SERVER_URL=http://localhost:3123" >> packages/home-server/.env
echo "E2E_TESTING=true" >> packages/home-server/.env
- name: Run Server
run: nohup yarn workspace @standardnotes/home-server start > logs/output.log 2>&1 &
env:
PORT: 3123
- name: Wait for server to start
run: for i in {1..30}; do curl -s http://localhost:3123/healthcheck && break || sleep 1; done
- name: Run E2E Test Suite
run: yarn dlx mocha-headless-chrome --timeout 3600000 -f http://localhost:9001/mocha/test.html?suite=${{ inputs.suite }}
- name: Archive failed run logs
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: home-server-failure-logs-${{ inputs.suite }}-${{ matrix.db_type }}-${{ matrix.cache_type }}
retention-days: 5
path: |
logs/output.log

View File

@@ -1,60 +0,0 @@
name: E2E Self Hosted Test Suite
on:
workflow_call:
inputs:
snjs_image_tag:
type: string
default: latest
description: The Docker image tag used for SNJS container
suite:
type: string
default: all
description: The test suite to run
jobs:
e2e:
name: (Self Hosting) E2E Test Suite
strategy:
fail-fast: false
runs-on: ubuntu-latest
services:
snjs:
image: standardnotes/snjs:${{ inputs.snjs_image_tag }}
ports:
- 9001:9001
steps:
- uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Install
run: yarn install --immutable
- name: Run Server
run: docker compose -f docker-compose.ci.yml up -d
env:
DB_TYPE: mysql
CACHE_TYPE: redis
- name: Wait for server to start
run: docker/is-available.sh http://localhost:3123 $(pwd)/logs
- name: Run E2E Test Suite
run: yarn dlx mocha-headless-chrome --timeout 3600000 -f http://localhost:9001/mocha/test.html?suite=${{ inputs.suite }}
- name: Archive failed run logs
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: self-hosted-failure-logs-${{ inputs.suite }}
retention-days: 5
path: |
logs/*.err
logs/*.log

View File

@@ -1,6 +1,4 @@
name: E2E Test Suite
run-name: E2E ${{ inputs.suite }} Test Suite against ${{ inputs.ref_name }} by ${{ inputs.author }}
name: E2E Test Suite On Self Hosted Server
on:
schedule:
@@ -11,18 +9,6 @@ on:
type: string
default: latest
description: The Docker image tag used for SNJS container
suite:
type: string
default: all
description: The test suite to run
author:
type: string
default: unknown
description: The author that triggered the workflow
ref_name:
type: string
default: unknown
description: The ref name from which the workflow was triggered
jobs:
e2e:
@@ -30,4 +16,4 @@ jobs:
uses: standardnotes/server/.github/workflows/common-e2e.yml@main
with:
snjs_image_tag: ${{ inputs.snjs_image_tag || 'latest' }}
suite: ${{ inputs.suite || 'all' }}
secrets: inherit

View File

@@ -19,3 +19,27 @@ jobs:
workspace_name: "@standardnotes/files-server"
package_path: packages/files
secrets: inherit
newrelic:
needs: call_server_application_workflow
runs-on: ubuntu-latest
steps:
- name: Create New Relic deployment marker for Web
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_FILES_WEB_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"
- name: Create New Relic deployment marker for Worker
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_FILES_WORKER_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"

View File

@@ -9,7 +9,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
- name: Cache build
id: cache-build
@@ -25,9 +25,6 @@ jobs:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Install
run: yarn install
- name: Build
run: yarn build
@@ -37,7 +34,7 @@ jobs:
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
- name: Cache build
id: cache-build
@@ -53,9 +50,6 @@ jobs:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Install
run: yarn install
- name: Build
if: steps.cache-build.outputs.cache-hit != 'true'
run: yarn build
@@ -69,7 +63,7 @@ jobs:
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
- name: Cache build
id: cache-build
@@ -85,9 +79,6 @@ jobs:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Install
run: yarn install
- name: Build
if: steps.cache-build.outputs.cache-hit != 'true'
run: yarn build
@@ -95,18 +86,9 @@ jobs:
- name: Test
run: yarn test
e2e-base:
e2e:
needs: build
name: E2E Base Suite
uses: standardnotes/server/.github/workflows/common-e2e.yml@main
with:
snjs_image_tag: 'latest'
suite: 'base'
e2e-vaults:
needs: build
name: E2E Vaults Suite
name: E2E
uses: standardnotes/server/.github/workflows/common-e2e.yml@main
with:
snjs_image_tag: 'latest'
suite: 'vaults'
secrets: inherit

View File

@@ -9,7 +9,7 @@ jobs:
if: contains(github.event.head_commit.message, 'chore(release)') == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
- name: Cache build
id: cache-build
@@ -25,9 +25,6 @@ jobs:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Install
run: yarn install --immutable
- name: Build
run: yarn build
@@ -37,7 +34,7 @@ jobs:
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
- name: Cache build
id: cache-build
@@ -53,9 +50,6 @@ jobs:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Install
run: yarn install --immutable
- name: Build
if: steps.cache-build.outputs.cache-hit != 'true'
run: yarn build
@@ -69,7 +63,7 @@ jobs:
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
- name: Cache build
id: cache-build
@@ -85,9 +79,6 @@ jobs:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Install
run: yarn install --immutable
- name: Build
if: steps.cache-build.outputs.cache-hit != 'true'
run: yarn build
@@ -95,36 +86,26 @@ jobs:
- name: Test
run: yarn test
e2e-base:
e2e:
needs: build
name: E2E Base Suite
name: E2E
uses: standardnotes/server/.github/workflows/common-e2e.yml@main
with:
snjs_image_tag: 'latest'
suite: 'base'
e2e-vaults:
needs: build
name: E2E Vaults Suite
uses: standardnotes/server/.github/workflows/common-e2e.yml@main
with:
snjs_image_tag: 'latest'
suite: 'vaults'
secrets: inherit
publish-self-hosting:
needs: [ test, lint, e2e-base, e2e-vaults ]
needs: [ test, lint, e2e ]
name: Publish Self Hosting Docker Image
uses: standardnotes/server/.github/workflows/common-self-hosting.yml@main
secrets: inherit
publish-services:
needs: [ test, lint, e2e-base, e2e-vaults ]
needs: [ test, lint, e2e ]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v3
with:
token: ${{ secrets.CI_PAT_TOKEN }}
fetch-depth: 0
@@ -143,7 +124,7 @@ jobs:
git config --global user.email "ci@standardnotes.com"
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
@@ -156,9 +137,6 @@ jobs:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Install
run: yarn install --immutable
- name: Build
if: steps.cache-build.outputs.cache-hit != 'true'
run: yarn build

View File

@@ -19,3 +19,27 @@ jobs:
workspace_name: "@standardnotes/revisions-server"
package_path: packages/revisions
secrets: inherit
newrelic:
needs: call_server_application_workflow
runs-on: ubuntu-latest
steps:
- name: Create New Relic deployment marker for Web
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_REVISIONS_WEB_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"
- name: Create New Relic deployment marker for Worker
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_REVISIONS_WORKER_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"

View File

@@ -20,3 +20,19 @@ jobs:
deploy_web: false
package_path: packages/scheduler
secrets: inherit
newrelic:
needs: call_server_application_workflow
runs-on: ubuntu-latest
steps:
- name: Create New Relic deployment marker for Worker
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_SCHEDULER_WORKER_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"

View File

@@ -19,3 +19,27 @@ jobs:
workspace_name: "@standardnotes/syncing-server"
package_path: packages/syncing-server
secrets: inherit
newrelic:
needs: call_server_application_workflow
runs-on: ubuntu-latest
steps:
- name: Create New Relic deployment marker for Web
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_SYNCING_SERVER_WEB_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"
- name: Create New Relic deployment marker for Worker
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_SYNCING_SERVER_WORKER_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"

View File

@@ -19,3 +19,27 @@ jobs:
workspace_name: "@standardnotes/websockets-server"
package_path: packages/websockets
secrets: inherit
newrelic:
needs: call_server_application_workflow
runs-on: ubuntu-latest
steps:
- name: Create New Relic deployment marker for Web
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_WEBSOCKETS_WEB_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"
- name: Create New Relic deployment marker for Worker
uses: newrelic/deployment-marker-action@v1
with:
accountId: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
apiKey: ${{ secrets.NEW_RELIC_API_KEY }}
applicationId: ${{ secrets.NEW_RELIC_APPLICATION_ID_WEBSOCKETS_WORKER_PROD }}
revision: "${{ github.sha }}"
description: "Automated Deployment via Github Actions"
user: "${{ github.actor }}"

4
.gitignore vendored
View File

@@ -4,17 +4,17 @@
dist
coverage
.env
newrelic_agent.log
.yarn/*
!.yarn/cache
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/unplugged
!.yarn/sdks
!.yarn/versions
yarn.build-error.log
packages/files/uploads/*
!packages/files/uploads/.gitkeep

2
.nvmrc
View File

@@ -1 +1 @@
20.6.1
20.1.0

9854
.pnp.cjs generated

File diff suppressed because one or more lines are too long

100
.pnp.loader.mjs generated
View File

@@ -1,5 +1,5 @@
import fs from 'fs';
import { URL as URL$1, fileURLToPath, pathToFileURL } from 'url';
import fs from 'fs';
import path from 'path';
import moduleExports, { Module } from 'module';
import { createHash } from 'crypto';
@@ -89,6 +89,7 @@ async function copyPromise(destinationFs, destination, sourceFs, source, opts) {
}));
}
async function copyImpl(prelayout, postlayout, destinationFs, destination, sourceFs, source, opts) {
var _a, _b, _c;
const destinationStat = opts.didParentExist ? await maybeLStat(destinationFs, destination) : null;
const sourceStat = await sourceFs.lstatPromise(source);
const { atime, mtime } = opts.stableTime ? { atime: defaultTime, mtime: defaultTime } : sourceStat;
@@ -114,8 +115,8 @@ async function copyImpl(prelayout, postlayout, destinationFs, destination, sourc
throw new Error(`Unsupported file type (${sourceStat.mode})`);
}
}
if (opts.linkStrategy?.type !== `HardlinkFromIndex` || !sourceStat.isFile()) {
if (updated || destinationStat?.mtime?.getTime() !== mtime.getTime() || destinationStat?.atime?.getTime() !== atime.getTime()) {
if (((_a = opts.linkStrategy) == null ? void 0 : _a.type) !== `HardlinkFromIndex` || !sourceStat.isFile()) {
if (updated || ((_b = destinationStat == null ? void 0 : destinationStat.mtime) == null ? void 0 : _b.getTime()) !== mtime.getTime() || ((_c = destinationStat == null ? void 0 : destinationStat.atime) == null ? void 0 : _c.getTime()) !== atime.getTime()) {
postlayout.push(() => destinationFs.lutimesPromise(destination, atime, mtime));
updated = true;
}
@@ -185,7 +186,7 @@ async function copyFileViaIndex(prelayout, postlayout, destinationFs, destinatio
let indexStat = await maybeLStat(destinationFs, indexPath);
if (destinationStat) {
const isDestinationHardlinkedFromIndex = indexStat && destinationStat.dev === indexStat.dev && destinationStat.ino === indexStat.ino;
const isIndexModified = indexStat?.mtimeMs !== defaultTimeMs;
const isIndexModified = (indexStat == null ? void 0 : indexStat.mtimeMs) !== defaultTimeMs;
if (isDestinationHardlinkedFromIndex) {
if (isIndexModified && linkStrategy.autoRepair) {
atomicBehavior = 0 /* Lock */;
@@ -255,7 +256,8 @@ async function copyFileDirect(prelayout, postlayout, destinationFs, destination,
return true;
}
async function copyFile(prelayout, postlayout, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts) {
if (opts.linkStrategy?.type === `HardlinkFromIndex`) {
var _a;
if (((_a = opts.linkStrategy) == null ? void 0 : _a.type) === `HardlinkFromIndex`) {
return copyFileViaIndex(prelayout, postlayout, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts, opts.linkStrategy);
} else {
return copyFileDirect(prelayout, postlayout, destinationFs, destination, destinationStat, sourceFs, source, sourceStat, opts);
@@ -385,7 +387,7 @@ class FakeFS {
throw error;
}
}
createdDirectory ??= subPath;
createdDirectory ?? (createdDirectory = subPath);
if (chmod != null)
await this.chmodPromise(subPath, chmod);
if (utimes != null) {
@@ -416,7 +418,7 @@ class FakeFS {
throw error;
}
}
createdDirectory ??= subPath;
createdDirectory ?? (createdDirectory = subPath);
if (chmod != null)
this.chmodSync(subPath, chmod);
if (utimes != null) {
@@ -611,14 +613,12 @@ class FakeFS {
throw error;
}
}
async writeJsonPromise(p, data, { compact = false } = {}) {
const space = compact ? 0 : 2;
return await this.writeFilePromise(p, `${JSON.stringify(data, null, space)}
async writeJsonPromise(p, data) {
return await this.writeFilePromise(p, `${JSON.stringify(data, null, 2)}
`);
}
writeJsonSync(p, data, { compact = false } = {}) {
const space = compact ? 0 : 2;
return this.writeFileSync(p, `${JSON.stringify(data, null, space)}
writeJsonSync(p, data) {
return this.writeFileSync(p, `${JSON.stringify(data, null, 2)}
`);
}
async preserveTimePromise(p, cb) {
@@ -852,7 +852,7 @@ class ProxiedFS extends FakeFS {
readFileSync(p, encoding) {
return this.baseFs.readFileSync(this.fsMapToBase(p), encoding);
}
readdirPromise(p, opts) {
async readdirPromise(p, opts) {
return this.baseFs.readdirPromise(this.mapToBase(p), opts);
}
readdirSync(p, opts) {
@@ -932,24 +932,12 @@ class NodeFS extends BasePortableFakeFS {
this.realFs.opendir(npath.fromPortablePath(p), this.makeCallback(resolve, reject));
}
}).then((dir) => {
const dirWithFixedPath = dir;
Object.defineProperty(dirWithFixedPath, `path`, {
value: p,
configurable: true,
writable: true
});
return dirWithFixedPath;
return Object.defineProperty(dir, `path`, { value: p, configurable: true, writable: true });
});
}
opendirSync(p, opts) {
const dir = typeof opts !== `undefined` ? this.realFs.opendirSync(npath.fromPortablePath(p), opts) : this.realFs.opendirSync(npath.fromPortablePath(p));
const dirWithFixedPath = dir;
Object.defineProperty(dirWithFixedPath, `path`, {
value: p,
configurable: true,
writable: true
});
return dirWithFixedPath;
return Object.defineProperty(dir, `path`, { value: p, configurable: true, writable: true });
}
async readPromise(fd, buffer, offset = 0, length = 0, position = -1) {
return await new Promise((resolve, reject) => {
@@ -1227,16 +1215,16 @@ class NodeFS extends BasePortableFakeFS {
}
async readdirPromise(p, opts) {
return await new Promise((resolve, reject) => {
if (opts) {
this.realFs.readdir(npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject));
if (opts == null ? void 0 : opts.withFileTypes) {
this.realFs.readdir(npath.fromPortablePath(p), { withFileTypes: true }, this.makeCallback(resolve, reject));
} else {
this.realFs.readdir(npath.fromPortablePath(p), this.makeCallback((value) => resolve(value), reject));
}
});
}
readdirSync(p, opts) {
if (opts) {
return this.realFs.readdirSync(npath.fromPortablePath(p), opts);
if (opts == null ? void 0 : opts.withFileTypes) {
return this.realFs.readdirSync(npath.fromPortablePath(p), { withFileTypes: true });
} else {
return this.realFs.readdirSync(npath.fromPortablePath(p));
}
@@ -1371,6 +1359,9 @@ class VirtualFS extends ProxiedFS {
}
const [major, minor] = process.versions.node.split(`.`).map((value) => parseInt(value, 10));
const HAS_CONSOLIDATED_HOOKS = major > 16 || major === 16 && minor >= 12;
const HAS_UNFLAGGED_JSON_MODULES = major > 17 || major === 17 && minor >= 5 || major === 16 && minor >= 15;
const HAS_JSON_IMPORT_ASSERTION_REQUIREMENT = major > 17 || major === 17 && minor >= 1 || major === 16 && minor > 14;
const WATCH_MODE_MESSAGE_USES_ARRAYS = major > 19 || major === 19 && minor >= 2 || major === 18 && minor >= 13;
const HAS_LAZY_LOADED_TRANSLATORS = major > 19 || major === 19 && minor >= 3;
@@ -1436,7 +1427,11 @@ function getFileFormat(filepath) {
);
}
case `.json`: {
return `json`;
if (HAS_UNFLAGGED_JSON_MODULES)
return `json`;
throw new Error(
`Unknown file extension ".json" for ${filepath}`
);
}
case `.js`: {
const pkg = readPackageScope(filepath);
@@ -1457,15 +1452,38 @@ function getFileFormat(filepath) {
}
}
async function load$1(urlString, context, nextLoad) {
async function getFormat$1(resolved, context, defaultGetFormat) {
const url = tryParseURL(resolved);
if ((url == null ? void 0 : url.protocol) !== `file:`)
return defaultGetFormat(resolved, context, defaultGetFormat);
const format = getFileFormat(fileURLToPath(url));
if (format) {
return {
format
};
}
return defaultGetFormat(resolved, context, defaultGetFormat);
}
async function getSource$1(urlString, context, defaultGetSource) {
const url = tryParseURL(urlString);
if (url?.protocol !== `file:`)
if ((url == null ? void 0 : url.protocol) !== `file:`)
return defaultGetSource(urlString, context, defaultGetSource);
return {
source: await fs.promises.readFile(fileURLToPath(url), `utf8`)
};
}
async function load$1(urlString, context, nextLoad) {
var _a;
const url = tryParseURL(urlString);
if ((url == null ? void 0 : url.protocol) !== `file:`)
return nextLoad(urlString, context, nextLoad);
const filePath = fileURLToPath(url);
const format = getFileFormat(filePath);
if (!format)
return nextLoad(urlString, context, nextLoad);
if (format === `json` && context.importAssertions?.type !== `json`) {
if (HAS_JSON_IMPORT_ASSERTION_REQUIREMENT && format === `json` && ((_a = context.importAssertions) == null ? void 0 : _a.type) !== `json`) {
const err = new TypeError(`[ERR_IMPORT_ASSERTION_TYPE_MISSING]: Module "${urlString}" needs an import assertion of type "json"`);
err.code = `ERR_IMPORT_ASSERTION_TYPE_MISSING`;
throw err;
@@ -1482,7 +1500,7 @@ async function load$1(urlString, context, nextLoad) {
}
return {
format,
source: format === `commonjs` ? void 0 : await fs.promises.readFile(filePath, `utf8`),
source: await fs.promises.readFile(filePath, `utf8`),
shortCircuit: true
};
}
@@ -1973,7 +1991,7 @@ async function resolve$1(originalSpecifier, context, nextResolve) {
specifier = fileURLToPath(url);
}
const { parentURL, conditions = [] } = context;
const issuer = parentURL && tryParseURL(parentURL)?.protocol === `file:` ? fileURLToPath(parentURL) : process.cwd();
const issuer = parentURL ? fileURLToPath(parentURL) : process.cwd();
const pnpapi = findPnpApi(issuer) ?? (url ? findPnpApi(specifier) : null);
if (!pnpapi)
return nextResolve(originalSpecifier, context, nextResolve);
@@ -2050,6 +2068,8 @@ if (!HAS_LAZY_LOADED_TRANSLATORS) {
}
const resolve = resolve$1;
const load = load$1;
const getFormat = HAS_CONSOLIDATED_HOOKS ? void 0 : getFormat$1;
const getSource = HAS_CONSOLIDATED_HOOKS ? void 0 : getSource$1;
const load = HAS_CONSOLIDATED_HOOKS ? load$1 : void 0;
export { load, resolve };
export { getFormat, getSource, load, resolve };

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

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