@sentry/wizard 6.5.0 → 6.6.1

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 (65) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/e2e-tests/tests/angular-17.test.js +1 -0
  3. package/dist/e2e-tests/tests/angular-17.test.js.map +1 -1
  4. package/dist/e2e-tests/tests/angular-19.test.js +1 -0
  5. package/dist/e2e-tests/tests/angular-19.test.js.map +1 -1
  6. package/dist/e2e-tests/tests/expo.test.js +4 -1
  7. package/dist/e2e-tests/tests/expo.test.js.map +1 -1
  8. package/dist/e2e-tests/tests/nuxt-3.test.js +6 -0
  9. package/dist/e2e-tests/tests/nuxt-3.test.js.map +1 -1
  10. package/dist/e2e-tests/tests/nuxt-4.test.js +6 -0
  11. package/dist/e2e-tests/tests/nuxt-4.test.js.map +1 -1
  12. package/dist/e2e-tests/tests/react-native.test.js +5 -2
  13. package/dist/e2e-tests/tests/react-native.test.js.map +1 -1
  14. package/dist/e2e-tests/tests/remix.test.js +2 -1
  15. package/dist/e2e-tests/tests/remix.test.js.map +1 -1
  16. package/dist/e2e-tests/tests/sveltekit-hooks.test.js +13 -2
  17. package/dist/e2e-tests/tests/sveltekit-hooks.test.js.map +1 -1
  18. package/dist/e2e-tests/tests/sveltekit-tracing.test.js +4 -0
  19. package/dist/e2e-tests/tests/sveltekit-tracing.test.js.map +1 -1
  20. package/dist/src/angular/codemods/main.js +1 -0
  21. package/dist/src/angular/codemods/main.js.map +1 -1
  22. package/dist/src/apple/templates.js +0 -2
  23. package/dist/src/apple/templates.js.map +1 -1
  24. package/dist/src/nextjs/nextjs-wizard.js +1 -1
  25. package/dist/src/nextjs/nextjs-wizard.js.map +1 -1
  26. package/dist/src/nextjs/templates.js +6 -4
  27. package/dist/src/nextjs/templates.js.map +1 -1
  28. package/dist/src/nuxt/templates.js +10 -2
  29. package/dist/src/nuxt/templates.js.map +1 -1
  30. package/dist/src/react-native/react-native-wizard.js +3 -3
  31. package/dist/src/react-native/react-native-wizard.js.map +1 -1
  32. package/dist/src/react-native/xcode.d.ts +2 -2
  33. package/dist/src/react-native/xcode.js +8 -13
  34. package/dist/src/react-native/xcode.js.map +1 -1
  35. package/dist/src/remix/sdk-setup.js +1 -0
  36. package/dist/src/remix/sdk-setup.js.map +1 -1
  37. package/dist/src/sveltekit/sdk-setup/setup.d.ts +6 -0
  38. package/dist/src/sveltekit/sdk-setup/setup.js +4 -1
  39. package/dist/src/sveltekit/sdk-setup/setup.js.map +1 -1
  40. package/dist/src/sveltekit/templates.js +9 -0
  41. package/dist/src/sveltekit/templates.js.map +1 -1
  42. package/dist/src/utils/clack/index.js +10 -3
  43. package/dist/src/utils/clack/index.js.map +1 -1
  44. package/dist/src/version.d.ts +1 -1
  45. package/dist/src/version.js +1 -1
  46. package/dist/src/version.js.map +1 -1
  47. package/dist/test/angular/angular-wizard.test.js +113 -17
  48. package/dist/test/angular/angular-wizard.test.js.map +1 -1
  49. package/dist/test/apple/code-tools.test.js +0 -3
  50. package/dist/test/apple/code-tools.test.js.map +1 -1
  51. package/dist/test/apple/templates.test.js +0 -4
  52. package/dist/test/apple/templates.test.js.map +1 -1
  53. package/dist/test/nextjs/templates.test.js +33 -22
  54. package/dist/test/nextjs/templates.test.js.map +1 -1
  55. package/dist/test/nuxt/templates.test.js +50 -10
  56. package/dist/test/nuxt/templates.test.js.map +1 -1
  57. package/dist/test/react-native/xcode.test.js +14 -13
  58. package/dist/test/react-native/xcode.test.js.map +1 -1
  59. package/dist/test/remix/client-entry.test.js +10 -4
  60. package/dist/test/remix/client-entry.test.js.map +1 -1
  61. package/dist/test/sveltekit/templates.test.js +214 -0
  62. package/dist/test/sveltekit/templates.test.js.map +1 -1
  63. package/dist/test/utils/clack/index.test.js +1 -1
  64. package/dist/test/utils/clack/index.test.js.map +1 -1
  65. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"angular-wizard.test.js","sourceRoot":"","sources":["../../../test/angular/angular-wizard.test.ts"],"names":[],"mappings":";;AAAA,mCAAkD;AAElD,qEAAqE;AAErE,WAAE,CAAC,IAAI,CAAC,kCAAkC,EAAE,GAAG,EAAE,CAAC,CAAC;IACjD,2BAA2B,EAAE,WAAE,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,SAAS,CAAC;CAClE,CAAC,CAAC,CAAC;AAEJ,IAAA,iBAAQ,EAAC,mBAAmB,EAAE,GAAG,EAAE;IACjC,IAAA,WAAE,EAAC,oEAAoE,EAAE,GAAG,EAAE;QAC5E,IAAA,eAAM,EAAC,IAAA,kCAAiB,EAAC,IAAI,CAAC,CAAC,CAAC,qBAAqB,CAAC;;;;;;;;KAQrD,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,IAAA,WAAE,EAAC,6EAA6E,EAAE,GAAG,EAAE;QACrF,IAAA,eAAM,EAAC,IAAA,kCAAiB,EAAC,KAAK,CAAC,CAAC,CAAC,qBAAqB,CAAC;;;;;;KAMtD,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { describe, expect, it, vi } from 'vitest';\n\nimport { buildOutroMessage } from '../../src/angular/angular-wizard';\n\nvi.mock('../../src/utils/clack/mcp-config', () => ({\n offerProjectScopedMcpConfig: vi.fn().mockResolvedValue(undefined),\n}));\n\ndescribe('buildOutroMessage', () => {\n it('returns the correct outro message if example component was created', () => {\n expect(buildOutroMessage(true)).toMatchInlineSnapshot(`\n \"\n Successfully installed the Sentry Angular SDK!\n\n You can validate your setup by starting your dev environment (ng serve) and throwing an error in the example component.\n\n Check out the SDK documentation for further configuration:\n https://docs.sentry.io/platforms/javascript/guides/angular/\"\n `);\n });\n it('returns the correct outro message if example component creation was skipped', () => {\n expect(buildOutroMessage(false)).toMatchInlineSnapshot(`\n \"\n Successfully installed the Sentry Angular SDK!\n\n Check out the SDK documentation for further configuration:\n https://docs.sentry.io/platforms/javascript/guides/angular/\"\n `);\n });\n});\n"]}
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expect, it, vi } from 'vitest';\n\nimport { buildOutroMessage } from '../../src/angular/angular-wizard';\nimport { getInitCallArgs } from '../../src/angular/codemods/main';\n\nvi.mock('../../src/utils/clack/mcp-config', () => ({\n offerProjectScopedMcpConfig: vi.fn().mockResolvedValue(undefined),\n}));\n\ndescribe('angular-wizard', () => {\n describe('buildOutroMessage', () => {\n it('returns the correct outro message if example component was created', () => {\n expect(buildOutroMessage(true)).toMatchInlineSnapshot(`\n \"\n Successfully installed the Sentry Angular SDK!\n\n You can validate your setup by starting your dev environment (ng serve) and throwing an error in the example component.\n\n Check out the SDK documentation for further configuration:\n https://docs.sentry.io/platforms/javascript/guides/angular/\"\n `);\n });\n it('returns the correct outro message if example component creation was skipped', () => {\n expect(buildOutroMessage(false)).toMatchInlineSnapshot(`\n \"\n Successfully installed the Sentry Angular SDK!\n\n Check out the SDK documentation for further configuration:\n https://docs.sentry.io/platforms/javascript/guides/angular/\"\n `);\n });\n });\n\n describe('getInitCallArgs', () => {\n it('returns the correct init call arguments when all features are enabled', () => {\n const args = getInitCallArgs('https://example.com', {\n performance: true,\n replay: true,\n logs: true,\n });\n expect(args).toMatchInlineSnapshot(`\n {\n \"dsn\": \"https://example.com\",\n \"enableLogs\": true,\n \"integrations\": [\n {},\n {},\n ],\n \"replaysOnErrorSampleRate\": 1,\n \"replaysSessionSampleRate\": 0.1,\n \"sendDefaultPii\": true,\n \"tracesSampleRate\": 1,\n }\n `);\n });\n\n it('returns the correct init call arguments when performance is disabled', () => {\n const args = getInitCallArgs('https://example.com', {\n performance: false,\n replay: true,\n logs: true,\n });\n\n expect(args).toMatchInlineSnapshot(`\n {\n \"dsn\": \"https://example.com\",\n \"enableLogs\": true,\n \"integrations\": [\n {},\n ],\n \"replaysOnErrorSampleRate\": 1,\n \"replaysSessionSampleRate\": 0.1,\n \"sendDefaultPii\": true,\n }\n `);\n });\n\n it('returns the correct init call arguments when replay is disabled', () => {\n const args = getInitCallArgs('https://example.com', {\n performance: true,\n replay: false,\n logs: true,\n });\n\n expect(args).toMatchInlineSnapshot(`\n {\n \"dsn\": \"https://example.com\",\n \"enableLogs\": true,\n \"integrations\": [\n {},\n ],\n \"sendDefaultPii\": true,\n \"tracesSampleRate\": 1,\n }\n `);\n });\n\n it('returns the correct init call arguments when logs are disabled', () => {\n const args = getInitCallArgs('https://example.com', {\n performance: true,\n replay: true,\n logs: false,\n });\n\n expect(args).toMatchInlineSnapshot(`\n {\n \"dsn\": \"https://example.com\",\n \"integrations\": [\n {},\n {},\n ],\n \"replaysOnErrorSampleRate\": 1,\n \"replaysSessionSampleRate\": 0.1,\n \"sendDefaultPii\": true,\n \"tracesSampleRate\": 1,\n }\n `);\n });\n\n it('returns the correct init call arguments when all features are disabled', () => {\n const args = getInitCallArgs('https://example.com', {\n performance: false,\n replay: false,\n logs: false,\n });\n\n expect(args).toMatchInlineSnapshot(`\n {\n \"dsn\": \"https://example.com\",\n \"sendDefaultPii\": true,\n }\n `);\n });\n });\n});\n"]}
@@ -55,7 +55,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
55
55
  func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
