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,73 @@
|
|
|
1
|
+
import { splice } from "../../../micromark-util-chunked@2.0.1/node_modules/micromark-util-chunked/index.mjs";
|
|
2
|
+
//#region node_modules/.pnpm/micromark-util-combine-extensions@2.0.1/node_modules/micromark-util-combine-extensions/index.js
|
|
3
|
+
/**
|
|
4
|
+
* @import {
|
|
5
|
+
* Extension,
|
|
6
|
+
* Handles,
|
|
7
|
+
* HtmlExtension,
|
|
8
|
+
* NormalizedExtension
|
|
9
|
+
* } from 'micromark-util-types'
|
|
10
|
+
*/
|
|
11
|
+
const hasOwnProperty = {}.hasOwnProperty;
|
|
12
|
+
/**
|
|
13
|
+
* Combine multiple syntax extensions into one.
|
|
14
|
+
*
|
|
15
|
+
* @param {ReadonlyArray<Extension>} extensions
|
|
16
|
+
* List of syntax extensions.
|
|
17
|
+
* @returns {NormalizedExtension}
|
|
18
|
+
* A single combined extension.
|
|
19
|
+
*/
|
|
20
|
+
function combineExtensions(extensions) {
|
|
21
|
+
/** @type {NormalizedExtension} */
|
|
22
|
+
const all = {};
|
|
23
|
+
let index = -1;
|
|
24
|
+
while (++index < extensions.length) syntaxExtension(all, extensions[index]);
|
|
25
|
+
return all;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Merge `extension` into `all`.
|
|
29
|
+
*
|
|
30
|
+
* @param {NormalizedExtension} all
|
|
31
|
+
* Extension to merge into.
|
|
32
|
+
* @param {Extension} extension
|
|
33
|
+
* Extension to merge.
|
|
34
|
+
* @returns {undefined}
|
|
35
|
+
* Nothing.
|
|
36
|
+
*/
|
|
37
|
+
function syntaxExtension(all, extension) {
|
|
38
|
+
/** @type {keyof Extension} */
|
|
39
|
+
let hook;
|
|
40
|
+
for (hook in extension) {
|
|
41
|
+
/** @type {Record<string, unknown>} */
|
|
42
|
+
const left = (hasOwnProperty.call(all, hook) ? all[hook] : void 0) || (all[hook] = {});
|
|
43
|
+
/** @type {Record<string, unknown> | undefined} */
|
|
44
|
+
const right = extension[hook];
|
|
45
|
+
/** @type {string} */
|
|
46
|
+
let code;
|
|
47
|
+
if (right) for (code in right) {
|
|
48
|
+
if (!hasOwnProperty.call(left, code)) left[code] = [];
|
|
49
|
+
const value = right[code];
|
|
50
|
+
constructs(left[code], Array.isArray(value) ? value : value ? [value] : []);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Merge `list` into `existing` (both lists of constructs).
|
|
56
|
+
* Mutates `existing`.
|
|
57
|
+
*
|
|
58
|
+
* @param {Array<unknown>} existing
|
|
59
|
+
* List of constructs to merge into.
|
|
60
|
+
* @param {Array<unknown>} list
|
|
61
|
+
* List of constructs to merge.
|
|
62
|
+
* @returns {undefined}
|
|
63
|
+
* Nothing.
|
|
64
|
+
*/
|
|
65
|
+
function constructs(existing, list) {
|
|
66
|
+
let index = -1;
|
|
67
|
+
/** @type {Array<unknown>} */
|
|
68
|
+
const before = [];
|
|
69
|
+
while (++index < list.length) (list[index].add === "after" ? existing : before).push(list[index]);
|
|
70
|
+
splice(existing, 0, 0, before);
|
|
71
|
+
}
|
|
72
|
+
//#endregion
|
|
73
|
+
export { combineExtensions };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//#region node_modules/.pnpm/micromark-util-decode-numeric-character-reference@2.0.2/node_modules/micromark-util-decode-numeric-character-reference/index.js
|
|
2
|
+
/**
|
|
3
|
+
* Turn the number (in string form as either hexa- or plain decimal) coming from
|
|
4
|
+
* a numeric character reference into a character.
|
|
5
|
+
*
|
|
6
|
+
* Sort of like `String.fromCodePoint(Number.parseInt(value, base))`, but makes
|
|
7
|
+
* non-characters and control characters safe.
|
|
8
|
+
*
|
|
9
|
+
* @param {string} value
|
|
10
|
+
* Value to decode.
|
|
11
|
+
* @param {number} base
|
|
12
|
+
* Numeric base.
|
|
13
|
+
* @returns {string}
|
|
14
|
+
* Character.
|
|
15
|
+
*/
|
|
16
|
+
function decodeNumericCharacterReference(value, base) {
|
|
17
|
+
const code = Number.parseInt(value, base);
|
|
18
|
+
if (code < 9 || code === 11 || code > 13 && code < 32 || code > 126 && code < 160 || code > 55295 && code < 57344 || code > 64975 && code < 65008 || (code & 65535) === 65535 || (code & 65535) === 65534 || code > 1114111) return "�";
|
|
19
|
+
return String.fromCodePoint(code);
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { decodeNumericCharacterReference };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { decodeNamedCharacterReference } from "../../../decode-named-character-reference@1.3.0/node_modules/decode-named-character-reference/index.mjs";
|
|
2
|
+
import { decodeNumericCharacterReference } from "../../../micromark-util-decode-numeric-character-reference@2.0.2/node_modules/micromark-util-decode-numeric-character-reference/index.mjs";
|
|
3
|
+
//#region node_modules/.pnpm/micromark-util-decode-string@2.0.1/node_modules/micromark-util-decode-string/index.js
|
|
4
|
+
const characterEscapeOrReference = /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;
|
|
5
|
+
/**
|
|
6
|
+
* Decode markdown strings (which occur in places such as fenced code info
|
|
7
|
+
* strings, destinations, labels, and titles).
|
|
8
|
+
*
|
|
9
|
+
* The “string” content type allows character escapes and -references.
|
|
10
|
+
* This decodes those.
|
|
11
|
+
*
|
|
12
|
+
* @param {string} value
|
|
13
|
+
* Value to decode.
|
|
14
|
+
* @returns {string}
|
|
15
|
+
* Decoded value.
|
|
16
|
+
*/
|
|
17
|
+
function decodeString(value) {
|
|
18
|
+
return value.replace(characterEscapeOrReference, decode);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* @param {string} $0
|
|
22
|
+
* Match.
|
|
23
|
+
* @param {string} $1
|
|
24
|
+
* Character escape.
|
|
25
|
+
* @param {string} $2
|
|
26
|
+
* Character reference.
|
|
27
|
+
* @returns {string}
|
|
28
|
+
* Decoded value
|
|
29
|
+
*/
|
|
30
|
+
function decode($0, $1, $2) {
|
|
31
|
+
if ($1) return $1;
|
|
32
|
+
if ($2.charCodeAt(0) === 35) {
|
|
33
|
+
const head = $2.charCodeAt(1);
|
|
34
|
+
const hex = head === 120 || head === 88;
|
|
35
|
+
return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10);
|
|
36
|
+
}
|
|
37
|
+
return decodeNamedCharacterReference($2) || $0;
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export { decodeString };
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
//#region node_modules/.pnpm/micromark-util-html-tag-name@2.0.1/node_modules/micromark-util-html-tag-name/index.js
|
|
2
|
+
/**
|
|
3
|
+
* List of lowercase HTML “block” tag names.
|
|
4
|
+
*
|
|
5
|
+
* The list, when parsing HTML (flow), results in more relaxed rules (condition
|
|
6
|
+
* 6).
|
|
7
|
+
* Because they are known blocks, the HTML-like syntax doesn’t have to be
|
|
8
|
+
* strictly parsed.
|
|
9
|
+
* For tag names not in this list, a more strict algorithm (condition 7) is used
|
|
10
|
+
* to detect whether the HTML-like syntax is seen as HTML (flow) or not.
|
|
11
|
+
*
|
|
12
|
+
* This is copied from:
|
|
13
|
+
* <https://spec.commonmark.org/0.30/#html-blocks>.
|
|
14
|
+
*
|
|
15
|
+
* > 👉 **Note**: `search` was added in `CommonMark@0.31`.
|
|
16
|
+
*/
|
|
17
|
+
const htmlBlockNames = [
|
|
18
|
+
"address",
|
|
19
|
+
"article",
|
|
20
|
+
"aside",
|
|
21
|
+
"base",
|
|
22
|
+
"basefont",
|
|
23
|
+
"blockquote",
|
|
24
|
+
"body",
|
|
25
|
+
"caption",
|
|
26
|
+
"center",
|
|
27
|
+
"col",
|
|
28
|
+
"colgroup",
|
|
29
|
+
"dd",
|
|
30
|
+
"details",
|
|
31
|
+
"dialog",
|
|
32
|
+
"dir",
|
|
33
|
+
"div",
|
|
34
|
+
"dl",
|
|
35
|
+
"dt",
|
|
36
|
+
"fieldset",
|
|
37
|
+
"figcaption",
|
|
38
|
+
"figure",
|
|
39
|
+
"footer",
|
|
40
|
+
"form",
|
|
41
|
+
"frame",
|
|
42
|
+
"frameset",
|
|
43
|
+
"h1",
|
|
44
|
+
"h2",
|
|
45
|
+
"h3",
|
|
46
|
+
"h4",
|
|
47
|
+
"h5",
|
|
48
|
+
"h6",
|
|
49
|
+
"head",
|
|
50
|
+
"header",
|
|
51
|
+
"hr",
|
|
52
|
+
"html",
|
|
53
|
+
"iframe",
|
|
54
|
+
"legend",
|
|
55
|
+
"li",
|
|
56
|
+
"link",
|
|
57
|
+
"main",
|
|
58
|
+
"menu",
|
|
59
|
+
"menuitem",
|
|
60
|
+
"nav",
|
|
61
|
+
"noframes",
|
|
62
|
+
"ol",
|
|
63
|
+
"optgroup",
|
|
64
|
+
"option",
|
|
65
|
+
"p",
|
|
66
|
+
"param",
|
|
67
|
+
"search",
|
|
68
|
+
"section",
|
|
69
|
+
"summary",
|
|
70
|
+
"table",
|
|
71
|
+
"tbody",
|
|
72
|
+
"td",
|
|
73
|
+
"tfoot",
|
|
74
|
+
"th",
|
|
75
|
+
"thead",
|
|
76
|
+
"title",
|
|
77
|
+
"tr",
|
|
78
|
+
"track",
|
|
79
|
+
"ul"
|
|
80
|
+
];
|
|
81
|
+
/**
|
|
82
|
+
* List of lowercase HTML “raw” tag names.
|
|
83
|
+
*
|
|
84
|
+
* The list, when parsing HTML (flow), results in HTML that can include lines
|
|
85
|
+
* without exiting, until a closing tag also in this list is found (condition
|
|
86
|
+
* 1).
|
|
87
|
+
*
|
|
88
|
+
* This module is copied from:
|
|
89
|
+
* <https://spec.commonmark.org/0.30/#html-blocks>.
|
|
90
|
+
*
|
|
91
|
+
* > 👉 **Note**: `textarea` was added in `CommonMark@0.30`.
|
|
92
|
+
*/
|
|
93
|
+
const htmlRawNames = [
|
|
94
|
+
"pre",
|
|
95
|
+
"script",
|
|
96
|
+
"style",
|
|
97
|
+
"textarea"
|
|
98
|
+
];
|
|
99
|
+
//#endregion
|
|
100
|
+
export { htmlBlockNames, htmlRawNames };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//#region node_modules/.pnpm/micromark-util-normalize-identifier@2.0.1/node_modules/micromark-util-normalize-identifier/index.js
|
|
2
|
+
/**
|
|
3
|
+
* Normalize an identifier (as found in references, definitions).
|
|
4
|
+
*
|
|
5
|
+
* Collapses markdown whitespace, trim, and then lower- and uppercase.
|
|
6
|
+
*
|
|
7
|
+
* Some characters are considered “uppercase”, such as U+03F4 (`ϴ`), but if their
|
|
8
|
+
* lowercase counterpart (U+03B8 (`θ`)) is uppercased will result in a different
|
|
9
|
+
* uppercase character (U+0398 (`Θ`)).
|
|
10
|
+
* So, to get a canonical form, we perform both lower- and uppercase.
|
|
11
|
+
*
|
|
12
|
+
* Using uppercase last makes sure keys will never interact with default
|
|
13
|
+
* prototypal values (such as `constructor`): nothing in the prototype of
|
|
14
|
+
* `Object` is uppercase.
|
|
15
|
+
*
|
|
16
|
+
* @param {string} value
|
|
17
|
+
* Identifier to normalize.
|
|
18
|
+
* @returns {string}
|
|
19
|
+
* Normalized identifier.
|
|
20
|
+
*/
|
|
21
|
+
function normalizeIdentifier(value) {
|
|
22
|
+
return value.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { normalizeIdentifier };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//#region node_modules/.pnpm/micromark-util-resolve-all@2.0.1/node_modules/micromark-util-resolve-all/index.js
|
|
2
|
+
/**
|
|
3
|
+
* @import {Event, Resolver, TokenizeContext} from 'micromark-util-types'
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Call all `resolveAll`s.
|
|
7
|
+
*
|
|
8
|
+
* @param {ReadonlyArray<{resolveAll?: Resolver | undefined}>} constructs
|
|
9
|
+
* List of constructs, optionally with `resolveAll`s.
|
|
10
|
+
* @param {Array<Event>} events
|
|
11
|
+
* List of events.
|
|
12
|
+
* @param {TokenizeContext} context
|
|
13
|
+
* Context used by `tokenize`.
|
|
14
|
+
* @returns {Array<Event>}
|
|
15
|
+
* Changed events.
|
|
16
|
+
*/
|
|
17
|
+
function resolveAll(constructs, events, context) {
|
|
18
|
+
/** @type {Array<Resolver>} */
|
|
19
|
+
const called = [];
|
|
20
|
+
let index = -1;
|
|
21
|
+
while (++index < constructs.length) {
|
|
22
|
+
const resolve = constructs[index].resolveAll;
|
|
23
|
+
if (resolve && !called.includes(resolve)) {
|
|
24
|
+
events = resolve(events, context);
|
|
25
|
+
called.push(resolve);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return events;
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { resolveAll };
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { splice } from "../../../micromark-util-chunked@2.0.1/node_modules/micromark-util-chunked/index.mjs";
|
|
2
|
+
import { SpliceBuffer } from "./lib/splice-buffer.mjs";
|
|
3
|
+
//#region node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/index.js
|
|
4
|
+
/**
|
|
5
|
+
* @import {Chunk, Event, Token} from 'micromark-util-types'
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Tokenize subcontent.
|
|
9
|
+
*
|
|
10
|
+
* @param {Array<Event>} eventsArray
|
|
11
|
+
* List of events.
|
|
12
|
+
* @returns {boolean}
|
|
13
|
+
* Whether subtokens were found.
|
|
14
|
+
*/
|
|
15
|
+
function subtokenize(eventsArray) {
|
|
16
|
+
/** @type {Record<string, number>} */
|
|
17
|
+
const jumps = {};
|
|
18
|
+
let index = -1;
|
|
19
|
+
/** @type {Event} */
|
|
20
|
+
let event;
|
|
21
|
+
/** @type {number | undefined} */
|
|
22
|
+
let lineIndex;
|
|
23
|
+
/** @type {number} */
|
|
24
|
+
let otherIndex;
|
|
25
|
+
/** @type {Event} */
|
|
26
|
+
let otherEvent;
|
|
27
|
+
/** @type {Array<Event>} */
|
|
28
|
+
let parameters;
|
|
29
|
+
/** @type {Array<Event>} */
|
|
30
|
+
let subevents;
|
|
31
|
+
/** @type {boolean | undefined} */
|
|
32
|
+
let more;
|
|
33
|
+
const events = new SpliceBuffer(eventsArray);
|
|
34
|
+
while (++index < events.length) {
|
|
35
|
+
while (index in jumps) index = jumps[index];
|
|
36
|
+
event = events.get(index);
|
|
37
|
+
if (index && event[1].type === "chunkFlow" && events.get(index - 1)[1].type === "listItemPrefix") {
|
|
38
|
+
subevents = event[1]._tokenizer.events;
|
|
39
|
+
otherIndex = 0;
|
|
40
|
+
if (otherIndex < subevents.length && subevents[otherIndex][1].type === "lineEndingBlank") otherIndex += 2;
|
|
41
|
+
if (otherIndex < subevents.length && subevents[otherIndex][1].type === "content") while (++otherIndex < subevents.length) {
|
|
42
|
+
if (subevents[otherIndex][1].type === "content") break;
|
|
43
|
+
if (subevents[otherIndex][1].type === "chunkText") {
|
|
44
|
+
subevents[otherIndex][1]._isInFirstContentOfListItem = true;
|
|
45
|
+
otherIndex++;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
if (event[0] === "enter") {
|
|
50
|
+
if (event[1].contentType) {
|
|
51
|
+
Object.assign(jumps, subcontent(events, index));
|
|
52
|
+
index = jumps[index];
|
|
53
|
+
more = true;
|
|
54
|
+
}
|
|
55
|
+
} else if (event[1]._container) {
|
|
56
|
+
otherIndex = index;
|
|
57
|
+
lineIndex = void 0;
|
|
58
|
+
while (otherIndex--) {
|
|
59
|
+
otherEvent = events.get(otherIndex);
|
|
60
|
+
if (otherEvent[1].type === "lineEnding" || otherEvent[1].type === "lineEndingBlank") {
|
|
61
|
+
if (otherEvent[0] === "enter") {
|
|
62
|
+
if (lineIndex) events.get(lineIndex)[1].type = "lineEndingBlank";
|
|
63
|
+
otherEvent[1].type = "lineEnding";
|
|
64
|
+
lineIndex = otherIndex;
|
|
65
|
+
}
|
|
66
|
+
} else if (otherEvent[1].type === "linePrefix" || otherEvent[1].type === "listItemIndent") {} else break;
|
|
67
|
+
}
|
|
68
|
+
if (lineIndex) {
|
|
69
|
+
event[1].end = { ...events.get(lineIndex)[1].start };
|
|
70
|
+
parameters = events.slice(lineIndex, index);
|
|
71
|
+
parameters.unshift(event);
|
|
72
|
+
events.splice(lineIndex, index - lineIndex + 1, parameters);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
splice(eventsArray, 0, Number.POSITIVE_INFINITY, events.slice(0));
|
|
77
|
+
return !more;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Tokenize embedded tokens.
|
|
81
|
+
*
|
|
82
|
+
* @param {SpliceBuffer<Event>} events
|
|
83
|
+
* Events.
|
|
84
|
+
* @param {number} eventIndex
|
|
85
|
+
* Index.
|
|
86
|
+
* @returns {Record<string, number>}
|
|
87
|
+
* Gaps.
|
|
88
|
+
*/
|
|
89
|
+
function subcontent(events, eventIndex) {
|
|
90
|
+
const token = events.get(eventIndex)[1];
|
|
91
|
+
const context = events.get(eventIndex)[2];
|
|
92
|
+
let startPosition = eventIndex - 1;
|
|
93
|
+
/** @type {Array<number>} */
|
|
94
|
+
const startPositions = [];
|
|
95
|
+
let tokenizer = token._tokenizer;
|
|
96
|
+
if (!tokenizer) {
|
|
97
|
+
tokenizer = context.parser[token.contentType](token.start);
|
|
98
|
+
if (token._contentTypeTextTrailing) tokenizer._contentTypeTextTrailing = true;
|
|
99
|
+
}
|
|
100
|
+
const childEvents = tokenizer.events;
|
|
101
|
+
/** @type {Array<[number, number]>} */
|
|
102
|
+
const jumps = [];
|
|
103
|
+
/** @type {Record<string, number>} */
|
|
104
|
+
const gaps = {};
|
|
105
|
+
/** @type {Array<Chunk>} */
|
|
106
|
+
let stream;
|
|
107
|
+
/** @type {Token | undefined} */
|
|
108
|
+
let previous;
|
|
109
|
+
let index = -1;
|
|
110
|
+
/** @type {Token | undefined} */
|
|
111
|
+
let current = token;
|
|
112
|
+
let adjust = 0;
|
|
113
|
+
let start = 0;
|
|
114
|
+
const breaks = [start];
|
|
115
|
+
while (current) {
|
|
116
|
+
while (events.get(++startPosition)[1] !== current);
|
|
117
|
+
startPositions.push(startPosition);
|
|
118
|
+
if (!current._tokenizer) {
|
|
119
|
+
stream = context.sliceStream(current);
|
|
120
|
+
if (!current.next) stream.push(null);
|
|
121
|
+
if (previous) tokenizer.defineSkip(current.start);
|
|
122
|
+
if (current._isInFirstContentOfListItem) tokenizer._gfmTasklistFirstContentOfListItem = true;
|
|
123
|
+
tokenizer.write(stream);
|
|
124
|
+
if (current._isInFirstContentOfListItem) tokenizer._gfmTasklistFirstContentOfListItem = void 0;
|
|
125
|
+
}
|
|
126
|
+
previous = current;
|
|
127
|
+
current = current.next;
|
|
128
|
+
}
|
|
129
|
+
current = token;
|
|
130
|
+
while (++index < childEvents.length) if (childEvents[index][0] === "exit" && childEvents[index - 1][0] === "enter" && childEvents[index][1].type === childEvents[index - 1][1].type && childEvents[index][1].start.line !== childEvents[index][1].end.line) {
|
|
131
|
+
start = index + 1;
|
|
132
|
+
breaks.push(start);
|
|
133
|
+
current._tokenizer = void 0;
|
|
134
|
+
current.previous = void 0;
|
|
135
|
+
current = current.next;
|
|
136
|
+
}
|
|
137
|
+
tokenizer.events = [];
|
|
138
|
+
if (current) {
|
|
139
|
+
current._tokenizer = void 0;
|
|
140
|
+
current.previous = void 0;
|
|
141
|
+
} else breaks.pop();
|
|
142
|
+
index = breaks.length;
|
|
143
|
+
while (index--) {
|
|
144
|
+
const slice = childEvents.slice(breaks[index], breaks[index + 1]);
|
|
145
|
+
const start = startPositions.pop();
|
|
146
|
+
jumps.push([start, start + slice.length - 1]);
|
|
147
|
+
events.splice(start, 2, slice);
|
|
148
|
+
}
|
|
149
|
+
jumps.reverse();
|
|
150
|
+
index = -1;
|
|
151
|
+
while (++index < jumps.length) {
|
|
152
|
+
gaps[adjust + jumps[index][0]] = adjust + jumps[index][1];
|
|
153
|
+
adjust += jumps[index][1] - jumps[index][0] - 1;
|
|
154
|
+
}
|
|
155
|
+
return gaps;
|
|
156
|
+
}
|
|
157
|
+
//#endregion
|
|
158
|
+
export { subtokenize };
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
//#region node_modules/.pnpm/micromark-util-subtokenize@2.1.0/node_modules/micromark-util-subtokenize/lib/splice-buffer.js
|
|
2
|
+
/**
|
|
3
|
+
* Some of the internal operations of micromark do lots of editing
|
|
4
|
+
* operations on very large arrays. This runs into problems with two
|
|
5
|
+
* properties of most circa-2020 JavaScript interpreters:
|
|
6
|
+
*
|
|
7
|
+
* - Array-length modifications at the high end of an array (push/pop) are
|
|
8
|
+
* expected to be common and are implemented in (amortized) time
|
|
9
|
+
* proportional to the number of elements added or removed, whereas
|
|
10
|
+
* other operations (shift/unshift and splice) are much less efficient.
|
|
11
|
+
* - Function arguments are passed on the stack, so adding tens of thousands
|
|
12
|
+
* of elements to an array with `arr.push(...newElements)` will frequently
|
|
13
|
+
* cause stack overflows. (see <https://stackoverflow.com/questions/22123769/rangeerror-maximum-call-stack-size-exceeded-why>)
|
|
14
|
+
*
|
|
15
|
+
* SpliceBuffers are an implementation of gap buffers, which are a
|
|
16
|
+
* generalization of the "queue made of two stacks" idea. The splice buffer
|
|
17
|
+
* maintains a cursor, and moving the cursor has cost proportional to the
|
|
18
|
+
* distance the cursor moves, but inserting, deleting, or splicing in
|
|
19
|
+
* new information at the cursor is as efficient as the push/pop operation.
|
|
20
|
+
* This allows for an efficient sequence of splices (or pushes, pops, shifts,
|
|
21
|
+
* or unshifts) as long such edits happen at the same part of the array or
|
|
22
|
+
* generally sweep through the array from the beginning to the end.
|
|
23
|
+
*
|
|
24
|
+
* The interface for splice buffers also supports large numbers of inputs by
|
|
25
|
+
* passing a single array argument rather passing multiple arguments on the
|
|
26
|
+
* function call stack.
|
|
27
|
+
*
|
|
28
|
+
* @template T
|
|
29
|
+
* Item type.
|
|
30
|
+
*/
|
|
31
|
+
var SpliceBuffer = class {
|
|
32
|
+
/**
|
|
33
|
+
* @param {ReadonlyArray<T> | null | undefined} [initial]
|
|
34
|
+
* Initial items (optional).
|
|
35
|
+
* @returns
|
|
36
|
+
* Splice buffer.
|
|
37
|
+
*/
|
|
38
|
+
constructor(initial) {
|
|
39
|
+
/** @type {Array<T>} */
|
|
40
|
+
this.left = initial ? [...initial] : [];
|
|
41
|
+
/** @type {Array<T>} */
|
|
42
|
+
this.right = [];
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Array access;
|
|
46
|
+
* does not move the cursor.
|
|
47
|
+
*
|
|
48
|
+
* @param {number} index
|
|
49
|
+
* Index.
|
|
50
|
+
* @return {T}
|
|
51
|
+
* Item.
|
|
52
|
+
*/
|
|
53
|
+
get(index) {
|
|
54
|
+
if (index < 0 || index >= this.left.length + this.right.length) throw new RangeError("Cannot access index `" + index + "` in a splice buffer of size `" + (this.left.length + this.right.length) + "`");
|
|
55
|
+
if (index < this.left.length) return this.left[index];
|
|
56
|
+
return this.right[this.right.length - index + this.left.length - 1];
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The length of the splice buffer, one greater than the largest index in the
|
|
60
|
+
* array.
|
|
61
|
+
*/
|
|
62
|
+
get length() {
|
|
63
|
+
return this.left.length + this.right.length;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Remove and return `list[0]`;
|
|
67
|
+
* moves the cursor to `0`.
|
|
68
|
+
*
|
|
69
|
+
* @returns {T | undefined}
|
|
70
|
+
* Item, optional.
|
|
71
|
+
*/
|
|
72
|
+
shift() {
|
|
73
|
+
this.setCursor(0);
|
|
74
|
+
return this.right.pop();
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Slice the buffer to get an array;
|
|
78
|
+
* does not move the cursor.
|
|
79
|
+
*
|
|
80
|
+
* @param {number} start
|
|
81
|
+
* Start.
|
|
82
|
+
* @param {number | null | undefined} [end]
|
|
83
|
+
* End (optional).
|
|
84
|
+
* @returns {Array<T>}
|
|
85
|
+
* Array of items.
|
|
86
|
+
*/
|
|
87
|
+
slice(start, end) {
|
|
88
|
+
/** @type {number} */
|
|
89
|
+
const stop = end === null || end === void 0 ? Number.POSITIVE_INFINITY : end;
|
|
90
|
+
if (stop < this.left.length) return this.left.slice(start, stop);
|
|
91
|
+
if (start > this.left.length) return this.right.slice(this.right.length - stop + this.left.length, this.right.length - start + this.left.length).reverse();
|
|
92
|
+
return this.left.slice(start).concat(this.right.slice(this.right.length - stop + this.left.length).reverse());
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Mimics the behavior of Array.prototype.splice() except for the change of
|
|
96
|
+
* interface necessary to avoid segfaults when patching in very large arrays.
|
|
97
|
+
*
|
|
98
|
+
* This operation moves cursor is moved to `start` and results in the cursor
|
|
99
|
+
* placed after any inserted items.
|
|
100
|
+
*
|
|
101
|
+
* @param {number} start
|
|
102
|
+
* Start;
|
|
103
|
+
* zero-based index at which to start changing the array;
|
|
104
|
+
* negative numbers count backwards from the end of the array and values
|
|
105
|
+
* that are out-of bounds are clamped to the appropriate end of the array.
|
|
106
|
+
* @param {number | null | undefined} [deleteCount=0]
|
|
107
|
+
* Delete count (default: `0`);
|
|
108
|
+
* maximum number of elements to delete, starting from start.
|
|
109
|
+
* @param {Array<T> | null | undefined} [items=[]]
|
|
110
|
+
* Items to include in place of the deleted items (default: `[]`).
|
|
111
|
+
* @return {Array<T>}
|
|
112
|
+
* Any removed items.
|
|
113
|
+
*/
|
|
114
|
+
splice(start, deleteCount, items) {
|
|
115
|
+
/** @type {number} */
|
|
116
|
+
const count = deleteCount || 0;
|
|
117
|
+
this.setCursor(Math.trunc(start));
|
|
118
|
+
const removed = this.right.splice(this.right.length - count, Number.POSITIVE_INFINITY);
|
|
119
|
+
if (items) chunkedPush(this.left, items);
|
|
120
|
+
return removed.reverse();
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Remove and return the highest-numbered item in the array, so
|
|
124
|
+
* `list[list.length - 1]`;
|
|
125
|
+
* Moves the cursor to `length`.
|
|
126
|
+
*
|
|
127
|
+
* @returns {T | undefined}
|
|
128
|
+
* Item, optional.
|
|
129
|
+
*/
|
|
130
|
+
pop() {
|
|
131
|
+
this.setCursor(Number.POSITIVE_INFINITY);
|
|
132
|
+
return this.left.pop();
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Inserts a single item to the high-numbered side of the array;
|
|
136
|
+
* moves the cursor to `length`.
|
|
137
|
+
*
|
|
138
|
+
* @param {T} item
|
|
139
|
+
* Item.
|
|
140
|
+
* @returns {undefined}
|
|
141
|
+
* Nothing.
|
|
142
|
+
*/
|
|
143
|
+
push(item) {
|
|
144
|
+
this.setCursor(Number.POSITIVE_INFINITY);
|
|
145
|
+
this.left.push(item);
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Inserts many items to the high-numbered side of the array.
|
|
149
|
+
* Moves the cursor to `length`.
|
|
150
|
+
*
|
|
151
|
+
* @param {Array<T>} items
|
|
152
|
+
* Items.
|
|
153
|
+
* @returns {undefined}
|
|
154
|
+
* Nothing.
|
|
155
|
+
*/
|
|
156
|
+
pushMany(items) {
|
|
157
|
+
this.setCursor(Number.POSITIVE_INFINITY);
|
|
158
|
+
chunkedPush(this.left, items);
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Inserts a single item to the low-numbered side of the array;
|
|
162
|
+
* Moves the cursor to `0`.
|
|
163
|
+
*
|
|
164
|
+
* @param {T} item
|
|
165
|
+
* Item.
|
|
166
|
+
* @returns {undefined}
|
|
167
|
+
* Nothing.
|
|
168
|
+
*/
|
|
169
|
+
unshift(item) {
|
|
170
|
+
this.setCursor(0);
|
|
171
|
+
this.right.push(item);
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Inserts many items to the low-numbered side of the array;
|
|
175
|
+
* moves the cursor to `0`.
|
|
176
|
+
*
|
|
177
|
+
* @param {Array<T>} items
|
|
178
|
+
* Items.
|
|
179
|
+
* @returns {undefined}
|
|
180
|
+
* Nothing.
|
|
181
|
+
*/
|
|
182
|
+
unshiftMany(items) {
|
|
183
|
+
this.setCursor(0);
|
|
184
|
+
chunkedPush(this.right, items.reverse());
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Move the cursor to a specific position in the array. Requires
|
|
188
|
+
* time proportional to the distance moved.
|
|
189
|
+
*
|
|
190
|
+
* If `n < 0`, the cursor will end up at the beginning.
|
|
191
|
+
* If `n > length`, the cursor will end up at the end.
|
|
192
|
+
*
|
|
193
|
+
* @param {number} n
|
|
194
|
+
* Position.
|
|
195
|
+
* @return {undefined}
|
|
196
|
+
* Nothing.
|
|
197
|
+
*/
|
|
198
|
+
setCursor(n) {
|
|
199
|
+
if (n === this.left.length || n > this.left.length && this.right.length === 0 || n < 0 && this.left.length === 0) return;
|
|
200
|
+
if (n < this.left.length) {
|
|
201
|
+
const removed = this.left.splice(n, Number.POSITIVE_INFINITY);
|
|
202
|
+
chunkedPush(this.right, removed.reverse());
|
|
203
|
+
} else {
|
|
204
|
+
const removed = this.right.splice(this.left.length + this.right.length - n, Number.POSITIVE_INFINITY);
|
|
205
|
+
chunkedPush(this.left, removed.reverse());
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
/**
|
|
210
|
+
* Avoid stack overflow by pushing items onto the stack in segments
|
|
211
|
+
*
|
|
212
|
+
* @template T
|
|
213
|
+
* Item type.
|
|
214
|
+
* @param {Array<T>} list
|
|
215
|
+
* List to inject into.
|
|
216
|
+
* @param {ReadonlyArray<T>} right
|
|
217
|
+
* Items to inject.
|
|
218
|
+
* @return {undefined}
|
|
219
|
+
* Nothing.
|
|
220
|
+
*/
|
|
221
|
+
function chunkedPush(list, right) {
|
|
222
|
+
/** @type {number} */
|
|
223
|
+
let chunkStart = 0;
|
|
224
|
+
if (right.length < 1e4) list.push(...right);
|
|
225
|
+
else while (chunkStart < right.length) {
|
|
226
|
+
list.push(...right.slice(chunkStart, chunkStart + 1e4));
|
|
227
|
+
chunkStart += 1e4;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
//#endregion
|
|
231
|
+
export { SpliceBuffer };
|