@digipair/skill-factory 0.45.3 → 0.45.5
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
|
@@ -28,6 +28,10 @@ let FactoryService = class FactoryService {
|
|
|
28
28
|
const { code = 200 } = params;
|
|
29
29
|
return context.protected.res.status(code);
|
|
30
30
|
}
|
|
31
|
+
async headers(params, _pinsSettingsList, context) {
|
|
32
|
+
const { headers } = params;
|
|
33
|
+
return context.protected.res.set(headers);
|
|
34
|
+
}
|
|
31
35
|
};
|
|
32
36
|
let instance;
|
|
33
37
|
const initialize = (launcher)=>(instance = new FactoryService()).initialize(launcher);
|
|
@@ -35,9 +39,13 @@ const start = (params, pinsSettingsList, context)=>instance.start(params, pinsSe
|
|
|
35
39
|
const executeWithContext = (params, pinsSettingsList, context)=>instance.executeWithContext(params, pinsSettingsList, context);
|
|
36
40
|
const keepAlive = (params, pinsSettingsList, context)=>instance.keepAlive(params, pinsSettingsList, context);
|
|
37
41
|
const send = (params, pinsSettingsList, context)=>instance.send(params, pinsSettingsList, context);
|
|
42
|
+
const status = (params, pinsSettingsList, context)=>instance.status(params, pinsSettingsList, context);
|
|
43
|
+
const headers = (params, pinsSettingsList, context)=>instance.headers(params, pinsSettingsList, context);
|
|
38
44
|
|
|
39
45
|
exports.executeWithContext = executeWithContext;
|
|
46
|
+
exports.headers = headers;
|
|
40
47
|
exports.initialize = initialize;
|
|
41
48
|
exports.keepAlive = keepAlive;
|
|
42
49
|
exports.send = send;
|
|
43
50
|
exports.start = start;
|
|
51
|
+
exports.status = status;
|
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 nextMatch = nextMatch1,
|
|
23902
|
+
return nextMatch = nextMatch1, tokens = tokens1, 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 nextMatch = nextMatch1,
|
|
23909
|
+
return nextMatch = nextMatch1, tokens = tokens1, 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 nextMatch = nextMatch1,
|
|
23928
|
+
return nextMatch = nextMatch1, tokens = tokens1, 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 nextMatch = nextMatch1,
|
|
23947
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
|
|
23948
23948
|
}
|
|
23949
|
-
return nextMatch = nextMatch1,
|
|
23949
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, {
|
|
23950
23950
|
v: nextMatch1
|
|
23951
23951
|
};
|
|
23952
23952
|
};
|
|
@@ -27977,6 +27977,10 @@ let FactoryService = class FactoryService {
|
|
|
27977
27977
|
const { code = 200 } = params;
|
|
27978
27978
|
return context.protected.res.status(code);
|
|
27979
27979
|
}
|
|
27980
|
+
async headers(params, _pinsSettingsList, context) {
|
|
27981
|
+
const { headers } = params;
|
|
27982
|
+
return context.protected.res.set(headers);
|
|
27983
|
+
}
|
|
27980
27984
|
};
|
|
27981
27985
|
let instance;
|
|
27982
27986
|
const initialize = (launcher)=>(instance = new FactoryService()).initialize(launcher);
|
|
@@ -27984,5 +27988,7 @@ const start = (params, pinsSettingsList, context)=>instance.start(params, pinsSe
|
|
|
27984
27988
|
const executeWithContext = (params, pinsSettingsList, context)=>instance.executeWithContext(params, pinsSettingsList, context);
|
|
27985
27989
|
const keepAlive = (params, pinsSettingsList, context)=>instance.keepAlive(params, pinsSettingsList, context);
|
|
27986
27990
|
const send = (params, pinsSettingsList, context)=>instance.send(params, pinsSettingsList, context);
|
|
27991
|
+
const status = (params, pinsSettingsList, context)=>instance.status(params, pinsSettingsList, context);
|
|
27992
|
+
const headers = (params, pinsSettingsList, context)=>instance.headers(params, pinsSettingsList, context);
|
|
27987
27993
|
|
|
27988
|
-
export { executeWithContext, initialize, keepAlive, send, start };
|
|
27994
|
+
export { executeWithContext, headers, initialize, keepAlive, send, start, status };
|
package/package.json
CHANGED
package/schema.fr.json
CHANGED
|
@@ -122,6 +122,25 @@
|
|
|
122
122
|
],
|
|
123
123
|
"x-events": []
|
|
124
124
|
}
|
|
125
|
+
},
|
|
126
|
+
"/headers": {
|
|
127
|
+
"post": {
|
|
128
|
+
"tags": ["service"],
|
|
129
|
+
"summary": "Headers HTTP",
|
|
130
|
+
"description": "Envoi des headers à la connection HTTP",
|
|
131
|
+
"parameters": [
|
|
132
|
+
{
|
|
133
|
+
"name": "headers",
|
|
134
|
+
"required": true,
|
|
135
|
+
"summary": "Headers",
|
|
136
|
+
"description": "Headers",
|
|
137
|
+
"schema": {
|
|
138
|
+
"type": "object"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
"x-events": []
|
|
143
|
+
}
|
|
125
144
|
}
|
|
126
145
|
},
|
|
127
146
|
"components": {
|
package/schema.json
CHANGED
|
@@ -122,6 +122,25 @@
|
|
|
122
122
|
],
|
|
123
123
|
"x-events": []
|
|
124
124
|
}
|
|
125
|
+
},
|
|
126
|
+
"/headers": {
|
|
127
|
+
"post": {
|
|
128
|
+
"tags": ["service"],
|
|
129
|
+
"summary": "Send HTTP headers",
|
|
130
|
+
"description": "Send HTTP headers",
|
|
131
|
+
"parameters": [
|
|
132
|
+
{
|
|
133
|
+
"name": "headers",
|
|
134
|
+
"required": true,
|
|
135
|
+
"summary": "Headers",
|
|
136
|
+
"description": "HTTP headers",
|
|
137
|
+
"schema": {
|
|
138
|
+
"type": "object"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
"x-events": []
|
|
143
|
+
}
|
|
125
144
|
}
|
|
126
145
|
},
|
|
127
146
|
"components": {
|
|
@@ -4,3 +4,5 @@ export declare const start: (params: any, pinsSettingsList: PinsSettings[], cont
|
|
|
4
4
|
export declare const executeWithContext: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
5
5
|
export declare const keepAlive: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<void>;
|
|
6
6
|
export declare const send: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
7
|
+
export declare const status: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
8
|
+
export declare const headers: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
File without changes
|