From 3dd4dc036f4a4593693dff04d7cb378a5c6b9019 Mon Sep 17 00:00:00 2001 From: "Dylan J. Sather" Date: Wed, 12 Jan 2022 11:03:03 -0800 Subject: [PATCH 01/51] Changing docs root to prep for docs changes --- docs/docs/.vuepress/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/.vuepress/config.js b/docs/docs/.vuepress/config.js index 9b931892c7db8..b09053e1ecc4b 100644 --- a/docs/docs/.vuepress/config.js +++ b/docs/docs/.vuepress/config.js @@ -5,7 +5,7 @@ module.exports = { title: "", head: [["link", { rel: "icon", href: "/favicon.ico" }]], description: "Pipedream Documentation - Connect APIs, remarkably fast", - base: "/docs/", + base: "/docs-v2/", plugins: [ [ "vuepress-plugin-canonical", From 0c37aebfc8bfe0a174192cd596788b332e5a3ef9 Mon Sep 17 00:00:00 2001 From: "Dylan J. Sather" Date: Wed, 12 Jan 2022 11:06:51 -0800 Subject: [PATCH 02/51] Committing new vercel.json to handle pathing --- docs/vercel.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/vercel.json b/docs/vercel.json index 6ac319b8a8e7a..49a555edd5978 100644 --- a/docs/vercel.json +++ b/docs/vercel.json @@ -1,11 +1,11 @@ { "rewrites": [ { - "source": "/docs", + "source": "/docs-v2", "destination": "/" }, { - "source": "/docs/(.*)", + "source": "/docs-v2/(.*)", "destination": "/$1" } ], From 81738b885227e55fbc6d2dffffde54d399d86784 Mon Sep 17 00:00:00 2001 From: Dylan Pierce Date: Fri, 14 Jan 2022 16:18:49 -0500 Subject: [PATCH 03/51] Moving to a sub-language navigation and adding Python examples --- docs/docs/.vuepress/config.js | 78 +++++++--- docs/docs/code/README.md | 20 +++ docs/docs/code/bash/README.md | 1 + docs/docs/code/go/README.md | 6 + .../steps/code => code/nodejs}/README.md | 24 +-- .../code => code/nodejs}/async/README.md | 0 .../steps/code => code/nodejs}/auth/README.md | 0 .../nodejs}/auth/images/auths-property.png | Bin .../images/run-node-js-code-with-slack.png | Bin .../auth/images/run-node-with-slack.png | Bin .../nodejs}/auth/images/search-for-slack.png | Bin .../auth/images/slack-test-request.png | Bin .../nodejs}/auth/images/slack-token.png | Bin .../code/nodejs/http-requests/README.md | 0 .../nodejs}/images/console-dir.png | Bin .../nodejs}/images/console-log-error.png | Bin .../nodejs}/images/dollar-end.png | Bin .../nodejs}/images/exception-in-code-cell.png | Bin .../code => code/nodejs}/images/exception.png | Bin .../nodejs}/images/new-button.png | Bin .../nodejs}/images/new-code-step.png | Bin .../nodejs}/images/syntax-error.png | Bin .../images/this-checkpoint-observability.png | Bin .../code/nodejs/sharing-code/README.md | 0 .../code => code/nodejs}/state/README.md | 0 .../nodejs}/state/images/clear-checkpoint.png | Bin .../code/nodejs/working-with-files/README.md | 0 docs/docs/code/python/README.md | 140 ++++++++++++++++++ 28 files changed, 231 insertions(+), 38 deletions(-) create mode 100644 docs/docs/code/README.md create mode 100644 docs/docs/code/bash/README.md create mode 100644 docs/docs/code/go/README.md rename docs/docs/{workflows/steps/code => code/nodejs}/README.md (92%) rename docs/docs/{workflows/steps/code => code/nodejs}/async/README.md (100%) rename docs/docs/{workflows/steps/code => code/nodejs}/auth/README.md (100%) rename docs/docs/{workflows/steps/code => code/nodejs}/auth/images/auths-property.png (100%) rename docs/docs/{workflows/steps/code => code/nodejs}/auth/images/run-node-js-code-with-slack.png (100%) rename docs/docs/{workflows/steps/code => code/nodejs}/auth/images/run-node-with-slack.png (100%) rename docs/docs/{workflows/steps/code => code/nodejs}/auth/images/search-for-slack.png (100%) rename docs/docs/{workflows/steps/code => code/nodejs}/auth/images/slack-test-request.png (100%) rename docs/docs/{workflows/steps/code => code/nodejs}/auth/images/slack-token.png (100%) rename docs/docs/{workflows/steps => }/code/nodejs/http-requests/README.md (100%) rename docs/docs/{workflows/steps/code => code/nodejs}/images/console-dir.png (100%) rename docs/docs/{workflows/steps/code => code/nodejs}/images/console-log-error.png (100%) rename docs/docs/{workflows/steps/code => code/nodejs}/images/dollar-end.png (100%) rename docs/docs/{workflows/steps/code => code/nodejs}/images/exception-in-code-cell.png (100%) rename docs/docs/{workflows/steps/code => code/nodejs}/images/exception.png (100%) rename docs/docs/{workflows/steps/code => code/nodejs}/images/new-button.png (100%) rename docs/docs/{workflows/steps/code => code/nodejs}/images/new-code-step.png (100%) rename docs/docs/{workflows/steps/code => code/nodejs}/images/syntax-error.png (100%) rename docs/docs/{workflows/steps/code => code/nodejs}/images/this-checkpoint-observability.png (100%) rename docs/docs/{workflows/steps => }/code/nodejs/sharing-code/README.md (100%) rename docs/docs/{workflows/steps/code => code/nodejs}/state/README.md (100%) rename docs/docs/{workflows/steps/code => code/nodejs}/state/images/clear-checkpoint.png (100%) rename docs/docs/{workflows/steps => }/code/nodejs/working-with-files/README.md (100%) create mode 100644 docs/docs/code/python/README.md diff --git a/docs/docs/.vuepress/config.js b/docs/docs/.vuepress/config.js index b09053e1ecc4b..84bfefc748b20 100644 --- a/docs/docs/.vuepress/config.js +++ b/docs/docs/.vuepress/config.js @@ -35,7 +35,6 @@ module.exports = { "/", { title: "Quickstart", - collapsable: false, children: [ "/quickstart/", "/quickstart/hello-world/", @@ -52,26 +51,62 @@ module.exports = { ], }, { - title: "Workflows", + title: "Code", collapsable: false, + children: [ + "/code/", + { + title: "Node.js", + // type: 'group', + children: [ + "/code/nodejs/", + // "/code/nodejs/state/", + // "/code/nodejs/http-requests/", + // "/code/nodejs/working-with-files/", + // "/code/nodejs/sharing-code/", + // "/code/nodejs/async/", + ] + }, + { + title: 'Python', + type: 'group', + children: [ + '/code/python/' + ] + }, + { + title: 'Go', + type: 'group', + children: [ + '/code/go', + ] + }, + { + title: 'Bash', + type: 'group', + children: [ + '/code/bash' + ] + } + + ] + }, + { + title: "Workflows", + children: [ "/workflows/", "/workflows/steps/", "/workflows/steps/triggers/", "/components/actions/", - "/workflows/steps/code/", - "/workflows/steps/params/", - "/workflows/steps/code/state/", - "/workflows/steps/code/nodejs/http-requests/", - "/workflows/steps/code/nodejs/working-with-files/", "/workflows/networking/", - "/workflows/steps/code/nodejs/sharing-code/", - "/workflows/steps/code/async/", + "/workflows/steps/params/", + ], }, { title: "Connecting Apps", - collapsable: false, + // collapsable: false, children: [ "/apps/all-apps/", "/connected-accounts/", @@ -80,7 +115,7 @@ module.exports = { }, { title: "Workflow Events", - collapsable: false, + children: [ "/workflows/events/", "/workflows/events/inspect/", @@ -92,7 +127,7 @@ module.exports = { }, { title: "Managing Workflows", - collapsable: false, + children: [ "/workflows/copy/", "/workflows/managing/", @@ -103,7 +138,7 @@ module.exports = { }, { title: "Managing Errors", - collapsable: false, + children: [ "/errors/", "/workflows/error-handling/global-error-workflow/", @@ -111,7 +146,7 @@ module.exports = { }, { title: "Components", - collapsable: false, + children: [ "/components/", "/event-sources/", @@ -127,7 +162,7 @@ module.exports = { "/user-settings/", { title: "Examples", - collapsable: false, + children: [ "/examples/adding-rows-to-google-sheets/", "/examples/waiting-to-execute-next-step-of-workflow/", @@ -135,12 +170,12 @@ module.exports = { }, { title: "CLI", - collapsable: false, + children: ["/cli/install/", "/cli/login/", "/cli/reference/"], }, { title: "APIs", - collapsable: false, + children: [ "/api/overview/", "/api/auth/", @@ -153,7 +188,7 @@ module.exports = { }, { title: "Destinations", - collapsable: false, + children: [ "/destinations/", "/destinations/http/", @@ -166,7 +201,7 @@ module.exports = { }, { title: "Integrations", - collapsable: false, + children: [ "/apps/all-apps/", "/apps/discord/", @@ -182,7 +217,7 @@ module.exports = { "/new-feature-or-bug/", { title: "Privacy & Security", - collapsable: false, + children: [ "/privacy-and-security/", "/privacy-and-security/best-practices/", @@ -195,7 +230,7 @@ module.exports = { "/troubleshooting/", { title: "Organizations", - collapsable: false, + children: [ "/orgs/", "/orgs/sso/okta/", @@ -227,6 +262,7 @@ module.exports = { DEFAULT_WORKFLOW_QUEUE_SIZE: "100", MAX_WORKFLOW_QUEUE_SIZE: "10,000", NODE_VERSION: "14", + PYTHON_VERSION: "3.8", CONFIGURED_PROPS_SIZE_LIMIT: "64KB", }, }; diff --git a/docs/docs/code/README.md b/docs/docs/code/README.md new file mode 100644 index 0000000000000..32afaeade29e2 --- /dev/null +++ b/docs/docs/code/README.md @@ -0,0 +1,20 @@ +# Writing Code in Workflows + +_This document details how to use code in workflow steps, without leaving your browser. If you're building a [component](/components/), please [reference the component API docs](/components/api/)._ + +Pipedream comes with thousands of prebuilt [triggers](/workflows/steps/triggers/) and [actions](/components/actions/). Often, these will be sufficient for building simple workflows. + +But sometimes you need to run your own custom logic. You may need to make an API request to fetch additional metadata about the event, transform data into a custom format, or end the execution of a workflow early under some conditions. **Code steps let you do this and more**. + +Code steps let you execute [Node.js v{{$site.themeConfig.NODE_VERSION}}](https://nodejs.org/) (JavaScript) code, Python, Go or even Bash right in a workflow. + +Choose a language to get started: + +* [Node.js (Javascript)](/code/nodejs) +* [Python](/code/python) +* [Go](/code/go) +* [Bash](/code/bash) + +If you'd like to see another, specific language supported, please [let us know](https://pipedream.com/community). + +