@amplication/plugin-db-mongo
Advanced tools
Comparing version 1.2.3 to 1.2.4-beta.0
@@ -1,2 +0,2 @@ | ||
import { DsgContext, AmplicationPlugin, CreateServerDockerComposeDBParams, CreateServerDockerComposeParams, CreateServerDotEnvParams, CreatePrismaSchemaParams, Events, Entity, CreateServerPackageJsonParams, CreateServerParams } from "@amplication/code-gen-types"; | ||
import { DsgContext, AmplicationPlugin, CreateServerDockerComposeDBParams, CreateServerDockerComposeParams, CreateServerDotEnvParams, CreatePrismaSchemaParams, Events, Entity, CreateServerPackageJsonParams, CreateServerParams, LoadStaticFilesParams, Module } from "@amplication/code-gen-types"; | ||
declare class MongoPlugin implements AmplicationPlugin { | ||
@@ -9,3 +9,4 @@ register(): Events; | ||
beforeCreateServerDockerComposeDB(context: DsgContext, eventParams: CreateServerDockerComposeDBParams): CreateServerDockerComposeDBParams; | ||
afterCreateServerDockerComposeDB(context: DsgContext): Promise<import("@amplication/code-gen-types").Module[]>; | ||
afterCreateServerDockerComposeDB(context: DsgContext): Promise<Module[]>; | ||
afterCreateServerStaticFiles(context: DsgContext, eventParams: LoadStaticFilesParams, modules: Module[]): Promise<Module[]>; | ||
beforeCreatePrismaSchema(context: DsgContext, eventParams: CreatePrismaSchemaParams): { | ||
@@ -12,0 +13,0 @@ dataSource: import("prisma-schema-dsl-types").DataSource; |
{ | ||
"name": "@amplication/plugin-db-mongo", | ||
"version": "1.2.3", | ||
"version": "1.2.4-beta.0", | ||
"description": "Use a Mongo database in a service generated by Amplication", | ||
@@ -14,3 +14,3 @@ "main": "dist/index.js", | ||
"devDependencies": { | ||
"@amplication/code-gen-types": "^1.1.21", | ||
"@amplication/code-gen-types": "^1.1.25", | ||
"@babel/parser": "^7.18.11", | ||
@@ -35,2 +35,2 @@ "@babel/types": "^7.18.10", | ||
} | ||
} | ||
} |
@@ -23,2 +23,4 @@ import { resolve } from "path"; | ||
types, | ||
LoadStaticFilesParams, | ||
Module, | ||
} from "@amplication/code-gen-types"; | ||
@@ -53,2 +55,5 @@ import { ScalarType, ReferentialActions } from "prisma-schema-dsl-types"; | ||
}, | ||
LoadStaticFiles: { | ||
after: this.afterCreateServerStaticFiles, | ||
}, | ||
}; | ||
@@ -85,3 +90,2 @@ } | ||
) { | ||
const myValues = { | ||
@@ -91,3 +95,3 @@ scripts: { | ||
"prisma:push": " prisma db push", | ||
"db:init" :"run-s seed" | ||
"db:init": "run-s seed", | ||
}, | ||
@@ -97,3 +101,2 @@ }; | ||
eventParams.updateProperties.push(myValues); | ||
@@ -138,2 +141,18 @@ return eventParams; | ||
async afterCreateServerStaticFiles( | ||
context: DsgContext, | ||
eventParams: LoadStaticFilesParams, | ||
modules: Module[] | ||
) { | ||
const staticPath = resolve(__dirname, "./static/health"); | ||
const staticsFiles = await context.utils.importStaticModules( | ||
staticPath, | ||
eventParams.basePath | ||
); | ||
console.log(modules.find(x => x.path.includes("health"))?.path); | ||
return staticsFiles; | ||
} | ||
beforeCreatePrismaSchema( | ||
@@ -140,0 +159,0 @@ context: DsgContext, |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
172678
14
1898
2