Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@amplication/plugin-db-mongo

Package Overview
Dependencies
Maintainers
8
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@amplication/plugin-db-mongo - npm Package Compare versions

Comparing version 1.4.7 to 1.4.8-beta.pr-289.0d3954c

.eslintrc.json

6

package.json
{
"name": "@amplication/plugin-db-mongo",
"version": "1.4.7",
"version": "1.4.8-beta.pr-289.0d3954c",
"description": "Use a Mongo database in a service generated by Amplication",
"main": "dist/index.js",
"nx": {},
"scripts": {

@@ -16,3 +17,4 @@ "dev": "webpack --watch",

"devDependencies": {
"@amplication/code-gen-types": "^2.0.4",
"@amplication/code-gen-types": "^2.0.17",
"@amplication/code-gen-utils": "^0.0.7",
"@babel/parser": "^7.18.11",

@@ -19,0 +21,0 @@ "@babel/types": "^7.18.10",

# @amplication/plugin-db-mongo
[![NPM Downloads](https://img.shields.io/npm/dt/@amplication/plugin-db-mongo)](https://www.npmjs.com/package/@amplication/plugin-db-mongo)
[![NPM Downloads](https://img.shields.io/npm/dt/@amplication/plugin-db-mongo)](https://www.npmjs.com/package/@amplication/plugin-db-mongo)

@@ -11,14 +11,16 @@ Use a Mongo DB database in the service generated by Amplication.

It updates the following parts:
- Updates the datasource on the `schema.prisma` file:
- For versions older than `1.3.3` the datesource name is based on the database type
- MongoDB - the datasource name is `mongo`
- From version `1.3.3` the datasource name is `db`, no matter what is the database type
- For versions older than `1.3.3` the datesource name is based on the database type
- MongoDB - the datasource name is `mongo`
- From version `1.3.3` the datasource name is `db`, no matter what is the database type
- From version `1.3.3` as the datasouce name is `db`, all the custom attributes that use the `@{datasource.name}.{nameOfTheAttribute}` are replaced with `@db.{nameOfTheAttribute}`
- Adds the requires services and variables to `docker-compose.yml`
- Add the `db` service to the `docker-compose.dev.yml`
- Add the `db` service to the `docker-compose.dev.yml`
- Add the requires environment variables to `.env`
- Update package json file in order to support only the relevant prisma mongo commands
- Update package json file in order to support only the relevant prisma mongo commands
- Change prisma schema fields according to the prisma mongo conventions
## Configuration
The plugin uses the parameters configured on the database tab on the service settings page

@@ -28,6 +30,6 @@

## Usage
This plugin integrates with the all default tasks and scripts used by the generated service:
```json

@@ -44,2 +46,2 @@ "seed": "ts-node scripts/seed.ts",

"compose:down": "docker-compose down --volumes"
```
```

@@ -44,3 +44,3 @@ import { CreateServerDockerComposeParams } from "@amplication/code-gen-types";

healthcheck: {
test: 'test $$(mongosh --quiet -u $${MONGO_INITDB_ROOT_USERNAME} -p $${MONGO_INITDB_ROOT_PASSWORD} --eval "try { rs.initiate({ _id: \'"rs0"\',members: [{ _id: 0, host: \'"localhost"\' }] }).ok } catch (_) { rs.status().ok}") -eq 1',
test: "test $$(mongosh --quiet -u $${MONGO_INITDB_ROOT_USERNAME} -p $${MONGO_INITDB_ROOT_PASSWORD} --eval \"try { rs.initiate({ _id: 'rs0',members: [{ _id: 0, host: 'db' }] }).ok } catch (_) { rs.status().ok}\") -eq 1",
start_period: "5s",

@@ -47,0 +47,0 @@ interval: "10s",

{
"extends": "../../tsconfig.base.json",
"include": [
"src/index.ts"
],
"exclude": [
"node_modules"
],
}
"include": ["src/index.ts"],
"exclude": ["node_modules"]
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc