cngpac 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/dist/bin.mjs +24025 -0
- package/dist/src/_virtual/_rolldown/runtime.mjs +35 -0
- package/dist/src/changelog.d.mts +71 -0
- package/dist/src/changelog.mjs +92 -0
- package/dist/src/changenote.d.mts +41 -0
- package/dist/src/changenote.mjs +184 -0
- package/dist/src/cli/commands/change.d.mts +4 -0
- package/dist/src/cli/commands/change.mjs +75 -0
- package/dist/src/formatter.d.mts +31 -0
- package/dist/src/formatter.mjs +50 -0
- package/dist/src/git.d.mts +20 -0
- package/dist/src/git.mjs +121 -0
- package/dist/src/index.d.mts +19 -0
- package/dist/src/index.mjs +20 -0
- package/dist/src/node_modules/.pnpm/@clack_core@1.2.0/node_modules/@clack/core/dist/index.mjs +530 -0
- package/dist/src/node_modules/.pnpm/@clack_prompts@1.2.0/node_modules/@clack/prompts/dist/index.mjs +110 -0
- package/dist/src/node_modules/.pnpm/@kwsites_file-exists@1.1.1/node_modules/@kwsites/file-exists/dist/index.mjs +13 -0
- package/dist/src/node_modules/.pnpm/@kwsites_file-exists@1.1.1/node_modules/@kwsites/file-exists/dist/src/index.mjs +59 -0
- package/dist/src/node_modules/.pnpm/@kwsites_promise-deferred@1.1.1/node_modules/@kwsites/promise-deferred/dist/index.mjs +55 -0
- package/dist/src/node_modules/.pnpm/@octokit_auth-token@6.0.0/node_modules/@octokit/auth-token/dist-bundle/index.mjs +32 -0
- package/dist/src/node_modules/.pnpm/@octokit_core@7.0.6/node_modules/@octokit/core/dist-src/index.mjs +94 -0
- package/dist/src/node_modules/.pnpm/@octokit_core@7.0.6/node_modules/@octokit/core/dist-src/version.mjs +4 -0
- package/dist/src/node_modules/.pnpm/@octokit_endpoint@11.0.3/node_modules/@octokit/endpoint/dist-bundle/index.mjs +223 -0
- package/dist/src/node_modules/.pnpm/@octokit_graphql@9.0.3/node_modules/@octokit/graphql/dist-bundle/index.mjs +90 -0
- package/dist/src/node_modules/.pnpm/@octokit_plugin-paginate-rest@14.0.0_@octokit_core@7.0.6/node_modules/@octokit/plugin-paginate-rest/dist-bundle/index.mjs +86 -0
- package/dist/src/node_modules/.pnpm/@octokit_plugin-request-log@6.0.0_@octokit_core@7.0.6/node_modules/@octokit/plugin-request-log/dist-src/index.mjs +22 -0
- package/dist/src/node_modules/.pnpm/@octokit_plugin-request-log@6.0.0_@octokit_core@7.0.6/node_modules/@octokit/plugin-request-log/dist-src/version.mjs +4 -0
- package/dist/src/node_modules/.pnpm/@octokit_plugin-rest-endpoint-methods@17.0.0_@octokit_core@7.0.6/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.mjs +94 -0
- package/dist/src/node_modules/.pnpm/@octokit_plugin-rest-endpoint-methods@17.0.0_@octokit_core@7.0.6/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.mjs +1295 -0
- package/dist/src/node_modules/.pnpm/@octokit_plugin-rest-endpoint-methods@17.0.0_@octokit_core@7.0.6/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.mjs +17 -0
- package/dist/src/node_modules/.pnpm/@octokit_plugin-rest-endpoint-methods@17.0.0_@octokit_core@7.0.6/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.mjs +4 -0
- package/dist/src/node_modules/.pnpm/@octokit_request-error@7.1.0/node_modules/@octokit/request-error/dist-src/index.mjs +30 -0
- package/dist/src/node_modules/.pnpm/@octokit_request@10.0.8/node_modules/@octokit/request/dist-bundle/index.mjs +146 -0
- package/dist/src/node_modules/.pnpm/@octokit_rest@22.0.1/node_modules/@octokit/rest/dist-src/index.mjs +9 -0
- package/dist/src/node_modules/.pnpm/@octokit_rest@22.0.1/node_modules/@octokit/rest/dist-src/version.mjs +4 -0
- package/dist/src/node_modules/.pnpm/@simple-git_args-pathspec@1.0.2/node_modules/@simple-git/args-pathspec/dist/index.mjs +14 -0
- package/dist/src/node_modules/.pnpm/@simple-git_argv-parser@1.0.3/node_modules/@simple-git/argv-parser/dist/index.mjs +369 -0
- package/dist/src/node_modules/.pnpm/bail@2.0.2/node_modules/bail/index.mjs +13 -0
- package/dist/src/node_modules/.pnpm/before-after-hook@4.0.0/node_modules/before-after-hook/index.mjs +43 -0
- package/dist/src/node_modules/.pnpm/before-after-hook@4.0.0/node_modules/before-after-hook/lib/add.mjs +28 -0
- package/dist/src/node_modules/.pnpm/before-after-hook@4.0.0/node_modules/before-after-hook/lib/register.mjs +16 -0
- package/dist/src/node_modules/.pnpm/before-after-hook@4.0.0/node_modules/before-after-hook/lib/remove.mjs +11 -0
- package/dist/src/node_modules/.pnpm/character-entities@2.0.2/node_modules/character-entities/index.mjs +2135 -0
- package/dist/src/node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.mjs +200 -0
- package/dist/src/node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.mjs +206 -0
- package/dist/src/node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.mjs +15 -0
- package/dist/src/node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.mjs +212 -0
- package/dist/src/node_modules/.pnpm/decode-named-character-reference@1.3.0/node_modules/decode-named-character-reference/index.mjs +19 -0
- package/dist/src/node_modules/.pnpm/devlop@1.1.0/node_modules/devlop/lib/default.mjs +4 -0
- package/dist/src/node_modules/.pnpm/escape-string-regexp@5.0.0/node_modules/escape-string-regexp/index.mjs +7 -0
- package/dist/src/node_modules/.pnpm/extend@3.0.2/node_modules/extend/index.mjs +76 -0
- package/dist/src/node_modules/.pnpm/fast-content-type-parse@3.0.0/node_modules/fast-content-type-parse/index.mjs +115 -0
- package/dist/src/node_modules/.pnpm/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/index.mjs +138 -0
- package/dist/src/node_modules/.pnpm/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/utils.mjs +12 -0
- package/dist/src/node_modules/.pnpm/fast-string-width@1.1.0/node_modules/fast-string-width/dist/index.mjs +12 -0
- package/dist/src/node_modules/.pnpm/fast-wrap-ansi@0.1.6/node_modules/fast-wrap-ansi/lib/main.mjs +165 -0
- package/dist/src/node_modules/.pnpm/fault@2.0.1/node_modules/fault/index.mjs +38 -0
- package/dist/src/node_modules/.pnpm/format@0.2.2/node_modules/format/format.mjs +87 -0
- package/dist/src/node_modules/.pnpm/glob@13.0.6/node_modules/glob/dist/esm/index.min.mjs +3125 -0
- package/dist/src/node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.mjs +13 -0
- package/dist/src/node_modules/.pnpm/is-plain-obj@4.1.0/node_modules/is-plain-obj/index.mjs +8 -0
- package/dist/src/node_modules/.pnpm/json-with-bigint@3.5.8/node_modules/json-with-bigint/json-with-bigint.mjs +137 -0
- package/dist/src/node_modules/.pnpm/localstorage-polyfill@1.0.1/node_modules/localstorage-polyfill/localStorage.mjs +39 -0
- package/dist/src/node_modules/.pnpm/longest-streak@3.1.0/node_modules/longest-streak/index.mjs +29 -0
- package/dist/src/node_modules/.pnpm/mdast-util-from-markdown@2.0.3/node_modules/mdast-util-from-markdown/lib/index.mjs +976 -0
- package/dist/src/node_modules/.pnpm/mdast-util-frontmatter@2.0.1/node_modules/mdast-util-frontmatter/lib/index.mjs +162 -0
- package/dist/src/node_modules/.pnpm/mdast-util-phrasing@4.1.0/node_modules/mdast-util-phrasing/lib/index.mjs +36 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/configure.mjs +48 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/blockquote.mjs +27 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/break.mjs +20 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/code.mjs +62 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/definition.mjs +61 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/emphasis.mjs +51 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/heading.mjs +47 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/html.mjs +20 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/image-reference.mjs +50 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/image.mjs +69 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/index.mjs +47 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/inline-code.mjs +40 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/link-reference.mjs +50 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/link.mjs +93 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/list-item.mjs +35 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/list.mjs +48 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/paragraph.mjs +22 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/root.mjs +20 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/strong.mjs +51 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/text.mjs +17 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/handle/thematic-break.mjs +19 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/index.mjs +161 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/join.mjs +18 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/unsafe.mjs +223 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/association.mjs +31 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet-ordered.mjs +15 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet-other.mjs +19 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-bullet.mjs +15 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-emphasis.mjs +15 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-fence.mjs +15 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.mjs +15 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-quote.mjs +15 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-rule-repetition.mjs +15 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-rule.mjs +15 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/check-strong.mjs +15 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/compile-pattern.mjs +16 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/container-flow.mjs +56 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/container-phrasing.mjs +75 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/encode-character-reference.mjs +14 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/encode-info.mjs +74 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-code-as-indented.mjs +15 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.mjs +24 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.mjs +17 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/indent-lines.mjs +32 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/pattern-in-scope.mjs +27 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/safe.mjs +116 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-markdown@2.1.2/node_modules/mdast-util-to-markdown/lib/util/track.mjs +59 -0
- package/dist/src/node_modules/.pnpm/mdast-util-to-string@4.0.0/node_modules/mdast-util-to-string/lib/index.mjs +83 -0
- package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/attention.mjs +224 -0
- package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/autolink.mjs +213 -0
- package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/blank-line.mjs +60 -0
- package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/block-quote.mjs +130 -0
- package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-escape.mjs +62 -0
- package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/character-reference.mjs +141 -0
- package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-fenced.mjs +418 -0
- package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-indented.mjs +147 -0
- package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/code-text.mjs +187 -0
- package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/content.mjs +137 -0
- package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/definition.mjs +223 -0
- package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/hard-break-escape.mjs +59 -0
- package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/heading-atx.mjs +189 -0
- package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/html-flow.mjs +777 -0
- package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/html-text.mjs +617 -0
- package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-end.mjs +479 -0
- package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-start-image.mjs +95 -0
- package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/label-start-link.mjs +50 -0
- package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/line-ending.mjs +32 -0
- package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/list.mjs +177 -0
- package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/setext-underline.mjs +155 -0
- package/dist/src/node_modules/.pnpm/micromark-core-commonmark@2.0.3/node_modules/micromark-core-commonmark/lib/thematic-break.mjs +98 -0
- package/dist/src/node_modules/.pnpm/micromark-extension-frontmatter@2.0.0/node_modules/micromark-extension-frontmatter/lib/syntax.mjs +352 -0
- package/dist/src/node_modules/.pnpm/micromark-extension-frontmatter@2.0.0/node_modules/micromark-extension-frontmatter/lib/to-matters.mjs +109 -0
- package/dist/src/node_modules/.pnpm/micromark-factory-destination@2.0.1/node_modules/micromark-factory-destination/index.mjs +186 -0
- package/dist/src/node_modules/.pnpm/micromark-factory-label@2.0.1/node_modules/micromark-factory-label/index.mjs +134 -0
- package/dist/src/node_modules/.pnpm/micromark-factory-space@2.0.1/node_modules/micromark-factory-space/index.mjs +61 -0
- package/dist/src/node_modules/.pnpm/micromark-factory-title@2.0.1/node_modules/micromark-factory-title/index.mjs +148 -0
- package/dist/src/node_modules/.pnpm/micromark-factory-whitespace@2.0.1/node_modules/micromark-factory-whitespace/index.mjs +43 -0
- package/dist/src/node_modules/.pnpm/micromark-util-character@2.1.1/node_modules/micromark-util-character/index.mjs +229 -0
- package/dist/src/node_modules/.pnpm/micromark-util-chunked@2.0.1/node_modules/micromark-util-chunked/index.mjs +71 -0
- package/dist/src/node_modules/.pnpm/micromark-util-classify-character@2.0.1/node_modules/micromark-util-classify-character/index.mjs +25 -0
- package/dist/src/node_modules/.pnpm/micromark-util-combine-extensions@2.0.1/node_modules/micromark-util-combine-extensions/index.mjs +73 -0
- package/dist/src/node_modules/.pnpm/micromark-util-decode-numeric-character-reference@2.0.2/node_modules/micromark-util-decode-numeric-character-reference/index.mjs +22 -0
- package/dist/src/node_modules/.pnpm/micromark-util-decode-string@2.0.1/node_modules/micromark-util-decode-string/index.mjs +40 -0
- package/dist/src/node_modules/.pnpm/micromark-util-html-tag-name@2.0.1/node_modules/micromark-util-html-tag-name/index.mjs +100 -0
- package/dist/src/node_modules/.pnpm/micromark-util-normalize-identifier@2.0.1/node_modules/micromark-util-normalize-identifier/index.mjs +25 -0
- package/dist/src/node_modules/.pnpm/micromark-util-resolve-all@2.0.1/node_modules/micromark-util-resolve-all/index.mjs +31 -0
- package/dist/src/node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/index.mjs +158 -0
- package/dist/src/node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/lib/splice-buffer.mjs +231 -0
- package/dist/src/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/constructs.mjs +101 -0
- package/dist/src/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/create-tokenizer.mjs +473 -0
- package/dist/src/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/content.mjs +70 -0
- package/dist/src/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/document.mjs +220 -0
- package/dist/src/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/flow.mjs +51 -0
- package/dist/src/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/initialize/text.mjs +178 -0
- package/dist/src/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/parse.mjs +52 -0
- package/dist/src/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/postprocess.mjs +17 -0
- package/dist/src/node_modules/.pnpm/micromark@4.0.2/node_modules/micromark/lib/preprocess.mjs +102 -0
- package/dist/src/node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.mjs +121 -0
- package/dist/src/node_modules/.pnpm/remark-frontmatter@5.0.0/node_modules/remark-frontmatter/lib/index.mjs +35 -0
- package/dist/src/node_modules/.pnpm/remark-parse@11.0.0/node_modules/remark-parse/lib/index.mjs +37 -0
- package/dist/src/node_modules/.pnpm/remark-stringify@11.0.0/node_modules/remark-stringify/lib/index.mjs +36 -0
- package/dist/src/node_modules/.pnpm/simple-git@3.35.2/node_modules/simple-git/dist/esm/index.mjs +3563 -0
- package/dist/src/node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.mjs +57 -0
- package/dist/src/node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.mjs +72 -0
- package/dist/src/node_modules/.pnpm/trough@2.2.0/node_modules/trough/lib/index.mjs +157 -0
- package/dist/src/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/callable-instance.mjs +13 -0
- package/dist/src/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.mjs +1088 -0
- package/dist/src/node_modules/.pnpm/unist-util-is@6.0.1/node_modules/unist-util-is/lib/index.mjs +110 -0
- package/dist/src/node_modules/.pnpm/unist-util-stringify-position@4.0.0/node_modules/unist-util-stringify-position/lib/index.mjs +65 -0
- package/dist/src/node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/lib/color.node.mjs +10 -0
- package/dist/src/node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/lib/index.mjs +328 -0
- package/dist/src/node_modules/.pnpm/unist-util-visit@5.1.0/node_modules/unist-util-visit/lib/index.mjs +287 -0
- package/dist/src/node_modules/.pnpm/universal-user-agent@7.0.3/node_modules/universal-user-agent/index.mjs +8 -0
- package/dist/src/node_modules/.pnpm/vfile-message@4.0.3/node_modules/vfile-message/lib/index.mjs +247 -0
- package/dist/src/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/index.mjs +525 -0
- package/dist/src/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minpath.mjs +2 -0
- package/dist/src/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minproc.mjs +2 -0
- package/dist/src/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minurl.mjs +3 -0
- package/dist/src/node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minurl.shared.mjs +24 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-collection.mjs +62 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-doc.mjs +49 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-node.mjs +98 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-scalar.mjs +66 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/composer.mjs +207 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-map.mjs +93 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-scalar.mjs +179 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-block-seq.mjs +48 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-end.mjs +41 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-flow-collection.mjs +166 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-flow-scalar.mjs +211 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/resolve-props.mjs +110 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/util-contains-newline.mjs +32 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/util-empty-scalar-position.mjs +30 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/util-flow-indent-check.mjs +16 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/util-map-includes.mjs +16 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/Document.mjs +295 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/anchors.mjs +67 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/applyReviver.mjs +43 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/createNode.mjs +69 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/doc/directives.mjs +170 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/errors.mjs +56 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/index.mjs +67 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/log.mjs +17 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Alias.mjs +101 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Collection.mjs +127 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Node.mjs +40 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Pair.mjs +40 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/Scalar.mjs +33 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/YAMLMap.mjs +118 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/YAMLSeq.mjs +115 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/addPairToJSMap.mjs +59 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/identity.mjs +53 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/nodes/toJS.mjs +41 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/cst-scalar.mjs +274 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/cst-stringify.mjs +54 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/cst-visit.mjs +94 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/cst.mjs +85 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/lexer.mjs +523 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/line-counter.mjs +50 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/parse/parser.mjs +861 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/public-api.mjs +97 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/Schema.mjs +36 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/common/map.mjs +22 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/common/null.mjs +19 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/common/seq.mjs +22 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/common/string.mjs +19 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/core/bool.mjs +23 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/core/float.mjs +46 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/core/int.mjs +45 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/core/schema.mjs +34 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/json/schema.mjs +68 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/tags.mjs +103 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/binary.mjs +53 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/bool.mjs +31 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/float.mjs +49 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/int.mjs +79 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/merge.mjs +45 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/omap.mjs +71 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/pairs.mjs +67 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/schema.mjs +56 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/set.mjs +74 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/schema/yaml-1.1/timestamp.mjs +87 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/foldFlowLines.mjs +119 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringify.mjs +115 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyCollection.mjs +124 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyComment.mjs +23 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyDocument.mjs +67 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyNumber.mjs +24 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyPair.mjs +104 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/stringify/stringifyString.mjs +229 -0
- package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/visit.mjs +194 -0
- package/dist/src/node_modules/.pnpm/zwitch@2.0.4/node_modules/zwitch/index.mjs +106 -0
- package/dist/src/pkg.d.mts +24 -0
- package/dist/src/pkg.mjs +39 -0
- package/dist/src/prepare.d.mts +14 -0
- package/dist/src/prepare.mjs +41 -0
- package/dist/src/publishers/npm.d.mts +21 -0
- package/dist/src/publishers/npm.mjs +42 -0
- package/dist/src/releasers/github.d.mts +10 -0
- package/dist/src/releasers/github.mjs +20 -0
- package/dist/src/saver.d.mts +42 -0
- package/dist/src/saver.mjs +39 -0
- package/dist/src/types.d.mts +150 -0
- package/dist/src/utils.d.mts +7 -0
- package/dist/src/utils.mjs +47 -0
- package/dist/src/version.d.mts +9 -0
- package/dist/src/version.mjs +18 -0
- package/package.json +156 -0
- package/templates/cngpac.config.ts +33 -0
- package/templates/version.yml +30 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../../../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
//#region node_modules/.pnpm/extend@3.0.2/node_modules/extend/index.js
|
|
3
|
+
var require_extend = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4
|
+
var hasOwn = Object.prototype.hasOwnProperty;
|
|
5
|
+
var toStr = Object.prototype.toString;
|
|
6
|
+
var defineProperty = Object.defineProperty;
|
|
7
|
+
var gOPD = Object.getOwnPropertyDescriptor;
|
|
8
|
+
var isArray = function isArray(arr) {
|
|
9
|
+
if (typeof Array.isArray === "function") return Array.isArray(arr);
|
|
10
|
+
return toStr.call(arr) === "[object Array]";
|
|
11
|
+
};
|
|
12
|
+
var isPlainObject = function isPlainObject(obj) {
|
|
13
|
+
if (!obj || toStr.call(obj) !== "[object Object]") return false;
|
|
14
|
+
var hasOwnConstructor = hasOwn.call(obj, "constructor");
|
|
15
|
+
var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, "isPrototypeOf");
|
|
16
|
+
if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) return false;
|
|
17
|
+
var key;
|
|
18
|
+
for (key in obj);
|
|
19
|
+
return typeof key === "undefined" || hasOwn.call(obj, key);
|
|
20
|
+
};
|
|
21
|
+
var setProperty = function setProperty(target, options) {
|
|
22
|
+
if (defineProperty && options.name === "__proto__") defineProperty(target, options.name, {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
configurable: true,
|
|
25
|
+
value: options.newValue,
|
|
26
|
+
writable: true
|
|
27
|
+
});
|
|
28
|
+
else target[options.name] = options.newValue;
|
|
29
|
+
};
|
|
30
|
+
var getProperty = function getProperty(obj, name) {
|
|
31
|
+
if (name === "__proto__") {
|
|
32
|
+
if (!hasOwn.call(obj, name)) return;
|
|
33
|
+
else if (gOPD) return gOPD(obj, name).value;
|
|
34
|
+
}
|
|
35
|
+
return obj[name];
|
|
36
|
+
};
|
|
37
|
+
module.exports = function extend() {
|
|
38
|
+
var options, name, src, copy, copyIsArray, clone;
|
|
39
|
+
var target = arguments[0];
|
|
40
|
+
var i = 1;
|
|
41
|
+
var length = arguments.length;
|
|
42
|
+
var deep = false;
|
|
43
|
+
if (typeof target === "boolean") {
|
|
44
|
+
deep = target;
|
|
45
|
+
target = arguments[1] || {};
|
|
46
|
+
i = 2;
|
|
47
|
+
}
|
|
48
|
+
if (target == null || typeof target !== "object" && typeof target !== "function") target = {};
|
|
49
|
+
for (; i < length; ++i) {
|
|
50
|
+
options = arguments[i];
|
|
51
|
+
if (options != null) for (name in options) {
|
|
52
|
+
src = getProperty(target, name);
|
|
53
|
+
copy = getProperty(options, name);
|
|
54
|
+
if (target !== copy) {
|
|
55
|
+
if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {
|
|
56
|
+
if (copyIsArray) {
|
|
57
|
+
copyIsArray = false;
|
|
58
|
+
clone = src && isArray(src) ? src : [];
|
|
59
|
+
} else clone = src && isPlainObject(src) ? src : {};
|
|
60
|
+
setProperty(target, {
|
|
61
|
+
name,
|
|
62
|
+
newValue: extend(deep, clone, copy)
|
|
63
|
+
});
|
|
64
|
+
} else if (typeof copy !== "undefined") setProperty(target, {
|
|
65
|
+
name,
|
|
66
|
+
newValue: copy
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return target;
|
|
72
|
+
};
|
|
73
|
+
}));
|
|
74
|
+
//#endregion
|
|
75
|
+
export default require_extend();
|
|
76
|
+
export { require_extend };
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../../../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
//#region node_modules/.pnpm/fast-content-type-parse@3.0.0/node_modules/fast-content-type-parse/index.js
|
|
3
|
+
var require_fast_content_type_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4
|
+
const NullObject = function NullObject() {};
|
|
5
|
+
NullObject.prototype = Object.create(null);
|
|
6
|
+
/**
|
|
7
|
+
* RegExp to match *( ";" parameter ) in RFC 7231 sec 3.1.1.1
|
|
8
|
+
*
|
|
9
|
+
* parameter = token "=" ( token / quoted-string )
|
|
10
|
+
* token = 1*tchar
|
|
11
|
+
* tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*"
|
|
12
|
+
* / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
|
|
13
|
+
* / DIGIT / ALPHA
|
|
14
|
+
* ; any VCHAR, except delimiters
|
|
15
|
+
* quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE
|
|
16
|
+
* qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text
|
|
17
|
+
* obs-text = %x80-FF
|
|
18
|
+
* quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
|
|
19
|
+
*/
|
|
20
|
+
const paramRE = /; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu;
|
|
21
|
+
/**
|
|
22
|
+
* RegExp to match quoted-pair in RFC 7230 sec 3.2.6
|
|
23
|
+
*
|
|
24
|
+
* quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
|
|
25
|
+
* obs-text = %x80-FF
|
|
26
|
+
*/
|
|
27
|
+
const quotedPairRE = /\\([\v\u0020-\u00ff])/gu;
|
|
28
|
+
/**
|
|
29
|
+
* RegExp to match type in RFC 7231 sec 3.1.1.1
|
|
30
|
+
*
|
|
31
|
+
* media-type = type "/" subtype
|
|
32
|
+
* type = token
|
|
33
|
+
* subtype = token
|
|
34
|
+
*/
|
|
35
|
+
const mediaTypeRE = /^[!#$%&'*+.^\w|~-]+\/[!#$%&'*+.^\w|~-]+$/u;
|
|
36
|
+
const defaultContentType = {
|
|
37
|
+
type: "",
|
|
38
|
+
parameters: new NullObject()
|
|
39
|
+
};
|
|
40
|
+
Object.freeze(defaultContentType.parameters);
|
|
41
|
+
Object.freeze(defaultContentType);
|
|
42
|
+
/**
|
|
43
|
+
* Parse media type to object.
|
|
44
|
+
*
|
|
45
|
+
* @param {string|object} header
|
|
46
|
+
* @return {Object}
|
|
47
|
+
* @public
|
|
48
|
+
*/
|
|
49
|
+
function parse(header) {
|
|
50
|
+
if (typeof header !== "string") throw new TypeError("argument header is required and must be a string");
|
|
51
|
+
let index = header.indexOf(";");
|
|
52
|
+
const type = index !== -1 ? header.slice(0, index).trim() : header.trim();
|
|
53
|
+
if (mediaTypeRE.test(type) === false) throw new TypeError("invalid media type");
|
|
54
|
+
const result = {
|
|
55
|
+
type: type.toLowerCase(),
|
|
56
|
+
parameters: new NullObject()
|
|
57
|
+
};
|
|
58
|
+
if (index === -1) return result;
|
|
59
|
+
let key;
|
|
60
|
+
let match;
|
|
61
|
+
let value;
|
|
62
|
+
paramRE.lastIndex = index;
|
|
63
|
+
while (match = paramRE.exec(header)) {
|
|
64
|
+
if (match.index !== index) throw new TypeError("invalid parameter format");
|
|
65
|
+
index += match[0].length;
|
|
66
|
+
key = match[1].toLowerCase();
|
|
67
|
+
value = match[2];
|
|
68
|
+
if (value[0] === "\"") {
|
|
69
|
+
value = value.slice(1, value.length - 1);
|
|
70
|
+
quotedPairRE.test(value) && (value = value.replace(quotedPairRE, "$1"));
|
|
71
|
+
}
|
|
72
|
+
result.parameters[key] = value;
|
|
73
|
+
}
|
|
74
|
+
if (index !== header.length) throw new TypeError("invalid parameter format");
|
|
75
|
+
return result;
|
|
76
|
+
}
|
|
77
|
+
function safeParse(header) {
|
|
78
|
+
if (typeof header !== "string") return defaultContentType;
|
|
79
|
+
let index = header.indexOf(";");
|
|
80
|
+
const type = index !== -1 ? header.slice(0, index).trim() : header.trim();
|
|
81
|
+
if (mediaTypeRE.test(type) === false) return defaultContentType;
|
|
82
|
+
const result = {
|
|
83
|
+
type: type.toLowerCase(),
|
|
84
|
+
parameters: new NullObject()
|
|
85
|
+
};
|
|
86
|
+
if (index === -1) return result;
|
|
87
|
+
let key;
|
|
88
|
+
let match;
|
|
89
|
+
let value;
|
|
90
|
+
paramRE.lastIndex = index;
|
|
91
|
+
while (match = paramRE.exec(header)) {
|
|
92
|
+
if (match.index !== index) return defaultContentType;
|
|
93
|
+
index += match[0].length;
|
|
94
|
+
key = match[1].toLowerCase();
|
|
95
|
+
value = match[2];
|
|
96
|
+
if (value[0] === "\"") {
|
|
97
|
+
value = value.slice(1, value.length - 1);
|
|
98
|
+
quotedPairRE.test(value) && (value = value.replace(quotedPairRE, "$1"));
|
|
99
|
+
}
|
|
100
|
+
result.parameters[key] = value;
|
|
101
|
+
}
|
|
102
|
+
if (index !== header.length) return defaultContentType;
|
|
103
|
+
return result;
|
|
104
|
+
}
|
|
105
|
+
module.exports.default = {
|
|
106
|
+
parse,
|
|
107
|
+
safeParse
|
|
108
|
+
};
|
|
109
|
+
module.exports.parse = parse;
|
|
110
|
+
module.exports.safeParse = safeParse;
|
|
111
|
+
module.exports.defaultContentType = defaultContentType;
|
|
112
|
+
}));
|
|
113
|
+
//#endregion
|
|
114
|
+
export default require_fast_content_type_parse();
|
|
115
|
+
export { require_fast_content_type_parse };
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { isAmbiguous, isFullWidth, isWide } from "./utils.mjs";
|
|
2
|
+
//#region node_modules/.pnpm/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/index.js
|
|
3
|
+
const ANSI_RE = /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y;
|
|
4
|
+
const CONTROL_RE = /[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y;
|
|
5
|
+
const TAB_RE = /\t{1,1000}/y;
|
|
6
|
+
const EMOJI_RE = /[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/uy;
|
|
7
|
+
const LATIN_RE = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
|
|
8
|
+
const MODIFIER_RE = /\p{M}+/gu;
|
|
9
|
+
const NO_TRUNCATION = {
|
|
10
|
+
limit: Infinity,
|
|
11
|
+
ellipsis: ""
|
|
12
|
+
};
|
|
13
|
+
const getStringTruncatedWidth = (input, truncationOptions = {}, widthOptions = {}) => {
|
|
14
|
+
const LIMIT = truncationOptions.limit ?? Infinity;
|
|
15
|
+
const ELLIPSIS = truncationOptions.ellipsis ?? "";
|
|
16
|
+
const ELLIPSIS_WIDTH = truncationOptions?.ellipsisWidth ?? (ELLIPSIS ? getStringTruncatedWidth(ELLIPSIS, NO_TRUNCATION, widthOptions).width : 0);
|
|
17
|
+
const ANSI_WIDTH = widthOptions.ansiWidth ?? 0;
|
|
18
|
+
const CONTROL_WIDTH = widthOptions.controlWidth ?? 0;
|
|
19
|
+
const TAB_WIDTH = widthOptions.tabWidth ?? 8;
|
|
20
|
+
const AMBIGUOUS_WIDTH = widthOptions.ambiguousWidth ?? 1;
|
|
21
|
+
const EMOJI_WIDTH = widthOptions.emojiWidth ?? 2;
|
|
22
|
+
const FULL_WIDTH_WIDTH = widthOptions.fullWidthWidth ?? 2;
|
|
23
|
+
const REGULAR_WIDTH = widthOptions.regularWidth ?? 1;
|
|
24
|
+
const WIDE_WIDTH = widthOptions.wideWidth ?? 2;
|
|
25
|
+
let indexPrev = 0;
|
|
26
|
+
let index = 0;
|
|
27
|
+
let length = input.length;
|
|
28
|
+
let lengthExtra = 0;
|
|
29
|
+
let truncationEnabled = false;
|
|
30
|
+
let truncationIndex = length;
|
|
31
|
+
let truncationLimit = Math.max(0, LIMIT - ELLIPSIS_WIDTH);
|
|
32
|
+
let unmatchedStart = 0;
|
|
33
|
+
let unmatchedEnd = 0;
|
|
34
|
+
let width = 0;
|
|
35
|
+
let widthExtra = 0;
|
|
36
|
+
outer: while (true) {
|
|
37
|
+
if (unmatchedEnd > unmatchedStart || index >= length && index > indexPrev) {
|
|
38
|
+
const unmatched = input.slice(unmatchedStart, unmatchedEnd) || input.slice(indexPrev, index);
|
|
39
|
+
lengthExtra = 0;
|
|
40
|
+
for (const char of unmatched.replaceAll(MODIFIER_RE, "")) {
|
|
41
|
+
const codePoint = char.codePointAt(0) || 0;
|
|
42
|
+
if (isFullWidth(codePoint)) widthExtra = FULL_WIDTH_WIDTH;
|
|
43
|
+
else if (isWide(codePoint)) widthExtra = WIDE_WIDTH;
|
|
44
|
+
else if (AMBIGUOUS_WIDTH !== REGULAR_WIDTH && isAmbiguous(codePoint)) widthExtra = AMBIGUOUS_WIDTH;
|
|
45
|
+
else widthExtra = REGULAR_WIDTH;
|
|
46
|
+
if (width + widthExtra > truncationLimit) truncationIndex = Math.min(truncationIndex, Math.max(unmatchedStart, indexPrev) + lengthExtra);
|
|
47
|
+
if (width + widthExtra > LIMIT) {
|
|
48
|
+
truncationEnabled = true;
|
|
49
|
+
break outer;
|
|
50
|
+
}
|
|
51
|
+
lengthExtra += char.length;
|
|
52
|
+
width += widthExtra;
|
|
53
|
+
}
|
|
54
|
+
unmatchedStart = unmatchedEnd = 0;
|
|
55
|
+
}
|
|
56
|
+
if (index >= length) break;
|
|
57
|
+
LATIN_RE.lastIndex = index;
|
|
58
|
+
if (LATIN_RE.test(input)) {
|
|
59
|
+
lengthExtra = LATIN_RE.lastIndex - index;
|
|
60
|
+
widthExtra = lengthExtra * REGULAR_WIDTH;
|
|
61
|
+
if (width + widthExtra > truncationLimit) truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / REGULAR_WIDTH));
|
|
62
|
+
if (width + widthExtra > LIMIT) {
|
|
63
|
+
truncationEnabled = true;
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
width += widthExtra;
|
|
67
|
+
unmatchedStart = indexPrev;
|
|
68
|
+
unmatchedEnd = index;
|
|
69
|
+
index = indexPrev = LATIN_RE.lastIndex;
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
ANSI_RE.lastIndex = index;
|
|
73
|
+
if (ANSI_RE.test(input)) {
|
|
74
|
+
if (width + ANSI_WIDTH > truncationLimit) truncationIndex = Math.min(truncationIndex, index);
|
|
75
|
+
if (width + ANSI_WIDTH > LIMIT) {
|
|
76
|
+
truncationEnabled = true;
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
width += ANSI_WIDTH;
|
|
80
|
+
unmatchedStart = indexPrev;
|
|
81
|
+
unmatchedEnd = index;
|
|
82
|
+
index = indexPrev = ANSI_RE.lastIndex;
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
CONTROL_RE.lastIndex = index;
|
|
86
|
+
if (CONTROL_RE.test(input)) {
|
|
87
|
+
lengthExtra = CONTROL_RE.lastIndex - index;
|
|
88
|
+
widthExtra = lengthExtra * CONTROL_WIDTH;
|
|
89
|
+
if (width + widthExtra > truncationLimit) truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / CONTROL_WIDTH));
|
|
90
|
+
if (width + widthExtra > LIMIT) {
|
|
91
|
+
truncationEnabled = true;
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
width += widthExtra;
|
|
95
|
+
unmatchedStart = indexPrev;
|
|
96
|
+
unmatchedEnd = index;
|
|
97
|
+
index = indexPrev = CONTROL_RE.lastIndex;
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
TAB_RE.lastIndex = index;
|
|
101
|
+
if (TAB_RE.test(input)) {
|
|
102
|
+
lengthExtra = TAB_RE.lastIndex - index;
|
|
103
|
+
widthExtra = lengthExtra * TAB_WIDTH;
|
|
104
|
+
if (width + widthExtra > truncationLimit) truncationIndex = Math.min(truncationIndex, index + Math.floor((truncationLimit - width) / TAB_WIDTH));
|
|
105
|
+
if (width + widthExtra > LIMIT) {
|
|
106
|
+
truncationEnabled = true;
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
width += widthExtra;
|
|
110
|
+
unmatchedStart = indexPrev;
|
|
111
|
+
unmatchedEnd = index;
|
|
112
|
+
index = indexPrev = TAB_RE.lastIndex;
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
EMOJI_RE.lastIndex = index;
|
|
116
|
+
if (EMOJI_RE.test(input)) {
|
|
117
|
+
if (width + EMOJI_WIDTH > truncationLimit) truncationIndex = Math.min(truncationIndex, index);
|
|
118
|
+
if (width + EMOJI_WIDTH > LIMIT) {
|
|
119
|
+
truncationEnabled = true;
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
width += EMOJI_WIDTH;
|
|
123
|
+
unmatchedStart = indexPrev;
|
|
124
|
+
unmatchedEnd = index;
|
|
125
|
+
index = indexPrev = EMOJI_RE.lastIndex;
|
|
126
|
+
continue;
|
|
127
|
+
}
|
|
128
|
+
index += 1;
|
|
129
|
+
}
|
|
130
|
+
return {
|
|
131
|
+
width: truncationEnabled ? truncationLimit : width,
|
|
132
|
+
index: truncationEnabled ? truncationIndex : length,
|
|
133
|
+
truncated: truncationEnabled,
|
|
134
|
+
ellipsed: truncationEnabled && LIMIT >= ELLIPSIS_WIDTH
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
//#endregion
|
|
138
|
+
export { getStringTruncatedWidth as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region node_modules/.pnpm/fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/utils.js
|
|
2
|
+
const isAmbiguous = (x) => {
|
|
3
|
+
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;
|
|
4
|
+
};
|
|
5
|
+
const isFullWidth = (x) => {
|
|
6
|
+
return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
|
|
7
|
+
};
|
|
8
|
+
const isWide = (x) => {
|
|
9
|
+
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 >= 9800 && x <= 9811 || x === 9855 || 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 <= 12771 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 19903 || x >= 19968 && 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 >= 101632 && 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 === 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 <= 129672 || x >= 129680 && x <= 129725 || x >= 129727 && x <= 129733 || x >= 129742 && x <= 129755 || x >= 129760 && x <= 129768 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { isAmbiguous, isFullWidth, isWide };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import getStringTruncatedWidth from "../../../../fast-string-truncated-width@1.2.1/node_modules/fast-string-truncated-width/dist/index.mjs";
|
|
2
|
+
//#region node_modules/.pnpm/fast-string-width@1.1.0/node_modules/fast-string-width/dist/index.js
|
|
3
|
+
const NO_TRUNCATION = {
|
|
4
|
+
limit: Infinity,
|
|
5
|
+
ellipsis: "",
|
|
6
|
+
ellipsisWidth: 0
|
|
7
|
+
};
|
|
8
|
+
const fastStringWidth = (input, options = {}) => {
|
|
9
|
+
return getStringTruncatedWidth(input, NO_TRUNCATION, options).width;
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { fastStringWidth as default };
|
package/dist/src/node_modules/.pnpm/fast-wrap-ansi@0.1.6/node_modules/fast-wrap-ansi/lib/main.mjs
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import fastStringWidth from "../../../../fast-string-width@1.1.0/node_modules/fast-string-width/dist/index.mjs";
|
|
2
|
+
//#region node_modules/.pnpm/fast-wrap-ansi@0.1.6/node_modules/fast-wrap-ansi/lib/main.js
|
|
3
|
+
const ESC = "\x1B";
|
|
4
|
+
const CSI = "";
|
|
5
|
+
const END_CODE = 39;
|
|
6
|
+
const ANSI_ESCAPE_BELL = "\x07";
|
|
7
|
+
const ANSI_CSI = "[";
|
|
8
|
+
const ANSI_OSC = "]";
|
|
9
|
+
const ANSI_SGR_TERMINATOR = "m";
|
|
10
|
+
const ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
|
|
11
|
+
const GROUP_REGEX = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`, "y");
|
|
12
|
+
const getClosingCode = (openingCode) => {
|
|
13
|
+
if (openingCode >= 30 && openingCode <= 37) return 39;
|
|
14
|
+
if (openingCode >= 90 && openingCode <= 97) return 39;
|
|
15
|
+
if (openingCode >= 40 && openingCode <= 47) return 49;
|
|
16
|
+
if (openingCode >= 100 && openingCode <= 107) return 49;
|
|
17
|
+
if (openingCode === 1 || openingCode === 2) return 22;
|
|
18
|
+
if (openingCode === 3) return 23;
|
|
19
|
+
if (openingCode === 4) return 24;
|
|
20
|
+
if (openingCode === 7) return 27;
|
|
21
|
+
if (openingCode === 8) return 28;
|
|
22
|
+
if (openingCode === 9) return 29;
|
|
23
|
+
if (openingCode === 0) return 0;
|
|
24
|
+
};
|
|
25
|
+
const wrapAnsiCode = (code) => `${ESC}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;
|
|
26
|
+
const wrapAnsiHyperlink = (url) => `${ESC}${ANSI_ESCAPE_LINK}${url}${ANSI_ESCAPE_BELL}`;
|
|
27
|
+
const wrapWord = (rows, word, columns) => {
|
|
28
|
+
const characters = word[Symbol.iterator]();
|
|
29
|
+
let isInsideEscape = false;
|
|
30
|
+
let isInsideLinkEscape = false;
|
|
31
|
+
let lastRow = rows.at(-1);
|
|
32
|
+
let visible = lastRow === void 0 ? 0 : fastStringWidth(lastRow);
|
|
33
|
+
let currentCharacter = characters.next();
|
|
34
|
+
let nextCharacter = characters.next();
|
|
35
|
+
let rawCharacterIndex = 0;
|
|
36
|
+
while (!currentCharacter.done) {
|
|
37
|
+
const character = currentCharacter.value;
|
|
38
|
+
const characterLength = fastStringWidth(character);
|
|
39
|
+
if (visible + characterLength <= columns) rows[rows.length - 1] += character;
|
|
40
|
+
else {
|
|
41
|
+
rows.push(character);
|
|
42
|
+
visible = 0;
|
|
43
|
+
}
|
|
44
|
+
if (character === ESC || character === CSI) {
|
|
45
|
+
isInsideEscape = true;
|
|
46
|
+
isInsideLinkEscape = word.startsWith(ANSI_ESCAPE_LINK, rawCharacterIndex + 1);
|
|
47
|
+
}
|
|
48
|
+
if (isInsideEscape) {
|
|
49
|
+
if (isInsideLinkEscape) {
|
|
50
|
+
if (character === ANSI_ESCAPE_BELL) {
|
|
51
|
+
isInsideEscape = false;
|
|
52
|
+
isInsideLinkEscape = false;
|
|
53
|
+
}
|
|
54
|
+
} else if (character === ANSI_SGR_TERMINATOR) isInsideEscape = false;
|
|
55
|
+
} else {
|
|
56
|
+
visible += characterLength;
|
|
57
|
+
if (visible === columns && !nextCharacter.done) {
|
|
58
|
+
rows.push("");
|
|
59
|
+
visible = 0;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
currentCharacter = nextCharacter;
|
|
63
|
+
nextCharacter = characters.next();
|
|
64
|
+
rawCharacterIndex += character.length;
|
|
65
|
+
}
|
|
66
|
+
lastRow = rows.at(-1);
|
|
67
|
+
if (!visible && lastRow !== void 0 && lastRow.length && rows.length > 1) rows[rows.length - 2] += rows.pop();
|
|
68
|
+
};
|
|
69
|
+
const stringVisibleTrimSpacesRight = (string) => {
|
|
70
|
+
const words = string.split(" ");
|
|
71
|
+
let last = words.length;
|
|
72
|
+
while (last) {
|
|
73
|
+
if (fastStringWidth(words[last - 1])) break;
|
|
74
|
+
last--;
|
|
75
|
+
}
|
|
76
|
+
if (last === words.length) return string;
|
|
77
|
+
return words.slice(0, last).join(" ") + words.slice(last).join("");
|
|
78
|
+
};
|
|
79
|
+
const exec = (string, columns, options = {}) => {
|
|
80
|
+
if (options.trim !== false && string.trim() === "") return "";
|
|
81
|
+
let returnValue = "";
|
|
82
|
+
let escapeCode;
|
|
83
|
+
let escapeUrl;
|
|
84
|
+
const words = string.split(" ");
|
|
85
|
+
let rows = [""];
|
|
86
|
+
let rowLength = 0;
|
|
87
|
+
for (let index = 0; index < words.length; index++) {
|
|
88
|
+
const word = words[index];
|
|
89
|
+
if (options.trim !== false) {
|
|
90
|
+
const row = rows.at(-1) ?? "";
|
|
91
|
+
const trimmed = row.trimStart();
|
|
92
|
+
if (row.length !== trimmed.length) {
|
|
93
|
+
rows[rows.length - 1] = trimmed;
|
|
94
|
+
rowLength = fastStringWidth(trimmed);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
if (index !== 0) {
|
|
98
|
+
if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
|
|
99
|
+
rows.push("");
|
|
100
|
+
rowLength = 0;
|
|
101
|
+
}
|
|
102
|
+
if (rowLength || options.trim === false) {
|
|
103
|
+
rows[rows.length - 1] += " ";
|
|
104
|
+
rowLength++;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
const wordLength = fastStringWidth(word);
|
|
108
|
+
if (options.hard && wordLength > columns) {
|
|
109
|
+
const remainingColumns = columns - rowLength;
|
|
110
|
+
const breaksStartingThisLine = 1 + Math.floor((wordLength - remainingColumns - 1) / columns);
|
|
111
|
+
if (Math.floor((wordLength - 1) / columns) < breaksStartingThisLine) rows.push("");
|
|
112
|
+
wrapWord(rows, word, columns);
|
|
113
|
+
rowLength = fastStringWidth(rows.at(-1) ?? "");
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
if (rowLength + wordLength > columns && rowLength && wordLength) {
|
|
117
|
+
if (options.wordWrap === false && rowLength < columns) {
|
|
118
|
+
wrapWord(rows, word, columns);
|
|
119
|
+
rowLength = fastStringWidth(rows.at(-1) ?? "");
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
rows.push("");
|
|
123
|
+
rowLength = 0;
|
|
124
|
+
}
|
|
125
|
+
if (rowLength + wordLength > columns && options.wordWrap === false) {
|
|
126
|
+
wrapWord(rows, word, columns);
|
|
127
|
+
rowLength = fastStringWidth(rows.at(-1) ?? "");
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
rows[rows.length - 1] += word;
|
|
131
|
+
rowLength += wordLength;
|
|
132
|
+
}
|
|
133
|
+
if (options.trim !== false) rows = rows.map((row) => stringVisibleTrimSpacesRight(row));
|
|
134
|
+
const preString = rows.join("\n");
|
|
135
|
+
let inSurrogate = false;
|
|
136
|
+
for (let i = 0; i < preString.length; i++) {
|
|
137
|
+
const character = preString[i];
|
|
138
|
+
returnValue += character;
|
|
139
|
+
if (!inSurrogate) inSurrogate = character >= "\ud800" && character <= "\udbff";
|
|
140
|
+
else continue;
|
|
141
|
+
if (character === ESC || character === CSI) {
|
|
142
|
+
GROUP_REGEX.lastIndex = i + 1;
|
|
143
|
+
const groups = GROUP_REGEX.exec(preString)?.groups;
|
|
144
|
+
if (groups?.code !== void 0) {
|
|
145
|
+
const code = Number.parseFloat(groups.code);
|
|
146
|
+
escapeCode = code === END_CODE ? void 0 : code;
|
|
147
|
+
} else if (groups?.uri !== void 0) escapeUrl = groups.uri.length === 0 ? void 0 : groups.uri;
|
|
148
|
+
}
|
|
149
|
+
if (preString[i + 1] === "\n") {
|
|
150
|
+
if (escapeUrl) returnValue += wrapAnsiHyperlink("");
|
|
151
|
+
const closingCode = escapeCode ? getClosingCode(escapeCode) : void 0;
|
|
152
|
+
if (escapeCode && closingCode) returnValue += wrapAnsiCode(closingCode);
|
|
153
|
+
} else if (character === "\n") {
|
|
154
|
+
if (escapeCode && getClosingCode(escapeCode)) returnValue += wrapAnsiCode(escapeCode);
|
|
155
|
+
if (escapeUrl) returnValue += wrapAnsiHyperlink(escapeUrl);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return returnValue;
|
|
159
|
+
};
|
|
160
|
+
const CRLF_OR_LF = /\r?\n/;
|
|
161
|
+
function wrapAnsi(string, columns, options) {
|
|
162
|
+
return String(string).normalize().split(CRLF_OR_LF).map((line) => exec(line, columns, options)).join("\n");
|
|
163
|
+
}
|
|
164
|
+
//#endregion
|
|
165
|
+
export { wrapAnsi };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { __toESM } from "../../../../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { require_format } from "../../../format@0.2.2/node_modules/format/format.mjs";
|
|
3
|
+
//#region node_modules/.pnpm/fault@2.0.1/node_modules/fault/index.js
|
|
4
|
+
var import_format = /* @__PURE__ */ __toESM(require_format(), 1);
|
|
5
|
+
const fault = Object.assign(create(Error), {
|
|
6
|
+
eval: create(EvalError),
|
|
7
|
+
range: create(RangeError),
|
|
8
|
+
reference: create(ReferenceError),
|
|
9
|
+
syntax: create(SyntaxError),
|
|
10
|
+
type: create(TypeError),
|
|
11
|
+
uri: create(URIError)
|
|
12
|
+
});
|
|
13
|
+
/**
|
|
14
|
+
* Create a new `EConstructor`, with the formatted `format` as a first argument.
|
|
15
|
+
*
|
|
16
|
+
* @template {Error} Fault
|
|
17
|
+
* @template {new (reason: string) => Fault} Class
|
|
18
|
+
* @param {Class} Constructor
|
|
19
|
+
*/
|
|
20
|
+
function create(Constructor) {
|
|
21
|
+
/** @type {string} */
|
|
22
|
+
FormattedError.displayName = Constructor.displayName || Constructor.name;
|
|
23
|
+
return FormattedError;
|
|
24
|
+
/**
|
|
25
|
+
* Create an error with a printf-like formatted message.
|
|
26
|
+
*
|
|
27
|
+
* @param {string|null} [format]
|
|
28
|
+
* Template string.
|
|
29
|
+
* @param {...unknown} values
|
|
30
|
+
* Values to render in `format`.
|
|
31
|
+
* @returns {Fault}
|
|
32
|
+
*/
|
|
33
|
+
function FormattedError(format, ...values) {
|
|
34
|
+
return new Constructor(format ? (0, import_format.default)(format, ...values) : format);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { fault };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../../../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
//#region node_modules/.pnpm/format@0.2.2/node_modules/format/format.js
|
|
3
|
+
var require_format = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4
|
+
(function() {
|
|
5
|
+
var namespace;
|
|
6
|
+
if (typeof module !== "undefined") namespace = module.exports = format;
|
|
7
|
+
else namespace = function() {
|
|
8
|
+
return this || (0, eval)("this");
|
|
9
|
+
}();
|
|
10
|
+
namespace.format = format;
|
|
11
|
+
namespace.vsprintf = vsprintf;
|
|
12
|
+
if (typeof console !== "undefined" && typeof console.log === "function") namespace.printf = printf;
|
|
13
|
+
function printf() {
|
|
14
|
+
console.log(format.apply(null, arguments));
|
|
15
|
+
}
|
|
16
|
+
function vsprintf(fmt, replacements) {
|
|
17
|
+
return format.apply(null, [fmt].concat(replacements));
|
|
18
|
+
}
|
|
19
|
+
function format(fmt) {
|
|
20
|
+
var argIndex = 1, args = [].slice.call(arguments), i = 0, n = fmt.length, result = "", c, escaped = false, arg, tmp, leadingZero = false, precision, nextArg = function() {
|
|
21
|
+
return args[argIndex++];
|
|
22
|
+
}, slurpNumber = function() {
|
|
23
|
+
var digits = "";
|
|
24
|
+
while (/\d/.test(fmt[i])) {
|
|
25
|
+
digits += fmt[i++];
|
|
26
|
+
c = fmt[i];
|
|
27
|
+
}
|
|
28
|
+
return digits.length > 0 ? parseInt(digits) : null;
|
|
29
|
+
};
|
|
30
|
+
for (; i < n; ++i) {
|
|
31
|
+
c = fmt[i];
|
|
32
|
+
if (escaped) {
|
|
33
|
+
escaped = false;
|
|
34
|
+
if (c == ".") {
|
|
35
|
+
leadingZero = false;
|
|
36
|
+
c = fmt[++i];
|
|
37
|
+
} else if (c == "0" && fmt[i + 1] == ".") {
|
|
38
|
+
leadingZero = true;
|
|
39
|
+
i += 2;
|
|
40
|
+
c = fmt[i];
|
|
41
|
+
} else leadingZero = true;
|
|
42
|
+
precision = slurpNumber();
|
|
43
|
+
switch (c) {
|
|
44
|
+
case "b":
|
|
45
|
+
result += parseInt(nextArg(), 10).toString(2);
|
|
46
|
+
break;
|
|
47
|
+
case "c":
|
|
48
|
+
arg = nextArg();
|
|
49
|
+
if (typeof arg === "string" || arg instanceof String) result += arg;
|
|
50
|
+
else result += String.fromCharCode(parseInt(arg, 10));
|
|
51
|
+
break;
|
|
52
|
+
case "d":
|
|
53
|
+
result += parseInt(nextArg(), 10);
|
|
54
|
+
break;
|
|
55
|
+
case "f":
|
|
56
|
+
tmp = String(parseFloat(nextArg()).toFixed(precision || 6));
|
|
57
|
+
result += leadingZero ? tmp : tmp.replace(/^0/, "");
|
|
58
|
+
break;
|
|
59
|
+
case "j":
|
|
60
|
+
result += JSON.stringify(nextArg());
|
|
61
|
+
break;
|
|
62
|
+
case "o":
|
|
63
|
+
result += "0" + parseInt(nextArg(), 10).toString(8);
|
|
64
|
+
break;
|
|
65
|
+
case "s":
|
|
66
|
+
result += nextArg();
|
|
67
|
+
break;
|
|
68
|
+
case "x":
|
|
69
|
+
result += "0x" + parseInt(nextArg(), 10).toString(16);
|
|
70
|
+
break;
|
|
71
|
+
case "X":
|
|
72
|
+
result += "0x" + parseInt(nextArg(), 10).toString(16).toUpperCase();
|
|
73
|
+
break;
|
|
74
|
+
default:
|
|
75
|
+
result += c;
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
} else if (c === "%") escaped = true;
|
|
79
|
+
else result += c;
|
|
80
|
+
}
|
|
81
|
+
return result;
|
|
82
|
+
}
|
|
83
|
+
})();
|
|
84
|
+
}));
|
|
85
|
+
//#endregion
|
|
86
|
+
export default require_format();
|
|
87
|
+
export { require_format };
|