@sentry/wizard 2.6.1 → 2.7.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 +8 -0
- package/dist/lib/Helper/Package.d.ts +1 -0
- package/dist/lib/Helper/Package.js +46 -0
- package/dist/lib/Helper/Package.js.map +1 -0
- package/dist/lib/Helper/PackageManager.d.ts +22 -0
- package/dist/lib/Helper/PackageManager.js +135 -0
- package/dist/lib/Helper/PackageManager.js.map +1 -0
- package/dist/lib/Helper/Wizard.js +2 -1
- package/dist/lib/Helper/Wizard.js.map +1 -1
- package/dist/lib/Helper/__tests__/MergeConfig.js +25 -14
- package/dist/lib/Helper/__tests__/MergeConfig.js.map +1 -1
- package/dist/lib/Steps/Integrations/NextJs.d.ts +0 -5
- package/dist/lib/Steps/Integrations/NextJs.js +6 -85
- package/dist/lib/Steps/Integrations/NextJs.js.map +1 -1
- package/dist/lib/Steps/Integrations/ReactNative.d.ts +7 -0
- package/dist/lib/Steps/Integrations/ReactNative.js +119 -50
- package/dist/lib/Steps/Integrations/ReactNative.js.map +1 -1
- package/dist/lib/Steps/Integrations/__tests__/ReactNative.js +42 -0
- package/dist/lib/Steps/Integrations/__tests__/ReactNative.js.map +1 -1
- package/dist/lib/__tests__/Setup.js +15 -0
- package/dist/lib/__tests__/Setup.js.map +1 -1
- package/lib/Helper/Package.ts +61 -0
- package/lib/Helper/PackageManager.ts +64 -0
- package/lib/Helper/Wizard.ts +1 -1
- package/lib/Helper/__tests__/MergeConfig.ts +36 -20
- package/lib/Steps/Integrations/NextJs.ts +8 -108
- package/lib/Steps/Integrations/ReactNative.ts +107 -36
- package/lib/Steps/Integrations/__tests__/ReactNative.ts +34 -0
- package/lib/__tests__/Setup.ts +23 -0
- package/package.json +1 -1
package/lib/__tests__/Setup.ts
CHANGED
|
@@ -1,8 +1,31 @@
|
|
|
1
1
|
jest.mock('../Helper/Logging'); // We mock logging to not pollute the output
|
|
2
|
+
jest.mock('child_process');
|
|
3
|
+
import * as child_process from 'child_process';
|
|
4
|
+
|
|
2
5
|
import { Integration, Platform } from '../Constants';
|
|
3
6
|
import { run } from '../Setup';
|
|
4
7
|
|
|
8
|
+
const originalExec = child_process.exec;
|
|
9
|
+
|
|
10
|
+
const restoreExec = (): void => {
|
|
11
|
+
(child_process as any).exec = originalExec;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const mockExec = (): void => {
|
|
15
|
+
((child_process.exec as unknown) as jest.Mock).mockImplementation(
|
|
16
|
+
(_command, callback) => callback(null, { stdout: '' }),
|
|
17
|
+
);
|
|
18
|
+
};
|
|
19
|
+
|
|
5
20
|
describe('Wizard', () => {
|
|
21
|
+
beforeEach(() => {
|
|
22
|
+
mockExec();
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
afterEach(() => {
|
|
26
|
+
restoreExec();
|
|
27
|
+
});
|
|
28
|
+
|
|
6
29
|
describe('React Native', () => {
|
|
7
30
|
test('run', () => {
|
|
8
31
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
package/package.json
CHANGED