Skip to content

Commit

Permalink
docs: update providers to use ModuleProvider (#9579)
Browse files Browse the repository at this point in the history
Document change introduced by #9544

> Note: fine to merge now as it requires generating references, which will only happen after the next release.
  • Loading branch information
shahednasser authored Oct 16, 2024
1 parent 3610d58 commit ea5bff9
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const customOptions: Record<string, Partial<TypeDocOptions>> = {
],
}),
"medusa-config": getOptions({
entryPointPath: "packages/frameworksrc/config/types.ts",
entryPointPath: "packages/framework/src/config/types.ts",
tsConfigName: "framework.json",
name: "medusa-config",
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,14 @@ Create the file \`src/modules/my-auth/index.ts\` with the following content:
\`\`\`ts title="src/modules/my-auth/index.ts"
import MyAuthProviderService from "./service"
import {
ModuleProvider,
Modules
} from "@medusajs/framework/utils"
export default {
export default ModuleProvider(Modules.AUTH, {
services: [MyAuthProviderService],
}
})
\`\`\`
This exports the module's definition, indicating that the \`MyAuthProviderService\` is the module's service.`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,14 @@ Create the file \`src/modules/my-file/index.ts\` with the following content:
\`\`\`ts title="src/modules/my-file/index.ts"
import MyFileProviderService from "./service"
import {
ModuleProvider,
Modules
} from "@medusajs/framework/utils"
export default {
export default ModuleProvider(Modules.FILE, {
services: [MyFileProviderService],
}
})
\`\`\`
This exports the module's definition, indicating that the \`MyFileProviderService\` is the module's service.`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,14 @@ Create the file \`src/modules/my-fulfillment/index.ts\` with the following conte
\`\`\`ts title="src/modules/my-fulfillment/index.ts"
import MyFulfillmentProviderService from "./service"
import {
ModuleProvider,
Modules
} from "@medusajs/framework/utils"
export default {
export default ModuleProvider(Modules.FULFILLMENT, {
services: [MyFulfillmentProviderService],
}
})
\`\`\`
This exports the module's definition, indicating that the \`MyFulfillmentProviderService\` is the module's service.`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,14 @@ Create the file \`src/modules/my-notification/index.ts\` with the following cont
\`\`\`ts title="src/modules/my-notification/index.ts"
import MyNotificationProviderService from "./service"
import {
ModuleProvider,
Modules
} from "@medusajs/framework/utils"
export default {
export default ModuleProvider(Modules.NOTIFICATION, {
services: [MyNotificationProviderService],
}
})
\`\`\`
This exports the module's definition, indicating that the \`MyNotificationProviderService\` is the module's service.`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,14 @@ Create the file \`src/modules/my-payment/index.ts\` with the following content:
\`\`\`ts title="src/modules/my-payment/index.ts"
import MyPaymentProviderService from "./service"
import {
ModuleProvider,
Modules
} from "@medusajs/framework/utils"
export default {
export default ModuleProvider(Modules.PAYMENT, {
services: [MyPaymentProviderService],
}
})
\`\`\`
This exports the module's definition, indicating that the \`MyPaymentProviderService\` is the module's service.`,
Expand Down

0 comments on commit ea5bff9

Please sign in to comment.