jxkn commited on
Commit
0e5c22f
·
2 Parent(s): 2932c9b 6c304f1

Merge branch 'main' of https://huggingface.co/spaces/PiperMy/Academy

Browse files
docs/advanced-development/creating-custom-node.mdx ADDED
@@ -0,0 +1,205 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ sidebar_position: 1
3
+ ---
4
+
5
+ # Создание кастомной ноды
6
+
7
+ Создание кастомных нод позволяет обойти ограничения, которые связаны со стандартной библиотекой нод Piper, или же даже просто улучшить функционал текущих нод.
8
+
9
+ Давайте создадим кастомную ноду **Merge text to JSON**, которая принимает несколько текстовых строк и объединяет их в один JSON массив.
10
+
11
+ ## **1. Загрузка ноды из библиотеки нод**
12
+
13
+ Для создания кастомной ноды начните с загрузки существующей ноды, которая наиболее близка к вашим требованиям. Перейдите в библиотеку нод, используя значок **плюс (+)** в верхнем левом углу рабочего пространства пайплайны и выберите ноду **Input Text** для модификации, поскольку в ней минимум кода и она работает со строками.
14
+
15
+ После добавления ноды откройте её настройки.
16
+
17
+ ![Панель настроек ноды](../img/create-node-1.png)
18
+
19
+ Панель настроек включает несколько вкладок:
20
+
21
+ - **Inputs** - Текущие параметры ноды, их настройка, загрузка изображений
22
+ - **Design** - Создание входных и выходных параметров, определение их свойств
23
+ - **Script** - Редактирование кода JavaScript, логика ноды
24
+ - **Environment** - Настройка переменных окружения
25
+ - **Catalog** - Просмотр метаданных ноды и её публикация
26
+ - **YAML** - Доступ к YAML ноды
27
+
28
+ ## **2. Настройка ноды**
29
+
30
+ Кастомизация начинается со вкладки **Design**, где определяется структура ноды.
31
+
32
+ ![Вкладка Design](../img/create-node-2.png)
33
+
34
+ ### Основные свойства
35
+ - **ID** - Внутреннее имя, используемое в коде (строчные латинские буквы, без пробелов)
36
+ - **Title** - Отображаемое имя, видимое пользователю
37
+
38
+ Для нашей ноды прежние значения необходимо заменить на:
39
+ - ID: `merge_text_to_json`
40
+ - Title: `Merge text to JSON`
41
+
42
+ ### Добавление входных параметров
43
+
44
+ Нашей ноде нужно 4 строковых входа. Чтобы добавить новый вход:
45
+
46
+ 1. Раскройте меню-гамбургер **Inputs**
47
+ 2. Введите имя нового входа: `string1`
48
+ 3. Нажмите **Add**
49
+
50
+ ![Добавление нового входного параметра](../img/create-node-3.png)
51
+
52
+ Настройте параметры входа:
53
+ - **Type**: string (то есть текст)
54
+ - **Title**: String 1 (название, отображаемое на ноде)
55
+
56
+ ![Настройка свойств входа](../img/create-node-4.png)
57
+
58
+ Повторите этот процесс для создания входов `string2`, `string3` и `string4`.
59
+
60
+ Чтобы удалить прежний входной параметр `input_text`, снимите галочку с него в меню Inputs.
61
+
62
+ ![Удаление оригинального входа](../img/create-node-5.png)
63
+
64
+ Если визуально изменения не произошли, нужно временно открыть другую вкладку и потом вернуться в Design.
65
+
66
+ ### Расширенные настройки входных параметров
67
+
68
+ Доступ к детальным настройкам входных параметров открывается через меню-гамбургер.
69
+
70
+ ![Выпадающее меню настроек входных параметров](../img/create-node-6.png)
71
+
72
+ Доступные опции включают:
73
+
74
+ - **Order** (число) - Задаёт порядок расположения входов в ноде
75
+ - **Description** (текст) - Текст всплывающей подсказки для параметра
76
+ - **Required** (boolean) - True делает параметр обязательным
77
+ - **Group** (текст) - Группирует связанные настройки
78
+ - **Enum** (текст) - Создает выпадающие списки с предопределенными значениями
79
+ - **Multiline** (boolean) - Расширяет поля String для длинного текста
80
+ - **Min, Max** (число) - Устанавливает ограничения для полей Integer
81
+ - **Step** (число) - Преобразует поле Integer в ползунок с шагом, равным значению Step
82
+ - **Default** - Устанавливает значения по умолчанию
83
+ - **Placeholder** (текст) - Показывает подсказку в пустых полях String
84
+ - **Schema** - Техническое поле для скриптов
85
+ - **Extensions** (текст) - Добавляет специальную функциональность (например, draw-mask для задания маски на загруженном изображении)
86
+
87
+ ![Пример конфигурации расширений](../img/create-node-7.png)
88
+
89
+ ### Настройка выходных параметров
90
+
91
+ Создайте выходной параметр. Для этого удалите прежний выход `output_text` и добавьте новый `json_output` со следующими параметрами:
92
+ - **Type**: JSON
93
+ - **Title**: JSON
94
+
95
+ Итогое окно Design должно выглядеть примерно так:
96
+
97
+ ![Отредлактированная вкладка Design](../img/create-node-8.png)
98
+
99
+ :::tip Совет
100
+ Отслеживайте ваши изменения во вкладке **Inputs**, чтобы видеть, как модификации влияют на структуру ноды.
101
+ :::
102
+
103
+ Про следующий шаг - написание логики скрипта ноды, в разделе **Вкладка Node Script**.
104
+
105
+ --- eng ---
106
+
107
+ # Creating Custom Nodes
108
+
109
+ Creating custom nodes allows you to bypass limitations associated with Piper's standard node library, or even simply improve the functionality of current nodes.
110
+
111
+ Let's create a custom **Merge text to JSON** node that takes multiple text strings and combines them into a single JSON array.
112
+
113
+ ## **1. Loading a Node from the Node Library**
114
+
115
+ To create a custom node, start by loading an existing node that's closest to your requirements. Navigate to the node library using the **plus (+)** icon in the top left corner of the pipeline workspace and select the **Input Text** node for modification, since it has minimal code and works with strings.
116
+
117
+ After adding the node, open its settings.
118
+
119
+ ![Node Settings Panel](../img/create-node-1.png)
120
+
121
+ The settings panel includes several tabs:
122
+
123
+ - **Inputs** - Current node parameters, their configuration, image loading
124
+ - **Design** - Creating input and output parameters, defining their properties
125
+ - **Script** - Editing JavaScript code, node logic
126
+ - **Environment** - Configure environment variables
127
+ - **Catalog** - View node metadata and publish it
128
+ - **YAML** - Access the node's YAML
129
+
130
+ ## **2. Node Configuration**
131
+
132
+ Customization begins in the **Design** tab, where the node structure is defined.
133
+
134
+ ![Design Tab](../img/create-node-2.png)
135
+
136
+ ### Basic Properties
137
+ - **ID** - Internal name used in code (lowercase Latin letters, no spaces)
138
+ - **Title** - Display name visible to the user
139
+
140
+ For our node, the previous values need to be replaced with:
141
+ - ID: `merge_text_to_json`
142
+ - Title: `Merge text to JSON`
143
+
144
+ ### Adding Input Parameters
145
+
146
+ Our node needs 4 string inputs. To add a new input:
147
+
148
+ 1. Expand the **Inputs** hamburger menu
149
+ 2. Enter the new input name: `string1`
150
+ 3. Click **Add**
151
+
152
+ ![Adding New Input Parameter](../img/create-node-3.png)
153
+
154
+ Configure the input parameters:
155
+ - **Type**: string (i.e., text)
156
+ - **Title**: String 1 (name displayed on the node)
157
+
158
+ ![Configuring Input Properties](../img/create-node-4.png)
159
+
160
+ Repeat this process to create inputs `string2`, `string3`, and `string4`.
161
+
162
+ To remove the previous input parameter `input_text`, uncheck it in the Inputs menu.
163
+
164
+ ![Removing Original Input](../img/create-node-5.png)
165
+
166
+ If no visual changes occur, you need to temporarily open another tab and then return to Design.
167
+
168
+ ### Advanced Input Parameter Settings
169
+
170
+ Access to detailed settings is opened through the hamburger menu.
171
+
172
+ ![Input Parameter Settings Dropdown Menu](../img/create-node-6.png)
173
+
174
+ Available options include:
175
+
176
+ - **Order** (number) - Sets the order of inputs in the node
177
+ - **Description** (text) - Tooltip text for the parameter
178
+ - **Required** (boolean) - True makes the parameter mandatory
179
+ - **Group** (text) - Groups related settings
180
+ - **Enum** (text) - Creates dropdown lists with predefined values
181
+ - **Multiline** (boolean) - Expands String fields for long text
182
+ - **Min, Max** (number) - Sets constraints for Integer fields
183
+ - **Step** (number) - Converts Integer field to slider with step equal to Step value
184
+ - **Default** - Sets default values
185
+ - **Placeholder** (text) - Shows hints in empty String fields
186
+ - **Schema** - Technical field for scripts
187
+ - **Extensions** (text) - Adds special functionality (e.g., draw-mask for setting masks on uploaded images)
188
+
189
+ ![Example Extension Configuration](../img/create-node-7.png)
190
+
191
+ ### Configuring Output Parameters
192
+
193
+ Create an output parameter. To do this, delete the previous output `output_text` and add a new `json_output` with the following parameters:
194
+ - **Type**: JSON
195
+ - **Title**: JSON
196
+
197
+ The final Design window should look something like this:
198
+
199
+ ![Edited Design Tab](../img/create-node-8.png)
200
+
201
+ :::tip Tip
202
+ Monitor your changes in the **Inputs** tab to see how modifications affect the node structure.
203
+ :::
204
+
205
+ The next step - writing the node's script logic, is covered in the **Node Script Tab** section.
docs/advanced-development/creating-nodes.mdx DELETED
@@ -1,134 +0,0 @@
1
- ---
2
- sidebar_position: 1
3
- ---
4
-
5
- # Create Node
6
-
7
- Creating nodes is the foundation of building pipelines in Piper. Each node provides access to a specific neural network or performs a programmed operation, and passes the results to the input of the next node in your workflow.
8
-
9
- ## **1. Adding a New Node**
10
-
11
- To create a new node in your pipeline, locate the **plus (+)** icon in the upper left corner of the interface. This button opens the node library where you can browse and select from available nodes.
12
-
13
- ![Empty pipeline workspace](../img/create-node-1.webp)
14
-
15
- ## **2. Node Library**
16
-
17
- The node library displays all available nodes organized into logical categories to help you find the right functionality for your pipeline:
18
-
19
- ![Node selection interface](../img/create-node-2.webp)
20
-
21
- ### Common Node Categories:
22
-
23
- - **Generate images** - Nodes for generating and modifying images
24
- - **Work with images** - Image processing not related to generation
25
- - **Generate videos** - Nodes for video generation
26
- - **Process videos** - Video processing not related to generation
27
- - **Language agents** - Nodes for calling text LLM models
28
- - **Analyze images** - Group of nodes for image analysis, evaluation and detection
29
- - **Computer vision** - Image description nodes
30
-
31
- Browse through the categories and click on any node to add it to your pipeline workspace.
32
-
33
- ## **3. Node Interaction**
34
-
35
- Once a node is added to your workspace, you can interact with it using the control icons that appear when you hover over the node:
36
-
37
- ![Node with control icons](../img/create-node-3.webp)
38
-
39
- ### Control Icons:
40
-
41
- - **Hand icon (🖐️)** - Click and drag to move the node around the workspace
42
- - **Notebook icon (📝)** - Opens the node configuration panel
43
-
44
- These icons provide quick access to essential node operations without cluttering the interface.
45
-
46
- ## **4. Node Configuration**
47
-
48
- Clicking the notebook icon opens the node settings panel where you can customize the node's behavior:
49
-
50
- The configuration panel includes multiple tabs:
51
-
52
- - **Inputs** - Define input parameters and data sources
53
- - **Design** - Configure input and output parameters
54
- - **Script** - Edit the node's JavaScript code logic
55
- - **Environment** - Configure environment variables
56
- - **Catalog** - View node metadata and publish it
57
- - **YAML** - Access the node's YAML definition
58
-
59
- ## **5. Deleting Nodes**
60
-
61
- To remove a node from your pipeline:
62
-
63
- 1. Click the notebook icon to open the node settings
64
- 2. Look for the red **Delete** button in the upper left corner of the settings panel
65
- 3. Click Delete to permanently remove the node from your pipeline
66
-
67
- ![Node settings panel](../img/create-node-4.webp)
68
-
69
- Be careful when deleting nodes, as this action cannot be undone and may break connections in your pipeline.
70
-
71
- --- ru ---
72
-
73
- # Создание ноды
74
-
75
- Создание нод является основой построения пайплайнов в Piper. Каждая нода представляет определенную функцию или операцию, которая обрабатывает данные и передает их на следующий шаг в вашем рабочем процессе.
76
-
77
- ## **1. Добавление новой ноды**
78
-
79
- Чтобы создать новую ноду в вашем пайплайне, найдите значок **плюс (+)** в верхнем левом углу интерфейса. Эта кнопка открывает библиотеку нод, где вы можете просматривать и выбирать из доступных нод.
80
-
81
- ![Пустое рабочее пространство пайплайна](../img/create-node-1.webp)
82
-
83
- ## **2. Библиотека нод**
84
-
85
- Библиотека нод отображает все доступные ноды, организованные в логические категории, чтобы помочь вам найти нужную функциональность для вашего пайплайна:
86
-
87
- ![Интерфейс выбора нод](../img/create-node-2.webp)
88
-
89
- ### Основные категории нод:
90
-
91
- - **Генерация изображений** - Ноды для генерации и изменения изображений
92
- - **Работа с изображениями** - Работа с изображениями, не связанная с генерацией
93
- - **Генерация видео** - Ноды для генерации видео
94
- - **Обработка видео** - Работа с видео, не связанная с генерацией
95
- - **Анализ изображений** - Группа нод по анализу, оценке и детектированию изображений
96
- - **Computer vision** - Описание изображений
97
-
98
- Просмотрите категории и нажмите на любую ноду, чтобы добавить её в рабочее пространство вашего пайплайна.
99
-
100
- ## **3. Взаимодействие с нодой**
101
-
102
- После добавления ноды в рабочее пространство вы можете взаимодействовать с ней с помощью значков управления, которые появляются при наведении курсора на ноду:
103
-
104
- ![Нода со значками управления](../img/create-node-3.webp)
105
-
106
- ### Значки управления:
107
-
108
- - **Значок ладони (🖐️)** - Нажмите и перетащите для перемещения ноды по рабочему пространству
109
- - **Значок блокнота (📝)** - Открывает панель настроек ноды
110
-
111
- ## **4. Настройка ноды**
112
-
113
- Нажатие на значок блокнота открывает панель настроек ноды, где вы можете настроить поведение ноды:
114
-
115
- Панель настроек включает несколько вкладок:
116
-
117
- - **Inputs** - Определение входных параметров и источников данных
118
- - **Design** - Настройка входных и выходных параметров
119
- - **Script** - Редактирование JavaScript кода логики ноды
120
- - **Environment** - Настройка переменных окружения
121
- - **Catalog** - Просмотр метаданных ноды и её публикация
122
- - **YAML** - Доступ к YAML ноды
123
-
124
- ## **5. Удаление нод**
125
-
126
- Чтобы удалить ноду из вашего пайплайна:
127
-
128
- 1. Нажмите на значок блокнота, чтобы открыть настройки ноды
129
- 2. Найдите красную кнопку **Delete** в верхнем левом углу панели настроек
130
- 3. Нажмите Delete, чтобы окончательно удалить ноду из вашего пайплайна
131
-
132
- ![Node settings panel](../img/create-node-4.webp)
133
-
134
- Будьте осторожны при удалении нод, так как это действие нельзя отменить и оно может нарушить соединения в вашем пайплайн.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/advanced-development/node-script.mdx CHANGED
@@ -2,92 +2,215 @@
2
  sidebar_position: 2
3
  ---
4
 
5
- # Node-Script
6
 
7
- The **Script tab** is designed for placing JavaScript code that handles the programmatic logic of your node. This is where you define what your node actually does - whether it's processing text, calling APIs, transforming data, or performing calculations.
8
 
9
- ![Script tab interface](../img/script_tab.jpg)
10
 
11
- ## Code Structure
12
 
13
- All Piper nodes follow a specific JavaScript structure:
14
 
15
  ```javascript
16
  export async function run({ inputs }) {
17
  const { FatalError, NextNode } = DEFINITIONS;
18
 
19
- // Your custom code here
20
 
21
  return NextNode.from({
22
  outputs: {
23
- // Your results
24
  }
25
  });
26
  }
27
  ```
28
 
29
- This structure ensures your node can properly receive data from previous nodes and pass results to the next ones in your pipeline.
30
 
31
- ## Execution Types
 
 
 
 
 
32
 
33
- Choose the appropriate execution type based on how long your node needs to run:
34
 
 
 
 
 
 
 
 
35
 
36
- | Type | Timeout | Description |
37
- |------------|-------------|---------------------|
38
- | Rapid | 0-20 sec | Quick operations |
39
- | Regular | 21-60 sec | Standard processing |
40
- | Deferred | 60-120 sec | Complex operations |
41
- | Protracted | 120-300 sec | Heavy processing tasks |
42
 
 
 
 
43
 
44
- ## Saving Changes
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
 
46
- Always save your script modifications by clicking the **Save** button at the bottom of the interface. Any changes you make to the code must be saved before they take effect.
47
 
48
- The Script tab is the core of your node's functionality - it's where you transform inputs into outputs using JavaScript code.
 
 
 
49
 
50
- --- ru ---
 
 
 
51
 
52
- # Node-Script
53
 
54
- Вкладка **Script** предназначена для размещения кода JavaScript, отвечающего за программную логику ноды. Здесь вы определяете, что именно делает ваша нода - обрабатывает ли она текст, вызывает API, трансформирует данные или выполняет вычисления.
55
 
56
- ![Интерфейс вкладки Script](../img/script_tab.jpg)
 
 
 
 
 
57
 
58
- ## Структура кода
 
 
 
 
 
 
 
 
 
 
 
 
59
 
60
- Все ноды Piper следуют определенной структуре JavaScript:
 
 
 
 
61
 
62
  ```javascript
63
  export async function run({ inputs }) {
64
  const { FatalError, NextNode } = DEFINITIONS;
65
 
66
- // Ваш код здесь
67
 
68
  return NextNode.from({
69
  outputs: {
70
- // Ваши результаты
71
  }
72
  });
73
  }
74
  ```
75
 
76
- Эта структура гарантирует, что ваша нода может правильно получать данные от предыдущих нод и передавать результаты следующим в вашем пайплайне.
77
 
78
- ## Типы выполнения
 
79
 
80
- Выберите подходящий тип выполнения в зависимости от того, сколько времени требуется вашей ноде для работы:
 
 
81
 
82
- | Тип | Время | Описание |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  |------------|-------------|-----------------------|
84
- | Rapid | 0-20 sec | Быстрые операции |
85
- | Regular | 21-60 sec | Стандартная обработка |
86
- | Deferred | 60-120 sec | Сложные операции |
87
- | Protracted | 120-300 sec | Тяжелые задачи обработки |
88
 
89
- ## Сохранение изменений
90
 
91
- Всегда сохраняйте изменения в скрипте, нажимая кнопку **Save** внизу интерфейса. Любые изменения в коде следует сохранять по нажатию клавиши Save внизу интерфейса.
 
 
92
 
93
- Вкладка Script - это ядро функциональности вашей ноды, где вы преобразуете входные данные в выходные с помощью кода JavaScript.
 
2
  sidebar_position: 2
3
  ---
4
 
5
+ # Вкладка Script в настройках ноды
6
 
7
+ Вкладка **Script** предназначена для размещения кода JavaScript, отвечающего за программную логику ноды. Здесь вы определяете, что именно делает ваша нода - обрабатывает ли она текст, вызывает API, трансформирует данные или выполняет вычисления.
8
 
9
+ ![Интерфейс вкладки Script](../img/script_tab.jpg)
10
 
11
+ ## Структура кода
12
 
13
+ Все ноды Piper, включая кастомные, следуют определенной структуре JavaScript:
14
 
15
  ```javascript
16
  export async function run({ inputs }) {
17
  const { FatalError, NextNode } = DEFINITIONS;
18
 
19
+ // Ваш код здесь
20
 
21
  return NextNode.from({
22
  outputs: {
23
+ // Ваши результаты
24
  }
25
  });
26
  }
27
  ```
28
 
29
+ Эта структура гарантирует, что ваша нода может правильно получать данные от предыдущих нод и передавать результаты следующим в вашем пайплайне.
30
 
31
+ ### Оригинальный код Input Text
32
+ Базовая нода **Input Text** имеет эту простую структуру:
33
+
34
+ ```javascript
35
+ export async function run({ inputs }) {
36
+ const { FatalError, NextNode } = DEFINITIONS;
37
 
38
+ const text = inputs.input_text;
39
 
40
+ return NextNode.from({
41
+ outputs: {
42
+ output_text: text
43
+ }
44
+ });
45
+ }
46
+ ```
47
 
48
+ ### Кастомный код Merge Text to JSON
49
+ Нам нужно заменить это логикой, которая обрабатывает несколько строковых входов и создает JSON массив:
 
 
 
 
50
 
51
+ ```javascript
52
+ export async function run({ inputs }) {
53
+ const { FatalError, NextNode } = DEFINITIONS;
54
 
55
+ const jsonArray = [];
56
+
57
+ if (inputs.string1) {
58
+ jsonArray.push(inputs.string1);
59
+ }
60
+ if (inputs.string2) {
61
+ jsonArray.push(inputs.string2);
62
+ }
63
+ if (inputs.string3) {
64
+ jsonArray.push(inputs.string3);
65
+ }
66
+ if (inputs.string4) {
67
+ jsonArray.push(inputs.string4);
68
+ }
69
+
70
+ return NextNode.from({
71
+ outputs: {
72
+ json_output: jsonArray
73
+ }
74
+ });
75
+ }
76
+ ```
77
+ ## Понимание кастомной логики
78
 
79
+ Кастомный скрипт реализует следующую логику:
80
 
81
+ 1. **Инициализация пустого массива** - `const jsonArray = []` создает пустой массив для хранения наших текстовых строк
82
+ 2. **Проверка каждого входа** - Условия `if` проверяют, что каждый вход имеет значение перед добавлением
83
+ 3. **Построение массива** - Только непустые входы добавляются в `jsonArray` с помощью `push()`
84
+ 4. **Возврат JSON выхода** - Финальный массив возвращается как `json_output`, соответствуя нашей конфигурации во вкладке Design
85
 
86
+ Этот подход гарантирует, что:
87
+ - Пустые или неопределенные входы игнорируются
88
+ - Только валидные текстовые строки включаются в финальный JSON массив
89
+ - Формат выхода соответствует JSON типу, который мы определили во вкладке Design
90
 
91
+ ## Типы выполнения
92
 
