@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/dist/config-cli.js
CHANGED
|
@@ -1,222 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _exportNames = {
|
|
7
|
-
fetchLocales: true,
|
|
8
|
-
fetchConfig: true,
|
|
9
|
-
fetchAll: true,
|
|
10
|
-
fetchRawValue: true,
|
|
11
|
-
transformConfig: true,
|
|
12
|
-
EnvironmentEnum: true,
|
|
13
|
-
transformSitemap: true
|
|
14
|
-
};
|
|
15
|
-
Object.defineProperty(exports, "EnvironmentEnum", {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
get: function get() {
|
|
18
|
-
return _EnvironmentEnum.EnvironmentEnum;
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
exports.fetchRawValue = exports.fetchLocales = exports.fetchConfig = exports.fetchAll = void 0;
|
|
22
|
-
Object.defineProperty(exports, "transformConfig", {
|
|
23
|
-
enumerable: true,
|
|
24
|
-
get: function get() {
|
|
25
|
-
return _Config.transformConfig;
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
Object.defineProperty(exports, "transformSitemap", {
|
|
29
|
-
enumerable: true,
|
|
30
|
-
get: function get() {
|
|
31
|
-
return _Sitemap.transformSitemap;
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
var _Config = require("./Config/Config");
|
|
35
|
-
var _GoogleAuth = require("./Config/GoogleAuth");
|
|
36
|
-
var _Locales = require("./Config/Locales");
|
|
37
|
-
var _EnvironmentEnum = require("./enums/EnvironmentEnum");
|
|
38
|
-
var _Sitemap = require("./Config/Sitemap");
|
|
39
|
-
var _ConfigOptions = require("./interfaces/Config/ConfigOptions");
|
|
40
|
-
Object.keys(_ConfigOptions).forEach(function (key) {
|
|
41
|
-
if (key === "default" || key === "__esModule") return;
|
|
42
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
43
|
-
if (key in exports && exports[key] === _ConfigOptions[key]) return;
|
|
44
|
-
Object.defineProperty(exports, key, {
|
|
45
|
-
enumerable: true,
|
|
46
|
-
get: function get() {
|
|
47
|
-
return _ConfigOptions[key];
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
var _OutputOptions = require("./interfaces/Config/OutputOptions");
|
|
52
|
-
Object.keys(_OutputOptions).forEach(function (key) {
|
|
53
|
-
if (key === "default" || key === "__esModule") return;
|
|
54
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
55
|
-
if (key in exports && exports[key] === _OutputOptions[key]) return;
|
|
56
|
-
Object.defineProperty(exports, key, {
|
|
57
|
-
enumerable: true,
|
|
58
|
-
get: function get() {
|
|
59
|
-
return _OutputOptions[key];
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
64
|
-
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { if (r) i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n;else { var o = function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); }; o("next", 0), o("throw", 1), o("return", 2); } }, _regeneratorDefine2(e, r, n, t); }
|
|
65
|
-
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); }
|
|
66
|
-
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); }); }; }
|
|
67
|
-
/**
|
|
68
|
-
* Private function to fetch locales
|
|
69
|
-
*
|
|
70
|
-
* @param {GoogleAuth<JSONClient>} auth
|
|
71
|
-
* @param {ConfigOption} options
|
|
72
|
-
* @return {Promise<void>}
|
|
73
|
-
*/
|
|
74
|
-
var innerFetchLocales = /*#__PURE__*/function () {
|
|
75
|
-
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(auth, options) {
|
|
76
|
-
var values, data;
|
|
77
|
-
return _regenerator().w(function (_context) {
|
|
78
|
-
while (1) switch (_context.n) {
|
|
79
|
-
case 0:
|
|
80
|
-
_context.n = 1;
|
|
81
|
-
return (0, _GoogleAuth.fetchGoogleSheet)(auth, options.spreadsheetId, options.spreadsheetTab);
|
|
82
|
-
case 1:
|
|
83
|
-
values = _context.v;
|
|
84
|
-
if (!(!values || values.length === 0)) {
|
|
85
|
-
_context.n = 2;
|
|
86
|
-
break;
|
|
87
|
-
}
|
|
88
|
-
console.log('No data found.');
|
|
89
|
-
return _context.a(2);
|
|
90
|
-
case 2:
|
|
91
|
-
// console.log('values,', values);
|
|
92
|
-
data = (0, _Locales.processLocales)(values);
|
|
93
|
-
(0, _Locales.exportLocales)(data, options.output);
|
|
94
|
-
case 3:
|
|
95
|
-
return _context.a(2);
|
|
96
|
-
}
|
|
97
|
-
}, _callee);
|
|
98
|
-
}));
|
|
99
|
-
return function innerFetchLocales(_x, _x2) {
|
|
100
|
-
return _ref.apply(this, arguments);
|
|
101
|
-
};
|
|
102
|
-
}();
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Private function to fetch config
|
|
106
|
-
*
|
|
107
|
-
* @param {GoogleAuth<JSONClient>} auth
|
|
108
|
-
* @param {ConfigOption} options
|
|
109
|
-
* @return {Promise<void>}
|
|
110
|
-
*/
|
|
111
|
-
var innerFetchConfig = /*#__PURE__*/function () {
|
|
112
|
-
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(auth, options) {
|
|
113
|
-
var values, data;
|
|
114
|
-
return _regenerator().w(function (_context2) {
|
|
115
|
-
while (1) switch (_context2.n) {
|
|
116
|
-
case 0:
|
|
117
|
-
_context2.n = 1;
|
|
118
|
-
return (0, _GoogleAuth.fetchGoogleSheet)(auth, options.spreadsheetId, options.spreadsheetTab);
|
|
119
|
-
case 1:
|
|
120
|
-
values = _context2.v;
|
|
121
|
-
if (!(!values || values.length === 0)) {
|
|
122
|
-
_context2.n = 2;
|
|
123
|
-
break;
|
|
124
|
-
}
|
|
125
|
-
console.log('No data found.');
|
|
126
|
-
return _context2.a(2);
|
|
127
|
-
case 2:
|
|
128
|
-
// console.log('values,', values);
|
|
129
|
-
data = (0, _Config.processConfig)(values);
|
|
130
|
-
(0, _Config.exportConfig)(data, options.output);
|
|
131
|
-
case 3:
|
|
132
|
-
return _context2.a(2);
|
|
133
|
-
}
|
|
134
|
-
}, _callee2);
|
|
135
|
-
}));
|
|
136
|
-
return function innerFetchConfig(_x3, _x4) {
|
|
137
|
-
return _ref2.apply(this, arguments);
|
|
138
|
-
};
|
|
139
|
-
}();
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Fetch locales
|
|
143
|
-
*
|
|
144
|
-
* @param {ConfigOptions} options
|
|
145
|
-
* @return {void}
|
|
146
|
-
*/
|
|
147
|
-
var fetchLocales = exports.fetchLocales = function fetchLocales(options) {
|
|
148
|
-
try {
|
|
149
|
-
var auth = (0, _GoogleAuth.authorizeServiceAccount)();
|
|
150
|
-
innerFetchLocales(auth, options);
|
|
151
|
-
} catch (error) {
|
|
152
|
-
console.error(error);
|
|
153
|
-
}
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Fetch config
|
|
158
|
-
*
|
|
159
|
-
* @param {ConfigOptions} options
|
|
160
|
-
* @return {void}
|
|
161
|
-
*/
|
|
162
|
-
var fetchConfig = exports.fetchConfig = function fetchConfig(options) {
|
|
163
|
-
try {
|
|
164
|
-
var auth = (0, _GoogleAuth.authorizeServiceAccount)();
|
|
165
|
-
innerFetchConfig(auth, options);
|
|
166
|
-
} catch (error) {
|
|
167
|
-
console.error(error);
|
|
168
|
-
}
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* Fetch all format from array options
|
|
173
|
-
*
|
|
174
|
-
* @param {ConfigOptions[]} options
|
|
175
|
-
* @return {void}
|
|
176
|
-
*/
|
|
177
|
-
var fetchAll = exports.fetchAll = function fetchAll(options) {
|
|
178
|
-
try {
|
|
179
|
-
var auth = (0, _GoogleAuth.authorizeServiceAccount)();
|
|
180
|
-
options.forEach(function (option) {
|
|
181
|
-
if (option.formatAs === 'locales') {
|
|
182
|
-
innerFetchLocales(auth, option);
|
|
183
|
-
} else if (option.formatAs === 'config') {
|
|
184
|
-
innerFetchConfig(auth, option);
|
|
185
|
-
}
|
|
186
|
-
});
|
|
187
|
-
} catch (error) {
|
|
188
|
-
console.error(error);
|
|
189
|
-
}
|
|
190
|
-
};
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* Fetch raw value
|
|
194
|
-
*
|
|
195
|
-
* @param {ConfigOptions} options
|
|
196
|
-
* @return {Promise<any[][] | null | undefined>}
|
|
197
|
-
*/
|
|
198
|
-
var fetchRawValue = exports.fetchRawValue = /*#__PURE__*/function () {
|
|
199
|
-
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(options) {
|
|
200
|
-
var auth, _t;
|
|
201
|
-
return _regenerator().w(function (_context3) {
|
|
202
|
-
while (1) switch (_context3.n) {
|
|
203
|
-
case 0:
|
|
204
|
-
_context3.p = 0;
|
|
205
|
-
auth = (0, _GoogleAuth.authorizeServiceAccount)();
|
|
206
|
-
_context3.n = 1;
|
|
207
|
-
return (0, _GoogleAuth.fetchGoogleSheet)(auth, options.spreadsheetId, options.spreadsheetTab);
|
|
208
|
-
case 1:
|
|
209
|
-
return _context3.a(2, _context3.v);
|
|
210
|
-
case 2:
|
|
211
|
-
_context3.p = 2;
|
|
212
|
-
_t = _context3.v;
|
|
213
|
-
console.error(_t);
|
|
214
|
-
return _context3.a(2, null);
|
|
215
|
-
}
|
|
216
|
-
}, _callee3, null, [[0, 2]]);
|
|
217
|
-
}));
|
|
218
|
-
return function fetchRawValue(_x5) {
|
|
219
|
-
return _ref3.apply(this, arguments);
|
|
220
|
-
};
|
|
221
|
-
}();
|
|
222
|
-
//# sourceMappingURL=config-cli.js.map
|
|
1
|
+
import { t as e } from "./EnvironmentEnum-CXTWJxNo.js";
|
|
2
|
+
import { a as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./config-cli-BIF4xuoO.js";
|
|
3
|
+
export { e as EnvironmentEnum, i as changeEntry, s as fetchAll, r as fetchConfig, a as fetchLocales, n as fetchRawValue, o as transformConfig, t as transformSitemap };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
TWD
|
|
3
|
-
USD
|
|
4
|
-
VND
|
|
5
|
-
}
|
|
1
|
+
export declare const CurrencySymbolEnum: {
|
|
2
|
+
readonly TWD: "NT$";
|
|
3
|
+
readonly USD: "US$";
|
|
4
|
+
readonly VND: "₫";
|
|
5
|
+
};
|
|
6
|
+
export type CurrencySymbolEnum = (typeof CurrencySymbolEnum)[keyof typeof CurrencySymbolEnum];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
PC
|
|
3
|
-
MOBILE
|
|
4
|
-
}
|
|
1
|
+
export declare const DeviceEnum: {
|
|
2
|
+
readonly PC: "pc";
|
|
3
|
+
readonly MOBILE: "mobile";
|
|
4
|
+
};
|
|
5
|
+
export type DeviceEnum = (typeof DeviceEnum)[keyof typeof DeviceEnum];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
DEV
|
|
3
|
-
STAGING
|
|
4
|
-
PRODUCTION
|
|
5
|
-
}
|
|
1
|
+
export declare const EnvironmentEnum: {
|
|
2
|
+
readonly DEV: "dev";
|
|
3
|
+
readonly STAGING: "staging";
|
|
4
|
+
readonly PRODUCTION: "production";
|
|
5
|
+
};
|
|
6
|
+
export type EnvironmentEnum = (typeof EnvironmentEnum)[keyof typeof EnvironmentEnum];
|