@sentry/wizard 3.5.0 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/bin.ts +1 -34
  3. package/dist/bin.js +1 -28
  4. package/dist/bin.js.map +1 -1
  5. package/dist/lib/Constants.d.ts +2 -0
  6. package/dist/lib/Constants.js +5 -0
  7. package/dist/lib/Constants.js.map +1 -1
  8. package/dist/lib/Helper/Wizard.js +2 -0
  9. package/dist/lib/Helper/Wizard.js.map +1 -1
  10. package/dist/lib/Helper/__tests__/SentryCli.js +1 -0
  11. package/dist/lib/Helper/__tests__/SentryCli.js.map +1 -1
  12. package/dist/lib/Steps/ChooseIntegration.js +4 -0
  13. package/dist/lib/Steps/ChooseIntegration.js.map +1 -1
  14. package/dist/lib/Steps/Integrations/Apple.d.ts +10 -0
  15. package/dist/lib/Steps/Integrations/Apple.js +92 -0
  16. package/dist/lib/Steps/Integrations/Apple.js.map +1 -0
  17. package/dist/lib/Steps/Integrations/NextJsShim.js +1 -0
  18. package/dist/lib/Steps/Integrations/NextJsShim.js.map +1 -1
  19. package/dist/lib/Steps/Integrations/SourceMapsShim.d.ts +1 -1
  20. package/dist/lib/Steps/Integrations/SourceMapsShim.js +2 -1
  21. package/dist/lib/Steps/Integrations/SourceMapsShim.js.map +1 -1
  22. package/dist/lib/Steps/Integrations/SvelteKitShim.js +1 -0
  23. package/dist/lib/Steps/Integrations/SvelteKitShim.js.map +1 -1
  24. package/dist/package.json +2 -2
  25. package/dist/src/apple/apple-wizard.d.ts +2 -0
  26. package/dist/src/apple/apple-wizard.js +197 -0
  27. package/dist/src/apple/apple-wizard.js.map +1 -0
  28. package/dist/src/apple/code-tools.d.ts +1 -0
  29. package/dist/src/apple/code-tools.js +100 -0
  30. package/dist/src/apple/code-tools.js.map +1 -0
  31. package/dist/src/apple/templates.d.ts +4 -0
  32. package/dist/src/apple/templates.js +19 -0
  33. package/dist/src/apple/templates.js.map +1 -0
  34. package/dist/src/apple/xcode-manager.d.ts +4 -0
  35. package/dist/src/apple/xcode-manager.js +145 -0
  36. package/dist/src/apple/xcode-manager.js.map +1 -0
  37. package/dist/src/nextjs/nextjs-wizard.js +4 -10
  38. package/dist/src/nextjs/nextjs-wizard.js.map +1 -1
  39. package/dist/src/sourcemaps/sourcemaps-wizard.js +193 -71
  40. package/dist/src/sourcemaps/sourcemaps-wizard.js.map +1 -1
  41. package/dist/src/sourcemaps/tools/angular.d.ts +1 -0
  42. package/dist/src/sourcemaps/tools/angular.js +76 -0
  43. package/dist/src/sourcemaps/tools/angular.js.map +1 -0
  44. package/dist/src/sourcemaps/tools/esbuild.js +2 -1
  45. package/dist/src/sourcemaps/tools/esbuild.js.map +1 -1
  46. package/dist/src/sourcemaps/tools/rollup.js +2 -1
  47. package/dist/src/sourcemaps/tools/rollup.js.map +1 -1
  48. package/dist/src/sourcemaps/tools/sentry-cli.d.ts +1 -0
  49. package/dist/src/sourcemaps/tools/sentry-cli.js +52 -24
  50. package/dist/src/sourcemaps/tools/sentry-cli.js.map +1 -1
  51. package/dist/src/sourcemaps/tools/vite.js +2 -1
  52. package/dist/src/sourcemaps/tools/vite.js.map +1 -1
  53. package/dist/src/sourcemaps/tools/webpack.js +2 -1
  54. package/dist/src/sourcemaps/tools/webpack.js.map +1 -1
  55. package/dist/src/sourcemaps/utils/detect-tool.d.ts +3 -0
  56. package/dist/src/sourcemaps/utils/detect-tool.js +73 -0
  57. package/dist/src/sourcemaps/utils/detect-tool.js.map +1 -0
  58. package/dist/src/sourcemaps/utils/other-wizards.d.ts +4 -0
  59. package/dist/src/sourcemaps/utils/other-wizards.js +183 -0
  60. package/dist/src/sourcemaps/utils/other-wizards.js.map +1 -0
  61. package/dist/src/sourcemaps/utils/sdk-version.js +14 -13
  62. package/dist/src/sourcemaps/utils/sdk-version.js.map +1 -1
  63. package/dist/src/sveltekit/sdk-setup.js +5 -3
  64. package/dist/src/sveltekit/sdk-setup.js.map +1 -1
  65. package/dist/src/sveltekit/sveltekit-wizard.js +2 -1
  66. package/dist/src/sveltekit/sveltekit-wizard.js.map +1 -1
  67. package/dist/src/sveltekit/templates.js +1 -1
  68. package/dist/src/sveltekit/templates.js.map +1 -1
  69. package/dist/src/telemetry.d.ts +1 -0
  70. package/dist/src/telemetry.js +7 -1
  71. package/dist/src/telemetry.js.map +1 -1
  72. package/dist/src/utils/bash.d.ts +3 -0
  73. package/dist/src/utils/bash.js +118 -0
  74. package/dist/src/utils/bash.js.map +1 -0
  75. package/dist/src/utils/clack-utils.d.ts +12 -8
  76. package/dist/src/utils/clack-utils.js +83 -40
  77. package/dist/src/utils/clack-utils.js.map +1 -1
  78. package/dist/src/utils/package-json.d.ts +19 -0
  79. package/dist/src/utils/package-json.js +29 -0
  80. package/dist/src/utils/package-json.js.map +1 -0
  81. package/dist/src/utils/types.d.ts +4 -0
  82. package/dist/src/utils/types.js.map +1 -1
  83. package/lib/Constants.ts +6 -0
  84. package/lib/Helper/Wizard.ts +3 -0
  85. package/lib/Helper/__tests__/SentryCli.ts +2 -1
  86. package/lib/Steps/ChooseIntegration.ts +4 -0
  87. package/lib/Steps/Integrations/Apple.ts +27 -0
  88. package/lib/Steps/Integrations/NextJsShim.ts +1 -0
  89. package/lib/Steps/Integrations/SourceMapsShim.ts +2 -1
  90. package/lib/Steps/Integrations/SvelteKitShim.ts +1 -0
  91. package/package-lock.json +8910 -0
  92. package/package.json +2 -2
  93. package/src/apple/apple-wizard.ts +150 -0
  94. package/src/apple/code-tools.ts +81 -0
  95. package/src/apple/templates.ts +39 -0
  96. package/src/apple/xcode-manager.ts +147 -0
  97. package/src/nextjs/nextjs-wizard.ts +6 -10
  98. package/src/sourcemaps/sourcemaps-wizard.ts +211 -92
  99. package/src/sourcemaps/tools/angular.ts +42 -0
  100. package/src/sourcemaps/tools/esbuild.ts +1 -1
  101. package/src/sourcemaps/tools/rollup.ts +2 -4
  102. package/src/sourcemaps/tools/sentry-cli.ts +45 -27
  103. package/src/sourcemaps/tools/vite.ts +1 -1
  104. package/src/sourcemaps/tools/webpack.ts +1 -1
  105. package/src/sourcemaps/utils/detect-tool.ts +41 -0
  106. package/src/sourcemaps/utils/other-wizards.ts +148 -0
  107. package/src/sourcemaps/utils/sdk-version.ts +9 -16
  108. package/src/sveltekit/sdk-setup.ts +5 -2
  109. package/src/sveltekit/sveltekit-wizard.ts +1 -1
  110. package/src/sveltekit/templates.ts +1 -1
  111. package/src/telemetry.ts +8 -0
  112. package/src/utils/bash.ts +44 -0
  113. package/src/utils/clack-utils.ts +82 -51
  114. package/src/utils/package-json.ts +45 -0
  115. package/src/utils/types.ts +5 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.7.0
