Skip to content

Commit

Permalink
Release 2.2.0 (#1574)
Browse files Browse the repository at this point in the history
  • Loading branch information
forgetso authored Dec 13, 2024
2 parents 5c46ecd + 9b9d65e commit 24c2ccb
Show file tree
Hide file tree
Showing 75 changed files with 2,606 additions and 2,227 deletions.
76 changes: 76 additions & 0 deletions demos/android-webview/app/src/main/assets/procaptcha.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<html lang="en">
<head>
<title>Procaptcha</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="module" src="https://js.prosopo.io/js/procaptcha.bundle.js" async defer></script>
<style>
div {
padding: 4px;
}
input, button {
padding: 6px 8px;
margin: 4px;
border-radius: 5px;
height: 30px;
border: 1px solid rgb(224, 224, 224);
}
.text-center {
text-align: center;
}
.container: {
display: grid;
}
.row {
display: grid;
grid-template-columns: 1fr;
gap: 10px;
grid-template-areas: "a";
grid-auto-rows: minmax(20px, auto);
margin-bottom: 20px;
margin-top: 20px;
}
.bg-light {
background-color: rgb(221, 244, 255);
}
.m-auto {
margin: 0 auto;
}
.w-300 {
width: 300px;
}
.text-grey {
color: #666666;
}


</style>
</head>
<body>

<form action="" method="POST">

<div class="container bg-light text-grey">
<div class="row text-center">
<a class="text-grey" href="https://prosopo.io">Procaptcha Example Android Form</a>
</div>
<div class="row">
<input type="text" name="email" id="email" placeholder="Email"/>
</div>
<div class="row">
<input type="password" name="password" id="password" placeholder="Password"/>
</div>
<div class="row">
<div class="procaptcha w-300 m-auto"
data-sitekey="5FWCbfR7pH9QiZqLgmm5Rw4QbFwyU5EaMqUV4G6xrvrTZDtC"
data-captcha-type="image"></div>
</div>
<div class="row text-center">
<input type="submit" value="Submit"/>
</div>
</div>

<br/>

</form>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,20 @@ package io.prosopo.procaptcha

import android.annotation.SuppressLint
import android.content.Intent
import android.graphics.Bitmap
import android.net.Uri
import android.os.Bundle
import android.os.Message
import android.util.Base64
import android.util.Log
import android.webkit.ConsoleMessage
import android.webkit.JsResult
import android.webkit.CookieManager
import android.webkit.PermissionRequest
import android.webkit.ValueCallback
import android.webkit.WebChromeClient
import android.webkit.WebResourceError
import android.webkit.WebResourceRequest
import android.webkit.WebView
import android.webkit.WebViewClient
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity

const val namespace = "procaptcha";
Expand Down Expand Up @@ -119,33 +117,14 @@ class MainActivity : AppCompatActivity() {
webView.settings.domStorageEnabled = true
webView.settings.databaseEnabled = true
webView.settings.allowFileAccess = true

webView.webViewClient = ProcaptchaWebViewClient()
webView.webChromeClient = ProcaptchaWebChromeClient()
val encodedHtml = generateEncodedHtml()
webView.loadData(encodedHtml, "text/html", "base64")
}

private fun generateEncodedHtml(): String {
val html = """
<html>
<head>
<title>Procaptcha</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="module" src="https://js.prosopo.io/js/procaptcha.bundle.js" async defer></script>
</head>
<body>
<form action="" method="POST">
<a href="https://prosopo.io">Link</a>
<input type="text" name="email" placeholder="Email" />
<input type="password" name="password" placeholder="Password" />
<p>image</p>
<div class="procaptcha" data-sitekey="5FWCbfR7pH9QiZqLgmm5Rw4QbFwyU5EaMqUV4G6xrvrTZDtC" data-captcha-type="image"></div>
<br />
<input type="submit" value="Submit" />
</form>
</body>
</html>
""".trimIndent()
return Base64.encodeToString(html.toByteArray(), Base64.NO_PADDING)
// Enable cookies
val cookieManager: CookieManager = CookieManager.getInstance()
cookieManager.setAcceptCookie(true)
webView.loadUrl("file:///android_asset/procaptcha.html")

}
}
8 changes: 3 additions & 5 deletions demos/android-webview/local.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
## This file is automatically generated by Android Studio.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file should *NOT* be checked into Version Control Systems,
## This file must *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
sdk.dir=/home/geopro/Android/Sdk
#Thu Dec 12 13:58:37 GMT 2024
sdk.dir=/home/chris/Android/Sdk
4 changes: 2 additions & 2 deletions demos/client-bundle-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"start": "vite serve ./src --port 9232 --config vite.config.ts",
"clean": "echo 'nothing to clean'"
},
"version": "2.1.16",
"version": "2.2.0",
"devDependencies": {
"@prosopo/dotenv": "2.1.16",
"@prosopo/dotenv": "2.2.0",
"@types/node": "22.5.5",
"@vitest/coverage-v8": "2.1.1",
"concurrently": "9.0.1",
Expand Down
16 changes: 8 additions & 8 deletions demos/client-example-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prosopo/client-example-server",
"version": "2.1.16",
"version": "2.2.0",
"description": "Backend for client-example",
"main": "dist/app.js",
"type": "module",
Expand Down Expand Up @@ -32,12 +32,12 @@
"@noble/hashes": "1.5.0",
"@polkadot/util": "12.6.2",
"@polkadot/util-crypto": "12.6.2",
"@prosopo/common": "2.1.16",
"@prosopo/contract": "2.1.16",
"@prosopo/dotenv": "2.1.16",
"@prosopo/server": "2.1.16",
"@prosopo/types": "2.1.16",
"@prosopo/util": "2.1.16",
"@prosopo/common": "2.2.0",
"@prosopo/contract": "2.2.0",
"@prosopo/dotenv": "2.2.0",
"@prosopo/server": "2.2.0",
"@prosopo/types": "2.2.0",
"@prosopo/util": "2.2.0",
"@typegoose/auto-increment": "4.6.0",
"cors": "2.8.5",
"express": "4.21.1",
Expand All @@ -47,7 +47,7 @@
"zod": "3.23.8"
},
"devDependencies": {
"@prosopo/config": "2.1.16",
"@prosopo/config": "2.2.0",
"@types/jsonwebtoken": "9.0.6",
"@vitest/coverage-v8": "2.1.1",
"concurrently": "9.0.1",
Expand Down
22 changes: 11 additions & 11 deletions demos/client-example/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prosopo/client-example",
"version": "2.1.16",
"version": "2.2.0",
"private": true,
"type": "module",
"engines": {
Expand All @@ -13,14 +13,14 @@
"@mui/material": "5.9.1",
"@polkadot/extension-dapp": "0.46.9",
"@polkadot/extension-inject": "0.46.9",
"@prosopo/common": "2.1.16",
"@prosopo/locale-browser": "2.1.16",
"@prosopo/procaptcha-frictionless": "2.1.16",
"@prosopo/procaptcha-pow": "2.1.16",
"@prosopo/procaptcha-react": "2.1.16",
"@prosopo/server": "2.1.16",
"@prosopo/types": "2.1.16",
"@prosopo/vite-plugin-watch-workspace": "2.1.16",
"@prosopo/common": "2.2.0",
"@prosopo/locale-browser": "2.2.0",
"@prosopo/procaptcha-frictionless": "2.2.0",
"@prosopo/procaptcha-pow": "2.2.0",
"@prosopo/procaptcha-react": "2.2.0",
"@prosopo/server": "2.2.0",
"@prosopo/types": "2.2.0",
"@prosopo/vite-plugin-watch-workspace": "2.2.0",
"@types/react-dom": "18.3.0",
"@vitejs/plugin-react": "4.3.1",
"express": "4.21.1",
Expand All @@ -41,8 +41,8 @@
}
},
"devDependencies": {
"@prosopo/config": "2.1.16",
"@prosopo/dotenv": "2.1.16",
"@prosopo/config": "2.2.0",
"@prosopo/dotenv": "2.2.0",
"@types/node": "22.5.5",
"@vitest/coverage-v8": "2.1.1",
"concurrently": "9.0.1",
Expand Down
12 changes: 6 additions & 6 deletions demos/cypress-shared/package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"name": "@prosopo/cypress-shared",
"version": "2.1.16",
"version": "2.2.0",
"private": true,
"type": "module",
"engines": {
"node": "20",
"npm": ">=9"
},
"dependencies": {
"@prosopo/types": "2.1.16",
"@prosopo/util": "2.1.16",
"@prosopo/types": "2.2.0",
"@prosopo/util": "2.2.0",
"express": "4.21.1"
},
"devDependencies": {
"@cypress/xpath": "2.0.3",
"@prosopo/common": "2.1.16",
"@prosopo/datasets": "2.1.16",
"@prosopo/types-database": "2.1.16",
"@prosopo/common": "2.2.0",
"@prosopo/datasets": "2.2.0",
"@prosopo/types-database": "2.2.0",
"@types/node": "22.5.5",
"@vitest/coverage-v8": "2.1.1",
"concurrently": "9.0.1",
Expand Down
8 changes: 4 additions & 4 deletions demos/provider-mock/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prosopo/provider-mock",
"version": "2.1.16",
"version": "2.2.0",
"author": "PROSOPO LIMITED <info@prosopo.io>",
"license": "Apache-2.0",
"main": "./dist/index.js",
Expand All @@ -16,9 +16,9 @@
"build:cjs": "echo 'no cjs build'"
},
"dependencies": {
"@prosopo/common": "2.1.16",
"@prosopo/provider": "2.1.16",
"@prosopo/types": "2.1.16",
"@prosopo/common": "2.2.0",
"@prosopo/provider": "2.2.0",
"@prosopo/types": "2.2.0",
"cors": "2.8.5",
"express": "4.21.1"
},
Expand Down
8 changes: 4 additions & 4 deletions dev/config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prosopo/config",
"version": "2.1.16",
"version": "2.2.0",
"description": "Prosopo config library",
"main": "./dist/index.js",
"type": "module",
Expand Down Expand Up @@ -36,9 +36,9 @@
"@babel/plugin-transform-react-jsx": "7.25.2",
"@babel/plugin-transform-runtime": "7.25.4",
"@babel/preset-env": "7.25.4",
"@prosopo/common": "2.1.16",
"@prosopo/types": "2.1.16",
"@prosopo/util": "2.1.16",
"@prosopo/common": "2.2.0",
"@prosopo/types": "2.2.0",
"@prosopo/util": "2.2.0",
"@rollup/plugin-alias": "5.1.0",
"@rollup/plugin-babel": "6.0.4",
"@rollup/plugin-commonjs": "26.0.1",
Expand Down
1 change: 1 addition & 0 deletions dev/config/src/vite/vite.test.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import { defineConfig } from "vitest/config";
import VitePluginCloseAndCopy from "./vite-plugin-close-and-copy.js";
import VitePluginSourcemapExclude from "./vite-plugin-sourcemap-exclude.js";
Expand Down
10 changes: 5 additions & 5 deletions dev/flux/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prosopo/flux",
"version": "2.1.16",
"version": "2.2.0",
"description": "Tools for managing Flux deployment",
"main": "dist/index.js",
"bin": {
Expand All @@ -24,10 +24,10 @@
"@noble/curves": "1.6.0",
"@polkadot/util": "12.6.2",
"@polkadot/util-crypto": "12.6.2",
"@prosopo/common": "2.1.16",
"@prosopo/config": "2.1.16",
"@prosopo/dotenv": "2.1.16",
"@prosopo/util": "2.1.16",
"@prosopo/common": "2.2.0",
"@prosopo/config": "2.2.0",
"@prosopo/dotenv": "2.2.0",
"@prosopo/util": "2.2.0",
"express": "4.21.1",
"openpgp": "5.11.2",
"qs": "6.13.0",
Expand Down
2 changes: 1 addition & 1 deletion dev/gh-actions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prosopo/gh-actions",
"version": "2.1.16",
"version": "2.2.0",
"description": "",
"private": true,
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions dev/lint/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prosopo/lint",
"version": "2.1.16",
"version": "2.2.0",
"description": "",
"private": true,
"scripts": {
Expand Down Expand Up @@ -37,7 +37,7 @@
"npm": ">=9"
},
"dependencies": {
"@prosopo/util": "2.1.16",
"@prosopo/util": "2.2.0",
"express": "4.21.1",
"fast-glob": "3.3.2",
"zod": "3.23.8"
Expand Down
2 changes: 1 addition & 1 deletion dev/prosoponator-bot/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@prosopo/prosoponator-bot",
"version": "2.1.16",
"version": "2.2.0",
"description": "",
"private": true,
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion dev/scripts/env.development
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ PROSOPO_DEFAULT_ENVIRONMENT=development
PROSOPO_LOG_LEVEL=debug
PROSOPO_MONGO_CAPTCHA_URI=
PROSOPO_MONGO_EVENTS_URI=mongodb+srv://<MONGO_URI_HERE>/frictionless_events
PROSOPO_PACKAGE_VERSION=2.1.16
PROSOPO_PACKAGE_VERSION=2.2.0
PROSOPO_PROVIDER_ACCOUNT_PASSWORD=
PROSOPO_PROVIDER_ADDRESS=5EjTA28bKSbFPPyMbUjNtArxyqjwq38r1BapVmLZShaqEedV
PROSOPO_PROVIDER_JSON=
Expand Down
2 changes: 1 addition & 1 deletion dev/scripts/env.production
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ PROSOPO_DEFAULT_ENVIRONMENT=production
PROSOPO_LOG_LEVEL=info
PROSOPO_MONGO_CAPTCHA_URI=
PROSOPO_MONGO_EVENTS_URI=mongodb+srv://<MONGO_URI_HERE>/frictionless_events
PROSOPO_PACKAGE_VERSION=2.1.16
PROSOPO_PACKAGE_VERSION=2.2.0
PROSOPO_PROVIDER_ACCOUNT_PASSWORD=
PROSOPO_PROVIDER_ADDRESS=
PROSOPO_PROVIDER_JSON=
Expand Down
Loading

0 comments on commit 24c2ccb

Please sign in to comment.