93
+ Выберите подходящий тип выполнения в зависимости от того, сколько времени требуется вашей ноде для работы:
94
 
95
+ | Тип | Время | Описание |
96
+ |------------|-------------|-----------------------|
97
+ | Rapid | 0-20 sec | Быстрые операции |
98
+ | Regular | 21-60 sec | Стандартная обработка |
99
+ | Deferred | 60-120 sec | Сложные операции |
100
+ | Protracted | 120-300 sec | Тяжелые задачи обработки |
101
 
102
+ Для нашей ноды **Merge text to JSON** подходит выполнение **Rapid**, поскольку мы только манипулируем текстовыми строками и нет обращений к стороннему сервису по API.
103
+
104
+ ## Сохранение изменений
105
+
106
+ Всегда сохраняйте изменения в скрипте, нажимая кнопку **Save** внизу интерфейса. Любые изменения в коде следует сохранять по нажатию клавиши Save внизу интерфейса.
107
+
108
+ Вкладка Script - это ядро функциональности вашей ноды, где вы преобразуете входные данные в выходные с помощью кода JavaScript.
109
+
110
+ --- eng ---
111
+
112
+ # Script Tab in Node Settings
113
+
114
+ The **Script** tab is designed for placing JavaScript code that handles the node's programmatic logic. Here you define what exactly your node does - whether it processes text, calls APIs, transforms data, or performs calculations.
115
 
116
+ ![Script tab interface](../img/script_tab.jpg)
117
+
118
+ ## Code Structure
119
+
120
+ All Piper nodes, including custom ones, follow a specific JavaScript structure:
121
 
122
  ```javascript
123
  export async function run({ inputs }) {
124
  const { FatalError, NextNode } = DEFINITIONS;
125
 
126
+ // Your code here
127
 
128
  return NextNode.from({
129
  outputs: {
130
+ // Your results
131
  }
132
  });
133
  }
134
  ```
135
 
136
+ This structure ensures that your node can properly receive data from previous nodes and pass results to the next ones in your pipeline.
137
 
138
+ ### Original Input Text Code
139
+ The basic **Input Text** node has this simple structure:
140
 
141
+ ```javascript
142
+ export async function run({ inputs }) {
143
+ const { FatalError, NextNode } = DEFINITIONS;
144
 
145
+ const text = inputs.input_text;
146
+
147
+ return NextNode.from({
148
+ outputs: {
149
+ output_text: text
150
+ }
151
+ });
152
+ }
153
+ ```
154
+
155
+ ### Custom Merge Text to JSON Code
156
+ We need to replace this with logic that processes multiple string inputs and creates a JSON array:
157
+
158
+ ```javascript
159
+ export async function run({ inputs }) {
160
+ const { FatalError, NextNode } = DEFINITIONS;
161
+
162
+ const jsonArray = [];
163
+
164
+ if (inputs.string1) {
165
+ jsonArray.push(inputs.string1);
166
+ }
167
+ if (inputs.string2) {
168
+ jsonArray.push(inputs.string2);
169
+ }
170
+ if (inputs.string3) {
171
+ jsonArray.push(inputs.string3);
172
+ }
173
+ if (inputs.string4) {
174
+ jsonArray.push(inputs.string4);
175
+ }
176
+
177
+ return NextNode.from({
178
+ outputs: {
179
+ json_output: jsonArray
180
+ }
181
+ });
182
+ }
183
+ ```
184
+
185
+ ## Understanding Custom Logic
186
+
187
+ The custom script implements the following logic:
188
+
189
+ 1. **Initialize empty array** - `const jsonArray = []` creates an empty array to store our text strings
190
+ 2. **Check each input** - `if` conditions check that each input has a value before adding
191
+ 3. **Build array** - Only non-empty inputs are added to `jsonArray` using `push()`
192
+ 4. **Return JSON output** - The final array is returned as `json_output`, matching our configuration in the Design tab
193
+
194
+ This approach ensures that:
195
+ - Empty or undefined inputs are ignored
196
+ - Only valid text strings are included in the final JSON array
197
+ - The output format matches the JSON type we defined in the Design tab
198
+
199
+ ## Execution Types
200
+
201
+ Choose the appropriate execution type based on how much time your node requires to work:
202
+
203
+ | Type | Time | Description |
204
  |------------|-------------|-----------------------|
205
+ | Rapid | 0-20 sec | Fast operations |
206
+ | Regular | 21-60 sec | Standard processing |
207
+ | Deferred | 60-120 sec | Complex operations |
208
+ | Protracted | 120-300 sec | Heavy processing tasks |
209
 
210
+ For our **Merge text to JSON** node, **Rapid** execution is suitable since we're only manipulating text strings and there are no API calls to external services.
211
 
212
+ ## Saving Changes
213
+
214
+ Always save changes to the script by clicking the **Save** button at the bottom of the interface. Any changes to the code should be saved by pressing the Save button at the bottom of the interface.
215
 
216
+ The Script tab is the core of your node's functionality, where you transform input data into output using JavaScript code.
docs/advanced-development/node-yaml.mdx CHANGED
@@ -2,81 +2,125 @@
2
  sidebar_position: 3
3
  ---
4
 
5
- # Node-YAML
6
 
7
- The **YAML tab** consolidates all the data from other tabs (Design, Script, Environment, Catalog) into a single, unified representation that defines everything about your node - from its technical metadata to its position in the pipeline workspace.
8
 
9
- ![YAML tab interface](../img/Node-YAML.jpg)
10
 
11
- ## What is YAML View?
12
 
13
- The YAML tab serves as the "source code" of your node. It combines:
14
 
15
- - Input/output definitions from the Design tab
16
- - JavaScript code from the Script tab
17
- - Technical metadata from the Catalog tab
18
- - Environment variables from the Environment tab
19
- - Node positioning and connections within the pipeline
20
 
21
- This complete representation makes it possible to duplicate nodes exactly by copying their YAML configuration to other pipelines.
22
 
23
- ## YAML Structure
24
 
25
- The YAML configuration is organized into logical sections:
26
 
27
- ### Technical Information
28
  ```yaml
29
- _id: translate_text_artworks
30
  version: 1
31
  category:
32
- _id: process_text
33
- title: en=Process text;ru=Обработка текста
34
- package: artworks
35
- title: en=Translate text;ru=Перевести текст
36
- source: catalog
 
37
  ```
38
 
39
- These fields define the node's identity, version, category classification, and package association.
40
 
41
- ### Execution Configuration
42
  ```yaml
43
- execution: regular
44
- script: |
45
- export async function run({ inputs, state }) {
46
- // Your JavaScript code here
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  }
48
  ```
49
 
50
- Contains complete JavaScript code from the Script tab.
51
 
52
- ### Node Positioning
53
  ```yaml
54
  arrange:
55
- x: 610
56
- y: 50
57
  ```
58
 
59
- Defines the exact position of the node in the pipeline workspace.
60
 
61
- ### Input/Output Definitions
62
  ```yaml
63
  inputs:
64
- source:
65
- order: 1
66
- title: en=Source language;ru=Исходный язык
 
 
 
 
 
 
 
67
  type: string
68
- required: true
69
- default: auto
 
 
 
70
 
71
  outputs:
72
- text:
73
- title: en=Text;ru=Перевод
74
- type: string
75
  ```
76
 
77
- Complete specifications for all input and output parameters, including their types, titles, defaults, and validation rules.
78
 
79
- ### Environment Variables
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  ```yaml
81
  environment:
82
  OPEN_PAAS_USER:
@@ -85,100 +129,144 @@ environment:
85
  scope: global
86
  ```
87
 
88
- All environment variables and API keys needed for the node to connect with external providers.
89
 
90
- ## Copying and Reusing Nodes
91
 
92
- The YAML tab's most powerful feature is the ability to create exact duplicates of nodes:
93
 
