renovate-log-parser 0.1.1 → 0.2.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/README.md +119 -34
- package/dist/commands/install-analyze-skill.d.ts +0 -1
- package/dist/commands/install-analyze-skill.js +15 -12
- package/dist/commands/install-analyze-skill.js.map +1 -1
- package/dist/commands/web.d.ts +2 -1
- package/dist/commands/web.js +23 -11
- package/dist/commands/web.js.map +1 -1
- package/dist/core/skill-template.js +17 -3
- package/dist/core/skill-template.js.map +1 -1
- package/dist/server/api.d.ts +16 -0
- package/dist/server/api.js +173 -0
- package/dist/server/api.js.map +1 -0
- package/dist/server/http-error.d.ts +18 -0
- package/dist/server/http-error.js +23 -0
- package/dist/server/http-error.js.map +1 -0
- package/dist/server/index.d.ts +34 -0
- package/dist/server/index.js +54 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/log-registry.d.ts +34 -0
- package/dist/server/log-registry.js +157 -0
- package/dist/server/log-registry.js.map +1 -0
- package/dist/server/server-main.d.ts +1 -0
- package/dist/server/server-main.js +31 -0
- package/dist/server/server-main.js.map +1 -0
- package/dist/server/translate-filters.d.ts +58 -0
- package/dist/server/translate-filters.js +119 -0
- package/dist/server/translate-filters.js.map +1 -0
- package/package.json +13 -5
- package/web/.output/public/200.html +1 -0
- package/web/.output/public/404.html +1 -0
- package/web/.output/public/_nuxt/BDNMzG2s.js +1 -0
- package/web/.output/public/_nuxt/BjDV6v2h.js +1 -0
- package/web/.output/public/_nuxt/CVlqYHPc.js +6 -0
- package/web/.output/public/_nuxt/CuOsDQlp.js +1 -0
- package/web/.output/public/_nuxt/CztOM3Aq.js +28 -0
- package/web/.output/public/_nuxt/D3wuHpM_.js +3 -0
- package/web/.output/public/_nuxt/DK3Fl9T5.js +1 -0
- package/web/.output/public/_nuxt/DUXEQ2Eh.js +3 -0
- package/web/.output/public/_nuxt/DVWtRbHb.js +1 -0
- package/web/.output/public/_nuxt/DeS15jQo.js +1 -0
- package/web/.output/public/_nuxt/XP9RigIT.js +1 -0
- package/web/.output/public/_nuxt/builds/latest.json +1 -1
- package/web/.output/public/_nuxt/builds/meta/f68582c9-55a9-4352-b85a-d7f8de6f7202.json +1 -0
- package/web/.output/public/_nuxt/entry.BlZrUrUl.css +2 -0
- package/web/.output/public/_nuxt/error-404.zKZBzOko.css +1 -0
- package/web/.output/public/_nuxt/error-500.DwXcJPfY.css +1 -0
- package/web/.output/public/_nuxt/lGYp6_9X.js +1 -0
- package/web/.output/public/_nuxt/pages.BDcbBSnU.css +1 -0
- package/web/.output/public/_nuxt/public-sans-latin-400-italic.B1appi_f.woff2 +0 -0
- package/web/.output/public/_nuxt/public-sans-latin-400-italic.DsCWG5h0.woff +0 -0
- package/web/.output/public/_nuxt/public-sans-latin-400-normal.8Rpg0ruU.woff2 +0 -0
- package/web/.output/public/_nuxt/public-sans-latin-400-normal.SBbinRkI.woff +0 -0
- package/web/.output/public/_nuxt/public-sans-latin-500-normal.NlrCPXnF.woff2 +0 -0
- package/web/.output/public/_nuxt/public-sans-latin-500-normal.vCxiVFAq.woff +0 -0
- package/web/.output/public/_nuxt/public-sans-latin-600-normal.BR59oU-I.woff +0 -0
- package/web/.output/public/_nuxt/public-sans-latin-600-normal.Fru-LXNs.woff2 +0 -0
- package/web/.output/public/_nuxt/public-sans-latin-700-normal.BqJmxWdE.woff2 +0 -0
- package/web/.output/public/_nuxt/public-sans-latin-700-normal.Dm-oTPSL.woff +0 -0
- package/web/.output/public/favicon-dark.svg +32 -0
- package/web/.output/public/favicon-light.svg +32 -0
- package/web/.output/public/index.html +1 -0
- package/web/.output/nitro.json +0 -15
- 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 +0 -37
- package/web/.output/public/_nuxt/BgApMHS1.js +0 -1
- package/web/.output/public/_nuxt/CGPWRqbc.js +0 -1
- package/web/.output/public/_nuxt/DlAUqK2U.js +0 -1
- package/web/.output/public/_nuxt/Sgtec1U0.js +0 -1
- package/web/.output/public/_nuxt/builds/meta/785e7885-8d38-4aac-a7f6-735f68d27e63.json +0 -1
- package/web/.output/public/_nuxt/entry.9mB-pyEY.css +0 -1
- package/web/.output/public/_nuxt/error-404.B_PvSG-P.css +0 -1
- package/web/.output/public/_nuxt/error-500.CghkKCEr.css +0 -1
- package/web/.output/public/_nuxt/index.BlvAG7F6.css +0 -1
- package/web/.output/public/favicon.ico +0 -0
- package/web/.output/server/chunks/_/error-500.mjs +0 -19
- package/web/.output/server/chunks/_/error-500.mjs.map +0 -1
- package/web/.output/server/chunks/_/icons.mjs +0 -6153
- package/web/.output/server/chunks/_/icons.mjs.map +0 -1
- package/web/.output/server/chunks/_/icons2.mjs +0 -11494
- package/web/.output/server/chunks/_/icons2.mjs.map +0 -1
- package/web/.output/server/chunks/build/_plugin-vue_export-helper-1tPrXgE0.mjs +0 -10
- package/web/.output/server/chunks/build/_plugin-vue_export-helper-1tPrXgE0.mjs.map +0 -1
- package/web/.output/server/chunks/build/client.precomputed.mjs +0 -4
- package/web/.output/server/chunks/build/client.precomputed.mjs.map +0 -1
- package/web/.output/server/chunks/build/error-404-DOK13euR.mjs +0 -106
- package/web/.output/server/chunks/build/error-404-DOK13euR.mjs.map +0 -1
- package/web/.output/server/chunks/build/error-404-styles.9cNA4arh.mjs +0 -8
- package/web/.output/server/chunks/build/error-404-styles.9cNA4arh.mjs.map +0 -1
- package/web/.output/server/chunks/build/error-500-DKHEaocY.mjs +0 -89
- package/web/.output/server/chunks/build/error-500-DKHEaocY.mjs.map +0 -1
- package/web/.output/server/chunks/build/error-500-styles.BX54ZlkH.mjs +0 -8
- package/web/.output/server/chunks/build/error-500-styles.BX54ZlkH.mjs.map +0 -1
- package/web/.output/server/chunks/build/index-D_lNB6LA.mjs +0 -19675
- package/web/.output/server/chunks/build/index-D_lNB6LA.mjs.map +0 -1
- package/web/.output/server/chunks/build/index-styles.V2iua2bE.mjs +0 -8
- package/web/.output/server/chunks/build/index-styles.V2iua2bE.mjs.map +0 -1
- package/web/.output/server/chunks/build/server.mjs +0 -7910
- package/web/.output/server/chunks/build/server.mjs.map +0 -1
- package/web/.output/server/chunks/build/styles.mjs +0 -10
- package/web/.output/server/chunks/build/styles.mjs.map +0 -1
- package/web/.output/server/chunks/nitro/nitro.mjs +0 -6944
- package/web/.output/server/chunks/nitro/nitro.mjs.map +0 -1
- package/web/.output/server/chunks/routes/api/fields.get.mjs +0 -27
- package/web/.output/server/chunks/routes/api/fields.get.mjs.map +0 -1
- package/web/.output/server/chunks/routes/api/findings.get.mjs +0 -30
- package/web/.output/server/chunks/routes/api/findings.get.mjs.map +0 -1
- package/web/.output/server/chunks/routes/api/log/contents.post.mjs +0 -29
- package/web/.output/server/chunks/routes/api/log/contents.post.mjs.map +0 -1
- package/web/.output/server/chunks/routes/api/log/path.post.mjs +0 -30
- package/web/.output/server/chunks/routes/api/log/path.post.mjs.map +0 -1
- package/web/.output/server/chunks/routes/api/repositories.get.mjs +0 -27
- package/web/.output/server/chunks/routes/api/repositories.get.mjs.map +0 -1
- package/web/.output/server/chunks/routes/api/rows.get.mjs +0 -48
- package/web/.output/server/chunks/routes/api/rows.get.mjs.map +0 -1
- package/web/.output/server/chunks/routes/renderer.mjs +0 -451
- package/web/.output/server/chunks/routes/renderer.mjs.map +0 -1
- package/web/.output/server/chunks/virtual/_virtual_spa-template.mjs +0 -4
- package/web/.output/server/chunks/virtual/_virtual_spa-template.mjs.map +0 -1
- package/web/.output/server/index.mjs +0 -16
- package/web/.output/server/index.mjs.map +0 -1
- package/web/.output/server/node_modules/.nitro/hookable@5.5.3/dist/index.mjs +0 -290
- package/web/.output/server/node_modules/.nitro/hookable@5.5.3/package.json +0 -49
- package/web/.output/server/node_modules/.nitro/hookable@6.1.1/dist/index.mjs +0 -257
- package/web/.output/server/node_modules/.nitro/hookable@6.1.1/package.json +0 -53
- package/web/.output/server/node_modules/@babel/parser/lib/index.js +0 -14599
- package/web/.output/server/node_modules/@babel/parser/package.json +0 -50
- package/web/.output/server/node_modules/@floating-ui/core/dist/floating-ui.core.mjs +0 -1038
- package/web/.output/server/node_modules/@floating-ui/core/package.json +0 -63
- package/web/.output/server/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs +0 -789
- package/web/.output/server/node_modules/@floating-ui/dom/package.json +0 -72
- package/web/.output/server/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs +0 -165
- package/web/.output/server/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs +0 -136
- package/web/.output/server/node_modules/@floating-ui/utils/package.json +0 -70
- package/web/.output/server/node_modules/@floating-ui/vue/dist/floating-ui.vue.mjs +0 -190
- package/web/.output/server/node_modules/@floating-ui/vue/package.json +0 -71
- package/web/.output/server/node_modules/@iconify/utils/lib/colors/index.js +0 -295
- package/web/.output/server/node_modules/@iconify/utils/lib/colors/keywords.js +0 -701
- package/web/.output/server/node_modules/@iconify/utils/lib/css/common.js +0 -75
- package/web/.output/server/node_modules/@iconify/utils/lib/css/format.js +0 -39
- package/web/.output/server/node_modules/@iconify/utils/lib/css/icon.js +0 -47
- package/web/.output/server/node_modules/@iconify/utils/lib/css/icons.js +0 -128
- package/web/.output/server/node_modules/@iconify/utils/lib/customisations/bool.js +0 -19
- package/web/.output/server/node_modules/@iconify/utils/lib/customisations/defaults.js +0 -13
- package/web/.output/server/node_modules/@iconify/utils/lib/customisations/flip.js +0 -17
- package/web/.output/server/node_modules/@iconify/utils/lib/customisations/merge.js +0 -16
- package/web/.output/server/node_modules/@iconify/utils/lib/customisations/rotate.js +0 -30
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/cleanup.js +0 -78
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/convert.js +0 -100
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/data.js +0 -28
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/format.js +0 -58
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/parse.js +0 -48
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/regex/base.js +0 -203
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/regex/create.js +0 -33
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/regex/numbers.js +0 -132
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/regex/similar.js +0 -165
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/regex/tree.js +0 -79
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/replace/find.js +0 -92
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/replace/replace.js +0 -26
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/test/components.js +0 -76
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/test/missing.js +0 -66
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/test/name.js +0 -45
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/test/parse.js +0 -103
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/test/similar.js +0 -36
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/test/tree.js +0 -92
- package/web/.output/server/node_modules/@iconify/utils/lib/emoji/test/variations.js +0 -62
- package/web/.output/server/node_modules/@iconify/utils/lib/icon/defaults.js +0 -25
- package/web/.output/server/node_modules/@iconify/utils/lib/icon/merge.js +0 -16
- package/web/.output/server/node_modules/@iconify/utils/lib/icon/name.js +0 -57
- package/web/.output/server/node_modules/@iconify/utils/lib/icon/square.js +0 -33
- package/web/.output/server/node_modules/@iconify/utils/lib/icon/transformations.js +0 -12
- package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/convert-info.js +0 -125
- package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/expand.js +0 -19
- package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icon.js +0 -25
- package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icons.js +0 -36
- package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/minify.js +0 -91
- package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/parse.js +0 -46
- package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/tree.js +0 -23
- package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/validate-basic.js +0 -42
- package/web/.output/server/node_modules/@iconify/utils/lib/icon-set/validate.js +0 -123
- package/web/.output/server/node_modules/@iconify/utils/lib/index.js +0 -52
- package/web/.output/server/node_modules/@iconify/utils/lib/loader/custom.js +0 -30
- package/web/.output/server/node_modules/@iconify/utils/lib/loader/loader.js +0 -26
- package/web/.output/server/node_modules/@iconify/utils/lib/loader/modern.js +0 -27
- package/web/.output/server/node_modules/@iconify/utils/lib/loader/utils.js +0 -105
- package/web/.output/server/node_modules/@iconify/utils/lib/misc/objects.js +0 -26
- package/web/.output/server/node_modules/@iconify/utils/lib/misc/strings.js +0 -26
- package/web/.output/server/node_modules/@iconify/utils/lib/misc/title.js +0 -9
- package/web/.output/server/node_modules/@iconify/utils/lib/svg/build.js +0 -113
- package/web/.output/server/node_modules/@iconify/utils/lib/svg/defs.js +0 -31
- package/web/.output/server/node_modules/@iconify/utils/lib/svg/encode-svg-for-css.js +0 -13
- package/web/.output/server/node_modules/@iconify/utils/lib/svg/html.js +0 -9
- package/web/.output/server/node_modules/@iconify/utils/lib/svg/id.js +0 -41
- package/web/.output/server/node_modules/@iconify/utils/lib/svg/inner-html.js +0 -22
- package/web/.output/server/node_modules/@iconify/utils/lib/svg/parse.js +0 -67
- package/web/.output/server/node_modules/@iconify/utils/lib/svg/pretty.js +0 -54
- package/web/.output/server/node_modules/@iconify/utils/lib/svg/size.js +0 -27
- package/web/.output/server/node_modules/@iconify/utils/lib/svg/trim.js +0 -7
- package/web/.output/server/node_modules/@iconify/utils/lib/svg/url.js +0 -22
- package/web/.output/server/node_modules/@iconify/utils/lib/svg/viewbox.js +0 -8
- package/web/.output/server/node_modules/@iconify/utils/package.json +0 -119
- package/web/.output/server/node_modules/@iconify/vue/dist/iconify.mjs +0 -1896
- package/web/.output/server/node_modules/@iconify/vue/package.json +0 -62
- package/web/.output/server/node_modules/@tanstack/virtual-core/dist/esm/index.js +0 -1268
- package/web/.output/server/node_modules/@tanstack/virtual-core/dist/esm/lazy-measurements.js +0 -34
- package/web/.output/server/node_modules/@tanstack/virtual-core/dist/esm/utils.js +0 -74
- package/web/.output/server/node_modules/@tanstack/virtual-core/package.json +0 -56
- package/web/.output/server/node_modules/@tanstack/vue-virtual/dist/esm/index.js +0 -66
- package/web/.output/server/node_modules/@tanstack/vue-virtual/package.json +0 -68
- package/web/.output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +0 -6759
- package/web/.output/server/node_modules/@vue/compiler-core/package.json +0 -58
- package/web/.output/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +0 -689
- package/web/.output/server/node_modules/@vue/compiler-dom/package.json +0 -57
- package/web/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +0 -1413
- package/web/.output/server/node_modules/@vue/compiler-ssr/package.json +0 -34
- package/web/.output/server/node_modules/@vue/devtools-api/dist/index.js +0 -2
- package/web/.output/server/node_modules/@vue/devtools-api/package.json +0 -34
- package/web/.output/server/node_modules/@vue/devtools-kit/dist/index.js +0 -5670
- package/web/.output/server/node_modules/@vue/devtools-kit/node_modules/hookable/dist/index.mjs +0 -290
- package/web/.output/server/node_modules/@vue/devtools-kit/node_modules/hookable/package.json +0 -49
- package/web/.output/server/node_modules/@vue/devtools-kit/package.json +0 -44
- package/web/.output/server/node_modules/@vue/devtools-shared/dist/index.js +0 -239
- package/web/.output/server/node_modules/@vue/devtools-shared/package.json +0 -33
- package/web/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +0 -1899
- package/web/.output/server/node_modules/@vue/reactivity/package.json +0 -55
- package/web/.output/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +0 -6940
- package/web/.output/server/node_modules/@vue/runtime-core/package.json +0 -52
- package/web/.output/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +0 -1822
- package/web/.output/server/node_modules/@vue/runtime-dom/package.json +0 -60
- package/web/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +0 -896
- package/web/.output/server/node_modules/@vue/server-renderer/package.json +0 -55
- package/web/.output/server/node_modules/@vue/shared/dist/shared.cjs.prod.js +0 -604
- package/web/.output/server/node_modules/@vue/shared/package.json +0 -47
- package/web/.output/server/node_modules/@vueuse/core/dist/index.js +0 -8464
- package/web/.output/server/node_modules/@vueuse/core/package.json +0 -49
- package/web/.output/server/node_modules/@vueuse/shared/dist/index.js +0 -2013
- package/web/.output/server/node_modules/@vueuse/shared/package.json +0 -42
- package/web/.output/server/node_modules/aria-hidden/dist/es5/index.js +0 -174
- package/web/.output/server/node_modules/aria-hidden/package.json +0 -71
- package/web/.output/server/node_modules/birpc/dist/index.mjs +0 -291
- package/web/.output/server/node_modules/birpc/package.json +0 -57
- package/web/.output/server/node_modules/consola/dist/chunks/prompt.mjs +0 -280
- package/web/.output/server/node_modules/consola/dist/core.mjs +0 -512
- package/web/.output/server/node_modules/consola/dist/index.mjs +0 -651
- package/web/.output/server/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs +0 -72
- package/web/.output/server/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs +0 -288
- package/web/.output/server/node_modules/consola/package.json +0 -136
- package/web/.output/server/node_modules/devalue/index.js +0 -4
- package/web/.output/server/node_modules/devalue/package.json +0 -40
- package/web/.output/server/node_modules/devalue/src/base64.js +0 -60
- package/web/.output/server/node_modules/devalue/src/constants.js +0 -12
- package/web/.output/server/node_modules/devalue/src/parse.js +0 -283
- package/web/.output/server/node_modules/devalue/src/stringify.js +0 -401
- package/web/.output/server/node_modules/devalue/src/uneval.js +0 -552
- package/web/.output/server/node_modules/devalue/src/utils.js +0 -160
- package/web/.output/server/node_modules/entities/dist/commonjs/decode-codepoint.js +0 -77
- package/web/.output/server/node_modules/entities/dist/commonjs/decode.js +0 -568
- package/web/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-html.js +0 -7
- package/web/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +0 -7
- package/web/.output/server/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js +0 -21
- package/web/.output/server/node_modules/entities/dist/commonjs/internal/decode-shared.js +0 -31
- package/web/.output/server/node_modules/entities/dist/commonjs/package.json +0 -3
- package/web/.output/server/node_modules/entities/package.json +0 -120
- package/web/.output/server/node_modules/estree-walker/dist/umd/estree-walker.js +0 -344
- package/web/.output/server/node_modules/estree-walker/package.json +0 -37
- package/web/.output/server/node_modules/hookable/dist/index.mjs +0 -257
- package/web/.output/server/node_modules/hookable/package.json +0 -53
- package/web/.output/server/node_modules/nostics/dist/index.mjs +0 -179
- package/web/.output/server/node_modules/nostics/package.json +0 -124
- package/web/.output/server/node_modules/perfect-debounce/dist/index.mjs +0 -89
- package/web/.output/server/node_modules/perfect-debounce/package.json +0 -41
- package/web/.output/server/node_modules/rou3/dist/index.mjs +0 -501
- package/web/.output/server/node_modules/rou3/package.json +0 -48
- package/web/.output/server/node_modules/source-map-js/lib/array-set.js +0 -121
- package/web/.output/server/node_modules/source-map-js/lib/base64-vlq.js +0 -140
- package/web/.output/server/node_modules/source-map-js/lib/base64.js +0 -67
- package/web/.output/server/node_modules/source-map-js/lib/binary-search.js +0 -111
- package/web/.output/server/node_modules/source-map-js/lib/mapping-list.js +0 -79
- package/web/.output/server/node_modules/source-map-js/lib/quick-sort.js +0 -132
- package/web/.output/server/node_modules/source-map-js/lib/source-map-consumer.js +0 -1188
- package/web/.output/server/node_modules/source-map-js/lib/source-map-generator.js +0 -444
- package/web/.output/server/node_modules/source-map-js/lib/source-node.js +0 -413
- package/web/.output/server/node_modules/source-map-js/lib/util.js +0 -594
- package/web/.output/server/node_modules/source-map-js/package.json +0 -71
- package/web/.output/server/node_modules/source-map-js/source-map.js +0 -8
- package/web/.output/server/node_modules/srvx/dist/_chunks/_body-limit.mjs +0 -39
- package/web/.output/server/node_modules/srvx/dist/_chunks/_plugins.mjs +0 -56
- package/web/.output/server/node_modules/srvx/dist/_chunks/_trust-proxy.mjs +0 -58
- package/web/.output/server/node_modules/srvx/dist/_chunks/_url.mjs +0 -134
- package/web/.output/server/node_modules/srvx/dist/_chunks/_utils.mjs +0 -15
- package/web/.output/server/node_modules/srvx/dist/_chunks/_utils2.mjs +0 -75
- package/web/.output/server/node_modules/srvx/dist/adapters/node.mjs +0 -976
- package/web/.output/server/node_modules/srvx/package.json +0 -102
- package/web/.output/server/node_modules/tailwind-merge/dist/bundle-mjs.mjs +0 -3365
- package/web/.output/server/node_modules/tailwind-merge/package.json +0 -93
- package/web/.output/server/node_modules/tailwind-variants/dist/chunk-LQJYWU4O.js +0 -112
- package/web/.output/server/node_modules/tailwind-variants/dist/chunk-RZF76H2U.js +0 -269
- package/web/.output/server/node_modules/tailwind-variants/dist/index.js +0 -38
- package/web/.output/server/node_modules/tailwind-variants/package.json +0 -122
- package/web/.output/server/node_modules/tailwindcss/dist/chunk-X4GG3EDV.mjs +0 -1
- package/web/.output/server/node_modules/tailwindcss/dist/colors.mjs +0 -1
- package/web/.output/server/node_modules/tailwindcss/package.json +0 -89
- package/web/.output/server/node_modules/ufo/dist/index.mjs +0 -645
- package/web/.output/server/node_modules/ufo/package.json +0 -48
- package/web/.output/server/node_modules/unhead/dist/index.mjs +0 -9
- package/web/.output/server/node_modules/unhead/dist/parser.mjs +0 -508
- package/web/.output/server/node_modules/unhead/dist/plugins.mjs +0 -101
- package/web/.output/server/node_modules/unhead/dist/scripts.mjs +0 -30
- package/web/.output/server/node_modules/unhead/dist/server.mjs +0 -180
- package/web/.output/server/node_modules/unhead/dist/shared/unhead.B3VbJo7Y.mjs +0 -207
- package/web/.output/server/node_modules/unhead/dist/shared/unhead.BYvz9V1x.mjs +0 -43
- package/web/.output/server/node_modules/unhead/dist/shared/unhead.BnoAbrHA.mjs +0 -269
- package/web/.output/server/node_modules/unhead/dist/shared/unhead.CaI5ZD4O.mjs +0 -182
- package/web/.output/server/node_modules/unhead/dist/shared/unhead.CbpEuj3y.mjs +0 -71
- package/web/.output/server/node_modules/unhead/dist/shared/unhead.D4vSFytZ.mjs +0 -236
- package/web/.output/server/node_modules/unhead/dist/shared/unhead.DQc16pHI.mjs +0 -196
- package/web/.output/server/node_modules/unhead/dist/shared/unhead.Dh1cQCTe.mjs +0 -44
- package/web/.output/server/node_modules/unhead/dist/shared/unhead.TxTMM7cM.mjs +0 -166
- package/web/.output/server/node_modules/unhead/dist/shared/unhead.yem5I2v_.mjs +0 -38
- package/web/.output/server/node_modules/unhead/dist/utils.mjs +0 -5
- package/web/.output/server/node_modules/unhead/node_modules/hookable/dist/index.mjs +0 -257
- package/web/.output/server/node_modules/unhead/node_modules/hookable/package.json +0 -53
- package/web/.output/server/node_modules/unhead/package.json +0 -105
- package/web/.output/server/node_modules/vue/dist/vue.cjs.js +0 -80
- package/web/.output/server/node_modules/vue/dist/vue.cjs.prod.js +0 -66
- package/web/.output/server/node_modules/vue/index.js +0 -7
- package/web/.output/server/node_modules/vue/index.mjs +0 -1
- package/web/.output/server/node_modules/vue/package.json +0 -112
- package/web/.output/server/node_modules/vue/server-renderer/index.mjs +0 -1
- package/web/.output/server/node_modules/vue-bundle-renderer/dist/runtime.mjs +0 -249
- package/web/.output/server/node_modules/vue-bundle-renderer/package.json +0 -57
- package/web/.output/server/node_modules/vue-demi/lib/index.mjs +0 -34
- package/web/.output/server/node_modules/vue-demi/package.json +0 -47
- package/web/.output/server/node_modules/vue-router/dist/devtools-Bpr7ZAVB.js +0 -1056
- package/web/.output/server/node_modules/vue-router/dist/useApi-CROJJdhE.js +0 -436
- package/web/.output/server/node_modules/vue-router/dist/vue-router.js +0 -1543
- package/web/.output/server/node_modules/vue-router/package.json +0 -214
- package/web/.output/server/node_modules/vue-router/vue-router.node.mjs +0 -2
- package/web/.output/server/package.json +0 -51
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "perfect-debounce",
|
|
3
|
-
"version": "2.1.0",
|
|
4
|
-
"description": "",
|
|
5
|
-
"repository": "unjs/perfect-debounce",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"sideEffects": false,
|
|
8
|
-
"type": "module",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": "./dist/index.mjs"
|
|
11
|
-
},
|
|
12
|
-
"main": "./dist/index.mjs",
|
|
13
|
-
"module": "./dist/index.mjs",
|
|
14
|
-
"types": "./dist/index.d.mts",
|
|
15
|
-
"files": [
|
|
16
|
-
"dist"
|
|
17
|
-
],
|
|
18
|
-
"scripts": {
|
|
19
|
-
"build": "obuild",
|
|
20
|
-
"dev": "vitest dev",
|
|
21
|
-
"lint": "eslint . && prettier --check src test",
|
|
22
|
-
"lint:fix": "eslint . --fix && prettier -w src test",
|
|
23
|
-
"release": "pnpm test && pnpm build && changelogen --release --push && npm publish",
|
|
24
|
-
"test": "vitest run --coverage"
|
|
25
|
-
},
|
|
26
|
-
"devDependencies": {
|
|
27
|
-
"@types/node": "^25.0.10",
|
|
28
|
-
"@vitest/coverage-v8": "^4.0.17",
|
|
29
|
-
"automd": "^0.4.2",
|
|
30
|
-
"changelogen": "^0.6.2",
|
|
31
|
-
"eslint": "^9.39.2",
|
|
32
|
-
"eslint-config-unjs": "^0.6.2",
|
|
33
|
-
"in-range": "^3.0.0",
|
|
34
|
-
"obuild": "^0.4.18",
|
|
35
|
-
"prettier": "^3.8.1",
|
|
36
|
-
"time-span": "^5.1.0",
|
|
37
|
-
"typescript": "^5.9.3",
|
|
38
|
-
"vitest": "^4.0.17"
|
|
39
|
-
},
|
|
40
|
-
"packageManager": "pnpm@10.28.1"
|
|
41
|
-
}
|
|
@@ -1,501 +0,0 @@
|
|
|
1
|
-
const NullProtoObj = /* @__PURE__ */ (() => {
|
|
2
|
-
const e = function() {};
|
|
3
|
-
return e.prototype = Object.create(null), Object.freeze(e.prototype), e;
|
|
4
|
-
})();
|
|
5
|
-
/**
|
|
6
|
-
* Create a new router context.
|
|
7
|
-
*/
|
|
8
|
-
function createRouter() {
|
|
9
|
-
return {
|
|
10
|
-
root: { key: "" },
|
|
11
|
-
static: new NullProtoObj()
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
function expandGroupDelimiters(path) {
|
|
15
|
-
let i = 0;
|
|
16
|
-
let depth = 0;
|
|
17
|
-
for (; i < path.length; i++) {
|
|
18
|
-
const c = path.charCodeAt(i);
|
|
19
|
-
if (c === 92) {
|
|
20
|
-
i++;
|
|
21
|
-
continue;
|
|
22
|
-
}
|
|
23
|
-
if (c === 40) {
|
|
24
|
-
depth++;
|
|
25
|
-
continue;
|
|
26
|
-
}
|
|
27
|
-
if (c === 41 && depth > 0) {
|
|
28
|
-
depth--;
|
|
29
|
-
continue;
|
|
30
|
-
}
|
|
31
|
-
if (c === 123 && depth === 0) break;
|
|
32
|
-
}
|
|
33
|
-
if (i >= path.length) return;
|
|
34
|
-
let j = i + 1;
|
|
35
|
-
depth = 0;
|
|
36
|
-
for (; j < path.length; j++) {
|
|
37
|
-
const c = path.charCodeAt(j);
|
|
38
|
-
if (c === 92) {
|
|
39
|
-
j++;
|
|
40
|
-
continue;
|
|
41
|
-
}
|
|
42
|
-
if (c === 40) {
|
|
43
|
-
depth++;
|
|
44
|
-
continue;
|
|
45
|
-
}
|
|
46
|
-
if (c === 41 && depth > 0) {
|
|
47
|
-
depth--;
|
|
48
|
-
continue;
|
|
49
|
-
}
|
|
50
|
-
if (c === 125 && depth === 0) break;
|
|
51
|
-
}
|
|
52
|
-
if (j >= path.length) return;
|
|
53
|
-
const mod = path[j + 1];
|
|
54
|
-
const hasMod = mod === "?" || mod === "+" || mod === "*";
|
|
55
|
-
const pre = path.slice(0, i);
|
|
56
|
-
const body = path.slice(i + 1, j);
|
|
57
|
-
const suf = path.slice(j + (hasMod ? 2 : 1));
|
|
58
|
-
if (!hasMod) return [pre + body + suf];
|
|
59
|
-
if (mod === "?") return [pre + body + suf, pre + suf];
|
|
60
|
-
if (body.includes("/")) throw new Error("unsupported group repetition across segments");
|
|
61
|
-
return [`${pre}(?:${body})${mod}${suf}`];
|
|
62
|
-
}
|
|
63
|
-
const UNNAMED_GROUP_PREFIX = "__rou3_unnamed_";
|
|
64
|
-
const _unnamedGroupPrefixLength = 15;
|
|
65
|
-
function hasSegmentWildcard(segment) {
|
|
66
|
-
let depth = 0;
|
|
67
|
-
for (let i = 0; i < segment.length; i++) {
|
|
68
|
-
const ch = segment.charCodeAt(i);
|
|
69
|
-
if (ch === 92) {
|
|
70
|
-
i++;
|
|
71
|
-
continue;
|
|
72
|
-
}
|
|
73
|
-
if (ch === 40) {
|
|
74
|
-
depth++;
|
|
75
|
-
continue;
|
|
76
|
-
}
|
|
77
|
-
if (ch === 41 && depth > 0) {
|
|
78
|
-
depth--;
|
|
79
|
-
continue;
|
|
80
|
-
}
|
|
81
|
-
if (ch === 42 && depth === 0) return true;
|
|
82
|
-
}
|
|
83
|
-
return false;
|
|
84
|
-
}
|
|
85
|
-
function replaceSegmentWildcards(segment, unnamedStart, toGroupKey = toUnnamedGroupKey) {
|
|
86
|
-
let depth = 0;
|
|
87
|
-
let nextIndex = unnamedStart;
|
|
88
|
-
let replaced = "";
|
|
89
|
-
for (let i = 0; i < segment.length; i++) {
|
|
90
|
-
const ch = segment.charCodeAt(i);
|
|
91
|
-
if (ch === 92) {
|
|
92
|
-
replaced += segment[i];
|
|
93
|
-
if (i + 1 < segment.length) replaced += segment[++i];
|
|
94
|
-
continue;
|
|
95
|
-
}
|
|
96
|
-
if (ch === 40) {
|
|
97
|
-
depth++;
|
|
98
|
-
replaced += segment[i];
|
|
99
|
-
continue;
|
|
100
|
-
}
|
|
101
|
-
if (ch === 41 && depth > 0) {
|
|
102
|
-
depth--;
|
|
103
|
-
replaced += segment[i];
|
|
104
|
-
continue;
|
|
105
|
-
}
|
|
106
|
-
if (ch === 42 && depth === 0) {
|
|
107
|
-
replaced += `(?<${toGroupKey(nextIndex++)}>[^/]*)`;
|
|
108
|
-
continue;
|
|
109
|
-
}
|
|
110
|
-
replaced += segment[i];
|
|
111
|
-
}
|
|
112
|
-
return [replaced, nextIndex];
|
|
113
|
-
}
|
|
114
|
-
function toUnnamedGroupKey(index) {
|
|
115
|
-
return `${UNNAMED_GROUP_PREFIX}${index}`;
|
|
116
|
-
}
|
|
117
|
-
function normalizeUnnamedGroupKey(key) {
|
|
118
|
-
return key.startsWith("__rou3_unnamed_") ? key.slice(_unnamedGroupPrefixLength) : key;
|
|
119
|
-
}
|
|
120
|
-
function encodeEscapes(path) {
|
|
121
|
-
return path.replace(/\\:/g, "�A").replace(/\\\(/g, "�B").replace(/\\\)/g, "�C").replace(/\\\{/g, "�D").replace(/\\\}/g, "�E");
|
|
122
|
-
}
|
|
123
|
-
function decodeEscaped(segment) {
|
|
124
|
-
return segment.replace(/\uFFFD([A-E])/g, (_, c) => c === "A" ? ":" : c === "B" ? "(" : c === "C" ? ")" : c === "D" ? "{" : "}");
|
|
125
|
-
}
|
|
126
|
-
function expandModifiers(segments) {
|
|
127
|
-
for (let i = 0; i < segments.length; i++) {
|
|
128
|
-
const m = segments[i].match(/^(.*:[\w-]+(?:\([^)]*\))?)([?+*])$/);
|
|
129
|
-
if (!m) continue;
|
|
130
|
-
const pre = segments.slice(0, i);
|
|
131
|
-
const suf = segments.slice(i + 1);
|
|
132
|
-
if (m[2] === "?") return ["/" + pre.concat(m[1]).concat(suf).join("/"), "/" + pre.concat(suf).join("/")];
|
|
133
|
-
const name = m[1].match(/:([\w-]+)/)?.[1] || "_";
|
|
134
|
-
const wc = "/" + [
|
|
135
|
-
...pre,
|
|
136
|
-
`**:${name}`,
|
|
137
|
-
...suf
|
|
138
|
-
].join("/");
|
|
139
|
-
const without = "/" + [...pre, ...suf].join("/");
|
|
140
|
-
return m[2] === "+" ? [wc] : [wc, without];
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
function normalizePath(path) {
|
|
144
|
-
if (!path.includes("/.")) return path;
|
|
145
|
-
const r = [];
|
|
146
|
-
for (const s of path.split("/")) if (s === ".") continue;
|
|
147
|
-
else if (s === ".." && r.length > 1) r.pop();
|
|
148
|
-
else r.push(s);
|
|
149
|
-
return r.join("/") || "/";
|
|
150
|
-
}
|
|
151
|
-
function splitPath(path) {
|
|
152
|
-
const [_, ...s] = path.split("/");
|
|
153
|
-
return s[s.length - 1] === "" ? s.slice(0, -1) : s;
|
|
154
|
-
}
|
|
155
|
-
function getMatchParams(segments, paramsMap) {
|
|
156
|
-
const params = new NullProtoObj();
|
|
157
|
-
for (const [index, name] of paramsMap) {
|
|
158
|
-
const segment = index < 0 ? segments.slice(-(index + 1)).join("/") : segments[index];
|
|
159
|
-
if (typeof name === "string") params[name] = segment;
|
|
160
|
-
else {
|
|
161
|
-
const match = segment.match(name);
|
|
162
|
-
if (match) for (const key in match.groups) params[normalizeUnnamedGroupKey(key)] = match.groups[key];
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
return params;
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
* Add a route to the router context.
|
|
169
|
-
*/
|
|
170
|
-
function addRoute(ctx, method = "", path, data) {
|
|
171
|
-
method = method.toUpperCase();
|
|
172
|
-
if (path.charCodeAt(0) !== 47) path = `/${path}`;
|
|
173
|
-
const groupExpanded = expandGroupDelimiters(path);
|
|
174
|
-
if (groupExpanded) {
|
|
175
|
-
for (const expandedPath of groupExpanded) addRoute(ctx, method, expandedPath, data);
|
|
176
|
-
return;
|
|
177
|
-
}
|
|
178
|
-
path = encodeEscapes(path);
|
|
179
|
-
const segments = splitPath(path);
|
|
180
|
-
const expanded = expandModifiers(segments);
|
|
181
|
-
if (expanded) {
|
|
182
|
-
for (const p of expanded) addRoute(ctx, method, p, data);
|
|
183
|
-
return;
|
|
184
|
-
}
|
|
185
|
-
let node = ctx.root;
|
|
186
|
-
let _unnamedParamIndex = 0;
|
|
187
|
-
const paramsMap = [];
|
|
188
|
-
const paramsRegexp = [];
|
|
189
|
-
for (let i = 0; i < segments.length; i++) {
|
|
190
|
-
let segment = segments[i];
|
|
191
|
-
if (segment.startsWith("**")) {
|
|
192
|
-
if (!node.wildcard) node.wildcard = { key: "**" };
|
|
193
|
-
node = node.wildcard;
|
|
194
|
-
paramsMap.push([
|
|
195
|
-
-(i + 1),
|
|
196
|
-
segment.split(":")[1] || "_",
|
|
197
|
-
segment.length === 2
|
|
198
|
-
]);
|
|
199
|
-
break;
|
|
200
|
-
}
|
|
201
|
-
if (segment === "*" || segment.includes(":") || segment.includes("(") || hasSegmentWildcard(segment)) {
|
|
202
|
-
if (!node.param) node.param = { key: "*" };
|
|
203
|
-
node = node.param;
|
|
204
|
-
if (segment === "*") paramsMap.push([
|
|
205
|
-
i,
|
|
206
|
-
String(_unnamedParamIndex++),
|
|
207
|
-
true
|
|
208
|
-
]);
|
|
209
|
-
else if (segment.includes(":", 1) || segment.includes("(") || hasSegmentWildcard(segment) || !/^:[\w-]+$/.test(segment)) {
|
|
210
|
-
const [regexp, nextIndex] = getParamRegexp(segment, _unnamedParamIndex);
|
|
211
|
-
_unnamedParamIndex = nextIndex;
|
|
212
|
-
paramsRegexp[i] = regexp;
|
|
213
|
-
node.hasRegexParam = true;
|
|
214
|
-
paramsMap.push([
|
|
215
|
-
i,
|
|
216
|
-
regexp,
|
|
217
|
-
false
|
|
218
|
-
]);
|
|
219
|
-
} else paramsMap.push([
|
|
220
|
-
i,
|
|
221
|
-
segment.slice(1),
|
|
222
|
-
false
|
|
223
|
-
]);
|
|
224
|
-
continue;
|
|
225
|
-
}
|
|
226
|
-
if (segment === "\\*") segment = segments[i] = "*";
|
|
227
|
-
else if (segment === "\\*\\*") segment = segments[i] = "**";
|
|
228
|
-
segment = segments[i] = decodeEscaped(segment);
|
|
229
|
-
const child = node.static?.[segment];
|
|
230
|
-
if (child) node = child;
|
|
231
|
-
else {
|
|
232
|
-
const staticNode = { key: segment };
|
|
233
|
-
if (!node.static) node.static = new NullProtoObj();
|
|
234
|
-
node.static[segment] = staticNode;
|
|
235
|
-
node = staticNode;
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
const hasParams = paramsMap.length > 0;
|
|
239
|
-
if (!node.methods) node.methods = new NullProtoObj();
|
|
240
|
-
node.methods[method] ??= [];
|
|
241
|
-
node.methods[method].push({
|
|
242
|
-
data: data || null,
|
|
243
|
-
paramsRegexp,
|
|
244
|
-
paramsMap: hasParams ? paramsMap : void 0
|
|
245
|
-
});
|
|
246
|
-
if (!hasParams) ctx.static["/" + segments.join("/")] = node;
|
|
247
|
-
}
|
|
248
|
-
function getParamRegexp(segment, unnamedStart = 0) {
|
|
249
|
-
let _i = unnamedStart;
|
|
250
|
-
let _s = "", _d = 0;
|
|
251
|
-
for (let j = 0; j < segment.length; j++) {
|
|
252
|
-
const c = segment.charCodeAt(j);
|
|
253
|
-
if (c === 40) _d++;
|
|
254
|
-
else if (c === 41 && _d > 0) _d--;
|
|
255
|
-
else if (c === 92 && _d === 0 && j + 1 < segment.length) {
|
|
256
|
-
const n = segment[j + 1];
|
|
257
|
-
if (n !== ":" && n !== "(" && n !== "*" && n !== "\\") {
|
|
258
|
-
_s += "" + n;
|
|
259
|
-
j++;
|
|
260
|
-
continue;
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
_s += segment[j];
|
|
264
|
-
}
|
|
265
|
-
[_s, _i] = replaceSegmentWildcards(_s, _i);
|
|
266
|
-
const regex = _s.replace(/:([\w-]+)(?:\(([^)]*)\))?/g, (_, id, p) => `(?<${id}>${p || "[^/]+"})`).replace(/\((?![?<])/g, () => `(?<${toUnnamedGroupKey(_i++)}>`).replace(/\./g, "\\.").replace(/\uFFFE(.)/g, (_, c) => /[.*+?^${}()|[\]\\]/.test(c) ? `\\${c}` : c);
|
|
267
|
-
return [new RegExp(`^${regex}$`), _i];
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
* Find a route by path.
|
|
271
|
-
*/
|
|
272
|
-
function findRoute(ctx, method = "", path, opts) {
|
|
273
|
-
if (opts?.normalize) path = normalizePath(path);
|
|
274
|
-
if (path.charCodeAt(path.length - 1) === 47) path = path.slice(0, -1);
|
|
275
|
-
const staticNode = ctx.static[path];
|
|
276
|
-
if (staticNode && staticNode.methods) {
|
|
277
|
-
const staticMatch = staticNode.methods[method] || staticNode.methods[""];
|
|
278
|
-
if (staticMatch !== void 0) return staticMatch[0];
|
|
279
|
-
}
|
|
280
|
-
const segments = splitPath(path);
|
|
281
|
-
const match = _lookupTree(ctx.root, method, segments, 0)?.[0];
|
|
282
|
-
if (match === void 0) return;
|
|
283
|
-
if (opts?.params === false) return match;
|
|
284
|
-
return {
|
|
285
|
-
data: match.data,
|
|
286
|
-
params: match.paramsMap ? getMatchParams(segments, match.paramsMap) : void 0
|
|
287
|
-
};
|
|
288
|
-
}
|
|
289
|
-
function _lookupTree(node, method, segments, index) {
|
|
290
|
-
if (index === segments.length) {
|
|
291
|
-
if (node.methods) {
|
|
292
|
-
const match = node.methods[method] || node.methods[""];
|
|
293
|
-
if (match) return match;
|
|
294
|
-
}
|
|
295
|
-
if (node.param && node.param.methods) {
|
|
296
|
-
const match = node.param.methods[method] || node.param.methods[""];
|
|
297
|
-
if (match) {
|
|
298
|
-
const pMap = match[0].paramsMap;
|
|
299
|
-
if (pMap?.[pMap?.length - 1]?.[2]) return match;
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
if (node.wildcard && node.wildcard.methods) {
|
|
303
|
-
const match = node.wildcard.methods[method] || node.wildcard.methods[""];
|
|
304
|
-
if (match) {
|
|
305
|
-
const pMap = match[0].paramsMap;
|
|
306
|
-
if (pMap?.[pMap?.length - 1]?.[2]) return match;
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
return;
|
|
310
|
-
}
|
|
311
|
-
const segment = segments[index];
|
|
312
|
-
if (node.static) {
|
|
313
|
-
const staticChild = node.static[segment];
|
|
314
|
-
if (staticChild) {
|
|
315
|
-
const match = _lookupTree(staticChild, method, segments, index + 1);
|
|
316
|
-
if (match) return match;
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
if (node.param) {
|
|
320
|
-
const match = _lookupTree(node.param, method, segments, index + 1);
|
|
321
|
-
if (match) {
|
|
322
|
-
if (node.param.hasRegexParam) {
|
|
323
|
-
const exactMatch = match.find((m) => m.paramsRegexp[index]?.test(segment)) || match.find((m) => !m.paramsRegexp[index]);
|
|
324
|
-
return exactMatch ? [exactMatch] : void 0;
|
|
325
|
-
}
|
|
326
|
-
return match;
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
if (node.wildcard && node.wildcard.methods) return node.wildcard.methods[method] || node.wildcard.methods[""];
|
|
330
|
-
}
|
|
331
|
-
/**
|
|
332
|
-
* Remove a route from the router context.
|
|
333
|
-
*/
|
|
334
|
-
function removeRoute(ctx, method, path) {
|
|
335
|
-
const groupExpanded = expandGroupDelimiters(path);
|
|
336
|
-
if (groupExpanded) {
|
|
337
|
-
for (const expandedPath of groupExpanded) removeRoute(ctx, method, expandedPath);
|
|
338
|
-
return;
|
|
339
|
-
}
|
|
340
|
-
path = encodeEscapes(path);
|
|
341
|
-
const segments = splitPath(path);
|
|
342
|
-
const modExpanded = expandModifiers(segments);
|
|
343
|
-
if (modExpanded) {
|
|
344
|
-
for (const expandedPath of modExpanded) removeRoute(ctx, method, expandedPath);
|
|
345
|
-
return;
|
|
346
|
-
}
|
|
347
|
-
_remove(ctx.root, method || "", segments, 0);
|
|
348
|
-
}
|
|
349
|
-
function _remove(node, method, segments, index) {
|
|
350
|
-
if (index === segments.length) {
|
|
351
|
-
if (node.methods && method in node.methods) {
|
|
352
|
-
delete node.methods[method];
|
|
353
|
-
if (Object.keys(node.methods).length === 0) node.methods = void 0;
|
|
354
|
-
}
|
|
355
|
-
return;
|
|
356
|
-
}
|
|
357
|
-
const segment = segments[index];
|
|
358
|
-
if (segment.startsWith("**")) {
|
|
359
|
-
if (node.wildcard) {
|
|
360
|
-
_remove(node.wildcard, method, segments, index + 1);
|
|
361
|
-
if (_isEmptyNode(node.wildcard)) node.wildcard = void 0;
|
|
362
|
-
}
|
|
363
|
-
return;
|
|
364
|
-
}
|
|
365
|
-
if (_isParamSegment(segment)) {
|
|
366
|
-
if (node.param) {
|
|
367
|
-
_remove(node.param, method, segments, index + 1);
|
|
368
|
-
if (_isEmptyNode(node.param)) node.param = void 0;
|
|
369
|
-
}
|
|
370
|
-
return;
|
|
371
|
-
}
|
|
372
|
-
const decodedSegment = decodeEscaped(segment);
|
|
373
|
-
const childNode = node.static?.[decodedSegment];
|
|
374
|
-
if (childNode) {
|
|
375
|
-
_remove(childNode, method, segments, index + 1);
|
|
376
|
-
if (_isEmptyNode(childNode)) {
|
|
377
|
-
delete node.static[decodedSegment];
|
|
378
|
-
if (Object.keys(node.static).length === 0) node.static = void 0;
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
function _isParamSegment(segment) {
|
|
383
|
-
return segment === "*" || segment.includes(":") || segment.includes("(") || hasSegmentWildcard(segment);
|
|
384
|
-
}
|
|
385
|
-
function _isEmptyNode(node) {
|
|
386
|
-
return node.methods === void 0 && node.static === void 0 && node.param === void 0 && node.wildcard === void 0;
|
|
387
|
-
}
|
|
388
|
-
/**
|
|
389
|
-
* Find all route patterns that match the given path.
|
|
390
|
-
*/
|
|
391
|
-
function findAllRoutes(ctx, method = "", path, opts) {
|
|
392
|
-
if (opts?.normalize) path = normalizePath(path);
|
|
393
|
-
if (path.charCodeAt(path.length - 1) === 47) path = path.slice(0, -1);
|
|
394
|
-
const segments = splitPath(path);
|
|
395
|
-
const matches = _findAll(ctx.root, method, segments, 0);
|
|
396
|
-
if (opts?.params === false) return matches;
|
|
397
|
-
return matches.map((m) => {
|
|
398
|
-
return {
|
|
399
|
-
data: m.data,
|
|
400
|
-
params: m.paramsMap ? getMatchParams(segments, m.paramsMap) : void 0
|
|
401
|
-
};
|
|
402
|
-
});
|
|
403
|
-
}
|
|
404
|
-
function _findAll(node, method, segments, index, matches = []) {
|
|
405
|
-
const segment = segments[index];
|
|
406
|
-
if (node.wildcard && node.wildcard.methods) {
|
|
407
|
-
const match = node.wildcard.methods[method] || node.wildcard.methods[""];
|
|
408
|
-
if (match) matches.push(...match);
|
|
409
|
-
}
|
|
410
|
-
if (node.param) {
|
|
411
|
-
_findAll(node.param, method, segments, index + 1, matches);
|
|
412
|
-
if (index === segments.length && node.param.methods) {
|
|
413
|
-
const match = node.param.methods[method] || node.param.methods[""];
|
|
414
|
-
if (match) {
|
|
415
|
-
const pMap = match[0].paramsMap;
|
|
416
|
-
if (pMap?.[pMap?.length - 1]?.[2]) matches.push(...match);
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
const staticChild = node.static?.[segment];
|
|
421
|
-
if (staticChild) _findAll(staticChild, method, segments, index + 1, matches);
|
|
422
|
-
if (index === segments.length && node.methods) {
|
|
423
|
-
const match = node.methods[method] || node.methods[""];
|
|
424
|
-
if (match) matches.push(...match);
|
|
425
|
-
}
|
|
426
|
-
return matches;
|
|
427
|
-
}
|
|
428
|
-
const _P = "";
|
|
429
|
-
function replaceEscapesOutsideGroups(segment) {
|
|
430
|
-
let r = "", d = 0;
|
|
431
|
-
for (let i = 0; i < segment.length; i++) {
|
|
432
|
-
const c = segment.charCodeAt(i);
|
|
433
|
-
if (c === 40) d++;
|
|
434
|
-
else if (c === 41 && d > 0) d--;
|
|
435
|
-
else if (c === 92 && d === 0 && i + 1 < segment.length) {
|
|
436
|
-
const n = segment[i + 1];
|
|
437
|
-
if (n !== ":" && n !== "(" && n !== "*" && n !== "\\") {
|
|
438
|
-
r += _P + n;
|
|
439
|
-
i++;
|
|
440
|
-
continue;
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
r += segment[i];
|
|
444
|
-
}
|
|
445
|
-
return r;
|
|
446
|
-
}
|
|
447
|
-
function resolveEscapePlaceholders(str) {
|
|
448
|
-
return str.replace(/\uFFFE(.)/g, (_, c) => /[.*+?^${}()|[\]\\]/.test(c) ? `\\${c}` : c);
|
|
449
|
-
}
|
|
450
|
-
function routeToRegExp(route = "/") {
|
|
451
|
-
const groupExpanded = expandGroupDelimiters(route);
|
|
452
|
-
if (groupExpanded) {
|
|
453
|
-
const sources = groupExpanded.map((expandedRoute) => routeToRegExp(expandedRoute).source.slice(1, -1));
|
|
454
|
-
return new RegExp(`^(?:${sources.join("|")})$`);
|
|
455
|
-
}
|
|
456
|
-
return _routeToRegExp(route);
|
|
457
|
-
}
|
|
458
|
-
function _routeToRegExp(route) {
|
|
459
|
-
const reSegments = [];
|
|
460
|
-
let idCtr = 0;
|
|
461
|
-
for (const segment of route.split("/")) {
|
|
462
|
-
if (!segment) continue;
|
|
463
|
-
if (segment === "*") reSegments.push(`(?<${toRegExpUnnamedKey(idCtr++)}>[^/]*)`);
|
|
464
|
-
else if (segment.startsWith("**")) reSegments.push(segment === "**" ? "?(?<_>.*)" : `?(?<${segment.slice(3)}>.+)`);
|
|
465
|
-
else if (segment.includes(":") || /(^|[^\\])\(/.test(segment) || hasSegmentWildcard(segment)) {
|
|
466
|
-
const modMatch = segment.match(/^(.*:[\w-]+(?:\([^)]*\))?)([?+*])$/);
|
|
467
|
-
if (modMatch) {
|
|
468
|
-
const [, base, mod] = modMatch;
|
|
469
|
-
const name = base.match(/:([\w-]+)/)?.[1] || `_${idCtr++}`;
|
|
470
|
-
if (mod === "?") {
|
|
471
|
-
const inner = base.replace(/:([\w-]+)(?:\(([^)]*)\))?/g, (_, id, pattern) => `(?<${id}>${pattern || "[^/]+"})`).replace(/\./g, "\\.");
|
|
472
|
-
if (reSegments.length > 0) {
|
|
473
|
-
const prevQ = reSegments.pop();
|
|
474
|
-
reSegments.push(`${prevQ}(?:/${inner})?`);
|
|
475
|
-
} else reSegments.push(`?${inner}?`);
|
|
476
|
-
continue;
|
|
477
|
-
}
|
|
478
|
-
const pattern = base.match(/:(\w+)(?:\(([^)]*)\))?/)?.[2];
|
|
479
|
-
if (reSegments.length > 0) {
|
|
480
|
-
const prevMod = reSegments.pop();
|
|
481
|
-
if (pattern) {
|
|
482
|
-
const repeated = `${pattern}(?:/${pattern})*`;
|
|
483
|
-
reSegments.push(mod === "+" ? `${prevMod}/(?<${name}>${repeated})` : `${prevMod}(?:/(?<${name}>${repeated}))?`);
|
|
484
|
-
} else reSegments.push(mod === "+" ? `${prevMod}/(?<${name}>.+)` : `${prevMod}(?:/(?<${name}>.*))?`);
|
|
485
|
-
} else if (pattern) {
|
|
486
|
-
const repeated = `${pattern}(?:/${pattern})*`;
|
|
487
|
-
reSegments.push(mod === "+" ? `?(?<${name}>${repeated})` : `?(?<${name}>${repeated})?`);
|
|
488
|
-
} else reSegments.push(mod === "+" ? `?(?<${name}>.+)` : `?(?<${name}>.*)`);
|
|
489
|
-
continue;
|
|
490
|
-
}
|
|
491
|
-
let dynamicSegment = replaceEscapesOutsideGroups(segment);
|
|
492
|
-
[dynamicSegment, idCtr] = replaceSegmentWildcards(dynamicSegment, idCtr, toRegExpUnnamedKey);
|
|
493
|
-
reSegments.push(resolveEscapePlaceholders(dynamicSegment.replace(/:([\w-]+)(?:\(([^)]*)\))?/g, (_, id, pattern) => `(?<${id}>${pattern || "[^/]+"})`).replace(/(^|[^\\])\((?![?<])/g, (_, p) => `${p}(?<${toRegExpUnnamedKey(idCtr++)}>`).replace(/\./g, "\\.")));
|
|
494
|
-
} else reSegments.push(segment.replace(/\\(.)/g, "$1").replace(/[.*+?^${}()|[\]]/g, "\\$&"));
|
|
495
|
-
}
|
|
496
|
-
return new RegExp(`^/${reSegments.join("/")}/?$`);
|
|
497
|
-
}
|
|
498
|
-
function toRegExpUnnamedKey(index) {
|
|
499
|
-
return `_${index}`;
|
|
500
|
-
}
|
|
501
|
-
export { NullProtoObj, addRoute, createRouter, findAllRoutes, findRoute, removeRoute, routeToRegExp };
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "rou3",
|
|
3
|
-
"version": "0.8.1",
|
|
4
|
-
"description": "Lightweight and fast router for JavaScript.",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"repository": "h3js/rou3",
|
|
7
|
-
"files": [
|
|
8
|
-
"dist"
|
|
9
|
-
],
|
|
10
|
-
"type": "module",
|
|
11
|
-
"sideEffects": false,
|
|
12
|
-
"types": "./dist/index.d.mts",
|
|
13
|
-
"exports": {
|
|
14
|
-
".": "./dist/index.mjs",
|
|
15
|
-
"./compiler": "./dist/compiler.mjs"
|
|
16
|
-
},
|
|
17
|
-
"scripts": {
|
|
18
|
-
"bench:bun": "bun ./test/bench",
|
|
19
|
-
"bench:deno": "deno run -A ./test/bench/index.ts",
|
|
20
|
-
"bench:node": "node --expose-gc --allow-natives-syntax --disable-warning=ExperimentalWarning --experimental-strip-types ./test/bench/index.ts",
|
|
21
|
-
"build": "obuild",
|
|
22
|
-
"dev": "vitest",
|
|
23
|
-
"lint": "oxlint . && oxfmt --check src test",
|
|
24
|
-
"lint:fix": "automd && oxlint --fix . && oxfmt src test",
|
|
25
|
-
"release": "pnpm test && pnpm build && changelogen --release && git push --follow-tags && npm publish",
|
|
26
|
-
"test": "pnpm lint && pnpm test:types && vitest run --coverage",
|
|
27
|
-
"test:types": "tsgo --noEmit"
|
|
28
|
-
},
|
|
29
|
-
"devDependencies": {
|
|
30
|
-
"0x": "^6.0.0",
|
|
31
|
-
"@mitata/counters": "^0.0.8",
|
|
32
|
-
"@types/node": "^25.3.5",
|
|
33
|
-
"@typescript/native-preview": "7.0.0-dev.20260308.1",
|
|
34
|
-
"@vitest/coverage-v8": "^4.0.18",
|
|
35
|
-
"automd": "^0.4.3",
|
|
36
|
-
"changelogen": "^0.6.2",
|
|
37
|
-
"esbuild": "^0.27.3",
|
|
38
|
-
"eslint-config-unjs": "^0.6.2",
|
|
39
|
-
"mitata": "^1.0.34",
|
|
40
|
-
"obuild": "^0.4.32",
|
|
41
|
-
"oxfmt": "^0.36.0",
|
|
42
|
-
"oxlint": "^1.51.0",
|
|
43
|
-
"rou3-latest": "npm:rou3@^0.7.12",
|
|
44
|
-
"typescript": "^5.9.3",
|
|
45
|
-
"vitest": "^4.0.18"
|
|
46
|
-
},
|
|
47
|
-
"packageManager": "pnpm@10.31.0"
|
|
48
|
-
}
|