1 | "use strict";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | var __importDefault = (this && this.__importDefault) || function (mod) {
|
9 | return (mod && mod.__esModule) ? mod : { "default": mod };
|
10 | };
|
11 | Object.defineProperty(exports, "__esModule", { value: true });
|
12 | const path_1 = __importDefault(require("path"));
|
13 | const enums_1 = require("./enums");
|
14 | const index_1 = require("./index");
|
15 | const config = {
|
16 | "projectName": "showcase-app",
|
17 | "directoryName": "../../library/showcase-app/dist",
|
18 | "outputDirectory": "output-test",
|
19 | "outputLevel": enums_1.OutputLevelEnum.Verbose,
|
20 | "additionalAppuiManifestParameters": {
|
21 | "testing-key": "testing-val",
|
22 | "testing-key1": "testing-val1",
|
23 | "testing-key2": "testing-val2",
|
24 | "testing-key3": "testing-val3"
|
25 | },
|
26 | "additionalProjectManifestParameters": {
|
27 | "testing-metadata": "testing-metadata",
|
28 | "testing-metadata1": "testing-metadata2"
|
29 | },
|
30 | "controlSystemHost": "192.168.2.44",
|
31 | "sftpUser": "crestron",
|
32 | "sftpPassword": "",
|
33 | "promptForCredential": false,
|
34 | "sftpDirectory": "display",
|
35 | "deviceType": enums_1.DeviceTypeEnum.TouchScreen,
|
36 | "contractFile": undefined
|
37 | };
|
38 | let commands = process.argv;
|
39 | if (commands.includes('archive')) {
|
40 | index_1.archiver(config)
|
41 | .then(() => console.log('Archiving is done'));
|
42 | }
|
43 | else if (commands.includes('distribute')) {
|
44 | index_1.distributor(path_1.default.resolve(config.outputDirectory, `${config.projectName}.ch5z`), config)
|
45 | .then(() => {
|
46 | console.log('Distribution is done');
|
47 | process.exit(0);
|
48 | })
|
49 | .catch(err => {
|
50 | console.error(err);
|
51 | process.exit(1);
|
52 | });
|
53 | }
|
54 | else {
|
55 | throw new Error('Unknown command');
|
56 | }
|