Skip to content

Commit

Permalink
feat(script-get): Add option for (not) loading data when app is opened
Browse files Browse the repository at this point in the history
Implements #459
  • Loading branch information
Göran Sander committed Apr 22, 2024
1 parent bc90ea9 commit dc0640b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/ctrl-q.js
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ program.configureHelp({
.option('--port <port>', 'Qlik Sense server engine port (usually 4747 for cert auth, 443 for jwt auth)', '4747')
.option('--schema-version <string>', 'Qlik Sense engine schema version', '12.612.0')
.requiredOption('--app-id <id>', 'Qlik Sense app ID')
.addOption(new Option('--open-without-data <true|false>', 'open app without data').choices(['true', 'false']).default('true'))
.requiredOption('--virtual-proxy <prefix>', 'Qlik Sense virtual proxy prefix', '')
.requiredOption(
'--secure <true|false>',
Expand Down
7 changes: 6 additions & 1 deletion src/lib/cmd/getscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ const getScript = async (options) => {
process.exit(1);
}

const app = await global.openDoc(options.appId, '', '', '', false);
// Get open-app-without-data option from command line
// Convert string to boolean
const openWithoutData = options.openWithoutData === 'true';
logger.verbose(`Open app without data: ${openWithoutData}`);

const app = await global.openDoc(options.appId, '', '', '', openWithoutData);
logger.verbose(`Opened app ${options.appId}.`);

// Get app script
Expand Down

0 comments on commit dc0640b

Please sign in to comment.