docs: rename packages (#9618)

This commit is contained in:
Shahed Nasser
2024-10-18 14:43:46 +00:00
committed by GitHub
parent 30659b077a
commit 61e6a07b55
16 changed files with 47 additions and 47 deletions
@@ -45,7 +45,7 @@ module.exports = {
options: {
providers: [
{
resolve: "@medusajs/medusa/file-local-next",
resolve: "@medusajs/medusa/file-local",
id: "local",
options: {
// provider options...
@@ -47,7 +47,7 @@ export async function POST(
```ts
import { NextResponse } from "next/server"
import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory-next"
import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory"
export async function POST(request: Request) {
const inventoryModuleService = await initializeInventoryModule({})
@@ -97,7 +97,7 @@ export async function GET(
```ts
import { NextResponse } from "next/server"
import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory-next"
import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory"
export async function GET(request: Request) {
const inventoryModuleService = await initializeInventoryModule({})
@@ -144,7 +144,7 @@ export async function GET(
```ts
import { NextResponse } from "next/server"
import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory-next"
import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory"
type ContextType = {
params: {
@@ -201,7 +201,7 @@ export async function POST(
```ts
import { NextResponse } from "next/server"
import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory-next"
import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory"
export async function POST(request: Request) {
const inventoryModuleService = await initializeInventoryModule({})
@@ -255,7 +255,7 @@ export async function POST(
```ts
import { NextResponse } from "next/server"
import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory-next"
import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory"
export async function POST(request: Request) {
const inventoryModuleService = await initializeInventoryModule({})
@@ -309,7 +309,7 @@ export async function POST(
```ts
import { NextResponse } from "next/server"
import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory-next"
import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory"
export async function POST(request: Request) {
const inventoryModuleService = await initializeInventoryModule({})
@@ -363,7 +363,7 @@ export async function POST(
```ts
import { NextResponse } from "next/server"
import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory-next"
import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory"
export async function POST(request: Request) {
const inventoryModuleService = await initializeInventoryModule({})
@@ -432,7 +432,7 @@ export async function GET(
```ts
import { NextResponse } from "next/server"
import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory-next"
import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory"
type ContextType = {
params: {
@@ -501,7 +501,7 @@ export async function DELETE(
<CodeTab label="Next.js App Router" value="nextjs">
```ts
import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory-next"
import { initialize as initializeInventoryModule } from "@medusajs/medusa/inventory"
type ContextType = {
params: {
@@ -46,7 +46,7 @@ export async function POST(
```ts
import { NextResponse } from "next/server"
import { initialize as initializeStockLocationModule } from "@medusajs/medusa/stock-location-next"
import { initialize as initializeStockLocationModule } from "@medusajs/medusa/stock-location"
export async function POST(request: Request) {
const stockLocationModuleService = await initializeStockLocationModule({})
@@ -92,7 +92,7 @@ export async function GET(
```ts
import { NextResponse } from "next/server"
import { initialize as initializeStockLocationModule } from "@medusajs/medusa/stock-location-next"
import { initialize as initializeStockLocationModule } from "@medusajs/medusa/stock-location"
export async function GET(request: Request) {
const stockLocationModuleService = await initializeStockLocationModule({})
@@ -146,7 +146,7 @@ export async function POST(
```ts
import { NextResponse } from "next/server"
import { initialize as initializeStockLocationModule } from "@medusajs/medusa/stock-location-next"
import { initialize as initializeStockLocationModule } from "@medusajs/medusa/stock-location"
export async function POST(request: Request) {
const stockLocationModuleService = await initializeStockLocationModule({})
@@ -200,7 +200,7 @@ export async function DELETE(
```ts
import { NextResponse } from "next/server"
import { initialize as initializeStockLocationModule } from "@medusajs/medusa/stock-location-next"
import { initialize as initializeStockLocationModule } from "@medusajs/medusa/stock-location"
export async function DELETE(request: Request) {
const stockLocationModuleService = await initializeStockLocationModule({})
@@ -119,7 +119,7 @@ The code snippet must be written using NPM.
When a command uses the global option `-g`, add it at the end of the NPM command to ensure that its transformed to a Yarn command properly. For example:
```bash npm2yarn
npm install @medusajs/medusa-cli -g
npm install @medusajs/cli -g
```
---
+4 -4
View File
@@ -3230,7 +3230,7 @@ Learn more in [this documentation](!docs!/advanced-development/admin/tips#routin
## Integration Tests
Medusa provides a `medusa-test-utils` package with utility tools to create integration tests for your custom API routes, modules, or other Medusa customizations.
Medusa provides a `@medusajs/test-utils` package with utility tools to create integration tests for your custom API routes, modules, or other Medusa customizations.
<Note>
@@ -3243,7 +3243,7 @@ For details on setting up your project for integration tests, refer to [this doc
To create a test for a custom API route, create the file `integration-tests/http/custom-routes.spec.ts` with the following content:
```ts title="integration-tests/http/custom-routes.spec.ts"
import { medusaIntegrationTestRunner } from "medusa-test-utils"
import { medusaIntegrationTestRunner } from "@medusajs/test-utils"
medusaIntegrationTestRunner({
testSuite: ({ api, getContainer }) => {
@@ -3277,7 +3277,7 @@ Learn more in [this documentation](!docs!/debugging-and-testing/testing-tools/in
To create a test for a workflow, create the file `integration-tests/http/workflow.spec.ts` with the following content:
```ts title="integration-tests/http/workflow.spec.ts"
import { medusaIntegrationTestRunner } from "medusa-test-utils"
import { medusaIntegrationTestRunner } from "@medusajs/test-utils"
import { helloWorldWorkflow } from "../../src/workflows/hello-world"
medusaIntegrationTestRunner({
@@ -3309,7 +3309,7 @@ To create a test for a module's service, create the test under the `__tests__` d
For example, create the file `src/modules/hello/__tests__/service.spec.ts` with the following content:
```ts title="src/modules/hello/__tests__/service.spec.ts"
import { moduleIntegrationTestRunner } from "medusa-test-utils"
import { moduleIntegrationTestRunner } from "@medusajs/test-utils"
import { HELLO_MODULE } from ".."
import HelloModuleService from "../service"
import MyCustom from "../models/my-custom"
@@ -6,12 +6,12 @@ export const metadata = {
# {metadata.title}
This document provides a reference to the `medusaIntegrationTestRunner` function provided by the `medusa-test-utils` package.
This document provides a reference to the `medusaIntegrationTestRunner` function provided by the `@medusajs/test-utils` package.
## Example
```ts
import { medusaIntegrationTestRunner } from "medusa-test-utils"
import { medusaIntegrationTestRunner } from "@medusajs/test-utils"
medusaIntegrationTestRunner({
testSuite: ({ api, getContainer }) => {
@@ -6,12 +6,12 @@ export const metadata = {
# {metadata.title}
This document provides a reference to the `moduleIntegrationTestRunner` function provided by the `medusa-test-utils` package.
This document provides a reference to the `moduleIntegrationTestRunner` function provided by the `@medusajs/test-utils` package.
## Example
```ts
import { moduleIntegrationTestRunner } from "medusa-test-utils"
import { moduleIntegrationTestRunner } from "@medusajs/test-utils"
import { HELLO_MODULE } from ".."
import HelloModuleService from "../service"
import MyCustom from "../models/my-custom"
@@ -6,6 +6,6 @@ export const metadata = {
# {metadata.title}
This section of the documentation provides a reference to the testing functions provided by the `medusa-test-utils` package.
This section of the documentation provides a reference to the testing functions provided by the `@medusajs/test-utils` package.
<ChildDocs />