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,525 @@
|
|
|
1
|
+
import { VFileMessage } from "../../../../vfile-message@4.0.3/node_modules/vfile-message/lib/index.mjs";
|
|
2
|
+
import { minpath } from "./minpath.mjs";
|
|
3
|
+
import { minproc } from "./minproc.mjs";
|
|
4
|
+
import { isUrl } from "./minurl.shared.mjs";
|
|
5
|
+
import { urlToPath } from "./minurl.mjs";
|
|
6
|
+
//#region node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/index.js
|
|
7
|
+
/**
|
|
8
|
+
* @import {Node, Point, Position} from 'unist'
|
|
9
|
+
* @import {Options as MessageOptions} from 'vfile-message'
|
|
10
|
+
* @import {Compatible, Data, Map, Options, Value} from 'vfile'
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* @typedef {object & {type: string, position?: Position | undefined}} NodeLike
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* Order of setting (least specific to most), we need this because otherwise
|
|
17
|
+
* `{stem: 'a', path: '~/b.js'}` would throw, as a path is needed before a
|
|
18
|
+
* stem can be set.
|
|
19
|
+
*/
|
|
20
|
+
const order = [
|
|
21
|
+
"history",
|
|
22
|
+
"path",
|
|
23
|
+
"basename",
|
|
24
|
+
"stem",
|
|
25
|
+
"extname",
|
|
26
|
+
"dirname"
|
|
27
|
+
];
|
|
28
|
+
var VFile = class {
|
|
29
|
+
/**
|
|
30
|
+
* Create a new virtual file.
|
|
31
|
+
*
|
|
32
|
+
* `options` is treated as:
|
|
33
|
+
*
|
|
34
|
+
* * `string` or `Uint8Array` — `{value: options}`
|
|
35
|
+
* * `URL` — `{path: options}`
|
|
36
|
+
* * `VFile` — shallow copies its data over to the new file
|
|
37
|
+
* * `object` — all fields are shallow copied over to the new file
|
|
38
|
+
*
|
|
39
|
+
* Path related fields are set in the following order (least specific to
|
|
40
|
+
* most specific): `history`, `path`, `basename`, `stem`, `extname`,
|
|
41
|
+
* `dirname`.
|
|
42
|
+
*
|
|
43
|
+
* You cannot set `dirname` or `extname` without setting either `history`,
|
|
44
|
+
* `path`, `basename`, or `stem` too.
|
|
45
|
+
*
|
|
46
|
+
* @param {Compatible | null | undefined} [value]
|
|
47
|
+
* File value.
|
|
48
|
+
* @returns
|
|
49
|
+
* New instance.
|
|
50
|
+
*/
|
|
51
|
+
constructor(value) {
|
|
52
|
+
/** @type {Options | VFile} */
|
|
53
|
+
let options;
|
|
54
|
+
if (!value) options = {};
|
|
55
|
+
else if (isUrl(value)) options = { path: value };
|
|
56
|
+
else if (typeof value === "string" || isUint8Array(value)) options = { value };
|
|
57
|
+
else options = value;
|
|
58
|
+
/**
|
|
59
|
+
* Base of `path` (default: `process.cwd()` or `'/'` in browsers).
|
|
60
|
+
*
|
|
61
|
+
* @type {string}
|
|
62
|
+
*/
|
|
63
|
+
this.cwd = "cwd" in options ? "" : minproc.cwd();
|
|
64
|
+
/**
|
|
65
|
+
* Place to store custom info (default: `{}`).
|
|
66
|
+
*
|
|
67
|
+
* It’s OK to store custom data directly on the file but moving it to
|
|
68
|
+
* `data` is recommended.
|
|
69
|
+
*
|
|
70
|
+
* @type {Data}
|
|
71
|
+
*/
|
|
72
|
+
this.data = {};
|
|
73
|
+
/**
|
|
74
|
+
* List of file paths the file moved between.
|
|
75
|
+
*
|
|
76
|
+
* The first is the original path and the last is the current path.
|
|
77
|
+
*
|
|
78
|
+
* @type {Array<string>}
|
|
79
|
+
*/
|
|
80
|
+
this.history = [];
|
|
81
|
+
/**
|
|
82
|
+
* List of messages associated with the file.
|
|
83
|
+
*
|
|
84
|
+
* @type {Array<VFileMessage>}
|
|
85
|
+
*/
|
|
86
|
+
this.messages = [];
|
|
87
|
+
/**
|
|
88
|
+
* Raw value.
|
|
89
|
+
*
|
|
90
|
+
* @type {Value}
|
|
91
|
+
*/
|
|
92
|
+
this.value;
|
|
93
|
+
/**
|
|
94
|
+
* Source map.
|
|
95
|
+
*
|
|
96
|
+
* This type is equivalent to the `RawSourceMap` type from the `source-map`
|
|
97
|
+
* module.
|
|
98
|
+
*
|
|
99
|
+
* @type {Map | null | undefined}
|
|
100
|
+
*/
|
|
101
|
+
this.map;
|
|
102
|
+
/**
|
|
103
|
+
* Custom, non-string, compiled, representation.
|
|
104
|
+
*
|
|
105
|
+
* This is used by unified to store non-string results.
|
|
106
|
+
* One example is when turning markdown into React nodes.
|
|
107
|
+
*
|
|
108
|
+
* @type {unknown}
|
|
109
|
+
*/
|
|
110
|
+
this.result;
|
|
111
|
+
/**
|
|
112
|
+
* Whether a file was saved to disk.
|
|
113
|
+
*
|
|
114
|
+
* This is used by vfile reporters.
|
|
115
|
+
*
|
|
116
|
+
* @type {boolean}
|
|
117
|
+
*/
|
|
118
|
+
this.stored;
|
|
119
|
+
let index = -1;
|
|
120
|
+
while (++index < order.length) {
|
|
121
|
+
const field = order[index];
|
|
122
|
+
if (field in options && options[field] !== void 0 && options[field] !== null) this[field] = field === "history" ? [...options[field]] : options[field];
|
|
123
|
+
}
|
|
124
|
+
/** @type {string} */
|
|
125
|
+
let field;
|
|
126
|
+
for (field in options) if (!order.includes(field)) this[field] = options[field];
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Get the basename (including extname) (example: `'index.min.js'`).
|
|
130
|
+
*
|
|
131
|
+
* @returns {string | undefined}
|
|
132
|
+
* Basename.
|
|
133
|
+
*/
|
|
134
|
+
get basename() {
|
|
135
|
+
return typeof this.path === "string" ? minpath.basename(this.path) : void 0;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Set basename (including extname) (`'index.min.js'`).
|
|
139
|
+
*
|
|
140
|
+
* Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
|
|
141
|
+
* on windows).
|
|
142
|
+
* Cannot be nullified (use `file.path = file.dirname` instead).
|
|
143
|
+
*
|
|
144
|
+
* @param {string} basename
|
|
145
|
+
* Basename.
|
|
146
|
+
* @returns {undefined}
|
|
147
|
+
* Nothing.
|
|
148
|
+
*/
|
|
149
|
+
set basename(basename) {
|
|
150
|
+
assertNonEmpty(basename, "basename");
|
|
151
|
+
assertPart(basename, "basename");
|
|
152
|
+
this.path = minpath.join(this.dirname || "", basename);
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Get the parent path (example: `'~'`).
|
|
156
|
+
*
|
|
157
|
+
* @returns {string | undefined}
|
|
158
|
+
* Dirname.
|
|
159
|
+
*/
|
|
160
|
+
get dirname() {
|
|
161
|
+
return typeof this.path === "string" ? minpath.dirname(this.path) : void 0;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Set the parent path (example: `'~'`).
|
|
165
|
+
*
|
|
166
|
+
* Cannot be set if there’s no `path` yet.
|
|
167
|
+
*
|
|
168
|
+
* @param {string | undefined} dirname
|
|
169
|
+
* Dirname.
|
|
170
|
+
* @returns {undefined}
|
|
171
|
+
* Nothing.
|
|
172
|
+
*/
|
|
173
|
+
set dirname(dirname) {
|
|
174
|
+
assertPath(this.basename, "dirname");
|
|
175
|
+
this.path = minpath.join(dirname || "", this.basename);
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Get the extname (including dot) (example: `'.js'`).
|
|
179
|
+
*
|
|
180
|
+
* @returns {string | undefined}
|
|
181
|
+
* Extname.
|
|
182
|
+
*/
|
|
183
|
+
get extname() {
|
|
184
|
+
return typeof this.path === "string" ? minpath.extname(this.path) : void 0;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Set the extname (including dot) (example: `'.js'`).
|
|
188
|
+
*
|
|
189
|
+
* Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
|
|
190
|
+
* on windows).
|
|
191
|
+
* Cannot be set if there’s no `path` yet.
|
|
192
|
+
*
|
|
193
|
+
* @param {string | undefined} extname
|
|
194
|
+
* Extname.
|
|
195
|
+
* @returns {undefined}
|
|
196
|
+
* Nothing.
|
|
197
|
+
*/
|
|
198
|
+
set extname(extname) {
|
|
199
|
+
assertPart(extname, "extname");
|
|
200
|
+
assertPath(this.dirname, "extname");
|
|
201
|
+
if (extname) {
|
|
202
|
+
if (extname.codePointAt(0) !== 46) throw new Error("`extname` must start with `.`");
|
|
203
|
+
if (extname.includes(".", 1)) throw new Error("`extname` cannot contain multiple dots");
|
|
204
|
+
}
|
|
205
|
+
this.path = minpath.join(this.dirname, this.stem + (extname || ""));
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Get the full path (example: `'~/index.min.js'`).
|
|
209
|
+
*
|
|
210
|
+
* @returns {string}
|
|
211
|
+
* Path.
|
|
212
|
+
*/
|
|
213
|
+
get path() {
|
|
214
|
+
return this.history[this.history.length - 1];
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Set the full path (example: `'~/index.min.js'`).
|
|
218
|
+
*
|
|
219
|
+
* Cannot be nullified.
|
|
220
|
+
* You can set a file URL (a `URL` object with a `file:` protocol) which will
|
|
221
|
+
* be turned into a path with `url.fileURLToPath`.
|
|
222
|
+
*
|
|
223
|
+
* @param {URL | string} path
|
|
224
|
+
* Path.
|
|
225
|
+
* @returns {undefined}
|
|
226
|
+
* Nothing.
|
|
227
|
+
*/
|
|
228
|
+
set path(path) {
|
|
229
|
+
if (isUrl(path)) path = urlToPath(path);
|
|
230
|
+
assertNonEmpty(path, "path");
|
|
231
|
+
if (this.path !== path) this.history.push(path);
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Get the stem (basename w/o extname) (example: `'index.min'`).
|
|
235
|
+
*
|
|
236
|
+
* @returns {string | undefined}
|
|
237
|
+
* Stem.
|
|
238
|
+
*/
|
|
239
|
+
get stem() {
|
|
240
|
+
return typeof this.path === "string" ? minpath.basename(this.path, this.extname) : void 0;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Set the stem (basename w/o extname) (example: `'index.min'`).
|
|
244
|
+
*
|
|
245
|
+
* Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\'`
|
|
246
|
+
* on windows).
|
|
247
|
+
* Cannot be nullified (use `file.path = file.dirname` instead).
|
|
248
|
+
*
|
|
249
|
+
* @param {string} stem
|
|
250
|
+
* Stem.
|
|
251
|
+
* @returns {undefined}
|
|
252
|
+
* Nothing.
|
|
253
|
+
*/
|
|
254
|
+
set stem(stem) {
|
|
255
|
+
assertNonEmpty(stem, "stem");
|
|
256
|
+
assertPart(stem, "stem");
|
|
257
|
+
this.path = minpath.join(this.dirname || "", stem + (this.extname || ""));
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Create a fatal message for `reason` associated with the file.
|
|
261
|
+
*
|
|
262
|
+
* The `fatal` field of the message is set to `true` (error; file not usable)
|
|
263
|
+
* and the `file` field is set to the current file path.
|
|
264
|
+
* The message is added to the `messages` field on `file`.
|
|
265
|
+
*
|
|
266
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
267
|
+
*
|
|
268
|
+
* @overload
|
|
269
|
+
* @param {string} reason
|
|
270
|
+
* @param {MessageOptions | null | undefined} [options]
|
|
271
|
+
* @returns {never}
|
|
272
|
+
*
|
|
273
|
+
* @overload
|
|
274
|
+
* @param {string} reason
|
|
275
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
276
|
+
* @param {string | null | undefined} [origin]
|
|
277
|
+
* @returns {never}
|
|
278
|
+
*
|
|
279
|
+
* @overload
|
|
280
|
+
* @param {string} reason
|
|
281
|
+
* @param {Point | Position | null | undefined} place
|
|
282
|
+
* @param {string | null | undefined} [origin]
|
|
283
|
+
* @returns {never}
|
|
284
|
+
*
|
|
285
|
+
* @overload
|
|
286
|
+
* @param {string} reason
|
|
287
|
+
* @param {string | null | undefined} [origin]
|
|
288
|
+
* @returns {never}
|
|
289
|
+
*
|
|
290
|
+
* @overload
|
|
291
|
+
* @param {Error | VFileMessage} cause
|
|
292
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
293
|
+
* @param {string | null | undefined} [origin]
|
|
294
|
+
* @returns {never}
|
|
295
|
+
*
|
|
296
|
+
* @overload
|
|
297
|
+
* @param {Error | VFileMessage} cause
|
|
298
|
+
* @param {Point | Position | null | undefined} place
|
|
299
|
+
* @param {string | null | undefined} [origin]
|
|
300
|
+
* @returns {never}
|
|
301
|
+
*
|
|
302
|
+
* @overload
|
|
303
|
+
* @param {Error | VFileMessage} cause
|
|
304
|
+
* @param {string | null | undefined} [origin]
|
|
305
|
+
* @returns {never}
|
|
306
|
+
*
|
|
307
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
308
|
+
* Reason for message, should use markdown.
|
|
309
|
+
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
310
|
+
* Configuration (optional).
|
|
311
|
+
* @param {string | null | undefined} [origin]
|
|
312
|
+
* Place in code where the message originates (example:
|
|
313
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
314
|
+
* @returns {never}
|
|
315
|
+
* Never.
|
|
316
|
+
* @throws {VFileMessage}
|
|
317
|
+
* Message.
|
|
318
|
+
*/
|
|
319
|
+
fail(causeOrReason, optionsOrParentOrPlace, origin) {
|
|
320
|
+
const message = this.message(causeOrReason, optionsOrParentOrPlace, origin);
|
|
321
|
+
message.fatal = true;
|
|
322
|
+
throw message;
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Create an info message for `reason` associated with the file.
|
|
326
|
+
*
|
|
327
|
+
* The `fatal` field of the message is set to `undefined` (info; change
|
|
328
|
+
* likely not needed) and the `file` field is set to the current file path.
|
|
329
|
+
* The message is added to the `messages` field on `file`.
|
|
330
|
+
*
|
|
331
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
332
|
+
*
|
|
333
|
+
* @overload
|
|
334
|
+
* @param {string} reason
|
|
335
|
+
* @param {MessageOptions | null | undefined} [options]
|
|
336
|
+
* @returns {VFileMessage}
|
|
337
|
+
*
|
|
338
|
+
* @overload
|
|
339
|
+
* @param {string} reason
|
|
340
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
341
|
+
* @param {string | null | undefined} [origin]
|
|
342
|
+
* @returns {VFileMessage}
|
|
343
|
+
*
|
|
344
|
+
* @overload
|
|
345
|
+
* @param {string} reason
|
|
346
|
+
* @param {Point | Position | null | undefined} place
|
|
347
|
+
* @param {string | null | undefined} [origin]
|
|
348
|
+
* @returns {VFileMessage}
|
|
349
|
+
*
|
|
350
|
+
* @overload
|
|
351
|
+
* @param {string} reason
|
|
352
|
+
* @param {string | null | undefined} [origin]
|
|
353
|
+
* @returns {VFileMessage}
|
|
354
|
+
*
|
|
355
|
+
* @overload
|
|
356
|
+
* @param {Error | VFileMessage} cause
|
|
357
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
358
|
+
* @param {string | null | undefined} [origin]
|
|
359
|
+
* @returns {VFileMessage}
|
|
360
|
+
*
|
|
361
|
+
* @overload
|
|
362
|
+
* @param {Error | VFileMessage} cause
|
|
363
|
+
* @param {Point | Position | null | undefined} place
|
|
364
|
+
* @param {string | null | undefined} [origin]
|
|
365
|
+
* @returns {VFileMessage}
|
|
366
|
+
*
|
|
367
|
+
* @overload
|
|
368
|
+
* @param {Error | VFileMessage} cause
|
|
369
|
+
* @param {string | null | undefined} [origin]
|
|
370
|
+
* @returns {VFileMessage}
|
|
371
|
+
*
|
|
372
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
373
|
+
* Reason for message, should use markdown.
|
|
374
|
+
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
375
|
+
* Configuration (optional).
|
|
376
|
+
* @param {string | null | undefined} [origin]
|
|
377
|
+
* Place in code where the message originates (example:
|
|
378
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
379
|
+
* @returns {VFileMessage}
|
|
380
|
+
* Message.
|
|
381
|
+
*/
|
|
382
|
+
info(causeOrReason, optionsOrParentOrPlace, origin) {
|
|
383
|
+
const message = this.message(causeOrReason, optionsOrParentOrPlace, origin);
|
|
384
|
+
message.fatal = void 0;
|
|
385
|
+
return message;
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* Create a message for `reason` associated with the file.
|
|
389
|
+
*
|
|
390
|
+
* The `fatal` field of the message is set to `false` (warning; change may be
|
|
391
|
+
* needed) and the `file` field is set to the current file path.
|
|
392
|
+
* The message is added to the `messages` field on `file`.
|
|
393
|
+
*
|
|
394
|
+
* > 🪦 **Note**: also has obsolete signatures.
|
|
395
|
+
*
|
|
396
|
+
* @overload
|
|
397
|
+
* @param {string} reason
|
|
398
|
+
* @param {MessageOptions | null | undefined} [options]
|
|
399
|
+
* @returns {VFileMessage}
|
|
400
|
+
*
|
|
401
|
+
* @overload
|
|
402
|
+
* @param {string} reason
|
|
403
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
404
|
+
* @param {string | null | undefined} [origin]
|
|
405
|
+
* @returns {VFileMessage}
|
|
406
|
+
*
|
|
407
|
+
* @overload
|
|
408
|
+
* @param {string} reason
|
|
409
|
+
* @param {Point | Position | null | undefined} place
|
|
410
|
+
* @param {string | null | undefined} [origin]
|
|
411
|
+
* @returns {VFileMessage}
|
|
412
|
+
*
|
|
413
|
+
* @overload
|
|
414
|
+
* @param {string} reason
|
|
415
|
+
* @param {string | null | undefined} [origin]
|
|
416
|
+
* @returns {VFileMessage}
|
|
417
|
+
*
|
|
418
|
+
* @overload
|
|
419
|
+
* @param {Error | VFileMessage} cause
|
|
420
|
+
* @param {Node | NodeLike | null | undefined} parent
|
|
421
|
+
* @param {string | null | undefined} [origin]
|
|
422
|
+
* @returns {VFileMessage}
|
|
423
|
+
*
|
|
424
|
+
* @overload
|
|
425
|
+
* @param {Error | VFileMessage} cause
|
|
426
|
+
* @param {Point | Position | null | undefined} place
|
|
427
|
+
* @param {string | null | undefined} [origin]
|
|
428
|
+
* @returns {VFileMessage}
|
|
429
|
+
*
|
|
430
|
+
* @overload
|
|
431
|
+
* @param {Error | VFileMessage} cause
|
|
432
|
+
* @param {string | null | undefined} [origin]
|
|
433
|
+
* @returns {VFileMessage}
|
|
434
|
+
*
|
|
435
|
+
* @param {Error | VFileMessage | string} causeOrReason
|
|
436
|
+
* Reason for message, should use markdown.
|
|
437
|
+
* @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
|
|
438
|
+
* Configuration (optional).
|
|
439
|
+
* @param {string | null | undefined} [origin]
|
|
440
|
+
* Place in code where the message originates (example:
|
|
441
|
+
* `'my-package:my-rule'` or `'my-rule'`).
|
|
442
|
+
* @returns {VFileMessage}
|
|
443
|
+
* Message.
|
|
444
|
+
*/
|
|
445
|
+
message(causeOrReason, optionsOrParentOrPlace, origin) {
|
|
446
|
+
const message = new VFileMessage(causeOrReason, optionsOrParentOrPlace, origin);
|
|
447
|
+
if (this.path) {
|
|
448
|
+
message.name = this.path + ":" + message.name;
|
|
449
|
+
message.file = this.path;
|
|
450
|
+
}
|
|
451
|
+
message.fatal = false;
|
|
452
|
+
this.messages.push(message);
|
|
453
|
+
return message;
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* Serialize the file.
|
|
457
|
+
*
|
|
458
|
+
* > **Note**: which encodings are supported depends on the engine.
|
|
459
|
+
* > For info on Node.js, see:
|
|
460
|
+
* > <https://nodejs.org/api/util.html#whatwg-supported-encodings>.
|
|
461
|
+
*
|
|
462
|
+
* @param {string | null | undefined} [encoding='utf8']
|
|
463
|
+
* Character encoding to understand `value` as when it’s a `Uint8Array`
|
|
464
|
+
* (default: `'utf-8'`).
|
|
465
|
+
* @returns {string}
|
|
466
|
+
* Serialized file.
|
|
467
|
+
*/
|
|
468
|
+
toString(encoding) {
|
|
469
|
+
if (this.value === void 0) return "";
|
|
470
|
+
if (typeof this.value === "string") return this.value;
|
|
471
|
+
return new TextDecoder(encoding || void 0).decode(this.value);
|
|
472
|
+
}
|
|
473
|
+
};
|
|
474
|
+
/**
|
|
475
|
+
* Assert that `part` is not a path (as in, does not contain `path.sep`).
|
|
476
|
+
*
|
|
477
|
+
* @param {string | null | undefined} part
|
|
478
|
+
* File path part.
|
|
479
|
+
* @param {string} name
|
|
480
|
+
* Part name.
|
|
481
|
+
* @returns {undefined}
|
|
482
|
+
* Nothing.
|
|
483
|
+
*/
|
|
484
|
+
function assertPart(part, name) {
|
|
485
|
+
if (part && part.includes(minpath.sep)) throw new Error("`" + name + "` cannot be a path: did not expect `" + minpath.sep + "`");
|
|
486
|
+
}
|
|
487
|
+
/**
|
|
488
|
+
* Assert that `part` is not empty.
|
|
489
|
+
*
|
|
490
|
+
* @param {string | undefined} part
|
|
491
|
+
* Thing.
|
|
492
|
+
* @param {string} name
|
|
493
|
+
* Part name.
|
|
494
|
+
* @returns {asserts part is string}
|
|
495
|
+
* Nothing.
|
|
496
|
+
*/
|
|
497
|
+
function assertNonEmpty(part, name) {
|
|
498
|
+
if (!part) throw new Error("`" + name + "` cannot be empty");
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
* Assert `path` exists.
|
|
502
|
+
*
|
|
503
|
+
* @param {string | undefined} path
|
|
504
|
+
* Path.
|
|
505
|
+
* @param {string} name
|
|
506
|
+
* Dependency name.
|
|
507
|
+
* @returns {asserts path is string}
|
|
508
|
+
* Nothing.
|
|
509
|
+
*/
|
|
510
|
+
function assertPath(path, name) {
|
|
511
|
+
if (!path) throw new Error("Setting `" + name + "` requires `path` to be set too");
|
|
512
|
+
}
|
|
513
|
+
/**
|
|
514
|
+
* Assert `value` is an `Uint8Array`.
|
|
515
|
+
*
|
|
516
|
+
* @param {unknown} value
|
|
517
|
+
* thing.
|
|
518
|
+
* @returns {value is Uint8Array}
|
|
519
|
+
* Whether `value` is an `Uint8Array`.
|
|
520
|
+
*/
|
|
521
|
+
function isUint8Array(value) {
|
|
522
|
+
return Boolean(value && typeof value === "object" && "byteLength" in value && "byteOffset" in value);
|
|
523
|
+
}
|
|
524
|
+
//#endregion
|
|
525
|
+
export { VFile };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//#region node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minurl.shared.js
|
|
2
|
+
/**
|
|
3
|
+
* Checks if a value has the shape of a WHATWG URL object.
|
|
4
|
+
*
|
|
5
|
+
* Using a symbol or instanceof would not be able to recognize URL objects
|
|
6
|
+
* coming from other implementations (e.g. in Electron), so instead we are
|
|
7
|
+
* checking some well known properties for a lack of a better test.
|
|
8
|
+
*
|
|
9
|
+
* We use `href` and `protocol` as they are the only properties that are
|
|
10
|
+
* easy to retrieve and calculate due to the lazy nature of the getters.
|
|
11
|
+
*
|
|
12
|
+
* We check for auth attribute to distinguish legacy url instance with
|
|
13
|
+
* WHATWG URL instance.
|
|
14
|
+
*
|
|
15
|
+
* @param {unknown} fileUrlOrPath
|
|
16
|
+
* File path or URL.
|
|
17
|
+
* @returns {fileUrlOrPath is URL}
|
|
18
|
+
* Whether it’s a URL.
|
|
19
|
+
*/
|
|
20
|
+
function isUrl(fileUrlOrPath) {
|
|
21
|
+
return Boolean(fileUrlOrPath !== null && typeof fileUrlOrPath === "object" && "href" in fileUrlOrPath && fileUrlOrPath.href && "protocol" in fileUrlOrPath && fileUrlOrPath.protocol && fileUrlOrPath.auth === void 0);
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { isUrl };
|
package/dist/src/node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-collection.mjs
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../../../../../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { require_identity } from "../nodes/identity.mjs";
|
|
3
|
+
import { require_Scalar } from "../nodes/Scalar.mjs";
|
|
4
|
+
import { require_YAMLMap } from "../nodes/YAMLMap.mjs";
|
|
5
|
+
import { require_YAMLSeq } from "../nodes/YAMLSeq.mjs";
|
|
6
|
+
import { require_resolve_block_map } from "./resolve-block-map.mjs";
|
|
7
|
+
import { require_resolve_block_seq } from "./resolve-block-seq.mjs";
|
|
8
|
+
import { require_resolve_flow_collection } from "./resolve-flow-collection.mjs";
|
|
9
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-collection.js
|
|
10
|
+
var require_compose_collection = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11
|
+
var identity = require_identity();
|
|
12
|
+
var Scalar = require_Scalar();
|
|
13
|
+
var YAMLMap = require_YAMLMap();
|
|
14
|
+
var YAMLSeq = require_YAMLSeq();
|
|
15
|
+
var resolveBlockMap = require_resolve_block_map();
|
|
16
|
+
var resolveBlockSeq = require_resolve_block_seq();
|
|
17
|
+
var resolveFlowCollection = require_resolve_flow_collection();
|
|
18
|
+
function resolveCollection(CN, ctx, token, onError, tagName, tag) {
|
|
19
|
+
const coll = token.type === "block-map" ? resolveBlockMap.resolveBlockMap(CN, ctx, token, onError, tag) : token.type === "block-seq" ? resolveBlockSeq.resolveBlockSeq(CN, ctx, token, onError, tag) : resolveFlowCollection.resolveFlowCollection(CN, ctx, token, onError, tag);
|
|
20
|
+
const Coll = coll.constructor;
|
|
21
|
+
if (tagName === "!" || tagName === Coll.tagName) {
|
|
22
|
+
coll.tag = Coll.tagName;
|
|
23
|
+
return coll;
|
|
24
|
+
}
|
|
25
|
+
if (tagName) coll.tag = tagName;
|
|
26
|
+
return coll;
|
|
27
|
+
}
|
|
28
|
+
function composeCollection(CN, ctx, token, props, onError) {
|
|
29
|
+
const tagToken = props.tag;
|
|
30
|
+
const tagName = !tagToken ? null : ctx.directives.tagName(tagToken.source, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg));
|
|
31
|
+
if (token.type === "block-seq") {
|
|
32
|
+
const { anchor, newlineAfterProp: nl } = props;
|
|
33
|
+
const lastProp = anchor && tagToken ? anchor.offset > tagToken.offset ? anchor : tagToken : anchor ?? tagToken;
|
|
34
|
+
if (lastProp && (!nl || nl.offset < lastProp.offset)) onError(lastProp, "MISSING_CHAR", "Missing newline after block sequence props");
|
|
35
|
+
}
|
|
36
|
+
const expType = token.type === "block-map" ? "map" : token.type === "block-seq" ? "seq" : token.start.source === "{" ? "map" : "seq";
|
|
37
|
+
if (!tagToken || !tagName || tagName === "!" || tagName === YAMLMap.YAMLMap.tagName && expType === "map" || tagName === YAMLSeq.YAMLSeq.tagName && expType === "seq") return resolveCollection(CN, ctx, token, onError, tagName);
|
|
38
|
+
let tag = ctx.schema.tags.find((t) => t.tag === tagName && t.collection === expType);
|
|
39
|
+
if (!tag) {
|
|
40
|
+
const kt = ctx.schema.knownTags[tagName];
|
|
41
|
+
if (kt?.collection === expType) {
|
|
42
|
+
ctx.schema.tags.push(Object.assign({}, kt, { default: false }));
|
|
43
|
+
tag = kt;
|
|
44
|
+
} else {
|
|
45
|
+
if (kt) onError(tagToken, "BAD_COLLECTION_TYPE", `${kt.tag} used for ${expType} collection, but expects ${kt.collection ?? "scalar"}`, true);
|
|
46
|
+
else onError(tagToken, "TAG_RESOLVE_FAILED", `Unresolved tag: ${tagName}`, true);
|
|
47
|
+
return resolveCollection(CN, ctx, token, onError, tagName);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
const coll = resolveCollection(CN, ctx, token, onError, tagName, tag);
|
|
51
|
+
const res = tag.resolve?.(coll, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg), ctx.options) ?? coll;
|
|
52
|
+
const node = identity.isNode(res) ? res : new Scalar.Scalar(res);
|
|
53
|
+
node.range = coll.range;
|
|
54
|
+
node.tag = tagName;
|
|
55
|
+
if (tag?.format) node.format = tag.format;
|
|
56
|
+
return node;
|
|
57
|
+
}
|
|
58
|
+
exports.composeCollection = composeCollection;
|
|
59
|
+
}));
|
|
60
|
+
//#endregion
|
|
61
|
+
export default require_compose_collection();
|
|
62
|
+
export { require_compose_collection };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { __commonJSMin } from "../../../../../../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { require_Document } from "../doc/Document.mjs";
|
|
3
|
+
import { require_resolve_props } from "./resolve-props.mjs";
|
|
4
|
+
import { require_resolve_end } from "./resolve-end.mjs";
|
|
5
|
+
import { require_compose_node } from "./compose-node.mjs";
|
|
6
|
+
//#region node_modules/.pnpm/yaml@2.8.3/node_modules/yaml/dist/compose/compose-doc.js
|
|
7
|
+
var require_compose_doc = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
8
|
+
var Document = require_Document();
|
|
9
|
+
var composeNode = require_compose_node();
|
|
10
|
+
var resolveEnd = require_resolve_end();
|
|
11
|
+
var resolveProps = require_resolve_props();
|
|
12
|
+
function composeDoc(options, directives, { offset, start, value, end }, onError) {
|
|
13
|
+
const opts = Object.assign({ _directives: directives }, options);
|
|
14
|
+
const doc = new Document.Document(void 0, opts);
|
|
15
|
+
const ctx = {
|
|
16
|
+
atKey: false,
|
|
17
|
+
atRoot: true,
|
|
18
|
+
directives: doc.directives,
|
|
19
|
+
options: doc.options,
|
|
20
|
+
schema: doc.schema
|
|
21
|
+
};
|
|
22
|
+
const props = resolveProps.resolveProps(start, {
|
|
23
|
+
indicator: "doc-start",
|
|
24
|
+
next: value ?? end?.[0],
|
|
25
|
+
offset,
|
|
26
|
+
onError,
|
|
27
|
+
parentIndent: 0,
|
|
28
|
+
startOnNewline: true
|
|
29
|
+
});
|
|
30
|
+
if (props.found) {
|
|
31
|
+
doc.directives.docStart = true;
|
|
32
|
+
if (value && (value.type === "block-map" || value.type === "block-seq") && !props.hasNewline) onError(props.end, "MISSING_CHAR", "Block collection cannot start on same line with directives-end marker");
|
|
33
|
+
}
|
|
34
|
+
doc.contents = value ? composeNode.composeNode(ctx, value, props, onError) : composeNode.composeEmptyNode(ctx, props.end, start, null, props, onError);
|
|
35
|
+
const contentEnd = doc.contents.range[2];
|
|
36
|
+
const re = resolveEnd.resolveEnd(end, contentEnd, false, onError);
|
|
37
|
+
if (re.comment) doc.comment = re.comment;
|
|
38
|
+
doc.range = [
|
|
39
|
+
offset,
|
|
40
|
+
contentEnd,
|
|
41
|
+
re.offset
|
|
42
|
+
];
|
|
43
|
+
return doc;
|
|
44
|
+
}
|
|
45
|
+
exports.composeDoc = composeDoc;
|
|
46
|
+
}));
|
|
47
|
+
//#endregion
|
|
48
|
+
export default require_compose_doc();
|
|
49
|
+
export { require_compose_doc };
|