@crvouga/mockingbird-service-recaptcha 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/DISCOVERY.md +55 -0
- package/README.md +67 -0
- package/SUPPORT.md +12 -0
- package/dist/chunk-OVXONL7Z.js +823 -0
- package/dist/chunk-OVXONL7Z.js.map +7 -0
- package/dist/chunk-RHPRBUVS.js +3198 -0
- package/dist/chunk-RHPRBUVS.js.map +7 -0
- package/dist/cli.js +19 -0
- package/dist/cli.js.map +7 -0
- package/dist/index.d.ts +947 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +7 -0
- package/dist/server.d.ts +1389 -0
- package/dist/server.js +12 -0
- package/dist/server.js.map +7 -0
- package/openapi.yaml +56 -0
- package/package.json +119 -0
package/dist/server.js
ADDED
package/openapi.yaml
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
openapi: 3.1.0
|
|
2
|
+
info:
|
|
3
|
+
title: reCAPTCHA v3
|
|
4
|
+
version: v3
|
|
5
|
+
x-mockingbird-upstream:
|
|
6
|
+
url: https://developers.google.com/recaptcha/docs/verify
|
|
7
|
+
servers:
|
|
8
|
+
- url: https://www.google.com
|
|
9
|
+
paths:
|
|
10
|
+
/recaptcha/api.js:
|
|
11
|
+
get:
|
|
12
|
+
operationId: BrowserScript
|
|
13
|
+
parameters:
|
|
14
|
+
- name: render
|
|
15
|
+
in: query
|
|
16
|
+
schema: { type: string }
|
|
17
|
+
responses:
|
|
18
|
+
'200':
|
|
19
|
+
description: Local grecaptcha.ready/execute shim
|
|
20
|
+
content:
|
|
21
|
+
application/javascript:
|
|
22
|
+
schema: { type: string }
|
|
23
|
+
x-mockingbird:
|
|
24
|
+
supported: true
|
|
25
|
+
parity: { enabled: false, reason: Semantic shim, not Google's production script }
|
|
26
|
+
/recaptcha/api/siteverify:
|
|
27
|
+
post:
|
|
28
|
+
operationId: Siteverify
|
|
29
|
+
requestBody:
|
|
30
|
+
required: true
|
|
31
|
+
content:
|
|
32
|
+
application/x-www-form-urlencoded:
|
|
33
|
+
schema:
|
|
34
|
+
type: object
|
|
35
|
+
properties:
|
|
36
|
+
secret: { type: string, maxLength: 200 }
|
|
37
|
+
response: { type: string, maxLength: 2000 }
|
|
38
|
+
remoteip: { type: string, maxLength: 100 }
|
|
39
|
+
responses:
|
|
40
|
+
'200':
|
|
41
|
+
description: Verification result (including validation failures)
|
|
42
|
+
content:
|
|
43
|
+
application/json:
|
|
44
|
+
schema:
|
|
45
|
+
type: object
|
|
46
|
+
required: [success]
|
|
47
|
+
properties:
|
|
48
|
+
success: { type: boolean }
|
|
49
|
+
score: { type: number, minimum: 0, maximum: 1 }
|
|
50
|
+
action: { type: string }
|
|
51
|
+
hostname: { type: string }
|
|
52
|
+
challenge_ts: { type: string, format: date-time }
|
|
53
|
+
error-codes: { type: array, items: { type: string } }
|
|
54
|
+
x-mockingbird:
|
|
55
|
+
supported: true
|
|
56
|
+
parity: { enabled: true, safe: true }
|
package/package.json
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@crvouga/mockingbird-service-recaptcha",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Deterministic reCAPTCHA v3 browser shim and single-use Siteverify mock.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"README.md",
|
|
11
|
+
"CHANGELOG.md",
|
|
12
|
+
"DISCOVERY.md",
|
|
13
|
+
"SUPPORT.md",
|
|
14
|
+
"openapi.yaml"
|
|
15
|
+
],
|
|
16
|
+
"main": "./dist/index.js",
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"default": "./dist/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./server": {
|
|
24
|
+
"types": "./dist/server.d.ts",
|
|
25
|
+
"default": "./dist/server.js"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"bin": {
|
|
29
|
+
"mockingbird-recaptcha": "./dist/cli.js"
|
|
30
|
+
},
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"access": "public",
|
|
33
|
+
"provenance": true
|
|
34
|
+
},
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "git+https://github.com/crvouga/mockingbird.git",
|
|
38
|
+
"directory": "packages/service/recaptcha"
|
|
39
|
+
},
|
|
40
|
+
"homepage": "https://github.com/crvouga/mockingbird/tree/main/packages/service/recaptcha#readme",
|
|
41
|
+
"keywords": [
|
|
42
|
+
"mockingbird",
|
|
43
|
+
"service",
|
|
44
|
+
"recaptcha",
|
|
45
|
+
"captcha"
|
|
46
|
+
],
|
|
47
|
+
"mockingbird": {
|
|
48
|
+
"runtime": "portable",
|
|
49
|
+
"entries": {
|
|
50
|
+
"server": "node",
|
|
51
|
+
"cli": "node"
|
|
52
|
+
},
|
|
53
|
+
"layer": "service",
|
|
54
|
+
"category": "identity",
|
|
55
|
+
"displayName": "reCAPTCHA",
|
|
56
|
+
"vendor": {
|
|
57
|
+
"website": "https://www.google.com/recaptcha/about/",
|
|
58
|
+
"docs": "https://developers.google.com/recaptcha/docs/v3",
|
|
59
|
+
"description": "Google reCAPTCHA verifies browser challenges and supplies risk scores.",
|
|
60
|
+
"icon": false
|
|
61
|
+
},
|
|
62
|
+
"parity": "v3 browser API and token verification",
|
|
63
|
+
"parityTier": "cold",
|
|
64
|
+
"status": "wip",
|
|
65
|
+
"discovery": {
|
|
66
|
+
"guide": "DISCOVERY.md",
|
|
67
|
+
"behavior": "README.md",
|
|
68
|
+
"capabilities": "SUPPORT.md",
|
|
69
|
+
"contract": "openapi.yaml",
|
|
70
|
+
"types": "dist/index.d.ts",
|
|
71
|
+
"oracle": {
|
|
72
|
+
"kind": "Live vendor API or sandbox",
|
|
73
|
+
"command": "bun run parity:service -- recaptcha",
|
|
74
|
+
"note": "Run from a Mockingbird checkout; credentials come only from .env.local or GitHub Actions secrets. Missing credentials exit 2."
|
|
75
|
+
},
|
|
76
|
+
"introspection": [
|
|
77
|
+
"GET /__admin/health",
|
|
78
|
+
"GET /__admin",
|
|
79
|
+
"GET /__admin/state",
|
|
80
|
+
"GET /__admin/requests",
|
|
81
|
+
"GET /__admin/metrics",
|
|
82
|
+
"GET /__admin/faults/presets",
|
|
83
|
+
"GET /__admin/ui"
|
|
84
|
+
],
|
|
85
|
+
"reporting": "https://github.com/crvouga/mockingbird/blob/main/docs/REPORTING_ISSUES.md"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"scripts": {
|
|
89
|
+
"generate": "bun ../../openapi/codegen/dist/cli.js",
|
|
90
|
+
"generate:check": "bun ../../openapi/codegen/dist/cli.js --check",
|
|
91
|
+
"openapi:check": "bun ../../openapi/codegen/dist/cli.js --validate",
|
|
92
|
+
"build": "bun ../../../scripts/bundle-service.ts",
|
|
93
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
94
|
+
"lint": "biome check .",
|
|
95
|
+
"test": "bun test",
|
|
96
|
+
"parity": "bun scripts/parity.ts",
|
|
97
|
+
"portability": "bun ../../../scripts/portability.ts",
|
|
98
|
+
"pack:check": "bun ../../../scripts/pack-check.ts"
|
|
99
|
+
},
|
|
100
|
+
"dependencies": {
|
|
101
|
+
"@crvouga/mockingbird-service-sqlite": "2.1.1",
|
|
102
|
+
"hono": "4.11.9"
|
|
103
|
+
},
|
|
104
|
+
"devDependencies": {
|
|
105
|
+
"fast-check": "4.9.0",
|
|
106
|
+
"@crvouga/mockingbird-testing": "0.1.0",
|
|
107
|
+
"@crvouga/mockingbird-service-sqlite": "0.0.0-development",
|
|
108
|
+
"@crvouga/mockingbird-parity": "0.0.0-development",
|
|
109
|
+
"@crvouga/mockingbird-credentials": "0.0.0-development",
|
|
110
|
+
"@crvouga/mockingbird-openapi-codegen": "0.1.0",
|
|
111
|
+
"@crvouga/mockingbird-openapi-metadata": "0.0.0-development",
|
|
112
|
+
"@crvouga/mockingbird-core": "0.0.0-development",
|
|
113
|
+
"@crvouga/mockingbird-sqlite": "0.0.0-development",
|
|
114
|
+
"@crvouga/mockingbird-openapi": "0.0.0-development",
|
|
115
|
+
"@crvouga/mockingbird-service": "0.0.0-development",
|
|
116
|
+
"@crvouga/mockingbird-http-codec": "0.0.0-development",
|
|
117
|
+
"@crvouga/mockingbird-adapter-node": "0.0.0-development"
|
|
118
|
+
}
|
|
119
|
+
}
|