From ebe8c441eae82ad6f2512a017174d6ce440d1b09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6ran=20Sander?= Date: Sat, 30 Nov 2024 10:19:46 +0100 Subject: [PATCH 1/3] chore: Update dependencies to stay safe and secure --- package-lock.json | 140 ++++++++++++++++++++++++---------------------- package.json | 22 ++++---- 2 files changed, 84 insertions(+), 78 deletions(-) diff --git a/package-lock.json b/package-lock.json index 78536d0b..6c832d53 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "ajv": "^8.17.1", "ajv-keywords": "^5.1.0", "any-base": "^1.1.0", - "axios": "^1.7.7", + "axios": "^1.7.8", "commander": "^12.1.0", "config": "^3.3.12", "cron-job-manager": "^2.3.1", @@ -45,35 +45,35 @@ "mkdirp": "^3.0.1", "moment": "^2.30.1", "moment-precise-range-plugin": "^1.3.0", - "mqtt": "^5.10.1", + "mqtt": "^5.10.3", "ms-teams-wrapper": "^1.0.2", - "nodemailer": "^6.9.15", + "nodemailer": "^6.9.16", "nodemailer-express-handlebars": "^6.1.2", "npm-check": "^6.0.1", "os": "^0.1.2", - "posthog-node": "^4.2.1", + "posthog-node": "^4.3.1", "promise": "^8.3.0", "qrs-interact": "^6.3.1", "rate-limiter-flexible": "^5.0.4", "serializeapp": "^3.0.0", "systeminformation": "^5.23.5", "upath": "^2.0.1", - "uuid": "^10.0.0", - "winston": "^3.15.0", + "uuid": "^11.0.3", + "winston": "^3.17.0", "winston-daily-rotate-file": "^5.0.0", "ws": "^8.18.0", - "xstate": "^5.18.2" + "xstate": "^5.19.0" }, "devDependencies": { "@babel/eslint-parser": "^7.25.9", - "@babel/plugin-syntax-import-assertions": "^7.25.9", - "@eslint/js": "^9.13.0", + "@babel/plugin-syntax-import-assertions": "^7.26.0", + "@eslint/js": "^9.16.0", "esbuild": "^0.24.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.2.1", "jest": "^29.7.0", - "prettier": "^3.3.3", - "snyk": "^1.1294.0" + "prettier": "^3.4.1", + "snyk": "^1.1294.2" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -537,9 +537,9 @@ } }, "node_modules/@babel/plugin-syntax-import-assertions": { - "version": "7.25.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.25.9.tgz", - "integrity": "sha512-4GHX5uzr5QMOOuzV0an9MFju4hKlm0OyePl/lHhcsTVae5t/IKVHnb8W67Vr6FuLlk5lPqLB7n7O+K5R46emYg==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.26.0.tgz", + "integrity": "sha512-QCWT5Hh830hK5EQa7XzuqIkQU9tT/whqbDz7kuaZMHFl1inRRg7JnuAEOQ0Ur0QUl0NufCk1msK2BeY79Aj/eg==", "dev": true, "license": "MIT", "dependencies": { @@ -1286,9 +1286,9 @@ "peer": true }, "node_modules/@eslint/js": { - "version": "9.13.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.13.0.tgz", - "integrity": "sha512-IFLyoY4d72Z5y/6o/BazFBezupzI/taV8sGumxTAVw3lXG9A6md1Dc34T9s1FoD/an9pJH8RHbAxsaEbBed9lA==", + "version": "9.16.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.16.0.tgz", + "integrity": "sha512-tw2HxzQkrbeuvyj1tG2Yqq+0H9wGoI2IMk4EOsQeX+vmd75FtJAzf+gTA69WF+baUKRYQ3x2kbLE08js5OsTVg==", "dev": true, "license": "MIT", "engines": { @@ -2369,9 +2369,10 @@ "license": "MIT" }, "node_modules/@types/readable-stream": { - "version": "4.0.15", - "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-4.0.15.tgz", - "integrity": "sha512-oAZ3kw+kJFkEqyh7xORZOku1YAKvsFTogRY8kVl4vHpEKiDkfnSA/My8haRE7fvmix5Zyy+1pwzOi7yycGLBJw==", + "version": "4.0.18", + "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-4.0.18.tgz", + "integrity": "sha512-21jK/1j+Wg+7jVw1xnSwy/2Q1VgVjWuFssbYGTREPUBeZ+rqVFl2udq0IkxzPC0ZhOzVceUbyIACFZKLqKEBlA==", + "license": "MIT", "dependencies": { "@types/node": "*", "safe-buffer": "~5.1.1" @@ -2380,7 +2381,8 @@ "node_modules/@types/readable-stream/node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" }, "node_modules/@types/stack-utils": { "version": "2.0.3", @@ -2719,9 +2721,9 @@ } }, "node_modules/axios": { - "version": "1.7.7", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", - "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.8.tgz", + "integrity": "sha512-Uu0wb7KNqK2t5K+YQyVCLM76prD5sRFjKHbJYCP1J7JFGEQ6nN7HWn9+04LAeiJ3ji54lgS/gZCH1oxyrf1SPw==", "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", @@ -2861,9 +2863,10 @@ ] }, "node_modules/bl": { - "version": "6.0.14", - "resolved": "https://registry.npmjs.org/bl/-/bl-6.0.14.tgz", - "integrity": "sha512-TJfbvGdL7KFGxTsEbsED7avqpFdY56q9IW0/aiytyheJzxST/+Io6cx/4Qx0K2/u0BPRDs65mjaQzYvMZeNocQ==", + "version": "6.0.16", + "resolved": "https://registry.npmjs.org/bl/-/bl-6.0.16.tgz", + "integrity": "sha512-V/kz+z2Mx5/6qDfRCilmrukUXcXuCoXKg3/3hDvzKKoSUx8CJKudfIoT29XZc3UE9xBvxs5qictiHdprwtteEg==", + "license": "MIT", "dependencies": { "@types/readable-stream": "^4.0.0", "buffer": "^6.0.3", @@ -6984,9 +6987,9 @@ } }, "node_modules/logform": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/logform/-/logform-2.6.1.tgz", - "integrity": "sha512-CdaO738xRapbKIMVn2m4F6KTj4j7ooJ8POVnebSgKo3KBz5axNXRAL7ZdRjIV6NOr2Uf4vjtRkxrFETOioCqSA==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/logform/-/logform-2.7.0.tgz", + "integrity": "sha512-TFYA4jnP7PVbmlBIfhlSe+WKxs9dklXMTEGcBCIvLhE/Tn3H6Gk1norupVW7m5Cnd4bLcr08AytbyV/xj7f/kQ==", "license": "MIT", "dependencies": { "@colors/colors": "1.6.0", @@ -7338,9 +7341,9 @@ } }, "node_modules/mqtt": { - "version": "5.10.1", - "resolved": "https://registry.npmjs.org/mqtt/-/mqtt-5.10.1.tgz", - "integrity": "sha512-hXCOki8sANoQ7w+2OzJzg6qMBxTtrH9RlnVNV8panLZgnl+Gh0J/t4k6r8Az8+C7y3KAcyXtn0mmLixyUom8Sw==", + "version": "5.10.3", + "resolved": "https://registry.npmjs.org/mqtt/-/mqtt-5.10.3.tgz", + "integrity": "sha512-hA/6YrUS4fywhBGCjH/XXUuLeueJiPqruVVWjK2A24Ma4KcWfZ/x8x07aoesBV+HXDWBC08tbT4IWfSXNW0Jtw==", "license": "MIT", "dependencies": { "@types/readable-stream": "^4.0.5", @@ -7351,7 +7354,7 @@ "help-me": "^5.0.0", "lru-cache": "^10.0.1", "minimist": "^1.2.8", - "mqtt-packet": "^9.0.0", + "mqtt-packet": "^9.0.1", "number-allocator": "^1.0.14", "readable-stream": "^4.4.2", "reinterval": "^1.1.0", @@ -7370,9 +7373,10 @@ } }, "node_modules/mqtt-packet": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/mqtt-packet/-/mqtt-packet-9.0.0.tgz", - "integrity": "sha512-8v+HkX+fwbodsWAZIZTI074XIoxVBOmPeggQuDFCGg1SqNcC+uoRMWu7J6QlJPqIUIJXmjNYYHxBBLr1Y/Df4w==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/mqtt-packet/-/mqtt-packet-9.0.1.tgz", + "integrity": "sha512-koZF1V/X2RZUI6uD9wN5OK1JxxcG1ofAR4H3LjCw1FkeKzruZQ26aAA6v2m1lZyWONZIR5wMMJFrZJDRNzbiQw==", + "license": "MIT", "dependencies": { "bl": "^6.0.8", "debug": "^4.3.4", @@ -7485,9 +7489,9 @@ "dev": true }, "node_modules/nodemailer": { - "version": "6.9.15", - "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.9.15.tgz", - "integrity": "sha512-AHf04ySLC6CIfuRtRiEYtGEXgRfa6INgWGluDhnxTZhHSKvrBu7lc1VVchQ0d8nPc4cFaZoPq8vkyNoZr0TpGQ==", + "version": "6.9.16", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.9.16.tgz", + "integrity": "sha512-psAuZdTIRN08HKVd/E8ObdV6NO7NTBY3KsC30F7M4H1OnmLCUNaS56FpYxyb26zWLSyYF9Ozch9KYHhHegsiOQ==", "license": "MIT-0", "engines": { "node": ">=6.0.0" @@ -8154,9 +8158,9 @@ } }, "node_modules/posthog-node": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/posthog-node/-/posthog-node-4.2.1.tgz", - "integrity": "sha512-l+fsjYEkTik3m/G0pE7gMr4qBJP84LhK779oQm6MBzhBGpd4By4qieTW+4FUAlNCyzQTynn3Nhsa50c0IELSxQ==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/posthog-node/-/posthog-node-4.3.1.tgz", + "integrity": "sha512-By9SEGZxBLC7GVyVb+HlJlpxM/xI4iLUgwtsBS8f4bZ0wqYKiNHoYcFEwMJnTM9xQcQZztr6dqLmsJ7jCv0vxA==", "license": "MIT", "dependencies": { "axios": "^1.7.4", @@ -8201,9 +8205,9 @@ } }, "node_modules/prettier": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", - "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.1.tgz", + "integrity": "sha512-G+YdqtITVZmOJje6QkXQWzl3fSfMxFwm1tjTyo9exhkmWSqC4Yhd1+lug++IlR2mvRVAxEDDWYkQdeSztajqgg==", "dev": true, "license": "MIT", "bin": { @@ -8265,7 +8269,8 @@ "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "license": "MIT" }, "node_modules/process-warning": { "version": "3.0.0", @@ -9087,9 +9092,9 @@ } }, "node_modules/snyk": { - "version": "1.1294.0", - "resolved": "https://registry.npmjs.org/snyk/-/snyk-1.1294.0.tgz", - "integrity": "sha512-4RBj3Lfccz5+6L2Kw9bt7icF+ex3antwt9PkSl2oEulI7mgqvc8VUFLnezg8c6PY60IPM9DrSSmNjXBac10I3Q==", + "version": "1.1294.2", + "resolved": "https://registry.npmjs.org/snyk/-/snyk-1.1294.2.tgz", + "integrity": "sha512-m6F+go3Fj///rfL+qfGZAslYBFxVtCgZ5PkKcoRjewmbgfisfTFPP6/SyWV6fH54hb7k00t2EEHYO02vRD4g+g==", "dev": true, "hasInstallScript": true, "license": "Apache-2.0", @@ -9748,16 +9753,16 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "node_modules/uuid": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", - "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.0.3.tgz", + "integrity": "sha512-d0z310fCWv5dJwnX1Y/MncBAqGMKEzlBb1AOf7z9K8ALnd0utBX/msg/fA0+sbyN1ihbMsLhrBlnl1ak7Wa0rg==", "funding": [ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" ], "license": "MIT", "bin": { - "uuid": "dist/bin/uuid" + "uuid": "dist/esm/bin/uuid" } }, "node_modules/v8-to-istanbul": { @@ -9850,22 +9855,22 @@ } }, "node_modules/winston": { - "version": "3.15.0", - "resolved": "https://registry.npmjs.org/winston/-/winston-3.15.0.tgz", - "integrity": "sha512-RhruH2Cj0bV0WgNL+lOfoUBI4DVfdUNjVnJGVovWZmrcKtrFTTRzgXYK2O9cymSGjrERCtaAeHwMNnUWXlwZow==", + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.17.0.tgz", + "integrity": "sha512-DLiFIXYC5fMPxaRg832S6F5mJYvePtmO5G9v9IgUFPhXm9/GkXarH/TUrBAVzhTCzAj9anE/+GjrgXp/54nOgw==", "license": "MIT", "dependencies": { "@colors/colors": "^1.6.0", "@dabh/diagnostics": "^2.0.2", "async": "^3.2.3", "is-stream": "^2.0.0", - "logform": "^2.6.0", + "logform": "^2.7.0", "one-time": "^1.0.0", "readable-stream": "^3.4.0", "safe-stable-stringify": "^2.3.1", "stack-trace": "0.0.x", "triple-beam": "^1.3.0", - "winston-transport": "^4.7.0" + "winston-transport": "^4.9.0" }, "engines": { "node": ">= 12.0.0" @@ -9889,12 +9894,13 @@ } }, "node_modules/winston-transport": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.7.0.tgz", - "integrity": "sha512-ajBj65K5I7denzer2IYW6+2bNIVqLGDHqDw3Ow8Ohh+vdW+rv4MZ6eiDvHoKhfJFZ2auyN8byXieDDJ96ViONg==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.9.0.tgz", + "integrity": "sha512-8drMJ4rkgaPo1Me4zD/3WLfI/zPdA9o2IipKODunnGDcuqbHwjsbB79ylv04LCGGzU0xQ6vTznOMpQGaLhhm6A==", + "license": "MIT", "dependencies": { - "logform": "^2.3.2", - "readable-stream": "^3.6.0", + "logform": "^2.7.0", + "readable-stream": "^3.6.2", "triple-beam": "^1.3.0" }, "engines": { @@ -10045,9 +10051,9 @@ } }, "node_modules/xstate": { - "version": "5.18.2", - "resolved": "https://registry.npmjs.org/xstate/-/xstate-5.18.2.tgz", - "integrity": "sha512-hab5VOe29D0agy8/7dH1lGw+7kilRQyXwpaChoMu4fe6rDP+nsHYhDYKfS2O4iXE7myA98TW6qMEudj/8NXEkA==", + "version": "5.19.0", + "resolved": "https://registry.npmjs.org/xstate/-/xstate-5.19.0.tgz", + "integrity": "sha512-Juh1MjeRaVWr1IRxXYvQMMRFMrei6vq6+AfP6Zk9D9YV0ZuvubN0aM6s2ITwUrq+uWtP1NTO8kOZmsM/IqeOiQ==", "license": "MIT", "funding": { "type": "opencollective", diff --git a/package.json b/package.json index e3f1026f..52e22078 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "ajv": "^8.17.1", "ajv-keywords": "^5.1.0", "any-base": "^1.1.0", - "axios": "^1.7.7", + "axios": "^1.7.8", "commander": "^12.1.0", "config": "^3.3.12", "cron-job-manager": "^2.3.1", @@ -85,35 +85,35 @@ "mkdirp": "^3.0.1", "moment": "^2.30.1", "moment-precise-range-plugin": "^1.3.0", - "mqtt": "^5.10.1", + "mqtt": "^5.10.3", "ms-teams-wrapper": "^1.0.2", - "nodemailer": "^6.9.15", + "nodemailer": "^6.9.16", "nodemailer-express-handlebars": "^6.1.2", "npm-check": "^6.0.1", "os": "^0.1.2", - "posthog-node": "^4.2.1", + "posthog-node": "^4.3.1", "promise": "^8.3.0", "qrs-interact": "^6.3.1", "rate-limiter-flexible": "^5.0.4", "serializeapp": "^3.0.0", "systeminformation": "^5.23.5", "upath": "^2.0.1", - "uuid": "^10.0.0", - "winston": "^3.15.0", + "uuid": "^11.0.3", + "winston": "^3.17.0", "winston-daily-rotate-file": "^5.0.0", "ws": "^8.18.0", - "xstate": "^5.18.2" + "xstate": "^5.19.0" }, "devDependencies": { "@babel/eslint-parser": "^7.25.9", - "@babel/plugin-syntax-import-assertions": "^7.25.9", - "@eslint/js": "^9.13.0", + "@babel/plugin-syntax-import-assertions": "^7.26.0", + "@eslint/js": "^9.16.0", "esbuild": "^0.24.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.2.1", "jest": "^29.7.0", - "prettier": "^3.3.3", - "snyk": "^1.1294.0" + "prettier": "^3.4.1", + "snyk": "^1.1294.2" }, "pkg": { "assets": [ From d42f27d4ecb362892c353d1c09bb166dd0db4554 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6ran=20Sander?= Date: Sat, 30 Nov 2024 10:20:36 +0100 Subject: [PATCH 2/3] fix(qseow): Make writing reload script logs to disk more robust Fixes #1296 --- .vscode/launch.json | 70 +++++++++++++++++++------------------- src/lib/qseow/scriptlog.js | 14 ++++++++ 2 files changed, 49 insertions(+), 35 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 7f028041..fdb0ea9c 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,38 +1,38 @@ { - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "type": "node", - "request": "launch", - "name": "Launch Program", - "program": "${workspaceFolder}/src/butler.js", - // "runtimeVersion": "20", - "runtimeVersion": "18", - // "runtimeVersion": "23", - "cwd": "${workspaceFolder}/src", - "env": { - "NODE_CONFIG_DIR": "${workspaceFolder}/src/config", - "NODE_ENV": "production" - }, - "args": [ - "--configfile", - "config/production.yaml", - // "config/production_template.yaml", - // "--new-relic-account-name", - // "'First NR account'", - // "--new-relic-account-id", - // "ACCOUNTID", - // "--new-relic-api-key", - // "APIKEY", + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Launch Program", + "program": "${workspaceFolder}/src/butler.js", + // "runtimeVersion": "20", + "runtimeVersion": "18", + // "runtimeVersion": "23", + "cwd": "${workspaceFolder}/src", + "env": { + "NODE_CONFIG_DIR": "${workspaceFolder}/src/config", + "NODE_ENV": "production" + }, + "args": [ + "--configfile", + "config/production.yaml" + // "config/production_template.yaml", + // "--new-relic-account-name", + // "'First NR account'", + // "--new-relic-account-id", + // "ACCOUNTID", + // "--new-relic-api-key", + // "APIKEY", - // "-c", - // "./config/config-gen-api-docs.yaml", - // "--no-qs-connection" - ], - "outFiles": ["${workspaceFolder}/**/*.js"] - } - ] + // "-c", + // "./config/config-gen-api-docs.yaml", + // "--no-qs-connection" + ], + "outFiles": ["${workspaceFolder}/**/*.js"] + } + ] } diff --git a/src/lib/qseow/scriptlog.js b/src/lib/qseow/scriptlog.js index 62cad748..7077546a 100644 --- a/src/lib/qseow/scriptlog.js +++ b/src/lib/qseow/scriptlog.js @@ -318,6 +318,20 @@ export async function failedTaskStoreLogOnDisk(reloadParams) { ); globals.logger.info(`[QSEOW] SCRIPTLOG STORE: Writing failed task script log: ${fileName}`); + + // Do we have a script log to store? + if (!scriptLog.scriptLogFull) { + globals.logger.error('[QSEOW] SCRIPTLOG STORE: A script log should be available, but it is not. Possibly because the QRS API did not return one.'); + return false; + } else if (scriptLog.scriptLogFull.length === 0) { + globals.logger.error('[QSEOW] SCRIPTLOG STORE: A script log is available, but it is empty (zero rows in it).'); + return false; + } else if (scriptLog.scriptLogFull.length < 10) { + globals.logger.warn('[QSEOW] SCRIPTLOG STORE: A script log is available, but it is very short (less than 10 rows).'); + } else { + globals.logger.verbose(`[QSEOW] SCRIPTLOG STORE: Script log is available and has ${scriptLog.scriptLogFull.length} rows.`); + } + fs.writeFileSync(fileName, scriptLog.scriptLogFull.join('\n')); return true; } catch (err) { From 3e54c0a97a01047e2ffb5aa38dff0a417e78eb8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6ran=20Sander?= Date: Sat, 30 Nov 2024 10:29:28 +0100 Subject: [PATCH 3/3] fix(access-license): Make logging when releasing licenses less verbose Fixes #1303 --- src/lib/qseow/qliksense_license.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/qseow/qliksense_license.js b/src/lib/qseow/qliksense_license.js index 0e6a2746..fc8b9bb2 100644 --- a/src/lib/qseow/qliksense_license.js +++ b/src/lib/qseow/qliksense_license.js @@ -471,7 +471,7 @@ async function licenseReleaseProfessional(config, logger, qrsInstance) { // Should currentUser be released? if (!doNotRelease) { - logger.info( + logger.verbose( `[QSEOW] QLIKSENSE LICENSE RELEASE PROFESSIONAL: Adding user ${license.user.userDirectory}\\${license.user.userId} (days since last use: ${daysSinceLastUse}) to releaseProfessional array`, ); releaseProfessional.push({ @@ -752,7 +752,7 @@ async function licenseReleaseAnalyzer(config, logger, qrsInstance) { // Should currentUser be released? if (!doNotRelease) { - logger.info( + logger.verbose( `[QSEOW] QLIKSENSE LICENSE RELEASE ANALYZER: Adding user ${license.user.userDirectory}\\${license.user.userId} (days since last use: ${daysSinceLastUse}) to releaseAnalyzer array`, ); releaseAnalyzer.push({