@things-factory/integration-base 6.2.44 → 6.2.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/dist-server/engine/connector/operato-connector.js +10 -7
  2. package/dist-server/engine/connector/operato-connector.js.map +1 -1
  3. package/dist-server/engine/types.js.map +1 -1
  4. package/dist-server/service/scenario-instance/scenario-instance-mutation.js +15 -9
  5. package/dist-server/service/scenario-instance/scenario-instance-mutation.js.map +1 -1
  6. package/dist-server/service/scenario-instance/scenario-instance-type.js +2 -1
  7. package/dist-server/service/scenario-instance/scenario-instance-type.js.map +1 -1
  8. package/dist-server/tsconfig.tsbuildinfo +1 -1
  9. package/helps/integration/connector/graphql-connector.ja.md +23 -0
  10. package/helps/integration/connector/graphql-connector.ko.md +23 -0
  11. package/helps/integration/connector/graphql-connector.ms.md +23 -0
  12. package/helps/integration/connector/graphql-connector.zh.md +23 -0
  13. package/helps/integration/connector/mqtt-connector.ja.md +17 -0
  14. package/helps/integration/connector/mqtt-connector.ko.md +17 -0
  15. package/helps/integration/connector/mqtt-connector.ms.md +17 -0
  16. package/helps/integration/connector/mqtt-connector.zh.md +17 -0
  17. package/helps/integration/connector/mssql-connector.ja.md +38 -0
  18. package/helps/integration/connector/mssql-connector.ko.md +38 -0
  19. package/helps/integration/connector/mssql-connector.ms.md +38 -0
  20. package/helps/integration/connector/mssql-connector.zh.md +38 -0
  21. package/helps/integration/connector/postgresql-connector.ja.md +34 -0
  22. package/helps/integration/connector/postgresql-connector.ko.md +34 -0
  23. package/helps/integration/connector/postgresql-connector.ms.md +34 -0
  24. package/helps/integration/connector/postgresql-connector.zh.md +34 -0
  25. package/helps/integration/connector/sqlite-connector.ja.md +17 -0
  26. package/helps/integration/connector/sqlite-connector.ko.md +17 -0
  27. package/helps/integration/connector/sqlite-connector.ms.md +17 -0
  28. package/helps/integration/connector/sqlite-connector.zh.md +17 -0
  29. package/helps/integration/task/book-up-scenario.ja.md +27 -0
  30. package/helps/integration/task/book-up-scenario.ko.md +27 -0
  31. package/helps/integration/task/book-up-scenario.md +21 -21
  32. package/helps/integration/task/book-up-scenario.ms.md +27 -0
  33. package/helps/integration/task/book-up-scenario.zh.md +27 -0
  34. package/helps/integration/task/csv-readline.ja.md +10 -0
  35. package/helps/integration/task/csv-readline.ko.md +10 -0
  36. package/helps/integration/task/csv-readline.md +5 -6
  37. package/helps/integration/task/csv-readline.ms.md +9 -0
  38. package/helps/integration/task/csv-readline.zh.md +9 -0
  39. package/helps/integration/task/data-mapper.ja.md +14 -0
  40. package/helps/integration/task/data-mapper.ko.md +14 -0
  41. package/helps/integration/task/data-mapper.md +11 -11
  42. package/helps/integration/task/data-mapper.ms.md +14 -0
  43. package/helps/integration/task/data-mapper.zh.md +14 -0
  44. package/helps/integration/task/database-query.ja.md +1 -1
  45. package/helps/integration/task/database-query.ko.md +1 -1
  46. package/helps/integration/task/database-query.md +1 -1
  47. package/helps/integration/task/database-query.ms.md +1 -1
  48. package/helps/integration/task/database-query.zh.md +1 -1
  49. package/helps/integration/task/empty-check.ja.md +10 -0
  50. package/helps/integration/task/empty-check.ko.md +10 -0
  51. package/helps/integration/task/empty-check.md +7 -7
  52. package/helps/integration/task/empty-check.ms.md +10 -0
  53. package/helps/integration/task/empty-check.zh.md +10 -0
  54. package/helps/integration/task/end.ja.md +7 -0
  55. package/helps/integration/task/end.ko.md +3 -0
  56. package/helps/integration/task/end.md +6 -2
  57. package/helps/integration/task/end.ms.md +7 -0
  58. package/helps/integration/task/end.zh.md +7 -0
  59. package/helps/integration/task/floating-point.ja.md +34 -0
  60. package/helps/integration/task/floating-point.ko.md +34 -0
  61. package/helps/integration/task/floating-point.md +1 -1
  62. package/helps/integration/task/floating-point.ms.md +34 -0
  63. package/helps/integration/task/floating-point.zh.md +34 -0
  64. package/helps/integration/task/goto.ja.md +8 -0
  65. package/helps/integration/task/goto.ko.md +8 -0
  66. package/helps/integration/task/goto.md +4 -4
  67. package/helps/integration/task/goto.ms.md +8 -0
  68. package/helps/integration/task/goto.zh.md +8 -0
  69. package/helps/integration/task/graphql-mutate.ja.md +1 -1
  70. package/helps/integration/task/graphql-mutate.ko.md +1 -1
  71. package/helps/integration/task/graphql-mutate.md +1 -1
  72. package/helps/integration/task/graphql-mutate.ms.md +1 -1
  73. package/helps/integration/task/graphql-mutate.zh.md +1 -1
  74. package/helps/integration/task/graphql-query.ja.md +1 -1
  75. package/helps/integration/task/graphql-query.ko.md +1 -1
  76. package/helps/integration/task/graphql-query.md +1 -1
  77. package/helps/integration/task/graphql-query.ms.md +1 -1
  78. package/helps/integration/task/graphql-query.zh.md +1 -1
  79. package/helps/integration/task/headless-scrap.ja.md +13 -0
  80. package/helps/integration/task/headless-scrap.ko.md +13 -0
  81. package/helps/integration/task/headless-scrap.md +10 -10
  82. package/helps/integration/task/headless-scrap.ms.md +13 -0
  83. package/helps/integration/task/headless-scrap.zh.md +13 -0
  84. package/helps/integration/task/http-get.ja.md +1 -1
  85. package/helps/integration/task/http-get.ko.md +1 -1
  86. package/helps/integration/task/http-get.md +1 -1
  87. package/helps/integration/task/http-get.ms.md +1 -1
  88. package/helps/integration/task/http-get.zh.md +1 -1
  89. package/helps/integration/task/http-post.ja.md +1 -1
  90. package/helps/integration/task/http-post.ko.md +1 -1
  91. package/helps/integration/task/http-post.md +1 -1
  92. package/helps/integration/task/http-post.ms.md +1 -1
  93. package/helps/integration/task/http-post.zh.md +1 -1
  94. package/helps/integration/task/local-graphql-mutate.ja.md +43 -0
  95. package/helps/integration/task/local-graphql-mutate.ko.md +44 -0
  96. package/helps/integration/task/local-graphql-mutate.md +10 -14
  97. package/helps/integration/task/local-graphql-mutate.ms.md +40 -0
  98. package/helps/integration/task/local-graphql-mutate.zh.md +40 -0
  99. package/helps/integration/task/local-graphql-query.ja.md +42 -0
  100. package/helps/integration/task/local-graphql-query.ko.md +44 -0
  101. package/helps/integration/task/local-graphql-query.md +10 -14
  102. package/helps/integration/task/local-graphql-query.ms.md +41 -0
  103. package/helps/integration/task/local-graphql-query.zh.md +40 -0
  104. package/helps/integration/task/log.ja.md +1 -1
  105. package/helps/integration/task/log.ko.md +1 -1
  106. package/helps/integration/task/log.md +1 -1
  107. package/helps/integration/task/log.ms.md +1 -1
  108. package/helps/integration/task/log.zh.md +1 -1
  109. package/helps/integration/task/mqtt-publish.ja.md +10 -0
  110. package/helps/integration/task/mqtt-publish.ko.md +10 -0
  111. package/helps/integration/task/mqtt-publish.md +7 -7
  112. package/helps/integration/task/mqtt-publish.ms.md +10 -0
  113. package/helps/integration/task/mqtt-publish.zh.md +10 -0
  114. package/helps/integration/task/mqtt-subscribe.ja.md +15 -0
  115. package/helps/integration/task/mqtt-subscribe.ko.md +15 -0
  116. package/helps/integration/task/mqtt-subscribe.md +12 -12
  117. package/helps/integration/task/mqtt-subscribe.ms.md +15 -0
  118. package/helps/integration/task/mqtt-subscribe.zh.md +15 -0
  119. package/helps/integration/task/oracle-procedure.ja.md +1 -1
  120. package/helps/integration/task/oracle-procedure.ko.md +1 -1
  121. package/helps/integration/task/oracle-procedure.md +1 -1
  122. package/helps/integration/task/oracle-procedure.ms.md +1 -1
  123. package/helps/integration/task/oracle-procedure.zh.md +1 -1
  124. package/helps/integration/task/pick-pending-scenario.ja.md +13 -0
  125. package/helps/integration/task/pick-pending-scenario.ko.md +13 -0
  126. package/helps/integration/task/pick-pending-scenario.md +10 -10
  127. package/helps/integration/task/pick-pending-scenario.ms.md +13 -0
  128. package/helps/integration/task/pick-pending-scenario.zh.md +13 -0
  129. package/helps/integration/task/publish.ja.md +16 -0
  130. package/helps/integration/task/publish.ko.md +16 -0
  131. package/helps/integration/task/publish.md +10 -10
  132. package/helps/integration/task/publish.ms.md +16 -0
  133. package/helps/integration/task/publish.zh.md +16 -0
  134. package/helps/integration/task/random.ja.md +13 -0
  135. package/helps/integration/task/random.ko.md +13 -0
  136. package/helps/integration/task/random.md +9 -9
  137. package/helps/integration/task/random.ms.md +13 -0
  138. package/helps/integration/task/random.zh.md +13 -0
  139. package/helps/integration/task/script.ja.md +1 -1
  140. package/helps/integration/task/script.ko.md +1 -1
  141. package/helps/integration/task/script.md +1 -1
  142. package/helps/integration/task/script.ms.md +1 -1
  143. package/helps/integration/task/script.zh.md +1 -1
  144. package/helps/integration/task/set-domain.ja.md +25 -0
  145. package/helps/integration/task/set-domain.ko.md +25 -0
  146. package/helps/integration/task/set-domain.md +12 -12
  147. package/helps/integration/task/set-domain.ms.md +25 -0
  148. package/helps/integration/task/set-domain.zh.md +25 -0
  149. package/helps/integration/task/sleep.ja.md +8 -0
  150. package/helps/integration/task/sleep.ko.md +8 -0
  151. package/helps/integration/task/sleep.md +5 -5
  152. package/helps/integration/task/sleep.ms.md +8 -0
  153. package/helps/integration/task/sleep.zh.md +8 -0
  154. package/helps/integration/task/state-read.ja.md +1 -1
  155. package/helps/integration/task/state-read.ms.md +1 -1
  156. package/helps/integration/task/state-read.zh.md +1 -1
  157. package/helps/integration/task/state-write.ja.md +1 -1
  158. package/helps/integration/task/state-write.ms.md +1 -1
  159. package/helps/integration/task/state-write.zh.md +1 -1
  160. package/helps/integration/task/throw.ja.md +12 -0
  161. package/helps/integration/task/throw.ko.md +12 -0
  162. package/helps/integration/task/throw.md +10 -10
  163. package/helps/integration/task/throw.ms.md +12 -0
  164. package/helps/integration/task/throw.zh.md +12 -0
  165. package/helps/integration/task/variables.ja.md +37 -0
  166. package/helps/integration/task/variables.ko.md +37 -0
  167. package/helps/integration/task/variables.md +11 -11
  168. package/helps/integration/task/variables.ms.md +37 -0
  169. package/helps/integration/task/variables.zh.md +37 -0
  170. package/package.json +7 -7
  171. package/server/engine/connector/operato-connector.ts +23 -5
  172. package/server/engine/types.ts +1 -0
  173. package/server/service/scenario-instance/scenario-instance-mutation.ts +28 -9
  174. package/server/service/scenario-instance/scenario-instance-type.ts +2 -1
  175. /package/helps/integration/connector/{operato-connector.kr.md → operato-connector.ko.md} +0 -0
