{"library":"medusajs-launch-utils","title":"Medusa.js Monorepo Launch Utilities","description":"medusajs-launch-utils is a JavaScript package engineered to streamline the setup, build, and launch processes for Medusa.js 2.0 monorepository projects. It automates critical tasks such as backend initialization, encompassing database migrations, one-time seeding, and admin user creation. The utility also features robust health checks (`await-backend`) to ensure the Medusa backend is fully operational before proceeding with storefront builds or deployments. Additionally, it facilitates storefront launching (`launch-storefront`) with automatic Medusa publishable API key fetching and integrated Meilisearch configuration management. Currently at version 0.0.19, the package appears to be in active development, offering specific solutions for orchestrating complex Medusa environments by effectively managing environment variables, particularly for sensitive Meilisearch keys, and incorporating resilient retry mechanisms for API operations. Its key differentiator lies in its focused automation of multi-service Medusa setups, significantly reducing manual configuration effort and mitigating potential errors in development and CI/CD workflows.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install medusajs-launch-utils"],"cli":null},"imports":["import { initBackend } from 'medusajs-launch-utils';","import { awaitBackend } from 'medusajs-launch-utils';","import { launchStorefront } from 'medusajs-launch-utils';","import { retry } from 'medusajs-launch-utils';"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"{\n  \"name\": \"my-medusa-monorepo\",\n  \"version\": \"1.0.0\",\n  \"description\": \"Example package.json scripts for a Medusa.js 2.0 monorepo\",\n  \"scripts\": {\n    \"// -- Backend Package Scripts (e.g., in packages/backend/package.json) --\": \"\",\n    \"backend:build\": \"init-backend && medusa build\",\n    \"backend:dev\": \"init-backend && medusa develop\",\n    \"backend:start\": \"init-backend && medusa start\",\n\n    \"// -- Storefront Package Scripts (e.g., in packages/storefront/package.json) --\": \"\",\n    \"storefront:wait\": \"await-backend\",\n    \"storefront:launcher\": \"launch-storefront\",\n    \"storefront:dev\": \"npm run storefront:wait && npm run storefront:launcher dev\",\n    \"storefront:build\": \"npm run storefront:wait && npm run storefront:launcher build\",\n    \"storefront:start\": \"npm run storefront:launcher start\"\n  },\n  \"dependencies\": {\n    \"medusajs-launch-utils\": \"^0.0.19\"\n  }\n}","lang":"javascript","description":"Demonstrates typical integration of `medusajs-launch-utils` into a Medusa.js monorepo's `package.json` scripts. It illustrates how `init-backend` orchestrates backend setup (migrations, seeding), `await-backend` ensures backend readiness, and `launch-storefront` handles storefront deployment for `dev`, `build`, and `start` commands.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}