@contrail/cli 2.0.12 → 2.0.14
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/README.md
CHANGED
|
@@ -15,7 +15,7 @@ $ npm install -g @contrail/cli
|
|
|
15
15
|
$ contrail COMMAND
|
|
16
16
|
running command...
|
|
17
17
|
$ contrail (--version)
|
|
18
|
-
@contrail/cli/2.0.
|
|
18
|
+
@contrail/cli/2.0.14 darwin-arm64 node-v18.13.0
|
|
19
19
|
$ contrail --help [COMMAND]
|
|
20
20
|
USAGE
|
|
21
21
|
$ contrail COMMAND
|
|
@@ -35,6 +35,10 @@ class InstallApp extends core_1.Command {
|
|
|
35
35
|
flags.appIdentifier = answers.appIdentifier;
|
|
36
36
|
}
|
|
37
37
|
const app = installableApps.find(x => x.identifier === flags.appIdentifier);
|
|
38
|
+
if (!app) {
|
|
39
|
+
console.error(chalk_1.default.red.bold(`App ${flags.appIdentifier} not found`));
|
|
40
|
+
throw new Error(`App ${flags.appIdentifier} not found`);
|
|
41
|
+
}
|
|
38
42
|
let configProperties;
|
|
39
43
|
if (app.configProperties) {
|
|
40
44
|
configProperties = await getConfigProperties(app);
|
|
@@ -48,5 +48,5 @@ workflows:
|
|
|
48
48
|
# Here, you can define a string based on properties from the event payloads (which are custom to your payload)
|
|
49
49
|
# i.e. an event {details: {eventType: 'apparel'}, actionType: 'create'} can be parsed to apparel|create with the following
|
|
50
50
|
# When this is defined, any event coming from your app's credentials will define a trigger key using this logic.
|
|
51
|
-
# You can then define workflows to run based on those external events, based on this
|
|
51
|
+
# You can then define workflows to run based on those external events, based on this trigger key definition.
|
|
52
52
|
eventWorkflowTriggerKeyMapping: "{details.eventType}|{actionType}"
|
|
@@ -8,6 +8,7 @@ import { setAppCredentials } from "@contrail/sdk";
|
|
|
8
8
|
import { loadAppConfig } from "./app-config";
|
|
9
9
|
import { AppActionCallbackStatus, AppActionRequest, AppActionResponse } from "./interfaces";
|
|
10
10
|
import { Logger } from "./logger";
|
|
11
|
+
var pjson = require('../../package.json');
|
|
11
12
|
|
|
12
13
|
const APP_CONFIG = loadAppConfig();
|
|
13
14
|
const appName = APP_CONFIG.appIdentifier;
|
|
@@ -23,6 +24,7 @@ export class ActionDispatcher {
|
|
|
23
24
|
? JSON.parse(data.event)
|
|
24
25
|
: data.event;
|
|
25
26
|
|
|
27
|
+
logger.log(`App Info: `, pjson.name, ':', pjson.version);
|
|
26
28
|
return ActionDispatcher.delegateToHandler(event, data, logger);
|
|
27
29
|
}
|
|
28
30
|
|
package/oclif.manifest.json
CHANGED