@emuanalytics/flow-cli 2.0.0 → 2.1.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/README.md +36 -0
- package/dist/commands/contactpoints/create.js +151 -0
- package/dist/commands/contactpoints/create.js.map +1 -0
- package/dist/commands/contactpoints/delete.js +74 -0
- package/dist/commands/contactpoints/delete.js.map +1 -0
- package/dist/commands/contactpoints/list.js +58 -0
- package/dist/commands/contactpoints/list.js.map +1 -0
- package/dist/commands/contactpoints/metadata.js +59 -0
- package/dist/commands/contactpoints/metadata.js.map +1 -0
- package/dist/commands/contactpoints/send.js +47 -0
- package/dist/commands/contactpoints/send.js.map +1 -0
- package/dist/commands/contactpoints/update.js +113 -0
- package/dist/commands/contactpoints/update.js.map +1 -0
- package/dist/commands/contactpoints.js +13 -0
- package/dist/commands/contactpoints.js.map +1 -0
- package/dist/commands/databases/create.js +2 -2
- package/dist/commands/databases/create.js.map +1 -1
- package/dist/commands/media/delete.js +74 -0
- package/dist/commands/media/delete.js.map +1 -0
- package/dist/commands/media/download.js +75 -0
- package/dist/commands/media/download.js.map +1 -0
- package/dist/commands/media/list.js +52 -0
- package/dist/commands/media/list.js.map +1 -0
- package/dist/commands/media/metadata.js +59 -0
- package/dist/commands/media/metadata.js.map +1 -0
- package/dist/commands/media/upload.js +91 -0
- package/dist/commands/media/upload.js.map +1 -0
- package/dist/commands/media.js +13 -0
- package/dist/commands/media.js.map +1 -0
- package/dist/commands/pipelines/cache.js +62 -0
- package/dist/commands/pipelines/cache.js.map +1 -0
- package/dist/commands/pipelines/components.js +134 -0
- package/dist/commands/pipelines/components.js.map +1 -0
- package/dist/commands/pipelines/config.js +77 -0
- package/dist/commands/pipelines/config.js.map +1 -0
- package/dist/commands/pipelines/list.js +31 -18
- package/dist/commands/pipelines/list.js.map +1 -1
- package/dist/commands/pipelines/sink.js +99 -0
- package/dist/commands/pipelines/sink.js.map +1 -0
- package/dist/commands/pipelines/source.js +97 -0
- package/dist/commands/pipelines/source.js.map +1 -0
- package/dist/utils/index.js +24 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Flo.w CLI
|
|
2
|
+
|
|
3
|
+
The Flo.w CLI (`flow-engine-cli`) is a command line interface for working with Flo.w Engine via its REST API. It provides developers
|
|
4
|
+
with tools to work with datasets, pipelines and other Flo.w resources.
|
|
5
|
+
|
|
6
|
+
## Setup and build
|
|
7
|
+
|
|
8
|
+
After cloning the repository, follow the instructions below to set up your development environment:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
# Install dependencies
|
|
12
|
+
npm install
|
|
13
|
+
|
|
14
|
+
# Build project
|
|
15
|
+
npm run build
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Running and debugging
|
|
19
|
+
|
|
20
|
+
The built CLI tool will be located in the `dist/` folder. To run the CLI, use the following command:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
node dist/index.js <commands> [options]
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Note that this is equivalent to using `flow <commands> [options]` when the package is installed globally on an end-developers machine.
|
|
27
|
+
|
|
28
|
+
To debug the CLI during development, open a JavaScript debug terminal in VSCode (CMD-SHIFT-P and search for 'debug: ja')and run the CLI as above in the terminal. The debugger will attach to the running process and breakpoints can be set directly in the source code.
|
|
29
|
+
|
|
30
|
+
## Deployment
|
|
31
|
+
|
|
32
|
+
See the [README.md](../../README.md) file in the root of this monorepo for details on how to deploy packages.
|
|
33
|
+
|
|
34
|
+
## Support
|
|
35
|
+
|
|
36
|
+
Please contact robin.summerhill@emu-analytics.com for support with installing, building or deploying packages in this monorepo.
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright © 2018 Emu Analytics
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
31
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
32
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
33
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
34
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
+
exports.handler = exports.builder = exports.desc = exports.command = void 0;
|
|
39
|
+
const inquirer = __importStar(require("inquirer"));
|
|
40
|
+
const utils_1 = require("../../utils");
|
|
41
|
+
exports.command = 'create <id>';
|
|
42
|
+
exports.desc = 'Create a new Contact Point';
|
|
43
|
+
const builder = (args) => {
|
|
44
|
+
return args
|
|
45
|
+
.positional('id', { describe: 'Contact point id', type: 'string' })
|
|
46
|
+
.option('type', { describe: 'Type of new contact point', type: 'string' })
|
|
47
|
+
.option('description', { describe: 'Description for new contact point', type: 'string' })
|
|
48
|
+
.option('templates', { description: 'Contact point templates (comma-separated)', type: 'array' })
|
|
49
|
+
.option('recipients', { description: 'Recipients (comma-separated)', type: 'array' })
|
|
50
|
+
.option('cp-host', { describe: 'Contact point host (where applicable)', type: 'string' })
|
|
51
|
+
.option('cp-port', { describe: 'Contact point port (where applicable)', type: 'number' })
|
|
52
|
+
.option('cp-user', { describe: 'Contact point user (where applicable)', type: 'string' })
|
|
53
|
+
.option('password', { describe: 'Contact point password (where applicable)', type: 'string' })
|
|
54
|
+
.option('interactive', {
|
|
55
|
+
alias: 'i',
|
|
56
|
+
describe: 'Show interactive prompts',
|
|
57
|
+
type: 'boolean',
|
|
58
|
+
default: 'true'
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
exports.builder = builder;
|
|
62
|
+
const handler = (params) => __awaiter(void 0, void 0, void 0, function* () {
|
|
63
|
+
try {
|
|
64
|
+
if (params.interactive) {
|
|
65
|
+
const drivers = yield params.client.contactpoints.drivers();
|
|
66
|
+
const answers = yield inquirer.prompt([
|
|
67
|
+
{
|
|
68
|
+
type: 'list',
|
|
69
|
+
name: 'type',
|
|
70
|
+
message: 'Contact point type',
|
|
71
|
+
choices: drivers,
|
|
72
|
+
default: params.type ? params.type : 'email'
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
type: 'input',
|
|
76
|
+
name: 'description',
|
|
77
|
+
message: 'Description for new contact point',
|
|
78
|
+
default: params.description
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
type: 'input',
|
|
82
|
+
name: 'templates',
|
|
83
|
+
message: 'Templates (comma separated)',
|
|
84
|
+
default: (params.templates || []).join(', ')
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
type: 'input',
|
|
88
|
+
name: 'recipients',
|
|
89
|
+
message: 'Recipients (comma separated)',
|
|
90
|
+
default: (params.recipients || []).join(', ')
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
type: 'input',
|
|
94
|
+
name: 'host',
|
|
95
|
+
message: 'Contact point host (where applicable)',
|
|
96
|
+
default: params.cpHost
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
type: 'number',
|
|
100
|
+
name: 'port',
|
|
101
|
+
message: 'Contact point port (where applicable)',
|
|
102
|
+
default: params.cpPort
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
type: 'input',
|
|
106
|
+
name: 'user',
|
|
107
|
+
message: 'Contact point user (where applicable)',
|
|
108
|
+
default: params.cpUser
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
type: 'password',
|
|
112
|
+
name: 'password',
|
|
113
|
+
message: 'Contact point password (where applicable)',
|
|
114
|
+
default: params.cpPassword
|
|
115
|
+
}
|
|
116
|
+
]);
|
|
117
|
+
params.type = answers.type;
|
|
118
|
+
params.description = answers.description;
|
|
119
|
+
params.cpHost = answers.host;
|
|
120
|
+
params.cpPort = answers.port;
|
|
121
|
+
params.cpUser = answers.user;
|
|
122
|
+
params.cpPassword = answers.password;
|
|
123
|
+
params.templates = answers.templates
|
|
124
|
+
.split(',')
|
|
125
|
+
.map(s => s.trim())
|
|
126
|
+
.filter(s => s.length);
|
|
127
|
+
params.recipients = answers.recipients
|
|
128
|
+
.split(',')
|
|
129
|
+
.map(s => s.trim())
|
|
130
|
+
.filter(s => s.length);
|
|
131
|
+
}
|
|
132
|
+
let contactPoint = {
|
|
133
|
+
id: params.id,
|
|
134
|
+
type: params.type,
|
|
135
|
+
description: params.description,
|
|
136
|
+
templates: params.templates,
|
|
137
|
+
recipients: params.recipients,
|
|
138
|
+
host: params.cpHost,
|
|
139
|
+
port: params.cpPort,
|
|
140
|
+
user: params.cpUser,
|
|
141
|
+
password: params.cpPassword
|
|
142
|
+
};
|
|
143
|
+
contactPoint = yield params.client.contactpoints.create(contactPoint);
|
|
144
|
+
(0, utils_1.logObject)((0, utils_1.expandArrays)(contactPoint, ['templates', 'recipients']), 'table');
|
|
145
|
+
}
|
|
146
|
+
catch (e) {
|
|
147
|
+
(0, utils_1.logError)(e);
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
exports.handler = handler;
|
|
151
|
+
//# sourceMappingURL=create.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/commands/contactpoints/create.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,mDAAqC;AAErC,uCAAgE;AAEnD,QAAA,OAAO,GAAG,aAAa,CAAC;AAExB,QAAA,IAAI,GAAG,4BAA4B,CAAC;AAE1C,MAAM,OAAO,GAAG,CAAC,IAAgB,EAAE,EAAE;IAC1C,OAAO,IAAI;SACR,UAAU,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,kBAAkB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;SAClE,MAAM,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,2BAA2B,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;SACzE,MAAM,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,mCAAmC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;SACxF,MAAM,CAAC,WAAW,EAAE,EAAE,WAAW,EAAE,2CAA2C,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;SAChG,MAAM,CAAC,YAAY,EAAE,EAAE,WAAW,EAAE,8BAA8B,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;SACpF,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, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
31
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
32
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
33
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
34
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
+
exports.handler = exports.builder = exports.desc = exports.command = void 0;
|
|
39
|
+
const inquirer = __importStar(require("inquirer"));
|
|
40
|
+
const utils_1 = require("../../utils");
|
|
41
|
+
exports.command = ['delete <id>', 'rm', 'del'];
|
|
42
|
+
exports.desc = 'Delete a contact point';
|
|
43
|
+
const builder = (args) => {
|
|
44
|
+
return args
|
|
45
|
+
.option('yes', { alias: 'y', description: `Answer 'yes' to confirmation messages`, default: false })
|
|
46
|
+
.positional('id', { describe: 'Contact Point id (or unique prefix)', type: 'string' });
|
|
47
|
+
};
|
|
48
|
+
exports.builder = builder;
|
|
49
|
+
function handler({ client, id, yes }) {
|
|
50
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
+
try {
|
|
52
|
+
const resource = yield (0, utils_1.resolveResource)(id, client.contactpoints);
|
|
53
|
+
let confirmed = yes;
|
|
54
|
+
if (!confirmed) {
|
|
55
|
+
const answers = yield inquirer.prompt({
|
|
56
|
+
name: 'confirmed',
|
|
57
|
+
type: 'confirm',
|
|
58
|
+
message: `Are you sure you want to delete '${resource.id}'`,
|
|
59
|
+
default: false
|
|
60
|
+
});
|
|
61
|
+
confirmed = answers.confirmed;
|
|
62
|
+
}
|
|
63
|
+
if (confirmed) {
|
|
64
|
+
yield client.contactpoints.delete(resource.id);
|
|
65
|
+
(0, utils_1.logDetail)('Deleted');
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
catch (e) {
|
|
69
|
+
(0, utils_1.logError)(e);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
exports.handler = handler;
|
|
74
|
+
//# sourceMappingURL=delete.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../src/commands/contactpoints/delete.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,mDAAqC;AAErC,uCAAmE;AAEtD,QAAA,OAAO,GAAG,CAAC,aAAa,EAAE,IAAI,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© 2018 Emu Analytics
|
|
4
|
+
*/
|
|
5
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
6
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
7
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
8
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
9
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
10
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
11
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.handler = exports.builder = exports.desc = exports.command = void 0;
|
|
16
|
+
const utils_1 = require("../../utils");
|
|
17
|
+
exports.command = ['list [id]', 'ls', '$0'];
|
|
18
|
+
exports.desc = 'List contact points';
|
|
19
|
+
const builder = (args) => {
|
|
20
|
+
return args
|
|
21
|
+
.option('limit', { alias: 'n', type: 'number', describe: 'Limit to n results' })
|
|
22
|
+
.option('offset', { alias: ['o'], type: 'number', describe: 'Start list at offset n' })
|
|
23
|
+
.option('sort', { alias: ['s'], type: 'string', describe: 'Sort by attribute' })
|
|
24
|
+
.conflicts('id', ['limit', 'offset', 'sort'])
|
|
25
|
+
.positional('id', { describe: 'Contact point id (or unique prefix)', type: 'string' });
|
|
26
|
+
};
|
|
27
|
+
exports.builder = builder;
|
|
28
|
+
function handler({ client, id, format, offset, limit, sort }) {
|
|
29
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
+
try {
|
|
31
|
+
let results;
|
|
32
|
+
if (id) {
|
|
33
|
+
const resource = yield (0, utils_1.resolveResource)(id, client.contactpoints);
|
|
34
|
+
(0, utils_1.logObject)((0, utils_1.expandArrays)(resource, ['templates', 'recipients']), format);
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
results = yield client.contactpoints.list({ offset, limit, sort });
|
|
38
|
+
if (format === 'table') {
|
|
39
|
+
(0, utils_1.logObject)(results.map(r => (0, utils_1.expandArrays)(r, ['templates', 'recipients'])), 'table', [
|
|
40
|
+
'id',
|
|
41
|
+
'type',
|
|
42
|
+
'description',
|
|
43
|
+
'templates',
|
|
44
|
+
'recipients'
|
|
45
|
+
]);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
(0, utils_1.logObject)(results, format || 'json');
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
catch (e) {
|
|
53
|
+
(0, utils_1.logError)(e);
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
exports.handler = handler;
|
|
58
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/contactpoints/list.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;AAIH,uCAAiF;AAEpE,QAAA,OAAO,GAAG,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAEpC,QAAA,IAAI,GAAG,qBAAqB,CAAC;AAEnC,MAAM,OAAO,GAAG,CAAC,IAAgB,EAAE,EAAE;IAC1C,OAAO,IAAI;SACR,MAAM,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,oBAAoB,EAAE,CAAC;SAC/E,MAAM,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,wBAAwB,EAAE,CAAC;SACtF,MAAM,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,mBAAmB,EAAE,CAAC;SAC/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 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright © 2018 Emu Analytics
|
|
4
|
+
*/
|
|
5
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
6
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
7
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
8
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
9
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
10
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
11
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.handler = exports.builder = exports.desc = exports.command = void 0;
|
|
16
|
+
const utils_1 = require("../../utils");
|
|
17
|
+
exports.command = ['metadata <id>', 'meta'];
|
|
18
|
+
exports.desc = 'Get/set resource metadata';
|
|
19
|
+
const builder = (args) => {
|
|
20
|
+
return args.positional('id', { describe: 'Resource id (or unique prefix)', type: 'string' }).option('set', {
|
|
21
|
+
type: 'array',
|
|
22
|
+
describe: 'One or more key/values to set in form <key>=<value>. Use <key>= to delete a key.'
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
exports.builder = builder;
|
|
26
|
+
function handler({ client, id, set }) {
|
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
try {
|
|
29
|
+
if (!set) {
|
|
30
|
+
// Get metadata
|
|
31
|
+
const resource = yield (0, utils_1.resolveResource)(id, client.contactpoints);
|
|
32
|
+
(0, utils_1.logObject)(resource.metadata, 'json');
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
// Set metadata
|
|
36
|
+
let resource = yield (0, utils_1.resolveResource)(id, client.contactpoints);
|
|
37
|
+
// Update metadata
|
|
38
|
+
const keyValues = (0, utils_1.getMetadataKeyValues)(set);
|
|
39
|
+
for (const key of Object.keys(keyValues)) {
|
|
40
|
+
const value = keyValues[key];
|
|
41
|
+
if (value === '') {
|
|
42
|
+
yield client.contactpoints.deleteMetadata(resource.id, key);
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
yield client.contactpoints.setMetadata(resource.id, key, value);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
// Reload
|
|
49
|
+
resource = yield (0, utils_1.resolveResource)(id, client.contactpoints);
|
|
50
|
+
(0, utils_1.logObject)(resource.metadata, 'json');
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
catch (e) {
|
|
54
|
+
(0, utils_1.logError)(e);
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
exports.handler = handler;
|
|
59
|
+
//# sourceMappingURL=metadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../../src/commands/contactpoints/metadata.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;AAIH,uCAAyF;AAE5E,QAAA,OAAO,GAAG,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;AAEpC,QAAA,IAAI,GAAG,2BAA2B,CAAC;AAEzC,MAAM,OAAO,GAAG,CAAC,IAAgB,EAAE,EAAE;IAC1C,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,gCAAgC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE;QACzG,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,kFAAkF;KAC7F,CAAC,CAAC;AACL,CAAC,CAAC;AALW,QAAA,OAAO,WAKlB;AASF,SAAsB,OAAO,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,EAAU;;QACvD,IAAI;YACF,IAAI,CAA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, generator) {
|
|
6
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
7
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
8
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
9
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
10
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
11
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.handler = exports.builder = exports.desc = exports.command = void 0;
|
|
16
|
+
const utils_1 = require("../../utils");
|
|
17
|
+
exports.command = ['send <id>'];
|
|
18
|
+
exports.desc = 'Send a notification to a contact point';
|
|
19
|
+
const builder = (args) => {
|
|
20
|
+
return args
|
|
21
|
+
.positional('id', {
|
|
22
|
+
describe: 'Contact point id',
|
|
23
|
+
type: 'string'
|
|
24
|
+
})
|
|
25
|
+
.option('template', { description: 'Notification template', type: 'string' })
|
|
26
|
+
.option('subject', { description: 'Notification subject', type: 'string' })
|
|
27
|
+
.option('recipients', { description: 'Notification recipients (comma separated)', type: 'array' })
|
|
28
|
+
.option('data', { description: 'Notification data (JSON-formatted)', type: 'string', default: '{}' });
|
|
29
|
+
};
|
|
30
|
+
exports.builder = builder;
|
|
31
|
+
const handler = ({ client, format, id, template, subject, recipients, data }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
32
|
+
try {
|
|
33
|
+
const resource = yield (0, utils_1.resolveResource)(id, client.contactpoints);
|
|
34
|
+
yield client.contactpoints.send(resource.id, {
|
|
35
|
+
subject,
|
|
36
|
+
template,
|
|
37
|
+
recipients,
|
|
38
|
+
data: JSON.parse(data)
|
|
39
|
+
});
|
|
40
|
+
(0, utils_1.logDetail)('Notification sent');
|
|
41
|
+
}
|
|
42
|
+
catch (e) {
|
|
43
|
+
(0, utils_1.logError)(e);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
exports.handler = handler;
|
|
47
|
+
//# sourceMappingURL=send.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send.js","sourceRoot":"","sources":["../../../src/commands/contactpoints/send.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;AAIH,uCAAmE;AAEtD,QAAA,OAAO,GAAG,CAAC,WAAW,CAAC,CAAC;AAExB,QAAA,IAAI,GAAG,wCAAwC,CAAC;AAEtD,MAAM,OAAO,GAAG,CAAC,IAAgB,EAAE,EAAE;IAC1C,OAAO,IAAI;SACR,UAAU,CAAC,IAAI,EAAE;QAChB,QAAQ,EAAE,kBAAkB;QAC5B,IAAI,EAAE,QAAQ;KACf,CAAC;SACD,MAAM,CAAC,UAAU,EAAE,EAAE,WAAW,EAAE,uBAAuB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;SAC5E,MAAM,CAAC,SAAS,EAAE,EAAE,WAAW,EAAE,sBAAsB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;SAC1E,MAAM,CAAC,YAAY,EAAE,EAAE,WAAW,EAAE,2CAA2C,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;SACjG,MAAM,CAAC,MAAM,EAAE,EAAE,WAAW,EAAE,oCAAoC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;AAC1G,CAAC,CAAC;AAVW,QAAA,OAAO,WAUlB;AAYK,MAAM,OAAO,GAAG,CAAO,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAU,EAAE,EAAE;IACnG,IAAI;QACF,MAAM,QAAQ,GAAG,MAAM,IAAA,uBAAe,EAAC,EAAE,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;QAEjE,MAAM,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE;YAC3C,OAAO;YACP,QAAQ;YACR,UAAU;YACV,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;SACvB,CAAC,CAAC;QAEH,IAAA,iBAAS,EAAC,mBAAmB,CAAC,CAAC;KAChC;IAAC,OAAO,CAAC,EAAE;QACV,IAAA,gBAAQ,EAAC,CAAC,CAAC,CAAC;KACb;AACH,CAAC,CAAA,CAAC;AAfW,QAAA,OAAO,WAelB"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright © 2018 Emu Analytics
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
31
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
32
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
33
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
34
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
+
exports.handler = exports.builder = exports.desc = exports.command = void 0;
|
|
39
|
+
const inquirer = __importStar(require("inquirer"));
|
|
40
|
+
const utils_1 = require("../../utils");
|
|
41
|
+
exports.command = ['update <id>'];
|
|
42
|
+
exports.desc = 'Update a contact point';
|
|
43
|
+
const builder = (args) => {
|
|
44
|
+
return args
|
|
45
|
+
.option('description', { alias: 'd', description: 'Contact point description', type: 'string' })
|
|
46
|
+
.option('templates', { description: 'Contact point templates (comma-separated)', type: 'array' })
|
|
47
|
+
.option('recipients', { description: 'Recipients (comma-separated)', type: 'array' })
|
|
48
|
+
.option('interactive', {
|
|
49
|
+
alias: 'i',
|
|
50
|
+
describe: 'Show interactive prompts',
|
|
51
|
+
type: 'boolean',
|
|
52
|
+
default: 'true'
|
|
53
|
+
})
|
|
54
|
+
.positional('id', { describe: 'Contact point id (or unique prefix)', type: 'string' });
|
|
55
|
+
};
|
|
56
|
+
exports.builder = builder;
|
|
57
|
+
function handler(params) {
|
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
const client = params.client;
|
|
60
|
+
const id = params.id;
|
|
61
|
+
try {
|
|
62
|
+
const resource = yield (0, utils_1.resolveResource)(id, client.contactpoints);
|
|
63
|
+
if (params.interactive) {
|
|
64
|
+
const answers = yield inquirer.prompt([
|
|
65
|
+
{
|
|
66
|
+
type: 'input',
|
|
67
|
+
name: 'description',
|
|
68
|
+
message: 'Description',
|
|
69
|
+
default: params.description || resource.description
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
type: 'input',
|
|
73
|
+
name: 'templates',
|
|
74
|
+
message: 'Templates (comma separated)',
|
|
75
|
+
default: (params.templates || resource.templates).join(', ')
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
type: 'input',
|
|
79
|
+
name: 'recipients',
|
|
80
|
+
message: 'Recipients (comma separated)',
|
|
81
|
+
default: (params.recipients || resource.recipients).join(', ')
|
|
82
|
+
}
|
|
83
|
+
]);
|
|
84
|
+
params.description = answers.description;
|
|
85
|
+
params.templates = answers.templates
|
|
86
|
+
.split(',')
|
|
87
|
+
.map(s => s.trim())
|
|
88
|
+
.filter(s => s.length);
|
|
89
|
+
params.recipients = answers.recipients
|
|
90
|
+
.split(',')
|
|
91
|
+
.map(s => s.trim())
|
|
92
|
+
.filter(s => s.length);
|
|
93
|
+
}
|
|
94
|
+
const updatedResource = yield client.contactpoints.update(resource.id, {
|
|
95
|
+
id: params.id,
|
|
96
|
+
description: params.description,
|
|
97
|
+
templates: params.templates,
|
|
98
|
+
recipients: params.recipients
|
|
99
|
+
});
|
|
100
|
+
if (params.format === 'table') {
|
|
101
|
+
(0, utils_1.logObject)(updatedResource, 'table');
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
(0, utils_1.logObject)(updatedResource, 'json');
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
catch (e) {
|
|
108
|
+
(0, utils_1.logError)(e);
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
exports.handler = handler;
|
|
113
|
+
//# sourceMappingURL=update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../src/commands/contactpoints/update.ts"],"names":[],"m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CAAC,UAAU;aAC9B,CAAC,CAAC;YAEH,IAAI,MAAM,CAAC,MAAM,KAAK,OAAO,EAAE;gBAC7B,IAAA,iBAAS,EAAC,eAAe,EAAE,OAAO,CAAC,CAAC;aACrC;iBAAM;gBACL,IAAA,iBAAS,EAAC,eAAe,EAAE,MAAM,CAAC,CAAC;aACpC;SACF;QAAC,OAAO,CAAC,EAAE;YACV,IAAA,gBAAQ,EAAC,CAAC,CAAC,CAAC;SACb;IACH,CAAC;CAAA;AAtDD,0BAsDC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright © 2018 Emu Analytics
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.builder = exports.desc = exports.command = void 0;
|
|
7
|
+
exports.command = ['contactpoints <command>', 'cps'];
|
|
8
|
+
exports.desc = 'Contact Point commands';
|
|
9
|
+
const builder = (y) => {
|
|
10
|
+
return y.commandDir('contactpoints').demandCommand(1);
|
|
11
|
+
};
|
|
12
|
+
exports.builder = builder;
|
|
13
|
+
//# sourceMappingURL=contactpoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contactpoints.js","sourceRoot":"","sources":["../../src/commands/contactpoints.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAIU,QAAA,OAAO,GAAG,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;AAE7C,QAAA,IAAI,GAAG,wBAAwB,CAAC;AAEtC,MAAM,OAAO,GAAG,CAAC,CAAa,EAAE,EAAE;IACvC,OAAO,CAAC,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;AACxD,CAAC,CAAC;AAFW,QAAA,OAAO,WAElB"}
|
|
@@ -36,10 +36,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
36
36
|
};
|
|
37
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
38
|
exports.handler = exports.builder = exports.desc = exports.command = void 0;
|
|
39
|
-
const utils_1 = require("../../utils");
|
|
40
39
|
const inquirer = __importStar(require("inquirer"));
|
|
40
|
+
const utils_1 = require("../../utils");
|
|
41
41
|
exports.command = 'create';
|
|
42
|
-
exports.desc = 'Create a new
|
|
42
|
+
exports.desc = 'Create a new Database connection';
|
|
43
43
|
const builder = (args) => {
|
|
44
44
|
return args
|
|
45
45
|
.option('id', { describe: 'ID for new database', type: 'string' })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/commands/databases/create.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/commands/databases/create.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,mDAAqC;AAErC,uCAAkD;AAErC,QAAA,OAAO,GAAG,QAAQ,CAAC;AAEnB,QAAA,IAAI,GAAG,kCAAkC,CAAC;AAEhD,MAAM,OAAO,GAAG,CAAC,IAAgB,EAAE,EAAE;IAC1C,OAAO,IAAI;SACR,MAAM,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,qBAAqB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;SACjE,MAAM,CAAC,eAAe,EAAE,EAAE,QAAQ,EAAE,iCAAiC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;SACxF,MAAM,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,uBAAuB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;SACrE,MAAM,CAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,8BAA8B,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;SACnF,MAAM,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,iBAAiB,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