@andre1502/react-utilities 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (186) hide show
  1. package/README.md +340 -0
  2. package/dist/Config/Config.d.ts +28 -0
  3. package/dist/Config/Config.js +200 -0
  4. package/dist/Config/Config.js.map +1 -0
  5. package/dist/Config/GoogleAuth.d.ts +15 -0
  6. package/dist/Config/GoogleAuth.js +71 -0
  7. package/dist/Config/GoogleAuth.js.map +1 -0
  8. package/dist/Config/Locales.d.ts +18 -0
  9. package/dist/Config/Locales.js +62 -0
  10. package/dist/Config/Locales.js.map +1 -0
  11. package/dist/Config/Output.d.ts +10 -0
  12. package/dist/Config/Output.js +28 -0
  13. package/dist/Config/Output.js.map +1 -0
  14. package/dist/Config/Sitemap.d.ts +13 -0
  15. package/dist/Config/Sitemap.js +73 -0
  16. package/dist/Config/Sitemap.js.map +1 -0
  17. package/dist/Format/NumberFormat.d.ts +6 -0
  18. package/dist/Format/NumberFormat.js +77 -0
  19. package/dist/Format/NumberFormat.js.map +1 -0
  20. package/dist/Format/NumberParser.d.ts +9 -0
  21. package/dist/Format/NumberParser.js +51 -0
  22. package/dist/Format/NumberParser.js.map +1 -0
  23. package/dist/React-BaJ1KfGF.js +87 -0
  24. package/dist/React-BaJ1KfGF.js.map +1 -0
  25. package/dist/React-qUl0CBmE.js +109 -0
  26. package/dist/React-qUl0CBmE.js.map +1 -0
  27. package/dist/ReactNative-CqUrY2ZJ.js +3856 -0
  28. package/dist/ReactNative-CqUrY2ZJ.js.map +1 -0
  29. package/dist/ReactNative-mNnws-b5.js +3834 -0
  30. package/dist/ReactNative-mNnws-b5.js.map +1 -0
  31. package/dist/Sentry/Build.d.ts +9 -0
  32. package/dist/Sentry/Build.js +88 -0
  33. package/dist/Sentry/Build.js.map +1 -0
  34. package/dist/Sentry/React.d.ts +18 -0
  35. package/dist/Sentry/React.js +104 -0
  36. package/dist/Sentry/React.js.map +1 -0
  37. package/dist/Sentry/ReactNative.d.ts +18 -0
  38. package/dist/Sentry/ReactNative.js +114 -0
  39. package/dist/Sentry/ReactNative.js.map +1 -0
  40. package/dist/Sentry/Utils.d.ts +2 -0
  41. package/dist/Sentry/Utils.js +24 -0
  42. package/dist/Sentry/Utils.js.map +1 -0
  43. package/dist/Utils/Files.d.ts +7 -0
  44. package/dist/Utils/Files.js +52 -0
  45. package/dist/Utils/Files.js.map +1 -0
  46. package/dist/Utils-Cq948gfa.js +20 -0
  47. package/dist/Utils-Cq948gfa.js.map +1 -0
  48. package/dist/Utils-Dilye04y.js +22 -0
  49. package/dist/Utils-Dilye04y.js.map +1 -0
  50. package/dist/config-cli.cjs +471 -0
  51. package/dist/config-cli.cjs.map +1 -0
  52. package/dist/config-cli.d.ts +34 -0
  53. package/dist/config-cli.js +220 -0
  54. package/dist/config-cli.js.map +1 -0
  55. package/dist/config-cli.mjs +443 -0
  56. package/dist/config-cli.mjs.map +1 -0
  57. package/dist/enums/CurrencySymbolEnum.d.ts +5 -0
  58. package/dist/enums/CurrencySymbolEnum.js +13 -0
  59. package/dist/enums/CurrencySymbolEnum.js.map +1 -0
  60. package/dist/format.cjs +122 -0
  61. package/dist/format.cjs.map +1 -0
  62. package/dist/format.d.ts +3 -0
  63. package/dist/format.js +55 -0
  64. package/dist/format.js.map +1 -0
  65. package/dist/format.mjs +117 -0
  66. package/dist/format.mjs.map +1 -0
  67. package/dist/index-cli.cjs +24 -0
  68. package/dist/index-cli.cjs.map +1 -0
  69. package/dist/index-cli.d.ts +2 -0
  70. package/dist/index-cli.js +28 -0
  71. package/dist/index-cli.js.map +1 -0
  72. package/dist/index-cli.mjs +12 -0
  73. package/dist/index-cli.mjs.map +1 -0
  74. package/dist/index-fmt.cjs +16 -0
  75. package/dist/index-fmt.cjs.map +1 -0
  76. package/dist/index-fmt.d.ts +1 -0
  77. package/dist/index-fmt.js +17 -0
  78. package/dist/index-fmt.js.map +1 -0
  79. package/dist/index-fmt.mjs +3 -0
  80. package/dist/index-fmt.mjs.map +1 -0
  81. package/dist/index-rn.cjs +21 -0
  82. package/dist/index-rn.cjs.map +1 -0
  83. package/dist/index-rn.d.ts +2 -0
  84. package/dist/index-rn.js +28 -0
  85. package/dist/index-rn.js.map +1 -0
  86. package/dist/index-rn.mjs +6 -0
  87. package/dist/index-rn.mjs.map +1 -0
  88. package/dist/index.cjs +21 -0
  89. package/dist/index.cjs.map +1 -0
  90. package/dist/index.d.ts +2 -0
  91. package/dist/index.js +28 -0
  92. package/dist/index.js.map +1 -0
  93. package/dist/index.mjs +6 -0
  94. package/dist/index.mjs.map +1 -0
  95. package/dist/interfaces/Config/ConfigOptions.d.ts +8 -0
  96. package/dist/interfaces/Config/ConfigOptions.js +6 -0
  97. package/dist/interfaces/Config/ConfigOptions.js.map +1 -0
  98. package/dist/interfaces/Config/OutputMap.d.ts +3 -0
  99. package/dist/interfaces/Config/OutputMap.js +6 -0
  100. package/dist/interfaces/Config/OutputMap.js.map +1 -0
  101. package/dist/interfaces/Config/OutputOptions.d.ts +7 -0
  102. package/dist/interfaces/Config/OutputOptions.js +6 -0
  103. package/dist/interfaces/Config/OutputOptions.js.map +1 -0
  104. package/dist/interfaces/Config/SitemapMap.d.ts +5 -0
  105. package/dist/interfaces/Config/SitemapMap.js +6 -0
  106. package/dist/interfaces/Config/SitemapMap.js.map +1 -0
  107. package/dist/interfaces/Config/StringMap.d.ts +3 -0
  108. package/dist/interfaces/Config/StringMap.js +6 -0
  109. package/dist/interfaces/Config/StringMap.js.map +1 -0
  110. package/dist/interfaces/Format/FormatOptions.d.ts +14 -0
  111. package/dist/interfaces/Format/FormatOptions.js +6 -0
  112. package/dist/interfaces/Format/FormatOptions.js.map +1 -0
  113. package/dist/interfaces/Sentry/InitOptions.d.ts +20 -0
  114. package/dist/interfaces/Sentry/InitOptions.js +6 -0
  115. package/dist/interfaces/Sentry/InitOptions.js.map +1 -0
  116. package/dist/interfaces/Sentry/InitOptionsRN.d.ts +4 -0
  117. package/dist/interfaces/Sentry/InitOptionsRN.js +6 -0
  118. package/dist/interfaces/Sentry/InitOptionsRN.js.map +1 -0
  119. package/dist/interfaces/Sentry/SourceMapOptions.d.ts +7 -0
  120. package/dist/interfaces/Sentry/SourceMapOptions.js +6 -0
  121. package/dist/interfaces/Sentry/SourceMapOptions.js.map +1 -0
  122. package/dist/sentry-cli.cjs +119 -0
  123. package/dist/sentry-cli.cjs.map +1 -0
  124. package/dist/sentry-cli.d.ts +9 -0
  125. package/dist/sentry-cli.js +50 -0
  126. package/dist/sentry-cli.js.map +1 -0
  127. package/dist/sentry-cli.mjs +98 -0
  128. package/dist/sentry-cli.mjs.map +1 -0
  129. package/dist/sentry-rn.cjs +11 -0
  130. package/dist/sentry-rn.cjs.map +1 -0
  131. package/dist/sentry-rn.d.ts +2 -0
  132. package/dist/sentry-rn.js +28 -0
  133. package/dist/sentry-rn.js.map +1 -0
  134. package/dist/sentry-rn.mjs +4 -0
  135. package/dist/sentry-rn.mjs.map +1 -0
  136. package/dist/sentry.cjs +11 -0
  137. package/dist/sentry.cjs.map +1 -0
  138. package/dist/sentry.d.ts +2 -0
  139. package/dist/sentry.js +28 -0
  140. package/dist/sentry.js.map +1 -0
  141. package/dist/sentry.mjs +4 -0
  142. package/dist/sentry.mjs.map +1 -0
  143. package/dist/types/Config/OptionType.d.ts +2 -0
  144. package/dist/types/Config/OptionType.js +6 -0
  145. package/dist/types/Config/OptionType.js.map +1 -0
  146. package/dist/types/Format/OptionType.d.ts +3 -0
  147. package/dist/types/Format/OptionType.js +6 -0
  148. package/dist/types/Format/OptionType.js.map +1 -0
  149. package/dist/types/Sentry/OptionType.d.ts +1 -0
  150. package/dist/types/Sentry/OptionType.js +6 -0
  151. package/dist/types/Sentry/OptionType.js.map +1 -0
  152. package/package.json +139 -0
  153. package/src/Config/Config.ts +258 -0
  154. package/src/Config/GoogleAuth.ts +54 -0
  155. package/src/Config/Locales.ts +72 -0
  156. package/src/Config/Output.ts +29 -0
  157. package/src/Config/Sitemap.ts +67 -0
  158. package/src/Format/NumberFormat.ts +96 -0
  159. package/src/Format/NumberParser.ts +42 -0
  160. package/src/Sentry/Build.ts +67 -0
  161. package/src/Sentry/React.ts +127 -0
  162. package/src/Sentry/ReactNative.ts +133 -0
  163. package/src/Sentry/Utils.ts +26 -0
  164. package/src/Utils/Files.ts +51 -0
  165. package/src/config-cli.ts +152 -0
  166. package/src/enums/CurrencySymbolEnum.ts +5 -0
  167. package/src/format.ts +39 -0
  168. package/src/index-cli.ts +2 -0
  169. package/src/index-fmt.ts +1 -0
  170. package/src/index-rn.ts +2 -0
  171. package/src/index.ts +2 -0
  172. package/src/interfaces/Config/ConfigOptions.ts +9 -0
  173. package/src/interfaces/Config/OutputMap.ts +3 -0
  174. package/src/interfaces/Config/OutputOptions.ts +8 -0
  175. package/src/interfaces/Config/SitemapMap.ts +5 -0
  176. package/src/interfaces/Config/StringMap.ts +3 -0
  177. package/src/interfaces/Format/FormatOptions.ts +19 -0
  178. package/src/interfaces/Sentry/InitOptions.ts +23 -0
  179. package/src/interfaces/Sentry/InitOptionsRN.ts +5 -0
  180. package/src/interfaces/Sentry/SourceMapOptions.ts +7 -0
  181. package/src/sentry-cli.ts +16 -0
  182. package/src/sentry-rn.ts +2 -0
  183. package/src/sentry.ts +2 -0
  184. package/src/types/Config/OptionType.ts +2 -0
  185. package/src/types/Format/OptionType.ts +15 -0
  186. package/src/types/Sentry/OptionType.ts +1 -0
