cf-workers-deployer
v1.0.3
Published
A reverse engineering library that simulates deployment links in Cloudflare Workers Playground
Downloads
2
Maintainers
Readme
cf-workers-deployer
A reverse engineering library that simulates deployment links in Cloudflare Workers Playground.
Installation
# use npm
npm install cf-workers-deployer
# use pnpm
pnpm install cf-workers-deployer
Usage
import { compressFile, getDeployUrl } from 'cf-workers-deployer';
const compressedFiles = compressFile({
fileData:[
{
"name": "index.js", // File Name
"fileName": "index.js", // File path
"data": "console.log('Hello World')", // File Data
"type": "text/javascript" // Content Type
}
],
mainModule: "index.js" // Main Module file path
})
console.log(compressedFiles) // Returns a string that can be deployed via cloudflare worker playground
const deployUrl = getDeployUrl({fileData:...}) // Returns a deploy url
Features
- Convert files to strings that can be deployed via cloudflare worker playground
- Create URL to deploy
Contributing
Reporting Issues
If you find a bug or have a suggestion for improvement:
- Check if the issue has already been reported.
- If not, create a new issue.
- Clearly describe the issue, including steps to reproduce if applicable.
Submitting Pull Requests
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Write or adapt tests as needed.
- Run the test suite to ensure everything still passes.
- Commit your changes (
git commit -am 'Add some feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.
Author
License
MIT