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

cli-engine-config

Package Overview
Dependencies
Maintainers
3
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cli-engine-config - npm Package Compare versions

Comparing version 5.0.8 to 5.0.9

lib/schema.js

55

lib/config.js

@@ -6,48 +6,2 @@ "use strict";

const path = require("path");
const schema = {
type: 'object',
properties: {
'cli-engine': {
type: 'object',
description: "cli-engine entry in CLI's package.json",
additionalProperties: false,
properties: {
bin: { type: 'string' },
commands: { type: 'string' },
defaultCommand: { type: 'string' },
dirname: { type: 'string' },
npmRegistry: { type: 'string' },
userPlugins: { type: 'boolean' },
plugins: { type: 'array', items: { type: 'string' } },
hooks: {
additionalProperties: {
anyOf: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }],
},
},
s3: {
type: 'object',
additionalProperties: false,
properties: {
host: { type: 'string' },
},
},
topics: { $ref: '#/definitions/topics' },
},
},
},
definitions: {
topics: {
type: 'object',
additionalProperties: {
type: 'object',
additionalProperties: false,
properties: {
description: { type: 'string' },
hidden: { type: 'boolean' },
subtopics: { $ref: '#/definitions/topics' },
},
},
},
},
};
function dir({ dirname, category, home, platform, d, }) {

@@ -129,10 +83,2 @@ let cacheKey = `dir:${category}`;

}
function validate(pjson, filename) {
const validator = require('is-my-json-valid');
const validate = validator(schema, { verbose: true });
if (validate(pjson))
return;
const e = validate.errors[0];
throw new Error(`Error parsing ${filename}: ${e.field} ${e.message}. Received ${e.value}`);
}
function buildConfig(existing = {}) {

@@ -148,3 +94,2 @@ if (!existing)

let pjson = readJSONSync(path.join(existing.root, 'package.json'));
validate(pjson, pjsonPath);
existing.pjson = {

@@ -151,0 +96,0 @@ 'cli-engine': pjson['cli-engine'] || {},

13

package.json
{
"name": "cli-engine-config",
"description": "base cli-engine config objects and interfaces",
"version": "5.0.8",
"version": "5.0.9",
"author": "Jeff Dickey @jdxcode",
"bugs": "https://github.com/heroku/cli-engine-config/issues",
"dependencies": {
"is-my-json-valid": "^2.17.1"
},
"dependencies": {},
"devDependencies": {
"@types/is-my-json-valid": "^0.0.20",
"@types/jest": "21.1.9",
"@types/node": "8.5.2",
"ajv-cli": "^2.1.0",
"cli-flags": "2.0.3",

@@ -44,5 +42,8 @@ "debug": "^3.1.0",

"scripts": {
"clean": "del-cli lib",
"build": "tsc && ajv compile -s schema.js -o lib/schema.js",
"posttest": "tslint -p . && prettier -l 'src/**/*.ts'",
"precommit": "lint-staged",
"prepare": "del-cli lib && tsc && del-cli \"lib/**/*.test.+(d.ts|js)\"",
"prepare": "yarn run clean && yarn run build && yarn run prune",
"prune": "del-cli \"lib/**/*.test.+(d.ts|js)\"",
"pretest": "tsc",

@@ -49,0 +50,0 @@ "test": "jest"

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