erra
Version:
mock工具
56 lines • 1.8 kB
YAML
SERVICE_CONFIG:
httpPort: 3344
httpsPort: 4455
snippet:
735215e6-5c00-4443-8ce9-83d7382e9e02:
id: 735215e6-5c00-4443-8ce9-83d7382e9e02
name: Forward-Meituan
when: !<tag:yaml.org,2002:js/regexp> /meituan.com/
content:
headers:
host: www.mocky.io
url: /v2/5185415ba171ea3a00704eed
enabled: false
6353c69c-e1e6-4b34-a61a-c44271fce483:
id: 6353c69c-e1e6-4b34-a61a-c44271fce483
name: Simple-Demo
when: !<tag:yaml.org,2002:js/undefined> ''
content:
body:
hello: Erra!
fa48a039-7186-4308-b32a-21aa268fddc4:
id: fa48a039-7186-4308-b32a-21aa268fddc4
name: Mockjs-Random
when: !<tag:yaml.org,2002:js/undefined> ''
content:
body:
$mockjs hello: '@str'
594f64b2-e795-4c15-9359-5da8e2b5c800:
id: 594f64b2-e795-4c15-9359-5da8e2b5c800
name: Include-Snippet
when: !<tag:yaml.org,2002:js/undefined> ''
content:
body:
code: 200
$snippet include: Simple-Demo|6353c69c-e1e6-4b34-a61a-c44271fce483
a1a16ba9-7fb8-4fd3-9fa2-cfac11301846:
id: a1a16ba9-7fb8-4fd3-9fa2-cfac11301846
name: Inject-Eruda
when: !<tag:yaml.org,2002:js/undefined> ''
content:
headers:
content-security-policy: ''
body: !<!expression> >-
V.replace(/(<body.*?>)/,
'$1<script>window.define=undefined</script><script
src="//cdn.bootcss.com/eruda/1.5.2/eruda.min.js"></script><script>eruda.init();</script>')
4df3f3ae-7b3f-41fe-b62b-e34c58177eb9:
id: 4df3f3ae-7b3f-41fe-b62b-e34c58177eb9
name: Inject-Erra
when: !<tag:yaml.org,2002:js/undefined> ''
content:
body: !<!expression> >-
V.replace(/(<body.*?>)/, '$1<script
src="https://localhost:4455/erra/erra-portal.js"></script>')
breakpoint:
apiBindSnippet: