@teqed/interact-ibmi
Advanced tools
Comparing version 1.0.38 to 1.0.39
import chalk from 'chalk'; | ||
import ora from 'ora'; | ||
import printJobLog from '../../util/odbc/print-job-log.js'; | ||
import { parseODBCErrorMessage } from '../../util/qcmdexc/qcmdexc-util.js'; | ||
@@ -20,4 +21,5 @@ import QCMDEXC from '../../util/qcmdexc/qcmdexc.js'; | ||
spinner.fail(`${chalk.red(parsedError.messageIdentifier)} - ${chalk.yellow(parsedError.messageText)}`); | ||
await printJobLog(); | ||
} | ||
return genericPressEnterPrompt(); | ||
} |
@@ -38,3 +38,3 @@ import chalk from 'chalk'; | ||
case menuChoice[3]: { | ||
console.table(await testFunction()); | ||
console.log(await testFunction()); | ||
return genericPressEnterPrompt(); | ||
@@ -41,0 +41,0 @@ } |
@@ -1,31 +0,6 @@ | ||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */ | ||
/* eslint-disable @typescript-eslint/no-unsafe-return */ | ||
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
import { queryOdbc } from '../../util/odbc/odbc-util.js'; | ||
import printJobLog from '../../util/odbc/print-job-log.js'; | ||
export default async () => { | ||
const jobInfo = (await queryOdbc(`SELECT \ | ||
ORDINAL_POSITION, JOB_NAME, JOB_NAME_SHORT, \ | ||
JOB_USER, JOB_NUMBER, SUBSYSTEM, \ | ||
SUBSYSTEM_LIBRARY_NAME, AUTHORIZATION_NAME, \ | ||
TEMPORARY_STORAGE, CPU_TIME, TOTAL_DISK_IO_COUNT, \ | ||
JOB_DESCRIPTION, JOB_DESCRIPTION_LIBRARY, \ | ||
JOB_QUEUE, JOB_QUEUE_LIBRARY, OUTPUT_QUEUE, \ | ||
OUTPUT_QUEUE_LIBRARY, CCSID, JOB_ENTERED_SYSTEM_TIME, \ | ||
CLIENT_IP_ADDRESS \ | ||
FROM TABLE(QSYS2.ACTIVE_JOB_INFO(JOB_NAME_FILTER =>'*'))`)); | ||
const jobName = jobInfo[0].JOB_NAME; | ||
const jobMessages = (await queryOdbc(`select \ | ||
MESSAGE_ID, \ | ||
MESSAGE_TYPE, \ | ||
MESSAGE_TIMESTAMP, \ | ||
FROM_PROGRAM, \ | ||
MESSAGE_TEXT, \ | ||
MESSAGE_SECOND_LEVEL_TEXT \ | ||
from table(qsys2.joblog_info('${jobName}'))`)); | ||
// Log each element of the array | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call | ||
jobMessages.forEach((element) => { | ||
console.log(element); | ||
}); | ||
return 0; | ||
console.time(); | ||
await printJobLog(); | ||
console.timeEnd(); | ||
}; |
@@ -86,3 +86,3 @@ { | ||
"type": "module", | ||
"version": "1.0.38", | ||
"version": "1.0.39", | ||
"engines": { | ||
@@ -89,0 +89,0 @@ "node": ">=16.0.0" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
77421
34
1612