npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@medusajs/framework

v2.22.4

Published

Framework

Readme

@medusajs/framework is the Medusa Framework: the single package Medusa applications, plugins, and custom modules import from to build API routes, workflows, modules, data models, subscribers, scheduled jobs, and configuration. It re-exports the core libraries (@medusajs/utils, @medusajs/types, @medusajs/workflows-sdk, @medusajs/modules-sdk, @medusajs/orchestration) and pinned third-party dependencies through subpath entry points, so apps should import from @medusajs/framework/* instead of those packages directly.

At a glance

| | | | --- | --- | | Package | @medusajs/framework | | Type | Core library | | Import from | @medusajs/framework/<subpath> |

Entry points

| Import path | Provides | | --- | --- | | @medusajs/framework/utils | Re-export of @medusajs/utils: defineConfig, loadEnv, Modules, ContainerRegistrationKeys, MedusaError, MedusaService, Module, ModuleProvider, model, defineLink, and more | | @medusajs/framework/types | Re-export of @medusajs/types: DTOs, module service interfaces, and the HttpTypes namespace | | @medusajs/framework/workflows-sdk | Re-export of @medusajs/workflows-sdk: createWorkflow, createStep, StepResponse, WorkflowResponse, transform, when, createHook | | @medusajs/framework/workflows-sdk/composer | Re-export of @medusajs/workflows-sdk/composer | | @medusajs/framework/modules-sdk | Re-export of @medusajs/modules-sdk | | @medusajs/framework/orchestration | Re-export of @medusajs/orchestration | | @medusajs/framework/http | MedusaRequest, AuthenticatedMedusaRequest, MedusaResponse, defineMiddlewares, authenticate, validateAndTransformBody, validateAndTransformQuery | | @medusajs/framework/subscribers | SubscriberArgs, SubscriberConfig | | @medusajs/framework/jobs | Scheduled job loader and types | | @medusajs/framework/logger | The Medusa logger | | @medusajs/framework/config | Config loader and ConfigModule types | | @medusajs/framework/telemetry | Tracer for OpenTelemetry instrumentation | | @medusajs/framework/feature-flags | Feature flag loader and router | | @medusajs/framework/database, /links, /search, /workflows, /migrations, /build-tools | Loaders and tooling used by the Medusa application and CLI | | @medusajs/framework/zod | Re-export of the zod version Medusa uses | | @medusajs/framework/awilix, /pg | Re-exports of awilix and pg | | @medusajs/framework/mikro-orm/{core,knex,postgresql,migrations,cli} | Re-exports of the pinned MikroORM packages | | @medusajs/framework/opentelemetry/{api,resources,sdk-node,sdk-trace-node,instrumentation-pg} | Re-exports of the pinned OpenTelemetry packages |

The package also ships a medusa-mikro-orm binary that wraps the MikroORM CLI.

Installation

Projects created with create-medusa-app already include it. To add it to a plugin or module package:

npm install @medusajs/framework

Usage

import type {
  MedusaRequest,
  MedusaResponse,
} from "@medusajs/framework/http"

export const GET = (
  req: MedusaRequest,
  res: MedusaResponse
) => {
  res.json({
    message: "[GET] Hello world!",
  })
}

Resources