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

@hmcts/properties-volume

Package Overview
Dependencies
Maintainers
16
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hmcts/properties-volume - npm Package Compare versions

Comparing version 0.0.14 to 1.0.0

lib/LocalAzureVault.d.ts

6

lib/index.d.ts

@@ -0,1 +1,2 @@

/// <reference types="node" />
import * as fs from 'fs';

@@ -6,2 +7,7 @@ export interface Options {

}
export interface LocalOptions {
pathToHelmChart: fs.PathLike;
env?: string;
}
export { addTo } from './Properties';
export { addFromAzureVault } from './LocalAzureVault';

7

lib/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.addFromAzureVault = exports.addTo = void 0;
var Properties_1 = require("./Properties");
exports.addTo = Properties_1.addTo;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFPQSwyQ0FBb0M7QUFBM0IsNkJBQUEsS0FBSyxDQUFBIn0=
Object.defineProperty(exports, "addTo", { enumerable: true, get: function () { return Properties_1.addTo; } });
var LocalAzureVault_1 = require("./LocalAzureVault");
Object.defineProperty(exports, "addFromAzureVault", { enumerable: true, get: function () { return LocalAzureVault_1.addFromAzureVault; } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBWUEsMkNBQW9DO0FBQTNCLG1HQUFBLEtBQUssT0FBQTtBQUNkLHFEQUFxRDtBQUE1QyxvSEFBQSxpQkFBaUIsT0FBQSJ9
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.addTo = void 0;
const nodejs_logging_1 = require("@hmcts/nodejs-logging");

@@ -67,2 +68,2 @@ const path = require("path");

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUHJvcGVydGllcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9Qcm9wZXJ0aWVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsMERBQThDO0FBQzlDLDZCQUE0QjtBQUM1Qix5QkFBd0I7QUFFeEIsTUFBTSxFQUFFLEtBQUssRUFBRSxHQUFHLE9BQU8sQ0FBQyxRQUFRLENBQUMsQ0FBQTtBQUVuQyxNQUFNLEdBQUcsR0FBRyx1QkFBTSxDQUFDLFNBQVMsQ0FBQyxtQkFBbUIsQ0FBQyxDQUFBO0FBRWpELE1BQU0sY0FBYyxHQUFZO0lBQzlCLFVBQVUsRUFBRSxlQUFlO0lBQzNCLFdBQVcsRUFBRSxLQUFLO0NBQ25CLENBQUE7QUFFRCxlQUF1QixNQUFXLEVBQUUsWUFBc0I7SUFDeEQsTUFBTSxPQUFPLEdBQVksS0FBSyxDQUFDLEVBQUUsRUFBRSxjQUFjLEVBQUUsWUFBWSxJQUFJLEVBQUUsQ0FBQyxDQUFBO0lBQ3RFLE1BQU0sVUFBVSxHQUFnQixPQUFPLENBQUMsVUFBVyxDQUFBO0lBQ25ELE1BQU0sV0FBVyxHQUFZLE9BQU8sQ0FBQyxXQUFZLENBQUE7SUFFakQsR0FBRyxDQUFDLElBQUksQ0FBQywrQ0FBK0MsVUFBVSxHQUFHLENBQUMsQ0FBQTtJQUN0RSxJQUFJO1FBQ0YsTUFBTSxNQUFNLEdBQUcsU0FBUyxDQUFDLFVBQVUsQ0FBQyxRQUFRLEVBQUUsQ0FBQyxDQUFBO1FBQy9DLE1BQU0sVUFBVSxHQUFHLFVBQVUsQ0FBQyxVQUFVLENBQU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QyxXQUFXLENBQUMsVUFBVSxHQUFHLEdBQUcsR0FBRyxHQUFHLENBQUMsQ0FBQTtBQUMvQyxDQUFDO0FBRUQsU0FBUyxVQUFVLENBQUUsVUFBdUI7SUFDMUMsT0FBTyxFQUFFLENBQUMsV0FBVyxDQUFDLFVBQVUsRUFBRSxJQUFJLENBQUMsQ0FBQyxNQUFNLENBQUMsQ0FBQyxHQUFHLEVBQUUsR0FBRyxFQUFFLEVBQUUsQ0FBQyxNQUFNLENBQUMsR0FBRyxFQUFFLEdBQUcsRUFBRSxVQUFVLENBQUMsRUFBRSxFQUFFLENBQUMsQ0FBQTtBQUNoRyxDQUFDIn0=
{
"name": "@hmcts/properties-volume",
"version": "0.0.14",
"version": "1.0.0",
"description": "Azure key-vault flex volume to express properties integration",

@@ -20,36 +20,29 @@ "license": "MIT",

"watch": "yarn build --watch",
"watch:test": "jest --watch",
"test:coverage-unit": "TS_NODE_TRANSPILE_ONLY=true NODE_ENV=mocha LOG_LEVEL=OFF nyc mocha --opts mocha.opts $(find src/test \\( -name '*.ts' \\) ! -path '*a11y*' ! -path '*/routes/*')",
"test:codacy-upload": "cat ./coverage/lcov.info | codacy-coverage",
"test:codecov-upload": "codecov -f ./coverage/coverage-final.json"
"watch:test": "jest --watch"
},
"dependencies": {
"@azure/identity": "^3.2.2",
"@azure/keyvault-secrets": "^4.7.0",
"@hmcts/nodejs-logging": "^4.0.4",
"lodash": "^4.17.11",
"path": "^0.12.7"
"js-yaml": "^4.1.0",
"lodash": "^4.17.21"
},
"devDependencies": {
"@types/config": "^0.0.34",
"@types/jest": "^21.0.0",
"@types/node": "^10.12.26",
"@types/supertest": "^2.0.4",
"codacy-coverage": "^3.4.0",
"codecov": "^4.0.0-0",
"config": "^3.0.1",
"jest": "21.1.0",
"prettier": "^1.5.2",
"rimraf": "^2.0.0",
"sinon": "^4.1.2",
"supertest": "^3.0.0",
"ts-jest": "^21.2.4",
"ts-node": "^3.2.0",
"@types/config": "^3.3.0",
"@types/jest": "^29.5.2",
"@types/js-yaml": "^4.0.5",
"@types/node": "^20.3.1",
"config": "^3.3.9",
"jest": "29.5.0",
"prettier": "^2.8.8",
"rimraf": "^5.0.1",
"ts-jest": "^29.1.0",
"ts-node": "^10.9.1",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.1.0",
"tslint-config-prettier": "^1.18.0",
"tslint-config-standard": "^9.0.0",
"typescript": "^2.3.0",
"winston": "^2.4.1",
"yarn": "^1.13.0"
"typescript": "^5.1.3"
},
"engines": {
"node": ">=8.0.0"
"node": ">=16.0.0"
},

@@ -69,3 +62,4 @@ "jest": {

"access": "public"
}
},
"packageManager": "yarn@3.6.0"
}
# properties-volume-nodejs
[![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)
<br>[![Standard - JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
<br>[![Codacy Badge](https://api.codacy.com/project/badge/Grade/e9272daf4b714e4f95280916e763b6b2)](https://www.codacy.com/app/HMCTS/properties-volume-nodejs)
<br>[![Known Vulnerabilities](https://snyk.io/test/github/hmcts/properties-volume-nodejs/badge.svg)](https://snyk.io/test/github/hmcts/properties-volume-nodejs)
<br>[![codecov](https://codecov.io/gh/hmcts/properties-volume-nodejs/branch/master/graph/badge.svg)](https://codecov.io/gh/hmcts/properties-volume-nodejs)
<br>[![Build Status](https://travis-ci.com/hmcts/properties-volume-nodejs.svg?branch=master)](https://travis-ci.com/hmcts/properties-volume-nodejs.svg?branch=master)
This module is to incorporate the integration of the Azure key-vault flex volume to node properties.

@@ -99,1 +93,28 @@

| `failOnError` | Should this module throw an exception if mount does not exist or there is an error reading the properties | `false` |
### Local access to vaults
You can configure the application to connect directly to the Azure Vaults specified in your application's Helm chart. *This is intended to be used locally, and not in production*.
This method uses your local Azure AD authentication so you will need to run `az login` before running your application.
```typescript
import * as config from 'config'
import { addTo, addFromAzureVault } from '@hmcts/properties-volume'
async function setupConfig() {
if (process.env.NODE_ENV !== 'production') {
await addFromAzureVault(config, { pathToHelmChart: 'charts/my-app/values.yaml' });
} else {
addTo(config);
}
}
```
Note that this method is asynchronous and either needs to be awaited inside an async function or in a project with top level await enabled.
| Option | Description | Default |
| ------ | ----------- | ------- |
| `pathToHelmChart` | path to the values.yaml file for the Helm chart. | `N/A`|
| `env` | Used to calculate the vault name | `aat` |
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