From beec9005d5df219995e00d21c6cd82db9dfffb65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6ran=20Sander?= Date: Sun, 17 Nov 2024 21:30:02 +0100 Subject: [PATCH] Remove all default exports --- src/__tests__/app_export_cert.test.js | 2 +- src/__tests__/app_export_jwt.test.js | 2 +- src/__tests__/app_import_cert.test.js | 2 +- src/__tests__/app_import_jwt.test.js | 2 +- src/__tests__/app_jwt.test.js | 2 +- src/__tests__/bookmark_get_cert.test.js | 2 +- src/__tests__/bookmark_get_jwt.test.js | 2 +- src/__tests__/connection_test_cert.test.js | 2 +- src/__tests__/connection_test_jwt.test.js | 2 +- src/__tests__/script_get_cert.test.js | 2 +- src/__tests__/script_get_jwt.test.js | 2 +- src/__tests__/task_custom_property_set_cert.test.js | 2 +- src/__tests__/task_custom_property_set_jwt.test.js | 2 +- src/__tests__/task_get_cert.test.js | 2 +- src/__tests__/task_get_jwt.test.js | 2 +- src/__tests__/task_import_cert.test.js | 2 +- src/__tests__/task_import_jwt.test.js | 2 +- src/lib/cli/qseow-delete-master-measure.js | 2 +- src/lib/cli/qseow-delete-proxy-session.js | 2 +- src/lib/cli/qseow-delete-variable.js | 2 +- src/lib/cli/qseow-get-bookmark.js | 2 +- src/lib/cli/qseow-get-master-measure.js | 2 +- src/lib/cli/qseow-get-script.js | 2 +- src/lib/cli/qseow-get-task.js | 2 +- src/lib/cli/qseow-get-variable.js | 2 +- src/lib/cli/qseow-import-app-from-file.js | 2 +- src/lib/cli/qseow-import-task-from-file.js | 2 +- src/lib/cli/qseow-master-item-import.js | 2 +- src/lib/cli/qseow-scramble-field.js | 2 +- src/lib/cli/qseow-set-task-cp.js | 2 +- src/lib/cli/qseow-test-connection.js | 2 +- src/lib/cli/qseow-visualise-task.js | 2 +- src/lib/cmd/qseow/createdim.js | 6 ++---- src/lib/cmd/qseow/deletemeasure.js | 9 ++------- src/lib/cmd/qseow/deletesessions.js | 6 ++---- src/lib/cmd/qseow/deletevariable.js | 4 +--- src/lib/cmd/qseow/getbookmark.js | 6 ++---- src/lib/cmd/qseow/getmeasure.js | 6 ++---- src/lib/cmd/qseow/getscript.js | 6 ++---- src/lib/cmd/qseow/gettask.js | 8 +++----- src/lib/cmd/qseow/getvariable.js | 6 ++---- src/lib/cmd/qseow/import-masteritem-excel.js | 6 ++---- src/lib/cmd/qseow/importapp.js | 6 ++---- src/lib/cmd/qseow/importtask.js | 8 +++----- src/lib/cmd/qseow/scramblefield.js | 6 ++---- src/lib/cmd/qseow/settaskcp.js | 6 ++---- src/lib/cmd/qseow/testconnection.js | 8 +++----- src/lib/cmd/qseow/vistask.js | 8 +++----- src/lib/task/class_allcompositeevents.js | 6 ++---- src/lib/task/class_allschemaevents.js | 6 ++---- src/lib/task/class_alltasks.js | 10 ++++------ src/lib/task/class_compositeevent.js | 4 +--- src/lib/task/class_schemaevent.js | 4 +--- src/lib/task/class_task.js | 5 +---- src/lib/util/qseow/about.js | 4 +--- src/lib/util/qseow/proxy.js | 6 ++---- src/lib/util/qseow/session.js | 2 +- 57 files changed, 82 insertions(+), 134 deletions(-) diff --git a/src/__tests__/app_export_cert.test.js b/src/__tests__/app_export_cert.test.js index 8f011b4..19fc487 100644 --- a/src/__tests__/app_export_cert.test.js +++ b/src/__tests__/app_export_cert.test.js @@ -3,7 +3,7 @@ import { jest, test, expect, describe } from '@jest/globals'; import fs from 'node:fs'; import path from 'node:path'; -import exportAppToFile from '../lib/cmd/qseow/exportapp.js'; +import { exportAppToFile } from '../lib/cmd/qseow/exportapp.js'; const options = { logLevel: process.env.CTRL_Q_LOG_LEVEL || 'info', diff --git a/src/__tests__/app_export_jwt.test.js b/src/__tests__/app_export_jwt.test.js index 68f593a..0c7842c 100644 --- a/src/__tests__/app_export_jwt.test.js +++ b/src/__tests__/app_export_jwt.test.js @@ -3,7 +3,7 @@ import { jest, test, expect, describe } from '@jest/globals'; import fs from 'node:fs'; import path from 'node:path'; -import exportAppToFile from '../lib/cmd/qseow/exportapp.js'; +import { exportAppToFile } from '../lib/cmd/qseow/exportapp.js'; const options = { logLevel: process.env.CTRL_Q_LOG_LEVEL || 'info', diff --git a/src/__tests__/app_import_cert.test.js b/src/__tests__/app_import_cert.test.js index 0671688..d6e31ec 100644 --- a/src/__tests__/app_import_cert.test.js +++ b/src/__tests__/app_import_cert.test.js @@ -1,7 +1,7 @@ /* eslint-disable no-console */ import { jest, test, expect, describe } from '@jest/globals'; -import importAppFromFile from '../lib/cmd/qseow/importapp.js'; +import { importAppFromFile } from '../lib/cmd/qseow/importapp.js'; import { appExistById, deleteAppById } from '../lib/util/qseow/app.js'; const options = { diff --git a/src/__tests__/app_import_jwt.test.js b/src/__tests__/app_import_jwt.test.js index 1ae4730..7fabd6b 100644 --- a/src/__tests__/app_import_jwt.test.js +++ b/src/__tests__/app_import_jwt.test.js @@ -1,7 +1,7 @@ /* eslint-disable no-console */ import { jest, test, expect, describe } from '@jest/globals'; -import importAppFromFile from '../lib/cmd/qseow/importapp.js'; +import { importAppFromFile } from '../lib/cmd/qseow/importapp.js'; import { appExistById, deleteAppById } from '../lib/util/qseow/app.js'; const options = { diff --git a/src/__tests__/app_jwt.test.js b/src/__tests__/app_jwt.test.js index c39676c..c8959f8 100644 --- a/src/__tests__/app_jwt.test.js +++ b/src/__tests__/app_jwt.test.js @@ -2,7 +2,7 @@ import { jest, test, expect, describe } from '@jest/globals'; import { getApps, getAppById, appExistById, deleteAppById } from '../lib/util/qseow/app.js'; -import importAppFromFile from '../lib/cmd/qseow/importapp.js'; +import { importAppFromFile } from '../lib/cmd/qseow/importapp.js'; import { sleep } from '../globals.js'; const options = { diff --git a/src/__tests__/bookmark_get_cert.test.js b/src/__tests__/bookmark_get_cert.test.js index 33cbf38..808654b 100644 --- a/src/__tests__/bookmark_get_cert.test.js +++ b/src/__tests__/bookmark_get_cert.test.js @@ -1,7 +1,7 @@ /* eslint-disable no-console */ import { jest, test, expect, describe } from '@jest/globals'; -import getBookmark from '../lib/cmd/qseow/getbookmark.js'; +import { getBookmark } from '../lib/cmd/qseow/getbookmark.js'; const options = { logLevel: process.env.CTRL_Q_LOG_LEVEL || 'info', diff --git a/src/__tests__/bookmark_get_jwt.test.js b/src/__tests__/bookmark_get_jwt.test.js index 85b8a5d..facc874 100644 --- a/src/__tests__/bookmark_get_jwt.test.js +++ b/src/__tests__/bookmark_get_jwt.test.js @@ -1,6 +1,6 @@ import { jest, test, expect, describe } from '@jest/globals'; -import getBookmark from '../lib/cmd/qseow/getbookmark.js'; +import { getBookmark } from '../lib/cmd/qseow/getbookmark.js'; const options = { logLevel: process.env.CTRL_Q_LOG_LEVEL || 'info', diff --git a/src/__tests__/connection_test_cert.test.js b/src/__tests__/connection_test_cert.test.js index 7c0eb79..877e69c 100644 --- a/src/__tests__/connection_test_cert.test.js +++ b/src/__tests__/connection_test_cert.test.js @@ -1,6 +1,6 @@ import { jest, test, expect, describe } from '@jest/globals'; -import testConnection from '../lib/cmd/qseow/testconnection.js'; +import { testConnection } from '../lib/cmd/qseow/testconnection.js'; const options = { logLevel: process.env.CTRL_Q_LOG_LEVEL || 'info', diff --git a/src/__tests__/connection_test_jwt.test.js b/src/__tests__/connection_test_jwt.test.js index cc1a1d5..2386762 100644 --- a/src/__tests__/connection_test_jwt.test.js +++ b/src/__tests__/connection_test_jwt.test.js @@ -1,6 +1,6 @@ import { jest, test, expect, describe } from '@jest/globals'; -import testConnection from '../lib/cmd/qseow/testconnection.js'; +import { testConnection } from '../lib/cmd/qseow/testconnection.js'; const options = { logLevel: process.env.CTRL_Q_LOG_LEVEL || 'info', diff --git a/src/__tests__/script_get_cert.test.js b/src/__tests__/script_get_cert.test.js index 7162292..40689e4 100644 --- a/src/__tests__/script_get_cert.test.js +++ b/src/__tests__/script_get_cert.test.js @@ -1,6 +1,6 @@ import { jest, test, expect, describe } from '@jest/globals'; -import getScript from '../lib/cmd/qseow/getscript.js'; +import { getScript } from '../lib/cmd/qseow/getscript.js'; const options = { logLevel: process.env.CTRL_Q_LOG_LEVEL || 'info', diff --git a/src/__tests__/script_get_jwt.test.js b/src/__tests__/script_get_jwt.test.js index eda1ce4..dcd9b4c 100644 --- a/src/__tests__/script_get_jwt.test.js +++ b/src/__tests__/script_get_jwt.test.js @@ -1,6 +1,6 @@ import { jest, test, expect, describe } from '@jest/globals'; -import getScript from '../lib/cmd/qseow/getscript.js'; +import { getScript } from '../lib/cmd/qseow/getscript.js'; const options = { logLevel: process.env.CTRL_Q_LOG_LEVEL || 'info', diff --git a/src/__tests__/task_custom_property_set_cert.test.js b/src/__tests__/task_custom_property_set_cert.test.js index 5b77c4c..2a840d4 100644 --- a/src/__tests__/task_custom_property_set_cert.test.js +++ b/src/__tests__/task_custom_property_set_cert.test.js @@ -1,6 +1,6 @@ import { jest, test, expect, describe } from '@jest/globals'; -import setTaskCustomProperty from '../lib/cmd/qseow/settaskcp.js'; +import { setTaskCustomProperty } from '../lib/cmd/qseow/settaskcp.js'; import { getTaskById } from '../lib/util/qseow/task.js'; const options = { diff --git a/src/__tests__/task_custom_property_set_jwt.test.js b/src/__tests__/task_custom_property_set_jwt.test.js index f99ca3c..b6b6461 100644 --- a/src/__tests__/task_custom_property_set_jwt.test.js +++ b/src/__tests__/task_custom_property_set_jwt.test.js @@ -1,6 +1,6 @@ import { jest, test, expect, describe } from '@jest/globals'; -import setTaskCustomProperty from '../lib/cmd/qseow/settaskcp.js'; +import { setTaskCustomProperty } from '../lib/cmd/qseow/settaskcp.js'; import { getTaskById } from '../lib/util/qseow/task.js'; const options = { diff --git a/src/__tests__/task_get_cert.test.js b/src/__tests__/task_get_cert.test.js index 7d690b8..60228b3 100644 --- a/src/__tests__/task_get_cert.test.js +++ b/src/__tests__/task_get_cert.test.js @@ -2,7 +2,7 @@ import { jest, test, expect, describe } from '@jest/globals'; import fs from 'node:fs'; import path from 'node:path'; -import getTask from '../lib/cmd/qseow/gettask.js'; +import { getTask } from '../lib/cmd/qseow/gettask.js'; const options = { logLevel: process.env.CTRL_Q_LOG_LEVEL || 'info', diff --git a/src/__tests__/task_get_jwt.test.js b/src/__tests__/task_get_jwt.test.js index 81e4848..11d60ec 100644 --- a/src/__tests__/task_get_jwt.test.js +++ b/src/__tests__/task_get_jwt.test.js @@ -2,7 +2,7 @@ import { jest, test, expect, describe } from '@jest/globals'; import fs from 'node:fs'; import path from 'node:path'; -import getTask from '../lib/cmd/qseow/gettask.js'; +import { getTask } from '../lib/cmd/qseow/gettask.js'; const options = { logLevel: process.env.CTRL_Q_LOG_LEVEL || 'info', diff --git a/src/__tests__/task_import_cert.test.js b/src/__tests__/task_import_cert.test.js index 29b6d20..7c92b5a 100644 --- a/src/__tests__/task_import_cert.test.js +++ b/src/__tests__/task_import_cert.test.js @@ -1,6 +1,6 @@ import { jest, test, expect, describe } from '@jest/globals'; -import importTaskFromFile from '../lib/cmd/qseow/importtask.js'; +import { importTaskFromFile } from '../lib/cmd/qseow/importtask.js'; import { getTaskById, deleteExternalProgramTaskById, deleteReloadTaskById } from '../lib/util/qseow/task.js'; import { mapTaskType } from '../lib/util/qseow/lookups.js'; diff --git a/src/__tests__/task_import_jwt.test.js b/src/__tests__/task_import_jwt.test.js index 7d9faad..533bb82 100644 --- a/src/__tests__/task_import_jwt.test.js +++ b/src/__tests__/task_import_jwt.test.js @@ -1,6 +1,6 @@ import { jest, test, expect, describe } from '@jest/globals'; -import importTaskFromFile from '../lib/cmd/qseow/importtask.js'; +import { importTaskFromFile } from '../lib/cmd/qseow/importtask.js'; import { getTaskById, deleteExternalProgramTaskById, deleteReloadTaskById } from '../lib/util/qseow/task.js'; import { mapTaskType } from '../lib/util/qseow/lookups.js'; diff --git a/src/lib/cli/qseow-delete-master-measure.js b/src/lib/cli/qseow-delete-master-measure.js index cb5c045..e51fc78 100644 --- a/src/lib/cli/qseow-delete-master-measure.js +++ b/src/lib/cli/qseow-delete-master-measure.js @@ -2,7 +2,7 @@ import { Option } from 'commander'; import { catchLog } from '../util/log.js'; import { qseowSharedParamAssertOptions, masterItemMeasureDeleteAssertOptions } from '../util/qseow/assert-options.js'; -import deleteMasterMeasure from '../cmd/qseow/deletemeasure.js'; +import { deleteMasterMeasure } from '../cmd/qseow/deletemeasure.js'; export function setupQseowDeleteMasterMeasureCommand(qseow) { qseow diff --git a/src/lib/cli/qseow-delete-proxy-session.js b/src/lib/cli/qseow-delete-proxy-session.js index 4b23249..9718e3b 100644 --- a/src/lib/cli/qseow-delete-proxy-session.js +++ b/src/lib/cli/qseow-delete-proxy-session.js @@ -2,7 +2,7 @@ import { Option } from 'commander'; import { catchLog } from '../util/log.js'; import { qseowSharedParamAssertOptions, deleteSessionsAssertOptions } from '../util/qseow/assert-options.js'; -import deleteSessions from '../cmd/qseow/deletesessions.js'; +import { deleteSessions } from '../cmd/qseow/deletesessions.js'; export function setupQseowDeleteProxySessionsCommand(qseow) { qseow diff --git a/src/lib/cli/qseow-delete-variable.js b/src/lib/cli/qseow-delete-variable.js index 6046f83..312acaa 100644 --- a/src/lib/cli/qseow-delete-variable.js +++ b/src/lib/cli/qseow-delete-variable.js @@ -2,7 +2,7 @@ import { Option } from 'commander'; import { catchLog } from '../util/log.js'; import { qseowSharedParamAssertOptions, variableDeleteAssertOptions } from '../util/qseow/assert-options.js'; -import deleteVariable from '../cmd/qseow/deletevariable.js'; +import { deleteVariable } from '../cmd/qseow/deletevariable.js'; export function setupQseowDeleteVariableCommand(qseow) { qseow diff --git a/src/lib/cli/qseow-get-bookmark.js b/src/lib/cli/qseow-get-bookmark.js index 1335766..3e7fdc9 100644 --- a/src/lib/cli/qseow-get-bookmark.js +++ b/src/lib/cli/qseow-get-bookmark.js @@ -2,7 +2,7 @@ import { Option } from 'commander'; import { catchLog } from '../util/log.js'; import { qseowSharedParamAssertOptions, getBookmarkAssertOptions } from '../util/qseow/assert-options.js'; -import getBookmark from '../cmd/qseow/getbookmark.js'; +import { getBookmark } from '../cmd/qseow/getbookmark.js'; export function setupQseowGetBookmarkCommand(qseow) { qseow diff --git a/src/lib/cli/qseow-get-master-measure.js b/src/lib/cli/qseow-get-master-measure.js index 0d229c8..24ce12e 100644 --- a/src/lib/cli/qseow-get-master-measure.js +++ b/src/lib/cli/qseow-get-master-measure.js @@ -2,7 +2,7 @@ import { Option } from 'commander'; import { catchLog } from '../util/log.js'; import { qseowSharedParamAssertOptions, masterItemGetAssertOptions } from '../util/qseow/assert-options.js'; -import getMasterMeasure from '../cmd/qseow/getmeasure.js'; +import { getMasterMeasure } from '../cmd/qseow/getmeasure.js'; export function setupQseowGetMasterMeasureCommand(qseow) { qseow diff --git a/src/lib/cli/qseow-get-script.js b/src/lib/cli/qseow-get-script.js index d0a76d6..a9ef39e 100644 --- a/src/lib/cli/qseow-get-script.js +++ b/src/lib/cli/qseow-get-script.js @@ -2,7 +2,7 @@ import { Option } from 'commander'; import { catchLog } from '../util/log.js'; import { qseowSharedParamAssertOptions, getScriptAssertOptions } from '../util/qseow/assert-options.js'; -import getScript from '../cmd/qseow/getscript.js'; +import { getScript } from '../cmd/qseow/getscript.js'; export function setupGetScriptCommand(qseow) { qseow diff --git a/src/lib/cli/qseow-get-task.js b/src/lib/cli/qseow-get-task.js index 66d369b..834d855 100644 --- a/src/lib/cli/qseow-get-task.js +++ b/src/lib/cli/qseow-get-task.js @@ -2,7 +2,7 @@ import { Option } from 'commander'; import { catchLog } from '../util/log.js'; import { qseowSharedParamAssertOptions, getTaskAssertOptions } from '../util/qseow/assert-options.js'; -import getTask from '../cmd/qseow/gettask.js'; +import { getTask } from '../cmd/qseow/gettask.js'; export function setupGetTaskCommand(qseow) { qseow diff --git a/src/lib/cli/qseow-get-variable.js b/src/lib/cli/qseow-get-variable.js index 8667ddc..ed42ce8 100644 --- a/src/lib/cli/qseow-get-variable.js +++ b/src/lib/cli/qseow-get-variable.js @@ -2,7 +2,7 @@ import { Option } from 'commander'; import { catchLog } from '../util/log.js'; import { qseowSharedParamAssertOptions, variableGetAssertOptions } from '../util/qseow/assert-options.js'; -import getVariable from '../cmd/qseow/getvariable.js'; +import { getVariable } from '../cmd/qseow/getvariable.js'; export function setpQseowGetVariableCommand(qseow) { qseow diff --git a/src/lib/cli/qseow-import-app-from-file.js b/src/lib/cli/qseow-import-app-from-file.js index a6a1841..b72c5bc 100644 --- a/src/lib/cli/qseow-import-app-from-file.js +++ b/src/lib/cli/qseow-import-app-from-file.js @@ -2,7 +2,7 @@ import { Option } from 'commander'; import { catchLog } from '../util/log.js'; import { qseowSharedParamAssertOptions, appImportAssertOptions } from '../util/qseow/assert-options.js'; -import importAppFromFile from '../cmd/qseow/importapp.js'; +import { importAppFromFile } from '../cmd/qseow/importapp.js'; export function setupQseowImportAppFromFileCommand(qseow) { qseow diff --git a/src/lib/cli/qseow-import-task-from-file.js b/src/lib/cli/qseow-import-task-from-file.js index f0e6214..08a1ab1 100644 --- a/src/lib/cli/qseow-import-task-from-file.js +++ b/src/lib/cli/qseow-import-task-from-file.js @@ -2,7 +2,7 @@ import { Option } from 'commander'; import { catchLog } from '../util/log.js'; import { qseowSharedParamAssertOptions, taskImportAssertOptions } from '../util/qseow/assert-options.js'; -import importTaskFromFile from '../cmd/qseow/importtask.js'; +import { importTaskFromFile } from '../cmd/qseow/importtask.js'; export function setupQseowImportTaskFromFileCommand(qseow) { qseow diff --git a/src/lib/cli/qseow-master-item-import.js b/src/lib/cli/qseow-master-item-import.js index 44643b2..0848766 100644 --- a/src/lib/cli/qseow-master-item-import.js +++ b/src/lib/cli/qseow-master-item-import.js @@ -2,7 +2,7 @@ import { Option } from 'commander'; import { catchLog } from '../util/log.js'; import { qseowSharedParamAssertOptions, masterItemImportAssertOptions } from '../util/qseow/assert-options.js'; -import importMasterItemFromFile from '../cmd/qseow/import-masteritem-excel.js'; +import { importMasterItemFromFile } from '../cmd/qseow/import-masteritem-excel.js'; export function setupQseowMasterItemImportCommand(qseow) { qseow diff --git a/src/lib/cli/qseow-scramble-field.js b/src/lib/cli/qseow-scramble-field.js index a29e286..b3da76f 100644 --- a/src/lib/cli/qseow-scramble-field.js +++ b/src/lib/cli/qseow-scramble-field.js @@ -2,7 +2,7 @@ import { Option } from 'commander'; import { catchLog } from '../util/log.js'; import { qseowSharedParamAssertOptions } from '../util/qseow/assert-options.js'; -import scrambleField from '../cmd/qseow/scramblefield.js'; +import { scrambleField } from '../cmd/qseow/scramblefield.js'; export function setupQseowScrambleFieldCommand(qseow) { qseow diff --git a/src/lib/cli/qseow-set-task-cp.js b/src/lib/cli/qseow-set-task-cp.js index afa5f8d..f6f2a5a 100644 --- a/src/lib/cli/qseow-set-task-cp.js +++ b/src/lib/cli/qseow-set-task-cp.js @@ -2,7 +2,7 @@ import { Option } from 'commander'; import { catchLog } from '../util/log.js'; import { qseowSharedParamAssertOptions, setTaskCustomPropertyAssertOptions } from '../util/qseow/assert-options.js'; -import setTaskCustomProperty from '../cmd/qseow/settaskcp.js'; +import { setTaskCustomProperty } from '../cmd/qseow/settaskcp.js'; export function setupQseowSetTaskCustomPropertyCommand(qseow) { qseow diff --git a/src/lib/cli/qseow-test-connection.js b/src/lib/cli/qseow-test-connection.js index 41a8b86..cb98684 100644 --- a/src/lib/cli/qseow-test-connection.js +++ b/src/lib/cli/qseow-test-connection.js @@ -2,7 +2,7 @@ import { Option } from 'commander'; import { catchLog } from '../util/log.js'; import { qseowSharedParamAssertOptions } from '../util/qseow/assert-options.js'; -import testConnection from '../cmd/qseow/testconnection.js'; +import { testConnection } from '../cmd/qseow/testconnection.js'; export function setupQseowTestConnectionCommand(qseow) { qseow diff --git a/src/lib/cli/qseow-visualise-task.js b/src/lib/cli/qseow-visualise-task.js index 1a9d8ff..75e9a9c 100644 --- a/src/lib/cli/qseow-visualise-task.js +++ b/src/lib/cli/qseow-visualise-task.js @@ -2,7 +2,7 @@ import { Option } from 'commander'; import { catchLog } from '../util/log.js'; import { qseowSharedParamAssertOptions } from '../util/qseow/assert-options.js'; -import visTask from '../cmd/qseow/vistask.js'; +import { visTask } from '../cmd/qseow/vistask.js'; export function setupQseowVisualiseTaskCommand(qseow) { qseow diff --git a/src/lib/cmd/qseow/createdim.js b/src/lib/cmd/qseow/createdim.js index 97dad79..52dfd87 100644 --- a/src/lib/cmd/qseow/createdim.js +++ b/src/lib/cmd/qseow/createdim.js @@ -7,7 +7,7 @@ import { catchLog } from '../../util/log.js'; * * @param {*} options */ -const createMasterDimension = async (options) => { +export async function createMasterDimension(options) { try { // Set log level setLoggingLevel(options.logLevel); @@ -254,6 +254,4 @@ const createMasterDimension = async (options) => { } catch (err) { catchLog('Error creating master dimension', err); } -}; - -export default createMasterDimension; +} diff --git a/src/lib/cmd/qseow/deletemeasure.js b/src/lib/cmd/qseow/deletemeasure.js index 63a3b93..f7a7770 100644 --- a/src/lib/cmd/qseow/deletemeasure.js +++ b/src/lib/cmd/qseow/deletemeasure.js @@ -10,7 +10,7 @@ let deleteCount = 0; * * @param {*} options */ -const deleteMasterMeasure = async (options) => { +export async function deleteMasterMeasure(options) { try { // Set log level setLoggingLevel(options.logLevel); @@ -85,7 +85,6 @@ const deleteMasterMeasure = async (options) => { deleteMasterItems = deleteMasterItems.concat(measureObj.qMeasureList.qItems); } else { // Loop over all master items (identified by name or ID) we should get data for - // eslint-disable-next-line no-restricted-syntax for (const masterItem of options.masterItem) { // Can we find this master item in the list retrieved from the app? if (options.idType === 'name') { @@ -115,10 +114,8 @@ const deleteMasterMeasure = async (options) => { if (deleteMasterItems.length === 0) { logger.warn(`No matching master item measures found`); } else { - // eslint-disable-next-line no-restricted-syntax for (const item of deleteMasterItems) { if (options.dryRun === undefined || options.dryRun === false) { - // eslint-disable-next-line no-await-in-loop const res = await app.destroyMeasure(item.qInfo.qId); if (res !== true) { logger.error(`Failed deleting measure "${item.qMeta.title}", id=${item.qInfo.qId} in app "${item.qInfo.qId}"`); @@ -148,6 +145,4 @@ const deleteMasterMeasure = async (options) => { } catch (err) { catchLog('Error in deleteMasterMeasure', err); } -}; - -export default deleteMasterMeasure; +} diff --git a/src/lib/cmd/qseow/deletesessions.js b/src/lib/cmd/qseow/deletesessions.js index dc5e93c..83c0c8d 100644 --- a/src/lib/cmd/qseow/deletesessions.js +++ b/src/lib/cmd/qseow/deletesessions.js @@ -6,7 +6,7 @@ import { catchLog } from '../../util/log.js'; * Delete Qlik Sense proxy sessions * @param {object} options - Options object */ -const deleteSessions = async (options) => { +export async function deleteSessions(options) { try { // Set log level setLoggingLevel(options.logLevel); @@ -31,6 +31,4 @@ const deleteSessions = async (options) => { return false; } -}; - -export default deleteSessions; +} diff --git a/src/lib/cmd/qseow/deletevariable.js b/src/lib/cmd/qseow/deletevariable.js index 0a6bdc6..6611539 100644 --- a/src/lib/cmd/qseow/deletevariable.js +++ b/src/lib/cmd/qseow/deletevariable.js @@ -9,7 +9,7 @@ import { catchLog } from '../../util/log.js'; * * @param {*} options */ -const deleteVariable = async (options) => { +export async function deleteVariable(options) { try { // Set log level setLoggingLevel(options.logLevel); @@ -183,5 +183,3 @@ const deleteVariable = async (options) => { catchLog('Error in deleteVariable', err); } }; - -export default deleteVariable; diff --git a/src/lib/cmd/qseow/getbookmark.js b/src/lib/cmd/qseow/getbookmark.js index deb72d3..36836f3 100644 --- a/src/lib/cmd/qseow/getbookmark.js +++ b/src/lib/cmd/qseow/getbookmark.js @@ -37,7 +37,7 @@ const consoleTableConfig = { * * @param {*} options */ -const getBookmark = async (options) => { +export async function getBookmark(options) { let session; try { @@ -217,6 +217,4 @@ const getBookmark = async (options) => { } return false; } -}; - -export default getBookmark; +} diff --git a/src/lib/cmd/qseow/getmeasure.js b/src/lib/cmd/qseow/getmeasure.js index 6eb7ac9..8724f6d 100644 --- a/src/lib/cmd/qseow/getmeasure.js +++ b/src/lib/cmd/qseow/getmeasure.js @@ -38,7 +38,7 @@ const consoleTableConfig = { * * @param {*} options */ -const getMasterMeasure = async (options) => { +export async function getMasterMeasure(options) { try { // Set log level setLoggingLevel(options.logLevel); @@ -242,6 +242,4 @@ const getMasterMeasure = async (options) => { } catch (err) { catchLog('Error in getMasterMeasure', err); } -}; - -export default getMasterMeasure; +} diff --git a/src/lib/cmd/qseow/getscript.js b/src/lib/cmd/qseow/getscript.js index eb11960..111712b 100644 --- a/src/lib/cmd/qseow/getscript.js +++ b/src/lib/cmd/qseow/getscript.js @@ -8,7 +8,7 @@ import { catchLog } from '../../util/log.js'; * * @param {*} options */ -const getScript = async (options) => { +export async function getScript(options) { try { // Set log level setLoggingLevel(options.logLevel); @@ -92,6 +92,4 @@ const getScript = async (options) => { } catch (err) { catchLog('Error in getScript', err); } -}; - -export default getScript; +} diff --git a/src/lib/cmd/qseow/gettask.js b/src/lib/cmd/qseow/gettask.js index 55ae3e1..0617001 100644 --- a/src/lib/cmd/qseow/gettask.js +++ b/src/lib/cmd/qseow/gettask.js @@ -5,7 +5,7 @@ import xlsx from 'node-xlsx'; import { stringify } from 'csv-stringify'; import yesno from 'yesno'; import { logger, setLoggingLevel, isSea, execPath, verifyFileSystemExists } from '../../../globals.js'; -import QlikSenseTasks from '../../task/class_alltasks.js'; +import { QlikSenseTasks } from '../../task/class_alltasks.js'; import { mapEventType, mapIncrementOption, mapDaylightSavingTime, mapRuleState } from '../../util/qseow/lookups.js'; import { getTagsFromQseow } from '../../util/qseow/tag.js'; import { catchLog } from '../../util/log.js'; @@ -85,7 +85,7 @@ function compareTable(a, b) { // get-task command // Options are assumed to be verified before calling this function -const getTask = async (options) => { +export async function getTask(options) { try { // Set log level setLoggingLevel(options.logLevel); @@ -773,6 +773,4 @@ const getTask = async (options) => { catchLog('Get task', err); return false; } -}; - -export default getTask; +} diff --git a/src/lib/cmd/qseow/getvariable.js b/src/lib/cmd/qseow/getvariable.js index 849df72..4ae9c61 100644 --- a/src/lib/cmd/qseow/getvariable.js +++ b/src/lib/cmd/qseow/getvariable.js @@ -39,7 +39,7 @@ const consoleTableConfig = { * * @param {*} options */ -const getVariable = async (options) => { +export async function getVariable(options) { try { // Set log level setLoggingLevel(options.logLevel); @@ -279,6 +279,4 @@ const getVariable = async (options) => { } catch (err) { catchLog(`Error in getVariable`, err); } -}; - -export default getVariable; +} diff --git a/src/lib/cmd/qseow/import-masteritem-excel.js b/src/lib/cmd/qseow/import-masteritem-excel.js index 22dff7c..8bee94d 100644 --- a/src/lib/cmd/qseow/import-masteritem-excel.js +++ b/src/lib/cmd/qseow/import-masteritem-excel.js @@ -1141,11 +1141,9 @@ const importMasterItemFromExcel = async (options) => { } }; -const importMasterItemFromFile = async (options) => { +export async function importMasterItemFromFile(options) { if (options.fileType === 'excel') { // Source file type is Excel await importMasterItemFromExcel(options); } -}; - -export default importMasterItemFromFile; +} diff --git a/src/lib/cmd/qseow/importapp.js b/src/lib/cmd/qseow/importapp.js index a21816c..bea1143 100644 --- a/src/lib/cmd/qseow/importapp.js +++ b/src/lib/cmd/qseow/importapp.js @@ -7,7 +7,7 @@ import { getTagsFromQseow } from '../../util/qseow/tag.js'; import { getCustomPropertiesFromQseow } from '../../util/qseow/customproperties.js'; import { catchLog } from '../../util/log.js'; -const importAppFromFile = async (options) => { +export async function importAppFromFile(options) { try { // Set log level setLoggingLevel(options.logLevel); @@ -85,6 +85,4 @@ const importAppFromFile = async (options) => { catchLog('IMPORT APP', err); return false; } -}; - -export default importAppFromFile; +} diff --git a/src/lib/cmd/qseow/importtask.js b/src/lib/cmd/qseow/importtask.js index bee5d0e..3fc288e 100644 --- a/src/lib/cmd/qseow/importtask.js +++ b/src/lib/cmd/qseow/importtask.js @@ -3,7 +3,7 @@ import { parse } from 'csv-parse'; import fs from 'node:fs'; import { logger, setLoggingLevel, isSea, execPath, verifyFileSystemExists, isNumeric } from '../../../globals.js'; -import QlikSenseTasks from '../../task/class_alltasks.js'; +import { QlikSenseTasks } from '../../task/class_alltasks.js'; import { QlikSenseApps } from '../../app/class_allapps.js'; import { getTaskColumnPosFromHeaderRow } from '../../util/qseow/lookups.js'; import { getTagsFromQseow } from '../../util/qseow/tag.js'; @@ -299,7 +299,7 @@ const processCsvFile = async (options) => { return records; }; -const importTaskFromFile = async (options) => { +export async function importTaskFromFile(options) { try { // Set log level setLoggingLevel(options.logLevel); @@ -415,6 +415,4 @@ const importTaskFromFile = async (options) => { } catch (err) { catchLog('IMPORT TASK 2', err); } -}; - -export default importTaskFromFile; +} diff --git a/src/lib/cmd/qseow/scramblefield.js b/src/lib/cmd/qseow/scramblefield.js index 0ab5e40..d1bb6e0 100644 --- a/src/lib/cmd/qseow/scramblefield.js +++ b/src/lib/cmd/qseow/scramblefield.js @@ -7,7 +7,7 @@ import { catchLog } from '../../util/log.js'; * * @param {*} options */ -const scrambleField = async (options) => { +export async function scrambleField(options) { try { // Set log level setLoggingLevel(options.logLevel); @@ -89,6 +89,4 @@ const scrambleField = async (options) => { } catch (err) { catchLog('Error in scrambleField', err); } -}; - -export default scrambleField; +} diff --git a/src/lib/cmd/qseow/settaskcp.js b/src/lib/cmd/qseow/settaskcp.js index ea3a3fe..ad50e35 100644 --- a/src/lib/cmd/qseow/settaskcp.js +++ b/src/lib/cmd/qseow/settaskcp.js @@ -138,7 +138,7 @@ const updateTask = async (options, customPropertyDef, task) => } }); -const setTaskCustomProperty = async (options) => { +export async function setTaskCustomProperty(options) { try { // == Meta code == // - Get definition for the custom property that should be updated @@ -201,6 +201,4 @@ const setTaskCustomProperty = async (options) => { catchLog(`SET RELOAD TASK CP`, err); return false; } -}; - -export default setTaskCustomProperty; +} diff --git a/src/lib/cmd/qseow/testconnection.js b/src/lib/cmd/qseow/testconnection.js index 4159b5f..403c91f 100644 --- a/src/lib/cmd/qseow/testconnection.js +++ b/src/lib/cmd/qseow/testconnection.js @@ -1,8 +1,8 @@ import { logger, setLoggingLevel, isSea, execPath } from '../../../globals.js'; -import getAboutFromQseow from '../../util/qseow/about.js'; +import { getAboutFromQseow } from '../../util/qseow/about.js'; import { catchLog } from '../../util/log.js'; -const testConnection = async (options) => { +export async function testConnection(options) { try { // Set log level setLoggingLevel(options.logLevel); @@ -30,6 +30,4 @@ const testConnection = async (options) => { logger.error(`EXPORT APP: ${err.stack}`); return false; } -}; - -export default testConnection; +} diff --git a/src/lib/cmd/qseow/vistask.js b/src/lib/cmd/qseow/vistask.js index e216b66..a13f0bb 100644 --- a/src/lib/cmd/qseow/vistask.js +++ b/src/lib/cmd/qseow/vistask.js @@ -6,7 +6,7 @@ import { Readable } from 'node:stream'; import sea from 'node:sea'; import { appVersion, logger, setLoggingLevel, isSea, execPath, verifyFileSystemExists, verifySeaAssetExists } from '../../../globals.js'; -import QlikSenseTasks from '../../task/class_alltasks.js'; +import { QlikSenseTasks } from '../../task/class_alltasks.js'; // js: 'application/javascript', const MIME_TYPES = { @@ -415,7 +415,7 @@ const startHttpServer = async (options) => { }); }; -const visTask = async (options) => { +export async function visTask(options) { // Set log level setLoggingLevel(options.logLevel); @@ -508,6 +508,4 @@ const visTask = async (options) => { startHttpServer(optionsNew); return true; -}; - -export default visTask; +} diff --git a/src/lib/task/class_allcompositeevents.js b/src/lib/task/class_allcompositeevents.js index e02d00f..39cb7c1 100644 --- a/src/lib/task/class_allcompositeevents.js +++ b/src/lib/task/class_allcompositeevents.js @@ -3,11 +3,11 @@ import path from 'node:path'; import { logger } from '../../globals.js'; import { setupQrsConnection } from '../util/qseow/qrs.js'; -import QlikSenseCompositeEvent from './class_compositeevent.js'; +import { QlikSenseCompositeEvent } from './class_compositeevent.js'; import { catchLog } from '../util/log.js'; import { getCertFilePaths } from '../util/qseow/cert.js'; -class QlikSenseCompositeEvents { +export class QlikSenseCompositeEvents { constructor() { // } @@ -76,5 +76,3 @@ class QlikSenseCompositeEvents { }); } } - -export default QlikSenseCompositeEvents; diff --git a/src/lib/task/class_allschemaevents.js b/src/lib/task/class_allschemaevents.js index fa6e3d4..fab1c2f 100644 --- a/src/lib/task/class_allschemaevents.js +++ b/src/lib/task/class_allschemaevents.js @@ -1,11 +1,11 @@ import axios from 'axios'; import { logger } from '../../globals.js'; import { setupQrsConnection } from '../util/qseow/qrs.js'; -import QlikSenseSchemaEvent from './class_schemaevent.js'; +import { QlikSenseSchemaEvent } from './class_schemaevent.js'; import { catchLog } from '../util/log.js'; import { getCertFilePaths } from '../util/qseow/cert.js'; -class QlikSenseSchemaEvents { +export class QlikSenseSchemaEvents { constructor() { // } @@ -87,5 +87,3 @@ class QlikSenseSchemaEvents { }); } } - -export default QlikSenseSchemaEvents; diff --git a/src/lib/task/class_alltasks.js b/src/lib/task/class_alltasks.js index 42fafa3..4e35f26 100644 --- a/src/lib/task/class_alltasks.js +++ b/src/lib/task/class_alltasks.js @@ -12,9 +12,9 @@ import { getTaskColumnPosFromHeaderRow, } from '../util/qseow/lookups.js'; -import QlikSenseTask from './class_task.js'; -import QlikSenseSchemaEvents from './class_allschemaevents.js'; -import QlikSenseCompositeEvents from './class_allcompositeevents.js'; +import { QlikSenseTask } from './class_task.js'; +import { QlikSenseSchemaEvents } from './class_allschemaevents.js'; +import { QlikSenseCompositeEvents } from './class_allcompositeevents.js'; import { getTagIdByName } from '../util/qseow/tag.js'; import { getCustomPropertyIdByName } from '../util/qseow/customproperties.js'; import { getAppById } from '../util/qseow/app.js'; @@ -22,7 +22,7 @@ import { taskExistById, getTaskById } from '../util/qseow/task.js'; import { catchLog } from '../util/log.js'; import { getCertFilePaths } from '../util/qseow/cert.js'; -class QlikSenseTasks { +export class QlikSenseTasks { constructor() { // } @@ -2376,5 +2376,3 @@ class QlikSenseTasks { return this.taskNetwork; } } - -export default QlikSenseTasks; diff --git a/src/lib/task/class_compositeevent.js b/src/lib/task/class_compositeevent.js index 414f402..fcde6af 100644 --- a/src/lib/task/class_compositeevent.js +++ b/src/lib/task/class_compositeevent.js @@ -1,6 +1,6 @@ import { logger } from '../../globals.js'; -class QlikSenseCompositeEvent { +export class QlikSenseCompositeEvent { constructor(compositeEvent) { this.compositeEvent = compositeEvent; } @@ -9,5 +9,3 @@ class QlikSenseCompositeEvent { // Other methods } - -export default QlikSenseCompositeEvent; diff --git a/src/lib/task/class_schemaevent.js b/src/lib/task/class_schemaevent.js index 2893ead..5ccbe42 100644 --- a/src/lib/task/class_schemaevent.js +++ b/src/lib/task/class_schemaevent.js @@ -1,6 +1,6 @@ import { logger } from '../../globals.js'; -class QlikSenseSchemaEvent { +export class QlikSenseSchemaEvent { constructor(schemaEvent) { this.schemaEvent = schemaEvent; } @@ -9,5 +9,3 @@ class QlikSenseSchemaEvent { // Other methods } - -export default QlikSenseSchemaEvent; diff --git a/src/lib/task/class_task.js b/src/lib/task/class_task.js index 5e35cdf..acea975 100644 --- a/src/lib/task/class_task.js +++ b/src/lib/task/class_task.js @@ -4,8 +4,7 @@ import { logger } from '../../globals.js'; import { mapTaskExecutionStatus } from '../util/qseow/lookups.js'; // const randomWords2 = (...args) => import('random-words').then(({ default: randomWords }) => randomWords(...args)); -class QlikSenseTask { - // eslint-disable-next-line no-useless-constructor +export class QlikSenseTask { constructor() { // } @@ -184,5 +183,3 @@ class QlikSenseTask { } } } - -export default QlikSenseTask; diff --git a/src/lib/util/qseow/about.js b/src/lib/util/qseow/about.js index 844e1d9..43769f2 100644 --- a/src/lib/util/qseow/about.js +++ b/src/lib/util/qseow/about.js @@ -4,7 +4,7 @@ import { logger, execPath } from '../../../globals.js'; import { setupQrsConnection } from './qrs.js'; import { catchLog } from '../log.js'; -async function getAboutFromQseow(options) { +export async function getAboutFromQseow(options) { logger.verbose(`Getting about info from QSEoW...`); try { @@ -29,5 +29,3 @@ async function getAboutFromQseow(options) { return false; } } - -export default getAboutFromQseow; diff --git a/src/lib/util/qseow/proxy.js b/src/lib/util/qseow/proxy.js index 2eaa563..2ddb486 100644 --- a/src/lib/util/qseow/proxy.js +++ b/src/lib/util/qseow/proxy.js @@ -4,7 +4,7 @@ import { logger, execPath } from '../../../globals.js'; import { setupQrsConnection } from './qrs.js'; import { catchLog } from '../log.js'; -const getProxiesFromQseow = async (options, _sessionCookie) => { +export async function getProxiesFromQseow(options, _sessionCookie) { logger.verbose(`Getting all proxies from QSEoW...`); // TODO Should support JWTs here too? @@ -30,6 +30,4 @@ const getProxiesFromQseow = async (options, _sessionCookie) => { } return proxies; -}; - -export default getProxiesFromQseow; +} diff --git a/src/lib/util/qseow/session.js b/src/lib/util/qseow/session.js index ea1df34..db6b03f 100644 --- a/src/lib/util/qseow/session.js +++ b/src/lib/util/qseow/session.js @@ -6,7 +6,7 @@ import { logger, execPath } from '../../../globals.js'; import { setupQpsConnection } from './qps.js'; import { setupQrsConnection } from './qrs.js'; import { catchLog } from '../log.js'; -import getProxiesFromQseow from './proxy.js'; +import { getProxiesFromQseow } from './proxy.js'; const consoleProxiesTableConfig = { border: {