GithubHelp home page GithubHelp logo

replit / crosis Goto Github PK

View Code? Open in Web Editor NEW
110.0 110.0 21.0 2.04 MB

A JavaScript client that speaks Replit's container protocol

License: MIT License

JavaScript 5.35% TypeScript 94.17% HTML 0.08% Nix 0.41%
containers protobuf3 repl

crosis's People

Contributors

airportyh avatar alex-4ed5ec60d avatar brenoafb avatar dependabot[bot] avatar donno2048 avatar frantic avatar gburtini avatar jakehamilton avatar lhchavez avatar lincoln-replit avatar masad-frost avatar miselin avatar moudy avatar sergeichestakov avatar turbio avatar xyc avatar

Stargazers

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

Watchers

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

crosis's Issues

Repl name

Uh, this doesn't really matter, and I'm sorry that I'm bothering you, but I just wanted to let you know that the description should be replit, not repl.it.

Thanks and sorry!

[RFC] Don't throw when channel closes during Channel::request

Right now when you send a request and the channel closes; whether it is due to client closing or calling channel.close we throw an error for that promise. I think it would be cleaner if we just returned something instead.

Which means if you want to handle that instance you need to put channe.request in a try catch, catch the error

This is common in our codebase, it's ugly and tedious!

let res
try {
  res = channel.request({ ... })
} catch (e) {
  if (/* assert if error is channel closed */) {
    handleChannelClosed();
    return;
  }

  throw e;
}

Not sure if this makes sense but I'm thinking this is better than throwing.

enum ChannelCloseReason {
  ClientClosed, // this means you called `Client::close`
  ClientDisconnect, // this means the websocket died unexpectedly
  ChannelClosed, // this means you called `Channel::close`
}

type RequestResult =
  | api.Command
  | { channelClosed: ChannelCloseReason; closeStatus: null }
  | { channelClosed: ChannelCloseReason.ChannelClosed; closeStatus: api.CloseChannelRes.Status };

interface Channel {
  request(cmd: api.Command): Promise<RequestResult>;
}

Move protobuffs to a separate repo

The JavaScript version can be published as a standalone package into NPM. This library can list it as a peer dependency (with minimum version).

The separate repo can also have bindings to different languages and publishes them to their respective package managers. Right now we use JavaScript and Go

Plugin Crashing the repl.it Console

Clearing the console with Ctrl+L keybinding twice results in a plugin crash with the following error message, probable front-end bug.

Error: TypeError: Cannot read property 'copyCellsFrom' of undefined

image

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.