Skip to content

Commit

Permalink
fix(docs): Rename and remove actions pages.
Browse files Browse the repository at this point in the history
  • Loading branch information
SamTolmay committed Jul 28, 2022
1 parent 520dce1 commit 0da95f3
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 401 deletions.
Expand Up @@ -15,9 +15,9 @@
_ref:
path: templates/actions.yaml.njk
vars:
pageId: Throw
pageTitle: Throw
filePath: actions/Throw.yaml
pageId: Break
pageTitle: Break
filePath: actions/Break.yaml
types: |
```
(params: {
Expand All @@ -27,19 +27,21 @@ _ref:
}): void
```
description: |
The `Throw` action is used throw an error to the user and log to the console. If `throw: true`, the `Throw`
action will throw an error, and this will stop the execution of actions that are defined after it. If the action does not thrown, the `Throw` action will do nothing and the actions defined after it will be executed.
##### TODO: This page needs to be updated.
The `Break` action is used throw an error to the user and log to the console. If `throw: true`, the `Break`
action will throw an error, and this will stop the execution of actions that are defined after it. If the action does not thrown, the `Break` action will do nothing and the actions defined after it will be executed.
params: |
- `throw: boolean`: Throws an error and stops the action chain when `true` or continues the action chain when `false` or undefined.
- `throw: boolean`: Breaks an error and stops the action chain when `true` or continues the action chain when `false` or undefined.
- `message: string`: The error message to show to the user and log to the console if `throw: true`. This message can be overridden by setting the action's `messages.error`.
- `metaData: any`: Data to log to the console if `throw: true`.
examples: |
###### Throw with custom message:
###### Break with custom message:
```yaml
- id: throw
type: Throw
type: Break
params:
throw:
_eq:
Expand All @@ -48,10 +50,10 @@ _ref:
message: Nooooooooooooooooo
```
###### Throw with metaData:
###### Break with metaData:
```yaml
- id: throw
type: Throw
type: Break
params:
throw:
_eq:
Expand All @@ -64,7 +66,7 @@ _ref:
###### Override custom message:
```yaml
- id: throw
type: Throw
type: Break
messages:
error: Meh.
params:
Expand All @@ -77,7 +79,7 @@ _ref:
###### Fail silently:
```yaml
- id: throw
type: Throw
type: Break
messages:
error: false
params:
Expand Down
Expand Up @@ -15,9 +15,9 @@
_ref:
path: templates/actions.yaml.njk
vars:
pageId: MessageAction
pageTitle: Message
filePath: actions/Message.yaml
pageId: DisplayMessage
pageTitle: DisplayMessage
filePath: actions/DisplayMessage.yaml
types: |
```
(params: {
Expand All @@ -27,10 +27,10 @@ _ref:
}): void
```
description: |
The `Message` action is used to display a message to a user.
The `DisplayMessage` action is used to display a message to a user.
params: |
###### object
- `status: enum`: Message status type. Defaults to `success`. One of:
- `status: enum`: DisplayMessage status type. Defaults to `success`. One of:
- `success`
- `error`
- `info`
Expand All @@ -42,15 +42,15 @@ _ref:
###### Display a success message:
```yaml
- id: success_message
type: Message
type: DisplayMessage
params:
content: Success
```
###### Display an info message that remains visible for 10 seconds:
```yaml
- id: info_message
type: Message
type: DisplayMessage
params:
content: Something happened
status: info
Expand All @@ -60,7 +60,7 @@ _ref:
###### Display an error message that never disappears:
```yaml
- id: error_message
type: Message
type: DisplayMessage
params:
content: Something bad happened
status: error
Expand Down
23 changes: 23 additions & 0 deletions packages/docs/actions/Fetch.yaml
@@ -0,0 +1,23 @@
# Copyright 2020-2022 Lowdefy, Inc

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

_ref:
path: templates/actions.yaml.njk
vars:
pageId: Fetch
pageTitle: Fetch
filePath: actions/Fetch.yaml
types: ''
description: |
##### TODO: This page needs to be updated.

0 comments on commit 0da95f3

Please sign in to comment.