@andre1502/react-utilities 1.0.5 → 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/Config/Config.d.ts +12 -1
- 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.d.ts +1 -1
- package/dist/config-cli.js +3 -222
- 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/interfaces/Config/EntryOptions.d.ts +4 -0
- 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/Config.ts +48 -1
- package/src/Config/GoogleAuth.ts +1 -1
- package/src/Sentry/React.ts +2 -4
- package/src/Sentry/ReactNative.ts +2 -4
- package/src/config-cli.ts +1 -1
- 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/src/interfaces/Config/EntryOptions.ts +4 -0
- package/dist/Config/Config.js +0 -216
- 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 -500
- package/dist/config-cli.cjs.map +0 -1
- package/dist/config-cli.js.map +0 -1
- package/dist/config-cli.mjs +0 -469
- 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 -30
- 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/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/Config.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { copyFile, existsSync } from 'fs';
|
|
1
2
|
import { isNull } from 'lodash-es';
|
|
2
3
|
import { EnvironmentEnum } from '../enums/EnvironmentEnum';
|
|
4
|
+
import { EntryOptions } from '../interfaces/Config/EntryOptions';
|
|
3
5
|
import { OutputMap } from '../interfaces/Config/OutputMap';
|
|
4
6
|
import { OutputOptions } from '../interfaces/Config/OutputOptions';
|
|
5
7
|
import { isHiddenKey } from '../utils';
|
|
@@ -275,4 +277,49 @@ const transformConfig = (
|
|
|
275
277
|
outputToFile(content, options);
|
|
276
278
|
};
|
|
277
279
|
|
|
278
|
-
|
|
280
|
+
/**
|
|
281
|
+
* Change Entry index.html file
|
|
282
|
+
* Format entry file should be index[.{version}][.{env}].html
|
|
283
|
+
*
|
|
284
|
+
* @param {string} version
|
|
285
|
+
* @param {string} env
|
|
286
|
+
* @param {EntryOptions} options
|
|
287
|
+
* @return {void}
|
|
288
|
+
*/
|
|
289
|
+
const changeEntry = (
|
|
290
|
+
version: string,
|
|
291
|
+
env: string,
|
|
292
|
+
options: EntryOptions,
|
|
293
|
+
): void => {
|
|
294
|
+
const newPath = 'index.html';
|
|
295
|
+
let oldPath = `index`;
|
|
296
|
+
|
|
297
|
+
if (!options.excludeVersion.includes(version)) {
|
|
298
|
+
oldPath = `.${version}.`;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
if (!options.excludeEnv.includes(env)) {
|
|
302
|
+
oldPath = `${oldPath}.${env}`;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
oldPath = `${oldPath}.html`;
|
|
306
|
+
|
|
307
|
+
if (oldPath !== newPath && existsSync(oldPath)) {
|
|
308
|
+
copyFile(oldPath, newPath, (err) => {
|
|
309
|
+
if (err) {
|
|
310
|
+
console.error(err);
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
console.log(
|
|
315
|
+
`File copied from '${oldPath}' to '${newPath}' successfully!`,
|
|
316
|
+
);
|
|
317
|
+
});
|
|
318
|
+
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
console.log('use current index.html');
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
export { changeEntry, exportConfig, processConfig, transformConfig };
|
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,
|
package/src/config-cli.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { exportLocales, processLocales } from './Config/Locales';
|
|
|
6
6
|
import { EnvironmentEnum } from './enums/EnvironmentEnum';
|
|
7
7
|
import { ConfigOptions } from './interfaces/Config/ConfigOptions';
|
|
8
8
|
|
|
9
|
-
export { transformConfig } from './Config/Config';
|
|
9
|
+
export { changeEntry, transformConfig } from './Config/Config';
|
|
10
10
|
export { transformSitemap } from './Config/Sitemap';
|
|
11
11
|
export * from './interfaces/Config/ConfigOptions';
|
|
12
12
|
export * from './interfaces/Config/OutputOptions';
|
|
@@ -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