kalp_flatten_sol
v1.0.3
Published
`kalp_flatten_sol` is an npm package designed to flatten Solidity files from a zipped archive stored in an S3 bucket. The package extracts the `.sol` files from the archive, resolves all import dependencies, and provides a flattened, readable stream of th
Downloads
9
Readme
kalp_flatten_sol
kalp_flatten_sol
is an npm package designed to flatten Solidity files from a zipped archive stored in an S3 bucket. The package extracts the .sol
files from the archive, resolves all import dependencies, and provides a flattened, readable stream of the Solidity code.
Features
- S3 Integration: Seamlessly works with
.sol
files stored in S3 as compressed ZIP or TAR archives. - Flattening: Automatically flattens all Solidity files by resolving and merging imported dependencies.
- Index File Support: Requires the main Solidity file to be named
index.sol
within the archive, ensuring a structured and predictable output.
Installation
npm install kalp_flatten_sol
Usage
const { flattenSolidityFromS3 } = require('kalp_flatten_sol');
const s3Link = 'https://your-s3-bucket-link/path/to/solidity-archive.zip';
flattenSolidityFromS3(s3Link) .then(flattenedStream => { // Handle the flattened Solidity stream flattenedStream.pipe(process.stdout); // Example: Output to console }) .catch(err => { console.error('Error flattening Solidity files:', err); });