Code Monkey home page Code Monkey logo

pd-convert-actions's People

Contributors

js07 avatar

Watchers

 avatar  avatar

pd-convert-actions's Issues

Convert "@pipedreamhq/platform" to "@pipedream/platform"

  • Convert require("@pipedreamhq/platform") to require("@pipedream/platform")
  • Pass $ as the first argument of @pipedream/platform axios

For example:
Before

return await require("@pipedreamhq/platform").axios(this, {

After

  async run({ $ }) {
    return await require("@pipedream/platform").axios($, {

Support conversion of non-app actions

Currently, legacy actions must include a namespace, title, description, version, code_config, code_raw, and hashId to be converted to a component action.

Support converting legacy actions from only the code_raw so that code steps in workflows can be converted using only the code. Allow the other parameters to be optional.

Props are missing labels

For example:

anonymousId: {
type: "string",
description: "A pseudo-unique substitute for a User ID, for cases when you donοΏ½t have an absolutely unique identifier. A userId or an anonymousId is required.",
optional: true,
},

In the legacy workflow builder, this prop's label is "AnonymousId`:
anonymousid

email_address: {
type: "string",
description: "Email address for a subscriber. This value is required only if the email address is not already present on the list.",
},

In the legacy workflow builder, this prop's label is "Email address":
email_address

Convert legacy code cell variables

  • $attachments -> steps.trigger.context.attachments
  • steps -> steps πŸ˜ƒ
  • event -> steps.trigger.event
  • $checkpoint (no replacement yet)
  • this.$checkpoint

[Bug] Reference error when a named export is reused in an action

In converted actions, references to named exports after $.export are left unconverted (i.e., referencing a variable that was removed). For example:

In legacy action:

this.projects = [];
this.projects.push("project1");
return this.projects;

In converted action (error ❌):

$.export("projects", []);
this.projects.push("project1");
return this.projects;

Desired βœ…:

let projects = [];
projects.push("project1");
$.export("projects", projects);
return projects;

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.