@prosopo/cli 3.8.30 → 3.8.32
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/.turbo/turbo-build$colon$cjs.log +1 -1
- package/.turbo/turbo-build$colon$tsc.log +31 -31
- package/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +34 -0
- package/dist/bundle/{i18SharedOptions-CRkwRXkj.js → i18SharedOptions-B7wdtNwg.js} +1 -2
- package/dist/bundle/{i18nBackend-C5Be0TE1.js → i18nBackend-Uwy34cG1.js} +88 -75
- package/dist/bundle/i18nFrontend-CrzYU5j0.js +60 -0
- package/dist/bundle/provider.cli.bundle.js +8176 -8028
- package/dist/bundle/{src-CpsWPfpk.js → src-DfWKI0wU.js} +14 -14
- package/package.json +8 -8
- package/dist/bundle/i18nFrontend-CZ7yONJC.js +0 -106
|
@@ -97,4 +97,4 @@ dist/cjs/RateLimiter.cjs 7.05 kB │ gzip: 1.02 kB
|
|
|
97
97
|
[38;5;240m │[0m ╰─────── This `import.meta` will be replaced with an empty object (`{}`) automatically. If this is desired, you can suppress this warning by adding `transform.define: { 'import.meta': {} }`. If `import.meta` needs to be kept as-is, you need to set the output format to `esm`.
|
|
98
98
|
[38;5;246m────╯[0m
|
|
99
99
|
[39m
|
|
100
|
-
[32m✓ built in
|
|
100
|
+
[32m✓ built in 45ms[39m
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
$ tsc --build --verbose
|
|
2
|
-
|
|
2
|
+
9:43:53 PM - Projects in this build:
|
|
3
3
|
* ../../dev/config/tsconfig.json
|
|
4
4
|
* ../util/tsconfig.json
|
|
5
5
|
* ../locale/tsconfig.json
|
|
@@ -30,63 +30,63 @@ $ tsc --build --verbose
|
|
|
30
30
|
* ../../dev/workspace/tsconfig.json
|
|
31
31
|
* tsconfig.json
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
9:43:53 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/webpack/webpack.config.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
9:43:53 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
9:43:53 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/process.ts' is older than output '../locale/tsconfig.tsbuildinfo'
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
9:43:53 PM - Project '../util-crypto/tsconfig.json' is up to date because newest input '../util-crypto/src/types.ts' is older than output '../util-crypto/tsconfig.tsbuildinfo'
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
9:43:53 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/types.test-d.ts' is older than output '../types/tsconfig.tsbuildinfo'
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
9:43:53 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
9:43:53 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/tests/loggerBrowser.unit.test.ts' is older than output '../logger/tsconfig.tsbuildinfo'
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
9:43:53 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/index.ts' is older than output '../common/tsconfig.tsbuildinfo'
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
9:43:53 PM - Project '../dotenv/tsconfig.json' is up to date because newest input '../dotenv/src/env.ts' is older than output '../dotenv/tsconfig.tsbuildinfo'
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
9:43:54 PM - Project '../ipinfo/tsconfig.json' is up to date because newest input '../ipinfo/src/IpInfoService.ts' is older than output '../ipinfo/tsconfig.tsbuildinfo'
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
9:43:54 PM - Project '../api-route/tsconfig.json' is up to date because newest input '../api-route/src/tests/apiRoute.unit.test.ts' is older than output '../api-route/tsconfig.tsbuildinfo'
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
9:43:54 PM - Project '../redis-client/tsconfig.json' is up to date because newest input '../redis-client/src/index.ts' is older than output '../redis-client/tsconfig.tsbuildinfo'
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
9:43:54 PM - Project '../user-access-policy/tsconfig.json' is up to date because newest input '../user-access-policy/src/transformRule.ts' is older than output '../user-access-policy/tsconfig.tsbuildinfo'
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
9:43:54 PM - Project '../types-database/tsconfig.json' is up to date because newest input '../types-database/src/index.ts' is older than output '../types-database/tsconfig.tsbuildinfo'
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
9:43:54 PM - Project '../database/tsconfig.json' is up to date because newest input '../database/src/tests/unit/captchaLabel.unit.test.ts' is older than output '../database/tsconfig.tsbuildinfo'
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
9:43:54 PM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/index.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
9:43:54 PM - Project '../types-env/tsconfig.json' is up to date because newest input '../types-env/src/env.ts' is older than output '../types-env/tsconfig.tsbuildinfo'
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
9:43:54 PM - Project '../env/tsconfig.json' is up to date because newest input '../env/src/index.ts' is older than output '../env/tsconfig.tsbuildinfo'
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
9:43:54 PM - Project '../api-express-router/tsconfig.json' is up to date because newest input '../api-express-router/src/apiExpressRouterFactory.ts' is older than output '../api-express-router/tsconfig.tsbuildinfo'
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
9:43:54 PM - Project '../puzzle-assets/tsconfig.json' is up to date because newest input '../puzzle-assets/src/types.ts' is older than output '../puzzle-assets/tsconfig.tsbuildinfo'
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
9:43:54 PM - Project '../audio-assets/tsconfig.json' is up to date because newest input '../audio-assets/src/distort.ts' is older than output '../audio-assets/tsconfig.tsbuildinfo'
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
9:43:54 PM - Project '../captcha-severity/tsconfig.json' is up to date because newest input '../captcha-severity/src/index.test.ts' is older than output '../captcha-severity/tsconfig.tsbuildinfo'
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
9:43:54 PM - Project '../datasets/tsconfig.json' is up to date because newest input '../datasets/src/tests/captcha.unit.test.ts' is older than output '../datasets/tsconfig.tsbuildinfo'
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
9:43:54 PM - Project '../icon-order-assets/tsconfig.json' is up to date because newest input '../icon-order-assets/src/background.ts' is older than output '../icon-order-assets/tsconfig.tsbuildinfo'
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
9:43:54 PM - Project '../load-balancer/tsconfig.json' is up to date because newest input '../load-balancer/src/balancer.ts' is older than output '../load-balancer/tsconfig.tsbuildinfo'
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
9:43:54 PM - Project '../web-bot-auth/tsconfig.json' is up to date because newest input '../web-bot-auth/src/index.ts' is older than output '../web-bot-auth/tsconfig.tsbuildinfo'
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
9:43:54 PM - Project '../provider/tsconfig.json' is up to date because newest input '../provider/src/utils/devicePlatform.ts' is older than output '../provider/tsconfig.tsbuildinfo'
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
9:43:54 PM - Project '../../dev/workspace/tsconfig.json' is up to date because newest input '../../dev/workspace/src/index.ts' is older than output '../../dev/workspace/tsconfig.tsbuildinfo'
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
9:43:54 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
9:43:54 PM - Building project '/home/runner/work/captcha/captcha/packages/cli/tsconfig.json'...
|
|
92
92
|
|
package/.turbo/turbo-build.log
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# @prosopo/cli
|
|
2
2
|
|
|
3
|
+
## 3.8.32
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- Updated dependencies [e841741]
|
|
7
|
+
- @prosopo/locale@3.10.1
|
|
8
|
+
- @prosopo/common@3.2.1
|
|
9
|
+
- @prosopo/provider@5.19.1
|
|
10
|
+
- @prosopo/types@5.16.1
|
|
11
|
+
- @prosopo/env@3.6.75
|
|
12
|
+
- @prosopo/keyring@2.10.6
|
|
13
|
+
- @prosopo/api@4.7.1
|
|
14
|
+
|
|
15
|
+
## 3.8.31
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [eb99b3d]
|
|
19
|
+
- Updated dependencies [f3f7243]
|
|
20
|
+
- Updated dependencies [cbb6a10]
|
|
21
|
+
- Updated dependencies [4961a7e]
|
|
22
|
+
- Updated dependencies [b351896]
|
|
23
|
+
- Updated dependencies [f8eddf7]
|
|
24
|
+
- Updated dependencies [aec7857]
|
|
25
|
+
- Updated dependencies [0bd0230]
|
|
26
|
+
- Updated dependencies [6b11b15]
|
|
27
|
+
- Updated dependencies [f8eddf7]
|
|
28
|
+
- Updated dependencies [1634139]
|
|
29
|
+
- @prosopo/locale@3.10.0
|
|
30
|
+
- @prosopo/types@5.16.0
|
|
31
|
+
- @prosopo/common@3.2.0
|
|
32
|
+
- @prosopo/provider@5.19.0
|
|
33
|
+
- @prosopo/api@4.7.0
|
|
34
|
+
- @prosopo/env@3.6.74
|
|
35
|
+
- @prosopo/keyring@2.10.5
|
|
36
|
+
|
|
3
37
|
## 3.8.30
|
|
4
38
|
### Patch Changes
|
|
5
39
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as e, s as t } from "./provider.cli.bundle.js";
|
|
2
2
|
//#endregion
|
|
3
3
|
//#region ../locale/dist/i18SharedOptions.js
|
|
4
4
|
var n = {
|
|
5
5
|
debug: (typeof process < "u" ? process : void 0)?.env?.PROSOPO_LOG_LEVEL === "debug",
|
|
6
6
|
fallbackLng: e.english,
|
|
7
|
-
namespace: "translation",
|
|
8
7
|
supportedLngs: t,
|
|
9
8
|
nonExplicitSupportedLngs: !1
|
|
10
9
|
};
|
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
import { t as e } from "./i18SharedOptions-
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { t as e } from "./i18SharedOptions-B7wdtNwg.js";
|
|
2
|
+
import { a as t, f as n, l as r, m as i, p as a, t as o, u as s } from "./provider.cli.bundle.js";
|
|
3
|
+
import c from "node:fs";
|
|
4
|
+
import l from "node:path";
|
|
5
|
+
import { fileURLToPath as u } from "node:url";
|
|
4
6
|
//#region ../locale/dist/util.js
|
|
5
|
-
var
|
|
7
|
+
var d = () => !!(typeof window < "u" && window.document && window.document.createElement), f = () => !d(), p = "prosopo", m = () => {
|
|
8
|
+
let e = new r(null, {
|
|
9
|
+
order: [p],
|
|
10
|
+
caches: !1
|
|
11
|
+
});
|
|
12
|
+
return e.addDetector({
|
|
13
|
+
name: p,
|
|
14
|
+
lookup: (e) => t(e)
|
|
15
|
+
}), e;
|
|
16
|
+
}, h = /* @__PURE__ */ n(((e) => {
|
|
6
17
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.debounce = p, e.defaults = c, e.getPath = _, e.interpolate = y, e.interpolatePath = b, e.isSafeLangSegment = u, e.isSafeNsSegment = d, e.isSafePathSegment = void 0, e.pushPath = g, e.setPath = h;
|
|
7
18
|
function t(e, t) {
|
|
8
19
|
var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
@@ -155,7 +166,7 @@ var s = () => !!(typeof window < "u" && window.document && window.document.creat
|
|
|
155
166
|
});
|
|
156
167
|
return r ? null : i;
|
|
157
168
|
}
|
|
158
|
-
})),
|
|
169
|
+
})), g = /* @__PURE__ */ n(((e, t) => {
|
|
159
170
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
160
171
|
function n(e, t) {
|
|
161
172
|
var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
@@ -978,7 +989,7 @@ var s = () => !!(typeof window < "u" && window.document && window.document.creat
|
|
|
978
989
|
}
|
|
979
990
|
}
|
|
980
991
|
}, t.exports = e.default;
|
|
981
|
-
})),
|
|
992
|
+
})), _ = /* @__PURE__ */ n(((e) => {
|
|
982
993
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.SyntaxKind = e.ScanError = e.ParseErrorCode = void 0, e.applyEdits = ae, e.findNodeAtOffset = e.findNodeAtLocation = e.createScanner = void 0, e.format = re, e.getNodeValue = e.getNodePath = e.getLocation = void 0, e.modify = ie, e.parseTree = e.parse = void 0, e.printParseErrorCode = ne, e.visit = e.stripComments = void 0;
|
|
983
994
|
function t(e, t) {
|
|
984
995
|
var n = Object.keys(e);
|
|
@@ -2048,7 +2059,7 @@ var s = () => !!(typeof window < "u" && window.document && window.document.creat
|
|
|
2048
2059
|
}
|
|
2049
2060
|
return e;
|
|
2050
2061
|
}
|
|
2051
|
-
})),
|
|
2062
|
+
})), v = /* @__PURE__ */ n(((e) => {
|
|
2052
2063
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.types = e.safeLoadAll = e.safeLoad = e.safeDump = e.loadAll = e.load = e.dump = e.default = e.YAMLException = e.Type = e.Schema = e.JSON_SCHEMA = e.FAILSAFE_SCHEMA = e.DEFAULT_SCHEMA = e.CORE_SCHEMA = void 0;
|
|
2053
2064
|
function t(e) {
|
|
2054
2065
|
"@babel/helpers - typeof";
|
|
@@ -3114,30 +3125,30 @@ var s = () => !!(typeof window < "u" && window.document && window.document.creat
|
|
|
3114
3125
|
safeLoadAll: e.safeLoadAll = Un("safeLoadAll", "loadAll"),
|
|
3115
3126
|
safeDump: e.safeDump = Un("safeDump", "dump")
|
|
3116
3127
|
};
|
|
3117
|
-
})),
|
|
3128
|
+
})), y = /* @__PURE__ */ n(((e, t) => {
|
|
3118
3129
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0, e.default = function(e) {
|
|
3119
3130
|
if (!(e.indexOf(".") < 0)) return `.${e.split(".").pop()}`;
|
|
3120
3131
|
}, t.exports = e.default;
|
|
3121
|
-
})),
|
|
3132
|
+
})), b = /* @__PURE__ */ n(((e, t) => {
|
|
3122
3133
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.readFile = E, e.readFileSync = T;
|
|
3123
|
-
var n = s(
|
|
3134
|
+
var n = s(g()), r = _(), i = s(v()), o = s(y());
|
|
3124
3135
|
function s(e) {
|
|
3125
3136
|
return e && e.__esModule ? e : { default: e };
|
|
3126
3137
|
}
|
|
3127
|
-
var c = typeof Deno < "u", l = typeof Bun < "u",
|
|
3128
|
-
var t =
|
|
3138
|
+
var c = typeof Deno < "u", l = typeof Bun < "u", u = i.default !== void 0 && i.default.load ? i.default : void 0, d = c ? void 0 : a("node:fs"), f = eval, p = function(e) {
|
|
3139
|
+
var t = d.readFileSync(e, "utf8"), n;
|
|
3129
3140
|
try {
|
|
3130
|
-
n =
|
|
3141
|
+
n = d.statSync(e);
|
|
3131
3142
|
} catch {}
|
|
3132
3143
|
return {
|
|
3133
3144
|
data: t,
|
|
3134
3145
|
stat: n
|
|
3135
3146
|
};
|
|
3136
|
-
},
|
|
3147
|
+
}, m = function(e) {
|
|
3137
3148
|
return new Promise(function(t, n) {
|
|
3138
|
-
|
|
3149
|
+
d.readFile(e, "utf8", function(r, i) {
|
|
3139
3150
|
if (r) return n(r);
|
|
3140
|
-
|
|
3151
|
+
d.stat(e, function(e, n) {
|
|
3141
3152
|
return t(e ? { data: i } : {
|
|
3142
3153
|
data: i,
|
|
3143
3154
|
stat: n
|
|
@@ -3145,7 +3156,7 @@ var s = () => !!(typeof window < "u" && window.document && window.document.creat
|
|
|
3145
3156
|
});
|
|
3146
3157
|
});
|
|
3147
3158
|
});
|
|
3148
|
-
},
|
|
3159
|
+
}, h = function(e) {
|
|
3149
3160
|
var t = new TextDecoder("utf-8"), n = Deno.readFileSync(e), r = t.decode(n), i;
|
|
3150
3161
|
try {
|
|
3151
3162
|
i = Deno.statSync(e);
|
|
@@ -3169,7 +3180,7 @@ var s = () => !!(typeof window < "u" && window.document && window.document.creat
|
|
|
3169
3180
|
});
|
|
3170
3181
|
}).catch(n);
|
|
3171
3182
|
});
|
|
3172
|
-
}, x =
|
|
3183
|
+
}, x = p, S = m, C = function(e, t, n) {
|
|
3173
3184
|
var r = e.lastIndexOf(t);
|
|
3174
3185
|
return r > -1 ? e.substring(0, r) + n + e.substring(r + t.length) : e.toString();
|
|
3175
3186
|
}, w = function(e, i, a) {
|
|
@@ -3178,7 +3189,7 @@ var s = () => !!(typeof window < "u" && window.document && window.document.creat
|
|
|
3178
3189
|
switch (e) {
|
|
3179
3190
|
case ".js":
|
|
3180
3191
|
case ".ts":
|
|
3181
|
-
t === void 0 && (i.indexOf("exports") > -1 ? i = `(${C(i.substring(i.indexOf("=") + 1), "};", "")})` : i.indexOf("export default ") > -1 && (i = `(${C(i.substring(i.indexOf("export default ") + 15), "};", "")})`)), o =
|
|
3192
|
+
t === void 0 && (i.indexOf("exports") > -1 ? i = `(${C(i.substring(i.indexOf("=") + 1), "};", "")})` : i.indexOf("export default ") > -1 && (i = `(${C(i.substring(i.indexOf("export default ") + 15), "};", "")})`)), o = f(i);
|
|
3182
3193
|
break;
|
|
3183
3194
|
case ".json5":
|
|
3184
3195
|
o = n.default.parse(i);
|
|
@@ -3188,7 +3199,7 @@ var s = () => !!(typeof window < "u" && window.document && window.document.creat
|
|
|
3188
3199
|
break;
|
|
3189
3200
|
case ".yml":
|
|
3190
3201
|
case ".yaml":
|
|
3191
|
-
o =
|
|
3202
|
+
o = u.load(i);
|
|
3192
3203
|
break;
|
|
3193
3204
|
default: o = a.parse(i);
|
|
3194
3205
|
}
|
|
@@ -3200,10 +3211,10 @@ var s = () => !!(typeof window < "u" && window.document && window.document.creat
|
|
|
3200
3211
|
var a = x(e);
|
|
3201
3212
|
r = a.data, i = a.stat;
|
|
3202
3213
|
} else if (c) {
|
|
3203
|
-
var s =
|
|
3214
|
+
var s = h(e);
|
|
3204
3215
|
r = s.data, i = s.stat;
|
|
3205
3216
|
} else {
|
|
3206
|
-
var u =
|
|
3217
|
+
var u = p(e);
|
|
3207
3218
|
r = u.data, i = u.stat;
|
|
3208
3219
|
}
|
|
3209
3220
|
return {
|
|
@@ -3212,7 +3223,7 @@ var s = () => !!(typeof window < "u" && window.document && window.document.creat
|
|
|
3212
3223
|
};
|
|
3213
3224
|
}
|
|
3214
3225
|
function E(e) {
|
|
3215
|
-
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : { parse: JSON.parse }, n = (0, o.default)(e), r = l ? S : c ? b :
|
|
3226
|
+
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : { parse: JSON.parse }, n = (0, o.default)(e), r = l ? S : c ? b : m;
|
|
3216
3227
|
return new Promise(function(i, a) {
|
|
3217
3228
|
r(e).then(function(r) {
|
|
3218
3229
|
var o = r.data, s = r.stat;
|
|
@@ -3227,14 +3238,14 @@ var s = () => !!(typeof window < "u" && window.document && window.document.creat
|
|
|
3227
3238
|
}).catch(a);
|
|
3228
3239
|
});
|
|
3229
3240
|
}
|
|
3230
|
-
})),
|
|
3241
|
+
})), x = /* @__PURE__ */ n(((e, t) => {
|
|
3231
3242
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.removeFile = j, e.removeFileSync = A, e.writeFile = k, e.writeFileSync = O;
|
|
3232
|
-
var n = o(
|
|
3243
|
+
var n = o(g()), r = o(v()), i = o(y());
|
|
3233
3244
|
function o(e) {
|
|
3234
3245
|
return e && e.__esModule ? e : { default: e };
|
|
3235
3246
|
}
|
|
3236
|
-
var s = typeof Deno < "u", c = typeof Bun < "u", l = r.default !== void 0 && r.default.load ? r.default : void 0,
|
|
3237
|
-
function
|
|
3247
|
+
var s = typeof Deno < "u", c = typeof Bun < "u", l = r.default !== void 0 && r.default.load ? r.default : void 0, u = s ? void 0 : a("node:fs");
|
|
3248
|
+
function d(e) {
|
|
3238
3249
|
if (e.length === 0) return ".";
|
|
3239
3250
|
for (var t = e.charCodeAt(0), n = t === 47, r = -1, i = !0, a = e.length - 1; a >= 1; --a) if (t = e.charCodeAt(a), t === 47) {
|
|
3240
3251
|
if (!i) {
|
|
@@ -3244,37 +3255,37 @@ var s = () => !!(typeof window < "u" && window.document && window.document.creat
|
|
|
3244
3255
|
} else i = !1;
|
|
3245
3256
|
return r === -1 ? n ? "/" : "." : n && r === 1 ? "//" : e.slice(0, r);
|
|
3246
3257
|
}
|
|
3247
|
-
var
|
|
3258
|
+
var f = function(e, t) {
|
|
3248
3259
|
try {
|
|
3249
|
-
|
|
3260
|
+
u.mkdirSync(d(e), { recursive: !0 });
|
|
3250
3261
|
} catch {}
|
|
3251
|
-
return
|
|
3252
|
-
},
|
|
3262
|
+
return u.writeFileSync(e, t, "utf8");
|
|
3263
|
+
}, p = function(e, t) {
|
|
3253
3264
|
return new Promise(function(n, r) {
|
|
3254
|
-
|
|
3255
|
-
|
|
3265
|
+
u.mkdir(d(e), { recursive: !0 }, function() {
|
|
3266
|
+
u.writeFile(e, t, "utf8", function(e, t) {
|
|
3256
3267
|
return e ? r(e) : n(t);
|
|
3257
3268
|
});
|
|
3258
3269
|
});
|
|
3259
3270
|
});
|
|
3260
|
-
},
|
|
3261
|
-
return
|
|
3262
|
-
},
|
|
3271
|
+
}, m = function(e) {
|
|
3272
|
+
return u.unlinkSync(e);
|
|
3273
|
+
}, h = function(e) {
|
|
3263
3274
|
return new Promise(function(t, n) {
|
|
3264
|
-
return
|
|
3275
|
+
return u.unlink(e, function(e) {
|
|
3265
3276
|
return e ? n(e) : t();
|
|
3266
3277
|
});
|
|
3267
3278
|
});
|
|
3268
|
-
},
|
|
3279
|
+
}, _ = function(e, t) {
|
|
3269
3280
|
var n = new TextEncoder().encode(t);
|
|
3270
3281
|
try {
|
|
3271
|
-
Deno.mkdirSync(
|
|
3282
|
+
Deno.mkdirSync(d(e), { recursive: !0 });
|
|
3272
3283
|
} catch {}
|
|
3273
3284
|
Deno.writeFileSync(e, n);
|
|
3274
3285
|
}, b = function(e, t) {
|
|
3275
3286
|
var n = new TextEncoder().encode(t);
|
|
3276
3287
|
return new Promise(function(t, r) {
|
|
3277
|
-
Deno.mkdir(
|
|
3288
|
+
Deno.mkdir(d(e), { recursive: !0 }).then(function() {
|
|
3278
3289
|
Deno.writeFile(e, n).then(t, r);
|
|
3279
3290
|
}).catch(function() {
|
|
3280
3291
|
Deno.writeFile(e, n).then(t, r);
|
|
@@ -3284,7 +3295,7 @@ var s = () => !!(typeof window < "u" && window.document && window.document.creat
|
|
|
3284
3295
|
Deno.removeSync(e);
|
|
3285
3296
|
}, S = function(e) {
|
|
3286
3297
|
return Deno.remove(e);
|
|
3287
|
-
}, C =
|
|
3298
|
+
}, C = f, w = p, T = m, E = h, D = function(e, r, i) {
|
|
3288
3299
|
var a = "";
|
|
3289
3300
|
switch (e) {
|
|
3290
3301
|
case ".js":
|
|
@@ -3309,7 +3320,7 @@ var s = () => !!(typeof window < "u" && window.document && window.document.creat
|
|
|
3309
3320
|
} catch (t) {
|
|
3310
3321
|
throw t.message = "error stringifying " + e + ": " + t.message, t;
|
|
3311
3322
|
}
|
|
3312
|
-
return c ? C(e, a) : s ?
|
|
3323
|
+
return c ? C(e, a) : s ? _(e, a) : f(e, a);
|
|
3313
3324
|
}
|
|
3314
3325
|
function k(e, t) {
|
|
3315
3326
|
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
|
|
@@ -3321,17 +3332,17 @@ var s = () => !!(typeof window < "u" && window.document && window.document.creat
|
|
|
3321
3332
|
} catch (t) {
|
|
3322
3333
|
throw t.message = "error stringifying " + e + ": " + t.message, t;
|
|
3323
3334
|
}
|
|
3324
|
-
return (c ? w : s ? b :
|
|
3335
|
+
return (c ? w : s ? b : p)(e, a);
|
|
3325
3336
|
}
|
|
3326
3337
|
function A(e) {
|
|
3327
|
-
return c ? T(e) : s ? x(e) :
|
|
3338
|
+
return c ? T(e) : s ? x(e) : m(e);
|
|
3328
3339
|
}
|
|
3329
3340
|
function j(e) {
|
|
3330
|
-
return (c ? E : s ? S :
|
|
3341
|
+
return (c ? E : s ? S : h)(e);
|
|
3331
3342
|
}
|
|
3332
|
-
})),
|
|
3343
|
+
})), S = /* @__PURE__ */ i((/* @__PURE__ */ n(((e, t) => {
|
|
3333
3344
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
3334
|
-
var n =
|
|
3345
|
+
var n = h(), r = b(), i = x();
|
|
3335
3346
|
function a(e) {
|
|
3336
3347
|
"@babel/helpers - typeof";
|
|
3337
3348
|
return a = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
@@ -3346,17 +3357,17 @@ var s = () => !!(typeof window < "u" && window.document && window.document.creat
|
|
|
3346
3357
|
function s(e, t) {
|
|
3347
3358
|
for (var n = 0; n < t.length; n++) {
|
|
3348
3359
|
var r = t[n];
|
|
3349
|
-
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e,
|
|
3360
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, l(r.key), r);
|
|
3350
3361
|
}
|
|
3351
3362
|
}
|
|
3352
3363
|
function c(e, t, n) {
|
|
3353
3364
|
return t && s(e.prototype, t), n && s(e, n), Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
3354
3365
|
}
|
|
3355
|
-
function
|
|
3356
|
-
var t =
|
|
3366
|
+
function l(e) {
|
|
3367
|
+
var t = u(e, "string");
|
|
3357
3368
|
return a(t) == "symbol" ? t : t + "";
|
|
3358
3369
|
}
|
|
3359
|
-
function
|
|
3370
|
+
function u(e, t) {
|
|
3360
3371
|
if (a(e) != "object" || !e) return e;
|
|
3361
3372
|
var n = e[Symbol.toPrimitive];
|
|
3362
3373
|
if (n !== void 0) {
|
|
@@ -3366,7 +3377,7 @@ var s = () => !!(typeof window < "u" && window.document && window.document.creat
|
|
|
3366
3377
|
}
|
|
3367
3378
|
return (t === "string" ? String : Number)(e);
|
|
3368
3379
|
}
|
|
3369
|
-
var
|
|
3380
|
+
var d = function() {
|
|
3370
3381
|
return {
|
|
3371
3382
|
loadPath: "/locales/{{lng}}/{{ns}}.json",
|
|
3372
3383
|
addPath: "/locales/{{lng}}/{{ns}}.missing.json",
|
|
@@ -3374,7 +3385,7 @@ var s = () => !!(typeof window < "u" && window.document && window.document.creat
|
|
|
3374
3385
|
parse: JSON.parse,
|
|
3375
3386
|
stringify: JSON.stringify
|
|
3376
3387
|
};
|
|
3377
|
-
},
|
|
3388
|
+
}, f = function() {
|
|
3378
3389
|
function e(t) {
|
|
3379
3390
|
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
3380
3391
|
o(this, e), this.services = t, this.options = n, this.allOptions = r, this.type = "backend", this.init(t, n, r);
|
|
@@ -3384,7 +3395,7 @@ var s = () => !!(typeof window < "u" && window.document && window.document.creat
|
|
|
3384
3395
|
key: "init",
|
|
3385
3396
|
value: function(e) {
|
|
3386
3397
|
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
3387
|
-
this.services = e, this.options = (0, n.defaults)(t, this.options || {},
|
|
3398
|
+
this.services = e, this.options = (0, n.defaults)(t, this.options || {}, d()), this.allOptions = r, this.queuedWrites = {}, this.debouncedWrite = (0, n.debounce)(this.write, 250);
|
|
3388
3399
|
}
|
|
3389
3400
|
},
|
|
3390
3401
|
{
|
|
@@ -3533,26 +3544,28 @@ var s = () => !!(typeof window < "u" && window.document && window.document.creat
|
|
|
3533
3544
|
}
|
|
3534
3545
|
]);
|
|
3535
3546
|
}();
|
|
3536
|
-
|
|
3537
|
-
})))(), 1),
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3547
|
+
f.type = "backend", e.default = f, t.exports = e.default;
|
|
3548
|
+
})))(), 1), C = (e, t = c.existsSync) => {
|
|
3549
|
+
let n = l.join(e, "locales"), r = l.join(e, "..", "locales"), i = (e) => t(l.join(e, "en", `${o.server}.json`));
|
|
3550
|
+
return !i(n) && i(r) ? r : n;
|
|
3551
|
+
}, w = () => l.join(C(l.dirname(u(import.meta.url))), "{{lng}}", "{{ns}}.json"), T = (e) => typeof e == "function" && "type" in e && e.type === "backend", E = (e = S.default) => {
|
|
3552
|
+
if (!T(e)) throw Error("i18next-fs-backend/cjs did not export a backend class");
|
|
3553
|
+
return e;
|
|
3554
|
+
};
|
|
3555
|
+
function D(t) {
|
|
3556
|
+
return !s.isInitialized && f() ? s.use(E()).use(m()).init({
|
|
3557
|
+
...e,
|
|
3558
|
+
ns: [
|
|
3559
|
+
o.server,
|
|
3560
|
+
o.widget,
|
|
3561
|
+
o.target
|
|
3562
|
+
],
|
|
3563
|
+
defaultNS: o.server,
|
|
3564
|
+
fallbackNS: [o.widget, o.target],
|
|
3565
|
+
backend: { loadPath: w() }
|
|
3566
|
+
}, () => {
|
|
3567
|
+
t?.(s);
|
|
3568
|
+
}) : t?.(s), s;
|
|
3556
3569
|
}
|
|
3557
3570
|
//#endregion
|
|
3558
|
-
export {
|
|
3571
|
+
export { D as default, D as initializeI18n };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { t as e } from "./i18SharedOptions-B7wdtNwg.js";
|
|
2
|
+
import { d as t, i as n, n as r, o as i, r as a, t as o } from "./provider.cli.bundle.js";
|
|
3
|
+
//#region ../locale/dist/i18nFrontend.js
|
|
4
|
+
var s = o.widget, c = e.fallbackLng, l = 1e4, u = t(r), d = (e) => {
|
|
5
|
+
let t = import.meta.url;
|
|
6
|
+
return `${t.slice(0, t.lastIndexOf("/"))}/locales/${e}/${s}.json`;
|
|
7
|
+
}, f = () => n(a()) ?? c, p = async (e) => {
|
|
8
|
+
let n = new AbortController(), r = setTimeout(() => n.abort(), l);
|
|
9
|
+
try {
|
|
10
|
+
let r = await fetch(d(e), { signal: n.signal });
|
|
11
|
+
if (!r.ok) return {};
|
|
12
|
+
let i = await r.json();
|
|
13
|
+
return typeof i == "object" && i ? t(i) : {};
|
|
14
|
+
} catch {
|
|
15
|
+
return {};
|
|
16
|
+
} finally {
|
|
17
|
+
clearTimeout(r);
|
|
18
|
+
}
|
|
19
|
+
}, m = (e, t) => t ? e.replace(/\{\{(\w+)\}\}/g, (e, n) => n in t ? String(t[n]) : e) : e, h = (e) => {
|
|
20
|
+
let t = /* @__PURE__ */ new Map([[c, u]]), n = /* @__PURE__ */ new Map(), r = i(e) ?? f(), a = !1, o = (e) => {
|
|
21
|
+
for (let t of n.get(e) ?? []) t();
|
|
22
|
+
}, l = async (e) => {
|
|
23
|
+
t.has(e) || t.set(e, await p(e));
|
|
24
|
+
}, d = (e, n) => t.get(e)?.[n], h = l(r).then(() => {
|
|
25
|
+
a = !0, o("initialized"), o("loaded");
|
|
26
|
+
}), g = {
|
|
27
|
+
get language() {
|
|
28
|
+
return r;
|
|
29
|
+
},
|
|
30
|
+
get isInitialized() {
|
|
31
|
+
return a;
|
|
32
|
+
},
|
|
33
|
+
t: (e, t) => m(d(r, e) ?? d(c, e) ?? t?.defaultValue ?? e, t),
|
|
34
|
+
exists: (e) => d(r, e) !== void 0 || d(c, e) !== void 0,
|
|
35
|
+
hasLoadedNamespace: (e) => e === s && t.has(r),
|
|
36
|
+
changeLanguage: async (e) => {
|
|
37
|
+
let t = i(e) ?? c;
|
|
38
|
+
return t !== r && (r = t, await l(t), o("loaded"), o("languageChanged")), g;
|
|
39
|
+
},
|
|
40
|
+
on: (e, t) => {
|
|
41
|
+
let r = n.get(e) ?? /* @__PURE__ */ new Set();
|
|
42
|
+
r.add(t), n.set(e, r);
|
|
43
|
+
},
|
|
44
|
+
off: (e, t) => {
|
|
45
|
+
n.get(e)?.delete(t);
|
|
46
|
+
},
|
|
47
|
+
ready: async () => (await h, g)
|
|
48
|
+
};
|
|
49
|
+
return g;
|
|
50
|
+
}, g;
|
|
51
|
+
function _(e, t) {
|
|
52
|
+
if (g) e?.(g);
|
|
53
|
+
else {
|
|
54
|
+
let n = h(t);
|
|
55
|
+
g = n, n.ready().then(() => e?.(n));
|
|
56
|
+
}
|
|
57
|
+
return g;
|
|
58
|
+
}
|
|
59
|
+
//#endregion
|
|
60
|
+
export { _ as default, _ as initializeI18n };
|