strapi-utils
Advanced tools
Comparing version 2.0.2 to 3.0.0-alpha.4
@@ -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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24547
16
671
6
1
7
1
+ Addedjoi-json@^2.0.1
+ Addedarr-diff@2.0.0(transitive)
+ Addedarr-flatten@1.1.0(transitive)
+ Addedarray-unique@0.2.1(transitive)
+ Addedasync@2.6.4(transitive)
+ Addedbabel-runtime@6.26.0(transitive)
+ Addedbluebird@3.7.2(transitive)
+ Addedbraces@1.8.5(transitive)
+ Addedcommander@2.20.3(transitive)
+ Addedcore-js@2.6.12(transitive)
+ Addeddetect-file@0.1.0(transitive)
+ Addedexpand-brackets@0.1.5(transitive)
+ Addedexpand-range@1.8.2(transitive)
+ Addedexpand-tilde@1.2.2(transitive)
+ Addedextend@3.0.2(transitive)
+ Addedextglob@0.3.2(transitive)
+ Addedfilename-regex@2.0.1(transitive)
+ Addedfill-range@2.2.4(transitive)
+ Addedfindup-sync@0.4.3(transitive)
+ Addedfor-in@1.0.2(transitive)
+ Addedfor-own@0.1.5(transitive)
+ Addedfs-exists-sync@0.1.0(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedgeneric-pool@2.5.4(transitive)
+ Addedglob-base@0.3.0(transitive)
+ Addedglob-parent@2.0.0(transitive)
+ Addedglobal-modules@0.2.3(transitive)
+ Addedglobal-prefix@0.1.5(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedhomedir-polyfill@1.0.3(transitive)
+ Addedinclude-all@2.0.0(transitive)
+ Addedini@1.3.8(transitive)
+ Addedis-buffer@1.1.6(transitive)
+ Addedis-core-module@2.15.1(transitive)
+ Addedis-dotfile@1.0.3(transitive)
+ Addedis-equal-shallow@0.1.3(transitive)
+ Addedis-extendable@0.1.1(transitive)
+ Addedis-extglob@1.0.0(transitive)
+ Addedis-glob@2.0.1(transitive)
+ Addedis-number@2.1.04.0.0(transitive)
+ Addedis-posix-bracket@0.1.1(transitive)
+ Addedis-primitive@2.0.0(transitive)
+ Addedis-windows@0.2.0(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedisobject@2.1.0(transitive)
+ Addedjoi-json@2.1.0(transitive)
+ Addedkind-of@3.2.26.0.3(transitive)
+ Addedknex@0.12.9(transitive)
+ Addedliftoff@2.2.5(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedmath-random@1.0.4(transitive)
+ Addedmicromatch@2.3.11(transitive)
+ Addednormalize-path@2.1.1(transitive)
+ Addedobject.omit@2.0.1(transitive)
+ Addedos-homedir@1.0.2(transitive)
+ Addedparse-glob@3.0.4(transitive)
+ Addedparse-passwd@1.0.0(transitive)
+ Addedpath-parse@1.0.7(transitive)
+ Addedpreserve@0.2.0(transitive)
+ Addedrandomatic@3.1.1(transitive)
+ Addedrechoir@0.6.2(transitive)
+ Addedregenerator-runtime@0.11.1(transitive)
+ Addedregex-cache@0.4.4(transitive)
+ Addedremove-trailing-separator@1.1.0(transitive)
+ Addedrepeat-element@1.1.4(transitive)
+ Addedrepeat-string@1.6.1(transitive)
+ Addedresolve@1.22.8(transitive)
+ Addedresolve-dir@0.1.1(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsupports-preserve-symlinks-flag@1.0.0(transitive)
+ Addeduuid@3.4.0(transitive)
+ Addedvandium-utils@1.2.0(transitive)
+ Addedwhich@1.3.1(transitive)
+ Addedwinston@2.4.7(transitive)
- Removedasync@1.0.0(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbluebird@2.11.0(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedcommander@2.9.0(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removeddouble-ended-queue@2.1.0-0(transitive)
- Removedextend@2.0.2(transitive)
- Removedfindup-sync@0.2.1(transitive)
- Removedglob@4.3.5(transitive)
- Removedgraceful-readlink@1.0.1(transitive)
- Removedhashmap@2.4.0(transitive)
- Removedinclude-all@0.1.6(transitive)
- Removedinflight@1.0.6(transitive)
- Removedknex@0.10.0(transitive)
- Removedliftoff@2.0.3(transitive)
- Removedlodash@4.6.1(transitive)
- Removedminimatch@2.0.10(transitive)
- Removedonce@1.4.0(transitive)
- Removedpkginfo@0.3.1(transitive)
- Removedpool2@1.4.1(transitive)
- Removedresolve@1.1.7(transitive)
- Removedsimple-backoff@1.1.0(transitive)
- Removedunderscore.string@2.3.1(transitive)
- Removedwinston@2.2.0(transitive)
- Removedwrappy@1.0.2(transitive)
Updatedcommander@^2.11.0
Updatedinclude-all@^2.0.0
Updatedknex@^0.12.9
Updatedlodash@^4.17.4
Updatedwinston@^2.3.1