Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/cli/config/config-export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ export default function setup() {
)
.addOption(
new Option(
'-x, --extract',
'Extract scripts and server properties from the exported file, and save it to a separate file. Ignored with -a.'
)
'-x, --no-extract',
'Do not extract scripts and server properties from the exported file to a separate file.'
).default(true, 'true')
)
.addOption(
new Option(
Expand Down
6 changes: 3 additions & 3 deletions src/cli/node/node-export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ export default function setup() {
)
.addOption(
new Option(
'-x, --extract',
'Extract the script from the exported file, and save it to a separate file. Ignored with -a.'
)
'-x, --no-extract',
'Do not extract the script from the exported file to a separate file.'
).default(true, 'true')
)
.addOption(
new Option(
Expand Down
6 changes: 3 additions & 3 deletions src/cli/script/script-export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ export default function setup() {
)
.addOption(
new Option(
'-x, --extract',
'Extract the script from the exported file, and save it to a separate file. Ignored with -a.'
)
'-x, --no-extract',
'Do not extract the script from the exported file to a separate file.'
).default(true, 'true')
)
.addOption(
new Option(
Expand Down
8 changes: 4 additions & 4 deletions src/cli/server/server-export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ export default function setup() {
)
.addOption(
new Option(
'-x, --extract',
'Extract scripts and server properties from the exported file, and save it to a separate file. Ignored with -a.'
)
'-x, --no-extract',
'Do not extract the server properties from the exported file to a separate file.'
).default(true, 'true')
)
.addOption(
new Option(
Expand Down Expand Up @@ -101,7 +101,7 @@ export default function setup() {
verboseMessage(`Exporting all servers to a single file...`);
const outcome = await exportServersToFile(
options.file,
options.extract,
false,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something I realized is that we should probably just remove specifying the extract flag here entirely from the exportServersToFile function since that really shouldn't exist for it. So instead of doing false here, we just remove that parameter from the function entirely

options.metadata,
{
includeDefault: options.default,
Expand Down
5 changes: 2 additions & 3 deletions test/client_cli/en/__snapshots__/config-export.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,8 @@ Options:
source environment.
--use-string-arrays Where applicable, use string arrays to store
multi-line text (e.g. scripts). (default: off)
-x, --extract Extract scripts and server properties from the
exported file, and save it to a separate file.
Ignored with -a.
-x, --no-extract Do not extract scripts and server properties from
the exported file to a separate file.
-h, --help Help
-hh, --help-more Help with all options.
-hhh, --help-all Help with all options, environment variables, and
Expand Down
4 changes: 2 additions & 2 deletions test/client_cli/en/__snapshots__/node-export.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ Options:
-N, --no-metadata Does not include metadata in the export file.
--use-string-arrays Where applicable, use string arrays to store
scripts. (default: off)
-x, --extract Extract the script from the exported file, and
save it to a separate file. Ignored with -a.
-x, --no-extract Do not extract the script from the exported file
to a separate file.
-h, --help Help
-hh, --help-more Help with all options.
-hhh, --help-all Help with all options, environment variables, and
Expand Down
4 changes: 2 additions & 2 deletions test/client_cli/en/__snapshots__/script-export.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ Options:
scripts). Ignored with -a and -A.
-s, --script <script> DEPRECATED! Use -n/--script-name instead. Name of
the script.
-x, --extract Extract the script from the exported file, and save
it to a separate file. Ignored with -a.
-x, --no-extract Do not extract the script from the exported file to
a separate file.
-h, --help Help
-hh, --help-more Help with all options.
-hhh, --help-all Help with all options, environment variables, and
Expand Down
5 changes: 2 additions & 3 deletions test/client_cli/en/__snapshots__/server-export.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ Options:
full url (if not unique, it will error out). If
specified, only one server is exported and the
options -a and -A are ignored.
-x, --extract Extract scripts and server properties from the
exported file, and save it to a separate file.
Ignored with -a.
-x, --no-extract Do not extract the server properties from the
exported file to a separate file.
-h, --help Help
-hh, --help-more Help with all options.
-hhh, --help-all Help with all options, environment variables,
Expand Down
16 changes: 0 additions & 16 deletions test/e2e/__snapshots__/config-export.e2e.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@ exports[`frodo config export "frodo config export --all --modified-properties --

exports[`frodo config export "frodo config export --all --modified-properties --read-only --file testExportAll2.json --include-active-values --use-string-arrays --no-decode --no-coords --type classic": should export everything to a single file named testExportAll2.json with no decoding variables, no journey coordinates, and using string arrays 2`] = `""`;

exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir8 --include-active-values --use-string-arrays --no-decode --no-coords --type classic": should export everything, including default scripts, into separate files in the directory exportAllTestDir8 with scripts extracted, no decoding variables, no journey coordinates, separate mappings, and using string arrays 1`] = `0`;

exports[`frodo config export "frodo config export --all-separate --no-metadata --default --directory exportAllTestDir8 --include-active-values --use-string-arrays --no-decode --no-coords --type classic": should export everything, including default scripts, into separate files in the directory exportAllTestDir8 with scripts extracted, no decoding variables, no journey coordinates, separate mappings, and using string arrays 2`] = `""`;

exports[`frodo config export "frodo config export --all-separate --read-only --no-metadata --default --directory exportAllTestDir3 --use-string-arrays --no-decode --no-coords --extract --separate-mappings": should export everything, including default scripts, into separate files in the directory exportAllTestDir3 with scripts extracted, no decoding variables, no journey coordinates, separate mappings, and using string arrays 1`] = `0`;

exports[`frodo config export "frodo config export --all-separate --read-only --no-metadata --default --directory exportAllTestDir3 --use-string-arrays --no-decode --no-coords --extract --separate-mappings": should export everything, including default scripts, into separate files in the directory exportAllTestDir3 with scripts extracted, no decoding variables, no journey coordinates, separate mappings, and using string arrays 2`] = `""`;

exports[`frodo config export "frodo config export --global-only -af testExportAllGlobal.json -m classic": should export all global config to a single file named testExportAllGlobal.json. 1`] = `0`;

exports[`frodo config export "frodo config export --global-only -af testExportAllGlobal.json -m classic": should export all global config to a single file named testExportAllGlobal.json. 2`] = `""`;
Expand All @@ -28,18 +20,10 @@ exports[`frodo config export "frodo config export -AD exportAllTestDir1": should

exports[`frodo config export "frodo config export -AD exportAllTestDir1": should export everything into separate files in the directory exportAllTestDir1 2`] = `""`;

exports[`frodo config export "frodo config export -MAsxD exportAllTestDir2": should export everything into separate files in the directory exportAllTestDir2 with scripts extracted and mappings separate 1`] = `0`;

exports[`frodo config export "frodo config export -MAsxD exportAllTestDir2": should export everything into separate files in the directory exportAllTestDir2 with scripts extracted and mappings separate 2`] = `""`;

exports[`frodo config export "frodo config export -RAD exportAllTestDir5 --include-active-values": should export everything including secret values into separate files in the directory exportAllTestDir5 1`] = `0`;

exports[`frodo config export "frodo config export -RAD exportAllTestDir5 --include-active-values": should export everything including secret values into separate files in the directory exportAllTestDir5 2`] = `""`;

exports[`frodo config export "frodo config export -RMAsxD exportAllTestDir7 -m classic": should export everything into separate files in the directory exportAllTestDir7 with scripts extracted and mappings separate 1`] = `0`;

exports[`frodo config export "frodo config export -RMAsxD exportAllTestDir7 -m classic": should export everything into separate files in the directory exportAllTestDir7 with scripts extracted and mappings separate 2`] = `""`;

exports[`frodo config export "frodo config export -adND exportAllTestDir4": should export everything, including default scripts, to a single file 1`] = `0`;

exports[`frodo config export "frodo config export -adND exportAllTestDir4": should export everything, including default scripts, to a single file 2`] = `""`;
Expand Down
Loading