Skip to content

Commit 5d384c3

Browse files
committed
feat: Add readme and license
1 parent 4ababb9 commit 5d384c3

File tree

7 files changed

+49
-16
lines changed

7 files changed

+49
-16
lines changed

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2017 Sentry
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<p align="center">
2+
<a href="https://sentry.io" target="_blank" align="center">
3+
<img src="https://sentry-brand.storage.googleapis.com/sentry-logo-black.png" width="280">
4+
</a>
5+
<br/>
6+
<h1>Sentry Wizard - Helping you to setup your project with Sentry</h1>
7+
</p>

index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ const argv = require('yargs')
99
})
1010
.option('url', {
1111
alias: 'u',
12-
default: 'https://sentry.io/'
12+
default: 'https://sentry.io/',
13+
describe: 'The url to your Sentry installation'
1314
}).argv;
1415

1516
run(argv as IArgs);

lib/Helper.ts

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ function prepareMessage(msg: any) {
77
if (typeof msg === 'string') {
88
return msg;
99
}
10+
if (msg instanceof Error) {
11+
return `${msg.name}: ${msg.message}`;
12+
}
1013
return JSON.stringify(msg);
1114
}
1215

lib/steps/OpenSentry.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class OpenSentry extends BaseStep {
2727

2828
return { hash: data.hash };
2929
} catch (e) {
30-
throw new Error(`Could not connect to wizard @ ${baseUrl}`);
30+
throw new Error(`Could not connect to wizard @ ${baseUrl} try --url`);
3131
}
3232
}
3333
}

lib/steps/configure/GenericJavascript.ts

+13-12
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,20 @@ import { green, l, nl } from '../../Helper';
44
import { BaseStep } from '../Step';
55

66
export class GenericJavascript extends BaseStep {
7-
public emit(answers: Answers) {
7+
public async emit(answers: Answers) {
88
const dsn = _.get(answers, 'selectedProject.keys.0.dsn.public', null);
9-
if (dsn) {
10-
nl();
11-
l('Put these lines in to your code to run Sentry');
12-
green(
13-
`<script src="https://cdn.ravenjs.com/3.19.1/raven.min.js" crossorigin="anonymous"></script>`
14-
);
15-
nl();
16-
green(`Raven.config('${dsn}').install();`);
17-
nl();
18-
green('See https://docs.sentry.io/clients/javascript/ for more details');
9+
if (!dsn) {
10+
return {};
1911
}
20-
return Promise.resolve({});
12+
nl();
13+
l('Put these lines in to your code to run Sentry');
14+
green(
15+
`<script src="https://cdn.ravenjs.com/3.19.1/raven.min.js" crossorigin="anonymous"></script>`
16+
);
17+
nl();
18+
green(`Raven.config('${dsn}').install();`);
19+
nl();
20+
green('See https://docs.sentry.io/clients/javascript/ for more details');
21+
return {};
2122
}
2223
}

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "@sentry/setup-wizard",
2+
"name": "@sentry/wizard",
33
"version": "0.1.0",
4-
"description": "Sentry Setup wizard helping you to configure your project",
4+
"description": "Sentry wizard helping you to configure your project",
55
"bin": {
66
"setup-wizard": "./dist/index.js"
77
},

0 commit comments

Comments
 (0)