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
7
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.2.3 to 1.2.4-beta.0

dist/static/health/health.service.base.ts

5

dist/index.d.ts

@@ -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;

6

package.json
{
"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

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