@contrail/cli 1.0.70 → 1.0.71
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/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WARNING: Do not modify this file, it is part of the generic runtime handling logic
|
|
3
|
-
* for VibeIQ app actions.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { AppActionRequest, AppActionResponse, ActionDispatcher } from '.';
|
|
8
|
-
|
|
9
|
-
export async function execute(data: AppActionRequest): Promise<AppActionResponse> {
|
|
10
|
-
return ActionDispatcher.dispatchActionRequest(data);
|
|
11
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* WARNING: Do not modify this file, it is part of the generic runtime handling logic
|
|
3
|
+
* for VibeIQ app actions.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
import { AppActionRequest, AppActionResponse, ActionDispatcher } from '.';
|
|
8
|
+
|
|
9
|
+
export async function execute(data: AppActionRequest): Promise<AppActionResponse> {
|
|
10
|
+
return ActionDispatcher.dispatchActionRequest(data);
|
|
11
|
+
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WARNING: Do not modify this file, it is part of the generic runtime handling logic
|
|
3
|
-
* for VibeIQ app actions.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export class Logger {
|
|
8
|
-
allEntries : Array<string> = [];
|
|
9
|
-
public log(...args){
|
|
10
|
-
console.log(...args);
|
|
11
|
-
this.allEntries.push(new Date().toISOString() + ': ' + args.join(''));
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
public getEntries(){
|
|
15
|
-
return this.allEntries.join('\n');
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
public clearEntries(){
|
|
19
|
-
this.allEntries = [];
|
|
20
|
-
}
|
|
21
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* WARNING: Do not modify this file, it is part of the generic runtime handling logic
|
|
3
|
+
* for VibeIQ app actions.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
export class Logger {
|
|
8
|
+
allEntries : Array<string> = [];
|
|
9
|
+
public log(...args){
|
|
10
|
+
console.log(...args);
|
|
11
|
+
this.allEntries.push(new Date().toISOString() + ': ' + args.join(''));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
public getEntries(){
|
|
15
|
+
return this.allEntries.join('\n');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
public clearEntries(){
|
|
19
|
+
this.allEntries = [];
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WARNING: Do not modify this file, it is part of the generic runtime handling logic
|
|
3
|
-
* for VibeIQ app actions.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { execute } from './handler';
|
|
8
|
-
|
|
9
|
-
const express = require('express');
|
|
10
|
-
const bodyParser = require('body-parser');
|
|
11
|
-
const app = express();
|
|
12
|
-
const port = 5050;
|
|
13
|
-
|
|
14
|
-
// parse application/x-www-form-urlencoded
|
|
15
|
-
app.use(bodyParser.urlencoded({ extended: false }));
|
|
16
|
-
// parse application/json
|
|
17
|
-
app.use(bodyParser.json());
|
|
18
|
-
|
|
19
|
-
app.get('/health_check', (req, res) => {
|
|
20
|
-
res.send('Hello World!');
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
// DO NOT CHANGE THIS IMPLEMENTATION
|
|
24
|
-
app.post('/', async (req, res) => {
|
|
25
|
-
const result = await execute(req.body);
|
|
26
|
-
res.send(result);
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
app.listen(port, () => {
|
|
30
|
-
console.log(`Mock server listening on port ${port}`);
|
|
31
|
-
});
|
|
1
|
+
/**
|
|
2
|
+
* WARNING: Do not modify this file, it is part of the generic runtime handling logic
|
|
3
|
+
* for VibeIQ app actions.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
import { execute } from './handler';
|
|
8
|
+
|
|
9
|
+
const express = require('express');
|
|
10
|
+
const bodyParser = require('body-parser');
|
|
11
|
+
const app = express();
|
|
12
|
+
const port = 5050;
|
|
13
|
+
|
|
14
|
+
// parse application/x-www-form-urlencoded
|
|
15
|
+
app.use(bodyParser.urlencoded({ extended: false }));
|
|
16
|
+
// parse application/json
|
|
17
|
+
app.use(bodyParser.json());
|
|
18
|
+
|
|
19
|
+
app.get('/health_check', (req, res) => {
|
|
20
|
+
res.send('Hello World!');
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
// DO NOT CHANGE THIS IMPLEMENTATION
|
|
24
|
+
app.post('/', async (req, res) => {
|
|
25
|
+
const result = await execute(req.body);
|
|
26
|
+
res.send(result);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
app.listen(port, () => {
|
|
30
|
+
console.log(`Mock server listening on port ${port}`);
|
|
31
|
+
});
|