56
56
  SentrySDK.start { options in
57
57
  options.dsn = "https://example.com/sentry-dsn"
58
- options.debug = true // Enabled debug when first installing is always helpful
59
58
 
60
59
  // Adds IP for users.
61
60
  // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
@@ -114,7 +113,6 @@ const validAppDelegateObjCWithSentry = `@import Sentry;
114
113
  - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
115
114
  [SentrySDK startWithConfigureOptions:^(SentryOptions * options) {
116
115
  options.dsn = @"https://example.com/sentry-dsn";
117
- options.debug = YES; // Enabled debug when first installing is always helpful
118
116
 
119
117
  // Adds IP for users.
120
118
  // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
@@ -169,7 +167,6 @@ struct TestApp: App {
169
167
  init() {
170
168
  SentrySDK.start { options in
171
169
  options.dsn = "https://example.com/sentry-dsn"
172
- options.debug = true // Enabled debug when first installing is always helpful
173
170
 
174
171
  // Adds IP for users.
175
172
  // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
@@ -1 +1 @@
1
- {"version":3,"file":"code-tools.test.js","sourceRoot":"","sources":["../../../test/apple/code-tools.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAuC;AACvC,uCAAyB;AACzB,uCAAyB;AACzB,2CAA6B;AAC7B,2DAGoC;AACpC,+EAA+E;AAC/E,sDAAwC;AACxC,mCAAyE;AAEzE,iBAAiB;AACjB,MAAM,uBAAuB,GAAG,uBAAuB,CAAC;AACxD,MAAM,qBAAqB,GAAG;;;;;;;;;;EAU5B,CAAC;AACH,MAAM,+BAA+B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqCtC,CAAC;AACH,MAAM,sBAAsB,GAAG;;;EAG7B,CAAC;AACH,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;KAcxB,CAAC;AACN,MAAM,8BAA8B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAwClC,CAAC;AACN,MAAM,yBAAyB,GAAG;;;;;EAKhC,CAAC;AACH,MAAM,uBAAuB,GAAG;;;;;;;;;;EAU9B,CAAC;AACH,MAAM,iCAAiC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsCxC,CAAC;AAEH,MAAM,cAAc,GAAG,GAAW,EAAE;IAClC,MAAM,OAAO,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,iBAAiB,CAAC,CAAC,CAAC;IAC1E,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,sBAAsB,GAAG,CAC7B,GAAW,EACX,OAAe,EACf,GAAyB,EACjB,E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AAC,QAAQ,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;gBAE/D,eAAe;gBACf,IAAA,eAAM,EAAC,MAAM,CAAC,CAAC,UAAU,EAAE,CAAC;gBAC5B,MAAM,WAAW,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;gBACtD,IAAA,eAAM,EAAC,WAAW,CAAC,CAAC,GAAG,CAAC,SAAS,CAC/B,wCAAwC,CACzC,CAAC;YACJ,CAAC,CAAC,CAAC;YAEH,IAAA,WAAE,EAAC,gDAAgD,EAAE,GAAG,EAAE;gBACxD,gBAAgB;gBAChB,MAAM,OAAO,GAAG,cAAc,EAAE,CAAC;gBACjC,MAAM,QAAQ,GAAG,sBAAsB,CACrC,OAAO,EACP,oBAAoB,EACpB,GAAG,CACJ,CAAC;gBAEF,YAAY;gBACZ,MAAM,MAAM,GAAG,IAAA,oCAAuB,EAAC,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;gBAE/D,eAAe;gBACf,IAAA,eAAM,EAAC,MAAM,CAAC,CAAC,UAAU,EAAE,CAAC;gBAC5B,MAAM,WAAW,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;gBACtD,IAAA,eAAM,EAAC,WAAW,CAAC,CAAC,GAAG,CAAC,SAAS,CAC/B,wCAAwC,CACzC,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import * as Sentry from '@sentry/node';\nimport * as fs from 'fs';\nimport * as os from 'os';\nimport * as path from 'path';\nimport {\n addCodeSnippetToProject,\n exportForTesting,\n} from '../../src/apple/code-tools';\n// @ts-expect-error - clack is ESM and TS complains about that. It works though\nimport * as clack from '@clack/prompts';\nimport { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';\n\n// Test Constants\nconst invalidAppDelegateSwift = `func application() {}`;\nconst validAppDelegateSwift = `\nimport UIKit\n\n@main\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n\n func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {\n // Override point for customization after application launch.\n return true\n }\n}`;\nconst validAppDelegateSwiftWithSentry = `\nimport UIKit\nimport Sentry\n\n\n@main\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n\n func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {\n SentrySDK.start { options in\n options.dsn = \"https://example.com/sentry-dsn\"\n options.debug = true // Enabled debug when first installing is always helpful\n\n // Adds IP for users.\n // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/\n options.sendDefaultPii = true\n\n // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.\n // We recommend adjusting this value in production.\n options.tracesSampleRate = 1.0\n\n // Configure profiling. Visit https://docs.sentry.io/platforms/apple/profiling/ to learn more.\n options.configureProfiling = {\n $0.sessionSampleRate = 1.0 // We recommend adjusting this value in production.\n $0.lifecycle = .trace\n }\n\n // Uncomment the following lines to add more data to your events\n // options.attachScreenshot = true // This adds a screenshot to the error events\n // options.attachViewHierarchy = true // This adds the view hierarchy to the error events\n }\n // Remove the next line after confirming that your Sentry integration is working.\n SentrySDK.capture(message: \"This app uses Sentry! :)\")\n\n // Override point for customization after application launch.\n return true\n }\n}`;\nconst invalidAppDelegateObjC = `\n- (BOOL)application:(UIApplication *) {\n return NO;\n}`;\nconst validAppDelegateObjC = `\n#import \"AppDelegate.h\"\n\n@interface AppDelegate ()\n\n@end\n\n@implementation AppDelegate\n\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\n // Override point for customization after application launch.\n return YES;\n}\n\n@end`;\nconst validAppDelegateObjCWithSentry = `@import Sentry;\n\n#import \"AppDelegate.h\"\n\n@interface AppDelegate ()\n\n@end\n\n@implementation AppDelegate\n\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\n [SentrySDK startWithConfigureOptions:^(SentryOptions * options) {\n options.dsn = @\"https://example.com/sentry-dsn\";\n options.debug = YES; // Enabled debug when first installing is always helpful\n\n // Adds IP for users.\n // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/\n options.sendDefaultPii = YES;\n\n // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.\n // We recommend adjusting this value in production.\n options.tracesSampleRate = @1.0;\n\n // Configure profiling. Visit https://docs.sentry.io/platforms/apple/profiling/ to learn more.\n options.configureProfiling = ^(SentryProfileOptions *profiling) {\n profiling.sessionSampleRate = 1.0; // We recommend adjusting this value in production.\n profiling.lifecycle = SentryProfilingLifecycleTrace;\n };\n\n //Uncomment the following lines to add more data to your events\n //options.attachScreenshot = YES; //This will add a screenshot to the error events\n //options.attachViewHierarchy = YES; //This will add the view hierarchy to the error events\n }];\n //Remove the next line after confirming that your Sentry integration is working.\n [SentrySDK captureMessage:@\"This app uses Sentry!\"];\n\n // Override point for customization after application launch.\n return YES;\n}\n\n@end`;\nconst invalidAppDelegateSwiftUI = `\nstruct MyApp: App {\n var body: some Scene {\n WindowGroup { Text(\"Hello, world!\") }\n }\n}`;\nconst validAppDelegateSwiftUI = `\nimport SwiftUI\n\n@main\nstruct TestApp: App {\n var body: some Scene {\n WindowGroup {\n ContentView()\n }\n }\n}`;\nconst validAppDelegateSwiftUIWithSentry = `\nimport SwiftUI\nimport Sentry\n\n\n@main\nstruct TestApp: App {\n init() {\n SentrySDK.start { options in\n options.dsn = \"https://example.com/sentry-dsn\"\n options.debug = true // Enabled debug when first installing is always helpful\n\n // Adds IP for users.\n // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/\n options.sendDefaultPii = true\n\n // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.\n // We recommend adjusting this value in production.\n options.tracesSampleRate = 1.0\n\n // Configure profiling. Visit https://docs.sentry.io/platforms/apple/profiling/ to learn more.\n options.configureProfiling = {\n $0.sessionSampleRate = 1.0 // We recommend adjusting this value in production.\n $0.lifecycle = .trace\n }\n\n // Uncomment the following lines to add more data to your events\n // options.attachScreenshot = true // This adds a screenshot to the error events\n // options.attachViewHierarchy = true // This adds the view hierarchy to the error events\n }\n // Remove the next line after confirming that your Sentry integration is working.\n SentrySDK.capture(message: \"This app uses Sentry! :)\")\n }\n var body: some Scene {\n WindowGroup {\n ContentView()\n }\n }\n}`;\n\nconst prepareTempDir = (): string => {\n const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'code-tools-test'));\n return tempDir;\n};\n\nconst prepareAppDelegateFile = (\n dir: string,\n content: string,\n ext: 'm' | 'mm' | 'swift',\n): string => {\n const filePath = path.join(dir, `AppDelegate.${ext}`);\n fs.writeFileSync(filePath, content, 'utf8');\n return filePath;\n};\n\nconst dsn = 'https://example.com/sentry-dsn';\n\n// Mock Setup\n\nvi.mock('../../src/utils/bash');\nvi.spyOn(Sentry, 'setTag').mockImplementation(() => undefined);\nvi.spyOn(Sentry, 'captureException').mockImplementation(() => 'id');\n\n// Test Suite\n\ndescribe('code-tools', () => {\n beforeEach(() => {\n vi.spyOn(clack.log, 'info').mockImplementation(() => undefined);\n });\n\n afterEach(() => {\n vi.clearAllMocks();\n });\n\n describe('#isAppDelegateFile', () => {\n const prepareTestFile = (\n content: string,\n ext: 'm' | 'mm' | 'swift',\n ): string => {\n const tempDir = prepareTempDir();\n return prepareAppDelegateFile(tempDir, content, ext);\n };\n\n describe('swift files', () => {\n describe('swift app launch regex', () => {\n describe('valid cases', () => {\n const variations: {\n name: string;\n code: string;\n }[] = [\n {\n name: 'with underscores',\n code: 'func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {',\n },\n {\n name: 'with different dictionary type',\n code: 'func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {',\n },\n {\n name: 'with extra whitespace',\n code: ' func application ( _ application: UIApplication , didFinishLaunchingWithOptions launchOptions: [ NSObject : AnyObject ]? ) -> Bool { ',\n },\n {\n name: 'macOS notification variant',\n code: 'func applicationDidFinishLaunching(_ aNotification: Notification) {',\n },\n {\n name: 'macOS with extra whitespace',\n code: 'func applicationDidFinishLaunching ( _ aNotification: Notification ) {',\n },\n ];\n\n for (const variation of variations) {\n describe(`${variation.name}`, () => {\n it(`should return true`, () => {\n // -- Arrange --\n const filePath = prepareTestFile(variation.code, 'swift');\n\n // -- Act --\n const result = exportForTesting.isAppDelegateFile(filePath);\n\n // -- Assert --\n expect(result).toBeTruthy();\n });\n });\n }\n\n describe('invalid cases', () => {\n const variations: {\n name: string;\n code: string;\n }[] = [\n {\n name: 'missing application method',\n code: 'import UIKit',\n },\n {\n name: 'typo in method name',\n code: 'func applicatioM(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {',\n },\n {\n name: 'garbage input',\n code: 'asdf;jk23;uas()d{',\n },\n ];\n\n for (const variation of variations) {\n describe(`${variation.name}`, () => {\n it('should return false', () => {\n // -- Arrange --\n const filePath = prepareTestFile(variation.code, 'swift');\n\n // -- Act --\n const result = exportForTesting.isAppDelegateFile(filePath);\n\n // -- Assert --\n expect(result).toBeFalsy();\n });\n });\n }\n });\n });\n });\n });\n\n describe('objc files', () => {\n describe('valid cases', () => {\n const variations: {\n name: string;\n code: string;\n }[] = [\n {\n name: 'basic',\n code: '- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {',\n },\n {\n name: 'with more whitespace',\n code: '- ( BOOL ) application: ( UIApplication * ) application didFinishLaunchingWithOptions: ( NSDictionary * ) launchOptions {',\n },\n ];\n\n for (const variation of variations) {\n describe(`${variation.name}`, () => {\n it('should return true', () => {\n // -- Arrange --\n const filePath = prepareTestFile(variation.code, 'm');\n\n // -- Act --\n const result = exportForTesting.isAppDelegateFile(filePath);\n\n // -- Assert --\n expect(result).toBeTruthy();\n });\n });\n }\n });\n\n describe('invalid cases', () => {\n const variations: {\n name: string;\n code: string;\n }[] = [\n {\n name: 'missing application method',\n code: 'import UIKit',\n },\n ];\n\n for (const variation of variations) {\n describe(`${variation.name}`, () => {\n it('should return false', () => {\n // -- Arrange --\n const filePath = prepareTestFile(variation.code, 'm');\n\n // -- Act --\n const result = exportForTesting.isAppDelegateFile(filePath);\n\n // -- Assert --\n expect(result).toBeFalsy();\n });\n });\n }\n });\n });\n\n describe('swiftui files', () => {\n describe('valid cases', () => {\n const variations: {\n name: string;\n code: string;\n }[] = [\n {\n name: 'basic',\n code: '@main struct MyApp: App {',\n },\n {\n name: 'with more whitespace',\n code: '@main struct MyApp: App {',\n },\n {\n name: 'with SwiftUI namespace',\n code: '@main struct App: SwiftUI.App {',\n },\n ];\n\n for (const variation of variations) {\n describe(`${variation.name}`, () => {\n it('should return true', () => {\n // -- Arrange --\n const filePath = prepareTestFile(variation.code, 'swift');\n\n // -- Act --\n const result = exportForTesting.isAppDelegateFile(filePath);\n\n // -- Assert --\n expect(result).toBeTruthy();\n });\n });\n }\n });\n\n describe('invalid cases', () => {\n const variations: {\n name: string;\n code: string;\n }[] = [\n {\n name: 'missing @main',\n code: 'struct App: App {',\n },\n {\n name: 'missing super-type App',\n code: 'struct MyApp {',\n },\n {\n name: 'imported not from SwiftUI',\n code: '@main struct App: MySwiftyUI.App {',\n },\n {\n name: 'imported not from SwiftUI but similar',\n code: '@main struct App: MySwiftUI.App {',\n },\n ];\n\n for (const variation of variations) {\n describe(`${variation.name}`, () => {\n it('should return false', () => {\n // -- Arrange --\n const filePath = prepareTestFile(variation.code, 'swift');\n\n // -- Act --\n const result = exportForTesting.isAppDelegateFile(filePath);\n\n // -- Assert --\n expect(result).toBeFalsy();\n });\n });\n }\n });\n });\n\n describe('file not found', () => {\n it('should throw an error', () => {\n // -- Arrange --\n const invalidPath = path.join(os.tmpdir(), 'invalid-path');\n\n // -- Act & Assert --\n expect(() => exportForTesting.isAppDelegateFile(invalidPath)).toThrow();\n });\n });\n });\n\n describe('#findAppDidFinishLaunchingWithOptionsInDirectory', () => {\n describe('no files given', () => {\n it('should check files in directory', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateSwift,\n 'swift',\n );\n\n // -- Act --\n const result =\n exportForTesting.findAppDidFinishLaunchingWithOptionsInDirectory(\n tempDir,\n );\n\n // -- Assert --\n expect(result).toBe(filePath);\n });\n });\n\n describe('SwiftUI file found', () => {\n describe('is app delegate', () => {\n it('should return the file path', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateSwiftUI,\n 'swift',\n );\n\n // -- Act --\n const result =\n exportForTesting.findAppDidFinishLaunchingWithOptionsInDirectory(\n tempDir,\n );\n\n // -- Assert --\n expect(result).toBe(filePath);\n });\n });\n\n describe('is not app delegate', () => {\n it('should be ignored', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n prepareAppDelegateFile(tempDir, invalidAppDelegateSwiftUI, 'swift');\n\n // -- Act --\n const result =\n exportForTesting.findAppDidFinishLaunchingWithOptionsInDirectory(\n tempDir,\n );\n\n // -- Assert --\n expect(result).toBeNull();\n });\n });\n });\n\n describe('Swift file found', () => {\n describe('is app delegate', () => {\n it('should return the file path', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateSwift,\n 'swift',\n );\n\n // -- Act --\n const result =\n exportForTesting.findAppDidFinishLaunchingWithOptionsInDirectory(\n tempDir,\n );\n\n // -- Assert --\n expect(result).toBe(filePath);\n });\n });\n\n describe('is not app delegate', () => {\n it('should be ignored', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n prepareAppDelegateFile(tempDir, invalidAppDelegateSwift, 'swift');\n\n // -- Act --\n const result =\n exportForTesting.findAppDidFinishLaunchingWithOptionsInDirectory(\n tempDir,\n );\n\n // -- Assert --\n expect(result).toBeNull();\n });\n });\n });\n\n describe('Objective-C file found', () => {\n describe('is app delegate', () => {\n it('should return the file path', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateObjC,\n 'm',\n );\n\n // -- Act --\n const result =\n exportForTesting.findAppDidFinishLaunchingWithOptionsInDirectory(\n tempDir,\n );\n\n // -- Assert --\n expect(result).toBe(filePath);\n });\n });\n\n describe('is not app delegate', () => {\n it('should be ignored', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n prepareAppDelegateFile(tempDir, invalidAppDelegateObjC, 'm');\n\n // -- Act --\n const result =\n exportForTesting.findAppDidFinishLaunchingWithOptionsInDirectory(\n tempDir,\n );\n\n // -- Assert --\n expect(result).toBeNull();\n });\n });\n });\n\n describe('Objective-C++ file found', () => {\n describe('is app delegate', () => {\n it('should return the file path', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateObjC,\n 'mm',\n );\n\n // -- Act --\n const result = exportForTesting.findAppDidFinishLaunchingWithOptions([\n filePath,\n ]);\n\n // -- Assert --\n expect(result).toBe(filePath);\n });\n });\n\n describe('is not app delegate', () => {\n it('should be ignored', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n prepareAppDelegateFile(tempDir, invalidAppDelegateObjC, 'mm');\n\n // -- Act --\n const result =\n exportForTesting.findAppDidFinishLaunchingWithOptionsInDirectory(\n tempDir,\n );\n\n // -- Assert --\n expect(result).toBeNull();\n });\n });\n });\n\n describe('file in list not found', () => {\n it('should return null', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n invalidAppDelegateSwift,\n 'swift',\n );\n\n // -- Act --\n const result = exportForTesting.findAppDidFinishLaunchingWithOptions([\n filePath,\n ]);\n\n // -- Assert --\n expect(result).toBeNull();\n });\n });\n\n describe('unrelated file found', () => {\n it('should be ignored', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n invalidAppDelegateSwift,\n 'swift',\n );\n\n // -- Act --\n const result = exportForTesting.findAppDidFinishLaunchingWithOptions([\n filePath,\n ]);\n\n // -- Assert --\n expect(result).toBeNull();\n });\n });\n\n describe('directory in list', () => {\n describe('name starts with dot', () => {\n it('should be ignored', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n\n const hiddenDir = path.join(tempDir, '.hidden');\n fs.mkdirSync(hiddenDir);\n\n prepareAppDelegateFile(hiddenDir, validAppDelegateSwift, 'swift');\n\n // -- Act --\n const result =\n exportForTesting.findAppDidFinishLaunchingWithOptionsInDirectory(\n tempDir,\n );\n\n // -- Assert --\n expect(result).toBeNull();\n });\n });\n\n describe('name ends with .xcodeproj', () => {\n it('should be ignored', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const xcodeDir = path.join(tempDir, 'MyProject.xcodeproj');\n fs.mkdirSync(xcodeDir);\n\n prepareAppDelegateFile(xcodeDir, validAppDelegateSwift, 'swift');\n\n // -- Act --\n const result =\n exportForTesting.findAppDidFinishLaunchingWithOptionsInDirectory(\n tempDir,\n );\n\n // -- Assert --\n expect(result).toBeNull();\n });\n });\n\n describe('name ends with .xcassets', () => {\n it('should be ignored', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const xcassetsDir = path.join(tempDir, 'MyProject.xcassets');\n fs.mkdirSync(xcassetsDir);\n\n prepareAppDelegateFile(xcassetsDir, validAppDelegateSwift, 'swift');\n\n // -- Act --\n const result =\n exportForTesting.findAppDidFinishLaunchingWithOptionsInDirectory(\n tempDir,\n );\n\n // -- Assert --\n expect(result).toBeNull();\n });\n });\n\n describe('is not a directory', () => {\n it('should be ignored', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = path.join(tempDir, 'some-file');\n fs.writeFileSync(filePath, validAppDelegateSwift, 'utf8');\n\n // -- Act --\n const result =\n exportForTesting.findAppDidFinishLaunchingWithOptionsInDirectory(\n tempDir,\n );\n\n // -- Assert --\n expect(result).toBeNull();\n });\n });\n });\n\n describe('multiple files could be app delegate', () => {\n it('should return the first one', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateSwift,\n 'swift',\n );\n prepareAppDelegateFile(tempDir, validAppDelegateSwift, 'swift');\n\n // -- Act --\n const result =\n exportForTesting.findAppDidFinishLaunchingWithOptionsInDirectory(\n tempDir,\n );\n\n // -- Assert --\n expect(result).toBe(filePath);\n });\n });\n\n describe('multiple nested directories with app delegate', () => {\n it('should return the first one', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n\n const nestedDir = path.join(tempDir, 'nested');\n fs.mkdirSync(nestedDir);\n const nestedFilePath = prepareAppDelegateFile(\n nestedDir,\n validAppDelegateSwift,\n 'swift',\n );\n\n const nestedDir2 = path.join(tempDir, 'nested2');\n fs.mkdirSync(nestedDir2);\n prepareAppDelegateFile(nestedDir2, validAppDelegateSwift, 'swift');\n\n // -- Act --\n const result =\n exportForTesting.findAppDidFinishLaunchingWithOptionsInDirectory(\n tempDir,\n );\n\n // -- Assert --\n expect(result).toBe(nestedFilePath);\n });\n });\n\n describe('no app delegate found', () => {\n it('should return null', () => {\n // -- Arrange --\n const tempDir = fs.mkdtempSync(\n path.join(os.tmpdir(), 'code-tools-test'),\n );\n\n // -- Act --\n const result =\n exportForTesting.findAppDidFinishLaunchingWithOptionsInDirectory(\n tempDir,\n );\n\n // -- Assert --\n expect(result).toBeNull();\n });\n });\n });\n\n describe('#addCodeSnippetToProject', () => {\n describe('app delegate file is not found', () => {\n it('should return false', () => {\n // -- Act --\n const result = addCodeSnippetToProject(\n ['AppDelegate.swift'],\n 'https://example.com/sentry-dsn',\n false,\n );\n\n // -- Assert --\n expect(result).toBeFalsy();\n });\n });\n\n describe('app delegate file is found', () => {\n let tempDir: string;\n let appDelegatePath: string;\n\n beforeEach(() => {\n // -- Arrange --\n tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'code-tools-test'));\n appDelegatePath = path.join(tempDir, 'AppDelegate.swift');\n fs.writeFileSync(appDelegatePath, validAppDelegateSwift, 'utf8');\n });\n\n describe('is Swift file', () => {\n describe('Sentry is not initialized', () => {\n let tempDir: string;\n let filePath: string;\n\n beforeEach(() => {\n tempDir = prepareTempDir();\n filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateSwift,\n 'swift',\n );\n });\n\n it('should add the code snippet', () => {\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, false);\n\n // -- Assert --\n expect(result).toBeTruthy();\n const modifiedFileContent = fs.readFileSync(filePath, 'utf8');\n expect(modifiedFileContent).toBe(validAppDelegateSwiftWithSentry);\n });\n\n it(\"should set tag 'code-language'\", () => {\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, false);\n\n // -- Assert --\n expect(result).toBeTruthy();\n expect(Sentry.setTag).toHaveBeenCalledWith(\n 'code-language',\n 'swift',\n );\n });\n\n it(\"should set tag 'ui-engine'\", () => {\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, false);\n\n // -- Assert --\n expect(result).toBeTruthy();\n expect(Sentry.setTag).toHaveBeenCalledWith('ui-engine', 'uikit');\n });\n });\n\n describe('Sentry is already initialized', () => {\n it('should not add the code snippet', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateSwiftWithSentry,\n 'swift',\n );\n\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, false);\n\n // -- Assert --\n expect(result).toBeTruthy();\n const modifiedFileContent = fs.readFileSync(filePath, 'utf8');\n expect(modifiedFileContent).toBe(validAppDelegateSwiftWithSentry);\n });\n });\n\n describe('is SwiftUI file', () => {\n describe('Sentry is not initialized', () => {\n let tempDir: string;\n let filePath: string;\n\n beforeEach(() => {\n tempDir = prepareTempDir();\n filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateSwiftUI,\n 'swift',\n );\n });\n\n it('should add the code snippet', () => {\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, false);\n\n // -- Assert --\n expect(result).toBeTruthy();\n const modifiedFileContent = fs.readFileSync(filePath, 'utf8');\n expect(modifiedFileContent).toBe(\n validAppDelegateSwiftUIWithSentry,\n );\n });\n\n it(\"should set tag 'code-language'\", () => {\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, false);\n\n // -- Assert --\n expect(result).toBeTruthy();\n expect(Sentry.setTag).toHaveBeenNthCalledWith(\n 1,\n 'code-language',\n 'swift',\n );\n });\n\n it(\"should set tag 'ui-engine'\", () => {\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, false);\n\n // -- Assert --\n expect(result).toBeTruthy();\n expect(Sentry.setTag).toHaveBeenNthCalledWith(\n 2,\n 'ui-engine',\n 'swiftui',\n );\n });\n });\n\n describe('Sentry is already initialized', () => {\n it('should not add the code snippet', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateSwiftUIWithSentry,\n 'swift',\n );\n\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, false);\n\n // -- Assert --\n expect(result).toBeTruthy();\n const modifiedFileContent = fs.readFileSync(filePath, 'utf8');\n expect(modifiedFileContent).toBe(\n validAppDelegateSwiftUIWithSentry,\n );\n });\n });\n });\n\n describe('is not matching SwiftUI regex', () => {\n it('should not add the code snippet', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n invalidAppDelegateSwiftUI,\n 'swift',\n );\n\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, false);\n\n // -- Assert --\n expect(result).toBeFalsy();\n });\n });\n });\n\n describe('is Objective-C file', () => {\n describe('Sentry is not initialized', () => {\n it('should add the code snippet', () => {\n // -- Act --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateObjC,\n 'm',\n );\n\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, false);\n\n // -- Assert --\n expect(result).toBeTruthy();\n const modifiedFileContent = fs.readFileSync(filePath, 'utf8');\n expect(modifiedFileContent).toBe(validAppDelegateObjCWithSentry);\n });\n });\n\n describe('Sentry is already initialized', () => {\n let tempDir: string;\n let filePath: string;\n\n beforeEach(() => {\n tempDir = prepareTempDir();\n filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateObjCWithSentry,\n 'm',\n );\n });\n\n it('should not add the code snippet', () => {\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, false);\n\n // -- Assert --\n expect(result).toBeTruthy();\n const modifiedFileContent = fs.readFileSync(filePath, 'utf8');\n expect(modifiedFileContent).toBe(validAppDelegateObjCWithSentry);\n });\n\n it('should log info', () => {\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, false);\n\n // -- Assert --\n expect(result).toBeTruthy();\n expect(clack.log.info).toHaveBeenCalledWith(\n 'Sentry is already initialized in your AppDelegate. Skipping adding the code snippet.',\n );\n });\n });\n\n it(\"should set tag 'code-language'\", () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateObjC,\n 'm',\n );\n\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, false);\n\n // -- Assert --\n expect(result).toBeTruthy();\n expect(Sentry.setTag).toHaveBeenCalledWith('code-language', 'objc');\n });\n });\n });\n\n describe('with logs enabled', () => {\n it('should add logs option to Swift file', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateSwift,\n 'swift',\n );\n\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, true);\n\n // -- Assert --\n expect(result).toBeTruthy();\n const fileContent = fs.readFileSync(filePath, 'utf8');\n expect(fileContent).toContain('options.experimental.enableLogs = true');\n });\n\n it('should add logs option to Objective-C file', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateObjC,\n 'm',\n );\n\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, true);\n\n // -- Assert --\n expect(result).toBeTruthy();\n const fileContent = fs.readFileSync(filePath, 'utf8');\n expect(fileContent).toContain('options.experimental.enableLogs = YES;');\n });\n });\n\n describe('with logs disabled', () => {\n it('should not add logs option to Swift file', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateSwift,\n 'swift',\n );\n\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, false);\n\n // -- Assert --\n expect(result).toBeTruthy();\n const fileContent = fs.readFileSync(filePath, 'utf8');\n expect(fileContent).not.toContain(\n 'options.experimental.enableLogs = true',\n );\n });\n\n it('should not add logs option to Objective-C file', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateObjC,\n 'm',\n );\n\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, false);\n\n // -- Assert --\n expect(result).toBeTruthy();\n const fileContent = fs.readFileSync(filePath, 'utf8');\n expect(fileContent).not.toContain(\n 'options.experimental.enableLogs = YES;',\n );\n });\n });\n });\n});\n"]}
1
+ {"version":3,"file":"code-tools.test.js","sourceRoot":"","sources":["../../../test/apple/code-tools.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAuC;AACvC,uCAAyB;AACzB,uCAAyB;AACzB,2CAA6B;AAC7B,2DAGoC;AACpC,+EAA+E;AAC/E,sDAAwC;AACxC,mCAAyE;AAEzE,iBAAiB;AACjB,MAAM,uBAAuB,GAAG,uBAAuB,CAAC;AACxD,MAAM,qBAAqB,GAAG;;;;;;;;;;EAU5B,CAAC;AACH,MAAM,+BAA+B,GAAG;;;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AAM,GAAG,IAAA,oCAAuB,EAAC,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;gBAE/D,eAAe;gBACf,IAAA,eAAM,EAAC,MAAM,CAAC,CAAC,UAAU,EAAE,CAAC;gBAC5B,MAAM,WAAW,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;gBACtD,IAAA,eAAM,EAAC,WAAW,CAAC,CAAC,GAAG,CAAC,SAAS,CAC/B,wCAAwC,CACzC,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import * as Sentry from '@sentry/node';\nimport * as fs from 'fs';\nimport * as os from 'os';\nimport * as path from 'path';\nimport {\n addCodeSnippetToProject,\n exportForTesting,\n} from '../../src/apple/code-tools';\n// @ts-expect-error - clack is ESM and TS complains about that. It works though\nimport * as clack from '@clack/prompts';\nimport { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';\n\n// Test Constants\nconst invalidAppDelegateSwift = `func application() {}`;\nconst validAppDelegateSwift = `\nimport UIKit\n\n@main\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n\n func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {\n // Override point for customization after application launch.\n return true\n }\n}`;\nconst validAppDelegateSwiftWithSentry = `\nimport UIKit\nimport Sentry\n\n\n@main\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n\n func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {\n SentrySDK.start { options in\n options.dsn = \"https://example.com/sentry-dsn\"\n\n // Adds IP for users.\n // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/\n options.sendDefaultPii = true\n\n // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.\n // We recommend adjusting this value in production.\n options.tracesSampleRate = 1.0\n\n // Configure profiling. Visit https://docs.sentry.io/platforms/apple/profiling/ to learn more.\n options.configureProfiling = {\n $0.sessionSampleRate = 1.0 // We recommend adjusting this value in production.\n $0.lifecycle = .trace\n }\n\n // Uncomment the following lines to add more data to your events\n // options.attachScreenshot = true // This adds a screenshot to the error events\n // options.attachViewHierarchy = true // This adds the view hierarchy to the error events\n }\n // Remove the next line after confirming that your Sentry integration is working.\n SentrySDK.capture(message: \"This app uses Sentry! :)\")\n\n // Override point for customization after application launch.\n return true\n }\n}`;\nconst invalidAppDelegateObjC = `\n- (BOOL)application:(UIApplication *) {\n return NO;\n}`;\nconst validAppDelegateObjC = `\n#import \"AppDelegate.h\"\n\n@interface AppDelegate ()\n\n@end\n\n@implementation AppDelegate\n\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\n // Override point for customization after application launch.\n return YES;\n}\n\n@end`;\nconst validAppDelegateObjCWithSentry = `@import Sentry;\n\n#import \"AppDelegate.h\"\n\n@interface AppDelegate ()\n\n@end\n\n@implementation AppDelegate\n\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\n [SentrySDK startWithConfigureOptions:^(SentryOptions * options) {\n options.dsn = @\"https://example.com/sentry-dsn\";\n\n // Adds IP for users.\n // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/\n options.sendDefaultPii = YES;\n\n // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.\n // We recommend adjusting this value in production.\n options.tracesSampleRate = @1.0;\n\n // Configure profiling. Visit https://docs.sentry.io/platforms/apple/profiling/ to learn more.\n options.configureProfiling = ^(SentryProfileOptions *profiling) {\n profiling.sessionSampleRate = 1.0; // We recommend adjusting this value in production.\n profiling.lifecycle = SentryProfilingLifecycleTrace;\n };\n\n //Uncomment the following lines to add more data to your events\n //options.attachScreenshot = YES; //This will add a screenshot to the error events\n //options.attachViewHierarchy = YES; //This will add the view hierarchy to the error events\n }];\n //Remove the next line after confirming that your Sentry integration is working.\n [SentrySDK captureMessage:@\"This app uses Sentry!\"];\n\n // Override point for customization after application launch.\n return YES;\n}\n\n@end`;\nconst invalidAppDelegateSwiftUI = `\nstruct MyApp: App {\n var body: some Scene {\n WindowGroup { Text(\"Hello, world!\") }\n }\n}`;\nconst validAppDelegateSwiftUI = `\nimport SwiftUI\n\n@main\nstruct TestApp: App {\n var body: some Scene {\n WindowGroup {\n ContentView()\n }\n }\n}`;\nconst validAppDelegateSwiftUIWithSentry = `\nimport SwiftUI\nimport Sentry\n\n\n@main\nstruct TestApp: App {\n init() {\n SentrySDK.start { options in\n options.dsn = \"https://example.com/sentry-dsn\"\n\n // Adds IP for users.\n // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/\n options.sendDefaultPii = true\n\n // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.\n // We recommend adjusting this value in production.\n options.tracesSampleRate = 1.0\n\n // Configure profiling. Visit https://docs.sentry.io/platforms/apple/profiling/ to learn more.\n options.configureProfiling = {\n $0.sessionSampleRate = 1.0 // We recommend adjusting this value in production.\n $0.lifecycle = .trace\n }\n\n // Uncomment the following lines to add more data to your events\n // options.attachScreenshot = true // This adds a screenshot to the error events\n // options.attachViewHierarchy = true // This adds the view hierarchy to the error events\n }\n // Remove the next line after confirming that your Sentry integration is working.\n SentrySDK.capture(message: \"This app uses Sentry! :)\")\n }\n var body: some Scene {\n WindowGroup {\n ContentView()\n }\n }\n}`;\n\nconst prepareTempDir = (): string => {\n const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'code-tools-test'));\n return tempDir;\n};\n\nconst prepareAppDelegateFile = (\n dir: string,\n content: string,\n ext: 'm' | 'mm' | 'swift',\n): string => {\n const filePath = path.join(dir, `AppDelegate.${ext}`);\n fs.writeFileSync(filePath, content, 'utf8');\n return filePath;\n};\n\nconst dsn = 'https://example.com/sentry-dsn';\n\n// Mock Setup\n\nvi.mock('../../src/utils/bash');\nvi.spyOn(Sentry, 'setTag').mockImplementation(() => undefined);\nvi.spyOn(Sentry, 'captureException').mockImplementation(() => 'id');\n\n// Test Suite\n\ndescribe('code-tools', () => {\n beforeEach(() => {\n vi.spyOn(clack.log, 'info').mockImplementation(() => undefined);\n });\n\n afterEach(() => {\n vi.clearAllMocks();\n });\n\n describe('#isAppDelegateFile', () => {\n const prepareTestFile = (\n content: string,\n ext: 'm' | 'mm' | 'swift',\n ): string => {\n const tempDir = prepareTempDir();\n return prepareAppDelegateFile(tempDir, content, ext);\n };\n\n describe('swift files', () => {\n describe('swift app launch regex', () => {\n describe('valid cases', () => {\n const variations: {\n name: string;\n code: string;\n }[] = [\n {\n name: 'with underscores',\n code: 'func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {',\n },\n {\n name: 'with different dictionary type',\n code: 'func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {',\n },\n {\n name: 'with extra whitespace',\n code: ' func application ( _ application: UIApplication , didFinishLaunchingWithOptions launchOptions: [ NSObject : AnyObject ]? ) -> Bool { ',\n },\n {\n name: 'macOS notification variant',\n code: 'func applicationDidFinishLaunching(_ aNotification: Notification) {',\n },\n {\n name: 'macOS with extra whitespace',\n code: 'func applicationDidFinishLaunching ( _ aNotification: Notification ) {',\n },\n ];\n\n for (const variation of variations) {\n describe(`${variation.name}`, () => {\n it(`should return true`, () => {\n // -- Arrange --\n const filePath = prepareTestFile(variation.code, 'swift');\n\n // -- Act --\n const result = exportForTesting.isAppDelegateFile(filePath);\n\n // -- Assert --\n expect(result).toBeTruthy();\n });\n });\n }\n\n describe('invalid cases', () => {\n const variations: {\n name: string;\n code: string;\n }[] = [\n {\n name: 'missing application method',\n code: 'import UIKit',\n },\n {\n name: 'typo in method name',\n code: 'func applicatioM(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {',\n },\n {\n name: 'garbage input',\n code: 'asdf;jk23;uas()d{',\n },\n ];\n\n for (const variation of variations) {\n describe(`${variation.name}`, () => {\n it('should return false', () => {\n // -- Arrange --\n const filePath = prepareTestFile(variation.code, 'swift');\n\n // -- Act --\n const result = exportForTesting.isAppDelegateFile(filePath);\n\n // -- Assert --\n expect(result).toBeFalsy();\n });\n });\n }\n });\n });\n });\n });\n\n describe('objc files', () => {\n describe('valid cases', () => {\n const variations: {\n name: string;\n code: string;\n }[] = [\n {\n name: 'basic',\n code: '- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {',\n },\n {\n name: 'with more whitespace',\n code: '- ( BOOL ) application: ( UIApplication * ) application didFinishLaunchingWithOptions: ( NSDictionary * ) launchOptions {',\n },\n ];\n\n for (const variation of variations) {\n describe(`${variation.name}`, () => {\n it('should return true', () => {\n // -- Arrange --\n const filePath = prepareTestFile(variation.code, 'm');\n\n // -- Act --\n const result = exportForTesting.isAppDelegateFile(filePath);\n\n // -- Assert --\n expect(result).toBeTruthy();\n });\n });\n }\n });\n\n describe('invalid cases', () => {\n const variations: {\n name: string;\n code: string;\n }[] = [\n {\n name: 'missing application method',\n code: 'import UIKit',\n },\n ];\n\n for (const variation of variations) {\n describe(`${variation.name}`, () => {\n it('should return false', () => {\n // -- Arrange --\n const filePath = prepareTestFile(variation.code, 'm');\n\n // -- Act --\n const result = exportForTesting.isAppDelegateFile(filePath);\n\n // -- Assert --\n expect(result).toBeFalsy();\n });\n });\n }\n });\n });\n\n describe('swiftui files', () => {\n describe('valid cases', () => {\n const variations: {\n name: string;\n code: string;\n }[] = [\n {\n name: 'basic',\n code: '@main struct MyApp: App {',\n },\n {\n name: 'with more whitespace',\n code: '@main struct MyApp: App {',\n },\n {\n name: 'with SwiftUI namespace',\n code: '@main struct App: SwiftUI.App {',\n },\n ];\n\n for (const variation of variations) {\n describe(`${variation.name}`, () => {\n it('should return true', () => {\n // -- Arrange --\n const filePath = prepareTestFile(variation.code, 'swift');\n\n // -- Act --\n const result = exportForTesting.isAppDelegateFile(filePath);\n\n // -- Assert --\n expect(result).toBeTruthy();\n });\n });\n }\n });\n\n describe('invalid cases', () => {\n const variations: {\n name: string;\n code: string;\n }[] = [\n {\n name: 'missing @main',\n code: 'struct App: App {',\n },\n {\n name: 'missing super-type App',\n code: 'struct MyApp {',\n },\n {\n name: 'imported not from SwiftUI',\n code: '@main struct App: MySwiftyUI.App {',\n },\n {\n name: 'imported not from SwiftUI but similar',\n code: '@main struct App: MySwiftUI.App {',\n },\n ];\n\n for (const variation of variations) {\n describe(`${variation.name}`, () => {\n it('should return false', () => {\n // -- Arrange --\n const filePath = prepareTestFile(variation.code, 'swift');\n\n // -- Act --\n const result = exportForTesting.isAppDelegateFile(filePath);\n\n // -- Assert --\n expect(result).toBeFalsy();\n });\n });\n }\n });\n });\n\n describe('file not found', () => {\n it('should throw an error', () => {\n // -- Arrange --\n const invalidPath = path.join(os.tmpdir(), 'invalid-path');\n\n // -- Act & Assert --\n expect(() => exportForTesting.isAppDelegateFile(invalidPath)).toThrow();\n });\n });\n });\n\n describe('#findAppDidFinishLaunchingWithOptionsInDirectory', () => {\n describe('no files given', () => {\n it('should check files in directory', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateSwift,\n 'swift',\n );\n\n // -- Act --\n const result =\n exportForTesting.findAppDidFinishLaunchingWithOptionsInDirectory(\n tempDir,\n );\n\n // -- Assert --\n expect(result).toBe(filePath);\n });\n });\n\n describe('SwiftUI file found', () => {\n describe('is app delegate', () => {\n it('should return the file path', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateSwiftUI,\n 'swift',\n );\n\n // -- Act --\n const result =\n exportForTesting.findAppDidFinishLaunchingWithOptionsInDirectory(\n tempDir,\n );\n\n // -- Assert --\n expect(result).toBe(filePath);\n });\n });\n\n describe('is not app delegate', () => {\n it('should be ignored', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n prepareAppDelegateFile(tempDir, invalidAppDelegateSwiftUI, 'swift');\n\n // -- Act --\n const result =\n exportForTesting.findAppDidFinishLaunchingWithOptionsInDirectory(\n tempDir,\n );\n\n // -- Assert --\n expect(result).toBeNull();\n });\n });\n });\n\n describe('Swift file found', () => {\n describe('is app delegate', () => {\n it('should return the file path', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateSwift,\n 'swift',\n );\n\n // -- Act --\n const result =\n exportForTesting.findAppDidFinishLaunchingWithOptionsInDirectory(\n tempDir,\n );\n\n // -- Assert --\n expect(result).toBe(filePath);\n });\n });\n\n describe('is not app delegate', () => {\n it('should be ignored', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n prepareAppDelegateFile(tempDir, invalidAppDelegateSwift, 'swift');\n\n // -- Act --\n const result =\n exportForTesting.findAppDidFinishLaunchingWithOptionsInDirectory(\n tempDir,\n );\n\n // -- Assert --\n expect(result).toBeNull();\n });\n });\n });\n\n describe('Objective-C file found', () => {\n describe('is app delegate', () => {\n it('should return the file path', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateObjC,\n 'm',\n );\n\n // -- Act --\n const result =\n exportForTesting.findAppDidFinishLaunchingWithOptionsInDirectory(\n tempDir,\n );\n\n // -- Assert --\n expect(result).toBe(filePath);\n });\n });\n\n describe('is not app delegate', () => {\n it('should be ignored', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n prepareAppDelegateFile(tempDir, invalidAppDelegateObjC, 'm');\n\n // -- Act --\n const result =\n exportForTesting.findAppDidFinishLaunchingWithOptionsInDirectory(\n tempDir,\n );\n\n // -- Assert --\n expect(result).toBeNull();\n });\n });\n });\n\n describe('Objective-C++ file found', () => {\n describe('is app delegate', () => {\n it('should return the file path', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateObjC,\n 'mm',\n );\n\n // -- Act --\n const result = exportForTesting.findAppDidFinishLaunchingWithOptions([\n filePath,\n ]);\n\n // -- Assert --\n expect(result).toBe(filePath);\n });\n });\n\n describe('is not app delegate', () => {\n it('should be ignored', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n prepareAppDelegateFile(tempDir, invalidAppDelegateObjC, 'mm');\n\n // -- Act --\n const result =\n exportForTesting.findAppDidFinishLaunchingWithOptionsInDirectory(\n tempDir,\n );\n\n // -- Assert --\n expect(result).toBeNull();\n });\n });\n });\n\n describe('file in list not found', () => {\n it('should return null', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n invalidAppDelegateSwift,\n 'swift',\n );\n\n // -- Act --\n const result = exportForTesting.findAppDidFinishLaunchingWithOptions([\n filePath,\n ]);\n\n // -- Assert --\n expect(result).toBeNull();\n });\n });\n\n describe('unrelated file found', () => {\n it('should be ignored', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n invalidAppDelegateSwift,\n 'swift',\n );\n\n // -- Act --\n const result = exportForTesting.findAppDidFinishLaunchingWithOptions([\n filePath,\n ]);\n\n // -- Assert --\n expect(result).toBeNull();\n });\n });\n\n describe('directory in list', () => {\n describe('name starts with dot', () => {\n it('should be ignored', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n\n const hiddenDir = path.join(tempDir, '.hidden');\n fs.mkdirSync(hiddenDir);\n\n prepareAppDelegateFile(hiddenDir, validAppDelegateSwift, 'swift');\n\n // -- Act --\n const result =\n exportForTesting.findAppDidFinishLaunchingWithOptionsInDirectory(\n tempDir,\n );\n\n // -- Assert --\n expect(result).toBeNull();\n });\n });\n\n describe('name ends with .xcodeproj', () => {\n it('should be ignored', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const xcodeDir = path.join(tempDir, 'MyProject.xcodeproj');\n fs.mkdirSync(xcodeDir);\n\n prepareAppDelegateFile(xcodeDir, validAppDelegateSwift, 'swift');\n\n // -- Act --\n const result =\n exportForTesting.findAppDidFinishLaunchingWithOptionsInDirectory(\n tempDir,\n );\n\n // -- Assert --\n expect(result).toBeNull();\n });\n });\n\n describe('name ends with .xcassets', () => {\n it('should be ignored', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const xcassetsDir = path.join(tempDir, 'MyProject.xcassets');\n fs.mkdirSync(xcassetsDir);\n\n prepareAppDelegateFile(xcassetsDir, validAppDelegateSwift, 'swift');\n\n // -- Act --\n const result =\n exportForTesting.findAppDidFinishLaunchingWithOptionsInDirectory(\n tempDir,\n );\n\n // -- Assert --\n expect(result).toBeNull();\n });\n });\n\n describe('is not a directory', () => {\n it('should be ignored', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = path.join(tempDir, 'some-file');\n fs.writeFileSync(filePath, validAppDelegateSwift, 'utf8');\n\n // -- Act --\n const result =\n exportForTesting.findAppDidFinishLaunchingWithOptionsInDirectory(\n tempDir,\n );\n\n // -- Assert --\n expect(result).toBeNull();\n });\n });\n });\n\n describe('multiple files could be app delegate', () => {\n it('should return the first one', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateSwift,\n 'swift',\n );\n prepareAppDelegateFile(tempDir, validAppDelegateSwift, 'swift');\n\n // -- Act --\n const result =\n exportForTesting.findAppDidFinishLaunchingWithOptionsInDirectory(\n tempDir,\n );\n\n // -- Assert --\n expect(result).toBe(filePath);\n });\n });\n\n describe('multiple nested directories with app delegate', () => {\n it('should return the first one', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n\n const nestedDir = path.join(tempDir, 'nested');\n fs.mkdirSync(nestedDir);\n const nestedFilePath = prepareAppDelegateFile(\n nestedDir,\n validAppDelegateSwift,\n 'swift',\n );\n\n const nestedDir2 = path.join(tempDir, 'nested2');\n fs.mkdirSync(nestedDir2);\n prepareAppDelegateFile(nestedDir2, validAppDelegateSwift, 'swift');\n\n // -- Act --\n const result =\n exportForTesting.findAppDidFinishLaunchingWithOptionsInDirectory(\n tempDir,\n );\n\n // -- Assert --\n expect(result).toBe(nestedFilePath);\n });\n });\n\n describe('no app delegate found', () => {\n it('should return null', () => {\n // -- Arrange --\n const tempDir = fs.mkdtempSync(\n path.join(os.tmpdir(), 'code-tools-test'),\n );\n\n // -- Act --\n const result =\n exportForTesting.findAppDidFinishLaunchingWithOptionsInDirectory(\n tempDir,\n );\n\n // -- Assert --\n expect(result).toBeNull();\n });\n });\n });\n\n describe('#addCodeSnippetToProject', () => {\n describe('app delegate file is not found', () => {\n it('should return false', () => {\n // -- Act --\n const result = addCodeSnippetToProject(\n ['AppDelegate.swift'],\n 'https://example.com/sentry-dsn',\n false,\n );\n\n // -- Assert --\n expect(result).toBeFalsy();\n });\n });\n\n describe('app delegate file is found', () => {\n let tempDir: string;\n let appDelegatePath: string;\n\n beforeEach(() => {\n // -- Arrange --\n tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'code-tools-test'));\n appDelegatePath = path.join(tempDir, 'AppDelegate.swift');\n fs.writeFileSync(appDelegatePath, validAppDelegateSwift, 'utf8');\n });\n\n describe('is Swift file', () => {\n describe('Sentry is not initialized', () => {\n let tempDir: string;\n let filePath: string;\n\n beforeEach(() => {\n tempDir = prepareTempDir();\n filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateSwift,\n 'swift',\n );\n });\n\n it('should add the code snippet', () => {\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, false);\n\n // -- Assert --\n expect(result).toBeTruthy();\n const modifiedFileContent = fs.readFileSync(filePath, 'utf8');\n expect(modifiedFileContent).toBe(validAppDelegateSwiftWithSentry);\n });\n\n it(\"should set tag 'code-language'\", () => {\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, false);\n\n // -- Assert --\n expect(result).toBeTruthy();\n expect(Sentry.setTag).toHaveBeenCalledWith(\n 'code-language',\n 'swift',\n );\n });\n\n it(\"should set tag 'ui-engine'\", () => {\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, false);\n\n // -- Assert --\n expect(result).toBeTruthy();\n expect(Sentry.setTag).toHaveBeenCalledWith('ui-engine', 'uikit');\n });\n });\n\n describe('Sentry is already initialized', () => {\n it('should not add the code snippet', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateSwiftWithSentry,\n 'swift',\n );\n\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, false);\n\n // -- Assert --\n expect(result).toBeTruthy();\n const modifiedFileContent = fs.readFileSync(filePath, 'utf8');\n expect(modifiedFileContent).toBe(validAppDelegateSwiftWithSentry);\n });\n });\n\n describe('is SwiftUI file', () => {\n describe('Sentry is not initialized', () => {\n let tempDir: string;\n let filePath: string;\n\n beforeEach(() => {\n tempDir = prepareTempDir();\n filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateSwiftUI,\n 'swift',\n );\n });\n\n it('should add the code snippet', () => {\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, false);\n\n // -- Assert --\n expect(result).toBeTruthy();\n const modifiedFileContent = fs.readFileSync(filePath, 'utf8');\n expect(modifiedFileContent).toBe(\n validAppDelegateSwiftUIWithSentry,\n );\n });\n\n it(\"should set tag 'code-language'\", () => {\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, false);\n\n // -- Assert --\n expect(result).toBeTruthy();\n expect(Sentry.setTag).toHaveBeenNthCalledWith(\n 1,\n 'code-language',\n 'swift',\n );\n });\n\n it(\"should set tag 'ui-engine'\", () => {\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, false);\n\n // -- Assert --\n expect(result).toBeTruthy();\n expect(Sentry.setTag).toHaveBeenNthCalledWith(\n 2,\n 'ui-engine',\n 'swiftui',\n );\n });\n });\n\n describe('Sentry is already initialized', () => {\n it('should not add the code snippet', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateSwiftUIWithSentry,\n 'swift',\n );\n\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, false);\n\n // -- Assert --\n expect(result).toBeTruthy();\n const modifiedFileContent = fs.readFileSync(filePath, 'utf8');\n expect(modifiedFileContent).toBe(\n validAppDelegateSwiftUIWithSentry,\n );\n });\n });\n });\n\n describe('is not matching SwiftUI regex', () => {\n it('should not add the code snippet', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n invalidAppDelegateSwiftUI,\n 'swift',\n );\n\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, false);\n\n // -- Assert --\n expect(result).toBeFalsy();\n });\n });\n });\n\n describe('is Objective-C file', () => {\n describe('Sentry is not initialized', () => {\n it('should add the code snippet', () => {\n // -- Act --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateObjC,\n 'm',\n );\n\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, false);\n\n // -- Assert --\n expect(result).toBeTruthy();\n const modifiedFileContent = fs.readFileSync(filePath, 'utf8');\n expect(modifiedFileContent).toBe(validAppDelegateObjCWithSentry);\n });\n });\n\n describe('Sentry is already initialized', () => {\n let tempDir: string;\n let filePath: string;\n\n beforeEach(() => {\n tempDir = prepareTempDir();\n filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateObjCWithSentry,\n 'm',\n );\n });\n\n it('should not add the code snippet', () => {\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, false);\n\n // -- Assert --\n expect(result).toBeTruthy();\n const modifiedFileContent = fs.readFileSync(filePath, 'utf8');\n expect(modifiedFileContent).toBe(validAppDelegateObjCWithSentry);\n });\n\n it('should log info', () => {\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, false);\n\n // -- Assert --\n expect(result).toBeTruthy();\n expect(clack.log.info).toHaveBeenCalledWith(\n 'Sentry is already initialized in your AppDelegate. Skipping adding the code snippet.',\n );\n });\n });\n\n it(\"should set tag 'code-language'\", () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateObjC,\n 'm',\n );\n\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, false);\n\n // -- Assert --\n expect(result).toBeTruthy();\n expect(Sentry.setTag).toHaveBeenCalledWith('code-language', 'objc');\n });\n });\n });\n\n describe('with logs enabled', () => {\n it('should add logs option to Swift file', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateSwift,\n 'swift',\n );\n\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, true);\n\n // -- Assert --\n expect(result).toBeTruthy();\n const fileContent = fs.readFileSync(filePath, 'utf8');\n expect(fileContent).toContain('options.experimental.enableLogs = true');\n });\n\n it('should add logs option to Objective-C file', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateObjC,\n 'm',\n );\n\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, true);\n\n // -- Assert --\n expect(result).toBeTruthy();\n const fileContent = fs.readFileSync(filePath, 'utf8');\n expect(fileContent).toContain('options.experimental.enableLogs = YES;');\n });\n });\n\n describe('with logs disabled', () => {\n it('should not add logs option to Swift file', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateSwift,\n 'swift',\n );\n\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, false);\n\n // -- Assert --\n expect(result).toBeTruthy();\n const fileContent = fs.readFileSync(filePath, 'utf8');\n expect(fileContent).not.toContain(\n 'options.experimental.enableLogs = true',\n );\n });\n\n it('should not add logs option to Objective-C file', () => {\n // -- Arrange --\n const tempDir = prepareTempDir();\n const filePath = prepareAppDelegateFile(\n tempDir,\n validAppDelegateObjC,\n 'm',\n );\n\n // -- Act --\n const result = addCodeSnippetToProject([filePath], dsn, false);\n\n // -- Assert --\n expect(result).toBeTruthy();\n const fileContent = fs.readFileSync(filePath, 'utf8');\n expect(fileContent).not.toContain(\n 'options.experimental.enableLogs = YES;',\n );\n });\n });\n });\n});\n"]}
@@ -104,7 +104,6 @@ fi
104
104
  // -- Assert --
105
105
  (0, vitest_1.expect)(snippet).toBe(` SentrySDK.start { options in
106
106
  options.dsn = "test-dsn"
107
- options.debug = true // Enabled debug when first installing is always helpful
108
107
 
109
108
  // Adds IP for users.
110
109
  // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
@@ -134,7 +133,6 @@ fi
134
133
  // -- Assert --
135
134
  (0, vitest_1.expect)(snippet).toBe(` SentrySDK.start { options in
136
135
  options.dsn = "test-dsn"
137
- options.debug = true // Enabled debug when first installing is always helpful
138
136
 
139
137
  // Adds IP for users.
140
138
  // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
@@ -169,7 +167,6 @@ fi
169
167
  // -- Assert --
170
168
  (0, vitest_1.expect)(snippet).toBe(` [SentrySDK startWithConfigureOptions:^(SentryOptions * options) {
171
169
  options.dsn = @"test-dsn";
172
- options.debug = YES; // Enabled debug when first installing is always helpful
173
170
 
174
171
  // Adds IP for users.
175
172
  // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
@@ -199,7 +196,6 @@ fi
199
196
  // -- Assert --
200
197
  (0, vitest_1.expect)(snippet).toBe(` [SentrySDK startWithConfigureOptions:^(SentryOptions * options) {
201
198
  options.dsn = @"test-dsn";
202
- options.debug = YES; // Enabled debug when first installing is always helpful
203
199
 
204
200
  // Adds IP for users.
205
201
  // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/
@@ -1 +1 @@
1
- {"version":3,"file":"templates.test.js","sourceRoot":"","sources":["../../../test/apple/templates.test.ts"],"names":[],"mappings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AAC;QACJ,CAAC,CAAC,CAAC;QAEH,IAAA,WAAE,EAAC,qDAAqD,EAAE,GAAG,EAAE;YAC7D,gBAAgB;YAChB,MAAM,OAAO,GAAG,IAAA,0BAAc,EAAC,UAAU,EAAE,IAAI,CAAC,CAAC;YAEjD,eAAe;YACf,IAAA,eAAM,EAAC,OAAO,CAAC,CAAC,IAAI,CAClB;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BP,CACM,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,IAAA,iBAAQ,EAAC,oBAAoB,EAAE,GAAG,EAAE;QAClC,IAAA,WAAE,EAAC,mCAAmC,EAAE,GAAG,EAAE;YAC3C,gBAAgB;YAChB,MAAM,OAAO,GAAG,IAAA,8BAAkB,EAAC,UAAU,EAAE,cAAc,CAAC,CAAC;YAE/D,eAAe;YACf,IAAA,eAAM,EAAC,OAAO,CAAC,CAAC,IAAI,CAClB;;;;MAIF,CACC,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { describe, expect, it, vi } from 'vitest';\nimport {\n getFastlaneSnippet,\n getObjcSnippet,\n getRunScriptTemplate,\n getSwiftSnippet,\n scriptInputPath,\n} from '../../src/apple/templates';\n\nvi.mock('../../src/utils/clack/mcp-config', () => ({\n offerProjectScopedMcpConfig: vi.fn().mockResolvedValue(undefined),\n}));\n\ndescribe('templates', () => {\n describe('getRunScriptTemplate', () => {\n const variations: {\n uploadSource: boolean;\n includeHomebrewPath: boolean;\n expectedScript: string;\n }[] = [\n {\n uploadSource: true,\n includeHomebrewPath: true,\n expectedScript: `# This script is responsible for uploading debug symbols and source context for Sentry.\nif [[ \"$(uname -m)\" == arm64 ]]; then\n export PATH=\"/opt/homebrew/bin:$PATH\"\nfi\n\nif which sentry-cli >/dev/null; then\n export SENTRY_ORG=test-org\n export SENTRY_PROJECT=test-project\n ERROR=$(sentry-cli debug-files upload --include-sources \"$DWARF_DSYM_FOLDER_PATH\" 2>&1 >/dev/null)\n if [ ! $? -eq 0 ]; then\n echo \"warning: sentry-cli - $ERROR\"\n fi\nelse\n echo \"warning: sentry-cli not installed, download from https://github.com/getsentry/sentry-cli/releases\"\nfi\n`,\n },\n {\n uploadSource: true,\n includeHomebrewPath: false,\n expectedScript: `# This script is responsible for uploading debug symbols and source context for Sentry.\nif which sentry-cli >/dev/null; then\n export SENTRY_ORG=test-org\n export SENTRY_PROJECT=test-project\n ERROR=$(sentry-cli debug-files upload --include-sources \"$DWARF_DSYM_FOLDER_PATH\" 2>&1 >/dev/null)\n if [ ! $? -eq 0 ]; then\n echo \"warning: sentry-cli - $ERROR\"\n fi\nelse\n echo \"warning: sentry-cli not installed, download from https://github.com/getsentry/sentry-cli/releases\"\nfi\n`,\n },\n {\n uploadSource: false,\n includeHomebrewPath: true,\n expectedScript: `# This script is responsible for uploading debug symbols and source context for Sentry.\nif [[ \"$(uname -m)\" == arm64 ]]; then\n export PATH=\"/opt/homebrew/bin:$PATH\"\nfi\n\nif which sentry-cli >/dev/null; then\n export SENTRY_ORG=test-org\n export SENTRY_PROJECT=test-project\n ERROR=$(sentry-cli debug-files upload \"$DWARF_DSYM_FOLDER_PATH\" 2>&1 >/dev/null)\n if [ ! $? -eq 0 ]; then\n echo \"warning: sentry-cli - $ERROR\"\n fi\nelse\n echo \"warning: sentry-cli not installed, download from https://github.com/getsentry/sentry-cli/releases\"\nfi\n`,\n },\n {\n uploadSource: false,\n includeHomebrewPath: false,\n expectedScript: `# This script is responsible for uploading debug symbols and source context for Sentry.\nif which sentry-cli >/dev/null; then\n export SENTRY_ORG=test-org\n export SENTRY_PROJECT=test-project\n ERROR=$(sentry-cli debug-files upload \"$DWARF_DSYM_FOLDER_PATH\" 2>&1 >/dev/null)\n if [ ! $? -eq 0 ]; then\n echo \"warning: sentry-cli - $ERROR\"\n fi\nelse\n echo \"warning: sentry-cli not installed, download from https://github.com/getsentry/sentry-cli/releases\"\nfi\n`,\n },\n ];\n\n for (const variation of variations) {\n describe(`uploadSource: ${variation.uploadSource.toString()} and includeHomebrewPath: ${variation.includeHomebrewPath.toString()}`, () => {\n it('should return the correct script', () => {\n // -- ct --\n const script = getRunScriptTemplate(\n 'test-org',\n 'test-project',\n variation.uploadSource,\n variation.includeHomebrewPath,\n );\n\n // -- Assert --\n expect(script).toBe(variation.expectedScript);\n });\n });\n }\n });\n\n describe('scriptInputPath', () => {\n it('should return the correct path', () => {\n expect(scriptInputPath).toBe(\n '\"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}\"',\n );\n });\n });\n\n describe('getSwiftSnippet', () => {\n it('should return the correct snippet', () => {\n // -- Arrange --\n const snippet = getSwiftSnippet('test-dsn', false);\n\n // -- Assert --\n expect(snippet).toBe(\n ` SentrySDK.start { options in\n options.dsn = \"test-dsn\"\n options.debug = true // Enabled debug when first installing is always helpful\n\n // Adds IP for users.\n // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/\n options.sendDefaultPii = true\n\n // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.\n // We recommend adjusting this value in production.\n options.tracesSampleRate = 1.0\n\n // Configure profiling. Visit https://docs.sentry.io/platforms/apple/profiling/ to learn more.\n options.configureProfiling = {\n $0.sessionSampleRate = 1.0 // We recommend adjusting this value in production.\n $0.lifecycle = .trace\n }\n\n // Uncomment the following lines to add more data to your events\n // options.attachScreenshot = true // This adds a screenshot to the error events\n // options.attachViewHierarchy = true // This adds the view hierarchy to the error events\n }\n // Remove the next line after confirming that your Sentry integration is working.\n SentrySDK.capture(message: \"This app uses Sentry! :)\")\n`,\n );\n });\n\n it('should return the correct snippet with logs enabled', () => {\n // -- Arrange --\n const snippet = getSwiftSnippet('test-dsn', true);\n\n // -- Assert --\n expect(snippet).toBe(\n ` SentrySDK.start { options in\n options.dsn = \"test-dsn\"\n options.debug = true // Enabled debug when first installing is always helpful\n\n // Adds IP for users.\n // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/\n options.sendDefaultPii = true\n\n // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.\n // We recommend adjusting this value in production.\n options.tracesSampleRate = 1.0\n\n // Configure profiling. Visit https://docs.sentry.io/platforms/apple/profiling/ to learn more.\n options.configureProfiling = {\n $0.sessionSampleRate = 1.0 // We recommend adjusting this value in production.\n $0.lifecycle = .trace\n }\n\n // Uncomment the following lines to add more data to your events\n // options.attachScreenshot = true // This adds a screenshot to the error events\n // options.attachViewHierarchy = true // This adds the view hierarchy to the error events\n \n // Enable experimental logging features\n options.experimental.enableLogs = true\n }\n // Remove the next line after confirming that your Sentry integration is working.\n SentrySDK.capture(message: \"This app uses Sentry! :)\")\n`,\n );\n });\n });\n\n describe('getObjcSnippet', () => {\n it('should return the correct snippet', () => {\n // -- Arrange --\n const snippet = getObjcSnippet('test-dsn', false);\n\n // -- Assert --\n expect(snippet).toBe(\n ` [SentrySDK startWithConfigureOptions:^(SentryOptions * options) {\n options.dsn = @\"test-dsn\";\n options.debug = YES; // Enabled debug when first installing is always helpful\n\n // Adds IP for users.\n // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/\n options.sendDefaultPii = YES;\n\n // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.\n // We recommend adjusting this value in production.\n options.tracesSampleRate = @1.0;\n\n // Configure profiling. Visit https://docs.sentry.io/platforms/apple/profiling/ to learn more.\n options.configureProfiling = ^(SentryProfileOptions *profiling) {\n profiling.sessionSampleRate = 1.0; // We recommend adjusting this value in production.\n profiling.lifecycle = SentryProfilingLifecycleTrace;\n };\n\n //Uncomment the following lines to add more data to your events\n //options.attachScreenshot = YES; //This will add a screenshot to the error events\n //options.attachViewHierarchy = YES; //This will add the view hierarchy to the error events\n }];\n //Remove the next line after confirming that your Sentry integration is working.\n [SentrySDK captureMessage:@\"This app uses Sentry!\"];\n`,\n );\n });\n\n it('should return the correct snippet with logs enabled', () => {\n // -- Arrange --\n const snippet = getObjcSnippet('test-dsn', true);\n\n // -- Assert --\n expect(snippet).toBe(\n ` [SentrySDK startWithConfigureOptions:^(SentryOptions * options) {\n options.dsn = @\"test-dsn\";\n options.debug = YES; // Enabled debug when first installing is always helpful\n\n // Adds IP for users.\n // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/\n options.sendDefaultPii = YES;\n\n // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.\n // We recommend adjusting this value in production.\n options.tracesSampleRate = @1.0;\n\n // Configure profiling. Visit https://docs.sentry.io/platforms/apple/profiling/ to learn more.\n options.configureProfiling = ^(SentryProfileOptions *profiling) {\n profiling.sessionSampleRate = 1.0; // We recommend adjusting this value in production.\n profiling.lifecycle = SentryProfilingLifecycleTrace;\n };\n\n //Uncomment the following lines to add more data to your events\n //options.attachScreenshot = YES; //This will add a screenshot to the error events\n //options.attachViewHierarchy = YES; //This will add the view hierarchy to the error events\n \n // Enable experimental logging features\n options.experimental.enableLogs = YES;\n }];\n //Remove the next line after confirming that your Sentry integration is working.\n [SentrySDK captureMessage:@\"This app uses Sentry!\"];\n`,\n );\n });\n });\n\n describe('getFastlaneSnippet', () => {\n it('should return the correct snippet', () => {\n // -- Arrange --\n const snippet = getFastlaneSnippet('test-org', 'test-project');\n\n // -- Assert --\n expect(snippet).toBe(\n ` sentry_cli(\n org_slug: 'test-org',\n project_slug: 'test-project',\n include_sources: true\n )`,\n );\n });\n });\n});\n"]}
1
+ {"version":3,"file":"templates.test.js","sourceRoot":"","sources":["../../../test/apple/templates.test.ts"],"names":[],"mappings":";;AAAA,mCAAkD;AAClD,yDAMmC;AAEnC,WAAE,CAAC,IAAI,CAAC,kCAAkC,EAAE,GAAG,EAAE,CAAC,CAAC;IACjD,2BAA2B,EAAE,WAAE,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,SAAS,CAAC;CAClE,CAAC,CAAC,CAAC;AAEJ,IAAA,iBAA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AI,CAClB;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BP,CACM,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,IAAA,iBAAQ,EAAC,oBAAoB,EAAE,GAAG,EAAE;QAClC,IAAA,WAAE,EAAC,mCAAmC,EAAE,GAAG,EAAE;YAC3C,gBAAgB;YAChB,MAAM,OAAO,GAAG,IAAA,8BAAkB,EAAC,UAAU,EAAE,cAAc,CAAC,CAAC;YAE/D,eAAe;YACf,IAAA,eAAM,EAAC,OAAO,CAAC,CAAC,IAAI,CAClB;;;;MAIF,CACC,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { describe, expect, it, vi } from 'vitest';\nimport {\n getFastlaneSnippet,\n getObjcSnippet,\n getRunScriptTemplate,\n getSwiftSnippet,\n scriptInputPath,\n} from '../../src/apple/templates';\n\nvi.mock('../../src/utils/clack/mcp-config', () => ({\n offerProjectScopedMcpConfig: vi.fn().mockResolvedValue(undefined),\n}));\n\ndescribe('templates', () => {\n describe('getRunScriptTemplate', () => {\n const variations: {\n uploadSource: boolean;\n includeHomebrewPath: boolean;\n expectedScript: string;\n }[] = [\n {\n uploadSource: true,\n includeHomebrewPath: true,\n expectedScript: `# This script is responsible for uploading debug symbols and source context for Sentry.\nif [[ \"$(uname -m)\" == arm64 ]]; then\n export PATH=\"/opt/homebrew/bin:$PATH\"\nfi\n\nif which sentry-cli >/dev/null; then\n export SENTRY_ORG=test-org\n export SENTRY_PROJECT=test-project\n ERROR=$(sentry-cli debug-files upload --include-sources \"$DWARF_DSYM_FOLDER_PATH\" 2>&1 >/dev/null)\n if [ ! $? -eq 0 ]; then\n echo \"warning: sentry-cli - $ERROR\"\n fi\nelse\n echo \"warning: sentry-cli not installed, download from https://github.com/getsentry/sentry-cli/releases\"\nfi\n`,\n },\n {\n uploadSource: true,\n includeHomebrewPath: false,\n expectedScript: `# This script is responsible for uploading debug symbols and source context for Sentry.\nif which sentry-cli >/dev/null; then\n export SENTRY_ORG=test-org\n export SENTRY_PROJECT=test-project\n ERROR=$(sentry-cli debug-files upload --include-sources \"$DWARF_DSYM_FOLDER_PATH\" 2>&1 >/dev/null)\n if [ ! $? -eq 0 ]; then\n echo \"warning: sentry-cli - $ERROR\"\n fi\nelse\n echo \"warning: sentry-cli not installed, download from https://github.com/getsentry/sentry-cli/releases\"\nfi\n`,\n },\n {\n uploadSource: false,\n includeHomebrewPath: true,\n expectedScript: `# This script is responsible for uploading debug symbols and source context for Sentry.\nif [[ \"$(uname -m)\" == arm64 ]]; then\n export PATH=\"/opt/homebrew/bin:$PATH\"\nfi\n\nif which sentry-cli >/dev/null; then\n export SENTRY_ORG=test-org\n export SENTRY_PROJECT=test-project\n ERROR=$(sentry-cli debug-files upload \"$DWARF_DSYM_FOLDER_PATH\" 2>&1 >/dev/null)\n if [ ! $? -eq 0 ]; then\n echo \"warning: sentry-cli - $ERROR\"\n fi\nelse\n echo \"warning: sentry-cli not installed, download from https://github.com/getsentry/sentry-cli/releases\"\nfi\n`,\n },\n {\n uploadSource: false,\n includeHomebrewPath: false,\n expectedScript: `# This script is responsible for uploading debug symbols and source context for Sentry.\nif which sentry-cli >/dev/null; then\n export SENTRY_ORG=test-org\n export SENTRY_PROJECT=test-project\n ERROR=$(sentry-cli debug-files upload \"$DWARF_DSYM_FOLDER_PATH\" 2>&1 >/dev/null)\n if [ ! $? -eq 0 ]; then\n echo \"warning: sentry-cli - $ERROR\"\n fi\nelse\n echo \"warning: sentry-cli not installed, download from https://github.com/getsentry/sentry-cli/releases\"\nfi\n`,\n },\n ];\n\n for (const variation of variations) {\n describe(`uploadSource: ${variation.uploadSource.toString()} and includeHomebrewPath: ${variation.includeHomebrewPath.toString()}`, () => {\n it('should return the correct script', () => {\n // -- ct --\n const script = getRunScriptTemplate(\n 'test-org',\n 'test-project',\n variation.uploadSource,\n variation.includeHomebrewPath,\n );\n\n // -- Assert --\n expect(script).toBe(variation.expectedScript);\n });\n });\n }\n });\n\n describe('scriptInputPath', () => {\n it('should return the correct path', () => {\n expect(scriptInputPath).toBe(\n '\"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}\"',\n );\n });\n });\n\n describe('getSwiftSnippet', () => {\n it('should return the correct snippet', () => {\n // -- Arrange --\n const snippet = getSwiftSnippet('test-dsn', false);\n\n // -- Assert --\n expect(snippet).toBe(\n ` SentrySDK.start { options in\n options.dsn = \"test-dsn\"\n\n // Adds IP for users.\n // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/\n options.sendDefaultPii = true\n\n // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.\n // We recommend adjusting this value in production.\n options.tracesSampleRate = 1.0\n\n // Configure profiling. Visit https://docs.sentry.io/platforms/apple/profiling/ to learn more.\n options.configureProfiling = {\n $0.sessionSampleRate = 1.0 // We recommend adjusting this value in production.\n $0.lifecycle = .trace\n }\n\n // Uncomment the following lines to add more data to your events\n // options.attachScreenshot = true // This adds a screenshot to the error events\n // options.attachViewHierarchy = true // This adds the view hierarchy to the error events\n }\n // Remove the next line after confirming that your Sentry integration is working.\n SentrySDK.capture(message: \"This app uses Sentry! :)\")\n`,\n );\n });\n\n it('should return the correct snippet with logs enabled', () => {\n // -- Arrange --\n const snippet = getSwiftSnippet('test-dsn', true);\n\n // -- Assert --\n expect(snippet).toBe(\n ` SentrySDK.start { options in\n options.dsn = \"test-dsn\"\n\n // Adds IP for users.\n // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/\n options.sendDefaultPii = true\n\n // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.\n // We recommend adjusting this value in production.\n options.tracesSampleRate = 1.0\n\n // Configure profiling. Visit https://docs.sentry.io/platforms/apple/profiling/ to learn more.\n options.configureProfiling = {\n $0.sessionSampleRate = 1.0 // We recommend adjusting this value in production.\n $0.lifecycle = .trace\n }\n\n // Uncomment the following lines to add more data to your events\n // options.attachScreenshot = true // This adds a screenshot to the error events\n // options.attachViewHierarchy = true // This adds the view hierarchy to the error events\n \n // Enable experimental logging features\n options.experimental.enableLogs = true\n }\n // Remove the next line after confirming that your Sentry integration is working.\n SentrySDK.capture(message: \"This app uses Sentry! :)\")\n`,\n );\n });\n });\n\n describe('getObjcSnippet', () => {\n it('should return the correct snippet', () => {\n // -- Arrange --\n const snippet = getObjcSnippet('test-dsn', false);\n\n // -- Assert --\n expect(snippet).toBe(\n ` [SentrySDK startWithConfigureOptions:^(SentryOptions * options) {\n options.dsn = @\"test-dsn\";\n\n // Adds IP for users.\n // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/\n options.sendDefaultPii = YES;\n\n // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.\n // We recommend adjusting this value in production.\n options.tracesSampleRate = @1.0;\n\n // Configure profiling. Visit https://docs.sentry.io/platforms/apple/profiling/ to learn more.\n options.configureProfiling = ^(SentryProfileOptions *profiling) {\n profiling.sessionSampleRate = 1.0; // We recommend adjusting this value in production.\n profiling.lifecycle = SentryProfilingLifecycleTrace;\n };\n\n //Uncomment the following lines to add more data to your events\n //options.attachScreenshot = YES; //This will add a screenshot to the error events\n //options.attachViewHierarchy = YES; //This will add the view hierarchy to the error events\n }];\n //Remove the next line after confirming that your Sentry integration is working.\n [SentrySDK captureMessage:@\"This app uses Sentry!\"];\n`,\n );\n });\n\n it('should return the correct snippet with logs enabled', () => {\n // -- Arrange --\n const snippet = getObjcSnippet('test-dsn', true);\n\n // -- Assert --\n expect(snippet).toBe(\n ` [SentrySDK startWithConfigureOptions:^(SentryOptions * options) {\n options.dsn = @\"test-dsn\";\n\n // Adds IP for users.\n // For more information, visit: https://docs.sentry.io/platforms/apple/data-management/data-collected/\n options.sendDefaultPii = YES;\n\n // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.\n // We recommend adjusting this value in production.\n options.tracesSampleRate = @1.0;\n\n // Configure profiling. Visit https://docs.sentry.io/platforms/apple/profiling/ to learn more.\n options.configureProfiling = ^(SentryProfileOptions *profiling) {\n profiling.sessionSampleRate = 1.0; // We recommend adjusting this value in production.\n profiling.lifecycle = SentryProfilingLifecycleTrace;\n };\n\n //Uncomment the following lines to add more data to your events\n //options.attachScreenshot = YES; //This will add a screenshot to the error events\n //options.attachViewHierarchy = YES; //This will add the view hierarchy to the error events\n \n // Enable experimental logging features\n options.experimental.enableLogs = YES;\n }];\n //Remove the next line after confirming that your Sentry integration is working.\n [SentrySDK captureMessage:@\"This app uses Sentry!\"];\n`,\n );\n });\n });\n\n describe('getFastlaneSnippet', () => {\n it('should return the correct snippet', () => {\n // -- Arrange --\n const snippet = getFastlaneSnippet('test-org', 'test-project');\n\n // -- Assert --\n expect(snippet).toBe(\n ` sentry_cli(\n org_slug: 'test-org',\n project_slug: 'test-project',\n include_sources: true\n )`,\n );\n });\n });\n});\n"]}
@@ -38,8 +38,9 @@ const templates_1 = require("../../src/nextjs/templates");
38
38
  // Define how likely Replay events are sampled when an error occurs.
39
39
  replaysOnErrorSampleRate: 1.0,
40
40
 
41
- // Setting this option to true will print useful information to the console while you're setting up Sentry.
42
- debug: false,
41
+ // Enable sending user PII (Personally Identifiable Information)
42
+ // https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
43
+ sendDefaultPii: true,
43
44
  });
44
45
 
45
46
  export const onRouterTransitionStart = Sentry.captureRouterTransitionStart;"
@@ -76,8 +77,9 @@ const templates_1 = require("../../src/nextjs/templates");
76
77
  // Define how likely Replay events are sampled when an error occurs.
77
78
  replaysOnErrorSampleRate: 1.0,
78
79
 
79
- // Setting this option to true will print useful information to the console while you're setting up Sentry.
80
- debug: false,
80
+ // Enable sending user PII (Personally Identifiable Information)
81
+ // https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
82
+ sendDefaultPii: true,
81
83
  });
82
84
 
83
85
  export const onRouterTransitionStart = Sentry.captureRouterTransitionStart;"
@@ -104,8 +106,9 @@ const templates_1 = require("../../src/nextjs/templates");
104
106
  // Enable logs to be sent to Sentry
105
107
  enableLogs: true,
106
108
 
107
- // Setting this option to true will print useful information to the console while you're setting up Sentry.
108
- debug: false,
109
+ // Enable sending user PII (Personally Identifiable Information)
110
+ // https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
111
+ sendDefaultPii: true,
109
112
  });
