Skip to content

Commit

Permalink
fix(medusa): Remove deps mongoose + mongodb (medusajs#1218)
Browse files Browse the repository at this point in the history
* fix(medusa): Remove deps mongoose, mongodb and transaction service + base model

* chore: delete permissions+add-ons legacy plugins

Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
  • Loading branch information
olivermrbl and srindom authored Jul 4, 2022
1 parent 8fe5fb5 commit c76e23e
Show file tree
Hide file tree
Showing 52 changed files with 27 additions and 9,052 deletions.
23 changes: 11 additions & 12 deletions docs/content/advanced/backend/plugins/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ A basic Medusa server installed with the `medusa new` command has dependencies s
"medusa-interfaces": "^1.3.0",
"medusa-payment-manual": "^1.0.16",
"medusa-payment-stripe": "^1.1.38",
"mongoose": "^5.13.3",
"typeorm": "^0.2.36"
},
"devDependencies": {
Expand Down Expand Up @@ -169,10 +168,10 @@ const plugins = [
{
resolve: `medusa-plugin-custom`,
options: {
name: 'My Store'
}
}
];
name: "My Store",
},
},
]
```

Then, you can have access to your plugin configuration in the constructor of services in your plugin:
Expand All @@ -195,11 +194,11 @@ export default (rootDirectory, options) => {

router.get("/hello-world", (req, res) => {
res.json({
message: `Welcome to ${options.name ? options.name : 'Medusa'}!`
message: `Welcome to ${options.name ? options.name : "Medusa"}!`,
})
})

return router;
return router
}
```

Expand Down Expand Up @@ -249,10 +248,10 @@ const plugins = [
resolve: `medusa-plugin-custom`,
//if your plugin has configurations
options: {
name: 'My Store'
}
}
];
name: "My Store",
},
},
]
```

:::note
Expand All @@ -269,7 +268,7 @@ npm run start

## NPM Ignore File

Not all files that you use while developing your plugin are necessary to be published.
Not all files that you use while developing your plugin are necessary to be published.

For example, the files you add in the `src` directory are compiled to a `dist` directory before publishing. Then, when a developer installs your plugin, they’ll just be using the files under the `dist` directory.

Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"lerna": "^3.22.1",
"lint-staged": "^11.2.3",
"microbundle": "^0.13.3",
"mongoose": "^5.10.15",
"pg-god": "^1.0.11",
"prettier": "^2.1.1",
"resolve-cwd": "^3.0.0",
Expand Down
153 changes: 0 additions & 153 deletions packages/medusa-interfaces/src/base-model.js

This file was deleted.

5 changes: 2 additions & 3 deletions packages/medusa-interfaces/src/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
export { default as BaseService } from "./base-service"
export { default as BaseModel } from "./base-model"
export { default as PaymentService } from "./payment-service"
export { default as FulfillmentService } from "./fulfillment-service"
export { default as FileService } from "./file-service"
export { default as FulfillmentService } from "./fulfillment-service"
export { default as NotificationService } from "./notification-service"
export { default as OauthService } from "./oauth-service"
export { default as PaymentService } from "./payment-service"
export { default as SearchService } from "./search-service"
13 changes: 0 additions & 13 deletions packages/medusa-plugin-add-ons/.babelrc

This file was deleted.

15 changes: 0 additions & 15 deletions packages/medusa-plugin-add-ons/.gitignore

This file was deleted.

8 changes: 0 additions & 8 deletions packages/medusa-plugin-add-ons/.npmignore

This file was deleted.

Loading

0 comments on commit c76e23e

Please sign in to comment.