94
- 1. **Copy the YAML** - Select all content in the YAML tab and copy it
95
- 2. **Create new node** - Add a new node in any pipeline
96
- 3. **Paste configuration** - Replace the new node's YAML with your copied content
97
- 4. **Save changes** - The node will be recreated with identical functionality
98
 
99
- This process preserves all settings, code, and configuration, making it easy to reuse complex nodes across different pipelines.
100
 
101
- ## Read-Only Nature
102
 
103
- The YAML tab is primarily for viewing and copying. While you can see the complete node configuration here, modifications should be made through the appropriate tabs (Script for code changes, Design for input/output modifications, etc.) to ensure proper validation and formatting.
104
 
105
- --- ru ---
106
 
107
- # Node-YAML
108
 
109
- Вкладка **YAML** объединяет все данные из других вкладок (Design, Script, Environment, Catalog) в единое представление, которое определяет всё о вашей ноде - от технических метаданных до её позиции в рабочем пространстве пайплайна.
110
 
111
- ![Интерфейс вкладки YAML](../img/Node-YAML.jpg)
112
 
113
- ## Что такое YAML представление?
114
 
115
- Вкладка YAML служит "исходным кодом" вашей ноды. Она объединяет:
116
 
117
- - Определения входных и выходных данных из вкладки Design
118
- - JavaScript код из вкладки Script
119
- - Технические метаданные из вкладки Catalog
120
- - Переменные окружения из вкладки Environment
121
- - Позиционирование ноды и связи внутри пайплайна
122
 
123
- Это полное представление позволяет точно дублировать ноды, копируя их YAML конфигурацию в другие пайплайны.
124
 
125
- ## Структура YAML
126
 
127
- YAML конфигурация организована в логические секции:
128
 
129
- ### Техническая информация
130
  ```yaml
131
- _id: translate_text_artworks
132
  version: 1
133
  category:
134
- _id: process_text
135
- title: en=Process text;ru=Обработка текста
136
- package: artworks
137
- title: en=Translate text;ru=Перевести текст
138
- source: catalog
 
139
  ```
140
 
141
- Эти поля определяют идентификатор ноды, версию, классификацию по категориям и привязку к пакету.
142
 
143
- ### Конфигурация выполнения
144
  ```yaml
145
- execution: regular
146
- script: |
147
- export async function run({ inputs, state }) {
148
- // Ваш JavaScript код здесь
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
149
  }
150
  ```
151
 
152
- Содержит полный JavaScript код из вкладки Script.
153
 
154
- ### Позиционирование ноды
155
  ```yaml
156
  arrange:
157
- x: 610
158
- y: 50
159
  ```
160
 
161
- Определяет точное положение ноды в рабочем пространстве пайплайна.
162
 
163
- ### Определения входных/выходных данных
164
  ```yaml
165
  inputs:
166
- source:
167
- order: 1
168
- title: en=Source language;ru=Исходный язык
 
 
 
 
 
 
 
169
  type: string
170
- required: true
171
- default: auto
 
 
 
172
 
173
  outputs:
174
- text:
175
- title: en=Text;ru=Перевод
176
- type: string
177
  ```
178
 
179
- Полные спецификации для всех входных и выходных параметров, включая их типы, названия, значения по умолчанию и правила валидации.
180
 
181
- ### Переменные окружения
 
 
 
 
 
 
 
 
 
 
 
 
 
182
  ```yaml
183
  environment:
184
  OPEN_PAAS_USER:
@@ -187,19 +275,19 @@ environment:
187
  scope: global
188
  ```
189
 
190
- Все переменные окружения и API ключи, необходимые для подключения ноды к внешним провайдерам.
191
 
192
- ## Копирование и повторное использование нод
193
 
194
- Самая мощная функция вкладки YAML - возможность создания точных дубликатов нод:
195
 
196
- 1. **Скопируйте YAML** - Выделите весь контент во вкладке YAML и скопируйте его
197
- 2. **Создайте новую ноду** - Добавьте новую ноду в любой пайплайн
198
- 3. **Вставьте конфигурацию** - Замените YAML новой ноды на скопированный контент
199
- 4. **Сохраните изменения** - Нода будет воссоздана с идентичной функциональностью
200
 
201
- Этот процесс сохраняет все настройки, код и конфигурацию, делая простым повторное использование сложных нод в разных пайплайнах.
202
 
203
- ## Только для чтения
204
 
205
- Вкладка YAML в основном предназначена для просмотра и копирования. Хотя вы можете видеть полную конфигурацию ноды здесь, изменения следует вносить через соответствующие вкладки (Script для изменений кода, Design для модификации входных/выходных данных и т.д.), чтобы обеспечить правильную валидацию и форматирование.
 
2
  sidebar_position: 3
3
  ---
4
 
5
+ # Вкладка YAML в настройках ноды
6
 
7
+ Вкладка **YAML** объединяет все данные из других вкладок (Design, Script, Environment, Catalog) в единое представление, которое определяет всё о вашей ноде - от технических метаданных до её позиции в рабочем пространстве пайплайна.
8
 
9
+ ![Интерфейс вкладки YAML](../img/node-yaml.png)
10
 
11
+ ## Что такое YAML представление?
12
 
13
+ Вкладка YAML служит "исходным кодом" вашей ноды. Она объединяет:
14
 
15
+ - Определения входных и выходных данных из вкладки Design
16
+ - JavaScript код из вкладки Script
17
+ - Технические метаданные из вкладки Catalog
18
+ - Переменные окружения из вкладки Environment
19
+ - Позиционирование ноды и связи внутри пайплайна
20
 
21
+ Это полное представление позволяет точно дублировать ноды, копируя их YAML конфигурацию в другие пайплайны.
22
 
23
+ ## Структура YAML
24
 
25
+ YAML конфигурация организована в логические секции:
26
 
27
+ ### Техническая информация
28
  ```yaml
29
+ _id: merge_text_to_json
30
  version: 1
31
  category:
32
+ _id: processing
33
+ title: en=Processing;ru=Обработка
34
+ package: custom
35
+ title: en=Merge text to JSON;ru=Объединение текста в JSON
36
+ source: node
37
+ execution: regular
38
  ```
39
 
40
+ Эти поля определяют идентификатор ноды, версию, классификацию по категориям и привязку к пакету.
41
 
42
+ ### Скрипт выполнения
43
  ```yaml
44
+ script: |-
45
+ export async function run({ inputs }) {
46
+ const { NextNode } = DEFINITIONS;
47
+
48
+ const jsonArray = [];
49
+
50
+ if (inputs.string1) {
51
+ jsonArray.push(inputs.string1);
52
+ }
53
+ if (inputs.string2) {
54
+ jsonArray.push(inputs.string2);
55
+ }
56
+ if (inputs.string3) {
57
+ jsonArray.push(inputs.string3);
58
+ }
59
+ if (inputs.string4) {
60
+ jsonArray.push(inputs.string4);
61
+ }
62
+
63
+ return NextNode.from({
64
+ outputs: {
65
+ json_output: jsonArray
66
+ }
67
+ });
68
  }
69
  ```
70
 
71
+ Содержит полный кастомный JavaScript код, который мы написали во вкладке Script.
72
 
73
+ ### Позиционирование ноды
74
  ```yaml
75
  arrange:
76
+ x: 170
77
+ y: 290
78
  ```
79
 
80
+ Определяет точное положение ноды в рабочем пространстве пайплайна.
81
 
82
+ ### Определения входных/выходных данных
83
  ```yaml
84
  inputs:
85
+ string1:
86
+ title: en=String 1;ru=Строка 1
87
+ type: string
88
+ required: false
89
+ string2:
90
+ title: en=String 2;ru=Строка 2
91
+ type: string
92
+ required: false
93
+ string3:
94
+ title: en=String 3;ru=Строка 3
95
  type: string
96
+ required: false
97
+ string4:
98
+ title: en=String 4;ru=Строка 4
99
+ type: string
100
+ required: false
101
 
102
  outputs:
103
+ json_output:
104
+ title: en=JSON;ru=JSON
105
+ type: json
106
  ```
