@owservable/actions 0.0.3 → 0.0.4
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/lib/functions/findCommandAction.d.ts +3 -0
- package/lib/functions/{find.action.js → findCommandAction.js} +6 -5
- package/lib/functions/findCommandAction.js.map +1 -0
- package/lib/owservable.actions.d.ts +2 -2
- package/lib/owservable.actions.js +3 -3
- package/lib/owservable.actions.js.map +1 -1
- package/package.json +1 -1
- package/lib/functions/find.action.d.ts +0 -3
- package/lib/functions/find.action.js.map +0 -1
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.findCommandAction = void 0;
|
|
4
4
|
const lodash_1 = require("lodash");
|
|
5
5
|
const folders_1 = require("@owservable/folders");
|
|
6
|
-
const
|
|
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.
|
|
21
|
-
exports.default = exports.
|
|
22
|
-
//# sourceMappingURL=
|
|
21
|
+
exports.findCommandAction = findCommandAction;
|
|
22
|
+
exports.default = exports.findCommandAction;
|
|
23
|
+
//# sourceMappingURL=findCommandAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findCommandAction.js","sourceRoot":"","sources":["../../src/functions/findCommandAction.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
|
|
1
|
+
import findCommandAction from './functions/findCommandAction';
|
|
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 {
|
|
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.
|
|
4
|
-
const
|
|
5
|
-
exports.
|
|
3
|
+
exports.Action = exports.getOptionAndDefaultValue = exports.runActionAsCommand = exports.findCommandAction = void 0;
|
|
4
|
+
const findCommandAction_1 = require("./functions/findCommandAction");
|
|
5
|
+
exports.findCommandAction = findCommandAction_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,
|
|
1
|
+
{"version":3,"file":"owservable.actions.js","sourceRoot":"","sources":["../src/owservable.actions.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAGb,qEAA8D;AAiB7D,4BAjBM,2BAAiB,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 +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"}
|