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,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vueuse/shared",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "14.3.0",
|
|
5
|
+
"author": "Anthony Fu <https://github.com/antfu>",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"funding": "https://github.com/sponsors/antfu",
|
|
8
|
+
"homepage": "https://github.com/vueuse/vueuse/tree/main/packages/shared#readme",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/vueuse/vueuse.git",
|
|
12
|
+
"directory": "packages/shared"
|
|
13
|
+
},
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/vueuse/vueuse/issues"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"vue",
|
|
19
|
+
"vue-use",
|
|
20
|
+
"utils"
|
|
21
|
+
],
|
|
22
|
+
"sideEffects": false,
|
|
23
|
+
"exports": {
|
|
24
|
+
".": "./dist/index.js",
|
|
25
|
+
"./*": "./dist/*",
|
|
26
|
+
"./package.json": "./package.json"
|
|
27
|
+
},
|
|
28
|
+
"main": "./dist/index.js",
|
|
29
|
+
"module": "./dist/index.js",
|
|
30
|
+
"unpkg": "./dist/index.iife.min.js",
|
|
31
|
+
"jsdelivr": "./dist/index.iife.min.js",
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"files": [
|
|
34
|
+
"dist"
|
|
35
|
+
],
|
|
36
|
+
"peerDependencies": {
|
|
37
|
+
"vue": "^3.5.0"
|
|
38
|
+
},
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "tsdown"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.suppressOthers = exports.supportsInert = exports.inertOthers = exports.hideOthers = void 0;
|
|
4
|
+
var getDefaultParent = function (originalTarget) {
|
|
5
|
+
if (typeof document === 'undefined') {
|
|
6
|
+
return null;
|
|
7
|
+
}
|
|
8
|
+
var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;
|
|
9
|
+
return sampleTarget.ownerDocument.body;
|
|
10
|
+
};
|
|
11
|
+
var counterMap = new WeakMap();
|
|
12
|
+
var uncontrolledNodes = new WeakMap();
|
|
13
|
+
var markerMap = {};
|
|
14
|
+
var lockCount = 0;
|
|
15
|
+
var unwrapHost = function (node) {
|
|
16
|
+
return node && (node.host || unwrapHost(node.parentNode));
|
|
17
|
+
};
|
|
18
|
+
var correctTargets = function (parent, targets) {
|
|
19
|
+
return targets
|
|
20
|
+
.map(function (target) {
|
|
21
|
+
if (parent.contains(target)) {
|
|
22
|
+
return target;
|
|
23
|
+
}
|
|
24
|
+
var correctedTarget = unwrapHost(target);
|
|
25
|
+
if (correctedTarget && parent.contains(correctedTarget)) {
|
|
26
|
+
return correctedTarget;
|
|
27
|
+
}
|
|
28
|
+
console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing');
|
|
29
|
+
return null;
|
|
30
|
+
})
|
|
31
|
+
.filter(function (x) { return Boolean(x); });
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Marks everything except given node(or nodes) as aria-hidden
|
|
35
|
+
* @param {Element | Element[]} originalTarget - elements to keep on the page
|
|
36
|
+
* @param [parentNode] - top element, defaults to document.body
|
|
37
|
+
* @param {String} [markerName] - a special attribute to mark every node
|
|
38
|
+
* @param {String} [controlAttribute] - html Attribute to control
|
|
39
|
+
* @return {Undo} undo command
|
|
40
|
+
*/
|
|
41
|
+
var applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) {
|
|
42
|
+
var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
|
|
43
|
+
if (!markerMap[markerName]) {
|
|
44
|
+
markerMap[markerName] = new WeakMap();
|
|
45
|
+
}
|
|
46
|
+
var markerCounter = markerMap[markerName];
|
|
47
|
+
var hiddenNodes = [];
|
|
48
|
+
var elementsToKeep = new Set();
|
|
49
|
+
var elementsToStop = new Set(targets);
|
|
50
|
+
var keep = function (el) {
|
|
51
|
+
if (!el || elementsToKeep.has(el)) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
elementsToKeep.add(el);
|
|
55
|
+
keep(el.parentNode);
|
|
56
|
+
};
|
|
57
|
+
targets.forEach(keep);
|
|
58
|
+
var deep = function (parent) {
|
|
59
|
+
if (!parent || elementsToStop.has(parent)) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
Array.prototype.forEach.call(parent.children, function (node) {
|
|
63
|
+
if (elementsToKeep.has(node)) {
|
|
64
|
+
deep(node);
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
try {
|
|
68
|
+
var attr = node.getAttribute(controlAttribute);
|
|
69
|
+
var alreadyHidden = attr !== null && attr !== 'false';
|
|
70
|
+
var counterValue = (counterMap.get(node) || 0) + 1;
|
|
71
|
+
var markerValue = (markerCounter.get(node) || 0) + 1;
|
|
72
|
+
counterMap.set(node, counterValue);
|
|
73
|
+
markerCounter.set(node, markerValue);
|
|
74
|
+
hiddenNodes.push(node);
|
|
75
|
+
if (counterValue === 1 && alreadyHidden) {
|
|
76
|
+
uncontrolledNodes.set(node, true);
|
|
77
|
+
}
|
|
78
|
+
if (markerValue === 1) {
|
|
79
|
+
node.setAttribute(markerName, 'true');
|
|
80
|
+
}
|
|
81
|
+
if (!alreadyHidden) {
|
|
82
|
+
node.setAttribute(controlAttribute, 'true');
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
catch (e) {
|
|
86
|
+
console.error('aria-hidden: cannot operate on ', node, e);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
deep(parentNode);
|
|
92
|
+
elementsToKeep.clear();
|
|
93
|
+
lockCount++;
|
|
94
|
+
return function () {
|
|
95
|
+
hiddenNodes.forEach(function (node) {
|
|
96
|
+
var counterValue = counterMap.get(node) - 1;
|
|
97
|
+
var markerValue = markerCounter.get(node) - 1;
|
|
98
|
+
counterMap.set(node, counterValue);
|
|
99
|
+
markerCounter.set(node, markerValue);
|
|
100
|
+
if (!counterValue) {
|
|
101
|
+
if (!uncontrolledNodes.has(node)) {
|
|
102
|
+
node.removeAttribute(controlAttribute);
|
|
103
|
+
}
|
|
104
|
+
uncontrolledNodes.delete(node);
|
|
105
|
+
}
|
|
106
|
+
if (!markerValue) {
|
|
107
|
+
node.removeAttribute(markerName);
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
lockCount--;
|
|
111
|
+
if (!lockCount) {
|
|
112
|
+
// clear
|
|
113
|
+
counterMap = new WeakMap();
|
|
114
|
+
counterMap = new WeakMap();
|
|
115
|
+
uncontrolledNodes = new WeakMap();
|
|
116
|
+
markerMap = {};
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* Marks everything except given node(or nodes) as aria-hidden
|
|
122
|
+
* @param {Element | Element[]} originalTarget - elements to keep on the page
|
|
123
|
+
* @param [parentNode] - top element, defaults to document.body
|
|
124
|
+
* @param {String} [markerName] - a special attribute to mark every node
|
|
125
|
+
* @return {Undo} undo command
|
|
126
|
+
*/
|
|
127
|
+
var hideOthers = function (originalTarget, parentNode, markerName) {
|
|
128
|
+
if (markerName === void 0) { markerName = 'data-aria-hidden'; }
|
|
129
|
+
var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
|
|
130
|
+
var activeParentNode = parentNode || getDefaultParent(originalTarget);
|
|
131
|
+
if (!activeParentNode) {
|
|
132
|
+
return function () { return null; };
|
|
133
|
+
}
|
|
134
|
+
// we should not hide aria-live elements - https://github.com/theKashey/aria-hidden/issues/10
|
|
135
|
+
// and script elements, as they have no impact on accessibility.
|
|
136
|
+
targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live], script')));
|
|
137
|
+
return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');
|
|
138
|
+
};
|
|
139
|
+
exports.hideOthers = hideOthers;
|
|
140
|
+
/**
|
|
141
|
+
* Marks everything except given node(or nodes) as inert
|
|
142
|
+
* @param {Element | Element[]} originalTarget - elements to keep on the page
|
|
143
|
+
* @param [parentNode] - top element, defaults to document.body
|
|
144
|
+
* @param {String} [markerName] - a special attribute to mark every node
|
|
145
|
+
* @return {Undo} undo command
|
|
146
|
+
*/
|
|
147
|
+
var inertOthers = function (originalTarget, parentNode, markerName) {
|
|
148
|
+
if (markerName === void 0) { markerName = 'data-inert-ed'; }
|
|
149
|
+
var activeParentNode = parentNode || getDefaultParent(originalTarget);
|
|
150
|
+
if (!activeParentNode) {
|
|
151
|
+
return function () { return null; };
|
|
152
|
+
}
|
|
153
|
+
return applyAttributeToOthers(originalTarget, activeParentNode, markerName, 'inert');
|
|
154
|
+
};
|
|
155
|
+
exports.inertOthers = inertOthers;
|
|
156
|
+
/**
|
|
157
|
+
* @returns if current browser supports inert
|
|
158
|
+
*/
|
|
159
|
+
var supportsInert = function () {
|
|
160
|
+
return typeof HTMLElement !== 'undefined' && HTMLElement.prototype.hasOwnProperty('inert');
|
|
161
|
+
};
|
|
162
|
+
exports.supportsInert = supportsInert;
|
|
163
|
+
/**
|
|
164
|
+
* Automatic function to "suppress" DOM elements - _hide_ or _inert_ in the best possible way
|
|
165
|
+
* @param {Element | Element[]} originalTarget - elements to keep on the page
|
|
166
|
+
* @param [parentNode] - top element, defaults to document.body
|
|
167
|
+
* @param {String} [markerName] - a special attribute to mark every node
|
|
168
|
+
* @return {Undo} undo command
|
|
169
|
+
*/
|
|
170
|
+
var suppressOthers = function (originalTarget, parentNode, markerName) {
|
|
171
|
+
if (markerName === void 0) { markerName = 'data-suppressed'; }
|
|
172
|
+
return ((0, exports.supportsInert)() ? exports.inertOthers : exports.hideOthers)(originalTarget, parentNode, markerName);
|
|
173
|
+
};
|
|
174
|
+
exports.suppressOthers = suppressOthers;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "aria-hidden",
|
|
3
|
+
"version": "1.2.6",
|
|
4
|
+
"description": "Cast aria-hidden to everything, except...",
|
|
5
|
+
"main": "dist/es5/index.js",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "jest",
|
|
9
|
+
"dev": "lib-builder dev",
|
|
10
|
+
"test:ci": "jest --runInBand --coverage",
|
|
11
|
+
"build": "lib-builder build && yarn size:report",
|
|
12
|
+
"prepublish": "yarn build",
|
|
13
|
+
"release": "yarn build && yarn test",
|
|
14
|
+
"lint": "lib-builder lint",
|
|
15
|
+
"format": "lib-builder format",
|
|
16
|
+
"size": "size-limit",
|
|
17
|
+
"size:report": "size-limit --json > .size.json",
|
|
18
|
+
"update": "lib-builder update",
|
|
19
|
+
"prepublish-only": "yarn build && yarn changelog",
|
|
20
|
+
"prepare": "husky install",
|
|
21
|
+
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
|
|
22
|
+
"changelog:rewrite": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0"
|
|
23
|
+
},
|
|
24
|
+
"author": "Anton Korzunov <thekashey@gmail.com>",
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@theuiteam/lib-builder": "^1.0.0",
|
|
28
|
+
"@size-limit/preset-small-lib": "^11.1.6"
|
|
29
|
+
},
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": ">=10"
|
|
32
|
+
},
|
|
33
|
+
"jsnext:main": "dist/es2015/index.js",
|
|
34
|
+
"module": "dist/es2015/index.js",
|
|
35
|
+
"types": "dist/es5/index.d.ts",
|
|
36
|
+
"files": [
|
|
37
|
+
"dist"
|
|
38
|
+
],
|
|
39
|
+
"keywords": [
|
|
40
|
+
"DOM",
|
|
41
|
+
"aria",
|
|
42
|
+
"hidden",
|
|
43
|
+
"inert"
|
|
44
|
+
],
|
|
45
|
+
"homepage": "https://github.com/theKashey/aria-hidden#readme",
|
|
46
|
+
"repository": {
|
|
47
|
+
"type": "git",
|
|
48
|
+
"url": "git+https://github.com/theKashey/aria-hidden.git"
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"tslib": "^2.0.0"
|
|
52
|
+
},
|
|
53
|
+
"module:es2019": "dist/es2019/index.js",
|
|
54
|
+
"lint-staged": {
|
|
55
|
+
"*.{ts,tsx}": [
|
|
56
|
+
"prettier --write",
|
|
57
|
+
"eslint --fix"
|
|
58
|
+
],
|
|
59
|
+
"*.{js,css,json,md}": [
|
|
60
|
+
"prettier --write"
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
"prettier": {
|
|
64
|
+
"printWidth": 120,
|
|
65
|
+
"trailingComma": "es5",
|
|
66
|
+
"tabWidth": 2,
|
|
67
|
+
"semi": true,
|
|
68
|
+
"singleQuote": true
|
|
69
|
+
},
|
|
70
|
+
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
|
71
|
+
}
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
const TYPE_REQUEST = "q";
|
|
2
|
+
const TYPE_RESPONSE = "s";
|
|
3
|
+
const DEFAULT_TIMEOUT = 6e4;
|
|
4
|
+
function defaultSerialize(i) {
|
|
5
|
+
return i;
|
|
6
|
+
}
|
|
7
|
+
const defaultDeserialize = defaultSerialize;
|
|
8
|
+
const { clearTimeout, setTimeout } = globalThis;
|
|
9
|
+
const random = Math.random.bind(Math);
|
|
10
|
+
function createBirpc($functions, options) {
|
|
11
|
+
const {
|
|
12
|
+
post,
|
|
13
|
+
on,
|
|
14
|
+
off = () => {
|
|
15
|
+
},
|
|
16
|
+
eventNames = [],
|
|
17
|
+
serialize = defaultSerialize,
|
|
18
|
+
deserialize = defaultDeserialize,
|
|
19
|
+
resolver,
|
|
20
|
+
bind = "rpc",
|
|
21
|
+
timeout = DEFAULT_TIMEOUT
|
|
22
|
+
} = options;
|
|
23
|
+
let $closed = false;
|
|
24
|
+
const _rpcPromiseMap = /* @__PURE__ */ new Map();
|
|
25
|
+
let _promiseInit;
|
|
26
|
+
let rpc;
|
|
27
|
+
async function _call(method, args, event, optional) {
|
|
28
|
+
if ($closed)
|
|
29
|
+
throw new Error(`[birpc] rpc is closed, cannot call "${method}"`);
|
|
30
|
+
const req = { m: method, a: args, t: TYPE_REQUEST };
|
|
31
|
+
if (optional)
|
|
32
|
+
req.o = true;
|
|
33
|
+
const send = async (_req) => post(serialize(_req));
|
|
34
|
+
if (event) {
|
|
35
|
+
await send(req);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (_promiseInit) {
|
|
39
|
+
try {
|
|
40
|
+
await _promiseInit;
|
|
41
|
+
} finally {
|
|
42
|
+
_promiseInit = void 0;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
let { promise, resolve, reject } = createPromiseWithResolvers();
|
|
46
|
+
const id = nanoid();
|
|
47
|
+
req.i = id;
|
|
48
|
+
let timeoutId;
|
|
49
|
+
async function handler(newReq = req) {
|
|
50
|
+
if (timeout >= 0) {
|
|
51
|
+
timeoutId = setTimeout(() => {
|
|
52
|
+
try {
|
|
53
|
+
const handleResult = options.onTimeoutError?.call(rpc, method, args);
|
|
54
|
+
if (handleResult !== true)
|
|
55
|
+
throw new Error(`[birpc] timeout on calling "${method}"`);
|
|
56
|
+
} catch (e) {
|
|
57
|
+
reject(e);
|
|
58
|
+
}
|
|
59
|
+
_rpcPromiseMap.delete(id);
|
|
60
|
+
}, timeout);
|
|
61
|
+
if (typeof timeoutId === "object")
|
|
62
|
+
timeoutId = timeoutId.unref?.();
|
|
63
|
+
}
|
|
64
|
+
_rpcPromiseMap.set(id, { resolve, reject, timeoutId, method });
|
|
65
|
+
await send(newReq);
|
|
66
|
+
return promise;
|
|
67
|
+
}
|
|
68
|
+
try {
|
|
69
|
+
if (options.onRequest)
|
|
70
|
+
await options.onRequest.call(rpc, req, handler, resolve);
|
|
71
|
+
else
|
|
72
|
+
await handler();
|
|
73
|
+
} catch (e) {
|
|
74
|
+
if (options.onGeneralError?.call(rpc, e) !== true)
|
|
75
|
+
throw e;
|
|
76
|
+
return;
|
|
77
|
+
} finally {
|
|
78
|
+
clearTimeout(timeoutId);
|
|
79
|
+
_rpcPromiseMap.delete(id);
|
|
80
|
+
}
|
|
81
|
+
return promise;
|
|
82
|
+
}
|
|
83
|
+
const $call = (method, ...args) => _call(method, args, false);
|
|
84
|
+
const $callOptional = (method, ...args) => _call(method, args, false, true);
|
|
85
|
+
const $callEvent = (method, ...args) => _call(method, args, true);
|
|
86
|
+
const $callRaw = (options2) => _call(options2.method, options2.args, options2.event, options2.optional);
|
|
87
|
+
const builtinMethods = {
|
|
88
|
+
$call,
|
|
89
|
+
$callOptional,
|
|
90
|
+
$callEvent,
|
|
91
|
+
$callRaw,
|
|
92
|
+
$rejectPendingCalls,
|
|
93
|
+
get $closed() {
|
|
94
|
+
return $closed;
|
|
95
|
+
},
|
|
96
|
+
get $meta() {
|
|
97
|
+
return options.meta;
|
|
98
|
+
},
|
|
99
|
+
$close,
|
|
100
|
+
$functions
|
|
101
|
+
};
|
|
102
|
+
rpc = new Proxy({}, {
|
|
103
|
+
get(_, method) {
|
|
104
|
+
if (Object.prototype.hasOwnProperty.call(builtinMethods, method))
|
|
105
|
+
return builtinMethods[method];
|
|
106
|
+
if (method === "then" && !eventNames.includes("then") && !("then" in $functions))
|
|
107
|
+
return void 0;
|
|
108
|
+
const sendEvent = (...args) => _call(method, args, true);
|
|
109
|
+
if (eventNames.includes(method)) {
|
|
110
|
+
sendEvent.asEvent = sendEvent;
|
|
111
|
+
return sendEvent;
|
|
112
|
+
}
|
|
113
|
+
const sendCall = (...args) => _call(method, args, false);
|
|
114
|
+
sendCall.asEvent = sendEvent;
|
|
115
|
+
return sendCall;
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
function $close(customError) {
|
|
119
|
+
$closed = true;
|
|
120
|
+
_rpcPromiseMap.forEach(({ reject, method }) => {
|
|
121
|
+
const error = new Error(`[birpc] rpc is closed, cannot call "${method}"`);
|
|
122
|
+
if (customError) {
|
|
123
|
+
customError.cause ??= error;
|
|
124
|
+
return reject(customError);
|
|
125
|
+
}
|
|
126
|
+
reject(error);
|
|
127
|
+
});
|
|
128
|
+
_rpcPromiseMap.clear();
|
|
129
|
+
off(onMessage);
|
|
130
|
+
}
|
|
131
|
+
function $rejectPendingCalls(handler) {
|
|
132
|
+
const entries = Array.from(_rpcPromiseMap.values());
|
|
133
|
+
const handlerResults = entries.map(({ method, reject }) => {
|
|
134
|
+
if (!handler) {
|
|
135
|
+
return reject(new Error(`[birpc]: rejected pending call "${method}".`));
|
|
136
|
+
}
|
|
137
|
+
return handler({ method, reject });
|
|
138
|
+
});
|
|
139
|
+
_rpcPromiseMap.clear();
|
|
140
|
+
return handlerResults;
|
|
141
|
+
}
|
|
142
|
+
async function onMessage(data, ...extra) {
|
|
143
|
+
let msg;
|
|
144
|
+
try {
|
|
145
|
+
msg = deserialize(data);
|
|
146
|
+
} catch (e) {
|
|
147
|
+
if (options.onGeneralError?.call(rpc, e) !== true)
|
|
148
|
+
throw e;
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
if (msg.t === TYPE_REQUEST) {
|
|
152
|
+
const { m: method, a: args, o: optional } = msg;
|
|
153
|
+
let result, error;
|
|
154
|
+
let fn = await (resolver ? resolver.call(rpc, method, $functions[method]) : $functions[method]);
|
|
155
|
+
if (optional)
|
|
156
|
+
fn ||= () => void 0;
|
|
157
|
+
if (!fn) {
|
|
158
|
+
error = new Error(`[birpc] function "${method}" not found`);
|
|
159
|
+
} else {
|
|
160
|
+
try {
|
|
161
|
+
result = await fn.apply(bind === "rpc" ? rpc : $functions, args);
|
|
162
|
+
} catch (e) {
|
|
163
|
+
error = e;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
if (msg.i) {
|
|
167
|
+
if (error && options.onError)
|
|
168
|
+
options.onError.call(rpc, error, method, args);
|
|
169
|
+
if (error && options.onFunctionError) {
|
|
170
|
+
if (options.onFunctionError.call(rpc, error, method, args) === true)
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
if (!error) {
|
|
174
|
+
try {
|
|
175
|
+
await post(serialize({ t: TYPE_RESPONSE, i: msg.i, r: result }), ...extra);
|
|
176
|
+
return;
|
|
177
|
+
} catch (e) {
|
|
178
|
+
error = e;
|
|
179
|
+
if (options.onGeneralError?.call(rpc, e, method, args) !== true)
|
|
180
|
+
throw e;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
try {
|
|
184
|
+
await post(serialize({ t: TYPE_RESPONSE, i: msg.i, e: error }), ...extra);
|
|
185
|
+
} catch (e) {
|
|
186
|
+
if (options.onGeneralError?.call(rpc, e, method, args) !== true)
|
|
187
|
+
throw e;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
} else {
|
|
191
|
+
const { i: ack, r: result, e: error } = msg;
|
|
192
|
+
const promise = _rpcPromiseMap.get(ack);
|
|
193
|
+
if (promise) {
|
|
194
|
+
clearTimeout(promise.timeoutId);
|
|
195
|
+
if (error)
|
|
196
|
+
promise.reject(error);
|
|
197
|
+
else
|
|
198
|
+
promise.resolve(result);
|
|
199
|
+
}
|
|
200
|
+
_rpcPromiseMap.delete(ack);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
_promiseInit = on(onMessage);
|
|
204
|
+
return rpc;
|
|
205
|
+
}
|
|
206
|
+
const cacheMap = /* @__PURE__ */ new WeakMap();
|
|
207
|
+
function cachedMap(items, fn) {
|
|
208
|
+
return items.map((i) => {
|
|
209
|
+
let r = cacheMap.get(i);
|
|
210
|
+
if (!r) {
|
|
211
|
+
r = fn(i);
|
|
212
|
+
cacheMap.set(i, r);
|
|
213
|
+
}
|
|
214
|
+
return r;
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
function createBirpcGroup(functions, channels, options = {}) {
|
|
218
|
+
const getChannels = () => typeof channels === "function" ? channels() : channels;
|
|
219
|
+
const getClients = (channels2 = getChannels()) => cachedMap(channels2, (s) => createBirpc(functions, { ...options, ...s }));
|
|
220
|
+
function _boardcast(method, args, event, optional) {
|
|
221
|
+
const clients = getClients();
|
|
222
|
+
return Promise.all(clients.map((c) => c.$callRaw({ method, args, event, optional })));
|
|
223
|
+
}
|
|
224
|
+
function $call(method, ...args) {
|
|
225
|
+
return _boardcast(method, args, false);
|
|
226
|
+
}
|
|
227
|
+
function $callOptional(method, ...args) {
|
|
228
|
+
return _boardcast(method, args, false, true);
|
|
229
|
+
}
|
|
230
|
+
function $callEvent(method, ...args) {
|
|
231
|
+
return _boardcast(method, args, true);
|
|
232
|
+
}
|
|
233
|
+
const broadcastBuiltin = {
|
|
234
|
+
$call,
|
|
235
|
+
$callOptional,
|
|
236
|
+
$callEvent
|
|
237
|
+
};
|
|
238
|
+
const broadcastProxy = new Proxy({}, {
|
|
239
|
+
get(_, method) {
|
|
240
|
+
if (Object.prototype.hasOwnProperty.call(broadcastBuiltin, method))
|
|
241
|
+
return broadcastBuiltin[method];
|
|
242
|
+
const client = getClients();
|
|
243
|
+
const callbacks = client.map((c) => c[method]);
|
|
244
|
+
const sendCall = (...args) => {
|
|
245
|
+
return Promise.all(callbacks.map((i) => i(...args)));
|
|
246
|
+
};
|
|
247
|
+
sendCall.asEvent = async (...args) => {
|
|
248
|
+
await Promise.all(callbacks.map((i) => i.asEvent(...args)));
|
|
249
|
+
};
|
|
250
|
+
return sendCall;
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
function updateChannels(fn) {
|
|
254
|
+
const channels2 = getChannels();
|
|
255
|
+
fn?.(channels2);
|
|
256
|
+
return getClients(channels2);
|
|
257
|
+
}
|
|
258
|
+
getClients();
|
|
259
|
+
return {
|
|
260
|
+
get clients() {
|
|
261
|
+
return getClients();
|
|
262
|
+
},
|
|
263
|
+
functions,
|
|
264
|
+
updateChannels,
|
|
265
|
+
broadcast: broadcastProxy,
|
|
266
|
+
/**
|
|
267
|
+
* @deprecated use `broadcast`
|
|
268
|
+
*/
|
|
269
|
+
// @ts-expect-error deprecated
|
|
270
|
+
boardcast: broadcastProxy
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
function createPromiseWithResolvers() {
|
|
274
|
+
let resolve;
|
|
275
|
+
let reject;
|
|
276
|
+
const promise = new Promise((res, rej) => {
|
|
277
|
+
resolve = res;
|
|
278
|
+
reject = rej;
|
|
279
|
+
});
|
|
280
|
+
return { promise, resolve, reject };
|
|
281
|
+
}
|
|
282
|
+
const urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
283
|
+
function nanoid(size = 21) {
|
|
284
|
+
let id = "";
|
|
285
|
+
let i = size;
|
|
286
|
+
while (i--)
|
|
287
|
+
id += urlAlphabet[random() * 64 | 0];
|
|
288
|
+
return id;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
export { DEFAULT_TIMEOUT, cachedMap, createBirpc, createBirpcGroup };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "birpc",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "2.9.0",
|
|
5
|
+
"description": "Message based Two-way remote procedure call",
|
|
6
|
+
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"funding": "https://github.com/sponsors/antfu",
|
|
9
|
+
"homepage": "https://github.com/antfu-collective/birpc#readme",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/antfu-collective/birpc.git"
|
|
13
|
+
},
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/antfu-collective/birpc/issues"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"rpc",
|
|
19
|
+
"messages"
|
|
20
|
+
],
|
|
21
|
+
"sideEffects": false,
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"import": "./dist/index.mjs",
|
|
26
|
+
"require": "./dist/index.cjs"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"main": "./dist/index.cjs",
|
|
30
|
+
"module": "./dist/index.mjs",
|
|
31
|
+
"types": "./dist/index.d.ts",
|
|
32
|
+
"files": [
|
|
33
|
+
"dist"
|
|
34
|
+
],
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@antfu/eslint-config": "^6.3.0",
|
|
37
|
+
"@antfu/ni": "^28.0.0",
|
|
38
|
+
"@types/node": "^24.10.1",
|
|
39
|
+
"@vitest/coverage-v8": "3.0.9",
|
|
40
|
+
"bumpp": "^10.3.2",
|
|
41
|
+
"eslint": "^9.39.1",
|
|
42
|
+
"tsx": "^4.21.0",
|
|
43
|
+
"typescript": "^5.9.3",
|
|
44
|
+
"unbuild": "^3.6.1",
|
|
45
|
+
"vite": "^7.2.6",
|
|
46
|
+
"vitest": "^4.0.15"
|
|
47
|
+
},
|
|
48
|
+
"scripts": {
|
|
49
|
+
"build": "unbuild",
|
|
50
|
+
"dev": "unbuild --stub",
|
|
51
|
+
"lint": "eslint .",
|
|
52
|
+
"release": "bumpp",
|
|
53
|
+
"start": "tsx src/index.ts",
|
|
54
|
+
"typecheck": "tsc --noEmit",
|
|
55
|
+
"test": "vitest"
|
|
56
|
+
}
|
|
57
|
+
}
|