@@ -0,0 +1,8 @@
1
+ # sleep
2
+
3
+ 'sleep' 파라미터로 지정된 지속 시간만큼 대기하고, 지정된 시간이 만료되면 다음 태스크로 이동한다.
4
+
5
+ ## parameters
6
+
7
+ - 지속 시간
8
+ - 대기해야 하는 시간을 설정한다. 단위는 밀리세컨드(ms)이다.
@@ -1,8 +1,8 @@
1
- # sleep Task
1
+ # sleep
2
2
 
3
- 'sleep' 파라미터로 지정된 지속 시간만큼 대기하고, 지정된 시간이 만료되면 다음 태스크로 이동한다.
3
+ Waits for the specified duration as given by the 'sleep' parameter and moves on to the next task when the specified time elapses.
4
4
 
5
- ## parameters
5
+ ## Parameters
6
6
 
7
- - 지속 시간
8
- - 대기해야 하는 시간을 설정한다. 단위는 밀리세컨드(ms)이다.
7
+ - Duration
8
+ - Sets the time to wait. The unit is milliseconds (ms).
@@ -0,0 +1,8 @@
1
+ # sleep
2
+
3
+ Menunggu selama durasi yang ditentukan oleh parameter 'tidur' dan melanjutkan ke tugas berikutnya ketika waktu yang ditentukan berlalu.
4
+
5
+ ## Parameter
6
+
7
+ - Durasi
8
+ - Menetapkan waktu untuk menunggu. Satuannya adalah milidetik (ms).
@@ -0,0 +1,8 @@
1
+ # sleep
2
+
3
+ 等待由'sleep'参数指定的持续时间,当指定的时间过去后,将移至下一个任务。
4
+
5
+ ## 参数
6
+
7
+ - 持续时间
8
+ - 设置等待的时间。单位为毫秒(ms)。
@@ -1,4 +1,4 @@
1
- # 状態読み取り
1
+ # state-read
2
2
 
