mirror of
https://github.com/standardnotes/server
synced 2026-04-21 05:02:25 -04:00
Compare commits
419 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6dde9209af | |||
| 264fd4c36e | |||
| 4c0bc82090 | |||
| f3598fa5a1 | |||
| 8097d7239d | |||
| 7962b245b5 | |||
| ce0450becf | |||
| 0762ed1127 | |||
| 3563a0b64a | |||
| 0342cdcfc0 | |||
| b1cb6a1d21 | |||
| 615e4184f6 | |||
| 54091f23da | |||
| e4a8324db2 | |||
| 01bb55be39 | |||
| e551a364f6 | |||
| 7e65f85377 | |||
| e6a21606a3 | |||
| f275b48770 | |||
| de4fcf9a4c | |||
| a1455d281f | |||
| cfbe2bbac6 | |||
| 398c10ce4b | |||
| c7d21b092d | |||
| 031fa71e7d | |||
| 948e843ad6 | |||
| 7b0ea0a069 | |||
| 8887b6e642 | |||
| 597ff13393 | |||
| 4ab61b94a4 | |||
| e19652d62a | |||
| a341e78909 | |||
| 48e52ac48c | |||
| 6dbb87708f | |||
| d15d51eae6 | |||
| 0058368681 | |||
| 746c821698 | |||
| 3f2d8c902c | |||
| 3637db2563 | |||
| 8ac84c59af | |||
| a2b1323568 | |||
| d35391288d | |||
| d5c1b76de0 | |||
| 4600a49e88 | |||
| 96a2a67aa6 | |||
| bb380b5794 | |||
| 47004fd20a | |||
| c9bf024109 | |||
| 529795d393 | |||
| 79ae07623f | |||
| 6bdb524489 | |||
| 480693fb9f | |||
| e150930072 | |||
| edd92ef81a | |||
| 49cd5be352 | |||
| b1665779b5 | |||
| a82192db42 | |||
| 589b740f49 | |||
| 3c10de3e5d | |||
| 41a04062c9 | |||
| db9d10c302 | |||
| 5596d04040 | |||
| 341f69e301 | |||
| ef0464690b | |||
| 199ebeb4ea | |||
| c949670d4c | |||
| 9dcd583b58 | |||
| 097e320490 | |||
| c9bfda91f4 | |||
| 2d6a3ebf45 | |||
| d0d4bd23fb | |||
| edb0a768d0 | |||
| 4cc647ac07 | |||
| bcd1d830e6 | |||
| 2597324876 | |||
| 69b404f5d4 | |||
| e94b0d0b02 | |||
| ed1bf37287 | |||
| 3946f56261 | |||
| fc53dab007 | |||
| e836abdef7 | |||
| 826482b1f0 | |||
| 45bd00919c | |||
| 4e1bae6daf | |||
| 8f23c8ab3f | |||
| 4d32f26631 | |||
| c11abe1bd3 | |||
| 4d12566b0d | |||
| 2200dca69d | |||
| d41dd3bdda | |||
| c5c24b3ac9 | |||
| 462ade2145 | |||
| bfef16ce37 | |||
| aa4351c8e9 | |||
| 2dff6a2ed3 | |||
| 7808cc8ed2 | |||
| 5b84f078c6 | |||
| cf5f44a4a5 | |||
| ed05ea553f | |||
| 4418c38878 | |||
| 6391a01b57 | |||
| 9dbcec198d | |||
| 78fbeb595f | |||
| d894a87e87 | |||
| 4f62cac213 | |||
| ce081274da | |||
| fd997f4849 | |||
| 3ddd671c47 | |||
| c19de13cac | |||
| f65809ef30 | |||
| 2823ed8612 | |||
| 420bf9ec54 | |||
| 5f67e5efda | |||
| daed1a77a0 | |||
| b39eb09d91 | |||
| f6ec8626e5 | |||
| 97b12f2131 | |||
| 8e4e36513a | |||
| c8bf4ab3a0 | |||
| 3fa01a328b | |||
| 60686dcdbd | |||
| fddd17e531 | |||
| f99750169f | |||
| daad76d0dd | |||
| b3542e2fab | |||
| a9b1543e20 | |||
| e6d8e5c5f2 | |||
| c24353cc24 | |||
| 4855e1d5f5 | |||
| 5d3fb9a537 | |||
| b55d80a7cd | |||
| 16f92bdc99 | |||
| 4c5738416a | |||
| 45d4920e0f | |||
| 94e738532a | |||
| c4ae12d53f | |||
| 4ff78452f9 | |||
| 9465f2ecd8 | |||
| 93c2f1f12f | |||
| ca8a3fc77d | |||
| 00936e06bc | |||
| a6dea50d74 | |||
| 28b04e6a4a | |||
| d228a86f48 | |||
| 0cb234aa47 | |||
| 6b554c28b7 | |||
| 8a0accd8ea | |||
| d66ae62cf4 | |||
| b01d1c659d | |||
| 751f3b2547 | |||
| 11514e3836 | |||
| 71689c1497 | |||
| 2742075edc | |||
| 7f16232f8b | |||
| 0b0703e6d1 | |||
| 3e376c44e3 | |||
| bfe2d4bb4a | |||
| 7253a0a1d9 | |||
| f2c5810023 | |||
| 2e5b9105b8 | |||
| d14411d72e | |||
| 5226513b26 | |||
| 334449f8aa | |||
| 7f43d0c69d | |||
| 6f18276e7a | |||
| 9ff18a18a5 | |||
| 999e72fb1f | |||
| 4733e663a3 | |||
| b48eeb16c3 | |||
| 0aa2584e82 | |||
| eb8c704d84 | |||
| e93fa14703 | |||
| 16a6815b69 | |||
| b08e9731b8 | |||
| 9bd4fb2d79 | |||
| 647aeda1de | |||
| 78ff748d91 | |||
| 31f8cf1169 | |||
| 14bcf7b6c9 | |||
| 74adddd1e7 | |||
| 0e43bc0042 | |||
| b40d539611 | |||
| 654663d17f | |||
| 75830c3a98 | |||
| 1b5078eb96 | |||
| a5e019e290 | |||
| a812f3400a | |||
| 15af5635f0 | |||
| cee6d62791 | |||
| 6aee51bd45 | |||
| 599a84e634 | |||
| 1c3d19cca4 | |||
| 9986e8e7ce | |||
| e19f7a7b7f | |||
| d570146378 | |||
| 8a9e4370e5 | |||
| ce357679e9 | |||
| acab402747 | |||
| e385926046 | |||
| e9b8d0ceb7 | |||
| a2c1ebe675 | |||
| 3ef8e9ea24 | |||
| c99334889c | |||
| 7ce9aba517 | |||
| 46257a058b | |||
| 979dc35cfc | |||
| c99a447a04 | |||
| 6dd9fd5abd | |||
| 0d37cb293c | |||
| 27d04c95a1 | |||
| cd830cdf25 | |||
| 5b06ea94f9 | |||
| aba4f90485 | |||
| 350621ed52 | |||
| 69b4324c78 | |||
| b2be0a7c0b | |||
| cab0dfba39 | |||
| 296ca47d63 | |||
| 1cad18a681 | |||
| bdd052f90c | |||
| 32fe8d0a85 | |||
| 31338066ef | |||
| 07398169c8 | |||
| 1632c83217 | |||
| 0c29ff1ab4 | |||
| 2a8029ba02 | |||
| 337eae73c6 | |||
| 0a90502658 | |||
| 1246af2551 | |||
| e0b19ef011 | |||
| 63201934a5 | |||
| 4a6f90b95b | |||
| a747f4fc46 | |||
| b782cedc85 | |||
| 7435a7ebba | |||
| 48c6d97d69 | |||
| 9a45aeb3e6 | |||
| 72c9b28ebe | |||
| 9cf271a5f2 | |||
| 1d280028a6 | |||
| 5f24b59025 | |||
| 9169e2bf3f | |||
| 13467d52cf | |||
| af5ebb25e7 | |||
| 25a875cbbc | |||
| 78b13261bf | |||
| 6356fcaeed | |||
| 443235a861 | |||
| 95fccb0822 | |||
| 1fa476d1f9 | |||
| 88b888cd25 | |||
| e3eede72cf | |||
| efb341eb99 | |||
| dae7dc9541 | |||
| 29e573e9b5 | |||
| 3df14149f0 | |||
| 6ba1867781 | |||
| 1026ce383c | |||
| 2795cefc1b | |||
| 637593c1bc | |||
| 08f7c5447b | |||
| 051b6e3093 | |||
| 250c1f069b | |||
| 3e4a1e9645 | |||
| 4629580650 | |||
| c29f6b9c6f | |||
| 036317e333 | |||
| 4afe32650f | |||
| c021bb3d7c | |||
| 783fd9e2c6 | |||
| d789c67649 | |||
| 3ab29569db | |||
| 099c6e10c6 | |||
| 76ae6f5a88 | |||
| 9bd2b0c953 | |||
| 3fc07a5b60 | |||
| 94e18ab36b | |||
| 1c54d18c3c | |||
| d2efa73fd7 | |||
| b47c80cccd | |||
| b72e515931 | |||
| 65fcc657a7 | |||
| 65ced2cc7b | |||
| af17698334 | |||
| 5e930d08eb | |||
| 0c89d8bd2d | |||
| cb23506c1f | |||
| bf9072dbd4 | |||
| 6abdd73a31 | |||
| 421b5c5487 | |||
| 465530841f | |||
| 0057a5d6ff | |||
| b736dab3c1 | |||
| 951d965304 | |||
| 29e8de3238 | |||
| eeeacabaa8 | |||
| 51ca8229b8 | |||
| a6a19a391e | |||
| f6cdb7916c | |||
| eafb064d79 | |||
| ba050681f7 | |||
| 4780629549 | |||
| 79a44aa51f | |||
| dd72769841 | |||
| d8f1c66fd5 | |||
| afe9967d26 | |||
| 27bea444cc | |||
| 7a571dec0a | |||
| 8c57f505be | |||
| 973612bf4f | |||
| 702a1286eb | |||
| a45b5b69b5 | |||
| 321353f26c | |||
| db4607d4aa | |||
| f0531d68cb | |||
| 8a00d159a6 | |||
| d244cc0d5f | |||
| 6a2aa4b148 | |||
| 3ee49416f8 | |||
| ae1e86e19f | |||
| 9f76e389e2 | |||
| 6e2240e60c | |||
| cd37c951bb | |||
| c4c3dfb823 | |||
| c4b6f17ebc | |||
| 71ce938cb1 | |||
| dc76113915 | |||
| 6583ff6cd9 | |||
| 69ea947857 | |||
| eab78b3a95 | |||
| 3097f7f063 | |||
| 126989df82 | |||
| a25eb178c5 | |||
| 18dae26b8e | |||
| 5bc8157d4d | |||
| f29826e917 | |||
| ba7cbb989b | |||
| d4579ce21e | |||
| ed14d2dfb7 | |||
| 64f1fe59c2 | |||
| 207ef9f3e5 | |||
| 3ea0435459 | |||
| 7668713dd6 | |||
| f6bc1c3084 | |||
| 4203ff9a0c | |||
| 0281724196 | |||
| 94bd319279 | |||
| 373cfad1f7 | |||
| 59107f8553 | |||
| e066b6a126 | |||
| a0e4926135 | |||
| b1b244a2cf | |||
| b4a38d9dcc | |||
| 71e2a4187e | |||
| c94f9c1a60 | |||
| b9907924be | |||
| d4c188c096 | |||
| 2ccaf490df | |||
| cd893b41d7 | |||
| 3838358081 | |||
| 1a388f00c3 | |||
| bd71422fab | |||
| 3e1697f47f | |||
| 032cde7723 | |||
| 34b956b482 | |||
| 681e0378ae | |||
| 609e85f926 | |||
| e4ca310707 | |||
| d606493356 | |||
| 5ef6c5c14a | |||
| 0188f290f9 | |||
| 676cf36f8d | |||
| f8aef6c8ef | |||
| 5bf8cf49c1 | |||
| 51cd0a4dad | |||
| 1d06ffe9d5 | |||
| dbf532f55e | |||
| ca6dbc0053 | |||
| 1bb5980b45 | |||
| a02a28774b | |||
| 2d9b3578b6 | |||
| 3d5e747590 | |||
| 94467747ac | |||
| cebab59a02 | |||
| 09e1a892ca | |||
| 7b1eec21e5 | |||
| a58262d584 | |||
| a8f03e157b | |||
| a401962bcd | |||
| 9759814f63 | |||
| c7cf53722c | |||
| 8cb33dc906 | |||
| 1d73e4f072 | |||
| 0a0f82ea3d | |||
| f9b1f40ddf | |||
| 0562b0a621 | |||
| 15ed1fd789 | |||
| 5001496c7b | |||
| 0a1080ce2a | |||
| 4802d7e876 | |||
| bcd95cdbe9 | |||
| d50c4440c2 | |||
| 921c30f641 | |||
| 22540ee834 | |||
| 4f4443a882 | |||
| 80dbacf933 | |||
| dc77ff3e45 | |||
| 6515dcf487 | |||
| d0fd6b98df | |||
| 345efacb44 | |||
| d0dba1b66d | |||
| da119af8b2 | |||
| a5da42bddd | |||
| 12767237d2 | |||
| 230c96dcf1 | |||
| e2696fcd1a | |||
| a621cf1e3b | |||
| db35b9fcab | |||
| 880db1038a |
+2
-6
@@ -23,12 +23,8 @@ MYSQL_USER=std_notes_user
|
|||||||
MYSQL_PASSWORD=changeme123
|
MYSQL_PASSWORD=changeme123
|
||||||
MYSQL_ROOT_PASSWORD=changeme123
|
MYSQL_ROOT_PASSWORD=changeme123
|
||||||
|
|
||||||
MONGO_HOST=secondary_db
|
|
||||||
MONGO_PORT=27017
|
|
||||||
MONGO_USERNAME=standardnotes
|
|
||||||
MONGO_PASSWORD=standardnotes
|
|
||||||
MONGO_DATABASE=standardnotes
|
|
||||||
|
|
||||||
AUTH_JWT_SECRET=f95259c5e441f5a4646d76422cfb3df4c4488842901aa50b6c51b8be2e0040e9
|
AUTH_JWT_SECRET=f95259c5e441f5a4646d76422cfb3df4c4488842901aa50b6c51b8be2e0040e9
|
||||||
AUTH_SERVER_ENCRYPTION_SERVER_KEY=1087415dfde3093797f9a7ca93a49e7d7aa1861735eb0d32aae9c303b8c3d060
|
AUTH_SERVER_ENCRYPTION_SERVER_KEY=1087415dfde3093797f9a7ca93a49e7d7aa1861735eb0d32aae9c303b8c3d060
|
||||||
VALET_TOKEN_SECRET=4b886819ebe1e908077c6cae96311b48a8416bd60cc91c03060e15bdf6b30d1f
|
VALET_TOKEN_SECRET=4b886819ebe1e908077c6cae96311b48a8416bd60cc91c03060e15bdf6b30d1f
|
||||||
|
|
||||||
|
SYNCING_SERVER_CONTENT_SIZE_TRANSFER_LIMIT=1000000
|
||||||
|
|||||||
+38
-5
@@ -9,101 +9,134 @@ updates:
|
|||||||
directory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
|
allow:
|
||||||
|
- dependency-type: "direct"
|
||||||
|
|
||||||
- package-ecosystem: "npm"
|
- package-ecosystem: "npm"
|
||||||
directory: "/packages/analytics"
|
directory: "/packages/analytics"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
|
allow:
|
||||||
|
- dependency-type: "direct"
|
||||||
|
|
||||||
- package-ecosystem: "npm"
|
- package-ecosystem: "npm"
|
||||||
directory: "/packages/api-gateway"
|
directory: "/packages/api-gateway"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
|
allow:
|
||||||
|
- dependency-type: "direct"
|
||||||
|
|
||||||
- package-ecosystem: "npm"
|
- package-ecosystem: "npm"
|
||||||
directory: "/packages/auth"
|
directory: "/packages/auth"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
|
allow:
|
||||||
|
- dependency-type: "direct"
|
||||||
|
|
||||||
- package-ecosystem: "npm"
|
- package-ecosystem: "npm"
|
||||||
directory: "/packages/common"
|
directory: "/packages/common"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
|
allow:
|
||||||
|
- dependency-type: "direct"
|
||||||
|
|
||||||
- package-ecosystem: "npm"
|
- package-ecosystem: "npm"
|
||||||
directory: "/packages/domain-core"
|
directory: "/packages/domain-core"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
|
allow:
|
||||||
|
- dependency-type: "direct"
|
||||||
|
|
||||||
- package-ecosystem: "npm"
|
- package-ecosystem: "npm"
|
||||||
directory: "/packages/domain-events"
|
directory: "/packages/domain-events"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
|
allow:
|
||||||
|
- dependency-type: "direct"
|
||||||
|
|
||||||
- package-ecosystem: "npm"
|
- package-ecosystem: "npm"
|
||||||
directory: "/packages/domain-events-infra"
|
directory: "/packages/domain-events-infra"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
|
allow:
|
||||||
- package-ecosystem: "npm"
|
- dependency-type: "direct"
|
||||||
directory: "/packages/event-store"
|
|
||||||
schedule:
|
|
||||||
interval: "daily"
|
|
||||||
|
|
||||||
- package-ecosystem: "npm"
|
- package-ecosystem: "npm"
|
||||||
directory: "/packages/files"
|
directory: "/packages/files"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
|
allow:
|
||||||
|
- dependency-type: "direct"
|
||||||
|
|
||||||
- package-ecosystem: "npm"
|
- package-ecosystem: "npm"
|
||||||
directory: "/packages/home-server"
|
directory: "/packages/home-server"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
|
allow:
|
||||||
|
- dependency-type: "direct"
|
||||||
|
|
||||||
- package-ecosystem: "npm"
|
- package-ecosystem: "npm"
|
||||||
directory: "/packages/predicates"
|
directory: "/packages/predicates"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
|
allow:
|
||||||
|
- dependency-type: "direct"
|
||||||
|
|
||||||
- package-ecosystem: "npm"
|
- package-ecosystem: "npm"
|
||||||
directory: "/packages/revisions"
|
directory: "/packages/revisions"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
|
allow:
|
||||||
|
- dependency-type: "direct"
|
||||||
|
|
||||||
- package-ecosystem: "npm"
|
- package-ecosystem: "npm"
|
||||||
directory: "/packages/scheduler"
|
directory: "/packages/scheduler"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
|
allow:
|
||||||
|
- dependency-type: "direct"
|
||||||
|
|
||||||
- package-ecosystem: "npm"
|
- package-ecosystem: "npm"
|
||||||
directory: "/packages/security"
|
directory: "/packages/security"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
|
allow:
|
||||||
|
- dependency-type: "direct"
|
||||||
|
|
||||||
- package-ecosystem: "npm"
|
- package-ecosystem: "npm"
|
||||||
directory: "/packages/settings"
|
directory: "/packages/settings"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
|
allow:
|
||||||
|
- dependency-type: "direct"
|
||||||
|
|
||||||
- package-ecosystem: "npm"
|
- package-ecosystem: "npm"
|
||||||
directory: "/packages/sncrypto-node"
|
directory: "/packages/sncrypto-node"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
|
allow:
|
||||||
|
- dependency-type: "direct"
|
||||||
|
|
||||||
- package-ecosystem: "npm"
|
- package-ecosystem: "npm"
|
||||||
directory: "/packages/syncing-server"
|
directory: "/packages/syncing-server"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
|
allow:
|
||||||
|
- dependency-type: "direct"
|
||||||
|
|
||||||
- package-ecosystem: "npm"
|
- package-ecosystem: "npm"
|
||||||
directory: "/packages/time"
|
directory: "/packages/time"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
|
allow:
|
||||||
|
- dependency-type: "direct"
|
||||||
|
|
||||||
- package-ecosystem: "npm"
|
- package-ecosystem: "npm"
|
||||||
directory: "/packages/websockets"
|
directory: "/packages/websockets"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
|
allow:
|
||||||
|
- dependency-type: "direct"
|
||||||
|
|
||||||
- package-ecosystem: "github-actions"
|
- package-ecosystem: "github-actions"
|
||||||
directory: "/"
|
directory: "/"
|
||||||
|
|||||||
@@ -20,19 +20,3 @@ jobs:
|
|||||||
deploy_web: false
|
deploy_web: false
|
||||||
package_path: packages/analytics
|
package_path: packages/analytics
|
||||||
secrets: inherit
|
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 }}"
|
|
||||||
|
|||||||
@@ -20,17 +20,3 @@ jobs:
|
|||||||
deploy_worker: false
|
deploy_worker: false
|
||||||
package_path: packages/api-gateway
|
package_path: packages/api-gateway
|
||||||
secrets: inherit
|
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 }}"
|
|
||||||
|
|||||||
@@ -19,27 +19,3 @@ jobs:
|
|||||||
workspace_name: "@standardnotes/auth-server"
|
workspace_name: "@standardnotes/auth-server"
|
||||||
package_path: packages/auth
|
package_path: packages/auth
|
||||||
secrets: inherit
|
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 }}"
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
@@ -55,7 +55,7 @@ jobs:
|
|||||||
run: yarn build
|
run: yarn build
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
@@ -69,7 +69,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Login to Amazon ECR
|
- name: Login to Amazon ECR
|
||||||
id: login-ecr
|
id: login-ecr
|
||||||
uses: aws-actions/amazon-ecr-login@v1
|
uses: aws-actions/amazon-ecr-login@v2
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@master
|
uses: docker/setup-qemu-action@master
|
||||||
|
|||||||
@@ -7,164 +7,20 @@ on:
|
|||||||
type: string
|
type: string
|
||||||
default: latest
|
default: latest
|
||||||
description: The Docker image tag used for SNJS container
|
description: The Docker image tag used for SNJS container
|
||||||
secrets:
|
suite:
|
||||||
DOCKER_USERNAME:
|
type: string
|
||||||
required: true
|
default: all
|
||||||
DOCKER_PASSWORD:
|
description: The test suite to run
|
||||||
required: true
|
|
||||||
AWS_ACCESS_KEY_ID:
|
|
||||||
required: true
|
|
||||||
AWS_SECRET_ACCESS_KEY:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
e2e:
|
e2e-self-hosted:
|
||||||
name: (Self Hosting) E2E Test Suite
|
uses: standardnotes/server/.github/workflows/e2e-self-hosted.yml@main
|
||||||
strategy:
|
with:
|
||||||
fail-fast: false
|
snjs_image_tag: ${{ inputs.snjs_image_tag }}
|
||||||
matrix:
|
suite: ${{ inputs.suite }}
|
||||||
secondary_db_enabled: [true, false]
|
|
||||||
transition_mode_enabled: [true, false]
|
|
||||||
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: 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
|
|
||||||
SECONDARY_DB_ENABLED: ${{ matrix.secondary_db_enabled }}
|
|
||||||
TRANSITION_MODE_ENABLED: ${{ matrix.transition_mode_enabled }}
|
|
||||||
|
|
||||||
- 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
|
|
||||||
|
|
||||||
- name: Show logs on failure
|
|
||||||
if: ${{ failure() }}
|
|
||||||
run: |
|
|
||||||
echo "# Errors:"
|
|
||||||
tail -n 100 logs/*.err
|
|
||||||
echo "# Logs:"
|
|
||||||
tail -n 100 logs/*.log
|
|
||||||
|
|
||||||
e2e-home-server:
|
e2e-home-server:
|
||||||
name: (Home Server) E2E Test Suite
|
uses: standardnotes/server/.github/workflows/e2e-home-server.yml@main
|
||||||
strategy:
|
with:
|
||||||
fail-fast: false
|
snjs_image_tag: ${{ inputs.snjs_image_tag }}
|
||||||
matrix:
|
suite: ${{ inputs.suite }}
|
||||||
db_type: [mysql, sqlite]
|
|
||||||
cache_type: [redis, memory]
|
|
||||||
secondary_db_enabled: [true, false]
|
|
||||||
transition_mode_enabled: [true, false]
|
|
||||||
|
|
||||||
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
|
|
||||||
secondary_db:
|
|
||||||
image: mongo:5.0
|
|
||||||
ports:
|
|
||||||
- 27017:27017
|
|
||||||
env:
|
|
||||||
MONGO_INITDB_ROOT_USERNAME: standardnotes
|
|
||||||
MONGO_INITDB_ROOT_PASSWORD: standardnotes
|
|
||||||
MONGO_INITDB_DATABASE: standardnotes
|
|
||||||
|
|
||||||
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: 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 "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 "SECONDARY_DB_ENABLED=${{ matrix.secondary_db_enabled }}" >> packages/home-server/.env
|
|
||||||
echo "TRANSITION_MODE_ENABLED=${{ matrix.transition_mode_enabled }}" >> packages/home-server/.env
|
|
||||||
echo "MONGO_HOST=localhost" >> packages/home-server/.env
|
|
||||||
echo "MONGO_PORT=27017" >> packages/home-server/.env
|
|
||||||
echo "MONGO_DATABASE=standardnotes" >> packages/home-server/.env
|
|
||||||
echo "MONGO_USERNAME=standardnotes" >> packages/home-server/.env
|
|
||||||
echo "MONGO_PASSWORD=standardnotes" >> 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
|
|
||||||
|
|
||||||
- name: Show logs on failure
|
|
||||||
if: ${{ failure() }}
|
|
||||||
run: tail -n 500 logs/output.log
|
|
||||||
|
|||||||
@@ -17,10 +17,10 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|||||||
@@ -0,0 +1,105 @@
|
|||||||
|
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
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
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
|
||||||
|
matrix:
|
||||||
|
service_proxy_type: [http, grpc]
|
||||||
|
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
|
||||||
|
SERVICE_PROXY_TYPE: ${{ matrix.service_proxy_type }}
|
||||||
|
|
||||||
|
- name: Output Server Logs to File
|
||||||
|
run: docker compose -f docker-compose.ci.yml logs -f > logs/docker-compose.log 2>&1 &
|
||||||
|
env:
|
||||||
|
DB_TYPE: mysql
|
||||||
|
CACHE_TYPE: redis
|
||||||
|
SERVICE_PROXY_TYPE: ${{ matrix.service_proxy_type }}
|
||||||
|
|
||||||
|
- 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
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
name: E2E Test Suite On Self Hosted Server
|
name: E2E Test Suite
|
||||||
|
|
||||||
run-name: E2E Test Suite against ${{ inputs.ref_name }} by ${{ inputs.author }}
|
run-name: E2E ${{ inputs.suite }} Test Suite against ${{ inputs.ref_name }} by ${{ inputs.author }}
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
@@ -11,6 +11,10 @@ on:
|
|||||||
type: string
|
type: string
|
||||||
default: latest
|
default: latest
|
||||||
description: The Docker image tag used for SNJS container
|
description: The Docker image tag used for SNJS container
|
||||||
|
suite:
|
||||||
|
type: string
|
||||||
|
default: all
|
||||||
|
description: The test suite to run
|
||||||
author:
|
author:
|
||||||
type: string
|
type: string
|
||||||
default: unknown
|
default: unknown
|
||||||
@@ -26,4 +30,4 @@ jobs:
|
|||||||
uses: standardnotes/server/.github/workflows/common-e2e.yml@main
|
uses: standardnotes/server/.github/workflows/common-e2e.yml@main
|
||||||
with:
|
with:
|
||||||
snjs_image_tag: ${{ inputs.snjs_image_tag || 'latest' }}
|
snjs_image_tag: ${{ inputs.snjs_image_tag || 'latest' }}
|
||||||
secrets: inherit
|
suite: ${{ inputs.suite || 'all' }}
|
||||||
|
|||||||
@@ -19,27 +19,3 @@ jobs:
|
|||||||
workspace_name: "@standardnotes/files-server"
|
workspace_name: "@standardnotes/files-server"
|
||||||
package_path: packages/files
|
package_path: packages/files
|
||||||
secrets: inherit
|
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 }}"
|
|
||||||
|
|||||||
+19
-10
@@ -9,7 +9,7 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Cache build
|
- name: Cache build
|
||||||
id: cache-build
|
id: cache-build
|
||||||
@@ -26,7 +26,7 @@ jobs:
|
|||||||
node-version-file: '.nvmrc'
|
node-version-file: '.nvmrc'
|
||||||
|
|
||||||
- name: Install
|
- name: Install
|
||||||
run: yarn install --immutable
|
run: yarn install
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: yarn build
|
run: yarn build
|
||||||
@@ -37,7 +37,7 @@ jobs:
|
|||||||
needs: build
|
needs: build
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Cache build
|
- name: Cache build
|
||||||
id: cache-build
|
id: cache-build
|
||||||
@@ -54,7 +54,7 @@ jobs:
|
|||||||
node-version-file: '.nvmrc'
|
node-version-file: '.nvmrc'
|
||||||
|
|
||||||
- name: Install
|
- name: Install
|
||||||
run: yarn install --immutable
|
run: yarn install
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
if: steps.cache-build.outputs.cache-hit != 'true'
|
if: steps.cache-build.outputs.cache-hit != 'true'
|
||||||
@@ -69,7 +69,7 @@ jobs:
|
|||||||
needs: build
|
needs: build
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Cache build
|
- name: Cache build
|
||||||
id: cache-build
|
id: cache-build
|
||||||
@@ -86,7 +86,7 @@ jobs:
|
|||||||
node-version-file: '.nvmrc'
|
node-version-file: '.nvmrc'
|
||||||
|
|
||||||
- name: Install
|
- name: Install
|
||||||
run: yarn install --immutable
|
run: yarn install
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
if: steps.cache-build.outputs.cache-hit != 'true'
|
if: steps.cache-build.outputs.cache-hit != 'true'
|
||||||
@@ -95,9 +95,18 @@ jobs:
|
|||||||
- name: Test
|
- name: Test
|
||||||
run: yarn test
|
run: yarn test
|
||||||
|
|
||||||
e2e:
|
e2e-base:
|
||||||
needs: build
|
needs: build
|
||||||
|
name: E2E Base Suite
|
||||||
name: E2E
|
|
||||||
uses: standardnotes/server/.github/workflows/common-e2e.yml@main
|
uses: standardnotes/server/.github/workflows/common-e2e.yml@main
|
||||||
secrets: inherit
|
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'
|
||||||
|
|||||||
@@ -4,12 +4,15 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
id-token: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
if: contains(github.event.head_commit.message, 'chore(release)') == false
|
if: contains(github.event.head_commit.message, 'chore(release)') == false
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Cache build
|
- name: Cache build
|
||||||
id: cache-build
|
id: cache-build
|
||||||
@@ -37,7 +40,7 @@ jobs:
|
|||||||
needs: build
|
needs: build
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Cache build
|
- name: Cache build
|
||||||
id: cache-build
|
id: cache-build
|
||||||
@@ -69,7 +72,7 @@ jobs:
|
|||||||
needs: build
|
needs: build
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Cache build
|
- name: Cache build
|
||||||
id: cache-build
|
id: cache-build
|
||||||
@@ -95,26 +98,36 @@ jobs:
|
|||||||
- name: Test
|
- name: Test
|
||||||
run: yarn test
|
run: yarn test
|
||||||
|
|
||||||
e2e:
|
e2e-base:
|
||||||
needs: build
|
needs: build
|
||||||
name: E2E
|
name: E2E Base Suite
|
||||||
uses: standardnotes/server/.github/workflows/common-e2e.yml@main
|
uses: standardnotes/server/.github/workflows/common-e2e.yml@main
|
||||||
secrets: inherit
|
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'
|
||||||
|
|
||||||
publish-self-hosting:
|
publish-self-hosting:
|
||||||
needs: [ test, lint, e2e ]
|
needs: [ test, lint, e2e-base, e2e-vaults ]
|
||||||
name: Publish Self Hosting Docker Image
|
name: Publish Self Hosting Docker Image
|
||||||
uses: standardnotes/server/.github/workflows/common-self-hosting.yml@main
|
uses: standardnotes/server/.github/workflows/common-self-hosting.yml@main
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
publish-services:
|
publish-services:
|
||||||
needs: [ test, lint, e2e ]
|
needs: [ test, lint, e2e-base, e2e-vaults ]
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.CI_PAT_TOKEN }}
|
token: ${{ secrets.CI_PAT_TOKEN }}
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
@@ -133,7 +146,7 @@ jobs:
|
|||||||
git config --global user.email "ci@standardnotes.com"
|
git config --global user.email "ci@standardnotes.com"
|
||||||
|
|
||||||
- name: Import GPG key
|
- name: Import GPG key
|
||||||
uses: crazy-max/ghaction-import-gpg@v5
|
uses: crazy-max/ghaction-import-gpg@v6
|
||||||
with:
|
with:
|
||||||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||||
passphrase: ${{ secrets.PASSPHRASE }}
|
passphrase: ${{ secrets.PASSPHRASE }}
|
||||||
|
|||||||
@@ -19,27 +19,3 @@ jobs:
|
|||||||
workspace_name: "@standardnotes/revisions-server"
|
workspace_name: "@standardnotes/revisions-server"
|
||||||
package_path: packages/revisions
|
package_path: packages/revisions
|
||||||
secrets: inherit
|
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 }}"
|
|
||||||
|
|||||||
@@ -20,19 +20,3 @@ jobs:
|
|||||||
deploy_web: false
|
deploy_web: false
|
||||||
package_path: packages/scheduler
|
package_path: packages/scheduler
|
||||||
secrets: inherit
|
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 }}"
|
|
||||||
|
|||||||
@@ -19,27 +19,3 @@ jobs:
|
|||||||
workspace_name: "@standardnotes/syncing-server"
|
workspace_name: "@standardnotes/syncing-server"
|
||||||
package_path: packages/syncing-server
|
package_path: packages/syncing-server
|
||||||
secrets: inherit
|
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 }}"
|
|
||||||
|
|||||||
@@ -19,27 +19,3 @@ jobs:
|
|||||||
workspace_name: "@standardnotes/websockets-server"
|
workspace_name: "@standardnotes/websockets-server"
|
||||||
package_path: packages/websockets
|
package_path: packages/websockets
|
||||||
secrets: inherit
|
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,7 +4,6 @@
|
|||||||
dist
|
dist
|
||||||
coverage
|
coverage
|
||||||
.env
|
.env
|
||||||
newrelic_agent.log
|
|
||||||
|
|
||||||
.yarn/*
|
.yarn/*
|
||||||
!.yarn/cache
|
!.yarn/cache
|
||||||
|
|||||||
Generated
+81
-46
@@ -1,9 +1,9 @@
|
|||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import { URL as URL$1, fileURLToPath, pathToFileURL } from 'url';
|
import { URL as URL$1, fileURLToPath, pathToFileURL } from 'url';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import moduleExports, { Module } from 'module';
|
|
||||||
import { createHash } from 'crypto';
|
import { createHash } from 'crypto';
|
||||||
import { EOL } from 'os';
|
import { EOL } from 'os';
|
||||||
|
import moduleExports, { isBuiltin } from 'module';
|
||||||
import assert from 'assert';
|
import assert from 'assert';
|
||||||
|
|
||||||
const SAFE_TIME = 456789e3;
|
const SAFE_TIME = 456789e3;
|
||||||
@@ -16,14 +16,16 @@ const PortablePath = {
|
|||||||
const npath = Object.create(path);
|
const npath = Object.create(path);
|
||||||
const ppath = Object.create(path.posix);
|
const ppath = Object.create(path.posix);
|
||||||
npath.cwd = () => process.cwd();
|
npath.cwd = () => process.cwd();
|
||||||
ppath.cwd = () => toPortablePath(process.cwd());
|
ppath.cwd = process.platform === `win32` ? () => toPortablePath(process.cwd()) : process.cwd;
|
||||||
ppath.resolve = (...segments) => {
|
if (process.platform === `win32`) {
|
||||||
if (segments.length > 0 && ppath.isAbsolute(segments[0])) {
|
ppath.resolve = (...segments) => {
|
||||||
return path.posix.resolve(...segments);
|
if (segments.length > 0 && ppath.isAbsolute(segments[0])) {
|
||||||
} else {
|
return path.posix.resolve(...segments);
|
||||||
return path.posix.resolve(ppath.cwd(), ...segments);
|
} else {
|
||||||
}
|
return path.posix.resolve(ppath.cwd(), ...segments);
|
||||||
};
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
const contains = function(pathUtils, from, to) {
|
const contains = function(pathUtils, from, to) {
|
||||||
from = pathUtils.normalize(from);
|
from = pathUtils.normalize(from);
|
||||||
to = pathUtils.normalize(to);
|
to = pathUtils.normalize(to);
|
||||||
@@ -37,17 +39,13 @@ const contains = function(pathUtils, from, to) {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
npath.fromPortablePath = fromPortablePath;
|
|
||||||
npath.toPortablePath = toPortablePath;
|
|
||||||
npath.contains = (from, to) => contains(npath, from, to);
|
npath.contains = (from, to) => contains(npath, from, to);
|
||||||
ppath.contains = (from, to) => contains(ppath, from, to);
|
ppath.contains = (from, to) => contains(ppath, from, to);
|
||||||
const WINDOWS_PATH_REGEXP = /^([a-zA-Z]:.*)$/;
|
const WINDOWS_PATH_REGEXP = /^([a-zA-Z]:.*)$/;
|
||||||
const UNC_WINDOWS_PATH_REGEXP = /^\/\/(\.\/)?(.*)$/;
|
const UNC_WINDOWS_PATH_REGEXP = /^\/\/(\.\/)?(.*)$/;
|
||||||
const PORTABLE_PATH_REGEXP = /^\/([a-zA-Z]:.*)$/;
|
const PORTABLE_PATH_REGEXP = /^\/([a-zA-Z]:.*)$/;
|
||||||
const UNC_PORTABLE_PATH_REGEXP = /^\/unc\/(\.dot\/)?(.*)$/;
|
const UNC_PORTABLE_PATH_REGEXP = /^\/unc\/(\.dot\/)?(.*)$/;
|
||||||
function fromPortablePath(p) {
|
function fromPortablePathWin32(p) {
|
||||||
if (process.platform !== `win32`)
|
|
||||||
return p;
|
|
||||||
let portablePathMatch, uncPortablePathMatch;
|
let portablePathMatch, uncPortablePathMatch;
|
||||||
if (portablePathMatch = p.match(PORTABLE_PATH_REGEXP))
|
if (portablePathMatch = p.match(PORTABLE_PATH_REGEXP))
|
||||||
p = portablePathMatch[1];
|
p = portablePathMatch[1];
|
||||||
@@ -57,9 +55,7 @@ function fromPortablePath(p) {
|
|||||||
return p;
|
return p;
|
||||||
return p.replace(/\//g, `\\`);
|
return p.replace(/\//g, `\\`);
|
||||||
}
|
}
|
||||||
function toPortablePath(p) {
|
function toPortablePathWin32(p) {
|
||||||
if (process.platform !== `win32`)
|
|
||||||
return p;
|
|
||||||
p = p.replace(/\\/g, `/`);
|
p = p.replace(/\\/g, `/`);
|
||||||
let windowsPathMatch, uncWindowsPathMatch;
|
let windowsPathMatch, uncWindowsPathMatch;
|
||||||
if (windowsPathMatch = p.match(WINDOWS_PATH_REGEXP))
|
if (windowsPathMatch = p.match(WINDOWS_PATH_REGEXP))
|
||||||
@@ -68,6 +64,10 @@ function toPortablePath(p) {
|
|||||||
p = `/unc/${uncWindowsPathMatch[1] ? `.dot/` : ``}${uncWindowsPathMatch[2]}`;
|
p = `/unc/${uncWindowsPathMatch[1] ? `.dot/` : ``}${uncWindowsPathMatch[2]}`;
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
const toPortablePath = process.platform === `win32` ? toPortablePathWin32 : (p) => p;
|
||||||
|
const fromPortablePath = process.platform === `win32` ? fromPortablePathWin32 : (p) => p;
|
||||||
|
npath.fromPortablePath = fromPortablePath;
|
||||||
|
npath.toPortablePath = toPortablePath;
|
||||||
function convertPath(targetPathUtils, sourcePath) {
|
function convertPath(targetPathUtils, sourcePath) {
|
||||||
return targetPathUtils === npath ? fromPortablePath(sourcePath) : toPortablePath(sourcePath);
|
return targetPathUtils === npath ? fromPortablePath(sourcePath) : toPortablePath(sourcePath);
|
||||||
}
|
}
|
||||||
@@ -902,6 +902,12 @@ class ProxiedFS extends FakeFS {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function direntToPortable(dirent) {
|
||||||
|
const portableDirent = dirent;
|
||||||
|
if (typeof dirent.path === `string`)
|
||||||
|
portableDirent.path = npath.toPortablePath(dirent.path);
|
||||||
|
return portableDirent;
|
||||||
|
}
|
||||||
class NodeFS extends BasePortableFakeFS {
|
class NodeFS extends BasePortableFakeFS {
|
||||||
constructor(realFs = fs) {
|
constructor(realFs = fs) {
|
||||||
super();
|
super();
|
||||||
@@ -1228,15 +1234,31 @@ class NodeFS extends BasePortableFakeFS {
|
|||||||
async readdirPromise(p, opts) {
|
async readdirPromise(p, opts) {
|
||||||
return await new Promise((resolve, reject) => {
|
return await new Promise((resolve, reject) => {
|
||||||
if (opts) {
|
if (opts) {
|
||||||
this.realFs.readdir(npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject));
|
if (opts.recursive && process.platform === `win32`) {
|
||||||
|
if (opts.withFileTypes) {
|
||||||
|
this.realFs.readdir(npath.fromPortablePath(p), opts, this.makeCallback((results) => resolve(results.map(direntToPortable)), reject));
|
||||||
|
} else {
|
||||||
|
this.realFs.readdir(npath.fromPortablePath(p), opts, this.makeCallback((results) => resolve(results.map(npath.toPortablePath)), reject));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.realFs.readdir(npath.fromPortablePath(p), opts, this.makeCallback(resolve, reject));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.realFs.readdir(npath.fromPortablePath(p), this.makeCallback((value) => resolve(value), reject));
|
this.realFs.readdir(npath.fromPortablePath(p), this.makeCallback(resolve, reject));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
readdirSync(p, opts) {
|
readdirSync(p, opts) {
|
||||||
if (opts) {
|
if (opts) {
|
||||||
return this.realFs.readdirSync(npath.fromPortablePath(p), opts);
|
if (opts.recursive && process.platform === `win32`) {
|
||||||
|
if (opts.withFileTypes) {
|
||||||
|
return this.realFs.readdirSync(npath.fromPortablePath(p), opts).map(direntToPortable);
|
||||||
|
} else {
|
||||||
|
return this.realFs.readdirSync(npath.fromPortablePath(p), opts).map(npath.toPortablePath);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return this.realFs.readdirSync(npath.fromPortablePath(p), opts);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return this.realFs.readdirSync(npath.fromPortablePath(p));
|
return this.realFs.readdirSync(npath.fromPortablePath(p));
|
||||||
}
|
}
|
||||||
@@ -1372,10 +1394,8 @@ class VirtualFS extends ProxiedFS {
|
|||||||
|
|
||||||
const [major, minor] = process.versions.node.split(`.`).map((value) => parseInt(value, 10));
|
const [major, minor] = process.versions.node.split(`.`).map((value) => parseInt(value, 10));
|
||||||
const WATCH_MODE_MESSAGE_USES_ARRAYS = major > 19 || major === 19 && minor >= 2 || major === 18 && minor >= 13;
|
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;
|
const HAS_LAZY_LOADED_TRANSLATORS = major === 20 && minor < 6 || major === 19 && minor >= 3;
|
||||||
|
|
||||||
const builtinModules = new Set(Module.builtinModules || Object.keys(process.binding(`natives`)));
|
|
||||||
const isBuiltinModule = (request) => request.startsWith(`node:`) || builtinModules.has(request);
|
|
||||||
function readPackageScope(checkPath) {
|
function readPackageScope(checkPath) {
|
||||||
const rootSeparatorIndex = checkPath.indexOf(npath.sep);
|
const rootSeparatorIndex = checkPath.indexOf(npath.sep);
|
||||||
let separatorIndex;
|
let separatorIndex;
|
||||||
@@ -1963,7 +1983,7 @@ async function resolvePrivateRequest(specifier, issuer, context, nextResolve) {
|
|||||||
}
|
}
|
||||||
async function resolve$1(originalSpecifier, context, nextResolve) {
|
async function resolve$1(originalSpecifier, context, nextResolve) {
|
||||||
const { findPnpApi } = moduleExports;
|
const { findPnpApi } = moduleExports;
|
||||||
if (!findPnpApi || isBuiltinModule(originalSpecifier))
|
if (!findPnpApi || isBuiltin(originalSpecifier))
|
||||||
return nextResolve(originalSpecifier, context, nextResolve);
|
return nextResolve(originalSpecifier, context, nextResolve);
|
||||||
let specifier = originalSpecifier;
|
let specifier = originalSpecifier;
|
||||||
const url = tryParseURL(specifier, isRelativeRegexp.test(specifier) ? context.parentURL : void 0);
|
const url = tryParseURL(specifier, isRelativeRegexp.test(specifier) ? context.parentURL : void 0);
|
||||||
@@ -2022,31 +2042,46 @@ async function resolve$1(originalSpecifier, context, nextResolve) {
|
|||||||
|
|
||||||
if (!HAS_LAZY_LOADED_TRANSLATORS) {
|
if (!HAS_LAZY_LOADED_TRANSLATORS) {
|
||||||
const binding = process.binding(`fs`);
|
const binding = process.binding(`fs`);
|
||||||
const originalfstat = binding.fstat;
|
const originalReadFile = binding.readFileUtf8 || binding.readFileSync;
|
||||||
const ZIP_MASK = 4278190080;
|
if (originalReadFile) {
|
||||||
const ZIP_MAGIC = 704643072;
|
binding[originalReadFile.name] = function(...args) {
|
||||||
binding.fstat = function(...args) {
|
|
||||||
const [fd, useBigint, req] = args;
|
|
||||||
if ((fd & ZIP_MASK) === ZIP_MAGIC && useBigint === false && req === void 0) {
|
|
||||||
try {
|
try {
|
||||||
const stats = fs.fstatSync(fd);
|
return fs.readFileSync(args[0], {
|
||||||
return new Float64Array([
|
encoding: `utf8`,
|
||||||
stats.dev,
|
flag: args[1]
|
||||||
stats.mode,
|
});
|
||||||
stats.nlink,
|
|
||||||
stats.uid,
|
|
||||||
stats.gid,
|
|
||||||
stats.rdev,
|
|
||||||
stats.blksize,
|
|
||||||
stats.ino,
|
|
||||||
stats.size,
|
|
||||||
stats.blocks
|
|
||||||
]);
|
|
||||||
} catch {
|
} catch {
|
||||||
}
|
}
|
||||||
}
|
return originalReadFile.apply(this, args);
|
||||||
return originalfstat.apply(this, args);
|
};
|
||||||
};
|
} else {
|
||||||
|
const binding2 = process.binding(`fs`);
|
||||||
|
const originalfstat = binding2.fstat;
|
||||||
|
const ZIP_MASK = 4278190080;
|
||||||
|
const ZIP_MAGIC = 704643072;
|
||||||
|
binding2.fstat = function(...args) {
|
||||||
|
const [fd, useBigint, req] = args;
|
||||||
|
if ((fd & ZIP_MASK) === ZIP_MAGIC && useBigint === false && req === void 0) {
|
||||||
|
try {
|
||||||
|
const stats = fs.fstatSync(fd);
|
||||||
|
return new Float64Array([
|
||||||
|
stats.dev,
|
||||||
|
stats.mode,
|
||||||
|
stats.nlink,
|
||||||
|
stats.uid,
|
||||||
|
stats.gid,
|
||||||
|
stats.rdev,
|
||||||
|
stats.blksize,
|
||||||
|
stats.ino,
|
||||||
|
stats.size,
|
||||||
|
stats.blocks
|
||||||
|
]);
|
||||||
|
} catch {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return originalfstat.apply(this, args);
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const resolve = resolve$1;
|
const resolve = resolve$1;
|
||||||
|
|||||||
Binary file not shown.
BIN
Binary file not shown.
BIN
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.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user