From 8d3c037841300a44e9979f31ac4c3689b8aa97dd Mon Sep 17 00:00:00 2001 From: Levi van Noort <73097785+levivannoort@users.noreply.github.com> Date: Tue, 24 Oct 2023 17:18:32 +0200 Subject: [PATCH] chore: align with the changes on the plugins side --- README.md | 4 ++-- package.json | 2 +- src/index.ts | 4 ++-- src/utils.ts | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 4368cd9..e962a1d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# plugin-{your-plugin-name} +# plugin- -[![NPM Downloads](https://img.shields.io/npm/dt/plugin-{your-plugin-name})](https://www.npmjs.com/package/plugin-{your-plugin-name}) +[![NPM Downloads](https://img.shields.io/npm/dt/@amplication/plugin-)](https://www.npmjs.com/package/@amplication/plugin-) A short description of the plugin and its actions. diff --git a/package.json b/package.json index f882aba..1a8c61c 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "plugin-{your-plugin-name}", + "name": "plugin-name", "version": "0.0.1", "description": "Description of your plugin", "main": "dist/index.js", diff --git a/src/index.ts b/src/index.ts index 475954c..400e4c6 100644 --- a/src/index.ts +++ b/src/index.ts @@ -42,11 +42,11 @@ class ExamplePlugin implements AmplicationPlugin { // Here you can get the context, eventParams and the modules that Amplication created. // Then you can manipulate the modules, add new ones, or create your own. const staticPath = resolve(__dirname, "./static"); - const staticsFiles = await context.utils.importStaticModules( + const staticFiles = await context.utils.importStaticModules( staticPath, context.serverDirectories.srcDirectory ); - await modules.merge(staticsFiles); + await modules.merge(staticFiles); return modules; // You must return the generated modules you want to generate at this part of the build. } diff --git a/src/utils.ts b/src/utils.ts index 5f53ba3..a94bfe6 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -13,7 +13,7 @@ export const getPluginSettings = ( const userSettings = plugin?.settings ?? {}; const settings: Settings = { - ...defaultSettings, + ...defaultSettings.settings, ...userSettings, };