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

@amplication/plugin-secrets-manager-aws-secret-manager

Package Overview
Dependencies
Maintainers
8
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@amplication/plugin-secrets-manager-aws-secret-manager - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2-beta.pr-298.93393

project.json

24

.amplicationrc.json
{
"settings": {
"awsRegion": "us-east-1",
"fetchMode": "STARTUP",
"secretNames": [
"/path/to:SecretA",
"/path/to:SecretB",
"/path/to/secrets/common"
]
},
"systemSettings": {
"requireAuthenticationEntity": "false"
}
"settings": {
"awsRegion": "us-east-1",
"fetchMode": "STARTUP",
"secretNames": [
"/path/to:SecretA",
"/path/to:SecretB",
"/path/to/secrets/common"
]
},
"systemSettings": {
"requireAuthenticationEntity": "false"
}
}

@@ -100,3 +100,3 @@ /******/ (() => { // webpackBootstrap

module.exports = JSON.parse('{"name":"@amplication/plugin-secrets-manager-aws-secret-manager","version":"1.0.1","description":"Amplication plugin for AWS Secrets Manager","main":"dist/index.js","scripts":{"prepublishOnly":"npm run build","dev":"webpack --watch","build":"webpack","prebuild":"rimraf dist","format:write":"prettier --write \\"**/*.{js,ts}\\""},"author":"duwudle <duwudle@gmail.com>","license":"Apache-2.0","dependencies":{"@amplication/code-gen-types":"^2.0.19","@amplication/code-gen-utils":"^0.0.7","lodash":"^4.17.21"},"devDependencies":{"@babel/parser":"^7.23.3","@babel/types":"^7.23.3","@types/jest":"^29.5.8","@types/lodash":"^4.14.201","@typescript-eslint/eslint-plugin":"^6.11.0","@typescript-eslint/parser":"^6.11.0","copy-webpack-plugin":"^11.0.0","eslint":"^8.53.0","jest-mock-extended":"^3.0.5","prettier":"^3.1.0","rimraf":"^5.0.5","ts-jest":"^29.1.1","ts-loader":"^9.5.1","typescript":"^5.2.2","webpack":"^5.89.0","webpack-cli":"^5.1.4"},"jest":{"moduleFileExtensions":["js","json","ts"],"rootDir":"src/tests","testRegex":".*\\\\.spec\\\\.ts$","transform":{"^.+\\\\.(t|j)s$":"ts-jest"},"collectCoverageFrom":["**/*.(t|j)s"],"testEnvironment":"node"}}');
module.exports = JSON.parse('{"name":"@amplication/plugin-secrets-manager-aws-secret-manager","version":"1.0.2-beta.pr-298.93393","description":"Amplication plugin for AWS Secrets Manager","main":"dist/index.js","scripts":{"prepublishOnly":"npm run build","dev":"webpack --watch","build":"webpack","prebuild":"rimraf dist","format:write":"prettier --write \\"**/*.{js,ts}\\""},"author":"duwudle <duwudle@gmail.com>","license":"Apache-2.0","dependencies":{"@amplication/code-gen-types":"^2.0.19","@amplication/code-gen-utils":"^0.0.7","lodash":"^4.17.21"},"devDependencies":{"@babel/parser":"^7.23.3","@babel/types":"^7.23.3","@types/jest":"^29.5.8","@types/lodash":"^4.14.201","@typescript-eslint/eslint-plugin":"^6.11.0","@typescript-eslint/parser":"^6.11.0","copy-webpack-plugin":"^11.0.0","eslint":"^8.53.0","jest-mock-extended":"^3.0.5","prettier":"^3.1.0","rimraf":"^5.0.5","ts-jest":"^29.1.1","ts-loader":"^9.5.1","typescript":"^5.2.2","webpack":"^5.89.0","webpack-cli":"^5.1.4"},"jest":{"moduleFileExtensions":["js","json","ts"],"rootDir":"src/tests","testRegex":".*\\\\.spec\\\\.ts$","transform":{"^.+\\\\.(t|j)s$":"ts-jest"},"collectCoverageFrom":["**/*.(t|j)s"],"testEnvironment":"node"}}');

@@ -143,3 +143,3 @@ /***/ })

