@sentry/wizard 4.7.0 → 4.8.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.
Files changed (110) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +19 -19
  3. package/dist/e2e-tests/tests/angular-17.test.d.ts +1 -0
  4. package/dist/e2e-tests/tests/angular-17.test.js +196 -0
  5. package/dist/e2e-tests/tests/angular-17.test.js.map +1 -0
  6. package/dist/e2e-tests/tests/angular-19.test.d.ts +1 -0
  7. package/dist/e2e-tests/tests/angular-19.test.js +194 -0
  8. package/dist/e2e-tests/tests/angular-19.test.js.map +1 -0
  9. package/dist/e2e-tests/tests/expo.test.d.ts +1 -0
  10. package/dist/e2e-tests/tests/expo.test.js +95 -0
  11. package/dist/e2e-tests/tests/expo.test.js.map +1 -0
  12. package/dist/e2e-tests/tests/help-message.test.js +2 -2
  13. package/dist/e2e-tests/tests/help-message.test.js.map +1 -1
  14. package/dist/e2e-tests/tests/react-native.test.d.ts +1 -0
  15. package/dist/e2e-tests/tests/react-native.test.js +97 -0
  16. package/dist/e2e-tests/tests/react-native.test.js.map +1 -0
  17. package/dist/e2e-tests/tests/remix.test.js +4 -4
  18. package/dist/e2e-tests/tests/remix.test.js.map +1 -1
  19. package/dist/e2e-tests/tests/sveltekit.test.js +2 -2
  20. package/dist/e2e-tests/tests/sveltekit.test.js.map +1 -1
  21. package/dist/e2e-tests/utils/index.d.ts +7 -0
  22. package/dist/e2e-tests/utils/index.js +18 -1
  23. package/dist/e2e-tests/utils/index.js.map +1 -1
  24. package/dist/lib/Constants.d.ts +1 -0
  25. package/dist/lib/Constants.js +3 -0
  26. package/dist/lib/Constants.js.map +1 -1
  27. package/dist/src/angular/angular-wizard.d.ts +3 -0
  28. package/dist/src/angular/angular-wizard.js +186 -0
  29. package/dist/src/angular/angular-wizard.js.map +1 -0
  30. package/dist/src/angular/codemods/app-config.d.ts +3 -0
  31. package/dist/src/angular/codemods/app-config.js +211 -0
  32. package/dist/src/angular/codemods/app-config.js.map +1 -0
  33. package/dist/src/angular/codemods/main.d.ts +20 -0
  34. package/dist/src/angular/codemods/main.js +62 -0
  35. package/dist/src/angular/codemods/main.js.map +1 -0
  36. package/dist/src/angular/codemods/sourcemaps.d.ts +21 -0
  37. package/dist/src/angular/codemods/sourcemaps.js +94 -0
  38. package/dist/src/angular/codemods/sourcemaps.js.map +1 -0
  39. package/dist/src/angular/example-component.d.ts +8 -0
  40. package/dist/src/angular/example-component.js +286 -0
  41. package/dist/src/angular/example-component.js.map +1 -0
  42. package/dist/src/angular/sdk-setup.d.ts +6 -0
  43. package/dist/src/angular/sdk-setup.js +99 -0
  44. package/dist/src/angular/sdk-setup.js.map +1 -0
  45. package/dist/src/flutter/flutter-wizard.js +10 -2
  46. package/dist/src/flutter/flutter-wizard.js.map +1 -1
  47. package/dist/src/nextjs/nextjs-wizard.js +26 -12
  48. package/dist/src/nextjs/nextjs-wizard.js.map +1 -1
  49. package/dist/src/nextjs/templates.js +56 -7
  50. package/dist/src/nextjs/templates.js.map +1 -1
  51. package/dist/src/nuxt/templates.js +30 -0
  52. package/dist/src/nuxt/templates.js.map +1 -1
  53. package/dist/src/react-native/expo-metro.js +4 -1
  54. package/dist/src/react-native/expo-metro.js.map +1 -1
  55. package/dist/src/react-native/expo.js +5 -1
  56. package/dist/src/react-native/expo.js.map +1 -1
  57. package/dist/src/react-native/javascript.js +9 -2
  58. package/dist/src/react-native/javascript.js.map +1 -1
  59. package/dist/src/react-native/metro.js +8 -2
  60. package/dist/src/react-native/metro.js.map +1 -1
  61. package/dist/src/react-native/xcode.js +5 -1
  62. package/dist/src/react-native/xcode.js.map +1 -1
  63. package/dist/src/remix/sdk-example.js +30 -1
  64. package/dist/src/remix/sdk-example.js.map +1 -1
  65. package/dist/src/remix/sdk-setup.js +11 -5
  66. package/dist/src/remix/sdk-setup.js.map +1 -1
  67. package/dist/src/run.d.ts +1 -1
  68. package/dist/src/run.js +5 -0
  69. package/dist/src/run.js.map +1 -1
  70. package/dist/src/sourcemaps/sourcemaps-wizard.d.ts +1 -1
  71. package/dist/src/sourcemaps/sourcemaps-wizard.js +35 -20
  72. package/dist/src/sourcemaps/sourcemaps-wizard.js.map +1 -1
  73. package/dist/src/sourcemaps/tools/angular.d.ts +1 -0
  74. package/dist/src/sourcemaps/tools/angular.js +7 -7
  75. package/dist/src/sourcemaps/tools/angular.js.map +1 -1
  76. package/dist/src/sourcemaps/tools/sentry-cli.d.ts +5 -1
  77. package/dist/src/sourcemaps/tools/sentry-cli.js +6 -3
  78. package/dist/src/sourcemaps/tools/sentry-cli.js.map +1 -1
  79. package/dist/src/sourcemaps/tools/tsc.js +5 -1
  80. package/dist/src/sourcemaps/tools/tsc.js.map +1 -1
  81. package/dist/src/sourcemaps/tools/vite.js +4 -1
  82. package/dist/src/sourcemaps/tools/vite.js.map +1 -1
  83. package/dist/src/sourcemaps/tools/webpack.js +4 -1
  84. package/dist/src/sourcemaps/tools/webpack.js.map +1 -1
  85. package/dist/src/sveltekit/sdk-example.js +1 -1
  86. package/dist/src/sveltekit/sdk-example.js.map +1 -1
  87. package/dist/src/sveltekit/sveltekit-wizard.js +2 -2
  88. package/dist/src/sveltekit/sveltekit-wizard.js.map +1 -1
  89. package/dist/src/sveltekit/templates.js +28 -1
  90. package/dist/src/sveltekit/templates.js.map +1 -1
  91. package/dist/src/utils/clack/index.d.ts +11 -3
  92. package/dist/src/utils/clack/index.js +9 -3
  93. package/dist/src/utils/clack/index.js.map +1 -1
  94. package/dist/src/version.d.ts +1 -1
  95. package/dist/src/version.js +1 -1
  96. package/dist/src/version.js.map +1 -1
  97. package/dist/test/angular/angular-wizard.test.d.ts +1 -0
  98. package/dist/test/angular/angular-wizard.test.js +27 -0
  99. package/dist/test/angular/angular-wizard.test.js.map +1 -0
  100. package/dist/test/angular/codemods/sourcemaps.test.d.ts +1 -0
  101. package/dist/test/angular/codemods/sourcemaps.test.js +237 -0
  102. package/dist/test/angular/codemods/sourcemaps.test.js.map +1 -0
  103. package/dist/test/angular/example-component.test.d.ts +1 -0
  104. package/dist/test/angular/example-component.test.js +105 -0
  105. package/dist/test/angular/example-component.test.js.map +1 -0
  106. package/dist/test/react-native/metro.test.js +113 -0
  107. package/dist/test/react-native/metro.test.js.map +1 -1
  108. package/dist/test/remix/client-entry.test.js +10 -10
  109. package/dist/test/remix/client-entry.test.js.map +1 -1
  110. package/package.json +1 -1
