Skip to content

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

@dzwillia

Description

@dzwillia

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": "my@email.com",
    "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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions