New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@goldstack/utils-config

Package Overview
Dependencies
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@goldstack/utils-config - npm Package Compare versions

Comparing version 0.1.37 to 0.1.38

26

dist/utilsConfig.js

@@ -7,12 +7,12 @@ "use strict";

exports.getAwsConfigPath = exports.getPackageConfigPaths = exports.parseConfig = exports.validateConfig = void 0;
var ajv_1 = __importDefault(require("ajv"));
var utils_sh_1 = require("@goldstack/utils-sh");
exports.validateConfig = function (config, schema, options) {
var ajv = new ajv_1.default();
const ajv_1 = __importDefault(require("ajv"));
const utils_sh_1 = require("@goldstack/utils-sh");
exports.validateConfig = (config, schema, options) => {
const ajv = new ajv_1.default();
if (options === null || options === void 0 ? void 0 : options.additionalSchemas) {
options.additionalSchemas.forEach(function (schema) { return ajv.addSchema(schema); });
options.additionalSchemas.forEach((schema) => ajv.addSchema(schema));
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
var buildError = function (e) {
return new Error(((options === null || options === void 0 ? void 0 : options.errorMessage) || 'Cannot read configuration') + "\n" +
const buildError = (e) => {
return new Error(`${(options === null || options === void 0 ? void 0 : options.errorMessage) || 'Cannot read configuration'}\n` +
ajv.errorsText() ||

@@ -22,3 +22,3 @@ '' + e ||

};
var valid;
let valid;
try {

@@ -35,13 +35,13 @@ valid = ajv.validate(schema, config);

};
exports.parseConfig = function (data, schema, options) {
var config = JSON.parse(data);
exports.parseConfig = (data, schema, options) => {
const config = JSON.parse(data);
return exports.validateConfig(config, schema, options);
};
exports.getPackageConfigPaths = function (workspacePath) {
var res = utils_sh_1.sh.ls('-A', workspacePath + 'packages/*/goldstack.json');
exports.getPackageConfigPaths = (workspacePath) => {
const res = utils_sh_1.sh.ls('-A', workspacePath + 'packages/*/goldstack.json');
return Array.from(res.values());
};
exports.getAwsConfigPath = function (workspacePath) {
exports.getAwsConfigPath = (workspacePath) => {
return workspacePath + 'config/infra/aws/config.json';
};
//# sourceMappingURL=utilsConfig.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var utilsConfig_1 = require("./utilsConfig");
describe('Config utils', function () {
it('Should determine package paths', function () {
var paths = utilsConfig_1.getPackageConfigPaths('./../../');
const utilsConfig_1 = require("./utilsConfig");
describe('Config utils', () => {
it('Should determine package paths', () => {
const paths = utilsConfig_1.getPackageConfigPaths('./../../');
expect(paths.length).toBeGreaterThan(0);

@@ -8,0 +8,0 @@ });

{
"name": "@goldstack/utils-config",
"version": "0.1.37",
"version": "0.1.38",
"description": "Utilities to work with JSON configuration files.",

@@ -25,3 +25,3 @@ "license": "MIT",

"@goldstack/utils-log": "0.1.36",
"@goldstack/utils-sh": "0.2.2",
"@goldstack/utils-sh": "0.2.3",
"ajv": "^6.12.2",

@@ -28,0 +28,0 @@ "handlebars": "^4.7.6"

Sorry, the diff of this file is not supported yet

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