@sentry/wizard 3.38.0 → 3.40.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 +10 -1
- package/README.md +3 -3
- package/dist/e2e-tests/tests/flutter.test.d.ts +1 -0
- package/dist/e2e-tests/tests/flutter.test.js +190 -0
- package/dist/e2e-tests/tests/flutter.test.js.map +1 -0
- package/dist/e2e-tests/tests/nextjs.test.js +1 -1
- package/dist/e2e-tests/tests/nextjs.test.js.map +1 -1
- package/dist/e2e-tests/tests/nuxt-3.test.js +1 -1
- package/dist/e2e-tests/tests/nuxt-3.test.js.map +1 -1
- package/dist/e2e-tests/tests/nuxt-4.test.js +1 -1
- package/dist/e2e-tests/tests/nuxt-4.test.js.map +1 -1
- package/dist/e2e-tests/tests/remix.test.js +1 -2
- package/dist/e2e-tests/tests/remix.test.js.map +1 -1
- package/dist/e2e-tests/tests/sveltekit.test.js +17 -5
- package/dist/e2e-tests/tests/sveltekit.test.js.map +1 -1
- package/dist/e2e-tests/utils/index.d.ts +22 -1
- package/dist/e2e-tests/utils/index.js +58 -3
- package/dist/e2e-tests/utils/index.js.map +1 -1
- package/dist/lib/Constants.d.ts +1 -0
- package/dist/lib/Constants.js +5 -0
- package/dist/lib/Constants.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/src/apple/apple-wizard.js +1 -1
- package/dist/src/apple/apple-wizard.js.map +1 -1
- package/dist/src/apple/xcode-manager.d.ts +4 -4
- package/dist/src/apple/xcode-manager.js.map +1 -1
- package/dist/src/flutter/code-tools.d.ts +17 -0
- package/dist/src/flutter/code-tools.js +263 -0
- package/dist/src/flutter/code-tools.js.map +1 -0
- package/dist/src/flutter/flutter-wizard.d.ts +2 -0
- package/dist/src/flutter/flutter-wizard.js +171 -0
- package/dist/src/flutter/flutter-wizard.js.map +1 -0
- package/dist/src/flutter/templates.d.ts +9 -0
- package/dist/src/flutter/templates.js +40 -0
- package/dist/src/flutter/templates.js.map +1 -0
- package/dist/src/nextjs/nextjs-wizard.js +3 -1
- package/dist/src/nextjs/nextjs-wizard.js.map +1 -1
- package/dist/src/run.d.ts +1 -1
- package/dist/src/run.js +39 -32
- package/dist/src/run.js.map +1 -1
- package/dist/src/sourcemaps/sourcemaps-wizard.js +2 -3
- package/dist/src/sourcemaps/sourcemaps-wizard.js.map +1 -1
- package/dist/src/telemetry.d.ts +2 -1
- package/dist/src/telemetry.js +1 -1
- package/dist/src/telemetry.js.map +1 -1
- package/dist/src/utils/clack-utils.d.ts +1 -1
- package/dist/src/utils/clack-utils.js +3 -3
- package/dist/src/utils/clack-utils.js.map +1 -1
- package/dist/src/utils/package-manager.d.ts +0 -1
- package/dist/src/utils/package-manager.js +9 -10
- package/dist/src/utils/package-manager.js.map +1 -1
- package/dist/test/flutter/code-tools.test.d.ts +1 -0
- package/dist/test/flutter/code-tools.test.js +84 -0
- package/dist/test/flutter/code-tools.test.js.map +1 -0
- package/dist/test/flutter/templates.test.d.ts +1 -0
- package/dist/test/flutter/templates.test.js +41 -0
- package/dist/test/flutter/templates.test.js.map +1 -0
- package/e2e-tests/README.md +5 -1
- package/e2e-tests/test-applications/flutter-test-app/.metadata +45 -0
- package/e2e-tests/test-applications/flutter-test-app/README.md +16 -0
- package/e2e-tests/test-applications/flutter-test-app/analysis_options.yaml +28 -0
- package/e2e-tests/test-applications/flutter-test-app/android/app/build.gradle +44 -0
- package/e2e-tests/test-applications/flutter-test-app/android/app/src/debug/AndroidManifest.xml +7 -0
- package/e2e-tests/test-applications/flutter-test-app/android/app/src/main/AndroidManifest.xml +45 -0
- package/e2e-tests/test-applications/flutter-test-app/android/app/src/main/kotlin/com/example/flutter_magic/MainActivity.kt +5 -0
- package/e2e-tests/test-applications/flutter-test-app/android/app/src/main/res/drawable/launch_background.xml +12 -0
- package/e2e-tests/test-applications/flutter-test-app/android/app/src/main/res/drawable-v21/launch_background.xml +12 -0
- package/e2e-tests/test-applications/flutter-test-app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/android/app/src/main/res/values/styles.xml +18 -0
- package/e2e-tests/test-applications/flutter-test-app/android/app/src/main/res/values-night/styles.xml +18 -0
- package/e2e-tests/test-applications/flutter-test-app/android/app/src/profile/AndroidManifest.xml +7 -0
- package/e2e-tests/test-applications/flutter-test-app/android/build.gradle +18 -0
- package/e2e-tests/test-applications/flutter-test-app/android/gradle/wrapper/gradle-wrapper.properties +5 -0
- package/e2e-tests/test-applications/flutter-test-app/android/gradle.properties +3 -0
- package/e2e-tests/test-applications/flutter-test-app/android/settings.gradle +25 -0
- package/e2e-tests/test-applications/flutter-test-app/lib/main.dart +125 -0
- package/e2e-tests/test-applications/flutter-test-app/linux/CMakeLists.txt +145 -0
- package/e2e-tests/test-applications/flutter-test-app/linux/flutter/CMakeLists.txt +88 -0
- package/e2e-tests/test-applications/flutter-test-app/linux/flutter/generated_plugin_registrant.cc +11 -0
- package/e2e-tests/test-applications/flutter-test-app/linux/flutter/generated_plugin_registrant.h +15 -0
- package/e2e-tests/test-applications/flutter-test-app/linux/flutter/generated_plugins.cmake +23 -0
- package/e2e-tests/test-applications/flutter-test-app/linux/main.cc +6 -0
- package/e2e-tests/test-applications/flutter-test-app/linux/my_application.cc +124 -0
- package/e2e-tests/test-applications/flutter-test-app/linux/my_application.h +18 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Flutter/Flutter-Debug.xcconfig +2 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Flutter/Flutter-Release.xcconfig +2 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Flutter/GeneratedPluginRegistrant.swift +10 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Podfile +43 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/AppDelegate.swift +9 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +68 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/Base.lproj/MainMenu.xib +343 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/Configs/AppInfo.xcconfig +14 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/Configs/Debug.xcconfig +2 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/Configs/Release.xcconfig +2 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/Configs/Warnings.xcconfig +13 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/DebugProfile.entitlements +12 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/Info.plist +32 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/MainFlutterWindow.swift +15 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner/Release.entitlements +8 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner.xcodeproj/project.pbxproj +705 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +98 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner.xcworkspace/contents.xcworkspacedata +7 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/e2e-tests/test-applications/flutter-test-app/macos/RunnerTests/RunnerTests.swift +12 -0
- package/e2e-tests/test-applications/flutter-test-app/pubspec.lock +213 -0
- package/e2e-tests/test-applications/flutter-test-app/pubspec.yaml +89 -0
- package/e2e-tests/test-applications/flutter-test-app/test/widget_test.dart +30 -0
- package/e2e-tests/test-applications/flutter-test-app/web/favicon.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/web/icons/Icon-192.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/web/icons/Icon-512.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/web/icons/Icon-maskable-192.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/web/icons/Icon-maskable-512.png +0 -0
- package/e2e-tests/test-applications/flutter-test-app/web/index.html +38 -0
- package/e2e-tests/test-applications/flutter-test-app/web/manifest.json +35 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/CMakeLists.txt +108 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/flutter/CMakeLists.txt +109 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/flutter/generated_plugin_registrant.cc +11 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/flutter/generated_plugin_registrant.h +15 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/flutter/generated_plugins.cmake +23 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/runner/CMakeLists.txt +40 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/runner/Runner.rc +121 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/runner/flutter_window.cpp +71 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/runner/flutter_window.h +33 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/runner/main.cpp +43 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/runner/resource.h +16 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/runner/resources/app_icon.ico +0 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/runner/runner.exe.manifest +14 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/runner/utils.cpp +65 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/runner/utils.h +19 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/runner/win32_window.cpp +288 -0
- package/e2e-tests/test-applications/flutter-test-app/windows/runner/win32_window.h +102 -0
- package/e2e-tests/test-applications/nextjs-test-app/package.json +1 -1
- package/e2e-tests/tests/flutter.test.ts +127 -0
- package/e2e-tests/tests/nextjs.test.ts +1 -1
- package/e2e-tests/tests/nuxt-3.test.ts +1 -1
- package/e2e-tests/tests/nuxt-4.test.ts +1 -1
- package/e2e-tests/tests/remix.test.ts +30 -19
- package/e2e-tests/tests/sveltekit.test.ts +79 -50
- package/e2e-tests/utils/index.ts +62 -2
- package/lib/Constants.ts +5 -0
- package/package.json +1 -1
- package/src/apple/apple-wizard.ts +1 -1
- package/src/apple/xcode-manager.ts +5 -5
- package/src/flutter/code-tools.ts +284 -0
- package/src/flutter/flutter-wizard.ts +164 -0
- package/src/flutter/templates.ts +90 -0
- package/src/nextjs/nextjs-wizard.ts +4 -1
- package/src/run.ts +7 -0
- package/src/sourcemaps/sourcemaps-wizard.ts +3 -7
- package/src/telemetry.ts +6 -2
- package/src/utils/clack-utils.ts +8 -5
- package/src/utils/package-manager.ts +8 -11
- package/test/flutter/code-tools.test.ts +212 -0
- package/test/flutter/templates.test.ts +100 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import {
|
|
2
|
+
pubspecOptions,
|
|
3
|
+
sentryProperties,
|
|
4
|
+
initSnippet,
|
|
5
|
+
} from '../../src/flutter/templates';
|
|
6
|
+
|
|
7
|
+
describe('Flutter code templates', () => {
|
|
8
|
+
describe('pubspec', () => {
|
|
9
|
+
it('generates pubspec with project and org', () => {
|
|
10
|
+
const template = pubspecOptions('fixture-project', 'fixture-org');
|
|
11
|
+
expect(template).toMatchInlineSnapshot(`
|
|
12
|
+
"sentry:
|
|
13
|
+
upload_debug_symbols: true
|
|
14
|
+
upload_source_maps: true
|
|
15
|
+
project: fixture-project
|
|
16
|
+
org: fixture-org
|
|
17
|
+
"
|
|
18
|
+
`);
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
describe('sentry.properties', () => {
|
|
22
|
+
it('generates sentry.properties with token', () => {
|
|
23
|
+
const template = sentryProperties('fixture-token');
|
|
24
|
+
expect(template).toMatchInlineSnapshot(`"auth_token=fixture-token"`);
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
describe('init', () => {
|
|
28
|
+
it('generates Sentry config with all features enabled', () => {
|
|
29
|
+
const template = initSnippet(
|
|
30
|
+
'my-dsn',
|
|
31
|
+
{
|
|
32
|
+
tracing: true,
|
|
33
|
+
profiling: true,
|
|
34
|
+
},
|
|
35
|
+
'const MyApp()',
|
|
36
|
+
);
|
|
37
|
+
expect(template).toMatchInlineSnapshot(`
|
|
38
|
+
"await SentryFlutter.init(
|
|
39
|
+
(options) {
|
|
40
|
+
options.dsn = 'my-dsn';
|
|
41
|
+
// Set tracesSampleRate to 1.0 to capture 100% of transactions for tracing.
|
|
42
|
+
// We recommend adjusting this value in production.
|
|
43
|
+
options.tracesSampleRate = 1.0;
|
|
44
|
+
// The sampling rate for profiling is relative to tracesSampleRate
|
|
45
|
+
// Setting to 1.0 will profile 100% of sampled transactions:
|
|
46
|
+
options.profilesSampleRate = 1.0;
|
|
47
|
+
},
|
|
48
|
+
appRunner: () => runApp(SentryWidget(child: const MyApp())),
|
|
49
|
+
);
|
|
50
|
+
// TODO: Remove this line after sending the first sample event to sentry.
|
|
51
|
+
await Sentry.captureException(Exception('This is a sample exception.'));"
|
|
52
|
+
`);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
it('generates Sentry config with profiling disabled', () => {
|
|
56
|
+
const template = initSnippet(
|
|
57
|
+
'my-dsn',
|
|
58
|
+
{
|
|
59
|
+
tracing: true,
|
|
60
|
+
profiling: false,
|
|
61
|
+
},
|
|
62
|
+
'const MyApp()',
|
|
63
|
+
);
|
|
64
|
+
expect(template).toMatchInlineSnapshot(`
|
|
65
|
+
"await SentryFlutter.init(
|
|
66
|
+
(options) {
|
|
67
|
+
options.dsn = 'my-dsn';
|
|
68
|
+
// Set tracesSampleRate to 1.0 to capture 100% of transactions for tracing.
|
|
69
|
+
// We recommend adjusting this value in production.
|
|
70
|
+
options.tracesSampleRate = 1.0;
|
|
71
|
+
},
|
|
72
|
+
appRunner: () => runApp(SentryWidget(child: const MyApp())),
|
|
73
|
+
);
|
|
74
|
+
// TODO: Remove this line after sending the first sample event to sentry.
|
|
75
|
+
await Sentry.captureException(Exception('This is a sample exception.'));"
|
|
76
|
+
`);
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
it('generates Sentry config with tracing disabled', () => {
|
|
80
|
+
const template = initSnippet(
|
|
81
|
+
'my-dsn',
|
|
82
|
+
{
|
|
83
|
+
tracing: false,
|
|
84
|
+
profiling: false,
|
|
85
|
+
},
|
|
86
|
+
'const MyApp()',
|
|
87
|
+
);
|
|
88
|
+
expect(template).toMatchInlineSnapshot(`
|
|
89
|
+
"await SentryFlutter.init(
|
|
90
|
+
(options) {
|
|
91
|
+
options.dsn = 'my-dsn';
|
|
92
|
+
},
|
|
93
|
+
appRunner: () => runApp(SentryWidget(child: const MyApp())),
|
|
94
|
+
);
|
|
95
|
+
// TODO: Remove this line after sending the first sample event to sentry.
|
|
96
|
+
await Sentry.captureException(Exception('This is a sample exception.'));"
|
|
97
|
+
`);
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
});
|