107
 
108
+ Полные спецификации для всех 4 входных параметров и 1 выходного параметра, которые мы настроили во вкладке Design.
109
 
110
+ ### Информация каталога (опционально)
111
+ ```yaml
112
+ catalog:
113
+ _id: merge_text_to_json
114
+ version: 1
115
+ category:
116
+ _id: service_nodes
117
+ title: Service Nodes
118
+ package: service_nodes
119
+ ```
120
+
121
+ Метаданные для публикации и организации вашей кастомной ноды в каталоге.
122
+
123
+ ### Переменные окружения (опционально)
124
  ```yaml
125
  environment:
126
  OPEN_PAAS_USER:
 
129
  scope: global
130
  ```
131
 
132
+ Все переменные окружения и API ключи, необходимые для подключения ноды к внешним провайдерам.
133
 
134
+ ## Копирование и повторное использование нод
135
 
136
+ Самая мощная функция вкладки YAML - возможность создания точных дубликатов ноды:
137
 
138
+ 1. **Скопируйте YAML** - Выделите весь код во вкладке YAML и скопируйте его
139
+ 2. **Создайте новую ноду** - Добавьте новую ноду в любой пайплайн
140
+ 3. **Вставьте конфигурацию** - Замените YAML новой ноды на скопированный код
141
+ 4. **Сохраните изменения** - Нода будет воссоздана с идентичной функциональностью
142
 
143
+ Этот процесс сохраняет все настройки, код и конфигурацию, делая простым повторное использование любых нод в разных пайплайнах.
144
 
145
+ ## Только для чтения
146
 
147
+ Вкладка YAML в основном предназначена для просмотра и копирования. Хотя вы можете видеть полную конфигурацию ноды здесь, изменения следует вносить через соответствующие вкладки (Script для изменений кода, Design для модификации входных/выходных данных и т.д.), чтобы обеспечить правильную валидацию и форматирование.
148
 
149
+ --- eng ---
150
 
151
+ # YAML Tab in Node Settings
152
 
153
+ The **YAML** tab combines all data from other tabs (Design, Script, Environment, Catalog) into a unified view that defines everything about your node - from technical metadata to its position in the pipeline workspace.
154
 
155
+ ![YAML Tab Interface](../img/node-yaml.png)
156
 
157
+ ## What is the YAML View?
158
 
159
+ The YAML tab serves as the "source code" of your node. It combines:
160
 
161
+ - Input and output definitions from the Design tab
162
+ - JavaScript code from the Script tab
163
+ - Technical metadata from the Catalog tab
164
+ - Environment variables from the Environment tab
165
+ - Node positioning and connections within the pipeline
166
 
167
+ This complete representation allows you to precisely duplicate nodes by copying their YAML configuration to other pipelines.
168
 
169
+ ## YAML Structure
170
 
171
+ The YAML configuration is organized into logical sections:
172
 
173
+ ### Technical Information
174
  ```yaml
175
+ _id: merge_text_to_json
176
  version: 1
177
  category:
178
+ _id: processing
179
+ title: en=Processing;ru=Обработка
180
+ package: custom
181
+ title: en=Merge text to JSON;ru=Объединение текста в JSON
182
+ source: node
183
+ execution: regular
184
  ```
185
 
186
+ These fields define the node's identifier, version, category classification, and package binding.
187
 
188
+ ### Execution Script
189
  ```yaml
190
+ script: |-
191
+ export async function run({ inputs }) {
192
+ const { NextNode } = DEFINITIONS;
193
+
194
+ const jsonArray = [];
195
+
196
+ if (inputs.string1) {
197
+ jsonArray.push(inputs.string1);
198
+ }
199
+ if (inputs.string2) {
200
+ jsonArray.push(inputs.string2);
201
+ }
202
+ if (inputs.string3) {
203
+ jsonArray.push(inputs.string3);
204
+ }
205
+ if (inputs.string4) {
206
+ jsonArray.push(inputs.string4);
207
+ }
208
+
209
+ return NextNode.from({
210
+ outputs: {
211
+ json_output: jsonArray
212
+ }
213
+ });
214
  }
215
  ```
216
 
217
+ Contains the complete custom JavaScript code that we wrote in the Script tab.
218
 
219
+ ### Node Positioning
220
  ```yaml
221
  arrange:
222
+ x: 170
223
+ y: 290
224
  ```
225
 
226
+ Defines the exact position of the node in the pipeline workspace.
227
 
228
+ ### Input/Output Definitions
229
  ```yaml
230
  inputs:
231
+ string1:
232
+ title: en=String 1;ru=Строка 1
233
+ type: string
234
+ required: false
235
+ string2:
236
+ title: en=String 2;ru=Строка 2
237
+ type: string
238
+ required: false
239
+ string3:
240
+ title: en=String 3;ru=Строка 3
241
  type: string
242
+ required: false
243
+ string4:
244
+ title: en=String 4;ru=Строка 4
245
+ type: string
246
+ required: false
247
 
248
  outputs:
249
+ json_output:
250
+ title: en=JSON;ru=JSON
251
+ type: json
252
  ```
253
 
254
+ Complete specifications for all 4 input parameters and 1 output parameter that we configured in the Design tab.
255
 
256
+ ### Catalog Information (Optional)
257
+ ```yaml
258
+ catalog:
259
+ _id: merge_text_to_json
260
+ version: 1
261
+ category:
262
+ _id: service_nodes
263
+ title: Service Nodes
264
+ package: service_nodes
265
+ ```
266
+
267
+ Metadata for publishing and organizing your custom node in the catalog.
268
+
269
+ ### Environment Variables (Optional)
270
  ```yaml
271
  environment:
272
  OPEN_PAAS_USER:
 
275
  scope: global
276
  ```
277
 
278
+ All environment variables and API keys required to connect the node to external providers.
279
 
280
+ ## Copying and Reusing Nodes
281
 
282
+ The most powerful feature of the YAML tab is the ability to create exact duplicates of nodes:
283
 
284
+ 1. **Copy YAML** - Select all code in the YAML tab and copy it
285
+ 2. **Create New Node** - Add a new node to any pipeline
286
+ 3. **Paste Configuration** - Replace the new node's YAML with the copied code
287
+ 4. **Save Changes** - The node will be recreated with identical functionality
288
 
289
+ This process preserves all settings, code, and configuration, making it simple to reuse any nodes across different pipelines.
290
 
291
+ ## Read-Only
292
 
293
+ The YAML tab is primarily intended for viewing and copying. While you can see the complete node configuration here, changes should be made through the appropriate tabs (Script for code changes, Design for input/output modifications, etc.) to ensure proper validation and formatting.
docs/advanced-development/pipeline-yaml.mdx CHANGED
@@ -2,68 +2,65 @@
2
  sidebar_position: 4
3
  ---
4
 
5
- # Pipeline YAML
6
 
7
- The **Pipeline YAML** provides a comprehensive view of your entire pipeline configuration in YAML format. This includes all nodes with their positioning, executable code, interconnections, and various technical information that defines how your pipeline operates.
8
 
9
- ## Accessing Pipeline YAML
10
 
11
- To access the pipeline YAML configuration:
12
 
13
- 1. Click the **More** button in the pipeline interface
14
- 2. Select **YAML** from the dropdown menu
15
 
16
- ![Pipeline YAML access](../img/pipeline-yaml-1.jpg)
17
 
18
- This opens the YAML editor where you can view and modify it.
19
 
20
- ## YAML Structure
21
 
22
- The pipeline YAML follows a specific hierarchical structure:
23
 