3
3
  [状態登録簿(state-register)](../concept/state-register.md)で定義されている状態の値を読み取るタスクです。
4
4
 
@@ -1,4 +1,4 @@
1
- # bacaan keadaan
1
+ # state-read
2
2
 
3
3
  [Daftar keadaan(state-register)](../concept/state-register.md) mendefinisikan tugas untuk membaca nilai suatu keadaan.
4
4
 
@@ -1,4 +1,4 @@
1
- # 读取状态
1
+ # state-read
2
2
 
3
3
  [状态登记册(state-register)](../concept/state-register.md)中定义了一个状态值的读取任务。
4
4
 
@@ -1,4 +1,4 @@
1
- # 状態書き込み
1
+ # state-write
2
2
 
3
3
  [状態登録簿(state-register)](../concept/state-register.md)に定義された一つの状態に値を書き込むタスクです。
4
4
 
@@ -1,4 +1,4 @@
1
- # tulis-keadaan
1
+ # state-write
2
2
 
3
3
  [Daftar keadaan(state-register)](../concept/state-register.md) mendefinisikan tugas untuk menulis nilai ke dalam satu keadaan.
4
4
 
@@ -1,4 +1,4 @@
1
- # 写入状态
1
+ # state-write
2
2
 
3
3
  [状态登记册(state-register)](../concept/state-register.md)中定义了将值写入一个状态的任务。
