@andre1502/react-utilities 1.0.6 → 1.0.7
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.
- package/README.md +35 -51
- package/dist/EnvironmentEnum-CXTWJxNo.js +10 -0
- package/dist/EnvironmentEnum-CXTWJxNo.js.map +1 -0
- package/dist/Utils-CJ7ureSW.js +14 -0
- package/dist/Utils-CJ7ureSW.js.map +1 -0
- package/dist/browser-ponyfill-C-HVh7ck.js +321 -0
- package/dist/browser-ponyfill-C-HVh7ck.js.map +1 -0
- package/dist/chunk-vKJrgz-R.js +16 -0
- package/dist/config-cli-BIF4xuoO.js +1491 -0
- package/dist/config-cli-BIF4xuoO.js.map +1 -0
- package/dist/config-cli.js +3 -229
- package/dist/enums/CurrencySymbolEnum.d.ts +6 -5
- package/dist/enums/DeviceEnum.d.ts +5 -4
- package/dist/enums/EnvironmentEnum.d.ts +6 -5
- package/dist/format-BgweN3o5.js +65549 -0
- package/dist/format-BgweN3o5.js.map +1 -0
- package/dist/format.d.ts +26 -26
- package/dist/format.js +2 -55
- package/dist/hooks-oAipbPQ2.js +78 -0
- package/dist/hooks-oAipbPQ2.js.map +1 -0
- package/dist/hooks.js +2 -86
- package/dist/i18n-D1jKJPI0.js +1941 -0
- package/dist/i18n-D1jKJPI0.js.map +1 -0
- package/dist/i18n.js +4 -28
- package/dist/index-cli.d.ts +0 -1
- package/dist/index-cli.js +3 -28
- package/dist/index-rn.js +6 -39
- package/dist/index.js +7 -61
- package/dist/sentry-rn-DZwIel7y.js +743 -0
- package/dist/sentry-rn-DZwIel7y.js.map +1 -0
- package/dist/sentry-rn.js +2 -28
- package/dist/sentry.js +39 -26
- package/dist/sentry.js.map +1 -1
- package/dist/utils.js +45 -37
- package/dist/utils.js.map +1 -1
- package/package.json +56 -86
- package/src/Config/GoogleAuth.ts +1 -1
- package/src/Sentry/React.ts +2 -4
- package/src/Sentry/ReactNative.ts +2 -4
- package/src/enums/CurrencySymbolEnum.ts +8 -5
- package/src/enums/DeviceEnum.ts +6 -4
- package/src/enums/EnvironmentEnum.ts +8 -5
- package/src/format.ts +32 -32
- package/src/index-cli.ts +0 -1
- package/dist/Config/Config.js +0 -249
- package/dist/Config/Config.js.map +0 -1
- package/dist/Config/GoogleAuth.js +0 -68
- package/dist/Config/GoogleAuth.js.map +0 -1
- package/dist/Config/Locales.js +0 -62
- package/dist/Config/Locales.js.map +0 -1
- package/dist/Config/Output.js +0 -36
- package/dist/Config/Output.js.map +0 -1
- package/dist/Config/Sitemap.js +0 -72
- package/dist/Config/Sitemap.js.map +0 -1
- package/dist/EnvironmentEnum-BjXsfSRZ.js +0 -9
- package/dist/EnvironmentEnum-BjXsfSRZ.js.map +0 -1
- package/dist/EnvironmentEnum-UcQ6Il1O.js +0 -9
- package/dist/EnvironmentEnum-UcQ6Il1O.js.map +0 -1
- package/dist/Format/NumberFormat.js +0 -77
- package/dist/Format/NumberFormat.js.map +0 -1
- package/dist/Format/NumberParser.js +0 -51
- package/dist/Format/NumberParser.js.map +0 -1
- package/dist/Hooks/useDevice.js +0 -47
- package/dist/Hooks/useDevice.js.map +0 -1
- package/dist/Hooks/useSound.js +0 -47
- package/dist/Hooks/useSound.js.map +0 -1
- package/dist/Hooks/useWebSocket.js +0 -120
- package/dist/Hooks/useWebSocket.js.map +0 -1
- package/dist/I18n/I18n.js +0 -134
- package/dist/I18n/I18n.js.map +0 -1
- package/dist/NumberFormat-CvvBWhHc.js +0 -89
- package/dist/NumberFormat-CvvBWhHc.js.map +0 -1
- package/dist/NumberFormat-glmpbk7E.js +0 -94
- package/dist/NumberFormat-glmpbk7E.js.map +0 -1
- package/dist/React-BaJ1KfGF.js +0 -87
- package/dist/React-BaJ1KfGF.js.map +0 -1
- package/dist/React-qUl0CBmE.js +0 -109
- package/dist/React-qUl0CBmE.js.map +0 -1
- package/dist/ReactNative-B4gt8nBr.js +0 -1790
- package/dist/ReactNative-B4gt8nBr.js.map +0 -1
- package/dist/ReactNative-CDMfQFfN.js +0 -1812
- package/dist/ReactNative-CDMfQFfN.js.map +0 -1
- package/dist/Sentry/Build.d.ts +0 -9
- package/dist/Sentry/Build.js +0 -87
- package/dist/Sentry/Build.js.map +0 -1
- package/dist/Sentry/React.js +0 -103
- package/dist/Sentry/React.js.map +0 -1
- package/dist/Sentry/ReactNative.js +0 -113
- package/dist/Sentry/ReactNative.js.map +0 -1
- package/dist/Sentry/Utils.js +0 -24
- package/dist/Sentry/Utils.js.map +0 -1
- package/dist/Utils/Array.js +0 -26
- package/dist/Utils/Array.js.map +0 -1
- package/dist/Utils/Files.js +0 -51
- package/dist/Utils/Files.js.map +0 -1
- package/dist/Utils/Pagination.js +0 -32
- package/dist/Utils/Pagination.js.map +0 -1
- package/dist/Utils/Utils.js +0 -101
- package/dist/Utils/Utils.js.map +0 -1
- package/dist/Utils-BC1fDy39.js +0 -74
- package/dist/Utils-BC1fDy39.js.map +0 -1
- package/dist/Utils-Cq948gfa.js +0 -20
- package/dist/Utils-Cq948gfa.js.map +0 -1
- package/dist/Utils-D7KRF8VU.js +0 -64
- package/dist/Utils-D7KRF8VU.js.map +0 -1
- package/dist/Utils-Dilye04y.js +0 -22
- package/dist/Utils-Dilye04y.js.map +0 -1
- package/dist/config-cli.cjs +0 -532
- package/dist/config-cli.cjs.map +0 -1
- package/dist/config-cli.js.map +0 -1
- package/dist/config-cli.mjs +0 -500
- package/dist/config-cli.mjs.map +0 -1
- package/dist/enums/CurrencySymbolEnum.js +0 -15
- package/dist/enums/CurrencySymbolEnum.js.map +0 -1
- package/dist/enums/DeviceEnum.js +0 -12
- package/dist/enums/DeviceEnum.js.map +0 -1
- package/dist/enums/EnvironmentEnum.js +0 -13
- package/dist/enums/EnvironmentEnum.js.map +0 -1
- package/dist/format.cjs +0 -43
- package/dist/format.cjs.map +0 -1
- package/dist/format.js.map +0 -1
- package/dist/format.mjs +0 -30
- package/dist/format.mjs.map +0 -1
- package/dist/hooks.cjs +0 -13
- package/dist/hooks.cjs.map +0 -1
- package/dist/hooks.js.map +0 -1
- package/dist/hooks.mjs +0 -4
- package/dist/hooks.mjs.map +0 -1
- package/dist/i18n.cjs +0 -3039
- package/dist/i18n.cjs.map +0 -1
- package/dist/i18n.js.map +0 -1
- package/dist/i18n.mjs +0 -3032
- package/dist/i18n.mjs.map +0 -1
- package/dist/index-cli.cjs +0 -31
- package/dist/index-cli.cjs.map +0 -1
- package/dist/index-cli.js.map +0 -1
- package/dist/index-cli.mjs +0 -14
- package/dist/index-cli.mjs.map +0 -1
- package/dist/index-rn.cjs +0 -57
- package/dist/index-rn.cjs.map +0 -1
- package/dist/index-rn.js.map +0 -1
- package/dist/index-rn.mjs +0 -36
- package/dist/index-rn.mjs.map +0 -1
- package/dist/index.cjs +0 -79
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -40
- package/dist/index.mjs.map +0 -1
- package/dist/interfaces/Config/ConfigOptions.js +0 -6
- package/dist/interfaces/Config/ConfigOptions.js.map +0 -1
- package/dist/interfaces/Config/EntryOptions.js +0 -6
- package/dist/interfaces/Config/EntryOptions.js.map +0 -1
- package/dist/interfaces/Config/OutputMap.js +0 -6
- package/dist/interfaces/Config/OutputMap.js.map +0 -1
- package/dist/interfaces/Config/OutputOptions.js +0 -6
- package/dist/interfaces/Config/OutputOptions.js.map +0 -1
- package/dist/interfaces/Config/SitemapMap.js +0 -6
- package/dist/interfaces/Config/SitemapMap.js.map +0 -1
- package/dist/interfaces/Config/StringMap.js +0 -6
- package/dist/interfaces/Config/StringMap.js.map +0 -1
- package/dist/interfaces/Format/FormatOptions.js +0 -6
- package/dist/interfaces/Format/FormatOptions.js.map +0 -1
- package/dist/interfaces/Sentry/InitOptions.js +0 -6
- package/dist/interfaces/Sentry/InitOptions.js.map +0 -1
- package/dist/interfaces/Sentry/InitOptionsRN.js +0 -6
- package/dist/interfaces/Sentry/InitOptionsRN.js.map +0 -1
- package/dist/interfaces/Sentry/SourceMapOptions.d.ts +0 -7
- package/dist/interfaces/Sentry/SourceMapOptions.js +0 -6
- package/dist/interfaces/Sentry/SourceMapOptions.js.map +0 -1
- package/dist/sentry-cli.cjs +0 -119
- package/dist/sentry-cli.cjs.map +0 -1
- package/dist/sentry-cli.d.ts +0 -9
- package/dist/sentry-cli.js +0 -49
- package/dist/sentry-cli.js.map +0 -1
- package/dist/sentry-cli.mjs +0 -98
- package/dist/sentry-cli.mjs.map +0 -1
- package/dist/sentry-rn.cjs +0 -11
- package/dist/sentry-rn.cjs.map +0 -1
- package/dist/sentry-rn.js.map +0 -1
- package/dist/sentry-rn.mjs +0 -4
- package/dist/sentry-rn.mjs.map +0 -1
- package/dist/sentry.cjs +0 -11
- package/dist/sentry.cjs.map +0 -1
- package/dist/sentry.mjs +0 -4
- package/dist/sentry.mjs.map +0 -1
- package/dist/types/Config/OptionType.js +0 -6
- package/dist/types/Config/OptionType.js.map +0 -1
- package/dist/types/Format/OptionType.js +0 -6
- package/dist/types/Format/OptionType.js.map +0 -1
- package/dist/types/Sentry/OptionType.js +0 -6
- package/dist/types/Sentry/OptionType.js.map +0 -1
- package/dist/useWebSocket-B_B6kWXM.js +0 -167
- package/dist/useWebSocket-B_B6kWXM.js.map +0 -1
- package/dist/useWebSocket-YQWaiBz9.js +0 -172
- package/dist/useWebSocket-YQWaiBz9.js.map +0 -1
- package/dist/utils.cjs +0 -59
- package/dist/utils.cjs.map +0 -1
- package/dist/utils.mjs +0 -43
- package/dist/utils.mjs.map +0 -1
- package/src/Sentry/Build.ts +0 -67
- package/src/interfaces/Sentry/SourceMapOptions.ts +0 -7
- package/src/sentry-cli.ts +0 -16
package/package.json
CHANGED
|
@@ -1,147 +1,121 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@andre1502/react-utilities",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "module to combine common functions",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/andre1502/react-utilities"
|
|
8
8
|
},
|
|
9
9
|
"license": "MIT",
|
|
10
|
-
"author": "andre1502",
|
|
10
|
+
"author": "andre1502<job@ratatouille90.com>(https://ratatouille90.com/)",
|
|
11
11
|
"type": "module",
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
|
14
14
|
"types": "./dist/index.d.ts",
|
|
15
|
-
"
|
|
16
|
-
"import": "./dist/index.mjs"
|
|
15
|
+
"import": "./dist/index.js"
|
|
17
16
|
},
|
|
18
17
|
"./react-native": {
|
|
19
18
|
"types": "./dist/index-rn.d.ts",
|
|
20
|
-
"
|
|
21
|
-
"import": "./dist/index-rn.mjs"
|
|
19
|
+
"import": "./dist/index-rn.js"
|
|
22
20
|
},
|
|
23
21
|
"./cli": {
|
|
24
22
|
"types": "./dist/index-cli.d.ts",
|
|
25
|
-
"
|
|
26
|
-
"import": "./dist/index-cli.mjs"
|
|
23
|
+
"import": "./dist/index-cli.js"
|
|
27
24
|
},
|
|
28
25
|
"./format": {
|
|
29
26
|
"types": "./dist/format.d.ts",
|
|
30
|
-
"
|
|
31
|
-
"import": "./dist/format.mjs"
|
|
27
|
+
"import": "./dist/format.js"
|
|
32
28
|
},
|
|
33
29
|
"./hooks": {
|
|
34
30
|
"types": "./dist/hooks.d.ts",
|
|
35
|
-
"
|
|
36
|
-
"import": "./dist/hooks.mjs"
|
|
31
|
+
"import": "./dist/hooks.js"
|
|
37
32
|
},
|
|
38
33
|
"./i18n": {
|
|
39
34
|
"types": "./dist/i18n.d.ts",
|
|
40
|
-
"
|
|
41
|
-
"import": "./dist/i18n.mjs"
|
|
35
|
+
"import": "./dist/i18n.js"
|
|
42
36
|
},
|
|
43
37
|
"./sentry": {
|
|
44
38
|
"types": "./dist/sentry.d.ts",
|
|
45
|
-
"
|
|
46
|
-
"import": "./dist/sentry.mjs"
|
|
39
|
+
"import": "./dist/sentry.js"
|
|
47
40
|
},
|
|
48
41
|
"./sentry-rn": {
|
|
49
42
|
"types": "./dist/sentry-rn.d.ts",
|
|
50
|
-
"
|
|
51
|
-
"import": "./dist/sentry-rn.mjs"
|
|
43
|
+
"import": "./dist/sentry-rn.js"
|
|
52
44
|
},
|
|
53
45
|
"./utils": {
|
|
54
46
|
"types": "./dist/utils.d.ts",
|
|
55
|
-
"
|
|
56
|
-
"import": "./dist/utils.mjs"
|
|
57
|
-
},
|
|
58
|
-
"./sentry-cli": {
|
|
59
|
-
"types": "./dist/sentry-cli.d.ts",
|
|
60
|
-
"require": "./dist/sentry-cli.cjs",
|
|
61
|
-
"import": "./dist/sentry-cli.mjs"
|
|
47
|
+
"import": "./dist/utils.js"
|
|
62
48
|
},
|
|
63
49
|
"./config-cli": {
|
|
64
50
|
"types": "./dist/config-cli.d.ts",
|
|
65
|
-
"
|
|
66
|
-
"import": "./dist/config-cli.mjs"
|
|
51
|
+
"import": "./dist/config-cli.js"
|
|
67
52
|
}
|
|
68
53
|
},
|
|
69
|
-
"main": "dist/index.
|
|
70
|
-
"module": "dist/index.
|
|
71
|
-
"react-native": "dist/index-rn.
|
|
54
|
+
"main": "dist/index.js",
|
|
55
|
+
"module": "dist/index.js",
|
|
56
|
+
"react-native": "dist/index-rn.js",
|
|
72
57
|
"types": "dist/index.d.ts",
|
|
73
58
|
"files": [
|
|
74
59
|
"src",
|
|
75
60
|
"dist"
|
|
76
61
|
],
|
|
77
62
|
"scripts": {
|
|
78
|
-
"prebuild": "rm -rf ./tsconfig.tsbuildinfo && rm -rf
|
|
79
|
-
"build": "yarn prebuild &&
|
|
80
|
-
"build:bundles": "cross-env BABEL_ENV=esmBundled node --max-old-space-size=8192 ./node_modules/rollup/dist/bin/rollup --config",
|
|
81
|
-
"build:cjs": "cross-env BABEL_ENV=cjs babel src --extensions '.ts' --out-dir 'dist' --source-maps",
|
|
82
|
-
"build:esm": "cross-env BABEL_ENV=esmUnbundled babel src --extensions '.ts' --out-dir 'dist' --source-maps",
|
|
63
|
+
"prebuild": "rm -rf ./tsconfig.tsbuildinfo && rm -rf ./dist",
|
|
64
|
+
"build": "yarn prebuild && vite build && yarn declarations",
|
|
83
65
|
"declarations": "tsc -p tsconfig.json",
|
|
84
66
|
"format": "prettier --write --parser typescript '**/*.{ts,tsx}'",
|
|
85
67
|
"lint": "eslint . --ext .ts,.tsx --ignore-path .gitignore --fix",
|
|
86
68
|
"prepublishOnly": "yarn build",
|
|
87
69
|
"test": "echo \"Warn: no test specified, ignore it\" && exit 0"
|
|
88
70
|
},
|
|
71
|
+
"resolutions": {
|
|
72
|
+
"baseline-browser-mapping": "latest"
|
|
73
|
+
},
|
|
89
74
|
"dependencies": {
|
|
90
|
-
"@formatjs/intl-datetimeformat": "^
|
|
91
|
-
"@formatjs/intl-displaynames": "^
|
|
92
|
-
"@formatjs/intl-getcanonicallocales": "^2.
|
|
93
|
-
"@formatjs/intl-listformat": "^
|
|
94
|
-
"@formatjs/intl-locale": "^
|
|
95
|
-
"@formatjs/intl-numberformat": "^
|
|
96
|
-
"@formatjs/intl-pluralrules": "^
|
|
97
|
-
"@formatjs/intl-relativetimeformat": "^
|
|
98
|
-
"@sentry/react-native": "^
|
|
75
|
+
"@formatjs/intl-datetimeformat": "^7.3.1",
|
|
76
|
+
"@formatjs/intl-displaynames": "^7.3.1",
|
|
77
|
+
"@formatjs/intl-getcanonicallocales": "^3.2.2",
|
|
78
|
+
"@formatjs/intl-listformat": "^8.3.1",
|
|
79
|
+
"@formatjs/intl-locale": "^5.3.1",
|
|
80
|
+
"@formatjs/intl-numberformat": "^9.3.1",
|
|
81
|
+
"@formatjs/intl-pluralrules": "^6.3.1",
|
|
82
|
+
"@formatjs/intl-relativetimeformat": "^12.3.1",
|
|
83
|
+
"@sentry/react-native": "^8.7.0",
|
|
99
84
|
"@types/howler": "^2.2.12",
|
|
100
85
|
"@types/lodash-es": "^4.17.12",
|
|
101
|
-
"google-auth-library": "^10.
|
|
102
|
-
"googleapis": "^
|
|
86
|
+
"google-auth-library": "^10.6.2",
|
|
87
|
+
"googleapis": "^171.4.0",
|
|
103
88
|
"howler": "^2.2.4",
|
|
104
|
-
"i18next": "^
|
|
105
|
-
"i18next-chained-backend": "^
|
|
106
|
-
"i18next-http-backend": "^3.0.
|
|
107
|
-
"i18next-localstorage-backend": "^4.
|
|
89
|
+
"i18next": "^26.0.4",
|
|
90
|
+
"i18next-chained-backend": "^5.0.3",
|
|
91
|
+
"i18next-http-backend": "^3.0.4",
|
|
92
|
+
"i18next-localstorage-backend": "^4.3.1",
|
|
108
93
|
"i18next-resources-to-backend": "^1.2.1",
|
|
109
|
-
"lodash-es": "^4.
|
|
110
|
-
"sitemap": "^
|
|
94
|
+
"lodash-es": "^4.18.1",
|
|
95
|
+
"sitemap": "^9.0.1"
|
|
111
96
|
},
|
|
112
97
|
"devDependencies": {
|
|
113
|
-
"@
|
|
114
|
-
"@
|
|
115
|
-
"@
|
|
116
|
-
"@
|
|
117
|
-
"@
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
122
|
-
"@rollup/plugin-typescript": "^12.1.3",
|
|
123
|
-
"@types/node": "^24.0.3",
|
|
124
|
-
"@types/react": "^19.1.8",
|
|
125
|
-
"@types/react-dom": "^19",
|
|
126
|
-
"@typescript-eslint/eslint-plugin": "^8.34.1",
|
|
127
|
-
"@typescript-eslint/parser": "^8.34.1",
|
|
128
|
-
"cross-env": "^7.0.3",
|
|
129
|
-
"eslint": "^9.29.0",
|
|
130
|
-
"eslint-config-prettier": "^10.1.5",
|
|
131
|
-
"eslint-plugin-prettier": "^5.5.0",
|
|
98
|
+
"@types/node": "^25.6.0",
|
|
99
|
+
"@types/react": "^19.2.14",
|
|
100
|
+
"@types/react-dom": "^19.2.3",
|
|
101
|
+
"@typescript-eslint/eslint-plugin": "^8.58.1",
|
|
102
|
+
"@typescript-eslint/parser": "^8.58.1",
|
|
103
|
+
"eslint": "^10.2.0",
|
|
104
|
+
"eslint-config-prettier": "^10.1.8",
|
|
105
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
132
106
|
"eslint-plugin-react": "^7.37.5",
|
|
133
|
-
"eslint-plugin-react-hooks": "^
|
|
134
|
-
"eslint-plugin-storybook": "^
|
|
135
|
-
"prettier": "^3.
|
|
136
|
-
"prettier-plugin-organize-imports": "^4.
|
|
137
|
-
"prettier-plugin-packagejson": "^
|
|
138
|
-
"react": "^19.
|
|
139
|
-
"react-dom": "^19.
|
|
140
|
-
"react-native": "^0.
|
|
141
|
-
"rollup": "^4.44.0",
|
|
142
|
-
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
107
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
108
|
+
"eslint-plugin-storybook": "^10.3.5",
|
|
109
|
+
"prettier": "^3.8.2",
|
|
110
|
+
"prettier-plugin-organize-imports": "^4.3.0",
|
|
111
|
+
"prettier-plugin-packagejson": "^3.0.2",
|
|
112
|
+
"react": "^19.2.5",
|
|
113
|
+
"react-dom": "^19.2.5",
|
|
114
|
+
"react-native": "^0.85.0",
|
|
143
115
|
"tslib": "^2.8.1",
|
|
144
|
-
"typescript": "^
|
|
116
|
+
"typescript": "^6.0.2",
|
|
117
|
+
"vite": "^8.0.8",
|
|
118
|
+
"vite-plugin-dts": "^4.5.4"
|
|
145
119
|
},
|
|
146
120
|
"peerDependencies": {
|
|
147
121
|
"react": "*",
|
|
@@ -149,10 +123,6 @@
|
|
|
149
123
|
"react-native": "*",
|
|
150
124
|
"tslib": "*"
|
|
151
125
|
},
|
|
152
|
-
"optionalDependencies": {
|
|
153
|
-
"@rollup/rollup-linux-x64-gnu": "^4.44.0"
|
|
154
|
-
},
|
|
155
|
-
"packageManager": "yarn@4.8.1",
|
|
156
126
|
"publishConfig": {
|
|
157
127
|
"@andre1502:registry": "https://registry.npmjs.org/"
|
|
158
128
|
}
|
package/src/Config/GoogleAuth.ts
CHANGED
|
@@ -40,7 +40,7 @@ const fetchGoogleSheet = async (
|
|
|
40
40
|
spreadsheetId: string,
|
|
41
41
|
spreadsheetTab: string,
|
|
42
42
|
): Promise<any[][] | null | undefined> => {
|
|
43
|
-
const sheets = google.sheets({ version: 'v4', auth });
|
|
43
|
+
const sheets = google.sheets({ version: 'v4', auth: auth as any });
|
|
44
44
|
|
|
45
45
|
const res = await sheets.spreadsheets.values.get({
|
|
46
46
|
spreadsheetId: spreadsheetId,
|
package/src/Sentry/React.ts
CHANGED
|
@@ -69,14 +69,12 @@ const initSentry = (options: InitOptions): void => {
|
|
|
69
69
|
release: options.release,
|
|
70
70
|
environment: options.env,
|
|
71
71
|
ignoreErrors: ignoreErrors,
|
|
72
|
-
sampleRate:
|
|
72
|
+
sampleRate: 0.7,
|
|
73
73
|
maxBreadcrumbs: 50,
|
|
74
74
|
attachStacktrace: true,
|
|
75
|
-
autoSessionTracking: true,
|
|
76
75
|
sendClientReports: true,
|
|
77
|
-
enableTracing: true,
|
|
78
76
|
// Performance Monitoring
|
|
79
|
-
tracesSampleRate:
|
|
77
|
+
tracesSampleRate: 0.7, // Capture 100% of the transactions
|
|
80
78
|
// Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled
|
|
81
79
|
tracePropagationTargets: ['localhost'],
|
|
82
80
|
sendDefaultPii: true,
|
|
@@ -65,13 +65,11 @@ const initSentry = (options: InitOptionsRN): void => {
|
|
|
65
65
|
debug: options.debug,
|
|
66
66
|
environment: options.env,
|
|
67
67
|
ignoreErrors: ignoreErrors,
|
|
68
|
-
sampleRate:
|
|
68
|
+
sampleRate: 0.7,
|
|
69
69
|
maxBreadcrumbs: 50,
|
|
70
|
-
autoSessionTracking: true,
|
|
71
70
|
attachScreenshot: true,
|
|
72
71
|
enableCaptureFailedRequests: true,
|
|
73
|
-
|
|
74
|
-
tracesSampleRate: 1.0,
|
|
72
|
+
tracesSampleRate: 0.7,
|
|
75
73
|
enableNative: true,
|
|
76
74
|
autoInitializeNativeSdk: true,
|
|
77
75
|
enableNativeCrashHandling: true,
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
export
|
|
2
|
-
TWD
|
|
3
|
-
USD
|
|
4
|
-
VND
|
|
5
|
-
}
|
|
1
|
+
export const CurrencySymbolEnum = {
|
|
2
|
+
TWD: 'NT$', // Taiwan
|
|
3
|
+
USD: 'US$', // USA
|
|
4
|
+
VND: '₫', // Vietnam
|
|
5
|
+
} as const;
|
|
6
|
+
|
|
7
|
+
export type CurrencySymbolEnum =
|
|
8
|
+
(typeof CurrencySymbolEnum)[keyof typeof CurrencySymbolEnum];
|
package/src/enums/DeviceEnum.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
export
|
|
2
|
-
DEV
|
|
3
|
-
STAGING
|
|
4
|
-
PRODUCTION
|
|
5
|
-
}
|
|
1
|
+
export const EnvironmentEnum = {
|
|
2
|
+
DEV: 'dev',
|
|
3
|
+
STAGING: 'staging',
|
|
4
|
+
PRODUCTION: 'production',
|
|
5
|
+
} as const;
|
|
6
|
+
|
|
7
|
+
export type EnvironmentEnum =
|
|
8
|
+
(typeof EnvironmentEnum)[keyof typeof EnvironmentEnum];
|
package/src/format.ts
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { CurrencySymbolEnum } from './enums/CurrencySymbolEnum';
|
|
2
2
|
|
|
3
|
-
import '@formatjs/intl-getcanonicallocales/polyfill';
|
|
4
|
-
import '@formatjs/intl-locale/polyfill';
|
|
5
|
-
|
|
6
|
-
import '@formatjs/intl-pluralrules/locale-data/en';
|
|
7
|
-
import '@formatjs/intl-pluralrules/locale-data/vi';
|
|
8
|
-
import '@formatjs/intl-pluralrules/locale-data/zh';
|
|
9
|
-
import '@formatjs/intl-pluralrules/polyfill';
|
|
10
|
-
|
|
11
|
-
import '@formatjs/intl-displaynames/locale-data/en';
|
|
12
|
-
import '@formatjs/intl-displaynames/locale-data/vi';
|
|
13
|
-
import '@formatjs/intl-displaynames/locale-data/zh';
|
|
14
|
-
import '@formatjs/intl-displaynames/polyfill';
|
|
15
|
-
|
|
16
|
-
import '@formatjs/intl-listformat/locale-data/en';
|
|
17
|
-
import '@formatjs/intl-listformat/locale-data/vi';
|
|
18
|
-
import '@formatjs/intl-listformat/locale-data/zh';
|
|
19
|
-
import '@formatjs/intl-listformat/polyfill';
|
|
20
|
-
|
|
21
|
-
import '@formatjs/intl-numberformat/locale-data/en';
|
|
22
|
-
import '@formatjs/intl-numberformat/locale-data/vi';
|
|
23
|
-
import '@formatjs/intl-numberformat/locale-data/zh';
|
|
24
|
-
import '@formatjs/intl-numberformat/polyfill';
|
|
25
|
-
|
|
26
|
-
import '@formatjs/intl-relativetimeformat/locale-data/en';
|
|
27
|
-
import '@formatjs/intl-relativetimeformat/locale-data/vi';
|
|
28
|
-
import '@formatjs/intl-relativetimeformat/locale-data/zh';
|
|
29
|
-
import '@formatjs/intl-relativetimeformat/polyfill';
|
|
30
|
-
|
|
31
|
-
import '@formatjs/intl-datetimeformat/locale-data/en';
|
|
32
|
-
import '@formatjs/intl-datetimeformat/locale-data/vi';
|
|
33
|
-
import '@formatjs/intl-datetimeformat/locale-data/zh';
|
|
34
|
-
import '@formatjs/intl-datetimeformat/polyfill';
|
|
3
|
+
import '@formatjs/intl-getcanonicallocales/polyfill.js';
|
|
4
|
+
import '@formatjs/intl-locale/polyfill.js';
|
|
5
|
+
|
|
6
|
+
import '@formatjs/intl-pluralrules/locale-data/en.js';
|
|
7
|
+
import '@formatjs/intl-pluralrules/locale-data/vi.js';
|
|
8
|
+
import '@formatjs/intl-pluralrules/locale-data/zh.js';
|
|
9
|
+
import '@formatjs/intl-pluralrules/polyfill.js';
|
|
10
|
+
|
|
11
|
+
import '@formatjs/intl-displaynames/locale-data/en.js';
|
|
12
|
+
import '@formatjs/intl-displaynames/locale-data/vi.js';
|
|
13
|
+
import '@formatjs/intl-displaynames/locale-data/zh.js';
|
|
14
|
+
import '@formatjs/intl-displaynames/polyfill.js';
|
|
15
|
+
|
|
16
|
+
import '@formatjs/intl-listformat/locale-data/en.js';
|
|
17
|
+
import '@formatjs/intl-listformat/locale-data/vi.js';
|
|
18
|
+
import '@formatjs/intl-listformat/locale-data/zh.js';
|
|
19
|
+
import '@formatjs/intl-listformat/polyfill.js';
|
|
20
|
+
|
|
21
|
+
import '@formatjs/intl-numberformat/locale-data/en.js';
|
|
22
|
+
import '@formatjs/intl-numberformat/locale-data/vi.js';
|
|
23
|
+
import '@formatjs/intl-numberformat/locale-data/zh.js';
|
|
24
|
+
import '@formatjs/intl-numberformat/polyfill.js';
|
|
25
|
+
|
|
26
|
+
import '@formatjs/intl-relativetimeformat/locale-data/en.js';
|
|
27
|
+
import '@formatjs/intl-relativetimeformat/locale-data/vi.js';
|
|
28
|
+
import '@formatjs/intl-relativetimeformat/locale-data/zh.js';
|
|
29
|
+
import '@formatjs/intl-relativetimeformat/polyfill.js';
|
|
30
|
+
|
|
31
|
+
import '@formatjs/intl-datetimeformat/locale-data/en.js';
|
|
32
|
+
import '@formatjs/intl-datetimeformat/locale-data/vi.js';
|
|
33
|
+
import '@formatjs/intl-datetimeformat/locale-data/zh.js';
|
|
34
|
+
import '@formatjs/intl-datetimeformat/polyfill.js';
|
|
35
35
|
|
|
36
36
|
import '@formatjs/intl-datetimeformat/add-golden-tz.js';
|
|
37
37
|
|
package/src/index-cli.ts
CHANGED
package/dist/Config/Config.js
DELETED
|
@@ -1,249 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.transformConfig = exports.processConfig = exports.exportConfig = exports.changeEntry = void 0;
|
|
7
|
-
var _fs = require("fs");
|
|
8
|
-
var _lodashEs = require("lodash-es");
|
|
9
|
-
var _EnvironmentEnum = require("../enums/EnvironmentEnum");
|
|
10
|
-
var _utils = require("../utils");
|
|
11
|
-
var _Output = require("./Output");
|
|
12
|
-
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); }
|
|
13
|
-
/**
|
|
14
|
-
* Process config data
|
|
15
|
-
*
|
|
16
|
-
* @param {any[][]} rows
|
|
17
|
-
* @return {OutputMap}
|
|
18
|
-
*/
|
|
19
|
-
var processConfig = exports.processConfig = function processConfig(rows) {
|
|
20
|
-
var versionConfig = {};
|
|
21
|
-
var params = rows[0].map(function (key) {
|
|
22
|
-
return key;
|
|
23
|
-
});
|
|
24
|
-
rows.forEach(function (row, index) {
|
|
25
|
-
if (index === 0) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
versionConfig = processRow(row, params, versionConfig);
|
|
29
|
-
});
|
|
30
|
-
return versionConfig;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Process config item
|
|
35
|
-
*
|
|
36
|
-
* @param {string[]} data
|
|
37
|
-
* @param {string[]} params
|
|
38
|
-
* @param {OutputMap} versionConfig
|
|
39
|
-
* @return {OutputMap}
|
|
40
|
-
*/
|
|
41
|
-
var processRow = function processRow(data, params, versionConfig) {
|
|
42
|
-
var versionName = data[0];
|
|
43
|
-
versionConfig[versionName] = {};
|
|
44
|
-
params.forEach(function (paramsName, index) {
|
|
45
|
-
if (index === 0 || data[index] === undefined || data[index] === '') {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
versionConfig[versionName][paramsName] = paramsTypeHandler(data[index]);
|
|
49
|
-
});
|
|
50
|
-
return versionConfig;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Check is JSON value
|
|
55
|
-
*
|
|
56
|
-
* @param {string} str
|
|
57
|
-
* @return {boolean}
|
|
58
|
-
*/
|
|
59
|
-
var isJsonString = function isJsonString(str) {
|
|
60
|
-
try {
|
|
61
|
-
JSON.parse(str);
|
|
62
|
-
} catch (e) {
|
|
63
|
-
return false;
|
|
64
|
-
}
|
|
65
|
-
return true;
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Handling config value type
|
|
70
|
-
*
|
|
71
|
-
* @param {string} params
|
|
72
|
-
* @return {any}
|
|
73
|
-
*/
|
|
74
|
-
var paramsTypeHandler = function paramsTypeHandler(params) {
|
|
75
|
-
var booleanText = ['TRUE', 'FALSE'];
|
|
76
|
-
if (booleanText.includes(params.toUpperCase())) {
|
|
77
|
-
return params === 'TRUE';
|
|
78
|
-
}
|
|
79
|
-
if (isJsonString(params)) {
|
|
80
|
-
return JSON.parse(params);
|
|
81
|
-
}
|
|
82
|
-
return params;
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Export config data into js file
|
|
87
|
-
*
|
|
88
|
-
* @param {OutputMap} data
|
|
89
|
-
* @param {OutputOptions} options
|
|
90
|
-
* @return {void}
|
|
91
|
-
*/
|
|
92
|
-
var exportConfig = exports.exportConfig = function exportConfig(data, options) {
|
|
93
|
-
var config = {
|
|
94
|
-
params: data
|
|
95
|
-
};
|
|
96
|
-
var content = '';
|
|
97
|
-
switch (options.exportAs) {
|
|
98
|
-
case 'ts':
|
|
99
|
-
content = 'export default ' + JSON.stringify(config, null, 2);
|
|
100
|
-
options.filename = "".concat(options.filename, ".ts");
|
|
101
|
-
break;
|
|
102
|
-
case 'json':
|
|
103
|
-
content = JSON.stringify(config, null, 2);
|
|
104
|
-
options.filename = "".concat(options.filename, ".json");
|
|
105
|
-
break;
|
|
106
|
-
case 'js':
|
|
107
|
-
content = "module.exports = ".concat(JSON.stringify(config, null, 2));
|
|
108
|
-
options.filename = "".concat(options.filename, ".js");
|
|
109
|
-
break;
|
|
110
|
-
default:
|
|
111
|
-
throw new Error("exportAs ".concat(options.exportAs, " not supported."));
|
|
112
|
-
}
|
|
113
|
-
(0, _Output.outputToFile)(content, options);
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* Handling env map value
|
|
118
|
-
*
|
|
119
|
-
* @param {string} env
|
|
120
|
-
* @return {string}
|
|
121
|
-
*/
|
|
122
|
-
var envMap = function envMap(env) {
|
|
123
|
-
var result;
|
|
124
|
-
switch (env) {
|
|
125
|
-
case 'dev':
|
|
126
|
-
case 'develop':
|
|
127
|
-
case 'development':
|
|
128
|
-
result = _EnvironmentEnum.EnvironmentEnum.DEV;
|
|
129
|
-
break;
|
|
130
|
-
case 'stg':
|
|
131
|
-
case 'stag':
|
|
132
|
-
case 'staging':
|
|
133
|
-
result = _EnvironmentEnum.EnvironmentEnum.STAGING;
|
|
134
|
-
break;
|
|
135
|
-
case 'prd':
|
|
136
|
-
case 'prod':
|
|
137
|
-
case 'production':
|
|
138
|
-
result = _EnvironmentEnum.EnvironmentEnum.PRODUCTION;
|
|
139
|
-
break;
|
|
140
|
-
default:
|
|
141
|
-
throw new Error("env ".concat(env, " not supported."));
|
|
142
|
-
}
|
|
143
|
-
return result;
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* Mapping content to exportAs value
|
|
148
|
-
*
|
|
149
|
-
* @param {string} key
|
|
150
|
-
* @param {any} value
|
|
151
|
-
* @param {string} exportAs
|
|
152
|
-
* @return {string}
|
|
153
|
-
*/
|
|
154
|
-
var contentMap = function contentMap(key, value, exportAs) {
|
|
155
|
-
var content = '';
|
|
156
|
-
switch (exportAs) {
|
|
157
|
-
case 'ts':
|
|
158
|
-
if ((0, _lodashEs.isNull)(value)) {
|
|
159
|
-
content += "export const ".concat(key, ": string | null = ").concat(value, ";\n");
|
|
160
|
-
} else if (typeof value === 'boolean') {
|
|
161
|
-
content += "export const ".concat(key, ": boolean = ").concat(value, ";\n");
|
|
162
|
-
} else {
|
|
163
|
-
content += "export const ".concat(key, " = '").concat(value, "';\n");
|
|
164
|
-
}
|
|
165
|
-
break;
|
|
166
|
-
case 'js':
|
|
167
|
-
content += "export const ".concat(key, " = \"").concat(value, "\";\n");
|
|
168
|
-
break;
|
|
169
|
-
case 'env':
|
|
170
|
-
content += "".concat(key, " = \"").concat(value, "\"\n");
|
|
171
|
-
break;
|
|
172
|
-
default:
|
|
173
|
-
throw new Error("exportAs ".concat(exportAs, " not supported."));
|
|
174
|
-
}
|
|
175
|
-
return content;
|
|
176
|
-
};
|
|
177
|
-
|
|
178
|
-
/**
|
|
179
|
-
* Transform config
|
|
180
|
-
*
|
|
181
|
-
* @param {OutputMap} data
|
|
182
|
-
* @param {string} env
|
|
183
|
-
* @param {string} configKeyPrefix
|
|
184
|
-
* @param {OutputOptions} options
|
|
185
|
-
* @return {void}
|
|
186
|
-
*/
|
|
187
|
-
var transformConfig = exports.transformConfig = function transformConfig(data, env, configKeyPrefix, options) {
|
|
188
|
-
var envKey = configKeyPrefix ? "".concat(configKeyPrefix, "ENV") : 'ENV';
|
|
189
|
-
var content = contentMap(envKey, envMap(env), options.exportAs);
|
|
190
|
-
Object.keys(data).forEach(function (key) {
|
|
191
|
-
var newConfigKey = configKeyPrefix && !(0, _utils.isHiddenKey)(key) ? "".concat(configKeyPrefix).concat(key) : key;
|
|
192
|
-
if (key === 'BASE_PROJECT' || key === '__BASE_PROJECT') {
|
|
193
|
-
var extensionFile = [".".concat(data[key], ".js"), ".".concat(data[key], ".jsx"), ".".concat(data[key], ".ts"), ".".concat(data[key], ".tsx"), ".".concat(data[key], ".css"), ".".concat(data[key], ".json"), ".".concat(data[key], ".scss")];
|
|
194
|
-
content += contentMap(newConfigKey, extensionFile.join(','), options.exportAs);
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
if (key === 'SITEMAP' || key === '__SITEMAP') {
|
|
198
|
-
content += contentMap(newConfigKey, JSON.stringify(data[key]), options.exportAs);
|
|
199
|
-
return;
|
|
200
|
-
}
|
|
201
|
-
if (Array.isArray(data[key])) {
|
|
202
|
-
content += contentMap(newConfigKey, data[key].join(','), options.exportAs);
|
|
203
|
-
return;
|
|
204
|
-
}
|
|
205
|
-
if (_typeof(data[key]) === 'object') {
|
|
206
|
-
if (data[key].hasOwnProperty(env)) {
|
|
207
|
-
content += contentMap(newConfigKey, data[key][env], options.exportAs);
|
|
208
|
-
} else {
|
|
209
|
-
content += contentMap(newConfigKey, JSON.stringify(data[key]), options.exportAs);
|
|
210
|
-
}
|
|
211
|
-
return;
|
|
212
|
-
}
|
|
213
|
-
content += contentMap(newConfigKey, data[key], options.exportAs);
|
|
214
|
-
});
|
|
215
|
-
(0, _Output.outputToFile)(content, options);
|
|
216
|
-
};
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* Change Entry index.html file
|
|
220
|
-
* Format entry file should be index[.{version}][.{env}].html
|
|
221
|
-
*
|
|
222
|
-
* @param {string} version
|
|
223
|
-
* @param {string} env
|
|
224
|
-
* @param {EntryOptions} options
|
|
225
|
-
* @return {void}
|
|
226
|
-
*/
|
|
227
|
-
var changeEntry = exports.changeEntry = function changeEntry(version, env, options) {
|
|
228
|
-
var newPath = 'index.html';
|
|
229
|
-
var oldPath = "index";
|
|
230
|
-
if (!options.excludeVersion.includes(version)) {
|
|
231
|
-
oldPath = ".".concat(version, ".");
|
|
232
|
-
}
|
|
233
|
-
if (!options.excludeEnv.includes(env)) {
|
|
234
|
-
oldPath = "".concat(oldPath, ".").concat(env);
|
|
235
|
-
}
|
|
236
|
-
oldPath = "".concat(oldPath, ".html");
|
|
237
|
-
if (oldPath !== newPath && (0, _fs.existsSync)(oldPath)) {
|
|
238
|
-
(0, _fs.copyFile)(oldPath, newPath, function (err) {
|
|
239
|
-
if (err) {
|
|
240
|
-
console.error(err);
|
|
241
|
-
return;
|
|
242
|
-
}
|
|
243
|
-
console.log("File copied from '".concat(oldPath, "' to '").concat(newPath, "' successfully!"));
|
|
244
|
-
});
|
|
245
|
-
return;
|
|
246
|
-
}
|
|
247
|
-
console.log('use current index.html');
|
|
248
|
-
};
|
|
249
|
-
//# sourceMappingURL=Config.js.map
|