diff --git a/packages/core/strapi/bin/strapi.js b/packages/core/strapi/bin/strapi.js index b7af361f6c..b26c834b3e 100755 --- a/packages/core/strapi/bin/strapi.js +++ b/packages/core/strapi/bin/strapi.js @@ -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 ', -// '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 ', '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 ', diff --git a/packages/core/strapi/lib/commands/utils/commander.js b/packages/core/strapi/lib/commands/utils/commander.js index d1f7136cfa..2ee6c2bc0f 100644 --- a/packages/core/strapi/lib/commands/utils/commander.js +++ b/packages/core/strapi/lib/commands/utils/commander.js @@ -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, };