@digipair/skill-web-debug 0.8.12 → 0.8.13
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 -5
- package/index.esm.js +11 -5
- package/libs/skill-web-debug/src/lib/skill-web-debug.d.ts +1 -1
- package/package.json +1 -1
- package/schema.json +10 -1
package/index.cjs.js
CHANGED
|
@@ -3,11 +3,17 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
let DebugService = class DebugService {
|
|
6
|
-
async
|
|
7
|
-
const { label, value } = params;
|
|
8
|
-
|
|
6
|
+
async log(params, _pinsSettingsList, _context) {
|
|
7
|
+
const { type = 'INFOS', label, value } = params;
|
|
8
|
+
const message = `[${type}] ${label}`;
|
|
9
|
+
if (value) {
|
|
10
|
+
window.console.log(message, value);
|
|
11
|
+
} else {
|
|
12
|
+
window.console.log(message);
|
|
13
|
+
}
|
|
14
|
+
return value;
|
|
9
15
|
}
|
|
10
16
|
};
|
|
11
|
-
const
|
|
17
|
+
const log = (params, pinsSettingsList, context)=>new DebugService().log(params, pinsSettingsList, context);
|
|
12
18
|
|
|
13
|
-
exports.
|
|
19
|
+
exports.log = log;
|
package/index.esm.js
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
let DebugService = class DebugService {
|
|
2
|
-
async
|
|
3
|
-
const { label, value } = params;
|
|
4
|
-
|
|
2
|
+
async log(params, _pinsSettingsList, _context) {
|
|
3
|
+
const { type = 'INFOS', label, value } = params;
|
|
4
|
+
const message = `[${type}] ${label}`;
|
|
5
|
+
if (value) {
|
|
6
|
+
window.console.log(message, value);
|
|
7
|
+
} else {
|
|
8
|
+
window.console.log(message);
|
|
9
|
+
}
|
|
10
|
+
return value;
|
|
5
11
|
}
|
|
6
12
|
};
|
|
7
|
-
const
|
|
13
|
+
const log = (params, pinsSettingsList, context)=>new DebugService().log(params, pinsSettingsList, context);
|
|
8
14
|
|
|
9
|
-
export {
|
|
15
|
+
export { log };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { PinsSettings } from '@digipair/engine';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const log: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
package/package.json
CHANGED
package/schema.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"x-icon": "🔧"
|
|
9
9
|
},
|
|
10
10
|
"paths": {
|
|
11
|
-
"/
|
|
11
|
+
"/log": {
|
|
12
12
|
"post": {
|
|
13
13
|
"tags": ["web", "spatial"],
|
|
14
14
|
"summary": "Afficher dans la console",
|
|
@@ -23,6 +23,15 @@
|
|
|
23
23
|
"type": "string"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
|
+
{
|
|
27
|
+
"name": "type",
|
|
28
|
+
"summary": "Type",
|
|
29
|
+
"required": false,
|
|
30
|
+
"description": "Type de log",
|
|
31
|
+
"schema": {
|
|
32
|
+
"type": "string"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
26
35
|
{
|
|
27
36
|
"name": "value",
|
|
28
37
|
"summary": "Valeur",
|