@prosopo/cli 3.0.10 → 3.1.1
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/CHANGELOG.md +48 -0
- package/dist/RateLimiter.js +59 -57
- package/dist/argv.js +29 -25
- package/dist/bundle/{i18nBackend-DDiD0rVZ.js → i18nBackend-B5QB3n19.js} +48 -45
- package/dist/bundle/provider.cli.bundle.js +65234 -66227
- package/dist/cjs/cli.cjs +4 -13
- package/dist/cjs/index.cjs +0 -1
- package/dist/cjs/reloader.cjs +6 -16
- package/dist/cjs/start.cjs +0 -4
- package/dist/cli.js +35 -45
- package/dist/commands/index.js +12 -6
- package/dist/commands/providerSetDataset.js +39 -39
- package/dist/commands/siteKeyRegister.js +82 -79
- package/dist/commands/siteKeyRegisterApi.js +90 -81
- package/dist/commands/storeCaptchasExternally.js +23 -24
- package/dist/commands/validators.js +32 -27
- package/dist/commands/version.js +15 -13
- package/dist/files.js +31 -29
- package/dist/index.js +20 -7
- package/dist/process.env.js +38 -37
- package/dist/prosopo.config.js +85 -90
- package/dist/reloader.js +54 -54
- package/dist/start.js +118 -90
- package/package.json +22 -19
- package/vite.cjs.config.ts +4 -1
- package/vite.esm.config.ts +20 -0
- package/dist/RateLimiter.d.ts +0 -55
- package/dist/RateLimiter.d.ts.map +0 -1
- package/dist/RateLimiter.js.map +0 -1
- package/dist/argv.d.ts +0 -22
- package/dist/argv.d.ts.map +0 -1
- package/dist/argv.js.map +0 -1
- package/dist/cli.d.ts +0 -2
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/commands/index.d.ts +0 -6
- package/dist/commands/index.d.ts.map +0 -1
- package/dist/commands/index.js.map +0 -1
- package/dist/commands/providerSetDataset.d.ts +0 -17
- package/dist/commands/providerSetDataset.d.ts.map +0 -1
- package/dist/commands/providerSetDataset.js.map +0 -1
- package/dist/commands/siteKeyRegister.d.ts +0 -57
- package/dist/commands/siteKeyRegister.d.ts.map +0 -1
- package/dist/commands/siteKeyRegister.js.map +0 -1
- package/dist/commands/siteKeyRegisterApi.d.ts +0 -33
- package/dist/commands/siteKeyRegisterApi.d.ts.map +0 -1
- package/dist/commands/siteKeyRegisterApi.js.map +0 -1
- package/dist/commands/storeCaptchasExternally.d.ts +0 -13
- package/dist/commands/storeCaptchasExternally.d.ts.map +0 -1
- package/dist/commands/storeCaptchasExternally.js.map +0 -1
- package/dist/commands/validators.d.ts +0 -18
- package/dist/commands/validators.d.ts.map +0 -1
- package/dist/commands/validators.js.map +0 -1
- package/dist/commands/version.d.ts +0 -12
- package/dist/commands/version.d.ts.map +0 -1
- package/dist/commands/version.js.map +0 -1
- package/dist/files.d.ts +0 -4
- package/dist/files.d.ts.map +0 -1
- package/dist/files.js.map +0 -1
- package/dist/index.d.ts +0 -7
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/process.env.d.ts +0 -8
- package/dist/process.env.d.ts.map +0 -1
- package/dist/process.env.js.map +0 -1
- package/dist/prosopo.config.d.ts +0 -3
- package/dist/prosopo.config.d.ts.map +0 -1
- package/dist/prosopo.config.js.map +0 -1
- package/dist/reloader.d.ts +0 -22
- package/dist/reloader.d.ts.map +0 -1
- package/dist/reloader.js.map +0 -1
- package/dist/start.d.ts +0 -5
- package/dist/start.d.ts.map +0 -1
- package/dist/start.js.map +0 -1
- package/dist/tests/bundle/bundle.unit.test.d.ts +0 -2
- package/dist/tests/bundle/bundle.unit.test.d.ts.map +0 -1
- package/dist/tests/bundle/bundle.unit.test.js +0 -14
- package/dist/tests/bundle/bundle.unit.test.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,53 @@
|
|
|
1
1
|
# @prosopo/cli
|
|
2
2
|
|
|
3
|
+
## 3.1.1
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- 3573f0b: fix npm scripts bundle command
|
|
7
|
+
- 3573f0b: build using vite, typecheck using tsc
|
|
8
|
+
- 63519d7: Tests
|
|
9
|
+
- 3573f0b: standardise all vite based npm scripts for bundling
|
|
10
|
+
- 2d0dd8a: Integration tests for UAPs
|
|
11
|
+
- Updated dependencies [2f0c830]
|
|
12
|
+
- Updated dependencies [52dbf21]
|
|
13
|
+
- Updated dependencies [93d5e50]
|
|
14
|
+
- Updated dependencies [3573f0b]
|
|
15
|
+
- Updated dependencies [8a64429]
|
|
16
|
+
- Updated dependencies [3573f0b]
|
|
17
|
+
- Updated dependencies [efd8102]
|
|
18
|
+
- Updated dependencies [93d5e50]
|
|
19
|
+
- Updated dependencies [63519d7]
|
|
20
|
+
- Updated dependencies [f29fc7e]
|
|
21
|
+
- Updated dependencies [3573f0b]
|
|
22
|
+
- Updated dependencies [2d0dd8a]
|
|
23
|
+
- Updated dependencies [6d604ad]
|
|
24
|
+
- @prosopo/provider@3.2.1
|
|
25
|
+
- @prosopo/util@3.0.3
|
|
26
|
+
- @prosopo/util-crypto@13.5.2
|
|
27
|
+
- @prosopo/keyring@2.8.7
|
|
28
|
+
- @prosopo/locale@3.1.0
|
|
29
|
+
- @prosopo/types@3.0.4
|
|
30
|
+
- @prosopo/api-express-router@3.0.4
|
|
31
|
+
- @prosopo/user-access-policy@3.3.1
|
|
32
|
+
- @prosopo/common@3.1.0
|
|
33
|
+
- @prosopo/dotenv@3.0.5
|
|
34
|
+
- @prosopo/api@3.1.1
|
|
35
|
+
- @prosopo/env@3.1.1
|
|
36
|
+
- @prosopo/config@3.1.1
|
|
37
|
+
|
|
38
|
+
## 3.1.0
|
|
39
|
+
### Minor Changes
|
|
40
|
+
|
|
41
|
+
- b7c3258: Add tests for UAPs
|
|
42
|
+
|
|
43
|
+
### Patch Changes
|
|
44
|
+
|
|
45
|
+
- Updated dependencies [b7c3258]
|
|
46
|
+
- @prosopo/user-access-policy@3.3.0
|
|
47
|
+
- @prosopo/provider@3.2.0
|
|
48
|
+
- @prosopo/api@3.1.0
|
|
49
|
+
- @prosopo/env@3.1.0
|
|
50
|
+
|
|
3
51
|
## 3.0.10
|
|
4
52
|
### Patch Changes
|
|
5
53
|
|
package/dist/RateLimiter.js
CHANGED
|
@@ -1,58 +1,60 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
1
|
+
import { ClientApiPaths, AdminApiPaths, PublicApiPaths } from "@prosopo/types";
|
|
2
|
+
const getRateLimitConfig = () => {
|
|
3
|
+
return {
|
|
4
|
+
[ClientApiPaths.GetImageCaptchaChallenge]: {
|
|
5
|
+
windowMs: process.env.PROSOPO_GET_IMAGE_CAPTCHA_CHALLENGE_WINDOW,
|
|
6
|
+
limit: process.env.PROSOPO_GET_IMAGE_CAPTCHA_CHALLENGE_LIMIT
|
|
7
|
+
},
|
|
8
|
+
[ClientApiPaths.GetPowCaptchaChallenge]: {
|
|
9
|
+
windowMs: process.env.PROSOPO_GET_POW_CAPTCHA_CHALLENGE_WINDOW,
|
|
10
|
+
limit: process.env.PROSOPO_GET_POW_CAPTCHA_CHALLENGE_LIMIT
|
|
11
|
+
},
|
|
12
|
+
[ClientApiPaths.SubmitImageCaptchaSolution]: {
|
|
13
|
+
windowMs: process.env.PROSOPO_SUBMIT_IMAGE_CAPTCHA_SOLUTION_WINDOW,
|
|
14
|
+
limit: process.env.PROSOPO_SUBMIT_IMAGE_CAPTCHA_SOLUTION_LIMIT
|
|
15
|
+
},
|
|
16
|
+
[ClientApiPaths.SubmitPowCaptchaSolution]: {
|
|
17
|
+
windowMs: process.env.PROSOPO_SUBMIT_POW_CAPTCHA_SOLUTION_WINDOW,
|
|
18
|
+
limit: process.env.PROSOPO_SUBMIT_POW_CAPTCHA_SOLUTION_LIMIT
|
|
19
|
+
},
|
|
20
|
+
[ClientApiPaths.VerifyPowCaptchaSolution]: {
|
|
21
|
+
windowMs: process.env.PROSOPO_VERIFY_POW_CAPTCHA_SOLUTION_WINDOW,
|
|
22
|
+
limit: process.env.PROSOPO_VERIFY_POW_CAPTCHA_SOLUTION_LIMIT
|
|
23
|
+
},
|
|
24
|
+
[ClientApiPaths.VerifyImageCaptchaSolutionDapp]: {
|
|
25
|
+
windowMs: process.env.PROSOPO_VERIFY_IMAGE_CAPTCHA_SOLUTION_DAPP_WINDOW,
|
|
26
|
+
limit: process.env.PROSOPO_VERIFY_IMAGE_CAPTCHA_SOLUTION_DAPP_LIMIT
|
|
27
|
+
},
|
|
28
|
+
[ClientApiPaths.GetProviderStatus]: {
|
|
29
|
+
windowMs: process.env.PROSOPO_GET_PROVIDER_STATUS_WINDOW,
|
|
30
|
+
limit: process.env.PROSOPO_GET_PROVIDER_STATUS_LIMIT
|
|
31
|
+
},
|
|
32
|
+
[PublicApiPaths.GetProviderDetails]: {
|
|
33
|
+
windowMs: process.env.PROSOPO_GET_PROVIDER_DETAILS_WINDOW,
|
|
34
|
+
limit: process.env.PROSOPO_GET_PROVIDER_DETAILS_LIMIT
|
|
35
|
+
},
|
|
36
|
+
[ClientApiPaths.SubmitUserEvents]: {
|
|
37
|
+
windowMs: process.env.PROSOPO_SUBMIT_USER_EVENTS_WINDOW,
|
|
38
|
+
limit: process.env.PROSOPO_SUBMIT_USER_EVENTS_LIMIT
|
|
39
|
+
},
|
|
40
|
+
[AdminApiPaths.SiteKeyRegister]: {
|
|
41
|
+
windowMs: process.env.PROSOPO_SITE_KEY_REGISTER_WINDOW,
|
|
42
|
+
limit: process.env.PROSOPO_SITE_KEY_REGISTER_LIMIT
|
|
43
|
+
},
|
|
44
|
+
[AdminApiPaths.UpdateDetectorKey]: {
|
|
45
|
+
windowMs: process.env.PROSOPO_UPDATE_DETECTOR_KEY_WINDOW,
|
|
46
|
+
limit: process.env.PROSOPO_UPDATE_DETECTOR_KEY_LIMIT
|
|
47
|
+
},
|
|
48
|
+
[AdminApiPaths.RemoveDetectorKey]: {
|
|
49
|
+
windowMs: process.env.PROSOPO_REMOVE_DETECTOR_KEY_WINDOW,
|
|
50
|
+
limit: process.env.PROSOPO_REMOVE_DETECTOR_KEY_LIMIT
|
|
51
|
+
},
|
|
52
|
+
[ClientApiPaths.GetFrictionlessCaptchaChallenge]: {
|
|
53
|
+
windowMs: process.env.PROSOPO_GET_FR_CAPTCHA_CHALLENGE_WINDOW,
|
|
54
|
+
limit: process.env.PROSOPO_GET_FR_CAPTCHA_CHALLENGE_LIMIT
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
export {
|
|
59
|
+
getRateLimitConfig
|
|
57
60
|
};
|
|
58
|
-
//# sourceMappingURL=RateLimiter.js.map
|
package/dist/argv.js
CHANGED
|
@@ -1,30 +1,34 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getLogger, LogLevel } from "@prosopo/common";
|
|
2
2
|
import yargs from "yargs";
|
|
3
3
|
import { hideBin } from "yargs/helpers";
|
|
4
|
-
import
|
|
4
|
+
import "./commands/index.js";
|
|
5
|
+
import commandProviderSetDataset from "./commands/providerSetDataset.js";
|
|
6
|
+
import commandStoreCaptchasExternally from "./commands/storeCaptchasExternally.js";
|
|
7
|
+
import commandSiteKeyRegister from "./commands/siteKeyRegister.js";
|
|
8
|
+
import commandSiteKeyRegisterApi from "./commands/siteKeyRegisterApi.js";
|
|
9
|
+
import commandVersion from "./commands/version.js";
|
|
5
10
|
function getCommands(pair, config, authAccount, logger) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
return [
|
|
12
|
+
commandProviderSetDataset(pair, config, { logger }),
|
|
13
|
+
commandStoreCaptchasExternally(pair, config, { logger }),
|
|
14
|
+
commandSiteKeyRegister(pair, config, { logger }),
|
|
15
|
+
commandSiteKeyRegisterApi(pair, authAccount, config, { logger }),
|
|
16
|
+
commandVersion(pair, config, { logger })
|
|
17
|
+
];
|
|
13
18
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
commandManager.command(command);
|
|
27
|
-
}
|
|
28
|
-
return commandManager.parse();
|
|
19
|
+
function processArgs(args, pair, authAccount, config) {
|
|
20
|
+
const logger = getLogger(LogLevel.enum.info, "CLI");
|
|
21
|
+
const commandManager = yargs(hideBin(args)).usage("Usage: $0 [global options] <command> [options]").option("api", { demand: false, default: false, type: "boolean" }).option("adminApi", {
|
|
22
|
+
demand: false,
|
|
23
|
+
default: false,
|
|
24
|
+
type: "boolean"
|
|
25
|
+
});
|
|
26
|
+
const commands = getCommands(pair, config, authAccount, logger);
|
|
27
|
+
for (const command of commands) {
|
|
28
|
+
commandManager.command(command);
|
|
29
|
+
}
|
|
30
|
+
return commandManager.parse();
|
|
29
31
|
}
|
|
30
|
-
|
|
32
|
+
export {
|
|
33
|
+
processArgs
|
|
34
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Su from "node:path";
|
|
2
2
|
import { L as Ou, a as ku, g as Lu, b as Nu } from "./provider.cli.bundle.js";
|
|
3
3
|
import Xr from "node:fs";
|
|
4
|
-
const Tu = () => !!(typeof window < "u" && window.document && window.document.createElement), Iu = () => !Tu(), le = (m) => typeof m == "string",
|
|
4
|
+
const Tu = () => !!(typeof window < "u" && window.document && window.document.createElement), Iu = () => !Tu(), le = (m) => typeof m == "string", An = () => {
|
|
5
5
|
let m, n;
|
|
6
6
|
const t = new Promise((a, l) => {
|
|
7
7
|
m = a, n = l;
|
|
@@ -1166,7 +1166,7 @@ class vn extends jn {
|
|
|
1166
1166
|
return n.store[b](...arguments), n;
|
|
1167
1167
|
};
|
|
1168
1168
|
});
|
|
1169
|
-
const y =
|
|
1169
|
+
const y = An(), C = () => {
|
|
1170
1170
|
const b = (R, E) => {
|
|
1171
1171
|
this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), y.resolve(E), a(R, E);
|
|
1172
1172
|
};
|
|
@@ -1193,7 +1193,7 @@ class vn extends jn {
|
|
|
1193
1193
|
a(null);
|
|
1194
1194
|
}
|
|
1195
1195
|
reloadResources(n, t, a) {
|
|
1196
|
-
const l =
|
|
1196
|
+
const l = An();
|
|
1197
1197
|
return typeof n == "function" && (a = n, n = void 0), typeof t == "function" && (a = t, t = void 0), n || (n = this.languages), t || (t = this.options.ns), a || (a = wn), this.services.backendConnector.reload(n, t, (c) => {
|
|
1198
1198
|
l.resolve(), a(c);
|
|
1199
1199
|
}), l;
|
|
@@ -1216,7 +1216,7 @@ class vn extends jn {
|
|
|
1216
1216
|
changeLanguage(n, t) {
|
|
1217
1217
|
var a = this;
|
|
1218
1218
|
this.isLanguageChangingTo = n;
|
|
1219
|
-
const l =
|
|
1219
|
+
const l = An();
|
|
1220
1220
|
this.emit("languageChanging", n);
|
|
1221
1221
|
const c = (y) => {
|
|
1222
1222
|
this.language = y, this.languages = this.services.languageUtils.toResolveHierarchy(y), this.resolvedLanguage = void 0, this.setResolvedLanguage(y);
|
|
@@ -1286,7 +1286,7 @@ class vn extends jn {
|
|
|
1286
1286
|
return !!(this.hasResourceBundle(a, n) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || d(a, n) && (!l || d(c, n)));
|
|
1287
1287
|
}
|
|
1288
1288
|
loadNamespaces(n, t) {
|
|
1289
|
-
const a =
|
|
1289
|
+
const a = An();
|
|
1290
1290
|
return this.options.ns ? (le(n) && (n = [n]), n.forEach((l) => {
|
|
1291
1291
|
this.options.ns.indexOf(l) < 0 && this.options.ns.push(l);
|
|
1292
1292
|
}), this.loadResources((l) => {
|
|
@@ -1294,7 +1294,7 @@ class vn extends jn {
|
|
|
1294
1294
|
}), a) : (t && t(), Promise.resolve());
|
|
1295
1295
|
}
|
|
1296
1296
|
loadLanguages(n, t) {
|
|
1297
|
-
const a =
|
|
1297
|
+
const a = An();
|
|
1298
1298
|
le(n) && (n = [n]);
|
|
1299
1299
|
const l = this.options.preload || [], c = n.filter((d) => l.indexOf(d) < 0 && this.services.languageUtils.isSupportedCode(d));
|
|
1300
1300
|
return c.length ? (this.options.preload = l.concat(c), this.loadResources((d) => {
|
|
@@ -1351,8 +1351,8 @@ class vn extends jn {
|
|
|
1351
1351
|
};
|
|
1352
1352
|
}
|
|
1353
1353
|
}
|
|
1354
|
-
const
|
|
1355
|
-
|
|
1354
|
+
const cn = vn.createInstance();
|
|
1355
|
+
cn.createInstance = vn.createInstance;
|
|
1356
1356
|
const Xu = {
|
|
1357
1357
|
debug: process.env.PROSOPO_LOG_LEVEL === "debug",
|
|
1358
1358
|
fallbackLng: Ou.enum.en,
|
|
@@ -1867,7 +1867,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1867
1867
|
throw Ae(A());
|
|
1868
1868
|
case "\u2028":
|
|
1869
1869
|
case "\u2029":
|
|
1870
|
-
|
|
1870
|
+
pn(G);
|
|
1871
1871
|
break;
|
|
1872
1872
|
case void 0:
|
|
1873
1873
|
throw Ae(A());
|
|
@@ -2137,7 +2137,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2137
2137
|
function en() {
|
|
2138
2138
|
return I -= 5, Ge("JSON5: invalid identifier character at ".concat(T, ":").concat(I));
|
|
2139
2139
|
}
|
|
2140
|
-
function
|
|
2140
|
+
function pn(i) {
|
|
2141
2141
|
console.warn("JSON5: '".concat(rn(i), "' in strings is not valid ECMAScript; consider escaping"));
|
|
2142
2142
|
}
|
|
2143
2143
|
function rn(i) {
|
|
@@ -2266,8 +2266,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2266
2266
|
_ !== "" && (ne += " "), ne += Oe, ve.push(ne);
|
|
2267
2267
|
}
|
|
2268
2268
|
}
|
|
2269
|
-
} catch (
|
|
2270
|
-
he.e(
|
|
2269
|
+
} catch (hn) {
|
|
2270
|
+
he.e(hn);
|
|
2271
2271
|
} finally {
|
|
2272
2272
|
he.f();
|
|
2273
2273
|
}
|
|
@@ -2336,7 +2336,7 @@ function ni() {
|
|
|
2336
2336
|
if (Jr) return de;
|
|
2337
2337
|
Jr = 1, Object.defineProperty(de, "__esModule", {
|
|
2338
2338
|
value: !0
|
|
2339
|
-
}), de.SyntaxKind = de.ScanError = de.ParseErrorCode = void 0, de.applyEdits = Ge, de.findNodeAtOffset = de.findNodeAtLocation = de.createScanner = void 0, de.format =
|
|
2339
|
+
}), de.SyntaxKind = de.ScanError = de.ParseErrorCode = void 0, de.applyEdits = Ge, de.findNodeAtOffset = de.findNodeAtLocation = de.createScanner = void 0, de.format = pn, de.getNodeValue = de.getNodePath = de.getLocation = void 0, de.modify = rn, de.parseTree = de.parse = void 0, de.printParseErrorCode = en, de.visit = de.stripComments = void 0;
|
|
2340
2340
|
function m(u, x) {
|
|
2341
2341
|
var D = Object.keys(u);
|
|
2342
2342
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -3347,8 +3347,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3347
3347
|
else {
|
|
3348
3348
|
if (D === void 0)
|
|
3349
3349
|
return [];
|
|
3350
|
-
var Re = "".concat(JSON.stringify(L), ": ").concat(JSON.stringify(D)), Fe = i.getInsertionIndex ? i.getInsertionIndex(j.children.map(function(
|
|
3351
|
-
return
|
|
3350
|
+
var Re = "".concat(JSON.stringify(L), ": ").concat(JSON.stringify(D)), Fe = i.getInsertionIndex ? i.getInsertionIndex(j.children.map(function(hn) {
|
|
3351
|
+
return hn.children[0].value;
|
|
3352
3352
|
})) : j.children.length, Le;
|
|
3353
3353
|
if (Fe > 0) {
|
|
3354
3354
|
var xe = j.children[Fe - 1];
|
|
@@ -3526,7 +3526,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3526
3526
|
}
|
|
3527
3527
|
return "<unknown ParseErrorCode>";
|
|
3528
3528
|
}
|
|
3529
|
-
function
|
|
3529
|
+
function pn(u, x, D) {
|
|
3530
3530
|
return ee(u, x, D);
|
|
3531
3531
|
}
|
|
3532
3532
|
function rn(u, x, D, i) {
|
|
@@ -3794,7 +3794,7 @@ function tt() {
|
|
|
3794
3794
|
},
|
|
3795
3795
|
defaultStyle: "lowercase"
|
|
3796
3796
|
});
|
|
3797
|
-
function
|
|
3797
|
+
function pn(e) {
|
|
3798
3798
|
return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
|
|
3799
3799
|
}
|
|
3800
3800
|
function rn(e) {
|
|
@@ -3820,7 +3820,7 @@ function tt() {
|
|
|
3820
3820
|
if (s === "x") {
|
|
3821
3821
|
for (o++; o < r; o++)
|
|
3822
3822
|
if (s = e[o], s !== "_") {
|
|
3823
|
-
if (!
|
|
3823
|
+
if (!pn(e.charCodeAt(o))) return !1;
|
|
3824
3824
|
f = !0;
|
|
3825
3825
|
}
|
|
3826
3826
|
return f && s !== "_";
|
|
@@ -4034,7 +4034,7 @@ function tt() {
|
|
|
4034
4034
|
}
|
|
4035
4035
|
return !0;
|
|
4036
4036
|
}
|
|
4037
|
-
function
|
|
4037
|
+
function hn(e) {
|
|
4038
4038
|
if (e === null) return [];
|
|
4039
4039
|
var r, o, f, s, g, p = e;
|
|
4040
4040
|
for (g = new Array(p.length), r = 0, o = p.length; r < o; r += 1)
|
|
@@ -4044,7 +4044,7 @@ function tt() {
|
|
|
4044
4044
|
var Gn = new J("tag:yaml.org,2002:pairs", {
|
|
4045
4045
|
kind: "sequence",
|
|
4046
4046
|
resolve: Ue,
|
|
4047
|
-
construct:
|
|
4047
|
+
construct: hn
|
|
4048
4048
|
}), it = Object.prototype.hasOwnProperty;
|
|
4049
4049
|
function at(e) {
|
|
4050
4050
|
if (e === null) return !0;
|
|
@@ -4487,7 +4487,7 @@ function tt() {
|
|
|
4487
4487
|
var Ot = wt, kt = St, pr = {
|
|
4488
4488
|
loadAll: Ot,
|
|
4489
4489
|
load: kt
|
|
4490
|
-
}, hr = Object.prototype.toString, dr = Object.prototype.hasOwnProperty, Un = 65279, Lt = 9,
|
|
4490
|
+
}, hr = Object.prototype.toString, dr = Object.prototype.hasOwnProperty, Un = 65279, Lt = 9, dn = 10, Nt = 13, Tt = 32, It = 33, Pt = 34, Hn = 35, Rt = 37, jt = 38, _t = 39, Mt = 42, gr = 44, $t = 45, xn = 58, Vt = 61, Ut = 62, Ht = 63, Yt = 64, Dr = 91, mr = 93, Kt = 96, Ar = 123, qt = 124, Fr = 125, $e = {};
|
|
4491
4491
|
$e[0] = "\\0", $e[7] = "\\a", $e[8] = "\\b", $e[9] = "\\t", $e[10] = "\\n", $e[11] = "\\v", $e[12] = "\\f", $e[13] = "\\r", $e[27] = "\\e", $e[34] = '\\"', $e[92] = "\\\\", $e[133] = "\\N", $e[160] = "\\_", $e[8232] = "\\L", $e[8233] = "\\P";
|
|
4492
4492
|
var Jt = ["y", "Y", "yes", "Yes", "YES", "on", "On", "ON", "n", "N", "no", "No", "NO", "off", "Off", "OFF"], Wt = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
4493
4493
|
function zt(e, r) {
|
|
@@ -4509,9 +4509,9 @@ function tt() {
|
|
|
4509
4509
|
throw new I("code point within a string may not be greater than 0xFFFFFFFF");
|
|
4510
4510
|
return "\\" + o + w.repeat("0", f - r.length) + r;
|
|
4511
4511
|
}
|
|
4512
|
-
var Qt = 1,
|
|
4512
|
+
var Qt = 1, gn = 2;
|
|
4513
4513
|
function Zt(e) {
|
|
4514
|
-
this.schema = e.schema || _n, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = w.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = zt(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === '"' ?
|
|
4514
|
+
this.schema = e.schema || _n, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = w.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = zt(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === '"' ? gn : Qt, this.forceQuotes = e.forceQuotes || !1, this.replacer = typeof e.replacer == "function" ? e.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null;
|
|
4515
4515
|
}
|
|
4516
4516
|
function vr(e, r) {
|
|
4517
4517
|
for (var o = w.repeat(" ", r), f = 0, s = -1, g = "", p, F = e.length; f < F; )
|
|
@@ -4534,23 +4534,23 @@ function tt() {
|
|
|
4534
4534
|
function Bn(e) {
|
|
4535
4535
|
return e === Tt || e === Lt;
|
|
4536
4536
|
}
|
|
4537
|
-
function
|
|
4537
|
+
function Dn(e) {
|
|
4538
4538
|
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== Un || 65536 <= e && e <= 1114111;
|
|
4539
4539
|
}
|
|
4540
4540
|
function Er(e) {
|
|
4541
|
-
return
|
|
4541
|
+
return Dn(e) && e !== Un && e !== Nt && e !== dn;
|
|
4542
4542
|
}
|
|
4543
4543
|
function yr(e, r, o) {
|
|
4544
4544
|
var f = Er(e), s = f && !Bn(e);
|
|
4545
4545
|
return (o ? f : f && e !== gr && e !== Dr && e !== mr && e !== Ar && e !== Fr) && e !== Hn && !(r === xn && !s) || Er(r) && !Bn(r) && e === Hn || r === xn && s;
|
|
4546
4546
|
}
|
|
4547
4547
|
function eu(e) {
|
|
4548
|
-
return
|
|
4548
|
+
return Dn(e) && e !== Un && !Bn(e) && e !== $t && e !== Ht && e !== xn && e !== gr && e !== Dr && e !== mr && e !== Ar && e !== Fr && e !== Hn && e !== jt && e !== Mt && e !== It && e !== qt && e !== Vt && e !== Ut && e !== _t && e !== Pt && e !== Rt && e !== Yt && e !== Kt;
|
|
4549
4549
|
}
|
|
4550
4550
|
function nu(e) {
|
|
4551
4551
|
return !Bn(e) && e !== xn;
|
|
4552
4552
|
}
|
|
4553
|
-
function
|
|
4553
|
+
function mn(e, r) {
|
|
4554
4554
|
var o = e.charCodeAt(r), f;
|
|
4555
4555
|
return o >= 55296 && o <= 56319 && r + 1 < e.length && (f = e.charCodeAt(r + 1), f >= 56320 && f <= 57343) ? (o - 55296) * 1024 + f - 56320 + 65536 : o;
|
|
4556
4556
|
}
|
|
@@ -4560,31 +4560,31 @@ function tt() {
|
|
|
4560
4560
|
}
|
|
4561
4561
|
var br = 1, Kn = 2, xr = 3, Br = 4, sn = 5;
|
|
4562
4562
|
function ru(e, r, o, f, s, g, p, F) {
|
|
4563
|
-
var S, V = 0, Z = null, U = !1, ue = !1, ie = f !== -1, me = -1, we = eu(
|
|
4563
|
+
var S, V = 0, Z = null, U = !1, ue = !1, ie = f !== -1, me = -1, we = eu(mn(e, 0)) && nu(mn(e, e.length - 1));
|
|
4564
4564
|
if (r || p)
|
|
4565
4565
|
for (S = 0; S < e.length; V >= 65536 ? S += 2 : S++) {
|
|
4566
|
-
if (V =
|
|
4566
|
+
if (V = mn(e, S), !Dn(V))
|
|
4567
4567
|
return sn;
|
|
4568
4568
|
we = we && yr(V, Z, F), Z = V;
|
|
4569
4569
|
}
|
|
4570
4570
|
else {
|
|
4571
4571
|
for (S = 0; S < e.length; V >= 65536 ? S += 2 : S++) {
|
|
4572
|
-
if (V =
|
|
4572
|
+
if (V = mn(e, S), V === dn)
|
|
4573
4573
|
U = !0, ie && (ue = ue || S - me - 1 > f && e[me + 1] !== " ", me = S);
|
|
4574
|
-
else if (!
|
|
4574
|
+
else if (!Dn(V))
|
|
4575
4575
|
return sn;
|
|
4576
4576
|
we = we && yr(V, Z, F), Z = V;
|
|
4577
4577
|
}
|
|
4578
4578
|
ue = ue || ie && S - me - 1 > f && e[me + 1] !== " ";
|
|
4579
4579
|
}
|
|
4580
|
-
return !U && !ue ? we && !p && !s(e) ? br : g ===
|
|
4580
|
+
return !U && !ue ? we && !p && !s(e) ? br : g === gn ? sn : Kn : o > 9 && Cr(e) ? sn : p ? g === gn ? sn : Kn : ue ? Br : xr;
|
|
4581
4581
|
}
|
|
4582
4582
|
function tu(e, r, o, f, s) {
|
|
4583
4583
|
e.dump = function() {
|
|
4584
4584
|
if (r.length === 0)
|
|
4585
|
-
return e.quotingType ===
|
|
4585
|
+
return e.quotingType === gn ? '""' : "''";
|
|
4586
4586
|
if (!e.noCompatMode && (Jt.indexOf(r) !== -1 || Wt.test(r)))
|
|
4587
|
-
return e.quotingType ===
|
|
4587
|
+
return e.quotingType === gn ? '"' + r + '"' : "'" + r + "'";
|
|
4588
4588
|
var g = e.indent * Math.max(1, o), p = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - g), F = f || e.flowLevel > -1 && o >= e.flowLevel;
|
|
4589
4589
|
function S(V) {
|
|
4590
4590
|
return Xt(e, V);
|
|
@@ -4641,7 +4641,7 @@ function tt() {
|
|
|
4641
4641
|
}
|
|
4642
4642
|
function iu(e) {
|
|
4643
4643
|
for (var r = "", o = 0, f, s = 0; s < e.length; o >= 65536 ? s += 2 : s++)
|
|
4644
|
-
o =
|
|
4644
|
+
o = mn(e, s), f = $e[o], !f && Dn(o) ? (r += e[s], o >= 65536 && (r += e[s + 1])) : r += f || Gt(o);
|
|
4645
4645
|
return r;
|
|
4646
4646
|
}
|
|
4647
4647
|
function au(e, r, o) {
|
|
@@ -4653,7 +4653,7 @@ function tt() {
|
|
|
4653
4653
|
function kr(e, r, o, f) {
|
|
4654
4654
|
var s = "", g = e.tag, p, F, S;
|
|
4655
4655
|
for (p = 0, F = o.length; p < F; p += 1)
|
|
4656
|
-
S = o[p], e.replacer && (S = e.replacer.call(o, String(p), S)), (ze(e, r + 1, S, !0, !0, !1, !0) || typeof S > "u" && ze(e, r + 1, null, !0, !0, !1, !0)) && ((!f || s !== "") && (s += Yn(e, r)), e.dump &&
|
|
4656
|
+
S = o[p], e.replacer && (S = e.replacer.call(o, String(p), S)), (ze(e, r + 1, S, !0, !0, !1, !0) || typeof S > "u" && ze(e, r + 1, null, !0, !0, !1, !0)) && ((!f || s !== "") && (s += Yn(e, r)), e.dump && dn === e.dump.charCodeAt(0) ? s += "-" : s += "- ", s += e.dump);
|
|
4657
4657
|
e.tag = g, e.dump = s || "[]";
|
|
4658
4658
|
}
|
|
4659
4659
|
function ou(e, r, o) {
|
|
@@ -4671,7 +4671,7 @@ function tt() {
|
|
|
4671
4671
|
else if (e.sortKeys)
|
|
4672
4672
|
throw new I("sortKeys must be a boolean or a function");
|
|
4673
4673
|
for (F = 0, S = p.length; F < S; F += 1)
|
|
4674
|
-
ue = "", (!f || s !== "") && (ue += Yn(e, r)), V = p[F], Z = o[V], e.replacer && (Z = e.replacer.call(o, V, Z)), ze(e, r + 1, V, !0, !0, !0) && (U = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, U && (e.dump &&
|
|
4674
|
+
ue = "", (!f || s !== "") && (ue += Yn(e, r)), V = p[F], Z = o[V], e.replacer && (Z = e.replacer.call(o, V, Z)), ze(e, r + 1, V, !0, !0, !0) && (U = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, U && (e.dump && dn === e.dump.charCodeAt(0) ? ue += "?" : ue += "? "), ue += e.dump, U && (ue += Yn(e, r)), ze(e, r + 1, Z, !0, U) && (e.dump && dn === e.dump.charCodeAt(0) ? ue += ":" : ue += ": ", ue += e.dump, s += ue));
|
|
4675
4675
|
e.tag = g, e.dump = s || "{}";
|
|
4676
4676
|
}
|
|
4677
4677
|
function Lr(e, r, o) {
|
|
@@ -5233,23 +5233,26 @@ function ui() {
|
|
|
5233
5233
|
}(Sn, Sn.exports)), Sn.exports;
|
|
5234
5234
|
}
|
|
5235
5235
|
var ii = /* @__PURE__ */ ui();
|
|
5236
|
-
const ai = /* @__PURE__ */ Lu(ii), oi = `${Su.dirname(import.meta.url)}/locales/{{lng}}/{{ns}}.json`.replace(
|
|
5237
|
-
|
|
5238
|
-
|
|
5239
|
-
|
|
5236
|
+
const ai = /* @__PURE__ */ Lu(ii), oi = `${Su.dirname(import.meta.url)}/locales/{{lng}}/{{ns}}.json`.replace(
|
|
5237
|
+
"file://",
|
|
5238
|
+
""
|
|
5239
|
+
);
|
|
5240
|
+
function ci(m) {
|
|
5241
|
+
if (!cn.isInitialized && Iu()) {
|
|
5242
|
+
const n = new Nu(null, {
|
|
5240
5243
|
order: ["header", "query", "cookie"]
|
|
5241
5244
|
});
|
|
5242
|
-
|
|
5245
|
+
cn.use(ai).use(n).init({
|
|
5243
5246
|
...Xu,
|
|
5244
5247
|
ns: ["translation"],
|
|
5245
5248
|
backend: {
|
|
5246
5249
|
loadPath: oi
|
|
5247
5250
|
}
|
|
5248
|
-
}),
|
|
5249
|
-
|
|
5251
|
+
}), cn.on("loaded", () => {
|
|
5252
|
+
m?.(cn);
|
|
5250
5253
|
});
|
|
5251
5254
|
}
|
|
5252
|
-
return
|
|
5255
|
+
return cn;
|
|
5253
5256
|
}
|
|
5254
5257
|
export {
|
|
5255
5258
|
ci as default,
|