GithubHelp home page GithubHelp logo

cloudflare / lasso Goto Github PK

View Code? Open in Web Editor NEW
12.0 12.0 4.0 29 KB

A Worker that caches wrangler's binary dependencies, so you can install wrangler if NPM or GitHub are having a bad day.

License: Apache License 2.0

JavaScript 100.00%
workers

lasso's People

Contributors

gabbifish avatar gregbrimble avatar ispivey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lasso's Issues

Deploy with a GitHub action

The three lasso Workers are currently deployed manually, when someone clones the repo and runs wrangler publish. We should use a GitHub Action instead.

store binaries in kv

first check kv
if not in kv go to github
if found in github store in kv
if not in kv or github, return error

Caching worker returning 500s instead of wrangler binary

Several issues in wrangler have surfaced due to this. I haven't been able to reproduce the failure from the production worker https://workers.cloudflare.com/get-npm-wrangler-binary/1.10.3/x86_64-apple-darwin, though others have.

I cloned lasso and wrangler publish the caching worker to https://natdavidson.com/cache-wrangler-bin. Hitting https://natdavidson.com/cache-wrangler-bin/1.11.0/x86_64-apple-darwin in the browser produces could not find cache-wrangler-bin/1.11.0/x86_64-apple-darwin/index.html in your content namespace. curling the url returns

HTTP/2 500
date: Wed, 14 Oct 2020 16:29:12 GMT
content-type: text/plain;charset=UTF-8
content-length: 92
set-cookie: __cfduid=d260f6729ff3a3658aaffbe2596a194a41602692952; expires=Fri, 13-Nov-20 16:29:12 GMT; path=/; domain=.natdavidson.com; HttpOnly; SameSite=Lax; Secure
cf-request-id: 05c98aca66000029dee0181000000001
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report?lkg-colo=16&lkg-time=1602692953"}],"group":"cf-nel","max_age":604800}
nel: {"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 5e22ad8a394a29de-IAD

wrangler tail doesn't log anything.

move to one worker

there's lots of shared logic, no reason for three endpoints to be three different workers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.