4
+
5
+ - feat(sourcemaps): Add path for users who don't use CI (#359)
6
+ - fix: Ensure wizard exits after setup is completed (#360)
7
+ - fix(sveltekit): Call correct API endpoint in Sentry example code (#358)
8
+ - ref(sveltekit): Create `.ts` hooks files if typescript is detected (#355)
9
+
10
+ ## 3.6.0
11
+
12
+ - feat(apple): Add support for iOS (#334)
13
+ - feat(sourcemaps): Add CLI-based flow for Angular (#349)
14
+ - feat(sourcemaps): Detect SvelteKit and NextJS projects and redirect to dedicated wizards (#341)
15
+ - feat(sourcemaps): Pre-select auto-detected build tool option (#354)
16
+ - ref(sourcemaps): Improve Outro message (#344)
17
+
3
18
  ## 3.5.0
4
19
 
5
20
  - feat(sourcemaps): Check if correct SDK version is installed (#336)
package/bin.ts CHANGED
@@ -1,11 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { Integration, Platform } from './lib/Constants';
3
3
  import { run } from './lib/Setup';
4
- import { runNextjsWizard } from './src/nextjs/nextjs-wizard';
5
- import { runSourcemapsWizard } from './src/sourcemaps/sourcemaps-wizard';
6
- import { runSvelteKitWizard } from './src/sveltekit/sveltekit-wizard';
7
- import { withTelemetry } from './src/telemetry';
8
- import { WizardOptions } from './src/utils/types';
9
4
  export * from './lib/Setup';
10
5
 
11
6
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
@@ -63,32 +58,4 @@ const argv = require('yargs')
63
58
  describe: 'A promo code that will be applied during signup',
64
59
  }).argv;
65
60
 
66
- // Collect argv options that are relevant for the new wizard
67
- // flows based on `clack`
68
- const wizardOptions: WizardOptions = {
69
- url: argv.url as string | undefined,
70
- promoCode: argv['promo-code'] as string | undefined,
71
- };
72
-
73
- switch (argv.i) {
74
- case 'nextjs':
75
- // eslint-disable-next-line no-console
76
- runNextjsWizard(wizardOptions).catch(console.error);
77
- break;
78
- case 'sveltekit':
79
- // eslint-disable-next-line no-console
80
- runSvelteKitWizard(wizardOptions).catch(console.error);
81
- break;
82
- case 'sourcemaps':
83
- withTelemetry(
84
- {
85
- enabled: !argv['disable-telemetry'],
86
- integration: 'sourcemaps',
87
- },
88
- () => runSourcemapsWizard(wizardOptions),
89
- // eslint-disable-next-line no-console
90
- ).catch(console.error);
91
- break;
92
- default:
93
- void run(argv);
94
- }
61
+ void run(argv);
package/dist/bin.js CHANGED
@@ -17,10 +17,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  var Constants_1 = require("./lib/Constants");
19
19
  var Setup_1 = require("./lib/Setup");
20
- var nextjs_wizard_1 = require("./src/nextjs/nextjs-wizard");
21
- var sourcemaps_wizard_1 = require("./src/sourcemaps/sourcemaps-wizard");
22
- var sveltekit_wizard_1 = require("./src/sveltekit/sveltekit-wizard");
23
- var telemetry_1 = require("./src/telemetry");
24
20
  __exportStar(require("./lib/Setup"), exports);
25
21
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
26
22
  var argv = require('yargs')
@@ -74,28 +70,5 @@ var argv = require('yargs')
74
70
  alias: 'promo-code',
75
71
  describe: 'A promo code that will be applied during signup',
76
72
  }).argv;
77
- // Collect argv options that are relevant for the new wizard
78
- // flows based on `clack`
79
- var wizardOptions = {
80
- url: argv.url,
81
- promoCode: argv['promo-code'],
82
- };
83
- switch (argv.i) {
84
- case 'nextjs':
85
- // eslint-disable-next-line no-console
86
- (0, nextjs_wizard_1.runNextjsWizard)(wizardOptions).catch(console.error);
87
- break;
88
- case 'sveltekit':
89
- // eslint-disable-next-line no-console
90
- (0, sveltekit_wizard_1.runSvelteKitWizard)(wizardOptions).catch(console.error);
91
- break;
92
- case 'sourcemaps':
93
- (0, telemetry_1.withTelemetry)({
94
- enabled: !argv['disable-telemetry'],
95
- integration: 'sourcemaps',
96
- }, function () { return (0, sourcemaps_wizard_1.runSourcemapsWizard)(wizardOptions); }).catch(console.error);
97
- break;
98
- default:
99
- void (0, Setup_1.run)(argv);
100
- }
73
+ void (0, Setup_1.run)(argv);
101
74
  //# sourceMappingURL=bin.js.map
package/dist/bin.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"bin.js","sourceRoot":"","sources":["../bin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACA,6CAAwD;AACxD,qCAAkC;AAClC,4DAA6D;AAC7D,wEAAyE;AACzE,qEAAsE;AACtE,6CAAgD;AAEhD,8CAA4B;AAE5B,kJAAkJ;AAClJ,IAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC;KAC1B,MAAM,CAAC,OAAO,EAAE;IACf,OAAO,EAAE,KAAK;IACd,QAAQ,EAAE,kDAAkD;IAC5D,IAAI,EAAE,SAAS;CAChB,CAAC;KACD,MAAM,CAAC,WAAW,EAAE;IACnB,OAAO,EAAE,KAAK;IACd,QAAQ,EAAE,4DAA4D;IACtE,IAAI,EAAE,SAAS;CAChB,CAAC;KACD,MAAM,CAAC,cAAc,EAAE;IACtB,OAAO,EAAE,KAAK;IACd,QAAQ,EACN,qEAAqE;IACvE,IAAI,EAAE,SAAS;CAChB,CAAC;KAC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AAsC;QACtC,IAAA,qCAAkB,EAAC,aAAa,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACvD,MAAM;IACR,KAAK,YAAY;QACf,IAAA,yBAAa,EACX;YACE,OAAO,EAAE,CAAC,IAAI,CAAC,mBAAmB,CAAC;YACnC,WAAW,EAAE,YAAY;SAC1B,EACD,cAAM,OAAA,IAAA,uCAAmB,EAAC,aAAa,CAAC,EAAlC,CAAkC,CAEzC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACvB,MAAM;IACR;QACE,KAAK,IAAA,WAAG,EAAC,IAAI,CAAC,CAAC;CAClB","sourcesContent":["#!/usr/bin/env node\nimport { Integration, Platform } from './lib/Constants';\nimport { run } from './lib/Setup';\nimport { runNextjsWizard } from './src/nextjs/nextjs-wizard';\nimport { runSourcemapsWizard } from './src/sourcemaps/sourcemaps-wizard';\nimport { runSvelteKitWizard } from './src/sveltekit/sveltekit-wizard';\nimport { withTelemetry } from './src/telemetry';\nimport { WizardOptions } from './src/utils/types';\nexport * from './lib/Setup';\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call\nconst argv = require('yargs')\n .option('debug', {\n default: false,\n describe: 'Enable verbose logging\\nenv: SENTRY_WIZARD_DEBUG',\n type: 'boolean',\n })\n .option('uninstall', {\n default: false,\n describe: 'Revert project setup process\\nenv: SENTRY_WIZARD_UNINSTALL',\n type: 'boolean',\n })\n .option('skip-connect', {\n default: false,\n describe:\n 'Skips the connection to the server\\nenv: SENTRY_WIZARD_SKIP_CONNECT',\n type: 'boolean',\n })\n .option('quiet', {\n default: false,\n describe:\n 'Do not fallback to prompting user asking questions\\nenv: SENTRY_WIZARD_QUIET',\n type: 'boolean',\n })\n .option('i', {\n alias: 'integration',\n choices: Object.keys(Integration),\n describe: 'Choose the integration to setup\\nenv: SENTRY_WIZARD_INTEGRATION',\n })\n .option('p', {\n alias: 'platform',\n choices: Object.keys(Platform),\n describe: 'Choose platform(s)\\nenv: SENTRY_WIZARD_PLATFORM',\n type: 'array',\n })\n .option('u', {\n alias: 'url',\n describe: 'The url to your Sentry installation\\nenv: SENTRY_WIZARD_URL',\n })\n .option('s', {\n alias: 'signup',\n default: false,\n describe: 'Redirect to signup page if not logged in',\n type: 'boolean',\n })\n .option('disable-telemetry', {\n default: false,\n describe: \"Don't send telemetry data to Sentry\",\n type: 'boolean',\n })\n .option('promo-code', {\n alias: 'promo-code',\n describe: 'A promo code that will be applied during signup',\n }).argv;\n\n// Collect argv options that are relevant for the new wizard\n// flows based on `clack`\nconst wizardOptions: WizardOptions = {\n url: argv.url as string | undefined,\n promoCode: argv['promo-code'] as string | undefined,\n};\n\nswitch (argv.i) {\n case 'nextjs':\n // eslint-disable-next-line no-console\n runNextjsWizard(wizardOptions).catch(console.error);\n break;\n case 'sveltekit':\n // eslint-disable-next-line no-console\n runSvelteKitWizard(wizardOptions).catch(console.error);\n break;\n case 'sourcemaps':\n withTelemetry(\n {\n enabled: !argv['disable-telemetry'],\n integration: 'sourcemaps',\n },\n () => runSourcemapsWizard(wizardOptions),\n // eslint-disable-next-line no-console\n ).catch(console.error);\n break;\n default:\n void run(argv);\n}\n"]}
1
+ {"version":3,"file":"bin.js","sourceRoot":"","sources":["../bin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACA,6CAAwD;AACxD,qCAAkC;AAClC,8CAA4B;AAE5B,kJAAkJ;AAClJ,IAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC;KAC1B,MAAM,CAAC,OAAO,EAAE;IACf,OAAO,EAAE,KAAK;IACd,QAAQ,EAAE,kDAAkD;IAC5D,IAAI,EAAE,SAAS;CAChB,CAAC;KACD,MAAM,CAAC,WAAW,EAAE;IACnB,OAAO,EAAE,KAAK;IACd,QAAQ,EAAE,4DAA4D;IACtE,IAAI,EAAE,SAAS;CAChB,CAAC;KACD,MAAM,CAAC,cAAc,EAAE;IACtB,OAAO,EAAE,KAAK;IACd,QAAQ,EACN,qEAAqE;IACvE,IAAI,EAAE,SAAS;CAChB,CAAC;KACD,MAAM,CAAC,OAAO,EAAE;IACf,OAAO,EAAE,KAAK;IACd,QAAQ,EACN,8EAA8E;IAChF,IAAI,EAAE,SAAS;CAChB,CAAC;KACD,MAAM,CAAC,GAAG,EAAE;IACX,KAAK,EAAE,aAAa;IACpB,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,uBAAW,CAAC;IACjC,QAAQ,EAAE,iEAAiE;CAC5E,CAAC;KACD,MAAM,CAAC,GAAG,EAAE;IACX,KAAK,EAAE,UAAU;IACjB,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,oBAAQ,CAAC;IAC9B,QAAQ,EAAE,iDAAiD;IAC3D,IAAI,EAAE,OAAO;CACd,CAAC;KACD,MAAM,CAAC,GAAG,EAAE;IACX,KAAK,EAAE,KAAK;IACZ,QAAQ,EAAE,6DAA6D;CACxE,CAAC;KACD,MAAM,CAAC,GAAG,EAAE;IACX,KAAK,EAAE,QAAQ;IACf,OAAO,EAAE,KAAK;IACd,QAAQ,EAAE,0CAA0C;IACpD,IAAI,EAAE,SAAS;CAChB,CAAC;KACD,MAAM,CAAC,mBAAmB,EAAE;IAC3B,OAAO,EAAE,KAAK;IACd,QAAQ,EAAE,qCAAqC;IAC/C,IAAI,EAAE,SAAS;CAChB,CAAC;KACD,MAAM,CAAC,YAAY,EAAE;IACpB,KAAK,EAAE,YAAY;IACnB,QAAQ,EAAE,iDAAiD;CAC5D,CAAC,CAAC,IAAI,CAAC;AAEV,KAAK,IAAA,WAAG,EAAC,IAAI,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\nimport { Integration, Platform } from './lib/Constants';\nimport { run } from './lib/Setup';\nexport * from './lib/Setup';\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call\nconst argv = require('yargs')\n .option('debug', {\n default: false,\n describe: 'Enable verbose logging\\nenv: SENTRY_WIZARD_DEBUG',\n type: 'boolean',\n })\n .option('uninstall', {\n default: false,\n describe: 'Revert project setup process\\nenv: SENTRY_WIZARD_UNINSTALL',\n type: 'boolean',\n })\n .option('skip-connect', {\n default: false,\n describe:\n 'Skips the connection to the server\\nenv: SENTRY_WIZARD_SKIP_CONNECT',\n type: 'boolean',\n })\n .option('quiet', {\n default: false,\n describe:\n 'Do not fallback to prompting user asking questions\\nenv: SENTRY_WIZARD_QUIET',\n type: 'boolean',\n })\n .option('i', {\n alias: 'integration',\n choices: Object.keys(Integration),\n describe: 'Choose the integration to setup\\nenv: SENTRY_WIZARD_INTEGRATION',\n })\n .option('p', {\n alias: 'platform',\n choices: Object.keys(Platform),\n describe: 'Choose platform(s)\\nenv: SENTRY_WIZARD_PLATFORM',\n type: 'array',\n })\n .option('u', {\n alias: 'url',\n describe: 'The url to your Sentry installation\\nenv: SENTRY_WIZARD_URL',\n })\n .option('s', {\n alias: 'signup',\n default: false,\n describe: 'Redirect to signup page if not logged in',\n type: 'boolean',\n })\n .option('disable-telemetry', {\n default: false,\n describe: \"Don't send telemetry data to Sentry\",\n type: 'boolean',\n })\n .option('promo-code', {\n alias: 'promo-code',\n describe: 'A promo code that will be applied during signup',\n }).argv;\n\nvoid run(argv);\n"]}
@@ -1,6 +1,7 @@
1
1
  /** Key value should be the same here */
2
2
  export declare enum Integration {
3
3
  reactNative = "reactNative",
4
+ ios = "ios",
4
5
  cordova = "cordova",
5
6
  electron = "electron",
6
7
  nextjs = "nextjs",
@@ -31,6 +32,7 @@ export interface Args {
31
32
  quiet: boolean;
32
33
  signup: boolean;
33
34
  promoCode?: string;
35
+ disableTelemetry?: boolean;
34
36
  }
35
37
  export declare const DEFAULT_URL = "https://sentry.io/";
36
38
  export {};
@@ -5,6 +5,7 @@ exports.DEFAULT_URL = exports.getIntegrationChoices = exports.mapIntegrationToPl
5
5
  var Integration;
6
6
  (function (Integration) {
7
7
  Integration["reactNative"] = "reactNative";
8
+ Integration["ios"] = "ios";
8
9
  Integration["cordova"] = "cordova";
9
10
  Integration["electron"] = "electron";
10
11
  Integration["nextjs"] = "nextjs";
@@ -48,6 +49,8 @@ function getIntegrationDescription(type) {
48
49
  return 'SvelteKit';
49
50
  case Integration.sourcemaps:
50
51
  return 'Configure Source Maps Upload';
52
+ case Integration.ios:
53
+ return 'iOS';
51
54
  default:
52
55
  return 'React Native';
53
56
  }
@@ -67,6 +70,8 @@ function mapIntegrationToPlatform(type) {
67
70
  return 'javascript-sveltekit';
68
71
  case Integration.sourcemaps:
69
72
  return undefined;
73
+ case Integration.ios:
74
+ return 'iOS';
70
75
  default:
71
76
  throw new Error("Unknown integration ".concat(type));
72
77
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Constants.js","sourceRoot":"","sources":["../../lib/Constants.ts"],"names":[],"mappings":";;;AAAA,wCAAwC;AACxC,IAAY,WAOX;AAPD,WAAY,WAAW;IACrB,0CAA2B,CAAA;IAC3B,kCAAmB,CAAA;IACnB,oCAAqB,CAAA;IACrB,gCAAiB,CAAA;IACjB,sCAAuB,CAAA;IACvB,wCAAyB,CAAA;AAC3B,CAAC,EAPW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAOtB;AAED,wCAAwC;AACxC,IAAY,QAGX;AAHD,WAAY,QAAQ;IAClB,uBAAW,CAAA;IACX,+BAAmB,CAAA;AACrB,CAAC,EAHW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAGnB;AAED,SAAgB,kBAAkB;IAChC,OAAO,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,UAAC,QAAgB,IAAK,OAAA,CAAC;QACtD,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,sBAAsB,CAAC,QAAQ,CAAC;QACtC,KAAK,EAAE,QAAQ;KAChB,CAAC,EAJqD,CAIrD,CAAC,CAAC;AACN,CAAC;AAND,gDAMC;AAED,SAAgB,sBAAsB,CAAC,IAA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,IAAI,CAAC;QACrC,KAAK,EAAE,IAAI;KACZ,CAAC,EAHoD,CAGpD,CAAC,CAAC;AACN,CAAC;AALD,sDAKC;AAcY,QAAA,WAAW,GAAG,oBAAoB,CAAC","sourcesContent":["/** Key value should be the same here */\nexport enum Integration {\n reactNative = 'reactNative',\n cordova = 'cordova',\n electron = 'electron',\n nextjs = 'nextjs',\n sveltekit = 'sveltekit',\n sourcemaps = 'sourcemaps',\n}\n\n/** Key value should be the same here */\nexport enum Platform {\n ios = 'ios',\n android = 'android',\n}\n\nexport function getPlatformChoices(): any[] {\n return Object.keys(Platform).map((platform: string) => ({\n checked: true,\n name: getPlatformDescription(platform),\n value: platform,\n }));\n}\n\nexport function getPlatformDescription(type: string): string {\n switch (type) {\n case Platform.ios:\n return 'iOS';\n default:\n return 'Android';\n }\n}\n\nexport function getIntegrationDescription(type: string): string {\n switch (type) {\n case Integration.reactNative:\n return 'React Native';\n case Integration.cordova:\n return 'Cordova';\n case Integration.electron:\n return 'Electron';\n case Integration.nextjs:\n return 'Next.js';\n case Integration.sveltekit:\n return 'SvelteKit';\n case Integration.sourcemaps:\n return 'Configure Source Maps Upload';\n default:\n return 'React Native';\n }\n}\n\nexport function mapIntegrationToPlatform(type: string): string | undefined {\n switch (type) {\n case Integration.reactNative:\n return 'react-native';\n case Integration.cordova:\n return 'cordova';\n case Integration.electron:\n return 'javascript-electron';\n case Integration.nextjs:\n return 'javascript-nextjs';\n case Integration.sveltekit:\n return 'javascript-sveltekit';\n case Integration.sourcemaps:\n return undefined;\n default:\n throw new Error(`Unknown integration ${type}`);\n }\n}\n\ntype IntegrationChoice = {\n name: string;\n value: string;\n};\n\nexport function getIntegrationChoices(): IntegrationChoice[] {\n return Object.keys(Integration).map((type: string) => ({\n name: getIntegrationDescription(type),\n value: type,\n }));\n}\n\nexport interface Args {\n url: string;\n debug: boolean;\n uninstall: boolean;\n integration: Integration;\n platform: Platform[];\n skipConnect: boolean;\n quiet: boolean;\n signup: boolean;\n promoCode?: string;\n}\n\nexport const DEFAULT_URL = 'https://sentry.io/';\n"]}
1
+ {"version":3,"file":"Constants.js","sourceRoot":"","sources":["../../lib/Constants.ts"],"names":[],"mappings":";;;AAAA,wCAAwC;AACxC,IAAY,WAQX;AARD,WAAY,WAAW;IACrB,0CAA2B,CAAA;IAC3B,0BAAW,CAAA;IACX,kCAAmB,CAAA;IACnB,oCAAqB,CAAA;IACrB,gCAAiB,CAAA;IACjB,sCAAuB,CAAA;IACvB,wCAAyB,CAAA;AAC3B,CAAC,EARW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAQtB;AAED,wCAAwC;AACxC,IAAY,QAGX;AAHD,WAAY,QAAQ;IAClB,uBAAW,CAAA;IACX,+BAAmB,CAAA;AACrB,CAAC,EAHW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAGnB;AAED,SAAgB,kBAAkB;IAChC,OAAO,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,UAAC,QAAgB,IAAK,OAAA,CAAC;QACtD,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,sBAAsB,CAAC,QAAQ,CAAC;QACtC,KAAK,EAAE,QAAQ;KAChB,CAAC,EAJqD,CAIrD,CAAC,CAAC;AACN,CAAC;AAND,gDAMC;AAED,SAAgB,sBAAsB,CAAC,IAAY;IACjD,QAAQ,IAAI,EAAE;QACZ,KAAK,QAAQ,CAAC,GAAG;YACf,OAAO,KAAK,CAAC;QACf;YACE,OAAO,SAAS,CAAC;KACpB;AACH,CAAC;AAPD,wDAOC;AAED,SAAgB,yBAAyB,CAAC,IAAY;IACpD,QAAQ,IAAI,EAAE;QACZ,KAAK,WAAW,CAAC,WAAW;YAC1B,OAAO,cAAc,CAAC;QACxB,KAAK,WAAW,CAAC,OAAO;YACtB,OAAO,SAAS,CAAC;QACnB,KAAK,WAAW,CAAC,QAAQ;YACvB,OAAO,UAAU,CAAC;QACpB,KAAK,WAAW,CAAC,MAAM;YACrB,OAAO,SAAS,CAAC;QACnB,KAAK,WAAW,CAAC,SAAS;YACxB,OAAO,WAAW,CAAC;QACrB,KAAK,WAAW,CAAC,UAAU;YACzB,OAAO,8BAA8B,CAAC;QACxC,KAAK,WAAW,CAAC,GAAG;YAClB,OAAO,KAAK,CAAC;QACf;YACE,OAAO,cAAc,CAAC;KACzB;AACH,CAAC;AAnBD,8DAmBC;AAED,SAAgB,wBAAwB,CAAC,IAAY;IACnD,QAAQ,IAAI,EAAE;QACZ,KAAK,WAAW,CAAC,WAAW;YAC1B,OAAO,cAAc,CAAC;QACxB,KAAK,WAAW,CAAC,OAAO;YACtB,OAAO,SAAS,CAAC;QACnB,KAAK,WAAW,CAAC,QAAQ;YACvB,OAAO,qBAAqB,CAAC;QAC/B,KAAK,WAAW,CAAC,MAAM;YACrB,OAAO,mBAAmB,CAAC;QAC7B,KAAK,WAAW,CAAC,SAAS;YACxB,OAAO,sBAAsB,CAAC;QAChC,KAAK,WAAW,CAAC,UAAU;YACzB,OAAO,SAAS,CAAC;QACnB,KAAK,WAAW,CAAC,GAAG;YAClB,OAAO,KAAK,CAAC;QACf;YACE,MAAM,IAAI,KAAK,CAAC,8BAAuB,IAAI,CAAE,CAAC,CAAC;KAClD;AACH,CAAC;AAnBD,4DAmBC;AAOD,SAAgB,qBAAqB;IACnC,OAAO,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,UAAC,IAAY,IAAK,OAAA,CAAC;QACrD,IAAI,EAAE,yBAAyB,CAAC,IAAI,CAAC;QACrC,KAAK,EAAE,IAAI;KACZ,CAAC,EAHoD,CAGpD,CAAC,CAAC;AACN,CAAC;AALD,sDAKC;AAeY,QAAA,WAAW,GAAG,oBAAoB,CAAC","sourcesContent":["/** Key value should be the same here */\nexport enum Integration {\n reactNative = 'reactNative',\n ios = 'ios',\n cordova = 'cordova',\n electron = 'electron',\n nextjs = 'nextjs',\n sveltekit = 'sveltekit',\n sourcemaps = 'sourcemaps',\n}\n\n/** Key value should be the same here */\nexport enum Platform {\n ios = 'ios',\n android = 'android',\n}\n\nexport function getPlatformChoices(): any[] {\n return Object.keys(Platform).map((platform: string) => ({\n checked: true,\n name: getPlatformDescription(platform),\n value: platform,\n }));\n}\n\nexport function getPlatformDescription(type: string): string {\n switch (type) {\n case Platform.ios:\n return 'iOS';\n default:\n return 'Android';\n }\n}\n\nexport function getIntegrationDescription(type: string): string {\n switch (type) {\n case Integration.reactNative:\n return 'React Native';\n case Integration.cordova:\n return 'Cordova';\n case Integration.electron:\n return 'Electron';\n case Integration.nextjs:\n return 'Next.js';\n case Integration.sveltekit:\n return 'SvelteKit';\n case Integration.sourcemaps:\n return 'Configure Source Maps Upload';\n case Integration.ios:\n return 'iOS';\n default:\n return 'React Native';\n }\n}\n\nexport function mapIntegrationToPlatform(type: string): string | undefined {\n switch (type) {\n case Integration.reactNative:\n return 'react-native';\n case Integration.cordova:\n return 'cordova';\n case Integration.electron:\n return 'javascript-electron';\n case Integration.nextjs:\n return 'javascript-nextjs';\n case Integration.sveltekit:\n return 'javascript-sveltekit';\n case Integration.sourcemaps:\n return undefined;\n case Integration.ios:\n return 'iOS';\n default:\n throw new Error(`Unknown integration ${type}`);\n }\n}\n\ntype IntegrationChoice = {\n name: string;\n value: string;\n};\n\nexport function getIntegrationChoices(): IntegrationChoice[] {\n return Object.keys(Integration).map((type: string) => ({\n name: getIntegrationDescription(type),\n value: type,\n }));\n}\n\nexport interface Args {\n url: string;\n debug: boolean;\n uninstall: boolean;\n integration: Integration;\n platform: Platform[];\n skipConnect: boolean;\n quiet: boolean;\n signup: boolean;\n promoCode?: string;\n disableTelemetry?: boolean;\n}\n\nexport const DEFAULT_URL = 'https://sentry.io/';\n"]}
@@ -88,6 +88,8 @@ function sanitizeAndValidateArgs(argv) {
88
88
  }
89
89
  // @ts-ignore skip-connect does not exist on args
90
90
  argv.promoCode = argv['promo-code'];
91
+ // @ts-ignore skip-connect does not exist on args
92
+ argv.disableTelemetry = argv['disable-telemetry'] != undefined;
91
93
  }
92
94
  function getCurrentIntegration(answers) {
93
95
  return _.get(answers, 'integration');
@@ -1 +1 @@
1
- {"version":3,"file":"Wizard.js","sourceRoot":"","sources":["../../../lib/Helper/Wizard.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,wCAA4B;AAK5B,yCAAwC;AACxC,qCAAgD;AAEhD,SAAS,uBAAuB,CAAC,IAAU;IACzC,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE;QAC5B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAA,aAAG,EAAC,kCAAkC,CAAC,CAAC;KACzC;IACD,iDAAiD;IACjD,IAAI,IAAI,CAAC,cAAc,CAAC,EAAE;QACxB,iDAAiD;QACjD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC;QACxC,iDAAiD;QACjD,OAAO,IAAI,CAAC,cAAc,CAAC,CAAC;KAC7B;IACD,iDAAiD;IACjD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC;AACtC,CAAC;AAED,SAAgB,qBAAqB,CAAC,OAAgB;IACpD,OAAO,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,aAAa,CAAoB,CAAC;AAC1D,CAAC;AAFD,sDAEC;AAED,SAAsB,WAAW,CAC/B,IAAU;IACV,eAAyC;SAAzC,UAAyC,EAAzC,qBAAyC,EAAzC,IAAyC;QAAzC,8BAAyC;;;;;;;;;oBAGvC,uBAAuB,CAAC,IAAI,CAAC,CAAC;oBAC9B,IAAI,IAAI,CAAC,KAAK,EAAE;wBACd,IAAA,eAAK,EAAC,IAAI,CAAC,CAAC;qBACb;oBACD,IAAI,IAAI,CAAC,KAAK,EAAE;wBACd,IAAA,aAAG,EAAC,4CAA4C,CAAC,CAAC;qBACnD;oBACM,qBAAM,KAAK;6BACf,GAAG,CAAC,UAAC,IAAI,IAAK,OAAA,IAAI,IAAI,CAAC,IAAI,CAAC,EAAd,CAAc,CAAC;6BAC7B,MAAM,CAAC,UAAO,MAAM,EAAE,IAAI;;;;4CACN,qBAAM,MAAM,EAAA;;wCAAzB,UAAU,GAAG,SAAY;wCACf,qBAAM,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,EAAA;;wCAArC,OAAO,GAAG,SAA2B;wCAC3C,4CAAY,UAAU,GAAK,OAAO,GAAG;;;6BACtC,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,EAAA;wBANzB,sBAAO,SAMkB,EAAC;;;oBAE1B,qBAAS,CAAC,IAAI,EAAE,CAAC;oBACjB,IAAA,YAAE,GAAE,CAAC;oBACL,IAAA,aAAG,EAAC,4BAA4B,CAAC,CAAC;oBAClC,IAAA,aAAG,EAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAC,CAAC,CAAC,CAAC,GAAC,CAAC,OAAO,CAAC,CAAC;oBAChC,IAAA,YAAE,GAAE,CAAC;oBACL,IAAA,aAAG,EAAC,2CAA2C,CAAC,CAAC;oBACjD,IAAA,aAAG,EAAC,mCAAmC,CAAC,CAAC;oBACzC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;;;;;;CAEnB;AA7BD,kCA6BC","sourcesContent":["import type { Answers } from 'inquirer';\nimport * as _ from 'lodash';\n\nimport type { Args } from '../Constants';\nimport type { IStep } from '../Steps/BaseStep';\nimport type { BaseIntegration } from '../Steps/Integrations/BaseIntegration';\nimport { BottomBar } from './BottomBar';\nimport { debug, dim, nl, red } from './Logging';\n\nfunction sanitizeAndValidateArgs(argv: Args): void {\n if (argv.quiet === undefined) {\n argv.quiet = true;\n dim('will activate quiet mode for you');\n }\n // @ts-ignore skip-connect does not exist on args\n if (argv['skip-connect']) {\n // @ts-ignore skip-connect does not exist on args\n argv.skipConnect = argv['skip-connect'];\n // @ts-ignore skip-connect does not exist on args\n delete argv['skip-connect'];\n }\n // @ts-ignore skip-connect does not exist on args\n argv.promoCode = argv['promo-code'];\n}\n\nexport function getCurrentIntegration(answers: Answers): BaseIntegration {\n return _.get(answers, 'integration') as BaseIntegration;\n}\n\nexport async function startWizard<M extends IStep>(\n argv: Args,\n ...steps: Array<{ new (debug: Args): M }>\n): Promise<Answers> {\n try {\n sanitizeAndValidateArgs(argv);\n if (argv.debug) {\n debug(argv);\n }\n if (argv.quiet) {\n dim(\"Quiet mode On, DAMA, don't ask me anything\");\n }\n return await steps\n .map((step) => new step(argv))\n .reduce(async (answer, step) => {\n const prevAnswer = await answer;\n const answers = await step.emit(prevAnswer);\n return { ...prevAnswer, ...answers };\n }, Promise.resolve({}));\n } catch (e) {\n BottomBar.hide();\n nl();\n red('Sentry Wizard failed with:');\n red(argv.debug ? e : e.message);\n nl();\n red('Protip: Add --debug to see whats going on');\n red('OR use --help to see your options');\n process.exit(1);\n }\n}\n"]}
1
+ {"version":3,"file":"Wizard.js","sourceRoot":"","sources":["../../../lib/Helper/Wizard.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,wCAA4B;AAK5B,yCAAwC;AACxC,qCAAgD;AAEhD,SAAS,uBAAuB,CAAC,IAAU;IACzC,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE;QAC5B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAA,aAAG,EAAC,kCAAkC,CAAC,CAAC;KACzC;IACD,iDAAiD;IACjD,IAAI,IAAI,CAAC,cAAc,CAAC,EAAE;QACxB,iDAAiD;QACjD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC;QACxC,iDAAiD;QACjD,OAAO,IAAI,CAAC,cAAc,CAAC,CAAC;KAC7B;IACD,iDAAiD;IACjD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC;IAEpC,iDAAi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AAC;oBACL,IAAA,aAAG,EAAC,2CAA2C,CAAC,CAAC;oBACjD,IAAA,aAAG,EAAC,mCAAmC,CAAC,CAAC;oBACzC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;;;;;;CAEnB;AA7BD,kCA6BC","sourcesContent":["import type { Answers } from 'inquirer';\nimport * as _ from 'lodash';\n\nimport type { Args } from '../Constants';\nimport type { IStep } from '../Steps/BaseStep';\nimport type { BaseIntegration } from '../Steps/Integrations/BaseIntegration';\nimport { BottomBar } from './BottomBar';\nimport { debug, dim, nl, red } from './Logging';\n\nfunction sanitizeAndValidateArgs(argv: Args): void {\n if (argv.quiet === undefined) {\n argv.quiet = true;\n dim('will activate quiet mode for you');\n }\n // @ts-ignore skip-connect does not exist on args\n if (argv['skip-connect']) {\n // @ts-ignore skip-connect does not exist on args\n argv.skipConnect = argv['skip-connect'];\n // @ts-ignore skip-connect does not exist on args\n delete argv['skip-connect'];\n }\n // @ts-ignore skip-connect does not exist on args\n argv.promoCode = argv['promo-code'];\n\n // @ts-ignore skip-connect does not exist on args\n argv.disableTelemetry = argv['disable-telemetry'] != undefined;\n}\n\nexport function getCurrentIntegration(answers: Answers): BaseIntegration {\n return _.get(answers, 'integration') as BaseIntegration;\n}\n\nexport async function startWizard<M extends IStep>(\n argv: Args,\n ...steps: Array<{ new (debug: Args): M }>\n): Promise<Answers> {\n try {\n sanitizeAndValidateArgs(argv);\n if (argv.debug) {\n debug(argv);\n }\n if (argv.quiet) {\n dim(\"Quiet mode On, DAMA, don't ask me anything\");\n }\n return await steps\n .map((step) => new step(argv))\n .reduce(async (answer, step) => {\n const prevAnswer = await answer;\n const answers = await step.emit(prevAnswer);\n return { ...prevAnswer, ...answers };\n }, Promise.resolve({}));\n } catch (e) {\n BottomBar.hide();\n nl();\n red('Sentry Wizard failed with:');\n red(argv.debug ? e : e.message);\n nl();\n red('Protip: Add --debug to see whats going on');\n red('OR use --help to see your options');\n process.exit(1);\n }\n}\n"]}
@@ -11,6 +11,7 @@ var args = {
11
11
  uninstall: false,
12
12
  url: 'https://localhost:1234',
13
13
  signup: false,
14
+ disableTelemetry: false,
14
15
  };
15
16
  var demoAnswers = {
16
17
  config: {
@@ -1 +1 @@
1
- {"version":3,"file":"SentryCli.js","sourceRoot":"","sources":["../../../../lib/Helper/__tests__/SentryCli.ts"],"names":[],"mappings":";;AAIA,6CAAwD;AACxD,0CAAyC;AAEzC,IAAM,IAAI,GAAS;IACjB,KAAK,EAAE,KAAK;IACZ,WAAW,EAAE,uBAAW,CAAC,WAAW;IACpC,QAAQ,EAAE,CAAC,oBAAQ,CAAC,GAAG,CAAC;IACxB,KAAK,EAAE,KAAK;IACZ,WAAW,EAAE,KAAK;IAClB,SAAS,EAAE,KAAK;IAChB,GAAG,EAAE,wBAAwB;IAC7B,MAAM,EAAE,KAAK;CACd,CAAC;AAEF,IAAM,WAAW,GAAY;IAC3B,MAAM,EAAE;QACN,IAAI,EAAE;YACJ,KAAK,EAAE,MAAM;SACd;QACD,YAAY,EAAE;YACZ,IAAI,EAAE,UAAU;SACjB;QACD,OAAO,EAAE;YACP,IAAI,EAAE,WAAW;SAClB;KACF;CACF,CAAC;AAEF,QAAQ,CAAC,WAAW,EAAE;IACpB,IAAI,CAAC,4BAA4B,EAAE;QACjC,IAAM,WAAW,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC,yBAAyB,CAAC,CAAC;QACzE,IAAM,MAAM,GAAG,IAAI,qBAAS,CAAC,IAAI,CAAC,CAAC;QACnC,MAAM,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC;QACvC,IAAM,KAAK,GAAG,MAAM,CAAC,0BAA0B,CAAC,WAAW,CAAC,CAAC;QAC7D,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;QAC7D,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC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C,IAAI,CAAC,WAAW,CAAC,CAAC;QACpD,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACzC,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC;IACxE,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,yBAAyB,EAAE;QAC9B,IAAM,WAAW,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC,2BAA2B,CAAC,CAAC;QAC3E,IAAM,MAAM,GAAG,IAAI,qBAAS,CAAC,IAAI,CAAC,CAAC;QACnC,MAAM,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC;QACvC,IAAM,KAAK,GAAG,MAAM,CAAC,0BAA0B,CAAC,WAAW,CAAC,CAAC;QAC7D,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;aACjC,IAAI,CAAC,yJAKX,CAAC,CAAC;IACD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["/// <reference types=\"jest\" />\nimport type { Answers } from 'inquirer';\n\nimport type { Args} from '../../Constants';\nimport { Integration, Platform } from '../../Constants';\nimport { SentryCli } from '../SentryCli';\n\nconst args: Args = {\n debug: false,\n integration: Integration.reactNative,\n platform: [Platform.ios],\n quiet: false,\n skipConnect: false,\n uninstall: false,\n url: 'https://localhost:1234',\n signup: false,\n};\n\nconst demoAnswers: Answers = {\n config: {\n auth: {\n token: 'abcd',\n },\n organization: {\n slug: 'test_org',\n },\n project: {\n slug: 'test_proj',\n },\n },\n};\n\ndescribe('SentryCli', () => {\n test('convertAnswersToProperties', () => {\n const resolveFunc = jest.fn().mockReturnValue('node_modules/sentry/cli');\n const sentry = new SentryCli(args);\n sentry.setResolveFunction(resolveFunc);\n const props = sentry.convertAnswersToProperties(demoAnswers);\n expect(props['defaults/url']).toBe('https://localhost:1234');\n expect(props['defaults/org']).toBe('test_org');\n expect(props['defaults/project']).toBe('test_proj');\n expect(props['auth/token']).toBe('abcd');\n expect(props['cli/executable']).toBe('node_modules/sentry/cli');\n });\n\n test('dump properties', () => {\n const resolveFunc = jest.fn().mockReturnValue('node_modules/sentry/cli');\n const sentry = new SentryCli(args);\n sentry.setResolveFunction(resolveFunc);\n const props = sentry.convertAnswersToProperties(demoAnswers);\n expect(sentry.dumpProperties(props))\n .toBe(`defaults.url=https://localhost:1234\ndefaults.org=test_org\ndefaults.project=test_proj\nauth.token=abcd\ncli.executable=node_modules/sentry/cli\n`);\n });\n\n test('convertAnswersToProperties windows', () => {\n const resolveFunc = jest.fn().mockReturnValue('node_modules\\\\sentry\\\\cli');\n const sentry = new SentryCli(args);\n sentry.setResolveFunction(resolveFunc);\n const props = sentry.convertAnswersToProperties(demoAnswers);\n expect(props['defaults/url']).toBe('https://localhost:1234');\n expect(props['defaults/org']).toBe('test_org');\n expect(props['defaults/project']).toBe('test_proj');\n expect(props['auth/token']).toBe('abcd');\n expect(props['cli/executable']).toBe('node_modules\\\\\\\\sentry\\\\\\\\cli');\n });\n\n test('dump properties windows', () => {\n const resolveFunc = jest.fn().mockReturnValue('node_modules\\\\sentry\\\\cli');\n const sentry = new SentryCli(args);\n sentry.setResolveFunction(resolveFunc);\n const props = sentry.convertAnswersToProperties(demoAnswers);\n expect(sentry.dumpProperties(props))\n .toBe(`defaults.url=https://localhost:1234\ndefaults.org=test_org\ndefaults.project=test_proj\nauth.token=abcd\ncli.executable=node_modules\\\\\\\\sentry\\\\\\\\cli\n`);\n });\n});\n"]}
1
+ {"version":3,"file":"SentryCli.js","sourceRoot":"","sources":["../../../../lib/Helper/__tests__/SentryCli.ts"],"names":[],"mappings":";;AAIA,6CAAwD;AACxD,0CAAyC;AAEzC,IAAM,IAAI,GAAS;IACjB,KAAK,EAAE,KAAK;IACZ,WAAW,EAAE,uBAAW,CAAC,WAAW;IACpC,QAAQ,EAAE,CAAC,oBAAQ,CAAC,GAAG,CA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,MAAM,GAAG,IAAI,qBAAS,CAAC,IAAI,CAAC,CAAC;QACnC,MAAM,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC;QACvC,IAAM,KAAK,GAAG,MAAM,CAAC,0BAA0B,CAAC,WAAW,CAAC,CAAC;QAC7D,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;aACjC,IAAI,CAAC,yJAKX,CAAC,CAAC;IACD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["/// <reference types=\"jest\" />\nimport type { Answers } from 'inquirer';\n\nimport type { Args } from '../../Constants';\nimport { Integration, Platform } from '../../Constants';\nimport { SentryCli } from '../SentryCli';\n\nconst args: Args = {\n debug: false,\n integration: Integration.reactNative,\n platform: [Platform.ios],\n quiet: false,\n skipConnect: false,\n uninstall: false,\n url: 'https://localhost:1234',\n signup: false,\n disableTelemetry: false,\n};\n\nconst demoAnswers: Answers = {\n config: {\n auth: {\n token: 'abcd',\n },\n organization: {\n slug: 'test_org',\n },\n project: {\n slug: 'test_proj',\n },\n },\n};\n\ndescribe('SentryCli', () => {\n test('convertAnswersToProperties', () => {\n const resolveFunc = jest.fn().mockReturnValue('node_modules/sentry/cli');\n const sentry = new SentryCli(args);\n sentry.setResolveFunction(resolveFunc);\n const props = sentry.convertAnswersToProperties(demoAnswers);\n expect(props['defaults/url']).toBe('https://localhost:1234');\n expect(props['defaults/org']).toBe('test_org');\n expect(props['defaults/project']).toBe('test_proj');\n expect(props['auth/token']).toBe('abcd');\n expect(props['cli/executable']).toBe('node_modules/sentry/cli');\n });\n\n test('dump properties', () => {\n const resolveFunc = jest.fn().mockReturnValue('node_modules/sentry/cli');\n const sentry = new SentryCli(args);\n sentry.setResolveFunction(resolveFunc);\n const props = sentry.convertAnswersToProperties(demoAnswers);\n expect(sentry.dumpProperties(props))\n .toBe(`defaults.url=https://localhost:1234\ndefaults.org=test_org\ndefaults.project=test_proj\nauth.token=abcd\ncli.executable=node_modules/sentry/cli\n`);\n });\n\n test('convertAnswersToProperties windows', () => {\n const resolveFunc = jest.fn().mockReturnValue('node_modules\\\\sentry\\\\cli');\n const sentry = new SentryCli(args);\n sentry.setResolveFunction(resolveFunc);\n const props = sentry.convertAnswersToProperties(demoAnswers);\n expect(props['defaults/url']).toBe('https://localhost:1234');\n expect(props['defaults/org']).toBe('test_org');\n expect(props['defaults/project']).toBe('test_proj');\n expect(props['auth/token']).toBe('abcd');\n expect(props['cli/executable']).toBe('node_modules\\\\\\\\sentry\\\\\\\\cli');\n });\n\n test('dump properties windows', () => {\n const resolveFunc = jest.fn().mockReturnValue('node_modules\\\\sentry\\\\cli');\n const sentry = new SentryCli(args);\n sentry.setResolveFunction(resolveFunc);\n const props = sentry.convertAnswersToProperties(demoAnswers);\n expect(sentry.dumpProperties(props))\n .toBe(`defaults.url=https://localhost:1234\ndefaults.org=test_org\ndefaults.project=test_proj\nauth.token=abcd\ncli.executable=node_modules\\\\\\\\sentry\\\\\\\\cli\n`);\n });\n});\n"]}
@@ -85,6 +85,7 @@ var Electron_1 = require("./Integrations/Electron");
85
85
  var NextJsShim_1 = require("./Integrations/NextJsShim");
86
86
  var ReactNative_1 = require("./Integrations/ReactNative");
87
87
  var SourceMapsShim_1 = require("./Integrations/SourceMapsShim");
88
+ var Apple_1 = require("./Integrations/Apple");
88
89
  var SvelteKitShim_1 = require("./Integrations/SvelteKitShim");
89
90
  var projectPackage = {};
90
91
  try {
@@ -124,6 +125,9 @@ var ChooseIntegration = /** @class */ (function (_super) {
124
125
  case Constants_1.Integration.sourcemaps:
125
126
  integration = new SourceMapsShim_1.SourceMapsShim(this._argv);
126
127
  break;
128
+ case Constants_1.Integration.ios:
129
+ integration = new Apple_1.Apple(this._argv);
130
+ break;
127
131
  case Constants_1.Integration.reactNative:
128
132
  default:
129
133
  integration = new ReactNative_1.ReactNative(sanitizeUrl(this._argv));
@@ -1 +1 @@
1
- {"version":3,"file":"ChooseIntegration.js","sourceRoot":"","sources":["../../../lib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;;;;GAIG;AACH,SAAS,WAAW,CAAC,IAAU;IAC7B,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,GAAG,GAAG,uBAAW,CAAC;QACvB,IAAA,gBAAG,EAAC,uCAAgC,IAAI,CAAC,GAAG,CAAE,CAAC,CAAC;QAChD,OAAO,IAAI,CAAC;KACb;IAED,IAAI,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC;IACvB,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;IAC5C,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;IAC/C,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC;IAEnB,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import type { Answers } from 'inquirer';\nimport { prompt } from 'inquirer';\nimport * as _ from 'lodash';\nimport { dim } from 'picocolors';\n\nimport {\n Args,\n DEFAULT_URL,\n getIntegrationChoices,\n Integration,\n} from '../Constants';\nimport { BaseStep } from './BaseStep';\nimport { Cordova } from './Integrations/Cordova';\nimport { Electron } from './Integrations/Electron';\nimport { NextJsShim } from './Integrations/NextJsShim';\nimport { ReactNative } from './Integrations/ReactNative';\nimport { SourceMapsShim } from './Integrations/SourceMapsShim';\nimport { SvelteKitShim } from './Integrations/SvelteKitShim';\n\nlet projectPackage: any = {};\n\ntry {\n // If we run directly in setup-wizard\n projectPackage = require('../../package.json');\n} catch {\n projectPackage = require(`${process.cwd()}/package.json`);\n}\n\ntype IntegrationPromptAnswer = {\n integration: Integration;\n};\n\nexport class ChooseIntegration extends BaseStep {\n public async emit(_answers: Answers): Promise<Answers> {\n const integrationPrompt = await this._getIntegrationPromptSelection();\n\n let integration = null;\n switch (integrationPrompt.integration) {\n case Integration.cordova:\n integration = new Cordova(sanitizeUrl(this._argv));\n break;\n case Integration.electron:\n integration = new Electron(sanitizeUrl(this._argv));\n break;\n case Integration.nextjs:\n integration = new NextJsShim(this._argv);\n break;\n case Integration.sveltekit:\n integration = new SvelteKitShim(this._argv);\n break;\n case Integration.sourcemaps:\n integration = new SourceMapsShim(this._argv);\n break;\n case Integration.reactNative:\n default:\n integration = new ReactNative(sanitizeUrl(this._argv));\n break;\n }\n\n return { integration };\n }\n\n public tryDetectingIntegration(): Integration | undefined {\n if (_.has(projectPackage, 'dependencies.react-native')) {\n return Integration.reactNative;\n }\n if (_.has(projectPackage, 'dependencies.cordova')) {\n return Integration.cordova;\n }\n return;\n }\n\n private async _getIntegrationPromptSelection(): Promise<IntegrationPromptAnswer> {\n // If we receive project type as an arg we skip asking\n if (this._argv.integration) {\n return { integration: this._argv.integration };\n } else {\n if (this._argv.quiet) {\n throw new Error('You need to choose a integration');\n }\n\n const detectedDefaultSelection = this.tryDetectingIntegration();\n\n return prompt([\n {\n choices: getIntegrationChoices(),\n default: detectedDefaultSelection,\n message: 'What integration do you want to set up?',\n name: 'integration',\n type: 'list',\n },\n ]);\n }\n }\n}\n\n/**\n * For the `clack`-based wizard flows, which we only shim here, we don't set\n * a default url value. For backwards-compatibility with the other flows,\n * we fill it here and sanitize a user-enterd url.\n */\nfunction sanitizeUrl(argv: Args): Args {\n if (!argv.url) {\n argv.url = DEFAULT_URL;\n dim(`no URL provided, fallback to ${argv.url}`);\n return argv;\n }\n\n let baseUrl = argv.url;\n baseUrl += baseUrl.endsWith('/') ? '' : '/';\n baseUrl = baseUrl.replace(/:\\/(?!\\/)/g, '://');\n argv.url = baseUrl;\n\n return argv;\n}\n"]}
1
+ {"version":3,"file":"ChooseIntegration.js","sourceRoot":"","sources":["../../../lib/Steps/ChooseIntegration.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,qCAAkC;AAClC,wCAA4B;AAC5B,yCAAiC;AAEjC,0CAKsB;AACtB,uC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C,GAAG,EAAE;QACb,IAAI,CAAC,GAAG,GAAG,uBAAW,CAAC;QACvB,IAAA,gBAAG,EAAC,uCAAgC,IAAI,CAAC,GAAG,CAAE,CAAC,CAAC;QAChD,OAAO,IAAI,CAAC;KACb;IAED,IAAI,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC;IACvB,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;IAC5C,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;IAC/C,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC;IAEnB,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import type { Answers } from 'inquirer';\nimport { prompt } from 'inquirer';\nimport * as _ from 'lodash';\nimport { dim } from 'picocolors';\n\nimport {\n Args,\n DEFAULT_URL,\n getIntegrationChoices,\n Integration,\n} from '../Constants';\nimport { BaseStep } from './BaseStep';\nimport { Cordova } from './Integrations/Cordova';\nimport { Electron } from './Integrations/Electron';\nimport { NextJsShim } from './Integrations/NextJsShim';\nimport { ReactNative } from './Integrations/ReactNative';\nimport { SourceMapsShim } from './Integrations/SourceMapsShim';\nimport { Apple } from './Integrations/Apple';\nimport { SvelteKitShim } from './Integrations/SvelteKitShim';\n\nlet projectPackage: any = {};\n\ntry {\n // If we run directly in setup-wizard\n projectPackage = require('../../package.json');\n} catch {\n projectPackage = require(`${process.cwd()}/package.json`);\n}\n\ntype IntegrationPromptAnswer = {\n integration: Integration;\n};\n\nexport class ChooseIntegration extends BaseStep {\n public async emit(_answers: Answers): Promise<Answers> {\n const integrationPrompt = await this._getIntegrationPromptSelection();\n\n let integration = null;\n switch (integrationPrompt.integration) {\n case Integration.cordova:\n integration = new Cordova(sanitizeUrl(this._argv));\n break;\n case Integration.electron:\n integration = new Electron(sanitizeUrl(this._argv));\n break;\n case Integration.nextjs:\n integration = new NextJsShim(this._argv);\n break;\n case Integration.sveltekit:\n integration = new SvelteKitShim(this._argv);\n break;\n case Integration.sourcemaps:\n integration = new SourceMapsShim(this._argv);\n break;\n case Integration.ios:\n integration = new Apple(this._argv);\n break;\n case Integration.reactNative:\n default:\n integration = new ReactNative(sanitizeUrl(this._argv));\n break;\n }\n\n return { integration };\n }\n\n public tryDetectingIntegration(): Integration | undefined {\n if (_.has(projectPackage, 'dependencies.react-native')) {\n return Integration.reactNative;\n }\n if (_.has(projectPackage, 'dependencies.cordova')) {\n return Integration.cordova;\n }\n return;\n }\n\n private async _getIntegrationPromptSelection(): Promise<IntegrationPromptAnswer> {\n // If we receive project type as an arg we skip asking\n if (this._argv.integration) {\n return { integration: this._argv.integration };\n } else {\n if (this._argv.quiet) {\n throw new Error('You need to choose a integration');\n }\n\n const detectedDefaultSelection = this.tryDetectingIntegration();\n\n return prompt([\n {\n choices: getIntegrationChoices(),\n default: detectedDefaultSelection,\n message: 'What integration do you want to set up?',\n name: 'integration',\n type: 'list',\n },\n ]);\n }\n }\n}\n\n/**\n * For the `clack`-based wizard flows, which we only shim here, we don't set\n * a default url value. For backwards-compatibility with the other flows,\n * we fill it here and sanitize a user-enterd url.\n */\nfunction sanitizeUrl(argv: Args): Args {\n if (!argv.url) {\n argv.url = DEFAULT_URL;\n dim(`no URL provided, fallback to ${argv.url}`);\n return argv;\n }\n\n let baseUrl = argv.url;\n baseUrl += baseUrl.endsWith('/') ? '' : '/';\n baseUrl = baseUrl.replace(/:\\/(?!\\/)/g, '://');\n argv.url = baseUrl;\n\n return argv;\n}\n"]}
@@ -0,0 +1,10 @@
1
+ import { Answers } from 'inquirer';
2
+ import type { Args } from '../../Constants';
3
+ import { BaseIntegration } from './BaseIntegration';
4
+ export declare class Apple extends BaseIntegration {
5
+ protected _argv: Args;
6
+ argv: Args;
7
+ constructor(_argv: Args);
8
+ emit(_answers: Answers): Promise<Answers>;
9
+ shouldConfigure(_answers: Answers): Promise<Answers>;
10
+ }
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
+ return new (P || (P = Promise))(function (resolve, reject) {
20
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
21
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
22
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
23
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
24
+ });
25
+ };
26
+ var __generator = (this && this.__generator) || function (thisArg, body) {
27
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
28
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
29
+ function verb(n) { return function (v) { return step([n, v]); }; }
30
+ function step(op) {
31
+ if (f) throw new TypeError("Generator is already executing.");
32
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
33
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
34
+ if (y = 0, t) op = [op[0] & 2, t.value];
35
+ switch (op[0]) {
36
+ case 0: case 1: t = op; break;
37
+ case 4: _.label++; return { value: op[1], done: false };
38
+ case 5: _.label++; y = op[1]; op = [0]; continue;
39
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
40
+ default:
41
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
42
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
43
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
44
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
45
+ if (t[2]) _.ops.pop();
46
+ _.trys.pop(); continue;
47
+ }
48
+ op = body.call(thisArg, _);
49
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
50
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
51
+ }
52
+ };
53
+ Object.defineProperty(exports, "__esModule", { value: true });
54
+ exports.Apple = void 0;
55
+ var BaseIntegration_1 = require("./BaseIntegration");
56
+ var apple_wizard_1 = require("../../../src/apple/apple-wizard");
57
+ var Apple = /** @class */ (function (_super) {
58
+ __extends(Apple, _super);
59
+ function Apple(_argv) {
60
+ var _this = _super.call(this, _argv) || this;
61
+ _this._argv = _argv;
62
+ _this.argv = _argv;
63
+ return _this;
64
+ }
65
+ Apple.prototype.emit = function (_answers) {
66
+ return __awaiter(this, void 0, void 0, function () {
67
+ return __generator(this, function (_a) {
68
+ switch (_a.label) {
69
+ case 0: return [4 /*yield*/, (0, apple_wizard_1.runAppleWizard)({
70
+ promoCode: this._argv.promoCode,
71
+ url: this._argv.url,
72
+ telemetryEnabled: !this._argv.disableTelemetry,
73
+ // eslint-disable-next-line no-console
74
+ }).catch(console.error)];
75
+ case 1:
76
+ _a.sent();
77
+ return [2 /*return*/, {}];
78
+ }
79
+ });
80
+ });
81
+ };
82
+ Apple.prototype.shouldConfigure = function (_answers) {
83
+ return __awaiter(this, void 0, void 0, function () {
84
+ return __generator(this, function (_a) {
85
+ return [2 /*return*/, this._shouldConfigure];
86
+ });
87
+ });
88
+ };
89
+ return Apple;
90
+ }(BaseIntegration_1.BaseIntegration));
91
+ exports.Apple = Apple;
92
+ //# sourceMappingURL=Apple.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Apple.js","sourceRoot":"","sources":["../../../../lib/Steps/Integrations/Apple.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,qDAAoD;AACpD,gEAAiE;AAEjE;IAA2B,yBAAe;IAExC,eAA6B,KAAW;QAAxC,YACE,kBAAM,KAAK,CAAC,SAEb;QAH4B,WAAK,GAAL,KAAK,CAAM;QAEtC,KAAI,CAAC,IAAI,GAAG,KAAK,CAAC;;IACpB,CAAC;IAEY,oBAAI,GAAjB,UAAkB,QAAiB;;;;4BACjC,qBAAM,IAAA,6BAAc,EAAC;4BACnB,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS;4BAC/B,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG;4BACnB,gBAAgB,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB;4BAC9C,sCAAsC;yBACvC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAA;;wBALvB,SAKuB,CAAC;wBAExB,sBAAO,EAAE,EAAC;;;;KACX;IAEY,+BAAe,GAA5B,UAA6B,QAAiB;;;gBAC5C,sBAAO,IAAI,CAAC,gBAAgB,EAAC;;;KAC9B;IACH,YAAC;AAAD,CAAC,AArBD,CAA2B,iCAAe,GAqBzC;AArBY,sBAAK","sourcesContent":["import { Answers } from 'inquirer';\nimport type { Args } from '../../Constants';\nimport { BaseIntegration } from './BaseIntegration';\nimport { runAppleWizard } from '../../../src/apple/apple-wizard';\n\nexport class Apple extends BaseIntegration {\n argv: Args;\n public constructor(protected _argv: Args) {\n super(_argv);\n this.argv = _argv;\n }\n\n public async emit(_answers: Answers): Promise<Answers> {\n await runAppleWizard({\n promoCode: this._argv.promoCode,\n url: this._argv.url,\n telemetryEnabled: !this._argv.disableTelemetry,\n // eslint-disable-next-line no-console\n }).catch(console.error);\n\n return {};\n }\n\n public async shouldConfigure(_answers: Answers): Promise<Answers> {\n return this._shouldConfigure;\n }\n}\n"]}
@@ -72,6 +72,7 @@ var NextJsShim = /** @class */ (function (_super) {
72
72
  case 0: return [4 /*yield*/, (0, nextjs_wizard_1.runNextjsWizard)({
73
73
  promoCode: this._argv.promoCode,
74
74
  url: this._argv.url,
75
+ telemetryEnabled: !this._argv.disableTelemetry,
75
76
  })];
76
77
  case 1:
77
78
  _a.sent();
@@ -1 +1 @@
1
- {"version":3,"file":"NextJsShim.js","sourceRoot":"","sources":["../../../../lib/Steps/Integrations/NextJsShim.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,mEAAoE;AAGpE,qDAAoD;AAEpD;;;GAGG;AACH;IAAgC,8BAAe;IAC7C,oBAA6B,KAAW;QAAxC,YACE,kBAAM,KAAK,CAAC,SACb;QAF4B,WAAK,GAAL,KAAK,CAAM;;IAExC,CAAC;IAEY,yBAAI,GAAjB,UAAkB,QAAiB;;;;4BACjC,qBAAM,IAAA,+BAAe,EAAC;4BACpB,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS;4BAC/B,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG;yBACpB,CAAC,EAAA;;wBAHF,SAGE,CAAC;wBACH,sBAAO,EAAE,EAAC;;;;KACX;IAEY,oCAAe,GAA5B,UAA6B,QAAiB;;;gBAC5C,kEAAkE;gBAClE,IAAI,IAAI,CAAC,gBAAgB,EAAE;oBACzB,sBAAO,IAAI,CAAC,gBAAgB,EAAC;iBAC9B;gBACD,6DAA6D;gBAC7D,sBAAO,IAAI,CAAC,eAAe,EAAC;;;KAC7B;IACH,iBAAC;AAAD,CAAC,AArBD,CAAgC,iCAAe,GAqB9C;AArBY,gCAAU","sourcesContent":["import type { Answers } from 'inquirer';\nimport { runNextjsWizard } from '../../../src/nextjs/nextjs-wizard';\n\nimport type { Args } from '../../Constants';\nimport { BaseIntegration } from './BaseIntegration';\n\n/**\n * This class just redirects to the new `nextjs-wizard.ts` flow\n * for anyone calling the wizard without the '-i nextjs' flag.\n */\nexport class NextJsShim extends BaseIntegration {\n public constructor(protected _argv: Args) {\n super(_argv);\n }\n\n public async emit(_answers: Answers): Promise<Answers> {\n await runNextjsWizard({\n promoCode: this._argv.promoCode,\n url: this._argv.url,\n });\n return {};\n }\n\n public async shouldConfigure(_answers: Answers): Promise<Answers> {\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n if (this._shouldConfigure) {\n return this._shouldConfigure;\n }\n // eslint-disable-next-line @typescript-eslint/unbound-method\n return this.shouldConfigure;\n }\n}\n"]}
1
+ {"version":3,"file":"NextJsShim.js","sourceRoot":"","sources":["../../../../lib/Steps/Integrations/NextJsShim.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,mEAAoE;AAGpE,qDAAoD;AAEpD;;;GAGG;AACH;IAAgC,8BAAe;IAC7C,oBAA6B,KAAW;QAAxC,YACE,kBAAM,KAAK,CAAC,SACb;QAF4B,WAAK,GAAL,KAAK,CAAM;;IAExC,CAAC;IAEY,yBAAI,GAAjB,UAAkB,QAAiB;;;;4BACjC,qBAAM,IAAA,+BAAe,EAAC;4BACpB,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS;4BAC/B,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG;4BACnB,gBAAgB,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB;yBAC/C,CAAC,EAAA;;wBAJF,SAIE,CAAC;wBACH,sBAAO,EAAE,EAAC;;;;KACX;IAEY,oCAAe,GAA5B,UAA6B,QAAiB;;;gBAC5C,kEAAkE;gBAClE,IAAI,IAAI,CAAC,gBAAgB,EAAE;oBACzB,sBAAO,IAAI,CAAC,gBAAgB,EAAC;iBAC9B;gBACD,6DAA6D;gBAC7D,sBAAO,IAAI,CAAC,eAAe,EAAC;;;KAC7B;IACH,iBAAC;AAAD,CAAC,AAtBD,CAAgC,iCAAe,GAsB9C;AAtBY,gCAAU","sourcesContent":["import type { Answers } from 'inquirer';\nimport { runNextjsWizard } from '../../../src/nextjs/nextjs-wizard';\n\nimport type { Args } from '../../Constants';\nimport { BaseIntegration } from './BaseIntegration';\n\n/**\n * This class just redirects to the new `nextjs-wizard.ts` flow\n * for anyone calling the wizard without the '-i nextjs' flag.\n */\nexport class NextJsShim extends BaseIntegration {\n public constructor(protected _argv: Args) {\n super(_argv);\n }\n\n public async emit(_answers: Answers): Promise<Answers> {\n await runNextjsWizard({\n promoCode: this._argv.promoCode,\n url: this._argv.url,\n telemetryEnabled: !this._argv.disableTelemetry,\n });\n return {};\n }\n\n public async shouldConfigure(_answers: Answers): Promise<Answers> {\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n if (this._shouldConfigure) {\n return this._shouldConfigure;\n }\n // eslint-disable-next-line @typescript-eslint/unbound-method\n return this.shouldConfigure;\n }\n}\n"]}
@@ -3,7 +3,7 @@ import type { Args } from '../../Constants';
3
3
  import { BaseIntegration } from './BaseIntegration';
4
4
  /**
5
5
  * This class just redirects to the `sourcemaps-wizard.ts` flow
6
- * for anyone calling the wizard without the '-i sveltekit' flag.
6
+ * for anyone calling the wizard without the '-i sourcemaps' flag.
7
7
  */
8
8
  export declare class SourceMapsShim extends BaseIntegration {
9
9
  protected _argv: Args;
@@ -56,7 +56,7 @@ var sourcemaps_wizard_1 = require("../../../src/sourcemaps/sourcemaps-wizard");
56
56
  var BaseIntegration_1 = require("./BaseIntegration");
57
57
  /**
58
58
  * This class just redirects to the `sourcemaps-wizard.ts` flow
59
- * for anyone calling the wizard without the '-i sveltekit' flag.
59
+ * for anyone calling the wizard without the '-i sourcemaps' flag.
60
60
  */
61
61
  var SourceMapsShim = /** @class */ (function (_super) {
62
62
  __extends(SourceMapsShim, _super);
@@ -72,6 +72,7 @@ var SourceMapsShim = /** @class */ (function (_super) {
72
72
  case 0: return [4 /*yield*/, (0, sourcemaps_wizard_1.runSourcemapsWizard)({
73
73
  promoCode: this._argv.promoCode,
74
74
  url: this._argv.url,
75
+ telemetryEnabled: !this._argv.disableTelemetry,
75
76
  })];
76
77
  case 1:
77
78
  _a.sent();
@@ -1 +1 @@
1
- {"version":3,"file":"SourceMapsShim.js","sourceRoot":"","sources":["../../../../lib/Steps/Integrations/SourceMapsShim.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,+EAAgF;AAGhF,qDAAoD;AAEpD;;;GAGG;AACH;IAAoC,kCAAe;IACjD,wBAA6B,KAAW;QAAxC,YACE,kBAAM,KAAK,CAAC,SACb;QAF4B,WAAK,GAAL,KAAK,CAAM;;IAExC,CAAC;IAEY,6BAAI,GAAjB,UAAkB,QAAiB;;;;4BACjC,qBAAM,IAAA,uCAAmB,EAAC;4BACxB,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS;4BAC/B,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG;yBACpB,CAAC,EAAA;;wBAHF,SAGE,CAAC;wBACH,sBAAO,EAAE,EAAC;;;;KACX;IAEY,wCAAe,GAA5B,UAA6B,QAAiB;;;gBAC5C,sBAAO,IAAI,CAAC,gBAAgB,EAAC;;;KAC9B;IACH,qBAAC;AAAD,CAAC,AAhBD,CAAoC,iCAAe,GAgBlD;AAhBY,wCAAc","sourcesContent":["import type { Answers } from 'inquirer';\nimport { runSourcemapsWizard } from '../../../src/sourcemaps/sourcemaps-wizard';\n\nimport type { Args } from '../../Constants';\nimport { BaseIntegration } from './BaseIntegration';\n\n/**\n * This class just redirects to the `sourcemaps-wizard.ts` flow\n * for anyone calling the wizard without the '-i sveltekit' flag.\n */\nexport class SourceMapsShim extends BaseIntegration {\n public constructor(protected _argv: Args) {\n super(_argv);\n }\n\n public async emit(_answers: Answers): Promise<Answers> {\n await runSourcemapsWizard({\n promoCode: this._argv.promoCode,\n url: this._argv.url,\n });\n return {};\n }\n\n public async shouldConfigure(_answers: Answers): Promise<Answers> {\n return this._shouldConfigure;\n }\n}\n"]}
1
+ {"version":3,"file":"SourceMapsShim.js","sourceRoot":"","sources":["../../../../lib/Steps/Integrations/SourceMapsShim.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,+EAAgF;AAGhF,qDAAoD;AAEpD;;;GAGG;AACH;IAAoC,kCAAe;IACjD,wBAA6B,KAAW;QAAxC,YACE,kBAAM,KAAK,CAAC,SACb;QAF4B,WAAK,GAAL,KAAK,CAAM;;IAExC,CAAC;IAEY,6BAAI,GAAjB,UAAkB,QAAiB;;;;4BACjC,qBAAM,IAAA,uCAAmB,EAAC;4BACxB,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS;4BAC/B,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG;4BACnB,gBAAgB,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB;yBAC/C,CAAC,EAAA;;wBAJF,SAIE,CAAC;wBACH,sBAAO,EAAE,EAAC;;;;KACX;IAEY,wCAAe,GAA5B,UAA6B,QAAiB;;;gBAC5C,sBAAO,IAAI,CAAC,gBAAgB,EAAC;;;KAC9B;IACH,qBAAC;AAAD,CAAC,AAjBD,CAAoC,iCAAe,GAiBlD;AAjBY,wCAAc","sourcesContent":["import type { Answers } from 'inquirer';\nimport { runSourcemapsWizard } from '../../../src/sourcemaps/sourcemaps-wizard';\n\nimport type { Args } from '../../Constants';\nimport { BaseIntegration } from './BaseIntegration';\n\n/**\n * This class just redirects to the `sourcemaps-wizard.ts` flow\n * for anyone calling the wizard without the '-i sourcemaps' flag.\n */\nexport class SourceMapsShim extends BaseIntegration {\n public constructor(protected _argv: Args) {\n super(_argv);\n }\n\n public async emit(_answers: Answers): Promise<Answers> {\n await runSourcemapsWizard({\n promoCode: this._argv.promoCode,\n url: this._argv.url,\n telemetryEnabled: !this._argv.disableTelemetry,\n });\n return {};\n }\n\n public async shouldConfigure(_answers: Answers): Promise<Answers> {\n return this._shouldConfigure;\n }\n}\n"]}
@@ -72,6 +72,7 @@ var SvelteKitShim = /** @class */ (function (_super) {
72
72
  case 0: return [4 /*yield*/, (0, sveltekit_wizard_1.runSvelteKitWizard)({
73
73
  promoCode: this._argv.promoCode,
74
74
  url: this._argv.url,
75
+ telemetryEnabled: !this._argv.disableTelemetry,
75
76
  })];
76
77
  case 1:
77
78
  _a.sent();
@@ -1 +1 @@
1
- {"version":3,"file":"SvelteKitShim.js","sourceRoot":"","sources":["../../../../lib/Steps/Integrations/SvelteKitShim.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,4EAA6E;AAG7E,qDAAoD;AAEpD;;;GAGG;AACH;IAAmC,iCAAe;IAChD,uBAA6B,KAAW;QAAxC,YACE,kBAAM,KAAK,CAAC,SACb;QAF4B,WAAK,GAAL,KAAK,CAAM;;IAExC,CAAC;IAEY,4BAAI,GAAjB,UAAkB,QAAiB;;;;4BACjC,qBAAM,IAAA,qCAAkB,EAAC;4BACvB,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS;4BAC/B,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG;yBACpB,CAAC,EAAA;;wBAHF,SAGE,CAAC;wBACH,sBAAO,EAAE,EAAC;;;;KACX;IAEY,uCAAe,GAA5B,UAA6B,QAAiB;;;gBAC5C,kEAAkE;gBAClE,IAAI,IAAI,CAAC,gBAAgB,EAAE;oBACzB,sBAAO,IAAI,CAAC,gBAAgB,EAAC;iBAC9B;gBACD,6DAA6D;gBAC7D,sBAAO,IAAI,CAAC,eAAe,EAAC;;;KAC7B;IACH,oBAAC;AAAD,CAAC,AArBD,CAAmC,iCAAe,GAqBjD;AArBY,sCAAa","sourcesContent":["import type { Answers } from 'inquirer';\nimport { runSvelteKitWizard } from '../../../src/sveltekit/sveltekit-wizard';\n\nimport type { Args } from '../../Constants';\nimport { BaseIntegration } from './BaseIntegration';\n\n/**\n * This class just redirects to the new `sveltekit-wizard.ts` flow\n * for anyone calling the wizard without the '-i sveltekit' flag.\n */\nexport class SvelteKitShim extends BaseIntegration {\n public constructor(protected _argv: Args) {\n super(_argv);\n }\n\n public async emit(_answers: Answers): Promise<Answers> {\n await runSvelteKitWizard({\n promoCode: this._argv.promoCode,\n url: this._argv.url,\n });\n return {};\n }\n\n public async shouldConfigure(_answers: Answers): Promise<Answers> {\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n if (this._shouldConfigure) {\n return this._shouldConfigure;\n }\n // eslint-disable-next-line @typescript-eslint/unbound-method\n return this.shouldConfigure;\n }\n}\n"]}
1
+ {"version":3,"file":"SvelteKitShim.js","sourceRoot":"","sources":["../../../../lib/Steps/Integrations/SvelteKitShim.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,4EAA6E;AAG7E,qDAAoD;AAEpD;;;GAGG;AACH;IAAmC,iCAAe;IAChD,uBAA6B,KAAW;QAAxC,YACE,kBAAM,KAAK,CAAC,SACb;QAF4B,WAAK,GAAL,KAAK,CAAM;;IAExC,CAAC;IAEY,4BAAI,GAAjB,UAAkB,QAAiB;;;;4BACjC,qBAAM,IAAA,qCAAkB,EAAC;4BACvB,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS;4BAC/B,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG;4BACnB,gBAAgB,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB;yBAC/C,CAAC,EAAA;;wBAJF,SAIE,CAAC;wBACH,sBAAO,EAAE,EAAC;;;;KACX;IAEY,uCAAe,GAA5B,UAA6B,QAAiB;;;gBAC5C,kEAAkE;gBAClE,IAAI,IAAI,CAAC,gBAAgB,EAAE;oBACzB,sBAAO,IAAI,CAAC,gBAAgB,EAAC;iBAC9B;gBACD,6DAA6D;gBAC7D,sBAAO,IAAI,CAAC,eAAe,EAAC;;;KAC7B;IACH,oBAAC;AAAD,CAAC,AAtBD,CAAmC,iCAAe,GAsBjD;AAtBY,sCAAa","sourcesContent":["import type { Answers } from 'inquirer';\nimport { runSvelteKitWizard } from '../../../src/sveltekit/sveltekit-wizard';\n\nimport type { Args } from '../../Constants';\nimport { BaseIntegration } from './BaseIntegration';\n\n/**\n * This class just redirects to the new `sveltekit-wizard.ts` flow\n * for anyone calling the wizard without the '-i sveltekit' flag.\n */\nexport class SvelteKitShim extends BaseIntegration {\n public constructor(protected _argv: Args) {\n super(_argv);\n }\n\n public async emit(_answers: Answers): Promise<Answers> {\n await runSvelteKitWizard({\n promoCode: this._argv.promoCode,\n url: this._argv.url,\n telemetryEnabled: !this._argv.disableTelemetry,\n });\n return {};\n }\n\n public async shouldConfigure(_answers: Answers): Promise<Answers> {\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n if (this._shouldConfigure) {\n return this._shouldConfigure;\n }\n // eslint-disable-next-line @typescript-eslint/unbound-method\n return this.shouldConfigure;\n }\n}\n"]}
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/wizard",
3
- "version": "3.5.0",
3
+ "version": "3.7.0",
4
4
  "homepage": "https://github.com/getsentry/sentry-wizard",
5
5
  "repository": "https://github.com/getsentry/sentry-wizard",
6
6
  "description": "Sentry wizard helping you to configure your project",
@@ -26,7 +26,7 @@
26
26
  "@clack/core": "0.3.2",
27
27
  "@clack/prompts": "0.6.3",
28
28
  "@sentry/cli": "^1.72.0",
29
- "@sentry/node": "^7.56.0",
29
+ "@sentry/node": "^7.57.0",
30
30
  "axios": "1.3.5",
31
31
  "chalk": "^2.4.1",
32
32
  "glob": "^7.1.3",
@@ -0,0 +1,2 @@
1
+ import { WizardOptions } from '../utils/types';
2
+ export declare function runAppleWizard(options: WizardOptions): Promise<void>;