Skip to content

Commit

Permalink
update miniflare extension to properly work with v3 (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukqw authored Nov 15, 2023
1 parent c15b7b3 commit ed1cf85
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions miniflare/miniflare/cloudflare_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ def handle_services(request: Request, account_id: str, service_name: str) -> dic
}
)

def handle_standard(request: Request, account_id: str) -> dict:
return _wrap({})

def handle_subdomain(request: Request, account_id: str) -> dict:
return _wrap({})
Expand Down
4 changes: 3 additions & 1 deletion miniflare/miniflare/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
handle_scripts,
handle_secrets,
handle_services,
handle_standard,
handle_subdomain,
handle_user,
)
Expand Down Expand Up @@ -54,6 +55,7 @@ def _add_route(path, handler):
"/accounts/<account_id>/workers/services/<service_name>", handle_services
)
_add_route("/accounts/<account_id>/workers/subdomain", handle_subdomain)
_add_route("/accounts/<account_id>/workers/standard", handle_standard)
_add_route(
"/accounts/<account_id>/workers/scripts/<script_name>/subdomain",
handle_script_subdomain,
Expand Down Expand Up @@ -125,7 +127,7 @@ def _install(self, target: InstallTarget) -> None:
# note: latest version of miniflare/workerd requires libc++ dev libs
if config.is_in_docker:
sources_list_file = "/etc/apt/sources.list"
sources_list = load_file(sources_list_file)
sources_list = load_file(sources_list_file) or ""
sources_list += "\ndeb https://deb.debian.org/debian testing main contrib"
save_file(sources_list_file, sources_list)
run(["apt", "update"])
Expand Down

0 comments on commit ed1cf85

Please sign in to comment.