Skip to content

Commit

Permalink
Merge branch 'staging' into deprecated-actions-cache-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
goastler committed Jan 6, 2025
2 parents 2c18abe + db8c113 commit 20df646
Show file tree
Hide file tree
Showing 121 changed files with 24,822 additions and 21,855 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,32 +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" />
<div class="procaptcha" data-sitekey="5FWCbfR7pH9QiZqLgmm5Rw4QbFwyU5EaMqUV4G6xrvrTZDtC"></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.15",
"version": "2.2.3",
"devDependencies": {
"@prosopo/dotenv": "2.1.15",
"@prosopo/dotenv": "2.2.3",
"@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.15",
"version": "2.2.3",
"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.15",
"@prosopo/contract": "2.1.15",
"@prosopo/dotenv": "2.1.15",
"@prosopo/server": "2.1.15",
"@prosopo/types": "2.1.15",
"@prosopo/util": "2.1.15",
"@prosopo/common": "2.2.3",
"@prosopo/contract": "2.2.3",
"@prosopo/dotenv": "2.2.3",
"@prosopo/server": "2.2.3",
"@prosopo/types": "2.2.3",
"@prosopo/util": "2.2.3",
"@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.15",
"@prosopo/config": "2.2.3",
"@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.15",
"version": "2.2.3",
"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.15",
"@prosopo/locale-browser": "2.1.15",
"@prosopo/procaptcha-frictionless": "2.1.15",
"@prosopo/procaptcha-pow": "2.1.15",
"@prosopo/procaptcha-react": "2.1.15",
"@prosopo/server": "2.1.15",
"@prosopo/types": "2.1.15",
"@prosopo/vite-plugin-watch-workspace": "2.1.15",
"@prosopo/common": "2.2.3",
"@prosopo/locale-browser": "2.2.3",
"@prosopo/procaptcha-frictionless": "2.2.3",
"@prosopo/procaptcha-pow": "2.2.3",
"@prosopo/procaptcha-react": "2.2.3",
"@prosopo/server": "2.2.3",
"@prosopo/types": "2.2.3",
"@prosopo/vite-plugin-watch-workspace": "2.2.3",
"@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.15",
"@prosopo/dotenv": "2.1.15",
"@prosopo/config": "2.2.3",
"@prosopo/dotenv": "2.2.3",
"@types/node": "22.5.5",
"@vitest/coverage-v8": "2.1.1",
"concurrently": "9.0.1",
Expand Down
2 changes: 1 addition & 1 deletion demos/cypress-shared/cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function clickIAmHuman(): Cypress.Chainable<Captcha[]> {
}

function captchaImages(): Cypress.Chainable<JQuery<HTMLElement>> {
return getWidgetElement("p").then(($p) => {
return getWidgetElement(".prosopo-modalInner p").then(($p) => {
const $pWithText = $p.filter((index, el) => {
return Cypress.$(el).text().includes("all containing");
});
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.15",
"version": "2.2.3",
"private": true,
"type": "module",
"engines": {
"node": "20",
"npm": ">=9"
},
"dependencies": {
"@prosopo/types": "2.1.15",
"@prosopo/util": "2.1.15",
"@prosopo/types": "2.2.3",
"@prosopo/util": "2.2.3",
"express": "4.21.1"
},
"devDependencies": {
"@cypress/xpath": "2.0.3",
"@prosopo/common": "2.1.15",
"@prosopo/datasets": "2.1.15",
"@prosopo/types-database": "2.1.15",
"@prosopo/common": "2.2.3",
"@prosopo/datasets": "2.2.3",
"@prosopo/types-database": "2.2.3",
"@types/node": "22.5.5",
"@vitest/coverage-v8": "2.1.1",
"concurrently": "9.0.1",
Expand Down
4 changes: 2 additions & 2 deletions demos/ios-webview/procaptcha.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@
"INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = 14.5;
IPHONEOS_DEPLOYMENT_TARGET = 16.4;
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 13.3;
Expand Down Expand Up @@ -315,7 +315,7 @@
"INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = 14.5;
IPHONEOS_DEPLOYMENT_TARGET = 16.4;
LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 13.3;
Expand Down
8 changes: 5 additions & 3 deletions demos/ios-webview/procaptcha/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@ struct WebView: UIViewRepresentable {

let webView = WKWebView(frame: .zero, configuration: webViewConfiguration)
webView.navigationDelegate = context.coordinator
//webView.isInspectable = true
webView.isInspectable = true

//DispatchQueue.main.asyncAfter(deadline: .now() + 30) {
webView.loadHTMLString(htmlString, baseURL: nil)
// baseURL must be set for localstorage to work. If localstorage is not required, it can be set to nil. Localstorage errors appear like "SecurityError: The operation is insecure."
webView.loadHTMLString(htmlString, baseURL: URL(string: "https://prosopo.io"))
//}

return webView
Expand Down Expand Up @@ -99,7 +100,8 @@ struct ContentView: View {
<form action="" method="POST">
<input type="text" name="email" placeholder="Email" />
<input type="password" name="password" placeholder="Password" />
<div class="procaptcha" data-sitekey="5FWCbfR7pH9QiZqLgmm5Rw4QbFwyU5EaMqUV4G6xrvrTZDtC"></div>
<p>image</p>
<div class="procaptcha" data-sitekey="5FWCbfR7pH9QiZqLgmm5Rw4QbFwyU5EaMqUV4G6xrvrTZDtC" data-captcha-type="image"></div>
<br />
<input type="submit" value="Submit" />
</form>
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.15",
"version": "2.2.3",
"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.15",
"@prosopo/provider": "2.1.15",
"@prosopo/types": "2.1.15",
"@prosopo/common": "2.2.3",
"@prosopo/provider": "2.2.3",
"@prosopo/types": "2.2.3",
"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.15",
"version": "2.2.3",
"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.15",
"@prosopo/types": "2.1.15",
"@prosopo/util": "2.1.15",
"@prosopo/common": "2.2.3",
"@prosopo/types": "2.2.3",
"@prosopo/util": "2.2.3",
"@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.15",
"version": "2.2.3",
"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.15",
"@prosopo/config": "2.1.15",
"@prosopo/dotenv": "2.1.15",
"@prosopo/util": "2.1.15",
"@prosopo/common": "2.2.3",
"@prosopo/config": "2.2.3",
"@prosopo/dotenv": "2.2.3",
"@prosopo/util": "2.2.3",
"express": "4.21.1",
"openpgp": "5.11.2",
"qs": "6.13.0",
Expand Down
Loading

0 comments on commit 20df646

Please sign in to comment.