4
4
 
@@ -0,0 +1,12 @@
1
+ # throw
2
+
3
+ シナリオの実行中に故意に異常な例外をスローするためのタスクです。
4
+ (正常な終了を示す 'end' タスクと区別する必要があります。)
5
+ Throwがシナリオの実行中に実行されると、シナリオの 'preventErrorPropagation' 属性に応じて、例外が親シナリオに伝播されるか、シナリオ内で捕捉され、親シナリオのタスクが通常通り進行することができます。
6
+
7
+ - preventErrorPropagation が true の場合
8
+ - 親シナリオが存在する場合:シナリオを開始した親 'scenario' タスクにも例外が渡されます。結果として、親シナリオも異常な例外が発生します。
9
+ - 親シナリオが存在しない場合:シナリオはシナリオエンジンによって異常終了と見なされます。
10
+ - preventErrorPropagation が false の場合
11
+ - 親シナリオが存在する場合:例外はシナリオを開始した親 'scenario' タスクに渡されないため、結果として親シナリオは通常の進行を続けます。
12
+ - 親シナリオが存在しない場合:シナリオはシナリオエンジンによって正常終了と見なされます。
@@ -0,0 +1,12 @@
1
+ # throw
2
+
3
+ Scenario 진행 중에 강제로 비정상 예외를 던지기 위한 태스크이다.
4
+ (정상종료를 의미하는 'end' 태스크와 구분할 필요가 있다.)
5
+ Scenario 진행 중에 Throw를 하게 되면, 해당 시나리오의 'preventErrorPropagation' 속성에 따라서, 부모 시나리오에 예외가 전파되거나 해당 시나리오에서 캐치되어 정상적으로 상위 시나리오의 태스크가 진행될 수도 있다.
6
+
7
+ - preventErrorPropagation 이 true 인 경우
8
+ - 부모 시나리오가 있는 경우 : 해당 시나리오를 시작한 부모 'scenario' 태스크에도 예외가 전달된다. 결과적으로 부모 시나리오도 비정상 예외가 발생하게 된다.
9
+ - 부모 시나리오가 없는 경우 : 해당 시나리오는 시나리오 엔진에 의해 비정상 종료로 처리된다.
10
+ - preventErrorPropagation 이 false 인 경우
11
+ - 부모 시나리오가 있는 경우 : 해당 시나리오를 시작한 부모 'scenario' 태스크에 예외가 전달되지 않으므로, 결과적으로 부모 시나리오도 정상적인 진행이 계속된다.
12
+ - 부모 시나리오가 없는 경우 : 해당 시나리오는 시나리오 엔진에 의해 정상 종료로 처리된다.
@@ -1,12 +1,12 @@
1
- # Throw
1
+ # throw
2
2
 
3
- Scenario 진행 중에 강제로 비정상 예외를 던지기 위한 태스크이다.
4
- (정상종료를 의미하는 'end' 태스크와 구분할 필요가 있다.)
5
- Scenario 진행 중에 Throw를 하게 되면, 해당 시나리오의 'preventErrorPropagation' 속성에 따라서, 부모 시나리오에 예외가 전파되거나 해당 시나리오에서 캐치되어 정상적으로 상위 시나리오의 태스크가 진행될 수도 있다.
3
+ A task for intentionally throwing an abnormal exception during the scenario execution.
4
+ (It needs to be distinguished from the 'end' task, which signifies normal termination.)
5
+ When Throw is executed during the scenario, depending on the 'preventErrorPropagation' attribute of the scenario, the exception may be propagated to the parent scenario or caught within the scenario, allowing the parent scenario's tasks to proceed normally.
6
6
 
