@peter.naydenov/cuts 2.0.2 → 2.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/.graphify_uncached.txt +1 -0
- package/.opencode/plugins/graphify.js +22 -0
- package/AGENTS.md +8 -0
- package/Changelog.md +9 -0
- package/README.md +154 -1
- package/coverage/lcov-report/index.html +1 -1
- package/coverage/lcov-report/src/findInstructions.js.html +1 -1
- package/coverage/lcov-report/src/index.html +1 -1
- package/coverage/lcov-report/src/main.js.html +1 -1
- package/coverage/lcov-report/src/methods/hide.js.html +1 -1
- package/coverage/lcov-report/src/methods/index.html +1 -1
- package/coverage/lcov-report/src/methods/jump.js.html +1 -1
- package/coverage/lcov-report/src/methods/jumpBack.js.html +1 -1
- package/coverage/lcov-report/src/methods/jumpsReset.js.html +1 -1
- package/coverage/lcov-report/src/methods/listShortcuts.js.html +1 -1
- package/coverage/lcov-report/src/methods/setScenes.js.html +1 -1
- package/coverage/lcov-report/src/methods/show.js.html +1 -1
- package/coverage/lcov-report/src/setInstruction.js.html +1 -1
- package/dist/cuts.umd.js +1 -1
- package/graphify-out/.graphify_python +1 -0
- package/graphify-out/GRAPH_REPORT.md +308 -0
- package/graphify-out/cache/012d3294918720b55e6b92b199990cfc018241eea880e1f6e6a0724aa6e1f17f.json +1 -0
- package/graphify-out/cache/01cec5959c65918486350dcf1673e6e3fc496e3f888d6872533927da64581a04.json +1 -0
- package/graphify-out/cache/0940319c089ade1ec8424e8d1a54cb8b4d8b5398da48bbb44dd68cefe9d33c00.json +1 -0
- package/graphify-out/cache/0da80b47b352499ba03cd5dee2fc281a98f09a19480e622d15faf49157df074b.json +1 -0
- package/graphify-out/cache/0e905bdb9bcd5a94e8d4f53d8c3a5c074283166b302d39436dbb245f2ec35e70.json +1 -0
- package/graphify-out/cache/0fa5cad2f351dcaa7d35b48576dee7f9ac9c5cc4b394b1f0deaff8a180e3c451.json +1 -0
- package/graphify-out/cache/10aa1439c5bfd598b80d729e5ba3b6cfdb58bd2b359f420c292aafc8c035a02d.json +1 -0
- package/graphify-out/cache/131c1daae8abc86c8218622f56273af8b1b9f9fa4aec2998ef825bca0f62913d.json +1 -0
- package/graphify-out/cache/17e5f2beac577cb4a9318ab14e559216c17efa10b9066767965970dbb5303aa8.json +1 -0
- package/graphify-out/cache/1e04390c6e1cff4babe570ffb9ca69c7dc48aedbd5a590844ad0306870c384a4.json +1 -0
- package/graphify-out/cache/240c8091236475ff2ee2cf2f9f9f6e80be1616c8f608aec6f0bd7df848581adc.json +1 -0
- package/graphify-out/cache/24418a06ce214a93595cb57c1a4c951b233e7e8fdc47122e2ba02935970a7266.json +1 -0
- package/graphify-out/cache/2675052ddc9cfa31333f6810c81eb9cfac04a6a627bd897a68963adcfb6a8c08.json +1 -0
- package/graphify-out/cache/309a7e48db971f382ade80198bb1fc2afaa016a36a2a7cfcb2a8538d79061530.json +1 -0
- package/graphify-out/cache/323e2198675ff4fba301afb26c3b188db91039aed029d2b3c4afd659ce75ca92.json +1 -0
- package/graphify-out/cache/3493a990cec8e577d0da3de4a54229b649a63400a4023ca1911c082309e27e7b.json +1 -0
- package/graphify-out/cache/35745072ea817929ae9707d52b4601e63a15233d033c67575cd13f4fef4a6374.json +1 -0
- package/graphify-out/cache/3bb336d107d9e0f7243aaf6249f4218da2af6734736192633943f0fabe04bd11.json +1 -0
- package/graphify-out/cache/4182a1dd2fcfa44f6ccc7615259fc5288fc1c5f23b6e41dd1d31acaad9d9672a.json +1 -0
- package/graphify-out/cache/4b1b786ba42a5f31760aacecaec23d8a430fdc7054d9fc94aeda68e1a814a37b.json +1 -0
- package/graphify-out/cache/53400873bbb9d220df1cd34714577c750185538ca2f43ce726c7e9d2064d9890.json +1 -0
- package/graphify-out/cache/5552036f9715ed1c0e0793131c919739e887f413ef8979efd8dac0d347d26a92.json +1 -0
- package/graphify-out/cache/55f4ffb8c1f3a0a68dd78016df9e1309f481b5942b468abab7f567fc8aa0f2ab.json +1 -0
- package/graphify-out/cache/570424b2534780740fec1c08d7435bb228af7705e3f6e9fa28ee087a6092c916.json +1 -0
- package/graphify-out/cache/573b92c02548ab00fcf9351dfa2c6fe7f401acca2b9315133edc7453e82a25bb.json +1 -0
- package/graphify-out/cache/57c611c887a762e47fff496f1438e35bff2794807b327ace69dc40b4b5126f6c.json +1 -0
- package/graphify-out/cache/682fea1576e6f89f0bbeecab480fdf3a3a15649f6f41b1af6db758248b4669a1.json +1 -0
- package/graphify-out/cache/6ca8a0aa9022e68f010ca8ece5ee0c5ba9616d31aa1716634bcb61fd7c03baf0.json +1 -0
- package/graphify-out/cache/7098a2a328c738b93faea79761188f18a8c8daaf530a590df89f1e3f6ecce7ed.json +1 -0
- package/graphify-out/cache/782b5a020c37aa0cc0163a21d32ea7af9a9677dbbf267a6c109aa9a919e5d79d.json +1 -0
- package/graphify-out/cache/8771f4d3ccb4ae55a13a2d1a452626e0dadb16a146ef0839dd963e42b3decfa2.json +1 -0
- package/graphify-out/cache/93fdbd9b92d3928bec4b31972bc7f458551868ce10157e68b624addbc310e45e.json +1 -0
- package/graphify-out/cache/941ca37c98b5c5e4224d8f28c98d82164fb9e047f551122ed9dd1e172c9ca210.json +1 -0
- package/graphify-out/cache/9603602b27e8453e47faac0e540e17de9e2473d716d2c1399b860d1ede74e649.json +1 -0
- package/graphify-out/cache/965a31d7d62cd7f81146f1c4c39b37535a7b0c720a800856477250781254fc23.json +1 -0
- package/graphify-out/cache/9a192662abf3d936dfc83c16bf18d6a46ac2ce3f16fb493050178eafcf640326.json +1 -0
- package/graphify-out/cache/9a4c098d43c0f0ec653bdfd3b68a482376fdd3a25c31c6b92bb92d8a49ed4de7.json +1 -0
- package/graphify-out/cache/9aec2f693fa17698f1d16683fff1947eab153d1fd788ee25ec4d06f6ba0b8171.json +1 -0
- package/graphify-out/cache/9daaa95737c689bd88ed99b880c7b4add83dfffa17ad6431aade0e8037946ce1.json +1 -0
- package/graphify-out/cache/a12981414bb5c59b6e9ad87b36cb4eb9c1e9b49cb7446ecb2789ab4496d1d4b3.json +1 -0
- package/graphify-out/cache/aa9a32d2538270661b9f591dec199134eb51488f103325c93e8eeb29f6088307.json +1 -0
- package/graphify-out/cache/ae75925bf4fc6a110fa7af9a0a8b20da642d6e61b8ac079b9a843c2e7848d2bf.json +1 -0
- package/graphify-out/cache/b0e7e88b335107d2ebb72524803d5575fc84eeb6c065e5c8dce8e659f59b14ce.json +1 -0
- package/graphify-out/cache/b5bad0c1d525f2d57687ff82e3f52644140625f0bb9a91e2a40bb94f172295ba.json +1 -0
- package/graphify-out/cache/bb9cde14b37ae2b22720974339bda8c8698f8db8e03ae108fc4e0a1b175a5799.json +1 -0
- package/graphify-out/cache/bfb8682a587eb2a75f2de9a6cb68eea52c6791ce763ed9fd370e4186f2ca964d.json +1 -0
- package/graphify-out/cache/c0e0ab86119b69a71d7c07134e3259961c112ac293d1c1976ebdaa975c6634a1.json +1 -0
- package/graphify-out/cache/cbd4d1c99376a1a9cbac38a927bc9bab92bdf6715ca31f99388b02ccab3accc1.json +1 -0
- package/graphify-out/cache/df569c88c4ba775eea79ac5596fe3b70345f3ee7a53459d865e196e0e807d966.json +1 -0
- package/graphify-out/cache/f6feb53a375f42d12de35e3a7d29cc2f3263f9fca0eff30b5f0ea2dd50a4bc7f.json +1 -0
- package/graphify-out/cache/ffc7c58210d00973bed4dc58e0d97fe862129d2dfeba3a60ea643bcb5ae6757f.json +1 -0
- package/graphify-out/cost.json +12 -0
- package/graphify-out/graph.html +266 -0
- package/graphify-out/graph.json +3190 -0
- package/graphify-out/manifest.json +52 -0
- package/opencode.json +6 -0
- package/package.json +21 -21
- package/playwright.config.js +13 -0
- package/test/01-findPosition.test.js +119 -0
- package/test/02-cuts.test.js +412 -0
- package/test-e2e/01-general.test.js +290 -0
- package/test-e2e/index.html +30 -0
- package/test-e2e/node_modules/.package-lock.json +584 -0
- package/test-e2e/node_modules/.vite/deps/@peter__naydenov_log.js +36 -0
- package/test-e2e/node_modules/.vite/deps/@peter__naydenov_log.js.map +1 -0
- package/test-e2e/node_modules/.vite/deps/@peter__naydenov_shortcuts.js +983 -0
- package/test-e2e/node_modules/.vite/deps/@peter__naydenov_shortcuts.js.map +1 -0
- package/test-e2e/node_modules/.vite/deps/@peter__naydenov_visual-controller-for-vue3.js +267 -0
- package/test-e2e/node_modules/.vite/deps/@peter__naydenov_visual-controller-for-vue3.js.map +1 -0
- package/test-e2e/node_modules/.vite/deps/_metadata.json +44 -0
- package/test-e2e/node_modules/.vite/deps/ask-for-promise.js +223 -0
- package/test-e2e/node_modules/.vite/deps/ask-for-promise.js.map +1 -0
- package/test-e2e/node_modules/.vite/deps/package.json +3 -0
- package/test-e2e/node_modules/.vite/deps/vue.js +2 -0
- package/test-e2e/node_modules/.vite/deps/vue.runtime.esm-bundler-DaROHT9e.js +8579 -0
- package/test-e2e/node_modules/.vite/deps/vue.runtime.esm-bundler-DaROHT9e.js.map +1 -0
- package/test-e2e/node_modules/@babel/helper-string-parser/LICENSE +22 -0
- package/test-e2e/node_modules/@babel/helper-string-parser/README.md +19 -0
- package/test-e2e/node_modules/@babel/helper-string-parser/lib/index.js +295 -0
- package/test-e2e/node_modules/@babel/helper-string-parser/lib/index.js.map +1 -0
- package/test-e2e/node_modules/@babel/helper-string-parser/package.json +31 -0
- package/test-e2e/node_modules/@babel/helper-validator-identifier/LICENSE +22 -0
- package/test-e2e/node_modules/@babel/helper-validator-identifier/README.md +19 -0
- package/test-e2e/node_modules/@babel/helper-validator-identifier/lib/identifier.js +70 -0
- package/test-e2e/node_modules/@babel/helper-validator-identifier/lib/identifier.js.map +1 -0
- package/test-e2e/node_modules/@babel/helper-validator-identifier/lib/index.js +57 -0
- package/test-e2e/node_modules/@babel/helper-validator-identifier/lib/index.js.map +1 -0
- package/test-e2e/node_modules/@babel/helper-validator-identifier/lib/keyword.js +35 -0
- package/test-e2e/node_modules/@babel/helper-validator-identifier/lib/keyword.js.map +1 -0
- package/test-e2e/node_modules/@babel/helper-validator-identifier/package.json +31 -0
- package/test-e2e/node_modules/@babel/parser/CHANGELOG.md +1073 -0
- package/test-e2e/node_modules/@babel/parser/LICENSE +19 -0
- package/test-e2e/node_modules/@babel/parser/README.md +19 -0
- package/test-e2e/node_modules/@babel/parser/bin/babel-parser.js +15 -0
- package/test-e2e/node_modules/@babel/parser/lib/index.js +14582 -0
- package/test-e2e/node_modules/@babel/parser/lib/index.js.map +1 -0
- package/test-e2e/node_modules/@babel/parser/package.json +50 -0
- package/test-e2e/node_modules/@babel/parser/typings/babel-parser.d.ts +262 -0
- package/test-e2e/node_modules/@babel/types/LICENSE +22 -0
- package/test-e2e/node_modules/@babel/types/README.md +19 -0
- package/test-e2e/node_modules/@babel/types/lib/asserts/assertNode.js +16 -0
- package/test-e2e/node_modules/@babel/types/lib/asserts/assertNode.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/asserts/generated/index.js +1251 -0
- package/test-e2e/node_modules/@babel/types/lib/asserts/generated/index.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/ast-types/generated/index.js +3 -0
- package/test-e2e/node_modules/@babel/types/lib/ast-types/generated/index.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js +18 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js +31 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/generated/index.js +29 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/generated/index.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/generated/lowercase.js +2902 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/generated/lowercase.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/generated/uppercase.js +272 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/generated/uppercase.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/productions.js +12 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/productions.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/react/buildChildren.js +24 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/react/buildChildren.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js +22 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/validateNode.js +21 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/validateNode.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/clone/clone.js +12 -0
- package/test-e2e/node_modules/@babel/types/lib/clone/clone.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/clone/cloneDeep.js +12 -0
- package/test-e2e/node_modules/@babel/types/lib/clone/cloneDeep.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js +12 -0
- package/test-e2e/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/clone/cloneNode.js +107 -0
- package/test-e2e/node_modules/@babel/types/lib/clone/cloneNode.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js +12 -0
- package/test-e2e/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/comments/addComment.js +15 -0
- package/test-e2e/node_modules/@babel/types/lib/comments/addComment.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/comments/addComments.js +22 -0
- package/test-e2e/node_modules/@babel/types/lib/comments/addComments.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/comments/inheritInnerComments.js +12 -0
- package/test-e2e/node_modules/@babel/types/lib/comments/inheritInnerComments.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/comments/inheritLeadingComments.js +12 -0
- package/test-e2e/node_modules/@babel/types/lib/comments/inheritLeadingComments.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/comments/inheritTrailingComments.js +12 -0
- package/test-e2e/node_modules/@babel/types/lib/comments/inheritTrailingComments.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/comments/inheritsComments.js +17 -0
- package/test-e2e/node_modules/@babel/types/lib/comments/inheritsComments.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/comments/removeComments.js +15 -0
- package/test-e2e/node_modules/@babel/types/lib/comments/removeComments.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/constants/generated/index.js +60 -0
- package/test-e2e/node_modules/@babel/types/lib/constants/generated/index.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/constants/index.js +31 -0
- package/test-e2e/node_modules/@babel/types/lib/constants/index.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/ensureBlock.js +14 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/ensureBlock.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js +65 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js +14 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/toBlock.js +29 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/toBlock.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/toComputedKey.js +14 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/toComputedKey.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/toExpression.js +28 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/toExpression.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/toIdentifier.js +25 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/toIdentifier.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/toKeyAlias.js +38 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/toKeyAlias.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/toSequenceExpression.js +19 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/toSequenceExpression.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/toStatement.js +39 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/toStatement.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/valueToNode.js +89 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/valueToNode.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/core.js +1725 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/core.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/deprecated-aliases.js +11 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/deprecated-aliases.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/experimental.js +124 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/experimental.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/flow.js +495 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/flow.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/index.js +106 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/index.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/jsx.js +157 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/jsx.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/misc.js +31 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/misc.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/placeholders.js +27 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/placeholders.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/typescript.js +528 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/typescript.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/utils.js +296 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/utils.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/index-legacy.d.ts +2797 -0
- package/test-e2e/node_modules/@babel/types/lib/index.d.ts +3617 -0
- package/test-e2e/node_modules/@babel/types/lib/index.js +582 -0
- package/test-e2e/node_modules/@babel/types/lib/index.js.flow +2650 -0
- package/test-e2e/node_modules/@babel/types/lib/index.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js +15 -0
- package/test-e2e/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js +65 -0
- package/test-e2e/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/modifications/inherits.js +28 -0
- package/test-e2e/node_modules/@babel/types/lib/modifications/inherits.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js +17 -0
- package/test-e2e/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/modifications/removeProperties.js +24 -0
- package/test-e2e/node_modules/@babel/types/lib/modifications/removeProperties.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js +14 -0
- package/test-e2e/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js +66 -0
- package/test-e2e/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/retrievers/getAssignmentIdentifiers.js +48 -0
- package/test-e2e/node_modules/@babel/types/lib/retrievers/getAssignmentIdentifiers.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js +102 -0
- package/test-e2e/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/retrievers/getFunctionName.js +63 -0
- package/test-e2e/node_modules/@babel/types/lib/retrievers/getFunctionName.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js +13 -0
- package/test-e2e/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/traverse/traverse.js +50 -0
- package/test-e2e/node_modules/@babel/types/lib/traverse/traverse.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/traverse/traverseFast.js +40 -0
- package/test-e2e/node_modules/@babel/types/lib/traverse/traverseFast.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/utils/deprecationWarning.js +44 -0
- package/test-e2e/node_modules/@babel/types/lib/utils/deprecationWarning.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/utils/inherit.js +13 -0
- package/test-e2e/node_modules/@babel/types/lib/utils/inherit.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js +40 -0
- package/test-e2e/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/utils/shallowEqual.js +17 -0
- package/test-e2e/node_modules/@babel/types/lib/utils/shallowEqual.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js +13 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/generated/index.js +2797 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/generated/index.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/is.js +27 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/is.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isBinding.js +27 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isBinding.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isBlockScoped.js +13 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isBlockScoped.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isImmutable.js +21 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isImmutable.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isLet.js +13 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isLet.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isNode.js +12 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isNode.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isNodesEquivalent.js +57 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isNodesEquivalent.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isPlaceholderType.js +15 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isPlaceholderType.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isReferenced.js +96 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isReferenced.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isScope.js +18 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isScope.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isSpecifierDefault.js +14 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isSpecifierDefault.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isType.js +17 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isType.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isValidES3Identifier.js +13 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isValidES3Identifier.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isValidIdentifier.js +18 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isValidIdentifier.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isVar.js +15 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isVar.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/matchesPattern.js +44 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/matchesPattern.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/react/isCompatTag.js +11 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/react/isCompatTag.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/react/isReactComponent.js +11 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/react/isReactComponent.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/validate.js +42 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/validate.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/package.json +39 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/LICENSE +19 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/README.md +264 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs +423 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map +6 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js +464 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map +6 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/package.json +63 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/src/scopes.ts +345 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts +111 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/src/strings.ts +65 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/src/vlq.ts +55 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts +50 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts.map +1 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts +50 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts.map +1 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts +9 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts.map +1 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts +9 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts.map +1 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts +16 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts.map +1 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts +16 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts.map +1 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts +7 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts.map +1 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts +7 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts.map +1 -0
- package/test-e2e/node_modules/@oxc-project/types/LICENSE +22 -0
- package/test-e2e/node_modules/@oxc-project/types/README.md +3 -0
- package/test-e2e/node_modules/@oxc-project/types/package.json +26 -0
- package/test-e2e/node_modules/@oxc-project/types/types.d.ts +1912 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/.github/ISSUE_TEMPLATE/bug_report.md +32 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/CODE_OF_CONDUCT.md +128 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/Changelog.md +88 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/LICENSE +21 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/README.md +294 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/SECURITY.md +18 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/coverage/lcov-report/base.css +224 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/coverage/lcov-report/block-navigation.js +87 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/coverage/lcov-report/favicon.png +0 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/coverage/lcov-report/index.html +116 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/coverage/lcov-report/main.js.html +592 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/coverage/lcov-report/prettify.css +1 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/coverage/lcov-report/prettify.js +2 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/coverage/lcov-report/sorter.js +196 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/coverage/lcov.info +246 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/coverage/tmp/coverage-46509-1760816753149-0.json +1 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/coverage/tmp/coverage-46510-1760816753116-0.json +1 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/dist/notice.cjs +1 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/dist/notice.esm.mjs +1 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/dist/notice.umd.js +1 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/notice-desk.png +0 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/package.json +64 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/rollup.config.js +37 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/src/main.js +168 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/tsconfig.json +11 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/types/main.d.ts +12 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/types/main.d.ts.map +1 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/types/src/main.d.ts +12 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/types/src/main.d.ts.map +1 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/API.md +939 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/CODE_OF_CONDUCT.md +84 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/CONTRIBUTING.md +476 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/Changelog.md +217 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/How.to.create.plugins.md +929 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/LICENSE +21 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/Migration.guide.md +176 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/README-v.2.x.x.md +375 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/README.md +900 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/main.d.ts +172 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/methods/_normalizeWithPlugins.d.ts +64 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/methods/_readShortcutWithPlugins.d.ts +9 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/methods/_setupPlugin.d.ts +9 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/methods/_systemAction.d.ts +9 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/methods/changeContext.d.ts +9 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/methods/index.d.ts +19 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/methods/listShortcuts.d.ts +2 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/methods/load.d.ts +9 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/methods/unload.d.ts +9 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/click/_findTarget.d.ts +10 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/click/_listenDOM.d.ts +78 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/click/_normalizeShortcutName.d.ts +8 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/click/_readClickEvent.d.ts +2 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/click/_registerShortcutEvents.d.ts +28 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/click/index.d.ts +16 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/form/_defaults.d.ts +17 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/form/_listenDOM.d.ts +68 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/form/_normalizeShortcutName.d.ts +2 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/form/_registerShortcutEvents.d.ts +96 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/form/index.d.ts +9 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/hover/_findTarget.d.ts +10 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/hover/_listenDOM.d.ts +68 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/hover/_normalizeShortcutName.d.ts +2 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/hover/_registerShortcutEvents.d.ts +28 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/hover/index.d.ts +14 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/key/_listenDOM.d.ts +63 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/key/_normalizeShortcutName.d.ts +2 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/key/_readKeyEvent.d.ts +2 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/key/_registerShortcutEvents.d.ts +28 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/key/_specialChars.d.ts +7 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/key/index.d.ts +14 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/scroll/_listenDOM.d.ts +58 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/scroll/_normalizeShortcutName.d.ts +2 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/scroll/_registerShortcutEvents.d.ts +28 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/scroll/index.d.ts +16 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/shortcuts.cjs +1 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/shortcuts.esm.mjs +1 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/shortcuts.umd.js +1 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/main.d.ts +172 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/methods/_normalizeWithPlugins.d.ts +64 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/methods/_readShortcutWithPlugins.d.ts +9 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/methods/_setupPlugin.d.ts +9 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/methods/_systemAction.d.ts +9 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/methods/changeContext.d.ts +9 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/methods/index.d.ts +19 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/methods/listShortcuts.d.ts +2 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/methods/load.d.ts +9 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/methods/unload.d.ts +9 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/click/_findTarget.d.ts +10 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/click/_listenDOM.d.ts +78 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/click/_normalizeShortcutName.d.ts +8 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/click/_readClickEvent.d.ts +2 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/click/_registerShortcutEvents.d.ts +28 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/click/index.d.ts +16 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/form/_defaults.d.ts +17 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/form/_listenDOM.d.ts +68 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/form/_normalizeShortcutName.d.ts +2 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/form/_registerShortcutEvents.d.ts +96 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/form/index.d.ts +9 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/hover/_findTarget.d.ts +10 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/hover/_listenDOM.d.ts +68 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/hover/_normalizeShortcutName.d.ts +2 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/hover/_registerShortcutEvents.d.ts +28 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/hover/index.d.ts +14 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/key/_listenDOM.d.ts +63 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/key/_normalizeShortcutName.d.ts +2 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/key/_readKeyEvent.d.ts +2 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/key/_registerShortcutEvents.d.ts +28 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/key/_specialChars.d.ts +7 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/key/index.d.ts +14 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/scroll/_listenDOM.d.ts +58 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/scroll/_normalizeShortcutName.d.ts +2 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/scroll/_registerShortcutEvents.d.ts +28 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/scroll/index.d.ts +16 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/eslint.config.js +80 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/html/assets/index-COTh6lXR.css +1 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/html/assets/index-DOkKC3NI.js +53 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/html/bg.png +0 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/html/favicon.ico +0 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/html/favicon.svg +5 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/html/html.meta.json.gz +0 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/html/index.html +32 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/index.html +126 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/javascript.svg +1 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/jsconfig.json +10 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/package.json +66 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/public/vite.svg +1 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/rollup.config.js +40 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/shortcuts.png +0 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/main.js +302 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/methods/_normalizeWithPlugins.js +49 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/methods/_readShortcutWithPlugins.js +32 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/methods/_setupPlugin.js +93 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/methods/_systemAction.js +33 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/methods/changeContext.js +68 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/methods/index.js +25 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/methods/listShortcuts.js +34 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/methods/load.js +58 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/methods/unload.js +38 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/click/_findTarget.js +26 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/click/_listenDOM.js +165 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/click/_normalizeShortcutName.js +51 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/click/_readClickEvent.js +24 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/click/_registerShortcutEvents.js +58 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/click/index.js +67 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/form/_defaults.js +28 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/form/_listenDOM.js +127 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/form/_normalizeShortcutName.js +21 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/form/_registerShortcutEvents.js +147 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/form/index.js +58 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/hover/_findTarget.js +26 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/hover/_listenDOM.js +154 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/hover/_normalizeShortcutName.js +21 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/hover/_registerShortcutEvents.js +51 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/hover/index.js +71 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/key/_listenDOM.js +186 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/key/_normalizeShortcutName.js +32 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/key/_readKeyEvent.js +28 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/key/_registerShortcutEvents.js +57 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/key/_specialChars.js +43 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/key/index.js +67 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/scroll/_listenDOM.js +141 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/scroll/_normalizeShortcutName.js +21 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/scroll/_registerShortcutEvents.js +50 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/scroll/index.js +61 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/style.css +97 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/test/01-general.test.js +275 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/test/02-key.test.js +473 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/test/03-click.test.js +596 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/test/04-form.test.js +327 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/test/05-hover.test.js +463 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/test/06-scroll.test.js +374 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/test-helpers/Block.jsx +15 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/test-helpers/setup.js +18 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/test-helpers/style.css +26 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/test-helpers/wait.js +8 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/tsconfig.json +24 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/vite.config.js +7 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/vitest.config.js +23 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/LICENSE +21 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/cypress/fixtures/example.json +5 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/cypress/support/commands.js +25 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/cypress/support/component-index.html +12 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/cypress/support/component.js +27 -0
- package/{cypress.config.mjs → test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/cypress.config.js} +2 -3
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/dist/visual-controller-for-vue3.cjs +1 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/dist/visual-controller-for-vue3.esm.mjs +1 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/dist/visual-controller-for-vue3.umd.js +1 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/index.html +13 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/package.json +43 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/public/vite.svg +1 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/readme.md +233 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/rollup.config.js +42 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/src/App.vue +44 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/src/assets/vue.svg +1 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/src/components/HelloWorld.vue +26 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/src/main.js +101 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/src/style.css +90 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/test/01_general.cy.js +98 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/vite.config.js +7 -0
- package/test-e2e/node_modules/@rolldown/binding-darwin-arm64/README.md +3 -0
- package/test-e2e/node_modules/@rolldown/binding-darwin-arm64/package.json +37 -0
- package/test-e2e/node_modules/@rolldown/binding-darwin-arm64/rolldown-binding.darwin-arm64.node +0 -0
- package/test-e2e/node_modules/@rolldown/pluginutils/LICENSE +25 -0
- package/test-e2e/node_modules/@rolldown/pluginutils/README.md +77 -0
- package/test-e2e/node_modules/@rolldown/pluginutils/dist/filter/composable-filters.d.ts +90 -0
- package/test-e2e/node_modules/@rolldown/pluginutils/dist/filter/composable-filters.js +256 -0
- package/test-e2e/node_modules/@rolldown/pluginutils/dist/filter/filter-vite-plugins.d.ts +28 -0
- package/test-e2e/node_modules/@rolldown/pluginutils/dist/filter/filter-vite-plugins.js +75 -0
- package/test-e2e/node_modules/@rolldown/pluginutils/dist/filter/index.d.ts +3 -0
- package/test-e2e/node_modules/@rolldown/pluginutils/dist/filter/index.js +3 -0
- package/test-e2e/node_modules/@rolldown/pluginutils/dist/filter/simple-filters.d.ts +71 -0
- package/test-e2e/node_modules/@rolldown/pluginutils/dist/filter/simple-filters.js +70 -0
- package/test-e2e/node_modules/@rolldown/pluginutils/dist/index.d.ts +1 -0
- package/test-e2e/node_modules/@rolldown/pluginutils/dist/index.js +1 -0
- package/test-e2e/node_modules/@rolldown/pluginutils/dist/utils.d.ts +2 -0
- package/test-e2e/node_modules/@rolldown/pluginutils/dist/utils.js +17 -0
- package/test-e2e/node_modules/@rolldown/pluginutils/package.json +37 -0
- package/test-e2e/node_modules/@vitejs/plugin-vue/LICENSE +21 -0
- package/test-e2e/node_modules/@vitejs/plugin-vue/README.md +278 -0
- package/test-e2e/node_modules/@vitejs/plugin-vue/dist/index.d.mts +120 -0
- package/test-e2e/node_modules/@vitejs/plugin-vue/dist/index.mjs +1745 -0
- package/test-e2e/node_modules/@vitejs/plugin-vue/package.json +65 -0
- package/test-e2e/node_modules/@vue/compiler-core/LICENSE +21 -0
- package/test-e2e/node_modules/@vue/compiler-core/README.md +1 -0
- package/test-e2e/node_modules/@vue/compiler-core/dist/compiler-core.cjs.js +6888 -0
- package/test-e2e/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +6763 -0
- package/test-e2e/node_modules/@vue/compiler-core/dist/compiler-core.d.ts +1100 -0
- package/test-e2e/node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js +5835 -0
- package/test-e2e/node_modules/@vue/compiler-core/index.js +7 -0
- package/test-e2e/node_modules/@vue/compiler-core/package.json +58 -0
- package/test-e2e/node_modules/@vue/compiler-dom/LICENSE +21 -0
- package/test-e2e/node_modules/@vue/compiler-dom/README.md +1 -0
- package/test-e2e/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.js +934 -0
- package/test-e2e/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +689 -0
- package/test-e2e/node_modules/@vue/compiler-dom/dist/compiler-dom.d.ts +45 -0
- package/test-e2e/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.js +6644 -0
- package/test-e2e/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.prod.js +14 -0
- package/test-e2e/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js +690 -0
- package/test-e2e/node_modules/@vue/compiler-dom/dist/compiler-dom.global.js +6814 -0
- package/test-e2e/node_modules/@vue/compiler-dom/dist/compiler-dom.global.prod.js +14 -0
- package/test-e2e/node_modules/@vue/compiler-dom/index.js +7 -0
- package/test-e2e/node_modules/@vue/compiler-dom/package.json +57 -0
- package/test-e2e/node_modules/@vue/compiler-sfc/LICENSE +21 -0
- package/test-e2e/node_modules/@vue/compiler-sfc/README.md +79 -0
- package/test-e2e/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js +25619 -0
- package/test-e2e/node_modules/@vue/compiler-sfc/dist/compiler-sfc.d.ts +487 -0
- package/test-e2e/node_modules/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js +50833 -0
- package/test-e2e/node_modules/@vue/compiler-sfc/package.json +67 -0
- package/test-e2e/node_modules/@vue/compiler-ssr/LICENSE +21 -0
- package/test-e2e/node_modules/@vue/compiler-ssr/README.md +1 -0
- package/test-e2e/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +1413 -0
- package/test-e2e/node_modules/@vue/compiler-ssr/dist/compiler-ssr.d.ts +4 -0
- package/test-e2e/node_modules/@vue/compiler-ssr/package.json +34 -0
- package/test-e2e/node_modules/@vue/reactivity/LICENSE +21 -0
- package/test-e2e/node_modules/@vue/reactivity/README.md +19 -0
- package/test-e2e/node_modules/@vue/reactivity/dist/reactivity.cjs.js +2033 -0
- package/test-e2e/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +1877 -0
- package/test-e2e/node_modules/@vue/reactivity/dist/reactivity.d.ts +756 -0
- package/test-e2e/node_modules/@vue/reactivity/dist/reactivity.esm-browser.js +2031 -0
- package/test-e2e/node_modules/@vue/reactivity/dist/reactivity.esm-browser.prod.js +5 -0
- package/test-e2e/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js +1990 -0
- package/test-e2e/node_modules/@vue/reactivity/dist/reactivity.global.js +2087 -0
- package/test-e2e/node_modules/@vue/reactivity/dist/reactivity.global.prod.js +5 -0
- package/test-e2e/node_modules/@vue/reactivity/index.js +7 -0
- package/test-e2e/node_modules/@vue/reactivity/package.json +55 -0
- package/test-e2e/node_modules/@vue/runtime-core/LICENSE +21 -0
- package/test-e2e/node_modules/@vue/runtime-core/README.md +28 -0
- package/test-e2e/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js +8718 -0
- package/test-e2e/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +6856 -0
- package/test-e2e/node_modules/@vue/runtime-core/dist/runtime-core.d.ts +1866 -0
- package/test-e2e/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js +8647 -0
- package/test-e2e/node_modules/@vue/runtime-core/index.js +7 -0
- package/test-e2e/node_modules/@vue/runtime-core/package.json +52 -0
- package/test-e2e/node_modules/@vue/runtime-dom/LICENSE +21 -0
- package/test-e2e/node_modules/@vue/runtime-dom/README.md +13 -0
- package/test-e2e/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.js +1946 -0
- package/test-e2e/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +1796 -0
- package/test-e2e/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts +1450 -0
- package/test-e2e/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.js +12794 -0
- package/test-e2e/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.prod.js +7 -0
- package/test-e2e/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js +1985 -0
- package/test-e2e/node_modules/@vue/runtime-dom/dist/runtime-dom.global.js +12847 -0
- package/test-e2e/node_modules/@vue/runtime-dom/dist/runtime-dom.global.prod.js +7 -0
- package/test-e2e/node_modules/@vue/runtime-dom/index.js +7 -0
- package/test-e2e/node_modules/@vue/runtime-dom/package.json +60 -0
- package/test-e2e/node_modules/@vue/server-renderer/LICENSE +21 -0
- package/test-e2e/node_modules/@vue/server-renderer/README.md +178 -0
- package/test-e2e/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js +1159 -0
- package/test-e2e/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +883 -0
- package/test-e2e/node_modules/@vue/server-renderer/dist/server-renderer.d.ts +65 -0
- package/test-e2e/node_modules/@vue/server-renderer/dist/server-renderer.esm-browser.js +8627 -0
- package/test-e2e/node_modules/@vue/server-renderer/dist/server-renderer.esm-browser.prod.js +5 -0
- package/test-e2e/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js +1097 -0
- package/test-e2e/node_modules/@vue/server-renderer/index.js +7 -0
- package/test-e2e/node_modules/@vue/server-renderer/package.json +55 -0
- package/test-e2e/node_modules/@vue/shared/LICENSE +21 -0
- package/test-e2e/node_modules/@vue/shared/README.md +3 -0
- package/test-e2e/node_modules/@vue/shared/dist/shared.cjs.js +612 -0
- package/test-e2e/node_modules/@vue/shared/dist/shared.cjs.prod.js +604 -0
- package/test-e2e/node_modules/@vue/shared/dist/shared.d.ts +334 -0
- package/test-e2e/node_modules/@vue/shared/dist/shared.esm-bundler.js +536 -0
- package/test-e2e/node_modules/@vue/shared/index.js +7 -0
- package/test-e2e/node_modules/@vue/shared/package.json +47 -0
- package/test-e2e/node_modules/ask-for-promise/LICENSE +21 -0
- package/test-e2e/node_modules/ask-for-promise/README.md +278 -0
- package/test-e2e/node_modules/ask-for-promise/dist/ask-for-promise.cjs +1 -0
- package/test-e2e/node_modules/ask-for-promise/dist/ask-for-promise.esm.mjs +1 -0
- package/test-e2e/node_modules/ask-for-promise/dist/ask-for-promise.umd.js +1 -0
- package/test-e2e/node_modules/ask-for-promise/package.json +77 -0
- package/test-e2e/node_modules/ask-for-promise/src/askForPromise.js +277 -0
- package/test-e2e/node_modules/ask-for-promise/types/index.d.ts +18 -0
- package/test-e2e/node_modules/csstype/LICENSE +19 -0
- package/test-e2e/node_modules/csstype/README.md +291 -0
- package/test-e2e/node_modules/csstype/index.d.ts +22569 -0
- package/test-e2e/node_modules/csstype/index.js.flow +6863 -0
- package/test-e2e/node_modules/csstype/package.json +70 -0
- package/test-e2e/node_modules/detect-libc/LICENSE +201 -0
- package/test-e2e/node_modules/detect-libc/README.md +163 -0
- package/test-e2e/node_modules/detect-libc/index.d.ts +14 -0
- package/test-e2e/node_modules/detect-libc/lib/detect-libc.js +313 -0
- package/test-e2e/node_modules/detect-libc/lib/elf.js +39 -0
- package/test-e2e/node_modules/detect-libc/lib/filesystem.js +51 -0
- package/test-e2e/node_modules/detect-libc/lib/process.js +24 -0
- package/test-e2e/node_modules/detect-libc/package.json +44 -0
- package/test-e2e/node_modules/entities/LICENSE +11 -0
- package/test-e2e/node_modules/entities/decode.d.ts +3 -0
- package/test-e2e/node_modules/entities/decode.js +3 -0
- package/test-e2e/node_modules/entities/dist/commonjs/decode-codepoint.d.ts +19 -0
- package/test-e2e/node_modules/entities/dist/commonjs/decode-codepoint.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/decode-codepoint.js +77 -0
- package/test-e2e/node_modules/entities/dist/commonjs/decode-codepoint.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/decode.d.ts +205 -0
- package/test-e2e/node_modules/entities/dist/commonjs/decode.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/decode.js +568 -0
- package/test-e2e/node_modules/entities/dist/commonjs/decode.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/encode.d.ts +22 -0
- package/test-e2e/node_modules/entities/dist/commonjs/encode.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/encode.js +92 -0
- package/test-e2e/node_modules/entities/dist/commonjs/encode.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/escape.d.ts +46 -0
- package/test-e2e/node_modules/entities/dist/commonjs/escape.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/escape.js +138 -0
- package/test-e2e/node_modules/entities/dist/commonjs/escape.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/generated/decode-data-html.d.ts +2 -0
- package/test-e2e/node_modules/entities/dist/commonjs/generated/decode-data-html.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/generated/decode-data-html.js +7 -0
- package/test-e2e/node_modules/entities/dist/commonjs/generated/decode-data-html.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/generated/decode-data-xml.d.ts +2 -0
- package/test-e2e/node_modules/entities/dist/commonjs/generated/decode-data-xml.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +7 -0
- package/test-e2e/node_modules/entities/dist/commonjs/generated/decode-data-xml.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/generated/encode-html.d.ts +3 -0
- package/test-e2e/node_modules/entities/dist/commonjs/generated/encode-html.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/generated/encode-html.js +14 -0
- package/test-e2e/node_modules/entities/dist/commonjs/generated/encode-html.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/index.d.ts +96 -0
- package/test-e2e/node_modules/entities/dist/commonjs/index.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/index.js +131 -0
- package/test-e2e/node_modules/entities/dist/commonjs/index.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/internal/bin-trie-flags.d.ts +17 -0
- package/test-e2e/node_modules/entities/dist/commonjs/internal/bin-trie-flags.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js +21 -0
- package/test-e2e/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/internal/decode-shared.d.ts +2 -0
- package/test-e2e/node_modules/entities/dist/commonjs/internal/decode-shared.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/internal/decode-shared.js +31 -0
- package/test-e2e/node_modules/entities/dist/commonjs/internal/decode-shared.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/internal/encode-shared.d.ts +32 -0
- package/test-e2e/node_modules/entities/dist/commonjs/internal/encode-shared.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/internal/encode-shared.js +94 -0
- package/test-e2e/node_modules/entities/dist/commonjs/internal/encode-shared.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/package.json +3 -0
- package/test-e2e/node_modules/entities/dist/esm/decode-codepoint.d.ts +19 -0
- package/test-e2e/node_modules/entities/dist/esm/decode-codepoint.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/decode-codepoint.js +72 -0
- package/test-e2e/node_modules/entities/dist/esm/decode-codepoint.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/decode.d.ts +205 -0
- package/test-e2e/node_modules/entities/dist/esm/decode.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/decode.js +554 -0
- package/test-e2e/node_modules/entities/dist/esm/decode.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/encode.d.ts +22 -0
- package/test-e2e/node_modules/entities/dist/esm/encode.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/encode.js +88 -0
- package/test-e2e/node_modules/entities/dist/esm/encode.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/escape.d.ts +46 -0
- package/test-e2e/node_modules/entities/dist/esm/escape.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/escape.js +134 -0
- package/test-e2e/node_modules/entities/dist/esm/escape.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/generated/decode-data-html.d.ts +2 -0
- package/test-e2e/node_modules/entities/dist/esm/generated/decode-data-html.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/generated/decode-data-html.js +4 -0
- package/test-e2e/node_modules/entities/dist/esm/generated/decode-data-html.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/generated/decode-data-xml.d.ts +2 -0
- package/test-e2e/node_modules/entities/dist/esm/generated/decode-data-xml.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/generated/decode-data-xml.js +4 -0
- package/test-e2e/node_modules/entities/dist/esm/generated/decode-data-xml.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/generated/encode-html.d.ts +3 -0
- package/test-e2e/node_modules/entities/dist/esm/generated/encode-html.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/generated/encode-html.js +11 -0
- package/test-e2e/node_modules/entities/dist/esm/generated/encode-html.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/index.d.ts +96 -0
- package/test-e2e/node_modules/entities/dist/esm/index.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/index.js +107 -0
- package/test-e2e/node_modules/entities/dist/esm/index.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/internal/bin-trie-flags.d.ts +17 -0
- package/test-e2e/node_modules/entities/dist/esm/internal/bin-trie-flags.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/internal/bin-trie-flags.js +18 -0
- package/test-e2e/node_modules/entities/dist/esm/internal/bin-trie-flags.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/internal/decode-shared.d.ts +2 -0
- package/test-e2e/node_modules/entities/dist/esm/internal/decode-shared.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/internal/decode-shared.js +28 -0
- package/test-e2e/node_modules/entities/dist/esm/internal/decode-shared.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/internal/encode-shared.d.ts +32 -0
- package/test-e2e/node_modules/entities/dist/esm/internal/encode-shared.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/internal/encode-shared.js +91 -0
- package/test-e2e/node_modules/entities/dist/esm/internal/encode-shared.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/package.json +3 -0
- package/test-e2e/node_modules/entities/escape.d.ts +3 -0
- package/test-e2e/node_modules/entities/escape.js +3 -0
- package/test-e2e/node_modules/entities/package.json +120 -0
- package/test-e2e/node_modules/entities/readme.md +143 -0
- package/test-e2e/node_modules/entities/src/decode-codepoint.ts +81 -0
- package/test-e2e/node_modules/entities/src/decode.ts +685 -0
- package/test-e2e/node_modules/entities/src/encode.ts +93 -0
- package/test-e2e/node_modules/entities/src/escape.ts +161 -0
- package/test-e2e/node_modules/entities/src/generated/.eslintrc.json +10 -0
- package/test-e2e/node_modules/entities/src/generated/decode-data-html.ts +6 -0
- package/test-e2e/node_modules/entities/src/generated/decode-data-xml.ts +6 -0
- package/test-e2e/node_modules/entities/src/generated/encode-html.ts +17 -0
- package/test-e2e/node_modules/entities/src/index.ts +187 -0
- package/test-e2e/node_modules/entities/src/internal/bin-trie-flags.ts +16 -0
- package/test-e2e/node_modules/entities/src/internal/decode-shared.ts +30 -0
- package/test-e2e/node_modules/entities/src/internal/encode-shared.ts +121 -0
- package/test-e2e/node_modules/estree-walker/CHANGELOG.md +92 -0
- package/test-e2e/node_modules/estree-walker/LICENSE +7 -0
- package/test-e2e/node_modules/estree-walker/README.md +48 -0
- package/test-e2e/node_modules/estree-walker/dist/esm/estree-walker.js +333 -0
- package/test-e2e/node_modules/estree-walker/dist/esm/package.json +1 -0
- package/test-e2e/node_modules/estree-walker/dist/umd/estree-walker.js +344 -0
- package/test-e2e/node_modules/estree-walker/package.json +37 -0
- package/test-e2e/node_modules/estree-walker/src/async.js +118 -0
- package/test-e2e/node_modules/estree-walker/src/index.js +35 -0
- package/test-e2e/node_modules/estree-walker/src/package.json +1 -0
- package/test-e2e/node_modules/estree-walker/src/sync.js +118 -0
- package/test-e2e/node_modules/estree-walker/src/walker.js +61 -0
- package/test-e2e/node_modules/estree-walker/types/async.d.ts +53 -0
- package/test-e2e/node_modules/estree-walker/types/index.d.ts +56 -0
- package/test-e2e/node_modules/estree-walker/types/sync.d.ts +53 -0
- package/test-e2e/node_modules/estree-walker/types/tsconfig.tsbuildinfo +345 -0
- package/test-e2e/node_modules/estree-walker/types/walker.d.ts +37 -0
- package/test-e2e/node_modules/fdir/LICENSE +7 -0
- package/test-e2e/node_modules/fdir/README.md +91 -0
- package/test-e2e/node_modules/fdir/dist/index.cjs +588 -0
- package/test-e2e/node_modules/fdir/dist/index.d.cts +155 -0
- package/test-e2e/node_modules/fdir/dist/index.d.mts +155 -0
- package/test-e2e/node_modules/fdir/dist/index.mjs +570 -0
- package/test-e2e/node_modules/fdir/package.json +103 -0
- package/test-e2e/node_modules/lightningcss/LICENSE +373 -0
- package/test-e2e/node_modules/lightningcss/README.md +105 -0
- package/test-e2e/node_modules/lightningcss/node/ast.d.ts +9892 -0
- package/test-e2e/node_modules/lightningcss/node/ast.js.flow +10539 -0
- package/test-e2e/node_modules/lightningcss/node/browserslistToTargets.js +48 -0
- package/test-e2e/node_modules/lightningcss/node/composeVisitors.js +450 -0
- package/test-e2e/node_modules/lightningcss/node/flags.js +28 -0
- package/test-e2e/node_modules/lightningcss/node/index.d.ts +494 -0
- package/test-e2e/node_modules/lightningcss/node/index.js +59 -0
- package/test-e2e/node_modules/lightningcss/node/index.js.flow +843 -0
- package/test-e2e/node_modules/lightningcss/node/index.mjs +4 -0
- package/test-e2e/node_modules/lightningcss/node/targets.d.ts +40 -0
- package/test-e2e/node_modules/lightningcss/node/targets.js.flow +39 -0
- package/test-e2e/node_modules/lightningcss/package.json +110 -0
- package/test-e2e/node_modules/lightningcss-darwin-arm64/LICENSE +373 -0
- package/test-e2e/node_modules/lightningcss-darwin-arm64/README.md +1 -0
- package/test-e2e/node_modules/lightningcss-darwin-arm64/lightningcss.darwin-arm64.node +0 -0
- package/test-e2e/node_modules/lightningcss-darwin-arm64/package.json +34 -0
- package/test-e2e/node_modules/magic-string/LICENSE +7 -0
- package/test-e2e/node_modules/magic-string/README.md +325 -0
- package/test-e2e/node_modules/magic-string/dist/magic-string.cjs.d.ts +289 -0
- package/test-e2e/node_modules/magic-string/dist/magic-string.cjs.js +1594 -0
- package/test-e2e/node_modules/magic-string/dist/magic-string.cjs.js.map +1 -0
- package/test-e2e/node_modules/magic-string/dist/magic-string.es.d.mts +289 -0
- package/test-e2e/node_modules/magic-string/dist/magic-string.es.mjs +1588 -0
- package/test-e2e/node_modules/magic-string/dist/magic-string.es.mjs.map +1 -0
- package/test-e2e/node_modules/magic-string/dist/magic-string.umd.js +1682 -0
- package/test-e2e/node_modules/magic-string/dist/magic-string.umd.js.map +1 -0
- package/test-e2e/node_modules/magic-string/package.json +67 -0
- package/test-e2e/node_modules/nanoid/LICENSE +20 -0
- package/test-e2e/node_modules/nanoid/README.md +39 -0
- package/test-e2e/node_modules/nanoid/async/index.browser.cjs +69 -0
- package/test-e2e/node_modules/nanoid/async/index.browser.js +34 -0
- package/test-e2e/node_modules/nanoid/async/index.cjs +71 -0
- package/test-e2e/node_modules/nanoid/async/index.d.ts +56 -0
- package/test-e2e/node_modules/nanoid/async/index.js +35 -0
- package/test-e2e/node_modules/nanoid/async/index.native.js +26 -0
- package/test-e2e/node_modules/nanoid/async/package.json +12 -0
- package/test-e2e/node_modules/nanoid/bin/nanoid.cjs +55 -0
- package/test-e2e/node_modules/nanoid/index.browser.cjs +72 -0
- package/test-e2e/node_modules/nanoid/index.browser.js +34 -0
- package/test-e2e/node_modules/nanoid/index.cjs +85 -0
- package/test-e2e/node_modules/nanoid/index.d.cts +91 -0
- package/test-e2e/node_modules/nanoid/index.d.ts +91 -0
- package/test-e2e/node_modules/nanoid/index.js +45 -0
- package/test-e2e/node_modules/nanoid/nanoid.js +1 -0
- package/test-e2e/node_modules/nanoid/non-secure/index.cjs +34 -0
- package/test-e2e/node_modules/nanoid/non-secure/index.d.ts +33 -0
- package/test-e2e/node_modules/nanoid/non-secure/index.js +21 -0
- package/test-e2e/node_modules/nanoid/non-secure/package.json +6 -0
- package/test-e2e/node_modules/nanoid/package.json +89 -0
- package/test-e2e/node_modules/nanoid/url-alphabet/index.cjs +7 -0
- package/test-e2e/node_modules/nanoid/url-alphabet/index.js +3 -0
- package/test-e2e/node_modules/nanoid/url-alphabet/package.json +6 -0
- package/test-e2e/node_modules/picocolors/LICENSE +15 -0
- package/test-e2e/node_modules/picocolors/README.md +21 -0
- package/test-e2e/node_modules/picocolors/package.json +25 -0
- package/test-e2e/node_modules/picocolors/picocolors.browser.js +4 -0
- package/test-e2e/node_modules/picocolors/picocolors.d.ts +5 -0
- package/test-e2e/node_modules/picocolors/picocolors.js +75 -0
- package/test-e2e/node_modules/picocolors/types.d.ts +51 -0
- package/test-e2e/node_modules/picomatch/LICENSE +21 -0
- package/test-e2e/node_modules/picomatch/README.md +749 -0
- package/test-e2e/node_modules/picomatch/index.js +17 -0
- package/test-e2e/node_modules/picomatch/lib/constants.js +184 -0
- package/test-e2e/node_modules/picomatch/lib/parse.js +1386 -0
- package/test-e2e/node_modules/picomatch/lib/picomatch.js +349 -0
- package/test-e2e/node_modules/picomatch/lib/scan.js +391 -0
- package/test-e2e/node_modules/picomatch/lib/utils.js +72 -0
- package/test-e2e/node_modules/picomatch/package.json +82 -0
- package/test-e2e/node_modules/picomatch/posix.js +3 -0
- package/test-e2e/node_modules/postcss/LICENSE +20 -0
- package/test-e2e/node_modules/postcss/README.md +28 -0
- package/test-e2e/node_modules/postcss/lib/at-rule.d.ts +139 -0
- package/test-e2e/node_modules/postcss/lib/at-rule.js +25 -0
- package/test-e2e/node_modules/postcss/lib/comment.d.ts +67 -0
- package/test-e2e/node_modules/postcss/lib/comment.js +13 -0
- package/test-e2e/node_modules/postcss/lib/container.d.ts +478 -0
- package/test-e2e/node_modules/postcss/lib/container.js +447 -0
- package/test-e2e/node_modules/postcss/lib/css-syntax-error.d.ts +247 -0
- package/test-e2e/node_modules/postcss/lib/css-syntax-error.js +133 -0
- package/test-e2e/node_modules/postcss/lib/declaration.d.ts +150 -0
- package/test-e2e/node_modules/postcss/lib/declaration.js +24 -0
- package/test-e2e/node_modules/postcss/lib/document.d.ts +68 -0
- package/test-e2e/node_modules/postcss/lib/document.js +33 -0
- package/test-e2e/node_modules/postcss/lib/fromJSON.d.ts +9 -0
- package/test-e2e/node_modules/postcss/lib/fromJSON.js +54 -0
- package/test-e2e/node_modules/postcss/lib/input.d.ts +226 -0
- package/test-e2e/node_modules/postcss/lib/input.js +273 -0
- package/test-e2e/node_modules/postcss/lib/lazy-result.d.ts +189 -0
- package/test-e2e/node_modules/postcss/lib/lazy-result.js +550 -0
- package/test-e2e/node_modules/postcss/lib/list.d.ts +60 -0
- package/test-e2e/node_modules/postcss/lib/list.js +58 -0
- package/test-e2e/node_modules/postcss/lib/map-generator.js +376 -0
- package/test-e2e/node_modules/postcss/lib/no-work-result.d.ts +45 -0
- package/test-e2e/node_modules/postcss/lib/no-work-result.js +137 -0
- package/test-e2e/node_modules/postcss/lib/node.d.ts +555 -0
- package/test-e2e/node_modules/postcss/lib/node.js +449 -0
- package/test-e2e/node_modules/postcss/lib/parse.d.ts +9 -0
- package/test-e2e/node_modules/postcss/lib/parse.js +42 -0
- package/test-e2e/node_modules/postcss/lib/parser.js +611 -0
- package/test-e2e/node_modules/postcss/lib/postcss.d.mts +66 -0
- package/test-e2e/node_modules/postcss/lib/postcss.d.ts +456 -0
- package/test-e2e/node_modules/postcss/lib/postcss.js +101 -0
- package/test-e2e/node_modules/postcss/lib/postcss.mjs +30 -0
- package/test-e2e/node_modules/postcss/lib/previous-map.d.ts +80 -0
- package/test-e2e/node_modules/postcss/lib/previous-map.js +145 -0
- package/test-e2e/node_modules/postcss/lib/processor.d.ts +114 -0
- package/test-e2e/node_modules/postcss/lib/processor.js +67 -0
- package/test-e2e/node_modules/postcss/lib/result.d.ts +204 -0
- package/test-e2e/node_modules/postcss/lib/result.js +42 -0
- package/test-e2e/node_modules/postcss/lib/root.d.ts +86 -0
- package/test-e2e/node_modules/postcss/lib/root.js +61 -0
- package/test-e2e/node_modules/postcss/lib/rule.d.ts +126 -0
- package/test-e2e/node_modules/postcss/lib/rule.js +27 -0
- package/test-e2e/node_modules/postcss/lib/stringifier.d.ts +45 -0
- package/test-e2e/node_modules/postcss/lib/stringifier.js +353 -0
- package/test-e2e/node_modules/postcss/lib/stringify.d.ts +9 -0
- package/test-e2e/node_modules/postcss/lib/stringify.js +11 -0
- package/test-e2e/node_modules/postcss/lib/symbols.js +5 -0
- package/test-e2e/node_modules/postcss/lib/terminal-highlight.js +70 -0
- package/test-e2e/node_modules/postcss/lib/tokenize.js +266 -0
- package/test-e2e/node_modules/postcss/lib/warn-once.js +13 -0
- package/test-e2e/node_modules/postcss/lib/warning.d.ts +146 -0
- package/test-e2e/node_modules/postcss/lib/warning.js +37 -0
- package/test-e2e/node_modules/postcss/package.json +88 -0
- package/test-e2e/node_modules/rolldown/LICENSE +25 -0
- package/test-e2e/node_modules/rolldown/README.md +11 -0
- package/test-e2e/node_modules/rolldown/bin/cli.mjs +2 -0
- package/test-e2e/node_modules/rolldown/dist/cli.d.mts +1 -0
- package/test-e2e/node_modules/rolldown/dist/cli.mjs +1191 -0
- package/test-e2e/node_modules/rolldown/dist/config.d.mts +14 -0
- package/test-e2e/node_modules/rolldown/dist/config.mjs +4 -0
- package/test-e2e/node_modules/rolldown/dist/experimental-index.d.mts +253 -0
- package/test-e2e/node_modules/rolldown/dist/experimental-index.mjs +320 -0
- package/test-e2e/node_modules/rolldown/dist/experimental-runtime-types.d.ts +98 -0
- package/test-e2e/node_modules/rolldown/dist/filter-index.d.mts +196 -0
- package/test-e2e/node_modules/rolldown/dist/filter-index.mjs +386 -0
- package/test-e2e/node_modules/rolldown/dist/get-log-filter.d.mts +3 -0
- package/test-e2e/node_modules/rolldown/dist/get-log-filter.mjs +68 -0
- package/test-e2e/node_modules/rolldown/dist/index.d.mts +4 -0
- package/test-e2e/node_modules/rolldown/dist/index.mjs +50 -0
- package/test-e2e/node_modules/rolldown/dist/parallel-plugin-worker.d.mts +1 -0
- package/test-e2e/node_modules/rolldown/dist/parallel-plugin-worker.mjs +28 -0
- package/test-e2e/node_modules/rolldown/dist/parallel-plugin.d.mts +13 -0
- package/test-e2e/node_modules/rolldown/dist/parallel-plugin.mjs +6 -0
- package/test-e2e/node_modules/rolldown/dist/parse-ast-index.d.mts +32 -0
- package/test-e2e/node_modules/rolldown/dist/parse-ast-index.mjs +60 -0
- package/test-e2e/node_modules/rolldown/dist/plugins-index.d.mts +33 -0
- package/test-e2e/node_modules/rolldown/dist/plugins-index.mjs +40 -0
- package/test-e2e/node_modules/rolldown/dist/shared/binding-DUEnSb0A.d.mts +1872 -0
- package/test-e2e/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs +582 -0
- package/test-e2e/node_modules/rolldown/dist/shared/bindingify-input-options-DYpBf1OG.mjs +2235 -0
- package/test-e2e/node_modules/rolldown/dist/shared/constructors-BaEBnHl3.mjs +68 -0
- package/test-e2e/node_modules/rolldown/dist/shared/constructors-DYemMpPL.d.mts +37 -0
- package/test-e2e/node_modules/rolldown/dist/shared/define-config-DJOr6Iwt.mjs +6 -0
- package/test-e2e/node_modules/rolldown/dist/shared/define-config-DhJZwTRw.d.mts +3795 -0
- package/test-e2e/node_modules/rolldown/dist/shared/error-w0u7biK-.mjs +85 -0
- package/test-e2e/node_modules/rolldown/dist/shared/get-log-filter-semyr3Lj.d.mts +35 -0
- package/test-e2e/node_modules/rolldown/dist/shared/load-config-pmbgQdFU.mjs +120 -0
- package/test-e2e/node_modules/rolldown/dist/shared/logging-C6h4g8dA.d.mts +50 -0
- package/test-e2e/node_modules/rolldown/dist/shared/logs-D80CXhvg.mjs +180 -0
- package/test-e2e/node_modules/rolldown/dist/shared/misc-DJYbNKZX.mjs +21 -0
- package/test-e2e/node_modules/rolldown/dist/shared/normalize-string-or-regex-CVvpepxa.mjs +66 -0
- package/test-e2e/node_modules/rolldown/dist/shared/parse-BywQARUG.mjs +74 -0
- package/test-e2e/node_modules/rolldown/dist/shared/prompt-BYQIwEjg.mjs +845 -0
- package/test-e2e/node_modules/rolldown/dist/shared/resolve-tsconfig-CNjJwuKB.mjs +113 -0
- package/test-e2e/node_modules/rolldown/dist/shared/rolldown-BLMDGLfI.mjs +40 -0
- package/test-e2e/node_modules/rolldown/dist/shared/rolldown-build-DtGk-m96.mjs +3321 -0
- package/test-e2e/node_modules/rolldown/dist/shared/transform-Kz3D2LbX.d.mts +149 -0
- package/test-e2e/node_modules/rolldown/dist/shared/watch-Cixa7HbR.mjs +374 -0
- package/test-e2e/node_modules/rolldown/dist/utils-index.d.mts +376 -0
- package/test-e2e/node_modules/rolldown/dist/utils-index.mjs +2414 -0
- package/test-e2e/node_modules/rolldown/node_modules/@rolldown/pluginutils/LICENSE +25 -0
- package/test-e2e/node_modules/rolldown/node_modules/@rolldown/pluginutils/README.md +83 -0
- package/test-e2e/node_modules/rolldown/node_modules/@rolldown/pluginutils/dist/filter/composable-filters.d.ts +90 -0
- package/test-e2e/node_modules/rolldown/node_modules/@rolldown/pluginutils/dist/filter/composable-filters.js +256 -0
- package/test-e2e/node_modules/rolldown/node_modules/@rolldown/pluginutils/dist/filter/filter-vite-plugins.d.ts +28 -0
- package/test-e2e/node_modules/rolldown/node_modules/@rolldown/pluginutils/dist/filter/filter-vite-plugins.js +75 -0
- package/test-e2e/node_modules/rolldown/node_modules/@rolldown/pluginutils/dist/filter/index.d.ts +3 -0
- package/test-e2e/node_modules/rolldown/node_modules/@rolldown/pluginutils/dist/filter/index.js +3 -0
- package/test-e2e/node_modules/rolldown/node_modules/@rolldown/pluginutils/dist/filter/simple-filters.d.ts +71 -0
- package/test-e2e/node_modules/rolldown/node_modules/@rolldown/pluginutils/dist/filter/simple-filters.js +70 -0
- package/test-e2e/node_modules/rolldown/node_modules/@rolldown/pluginutils/dist/index.d.ts +1 -0
- package/test-e2e/node_modules/rolldown/node_modules/@rolldown/pluginutils/dist/index.js +1 -0
- package/test-e2e/node_modules/rolldown/node_modules/@rolldown/pluginutils/dist/utils.d.ts +2 -0
- package/test-e2e/node_modules/rolldown/node_modules/@rolldown/pluginutils/dist/utils.js +17 -0
- package/test-e2e/node_modules/rolldown/node_modules/@rolldown/pluginutils/package.json +37 -0
- package/test-e2e/node_modules/rolldown/package.json +153 -0
- package/test-e2e/node_modules/source-map-js/LICENSE +28 -0
- package/test-e2e/node_modules/source-map-js/README.md +765 -0
- package/test-e2e/node_modules/source-map-js/lib/array-set.js +121 -0
- package/test-e2e/node_modules/source-map-js/lib/base64-vlq.js +140 -0
- package/test-e2e/node_modules/source-map-js/lib/base64.js +67 -0
- package/test-e2e/node_modules/source-map-js/lib/binary-search.js +111 -0
- package/test-e2e/node_modules/source-map-js/lib/mapping-list.js +79 -0
- package/test-e2e/node_modules/source-map-js/lib/quick-sort.js +132 -0
- package/test-e2e/node_modules/source-map-js/lib/source-map-consumer.d.ts +1 -0
- package/test-e2e/node_modules/source-map-js/lib/source-map-consumer.js +1188 -0
- package/test-e2e/node_modules/source-map-js/lib/source-map-generator.d.ts +1 -0
- package/test-e2e/node_modules/source-map-js/lib/source-map-generator.js +444 -0
- package/test-e2e/node_modules/source-map-js/lib/source-node.d.ts +1 -0
- package/test-e2e/node_modules/source-map-js/lib/source-node.js +413 -0
- package/test-e2e/node_modules/source-map-js/lib/util.js +594 -0
- package/test-e2e/node_modules/source-map-js/package.json +71 -0
- package/test-e2e/node_modules/source-map-js/source-map.d.ts +104 -0
- package/test-e2e/node_modules/source-map-js/source-map.js +8 -0
- package/test-e2e/node_modules/tinyglobby/LICENSE +21 -0
- package/test-e2e/node_modules/tinyglobby/README.md +25 -0
- package/test-e2e/node_modules/tinyglobby/dist/index.cjs +334 -0
- package/test-e2e/node_modules/tinyglobby/dist/index.d.cts +148 -0
- package/test-e2e/node_modules/tinyglobby/dist/index.d.mts +148 -0
- package/test-e2e/node_modules/tinyglobby/dist/index.mjs +306 -0
- package/test-e2e/node_modules/tinyglobby/package.json +73 -0
- package/test-e2e/node_modules/vite/LICENSE.md +2230 -0
- package/test-e2e/node_modules/vite/README.md +20 -0
- package/test-e2e/node_modules/vite/bin/openChrome.js +68 -0
- package/test-e2e/node_modules/vite/bin/vite.js +79 -0
- package/test-e2e/node_modules/vite/client.d.ts +282 -0
- package/test-e2e/node_modules/vite/dist/client/client.mjs +1235 -0
- package/test-e2e/node_modules/vite/dist/client/env.mjs +18 -0
- package/test-e2e/node_modules/vite/dist/node/chunks/build.js +2 -0
- package/test-e2e/node_modules/vite/dist/node/chunks/build2.js +5378 -0
- package/test-e2e/node_modules/vite/dist/node/chunks/chunk.js +37 -0
- package/test-e2e/node_modules/vite/dist/node/chunks/config.js +2 -0
- package/test-e2e/node_modules/vite/dist/node/chunks/dist.js +6719 -0
- package/test-e2e/node_modules/vite/dist/node/chunks/lib.js +371 -0
- package/test-e2e/node_modules/vite/dist/node/chunks/logger.js +322 -0
- package/test-e2e/node_modules/vite/dist/node/chunks/moduleRunnerTransport.d.ts +96 -0
- package/test-e2e/node_modules/vite/dist/node/chunks/node.js +34785 -0
- package/test-e2e/node_modules/vite/dist/node/chunks/optimizer.js +2 -0
- package/test-e2e/node_modules/vite/dist/node/chunks/postcss-import.js +467 -0
- package/test-e2e/node_modules/vite/dist/node/chunks/preview.js +2 -0
- package/test-e2e/node_modules/vite/dist/node/chunks/server.js +2 -0
- package/test-e2e/node_modules/vite/dist/node/cli.js +837 -0
- package/test-e2e/node_modules/vite/dist/node/index.d.ts +3867 -0
- package/test-e2e/node_modules/vite/dist/node/index.js +3 -0
- package/test-e2e/node_modules/vite/dist/node/internal.d.ts +2 -0
- package/test-e2e/node_modules/vite/dist/node/internal.js +2 -0
- package/test-e2e/node_modules/vite/dist/node/module-runner.d.ts +315 -0
- package/test-e2e/node_modules/vite/dist/node/module-runner.js +1262 -0
- package/test-e2e/node_modules/vite/misc/false.js +1 -0
- package/test-e2e/node_modules/vite/misc/true.js +1 -0
- package/test-e2e/node_modules/vite/package.json +192 -0
- package/test-e2e/node_modules/vite/types/customEvent.d.ts +79 -0
- package/test-e2e/node_modules/vite/types/hmrPayload.d.ts +80 -0
- package/test-e2e/node_modules/vite/types/hot.d.ts +39 -0
- package/test-e2e/node_modules/vite/types/import-meta.d.ts +5 -0
- package/test-e2e/node_modules/vite/types/importGlob.d.ts +89 -0
- package/test-e2e/node_modules/vite/types/importMeta.d.ts +30 -0
- package/test-e2e/node_modules/vite/types/internal/cssPreprocessorOptions.d.ts +44 -0
- package/test-e2e/node_modules/vite/types/internal/esbuildOptions.d.ts +28 -0
- package/test-e2e/node_modules/vite/types/internal/lightningcssOptions.d.ts +18 -0
- package/test-e2e/node_modules/vite/types/internal/rollupTypeCompat.d.ts +24 -0
- package/test-e2e/node_modules/vite/types/internal/terserOptions.d.ts +11 -0
- package/test-e2e/node_modules/vite/types/metadata.d.ts +47 -0
- package/test-e2e/node_modules/vue/LICENSE +21 -0
- package/test-e2e/node_modules/vue/README.md +58 -0
- package/test-e2e/node_modules/vue/compiler-sfc/index.browser.js +1 -0
- package/test-e2e/node_modules/vue/compiler-sfc/index.browser.mjs +1 -0
- package/test-e2e/node_modules/vue/compiler-sfc/index.d.mts +1 -0
- package/test-e2e/node_modules/vue/compiler-sfc/index.d.ts +1 -0
- package/test-e2e/node_modules/vue/compiler-sfc/index.js +3 -0
- package/test-e2e/node_modules/vue/compiler-sfc/index.mjs +3 -0
- package/test-e2e/node_modules/vue/compiler-sfc/package.json +4 -0
- package/test-e2e/node_modules/vue/compiler-sfc/register-ts.js +3 -0
- package/test-e2e/node_modules/vue/dist/vue.cjs.js +80 -0
- package/test-e2e/node_modules/vue/dist/vue.cjs.prod.js +66 -0
- package/test-e2e/node_modules/vue/dist/vue.d.mts +7 -0
- package/test-e2e/node_modules/vue/dist/vue.d.ts +7 -0
- package/test-e2e/node_modules/vue/dist/vue.esm-browser.js +18708 -0
- package/test-e2e/node_modules/vue/dist/vue.esm-browser.prod.js +13 -0
- package/test-e2e/node_modules/vue/dist/vue.esm-bundler.js +71 -0
- package/test-e2e/node_modules/vue/dist/vue.global.js +18588 -0
- package/test-e2e/node_modules/vue/dist/vue.global.prod.js +13 -0
- package/test-e2e/node_modules/vue/dist/vue.runtime.esm-browser.js +12817 -0
- package/test-e2e/node_modules/vue/dist/vue.runtime.esm-browser.prod.js +7 -0
- package/test-e2e/node_modules/vue/dist/vue.runtime.esm-bundler.js +26 -0
- package/test-e2e/node_modules/vue/dist/vue.runtime.global.js +12871 -0
- package/test-e2e/node_modules/vue/dist/vue.runtime.global.prod.js +7 -0
- package/test-e2e/node_modules/vue/index.js +7 -0
- package/test-e2e/node_modules/vue/index.mjs +1 -0
- package/test-e2e/node_modules/vue/jsx-runtime/index.d.ts +25 -0
- package/test-e2e/node_modules/vue/jsx-runtime/index.js +15 -0
- package/test-e2e/node_modules/vue/jsx-runtime/index.mjs +12 -0
- package/test-e2e/node_modules/vue/jsx-runtime/package.json +5 -0
- package/test-e2e/node_modules/vue/jsx.d.ts +22 -0
- package/test-e2e/node_modules/vue/package.json +112 -0
- package/test-e2e/node_modules/vue/server-renderer/index.d.mts +1 -0
- package/test-e2e/node_modules/vue/server-renderer/index.d.ts +1 -0
- package/test-e2e/node_modules/vue/server-renderer/index.js +1 -0
- package/test-e2e/node_modules/vue/server-renderer/index.mjs +1 -0
- package/test-e2e/node_modules/vue/server-renderer/package.json +4 -0
- package/test-e2e/package-lock.json +1164 -0
- package/test-e2e/package.json +17 -0
- package/test-e2e/vite.config.js +17 -0
- package/test-results/.last-run.json +4 -0
- package/vite.config.js +12 -2
- package/vitest.config.js +1 -1
- package/cypress/support/component-index.html +0 -11
- package/test/01-general.cy.js +0 -348
- /package/{test → test-e2e}/blue.vue +0 -0
- /package/{test → test-e2e}/dummy.vue +0 -0
- /package/{test → test-e2e}/gray.vue +0 -0
- /package/{test → test-e2e}/red.vue +0 -0
|
@@ -0,0 +1,3321 @@
|
|
|
1
|
+
import { n as __toESM, t as require_binding } from "./binding-s-V_wTpj.mjs";
|
|
2
|
+
import { i as logInputHookInOutputPlugin, n as error } from "./logs-D80CXhvg.mjs";
|
|
3
|
+
import { n as BuiltinPlugin } from "./normalize-string-or-regex-CVvpepxa.mjs";
|
|
4
|
+
import { c as __decorate, d as PlainObjectLike, f as MinimalPluginContextImpl, h as LOG_LEVEL_DEBUG, i as transformModuleInfo, l as transformAssetSource, m as normalizeLog, o as transformToRollupOutput, p as normalizeHook, s as transformRenderedChunk, t as bindingifyInputOptions, u as lazyProp, v as LOG_LEVEL_WARN, x as VERSION, y as logLevelPriority } from "./bindingify-input-options-DYpBf1OG.mjs";
|
|
5
|
+
import { i as unimplemented } from "./misc-DJYbNKZX.mjs";
|
|
6
|
+
import { i as unwrapBindingResult } from "./error-w0u7biK-.mjs";
|
|
7
|
+
import { Worker } from "node:worker_threads";
|
|
8
|
+
import path, { sep } from "node:path";
|
|
9
|
+
import { formatWithOptions, styleText } from "node:util";
|
|
10
|
+
import process$1 from "node:process";
|
|
11
|
+
import * as tty from "node:tty";
|
|
12
|
+
import os from "node:os";
|
|
13
|
+
//#region src/log/logger.ts
|
|
14
|
+
var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
15
|
+
function getLogger(plugins, onLog, logLevel, watchMode) {
|
|
16
|
+
const minimalPriority = logLevelPriority[logLevel];
|
|
17
|
+
const logger = (level, log, skipped = /* @__PURE__ */ new Set()) => {
|
|
18
|
+
if (logLevelPriority[level] < minimalPriority) return;
|
|
19
|
+
for (const plugin of getSortedPlugins("onLog", plugins)) {
|
|
20
|
+
if (skipped.has(plugin)) continue;
|
|
21
|
+
const { onLog: pluginOnLog } = plugin;
|
|
22
|
+
if (pluginOnLog) {
|
|
23
|
+
const getLogHandler = (level) => {
|
|
24
|
+
if (logLevelPriority[level] < minimalPriority) return () => {};
|
|
25
|
+
return (log) => logger(level, normalizeLog(log), new Set(skipped).add(plugin));
|
|
26
|
+
};
|
|
27
|
+
if (("handler" in pluginOnLog ? pluginOnLog.handler : pluginOnLog).call({
|
|
28
|
+
debug: getLogHandler("debug"),
|
|
29
|
+
error: (log) => error(normalizeLog(log)),
|
|
30
|
+
info: getLogHandler("info"),
|
|
31
|
+
meta: {
|
|
32
|
+
rollupVersion: "4.23.0",
|
|
33
|
+
rolldownVersion: VERSION,
|
|
34
|
+
watchMode
|
|
35
|
+
},
|
|
36
|
+
warn: getLogHandler("warn"),
|
|
37
|
+
pluginName: plugin.name || "unknown"
|
|
38
|
+
}, level, log) === false) return;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
onLog(level, log);
|
|
42
|
+
};
|
|
43
|
+
return logger;
|
|
44
|
+
}
|
|
45
|
+
const getOnLog = (config, logLevel, printLog = defaultPrintLog) => {
|
|
46
|
+
const { onwarn, onLog } = config;
|
|
47
|
+
const defaultOnLog = getDefaultOnLog(printLog, onwarn);
|
|
48
|
+
if (onLog) {
|
|
49
|
+
const minimalPriority = logLevelPriority[logLevel];
|
|
50
|
+
return (level, log) => onLog(level, addLogToString(log), (level, handledLog) => {
|
|
51
|
+
if (level === "error") return error(normalizeLog(handledLog));
|
|
52
|
+
if (logLevelPriority[level] >= minimalPriority) defaultOnLog(level, normalizeLog(handledLog));
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
return defaultOnLog;
|
|
56
|
+
};
|
|
57
|
+
const getDefaultOnLog = (printLog, onwarn) => onwarn ? (level, log) => {
|
|
58
|
+
if (level === "warn") onwarn(addLogToString(log), (warning) => printLog(LOG_LEVEL_WARN, normalizeLog(warning)));
|
|
59
|
+
else printLog(level, log);
|
|
60
|
+
} : printLog;
|
|
61
|
+
const addLogToString = (log) => {
|
|
62
|
+
Object.defineProperty(log, "toString", {
|
|
63
|
+
value: () => getExtendedLogMessage(log),
|
|
64
|
+
writable: true
|
|
65
|
+
});
|
|
66
|
+
return log;
|
|
67
|
+
};
|
|
68
|
+
const defaultPrintLog = (level, log) => {
|
|
69
|
+
const message = getExtendedLogMessage(log);
|
|
70
|
+
switch (level) {
|
|
71
|
+
case LOG_LEVEL_WARN: return console.warn(message);
|
|
72
|
+
case LOG_LEVEL_DEBUG: return console.debug(message);
|
|
73
|
+
default: return console.info(message);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
const getExtendedLogMessage = (log) => {
|
|
77
|
+
let prefix = "";
|
|
78
|
+
if (log.plugin) prefix += `(${log.plugin} plugin) `;
|
|
79
|
+
if (log.loc) prefix += `${relativeId(log.loc.file)} (${log.loc.line}:${log.loc.column}) `;
|
|
80
|
+
return prefix + log.message;
|
|
81
|
+
};
|
|
82
|
+
function relativeId(id) {
|
|
83
|
+
if (!path.isAbsolute(id)) return id;
|
|
84
|
+
return path.relative(path.resolve(), id);
|
|
85
|
+
}
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region src/constants/plugin.ts
|
|
88
|
+
const ENUMERATED_INPUT_PLUGIN_HOOK_NAMES = [
|
|
89
|
+
"options",
|
|
90
|
+
"buildStart",
|
|
91
|
+
"resolveId",
|
|
92
|
+
"load",
|
|
93
|
+
"transform",
|
|
94
|
+
"moduleParsed",
|
|
95
|
+
"buildEnd",
|
|
96
|
+
"onLog",
|
|
97
|
+
"resolveDynamicImport",
|
|
98
|
+
"closeBundle",
|
|
99
|
+
"closeWatcher",
|
|
100
|
+
"watchChange"
|
|
101
|
+
];
|
|
102
|
+
const ENUMERATED_OUTPUT_PLUGIN_HOOK_NAMES = [
|
|
103
|
+
"augmentChunkHash",
|
|
104
|
+
"outputOptions",
|
|
105
|
+
"renderChunk",
|
|
106
|
+
"renderStart",
|
|
107
|
+
"renderError",
|
|
108
|
+
"writeBundle",
|
|
109
|
+
"generateBundle"
|
|
110
|
+
];
|
|
111
|
+
const ENUMERATED_PLUGIN_HOOK_NAMES = [
|
|
112
|
+
...ENUMERATED_INPUT_PLUGIN_HOOK_NAMES,
|
|
113
|
+
...ENUMERATED_OUTPUT_PLUGIN_HOOK_NAMES,
|
|
114
|
+
"footer",
|
|
115
|
+
"banner",
|
|
116
|
+
"intro",
|
|
117
|
+
"outro"
|
|
118
|
+
];
|
|
119
|
+
ENUMERATED_PLUGIN_HOOK_NAMES[0], ENUMERATED_PLUGIN_HOOK_NAMES[0], ENUMERATED_PLUGIN_HOOK_NAMES[1], ENUMERATED_PLUGIN_HOOK_NAMES[1], ENUMERATED_PLUGIN_HOOK_NAMES[2], ENUMERATED_PLUGIN_HOOK_NAMES[2], ENUMERATED_PLUGIN_HOOK_NAMES[3], ENUMERATED_PLUGIN_HOOK_NAMES[3], ENUMERATED_PLUGIN_HOOK_NAMES[4], ENUMERATED_PLUGIN_HOOK_NAMES[4], ENUMERATED_PLUGIN_HOOK_NAMES[5], ENUMERATED_PLUGIN_HOOK_NAMES[5], ENUMERATED_PLUGIN_HOOK_NAMES[6], ENUMERATED_PLUGIN_HOOK_NAMES[6], ENUMERATED_PLUGIN_HOOK_NAMES[7], ENUMERATED_PLUGIN_HOOK_NAMES[7], ENUMERATED_PLUGIN_HOOK_NAMES[8], ENUMERATED_PLUGIN_HOOK_NAMES[8], ENUMERATED_PLUGIN_HOOK_NAMES[9], ENUMERATED_PLUGIN_HOOK_NAMES[9], ENUMERATED_PLUGIN_HOOK_NAMES[10], ENUMERATED_PLUGIN_HOOK_NAMES[10], ENUMERATED_PLUGIN_HOOK_NAMES[11], ENUMERATED_PLUGIN_HOOK_NAMES[11], ENUMERATED_PLUGIN_HOOK_NAMES[12], ENUMERATED_PLUGIN_HOOK_NAMES[12], ENUMERATED_PLUGIN_HOOK_NAMES[13], ENUMERATED_PLUGIN_HOOK_NAMES[13], ENUMERATED_PLUGIN_HOOK_NAMES[14], ENUMERATED_PLUGIN_HOOK_NAMES[14], ENUMERATED_PLUGIN_HOOK_NAMES[15], ENUMERATED_PLUGIN_HOOK_NAMES[15], ENUMERATED_PLUGIN_HOOK_NAMES[16], ENUMERATED_PLUGIN_HOOK_NAMES[16], ENUMERATED_PLUGIN_HOOK_NAMES[17], ENUMERATED_PLUGIN_HOOK_NAMES[17], ENUMERATED_PLUGIN_HOOK_NAMES[18], ENUMERATED_PLUGIN_HOOK_NAMES[18], ENUMERATED_PLUGIN_HOOK_NAMES[19], ENUMERATED_PLUGIN_HOOK_NAMES[19], ENUMERATED_PLUGIN_HOOK_NAMES[20], ENUMERATED_PLUGIN_HOOK_NAMES[20], ENUMERATED_PLUGIN_HOOK_NAMES[21], ENUMERATED_PLUGIN_HOOK_NAMES[21], ENUMERATED_PLUGIN_HOOK_NAMES[22], ENUMERATED_PLUGIN_HOOK_NAMES[22];
|
|
120
|
+
//#endregion
|
|
121
|
+
//#region src/utils/async-flatten.ts
|
|
122
|
+
async function asyncFlatten(array) {
|
|
123
|
+
do
|
|
124
|
+
array = (await Promise.all(array)).flat(Infinity);
|
|
125
|
+
while (array.some((v) => v?.then));
|
|
126
|
+
return array;
|
|
127
|
+
}
|
|
128
|
+
//#endregion
|
|
129
|
+
//#region src/utils/normalize-plugin-option.ts
|
|
130
|
+
const normalizePluginOption = async (plugins) => (await asyncFlatten([plugins])).filter(Boolean);
|
|
131
|
+
function checkOutputPluginOption(plugins, onLog) {
|
|
132
|
+
for (const plugin of plugins) for (const hook of ENUMERATED_INPUT_PLUGIN_HOOK_NAMES) if (hook in plugin) {
|
|
133
|
+
delete plugin[hook];
|
|
134
|
+
onLog(LOG_LEVEL_WARN, logInputHookInOutputPlugin(plugin.name, hook));
|
|
135
|
+
}
|
|
136
|
+
return plugins;
|
|
137
|
+
}
|
|
138
|
+
function normalizePlugins(plugins, anonymousPrefix) {
|
|
139
|
+
for (const [index, plugin] of plugins.entries()) {
|
|
140
|
+
if ("_parallel" in plugin) continue;
|
|
141
|
+
if (plugin instanceof BuiltinPlugin) continue;
|
|
142
|
+
if (!plugin.name) plugin.name = `${anonymousPrefix}${index + 1}`;
|
|
143
|
+
}
|
|
144
|
+
return plugins;
|
|
145
|
+
}
|
|
146
|
+
const ANONYMOUS_PLUGIN_PREFIX = "at position ";
|
|
147
|
+
const ANONYMOUS_OUTPUT_PLUGIN_PREFIX = "at output position ";
|
|
148
|
+
//#endregion
|
|
149
|
+
//#region src/plugin/plugin-driver.ts
|
|
150
|
+
var PluginDriver = class {
|
|
151
|
+
static async callOptionsHook(inputOptions, watchMode = false) {
|
|
152
|
+
const logLevel = inputOptions.logLevel || "info";
|
|
153
|
+
const plugins = getSortedPlugins("options", getObjectPlugins(await normalizePluginOption(inputOptions.plugins)));
|
|
154
|
+
const logger = getLogger(plugins, getOnLog(inputOptions, logLevel), logLevel, watchMode);
|
|
155
|
+
for (const plugin of plugins) {
|
|
156
|
+
const name = plugin.name || "unknown";
|
|
157
|
+
const options = plugin.options;
|
|
158
|
+
if (options) {
|
|
159
|
+
const { handler } = normalizeHook(options);
|
|
160
|
+
const result = await handler.call(new MinimalPluginContextImpl(logger, logLevel, name, watchMode, "onLog"), inputOptions);
|
|
161
|
+
if (result) inputOptions = result;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
return inputOptions;
|
|
165
|
+
}
|
|
166
|
+
static callOutputOptionsHook(rawPlugins, outputOptions, onLog, logLevel, watchMode) {
|
|
167
|
+
const sortedPlugins = getSortedPlugins("outputOptions", getObjectPlugins(rawPlugins));
|
|
168
|
+
for (const plugin of sortedPlugins) {
|
|
169
|
+
const name = plugin.name || "unknown";
|
|
170
|
+
const options = plugin.outputOptions;
|
|
171
|
+
if (options) {
|
|
172
|
+
const { handler } = normalizeHook(options);
|
|
173
|
+
const result = handler.call(new MinimalPluginContextImpl(onLog, logLevel, name, watchMode), outputOptions);
|
|
174
|
+
if (result) outputOptions = result;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
return outputOptions;
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
function getObjectPlugins(plugins) {
|
|
181
|
+
return plugins.filter((plugin) => {
|
|
182
|
+
if (!plugin) return;
|
|
183
|
+
if ("_parallel" in plugin) return;
|
|
184
|
+
if (plugin instanceof BuiltinPlugin) return;
|
|
185
|
+
return plugin;
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
function getSortedPlugins(hookName, plugins) {
|
|
189
|
+
const pre = [];
|
|
190
|
+
const normal = [];
|
|
191
|
+
const post = [];
|
|
192
|
+
for (const plugin of plugins) {
|
|
193
|
+
const hook = plugin[hookName];
|
|
194
|
+
if (hook) {
|
|
195
|
+
if (typeof hook === "object") {
|
|
196
|
+
if (hook.order === "pre") {
|
|
197
|
+
pre.push(plugin);
|
|
198
|
+
continue;
|
|
199
|
+
}
|
|
200
|
+
if (hook.order === "post") {
|
|
201
|
+
post.push(plugin);
|
|
202
|
+
continue;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
normal.push(plugin);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
return [
|
|
209
|
+
...pre,
|
|
210
|
+
...normal,
|
|
211
|
+
...post
|
|
212
|
+
];
|
|
213
|
+
}
|
|
214
|
+
//#endregion
|
|
215
|
+
//#region ../../node_modules/.pnpm/valibot@1.3.1_typescript@6.0.2/node_modules/valibot/dist/index.mjs
|
|
216
|
+
let store$4;
|
|
217
|
+
/**
|
|
218
|
+
* Returns the global configuration.
|
|
219
|
+
*
|
|
220
|
+
* @param config The config to merge.
|
|
221
|
+
*
|
|
222
|
+
* @returns The configuration.
|
|
223
|
+
*/
|
|
224
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
225
|
+
function getGlobalConfig(config$1) {
|
|
226
|
+
return {
|
|
227
|
+
lang: config$1?.lang ?? store$4?.lang,
|
|
228
|
+
message: config$1?.message,
|
|
229
|
+
abortEarly: config$1?.abortEarly ?? store$4?.abortEarly,
|
|
230
|
+
abortPipeEarly: config$1?.abortPipeEarly ?? store$4?.abortPipeEarly
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
let store$3;
|
|
234
|
+
/**
|
|
235
|
+
* Returns a global error message.
|
|
236
|
+
*
|
|
237
|
+
* @param lang The language of the message.
|
|
238
|
+
*
|
|
239
|
+
* @returns The error message.
|
|
240
|
+
*/
|
|
241
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
242
|
+
function getGlobalMessage(lang) {
|
|
243
|
+
return store$3?.get(lang);
|
|
244
|
+
}
|
|
245
|
+
let store$2;
|
|
246
|
+
/**
|
|
247
|
+
* Returns a schema error message.
|
|
248
|
+
*
|
|
249
|
+
* @param lang The language of the message.
|
|
250
|
+
*
|
|
251
|
+
* @returns The error message.
|
|
252
|
+
*/
|
|
253
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
254
|
+
function getSchemaMessage(lang) {
|
|
255
|
+
return store$2?.get(lang);
|
|
256
|
+
}
|
|
257
|
+
let store$1;
|
|
258
|
+
/**
|
|
259
|
+
* Returns a specific error message.
|
|
260
|
+
*
|
|
261
|
+
* @param reference The identifier reference.
|
|
262
|
+
* @param lang The language of the message.
|
|
263
|
+
*
|
|
264
|
+
* @returns The error message.
|
|
265
|
+
*/
|
|
266
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
267
|
+
function getSpecificMessage(reference, lang) {
|
|
268
|
+
return store$1?.get(reference)?.get(lang);
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Stringifies an unknown input to a literal or type string.
|
|
272
|
+
*
|
|
273
|
+
* @param input The unknown input.
|
|
274
|
+
*
|
|
275
|
+
* @returns A literal or type string.
|
|
276
|
+
*
|
|
277
|
+
* @internal
|
|
278
|
+
*/
|
|
279
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
280
|
+
function _stringify(input) {
|
|
281
|
+
const type = typeof input;
|
|
282
|
+
if (type === "string") return `"${input}"`;
|
|
283
|
+
if (type === "number" || type === "bigint" || type === "boolean") return `${input}`;
|
|
284
|
+
if (type === "object" || type === "function") return (input && Object.getPrototypeOf(input)?.constructor?.name) ?? "null";
|
|
285
|
+
return type;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Adds an issue to the dataset.
|
|
289
|
+
*
|
|
290
|
+
* @param context The issue context.
|
|
291
|
+
* @param label The issue label.
|
|
292
|
+
* @param dataset The input dataset.
|
|
293
|
+
* @param config The configuration.
|
|
294
|
+
* @param other The optional props.
|
|
295
|
+
*
|
|
296
|
+
* @internal
|
|
297
|
+
*/
|
|
298
|
+
function _addIssue(context, label, dataset, config$1, other) {
|
|
299
|
+
const input = other && "input" in other ? other.input : dataset.value;
|
|
300
|
+
const expected = other?.expected ?? context.expects ?? null;
|
|
301
|
+
const received = other?.received ?? /* @__PURE__ */ _stringify(input);
|
|
302
|
+
const issue = {
|
|
303
|
+
kind: context.kind,
|
|
304
|
+
type: context.type,
|
|
305
|
+
input,
|
|
306
|
+
expected,
|
|
307
|
+
received,
|
|
308
|
+
message: `Invalid ${label}: ${expected ? `Expected ${expected} but r` : "R"}eceived ${received}`,
|
|
309
|
+
requirement: context.requirement,
|
|
310
|
+
path: other?.path,
|
|
311
|
+
issues: other?.issues,
|
|
312
|
+
lang: config$1.lang,
|
|
313
|
+
abortEarly: config$1.abortEarly,
|
|
314
|
+
abortPipeEarly: config$1.abortPipeEarly
|
|
315
|
+
};
|
|
316
|
+
const isSchema = context.kind === "schema";
|
|
317
|
+
const message$1 = other?.message ?? context.message ?? /* @__PURE__ */ getSpecificMessage(context.reference, issue.lang) ?? (isSchema ? /* @__PURE__ */ getSchemaMessage(issue.lang) : null) ?? config$1.message ?? /* @__PURE__ */ getGlobalMessage(issue.lang);
|
|
318
|
+
if (message$1 !== void 0) issue.message = typeof message$1 === "function" ? message$1(issue) : message$1;
|
|
319
|
+
if (isSchema) dataset.typed = false;
|
|
320
|
+
if (dataset.issues) dataset.issues.push(issue);
|
|
321
|
+
else dataset.issues = [issue];
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Returns the Standard Schema properties.
|
|
325
|
+
*
|
|
326
|
+
* @param context The schema context.
|
|
327
|
+
*
|
|
328
|
+
* @returns The Standard Schema properties.
|
|
329
|
+
*/
|
|
330
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
331
|
+
function _getStandardProps(context) {
|
|
332
|
+
return {
|
|
333
|
+
version: 1,
|
|
334
|
+
vendor: "valibot",
|
|
335
|
+
validate(value$1) {
|
|
336
|
+
return context["~run"]({ value: value$1 }, /* @__PURE__ */ getGlobalConfig());
|
|
337
|
+
}
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Disallows inherited object properties and prevents object prototype
|
|
342
|
+
* pollution by disallowing certain keys.
|
|
343
|
+
*
|
|
344
|
+
* @param object The object to check.
|
|
345
|
+
* @param key The key to check.
|
|
346
|
+
*
|
|
347
|
+
* @returns Whether the key is allowed.
|
|
348
|
+
*
|
|
349
|
+
* @internal
|
|
350
|
+
*/
|
|
351
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
352
|
+
function _isValidObjectKey(object$1, key) {
|
|
353
|
+
return Object.hasOwn(object$1, key) && key !== "__proto__" && key !== "prototype" && key !== "constructor";
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Joins multiple `expects` values with the given separator.
|
|
357
|
+
*
|
|
358
|
+
* @param values The `expects` values.
|
|
359
|
+
* @param separator The separator.
|
|
360
|
+
*
|
|
361
|
+
* @returns The joined `expects` property.
|
|
362
|
+
*
|
|
363
|
+
* @internal
|
|
364
|
+
*/
|
|
365
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
366
|
+
function _joinExpects(values$1, separator) {
|
|
367
|
+
const list = [...new Set(values$1)];
|
|
368
|
+
if (list.length > 1) return `(${list.join(` ${separator} `)})`;
|
|
369
|
+
return list[0] ?? "never";
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* A Valibot error with useful information.
|
|
373
|
+
*/
|
|
374
|
+
var ValiError = class extends Error {
|
|
375
|
+
/**
|
|
376
|
+
* Creates a Valibot error with useful information.
|
|
377
|
+
*
|
|
378
|
+
* @param issues The error issues.
|
|
379
|
+
*/
|
|
380
|
+
constructor(issues) {
|
|
381
|
+
super(issues[0].message);
|
|
382
|
+
this.name = "ValiError";
|
|
383
|
+
this.issues = issues;
|
|
384
|
+
}
|
|
385
|
+
};
|
|
386
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
387
|
+
function args(schema) {
|
|
388
|
+
return {
|
|
389
|
+
kind: "transformation",
|
|
390
|
+
type: "args",
|
|
391
|
+
reference: args,
|
|
392
|
+
async: false,
|
|
393
|
+
schema,
|
|
394
|
+
"~run"(dataset, config$1) {
|
|
395
|
+
const func = dataset.value;
|
|
396
|
+
dataset.value = (...args_) => {
|
|
397
|
+
const argsDataset = this.schema["~run"]({ value: args_ }, config$1);
|
|
398
|
+
if (argsDataset.issues) throw new ValiError(argsDataset.issues);
|
|
399
|
+
return func(...argsDataset.value);
|
|
400
|
+
};
|
|
401
|
+
return dataset;
|
|
402
|
+
}
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* Creates an await transformation action.
|
|
407
|
+
*
|
|
408
|
+
* @returns An await action.
|
|
409
|
+
*/
|
|
410
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
411
|
+
function awaitAsync() {
|
|
412
|
+
return {
|
|
413
|
+
kind: "transformation",
|
|
414
|
+
type: "await",
|
|
415
|
+
reference: awaitAsync,
|
|
416
|
+
async: true,
|
|
417
|
+
async "~run"(dataset) {
|
|
418
|
+
dataset.value = await dataset.value;
|
|
419
|
+
return dataset;
|
|
420
|
+
}
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* Creates a description metadata action.
|
|
425
|
+
*
|
|
426
|
+
* @param description_ The description text.
|
|
427
|
+
*
|
|
428
|
+
* @returns A description action.
|
|
429
|
+
*/
|
|
430
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
431
|
+
function description(description_) {
|
|
432
|
+
return {
|
|
433
|
+
kind: "metadata",
|
|
434
|
+
type: "description",
|
|
435
|
+
reference: description,
|
|
436
|
+
description: description_
|
|
437
|
+
};
|
|
438
|
+
}
|
|
439
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
440
|
+
function returns(schema) {
|
|
441
|
+
return {
|
|
442
|
+
kind: "transformation",
|
|
443
|
+
type: "returns",
|
|
444
|
+
reference: returns,
|
|
445
|
+
async: false,
|
|
446
|
+
schema,
|
|
447
|
+
"~run"(dataset, config$1) {
|
|
448
|
+
const func = dataset.value;
|
|
449
|
+
dataset.value = (...args_) => {
|
|
450
|
+
const returnsDataset = this.schema["~run"]({ value: func(...args_) }, config$1);
|
|
451
|
+
if (returnsDataset.issues) throw new ValiError(returnsDataset.issues);
|
|
452
|
+
return returnsDataset.value;
|
|
453
|
+
};
|
|
454
|
+
return dataset;
|
|
455
|
+
}
|
|
456
|
+
};
|
|
457
|
+
}
|
|
458
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
459
|
+
function returnsAsync(schema) {
|
|
460
|
+
return {
|
|
461
|
+
kind: "transformation",
|
|
462
|
+
type: "returns",
|
|
463
|
+
reference: returnsAsync,
|
|
464
|
+
async: false,
|
|
465
|
+
schema,
|
|
466
|
+
"~run"(dataset, config$1) {
|
|
467
|
+
const func = dataset.value;
|
|
468
|
+
dataset.value = async (...args_) => {
|
|
469
|
+
const returnsDataset = await this.schema["~run"]({ value: await func(...args_) }, config$1);
|
|
470
|
+
if (returnsDataset.issues) throw new ValiError(returnsDataset.issues);
|
|
471
|
+
return returnsDataset.value;
|
|
472
|
+
};
|
|
473
|
+
return dataset;
|
|
474
|
+
}
|
|
475
|
+
};
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* Returns the fallback value of the schema.
|
|
479
|
+
*
|
|
480
|
+
* @param schema The schema to get it from.
|
|
481
|
+
* @param dataset The output dataset if available.
|
|
482
|
+
* @param config The config if available.
|
|
483
|
+
*
|
|
484
|
+
* @returns The fallback value.
|
|
485
|
+
*/
|
|
486
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
487
|
+
function getFallback(schema, dataset, config$1) {
|
|
488
|
+
return typeof schema.fallback === "function" ? schema.fallback(dataset, config$1) : schema.fallback;
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
* Returns the default value of the schema.
|
|
492
|
+
*
|
|
493
|
+
* @param schema The schema to get it from.
|
|
494
|
+
* @param dataset The input dataset if available.
|
|
495
|
+
* @param config The config if available.
|
|
496
|
+
*
|
|
497
|
+
* @returns The default value.
|
|
498
|
+
*/
|
|
499
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
500
|
+
function getDefault(schema, dataset, config$1) {
|
|
501
|
+
return typeof schema.default === "function" ? schema.default(dataset, config$1) : schema.default;
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* Checks if the input matches the schema. By using a type predicate, this
|
|
505
|
+
* function can be used as a type guard.
|
|
506
|
+
*
|
|
507
|
+
* @param schema The schema to be used.
|
|
508
|
+
* @param input The input to be tested.
|
|
509
|
+
*
|
|
510
|
+
* @returns Whether the input matches the schema.
|
|
511
|
+
*/
|
|
512
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
513
|
+
function is(schema, input) {
|
|
514
|
+
return !schema["~run"]({ value: input }, { abortEarly: true }).issues;
|
|
515
|
+
}
|
|
516
|
+
/**
|
|
517
|
+
* Creates an any schema.
|
|
518
|
+
*
|
|
519
|
+
* Hint: This schema function exists only for completeness and is not
|
|
520
|
+
* recommended in practice. Instead, `unknown` should be used to accept
|
|
521
|
+
* unknown data.
|
|
522
|
+
*
|
|
523
|
+
* @returns An any schema.
|
|
524
|
+
*/
|
|
525
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
526
|
+
function any() {
|
|
527
|
+
return {
|
|
528
|
+
kind: "schema",
|
|
529
|
+
type: "any",
|
|
530
|
+
reference: any,
|
|
531
|
+
expects: "any",
|
|
532
|
+
async: false,
|
|
533
|
+
get "~standard"() {
|
|
534
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
535
|
+
},
|
|
536
|
+
"~run"(dataset) {
|
|
537
|
+
dataset.typed = true;
|
|
538
|
+
return dataset;
|
|
539
|
+
}
|
|
540
|
+
};
|
|
541
|
+
}
|
|
542
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
543
|
+
function array(item, message$1) {
|
|
544
|
+
return {
|
|
545
|
+
kind: "schema",
|
|
546
|
+
type: "array",
|
|
547
|
+
reference: array,
|
|
548
|
+
expects: "Array",
|
|
549
|
+
async: false,
|
|
550
|
+
item,
|
|
551
|
+
message: message$1,
|
|
552
|
+
get "~standard"() {
|
|
553
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
554
|
+
},
|
|
555
|
+
"~run"(dataset, config$1) {
|
|
556
|
+
const input = dataset.value;
|
|
557
|
+
if (Array.isArray(input)) {
|
|
558
|
+
dataset.typed = true;
|
|
559
|
+
dataset.value = [];
|
|
560
|
+
for (let key = 0; key < input.length; key++) {
|
|
561
|
+
const value$1 = input[key];
|
|
562
|
+
const itemDataset = this.item["~run"]({ value: value$1 }, config$1);
|
|
563
|
+
if (itemDataset.issues) {
|
|
564
|
+
const pathItem = {
|
|
565
|
+
type: "array",
|
|
566
|
+
origin: "value",
|
|
567
|
+
input,
|
|
568
|
+
key,
|
|
569
|
+
value: value$1
|
|
570
|
+
};
|
|
571
|
+
for (const issue of itemDataset.issues) {
|
|
572
|
+
if (issue.path) issue.path.unshift(pathItem);
|
|
573
|
+
else issue.path = [pathItem];
|
|
574
|
+
dataset.issues?.push(issue);
|
|
575
|
+
}
|
|
576
|
+
if (!dataset.issues) dataset.issues = itemDataset.issues;
|
|
577
|
+
if (config$1.abortEarly) {
|
|
578
|
+
dataset.typed = false;
|
|
579
|
+
break;
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
if (!itemDataset.typed) dataset.typed = false;
|
|
583
|
+
dataset.value.push(itemDataset.value);
|
|
584
|
+
}
|
|
585
|
+
} else _addIssue(this, "type", dataset, config$1);
|
|
586
|
+
return dataset;
|
|
587
|
+
}
|
|
588
|
+
};
|
|
589
|
+
}
|
|
590
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
591
|
+
function boolean(message$1) {
|
|
592
|
+
return {
|
|
593
|
+
kind: "schema",
|
|
594
|
+
type: "boolean",
|
|
595
|
+
reference: boolean,
|
|
596
|
+
expects: "boolean",
|
|
597
|
+
async: false,
|
|
598
|
+
message: message$1,
|
|
599
|
+
get "~standard"() {
|
|
600
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
601
|
+
},
|
|
602
|
+
"~run"(dataset, config$1) {
|
|
603
|
+
if (typeof dataset.value === "boolean") dataset.typed = true;
|
|
604
|
+
else _addIssue(this, "type", dataset, config$1);
|
|
605
|
+
return dataset;
|
|
606
|
+
}
|
|
607
|
+
};
|
|
608
|
+
}
|
|
609
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
610
|
+
function custom(check$1, message$1) {
|
|
611
|
+
return {
|
|
612
|
+
kind: "schema",
|
|
613
|
+
type: "custom",
|
|
614
|
+
reference: custom,
|
|
615
|
+
expects: "unknown",
|
|
616
|
+
async: false,
|
|
617
|
+
check: check$1,
|
|
618
|
+
message: message$1,
|
|
619
|
+
get "~standard"() {
|
|
620
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
621
|
+
},
|
|
622
|
+
"~run"(dataset, config$1) {
|
|
623
|
+
if (this.check(dataset.value)) dataset.typed = true;
|
|
624
|
+
else _addIssue(this, "type", dataset, config$1);
|
|
625
|
+
return dataset;
|
|
626
|
+
}
|
|
627
|
+
};
|
|
628
|
+
}
|
|
629
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
630
|
+
function function_(message$1) {
|
|
631
|
+
return {
|
|
632
|
+
kind: "schema",
|
|
633
|
+
type: "function",
|
|
634
|
+
reference: function_,
|
|
635
|
+
expects: "Function",
|
|
636
|
+
async: false,
|
|
637
|
+
message: message$1,
|
|
638
|
+
get "~standard"() {
|
|
639
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
640
|
+
},
|
|
641
|
+
"~run"(dataset, config$1) {
|
|
642
|
+
if (typeof dataset.value === "function") dataset.typed = true;
|
|
643
|
+
else _addIssue(this, "type", dataset, config$1);
|
|
644
|
+
return dataset;
|
|
645
|
+
}
|
|
646
|
+
};
|
|
647
|
+
}
|
|
648
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
649
|
+
function instance(class_, message$1) {
|
|
650
|
+
return {
|
|
651
|
+
kind: "schema",
|
|
652
|
+
type: "instance",
|
|
653
|
+
reference: instance,
|
|
654
|
+
expects: class_.name,
|
|
655
|
+
async: false,
|
|
656
|
+
class: class_,
|
|
657
|
+
message: message$1,
|
|
658
|
+
get "~standard"() {
|
|
659
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
660
|
+
},
|
|
661
|
+
"~run"(dataset, config$1) {
|
|
662
|
+
if (dataset.value instanceof this.class) dataset.typed = true;
|
|
663
|
+
else _addIssue(this, "type", dataset, config$1);
|
|
664
|
+
return dataset;
|
|
665
|
+
}
|
|
666
|
+
};
|
|
667
|
+
}
|
|
668
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
669
|
+
function literal(literal_, message$1) {
|
|
670
|
+
return {
|
|
671
|
+
kind: "schema",
|
|
672
|
+
type: "literal",
|
|
673
|
+
reference: literal,
|
|
674
|
+
expects: /* @__PURE__ */ _stringify(literal_),
|
|
675
|
+
async: false,
|
|
676
|
+
literal: literal_,
|
|
677
|
+
message: message$1,
|
|
678
|
+
get "~standard"() {
|
|
679
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
680
|
+
},
|
|
681
|
+
"~run"(dataset, config$1) {
|
|
682
|
+
if (dataset.value === this.literal) dataset.typed = true;
|
|
683
|
+
else _addIssue(this, "type", dataset, config$1);
|
|
684
|
+
return dataset;
|
|
685
|
+
}
|
|
686
|
+
};
|
|
687
|
+
}
|
|
688
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
689
|
+
function never(message$1) {
|
|
690
|
+
return {
|
|
691
|
+
kind: "schema",
|
|
692
|
+
type: "never",
|
|
693
|
+
reference: never,
|
|
694
|
+
expects: "never",
|
|
695
|
+
async: false,
|
|
696
|
+
message: message$1,
|
|
697
|
+
get "~standard"() {
|
|
698
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
699
|
+
},
|
|
700
|
+
"~run"(dataset, config$1) {
|
|
701
|
+
_addIssue(this, "type", dataset, config$1);
|
|
702
|
+
return dataset;
|
|
703
|
+
}
|
|
704
|
+
};
|
|
705
|
+
}
|
|
706
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
707
|
+
function nullish(wrapped, default_) {
|
|
708
|
+
return {
|
|
709
|
+
kind: "schema",
|
|
710
|
+
type: "nullish",
|
|
711
|
+
reference: nullish,
|
|
712
|
+
expects: `(${wrapped.expects} | null | undefined)`,
|
|
713
|
+
async: false,
|
|
714
|
+
wrapped,
|
|
715
|
+
default: default_,
|
|
716
|
+
get "~standard"() {
|
|
717
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
718
|
+
},
|
|
719
|
+
"~run"(dataset, config$1) {
|
|
720
|
+
if (dataset.value === null || dataset.value === void 0) {
|
|
721
|
+
if (this.default !== void 0) dataset.value = /* @__PURE__ */ getDefault(this, dataset, config$1);
|
|
722
|
+
if (dataset.value === null || dataset.value === void 0) {
|
|
723
|
+
dataset.typed = true;
|
|
724
|
+
return dataset;
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
return this.wrapped["~run"](dataset, config$1);
|
|
728
|
+
}
|
|
729
|
+
};
|
|
730
|
+
}
|
|
731
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
732
|
+
function number(message$1) {
|
|
733
|
+
return {
|
|
734
|
+
kind: "schema",
|
|
735
|
+
type: "number",
|
|
736
|
+
reference: number,
|
|
737
|
+
expects: "number",
|
|
738
|
+
async: false,
|
|
739
|
+
message: message$1,
|
|
740
|
+
get "~standard"() {
|
|
741
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
742
|
+
},
|
|
743
|
+
"~run"(dataset, config$1) {
|
|
744
|
+
if (typeof dataset.value === "number" && !isNaN(dataset.value)) dataset.typed = true;
|
|
745
|
+
else _addIssue(this, "type", dataset, config$1);
|
|
746
|
+
return dataset;
|
|
747
|
+
}
|
|
748
|
+
};
|
|
749
|
+
}
|
|
750
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
751
|
+
function object(entries$1, message$1) {
|
|
752
|
+
return {
|
|
753
|
+
kind: "schema",
|
|
754
|
+
type: "object",
|
|
755
|
+
reference: object,
|
|
756
|
+
expects: "Object",
|
|
757
|
+
async: false,
|
|
758
|
+
entries: entries$1,
|
|
759
|
+
message: message$1,
|
|
760
|
+
get "~standard"() {
|
|
761
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
762
|
+
},
|
|
763
|
+
"~run"(dataset, config$1) {
|
|
764
|
+
const input = dataset.value;
|
|
765
|
+
if (input && typeof input === "object") {
|
|
766
|
+
dataset.typed = true;
|
|
767
|
+
dataset.value = {};
|
|
768
|
+
for (const key in this.entries) {
|
|
769
|
+
const valueSchema = this.entries[key];
|
|
770
|
+
if (key in input || (valueSchema.type === "exact_optional" || valueSchema.type === "optional" || valueSchema.type === "nullish") && valueSchema.default !== void 0) {
|
|
771
|
+
const value$1 = key in input ? input[key] : /* @__PURE__ */ getDefault(valueSchema);
|
|
772
|
+
const valueDataset = valueSchema["~run"]({ value: value$1 }, config$1);
|
|
773
|
+
if (valueDataset.issues) {
|
|
774
|
+
const pathItem = {
|
|
775
|
+
type: "object",
|
|
776
|
+
origin: "value",
|
|
777
|
+
input,
|
|
778
|
+
key,
|
|
779
|
+
value: value$1
|
|
780
|
+
};
|
|
781
|
+
for (const issue of valueDataset.issues) {
|
|
782
|
+
if (issue.path) issue.path.unshift(pathItem);
|
|
783
|
+
else issue.path = [pathItem];
|
|
784
|
+
dataset.issues?.push(issue);
|
|
785
|
+
}
|
|
786
|
+
if (!dataset.issues) dataset.issues = valueDataset.issues;
|
|
787
|
+
if (config$1.abortEarly) {
|
|
788
|
+
dataset.typed = false;
|
|
789
|
+
break;
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
if (!valueDataset.typed) dataset.typed = false;
|
|
793
|
+
dataset.value[key] = valueDataset.value;
|
|
794
|
+
} else if (valueSchema.fallback !== void 0) dataset.value[key] = /* @__PURE__ */ getFallback(valueSchema);
|
|
795
|
+
else if (valueSchema.type !== "exact_optional" && valueSchema.type !== "optional" && valueSchema.type !== "nullish") {
|
|
796
|
+
_addIssue(this, "key", dataset, config$1, {
|
|
797
|
+
input: void 0,
|
|
798
|
+
expected: `"${key}"`,
|
|
799
|
+
path: [{
|
|
800
|
+
type: "object",
|
|
801
|
+
origin: "key",
|
|
802
|
+
input,
|
|
803
|
+
key,
|
|
804
|
+
value: input[key]
|
|
805
|
+
}]
|
|
806
|
+
});
|
|
807
|
+
if (config$1.abortEarly) break;
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
} else _addIssue(this, "type", dataset, config$1);
|
|
811
|
+
return dataset;
|
|
812
|
+
}
|
|
813
|
+
};
|
|
814
|
+
}
|
|
815
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
816
|
+
function optional(wrapped, default_) {
|
|
817
|
+
return {
|
|
818
|
+
kind: "schema",
|
|
819
|
+
type: "optional",
|
|
820
|
+
reference: optional,
|
|
821
|
+
expects: `(${wrapped.expects} | undefined)`,
|
|
822
|
+
async: false,
|
|
823
|
+
wrapped,
|
|
824
|
+
default: default_,
|
|
825
|
+
get "~standard"() {
|
|
826
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
827
|
+
},
|
|
828
|
+
"~run"(dataset, config$1) {
|
|
829
|
+
if (dataset.value === void 0) {
|
|
830
|
+
if (this.default !== void 0) dataset.value = /* @__PURE__ */ getDefault(this, dataset, config$1);
|
|
831
|
+
if (dataset.value === void 0) {
|
|
832
|
+
dataset.typed = true;
|
|
833
|
+
return dataset;
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
return this.wrapped["~run"](dataset, config$1);
|
|
837
|
+
}
|
|
838
|
+
};
|
|
839
|
+
}
|
|
840
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
841
|
+
function picklist(options, message$1) {
|
|
842
|
+
return {
|
|
843
|
+
kind: "schema",
|
|
844
|
+
type: "picklist",
|
|
845
|
+
reference: picklist,
|
|
846
|
+
expects: /* @__PURE__ */ _joinExpects(options.map(_stringify), "|"),
|
|
847
|
+
async: false,
|
|
848
|
+
options,
|
|
849
|
+
message: message$1,
|
|
850
|
+
get "~standard"() {
|
|
851
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
852
|
+
},
|
|
853
|
+
"~run"(dataset, config$1) {
|
|
854
|
+
if (this.options.includes(dataset.value)) dataset.typed = true;
|
|
855
|
+
else _addIssue(this, "type", dataset, config$1);
|
|
856
|
+
return dataset;
|
|
857
|
+
}
|
|
858
|
+
};
|
|
859
|
+
}
|
|
860
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
861
|
+
function promise(message$1) {
|
|
862
|
+
return {
|
|
863
|
+
kind: "schema",
|
|
864
|
+
type: "promise",
|
|
865
|
+
reference: promise,
|
|
866
|
+
expects: "Promise",
|
|
867
|
+
async: false,
|
|
868
|
+
message: message$1,
|
|
869
|
+
get "~standard"() {
|
|
870
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
871
|
+
},
|
|
872
|
+
"~run"(dataset, config$1) {
|
|
873
|
+
if (dataset.value instanceof Promise) dataset.typed = true;
|
|
874
|
+
else _addIssue(this, "type", dataset, config$1);
|
|
875
|
+
return dataset;
|
|
876
|
+
}
|
|
877
|
+
};
|
|
878
|
+
}
|
|
879
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
880
|
+
function record(key, value$1, message$1) {
|
|
881
|
+
return {
|
|
882
|
+
kind: "schema",
|
|
883
|
+
type: "record",
|
|
884
|
+
reference: record,
|
|
885
|
+
expects: "Object",
|
|
886
|
+
async: false,
|
|
887
|
+
key,
|
|
888
|
+
value: value$1,
|
|
889
|
+
message: message$1,
|
|
890
|
+
get "~standard"() {
|
|
891
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
892
|
+
},
|
|
893
|
+
"~run"(dataset, config$1) {
|
|
894
|
+
const input = dataset.value;
|
|
895
|
+
if (input && typeof input === "object") {
|
|
896
|
+
dataset.typed = true;
|
|
897
|
+
dataset.value = {};
|
|
898
|
+
for (const entryKey in input) if (/* @__PURE__ */ _isValidObjectKey(input, entryKey)) {
|
|
899
|
+
const entryValue = input[entryKey];
|
|
900
|
+
const keyDataset = this.key["~run"]({ value: entryKey }, config$1);
|
|
901
|
+
if (keyDataset.issues) {
|
|
902
|
+
const pathItem = {
|
|
903
|
+
type: "object",
|
|
904
|
+
origin: "key",
|
|
905
|
+
input,
|
|
906
|
+
key: entryKey,
|
|
907
|
+
value: entryValue
|
|
908
|
+
};
|
|
909
|
+
for (const issue of keyDataset.issues) {
|
|
910
|
+
issue.path = [pathItem];
|
|
911
|
+
dataset.issues?.push(issue);
|
|
912
|
+
}
|
|
913
|
+
if (!dataset.issues) dataset.issues = keyDataset.issues;
|
|
914
|
+
if (config$1.abortEarly) {
|
|
915
|
+
dataset.typed = false;
|
|
916
|
+
break;
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
const valueDataset = this.value["~run"]({ value: entryValue }, config$1);
|
|
920
|
+
if (valueDataset.issues) {
|
|
921
|
+
const pathItem = {
|
|
922
|
+
type: "object",
|
|
923
|
+
origin: "value",
|
|
924
|
+
input,
|
|
925
|
+
key: entryKey,
|
|
926
|
+
value: entryValue
|
|
927
|
+
};
|
|
928
|
+
for (const issue of valueDataset.issues) {
|
|
929
|
+
if (issue.path) issue.path.unshift(pathItem);
|
|
930
|
+
else issue.path = [pathItem];
|
|
931
|
+
dataset.issues?.push(issue);
|
|
932
|
+
}
|
|
933
|
+
if (!dataset.issues) dataset.issues = valueDataset.issues;
|
|
934
|
+
if (config$1.abortEarly) {
|
|
935
|
+
dataset.typed = false;
|
|
936
|
+
break;
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
if (!keyDataset.typed || !valueDataset.typed) dataset.typed = false;
|
|
940
|
+
if (keyDataset.typed) dataset.value[keyDataset.value] = valueDataset.value;
|
|
941
|
+
}
|
|
942
|
+
} else _addIssue(this, "type", dataset, config$1);
|
|
943
|
+
return dataset;
|
|
944
|
+
}
|
|
945
|
+
};
|
|
946
|
+
}
|
|
947
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
948
|
+
function strictObject(entries$1, message$1) {
|
|
949
|
+
return {
|
|
950
|
+
kind: "schema",
|
|
951
|
+
type: "strict_object",
|
|
952
|
+
reference: strictObject,
|
|
953
|
+
expects: "Object",
|
|
954
|
+
async: false,
|
|
955
|
+
entries: entries$1,
|
|
956
|
+
message: message$1,
|
|
957
|
+
get "~standard"() {
|
|
958
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
959
|
+
},
|
|
960
|
+
"~run"(dataset, config$1) {
|
|
961
|
+
const input = dataset.value;
|
|
962
|
+
if (input && typeof input === "object") {
|
|
963
|
+
dataset.typed = true;
|
|
964
|
+
dataset.value = {};
|
|
965
|
+
for (const key in this.entries) {
|
|
966
|
+
const valueSchema = this.entries[key];
|
|
967
|
+
if (key in input || (valueSchema.type === "exact_optional" || valueSchema.type === "optional" || valueSchema.type === "nullish") && valueSchema.default !== void 0) {
|
|
968
|
+
const value$1 = key in input ? input[key] : /* @__PURE__ */ getDefault(valueSchema);
|
|
969
|
+
const valueDataset = valueSchema["~run"]({ value: value$1 }, config$1);
|
|
970
|
+
if (valueDataset.issues) {
|
|
971
|
+
const pathItem = {
|
|
972
|
+
type: "object",
|
|
973
|
+
origin: "value",
|
|
974
|
+
input,
|
|
975
|
+
key,
|
|
976
|
+
value: value$1
|
|
977
|
+
};
|
|
978
|
+
for (const issue of valueDataset.issues) {
|
|
979
|
+
if (issue.path) issue.path.unshift(pathItem);
|
|
980
|
+
else issue.path = [pathItem];
|
|
981
|
+
dataset.issues?.push(issue);
|
|
982
|
+
}
|
|
983
|
+
if (!dataset.issues) dataset.issues = valueDataset.issues;
|
|
984
|
+
if (config$1.abortEarly) {
|
|
985
|
+
dataset.typed = false;
|
|
986
|
+
break;
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
if (!valueDataset.typed) dataset.typed = false;
|
|
990
|
+
dataset.value[key] = valueDataset.value;
|
|
991
|
+
} else if (valueSchema.fallback !== void 0) dataset.value[key] = /* @__PURE__ */ getFallback(valueSchema);
|
|
992
|
+
else if (valueSchema.type !== "exact_optional" && valueSchema.type !== "optional" && valueSchema.type !== "nullish") {
|
|
993
|
+
_addIssue(this, "key", dataset, config$1, {
|
|
994
|
+
input: void 0,
|
|
995
|
+
expected: `"${key}"`,
|
|
996
|
+
path: [{
|
|
997
|
+
type: "object",
|
|
998
|
+
origin: "key",
|
|
999
|
+
input,
|
|
1000
|
+
key,
|
|
1001
|
+
value: input[key]
|
|
1002
|
+
}]
|
|
1003
|
+
});
|
|
1004
|
+
if (config$1.abortEarly) break;
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
if (!dataset.issues || !config$1.abortEarly) {
|
|
1008
|
+
for (const key in input) if (!(key in this.entries)) {
|
|
1009
|
+
_addIssue(this, "key", dataset, config$1, {
|
|
1010
|
+
input: key,
|
|
1011
|
+
expected: "never",
|
|
1012
|
+
path: [{
|
|
1013
|
+
type: "object",
|
|
1014
|
+
origin: "key",
|
|
1015
|
+
input,
|
|
1016
|
+
key,
|
|
1017
|
+
value: input[key]
|
|
1018
|
+
}]
|
|
1019
|
+
});
|
|
1020
|
+
break;
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
} else _addIssue(this, "type", dataset, config$1);
|
|
1024
|
+
return dataset;
|
|
1025
|
+
}
|
|
1026
|
+
};
|
|
1027
|
+
}
|
|
1028
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1029
|
+
function string(message$1) {
|
|
1030
|
+
return {
|
|
1031
|
+
kind: "schema",
|
|
1032
|
+
type: "string",
|
|
1033
|
+
reference: string,
|
|
1034
|
+
expects: "string",
|
|
1035
|
+
async: false,
|
|
1036
|
+
message: message$1,
|
|
1037
|
+
get "~standard"() {
|
|
1038
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
1039
|
+
},
|
|
1040
|
+
"~run"(dataset, config$1) {
|
|
1041
|
+
if (typeof dataset.value === "string") dataset.typed = true;
|
|
1042
|
+
else _addIssue(this, "type", dataset, config$1);
|
|
1043
|
+
return dataset;
|
|
1044
|
+
}
|
|
1045
|
+
};
|
|
1046
|
+
}
|
|
1047
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1048
|
+
function tuple(items, message$1) {
|
|
1049
|
+
return {
|
|
1050
|
+
kind: "schema",
|
|
1051
|
+
type: "tuple",
|
|
1052
|
+
reference: tuple,
|
|
1053
|
+
expects: "Array",
|
|
1054
|
+
async: false,
|
|
1055
|
+
items,
|
|
1056
|
+
message: message$1,
|
|
1057
|
+
get "~standard"() {
|
|
1058
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
1059
|
+
},
|
|
1060
|
+
"~run"(dataset, config$1) {
|
|
1061
|
+
const input = dataset.value;
|
|
1062
|
+
if (Array.isArray(input)) {
|
|
1063
|
+
dataset.typed = true;
|
|
1064
|
+
dataset.value = [];
|
|
1065
|
+
for (let key = 0; key < this.items.length; key++) {
|
|
1066
|
+
const value$1 = input[key];
|
|
1067
|
+
const itemDataset = this.items[key]["~run"]({ value: value$1 }, config$1);
|
|
1068
|
+
if (itemDataset.issues) {
|
|
1069
|
+
const pathItem = {
|
|
1070
|
+
type: "array",
|
|
1071
|
+
origin: "value",
|
|
1072
|
+
input,
|
|
1073
|
+
key,
|
|
1074
|
+
value: value$1
|
|
1075
|
+
};
|
|
1076
|
+
for (const issue of itemDataset.issues) {
|
|
1077
|
+
if (issue.path) issue.path.unshift(pathItem);
|
|
1078
|
+
else issue.path = [pathItem];
|
|
1079
|
+
dataset.issues?.push(issue);
|
|
1080
|
+
}
|
|
1081
|
+
if (!dataset.issues) dataset.issues = itemDataset.issues;
|
|
1082
|
+
if (config$1.abortEarly) {
|
|
1083
|
+
dataset.typed = false;
|
|
1084
|
+
break;
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
if (!itemDataset.typed) dataset.typed = false;
|
|
1088
|
+
dataset.value.push(itemDataset.value);
|
|
1089
|
+
}
|
|
1090
|
+
} else _addIssue(this, "type", dataset, config$1);
|
|
1091
|
+
return dataset;
|
|
1092
|
+
}
|
|
1093
|
+
};
|
|
1094
|
+
}
|
|
1095
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1096
|
+
function undefined_(message$1) {
|
|
1097
|
+
return {
|
|
1098
|
+
kind: "schema",
|
|
1099
|
+
type: "undefined",
|
|
1100
|
+
reference: undefined_,
|
|
1101
|
+
expects: "undefined",
|
|
1102
|
+
async: false,
|
|
1103
|
+
message: message$1,
|
|
1104
|
+
get "~standard"() {
|
|
1105
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
1106
|
+
},
|
|
1107
|
+
"~run"(dataset, config$1) {
|
|
1108
|
+
if (dataset.value === void 0) dataset.typed = true;
|
|
1109
|
+
else _addIssue(this, "type", dataset, config$1);
|
|
1110
|
+
return dataset;
|
|
1111
|
+
}
|
|
1112
|
+
};
|
|
1113
|
+
}
|
|
1114
|
+
/**
|
|
1115
|
+
* Returns the sub issues of the provided datasets for the union issue.
|
|
1116
|
+
*
|
|
1117
|
+
* @param datasets The datasets.
|
|
1118
|
+
*
|
|
1119
|
+
* @returns The sub issues.
|
|
1120
|
+
*
|
|
1121
|
+
* @internal
|
|
1122
|
+
*/
|
|
1123
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1124
|
+
function _subIssues(datasets) {
|
|
1125
|
+
let issues;
|
|
1126
|
+
if (datasets) for (const dataset of datasets) if (issues) issues.push(...dataset.issues);
|
|
1127
|
+
else issues = dataset.issues;
|
|
1128
|
+
return issues;
|
|
1129
|
+
}
|
|
1130
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1131
|
+
function union(options, message$1) {
|
|
1132
|
+
return {
|
|
1133
|
+
kind: "schema",
|
|
1134
|
+
type: "union",
|
|
1135
|
+
reference: union,
|
|
1136
|
+
expects: /* @__PURE__ */ _joinExpects(options.map((option) => option.expects), "|"),
|
|
1137
|
+
async: false,
|
|
1138
|
+
options,
|
|
1139
|
+
message: message$1,
|
|
1140
|
+
get "~standard"() {
|
|
1141
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
1142
|
+
},
|
|
1143
|
+
"~run"(dataset, config$1) {
|
|
1144
|
+
let validDataset;
|
|
1145
|
+
let typedDatasets;
|
|
1146
|
+
let untypedDatasets;
|
|
1147
|
+
for (const schema of this.options) {
|
|
1148
|
+
const optionDataset = schema["~run"]({ value: dataset.value }, config$1);
|
|
1149
|
+
if (optionDataset.typed) if (optionDataset.issues) if (typedDatasets) typedDatasets.push(optionDataset);
|
|
1150
|
+
else typedDatasets = [optionDataset];
|
|
1151
|
+
else {
|
|
1152
|
+
validDataset = optionDataset;
|
|
1153
|
+
break;
|
|
1154
|
+
}
|
|
1155
|
+
else if (untypedDatasets) untypedDatasets.push(optionDataset);
|
|
1156
|
+
else untypedDatasets = [optionDataset];
|
|
1157
|
+
}
|
|
1158
|
+
if (validDataset) return validDataset;
|
|
1159
|
+
if (typedDatasets) {
|
|
1160
|
+
if (typedDatasets.length === 1) return typedDatasets[0];
|
|
1161
|
+
_addIssue(this, "type", dataset, config$1, { issues: /* @__PURE__ */ _subIssues(typedDatasets) });
|
|
1162
|
+
dataset.typed = true;
|
|
1163
|
+
} else if (untypedDatasets?.length === 1) return untypedDatasets[0];
|
|
1164
|
+
else _addIssue(this, "type", dataset, config$1, { issues: /* @__PURE__ */ _subIssues(untypedDatasets) });
|
|
1165
|
+
return dataset;
|
|
1166
|
+
}
|
|
1167
|
+
};
|
|
1168
|
+
}
|
|
1169
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1170
|
+
function unionAsync(options, message$1) {
|
|
1171
|
+
return {
|
|
1172
|
+
kind: "schema",
|
|
1173
|
+
type: "union",
|
|
1174
|
+
reference: unionAsync,
|
|
1175
|
+
expects: /* @__PURE__ */ _joinExpects(options.map((option) => option.expects), "|"),
|
|
1176
|
+
async: true,
|
|
1177
|
+
options,
|
|
1178
|
+
message: message$1,
|
|
1179
|
+
get "~standard"() {
|
|
1180
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
1181
|
+
},
|
|
1182
|
+
async "~run"(dataset, config$1) {
|
|
1183
|
+
let validDataset;
|
|
1184
|
+
let typedDatasets;
|
|
1185
|
+
let untypedDatasets;
|
|
1186
|
+
for (const schema of this.options) {
|
|
1187
|
+
const optionDataset = await schema["~run"]({ value: dataset.value }, config$1);
|
|
1188
|
+
if (optionDataset.typed) if (optionDataset.issues) if (typedDatasets) typedDatasets.push(optionDataset);
|
|
1189
|
+
else typedDatasets = [optionDataset];
|
|
1190
|
+
else {
|
|
1191
|
+
validDataset = optionDataset;
|
|
1192
|
+
break;
|
|
1193
|
+
}
|
|
1194
|
+
else if (untypedDatasets) untypedDatasets.push(optionDataset);
|
|
1195
|
+
else untypedDatasets = [optionDataset];
|
|
1196
|
+
}
|
|
1197
|
+
if (validDataset) return validDataset;
|
|
1198
|
+
if (typedDatasets) {
|
|
1199
|
+
if (typedDatasets.length === 1) return typedDatasets[0];
|
|
1200
|
+
_addIssue(this, "type", dataset, config$1, { issues: /* @__PURE__ */ _subIssues(typedDatasets) });
|
|
1201
|
+
dataset.typed = true;
|
|
1202
|
+
} else if (untypedDatasets?.length === 1) return untypedDatasets[0];
|
|
1203
|
+
else _addIssue(this, "type", dataset, config$1, { issues: /* @__PURE__ */ _subIssues(untypedDatasets) });
|
|
1204
|
+
return dataset;
|
|
1205
|
+
}
|
|
1206
|
+
};
|
|
1207
|
+
}
|
|
1208
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1209
|
+
function void_(message$1) {
|
|
1210
|
+
return {
|
|
1211
|
+
kind: "schema",
|
|
1212
|
+
type: "void",
|
|
1213
|
+
reference: void_,
|
|
1214
|
+
expects: "void",
|
|
1215
|
+
async: false,
|
|
1216
|
+
message: message$1,
|
|
1217
|
+
get "~standard"() {
|
|
1218
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
1219
|
+
},
|
|
1220
|
+
"~run"(dataset, config$1) {
|
|
1221
|
+
if (dataset.value === void 0) dataset.typed = true;
|
|
1222
|
+
else _addIssue(this, "type", dataset, config$1);
|
|
1223
|
+
return dataset;
|
|
1224
|
+
}
|
|
1225
|
+
};
|
|
1226
|
+
}
|
|
1227
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1228
|
+
function keyof(schema, message$1) {
|
|
1229
|
+
return /* @__PURE__ */ picklist(Object.keys(schema.entries), message$1);
|
|
1230
|
+
}
|
|
1231
|
+
/**
|
|
1232
|
+
* Creates a modified copy of an object schema that does not contain the
|
|
1233
|
+
* selected entries.
|
|
1234
|
+
*
|
|
1235
|
+
* @param schema The schema to omit from.
|
|
1236
|
+
* @param keys The selected entries.
|
|
1237
|
+
*
|
|
1238
|
+
* @returns An object schema.
|
|
1239
|
+
*/
|
|
1240
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1241
|
+
function omit(schema, keys) {
|
|
1242
|
+
const entries$1 = { ...schema.entries };
|
|
1243
|
+
for (const key of keys) delete entries$1[key];
|
|
1244
|
+
return {
|
|
1245
|
+
...schema,
|
|
1246
|
+
entries: entries$1,
|
|
1247
|
+
get "~standard"() {
|
|
1248
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
1249
|
+
}
|
|
1250
|
+
};
|
|
1251
|
+
}
|
|
1252
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1253
|
+
function partial(schema, keys) {
|
|
1254
|
+
const entries$1 = {};
|
|
1255
|
+
for (const key in schema.entries) entries$1[key] = !keys || keys.includes(key) ? /* @__PURE__ */ optional(schema.entries[key]) : schema.entries[key];
|
|
1256
|
+
return {
|
|
1257
|
+
...schema,
|
|
1258
|
+
entries: entries$1,
|
|
1259
|
+
get "~standard"() {
|
|
1260
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
1261
|
+
}
|
|
1262
|
+
};
|
|
1263
|
+
}
|
|
1264
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1265
|
+
function pipe(...pipe$1) {
|
|
1266
|
+
return {
|
|
1267
|
+
...pipe$1[0],
|
|
1268
|
+
pipe: pipe$1,
|
|
1269
|
+
get "~standard"() {
|
|
1270
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
1271
|
+
},
|
|
1272
|
+
"~run"(dataset, config$1) {
|
|
1273
|
+
for (const item of pipe$1) if (item.kind !== "metadata") {
|
|
1274
|
+
if (dataset.issues && (item.kind === "schema" || item.kind === "transformation")) {
|
|
1275
|
+
dataset.typed = false;
|
|
1276
|
+
break;
|
|
1277
|
+
}
|
|
1278
|
+
if (!dataset.issues || !config$1.abortEarly && !config$1.abortPipeEarly) dataset = item["~run"](dataset, config$1);
|
|
1279
|
+
}
|
|
1280
|
+
return dataset;
|
|
1281
|
+
}
|
|
1282
|
+
};
|
|
1283
|
+
}
|
|
1284
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1285
|
+
function pipeAsync(...pipe$1) {
|
|
1286
|
+
return {
|
|
1287
|
+
...pipe$1[0],
|
|
1288
|
+
pipe: pipe$1,
|
|
1289
|
+
async: true,
|
|
1290
|
+
get "~standard"() {
|
|
1291
|
+
return /* @__PURE__ */ _getStandardProps(this);
|
|
1292
|
+
},
|
|
1293
|
+
async "~run"(dataset, config$1) {
|
|
1294
|
+
for (const item of pipe$1) if (item.kind !== "metadata") {
|
|
1295
|
+
if (dataset.issues && (item.kind === "schema" || item.kind === "transformation")) {
|
|
1296
|
+
dataset.typed = false;
|
|
1297
|
+
break;
|
|
1298
|
+
}
|
|
1299
|
+
if (!dataset.issues || !config$1.abortEarly && !config$1.abortPipeEarly) dataset = await item["~run"](dataset, config$1);
|
|
1300
|
+
}
|
|
1301
|
+
return dataset;
|
|
1302
|
+
}
|
|
1303
|
+
};
|
|
1304
|
+
}
|
|
1305
|
+
/**
|
|
1306
|
+
* Parses an unknown input based on a schema.
|
|
1307
|
+
*
|
|
1308
|
+
* @param schema The schema to be used.
|
|
1309
|
+
* @param input The input to be parsed.
|
|
1310
|
+
* @param config The parse configuration.
|
|
1311
|
+
*
|
|
1312
|
+
* @returns The parse result.
|
|
1313
|
+
*/
|
|
1314
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
1315
|
+
function safeParse(schema, input, config$1) {
|
|
1316
|
+
const dataset = schema["~run"]({ value: input }, /* @__PURE__ */ getGlobalConfig(config$1));
|
|
1317
|
+
return {
|
|
1318
|
+
typed: dataset.typed,
|
|
1319
|
+
success: !dataset.issues,
|
|
1320
|
+
output: dataset.value,
|
|
1321
|
+
issues: dataset.issues
|
|
1322
|
+
};
|
|
1323
|
+
}
|
|
1324
|
+
//#endregion
|
|
1325
|
+
//#region src/utils/flatten-valibot-schema.ts
|
|
1326
|
+
function unwrapSchema(schema) {
|
|
1327
|
+
if (!schema) return schema;
|
|
1328
|
+
if (schema.type === "optional" && schema.wrapped) return unwrapSchema(schema.wrapped);
|
|
1329
|
+
if (schema.type === "nullable" && schema.wrapped) return unwrapSchema(schema.wrapped);
|
|
1330
|
+
if (schema.type === "nullish" && schema.wrapped) return unwrapSchema(schema.wrapped);
|
|
1331
|
+
return schema;
|
|
1332
|
+
}
|
|
1333
|
+
function getValibotSchemaType(schema) {
|
|
1334
|
+
if (!schema) return "any";
|
|
1335
|
+
if (schema.type) switch (schema.type) {
|
|
1336
|
+
case "string": return "string";
|
|
1337
|
+
case "number": return "number";
|
|
1338
|
+
case "boolean": return "boolean";
|
|
1339
|
+
case "array": return "array";
|
|
1340
|
+
case "object":
|
|
1341
|
+
case "strict_object":
|
|
1342
|
+
case "loose_object": return "object";
|
|
1343
|
+
case "union": return "union";
|
|
1344
|
+
case "literal": return typeof schema.literal;
|
|
1345
|
+
case "record": return "object";
|
|
1346
|
+
case "optional": return getValibotSchemaType(schema.wrapped);
|
|
1347
|
+
case "nullable": return getValibotSchemaType(schema.wrapped);
|
|
1348
|
+
case "nullish": return getValibotSchemaType(schema.wrapped);
|
|
1349
|
+
case "never": return "never";
|
|
1350
|
+
case "any": return "any";
|
|
1351
|
+
case "custom": return "any";
|
|
1352
|
+
case "function": return "never";
|
|
1353
|
+
case "instance": return "object";
|
|
1354
|
+
default: return "any";
|
|
1355
|
+
}
|
|
1356
|
+
return "any";
|
|
1357
|
+
}
|
|
1358
|
+
function getValibotDescription(schema) {
|
|
1359
|
+
if (!schema) return void 0;
|
|
1360
|
+
if (schema.pipe && Array.isArray(schema.pipe)) {
|
|
1361
|
+
for (const action of schema.pipe) if (action.type === "description" && action.description) return action.description;
|
|
1362
|
+
}
|
|
1363
|
+
if (schema.type === "optional" && schema.wrapped) return getValibotDescription(schema.wrapped);
|
|
1364
|
+
}
|
|
1365
|
+
function flattenValibotSchema(schema, result = {}, prefix = "") {
|
|
1366
|
+
if (!schema || typeof schema !== "object") return result;
|
|
1367
|
+
if (schema.type === "strict_object" || schema.type === "object" || schema.type === "loose_object") {
|
|
1368
|
+
if (schema.entries && typeof schema.entries === "object") for (const [key, value] of Object.entries(schema.entries)) {
|
|
1369
|
+
const fullKey = prefix ? `${prefix}.${key}` : key;
|
|
1370
|
+
const valueSchema = value;
|
|
1371
|
+
const type = getValibotSchemaType(valueSchema);
|
|
1372
|
+
const description = getValibotDescription(valueSchema);
|
|
1373
|
+
if (type === "object") {
|
|
1374
|
+
const unwrappedSchema = unwrapSchema(valueSchema);
|
|
1375
|
+
if (unwrappedSchema && unwrappedSchema.entries) flattenValibotSchema(unwrappedSchema, result, fullKey);
|
|
1376
|
+
else result[fullKey] = {
|
|
1377
|
+
type,
|
|
1378
|
+
description
|
|
1379
|
+
};
|
|
1380
|
+
} else result[fullKey] = {
|
|
1381
|
+
type,
|
|
1382
|
+
description
|
|
1383
|
+
};
|
|
1384
|
+
}
|
|
1385
|
+
}
|
|
1386
|
+
return result;
|
|
1387
|
+
}
|
|
1388
|
+
//#endregion
|
|
1389
|
+
//#region src/utils/style-text.ts
|
|
1390
|
+
/**
|
|
1391
|
+
* Cross-platform styleText utility that works in both Node.js and browser environments
|
|
1392
|
+
* In Node.js, it uses the native `styleText` from `node:util`
|
|
1393
|
+
* In browser, it provides empty styling functions for compatibility
|
|
1394
|
+
*/
|
|
1395
|
+
function styleText$1(...args) {
|
|
1396
|
+
return styleText(...args);
|
|
1397
|
+
}
|
|
1398
|
+
//#endregion
|
|
1399
|
+
//#region src/utils/validator.ts
|
|
1400
|
+
function isTypeTrue() {}
|
|
1401
|
+
const StringOrRegExpSchema = /* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ instance(RegExp)]);
|
|
1402
|
+
isTypeTrue();
|
|
1403
|
+
function vFunction() {
|
|
1404
|
+
return /* @__PURE__ */ function_();
|
|
1405
|
+
}
|
|
1406
|
+
const LogLevelSchema = /* @__PURE__ */ union([
|
|
1407
|
+
/* @__PURE__ */ literal("debug"),
|
|
1408
|
+
/* @__PURE__ */ literal("info"),
|
|
1409
|
+
/* @__PURE__ */ literal("warn")
|
|
1410
|
+
]);
|
|
1411
|
+
isTypeTrue();
|
|
1412
|
+
const LogLevelOptionSchema = /* @__PURE__ */ union([LogLevelSchema, /* @__PURE__ */ literal("silent")]);
|
|
1413
|
+
isTypeTrue();
|
|
1414
|
+
const LogLevelWithErrorSchema = /* @__PURE__ */ union([LogLevelSchema, /* @__PURE__ */ literal("error")]);
|
|
1415
|
+
isTypeTrue();
|
|
1416
|
+
const RollupLogSchema = /* @__PURE__ */ any();
|
|
1417
|
+
const RollupLogWithStringSchema = /* @__PURE__ */ union([RollupLogSchema, /* @__PURE__ */ string()]);
|
|
1418
|
+
isTypeTrue();
|
|
1419
|
+
const InputOptionSchema = /* @__PURE__ */ union([
|
|
1420
|
+
/* @__PURE__ */ string(),
|
|
1421
|
+
/* @__PURE__ */ array(/* @__PURE__ */ string()),
|
|
1422
|
+
/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ string())
|
|
1423
|
+
]);
|
|
1424
|
+
isTypeTrue();
|
|
1425
|
+
const ExternalOptionFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([
|
|
1426
|
+
/* @__PURE__ */ string(),
|
|
1427
|
+
/* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
1428
|
+
/* @__PURE__ */ boolean()
|
|
1429
|
+
])), /* @__PURE__ */ returns(/* @__PURE__ */ nullish(/* @__PURE__ */ boolean())));
|
|
1430
|
+
isTypeTrue();
|
|
1431
|
+
const ExternalOptionSchema = /* @__PURE__ */ union([
|
|
1432
|
+
StringOrRegExpSchema,
|
|
1433
|
+
/* @__PURE__ */ array(StringOrRegExpSchema),
|
|
1434
|
+
ExternalOptionFunctionSchema
|
|
1435
|
+
]);
|
|
1436
|
+
isTypeTrue();
|
|
1437
|
+
const ModuleTypesSchema = /* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ union([
|
|
1438
|
+
/* @__PURE__ */ literal("asset"),
|
|
1439
|
+
/* @__PURE__ */ literal("base64"),
|
|
1440
|
+
/* @__PURE__ */ literal("binary"),
|
|
1441
|
+
/* @__PURE__ */ literal("copy"),
|
|
1442
|
+
/* @__PURE__ */ literal("css"),
|
|
1443
|
+
/* @__PURE__ */ literal("dataurl"),
|
|
1444
|
+
/* @__PURE__ */ literal("empty"),
|
|
1445
|
+
/* @__PURE__ */ literal("js"),
|
|
1446
|
+
/* @__PURE__ */ literal("json"),
|
|
1447
|
+
/* @__PURE__ */ literal("jsx"),
|
|
1448
|
+
/* @__PURE__ */ literal("text"),
|
|
1449
|
+
/* @__PURE__ */ literal("ts"),
|
|
1450
|
+
/* @__PURE__ */ literal("tsx")
|
|
1451
|
+
]));
|
|
1452
|
+
isTypeTrue();
|
|
1453
|
+
const JsxOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1454
|
+
runtime: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal("classic"), /* @__PURE__ */ literal("automatic")])), /* @__PURE__ */ description("Which runtime to use")),
|
|
1455
|
+
development: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Development specific information")),
|
|
1456
|
+
throwIfNamespace: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Toggles whether to throw an error when a tag name uses an XML namespace")),
|
|
1457
|
+
pure: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Mark JSX elements and top-level React method calls as pure for tree shaking.")),
|
|
1458
|
+
importSource: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Import the factory of element and fragment if mode is classic")),
|
|
1459
|
+
pragma: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Jsx element transformation")),
|
|
1460
|
+
pragmaFrag: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Jsx fragment transformation")),
|
|
1461
|
+
refresh: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ any()])), /* @__PURE__ */ description("Enable react fast refresh"))
|
|
1462
|
+
});
|
|
1463
|
+
isTypeTrue();
|
|
1464
|
+
const HelperModeSchema = /* @__PURE__ */ union([/* @__PURE__ */ literal("Runtime"), /* @__PURE__ */ literal("External")]);
|
|
1465
|
+
const DecoratorOptionSchema = /* @__PURE__ */ object({
|
|
1466
|
+
legacy: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1467
|
+
emitDecoratorMetadata: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
1468
|
+
});
|
|
1469
|
+
isTypeTrue();
|
|
1470
|
+
const HelpersSchema = /* @__PURE__ */ object({ mode: /* @__PURE__ */ optional(HelperModeSchema) });
|
|
1471
|
+
isTypeTrue();
|
|
1472
|
+
const TypescriptSchema = /* @__PURE__ */ object({
|
|
1473
|
+
jsxPragma: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
1474
|
+
jsxPragmaFrag: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
1475
|
+
onlyRemoveTypeImports: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1476
|
+
allowNamespaces: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1477
|
+
allowDeclareFields: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1478
|
+
removeClassFieldsWithoutInitializer: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1479
|
+
declaration: /* @__PURE__ */ optional(/* @__PURE__ */ object({
|
|
1480
|
+
stripInternal: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1481
|
+
sourcemap: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
1482
|
+
})),
|
|
1483
|
+
rewriteImportExtensions: /* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1484
|
+
/* @__PURE__ */ literal("rewrite"),
|
|
1485
|
+
/* @__PURE__ */ literal("remove"),
|
|
1486
|
+
/* @__PURE__ */ boolean()
|
|
1487
|
+
]))
|
|
1488
|
+
});
|
|
1489
|
+
isTypeTrue();
|
|
1490
|
+
const AssumptionsSchema = /* @__PURE__ */ object({
|
|
1491
|
+
ignoreFunctionLength: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1492
|
+
noDocumentAll: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1493
|
+
objectRestNoSymbols: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1494
|
+
pureGetters: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1495
|
+
setPublicClassFields: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
1496
|
+
});
|
|
1497
|
+
isTypeTrue();
|
|
1498
|
+
const TransformPluginsSchema = /* @__PURE__ */ object({
|
|
1499
|
+
styledComponents: /* @__PURE__ */ optional(/* @__PURE__ */ any()),
|
|
1500
|
+
taggedTemplateEscape: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
1501
|
+
});
|
|
1502
|
+
isTypeTrue();
|
|
1503
|
+
const TransformOptionsSchema = /* @__PURE__ */ object({
|
|
1504
|
+
assumptions: /* @__PURE__ */ optional(AssumptionsSchema),
|
|
1505
|
+
typescript: /* @__PURE__ */ optional(TypescriptSchema),
|
|
1506
|
+
helpers: /* @__PURE__ */ optional(HelpersSchema),
|
|
1507
|
+
decorator: /* @__PURE__ */ optional(DecoratorOptionSchema),
|
|
1508
|
+
jsx: /* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1509
|
+
/* @__PURE__ */ literal(false),
|
|
1510
|
+
/* @__PURE__ */ literal("preserve"),
|
|
1511
|
+
/* @__PURE__ */ literal("react"),
|
|
1512
|
+
/* @__PURE__ */ literal("react-jsx"),
|
|
1513
|
+
JsxOptionsSchema
|
|
1514
|
+
])),
|
|
1515
|
+
target: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ array(/* @__PURE__ */ string())])), /* @__PURE__ */ description("The JavaScript target environment")),
|
|
1516
|
+
define: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ string())), /* @__PURE__ */ description("Define global variables (syntax: key:value,key2:value2)")),
|
|
1517
|
+
inject: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ tuple([/* @__PURE__ */ string(), /* @__PURE__ */ string()])]))), /* @__PURE__ */ description("Inject import statements on demand")),
|
|
1518
|
+
dropLabels: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())), /* @__PURE__ */ description("Remove labeled statements with these label names")),
|
|
1519
|
+
plugins: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(TransformPluginsSchema), /* @__PURE__ */ description("Third-party plugins to use"))
|
|
1520
|
+
});
|
|
1521
|
+
isTypeTrue();
|
|
1522
|
+
const WatcherFileWatcherOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1523
|
+
usePolling: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Use polling-based file watching instead of native OS events")),
|
|
1524
|
+
pollInterval: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Poll interval in milliseconds (only used when usePolling is true)")),
|
|
1525
|
+
compareContentsForPolling: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Compare file contents for poll-based watchers (only used when usePolling is true)")),
|
|
1526
|
+
useDebounce: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Use debounced event delivery at the filesystem level")),
|
|
1527
|
+
debounceDelay: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Debounce delay in milliseconds (only used when useDebounce is true)")),
|
|
1528
|
+
debounceTickRate: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Tick rate in milliseconds for debouncer (only used when useDebounce is true)"))
|
|
1529
|
+
});
|
|
1530
|
+
const WatcherOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1531
|
+
chokidar: /* @__PURE__ */ optional(/* @__PURE__ */ never(`The "watch.chokidar" option is deprecated, please use "watch.watcher" instead of it`)),
|
|
1532
|
+
exclude: /* @__PURE__ */ optional(/* @__PURE__ */ union([StringOrRegExpSchema, /* @__PURE__ */ array(StringOrRegExpSchema)])),
|
|
1533
|
+
include: /* @__PURE__ */ optional(/* @__PURE__ */ union([StringOrRegExpSchema, /* @__PURE__ */ array(StringOrRegExpSchema)])),
|
|
1534
|
+
watcher: /* @__PURE__ */ optional(WatcherFileWatcherOptionsSchema),
|
|
1535
|
+
notify: /* @__PURE__ */ optional(WatcherFileWatcherOptionsSchema),
|
|
1536
|
+
skipWrite: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Skip the bundle.write() step")),
|
|
1537
|
+
buildDelay: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Throttle watch rebuilds")),
|
|
1538
|
+
clearScreen: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to clear the screen when a rebuild is triggered")),
|
|
1539
|
+
onInvalidate: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(vFunction()), /* @__PURE__ */ description("An optional function that will be called immediately every time a module changes that is part of the build."))
|
|
1540
|
+
});
|
|
1541
|
+
isTypeTrue();
|
|
1542
|
+
const ChecksOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1543
|
+
circularDependency: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when detecting circular dependency")),
|
|
1544
|
+
eval: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when detecting uses of direct `eval`s")),
|
|
1545
|
+
missingGlobalName: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when the `output.globals` option is missing when needed")),
|
|
1546
|
+
missingNameOptionForIifeExport: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when the `output.name` option is missing when needed")),
|
|
1547
|
+
mixedExports: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when the way to export values is ambiguous")),
|
|
1548
|
+
unresolvedEntry: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when an entrypoint cannot be resolved")),
|
|
1549
|
+
unresolvedImport: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when an import cannot be resolved")),
|
|
1550
|
+
filenameConflict: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when files generated have the same name with different contents")),
|
|
1551
|
+
commonJsVariableInEsm: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a CommonJS variable is used in an ES module")),
|
|
1552
|
+
importIsUndefined: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when an imported variable is not exported")),
|
|
1553
|
+
emptyImportMeta: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when `import.meta` is not supported with the output format and is replaced with an empty object (`{}`)")),
|
|
1554
|
+
toleratedTransform: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when detecting tolerated transform")),
|
|
1555
|
+
cannotCallNamespace: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a namespace is called as a function")),
|
|
1556
|
+
configurationFieldConflict: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a config value is overridden by another config value with a higher priority")),
|
|
1557
|
+
preferBuiltinFeature: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a plugin that is covered by a built-in feature is used")),
|
|
1558
|
+
couldNotCleanDirectory: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when Rolldown could not clean the output directory")),
|
|
1559
|
+
pluginTimings: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when plugins take significant time during the build process")),
|
|
1560
|
+
duplicateShebang: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when both the code and postBanner contain shebang")),
|
|
1561
|
+
unsupportedTsconfigOption: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a tsconfig option or combination of options is not supported")),
|
|
1562
|
+
ineffectiveDynamicImport: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a module is dynamically imported but also statically imported, making the dynamic import ineffective for code splitting"))
|
|
1563
|
+
});
|
|
1564
|
+
isTypeTrue();
|
|
1565
|
+
const CompressOptionsKeepNamesSchema = /* @__PURE__ */ strictObject({
|
|
1566
|
+
function: /* @__PURE__ */ boolean(),
|
|
1567
|
+
class: /* @__PURE__ */ boolean()
|
|
1568
|
+
});
|
|
1569
|
+
isTypeTrue();
|
|
1570
|
+
const CompressTreeshakeOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1571
|
+
annotations: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1572
|
+
manualPureFunctions: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
|
|
1573
|
+
propertyReadSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ literal("always")])),
|
|
1574
|
+
unknownGlobalSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1575
|
+
invalidImportSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
1576
|
+
});
|
|
1577
|
+
isTypeTrue();
|
|
1578
|
+
const CompressOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1579
|
+
target: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ array(/* @__PURE__ */ string())])),
|
|
1580
|
+
dropConsole: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1581
|
+
dropDebugger: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1582
|
+
keepNames: /* @__PURE__ */ optional(CompressOptionsKeepNamesSchema),
|
|
1583
|
+
unused: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ literal("keep_assign")])),
|
|
1584
|
+
joinVars: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1585
|
+
sequences: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1586
|
+
dropLabels: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
|
|
1587
|
+
maxIterations: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1588
|
+
treeshake: /* @__PURE__ */ optional(CompressTreeshakeOptionsSchema)
|
|
1589
|
+
});
|
|
1590
|
+
isTypeTrue();
|
|
1591
|
+
const MangleOptionsKeepNamesSchema = /* @__PURE__ */ strictObject({
|
|
1592
|
+
function: /* @__PURE__ */ boolean(),
|
|
1593
|
+
class: /* @__PURE__ */ boolean()
|
|
1594
|
+
});
|
|
1595
|
+
isTypeTrue();
|
|
1596
|
+
const MangleOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1597
|
+
toplevel: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1598
|
+
keepNames: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), MangleOptionsKeepNamesSchema])),
|
|
1599
|
+
debug: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
1600
|
+
});
|
|
1601
|
+
isTypeTrue();
|
|
1602
|
+
const CodegenOptionsSchema = /* @__PURE__ */ strictObject({ removeWhitespace: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()) });
|
|
1603
|
+
isTypeTrue();
|
|
1604
|
+
const MinifyOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1605
|
+
compress: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), CompressOptionsSchema])),
|
|
1606
|
+
mangle: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), MangleOptionsSchema])),
|
|
1607
|
+
codegen: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), CodegenOptionsSchema]))
|
|
1608
|
+
});
|
|
1609
|
+
isTypeTrue();
|
|
1610
|
+
const ResolveOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1611
|
+
alias: /* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ union([
|
|
1612
|
+
/* @__PURE__ */ literal(false),
|
|
1613
|
+
/* @__PURE__ */ string(),
|
|
1614
|
+
/* @__PURE__ */ array(/* @__PURE__ */ string())
|
|
1615
|
+
]))),
|
|
1616
|
+
aliasFields: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ array(/* @__PURE__ */ string()))),
|
|
1617
|
+
conditionNames: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
|
|
1618
|
+
extensionAlias: /* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ array(/* @__PURE__ */ string()))),
|
|
1619
|
+
exportsFields: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ array(/* @__PURE__ */ string()))),
|
|
1620
|
+
extensions: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
|
|
1621
|
+
mainFields: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
|
|
1622
|
+
mainFiles: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
|
|
1623
|
+
modules: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
|
|
1624
|
+
symlinks: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1625
|
+
tsconfigFilename: /* @__PURE__ */ optional(/* @__PURE__ */ string())
|
|
1626
|
+
});
|
|
1627
|
+
isTypeTrue();
|
|
1628
|
+
const TreeshakingOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1629
|
+
moduleSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ any()),
|
|
1630
|
+
annotations: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1631
|
+
manualPureFunctions: /* @__PURE__ */ optional(/* @__PURE__ */ custom((input) => /* @__PURE__ */ is(/* @__PURE__ */ array(/* @__PURE__ */ string()), input), "string array")),
|
|
1632
|
+
unknownGlobalSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1633
|
+
invalidImportSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1634
|
+
commonjs: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1635
|
+
propertyReadSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal(false), /* @__PURE__ */ literal("always")])),
|
|
1636
|
+
propertyWriteSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal(false), /* @__PURE__ */ literal("always")]))
|
|
1637
|
+
});
|
|
1638
|
+
isTypeTrue();
|
|
1639
|
+
const OptimizationOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1640
|
+
inlineConst: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
|
|
1641
|
+
mode: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal("all"), /* @__PURE__ */ literal("smart")])),
|
|
1642
|
+
pass: /* @__PURE__ */ optional(/* @__PURE__ */ number())
|
|
1643
|
+
})])), /* @__PURE__ */ description("Enable crossmodule constant inlining")),
|
|
1644
|
+
pifeForModuleWrappers: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Use PIFE pattern for module wrappers"))
|
|
1645
|
+
});
|
|
1646
|
+
isTypeTrue();
|
|
1647
|
+
const LogOrStringHandlerSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([LogLevelWithErrorSchema, RollupLogWithStringSchema])));
|
|
1648
|
+
isTypeTrue();
|
|
1649
|
+
const OnLogSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([
|
|
1650
|
+
LogLevelSchema,
|
|
1651
|
+
RollupLogSchema,
|
|
1652
|
+
LogOrStringHandlerSchema
|
|
1653
|
+
])));
|
|
1654
|
+
isTypeTrue();
|
|
1655
|
+
const OnwarnSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([RollupLogSchema, /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ union([RollupLogWithStringSchema, /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ returns(RollupLogWithStringSchema))])])))])));
|
|
1656
|
+
isTypeTrue();
|
|
1657
|
+
const DevModeSchema = /* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
|
|
1658
|
+
port: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1659
|
+
host: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
1660
|
+
implement: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
1661
|
+
lazy: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
1662
|
+
})]);
|
|
1663
|
+
isTypeTrue();
|
|
1664
|
+
const InputOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1665
|
+
input: /* @__PURE__ */ optional(InputOptionSchema),
|
|
1666
|
+
plugins: /* @__PURE__ */ optional(/* @__PURE__ */ custom(() => true)),
|
|
1667
|
+
external: /* @__PURE__ */ optional(ExternalOptionSchema),
|
|
1668
|
+
makeAbsoluteExternalsRelative: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ literal("ifRelativeSource")])),
|
|
1669
|
+
resolve: /* @__PURE__ */ optional(ResolveOptionsSchema),
|
|
1670
|
+
cwd: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Current working directory")),
|
|
1671
|
+
platform: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1672
|
+
/* @__PURE__ */ literal("browser"),
|
|
1673
|
+
/* @__PURE__ */ literal("neutral"),
|
|
1674
|
+
/* @__PURE__ */ literal("node")
|
|
1675
|
+
])), /* @__PURE__ */ description(`Platform for which the code should be generated (node, ${styleText$1("underline", "browser")}, neutral)`)),
|
|
1676
|
+
shimMissingExports: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Create shim variables for missing exports")),
|
|
1677
|
+
treeshake: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), TreeshakingOptionsSchema])),
|
|
1678
|
+
optimization: /* @__PURE__ */ optional(OptimizationOptionsSchema),
|
|
1679
|
+
logLevel: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(LogLevelOptionSchema), /* @__PURE__ */ description(`Log level (${styleText$1("dim", "silent")}, ${styleText$1(["underline", "gray"], "info")}, debug, ${styleText$1("yellow", "warn")})`)),
|
|
1680
|
+
onLog: /* @__PURE__ */ optional(OnLogSchema),
|
|
1681
|
+
onwarn: /* @__PURE__ */ optional(OnwarnSchema),
|
|
1682
|
+
moduleTypes: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(ModuleTypesSchema), /* @__PURE__ */ description("Module types for customized extensions")),
|
|
1683
|
+
experimental: /* @__PURE__ */ optional(/* @__PURE__ */ strictObject({
|
|
1684
|
+
viteMode: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1685
|
+
resolveNewUrlToAsset: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1686
|
+
devMode: /* @__PURE__ */ optional(DevModeSchema),
|
|
1687
|
+
chunkModulesOrder: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal("module-id"), /* @__PURE__ */ literal("exec-order")])),
|
|
1688
|
+
attachDebugInfo: /* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1689
|
+
/* @__PURE__ */ literal("none"),
|
|
1690
|
+
/* @__PURE__ */ literal("simple"),
|
|
1691
|
+
/* @__PURE__ */ literal("full")
|
|
1692
|
+
])),
|
|
1693
|
+
chunkImportMap: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ object({
|
|
1694
|
+
baseUrl: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
1695
|
+
fileName: /* @__PURE__ */ optional(/* @__PURE__ */ string())
|
|
1696
|
+
})])),
|
|
1697
|
+
onDemandWrapping: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1698
|
+
incrementalBuild: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1699
|
+
nativeMagicString: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1700
|
+
chunkOptimization: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1701
|
+
lazyBarrel: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
1702
|
+
})),
|
|
1703
|
+
transform: /* @__PURE__ */ optional(TransformOptionsSchema),
|
|
1704
|
+
watch: /* @__PURE__ */ optional(/* @__PURE__ */ union([WatcherOptionsSchema, /* @__PURE__ */ literal(false)])),
|
|
1705
|
+
checks: /* @__PURE__ */ optional(ChecksOptionsSchema),
|
|
1706
|
+
devtools: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ object({ sessionId: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Used to name the build.")) })), /* @__PURE__ */ description("Enable debug mode. Emit debug information to disk. This might slow down the build process significantly.")),
|
|
1707
|
+
preserveEntrySignatures: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1708
|
+
/* @__PURE__ */ literal("strict"),
|
|
1709
|
+
/* @__PURE__ */ literal("allow-extension"),
|
|
1710
|
+
/* @__PURE__ */ literal("exports-only"),
|
|
1711
|
+
/* @__PURE__ */ literal(false)
|
|
1712
|
+
]))),
|
|
1713
|
+
context: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("The value of `this` at the top level of each module.")),
|
|
1714
|
+
tsconfig: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ string()])), /* @__PURE__ */ description("Path to the tsconfig.json file."))
|
|
1715
|
+
});
|
|
1716
|
+
isTypeTrue();
|
|
1717
|
+
const InputCliOverrideSchema = /* @__PURE__ */ strictObject({
|
|
1718
|
+
input: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())), /* @__PURE__ */ description("Entry file")),
|
|
1719
|
+
external: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())), /* @__PURE__ */ description("Comma-separated list of module ids to exclude from the bundle `<module-id>,...`")),
|
|
1720
|
+
treeshake: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("enable treeshaking")),
|
|
1721
|
+
makeAbsoluteExternalsRelative: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Prevent normalization of external imports")),
|
|
1722
|
+
preserveEntrySignatures: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ literal(false)), /* @__PURE__ */ description("Avoid facade chunks for entry points")),
|
|
1723
|
+
context: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("The entity top-level `this` represents."))
|
|
1724
|
+
});
|
|
1725
|
+
const InputCliOptionsSchema = /* @__PURE__ */ omit(/* @__PURE__ */ strictObject({
|
|
1726
|
+
...InputOptionsSchema.entries,
|
|
1727
|
+
...InputCliOverrideSchema.entries
|
|
1728
|
+
}), [
|
|
1729
|
+
"plugins",
|
|
1730
|
+
"onwarn",
|
|
1731
|
+
"onLog",
|
|
1732
|
+
"resolve",
|
|
1733
|
+
"experimental",
|
|
1734
|
+
"watch"
|
|
1735
|
+
]);
|
|
1736
|
+
const ModuleFormatSchema = /* @__PURE__ */ union([
|
|
1737
|
+
/* @__PURE__ */ literal("es"),
|
|
1738
|
+
/* @__PURE__ */ literal("cjs"),
|
|
1739
|
+
/* @__PURE__ */ literal("esm"),
|
|
1740
|
+
/* @__PURE__ */ literal("module"),
|
|
1741
|
+
/* @__PURE__ */ literal("commonjs"),
|
|
1742
|
+
/* @__PURE__ */ literal("iife"),
|
|
1743
|
+
/* @__PURE__ */ literal("umd")
|
|
1744
|
+
]);
|
|
1745
|
+
isTypeTrue();
|
|
1746
|
+
const AddonFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ custom(() => true)])), /* @__PURE__ */ returnsAsync(/* @__PURE__ */ unionAsync([/* @__PURE__ */ string(), /* @__PURE__ */ pipeAsync(/* @__PURE__ */ promise(), /* @__PURE__ */ awaitAsync(), /* @__PURE__ */ string())])));
|
|
1747
|
+
isTypeTrue();
|
|
1748
|
+
const ChunkFileNamesFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ custom(() => true)])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));
|
|
1749
|
+
isTypeTrue();
|
|
1750
|
+
const ChunkFileNamesSchema = /* @__PURE__ */ union([/* @__PURE__ */ string(), ChunkFileNamesFunctionSchema]);
|
|
1751
|
+
const AssetFileNamesFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ custom(() => true)])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));
|
|
1752
|
+
isTypeTrue();
|
|
1753
|
+
const AssetFileNamesSchema = /* @__PURE__ */ union([/* @__PURE__ */ string(), AssetFileNamesFunctionSchema]);
|
|
1754
|
+
const SanitizeFileNameFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string()])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));
|
|
1755
|
+
isTypeTrue();
|
|
1756
|
+
const SanitizeFileNameSchema = /* @__PURE__ */ union([/* @__PURE__ */ boolean(), SanitizeFileNameFunctionSchema]);
|
|
1757
|
+
const GlobalsFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string()])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));
|
|
1758
|
+
isTypeTrue();
|
|
1759
|
+
const PathsFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string()])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));
|
|
1760
|
+
isTypeTrue();
|
|
1761
|
+
const ManualChunksFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string(), /* @__PURE__ */ object({})])), /* @__PURE__ */ returns(/* @__PURE__ */ nullish(/* @__PURE__ */ string())));
|
|
1762
|
+
isTypeTrue();
|
|
1763
|
+
const AdvancedChunksNameFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string(), /* @__PURE__ */ object({})])), /* @__PURE__ */ returns(/* @__PURE__ */ nullish(/* @__PURE__ */ string())));
|
|
1764
|
+
isTypeTrue();
|
|
1765
|
+
const AdvancedChunksTestFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string()])), /* @__PURE__ */ returns(/* @__PURE__ */ union([
|
|
1766
|
+
/* @__PURE__ */ boolean(),
|
|
1767
|
+
/* @__PURE__ */ void_(),
|
|
1768
|
+
/* @__PURE__ */ undefined_()
|
|
1769
|
+
])));
|
|
1770
|
+
isTypeTrue();
|
|
1771
|
+
const AdvancedChunksSchema = /* @__PURE__ */ strictObject({
|
|
1772
|
+
includeDependenciesRecursively: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1773
|
+
minSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1774
|
+
maxSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1775
|
+
minModuleSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1776
|
+
maxModuleSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1777
|
+
minShareCount: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1778
|
+
groups: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ strictObject({
|
|
1779
|
+
name: /* @__PURE__ */ union([/* @__PURE__ */ string(), AdvancedChunksNameFunctionSchema]),
|
|
1780
|
+
test: /* @__PURE__ */ optional(/* @__PURE__ */ union([StringOrRegExpSchema, AdvancedChunksTestFunctionSchema])),
|
|
1781
|
+
priority: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1782
|
+
minSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1783
|
+
minShareCount: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1784
|
+
maxSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1785
|
+
minModuleSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1786
|
+
maxModuleSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
|
|
1787
|
+
entriesAware: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1788
|
+
entriesAwareMergeThreshold: /* @__PURE__ */ optional(/* @__PURE__ */ number())
|
|
1789
|
+
})))
|
|
1790
|
+
});
|
|
1791
|
+
isTypeTrue();
|
|
1792
|
+
const GeneratedCodePresetSchema = /* @__PURE__ */ union([/* @__PURE__ */ literal("es5"), /* @__PURE__ */ literal("es2015")]);
|
|
1793
|
+
isTypeTrue();
|
|
1794
|
+
const GeneratedCodeOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1795
|
+
symbols: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to use Symbol.toStringTag for namespace objects")),
|
|
1796
|
+
preset: /* @__PURE__ */ optional(GeneratedCodePresetSchema),
|
|
1797
|
+
profilerNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to add readable names to internal variables for profiling purposes"))
|
|
1798
|
+
});
|
|
1799
|
+
isTypeTrue();
|
|
1800
|
+
const OutputOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1801
|
+
dir: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Output directory, defaults to `dist` if `file` is not set")),
|
|
1802
|
+
file: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Single output file")),
|
|
1803
|
+
exports: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1804
|
+
/* @__PURE__ */ literal("auto"),
|
|
1805
|
+
/* @__PURE__ */ literal("named"),
|
|
1806
|
+
/* @__PURE__ */ literal("default"),
|
|
1807
|
+
/* @__PURE__ */ literal("none")
|
|
1808
|
+
])), /* @__PURE__ */ description(`Specify a export mode (${styleText$1("underline", "auto")}, named, default, none)`)),
|
|
1809
|
+
hashCharacters: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1810
|
+
/* @__PURE__ */ literal("base64"),
|
|
1811
|
+
/* @__PURE__ */ literal("base36"),
|
|
1812
|
+
/* @__PURE__ */ literal("hex")
|
|
1813
|
+
])), /* @__PURE__ */ description("Use the specified character set for file hashes")),
|
|
1814
|
+
format: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(ModuleFormatSchema), /* @__PURE__ */ description(`Output format of the generated bundle (supports ${styleText$1("underline", "esm")}, cjs, and iife)`)),
|
|
1815
|
+
sourcemap: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1816
|
+
/* @__PURE__ */ boolean(),
|
|
1817
|
+
/* @__PURE__ */ literal("inline"),
|
|
1818
|
+
/* @__PURE__ */ literal("hidden")
|
|
1819
|
+
])), /* @__PURE__ */ description(`Generate sourcemap (\`-s inline\` for inline, or \`-s\` for \`.map\` file)`)),
|
|
1820
|
+
sourcemapBaseUrl: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Base URL used to prefix sourcemap paths")),
|
|
1821
|
+
sourcemapDebugIds: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Inject sourcemap debug IDs")),
|
|
1822
|
+
sourcemapExcludeSources: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Exclude source content from sourcemaps")),
|
|
1823
|
+
sourcemapIgnoreList: /* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1824
|
+
/* @__PURE__ */ boolean(),
|
|
1825
|
+
/* @__PURE__ */ custom(() => true),
|
|
1826
|
+
StringOrRegExpSchema
|
|
1827
|
+
])),
|
|
1828
|
+
sourcemapPathTransform: /* @__PURE__ */ optional(/* @__PURE__ */ custom(() => true)),
|
|
1829
|
+
banner: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),
|
|
1830
|
+
footer: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),
|
|
1831
|
+
postBanner: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),
|
|
1832
|
+
postFooter: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),
|
|
1833
|
+
intro: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),
|
|
1834
|
+
outro: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),
|
|
1835
|
+
extend: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Extend global variable defined by name in IIFE / UMD formats")),
|
|
1836
|
+
esModule: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ literal("if-default-prop")])),
|
|
1837
|
+
assetFileNames: /* @__PURE__ */ optional(AssetFileNamesSchema),
|
|
1838
|
+
entryFileNames: /* @__PURE__ */ optional(ChunkFileNamesSchema),
|
|
1839
|
+
chunkFileNames: /* @__PURE__ */ optional(ChunkFileNamesSchema),
|
|
1840
|
+
sanitizeFileName: /* @__PURE__ */ optional(SanitizeFileNameSchema),
|
|
1841
|
+
minify: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1842
|
+
/* @__PURE__ */ boolean(),
|
|
1843
|
+
/* @__PURE__ */ literal("dce-only"),
|
|
1844
|
+
MinifyOptionsSchema
|
|
1845
|
+
])), /* @__PURE__ */ description("Minify the bundled file")),
|
|
1846
|
+
name: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Name for UMD / IIFE format outputs")),
|
|
1847
|
+
globals: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ string()), GlobalsFunctionSchema])), /* @__PURE__ */ description("Global variable of UMD / IIFE dependencies (syntax: `key:value`)")),
|
|
1848
|
+
paths: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ string()), PathsFunctionSchema])), /* @__PURE__ */ description("Maps external module IDs to paths")),
|
|
1849
|
+
generatedCode: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ partial(GeneratedCodeOptionsSchema)), /* @__PURE__ */ description("Generated code options")),
|
|
1850
|
+
externalLiveBindings: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("external live bindings")),
|
|
1851
|
+
inlineDynamicImports: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Inline dynamic imports")),
|
|
1852
|
+
dynamicImportInCjs: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Dynamic import in CJS output")),
|
|
1853
|
+
manualChunks: /* @__PURE__ */ optional(ManualChunksFunctionSchema),
|
|
1854
|
+
codeSplitting: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), AdvancedChunksSchema])),
|
|
1855
|
+
advancedChunks: /* @__PURE__ */ optional(AdvancedChunksSchema),
|
|
1856
|
+
legalComments: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal("none"), /* @__PURE__ */ literal("inline")])), /* @__PURE__ */ description("Control legal comments in the output")),
|
|
1857
|
+
comments: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
|
|
1858
|
+
legal: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1859
|
+
annotation: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1860
|
+
jsdoc: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
1861
|
+
})])), /* @__PURE__ */ description("Control comments in the output")),
|
|
1862
|
+
plugins: /* @__PURE__ */ optional(/* @__PURE__ */ custom(() => true)),
|
|
1863
|
+
polyfillRequire: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Disable require polyfill injection")),
|
|
1864
|
+
hoistTransitiveImports: /* @__PURE__ */ optional(/* @__PURE__ */ literal(false)),
|
|
1865
|
+
preserveModules: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Preserve module structure")),
|
|
1866
|
+
preserveModulesRoot: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Put preserved modules under this path at root level")),
|
|
1867
|
+
virtualDirname: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
1868
|
+
minifyInternalExports: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Minify internal exports")),
|
|
1869
|
+
topLevelVar: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Rewrite top-level declarations to use `var`.")),
|
|
1870
|
+
cleanDir: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Clean output directory before emitting output")),
|
|
1871
|
+
keepNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Keep function and class names after bundling")),
|
|
1872
|
+
strictExecutionOrder: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Lets modules be executed in the order they are declared.")),
|
|
1873
|
+
strict: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ literal("auto")])), /* @__PURE__ */ description("Whether to always output `\"use strict\"` directive in non-ES module outputs."))
|
|
1874
|
+
});
|
|
1875
|
+
isTypeTrue();
|
|
1876
|
+
const getAddonDescription = (placement, wrapper) => {
|
|
1877
|
+
return `Code to insert the ${styleText$1("bold", placement)} of the bundled file (${styleText$1("bold", wrapper)} the wrapper function)`;
|
|
1878
|
+
};
|
|
1879
|
+
const OutputCliOverrideSchema = /* @__PURE__ */ strictObject({
|
|
1880
|
+
assetFileNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Name pattern for asset files")),
|
|
1881
|
+
entryFileNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Name pattern for emitted entry chunks")),
|
|
1882
|
+
chunkFileNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Name pattern for emitted secondary chunks")),
|
|
1883
|
+
sanitizeFileName: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Sanitize file name")),
|
|
1884
|
+
banner: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(getAddonDescription("top", "outside"))),
|
|
1885
|
+
footer: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(getAddonDescription("bottom", "outside"))),
|
|
1886
|
+
postBanner: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("A string to prepend to the top of each chunk. Applied after the `renderChunk` hook and minification")),
|
|
1887
|
+
postFooter: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("A string to append to the bottom of each chunk. Applied after the `renderChunk` hook and minification")),
|
|
1888
|
+
intro: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(getAddonDescription("top", "inside"))),
|
|
1889
|
+
outro: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(getAddonDescription("bottom", "inside"))),
|
|
1890
|
+
esModule: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Always generate `__esModule` marks in non-ESM formats, defaults to `if-default-prop` (use `--no-esModule` to always disable)")),
|
|
1891
|
+
globals: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ string())), /* @__PURE__ */ description("Global variable of UMD / IIFE dependencies (syntax: `key:value`)")),
|
|
1892
|
+
codeSplitting: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
|
|
1893
|
+
minSize: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Minimum size of the chunk")),
|
|
1894
|
+
minShareCount: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Minimum share count of the chunk"))
|
|
1895
|
+
})])), /* @__PURE__ */ description("Code splitting options (true, false, or object)")),
|
|
1896
|
+
advancedChunks: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ strictObject({
|
|
1897
|
+
minSize: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Minimum size of the chunk")),
|
|
1898
|
+
minShareCount: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Minimum share count of the chunk"))
|
|
1899
|
+
})), /* @__PURE__ */ description("Deprecated: use codeSplitting instead")),
|
|
1900
|
+
minify: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Minify the bundled file"))
|
|
1901
|
+
});
|
|
1902
|
+
const OutputCliOptionsSchema = /* @__PURE__ */ omit(/* @__PURE__ */ strictObject({
|
|
1903
|
+
...OutputOptionsSchema.entries,
|
|
1904
|
+
...OutputCliOverrideSchema.entries
|
|
1905
|
+
}), [
|
|
1906
|
+
"sourcemapIgnoreList",
|
|
1907
|
+
"sourcemapPathTransform",
|
|
1908
|
+
"plugins",
|
|
1909
|
+
"hoistTransitiveImports"
|
|
1910
|
+
]);
|
|
1911
|
+
const CliOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1912
|
+
config: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ boolean()])), /* @__PURE__ */ description("Path to the config file (default: `rolldown.config.js`)")),
|
|
1913
|
+
help: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Show help")),
|
|
1914
|
+
environment: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ array(/* @__PURE__ */ string())])), /* @__PURE__ */ description("Pass additional settings to the config file via process.ENV.")),
|
|
1915
|
+
version: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Show version number")),
|
|
1916
|
+
watch: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Watch files in bundle and rebuild on changes")),
|
|
1917
|
+
...InputCliOptionsSchema.entries,
|
|
1918
|
+
...OutputCliOptionsSchema.entries
|
|
1919
|
+
});
|
|
1920
|
+
function validateCliOptions(options) {
|
|
1921
|
+
let parsed = /* @__PURE__ */ safeParse(CliOptionsSchema, options);
|
|
1922
|
+
return [parsed.output, parsed.issues?.map((issue) => {
|
|
1923
|
+
return `Invalid value for option ${issue.path?.map((pathItem) => pathItem.key).join(" ")}: ${issue.message}`;
|
|
1924
|
+
})];
|
|
1925
|
+
}
|
|
1926
|
+
const inputHelperMsgRecord = {
|
|
1927
|
+
output: { ignored: true },
|
|
1928
|
+
"resolve.tsconfigFilename": { issueMsg: "It is deprecated. Please use the top-level `tsconfig` option instead." }
|
|
1929
|
+
};
|
|
1930
|
+
const outputHelperMsgRecord = {};
|
|
1931
|
+
function validateOption(key, options) {
|
|
1932
|
+
if (typeof options !== "object") throw new Error(`Invalid ${key} options. Expected an Object but received ${JSON.stringify(options)}.`);
|
|
1933
|
+
if (globalThis.process?.env?.ROLLUP_TEST) return;
|
|
1934
|
+
let parsed = /* @__PURE__ */ safeParse(key === "input" ? InputOptionsSchema : OutputOptionsSchema, options);
|
|
1935
|
+
if (!parsed.success) {
|
|
1936
|
+
const errors = parsed.issues.map((issue) => {
|
|
1937
|
+
let issueMsg = issue.message;
|
|
1938
|
+
const issuePaths = issue.path.map((path) => path.key);
|
|
1939
|
+
if (issue.type === "union") {
|
|
1940
|
+
const subIssue = issue.issues?.find((i) => !(i.type !== issue.received && i.input === issue.input));
|
|
1941
|
+
if (subIssue) {
|
|
1942
|
+
if (subIssue.path) issuePaths.push(subIssue.path.map((path) => path.key));
|
|
1943
|
+
issueMsg = subIssue.message;
|
|
1944
|
+
}
|
|
1945
|
+
}
|
|
1946
|
+
const stringPath = issuePaths.join(".");
|
|
1947
|
+
const helper = key === "input" ? inputHelperMsgRecord[stringPath] : outputHelperMsgRecord[stringPath];
|
|
1948
|
+
if (helper && helper.ignored) return "";
|
|
1949
|
+
return `- For the "${stringPath}". ${helper?.issueMsg || issueMsg + "."} ${helper?.help ? `\n Help: ${helper.help}` : ""}`;
|
|
1950
|
+
}).filter(Boolean);
|
|
1951
|
+
if (errors.length) console.warn(`\x1b[33mWarning: Invalid ${key} options (${errors.length} issue${errors.length === 1 ? "" : "s"} found)\n${errors.join("\n")}\x1b[0m`);
|
|
1952
|
+
}
|
|
1953
|
+
}
|
|
1954
|
+
function getInputCliKeys() {
|
|
1955
|
+
return (/* @__PURE__ */ keyof(InputCliOptionsSchema)).options;
|
|
1956
|
+
}
|
|
1957
|
+
function getOutputCliKeys() {
|
|
1958
|
+
return (/* @__PURE__ */ keyof(OutputCliOptionsSchema)).options;
|
|
1959
|
+
}
|
|
1960
|
+
function getCliSchemaInfo() {
|
|
1961
|
+
return flattenValibotSchema(CliOptionsSchema);
|
|
1962
|
+
}
|
|
1963
|
+
//#endregion
|
|
1964
|
+
//#region src/types/rolldown-output-impl.ts
|
|
1965
|
+
var RolldownOutputImpl = class extends PlainObjectLike {
|
|
1966
|
+
constructor(bindingOutputs) {
|
|
1967
|
+
super();
|
|
1968
|
+
this.bindingOutputs = bindingOutputs;
|
|
1969
|
+
}
|
|
1970
|
+
get output() {
|
|
1971
|
+
return transformToRollupOutput(this.bindingOutputs).output;
|
|
1972
|
+
}
|
|
1973
|
+
__rolldown_external_memory_handle__(keepDataAlive) {
|
|
1974
|
+
const results = this.output.map((item) => item.__rolldown_external_memory_handle__(keepDataAlive));
|
|
1975
|
+
if (!results.every((r) => r.freed)) {
|
|
1976
|
+
const reasons = results.filter((r) => !r.freed).map((r) => r.reason).filter(Boolean);
|
|
1977
|
+
return {
|
|
1978
|
+
freed: false,
|
|
1979
|
+
reason: `Failed to free ${reasons.length} item(s): ${reasons.join("; ")}`
|
|
1980
|
+
};
|
|
1981
|
+
}
|
|
1982
|
+
return { freed: true };
|
|
1983
|
+
}
|
|
1984
|
+
};
|
|
1985
|
+
__decorate([lazyProp], RolldownOutputImpl.prototype, "output", null);
|
|
1986
|
+
//#endregion
|
|
1987
|
+
//#region src/types/chunking-context.ts
|
|
1988
|
+
var ChunkingContextImpl = class {
|
|
1989
|
+
constructor(context) {
|
|
1990
|
+
this.context = context;
|
|
1991
|
+
}
|
|
1992
|
+
getModuleInfo(moduleId) {
|
|
1993
|
+
const bindingInfo = this.context.getModuleInfo(moduleId);
|
|
1994
|
+
if (bindingInfo) return transformModuleInfo(bindingInfo, {
|
|
1995
|
+
moduleSideEffects: null,
|
|
1996
|
+
meta: {}
|
|
1997
|
+
});
|
|
1998
|
+
return null;
|
|
1999
|
+
}
|
|
2000
|
+
};
|
|
2001
|
+
//#endregion
|
|
2002
|
+
//#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/core.mjs
|
|
2003
|
+
const LogLevels = {
|
|
2004
|
+
silent: Number.NEGATIVE_INFINITY,
|
|
2005
|
+
fatal: 0,
|
|
2006
|
+
error: 0,
|
|
2007
|
+
warn: 1,
|
|
2008
|
+
log: 2,
|
|
2009
|
+
info: 3,
|
|
2010
|
+
success: 3,
|
|
2011
|
+
fail: 3,
|
|
2012
|
+
ready: 3,
|
|
2013
|
+
start: 3,
|
|
2014
|
+
box: 3,
|
|
2015
|
+
debug: 4,
|
|
2016
|
+
trace: 5,
|
|
2017
|
+
verbose: Number.POSITIVE_INFINITY
|
|
2018
|
+
};
|
|
2019
|
+
const LogTypes = {
|
|
2020
|
+
silent: { level: -1 },
|
|
2021
|
+
fatal: { level: LogLevels.fatal },
|
|
2022
|
+
error: { level: LogLevels.error },
|
|
2023
|
+
warn: { level: LogLevels.warn },
|
|
2024
|
+
log: { level: LogLevels.log },
|
|
2025
|
+
info: { level: LogLevels.info },
|
|
2026
|
+
success: { level: LogLevels.success },
|
|
2027
|
+
fail: { level: LogLevels.fail },
|
|
2028
|
+
ready: { level: LogLevels.info },
|
|
2029
|
+
start: { level: LogLevels.info },
|
|
2030
|
+
box: { level: LogLevels.info },
|
|
2031
|
+
debug: { level: LogLevels.debug },
|
|
2032
|
+
trace: { level: LogLevels.trace },
|
|
2033
|
+
verbose: { level: LogLevels.verbose }
|
|
2034
|
+
};
|
|
2035
|
+
function isPlainObject$1(value) {
|
|
2036
|
+
if (value === null || typeof value !== "object") return false;
|
|
2037
|
+
const prototype = Object.getPrototypeOf(value);
|
|
2038
|
+
if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) return false;
|
|
2039
|
+
if (Symbol.iterator in value) return false;
|
|
2040
|
+
if (Symbol.toStringTag in value) return Object.prototype.toString.call(value) === "[object Module]";
|
|
2041
|
+
return true;
|
|
2042
|
+
}
|
|
2043
|
+
function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
2044
|
+
if (!isPlainObject$1(defaults)) return _defu(baseObject, {}, namespace, merger);
|
|
2045
|
+
const object = Object.assign({}, defaults);
|
|
2046
|
+
for (const key in baseObject) {
|
|
2047
|
+
if (key === "__proto__" || key === "constructor") continue;
|
|
2048
|
+
const value = baseObject[key];
|
|
2049
|
+
if (value === null || value === void 0) continue;
|
|
2050
|
+
if (merger && merger(object, key, value, namespace)) continue;
|
|
2051
|
+
if (Array.isArray(value) && Array.isArray(object[key])) object[key] = [...value, ...object[key]];
|
|
2052
|
+
else if (isPlainObject$1(value) && isPlainObject$1(object[key])) object[key] = _defu(value, object[key], (namespace ? `${namespace}.` : "") + key.toString(), merger);
|
|
2053
|
+
else object[key] = value;
|
|
2054
|
+
}
|
|
2055
|
+
return object;
|
|
2056
|
+
}
|
|
2057
|
+
function createDefu(merger) {
|
|
2058
|
+
return (...arguments_) => arguments_.reduce((p, c) => _defu(p, c, "", merger), {});
|
|
2059
|
+
}
|
|
2060
|
+
const defu = createDefu();
|
|
2061
|
+
function isPlainObject(obj) {
|
|
2062
|
+
return Object.prototype.toString.call(obj) === "[object Object]";
|
|
2063
|
+
}
|
|
2064
|
+
function isLogObj(arg) {
|
|
2065
|
+
if (!isPlainObject(arg)) return false;
|
|
2066
|
+
if (!arg.message && !arg.args) return false;
|
|
2067
|
+
if (arg.stack) return false;
|
|
2068
|
+
return true;
|
|
2069
|
+
}
|
|
2070
|
+
let paused = false;
|
|
2071
|
+
const queue = [];
|
|
2072
|
+
var Consola = class Consola {
|
|
2073
|
+
options;
|
|
2074
|
+
_lastLog;
|
|
2075
|
+
_mockFn;
|
|
2076
|
+
/**
|
|
2077
|
+
* Creates an instance of Consola with specified options or defaults.
|
|
2078
|
+
*
|
|
2079
|
+
* @param {Partial<ConsolaOptions>} [options={}] - Configuration options for the Consola instance.
|
|
2080
|
+
*/
|
|
2081
|
+
constructor(options = {}) {
|
|
2082
|
+
const types = options.types || LogTypes;
|
|
2083
|
+
this.options = defu({
|
|
2084
|
+
...options,
|
|
2085
|
+
defaults: { ...options.defaults },
|
|
2086
|
+
level: _normalizeLogLevel(options.level, types),
|
|
2087
|
+
reporters: [...options.reporters || []]
|
|
2088
|
+
}, {
|
|
2089
|
+
types: LogTypes,
|
|
2090
|
+
throttle: 1e3,
|
|
2091
|
+
throttleMin: 5,
|
|
2092
|
+
formatOptions: {
|
|
2093
|
+
date: true,
|
|
2094
|
+
colors: false,
|
|
2095
|
+
compact: true
|
|
2096
|
+
}
|
|
2097
|
+
});
|
|
2098
|
+
for (const type in types) {
|
|
2099
|
+
const defaults = {
|
|
2100
|
+
type,
|
|
2101
|
+
...this.options.defaults,
|
|
2102
|
+
...types[type]
|
|
2103
|
+
};
|
|
2104
|
+
this[type] = this._wrapLogFn(defaults);
|
|
2105
|
+
this[type].raw = this._wrapLogFn(defaults, true);
|
|
2106
|
+
}
|
|
2107
|
+
if (this.options.mockFn) this.mockTypes();
|
|
2108
|
+
this._lastLog = {};
|
|
2109
|
+
}
|
|
2110
|
+
/**
|
|
2111
|
+
* Gets the current log level of the Consola instance.
|
|
2112
|
+
*
|
|
2113
|
+
* @returns {number} The current log level.
|
|
2114
|
+
*/
|
|
2115
|
+
get level() {
|
|
2116
|
+
return this.options.level;
|
|
2117
|
+
}
|
|
2118
|
+
/**
|
|
2119
|
+
* Sets the minimum log level that will be output by the instance.
|
|
2120
|
+
*
|
|
2121
|
+
* @param {number} level - The new log level to set.
|
|
2122
|
+
*/
|
|
2123
|
+
set level(level) {
|
|
2124
|
+
this.options.level = _normalizeLogLevel(level, this.options.types, this.options.level);
|
|
2125
|
+
}
|
|
2126
|
+
/**
|
|
2127
|
+
* Displays a prompt to the user and returns the response.
|
|
2128
|
+
* Throw an error if `prompt` is not supported by the current configuration.
|
|
2129
|
+
*
|
|
2130
|
+
* @template T
|
|
2131
|
+
* @param {string} message - The message to display in the prompt.
|
|
2132
|
+
* @param {T} [opts] - Optional options for the prompt. See {@link PromptOptions}.
|
|
2133
|
+
* @returns {promise<T>} A promise that infer with the prompt options. See {@link PromptOptions}.
|
|
2134
|
+
*/
|
|
2135
|
+
prompt(message, opts) {
|
|
2136
|
+
if (!this.options.prompt) throw new Error("prompt is not supported!");
|
|
2137
|
+
return this.options.prompt(message, opts);
|
|
2138
|
+
}
|
|
2139
|
+
/**
|
|
2140
|
+
* Creates a new instance of Consola, inheriting options from the current instance, with possible overrides.
|
|
2141
|
+
*
|
|
2142
|
+
* @param {Partial<ConsolaOptions>} options - Optional overrides for the new instance. See {@link ConsolaOptions}.
|
|
2143
|
+
* @returns {ConsolaInstance} A new Consola instance. See {@link ConsolaInstance}.
|
|
2144
|
+
*/
|
|
2145
|
+
create(options) {
|
|
2146
|
+
const instance = new Consola({
|
|
2147
|
+
...this.options,
|
|
2148
|
+
...options
|
|
2149
|
+
});
|
|
2150
|
+
if (this._mockFn) instance.mockTypes(this._mockFn);
|
|
2151
|
+
return instance;
|
|
2152
|
+
}
|
|
2153
|
+
/**
|
|
2154
|
+
* Creates a new Consola instance with the specified default log object properties.
|
|
2155
|
+
*
|
|
2156
|
+
* @param {InputLogObject} defaults - Default properties to include in any log from the new instance. See {@link InputLogObject}.
|
|
2157
|
+
* @returns {ConsolaInstance} A new Consola instance. See {@link ConsolaInstance}.
|
|
2158
|
+
*/
|
|
2159
|
+
withDefaults(defaults) {
|
|
2160
|
+
return this.create({
|
|
2161
|
+
...this.options,
|
|
2162
|
+
defaults: {
|
|
2163
|
+
...this.options.defaults,
|
|
2164
|
+
...defaults
|
|
2165
|
+
}
|
|
2166
|
+
});
|
|
2167
|
+
}
|
|
2168
|
+
/**
|
|
2169
|
+
* Creates a new Consola instance with a specified tag, which will be included in every log.
|
|
2170
|
+
*
|
|
2171
|
+
* @param {string} tag - The tag to include in each log of the new instance.
|
|
2172
|
+
* @returns {ConsolaInstance} A new Consola instance. See {@link ConsolaInstance}.
|
|
2173
|
+
*/
|
|
2174
|
+
withTag(tag) {
|
|
2175
|
+
return this.withDefaults({ tag: this.options.defaults.tag ? this.options.defaults.tag + ":" + tag : tag });
|
|
2176
|
+
}
|
|
2177
|
+
/**
|
|
2178
|
+
* Adds a custom reporter to the Consola instance.
|
|
2179
|
+
* Reporters will be called for each log message, depending on their implementation and log level.
|
|
2180
|
+
*
|
|
2181
|
+
* @param {ConsolaReporter} reporter - The reporter to add. See {@link ConsolaReporter}.
|
|
2182
|
+
* @returns {Consola} The current Consola instance.
|
|
2183
|
+
*/
|
|
2184
|
+
addReporter(reporter) {
|
|
2185
|
+
this.options.reporters.push(reporter);
|
|
2186
|
+
return this;
|
|
2187
|
+
}
|
|
2188
|
+
/**
|
|
2189
|
+
* Removes a custom reporter from the Consola instance.
|
|
2190
|
+
* If no reporter is specified, all reporters will be removed.
|
|
2191
|
+
*
|
|
2192
|
+
* @param {ConsolaReporter} reporter - The reporter to remove. See {@link ConsolaReporter}.
|
|
2193
|
+
* @returns {Consola} The current Consola instance.
|
|
2194
|
+
*/
|
|
2195
|
+
removeReporter(reporter) {
|
|
2196
|
+
if (reporter) {
|
|
2197
|
+
const i = this.options.reporters.indexOf(reporter);
|
|
2198
|
+
if (i !== -1) return this.options.reporters.splice(i, 1);
|
|
2199
|
+
} else this.options.reporters.splice(0);
|
|
2200
|
+
return this;
|
|
2201
|
+
}
|
|
2202
|
+
/**
|
|
2203
|
+
* Replaces all reporters of the Consola instance with the specified array of reporters.
|
|
2204
|
+
*
|
|
2205
|
+
* @param {ConsolaReporter[]} reporters - The new reporters to set. See {@link ConsolaReporter}.
|
|
2206
|
+
* @returns {Consola} The current Consola instance.
|
|
2207
|
+
*/
|
|
2208
|
+
setReporters(reporters) {
|
|
2209
|
+
this.options.reporters = Array.isArray(reporters) ? reporters : [reporters];
|
|
2210
|
+
return this;
|
|
2211
|
+
}
|
|
2212
|
+
wrapAll() {
|
|
2213
|
+
this.wrapConsole();
|
|
2214
|
+
this.wrapStd();
|
|
2215
|
+
}
|
|
2216
|
+
restoreAll() {
|
|
2217
|
+
this.restoreConsole();
|
|
2218
|
+
this.restoreStd();
|
|
2219
|
+
}
|
|
2220
|
+
/**
|
|
2221
|
+
* Overrides console methods with Consola logging methods for consistent logging.
|
|
2222
|
+
*/
|
|
2223
|
+
wrapConsole() {
|
|
2224
|
+
for (const type in this.options.types) {
|
|
2225
|
+
if (!console["__" + type]) console["__" + type] = console[type];
|
|
2226
|
+
console[type] = this[type].raw;
|
|
2227
|
+
}
|
|
2228
|
+
}
|
|
2229
|
+
/**
|
|
2230
|
+
* Restores the original console methods, removing Consola overrides.
|
|
2231
|
+
*/
|
|
2232
|
+
restoreConsole() {
|
|
2233
|
+
for (const type in this.options.types) if (console["__" + type]) {
|
|
2234
|
+
console[type] = console["__" + type];
|
|
2235
|
+
delete console["__" + type];
|
|
2236
|
+
}
|
|
2237
|
+
}
|
|
2238
|
+
/**
|
|
2239
|
+
* Overrides standard output and error streams to redirect them through Consola.
|
|
2240
|
+
*/
|
|
2241
|
+
wrapStd() {
|
|
2242
|
+
this._wrapStream(this.options.stdout, "log");
|
|
2243
|
+
this._wrapStream(this.options.stderr, "log");
|
|
2244
|
+
}
|
|
2245
|
+
_wrapStream(stream, type) {
|
|
2246
|
+
if (!stream) return;
|
|
2247
|
+
if (!stream.__write) stream.__write = stream.write;
|
|
2248
|
+
stream.write = (data) => {
|
|
2249
|
+
this[type].raw(String(data).trim());
|
|
2250
|
+
};
|
|
2251
|
+
}
|
|
2252
|
+
/**
|
|
2253
|
+
* Restores the original standard output and error streams, removing the Consola redirection.
|
|
2254
|
+
*/
|
|
2255
|
+
restoreStd() {
|
|
2256
|
+
this._restoreStream(this.options.stdout);
|
|
2257
|
+
this._restoreStream(this.options.stderr);
|
|
2258
|
+
}
|
|
2259
|
+
_restoreStream(stream) {
|
|
2260
|
+
if (!stream) return;
|
|
2261
|
+
if (stream.__write) {
|
|
2262
|
+
stream.write = stream.__write;
|
|
2263
|
+
delete stream.__write;
|
|
2264
|
+
}
|
|
2265
|
+
}
|
|
2266
|
+
/**
|
|
2267
|
+
* Pauses logging, queues incoming logs until resumed.
|
|
2268
|
+
*/
|
|
2269
|
+
pauseLogs() {
|
|
2270
|
+
paused = true;
|
|
2271
|
+
}
|
|
2272
|
+
/**
|
|
2273
|
+
* Resumes logging, processing any queued logs.
|
|
2274
|
+
*/
|
|
2275
|
+
resumeLogs() {
|
|
2276
|
+
paused = false;
|
|
2277
|
+
const _queue = queue.splice(0);
|
|
2278
|
+
for (const item of _queue) item[0]._logFn(item[1], item[2]);
|
|
2279
|
+
}
|
|
2280
|
+
/**
|
|
2281
|
+
* Replaces logging methods with mocks if a mock function is provided.
|
|
2282
|
+
*
|
|
2283
|
+
* @param {ConsolaOptions["mockFn"]} mockFn - The function to use for mocking logging methods. See {@link ConsolaOptions["mockFn"]}.
|
|
2284
|
+
*/
|
|
2285
|
+
mockTypes(mockFn) {
|
|
2286
|
+
const _mockFn = mockFn || this.options.mockFn;
|
|
2287
|
+
this._mockFn = _mockFn;
|
|
2288
|
+
if (typeof _mockFn !== "function") return;
|
|
2289
|
+
for (const type in this.options.types) {
|
|
2290
|
+
this[type] = _mockFn(type, this.options.types[type]) || this[type];
|
|
2291
|
+
this[type].raw = this[type];
|
|
2292
|
+
}
|
|
2293
|
+
}
|
|
2294
|
+
_wrapLogFn(defaults, isRaw) {
|
|
2295
|
+
return (...args) => {
|
|
2296
|
+
if (paused) {
|
|
2297
|
+
queue.push([
|
|
2298
|
+
this,
|
|
2299
|
+
defaults,
|
|
2300
|
+
args,
|
|
2301
|
+
isRaw
|
|
2302
|
+
]);
|
|
2303
|
+
return;
|
|
2304
|
+
}
|
|
2305
|
+
return this._logFn(defaults, args, isRaw);
|
|
2306
|
+
};
|
|
2307
|
+
}
|
|
2308
|
+
_logFn(defaults, args, isRaw) {
|
|
2309
|
+
if ((defaults.level || 0) > this.level) return false;
|
|
2310
|
+
const logObj = {
|
|
2311
|
+
date: /* @__PURE__ */ new Date(),
|
|
2312
|
+
args: [],
|
|
2313
|
+
...defaults,
|
|
2314
|
+
level: _normalizeLogLevel(defaults.level, this.options.types)
|
|
2315
|
+
};
|
|
2316
|
+
if (!isRaw && args.length === 1 && isLogObj(args[0])) Object.assign(logObj, args[0]);
|
|
2317
|
+
else logObj.args = [...args];
|
|
2318
|
+
if (logObj.message) {
|
|
2319
|
+
logObj.args.unshift(logObj.message);
|
|
2320
|
+
delete logObj.message;
|
|
2321
|
+
}
|
|
2322
|
+
if (logObj.additional) {
|
|
2323
|
+
if (!Array.isArray(logObj.additional)) logObj.additional = logObj.additional.split("\n");
|
|
2324
|
+
logObj.args.push("\n" + logObj.additional.join("\n"));
|
|
2325
|
+
delete logObj.additional;
|
|
2326
|
+
}
|
|
2327
|
+
logObj.type = typeof logObj.type === "string" ? logObj.type.toLowerCase() : "log";
|
|
2328
|
+
logObj.tag = typeof logObj.tag === "string" ? logObj.tag : "";
|
|
2329
|
+
const resolveLog = (newLog = false) => {
|
|
2330
|
+
const repeated = (this._lastLog.count || 0) - this.options.throttleMin;
|
|
2331
|
+
if (this._lastLog.object && repeated > 0) {
|
|
2332
|
+
const args2 = [...this._lastLog.object.args];
|
|
2333
|
+
if (repeated > 1) args2.push(`(repeated ${repeated} times)`);
|
|
2334
|
+
this._log({
|
|
2335
|
+
...this._lastLog.object,
|
|
2336
|
+
args: args2
|
|
2337
|
+
});
|
|
2338
|
+
this._lastLog.count = 1;
|
|
2339
|
+
}
|
|
2340
|
+
if (newLog) {
|
|
2341
|
+
this._lastLog.object = logObj;
|
|
2342
|
+
this._log(logObj);
|
|
2343
|
+
}
|
|
2344
|
+
};
|
|
2345
|
+
clearTimeout(this._lastLog.timeout);
|
|
2346
|
+
const diffTime = this._lastLog.time && logObj.date ? logObj.date.getTime() - this._lastLog.time.getTime() : 0;
|
|
2347
|
+
this._lastLog.time = logObj.date;
|
|
2348
|
+
if (diffTime < this.options.throttle) try {
|
|
2349
|
+
const serializedLog = JSON.stringify([
|
|
2350
|
+
logObj.type,
|
|
2351
|
+
logObj.tag,
|
|
2352
|
+
logObj.args
|
|
2353
|
+
]);
|
|
2354
|
+
const isSameLog = this._lastLog.serialized === serializedLog;
|
|
2355
|
+
this._lastLog.serialized = serializedLog;
|
|
2356
|
+
if (isSameLog) {
|
|
2357
|
+
this._lastLog.count = (this._lastLog.count || 0) + 1;
|
|
2358
|
+
if (this._lastLog.count > this.options.throttleMin) {
|
|
2359
|
+
this._lastLog.timeout = setTimeout(resolveLog, this.options.throttle);
|
|
2360
|
+
return;
|
|
2361
|
+
}
|
|
2362
|
+
}
|
|
2363
|
+
} catch {}
|
|
2364
|
+
resolveLog(true);
|
|
2365
|
+
}
|
|
2366
|
+
_log(logObj) {
|
|
2367
|
+
for (const reporter of this.options.reporters) reporter.log(logObj, { options: this.options });
|
|
2368
|
+
}
|
|
2369
|
+
};
|
|
2370
|
+
function _normalizeLogLevel(input, types = {}, defaultLevel = 3) {
|
|
2371
|
+
if (input === void 0) return defaultLevel;
|
|
2372
|
+
if (typeof input === "number") return input;
|
|
2373
|
+
if (types[input] && types[input].level !== void 0) return types[input].level;
|
|
2374
|
+
return defaultLevel;
|
|
2375
|
+
}
|
|
2376
|
+
Consola.prototype.add = Consola.prototype.addReporter;
|
|
2377
|
+
Consola.prototype.remove = Consola.prototype.removeReporter;
|
|
2378
|
+
Consola.prototype.clear = Consola.prototype.removeReporter;
|
|
2379
|
+
Consola.prototype.withScope = Consola.prototype.withTag;
|
|
2380
|
+
Consola.prototype.mock = Consola.prototype.mockTypes;
|
|
2381
|
+
Consola.prototype.pause = Consola.prototype.pauseLogs;
|
|
2382
|
+
Consola.prototype.resume = Consola.prototype.resumeLogs;
|
|
2383
|
+
function createConsola$1(options = {}) {
|
|
2384
|
+
return new Consola(options);
|
|
2385
|
+
}
|
|
2386
|
+
//#endregion
|
|
2387
|
+
//#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs
|
|
2388
|
+
function parseStack(stack, message) {
|
|
2389
|
+
const cwd = process.cwd() + sep;
|
|
2390
|
+
return stack.split("\n").splice(message.split("\n").length).map((l) => l.trim().replace("file://", "").replace(cwd, ""));
|
|
2391
|
+
}
|
|
2392
|
+
function writeStream(data, stream) {
|
|
2393
|
+
return (stream.__write || stream.write).call(stream, data);
|
|
2394
|
+
}
|
|
2395
|
+
const bracket = (x) => x ? `[${x}]` : "";
|
|
2396
|
+
var BasicReporter = class {
|
|
2397
|
+
formatStack(stack, message, opts) {
|
|
2398
|
+
const indent = " ".repeat((opts?.errorLevel || 0) + 1);
|
|
2399
|
+
return indent + parseStack(stack, message).join(`
|
|
2400
|
+
${indent}`);
|
|
2401
|
+
}
|
|
2402
|
+
formatError(err, opts) {
|
|
2403
|
+
const message = err.message ?? formatWithOptions(opts, err);
|
|
2404
|
+
const stack = err.stack ? this.formatStack(err.stack, message, opts) : "";
|
|
2405
|
+
const level = opts?.errorLevel || 0;
|
|
2406
|
+
const causedPrefix = level > 0 ? `${" ".repeat(level)}[cause]: ` : "";
|
|
2407
|
+
const causedError = err.cause ? "\n\n" + this.formatError(err.cause, {
|
|
2408
|
+
...opts,
|
|
2409
|
+
errorLevel: level + 1
|
|
2410
|
+
}) : "";
|
|
2411
|
+
return causedPrefix + message + "\n" + stack + causedError;
|
|
2412
|
+
}
|
|
2413
|
+
formatArgs(args, opts) {
|
|
2414
|
+
return formatWithOptions(opts, ...args.map((arg) => {
|
|
2415
|
+
if (arg && typeof arg.stack === "string") return this.formatError(arg, opts);
|
|
2416
|
+
return arg;
|
|
2417
|
+
}));
|
|
2418
|
+
}
|
|
2419
|
+
formatDate(date, opts) {
|
|
2420
|
+
return opts.date ? date.toLocaleTimeString() : "";
|
|
2421
|
+
}
|
|
2422
|
+
filterAndJoin(arr) {
|
|
2423
|
+
return arr.filter(Boolean).join(" ");
|
|
2424
|
+
}
|
|
2425
|
+
formatLogObj(logObj, opts) {
|
|
2426
|
+
const message = this.formatArgs(logObj.args, opts);
|
|
2427
|
+
if (logObj.type === "box") return "\n" + [
|
|
2428
|
+
bracket(logObj.tag),
|
|
2429
|
+
logObj.title && logObj.title,
|
|
2430
|
+
...message.split("\n")
|
|
2431
|
+
].filter(Boolean).map((l) => " > " + l).join("\n") + "\n";
|
|
2432
|
+
return this.filterAndJoin([
|
|
2433
|
+
bracket(logObj.type),
|
|
2434
|
+
bracket(logObj.tag),
|
|
2435
|
+
message
|
|
2436
|
+
]);
|
|
2437
|
+
}
|
|
2438
|
+
log(logObj, ctx) {
|
|
2439
|
+
return writeStream(this.formatLogObj(logObj, {
|
|
2440
|
+
columns: ctx.options.stdout.columns || 0,
|
|
2441
|
+
...ctx.options.formatOptions
|
|
2442
|
+
}) + "\n", logObj.level < 2 ? ctx.options.stderr || process.stderr : ctx.options.stdout || process.stdout);
|
|
2443
|
+
}
|
|
2444
|
+
};
|
|
2445
|
+
//#endregion
|
|
2446
|
+
//#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs
|
|
2447
|
+
const { env = {}, argv = [], platform = "" } = typeof process === "undefined" ? {} : process;
|
|
2448
|
+
const isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
|
|
2449
|
+
const isForced = "FORCE_COLOR" in env || argv.includes("--color");
|
|
2450
|
+
const isWindows = platform === "win32";
|
|
2451
|
+
const isDumbTerminal = env.TERM === "dumb";
|
|
2452
|
+
const isCompatibleTerminal = tty && tty.isatty && tty.isatty(1) && env.TERM && !isDumbTerminal;
|
|
2453
|
+
const isCI = "CI" in env && ("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env);
|
|
2454
|
+
const isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI);
|
|
2455
|
+
function replaceClose(index, string, close, replace, head = string.slice(0, Math.max(0, index)) + replace, tail = string.slice(Math.max(0, index + close.length)), next = tail.indexOf(close)) {
|
|
2456
|
+
return head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
|
|
2457
|
+
}
|
|
2458
|
+
function clearBleed(index, string, open, close, replace) {
|
|
2459
|
+
return index < 0 ? open + string + close : open + replaceClose(index, string, close, replace) + close;
|
|
2460
|
+
}
|
|
2461
|
+
function filterEmpty(open, close, replace = open, at = open.length + 1) {
|
|
2462
|
+
return (string) => string || !(string === "" || string === void 0) ? clearBleed(("" + string).indexOf(close, at), string, open, close, replace) : "";
|
|
2463
|
+
}
|
|
2464
|
+
function init(open, close, replace) {
|
|
2465
|
+
return filterEmpty(`\x1B[${open}m`, `\x1B[${close}m`, replace);
|
|
2466
|
+
}
|
|
2467
|
+
const colorDefs = {
|
|
2468
|
+
reset: init(0, 0),
|
|
2469
|
+
bold: init(1, 22, "\x1B[22m\x1B[1m"),
|
|
2470
|
+
dim: init(2, 22, "\x1B[22m\x1B[2m"),
|
|
2471
|
+
italic: init(3, 23),
|
|
2472
|
+
underline: init(4, 24),
|
|
2473
|
+
inverse: init(7, 27),
|
|
2474
|
+
hidden: init(8, 28),
|
|
2475
|
+
strikethrough: init(9, 29),
|
|
2476
|
+
black: init(30, 39),
|
|
2477
|
+
red: init(31, 39),
|
|
2478
|
+
green: init(32, 39),
|
|
2479
|
+
yellow: init(33, 39),
|
|
2480
|
+
blue: init(34, 39),
|
|
2481
|
+
magenta: init(35, 39),
|
|
2482
|
+
cyan: init(36, 39),
|
|
2483
|
+
white: init(37, 39),
|
|
2484
|
+
gray: init(90, 39),
|
|
2485
|
+
bgBlack: init(40, 49),
|
|
2486
|
+
bgRed: init(41, 49),
|
|
2487
|
+
bgGreen: init(42, 49),
|
|
2488
|
+
bgYellow: init(43, 49),
|
|
2489
|
+
bgBlue: init(44, 49),
|
|
2490
|
+
bgMagenta: init(45, 49),
|
|
2491
|
+
bgCyan: init(46, 49),
|
|
2492
|
+
bgWhite: init(47, 49),
|
|
2493
|
+
blackBright: init(90, 39),
|
|
2494
|
+
redBright: init(91, 39),
|
|
2495
|
+
greenBright: init(92, 39),
|
|
2496
|
+
yellowBright: init(93, 39),
|
|
2497
|
+
blueBright: init(94, 39),
|
|
2498
|
+
magentaBright: init(95, 39),
|
|
2499
|
+
cyanBright: init(96, 39),
|
|
2500
|
+
whiteBright: init(97, 39),
|
|
2501
|
+
bgBlackBright: init(100, 49),
|
|
2502
|
+
bgRedBright: init(101, 49),
|
|
2503
|
+
bgGreenBright: init(102, 49),
|
|
2504
|
+
bgYellowBright: init(103, 49),
|
|
2505
|
+
bgBlueBright: init(104, 49),
|
|
2506
|
+
bgMagentaBright: init(105, 49),
|
|
2507
|
+
bgCyanBright: init(106, 49),
|
|
2508
|
+
bgWhiteBright: init(107, 49)
|
|
2509
|
+
};
|
|
2510
|
+
function createColors(useColor = isColorSupported) {
|
|
2511
|
+
return useColor ? colorDefs : Object.fromEntries(Object.keys(colorDefs).map((key) => [key, String]));
|
|
2512
|
+
}
|
|
2513
|
+
const colors = createColors();
|
|
2514
|
+
function getColor$1(color, fallback = "reset") {
|
|
2515
|
+
return colors[color] || colors[fallback];
|
|
2516
|
+
}
|
|
2517
|
+
const ansiRegex$1 = [String.raw`[\u001B\u009B][[\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\d\/#&.:=?%@~_]+)*|[a-zA-Z\d]+(?:;[-a-zA-Z\d\/#&.:=?%@~_]*)*)?\u0007)`, String.raw`(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-nq-uy=><~]))`].join("|");
|
|
2518
|
+
function stripAnsi$1(text) {
|
|
2519
|
+
return text.replace(new RegExp(ansiRegex$1, "g"), "");
|
|
2520
|
+
}
|
|
2521
|
+
const boxStylePresets = {
|
|
2522
|
+
solid: {
|
|
2523
|
+
tl: "┌",
|
|
2524
|
+
tr: "┐",
|
|
2525
|
+
bl: "└",
|
|
2526
|
+
br: "┘",
|
|
2527
|
+
h: "─",
|
|
2528
|
+
v: "│"
|
|
2529
|
+
},
|
|
2530
|
+
double: {
|
|
2531
|
+
tl: "╔",
|
|
2532
|
+
tr: "╗",
|
|
2533
|
+
bl: "╚",
|
|
2534
|
+
br: "╝",
|
|
2535
|
+
h: "═",
|
|
2536
|
+
v: "║"
|
|
2537
|
+
},
|
|
2538
|
+
doubleSingle: {
|
|
2539
|
+
tl: "╓",
|
|
2540
|
+
tr: "╖",
|
|
2541
|
+
bl: "╙",
|
|
2542
|
+
br: "╜",
|
|
2543
|
+
h: "─",
|
|
2544
|
+
v: "║"
|
|
2545
|
+
},
|
|
2546
|
+
doubleSingleRounded: {
|
|
2547
|
+
tl: "╭",
|
|
2548
|
+
tr: "╮",
|
|
2549
|
+
bl: "╰",
|
|
2550
|
+
br: "╯",
|
|
2551
|
+
h: "─",
|
|
2552
|
+
v: "║"
|
|
2553
|
+
},
|
|
2554
|
+
singleThick: {
|
|
2555
|
+
tl: "┏",
|
|
2556
|
+
tr: "┓",
|
|
2557
|
+
bl: "┗",
|
|
2558
|
+
br: "┛",
|
|
2559
|
+
h: "━",
|
|
2560
|
+
v: "┃"
|
|
2561
|
+
},
|
|
2562
|
+
singleDouble: {
|
|
2563
|
+
tl: "╒",
|
|
2564
|
+
tr: "╕",
|
|
2565
|
+
bl: "╘",
|
|
2566
|
+
br: "╛",
|
|
2567
|
+
h: "═",
|
|
2568
|
+
v: "│"
|
|
2569
|
+
},
|
|
2570
|
+
singleDoubleRounded: {
|
|
2571
|
+
tl: "╭",
|
|
2572
|
+
tr: "╮",
|
|
2573
|
+
bl: "╰",
|
|
2574
|
+
br: "╯",
|
|
2575
|
+
h: "═",
|
|
2576
|
+
v: "│"
|
|
2577
|
+
},
|
|
2578
|
+
rounded: {
|
|
2579
|
+
tl: "╭",
|
|
2580
|
+
tr: "╮",
|
|
2581
|
+
bl: "╰",
|
|
2582
|
+
br: "╯",
|
|
2583
|
+
h: "─",
|
|
2584
|
+
v: "│"
|
|
2585
|
+
}
|
|
2586
|
+
};
|
|
2587
|
+
const defaultStyle = {
|
|
2588
|
+
borderColor: "white",
|
|
2589
|
+
borderStyle: "rounded",
|
|
2590
|
+
valign: "center",
|
|
2591
|
+
padding: 2,
|
|
2592
|
+
marginLeft: 1,
|
|
2593
|
+
marginTop: 1,
|
|
2594
|
+
marginBottom: 1
|
|
2595
|
+
};
|
|
2596
|
+
function box(text, _opts = {}) {
|
|
2597
|
+
const opts = {
|
|
2598
|
+
..._opts,
|
|
2599
|
+
style: {
|
|
2600
|
+
...defaultStyle,
|
|
2601
|
+
..._opts.style
|
|
2602
|
+
}
|
|
2603
|
+
};
|
|
2604
|
+
const textLines = text.split("\n");
|
|
2605
|
+
const boxLines = [];
|
|
2606
|
+
const _color = getColor$1(opts.style.borderColor);
|
|
2607
|
+
const borderStyle = { ...typeof opts.style.borderStyle === "string" ? boxStylePresets[opts.style.borderStyle] || boxStylePresets.solid : opts.style.borderStyle };
|
|
2608
|
+
if (_color) for (const key in borderStyle) borderStyle[key] = _color(borderStyle[key]);
|
|
2609
|
+
const paddingOffset = opts.style.padding % 2 === 0 ? opts.style.padding : opts.style.padding + 1;
|
|
2610
|
+
const height = textLines.length + paddingOffset;
|
|
2611
|
+
const width = Math.max(...textLines.map((line) => stripAnsi$1(line).length), opts.title ? stripAnsi$1(opts.title).length : 0) + paddingOffset;
|
|
2612
|
+
const widthOffset = width + paddingOffset;
|
|
2613
|
+
const leftSpace = opts.style.marginLeft > 0 ? " ".repeat(opts.style.marginLeft) : "";
|
|
2614
|
+
if (opts.style.marginTop > 0) boxLines.push("".repeat(opts.style.marginTop));
|
|
2615
|
+
if (opts.title) {
|
|
2616
|
+
const title = _color ? _color(opts.title) : opts.title;
|
|
2617
|
+
const left = borderStyle.h.repeat(Math.floor((width - stripAnsi$1(opts.title).length) / 2));
|
|
2618
|
+
const right = borderStyle.h.repeat(width - stripAnsi$1(opts.title).length - stripAnsi$1(left).length + paddingOffset);
|
|
2619
|
+
boxLines.push(`${leftSpace}${borderStyle.tl}${left}${title}${right}${borderStyle.tr}`);
|
|
2620
|
+
} else boxLines.push(`${leftSpace}${borderStyle.tl}${borderStyle.h.repeat(widthOffset)}${borderStyle.tr}`);
|
|
2621
|
+
const valignOffset = opts.style.valign === "center" ? Math.floor((height - textLines.length) / 2) : opts.style.valign === "top" ? height - textLines.length - paddingOffset : height - textLines.length;
|
|
2622
|
+
for (let i = 0; i < height; i++) if (i < valignOffset || i >= valignOffset + textLines.length) boxLines.push(`${leftSpace}${borderStyle.v}${" ".repeat(widthOffset)}${borderStyle.v}`);
|
|
2623
|
+
else {
|
|
2624
|
+
const line = textLines[i - valignOffset];
|
|
2625
|
+
const left = " ".repeat(paddingOffset);
|
|
2626
|
+
const right = " ".repeat(width - stripAnsi$1(line).length);
|
|
2627
|
+
boxLines.push(`${leftSpace}${borderStyle.v}${left}${line}${right}${borderStyle.v}`);
|
|
2628
|
+
}
|
|
2629
|
+
boxLines.push(`${leftSpace}${borderStyle.bl}${borderStyle.h.repeat(widthOffset)}${borderStyle.br}`);
|
|
2630
|
+
if (opts.style.marginBottom > 0) boxLines.push("".repeat(opts.style.marginBottom));
|
|
2631
|
+
return boxLines.join("\n");
|
|
2632
|
+
}
|
|
2633
|
+
//#endregion
|
|
2634
|
+
//#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/index.mjs
|
|
2635
|
+
const r = Object.create(null), i = (e) => globalThis.process?.env || import.meta.env || globalThis.Deno?.env.toObject() || globalThis.__env__ || (e ? r : globalThis), o = new Proxy(r, {
|
|
2636
|
+
get(e, s) {
|
|
2637
|
+
return i()[s] ?? r[s];
|
|
2638
|
+
},
|
|
2639
|
+
has(e, s) {
|
|
2640
|
+
return s in i() || s in r;
|
|
2641
|
+
},
|
|
2642
|
+
set(e, s, E) {
|
|
2643
|
+
const B = i(true);
|
|
2644
|
+
return B[s] = E, true;
|
|
2645
|
+
},
|
|
2646
|
+
deleteProperty(e, s) {
|
|
2647
|
+
if (!s) return false;
|
|
2648
|
+
const E = i(true);
|
|
2649
|
+
return delete E[s], true;
|
|
2650
|
+
},
|
|
2651
|
+
ownKeys() {
|
|
2652
|
+
const e = i(true);
|
|
2653
|
+
return Object.keys(e);
|
|
2654
|
+
}
|
|
2655
|
+
}), t = typeof process < "u" && process.env && process.env.NODE_ENV || "", f = [
|
|
2656
|
+
["APPVEYOR"],
|
|
2657
|
+
[
|
|
2658
|
+
"AWS_AMPLIFY",
|
|
2659
|
+
"AWS_APP_ID",
|
|
2660
|
+
{ ci: true }
|
|
2661
|
+
],
|
|
2662
|
+
["AZURE_PIPELINES", "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],
|
|
2663
|
+
["AZURE_STATIC", "INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],
|
|
2664
|
+
["APPCIRCLE", "AC_APPCIRCLE"],
|
|
2665
|
+
["BAMBOO", "bamboo_planKey"],
|
|
2666
|
+
["BITBUCKET", "BITBUCKET_COMMIT"],
|
|
2667
|
+
["BITRISE", "BITRISE_IO"],
|
|
2668
|
+
["BUDDY", "BUDDY_WORKSPACE_ID"],
|
|
2669
|
+
["BUILDKITE"],
|
|
2670
|
+
["CIRCLE", "CIRCLECI"],
|
|
2671
|
+
["CIRRUS", "CIRRUS_CI"],
|
|
2672
|
+
[
|
|
2673
|
+
"CLOUDFLARE_PAGES",
|
|
2674
|
+
"CF_PAGES",
|
|
2675
|
+
{ ci: true }
|
|
2676
|
+
],
|
|
2677
|
+
["CODEBUILD", "CODEBUILD_BUILD_ARN"],
|
|
2678
|
+
["CODEFRESH", "CF_BUILD_ID"],
|
|
2679
|
+
["DRONE"],
|
|
2680
|
+
["DRONE", "DRONE_BUILD_EVENT"],
|
|
2681
|
+
["DSARI"],
|
|
2682
|
+
["GITHUB_ACTIONS"],
|
|
2683
|
+
["GITLAB", "GITLAB_CI"],
|
|
2684
|
+
["GITLAB", "CI_MERGE_REQUEST_ID"],
|
|
2685
|
+
["GOCD", "GO_PIPELINE_LABEL"],
|
|
2686
|
+
["LAYERCI"],
|
|
2687
|
+
["HUDSON", "HUDSON_URL"],
|
|
2688
|
+
["JENKINS", "JENKINS_URL"],
|
|
2689
|
+
["MAGNUM"],
|
|
2690
|
+
["NETLIFY"],
|
|
2691
|
+
[
|
|
2692
|
+
"NETLIFY",
|
|
2693
|
+
"NETLIFY_LOCAL",
|
|
2694
|
+
{ ci: false }
|
|
2695
|
+
],
|
|
2696
|
+
["NEVERCODE"],
|
|
2697
|
+
["RENDER"],
|
|
2698
|
+
["SAIL", "SAILCI"],
|
|
2699
|
+
["SEMAPHORE"],
|
|
2700
|
+
["SCREWDRIVER"],
|
|
2701
|
+
["SHIPPABLE"],
|
|
2702
|
+
["SOLANO", "TDDIUM"],
|
|
2703
|
+
["STRIDER"],
|
|
2704
|
+
["TEAMCITY", "TEAMCITY_VERSION"],
|
|
2705
|
+
["TRAVIS"],
|
|
2706
|
+
["VERCEL", "NOW_BUILDER"],
|
|
2707
|
+
[
|
|
2708
|
+
"VERCEL",
|
|
2709
|
+
"VERCEL",
|
|
2710
|
+
{ ci: false }
|
|
2711
|
+
],
|
|
2712
|
+
[
|
|
2713
|
+
"VERCEL",
|
|
2714
|
+
"VERCEL_ENV",
|
|
2715
|
+
{ ci: false }
|
|
2716
|
+
],
|
|
2717
|
+
["APPCENTER", "APPCENTER_BUILD_ID"],
|
|
2718
|
+
[
|
|
2719
|
+
"CODESANDBOX",
|
|
2720
|
+
"CODESANDBOX_SSE",
|
|
2721
|
+
{ ci: false }
|
|
2722
|
+
],
|
|
2723
|
+
[
|
|
2724
|
+
"CODESANDBOX",
|
|
2725
|
+
"CODESANDBOX_HOST",
|
|
2726
|
+
{ ci: false }
|
|
2727
|
+
],
|
|
2728
|
+
["STACKBLITZ"],
|
|
2729
|
+
["STORMKIT"],
|
|
2730
|
+
["CLEAVR"],
|
|
2731
|
+
["ZEABUR"],
|
|
2732
|
+
[
|
|
2733
|
+
"CODESPHERE",
|
|
2734
|
+
"CODESPHERE_APP_ID",
|
|
2735
|
+
{ ci: true }
|
|
2736
|
+
],
|
|
2737
|
+
["RAILWAY", "RAILWAY_PROJECT_ID"],
|
|
2738
|
+
["RAILWAY", "RAILWAY_SERVICE_ID"],
|
|
2739
|
+
["DENO-DEPLOY", "DENO_DEPLOYMENT_ID"],
|
|
2740
|
+
[
|
|
2741
|
+
"FIREBASE_APP_HOSTING",
|
|
2742
|
+
"FIREBASE_APP_HOSTING",
|
|
2743
|
+
{ ci: true }
|
|
2744
|
+
]
|
|
2745
|
+
];
|
|
2746
|
+
function b() {
|
|
2747
|
+
if (globalThis.process?.env) for (const e of f) {
|
|
2748
|
+
const s = e[1] || e[0];
|
|
2749
|
+
if (globalThis.process?.env[s]) return {
|
|
2750
|
+
name: e[0].toLowerCase(),
|
|
2751
|
+
...e[2]
|
|
2752
|
+
};
|
|
2753
|
+
}
|
|
2754
|
+
return globalThis.process?.env?.SHELL === "/bin/jsh" && globalThis.process?.versions?.webcontainer ? {
|
|
2755
|
+
name: "stackblitz",
|
|
2756
|
+
ci: false
|
|
2757
|
+
} : {
|
|
2758
|
+
name: "",
|
|
2759
|
+
ci: false
|
|
2760
|
+
};
|
|
2761
|
+
}
|
|
2762
|
+
const l = b();
|
|
2763
|
+
l.name;
|
|
2764
|
+
function n(e) {
|
|
2765
|
+
return e ? e !== "false" : false;
|
|
2766
|
+
}
|
|
2767
|
+
const I = globalThis.process?.platform || "", T = n(o.CI) || l.ci !== false, a = n(globalThis.process?.stdout && globalThis.process?.stdout.isTTY), g = n(o.DEBUG), R = t === "test" || n(o.TEST);
|
|
2768
|
+
n(o.MINIMAL);
|
|
2769
|
+
const A = /^win/i.test(I);
|
|
2770
|
+
!n(o.NO_COLOR) && (n(o.FORCE_COLOR) || (a || A) && o.TERM);
|
|
2771
|
+
const C = (globalThis.process?.versions?.node || "").replace(/^v/, "") || null;
|
|
2772
|
+
Number(C?.split(".")[0]);
|
|
2773
|
+
const y = globalThis.process || Object.create(null), _ = { versions: {} };
|
|
2774
|
+
new Proxy(y, { get(e, s) {
|
|
2775
|
+
if (s === "env") return o;
|
|
2776
|
+
if (s in e) return e[s];
|
|
2777
|
+
if (s in _) return _[s];
|
|
2778
|
+
} });
|
|
2779
|
+
const c = globalThis.process?.release?.name === "node", O = !!globalThis.Bun || !!globalThis.process?.versions?.bun, D = !!globalThis.Deno, L = !!globalThis.fastly, S = !!globalThis.Netlify, u = !!globalThis.EdgeRuntime, N = globalThis.navigator?.userAgent === "Cloudflare-Workers", F = [
|
|
2780
|
+
[S, "netlify"],
|
|
2781
|
+
[u, "edge-light"],
|
|
2782
|
+
[N, "workerd"],
|
|
2783
|
+
[L, "fastly"],
|
|
2784
|
+
[D, "deno"],
|
|
2785
|
+
[O, "bun"],
|
|
2786
|
+
[c, "node"]
|
|
2787
|
+
];
|
|
2788
|
+
function G() {
|
|
2789
|
+
const e = F.find((s) => s[0]);
|
|
2790
|
+
if (e) return { name: e[1] };
|
|
2791
|
+
}
|
|
2792
|
+
G()?.name;
|
|
2793
|
+
function ansiRegex({ onlyFirst = false } = {}) {
|
|
2794
|
+
const pattern = [`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))`, "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");
|
|
2795
|
+
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
2796
|
+
}
|
|
2797
|
+
const regex = ansiRegex();
|
|
2798
|
+
function stripAnsi(string) {
|
|
2799
|
+
if (typeof string !== "string") throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
2800
|
+
return string.replace(regex, "");
|
|
2801
|
+
}
|
|
2802
|
+
function isAmbiguous(x) {
|
|
2803
|
+
return x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;
|
|
2804
|
+
}
|
|
2805
|
+
function isFullWidth(x) {
|
|
2806
|
+
return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
|
|
2807
|
+
}
|
|
2808
|
+
function isWide(x) {
|
|
2809
|
+
return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9776 && x <= 9783 || x >= 9800 && x <= 9811 || x === 9855 || x >= 9866 && x <= 9871 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12773 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101631 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x >= 119552 && x <= 119638 || x >= 119648 && x <= 119670 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129673 || x >= 129679 && x <= 129734 || x >= 129742 && x <= 129756 || x >= 129759 && x <= 129769 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
|
|
2810
|
+
}
|
|
2811
|
+
function validate(codePoint) {
|
|
2812
|
+
if (!Number.isSafeInteger(codePoint)) throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
|
|
2813
|
+
}
|
|
2814
|
+
function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
|
|
2815
|
+
validate(codePoint);
|
|
2816
|
+
if (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) return 2;
|
|
2817
|
+
return 1;
|
|
2818
|
+
}
|
|
2819
|
+
const emojiRegex = () => {
|
|
2820
|
+
return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
|
|
2821
|
+
};
|
|
2822
|
+
const segmenter = globalThis.Intl?.Segmenter ? new Intl.Segmenter() : { segment: (str) => str.split("") };
|
|
2823
|
+
const defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u;
|
|
2824
|
+
function stringWidth$1(string, options = {}) {
|
|
2825
|
+
if (typeof string !== "string" || string.length === 0) return 0;
|
|
2826
|
+
const { ambiguousIsNarrow = true, countAnsiEscapeCodes = false } = options;
|
|
2827
|
+
if (!countAnsiEscapeCodes) string = stripAnsi(string);
|
|
2828
|
+
if (string.length === 0) return 0;
|
|
2829
|
+
let width = 0;
|
|
2830
|
+
const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
|
|
2831
|
+
for (const { segment: character } of segmenter.segment(string)) {
|
|
2832
|
+
const codePoint = character.codePointAt(0);
|
|
2833
|
+
if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) continue;
|
|
2834
|
+
if (codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) continue;
|
|
2835
|
+
if (codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) continue;
|
|
2836
|
+
if (codePoint >= 55296 && codePoint <= 57343) continue;
|
|
2837
|
+
if (codePoint >= 65024 && codePoint <= 65039) continue;
|
|
2838
|
+
if (defaultIgnorableCodePointRegex.test(character)) continue;
|
|
2839
|
+
if (emojiRegex().test(character)) {
|
|
2840
|
+
width += 2;
|
|
2841
|
+
continue;
|
|
2842
|
+
}
|
|
2843
|
+
width += eastAsianWidth(codePoint, eastAsianWidthOptions);
|
|
2844
|
+
}
|
|
2845
|
+
return width;
|
|
2846
|
+
}
|
|
2847
|
+
function isUnicodeSupported() {
|
|
2848
|
+
const { env } = process$1;
|
|
2849
|
+
const { TERM, TERM_PROGRAM } = env;
|
|
2850
|
+
if (process$1.platform !== "win32") return TERM !== "linux";
|
|
2851
|
+
return Boolean(env.WT_SESSION) || Boolean(env.TERMINUS_SUBLIME) || env.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
2852
|
+
}
|
|
2853
|
+
const TYPE_COLOR_MAP = {
|
|
2854
|
+
info: "cyan",
|
|
2855
|
+
fail: "red",
|
|
2856
|
+
success: "green",
|
|
2857
|
+
ready: "green",
|
|
2858
|
+
start: "magenta"
|
|
2859
|
+
};
|
|
2860
|
+
const LEVEL_COLOR_MAP = {
|
|
2861
|
+
0: "red",
|
|
2862
|
+
1: "yellow"
|
|
2863
|
+
};
|
|
2864
|
+
const unicode = isUnicodeSupported();
|
|
2865
|
+
const s = (c, fallback) => unicode ? c : fallback;
|
|
2866
|
+
const TYPE_ICONS = {
|
|
2867
|
+
error: s("✖", "×"),
|
|
2868
|
+
fatal: s("✖", "×"),
|
|
2869
|
+
ready: s("✔", "√"),
|
|
2870
|
+
warn: s("⚠", "‼"),
|
|
2871
|
+
info: s("ℹ", "i"),
|
|
2872
|
+
success: s("✔", "√"),
|
|
2873
|
+
debug: s("⚙", "D"),
|
|
2874
|
+
trace: s("→", "→"),
|
|
2875
|
+
fail: s("✖", "×"),
|
|
2876
|
+
start: s("◐", "o"),
|
|
2877
|
+
log: ""
|
|
2878
|
+
};
|
|
2879
|
+
function stringWidth(str) {
|
|
2880
|
+
if (!(typeof Intl === "object") || !Intl.Segmenter) return stripAnsi$1(str).length;
|
|
2881
|
+
return stringWidth$1(str);
|
|
2882
|
+
}
|
|
2883
|
+
var FancyReporter = class extends BasicReporter {
|
|
2884
|
+
formatStack(stack, message, opts) {
|
|
2885
|
+
const indent = " ".repeat((opts?.errorLevel || 0) + 1);
|
|
2886
|
+
return `
|
|
2887
|
+
${indent}` + parseStack(stack, message).map((line) => " " + line.replace(/^at +/, (m) => colors.gray(m)).replace(/\((.+)\)/, (_, m) => `(${colors.cyan(m)})`)).join(`
|
|
2888
|
+
${indent}`);
|
|
2889
|
+
}
|
|
2890
|
+
formatType(logObj, isBadge, opts) {
|
|
2891
|
+
const typeColor = TYPE_COLOR_MAP[logObj.type] || LEVEL_COLOR_MAP[logObj.level] || "gray";
|
|
2892
|
+
if (isBadge) return getBgColor(typeColor)(colors.black(` ${logObj.type.toUpperCase()} `));
|
|
2893
|
+
const _type = typeof TYPE_ICONS[logObj.type] === "string" ? TYPE_ICONS[logObj.type] : logObj.icon || logObj.type;
|
|
2894
|
+
return _type ? getColor(typeColor)(_type) : "";
|
|
2895
|
+
}
|
|
2896
|
+
formatLogObj(logObj, opts) {
|
|
2897
|
+
const [message, ...additional] = this.formatArgs(logObj.args, opts).split("\n");
|
|
2898
|
+
if (logObj.type === "box") return box(characterFormat(message + (additional.length > 0 ? "\n" + additional.join("\n") : "")), {
|
|
2899
|
+
title: logObj.title ? characterFormat(logObj.title) : void 0,
|
|
2900
|
+
style: logObj.style
|
|
2901
|
+
});
|
|
2902
|
+
const date = this.formatDate(logObj.date, opts);
|
|
2903
|
+
const coloredDate = date && colors.gray(date);
|
|
2904
|
+
const isBadge = logObj.badge ?? logObj.level < 2;
|
|
2905
|
+
const type = this.formatType(logObj, isBadge, opts);
|
|
2906
|
+
const tag = logObj.tag ? colors.gray(logObj.tag) : "";
|
|
2907
|
+
let line;
|
|
2908
|
+
const left = this.filterAndJoin([type, characterFormat(message)]);
|
|
2909
|
+
const right = this.filterAndJoin(opts.columns ? [tag, coloredDate] : [tag]);
|
|
2910
|
+
const space = (opts.columns || 0) - stringWidth(left) - stringWidth(right) - 2;
|
|
2911
|
+
line = space > 0 && (opts.columns || 0) >= 80 ? left + " ".repeat(space) + right : (right ? `${colors.gray(`[${right}]`)} ` : "") + left;
|
|
2912
|
+
line += characterFormat(additional.length > 0 ? "\n" + additional.join("\n") : "");
|
|
2913
|
+
if (logObj.type === "trace") {
|
|
2914
|
+
const _err = /* @__PURE__ */ new Error("Trace: " + logObj.message);
|
|
2915
|
+
line += this.formatStack(_err.stack || "", _err.message);
|
|
2916
|
+
}
|
|
2917
|
+
return isBadge ? "\n" + line + "\n" : line;
|
|
2918
|
+
}
|
|
2919
|
+
};
|
|
2920
|
+
function characterFormat(str) {
|
|
2921
|
+
return str.replace(/`([^`]+)`/gm, (_, m) => colors.cyan(m)).replace(/\s+_([^_]+)_\s+/gm, (_, m) => ` ${colors.underline(m)} `);
|
|
2922
|
+
}
|
|
2923
|
+
function getColor(color = "white") {
|
|
2924
|
+
return colors[color] || colors.white;
|
|
2925
|
+
}
|
|
2926
|
+
function getBgColor(color = "bgWhite") {
|
|
2927
|
+
return colors[`bg${color[0].toUpperCase()}${color.slice(1)}`] || colors.bgWhite;
|
|
2928
|
+
}
|
|
2929
|
+
function createConsola(options = {}) {
|
|
2930
|
+
let level = _getDefaultLogLevel();
|
|
2931
|
+
if (process.env.CONSOLA_LEVEL) level = Number.parseInt(process.env.CONSOLA_LEVEL) ?? level;
|
|
2932
|
+
return createConsola$1({
|
|
2933
|
+
level,
|
|
2934
|
+
defaults: { level },
|
|
2935
|
+
stdout: process.stdout,
|
|
2936
|
+
stderr: process.stderr,
|
|
2937
|
+
prompt: (...args) => import("./prompt-BYQIwEjg.mjs").then((m) => m.prompt(...args)),
|
|
2938
|
+
reporters: options.reporters || [options.fancy ?? !(T || R) ? new FancyReporter() : new BasicReporter()],
|
|
2939
|
+
...options
|
|
2940
|
+
});
|
|
2941
|
+
}
|
|
2942
|
+
function _getDefaultLogLevel() {
|
|
2943
|
+
if (g) return LogLevels.debug;
|
|
2944
|
+
if (R) return LogLevels.warn;
|
|
2945
|
+
return LogLevels.info;
|
|
2946
|
+
}
|
|
2947
|
+
createConsola();
|
|
2948
|
+
//#endregion
|
|
2949
|
+
//#region src/cli/logger.ts
|
|
2950
|
+
/**
|
|
2951
|
+
* Console logger
|
|
2952
|
+
*/
|
|
2953
|
+
const logger = process.env.ROLLDOWN_TEST ? createTestingLogger() : createConsola({ formatOptions: { date: false } });
|
|
2954
|
+
function createTestingLogger() {
|
|
2955
|
+
const types = [
|
|
2956
|
+
"silent",
|
|
2957
|
+
"fatal",
|
|
2958
|
+
"error",
|
|
2959
|
+
"warn",
|
|
2960
|
+
"log",
|
|
2961
|
+
"info",
|
|
2962
|
+
"success",
|
|
2963
|
+
"fail",
|
|
2964
|
+
"ready",
|
|
2965
|
+
"start",
|
|
2966
|
+
"box",
|
|
2967
|
+
"debug",
|
|
2968
|
+
"trace",
|
|
2969
|
+
"verbose"
|
|
2970
|
+
];
|
|
2971
|
+
const ret = Object.create(null);
|
|
2972
|
+
for (const type of types) ret[type] = (...args) => console.log(...args);
|
|
2973
|
+
return ret;
|
|
2974
|
+
}
|
|
2975
|
+
//#endregion
|
|
2976
|
+
//#region src/utils/bindingify-output-options.ts
|
|
2977
|
+
function bindingifyOutputOptions(outputOptions) {
|
|
2978
|
+
const { dir, format, exports, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapExcludeSources, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, banner, footer, postBanner, postFooter, intro, outro, esModule, globals, paths, generatedCode, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, comments, preserveModulesRoot, manualChunks, topLevelVar, cleanDir, strictExecutionOrder } = outputOptions;
|
|
2979
|
+
if (legalComments != null) logger.warn("`legalComments` option is deprecated, please use `comments.legal` instead.");
|
|
2980
|
+
const { inlineDynamicImports, advancedChunks } = bindingifyCodeSplitting(outputOptions.codeSplitting, outputOptions.inlineDynamicImports, outputOptions.advancedChunks, manualChunks);
|
|
2981
|
+
return {
|
|
2982
|
+
dir,
|
|
2983
|
+
file: file == null ? void 0 : file,
|
|
2984
|
+
format: bindingifyFormat(format),
|
|
2985
|
+
exports,
|
|
2986
|
+
hashCharacters,
|
|
2987
|
+
sourcemap: bindingifySourcemap(sourcemap),
|
|
2988
|
+
sourcemapBaseUrl,
|
|
2989
|
+
sourcemapDebugIds,
|
|
2990
|
+
sourcemapExcludeSources,
|
|
2991
|
+
sourcemapIgnoreList: sourcemapIgnoreList ?? /node_modules/,
|
|
2992
|
+
sourcemapPathTransform,
|
|
2993
|
+
banner: bindingifyAddon(banner),
|
|
2994
|
+
footer: bindingifyAddon(footer),
|
|
2995
|
+
postBanner: bindingifyAddon(postBanner),
|
|
2996
|
+
postFooter: bindingifyAddon(postFooter),
|
|
2997
|
+
intro: bindingifyAddon(intro),
|
|
2998
|
+
outro: bindingifyAddon(outro),
|
|
2999
|
+
extend: outputOptions.extend,
|
|
3000
|
+
globals,
|
|
3001
|
+
paths,
|
|
3002
|
+
generatedCode,
|
|
3003
|
+
esModule,
|
|
3004
|
+
name,
|
|
3005
|
+
assetFileNames: bindingifyAssetFilenames(assetFileNames),
|
|
3006
|
+
entryFileNames,
|
|
3007
|
+
chunkFileNames,
|
|
3008
|
+
plugins: [],
|
|
3009
|
+
minify: outputOptions.minify,
|
|
3010
|
+
externalLiveBindings: outputOptions.externalLiveBindings,
|
|
3011
|
+
inlineDynamicImports,
|
|
3012
|
+
dynamicImportInCjs: outputOptions.dynamicImportInCjs,
|
|
3013
|
+
manualCodeSplitting: advancedChunks,
|
|
3014
|
+
polyfillRequire: outputOptions.polyfillRequire,
|
|
3015
|
+
sanitizeFileName,
|
|
3016
|
+
preserveModules,
|
|
3017
|
+
virtualDirname,
|
|
3018
|
+
legalComments,
|
|
3019
|
+
comments: bindingifyComments(comments),
|
|
3020
|
+
preserveModulesRoot,
|
|
3021
|
+
topLevelVar,
|
|
3022
|
+
minifyInternalExports: outputOptions.minifyInternalExports,
|
|
3023
|
+
cleanDir,
|
|
3024
|
+
strictExecutionOrder,
|
|
3025
|
+
strict: outputOptions.strict
|
|
3026
|
+
};
|
|
3027
|
+
}
|
|
3028
|
+
function bindingifyAddon(configAddon) {
|
|
3029
|
+
if (configAddon == null || configAddon === "") return;
|
|
3030
|
+
if (typeof configAddon === "function") return async (chunk) => configAddon(transformRenderedChunk(chunk));
|
|
3031
|
+
return configAddon;
|
|
3032
|
+
}
|
|
3033
|
+
function bindingifyFormat(format) {
|
|
3034
|
+
switch (format) {
|
|
3035
|
+
case void 0:
|
|
3036
|
+
case "es":
|
|
3037
|
+
case "esm":
|
|
3038
|
+
case "module": return "es";
|
|
3039
|
+
case "cjs":
|
|
3040
|
+
case "commonjs": return "cjs";
|
|
3041
|
+
case "iife": return "iife";
|
|
3042
|
+
case "umd": return "umd";
|
|
3043
|
+
default: unimplemented(`output.format: ${format}`);
|
|
3044
|
+
}
|
|
3045
|
+
}
|
|
3046
|
+
function bindingifySourcemap(sourcemap) {
|
|
3047
|
+
switch (sourcemap) {
|
|
3048
|
+
case true: return "file";
|
|
3049
|
+
case "inline": return "inline";
|
|
3050
|
+
case false:
|
|
3051
|
+
case void 0: return;
|
|
3052
|
+
case "hidden": return "hidden";
|
|
3053
|
+
default: throw new Error(`unknown sourcemap: ${sourcemap}`);
|
|
3054
|
+
}
|
|
3055
|
+
}
|
|
3056
|
+
function bindingifyAssetFilenames(assetFileNames) {
|
|
3057
|
+
if (typeof assetFileNames === "function") return (asset) => {
|
|
3058
|
+
return assetFileNames({
|
|
3059
|
+
name: asset.name,
|
|
3060
|
+
names: asset.names,
|
|
3061
|
+
originalFileName: asset.originalFileName,
|
|
3062
|
+
originalFileNames: asset.originalFileNames,
|
|
3063
|
+
source: transformAssetSource(asset.source),
|
|
3064
|
+
type: "asset"
|
|
3065
|
+
});
|
|
3066
|
+
};
|
|
3067
|
+
return assetFileNames;
|
|
3068
|
+
}
|
|
3069
|
+
function bindingifyComments(comments) {
|
|
3070
|
+
if (comments == null) return;
|
|
3071
|
+
if (typeof comments === "boolean") return comments;
|
|
3072
|
+
return comments;
|
|
3073
|
+
}
|
|
3074
|
+
function bindingifyCodeSplitting(codeSplitting, inlineDynamicImportsOption, advancedChunks, manualChunks) {
|
|
3075
|
+
let inlineDynamicImports;
|
|
3076
|
+
let effectiveChunksOption;
|
|
3077
|
+
if (codeSplitting === false) {
|
|
3078
|
+
if (inlineDynamicImportsOption != null) logger.warn("`inlineDynamicImports` option is ignored because `codeSplitting: false` is set.");
|
|
3079
|
+
if (manualChunks != null) throw new Error("Invalid configuration: \"output.manualChunks\" cannot be used when \"output.codeSplitting\" is set to false.");
|
|
3080
|
+
if (advancedChunks != null) logger.warn("`advancedChunks` option is ignored because `codeSplitting` is set to `false`.");
|
|
3081
|
+
return {
|
|
3082
|
+
inlineDynamicImports: true,
|
|
3083
|
+
advancedChunks: void 0
|
|
3084
|
+
};
|
|
3085
|
+
} else if (codeSplitting === true) {
|
|
3086
|
+
if (inlineDynamicImportsOption != null) logger.warn("`inlineDynamicImports` option is ignored because `codeSplitting: true` is set.");
|
|
3087
|
+
} else if (codeSplitting == null) {
|
|
3088
|
+
if (inlineDynamicImportsOption != null) {
|
|
3089
|
+
logger.warn("`inlineDynamicImports` option is deprecated, please use `codeSplitting: false` instead.");
|
|
3090
|
+
inlineDynamicImports = inlineDynamicImportsOption;
|
|
3091
|
+
}
|
|
3092
|
+
} else {
|
|
3093
|
+
effectiveChunksOption = codeSplitting;
|
|
3094
|
+
if (inlineDynamicImportsOption != null) logger.warn("`inlineDynamicImports` option is ignored because the `codeSplitting` option is specified.");
|
|
3095
|
+
}
|
|
3096
|
+
if (inlineDynamicImports === true && manualChunks != null) throw new Error("Invalid value \"true\" for option \"output.inlineDynamicImports\" - this option is not supported for \"output.manualChunks\".");
|
|
3097
|
+
if (effectiveChunksOption == null) {
|
|
3098
|
+
if (advancedChunks != null) {
|
|
3099
|
+
logger.warn("`advancedChunks` option is deprecated, please use `codeSplitting` instead.");
|
|
3100
|
+
effectiveChunksOption = advancedChunks;
|
|
3101
|
+
}
|
|
3102
|
+
} else if (advancedChunks != null) logger.warn("`advancedChunks` option is ignored because the `codeSplitting` option is specified.");
|
|
3103
|
+
if (manualChunks != null && effectiveChunksOption != null) logger.warn("`manualChunks` option is ignored because the `codeSplitting` option is specified.");
|
|
3104
|
+
else if (manualChunks != null) effectiveChunksOption = { groups: [{ name(moduleId, ctx) {
|
|
3105
|
+
return manualChunks(moduleId, { getModuleInfo: (id) => ctx.getModuleInfo(id) });
|
|
3106
|
+
} }] };
|
|
3107
|
+
let advancedChunksResult;
|
|
3108
|
+
if (effectiveChunksOption != null) {
|
|
3109
|
+
const { groups, ...restOptions } = effectiveChunksOption;
|
|
3110
|
+
advancedChunksResult = {
|
|
3111
|
+
...restOptions,
|
|
3112
|
+
groups: groups?.map((group) => {
|
|
3113
|
+
const { name, ...restGroup } = group;
|
|
3114
|
+
return {
|
|
3115
|
+
...restGroup,
|
|
3116
|
+
name: typeof name === "function" ? (id, ctx) => name(id, new ChunkingContextImpl(ctx)) : name
|
|
3117
|
+
};
|
|
3118
|
+
})
|
|
3119
|
+
};
|
|
3120
|
+
}
|
|
3121
|
+
return {
|
|
3122
|
+
inlineDynamicImports,
|
|
3123
|
+
advancedChunks: advancedChunksResult
|
|
3124
|
+
};
|
|
3125
|
+
}
|
|
3126
|
+
//#endregion
|
|
3127
|
+
//#region src/utils/initialize-parallel-plugins.ts
|
|
3128
|
+
async function initializeParallelPlugins(plugins) {
|
|
3129
|
+
const pluginInfos = [];
|
|
3130
|
+
for (const [index, plugin] of plugins.entries()) if ("_parallel" in plugin) {
|
|
3131
|
+
const { fileUrl, options } = plugin._parallel;
|
|
3132
|
+
pluginInfos.push({
|
|
3133
|
+
index,
|
|
3134
|
+
fileUrl,
|
|
3135
|
+
options
|
|
3136
|
+
});
|
|
3137
|
+
}
|
|
3138
|
+
if (pluginInfos.length <= 0) return;
|
|
3139
|
+
const count = availableParallelism();
|
|
3140
|
+
const parallelJsPluginRegistry = new import_binding.ParallelJsPluginRegistry(count);
|
|
3141
|
+
const registryId = parallelJsPluginRegistry.id;
|
|
3142
|
+
const workers = await initializeWorkers(registryId, count, pluginInfos);
|
|
3143
|
+
const stopWorkers = async () => {
|
|
3144
|
+
await Promise.all(workers.map((worker) => worker.terminate()));
|
|
3145
|
+
};
|
|
3146
|
+
return {
|
|
3147
|
+
registry: parallelJsPluginRegistry,
|
|
3148
|
+
stopWorkers
|
|
3149
|
+
};
|
|
3150
|
+
}
|
|
3151
|
+
function initializeWorkers(registryId, count, pluginInfos) {
|
|
3152
|
+
return Promise.all(Array.from({ length: count }, (_, i) => initializeWorker(registryId, pluginInfos, i)));
|
|
3153
|
+
}
|
|
3154
|
+
async function initializeWorker(registryId, pluginInfos, threadNumber) {
|
|
3155
|
+
const urlString = import.meta.resolve("#parallel-plugin-worker");
|
|
3156
|
+
const workerData = {
|
|
3157
|
+
registryId,
|
|
3158
|
+
pluginInfos,
|
|
3159
|
+
threadNumber
|
|
3160
|
+
};
|
|
3161
|
+
let worker;
|
|
3162
|
+
try {
|
|
3163
|
+
worker = new Worker(new URL(urlString), { workerData });
|
|
3164
|
+
worker.unref();
|
|
3165
|
+
await new Promise((resolve, reject) => {
|
|
3166
|
+
worker.once("message", async (message) => {
|
|
3167
|
+
if (message.type === "error") reject(message.error);
|
|
3168
|
+
else resolve();
|
|
3169
|
+
});
|
|
3170
|
+
});
|
|
3171
|
+
return worker;
|
|
3172
|
+
} catch (e) {
|
|
3173
|
+
worker?.terminate();
|
|
3174
|
+
throw e;
|
|
3175
|
+
}
|
|
3176
|
+
}
|
|
3177
|
+
const availableParallelism = () => {
|
|
3178
|
+
let availableParallelism = 1;
|
|
3179
|
+
try {
|
|
3180
|
+
availableParallelism = os.availableParallelism();
|
|
3181
|
+
} catch {
|
|
3182
|
+
const cpus = os.cpus();
|
|
3183
|
+
if (Array.isArray(cpus) && cpus.length > 0) availableParallelism = cpus.length;
|
|
3184
|
+
}
|
|
3185
|
+
return Math.min(availableParallelism, 8);
|
|
3186
|
+
};
|
|
3187
|
+
//#endregion
|
|
3188
|
+
//#region src/utils/create-bundler-option.ts
|
|
3189
|
+
async function createBundlerOptions(inputOptions, outputOptions, watchMode) {
|
|
3190
|
+
const inputPlugins = await normalizePluginOption(inputOptions.plugins);
|
|
3191
|
+
const outputPlugins = await normalizePluginOption(outputOptions.plugins);
|
|
3192
|
+
const logLevel = inputOptions.logLevel || "info";
|
|
3193
|
+
const onLog = getLogger(getObjectPlugins(inputPlugins), getOnLog(inputOptions, logLevel), logLevel, watchMode);
|
|
3194
|
+
outputOptions = PluginDriver.callOutputOptionsHook([...inputPlugins, ...outputPlugins], outputOptions, onLog, logLevel, watchMode);
|
|
3195
|
+
const hookOutputPlugins = await normalizePluginOption(outputOptions.plugins);
|
|
3196
|
+
const normalizedInputPlugins = normalizePlugins(inputPlugins, ANONYMOUS_PLUGIN_PREFIX);
|
|
3197
|
+
const normalizedOutputPlugins = normalizePlugins(hookOutputPlugins, ANONYMOUS_OUTPUT_PLUGIN_PREFIX);
|
|
3198
|
+
let plugins = [...normalizedInputPlugins, ...checkOutputPluginOption(normalizedOutputPlugins, onLog)];
|
|
3199
|
+
const parallelPluginInitResult = await initializeParallelPlugins(plugins);
|
|
3200
|
+
if (inputOptions.experimental?.strictExecutionOrder !== void 0) console.warn("`experimental.strictExecutionOrder` has been stabilized and moved to `output.strictExecutionOrder`. Please update your configuration.");
|
|
3201
|
+
try {
|
|
3202
|
+
return {
|
|
3203
|
+
bundlerOptions: {
|
|
3204
|
+
inputOptions: bindingifyInputOptions(plugins, inputOptions, outputOptions, normalizedInputPlugins, normalizedOutputPlugins, onLog, logLevel, watchMode),
|
|
3205
|
+
outputOptions: bindingifyOutputOptions(outputOptions),
|
|
3206
|
+
parallelPluginsRegistry: parallelPluginInitResult?.registry
|
|
3207
|
+
},
|
|
3208
|
+
inputOptions,
|
|
3209
|
+
onLog,
|
|
3210
|
+
stopWorkers: parallelPluginInitResult?.stopWorkers
|
|
3211
|
+
};
|
|
3212
|
+
} catch (e) {
|
|
3213
|
+
await parallelPluginInitResult?.stopWorkers();
|
|
3214
|
+
throw e;
|
|
3215
|
+
}
|
|
3216
|
+
}
|
|
3217
|
+
//#endregion
|
|
3218
|
+
//#region src/api/rolldown/rolldown-build.ts
|
|
3219
|
+
Symbol.asyncDispose ??= Symbol("Symbol.asyncDispose");
|
|
3220
|
+
/**
|
|
3221
|
+
* The bundle object returned by {@linkcode rolldown} function.
|
|
3222
|
+
*
|
|
3223
|
+
* @category Programmatic APIs
|
|
3224
|
+
*/
|
|
3225
|
+
var RolldownBuild = class RolldownBuild {
|
|
3226
|
+
#inputOptions;
|
|
3227
|
+
#bundler;
|
|
3228
|
+
#stopWorkers;
|
|
3229
|
+
/** @internal */
|
|
3230
|
+
static asyncRuntimeShutdown = false;
|
|
3231
|
+
/** @hidden should not be used directly */
|
|
3232
|
+
constructor(inputOptions) {
|
|
3233
|
+
this.#inputOptions = inputOptions;
|
|
3234
|
+
this.#bundler = new import_binding.BindingBundler();
|
|
3235
|
+
}
|
|
3236
|
+
/**
|
|
3237
|
+
* Whether the bundle has been closed.
|
|
3238
|
+
*
|
|
3239
|
+
* If the bundle is closed, calling other methods will throw an error.
|
|
3240
|
+
*/
|
|
3241
|
+
get closed() {
|
|
3242
|
+
return this.#bundler.closed;
|
|
3243
|
+
}
|
|
3244
|
+
/**
|
|
3245
|
+
* Generate bundles in-memory.
|
|
3246
|
+
*
|
|
3247
|
+
* If you directly want to write bundles to disk, use the {@linkcode write} method instead.
|
|
3248
|
+
*
|
|
3249
|
+
* @param outputOptions The output options.
|
|
3250
|
+
* @returns The generated bundle.
|
|
3251
|
+
* @throws {@linkcode BundleError} When an error occurs during the build.
|
|
3252
|
+
*/
|
|
3253
|
+
async generate(outputOptions = {}) {
|
|
3254
|
+
return this.#build(false, outputOptions);
|
|
3255
|
+
}
|
|
3256
|
+
/**
|
|
3257
|
+
* Generate and write bundles to disk.
|
|
3258
|
+
*
|
|
3259
|
+
* If you want to generate bundles in-memory, use the {@linkcode generate} method instead.
|
|
3260
|
+
*
|
|
3261
|
+
* @param outputOptions The output options.
|
|
3262
|
+
* @returns The generated bundle.
|
|
3263
|
+
* @throws {@linkcode BundleError} When an error occurs during the build.
|
|
3264
|
+
*/
|
|
3265
|
+
async write(outputOptions = {}) {
|
|
3266
|
+
return this.#build(true, outputOptions);
|
|
3267
|
+
}
|
|
3268
|
+
/**
|
|
3269
|
+
* Close the bundle and free resources.
|
|
3270
|
+
*
|
|
3271
|
+
* This method is called automatically when using `using` syntax.
|
|
3272
|
+
*
|
|
3273
|
+
* @example
|
|
3274
|
+
* ```js
|
|
3275
|
+
* import { rolldown } from 'rolldown';
|
|
3276
|
+
*
|
|
3277
|
+
* {
|
|
3278
|
+
* using bundle = await rolldown({ input: 'src/main.js' });
|
|
3279
|
+
* const output = await bundle.generate({ format: 'esm' });
|
|
3280
|
+
* console.log(output);
|
|
3281
|
+
* // bundle.close() is called automatically here
|
|
3282
|
+
* }
|
|
3283
|
+
* ```
|
|
3284
|
+
*/
|
|
3285
|
+
async close() {
|
|
3286
|
+
await this.#stopWorkers?.();
|
|
3287
|
+
await this.#bundler.close();
|
|
3288
|
+
(0, import_binding.shutdownAsyncRuntime)();
|
|
3289
|
+
RolldownBuild.asyncRuntimeShutdown = true;
|
|
3290
|
+
this.#stopWorkers = void 0;
|
|
3291
|
+
}
|
|
3292
|
+
/** @hidden documented in close method */
|
|
3293
|
+
async [Symbol.asyncDispose]() {
|
|
3294
|
+
await this.close();
|
|
3295
|
+
}
|
|
3296
|
+
/**
|
|
3297
|
+
* @experimental
|
|
3298
|
+
* @hidden not ready for public usage yet
|
|
3299
|
+
*/
|
|
3300
|
+
get watchFiles() {
|
|
3301
|
+
return Promise.resolve(this.#bundler.getWatchFiles());
|
|
3302
|
+
}
|
|
3303
|
+
async #build(isWrite, outputOptions) {
|
|
3304
|
+
validateOption("output", outputOptions);
|
|
3305
|
+
await this.#stopWorkers?.();
|
|
3306
|
+
const option = await createBundlerOptions(this.#inputOptions, outputOptions, false);
|
|
3307
|
+
if (RolldownBuild.asyncRuntimeShutdown) (0, import_binding.startAsyncRuntime)();
|
|
3308
|
+
try {
|
|
3309
|
+
this.#stopWorkers = option.stopWorkers;
|
|
3310
|
+
let output;
|
|
3311
|
+
if (isWrite) output = await this.#bundler.write(option.bundlerOptions);
|
|
3312
|
+
else output = await this.#bundler.generate(option.bundlerOptions);
|
|
3313
|
+
return new RolldownOutputImpl(unwrapBindingResult(output));
|
|
3314
|
+
} catch (e) {
|
|
3315
|
+
await option.stopWorkers?.();
|
|
3316
|
+
throw e;
|
|
3317
|
+
}
|
|
3318
|
+
}
|
|
3319
|
+
};
|
|
3320
|
+
//#endregion
|
|
3321
|
+
export { getInputCliKeys as a, validateOption as c, getCliSchemaInfo as i, styleText$1 as l, createBundlerOptions as n, getOutputCliKeys as o, logger as r, validateCliOptions as s, RolldownBuild as t, PluginDriver as u };
|