@prosopo/procaptcha-bundle 2.4.1 → 2.4.2
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/dist/bundle/{ProcaptchaWidget-DOETad4N.js → ProcaptchaWidget-CWr3QJxQ.js} +33 -31
- package/dist/bundle/{ProcaptchaWidget-79FRw4Va.js → ProcaptchaWidget-DNDHo0wy.js} +153 -149
- package/dist/bundle/{asU8a-2GgUBNjQ.js → asU8a-CzXEWKM2.js} +1 -1
- package/dist/bundle/{bip39-C01p7UHO.js → bip39-BY0qXKlh.js} +7 -7
- package/dist/bundle/browser-ponyfill-QubLHHEB.js +339 -0
- package/dist/bundle/{hash-0yoKUuST.js → hash-BtiXKZG7.js} +7 -7
- package/dist/bundle/index-5BQn0RdY.js +11576 -0
- package/dist/bundle/{index-Ckreqz7Q.js → index-CUmhpcqe.js} +3 -3
- package/dist/bundle/{index-DlBTo0Xd.js → index-n-2hvBzo.js} +405 -405
- package/dist/bundle/index-vKa71Rut.js +4372 -0
- package/dist/bundle/locales/de/translation.json +405 -0
- package/dist/bundle/locales/en/translation.json +405 -0
- package/dist/bundle/locales/es/translation.json +405 -0
- package/dist/bundle/locales/fr/translation.json +405 -0
- package/dist/bundle/locales/it/translation.json +405 -0
- package/dist/bundle/locales/pt/translation.json +405 -0
- package/dist/bundle/locales/pt-BR/translation.json +405 -0
- package/dist/bundle/procaptcha.bundle.js +1 -1
- package/dist/bundle/useTranslation-2VGhZyNk.js +2435 -0
- package/package.json +10 -10
- package/stats.html +1 -1
- package/vite.cjs.config.ts +1 -1
- package/vite.config.ts +32 -1
- package/vite.test.config.ts +1 -1
- package/webpack.config.cjs +1 -1
- package/dist/bundle/index-C8sSamyh.js +0 -6521
- package/dist/bundle/index-DOFIggts.js +0 -17295
- package/dist/bundle/useTranslation-CgamIJ5S.js +0 -550
package/vite.cjs.config.ts
CHANGED
package/vite.config.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright 2021-
|
|
1
|
+
// Copyright 2021-2025 Prosopo (UK) Ltd.
|
|
2
2
|
//
|
|
3
3
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
// you may not use this file except in compliance with the License.
|
|
@@ -16,6 +16,7 @@ import * as fs from "node:fs";
|
|
|
16
16
|
import * as path from "node:path";
|
|
17
17
|
import { ViteFrontendConfig } from "@prosopo/config";
|
|
18
18
|
import { loadEnv } from "@prosopo/dotenv";
|
|
19
|
+
import fg from "fast-glob";
|
|
19
20
|
import { defineConfig } from "vite";
|
|
20
21
|
|
|
21
22
|
// load env using our util because vite loadEnv is not working for .env.development
|
|
@@ -46,6 +47,18 @@ for (const packageName of packages) {
|
|
|
46
47
|
// Add the tsconfig for each package to tsConfigPaths
|
|
47
48
|
tsConfigPaths.push(path.resolve(`../${packageName}/tsconfig.json`));
|
|
48
49
|
}
|
|
50
|
+
|
|
51
|
+
const copyDir = {
|
|
52
|
+
srcDir: `${workspaceRoot}/packages/locale/src/locales`,
|
|
53
|
+
destDir: `${workspaceRoot}/packages/procaptcha-bundle/dist/bundle/locales`,
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const localFiles = await fg.glob(
|
|
57
|
+
`${workspaceRoot}/packages/locale/src/locales/**/*.json`,
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
console.log(localFiles);
|
|
61
|
+
|
|
49
62
|
// Merge with generic frontend config
|
|
50
63
|
export default defineConfig(async ({ command, mode }) => {
|
|
51
64
|
const frontendConfig = await ViteFrontendConfig(
|
|
@@ -59,7 +72,25 @@ export default defineConfig(async ({ command, mode }) => {
|
|
|
59
72
|
tsConfigPaths,
|
|
60
73
|
workspaceRoot,
|
|
61
74
|
);
|
|
75
|
+
|
|
62
76
|
return {
|
|
63
77
|
...frontendConfig,
|
|
78
|
+
plugins: [
|
|
79
|
+
{
|
|
80
|
+
name: "copy-dir",
|
|
81
|
+
async writeBundle() {
|
|
82
|
+
if (copyDir) {
|
|
83
|
+
const containingFolder = path.dirname(copyDir.destDir);
|
|
84
|
+
if (!fs.existsSync(containingFolder)) {
|
|
85
|
+
fs.mkdirSync(containingFolder, { recursive: true });
|
|
86
|
+
}
|
|
87
|
+
fs.cpSync(copyDir.srcDir, copyDir.destDir, {
|
|
88
|
+
recursive: true,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
...(frontendConfig.plugins ? frontendConfig.plugins : []),
|
|
94
|
+
],
|
|
64
95
|
};
|
|
65
96
|
});
|
package/vite.test.config.ts
CHANGED
package/webpack.config.cjs
CHANGED