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,119 @@
|
|
|
1
|
+
import { resolve, isAbsolute } from "node:path";
|
|
2
|
+
import { writeFileSync } from "node:fs";
|
|
3
|
+
import { Parser } from "../core/parser.js";
|
|
4
|
+
import { ErrorDetector, SEVERITY, } from "../core/error-detector.js";
|
|
5
|
+
import { loadIgnoreRules, DEFAULT_IGNORE_FILE } from "../core/ignore-file.js";
|
|
6
|
+
/**
|
|
7
|
+
* `detect-errors <path>` — deterministically scan a Renovate JSONL log for
|
|
8
|
+
* build-breaking problems (exit 1) and warnings, optionally writing a stable
|
|
9
|
+
* machine-readable JSON report.
|
|
10
|
+
*
|
|
11
|
+
* Exit codes: 0 = no non-ignored errors; 1 = ≥1 non-ignored error (or, with
|
|
12
|
+
* `--fail-on-warn`, ≥1 non-ignored warning); 2 = tool/usage error.
|
|
13
|
+
*/
|
|
14
|
+
export const detectErrorsCommand = {
|
|
15
|
+
command: "detect-errors <path>",
|
|
16
|
+
describe: "Detect hidden problems in a Renovate log (CI-friendly)",
|
|
17
|
+
builder: (yargs) => yargs
|
|
18
|
+
.positional("path", {
|
|
19
|
+
type: "string",
|
|
20
|
+
describe: "Path to the Renovate JSONL log",
|
|
21
|
+
demandOption: true,
|
|
22
|
+
})
|
|
23
|
+
.option("out", {
|
|
24
|
+
type: "string",
|
|
25
|
+
describe: "Also write the machine-readable JSON report to this path",
|
|
26
|
+
})
|
|
27
|
+
.option("ignore-file", {
|
|
28
|
+
type: "string",
|
|
29
|
+
describe: `Ignore-rules file (default: ./${DEFAULT_IGNORE_FILE})`,
|
|
30
|
+
})
|
|
31
|
+
.option("fail-on-warn", {
|
|
32
|
+
type: "boolean",
|
|
33
|
+
default: false,
|
|
34
|
+
describe: "Make warning findings affect the exit code",
|
|
35
|
+
}),
|
|
36
|
+
handler: (argv) => {
|
|
37
|
+
const parser = new Parser();
|
|
38
|
+
try {
|
|
39
|
+
const logPath = resolve(process.cwd(), argv.path);
|
|
40
|
+
const ignorePathArg = argv["ignore-file"];
|
|
41
|
+
const explicitIgnore = ignorePathArg !== undefined;
|
|
42
|
+
const ignorePath = explicitIgnore
|
|
43
|
+
? isAbsolute(ignorePathArg)
|
|
44
|
+
? ignorePathArg
|
|
45
|
+
: resolve(process.cwd(), ignorePathArg)
|
|
46
|
+
: resolve(process.cwd(), DEFAULT_IGNORE_FILE);
|
|
47
|
+
const ignoreRules = loadIgnoreRules(ignorePath, {
|
|
48
|
+
explicit: explicitIgnore,
|
|
49
|
+
});
|
|
50
|
+
parser.load(logPath);
|
|
51
|
+
const report = new ErrorDetector(parser).run({
|
|
52
|
+
ignoreRules,
|
|
53
|
+
failOnWarn: argv["fail-on-warn"],
|
|
54
|
+
});
|
|
55
|
+
if (argv.out) {
|
|
56
|
+
const outPath = isAbsolute(argv.out)
|
|
57
|
+
? argv.out
|
|
58
|
+
: resolve(process.cwd(), argv.out);
|
|
59
|
+
writeFileSync(outPath, JSON.stringify(report, null, 2) + "\n");
|
|
60
|
+
}
|
|
61
|
+
process.stdout.write(renderHumanSummary(report));
|
|
62
|
+
process.exitCode = report.exitCode;
|
|
63
|
+
}
|
|
64
|
+
catch (err) {
|
|
65
|
+
// Tool/usage error (bad path, unreadable, malformed ignore file, …).
|
|
66
|
+
console.error(`detect-errors: ${err.message}`);
|
|
67
|
+
process.exitCode = 2;
|
|
68
|
+
}
|
|
69
|
+
finally {
|
|
70
|
+
parser.close();
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
/** Format a finding as a single human-readable line. */
|
|
75
|
+
function formatFinding(finding) {
|
|
76
|
+
const location = finding.repository !== undefined
|
|
77
|
+
? `line ${finding.line}, ${finding.repository}`
|
|
78
|
+
: `line ${finding.line}`;
|
|
79
|
+
return ` [${finding.category}] ${finding.message} (${location})`;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Render the human summary for stdout: findings grouped by severity, with
|
|
83
|
+
* ignored findings under their own section. Ignored findings are excluded from
|
|
84
|
+
* the headline counts.
|
|
85
|
+
*/
|
|
86
|
+
function renderHumanSummary(report) {
|
|
87
|
+
const lines = [];
|
|
88
|
+
lines.push(`Renovate log: ${report.logFile}`);
|
|
89
|
+
const { errorCount, warningCount } = report.summary;
|
|
90
|
+
lines.push(`${plural(errorCount, "error")}, ${plural(warningCount, "warning")}`);
|
|
91
|
+
const active = report.findings.filter((f) => !f.ignored);
|
|
92
|
+
const errors = active.filter((f) => SEVERITY[f.category] === "error");
|
|
93
|
+
const warnings = active.filter((f) => SEVERITY[f.category] === "warning");
|
|
94
|
+
const ignored = report.findings.filter((f) => f.ignored);
|
|
95
|
+
if (errors.length > 0) {
|
|
96
|
+
lines.push("", "Errors:");
|
|
97
|
+
for (const f of errors)
|
|
98
|
+
lines.push(formatFinding(f));
|
|
99
|
+
}
|
|
100
|
+
if (warnings.length > 0) {
|
|
101
|
+
lines.push("", "Warnings:");
|
|
102
|
+
for (const f of warnings)
|
|
103
|
+
lines.push(formatFinding(f));
|
|
104
|
+
}
|
|
105
|
+
if (ignored.length > 0) {
|
|
106
|
+
lines.push("", `Ignored (${ignored.length}):`);
|
|
107
|
+
for (const f of ignored)
|
|
108
|
+
lines.push(formatFinding(f));
|
|
109
|
+
}
|
|
110
|
+
if (errors.length === 0 && warnings.length === 0) {
|
|
111
|
+
lines.push("", "No problems detected.");
|
|
112
|
+
}
|
|
113
|
+
return lines.join("\n") + "\n";
|
|
114
|
+
}
|
|
115
|
+
/** Pluralise a count/noun pair. */
|
|
116
|
+
function plural(count, noun) {
|
|
117
|
+
return `${count} ${noun}${count === 1 ? "" : "s"}`;
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=detect-errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detect-errors.js","sourceRoot":"","sources":["../../src/commands/detect-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EACL,aAAa,EACb,QAAQ,GAGT,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAS9E;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAA4C;IAC1E,OAAO,EAAE,sBAAsB;IAC/B,QAAQ,EAAE,wDAAwD;IAClE,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK;SACF,UAAU,CAAC,MAAM,EAAE;QAClB,IAAI,EAAE,QAAQ;QACd,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,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,YAAY,OAAO,CAAC,MAAM,IAAI,CAAC,CAAC;QAC/C,KAAK,MAAM,CAAC,IAAI,OAAO;YAAE,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;IACxD,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACjD,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,uBAAuB,CAAC,CAAC;IAC1C,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AACjC,CAAC;AAED,mCAAmC;AACnC,SAAS,MAAM,CAAC,KAAa,EAAE,IAAY;IACzC,OAAO,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;AACrD,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { CommandModule } from "yargs";
|
|
2
|
+
interface InstallSkillArgs {
|
|
3
|
+
scope?: string;
|
|
4
|
+
"with-gh"?: boolean;
|
|
5
|
+
"gh-base-url"?: string;
|
|
6
|
+
"gh-org"?: string;
|
|
7
|
+
"gh-repo"?: string;
|
|
8
|
+
"gh-workflow"?: string;
|
|
9
|
+
yes: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* `install-analyze-skill` — write (or update) the `renovate-log-analyzer`
|
|
13
|
+
* SKILL.md that teaches an AI coding agent to analyze Renovate logs with the
|
|
14
|
+
* `analyze` command.
|
|
15
|
+
*
|
|
16
|
+
* Answers come from flags when provided; otherwise the command prompts
|
|
17
|
+
* interactively on a TTY. With `--yes` (or on a non-TTY) prompts are skipped and
|
|
18
|
+
* missing required answers are an error.
|
|
19
|
+
*
|
|
20
|
+
* The skill is written to `<root>/.agents/skills/renovate-log-analyzer/SKILL.md`
|
|
21
|
+
* where `<root>` is the current working directory (local) or the user's home
|
|
22
|
+
* directory (global).
|
|
23
|
+
*
|
|
24
|
+
* Exit codes: 0 = success; 2 = tool/usage error (missing required answer, IO).
|
|
25
|
+
*/
|
|
26
|
+
export declare const installAnalyzeSkillCommand: CommandModule<object, InstallSkillArgs>;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { homedir } from "node:os";
|
|
2
|
+
import { resolve, join } from "node:path";
|
|
3
|
+
import { mkdirSync, writeFileSync, existsSync } from "node:fs";
|
|
4
|
+
import { createInterface } from "node:readline/promises";
|
|
5
|
+
import { stdin, stdout } from "node:process";
|
|
6
|
+
import { buildSkillMarkdown } from "../core/skill-template.js";
|
|
7
|
+
/** Where the skill is written, relative to the chosen root. */
|
|
8
|
+
const SKILL_SUBPATH = join(".agents", "skills", "renovate-log-analyzer");
|
|
9
|
+
const SKILL_FILENAME = "SKILL.md";
|
|
10
|
+
/**
|
|
11
|
+
* `install-analyze-skill` — write (or update) the `renovate-log-analyzer`
|
|
12
|
+
* SKILL.md that teaches an AI coding agent to analyze Renovate logs with the
|
|
13
|
+
* `analyze` command.
|
|
14
|
+
*
|
|
15
|
+
* Answers come from flags when provided; otherwise the command prompts
|
|
16
|
+
* interactively on a TTY. With `--yes` (or on a non-TTY) prompts are skipped and
|
|
17
|
+
* missing required answers are an error.
|
|
18
|
+
*
|
|
19
|
+
* The skill is written to `<root>/.agents/skills/renovate-log-analyzer/SKILL.md`
|
|
20
|
+
* where `<root>` is the current working directory (local) or the user's home
|
|
21
|
+
* directory (global).
|
|
22
|
+
*
|
|
23
|
+
* Exit codes: 0 = success; 2 = tool/usage error (missing required answer, IO).
|
|
24
|
+
*/
|
|
25
|
+
export const installAnalyzeSkillCommand = {
|
|
26
|
+
command: "install-analyze-skill",
|
|
27
|
+
describe: "Install the renovate-log-analyzer SKILL.md for an AI coding agent",
|
|
28
|
+
builder: (yargs) => yargs
|
|
29
|
+
.option("scope", {
|
|
30
|
+
type: "string",
|
|
31
|
+
choices: ["local", "global"],
|
|
32
|
+
describe: "Install location: local (<cwd>/.agents/skills) or global (~/.agents/skills)",
|
|
33
|
+
})
|
|
34
|
+
.option("with-gh", {
|
|
35
|
+
type: "boolean",
|
|
36
|
+
describe: "Include a section on fetching Renovate logs from GitHub via the gh CLI",
|
|
37
|
+
})
|
|
38
|
+
.option("gh-base-url", {
|
|
39
|
+
type: "string",
|
|
40
|
+
describe: "GitHub Enterprise host for the gh section (e.g. github.example.com); omit for github.com",
|
|
41
|
+
})
|
|
42
|
+
.option("gh-org", {
|
|
43
|
+
type: "string",
|
|
44
|
+
describe: "GitHub organization/owner (gh section)",
|
|
45
|
+
})
|
|
46
|
+
.option("gh-repo", {
|
|
47
|
+
type: "string",
|
|
48
|
+
describe: "Repository name (gh section)",
|
|
49
|
+
})
|
|
50
|
+
.option("gh-workflow", {
|
|
51
|
+
type: "string",
|
|
52
|
+
describe: "Filename of the workflow that runs Renovate, e.g. renovate.yml (gh section)",
|
|
53
|
+
})
|
|
54
|
+
.option("yes", {
|
|
55
|
+
type: "boolean",
|
|
56
|
+
default: false,
|
|
57
|
+
describe: "Skip all prompts; fail if a required answer is missing",
|
|
58
|
+
}),
|
|
59
|
+
handler: async (argv) => {
|
|
60
|
+
try {
|
|
61
|
+
const interactive = !argv.yes && stdin.isTTY === true;
|
|
62
|
+
const answers = await resolveAnswers(argv, interactive);
|
|
63
|
+
const root = answers.scope === "global" ? homedir() : process.cwd();
|
|
64
|
+
const dir = resolve(root, SKILL_SUBPATH);
|
|
65
|
+
const file = join(dir, SKILL_FILENAME);
|
|
66
|
+
const updating = existsSync(file);
|
|
67
|
+
const content = buildSkillMarkdown({ gh: answers.gh });
|
|
68
|
+
mkdirSync(dir, { recursive: true });
|
|
69
|
+
writeFileSync(file, content);
|
|
70
|
+
process.stdout.write(`${updating ? "Updated" : "Created"} ${file}\n` +
|
|
71
|
+
(answers.gh
|
|
72
|
+
? `Included GitHub fetch section for ${answers.gh.org}/${answers.gh.repo} ` +
|
|
73
|
+
`(workflow ${answers.gh.workflow}${answers.gh.baseUrl ? `, host ${answers.gh.baseUrl}` : ""}).\n`
|
|
74
|
+
: ""));
|
|
75
|
+
}
|
|
76
|
+
catch (err) {
|
|
77
|
+
console.error(`install-analyze-skill: ${err.message}`);
|
|
78
|
+
process.exitCode = 2;
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Resolve every answer from flags, falling back to interactive prompts when a
|
|
84
|
+
* flag is absent and a TTY is available. When not interactive, a missing
|
|
85
|
+
* required answer throws (tool/usage error).
|
|
86
|
+
*/
|
|
87
|
+
async function resolveAnswers(argv, interactive) {
|
|
88
|
+
const rl = interactive
|
|
89
|
+
? createInterface({ input: stdin, output: stdout })
|
|
90
|
+
: undefined;
|
|
91
|
+
try {
|
|
92
|
+
const scope = await resolveScope(argv.scope, rl);
|
|
93
|
+
const gh = await resolveGh(argv, rl);
|
|
94
|
+
return { scope, gh };
|
|
95
|
+
}
|
|
96
|
+
finally {
|
|
97
|
+
rl?.close();
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
/** Resolve the install scope (local/global). */
|
|
101
|
+
async function resolveScope(flag, rl) {
|
|
102
|
+
if (flag === "local" || flag === "global")
|
|
103
|
+
return flag;
|
|
104
|
+
if (flag !== undefined) {
|
|
105
|
+
throw new Error(`Invalid --scope "${flag}". Expected "local" or "global".`);
|
|
106
|
+
}
|
|
107
|
+
if (!rl) {
|
|
108
|
+
throw new Error('Missing --scope (expected "local" or "global"). Provide it as a flag when running non-interactively.');
|
|
109
|
+
}
|
|
110
|
+
const answer = (await rl.question("Install the skill locally or globally? [local/global] "))
|
|
111
|
+
.trim()
|
|
112
|
+
.toLowerCase();
|
|
113
|
+
if (answer === "" || answer === "l" || answer === "local")
|
|
114
|
+
return "local";
|
|
115
|
+
if (answer === "g" || answer === "global")
|
|
116
|
+
return "global";
|
|
117
|
+
throw new Error(`Invalid choice "${answer}". Expected "local" or "global".`);
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Resolve the optional GitHub-fetch config. `--with-gh` (or an interactive
|
|
121
|
+
* yes/no) gates it; the org/repo/workflow are required once enabled, the base
|
|
122
|
+
* URL is optional.
|
|
123
|
+
*/
|
|
124
|
+
async function resolveGh(argv, rl) {
|
|
125
|
+
const anyGhFlag = argv["gh-org"] !== undefined ||
|
|
126
|
+
argv["gh-repo"] !== undefined ||
|
|
127
|
+
argv["gh-workflow"] !== undefined ||
|
|
128
|
+
argv["gh-base-url"] !== undefined;
|
|
129
|
+
let include;
|
|
130
|
+
if (argv["with-gh"] !== undefined) {
|
|
131
|
+
include = argv["with-gh"];
|
|
132
|
+
}
|
|
133
|
+
else if (anyGhFlag) {
|
|
134
|
+
// gh details supplied without the boolean gate — treat as opt-in.
|
|
135
|
+
include = true;
|
|
136
|
+
}
|
|
137
|
+
else if (rl) {
|
|
138
|
+
include = await promptYesNo(rl, "Include instructions to fetch logs from GitHub via the gh CLI?", false);
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
include = false;
|
|
142
|
+
}
|
|
143
|
+
if (!include)
|
|
144
|
+
return undefined;
|
|
145
|
+
const org = await resolveRequired(argv["gh-org"], rl, "GitHub organization/owner", "--gh-org");
|
|
146
|
+
const repo = await resolveRequired(argv["gh-repo"], rl, "Repository name", "--gh-repo");
|
|
147
|
+
const workflow = await resolveRequired(argv["gh-workflow"], rl, "Workflow filename that runs Renovate (e.g. renovate.yml)", "--gh-workflow");
|
|
148
|
+
const baseUrl = await resolveOptional(argv["gh-base-url"], rl, "GitHub base URL/host (blank for github.com)");
|
|
149
|
+
return { org, repo, workflow, baseUrl: baseUrl || undefined };
|
|
150
|
+
}
|
|
151
|
+
/** Resolve a required free-text answer from a flag or a prompt. */
|
|
152
|
+
async function resolveRequired(flag, rl, label, flagName) {
|
|
153
|
+
if (flag !== undefined && flag.trim() !== "")
|
|
154
|
+
return flag.trim();
|
|
155
|
+
if (!rl) {
|
|
156
|
+
throw new Error(`Missing ${flagName} (${label}). Provide it as a flag when running non-interactively.`);
|
|
157
|
+
}
|
|
158
|
+
const answer = (await rl.question(`${label}: `)).trim();
|
|
159
|
+
if (answer === "")
|
|
160
|
+
throw new Error(`${label} must not be empty.`);
|
|
161
|
+
return answer;
|
|
162
|
+
}
|
|
163
|
+
/** Resolve an optional free-text answer from a flag or a prompt. */
|
|
164
|
+
async function resolveOptional(flag, rl, label) {
|
|
165
|
+
if (flag !== undefined)
|
|
166
|
+
return flag.trim();
|
|
167
|
+
if (!rl)
|
|
168
|
+
return "";
|
|
169
|
+
return (await rl.question(`${label}: `)).trim();
|
|
170
|
+
}
|
|
171
|
+
/** Prompt a yes/no question with a default. */
|
|
172
|
+
async function promptYesNo(rl, question, defaultValue) {
|
|
173
|
+
const hint = defaultValue ? "[Y/n]" : "[y/N]";
|
|
174
|
+
const answer = (await rl.question(`${question} ${hint} `))
|
|
175
|
+
.trim()
|
|
176
|
+
.toLowerCase();
|
|
177
|
+
if (answer === "")
|
|
178
|
+
return defaultValue;
|
|
179
|
+
return answer === "y" || answer === "yes";
|
|
180
|
+
}
|
|
181
|
+
//# sourceMappingURL=install-analyze-skill.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install-analyze-skill.js","sourceRoot":"","sources":["../../src/commands/install-analyze-skill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC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AAI,GAAG,CAAC,CAAC;SACvD,IAAI,EAAE;SACN,WAAW,EAAE,CAAC;IACjB,IAAI,MAAM,KAAK,EAAE;QAAE,OAAO,YAAY,CAAC;IACvC,OAAO,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,KAAK,CAAC;AAC5C,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CommandModule } from "yargs";
|
|
2
|
+
interface WebArgs {
|
|
3
|
+
path?: string;
|
|
4
|
+
port: number;
|
|
5
|
+
host: string;
|
|
6
|
+
open: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* `web` — starts the bundled Nuxt (Nitro) production server.
|
|
10
|
+
*/
|
|
11
|
+
export declare const webCommand: CommandModule<object, WebArgs>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
import { existsSync } from "node:fs";
|
|
4
|
+
import { resolve } from "node:path";
|
|
5
|
+
/**
|
|
6
|
+
* Resolve the prebuilt Nitro server entry that ships inside this package.
|
|
7
|
+
* Layout after `tsc`: dist/commands/web.js → ../../web/.output/server/index.mjs
|
|
8
|
+
*/
|
|
9
|
+
function resolveServerEntry() {
|
|
10
|
+
return fileURLToPath(new URL("../../web/.output/server/index.mjs", import.meta.url));
|
|
11
|
+
}
|
|
12
|
+
/** Best-effort, dependency-free browser opener. */
|
|
13
|
+
function openBrowser(url) {
|
|
14
|
+
const command = process.platform === "darwin"
|
|
15
|
+
? "open"
|
|
16
|
+
: process.platform === "win32"
|
|
17
|
+
? "cmd"
|
|
18
|
+
: "xdg-open";
|
|
19
|
+
const args = process.platform === "win32" ? ["/c", "start", "", url] : [url];
|
|
20
|
+
try {
|
|
21
|
+
spawn(command, args, { stdio: "ignore", detached: true }).unref();
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
// Opening the browser is non-critical; ignore failures.
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* `web` — starts the bundled Nuxt (Nitro) production server.
|
|
29
|
+
*/
|
|
30
|
+
export const webCommand = {
|
|
31
|
+
command: "web [path]",
|
|
32
|
+
describe: "Start the Nuxt-based web UI",
|
|
33
|
+
builder: (yargs) => yargs
|
|
34
|
+
.positional("path", {
|
|
35
|
+
type: "string",
|
|
36
|
+
describe: "Optional Renovate JSONL log to open automatically in the UI",
|
|
37
|
+
})
|
|
38
|
+
.option("port", {
|
|
39
|
+
type: "number",
|
|
40
|
+
default: 3000,
|
|
41
|
+
describe: "Port to listen on",
|
|
42
|
+
})
|
|
43
|
+
.option("host", {
|
|
44
|
+
type: "string",
|
|
45
|
+
default: "localhost",
|
|
46
|
+
describe: "Host to bind to",
|
|
47
|
+
})
|
|
48
|
+
.option("open", {
|
|
49
|
+
type: "boolean",
|
|
50
|
+
default: true,
|
|
51
|
+
describe: "Open the web UI in your browser",
|
|
52
|
+
}),
|
|
53
|
+
handler: (argv) => {
|
|
54
|
+
const serverEntry = resolveServerEntry();
|
|
55
|
+
if (!existsSync(serverEntry)) {
|
|
56
|
+
console.error("The web UI has not been built yet.\n" +
|
|
57
|
+
"Expected server bundle at:\n " +
|
|
58
|
+
serverEntry +
|
|
59
|
+
'\nRun "npm run build" from the package source before using the "web" command.');
|
|
60
|
+
process.exitCode = 1;
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
const baseUrl = `http://${argv.host}:${argv.port}`;
|
|
64
|
+
// When a log path is given, resolve it to an absolute path and hand it off
|
|
65
|
+
// to the UI via `?log=` — the frontend reads it on mount and POSTs it to
|
|
66
|
+
// /api/log/path. The server itself does not need the path.
|
|
67
|
+
let openUrl = baseUrl;
|
|
68
|
+
if (argv.path) {
|
|
69
|
+
const absolutePath = resolve(argv.path);
|
|
70
|
+
if (!existsSync(absolutePath)) {
|
|
71
|
+
console.error(`Log file not found: ${absolutePath}`);
|
|
72
|
+
process.exitCode = 2;
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
openUrl = `${baseUrl}/?log=${encodeURIComponent(absolutePath)}`;
|
|
76
|
+
}
|
|
77
|
+
console.log(`Starting renovate-log-parser web UI on ${baseUrl}`);
|
|
78
|
+
const child = spawn(process.execPath, [serverEntry], {
|
|
79
|
+
stdio: "inherit",
|
|
80
|
+
env: {
|
|
81
|
+
...process.env,
|
|
82
|
+
PORT: String(argv.port),
|
|
83
|
+
HOST: argv.host,
|
|
84
|
+
NITRO_PORT: String(argv.port),
|
|
85
|
+
NITRO_HOST: argv.host,
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
if (argv.open) {
|
|
89
|
+
// Give Nitro a moment to bind before opening the browser.
|
|
90
|
+
setTimeout(() => openBrowser(openUrl), 1000);
|
|
91
|
+
}
|
|
92
|
+
const forward = (signal) => () => {
|
|
93
|
+
if (!child.killed)
|
|
94
|
+
child.kill(signal);
|
|
95
|
+
};
|
|
96
|
+
process.on("SIGINT", forward("SIGINT"));
|
|
97
|
+
process.on("SIGTERM", forward("SIGTERM"));
|
|
98
|
+
child.on("exit", (code) => {
|
|
99
|
+
process.exitCode = code ?? 0;
|
|
100
|
+
});
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
//# sourceMappingURL=web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/commands/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC;;;GAGG;AACH,SAAS,kBAAkB;IACzB,OAAO,aAAa,CAClB,IAAI,GAAG,CAAC,oCAAoC,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,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I,CAAC,IAAI;aACtB;SACF,CAAC,CAAC;QAEH,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,0DAA0D;YAC1D,UAAU,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC;QAC/C,CAAC;QAED,MAAM,OAAO,GAAG,CAAC,MAAsB,EAAE,EAAE,CAAC,GAAG,EAAE;YAC/C,IAAI,CAAC,KAAK,CAAC,MAAM;gBAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACxC,CAAC,CAAC;QACF,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;QACxC,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;QAE1C,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;YACxB,OAAO,CAAC,QAAQ,GAAG,IAAI,IAAI,CAAC,CAAC;QAC/B,CAAC,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Analyzer — produces the two token-efficient views the `analyze` command
|
|
3
|
+
* exposes to an AI coding agent:
|
|
4
|
+
*
|
|
5
|
+
* - {@link Analyzer.stats} — a single pass over the whole log summarising level
|
|
6
|
+
* counts and per-repository structure (line spans, branches, dependency
|
|
7
|
+
* inventory, repo problems). Rendered as compact single-line JSON by the command.
|
|
8
|
+
* - {@link Analyzer.print} — a filtered, line-ranged, limited slice of the log
|
|
9
|
+
* projected to JSONL, with ignored root fields stripped. Selection order is
|
|
10
|
+
* line-range -> filters -> limit, mirroring the source log's order.
|
|
11
|
+
*
|
|
12
|
+
* Repositories are keyed strictly by the root-level `repository` value; entries
|
|
13
|
+
* without one, and git-URL sub-repos whose `repository` is an `https://…` URL
|
|
14
|
+
* (e.g. pre-commit hooks), are excluded from the per-repo view. The dependency
|
|
15
|
+
* inventory is disambiguated strictly by
|
|
16
|
+
* `msg === "packageFiles with updates"`, unioned with root-level
|
|
17
|
+
* `depName`/`packageName` occurrences.
|
|
18
|
+
*/
|
|
19
|
+
import type { Parser } from "./parser.js";
|
|
20
|
+
import type { Filter } from "./filters.js";
|
|
21
|
+
/** Per-repository structural summary emitted by {@link Analyzer.stats}. */
|
|
22
|
+
export interface RepoStats {
|
|
23
|
+
/** The `repository` value verbatim (owner/repo or a git URL). */
|
|
24
|
+
name: string;
|
|
25
|
+
/** rowid (0-indexed line) of this repo's first entry. */
|
|
26
|
+
fromLine: number;
|
|
27
|
+
/** rowid (0-indexed line) of this repo's last entry. */
|
|
28
|
+
toLine: number;
|
|
29
|
+
/** Unique root-level `branch` values, in order of appearance. */
|
|
30
|
+
branches: string[];
|
|
31
|
+
/** rowid of the `branches info extended` entry, or null. */
|
|
32
|
+
branchesInformationLine: number | null;
|
|
33
|
+
/** rowid of the `packageFiles with updates` entry, or null. */
|
|
34
|
+
packageFilesLine: number | null;
|
|
35
|
+
/** Unique `repoProblems` strings, in order of appearance. */
|
|
36
|
+
repoProblems: string[];
|
|
37
|
+
/** Union of root-level `depName` + packageFiles config deps, deduped. */
|
|
38
|
+
depNames: string[];
|
|
39
|
+
/** Union of root-level `packageName` + packageFiles config deps, deduped. */
|
|
40
|
+
packageNames: string[];
|
|
41
|
+
}
|
|
42
|
+
/** Whole-log statistics emitted in stats mode (compact single-line JSON). */
|
|
43
|
+
export interface AnalyzeStats {
|
|
44
|
+
logFile: string;
|
|
45
|
+
md5: string;
|
|
46
|
+
totalLines: number;
|
|
47
|
+
/** Count of entries per numeric level, keyed by the level as a string. */
|
|
48
|
+
levelCounts: Record<string, number>;
|
|
49
|
+
repos: RepoStats[];
|
|
50
|
+
}
|
|
51
|
+
/** Options for {@link Analyzer.print}. */
|
|
52
|
+
export interface PrintOptions {
|
|
53
|
+
/** Root keys to strip from each entry (`msg` is never strippable). */
|
|
54
|
+
ignoredFields: readonly string[];
|
|
55
|
+
/** Inclusive 0-indexed rowid lower bound. */
|
|
56
|
+
lineFrom?: number;
|
|
57
|
+
/** Inclusive 0-indexed rowid upper bound. */
|
|
58
|
+
lineTo?: number;
|
|
59
|
+
/** Maximum number of lines to emit. */
|
|
60
|
+
limit: number;
|
|
61
|
+
/** Scalar-equals / wildcard filters, AND'd (from `--filter` / `--filter-with-wildcard`). */
|
|
62
|
+
filters: readonly Filter[];
|
|
63
|
+
/** When true, add `_oL` (0-indexed source line) to each emitted object. */
|
|
64
|
+
includeOriginalLine: boolean;
|
|
65
|
+
}
|
|
66
|
+
/** Result of {@link Analyzer.print}. */
|
|
67
|
+
export interface PrintResult {
|
|
68
|
+
/** The stripped entries to write, in line order. */
|
|
69
|
+
entries: Record<string, unknown>[];
|
|
70
|
+
/** Total rows matching range + filters (before the limit). */
|
|
71
|
+
totalMatched: number;
|
|
72
|
+
/** Number of entries actually emitted (== entries.length). */
|
|
73
|
+
emitted: number;
|
|
74
|
+
/** True when the limit capped the result (totalMatched > emitted). */
|
|
75
|
+
truncated: boolean;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Computes the `analyze` command's stats and print views against an
|
|
79
|
+
* already-loaded {@link Parser}.
|
|
80
|
+
*/
|
|
81
|
+
export declare class Analyzer {
|
|
82
|
+
private readonly parser;
|
|
83
|
+
constructor(parser: Parser);
|
|
84
|
+
/** Build the whole-log statistics view (single pass, all repositories). */
|
|
85
|
+
stats(): AnalyzeStats;
|
|
86
|
+
/** Build the filtered, ranged, limited JSONL slice (print mode). */
|
|
87
|
+
print(options: PrintOptions): PrintResult;
|
|
88
|
+
private requireLoaded;
|
|
89
|
+
}
|