@sentry/wizard 2.0.0 → 2.1.0
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/CHANGELOG.md +12 -0
- package/dist/NextJs/sentry_sample_error.js +47 -0
- package/dist/lib/Constants.d.ts +1 -1
- package/dist/lib/Constants.js.map +1 -1
- package/dist/lib/Helper/File.d.ts +1 -0
- package/dist/lib/Helper/File.js +9 -3
- package/dist/lib/Helper/File.js.map +1 -1
- package/dist/lib/Helper/Logging.d.ts +1 -0
- package/dist/lib/Helper/Logging.js +5 -1
- package/dist/lib/Helper/Logging.js.map +1 -1
- package/dist/lib/Helper/__tests__/SentryCli.js +1 -1
- package/dist/lib/Helper/__tests__/SentryCli.js.map +1 -1
- package/dist/lib/Steps/Integrations/Electron.js +2 -11
- package/dist/lib/Steps/Integrations/Electron.js.map +1 -1
- package/dist/lib/Steps/Integrations/NextJs.js +16 -5
- package/dist/lib/Steps/Integrations/NextJs.js.map +1 -1
- package/dist/lib/Steps/Integrations/ReactNative.d.ts +1 -0
- package/dist/lib/Steps/Integrations/ReactNative.js +34 -13
- package/dist/lib/Steps/Integrations/ReactNative.js.map +1 -1
- package/dist/lib/Steps/Integrations/__tests__/ReactNative.d.ts +1 -0
- package/dist/lib/Steps/Integrations/__tests__/ReactNative.js +103 -0
- package/dist/lib/Steps/Integrations/__tests__/ReactNative.js.map +1 -0
- package/lib/Constants.ts +1 -1
- package/lib/Helper/File.ts +8 -2
- package/lib/Helper/Logging.ts +4 -0
- package/lib/Helper/__tests__/SentryCli.ts +1 -1
- package/lib/Steps/Integrations/Electron.ts +1 -25
- package/lib/Steps/Integrations/NextJs.ts +29 -1
- package/lib/Steps/Integrations/ReactNative.ts +29 -16
- package/lib/Steps/Integrations/__tests__/ReactNative.ts +67 -0
- package/package.json +4 -1
- package/scripts/NextJs/sentry_sample_error.js +47 -0
- package/dist/Electron/symbols.js +0 -94
- package/scripts/Electron/symbols.js +0 -94
package/dist/Electron/symbols.js
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
let SentryCli;
|
|
4
|
-
let download;
|
|
5
|
-
|
|
6
|
-
try {
|
|
7
|
-
SentryCli = require('@sentry/cli');
|
|
8
|
-
download = require('electron-download');
|
|
9
|
-
} catch (e) {
|
|
10
|
-
console.error('ERROR: Missing required packages, please run:');
|
|
11
|
-
console.error('npm install --save-dev @sentry/cli electron-download');
|
|
12
|
-
process.exit(1);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const SYMBOL_CACHE_FOLDER = '.electron-symbols';
|
|
16
|
-
const sentryCli = new SentryCli('./sentry.properties');
|
|
17
|
-
|
|
18
|
-
async function main() {
|
|
19
|
-
let version = getElectronVersion();
|
|
20
|
-
if (!version) {
|
|
21
|
-
console.error('Cannot detect electron version, check that electron is installed');
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
console.log('We are starting to download all possible electron symbols');
|
|
26
|
-
console.log('We need it in order to symbolicate native crashes');
|
|
27
|
-
console.log(
|
|
28
|
-
'This step is only needed once whenever you update your electron version',
|
|
29
|
-
);
|
|
30
|
-
console.log('Just call this script again it should do everything for you.');
|
|
31
|
-
|
|
32
|
-
let zipPath = await downloadSymbols({
|
|
33
|
-
version,
|
|
34
|
-
platform: 'darwin',
|
|
35
|
-
arch: 'x64',
|
|
36
|
-
dsym: true,
|
|
37
|
-
});
|
|
38
|
-
await sentryCli.execute(['upload-dif', '-t', 'dsym', zipPath], true);
|
|
39
|
-
|
|
40
|
-
zipPath = await downloadSymbols({
|
|
41
|
-
version,
|
|
42
|
-
platform: 'win32',
|
|
43
|
-
arch: 'ia32',
|
|
44
|
-
symbols: true,
|
|
45
|
-
});
|
|
46
|
-
await sentryCli.execute(['upload-dif', '-t', 'breakpad', zipPath], true);
|
|
47
|
-
|
|
48
|
-
zipPath = await downloadSymbols({
|
|
49
|
-
version,
|
|
50
|
-
platform: 'win32',
|
|
51
|
-
arch: 'x64',
|
|
52
|
-
symbols: true,
|
|
53
|
-
});
|
|
54
|
-
await sentryCli.execute(['upload-dif', '-t', 'breakpad', zipPath], true);
|
|
55
|
-
|
|
56
|
-
zipPath = await downloadSymbols({
|
|
57
|
-
version,
|
|
58
|
-
platform: 'linux',
|
|
59
|
-
arch: 'x64',
|
|
60
|
-
symbols: true,
|
|
61
|
-
});
|
|
62
|
-
await sentryCli.execute(['upload-dif', '-t', 'breakpad', zipPath], true);
|
|
63
|
-
|
|
64
|
-
console.log('Finished downloading and uploading to Sentry');
|
|
65
|
-
console.log(`Feel free to delete the ${SYMBOL_CACHE_FOLDER}`);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function getElectronVersion() {
|
|
69
|
-
try {
|
|
70
|
-
return require('electron/package.json').version;
|
|
71
|
-
} catch (error) {
|
|
72
|
-
return undefined;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
async function downloadSymbols(options) {
|
|
77
|
-
return new Promise((resolve, reject) => {
|
|
78
|
-
download(
|
|
79
|
-
{
|
|
80
|
-
...options,
|
|
81
|
-
cache: SYMBOL_CACHE_FOLDER,
|
|
82
|
-
},
|
|
83
|
-
(err, zipPath) => {
|
|
84
|
-
if (err) {
|
|
85
|
-
reject(err);
|
|
86
|
-
} else {
|
|
87
|
-
resolve(zipPath);
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
);
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
main().catch(e => console.error(e));
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
let SentryCli;
|
|
4
|
-
let download;
|
|
5
|
-
|
|
6
|
-
try {
|
|
7
|
-
SentryCli = require('@sentry/cli');
|
|
8
|
-
download = require('electron-download');
|
|
9
|
-
} catch (e) {
|
|
10
|
-
console.error('ERROR: Missing required packages, please run:');
|
|
11
|
-
console.error('npm install --save-dev @sentry/cli electron-download');
|
|
12
|
-
process.exit(1);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const SYMBOL_CACHE_FOLDER = '.electron-symbols';
|
|
16
|
-
const sentryCli = new SentryCli('./sentry.properties');
|
|
17
|
-
|
|
18
|
-
async function main() {
|
|
19
|
-
let version = getElectronVersion();
|
|
20
|
-
if (!version) {
|
|
21
|
-
console.error('Cannot detect electron version, check that electron is installed');
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
console.log('We are starting to download all possible electron symbols');
|
|
26
|
-
console.log('We need it in order to symbolicate native crashes');
|
|
27
|
-
console.log(
|
|
28
|
-
'This step is only needed once whenever you update your electron version',
|
|
29
|
-
);
|
|
30
|
-
console.log('Just call this script again it should do everything for you.');
|
|
31
|
-
|
|
32
|
-
let zipPath = await downloadSymbols({
|
|
33
|
-
version,
|
|
34
|
-
platform: 'darwin',
|
|
35
|
-
arch: 'x64',
|
|
36
|
-
dsym: true,
|
|
37
|
-
});
|
|
38
|
-
await sentryCli.execute(['upload-dif', '-t', 'dsym', zipPath], true);
|
|
39
|
-
|
|
40
|
-
zipPath = await downloadSymbols({
|
|
41
|
-
version,
|
|
42
|
-
platform: 'win32',
|
|
43
|
-
arch: 'ia32',
|
|
44
|
-
symbols: true,
|
|
45
|
-
});
|
|
46
|
-
await sentryCli.execute(['upload-dif', '-t', 'breakpad', zipPath], true);
|
|
47
|
-
|
|
48
|
-
zipPath = await downloadSymbols({
|
|
49
|
-
version,
|
|
50
|
-
platform: 'win32',
|
|
51
|
-
arch: 'x64',
|
|
52
|
-
symbols: true,
|
|
53
|
-
});
|
|
54
|
-
await sentryCli.execute(['upload-dif', '-t', 'breakpad', zipPath], true);
|
|
55
|
-
|
|
56
|
-
zipPath = await downloadSymbols({
|
|
57
|
-
version,
|
|
58
|
-
platform: 'linux',
|
|
59
|
-
arch: 'x64',
|
|
60
|
-
symbols: true,
|
|
61
|
-
});
|
|
62
|
-
await sentryCli.execute(['upload-dif', '-t', 'breakpad', zipPath], true);
|
|
63
|
-
|
|
64
|
-
console.log('Finished downloading and uploading to Sentry');
|
|
65
|
-
console.log(`Feel free to delete the ${SYMBOL_CACHE_FOLDER}`);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function getElectronVersion() {
|
|
69
|
-
try {
|
|
70
|
-
return require('electron/package.json').version;
|
|
71
|
-
} catch (error) {
|
|
72
|
-
return undefined;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
async function downloadSymbols(options) {
|
|
77
|
-
return new Promise((resolve, reject) => {
|
|
78
|
-
download(
|
|
79
|
-
{
|
|
80
|
-
...options,
|
|
81
|
-
cache: SYMBOL_CACHE_FOLDER,
|
|
82
|
-
},
|
|
83
|
-
(err, zipPath) => {
|
|
84
|
-
if (err) {
|
|
85
|
-
reject(err);
|
|
86
|
-
} else {
|
|
87
|
-
resolve(zipPath);
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
);
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
main().catch(e => console.error(e));
|