mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 08:52:26 +00:00
remove unused code
This commit is contained in:
parent
a750bc1509
commit
3979d63dd2
@ -66,13 +66,6 @@ const getLocalScript =
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// option to exclude types of data for the export, import, and transfer commands
|
|
||||||
// TODO: validate these inputs. Hopefully here, but worst case it may require adding a hook on each command
|
|
||||||
// const excludeOption = new Option(
|
|
||||||
// '--exclude <data,to,exclude>',
|
|
||||||
// 'Comma-separated list of data to exclude (files [localMediaFiles, providerMediaFiles], content [entities, links], schema, configuration)' // ['webhooks', 'content', 'localmedia', 'providermedia', 'relations']
|
|
||||||
// ).argParser(parseInputList);
|
|
||||||
|
|
||||||
// Initial program setup
|
// Initial program setup
|
||||||
program.storeOptionsAsProperties(false).allowUnknownOption(true);
|
program.storeOptionsAsProperties(false).allowUnknownOption(true);
|
||||||
|
|
||||||
@ -289,7 +282,6 @@ program
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
.addOption(new Option('-f, --file <file>', 'name to use for exported file (without extensions)'))
|
.addOption(new Option('-f, --file <file>', 'name to use for exported file (without extensions)'))
|
||||||
// .addOption(excludeOption)
|
|
||||||
.allowExcessArguments(false)
|
.allowExcessArguments(false)
|
||||||
.hook('preAction', promptEncryptionKey)
|
.hook('preAction', promptEncryptionKey)
|
||||||
.action(getLocalScript('transfer/export'));
|
.action(getLocalScript('transfer/export'));
|
||||||
@ -303,7 +295,6 @@ program
|
|||||||
.choices(['restore', 'abort', 'keep', 'replace'])
|
.choices(['restore', 'abort', 'keep', 'replace'])
|
||||||
.default('restore')
|
.default('restore')
|
||||||
)
|
)
|
||||||
// .addOption(excludeOption)
|
|
||||||
.addOption(
|
.addOption(
|
||||||
new Option(
|
new Option(
|
||||||
'--schemaComparison <schemaComparison>',
|
'--schemaComparison <schemaComparison>',
|
||||||
|
@ -1,20 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const { parseType } = require('@strapi/utils/lib');
|
|
||||||
const inquirer = require('inquirer');
|
const inquirer = require('inquirer');
|
||||||
|
|
||||||
/**
|
|
||||||
* argsParser: Parse a string argument from the command line as a boolean
|
|
||||||
*/
|
|
||||||
const parseInputBool = (arg) => {
|
|
||||||
try {
|
|
||||||
return parseType({ type: 'boolean', value: arg });
|
|
||||||
} catch (e) {
|
|
||||||
console.error(e.message);
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* argsParser: Parse a comma-delimited string as an array
|
* argsParser: Parse a comma-delimited string as an array
|
||||||
*/
|
*/
|
||||||
@ -86,7 +73,6 @@ const confirmKeyValue = (key, value, message) => {
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
parseInputList,
|
parseInputList,
|
||||||
parseInputBool,
|
|
||||||
promptEncryptionKey,
|
promptEncryptionKey,
|
||||||
confirmKeyValue,
|
confirmKeyValue,
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user