24
- ### 1. Pipeline Metadata
25
  ```yaml
26
- name: en=Pipeline Name;ru=Название пайплайна
27
  version: 1
28
- description: en=Pipeline description;ru=Описание пайплайна
29
  readme: {}
30
  category:
31
  _id: category_id
32
- title: en=Category;ru=Категория
33
- icon: category_icon
34
  ```
35
 
36
- This section contains the pipeline's basic information including name, description, and categorization.
37
 
38
- ### 2. Start Configuration
39
  ```yaml
40
  start:
41
  nodes:
42
  - first_node_id
43
  ```
44
 
45
- Defines which node serves as the starting point for pipeline execution.
46
 
47
- ### 3. Inputs and Outputs
48
  ```yaml
49
  inputs:
50
- input_name:
51
- order: 1
52
- title: en=Input Title;ru=Название входа
53
  type: string
54
- required: true
55
- # Additional input parameters
56
 
57
  outputs:
58
- output_name:
59
- title: en=Output Title;ru=Название выхода
60
- type: string
61
- # Output configuration
62
  ```
63
 
64
- All pipeline inputs and outputs for all nodes are defined here.
65
 
66
- ### 4. Flows (Node Connections)
67
  ```yaml
68
  flows:
69
  connection_name:
@@ -73,9 +70,9 @@ flows:
73
  input: input_parameter
74
  ```
75
 
76
- This section describes how data is transferred between nodes, connecting outputs from one node to inputs of another.
77
 
78
- ### 5. Nodes Configuration
79
  ```yaml
80
  nodes:
81
  node_id:
@@ -84,101 +81,98 @@ nodes:
84
  source: node|catalog
85
  execution: rapid|regular|deferred|protracted
86
  script: |
87
- // JavaScript code
88
  inputs:
89
- # Node input definitions
90
  outputs:
91
- # Node output definitions
92
- environment:
93
- # Environment variables
94
  ```
95
 
96
- Each node in the pipeline is fully described with its configuration, code, and parameters.
97
 
98
- ## Editing and Saving
99
 
100
- When making changes to the pipeline YAML:
101
 
102
- 1. **Make your modifications** in the YAML editor
103
- 2. **Click Save** at the bottom of the interface
104
- 3. **Check the status indicator** - a green "Saved" indicator appears on the right side if there are no errors
105
 
106
- ![YAML editor interface](../img/pipeline-yaml-2.jpg)
107
 
108
- Any syntax errors or configuration issues will be highlighted, preventing the save operation until resolved.
109
 
110
- ## Returning to Pipeline Workspace
111
 
112
- To return to the visual pipeline workspace:
113
 
114
- - Click the blue **Pipeline** button on the left side of the interface
115
 
116
- This switches you back to the graphical pipeline editor.
117
 
118
- --- ru ---
119
 
120
- # YAML пайплайна
121
 
122
- **YAML пайплайна** предоставляет комплексный обзор всей конфигурации вашего пайплайна в формате YAML. Это включает все ноды с их расположением, исполняемым кодом, взаимосвязями и различной технической информацией, которая определяет, как работает ваш пайплайн.
123
 
124
- ## Доступ к YAML пайплайна
125
 
126
- Чтобы получить доступ к конфигурации YAML пайплайна:
127
 
128
- 1. Нажмите кнопку **More** в интерфейсе пайплайна
129
- 2. Выберите **YAML** из выпадающего меню
130
 
131
- ![Доступ к YAML пайплайна](../img/pipeline-yaml-1.jpg)
132
 
133
- Это откроет редактор YAML, где вы можете его просматривать и изменять.
134
 
135
- ## Структура YAML
136
 
137
- YAML пайплайна следует определенной иерархической структуре:
138
 
139
- ### 1. Метаданные пайплайна
140
  ```yaml
141
- name: en=Pipeline Name;ru=Название пайплайна
142
  version: 1
143
- description: en=Pipeline description;ru=Описание пайплайна
144
  readme: {}
145
  category:
146
  _id: category_id
147
- title: en=Category;ru=Категория
148
- icon: category_icon
149
  ```
150
 
151
- Этот раздел содержит базовую информацию о пайплайне, включая название, описание и категоризацию.
152
 
153
- ### 2. Конфигурация запуска
154
  ```yaml
155
  start:
156
  nodes:
157
  - first_node_id
158
  ```
159
 
160
- Определяет, какая нода служит стартовой точкой для выполнения пайплайна.
161
 
162
- ### 3. Входы и выходы
163
  ```yaml
164
  inputs:
165
- input_name:
166
- order: 1
167
- title: en=Input Title;ru=Название входа
168
  type: string
169
- required: true
170
- # Дополнительные параметры входа
171
 
172
  outputs:
173
- output_name:
174
- title: en=Output Title;ru=Название выхода
175
- type: string
176
- # Конфигурация выхода
177
  ```
178
 
179
- Здесь определены все входы и выходы пайплайна для всех нод.
180
 
181
- ### 4. Потоки (соединения нод)
182
  ```yaml
183
  flows:
184
  connection_name:
@@ -188,9 +182,9 @@ flows:
188
  input: input_parameter
189
  ```
190
 
191
- Этот раздел описывает, как данные передаются между нодами, связывая выходы одной ноды с входами другой.
192
 
193
- ### 5. Конфигурация нод
194
  ```yaml
195
  nodes:
196
  node_id:
@@ -199,33 +193,33 @@ nodes:
199
  source: node|catalog
200
  execution: rapid|regular|deferred|protracted
201
  script: |
202
- // JavaScript код
203
  inputs:
204
- # Определения входов ноды
205
  outputs:
206
- # Определения выходов ноды
207
- environment:
208
- # Переменные окружения
209
  ```
210
 
211
- Каждая нода в пайплайне полностью описана со своей конфигурацией, кодом и параметрами.
212
 
213
- ## Редактирование и сохранение
214
 
215
- При внесении изменений в YAML пайплайна:
216
 
217
- 1. **Внесите свои изменения** в редакторе YAML
218
- 2. **Нажмите Save** внизу интерфейса
219
- 3. **Проверьте индикатор состояния** - зеленый индикатор "Saved" появится справа, если нет ошибок
220
 
221
- ![Интерфейс редактора YAML](../img/pipeline-yaml-2.jpg)
222
 
223
- Любые синтаксические ошибки или проблемы конфигурации будут выделены, предотвращая операцию сохранения до их устранения.
224
 
225
- ## Возврат в рабочее пространство пайплайна
226
 
227
- Чтобы вернуться в визуальное рабочее пространство пайплайна:
228
 
229
- - Нажмите синюю кнопку **Pipeline** слева в интерфейсе
230
 
231
- Это переключит вас обратно в графический редактор пайплайна.
 
2
  sidebar_position: 4
3
  ---
4
 
5
+ # YAML для пайплайны
6
 
7
+ **YAML пайплайна** предоставляет комплексный обзор всей конфигурации вашего пайплайна в формате YAML. Это включает все ноды с их расположением, исполняемым кодом, взаимосвязями и различной технической информацией, которая определяет, как работает пайплайн.
8
 
9
+ ## Доступ к YAML пайплайна
10
 
11
+ Чтобы получить доступ к конфигурации YAML пайплайна:
12
 
13
+ 1. Нажмите кнопку **More** в интерфейсе пайплайна
14
+ 2. Выберите **YAML** из выпадающего меню
15
 
16
+ ![Доступ к YAML пайплайна](../img/pipeline-yaml-1.jpg)
17
 
18
+ Это откроет редактор YAML, где вы можете его просматривать и изменять.
19
 
20
+ ## Структура YAML
21
 
22
+ YAML пайплайна следует определенной иерархической структуре:
23
 
24
+ ### 1. Метаданные пайплайна
25
  ```yaml
26
+ name: Pipeline Name
27
  version: 1
28
+ description: Pipeline description
29
  readme: {}
30
  category:
31
  _id: category_id
32
+ title: Category
 
33
  ```
34
 