const secret_name_parser_1 = __webpack_require__(847);
class ExamplePlugin {
class AwsSecretsManagerPlugin {
register() {

@@ -170,3 +170,3 @@ return {

async beforeCreateServer(context, _, modules) {
const { fetchMode, secretNames } = (0, utils_1.getPluginSettings)(context.pluginInstallations);
const { fetchMode } = (0, utils_1.getPluginSettings)(context.pluginInstallations);
const staticPath = (0, path_1.resolve)(__dirname, "static", fetchMode.toLowerCase());

@@ -184,3 +184,3 @@ // Import static files

}
exports["default"] = ExamplePlugin;
exports["default"] = AwsSecretsManagerPlugin;

@@ -187,0 +187,0 @@ })();

import { Injectable, Logger } from "@nestjs/common";
import { ConfigService } from "@nestjs/config";
import { SecretsManagerServiceBase } from "./base/secretsManager.service.base";
import { EnumSecretsNameKey } from "./secretsNameKey.enum";
import {

@@ -22,4 +23,4 @@ GetSecretValueCommand,

async getSecret<T>(key: string): Promise<T | null> {
const [secret_id, secret_name] = key.split(":");
async getSecret<T>(key: EnumSecretsNameKey): Promise<T | null> {
const [secret_id, secret_name] = key.toString().split(":");

@@ -26,0 +27,0 @@ try {

import { Injectable, Inject } from "@nestjs/common";
import { ConfigService } from "@nestjs/config";
import { SecretsManagerServiceBase } from "./base/secretsManager.service.base";
import { Secrets } from "./secrets";
import { EnumSecretsNameKey } from "./secretsNameKey.enum";

@@ -10,3 +10,3 @@ @Injectable()

@Inject("AWS_SECRETS_MANAGER")
protected readonly secrets: Partial<Record<Secrets, unknown>>,
protected readonly secrets: Partial<Record<EnumSecretsNameKey, unknown>>,
protected readonly configService: ConfigService,

@@ -17,5 +17,5 @@ ) {

async getSecret<T>(key: Secrets): Promise<T | null> {
async getSecret<T>(key: EnumSecretsNameKey): Promise<T | null> {
return this.secrets[key] as any;
}
}

@@ -7,3 +7,3 @@ import { ConfigService } from "@nestjs/config";

import { Logger } from "@nestjs/common";
import { Secrets } from "./secrets";
import { EnumSecretsNameKey } from "./secretsNameKey.enum";

@@ -19,6 +19,6 @@ export const secretsManagerFactory = {

var secrets: Partial<Record<Secrets, unknown>> = {};
var secrets: Partial<Record<EnumSecretsNameKey, unknown>> = {};
for (const path of Object.values(Secrets)) {
const [secret_id, secret_name] = path.split(":");
for (const path of Object.values(EnumSecretsNameKey)) {
const [secret_id, secret_name] = path.toString().split(":");

@@ -40,3 +40,5 @@ try {

...secrets,
[path]: secret_name ? secrets_list[secret_name] : secrets_list,
[path.toString()]: secret_name
? secrets_list[secret_name]
: secrets_list,
};

@@ -43,0 +45,0 @@ } catch (err: unknown) {

{
"name": "@amplication/plugin-secrets-manager-aws-secret-manager",
"version": "1.0.1",
"version": "1.0.2-beta.pr-298.93393",
"description": "Amplication plugin for AWS Secrets Manager",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -17,3 +17,3 @@ import {

class ExamplePlugin implements AmplicationPlugin {
class AwsSecretsManagerPlugin implements AmplicationPlugin {
register(): Events {

@@ -59,5 +59,3 @@ return {

): Promise<ModuleMap> {
const { fetchMode, secretNames } = getPluginSettings(
context.pluginInstallations,
);
const { fetchMode } = getPluginSettings(context.pluginInstallations);
const staticPath = resolve(__dirname, "static", fetchMode.toLowerCase());

@@ -88,2 +86,2 @@

export default ExamplePlugin;
export default AwsSecretsManagerPlugin;
import { Injectable, Logger } from "@nestjs/common";
import { ConfigService } from "@nestjs/config";
import { SecretsManagerServiceBase } from "./base/secretsManager.service.base";
import { EnumSecretsNameKey } from "./secretsNameKey.enum";
import {

@@ -22,4 +23,4 @@ GetSecretValueCommand,

async getSecret<T>(key: string): Promise<T | null> {
const [secret_id, secret_name] = key.split(":");
async getSecret<T>(key: EnumSecretsNameKey): Promise<T | null> {
const [secret_id, secret_name] = key.toString().split(":");

@@ -26,0 +27,0 @@ try {

import { Injectable, Inject } from "@nestjs/common";
import { ConfigService } from "@nestjs/config";
import { SecretsManagerServiceBase } from "./base/secretsManager.service.base";
import { Secrets } from "./secrets";
import { EnumSecretsNameKey } from "./secretsNameKey.enum";

@@ -10,3 +10,3 @@ @Injectable()

@Inject("AWS_SECRETS_MANAGER")
protected readonly secrets: Partial<Record<Secrets, unknown>>,
protected readonly secrets: Partial<Record<EnumSecretsNameKey, unknown>>,
protected readonly configService: ConfigService,

@@ -17,5 +17,5 @@ ) {

async getSecret<T>(key: Secrets): Promise<T | null> {
async getSecret<T>(key: EnumSecretsNameKey): Promise<T | null> {
return this.secrets[key] as any;
}
}

@@ -7,3 +7,3 @@ import { ConfigService } from "@nestjs/config";

import { Logger } from "@nestjs/common";
import { Secrets } from "./secrets";
import { EnumSecretsNameKey } from "./secretsNameKey.enum";

@@ -19,6 +19,6 @@ export const secretsManagerFactory = {

var secrets: Partial<Record<Secrets, unknown>> = {};
var secrets: Partial<Record<EnumSecretsNameKey, unknown>> = {};
for (const path of Object.values(Secrets)) {
const [secret_id, secret_name] = path.split(":");
for (const path of Object.values(EnumSecretsNameKey)) {
const [secret_id, secret_name] = path.toString().split(":");

@@ -40,3 +40,5 @@ try {

...secrets,
[path]: secret_name ? secrets_list[secret_name] : secrets_list,
[path.toString()]: secret_name
? secrets_list[secret_name]
: secrets_list,
};

@@ -43,0 +45,0 @@ } catch (err: unknown) {

{
"extends": "../../tsconfig.base.json",
"files": [],
"include": [],
"compilerOptions": {}
"extends": "../../tsconfig.base.json",
"files": [],
"include": [],
"compilerOptions": {}
}

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