From 891fcb71cef33326fc36dc711e74aba07833a347 Mon Sep 17 00:00:00 2001 From: brycentrivir Date: Wed, 8 Apr 2026 16:14:28 -0600 Subject: [PATCH] feat: flipped extraction flag, rebuilding of failing tests afterwards --- src/cli/config/config-export.ts | 6 +- src/cli/node/node-export.ts | 6 +- src/cli/script/script-export.ts | 6 +- src/cli/server/server-export.ts | 8 +- .../__snapshots__/config-export.test.js.snap | 5 +- .../en/__snapshots__/node-export.test.js.snap | 4 +- .../__snapshots__/script-export.test.js.snap | 4 +- .../__snapshots__/server-export.test.js.snap | 5 +- .../config-export.e2e.test.js.snap | 16 - .../node-export.e2e.test.js.snap | 4491 +- .../script-export.e2e.test.js.snap | 36231 ++++++++-------- .../server-export.e2e.test.js.snap | 12521 +++--- test/e2e/config-export.e2e.test.js | 12 +- .../am_1076162899/recording.har | 0 .../oauth2_393036114/recording.har | 0 .../openidm_3290118515/recording.har | 0 .../am_1076162899/recording.har | 0 .../oauth2_393036114/recording.har | 0 .../openidm_3290118515/recording.har | 0 .../am_1076162899/recording.har | 0 .../oauth2_393036114/recording.har | 0 .../openidm_3290118515/recording.har | 0 .../am_1076162899/recording.har | 0 .../oauth2_393036114/recording.har | 0 .../openidm_3290118515/recording.har | 0 .../am_1076162899/recording.har | 0 .../oauth2_393036114/recording.har | 0 .../openidm_3290118515/recording.har | 0 .../am_1076162899/recording.har | 0 .../am_1076162899/recording.har | 0 .../am_1076162899/recording.har | 0 test/e2e/node-export.e2e.test.js | 21 +- test/e2e/script-export.e2e.test.js | 14 +- test/e2e/server-export.e2e.test.js | 41 +- 34 files changed, 26368 insertions(+), 27023 deletions(-) rename test/e2e/mocks/node_2982235661/export_4211608755/{0_all-separate_extract_directory_use-string-arrays_1044561342 => 0_all-separate_no-extract_directory_use-string-arrays_2175757408}/am_1076162899/recording.har (100%) rename test/e2e/mocks/node_2982235661/export_4211608755/{0_all-separate_extract_directory_use-string-arrays_1044561342 => 0_all-separate_no-extract_directory_use-string-arrays_2175757408}/oauth2_393036114/recording.har (100%) rename test/e2e/mocks/node_2982235661/export_4211608755/{0_all-separate_extract_directory_use-string-arrays_1044561342 => 0_all-separate_no-extract_directory_use-string-arrays_2175757408}/openidm_3290118515/recording.har (100%) rename test/e2e/mocks/node_2982235661/export_4211608755/{0_node-id_193359214 => 0_node-id_D_781094437}/am_1076162899/recording.har (100%) rename test/e2e/mocks/node_2982235661/export_4211608755/{0_node-id_193359214 => 0_node-id_D_781094437}/oauth2_393036114/recording.har (100%) rename test/e2e/mocks/node_2982235661/export_4211608755/{0_node-id_193359214 => 0_node-id_D_781094437}/openidm_3290118515/recording.har (100%) rename test/e2e/mocks/node_2982235661/export_4211608755/{0_node-name_use-string-arrays_2043637667 => 0_node-name_use-string-arrays_no-extract_1586525519}/am_1076162899/recording.har (100%) rename test/e2e/mocks/node_2982235661/export_4211608755/{0_node-name_use-string-arrays_2043637667 => 0_node-name_use-string-arrays_no-extract_1586525519}/oauth2_393036114/recording.har (100%) rename test/e2e/mocks/node_2982235661/export_4211608755/{0_node-name_use-string-arrays_2043637667 => 0_node-name_use-string-arrays_no-extract_1586525519}/openidm_3290118515/recording.har (100%) rename test/e2e/mocks/script_540962730/export_4211608755/{0_modified-properties_all-separate_no-metadata_default_extract_directory_1410389095 => 0_modified-properties_all-separate_no-metadata_default_no-extract_directory_3440431201}/am_1076162899/recording.har (100%) rename test/e2e/mocks/script_540962730/export_4211608755/{0_modified-properties_all-separate_no-metadata_default_extract_directory_1410389095 => 0_modified-properties_all-separate_no-metadata_default_no-extract_directory_3440431201}/oauth2_393036114/recording.har (100%) rename test/e2e/mocks/script_540962730/export_4211608755/{0_modified-properties_all-separate_no-metadata_default_extract_directory_1410389095 => 0_modified-properties_all-separate_no-metadata_default_no-extract_directory_3440431201}/openidm_3290118515/recording.har (100%) rename test/e2e/mocks/script_540962730/export_4211608755/{0_extract_script-id_directory_3126738353 => 0_no-extract_script-id_directory_3322257391}/am_1076162899/recording.har (100%) rename test/e2e/mocks/script_540962730/export_4211608755/{0_extract_script-id_directory_3126738353 => 0_no-extract_script-id_directory_3322257391}/oauth2_393036114/recording.har (100%) rename test/e2e/mocks/script_540962730/export_4211608755/{0_extract_script-id_directory_3126738353 => 0_no-extract_script-id_directory_3322257391}/openidm_3290118515/recording.har (100%) rename test/e2e/mocks/server_1085029842/export_4211608755/{0_server-id_2035896751 => 0_server-id_directory_1227895731}/am_1076162899/recording.har (100%) rename test/e2e/mocks/server_1085029842/export_4211608755/{0_server-url_extract_directory_434708301 => 0_server-url_no-extract_directory_2567965531}/am_1076162899/recording.har (100%) rename test/e2e/mocks/server_1085029842/export_4211608755/{0_u_file_default_no-metadata_256171004 => 0_u_file_default_no-metadata_directory_2134419444}/am_1076162899/recording.har (100%) diff --git a/src/cli/config/config-export.ts b/src/cli/config/config-export.ts index 822a40f94..947a85f90 100644 --- a/src/cli/config/config-export.ts +++ b/src/cli/config/config-export.ts @@ -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( diff --git a/src/cli/node/node-export.ts b/src/cli/node/node-export.ts index ac5dc1f0f..41a2c25d5 100644 --- a/src/cli/node/node-export.ts +++ b/src/cli/node/node-export.ts @@ -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( diff --git a/src/cli/script/script-export.ts b/src/cli/script/script-export.ts index d77a4bf92..2e9aab5dd 100644 --- a/src/cli/script/script-export.ts +++ b/src/cli/script/script-export.ts @@ -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( diff --git a/src/cli/server/server-export.ts b/src/cli/server/server-export.ts index ae8598526..583ab4b8d 100644 --- a/src/cli/server/server-export.ts +++ b/src/cli/server/server-export.ts @@ -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( @@ -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, options.metadata, { includeDefault: options.default, diff --git a/test/client_cli/en/__snapshots__/config-export.test.js.snap b/test/client_cli/en/__snapshots__/config-export.test.js.snap index 647ee250c..0dd08f126 100644 --- a/test/client_cli/en/__snapshots__/config-export.test.js.snap +++ b/test/client_cli/en/__snapshots__/config-export.test.js.snap @@ -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 diff --git a/test/client_cli/en/__snapshots__/node-export.test.js.snap b/test/client_cli/en/__snapshots__/node-export.test.js.snap index 7fda336e3..1b2e19832 100644 --- a/test/client_cli/en/__snapshots__/node-export.test.js.snap +++ b/test/client_cli/en/__snapshots__/node-export.test.js.snap @@ -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 diff --git a/test/client_cli/en/__snapshots__/script-export.test.js.snap b/test/client_cli/en/__snapshots__/script-export.test.js.snap index fc0ec5002..f043c881e 100644 --- a/test/client_cli/en/__snapshots__/script-export.test.js.snap +++ b/test/client_cli/en/__snapshots__/script-export.test.js.snap @@ -38,8 +38,8 @@ Options: scripts). Ignored with -a and -A. -s, --script