Skip to content

Commit 3446b7f

Browse files
wip
1 parent 7c3f781 commit 3446b7f

File tree

11 files changed

+12
-211
lines changed

11 files changed

+12
-211
lines changed

packages/strapi-database/lib/database-manager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ class DatabaseManager {
99
constructor(strapi) {
1010
this.strapi = strapi;
1111

12-
// throw if connections and schemas aren't arrays
1312
this.initialized = false;
13+
1414
this.queries = new Map();
1515
this.connectors = new Map();
1616
this.models = new Map();

packages/strapi-database/lib/naming.js

Lines changed: 0 additions & 21 deletions
This file was deleted.

packages/strapi-utils/lib/commander.js

Lines changed: 0 additions & 23 deletions
This file was deleted.

packages/strapi-utils/lib/index.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ const parseType = require('./parse-type');
1212

1313
module.exports = {
1414
cli: require('./cli'),
15-
commander: require('./commander'),
1615
finder: require('./finder'),
17-
joijson: require('./joi-json'),
18-
json: require('./json'),
1916
knex: require('./knex'),
2017
logger: require('./logger'),
2118
models: require('./models'),

packages/strapi-utils/lib/joi-json.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

packages/strapi-utils/lib/json.js

Lines changed: 0 additions & 138 deletions
This file was deleted.

packages/strapi-utils/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818
"test": "jest"
1919
},
2020
"dependencies": {
21-
"commander": "^2.20.0",
2221
"date-fns": "^2.8.1",
23-
"joi-json": "^2.1.0",
2422
"knex": "^0.16.5",
2523
"lodash": "^4.17.11",
2624
"pino": "^4.7.1",

packages/strapi/bin/strapi.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,18 @@
44
const _ = require('lodash');
55
const resolveCwd = require('resolve-cwd');
66
const { yellow } = require('chalk');
7+
const program = require('commander');
78

8-
const program = require('strapi-utils').commander;
99
const packageJSON = require('../package.json');
1010

11+
// Allow us to display `help()`, but omit the wildcard (`*`) command.
12+
program.Command.prototype.usageMinusWildcard = program.usageMinusWildcard = () => {
13+
program.commands = _.reject(program.commands, {
14+
_name: '*',
15+
});
16+
program.help();
17+
};
18+
1119
const checkCwdIsStrapiApp = name => {
1220
let logErrorAndExit = () => {
1321
console.log(

packages/strapi/lib/middlewares/router/utils/routerChecker.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
const _ = require('lodash');
99

1010
// Strapi utilities.
11-
const finder = require('strapi-utils').finder;
12-
const regex = require('strapi-utils').regex;
13-
const policyUtils = require('strapi-utils').policy;
11+
const { finder, regex, policy: policyUtils } = require('strapi-utils');
1412

1513
module.exports = strapi =>
1614
function routerChecker(value, endpoint, plugin) {

packages/strapi/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"chalk": "^2.4.1",
1919
"chokidar": "^2.1.2",
2020
"cli-table3": "^0.5.1",
21+
"commander": "^2.20.0",
2122
"cross-spawn": "^6.0.5",
2223
"delegates": "^1.0.0",
2324
"execa": "^1.0.0",

0 commit comments

Comments
 (0)