@donmahallem/lerna2codecov 0.1.8 → 0.2.2
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/dist/cjs/_virtual/_commonjsHelpers.cjs +8 -0
- package/dist/cjs/_virtual/_commonjsHelpers.cjs.map +1 -0
- package/dist/cjs/_virtual/conversions.cjs +8 -0
- package/dist/cjs/_virtual/conversions.cjs.map +1 -0
- package/dist/cjs/_virtual/identifier.cjs +8 -0
- package/dist/cjs/_virtual/identifier.cjs.map +1 -0
- package/dist/cjs/_virtual/imurmurhash.cjs +8 -0
- package/dist/cjs/_virtual/imurmurhash.cjs.map +1 -0
- package/dist/cjs/_virtual/index.cjs +8 -0
- package/dist/cjs/_virtual/index.cjs.map +1 -0
- package/dist/cjs/_virtual/index10.cjs +8 -0
- package/dist/cjs/_virtual/index10.cjs.map +1 -0
- package/dist/cjs/_virtual/index11.cjs +8 -0
- package/dist/cjs/_virtual/index11.cjs.map +1 -0
- package/dist/cjs/_virtual/index12.cjs +8 -0
- package/dist/cjs/_virtual/index12.cjs.map +1 -0
- package/dist/cjs/_virtual/index13.cjs +8 -0
- package/dist/cjs/_virtual/index13.cjs.map +1 -0
- package/dist/cjs/_virtual/index14.cjs +8 -0
- package/dist/cjs/_virtual/index14.cjs.map +1 -0
- package/dist/cjs/_virtual/index15.cjs +8 -0
- package/dist/cjs/_virtual/index15.cjs.map +1 -0
- package/dist/cjs/_virtual/index2.cjs +8 -0
- package/dist/cjs/_virtual/index2.cjs.map +1 -0
- package/dist/cjs/_virtual/index3.cjs +8 -0
- package/dist/cjs/_virtual/index3.cjs.map +1 -0
- package/dist/cjs/_virtual/index4.cjs +8 -0
- package/dist/cjs/_virtual/index4.cjs.map +1 -0
- package/dist/cjs/_virtual/index5.cjs +8 -0
- package/dist/cjs/_virtual/index5.cjs.map +1 -0
- package/dist/cjs/_virtual/index6.cjs +8 -0
- package/dist/cjs/_virtual/index6.cjs.map +1 -0
- package/dist/cjs/_virtual/index7.cjs +8 -0
- package/dist/cjs/_virtual/index7.cjs.map +1 -0
- package/dist/cjs/_virtual/index8.cjs +8 -0
- package/dist/cjs/_virtual/index8.cjs.map +1 -0
- package/dist/cjs/_virtual/index9.cjs +8 -0
- package/dist/cjs/_virtual/index9.cjs.map +1 -0
- package/dist/cjs/_virtual/keyword.cjs +8 -0
- package/dist/cjs/_virtual/keyword.cjs.map +1 -0
- package/dist/cjs/_virtual/npa.cjs +8 -0
- package/dist/cjs/_virtual/npa.cjs.map +1 -0
- package/dist/cjs/_virtual/re.cjs +8 -0
- package/dist/cjs/_virtual/re.cjs.map +1 -0
- package/dist/cjs/_virtual/semver.cjs +8 -0
- package/dist/cjs/_virtual/semver.cjs.map +1 -0
- package/dist/cjs/_virtual/signals.cjs +8 -0
- package/dist/cjs/_virtual/signals.cjs.map +1 -0
- package/dist/cjs/index.cjs +10 -0
- package/dist/cjs/index.cjs.map +1 -0
- package/dist/cjs/node_modules/@babel/code-frame/lib/index.cjs +168 -0
- package/dist/cjs/node_modules/@babel/code-frame/lib/index.cjs.map +1 -0
- package/dist/cjs/node_modules/@babel/helper-validator-identifier/lib/identifier.cjs +89 -0
- package/dist/cjs/node_modules/@babel/helper-validator-identifier/lib/identifier.cjs.map +1 -0
- package/dist/cjs/node_modules/@babel/helper-validator-identifier/lib/index.cjs +67 -0
- package/dist/cjs/node_modules/@babel/helper-validator-identifier/lib/index.cjs.map +1 -0
- package/dist/cjs/node_modules/@babel/helper-validator-identifier/lib/keyword.cjs +43 -0
- package/dist/cjs/node_modules/@babel/helper-validator-identifier/lib/keyword.cjs.map +1 -0
- package/dist/cjs/node_modules/@babel/highlight/lib/index.cjs +125 -0
- package/dist/cjs/node_modules/@babel/highlight/lib/index.cjs.map +1 -0
- package/dist/cjs/node_modules/@lerna/package/index.cjs +315 -0
- package/dist/cjs/node_modules/@lerna/package/index.cjs.map +1 -0
- package/dist/cjs/node_modules/ansi-styles/index.cjs +172 -0
- package/dist/cjs/node_modules/ansi-styles/index.cjs.map +1 -0
- package/dist/cjs/node_modules/builtins/builtins.cjs +6 -0
- package/dist/cjs/node_modules/builtins/builtins.cjs.map +1 -0
- package/dist/cjs/node_modules/chalk/index.cjs +239 -0
- package/dist/cjs/node_modules/chalk/index.cjs.map +1 -0
- package/dist/cjs/node_modules/chalk/templates.cjs +132 -0
- package/dist/cjs/node_modules/chalk/templates.cjs.map +1 -0
- package/dist/cjs/node_modules/color-convert/conversions.cjs +877 -0
- package/dist/cjs/node_modules/color-convert/conversions.cjs.map +1 -0
- package/dist/cjs/node_modules/color-convert/index.cjs +87 -0
- package/dist/cjs/node_modules/color-convert/index.cjs.map +1 -0
- package/dist/cjs/node_modules/color-convert/route.cjs +104 -0
- package/dist/cjs/node_modules/color-convert/route.cjs.map +1 -0
- package/dist/cjs/node_modules/color-name/index.cjs +155 -0
- package/dist/cjs/node_modules/color-name/index.cjs.map +1 -0
- package/dist/cjs/node_modules/error-ex/index.cjs +151 -0
- package/dist/cjs/node_modules/error-ex/index.cjs.map +1 -0
- package/dist/cjs/node_modules/escape-string-regexp/index.cjs +14 -0
- package/dist/cjs/node_modules/escape-string-regexp/index.cjs.map +1 -0
- package/dist/cjs/node_modules/graceful-fs/clone.cjs +26 -0
- package/dist/cjs/node_modules/graceful-fs/clone.cjs.map +1 -0
- package/dist/cjs/node_modules/graceful-fs/graceful-fs.cjs +467 -0
- package/dist/cjs/node_modules/graceful-fs/graceful-fs.cjs.map +1 -0
- package/dist/cjs/node_modules/graceful-fs/legacy-streams.cjs +129 -0
- package/dist/cjs/node_modules/graceful-fs/legacy-streams.cjs.map +1 -0
- package/dist/cjs/node_modules/graceful-fs/polyfills.cjs +366 -0
- package/dist/cjs/node_modules/graceful-fs/polyfills.cjs.map +1 -0
- package/dist/cjs/node_modules/has-flag/index.cjs +12 -0
- package/dist/cjs/node_modules/has-flag/index.cjs.map +1 -0
- package/dist/cjs/node_modules/hosted-git-info/git-host-info.cjs +188 -0
- package/dist/cjs/node_modules/hosted-git-info/git-host-info.cjs.map +1 -0
- package/dist/cjs/node_modules/hosted-git-info/git-host.cjs +116 -0
- package/dist/cjs/node_modules/hosted-git-info/git-host.cjs.map +1 -0
- package/dist/cjs/node_modules/hosted-git-info/index.cjs +251 -0
- package/dist/cjs/node_modules/hosted-git-info/index.cjs.map +1 -0
- package/dist/cjs/node_modules/imurmurhash/imurmurhash.cjs +143 -0
- package/dist/cjs/node_modules/imurmurhash/imurmurhash.cjs.map +1 -0
- package/dist/cjs/node_modules/is-arrayish/index.cjs +13 -0
- package/dist/cjs/node_modules/is-arrayish/index.cjs.map +1 -0
- package/dist/cjs/node_modules/js-tokens/index.cjs +28 -0
- package/dist/cjs/node_modules/js-tokens/index.cjs.map +1 -0
- package/dist/cjs/node_modules/json-parse-even-better-errors/index.cjs +124 -0
- package/dist/cjs/node_modules/json-parse-even-better-errors/index.cjs.map +1 -0
- package/dist/cjs/node_modules/lines-and-columns/build/index.cjs +68 -0
- package/dist/cjs/node_modules/lines-and-columns/build/index.cjs.map +1 -0
- package/dist/cjs/node_modules/load-json-file/index.cjs +35 -0
- package/dist/cjs/node_modules/load-json-file/index.cjs.map +1 -0
- package/dist/cjs/node_modules/lru-cache/index.cjs +339 -0
- package/dist/cjs/node_modules/lru-cache/index.cjs.map +1 -0
- package/dist/cjs/node_modules/npm-package-arg/npa.cjs +369 -0
- package/dist/cjs/node_modules/npm-package-arg/npa.cjs.map +1 -0
- package/dist/cjs/node_modules/parse-json/index.cjs +65 -0
- package/dist/cjs/node_modules/parse-json/index.cjs.map +1 -0
- package/dist/cjs/node_modules/pify/index.cjs +71 -0
- package/dist/cjs/node_modules/pify/index.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/classes/comparator.cjs +159 -0
- package/dist/cjs/node_modules/semver/classes/comparator.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/classes/range.cjs +542 -0
- package/dist/cjs/node_modules/semver/classes/range.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/classes/semver.cjs +299 -0
- package/dist/cjs/node_modules/semver/classes/semver.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/functions/clean.cjs +13 -0
- package/dist/cjs/node_modules/semver/functions/clean.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/functions/cmp.cjs +64 -0
- package/dist/cjs/node_modules/semver/functions/cmp.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/functions/coerce.cjs +62 -0
- package/dist/cjs/node_modules/semver/functions/coerce.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/functions/compare-build.cjs +14 -0
- package/dist/cjs/node_modules/semver/functions/compare-build.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/functions/compare-loose.cjs +10 -0
- package/dist/cjs/node_modules/semver/functions/compare-loose.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/functions/compare.cjs +12 -0
- package/dist/cjs/node_modules/semver/functions/compare.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/functions/diff.cjs +31 -0
- package/dist/cjs/node_modules/semver/functions/diff.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/functions/eq.cjs +10 -0
- package/dist/cjs/node_modules/semver/functions/eq.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/functions/gt.cjs +10 -0
- package/dist/cjs/node_modules/semver/functions/gt.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/functions/gte.cjs +10 -0
- package/dist/cjs/node_modules/semver/functions/gte.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/functions/inc.cjs +25 -0
- package/dist/cjs/node_modules/semver/functions/inc.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/functions/lt.cjs +10 -0
- package/dist/cjs/node_modules/semver/functions/lt.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/functions/lte.cjs +10 -0
- package/dist/cjs/node_modules/semver/functions/lte.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/functions/major.cjs +10 -0
- package/dist/cjs/node_modules/semver/functions/major.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/functions/minor.cjs +10 -0
- package/dist/cjs/node_modules/semver/functions/minor.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/functions/neq.cjs +10 -0
- package/dist/cjs/node_modules/semver/functions/neq.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/functions/parse.cjs +44 -0
- package/dist/cjs/node_modules/semver/functions/parse.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/functions/patch.cjs +10 -0
- package/dist/cjs/node_modules/semver/functions/patch.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/functions/prerelease.cjs +13 -0
- package/dist/cjs/node_modules/semver/functions/prerelease.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/functions/rcompare.cjs +10 -0
- package/dist/cjs/node_modules/semver/functions/rcompare.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/functions/rsort.cjs +10 -0
- package/dist/cjs/node_modules/semver/functions/rsort.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/functions/satisfies.cjs +17 -0
- package/dist/cjs/node_modules/semver/functions/satisfies.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/functions/sort.cjs +10 -0
- package/dist/cjs/node_modules/semver/functions/sort.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/functions/valid.cjs +13 -0
- package/dist/cjs/node_modules/semver/functions/valid.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/index.cjs +96 -0
- package/dist/cjs/node_modules/semver/index.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/internal/constants.cjs +22 -0
- package/dist/cjs/node_modules/semver/internal/constants.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/internal/debug.cjs +14 -0
- package/dist/cjs/node_modules/semver/internal/debug.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/internal/identifiers.cjs +28 -0
- package/dist/cjs/node_modules/semver/internal/identifiers.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/internal/parse-options.cjs +16 -0
- package/dist/cjs/node_modules/semver/internal/parse-options.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/internal/re.cjs +191 -0
- package/dist/cjs/node_modules/semver/internal/re.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/ranges/gtr.cjs +11 -0
- package/dist/cjs/node_modules/semver/ranges/gtr.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/ranges/intersects.cjs +14 -0
- package/dist/cjs/node_modules/semver/ranges/intersects.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/ranges/ltr.cjs +11 -0
- package/dist/cjs/node_modules/semver/ranges/ltr.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/ranges/max-satisfying.cjs +33 -0
- package/dist/cjs/node_modules/semver/ranges/max-satisfying.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/ranges/min-satisfying.cjs +32 -0
- package/dist/cjs/node_modules/semver/ranges/min-satisfying.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/ranges/min-version.cjs +70 -0
- package/dist/cjs/node_modules/semver/ranges/min-version.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/ranges/outside.cjs +94 -0
- package/dist/cjs/node_modules/semver/ranges/outside.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/ranges/simplify.cjs +55 -0
- package/dist/cjs/node_modules/semver/ranges/simplify.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/ranges/subset.cjs +254 -0
- package/dist/cjs/node_modules/semver/ranges/subset.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/ranges/to-comparators.cjs +15 -0
- package/dist/cjs/node_modules/semver/ranges/to-comparators.cjs.map +1 -0
- package/dist/cjs/node_modules/semver/ranges/valid.cjs +18 -0
- package/dist/cjs/node_modules/semver/ranges/valid.cjs.map +1 -0
- package/dist/cjs/node_modules/signal-exit/index.cjs +218 -0
- package/dist/cjs/node_modules/signal-exit/index.cjs.map +1 -0
- package/dist/cjs/node_modules/signal-exit/signals.cjs +71 -0
- package/dist/cjs/node_modules/signal-exit/signals.cjs.map +1 -0
- package/dist/cjs/node_modules/strip-bom/index.cjs +18 -0
- package/dist/cjs/node_modules/strip-bom/index.cjs.map +1 -0
- package/dist/cjs/node_modules/supports-color/index.cjs +142 -0
- package/dist/cjs/node_modules/supports-color/index.cjs.map +1 -0
- package/dist/cjs/node_modules/validate-npm-package-name/index.cjs +111 -0
- package/dist/cjs/node_modules/validate-npm-package-name/index.cjs.map +1 -0
- package/dist/cjs/node_modules/write-pkg/index.cjs +79 -0
- package/dist/cjs/node_modules/write-pkg/index.cjs.map +1 -0
- package/dist/cjs/node_modules/write-pkg/node_modules/detect-indent/index.cjs +125 -0
- package/dist/cjs/node_modules/write-pkg/node_modules/detect-indent/index.cjs.map +1 -0
- package/dist/cjs/node_modules/write-pkg/node_modules/is-plain-obj/index.cjs +11 -0
- package/dist/cjs/node_modules/write-pkg/node_modules/is-plain-obj/index.cjs.map +1 -0
- package/dist/cjs/node_modules/write-pkg/node_modules/make-dir/index.cjs +155 -0
- package/dist/cjs/node_modules/write-pkg/node_modules/make-dir/index.cjs.map +1 -0
- package/dist/cjs/node_modules/write-pkg/node_modules/semver/semver.cjs +1490 -0
- package/dist/cjs/node_modules/write-pkg/node_modules/semver/semver.cjs.map +1 -0
- package/dist/cjs/node_modules/write-pkg/node_modules/sort-keys/index.cjs +61 -0
- package/dist/cjs/node_modules/write-pkg/node_modules/sort-keys/index.cjs.map +1 -0
- package/dist/cjs/node_modules/write-pkg/node_modules/write-file-atomic/index.cjs +255 -0
- package/dist/cjs/node_modules/write-pkg/node_modules/write-file-atomic/index.cjs.map +1 -0
- package/dist/cjs/node_modules/write-pkg/node_modules/write-json-file/index.cjs +95 -0
- package/dist/cjs/node_modules/write-pkg/node_modules/write-json-file/index.cjs.map +1 -0
- package/dist/cjs/node_modules/yallist/iterator.cjs +22 -0
- package/dist/cjs/node_modules/yallist/iterator.cjs.map +1 -0
- package/dist/cjs/node_modules/yallist/yallist.cjs +432 -0
- package/dist/cjs/node_modules/yallist/yallist.cjs.map +1 -0
- package/dist/cjs/update-config.cjs +64 -0
- package/dist/cjs/update-config.cjs.map +1 -0
- package/dist/esm/_virtual/_commonjsHelpers.mjs +4 -0
- package/dist/esm/_virtual/_commonjsHelpers.mjs.map +1 -0
- package/dist/esm/_virtual/conversions.mjs +4 -0
- package/dist/esm/_virtual/conversions.mjs.map +1 -0
- package/dist/esm/_virtual/identifier.mjs +4 -0
- package/dist/esm/_virtual/identifier.mjs.map +1 -0
- package/dist/esm/_virtual/imurmurhash.mjs +4 -0
- package/dist/esm/_virtual/imurmurhash.mjs.map +1 -0
- package/dist/esm/_virtual/index.mjs +4 -0
- package/dist/esm/_virtual/index.mjs.map +1 -0
- package/dist/esm/_virtual/index10.mjs +4 -0
- package/dist/esm/_virtual/index10.mjs.map +1 -0
- package/dist/esm/_virtual/index11.mjs +4 -0
- package/dist/esm/_virtual/index11.mjs.map +1 -0
- package/dist/esm/_virtual/index12.mjs +4 -0
- package/dist/esm/_virtual/index12.mjs.map +1 -0
- package/dist/esm/_virtual/index13.mjs +4 -0
- package/dist/esm/_virtual/index13.mjs.map +1 -0
- package/dist/esm/_virtual/index14.mjs +4 -0
- package/dist/esm/_virtual/index14.mjs.map +1 -0
- package/dist/esm/_virtual/index15.mjs +4 -0
- package/dist/esm/_virtual/index15.mjs.map +1 -0
- package/dist/esm/_virtual/index2.mjs +4 -0
- package/dist/esm/_virtual/index2.mjs.map +1 -0
- package/dist/esm/_virtual/index3.mjs +4 -0
- package/dist/esm/_virtual/index3.mjs.map +1 -0
- package/dist/esm/_virtual/index4.mjs +4 -0
- package/dist/esm/_virtual/index4.mjs.map +1 -0
- package/dist/esm/_virtual/index5.mjs +4 -0
- package/dist/esm/_virtual/index5.mjs.map +1 -0
- package/dist/esm/_virtual/index6.mjs +4 -0
- package/dist/esm/_virtual/index6.mjs.map +1 -0
- package/dist/esm/_virtual/index7.mjs +4 -0
- package/dist/esm/_virtual/index7.mjs.map +1 -0
- package/dist/esm/_virtual/index8.mjs +4 -0
- package/dist/esm/_virtual/index8.mjs.map +1 -0
- package/dist/esm/_virtual/index9.mjs +4 -0
- package/dist/esm/_virtual/index9.mjs.map +1 -0
- package/dist/esm/_virtual/keyword.mjs +4 -0
- package/dist/esm/_virtual/keyword.mjs.map +1 -0
- package/dist/esm/_virtual/npa.mjs +4 -0
- package/dist/esm/_virtual/npa.mjs.map +1 -0
- package/dist/esm/_virtual/re.mjs +4 -0
- package/dist/esm/_virtual/re.mjs.map +1 -0
- package/dist/esm/_virtual/semver.mjs +4 -0
- package/dist/esm/_virtual/semver.mjs.map +1 -0
- package/dist/esm/_virtual/signals.mjs +4 -0
- package/dist/esm/_virtual/signals.mjs.map +1 -0
- package/dist/esm/index.mjs +2 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/node_modules/@babel/code-frame/lib/index.mjs +166 -0
- package/dist/esm/node_modules/@babel/code-frame/lib/index.mjs.map +1 -0
- package/dist/esm/node_modules/@babel/helper-validator-identifier/lib/identifier.mjs +86 -0
- package/dist/esm/node_modules/@babel/helper-validator-identifier/lib/identifier.mjs.map +1 -0
- package/dist/esm/node_modules/@babel/helper-validator-identifier/lib/index.mjs +65 -0
- package/dist/esm/node_modules/@babel/helper-validator-identifier/lib/index.mjs.map +1 -0
- package/dist/esm/node_modules/@babel/helper-validator-identifier/lib/keyword.mjs +40 -0
- package/dist/esm/node_modules/@babel/helper-validator-identifier/lib/keyword.mjs.map +1 -0
- package/dist/esm/node_modules/@babel/highlight/lib/index.mjs +123 -0
- package/dist/esm/node_modules/@babel/highlight/lib/index.mjs.map +1 -0
- package/dist/esm/node_modules/@lerna/package/index.mjs +307 -0
- package/dist/esm/node_modules/@lerna/package/index.mjs.map +1 -0
- package/dist/esm/node_modules/ansi-styles/index.mjs +170 -0
- package/dist/esm/node_modules/ansi-styles/index.mjs.map +1 -0
- package/dist/esm/node_modules/builtins/builtins.mjs +4 -0
- package/dist/esm/node_modules/builtins/builtins.mjs.map +1 -0
- package/dist/esm/node_modules/chalk/index.mjs +237 -0
- package/dist/esm/node_modules/chalk/index.mjs.map +1 -0
- package/dist/esm/node_modules/chalk/templates.mjs +130 -0
- package/dist/esm/node_modules/chalk/templates.mjs.map +1 -0
- package/dist/esm/node_modules/color-convert/conversions.mjs +876 -0
- package/dist/esm/node_modules/color-convert/conversions.mjs.map +1 -0
- package/dist/esm/node_modules/color-convert/index.mjs +85 -0
- package/dist/esm/node_modules/color-convert/index.mjs.map +1 -0
- package/dist/esm/node_modules/color-convert/route.mjs +102 -0
- package/dist/esm/node_modules/color-convert/route.mjs.map +1 -0
- package/dist/esm/node_modules/color-name/index.mjs +153 -0
- package/dist/esm/node_modules/color-name/index.mjs.map +1 -0
- package/dist/esm/node_modules/error-ex/index.mjs +145 -0
- package/dist/esm/node_modules/error-ex/index.mjs.map +1 -0
- package/dist/esm/node_modules/escape-string-regexp/index.mjs +12 -0
- package/dist/esm/node_modules/escape-string-regexp/index.mjs.map +1 -0
- package/dist/esm/node_modules/graceful-fs/clone.mjs +24 -0
- package/dist/esm/node_modules/graceful-fs/clone.mjs.map +1 -0
- package/dist/esm/node_modules/graceful-fs/graceful-fs.mjs +459 -0
- package/dist/esm/node_modules/graceful-fs/graceful-fs.mjs.map +1 -0
- package/dist/esm/node_modules/graceful-fs/legacy-streams.mjs +123 -0
- package/dist/esm/node_modules/graceful-fs/legacy-streams.mjs.map +1 -0
- package/dist/esm/node_modules/graceful-fs/polyfills.mjs +360 -0
- package/dist/esm/node_modules/graceful-fs/polyfills.mjs.map +1 -0
- package/dist/esm/node_modules/has-flag/index.mjs +10 -0
- package/dist/esm/node_modules/has-flag/index.mjs.map +1 -0
- package/dist/esm/node_modules/hosted-git-info/git-host-info.mjs +186 -0
- package/dist/esm/node_modules/hosted-git-info/git-host-info.mjs.map +1 -0
- package/dist/esm/node_modules/hosted-git-info/git-host.mjs +114 -0
- package/dist/esm/node_modules/hosted-git-info/git-host.mjs.map +1 -0
- package/dist/esm/node_modules/hosted-git-info/index.mjs +245 -0
- package/dist/esm/node_modules/hosted-git-info/index.mjs.map +1 -0
- package/dist/esm/node_modules/imurmurhash/imurmurhash.mjs +141 -0
- package/dist/esm/node_modules/imurmurhash/imurmurhash.mjs.map +1 -0
- package/dist/esm/node_modules/is-arrayish/index.mjs +11 -0
- package/dist/esm/node_modules/is-arrayish/index.mjs.map +1 -0
- package/dist/esm/node_modules/js-tokens/index.mjs +26 -0
- package/dist/esm/node_modules/js-tokens/index.mjs.map +1 -0
- package/dist/esm/node_modules/json-parse-even-better-errors/index.mjs +122 -0
- package/dist/esm/node_modules/json-parse-even-better-errors/index.mjs.map +1 -0
- package/dist/esm/node_modules/lines-and-columns/build/index.mjs +66 -0
- package/dist/esm/node_modules/lines-and-columns/build/index.mjs.map +1 -0
- package/dist/esm/node_modules/load-json-file/index.mjs +29 -0
- package/dist/esm/node_modules/load-json-file/index.mjs.map +1 -0
- package/dist/esm/node_modules/lru-cache/index.mjs +337 -0
- package/dist/esm/node_modules/lru-cache/index.mjs.map +1 -0
- package/dist/esm/node_modules/npm-package-arg/npa.mjs +362 -0
- package/dist/esm/node_modules/npm-package-arg/npa.mjs.map +1 -0
- package/dist/esm/node_modules/parse-json/index.mjs +63 -0
- package/dist/esm/node_modules/parse-json/index.mjs.map +1 -0
- package/dist/esm/node_modules/pify/index.mjs +69 -0
- package/dist/esm/node_modules/pify/index.mjs.map +1 -0
- package/dist/esm/node_modules/semver/classes/comparator.mjs +155 -0
- package/dist/esm/node_modules/semver/classes/comparator.mjs.map +1 -0
- package/dist/esm/node_modules/semver/classes/range.mjs +538 -0
- package/dist/esm/node_modules/semver/classes/range.mjs.map +1 -0
- package/dist/esm/node_modules/semver/classes/semver.mjs +297 -0
- package/dist/esm/node_modules/semver/classes/semver.mjs.map +1 -0
- package/dist/esm/node_modules/semver/functions/clean.mjs +11 -0
- package/dist/esm/node_modules/semver/functions/clean.mjs.map +1 -0
- package/dist/esm/node_modules/semver/functions/cmp.mjs +62 -0
- package/dist/esm/node_modules/semver/functions/cmp.mjs.map +1 -0
- package/dist/esm/node_modules/semver/functions/coerce.mjs +60 -0
- package/dist/esm/node_modules/semver/functions/coerce.mjs.map +1 -0
- package/dist/esm/node_modules/semver/functions/compare-build.mjs +12 -0
- package/dist/esm/node_modules/semver/functions/compare-build.mjs.map +1 -0
- package/dist/esm/node_modules/semver/functions/compare-loose.mjs +8 -0
- package/dist/esm/node_modules/semver/functions/compare-loose.mjs.map +1 -0
- package/dist/esm/node_modules/semver/functions/compare.mjs +10 -0
- package/dist/esm/node_modules/semver/functions/compare.mjs.map +1 -0
- package/dist/esm/node_modules/semver/functions/diff.mjs +29 -0
- package/dist/esm/node_modules/semver/functions/diff.mjs.map +1 -0
- package/dist/esm/node_modules/semver/functions/eq.mjs +8 -0
- package/dist/esm/node_modules/semver/functions/eq.mjs.map +1 -0
- package/dist/esm/node_modules/semver/functions/gt.mjs +8 -0
- package/dist/esm/node_modules/semver/functions/gt.mjs.map +1 -0
- package/dist/esm/node_modules/semver/functions/gte.mjs +8 -0
- package/dist/esm/node_modules/semver/functions/gte.mjs.map +1 -0
- package/dist/esm/node_modules/semver/functions/inc.mjs +23 -0
- package/dist/esm/node_modules/semver/functions/inc.mjs.map +1 -0
- package/dist/esm/node_modules/semver/functions/lt.mjs +8 -0
- package/dist/esm/node_modules/semver/functions/lt.mjs.map +1 -0
- package/dist/esm/node_modules/semver/functions/lte.mjs +8 -0
- package/dist/esm/node_modules/semver/functions/lte.mjs.map +1 -0
- package/dist/esm/node_modules/semver/functions/major.mjs +8 -0
- package/dist/esm/node_modules/semver/functions/major.mjs.map +1 -0
- package/dist/esm/node_modules/semver/functions/minor.mjs +8 -0
- package/dist/esm/node_modules/semver/functions/minor.mjs.map +1 -0
- package/dist/esm/node_modules/semver/functions/neq.mjs +8 -0
- package/dist/esm/node_modules/semver/functions/neq.mjs.map +1 -0
- package/dist/esm/node_modules/semver/functions/parse.mjs +42 -0
- package/dist/esm/node_modules/semver/functions/parse.mjs.map +1 -0
- package/dist/esm/node_modules/semver/functions/patch.mjs +8 -0
- package/dist/esm/node_modules/semver/functions/patch.mjs.map +1 -0
- package/dist/esm/node_modules/semver/functions/prerelease.mjs +11 -0
- package/dist/esm/node_modules/semver/functions/prerelease.mjs.map +1 -0
- package/dist/esm/node_modules/semver/functions/rcompare.mjs +8 -0
- package/dist/esm/node_modules/semver/functions/rcompare.mjs.map +1 -0
- package/dist/esm/node_modules/semver/functions/rsort.mjs +8 -0
- package/dist/esm/node_modules/semver/functions/rsort.mjs.map +1 -0
- package/dist/esm/node_modules/semver/functions/satisfies.mjs +15 -0
- package/dist/esm/node_modules/semver/functions/satisfies.mjs.map +1 -0
- package/dist/esm/node_modules/semver/functions/sort.mjs +8 -0
- package/dist/esm/node_modules/semver/functions/sort.mjs.map +1 -0
- package/dist/esm/node_modules/semver/functions/valid.mjs +11 -0
- package/dist/esm/node_modules/semver/functions/valid.mjs.map +1 -0
- package/dist/esm/node_modules/semver/index.mjs +94 -0
- package/dist/esm/node_modules/semver/index.mjs.map +1 -0
- package/dist/esm/node_modules/semver/internal/constants.mjs +20 -0
- package/dist/esm/node_modules/semver/internal/constants.mjs.map +1 -0
- package/dist/esm/node_modules/semver/internal/debug.mjs +12 -0
- package/dist/esm/node_modules/semver/internal/debug.mjs.map +1 -0
- package/dist/esm/node_modules/semver/internal/identifiers.mjs +26 -0
- package/dist/esm/node_modules/semver/internal/identifiers.mjs.map +1 -0
- package/dist/esm/node_modules/semver/internal/parse-options.mjs +14 -0
- package/dist/esm/node_modules/semver/internal/parse-options.mjs.map +1 -0
- package/dist/esm/node_modules/semver/internal/re.mjs +189 -0
- package/dist/esm/node_modules/semver/internal/re.mjs.map +1 -0
- package/dist/esm/node_modules/semver/ranges/gtr.mjs +9 -0
- package/dist/esm/node_modules/semver/ranges/gtr.mjs.map +1 -0
- package/dist/esm/node_modules/semver/ranges/intersects.mjs +12 -0
- package/dist/esm/node_modules/semver/ranges/intersects.mjs.map +1 -0
- package/dist/esm/node_modules/semver/ranges/ltr.mjs +9 -0
- package/dist/esm/node_modules/semver/ranges/ltr.mjs.map +1 -0
- package/dist/esm/node_modules/semver/ranges/max-satisfying.mjs +31 -0
- package/dist/esm/node_modules/semver/ranges/max-satisfying.mjs.map +1 -0
- package/dist/esm/node_modules/semver/ranges/min-satisfying.mjs +30 -0
- package/dist/esm/node_modules/semver/ranges/min-satisfying.mjs.map +1 -0
- package/dist/esm/node_modules/semver/ranges/min-version.mjs +68 -0
- package/dist/esm/node_modules/semver/ranges/min-version.mjs.map +1 -0
- package/dist/esm/node_modules/semver/ranges/outside.mjs +92 -0
- package/dist/esm/node_modules/semver/ranges/outside.mjs.map +1 -0
- package/dist/esm/node_modules/semver/ranges/simplify.mjs +53 -0
- package/dist/esm/node_modules/semver/ranges/simplify.mjs.map +1 -0
- package/dist/esm/node_modules/semver/ranges/subset.mjs +252 -0
- package/dist/esm/node_modules/semver/ranges/subset.mjs.map +1 -0
- package/dist/esm/node_modules/semver/ranges/to-comparators.mjs +13 -0
- package/dist/esm/node_modules/semver/ranges/to-comparators.mjs.map +1 -0
- package/dist/esm/node_modules/semver/ranges/valid.mjs +16 -0
- package/dist/esm/node_modules/semver/ranges/valid.mjs.map +1 -0
- package/dist/esm/node_modules/signal-exit/index.mjs +212 -0
- package/dist/esm/node_modules/signal-exit/index.mjs.map +1 -0
- package/dist/esm/node_modules/signal-exit/signals.mjs +67 -0
- package/dist/esm/node_modules/signal-exit/signals.mjs.map +1 -0
- package/dist/esm/node_modules/strip-bom/index.mjs +16 -0
- package/dist/esm/node_modules/strip-bom/index.mjs.map +1 -0
- package/dist/esm/node_modules/supports-color/index.mjs +136 -0
- package/dist/esm/node_modules/supports-color/index.mjs.map +1 -0
- package/dist/esm/node_modules/validate-npm-package-name/index.mjs +110 -0
- package/dist/esm/node_modules/validate-npm-package-name/index.mjs.map +1 -0
- package/dist/esm/node_modules/write-pkg/index.mjs +74 -0
- package/dist/esm/node_modules/write-pkg/index.mjs.map +1 -0
- package/dist/esm/node_modules/write-pkg/node_modules/detect-indent/index.mjs +123 -0
- package/dist/esm/node_modules/write-pkg/node_modules/detect-indent/index.mjs.map +1 -0
- package/dist/esm/node_modules/write-pkg/node_modules/is-plain-obj/index.mjs +9 -0
- package/dist/esm/node_modules/write-pkg/node_modules/is-plain-obj/index.mjs.map +1 -0
- package/dist/esm/node_modules/write-pkg/node_modules/make-dir/index.mjs +149 -0
- package/dist/esm/node_modules/write-pkg/node_modules/make-dir/index.mjs.map +1 -0
- package/dist/esm/node_modules/write-pkg/node_modules/semver/semver.mjs +1488 -0
- package/dist/esm/node_modules/write-pkg/node_modules/semver/semver.mjs.map +1 -0
- package/dist/esm/node_modules/write-pkg/node_modules/sort-keys/index.mjs +59 -0
- package/dist/esm/node_modules/write-pkg/node_modules/sort-keys/index.mjs.map +1 -0
- package/dist/esm/node_modules/write-pkg/node_modules/write-file-atomic/index.mjs +250 -0
- package/dist/esm/node_modules/write-pkg/node_modules/write-file-atomic/index.mjs.map +1 -0
- package/dist/esm/node_modules/write-pkg/node_modules/write-json-file/index.mjs +90 -0
- package/dist/esm/node_modules/write-pkg/node_modules/write-json-file/index.mjs.map +1 -0
- package/dist/esm/node_modules/yallist/iterator.mjs +18 -0
- package/dist/esm/node_modules/yallist/iterator.mjs.map +1 -0
- package/dist/esm/node_modules/yallist/yallist.mjs +430 -0
- package/dist/esm/node_modules/yallist/yallist.mjs.map +1 -0
- package/dist/esm/update-config.mjs +56 -0
- package/dist/esm/update-config.mjs.map +1 -0
- package/dist/types/cli.d.ts +1 -2
- package/dist/types/codecov-config.d.ts +13 -14
- package/dist/types/index.d.ts +2 -3
- package/dist/types/update-command.d.ts +8 -9
- package/dist/types/update-config.d.ts +12 -13
- package/dist/types/update.d.ts +6 -7
- package/package.json +65 -66
- package/dist/cjs/index.js +0 -10520
- package/dist/cjs/index.js.map +0 -1
- package/dist/cli/cli.js +0 -10588
- package/dist/cli/cli.js.map +0 -1
- package/dist/esm/index.js +0 -10503
- package/dist/esm/index.js.map +0 -1
- package/dist/types/cli.d.ts.map +0 -1
- package/dist/types/codecov-config.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/update-command.d.ts.map +0 -1
- package/dist/types/update-config.d.ts.map +0 -1
- package/dist/types/update.d.ts.map +0 -1
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const maybeJoin = (...args) => args.every(arg => arg) ? args.join('') : '';
|
|
4
|
+
const maybeEncode = (arg) => arg ? encodeURIComponent(arg) : '';
|
|
5
|
+
|
|
6
|
+
const defaults = {
|
|
7
|
+
sshtemplate: ({ domain, user, project, committish }) => `git@${domain}:${user}/${project}.git${maybeJoin('#', committish)}`,
|
|
8
|
+
sshurltemplate: ({ domain, user, project, committish }) => `git+ssh://git@${domain}/${user}/${project}.git${maybeJoin('#', committish)}`,
|
|
9
|
+
browsetemplate: ({ domain, user, project, committish, treepath }) => `https://${domain}/${user}/${project}${maybeJoin('/', treepath, '/', maybeEncode(committish))}`,
|
|
10
|
+
browsefiletemplate: ({ domain, user, project, committish, treepath, path, fragment, hashformat }) => `https://${domain}/${user}/${project}/${treepath}/${maybeEncode(committish || 'master')}/${path}${maybeJoin('#', hashformat(fragment || ''))}`,
|
|
11
|
+
docstemplate: ({ domain, user, project, treepath, committish }) => `https://${domain}/${user}/${project}${maybeJoin('/', treepath, '/', maybeEncode(committish))}#readme`,
|
|
12
|
+
httpstemplate: ({ auth, domain, user, project, committish }) => `git+https://${maybeJoin(auth, '@')}${domain}/${user}/${project}.git${maybeJoin('#', committish)}`,
|
|
13
|
+
filetemplate: ({ domain, user, project, committish, path }) => `https://${domain}/${user}/${project}/raw/${maybeEncode(committish) || 'master'}/${path}`,
|
|
14
|
+
shortcuttemplate: ({ type, user, project, committish }) => `${type}:${user}/${project}${maybeJoin('#', committish)}`,
|
|
15
|
+
pathtemplate: ({ user, project, committish }) => `${user}/${project}${maybeJoin('#', committish)}`,
|
|
16
|
+
bugstemplate: ({ domain, user, project }) => `https://${domain}/${user}/${project}/issues`,
|
|
17
|
+
hashformat: formatHashFragment
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const gitHosts = {};
|
|
21
|
+
gitHosts.github = Object.assign({}, defaults, {
|
|
22
|
+
// First two are insecure and generally shouldn't be used any more, but
|
|
23
|
+
// they are still supported.
|
|
24
|
+
protocols: ['git:', 'http:', 'git+ssh:', 'git+https:', 'ssh:', 'https:'],
|
|
25
|
+
domain: 'github.com',
|
|
26
|
+
treepath: 'tree',
|
|
27
|
+
filetemplate: ({ auth, user, project, committish, path }) => `https://${maybeJoin(auth, '@')}raw.githubusercontent.com/${user}/${project}/${maybeEncode(committish) || 'master'}/${path}`,
|
|
28
|
+
gittemplate: ({ auth, domain, user, project, committish }) => `git://${maybeJoin(auth, '@')}${domain}/${user}/${project}.git${maybeJoin('#', committish)}`,
|
|
29
|
+
tarballtemplate: ({ domain, user, project, committish }) => `https://codeload.${domain}/${user}/${project}/tar.gz/${maybeEncode(committish) || 'master'}`,
|
|
30
|
+
extract: (url) => {
|
|
31
|
+
let [, user, project, type, committish] = url.pathname.split('/', 5);
|
|
32
|
+
if (type && type !== 'tree') {
|
|
33
|
+
return
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (!type) {
|
|
37
|
+
committish = url.hash.slice(1);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (project && project.endsWith('.git')) {
|
|
41
|
+
project = project.slice(0, -4);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (!user || !project) {
|
|
45
|
+
return
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return { user, project, committish }
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
gitHosts.bitbucket = Object.assign({}, defaults, {
|
|
53
|
+
protocols: ['git+ssh:', 'git+https:', 'ssh:', 'https:'],
|
|
54
|
+
domain: 'bitbucket.org',
|
|
55
|
+
treepath: 'src',
|
|
56
|
+
tarballtemplate: ({ domain, user, project, committish }) => `https://${domain}/${user}/${project}/get/${maybeEncode(committish) || 'master'}.tar.gz`,
|
|
57
|
+
extract: (url) => {
|
|
58
|
+
let [, user, project, aux] = url.pathname.split('/', 4);
|
|
59
|
+
if (['get'].includes(aux)) {
|
|
60
|
+
return
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (project && project.endsWith('.git')) {
|
|
64
|
+
project = project.slice(0, -4);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (!user || !project) {
|
|
68
|
+
return
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return { user, project, committish: url.hash.slice(1) }
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
gitHosts.gitlab = Object.assign({}, defaults, {
|
|
76
|
+
protocols: ['git+ssh:', 'git+https:', 'ssh:', 'https:'],
|
|
77
|
+
domain: 'gitlab.com',
|
|
78
|
+
treepath: 'tree',
|
|
79
|
+
httpstemplate: ({ auth, domain, user, project, committish }) => `git+https://${maybeJoin(auth, '@')}${domain}/${user}/${project}.git${maybeJoin('#', committish)}`,
|
|
80
|
+
tarballtemplate: ({ domain, user, project, committish }) => `https://${domain}/${user}/${project}/repository/archive.tar.gz?ref=${maybeEncode(committish) || 'master'}`,
|
|
81
|
+
extract: (url) => {
|
|
82
|
+
const path = url.pathname.slice(1);
|
|
83
|
+
if (path.includes('/-/') || path.includes('/archive.tar.gz')) {
|
|
84
|
+
return
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const segments = path.split('/');
|
|
88
|
+
let project = segments.pop();
|
|
89
|
+
if (project.endsWith('.git')) {
|
|
90
|
+
project = project.slice(0, -4);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const user = segments.join('/');
|
|
94
|
+
if (!user || !project) {
|
|
95
|
+
return
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
return { user, project, committish: url.hash.slice(1) }
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
gitHosts.gist = Object.assign({}, defaults, {
|
|
103
|
+
protocols: ['git:', 'git+ssh:', 'git+https:', 'ssh:', 'https:'],
|
|
104
|
+
domain: 'gist.github.com',
|
|
105
|
+
sshtemplate: ({ domain, project, committish }) => `git@${domain}:${project}.git${maybeJoin('#', committish)}`,
|
|
106
|
+
sshurltemplate: ({ domain, project, committish }) => `git+ssh://git@${domain}/${project}.git${maybeJoin('#', committish)}`,
|
|
107
|
+
browsetemplate: ({ domain, project, committish }) => `https://${domain}/${project}${maybeJoin('/', maybeEncode(committish))}`,
|
|
108
|
+
browsefiletemplate: ({ domain, project, committish, path, hashformat }) => `https://${domain}/${project}${maybeJoin('/', maybeEncode(committish))}${maybeJoin('#', hashformat(path))}`,
|
|
109
|
+
docstemplate: ({ domain, project, committish }) => `https://${domain}/${project}${maybeJoin('/', maybeEncode(committish))}`,
|
|
110
|
+
httpstemplate: ({ domain, project, committish }) => `git+https://${domain}/${project}.git${maybeJoin('#', committish)}`,
|
|
111
|
+
filetemplate: ({ user, project, committish, path }) => `https://gist.githubusercontent.com/${user}/${project}/raw${maybeJoin('/', maybeEncode(committish))}/${path}`,
|
|
112
|
+
shortcuttemplate: ({ type, project, committish }) => `${type}:${project}${maybeJoin('#', committish)}`,
|
|
113
|
+
pathtemplate: ({ project, committish }) => `${project}${maybeJoin('#', committish)}`,
|
|
114
|
+
bugstemplate: ({ domain, project }) => `https://${domain}/${project}`,
|
|
115
|
+
gittemplate: ({ domain, project, committish }) => `git://${domain}/${project}.git${maybeJoin('#', committish)}`,
|
|
116
|
+
tarballtemplate: ({ project, committish }) => `https://codeload.github.com/gist/${project}/tar.gz/${maybeEncode(committish) || 'master'}`,
|
|
117
|
+
extract: (url) => {
|
|
118
|
+
let [, user, project, aux] = url.pathname.split('/', 4);
|
|
119
|
+
if (aux === 'raw') {
|
|
120
|
+
return
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
if (!project) {
|
|
124
|
+
if (!user) {
|
|
125
|
+
return
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
project = user;
|
|
129
|
+
user = null;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
if (project.endsWith('.git')) {
|
|
133
|
+
project = project.slice(0, -4);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return { user, project, committish: url.hash.slice(1) }
|
|
137
|
+
},
|
|
138
|
+
hashformat: function (fragment) {
|
|
139
|
+
return fragment && 'file-' + formatHashFragment(fragment)
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
gitHosts.sourcehut = Object.assign({}, defaults, {
|
|
144
|
+
protocols: ['git+ssh:', 'https:'],
|
|
145
|
+
domain: 'git.sr.ht',
|
|
146
|
+
treepath: 'tree',
|
|
147
|
+
browsefiletemplate: ({ domain, user, project, committish, treepath, path, fragment, hashformat }) => `https://${domain}/${user}/${project}/${treepath}/${maybeEncode(committish || 'main')}/${path}${maybeJoin('#', hashformat(fragment || ''))}`,
|
|
148
|
+
filetemplate: ({ domain, user, project, committish, path }) => `https://${domain}/${user}/${project}/blob/${maybeEncode(committish) || 'main'}/${path}`,
|
|
149
|
+
httpstemplate: ({ domain, user, project, committish }) => `https://${domain}/${user}/${project}.git${maybeJoin('#', committish)}`,
|
|
150
|
+
tarballtemplate: ({ domain, user, project, committish }) => `https://${domain}/${user}/${project}/archive/${maybeEncode(committish) || 'main'}.tar.gz`,
|
|
151
|
+
bugstemplate: ({ domain, user, project }) => `https://todo.sr.ht/${user}/${project}`,
|
|
152
|
+
docstemplate: ({ domain, user, project, treepath, committish }) => `https://${domain}/${user}/${project}${maybeJoin('/', treepath, '/', maybeEncode(committish))}#readme`,
|
|
153
|
+
extract: (url) => {
|
|
154
|
+
let [, user, project, aux] = url.pathname.split('/', 4);
|
|
155
|
+
|
|
156
|
+
// tarball url
|
|
157
|
+
if (['archive'].includes(aux)) {
|
|
158
|
+
return
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (project && project.endsWith('.git')) {
|
|
162
|
+
project = project.slice(0, -4);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
if (!user || !project) {
|
|
166
|
+
return
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
return { user, project, committish: url.hash.slice(1) }
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
const names = Object.keys(gitHosts);
|
|
174
|
+
gitHosts.byShortcut = {};
|
|
175
|
+
gitHosts.byDomain = {};
|
|
176
|
+
for (const name of names) {
|
|
177
|
+
gitHosts.byShortcut[`${name}:`] = name;
|
|
178
|
+
gitHosts.byDomain[gitHosts[name].domain] = name;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
function formatHashFragment (fragment) {
|
|
182
|
+
return fragment.toLowerCase().replace(/^\W+|\/|\W+$/g, '').replace(/\W+/g, '-')
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
var gitHostInfo = gitHosts;
|
|
186
|
+
|
|
187
|
+
module.exports = gitHostInfo;
|
|
188
|
+
//# sourceMappingURL=git-host-info.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-host-info.cjs","sources":["../../../../node_modules/hosted-git-info/git-host-info.js"],"sourcesContent":["'use strict'\nconst maybeJoin = (...args) => args.every(arg => arg) ? args.join('') : ''\nconst maybeEncode = (arg) => arg ? encodeURIComponent(arg) : ''\n\nconst defaults = {\n sshtemplate: ({ domain, user, project, committish }) => `git@${domain}:${user}/${project}.git${maybeJoin('#', committish)}`,\n sshurltemplate: ({ domain, user, project, committish }) => `git+ssh://git@${domain}/${user}/${project}.git${maybeJoin('#', committish)}`,\n browsetemplate: ({ domain, user, project, committish, treepath }) => `https://${domain}/${user}/${project}${maybeJoin('/', treepath, '/', maybeEncode(committish))}`,\n browsefiletemplate: ({ domain, user, project, committish, treepath, path, fragment, hashformat }) => `https://${domain}/${user}/${project}/${treepath}/${maybeEncode(committish || 'master')}/${path}${maybeJoin('#', hashformat(fragment || ''))}`,\n docstemplate: ({ domain, user, project, treepath, committish }) => `https://${domain}/${user}/${project}${maybeJoin('/', treepath, '/', maybeEncode(committish))}#readme`,\n httpstemplate: ({ auth, domain, user, project, committish }) => `git+https://${maybeJoin(auth, '@')}${domain}/${user}/${project}.git${maybeJoin('#', committish)}`,\n filetemplate: ({ domain, user, project, committish, path }) => `https://${domain}/${user}/${project}/raw/${maybeEncode(committish) || 'master'}/${path}`,\n shortcuttemplate: ({ type, user, project, committish }) => `${type}:${user}/${project}${maybeJoin('#', committish)}`,\n pathtemplate: ({ user, project, committish }) => `${user}/${project}${maybeJoin('#', committish)}`,\n bugstemplate: ({ domain, user, project }) => `https://${domain}/${user}/${project}/issues`,\n hashformat: formatHashFragment\n}\n\nconst gitHosts = {}\ngitHosts.github = Object.assign({}, defaults, {\n // First two are insecure and generally shouldn't be used any more, but\n // they are still supported.\n protocols: ['git:', 'http:', 'git+ssh:', 'git+https:', 'ssh:', 'https:'],\n domain: 'github.com',\n treepath: 'tree',\n filetemplate: ({ auth, user, project, committish, path }) => `https://${maybeJoin(auth, '@')}raw.githubusercontent.com/${user}/${project}/${maybeEncode(committish) || 'master'}/${path}`,\n gittemplate: ({ auth, domain, user, project, committish }) => `git://${maybeJoin(auth, '@')}${domain}/${user}/${project}.git${maybeJoin('#', committish)}`,\n tarballtemplate: ({ domain, user, project, committish }) => `https://codeload.${domain}/${user}/${project}/tar.gz/${maybeEncode(committish) || 'master'}`,\n extract: (url) => {\n let [, user, project, type, committish] = url.pathname.split('/', 5)\n if (type && type !== 'tree') {\n return\n }\n\n if (!type) {\n committish = url.hash.slice(1)\n }\n\n if (project && project.endsWith('.git')) {\n project = project.slice(0, -4)\n }\n\n if (!user || !project) {\n return\n }\n\n return { user, project, committish }\n }\n})\n\ngitHosts.bitbucket = Object.assign({}, defaults, {\n protocols: ['git+ssh:', 'git+https:', 'ssh:', 'https:'],\n domain: 'bitbucket.org',\n treepath: 'src',\n tarballtemplate: ({ domain, user, project, committish }) => `https://${domain}/${user}/${project}/get/${maybeEncode(committish) || 'master'}.tar.gz`,\n extract: (url) => {\n let [, user, project, aux] = url.pathname.split('/', 4)\n if (['get'].includes(aux)) {\n return\n }\n\n if (project && project.endsWith('.git')) {\n project = project.slice(0, -4)\n }\n\n if (!user || !project) {\n return\n }\n\n return { user, project, committish: url.hash.slice(1) }\n }\n})\n\ngitHosts.gitlab = Object.assign({}, defaults, {\n protocols: ['git+ssh:', 'git+https:', 'ssh:', 'https:'],\n domain: 'gitlab.com',\n treepath: 'tree',\n httpstemplate: ({ auth, domain, user, project, committish }) => `git+https://${maybeJoin(auth, '@')}${domain}/${user}/${project}.git${maybeJoin('#', committish)}`,\n tarballtemplate: ({ domain, user, project, committish }) => `https://${domain}/${user}/${project}/repository/archive.tar.gz?ref=${maybeEncode(committish) || 'master'}`,\n extract: (url) => {\n const path = url.pathname.slice(1)\n if (path.includes('/-/') || path.includes('/archive.tar.gz')) {\n return\n }\n\n const segments = path.split('/')\n let project = segments.pop()\n if (project.endsWith('.git')) {\n project = project.slice(0, -4)\n }\n\n const user = segments.join('/')\n if (!user || !project) {\n return\n }\n\n return { user, project, committish: url.hash.slice(1) }\n }\n})\n\ngitHosts.gist = Object.assign({}, defaults, {\n protocols: ['git:', 'git+ssh:', 'git+https:', 'ssh:', 'https:'],\n domain: 'gist.github.com',\n sshtemplate: ({ domain, project, committish }) => `git@${domain}:${project}.git${maybeJoin('#', committish)}`,\n sshurltemplate: ({ domain, project, committish }) => `git+ssh://git@${domain}/${project}.git${maybeJoin('#', committish)}`,\n browsetemplate: ({ domain, project, committish }) => `https://${domain}/${project}${maybeJoin('/', maybeEncode(committish))}`,\n browsefiletemplate: ({ domain, project, committish, path, hashformat }) => `https://${domain}/${project}${maybeJoin('/', maybeEncode(committish))}${maybeJoin('#', hashformat(path))}`,\n docstemplate: ({ domain, project, committish }) => `https://${domain}/${project}${maybeJoin('/', maybeEncode(committish))}`,\n httpstemplate: ({ domain, project, committish }) => `git+https://${domain}/${project}.git${maybeJoin('#', committish)}`,\n filetemplate: ({ user, project, committish, path }) => `https://gist.githubusercontent.com/${user}/${project}/raw${maybeJoin('/', maybeEncode(committish))}/${path}`,\n shortcuttemplate: ({ type, project, committish }) => `${type}:${project}${maybeJoin('#', committish)}`,\n pathtemplate: ({ project, committish }) => `${project}${maybeJoin('#', committish)}`,\n bugstemplate: ({ domain, project }) => `https://${domain}/${project}`,\n gittemplate: ({ domain, project, committish }) => `git://${domain}/${project}.git${maybeJoin('#', committish)}`,\n tarballtemplate: ({ project, committish }) => `https://codeload.github.com/gist/${project}/tar.gz/${maybeEncode(committish) || 'master'}`,\n extract: (url) => {\n let [, user, project, aux] = url.pathname.split('/', 4)\n if (aux === 'raw') {\n return\n }\n\n if (!project) {\n if (!user) {\n return\n }\n\n project = user\n user = null\n }\n\n if (project.endsWith('.git')) {\n project = project.slice(0, -4)\n }\n\n return { user, project, committish: url.hash.slice(1) }\n },\n hashformat: function (fragment) {\n return fragment && 'file-' + formatHashFragment(fragment)\n }\n})\n\ngitHosts.sourcehut = Object.assign({}, defaults, {\n protocols: ['git+ssh:', 'https:'],\n domain: 'git.sr.ht',\n treepath: 'tree',\n browsefiletemplate: ({ domain, user, project, committish, treepath, path, fragment, hashformat }) => `https://${domain}/${user}/${project}/${treepath}/${maybeEncode(committish || 'main')}/${path}${maybeJoin('#', hashformat(fragment || ''))}`,\n filetemplate: ({ domain, user, project, committish, path }) => `https://${domain}/${user}/${project}/blob/${maybeEncode(committish) || 'main'}/${path}`,\n httpstemplate: ({ domain, user, project, committish }) => `https://${domain}/${user}/${project}.git${maybeJoin('#', committish)}`,\n tarballtemplate: ({ domain, user, project, committish }) => `https://${domain}/${user}/${project}/archive/${maybeEncode(committish) || 'main'}.tar.gz`,\n bugstemplate: ({ domain, user, project }) => `https://todo.sr.ht/${user}/${project}`,\n docstemplate: ({ domain, user, project, treepath, committish }) => `https://${domain}/${user}/${project}${maybeJoin('/', treepath, '/', maybeEncode(committish))}#readme`,\n extract: (url) => {\n let [, user, project, aux] = url.pathname.split('/', 4)\n\n // tarball url\n if (['archive'].includes(aux)) {\n return\n }\n\n if (project && project.endsWith('.git')) {\n project = project.slice(0, -4)\n }\n\n if (!user || !project) {\n return\n }\n\n return { user, project, committish: url.hash.slice(1) }\n }\n})\n\nconst names = Object.keys(gitHosts)\ngitHosts.byShortcut = {}\ngitHosts.byDomain = {}\nfor (const name of names) {\n gitHosts.byShortcut[`${name}:`] = name\n gitHosts.byDomain[gitHosts[name].domain] = name\n}\n\nfunction formatHashFragment (fragment) {\n return fragment.toLowerCase().replace(/^\\W+|\\/|\\W+$/g, '').replace(/\\W+/g, '-')\n}\n\nmodule.exports = gitHosts\n"],"names":[],"mappings":";;AACA,MAAM,SAAS,GAAG,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,GAAE;AAC1E,MAAM,WAAW,GAAG,CAAC,GAAG,KAAK,GAAG,GAAG,kBAAkB,CAAC,GAAG,CAAC,GAAG,GAAE;AAC/D;AACA,MAAM,QAAQ,GAAG;AACjB,EAAE,WAAW,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC;AAC7H,EAAE,cAAc,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC;AAC1I,EAAE,cAAc,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,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,IAAI,CAAC,OAAO,EAAE;AAC3B,MAAM,MAAM;AACZ,KAAK;AACL;AACA,IAAI,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;AAC3D,GAAG;AACH,CAAC,EAAC;AACF;AACA,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAC;AACnC,QAAQ,CAAC,UAAU,GAAG,GAAE;AACxB,QAAQ,CAAC,QAAQ,GAAG,GAAE;AACtB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;AAC1B,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,KAAI;AACxC,EAAE,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,GAAG,KAAI;AACjD,CAAC;AACD;AACA,SAAS,kBAAkB,EAAE,QAAQ,EAAE;AACvC,EAAE,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;AACjF,CAAC;AACD;AACA,IAAA,WAAc,GAAG;;;;"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const gitHostInfo = require('./git-host-info.cjs');
|
|
4
|
+
|
|
5
|
+
const gitHosts = gitHostInfo;
|
|
6
|
+
|
|
7
|
+
class GitHost {
|
|
8
|
+
constructor (type, user, auth, project, committish, defaultRepresentation, opts = {}) {
|
|
9
|
+
Object.assign(this, gitHosts[type]);
|
|
10
|
+
this.type = type;
|
|
11
|
+
this.user = user;
|
|
12
|
+
this.auth = auth;
|
|
13
|
+
this.project = project;
|
|
14
|
+
this.committish = committish;
|
|
15
|
+
this.default = defaultRepresentation;
|
|
16
|
+
this.opts = opts;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
hash () {
|
|
20
|
+
return this.committish ? `#${this.committish}` : ''
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
ssh (opts) {
|
|
24
|
+
return this._fill(this.sshtemplate, opts)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
_fill (template, opts) {
|
|
28
|
+
if (typeof template === 'function') {
|
|
29
|
+
const options = { ...this, ...this.opts, ...opts };
|
|
30
|
+
|
|
31
|
+
// the path should always be set so we don't end up with 'undefined' in urls
|
|
32
|
+
if (!options.path) {
|
|
33
|
+
options.path = '';
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// template functions will insert the leading slash themselves
|
|
37
|
+
if (options.path.startsWith('/')) {
|
|
38
|
+
options.path = options.path.slice(1);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (options.noCommittish) {
|
|
42
|
+
options.committish = null;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const result = template(options);
|
|
46
|
+
return options.noGitPlus && result.startsWith('git+') ? result.slice(4) : result
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return null
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
sshurl (opts) {
|
|
53
|
+
return this._fill(this.sshurltemplate, opts)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
browse (path, fragment, opts) {
|
|
57
|
+
// not a string, treat path as opts
|
|
58
|
+
if (typeof path !== 'string') {
|
|
59
|
+
return this._fill(this.browsetemplate, path)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (typeof fragment !== 'string') {
|
|
63
|
+
opts = fragment;
|
|
64
|
+
fragment = null;
|
|
65
|
+
}
|
|
66
|
+
return this._fill(this.browsefiletemplate, { ...opts, fragment, path })
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
docs (opts) {
|
|
70
|
+
return this._fill(this.docstemplate, opts)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
bugs (opts) {
|
|
74
|
+
return this._fill(this.bugstemplate, opts)
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
https (opts) {
|
|
78
|
+
return this._fill(this.httpstemplate, opts)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
git (opts) {
|
|
82
|
+
return this._fill(this.gittemplate, opts)
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
shortcut (opts) {
|
|
86
|
+
return this._fill(this.shortcuttemplate, opts)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
path (opts) {
|
|
90
|
+
return this._fill(this.pathtemplate, opts)
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
tarball (opts) {
|
|
94
|
+
return this._fill(this.tarballtemplate, { ...opts, noCommittish: false })
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
file (path, opts) {
|
|
98
|
+
return this._fill(this.filetemplate, { ...opts, path })
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
getDefaultRepresentation () {
|
|
102
|
+
return this.default
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
toString (opts) {
|
|
106
|
+
if (this.default && typeof this[this.default] === 'function') {
|
|
107
|
+
return this[this.default](opts)
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return this.sshurl(opts)
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
var gitHost = GitHost;
|
|
114
|
+
|
|
115
|
+
module.exports = gitHost;
|
|
116
|
+
//# sourceMappingURL=git-host.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-host.cjs","sources":["../../../../node_modules/hosted-git-info/git-host.js"],"sourcesContent":["'use strict'\nconst gitHosts = require('./git-host-info.js')\n\nclass GitHost {\n constructor (type, user, auth, project, committish, defaultRepresentation, opts = {}) {\n Object.assign(this, gitHosts[type])\n this.type = type\n this.user = user\n this.auth = auth\n this.project = project\n this.committish = committish\n this.default = defaultRepresentation\n this.opts = opts\n }\n\n hash () {\n return this.committish ? `#${this.committish}` : ''\n }\n\n ssh (opts) {\n return this._fill(this.sshtemplate, opts)\n }\n\n _fill (template, opts) {\n if (typeof template === 'function') {\n const options = { ...this, ...this.opts, ...opts }\n\n // the path should always be set so we don't end up with 'undefined' in urls\n if (!options.path) {\n options.path = ''\n }\n\n // template functions will insert the leading slash themselves\n if (options.path.startsWith('/')) {\n options.path = options.path.slice(1)\n }\n\n if (options.noCommittish) {\n options.committish = null\n }\n\n const result = template(options)\n return options.noGitPlus && result.startsWith('git+') ? result.slice(4) : result\n }\n\n return null\n }\n\n sshurl (opts) {\n return this._fill(this.sshurltemplate, opts)\n }\n\n browse (path, fragment, opts) {\n // not a string, treat path as opts\n if (typeof path !== 'string') {\n return this._fill(this.browsetemplate, path)\n }\n\n if (typeof fragment !== 'string') {\n opts = fragment\n fragment = null\n }\n return this._fill(this.browsefiletemplate, { ...opts, fragment, path })\n }\n\n docs (opts) {\n return this._fill(this.docstemplate, opts)\n }\n\n bugs (opts) {\n return this._fill(this.bugstemplate, opts)\n }\n\n https (opts) {\n return this._fill(this.httpstemplate, opts)\n }\n\n git (opts) {\n return this._fill(this.gittemplate, opts)\n }\n\n shortcut (opts) {\n return this._fill(this.shortcuttemplate, opts)\n }\n\n path (opts) {\n return this._fill(this.pathtemplate, opts)\n }\n\n tarball (opts) {\n return this._fill(this.tarballtemplate, { ...opts, noCommittish: false })\n }\n\n file (path, opts) {\n return this._fill(this.filetemplate, { ...opts, path })\n }\n\n getDefaultRepresentation () {\n return this.default\n }\n\n toString (opts) {\n if (this.default && typeof this[this.default] === 'function') {\n return this[this.default](opts)\n }\n\n return this.sshurl(opts)\n }\n}\nmodule.exports = GitHost\n"],"names":["require$$0"],"mappings":";;;;AACA,MAAM,QAAQ,GAAGA,YAA6B;AAC9C;AACA,MAAM,OAAO,CAAC;AACd,EAAE,WAAW,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,IAAI,GAAG,EAAE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AAC5B,GAAG;AACH,CAAC;AACD,IAAA,OAAc,GAAG;;;;"}
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('../../_virtual/index3.cjs');
|
|
4
|
+
const require$$0 = require('url');
|
|
5
|
+
const gitHostInfo = require('./git-host-info.cjs');
|
|
6
|
+
const gitHost = require('./git-host.cjs');
|
|
7
|
+
const index$1 = require('../lru-cache/index.cjs');
|
|
8
|
+
|
|
9
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
|
+
|
|
11
|
+
const require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0);
|
|
12
|
+
|
|
13
|
+
(function (module) {
|
|
14
|
+
const url = require$$0__default["default"];
|
|
15
|
+
const gitHosts = gitHostInfo;
|
|
16
|
+
const GitHost = module.exports = gitHost;
|
|
17
|
+
const LRU = index$1;
|
|
18
|
+
const cache = new LRU({ max: 1000 });
|
|
19
|
+
|
|
20
|
+
const protocolToRepresentationMap = {
|
|
21
|
+
'git+ssh:': 'sshurl',
|
|
22
|
+
'git+https:': 'https',
|
|
23
|
+
'ssh:': 'sshurl',
|
|
24
|
+
'git:': 'git'
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
function protocolToRepresentation (protocol) {
|
|
28
|
+
return protocolToRepresentationMap[protocol] || protocol.slice(0, -1)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const authProtocols = {
|
|
32
|
+
'git:': true,
|
|
33
|
+
'https:': true,
|
|
34
|
+
'git+https:': true,
|
|
35
|
+
'http:': true,
|
|
36
|
+
'git+http:': true
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const knownProtocols = Object.keys(gitHosts.byShortcut).concat(['http:', 'https:', 'git:', 'git+ssh:', 'git+https:', 'ssh:']);
|
|
40
|
+
|
|
41
|
+
module.exports.fromUrl = function (giturl, opts) {
|
|
42
|
+
if (typeof giturl !== 'string') {
|
|
43
|
+
return
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const key = giturl + JSON.stringify(opts || {});
|
|
47
|
+
|
|
48
|
+
if (!cache.has(key)) {
|
|
49
|
+
cache.set(key, fromUrl(giturl, opts));
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return cache.get(key)
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
function fromUrl (giturl, opts) {
|
|
56
|
+
if (!giturl) {
|
|
57
|
+
return
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const url = isGitHubShorthand(giturl) ? 'github:' + giturl : correctProtocol(giturl);
|
|
61
|
+
const parsed = parseGitUrl(url);
|
|
62
|
+
if (!parsed) {
|
|
63
|
+
return parsed
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const gitHostShortcut = gitHosts.byShortcut[parsed.protocol];
|
|
67
|
+
const gitHostDomain = gitHosts.byDomain[parsed.hostname.startsWith('www.') ? parsed.hostname.slice(4) : parsed.hostname];
|
|
68
|
+
const gitHostName = gitHostShortcut || gitHostDomain;
|
|
69
|
+
if (!gitHostName) {
|
|
70
|
+
return
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const gitHostInfo = gitHosts[gitHostShortcut || gitHostDomain];
|
|
74
|
+
let auth = null;
|
|
75
|
+
if (authProtocols[parsed.protocol] && (parsed.username || parsed.password)) {
|
|
76
|
+
auth = `${parsed.username}${parsed.password ? ':' + parsed.password : ''}`;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
let committish = null;
|
|
80
|
+
let user = null;
|
|
81
|
+
let project = null;
|
|
82
|
+
let defaultRepresentation = null;
|
|
83
|
+
|
|
84
|
+
try {
|
|
85
|
+
if (gitHostShortcut) {
|
|
86
|
+
let pathname = parsed.pathname.startsWith('/') ? parsed.pathname.slice(1) : parsed.pathname;
|
|
87
|
+
const firstAt = pathname.indexOf('@');
|
|
88
|
+
// we ignore auth for shortcuts, so just trim it out
|
|
89
|
+
if (firstAt > -1) {
|
|
90
|
+
pathname = pathname.slice(firstAt + 1);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const lastSlash = pathname.lastIndexOf('/');
|
|
94
|
+
if (lastSlash > -1) {
|
|
95
|
+
user = decodeURIComponent(pathname.slice(0, lastSlash));
|
|
96
|
+
// we want nulls only, never empty strings
|
|
97
|
+
if (!user) {
|
|
98
|
+
user = null;
|
|
99
|
+
}
|
|
100
|
+
project = decodeURIComponent(pathname.slice(lastSlash + 1));
|
|
101
|
+
} else {
|
|
102
|
+
project = decodeURIComponent(pathname);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if (project.endsWith('.git')) {
|
|
106
|
+
project = project.slice(0, -4);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
if (parsed.hash) {
|
|
110
|
+
committish = decodeURIComponent(parsed.hash.slice(1));
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
defaultRepresentation = 'shortcut';
|
|
114
|
+
} else {
|
|
115
|
+
if (!gitHostInfo.protocols.includes(parsed.protocol)) {
|
|
116
|
+
return
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const segments = gitHostInfo.extract(parsed);
|
|
120
|
+
if (!segments) {
|
|
121
|
+
return
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
user = segments.user && decodeURIComponent(segments.user);
|
|
125
|
+
project = decodeURIComponent(segments.project);
|
|
126
|
+
committish = decodeURIComponent(segments.committish);
|
|
127
|
+
defaultRepresentation = protocolToRepresentation(parsed.protocol);
|
|
128
|
+
}
|
|
129
|
+
} catch (err) {
|
|
130
|
+
/* istanbul ignore else */
|
|
131
|
+
if (err instanceof URIError) {
|
|
132
|
+
return
|
|
133
|
+
} else {
|
|
134
|
+
throw err
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return new GitHost(gitHostName, user, auth, project, committish, defaultRepresentation, opts)
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// accepts input like git:github.com:user/repo and inserts the // after the first :
|
|
142
|
+
const correctProtocol = (arg) => {
|
|
143
|
+
const firstColon = arg.indexOf(':');
|
|
144
|
+
const proto = arg.slice(0, firstColon + 1);
|
|
145
|
+
if (knownProtocols.includes(proto)) {
|
|
146
|
+
return arg
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const firstAt = arg.indexOf('@');
|
|
150
|
+
if (firstAt > -1) {
|
|
151
|
+
if (firstAt > firstColon) {
|
|
152
|
+
return `git+ssh://${arg}`
|
|
153
|
+
} else {
|
|
154
|
+
return arg
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
const doubleSlash = arg.indexOf('//');
|
|
159
|
+
if (doubleSlash === firstColon + 1) {
|
|
160
|
+
return arg
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
return arg.slice(0, firstColon + 1) + '//' + arg.slice(firstColon + 1)
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
// look for github shorthand inputs, such as npm/cli
|
|
167
|
+
const isGitHubShorthand = (arg) => {
|
|
168
|
+
// it cannot contain whitespace before the first #
|
|
169
|
+
// it cannot start with a / because that's probably an absolute file path
|
|
170
|
+
// but it must include a slash since repos are username/repository
|
|
171
|
+
// it cannot start with a . because that's probably a relative file path
|
|
172
|
+
// it cannot start with an @ because that's a scoped package if it passes the other tests
|
|
173
|
+
// it cannot contain a : before a # because that tells us that there's a protocol
|
|
174
|
+
// a second / may not exist before a #
|
|
175
|
+
const firstHash = arg.indexOf('#');
|
|
176
|
+
const firstSlash = arg.indexOf('/');
|
|
177
|
+
const secondSlash = arg.indexOf('/', firstSlash + 1);
|
|
178
|
+
const firstColon = arg.indexOf(':');
|
|
179
|
+
const firstSpace = /\s/.exec(arg);
|
|
180
|
+
const firstAt = arg.indexOf('@');
|
|
181
|
+
|
|
182
|
+
const spaceOnlyAfterHash = !firstSpace || (firstHash > -1 && firstSpace.index > firstHash);
|
|
183
|
+
const atOnlyAfterHash = firstAt === -1 || (firstHash > -1 && firstAt > firstHash);
|
|
184
|
+
const colonOnlyAfterHash = firstColon === -1 || (firstHash > -1 && firstColon > firstHash);
|
|
185
|
+
const secondSlashOnlyAfterHash = secondSlash === -1 || (firstHash > -1 && secondSlash > firstHash);
|
|
186
|
+
const hasSlash = firstSlash > 0;
|
|
187
|
+
// if a # is found, what we really want to know is that the character immediately before # is not a /
|
|
188
|
+
const doesNotEndWithSlash = firstHash > -1 ? arg[firstHash - 1] !== '/' : !arg.endsWith('/');
|
|
189
|
+
const doesNotStartWithDot = !arg.startsWith('.');
|
|
190
|
+
|
|
191
|
+
return spaceOnlyAfterHash && hasSlash && doesNotEndWithSlash && doesNotStartWithDot && atOnlyAfterHash && colonOnlyAfterHash && secondSlashOnlyAfterHash
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
// attempt to correct an scp style url so that it will parse with `new URL()`
|
|
195
|
+
const correctUrl = (giturl) => {
|
|
196
|
+
const firstAt = giturl.indexOf('@');
|
|
197
|
+
const lastHash = giturl.lastIndexOf('#');
|
|
198
|
+
let firstColon = giturl.indexOf(':');
|
|
199
|
+
let lastColon = giturl.lastIndexOf(':', lastHash > -1 ? lastHash : Infinity);
|
|
200
|
+
|
|
201
|
+
let corrected;
|
|
202
|
+
if (lastColon > firstAt) {
|
|
203
|
+
// the last : comes after the first @ (or there is no @)
|
|
204
|
+
// like it would in:
|
|
205
|
+
// proto://hostname.com:user/repo
|
|
206
|
+
// username@hostname.com:user/repo
|
|
207
|
+
// :password@hostname.com:user/repo
|
|
208
|
+
// username:password@hostname.com:user/repo
|
|
209
|
+
// proto://username@hostname.com:user/repo
|
|
210
|
+
// proto://:password@hostname.com:user/repo
|
|
211
|
+
// proto://username:password@hostname.com:user/repo
|
|
212
|
+
// then we replace the last : with a / to create a valid path
|
|
213
|
+
corrected = giturl.slice(0, lastColon) + '/' + giturl.slice(lastColon + 1);
|
|
214
|
+
// // and we find our new : positions
|
|
215
|
+
firstColon = corrected.indexOf(':');
|
|
216
|
+
lastColon = corrected.lastIndexOf(':');
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
if (firstColon === -1 && giturl.indexOf('//') === -1) {
|
|
220
|
+
// we have no : at all
|
|
221
|
+
// as it would be in:
|
|
222
|
+
// username@hostname.com/user/repo
|
|
223
|
+
// then we prepend a protocol
|
|
224
|
+
corrected = `git+ssh://${corrected}`;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
return corrected
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
// try to parse the url as its given to us, if that throws
|
|
231
|
+
// then we try to clean the url and parse that result instead
|
|
232
|
+
// THIS FUNCTION SHOULD NEVER THROW
|
|
233
|
+
const parseGitUrl = (giturl) => {
|
|
234
|
+
let result;
|
|
235
|
+
try {
|
|
236
|
+
result = new url.URL(giturl);
|
|
237
|
+
} catch (err) {}
|
|
238
|
+
|
|
239
|
+
if (result) {
|
|
240
|
+
return result
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
const correctedUrl = correctUrl(giturl);
|
|
244
|
+
try {
|
|
245
|
+
result = new url.URL(correctedUrl);
|
|
246
|
+
} catch (err) {}
|
|
247
|
+
|
|
248
|
+
return result
|
|
249
|
+
};
|
|
250
|
+
} (index.hostedGitInfo));
|
|
251
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../node_modules/hosted-git-info/index.js"],"sourcesContent":["'use strict'\nconst url = require('url')\nconst gitHosts = require('./git-host-info.js')\nconst GitHost = module.exports = require('./git-host.js')\nconst LRU = require('lru-cache')\nconst cache = new LRU({ max: 1000 })\n\nconst protocolToRepresentationMap = {\n 'git+ssh:': 'sshurl',\n 'git+https:': 'https',\n 'ssh:': 'sshurl',\n 'git:': 'git'\n}\n\nfunction protocolToRepresentation (protocol) {\n return protocolToRepresentationMap[protocol] || protocol.slice(0, -1)\n}\n\nconst authProtocols = {\n 'git:': true,\n 'https:': true,\n 'git+https:': true,\n 'http:': true,\n 'git+http:': true\n}\n\nconst knownProtocols = Object.keys(gitHosts.byShortcut).concat(['http:', 'https:', 'git:', 'git+ssh:', 'git+https:', 'ssh:'])\n\nmodule.exports.fromUrl = function (giturl, opts) {\n if (typeof giturl !== 'string') {\n return\n }\n\n const key = giturl + JSON.stringify(opts || {})\n\n if (!cache.has(key)) {\n cache.set(key, fromUrl(giturl, opts))\n }\n\n return cache.get(key)\n}\n\nfunction fromUrl (giturl, opts) {\n if (!giturl) {\n return\n }\n\n const url = isGitHubShorthand(giturl) ? 'github:' + giturl : correctProtocol(giturl)\n const parsed = parseGitUrl(url)\n if (!parsed) {\n return parsed\n }\n\n const gitHostShortcut = gitHosts.byShortcut[parsed.protocol]\n const gitHostDomain = gitHosts.byDomain[parsed.hostname.startsWith('www.') ? parsed.hostname.slice(4) : parsed.hostname]\n const gitHostName = gitHostShortcut || gitHostDomain\n if (!gitHostName) {\n return\n }\n\n const gitHostInfo = gitHosts[gitHostShortcut || gitHostDomain]\n let auth = null\n if (authProtocols[parsed.protocol] && (parsed.username || parsed.password)) {\n auth = `${parsed.username}${parsed.password ? ':' + parsed.password : ''}`\n }\n\n let committish = null\n let user = null\n let project = null\n let defaultRepresentation = null\n\n try {\n if (gitHostShortcut) {\n let pathname = parsed.pathname.startsWith('/') ? parsed.pathname.slice(1) : parsed.pathname\n const firstAt = pathname.indexOf('@')\n // we ignore auth for shortcuts, so just trim it out\n if (firstAt > -1) {\n pathname = pathname.slice(firstAt + 1)\n }\n\n const lastSlash = pathname.lastIndexOf('/')\n if (lastSlash > -1) {\n user = decodeURIComponent(pathname.slice(0, lastSlash))\n // we want nulls only, never empty strings\n if (!user) {\n user = null\n }\n project = decodeURIComponent(pathname.slice(lastSlash + 1))\n } else {\n project = decodeURIComponent(pathname)\n }\n\n if (project.endsWith('.git')) {\n project = project.slice(0, -4)\n }\n\n if (parsed.hash) {\n committish = decodeURIComponent(parsed.hash.slice(1))\n }\n\n defaultRepresentation = 'shortcut'\n } else {\n if (!gitHostInfo.protocols.includes(parsed.protocol)) {\n return\n }\n\n const segments = gitHostInfo.extract(parsed)\n if (!segments) {\n return\n }\n\n user = segments.user && decodeURIComponent(segments.user)\n project = decodeURIComponent(segments.project)\n committish = decodeURIComponent(segments.committish)\n defaultRepresentation = protocolToRepresentation(parsed.protocol)\n }\n } catch (err) {\n /* istanbul ignore else */\n if (err instanceof URIError) {\n return\n } else {\n throw err\n }\n }\n\n return new GitHost(gitHostName, user, auth, project, committish, defaultRepresentation, opts)\n}\n\n// accepts input like git:github.com:user/repo and inserts the // after the first :\nconst correctProtocol = (arg) => {\n const firstColon = arg.indexOf(':')\n const proto = arg.slice(0, firstColon + 1)\n if (knownProtocols.includes(proto)) {\n return arg\n }\n\n const firstAt = arg.indexOf('@')\n if (firstAt > -1) {\n if (firstAt > firstColon) {\n return `git+ssh://${arg}`\n } else {\n return arg\n }\n }\n\n const doubleSlash = arg.indexOf('//')\n if (doubleSlash === firstColon + 1) {\n return arg\n }\n\n return arg.slice(0, firstColon + 1) + '//' + arg.slice(firstColon + 1)\n}\n\n// look for github shorthand inputs, such as npm/cli\nconst isGitHubShorthand = (arg) => {\n // it cannot contain whitespace before the first #\n // it cannot start with a / because that's probably an absolute file path\n // but it must include a slash since repos are username/repository\n // it cannot start with a . because that's probably a relative file path\n // it cannot start with an @ because that's a scoped package if it passes the other tests\n // it cannot contain a : before a # because that tells us that there's a protocol\n // a second / may not exist before a #\n const firstHash = arg.indexOf('#')\n const firstSlash = arg.indexOf('/')\n const secondSlash = arg.indexOf('/', firstSlash + 1)\n const firstColon = arg.indexOf(':')\n const firstSpace = /\\s/.exec(arg)\n const firstAt = arg.indexOf('@')\n\n const spaceOnlyAfterHash = !firstSpace || (firstHash > -1 && firstSpace.index > firstHash)\n const atOnlyAfterHash = firstAt === -1 || (firstHash > -1 && firstAt > firstHash)\n const colonOnlyAfterHash = firstColon === -1 || (firstHash > -1 && firstColon > firstHash)\n const secondSlashOnlyAfterHash = secondSlash === -1 || (firstHash > -1 && secondSlash > firstHash)\n const hasSlash = firstSlash > 0\n // if a # is found, what we really want to know is that the character immediately before # is not a /\n const doesNotEndWithSlash = firstHash > -1 ? arg[firstHash - 1] !== '/' : !arg.endsWith('/')\n const doesNotStartWithDot = !arg.startsWith('.')\n\n return spaceOnlyAfterHash && hasSlash && doesNotEndWithSlash && doesNotStartWithDot && atOnlyAfterHash && colonOnlyAfterHash && secondSlashOnlyAfterHash\n}\n\n// attempt to correct an scp style url so that it will parse with `new URL()`\nconst correctUrl = (giturl) => {\n const firstAt = giturl.indexOf('@')\n const lastHash = giturl.lastIndexOf('#')\n let firstColon = giturl.indexOf(':')\n let lastColon = giturl.lastIndexOf(':', lastHash > -1 ? lastHash : Infinity)\n\n let corrected\n if (lastColon > firstAt) {\n // the last : comes after the first @ (or there is no @)\n // like it would in:\n // proto://hostname.com:user/repo\n // username@hostname.com:user/repo\n // :password@hostname.com:user/repo\n // username:password@hostname.com:user/repo\n // proto://username@hostname.com:user/repo\n // proto://:password@hostname.com:user/repo\n // proto://username:password@hostname.com:user/repo\n // then we replace the last : with a / to create a valid path\n corrected = giturl.slice(0, lastColon) + '/' + giturl.slice(lastColon + 1)\n // // and we find our new : positions\n firstColon = corrected.indexOf(':')\n lastColon = corrected.lastIndexOf(':')\n }\n\n if (firstColon === -1 && giturl.indexOf('//') === -1) {\n // we have no : at all\n // as it would be in:\n // username@hostname.com/user/repo\n // then we prepend a protocol\n corrected = `git+ssh://${corrected}`\n }\n\n return corrected\n}\n\n// try to parse the url as its given to us, if that throws\n// then we try to clean the url and parse that result instead\n// THIS FUNCTION SHOULD NEVER THROW\nconst parseGitUrl = (giturl) => {\n let result\n try {\n result = new url.URL(giturl)\n } catch (err) {}\n\n if (result) {\n return result\n }\n\n const correctedUrl = correctUrl(giturl)\n try {\n result = new url.URL(correctedUrl)\n } catch (err) {}\n\n return result\n}\n"],"names":["require$$0","require$$1","require$$2","require$$3"],"mappings":";;;;;;;;;;;;;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