@digipair/skill-basic 0.40.0 → 0.41.1
Sign up to get free protection for your applications and to get access to all the features.
- package/index.cjs.js +0 -28
- package/index.esm.js +6 -30
- package/libs/skill-basic/src/lib/skill-basic.d.ts +0 -5
- package/package.json +1 -1
- package/schema.fr.json +0 -100
- package/schema.json +0 -100
package/index.cjs.js
CHANGED
@@ -23,37 +23,9 @@ let BasicService = class BasicService {
|
|
23
23
|
context.variables[name] = result;
|
24
24
|
return result;
|
25
25
|
}
|
26
|
-
async interval(params, _pinsSettingsList, context) {
|
27
|
-
const { time, execute } = params;
|
28
|
-
return setInterval(()=>{
|
29
|
-
engine.executePinsList(execute, context);
|
30
|
-
}, time);
|
31
|
-
}
|
32
|
-
async defer(params, _pinsSettingsList, context) {
|
33
|
-
const { time, execute } = params;
|
34
|
-
return setTimeout(()=>{
|
35
|
-
engine.executePinsList(execute, context);
|
36
|
-
}, time);
|
37
|
-
}
|
38
|
-
async stopInterval(params, _pinsSettingsList, context) {
|
39
|
-
const { id } = params;
|
40
|
-
return clearInterval(id);
|
41
|
-
}
|
42
|
-
async stopDefer(params, _pinsSettingsList, context) {
|
43
|
-
const { id } = params;
|
44
|
-
return clearTimeout(id);
|
45
|
-
}
|
46
26
|
};
|
47
27
|
const transform = (params, pinsSettingsList, context)=>new BasicService().transform(params, pinsSettingsList, context);
|
48
28
|
const setVariable = (params, pinsSettingsList, context)=>new BasicService().setVariable(params, pinsSettingsList, context);
|
49
|
-
const interval = (params, pinsSettingsList, context)=>new BasicService().interval(params, pinsSettingsList, context);
|
50
|
-
const defer = (params, pinsSettingsList, context)=>new BasicService().defer(params, pinsSettingsList, context);
|
51
|
-
const stopInterval = (params, pinsSettingsList, context)=>new BasicService().stopInterval(params, pinsSettingsList, context);
|
52
|
-
const stopDefer = (params, pinsSettingsList, context)=>new BasicService().stopDefer(params, pinsSettingsList, context);
|
53
29
|
|
54
|
-
exports.defer = defer;
|
55
|
-
exports.interval = interval;
|
56
30
|
exports.setVariable = setVariable;
|
57
|
-
exports.stopDefer = stopDefer;
|
58
|
-
exports.stopInterval = stopInterval;
|
59
31
|
exports.transform = transform;
|
package/index.esm.js
CHANGED
@@ -23489,14 +23489,14 @@ function indent(str, spaces) {
|
|
23489
23489
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
23490
23490
|
// match is required
|
23491
23491
|
if (!match) {
|
23492
|
-
return
|
23492
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
|
23493
23493
|
v: nextMatch1
|
23494
23494
|
};
|
23495
23495
|
}
|
23496
23496
|
var token = match.token, offset = match.offset;
|
23497
23497
|
i1 += offset;
|
23498
23498
|
if (token === " ") {
|
23499
|
-
return
|
23499
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
|
23500
23500
|
}
|
23501
23501
|
tokens1 = _to_consumable_array$1(tokens1).concat([
|
23502
23502
|
token
|
@@ -23515,7 +23515,7 @@ function indent(str, spaces) {
|
|
23515
23515
|
if (contextKeys.some(function(el) {
|
23516
23516
|
return el.startsWith(name);
|
23517
23517
|
})) {
|
23518
|
-
return
|
23518
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
|
23519
23519
|
}
|
23520
23520
|
if (dateTimeIdentifiers.some(function(el) {
|
23521
23521
|
return el === name;
|
@@ -23534,9 +23534,9 @@ function indent(str, spaces) {
|
|
23534
23534
|
if (dateTimeIdentifiers.some(function(el) {
|
23535
23535
|
return el.startsWith(name);
|
23536
23536
|
})) {
|
23537
|
-
return
|
23537
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
|
23538
23538
|
}
|
23539
|
-
return
|
23539
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
|
23540
23540
|
v: nextMatch1
|
23541
23541
|
};
|
23542
23542
|
};
|
@@ -27481,32 +27481,8 @@ let BasicService = class BasicService {
|
|
27481
27481
|
context.variables[name] = result;
|
27482
27482
|
return result;
|
27483
27483
|
}
|
27484
|
-
async interval(params, _pinsSettingsList, context) {
|
27485
|
-
const { time, execute } = params;
|
27486
|
-
return setInterval(()=>{
|
27487
|
-
executePinsList(execute, context);
|
27488
|
-
}, time);
|
27489
|
-
}
|
27490
|
-
async defer(params, _pinsSettingsList, context) {
|
27491
|
-
const { time, execute } = params;
|
27492
|
-
return setTimeout(()=>{
|
27493
|
-
executePinsList(execute, context);
|
27494
|
-
}, time);
|
27495
|
-
}
|
27496
|
-
async stopInterval(params, _pinsSettingsList, context) {
|
27497
|
-
const { id } = params;
|
27498
|
-
return clearInterval(id);
|
27499
|
-
}
|
27500
|
-
async stopDefer(params, _pinsSettingsList, context) {
|
27501
|
-
const { id } = params;
|
27502
|
-
return clearTimeout(id);
|
27503
|
-
}
|
27504
27484
|
};
|
27505
27485
|
const transform = (params, pinsSettingsList, context)=>new BasicService().transform(params, pinsSettingsList, context);
|
27506
27486
|
const setVariable = (params, pinsSettingsList, context)=>new BasicService().setVariable(params, pinsSettingsList, context);
|
27507
|
-
const interval = (params, pinsSettingsList, context)=>new BasicService().interval(params, pinsSettingsList, context);
|
27508
|
-
const defer = (params, pinsSettingsList, context)=>new BasicService().defer(params, pinsSettingsList, context);
|
27509
|
-
const stopInterval = (params, pinsSettingsList, context)=>new BasicService().stopInterval(params, pinsSettingsList, context);
|
27510
|
-
const stopDefer = (params, pinsSettingsList, context)=>new BasicService().stopDefer(params, pinsSettingsList, context);
|
27511
27487
|
|
27512
|
-
export {
|
27488
|
+
export { setVariable, transform };
|
@@ -1,8 +1,3 @@
|
|
1
|
-
/// <reference types="node" />
|
2
1
|
import { PinsSettings } from '@digipair/engine';
|
3
2
|
export declare const transform: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
4
3
|
export declare const setVariable: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
5
|
-
export declare const interval: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<NodeJS.Timeout>;
|
6
|
-
export declare const defer: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<NodeJS.Timeout>;
|
7
|
-
export declare const stopInterval: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<void>;
|
8
|
-
export declare const stopDefer: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<void>;
|
package/package.json
CHANGED
package/schema.fr.json
CHANGED
@@ -78,106 +78,6 @@
|
|
78
78
|
],
|
79
79
|
"x-events": []
|
80
80
|
}
|
81
|
-
},
|
82
|
-
"/defer": {
|
83
|
-
"post": {
|
84
|
-
"tags": ["web", "service", "spatial"],
|
85
|
-
"summary": "Différer l'exécution",
|
86
|
-
"description": "Diffère l'exécution d'une action",
|
87
|
-
"parameters": [
|
88
|
-
{
|
89
|
-
"name": "time",
|
90
|
-
"summary": "Temps",
|
91
|
-
"required": true,
|
92
|
-
"description": "Temps en millisecondes avant l'exécution",
|
93
|
-
"schema": {
|
94
|
-
"type": "number"
|
95
|
-
}
|
96
|
-
},
|
97
|
-
{
|
98
|
-
"name": "execute",
|
99
|
-
"summary": "Exécute",
|
100
|
-
"required": true,
|
101
|
-
"description": "Actions à différer",
|
102
|
-
"schema": {
|
103
|
-
"type": "array",
|
104
|
-
"items": {
|
105
|
-
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
106
|
-
}
|
107
|
-
}
|
108
|
-
}
|
109
|
-
],
|
110
|
-
"x-events": []
|
111
|
-
}
|
112
|
-
},
|
113
|
-
"/interval": {
|
114
|
-
"post": {
|
115
|
-
"tags": ["web", "service", "spatial"],
|
116
|
-
"summary": "Intervalle",
|
117
|
-
"description": "Exécute une action à intervalle régulier",
|
118
|
-
"parameters": [
|
119
|
-
{
|
120
|
-
"name": "time",
|
121
|
-
"summary": "Temps",
|
122
|
-
"required": true,
|
123
|
-
"description": "Temps en millisecondes entre chaque exécution",
|
124
|
-
"schema": {
|
125
|
-
"type": "number"
|
126
|
-
}
|
127
|
-
},
|
128
|
-
{
|
129
|
-
"name": "execute",
|
130
|
-
"summary": "Exécute",
|
131
|
-
"required": true,
|
132
|
-
"description": "Actions à exécuter",
|
133
|
-
"schema": {
|
134
|
-
"type": "array",
|
135
|
-
"items": {
|
136
|
-
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
137
|
-
}
|
138
|
-
}
|
139
|
-
}
|
140
|
-
],
|
141
|
-
"x-events": []
|
142
|
-
}
|
143
|
-
},
|
144
|
-
"/stopInterval": {
|
145
|
-
"post": {
|
146
|
-
"tags": ["web", "service", "spatial"],
|
147
|
-
"summary": "Arrêter l'intervalle",
|
148
|
-
"description": "Arrête l'intervalle d'exécution",
|
149
|
-
"parameters": [
|
150
|
-
{
|
151
|
-
"name": "id",
|
152
|
-
"summary": "ID",
|
153
|
-
"required": true,
|
154
|
-
"description": "ID de l'intervalle à arrêter",
|
155
|
-
"schema": {
|
156
|
-
"type": "object"
|
157
|
-
}
|
158
|
-
}
|
159
|
-
],
|
160
|
-
"x-events": []
|
161
|
-
}
|
162
|
-
},
|
163
|
-
"/stopDefer": {
|
164
|
-
"post": {
|
165
|
-
"tags": ["web", "service", "spatial"],
|
166
|
-
"summary": "Arrêter le différé",
|
167
|
-
"description": "Arrête le différé d'exécution",
|
168
|
-
"parameters": [
|
169
|
-
{
|
170
|
-
"name": "id",
|
171
|
-
"summary": "ID",
|
172
|
-
"required": true,
|
173
|
-
"description": "ID du différé à arrêter",
|
174
|
-
"schema": {
|
175
|
-
"type": "object"
|
176
|
-
}
|
177
|
-
}
|
178
|
-
],
|
179
|
-
"x-events": []
|
180
|
-
}
|
181
81
|
}
|
182
82
|
},
|
183
83
|
"components": {
|
package/schema.json
CHANGED
@@ -78,106 +78,6 @@
|
|
78
78
|
],
|
79
79
|
"x-events": []
|
80
80
|
}
|
81
|
-
},
|
82
|
-
"/defer": {
|
83
|
-
"post": {
|
84
|
-
"tags": ["web", "service", "spatial"],
|
85
|
-
"summary": "Defer",
|
86
|
-
"description": "Executes an action after a delay",
|
87
|
-
"parameters": [
|
88
|
-
{
|
89
|
-
"name": "time",
|
90
|
-
"summary": "Time",
|
91
|
-
"required": true,
|
92
|
-
"description": "Time in milliseconds to wait before executing",
|
93
|
-
"schema": {
|
94
|
-
"type": "number"
|
95
|
-
}
|
96
|
-
},
|
97
|
-
{
|
98
|
-
"name": "execute",
|
99
|
-
"summary": "Execute",
|
100
|
-
"required": true,
|
101
|
-
"description": "Actions to execute",
|
102
|
-
"schema": {
|
103
|
-
"type": "array",
|
104
|
-
"items": {
|
105
|
-
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
106
|
-
}
|
107
|
-
}
|
108
|
-
}
|
109
|
-
],
|
110
|
-
"x-events": []
|
111
|
-
}
|
112
|
-
},
|
113
|
-
"/interval": {
|
114
|
-
"post": {
|
115
|
-
"tags": ["web", "service", "spatial"],
|
116
|
-
"summary": "Interval",
|
117
|
-
"description": "Executes an action at regular intervals",
|
118
|
-
"parameters": [
|
119
|
-
{
|
120
|
-
"name": "time",
|
121
|
-
"summary": "Time",
|
122
|
-
"required": true,
|
123
|
-
"description": "Time in milliseconds between each execution",
|
124
|
-
"schema": {
|
125
|
-
"type": "number"
|
126
|
-
}
|
127
|
-
},
|
128
|
-
{
|
129
|
-
"name": "execute",
|
130
|
-
"summary": "Execute",
|
131
|
-
"required": true,
|
132
|
-
"description": "Actions to execute",
|
133
|
-
"schema": {
|
134
|
-
"type": "array",
|
135
|
-
"items": {
|
136
|
-
"$ref": "https://schemas.digipair.ai/pinsSettings"
|
137
|
-
}
|
138
|
-
}
|
139
|
-
}
|
140
|
-
],
|
141
|
-
"x-events": []
|
142
|
-
}
|
143
|
-
},
|
144
|
-
"/stopInterval": {
|
145
|
-
"post": {
|
146
|
-
"tags": ["web", "service", "spatial"],
|
147
|
-
"summary": "Stop the interval",
|
148
|
-
"description": "Stops the interval from executing",
|
149
|
-
"parameters": [
|
150
|
-
{
|
151
|
-
"name": "id",
|
152
|
-
"summary": "ID",
|
153
|
-
"required": true,
|
154
|
-
"description": "ID of the interval to stop",
|
155
|
-
"schema": {
|
156
|
-
"type": "object"
|
157
|
-
}
|
158
|
-
}
|
159
|
-
],
|
160
|
-
"x-events": []
|
161
|
-
}
|
162
|
-
},
|
163
|
-
"/stopDefer": {
|
164
|
-
"post": {
|
165
|
-
"tags": ["web", "service", "spatial"],
|
166
|
-
"summary": "Stop the defer",
|
167
|
-
"description": "Stops the deferred action from executing",
|
168
|
-
"parameters": [
|
169
|
-
{
|
170
|
-
"name": "id",
|
171
|
-
"summary": "ID",
|
172
|
-
"required": true,
|
173
|
-
"description": "ID of the deferred action to stop",
|
174
|
-
"schema": {
|
175
|
-
"type": "object"
|
176
|
-
}
|
177
|
-
}
|
178
|
-
],
|
179
|
-
"x-events": []
|
180
|
-
}
|
181
81
|
}
|
182
82
|
},
|
183
83
|
"components": {
|