diff --git a/.changeset/curly-zoos-worry.md b/.changeset/curly-zoos-worry.md new file mode 100644 index 0000000..b7a4af5 --- /dev/null +++ b/.changeset/curly-zoos-worry.md @@ -0,0 +1,12 @@ +--- +"saleor-app-data-importer": minor +"saleor-app-products-feed": minor +"saleor-app-monitoring": minor +"saleor-app-invoices": minor +"saleor-app-klaviyo": minor +"saleor-app-search": minor +"saleor-app-slack": minor +--- + +Breaking change for app maintainers: VercelAPL can no longer be set for the app since it's deprecated and will be removed in app-sdk 0.30.0. As a replacement, we recommend using Upstash APL or implementing your own. +Read more about APLs: https://github.com/saleor/saleor-app-sdk/blob/main/docs/apl.md diff --git a/apps/data-importer/saleor-app.ts b/apps/data-importer/saleor-app.ts index af23382..1142a1e 100644 --- a/apps/data-importer/saleor-app.ts +++ b/apps/data-importer/saleor-app.ts @@ -1,5 +1,5 @@ import { SaleorApp } from "@saleor/app-sdk/saleor-app"; -import { APL, FileAPL, SaleorCloudAPL, UpstashAPL, VercelAPL } from "@saleor/app-sdk/APL"; +import { APL, FileAPL, SaleorCloudAPL, UpstashAPL } from "@saleor/app-sdk/APL"; /** * By default auth data are stored in the `.auth-data.json` (FileAPL). diff --git a/apps/invoices/README.md b/apps/invoices/README.md index 5c24636..bcfbad3 100644 --- a/apps/invoices/README.md +++ b/apps/invoices/README.md @@ -112,6 +112,5 @@ The choice of the APL is done using `APL` environment variable. If value is not - `file`: no additional setup is required. Good choice for local development. Can't be used for multi tenant-apps or be deployed (not intended for production) - `upstash`: use [Upstash](https://upstash.com/) Redis as storage method. Free account required. Can be used for development and production and supports multi-tenancy. Requires `UPSTASH_URL` and `UPSTASH_TOKEN` environment variables to be set -- `vercel`: used by deployments from the Marketplace. It's single-tenant only and only supported by Vercel deployments done with Saleor CLI. Requires `SALEOR_REGISTER_APP_URL` and `SALEOR_DEPLOYMENT_TOKEN` environment variables to be set (handled automatically by the Saleor CLI) If you want to use your own database, you can implement your own APL. [Check the documentation to read more.](https://github.com/saleor/saleor-app-sdk/blob/main/docs/apl.md) diff --git a/apps/klaviyo/README.md b/apps/klaviyo/README.md index 0bc4293..9395af8 100644 --- a/apps/klaviyo/README.md +++ b/apps/klaviyo/README.md @@ -74,7 +74,6 @@ The choice of the APL is done using `APL` environment variable. If value is not - `file`: no additional setup is required. Good choice for local development. Can't be used for multi tenant-apps or be deployed (not intended for production) - `upstash`: use [Upstash](https://upstash.com/) Redis as storage method. Free account required. Can be used for development and production and supports multi-tenancy. Requires `UPSTASH_URL` and `UPSTASH_TOKEN` environment variables to be set -- `vercel`: used by deployments from the Marketplace. It's single-tenant only and only supported by Vercel deployments done with Saleor CLI. Requires `SALEOR_REGISTER_APP_URL` and `SALEOR_DEPLOYMENT_TOKEN` environment variables to be set (handled automatically by the Saleor CLI) If you want to use your own database, you can implement your own APL. [Check the documentation to read more.](https://github.com/saleor/saleor-app-sdk/blob/main/docs/apl.md) diff --git a/apps/klaviyo/saleor-app.ts b/apps/klaviyo/saleor-app.ts index 8463511..348bae1 100644 --- a/apps/klaviyo/saleor-app.ts +++ b/apps/klaviyo/saleor-app.ts @@ -1,4 +1,4 @@ -import { APL, FileAPL, SaleorCloudAPL, UpstashAPL, VercelAPL } from "@saleor/app-sdk/APL"; +import { APL, FileAPL, SaleorCloudAPL, UpstashAPL } from "@saleor/app-sdk/APL"; import { SaleorApp } from "@saleor/app-sdk/saleor-app"; /** @@ -12,10 +12,6 @@ const aplType = process.env.APL ?? "file"; let apl: APL; switch (aplType) { - case "vercel": - apl = new VercelAPL(); - - break; case "upstash": apl = new UpstashAPL(); diff --git a/apps/monitoring/src/saleor-app.ts b/apps/monitoring/src/saleor-app.ts deleted file mode 100644 index 5814721..0000000 --- a/apps/monitoring/src/saleor-app.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { SaleorApp } from "@saleor/app-sdk/saleor-app"; -import { APL, FileAPL, UpstashAPL, VercelAPL } from "@saleor/app-sdk/APL"; - -/** - * By default auth data are stored in the `.auth-data.json` (FileAPL). - * For multi-tenant applications and deployments please use UpstashAPL. - * - * To read more about storing auth data, read the - * [APL documentation](https://github.com/saleor/saleor-app-sdk/blob/main/docs/apl.md) - */ - -export let apl: APL; -switch (process.env.APL) { - case "vercel": - apl = new VercelAPL(); - break; - case "upstash": - // Require `UPSTASH_URL` and `UPSTASH_TOKEN` environment variables - apl = new UpstashAPL(); - break; - default: - apl = new FileAPL(); -} - -export const saleorApp = new SaleorApp({ - apl, -}); diff --git a/apps/products-feed/README.md b/apps/products-feed/README.md index 164a2e3..f46c645 100644 --- a/apps/products-feed/README.md +++ b/apps/products-feed/README.md @@ -106,6 +106,5 @@ The choice of the APL is done using `APL` environment variable. If value is not - `file`: no additional setup is required. Good choice for local development. Can't be used for multi tenant-apps or be deployed (not intended for production) - `upstash`: use [Upstash](https://upstash.com/) Redis as storage method. Free account required. Can be used for development and production and supports multi-tenancy. Requires `UPSTASH_URL` and `UPSTASH_TOKEN` environment variables to be set -- `vercel`: used by deployments from the Marketplace. It's single-tenant only and only supported by Vercel deployments done with Saleor CLI. Requires `SALEOR_REGISTER_APP_URL` and `SALEOR_DEPLOYMENT_TOKEN` environment variables to be set (handled automatically by the Saleor CLI) If you want to use your own database, you can implement your own APL. [Check the documentation to read more.](https://github.com/saleor/saleor-app-sdk/blob/main/docs/apl.md) diff --git a/apps/search/README.md b/apps/search/README.md index 2695f79..cac3c2b 100644 --- a/apps/search/README.md +++ b/apps/search/README.md @@ -80,6 +80,5 @@ The choice of the APL is done using `APL` environment variable. If value is not - `file`: no additional setup is required. Good choice for local development. Can't be used for multi tenant-apps or be deployed (not intended for production) - `upstash`: use [Upstash](https://upstash.com/) Redis as storage method. Free account required. Can be used for development and production and supports multi-tenancy. Requires `UPSTASH_URL` and `UPSTASH_TOKEN` environment variables to be set -- `vercel`: used by deployments from the Marketplace. It's single-tenant only and only supported by Vercel deployments done with Saleor CLI. Requires `SALEOR_REGISTER_APP_URL` and `SALEOR_DEPLOYMENT_TOKEN` environment variables to be set (handled automatically by the Saleor CLI) If you want to use your own database, you can implement your own APL. [Check the documentation to read more.](https://github.com/saleor/saleor-app-sdk/blob/main/docs/apl.md) diff --git a/apps/slack/env.d.ts b/apps/slack/env.d.ts index 9ecaf06..58003aa 100644 --- a/apps/slack/env.d.ts +++ b/apps/slack/env.d.ts @@ -1,5 +1,5 @@ namespace NodeJS { interface ProcessEnv { - APL: "file" | "vercel" | "upstash" | "saleor-cloud"; + APL: "file" | "upstash" | "saleor-cloud"; } }