Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
cross-expand
Advanced tools
Expand glob patterns consistently across multiple platforms when executing command-line programs.
Windows CMD which is still the default in majority of cases doesn't support wildcard pattern expansion out of the box. Unlike in bash and similar unix shells, the patterns are provided to the program as they are.
This simple package unifies glob pattern expansion across platforms by delegating the resolution to glob. Expanded arguments are then passed to cross-env to ensure further cross-platform compatibility.
As usual:
npm install cross-expand --save-dev
or
yarn add cross-expand --dev
cross-expand <argument-offsets> <command> [arguments]
Compile all packages from a mono-repo using typescript compiler.
cross-expand 2 tsc -b "packages/**/tsconfig.json"
Note that 2
defines that the second argument passed to tsc
command should
be expanded. This makes the -b
forwarded directly to the command.
Important: Make sure you wrap the pattern in quotes to prevent it from being expanded by the shell itself.
<argument-offsets>
Unfortunately with cross-expand
we don't have the luxury of using quotes
to decide which arguments should be expanded and which not as we have with Unix
shells. That's why we have a dedicated leading argument tha defines this.
Value provided through this argument is one or more offsets of arguments that should
be expanded. The offset is 1-based and applies to the [arguments]
passed to the
actual command.
We currently support:
1
, 2
, 1,2
, , 1,2,6
1-5
, 1-3,5-7
5+
(applies to fifth and any further argument)<command>
The command that is to receive the expanded arguments. cross-expand
will call it
internally and pipe any output.
[arguments]
Arguments to pass to the <command>
. Depending on <argument-offets>
some of the
arguments will be expanded prior passing them to <command>
.
MIT
FAQs
Command line tool for cross-platform glob pattern expansion
The npm package cross-expand receives a total of 1 weekly downloads. As such, cross-expand popularity was classified as not popular.
We found that cross-expand demonstrated a not healthy version release cadence and project activity because the last version was released 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
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.