@donmahallem/lerna2codecov 0.1.0 → 0.1.4

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/cli/cli.js CHANGED
@@ -173,6 +173,36 @@ gitHosts$2.gist = Object.assign({}, defaults$1, {
173
173
  }
174
174
  });
175
175
 
176
+ gitHosts$2.sourcehut = Object.assign({}, defaults$1, {
177
+ protocols: ['git+ssh:', 'https:'],
178
+ domain: 'git.sr.ht',
179
+ treepath: 'tree',
180
+ browsefiletemplate: ({ domain, user, project, committish, treepath, path, fragment, hashformat }) => `https://${domain}/${user}/${project}/${treepath}/${maybeEncode(committish || 'main')}/${path}${maybeJoin('#', hashformat(fragment || ''))}`,
181
+ filetemplate: ({ domain, user, project, committish, path }) => `https://${domain}/${user}/${project}/blob/${maybeEncode(committish) || 'main'}/${path}`,
182
+ httpstemplate: ({ domain, user, project, committish }) => `https://${domain}/${user}/${project}.git${maybeJoin('#', committish)}`,
183
+ tarballtemplate: ({ domain, user, project, committish }) => `https://${domain}/${user}/${project}/archive/${maybeEncode(committish) || 'main'}.tar.gz`,
184
+ bugstemplate: ({ domain, user, project }) => `https://todo.sr.ht/${user}/${project}`,
185
+ docstemplate: ({ domain, user, project, treepath, committish }) => `https://${domain}/${user}/${project}${maybeJoin('/', treepath, '/', maybeEncode(committish))}#readme`,
186
+ extract: (url) => {
187
+ let [, user, project, aux] = url.pathname.split('/', 4);
188
+
189
+ // tarball url
190
+ if (['archive'].includes(aux)) {
191
+ return
192
+ }
193
+
194
+ if (project && project.endsWith('.git')) {
195
+ project = project.slice(0, -4);
196
+ }
197
+
198
+ if (!user || !project) {
199
+ return
200
+ }
201
+
202
+ return { user, project, committish: url.hash.slice(1) }
203
+ }
204
+ });
205
+
176
206
  const names = Object.keys(gitHosts$2);
177
207
  gitHosts$2.byShortcut = {};
178
208
  gitHosts$2.byDomain = {};
@@ -4071,8 +4101,10 @@ function patch$1 (fs) {
4071
4101
  return function (target, options) {
4072
4102
  var stats = options ? orig.call(fs, target, options)
4073
4103
  : orig.call(fs, target);
4074
- if (stats.uid < 0) stats.uid += 0x100000000;
4075
- if (stats.gid < 0) stats.gid += 0x100000000;
4104
+ if (stats) {
4105
+ if (stats.uid < 0) stats.uid += 0x100000000;
4106
+ if (stats.gid < 0) stats.gid += 0x100000000;
4107
+ }
4076
4108
  return stats;
4077
4109
  }
4078
4110
  }
@@ -7224,7 +7256,7 @@ function getChalk(options) {
7224
7256
  }
7225
7257
 
7226
7258
  function highlight(code, options = {}) {
7227
- if (shouldHighlight(options)) {
7259
+ if (code !== "" && shouldHighlight(options)) {
7228
7260
  const chalk = getChalk(options);
7229
7261
  const defs = getDefs$1(chalk);
7230
7262
  return highlightTokens(defs, code);
@@ -7696,7 +7728,9 @@ const processOk = function (process) {
7696
7728
  // some kind of non-node environment, just no-op
7697
7729
  /* istanbul ignore if */
7698
7730
  if (!processOk(process$1)) {
7699
- signalExit.exports = function () {};
7731
+ signalExit.exports = function () {
7732
+ return function () {}
7733
+ };
7700
7734
  } else {
7701
7735
  var assert = require$$5__default$1["default"];
7702
7736
  var signals = signals$1.exports;
@@ -7729,7 +7763,7 @@ if (!processOk(process$1)) {
7729
7763
  signalExit.exports = function (cb, opts) {
7730
7764
  /* istanbul ignore if */
7731
7765
  if (!processOk(commonjsGlobal.process)) {
7732
- return
7766
+ return function () {}
7733
7767
  }
7734
7768
  assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler');
7735
7769
 
@@ -10549,6 +10583,6 @@ function updateCommand(opts) {
10549
10583
  * Source https://github.com/donmahallem/js-libs/tree/master/packages/lerna2codecov
10550
10584
  */
10551
10585
  void updateCommand().parseAsync(process.argv);
10552
- // BUILD: Mon Jan 03 2022 15:02:34 GMT+0100 (Central European Standard Time)
10586
+ // BUILD: Sun Feb 06 2022 11:26:31 GMT+0100 (Central European Standard Time)
10553
10587
 
10554
10588
  //# sourceMappingURL=cli.js.map