From df470a9a7b3291293a8eddbd6b99b8bacf65d704 Mon Sep 17 00:00:00 2001 From: andrzejewsky Date: Wed, 6 Sep 2023 15:59:23 +0200 Subject: [PATCH 1/3] use sentry cli --- .github/workflows/test-env-deploy.yml | 5 + package-lock.json | 719 +------------------------- package.json | 7 +- scripts/sentry.sh | 8 + vite.config.js | 19 - 5 files changed, 23 insertions(+), 735 deletions(-) create mode 100755 scripts/sentry.sh diff --git a/.github/workflows/test-env-deploy.yml b/.github/workflows/test-env-deploy.yml index 5c7e9435097..5b0bf59ac0b 100644 --- a/.github/workflows/test-env-deploy.yml +++ b/.github/workflows/test-env-deploy.yml @@ -75,6 +75,11 @@ jobs: APP_MOUNT_URI: / STATIC_URL: / IS_CLOUD_INSTANCE: true + SENTRY_ORG: saleor + SENTRY_PROJECT: dashboard + SENTRY_URL_PREFIX: "~/dashboard/static" + SENTRY_DSN: ${{ secrets.SENTRY_DSN }} + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} run: | npm run build - name: Run build storybook diff --git a/package-lock.json b/package-lock.json index 3afbdea9ee2..d0cce8fc2a9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -117,7 +117,7 @@ "@graphql-codegen/typescript-operations": "^2.2.4", "@graphql-codegen/typescript-react-apollo": "^3.2.5", "@saleor/app-sdk": "0.43.0", - "@sentry/vite-plugin": "^2.7.1", + "@sentry/cli": "^2.20.6", "@swc/jest": "^0.2.26", "@types/apollo-upload-client": "^17.0.2", "@types/color-convert": "^2.0.0", @@ -8583,57 +8583,6 @@ "react": "^16.8.0 || ^17.0.0" } }, - "node_modules/@sentry-internal/tracing": { - "version": "7.67.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.67.0.tgz", - "integrity": "sha512-+3wpnzW2HczPlZsp1pWtdOavBKLK/tu1qDEg+blqLfW7b/qZZ8hqQ+A+2mEWRLgWfIoGZ8t4U84nN4tzDXv+nQ==", - "dev": true, - "dependencies": { - "@sentry/core": "7.67.0", - "@sentry/types": "7.67.0", - "@sentry/utils": "7.67.0", - "tslib": "^2.4.1 || ^1.9.3" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry-internal/tracing/node_modules/@sentry/core": { - "version": "7.67.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.67.0.tgz", - "integrity": "sha512-apk0WHnFJTHX86TvN4LOa2GBfguKwvV94WsssyizMi4qurGN2V0I8ZUmlypjBxvMY9MOBZ/2LwgYPf3U1QeE5g==", - "dev": true, - "dependencies": { - "@sentry/types": "7.67.0", - "@sentry/utils": "7.67.0", - "tslib": "^2.4.1 || ^1.9.3" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry-internal/tracing/node_modules/@sentry/types": { - "version": "7.67.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.67.0.tgz", - "integrity": "sha512-GV/Hxdsp/hes1YQGPGgSUG1IHRNQVJMnCfYcpuZtZI6CvNJ+7qNOLkdmC/xGFwfpYH9kYsFBvmGsmeC6yUENYA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry-internal/tracing/node_modules/@sentry/utils": { - "version": "7.67.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.67.0.tgz", - "integrity": "sha512-OstjIfAD0xPWVnIRzoAtFBW+YTmxix4h3ehgtFxhA4VJHkC9KXchaTNwk+nlRy/nx4phx5vW9p7YWhO3kJBJmA==", - "dev": true, - "dependencies": { - "@sentry/types": "7.67.0", - "tslib": "^2.4.1 || ^1.9.3" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@sentry/browser": { "version": "6.19.7", "license": "BSD-3-Clause", @@ -8652,222 +8601,6 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, - "node_modules/@sentry/bundler-plugin-core": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@sentry/bundler-plugin-core/-/bundler-plugin-core-2.7.1.tgz", - "integrity": "sha512-ZC/B/7FzzgGpux2t54B2ioXudlq60MHMVPaUeuFzWwxmxiArrV4uBXcp18RMW5ns4biik5WBAD72vbsoloBfIQ==", - "dev": true, - "dependencies": { - "@sentry/cli": "^2.20.1", - "@sentry/node": "^7.60.0", - "@sentry/utils": "^7.60.0", - "dotenv": "^16.3.1", - "find-up": "5.0.0", - "glob": "9.3.2", - "magic-string": "0.27.0", - "unplugin": "1.0.1" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/@sentry/bundler-plugin-core/node_modules/@sentry/types": { - "version": "7.67.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.67.0.tgz", - "integrity": "sha512-GV/Hxdsp/hes1YQGPGgSUG1IHRNQVJMnCfYcpuZtZI6CvNJ+7qNOLkdmC/xGFwfpYH9kYsFBvmGsmeC6yUENYA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry/bundler-plugin-core/node_modules/@sentry/utils": { - "version": "7.67.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.67.0.tgz", - "integrity": "sha512-OstjIfAD0xPWVnIRzoAtFBW+YTmxix4h3ehgtFxhA4VJHkC9KXchaTNwk+nlRy/nx4phx5vW9p7YWhO3kJBJmA==", - "dev": true, - "dependencies": { - "@sentry/types": "7.67.0", - "tslib": "^2.4.1 || ^1.9.3" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry/bundler-plugin-core/node_modules/acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/@sentry/bundler-plugin-core/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@sentry/bundler-plugin-core/node_modules/dotenv": { - "version": "16.3.1", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", - "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/motdotla/dotenv?sponsor=1" - } - }, - "node_modules/@sentry/bundler-plugin-core/node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@sentry/bundler-plugin-core/node_modules/glob": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.2.tgz", - "integrity": "sha512-BTv/JhKXFEHsErMte/AnfiSv8yYOLLiyH2lTg8vn02O21zWFgHPTfxtgn1QRe7NRgggUhC8hacR2Re94svHqeA==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "minimatch": "^7.4.1", - "minipass": "^4.2.4", - "path-scurry": "^1.6.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@sentry/bundler-plugin-core/node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@sentry/bundler-plugin-core/node_modules/magic-string": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.27.0.tgz", - "integrity": "sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==", - "dev": true, - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.4.13" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@sentry/bundler-plugin-core/node_modules/minimatch": { - "version": "7.4.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.6.tgz", - "integrity": "sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@sentry/bundler-plugin-core/node_modules/minipass": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz", - "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry/bundler-plugin-core/node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@sentry/bundler-plugin-core/node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@sentry/bundler-plugin-core/node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry/bundler-plugin-core/node_modules/unplugin": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-1.0.1.tgz", - "integrity": "sha512-aqrHaVBWW1JVKBHmGo33T5TxeL0qWzfvjWokObHA9bYmN7eNDkwOxmLjhioHl9878qDFMAaT51XNroRyuz7WxA==", - "dev": true, - "dependencies": { - "acorn": "^8.8.1", - "chokidar": "^3.5.3", - "webpack-sources": "^3.2.3", - "webpack-virtual-modules": "^0.5.0" - } - }, - "node_modules/@sentry/bundler-plugin-core/node_modules/webpack-virtual-modules": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.5.0.tgz", - "integrity": "sha512-kyDivFZ7ZM0BVOUteVbDFhlRt7Ah/CSPwJdi8hBpkK7QLumUqdLtVfm/PX/hkcnrvr0i77fO5+TjZ94Pe+C9iw==", - "dev": true - }, "node_modules/@sentry/cli": { "version": "2.20.6", "resolved": "https://registry.npmjs.org/@sentry/cli/-/cli-2.20.6.tgz", @@ -8955,70 +8688,6 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, - "node_modules/@sentry/node": { - "version": "7.67.0", - "resolved": "https://registry.npmjs.org/@sentry/node/-/node-7.67.0.tgz", - "integrity": "sha512-QRPLdHp00HMTSpanonf4MfAcWiWHSnnCaNT0at0SJlpPf1z1Ch8FXxFl5CKwcbYyMCQDBxsZ2tdQwjrmPdMDcA==", - "dev": true, - "dependencies": { - "@sentry-internal/tracing": "7.67.0", - "@sentry/core": "7.67.0", - "@sentry/types": "7.67.0", - "@sentry/utils": "7.67.0", - "cookie": "^0.4.1", - "https-proxy-agent": "^5.0.0", - "lru_map": "^0.3.3", - "tslib": "^2.4.1 || ^1.9.3" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry/node/node_modules/@sentry/core": { - "version": "7.67.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.67.0.tgz", - "integrity": "sha512-apk0WHnFJTHX86TvN4LOa2GBfguKwvV94WsssyizMi4qurGN2V0I8ZUmlypjBxvMY9MOBZ/2LwgYPf3U1QeE5g==", - "dev": true, - "dependencies": { - "@sentry/types": "7.67.0", - "@sentry/utils": "7.67.0", - "tslib": "^2.4.1 || ^1.9.3" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry/node/node_modules/@sentry/types": { - "version": "7.67.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.67.0.tgz", - "integrity": "sha512-GV/Hxdsp/hes1YQGPGgSUG1IHRNQVJMnCfYcpuZtZI6CvNJ+7qNOLkdmC/xGFwfpYH9kYsFBvmGsmeC6yUENYA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry/node/node_modules/@sentry/utils": { - "version": "7.67.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.67.0.tgz", - "integrity": "sha512-OstjIfAD0xPWVnIRzoAtFBW+YTmxix4h3ehgtFxhA4VJHkC9KXchaTNwk+nlRy/nx4phx5vW9p7YWhO3kJBJmA==", - "dev": true, - "dependencies": { - "@sentry/types": "7.67.0", - "tslib": "^2.4.1 || ^1.9.3" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry/node/node_modules/cookie": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", - "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/@sentry/react": { "version": "6.19.7", "license": "BSD-3-Clause", @@ -9065,49 +8734,6 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, - "node_modules/@sentry/vite-plugin": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@sentry/vite-plugin/-/vite-plugin-2.7.1.tgz", - "integrity": "sha512-bZrM06Z+QP/TvPyTYFxpQVugT5rzaFW1jzTnHzUHICz5tgyarY8bhhmYXnI37f6mngkVwDZNAftczbVF2IuFWQ==", - "dev": true, - "dependencies": { - "@sentry/bundler-plugin-core": "2.7.1", - "unplugin": "1.0.1" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/@sentry/vite-plugin/node_modules/acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/@sentry/vite-plugin/node_modules/unplugin": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-1.0.1.tgz", - "integrity": "sha512-aqrHaVBWW1JVKBHmGo33T5TxeL0qWzfvjWokObHA9bYmN7eNDkwOxmLjhioHl9878qDFMAaT51XNroRyuz7WxA==", - "dev": true, - "dependencies": { - "acorn": "^8.8.1", - "chokidar": "^3.5.3", - "webpack-sources": "^3.2.3", - "webpack-virtual-modules": "^0.5.0" - } - }, - "node_modules/@sentry/vite-plugin/node_modules/webpack-virtual-modules": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.5.0.tgz", - "integrity": "sha512-kyDivFZ7ZM0BVOUteVbDFhlRt7Ah/CSPwJdi8hBpkK7QLumUqdLtVfm/PX/hkcnrvr0i77fO5+TjZ94Pe+C9iw==", - "dev": true - }, "node_modules/@sideway/address": { "version": "4.1.1", "dev": true, @@ -26870,12 +26496,6 @@ "node": ">=8" } }, - "node_modules/lru_map": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", - "integrity": "sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==", - "dev": true - }, "node_modules/lru-cache": { "version": "6.0.0", "devOptional": true, @@ -28072,7 +27692,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", - "devOptional": true, + "optional": true, "engines": { "node": ">=8" } @@ -29745,31 +29365,6 @@ "node": ">=0.10.0" } }, - "node_modules/path-scurry": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", - "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", - "dev": true, - "dependencies": { - "lru-cache": "^9.1.1 || ^10.0.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz", - "integrity": "sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==", - "dev": true, - "engines": { - "node": "14 || >=16.14" - } - }, "node_modules/path-to-regexp": { "version": "1.8.0", "license": "MIT", @@ -36050,7 +35645,7 @@ "version": "3.2.3", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "devOptional": true, + "optional": true, "engines": { "node": ">=10.13.0" } @@ -42628,47 +42223,6 @@ "jwt-decode": "^3.1.2" } }, - "@sentry-internal/tracing": { - "version": "7.67.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.67.0.tgz", - "integrity": "sha512-+3wpnzW2HczPlZsp1pWtdOavBKLK/tu1qDEg+blqLfW7b/qZZ8hqQ+A+2mEWRLgWfIoGZ8t4U84nN4tzDXv+nQ==", - "dev": true, - "requires": { - "@sentry/core": "7.67.0", - "@sentry/types": "7.67.0", - "@sentry/utils": "7.67.0", - "tslib": "^2.4.1 || ^1.9.3" - }, - "dependencies": { - "@sentry/core": { - "version": "7.67.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.67.0.tgz", - "integrity": "sha512-apk0WHnFJTHX86TvN4LOa2GBfguKwvV94WsssyizMi4qurGN2V0I8ZUmlypjBxvMY9MOBZ/2LwgYPf3U1QeE5g==", - "dev": true, - "requires": { - "@sentry/types": "7.67.0", - "@sentry/utils": "7.67.0", - "tslib": "^2.4.1 || ^1.9.3" - } - }, - "@sentry/types": { - "version": "7.67.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.67.0.tgz", - "integrity": "sha512-GV/Hxdsp/hes1YQGPGgSUG1IHRNQVJMnCfYcpuZtZI6CvNJ+7qNOLkdmC/xGFwfpYH9kYsFBvmGsmeC6yUENYA==", - "dev": true - }, - "@sentry/utils": { - "version": "7.67.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.67.0.tgz", - "integrity": "sha512-OstjIfAD0xPWVnIRzoAtFBW+YTmxix4h3ehgtFxhA4VJHkC9KXchaTNwk+nlRy/nx4phx5vW9p7YWhO3kJBJmA==", - "dev": true, - "requires": { - "@sentry/types": "7.67.0", - "tslib": "^2.4.1 || ^1.9.3" - } - } - } - }, "@sentry/browser": { "version": "6.19.7", "requires": { @@ -42685,158 +42239,6 @@ } } }, - "@sentry/bundler-plugin-core": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@sentry/bundler-plugin-core/-/bundler-plugin-core-2.7.1.tgz", - "integrity": "sha512-ZC/B/7FzzgGpux2t54B2ioXudlq60MHMVPaUeuFzWwxmxiArrV4uBXcp18RMW5ns4biik5WBAD72vbsoloBfIQ==", - "dev": true, - "requires": { - "@sentry/cli": "^2.20.1", - "@sentry/node": "^7.60.0", - "@sentry/utils": "^7.60.0", - "dotenv": "^16.3.1", - "find-up": "5.0.0", - "glob": "9.3.2", - "magic-string": "0.27.0", - "unplugin": "1.0.1" - }, - "dependencies": { - "@sentry/types": { - "version": "7.67.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.67.0.tgz", - "integrity": "sha512-GV/Hxdsp/hes1YQGPGgSUG1IHRNQVJMnCfYcpuZtZI6CvNJ+7qNOLkdmC/xGFwfpYH9kYsFBvmGsmeC6yUENYA==", - "dev": true - }, - "@sentry/utils": { - "version": "7.67.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.67.0.tgz", - "integrity": "sha512-OstjIfAD0xPWVnIRzoAtFBW+YTmxix4h3ehgtFxhA4VJHkC9KXchaTNwk+nlRy/nx4phx5vW9p7YWhO3kJBJmA==", - "dev": true, - "requires": { - "@sentry/types": "7.67.0", - "tslib": "^2.4.1 || ^1.9.3" - } - }, - "acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", - "dev": true - }, - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0" - } - }, - "dotenv": { - "version": "16.3.1", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", - "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", - "dev": true - }, - "find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "requires": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - } - }, - "glob": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.2.tgz", - "integrity": "sha512-BTv/JhKXFEHsErMte/AnfiSv8yYOLLiyH2lTg8vn02O21zWFgHPTfxtgn1QRe7NRgggUhC8hacR2Re94svHqeA==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "minimatch": "^7.4.1", - "minipass": "^4.2.4", - "path-scurry": "^1.6.1" - } - }, - "locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "requires": { - "p-locate": "^5.0.0" - } - }, - "magic-string": { - "version": "0.27.0", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.27.0.tgz", - "integrity": "sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==", - "dev": true, - "requires": { - "@jridgewell/sourcemap-codec": "^1.4.13" - } - }, - "minimatch": { - "version": "7.4.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.6.tgz", - "integrity": "sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==", - "dev": true, - "requires": { - "brace-expansion": "^2.0.1" - } - }, - "minipass": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz", - "integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==", - "dev": true - }, - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "requires": { - "yocto-queue": "^0.1.0" - } - }, - "p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "requires": { - "p-limit": "^3.0.2" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "unplugin": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-1.0.1.tgz", - "integrity": "sha512-aqrHaVBWW1JVKBHmGo33T5TxeL0qWzfvjWokObHA9bYmN7eNDkwOxmLjhioHl9878qDFMAaT51XNroRyuz7WxA==", - "dev": true, - "requires": { - "acorn": "^8.8.1", - "chokidar": "^3.5.3", - "webpack-sources": "^3.2.3", - "webpack-virtual-modules": "^0.5.0" - } - }, - "webpack-virtual-modules": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.5.0.tgz", - "integrity": "sha512-kyDivFZ7ZM0BVOUteVbDFhlRt7Ah/CSPwJdi8hBpkK7QLumUqdLtVfm/PX/hkcnrvr0i77fO5+TjZ94Pe+C9iw==", - "dev": true - } - } - }, "@sentry/cli": { "version": "2.20.6", "resolved": "https://registry.npmjs.org/@sentry/cli/-/cli-2.20.6.tgz", @@ -42906,57 +42308,6 @@ } } }, - "@sentry/node": { - "version": "7.67.0", - "resolved": "https://registry.npmjs.org/@sentry/node/-/node-7.67.0.tgz", - "integrity": "sha512-QRPLdHp00HMTSpanonf4MfAcWiWHSnnCaNT0at0SJlpPf1z1Ch8FXxFl5CKwcbYyMCQDBxsZ2tdQwjrmPdMDcA==", - "dev": true, - "requires": { - "@sentry-internal/tracing": "7.67.0", - "@sentry/core": "7.67.0", - "@sentry/types": "7.67.0", - "@sentry/utils": "7.67.0", - "cookie": "^0.4.1", - "https-proxy-agent": "^5.0.0", - "lru_map": "^0.3.3", - "tslib": "^2.4.1 || ^1.9.3" - }, - "dependencies": { - "@sentry/core": { - "version": "7.67.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.67.0.tgz", - "integrity": "sha512-apk0WHnFJTHX86TvN4LOa2GBfguKwvV94WsssyizMi4qurGN2V0I8ZUmlypjBxvMY9MOBZ/2LwgYPf3U1QeE5g==", - "dev": true, - "requires": { - "@sentry/types": "7.67.0", - "@sentry/utils": "7.67.0", - "tslib": "^2.4.1 || ^1.9.3" - } - }, - "@sentry/types": { - "version": "7.67.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.67.0.tgz", - "integrity": "sha512-GV/Hxdsp/hes1YQGPGgSUG1IHRNQVJMnCfYcpuZtZI6CvNJ+7qNOLkdmC/xGFwfpYH9kYsFBvmGsmeC6yUENYA==", - "dev": true - }, - "@sentry/utils": { - "version": "7.67.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.67.0.tgz", - "integrity": "sha512-OstjIfAD0xPWVnIRzoAtFBW+YTmxix4h3ehgtFxhA4VJHkC9KXchaTNwk+nlRy/nx4phx5vW9p7YWhO3kJBJmA==", - "dev": true, - "requires": { - "@sentry/types": "7.67.0", - "tslib": "^2.4.1 || ^1.9.3" - } - }, - "cookie": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", - "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", - "dev": true - } - } - }, "@sentry/react": { "version": "6.19.7", "requires": { @@ -42992,42 +42343,6 @@ } } }, - "@sentry/vite-plugin": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@sentry/vite-plugin/-/vite-plugin-2.7.1.tgz", - "integrity": "sha512-bZrM06Z+QP/TvPyTYFxpQVugT5rzaFW1jzTnHzUHICz5tgyarY8bhhmYXnI37f6mngkVwDZNAftczbVF2IuFWQ==", - "dev": true, - "requires": { - "@sentry/bundler-plugin-core": "2.7.1", - "unplugin": "1.0.1" - }, - "dependencies": { - "acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", - "dev": true - }, - "unplugin": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-1.0.1.tgz", - "integrity": "sha512-aqrHaVBWW1JVKBHmGo33T5TxeL0qWzfvjWokObHA9bYmN7eNDkwOxmLjhioHl9878qDFMAaT51XNroRyuz7WxA==", - "dev": true, - "requires": { - "acorn": "^8.8.1", - "chokidar": "^3.5.3", - "webpack-sources": "^3.2.3", - "webpack-virtual-modules": "^0.5.0" - } - }, - "webpack-virtual-modules": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.5.0.tgz", - "integrity": "sha512-kyDivFZ7ZM0BVOUteVbDFhlRt7Ah/CSPwJdi8hBpkK7QLumUqdLtVfm/PX/hkcnrvr0i77fO5+TjZ94Pe+C9iw==", - "dev": true - } - } - }, "@sideway/address": { "version": "4.1.1", "dev": true, @@ -55565,12 +54880,6 @@ "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", "optional": true }, - "lru_map": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", - "integrity": "sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==", - "dev": true - }, "lru-cache": { "version": "6.0.0", "devOptional": true, @@ -56330,7 +55639,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", - "devOptional": true + "optional": true }, "minizlib": { "version": "2.1.2", @@ -57506,24 +56815,6 @@ "version": "0.1.2", "dev": true }, - "path-scurry": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", - "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", - "dev": true, - "requires": { - "lru-cache": "^9.1.1 || ^10.0.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "dependencies": { - "lru-cache": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz", - "integrity": "sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==", - "dev": true - } - } - }, "path-to-regexp": { "version": "1.8.0", "requires": { @@ -61963,7 +61254,7 @@ "version": "3.2.3", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "devOptional": true + "optional": true }, "webpack-virtual-modules": { "version": "0.4.6", diff --git a/package.json b/package.json index 43c3ccb5d98..b5826fae601 100644 --- a/package.json +++ b/package.json @@ -124,7 +124,7 @@ "@graphql-codegen/typescript-operations": "^2.2.4", "@graphql-codegen/typescript-react-apollo": "^3.2.5", "@saleor/app-sdk": "0.43.0", - "@sentry/vite-plugin": "^2.7.1", + "@sentry/cli": "^2.20.6", "@swc/jest": "^0.2.26", "@types/apollo-upload-client": "^17.0.2", "@types/color-convert": "^2.0.0", @@ -304,6 +304,9 @@ "dev": "vite --host", "build": "cross-env NODE_OPTIONS=--max-old-space-size=8192 vite build", "preview": "vite preview", + "sentry:inject": "sentry-cli sourcemaps inject build/dashboard", + "sentry:upload": "sentry-cli sourcemaps upload build/dashboard", + "sentry:clean": "node scripts/removeSourcemaps.js", "build-storybook": "cross-env NODE_OPTIONS=--max-old-space-size=6144 storybook build -o build/storybook", "build-types": "node scripts/build-types.js", "build-flags": "node scripts/build-flags.js", @@ -330,7 +333,7 @@ "test:watch": "jest --watch src/", "lint": "eslint \"src/**/*.@(tsx|ts|jsx|js)\" --fix", "lint:check-progress": "eslint-nibble \"src/**/*.@(tsx|ts|jsx|js)\"", - "postbuild": "node scripts/removeSourcemaps.js", + "postbuild": "./scripts/sentry.sh", "postinstall": "node scripts/patchReactVirtualized.js", "predev": "npm run build-types", "release": "changeset tag && git push --follow-tags", diff --git a/scripts/sentry.sh b/scripts/sentry.sh new file mode 100755 index 00000000000..d94cd391af0 --- /dev/null +++ b/scripts/sentry.sh @@ -0,0 +1,8 @@ +if [[ -z "${SENTRY_ORG}" ]]; then + echo "Sentry not definied. Skipping..." +else + echo "Sentry processing..." + npm run sentry:inject + npm run sentry:upload + npm run sentry:clean +fi \ No newline at end of file diff --git a/vite.config.js b/vite.config.js index daeb0cfca60..e178e008aea 100644 --- a/vite.config.js +++ b/vite.config.js @@ -7,7 +7,6 @@ import nodePolyfills from "rollup-plugin-polyfill-node"; import { defineConfig, loadEnv, searchForWorkspaceRoot } from "vite"; import { createHtmlPlugin } from "vite-plugin-html"; import { VitePWA } from "vite-plugin-pwa"; -import { sentryVitePlugin } from "@sentry/vite-plugin"; const copyOgImage = () => ({ name: "copy-og-image", @@ -33,9 +32,6 @@ export default defineConfig(({ command, mode }) => { SW_INTERVAL, IS_CLOUD_INSTANCE, APP_MOUNT_URI, - SENTRY_ORG, - SENTRY_PROJECT, - SENTRY_AUTH_TOKEN, SENTRY_DSN, ENVIRONMENT, STATIC_URL, @@ -54,9 +50,6 @@ export default defineConfig(({ command, mode }) => { const sourcemap = SKIP_SOURCEMAPS ? false : true; - const enableSentry = - SENTRY_ORG && SENTRY_PROJECT && SENTRY_DSN && SENTRY_AUTH_TOKEN; - const plugins = [ react(), createHtmlPlugin({ @@ -90,18 +83,6 @@ export default defineConfig(({ command, mode }) => { copyOgImage(), ]; - if (enableSentry) { - console.log("Enabling sentry..."); - - plugins.push(sentryVitePlugin({ - org: process.env.SENTRY_ORG, - project: process.env.SENTRY_PROJECT, - authToken: process.env.SENTRY_AUTH_TOKEN, - sourcemaps: { - assets: ["./build/dashboard/*"], - } - })) - } if (!isDev) { console.log("Enabling service worker..."); From 2108708c19f16038401be3d72b48db4520429e51 Mon Sep 17 00:00:00 2001 From: andrzejewsky Date: Wed, 6 Sep 2023 16:06:24 +0200 Subject: [PATCH 2/3] use sentry cli --- .github/workflows/test-env-deploy.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/test-env-deploy.yml b/.github/workflows/test-env-deploy.yml index 5b0bf59ac0b..5c7e9435097 100644 --- a/.github/workflows/test-env-deploy.yml +++ b/.github/workflows/test-env-deploy.yml @@ -75,11 +75,6 @@ jobs: APP_MOUNT_URI: / STATIC_URL: / IS_CLOUD_INSTANCE: true - SENTRY_ORG: saleor - SENTRY_PROJECT: dashboard - SENTRY_URL_PREFIX: "~/dashboard/static" - SENTRY_DSN: ${{ secrets.SENTRY_DSN }} - SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} run: | npm run build - name: Run build storybook From f8c7f319ed4bcf0f4845c19a98347a70068de5a2 Mon Sep 17 00:00:00 2001 From: andrzejewsky Date: Wed, 6 Sep 2023 16:07:44 +0200 Subject: [PATCH 3/3] use sentry cli --- .changeset/mighty-cycles-hammer.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/mighty-cycles-hammer.md diff --git a/.changeset/mighty-cycles-hammer.md b/.changeset/mighty-cycles-hammer.md new file mode 100644 index 00000000000..ba12b8aee4e --- /dev/null +++ b/.changeset/mighty-cycles-hammer.md @@ -0,0 +1,5 @@ +--- +"saleor-dashboard": patch +--- + +Use sentry CLI instead of vite plugin