wp-blank-scripts 2.6.1 → 2.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/import.js +7 -0
- package/package.json +1 -1
package/cli/import.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
const glob = require('glob');
|
|
2
|
+
|
|
1
3
|
const importSQL = require('../lib/importSQL');
|
|
2
4
|
const logger = require('../logger');
|
|
3
5
|
const getCliOptions = require('../utils/getCliOptions');
|
|
4
6
|
const exitWithError = require('../utils/exitWithError');
|
|
7
|
+
const getSettings = require('../utils/projectSettings');
|
|
5
8
|
const getMostRecentSqlFile = require('../utils/getMostRecentSqlFile');
|
|
6
9
|
|
|
7
10
|
// Constants
|
|
@@ -21,6 +24,10 @@ function getEnvironmentFromFileName(file) {
|
|
|
21
24
|
}
|
|
22
25
|
|
|
23
26
|
module.exports = async () => {
|
|
27
|
+
const settings = getSettings();
|
|
28
|
+
const sqlDir = settings.directories.sql;
|
|
29
|
+
const sqlFiles = glob.sync(`${sqlDir}/**/*.sql`);
|
|
30
|
+
|
|
24
31
|
try {
|
|
25
32
|
const options = await getCliOptions([
|
|
26
33
|
{
|