7
- - preventErrorPropagation true 인 경우
8
- - 부모 시나리오가 있는 경우 : 해당 시나리오를 시작한 부모 'scenario' 태스크에도 예외가 전달된다. 결과적으로 부모 시나리오도 비정상 예외가 발생하게 된다.
9
- - 부모 시나리오가 없는 경우 : 해당 시나리오는 시나리오 엔진에 의해 비정상 종료로 처리된다.
10
- - preventErrorPropagation false 인 경우
11
- - 부모 시나리오가 있는 경우 : 해당 시나리오를 시작한 부모 'scenario' 태스크에 예외가 전달되지 않으므로, 결과적으로 부모 시나리오도 정상적인 진행이 계속된다.
12
- - 부모 시나리오가 없는 경우 : 해당 시나리오는 시나리오 엔진에 의해 정상 종료로 처리된다.
7
+ - When preventErrorPropagation is true
8
+ - If there is a parent scenario: The exception is also passed to the parent 'scenario' task that started the scenario. As a result, the parent scenario also experiences an abnormal exception.
9
+ - If there is no parent scenario: The scenario is treated as an abnormal termination by the scenario engine.
10
+ - When preventErrorPropagation is false
11
+ - If there is a parent scenario: The exception is not passed to the parent 'scenario' task that started the scenario. As a result, the parent scenario continues its normal progress.
12
+ - If there is no parent scenario: The scenario is treated as a normal termination by the scenario engine.
@@ -0,0 +1,12 @@
1
+ # throw
2
+
3
+ Tugas untuk sengaja melemparkan pengecualian yang tidak normal selama eksekusi skenario.
4
+ (Harus dibedakan dari tugas 'end', yang menandakan terminasi normal.)
5
+ Ketika Throw dieksekusi selama skenario, tergantung pada atribut 'preventErrorPropagation' dari skenario, pengecualian dapat dipropagasi ke skenario induk atau ditangkap dalam skenario tersebut, memungkinkan tugas skenario induk untuk melanjutkan dengan normal.
6
+
7
+ - Ketika preventErrorPropagation bernilai true
8
+ - Jika ada skenario induk: Pengecualian juga diteruskan ke tugas 'scenario' induk yang memulai skenario. Sebagai hasilnya, skenario induk juga mengalami pengecualian yang tidak normal.
9
+ - Jika tidak ada skenario induk: Skenario dianggap sebagai terminasi yang tidak normal oleh mesin skenario.
10
+ - Ketika preventErrorPropagation bernilai false
11
+ - Jika ada skenario induk: Pengecualian tidak diteruskan ke tugas 'scenario' induk yang memulai skenario. Sebagai hasilnya, skenario induk melanjutkan kemajuan normalnya.
12
+ - Jika tidak ada skenario induk: Skenario dianggap sebagai terminasi normal oleh mesin skenario.
@@ -0,0 +1,12 @@
1
+ # throw
2
+
3
+ 用于在场景执行期间故意引发异常的任务。
4
+ (需要与表示正常终止的 'end' 任务区分开来。)
5
+ 当在场景执行期间执行Throw时,取决于场景的 'preventErrorPropagation' 属性,异常可能会传播到父场景,或者在场景内捕获,从而允许父场景的任务正常进行。
6
+
7
+ - 当 preventErrorPropagation 为 true 时
8
+ - 如果有父场景:异常也会传递到启动场景的父 'scenario' 任务。结果,父场景也会经历异常。
9
+ - 如果没有父场景:场景被场景引擎视为异常终止。
10
+ - 当 preventErrorPropagation 为 false 时
11
+ - 如果有父场景:异常不会传递到启动场景的父 'scenario' 任务。结果,父场景将继续正常进展。
12
+ - 如果没有父场景:场景被场景引擎视为正常终止。
@@ -0,0 +1,37 @@
1
+ # variables
2
+
3
+ これは[シナリオコンテキスト](../concept/scenario-context.md)のデータにシナリオの入力変数を追加するタスクです。
4
+ Variables Taskはその後のステップのタスクでシナリオ入力変数を使用できるように、シナリオが開始されたときに受け取った入力変数をそのまま返すタスクです。
5
+
6
+ 例えば、
7
+
8
+ - シナリオの入力変数の値
9
+
10
+ ```
11
+ {
12
+ inputA: "ABC",
13
+ inputB: "DEF"
14
+ }
15
+ ```
16
+
17
+ そして、
18
+
19
+ - Variables Taskの名前が "VARIABLES" の場合、
20
+ - Variables Taskが完了した後、Scenario Contextのデータには次のような値が追加されます。
21
+
22
+ ```
23
+ # scenario.context.data
24
+ {
25
+ ...,
26
+ VARIALBES: {
27
+ inputA: "ABC",
28
+ inputB: "DEF"
29
+ },
30
+ ...
31
+ }
32
+
33
+ ```
34
+
35
+ ## パラメータ
36
+
37
+ このタスクには特定の属性が定義されていません。
@@ -0,0 +1,37 @@
1
+ # variables
2
+
3
+ Scenario의 입력변수를 [Scenario Context](../concept/scenario-context.md) Data에 추가하는 태스크이다.
4
+ Variables Task는 이후 Step의 Task에서 Scenario Input 변수를 사용할 수 있도록, Scenario 시작 시에 받은 Input 변수들을 그대로 리턴하는 태스크이다.
5
+
6
+ 예를 들어,
7
+
8
+ - Scenario Input 변수값
9
+
10
+ ```
11
+ {
12
+ inputA: "ABC",
13
+ inputB: "DEF"
14
+ }
15
+ ```
16
+
17
+ 이고,
18
+
19
+ - Variables Task의 이름이 "VARIABLES" 인 경우,
20
+ - Variables Task가 완료된 후에 Scenario Context의 Data에는 다음과 같은 값이 추가되게 된다.
21
+
22
+ ```
23
+ # scenario.context.data
24
+ {
25
+ ...,
26
+ VARIALBES: {
27
+ inputA: "ABC",
28
+ inputB: "DEF"
29
+ },
30
+ ...
31
+ }
32
+
33
+ ```
34
+
35
+ ## parameters
36
+
37
+ 이 Task에는 별도 속성이 정의되지 않는다.
@@ -1,11 +1,11 @@
1
- # Variables
1
+ # variables
2
2
 
