remove unused code

This commit is contained in:
Ben Irvin 2022-11-30 09:48:07 +01:00
parent a750bc1509
commit 3979d63dd2
2 changed files with 0 additions and 23 deletions

View File

@ -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
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(excludeOption)
.allowExcessArguments(false)
.hook('preAction', promptEncryptionKey)
.action(getLocalScript('transfer/export'));
@ -303,7 +295,6 @@ program
.choices(['restore', 'abort', 'keep', 'replace'])
.default('restore')
)
// .addOption(excludeOption)
.addOption(
new Option(
'--schemaComparison <schemaComparison>',

View File

@ -1,20 +1,7 @@
'use strict';
const { parseType } = require('@strapi/utils/lib');
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
*/
@ -86,7 +73,6 @@ const confirmKeyValue = (key, value, message) => {
module.exports = {
parseInputList,
parseInputBool,
promptEncryptionKey,
confirmKeyValue,
};