Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Readme
yamlbundler
is a useful command that bundles multiple YAML files into a single file.
It finds !include
tag in a YAML file and replaces it with the contents of another YAML file.
pip install yamlbundler
Save these files in your working directory.
# ./main.yaml
# include entire file
a: !include ./sub1.yaml # relative path from the parent directory of main.yaml
b: !include
filepath: ./sub2.yaml
# include specific value using jsonpath
c: !include
filepath: ./sub1.yaml
jsonpath: $.foo
# include multiple files
# Array elements are flattened.
d: !include
- filepath: ./sub1.yaml
- filepath: ./sub2.yaml
# include multiple files
# If all of them are map elements, they are merged into a single map.
e: !include
- filepath: ./sub1.yaml
- filepath: ./sub3.yaml
# ./sub1.yaml
foo: bar
# ./sub2.yaml
- one
- two
# ./sub3.yaml
hoge: !include
# relative path from the parent directory of sub3.yaml (not main.yaml)
filepath: ./sub2.yaml
jsonpath: $[0]
Then, run this command. The result is shown in your terminal as STDOUT. Comments in original YAML are removed.
yamlbundler ./main.yaml
# a:
# foo: bar
# b:
# - one
# - two
# c: bar
# d:
# - foo: bar
# - one
# - two
# e:
# foo: bar
# hoge: one
You can save the result as a new file using --output
parameter.
If you want to overwrite the original file, use --inplace
parameter.
yamlbundler --output ./result.yaml ./main.yaml
yamlbundler --inplace ./main.yaml
If you find any bugs, please feel free to create an issue.
FAQs
Unknown package
We found that yamlbundler demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.