@@ -0,0 +1,20 @@
1
+ import { StringRegexArr } from '../../types/Sentry/OptionType';
2
+ export interface HttpClientIntegrationOptions {
3
+ failedRequestStatusCodes: ([number, number] | number)[];
4
+ failedRequestTargets: StringRegexArr;
5
+ }
6
+ export interface CaptureConsoleIntegrationOptions {
7
+ levels: string[];
8
+ }
9
+ export interface InitOptions {
10
+ env: string;
11
+ dsn: string;
12
+ debug: boolean;
13
+ release: string;
14
+ requiredEnvForSendToSentry?: string[];
15
+ ignoreErrorsOptions?: StringRegexArr;
16
+ httpClientIntegrationOptions?: HttpClientIntegrationOptions;
17
+ captureConsoleIntegrationOptions?: CaptureConsoleIntegrationOptions;
18
+ beforeSend?: (event: any, hint: any) => any;
19
+ options?: any;
20
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=InitOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InitOptions.js","names":[],"sources":["../../../src/interfaces/Sentry/InitOptions.ts"],"sourcesContent":["import { StringRegexArr } from '../../types/Sentry/OptionType';\n\nexport interface HttpClientIntegrationOptions {\n failedRequestStatusCodes: ([number, number] | number)[];\n failedRequestTargets: StringRegexArr;\n}\n\nexport interface CaptureConsoleIntegrationOptions {\n levels: string[];\n}\n\nexport interface InitOptions {\n env: string;\n dsn: string;\n debug: boolean;\n release: string;\n requiredEnvForSendToSentry?: string[];\n ignoreErrorsOptions?: StringRegexArr;\n httpClientIntegrationOptions?: HttpClientIntegrationOptions;\n captureConsoleIntegrationOptions?: CaptureConsoleIntegrationOptions;\n beforeSend?: (event: any, hint: any) => any;\n options?: any;\n}\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ import { InitOptions } from './InitOptions';
2
+ export interface InitOptionsRN extends Omit<InitOptions, 'release'> {
3
+ release?: string;
4
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=InitOptionsRN.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InitOptionsRN.js","names":[],"sources":["../../../src/interfaces/Sentry/InitOptionsRN.ts"],"sourcesContent":["import { InitOptions } from './InitOptions';\n\nexport interface InitOptionsRN extends Omit<InitOptions, 'release'> {\n release?: string;\n}\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,7 @@
1
+ export interface SourceMapOptions {
2
+ env: string;
3
+ release: string;
4
+ includeFolder: string[];
5
+ urlPrefix: string;
6
+ requiredEnvForSourceMap: string[];
7
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=SourceMapOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SourceMapOptions.js","names":[],"sources":["../../../src/interfaces/Sentry/SourceMapOptions.ts"],"sourcesContent":["export interface SourceMapOptions {\n env: string;\n release: string;\n includeFolder: string[];\n urlPrefix: string;\n requiredEnvForSourceMap: string[];\n}\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,119 @@
1
+ 'use strict';
2
+
3
+ var SentryCli = require('@sentry/cli');
4
+ var fs = require('fs');
5
+ var path = require('path');
6
+
7
+ function _interopNamespaceDefault(e) {
8
+ var n = Object.create(null);
9
+ if (e) {
10
+ Object.keys(e).forEach(function (k) {
11
+ if (k !== 'default') {
12
+ var d = Object.getOwnPropertyDescriptor(e, k);
13
+ Object.defineProperty(n, k, d.get ? d : {
14
+ enumerable: true,
15
+ get: function () { return e[k]; }
16
+ });
17
+ }
18
+ });
19
+ }
20
+ n.default = e;
21
+ return Object.freeze(n);
22
+ }
23
+
24
+ var path__namespace = /*#__PURE__*/_interopNamespaceDefault(path);
25
+
26
+ /**
27
+ * @param {string} path - The path.
28
+ * @returns {boolean} Whether path is a directory, otherwise always false.
29
+ */
30
+ const isDir = path => {
31
+ try {
32
+ const stat = fs.lstatSync(path);
33
+ return stat.isDirectory();
34
+ } catch (error) {
35
+ // lstatSync throws an error if path doesn't exist
36
+ return false;
37
+ }
38
+ };
39
+ /**
40
+ * @param {string} dirPath - Directory path.
41
+ * @param {string[]} exts - List of Extension file need to be removed.
42
+ * @returns {void}
43
+ */
44
+ const deleteFile = (dirPath, exts) => {
45
+ fs.readdir(dirPath, (err, files) => {
46
+ if (err) {
47
+ console.error(err);
48
+ }
49
+ files.forEach(file => {
50
+ const fileDir = path__namespace.join(`${dirPath}/${file}`);
51
+ // Get the extension name of the file, lowercase it, then see if it is in the array of extensions
52
+ // defined above. If so, remove it.
53
+ if (isDir(fileDir)) {
54
+ deleteFile(fileDir, exts);
55
+ return;
56
+ }
57
+ if (file.toLowerCase() === '.ds_store' || exts.includes(path__namespace.extname(file).toLowerCase())) {
58
+ fs.unlinkSync(fileDir);
59
+ console.log(`File: ${fileDir} deleted successfully.`);
60
+ }
61
+ });
62
+ });
63
+ };
64
+
65
+ // sentry-cli sourcemaps inject --org <org> --project <project> ./build/static/js && sentry-cli sourcemaps upload --org <org> --project <project> ./build/static/js
66
+ /**
67
+ * Create Sentry release and upload to Sentry host.
68
+ *
69
+ * @param {SourceMapOptions} options
70
+ * @return {Promise<void>}
71
+ */
72
+ const releaseSourceMap = async options => {
73
+ if (!options.requiredEnvForSourceMap || options.requiredEnvForSourceMap.length <= 0) {
74
+ options.requiredEnvForSourceMap = ['production'];
75
+ }
76
+ if (!options.urlPrefix) {
77
+ options.urlPrefix = '';
78
+ }
79
+ if (!options.includeFolder || options.includeFolder.length <= 0) {
80
+ console.error('includeFolder value is empty.');
81
+ return;
82
+ }
83
+ if (!options.requiredEnvForSourceMap.includes(options.env)) {
84
+ console.log('No need to upload sentry source map, required env:', options.requiredEnvForSourceMap);
85
+ options.includeFolder.forEach(folder => deleteFile(folder, ['.map']));
86
+ return;
87
+ }
88
+ try {
89
+ const cli = new SentryCli();
90
+ console.log('Now creating sentry release ' + options.release);
91
+ await cli.releases.new(options.release);
92
+ console.log('Now uploading source maps');
93
+ await cli.releases.uploadSourceMaps(options.release, {
94
+ urlPrefix: options.urlPrefix,
95
+ include: options.includeFolder,
96
+ rewrite: true,
97
+ validate: true,
98
+ useArtifactBundle: true
99
+ });
100
+ console.log('Releasing release');
101
+ await cli.releases.finalize(options.release);
102
+ options.includeFolder.forEach(folder => deleteFile(folder, ['.map']));
103
+ } catch (ex) {
104
+ console.error('Source maps uploading failed:', ex);
105
+ }
106
+ };
107
+
108
+ /**
109
+ * Create and upload sentry release source map.
110
+ *
111
+ * @param {SourceMapOption} options
112
+ * @return {Promise<void>}
113
+ */
114
+ const releaseSentrySourceMap = async options => {
115
+ await releaseSourceMap(options);
116
+ };
117
+
118
+ exports.releaseSentrySourceMap = releaseSentrySourceMap;
119
+ //# sourceMappingURL=sentry-cli.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sentry-cli.cjs","sources":["../src/Utils/Files.ts","../src/Sentry/Build.ts","../src/sentry-cli.ts"],"sourcesContent":[null,null,null],"names":["isDir","path","stat","lstatSync","isDirectory","error","deleteFile","dirPath","exts","readdir","err","files","console","forEach","file","fileDir","join","toLowerCase","includes","extname","unlinkSync","log","releaseSourceMap","options","requiredEnvForSourceMap","length","urlPrefix","includeFolder","env","folder","cli","SentryCli","release","releases","new","uploadSourceMaps","include","rewrite","validate","useArtifactBundle","finalize","ex","releaseSentrySourceMap"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAGA;;;AAGG;AACH,MAAMA,KAAK,GAAIC,IAAY,IAAa;EACtC,IAAI;AACF,IAAA,MAAMC,IAAI,GAAGC,YAAS,CAACF,IAAI,CAAC,CAAA;AAC5B,IAAA,OAAOC,IAAI,CAACE,WAAW,EAAE,CAAA;GAC1B,CAAC,OAAOC,KAAK,EAAE;AACd;AACA,IAAA,OAAO,KAAK,CAAA;AACd,GAAA;AACF,CAAC,CAAA;AAED;;;;AAIG;AACH,MAAMC,UAAU,GAAGA,CAACC,OAAe,EAAEC,IAAc,KAAU;AAC3DC,EAAAA,UAAO,CAACF,OAAO,EAAE,CAACG,GAAG,EAAEC,KAAK,KAAI;AAC9B,IAAA,IAAID,GAAG,EAAE;AACPE,MAAAA,OAAO,CAACP,KAAK,CAACK,GAAG,CAAC,CAAA;AACpB,KAAA;AAEAC,IAAAA,KAAK,CAACE,OAAO,CAAEC,IAAI,IAAI;MACrB,MAAMC,OAAO,GAAGd,eAAI,CAACe,IAAI,CAAC,CAAA,EAAGT,OAAO,CAAA,CAAA,EAAIO,IAAI,CAAA,CAAE,CAAC,CAAA;AAC/C;AACA;AAEA,MAAA,IAAId,KAAK,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'./interfaces/Sentry/SourceMapOptions';
2
+ export * from './interfaces/Sentry/SourceMapOptions';
3
+ /**
4
+ * Create and upload sentry release source map.
5
+ *
6
+ * @param {SourceMapOption} options
7
+ * @return {Promise<void>}
8
+ */
9
+ export declare const releaseSentrySourceMap: (options: SourceMapOptions) => Promise<void>;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ var _exportNames = {
8
+ releaseSentrySourceMap: true
9
+ };
10
+ exports.releaseSentrySourceMap = void 0;
11
+ var _Build = require("./Sentry/Build");
12
+ var _SourceMapOptions = require("./interfaces/Sentry/SourceMapOptions");
13
+ Object.keys(_SourceMapOptions).forEach(function (key) {
14
+ if (key === "default" || key === "__esModule") return;
15
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
16
+ if (key in exports && exports[key] === _SourceMapOptions[key]) return;
17
+ Object.defineProperty(exports, key, {
18
+ enumerable: true,
19
+ get: function get() {
20
+ return _SourceMapOptions[key];
21
+ }
22
+ });
23
+ });
24
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
25
+ function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
26
+ function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
27
+ /**
28
+ * Create and upload sentry release source map.
29
+ *
30
+ * @param {SourceMapOption} options
31
+ * @return {Promise<void>}
32
+ */
33
+ var releaseSentrySourceMap = exports.releaseSentrySourceMap = /*#__PURE__*/function () {
34
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(options) {
35
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
36
+ while (1) switch (_context.prev = _context.next) {
37
+ case 0:
38
+ _context.next = 2;
39
+ return (0, _Build.releaseSourceMap)(options);
40
+ case 2:
41
+ case "end":
42
+ return _context.stop();
43
+ }
44
+ }, _callee);
45
+ }));
46
+ return function releaseSentrySourceMap(_x) {
47
+ return _ref.apply(this, arguments);
48
+ };
49
+ }();
50
+ //# sourceMappingURL=sentry-cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sentry-cli.js","names":["_Build","require","_SourceMapOptions","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_regeneratorRuntime","e","t","r","n","o","value","i","Symbol","a","iterator","c","asyncIterator","u","toStringTag","define","configurable","writable","wrap","Generator","create","Context","makeInvokeMethod","tryCatch","type","arg","h","l","f","s","y","GeneratorFunction","GeneratorFunctionPrototype","p","d","getPrototypeOf","v","values","g","defineIteratorMethods","_invoke","AsyncIterator","invoke","_typeof","resolve","__await","then","callInvokeWithMethodAndArg","Error","done","method","delegate","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","resultName","next","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","isNaN","length","displayName","isGeneratorFunction","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","reverse","pop","prev","charAt","slice","stop","rval","handle","complete","finish","_catch","delegateYield","asyncGeneratorStep","_asyncToGenerator","arguments","apply","_next","_throw","releaseSentrySourceMap","_ref","_callee","options","_callee$","_context","releaseSourceMap","_x"],"sources":["../src/sentry-cli.ts"],"sourcesContent":["import { releaseSourceMap } from './Sentry/Build';\nimport { SourceMapOptions } from './interfaces/Sentry/SourceMapOptions';\n\nexport * from './interfaces/Sentry/SourceMapOptions';\n\n/**\n * Create and upload sentry release source map.\n *\n * @param {SourceMapOption} options\n * @return {Promise<void>}\n */\nexport const releaseSentrySourceMap = async (\n options: SourceMapOptions,\n): Promise<void> => {\n await releaseSourceMap(options);\n};\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAGA,IAAAC,iBAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,iBAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,iBAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAZ,iBAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AAAqD,SAAAS,oBAAA,kBAFrD,qJAAAA,mBAAA,YAAAA,oBAAA,WAAAC,CAAA,SAAAC,CAAA,EAAAD,CAAA,OAAAE,CAAA,GAAAf,MAAA,CAAAI,SAAA,EAAAY,CAAA,GAAAD,CAAA,CAAAV,cAAA,EAAAY,CAAA,GAAAjB,MAAA,CAAAS,cAAA,cAAAK,CAAA,EAAAD,CAAA,EAAAE,CAAA,IAAAD,CAAA,CAAAD,CAAA,IAAAE,CAAA,CAAAG,KAAA,KAAAC,CAAA,wBAAAC,MAAA,GAAAA,MAAA,OAAAC,CAAA,GAAAF,CAAA,CAAAG,QAAA,kBAAAC,CAAA,GAAAJ,CAAA,CAAAK,aAAA,uBAAAC,CAAA,GAAAN,CAAA,CAAAO,WAAA,8BAAAC,OAAAb,CAAA,EAAAD,CAAA,EAAAE,CAAA,WAAAf,MAAA,CAAAS,cAAA,CAAAK,CAAA,EAAAD,CAAA,IAAAK,KAAA,EAAAH,CAAA,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'fs';
3
+ import * as path from 'path';
4
+
5
+ /**
6
+ * @param {string} path - The path.
7
+ * @returns {boolean} Whether path is a directory, otherwise always false.
8
+ */
9
+ const isDir = path => {
10
+ try {
11
+ const stat = lstatSync(path);
12
+ return stat.isDirectory();
13
+ } catch (error) {
14
+ // lstatSync throws an error if path doesn't exist
15
+ return false;
16
+ }
17
+ };
18
+ /**
19
+ * @param {string} dirPath - Directory path.
20
+ * @param {string[]} exts - List of Extension file need to be removed.
21
+ * @returns {void}
22
+ */
23
+ const deleteFile = (dirPath, exts) => {
24
+ readdir(dirPath, (err, files) => {
25
+ if (err) {
26
+ console.error(err);
27
+ }
28
+ files.forEach(file => {
29
+ const fileDir = path.join(`${dirPath}/${file}`);
30
+ // Get the extension name of the file, lowercase it, then see if it is in the array of extensions
31
+ // defined above. If so, remove it.
32
+ if (isDir(fileDir)) {
33
+ deleteFile(fileDir, exts);
34
+ return;
35
+ }
36
+ if (file.toLowerCase() === '.ds_store' || exts.includes(path.extname(file).toLowerCase())) {
37
+ unlinkSync(fileDir);
38
+ console.log(`File: ${fileDir} deleted successfully.`);
39
+ }
40
+ });
41
+ });
42
+ };
43
+
44
+ // sentry-cli sourcemaps inject --org <org> --project <project> ./build/static/js && sentry-cli sourcemaps upload --org <org> --project <project> ./build/static/js
45
+ /**
46
+ * Create Sentry release and upload to Sentry host.
47
+ *
48
+ * @param {SourceMapOptions} options
49
+ * @return {Promise<void>}
50
+ */
51
+ const releaseSourceMap = async options => {
52
+ if (!options.requiredEnvForSourceMap || options.requiredEnvForSourceMap.length <= 0) {
53
+ options.requiredEnvForSourceMap = ['production'];
54
+ }
55
+ if (!options.urlPrefix) {
56
+ options.urlPrefix = '';
57
+ }
58
+ if (!options.includeFolder || options.includeFolder.length <= 0) {
59
+ console.error('includeFolder value is empty.');
60
+ return;
61
+ }
62
+ if (!options.requiredEnvForSourceMap.includes(options.env)) {
63
+ console.log('No need to upload sentry source map, required env:', options.requiredEnvForSourceMap);
64
+ options.includeFolder.forEach(folder => deleteFile(folder, ['.map']));
65
+ return;
66
+ }
67
+ try {
68
+ const cli = new SentryCli();
69
+ console.log('Now creating sentry release ' + options.release);
70
+ await cli.releases.new(options.release);
71
+ console.log('Now uploading source maps');
72
+ await cli.releases.uploadSourceMaps(options.release, {
73
+ urlPrefix: options.urlPrefix,
74
+ include: options.includeFolder,
75
+ rewrite: true,
76
+ validate: true,
77
+ useArtifactBundle: true
78
+ });
79
+ console.log('Releasing release');
80
+ await cli.releases.finalize(options.release);
81
+ options.includeFolder.forEach(folder => deleteFile(folder, ['.map']));
82
+ } catch (ex) {
83
+ console.error('Source maps uploading failed:', ex);
84
+ }
85
+ };
86
+
87
+ /**
88
+ * Create and upload sentry release source map.
89
+ *
90
+ * @param {SourceMapOption} options
91
+ * @return {Promise<void>}
92
+ */
93
+ const releaseSentrySourceMap = async options => {
94
+ await releaseSourceMap(options);
95
+ };
96
+
97
+ export { releaseSentrySourceMap };
98
+ //# sourceMappingURL=sentry-cli.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sentry-cli.mjs","sources":["../src/Utils/Files.ts","../src/Sentry/Build.ts","../src/sentry-cli.ts"],"sourcesContent":[null,null,null],"names":["isDir","path","stat","lstatSync","isDirectory","error","deleteFile","dirPath","exts","readdir","err","files","console","forEach","file","fileDir","join","toLowerCase","includes","extname","unlinkSync","log","releaseSourceMap","options","requiredEnvForSourceMap","length","urlPrefix","includeFolder","env","folder","cli","SentryCli","release","releases","new","uploadSourceMaps","include","rewrite","validate","useArtifactBundle","finalize","ex","releaseSentrySourceMap"],"mappings":";;;;AAGA;;;AAGG;AACH,MAAMA,KAAK,GAAIC,IAAY,IAAa;EACtC,IAAI;AACF,IAAA,MAAMC,IAAI,GAAGC,SAAS,CAACF,IAAI,CAAC,CAAA;AAC5B,IAAA,OAAOC,IAAI,CAACE,WAAW,EAAE,CAAA;GAC1B,CAAC,OAAOC,KAAK,EAAE;AACd;AACA,IAAA,OAAO,KAAK,CAAA;AACd,G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O,QAAQ,CAACjB,OAAO,CAACS,OAAO,CAAC,CAAA;AAE5CT,IAAAA,OAAO,CAACI,aAAa,CAACd,OAAO,CAAEgB,MAAM,IAAKvB,UAAU,CAACuB,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;GACxE,CAAC,OAAOY,EAAE,EAAE;AACX7B,IAAAA,OAAO,CAACP,KAAK,CAAC,+BAA+B,EAAEoC,EAAE,CAAC,CAAA;AACpD,GAAA;AACF,CAAC;;AC3DD;;;;;AAKG;AACUC,MAAAA,sBAAsB,GAAG,MACpCnB,OAAyB,IACR;EACjB,MAAMD,gBAAgB,CAACC,OAAO,CAAC,CAAA;AACjC;;;;"}
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ var ReactNative = require('./ReactNative-CqUrY2ZJ.js');
4
+ require('@sentry/react-native');
5
+ require('./Utils-Dilye04y.js');
6
+
7
+
8
+
9
+ exports.initSentry = ReactNative.initSentry;
10
+ exports.recordAdditionalSentryHttp = ReactNative.recordAdditionalSentryHttp;
11
+ //# sourceMappingURL=sentry-rn.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sentry-rn.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
@@ -0,0 +1,2 @@
1
+ export * from './Sentry/ReactNative';
2
+ export * from './interfaces/Sentry/InitOptionsRN';
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _ReactNative = require("./Sentry/ReactNative");
7
+ Object.keys(_ReactNative).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _ReactNative[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function get() {
13
+ return _ReactNative[key];
14
+ }
15
+ });
16
+ });
17
+ var _InitOptionsRN = require("./interfaces/Sentry/InitOptionsRN");
18
+ Object.keys(_InitOptionsRN).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _InitOptionsRN[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function get() {
24
+ return _InitOptionsRN[key];
25
+ }
26
+ });
27
+ });
28
+ //# sourceMappingURL=sentry-rn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sentry-rn.js","names":["_ReactNative","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_InitOptionsRN"],"sources":["../src/sentry-rn.ts"],"sourcesContent":["export * from './Sentry/ReactNative';\nexport * from './interfaces/Sentry/InitOptionsRN';\n"],"mappings":";;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,YAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,YAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAT,YAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,cAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,cAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,cAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAC,cAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ export { i as initSentry, r as recordAdditionalSentryHttp } from './ReactNative-mNnws-b5.js';
2
+ import '@sentry/react-native';
3
+ import './Utils-Cq948gfa.js';
4
+ //# sourceMappingURL=sentry-rn.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sentry-rn.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ var React = require('./React-qUl0CBmE.js');
4
+ require('@sentry/react');
5
+ require('./Utils-Dilye04y.js');
6
+
7
+
8
+
9
+ exports.initSentry = React.initSentry;
10
+ exports.recordAdditionalSentryHttp = React.recordAdditionalSentryHttp;
11
+ //# sourceMappingURL=sentry.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sentry.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
@@ -0,0 +1,2 @@
1
+ export * from './Sentry/React';
2
+ export * from './interfaces/Sentry/InitOptions';
package/dist/sentry.js ADDED
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _React = require("./Sentry/React");
7
+ Object.keys(_React).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _React[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function get() {
13
+ return _React[key];
14
+ }
15
+ });
16
+ });
17
+ var _InitOptions = require("./interfaces/Sentry/InitOptions");
18
+ Object.keys(_InitOptions).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _InitOptions[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function get() {
24
+ return _InitOptions[key];
25
+ }
26
+ });
27
+ });
28
+ //# sourceMappingURL=sentry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sentry.js","names":["_React","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_InitOptions"],"sources":["../src/sentry.ts"],"sourcesContent":["export * from './Sentry/React';\nexport * from './interfaces/Sentry/InitOptions';\n"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,MAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,MAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAT,MAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,YAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,YAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,YAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAC,YAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ export { i as initSentry, r as recordAdditionalSentryHttp } from './React-BaJ1KfGF.js';
2
+ import '@sentry/react';
3
+ import './Utils-Cq948gfa.js';
4
+ //# sourceMappingURL=sentry.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sentry.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -0,0 +1,2 @@
1
+ export type ExportAs = 'ts' | 'json' | 'js' | 'env';
2
+ export type FormatAs = 'locales' | 'config';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=OptionType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OptionType.js","names":[],"sources":["../../../src/types/Config/OptionType.ts"],"sourcesContent":["export type ExportAs = 'ts' | 'json' | 'js' | 'env';\nexport type FormatAs = 'locales' | 'config';\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,3 @@
1
+ export type StyleCurrency = 'currency' | 'unit' | 'decimal' | 'percent' | undefined;
2
+ export type CurrencyDisplay = 'symbol' | 'code' | 'name' | 'narrowSymbol' | undefined;
3
+ export type TrailingZeroDisplay = 'auto' | 'stripIfInteger';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=OptionType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OptionType.js","names":[],"sources":["../../../src/types/Format/OptionType.ts"],"sourcesContent":["export type StyleCurrency =\n | 'currency'\n | 'unit'\n | 'decimal'\n | 'percent'\n | undefined;\n\nexport type CurrencyDisplay =\n | 'symbol'\n | 'code'\n | 'name'\n | 'narrowSymbol'\n | undefined;\n\nexport type TrailingZeroDisplay = 'auto' | 'stripIfInteger';\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1 @@
1
+ export type StringRegexArr = (string | RegExp)[];
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=OptionType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OptionType.js","names":[],"sources":["../../../src/types/Sentry/OptionType.ts"],"sourcesContent":["export type StringRegexArr = (string | RegExp)[];\n"],"mappings":"","ignoreList":[]}