cloudflare / serverless-cloudflare-workers

Serverless provider plugin for Cloudflare Workers
BSD 3-Clause "New" or "Revised" License
175 stars 37 forks source link

Refactor single script and add support for namespaces #18

Closed GregBrimble closed 5 years ago

GregBrimble commented 5 years ago

Workers KV namespace storage weren't supported on single scripts, and a lot of the code between multi and single scripts was duplicated.

This renames the shared/multiscript.js file to shared/allScripts.js, and uses that code in deploy/lib/singlescript.js. Consequentially, single scripts now support Workers KV.

GregBrimble commented 5 years ago

Actually, this breaks route deployment of single scripts due to lack of support in cloudflare-workers-toolkit. My bad. I'll work on fixing this, and then come back with another PR.