Compare commits

...

198 Commits

Author SHA1 Message Date
Aravinth Manivannan
b624c7d326 fix: s/docker-compose/docker compose/ 2025-10-02 14:33:54 +05:30
Aravinth Manivannan
60a6ad92d9 fix: port eslint config 2025-10-02 14:19:22 +05:30
Aravinth Manivannan
3c0ed48aac fix: gh CI: update node 2025-10-02 14:04:15 +05:30
Aravinth Manivannan
a05f8ec6f0 fix: remove tarpaulin annotations 2025-10-02 14:00:16 +05:30
Aravinth Manivannan
5c29c2e71e fix: restore gh actions 2025-10-02 13:51:12 +05:30
Aravinth Manivannan
721d880a7a Merge pull request 'chore(deps): update rust crate thiserror to v2.0.17' (#107) from renovate/thiserror-2.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/107
2025-10-02 13:45:14 +05:30
Aravinth Manivannan
4ad2fe36cc Merge pull request 'chore(deps): update jest monorepo to v30 (major)' (#105) from renovate/major-jest-monorepo into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/105
2025-10-02 13:45:06 +05:30
Renovate Bot
140889ff6d chore(deps): update jest monorepo to v30 2025-10-02 08:12:29 +00:00
Renovate Bot
324d13f0d4 chore(deps): update rust crate thiserror to v2.0.17 2025-10-02 08:12:10 +00:00
Aravinth Manivannan
840f14868a Merge pull request 'chore(deps): update dependency webpack-dev-server to v5' (#47) from renovate/webpack-dev-server-5.x into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/47
2025-10-02 13:33:36 +05:30
Aravinth Manivannan
5c476090d1 Merge pull request 'chore(deps): update dependency sinon to v21' (#104) from renovate/sinon-21.x into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/104
2025-10-02 13:33:09 +05:30
Aravinth Manivannan
f1661d0f7f Merge pull request 'chore(deps): update dependency jsdom to v27' (#103) from renovate/jsdom-27.x into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/103
2025-10-02 13:31:54 +05:30
Aravinth Manivannan
6eda1e8a34 Merge pull request 'chore(deps): update dependency css-minimizer-webpack-plugin to v7' (#41) from renovate/css-minimizer-webpack-plugin-7.x into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/41
2025-10-02 13:31:37 +05:30
Aravinth Manivannan
848c3f80bf Merge pull request 'chore(deps): update rust crate uuid to v1.18.1' (#80) from renovate/uuid-1.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/80
2025-10-02 13:31:01 +05:30
Renovate Bot
a66f27c084 chore(deps): update dependency webpack-dev-server to v5 2025-10-02 07:58:22 +00:00
Renovate Bot
c886989c25 chore(deps): update dependency sinon to v21 2025-10-02 07:58:15 +00:00
Renovate Bot
982243aff0 chore(deps): update dependency jsdom to v27 2025-10-02 07:58:10 +00:00
Renovate Bot
31f96081a2 chore(deps): update dependency css-minimizer-webpack-plugin to v7 2025-10-02 07:58:00 +00:00
Renovate Bot
8507d130b0 chore(deps): update rust crate uuid to v1.18.1 2025-10-02 07:57:39 +00:00
Aravinth Manivannan
355853b5ea Merge pull request 'chore(deps): update postgres docker tag to v18' (#106) from renovate/postgres-18.x into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/106
2025-10-02 13:20:35 +05:30
Aravinth Manivannan
ca6193241b Merge pull request 'chore(deps): update dependency @redocly/cli to v2' (#102) from renovate/redocly-cli-2.x into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/102
2025-10-02 13:17:32 +05:30
Aravinth Manivannan
1a73c2d10b Merge pull request 'chore(deps): update rust crate num_cpus to v1.17.0' (#101) from renovate/num_cpus-1.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/101
2025-10-02 13:16:23 +05:30
Aravinth Manivannan
c0695a8b40 Merge pull request 'fix(deps): update rust crate reqwest to 0.12.0' (#34) from renovate/reqwest-0.x into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/34
2025-10-02 13:16:02 +05:30
Aravinth Manivannan
4c71f3ae5e Merge pull request 'chore(deps): update dependency ts-jest to v29.4.4' (#99) from renovate/ts-jest-29.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/99
2025-10-02 13:15:49 +05:30
Aravinth Manivannan
fb0b9ff71c Merge pull request 'chore(deps): update rust crate actix-rt to v2.11.0' (#100) from renovate/actix-rt-2.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/100
2025-10-02 13:15:25 +05:30
Aravinth Manivannan
29d4cfff7d Merge pull request 'chore(deps): update rust crate url to v2.5.7' (#97) from renovate/url-2.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/97
2025-10-02 13:13:25 +05:30
Aravinth Manivannan
85466e360c Merge pull request 'chore(deps): update rust crate serde_json to v1.0.145' (#96) from renovate/serde_json-1.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/96
2025-10-02 13:12:49 +05:30
Aravinth Manivannan
df242c8fda Merge pull request 'chore(deps): update rust crate serde to v1.0.228' (#95) from renovate/serde-monorepo into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/95
2025-10-02 13:12:40 +05:30
Aravinth Manivannan
628166ea15 Merge pull request 'chore(deps): update rust crate openssl to v0.10.73' (#94) from renovate/openssl-0.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/94
2025-10-02 13:12:10 +05:30
Aravinth Manivannan
45c7b39c32 Merge pull request 'chore(deps): update rust crate log to v0.4.28' (#93) from renovate/log-0.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/93
2025-10-02 13:10:32 +05:30
Renovate Bot
1b379f47ac chore(deps): update postgres docker tag to v18 2025-10-02 07:26:22 +00:00
Renovate Bot
d54404a493 chore(deps): update dependency @redocly/cli to v2 2025-10-02 07:25:42 +00:00
Renovate Bot
464b25d957 fix(deps): update rust crate reqwest to 0.12.0 2025-10-02 07:25:27 +00:00
Renovate Bot
9aa5789591 chore(deps): update rust crate num_cpus to v1.17.0 2025-10-02 07:25:12 +00:00
Renovate Bot
e5dd0711ca chore(deps): update rust crate actix-rt to v2.11.0 2025-10-02 07:25:03 +00:00
Renovate Bot
c472cf678b chore(deps): update dependency ts-jest to v29.4.4 2025-10-02 07:24:57 +00:00
Renovate Bot
adfb887657 chore(deps): update rust crate url to v2.5.7 2025-10-02 07:24:50 +00:00
Renovate Bot
a4de37c7d2 chore(deps): update rust crate serde_json to v1.0.145 2025-10-02 07:24:45 +00:00
Renovate Bot
ef1afa1fa9 chore(deps): update rust crate serde to v1.0.228 2025-10-02 07:24:43 +00:00
Renovate Bot
839444834e chore(deps): update rust crate openssl to v0.10.73 2025-10-02 07:24:41 +00:00
Renovate Bot
9c20f2d222 chore(deps): update rust crate log to v0.4.28 2025-10-02 07:24:38 +00:00
Aravinth Manivannan
8c8dd9c1d3 Merge pull request 'chore(deps): update rust crate lettre to v0.11.18' (#92) from renovate/lettre-0.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/92
2025-10-02 12:53:46 +05:30
Aravinth Manivannan
624e95f3ec Merge pull request 'chore(deps): update rust crate derive_more to v0.99.20' (#91) from renovate/derive_more-0.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/91
2025-10-02 12:53:25 +05:30
Aravinth Manivannan
5b7e4ba1b6 Merge pull request 'chore(deps): update rust crate config to v0.15.18' (#90) from renovate/config-0.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/90
2025-10-02 12:53:21 +05:30
Aravinth Manivannan
bb18229263 Merge pull request 'chore(deps): update rust crate async-trait to v0.1.89' (#89) from renovate/async-trait-0.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/89
2025-10-02 12:50:31 +05:30
Aravinth Manivannan
1ce1ac3b48 Merge pull request 'chore(deps): update dependency ts-loader to v9.5.4' (#88) from renovate/ts-loader-9.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/88
2025-10-02 12:49:51 +05:30
Aravinth Manivannan
a0c9790203 Merge pull request 'chore(deps): update dependency mini-css-extract-plugin to v2.9.4' (#87) from renovate/mini-css-extract-plugin-2.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/87
2025-10-02 12:49:47 +05:30
Aravinth Manivannan
e19bcc88ee Merge pull request 'chore(deps): update dependency @redocly/cli to v1.34.5' (#86) from renovate/redocly-cli-1.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/86
2025-10-02 12:49:43 +05:30
Aravinth Manivannan
1f7326cacc fix: dont run on renovate branches 2025-10-02 12:48:33 +05:30
Aravinth Manivannan
d390bb10a8 Merge pull request 'fix(deps): update rust crate thiserror to v2' (#56) from renovate/thiserror-2.x into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/56
2025-10-02 12:44:13 +05:30
Aravinth Manivannan
1f7bcf018f Merge pull request 'chore(deps): update typescript-eslint monorepo to v8 (major)' (#53) from renovate/major-typescript-eslint-monorepo into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/53
2025-10-02 12:43:57 +05:30
Aravinth Manivannan
ed5885f7bf Merge pull request 'chore(deps): update node.js to v22' (#51) from renovate/node-22.x into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/51
2025-10-02 12:43:52 +05:30
Aravinth Manivannan
dcc9c4c540 Merge pull request 'chore(deps): update dependency webpack-cli to v6' (#46) from renovate/webpack-cli-6.x into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/46
2025-10-02 12:43:40 +05:30
Aravinth Manivannan
a9f97ec423 Merge pull request 'chore(deps): update dependency sass-loader to v16' (#44) from renovate/sass-loader-16.x into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/44
2025-10-02 12:43:35 +05:30
Aravinth Manivannan
5f556c3c21 Merge pull request 'chore(deps): update dependency css-loader to v7' (#40) from renovate/css-loader-7.x into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/40
2025-10-02 12:43:00 +05:30
Aravinth Manivannan
9a8c9c46f2 Merge pull request 'fix(deps): update rust crate rust-embed to v8' (#55) from renovate/rust-embed-8.x into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/55
2025-10-02 12:42:36 +05:30
Renovate Bot
9b62a7cd13 chore(deps): update rust crate lettre to v0.11.18 2025-10-02 07:12:11 +00:00
Renovate Bot
e8b3debfde chore(deps): update rust crate derive_more to v0.99.20 2025-10-02 07:12:07 +00:00
Renovate Bot
f54cfb42ff chore(deps): update rust crate config to v0.15.18 2025-10-02 07:12:04 +00:00
Renovate Bot
8f9db61b5f chore(deps): update rust crate async-trait to v0.1.89 2025-10-02 07:11:59 +00:00
Renovate Bot
adb71c19c0 chore(deps): update dependency ts-loader to v9.5.4 2025-10-02 07:11:48 +00:00
Renovate Bot
2d26c58dc8 chore(deps): update dependency mini-css-extract-plugin to v2.9.4 2025-10-02 07:11:41 +00:00
Renovate Bot
c91c265ab2 chore(deps): update dependency @redocly/cli to v1.34.5 2025-10-02 07:11:31 +00:00
Aravinth Manivannan
7cdbf18fd1 Merge pull request 'fix(deps): update rust crate validator to 0.20' (#37) from renovate/validator-0.x into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/37
2025-10-02 12:35:37 +05:30
Aravinth Manivannan
ba601720f4 Merge pull request 'fix(deps): update rust crate sqlx to 0.8' (#36) from renovate/sqlx-0.x into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/36
2025-10-02 12:35:03 +05:30
Aravinth Manivannan
8fe6f8ce13 Merge pull request 'chore(deps): update rust crate tokio to v1.47.1' (#79) from renovate/tokio-1.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/79
2025-10-02 12:34:43 +05:30
Aravinth Manivannan
aa3451a1de Merge pull request 'chore(deps): update rust crate actix-web to v4.11.0' (#77) from renovate/actix-web-4.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/77
2025-10-02 12:34:38 +05:30
Aravinth Manivannan
13158c4660 Merge pull request 'chore(deps): update postgres docker tag to v13.22' (#74) from renovate/postgres-13.x into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/74
2025-10-02 12:34:35 +05:30
Aravinth Manivannan
81016e6c66 Merge pull request 'fix(deps): update rust crate pretty_env_logger to 0.5' (#33) from renovate/pretty_env_logger-0.x into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/33
2025-10-02 12:34:19 +05:30
Aravinth Manivannan
a319325f5a Merge pull request 'chore(deps): update dependency webpack to v5.102.0' (#73) from renovate/webpack-5.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/73
2025-10-02 12:34:01 +05:30
Renovate Bot
af78594b75 fix(deps): update rust crate thiserror to v2 2025-10-02 06:58:09 +00:00
Renovate Bot
e87681086d fix(deps): update rust crate rust-embed to v8 2025-10-02 06:58:08 +00:00
Renovate Bot
bf82127d58 chore(deps): update typescript-eslint monorepo to v8 2025-10-02 06:57:39 +00:00
Renovate Bot
a63ac30afd chore(deps): update node.js to v22 2025-10-02 06:56:59 +00:00
Renovate Bot
210e08dbec chore(deps): update dependency webpack-cli to v6 2025-10-02 06:56:42 +00:00
Renovate Bot
dba69111bf chore(deps): update dependency sass-loader to v16 2025-10-02 06:56:36 +00:00
Renovate Bot
dc746388c6 chore(deps): update dependency css-loader to v7 2025-10-02 06:56:24 +00:00
Renovate Bot
53fd774a3f fix(deps): update rust crate validator to 0.20 2025-10-02 06:56:19 +00:00
Renovate Bot
3f8a4cacd2 fix(deps): update rust crate sqlx to 0.8 2025-10-02 06:56:15 +00:00
Renovate Bot
acd6eebcfe fix(deps): update rust crate pretty_env_logger to 0.5 2025-10-02 06:55:58 +00:00
Renovate Bot
adef372720 chore(deps): update rust crate tokio to v1.47.1 2025-10-02 06:55:48 +00:00
Renovate Bot
4b025a94c8 chore(deps): update rust crate actix-web to v4.11.0 2025-10-02 06:55:42 +00:00
Renovate Bot
d38fd374f4 chore(deps): update postgres docker tag to v13.22 2025-10-02 06:55:19 +00:00
Renovate Bot
6ee914e797 chore(deps): update dependency webpack to v5.102.0 2025-10-02 06:55:06 +00:00
Aravinth Manivannan
37799184bf feat: cache builds 2025-10-02 12:08:28 +05:30
Aravinth Manivannan
e5690ff4ea fix: disable actions 2025-10-02 11:49:24 +05:30
Aravinth Manivannan
9662d03450 feat: update base img to trixie 2025-10-02 11:24:35 +05:30
Aravinth Manivannan
151aba467a Merge pull request 'chore(deps): update dependency typescript to v5.9.3' (#72) from renovate/typescript-5.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/72
2025-10-01 17:33:02 +05:30
Aravinth Manivannan
d010eb000d Merge pull request 'chore(deps): update rust crate awc to v3.8.0' (#75) from renovate/awc-3.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/75
2025-10-01 17:24:54 +05:30
Aravinth Manivannan
69fc6c0d90 Merge pull request 'chore(deps): update dependency eslint to v9' (#42) from renovate/major-eslint-monorepo into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/42
2025-10-01 17:24:33 +05:30
Aravinth Manivannan
fa6493ec43 Merge pull request 'chore(deps): update dependency sass to v1.93.2' (#71) from renovate/sass-1.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/71
2025-10-01 16:51:03 +05:30
Renovate Bot
e849ae43e7 chore(deps): update dependency eslint to v9 2025-10-01 11:04:26 +00:00
Renovate Bot
9fa1c45492 chore(deps): update rust crate awc to v3.8.0 2025-10-01 11:03:08 +00:00
Renovate Bot
76ba9ded00 chore(deps): update dependency typescript to v5.9.3 2025-10-01 11:01:25 +00:00
Renovate Bot
403a47856e chore(deps): update dependency sass to v1.93.2 2025-10-01 11:01:21 +00:00
Aravinth Manivannan
d352bc691d Merge pull request 'chore(deps): update dependency node to v20.19.0' (#70) from renovate/node-20.x into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/70
2025-04-20 20:08:46 +05:30
Aravinth Manivannan
127c61b455 Merge pull request 'chore(deps): update dependency @redocly/cli to v1.34.2' (#69) from renovate/redocly-cli-1.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/69
2025-04-20 20:08:37 +05:30
Aravinth Manivannan
16da3d258f Merge pull request 'fix(deps): update rust crate serde_json to v1.0.140' (#68) from renovate/serde_json-1.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/68
2025-04-20 20:01:26 +05:30
Aravinth Manivannan
4c5401941c Merge pull request 'fix(deps): update rust crate serde to v1.0.219' (#67) from renovate/serde-monorepo into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/67
2025-04-20 20:01:14 +05:30
Aravinth Manivannan
80f9748aa7 Merge pull request 'fix(deps): update rust crate openssl to v0.10.72' (#66) from renovate/openssl-0.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/66
2025-04-20 20:01:07 +05:30
Aravinth Manivannan
44efdd3541 Merge pull request 'fix(deps): update rust crate log to v0.4.27' (#65) from renovate/log-0.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/65
2025-04-20 19:53:02 +05:30
Aravinth Manivannan
1dcad0d507 Merge pull request 'fix(deps): update rust crate derive_more to v0.99.19' (#64) from renovate/derive_more-0.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/64
2025-04-20 19:43:32 +05:30
Aravinth Manivannan
7f6a703556 Merge pull request 'fix(deps): update rust crate config to v0.15.11' (#63) from renovate/config-0.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/63
2025-04-20 19:43:29 +05:30
Aravinth Manivannan
f8da5ca3bf Merge pull request 'fix(deps): update rust crate actix-service to v2.0.3' (#61) from renovate/actix-service-2.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/61
2025-04-20 19:43:25 +05:30
Aravinth Manivannan
7c643e013e Merge pull request 'fix(deps): update rust crate async-trait to v0.1.88' (#62) from renovate/async-trait-0.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/62
2025-04-20 19:37:20 +05:30
Aravinth Manivannan
be4c7779fa Merge pull request 'chore(deps): update dependency ts-jest to v29.3.2' (#58) from renovate/ts-jest-29.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/58
2025-04-20 19:37:10 +05:30
Aravinth Manivannan
a9e11a8c56 Merge pull request 'fix(deps): update rust crate actix-cors to v0.7.1' (#60) from renovate/actix-cors-0.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/60
2025-04-20 19:29:55 +05:30
Aravinth Manivannan
567a8c6b60 Merge pull request 'chore(deps): update dependency ts-loader to v9.5.2' (#59) from renovate/ts-loader-9.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/59
2025-04-20 19:29:51 +05:30
Aravinth Manivannan
5da73093c4 Merge pull request 'chore(deps): update dependency @types/node to v20.17.30' (#57) from renovate/node-20.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/57
2025-04-20 19:29:43 +05:30
Renovate Bot
0d37495a61 chore(deps): update dependency node to v20.19.0 2025-04-20 13:40:37 +00:00
Renovate Bot
c7a30fe62e chore(deps): update dependency @redocly/cli to v1.34.2 2025-04-20 13:40:30 +00:00
Renovate Bot
26f23f6700 fix(deps): update rust crate serde_json to v1.0.140 2025-04-20 13:40:14 +00:00
Renovate Bot
b851bdb2b0 fix(deps): update rust crate serde to v1.0.219 2025-04-20 13:40:04 +00:00
Renovate Bot
83c90c78e2 fix(deps): update rust crate openssl to v0.10.72 2025-04-20 13:39:53 +00:00
Renovate Bot
9768998926 fix(deps): update rust crate log to v0.4.27 2025-04-20 13:39:49 +00:00
Renovate Bot
78186f13e6 fix(deps): update rust crate derive_more to v0.99.19 2025-04-20 13:39:45 +00:00
Renovate Bot
5500483e1b fix(deps): update rust crate config to v0.15.11 2025-04-20 13:39:41 +00:00
Renovate Bot
0a82a62adc fix(deps): update rust crate async-trait to v0.1.88 2025-04-20 13:39:37 +00:00
Renovate Bot
fac6c92812 fix(deps): update rust crate actix-service to v2.0.3 2025-04-20 13:39:29 +00:00
Renovate Bot
3fea35b481 fix(deps): update rust crate actix-cors to v0.7.1 2025-04-20 13:39:24 +00:00
Renovate Bot
7d564973b7 chore(deps): update dependency ts-loader to v9.5.2 2025-04-20 13:39:03 +00:00
Renovate Bot
718d8d4c37 chore(deps): update dependency ts-jest to v29.3.2 2025-04-20 13:38:56 +00:00
Renovate Bot
b8143fb634 chore(deps): update dependency @types/node to v20.17.30 2025-04-20 13:38:50 +00:00
Aravinth Manivannan
9ca6992e16 Merge pull request 'chore(deps): update dependency @types/sinon to v17' (#39) from renovate/sinon-17.x into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/39
2025-04-03 11:52:39 +05:30
Aravinth Manivannan
cfd88cd20b Merge pull request 'chore(deps): update actions/setup-node action to v4' (#38) from renovate/actions-setup-node-4.x into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/38
2025-04-03 11:30:34 +05:30
Aravinth Manivannan
4f28931875 Merge pull request 'fix(deps): update rust crate lettre to 0.11.0' (#32) from renovate/lettre-0.x into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/32
2025-04-03 11:30:05 +05:30
Aravinth Manivannan
3f3fd3ce83 Merge pull request 'fix(deps): update rust crate derive_builder to 0.20' (#31) from renovate/derive_builder-0.x into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/31
2025-04-03 11:30:00 +05:30
Aravinth Manivannan
26c83e1af1 Merge pull request 'chore(deps): update dependency ts-jest to v29.3.1' (#22) from renovate/ts-jest-29.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/22
2025-04-03 11:29:47 +05:30
Aravinth Manivannan
8ea48c6f2a Merge pull request 'chore(deps): update dependency mini-css-extract-plugin to v2.9.2' (#20) from renovate/mini-css-extract-plugin-2.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/20
2025-04-03 10:50:11 +05:30
Aravinth Manivannan
6f9489403a Merge pull request 'chore(deps): update dependency css-loader to v6.11.0' (#18) from renovate/css-loader-6.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/18
2025-04-03 10:50:06 +05:30
Aravinth Manivannan
1effdc5a18 Merge pull request 'chore(deps): update dependency webpack-dev-server to v4.15.2' (#8) from renovate/webpack-dev-server-4.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/8
2025-04-03 10:50:00 +05:30
Aravinth Manivannan
8bfa53cc4f Merge pull request 'chore(deps): update dependency ts-node to v10.9.2' (#7) from renovate/ts-node-10.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/7
2025-04-03 10:49:55 +05:30
Renovate Bot
4046d389ac chore(deps): update dependency @types/sinon to v17 2025-04-03 05:01:44 +00:00
Renovate Bot
09d2ab4e75 chore(deps): update actions/setup-node action to v4 2025-04-03 05:01:40 +00:00
Renovate Bot
20dbcb5b8f fix(deps): update rust crate lettre to 0.11.0 2025-04-03 05:01:12 +00:00
Renovate Bot
2a71dfe459 fix(deps): update rust crate derive_builder to 0.20 2025-04-03 05:01:07 +00:00
Renovate Bot
047a0d1e2c chore(deps): update dependency ts-jest to v29.3.1 2025-04-03 05:00:33 +00:00
Renovate Bot
7584d2a574 chore(deps): update dependency mini-css-extract-plugin to v2.9.2 2025-04-03 05:00:24 +00:00
Renovate Bot
beb3d8a8e2 chore(deps): update dependency css-loader to v6.11.0 2025-04-03 05:00:17 +00:00
Renovate Bot
d59ce15043 chore(deps): update dependency webpack-dev-server to v4.15.2 2025-04-03 05:00:04 +00:00
Renovate Bot
d350f8d2a9 chore(deps): update dependency ts-node to v10.9.2 2025-04-03 04:59:58 +00:00
Aravinth Manivannan
f02a79637f Merge pull request 'fix(deps): update rust crate config to 0.15' (#30) from renovate/config-0.x into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/30
2025-01-02 17:46:05 +05:30
Renovate Bot
ce0eb26422 fix(deps): update rust crate config to 0.15 2024-12-30 14:19:22 +00:00
Aravinth Manivannan
1ee5f01444 Merge pull request 'fix(deps): update rust crate actix-cors to 0.7.0' (#28) from renovate/actix-cors-0.x into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/28
2024-12-30 19:24:53 +05:30
Aravinth Manivannan
0ab3599c63 Merge pull request 'chore(deps): update typescript-eslint monorepo to v6.21.0' (#27) from renovate/typescript-eslint-monorepo into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/27
2024-12-30 19:23:34 +05:30
Aravinth Manivannan
4278335fdd Merge pull request 'chore(deps): update rust crate mcaptcha_pow_sha256 to 0.5' (#26) from renovate/mcaptcha_pow_sha256-0.x into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/26
2024-12-30 19:23:29 +05:30
Aravinth Manivannan
ef5e2fee27 Merge pull request 'chore(deps): update postgres docker tag to v13.18' (#25) from renovate/postgres-13.x into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/25
2024-12-30 19:23:22 +05:30
Aravinth Manivannan
795d29bcb0 Merge pull request 'chore(deps): update dependency webpack to v5.97.1' (#24) from renovate/webpack-5.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/24
2024-12-30 19:05:39 +05:30
Aravinth Manivannan
b5766622fb Merge pull request 'chore(deps): update dependency typescript to v5.7.2' (#23) from renovate/typescript-5.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/23
2024-12-30 19:05:20 +05:30
Aravinth Manivannan
ab679e71d2 Merge pull request 'chore(deps): update dependency sass to v1.83.0' (#21) from renovate/sass-1.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/21
2024-12-30 18:58:11 +05:30
Aravinth Manivannan
ac9aecdb95 Merge pull request 'chore(deps): update dependency eslint to v8.57.1' (#19) from renovate/eslint-monorepo into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/19
2024-12-30 18:50:55 +05:30
Aravinth Manivannan
22bd14056c Merge pull request 'chore(deps): update dependency @types/node to v20.17.10' (#17) from renovate/node-20.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/17
2024-12-30 18:47:13 +05:30
Aravinth Manivannan
8810931d10 Merge pull request 'chore(deps): update dependency @redocly/cli to v1.26.1' (#16) from renovate/redocly-cli-1.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/16
2024-12-30 18:46:39 +05:30
Aravinth Manivannan
e11d71a5fa Merge pull request 'fix(deps): update rust crate serde_json to v1.0.134' (#15) from renovate/serde_json-1.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/15
2024-12-30 18:46:35 +05:30
Aravinth Manivannan
d9509cc4ce Merge pull request 'fix(deps): update rust crate serde to v1.0.217' (#14) from renovate/serde-monorepo into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/14
2024-12-30 18:26:00 +05:30
Aravinth Manivannan
0c2915f334 Merge pull request 'fix(deps): update dependency @mcaptcha/vanilla-glue to v0.1.0-rc2' (#9) from renovate/mcaptcha-vanilla-glue-0.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/9
2024-12-30 18:25:56 +05:30
Aravinth Manivannan
71fc1b4d46 Merge pull request 'chore(deps): update dependency ts-loader to v9.5.1' (#6) from renovate/ts-loader-9.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/6
2024-12-30 18:25:19 +05:30
Aravinth Manivannan
36dc200193 Merge pull request 'chore(deps): update dependency sinon to v17.0.1' (#5) from renovate/sinon-17.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/5
2024-12-30 18:10:05 +05:30
Aravinth Manivannan
589b476e43 Merge pull request 'chore(deps): update dependency sass-loader to v13.3.3' (#4) from renovate/sass-loader-13.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/4
2024-12-30 18:09:48 +05:30
Aravinth Manivannan
43da103f34 Merge pull request 'chore(deps): update dependency @types/jsdom to v21.1.7' (#3) from renovate/jsdom-21.x-lockfile into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/3
2024-12-30 18:09:42 +05:30
Aravinth Manivannan
c0899265c2 Merge pull request 'chore(deps): update dependency @types/jest to v29.5.14' (#2) from renovate/jest-monorepo into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/2
2024-12-30 18:09:24 +05:30
Renovate Bot
c827208144 fix(deps): update rust crate actix-cors to 0.7.0 2024-12-30 12:27:51 +00:00
Renovate Bot
58e2dcb9d4 chore(deps): update typescript-eslint monorepo to v6.21.0 2024-12-30 12:27:36 +00:00
Renovate Bot
a0c89d0e59 chore(deps): update rust crate mcaptcha_pow_sha256 to 0.5 2024-12-30 12:27:10 +00:00
Renovate Bot
86a12c5c6a chore(deps): update postgres docker tag to v13.18 2024-12-30 12:26:55 +00:00
Renovate Bot
30fa1bb165 chore(deps): update dependency webpack to v5.97.1 2024-12-30 12:26:42 +00:00
Renovate Bot
4606da212d chore(deps): update dependency typescript to v5.7.2 2024-12-30 12:26:24 +00:00
Renovate Bot
8d6de7ed5a chore(deps): update dependency sass to v1.83.0 2024-12-30 12:25:52 +00:00
Renovate Bot
2ae9c51da3 chore(deps): update dependency eslint to v8.57.1 2024-12-30 12:25:14 +00:00
Renovate Bot
2b6f039dd4 chore(deps): update dependency @types/node to v20.17.10 2024-12-30 12:24:43 +00:00
Renovate Bot
eb65259bc1 chore(deps): update dependency @redocly/cli to v1.26.1 2024-12-30 12:24:26 +00:00
Renovate Bot
3fdf215459 fix(deps): update rust crate serde_json to v1.0.134 2024-12-30 12:24:13 +00:00
Renovate Bot
ef8e07c44b fix(deps): update rust crate serde to v1.0.217 2024-12-30 12:24:09 +00:00
Renovate Bot
bacdbdc9e8 fix(deps): update dependency @mcaptcha/vanilla-glue to v0.1.0-rc2 2024-12-30 12:23:59 +00:00
Renovate Bot
d9cf53d399 chore(deps): update dependency ts-loader to v9.5.1 2024-12-30 12:23:17 +00:00
Renovate Bot
d619092598 chore(deps): update dependency sinon to v17.0.1 2024-12-30 12:23:02 +00:00
Renovate Bot
54ed53e03d chore(deps): update dependency sass-loader to v13.3.3 2024-12-30 12:22:48 +00:00
Renovate Bot
6bd8cfb711 chore(deps): update dependency @types/jsdom to v21.1.7 2024-12-30 12:22:30 +00:00
Renovate Bot
ef652541ee chore(deps): update dependency @types/jest to v29.5.14 2024-12-30 12:22:18 +00:00
Aravinth Manivannan
474437c360 Merge pull request 'fix: update deps to fix compilation with rustc' (#13) from update-deps into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/13
2024-12-30 17:37:23 +05:30
Aravinth Manivannan
1956e97503 fix: update deps to fix compilation with rustc 2024-12-30 16:58:39 +05:30
Aravinth Manivannan
a5d4dad508 Merge pull request 'chore: Configure Renovate' (#1) from renovate/configure into woodpecker-pipeline
Reviewed-on: https://git.batsense.net/mCaptcha/mCaptcha/pulls/1
2024-12-24 22:55:27 +05:30
Renovate Bot
afb281c93a Add renovate.json 2024-12-24 15:06:12 +00:00
Aravinth Manivannan
182635bad1 feat: woodpecker pipeline init 2024-12-24 20:09:21 +05:30
Aravinth Manivannan
9922c23322 Merge pull request #162 from lorenzleutgeb/patch-1
fix: SPDX identifier for license in package.json
2024-04-17 23:47:51 +05:30
Lorenz Leutgeb
2a92e8f672 fix: SPDX identifier for license in package.json 2024-04-17 19:04:09 +02:00
Aravinth Manivannan
581e6f9440 Merge pull request #157 from mCaptcha/fix-154
fix: exit loop when paginated DB query in easy PoW auto-enhance loop returns empty array
2024-03-24 08:53:08 +05:30
Aravinth Manivannan
3a7e71b499 fix: exit loop when paginated DB query returns empty array
fixes: https://github.com/mCaptcha/mCaptcha/issues/154
2024-03-24 08:40:52 +05:30
Aravinth Manivannan
91955501e2 feat: enable easy PoW configuration auto-enhance by default 2024-03-24 08:37:26 +05:30
Aravinth Manivannan
cb72b0adfa Merge pull request #152 from mCaptcha/fix-151
fix: difficulty factor for "broke my site" should be greater than peak sustainable traffic"
2024-03-23 13:55:28 +05:30
Aravinth Manivannan
c1fe45d409 fix: difficulty factor for "broke my site" should be greater than "peak sustainable traffic"
fixes: #151
2024-03-23 13:31:49 +05:30
Aravinth Manivannan
59e339f287 Merge pull request #150 from mCaptcha/fix-144
feat: add curl to the final image to aid in healthchecks
2024-03-15 18:01:12 +05:30
Aravinth Manivannan
ddcde9cf18 Merge pull request #146 from 15aura35/master
Update .env.docker-compose to use port 7000 instead of 7001
2024-03-15 18:00:17 +05:30
Aravinth Manivannan
65c92ee96e feat: add curl to the final image to aid in healthchecks
closes: https://github.com/mCaptcha/mCaptcha/issues/144
2024-03-14 20:52:37 +05:30
Aravinth Manivannan
40766ff44f Merge pull request #147 from mitallast/master
Fix: ensuring worker is ready
2024-03-12 19:41:49 +05:30
mitallast
ddc3008009 await worker is ready 2024-03-05 13:42:10 +03:00
mitallast
cba056aba6 fix wasm bigint progress handler 2024-03-05 13:13:47 +03:00
15aura35
16c975d2ec Update .env.docker-compose 2024-03-01 21:53:32 +00:00
41 changed files with 23332 additions and 9455 deletions

View File

@@ -13,7 +13,7 @@ MCAPTCHA_redis_URL=redis://mcaptcha_redis
MCAPTCHA_redis_POOL=4 MCAPTCHA_redis_POOL=4
# server # server
PORT=7001 PORT=7000
MCAPTCHA_server_DOMAIN=localhost MCAPTCHA_server_DOMAIN=localhost
MCAPTCHA__server_COOKIE_SECRET=pleasereplacethiswithrandomstring # PLEASE SET RANDOM STRING. MIN LENGTH=32 MCAPTCHA__server_COOKIE_SECRET=pleasereplacethiswithrandomstring # PLEASE SET RANDOM STRING. MIN LENGTH=32
MCAPTCHA__server_IP= 0.0.0.0 MCAPTCHA__server_IP= 0.0.0.0
@@ -26,8 +26,8 @@ MCAPTCHA_captcha_RUNNERS=4
MCAPTCHA_captcha_QUEUE_LENGTH=2000 MCAPTCHA_captcha_QUEUE_LENGTH=2000
MCAPTCHA_captcha_ENABLE_STATS=true MCAPTCHA_captcha_ENABLE_STATS=true
MCAPTCHA_captcha_DEFAULT_DIFFICULTY_STRATEGY_avg_traffic_difficulty=50000 # almost instant solution MCAPTCHA_captcha_DEFAULT_DIFFICULTY_STRATEGY_avg_traffic_difficulty=50000 # almost instant solution
MCAPTCHA_captcha_DEFAULT_DIFFICULTY_STRATEGY_broke_my_site_traffic_difficulty=3000000 # roughly 1.5s MCAPTCHA_captcha_DEFAULT_DIFFICULTY_STRATEGY_peak_sustainable_traffic_difficulty=3000000 # greater than 3.5s
MCAPTCHA_captcha_DEFAULT_DIFFICULTY_STRATEGY_peak_sustainable_traffic_difficulty=5000000 # greater than 3.5s MCAPTCHA_captcha_DEFAULT_DIFFICULTY_STRATEGY_broke_my_site_traffic_difficulty=5000000 # roughly 1.5s
MCAPTCHA_captcha_DEFAULT_DIFFICULTY_STRATEGY_duration=30 # cooldown period in seconds MCAPTCHA_captcha_DEFAULT_DIFFICULTY_STRATEGY_duration=30 # cooldown period in seconds
MCAPTCHA_captcha_DEFAULT_DIFFICULTY_STRATEGY_avg_traffic_time=1 # almost instant solution MCAPTCHA_captcha_DEFAULT_DIFFICULTY_STRATEGY_avg_traffic_time=1 # almost instant solution
MCAPTCHA_captcha_DEFAULT_DIFFICULTY_STRATEGY_peak_sustainable_traffic_time=3 MCAPTCHA_captcha_DEFAULT_DIFFICULTY_STRATEGY_peak_sustainable_traffic_time=3

View File

@@ -84,7 +84,7 @@ jobs:
- uses: actions/setup-node@v2 - uses: actions/setup-node@v2
with: with:
node-version: "20.0.0" node-version: "22"
- uses: actions-rust-lang/setup-rust-toolchain@v1 - uses: actions-rust-lang/setup-rust-toolchain@v1

2
.nvmrc
View File

@@ -1 +1 @@
20 22

29
.woodpecker.yaml Normal file
View File

@@ -0,0 +1,29 @@
steps:
frontend:
image: node:22
commands:
- make frontend
when:
- event: [pull_request, push]
- branch:
include: [woodpecker-pipeline]
exclude:
- renovate/\*
volumes:
- /var/lib/woodpercker-cache/mcaptcha/yarn:/root/.cache/yarn
backend:
image: rust:latest
when:
- event: [pull_request, push]
- branch:
include: [woodpecker-pipeline]
exclude:
- renovate/\*
commands:
- cargo --version
- make cache-bust
- cargo build --release
volumes:
- /var/lib/woodpercker-cache/mcaptcha/cargo:/root/.cargo
- /var/lib/woodpercker-cache/mcaptcha/target:/woodpecker/src/git.batsense.net/mCaptcha/mCaptcha/target

2962
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -28,23 +28,23 @@ actix = "0.13"
actix-identity = "0.4.0" actix-identity = "0.4.0"
actix-http = "3.0.4" actix-http = "3.0.4"
actix-rt = "2" actix-rt = "2"
actix-cors = "0.6.1" actix-cors = "0.7.0"
actix-service = "2.0.0" actix-service = "2.0.0"
async-trait = "0.1.51" async-trait = "0.1.51"
mime_guess = "2.0.3" mime_guess = "2.0.3"
rust-embed = "6.4.0" rust-embed = "8.0.0"
libcachebust = "0.3.0" libcachebust = "0.3.0"
futures = "0.3.15" futures = "0.3.15"
tokio = { version = "1.14", features = ["sync"]} tokio = { version = "1.14", features = ["sync"]}
sqlx = { version = "0.7", features = [ "runtime-tokio-rustls", "postgres", "time", "mysql"] } sqlx = { version = "0.8", features = [ "runtime-tokio-rustls", "postgres", "time", "mysql"] }
argon2-creds = { branch = "master", git = "https://github.com/realaravinth/argon2-creds"} argon2-creds = { branch = "master", git = "https://github.com/realaravinth/argon2-creds"}
#argon2-creds = { version="*", path = "../../argon2-creds/" } #argon2-creds = { version="*", path = "../../argon2-creds/" }
config = "0.13" config = "0.15"
validator = { version = "0.15", features = ["derive"]} validator = { version = "0.20", features = ["derive"]}
derive_builder = "0.11" derive_builder = "0.20"
derive_more = "0.99" derive_more = "0.99"
serde = "1" serde = "1"
@@ -53,7 +53,7 @@ serde_json = "1"
url = "2.2" url = "2.2"
urlencoding = "2.1.0" urlencoding = "2.1.0"
pretty_env_logger = "0.4" pretty_env_logger = "0.5"
log = "0.4" log = "0.4"
lazy_static = "1.4" lazy_static = "1.4"
@@ -69,7 +69,7 @@ mime = "0.3.16"
num_cpus = "1.13.1" num_cpus = "1.13.1"
lettre = { version = "0.10.0-rc.3", features = [ lettre = { version = "0.11.0", features = [
"builder", "builder",
"tokio1", "tokio1",
"tokio1-native-tls", "tokio1-native-tls",
@@ -78,7 +78,7 @@ lettre = { version = "0.10.0-rc.3", features = [
openssl = { version = "0.10.48", features = ["vendored"] } openssl = { version = "0.10.48", features = ["vendored"] }
uuid = { version = "1.4.0", features = ["v4", "serde"] } uuid = { version = "1.4.0", features = ["v4", "serde"] }
reqwest = { version = "0.11.18", features = ["json", "gzip"] } reqwest = { version = "0.12.0", features = ["json", "gzip"] }
[dependencies.db-core] [dependencies.db-core]
@@ -101,10 +101,10 @@ features = ["actix_identity_backend"]
[build-dependencies] [build-dependencies]
serde_json = "1" serde_json = "1"
sqlx = { version = "0.7", features = [ "runtime-tokio-rustls", "postgres", "time", "mysql" ] } sqlx = { version = "0.8", features = [ "runtime-tokio-rustls", "postgres", "time", "mysql" ] }
[dev-dependencies] [dev-dependencies]
mcaptcha_pow_sha256 = "0.4" mcaptcha_pow_sha256 = "0.5"
awc = "3.0.0" awc = "3.0.0"

View File

@@ -1,7 +1,7 @@
# SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net> # SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
# #
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later
FROM node:20 as frontend FROM node:22 as frontend
RUN set -ex; \ RUN set -ex; \
apt-get update; \ apt-get update; \
DEBIAN_FRONTEND=noninteractive \ DEBIAN_FRONTEND=noninteractive \
@@ -29,8 +29,12 @@ RUN cargo --version
RUN make cache-bust RUN make cache-bust
RUN cargo build --release RUN cargo build --release
FROM debian:bookworm as mCaptcha FROM debian:trixie as mCaptcha
LABEL org.opencontainers.image.source https://github.com/mCaptcha/mCaptcha LABEL org.opencontainers.image.source https://github.com/mCaptcha/mCaptcha
RUN set -ex; \
apt-get update; \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends curl
RUN useradd -ms /bin/bash -u 1001 mcaptcha RUN useradd -ms /bin/bash -u 1001 mcaptcha
WORKDIR /home/mcaptcha WORKDIR /home/mcaptcha
COPY --from=rust /src/target/release/mcaptcha /usr/local/bin/ COPY --from=rust /src/target/release/mcaptcha /usr/local/bin/

View File

@@ -34,11 +34,11 @@ enable_stats = true
[captcha.default_difficulty_strategy] [captcha.default_difficulty_strategy]
avg_traffic_difficulty = 50000 # almost instant solution avg_traffic_difficulty = 50000 # almost instant solution
#avg_traffic_time = 1 # almost instant solution avg_traffic_time = 1 # almost instant solution
peak_sustainable_traffic_difficulty = 3000000 # roughly 1.5s peak_sustainable_traffic_difficulty = 3000000 # roughly 1.5s
#peak_sustainable_traffic_time = 3 peak_sustainable_traffic_time = 3
broke_my_site_traffic_difficulty = 5000000 # greater than 3.5s broke_my_site_traffic_difficulty = 5000000 # greater than 3.5s
#broke_my_site_traffic_time = 5 broke_my_site_traffic_time = 5
duration = 30 # cooldown period in seconds duration = 30 # cooldown period in seconds
[database] [database]

View File

@@ -10,7 +10,7 @@ authors = ["realaravinth <realaravinth@batsense.net>"]
[dependencies] [dependencies]
async-trait = "0.1.51" async-trait = "0.1.51"
thiserror = "1.0.30" thiserror = "2.0.0"
serde = { version = "1", features = ["derive"]} serde = { version = "1", features = ["derive"]}
url = { version = "2.2.2", features = ["serde"] } url = { version = "2.2.2", features = ["serde"] }
libmcaptcha = "0.2.4" libmcaptcha = "0.2.4"

View File

@@ -10,4 +10,4 @@ authors = ["realaravinth <realaravinth@batsense.net>"]
[dependencies] [dependencies]
actix-rt = "2" actix-rt = "2"
sqlx = { version = "0.7", features = [ "runtime-tokio-rustls", "postgres", "time", "mysql" ] } sqlx = { version = "0.8", features = [ "runtime-tokio-rustls", "postgres", "time", "mysql" ] }

View File

@@ -8,7 +8,6 @@ use std::env;
use sqlx::postgres::PgPoolOptions; use sqlx::postgres::PgPoolOptions;
use sqlx::mysql::MySqlPoolOptions; use sqlx::mysql::MySqlPoolOptions;
#[cfg(not(tarpaulin_include))]
#[actix_rt::main] #[actix_rt::main]
async fn main() { async fn main() {
//TODO featuregate sqlite and postgres //TODO featuregate sqlite and postgres

View File

@@ -12,11 +12,11 @@ authors = ["realaravinth <realaravinth@batsense.net>"]
async-trait = "0.1.51" async-trait = "0.1.51"
db-core = {path = "../db-core"} db-core = {path = "../db-core"}
futures = "0.3.15" futures = "0.3.15"
sqlx = { version = "0.7", features = [ "runtime-tokio-rustls", "mysql", "time"] } sqlx = { version = "0.8", features = [ "runtime-tokio-rustls", "mysql", "time"] }
uuid = { version = "1.4.0", features = ["v4", "serde"] } uuid = { version = "1.4.0", features = ["v4", "serde"] }
[dev-dependencies] [dev-dependencies]
actix-rt = "2" actix-rt = "2"
sqlx = { version = "0.7", features = [ "runtime-tokio-rustls", "mysql", "time" ] } sqlx = { version = "0.8", features = [ "runtime-tokio-rustls", "mysql", "time" ] }
db-core = {path = "../db-core", features = ["test"]} db-core = {path = "../db-core", features = ["test"]}
url = { version = "2.2.2", features = ["serde"] } url = { version = "2.2.2", features = ["serde"] }

View File

@@ -12,11 +12,11 @@ authors = ["realaravinth <realaravinth@batsense.net>"]
async-trait = "0.1.51" async-trait = "0.1.51"
db-core = {path = "../db-core"} db-core = {path = "../db-core"}
futures = "0.3.15" futures = "0.3.15"
sqlx = { version = "0.7", features = [ "runtime-tokio-rustls", "postgres", "time" ] } sqlx = { version = "0.8", features = [ "runtime-tokio-rustls", "postgres", "time" ] }
uuid = { version = "1.4.0", features = ["v4", "serde"] } uuid = { version = "1.4.0", features = ["v4", "serde"] }
[dev-dependencies] [dev-dependencies]
actix-rt = "2" actix-rt = "2"
sqlx = { version = "0.7", features = [ "runtime-tokio-rustls", "postgres", "time"] } sqlx = { version = "0.8", features = [ "runtime-tokio-rustls", "postgres", "time"] }
db-core = {path = "../db-core", features = ["test"]} db-core = {path = "../db-core", features = ["test"]}
url = { version = "2.2.2", features = ["serde"] } url = { version = "2.2.2", features = ["serde"] }

View File

@@ -16,7 +16,7 @@ services:
- mcaptcha_redis - mcaptcha_redis
mcaptcha_postgres: mcaptcha_postgres:
image: postgres:13.2 image: postgres:18.0
volumes: volumes:
- mcaptcha-data:/var/lib/postgresql/ - mcaptcha-data:/var/lib/postgresql/
environment: environment:

File diff suppressed because it is too large Load Diff

View File

@@ -17,6 +17,6 @@
}, },
"homepage": "https://github.com/mCaptcha/mCaptcha#readme", "homepage": "https://github.com/mCaptcha/mCaptcha#readme",
"devDependencies": { "devDependencies": {
"@redocly/cli": "^1.4.0" "@redocly/cli": "^2.0.0"
} }
} }

File diff suppressed because it is too large Load Diff

46
eslint.config.js Normal file
View File

@@ -0,0 +1,46 @@
const {
defineConfig,
} = require("eslint/config");
const globals = require("globals");
const tsParser = require("@typescript-eslint/parser");
const typescriptEslint = require("@typescript-eslint/eslint-plugin");
const js = require("@eslint/js");
const {
FlatCompat,
} = require("@eslint/eslintrc");
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});
module.exports = defineConfig([{
languageOptions: {
globals: {
...globals.browser,
},
parser: tsParser,
ecmaVersion: 12,
sourceType: "module",
parserOptions: {},
},
extends: compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended"),
plugins: {
"@typescript-eslint": typescriptEslint,
},
rules: {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-types": "off",
indent: ["error", 2],
"linebreak-style": ["error", "unix"],
quotes: ["error", "double"],
semi: ["error", "always"],
},
}]);

19958
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,7 @@
"name": "vanilla", "name": "vanilla",
"main": "index.js", "main": "index.js",
"version": "1.0.0", "version": "1.0.0",
"license": "AGPL-3.0", "license": "AGPL-3.0-or-later",
"scripts": { "scripts": {
"build": "webpack --mode production", "build": "webpack --mode production",
"lint": "yarn run eslint templates", "lint": "yarn run eslint templates",
@@ -10,35 +10,38 @@
"test": "jest" "test": "jest"
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "^29.5.6", "@eslint/eslintrc": "^3.3.1",
"@types/jsdom": "^21.1.4", "@eslint/js": "^9.36.0",
"@types/node": "^20.8.9", "@types/jest": "^30.0.0",
"@types/sinon": "^10.0.20", "@types/jsdom": "^27.0.0",
"@typescript-eslint/eslint-plugin": "^6.9.0", "@types/node": "^22.0.0",
"@typescript-eslint/parser": "^6.9.0", "@types/sinon": "^17.0.0",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"@wasm-tool/wasm-pack-plugin": "^1.7.0", "@wasm-tool/wasm-pack-plugin": "^1.7.0",
"css-loader": "^6.8.1", "css-loader": "^7.0.0",
"css-minimizer-webpack-plugin": "^5.0.1", "css-minimizer-webpack-plugin": "^7.0.0",
"eslint": "^8.52.0", "eslint": "^9.0.0",
"jest": "^29.7.0", "globals": "^16.4.0",
"jest-environment-jsdom": "^29.7.0", "jest": "^30.0.0",
"jest-environment-jsdom": "^30.0.0",
"jest-fetch-mock": "^3.0.3", "jest-fetch-mock": "^3.0.3",
"jsdom": "^22.1.0", "jsdom": "^27.0.0",
"mini-css-extract-plugin": "^2.7.6", "mini-css-extract-plugin": "^2.7.6",
"sass": "^1.69.5", "sass": "^1.69.5",
"sass-loader": "^13.3.2", "sass-loader": "^16.0.0",
"sinon": "^17.0.0", "sinon": "^21.0.0",
"ts-jest": "^29.1.1", "ts-jest": "^29.1.1",
"ts-loader": "^9.5.0", "ts-loader": "^9.5.0",
"ts-node": "^10.9.1", "ts-node": "^10.9.1",
"typescript": "^5.2.2", "typescript": "^5.2.2",
"webpack": "^5.89.0", "webpack": "^5.89.0",
"webpack-cli": "^5.1.4", "webpack-cli": "^6.0.0",
"webpack-dev-server": "^4.15.1" "webpack-dev-server": "^5.0.0"
}, },
"dependencies": { "dependencies": {
"@mcaptcha/pow_sha256-polyfill": "^0.1.0-rc2", "@mcaptcha/pow_sha256-polyfill": "^0.1.0-rc2",
"@mcaptcha/vanilla-glue": "^0.1.0-rc1", "@mcaptcha/pow-wasm": "^0.1.0-rc2",
"@mcaptcha/pow-wasm": "^0.1.0-rc2" "@mcaptcha/vanilla-glue": "^0.1.0-rc1"
} }
} }

21
renovate.json Normal file
View File

@@ -0,0 +1,21 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended",
":dependencyDashboard"
],
"labels": [
"renovate-bot"
],
"prHourlyLimit": 0,
"timezone": "Asia/kolkata",
"prCreation": "immediate",
"vulnerabilityAlerts": {
"enabled": true,
"labels": [
"renovate-bot",
"renovate-security",
"security"
]
}
}

View File

@@ -22,8 +22,8 @@ is_ci(){
docker-compose down -v --remove-orphans || true docker compose down -v --remove-orphans || true
docker-compose up -d docker compose up -d
cd $(mktemp -d) cd $(mktemp -d)
pwd pwd
find find
@@ -40,4 +40,4 @@ else
fi fi
cd $PROJECT_ROOT cd $PROJECT_ROOT
docker-compose down -v --remove-orphans || true docker compose down -v --remove-orphans || true

View File

@@ -188,7 +188,6 @@ impl Data {
.build() .build()
.unwrap() .unwrap()
} }
#[cfg(not(tarpaulin_include))]
/// create new instance of app data /// create new instance of app data
pub async fn new(s: &Settings, survey_secrets: SecretsStore) -> Arc<Self> { pub async fn new(s: &Settings, survey_secrets: SecretsStore) -> Arc<Self> {
let creds = Self::get_creds(); let creds = Self::get_creds();

View File

@@ -55,6 +55,9 @@ impl UpdateEasyCaptcha {
} }
let mut patterns = data.db.get_all_easy_captchas(limit, offset).await?; let mut patterns = data.db.get_all_easy_captchas(limit, offset).await?;
if patterns.is_empty() {
break;
}
for pattern in patterns.drain(0..) { for pattern in patterns.drain(0..) {
if !Self::can_run(rx) { if !Self::can_run(rx) {
return Ok(()); return Ok(());
@@ -85,6 +88,7 @@ impl UpdateEasyCaptcha {
} }
page += 1; page += 1;
} }
Ok(())
} }
fn can_run(rx: &mut Receiver<()>) -> bool { fn can_run(rx: &mut Receiver<()>) -> bool {

View File

@@ -40,7 +40,6 @@ impl std::cmp::PartialEq for SmtpErrorWrapper {
} }
#[derive(Debug, Display, PartialEq, Error)] #[derive(Debug, Display, PartialEq, Error)]
#[cfg(not(tarpaulin_include))]
pub enum ServiceError { pub enum ServiceError {
#[display(fmt = "internal server error")] #[display(fmt = "internal server error")]
InternalServerError, InternalServerError,
@@ -114,14 +113,11 @@ pub enum ServiceError {
} }
#[derive(Serialize, Deserialize)] #[derive(Serialize, Deserialize)]
#[cfg(not(tarpaulin_include))]
pub struct ErrorToResponse { pub struct ErrorToResponse {
pub error: String, pub error: String,
} }
#[cfg(not(tarpaulin_include))]
impl ResponseError for ServiceError { impl ResponseError for ServiceError {
#[cfg(not(tarpaulin_include))]
fn error_response(&self) -> HttpResponse { fn error_response(&self) -> HttpResponse {
HttpResponseBuilder::new(self.status_code()) HttpResponseBuilder::new(self.status_code())
.append_header((header::CONTENT_TYPE, "application/json; charset=UTF-8")) .append_header((header::CONTENT_TYPE, "application/json; charset=UTF-8"))
@@ -133,7 +129,6 @@ impl ResponseError for ServiceError {
) )
} }
#[cfg(not(tarpaulin_include))]
fn status_code(&self) -> StatusCode { fn status_code(&self) -> StatusCode {
match self { match self {
ServiceError::ClosedForRegistration => StatusCode::FORBIDDEN, ServiceError::ClosedForRegistration => StatusCode::FORBIDDEN,
@@ -177,7 +172,6 @@ impl ResponseError for ServiceError {
} }
impl From<CredsError> for ServiceError { impl From<CredsError> for ServiceError {
#[cfg(not(tarpaulin_include))]
fn from(e: CredsError) -> ServiceError { fn from(e: CredsError) -> ServiceError {
match e { match e {
CredsError::UsernameCaseMappedError => ServiceError::UsernameCaseMappedError, CredsError::UsernameCaseMappedError => ServiceError::UsernameCaseMappedError,
@@ -192,7 +186,6 @@ impl From<CredsError> for ServiceError {
} }
impl From<DBError> for ServiceError { impl From<DBError> for ServiceError {
#[cfg(not(tarpaulin_include))]
fn from(e: DBError) -> ServiceError { fn from(e: DBError) -> ServiceError {
println!("from conversin: {}", e); println!("from conversin: {}", e);
match e { match e {
@@ -208,57 +201,46 @@ impl From<DBError> for ServiceError {
} }
impl From<ValidationErrors> for ServiceError { impl From<ValidationErrors> for ServiceError {
#[cfg(not(tarpaulin_include))]
fn from(_: ValidationErrors) -> ServiceError { fn from(_: ValidationErrors) -> ServiceError {
ServiceError::NotAnEmail ServiceError::NotAnEmail
} }
} }
impl From<ParseError> for ServiceError { impl From<ParseError> for ServiceError {
#[cfg(not(tarpaulin_include))]
fn from(_: ParseError) -> ServiceError { fn from(_: ParseError) -> ServiceError {
ServiceError::NotAUrl ServiceError::NotAUrl
} }
} }
#[cfg(not(tarpaulin_include))]
impl From<CaptchaError> for ServiceError { impl From<CaptchaError> for ServiceError {
fn from(e: CaptchaError) -> ServiceError { fn from(e: CaptchaError) -> ServiceError {
ServiceError::CaptchaError(e) ServiceError::CaptchaError(e)
} }
} }
#[cfg(not(tarpaulin_include))]
impl From<SmtpError> for ServiceError { impl From<SmtpError> for ServiceError {
#[cfg(not(tarpaulin_include))]
fn from(e: SmtpError) -> Self { fn from(e: SmtpError) -> Self {
ServiceError::UnableToSendEmail(SmtpErrorWrapper(e)) ServiceError::UnableToSendEmail(SmtpErrorWrapper(e))
} }
} }
#[cfg(not(tarpaulin_include))]
impl From<RecvError> for ServiceError { impl From<RecvError> for ServiceError {
#[cfg(not(tarpaulin_include))]
fn from(e: RecvError) -> Self { fn from(e: RecvError) -> Self {
log::error!("{:?}", e); log::error!("{:?}", e);
ServiceError::InternalServerError ServiceError::InternalServerError
} }
} }
#[cfg(not(tarpaulin_include))]
impl From<MailboxError> for ServiceError { impl From<MailboxError> for ServiceError {
#[cfg(not(tarpaulin_include))]
fn from(e: MailboxError) -> Self { fn from(e: MailboxError) -> Self {
log::error!("{:?}", e); log::error!("{:?}", e);
ServiceError::InternalServerError ServiceError::InternalServerError
} }
} }
#[cfg(not(tarpaulin_include))]
pub type ServiceResult<V> = std::result::Result<V, ServiceError>; pub type ServiceResult<V> = std::result::Result<V, ServiceError>;
#[derive(Debug, Display, PartialEq, Error)] #[derive(Debug, Display, PartialEq, Error)]
#[cfg(not(tarpaulin_include))]
pub enum PageError { pub enum PageError {
#[display(fmt = "Something weng wrong: Internal server error")] #[display(fmt = "Something weng wrong: Internal server error")]
InternalServerError, InternalServerError,
@@ -267,17 +249,13 @@ pub enum PageError {
ServiceError(ServiceError), ServiceError(ServiceError),
} }
#[cfg(not(tarpaulin_include))]
impl From<ServiceError> for PageError { impl From<ServiceError> for PageError {
#[cfg(not(tarpaulin_include))]
fn from(e: ServiceError) -> Self { fn from(e: ServiceError) -> Self {
PageError::ServiceError(e) PageError::ServiceError(e)
} }
} }
#[cfg(not(tarpaulin_include))]
impl From<DBError> for PageError { impl From<DBError> for PageError {
#[cfg(not(tarpaulin_include))]
fn from(e: DBError) -> Self { fn from(e: DBError) -> Self {
let se: ServiceError = e.into(); let se: ServiceError = e.into();
se.into() se.into()
@@ -297,7 +275,6 @@ impl ResponseError for PageError {
} }
} }
#[cfg(not(tarpaulin_include))]
fn status_code(&self) -> StatusCode { fn status_code(&self) -> StatusCode {
match self { match self {
PageError::InternalServerError => StatusCode::INTERNAL_SERVER_ERROR, PageError::InternalServerError => StatusCode::INTERNAL_SERVER_ERROR,
@@ -306,7 +283,6 @@ impl ResponseError for PageError {
} }
} }
#[cfg(not(tarpaulin_include))]
pub type PageResult<V> = std::result::Result<V, PageError>; pub type PageResult<V> = std::result::Result<V, PageError>;
#[cfg(test)] #[cfg(test)]

View File

@@ -92,7 +92,6 @@ pub const CACHE_AGE: u32 = 604800;
pub type ArcData = Arc<crate::data::Data>; pub type ArcData = Arc<crate::data::Data>;
pub type AppData = actix_web::web::Data<ArcData>; pub type AppData = actix_web::web::Data<ArcData>;
#[cfg(not(tarpaulin_include))]
#[actix_web::main] #[actix_web::main]
async fn main() -> std::io::Result<()> { async fn main() -> std::io::Result<()> {
use std::time::Duration; use std::time::Duration;
@@ -185,7 +184,6 @@ async fn main() -> std::io::Result<()> {
Ok(()) Ok(())
} }
#[cfg(not(tarpaulin_include))]
pub fn get_json_err() -> JsonConfig { pub fn get_json_err() -> JsonConfig {
JsonConfig::default().error_handler(|err, _| { JsonConfig::default().error_handler(|err, _| {
//debug!("JSON deserialization error: {:?}", &err); //debug!("JSON deserialization error: {:?}", &err);
@@ -193,7 +191,6 @@ pub fn get_json_err() -> JsonConfig {
}) })
} }
#[cfg(not(tarpaulin_include))]
pub fn get_identity_service( pub fn get_identity_service(
settings: &Settings, settings: &Settings,
) -> IdentityService<CookieIdentityPolicy> { ) -> IdentityService<CookieIdentityPolicy> {

View File

@@ -25,7 +25,6 @@ pub fn get_middleware() -> Authentication<routes::Routes> {
Authentication::with_identity(routes::ROUTES) Authentication::with_identity(routes::ROUTES)
} }
#[cfg(not(tarpaulin_include))]
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use actix_web::http::StatusCode; use actix_web::http::StatusCode;

View File

@@ -56,7 +56,6 @@ pub struct Smtp {
} }
impl Server { impl Server {
#[cfg(not(tarpaulin_include))]
pub fn get_ip(&self) -> String { pub fn get_ip(&self) -> String {
format!("{}:{}", self.ip, self.port) format!("{}:{}", self.ip, self.port)
} }
@@ -205,7 +204,6 @@ const DEPRECATED_ENV_VARS: [(&str, &str); 23] = [
("smtp.port", "MCAPTCHA_SMTP_PORT"), ("smtp.port", "MCAPTCHA_SMTP_PORT"),
]; ];
#[cfg(not(tarpaulin_include))]
impl Settings { impl Settings {
pub fn new() -> Result<Self, ConfigError> { pub fn new() -> Result<Self, ConfigError> {
let mut s = Config::builder(); let mut s = Config::builder();

View File

@@ -2,13 +2,13 @@
// SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net> // SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
// //
// SPDX-License-Identifier: AGPL-3.0-or-later // SPDX-License-Identifier: AGPL-3.0-or-later
"use strict";
import createError from "./index"; import createError from "./index";
import * as e from "./index"; import * as e from "./index";
import setup from "./setUpTests"; import setup from "./setUpTests";
"use strict";
jest.useFakeTimers(); jest.useFakeTimers();

View File

@@ -2,10 +2,10 @@
// SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net> // SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
// //
// SPDX-License-Identifier: AGPL-3.0-or-later // SPDX-License-Identifier: AGPL-3.0-or-later
"use strict";
import {Router} from "./router"; import {Router} from "./router";
"use strict";
const result = { const result = {
result: "", result: "",

View File

@@ -2,10 +2,10 @@
// SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net> // SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
// //
// SPDX-License-Identifier: AGPL-3.0-or-later // SPDX-License-Identifier: AGPL-3.0-or-later
"use strict";
import genJsonPayload from "./genJsonPayload"; import genJsonPayload from "./genJsonPayload";
"use strict";
const payload = { const payload = {
username: "Jhon", username: "Jhon",

View File

@@ -2,12 +2,11 @@
// SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net> // SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
// //
// SPDX-License-Identifier: AGPL-3.0-or-later // SPDX-License-Identifier: AGPL-3.0-or-later
"use strict";
import getFormUrl from "./getFormUrl"; import getFormUrl from "./getFormUrl";
import {getLoginFormHtml} from "../setUpTests"; import {getLoginFormHtml} from "../setUpTests";
"use strict";
const formClassName = "form__box"; const formClassName = "form__box";
const formURL = "/api/v1/signin"; const formURL = "/api/v1/signin";

View File

@@ -2,6 +2,7 @@
// SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net> // SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
// //
// SPDX-License-Identifier: AGPL-3.0-or-later // SPDX-License-Identifier: AGPL-3.0-or-later
"use strict";
import isBlankString from "./isBlankString"; import isBlankString from "./isBlankString";
import {mockAlert} from "../setUpTests"; import {mockAlert} from "../setUpTests";
@@ -9,7 +10,6 @@ import {mockAlert} from "../setUpTests";
import setup from "../components/error/setUpTests"; import setup from "../components/error/setUpTests";
"use strict";
mockAlert(); mockAlert();

View File

@@ -2,11 +2,10 @@
// SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net> // SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
// //
// SPDX-License-Identifier: AGPL-3.0-or-later // SPDX-License-Identifier: AGPL-3.0-or-later
"use strict";
import isNumber from "./isNumber"; import isNumber from "./isNumber";
"use strict";
it("getFromUrl workds", () => { it("getFromUrl workds", () => {
expect(isNumber("test")).toBe(false); expect(isNumber("test")).toBe(false);
expect(isNumber("1test213")).toBe(false); expect(isNumber("1test213")).toBe(false);

View File

@@ -21,7 +21,7 @@ SPDX-License-Identifier: MIT OR Apache-2.0
<label class="widget__verification-container" for="widget__verification-checkbox"> <label class="widget__verification-container" for="widget__verification-checkbox">
<span id="widget__verification-text" <span id="widget__verification-text"
>I'm not a robot</span> >I'm not a robot</span>
<input <input disabled
id="widget__verification-checkbox" id="widget__verification-checkbox"
aria-valuenow="I'm not a robot" aria-valuenow="I'm not a robot"
aria-checked="false" aria-checked="false"

View File

@@ -3,7 +3,7 @@
// //
// SPDX-License-Identifier: MIT OR Apache-2.0 // SPDX-License-Identifier: MIT OR Apache-2.0
import { Work, ServiceWorkerMessage } from "./types"; import {Work, ServiceWorkerMessage} from "./types";
import fetchPoWConfig from "./fetchPoWConfig"; import fetchPoWConfig from "./fetchPoWConfig";
import sendWork from "./sendWork"; import sendWork from "./sendWork";
import sendToParent from "./sendToParent"; import sendToParent from "./sendToParent";
@@ -12,7 +12,17 @@ import * as CONST from "./const";
import "./main.scss"; import "./main.scss";
let LOCK = false; let LOCK = false;
const worker = new Worker("/bench.js");
const workerPromise = new Promise<Worker>((res) => {
const worker = new Worker("/bench.js");
worker.onmessage = (event: MessageEvent) => {
const message: ServiceWorkerMessage = event.data;
if(message.type === "ready") {
console.log("worker ready");
res(worker);
}
};
});
/** add mcaptcha widget element to DOM */ /** add mcaptcha widget element to DOM */
export const registerVerificationEventHandler = (): void => { export const registerVerificationEventHandler = (): void => {
@@ -20,10 +30,14 @@ export const registerVerificationEventHandler = (): void => {
document.querySelector(".widget__verification-container") document.querySelector(".widget__verification-container")
); );
verificationContainer.style.display = "flex"; verificationContainer.style.display = "flex";
CONST.btn().addEventListener("click", (e) => solveCaptchaRunner(e)); workerPromise.then((worker: Worker) => {
const btn = CONST.btn();
btn.disabled = false;
btn.addEventListener("click", (e) => solveCaptchaRunner(worker, e));
});
}; };
export const solveCaptchaRunner = async (e: Event): Promise<void> => { export const solveCaptchaRunner = async (worker: Worker, e: Event): Promise<void> => {
const PROGRESS_FILL = <HTMLElement>document.querySelector(".progress__fill"); const PROGRESS_FILL = <HTMLElement>document.querySelector(".progress__fill");
const setWidth = (width: number) => { const setWidth = (width: number) => {
@@ -94,7 +108,7 @@ export const solveCaptchaRunner = async (e: Event): Promise<void> => {
} }
if (resp.type === "progress") { if (resp.type === "progress") {
if (width < 80) { if (width < 80) {
width = Number(resp.nonce / max_recorded_nonce) * 100; width = resp.nonce / max_recorded_nonce * 100;
setWidth(width); setWidth(width);
} }
console.log(`received nonce ${resp.nonce}`); console.log(`received nonce ${resp.nonce}`);

View File

@@ -30,7 +30,7 @@ const prove = async (
config.string, config.string,
config.difficulty_factor, config.difficulty_factor,
STEPS, STEPS,
progress (nonce: bigint | number) => progress(Number(nonce))
); );
const t1 = performance.now(); const t1 = performance.now();
time = t1 - t0; time = t1 - t0;

View File

@@ -9,6 +9,12 @@ import prove from "./prove";
import { PoWConfig, ServiceWorkerMessage, ServiceWorkerWork } from "./types"; import { PoWConfig, ServiceWorkerMessage, ServiceWorkerWork } from "./types";
log.log("worker registered"); log.log("worker registered");
const ready: ServiceWorkerMessage = {
type: "ready",
};
postMessage(ready);
onmessage = async (e) => { onmessage = async (e) => {
console.debug("message received at worker"); console.debug("message received at worker");
const config: PoWConfig = e.data; const config: PoWConfig = e.data;

View File

@@ -40,5 +40,6 @@ export type Token = {
}; };
export type ServiceWorkerMessage = export type ServiceWorkerMessage =
| { type: "ready" }
| { type: "work"; value: ServiceWorkerWork } | { type: "work"; value: ServiceWorkerWork }
| { type: "progress"; nonce: number }; | { type: "progress"; nonce: number };

View File

@@ -1,6 +1,6 @@
# This file is automatically @generated by Cargo. # This file is automatically @generated by Cargo.
# It is not intended for manual editing. # It is not intended for manual editing.
version = 3 version = 4
[[package]] [[package]]
name = "block-buffer" name = "block-buffer"
@@ -177,6 +177,12 @@ dependencies = [
"walkdir", "walkdir",
] ]
[[package]]
name = "memchr"
version = "2.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
[[package]] [[package]]
name = "mime" name = "mime"
version = "0.3.17" version = "0.3.17"
@@ -195,18 +201,18 @@ dependencies = [
[[package]] [[package]]
name = "proc-macro2" name = "proc-macro2"
version = "1.0.69" version = "1.0.92"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0"
dependencies = [ dependencies = [
"unicode-ident", "unicode-ident",
] ]
[[package]] [[package]]
name = "quote" name = "quote"
version = "1.0.33" version = "1.0.38"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
] ]
@@ -228,33 +234,45 @@ dependencies = [
[[package]] [[package]]
name = "serde" name = "serde"
version = "1.0.189" version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537" checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
dependencies = [
"serde_core",
"serde_derive",
]
[[package]]
name = "serde_core"
version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
dependencies = [ dependencies = [
"serde_derive", "serde_derive",
] ]
[[package]] [[package]]
name = "serde_derive" name = "serde_derive"
version = "1.0.189" version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5" checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.38", "syn 2.0.93",
] ]
[[package]] [[package]]
name = "serde_json" name = "serde_json"
version = "1.0.107" version = "1.0.145"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c"
dependencies = [ dependencies = [
"itoa", "itoa",
"memchr",
"ryu", "ryu",
"serde", "serde",
"serde_core",
] ]
[[package]] [[package]]
@@ -287,9 +305,9 @@ dependencies = [
[[package]] [[package]]
name = "syn" name = "syn"
version = "2.0.38" version = "2.0.93"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" checksum = "9c786062daee0d6db1132800e623df74274a0a87322d8e183338e01b3d98d058"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",

6055
yarn.lock

File diff suppressed because it is too large Load Diff