3
- Scenario 입력변수를 [Scenario Context](../concept/scenario-context.md) Data에 추가하는 태스크이다.
4
- Variables Task 이후 Step의 Task에서 Scenario Input 변수를 사용할 있도록, Scenario 시작 시에 받은 Input 변수들을 그대로 리턴하는 태스크이다.
3
+ This is a task that adds Scenario input variables to the [Scenario Context](../concept/scenario-context.md) Data.
4
+ The Variables Task returns the input variables received at the start of the Scenario as they are, allowing Scenario Input variables to be used in subsequent Step tasks.
5
5
 
6
- 예를 들어,
6
+ For example,
7
7
 
8
- - Scenario Input 변수값
8
+ - Scenario Input variable values
9
9
 
10
10
  ```
11
11
  {
@@ -14,16 +14,16 @@ Variables Task는 이후 Step의 Task에서 Scenario Input 변수를 사용할
14
14
  }
15
15
  ```
16
16
 
17
- 이고,
17
+ And,
18
18
 
19
- - Variables Task 이름이 "VARIABLES" 인 경우,
20
- - Variables Task 완료된 후에 Scenario Context의 Data에는 다음과 같은 값이 추가되게 된다.
19
+ - If the name of the Variables Task is "VARIABLES",
20
+ - After the Variables Task is completed, the following values will be added to the Scenario Context's Data:
21
21
 
22
22
  ```
23
23
  # scenario.context.data
24
24
  {
25
25
  ...,
26
- VARIALBES: {
26
+ VARIABLES: {
27
27
  inputA: "ABC",
28
28
  inputB: "DEF"
29
29
  },
@@ -32,6 +32,6 @@ Variables Task는 이후 Step의 Task에서 Scenario Input 변수를 사용할
32
32
 
33
33
  ```
34
34
 
35
- ## parameters
35
+ ## Parameters
36
36
 
37
- Task에는 별도 속성이 정의되지 않는다.
37
+ This task does not have specific attributes defined.
@@ -0,0 +1,37 @@
1
+ # variables
2
+
3
+ Ini adalah tugas yang menambah pembolehubah input Skenario ke Data [Konteks Skenario](../concept/scenario-context.md).
4
+ Tugas Pembolehubah mengembalikan pembolehubah input yang diterima pada permulaan Skenario sebagaimana adanya, membolehkan pembolehubah input Skenario digunakan dalam tugas Langkah berikutnya.
5
+
6
+ Sebagai contoh,
7
+
8
+ - Nilai pembolehubah input Skenario
9
+
10
+ ```
11
+ {
12
+ inputA: "ABC",
13
+ inputB: "DEF"
14
+ }
15
+ ```
16
+
17
+ Dan,
18
+
19
+ - Jika nama Tugas Pembolehubah adalah "VARIABLES",
20
+ - Setelah Tugas Pembolehubah selesai, nilai berikut akan ditambahkan ke Data Konteks Skenario:
21
+
22
+ ```
23
+ # scenario.context.data
24
+ {
25
+ ...,
26
+ VARIABLES: {
27
+ inputA: "ABC",
28
+ inputB: "DEF"
29
+ },
30
+ ...
31
+ }
32
+
33
+ ```
34
+
35
+ ## Parameter
36
+
37
+ Tugas ini tidak mempunyai atribut khusus yang ditentukan.
@@ -0,0 +1,37 @@
1
+ # variables
2
+
3
+ 这是一个将场景输入变量添加到[场景上下文](../concept/scenario-context.md)数据中的任务。
4
+ Variables Task将在场景开始时接收到的输入变量原样返回,从而允许在后续步骤任务中使用场景输入变量。
5
+
6
+ 例如,
7
+
8
+ - 场景输入变量值
9
+
10
+ ```
11
+ {
12
+ inputA: "ABC",
13
+ inputB: "DEF"
14
+ }
15
+ ```
16
+
17
+ 而且,
18
+
19
+ - 如果Variables Task的名称为 "VARIABLES",
20
+ - Variables Task完成后,将以下值添加到场景上下文的数据中:
21
+
22
+ ```
23
+ # scenario.context.data
24
+ {
25
+ ...,
26
+ VARIABLES: {
27
+ inputA: "ABC",
28
+ inputB: "DEF"
29
+ },
30
+ ...
31
+ }
32
+
33
+ ```
34
+
35
+ ## 参数
36
+
37
+ 此任务没有特定定义的属性。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/integration-base",
3
- "version": "6.2.44",
3
+ "version": "6.2.49",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -26,12 +26,12 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "@apollo/client": "^3.6.9",
29
- "@things-factory/api": "^6.2.44",
30
- "@things-factory/auth-base": "^6.2.44",
29
+ "@things-factory/api": "^6.2.49",
30
+ "@things-factory/auth-base": "^6.2.49",
31
31
  "@things-factory/env": "^6.2.33",
32
- "@things-factory/oauth2-client": "^6.2.44",
33
- "@things-factory/scheduler-client": "^6.2.44",
34
- "@things-factory/shell": "^6.2.44",
32
+ "@things-factory/oauth2-client": "^6.2.49",
33
+ "@things-factory/scheduler-client": "^6.2.49",
34
+ "@things-factory/shell": "^6.2.48",
35
35
  "async-mqtt": "^2.5.0",
36
36
  "chance": "^1.1.11",
37
37
  "cross-fetch": "^3.0.4",
@@ -46,5 +46,5 @@
46
46
  "devDependencies": {
47
47
  "@types/cron": "^2.0.1"
48
48
  },
49
- "gitHead": "a2a1ebf823f6b1315e751b12a01372e9a867d7af"
49
+ "gitHead": "57266c96220301729f9c5cd633af1a4e2a651096"
50
50
  }
@@ -40,12 +40,31 @@ const cache = new InMemoryCache({
40
40
  export const GRAPHQL_URI = '/graphql'
41
41
  export const SUBSCRIPTION_URI = GRAPHQL_URI
42
42
 
43
- async function checkPermission(privilegeObject: PrivilegeObject, user: User, domain: Domain): Promise<boolean> {
44
- if (!privilegeObject || !privilegeObject.privilege || !privilegeObject.category) {
43
+ async function checkPermission(
44
+ privilegeObject: PrivilegeObject,
45
+ user: User,
46
+ domain: Domain,
47
+ protectedIP: boolean
48
+ ): Promise<boolean> {
49
+ if (!privilegeObject) {
45
50
  return true
46
51
  }
47
52
 
48
- const { owner: domainOwnerGranted, super: superUserGranted, category, privilege } = privilegeObject
53
+ const {
54
+ owner: domainOwnerGranted,
55
+ super: superUserGranted,
56
+ category,
57
+ privilege,
58
+ protected: protectedIPOnly
59
+ } = privilegeObject
60
+
61
+ if (protectedIPOnly && !protectedIP) {
62
+ return false
63
+ }
64
+
65
+ if (!privilege || !category) {
66
+ return true
67
+ }
49
68
 
50
69
  return (
51
70
  (domainOwnerGranted && (await process.domainOwnerGranted(domain, user))) ||
@@ -62,7 +81,6 @@ interface SubscriberData {
62
81
  ;``
63
82
 
64
83
  export class OperatoConnector implements Connector {
65
- private subscriptions: SubscriberData[] = []
66
84
  private context: any
67
85
 
68
86
  async ready(connectionConfigs) {
@@ -224,7 +242,7 @@ export class OperatoConnector implements Connector {
224
242
  throw new Error(`scenario is not found - ${tag}`)
225
243
  }
226
244
 
227
- if (!(await checkPermission(scenario.privilege, user, domain))) {
245
+ if (!(await checkPermission(scenario.privilege, user, domain, false))) {
228
246
  const { category, privilege } = scenario.privilege || {}
229
247
  throw new Error(`Unauthorized! ${category}-${privilege} privilege required`)
230
248
  }
@@ -14,6 +14,7 @@ export type Context = {
14
14
  domain: Object
15
15
  user: Object
16
16
  lng: string
17
+ protected: boolean | undefined
17
18
  logger: any
18
19
  publish: Function
19
20
  load: Function
@@ -31,12 +31,31 @@ async function findScenario(
31
31
  return scenario as any
32
32
  }
33
33
 
34
- async function checkPermission(privilegeObject: PrivilegeObject, user: User, domain: Domain): Promise<boolean> {
35
- if (!privilegeObject || !privilegeObject.privilege || !privilegeObject.category) {
34
+ async function checkPermission(
35
+ privilegeObject: PrivilegeObject,
36
+ user: User,
37
+ domain: Domain,
38
+ protectedIP?: boolean
39
+ ): Promise<boolean> {
40
+ if (!privilegeObject) {
36
41
  return true
37
42
  }
38
43
 
39
- const { owner: domainOwnerGranted, super: superUserGranted, category, privilege } = privilegeObject
44
+ const {
45
+ owner: domainOwnerGranted,
46
+ super: superUserGranted,
47
+ category,
48
+ privilege,
49
+ protected: protectedIPOnly
50
+ } = privilegeObject || {}
51
+
52
+ if (protectedIPOnly && !protectedIP) {
53
+ return false
54
+ }
55
+
56
+ if (!privilege || !category) {
57
+ return true
58
+ }
40
59
 
41
60
  return (
42
61
  (domainOwnerGranted && (await process.domainOwnerGranted(domain, user))) ||
@@ -56,7 +75,7 @@ export class ScenarioInstanceMutation {
56
75
  @Arg('variables', type => ScalarObject, { nullable: true }) variables: any,
57
76
  @Ctx() context: ResolverContext
58
77
  ): Promise<ScenarioInstance> {
59
- const { domain, user, lng } = context.state
78
+ const { domain, user, lng, protected: protectedIP } = context.state
60
79
 
61
80
  debug('runScenario', scenarioName, instanceName, variables)
62
81
 
@@ -70,7 +89,7 @@ export class ScenarioInstanceMutation {
70
89
  )
71
90
  }
72
91
 
73
- if (!(await checkPermission(scenario.privilege, user, domain))) {
92
+ if (!(await checkPermission(scenario.privilege, user, domain, protectedIP))) {
74
93
  throw new Error(`Unauthorized!`)
75
94
  }
76
95
 
@@ -96,7 +115,7 @@ export class ScenarioInstanceMutation {
96
115
  @Arg('variables', type => ScalarObject, { nullable: true }) variables: any,
97
116
  @Ctx() context: ResolverContext
98
117
  ): Promise<ScenarioInstance> {
99
- const { domain, user, lng } = context.state
118
+ const { domain, user, lng, protected: protectedIP } = context.state
100
119
 
101
120
  debug('startScenario', instanceName, scenarioName, variables)
102
121
 
@@ -110,7 +129,7 @@ export class ScenarioInstanceMutation {
110
129
  )
111
130
  }
112
131
 
113
- if (!(await checkPermission(scenario.privilege, user, domain))) {
132
+ if (!(await checkPermission(scenario.privilege, user, domain, protectedIP))) {
114
133
  throw new Error(`Unauthorized!`)
115
134
  }
116
135
 
@@ -123,7 +142,7 @@ export class ScenarioInstanceMutation {
123
142
  @Arg('instanceName', { nullable: true }) instanceName: string,
124
143
  @Ctx() context: ResolverContext
125
144
  ): Promise<ScenarioInstance | undefined> {
126
- const { domain, user } = context.state
145
+ const { domain, user, protected: protectedIP } = context.state
127
146
 
128
147
  debug('stopScenario', instanceName)
129
148
 
@@ -140,7 +159,7 @@ export class ScenarioInstanceMutation {
140
159
 
141
160
  var scenario = await findScenario(scenarioInstance.scenarioName, domain)
142
161
 
143
- if (!(await checkPermission(scenario.privilege, user, domain))) {
162
+ if (!(await checkPermission(scenario.privilege, user, domain, protectedIP))) {
144
163
  throw new Error(`Unauthorized!`)
145
164
  }
146
165
 
@@ -153,7 +153,7 @@ export class ScenarioInstance {
153
153
  }
154
154
 
155
155
  constructor(instanceName, { name: scenarioName, steps, domain: scenarioDomain }, context?) {
156
- var { domain, user, lng } = context || {}
156
+ var { domain, user, lng, protected: protectedIP } = context || {}
157
157
  domain ||= scenarioDomain
158
158
 
159
159
  this.instanceName = instanceName
@@ -167,6 +167,7 @@ export class ScenarioInstance {
167
167
  domain,
168
168
  user,
169
169
  lng,
170
+ protected: protectedIP,
170
171
  logger:
171
172
  context?.logger ||
172
173
  createLogger({