docs: update imports and package names across docs (#9375)

* docs: update imports and package names across docs
+ reference configs

* generate files

* fix import

* change preview to rc
This commit is contained in:
Shahed Nasser
2024-10-01 12:03:42 +03:00
committed by GitHub
parent c726ed54f5
commit 2e16949979
196 changed files with 1379 additions and 1491 deletions

View File

@@ -93,7 +93,7 @@ This runs your Medusa application and runs the tests available under the `src/in
Suppose you have a `hello` module whose main service extends the service factory, and that has the following model:
```ts title="src/modules/hello/models/my-custom.ts"
import { model } from "@medusajs/utils"
import { model } from "@medusajs/framework/utils"
const MyCustom = model.define("my_custom", {
id: model.id().primaryKey(),

View File

@@ -27,7 +27,7 @@ import {
createStep,
StepResponse,
WorkflowResponse,
} from "@medusajs/workflows-sdk"
} from "@medusajs/framework/workflows-sdk"
const step1 = createStep("step-1", () => {
return new StepResponse("Hello, World!")

View File

@@ -22,7 +22,7 @@ In this chapter, find an example of writing an integration test for a module usi
Consider a `hello` module with a `HelloModuleService` that has a `getMessage` method:
```ts title="src/modules/hello/service.ts"
import { MedusaService } from "@medusajs/utils"
import { MedusaService } from "@medusajs/framework/utils"
import MyCustom from "./models/my-custom"
class HelloModuleService extends MedusaService({

View File

@@ -105,7 +105,7 @@ For example:
```ts
import { moduleIntegrationTestRunner } from "medusa-test-utils"
import HelloModuleService from "../service"
import { model } from "@medusajs/utils"
import { model } from "@medusajs/framework/utils"
const DummyModel = model.define("dummy_model", {
id: model.id().primaryKey(),

View File

@@ -15,7 +15,7 @@ Medusa provides a `medusa-test-utils` package with utility tools to create integ
To use the `medusa-test-utils` package, install it as a `devDependency`:
```bash npm2yarn
npm install --save-dev medusa-test-utils@preview
npm install --save-dev medusa-test-utils@rc
```
---
@@ -41,7 +41,7 @@ npm install --save-dev jest @types/jest @swc/jest
Then, create the file `jest.config.js` with the following content:
```js title="jest.config.js"
const { loadEnv } = require("@medusajs/utils")
const { loadEnv } = require("@medusajs/framework/utils")
loadEnv("test", process.cwd())
module.exports = {