renovate-log-parser 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +402 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +30 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/analyze.d.ts +24 -0
- package/dist/commands/analyze.js +114 -0
- package/dist/commands/analyze.js.map +1 -0
- package/dist/commands/detect-errors.d.ts +17 -0
- package/dist/commands/detect-errors.js +119 -0
- package/dist/commands/detect-errors.js.map +1 -0
- package/dist/commands/install-analyze-skill.d.ts +27 -0
- package/dist/commands/install-analyze-skill.js +181 -0
- package/dist/commands/install-analyze-skill.js.map +1 -0
- package/dist/commands/web.d.ts +12 -0
- package/dist/commands/web.js +103 -0
- package/dist/commands/web.js.map +1 -0
- package/dist/core/analyzer.d.ts +89 -0
- package/dist/core/analyzer.js +179 -0
- package/dist/core/analyzer.js.map +1 -0
- package/dist/core/error-detector.d.ts +56 -0
- package/dist/core/error-detector.js +236 -0
- package/dist/core/error-detector.js.map +1 -0
- package/dist/core/filters.d.ts +136 -0
- package/dist/core/filters.js +95 -0
- package/dist/core/filters.js.map +1 -0
- package/dist/core/ignore-file.d.ts +52 -0
- package/dist/core/ignore-file.js +104 -0
- package/dist/core/ignore-file.js.map +1 -0
- package/dist/core/levels.d.ts +33 -0
- package/dist/core/levels.js +35 -0
- package/dist/core/levels.js.map +1 -0
- package/dist/core/parser.d.ts +57 -0
- package/dist/core/parser.js +201 -0
- package/dist/core/parser.js.map +1 -0
- package/dist/core/query-builder.d.ts +47 -0
- package/dist/core/query-builder.js +155 -0
- package/dist/core/query-builder.js.map +1 -0
- package/dist/core/skill-template.d.ts +34 -0
- package/dist/core/skill-template.js +259 -0
- package/dist/core/skill-template.js.map +1 -0
- package/package.json +68 -0
- package/web/.output/nitro.json +15 -0
- package/web/.output/public/_fonts/57NSSoFy1VLVs2gqly8Ls9awBnZMFyXGrefpmqvdqmc-zJfbBtpgM4cDmcXBsqZNW79_kFnlpPd62b48glgdydA.woff2 +0 -0
- package/web/.output/public/_fonts/8VR2wSMN-3U4NbWAVYXlkRV6hA0jFBXP-0RtL3X7fko-x2gYI4qfmkRdxyQQUPaBZdZdgl1TeVrquF_TxHeM4lM.woff2 +0 -0
- package/web/.output/public/_fonts/GsKUclqeNLJ96g5AU593ug6yanivOiwjW_7zESNPChw-jHA4tBeM1bjF7LATGUpfBuSTyomIFrWBTzjF7txVYfg.woff2 +0 -0
- package/web/.output/public/_fonts/Ld1FnTo3yTIwDyGfTQ5-Fws9AWsCbKfMvgxduXr7JcY-W25bL8NF1fjpLRSOgJb7RoZPHqGQNwMTM7S9tHVoxx8.woff2 +0 -0
- package/web/.output/public/_fonts/NdzqRASp2bovDUhQT1IRE_EMqKJ2KYQdTCfFcBvL8yw-KhwZiS86o3fErOe5GGMExHUemmI_dBfaEFxjISZrBd0.woff2 +0 -0
- package/web/.output/public/_fonts/iTkrULNFJJkTvihIg1Vqi5IODRH_9btXCioVF5l98I8-AndUyau2HR2felA_ra8V2mutQgschhasE5FD1dXGJX8.woff2 +0 -0
- package/web/.output/public/_nuxt/BWja8e3M.js +37 -0
- package/web/.output/public/_nuxt/BgApMHS1.js +1 -0
- package/web/.output/public/_nuxt/CGPWRqbc.js +1 -0
- package/web/.output/public/_nuxt/DlAUqK2U.js +1 -0
- package/web/.output/public/_nuxt/Sgtec1U0.js +1 -0
- package/web/.output/public/_nuxt/builds/latest.json +1 -0
- package/web/.output/public/_nuxt/builds/meta/c4723e49-0623-47af-ae79-9ab6428bdcc1.json +1 -0
- package/web/.output/public/_nuxt/entry.9mB-pyEY.css +1 -0
- package/web/.output/public/_nuxt/error-404.B_PvSG-P.css +1 -0
- package/web/.output/public/_nuxt/error-500.CghkKCEr.css +1 -0
- package/web/.output/public/_nuxt/index.BlvAG7F6.css +1 -0
- package/web/.output/public/favicon.ico +0 -0
- package/web/.output/server/chunks/_/error-500.mjs +19 -0
- package/web/.output/server/chunks/_/error-500.mjs.map +1 -0
- package/web/.output/server/chunks/_/icons.mjs +6153 -0
- package/web/.output/server/chunks/_/icons.mjs.map +1 -0
- package/web/.output/server/chunks/_/icons2.mjs +11494 -0
- package/web/.output/server/chunks/_/icons2.mjs.map +1 -0
- package/web/.output/server/chunks/build/_plugin-vue_export-helper-1tPrXgE0.mjs +10 -0
- package/web/.output/server/chunks/build/_plugin-vue_export-helper-1tPrXgE0.mjs.map +1 -0
- package/web/.output/server/chunks/build/client.precomputed.mjs +4 -0
- package/web/.output/server/chunks/build/client.precomputed.mjs.map +1 -0
- package/web/.output/server/chunks/build/error-404-DyaaQUIS.mjs +106 -0
- package/web/.output/server/chunks/build/error-404-DyaaQUIS.mjs.map +1 -0
- package/web/.output/server/chunks/build/error-404-styles.9cNA4arh.mjs +8 -0
- package/web/.output/server/chunks/build/error-404-styles.9cNA4arh.mjs.map +1 -0
- package/web/.output/server/chunks/build/error-500-CVSP-p02.mjs +89 -0
- package/web/.output/server/chunks/build/error-500-CVSP-p02.mjs.map +1 -0
- package/web/.output/server/chunks/build/error-500-styles.BX54ZlkH.mjs +8 -0
- package/web/.output/server/chunks/build/error-500-styles.BX54ZlkH.mjs.map +1 -0
- package/web/.output/server/chunks/build/index-88dXYOxO.mjs +19675 -0
- package/web/.output/server/chunks/build/index-88dXYOxO.mjs.map +1 -0
- package/web/.output/server/chunks/build/index-styles.V2iua2bE.mjs +8 -0
- package/web/.output/server/chunks/build/index-styles.V2iua2bE.mjs.map +1 -0
- package/web/.output/server/chunks/build/server.mjs +7910 -0
- package/web/.output/server/chunks/build/server.mjs.map +1 -0
- package/web/.output/server/chunks/build/styles.mjs +10 -0
- package/web/.output/server/chunks/build/styles.mjs.map +1 -0
- package/web/.output/server/chunks/nitro/nitro.mjs +6944 -0
- package/web/.output/server/chunks/nitro/nitro.mjs.map +1 -0
- package/web/.output/server/chunks/routes/api/fields.get.mjs +27 -0
- package/web/.output/server/chunks/routes/api/fields.get.mjs.map +1 -0
- package/web/.output/server/chunks/routes/api/findings.get.mjs +30 -0
- package/web/.output/server/chunks/routes/api/findings.get.mjs.map +1 -0
- package/web/.output/server/chunks/routes/api/log/contents.post.mjs +29 -0
- package/web/.output/server/chunks/routes/api/log/contents.post.mjs.map +1 -0
- package/web/.output/server/chunks/routes/api/log/path.post.mjs +30 -0
- package/web/.output/server/chunks/routes/api/log/path.post.mjs.map +1 -0
- package/web/.output/server/chunks/routes/api/repositories.get.mjs +27 -0
- package/web/.output/server/chunks/routes/api/repositories.get.mjs.map +1 -0
- package/web/.output/server/chunks/routes/api/rows.get.mjs +48 -0
- package/web/.output/server/chunks/routes/api/rows.get.mjs.map +1 -0
- package/web/.output/server/chunks/routes/renderer.mjs +451 -0
- package/web/.output/server/chunks/routes/renderer.mjs.map +1 -0
- package/web/.output/server/chunks/virtual/_virtual_spa-template.mjs +4 -0
- package/web/.output/server/chunks/virtual/_virtual_spa-template.mjs.map +1 -0
- package/web/.output/server/index.mjs +16 -0
- package/web/.output/server/index.mjs.map +1 -0
- package/web/.output/server/node_modules/.nitro/hookable@5.5.3/dist/index.mjs +290 -0
- package/web/.output/server/node_modules/.nitro/hookable@5.5.3/package.json +49 -0
- package/web/.output/server/node_modules/.nitro/hookable@6.1.1/dist/index.mjs +257 -0
- package/web/.output/server/node_modules/.nitro/hookable@6.1.1/package.json +53 -0
- package/web/.output/server/node_modules/@babel/parser/lib/index.js +14599 -0
- package/web/.output/server/node_modules/@babel/parser/package.json +50 -0
- package/web/.output/server/node_modules/@floating-ui/core/dist/floating-ui.core.mjs +1038 -0
- package/web/.output/server/node_modules/@floating-ui/core/package.json +63 -0
- package/web/.output/server/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs +789 -0
- package/web/.output/server/node_modules/@floating-ui/dom/package.json +72 -0
- package/web/.output/server/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs +165 -0
- package/web/.output/server/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs +136 -0
- package/web/.output/server/node_modules/@floating-ui/utils/package.json +70 -0
- package/web/.output/server/node_modules/@floating-ui/vue/dist/floating-ui.vue.mjs +190 -0
- package/web/.output/server/node_modules/@floating-ui/vue/package.json +71 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/colors/index.js +295 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/colors/keywords.js +701 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/css/common.js +75 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/css/format.js +39 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/css/icon.js +47 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/css/icons.js +128 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/customisations/bool.js +19 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/customisations/defaults.js +13 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/customisations/flip.js +17 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/customisations/merge.js +16 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/customisations/rotate.js +30 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/cleanup.js +78 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/convert.js +100 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/data.js +28 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/format.js +58 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/parse.js +48 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/regex/base.js +203 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/regex/create.js +33 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/regex/numbers.js +132 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/regex/similar.js +165 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/regex/tree.js +79 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/replace/find.js +92 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/replace/replace.js +26 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/test/components.js +76 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/test/missing.js +66 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/test/name.js +45 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/test/parse.js +103 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/test/similar.js +36 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/test/tree.js +92 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/test/variations.js +62 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/icon/defaults.js +25 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/icon/merge.js +16 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/icon/name.js +57 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/icon/square.js +33 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/icon/transformations.js +12 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/convert-info.js +125 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/expand.js +19 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icon.js +25 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icons.js +36 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/minify.js +91 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/parse.js +46 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/tree.js +23 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/validate-basic.js +42 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/validate.js +123 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/index.js +52 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/loader/custom.js +30 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/loader/loader.js +26 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/loader/modern.js +27 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/loader/utils.js +105 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/misc/objects.js +26 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/misc/strings.js +26 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/misc/title.js +9 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/svg/build.js +113 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/svg/defs.js +31 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/svg/encode-svg-for-css.js +13 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/svg/html.js +9 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/svg/id.js +41 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/svg/inner-html.js +22 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/svg/parse.js +67 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/svg/pretty.js +54 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/svg/size.js +27 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/svg/trim.js +7 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/svg/url.js +22 -0
- package/web/.output/server/node_modules/@iconify/utils/lib/svg/viewbox.js +8 -0
- package/web/.output/server/node_modules/@iconify/utils/package.json +119 -0
- package/web/.output/server/node_modules/@iconify/vue/dist/iconify.mjs +1896 -0
- package/web/.output/server/node_modules/@iconify/vue/package.json +62 -0
- package/web/.output/server/node_modules/@tanstack/virtual-core/dist/esm/index.js +1268 -0
- package/web/.output/server/node_modules/@tanstack/virtual-core/dist/esm/lazy-measurements.js +34 -0
- package/web/.output/server/node_modules/@tanstack/virtual-core/dist/esm/utils.js +74 -0
- package/web/.output/server/node_modules/@tanstack/virtual-core/package.json +56 -0
- package/web/.output/server/node_modules/@tanstack/vue-virtual/dist/esm/index.js +66 -0
- package/web/.output/server/node_modules/@tanstack/vue-virtual/package.json +68 -0
- package/web/.output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +6759 -0
- package/web/.output/server/node_modules/@vue/compiler-core/package.json +58 -0
- package/web/.output/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +689 -0
- package/web/.output/server/node_modules/@vue/compiler-dom/package.json +57 -0
- package/web/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +1413 -0
- package/web/.output/server/node_modules/@vue/compiler-ssr/package.json +34 -0
- package/web/.output/server/node_modules/@vue/devtools-api/dist/index.js +2 -0
- package/web/.output/server/node_modules/@vue/devtools-api/package.json +34 -0
- package/web/.output/server/node_modules/@vue/devtools-kit/dist/index.js +5670 -0
- package/web/.output/server/node_modules/@vue/devtools-kit/node_modules/hookable/dist/index.mjs +290 -0
- package/web/.output/server/node_modules/@vue/devtools-kit/node_modules/hookable/package.json +49 -0
- package/web/.output/server/node_modules/@vue/devtools-kit/package.json +44 -0
- package/web/.output/server/node_modules/@vue/devtools-shared/dist/index.js +239 -0
- package/web/.output/server/node_modules/@vue/devtools-shared/package.json +33 -0
- package/web/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +1899 -0
- package/web/.output/server/node_modules/@vue/reactivity/package.json +55 -0
- package/web/.output/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +6940 -0
- package/web/.output/server/node_modules/@vue/runtime-core/package.json +52 -0
- package/web/.output/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +1822 -0
- package/web/.output/server/node_modules/@vue/runtime-dom/package.json +60 -0
- package/web/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +896 -0
- package/web/.output/server/node_modules/@vue/server-renderer/package.json +55 -0
- package/web/.output/server/node_modules/@vue/shared/dist/shared.cjs.prod.js +604 -0
- package/web/.output/server/node_modules/@vue/shared/package.json +47 -0
- package/web/.output/server/node_modules/@vueuse/core/dist/index.js +8464 -0
- package/web/.output/server/node_modules/@vueuse/core/package.json +49 -0
- package/web/.output/server/node_modules/@vueuse/shared/dist/index.js +2013 -0
- package/web/.output/server/node_modules/@vueuse/shared/package.json +42 -0
- package/web/.output/server/node_modules/aria-hidden/dist/es5/index.js +174 -0
- package/web/.output/server/node_modules/aria-hidden/package.json +71 -0
- package/web/.output/server/node_modules/birpc/dist/index.mjs +291 -0
- package/web/.output/server/node_modules/birpc/package.json +57 -0
- package/web/.output/server/node_modules/consola/dist/chunks/prompt.mjs +280 -0
- package/web/.output/server/node_modules/consola/dist/core.mjs +512 -0
- package/web/.output/server/node_modules/consola/dist/index.mjs +651 -0
- package/web/.output/server/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs +72 -0
- package/web/.output/server/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs +288 -0
- package/web/.output/server/node_modules/consola/package.json +136 -0
- package/web/.output/server/node_modules/devalue/index.js +4 -0
- package/web/.output/server/node_modules/devalue/package.json +40 -0
- package/web/.output/server/node_modules/devalue/src/base64.js +60 -0
- package/web/.output/server/node_modules/devalue/src/constants.js +12 -0
- package/web/.output/server/node_modules/devalue/src/parse.js +283 -0
- package/web/.output/server/node_modules/devalue/src/stringify.js +401 -0
- package/web/.output/server/node_modules/devalue/src/uneval.js +552 -0
- package/web/.output/server/node_modules/devalue/src/utils.js +160 -0
- package/web/.output/server/node_modules/entities/dist/commonjs/decode-codepoint.js +77 -0
- package/web/.output/server/node_modules/entities/dist/commonjs/decode.js +568 -0
- package/web/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-html.js +7 -0
- package/web/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +7 -0
- package/web/.output/server/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js +21 -0
- package/web/.output/server/node_modules/entities/dist/commonjs/internal/decode-shared.js +31 -0
- package/web/.output/server/node_modules/entities/dist/commonjs/package.json +3 -0
- package/web/.output/server/node_modules/entities/package.json +120 -0
- package/web/.output/server/node_modules/estree-walker/dist/umd/estree-walker.js +344 -0
- package/web/.output/server/node_modules/estree-walker/package.json +37 -0
- package/web/.output/server/node_modules/hookable/dist/index.mjs +257 -0
- package/web/.output/server/node_modules/hookable/package.json +53 -0
- package/web/.output/server/node_modules/nostics/dist/index.mjs +179 -0
- package/web/.output/server/node_modules/nostics/package.json +124 -0
- package/web/.output/server/node_modules/perfect-debounce/dist/index.mjs +89 -0
- package/web/.output/server/node_modules/perfect-debounce/package.json +41 -0
- package/web/.output/server/node_modules/rou3/dist/index.mjs +501 -0
- package/web/.output/server/node_modules/rou3/package.json +48 -0
- package/web/.output/server/node_modules/source-map-js/lib/array-set.js +121 -0
- package/web/.output/server/node_modules/source-map-js/lib/base64-vlq.js +140 -0
- package/web/.output/server/node_modules/source-map-js/lib/base64.js +67 -0
- package/web/.output/server/node_modules/source-map-js/lib/binary-search.js +111 -0
- package/web/.output/server/node_modules/source-map-js/lib/mapping-list.js +79 -0
- package/web/.output/server/node_modules/source-map-js/lib/quick-sort.js +132 -0
- package/web/.output/server/node_modules/source-map-js/lib/source-map-consumer.js +1188 -0
- package/web/.output/server/node_modules/source-map-js/lib/source-map-generator.js +444 -0
- package/web/.output/server/node_modules/source-map-js/lib/source-node.js +413 -0
- package/web/.output/server/node_modules/source-map-js/lib/util.js +594 -0
- package/web/.output/server/node_modules/source-map-js/package.json +71 -0
- package/web/.output/server/node_modules/source-map-js/source-map.js +8 -0
- package/web/.output/server/node_modules/srvx/dist/_chunks/_body-limit.mjs +39 -0
- package/web/.output/server/node_modules/srvx/dist/_chunks/_plugins.mjs +56 -0
- package/web/.output/server/node_modules/srvx/dist/_chunks/_trust-proxy.mjs +58 -0
- package/web/.output/server/node_modules/srvx/dist/_chunks/_url.mjs +134 -0
- package/web/.output/server/node_modules/srvx/dist/_chunks/_utils.mjs +15 -0
- package/web/.output/server/node_modules/srvx/dist/_chunks/_utils2.mjs +75 -0
- package/web/.output/server/node_modules/srvx/dist/adapters/node.mjs +976 -0
- package/web/.output/server/node_modules/srvx/package.json +102 -0
- package/web/.output/server/node_modules/tailwind-merge/dist/bundle-mjs.mjs +3365 -0
- package/web/.output/server/node_modules/tailwind-merge/package.json +93 -0
- package/web/.output/server/node_modules/tailwind-variants/dist/chunk-LQJYWU4O.js +112 -0
- package/web/.output/server/node_modules/tailwind-variants/dist/chunk-RZF76H2U.js +269 -0
- package/web/.output/server/node_modules/tailwind-variants/dist/index.js +38 -0
- package/web/.output/server/node_modules/tailwind-variants/package.json +122 -0
- package/web/.output/server/node_modules/tailwindcss/dist/chunk-X4GG3EDV.mjs +1 -0
- package/web/.output/server/node_modules/tailwindcss/dist/colors.mjs +1 -0
- package/web/.output/server/node_modules/tailwindcss/package.json +89 -0
- package/web/.output/server/node_modules/ufo/dist/index.mjs +645 -0
- package/web/.output/server/node_modules/ufo/package.json +48 -0
- package/web/.output/server/node_modules/unhead/dist/index.mjs +9 -0
- package/web/.output/server/node_modules/unhead/dist/parser.mjs +508 -0
- package/web/.output/server/node_modules/unhead/dist/plugins.mjs +101 -0
- package/web/.output/server/node_modules/unhead/dist/scripts.mjs +30 -0
- package/web/.output/server/node_modules/unhead/dist/server.mjs +180 -0
- package/web/.output/server/node_modules/unhead/dist/shared/unhead.B3VbJo7Y.mjs +207 -0
- package/web/.output/server/node_modules/unhead/dist/shared/unhead.BYvz9V1x.mjs +43 -0
- package/web/.output/server/node_modules/unhead/dist/shared/unhead.BnoAbrHA.mjs +269 -0
- package/web/.output/server/node_modules/unhead/dist/shared/unhead.CaI5ZD4O.mjs +182 -0
- package/web/.output/server/node_modules/unhead/dist/shared/unhead.CbpEuj3y.mjs +71 -0
- package/web/.output/server/node_modules/unhead/dist/shared/unhead.D4vSFytZ.mjs +236 -0
- package/web/.output/server/node_modules/unhead/dist/shared/unhead.DQc16pHI.mjs +196 -0
- package/web/.output/server/node_modules/unhead/dist/shared/unhead.Dh1cQCTe.mjs +44 -0
- package/web/.output/server/node_modules/unhead/dist/shared/unhead.TxTMM7cM.mjs +166 -0
- package/web/.output/server/node_modules/unhead/dist/shared/unhead.yem5I2v_.mjs +38 -0
- package/web/.output/server/node_modules/unhead/dist/utils.mjs +5 -0
- package/web/.output/server/node_modules/unhead/node_modules/hookable/dist/index.mjs +257 -0
- package/web/.output/server/node_modules/unhead/node_modules/hookable/package.json +53 -0
- package/web/.output/server/node_modules/unhead/package.json +105 -0
- package/web/.output/server/node_modules/vue/dist/vue.cjs.js +80 -0
- package/web/.output/server/node_modules/vue/dist/vue.cjs.prod.js +66 -0
- package/web/.output/server/node_modules/vue/index.js +7 -0
- package/web/.output/server/node_modules/vue/index.mjs +1 -0
- package/web/.output/server/node_modules/vue/package.json +112 -0
- package/web/.output/server/node_modules/vue/server-renderer/index.mjs +1 -0
- package/web/.output/server/node_modules/vue-bundle-renderer/dist/runtime.mjs +249 -0
- package/web/.output/server/node_modules/vue-bundle-renderer/package.json +57 -0
- package/web/.output/server/node_modules/vue-demi/lib/index.mjs +34 -0
- package/web/.output/server/node_modules/vue-demi/package.json +47 -0
- package/web/.output/server/node_modules/vue-router/dist/devtools-Bpr7ZAVB.js +1056 -0
- package/web/.output/server/node_modules/vue-router/dist/useApi-CROJJdhE.js +436 -0
- package/web/.output/server/node_modules/vue-router/dist/vue-router.js +1543 -0
- package/web/.output/server/node_modules/vue-router/package.json +214 -0
- package/web/.output/server/node_modules/vue-router/vue-router.node.mjs +2 -0
- package/web/.output/server/package.json +51 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { buildQuery, buildCountQuery } from "./query-builder.js";
|
|
2
|
+
/** The `msg` that marks the entry carrying the dependency inventory. */
|
|
3
|
+
const PACKAGE_FILES_MSG = "packageFiles with updates";
|
|
4
|
+
/** The `msg` that marks the entry carrying `branchesInformation`. */
|
|
5
|
+
const BRANCHES_INFO_MSG = "branches info extended";
|
|
6
|
+
/**
|
|
7
|
+
* Computes the `analyze` command's stats and print views against an
|
|
8
|
+
* already-loaded {@link Parser}.
|
|
9
|
+
*/
|
|
10
|
+
export class Analyzer {
|
|
11
|
+
parser;
|
|
12
|
+
constructor(parser) {
|
|
13
|
+
this.parser = parser;
|
|
14
|
+
}
|
|
15
|
+
/** Build the whole-log statistics view (single pass, all repositories). */
|
|
16
|
+
stats() {
|
|
17
|
+
const loaded = this.requireLoaded();
|
|
18
|
+
const rows = this.parser.queryEntries("SELECT line, logentry FROM logs ORDER BY rowid");
|
|
19
|
+
const levelCounts = {};
|
|
20
|
+
const repos = new Map();
|
|
21
|
+
for (const { line, entry } of rows) {
|
|
22
|
+
// Synthetic parser rows (blank / malformed) carry no structural signal.
|
|
23
|
+
if (entry._blank === true || entry._parseError === true)
|
|
24
|
+
continue;
|
|
25
|
+
if (typeof entry.level === "number") {
|
|
26
|
+
const key = String(entry.level);
|
|
27
|
+
levelCounts[key] = (levelCounts[key] ?? 0) + 1;
|
|
28
|
+
}
|
|
29
|
+
const repository = typeof entry.repository === "string" ? entry.repository : undefined;
|
|
30
|
+
// Skip entries with no repository, and git-URL sub-repos (e.g. pre-commit
|
|
31
|
+
// hooks) whose `repository` is an `https://…` URL rather than an
|
|
32
|
+
// `owner/repo` target — they are noise in the per-repo structure view.
|
|
33
|
+
if (repository === undefined || repository.startsWith("https://")) {
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
let acc = repos.get(repository);
|
|
37
|
+
if (acc === undefined) {
|
|
38
|
+
acc = newAccumulator(repository, line);
|
|
39
|
+
repos.set(repository, acc);
|
|
40
|
+
}
|
|
41
|
+
// Rows arrive in ascending rowid order, so toLine grows monotonically.
|
|
42
|
+
acc.toLine = line;
|
|
43
|
+
if (typeof entry.branch === "string")
|
|
44
|
+
acc.branches.add(entry.branch);
|
|
45
|
+
if (Array.isArray(entry.repoProblems)) {
|
|
46
|
+
for (const problem of entry.repoProblems) {
|
|
47
|
+
if (typeof problem === "string")
|
|
48
|
+
acc.repoProblems.add(problem);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (typeof entry.depName === "string")
|
|
52
|
+
acc.depNames.add(entry.depName);
|
|
53
|
+
if (typeof entry.packageName === "string") {
|
|
54
|
+
acc.packageNames.add(entry.packageName);
|
|
55
|
+
}
|
|
56
|
+
if (entry.msg === BRANCHES_INFO_MSG &&
|
|
57
|
+
acc.branchesInformationLine === null) {
|
|
58
|
+
acc.branchesInformationLine = line;
|
|
59
|
+
}
|
|
60
|
+
if (entry.msg === PACKAGE_FILES_MSG) {
|
|
61
|
+
if (acc.packageFilesLine === null)
|
|
62
|
+
acc.packageFilesLine = line;
|
|
63
|
+
collectConfigDeps(entry.config, acc.depNames, acc.packageNames);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
logFile: loaded.path,
|
|
68
|
+
md5: loaded.md5,
|
|
69
|
+
totalLines: loaded.totalLines,
|
|
70
|
+
levelCounts: sortLevelCounts(levelCounts),
|
|
71
|
+
// Map iteration order is first-appearance order == fromLine ascending.
|
|
72
|
+
repos: [...repos.values()].map(finalizeRepo),
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
/** Build the filtered, ranged, limited JSONL slice (print mode). */
|
|
76
|
+
print(options) {
|
|
77
|
+
this.requireLoaded();
|
|
78
|
+
const range = { lineFrom: options.lineFrom, lineTo: options.lineTo };
|
|
79
|
+
const countQuery = buildCountQuery(options.filters, range);
|
|
80
|
+
const totalMatched = this.parser.query(countQuery.sql, countQuery.params)[0]
|
|
81
|
+
?.n ?? 0;
|
|
82
|
+
const dataQuery = buildQuery(options.filters, { ...range, limit: options.limit }, "line, logentry");
|
|
83
|
+
const rows = this.parser.queryEntries(dataQuery.sql, dataQuery.params);
|
|
84
|
+
// `msg` is never strippable, even if the caller lists it.
|
|
85
|
+
const stripped = new Set(options.ignoredFields.filter((field) => field !== "msg"));
|
|
86
|
+
const entries = rows.map(({ line, entry }) => {
|
|
87
|
+
const projected = {};
|
|
88
|
+
if (options.includeOriginalLine)
|
|
89
|
+
projected._oL = line;
|
|
90
|
+
for (const [key, value] of Object.entries(entry)) {
|
|
91
|
+
if (stripped.has(key))
|
|
92
|
+
continue;
|
|
93
|
+
projected[key] = value;
|
|
94
|
+
}
|
|
95
|
+
return projected;
|
|
96
|
+
});
|
|
97
|
+
return {
|
|
98
|
+
entries,
|
|
99
|
+
totalMatched,
|
|
100
|
+
emitted: entries.length,
|
|
101
|
+
truncated: totalMatched > entries.length,
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
requireLoaded() {
|
|
105
|
+
const loaded = this.parser.loaded;
|
|
106
|
+
if (!loaded) {
|
|
107
|
+
throw new Error("No log loaded. Call parser.load() before analysis.");
|
|
108
|
+
}
|
|
109
|
+
return loaded;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
/** Create a fresh accumulator for a newly-seen repository. */
|
|
113
|
+
function newAccumulator(name, line) {
|
|
114
|
+
return {
|
|
115
|
+
name,
|
|
116
|
+
fromLine: line,
|
|
117
|
+
toLine: line,
|
|
118
|
+
branches: new Set(),
|
|
119
|
+
branchesInformationLine: null,
|
|
120
|
+
packageFilesLine: null,
|
|
121
|
+
repoProblems: new Set(),
|
|
122
|
+
depNames: new Set(),
|
|
123
|
+
packageNames: new Set(),
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
/** Convert an accumulator into the immutable {@link RepoStats} shape. */
|
|
127
|
+
function finalizeRepo(acc) {
|
|
128
|
+
return {
|
|
129
|
+
name: acc.name,
|
|
130
|
+
fromLine: acc.fromLine,
|
|
131
|
+
toLine: acc.toLine,
|
|
132
|
+
branches: [...acc.branches],
|
|
133
|
+
branchesInformationLine: acc.branchesInformationLine,
|
|
134
|
+
packageFilesLine: acc.packageFilesLine,
|
|
135
|
+
repoProblems: [...acc.repoProblems],
|
|
136
|
+
depNames: [...acc.depNames],
|
|
137
|
+
packageNames: [...acc.packageNames],
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Collect dependency and package names from a `packageFiles with updates`
|
|
142
|
+
* `config` object. The documented shape is `config[manager] = PackageFile[]`,
|
|
143
|
+
* each package file carrying a `deps` array of `{ depName, packageName }`.
|
|
144
|
+
* Non-conforming shapes are skipped defensively.
|
|
145
|
+
*/
|
|
146
|
+
function collectConfigDeps(config, depNames, packageNames) {
|
|
147
|
+
if (config === null || typeof config !== "object" || Array.isArray(config)) {
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
for (const managerFiles of Object.values(config)) {
|
|
151
|
+
if (!Array.isArray(managerFiles))
|
|
152
|
+
continue;
|
|
153
|
+
for (const packageFile of managerFiles) {
|
|
154
|
+
if (packageFile === null || typeof packageFile !== "object")
|
|
155
|
+
continue;
|
|
156
|
+
const deps = packageFile.deps;
|
|
157
|
+
if (!Array.isArray(deps))
|
|
158
|
+
continue;
|
|
159
|
+
for (const dep of deps) {
|
|
160
|
+
if (dep === null || typeof dep !== "object")
|
|
161
|
+
continue;
|
|
162
|
+
const { depName, packageName } = dep;
|
|
163
|
+
if (typeof depName === "string")
|
|
164
|
+
depNames.add(depName);
|
|
165
|
+
if (typeof packageName === "string")
|
|
166
|
+
packageNames.add(packageName);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
/** Re-key the level counts in ascending numeric level order. */
|
|
172
|
+
function sortLevelCounts(counts) {
|
|
173
|
+
const sorted = {};
|
|
174
|
+
for (const key of Object.keys(counts).sort((a, b) => Number(a) - Number(b))) {
|
|
175
|
+
sorted[key] = counts[key];
|
|
176
|
+
}
|
|
177
|
+
return sorted;
|
|
178
|
+
}
|
|
179
|
+
//# sourceMappingURL=analyzer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analyzer.js","sourceRoot":"","sources":["../../src/core/analyzer.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAKjE,wEAAwE;AACxE,MAAM,iBAAiB,GAAG,2BAA2B,CAAC;AACtD,qEAAqE;AACrE,MAAM,iBAAiB,GAAG,wBAAwB,CAAC;AA2EnD;;;GA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;oBAAE,YAAY,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;YACrE,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC;AAED,gEAAgE;AAChE,SAAS,eAAe,CACtB,MAA8B;IAE9B,MAAM,MAAM,GAA2B,EAAE,CAAC;IAC1C,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5E,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAE,CAAC;IAC7B,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { Parser } from "./parser.js";
|
|
2
|
+
import { type IgnoreRule } from "./ignore-file.js";
|
|
3
|
+
/** Ordered list of every known finding category (drives the `counts` map). */
|
|
4
|
+
export declare const CATEGORIES: readonly ["host-error-abort", "log-warn", "log-error", "log-fatal", "err-object", "config-migration", "abandoned-package", "repo-problem"];
|
|
5
|
+
/** A finding category. */
|
|
6
|
+
export type Category = (typeof CATEGORIES)[number];
|
|
7
|
+
/** Finding severity. */
|
|
8
|
+
export type Severity = "error" | "warning";
|
|
9
|
+
/** Severity for each category. */
|
|
10
|
+
export declare const SEVERITY: Readonly<Record<Category, Severity>>;
|
|
11
|
+
/** A single detected problem. */
|
|
12
|
+
export interface Finding {
|
|
13
|
+
category: Category;
|
|
14
|
+
severity: Severity;
|
|
15
|
+
/** Human-facing message; also the target of ignore-rule message globs. */
|
|
16
|
+
message: string;
|
|
17
|
+
/** 0-indexed source line (parser rowid). */
|
|
18
|
+
line: number;
|
|
19
|
+
/** Repository the entry belongs to, when present. */
|
|
20
|
+
repository?: string;
|
|
21
|
+
/** Category-specific extra context. */
|
|
22
|
+
details?: Record<string, unknown>;
|
|
23
|
+
/** True when an active ignore rule suppressed this finding. */
|
|
24
|
+
ignored: boolean;
|
|
25
|
+
}
|
|
26
|
+
/** The machine-readable report (schema v1). */
|
|
27
|
+
export interface DetectionReport {
|
|
28
|
+
version: 1;
|
|
29
|
+
logFile: string;
|
|
30
|
+
logMd5: string;
|
|
31
|
+
generatedAt: string;
|
|
32
|
+
exitCode: number;
|
|
33
|
+
summary: {
|
|
34
|
+
errorCount: number;
|
|
35
|
+
warningCount: number;
|
|
36
|
+
};
|
|
37
|
+
counts: Record<Category, number>;
|
|
38
|
+
findings: Finding[];
|
|
39
|
+
}
|
|
40
|
+
/** Options for {@link ErrorDetector.run}. */
|
|
41
|
+
export interface DetectOptions {
|
|
42
|
+
/** Active ignore rules (already filtered for expiry). */
|
|
43
|
+
ignoreRules?: readonly IgnoreRule[];
|
|
44
|
+
/** When true, non-ignored warnings also force a non-zero exit code. */
|
|
45
|
+
failOnWarn?: boolean;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Detects problems in a loaded {@link Parser}. Construct with an already-loaded
|
|
49
|
+
* parser, then call {@link run}.
|
|
50
|
+
*/
|
|
51
|
+
export declare class ErrorDetector {
|
|
52
|
+
private readonly parser;
|
|
53
|
+
constructor(parser: Parser);
|
|
54
|
+
/** Run detection and build the report. */
|
|
55
|
+
run(options?: DetectOptions): DetectionReport;
|
|
56
|
+
}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ErrorDetector — scans a parsed Renovate log for build-breaking problems and
|
|
3
|
+
* (non-breaking) warnings, producing the stable machine-readable report used by
|
|
4
|
+
* the `detect-errors` command and CI.
|
|
5
|
+
*
|
|
6
|
+
* The category model is fixed: every known category is always present in
|
|
7
|
+
* `counts` (zeros included) so runs diff cleanly over time. Categories are independent — an entry that is both a
|
|
8
|
+
* `level:50` error and carries an `err` object yields two findings — with the
|
|
9
|
+
* sole exception of `repo-problem`, which is de-duplicated against overlapping
|
|
10
|
+
* `log-warn` messages.
|
|
11
|
+
*
|
|
12
|
+
* Detection walks the whole log once (all repositories); findings carry a
|
|
13
|
+
* `repository` when the source entry has one. Line numbers are 0-indexed,
|
|
14
|
+
* matching the parser's rowid == source-line invariant.
|
|
15
|
+
*
|
|
16
|
+
* The error/warning split is scoped to problems Renovate would *not* otherwise
|
|
17
|
+
* surface in a PR comment: `host-error-abort`, `log-error`, `log-fatal`,
|
|
18
|
+
* `config-migration`, and `abandoned-package` are errors (exit 1); `log-warn`,
|
|
19
|
+
* `err-object`, and `repo-problem` are warnings.
|
|
20
|
+
*/
|
|
21
|
+
import { ERROR_LEVELS, WARN_LEVEL } from "./levels.js";
|
|
22
|
+
import { matchIgnoreRule } from "./ignore-file.js";
|
|
23
|
+
import { buildQuery } from "./query-builder.js";
|
|
24
|
+
/** Ordered list of every known finding category (drives the `counts` map). */
|
|
25
|
+
export const CATEGORIES = [
|
|
26
|
+
"host-error-abort",
|
|
27
|
+
"log-warn",
|
|
28
|
+
"log-error",
|
|
29
|
+
"log-fatal",
|
|
30
|
+
"err-object",
|
|
31
|
+
"config-migration",
|
|
32
|
+
"abandoned-package",
|
|
33
|
+
"repo-problem",
|
|
34
|
+
];
|
|
35
|
+
/** Severity for each category. */
|
|
36
|
+
export const SEVERITY = {
|
|
37
|
+
"host-error-abort": "error",
|
|
38
|
+
"log-warn": "warning",
|
|
39
|
+
"log-error": "error",
|
|
40
|
+
"log-fatal": "error",
|
|
41
|
+
"err-object": "warning",
|
|
42
|
+
"config-migration": "error",
|
|
43
|
+
"abandoned-package": "error",
|
|
44
|
+
"repo-problem": "warning",
|
|
45
|
+
};
|
|
46
|
+
/** The `msg` that marks a per-repository run summary. */
|
|
47
|
+
const REPOSITORY_FINISHED_MSG = "Repository finished";
|
|
48
|
+
/** The `result` on a "Repository finished" entry that signals an aborting host error. */
|
|
49
|
+
const HOST_ERROR_RESULT = "external-host-error";
|
|
50
|
+
/** The exact `msg` that marks a required config migration. */
|
|
51
|
+
const CONFIG_MIGRATION_MSG = "Config migration necessary";
|
|
52
|
+
/** The exact `msg` that carries abandoned-package statistics. */
|
|
53
|
+
const ABANDONED_PACKAGE_MSG = "Abandoned package statistics";
|
|
54
|
+
/**
|
|
55
|
+
* Detects problems in a loaded {@link Parser}. Construct with an already-loaded
|
|
56
|
+
* parser, then call {@link run}.
|
|
57
|
+
*/
|
|
58
|
+
export class ErrorDetector {
|
|
59
|
+
parser;
|
|
60
|
+
constructor(parser) {
|
|
61
|
+
this.parser = parser;
|
|
62
|
+
}
|
|
63
|
+
/** Run detection and build the report. */
|
|
64
|
+
run(options = {}) {
|
|
65
|
+
const loaded = this.parser.loaded;
|
|
66
|
+
if (!loaded) {
|
|
67
|
+
throw new Error("No log loaded. Call parser.load() before detection.");
|
|
68
|
+
}
|
|
69
|
+
// Fetch only rows that can yield a finding, instead of scanning
|
|
70
|
+
// the ENTIRE log (hogging memory). QueryBuilder AND's filters, so the disjunction
|
|
71
|
+
// of finding predicates is expressed as separate queries, merged by line.
|
|
72
|
+
const filterGroups = [
|
|
73
|
+
[{ type: "levelIn", levels: [WARN_LEVEL, ...ERROR_LEVELS] }],
|
|
74
|
+
[{ type: "presence", field: "err" }],
|
|
75
|
+
[{ type: "presence", field: "repoProblems" }],
|
|
76
|
+
[
|
|
77
|
+
{
|
|
78
|
+
type: "inSet",
|
|
79
|
+
field: "msg",
|
|
80
|
+
values: [
|
|
81
|
+
REPOSITORY_FINISHED_MSG,
|
|
82
|
+
CONFIG_MIGRATION_MSG,
|
|
83
|
+
ABANDONED_PACKAGE_MSG,
|
|
84
|
+
],
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
];
|
|
88
|
+
// A row can match more than one group (e.g. a level:50 entry that also
|
|
89
|
+
// carries an `err`), so dedupe by line before walking.
|
|
90
|
+
const byLine = new Map();
|
|
91
|
+
for (const filters of filterGroups) {
|
|
92
|
+
const { sql, params } = buildQuery(filters, { order: "asc" }, "line, logentry");
|
|
93
|
+
for (const { line, entry } of this.parser.queryEntries(sql, params)) {
|
|
94
|
+
byLine.set(line, entry);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
const rows = [...byLine.entries()]
|
|
98
|
+
.sort(([a], [b]) => a - b)
|
|
99
|
+
.map(([line, entry]) => ({ line, entry }));
|
|
100
|
+
// First pass: collect every log-warn message so repo-problems that merely
|
|
101
|
+
// echo a level:40 message are not counted twice.
|
|
102
|
+
const warnLogMessages = new Set();
|
|
103
|
+
for (const { entry } of rows) {
|
|
104
|
+
if (entry.level === WARN_LEVEL && typeof entry.msg === "string") {
|
|
105
|
+
warnLogMessages.add(entry.msg);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
const findings = [];
|
|
109
|
+
for (const { line, entry } of rows) {
|
|
110
|
+
collectFindings(entry, line, warnLogMessages, findings);
|
|
111
|
+
}
|
|
112
|
+
// Apply ignore rules.
|
|
113
|
+
const rules = options.ignoreRules ?? [];
|
|
114
|
+
for (const finding of findings) {
|
|
115
|
+
finding.ignored =
|
|
116
|
+
rules.length > 0 && matchIgnoreRule(finding, rules) !== undefined;
|
|
117
|
+
}
|
|
118
|
+
const counts = emptyCounts();
|
|
119
|
+
let errorCount = 0;
|
|
120
|
+
let warningCount = 0;
|
|
121
|
+
for (const finding of findings) {
|
|
122
|
+
counts[finding.category] += 1;
|
|
123
|
+
if (finding.ignored)
|
|
124
|
+
continue;
|
|
125
|
+
if (finding.severity === "error")
|
|
126
|
+
errorCount += 1;
|
|
127
|
+
else
|
|
128
|
+
warningCount += 1;
|
|
129
|
+
}
|
|
130
|
+
const exitCode = errorCount > 0 || (options.failOnWarn === true && warningCount > 0)
|
|
131
|
+
? 1
|
|
132
|
+
: 0;
|
|
133
|
+
return {
|
|
134
|
+
version: 1,
|
|
135
|
+
logFile: loaded.path,
|
|
136
|
+
logMd5: loaded.md5,
|
|
137
|
+
generatedAt: new Date().toISOString(),
|
|
138
|
+
exitCode,
|
|
139
|
+
summary: { errorCount, warningCount },
|
|
140
|
+
counts,
|
|
141
|
+
findings,
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
/** Build a counts map with every category initialised to zero. */
|
|
146
|
+
function emptyCounts() {
|
|
147
|
+
const counts = {};
|
|
148
|
+
for (const category of CATEGORIES)
|
|
149
|
+
counts[category] = 0;
|
|
150
|
+
return counts;
|
|
151
|
+
}
|
|
152
|
+
/** Apply every detection rule to a single entry, appending to `findings`. */
|
|
153
|
+
function collectFindings(entry, line, warnLogMessages, findings) {
|
|
154
|
+
// Synthetic parser rows (blank / malformed lines) carry no signal.
|
|
155
|
+
if (entry._blank === true || entry._parseError === true)
|
|
156
|
+
return;
|
|
157
|
+
const repository = typeof entry.repository === "string" ? entry.repository : undefined;
|
|
158
|
+
const msg = typeof entry.msg === "string" ? entry.msg : "";
|
|
159
|
+
const level = typeof entry.level === "number" ? entry.level : undefined;
|
|
160
|
+
const push = (category, message, details) => {
|
|
161
|
+
findings.push({
|
|
162
|
+
category,
|
|
163
|
+
severity: SEVERITY[category],
|
|
164
|
+
message,
|
|
165
|
+
line,
|
|
166
|
+
...(repository !== undefined ? { repository } : {}),
|
|
167
|
+
...(details !== undefined ? { details } : {}),
|
|
168
|
+
ignored: false,
|
|
169
|
+
});
|
|
170
|
+
};
|
|
171
|
+
// host-error-abort — a "Repository finished" summary aborted by a host error.
|
|
172
|
+
if (msg === REPOSITORY_FINISHED_MSG && entry.result === HOST_ERROR_RESULT) {
|
|
173
|
+
push("host-error-abort", msg, { result: entry.result });
|
|
174
|
+
}
|
|
175
|
+
// log-error / log-fatal — by level.
|
|
176
|
+
if (level === ERROR_LEVELS[0])
|
|
177
|
+
push("log-error", msg, errDetails(entry));
|
|
178
|
+
if (level === ERROR_LEVELS[1])
|
|
179
|
+
push("log-fatal", msg, errDetails(entry));
|
|
180
|
+
// err-object — a root-level `err` object.
|
|
181
|
+
const err = entry.err;
|
|
182
|
+
if (err !== null && typeof err === "object" && !Array.isArray(err)) {
|
|
183
|
+
const errMessage = msg !== ""
|
|
184
|
+
? msg
|
|
185
|
+
: typeof err.message === "string"
|
|
186
|
+
? err.message
|
|
187
|
+
: "error";
|
|
188
|
+
push("err-object", errMessage, { err });
|
|
189
|
+
}
|
|
190
|
+
// config-migration — exact message plus the old/new config pair.
|
|
191
|
+
if (msg === CONFIG_MIGRATION_MSG &&
|
|
192
|
+
entry.oldConfig !== undefined &&
|
|
193
|
+
entry.newConfig !== undefined) {
|
|
194
|
+
push("config-migration", msg, { keys: ["oldConfig", "newConfig"] });
|
|
195
|
+
}
|
|
196
|
+
// abandoned-package — one finding per package, keyed as `datasource:package`.
|
|
197
|
+
// The entry carries datasource-named objects (e.g. `npm`, `crate`) mapping a
|
|
198
|
+
// package name to its last-update timestamp; string/number metadata fields are
|
|
199
|
+
// skipped by only descending into plain-object root values.
|
|
200
|
+
if (msg === ABANDONED_PACKAGE_MSG) {
|
|
201
|
+
for (const [datasource, group] of Object.entries(entry)) {
|
|
202
|
+
if (group === null || typeof group !== "object" || Array.isArray(group)) {
|
|
203
|
+
continue;
|
|
204
|
+
}
|
|
205
|
+
for (const [pkg, lastUpdated] of Object.entries(group)) {
|
|
206
|
+
push("abandoned-package", `${datasource}:${pkg}`, {
|
|
207
|
+
datasource,
|
|
208
|
+
package: pkg,
|
|
209
|
+
lastUpdated,
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
// log-warn — by level.
|
|
215
|
+
if (level === WARN_LEVEL)
|
|
216
|
+
push("log-warn", msg);
|
|
217
|
+
// repo-problem — each string, de-duped against log-warn messages.
|
|
218
|
+
if (Array.isArray(entry.repoProblems)) {
|
|
219
|
+
for (const problem of entry.repoProblems) {
|
|
220
|
+
if (typeof problem !== "string")
|
|
221
|
+
continue;
|
|
222
|
+
if (warnLogMessages.has(problem))
|
|
223
|
+
continue;
|
|
224
|
+
push("repo-problem", problem, { problem });
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
/** Extract an `{ err }` details object when the entry carries one. */
|
|
229
|
+
function errDetails(entry) {
|
|
230
|
+
const err = entry.err;
|
|
231
|
+
if (err !== null && typeof err === "object" && !Array.isArray(err)) {
|
|
232
|
+
return { err };
|
|
233
|
+
}
|
|
234
|
+
return undefined;
|
|
235
|
+
}
|
|
236
|
+
//# sourceMappingURL=error-detector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-detector.js","sourceRoot":"","sources":["../../src/core/error-detector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAmB,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,8EAA8E;AAC9E,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,kBAAkB;IAClB,UAAU;IACV,WAAW;IACX,WAAW;IACX,YAAY;IACZ,kBAAkB;IAClB,mBAAmB;IACnB,cAAc;CACN,CAAC;AAQX,kCAAkC;AAClC,MAAM,CAAC,MAAM,QAAQ,GAAyC;IAC5D,kBAAkB,EAAE,OAAO;IAC3B,UAAU,EAAE,SAAS;IACrB,WAAW,EAAE,OAAO;IACpB,WAAW,EAAE,OAAO;IACpB,YAAY,EAAE,SAAS;IACvB,kBAAkB,EAAE,OAAO;IAC3B,mBAAmB,EAAE,OAAO;IAC5B,cAAc,EAAE,SAAS;CAC1B,CAAC;AAEF,yDAAyD;AACzD,MAAM,uBAAuB,GAAG,qBAAqB,CAAC;AAEtD,yFAAyF;AACzF,MAAM,iBAAiB,GAAG,qBAAqB,CAAC;AAEhD,8DAA8D;AAC9D,MAAM,oBAAoB,GAAG,4BAA4B,CAAC;AAE1D,iEAAiE;AACjE,MAAM,qBAAqB,GAAG,8BAA8B,CAAC;AAyC7D;;;GAGG;AACH,MAAM,OAAO,aAAa;IAC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ACvB,IAAI,KAAK,KAAK,UAAU;QAAE,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;IAEhD,kEAAkE;IAClE,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,CAAC;QACtC,KAAK,MAAM,OAAO,IAAI,KAAK,CAAC,YAAY,EAAE,CAAC;YACzC,IAAI,OAAO,OAAO,KAAK,QAAQ;gBAAE,SAAS;YAC1C,IAAI,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC;gBAAE,SAAS;YAC3C,IAAI,CAAC,cAAc,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;QAC7C,CAAC;IACH,CAAC;AACH,CAAC;AAED,sEAAsE;AACtE,SAAS,UAAU,CAAC,KAAe;IACjC,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC;IACtB,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QACnE,OAAO,EAAE,GAAG,EAAE,CAAC;IACjB,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared filter model for renovate-log-parser.
|
|
3
|
+
*
|
|
4
|
+
* All three commands (detect-errors, analyze, web) describe the same kinds of
|
|
5
|
+
* filters. They are represented here as a small, closed set of primitives that
|
|
6
|
+
* the {@link QueryBuilder} translates into parameterized SQL. Filters are always
|
|
7
|
+
* AND'd together.
|
|
8
|
+
*
|
|
9
|
+
* Design decisions:
|
|
10
|
+
* - Only root-level JSON keys are addressable in v1 (`$.<key>`), though the
|
|
11
|
+
* helpers below already build JSON paths so nested support is a non-breaking
|
|
12
|
+
* extension later.
|
|
13
|
+
* - `equals` matches scalar (string/number/boolean) values only. Against a
|
|
14
|
+
* non-scalar value it simply does not match.
|
|
15
|
+
* - `like` is a simple, case-insensitive wildcard match on a single field
|
|
16
|
+
* where `*` (and only `*`) is a wildcard. It is translated to a SQLite
|
|
17
|
+
* `LIKE ... ESCAPE` comparison (see {@link globStarToLike}).
|
|
18
|
+
*/
|
|
19
|
+
/** Root-level JSON key name (e.g. `repository`, `err`, `msg`). */
|
|
20
|
+
export type FieldName = string;
|
|
21
|
+
/** Scalar values usable in an `equals` filter. */
|
|
22
|
+
export type ScalarValue = string | number | boolean;
|
|
23
|
+
/** Match log entries where a root-level `field` equals a scalar `value`. */
|
|
24
|
+
export interface EqualsFilter {
|
|
25
|
+
type: "equals";
|
|
26
|
+
field: FieldName;
|
|
27
|
+
value: ScalarValue;
|
|
28
|
+
/** When true, matches entries that do NOT equal the value. */
|
|
29
|
+
negate?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/** Match log entries where a root-level `field` is present (non-null). */
|
|
32
|
+
export interface PresenceFilter {
|
|
33
|
+
type: "presence";
|
|
34
|
+
field: FieldName;
|
|
35
|
+
/** When true, matches entries where the field is absent. */
|
|
36
|
+
negate?: boolean;
|
|
37
|
+
}
|
|
38
|
+
/** Match log entries whose `level` is in (or, when negated, not in) the set. */
|
|
39
|
+
export interface LevelFilter {
|
|
40
|
+
type: "levelIn";
|
|
41
|
+
levels: number[];
|
|
42
|
+
negate?: boolean;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Case-insensitive wildcard match on a single root-level `field`, where `*`
|
|
46
|
+
* (and only `*`) is a wildcard. Translated to a SQLite `LIKE ... ESCAPE`
|
|
47
|
+
* comparison by the {@link QueryBuilder}. The `pattern` is the raw user glob;
|
|
48
|
+
* {@link globStarToLike} performs the escaping/translation at build time.
|
|
49
|
+
*/
|
|
50
|
+
export interface LikeFilter {
|
|
51
|
+
type: "like";
|
|
52
|
+
field: FieldName;
|
|
53
|
+
/** Raw user pattern where `*` matches any run of characters. */
|
|
54
|
+
pattern: string;
|
|
55
|
+
/** When true, matches entries that do NOT match the pattern. */
|
|
56
|
+
negate?: boolean;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Case-insensitive wildcard match against the **entire raw log line** (the
|
|
60
|
+
* whole `logentry` JSON text), where `*` (and only `*`) is a wildcard. This is
|
|
61
|
+
* the "raw search" the web UI exposes: the user's term is looked for anywhere in
|
|
62
|
+
* the serialized line — in any key or any value — without targeting a field.
|
|
63
|
+
* Translated to a SQLite `LIKE ... ESCAPE` on the `logentry` column by the
|
|
64
|
+
* {@link QueryBuilder}; `*`-to-`%` translation/escaping happens in
|
|
65
|
+
* {@link globStarToLike}.
|
|
66
|
+
*/
|
|
67
|
+
export interface RawFilter {
|
|
68
|
+
type: "raw";
|
|
69
|
+
/** Raw user pattern where `*` matches any run of characters. */
|
|
70
|
+
pattern: string;
|
|
71
|
+
/** When true, matches entries whose line does NOT match the pattern. */
|
|
72
|
+
negate?: boolean;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Match log entries whose root-level `field` is one of a set of scalar values.
|
|
76
|
+
*
|
|
77
|
+
* This is the generic, arbitrary-field analogue of {@link LevelFilter} and is
|
|
78
|
+
* primarily used by the web layer to translate a repository include/exclude
|
|
79
|
+
* selection (potentially many values, which needs OR semantics the AND'd
|
|
80
|
+
* {@link EqualsFilter}s cannot express) into a single filter. `includeNull`
|
|
81
|
+
* additionally matches entries where the field is absent (used for the web's
|
|
82
|
+
* "Repository-independent" pseudo-group). All null handling is explicit so the
|
|
83
|
+
* negated form stays predictable (see the {@link QueryBuilder} for the emitted
|
|
84
|
+
* SQL).
|
|
85
|
+
*/
|
|
86
|
+
export interface InSetFilter {
|
|
87
|
+
type: "inSet";
|
|
88
|
+
field: FieldName;
|
|
89
|
+
values: ScalarValue[];
|
|
90
|
+
/** When true, also match entries where the field is null/absent. */
|
|
91
|
+
includeNull?: boolean;
|
|
92
|
+
/** When true, matches entries NOT covered by the (value set + null) match. */
|
|
93
|
+
negate?: boolean;
|
|
94
|
+
}
|
|
95
|
+
/** Any supported filter. All filters in a query are AND'd. */
|
|
96
|
+
export type Filter = EqualsFilter | PresenceFilter | LevelFilter | LikeFilter | RawFilter | InSetFilter;
|
|
97
|
+
/**
|
|
98
|
+
* Build a SQLite JSON path for a root-level key.
|
|
99
|
+
*
|
|
100
|
+
* Uses `$."key"` quoting so keys containing dots, spaces or reserved characters
|
|
101
|
+
* (common in Renovate logs, e.g. datasource URLs used as keys) are handled
|
|
102
|
+
* safely. Embedded double quotes are escaped per the JSON path grammar.
|
|
103
|
+
*/
|
|
104
|
+
export declare function jsonPath(field: FieldName): string;
|
|
105
|
+
/** SQL expression that extracts a root-level key from the `logentry` column. */
|
|
106
|
+
export declare function extractExpr(field: FieldName, column?: string): string;
|
|
107
|
+
/** Parse a `key:val` CLI filter token into an {@link EqualsFilter}. */
|
|
108
|
+
export declare function parseKeyValueFilter(token: string): EqualsFilter;
|
|
109
|
+
/**
|
|
110
|
+
* Parse a `key:pattern` CLI token into a {@link LikeFilter}, where `*` in the
|
|
111
|
+
* pattern is a wildcard (matching is case-insensitive; see {@link globStarToLike}).
|
|
112
|
+
*/
|
|
113
|
+
export declare function parseWildcardFilter(token: string): LikeFilter;
|
|
114
|
+
/**
|
|
115
|
+
* Translate a simple `*`-only user glob into a SQLite `LIKE` pattern.
|
|
116
|
+
*
|
|
117
|
+
* `LIKE`'s own metacharacters (`%`, `_`) and the escape character (`\`) are
|
|
118
|
+
* escaped so they match literally; then `*` is mapped to `%` (any run of
|
|
119
|
+
* characters). The resulting pattern must be used with `ESCAPE '\'`. Matching
|
|
120
|
+
* is anchored exactly as written — a leading/trailing `*` is required for
|
|
121
|
+
* prefix/suffix/contains behaviour.
|
|
122
|
+
*/
|
|
123
|
+
export declare function globStarToLike(pattern: string): string;
|
|
124
|
+
/**
|
|
125
|
+
* Coerce a raw CLI string value to its scalar type so `equals` filters compare
|
|
126
|
+
* against the correctly-typed JSON value.
|
|
127
|
+
*
|
|
128
|
+
* Renovate stores many root fields as numbers (`level`, `pid`, `v`) or booleans,
|
|
129
|
+
* and SQLite never treats a numeric value as equal to a text value — so without
|
|
130
|
+
* this, `--filter level:30` would compare `30 = '30'` and never match.
|
|
131
|
+
*
|
|
132
|
+
* Coercion is deliberately conservative: only `true`/`false` and strict numeric
|
|
133
|
+
* literals are converted. Leading-zero (`007`) and dotted/version-like (`1.2.3`)
|
|
134
|
+
* values stay strings, since those are meaningful string identifiers.
|
|
135
|
+
*/
|
|
136
|
+
export declare function coerceScalar(value: string): ScalarValue;
|