From 6ab3c13ba2a1f57e6ec6302130ae7d2d642598a2 Mon Sep 17 00:00:00 2001 From: nsano-rururu Date: Tue, 9 Jan 2024 01:31:44 +0900 Subject: [PATCH] Bugfix etc Fix generate_kibana_discover_url is false Fix pagertree_proxy Code modification for vue3 compatibility axios 1.6.4 to 1.6.5 jsdom 23.0.1 to 23.2.0 add eslint-plugin-rulesdir --- .eslintrc.js | 124 +++++++++++- eslint/rules/custom1.js | 49 +++++ package-lock.json | 159 ++++++++++++--- package.json | 5 +- run_tests.sh | 12 +- src/components/config/ConfigDescription.vue | 10 +- .../config/ConfigKibanaDiscover.vue | 12 +- .../config/ConfigLimitExcecution.vue | 2 +- src/components/config/ConfigOwner.vue | 10 +- src/components/config/ConfigPriority.vue | 10 +- .../config/ConfigScanEntireTimeframe.vue | 8 +- .../config/ConfigTimeWindowFeature.vue | 2 +- .../config/alert/ConfigAlertAlerta.vue | 48 ++--- .../config/alert/ConfigAlertAlertmanager.vue | 34 +--- .../config/alert/ConfigAlertAmazonSes.vue | 24 +-- .../config/alert/ConfigAlertAmazonSns.vue | 14 +- .../config/alert/ConfigAlertChatwork.vue | 12 +- .../config/alert/ConfigAlertCommand.vue | 26 +-- .../config/alert/ConfigAlertDatadog.vue | 6 +- .../config/alert/ConfigAlertDingtalk.vue | 10 +- .../config/alert/ConfigAlertDiscord.vue | 14 +- .../config/alert/ConfigAlertEmail.vue | 34 ++-- .../config/alert/ConfigAlertExotel.vue | 12 +- .../config/alert/ConfigAlertGelf.vue | 24 +-- .../config/alert/ConfigAlertGitter.vue | 8 +- .../config/alert/ConfigAlertGoogleChat.vue | 14 +- .../config/alert/ConfigAlertHttpPost.vue | 22 +- .../config/alert/ConfigAlertHttpPost2.vue | 22 +- .../config/alert/ConfigAlertIris.vue | 46 ++--- .../config/alert/ConfigAlertJira.vue | 8 +- .../config/alert/ConfigAlertLark.vue | 2 +- .../config/alert/ConfigAlertLineNotify.vue | 4 +- .../config/alert/ConfigAlertMattermost.vue | 48 ++--- .../config/alert/ConfigAlertMsTeams.vue | 40 ++-- .../config/alert/ConfigAlertOpsgenie.vue | 18 +- .../config/alert/ConfigAlertPagerDuty.vue | 30 ++- .../config/alert/ConfigAlertPagerTree.vue | 8 +- .../config/alert/ConfigAlertRocketChat.vue | 38 ++-- .../config/alert/ConfigAlertServiceNow.vue | 28 +-- .../config/alert/ConfigAlertSlack.vue | 68 +++---- .../config/alert/ConfigAlertStomp.vue | 12 +- .../config/alert/ConfigAlertSubjectBody.vue | 2 +- .../config/alert/ConfigAlertTelegram.vue | 14 +- .../config/alert/ConfigAlertTencentSms.vue | 14 +- .../config/alert/ConfigAlertTheHive.vue | 24 +-- .../config/alert/ConfigAlertTwilio.vue | 12 +- .../config/alert/ConfigAlertVictorOps.vue | 14 +- .../config/alert/ConfigAlertZabbix.vue | 18 +- src/main.js | 189 +++++++++++++++++- src/store/config/alert.js | 2 +- src/store/config/index.js | 101 +++++----- tests/unit/mockData/alert/ruleDataIris002.js | 1 - .../ConfigYamlScanEntireTimefame.spec.js | 1 - .../unit/specs/alert/ConfigYamlAlerta.spec.js | 1 - .../specs/alert/ConfigYamlAlerta002.spec.js | 1 - .../specs/alert/ConfigYamlAlertaOpt.spec.js | 1 - .../alert/ConfigYamlAlertmanager.spec.js | 1 - .../alert/ConfigYamlAlertmanager002.spec.js | 1 - .../specs/alert/ConfigYamlChatwork.spec.js | 1 - .../specs/alert/ConfigYamlCommand.spec.js | 1 - .../specs/alert/ConfigYamlDataDatadog.spec.js | 1 - .../specs/alert/ConfigYamlDingtalk.spec.js | 1 - .../specs/alert/ConfigYamlDingtalk002.spec.js | 1 - .../specs/alert/ConfigYamlDingtalk003.spec.js | 1 - .../specs/alert/ConfigYamlDingtalk004.spec.js | 1 - .../specs/alert/ConfigYamlDiscord.spec.js | 1 - .../specs/alert/ConfigYamlDiscordOpt.spec.js | 1 - .../unit/specs/alert/ConfigYamlEmail.spec.js | 1 - .../specs/alert/ConfigYamlEmail002.spec.js | 1 - .../unit/specs/alert/ConfigYamlExotel.spec.js | 1 - .../specs/alert/ConfigYamlGelf001.spec.js | 1 - .../specs/alert/ConfigYamlGelf002.spec.js | 1 - .../unit/specs/alert/ConfigYamlGitter.spec.js | 1 - .../specs/alert/ConfigYamlGitterOpt.spec.js | 1 - .../specs/alert/ConfigYamlGoogleChat.spec.js | 1 - .../alert/ConfigYamlGoogleChat002.spec.js | 1 - .../specs/alert/ConfigYamlHttpPost.spec.js | 1 - .../specs/alert/ConfigYamlHttpPost002.spec.js | 1 - .../specs/alert/ConfigYamlHttpPost2.spec.js | 1 - .../alert/ConfigYamlHttpPost2Opt.spec.js | 1 - .../specs/alert/ConfigYamlHttpPostOpt.spec.js | 1 - tests/unit/specs/alert/ConfigYamlIris.spec.js | 1 - .../specs/alert/ConfigYamlIris002.spec.js | 1 - tests/unit/specs/alert/ConfigYamlJira.spec.js | 1 - tests/unit/specs/alert/ConfigYamlLark.spec.js | 1 - .../specs/alert/ConfigYamlLineNotify.spec.js | 1 - .../specs/alert/ConfigYamlMattermost.spec.js | 4 - .../specs/alert/ConfigYamlMsTeams.spec.js | 3 - .../specs/alert/ConfigYamlOpsgenie.spec.js | 1 - .../specs/alert/ConfigYamlOpsgenie002.spec.js | 1 - .../specs/alert/ConfigYamlOpsgenie003.spec.js | 1 - .../specs/alert/ConfigYamlOpsgenie004.spec.js | 1 - .../specs/alert/ConfigYamlOpsgenie005.spec.js | 1 - .../specs/alert/ConfigYamlOpsgenie006.spec.js | 1 - .../specs/alert/ConfigYamlPagerDuty.spec.js | 1 - .../alert/ConfigYamlPagerDuty002.spec.js | 1 - .../alert/ConfigYamlPagerDuty003.spec.js | 1 - .../alert/ConfigYamlPagerDuty004.spec.js | 1 - .../alert/ConfigYamlPagerDuty005.spec.js | 1 - .../specs/alert/ConfigYamlPagerTree.spec.js | 1 - .../specs/alert/ConfigYamlRocketChat.spec.js | 4 - .../specs/alert/ConfigYamlServiceNow.spec.js | 1 - tests/unit/specs/alert/ConfigYamlSes.spec.js | 1 - .../specs/alert/ConfigYamlSesProfile.spec.js | 1 - .../unit/specs/alert/ConfigYamlSlack.spec.js | 5 - tests/unit/specs/alert/ConfigYamlSns.spec.js | 1 - .../specs/alert/ConfigYamlSnsProfile.spec.js | 1 - .../unit/specs/alert/ConfigYamlStomp.spec.js | 1 - .../ConfigYamlStompModRequiredAndOpt.spec.js | 1 - .../specs/alert/ConfigYamlTelegram001.spec.js | 1 - .../specs/alert/ConfigYamlTelegram002.spec.js | 1 - .../specs/alert/ConfigYamlTelegram003.spec.js | 1 - .../specs/alert/ConfigYamlTencentSms.spec.js | 1 - .../alert/ConfigYamlTencentSmsOpt.spec.js | 1 - .../specs/alert/ConfigYamlTheHive.spec.js | 1 - .../specs/alert/ConfigYamlTheHiveOpt.spec.js | 1 - .../alert/ConfigYamlTwilioCopilot.spec.js | 1 - .../specs/alert/ConfigYamlTwilioSms.spec.js | 1 - .../specs/alert/ConfigYamlVictorOps.spec.js | 1 - .../alert/ConfigYamlVictorOpsOpt.spec.js | 1 - .../unit/specs/alert/ConfigYamlZabbix.spec.js | 1 - .../ConfigYamlZabbixSenderHostPort.spec.js | 1 - 122 files changed, 875 insertions(+), 675 deletions(-) create mode 100644 eslint/rules/custom1.js diff --git a/.eslintrc.js b/.eslintrc.js index c2512681..aa69f097 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,11 +1,19 @@ +const rulesDirPlugin = require('eslint-plugin-rulesdir'); + +rulesDirPlugin.RULES_DIR = 'eslint/rules'; + module.exports = { root: true, env: { node: true, mocha: true }, - extends: ['plugin:vue/recommended', '@vue/eslint-config-airbnb'], + extends: ['plugin:vue/vue3-recommended', '@vue/eslint-config-airbnb'], + plugins: [ + 'rulesdir' + ], rules: { + 'rulesdir/custom1': 'off', 'vue/max-len': 'off', 'import/no-unresolved': 'off', 'vuejs-accessibility/rule-name': 'off', @@ -62,10 +70,120 @@ module.exports = { singleline: 'never', multiline: 'never' } - ] + ], + 'no-restricted-imports': [ + 'error', + { + 'paths': [ + { + 'name': 'vue', + 'importNames': ['default'] + }, + ], + }, + ], }, parserOptions: { parser: '@babel/eslint-parser', requireConfigFile: false - } + }, + overrides: [ + // TODO: Vue3 Support + { + files: [ + '.eslintrc.js', + ], + rules: { + 'quote-props': 'off', + }, + }, + // TODO: Vue3 Support + { + files: [ + 'src/App.vue', + ], + rules: { + 'vue/v-on-event-hyphenation': 'off', + }, + }, + // TODO: Vue3 Support + { + files: [ + 'src/components/DateTime.vue', + 'src/components/config/ConfigTest.vue', + 'src/views/ConfigBuilder.vue', + ], + rules: { + 'vue/no-deprecated-destroyed-lifecycle': 'off', + }, + }, + // TODO: Vue3 Support + { + files: [ + 'src/components/ElastalertTimePicker.vue', + 'src/components/NavTree.vue', + 'src/components/config/ConfigCondition.vue', + 'src/components/config/ConfigKibanaDiscover.vue', + 'src/components/config/ConfigQuery.vue', + 'src/components/config/ConfigSettings.vue', + 'src/components/config/alert/ConfigAlert.vue', + 'src/components/config/alert/ConfigAlertAlerta.vue', + 'src/components/config/alert/ConfigAlertCommand.vue', + 'src/components/config/alert/ConfigAlertGoogleChat.vue', + 'src/components/config/alert/ConfigAlertHttpPost.vue', + 'src/components/config/alert/ConfigAlertHttpPost2.vue', + 'src/components/config/alert/ConfigAlertMattermost.vue', + 'src/components/config/alert/ConfigAlertMsTeams.vue', + 'src/components/config/alert/ConfigAlertPagerDuty.vue', + 'src/components/config/alert/ConfigAlertRocketChat.vue', + 'src/components/config/alert/ConfigAlertSlack.vue', + 'src/components/config/alert/ConfigAlertSubjectBody.vue', + 'src/components/config/alert/ConfigAlertTencentSms.vue', + 'src/components/config/alert/ConfigAlertTheHive.vue', + 'src/views/RuleView.vue', + 'src/views/TemplateView.vue' + ], + rules: { + 'vue/no-deprecated-v-on-native-modifier': 'off', + }, + }, + // TODO: Vue3 Support + { + files: [ + 'src/components/ESChart.vue', + 'src/contrib.js', + 'src/main.js', + 'src/registration.js', + 'src/router.js', + 'src/store/config/match.js', + 'src/store/config/settings.js', + 'src/store/configs.js', + 'src/store/index.js', + 'src/store/metadata.js' + ], + rules: { + 'no-restricted-imports': 'off', + }, + }, + // TODO: Vue3 Support + { + files: [ + 'src/components/config/ConfigCondition.vue', + 'src/views/RuleView.vue', + 'src/views/TemplateView.vue' + ], + rules: { + 'vue/no-deprecated-v-bind-sync': 'off', + }, + }, + // TODO: Vue3 Support + { + files: [ + 'src/views/ConfigBuilder.vue' + ], + rules: { + 'vue/v-on-event-hyphenation': 'off', + }, + }, + ] }; diff --git a/eslint/rules/custom1.js b/eslint/rules/custom1.js new file mode 100644 index 00000000..ec10d280 --- /dev/null +++ b/eslint/rules/custom1.js @@ -0,0 +1,49 @@ +'use strict' + +const utils = require('eslint-plugin-vue/lib/utils') + +module.exports = { + meta: { + type: 'problem', + docs: { + description: + 'disallow using v-model for custom component is affected by a breaking change in Vue 3.', + categories: undefined, + url: 'https://v3-migration.vuejs.org/ja/breaking-changes/v-model.html', + }, + fixable: null, + schema: [ + { + type: 'object', + properties: { + ignoreComponentNames: { + type: 'array', + }, + }, + }, + ], + messages: { + error: + 'カスタムコンポーネントへのv-modelの使用は、Vue 3の破壊的変更の影響を受けるので使用しないでください。\nhttps://v3-migration.vuejs.org/ja/breaking-changes/v-model.html', + }, + }, + /** @param {RuleContext} context */ + create(context) { + const ignoreComponentNames = context.options[0]?.ignoreComponentNames ?? [] + return utils.defineTemplateBodyVisitor(context, { + "VAttribute[directive=true][key.name.name='model']"(node) { + const element = node.parent.parent + if ( + utils.isCustomComponent(node.parent.parent) && + !ignoreComponentNames.includes(element.name) + ) { + context.report({ + node, + loc: node.loc, + messageId: 'error', + }) + } + }, + }) + }, +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index e6fa1a38..15d53f21 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@fortawesome/vue-fontawesome": "2.0.10", "@riophae/vue-treeselect": "0.4.0", "@vue-js-cron/light": "^1.0.5", - "axios": "1.6.4", + "axios": "1.6.5", "browser-bunyan": "1.8.0", "canvas": "^2.11.2", "change-case": "4.1.2", @@ -75,8 +75,9 @@ "eslint": "^8.56.0", "eslint-plugin-cypress": "^2.15.1", "eslint-plugin-import": "^2.29.1", + "eslint-plugin-rulesdir": "^0.2.2", "eslint-plugin-vue": "^9.19.2", - "jsdom": "23.0.1", + "jsdom": "23.2.0", "localstorage-polyfill": "1.0.1", "mutationobserver-simple-polyfill": "0.0.2", "nyc": "15.1.0", @@ -119,6 +120,36 @@ "node": ">=6.0.0" } }, + "node_modules/@asamuzakjp/dom-selector": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@asamuzakjp/dom-selector/-/dom-selector-2.0.1.tgz", + "integrity": "sha512-QJAJffmCiymkv6YyQ7voyQb5caCth6jzZsQncYCpHXrJ7RqdYG5y43+is8mnFcYubdOkr7cn1+na9BdFMxqw7w==", + "dev": true, + "dependencies": { + "bidi-js": "^1.0.3", + "css-tree": "^2.3.1", + "is-potential-custom-element-name": "^1.0.1" + } + }, + "node_modules/@asamuzakjp/dom-selector/node_modules/css-tree": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", + "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", + "dev": true, + "dependencies": { + "mdn-data": "2.0.30", + "source-map-js": "^1.0.1" + }, + "engines": { + "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" + } + }, + "node_modules/@asamuzakjp/dom-selector/node_modules/mdn-data": { + "version": "2.0.30", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", + "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==", + "dev": true + }, "node_modules/@babel/code-frame": { "version": "7.23.5", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", @@ -4666,9 +4697,9 @@ } }, "node_modules/axios": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.4.tgz", - "integrity": "sha512-heJnIs6N4aa1eSthhN9M5ioILu8Wi8vmQW9iHQ9NUvfkJb0lEEDUiIdQNAuBtfUt3FxReaKdpQA5DbmMOqzF/A==", + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.5.tgz", + "integrity": "sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg==", "dependencies": { "follow-redirects": "^1.15.4", "form-data": "^4.0.0", @@ -4907,6 +4938,15 @@ "tweetnacl": "^0.14.3" } }, + "node_modules/bidi-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/bidi-js/-/bidi-js-1.0.3.tgz", + "integrity": "sha512-RKshQI1R3YQ+n9YJz2QQ147P66ELpa1FQEg20Dk8oW9t2KgLbpDLLp9aGZ7y8WHSshDknG0bknqGw5/tyCs5tw==", + "dev": true, + "dependencies": { + "require-from-string": "^2.0.2" + } + }, "node_modules/big.js": { "version": "5.2.2", "dev": true, @@ -8406,6 +8446,15 @@ "semver": "bin/semver.js" } }, + "node_modules/eslint-plugin-rulesdir": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-rulesdir/-/eslint-plugin-rulesdir-0.2.2.tgz", + "integrity": "sha512-qhBtmrWgehAIQeMDJ+Q+PnOz1DWUZMPeVrI0wE9NZtnpIMFUfh3aPKFYt2saeMSemZRrvUtjWfYwepsC8X+mjQ==", + "dev": true, + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/eslint-plugin-vue": { "version": "9.19.2", "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.19.2.tgz", @@ -11353,12 +11402,13 @@ "dev": true }, "node_modules/jsdom": { - "version": "23.0.1", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-23.0.1.tgz", - "integrity": "sha512-2i27vgvlUsGEBO9+/kJQRbtqtm+191b5zAZrU/UezVmnC2dlDAFLgDYJvAEi94T4kjsRKkezEtLQTgsNEsW2lQ==", + "version": "23.2.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-23.2.0.tgz", + "integrity": "sha512-L88oL7D/8ufIES+Zjz7v0aes+oBMh2Xnh3ygWvL0OaICOomKEPKuPnIfBJekiXr+BHbbMjrWn/xqrDQuxFTeyA==", "dev": true, "dependencies": { - "cssstyle": "^3.0.0", + "@asamuzakjp/dom-selector": "^2.0.1", + "cssstyle": "^4.0.1", "data-urls": "^5.0.0", "decimal.js": "^10.4.3", "form-data": "^4.0.0", @@ -11366,7 +11416,6 @@ "http-proxy-agent": "^7.0.0", "https-proxy-agent": "^7.0.2", "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.7", "parse5": "^7.1.2", "rrweb-cssom": "^0.6.0", "saxes": "^6.0.0", @@ -11377,7 +11426,7 @@ "whatwg-encoding": "^3.1.1", "whatwg-mimetype": "^4.0.0", "whatwg-url": "^14.0.0", - "ws": "^8.14.2", + "ws": "^8.16.0", "xml-name-validator": "^5.0.0" }, "engines": { @@ -11413,15 +11462,15 @@ } }, "node_modules/jsdom/node_modules/cssstyle": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-3.0.0.tgz", - "integrity": "sha512-N4u2ABATi3Qplzf0hWbVCdjenim8F3ojEXpBDF5hBpjzW182MjNGLqfmQ0SkSPeQ+V86ZXgeH8aXj6kayd4jgg==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.0.1.tgz", + "integrity": "sha512-8ZYiJ3A/3OkDd093CBT/0UKDWry7ak4BdPTFP2+QEP7cmhouyq/Up709ASSj2cK02BbZiMgk7kYjZNS4QP5qrQ==", "dev": true, "dependencies": { "rrweb-cssom": "^0.6.0" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/jsdom/node_modules/entities": { @@ -11567,9 +11616,9 @@ } }, "node_modules/jsdom/node_modules/ws": { - "version": "8.15.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.15.0.tgz", - "integrity": "sha512-H/Z3H55mrcrgjFwI+5jKavgXvwQLtfPCUEp6pi35VhoB0pfcHnSoyuTzkBEZpzq49g1193CUEwIvmsjcotenYw==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", + "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", "dev": true, "engines": { "node": ">=10.0.0" @@ -19494,6 +19543,35 @@ "@jridgewell/trace-mapping": "^0.3.9" } }, + "@asamuzakjp/dom-selector": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@asamuzakjp/dom-selector/-/dom-selector-2.0.1.tgz", + "integrity": "sha512-QJAJffmCiymkv6YyQ7voyQb5caCth6jzZsQncYCpHXrJ7RqdYG5y43+is8mnFcYubdOkr7cn1+na9BdFMxqw7w==", + "dev": true, + "requires": { + "bidi-js": "^1.0.3", + "css-tree": "^2.3.1", + "is-potential-custom-element-name": "^1.0.1" + }, + "dependencies": { + "css-tree": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", + "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", + "dev": true, + "requires": { + "mdn-data": "2.0.30", + "source-map-js": "^1.0.1" + } + }, + "mdn-data": { + "version": "2.0.30", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", + "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==", + "dev": true + } + } + }, "@babel/code-frame": { "version": "7.23.5", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", @@ -22855,9 +22933,9 @@ "dev": true }, "axios": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.4.tgz", - "integrity": "sha512-heJnIs6N4aa1eSthhN9M5ioILu8Wi8vmQW9iHQ9NUvfkJb0lEEDUiIdQNAuBtfUt3FxReaKdpQA5DbmMOqzF/A==", + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.5.tgz", + "integrity": "sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg==", "requires": { "follow-redirects": "^1.15.4", "form-data": "^4.0.0", @@ -23040,6 +23118,15 @@ "tweetnacl": "^0.14.3" } }, + "bidi-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/bidi-js/-/bidi-js-1.0.3.tgz", + "integrity": "sha512-RKshQI1R3YQ+n9YJz2QQ147P66ELpa1FQEg20Dk8oW9t2KgLbpDLLp9aGZ7y8WHSshDknG0bknqGw5/tyCs5tw==", + "dev": true, + "requires": { + "require-from-string": "^2.0.2" + } + }, "big.js": { "version": "5.2.2", "dev": true @@ -25791,6 +25878,12 @@ } } }, + "eslint-plugin-rulesdir": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-rulesdir/-/eslint-plugin-rulesdir-0.2.2.tgz", + "integrity": "sha512-qhBtmrWgehAIQeMDJ+Q+PnOz1DWUZMPeVrI0wE9NZtnpIMFUfh3aPKFYt2saeMSemZRrvUtjWfYwepsC8X+mjQ==", + "dev": true + }, "eslint-plugin-vue": { "version": "9.19.2", "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.19.2.tgz", @@ -27603,12 +27696,13 @@ "dev": true }, "jsdom": { - "version": "23.0.1", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-23.0.1.tgz", - "integrity": "sha512-2i27vgvlUsGEBO9+/kJQRbtqtm+191b5zAZrU/UezVmnC2dlDAFLgDYJvAEi94T4kjsRKkezEtLQTgsNEsW2lQ==", + "version": "23.2.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-23.2.0.tgz", + "integrity": "sha512-L88oL7D/8ufIES+Zjz7v0aes+oBMh2Xnh3ygWvL0OaICOomKEPKuPnIfBJekiXr+BHbbMjrWn/xqrDQuxFTeyA==", "dev": true, "requires": { - "cssstyle": "^3.0.0", + "@asamuzakjp/dom-selector": "^2.0.1", + "cssstyle": "^4.0.1", "data-urls": "^5.0.0", "decimal.js": "^10.4.3", "form-data": "^4.0.0", @@ -27616,7 +27710,6 @@ "http-proxy-agent": "^7.0.0", "https-proxy-agent": "^7.0.2", "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.7", "parse5": "^7.1.2", "rrweb-cssom": "^0.6.0", "saxes": "^6.0.0", @@ -27627,7 +27720,7 @@ "whatwg-encoding": "^3.1.1", "whatwg-mimetype": "^4.0.0", "whatwg-url": "^14.0.0", - "ws": "^8.14.2", + "ws": "^8.16.0", "xml-name-validator": "^5.0.0" }, "dependencies": { @@ -27641,9 +27734,9 @@ } }, "cssstyle": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-3.0.0.tgz", - "integrity": "sha512-N4u2ABATi3Qplzf0hWbVCdjenim8F3ojEXpBDF5hBpjzW182MjNGLqfmQ0SkSPeQ+V86ZXgeH8aXj6kayd4jgg==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.0.1.tgz", + "integrity": "sha512-8ZYiJ3A/3OkDd093CBT/0UKDWry7ak4BdPTFP2+QEP7cmhouyq/Up709ASSj2cK02BbZiMgk7kYjZNS4QP5qrQ==", "dev": true, "requires": { "rrweb-cssom": "^0.6.0" @@ -27752,9 +27845,9 @@ } }, "ws": { - "version": "8.15.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.15.0.tgz", - "integrity": "sha512-H/Z3H55mrcrgjFwI+5jKavgXvwQLtfPCUEp6pi35VhoB0pfcHnSoyuTzkBEZpzq49g1193CUEwIvmsjcotenYw==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", + "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", "dev": true, "requires": {} }, diff --git a/package.json b/package.json index c2eefcbc..d6a3bee8 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "@fortawesome/vue-fontawesome": "2.0.10", "@riophae/vue-treeselect": "0.4.0", "@vue-js-cron/light": "^1.0.5", - "axios": "1.6.4", + "axios": "1.6.5", "browser-bunyan": "1.8.0", "canvas": "^2.11.2", "change-case": "4.1.2", @@ -82,8 +82,9 @@ "eslint": "^8.56.0", "eslint-plugin-cypress": "^2.15.1", "eslint-plugin-import": "^2.29.1", + "eslint-plugin-rulesdir": "^0.2.2", "eslint-plugin-vue": "^9.19.2", - "jsdom": "23.0.1", + "jsdom": "23.2.0", "localstorage-polyfill": "1.0.1", "mutationobserver-simple-polyfill": "0.0.2", "nyc": "15.1.0", diff --git a/run_tests.sh b/run_tests.sh index e8da042a..a6e26519 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -26,21 +26,20 @@ ./node_modules/.bin/vue-cli-service test:unit tests/unit/specs/alert/ConfigYamlGitterOpt.spec.js && ./node_modules/.bin/vue-cli-service test:unit tests/unit/specs/alert/ConfigYamlGoogleChat.spec.js && ./node_modules/.bin/vue-cli-service test:unit tests/unit/specs/alert/ConfigYamlGoogleChat002.spec.js && -./node_modules/.bin/vue-cli-service test:unit tests/unit/specs/alert/ConfigYamlIris.spec.js && -./node_modules/.bin/vue-cli-service test:unit tests/unit/specs/alert/ConfigYamlIris002.spec.js && -./node_modules/.bin/vue-cli-service test:unit tests/unit/specs/alert/ConfigYamlJira.spec.js && -./node_modules/.bin/vue-cli-service test:unit tests/unit/specs/alert/ConfigYamlLark.spec.js && -./node_modules/.bin/vue-cli-service test:unit tests/unit/specs/alert/ConfigYamlLineNotify.spec.js && ./node_modules/.bin/vue-cli-service test:unit tests/unit/specs/alert/ConfigYamlHttpPost.spec.js && ./node_modules/.bin/vue-cli-service test:unit tests/unit/specs/alert/ConfigYamlHttpPost002.spec.js && ./node_modules/.bin/vue-cli-service test:unit tests/unit/specs/alert/ConfigYamlHttpPostOpt.spec.js && ./node_modules/.bin/vue-cli-service test:unit tests/unit/specs/alert/ConfigYamlHttpPost2.spec.js && ./node_modules/.bin/vue-cli-service test:unit tests/unit/specs/alert/ConfigYamlHttpPost2Opt.spec.js && +./node_modules/.bin/vue-cli-service test:unit tests/unit/specs/alert/ConfigYamlIris.spec.js && +./node_modules/.bin/vue-cli-service test:unit tests/unit/specs/alert/ConfigYamlIris002.spec.js && +./node_modules/.bin/vue-cli-service test:unit tests/unit/specs/alert/ConfigYamlJira.spec.js && +./node_modules/.bin/vue-cli-service test:unit tests/unit/specs/alert/ConfigYamlLark.spec.js && +./node_modules/.bin/vue-cli-service test:unit tests/unit/specs/alert/ConfigYamlLineNotify.spec.js && ./node_modules/.bin/vue-cli-service test:unit tests/unit/specs/alert/ConfigYamlMattermost.spec.js && ./node_modules/.bin/vue-cli-service test:unit tests/unit/specs/alert/ConfigYamlMattermost002.spec.js && ./node_modules/.bin/vue-cli-service test:unit tests/unit/specs/alert/ConfigYamlMsTeams.spec.js && ./node_modules/.bin/vue-cli-service test:unit tests/unit/specs/alert/ConfigYamlMsTeamsOpt.spec.js && -./node_modules/.bin/vue-cli-service test:unit tests/unit/specs/alert/ConfigYamlPagerTree.spec.js && ./node_modules/.bin/vue-cli-service test:unit tests/unit/specs/alert/ConfigYamlOpsgenie.spec.js && ./node_modules/.bin/vue-cli-service test:unit tests/unit/specs/alert/ConfigYamlOpsgenie002.spec.js && ./node_modules/.bin/vue-cli-service test:unit tests/unit/specs/alert/ConfigYamlOpsgenie003.spec.js && @@ -52,6 +51,7 @@ ./node_modules/.bin/vue-cli-service test:unit tests/unit/specs/alert/ConfigYamlPagerDuty003.spec.js && ./node_modules/.bin/vue-cli-service test:unit tests/unit/specs/alert/ConfigYamlPagerDuty004.spec.js && ./node_modules/.bin/vue-cli-service test:unit tests/unit/specs/alert/ConfigYamlPagerDuty005.spec.js && +./node_modules/.bin/vue-cli-service test:unit tests/unit/specs/alert/ConfigYamlPagerTree.spec.js && ./node_modules/.bin/vue-cli-service test:unit tests/unit/specs/alert/ConfigYamlRocketChat.spec.js && ./node_modules/.bin/vue-cli-service test:unit tests/unit/specs/alert/ConfigYamlRocketChat002.spec.js && ./node_modules/.bin/vue-cli-service test:unit tests/unit/specs/alert/ConfigYamlServiceNow.spec.js && diff --git a/src/components/config/ConfigDescription.vue b/src/components/config/ConfigDescription.vue index 3d670c0a..9e9ad913 100644 --- a/src/components/config/ConfigDescription.vue +++ b/src/components/config/ConfigDescription.vue @@ -3,7 +3,7 @@