35
+ Этот раздел содержит базовую информацию о пайплайне, включая название, описание и категоризацию.
36
 
37
+ ### 2. Конфигурация запуска
38
  ```yaml
39
  start:
40
  nodes:
41
  - first_node_id
42
  ```
43
 
44
+ Определяет, какая нода служит стартовой точкой для выполнения пайплайна.
45
 
46
+ ### 3. Входы и выходы
47
  ```yaml
48
  inputs:
49
+ string1:
50
+ title: String 1
 
51
  type: string
52
+ # Параметры входных данных
 
53
 
54
  outputs:
55
+ json_output:
56
+ title: JSON
57
+ type: json
58
+ # Параметры выходных данных
59
  ```
60
 
61
+ Здесь определены все входы и выходы для всех нод, размещённые на рабочем пространстве пайплайны.
62
 
63
+ ### 4. Потоки (соединения нод)
64
  ```yaml
65
  flows:
66
  connection_name:
 
70
  input: input_parameter
71
  ```
72
 
73
+ Этот раздел описывает, как данные передаются между нодами, связывая выходы одной ноды с входами другой.
74
 
75
+ ### 5. Конфигурация нод
76
  ```yaml
77
  nodes:
78
  node_id:
 
81
  source: node|catalog
82
  execution: rapid|regular|deferred|protracted
83
  script: |
84
+ // JavaScript код
85
  inputs:
86
+ # Определения входов ноды
87
  outputs:
88
+ # Определения выходов ноды
89
+ arrange:
90
+ # Расположение ноды
91
  ```
92
 
93
+ Каждая нода в пайплайне полностью описана со всеми параметрами и кодом.
94
 
95
+ ## Редактирование и сохранение
96
 
97
+ При внесении изменений в YAML пайплайна:
98
 
99
+ 1. **Внесите свои изменения** в редакторе YAML
100
+ 2. **Нажмите Save** внизу интерфейса
101
+ 3. **Проверьте индикатор состояния** - зеленый индикатор "Saved" появится справа, если нет ошибок
102
 
103
+ ![Интерфейс редактора YAML](../img/pipeline-yaml-2.jpg)
104
 
105
+ Любые синтаксические ошибки или проблемы конфигурации будут выделены, предотвращая операцию сохранения до их устранения.
106
 
107
+ ## Возврат в рабочее пространство пайплайна
108
 
109
+ Чтобы вернуться в визуальное рабочее пространство пайплайна:
110
 
111
+ - Нажмите синюю кнопку **Pipeline** слева в интерфейсе
112
 
113
+ Это переключит вас обратно в графический редактор пайплайна.
114
 
115
+ --- eng ---
116
 
117
+ # Pipeline YAML
118
 
119
+ **Pipeline YAML** provides a comprehensive overview of your entire pipeline configuration in YAML format. This includes all nodes with their positioning, executable code, relationships, and various technical information that defines how the pipeline operates.
120
 
121
+ ## Accessing Pipeline YAML
122
 
123
+ To access the pipeline YAML configuration:
124
 
125
+ 1. Click the **More** button in the pipeline interface
126
+ 2. Select **YAML** from the dropdown menu
127
 
128
+ ![Pipeline YAML Access](../img/pipeline-yaml-1.jpg)
129
 
130
+ This opens the YAML editor where you can view and modify it.
131
 
132
+ ## YAML Structure
133
 
134
+ The pipeline YAML follows a specific hierarchical structure:
135
 
136
+ ### 1. Pipeline Metadata
137
  ```yaml
138
+ name: Pipeline Name
139
  version: 1
140
+ description: Pipeline description
141
  readme: {}
142
  category:
143
  _id: category_id
144
+ title: Category
 
145
  ```
146
 
147
+ This section contains basic information about the pipeline, including name, description, and categorization.
148
 
149
+ ### 2. Start Configuration
150
  ```yaml
151
  start:
152
  nodes:
153
  - first_node_id
154
  ```
155
 
156
+ Defines which node serves as the starting point for pipeline execution.
157
 
158
+ ### 3. Inputs and Outputs
159
  ```yaml
160
  inputs:
161
+ string1:
162
+ title: String 1
 
163
  type: string
164
+ # Input parameters
 
165
 
166
  outputs:
167
+ json_output:
168
+ title: JSON
169
+ type: json
170
+ # Output parameters
171
  ```
172
 
173
+ Here all inputs and outputs for all nodes placed in the pipeline workspace are defined.
174
 
175
+ ### 4. Flows (Node Connections)
176
  ```yaml
177
  flows:
178
  connection_name:
 
182
  input: input_parameter
183
  ```
184
 
185
+ This section describes how data flows between nodes, connecting outputs of one node to inputs of another.
186
 
187
+ ### 5. Node Configuration
188
  ```yaml
189
  nodes:
190
  node_id:
 
193
  source: node|catalog
194
  execution: rapid|regular|deferred|protracted
195
  script: |
196
+ // JavaScript code
197
  inputs:
198
+ # Node input definitions
199
  outputs:
200
+ # Node output definitions
201
+ arrange:
202
+ # Node positioning
203
  ```
204
 
205
+ Each node in the pipeline is fully described with all its parameters and code.
206
 
207
+ ## Editing and Saving
208
 
209
+ When making changes to the pipeline YAML:
210
 
211
+ 1. **Make your changes** in the YAML editor
212
+ 2. **Click Save** at the bottom of the interface
213
+ 3. **Check the status indicator** - a green "Saved" indicator will appear on the right if there are no errors
214
 
215
+ ![YAML Editor Interface](../img/pipeline-yaml-2.jpg)
216
 
217
+ Any syntax errors or configuration issues will be highlighted, preventing the save operation until they are resolved.
218
 
219
+ ## Returning to Pipeline Workspace
220
 
221
+ To return to the visual pipeline workspace:
222
 
223
+ - Click the blue **Pipeline** button on the left in the interface
224
 
225
+ This will switch you back to the graphical pipeline editor.
docs/img/{create-node-3.webp → create-node-1.png} RENAMED
File without changes
docs/img/{Node-YAML.jpg → create-node-2.png} RENAMED
File without changes
docs/img/{create-node-1.webp → create-node-3.png} RENAMED
File without changes
docs/img/{create-node-2.webp → create-node-4.png} RENAMED
File without changes
docs/img/create-node-4.webp DELETED

Git LFS Details

  • SHA256: 68afe391201b7cb6c3131822d1bfd6912a9d2ef934d1ccf93b4cf91f15e96b1c
  • Pointer size: 129 Bytes
  • Size of remote file: 7.95 kB
docs/img/create-node-5.png ADDED

Git LFS Details

  • SHA256: 55f7d0ebd5cc8090e19d0d10b47d7f4a54ed970581931045079e40ce37c81bd3
  • Pointer size: 130 Bytes
  • Size of remote file: 13.5 kB
docs/img/create-node-6.png ADDED

Git LFS Details

  • SHA256: bcbed09bd2b66f57a8d5fd7e4dab09055d7d3710007631bc2ea1deb501a6eb03
  • Pointer size: 130 Bytes
  • Size of remote file: 12.2 kB
docs/img/create-node-7.png ADDED

Git LFS Details

  • SHA256: 0421ba80f32e1807c87a354f649d302e924ee23146931e457cbb684a766492dd
  • Pointer size: 130 Bytes
  • Size of remote file: 24 kB
docs/img/create-node-8.png ADDED

Git LFS Details

  • SHA256: f62c6f84dee70ae6d0d024e194e9c0559e2db8fc64c5fc6d5c1ac87f90d5741c
  • Pointer size: 130 Bytes
  • Size of remote file: 51 kB
docs/img/node-yaml.png ADDED

Git LFS Details

  • SHA256: 934684e5015f9d4903c8b13e4e335ad55cc611622540c672b165a42611fb7619
  • Pointer size: 130 Bytes
  • Size of remote file: 28.7 kB