@owservable/actions 0.0.3 → 0.0.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.
@@ -0,0 +1,3 @@
1
+ import ActionAsCommandInterface from '../interfaces/action.as.command.interface';
2
+ export declare const findCommandAction: (root: string, cliCommand: string) => ActionAsCommandInterface;
3
+ export default findCommandAction;
@@ -1,12 +1,13 @@
1
1
  'use strict';
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.findAction = void 0;
3
+ exports.findCommandAction = void 0;
4
4
  const lodash_1 = require("lodash");
5
5
  const folders_1 = require("@owservable/folders");
6
- const findAction = (root, cliCommand) => {
6
+ const findCommandAction = (root, cliCommand) => {
7
7
  const actionPaths = (0, folders_1.listSubfoldersFilesByFolderName)(root, 'actions');
8
8
  let action;
9
9
  (0, lodash_1.each)(actionPaths, (actionPath) => {
10
+ console.log(' - [@owservable/actions] Initializing command action', actionPath);
10
11
  const ActionClass = require(actionPath).default;
11
12
  const actionInstance = new ActionClass();
12
13
  const actionCommand = (0, lodash_1.first)(actionInstance.signature().split(' '));
@@ -17,6 +18,6 @@ const findAction = (root, cliCommand) => {
17
18
  });
18
19
  return action;
19
20
  };
20
- exports.findAction = findAction;
21
- exports.default = exports.findAction;
22
- //# sourceMappingURL=find.action.js.map
21
+ exports.findCommandAction = findCommandAction;
22
+ exports.default = exports.findCommandAction;
23
+ //# sourceMappingURL=find.command.action.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find.command.action.js","sourceRoot":"","sources":["../../src/functions/find.command.action.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,mCAAmC;AACnC,iDAAoE;AAI7D,MAAM,iBAAiB,GAAG,CAAC,IAAY,EAAE,UAAkB,EAA4B,EAAE;IAC/F,MAAM,WAAW,GAAa,IAAA,yCAA+B,EAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAE/E,IAAI,MAAgC,CAAC;IAErC,IAAA,aAAI,EAAC,WAAW,EAAE,CAAC,UAAkB,EAAE,EAAE;QACxC,OAAO,CAAC,GAAG,CAAC,wDAAwD,EAAE,UAAU,CAAC,CAAC;QAElF,MAAM,WAAW,GAAuC,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC;QACpF,MAAM,cAAc,GAAG,IAAI,WAAW,EAAE,CAAC;QACzC,MAAM,aAAa,GAAG,IAAA,cAAK,EAAC,cAAc,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;QAEnE,IAAI,UAAU,KAAK,aAAa,EAAE;YACjC,MAAM,GAAG,cAAc,CAAC;YACxB,OAAO,KAAK,CAAC;SACb;IACF,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AACf,CAAC,CAAC;AAnBW,QAAA,iBAAiB,qBAmB5B;AACF,kBAAe,yBAAiB,CAAC"}
@@ -1,4 +1,4 @@
1
- import findAction from './functions/find.action';
1
+ import findCommandAction from './functions/find.command.action';
2
2
  import runActionAsCommand from './functions/run.action.as.command';
3
3
  import getOptionAndDefaultValue from './functions/get.option.and.default.value';
4
4
  import ActionInterface from './interfaces/action.interface';
@@ -8,6 +8,6 @@ import ActionAsCommandInterface from './interfaces/action.as.command.interface';
8
8
  import ActionAsCronjobInterface from './interfaces/action.as.cronjob.interface';
9
9
  import ActionAsControllerInterface from './interfaces/action.as.controller.interface';
10
10
  import Action from './abstracts/action';
11
- export { findAction, runActionAsCommand, getOptionAndDefaultValue, ActionInterface, ActionAsWorkerInterface, ActionAsWatcherInterface, ActionAsCommandInterface, ActionAsCronjobInterface, ActionAsControllerInterface, Action };
11
+ export { findCommandAction, runActionAsCommand, getOptionAndDefaultValue, ActionInterface, ActionAsWorkerInterface, ActionAsWatcherInterface, ActionAsCommandInterface, ActionAsCronjobInterface, ActionAsControllerInterface, Action };
12
12
  declare const OwservableActions: {};
13
13
  export default OwservableActions;
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Action = exports.getOptionAndDefaultValue = exports.runActionAsCommand = exports.findAction = void 0;
4
- const find_action_1 = require("./functions/find.action");
5
- exports.findAction = find_action_1.default;
3
+ exports.Action = exports.getOptionAndDefaultValue = exports.runActionAsCommand = exports.findCommandAction = void 0;
4
+ const find_command_action_1 = require("./functions/find.command.action");
5
+ exports.findCommandAction = find_command_action_1.default;
6
6
  const run_action_as_command_1 = require("./functions/run.action.as.command");
7
7
  exports.runActionAsCommand = run_action_as_command_1.default;
8
8
  const get_option_and_default_value_1 = require("./functions/get.option.and.default.value");
@@ -1 +1 @@
1
- {"version":3,"file":"owservable.actions.js","sourceRoot":"","sources":["../src/owservable.actions.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAGb,yDAAiD;AAiBhD,qBAjBM,qBAAU,CAiBN;AAhBX,6EAAmE;AAiBlE,6BAjBM,+BAAkB,CAiBN;AAhBnB,2FAAgF;AAiB/E,mCAjBM,sCAAwB,CAiBN;AANzB,+CAAwC;AAiBvC,iBAjBM,gBAAM,CAiBN;AAGP,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAC7B,kBAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"owservable.actions.js","sourceRoot":"","sources":["../src/owservable.actions.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAGb,yEAAgE;AAiB/D,4BAjBM,6BAAiB,CAiBN;AAhBlB,6EAAmE;AAiBlE,6BAjBM,+BAAkB,CAiBN;AAhBnB,2FAAgF;AAiB/E,mCAjBM,sCAAwB,CAiBN;AANzB,+CAAwC;AAiBvC,iBAjBM,gBAAM,CAiBN;AAGP,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAC7B,kBAAe,iBAAiB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owservable/actions",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "list subfolders by name",
5
5
  "engines": {
6
6
  "node": ">=16"
@@ -30,21 +30,21 @@
30
30
  "test_qube": "nyc --reporter=lcov mocha -R @danmasta/mocha-sonar -r ts-node/register test/**/*.spec.ts",
31
31
  "up": "pnpm up -i",
32
32
  "latest": "pnpm up -i -L",
33
- "l": "pnpm latest",
33
+ "l": "pnpm i & pnpm latest",
34
34
  "srctree": "dir src /s /b > srctree.txt",
35
35
  "preinstall": "npx only-allow pnpm"
36
36
  },
37
37
  "dependencies": {
38
- "@owservable/folders": "^0.0.4",
39
- "@types/lodash": "^4.14.182",
40
- "@types/node": "^18.0.6",
38
+ "@owservable/folders": "^0.0.5",
39
+ "@types/lodash": "^4.14.191",
40
+ "@types/node": "^18.11.10",
41
41
  "commander": "^9.4.1",
42
42
  "lodash": "^4.17.20"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@danmasta/mocha-sonar": "^1.0.1",
46
46
  "@types/chai": "^4.3.1",
47
- "@types/mocha": "^10.0.0",
47
+ "@types/mocha": "^10.0.1",
48
48
  "chai": "^4.3.6",
49
49
  "coveralls": "^3.0.9",
50
50
  "mocha": "^10.0.0",
@@ -1,3 +0,0 @@
1
- import ActionAsCommandInterface from '../interfaces/action.as.command.interface';
2
- export declare const findAction: (root: string, cliCommand: string) => ActionAsCommandInterface;
3
- export default findAction;
@@ -1 +0,0 @@
1
- {"version":3,"file":"find.action.js","sourceRoot":"","sources":["../../src/functions/find.action.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,mCAAmC;AACnC,iDAAoE;AAI7D,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,UAAkB,EAA4B,EAAE;IACxF,MAAM,WAAW,GAAa,IAAA,yCAA+B,EAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAE/E,IAAI,MAAgC,CAAC;IAErC,IAAA,aAAI,EAAC,WAAW,EAAE,CAAC,UAAkB,EAAE,EAAE;QAExC,MAAM,WAAW,GAAuC,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC;QACpF,MAAM,cAAc,GAAG,IAAI,WAAW,EAAE,CAAC;QACzC,MAAM,aAAa,GAAG,IAAA,cAAK,EAAC,cAAc,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;QAEnE,IAAI,UAAU,KAAK,aAAa,EAAE;YACjC,MAAM,GAAG,cAAc,CAAC;YACxB,OAAO,KAAK,CAAC;SACb;IACF,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AACf,CAAC,CAAC;AAlBW,QAAA,UAAU,cAkBrB;AACF,kBAAe,kBAAU,CAAC"}