diff --git a/.circleci/src/jobs/@web-jobs.yml b/.circleci/src/jobs/@web-jobs.yml index 4d4ba15b64d..781b9f8c090 100644 --- a/.circleci/src/jobs/@web-jobs.yml +++ b/.circleci/src/jobs/@web-jobs.yml @@ -37,6 +37,8 @@ web-init: - packages/common/node_modules - packages/libs/node_modules - packages/libs/dist + - packages/trpc-server/node_modules + - packages/trpc-server/dist web-build-demo: working_directory: ~/audius-protocol @@ -85,6 +87,11 @@ web-build-ssr-staging: build-type: ssr:stage build-directory: packages/web/build-ssr-staging build-name: build-ssr-staging + - persist_to_workspace: + root: ./ + paths: + - node_modules + - packages/web/node_modules web-test-staging: working_directory: ~/audius-protocol @@ -128,6 +135,11 @@ web-build-ssr-production: build-type: ssr:prod build-directory: packages/web/build-ssr-production build-name: build-ssr-production + - persist_to_workspace: + root: ./ + paths: + - node_modules + - packages/web/node_modules web-deploy-demo: working_directory: ~/audius-protocol diff --git a/package-lock.json b/package-lock.json index 6d117afb63c..ef21e00a8ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3,6 +3,7 @@ "version": "1.5.64", "lockfileVersion": 3, "requires": true, + "cacheBust": 1, "packages": { "": { "name": "root", @@ -148701,6 +148702,7 @@ "bitski": "0.10.9", "bn.js": "5.1.0", "body-scroll-lock": "4.0.0-beta.0", + "bs58": "5.0.0", "canvas-loop": "1.0.7", "chart.js": "2.9.3", "clamp": "1.0.1", @@ -150016,6 +150018,14 @@ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" }, + "packages/web/node_modules/@project-serum/anchor/node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==", + "dependencies": { + "base-x": "^3.0.2" + } + }, "packages/web/node_modules/@project-serum/anchor/node_modules/cross-fetch": { "version": "3.1.8", "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", @@ -150347,6 +150357,19 @@ "balanced-match": "^1.0.0" } }, + "packages/web/node_modules/bs58": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", + "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", + "dependencies": { + "base-x": "^4.0.0" + } + }, + "packages/web/node_modules/bs58/node_modules/base-x": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.0.tgz", + "integrity": "sha512-FuwxlW4H5kh37X/oW59pwTzzTKRzfrrQwhmyspRM7swOEZcHtDZSCt45U6oKgtuFE+WYPblePMVIPR4RZrh/hw==" + }, "packages/web/node_modules/builder-util": { "version": "24.8.1", "resolved": "https://registry.npmjs.org/builder-util/-/builder-util-24.8.1.tgz", diff --git a/packages/web/src/ssr/worker.js b/packages/web/src/ssr/worker.js index 8a945b90397..4328ef41369 100644 --- a/packages/web/src/ssr/worker.js +++ b/packages/web/src/ssr/worker.js @@ -16,13 +16,14 @@ const DEBUG = false const BROWSER_CACHE_TTL_SECONDS = 60 * 60 * 24 addEventListener('fetch', (event) => { - const sentry = SENTRY_DSN - ? new Toucan({ - dsn: SENTRY_DSN, - context: event, - request: event.request - }) - : null + const sentry = + typeof SENTRY_DSN !== 'undefined' + ? new Toucan({ + dsn: SENTRY_DSN, + context: event, + request: event.request + }) + : null try { event.respondWith(handleEvent(event)) } catch (e) { diff --git a/packages/web/turbo.json b/packages/web/turbo.json index 8adb44b7e0d..8d7515401c0 100644 --- a/packages/web/turbo.json +++ b/packages/web/turbo.json @@ -4,7 +4,8 @@ "build": { "outputs": ["build/**", "build-ssr/**"], "dependsOn": ["^build"], - "outputMode": "new-only" + "outputMode": "new-only", + "env": ["VITE_ENVIRONMENT", "VITE_SSR"] }, "dist": { "outputs": ["dist/**"],