@digipair/skill-factory 0.37.5 → 0.38.1
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 +11 -0
- package/index.esm.js +15 -6
- package/libs/skill-factory/src/lib/skill-factory.d.ts +2 -0
- package/package.json +1 -1
- package/schema.fr.json +37 -0
- package/schema.json +37 -0
package/index.cjs.js
CHANGED
|
@@ -17,12 +17,23 @@ let FactoryService = class FactoryService {
|
|
|
17
17
|
const result = await engine.executePinsList(execute, context);
|
|
18
18
|
return result;
|
|
19
19
|
}
|
|
20
|
+
async keepAlive(_params, _pinsSettingsList, _context) {
|
|
21
|
+
throw 'DIGIPAIR_KEEPALIVE';
|
|
22
|
+
}
|
|
23
|
+
async send(params, _pinsSettingsList, context) {
|
|
24
|
+
const { code = 200, body } = params;
|
|
25
|
+
return context.protected.res.send(code, body);
|
|
26
|
+
}
|
|
20
27
|
};
|
|
21
28
|
let instance;
|
|
22
29
|
const initialize = (launcher)=>(instance = new FactoryService()).initialize(launcher);
|
|
23
30
|
const start = (params, pinsSettingsList, context)=>instance.start(params, pinsSettingsList, context);
|
|
24
31
|
const executeWithContext = (params, pinsSettingsList, context)=>instance.executeWithContext(params, pinsSettingsList, context);
|
|
32
|
+
const keepAlive = (params, pinsSettingsList, context)=>instance.executeWithContext(params, pinsSettingsList, context);
|
|
33
|
+
const send = (params, pinsSettingsList, context)=>instance.send(params, pinsSettingsList, context);
|
|
25
34
|
|
|
26
35
|
exports.executeWithContext = executeWithContext;
|
|
27
36
|
exports.initialize = initialize;
|
|
37
|
+
exports.keepAlive = keepAlive;
|
|
38
|
+
exports.send = send;
|
|
28
39
|
exports.start = start;
|
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 tokens = tokens1,
|
|
23492
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
|
|
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 tokens = tokens1,
|
|
23499
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, "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 tokens = tokens1,
|
|
23518
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, "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 tokens = tokens1,
|
|
23537
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
|
|
23538
23538
|
}
|
|
23539
|
-
return tokens = tokens1,
|
|
23539
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
|
|
23540
23540
|
v: nextMatch1
|
|
23541
23541
|
};
|
|
23542
23542
|
};
|
|
@@ -27475,10 +27475,19 @@ let FactoryService = class FactoryService {
|
|
|
27475
27475
|
const result = await executePinsList(execute, context);
|
|
27476
27476
|
return result;
|
|
27477
27477
|
}
|
|
27478
|
+
async keepAlive(_params, _pinsSettingsList, _context) {
|
|
27479
|
+
throw 'DIGIPAIR_KEEPALIVE';
|
|
27480
|
+
}
|
|
27481
|
+
async send(params, _pinsSettingsList, context) {
|
|
27482
|
+
const { code = 200, body } = params;
|
|
27483
|
+
return context.protected.res.send(code, body);
|
|
27484
|
+
}
|
|
27478
27485
|
};
|
|
27479
27486
|
let instance;
|
|
27480
27487
|
const initialize = (launcher)=>(instance = new FactoryService()).initialize(launcher);
|
|
27481
27488
|
const start = (params, pinsSettingsList, context)=>instance.start(params, pinsSettingsList, context);
|
|
27482
27489
|
const executeWithContext = (params, pinsSettingsList, context)=>instance.executeWithContext(params, pinsSettingsList, context);
|
|
27490
|
+
const keepAlive = (params, pinsSettingsList, context)=>instance.executeWithContext(params, pinsSettingsList, context);
|
|
27491
|
+
const send = (params, pinsSettingsList, context)=>instance.send(params, pinsSettingsList, context);
|
|
27483
27492
|
|
|
27484
|
-
export { executeWithContext, initialize, start };
|
|
27493
|
+
export { executeWithContext, initialize, keepAlive, send, start };
|
|
@@ -2,3 +2,5 @@ import { PinsSettings } from '@digipair/engine';
|
|
|
2
2
|
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 executeWithContext: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
5
|
+
export declare const keepAlive: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
6
|
+
export declare const send: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
package/package.json
CHANGED
package/schema.fr.json
CHANGED
|
@@ -75,6 +75,43 @@
|
|
|
75
75
|
],
|
|
76
76
|
"x-events": []
|
|
77
77
|
}
|
|
78
|
+
},
|
|
79
|
+
"/keepAlive": {
|
|
80
|
+
"post": {
|
|
81
|
+
"tags": ["service"],
|
|
82
|
+
"summary": "Keep-alive HTTP",
|
|
83
|
+
"description": "Garder en vie la connection HTTP",
|
|
84
|
+
"parameters": [],
|
|
85
|
+
"x-events": []
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"/send": {
|
|
89
|
+
"post": {
|
|
90
|
+
"tags": ["service"],
|
|
91
|
+
"summary": "Envoi de données HTTP",
|
|
92
|
+
"description": "Envoi de données à la connection HTTP",
|
|
93
|
+
"parameters": [
|
|
94
|
+
{
|
|
95
|
+
"name": "code",
|
|
96
|
+
"required": false,
|
|
97
|
+
"summary": "Code de retour",
|
|
98
|
+
"description": "Code de retour",
|
|
99
|
+
"schema": {
|
|
100
|
+
"type": "number"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"name": "body",
|
|
105
|
+
"required": false,
|
|
106
|
+
"summary": "Body",
|
|
107
|
+
"description": "Corps de la réponse",
|
|
108
|
+
"schema": {
|
|
109
|
+
"type": "object"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
"x-events": []
|
|
114
|
+
}
|
|
78
115
|
}
|
|
79
116
|
},
|
|
80
117
|
"components": {
|
package/schema.json
CHANGED
|
@@ -75,6 +75,43 @@
|
|
|
75
75
|
],
|
|
76
76
|
"x-events": []
|
|
77
77
|
}
|
|
78
|
+
},
|
|
79
|
+
"/keepAlive": {
|
|
80
|
+
"post": {
|
|
81
|
+
"tags": ["service"],
|
|
82
|
+
"summary": "Keep Alive HTTP",
|
|
83
|
+
"description": "Keep alive the HTTP connection",
|
|
84
|
+
"parameters": [],
|
|
85
|
+
"x-events": []
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"/send": {
|
|
89
|
+
"post": {
|
|
90
|
+
"tags": ["service"],
|
|
91
|
+
"summary": "Send HTTP",
|
|
92
|
+
"description": "Send an HTTP request",
|
|
93
|
+
"parameters": [
|
|
94
|
+
{
|
|
95
|
+
"name": "code",
|
|
96
|
+
"required": false,
|
|
97
|
+
"summary": "Return code",
|
|
98
|
+
"description": "HTTP return code",
|
|
99
|
+
"schema": {
|
|
100
|
+
"type": "number"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"name": "body",
|
|
105
|
+
"required": false,
|
|
106
|
+
"summary": "Body",
|
|
107
|
+
"description": "Body of the request",
|
|
108
|
+
"schema": {
|
|
109
|
+
"type": "object"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
"x-events": []
|
|
114
|
+
}
|
|
78
115
|
}
|
|
79
116
|
},
|
|
80
117
|
"components": {
|