@@ -22,17 +22,17 @@ const vitest_1 = require("vitest");
22
22
  useMatches,
23
23
  } from "@remix-run/react";
24
24
 
25
- import * as Sentry from "@sentry/remix";
25
+ import { init, replayIntegration, browserTracingIntegration,} from "@sentry/remix";
26
26
 
27
- Sentry.init({
27
+ init({
28
28
  dsn: "https://sentry.io/123",
29
29
  tracesSampleRate: 1,
30
30
 
31
- integrations: [Sentry.browserTracingIntegration({
31
+ integrations: [browserTracingIntegration({
32
32
  useEffect,
33
33
  useLocation,
34
34
  useMatches
35
- }), Sentry.replayIntegration({
35
+ }), replayIntegration({
36
36
  maskAllText: true,
37
37
  blockAllMedia: true
38
38
  })],
@@ -52,12 +52,12 @@ const vitest_1 = require("vitest");
52
52
  };
53
53
  const result = (0, sdk_setup_1.updateEntryClientMod)(originalEntryClientMod, dsn, selectedFeatures);
54
54
  (0, vitest_1.expect)(result.generate().code).toMatchInlineSnapshot(`
55
- "import * as Sentry from "@sentry/remix";
55
+ "import { init, replayIntegration,} from "@sentry/remix";
56
56
 
57
- Sentry.init({
57
+ init({
58
58
  dsn: "https://sentry.io/123",
59
59
 
60
- integrations: [Sentry.replayIntegration({
60
+ integrations: [replayIntegration({
61
61
  maskAllText: true,
62
62
  blockAllMedia: true
63
63
  })],
@@ -84,13 +84,13 @@ const vitest_1 = require("vitest");
84
84
  useMatches,
85
85
  } from "@remix-run/react";
86
86
 
87
- import * as Sentry from "@sentry/remix";
87
+ import { init, browserTracingIntegration,} from "@sentry/remix";
88
88
 
89
- Sentry.init({
89
+ init({
90
90
  dsn: "https://sentry.io/123",
91
91
  tracesSampleRate: 1,
92
92
 
93
- integrations: [Sentry.browserTracingIntegration({
93
+ integrations: [browserTracingIntegration({
94
94
  useEffect,
95
95
  useLocation,
96
96
  useMatches
@@ -1 +1 @@
1
- {"version":3,"file":"client-entry.test.js","sourceRoot":"","sources":["../../../test/remix/client-entry.test.ts"],"names":[],"mappings":";;AAAA,kFAAkF;AAClF,uCAAuC;AACvC,yDAAiE;AACjE,mCAA8C;AAE9C,IAAA,iBAAQ,EAAC,+BAA+B,EAAE,GAAG,EAAE;IAC7C,IAAA,WAAE,EAAC,oEAAoE,EAAE,GAAG,EAAE;QAC5E,0CAA0C;QAC1C,MAAM,sBAAsB,GAAG,IAAA,sBAAW,EAAC,EAAE,CAAC,CAAC;QAE/C,MAAM,GAAG,GAAG,uBAAuB,CAAC;QACpC,MAAM,gBAAgB,GAAG;YACvB,WAAW,EAAE,IAAI;YACjB,MAAM,EAAE,IAAI;SACb,CAAC;QAEF,MAAM,MAAM,GAAG,IAAA,gCAAoB,EACjC,sBAAsB,EACtB,GAAG,EACH,gBAAgB,CACjB,CAAC;QAEF,IAAA,eAAM,EAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC,qBAAqB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;KA0BpD,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,IAAA,WAAE,EAAC,oEAAoE,EAAE,GAAG,EAAE;QAC5E,0CAA0C;QAC1C,MAAM,sBAAsB,GAAG,IAAA,sBAAW,EAAC,EAAE,CAAC,CAAC;QAE/C,MAAM,GAAG,GAAG,uBAAuB,CAAC;QACpC,MAAM,gBAAgB,GAAG;YACvB,WAAW,EAAE,KAAK;YAClB,MAAM,EAAE,IAAI;SACb,CAAC;QAEF,MAAM,MAAM,GAAG,IAAA,gCAAoB,EACjC,sBAAsB,EACtB,GAAG,EACH,gBAAgB,CACjB,CAAC;QAEF,IAAA,eAAM,EAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC,qBAAqB,CAAC;;;;;;;;;;;;;;KAcpD,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,IAAA,WAAE,EAAC,+DAA+D,EAAE,GAAG,EAAE;QACvE,0CAA0C;QAC1C,MAAM,sBAAsB,GAAG,IAAA,sBAAW,EAAC,EAAE,CAAC,CAAC;QAE/C,MAAM,GAAG,GAAG,uBAAuB,CAAC;QACpC,MAAM,gBAAgB,GAAG;YACvB,WAAW,EAAE,IAAI;YACjB,MAAM,EAAE,KAAK;SACd,CAAC;QAEF,MAAM,MAAM,GAAG,IAAA,gCAAoB,EACjC,sBAAsB,EACtB,GAAG,EACH,gBAAgB,CACjB,CAAC;QAEF,IAAA,eAAM,EAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC,qBAAqB,CAAC;;;;;;;;;;;;;;;;;;;;KAoBpD,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["// @ts-expect-error - magicast is ESM and TS complains about that. It works though\nimport { parseModule } from 'magicast';\nimport { updateEntryClientMod } from '../../src/remix/sdk-setup';\nimport { describe, expect, it } from 'vitest';\n\ndescribe('initializeSentryOnEntryClient', () => {\n it('should initialize Sentry on client entry with all features enabled', () => {\n // Empty entry.client.tsx file for testing\n const originalEntryClientMod = parseModule('');\n\n const dsn = 'https://sentry.io/123';\n const selectedFeatures = {\n performance: true,\n replay: true,\n };\n\n const result = updateEntryClientMod(\n originalEntryClientMod,\n dsn,\n selectedFeatures,\n );\n\n expect(result.generate().code).toMatchInlineSnapshot(`\n \"import { useEffect,} from \"react\";\n\n import {\n useLocation,\n useMatches,\n } from \"@remix-run/react\";\n\n import * as Sentry from \"@sentry/remix\";\n\n Sentry.init({\n dsn: \"https://sentry.io/123\",\n tracesSampleRate: 1,\n\n integrations: [Sentry.browserTracingIntegration({\n useEffect,\n useLocation,\n useMatches\n }), Sentry.replayIntegration({\n maskAllText: true,\n blockAllMedia: true\n })],\n\n replaysSessionSampleRate: 0.1,\n replaysOnErrorSampleRate: 1\n })\"\n `);\n });\n\n it('should initialize Sentry on client entry when performance disabled', () => {\n // Empty entry.client.tsx file for testing\n const originalEntryClientMod = parseModule('');\n\n const dsn = 'https://sentry.io/123';\n const selectedFeatures = {\n performance: false,\n replay: true,\n };\n\n const result = updateEntryClientMod(\n originalEntryClientMod,\n dsn,\n selectedFeatures,\n );\n\n expect(result.generate().code).toMatchInlineSnapshot(`\n \"import * as Sentry from \"@sentry/remix\";\n\n Sentry.init({\n dsn: \"https://sentry.io/123\",\n\n integrations: [Sentry.replayIntegration({\n maskAllText: true,\n blockAllMedia: true\n })],\n\n replaysSessionSampleRate: 0.1,\n replaysOnErrorSampleRate: 1\n })\"\n `);\n });\n\n it('should initialize Sentry on client entry when replay disabled', () => {\n // Empty entry.client.tsx file for testing\n const originalEntryClientMod = parseModule('');\n\n const dsn = 'https://sentry.io/123';\n const selectedFeatures = {\n performance: true,\n replay: false,\n };\n\n const result = updateEntryClientMod(\n originalEntryClientMod,\n dsn,\n selectedFeatures,\n );\n\n expect(result.generate().code).toMatchInlineSnapshot(`\n \"import { useEffect,} from \"react\";\n\n import {\n useLocation,\n useMatches,\n } from \"@remix-run/react\";\n\n import * as Sentry from \"@sentry/remix\";\n\n Sentry.init({\n dsn: \"https://sentry.io/123\",\n tracesSampleRate: 1,\n\n integrations: [Sentry.browserTracingIntegration({\n useEffect,\n useLocation,\n useMatches\n })]\n })\"\n `);\n });\n});\n"]}
1
+ {"version":3,"file":"client-entry.test.js","sourceRoot":"","sources":["../../../test/remix/client-entry.test.ts"],"names":[],"mappings":";;AAAA,kFAAkF;AAClF,uCAAuC;AACvC,yDAAiE;AACjE,mCAA8C;AAE9C,IAAA,iBAAQ,EAAC,+BAA+B,EAAE,GAAG,EAAE;IAC7C,IAAA,WAAE,EAAC,oEAAoE,EAAE,GAAG,EAAE;QAC5E,0CAA0C;QAC1C,MAAM,sBAAsB,GAAG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gBAAgB,CACjB,CAAC;QAEF,IAAA,eAAM,EAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC,qBAAqB,CAAC;;;;;;;;;;;;;;;;;;;;KAoBpD,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["// @ts-expect-error - magicast is ESM and TS complains about that. It works though\nimport { parseModule } from 'magicast';\nimport { updateEntryClientMod } from '../../src/remix/sdk-setup';\nimport { describe, expect, it } from 'vitest';\n\ndescribe('initializeSentryOnEntryClient', () => {\n it('should initialize Sentry on client entry with all features enabled', () => {\n // Empty entry.client.tsx file for testing\n const originalEntryClientMod = parseModule('');\n\n const dsn = 'https://sentry.io/123';\n const selectedFeatures = {\n performance: true,\n replay: true,\n };\n\n const result = updateEntryClientMod(\n originalEntryClientMod,\n dsn,\n selectedFeatures,\n );\n\n expect(result.generate().code).toMatchInlineSnapshot(`\n \"import { useEffect,} from \"react\";\n\n import {\n useLocation,\n useMatches,\n } from \"@remix-run/react\";\n\n import { init, replayIntegration, browserTracingIntegration,} from \"@sentry/remix\";\n\n init({\n dsn: \"https://sentry.io/123\",\n tracesSampleRate: 1,\n\n integrations: [browserTracingIntegration({\n useEffect,\n useLocation,\n useMatches\n }), replayIntegration({\n maskAllText: true,\n blockAllMedia: true\n })],\n\n replaysSessionSampleRate: 0.1,\n replaysOnErrorSampleRate: 1\n })\"\n `);\n });\n\n it('should initialize Sentry on client entry when performance disabled', () => {\n // Empty entry.client.tsx file for testing\n const originalEntryClientMod = parseModule('');\n\n const dsn = 'https://sentry.io/123';\n const selectedFeatures = {\n performance: false,\n replay: true,\n };\n\n const result = updateEntryClientMod(\n originalEntryClientMod,\n dsn,\n selectedFeatures,\n );\n\n expect(result.generate().code).toMatchInlineSnapshot(`\n \"import { init, replayIntegration,} from \"@sentry/remix\";\n\n init({\n dsn: \"https://sentry.io/123\",\n\n integrations: [replayIntegration({\n maskAllText: true,\n blockAllMedia: true\n })],\n\n replaysSessionSampleRate: 0.1,\n replaysOnErrorSampleRate: 1\n })\"\n `);\n });\n\n it('should initialize Sentry on client entry when replay disabled', () => {\n // Empty entry.client.tsx file for testing\n const originalEntryClientMod = parseModule('');\n\n const dsn = 'https://sentry.io/123';\n const selectedFeatures = {\n performance: true,\n replay: false,\n };\n\n const result = updateEntryClientMod(\n originalEntryClientMod,\n dsn,\n selectedFeatures,\n );\n\n expect(result.generate().code).toMatchInlineSnapshot(`\n \"import { useEffect,} from \"react\";\n\n import {\n useLocation,\n useMatches,\n } from \"@remix-run/react\";\n\n import { init, browserTracingIntegration,} from \"@sentry/remix\";\n\n init({\n dsn: \"https://sentry.io/123\",\n tracesSampleRate: 1,\n\n integrations: [browserTracingIntegration({\n useEffect,\n useLocation,\n useMatches\n })]\n })\"\n `);\n });\n});\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/wizard",
3
- "version": "4.7.0",
3
+ "version": "4.8.0",
4
4
  "homepage": "https://github.com/getsentry/sentry-wizard",
5
5
  "repository": "https://github.com/getsentry/sentry-wizard",
6
6
  "description": "Sentry wizard helping you to configure your project",