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,283 +0,0 @@
|
|
|
1
|
-
import { decode64 } from './base64.js';
|
|
2
|
-
import {
|
|
3
|
-
HOLE,
|
|
4
|
-
MAX_ARRAY_INDEX,
|
|
5
|
-
NAN,
|
|
6
|
-
NEGATIVE_INFINITY,
|
|
7
|
-
NEGATIVE_ZERO,
|
|
8
|
-
POSITIVE_INFINITY,
|
|
9
|
-
SPARSE,
|
|
10
|
-
UNDEFINED
|
|
11
|
-
} from './constants.js';
|
|
12
|
-
import { is_valid_array_index, is_valid_array_len } from './utils.js';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Revive a value serialized with `devalue.stringify`
|
|
16
|
-
* @param {string} serialized
|
|
17
|
-
* @param {Record<string, (value: any) => any>} [revivers]
|
|
18
|
-
*/
|
|
19
|
-
export function parse(serialized, revivers) {
|
|
20
|
-
return unflatten(JSON.parse(serialized), revivers);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Revive a value flattened with `devalue.stringify`
|
|
25
|
-
* @param {number | any[]} parsed
|
|
26
|
-
* @param {Record<string, (value: any) => any>} [revivers]
|
|
27
|
-
*/
|
|
28
|
-
export function unflatten(parsed, revivers) {
|
|
29
|
-
if (typeof parsed === 'number') return hydrate(parsed, true);
|
|
30
|
-
|
|
31
|
-
if (!Array.isArray(parsed) || parsed.length === 0) {
|
|
32
|
-
throw new Error('Invalid input');
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const values = /** @type {any[]} */ (parsed);
|
|
36
|
-
|
|
37
|
-
const hydrated = Array(values.length);
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* A set of values currently being hydrated with custom revivers,
|
|
41
|
-
* used to detect invalid cyclical dependencies
|
|
42
|
-
* @type {Set<number> | null}
|
|
43
|
-
*/
|
|
44
|
-
let hydrating = null;
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* @param {number} index
|
|
48
|
-
* @returns {any}
|
|
49
|
-
*/
|
|
50
|
-
function hydrate(index, standalone = false) {
|
|
51
|
-
if (index === UNDEFINED) return undefined;
|
|
52
|
-
if (index === NAN) return NaN;
|
|
53
|
-
if (index === POSITIVE_INFINITY) return Infinity;
|
|
54
|
-
if (index === NEGATIVE_INFINITY) return -Infinity;
|
|
55
|
-
if (index === NEGATIVE_ZERO) return -0;
|
|
56
|
-
|
|
57
|
-
if (standalone || typeof index !== 'number') {
|
|
58
|
-
throw new Error(`Invalid input`);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
if (index in hydrated) return hydrated[index];
|
|
62
|
-
|
|
63
|
-
const value = values[index];
|
|
64
|
-
|
|
65
|
-
if (!value || typeof value !== 'object') {
|
|
66
|
-
hydrated[index] = value;
|
|
67
|
-
} else if (Array.isArray(value)) {
|
|
68
|
-
if (typeof value[0] === 'string') {
|
|
69
|
-
const type = value[0];
|
|
70
|
-
|
|
71
|
-
const reviver = revivers && Object.hasOwn(revivers, type) ? revivers[type] : undefined;
|
|
72
|
-
|
|
73
|
-
if (reviver) {
|
|
74
|
-
let i = value[1];
|
|
75
|
-
if (typeof i !== 'number') {
|
|
76
|
-
// if it's not a number, it was serialized by a builtin reviver
|
|
77
|
-
// so we need to munge it into the format expected by a custom reviver
|
|
78
|
-
i = values.push(value[1]) - 1;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
hydrating ??= new Set();
|
|
82
|
-
|
|
83
|
-
if (hydrating.has(i)) {
|
|
84
|
-
throw new Error('Invalid circular reference');
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
hydrating.add(i);
|
|
88
|
-
hydrated[index] = reviver(hydrate(i));
|
|
89
|
-
hydrating.delete(i);
|
|
90
|
-
|
|
91
|
-
return hydrated[index];
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
switch (type) {
|
|
95
|
-
case 'Date':
|
|
96
|
-
hydrated[index] = new Date(value[1]);
|
|
97
|
-
break;
|
|
98
|
-
|
|
99
|
-
case 'Set':
|
|
100
|
-
const set = new Set();
|
|
101
|
-
hydrated[index] = set;
|
|
102
|
-
for (let i = 1; i < value.length; i += 1) {
|
|
103
|
-
set.add(hydrate(value[i]));
|
|
104
|
-
}
|
|
105
|
-
break;
|
|
106
|
-
|
|
107
|
-
case 'Map':
|
|
108
|
-
const map = new Map();
|
|
109
|
-
hydrated[index] = map;
|
|
110
|
-
for (let i = 1; i < value.length; i += 2) {
|
|
111
|
-
map.set(hydrate(value[i]), hydrate(value[i + 1]));
|
|
112
|
-
}
|
|
113
|
-
break;
|
|
114
|
-
|
|
115
|
-
case 'RegExp':
|
|
116
|
-
hydrated[index] = new RegExp(value[1], value[2]);
|
|
117
|
-
break;
|
|
118
|
-
|
|
119
|
-
case 'Object': {
|
|
120
|
-
const wrapped_index = value[1];
|
|
121
|
-
|
|
122
|
-
if (
|
|
123
|
-
typeof values[wrapped_index] === 'object' &&
|
|
124
|
-
values[wrapped_index][0] !== 'BigInt'
|
|
125
|
-
) {
|
|
126
|
-
// avoid infinite recusion in case of malformed input
|
|
127
|
-
throw new Error('Invalid input');
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
hydrated[index] = Object(hydrate(wrapped_index));
|
|
131
|
-
break;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
case 'BigInt':
|
|
135
|
-
hydrated[index] = BigInt(value[1]);
|
|
136
|
-
break;
|
|
137
|
-
|
|
138
|
-
case 'null':
|
|
139
|
-
const obj = Object.create(null);
|
|
140
|
-
hydrated[index] = obj;
|
|
141
|
-
for (let i = 1; i < value.length; i += 2) {
|
|
142
|
-
if (value[i] === '__proto__') {
|
|
143
|
-
throw new Error('Cannot parse an object with a `__proto__` property');
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
obj[value[i]] = hydrate(value[i + 1]);
|
|
147
|
-
}
|
|
148
|
-
break;
|
|
149
|
-
|
|
150
|
-
case 'Int8Array':
|
|
151
|
-
case 'Uint8Array':
|
|
152
|
-
case 'Uint8ClampedArray':
|
|
153
|
-
case 'Int16Array':
|
|
154
|
-
case 'Uint16Array':
|
|
155
|
-
case 'Float16Array':
|
|
156
|
-
case 'Int32Array':
|
|
157
|
-
case 'Uint32Array':
|
|
158
|
-
case 'Float32Array':
|
|
159
|
-
case 'Float64Array':
|
|
160
|
-
case 'BigInt64Array':
|
|
161
|
-
case 'BigUint64Array':
|
|
162
|
-
case 'DataView': {
|
|
163
|
-
if (values[value[1]][0] !== 'ArrayBuffer') {
|
|
164
|
-
// without this, if we receive malformed input we could
|
|
165
|
-
// end up trying to hydrate in a circle or allocate
|
|
166
|
-
// huge amounts of memory when we call `new TypedArrayConstructor(buffer)`
|
|
167
|
-
throw new Error('Invalid data');
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
const TypedArrayConstructor = globalThis[type];
|
|
171
|
-
const buffer = hydrate(value[1]);
|
|
172
|
-
|
|
173
|
-
hydrated[index] =
|
|
174
|
-
value[2] !== undefined
|
|
175
|
-
? new TypedArrayConstructor(buffer, value[2], value[3])
|
|
176
|
-
: new TypedArrayConstructor(buffer);
|
|
177
|
-
|
|
178
|
-
break;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
case 'ArrayBuffer': {
|
|
182
|
-
const base64 = value[1];
|
|
183
|
-
if (typeof base64 !== 'string') {
|
|
184
|
-
throw new Error('Invalid ArrayBuffer encoding');
|
|
185
|
-
}
|
|
186
|
-
const arraybuffer = decode64(base64);
|
|
187
|
-
hydrated[index] = arraybuffer;
|
|
188
|
-
break;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
case 'Temporal.Duration':
|
|
192
|
-
case 'Temporal.Instant':
|
|
193
|
-
case 'Temporal.PlainDate':
|
|
194
|
-
case 'Temporal.PlainTime':
|
|
195
|
-
case 'Temporal.PlainDateTime':
|
|
196
|
-
case 'Temporal.PlainMonthDay':
|
|
197
|
-
case 'Temporal.PlainYearMonth':
|
|
198
|
-
case 'Temporal.ZonedDateTime': {
|
|
199
|
-
const temporalName = type.slice(9);
|
|
200
|
-
// @ts-expect-error TS doesn't know about Temporal yet
|
|
201
|
-
hydrated[index] = Temporal[temporalName].from(value[1]);
|
|
202
|
-
break;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
case 'URL': {
|
|
206
|
-
const url = new URL(value[1]);
|
|
207
|
-
hydrated[index] = url;
|
|
208
|
-
break;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
case 'URLSearchParams': {
|
|
212
|
-
const url = new URLSearchParams(value[1]);
|
|
213
|
-
hydrated[index] = url;
|
|
214
|
-
break;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
default:
|
|
218
|
-
throw new Error(`Unknown type ${type}`);
|
|
219
|
-
}
|
|
220
|
-
} else if (value[0] === SPARSE) {
|
|
221
|
-
// Sparse array encoding: [SPARSE, length, idx, val, idx, val, ...]
|
|
222
|
-
const len = value[1];
|
|
223
|
-
|
|
224
|
-
if (!is_valid_array_len(len)) {
|
|
225
|
-
throw new Error('Invalid input');
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
/** @type {any[]} */
|
|
229
|
-
const array = [];
|
|
230
|
-
hydrated[index] = array;
|
|
231
|
-
|
|
232
|
-
// Setting `array.length = len` (or equivalently calling `new Array(len)`)
|
|
233
|
-
// on an untrusted `len` is a DoS vector: V8 eagerly allocates a
|
|
234
|
-
// contiguous backing store for array lengths below ~10^8, so a
|
|
235
|
-
// small payload with a huge declared length can force arbitrary
|
|
236
|
-
// memory allocation. Touching the largest-possible index first
|
|
237
|
-
// forces V8 into dictionary-elements mode, where `length` is
|
|
238
|
-
// just a number and no contiguous allocation occurs.
|
|
239
|
-
array[MAX_ARRAY_INDEX] = undefined;
|
|
240
|
-
delete array[MAX_ARRAY_INDEX];
|
|
241
|
-
|
|
242
|
-
for (let i = 2; i < value.length; i += 2) {
|
|
243
|
-
const idx = value[i];
|
|
244
|
-
|
|
245
|
-
if (!is_valid_array_index(idx) || idx >= len) {
|
|
246
|
-
throw new Error('Invalid input');
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
array[idx] = hydrate(value[i + 1]);
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
array.length = len;
|
|
253
|
-
} else {
|
|
254
|
-
const array = new Array(value.length);
|
|
255
|
-
hydrated[index] = array;
|
|
256
|
-
|
|
257
|
-
for (let i = 0; i < value.length; i += 1) {
|
|
258
|
-
const n = value[i];
|
|
259
|
-
if (n === HOLE) continue;
|
|
260
|
-
|
|
261
|
-
array[i] = hydrate(n);
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
} else {
|
|
265
|
-
/** @type {Record<string, any>} */
|
|
266
|
-
const object = {};
|
|
267
|
-
hydrated[index] = object;
|
|
268
|
-
|
|
269
|
-
for (const key of Object.keys(value)) {
|
|
270
|
-
if (key === '__proto__') {
|
|
271
|
-
throw new Error('Cannot parse an object with a `__proto__` property');
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
const n = value[key];
|
|
275
|
-
object[key] = hydrate(n);
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
return hydrated[index];
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
return hydrate(0);
|
|
283
|
-
}
|
|
@@ -1,401 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DevalueError,
|
|
3
|
-
enumerable_symbols,
|
|
4
|
-
get_type,
|
|
5
|
-
is_plain_object,
|
|
6
|
-
is_primitive,
|
|
7
|
-
stringify_key,
|
|
8
|
-
stringify_string,
|
|
9
|
-
valid_array_indices
|
|
10
|
-
} from './utils.js';
|
|
11
|
-
import {
|
|
12
|
-
HOLE,
|
|
13
|
-
NAN,
|
|
14
|
-
NEGATIVE_INFINITY,
|
|
15
|
-
NEGATIVE_ZERO,
|
|
16
|
-
POSITIVE_INFINITY,
|
|
17
|
-
SPARSE,
|
|
18
|
-
UNDEFINED
|
|
19
|
-
} from './constants.js';
|
|
20
|
-
import { encode64 } from './base64.js';
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Turn a value into a JSON string that can be parsed with `devalue.parse`
|
|
24
|
-
* @param {any} value
|
|
25
|
-
* @param {Record<string, (value: any) => any>} [reducers]
|
|
26
|
-
*/
|
|
27
|
-
export function stringify(value, reducers) {
|
|
28
|
-
const stringified = run(false, value, reducers);
|
|
29
|
-
return typeof stringified === 'string' ? stringified : `[${stringified.join(',')}]`;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Turn a value into a JSON string that can be parsed with `devalue.parse`
|
|
34
|
-
* @param {any} value
|
|
35
|
-
* @param {Record<string, (value: any) => any>} [reducers]
|
|
36
|
-
*/
|
|
37
|
-
export async function stringifyAsync(value, reducers) {
|
|
38
|
-
const stringified = run(true, value, reducers);
|
|
39
|
-
|
|
40
|
-
if (typeof stringified === 'string') {
|
|
41
|
-
return stringified;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
let out = '[';
|
|
45
|
-
|
|
46
|
-
for (let i = 0; i < stringified.length; i += 1) {
|
|
47
|
-
let value = stringified[i];
|
|
48
|
-
|
|
49
|
-
if (typeof value !== 'string') {
|
|
50
|
-
await value;
|
|
51
|
-
value = stringified[i];
|
|
52
|
-
|
|
53
|
-
if (i === 0 && value < 0) {
|
|
54
|
-
return `${value}`;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
out += value;
|
|
59
|
-
|
|
60
|
-
if (i < stringified.length - 1) {
|
|
61
|
-
out += ',';
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
out += ']';
|
|
66
|
-
|
|
67
|
-
return out;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* @param {boolean} async
|
|
72
|
-
* @param {any} value
|
|
73
|
-
* @param {Record<string, (value: any) => any>} [reducers]
|
|
74
|
-
*/
|
|
75
|
-
function run(async, value, reducers) {
|
|
76
|
-
/** @type {any[]} */
|
|
77
|
-
const stringified = [];
|
|
78
|
-
|
|
79
|
-
/** @type {Map<any, number>} */
|
|
80
|
-
const indexes = new Map();
|
|
81
|
-
|
|
82
|
-
/** @type {Array<{ key: string, fn: (value: any) => any }>} */
|
|
83
|
-
const custom = [];
|
|
84
|
-
if (reducers) {
|
|
85
|
-
for (const key of Object.getOwnPropertyNames(reducers)) {
|
|
86
|
-
custom.push({ key, fn: reducers[key] });
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/** @type {string[]} */
|
|
91
|
-
const keys = [];
|
|
92
|
-
|
|
93
|
-
let p = 0;
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* @param {any} thing
|
|
97
|
-
* @param {number} [index]
|
|
98
|
-
*/
|
|
99
|
-
function flatten(thing, index) {
|
|
100
|
-
if (thing === undefined) return UNDEFINED;
|
|
101
|
-
if (Number.isNaN(thing)) return NAN;
|
|
102
|
-
if (thing === Infinity) return POSITIVE_INFINITY;
|
|
103
|
-
if (thing === -Infinity) return NEGATIVE_INFINITY;
|
|
104
|
-
if (thing === 0 && 1 / thing < 0) return NEGATIVE_ZERO;
|
|
105
|
-
|
|
106
|
-
if (indexes.has(thing)) return /** @type {number} */ (indexes.get(thing));
|
|
107
|
-
|
|
108
|
-
index ??= p++;
|
|
109
|
-
indexes.set(thing, index);
|
|
110
|
-
|
|
111
|
-
for (const { key, fn } of custom) {
|
|
112
|
-
const value = fn(thing);
|
|
113
|
-
if (value) {
|
|
114
|
-
stringified[index] = `["${key}",${flatten(value)}]`;
|
|
115
|
-
return index;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
if (typeof thing === 'function') {
|
|
120
|
-
throw new DevalueError(`Cannot stringify a function`, keys, thing, value);
|
|
121
|
-
} else if (typeof thing === 'symbol') {
|
|
122
|
-
throw new DevalueError(`Cannot stringify a Symbol primitive`, keys, thing, value);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
/** @type {string | Promise<any>} */
|
|
126
|
-
let str = '';
|
|
127
|
-
|
|
128
|
-
if (is_primitive(thing)) {
|
|
129
|
-
str = stringify_primitive(thing);
|
|
130
|
-
} else if (typeof thing.then === 'function') {
|
|
131
|
-
if (!async) {
|
|
132
|
-
throw new DevalueError(
|
|
133
|
-
`Cannot stringify a Promise or thenable — use stringifyAsync instead`,
|
|
134
|
-
keys,
|
|
135
|
-
thing,
|
|
136
|
-
value
|
|
137
|
-
);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
str = Promise.resolve(thing).then((value) => {
|
|
141
|
-
const i = flatten(value, index);
|
|
142
|
-
if (i < 0) stringified[index] = i;
|
|
143
|
-
});
|
|
144
|
-
} else {
|
|
145
|
-
const type = get_type(thing);
|
|
146
|
-
|
|
147
|
-
switch (type) {
|
|
148
|
-
case 'Number':
|
|
149
|
-
case 'String':
|
|
150
|
-
case 'Boolean':
|
|
151
|
-
case 'BigInt':
|
|
152
|
-
str = `["Object",${flatten(thing.valueOf())}]`;
|
|
153
|
-
break;
|
|
154
|
-
|
|
155
|
-
case 'Date':
|
|
156
|
-
const valid = !isNaN(thing.getDate());
|
|
157
|
-
str = `["Date","${valid ? thing.toISOString() : ''}"]`;
|
|
158
|
-
break;
|
|
159
|
-
|
|
160
|
-
case 'URL':
|
|
161
|
-
str = `["URL",${stringify_string(thing.toString())}]`;
|
|
162
|
-
break;
|
|
163
|
-
|
|
164
|
-
case 'URLSearchParams':
|
|
165
|
-
str = `["URLSearchParams",${stringify_string(thing.toString())}]`;
|
|
166
|
-
break;
|
|
167
|
-
|
|
168
|
-
case 'RegExp':
|
|
169
|
-
const { source, flags } = thing;
|
|
170
|
-
str = flags
|
|
171
|
-
? `["RegExp",${stringify_string(source)},"${flags}"]`
|
|
172
|
-
: `["RegExp",${stringify_string(source)}]`;
|
|
173
|
-
break;
|
|
174
|
-
|
|
175
|
-
case 'Array': {
|
|
176
|
-
// For dense arrays (no holes), we iterate normally.
|
|
177
|
-
// When we encounter the first hole, we call Object.keys
|
|
178
|
-
// to determine the sparseness, then decide between:
|
|
179
|
-
// - HOLE encoding: [-2, val, -2, ...] (default)
|
|
180
|
-
// - Sparse encoding: [-7, length, idx, val, ...] (for very sparse arrays)
|
|
181
|
-
// Only the sparse path avoids iterating every slot, which
|
|
182
|
-
// is what protects against the DoS of e.g. `arr[1000000] = 1`.
|
|
183
|
-
let mostly_dense = false;
|
|
184
|
-
|
|
185
|
-
str = '[';
|
|
186
|
-
|
|
187
|
-
for (let i = 0; i < thing.length; i += 1) {
|
|
188
|
-
if (i > 0) str += ',';
|
|
189
|
-
|
|
190
|
-
if (Object.hasOwn(thing, i)) {
|
|
191
|
-
keys.push(`[${i}]`);
|
|
192
|
-
str += flatten(thing[i]);
|
|
193
|
-
keys.pop();
|
|
194
|
-
} else if (mostly_dense) {
|
|
195
|
-
// Use dense encoding. The heuristic guarantees the
|
|
196
|
-
// array is only mildly sparse, so iterating over every
|
|
197
|
-
// slot is fine.
|
|
198
|
-
str += HOLE;
|
|
199
|
-
} else {
|
|
200
|
-
// Decide between HOLE encoding and sparse encoding.
|
|
201
|
-
//
|
|
202
|
-
// HOLE encoding: each hole is serialized as the HOLE
|
|
203
|
-
// sentinel (-2). For example, [, "a", ,] becomes
|
|
204
|
-
// [-2, 0, -2]. Each hole costs 3 chars ("-2" + comma).
|
|
205
|
-
//
|
|
206
|
-
// Sparse encoding: lists only populated indices.
|
|
207
|
-
// For example, [, "a", ,] becomes [-7, 3, 1, 0] — the
|
|
208
|
-
// -7 sentinel, the array length (3), then index-value
|
|
209
|
-
// pairs. This avoids paying per-hole, but each element
|
|
210
|
-
// costs extra chars to write its index.
|
|
211
|
-
//
|
|
212
|
-
// The values are the same size either way, so the
|
|
213
|
-
// choice comes down to structural overhead:
|
|
214
|
-
//
|
|
215
|
-
// HOLE overhead:
|
|
216
|
-
// 3 chars per hole ("-2" + comma)
|
|
217
|
-
// = (L - P) * 3
|
|
218
|
-
//
|
|
219
|
-
// Sparse overhead:
|
|
220
|
-
// "-7," — 3 chars (sparse sentinel + comma)
|
|
221
|
-
// + length + "," — (d + 1) chars (array length + comma)
|
|
222
|
-
// + per element: index + "," — (d + 1) chars
|
|
223
|
-
// = (4 + d) + P * (d + 1)
|
|
224
|
-
//
|
|
225
|
-
// where L is the array length, P is the number of
|
|
226
|
-
// populated elements, and d is the number of digits
|
|
227
|
-
// in L (an upper bound on the digits in any index).
|
|
228
|
-
//
|
|
229
|
-
// Sparse encoding is cheaper when:
|
|
230
|
-
// (4 + d) + P * (d + 1) < (L - P) * 3
|
|
231
|
-
const populated_keys = valid_array_indices(/** @type {any[]} */ (thing));
|
|
232
|
-
const population = populated_keys.length;
|
|
233
|
-
const d = String(thing.length).length;
|
|
234
|
-
|
|
235
|
-
const hole_cost = (thing.length - population) * 3;
|
|
236
|
-
const sparse_cost = 4 + d + population * (d + 1);
|
|
237
|
-
|
|
238
|
-
if (hole_cost > sparse_cost) {
|
|
239
|
-
str = '[' + SPARSE + ',' + thing.length;
|
|
240
|
-
for (let j = 0; j < populated_keys.length; j++) {
|
|
241
|
-
const key = populated_keys[j];
|
|
242
|
-
keys.push(`[${key}]`);
|
|
243
|
-
str += ',' + key + ',' + flatten(thing[key]);
|
|
244
|
-
keys.pop();
|
|
245
|
-
}
|
|
246
|
-
break;
|
|
247
|
-
} else {
|
|
248
|
-
mostly_dense = true;
|
|
249
|
-
str += HOLE;
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
str += ']';
|
|
255
|
-
|
|
256
|
-
break;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
case 'Set':
|
|
260
|
-
str = '["Set"';
|
|
261
|
-
|
|
262
|
-
for (const value of thing) {
|
|
263
|
-
str += `,${flatten(value)}`;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
str += ']';
|
|
267
|
-
break;
|
|
268
|
-
|
|
269
|
-
case 'Map':
|
|
270
|
-
str = '["Map"';
|
|
271
|
-
|
|
272
|
-
for (const [key, value] of thing) {
|
|
273
|
-
keys.push(`.get(${is_primitive(key) ? stringify_primitive(key) : '...'})`);
|
|
274
|
-
str += `,${flatten(key)},${flatten(value)}`;
|
|
275
|
-
keys.pop();
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
str += ']';
|
|
279
|
-
break;
|
|
280
|
-
|
|
281
|
-
case 'Int8Array':
|
|
282
|
-
case 'Uint8Array':
|
|
283
|
-
case 'Uint8ClampedArray':
|
|
284
|
-
case 'Int16Array':
|
|
285
|
-
case 'Uint16Array':
|
|
286
|
-
case 'Float16Array':
|
|
287
|
-
case 'Int32Array':
|
|
288
|
-
case 'Uint32Array':
|
|
289
|
-
case 'Float32Array':
|
|
290
|
-
case 'Float64Array':
|
|
291
|
-
case 'BigInt64Array':
|
|
292
|
-
case 'BigUint64Array':
|
|
293
|
-
case 'DataView': {
|
|
294
|
-
/** @type {import("./types.js").TypedArray} */
|
|
295
|
-
const typedArray = thing;
|
|
296
|
-
str = '["' + type + '",' + flatten(typedArray.buffer);
|
|
297
|
-
|
|
298
|
-
// handle subarrays
|
|
299
|
-
if (typedArray.byteLength !== typedArray.buffer.byteLength) {
|
|
300
|
-
// to be used with `new TypedArray(buffer, byteOffset, length)`
|
|
301
|
-
str += `,${typedArray.byteOffset},${typedArray.length}`;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
str += ']';
|
|
305
|
-
break;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
case 'ArrayBuffer': {
|
|
309
|
-
/** @type {ArrayBuffer} */
|
|
310
|
-
const arraybuffer = thing;
|
|
311
|
-
const base64 = encode64(arraybuffer);
|
|
312
|
-
|
|
313
|
-
str = `["ArrayBuffer","${base64}"]`;
|
|
314
|
-
break;
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
case 'Temporal.Duration':
|
|
318
|
-
case 'Temporal.Instant':
|
|
319
|
-
case 'Temporal.PlainDate':
|
|
320
|
-
case 'Temporal.PlainTime':
|
|
321
|
-
case 'Temporal.PlainDateTime':
|
|
322
|
-
case 'Temporal.PlainMonthDay':
|
|
323
|
-
case 'Temporal.PlainYearMonth':
|
|
324
|
-
case 'Temporal.ZonedDateTime':
|
|
325
|
-
str = `["${type}",${stringify_string(thing.toString())}]`;
|
|
326
|
-
break;
|
|
327
|
-
|
|
328
|
-
default:
|
|
329
|
-
if (!is_plain_object(thing)) {
|
|
330
|
-
throw new DevalueError(`Cannot stringify arbitrary non-POJOs`, keys, thing, value);
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
if (enumerable_symbols(thing).length > 0) {
|
|
334
|
-
throw new DevalueError(`Cannot stringify POJOs with symbolic keys`, keys, thing, value);
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
if (Object.getPrototypeOf(thing) === null) {
|
|
338
|
-
str = '["null"';
|
|
339
|
-
for (const key of Object.keys(thing)) {
|
|
340
|
-
if (key === '__proto__') {
|
|
341
|
-
throw new DevalueError(
|
|
342
|
-
`Cannot stringify objects with __proto__ keys`,
|
|
343
|
-
keys,
|
|
344
|
-
thing,
|
|
345
|
-
value
|
|
346
|
-
);
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
keys.push(stringify_key(key));
|
|
350
|
-
str += `,${stringify_string(key)},${flatten(thing[key])}`;
|
|
351
|
-
keys.pop();
|
|
352
|
-
}
|
|
353
|
-
str += ']';
|
|
354
|
-
} else {
|
|
355
|
-
str = '{';
|
|
356
|
-
let started = false;
|
|
357
|
-
for (const key of Object.keys(thing)) {
|
|
358
|
-
if (key === '__proto__') {
|
|
359
|
-
throw new DevalueError(
|
|
360
|
-
`Cannot stringify objects with __proto__ keys`,
|
|
361
|
-
keys,
|
|
362
|
-
thing,
|
|
363
|
-
value
|
|
364
|
-
);
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
if (started) str += ',';
|
|
368
|
-
started = true;
|
|
369
|
-
keys.push(stringify_key(key));
|
|
370
|
-
str += `${stringify_string(key)}:${flatten(thing[key])}`;
|
|
371
|
-
keys.pop();
|
|
372
|
-
}
|
|
373
|
-
str += '}';
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
stringified[index] = str;
|
|
379
|
-
return index;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
const index = flatten(value);
|
|
383
|
-
|
|
384
|
-
// special case — value is represented as a negative index
|
|
385
|
-
if (index < 0) return `${index}`;
|
|
386
|
-
|
|
387
|
-
return stringified;
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
/**
|
|
391
|
-
* @param {any} thing
|
|
392
|
-
* @returns {string}
|
|
393
|
-
*/
|
|
394
|
-
function stringify_primitive(thing) {
|
|
395
|
-
const type = typeof thing;
|
|
396
|
-
if (type === 'string') return stringify_string(thing);
|
|
397
|
-
if (thing === void 0) return UNDEFINED.toString();
|
|
398
|
-
if (thing === 0 && 1 / thing < 0) return NEGATIVE_ZERO.toString();
|
|
399
|
-
if (type === 'bigint') return `["BigInt","${thing}"]`;
|
|
400
|
-
return String(thing);
|
|
401
|
-
}
|