@andre1502/react-utilities 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +340 -0
- package/dist/Config/Config.d.ts +28 -0
- package/dist/Config/Config.js +200 -0
- package/dist/Config/Config.js.map +1 -0
- package/dist/Config/GoogleAuth.d.ts +15 -0
- package/dist/Config/GoogleAuth.js +71 -0
- package/dist/Config/GoogleAuth.js.map +1 -0
- package/dist/Config/Locales.d.ts +18 -0
- package/dist/Config/Locales.js +62 -0
- package/dist/Config/Locales.js.map +1 -0
- package/dist/Config/Output.d.ts +10 -0
- package/dist/Config/Output.js +28 -0
- package/dist/Config/Output.js.map +1 -0
- package/dist/Config/Sitemap.d.ts +13 -0
- package/dist/Config/Sitemap.js +73 -0
- package/dist/Config/Sitemap.js.map +1 -0
- package/dist/Format/NumberFormat.d.ts +6 -0
- package/dist/Format/NumberFormat.js +77 -0
- package/dist/Format/NumberFormat.js.map +1 -0
- package/dist/Format/NumberParser.d.ts +9 -0
- package/dist/Format/NumberParser.js +51 -0
- package/dist/Format/NumberParser.js.map +1 -0
- package/dist/React-BaJ1KfGF.js +87 -0
- package/dist/React-BaJ1KfGF.js.map +1 -0
- package/dist/React-qUl0CBmE.js +109 -0
- package/dist/React-qUl0CBmE.js.map +1 -0
- package/dist/ReactNative-CqUrY2ZJ.js +3856 -0
- package/dist/ReactNative-CqUrY2ZJ.js.map +1 -0
- package/dist/ReactNative-mNnws-b5.js +3834 -0
- package/dist/ReactNative-mNnws-b5.js.map +1 -0
- package/dist/Sentry/Build.d.ts +9 -0
- package/dist/Sentry/Build.js +88 -0
- package/dist/Sentry/Build.js.map +1 -0
- package/dist/Sentry/React.d.ts +18 -0
- package/dist/Sentry/React.js +104 -0
- package/dist/Sentry/React.js.map +1 -0
- package/dist/Sentry/ReactNative.d.ts +18 -0
- package/dist/Sentry/ReactNative.js +114 -0
- package/dist/Sentry/ReactNative.js.map +1 -0
- package/dist/Sentry/Utils.d.ts +2 -0
- package/dist/Sentry/Utils.js +24 -0
- package/dist/Sentry/Utils.js.map +1 -0
- package/dist/Utils/Files.d.ts +7 -0
- package/dist/Utils/Files.js +52 -0
- package/dist/Utils/Files.js.map +1 -0
- package/dist/Utils-Cq948gfa.js +20 -0
- package/dist/Utils-Cq948gfa.js.map +1 -0
- package/dist/Utils-Dilye04y.js +22 -0
- package/dist/Utils-Dilye04y.js.map +1 -0
- package/dist/config-cli.cjs +471 -0
- package/dist/config-cli.cjs.map +1 -0
- package/dist/config-cli.d.ts +34 -0
- package/dist/config-cli.js +220 -0
- package/dist/config-cli.js.map +1 -0
- package/dist/config-cli.mjs +443 -0
- package/dist/config-cli.mjs.map +1 -0
- package/dist/enums/CurrencySymbolEnum.d.ts +5 -0
- package/dist/enums/CurrencySymbolEnum.js +13 -0
- package/dist/enums/CurrencySymbolEnum.js.map +1 -0
- package/dist/format.cjs +122 -0
- package/dist/format.cjs.map +1 -0
- package/dist/format.d.ts +3 -0
- package/dist/format.js +55 -0
- package/dist/format.js.map +1 -0
- package/dist/format.mjs +117 -0
- package/dist/format.mjs.map +1 -0
- package/dist/index-cli.cjs +24 -0
- package/dist/index-cli.cjs.map +1 -0
- package/dist/index-cli.d.ts +2 -0
- package/dist/index-cli.js +28 -0
- package/dist/index-cli.js.map +1 -0
- package/dist/index-cli.mjs +12 -0
- package/dist/index-cli.mjs.map +1 -0
- package/dist/index-fmt.cjs +16 -0
- package/dist/index-fmt.cjs.map +1 -0
- package/dist/index-fmt.d.ts +1 -0
- package/dist/index-fmt.js +17 -0
- package/dist/index-fmt.js.map +1 -0
- package/dist/index-fmt.mjs +3 -0
- package/dist/index-fmt.mjs.map +1 -0
- package/dist/index-rn.cjs +21 -0
- package/dist/index-rn.cjs.map +1 -0
- package/dist/index-rn.d.ts +2 -0
- package/dist/index-rn.js +28 -0
- package/dist/index-rn.js.map +1 -0
- package/dist/index-rn.mjs +6 -0
- package/dist/index-rn.mjs.map +1 -0
- package/dist/index.cjs +21 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +6 -0
- package/dist/index.mjs.map +1 -0
- package/dist/interfaces/Config/ConfigOptions.d.ts +8 -0
- package/dist/interfaces/Config/ConfigOptions.js +6 -0
- package/dist/interfaces/Config/ConfigOptions.js.map +1 -0
- package/dist/interfaces/Config/OutputMap.d.ts +3 -0
- package/dist/interfaces/Config/OutputMap.js +6 -0
- package/dist/interfaces/Config/OutputMap.js.map +1 -0
- package/dist/interfaces/Config/OutputOptions.d.ts +7 -0
- package/dist/interfaces/Config/OutputOptions.js +6 -0
- package/dist/interfaces/Config/OutputOptions.js.map +1 -0
- package/dist/interfaces/Config/SitemapMap.d.ts +5 -0
- package/dist/interfaces/Config/SitemapMap.js +6 -0
- package/dist/interfaces/Config/SitemapMap.js.map +1 -0
- package/dist/interfaces/Config/StringMap.d.ts +3 -0
- package/dist/interfaces/Config/StringMap.js +6 -0
- package/dist/interfaces/Config/StringMap.js.map +1 -0
- package/dist/interfaces/Format/FormatOptions.d.ts +14 -0
- package/dist/interfaces/Format/FormatOptions.js +6 -0
- package/dist/interfaces/Format/FormatOptions.js.map +1 -0
- package/dist/interfaces/Sentry/InitOptions.d.ts +20 -0
- package/dist/interfaces/Sentry/InitOptions.js +6 -0
- package/dist/interfaces/Sentry/InitOptions.js.map +1 -0
- package/dist/interfaces/Sentry/InitOptionsRN.d.ts +4 -0
- package/dist/interfaces/Sentry/InitOptionsRN.js +6 -0
- package/dist/interfaces/Sentry/InitOptionsRN.js.map +1 -0
- package/dist/interfaces/Sentry/SourceMapOptions.d.ts +7 -0
- package/dist/interfaces/Sentry/SourceMapOptions.js +6 -0
- package/dist/interfaces/Sentry/SourceMapOptions.js.map +1 -0
- package/dist/sentry-cli.cjs +119 -0
- package/dist/sentry-cli.cjs.map +1 -0
- package/dist/sentry-cli.d.ts +9 -0
- package/dist/sentry-cli.js +50 -0
- package/dist/sentry-cli.js.map +1 -0
- package/dist/sentry-cli.mjs +98 -0
- package/dist/sentry-cli.mjs.map +1 -0
- package/dist/sentry-rn.cjs +11 -0
- package/dist/sentry-rn.cjs.map +1 -0
- package/dist/sentry-rn.d.ts +2 -0
- package/dist/sentry-rn.js +28 -0
- package/dist/sentry-rn.js.map +1 -0
- package/dist/sentry-rn.mjs +4 -0
- package/dist/sentry-rn.mjs.map +1 -0
- package/dist/sentry.cjs +11 -0
- package/dist/sentry.cjs.map +1 -0
- package/dist/sentry.d.ts +2 -0
- package/dist/sentry.js +28 -0
- package/dist/sentry.js.map +1 -0
- package/dist/sentry.mjs +4 -0
- package/dist/sentry.mjs.map +1 -0
- package/dist/types/Config/OptionType.d.ts +2 -0
- package/dist/types/Config/OptionType.js +6 -0
- package/dist/types/Config/OptionType.js.map +1 -0
- package/dist/types/Format/OptionType.d.ts +3 -0
- package/dist/types/Format/OptionType.js +6 -0
- package/dist/types/Format/OptionType.js.map +1 -0
- package/dist/types/Sentry/OptionType.d.ts +1 -0
- package/dist/types/Sentry/OptionType.js +6 -0
- package/dist/types/Sentry/OptionType.js.map +1 -0
- package/package.json +139 -0
- package/src/Config/Config.ts +258 -0
- package/src/Config/GoogleAuth.ts +54 -0
- package/src/Config/Locales.ts +72 -0
- package/src/Config/Output.ts +29 -0
- package/src/Config/Sitemap.ts +67 -0
- package/src/Format/NumberFormat.ts +96 -0
- package/src/Format/NumberParser.ts +42 -0
- package/src/Sentry/Build.ts +67 -0
- package/src/Sentry/React.ts +127 -0
- package/src/Sentry/ReactNative.ts +133 -0
- package/src/Sentry/Utils.ts +26 -0
- package/src/Utils/Files.ts +51 -0
- package/src/config-cli.ts +152 -0
- package/src/enums/CurrencySymbolEnum.ts +5 -0
- package/src/format.ts +39 -0
- package/src/index-cli.ts +2 -0
- package/src/index-fmt.ts +1 -0
- package/src/index-rn.ts +2 -0
- package/src/index.ts +2 -0
- package/src/interfaces/Config/ConfigOptions.ts +9 -0
- package/src/interfaces/Config/OutputMap.ts +3 -0
- package/src/interfaces/Config/OutputOptions.ts +8 -0
- package/src/interfaces/Config/SitemapMap.ts +5 -0
- package/src/interfaces/Config/StringMap.ts +3 -0
- package/src/interfaces/Format/FormatOptions.ts +19 -0
- package/src/interfaces/Sentry/InitOptions.ts +23 -0
- package/src/interfaces/Sentry/InitOptionsRN.ts +5 -0
- package/src/interfaces/Sentry/SourceMapOptions.ts +7 -0
- package/src/sentry-cli.ts +16 -0
- package/src/sentry-rn.ts +2 -0
- package/src/sentry.ts +2 -0
- package/src/types/Config/OptionType.ts +2 -0
- package/src/types/Format/OptionType.ts +15 -0
- package/src/types/Sentry/OptionType.ts +1 -0
package/src/format.ts
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
import { CurrencySymbolEnum } from './enums/CurrencySymbolEnum';
|
2
|
+
|
3
|
+
require('@formatjs/intl-getcanonicallocales/polyfill');
|
4
|
+
require('@formatjs/intl-locale/polyfill');
|
5
|
+
|
6
|
+
require('@formatjs/intl-pluralrules/polyfill');
|
7
|
+
require('@formatjs/intl-pluralrules/locale-data/en');
|
8
|
+
require('@formatjs/intl-pluralrules/locale-data/vi');
|
9
|
+
require('@formatjs/intl-pluralrules/locale-data/zh');
|
10
|
+
|
11
|
+
require('@formatjs/intl-displaynames/polyfill');
|
12
|
+
require('@formatjs/intl-displaynames/locale-data/en');
|
13
|
+
require('@formatjs/intl-displaynames/locale-data/vi');
|
14
|
+
require('@formatjs/intl-displaynames/locale-data/zh');
|
15
|
+
|
16
|
+
require('@formatjs/intl-listformat/polyfill');
|
17
|
+
require('@formatjs/intl-listformat/locale-data/en');
|
18
|
+
require('@formatjs/intl-listformat/locale-data/vi');
|
19
|
+
require('@formatjs/intl-listformat/locale-data/zh');
|
20
|
+
|
21
|
+
require('@formatjs/intl-numberformat/polyfill');
|
22
|
+
require('@formatjs/intl-numberformat/locale-data/en');
|
23
|
+
require('@formatjs/intl-numberformat/locale-data/vi');
|
24
|
+
require('@formatjs/intl-numberformat/locale-data/zh');
|
25
|
+
|
26
|
+
require('@formatjs/intl-relativetimeformat/polyfill');
|
27
|
+
require('@formatjs/intl-relativetimeformat/locale-data/en');
|
28
|
+
require('@formatjs/intl-relativetimeformat/locale-data/vi');
|
29
|
+
require('@formatjs/intl-relativetimeformat/locale-data/zh');
|
30
|
+
|
31
|
+
require('@formatjs/intl-datetimeformat/polyfill');
|
32
|
+
require('@formatjs/intl-datetimeformat/locale-data/en');
|
33
|
+
require('@formatjs/intl-datetimeformat/locale-data/vi');
|
34
|
+
require('@formatjs/intl-datetimeformat/locale-data/zh');
|
35
|
+
|
36
|
+
require('@formatjs/intl-datetimeformat/add-golden-tz.js');
|
37
|
+
|
38
|
+
export * from './Format/NumberFormat';
|
39
|
+
export { CurrencySymbolEnum };
|
package/src/index-cli.ts
ADDED
package/src/index-fmt.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export * from './format';
|
package/src/index-rn.ts
ADDED
package/src/index.ts
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
import {
|
2
|
+
CurrencyDisplay,
|
3
|
+
StyleCurrency,
|
4
|
+
TrailingZeroDisplay,
|
5
|
+
} from '../../types/Format/OptionType';
|
6
|
+
|
7
|
+
export interface FormatOptions {
|
8
|
+
lang: string;
|
9
|
+
currency: string;
|
10
|
+
value: number;
|
11
|
+
styleCurrency?: StyleCurrency;
|
12
|
+
currencyDisplay?: CurrencyDisplay;
|
13
|
+
showValue?: boolean;
|
14
|
+
showCurrency?: boolean;
|
15
|
+
minimumFractionDigits?: number;
|
16
|
+
maximumFractionDigits?: number;
|
17
|
+
trailingZeroDisplay?: TrailingZeroDisplay;
|
18
|
+
options?: any;
|
19
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { StringRegexArr } from '../../types/Sentry/OptionType';
|
2
|
+
|
3
|
+
export interface HttpClientIntegrationOptions {
|
4
|
+
failedRequestStatusCodes: ([number, number] | number)[];
|
5
|
+
failedRequestTargets: StringRegexArr;
|
6
|
+
}
|
7
|
+
|
8
|
+
export interface CaptureConsoleIntegrationOptions {
|
9
|
+
levels: string[];
|
10
|
+
}
|
11
|
+
|
12
|
+
export interface InitOptions {
|
13
|
+
env: string;
|
14
|
+
dsn: string;
|
15
|
+
debug: boolean;
|
16
|
+
release: string;
|
17
|
+
requiredEnvForSendToSentry?: string[];
|
18
|
+
ignoreErrorsOptions?: StringRegexArr;
|
19
|
+
httpClientIntegrationOptions?: HttpClientIntegrationOptions;
|
20
|
+
captureConsoleIntegrationOptions?: CaptureConsoleIntegrationOptions;
|
21
|
+
beforeSend?: (event: any, hint: any) => any;
|
22
|
+
options?: any;
|
23
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { releaseSourceMap } from './Sentry/Build';
|
2
|
+
import { SourceMapOptions } from './interfaces/Sentry/SourceMapOptions';
|
3
|
+
|
4
|
+
export * from './interfaces/Sentry/SourceMapOptions';
|
5
|
+
|
6
|
+
/**
|
7
|
+
* Create and upload sentry release source map.
|
8
|
+
*
|
9
|
+
* @param {SourceMapOption} options
|
10
|
+
* @return {Promise<void>}
|
11
|
+
*/
|
12
|
+
export const releaseSentrySourceMap = async (
|
13
|
+
options: SourceMapOptions,
|
14
|
+
): Promise<void> => {
|
15
|
+
await releaseSourceMap(options);
|
16
|
+
};
|
package/src/sentry-rn.ts
ADDED
package/src/sentry.ts
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
export type StyleCurrency =
|
2
|
+
| 'currency'
|
3
|
+
| 'unit'
|
4
|
+
| 'decimal'
|
5
|
+
| 'percent'
|
6
|
+
| undefined;
|
7
|
+
|
8
|
+
export type CurrencyDisplay =
|
9
|
+
| 'symbol'
|
10
|
+
| 'code'
|
11
|
+
| 'name'
|
12
|
+
| 'narrowSymbol'
|
13
|
+
| undefined;
|
14
|
+
|
15
|
+
export type TrailingZeroDisplay = 'auto' | 'stripIfInteger';
|
@@ -0,0 +1 @@
|
|
1
|
+
export type StringRegexArr = (string | RegExp)[];
|