From 3d1fa0df356a5894c4e52f06bf1995db33ed772e Mon Sep 17 00:00:00 2001 From: Lukasz Ostrowski Date: Mon, 6 Feb 2023 15:05:06 +0100 Subject: [PATCH] Remove MARKETPLACE_URL env which was used for previous AppStore implementation (#3086) --- .github/PULL_REQUEST_TEMPLATE.md | 1 - .github/workflows/deploy-gcp.yml | 1 + .github/workflows/test-env-deploy.yml | 10 ---------- Dockerfile | 2 -- docs/configuration.md | 2 -- package-lock.json | 1 + src/config.ts | 12 ++++++++++++ vite.config.js | 5 ++++- 8 files changed, 18 insertions(+), 16 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index ac4e707c3..57d7ded17 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -25,7 +25,6 @@ greatly reduce the amount of work needed to review your work. --> Modify API_URI if you want test instance to use custom backend. CYPRESS_API_URI is optional, use when necessary. --> API_URI=https://automation-dashboard.staging.saleor.cloud/graphql/ -MARKETPLACE_URL=https://apps.saleor.io APPS_MARKETPLACE_API_URI=https://marketplace-gray.vercel.app/api/v2/saleor-apps SALEOR_APPS_ENDPOINT=https://apps.saleor.io/api/saleor-apps diff --git a/.github/workflows/deploy-gcp.yml b/.github/workflows/deploy-gcp.yml index 18e1e9934..4d5ecd5cf 100644 --- a/.github/workflows/deploy-gcp.yml +++ b/.github/workflows/deploy-gcp.yml @@ -18,6 +18,7 @@ jobs: VERSION_FAMILY: ${{ github.event.client_payload.version_family }} SENTRY_DSN: ${{ secrets.SENTRY_DSN }} SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + APPS_MARKETPLACE_API_URI: "https://apps.saleor.io/api/v2/saleor-apps" IS_CLOUD_INSTANCE: true steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/test-env-deploy.yml b/.github/workflows/test-env-deploy.yml index 3d4e30837..3a50342fa 100644 --- a/.github/workflows/test-env-deploy.yml +++ b/.github/workflows/test-env-deploy.yml @@ -59,15 +59,6 @@ jobs: pattern: (http|https)://[a-zA-Z0-9.-]+/graphql/? run: | echo "::set-output name=custom_api_uri::$(echo "$pull_request_body" | grep -Eo "$prefix$pattern" | sed s/$prefix// | head -n 1)" - - name: Get MARKETPLACE_URL - id: marketplace_url - # Search for MARKETPLACE_URL in PR description - env: - pull_request_body: ${{ github.event.pull_request.body }} - prefix: MARKETPLACE_URL= - pattern: (http|https)://[a-zA-Z0-9.-]+/? - run: | - echo "::set-output name=custom_marketplace_url::$(echo "$pull_request_body" | grep -Eo "$prefix$pattern" | sed s/$prefix// | head -n 1)" - name: Get APPS_MARKETPLACE_API_URI id: apps_marketplace_api_uri # Search for APPS_MARKETPLACE_API_URI in PR description @@ -81,7 +72,6 @@ jobs: env: # Use custom API_URI or the default one API_URI: ${{ steps.api_uri.outputs.custom_api_uri || 'https://qa.staging.saleor.cloud/graphql/' }} - MARKETPLACE_URL: ${{ steps.marketplace_url.outputs.custom_marketplace_url }} APPS_MARKETPLACE_API_URI: ${{ steps.apps_marketplace_api_uri.outputs.custom_apps_marketplace_api_uri }} APP_MOUNT_URI: / STATIC_URL: / diff --git a/Dockerfile b/Dockerfile index 727f2adc4..9d1e5403f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,6 @@ COPY src/ src/ ARG API_URI ARG APP_MOUNT_URI -ARG MARKETPLACE_URL ARG APPS_MARKETPLACE_API_URI, ARG APPS_TUNNEL_URL_KEYWORDS, ARG SALEOR_APPS_ENDPOINT @@ -29,7 +28,6 @@ ARG SKIP_SOURCEMAPS ENV API_URI ${API_URI:-http://localhost:8000/graphql/} ENV APP_MOUNT_URI ${APP_MOUNT_URI:-/dashboard/} -ENV MARKETPLACE_URL ${MARKETPLACE_URL} ENV APPS_MARKETPLACE_API_URI ${APPS_MARKETPLACE_API_URI} ENV APPS_TUNNEL_URL_KEYWORDS ${APPS_TUNNEL_URL_KEYWORDS} ENV SALEOR_APPS_ENDPOINT=${SALEOR_APPS_ENDPOINT} diff --git a/docs/configuration.md b/docs/configuration.md index 588bd7a0d..965caa1db 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -12,8 +12,6 @@ Create `.env` file in a root directory or set environment variables with the fol - `STATIC_URL` - URL where the static files are located. E.g., if you use an S3 bucket, you should set it to the bucket's URL. By default, Saleor assumes you serve static files from the root of your site at "http://localhost:9000/". -- `MARKETPLACE_URL` - URL where Marketplace App is located. If not found, it will not render a navigation link to the Marketplace (deprecated in favor of `APPS_MARKETPLACE_API_URI`). - - `SALEOR_APPS_PAGE_PATH` - Path appended to `MARKETPLACE_URL` to render Saleor Apps page (deprecated). - `SALEOR_APPS_JSON_PATH` - Path appended to `MARKETPLACE_URL` to fetch a list of Saleor Apps as JSON (deprecated in favor of `APPS_MARKETPLACE_API_URI`). diff --git a/package-lock.json b/package-lock.json index f3b961672..e451f826d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,6 +17,7 @@ "@editorjs/list": "^1.7.0", "@editorjs/paragraph": "^2.8.0", "@editorjs/quote": "^2.4.0", + "@floating-ui/react-dom-interactions": "^0.5.0", "@glideapps/glide-data-grid": "^5.0.0", "@graphiql/plugin-explorer": "^0.1.12", "@graphiql/react": "^0.15.0", diff --git a/src/config.ts b/src/config.ts index fc1e093c2..29a974ee3 100644 --- a/src/config.ts +++ b/src/config.ts @@ -8,11 +8,23 @@ export const getAppMountUri = () => export const getApiUrl = () => window.__SALEOR_CONFIG__.API_URL; export const SW_INTERVAL = parseInt(process.env.SW_INTERVAL, 10) || 300; export const IS_CLOUD_INSTANCE = process.env.IS_CLOUD_INSTANCE === "true"; +/** + * @deprecated + */ export const MARKETPLACE_URL = window.__SALEOR_CONFIG__.MARKETPLACE_URL; +/** + * @deprecated + */ export const MARKETPLACE_SALEOR_APPS_PAGE_PATH = window.__SALEOR_CONFIG__.SALEOR_APPS_PAGE_PATH; +/** + * @deprecated + */ export const MARKETPLACE_SALEOR_APPS_JSON_PATH = window.__SALEOR_CONFIG__.SALEOR_APPS_JSON_PATH; +/** + * @deprecated + */ export const MARKETPLACE_APP_TEMPLATE_GALLERY_PATH = window.__SALEOR_CONFIG__.APP_TEMPLATE_GALLERY_PATH; diff --git a/vite.config.js b/vite.config.js index 5635b54bc..2ea1b95e6 100644 --- a/vite.config.js +++ b/vite.config.js @@ -19,7 +19,10 @@ export default defineConfig(({ command, mode }) => { API_URI, SW_INTERVAL, IS_CLOUD_INSTANCE, - MARKETPLACE_URL, + /** + * @deprecated + */ + MARKETPLACE_URL, // To be removed SALEOR_APPS_ENDPOINT, APP_MOUNT_URI, SENTRY_ORG,