
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@enonic/esbuild-plugin-copy-with-hash
Advanced tools
An esbuild plugin to copy files adding hash and making manifest.json
npm install --save-dev @enonic/esbuild-plugin-copy-with-hash
import esbuild from 'esbuild'
import copyWithHashPlugin from 'esbuild-plugin-copy-with-hash';
await esbuild.build({
// ...
plugins: [
copyWithHashPlugin({
context: 'node_modules',
patterns: [
'react/{cjs,umd}/*.js',
'react-dom/{cjs,umd}/*.js',
]
})
],
// ...
})
import copyWithHashPlugin from 'esbuild-plugin-copy-with-hash';
export default defineConfig((options) => {
return {
// ...
esbuildPlugins: [
copyWithHashPlugin({
context: 'node_modules',
patterns: [
'react/{cjs,umd}/*.js',
'react-dom/{cjs,umd}/*.js',
]
})
],
// ...
}
}
options?.addHashesToFileNames
Type: Boolean
Default: true
Whether or not to add the content hashes to the filenames. This option does NOT affect the content of the manifest file.
options?.context
Type: String
Default: ''
options?.context
is relative to cwd()
.
options?.hash
Type: function
Default: (fileBuffer: Buffer) => bigint2base(xxh3.xxh64(fileBuffer), '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ')
The default hashing algorithm is xxh3.xxh64 with uppercase base36. This will typically yield a contenthash that is 12 to 13 characters long. You can provide your own hashing algorithm, keep in mind some filesystems are case "insensitive".
options?.manifest
Type: String
Default: 'manifest.json'
The path (relative to esbuildOptions.outdir
joined with options?.to
) to the generated manifest file.
options.patterns
Type: (string | { context?: string from: string to?: string })[]
A list of patterns (globs) to copy.
The glob is relative to cwd()
joined with options?.context
and pattern?.context
.
The pattern?.to
is relative to esbuildOptions.outdir
joined with options?.to
.
import esbuild from 'esbuild'
import copyWithHashPlugin from 'esbuild-plugin-copy-with-hash';
await esbuild.build({
// ...
plugins: [
copyWithHashPlugin({
context: 'node_modules',
patterns: [
'react/{cjs,umd}/*.js',
{
context: 'react-dom',
from: '/{cjs,umd}/*.js',
to: 'react-dom/'
}
],
to: 'subdir'
})
],
// ...
})
options?.to
Type: String
Default: ''
options?.to
is relative to esbuildOptions.outdir
.
MIT
FAQs
An esbuild plugin to copy files adding hash and making manifest.json
We found that @enonic/esbuild-plugin-copy-with-hash demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.