110
113
 
111
114
  export const onRouterTransitionStart = Sentry.captureRouterTransitionStart;"
@@ -143,8 +146,9 @@ const templates_1 = require("../../src/nextjs/templates");
143
146
  // Define how likely Replay events are sampled when an error occurs.
144
147
  replaysOnErrorSampleRate: 1.0,
145
148
 
146
- // Setting this option to true will print useful information to the console while you're setting up Sentry.
147
- debug: false,
149
+ // Enable sending user PII (Personally Identifiable Information)
150
+ // https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
151
+ sendDefaultPii: true,
148
152
  });
149
153
 
150
154
  export const onRouterTransitionStart = Sentry.captureRouterTransitionStart;"
@@ -175,8 +179,9 @@ const templates_1 = require("../../src/nextjs/templates");
175
179
  // Enable logs to be sent to Sentry
176
180
  enableLogs: true,
177
181
 
178
- // Setting this option to true will print useful information to the console while you're setting up Sentry.
179
- debug: false,
182
+ // Enable sending user PII (Personally Identifiable Information)
183
+ // https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
184
+ sendDefaultPii: true,
180
185
  });
181
186
  "
182
187
  `);
@@ -200,8 +205,9 @@ const templates_1 = require("../../src/nextjs/templates");
200
205
  // Enable logs to be sent to Sentry
201
206
  enableLogs: true,
202
207
 
203
- // Setting this option to true will print useful information to the console while you're setting up Sentry.
204
- debug: false,
208
+ // Enable sending user PII (Personally Identifiable Information)
209
+ // https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
210
+ sendDefaultPii: true,
205
211
  });
206
212
  "
207
213
  `);
