A reverse engineering library that simulates deployment links in Cloudflare Workers Playground.
# use npm
npm install cf-workers-deployer
# use pnpm
pnpm install cf-workers-deployer
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
- Convert files to strings that can be deployed via cloudflare worker playground
- Create URL to deploy
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.
- 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.
MIT