oia monorepo.
Package | Version | Changelog | License |
---|---|---|---|
babel-plugin-auto-logger | CHANGELOG | MIT | |
amiddy | CHANGELOG | MIT |
JavaScript monorepo
I'm loving the babel auto logger. It's super helpful. I'm not seeing how to log the arguments for non-catch block calls. Is that possible? Thanks!
Ability to use a base configuration for defaults and placeholders and a specific config where you can define placeholder values.
For amiddy, there is the ability to use a config file to define how the middleware will work.
There is the use-case where you have multiple environments for your application, and your configurations are just a copy/paste with minor changes.
Let's take an example. You are working for an Application that has 3 environments: acceptance, staging & production.
There should be 3 amiddy configs:
amiddy.acceptance.json
:
{
"source": {
"ip": "127.0.0.1",
"https": true,
"port": 443
},
"deps": [
{
"name": "acceptance.gateway.example.com",
"https": true,
"port": 443,
"patterns": [
"/login",
"/logout",
"/api/**"
],
"mocks": [
{
"patterns": ["info**"],
"response": "",
"status": 200,
"fixture": "__local__/info.txt"
}
]
}
],
"proxy": {
"response": {
"headers": {
"X-Special-Proxy-Header": "on-response"
}
}
},
"vhost": {
"name": "acceptance.example.com",
"https": true,
"port": 443
}
}
amiddy.staging.json
:
{
"source": {
"ip": "127.0.0.1",
"https": true,
"port": 443
},
"deps": [
{
"name": "staging.gateway.example.com",
"https": true,
"port": 443,
"patterns": [
"/login",
"/logout",
"/api/**"
],
"mocks": [
{
"patterns": ["info**"],
"response": "",
"status": 200,
"fixture": "__local__/info.txt"
}
]
}
],
"proxy": {
"response": {
"headers": {
"X-Special-Proxy-Header": "on-response"
}
}
},
"vhost": {
"name": "staging.example.com",
"https": true,
"port": 443
}
}
amiddy.production.json
:
{
"source": {
"ip": "127.0.0.1",
"https": true,
"port": 443
},
"deps": [
{
"name": "production.gateway.example.com",
"https": true,
"port": 443,
"patterns": [
"/login",
"/logout",
"/api/**"
],
"mocks": [
{
"patterns": ["info**"],
"response": "",
"status": 200,
"fixture": "__local__/info.txt"
}
]
}
],
"proxy": {
"response": {
"headers": {
"X-Special-Proxy-Header": "on-response"
}
}
},
"vhost": {
"name": "production.example.com",
"https": true,
"port": 443
}
}
Now, what if I need to:
I would need to change all 3 files every time and to add/remove the same stuff.
Example, based on the above data:
base.amiddy.json
{
"source": {
"ip": "127.0.0.1",
"https": true,
"port": 443
},
"deps": [
{
"name": "__DEP_NAME__",
"https": true,
"port": 443,
"patterns": [
"/login",
"/logout",
"/api/**"
],
"mocks": [
{
"patterns": ["info**"],
"response": "",
"status": 200,
"fixture": "__local__/info.txt"
}
]
}
],
"proxy": {
"response": {
"headers": {
"X-Special-Proxy-Header": "on-response"
}
}
},
"vhost": {
"name": "__VHOST_NAME__",
"https": true,
"port": 443
}
}
amiddy.acceptance.json
:
{
"__DEP_NAME__": "acceptance.gateway.example.com",
"__VHOST_NAME__": "acceptance.example.com"
}
staging.production.json
:
{
"__DEP_NAME__": "staging.gateway.example.com",
"__VHOST_NAME__": "staging.example.com"
}
amiddy.production.json
:
{
"__DEP_NAME__": "production.gateway.example.com",
"__VHOST_NAME__": "production.example.com"
}
If we are to answer the same questions are presented initially we need to change only the base config.
This implementation should not affect in any way existing behavior
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.