bugsnag-sourcemaps
Advanced tools
Comparing version 1.0.0-rc.2 to 1.0.0-rc.3
89
cli.js
@@ -44,26 +44,26 @@ #!/usr/bin/env node | ||
`, { | ||
alias: { | ||
c: 'code-bundle-id', | ||
e: 'endpoint', | ||
h: 'help', | ||
k: 'api-key', | ||
m: 'minified-url', | ||
o: 'overwrite', | ||
p: 'minified-file', | ||
r: 'project-root', | ||
s: 'source-map', | ||
t: 'strip-project-root', | ||
u: 'upload-sources', | ||
v: 'app-version', | ||
w: 'add-wildcard-prefix', | ||
}, | ||
// minimistOptions: { | ||
// string: [ | ||
// 'app-version', | ||
// ], | ||
// }, | ||
alias: { | ||
c: 'code-bundle-id', | ||
e: 'endpoint', | ||
h: 'help', | ||
k: 'api-key', | ||
m: 'minified-url', | ||
o: 'overwrite', | ||
p: 'minified-file', | ||
r: 'project-root', | ||
s: 'source-map', | ||
t: 'strip-project-root', | ||
u: 'upload-sources', | ||
v: 'app-version', | ||
w: 'add-wildcard-prefix', | ||
}, | ||
// minimistOptions: { | ||
// string: [ | ||
// 'app-version', | ||
// ], | ||
// }, | ||
}); | ||
const conf = { | ||
// Any cli-specific defaults (none currently) | ||
// Any cli-specific defaults (none currently) | ||
}; | ||
@@ -79,31 +79,30 @@ | ||
for (const key in conf) { | ||
// Strip out the single letter (aliases) from meow | ||
if (key.length === 1) { | ||
delete conf[key]; | ||
} | ||
// Strip out the single letter (aliases) from meow | ||
if (key.length === 1) { | ||
delete conf[key]; | ||
} | ||
} | ||
const tasks = new Listr([ | ||
{ | ||
title: 'Uploading sourcemaps', | ||
task: () => upload(conf), | ||
}, | ||
{ | ||
title: 'Uploading sourcemaps', | ||
task: () => upload(conf), | ||
}, | ||
]); | ||
Promise.resolve() | ||
.then(() => { | ||
if (!conf.appVersion) { | ||
return ( | ||
// If there was no appVersion specified, find the package.json within either | ||
// the project root, or the current working directory, and use that version. | ||
readPkgUp(conf.projectRoot || process.cwd()) | ||
.then(({ pkg }) => conf.appVersion = pkg.version) | ||
); | ||
} | ||
}) | ||
.then(() => { | ||
return tasks.run(); | ||
}) | ||
.catch(err => { | ||
// console.error(err); | ||
}); | ||
.then(() => { | ||
if (!conf.appVersion && !conf.codeBundleId) { | ||
return ( | ||
// If there was no appVersion specified, find the package.json within either | ||
// the project root, or the current working directory, and use that version. | ||
readPkgUp(conf.projectRoot || process.cwd()) | ||
.then(({ pkg }) => { | ||
if (pkg) conf.appVersion = pkg.version; | ||
}) | ||
); | ||
} | ||
}) | ||
.then(() => { | ||
return tasks.run(); | ||
}); |
@@ -261,3 +261,4 @@ const fs = require('fs'); | ||
case 'stripProjectRoot': | ||
case 'addWildcardPrefix': { | ||
case 'addWildcardPrefix': | ||
case 'tempDir': { | ||
break; | ||
@@ -264,0 +265,0 @@ } |
{ | ||
"name": "bugsnag-sourcemaps", | ||
"version": "1.0.0-rc.2", | ||
"version": "1.0.0-rc.3", | ||
"keywords": [ | ||
@@ -5,0 +5,0 @@ "bugsnag", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
435
18565