docs: update resolve path to use src (#9605)
Update path used in `resolve` of modules to start with `src`
This commit is contained in:
@@ -25,7 +25,7 @@ module.exports = defineConfig({
|
||||
// ...
|
||||
modules: [
|
||||
{
|
||||
resolve: "./modules/hello",
|
||||
resolve: "./src/modules/hello",
|
||||
options: {
|
||||
capitalize: true,
|
||||
},
|
||||
|
||||
@@ -134,13 +134,13 @@ module.exports = defineConfig({
|
||||
},
|
||||
modules: [
|
||||
{
|
||||
resolve: "./modules/hello",
|
||||
resolve: "./src/modules/hello",
|
||||
}
|
||||
]
|
||||
})
|
||||
```
|
||||
|
||||
Its value is an array of objects, each having a `resolve` property, whose value is either a path to module's directory relative to `src` (it shouldn't include `src` in the path), or an `npm` package’s name.
|
||||
Its value is an array of objects, each having a `resolve` property, whose value is either a path to module's directory, or an `npm` package’s name.
|
||||
|
||||
### 5. Generate Migrations
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ module.exports = defineConfig({
|
||||
// ...
|
||||
modules: [
|
||||
{
|
||||
resolve: "./modules/brand",
|
||||
resolve: "./src/modules/brand",
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
@@ -187,7 +187,7 @@ module.exports = defineConfig({
|
||||
// ...
|
||||
modules: [
|
||||
{
|
||||
resolve: "./modules/brand",
|
||||
resolve: "./src/modules/brand",
|
||||
options: {
|
||||
apiKey: process.env.BRAND_API_KEY || "temp",
|
||||
},
|
||||
|
||||
@@ -47,7 +47,7 @@ import MyCustom from "../models/my-custom"
|
||||
moduleIntegrationTestRunner<HelloModuleService>({
|
||||
moduleName: HELLO_MODULE,
|
||||
moduleModels: [MyCustom],
|
||||
resolve: "./modules/hello",
|
||||
resolve: "./src/modules/hello",
|
||||
testSuite: ({ service }) => {
|
||||
describe("HelloModuleService", () => {
|
||||
it("says hello world", () => {
|
||||
|
||||
@@ -32,7 +32,7 @@ import MyCustom from "../models/my-custom"
|
||||
moduleIntegrationTestRunner<HelloModuleService>({
|
||||
moduleName: HELLO_MODULE,
|
||||
moduleModels: [MyCustom],
|
||||
resolve: "./modules/hello",
|
||||
resolve: "./src/modules/hello",
|
||||
testSuite: ({ service }) => {
|
||||
// TODO write tests
|
||||
},
|
||||
@@ -43,7 +43,7 @@ The `moduleIntegrationTestRunner` function accepts as a parameter an object with
|
||||
|
||||
- `moduleName`: The name of the module.
|
||||
- `moduleModels`: An array of models in the module. Refer to [this section](#write-tests-for-modules-without-data-models) if your module doesn't have data models.
|
||||
- `resolve`: The path to the model relative to the `src` directory.
|
||||
- `resolve`: The path to the model.
|
||||
- `testSuite`: A function that defines the tests to run.
|
||||
|
||||
The `testSuite` function accepts as a parameter an object having the `service` property, which is an instance of the module's main service.
|
||||
|
||||
@@ -44,7 +44,7 @@ export const generatedEditDates = {
|
||||
"app/advanced-development/data-models/write-migration/page.mdx": "2024-07-15T17:46:10+02:00",
|
||||
"app/advanced-development/data-models/manage-relationships/page.mdx": "2024-09-10T11:39:51.167Z",
|
||||
"app/advanced-development/modules/remote-query/page.mdx": "2024-07-21T21:20:24+02:00",
|
||||
"app/advanced-development/modules/options/page.mdx": "2024-09-30T08:43:53.126Z",
|
||||
"app/advanced-development/modules/options/page.mdx": "2024-10-16T08:49:27.162Z",
|
||||
"app/advanced-development/data-models/relationships/page.mdx": "2024-09-30T08:43:53.125Z",
|
||||
"app/advanced-development/workflows/compensation-function/page.mdx": "2024-09-30T08:43:53.128Z",
|
||||
"app/advanced-development/modules/service-factory/page.mdx": "2024-09-30T08:43:53.127Z",
|
||||
@@ -75,8 +75,8 @@ export const generatedEditDates = {
|
||||
"app/advanced-development/api-routes/validation/page.mdx": "2024-09-11T10:46:31.476Z",
|
||||
"app/advanced-development/api-routes/errors/page.mdx": "2024-09-30T08:43:53.121Z",
|
||||
"app/advanced-development/admin/constraints/page.mdx": "2024-09-10T11:39:51.165Z",
|
||||
"app/debugging-and-testing/testing-tools/modules-tests/module-example/page.mdx": "2024-09-30T08:43:53.139Z",
|
||||
"app/debugging-and-testing/testing-tools/modules-tests/page.mdx": "2024-09-30T08:43:53.139Z",
|
||||
"app/debugging-and-testing/testing-tools/modules-tests/module-example/page.mdx": "2024-10-16T08:50:03.061Z",
|
||||
"app/debugging-and-testing/testing-tools/modules-tests/page.mdx": "2024-10-16T08:50:23.232Z",
|
||||
"app/advanced-development/module-links/custom-columns/page.mdx": "2024-09-16T15:51:33.570Z",
|
||||
"app/advanced-development/module-links/directions/page.mdx": "2024-09-16T15:37:51.441Z",
|
||||
"app/advanced-development/module-links/page.mdx": "2024-09-16T15:36:48.190Z",
|
||||
@@ -90,7 +90,7 @@ export const generatedEditDates = {
|
||||
"app/advanced-development/workflows/page.mdx": "2024-09-18T08:00:57.364Z",
|
||||
"app/advanced-development/workflows/variable-manipulation/page.mdx": "2024-09-30T08:43:53.130Z",
|
||||
"app/customization/custom-features/api-route/page.mdx": "2024-09-12T12:42:34.201Z",
|
||||
"app/customization/custom-features/module/page.mdx": "2024-10-03T13:03:41.359Z",
|
||||
"app/customization/custom-features/module/page.mdx": "2024-10-16T08:49:44.676Z",
|
||||
"app/customization/custom-features/workflow/page.mdx": "2024-09-30T08:43:53.133Z",
|
||||
"app/customization/extend-models/create-links/page.mdx": "2024-09-30T08:43:53.133Z",
|
||||
"app/customization/extend-models/extend-create-product/page.mdx": "2024-09-30T08:43:53.134Z",
|
||||
@@ -104,7 +104,7 @@ export const generatedEditDates = {
|
||||
"app/customization/integrate-systems/handle-event/page.mdx": "2024-09-30T08:43:53.135Z",
|
||||
"app/customization/integrate-systems/page.mdx": "2024-09-12T12:33:29.827Z",
|
||||
"app/customization/integrate-systems/schedule-task/page.mdx": "2024-09-30T08:43:53.135Z",
|
||||
"app/customization/integrate-systems/service/page.mdx": "2024-09-30T08:43:53.135Z",
|
||||
"app/customization/integrate-systems/service/page.mdx": "2024-10-16T08:49:50.899Z",
|
||||
"app/customization/next-steps/page.mdx": "2024-09-12T10:50:04.873Z",
|
||||
"app/customization/page.mdx": "2024-09-12T11:16:18.504Z",
|
||||
"app/more-resources/cheatsheet/page.mdx": "2024-07-11T16:11:26.480Z",
|
||||
@@ -113,5 +113,5 @@ export const generatedEditDates = {
|
||||
"app/architecture/overview/page.mdx": "2024-09-23T12:55:01.339Z",
|
||||
"app/advanced-development/data-models/infer-type/page.mdx": "2024-09-30T08:43:53.123Z",
|
||||
"app/advanced-development/custom-cli-scripts/seed-data/page.mdx": "2024-10-03T11:11:07.181Z",
|
||||
"app/basics/modules/page.mdx": "2024-10-03T13:05:49.551Z"
|
||||
"app/basics/modules/page.mdx": "2024-10-16T08:49:39.997Z"
|
||||
}
|
||||
@@ -161,7 +161,7 @@ module.exports = defineConfig({
|
||||
// ...
|
||||
modules: [
|
||||
{
|
||||
resolve: "./modules/my-cache",
|
||||
resolve: "./src/modules/my-cache",
|
||||
options: {
|
||||
// any options
|
||||
ttl: 30,
|
||||
|
||||
@@ -116,7 +116,7 @@ module.exports = defineConfig({
|
||||
// ...
|
||||
modules: [
|
||||
{
|
||||
resolve: "./modules/my-event",
|
||||
resolve: "./src/modules/my-event",
|
||||
options: {
|
||||
// any options
|
||||
},
|
||||
|
||||
@@ -46,6 +46,6 @@ module.exports = defineConfig({
|
||||
|
||||
The objects in the array accept the following properties:
|
||||
|
||||
- `resolve`: A string indicating the package name of the module provider or the path to it relative to the `src` directory.
|
||||
- `resolve`: A string indicating the package name of the module provider or the path to it.
|
||||
- `id`: A string indicating the provider's unique name or ID.
|
||||
- `options`: An optional object of the module provider's options.
|
||||
|
||||
@@ -157,7 +157,7 @@ export const restockModelHighlights = [
|
||||
// ...
|
||||
modules: [
|
||||
{
|
||||
resolve: "./modules/restock-notification",
|
||||
resolve: "./src/modules/restock-notification",
|
||||
},
|
||||
]
|
||||
})
|
||||
|
||||
@@ -196,7 +196,7 @@ module.exports = defineConfig({
|
||||
// ...
|
||||
modules: [
|
||||
{
|
||||
resolve: "./modules/digital-product",
|
||||
resolve: "./src/modules/digital-product",
|
||||
},
|
||||
]
|
||||
})
|
||||
@@ -1520,7 +1520,7 @@ module.exports = defineConfig({
|
||||
id: "manual",
|
||||
},
|
||||
{
|
||||
resolve: "./modules/digital-product-fulfillment",
|
||||
resolve: "./src/modules/digital-product-fulfillment",
|
||||
id: "digital",
|
||||
},
|
||||
],
|
||||
|
||||
@@ -123,7 +123,7 @@ export const serviceHighlights = [
|
||||
// ...
|
||||
modules: [
|
||||
{
|
||||
resolve: "./modules/erp",
|
||||
resolve: "./src/modules/erp",
|
||||
options: {
|
||||
apiKey: process.env.ERP_API_KEY,
|
||||
},
|
||||
|
||||
@@ -162,7 +162,7 @@ module.exports = defineConfig({
|
||||
// ...
|
||||
modules: [
|
||||
{
|
||||
resolve: "./modules/restaurant",
|
||||
resolve: "./src/modules/restaurant",
|
||||
},
|
||||
]
|
||||
})
|
||||
@@ -306,7 +306,7 @@ module.exports = defineConfig({
|
||||
// ...
|
||||
modules: [
|
||||
{
|
||||
resolve: "./modules/delivery",
|
||||
resolve: "./src/modules/delivery",
|
||||
},
|
||||
]
|
||||
})
|
||||
|
||||
@@ -142,7 +142,7 @@ module.exports = defineConfig({
|
||||
// ...
|
||||
modules: [
|
||||
{
|
||||
resolve: "./modules/marketplace",
|
||||
resolve: "./src/modules/marketplace",
|
||||
},
|
||||
]
|
||||
})
|
||||
|
||||
@@ -160,7 +160,7 @@ module.exports = defineConfig({
|
||||
// ...
|
||||
modules: [
|
||||
{
|
||||
resolve: "./modules/subscription",
|
||||
resolve: "./src/modules/subscription",
|
||||
},
|
||||
]
|
||||
})
|
||||
|
||||
@@ -19,7 +19,7 @@ import MyCustom from "../models/my-custom"
|
||||
moduleIntegrationTestRunner<HelloModuleService>({
|
||||
moduleName: HELLO_MODULE,
|
||||
moduleModels: [MyCustom],
|
||||
resolve: "./modules/hello",
|
||||
resolve: "./src/modules/hello",
|
||||
testSuite: ({ service }) => {
|
||||
// TODO write tests
|
||||
},
|
||||
|
||||
@@ -108,7 +108,7 @@ export const generatedEditDates = {
|
||||
"app/commerce-modules/tax/_events/_events-table/page.mdx": "2024-07-03T19:27:13+03:00",
|
||||
"app/commerce-modules/tax/_events/page.mdx": "2024-07-03T19:27:13+03:00",
|
||||
"app/commerce-modules/tax/examples/page.mdx": "2024-09-30T08:43:53.169Z",
|
||||
"app/commerce-modules/tax/module-options/page.mdx": "2024-09-30T08:43:53.169Z",
|
||||
"app/commerce-modules/tax/module-options/page.mdx": "2024-10-16T08:51:53.676Z",
|
||||
"app/commerce-modules/tax/tax-calculation-with-provider/page.mdx": "2024-07-01T10:21:19+03:00",
|
||||
"app/commerce-modules/tax/tax-rates-and-rules/page.mdx": "2024-06-26T07:55:59+00:00",
|
||||
"app/commerce-modules/tax/tax-region/page.mdx": "2024-05-29T11:08:06+00:00",
|
||||
@@ -133,19 +133,19 @@ export const generatedEditDates = {
|
||||
"app/medusa-workflows-reference/page.mdx": "2024-09-30T08:43:53.174Z",
|
||||
"app/nextjs-starter/page.mdx": "2024-07-01T10:21:19+03:00",
|
||||
"app/recipes/b2b/page.mdx": "2024-10-03T13:07:44.153Z",
|
||||
"app/recipes/commerce-automation/page.mdx": "2024-10-03T13:07:44.147Z",
|
||||
"app/recipes/digital-products/examples/standard/page.mdx": "2024-10-15T12:51:59.486Z",
|
||||
"app/recipes/commerce-automation/page.mdx": "2024-10-16T08:52:01.585Z",
|
||||
"app/recipes/digital-products/examples/standard/page.mdx": "2024-10-16T08:52:12.991Z",
|
||||
"app/recipes/digital-products/page.mdx": "2024-10-03T13:07:44.147Z",
|
||||
"app/recipes/ecommerce/page.mdx": "2024-06-09T15:18:43+02:00",
|
||||
"app/recipes/integrate-ecommerce-stack/page.mdx": "2024-10-03T13:07:44.146Z",
|
||||
"app/recipes/marketplace/examples/vendors/page.mdx": "2024-10-03T13:07:44.153Z",
|
||||
"app/recipes/integrate-ecommerce-stack/page.mdx": "2024-10-16T08:52:16.760Z",
|
||||
"app/recipes/marketplace/examples/vendors/page.mdx": "2024-10-16T08:52:24.906Z",
|
||||
"app/recipes/marketplace/page.mdx": "2024-10-03T13:07:44.153Z",
|
||||
"app/recipes/multi-region-store/page.mdx": "2024-10-03T13:07:13.813Z",
|
||||
"app/recipes/omnichannel/page.mdx": "2024-10-03T13:07:14.384Z",
|
||||
"app/recipes/oms/page.mdx": "2024-07-01T10:21:19+03:00",
|
||||
"app/recipes/personalized-products/page.mdx": "2024-10-03T13:07:44.153Z",
|
||||
"app/recipes/pos/page.mdx": "2024-10-03T13:07:13.964Z",
|
||||
"app/recipes/subscriptions/examples/standard/page.mdx": "2024-10-04T11:13:47.459Z",
|
||||
"app/recipes/subscriptions/examples/standard/page.mdx": "2024-10-16T08:52:27.606Z",
|
||||
"app/recipes/subscriptions/page.mdx": "2024-10-03T13:07:44.155Z",
|
||||
"app/recipes/page.mdx": "2024-07-11T15:56:41+00:00",
|
||||
"app/service-factory-reference/methods/create/page.mdx": "2024-07-31T17:01:33+03:00",
|
||||
@@ -241,10 +241,10 @@ export const generatedEditDates = {
|
||||
"app/architectural-modules/notification/send-notification/page.mdx": "2024-09-30T08:43:53.151Z",
|
||||
"app/architectural-modules/file/page.mdx": "2024-07-01T10:21:19+03:00",
|
||||
"app/architectural-modules/event/page.mdx": "2024-05-28T13:25:03+03:00",
|
||||
"app/architectural-modules/cache/create/page.mdx": "2024-09-30T08:43:53.148Z",
|
||||
"app/architectural-modules/cache/create/page.mdx": "2024-10-16T08:51:35.074Z",
|
||||
"app/admin-widget-injection-zones/page.mdx": "2024-09-30T08:43:53.147Z",
|
||||
"app/architectural-modules/notification/page.mdx": "2024-10-15T12:51:28.735Z",
|
||||
"app/architectural-modules/event/create/page.mdx": "2024-09-30T08:43:53.149Z",
|
||||
"app/architectural-modules/event/create/page.mdx": "2024-10-16T08:51:41.334Z",
|
||||
"app/troubleshooting/deployment/page.mdx": "2024-08-19T07:19:40.924Z",
|
||||
"references/core_flows/Order/functions/core_flows.Order.orderEditUpdateItemQuantityValidationStep/page.mdx": "2024-08-20T00:10:58.913Z",
|
||||
"references/core_flows/Order/functions/core_flows.Order.orderEditUpdateItemQuantityWorkflow/page.mdx": "2024-08-20T00:10:58.949Z",
|
||||
@@ -634,7 +634,7 @@ export const generatedEditDates = {
|
||||
"app/medusa-cli/commands/start/page.mdx": "2024-08-28T10:44:19.952Z",
|
||||
"app/medusa-cli/commands/telemtry/page.mdx": "2024-08-28T11:25:08.553Z",
|
||||
"app/medusa-cli/commands/user/page.mdx": "2024-08-28T10:44:52.489Z",
|
||||
"app/recipes/marketplace/examples/restaurant-delivery/page.mdx": "2024-10-04T10:28:51.698Z",
|
||||
"app/recipes/marketplace/examples/restaurant-delivery/page.mdx": "2024-10-16T08:52:21.948Z",
|
||||
"references/types/HttpTypes/interfaces/types.HttpTypes.AdminCreateCustomerGroup/page.mdx": "2024-08-30T00:11:02.074Z",
|
||||
"references/types/HttpTypes/interfaces/types.HttpTypes.AdminCreateReservation/page.mdx": "2024-08-30T00:11:02.342Z",
|
||||
"references/types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerGroup/page.mdx": "2024-10-03T00:11:52.871Z",
|
||||
@@ -761,7 +761,7 @@ export const generatedEditDates = {
|
||||
"references/types/HttpTypes/interfaces/types.HttpTypes.AdminWorkflowExecutionResponse/page.mdx": "2024-08-30T00:11:02.514Z",
|
||||
"references/types/interfaces/types.BaseReturnItem/page.mdx": "2024-08-30T00:11:02.538Z",
|
||||
"app/test-tools-reference/medusaIntegrationTestRunner/page.mdx": "2024-09-02T12:12:48.492Z",
|
||||
"app/test-tools-reference/moduleIntegrationTestRunner/page.mdx": "2024-09-02T12:18:33.134Z",
|
||||
"app/test-tools-reference/moduleIntegrationTestRunner/page.mdx": "2024-10-16T08:52:30.701Z",
|
||||
"app/test-tools-reference/page.mdx": "2024-09-02T12:25:44.922Z",
|
||||
"references/types/HttpTypes/interfaces/types.HttpTypes.AdminGetInvitesParams/page.mdx": "2024-09-03T00:10:55.319Z",
|
||||
"references/types/HttpTypes/interfaces/types.HttpTypes.AdminInventoryLevel/page.mdx": "2024-09-17T00:10:58.487Z",
|
||||
|
||||
@@ -63,7 +63,7 @@ module.exports = defineConfig({
|
||||
options: {
|
||||
providers: [
|
||||
{
|
||||
resolve: "./modules/my-auth",
|
||||
resolve: "./src/modules/my-auth",
|
||||
id: "my-auth",
|
||||
options: {
|
||||
// provider options...
|
||||
|
||||
@@ -69,7 +69,7 @@ module.exports = defineConfig({
|
||||
options: {
|
||||
providers: [
|
||||
{
|
||||
resolve: "./modules/my-file",
|
||||
resolve: "./src/modules/my-file",
|
||||
id: "my-file",
|
||||
options: {
|
||||
// provider options...
|
||||
|
||||
@@ -63,7 +63,7 @@ module.exports = defineConfig({
|
||||
options: {
|
||||
providers: [
|
||||
{
|
||||
resolve: "./modules/my-fulfillment",
|
||||
resolve: "./src/modules/my-fulfillment",
|
||||
id: "my-fulfillment",
|
||||
options: {
|
||||
// provider options...
|
||||
|
||||
@@ -73,7 +73,7 @@ module.exports = defineConfig({
|
||||
options: {
|
||||
providers: [
|
||||
{
|
||||
resolve: "./modules/my-notification",
|
||||
resolve: "./src/modules/my-notification",
|
||||
id: "my-notification",
|
||||
options: {
|
||||
channels: ["email"],
|
||||
|
||||
@@ -72,7 +72,7 @@ module.exports = defineConfig({
|
||||
options: {
|
||||
providers: [
|
||||
{
|
||||
resolve: "./modules/my-payment",
|
||||
resolve: "./src/modules/my-payment",
|
||||
id: "my-payment",
|
||||
options: {
|
||||
// provider options...
|
||||
|
||||
Reference in New Issue
Block a user