Files
medusa-store/integration-tests/plugins/medusa-config.js
Riqwan Thamir 281b0746cf feat(medusa,workflows) Create cart workflow (#4685)
* chore: add baseline test for create cart

* chore: add basic paths into handlers + make first tests pass

* chore: move input alias to cart specific workflow

* chore: move data around into buckets

* chore: normalize handlers and introduce types

* chore: move aliases to handlers concern

* chore: add compensation step for create cart

* chore: merge with latest develop

* chore: handle error manually + type inputs

* chore: handle error manually

* chore: added types for each handler

* chore: remove addresses

* chore: added changset

* chore: undo package changes

* chore: added config settings to retreieve, cleanup of types

* chore: capitalize cart handlers

* chore: rename todo

* chore: add feature flag for workflow

* chore: reorder handlers

* chore: add logger to route handler

* chore: removed weird vscode moving around things

* chore: refactor handlers

* chore: refactor compensate step

* chore: changed poistion

* chore: aggregate config data

* chore: moved handlers to their own domain + pr review addressing

* chore: address pr reviews

* chore: move types to type package

* chore: update type to include config

* chore: remove error scoping
2023-08-08 12:10:27 +02:00

63 lines
1.5 KiB
JavaScript

const { Modules } = require("@medusajs/modules-sdk")
const { Workflows } = require("@medusajs/workflows")
const DB_HOST = process.env.DB_HOST
const DB_USERNAME = process.env.DB_USERNAME
const DB_PASSWORD = process.env.DB_PASSWORD
const DB_NAME = process.env.DB_TEMP_NAME
const DB_URL = `postgres://${DB_USERNAME}:${DB_PASSWORD}@${DB_HOST}/${DB_NAME}`
module.exports = {
plugins: [
{
resolve: `medusa-fulfillment-webshipper`,
options: {
account: "test-account",
api_token: "something",
order_channel_id: "1",
webhook_secret: "1234",
},
},
{
resolve: `medusa-plugin-sendgrid`,
options: {
api_key: "SG.TEST",
},
},
],
projectConfig: {
// redis_url: REDIS_URL,
database_url: DB_URL,
database_type: "postgres",
jwt_secret: "test",
cookie_secret: "test",
database_extra: { idle_in_transaction_session_timeout: 0 },
},
featureFlags: {
workflows: {
[Workflows.CreateProducts]: true,
[Workflows.CreateCart]: true,
},
},
modules: {
[Modules.STOCK_LOCATION]: {
scope: "internal",
resources: "shared",
resolve: "@medusajs/stock-location",
},
[Modules.INVENTORY]: {
scope: "internal",
resources: "shared",
resolve: "@medusajs/inventory",
},
[Modules.CACHE]: {
resolve: "@medusajs/cache-inmemory",
options: { ttl: 5 },
},
[Modules.PRODUCT]: {
scope: "internal",
resources: "shared",
resolve: "@medusajs/product",
},
},
}