From 0573bb924af508c2766b66f4852dfe4b863cabfd Mon Sep 17 00:00:00 2001 From: Riqwan Thamir Date: Thu, 5 Sep 2024 15:45:30 +0200 Subject: [PATCH] chore: Remove typeORM (#9005) * chore: rename js files to txt * chore: rename ts files to txt * chore: delete environment helpers * chore: convert global setup & teardown to txt * chore: rename helper js/ts files to txt * chore: rename seeder js/ts files to txt * chore: remove typeorm * chore: reintroduce used helpers --- ...tics-config.js => analytics-config.js.txt} | 0 .../admin/{discount.js => discount.js.txt} | 0 .../{draft-order.js => draft-order.js.txt} | 0 ...js => ff-tax-inclusive-draft-order.js.txt} | 0 .../{gift-cards.js => gift-cards.js.txt} | 0 .../__tests__/admin/{note.js => note.js.txt} | 0 ...ing.js => ff-tax-inclusive-pricing.js.txt} | 0 .../{order-edit.js => order-edit.js.txt} | 0 ...ing.js => ff-tax-inclusive-pricing.js.txt} | 0 .../admin/order/{order.js => order.js.txt} | 0 ...gories.js => ff-product-categories.js.txt} | 0 ...{return-reason.js => return-reason.js.txt} | 0 .../admin/{returns.js => returns.js.txt} | 0 .../admin/{swaps.js => swaps.js.txt} | 0 .../batch-jobs/{api.js => api.js.txt} | 0 .../order/{export.js => export.js.txt} | 0 .../price-list/{import.js => import.js.txt} | 0 .../claims/{index.js => index.js.txt} | 0 ...les-channel.js => ff-sales-channel.js.txt} | 0 .../{index.js => index.js.txt} | 0 .../{index.js => index.js.txt} | 0 ...-prices.js => tax-inclusive-prices.js.txt} | 0 ...ing.js => ff-tax-inclusive-pricing.js.txt} | 0 .../returns/{index.js => index.js.txt} | 0 .../__tests__/store/{auth.js => auth.js.txt} | 0 .../store/cart/{cart.js => cart.js.txt} | 0 ...s-channels.js => ff-sales-channels.js.txt} | 0 ...ing.js => ff-tax-inclusive-pricing.js.txt} | 0 ...> tax-calculation-ff-tax-inclusive.js.txt} | 0 ...-calculation.js => tax-calculation.js.txt} | 0 .../store/{customer.js => customer.js.txt} | 0 .../{draft-order.js => draft-order.js.txt} | 0 .../{gift-cards.js => gift-cards.js.txt} | 0 .../{order-edit.js => order-edit.js.txt} | 0 .../store/{orders.js => orders.js.txt} | 0 ...ollection.js => payment-collection.js.txt} | 0 ...ct-category.ts => product-category.ts.txt} | 0 .../{product-tags.js => product-tags.js.txt} | 0 .../{product-type.js => product-type.js.txt} | 0 ...ct-variants.js => product-variants.js.txt} | 0 .../store/{products.js => products.js.txt} | 0 ...gories.ts => ff-product-categories.ts.txt} | 0 .../store/{regions.js => regions.js.txt} | 0 ...{return-reason.js => return-reason.js.txt} | 0 .../store/{returns.js => returns.js.txt} | 0 ...ales-channels.js => sales-channels.js.txt} | 0 ...ing-options.js => shipping-options.js.txt} | 0 .../store/{swaps.js => swaps.js.txt} | 0 .../swaps/{index.js => index.js.txt} | 0 ...in-tax-rates.js => admin-tax-rates.js.txt} | 0 ...omatic-taxes.js => automatic-taxes.js.txt} | 0 .../__tests__/taxes/{cart.js => cart.js.txt} | 0 .../{manual-taxes.js => manual-taxes.js.txt} | 0 ...ing.js => ff-tax-inclusive-pricing.js.txt} | 0 .../taxes/orders/{orders.js => orders.js.txt} | 0 ...ing-options.js => shipping-options.js.txt} | 0 .../totals/{orders.js => orders.js.txt} | 0 integration-tests/api/jest.config.js | 4 +- integration-tests/api/package.json | 4 +- .../environment-helpers/use-db.js | 180 --------------- .../environment-helpers/use-template-db.js | 117 ---------- .../factories/{index.ts => index.ts.txt} | 0 ...ctory.ts => simple-address-factory.ts.txt} | 0 ...=> simple-analytics-config-factory.ts.txt} | 0 ...ory.ts => simple-batch-job-factory.ts.txt} | 0 ...-factory.ts => simple-cart-factory.ts.txt} | 0 ...ple-custom-shipping-option-factory.ts.txt} | 0 ...tory.ts => simple-customer-factory.ts.txt} | 0 ...s => simple-customer-group-factory.ts.txt} | 0 ...tory.ts => simple-discount-factory.ts.txt} | 0 ...ory.ts => simple-gift-card-factory.ts.txt} | 0 ...ory.ts => simple-line-item-factory.ts.txt} | 0 ...ry.ts => simple-order-edit-factory.ts.txt} | 0 ...factory.ts => simple-order-factory.ts.txt} | 0 ...> simple-order-item-change-factory.ts.txt} | 0 ... simple-payment-collection-factory.ts.txt} | 0 ...ctory.ts => simple-payment-factory.ts.txt} | 0 ...ry.ts => simple-price-list-factory.ts.txt} | 0 ...=> simple-product-category-factory.ts.txt} | 0 ... simple-product-collection-factory.ts.txt} | 0 ...ctory.ts => simple-product-factory.ts.txt} | 0 ...y.ts => simple-product-tag-factory.ts.txt} | 0 ...=> simple-product-tax-rate-factory.ts.txt} | 0 ...mple-product-type-tax-rate-factory.ts.txt} | 0 ... => simple-product-variant-factory.ts.txt} | 0 ...simple-publishable-api-key-factory.ts.txt} | 0 ...actory.ts => simple-region-factory.ts.txt} | 0 ...ts => simple-sales-channel-factory.ts.txt} | 0 ... => simple-shipping-method-factory.ts.txt} | 0 ... => simple-shipping-option-factory.ts.txt} | 0 ...=> simple-shipping-profile-factory.ts.txt} | 0 ...> simple-shipping-tax-rate-factory.ts.txt} | 0 ...factory.ts => simple-store-factory.ts.txt} | 0 ...tory.ts => simple-tax-rate-factory.ts.txt} | 0 .../{globalSetup.js => globalSetup.js.txt} | 0 ...lobalTeardown.js => globalTeardown.js.txt} | 0 .../{admin-seeder.js => admin-seeder.js.txt} | 0 ...-job-seeder.js => batch-job-seeder.js.txt} | 0 .../helpers/{breaking.ts => breaking.ts.txt} | 0 .../{call-helpers.js => call-helpers.js.txt} | 0 .../{cart-seeder.js => cart-seeder.js.txt} | 0 .../{claim-seeder.js => claim-seeder.js.txt} | 0 ...cation.ts => client-authentication.ts.txt} | 0 ...count-seeder.js => discount-seeder.js.txt} | 0 ...er-seeder.js => draft-order-seeder.js.txt} | 0 .../{order-seeder.js => order-seeder.js.txt} | 0 ...eeder.js => price-selection-seeder.js.txt} | 0 ...roduct-seeder.js => product-seeder.js.txt} | 0 ...-seeder.js => store-product-seeder.js.txt} | 0 .../{swap-seeder.js => swap-seeder.js.txt} | 0 .../{user-seeder.js => user-seeder.js.txt} | 0 integration-tests/jest.config.js | 4 +- .../admin/add-price-list-price-batch.spec.ts | 211 ------------------ .../delete-price-list-prices-by-product.ts | 154 ------------- .../delete-price-list-prices-by-variant.ts | 113 ---------- .../admin/delete-price-list-prices.ts | 127 ----------- .../price-lists/store/get-product.ts | 114 +++++----- .../modules/__tests__/pricing/get-product.ts | 121 ---------- integration-tests/modules/package.json | 3 +- integration-tests/tsconfig.json | 1 - packages/core/types/src/common/common.ts | 98 +------- .../core/types/src/common/config-module.ts | 3 +- .../src/transaction-base/transaction-base.ts | 6 +- yarn.lock | 206 +---------------- 124 files changed, 80 insertions(+), 1386 deletions(-) rename integration-tests/api/__tests__/admin/{analytics-config.js => analytics-config.js.txt} (100%) rename integration-tests/api/__tests__/admin/{discount.js => discount.js.txt} (100%) rename integration-tests/api/__tests__/admin/draft-order/{draft-order.js => draft-order.js.txt} (100%) rename integration-tests/api/__tests__/admin/draft-order/{ff-tax-inclusive-draft-order.js => ff-tax-inclusive-draft-order.js.txt} (100%) rename integration-tests/api/__tests__/admin/{gift-cards.js => gift-cards.js.txt} (100%) rename integration-tests/api/__tests__/admin/{note.js => note.js.txt} (100%) rename integration-tests/api/__tests__/admin/order-edit/{ff-tax-inclusive-pricing.js => ff-tax-inclusive-pricing.js.txt} (100%) rename integration-tests/api/__tests__/admin/order-edit/{order-edit.js => order-edit.js.txt} (100%) rename integration-tests/api/__tests__/admin/order/{ff-tax-inclusive-pricing.js => ff-tax-inclusive-pricing.js.txt} (100%) rename integration-tests/api/__tests__/admin/order/{order.js => order.js.txt} (100%) rename integration-tests/api/__tests__/admin/products/{ff-product-categories.js => ff-product-categories.js.txt} (100%) rename integration-tests/api/__tests__/admin/{return-reason.js => return-reason.js.txt} (100%) rename integration-tests/api/__tests__/admin/{returns.js => returns.js.txt} (100%) rename integration-tests/api/__tests__/admin/{swaps.js => swaps.js.txt} (100%) rename integration-tests/api/__tests__/batch-jobs/{api.js => api.js.txt} (100%) rename integration-tests/api/__tests__/batch-jobs/order/{export.js => export.js.txt} (100%) rename integration-tests/api/__tests__/batch-jobs/price-list/{import.js => import.js.txt} (100%) rename integration-tests/api/__tests__/claims/{index.js => index.js.txt} (100%) rename integration-tests/api/__tests__/line-item-adjustments/{ff-sales-channel.js => ff-sales-channel.js.txt} (100%) rename integration-tests/api/__tests__/line-item-adjustments/{index.js => index.js.txt} (100%) rename integration-tests/api/__tests__/price-selection/{index.js => index.js.txt} (100%) rename integration-tests/api/__tests__/price-selection/{tax-inclusive-prices.js => tax-inclusive-prices.js.txt} (100%) rename integration-tests/api/__tests__/returns/{ff-tax-inclusive-pricing.js => ff-tax-inclusive-pricing.js.txt} (100%) rename integration-tests/api/__tests__/returns/{index.js => index.js.txt} (100%) rename integration-tests/api/__tests__/store/{auth.js => auth.js.txt} (100%) rename integration-tests/api/__tests__/store/cart/{cart.js => cart.js.txt} (100%) rename integration-tests/api/__tests__/store/cart/{ff-sales-channels.js => ff-sales-channels.js.txt} (100%) rename integration-tests/api/__tests__/store/cart/{ff-tax-inclusive-pricing.js => ff-tax-inclusive-pricing.js.txt} (100%) rename integration-tests/api/__tests__/store/cart/gift-cards/{tax-calculation-ff-tax-inclusive.js => tax-calculation-ff-tax-inclusive.js.txt} (100%) rename integration-tests/api/__tests__/store/cart/gift-cards/{tax-calculation.js => tax-calculation.js.txt} (100%) rename integration-tests/api/__tests__/store/{customer.js => customer.js.txt} (100%) rename integration-tests/api/__tests__/store/{draft-order.js => draft-order.js.txt} (100%) rename integration-tests/api/__tests__/store/{gift-cards.js => gift-cards.js.txt} (100%) rename integration-tests/api/__tests__/store/{order-edit.js => order-edit.js.txt} (100%) rename integration-tests/api/__tests__/store/{orders.js => orders.js.txt} (100%) rename integration-tests/api/__tests__/store/{payment-collection.js => payment-collection.js.txt} (100%) rename integration-tests/api/__tests__/store/{product-category.ts => product-category.ts.txt} (100%) rename integration-tests/api/__tests__/store/{product-tags.js => product-tags.js.txt} (100%) rename integration-tests/api/__tests__/store/{product-type.js => product-type.js.txt} (100%) rename integration-tests/api/__tests__/store/{product-variants.js => product-variants.js.txt} (100%) rename integration-tests/api/__tests__/store/{products.js => products.js.txt} (100%) rename integration-tests/api/__tests__/store/products/{ff-product-categories.ts => ff-product-categories.ts.txt} (100%) rename integration-tests/api/__tests__/store/{regions.js => regions.js.txt} (100%) rename integration-tests/api/__tests__/store/{return-reason.js => return-reason.js.txt} (100%) rename integration-tests/api/__tests__/store/{returns.js => returns.js.txt} (100%) rename integration-tests/api/__tests__/store/{sales-channels.js => sales-channels.js.txt} (100%) rename integration-tests/api/__tests__/store/{shipping-options.js => shipping-options.js.txt} (100%) rename integration-tests/api/__tests__/store/{swaps.js => swaps.js.txt} (100%) rename integration-tests/api/__tests__/swaps/{index.js => index.js.txt} (100%) rename integration-tests/api/__tests__/taxes/{admin-tax-rates.js => admin-tax-rates.js.txt} (100%) rename integration-tests/api/__tests__/taxes/{automatic-taxes.js => automatic-taxes.js.txt} (100%) rename integration-tests/api/__tests__/taxes/{cart.js => cart.js.txt} (100%) rename integration-tests/api/__tests__/taxes/{manual-taxes.js => manual-taxes.js.txt} (100%) rename integration-tests/api/__tests__/taxes/orders/{ff-tax-inclusive-pricing.js => ff-tax-inclusive-pricing.js.txt} (100%) rename integration-tests/api/__tests__/taxes/orders/{orders.js => orders.js.txt} (100%) rename integration-tests/api/__tests__/taxes/{shipping-options.js => shipping-options.js.txt} (100%) rename integration-tests/api/__tests__/totals/{orders.js => orders.js.txt} (100%) delete mode 100644 integration-tests/environment-helpers/use-db.js delete mode 100644 integration-tests/environment-helpers/use-template-db.js rename integration-tests/factories/{index.ts => index.ts.txt} (100%) rename integration-tests/factories/{simple-address-factory.ts => simple-address-factory.ts.txt} (100%) rename integration-tests/factories/{simple-analytics-config-factory.ts => simple-analytics-config-factory.ts.txt} (100%) rename integration-tests/factories/{simple-batch-job-factory.ts => simple-batch-job-factory.ts.txt} (100%) rename integration-tests/factories/{simple-cart-factory.ts => simple-cart-factory.ts.txt} (100%) rename integration-tests/factories/{simple-custom-shipping-option-factory.ts => simple-custom-shipping-option-factory.ts.txt} (100%) rename integration-tests/factories/{simple-customer-factory.ts => simple-customer-factory.ts.txt} (100%) rename integration-tests/factories/{simple-customer-group-factory.ts => simple-customer-group-factory.ts.txt} (100%) rename integration-tests/factories/{simple-discount-factory.ts => simple-discount-factory.ts.txt} (100%) rename integration-tests/factories/{simple-gift-card-factory.ts => simple-gift-card-factory.ts.txt} (100%) rename integration-tests/factories/{simple-line-item-factory.ts => simple-line-item-factory.ts.txt} (100%) rename integration-tests/factories/{simple-order-edit-factory.ts => simple-order-edit-factory.ts.txt} (100%) rename integration-tests/factories/{simple-order-factory.ts => simple-order-factory.ts.txt} (100%) rename integration-tests/factories/{simple-order-item-change-factory.ts => simple-order-item-change-factory.ts.txt} (100%) rename integration-tests/factories/{simple-payment-collection-factory.ts => simple-payment-collection-factory.ts.txt} (100%) rename integration-tests/factories/{simple-payment-factory.ts => simple-payment-factory.ts.txt} (100%) rename integration-tests/factories/{simple-price-list-factory.ts => simple-price-list-factory.ts.txt} (100%) rename integration-tests/factories/{simple-product-category-factory.ts => simple-product-category-factory.ts.txt} (100%) rename integration-tests/factories/{simple-product-collection-factory.ts => simple-product-collection-factory.ts.txt} (100%) rename integration-tests/factories/{simple-product-factory.ts => simple-product-factory.ts.txt} (100%) rename integration-tests/factories/{simple-product-tag-factory.ts => simple-product-tag-factory.ts.txt} (100%) rename integration-tests/factories/{simple-product-tax-rate-factory.ts => simple-product-tax-rate-factory.ts.txt} (100%) rename integration-tests/factories/{simple-product-type-tax-rate-factory.ts => simple-product-type-tax-rate-factory.ts.txt} (100%) rename integration-tests/factories/{simple-product-variant-factory.ts => simple-product-variant-factory.ts.txt} (100%) rename integration-tests/factories/{simple-publishable-api-key-factory.ts => simple-publishable-api-key-factory.ts.txt} (100%) rename integration-tests/factories/{simple-region-factory.ts => simple-region-factory.ts.txt} (100%) rename integration-tests/factories/{simple-sales-channel-factory.ts => simple-sales-channel-factory.ts.txt} (100%) rename integration-tests/factories/{simple-shipping-method-factory.ts => simple-shipping-method-factory.ts.txt} (100%) rename integration-tests/factories/{simple-shipping-option-factory.ts => simple-shipping-option-factory.ts.txt} (100%) rename integration-tests/factories/{simple-shipping-profile-factory.ts => simple-shipping-profile-factory.ts.txt} (100%) rename integration-tests/factories/{simple-shipping-tax-rate-factory.ts => simple-shipping-tax-rate-factory.ts.txt} (100%) rename integration-tests/factories/{simple-store-factory.ts => simple-store-factory.ts.txt} (100%) rename integration-tests/factories/{simple-tax-rate-factory.ts => simple-tax-rate-factory.ts.txt} (100%) rename integration-tests/{globalSetup.js => globalSetup.js.txt} (100%) rename integration-tests/{globalTeardown.js => globalTeardown.js.txt} (100%) rename integration-tests/helpers/{admin-seeder.js => admin-seeder.js.txt} (100%) rename integration-tests/helpers/{batch-job-seeder.js => batch-job-seeder.js.txt} (100%) rename integration-tests/helpers/{breaking.ts => breaking.ts.txt} (100%) rename integration-tests/helpers/{call-helpers.js => call-helpers.js.txt} (100%) rename integration-tests/helpers/{cart-seeder.js => cart-seeder.js.txt} (100%) rename integration-tests/helpers/{claim-seeder.js => claim-seeder.js.txt} (100%) rename integration-tests/helpers/{client-authentication.ts => client-authentication.ts.txt} (100%) rename integration-tests/helpers/{discount-seeder.js => discount-seeder.js.txt} (100%) rename integration-tests/helpers/{draft-order-seeder.js => draft-order-seeder.js.txt} (100%) rename integration-tests/helpers/{order-seeder.js => order-seeder.js.txt} (100%) rename integration-tests/helpers/{price-selection-seeder.js => price-selection-seeder.js.txt} (100%) rename integration-tests/helpers/{product-seeder.js => product-seeder.js.txt} (100%) rename integration-tests/helpers/{store-product-seeder.js => store-product-seeder.js.txt} (100%) rename integration-tests/helpers/{swap-seeder.js => swap-seeder.js.txt} (100%) rename integration-tests/helpers/{user-seeder.js => user-seeder.js.txt} (100%) delete mode 100644 integration-tests/modules/__tests__/price-lists/admin/add-price-list-price-batch.spec.ts delete mode 100644 integration-tests/modules/__tests__/price-lists/admin/delete-price-list-prices-by-product.ts delete mode 100644 integration-tests/modules/__tests__/price-lists/admin/delete-price-list-prices-by-variant.ts delete mode 100644 integration-tests/modules/__tests__/price-lists/admin/delete-price-list-prices.ts delete mode 100644 integration-tests/modules/__tests__/pricing/get-product.ts diff --git a/integration-tests/api/__tests__/admin/analytics-config.js b/integration-tests/api/__tests__/admin/analytics-config.js.txt similarity index 100% rename from integration-tests/api/__tests__/admin/analytics-config.js rename to integration-tests/api/__tests__/admin/analytics-config.js.txt diff --git a/integration-tests/api/__tests__/admin/discount.js b/integration-tests/api/__tests__/admin/discount.js.txt similarity index 100% rename from integration-tests/api/__tests__/admin/discount.js rename to integration-tests/api/__tests__/admin/discount.js.txt diff --git a/integration-tests/api/__tests__/admin/draft-order/draft-order.js b/integration-tests/api/__tests__/admin/draft-order/draft-order.js.txt similarity index 100% rename from integration-tests/api/__tests__/admin/draft-order/draft-order.js rename to integration-tests/api/__tests__/admin/draft-order/draft-order.js.txt diff --git a/integration-tests/api/__tests__/admin/draft-order/ff-tax-inclusive-draft-order.js b/integration-tests/api/__tests__/admin/draft-order/ff-tax-inclusive-draft-order.js.txt similarity index 100% rename from integration-tests/api/__tests__/admin/draft-order/ff-tax-inclusive-draft-order.js rename to integration-tests/api/__tests__/admin/draft-order/ff-tax-inclusive-draft-order.js.txt diff --git a/integration-tests/api/__tests__/admin/gift-cards.js b/integration-tests/api/__tests__/admin/gift-cards.js.txt similarity index 100% rename from integration-tests/api/__tests__/admin/gift-cards.js rename to integration-tests/api/__tests__/admin/gift-cards.js.txt diff --git a/integration-tests/api/__tests__/admin/note.js b/integration-tests/api/__tests__/admin/note.js.txt similarity index 100% rename from integration-tests/api/__tests__/admin/note.js rename to integration-tests/api/__tests__/admin/note.js.txt diff --git a/integration-tests/api/__tests__/admin/order-edit/ff-tax-inclusive-pricing.js b/integration-tests/api/__tests__/admin/order-edit/ff-tax-inclusive-pricing.js.txt similarity index 100% rename from integration-tests/api/__tests__/admin/order-edit/ff-tax-inclusive-pricing.js rename to integration-tests/api/__tests__/admin/order-edit/ff-tax-inclusive-pricing.js.txt diff --git a/integration-tests/api/__tests__/admin/order-edit/order-edit.js b/integration-tests/api/__tests__/admin/order-edit/order-edit.js.txt similarity index 100% rename from integration-tests/api/__tests__/admin/order-edit/order-edit.js rename to integration-tests/api/__tests__/admin/order-edit/order-edit.js.txt diff --git a/integration-tests/api/__tests__/admin/order/ff-tax-inclusive-pricing.js b/integration-tests/api/__tests__/admin/order/ff-tax-inclusive-pricing.js.txt similarity index 100% rename from integration-tests/api/__tests__/admin/order/ff-tax-inclusive-pricing.js rename to integration-tests/api/__tests__/admin/order/ff-tax-inclusive-pricing.js.txt diff --git a/integration-tests/api/__tests__/admin/order/order.js b/integration-tests/api/__tests__/admin/order/order.js.txt similarity index 100% rename from integration-tests/api/__tests__/admin/order/order.js rename to integration-tests/api/__tests__/admin/order/order.js.txt diff --git a/integration-tests/api/__tests__/admin/products/ff-product-categories.js b/integration-tests/api/__tests__/admin/products/ff-product-categories.js.txt similarity index 100% rename from integration-tests/api/__tests__/admin/products/ff-product-categories.js rename to integration-tests/api/__tests__/admin/products/ff-product-categories.js.txt diff --git a/integration-tests/api/__tests__/admin/return-reason.js b/integration-tests/api/__tests__/admin/return-reason.js.txt similarity index 100% rename from integration-tests/api/__tests__/admin/return-reason.js rename to integration-tests/api/__tests__/admin/return-reason.js.txt diff --git a/integration-tests/api/__tests__/admin/returns.js b/integration-tests/api/__tests__/admin/returns.js.txt similarity index 100% rename from integration-tests/api/__tests__/admin/returns.js rename to integration-tests/api/__tests__/admin/returns.js.txt diff --git a/integration-tests/api/__tests__/admin/swaps.js b/integration-tests/api/__tests__/admin/swaps.js.txt similarity index 100% rename from integration-tests/api/__tests__/admin/swaps.js rename to integration-tests/api/__tests__/admin/swaps.js.txt diff --git a/integration-tests/api/__tests__/batch-jobs/api.js b/integration-tests/api/__tests__/batch-jobs/api.js.txt similarity index 100% rename from integration-tests/api/__tests__/batch-jobs/api.js rename to integration-tests/api/__tests__/batch-jobs/api.js.txt diff --git a/integration-tests/api/__tests__/batch-jobs/order/export.js b/integration-tests/api/__tests__/batch-jobs/order/export.js.txt similarity index 100% rename from integration-tests/api/__tests__/batch-jobs/order/export.js rename to integration-tests/api/__tests__/batch-jobs/order/export.js.txt diff --git a/integration-tests/api/__tests__/batch-jobs/price-list/import.js b/integration-tests/api/__tests__/batch-jobs/price-list/import.js.txt similarity index 100% rename from integration-tests/api/__tests__/batch-jobs/price-list/import.js rename to integration-tests/api/__tests__/batch-jobs/price-list/import.js.txt diff --git a/integration-tests/api/__tests__/claims/index.js b/integration-tests/api/__tests__/claims/index.js.txt similarity index 100% rename from integration-tests/api/__tests__/claims/index.js rename to integration-tests/api/__tests__/claims/index.js.txt diff --git a/integration-tests/api/__tests__/line-item-adjustments/ff-sales-channel.js b/integration-tests/api/__tests__/line-item-adjustments/ff-sales-channel.js.txt similarity index 100% rename from integration-tests/api/__tests__/line-item-adjustments/ff-sales-channel.js rename to integration-tests/api/__tests__/line-item-adjustments/ff-sales-channel.js.txt diff --git a/integration-tests/api/__tests__/line-item-adjustments/index.js b/integration-tests/api/__tests__/line-item-adjustments/index.js.txt similarity index 100% rename from integration-tests/api/__tests__/line-item-adjustments/index.js rename to integration-tests/api/__tests__/line-item-adjustments/index.js.txt diff --git a/integration-tests/api/__tests__/price-selection/index.js b/integration-tests/api/__tests__/price-selection/index.js.txt similarity index 100% rename from integration-tests/api/__tests__/price-selection/index.js rename to integration-tests/api/__tests__/price-selection/index.js.txt diff --git a/integration-tests/api/__tests__/price-selection/tax-inclusive-prices.js b/integration-tests/api/__tests__/price-selection/tax-inclusive-prices.js.txt similarity index 100% rename from integration-tests/api/__tests__/price-selection/tax-inclusive-prices.js rename to integration-tests/api/__tests__/price-selection/tax-inclusive-prices.js.txt diff --git a/integration-tests/api/__tests__/returns/ff-tax-inclusive-pricing.js b/integration-tests/api/__tests__/returns/ff-tax-inclusive-pricing.js.txt similarity index 100% rename from integration-tests/api/__tests__/returns/ff-tax-inclusive-pricing.js rename to integration-tests/api/__tests__/returns/ff-tax-inclusive-pricing.js.txt diff --git a/integration-tests/api/__tests__/returns/index.js b/integration-tests/api/__tests__/returns/index.js.txt similarity index 100% rename from integration-tests/api/__tests__/returns/index.js rename to integration-tests/api/__tests__/returns/index.js.txt diff --git a/integration-tests/api/__tests__/store/auth.js b/integration-tests/api/__tests__/store/auth.js.txt similarity index 100% rename from integration-tests/api/__tests__/store/auth.js rename to integration-tests/api/__tests__/store/auth.js.txt diff --git a/integration-tests/api/__tests__/store/cart/cart.js b/integration-tests/api/__tests__/store/cart/cart.js.txt similarity index 100% rename from integration-tests/api/__tests__/store/cart/cart.js rename to integration-tests/api/__tests__/store/cart/cart.js.txt diff --git a/integration-tests/api/__tests__/store/cart/ff-sales-channels.js b/integration-tests/api/__tests__/store/cart/ff-sales-channels.js.txt similarity index 100% rename from integration-tests/api/__tests__/store/cart/ff-sales-channels.js rename to integration-tests/api/__tests__/store/cart/ff-sales-channels.js.txt diff --git a/integration-tests/api/__tests__/store/cart/ff-tax-inclusive-pricing.js b/integration-tests/api/__tests__/store/cart/ff-tax-inclusive-pricing.js.txt similarity index 100% rename from integration-tests/api/__tests__/store/cart/ff-tax-inclusive-pricing.js rename to integration-tests/api/__tests__/store/cart/ff-tax-inclusive-pricing.js.txt diff --git a/integration-tests/api/__tests__/store/cart/gift-cards/tax-calculation-ff-tax-inclusive.js b/integration-tests/api/__tests__/store/cart/gift-cards/tax-calculation-ff-tax-inclusive.js.txt similarity index 100% rename from integration-tests/api/__tests__/store/cart/gift-cards/tax-calculation-ff-tax-inclusive.js rename to integration-tests/api/__tests__/store/cart/gift-cards/tax-calculation-ff-tax-inclusive.js.txt diff --git a/integration-tests/api/__tests__/store/cart/gift-cards/tax-calculation.js b/integration-tests/api/__tests__/store/cart/gift-cards/tax-calculation.js.txt similarity index 100% rename from integration-tests/api/__tests__/store/cart/gift-cards/tax-calculation.js rename to integration-tests/api/__tests__/store/cart/gift-cards/tax-calculation.js.txt diff --git a/integration-tests/api/__tests__/store/customer.js b/integration-tests/api/__tests__/store/customer.js.txt similarity index 100% rename from integration-tests/api/__tests__/store/customer.js rename to integration-tests/api/__tests__/store/customer.js.txt diff --git a/integration-tests/api/__tests__/store/draft-order.js b/integration-tests/api/__tests__/store/draft-order.js.txt similarity index 100% rename from integration-tests/api/__tests__/store/draft-order.js rename to integration-tests/api/__tests__/store/draft-order.js.txt diff --git a/integration-tests/api/__tests__/store/gift-cards.js b/integration-tests/api/__tests__/store/gift-cards.js.txt similarity index 100% rename from integration-tests/api/__tests__/store/gift-cards.js rename to integration-tests/api/__tests__/store/gift-cards.js.txt diff --git a/integration-tests/api/__tests__/store/order-edit.js b/integration-tests/api/__tests__/store/order-edit.js.txt similarity index 100% rename from integration-tests/api/__tests__/store/order-edit.js rename to integration-tests/api/__tests__/store/order-edit.js.txt diff --git a/integration-tests/api/__tests__/store/orders.js b/integration-tests/api/__tests__/store/orders.js.txt similarity index 100% rename from integration-tests/api/__tests__/store/orders.js rename to integration-tests/api/__tests__/store/orders.js.txt diff --git a/integration-tests/api/__tests__/store/payment-collection.js b/integration-tests/api/__tests__/store/payment-collection.js.txt similarity index 100% rename from integration-tests/api/__tests__/store/payment-collection.js rename to integration-tests/api/__tests__/store/payment-collection.js.txt diff --git a/integration-tests/api/__tests__/store/product-category.ts b/integration-tests/api/__tests__/store/product-category.ts.txt similarity index 100% rename from integration-tests/api/__tests__/store/product-category.ts rename to integration-tests/api/__tests__/store/product-category.ts.txt diff --git a/integration-tests/api/__tests__/store/product-tags.js b/integration-tests/api/__tests__/store/product-tags.js.txt similarity index 100% rename from integration-tests/api/__tests__/store/product-tags.js rename to integration-tests/api/__tests__/store/product-tags.js.txt diff --git a/integration-tests/api/__tests__/store/product-type.js b/integration-tests/api/__tests__/store/product-type.js.txt similarity index 100% rename from integration-tests/api/__tests__/store/product-type.js rename to integration-tests/api/__tests__/store/product-type.js.txt diff --git a/integration-tests/api/__tests__/store/product-variants.js b/integration-tests/api/__tests__/store/product-variants.js.txt similarity index 100% rename from integration-tests/api/__tests__/store/product-variants.js rename to integration-tests/api/__tests__/store/product-variants.js.txt diff --git a/integration-tests/api/__tests__/store/products.js b/integration-tests/api/__tests__/store/products.js.txt similarity index 100% rename from integration-tests/api/__tests__/store/products.js rename to integration-tests/api/__tests__/store/products.js.txt diff --git a/integration-tests/api/__tests__/store/products/ff-product-categories.ts b/integration-tests/api/__tests__/store/products/ff-product-categories.ts.txt similarity index 100% rename from integration-tests/api/__tests__/store/products/ff-product-categories.ts rename to integration-tests/api/__tests__/store/products/ff-product-categories.ts.txt diff --git a/integration-tests/api/__tests__/store/regions.js b/integration-tests/api/__tests__/store/regions.js.txt similarity index 100% rename from integration-tests/api/__tests__/store/regions.js rename to integration-tests/api/__tests__/store/regions.js.txt diff --git a/integration-tests/api/__tests__/store/return-reason.js b/integration-tests/api/__tests__/store/return-reason.js.txt similarity index 100% rename from integration-tests/api/__tests__/store/return-reason.js rename to integration-tests/api/__tests__/store/return-reason.js.txt diff --git a/integration-tests/api/__tests__/store/returns.js b/integration-tests/api/__tests__/store/returns.js.txt similarity index 100% rename from integration-tests/api/__tests__/store/returns.js rename to integration-tests/api/__tests__/store/returns.js.txt diff --git a/integration-tests/api/__tests__/store/sales-channels.js b/integration-tests/api/__tests__/store/sales-channels.js.txt similarity index 100% rename from integration-tests/api/__tests__/store/sales-channels.js rename to integration-tests/api/__tests__/store/sales-channels.js.txt diff --git a/integration-tests/api/__tests__/store/shipping-options.js b/integration-tests/api/__tests__/store/shipping-options.js.txt similarity index 100% rename from integration-tests/api/__tests__/store/shipping-options.js rename to integration-tests/api/__tests__/store/shipping-options.js.txt diff --git a/integration-tests/api/__tests__/store/swaps.js b/integration-tests/api/__tests__/store/swaps.js.txt similarity index 100% rename from integration-tests/api/__tests__/store/swaps.js rename to integration-tests/api/__tests__/store/swaps.js.txt diff --git a/integration-tests/api/__tests__/swaps/index.js b/integration-tests/api/__tests__/swaps/index.js.txt similarity index 100% rename from integration-tests/api/__tests__/swaps/index.js rename to integration-tests/api/__tests__/swaps/index.js.txt diff --git a/integration-tests/api/__tests__/taxes/admin-tax-rates.js b/integration-tests/api/__tests__/taxes/admin-tax-rates.js.txt similarity index 100% rename from integration-tests/api/__tests__/taxes/admin-tax-rates.js rename to integration-tests/api/__tests__/taxes/admin-tax-rates.js.txt diff --git a/integration-tests/api/__tests__/taxes/automatic-taxes.js b/integration-tests/api/__tests__/taxes/automatic-taxes.js.txt similarity index 100% rename from integration-tests/api/__tests__/taxes/automatic-taxes.js rename to integration-tests/api/__tests__/taxes/automatic-taxes.js.txt diff --git a/integration-tests/api/__tests__/taxes/cart.js b/integration-tests/api/__tests__/taxes/cart.js.txt similarity index 100% rename from integration-tests/api/__tests__/taxes/cart.js rename to integration-tests/api/__tests__/taxes/cart.js.txt diff --git a/integration-tests/api/__tests__/taxes/manual-taxes.js b/integration-tests/api/__tests__/taxes/manual-taxes.js.txt similarity index 100% rename from integration-tests/api/__tests__/taxes/manual-taxes.js rename to integration-tests/api/__tests__/taxes/manual-taxes.js.txt diff --git a/integration-tests/api/__tests__/taxes/orders/ff-tax-inclusive-pricing.js b/integration-tests/api/__tests__/taxes/orders/ff-tax-inclusive-pricing.js.txt similarity index 100% rename from integration-tests/api/__tests__/taxes/orders/ff-tax-inclusive-pricing.js rename to integration-tests/api/__tests__/taxes/orders/ff-tax-inclusive-pricing.js.txt diff --git a/integration-tests/api/__tests__/taxes/orders/orders.js b/integration-tests/api/__tests__/taxes/orders/orders.js.txt similarity index 100% rename from integration-tests/api/__tests__/taxes/orders/orders.js rename to integration-tests/api/__tests__/taxes/orders/orders.js.txt diff --git a/integration-tests/api/__tests__/taxes/shipping-options.js b/integration-tests/api/__tests__/taxes/shipping-options.js.txt similarity index 100% rename from integration-tests/api/__tests__/taxes/shipping-options.js rename to integration-tests/api/__tests__/taxes/shipping-options.js.txt diff --git a/integration-tests/api/__tests__/totals/orders.js b/integration-tests/api/__tests__/totals/orders.js.txt similarity index 100% rename from integration-tests/api/__tests__/totals/orders.js rename to integration-tests/api/__tests__/totals/orders.js.txt diff --git a/integration-tests/api/jest.config.js b/integration-tests/api/jest.config.js index 9fcdad908e..990c4a229b 100644 --- a/integration-tests/api/jest.config.js +++ b/integration-tests/api/jest.config.js @@ -29,6 +29,6 @@ module.exports = { }, setupFiles: ["../setup-env.js"], setupFilesAfterEnv: ["../setup.js"], - globalSetup: "../globalSetup.js", - globalTeardown: "../globalTeardown.js", + // globalSetup: "../globalSetup.js", + // globalTeardown: "../globalTeardown.js", } diff --git a/integration-tests/api/package.json b/integration-tests/api/package.json index 3234b9c25d..3413fc2489 100644 --- a/integration-tests/api/package.json +++ b/integration-tests/api/package.json @@ -15,7 +15,6 @@ "@medusajs/cache-inmemory": "workspace:*", "@medusajs/customer": "workspace:^", "@medusajs/event-bus-local": "workspace:*", - "@medusajs/inventory": "latest", "@medusajs/medusa": "workspace:*", "@medusajs/modules-sdk": "workspace:^", "@medusajs/pricing": "workspace:^", @@ -28,8 +27,7 @@ "@medusajs/utils": "workspace:^", "@medusajs/workflow-engine-inmemory": "workspace:*", "faker": "^5.5.3", - "pg": "^8.11.3", - "typeorm": "^0.3.16" + "pg": "^8.11.3" }, "devDependencies": { "@swc/core": "^1.4.8", diff --git a/integration-tests/environment-helpers/use-db.js b/integration-tests/environment-helpers/use-db.js deleted file mode 100644 index c0ed873fd6..0000000000 --- a/integration-tests/environment-helpers/use-db.js +++ /dev/null @@ -1,180 +0,0 @@ -const path = require("path") - -const { getConfigFile } = require("@medusajs/utils") -const { asValue } = require("awilix") -const { isObject, MedusaV2Flag } = require("@medusajs/utils") -const { dropDatabase } = require("pg-god") -const { DataSource } = require("typeorm") -const dbFactory = require("./use-template-db") -const { ContainerRegistrationKeys } = require("@medusajs/utils") -const { - runMedusaAppMigrations, -} = require("@medusajs/medusa/dist/loaders/medusa-app") - -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}` - -const pgGodCredentials = { - user: DB_USERNAME, - password: DB_PASSWORD, - host: DB_HOST, -} - -const keepTables = [ - "store", - "staged_job", - "shipping_profile", - "fulfillment_provider", - "payment_provider", - "country", - "region_country", - "currency", - "migrations", - "mikro_orm_migrations", -] - -const DbTestUtil = { - db_: null, - pgConnection_: null, - - setDb: function (dataSource) { - this.db_ = dataSource - }, - - setPgConnection: function (pgConnection) { - this.pgConnection_ = pgConnection - }, - - clear: function () { - this.db_.synchronize(true) - }, - - teardown: async function ({ forceDelete } = {}) { - forceDelete = forceDelete || [] - const manager = this.db_.manager - - await manager.query(`SET session_replication_role = 'replica';`) - const tableNames = await manager.query(`SELECT table_name - FROM information_schema.tables - WHERE table_schema = 'public';`) - - for (const { table_name } of tableNames) { - if ( - keepTables.includes(table_name) && - !forceDelete.includes(table_name) - ) { - continue - } - - await manager.query(`DELETE - FROM "${table_name}";`) - } - - await manager.query(`SET session_replication_role = 'origin';`) - }, - - shutdown: async function () { - await this.db_?.destroy() - await this.pgConnection_?.context?.destroy() - - return await dropDatabase({ databaseName: DB_NAME }, pgGodCredentials) - }, -} - -const instance = DbTestUtil - -module.exports = { - initDb: async function ({ - cwd, - databaseExtra, - env, - force_modules_migration, - }) { - if (isObject(env)) { - Object.entries(env).forEach(([k, v]) => (process.env[k] = v)) - } - - const { - featureFlagsLoader, - configLoader, - container, - pgConnectionLoader, - } = require("@medusajs/framework") - - const configModule = configLoader(cwd, `medusa-config`) - const featureFlagRouter = await featureFlagsLoader() - const modelsLoader = require("@medusajs/medusa/dist/loaders/models").default - const entities = modelsLoader({}, { register: false }) - - await dbFactory.createFromTemplate(DB_NAME) - - // get migrations with enabled featureflags - const migrationDir = path.resolve( - path.join( - __dirname, - `../../`, - `node_modules`, - `@medusajs`, - `medusa`, - `dist`, - `migrations`, - `*.js` - ) - ) - - const { - getEnabledMigrations, - getModuleSharedResources, - } = require("@medusajs/medusa/dist/commands/utils/get-migrations") - - const { migrations: moduleMigrations, models: moduleModels } = - getModuleSharedResources(configModule, featureFlagRouter) - - const enabledMigrations = getEnabledMigrations([migrationDir], (flag) => - featureFlagRouter.isFeatureEnabled(flag) - ) - - const enabledEntities = entities.filter( - (e) => typeof e.isFeatureEnabled === "undefined" || e.isFeatureEnabled() - ) - - const dbDataSource = new DataSource({ - type: "postgres", - url: DB_URL, - entities: enabledEntities.concat(moduleModels), - migrations: enabledMigrations.concat(moduleMigrations), - extra: databaseExtra ?? {}, - name: "integration-tests", - }) - - await dbDataSource.initialize() - - await dbDataSource.runMigrations() - - instance.setDb(dbDataSource) - - if ( - force_modules_migration || - featureFlagRouter.isFeatureEnabled(MedusaV2Flag.key) - ) { - const pgConnection = pgConnectionLoader() - - container.register({ - [ContainerRegistrationKeys.LOGGER]: asValue(console), - [ContainerRegistrationKeys.MANAGER]: asValue(dbDataSource.manager), - }) - - instance.setPgConnection(pgConnection) - - await runMedusaAppMigrations({ configModule, container }) - } - - return dbDataSource - }, - useDb: function () { - return instance - }, -} diff --git a/integration-tests/environment-helpers/use-template-db.js b/integration-tests/environment-helpers/use-template-db.js deleted file mode 100644 index c608b0fe11..0000000000 --- a/integration-tests/environment-helpers/use-template-db.js +++ /dev/null @@ -1,117 +0,0 @@ -const path = require("path") - -require("dotenv").config({ path: path.join(__dirname, "../.env.test") }) - -const { getConfigFile } = require("@medusajs/utils") -const { createDatabase, dropDatabase } = require("pg-god") -const { DataSource } = require("typeorm") - -const DB_HOST = process.env.DB_HOST -const DB_USERNAME = process.env.DB_USERNAME -const DB_PASSWORD = process.env.DB_PASSWORD -const DB_URL = `postgres://${DB_USERNAME}:${DB_PASSWORD}@${DB_HOST}` - -let masterDataSource - -const pgGodCredentials = { - user: DB_USERNAME, - password: DB_PASSWORD, - host: DB_HOST, -} - -class DatabaseFactory { - constructor() { - this.masterDataSourceName = "master" - this.templateDbName = "medusa-integration-template" - } - - async createTemplateDb_({ cwd }) { - const { configModule } = getConfigFile(cwd, `medusa-config`) - - const migrationDir = path.resolve( - path.join( - __dirname, - `../../`, - `node_modules`, - `@medusajs`, - `medusa`, - `dist`, - `migrations`, - `*.js` - ) - ) - - const { - getEnabledMigrations, - getModuleSharedResources, - } = require("@medusajs/medusa/dist/commands/utils/get-migrations") - - // filter migrations to only include those that don't have feature flags - const enabledMigrations = getEnabledMigrations( - [migrationDir], - (flag) => false - ) - - const { migrations: moduleMigrations } = - getModuleSharedResources(configModule) - - await dropDatabase( - { - databaseName: this.templateDbName, - errorIfNonExist: false, - }, - pgGodCredentials - ) - await createDatabase( - { databaseName: this.templateDbName }, - pgGodCredentials - ) - - const templateDbDataSource = new DataSource({ - type: "postgres", - name: "templateDataSource", - url: `${DB_URL}/${this.templateDbName}`, - migrations: enabledMigrations.concat(moduleMigrations), - }) - - await templateDbDataSource.initialize() - - await templateDbDataSource.runMigrations() - - await templateDbDataSource.destroy() - } - - async getMasterDataSource() { - masterDataSource = masterDataSource || (await this.createMasterDataSource()) - return masterDataSource - } - - async createMasterDataSource() { - const dataSource = new DataSource({ - type: "postgres", - name: this.masterDataSourceName, - url: `${DB_URL}`, - }) - await dataSource.initialize() - - return dataSource - } - - async createFromTemplate(dbName) { - const dataSource = await this.getMasterDataSource() - - await dropDatabase({ databaseName: dbName }, pgGodCredentials) - await dataSource.query( - `CREATE DATABASE "${dbName}" TEMPLATE "${this.templateDbName}";` - ) - } - - async destroy() { - const dataSource = await this.getMasterDataSource() - - await dataSource.query(`DROP DATABASE IF EXISTS "${this.templateDbName}";`) - await dataSource.destroy() - } -} - -module.exports = new DatabaseFactory() diff --git a/integration-tests/factories/index.ts b/integration-tests/factories/index.ts.txt similarity index 100% rename from integration-tests/factories/index.ts rename to integration-tests/factories/index.ts.txt diff --git a/integration-tests/factories/simple-address-factory.ts b/integration-tests/factories/simple-address-factory.ts.txt similarity index 100% rename from integration-tests/factories/simple-address-factory.ts rename to integration-tests/factories/simple-address-factory.ts.txt diff --git a/integration-tests/factories/simple-analytics-config-factory.ts b/integration-tests/factories/simple-analytics-config-factory.ts.txt similarity index 100% rename from integration-tests/factories/simple-analytics-config-factory.ts rename to integration-tests/factories/simple-analytics-config-factory.ts.txt diff --git a/integration-tests/factories/simple-batch-job-factory.ts b/integration-tests/factories/simple-batch-job-factory.ts.txt similarity index 100% rename from integration-tests/factories/simple-batch-job-factory.ts rename to integration-tests/factories/simple-batch-job-factory.ts.txt diff --git a/integration-tests/factories/simple-cart-factory.ts b/integration-tests/factories/simple-cart-factory.ts.txt similarity index 100% rename from integration-tests/factories/simple-cart-factory.ts rename to integration-tests/factories/simple-cart-factory.ts.txt diff --git a/integration-tests/factories/simple-custom-shipping-option-factory.ts b/integration-tests/factories/simple-custom-shipping-option-factory.ts.txt similarity index 100% rename from integration-tests/factories/simple-custom-shipping-option-factory.ts rename to integration-tests/factories/simple-custom-shipping-option-factory.ts.txt diff --git a/integration-tests/factories/simple-customer-factory.ts b/integration-tests/factories/simple-customer-factory.ts.txt similarity index 100% rename from integration-tests/factories/simple-customer-factory.ts rename to integration-tests/factories/simple-customer-factory.ts.txt diff --git a/integration-tests/factories/simple-customer-group-factory.ts b/integration-tests/factories/simple-customer-group-factory.ts.txt similarity index 100% rename from integration-tests/factories/simple-customer-group-factory.ts rename to integration-tests/factories/simple-customer-group-factory.ts.txt diff --git a/integration-tests/factories/simple-discount-factory.ts b/integration-tests/factories/simple-discount-factory.ts.txt similarity index 100% rename from integration-tests/factories/simple-discount-factory.ts rename to integration-tests/factories/simple-discount-factory.ts.txt diff --git a/integration-tests/factories/simple-gift-card-factory.ts b/integration-tests/factories/simple-gift-card-factory.ts.txt similarity index 100% rename from integration-tests/factories/simple-gift-card-factory.ts rename to integration-tests/factories/simple-gift-card-factory.ts.txt diff --git a/integration-tests/factories/simple-line-item-factory.ts b/integration-tests/factories/simple-line-item-factory.ts.txt similarity index 100% rename from integration-tests/factories/simple-line-item-factory.ts rename to integration-tests/factories/simple-line-item-factory.ts.txt diff --git a/integration-tests/factories/simple-order-edit-factory.ts b/integration-tests/factories/simple-order-edit-factory.ts.txt similarity index 100% rename from integration-tests/factories/simple-order-edit-factory.ts rename to integration-tests/factories/simple-order-edit-factory.ts.txt diff --git a/integration-tests/factories/simple-order-factory.ts b/integration-tests/factories/simple-order-factory.ts.txt similarity index 100% rename from integration-tests/factories/simple-order-factory.ts rename to integration-tests/factories/simple-order-factory.ts.txt diff --git a/integration-tests/factories/simple-order-item-change-factory.ts b/integration-tests/factories/simple-order-item-change-factory.ts.txt similarity index 100% rename from integration-tests/factories/simple-order-item-change-factory.ts rename to integration-tests/factories/simple-order-item-change-factory.ts.txt diff --git a/integration-tests/factories/simple-payment-collection-factory.ts b/integration-tests/factories/simple-payment-collection-factory.ts.txt similarity index 100% rename from integration-tests/factories/simple-payment-collection-factory.ts rename to integration-tests/factories/simple-payment-collection-factory.ts.txt diff --git a/integration-tests/factories/simple-payment-factory.ts b/integration-tests/factories/simple-payment-factory.ts.txt similarity index 100% rename from integration-tests/factories/simple-payment-factory.ts rename to integration-tests/factories/simple-payment-factory.ts.txt diff --git a/integration-tests/factories/simple-price-list-factory.ts b/integration-tests/factories/simple-price-list-factory.ts.txt similarity index 100% rename from integration-tests/factories/simple-price-list-factory.ts rename to integration-tests/factories/simple-price-list-factory.ts.txt diff --git a/integration-tests/factories/simple-product-category-factory.ts b/integration-tests/factories/simple-product-category-factory.ts.txt similarity index 100% rename from integration-tests/factories/simple-product-category-factory.ts rename to integration-tests/factories/simple-product-category-factory.ts.txt diff --git a/integration-tests/factories/simple-product-collection-factory.ts b/integration-tests/factories/simple-product-collection-factory.ts.txt similarity index 100% rename from integration-tests/factories/simple-product-collection-factory.ts rename to integration-tests/factories/simple-product-collection-factory.ts.txt diff --git a/integration-tests/factories/simple-product-factory.ts b/integration-tests/factories/simple-product-factory.ts.txt similarity index 100% rename from integration-tests/factories/simple-product-factory.ts rename to integration-tests/factories/simple-product-factory.ts.txt diff --git a/integration-tests/factories/simple-product-tag-factory.ts b/integration-tests/factories/simple-product-tag-factory.ts.txt similarity index 100% rename from integration-tests/factories/simple-product-tag-factory.ts rename to integration-tests/factories/simple-product-tag-factory.ts.txt diff --git a/integration-tests/factories/simple-product-tax-rate-factory.ts b/integration-tests/factories/simple-product-tax-rate-factory.ts.txt similarity index 100% rename from integration-tests/factories/simple-product-tax-rate-factory.ts rename to integration-tests/factories/simple-product-tax-rate-factory.ts.txt diff --git a/integration-tests/factories/simple-product-type-tax-rate-factory.ts b/integration-tests/factories/simple-product-type-tax-rate-factory.ts.txt similarity index 100% rename from integration-tests/factories/simple-product-type-tax-rate-factory.ts rename to integration-tests/factories/simple-product-type-tax-rate-factory.ts.txt diff --git a/integration-tests/factories/simple-product-variant-factory.ts b/integration-tests/factories/simple-product-variant-factory.ts.txt similarity index 100% rename from integration-tests/factories/simple-product-variant-factory.ts rename to integration-tests/factories/simple-product-variant-factory.ts.txt diff --git a/integration-tests/factories/simple-publishable-api-key-factory.ts b/integration-tests/factories/simple-publishable-api-key-factory.ts.txt similarity index 100% rename from integration-tests/factories/simple-publishable-api-key-factory.ts rename to integration-tests/factories/simple-publishable-api-key-factory.ts.txt diff --git a/integration-tests/factories/simple-region-factory.ts b/integration-tests/factories/simple-region-factory.ts.txt similarity index 100% rename from integration-tests/factories/simple-region-factory.ts rename to integration-tests/factories/simple-region-factory.ts.txt diff --git a/integration-tests/factories/simple-sales-channel-factory.ts b/integration-tests/factories/simple-sales-channel-factory.ts.txt similarity index 100% rename from integration-tests/factories/simple-sales-channel-factory.ts rename to integration-tests/factories/simple-sales-channel-factory.ts.txt diff --git a/integration-tests/factories/simple-shipping-method-factory.ts b/integration-tests/factories/simple-shipping-method-factory.ts.txt similarity index 100% rename from integration-tests/factories/simple-shipping-method-factory.ts rename to integration-tests/factories/simple-shipping-method-factory.ts.txt diff --git a/integration-tests/factories/simple-shipping-option-factory.ts b/integration-tests/factories/simple-shipping-option-factory.ts.txt similarity index 100% rename from integration-tests/factories/simple-shipping-option-factory.ts rename to integration-tests/factories/simple-shipping-option-factory.ts.txt diff --git a/integration-tests/factories/simple-shipping-profile-factory.ts b/integration-tests/factories/simple-shipping-profile-factory.ts.txt similarity index 100% rename from integration-tests/factories/simple-shipping-profile-factory.ts rename to integration-tests/factories/simple-shipping-profile-factory.ts.txt diff --git a/integration-tests/factories/simple-shipping-tax-rate-factory.ts b/integration-tests/factories/simple-shipping-tax-rate-factory.ts.txt similarity index 100% rename from integration-tests/factories/simple-shipping-tax-rate-factory.ts rename to integration-tests/factories/simple-shipping-tax-rate-factory.ts.txt diff --git a/integration-tests/factories/simple-store-factory.ts b/integration-tests/factories/simple-store-factory.ts.txt similarity index 100% rename from integration-tests/factories/simple-store-factory.ts rename to integration-tests/factories/simple-store-factory.ts.txt diff --git a/integration-tests/factories/simple-tax-rate-factory.ts b/integration-tests/factories/simple-tax-rate-factory.ts.txt similarity index 100% rename from integration-tests/factories/simple-tax-rate-factory.ts rename to integration-tests/factories/simple-tax-rate-factory.ts.txt diff --git a/integration-tests/globalSetup.js b/integration-tests/globalSetup.js.txt similarity index 100% rename from integration-tests/globalSetup.js rename to integration-tests/globalSetup.js.txt diff --git a/integration-tests/globalTeardown.js b/integration-tests/globalTeardown.js.txt similarity index 100% rename from integration-tests/globalTeardown.js rename to integration-tests/globalTeardown.js.txt diff --git a/integration-tests/helpers/admin-seeder.js b/integration-tests/helpers/admin-seeder.js.txt similarity index 100% rename from integration-tests/helpers/admin-seeder.js rename to integration-tests/helpers/admin-seeder.js.txt diff --git a/integration-tests/helpers/batch-job-seeder.js b/integration-tests/helpers/batch-job-seeder.js.txt similarity index 100% rename from integration-tests/helpers/batch-job-seeder.js rename to integration-tests/helpers/batch-job-seeder.js.txt diff --git a/integration-tests/helpers/breaking.ts b/integration-tests/helpers/breaking.ts.txt similarity index 100% rename from integration-tests/helpers/breaking.ts rename to integration-tests/helpers/breaking.ts.txt diff --git a/integration-tests/helpers/call-helpers.js b/integration-tests/helpers/call-helpers.js.txt similarity index 100% rename from integration-tests/helpers/call-helpers.js rename to integration-tests/helpers/call-helpers.js.txt diff --git a/integration-tests/helpers/cart-seeder.js b/integration-tests/helpers/cart-seeder.js.txt similarity index 100% rename from integration-tests/helpers/cart-seeder.js rename to integration-tests/helpers/cart-seeder.js.txt diff --git a/integration-tests/helpers/claim-seeder.js b/integration-tests/helpers/claim-seeder.js.txt similarity index 100% rename from integration-tests/helpers/claim-seeder.js rename to integration-tests/helpers/claim-seeder.js.txt diff --git a/integration-tests/helpers/client-authentication.ts b/integration-tests/helpers/client-authentication.ts.txt similarity index 100% rename from integration-tests/helpers/client-authentication.ts rename to integration-tests/helpers/client-authentication.ts.txt diff --git a/integration-tests/helpers/discount-seeder.js b/integration-tests/helpers/discount-seeder.js.txt similarity index 100% rename from integration-tests/helpers/discount-seeder.js rename to integration-tests/helpers/discount-seeder.js.txt diff --git a/integration-tests/helpers/draft-order-seeder.js b/integration-tests/helpers/draft-order-seeder.js.txt similarity index 100% rename from integration-tests/helpers/draft-order-seeder.js rename to integration-tests/helpers/draft-order-seeder.js.txt diff --git a/integration-tests/helpers/order-seeder.js b/integration-tests/helpers/order-seeder.js.txt similarity index 100% rename from integration-tests/helpers/order-seeder.js rename to integration-tests/helpers/order-seeder.js.txt diff --git a/integration-tests/helpers/price-selection-seeder.js b/integration-tests/helpers/price-selection-seeder.js.txt similarity index 100% rename from integration-tests/helpers/price-selection-seeder.js rename to integration-tests/helpers/price-selection-seeder.js.txt diff --git a/integration-tests/helpers/product-seeder.js b/integration-tests/helpers/product-seeder.js.txt similarity index 100% rename from integration-tests/helpers/product-seeder.js rename to integration-tests/helpers/product-seeder.js.txt diff --git a/integration-tests/helpers/store-product-seeder.js b/integration-tests/helpers/store-product-seeder.js.txt similarity index 100% rename from integration-tests/helpers/store-product-seeder.js rename to integration-tests/helpers/store-product-seeder.js.txt diff --git a/integration-tests/helpers/swap-seeder.js b/integration-tests/helpers/swap-seeder.js.txt similarity index 100% rename from integration-tests/helpers/swap-seeder.js rename to integration-tests/helpers/swap-seeder.js.txt diff --git a/integration-tests/helpers/user-seeder.js b/integration-tests/helpers/user-seeder.js.txt similarity index 100% rename from integration-tests/helpers/user-seeder.js rename to integration-tests/helpers/user-seeder.js.txt diff --git a/integration-tests/jest.config.js b/integration-tests/jest.config.js index 9c9e3ae80d..aa250fd639 100644 --- a/integration-tests/jest.config.js +++ b/integration-tests/jest.config.js @@ -7,8 +7,8 @@ const pkgs = glob module.exports = { testEnvironment: `node`, testTimeout: 10000, - globalSetup: "/integration-tests/globalSetup.js", - globalTeardown: "/integration-tests/globalTeardown.js", + // globalSetup: "/integration-tests/globalSetup.js", + // globalTeardown: "/integration-tests/globalTeardown.js", rootDir: `../`, roots: pkgs, projects: [ diff --git a/integration-tests/modules/__tests__/price-lists/admin/add-price-list-price-batch.spec.ts b/integration-tests/modules/__tests__/price-lists/admin/add-price-list-price-batch.spec.ts deleted file mode 100644 index 52616beff7..0000000000 --- a/integration-tests/modules/__tests__/price-lists/admin/add-price-list-price-batch.spec.ts +++ /dev/null @@ -1,211 +0,0 @@ -import { IPricingModuleService } from "@medusajs/types" -import { PriceListStatus, PriceListType } from "@medusajs/utils" -import { medusaIntegrationTestRunner } from "medusa-test-utils" -import { - simpleProductFactory, - simpleRegionFactory, -} from "../../../../factories" -import { createAdminUser } from "../../../../helpers/create-admin-user" -import { createVariantPriceSet } from "../../../helpers/create-variant-price-set" - -jest.setTimeout(50000) - -const adminHeaders = { - headers: { - "x-medusa-access-token": "test_token", - }, -} - -const env = { - MEDUSA_FF_MEDUSA_V2: true, -} - -medusaIntegrationTestRunner({ - env, - testSuite: ({ dbConnection, getContainer, api }) => { - describe.skip("POST /admin/price-lists/:id/prices/batch", () => { - let appContainer - let product - let variant - let pricingModuleService: IPricingModuleService - - beforeAll(async () => { - appContainer = getContainer() - pricingModuleService = appContainer.resolve("pricingModuleService") - }) - - beforeEach(async () => { - await createAdminUser(dbConnection, adminHeaders, appContainer) - - await simpleRegionFactory(dbConnection, { - id: "test-region", - name: "Test Region", - currency_code: "usd", - tax_rate: 0, - }) - - product = await simpleProductFactory(dbConnection, { - id: "test-product-with-variant", - variants: [ - { - options: [{ option_id: "test-product-option-1", value: "test" }], - }, - ], - options: [ - { - id: "test-product-option-1", - title: "Test option 1", - }, - ], - }) - - variant = product.variants[0] - }) - - it("should update money amounts if variant id is present in prices", async () => { - const [priceList] = await pricingModuleService.createPriceLists([ - { - title: "test price list", - description: "test", - ends_at: new Date().toISOString(), - starts_at: new Date().toISOString(), - status: PriceListStatus.ACTIVE, - type: PriceListType.OVERRIDE, - }, - ]) - - await createVariantPriceSet({ - container: appContainer, - variantId: variant.id, - prices: [ - { - amount: 3000, - currency_code: "usd", - }, - ], - }) - - const data = { - prices: [ - { - variant_id: variant.id, - amount: 5000, - currency_code: "usd", - }, - { - amount: 6000, - region_id: "test-region", - variant_id: variant.id, - }, - ], - } - - await api.post( - `admin/price-lists/${priceList.id}/prices/batch`, - data, - adminHeaders - ) - - const response = await api.get( - `/admin/price-lists/${priceList.id}`, - adminHeaders - ) - - expect(response.status).toEqual(200) - expect(response.data.price_list).toEqual( - expect.objectContaining({ - id: expect.any(String), - created_at: expect.any(String), - updated_at: expect.any(String), - deleted_at: null, - name: "test price list", - description: "test", - type: "override", - status: "active", - starts_at: expect.any(String), - ends_at: expect.any(String), - customer_groups: [], - prices: [ - expect.objectContaining({ - id: expect.any(String), - created_at: expect.any(String), - updated_at: expect.any(String), - deleted_at: null, - currency_code: "usd", - amount: 5000, - min_quantity: null, - max_quantity: null, - price_list_id: expect.any(String), - region_id: null, - variant: expect.objectContaining({ - id: expect.any(String), - created_at: expect.any(String), - updated_at: expect.any(String), - deleted_at: null, - title: expect.any(String), - product_id: expect.any(String), - sku: null, - barcode: null, - ean: null, - upc: null, - variant_rank: 0, - inventory_quantity: 10, - allow_backorder: false, - manage_inventory: true, - hs_code: null, - origin_country: null, - mid_code: null, - material: null, - weight: null, - length: null, - height: null, - width: null, - metadata: null, - }), - variant_id: expect.any(String), - }), - expect.objectContaining({ - id: expect.any(String), - created_at: expect.any(String), - updated_at: expect.any(String), - deleted_at: null, - currency_code: "usd", - amount: 6000, - min_quantity: null, - max_quantity: null, - price_list_id: expect.any(String), - region_id: "test-region", - variant: expect.objectContaining({ - id: expect.any(String), - created_at: expect.any(String), - updated_at: expect.any(String), - deleted_at: null, - title: expect.any(String), - product_id: expect.any(String), - sku: null, - barcode: null, - ean: null, - upc: null, - variant_rank: 0, - inventory_quantity: 10, - allow_backorder: false, - manage_inventory: true, - hs_code: null, - origin_country: null, - mid_code: null, - material: null, - weight: null, - length: null, - height: null, - width: null, - metadata: null, - }), - variant_id: expect.any(String), - }), - ], - }) - ) - }) - }) - }, -}) diff --git a/integration-tests/modules/__tests__/price-lists/admin/delete-price-list-prices-by-product.ts b/integration-tests/modules/__tests__/price-lists/admin/delete-price-list-prices-by-product.ts deleted file mode 100644 index 205d7eca02..0000000000 --- a/integration-tests/modules/__tests__/price-lists/admin/delete-price-list-prices-by-product.ts +++ /dev/null @@ -1,154 +0,0 @@ -import { - simpleProductFactory, - simpleRegionFactory, -} from "../../../../factories" - -import { IPricingModuleService } from "@medusajs/types" -import { medusaIntegrationTestRunner } from "medusa-test-utils" -import { createVariantPriceSet } from "../../../helpers/create-variant-price-set" -import { createAdminUser } from "../../../../helpers/create-admin-user" - -jest.setTimeout(50000) - -const adminHeaders = { - headers: { - "x-medusa-access-token": "test_token", - }, -} - -const env = { - MEDUSA_FF_MEDUSA_V2: true, -} - -medusaIntegrationTestRunner({ - env, - testSuite: ({ dbConnection, getContainer, api }) => { - describe.skip("DELETE /admin/price-lists/:id/products/:productId/batch", () => { - let appContainer - let product - let variant1 - let priceSet - let priceListId - let pricingModuleService: IPricingModuleService - - beforeAll(async () => { - appContainer = getContainer() - pricingModuleService = appContainer.resolve("pricingModuleService") - }) - - beforeEach(async () => { - await createAdminUser(dbConnection, adminHeaders, appContainer) - - await simpleRegionFactory(dbConnection, { - id: "test-region", - name: "Test Region", - currency_code: "usd", - tax_rate: 0, - }) - - product = await simpleProductFactory(dbConnection, { - id: "test-product-with-variant", - variants: [ - { - options: [{ option_id: "test-product-option-1", value: "test" }], - }, - ], - options: [ - { - id: "test-product-option-1", - title: "Test option 1", - }, - ], - }) - - variant1 = product.variants[0] - - priceSet = await createVariantPriceSet({ - container: appContainer, - variantId: variant1.id, - prices: [ - { - amount: 3000, - currency_code: "usd", - }, - ], - }) - - const data = { - name: "test price list", - description: "test", - type: "override", - customer_groups: [], - status: "active", - prices: [ - { - amount: 400, - variant_id: variant1.id, - currency_code: "usd", - }, - ], - } - - const priceListResult = await api.post( - `admin/price-lists`, - data, - adminHeaders - ) - priceListId = priceListResult.data.price_list.id - }) - - it("should delete prices in batch based on product ids", async () => { - let prices = await pricingModuleService.listPrices({ - price_set_id: [priceSet.id], - }) - expect(prices.length).toEqual(2) - - const deleteRes = await api.delete( - `/admin/price-lists/${priceListId}/products/prices/batch`, - { - headers: adminHeaders.headers, - data: { - product_ids: [product.id], - }, - } - ) - expect(deleteRes.status).toEqual(200) - - prices = await pricingModuleService.listPrices({ - price_set_id: [priceSet.id], - }) - - expect(prices.length).toEqual(1) - expect(prices).toEqual([ - expect.objectContaining({ - price_list: null, - }), - ]) - }) - - it("should delete prices based on single product id", async () => { - let prices = await pricingModuleService.listPrices({ - price_set_id: [priceSet.id], - }) - expect(prices.length).toEqual(2) - - const deleteRes = await api.delete( - `/admin/price-lists/${priceListId}/products/${product.id}/prices`, - adminHeaders - ) - expect(deleteRes.status).toEqual(200) - - prices = await pricingModuleService.listPrices({ - price_set_id: [priceSet.id], - }) - - expect(prices.length).toEqual(1) - expect(prices).toEqual([ - expect.objectContaining({ - price_list: null, - }), - ]) - }) - }) - }, -}) diff --git a/integration-tests/modules/__tests__/price-lists/admin/delete-price-list-prices-by-variant.ts b/integration-tests/modules/__tests__/price-lists/admin/delete-price-list-prices-by-variant.ts deleted file mode 100644 index 37784f2411..0000000000 --- a/integration-tests/modules/__tests__/price-lists/admin/delete-price-list-prices-by-variant.ts +++ /dev/null @@ -1,113 +0,0 @@ -import { - simpleProductFactory, - simpleRegionFactory, -} from "../../../../factories" - -import { IPricingModuleService } from "@medusajs/types" -import { medusaIntegrationTestRunner } from "medusa-test-utils" -import { createVariantPriceSet } from "../../../helpers/create-variant-price-set" -import { createAdminUser } from "../../../../helpers/create-admin-user" - -jest.setTimeout(50000) - -const adminHeaders = { - headers: { - "x-medusa-access-token": "test_token", - }, -} - -const env = { - MEDUSA_FF_MEDUSA_V2: true, -} - -medusaIntegrationTestRunner({ - env, - testSuite: ({ dbConnection, getContainer, api }) => { - describe.skip("DELETE /admin/price-lists/:id/variants/:variantId/prices", () => { - let appContainer - let product - let variant - let pricingModuleService: IPricingModuleService - - beforeAll(async () => { - appContainer = getContainer() - pricingModuleService = appContainer.resolve("pricingModuleService") - }) - - beforeEach(async () => { - await createAdminUser(dbConnection, adminHeaders, appContainer) - - await simpleRegionFactory(dbConnection, { - id: "test-region", - name: "Test Region", - currency_code: "usd", - tax_rate: 0, - }) - - product = await simpleProductFactory(dbConnection, { - id: "test-product-with-variant", - variants: [ - { - options: [{ option_id: "test-product-option-1", value: "test" }], - }, - ], - options: [ - { - id: "test-product-option-1", - title: "Test option 1", - }, - ], - }) - - variant = product.variants[0] - }) - - it("should delete all prices based on product variant ids", async () => { - const priceSet = await createVariantPriceSet({ - container: appContainer, - variantId: variant.id, - prices: [ - { - amount: 3000, - currency_code: "usd", - }, - ], - }) - - const data = { - name: "test price list", - description: "test", - type: "override", - customer_groups: [], - status: "active", - prices: [ - { - amount: 400, - variant_id: variant.id, - currency_code: "usd", - }, - ], - } - - const result = await api.post(`admin/price-lists`, data, adminHeaders) - const priceListId = result.data.price_list.id - - let prices = await pricingModuleService.listPrices({ - price_list_id: [priceListId], - }) - expect(prices.length).toEqual(1) - - const deleteRes = await api.delete( - `/admin/price-lists/${priceListId}/variants/${variant.id}/prices`, - adminHeaders - ) - expect(deleteRes.status).toEqual(200) - - prices = await pricingModuleService.listPrices({ - price_list_id: [priceListId], - }) - expect(prices.length).toEqual(0) - }) - }) - }, -}) diff --git a/integration-tests/modules/__tests__/price-lists/admin/delete-price-list-prices.ts b/integration-tests/modules/__tests__/price-lists/admin/delete-price-list-prices.ts deleted file mode 100644 index b7abcb274e..0000000000 --- a/integration-tests/modules/__tests__/price-lists/admin/delete-price-list-prices.ts +++ /dev/null @@ -1,127 +0,0 @@ -import { - simpleProductFactory, - simpleRegionFactory, -} from "../../../../factories" - -import { IPricingModuleService } from "@medusajs/types" -import { medusaIntegrationTestRunner } from "medusa-test-utils" -import { createVariantPriceSet } from "../../../helpers/create-variant-price-set" -import { createAdminUser } from "../../../../helpers/create-admin-user" - -jest.setTimeout(50000) - -const adminHeaders = { - headers: { - "x-medusa-access-token": "test_token", - }, -} - -const env = { - MEDUSA_FF_MEDUSA_V2: true, -} - -medusaIntegrationTestRunner({ - env, - testSuite: ({ dbConnection, getContainer, api }) => { - describe.skip("DELETE /admin/price-lists/:id", () => { - let appContainer - let product - let variant - let pricingModuleService: IPricingModuleService - - beforeAll(async () => { - appContainer = getContainer() - pricingModuleService = appContainer.resolve("pricingModuleService") - }) - - beforeEach(async () => { - await createAdminUser(dbConnection, adminHeaders, appContainer) - - await simpleRegionFactory(dbConnection, { - id: "test-region", - name: "Test Region", - currency_code: "usd", - tax_rate: 0, - }) - - product = await simpleProductFactory(dbConnection, { - id: "test-product-with-variant", - variants: [ - { - options: [{ option_id: "test-product-option-1", value: "test" }], - }, - ], - options: [ - { - id: "test-product-option-1", - title: "Test option 1", - }, - ], - }) - - variant = product.variants[0] - }) - - it("should delete price list prices by money amount ids", async () => { - await createVariantPriceSet({ - container: appContainer, - variantId: variant.id, - prices: [ - { - amount: 3000, - currency_code: "usd", - }, - ], - }) - - const data = { - name: "test price list", - description: "test", - type: "override", - status: "active", - prices: [ - { - amount: 400, - variant_id: variant.id, - currency_code: "usd", - }, - { - amount: 4000, - variant_id: variant.id, - currency_code: "usd", - }, - ], - } - - const res = await api.post(`admin/price-lists`, data, adminHeaders) - - const priceListId = res.data.price_list.id - let prices = await pricingModuleService.listPrices( - { - price_list_id: [priceListId], - }, - {} - ) - - expect(prices.length).toEqual(2) - - const deletePrice = prices[0] - const deleteRes = await api.delete( - `/admin/price-lists/${priceListId}/prices/batch`, - { - data: { - price_ids: [deletePrice?.id], - }, - ...adminHeaders, - } - ) - expect(deleteRes.status).toEqual(200) - - prices = await pricingModuleService.listPrices({ - price_list_id: [priceListId], - }) - expect(prices.length).toEqual(1) - }) - }) - }, -}) diff --git a/integration-tests/modules/__tests__/price-lists/store/get-product.ts b/integration-tests/modules/__tests__/price-lists/store/get-product.ts index b67c10522a..9b6c2500fd 100644 --- a/integration-tests/modules/__tests__/price-lists/store/get-product.ts +++ b/integration-tests/modules/__tests__/price-lists/store/get-product.ts @@ -1,13 +1,7 @@ import { PriceListStatus, PriceListType } from "@medusajs/utils" import { medusaIntegrationTestRunner } from "medusa-test-utils" -import { - simpleCustomerFactory, - simpleCustomerGroupFactory, - simpleProductFactory, - simpleRegionFactory, -} from "../../../../factories" import { createAdminUser } from "../../../../helpers/create-admin-user" -import { createVariantPriceSet } from "../../../helpers/create-variant-price-set" +import { getProductFixture } from "../../../../helpers/fixtures" jest.setTimeout(50000) @@ -28,7 +22,7 @@ medusaIntegrationTestRunner({ let appContainer let product let variant - let priceSetId + let region beforeAll(async () => { appContainer = getContainer() @@ -37,48 +31,40 @@ medusaIntegrationTestRunner({ beforeEach(async () => { await createAdminUser(dbConnection, adminHeaders, appContainer) - await simpleRegionFactory(dbConnection, { - id: "test-region", - name: "Test Region", - currency_code: "usd", - tax_rate: 0, - }) + region = ( + await api.post( + "/admin/regions", + { + name: "Test Region", + currency_code: "usd", + }, + adminHeaders + ) + ).data.region - product = await simpleProductFactory(dbConnection, { - id: "test-product-with-variant", - status: "published", - variants: [ - { - options: [{ option_id: "test-product-option-1", value: "test" }], - }, - ], - options: [ - { - id: "test-product-option-1", - title: "Test option 1", - }, - ], - }) + product = ( + await api.post( + "/admin/products", + getProductFixture({ + title: "test1", + status: "published", + variants: [ + { + title: "Test taxes", + prices: [ + { + amount: 3000, + currency_code: "eur", + }, + ], + }, + ], + }), + adminHeaders + ) + ).data.product variant = product.variants[0] - - const priceSet = await createVariantPriceSet({ - container: appContainer, - variantId: variant.id, - prices: [ - { - amount: 3000, - currency_code: "usd", - }, - { - amount: 4000, - currency_code: "usd", - }, - ], - rules: [], - }) - - priceSetId = priceSet.id }) it("should get product and its prices from price-list created through the price list workflow", async () => { @@ -132,9 +118,16 @@ medusaIntegrationTestRunner({ }) it("should not list prices from price-list with customer groups if not logged in", async () => { - const { id: customerGroupId } = await simpleCustomerGroupFactory( - dbConnection - ) + const customerGroup = ( + await api.post( + "/admin/customer-groups", + { + name: "VIP", + }, + adminHeaders + ) + ).data.customer_group + const customerGroupId = customerGroup.id const priceListResponse = await api.post( `/admin/price-lists`, @@ -179,16 +172,17 @@ medusaIntegrationTestRunner({ }) it("should list prices from price-list with customer groups", async () => { - await simpleCustomerFactory(dbConnection, { - id: "test-customer-5-pl", - email: "test5@email-pl.com", - first_name: "John", - last_name: "Deere", - password_hash: - "c2NyeXB0AAEAAAABAAAAAVMdaddoGjwU1TafDLLlBKnOTQga7P2dbrfgf3fB+rCD/cJOMuGzAvRdKutbYkVpuJWTU39P7OpuWNkUVoEETOVLMJafbI8qs8Qx/7jMQXkN", // password matching "test" - has_account: true, - groups: [{ id: "customer-group-1" }], - }) + const customer = ( + await api.post( + "/admin/customers", + { + email: "test5@email-pl.com", + first_name: "John", + last_name: "Deere", + }, + adminHeaders + ) + ).data.customer_group const authResponse = await api.post("/store/auth", { email: "test5@email-pl.com", diff --git a/integration-tests/modules/__tests__/pricing/get-product.ts b/integration-tests/modules/__tests__/pricing/get-product.ts deleted file mode 100644 index 7d6e0bece4..0000000000 --- a/integration-tests/modules/__tests__/pricing/get-product.ts +++ /dev/null @@ -1,121 +0,0 @@ -import { simpleCartFactory, simpleRegionFactory } from "../../../factories" - -import { ModuleRegistrationName } from "@medusajs/utils" -import { medusaIntegrationTestRunner } from "medusa-test-utils" -import { createAdminUser } from "../../../helpers/create-admin-user" - -jest.setTimeout(5000000) - -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}` - -const adminHeaders = { - headers: { - "x-medusa-access-token": "test_token", - }, -} - -const env = { - MEDUSA_FF_MEDUSA_V2: true, -} - -medusaIntegrationTestRunner({ - env, - testSuite: ({ dbConnection, getContainer, api }) => { - describe.skip("Link Modules", () => { - let medusaContainer - - beforeAll(async () => { - medusaContainer = getContainer() - }) - beforeEach(async () => { - await createAdminUser(dbConnection, adminHeaders, medusaContainer) - await simpleRegionFactory(dbConnection, { - id: "region-1", - currency_code: "usd", - }) - }) - - describe("get product price", () => { - let ruleType - let priceSet - let productId - const cartId = "test-cart" - beforeEach(async () => { - const pricingModuleService = medusaContainer.resolve( - ModuleRegistrationName.PRICING - ) - - await simpleCartFactory(dbConnection, { - id: cartId, - region: "region-1", - }) - - const payload = { - title: "Test", - description: "test-product-description", - images: ["test-image.png", "test-image-2.png"], - variants: [ - { - title: "Test variant", - prices: [], - options: [], - }, - ], - } - - const response = await api.post( - "/admin/products", - payload, - adminHeaders - ) - - productId = response.data.product.id - const variant = response.data.product.variants[0] - - priceSet = await pricingModuleService.createPriceSets({ - prices: [ - { - amount: 1000, - currency_code: "usd", - rules: { region_id: "region-1" }, - }, - { - amount: 900, - currency_code: "usd", - rules: { region_id: "region-2" }, - }, - ], - }) - - const remoteLink = medusaContainer.resolve("remoteLink") as any - - await remoteLink.create({ - productService: { - variant_id: variant.id, - }, - pricingService: { - price_set_id: priceSet.id, - }, - }) - }) - - it("Should get prices declared in pricing module", async () => { - const response = await api.get( - `/store/products/${productId}?cart_id=${cartId}` - ) - - expect(response.data.product.variants[0].prices).toEqual([ - expect.objectContaining({ - amount: 1000, - currency_code: "usd", - }), - ]) - }) - }) - }) - }, -}) diff --git a/integration-tests/modules/package.json b/integration-tests/modules/package.json index abe301eb4e..d3af78cd22 100644 --- a/integration-tests/modules/package.json +++ b/integration-tests/modules/package.json @@ -32,8 +32,7 @@ "@medusajs/workflow-engine-inmemory": "workspace:*", "faker": "^5.5.3", "medusa-test-utils": "workspace:*", - "pg": "^8.11.3", - "typeorm": "^0.3.16" + "pg": "^8.11.3" }, "devDependencies": { "@medusajs/types": "workspace:^", diff --git a/integration-tests/tsconfig.json b/integration-tests/tsconfig.json index 77d0c7439b..2847c06dc6 100644 --- a/integration-tests/tsconfig.json +++ b/integration-tests/tsconfig.json @@ -22,7 +22,6 @@ "include": ["./**/*"], "exclude": [ "./dist/**/*", - "./**/factories", "./**/helpers", "./**/__snapshots__", "node_modules" diff --git a/packages/core/types/src/common/common.ts b/packages/core/types/src/common/common.ts index 9856303832..fc38fdb2cd 100644 --- a/packages/core/types/src/common/common.ts +++ b/packages/core/types/src/common/common.ts @@ -1,15 +1,3 @@ -import { - FindManyOptions, - FindOneOptions, - FindOperator, - FindOptionsSelect, - FindOptionsWhere, - OrderByCondition, -} from "typeorm" - -import { FindOptionsOrder } from "typeorm/find-options/FindOptionsOrder" -import { FindOptionsRelations } from "typeorm/find-options/FindOptionsRelations" - /** * Prettify complex types to a flat object structure */ @@ -61,17 +49,6 @@ export interface SoftDeletableEntity extends BaseEntity { deleted_at: Date | null } -/** - * @ignore - */ -export type Writable = { - -readonly [key in keyof T]: - | T[key] - | FindOperator - | FindOperator - | FindOperator -} - /** * @interface * @@ -124,48 +101,6 @@ export interface FindConfig { options?: Record } -/** - * @ignore - */ -export type ExtendedFindConfig = ( - | Omit, "where" | "relations" | "select"> - | Omit, "where" | "relations" | "select"> -) & { - select?: FindOptionsSelect - relations?: FindOptionsRelations - where: FindOptionsWhere | FindOptionsWhere[] - order?: FindOptionsOrder - skip?: number - take?: number -} - -/** - * @ignore - */ -export type QuerySelector = Selector & { - q?: string -} - -/** - * @ignore - */ -export type TreeQuerySelector = QuerySelector & { - include_descendants_tree?: boolean -} - -/** - * @ignore - */ -export type Selector = { - [key in keyof TEntity]?: - | TEntity[key] - | TEntity[key][] - | DateComparisonOperator - | StringComparisonOperator - | NumericalComparisonOperator - | FindOperator -} - /** * @ignore */ @@ -180,29 +115,6 @@ export type TotalField = | "gift_card_total" | "gift_card_tax_total" -/** - * @ignore - */ -export interface CustomFindOptions { - select?: FindManyOptions["select"] - where?: FindManyOptions["where"] & { - [P in InKeys]?: TModel[P][] - } - order?: OrderByCondition - skip?: number - take?: number -} - -/** - * @ignore - */ -export type QueryConfig = { - deafults?: (keyof TEntity | string)[] - allowed?: (keyof TEntity | string)[] - defaultLimit?: number - isList?: boolean -} - /** * @interface * @@ -390,3 +302,13 @@ export type RawRounding = { value: string precision: number } + +/** + * @ignore + */ +export type QueryConfig = { + deafults?: (keyof TEntity | string)[] + allowed?: (keyof TEntity | string)[] + defaultLimit?: number + isList?: boolean +} diff --git a/packages/core/types/src/common/config-module.ts b/packages/core/types/src/common/config-module.ts index d3b3814d75..7fc0c07345 100644 --- a/packages/core/types/src/common/config-module.ts +++ b/packages/core/types/src/common/config-module.ts @@ -4,7 +4,6 @@ import { } from "../modules-sdk" import type { RedisOptions } from "ioredis" -import type { LoggerOptions } from "typeorm" import type { InlineConfig } from "vite" /** @@ -263,7 +262,7 @@ export type ProjectConfigOptions = { * }) * ``` */ - databaseLogging?: LoggerOptions + databaseLogging?: boolean /** * @ignore diff --git a/packages/core/types/src/transaction-base/transaction-base.ts b/packages/core/types/src/transaction-base/transaction-base.ts index 86c6aaea66..789a62afc5 100644 --- a/packages/core/types/src/transaction-base/transaction-base.ts +++ b/packages/core/types/src/transaction-base/transaction-base.ts @@ -1,5 +1 @@ -import { EntityManager } from "typeorm" - -export interface ITransactionBaseService { - withTransaction(transactionManager?: EntityManager): this -} +export interface ITransactionBaseService {} diff --git a/yarn.lock b/yarn.lock index 807dec2b3c..546a22575f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4819,18 +4819,6 @@ __metadata: languageName: unknown linkType: soft -"@medusajs/inventory@npm:latest": - version: 1.11.6 - resolution: "@medusajs/inventory@npm:1.11.6" - dependencies: - "@medusajs/modules-sdk": ^1.12.8 - "@medusajs/utils": ^1.11.5 - awilix: ^8.0.0 - typeorm: ^0.3.16 - checksum: 0eaa3b20e60ff75c8c15b7d8a15408778860a3263d855b08610b770a20fe282fe1dd279d4c923dfee98a388b9c036d96c89491eb89ef3c82eae220da6a468bcc - languageName: node - linkType: hard - "@medusajs/js-sdk@0.0.1, @medusajs/js-sdk@workspace:packages/core/js-sdk": version: 0.0.0-use.local resolution: "@medusajs/js-sdk@workspace:packages/core/js-sdk" @@ -4990,7 +4978,7 @@ __metadata: languageName: unknown linkType: soft -"@medusajs/modules-sdk@^1.12.11, @medusajs/modules-sdk@^1.12.8, @medusajs/modules-sdk@workspace:^, @medusajs/modules-sdk@workspace:packages/core/modules-sdk": +"@medusajs/modules-sdk@^1.12.11, @medusajs/modules-sdk@workspace:^, @medusajs/modules-sdk@workspace:packages/core/modules-sdk": version: 0.0.0-use.local resolution: "@medusajs/modules-sdk@workspace:packages/core/modules-sdk" dependencies: @@ -5487,7 +5475,7 @@ __metadata: languageName: unknown linkType: soft -"@medusajs/utils@1.11.9, @medusajs/utils@^1.11.5, @medusajs/utils@^1.11.9, @medusajs/utils@workspace:^, @medusajs/utils@workspace:packages/core/utils": +"@medusajs/utils@1.11.9, @medusajs/utils@^1.11.9, @medusajs/utils@workspace:^, @medusajs/utils@workspace:packages/core/utils": version: 0.0.0-use.local resolution: "@medusajs/utils@workspace:packages/core/utils" dependencies: @@ -10117,13 +10105,6 @@ __metadata: languageName: node linkType: hard -"@sqltools/formatter@npm:^1.2.5": - version: 1.2.5 - resolution: "@sqltools/formatter@npm:1.2.5" - checksum: 4b4fa62b8cd4880784b71cc5edd4a13da04fda0a915c14282765a8ec1a900a495e69b322704413e2052d221b5646d9fb0e20e87911f9a8f438f33180eecb11a4 - languageName: node - linkType: hard - "@storybook/addon-actions@npm:7.6.19": version: 7.6.19 resolution: "@storybook/addon-actions@npm:7.6.19" @@ -13364,13 +13345,6 @@ __metadata: languageName: node linkType: hard -"app-root-path@npm:^3.1.0": - version: 3.1.0 - resolution: "app-root-path@npm:3.1.0" - checksum: 4a0fd976de1bffcdb18a5e1f8050091f15d0780e0582bca99aaa9d52de71f0e08e5185355fcffc781180bfb898499e787a2f5ed79b9c448b942b31dc947acaa9 - languageName: node - linkType: hard - "append-field@npm:^1.0.0": version: 1.0.0 resolution: "append-field@npm:1.0.0" @@ -13715,7 +13689,7 @@ __metadata: languageName: node linkType: hard -"awilix@npm:^8.0.0, awilix@npm:^8.0.1": +"awilix@npm:^8.0.1": version: 8.0.1 resolution: "awilix@npm:8.0.1" dependencies: @@ -14772,22 +14746,6 @@ __metadata: languageName: node linkType: hard -"cli-highlight@npm:^2.1.11": - version: 2.1.11 - resolution: "cli-highlight@npm:2.1.11" - dependencies: - chalk: ^4.0.0 - highlight.js: ^10.7.1 - mz: ^2.4.0 - parse5: ^5.1.1 - parse5-htmlparser2-tree-adapter: ^6.0.0 - yargs: ^16.0.0 - bin: - highlight: bin/highlight - checksum: b5b4af3b968aa9df77eee449a400fbb659cf47c4b03a395370bd98d5554a00afaa5819b41a9a8a1ca0d37b0b896a94e57c65289b37359a25b700b1f56eb04852 - languageName: node - linkType: hard - "cli-progress@npm:^3.4.0": version: 3.12.0 resolution: "cli-progress@npm:3.12.0" @@ -16105,13 +16063,6 @@ __metadata: languageName: node linkType: hard -"dayjs@npm:^1.11.9": - version: 1.11.11 - resolution: "dayjs@npm:1.11.11" - checksum: 0131d10516b9945f05a57e13f4af49a6814de5573a494824e103131a3bbe4cc470b1aefe8e17e51f9a478a22cd116084be1ee5725cedb66ec4c3f9091202dc4b - languageName: node - linkType: hard - "debug@npm:2.6.9, debug@npm:^2.6.9": version: 2.6.9 resolution: "debug@npm:2.6.9" @@ -16677,7 +16628,7 @@ __metadata: languageName: node linkType: hard -"dotenv@npm:^16.0.0, dotenv@npm:^16.0.3, dotenv@npm:^16.4.4, dotenv@npm:^16.4.5": +"dotenv@npm:^16.0.0, dotenv@npm:^16.4.4, dotenv@npm:^16.4.5": version: 16.4.5 resolution: "dotenv@npm:16.4.5" checksum: 48d92870076832af0418b13acd6e5a5a3e83bb00df690d9812e94b24aff62b88ade955ac99a05501305b8dc8f1b0ee7638b18493deb6fe93d680e5220936292f @@ -19335,13 +19286,6 @@ __metadata: languageName: node linkType: hard -"highlight.js@npm:^10.7.1": - version: 10.7.3 - resolution: "highlight.js@npm:10.7.3" - checksum: 073837eaf816922427a9005c56c42ad8786473dc042332dfe7901aa065e92bc3d94ebf704975257526482066abb2c8677cc0326559bb8621e046c21c5991c434 - languageName: node - linkType: hard - "hosted-git-info@npm:^2.1.4": version: 2.8.9 resolution: "hosted-git-info@npm:2.8.9" @@ -19838,7 +19782,6 @@ __metadata: "@medusajs/cache-inmemory": "workspace:*" "@medusajs/customer": "workspace:^" "@medusajs/event-bus-local": "workspace:*" - "@medusajs/inventory": latest "@medusajs/medusa": "workspace:*" "@medusajs/modules-sdk": "workspace:^" "@medusajs/pricing": "workspace:^" @@ -19857,7 +19800,6 @@ __metadata: jest: ^29.7.0 jest-environment-node: ^29.7.0 pg: ^8.11.3 - typeorm: ^0.3.16 typescript: ^5.3.3 languageName: unknown linkType: soft @@ -19930,7 +19872,6 @@ __metadata: jest-environment-node: ^29.7.0 medusa-test-utils: "workspace:*" pg: ^8.11.3 - typeorm: ^0.3.16 typescript: ^5.3.3 languageName: unknown linkType: soft @@ -23203,15 +23144,6 @@ __metadata: languageName: node linkType: hard -"mkdirp@npm:^2.1.3": - version: 2.1.6 - resolution: "mkdirp@npm:2.1.6" - bin: - mkdirp: dist/cjs/src/bin.js - checksum: 96f551c651dd8f5f9435d53df1a7b9bfc553be769ee6da5192c37c1f303a376ef1c6996f96913d4a8d357060451d4526a346031d1919f92c58806a5fa3cd8dfe - languageName: node - linkType: hard - "mkdirp@npm:~3.0.0": version: 3.0.1 resolution: "mkdirp@npm:3.0.1" @@ -23461,7 +23393,7 @@ __metadata: languageName: node linkType: hard -"mz@npm:^2.4.0, mz@npm:^2.7.0": +"mz@npm:^2.7.0": version: 2.7.0 resolution: "mz@npm:2.7.0" dependencies: @@ -24420,15 +24352,6 @@ __metadata: languageName: node linkType: hard -"parse5-htmlparser2-tree-adapter@npm:^6.0.0": - version: 6.0.1 - resolution: "parse5-htmlparser2-tree-adapter@npm:6.0.1" - dependencies: - parse5: ^6.0.1 - checksum: dfa5960e2aaf125707e19a4b1bc333de49232eba5a6ffffb95d313a7d6087c3b7a274b58bee8d3bd41bdf150638815d1d601a42bbf2a0345208c3c35b1279556 - languageName: node - linkType: hard - "parse5@npm:5.1.0": version: 5.1.0 resolution: "parse5@npm:5.1.0" @@ -24436,20 +24359,6 @@ __metadata: languageName: node linkType: hard -"parse5@npm:^5.1.1": - version: 5.1.1 - resolution: "parse5@npm:5.1.1" - checksum: b0f87a77a7fea5f242e3d76917c983bbea47703b9371801d51536b78942db6441cbda174bf84eb30e47315ddc6f8a0b57d68e562c790154430270acd76c1fa03 - languageName: node - linkType: hard - -"parse5@npm:^6.0.1": - version: 6.0.1 - resolution: "parse5@npm:6.0.1" - checksum: 595821edc094ecbcfb9ddcb46a3e1fe3a718540f8320eff08b8cf6742a5114cce2d46d45f95c26191c11b184dcaf4e2960abcd9c5ed9eb9393ac9a37efcfdecb - languageName: node - linkType: hard - "parse5@npm:^7.0.0, parse5@npm:^7.1.1, parse5@npm:^7.1.2": version: 7.1.2 resolution: "parse5@npm:7.1.2" @@ -26572,13 +26481,6 @@ __metadata: languageName: node linkType: hard -"reflect-metadata@npm:^0.2.1": - version: 0.2.2 - resolution: "reflect-metadata@npm:0.2.2" - checksum: 1cd93a15ea291e420204955544637c264c216e7aac527470e393d54b4bb075f10a17e60d8168ec96600c7e0b9fcc0cb0bb6e91c3fbf5b0d8c9056f04e6ac1ec2 - languageName: node - linkType: hard - "reflect.getprototypeof@npm:^1.0.4": version: 1.0.6 resolution: "reflect.getprototypeof@npm:1.0.6" @@ -27753,18 +27655,6 @@ __metadata: languageName: node linkType: hard -"sha.js@npm:^2.4.11": - version: 2.4.11 - resolution: "sha.js@npm:2.4.11" - dependencies: - inherits: ^2.0.1 - safe-buffer: ^5.0.1 - bin: - sha.js: ./bin.js - checksum: b7a371bca8821c9cc98a0aeff67444a03d48d745cb103f17228b96793f455f0eb0a691941b89ea1e60f6359207e36081d9be193252b0f128e0daf9cfea2815a5 - languageName: node - linkType: hard - "shallow-clone@npm:^3.0.0": version: 3.0.1 resolution: "shallow-clone@npm:3.0.1" @@ -29531,7 +29421,7 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.3.1, tslib@npm:^2.4.0, tslib@npm:^2.5.0, tslib@npm:^2.6.1, tslib@npm:^2.6.2": +"tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.3.1, tslib@npm:^2.4.0, tslib@npm:^2.6.1, tslib@npm:^2.6.2": version: 2.6.2 resolution: "tslib@npm:2.6.2" checksum: e03a8a4271152c8b26604ed45535954c0a45296e32445b4b87f8a5abdb2421f40b59b4ca437c4346af0f28179780d604094eb64546bee2019d903d01c6c19bdb @@ -29983,86 +29873,6 @@ __metadata: languageName: node linkType: hard -"typeorm@npm:^0.3.16": - version: 0.3.20 - resolution: "typeorm@npm:0.3.20" - dependencies: - "@sqltools/formatter": ^1.2.5 - app-root-path: ^3.1.0 - buffer: ^6.0.3 - chalk: ^4.1.2 - cli-highlight: ^2.1.11 - dayjs: ^1.11.9 - debug: ^4.3.4 - dotenv: ^16.0.3 - glob: ^10.3.10 - mkdirp: ^2.1.3 - reflect-metadata: ^0.2.1 - sha.js: ^2.4.11 - tslib: ^2.5.0 - uuid: ^9.0.0 - yargs: ^17.6.2 - peerDependencies: - "@google-cloud/spanner": ^5.18.0 - "@sap/hana-client": ^2.12.25 - better-sqlite3: ^7.1.2 || ^8.0.0 || ^9.0.0 - hdb-pool: ^0.1.6 - ioredis: ^5.0.4 - mongodb: ^5.8.0 - mssql: ^9.1.1 || ^10.0.1 - mysql2: ^2.2.5 || ^3.0.1 - oracledb: ^6.3.0 - pg: ^8.5.1 - pg-native: ^3.0.0 - pg-query-stream: ^4.0.0 - redis: ^3.1.1 || ^4.0.0 - sql.js: ^1.4.0 - sqlite3: ^5.0.3 - ts-node: ^10.7.0 - typeorm-aurora-data-api-driver: ^2.0.0 - peerDependenciesMeta: - "@google-cloud/spanner": - optional: true - "@sap/hana-client": - optional: true - better-sqlite3: - optional: true - hdb-pool: - optional: true - ioredis: - optional: true - mongodb: - optional: true - mssql: - optional: true - mysql2: - optional: true - oracledb: - optional: true - pg: - optional: true - pg-native: - optional: true - pg-query-stream: - optional: true - redis: - optional: true - sql.js: - optional: true - sqlite3: - optional: true - ts-node: - optional: true - typeorm-aurora-data-api-driver: - optional: true - bin: - typeorm: cli.js - typeorm-ts-node-commonjs: cli-ts-node-commonjs.js - typeorm-ts-node-esm: cli-ts-node-esm.js - checksum: 7e4be724641beef86ae36289c87b6e66bfaf19a4313f089926d36d2d6f0d67f9314d942711c9d83ab8a174b8622148c2f7e83e6c1448d638ee3ab24469257814 - languageName: node - linkType: hard - "typescript@npm:4.9.5, typescript@npm:^4.1.3": version: 4.9.5 resolution: "typescript@npm:4.9.5" @@ -31515,7 +31325,7 @@ __metadata: languageName: node linkType: hard -"yargs@npm:17.7.2, yargs@npm:^17.0.1, yargs@npm:^17.3.1, yargs@npm:^17.5.1, yargs@npm:^17.6.2, yargs@npm:^17.7.1, yargs@npm:^17.7.2": +"yargs@npm:17.7.2, yargs@npm:^17.0.1, yargs@npm:^17.3.1, yargs@npm:^17.5.1, yargs@npm:^17.7.1, yargs@npm:^17.7.2": version: 17.7.2 resolution: "yargs@npm:17.7.2" dependencies: @@ -31549,7 +31359,7 @@ __metadata: languageName: node linkType: hard -"yargs@npm:^16.0.0, yargs@npm:^16.1.0": +"yargs@npm:^16.1.0": version: 16.2.0 resolution: "yargs@npm:16.2.0" dependencies: