Fix/herbatica import - #420
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
🧰 Additional context used📓 Path-based instructions (7)**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{test,spec}.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
apps/medusa-be/**/*.{ts,tsx}📄 CodeRabbit inference engine (apps/medusa-be/CLAUDE.md)
Files:
apps/medusa-be/**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (apps/medusa-be/CLAUDE.md)
Files:
apps/medusa-be/tests/unit/**/*.unit.spec.ts📄 CodeRabbit inference engine (apps/medusa-be/CLAUDE.md)
Files:
apps/medusa-be/src/**/*.ts📄 CodeRabbit inference engine (apps/medusa-be/CLAUDE.md)
Files:
apps/medusa-be/src/scripts/**/*.ts📄 CodeRabbit inference engine (apps/medusa-be/CLAUDE.md)
Files:
🧠 Learnings (14)📚 Learning: 2026-05-11T23:01:30.923ZApplied to files:
📚 Learning: 2026-05-21T11:46:40.903ZApplied to files:
📚 Learning: 2026-05-11T23:01:30.923ZApplied to files:
📚 Learning: 2026-05-11T23:01:30.923ZApplied to files:
📚 Learning: 2026-05-11T23:01:30.923ZApplied to files:
📚 Learning: 2026-05-11T23:01:30.923ZApplied to files:
📚 Learning: 2026-05-11T23:01:30.923ZApplied to files:
📚 Learning: 2026-05-11T23:01:30.923ZApplied to files:
📚 Learning: 2026-05-11T23:01:30.923ZApplied to files:
📚 Learning: 2026-05-11T23:01:30.923ZApplied to files:
📚 Learning: 2026-05-11T23:01:30.923ZApplied to files:
📚 Learning: 2026-05-11T23:01:30.923ZApplied to files:
📚 Learning: 2026-05-11T23:01:30.923ZApplied to files:
📚 Learning: 2026-05-11T23:01:30.923ZApplied to files:
🔇 Additional comments (2)
WalkthroughAdds Herbatica seed configuration and extends the Shoptet import pipeline to parse multi-warehouse stock, generate and sync override/sale price lists, seed configurable VAT/tax rules, introduce workflow defaults, and refactor workflows/steps with corresponding unit tests. ChangesHerbatica Shoptet Import Workflow
🎯 4 (Complex) | ⏱️ ~60 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed: dependency version conflict. Check your lock file or package.json. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR extracts Herbatica seed configuration into a dedicated config file, adds multi-warehouse stock parsing from the Shoptet XML feed, introduces a new
Confidence Score: 4/5Safe to merge for a one-time fresh-DB seed; if re-seeding is ever needed, the product-rule accumulation in create-tax-rates.ts should be addressed first. The accumulation of stale product rules in createTaxRatesStep means that on any re-seed run a product whose VAT rate changed will remain in both the old and new rate's rule set, letting Medusa's priority logic silently pick the wrong rate. For the documented single-run use-case this is inert, but the step is general-purpose and called from multiple workflows, so the defect travels with any future caller that runs it more than once. apps/medusa-be/src/workflows/seed/steps/create-tax-rates.ts — the rule-merge logic at lines 641–647. Important Files Changed
Sequence DiagramsequenceDiagram
participant Script as herbatica-seed.ts
participant SIW as seedShoptetImportWorkflow
participant SDW as seedDatabaseWorkflow
participant CIL as createInventoryLevelsStep
participant CTR as createTaxRatesStep
participant SPL as syncPriceListsStep
Script->>Script: parseXmlFeed (products + categories)
Script->>Script: enforceUniqueVariantSkus
Script->>Script: buildPriceListsFromProducts
Script->>Script: buildStockLocationsFromOffers
Script->>SIW: run(SeedShoptetImportWorkflowInput)
SIW->>SDW: runAsStep(input)
SDW->>CIL: createInventoryLevelsStep(inventoryItems with per-location quantities)
CIL-->>SDW: inventory levels created
SDW->>CTR: createTaxRatesStep(productIds, config with defaultRates)
CTR-->>SDW: tax rates created/updated
SDW->>SPL: syncPriceListsStep(productIds, priceLists)
SPL->>SPL: ensureCustomerGroups
SPL->>SPL: ensurePriceLists (upsert)
SPL->>SPL: syncPriceListPrices (create/update)
SPL-->>SDW: price lists synced
SDW-->>SIW: result
SIW-->>Script: done
Reviews (5): Last reviewed commit: "fix(seed): import sku deduplication orde..." | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 9
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/medusa-be/src/scripts/herbatica-seed.ts`:
- Around line 2936-2941: The current getVariantMetadata(variant:
VariantSeedInput) simply casts variant.metadata with "as" without validation;
replace the direct cast with a type guard that checks variant.metadata is a
non-null object and not an array (e.g., typeof metadata === 'object' && metadata
!== null && !Array.isArray(metadata')) and only then return it as Record<string,
unknown>, otherwise return undefined; update the function to reference
VariantSeedInput and variant.metadata and avoid plain "as" casting.
In `@apps/medusa-be/src/workflows/seed/steps/create-inventory-levels.ts`:
- Around line 37-50: buildInventoryLevelsForItem currently throws generic Error
when an inventory item or stock location is missing; change those throws to
throw new MedusaError(MedusaError.Types.NOT_FOUND, ...) so they follow the
backend error contract. Locate the two throw sites inside
buildInventoryLevelsForItem (the `if (inventoryItem.id === undefined)` and the
`if (!stockLocation)` branches) and replace the generic Error with MedusaError
using the same descriptive messages and MedusaError.Types.NOT_FOUND.
In `@apps/medusa-be/src/workflows/seed/steps/ensure-price-preferences.ts`:
- Around line 83-97: The two independent calls to
pricingService.listPricePreferences (for regionIds and currencyCodes) are
executed serially; change them to run in parallel using Promise.all so latency
is reduced: create two promise expressions (guarded by regionIds.length>0 and
currencyCodes.length>0) that call pricingService.listPricePreferences for
attribute "region_id" with value regionIds and attribute "currency_code" with
value currencyCodes, await Promise.all to get both results, and assign the
resolved values to existingRegionPreferences and existingCurrencyPreferences
(defaulting to [] if the corresponding input array was empty).
In
`@apps/medusa-be/src/workflows/seed/steps/link-stock-location-fulfillment-provider.ts`:
- Around line 25-33: Sanitise input.fulfillmentProviderIds before deduping to
remove empty/blank IDs: normalize the array (guarding for undefined), map each
id => id?.toString().trim(), filter out falsy/empty strings, then create
providerIds = [...new Set(sanitisedArray)]; update the subsequent length check
and return via StepResponse({ result }) as before; reference the variables
input.fulfillmentProviderIds and providerIds in
link-stock-location-fulfillment-provider.ts to locate and replace the current
dedupe logic.
In `@apps/medusa-be/src/workflows/seed/steps/sync-price-lists.ts`:
- Around line 650-656: The code casts the result of remoteQuery(...) to
VariantPriceSetLink[] directly (used to set variantPriceSetLinks) without
validation; update the logic around the remoteQuery call to validate the
returned value before the type assertion: check that the result is an array and
each item has the expected properties (variant_id and price_set_id) and correct
types, or implement and call a type guard function (e.g.,
isVariantPriceSetLinkArray) before assigning to variantPriceSetLinks; on
validation failure either log/throw a clear error or fall back to an empty array
so the rest of the workflow handling (variantPriceSetLinks, variantIds) remains
safe.
In `@apps/medusa-be/src/workflows/seed/workflows/seed-database.ts`:
- Around line 77-79: Replace raw Error throws with MedusaError: import
MedusaError from "medusa-core-utils" and change occurrences like throw new
Error("No default sales channel found") (and the other throw sites around
defaultSalesChannel and the ranges you noted) to throw new
MedusaError(MedusaError.Types.NOT_FOUND, "No default sales channel found") or
the appropriate MedusaError.Types constant for each case; ensure you use the
unique identifiers (e.g., defaultSalesChannel and the throw expressions
currently raising Error in the seed-database workflow) so every raw throw is
converted to a typed MedusaError with a clear message.
- Around line 64-65: Several inline comments in seed-database.ts are simple
"what" comments that just restate the following line (e.g., the comment
immediately before the Steps.createSalesChannelsStep call and the other listed
locations); remove those redundant comments and replace only where necessary
with intent-focused comments that explain why the step exists, any important
constraints, or rationale (for example, explain why createSalesChannelsStep is
invoked with input.salesChannels, any ordering or transactional requirements, or
edge-case assumptions). Scan for comments adjacent to
Steps.createSalesChannelsStep, other Steps.* calls, and the listed regions and
either delete them or rewrite them to capture intent/constraints rather than
restating the code.
In `@apps/medusa-be/src/workflows/seed/workflows/seed-n1.ts`:
- Around line 43-73: The function buildInventoryItemsInput is a pure helper and
should be extracted to its own utility module to improve testability; create a
new file (e.g., a utils or helpers module) exporting buildInventoryItemsInput
with the same signature (accepting Steps.CreateProductsStepInput and returning
Steps.CreateInventoryLevelsStepInput["inventoryItems"]) and update the workflow
to import and use that exported function; ensure you move any needed type
imports (Steps...) to the new module and add unit tests for
buildInventoryItemsInput while keeping behavior identical (handling missing sku,
locations vs quantity).
- Around line 258-260: Guard access to data.createPublishableKeyResult.result[0]
in seed-n1.ts by checking that data.createPublishableKeyResult and its result
array contain an element before casting to ApiKeyDTO (mirror the null-guard
pattern used in seed-database.ts when returning publishableApiKey), and throw or
handle a clear error if missing; additionally extract the inline
buildInventoryItemsInput function (currently defined lines ~43-73) into a shared
module (e.g., export from a new utility file) and replace the inline definition
with an import and call to that exported buildInventoryItemsInput to remove
duplication and improve testability.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: ed13ab48-7005-4178-9030-4a54a2ac35d1
📒 Files selected for processing (20)
apps/medusa-be/src/scripts/herbatica-seed-config.tsapps/medusa-be/src/scripts/herbatica-seed.tsapps/medusa-be/src/scripts/seed-dev-data.tsapps/medusa-be/src/scripts/seed-n1.tsapps/medusa-be/src/workflows/seed/steps/create-inventory-levels.tsapps/medusa-be/src/workflows/seed/steps/create-products.tsapps/medusa-be/src/workflows/seed/steps/create-shipping-options.tsapps/medusa-be/src/workflows/seed/steps/create-tax-rates.tsapps/medusa-be/src/workflows/seed/steps/ensure-price-preferences.tsapps/medusa-be/src/workflows/seed/steps/index.tsapps/medusa-be/src/workflows/seed/steps/link-stock-location-fulfillment-provider.tsapps/medusa-be/src/workflows/seed/steps/sync-price-lists.tsapps/medusa-be/src/workflows/seed/workflows/index.tsapps/medusa-be/src/workflows/seed/workflows/seed-categories.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.tsapps/medusa-be/src/workflows/seed/workflows/seed-n1.tsapps/medusa-be/src/workflows/seed/workflows/seed-paykit-regions.tsapps/medusa-be/src/workflows/seed/workflows/seed-shoptet-import.tsapps/medusa-be/tests/unit/herbatica/herbatica-seed.unit.spec.tsapps/medusa-be/tests/unit/herbatica/herbatica-tax-rates.unit.spec.ts
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Greptile Review
- GitHub Check: main
🧰 Additional context used
📓 Path-based instructions (10)
apps/medusa-be/src/workflows/**/*
📄 CodeRabbit inference engine (CLAUDE.md)
Place business logic workflows under apps/medusa-be/src/workflows
Files:
apps/medusa-be/src/workflows/seed/workflows/index.tsapps/medusa-be/src/workflows/seed/workflows/seed-categories.tsapps/medusa-be/src/workflows/seed/workflows/seed-paykit-regions.tsapps/medusa-be/src/workflows/seed/workflows/seed-shoptet-import.tsapps/medusa-be/src/workflows/seed/steps/create-shipping-options.tsapps/medusa-be/src/workflows/seed/steps/link-stock-location-fulfillment-provider.tsapps/medusa-be/src/workflows/seed/steps/create-products.tsapps/medusa-be/src/workflows/seed/steps/ensure-price-preferences.tsapps/medusa-be/src/workflows/seed/steps/sync-price-lists.tsapps/medusa-be/src/workflows/seed/steps/index.tsapps/medusa-be/src/workflows/seed/steps/create-inventory-levels.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.tsapps/medusa-be/src/workflows/seed/steps/create-tax-rates.tsapps/medusa-be/src/workflows/seed/workflows/seed-n1.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Import UI components using the pattern
import { ComponentName } from '@libs/ui/atoms/component-name'or'@libs/ui/molecules/component-name'
Files:
apps/medusa-be/src/workflows/seed/workflows/index.tsapps/medusa-be/tests/unit/herbatica/herbatica-tax-rates.unit.spec.tsapps/medusa-be/src/workflows/seed/workflows/seed-categories.tsapps/medusa-be/src/workflows/seed/workflows/seed-paykit-regions.tsapps/medusa-be/src/workflows/seed/workflows/seed-shoptet-import.tsapps/medusa-be/src/workflows/seed/steps/create-shipping-options.tsapps/medusa-be/src/workflows/seed/steps/link-stock-location-fulfillment-provider.tsapps/medusa-be/src/workflows/seed/steps/create-products.tsapps/medusa-be/src/workflows/seed/steps/ensure-price-preferences.tsapps/medusa-be/src/workflows/seed/steps/sync-price-lists.tsapps/medusa-be/src/scripts/herbatica-seed-config.tsapps/medusa-be/src/scripts/seed-n1.tsapps/medusa-be/src/workflows/seed/steps/index.tsapps/medusa-be/src/scripts/seed-dev-data.tsapps/medusa-be/tests/unit/herbatica/herbatica-seed.unit.spec.tsapps/medusa-be/src/workflows/seed/steps/create-inventory-levels.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.tsapps/medusa-be/src/scripts/herbatica-seed.tsapps/medusa-be/src/workflows/seed/steps/create-tax-rates.tsapps/medusa-be/src/workflows/seed/workflows/seed-n1.ts
apps/medusa-be/src/{api,modules,workflows,admin,subscribers,jobs}/**
📄 CodeRabbit inference engine (AGENTS.md)
In Medusa backend applications, organize custom code using the directory structure: api/, modules/, workflows/, admin/, subscribers/, jobs/
Files:
apps/medusa-be/src/workflows/seed/workflows/index.tsapps/medusa-be/src/workflows/seed/workflows/seed-categories.tsapps/medusa-be/src/workflows/seed/workflows/seed-paykit-regions.tsapps/medusa-be/src/workflows/seed/workflows/seed-shoptet-import.tsapps/medusa-be/src/workflows/seed/steps/create-shipping-options.tsapps/medusa-be/src/workflows/seed/steps/link-stock-location-fulfillment-provider.tsapps/medusa-be/src/workflows/seed/steps/create-products.tsapps/medusa-be/src/workflows/seed/steps/ensure-price-preferences.tsapps/medusa-be/src/workflows/seed/steps/sync-price-lists.tsapps/medusa-be/src/workflows/seed/steps/index.tsapps/medusa-be/src/workflows/seed/steps/create-inventory-levels.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.tsapps/medusa-be/src/workflows/seed/steps/create-tax-rates.tsapps/medusa-be/src/workflows/seed/workflows/seed-n1.ts
apps/medusa-be/**/*.{ts,tsx}
📄 CodeRabbit inference engine (apps/medusa-be/CLAUDE.md)
apps/medusa-be/**/*.{ts,tsx}: Runnpx tsc --noEmitfor typechecking before committing
Always use braces around conditional blocks, even for single statements; Biome will expand them
Declare one variable perconst/letstatement, not multiple on one line
Use nullish coalescing operator (??) instead of logical OR (||) for default values
Do not use non-null assertions (!); use type guards or validation instead
Annotate type asunknownwhen accessing dynamic object properties before applying type guards
Use comments only to explain 'why', never 'what'; self-document code with clear naming
Extract pure functions to separate files for testability without runtime dependencies
UseModules.*andContainerRegistrationKeys.*constants instead of hardcoding module/key strings
Do not use non-null assertions in TypeScript code; validate or use type guards instead
Validate data before type casting; never useas Typewithout prior validation
Files:
apps/medusa-be/src/workflows/seed/workflows/index.tsapps/medusa-be/tests/unit/herbatica/herbatica-tax-rates.unit.spec.tsapps/medusa-be/src/workflows/seed/workflows/seed-categories.tsapps/medusa-be/src/workflows/seed/workflows/seed-paykit-regions.tsapps/medusa-be/src/workflows/seed/workflows/seed-shoptet-import.tsapps/medusa-be/src/workflows/seed/steps/create-shipping-options.tsapps/medusa-be/src/workflows/seed/steps/link-stock-location-fulfillment-provider.tsapps/medusa-be/src/workflows/seed/steps/create-products.tsapps/medusa-be/src/workflows/seed/steps/ensure-price-preferences.tsapps/medusa-be/src/workflows/seed/steps/sync-price-lists.tsapps/medusa-be/src/scripts/herbatica-seed-config.tsapps/medusa-be/src/scripts/seed-n1.tsapps/medusa-be/src/workflows/seed/steps/index.tsapps/medusa-be/src/scripts/seed-dev-data.tsapps/medusa-be/tests/unit/herbatica/herbatica-seed.unit.spec.tsapps/medusa-be/src/workflows/seed/steps/create-inventory-levels.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.tsapps/medusa-be/src/scripts/herbatica-seed.tsapps/medusa-be/src/workflows/seed/steps/create-tax-rates.tsapps/medusa-be/src/workflows/seed/workflows/seed-n1.ts
apps/medusa-be/**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (apps/medusa-be/CLAUDE.md)
Run
bunx biome check --write .to lint and auto-format code
Files:
apps/medusa-be/src/workflows/seed/workflows/index.tsapps/medusa-be/tests/unit/herbatica/herbatica-tax-rates.unit.spec.tsapps/medusa-be/src/workflows/seed/workflows/seed-categories.tsapps/medusa-be/src/workflows/seed/workflows/seed-paykit-regions.tsapps/medusa-be/src/workflows/seed/workflows/seed-shoptet-import.tsapps/medusa-be/src/workflows/seed/steps/create-shipping-options.tsapps/medusa-be/src/workflows/seed/steps/link-stock-location-fulfillment-provider.tsapps/medusa-be/src/workflows/seed/steps/create-products.tsapps/medusa-be/src/workflows/seed/steps/ensure-price-preferences.tsapps/medusa-be/src/workflows/seed/steps/sync-price-lists.tsapps/medusa-be/src/scripts/herbatica-seed-config.tsapps/medusa-be/src/scripts/seed-n1.tsapps/medusa-be/src/workflows/seed/steps/index.tsapps/medusa-be/src/scripts/seed-dev-data.tsapps/medusa-be/tests/unit/herbatica/herbatica-seed.unit.spec.tsapps/medusa-be/src/workflows/seed/steps/create-inventory-levels.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.tsapps/medusa-be/src/scripts/herbatica-seed.tsapps/medusa-be/src/workflows/seed/steps/create-tax-rates.tsapps/medusa-be/src/workflows/seed/workflows/seed-n1.ts
apps/medusa-be/src/**/*.ts
📄 CodeRabbit inference engine (apps/medusa-be/CLAUDE.md)
apps/medusa-be/src/**/*.ts: Useconstand explicit typing withdbService.sqlRaw<Type>()for SQL query results
Resolve logger usingcontainer.resolve<Logger>(ContainerRegistrationKeys.LOGGER)
Resolve Query usingcontainer.resolve<Query>(ContainerRegistrationKeys.QUERY)
UseModules.LOCKING(notModules.LOCK) to resolve locking services
UseModules.CACHING(notModules.CACHE) to resolve caching services
ThrowMedusaErrorwith appropriate type and message for error responses
UseMedusaError.Types.INVALID_DATAfor 400 validation errors
UseMedusaError.Types.NOT_FOUNDfor 404 errors
UseMedusaError.Types.UNAUTHORIZEDfor 401 authentication errors
UseMedusaError.Types.NOT_ALLOWEDfor 400 permission errors
UseMedusaError.Types.DUPLICATE_ERRORfor 422 duplicate entry errors
UseMedusaError.Types.CONFLICTfor 409 conflict errors
Use caching module'scomputeKey()to generate stable cache keys from filters and pagination
Use caching module'sget()with type assertion for cache retrieval
Use caching module'sset()with TTL and tags for cache storage and bulk invalidation
Use caching module'sclear()with tags to bulk-invalidate related cache entries
Always use Redis for caching in multi-container deployments instead of local variables
Batch operations usingCHUNK_SIZEconstant instead of unbounded loops
Files:
apps/medusa-be/src/workflows/seed/workflows/index.tsapps/medusa-be/src/workflows/seed/workflows/seed-categories.tsapps/medusa-be/src/workflows/seed/workflows/seed-paykit-regions.tsapps/medusa-be/src/workflows/seed/workflows/seed-shoptet-import.tsapps/medusa-be/src/workflows/seed/steps/create-shipping-options.tsapps/medusa-be/src/workflows/seed/steps/link-stock-location-fulfillment-provider.tsapps/medusa-be/src/workflows/seed/steps/create-products.tsapps/medusa-be/src/workflows/seed/steps/ensure-price-preferences.tsapps/medusa-be/src/workflows/seed/steps/sync-price-lists.tsapps/medusa-be/src/scripts/herbatica-seed-config.tsapps/medusa-be/src/scripts/seed-n1.tsapps/medusa-be/src/workflows/seed/steps/index.tsapps/medusa-be/src/scripts/seed-dev-data.tsapps/medusa-be/src/workflows/seed/steps/create-inventory-levels.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.tsapps/medusa-be/src/scripts/herbatica-seed.tsapps/medusa-be/src/workflows/seed/steps/create-tax-rates.tsapps/medusa-be/src/workflows/seed/workflows/seed-n1.ts
apps/medusa-be/src/workflows/**/*.ts
📄 CodeRabbit inference engine (apps/medusa-be/CLAUDE.md)
apps/medusa-be/src/workflows/**/*.ts: Use the second parameter{ container }object to access container in workflow steps
UsecreateStep()to define workflow steps with input validation and response wrapping
UsecreateWorkflow()to define multi-step business logic with rollback support
Returnnew StepResponse()from workflow steps to pass data to next steps
Returnnew WorkflowResponse()from workflows to pass final result to caller
Usetransform()in workflows for data manipulation only; cannot contain side effects
Usewhen().then()for conditional logic in workflows instead of if statements
Do not reassign or iterate workflow variables; variable definitions are static at definition time
UseuseQueryGraphStep()for Query operations within workflows
UseacquireLockStep(),releaseLockStep()for workflow-level locking instead of manual job locking
Files:
apps/medusa-be/src/workflows/seed/workflows/index.tsapps/medusa-be/src/workflows/seed/workflows/seed-categories.tsapps/medusa-be/src/workflows/seed/workflows/seed-paykit-regions.tsapps/medusa-be/src/workflows/seed/workflows/seed-shoptet-import.tsapps/medusa-be/src/workflows/seed/steps/create-shipping-options.tsapps/medusa-be/src/workflows/seed/steps/link-stock-location-fulfillment-provider.tsapps/medusa-be/src/workflows/seed/steps/create-products.tsapps/medusa-be/src/workflows/seed/steps/ensure-price-preferences.tsapps/medusa-be/src/workflows/seed/steps/sync-price-lists.tsapps/medusa-be/src/workflows/seed/steps/index.tsapps/medusa-be/src/workflows/seed/steps/create-inventory-levels.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.tsapps/medusa-be/src/workflows/seed/steps/create-tax-rates.tsapps/medusa-be/src/workflows/seed/workflows/seed-n1.ts
**/*.{test,spec}.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use Vitest for running tests in backend and UI library projects
Files:
apps/medusa-be/tests/unit/herbatica/herbatica-tax-rates.unit.spec.tsapps/medusa-be/tests/unit/herbatica/herbatica-seed.unit.spec.ts
apps/medusa-be/tests/unit/**/*.unit.spec.ts
📄 CodeRabbit inference engine (apps/medusa-be/CLAUDE.md)
apps/medusa-be/tests/unit/**/*.unit.spec.ts: Focus unit tests on critical paths: validation, money calculations, and core business logic
Skip unit tests for: getters, static arrays, trivial transforms, constants, and pass-through methods
Do not test mocked methods; test real behavior instead
Do not testquery.graph()pass-through calls in unit tests
Do not test logging calls; they are implementation details
Use factory functions likecreateMockEntity(overrides)for test data generation
Useit.each()to test multiple error cases and boundary conditions
Usevi.useFakeTimers()for deterministic time-based testing; usevi.setSystemTime()for absolute time
Clear mocks withmockFn.mockReset()instead ofvi.clearAllMocks()formockResolvedValueOncechains
Files:
apps/medusa-be/tests/unit/herbatica/herbatica-tax-rates.unit.spec.tsapps/medusa-be/tests/unit/herbatica/herbatica-seed.unit.spec.ts
apps/medusa-be/src/scripts/**/*.ts
📄 CodeRabbit inference engine (apps/medusa-be/CLAUDE.md)
apps/medusa-be/src/scripts/**/*.ts: Usemedusa exec ./path/to/script.ts [args]to run one-off scripts instead of creating HTTP endpoints
Use script patternnpx medusa exec ./src/scripts/startup.tsin startup hooks
Use destructive operations inmedusa execscripts, never in unprotected GET endpoints
Files:
apps/medusa-be/src/scripts/herbatica-seed-config.tsapps/medusa-be/src/scripts/seed-n1.tsapps/medusa-be/src/scripts/seed-dev-data.tsapps/medusa-be/src/scripts/herbatica-seed.ts
🔇 Additional comments (19)
apps/medusa-be/tests/unit/herbatica/herbatica-seed.unit.spec.ts (1)
9-18: LGTM!Also applies to: 151-151, 155-170, 190-505, 754-802, 837-841
apps/medusa-be/tests/unit/herbatica/herbatica-tax-rates.unit.spec.ts (1)
1-155: LGTM!apps/medusa-be/src/workflows/seed/workflows/seed-categories.ts (1)
17-44: LGTM!apps/medusa-be/src/workflows/seed/workflows/seed-paykit-regions.ts (1)
35-102: LGTM!apps/medusa-be/src/workflows/seed/workflows/seed-shoptet-import.ts (1)
1-27: LGTM!apps/medusa-be/src/workflows/seed/workflows/index.ts (1)
1-3: LGTM!apps/medusa-be/src/workflows/seed/steps/index.ts (1)
1-20: LGTM!apps/medusa-be/src/workflows/seed/steps/create-tax-rates.ts (1)
1-713: LGTM!apps/medusa-be/src/workflows/seed/steps/sync-price-lists.ts (1)
1-149: LGTM!Also applies to: 158-649, 657-681
apps/medusa-be/src/scripts/herbatica-seed.ts (1)
1-2935: LGTM!Also applies to: 2942-3545
apps/medusa-be/src/scripts/herbatica-seed-config.ts (1)
6-231: LGTM!apps/medusa-be/src/scripts/seed-dev-data.ts (1)
26-29: LGTM!apps/medusa-be/src/scripts/seed-n1.ts (1)
51-54: LGTM!apps/medusa-be/src/workflows/seed/steps/create-inventory-levels.ts (1)
20-24: LGTM!Also applies to: 28-31, 61-71, 91-105
apps/medusa-be/src/workflows/seed/steps/create-products.ts (1)
74-77: LGTM!Also applies to: 203-205
apps/medusa-be/src/workflows/seed/workflows/seed-n1.ts (1)
26-29: LGTM!Also applies to: 75-257, 263-305
apps/medusa-be/src/workflows/seed/steps/create-shipping-options.ts (1)
47-47: LGTM!apps/medusa-be/src/workflows/seed/steps/link-stock-location-fulfillment-provider.ts (1)
8-8: LGTM!apps/medusa-be/src/workflows/seed/steps/ensure-price-preferences.ts (1)
1-3: LGTM!Also applies to: 23-23, 32-32, 37-37, 61-64, 98-101
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/medusa-be/src/workflows/seed/workflows/seed-n1.ts (1)
58-60: 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick winUse
MedusaErrorinstead of rawErrorfor consistent error handling.Several
throw new Error(...)statements remain in this workflow (lines 59, 125-127, 154-156, 162-164), whilst the same errors inseed-database.tsnow useMedusaError.Types.NOT_FOUND. This creates inconsistency between the two seed workflows.♻️ Proposed fix for consistent error handling
if (!defaultSalesChannel) { - throw new Error("No default sales channel found") + throw new MedusaError( + MedusaError.Types.NOT_FOUND, + "No default sales channel found" + ) }Apply the same pattern to lines 125-127, 154-156, and 162-164.
As per coding guidelines: "Throw
MedusaErrorwith appropriate type and message for error responses".🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/medusa-be/src/workflows/seed/workflows/seed-n1.ts` around lines 58 - 60, Replace raw Error throws in this workflow with MedusaError for consistent handling: import MedusaError from medusa-core-utils if not already present, then change each throw new Error("...") (e.g., the check that throws when defaultSalesChannel is missing and the other throw sites in this file) to throw new MedusaError(MedusaError.Types.NOT_FOUND, "<same message>"); ensure you use MedusaError.Types.NOT_FOUND and keep the original error messages for clarity.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@apps/medusa-be/src/workflows/seed/workflows/seed-n1.ts`:
- Around line 58-60: Replace raw Error throws in this workflow with MedusaError
for consistent handling: import MedusaError from medusa-core-utils if not
already present, then change each throw new Error("...") (e.g., the check that
throws when defaultSalesChannel is missing and the other throw sites in this
file) to throw new MedusaError(MedusaError.Types.NOT_FOUND, "<same message>");
ensure you use MedusaError.Types.NOT_FOUND and keep the original error messages
for clarity.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: be66e01d-c039-40d8-bcdc-626418ea08dc
📒 Files selected for processing (9)
apps/medusa-be/src/scripts/herbatica-seed.tsapps/medusa-be/src/workflows/seed/helpers/build-inventory-items-input.tsapps/medusa-be/src/workflows/seed/steps/create-inventory-levels.tsapps/medusa-be/src/workflows/seed/steps/ensure-price-preferences.tsapps/medusa-be/src/workflows/seed/steps/link-stock-location-fulfillment-provider.tsapps/medusa-be/src/workflows/seed/steps/sync-price-lists.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.tsapps/medusa-be/src/workflows/seed/workflows/seed-n1.tsapps/medusa-be/tests/unit/src/workflows/seed/build-inventory-items-input.unit.spec.ts
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Greptile Review
- GitHub Check: main
- GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
📓 Path-based instructions (10)
apps/medusa-be/src/workflows/**/*
📄 CodeRabbit inference engine (CLAUDE.md)
Place business logic workflows under apps/medusa-be/src/workflows
Files:
apps/medusa-be/src/workflows/seed/helpers/build-inventory-items-input.tsapps/medusa-be/src/workflows/seed/steps/link-stock-location-fulfillment-provider.tsapps/medusa-be/src/workflows/seed/steps/ensure-price-preferences.tsapps/medusa-be/src/workflows/seed/workflows/seed-n1.tsapps/medusa-be/src/workflows/seed/steps/create-inventory-levels.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.tsapps/medusa-be/src/workflows/seed/steps/sync-price-lists.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Import UI components using the pattern
import { ComponentName } from '@libs/ui/atoms/component-name'or'@libs/ui/molecules/component-name'
Files:
apps/medusa-be/src/workflows/seed/helpers/build-inventory-items-input.tsapps/medusa-be/tests/unit/src/workflows/seed/build-inventory-items-input.unit.spec.tsapps/medusa-be/src/workflows/seed/steps/link-stock-location-fulfillment-provider.tsapps/medusa-be/src/workflows/seed/steps/ensure-price-preferences.tsapps/medusa-be/src/workflows/seed/workflows/seed-n1.tsapps/medusa-be/src/workflows/seed/steps/create-inventory-levels.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.tsapps/medusa-be/src/workflows/seed/steps/sync-price-lists.tsapps/medusa-be/src/scripts/herbatica-seed.ts
apps/medusa-be/src/{api,modules,workflows,admin,subscribers,jobs}/**
📄 CodeRabbit inference engine (AGENTS.md)
In Medusa backend applications, organize custom code using the directory structure: api/, modules/, workflows/, admin/, subscribers/, jobs/
Files:
apps/medusa-be/src/workflows/seed/helpers/build-inventory-items-input.tsapps/medusa-be/src/workflows/seed/steps/link-stock-location-fulfillment-provider.tsapps/medusa-be/src/workflows/seed/steps/ensure-price-preferences.tsapps/medusa-be/src/workflows/seed/workflows/seed-n1.tsapps/medusa-be/src/workflows/seed/steps/create-inventory-levels.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.tsapps/medusa-be/src/workflows/seed/steps/sync-price-lists.ts
apps/medusa-be/**/*.{ts,tsx}
📄 CodeRabbit inference engine (apps/medusa-be/CLAUDE.md)
apps/medusa-be/**/*.{ts,tsx}: Runnpx tsc --noEmitfor typechecking before committing
Always use braces around conditional blocks, even for single statements; Biome will expand them
Declare one variable perconst/letstatement, not multiple on one line
Use nullish coalescing operator (??) instead of logical OR (||) for default values
Do not use non-null assertions (!); use type guards or validation instead
Annotate type asunknownwhen accessing dynamic object properties before applying type guards
Use comments only to explain 'why', never 'what'; self-document code with clear naming
Extract pure functions to separate files for testability without runtime dependencies
UseModules.*andContainerRegistrationKeys.*constants instead of hardcoding module/key strings
Do not use non-null assertions in TypeScript code; validate or use type guards instead
Validate data before type casting; never useas Typewithout prior validation
Files:
apps/medusa-be/src/workflows/seed/helpers/build-inventory-items-input.tsapps/medusa-be/tests/unit/src/workflows/seed/build-inventory-items-input.unit.spec.tsapps/medusa-be/src/workflows/seed/steps/link-stock-location-fulfillment-provider.tsapps/medusa-be/src/workflows/seed/steps/ensure-price-preferences.tsapps/medusa-be/src/workflows/seed/workflows/seed-n1.tsapps/medusa-be/src/workflows/seed/steps/create-inventory-levels.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.tsapps/medusa-be/src/workflows/seed/steps/sync-price-lists.tsapps/medusa-be/src/scripts/herbatica-seed.ts
apps/medusa-be/**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (apps/medusa-be/CLAUDE.md)
Run
bunx biome check --write .to lint and auto-format code
Files:
apps/medusa-be/src/workflows/seed/helpers/build-inventory-items-input.tsapps/medusa-be/tests/unit/src/workflows/seed/build-inventory-items-input.unit.spec.tsapps/medusa-be/src/workflows/seed/steps/link-stock-location-fulfillment-provider.tsapps/medusa-be/src/workflows/seed/steps/ensure-price-preferences.tsapps/medusa-be/src/workflows/seed/workflows/seed-n1.tsapps/medusa-be/src/workflows/seed/steps/create-inventory-levels.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.tsapps/medusa-be/src/workflows/seed/steps/sync-price-lists.tsapps/medusa-be/src/scripts/herbatica-seed.ts
apps/medusa-be/src/**/*.ts
📄 CodeRabbit inference engine (apps/medusa-be/CLAUDE.md)
apps/medusa-be/src/**/*.ts: Useconstand explicit typing withdbService.sqlRaw<Type>()for SQL query results
Resolve logger usingcontainer.resolve<Logger>(ContainerRegistrationKeys.LOGGER)
Resolve Query usingcontainer.resolve<Query>(ContainerRegistrationKeys.QUERY)
UseModules.LOCKING(notModules.LOCK) to resolve locking services
UseModules.CACHING(notModules.CACHE) to resolve caching services
ThrowMedusaErrorwith appropriate type and message for error responses
UseMedusaError.Types.INVALID_DATAfor 400 validation errors
UseMedusaError.Types.NOT_FOUNDfor 404 errors
UseMedusaError.Types.UNAUTHORIZEDfor 401 authentication errors
UseMedusaError.Types.NOT_ALLOWEDfor 400 permission errors
UseMedusaError.Types.DUPLICATE_ERRORfor 422 duplicate entry errors
UseMedusaError.Types.CONFLICTfor 409 conflict errors
Use caching module'scomputeKey()to generate stable cache keys from filters and pagination
Use caching module'sget()with type assertion for cache retrieval
Use caching module'sset()with TTL and tags for cache storage and bulk invalidation
Use caching module'sclear()with tags to bulk-invalidate related cache entries
Always use Redis for caching in multi-container deployments instead of local variables
Batch operations usingCHUNK_SIZEconstant instead of unbounded loops
Files:
apps/medusa-be/src/workflows/seed/helpers/build-inventory-items-input.tsapps/medusa-be/src/workflows/seed/steps/link-stock-location-fulfillment-provider.tsapps/medusa-be/src/workflows/seed/steps/ensure-price-preferences.tsapps/medusa-be/src/workflows/seed/workflows/seed-n1.tsapps/medusa-be/src/workflows/seed/steps/create-inventory-levels.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.tsapps/medusa-be/src/workflows/seed/steps/sync-price-lists.tsapps/medusa-be/src/scripts/herbatica-seed.ts
apps/medusa-be/src/workflows/**/*.ts
📄 CodeRabbit inference engine (apps/medusa-be/CLAUDE.md)
apps/medusa-be/src/workflows/**/*.ts: Use the second parameter{ container }object to access container in workflow steps
UsecreateStep()to define workflow steps with input validation and response wrapping
UsecreateWorkflow()to define multi-step business logic with rollback support
Returnnew StepResponse()from workflow steps to pass data to next steps
Returnnew WorkflowResponse()from workflows to pass final result to caller
Usetransform()in workflows for data manipulation only; cannot contain side effects
Usewhen().then()for conditional logic in workflows instead of if statements
Do not reassign or iterate workflow variables; variable definitions are static at definition time
UseuseQueryGraphStep()for Query operations within workflows
UseacquireLockStep(),releaseLockStep()for workflow-level locking instead of manual job locking
Files:
apps/medusa-be/src/workflows/seed/helpers/build-inventory-items-input.tsapps/medusa-be/src/workflows/seed/steps/link-stock-location-fulfillment-provider.tsapps/medusa-be/src/workflows/seed/steps/ensure-price-preferences.tsapps/medusa-be/src/workflows/seed/workflows/seed-n1.tsapps/medusa-be/src/workflows/seed/steps/create-inventory-levels.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.tsapps/medusa-be/src/workflows/seed/steps/sync-price-lists.ts
**/*.{test,spec}.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use Vitest for running tests in backend and UI library projects
Files:
apps/medusa-be/tests/unit/src/workflows/seed/build-inventory-items-input.unit.spec.ts
apps/medusa-be/tests/unit/**/*.unit.spec.ts
📄 CodeRabbit inference engine (apps/medusa-be/CLAUDE.md)
apps/medusa-be/tests/unit/**/*.unit.spec.ts: Focus unit tests on critical paths: validation, money calculations, and core business logic
Skip unit tests for: getters, static arrays, trivial transforms, constants, and pass-through methods
Do not test mocked methods; test real behavior instead
Do not testquery.graph()pass-through calls in unit tests
Do not test logging calls; they are implementation details
Use factory functions likecreateMockEntity(overrides)for test data generation
Useit.each()to test multiple error cases and boundary conditions
Usevi.useFakeTimers()for deterministic time-based testing; usevi.setSystemTime()for absolute time
Clear mocks withmockFn.mockReset()instead ofvi.clearAllMocks()formockResolvedValueOncechains
Files:
apps/medusa-be/tests/unit/src/workflows/seed/build-inventory-items-input.unit.spec.ts
apps/medusa-be/src/scripts/**/*.ts
📄 CodeRabbit inference engine (apps/medusa-be/CLAUDE.md)
apps/medusa-be/src/scripts/**/*.ts: Usemedusa exec ./path/to/script.ts [args]to run one-off scripts instead of creating HTTP endpoints
Use script patternnpx medusa exec ./src/scripts/startup.tsin startup hooks
Use destructive operations inmedusa execscripts, never in unprotected GET endpoints
Files:
apps/medusa-be/src/scripts/herbatica-seed.ts
🧠 Learnings (48)
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/src/workflows/**/*.ts : Use `createStep()` to define workflow steps with input validation and response wrapping
Applied to files:
apps/medusa-be/src/workflows/seed/helpers/build-inventory-items-input.tsapps/medusa-be/src/workflows/seed/steps/link-stock-location-fulfillment-provider.tsapps/medusa-be/src/workflows/seed/workflows/seed-n1.tsapps/medusa-be/src/workflows/seed/steps/create-inventory-levels.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.tsapps/medusa-be/src/workflows/seed/steps/sync-price-lists.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/tests/unit/**/*.unit.spec.ts : Use factory functions like `createMockEntity(overrides)` for test data generation
Applied to files:
apps/medusa-be/tests/unit/src/workflows/seed/build-inventory-items-input.unit.spec.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/tests/unit/jobs/**/*.spec.ts : Place job tests in `tests/unit/jobs/` not in `src/jobs/__tests__/` to avoid Medusa loading them at runtime
Applied to files:
apps/medusa-be/tests/unit/src/workflows/seed/build-inventory-items-input.unit.spec.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/tests/unit/**/*.unit.spec.ts : Skip unit tests for: getters, static arrays, trivial transforms, constants, and pass-through methods
Applied to files:
apps/medusa-be/tests/unit/src/workflows/seed/build-inventory-items-input.unit.spec.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/src/modules/*/__tests__/*.spec.ts : Mock loaders in tests using `vi.mock()` to prevent actual initialization during testing
Applied to files:
apps/medusa-be/tests/unit/src/workflows/seed/build-inventory-items-input.unit.spec.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/tests/unit/**/*.unit.spec.ts : Focus unit tests on critical paths: validation, money calculations, and core business logic
Applied to files:
apps/medusa-be/tests/unit/src/workflows/seed/build-inventory-items-input.unit.spec.tsapps/medusa-be/src/workflows/seed/steps/ensure-price-preferences.tsapps/medusa-be/src/workflows/seed/workflows/seed-n1.ts
📚 Learning: 2026-05-21T11:46:40.903Z
Learnt from: redeyecz
Repo: TechsioCZ/new-engine PR: 323
File: apps/medusa-be/integration-tests/http/promotions-custom-rules.spec.ts:0-0
Timestamp: 2026-05-21T11:46:40.903Z
Learning: In `apps/medusa-be/integration-tests/http/promotions-custom-rules.spec.ts`, the test intentionally uses a custom `requestJson`/`createClient`/`fetch`-based HTTP harness (running against a full Docker stack) instead of `medusaIntegrationTestRunner()`. This is a deliberate decision because `medusaIntegrationTestRunner()` had issues with publishable-key resolution in the monorepo due to package-hoisting caveats. Do not flag the absence of `medusaIntegrationTestRunner()` in this file; it is marked for future refactoring when the monorepo/hoisting issue is resolved.
Applied to files:
apps/medusa-be/tests/unit/src/workflows/seed/build-inventory-items-input.unit.spec.tsapps/medusa-be/src/workflows/seed/workflows/seed-n1.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/src/jobs/**/*.ts : Do not place test files in `src/jobs/__tests__/` as Medusa loads all `src/jobs/` files at runtime
Applied to files:
apps/medusa-be/tests/unit/src/workflows/seed/build-inventory-items-input.unit.spec.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/tests/unit/**/*.unit.spec.ts : Clear mocks with `mockFn.mockReset()` instead of `vi.clearAllMocks()` for `mockResolvedValueOnce` chains
Applied to files:
apps/medusa-be/tests/unit/src/workflows/seed/build-inventory-items-input.unit.spec.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/tests/unit/**/*.unit.spec.ts : Do not test `query.graph()` pass-through calls in unit tests
Applied to files:
apps/medusa-be/tests/unit/src/workflows/seed/build-inventory-items-input.unit.spec.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/tests/unit/**/*.unit.spec.ts : Use `vi.useFakeTimers()` for deterministic time-based testing; use `vi.setSystemTime()` for absolute time
Applied to files:
apps/medusa-be/tests/unit/src/workflows/seed/build-inventory-items-input.unit.spec.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/src/modules/*/provider.ts : Use container key format `fp_{identifier}_{id}` for fulfillment provider registration
Applied to files:
apps/medusa-be/src/workflows/seed/steps/link-stock-location-fulfillment-provider.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/src/modules/**/models/*.ts : Use provider identifier format `{identifier}_{id}` in DB `provider_id` field (e.g., `my_shipping_default`)
Applied to files:
apps/medusa-be/src/workflows/seed/steps/link-stock-location-fulfillment-provider.tsapps/medusa-be/src/workflows/seed/steps/ensure-price-preferences.ts
📚 Learning: 2026-05-07T19:18:05.075Z
Learnt from: redeyecz
Repo: TechsioCZ/new-engine PR: 390
File: apps/medusa-be/src/api/admin/packeta-labels/route.ts:121-121
Timestamp: 2026-05-07T19:18:05.075Z
Learning: In `apps/medusa-be`, the hard-coded fulfillment provider ID string (e.g. `"packeta_packeta"`) is intentionally kept inline for now, consistent with the PPL implementation pattern. Extracting these into shared constants (e.g. `PACKETA_FULFILLMENT_PROVIDER_ID`) is deferred to a future refactor pass when more providers are added. Do not flag this as an issue in code reviews.
Applied to files:
apps/medusa-be/src/workflows/seed/steps/link-stock-location-fulfillment-provider.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/src/workflows/**/*.ts : Use `transform()` in workflows for data manipulation only; cannot contain side effects
Applied to files:
apps/medusa-be/src/workflows/seed/steps/ensure-price-preferences.tsapps/medusa-be/src/workflows/seed/workflows/seed-n1.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.ts
📚 Learning: 2026-04-27T14:21:32.929Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/zane-operator/AGENTS.md:0-0
Timestamp: 2026-04-27T14:21:32.929Z
Learning: Applies to apps/zane-operator/src/**/*.ts : Preserve deterministic preview DB/user naming and password derivation logic
Applied to files:
apps/medusa-be/src/workflows/seed/steps/ensure-price-preferences.tsapps/medusa-be/src/workflows/seed/workflows/seed-n1.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/**/*.{ts,tsx} : Use `Modules.*` and `ContainerRegistrationKeys.*` constants instead of hardcoding module/key strings
Applied to files:
apps/medusa-be/src/workflows/seed/steps/ensure-price-preferences.tsapps/medusa-be/src/workflows/seed/steps/create-inventory-levels.tsapps/medusa-be/src/workflows/seed/steps/sync-price-lists.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/src/modules/**/models/*.ts : Use `model.float()` for lower-precision numbers; use `model.bigNumber()` for high-precision values like money
Applied to files:
apps/medusa-be/src/workflows/seed/steps/ensure-price-preferences.ts
📚 Learning: 2026-05-06T13:05:32.880Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/payload/.cursor/rules/access-control-advanced.md:0-0
Timestamp: 2026-05-06T13:05:32.880Z
Learning: Applies to apps/payload/**/*.{ts,tsx} : Avoid multiple sequential async calls in access control functions; instead use query constraints or cache expensive lookups in `req.context` for performance
Applied to files:
apps/medusa-be/src/workflows/seed/steps/ensure-price-preferences.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/src/modules/*/service.ts : Use workflows for cross-module orchestration; do not use Query/Link in module service constructors
Applied to files:
apps/medusa-be/src/workflows/seed/steps/ensure-price-preferences.tsapps/medusa-be/src/workflows/seed/steps/create-inventory-levels.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.tsapps/medusa-be/src/workflows/seed/steps/sync-price-lists.ts
📚 Learning: 2026-05-06T13:05:32.880Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/payload/.cursor/rules/access-control-advanced.md:0-0
Timestamp: 2026-05-06T13:05:32.880Z
Learning: Applies to apps/payload/**/*.{ts,tsx} : Avoid N+1 query problems by using query constraint filters instead of loading individual documents to check access; let the database filter at query level
Applied to files:
apps/medusa-be/src/workflows/seed/steps/ensure-price-preferences.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/src/workflows/**/*.ts : Use `createWorkflow()` to define multi-step business logic with rollback support
Applied to files:
apps/medusa-be/src/workflows/seed/workflows/seed-n1.tsapps/medusa-be/src/workflows/seed/steps/create-inventory-levels.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.tsapps/medusa-be/src/workflows/seed/steps/sync-price-lists.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/**/*.{ts,tsx} : Extract pure functions to separate files for testability without runtime dependencies
Applied to files:
apps/medusa-be/src/workflows/seed/workflows/seed-n1.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/**/*.{ts,tsx} : Do not use non-null assertions (`!`); use type guards or validation instead
Applied to files:
apps/medusa-be/src/workflows/seed/workflows/seed-n1.tsapps/medusa-be/src/workflows/seed/steps/sync-price-lists.tsapps/medusa-be/src/scripts/herbatica-seed.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/**/*.{ts,tsx} : Do not use non-null assertions in TypeScript code; validate or use type guards instead
Applied to files:
apps/medusa-be/src/workflows/seed/workflows/seed-n1.tsapps/medusa-be/src/workflows/seed/steps/sync-price-lists.tsapps/medusa-be/src/scripts/herbatica-seed.ts
📚 Learning: 2026-04-27T14:21:32.929Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/zane-operator/AGENTS.md:0-0
Timestamp: 2026-04-27T14:21:32.929Z
Learning: Applies to apps/zane-operator/{apps/zane-operator/src/**/*.ts,docker/development/postgres/*.sh} : Do not broaden privileges to 'make it work'; if broad prod access is requested, gate it behind explicit opt-in flags
Applied to files:
apps/medusa-be/src/workflows/seed/workflows/seed-n1.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/src/workflows/**/*.ts : Do not reassign or iterate workflow variables; variable definitions are static at definition time
Applied to files:
apps/medusa-be/src/workflows/seed/workflows/seed-n1.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/src/workflows/**/*.ts : Return `new StepResponse()` from workflow steps to pass data to next steps
Applied to files:
apps/medusa-be/src/workflows/seed/workflows/seed-n1.tsapps/medusa-be/src/workflows/seed/steps/create-inventory-levels.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.tsapps/medusa-be/src/workflows/seed/steps/sync-price-lists.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/src/workflows/**/*.ts : Return `new WorkflowResponse()` from workflows to pass final result to caller
Applied to files:
apps/medusa-be/src/workflows/seed/workflows/seed-n1.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.tsapps/medusa-be/src/workflows/seed/steps/sync-price-lists.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/src/workflows/**/*.ts : Use `useQueryGraphStep()` for Query operations within workflows
Applied to files:
apps/medusa-be/src/workflows/seed/workflows/seed-n1.tsapps/medusa-be/src/workflows/seed/steps/create-inventory-levels.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.tsapps/medusa-be/src/workflows/seed/steps/sync-price-lists.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/src/workflows/**/*.ts : Use the second parameter `{ container }` object to access container in workflow steps
Applied to files:
apps/medusa-be/src/workflows/seed/workflows/seed-n1.tsapps/medusa-be/src/workflows/seed/steps/create-inventory-levels.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.tsapps/medusa-be/src/workflows/seed/steps/sync-price-lists.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/src/workflows/**/*.ts : Use `acquireLockStep()`, `releaseLockStep()` for workflow-level locking instead of manual job locking
Applied to files:
apps/medusa-be/src/workflows/seed/workflows/seed-n1.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.tsapps/medusa-be/src/workflows/seed/steps/sync-price-lists.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/src/**/*.ts : Use `MedusaError.Types.NOT_FOUND` for 404 errors
Applied to files:
apps/medusa-be/src/workflows/seed/steps/create-inventory-levels.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/src/**/*.ts : Throw `MedusaError` with appropriate type and message for error responses
Applied to files:
apps/medusa-be/src/workflows/seed/steps/create-inventory-levels.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/src/**/*.ts : Use `MedusaError.Types.INVALID_DATA` for 400 validation errors
Applied to files:
apps/medusa-be/src/workflows/seed/steps/create-inventory-levels.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/src/**/*.ts : Use `MedusaError.Types.DUPLICATE_ERROR` for 422 duplicate entry errors
Applied to files:
apps/medusa-be/src/workflows/seed/steps/create-inventory-levels.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/src/**/*.ts : Use `MedusaError.Types.CONFLICT` for 409 conflict errors
Applied to files:
apps/medusa-be/src/workflows/seed/steps/create-inventory-levels.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/integration-tests/http/**/*.spec.ts : Use `throwOnError: false` in workflow integration tests to capture step errors for assertion
Applied to files:
apps/medusa-be/src/workflows/seed/steps/create-inventory-levels.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/src/modules/*/__tests__/*.spec.ts : Wrap missing dependency resolution in try/catch in integration tests; Awilix throws even with nullish coalescing
Applied to files:
apps/medusa-be/src/workflows/seed/steps/create-inventory-levels.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/src/**/*.ts : Use `MedusaError.Types.UNAUTHORIZED` for 401 authentication errors
Applied to files:
apps/medusa-be/src/workflows/seed/steps/create-inventory-levels.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.ts
📚 Learning: 2026-05-07T19:51:42.430Z
Learnt from: redeyecz
Repo: TechsioCZ/new-engine PR: 390
File: apps/medusa-be/src/modules/packeta-client/client.ts:108-114
Timestamp: 2026-05-07T19:51:42.430Z
Learning: In `apps/medusa-be/src/modules/packeta-client/client.ts`, the `cancelPacket` method intentionally uses a broad `catch` that returns `false` for all failures (transport errors, timeouts, Packeta refusals alike). This is a known, accepted trade-off for the current implementation. A future improvement to consider is adding warning-level logging inside the catch before returning `false`, so transport/timeout failures are still surfaced in observability tooling. Do not flag this pattern as a blocking issue in future reviews of this file.
Applied to files:
apps/medusa-be/src/workflows/seed/steps/create-inventory-levels.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/src/**/*.ts : Use `MedusaError.Types.NOT_ALLOWED` for 400 permission errors
Applied to files:
apps/medusa-be/src/workflows/seed/steps/create-inventory-levels.tsapps/medusa-be/src/workflows/seed/workflows/seed-database.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/src/**/*.ts : Resolve Query using `container.resolve<Query>(ContainerRegistrationKeys.QUERY)`
Applied to files:
apps/medusa-be/src/workflows/seed/steps/create-inventory-levels.tsapps/medusa-be/src/workflows/seed/steps/sync-price-lists.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/**/*.{ts,tsx} : Use comments only to explain 'why', never 'what'; self-document code with clear naming
Applied to files:
apps/medusa-be/src/workflows/seed/workflows/seed-database.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/src/workflows/**/*.ts : Use `when().then()` for conditional logic in workflows instead of if statements
Applied to files:
apps/medusa-be/src/workflows/seed/workflows/seed-database.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/**/*.{ts,tsx} : Validate data before type casting; never use `as Type` without prior validation
Applied to files:
apps/medusa-be/src/workflows/seed/steps/sync-price-lists.tsapps/medusa-be/src/scripts/herbatica-seed.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/src/modules/**/provider.ts : Use provider containers for extending existing modules (payment, fulfillment) with dependencies declared in `medusa-config.ts`
Applied to files:
apps/medusa-be/src/workflows/seed/steps/sync-price-lists.ts
📚 Learning: 2026-05-11T23:01:30.923Z
Learnt from: CR
Repo: TechsioCZ/new-engine PR: 0
File: apps/medusa-be/CLAUDE.md:0-0
Timestamp: 2026-05-11T23:01:30.923Z
Learning: Applies to apps/medusa-be/**/*.{ts,tsx} : Annotate type as `unknown` when accessing dynamic object properties before applying type guards
Applied to files:
apps/medusa-be/src/scripts/herbatica-seed.ts
🔇 Additional comments (10)
apps/medusa-be/src/workflows/seed/steps/link-stock-location-fulfillment-provider.ts (1)
8-8: LGTM!Also applies to: 14-24, 38-40
apps/medusa-be/src/workflows/seed/steps/ensure-price-preferences.ts (1)
83-97: LGTM!apps/medusa-be/src/workflows/seed/helpers/build-inventory-items-input.ts (1)
1-35: LGTM!apps/medusa-be/src/workflows/seed/steps/create-inventory-levels.ts (1)
1-196: LGTM!apps/medusa-be/tests/unit/src/workflows/seed/build-inventory-items-input.unit.spec.ts (1)
1-89: LGTM!apps/medusa-be/src/workflows/seed/steps/sync-price-lists.ts (1)
1-707: LGTM!apps/medusa-be/src/scripts/herbatica-seed.ts (1)
1-3548: LGTM!apps/medusa-be/src/workflows/seed/workflows/seed-database.ts (1)
1-344: LGTM!apps/medusa-be/src/workflows/seed/workflows/seed-n1.ts (2)
225-238: LGTM!
267-271: LGTM!
|
🎉 This PR is included in version 0.5.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary by CodeRabbit
New Features
Improvements
Tests