@digipair/skill-tool 0.91.0-0 → 0.91.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.d.ts +1 -0
- package/index.cjs.js +28048 -0
- package/index.esm.js +28021 -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/libs/skill-tool/src/lib/skill-tool.d.ts +7 -0
- package/package.json +5 -21
- package/.swcrc +0 -28
- package/README.md +0 -7
- package/eslint.config.mjs +0 -22
- package/rollup.config.cjs +0 -28
- package/src/handlebars.d.ts +0 -1
- package/src/lib/skill-tool.spec.ts +0 -7
- package/src/lib/skill-tool.ts +0 -57
- package/tsconfig.json +0 -13
- package/tsconfig.lib.json +0 -19
- /package/{src/index.d.ts → index.d.ts} +0 -0
- /package/{src/index.ts → libs/skill-tool/src/index.d.ts} +0 -0
- /package/{src/schema.fr.json → schema.fr.json} +0 -0
- /package/{src/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,7 @@
|
|
|
1
|
+
import { PinsSettings } from '@digipair/engine';
|
|
2
|
+
export declare const task: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
3
|
+
export declare const action: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
4
|
+
export declare const trigger: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
5
|
+
export declare const stop: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
6
|
+
export declare const keepAlive: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<void>;
|
|
7
|
+
export declare const execute: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
package/package.json
CHANGED
|
@@ -1,27 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digipair/skill-tool",
|
|
3
|
-
"version": "0.91.0
|
|
4
|
-
"type": "module",
|
|
5
|
-
"main": "dist/libs/skill-tool/index.cjs.js",
|
|
6
|
-
"module": "dist/libs/skill-tool/index.esm.js",
|
|
7
|
-
"types": "dist/libs/skill-tool/index.esm.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
"./package.json": "./libs/skill-tool/package.json",
|
|
10
|
-
".": {
|
|
11
|
-
"development": "./dist/libs/skill-tool/src/index.ts",
|
|
12
|
-
"types": "./dist/libs/skill-tool/index.esm.d.ts",
|
|
13
|
-
"import": "./dist/libs/skill-tool/index.esm.js",
|
|
14
|
-
"default": "./dist/libs/skill-tool/index.cjs.js"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
3
|
+
"version": "0.91.0",
|
|
17
4
|
"keywords": [
|
|
18
5
|
"digipair",
|
|
19
6
|
"service"
|
|
20
7
|
],
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"@digipair/engine": "0.91.0-0"
|
|
26
|
-
}
|
|
27
|
-
}
|
|
8
|
+
"dependencies": {},
|
|
9
|
+
"main": "./index.cjs.js",
|
|
10
|
+
"module": "./index.esm.js"
|
|
11
|
+
}
|
package/.swcrc
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"jsc": {
|
|
3
|
-
"target": "es2017",
|
|
4
|
-
"parser": {
|
|
5
|
-
"syntax": "typescript",
|
|
6
|
-
"decorators": true,
|
|
7
|
-
"dynamicImport": true
|
|
8
|
-
},
|
|
9
|
-
"transform": {
|
|
10
|
-
"decoratorMetadata": true,
|
|
11
|
-
"legacyDecorator": true
|
|
12
|
-
},
|
|
13
|
-
"keepClassNames": true,
|
|
14
|
-
"externalHelpers": true,
|
|
15
|
-
"loose": true
|
|
16
|
-
},
|
|
17
|
-
"module": {
|
|
18
|
-
"type": "es6"
|
|
19
|
-
},
|
|
20
|
-
"sourceMaps": true,
|
|
21
|
-
"exclude": [
|
|
22
|
-
"jest.config.ts",
|
|
23
|
-
".*\\.spec.tsx?$",
|
|
24
|
-
".*\\.test.tsx?$",
|
|
25
|
-
"./src/jest-setup.ts$",
|
|
26
|
-
"./**/jest-setup.ts$"
|
|
27
|
-
]
|
|
28
|
-
}
|
package/README.md
DELETED
package/eslint.config.mjs
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import baseConfig from '../../eslint.config.mjs';
|
|
2
|
-
|
|
3
|
-
export default [
|
|
4
|
-
...baseConfig,
|
|
5
|
-
{
|
|
6
|
-
files: ['**/*.json'],
|
|
7
|
-
rules: {
|
|
8
|
-
'@nx/dependency-checks': [
|
|
9
|
-
'error',
|
|
10
|
-
{
|
|
11
|
-
ignoredFiles: [
|
|
12
|
-
'{projectRoot}/eslint.config.{js,cjs,mjs}',
|
|
13
|
-
'{projectRoot}/rollup.config.{js,ts,mjs,mts,cjs,cts}',
|
|
14
|
-
],
|
|
15
|
-
},
|
|
16
|
-
],
|
|
17
|
-
},
|
|
18
|
-
languageOptions: {
|
|
19
|
-
parser: await import('jsonc-eslint-parser'),
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
];
|
package/rollup.config.cjs
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
const { withNx } = require('@nx/rollup/with-nx');
|
|
2
|
-
|
|
3
|
-
module.exports = withNx(
|
|
4
|
-
{
|
|
5
|
-
main: 'libs/skill-tool/src/index.ts',
|
|
6
|
-
outputPath: 'dist/libs/skill-tool',
|
|
7
|
-
tsConfig: 'libs/skill-tool/tsconfig.lib.json',
|
|
8
|
-
compiler: 'swc',
|
|
9
|
-
format: ['esm', "cjs"],
|
|
10
|
-
assets: [
|
|
11
|
-
{
|
|
12
|
-
input: 'libs/skill-tool/',
|
|
13
|
-
glob: 'package.json',
|
|
14
|
-
output: '.'
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
input: 'libs/skill-tool/src/',
|
|
18
|
-
glob: '*.json',
|
|
19
|
-
output: '.'
|
|
20
|
-
}
|
|
21
|
-
]
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
// Provide additional rollup configuration here. See: https://rollupjs.org/configuration-options
|
|
25
|
-
// e.g.
|
|
26
|
-
// output: { sourcemap: true },
|
|
27
|
-
}
|
|
28
|
-
);
|
package/src/handlebars.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare module 'handlebars/dist/handlebars.min.js';
|
package/src/lib/skill-tool.ts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
|
-
import { executePinsList, PinsSettings } from '@digipair/engine';
|
|
3
|
-
|
|
4
|
-
class ToolService {
|
|
5
|
-
async task(params: any, _pinsSettingsList: PinsSettings[], context: any): Promise<any> {
|
|
6
|
-
const { execute } = params;
|
|
7
|
-
|
|
8
|
-
return await executePinsList(execute, context, `${context.__PATH__}.execute`);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
async action(params: any, _pinsSettingsList: PinsSettings[], context: any): Promise<any> {
|
|
12
|
-
const { execute } = params;
|
|
13
|
-
|
|
14
|
-
return await executePinsList(execute, context, `${context.__PATH__}.execute`);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
async trigger(params: any, _pinsSettingsList: PinsSettings[], context: any): Promise<any> {
|
|
18
|
-
const { execute } = params;
|
|
19
|
-
|
|
20
|
-
return await executePinsList(execute, context, `${context.__PATH__}.execute`);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
async stop(params: any, _pinsSettingsList: PinsSettings[], _context: any): Promise<any> {
|
|
24
|
-
const { value = {} } = params;
|
|
25
|
-
|
|
26
|
-
throw { type: 'DIGIPAIR_STOP', value };
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
async keepAlive(_params: any, _pinsSettingsList: PinsSettings[], _context: any) {
|
|
30
|
-
throw { type: 'DIGIPAIR_KEEPALIVE' };
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
async execute(params: any, _pinsSettingsList: PinsSettings[], _context: any) {
|
|
34
|
-
const { execute, context = {} } = params;
|
|
35
|
-
|
|
36
|
-
const result = await executePinsList(execute, { ...context, ..._context }, `${context.__PATH__}.execute`);
|
|
37
|
-
return result;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export const task = (params: any, pinsSettingsList: PinsSettings[], context: any) =>
|
|
42
|
-
new ToolService().task(params, pinsSettingsList, context);
|
|
43
|
-
|
|
44
|
-
export const action = (params: any, pinsSettingsList: PinsSettings[], context: any) =>
|
|
45
|
-
new ToolService().action(params, pinsSettingsList, context);
|
|
46
|
-
|
|
47
|
-
export const trigger = (params: any, pinsSettingsList: PinsSettings[], context: any) =>
|
|
48
|
-
new ToolService().trigger(params, pinsSettingsList, context);
|
|
49
|
-
|
|
50
|
-
export const stop = (params: any, pinsSettingsList: PinsSettings[], context: any) =>
|
|
51
|
-
new ToolService().stop(params, pinsSettingsList, context);
|
|
52
|
-
|
|
53
|
-
export const keepAlive = (params: any, pinsSettingsList: PinsSettings[], context: any) =>
|
|
54
|
-
new ToolService().keepAlive(params, pinsSettingsList, context);
|
|
55
|
-
|
|
56
|
-
export const execute = (params: any, pinsSettingsList: PinsSettings[], context: any) =>
|
|
57
|
-
new ToolService().execute(params, pinsSettingsList, context);
|
package/tsconfig.json
DELETED
package/tsconfig.lib.json
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../tsconfig.base.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"rootDir": "src",
|
|
5
|
-
"outDir": "dist",
|
|
6
|
-
"tsBuildInfoFile": "dist/tsconfig.lib.tsbuildinfo",
|
|
7
|
-
"emitDeclarationOnly": true,
|
|
8
|
-
"module": "esnext",
|
|
9
|
-
"moduleResolution": "node",
|
|
10
|
-
"forceConsistentCasingInFileNames": true,
|
|
11
|
-
"types": ["node"]
|
|
12
|
-
},
|
|
13
|
-
"include": ["src/**/*.ts"],
|
|
14
|
-
"references": [
|
|
15
|
-
{
|
|
16
|
-
"path": "../engine/tsconfig.lib.json"
|
|
17
|
-
}
|
|
18
|
-
]
|
|
19
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|