@emuanalytics/flow-cli 2.1.2 → 2.2.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/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +27 -0
- package/package.json +38 -44
- package/dist/commands/apikeys/create.js +0 -144
- package/dist/commands/apikeys/create.js.map +0 -1
- package/dist/commands/apikeys/delete.js +0 -74
- package/dist/commands/apikeys/delete.js.map +0 -1
- package/dist/commands/apikeys/list.js +0 -53
- package/dist/commands/apikeys/list.js.map +0 -1
- package/dist/commands/apikeys/metadata.js +0 -59
- package/dist/commands/apikeys/metadata.js.map +0 -1
- package/dist/commands/apikeys.js +0 -13
- package/dist/commands/apikeys.js.map +0 -1
- package/dist/commands/appconfig.js +0 -60
- package/dist/commands/appconfig.js.map +0 -1
- package/dist/commands/applications.js +0 -13
- package/dist/commands/applications.js.map +0 -1
- package/dist/commands/apps/create.js +0 -180
- package/dist/commands/apps/create.js.map +0 -1
- package/dist/commands/apps/delete.js +0 -74
- package/dist/commands/apps/delete.js.map +0 -1
- package/dist/commands/apps/export.js +0 -93
- package/dist/commands/apps/export.js.map +0 -1
- package/dist/commands/apps/import.js +0 -119
- package/dist/commands/apps/import.js.map +0 -1
- package/dist/commands/apps/list.js +0 -54
- package/dist/commands/apps/list.js.map +0 -1
- package/dist/commands/apps/metadata.js +0 -61
- package/dist/commands/apps/metadata.js.map +0 -1
- package/dist/commands/apps/update.js +0 -110
- package/dist/commands/apps/update.js.map +0 -1
- package/dist/commands/contactpoints/create.js +0 -151
- package/dist/commands/contactpoints/create.js.map +0 -1
- package/dist/commands/contactpoints/delete.js +0 -74
- package/dist/commands/contactpoints/delete.js.map +0 -1
- package/dist/commands/contactpoints/list.js +0 -58
- package/dist/commands/contactpoints/list.js.map +0 -1
- package/dist/commands/contactpoints/metadata.js +0 -59
- package/dist/commands/contactpoints/metadata.js.map +0 -1
- package/dist/commands/contactpoints/send.js +0 -47
- package/dist/commands/contactpoints/send.js.map +0 -1
- package/dist/commands/contactpoints/update.js +0 -113
- package/dist/commands/contactpoints/update.js.map +0 -1
- package/dist/commands/contactpoints.js +0 -13
- package/dist/commands/contactpoints.js.map +0 -1
- package/dist/commands/databases/create.js +0 -190
- package/dist/commands/databases/create.js.map +0 -1
- package/dist/commands/databases/delete.js +0 -74
- package/dist/commands/databases/delete.js.map +0 -1
- package/dist/commands/databases/list.js +0 -52
- package/dist/commands/databases/list.js.map +0 -1
- package/dist/commands/databases.js +0 -13
- package/dist/commands/databases.js.map +0 -1
- package/dist/commands/datasets/attributes.js +0 -48
- package/dist/commands/datasets/attributes.js.map +0 -1
- package/dist/commands/datasets/create.js +0 -200
- package/dist/commands/datasets/create.js.map +0 -1
- package/dist/commands/datasets/delete.js +0 -74
- package/dist/commands/datasets/delete.js.map +0 -1
- package/dist/commands/datasets/export.js +0 -95
- package/dist/commands/datasets/export.js.map +0 -1
- package/dist/commands/datasets/list.js +0 -74
- package/dist/commands/datasets/list.js.map +0 -1
- package/dist/commands/datasets/metadata.js +0 -59
- package/dist/commands/datasets/metadata.js.map +0 -1
- package/dist/commands/datasets/query.js +0 -86
- package/dist/commands/datasets/query.js.map +0 -1
- package/dist/commands/datasets/tags.js +0 -56
- package/dist/commands/datasets/tags.js.map +0 -1
- package/dist/commands/datasets/update.js +0 -187
- package/dist/commands/datasets/update.js.map +0 -1
- package/dist/commands/datasets.js +0 -13
- package/dist/commands/datasets.js.map +0 -1
- package/dist/commands/job.js +0 -13
- package/dist/commands/job.js.map +0 -1
- package/dist/commands/jobs/delete.js +0 -74
- package/dist/commands/jobs/delete.js.map +0 -1
- package/dist/commands/jobs/list.js +0 -52
- package/dist/commands/jobs/list.js.map +0 -1
- package/dist/commands/jobs/metadata.js +0 -36
- package/dist/commands/jobs/metadata.js.map +0 -1
- package/dist/commands/maplayers/create.js +0 -98
- package/dist/commands/maplayers/create.js.map +0 -1
- package/dist/commands/maplayers/delete.js +0 -74
- package/dist/commands/maplayers/delete.js.map +0 -1
- package/dist/commands/maplayers/list.js +0 -51
- package/dist/commands/maplayers/list.js.map +0 -1
- package/dist/commands/maplayers/metadata.js +0 -61
- package/dist/commands/maplayers/metadata.js.map +0 -1
- package/dist/commands/maplayers/update.js +0 -103
- package/dist/commands/maplayers/update.js.map +0 -1
- package/dist/commands/maplayers.js +0 -13
- package/dist/commands/maplayers.js.map +0 -1
- package/dist/commands/media/delete.js +0 -74
- package/dist/commands/media/delete.js.map +0 -1
- package/dist/commands/media/download.js +0 -75
- package/dist/commands/media/download.js.map +0 -1
- package/dist/commands/media/list.js +0 -52
- package/dist/commands/media/list.js.map +0 -1
- package/dist/commands/media/metadata.js +0 -59
- package/dist/commands/media/metadata.js.map +0 -1
- package/dist/commands/media/upload.js +0 -91
- package/dist/commands/media/upload.js.map +0 -1
- package/dist/commands/media.js +0 -13
- package/dist/commands/media.js.map +0 -1
- package/dist/commands/new.js +0 -63
- package/dist/commands/new.js.map +0 -1
- package/dist/commands/pipelines/cache.js +0 -62
- package/dist/commands/pipelines/cache.js.map +0 -1
- package/dist/commands/pipelines/components.js +0 -134
- package/dist/commands/pipelines/components.js.map +0 -1
- package/dist/commands/pipelines/config.js +0 -77
- package/dist/commands/pipelines/config.js.map +0 -1
- package/dist/commands/pipelines/list.js +0 -78
- package/dist/commands/pipelines/list.js.map +0 -1
- package/dist/commands/pipelines/sink.js +0 -99
- package/dist/commands/pipelines/sink.js.map +0 -1
- package/dist/commands/pipelines/source.js +0 -97
- package/dist/commands/pipelines/source.js.map +0 -1
- package/dist/commands/pipelines.js +0 -13
- package/dist/commands/pipelines.js.map +0 -1
- package/dist/commands/styles/create.js +0 -130
- package/dist/commands/styles/create.js.map +0 -1
- package/dist/commands/styles/delete.js +0 -74
- package/dist/commands/styles/delete.js.map +0 -1
- package/dist/commands/styles/edit.js +0 -37
- package/dist/commands/styles/edit.js.map +0 -1
- package/dist/commands/styles/list.js +0 -51
- package/dist/commands/styles/list.js.map +0 -1
- package/dist/commands/styles/metadata.js +0 -61
- package/dist/commands/styles/metadata.js.map +0 -1
- package/dist/commands/styles/view.js +0 -37
- package/dist/commands/styles/view.js.map +0 -1
- package/dist/commands/styles.js +0 -13
- package/dist/commands/styles.js.map +0 -1
- package/dist/commands/tiles/create.js +0 -221
- package/dist/commands/tiles/create.js.map +0 -1
- package/dist/commands/tiles/delete.js +0 -74
- package/dist/commands/tiles/delete.js.map +0 -1
- package/dist/commands/tiles/list.js +0 -51
- package/dist/commands/tiles/list.js.map +0 -1
- package/dist/commands/tiles/metadata.js +0 -61
- package/dist/commands/tiles/metadata.js.map +0 -1
- package/dist/commands/tiles/preview.js +0 -33
- package/dist/commands/tiles/preview.js.map +0 -1
- package/dist/commands/tiles/tilespec.js +0 -44
- package/dist/commands/tiles/tilespec.js.map +0 -1
- package/dist/commands/tiles/update.js +0 -194
- package/dist/commands/tiles/update.js.map +0 -1
- package/dist/commands/tiles.js +0 -13
- package/dist/commands/tiles.js.map +0 -1
- package/dist/commands/upload/list.js +0 -51
- package/dist/commands/upload/list.js.map +0 -1
- package/dist/commands/upload/upload.js +0 -171
- package/dist/commands/upload/upload.js.map +0 -1
- package/dist/commands/upload.js +0 -13
- package/dist/commands/upload.js.map +0 -1
- package/dist/commands/users/create.js +0 -140
- package/dist/commands/users/create.js.map +0 -1
- package/dist/commands/users/delete.js +0 -74
- package/dist/commands/users/delete.js.map +0 -1
- package/dist/commands/users/list.js +0 -52
- package/dist/commands/users/list.js.map +0 -1
- package/dist/commands/users/metadata.js +0 -61
- package/dist/commands/users/metadata.js.map +0 -1
- package/dist/commands/users/update.js +0 -151
- package/dist/commands/users/update.js.map +0 -1
- package/dist/commands/users.js +0 -13
- package/dist/commands/users.js.map +0 -1
- package/dist/commands/version.js +0 -35
- package/dist/commands/version.js.map +0 -1
- package/dist/create-app/create-app.js +0 -147
- package/dist/create-app/create-app.js.map +0 -1
- package/dist/create-app/download.js +0 -52
- package/dist/create-app/download.js.map +0 -1
- package/dist/create-app/starters.js +0 -18
- package/dist/create-app/starters.js.map +0 -1
- package/dist/create-app/unzip.js +0 -89
- package/dist/create-app/unzip.js.map +0 -1
- package/dist/create-app/utils.js +0 -134
- package/dist/create-app/utils.js.map +0 -1
- package/dist/create-app/version.js +0 -9
- package/dist/create-app/version.js.map +0 -1
- package/dist/index.js +0 -71
- package/dist/index.js.map +0 -1
- package/dist/style-server/app.js +0 -119
- package/dist/style-server/app.js.map +0 -1
- package/dist/style-server/index.js +0 -97
- package/dist/style-server/index.js.map +0 -1
- package/dist/utils/index.js +0 -281
- package/dist/utils/index.js.map +0 -1
|
@@ -1,93 +0,0 @@
|
|
|
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
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
38
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
39
|
-
};
|
|
40
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
-
exports.handler = exports.builder = exports.desc = exports.command = void 0;
|
|
42
|
-
const fs = __importStar(require("fs"));
|
|
43
|
-
const lodash_get_1 = __importDefault(require("lodash.get"));
|
|
44
|
-
const ora_1 = __importDefault(require("ora"));
|
|
45
|
-
const path = __importStar(require("path"));
|
|
46
|
-
const utils_1 = require("../../utils");
|
|
47
|
-
exports.command = ['export <file> <id>'];
|
|
48
|
-
exports.desc = 'Export an application to JSON';
|
|
49
|
-
const builder = (args) => {
|
|
50
|
-
return args
|
|
51
|
-
.positional('file', { describe: 'Path to output JSON file', type: 'string' })
|
|
52
|
-
.positional('id', { describe: 'Application id (or unique prefix)', type: 'string' });
|
|
53
|
-
};
|
|
54
|
-
exports.builder = builder;
|
|
55
|
-
function handler({ client, id, file }) {
|
|
56
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
-
try {
|
|
58
|
-
const app = yield (0, utils_1.resolveResource)(id, client.applications);
|
|
59
|
-
file = path.resolve(file);
|
|
60
|
-
const uploadSpinner = (0, ora_1.default)(`Exporting application: ${app.name}`).start();
|
|
61
|
-
const outputStream = fs.createWriteStream(file, { encoding: 'utf8' });
|
|
62
|
-
outputStream.on('error', err => {
|
|
63
|
-
uploadSpinner.fail();
|
|
64
|
-
(0, utils_1.logError)(err);
|
|
65
|
-
process.exit(1);
|
|
66
|
-
});
|
|
67
|
-
outputStream.write('{\n');
|
|
68
|
-
const resourceTypes = [
|
|
69
|
-
'applications',
|
|
70
|
-
'apiKeys',
|
|
71
|
-
'databases',
|
|
72
|
-
'datasets',
|
|
73
|
-
'styles',
|
|
74
|
-
'tileSources',
|
|
75
|
-
'auth.users'
|
|
76
|
-
];
|
|
77
|
-
for (const resourceType of resourceTypes) {
|
|
78
|
-
const resourceEndpoint = (0, lodash_get_1.default)(client, resourceType);
|
|
79
|
-
const appIdKey = resourceType === 'applications' ? 'id' : 'applicationId';
|
|
80
|
-
const list = yield resourceEndpoint.list({ filter: { [appIdKey]: app.id } });
|
|
81
|
-
outputStream.write(`"${resourceType}": ${JSON.stringify(list, null, 2)},\n`);
|
|
82
|
-
}
|
|
83
|
-
outputStream.write('}\n');
|
|
84
|
-
outputStream.end();
|
|
85
|
-
uploadSpinner.succeed();
|
|
86
|
-
}
|
|
87
|
-
catch (e) {
|
|
88
|
-
(0, utils_1.logError)(e);
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
exports.handler = handler;
|
|
93
|
-
//# sourceMappingURL=export.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"export.js","sourceRoot":"","sources":["../../../src/commands/apps/export.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,uCAAwB;AACxB,4DAA4B;AAC5B,8CAAqB;AACrB,2CAA4B;AAE5B,uCAAuD;AAE1C,QAAA,OAAO,GAAG,CAAC,oBAAoB,CAAC,CAAA;AAEhC,QAAA,IAAI,GAAG,+BAA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,EAAC,MAAM,EAAE,YAAY,CAAC,CAAA;gBAChF,MAAM,QAAQ,GAAG,YAAY,KAAK,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe,CAAA;gBACzE,MAAM,IAAI,GAAG,MAAM,gBAAgB,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;gBAC5E,YAAY,CAAC,KAAK,CAAC,IAAI,YAAY,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAA;aAC7E;YAED,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;YACzB,YAAY,CAAC,GAAG,EAAE,CAAA;YAElB,aAAa,CAAC,OAAO,EAAE,CAAA;SACxB;QAAC,OAAO,CAAC,EAAE;YACV,IAAA,gBAAQ,EAAC,CAAC,CAAC,CAAA;SACZ;IACH,CAAC;CAAA;AAxCD,0BAwCC"}
|
|
@@ -1,119 +0,0 @@
|
|
|
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
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
38
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
39
|
-
};
|
|
40
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
-
exports.handler = exports.builder = exports.desc = exports.command = void 0;
|
|
42
|
-
const fs = __importStar(require("fs"));
|
|
43
|
-
const JSONStream = __importStar(require("JSONStream"));
|
|
44
|
-
const lodash_get_1 = __importDefault(require("lodash.get"));
|
|
45
|
-
const moment_1 = __importDefault(require("moment"));
|
|
46
|
-
const ora_1 = __importDefault(require("ora"));
|
|
47
|
-
const path = __importStar(require("path"));
|
|
48
|
-
const stream_1 = require("stream");
|
|
49
|
-
const utils_1 = require("../../utils");
|
|
50
|
-
exports.command = ['import <file> [<id>]'];
|
|
51
|
-
exports.desc = 'Import an application from JSON';
|
|
52
|
-
const builder = (args) => {
|
|
53
|
-
return args
|
|
54
|
-
.positional('file', { describe: 'Path to input JSON file', type: 'string' })
|
|
55
|
-
.positional('id', { describe: 'Application id (omit to use id from file)', type: 'string' });
|
|
56
|
-
};
|
|
57
|
-
exports.builder = builder;
|
|
58
|
-
function handler({ client, id, file }) {
|
|
59
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
-
try {
|
|
61
|
-
file = path.resolve(file);
|
|
62
|
-
const now = (0, moment_1.default)().toISOString();
|
|
63
|
-
const uploadSpinner = (0, ora_1.default)(`Importing from: ${file}`).start();
|
|
64
|
-
const inputStream = fs.createReadStream(file, { encoding: 'utf8' });
|
|
65
|
-
const parser = JSONStream.parse([true, { emitPath: true }]);
|
|
66
|
-
let resourceCount = 0;
|
|
67
|
-
const writer = new stream_1.Writable({
|
|
68
|
-
objectMode: true,
|
|
69
|
-
write(obj, encoding, callback) {
|
|
70
|
-
const resourceType = obj.path[0];
|
|
71
|
-
const resourceIndex = obj.path[1];
|
|
72
|
-
const resource = obj.value;
|
|
73
|
-
const resourceEndpoint = (0, lodash_get_1.default)(client, resourceType);
|
|
74
|
-
if (typeof resource !== 'object' || !resourceEndpoint) {
|
|
75
|
-
callback(new Error(`Bad file format: ${resourceType}[${resourceIndex}]`));
|
|
76
|
-
}
|
|
77
|
-
// Rewrite timestamps
|
|
78
|
-
if (resource.createdAt) {
|
|
79
|
-
resource.createdAt = now;
|
|
80
|
-
}
|
|
81
|
-
if (resource.updatedAt) {
|
|
82
|
-
resource.updatedAt = now;
|
|
83
|
-
}
|
|
84
|
-
if (id) {
|
|
85
|
-
// Rewrite application id
|
|
86
|
-
if (resourceType === 'applications') {
|
|
87
|
-
resource.id = id;
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
resource.applicationId = id;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
// Create resource j
|
|
94
|
-
resourceEndpoint
|
|
95
|
-
.create(resource, { applicationId: resource.applicationId })
|
|
96
|
-
.then(r => {
|
|
97
|
-
uploadSpinner.text = `Imported ${resourceType}[${resourceIndex}]`;
|
|
98
|
-
resourceCount++;
|
|
99
|
-
callback();
|
|
100
|
-
})
|
|
101
|
-
.catch(callback);
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
const p = (0, stream_1.pipeline)(inputStream, parser, writer, err => {
|
|
105
|
-
if (err) {
|
|
106
|
-
uploadSpinner.fail();
|
|
107
|
-
(0, utils_1.logError)(err);
|
|
108
|
-
process.exit(1);
|
|
109
|
-
}
|
|
110
|
-
uploadSpinner.succeed(`Imported ${resourceCount} resource${resourceCount > 1 ? 's' : ''}`);
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
catch (e) {
|
|
114
|
-
(0, utils_1.logError)(e);
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
exports.handler = handler;
|
|
119
|
-
//# sourceMappingURL=import.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"import.js","sourceRoot":"","sources":["../../../src/commands/apps/import.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,uCAAwB;AACxB,uDAAwC;AACxC,4DAA4B;AAC5B,oDAA2B;AAC3B,8CAAqB;AACrB,2CAA4B;AAC5B,mCAA2C;AAE3C,uCAAsC;AAEzB,QAAA,OAAO,GAAG,CAAC,sBAAsB,CAAC,CAAA;AAElC,QAAA,IAAI,GAAG,iCAAiC,CAAA;AAE9C,MAAM,OAAO,GAAG,CAAC,IAAgB,EAAE,EAAE;IAC1C,OAAO,IAAI;SACR,UAAU,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,yBAAyB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;SAC3E,UAAU,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,2CAA2C,EAAE,IAA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
@@ -1,54 +0,0 @@
|
|
|
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
|
-
const AUTHORISED_EMAIL_DOMAINS_KEY = 'auth.authorisedEmailDomains';
|
|
18
|
-
exports.command = ['list [id]', 'ls', '$0'];
|
|
19
|
-
exports.desc = 'List applications';
|
|
20
|
-
const builder = (args) => {
|
|
21
|
-
return args
|
|
22
|
-
.option('limit', { alias: 'n', type: 'number', describe: 'Limit to n results' })
|
|
23
|
-
.option('offset', { alias: ['o'], type: 'number', describe: 'Start list at offset n' })
|
|
24
|
-
.option('sort', { alias: ['s'], type: 'string', describe: 'Sort by attribute' })
|
|
25
|
-
.positional('id', { describe: 'Application id (or unique prefix)', type: 'string' })
|
|
26
|
-
.conflicts('id', ['limit', 'offset', 'sort']);
|
|
27
|
-
};
|
|
28
|
-
exports.builder = builder;
|
|
29
|
-
function handler({ client, id, format, offset, limit, sort }) {
|
|
30
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
-
try {
|
|
32
|
-
let results;
|
|
33
|
-
if (id) {
|
|
34
|
-
const resource = yield (0, utils_1.resolveResource)(id, client.applications);
|
|
35
|
-
const domains = yield client.applications.getMetadata(resource.id, AUTHORISED_EMAIL_DOMAINS_KEY);
|
|
36
|
-
(0, utils_1.logObject)(Object.assign(Object.assign({}, resource), { authorisedEmailDomains: (0, utils_1.domainsToString)(domains) }), format);
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
results = yield client.applications.list({ offset, limit, sort });
|
|
40
|
-
if (format === 'table') {
|
|
41
|
-
(0, utils_1.logObject)(results, 'table', ['id', 'name', 'description', 'contact']);
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
(0, utils_1.logObject)(results, format || 'json');
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
catch (e) {
|
|
49
|
-
(0, utils_1.logError)(e);
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
exports.handler = handler;
|
|
54
|
-
//# sourceMappingURL=list.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/apps/list.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;AAEH,uCAAoF;AAIpF,MAAM,4BAA4B,GAAG,6BAA6B,CAAC;AAEtD,QAAA,OAAO,GAAG,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAEpC,QAAA,IAAI,GAAG,mBAAmB,CAAC;AAEjC,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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CAAC,EAAE;YACV,IAAA,gBAAQ,EAAC,CAAC,CAAC,CAAC;SACb;IACH,CAAC;CAAA;AAnBD,0BAmBC"}
|
|
@@ -1,61 +0,0 @@
|
|
|
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
|
|
21
|
-
.positional('id', { describe: 'Application id (or unique prefix)', type: 'string' })
|
|
22
|
-
.option('set', {
|
|
23
|
-
type: 'array',
|
|
24
|
-
describe: 'One or more key/values to set in form <key>=<value>. Use <key>= to delete a key.'
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
exports.builder = builder;
|
|
28
|
-
function handler({ client, id, set }) {
|
|
29
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
-
try {
|
|
31
|
-
if (!set) {
|
|
32
|
-
// Get metadata
|
|
33
|
-
const resource = yield (0, utils_1.resolveResource)(id, client.applications);
|
|
34
|
-
(0, utils_1.logObject)(resource.metadata, 'json');
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
// Set metadata
|
|
38
|
-
let resource = yield (0, utils_1.resolveResource)(id, client.applications);
|
|
39
|
-
// Update metadata
|
|
40
|
-
const keyValues = (0, utils_1.getMetadataKeyValues)(set);
|
|
41
|
-
for (const key of Object.keys(keyValues)) {
|
|
42
|
-
const value = keyValues[key];
|
|
43
|
-
if (value === '') {
|
|
44
|
-
yield client.applications.deleteMetadata(resource.id, key);
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
yield client.applications.setMetadata(resource.id, key, value);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
// Reload
|
|
51
|
-
resource = yield (0, utils_1.resolveResource)(id, client.applications);
|
|
52
|
-
(0, utils_1.logObject)(resource.metadata, 'json');
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
catch (e) {
|
|
56
|
-
(0, utils_1.logError)(e);
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
exports.handler = handler;
|
|
61
|
-
//# sourceMappingURL=metadata.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../../src/commands/apps/metadata.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;AAEH,uCAAyF;AAI5E,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;SACR,UAAU,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,mCAAmC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;SACnF,MAAM,CAAC,KAAK,EAAE;QACb,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,kFAAkF;KAC7F,CAAC,CAAC;AACP,CAAC,CAAC;AAPW,QA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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 utils_1 = require("../../utils");
|
|
40
|
-
const inquirer = __importStar(require("inquirer"));
|
|
41
|
-
const AUTHORISED_EMAIL_DOMAINS_KEY = 'auth.authorisedEmailDomains';
|
|
42
|
-
exports.command = ['update <id>'];
|
|
43
|
-
exports.desc = 'Update an application';
|
|
44
|
-
const builder = (args) => {
|
|
45
|
-
return args
|
|
46
|
-
.option('name', { alias: 'n', description: 'Dataset name', type: 'string' })
|
|
47
|
-
.option('description', { alias: 'd', description: 'Dataset description', type: 'string' })
|
|
48
|
-
.option('domains', {
|
|
49
|
-
description: 'Authorized self-signup email domains',
|
|
50
|
-
type: 'array'
|
|
51
|
-
})
|
|
52
|
-
.option('interactive', {
|
|
53
|
-
alias: 'i',
|
|
54
|
-
describe: 'Show interactive prompts',
|
|
55
|
-
type: 'boolean',
|
|
56
|
-
default: 'true'
|
|
57
|
-
})
|
|
58
|
-
.positional('id', { describe: 'Application id (or unique prefix)', type: 'string' });
|
|
59
|
-
};
|
|
60
|
-
exports.builder = builder;
|
|
61
|
-
function handler(params) {
|
|
62
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
-
const client = params.client;
|
|
64
|
-
const id = params.id;
|
|
65
|
-
try {
|
|
66
|
-
const app = yield (0, utils_1.resolveResource)(id, client.applications);
|
|
67
|
-
const domains = yield client.applications.getMetadata(app.id, AUTHORISED_EMAIL_DOMAINS_KEY);
|
|
68
|
-
if (params.interactive) {
|
|
69
|
-
const answers = yield inquirer.prompt([
|
|
70
|
-
{ type: 'input', name: 'name', message: 'Name', default: params.name || app.name },
|
|
71
|
-
{
|
|
72
|
-
type: 'input',
|
|
73
|
-
name: 'description',
|
|
74
|
-
message: 'Description',
|
|
75
|
-
default: params.description || app.description
|
|
76
|
-
},
|
|
77
|
-
{ type: 'input', name: 'contact', message: 'Contact', default: params.contact || app.contact },
|
|
78
|
-
{
|
|
79
|
-
type: 'input',
|
|
80
|
-
name: 'domains',
|
|
81
|
-
message: 'Authorized self-signup email domains (comma-separated)',
|
|
82
|
-
default: (0, utils_1.domainsToString)(params.domains || domains)
|
|
83
|
-
}
|
|
84
|
-
]);
|
|
85
|
-
params.name = answers.name;
|
|
86
|
-
params.description = answers.description;
|
|
87
|
-
params.contact = answers.contact;
|
|
88
|
-
params.domains = (0, utils_1.domainsFromString)(answers.domains);
|
|
89
|
-
}
|
|
90
|
-
yield client.applications.setMetadata(app.id, AUTHORISED_EMAIL_DOMAINS_KEY, params.domains);
|
|
91
|
-
const updatedApp = yield client.applications.update(app.id, {
|
|
92
|
-
id: params.id,
|
|
93
|
-
name: params.name,
|
|
94
|
-
description: params.description,
|
|
95
|
-
contact: params.contact
|
|
96
|
-
});
|
|
97
|
-
if (params.format === 'table') {
|
|
98
|
-
(0, utils_1.logObject)(Object.assign(Object.assign({}, updatedApp), { authorisedEmailDomains: (0, utils_1.domainsToString)(params.domains) }), 'table');
|
|
99
|
-
}
|
|
100
|
-
else {
|
|
101
|
-
(0, utils_1.logObject)(updatedApp, 'json');
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
catch (e) {
|
|
105
|
-
(0, utils_1.logError)(e);
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
exports.handler = handler;
|
|
110
|
-
//# sourceMappingURL=update.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../src/commands/apps/update.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAuG;AAEvG,mDAAqC;AAGrC,MAAM,4BAA4B,GAAG,6BAA6B,CAAC;AAEtD,QAAA,OAAO,GAAG,CAAC,aAAa,CAAC,CAAC;AAE1B,QAAA,IAAI,GAAG,uBAA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,sBAAsB,EAAE,IAAA,uBAAe,EAAC,MAAM,CAAC,OAAO,CAAC,KAAI,OAAO,CAAC,CAAC;aAChG;iBAAM;gBACL,IAAA,iBAAS,EAAC,UAAU,EAAE,MAAM,CAAC,CAAC;aAC/B;SACF;QAAC,OAAO,CAAC,EAAE;YACV,IAAA,gBAAQ,EAAC,CAAC,CAAC,CAAC;SACb;IACH,CAAC;CAAA;AAhDD,0BAgDC"}
|
|
@@ -1,151 +0,0 @@
|
|
|
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 ? params.cpPort : 587
|
|
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 ? answers.description : null;
|
|
119
|
-
params.cpHost = answers.host ? answers.host : null;
|
|
120
|
-
params.cpPort = answers.port ? answers.port : null;
|
|
121
|
-
params.cpUser = answers.user ? answers.user : null;
|
|
122
|
-
params.cpPassword = answers.password ? answers.password : null;
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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,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