@digipair/skill-debug 0.94.0-4 → 0.95.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 +8274 -0
- package/index.d.ts +1 -0
- package/index.esm.js +8270 -0
- package/libs/engine/src/index.d.ts +2 -0
- package/libs/engine/src/lib/alias.interface.d.ts +9 -0
- package/libs/engine/src/lib/engine.d.ts +13 -0
- package/libs/engine/src/lib/pins-settings.interface.d.ts +15 -0
- package/{dist → libs/skill-debug}/src/index.d.ts +0 -1
- package/{dist → libs/skill-debug}/src/lib/skill-debug.d.ts +0 -1
- package/libs/skill-logger/src/index.d.ts +1 -0
- package/libs/skill-logger/src/lib/skill-logger.d.ts +8 -0
- package/package.json +5 -24
- package/README.md +0 -7
- package/dist/index.cjs.js +0 -38
- package/dist/index.esm.js +0 -17
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/lib/skill-debug.d.ts.map +0 -1
- package/dist/src/lib/skill-debug.spec.d.ts +0 -2
- package/dist/src/lib/skill-debug.spec.d.ts.map +0 -1
- /package/{dist/index.d.ts → index.cjs.d.ts} +0 -0
- /package/{dist/schema.fr.json → schema.fr.json} +0 -0
- /package/{dist/schema.json → schema.json} +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PinsSettings } from './pins-settings.interface';
|
|
2
|
+
type CONFIG_KEY = 'BASE_URL' | 'LIBRARIES' | 'ALIAS' | 'LOGGER';
|
|
3
|
+
export declare const config: {
|
|
4
|
+
set: (key: CONFIG_KEY, value: any) => void;
|
|
5
|
+
log: (level: string, path: string, message: string, context: any, data?: any) => any;
|
|
6
|
+
};
|
|
7
|
+
export declare const applyTemplate: (value: any, context: any) => any;
|
|
8
|
+
export declare const executePinsList: (pinsSettingsList: PinsSettings[], context: any, path?: string) => Promise<any>;
|
|
9
|
+
export declare const generateElementFromPins: (pinsSettings: PinsSettings, parent: Element, context: any, document?: Document, options?: {
|
|
10
|
+
import: boolean;
|
|
11
|
+
}) => Promise<Element | void>;
|
|
12
|
+
export declare const preparePinsSettings: (settings: PinsSettings, context: any) => PinsSettings;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface PinsSettings {
|
|
2
|
+
library: string;
|
|
3
|
+
element: string;
|
|
4
|
+
properties?: {
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
};
|
|
7
|
+
conditions?: {
|
|
8
|
+
if?: boolean;
|
|
9
|
+
each?: any[];
|
|
10
|
+
};
|
|
11
|
+
pins?: PinsSettings[];
|
|
12
|
+
events?: {
|
|
13
|
+
[key: string]: PinsSettings[];
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './lib/skill-logger';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PinsSettings } from '@digipair/engine';
|
|
2
|
+
export declare const initialize: (path?: string) => Promise<void>;
|
|
3
|
+
export declare const addLog: (context: any, type: string, message: string) => Promise<void>;
|
|
4
|
+
export declare const addConsumption: (context: any, service: string, model: string, promptTokens: number, completionTokens: number) => Promise<void>;
|
|
5
|
+
export declare const computeDailyConsumption: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<void>;
|
|
6
|
+
export declare const read: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any[]>;
|
|
7
|
+
export declare const list: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<string[]>;
|
|
8
|
+
export declare const cleaning: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,31 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digipair/skill-debug",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"main": "./dist/index.cjs.js",
|
|
5
|
-
"module": "./dist/index.esm.js",
|
|
6
|
-
"types": "./dist/index.d.ts",
|
|
3
|
+
"version": "0.95.0",
|
|
7
4
|
"keywords": [
|
|
8
5
|
"digipair",
|
|
9
6
|
"service",
|
|
10
7
|
"util"
|
|
11
8
|
],
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"import": "./dist/index.esm.js",
|
|
17
|
-
"default": "./dist/index.cjs.js"
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
"files": [
|
|
21
|
-
"dist",
|
|
22
|
-
"!**/*.tsbuildinfo"
|
|
23
|
-
],
|
|
24
|
-
"nx": {
|
|
25
|
-
"name": "skill-debug"
|
|
26
|
-
},
|
|
27
|
-
"dependencies": {
|
|
28
|
-
"@digipair/engine": "0.94.0-4",
|
|
29
|
-
"@digipair/skill-logger": "0.94.0-4"
|
|
30
|
-
}
|
|
31
|
-
}
|
|
9
|
+
"dependencies": {},
|
|
10
|
+
"main": "./index.cjs.js",
|
|
11
|
+
"module": "./index.esm.js"
|
|
12
|
+
}
|
package/README.md
DELETED
package/dist/index.cjs.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var logger = require('@digipair/skill-logger');
|
|
4
|
-
|
|
5
|
-
function _interopNamespaceDefault(e) {
|
|
6
|
-
var n = Object.create(null);
|
|
7
|
-
if (e) {
|
|
8
|
-
Object.keys(e).forEach(function (k) {
|
|
9
|
-
if (k !== 'default') {
|
|
10
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
11
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
get: function () { return e[k]; }
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
n.default = e;
|
|
19
|
-
return Object.freeze(n);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
var logger__namespace = /*#__PURE__*/_interopNamespaceDefault(logger);
|
|
23
|
-
|
|
24
|
-
let DebugService = class DebugService {
|
|
25
|
-
async log(params, _pinsSettingsList, context) {
|
|
26
|
-
const { type = 'INFOS', label, value } = params;
|
|
27
|
-
const message = `[${type}] ${label}`;
|
|
28
|
-
if (value) {
|
|
29
|
-
logger__namespace.addLog(context, type, message + ': ' + JSON.stringify(value));
|
|
30
|
-
} else {
|
|
31
|
-
logger__namespace.addLog(context, type, message);
|
|
32
|
-
}
|
|
33
|
-
return context.previous;
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
const log = (params, pinsSettingsList, context)=>new DebugService().log(params, pinsSettingsList, context);
|
|
37
|
-
|
|
38
|
-
exports.log = log;
|
package/dist/index.esm.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as logger from '@digipair/skill-logger';
|
|
2
|
-
|
|
3
|
-
let DebugService = class DebugService {
|
|
4
|
-
async log(params, _pinsSettingsList, context) {
|
|
5
|
-
const { type = 'INFOS', label, value } = params;
|
|
6
|
-
const message = `[${type}] ${label}`;
|
|
7
|
-
if (value) {
|
|
8
|
-
logger.addLog(context, type, message + ': ' + JSON.stringify(value));
|
|
9
|
-
} else {
|
|
10
|
-
logger.addLog(context, type, message);
|
|
11
|
-
}
|
|
12
|
-
return context.previous;
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
const log = (params, pinsSettingsList, context)=>new DebugService().log(params, pinsSettingsList, context);
|
|
16
|
-
|
|
17
|
-
export { log };
|
package/dist/src/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skill-debug.d.ts","sourceRoot":"","sources":["../../../src/lib/skill-debug.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAmBhD,eAAO,MAAM,GAAG,GAAI,QAAQ,GAAG,EAAE,kBAAkB,YAAY,EAAE,EAAE,SAAS,GAAG,iBACpB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"skill-debug.spec.d.ts","sourceRoot":"","sources":["../../../src/lib/skill-debug.spec.ts"],"names":[],"mappings":""}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|