Socket
Socket
Sign inDemoInstall

strapi-utils

Package Overview
Dependencies
Maintainers
1
Versions
282
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

strapi-utils - npm Package Compare versions

Comparing version 2.0.2 to 3.0.0-alpha.4

lib/cli.js

4

lib/commander.js

@@ -16,3 +16,3 @@ 'use strict';

// Allow us to display `help()`, but omit the wildcard (`*`) command.
program.Command.prototype.usageMinusWildcard = program.usageMinusWildcard = function () {
program.Command.prototype.usageMinusWildcard = program.usageMinusWildcard = () => {
program.commands = _.reject(program.commands, {

@@ -25,3 +25,3 @@ _name: '*'

// Force commander to display version information.
program.Command.prototype.versionInformation = program.versionInformation = function () {
program.Command.prototype.versionInformation = program.versionInformation = () => {
program.emit('version');

@@ -28,0 +28,0 @@ };

@@ -69,3 +69,3 @@ 'use strict';

// Iterate through each module in the set.
_.forEach(files, function (module, filename) {
_.forEach(files, (module, filename) => {

@@ -143,3 +143,3 @@ // Build the result object by merging all of the target modules

module.exports.required = function (options, cb) {
module.exports.required = (options, cb) => {
return dictionary(options, cb);

@@ -156,3 +156,3 @@ };

module.exports.optional = function (options, cb) {
module.exports.optional = (options, cb) => {
options.optional = true;

@@ -170,3 +170,3 @@ return dictionary(options, cb);

module.exports.exists = function (options, cb) {
module.exports.exists = (options, cb) => {
options.optional = true;

@@ -185,3 +185,3 @@ options.dontLoad = false;

module.exports.aggregate = function (options, cb) {
module.exports.aggregate = (options, cb) => {
options.aggregate = true;

@@ -188,0 +188,0 @@ options.optional = true;

@@ -8,8 +8,12 @@ 'use strict';

module.exports = {
cli: require('./cli'),
commander: require('./commander'),
dictionary: require('./dictionary'),
finder: require('./finder'),
joijson: require('./joi-json'),
json: require('./json'),
knex: require('./knex'),
regex: require('./regex'),
logger: require('./winston')
logger: require('./winston'),
models: require('./models'),
regex: require('./regex')
};

@@ -22,3 +22,3 @@ 'use strict';

exports.parseJSONFile = function (path, cb) {
exports.parseJSONFile = (path, cb) => {
if (!cb) {

@@ -40,3 +40,3 @@ throw new Error('Callback required!');

fs.readFile(path, 'utf-8', function (err, file) {
fs.readFile(path, 'utf-8', (err, file) => {
if (err) {

@@ -86,3 +86,3 @@ return cb(err);

exports.parseJSONFileSync = function (path) {
exports.parseJSONFileSync = path => {
return exports.parseJSONFile(path, 'sync');

@@ -100,7 +100,7 @@ };

exports.getPackage = function (path, cb) {
exports.getPackage = (path, cb) => {
path = _.trimEnd(path, '/');
path += '/package.json';
exports.parseJSONFile(path, function (err, json) {
exports.parseJSONFile(path, (err, json) => {
if (err) {

@@ -129,3 +129,3 @@ return cb(err);

exports.getPackageSync = function (path) {
exports.getPackageSync = path => {
path = _.trimEnd(path, '/');

@@ -132,0 +132,0 @@ path += '/package.json';

@@ -21,3 +21,3 @@ 'use strict';

module.exports = function (scope) {
module.exports = scope => {

@@ -62,3 +62,3 @@ // First, make sure the application we have access to

// Make sure the needed client is installed.
_.forEach(scope.connections, function (config) {
_.forEach(scope.connections, config => {
try {

@@ -65,0 +65,0 @@ scope.db = require(path.resolve(scope.rootPath, 'node_modules', 'knex'))(scope.dbConfig);

@@ -16,3 +16,3 @@ 'use strict';

exports.detectRoute = function (endpoint) {
exports.detectRoute = endpoint => {
const verbExpr = /^(all|get|post|put|delete|trace|options|connect|patch|head|redirect)\s+/i;

@@ -29,5 +29,5 @@ let verb = _.last(endpoint.match(verbExpr) || []) || '';

return {
verb: verb,
endpoint: endpoint
verb,
endpoint
};
};

@@ -1,5 +0,4 @@

# MIT License
Copyright (c) 2015-2017 Strapi Solutions.
Copyright (c) 2017, Vandium Software Inc.
Copyright © 2015-2016 Wistity.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

@@ -6,0 +5,0 @@

{
"name": "strapi-utils",
"version": "2.0.2",
"version": "3.0.0-alpha.4",
"description": "Shared utilities for the Strapi packages",

@@ -19,7 +19,8 @@ "homepage": "http://strapi.io",

"dependencies": {
"commander": "~2.9.0",
"knex": "~0.10.0",
"include-all": "~0.1.6",
"lodash": "~4.6.1",
"winston": "~2.2.0"
"commander": "^2.11.0",
"include-all": "^2.0.0",
"joi-json": "^2.0.1",
"knex": "^0.12.9",
"lodash": "^4.17.4",
"winston": "^2.3.1"
},

@@ -30,11 +31,11 @@ "scripts": {

"author": {
"email": "hack@wistity.co",
"name": "Wistity team",
"url": "http://wistity.co"
"email": "hi@strapi.io",
"name": "Strapi team",
"url": "http://strapi.io"
},
"maintainers": [
{
"name": "Wistity team",
"email": "hack@wistity.co",
"url": "http://wistity.co"
"name": "Strapi team",
"email": "hi@strapi.io",
"url": "http://strapi.io"
}

@@ -44,12 +45,12 @@ ],

"type": "git",
"url": "git://github.com/wistityhq/strapi.git"
"url": "git://github.com/strapi/strapi.git"
},
"bugs": {
"url": "https://github.com/wistityhq/strapi/issues"
"url": "https://github.com/strapi/strapi/issues"
},
"engines": {
"node": ">= 4.0.0",
"npm": ">= 3.0.0"
"node": ">= 8.0.0",
"npm": ">= 5.3.0"
},
"license": "MIT"
}

@@ -5,4 +5,4 @@ # strapi-utils

[![npm downloads](https://img.shields.io/npm/dm/strapi-utils.svg)](https://www.npmjs.org/package/strapi-utils)
[![npm dependencies](https://david-dm.org/wistityhq/strapi-utils.svg)](https://david-dm.org/wistityhq/strapi-utils)
[![Build status](https://travis-ci.org/wistityhq/strapi-utils.svg?branch=master)](https://travis-ci.org/wistityhq/strapi-utils)
[![npm dependencies](https://david-dm.org/strapi/strapi-utils.svg)](https://david-dm.org/strapi/strapi-utils)
[![Build status](https://travis-ci.org/strapi/strapi-utils.svg?branch=master)](https://travis-ci.org/strapi/strapi-utils)
[![Slack status](http://strapi-slack.herokuapp.com/badge.svg)](http://slack.strapi.io)

@@ -9,0 +9,0 @@

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