Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a massive pipe for the purposes of testing code => json => json #9

Open
dzwillia opened this issue May 10, 2018 · 0 comments
Open
Assignees

Comments

@dzwillia
Copy link
Member

I'm thrilled we have the test suite up and running for the JS SDK. This is incredibly important to lock down the SDK and make it completely solid. I think it would be helpful to also have a massive pipe that contains a long chain of all available tasks (that would be kept up-to-date) so that we can see what the translation to JSON and reverse translation to code looks like. This is pretty important since we're only storing the task JSON in the pipe and we use the reverse translation to render the code back to the user in the web app. You can see an example of what I'm referring to in the attached screenshot.

Something along the lines of this:

Flexio.pipe()
  .connect({
    "alias": "source",
    "connection": "my-connection"
  })
  .convert("json", "table")
  .copy("source", "target")
  .create("path", ["col1", "col2"])
  .dump("dump")
  .echo("echo")
  .email({
    "to": "[email protected]",
    "subject": "my subject",
    "body": "this is the message",
    "html": "this is the html message"
  })
  .javascript(function(context) {
    return "this is javascript"
  })
  .filter("my-filter")
  .limit(50)
  .list("/my/path")
  .read('/my-path')
  .render("https://www.flex.io")
  .request("https://httpbin.org/ip")
  .select(["col1", "col2"])
  .sleep(500)
  .write("/my-path")

code-to-json-to-code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants