@digipair/skill-factory 0.76.0 → 0.78.0

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.
package/index.cjs.js CHANGED
@@ -25,7 +25,16 @@ let FactoryService = class FactoryService {
25
25
  return result;
26
26
  }
27
27
  async keepAlive(_params, _pinsSettingsList, _context) {
28
- throw 'DIGIPAIR_KEEPALIVE';
28
+ throw {
29
+ type: 'DIGIPAIR_KEEPALIVE'
30
+ };
31
+ }
32
+ async stop(params, _pinsSettingsList, _context) {
33
+ const { value = {} } = params;
34
+ throw {
35
+ type: 'DIGIPAIR_STOP',
36
+ value
37
+ };
29
38
  }
30
39
  async task(params, _pinsSettingsList, context) {
31
40
  const { execute } = params;
@@ -45,6 +54,7 @@ const initialize = (launcher)=>(instance = new FactoryService()).initialize(laun
45
54
  const start = (params, pinsSettingsList, context)=>instance.start(params, pinsSettingsList, context);
46
55
  const execute = (params, pinsSettingsList, context)=>new FactoryService().execute(params, pinsSettingsList, context);
47
56
  const keepAlive = (params, pinsSettingsList, context)=>new FactoryService().keepAlive(params, pinsSettingsList, context);
57
+ const stop = (params, pinsSettingsList, context)=>new FactoryService().stop(params, pinsSettingsList, context);
48
58
  const task = (params, pinsSettingsList, context)=>new FactoryService().task(params, pinsSettingsList, context);
49
59
  const action = (params, pinsSettingsList, context)=>new FactoryService().action(params, pinsSettingsList, context);
50
60
  const trigger = (params, pinsSettingsList, context)=>new FactoryService().trigger(params, pinsSettingsList, context);
@@ -54,5 +64,6 @@ exports.execute = execute;
54
64
  exports.initialize = initialize;
55
65
  exports.keepAlive = keepAlive;
56
66
  exports.start = start;
67
+ exports.stop = stop;
57
68
  exports.task = task;
58
69
  exports.trigger = trigger;
package/index.esm.js CHANGED
@@ -23899,14 +23899,14 @@ function indent(str, spaces) {
23899
23899
  var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
23900
23900
  // match is required
23901
23901
  if (!match) {
23902
- return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
23902
+ return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
23903
23903
  v: nextMatch1
23904
23904
  };
23905
23905
  }
23906
23906
  var token = match.token, offset = match.offset;
23907
23907
  i1 += offset;
23908
23908
  if (token === " ") {
23909
- return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
23909
+ return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
23910
23910
  }
23911
23911
  tokens1 = _to_consumable_array$1(tokens1).concat([
23912
23912
  token
@@ -23925,7 +23925,7 @@ function indent(str, spaces) {
23925
23925
  if (contextKeys.some(function(el) {
23926
23926
  return el.startsWith(name);
23927
23927
  })) {
23928
- return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
23928
+ return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
23929
23929
  }
23930
23930
  if (dateTimeIdentifiers.some(function(el) {
23931
23931
  return el === name;
@@ -23944,9 +23944,9 @@ function indent(str, spaces) {
23944
23944
  if (dateTimeIdentifiers.some(function(el) {
23945
23945
  return el.startsWith(name);
23946
23946
  })) {
23947
- return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
23947
+ return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
23948
23948
  }
23949
- return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
23949
+ return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
23950
23950
  v: nextMatch1
23951
23951
  };
23952
23952
  };
@@ -28001,7 +28001,16 @@ let FactoryService = class FactoryService {
28001
28001
  return result;
28002
28002
  }
28003
28003
  async keepAlive(_params, _pinsSettingsList, _context) {
28004
- throw 'DIGIPAIR_KEEPALIVE';
28004
+ throw {
28005
+ type: 'DIGIPAIR_KEEPALIVE'
28006
+ };
28007
+ }
28008
+ async stop(params, _pinsSettingsList, _context) {
28009
+ const { value = {} } = params;
28010
+ throw {
28011
+ type: 'DIGIPAIR_STOP',
28012
+ value
28013
+ };
28005
28014
  }
28006
28015
  async task(params, _pinsSettingsList, context) {
28007
28016
  const { execute } = params;
@@ -28021,8 +28030,9 @@ const initialize = (launcher)=>(instance = new FactoryService()).initialize(laun
28021
28030
  const start = (params, pinsSettingsList, context)=>instance.start(params, pinsSettingsList, context);
28022
28031
  const execute = (params, pinsSettingsList, context)=>new FactoryService().execute(params, pinsSettingsList, context);
28023
28032
  const keepAlive = (params, pinsSettingsList, context)=>new FactoryService().keepAlive(params, pinsSettingsList, context);
28033
+ const stop = (params, pinsSettingsList, context)=>new FactoryService().stop(params, pinsSettingsList, context);
28024
28034
  const task = (params, pinsSettingsList, context)=>new FactoryService().task(params, pinsSettingsList, context);
28025
28035
  const action = (params, pinsSettingsList, context)=>new FactoryService().action(params, pinsSettingsList, context);
28026
28036
  const trigger = (params, pinsSettingsList, context)=>new FactoryService().trigger(params, pinsSettingsList, context);
28027
28037
 
28028
- export { action, execute, initialize, keepAlive, start, task, trigger };
28038
+ export { action, execute, initialize, keepAlive, start, stop, task, trigger };
@@ -3,6 +3,7 @@ export declare const initialize: (launcher: Function) => Promise<void>;
3
3
  export declare const start: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
4
4
  export declare const execute: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
5
5
  export declare const keepAlive: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<void>;
6
+ export declare const stop: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<void>;
6
7
  export declare const task: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
7
8
  export declare const action: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
8
9
  export declare const trigger: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-factory",
3
- "version": "0.76.0",
3
+ "version": "0.78.0",
4
4
  "keywords": [
5
5
  "digipair",
6
6
  "service",
package/schema.fr.json CHANGED
@@ -93,6 +93,25 @@
93
93
  "parameters": [],
94
94
  "x-events": []
95
95
  }
96
+ },
97
+ "/stop": {
98
+ "post": {
99
+ "tags": ["service"],
100
+ "summary": "Stop",
101
+ "description": "Stop le raisonnement",
102
+ "parameters": [
103
+ {
104
+ "name": "value",
105
+ "required": false,
106
+ "summary": "Valeur",
107
+ "description": "Valeur à retourner",
108
+ "schema": {
109
+ "type": "object"
110
+ }
111
+ }
112
+ ],
113
+ "x-events": []
114
+ }
96
115
  }
97
116
  },
98
117
  "x-scene-blocks": {
@@ -121,18 +140,6 @@
121
140
  "description": "Action exécutable.",
122
141
  "tags": ["service"],
123
142
  "metadata": [
124
- {
125
- "name": "tags",
126
- "summary": "Tags",
127
- "required": true,
128
- "description": "Tags de l'action",
129
- "schema": {
130
- "type": "array",
131
- "items": {
132
- "type": "string"
133
- }
134
- }
135
- },
136
143
  {
137
144
  "name": "parameters",
138
145
  "summary": "Paramètres",
package/schema.json CHANGED
@@ -93,6 +93,25 @@
93
93
  "parameters": [],
94
94
  "x-events": []
95
95
  }
96
+ },
97
+ "/stop": {
98
+ "post": {
99
+ "tags": ["service"],
100
+ "summary": "Stop",
101
+ "description": "Stop the reasoning",
102
+ "parameters": [
103
+ {
104
+ "name": "value",
105
+ "required": false,
106
+ "summary": "Value",
107
+ "description": "Value to return",
108
+ "schema": {
109
+ "type": "object"
110
+ }
111
+ }
112
+ ],
113
+ "x-events": []
114
+ }
96
115
  }
97
116
  },
98
117
  "components": {
@@ -153,18 +172,6 @@
153
172
  "description": "Executable action.",
154
173
  "tags": ["service"],
155
174
  "metadata": [
156
- {
157
- "name": "tags",
158
- "summary": "Tags",
159
- "required": true,
160
- "description": "Action tags",
161
- "schema": {
162
- "type": "array",
163
- "items": {
164
- "type": "string"
165
- }
166
- }
167
- },
168
175
  {
169
176
  "name": "parameters",
170
177
  "summary": "Parameters",