@@ -228,8 +234,9 @@ const templates_1 = require("../../src/nextjs/templates");
228
234
  // Enable logs to be sent to Sentry
229
235
  enableLogs: true,
230
236
 
231
- // Setting this option to true will print useful information to the console while you're setting up Sentry.
232
- debug: false,
237
+ // Enable sending user PII (Personally Identifiable Information)
238
+ // https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
239
+ sendDefaultPii: true,
233
240
  });
234
241
  "
235
242
  `);
@@ -253,8 +260,9 @@ const templates_1 = require("../../src/nextjs/templates");
253
260
  // Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
254
261
  tracesSampleRate: 1,
255
262
 
256
- // Setting this option to true will print useful information to the console while you're setting up Sentry.
257
- debug: false,
263
+ // Enable sending user PII (Personally Identifiable Information)
264
+ // https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
265
+ sendDefaultPii: true,
258
266
  });
259
267
  "
260
268
  `);
@@ -284,8 +292,9 @@ const templates_1 = require("../../src/nextjs/templates");
284
292
  // Enable logs to be sent to Sentry
285
293
  enableLogs: true,
286
294
 
287
- // Setting this option to true will print useful information to the console while you're setting up Sentry.
288
- debug: false,
295
+ // Enable sending user PII (Personally Identifiable Information)
296
+ // https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
297
+ sendDefaultPii: true,
289
298
  });
290
299
  "
291
300
  `);
@@ -310,8 +319,9 @@ const templates_1 = require("../../src/nextjs/templates");
310
319
  // Enable logs to be sent to Sentry
311
320
  enableLogs: true,
312
321
 
313
- // Setting this option to true will print useful information to the console while you're setting up Sentry.
314
- debug: false,
322
+ // Enable sending user PII (Personally Identifiable Information)
323
+ // https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
324
+ sendDefaultPii: true,
315
325
  });
316
326
  "
317
327
  `);
@@ -336,8 +346,9 @@ const templates_1 = require("../../src/nextjs/templates");
336
346
  // Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
337
347
  tracesSampleRate: 1,
338
348
 
339
- // Setting this option to true will print useful information to the console while you're setting up Sentry.
340
- debug: false,
349
+ // Enable sending user PII (Personally Identifiable Information)
350
+ // https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/options/#sendDefaultPii
351
+ sendDefaultPii: true,
341
352
  });
342
353
  "
343
354
  `);