@amplication/plugin-db-mongo
Advanced tools
Comparing version 1.2.9 to 1.2.10
@@ -10,3 +10,3 @@ import { Injectable } from "@nestjs/common"; | ||
await this.prisma.$runCommandRaw({ | ||
select: 1 | ||
select: 1, | ||
}); | ||
@@ -13,0 +13,0 @@ return true; |
{ | ||
"name": "@amplication/plugin-db-mongo", | ||
"version": "1.2.9", | ||
"version": "1.2.10", | ||
"description": "Use a Mongo database in a service generated by Amplication", | ||
@@ -10,3 +10,4 @@ "main": "dist/index.js", | ||
"prebuild": "rimraf dist", | ||
"test": "jest" | ||
"test": "jest", | ||
"format:write": "prettier --write \"**/*.{js,ts}\"" | ||
}, | ||
@@ -55,2 +56,2 @@ "author": "Mor Hagbi", | ||
} | ||
} | ||
} |
@@ -177,13 +177,31 @@ import { | ||
) { | ||
const staticPath = resolve(__dirname, "./static/health"); | ||
const staticsFiles = await context.utils.importStaticModules( | ||
staticPath, | ||
const staticPathToHealthBaseService = resolve(__dirname, "./static/health"); | ||
const staticsHealthBaseService = await context.utils.importStaticModules( | ||
staticPathToHealthBaseService, | ||
`${context.serverDirectories.srcDirectory}/health/base` | ||
); | ||
const updateModules = modules.filter( | ||
(x) => !x.path.includes("health.service.base") | ||
const staticPathToHealthServiceTest = resolve( | ||
__dirname, | ||
"./static/tests/health" | ||
); | ||
const staticsHealthServiceTest = await context.utils.importStaticModules( | ||
staticPathToHealthServiceTest, | ||
`${context.serverDirectories.srcDirectory}/tests/health` | ||
); | ||
return [...staticsFiles, ...updateModules]; | ||
const modulesWithoutOverridesFiles = modules.filter((x) => { | ||
const fileToRemove = ["health.service.base", "health.service.spec"]; | ||
fileToRemove.forEach((fileName) => { | ||
if (x.path.includes(fileName)) { | ||
return false; | ||
} | ||
}); | ||
return true; | ||
}); | ||
return [ | ||
...staticsHealthBaseService, | ||
...staticsHealthServiceTest, | ||
...modulesWithoutOverridesFiles, | ||
]; | ||
} | ||
@@ -190,0 +208,0 @@ |
@@ -10,3 +10,3 @@ import { Injectable } from "@nestjs/common"; | ||
await this.prisma.$runCommandRaw({ | ||
select: 1 | ||
select: 1, | ||
}); | ||
@@ -13,0 +13,0 @@ return true; |
@@ -5,9 +5,9 @@ import { DsgContext } from "@amplication/code-gen-types"; | ||
import { name } from "../../package.json"; | ||
import PostgresPlugin from "../index"; | ||
import MongoPlugin from "../index"; | ||
describe("Testing beforeCreateServerDotEnv hook", () => { | ||
let plugin: PostgresPlugin; | ||
let plugin: MongoPlugin; | ||
let context: DsgContext; | ||
beforeEach(() => { | ||
plugin = new PostgresPlugin(); | ||
plugin = new MongoPlugin(); | ||
context = mock<DsgContext>({ | ||
@@ -14,0 +14,0 @@ pluginInstallations: [{ npm: name }], |
@@ -40,4 +40,4 @@ const path = require("path"); | ||
externals: { | ||
"prisma-schema-dsl": "prisma-schema-dsl" | ||
} | ||
"prisma-schema-dsl": "prisma-schema-dsl", | ||
}, | ||
}; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
2018617
18
26085