@signageos/cli 1.1.5 → 1.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/CHANGELOG.md +14 -0
- package/README.md +23 -6
- package/dist/Applet/Build/appletBuildCommand.d.ts +33 -0
- package/dist/Applet/Build/appletBuildCommand.js +99 -0
- package/dist/Applet/Build/appletBuildCommand.js.map +1 -0
- package/dist/Applet/Generate/appletGenerateCommand.js +1 -1
- package/dist/Applet/Generate/appletGenerateCommand.js.map +1 -1
- package/dist/Applet/Start/appletStartCommand.d.ts +34 -8
- package/dist/Applet/Start/appletStartCommand.js +90 -24
- package/dist/Applet/Start/appletStartCommand.js.map +1 -1
- package/dist/Applet/Test/Upload/appletTestUploadCommand.js +1 -1
- package/dist/Applet/Test/Upload/appletTestUploadCommand.js.map +1 -1
- package/dist/Applet/Upload/appletUploadCommand.js +72 -79
- package/dist/Applet/Upload/appletUploadCommand.js.map +1 -1
- package/dist/Applet/Upload/appletUploadCommandHelper.d.ts +0 -3
- package/dist/Applet/Upload/appletUploadCommandHelper.js +18 -10
- package/dist/Applet/Upload/appletUploadCommandHelper.js.map +1 -1
- package/dist/Applet/appletCommand.d.ts +64 -8
- package/dist/Applet/appletCommand.js +2 -0
- package/dist/Applet/appletCommand.js.map +1 -1
- package/dist/Applet/appletFacade.js +3 -2
- package/dist/Applet/appletFacade.js.map +1 -1
- package/dist/Applet/appletServerHelper.d.ts +18 -0
- package/dist/Applet/appletServerHelper.js +83 -0
- package/dist/Applet/appletServerHelper.js.map +1 -0
- package/dist/Auth/loginCommand.js +2 -1
- package/dist/Auth/loginCommand.js.map +1 -1
- package/dist/Device/Connect/connectCommand.d.ts +28 -12
- package/dist/Device/Connect/connectCommand.js +55 -29
- package/dist/Device/Connect/connectCommand.js.map +1 -1
- package/dist/Device/deviceCommand.d.ts +28 -12
- package/dist/Device/deviceFacade.d.ts +0 -2
- package/dist/Device/deviceFacade.js +1 -40
- package/dist/Device/deviceFacade.js.map +1 -1
- package/dist/Emulator/IEmulator.d.ts +1 -1
- package/dist/Emulator/emulatorFacade.js.map +1 -1
- package/dist/Emulator/emulatorFactory.d.ts +4 -2
- package/dist/Emulator/emulatorFactory.js +84 -73
- package/dist/Emulator/emulatorFactory.js.map +1 -1
- package/dist/FileSystem/helper.d.ts +5 -10
- package/dist/FileSystem/helper.js +26 -147
- package/dist/FileSystem/helper.js.map +1 -1
- package/dist/RunControl/runControlHelper.d.ts +5 -9
- package/dist/RunControl/runControlHelper.js +24 -104
- package/dist/RunControl/runControlHelper.js.map +1 -1
- package/dist/helper.d.ts +1 -1
- package/dist/helper.js.map +1 -1
- package/dist/parameters.d.ts +0 -11
- package/dist/parameters.js +0 -13
- package/dist/parameters.js.map +1 -1
- package/package.json +3 -11
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.killAppletServerIfRunningAndForceOption = exports.SERVER_FORCE_OPTION = exports.SERVER_PORT_OPTION = exports.SERVER_PUBLIC_URL_OPTION = void 0;
|
|
40
|
+
var log_1 = require("@signageos/sdk/dist/Console/log");
|
|
41
|
+
exports.SERVER_PUBLIC_URL_OPTION = {
|
|
42
|
+
name: 'server-public-url',
|
|
43
|
+
type: String,
|
|
44
|
+
description: 'Public url of local machine server. Is useful when the local machine is behind a reverse proxy.',
|
|
45
|
+
};
|
|
46
|
+
exports.SERVER_PORT_OPTION = {
|
|
47
|
+
name: 'server-port',
|
|
48
|
+
type: Number,
|
|
49
|
+
description: 'The custom server port for local machine server. Default is detected from currently running applet server.',
|
|
50
|
+
};
|
|
51
|
+
exports.SERVER_FORCE_OPTION = {
|
|
52
|
+
name: 'force',
|
|
53
|
+
type: Boolean,
|
|
54
|
+
description: 'Force start applet server even if it is already running on a different port. Kill the running server first.',
|
|
55
|
+
};
|
|
56
|
+
function killAppletServerIfRunningAndForceOption(dev, options, appletUid, appletVersion, appletPort) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
58
|
+
var force, runningAppletPort;
|
|
59
|
+
return __generator(this, function (_a) {
|
|
60
|
+
switch (_a.label) {
|
|
61
|
+
case 0:
|
|
62
|
+
if (!appletUid || !appletVersion) {
|
|
63
|
+
return [2 /*return*/];
|
|
64
|
+
}
|
|
65
|
+
force = options[exports.SERVER_FORCE_OPTION.name];
|
|
66
|
+
return [4 /*yield*/, dev.applet.serve.getRunningPort(appletUid, appletVersion)];
|
|
67
|
+
case 1:
|
|
68
|
+
runningAppletPort = _a.sent();
|
|
69
|
+
if (!(runningAppletPort && runningAppletPort !== appletPort)) return [3 /*break*/, 4];
|
|
70
|
+
if (!!force) return [3 /*break*/, 2];
|
|
71
|
+
(0, log_1.log)('warning', "Applet server is already running on port ".concat(runningAppletPort, ". Use --force to kill the running server and start a new one."));
|
|
72
|
+
return [3 /*break*/, 4];
|
|
73
|
+
case 2: return [4 /*yield*/, dev.applet.serve.killRunningServer(appletUid, appletVersion)];
|
|
74
|
+
case 3:
|
|
75
|
+
_a.sent();
|
|
76
|
+
_a.label = 4;
|
|
77
|
+
case 4: return [2 /*return*/];
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
exports.killAppletServerIfRunningAndForceOption = killAppletServerIfRunningAndForceOption;
|
|
83
|
+
//# sourceMappingURL=appletServerHelper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appletServerHelper.js","sourceRoot":"","sources":["../../src/Applet/appletServerHelper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAsD;AAIzC,QAAA,wBAAwB,GAAG;IACvC,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,iGAAiG;CACrG,CAAC;AAEE,QAAA,kBAAkB,GAAG;IACjC,IAAI,EAAE,aAAa;IACnB,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,4GAA4G;CAChH,CAAC;AAEE,QAAA,mBAAmB,GAAG;IAClC,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,6GAA6G;CACjH,CAAC;AAEX,SAAsB,uCAAuC,CAC5D,GAAgB,EAChB,OAAyD,EACzD,SAA6B,EAC7B,aAAiC,EACjC,UAA8B;;;;;;oBAE9B,IAAI,CAAC,SAAS,IAAI,CAAC,aAAa,EAAE;wBACjC,sBAAO;qBACP;oBAEK,KAAK,GAAG,OAAO,CAAC,2BAAmB,CAAC,IAAI,CAAC,CAAC;oBAEtB,qBAAM,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,EAAE,aAAa,CAAC,EAAA;;oBAAnF,iBAAiB,GAAG,SAA+D;yBACrF,CAAA,iBAAiB,IAAI,iBAAiB,KAAK,UAAU,CAAA,EAArD,wBAAqD;yBACpD,CAAC,KAAK,EAAN,wBAAM;oBACT,IAAA,SAAG,EAAC,SAAS,EAAE,mDAA4C,iBAAiB,kEAA+D,CAAC,CAAC;;wBAE7I,qBAAM,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,iBAAiB,CAAC,SAAS,EAAE,aAAa,CAAC,EAAA;;oBAAlE,SAAkE,CAAC;;;;;;CAIrE;AAtBD,0FAsBC"}
|
|
@@ -47,6 +47,7 @@ var parameters_1 = require("../parameters");
|
|
|
47
47
|
var commandDefinition_1 = require("../Command/commandDefinition");
|
|
48
48
|
var apiVersions_1 = require("@signageos/sdk/dist/RestApi/apiVersions");
|
|
49
49
|
var log_1 = require("@signageos/sdk/dist/Console/log");
|
|
50
|
+
var sosControlHelper_1 = require("@signageos/sdk/dist/SosHelper/sosControlHelper");
|
|
50
51
|
var debug = Debug('@signageos/cli:Auth:login');
|
|
51
52
|
var OPTION_LIST = [
|
|
52
53
|
{ name: 'username', type: String, description: "Username or e-mail used for ".concat(parameters_1.parameters.boxHost) },
|
|
@@ -98,7 +99,7 @@ exports.login = (0, commandDefinition_1.createCommandDefinition)({
|
|
|
98
99
|
})];
|
|
99
100
|
case 6:
|
|
100
101
|
_b.sent();
|
|
101
|
-
(0, log_1.log)('info', "User ".concat(chalk_1.default.green(identification), " has been logged in with token \"").concat(name, "\". Credentials are stored in ").concat(chalk_1.default.blue((0,
|
|
102
|
+
(0, log_1.log)('info', "User ".concat(chalk_1.default.green(identification), " has been logged in with token \"").concat(name, "\". Credentials are stored in ").concat(chalk_1.default.blue((0, sosControlHelper_1.getConfigFilePath)())));
|
|
102
103
|
return [2 /*return*/];
|
|
103
104
|
}
|
|
104
105
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loginCommand.js","sourceRoot":"","sources":["../../src/Auth/loginCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA0B;AAC1B,iCAAmC;AACnC,6BAA+B;AAC/B,uBAAyB;AACzB,oCAAqE;AACrE,
|
|
1
|
+
{"version":3,"file":"loginCommand.js","sourceRoot":"","sources":["../../src/Auth/loginCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA0B;AAC1B,iCAAmC;AACnC,6BAA+B;AAC/B,uBAAyB;AACzB,oCAAqE;AACrE,mE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AU,CAAC,CAAC;oBAClD,IAAI,cAAc,CAAC,MAAM,KAAK,GAAG,EAAE;wBAClC,sBAAO,UAAU,EAAC;qBAClB;yBAAM,IAAI,cAAc,CAAC,MAAM,KAAK,GAAG,EAAE;wBACzC,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;qBAClD;yBAAM;wBACN,MAAM,IAAI,KAAK,CAAC,iBAAiB,GAAG,CAAC,UAAU,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;qBACrH;;;;;CACD;AAED,SAAS,iBAAiB;IACzB,IAAM,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;IAC/B,IAAM,aAAa,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7C,IAAM,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;IAE/B,OAAO,UAAG,QAAQ,CAAC,QAAQ,cAAI,aAAa,CAAE,CAAC;AAChD,CAAC"}
|
|
@@ -8,17 +8,25 @@ declare const OPTION_LIST: readonly [{
|
|
|
8
8
|
readonly type: StringConstructor;
|
|
9
9
|
readonly description: "Organization UID";
|
|
10
10
|
}, {
|
|
11
|
-
readonly name: "
|
|
11
|
+
readonly name: "device-uid";
|
|
12
12
|
readonly type: StringConstructor;
|
|
13
|
-
readonly description: "
|
|
13
|
+
readonly description: "Device UID";
|
|
14
14
|
}, {
|
|
15
|
-
readonly name: "
|
|
15
|
+
readonly name: "applet-uid";
|
|
16
16
|
readonly type: StringConstructor;
|
|
17
|
-
readonly description: "
|
|
17
|
+
readonly description: "Applet UID";
|
|
18
18
|
}, {
|
|
19
|
-
readonly name: "
|
|
19
|
+
readonly name: "server-public-url";
|
|
20
20
|
readonly type: StringConstructor;
|
|
21
|
-
readonly description: "
|
|
21
|
+
readonly description: "Public url of local machine server. Is useful when the local machine is behind a reverse proxy.";
|
|
22
|
+
}, {
|
|
23
|
+
readonly name: "server-port";
|
|
24
|
+
readonly type: NumberConstructor;
|
|
25
|
+
readonly description: "The custom server port for local machine server. Default is detected from currently running applet server.";
|
|
26
|
+
}, {
|
|
27
|
+
readonly name: "force";
|
|
28
|
+
readonly type: BooleanConstructor;
|
|
29
|
+
readonly description: "Force start applet server even if it is already running on a different port. Kill the running server first.";
|
|
22
30
|
}];
|
|
23
31
|
export declare const connect: {
|
|
24
32
|
name: "connect";
|
|
@@ -32,17 +40,25 @@ export declare const connect: {
|
|
|
32
40
|
readonly type: StringConstructor;
|
|
33
41
|
readonly description: "Organization UID";
|
|
34
42
|
}, {
|
|
35
|
-
readonly name: "
|
|
43
|
+
readonly name: "device-uid";
|
|
36
44
|
readonly type: StringConstructor;
|
|
37
|
-
readonly description: "
|
|
45
|
+
readonly description: "Device UID";
|
|
38
46
|
}, {
|
|
39
|
-
readonly name: "
|
|
47
|
+
readonly name: "applet-uid";
|
|
40
48
|
readonly type: StringConstructor;
|
|
41
|
-
readonly description: "
|
|
49
|
+
readonly description: "Applet UID";
|
|
42
50
|
}, {
|
|
43
|
-
readonly name: "
|
|
51
|
+
readonly name: "server-public-url";
|
|
44
52
|
readonly type: StringConstructor;
|
|
45
|
-
readonly description: "
|
|
53
|
+
readonly description: "Public url of local machine server. Is useful when the local machine is behind a reverse proxy.";
|
|
54
|
+
}, {
|
|
55
|
+
readonly name: "server-port";
|
|
56
|
+
readonly type: NumberConstructor;
|
|
57
|
+
readonly description: "The custom server port for local machine server. Default is detected from currently running applet server.";
|
|
58
|
+
}, {
|
|
59
|
+
readonly name: "force";
|
|
60
|
+
readonly type: BooleanConstructor;
|
|
61
|
+
readonly description: "Force start applet server even if it is already running on a different port. Kill the running server first.";
|
|
46
62
|
}];
|
|
47
63
|
commands: never[];
|
|
48
64
|
run: (options: CommandLineOptions<typeof OPTION_LIST>) => Promise<void>;
|
|
@@ -39,17 +39,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.connect = void 0;
|
|
40
40
|
var deviceFacade_1 = require("../deviceFacade");
|
|
41
41
|
var organizationFacade_1 = require("../../Organization/organizationFacade");
|
|
42
|
-
var connectHelper_1 = require("./connectHelper");
|
|
43
|
-
var appletUploadCommandHelper_1 = require("../../Applet/Upload/appletUploadCommandHelper");
|
|
44
42
|
var appletFacade_1 = require("../../Applet/appletFacade");
|
|
45
43
|
var helper_1 = require("../../helper");
|
|
46
44
|
var commandDefinition_1 = require("../../Command/commandDefinition");
|
|
45
|
+
var sdk_1 = require("@signageos/sdk");
|
|
46
|
+
var wait_1 = require("../../Timer/wait");
|
|
47
|
+
var appletServerHelper_1 = require("../../Applet/appletServerHelper");
|
|
47
48
|
var OPTION_LIST = [
|
|
48
49
|
organizationFacade_1.NO_DEFAULT_ORGANIZATION_OPTION,
|
|
49
50
|
organizationFacade_1.ORGANIZATION_UID_OPTION,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
deviceFacade_1.DEVICE_UID_OPTION,
|
|
52
|
+
appletFacade_1.APPLET_UID_OPTION,
|
|
53
|
+
appletServerHelper_1.SERVER_PUBLIC_URL_OPTION,
|
|
54
|
+
appletServerHelper_1.SERVER_PORT_OPTION,
|
|
55
|
+
appletServerHelper_1.SERVER_FORCE_OPTION,
|
|
53
56
|
];
|
|
54
57
|
exports.connect = (0, commandDefinition_1.createCommandDefinition)({
|
|
55
58
|
name: 'connect',
|
|
@@ -58,47 +61,70 @@ exports.connect = (0, commandDefinition_1.createCommandDefinition)({
|
|
|
58
61
|
commands: [],
|
|
59
62
|
run: function (options) {
|
|
60
63
|
return __awaiter(this, void 0, void 0, function () {
|
|
61
|
-
var currentDirectory,
|
|
64
|
+
var currentDirectory, organizationUid, organization, restApi, dev, appletUid, appletVersion, deviceUid, appletPort, appletPublicUrl, server, connection, stopServer;
|
|
65
|
+
var _this = this;
|
|
62
66
|
return __generator(this, function (_a) {
|
|
63
67
|
switch (_a.label) {
|
|
64
68
|
case 0:
|
|
65
69
|
currentDirectory = process.cwd();
|
|
66
|
-
return [4 /*yield*/, (0, appletUploadCommandHelper_1.getAppletDirectoryAbsolutePath)(currentDirectory, options)];
|
|
67
|
-
case 1:
|
|
68
|
-
projectDirAbsolutePath = _a.sent();
|
|
69
|
-
return [4 /*yield*/, (0, appletFacade_1.getApplet)(projectDirAbsolutePath)];
|
|
70
|
-
case 2:
|
|
71
|
-
appletData = _a.sent();
|
|
72
70
|
return [4 /*yield*/, (0, organizationFacade_1.getOrganizationUidOrDefaultOrSelect)(options)];
|
|
73
|
-
case
|
|
71
|
+
case 1:
|
|
74
72
|
organizationUid = _a.sent();
|
|
75
73
|
return [4 /*yield*/, (0, organizationFacade_1.getOrganization)(organizationUid)];
|
|
76
|
-
case
|
|
74
|
+
case 2:
|
|
77
75
|
organization = _a.sent();
|
|
78
76
|
return [4 /*yield*/, (0, helper_1.createOrganizationRestApi)(organization)];
|
|
79
|
-
case
|
|
77
|
+
case 3:
|
|
80
78
|
restApi = _a.sent();
|
|
79
|
+
dev = (0, sdk_1.createDevelopment)({
|
|
80
|
+
organizationUid: organization.uid,
|
|
81
|
+
});
|
|
82
|
+
return [4 /*yield*/, (0, appletFacade_1.getAppletUid)(restApi, options)];
|
|
83
|
+
case 4:
|
|
84
|
+
appletUid = _a.sent();
|
|
85
|
+
return [4 /*yield*/, (0, appletFacade_1.getAppletVersion)(currentDirectory)];
|
|
86
|
+
case 5:
|
|
87
|
+
appletVersion = _a.sent();
|
|
81
88
|
return [4 /*yield*/, (0, deviceFacade_1.getDeviceUid)(restApi, options)];
|
|
82
89
|
case 6:
|
|
83
90
|
deviceUid = _a.sent();
|
|
84
|
-
|
|
91
|
+
appletPort = options[appletServerHelper_1.SERVER_PORT_OPTION.name];
|
|
92
|
+
appletPublicUrl = options[appletServerHelper_1.SERVER_PUBLIC_URL_OPTION.name];
|
|
93
|
+
return [4 /*yield*/, (0, appletServerHelper_1.killAppletServerIfRunningAndForceOption)(dev, options, appletUid, appletVersion, appletPort)];
|
|
85
94
|
case 7:
|
|
86
|
-
deviceData = _a.sent();
|
|
87
|
-
return [4 /*yield*/, (0, connectHelper_1.createConnectFile)(deviceData.uid)];
|
|
88
|
-
case 8:
|
|
89
95
|
_a.sent();
|
|
90
|
-
return [4 /*yield*/,
|
|
96
|
+
return [4 /*yield*/, dev.applet.serve.serve({
|
|
97
|
+
appletUid: appletUid,
|
|
98
|
+
appletVersion: appletVersion,
|
|
99
|
+
port: appletPort,
|
|
100
|
+
publicUrl: appletPublicUrl,
|
|
101
|
+
})];
|
|
102
|
+
case 8:
|
|
103
|
+
server = _a.sent();
|
|
104
|
+
return [4 /*yield*/, dev.deviceConnect.connect(deviceUid, {
|
|
105
|
+
appletUid: appletUid,
|
|
106
|
+
appletVersion: appletVersion,
|
|
107
|
+
appletPublicUrl: server.publicUrl,
|
|
108
|
+
})];
|
|
91
109
|
case 9:
|
|
92
|
-
|
|
93
|
-
|
|
110
|
+
connection = _a.sent();
|
|
111
|
+
stopServer = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
112
|
+
return __generator(this, function (_a) {
|
|
113
|
+
switch (_a.label) {
|
|
114
|
+
case 0: return [4 /*yield*/, connection.disconnect()];
|
|
115
|
+
case 1:
|
|
116
|
+
_a.sent();
|
|
117
|
+
process.exit();
|
|
118
|
+
return [2 /*return*/];
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}); };
|
|
122
|
+
process.on('SIGINT', stopServer);
|
|
123
|
+
process.on('SIGTERM', stopServer);
|
|
124
|
+
console.info('Press Ctrl+C to disconnect');
|
|
125
|
+
return [4 /*yield*/, (0, wait_1.default)(1e9)];
|
|
94
126
|
case 10:
|
|
95
|
-
_a.sent();
|
|
96
|
-
process.on('SIGINT', function () {
|
|
97
|
-
(0, connectHelper_1.stopApplication)(organization, deviceData.uid);
|
|
98
|
-
});
|
|
99
|
-
process.on('SIGTERM', function () {
|
|
100
|
-
(0, connectHelper_1.stopApplication)(organization, deviceData.uid);
|
|
101
|
-
});
|
|
127
|
+
_a.sent(); // Wait forever
|
|
102
128
|
return [2 /*return*/];
|
|
103
129
|
}
|
|
104
130
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connectCommand.js","sourceRoot":"","sources":["../../../src/Device/Connect/connectCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"connectCommand.js","sourceRoot":"","sources":["../../../src/Device/Connect/connectCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAkE;AAClE,4EAAsK;AACtK,0DAA8F;AAC9F,uCAAyD;AACzD,qEAA8F;AAC9F,sCAAmD;AACnD,yCAAoC;AACpC,sEAA6J;AAE7J,IAAM,WAAW,GAAG;IACnB,mDAA8B;IAC9B,4CAAuB;IACvB,gCAAiB;IACjB,gCAAiB;IACjB,6CAAwB;IACxB,uCAAkB;IAClB,wCAAmB;CACV,CAAC;AAEE,QAAA,OAAO,GAAG,IAAA,2CAAuB,EAAC;IAC9C,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,mBAAmB;IAChC,UAAU,EAAE,WAAW;IACvB,QAAQ,EAAE,EAAE;IACZ,GAAG,EAAE,UAAgB,OAA+C;;;;;;;wBAC7D,gBAAgB,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;wBACf,qBAAM,IAAA,wDAAmC,EAAC,OAAO,CAAC,EAAA;;wBAApE,eAAe,GAAG,SAAkD;wBACrD,qBAAM,IAAA,oCAAe,EAAC,eAAe,CAAC,EAAA;;wBAArD,YAAY,GAAG,SAAsC;wBAC3C,qBAAM,IAAA,kCAAyB,EAAC,YAAY,CAAC,EAAA;;wBAAvD,OAAO,GAAG,SAA6C;wBACvD,GAAG,GAAG,IAAA,uBAAiB,EAAC;4BAC7B,eAAe,EAAE,YAAY,CAAC,GAA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B,CAAC,CAAC;wBAC3C,qBAAM,IAAA,cAAI,EAAC,GAAG,CAAC,EAAA;;wBAAf,SAAe,CAAC,CAAC,eAAe;;;;;KAChC;CACD,CAAC,CAAC"}
|
|
@@ -90,17 +90,25 @@ export declare const device: {
|
|
|
90
90
|
readonly type: StringConstructor;
|
|
91
91
|
readonly description: "Organization UID";
|
|
92
92
|
}, {
|
|
93
|
-
readonly name: "
|
|
93
|
+
readonly name: "device-uid";
|
|
94
94
|
readonly type: StringConstructor;
|
|
95
|
-
readonly description: "
|
|
95
|
+
readonly description: "Device UID";
|
|
96
96
|
}, {
|
|
97
|
-
readonly name: "
|
|
97
|
+
readonly name: "applet-uid";
|
|
98
98
|
readonly type: StringConstructor;
|
|
99
|
-
readonly description: "
|
|
99
|
+
readonly description: "Applet UID";
|
|
100
100
|
}, {
|
|
101
|
-
readonly name: "
|
|
101
|
+
readonly name: "server-public-url";
|
|
102
102
|
readonly type: StringConstructor;
|
|
103
|
-
readonly description: "
|
|
103
|
+
readonly description: "Public url of local machine server. Is useful when the local machine is behind a reverse proxy.";
|
|
104
|
+
}, {
|
|
105
|
+
readonly name: "server-port";
|
|
106
|
+
readonly type: NumberConstructor;
|
|
107
|
+
readonly description: "The custom server port for local machine server. Default is detected from currently running applet server.";
|
|
108
|
+
}, {
|
|
109
|
+
readonly name: "force";
|
|
110
|
+
readonly type: BooleanConstructor;
|
|
111
|
+
readonly description: "Force start applet server even if it is already running on a different port. Kill the running server first.";
|
|
104
112
|
}];
|
|
105
113
|
commands: never[];
|
|
106
114
|
run: (options: import("../Command/commandDefinition").CommandLineOptions<readonly [{
|
|
@@ -112,17 +120,25 @@ export declare const device: {
|
|
|
112
120
|
readonly type: StringConstructor;
|
|
113
121
|
readonly description: "Organization UID";
|
|
114
122
|
}, {
|
|
115
|
-
readonly name: "
|
|
123
|
+
readonly name: "device-uid";
|
|
116
124
|
readonly type: StringConstructor;
|
|
117
|
-
readonly description: "
|
|
125
|
+
readonly description: "Device UID";
|
|
118
126
|
}, {
|
|
119
|
-
readonly name: "
|
|
127
|
+
readonly name: "applet-uid";
|
|
120
128
|
readonly type: StringConstructor;
|
|
121
|
-
readonly description: "
|
|
129
|
+
readonly description: "Applet UID";
|
|
122
130
|
}, {
|
|
123
|
-
readonly name: "
|
|
131
|
+
readonly name: "server-public-url";
|
|
124
132
|
readonly type: StringConstructor;
|
|
125
|
-
readonly description: "
|
|
133
|
+
readonly description: "Public url of local machine server. Is useful when the local machine is behind a reverse proxy.";
|
|
134
|
+
}, {
|
|
135
|
+
readonly name: "server-port";
|
|
136
|
+
readonly type: NumberConstructor;
|
|
137
|
+
readonly description: "The custom server port for local machine server. Default is detected from currently running applet server.";
|
|
138
|
+
}, {
|
|
139
|
+
readonly name: "force";
|
|
140
|
+
readonly type: BooleanConstructor;
|
|
141
|
+
readonly description: "Force start applet server even if it is already running on a different port. Kill the running server first.";
|
|
126
142
|
}]>) => Promise<void>;
|
|
127
143
|
})[];
|
|
128
144
|
run(): Promise<never>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { IOrganization } from '../Organization/organizationFacade';
|
|
2
2
|
import { DevicePowerAction } from '@signageos/sdk/dist/RestApi/Device/PowerAction/IPowerAction';
|
|
3
3
|
import RestApi from "@signageos/sdk/dist/RestApi/RestApi";
|
|
4
|
-
import { IApplet } from "../Applet/appletFacade";
|
|
5
4
|
import { CommandLineOptions } from '../Command/commandDefinition';
|
|
6
5
|
export interface ActionData {
|
|
7
6
|
name: string;
|
|
@@ -20,5 +19,4 @@ export declare const POWER_ACTION_TYPE_OPTION: {
|
|
|
20
19
|
};
|
|
21
20
|
export declare function getDeviceUid(restApi: RestApi, options: CommandLineOptions<[typeof DEVICE_UID_OPTION]>): Promise<string>;
|
|
22
21
|
export declare function getActionType(options: CommandLineOptions<[typeof POWER_ACTION_TYPE_OPTION]>): Promise<string>;
|
|
23
|
-
export declare function connectDevice(organization: IOrganization, deviceUid: String, applet: Partial<IApplet>, serverPort: string): Promise<any>;
|
|
24
22
|
export declare function disconnectDevice(organization: IOrganization, deviceUid: String): Promise<any>;
|
|
@@ -36,12 +36,11 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.disconnectDevice = exports.
|
|
39
|
+
exports.disconnectDevice = exports.getActionType = exports.getDeviceUid = exports.POWER_ACTION_TYPE_OPTION = exports.DEVICE_UID_OPTION = exports.typeMap = void 0;
|
|
40
40
|
var Debug = require("debug");
|
|
41
41
|
var prompts = require("prompts");
|
|
42
42
|
var helper_1 = require("../helper");
|
|
43
43
|
var IPowerAction_1 = require("@signageos/sdk/dist/RestApi/Device/PowerAction/IPowerAction");
|
|
44
|
-
var localMachineHelper_1 = require("../Helper/localMachineHelper");
|
|
45
44
|
var apiVersions_1 = require("@signageos/sdk/dist/RestApi/apiVersions");
|
|
46
45
|
var runControlHelper_1 = require("../RunControl/runControlHelper");
|
|
47
46
|
var debug = Debug('@signageos/cli:Device:facade');
|
|
@@ -129,44 +128,6 @@ function getActionType(options) {
|
|
|
129
128
|
});
|
|
130
129
|
}
|
|
131
130
|
exports.getActionType = getActionType;
|
|
132
|
-
function connectDevice(organization, deviceUid, applet, serverPort) {
|
|
133
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
134
|
-
var config, DEVICE_RESOURCE, options, computerIp, protocol, body, responseOfPost, _a, _b;
|
|
135
|
-
return __generator(this, function (_c) {
|
|
136
|
-
switch (_c.label) {
|
|
137
|
-
case 0: return [4 /*yield*/, (0, runControlHelper_1.loadConfig)()];
|
|
138
|
-
case 1:
|
|
139
|
-
config = _c.sent();
|
|
140
|
-
DEVICE_RESOURCE = "/device/".concat(deviceUid, "/connect");
|
|
141
|
-
options = {
|
|
142
|
-
url: (0, helper_1.getApiUrl)(config),
|
|
143
|
-
auth: {
|
|
144
|
-
clientId: organization.oauthClientId,
|
|
145
|
-
secret: organization.oauthClientSecret,
|
|
146
|
-
},
|
|
147
|
-
version: apiVersions_1.ApiVersions.V1,
|
|
148
|
-
};
|
|
149
|
-
return [4 /*yield*/, (0, localMachineHelper_1.getMachineIp)()];
|
|
150
|
-
case 2:
|
|
151
|
-
computerIp = _c.sent();
|
|
152
|
-
protocol = "http://";
|
|
153
|
-
body = {
|
|
154
|
-
deviceUid: deviceUid,
|
|
155
|
-
appletUid: applet.uid,
|
|
156
|
-
remoteIp: protocol.concat(computerIp + ":".concat(serverPort)),
|
|
157
|
-
appletVersion: applet.version,
|
|
158
|
-
};
|
|
159
|
-
return [4 /*yield*/, (0, helper_1.postResource)(options, DEVICE_RESOURCE, null, body)];
|
|
160
|
-
case 3:
|
|
161
|
-
responseOfPost = _c.sent();
|
|
162
|
-
_b = (_a = JSON).parse;
|
|
163
|
-
return [4 /*yield*/, responseOfPost.text()];
|
|
164
|
-
case 4: return [2 /*return*/, _b.apply(_a, [_c.sent(), helper_1.deserializeJSON])];
|
|
165
|
-
}
|
|
166
|
-
});
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
exports.connectDevice = connectDevice;
|
|
170
131
|
function disconnectDevice(organization, deviceUid) {
|
|
171
132
|
return __awaiter(this, void 0, void 0, function () {
|
|
172
133
|
var config, DEVICE_RESOURCE, options, responseOfPost, _a, _b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deviceFacade.js","sourceRoot":"","sources":["../../src/Device/deviceFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6BAA+B;AAC/B,iCAAmC;AACnC,oCAAqE;AAErE,4FAAgG;AAIhG,
|
|
1
|
+
{"version":3,"file":"deviceFacade.js","sourceRoot":"","sources":["../../src/Device/deviceFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6BAA+B;AAC/B,iCAAmC;AACnC,oCAAqE;AAErE,4FAAgG;AAIhG,u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js","sourceRoot":"","sources":["../../src/Emulator/emulatorFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA0B;AAC1B,iCAAmC;AACnC,
|
|
1
|
+
{"version":3,"file":"emulatorFacade.js","sourceRoot":"","sources":["../../src/Emulator/emulatorFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA0B;AAC1B,iCAAmC;AACnC,mEAA0E;AAC1E,+DAA0D;AAC1D,6FAAwF;AACxF,uEAAsE;AACtE,oCAA4D;AAC5D,uDAAsD;AAUtD,IAAM,aAAa,GAAG,UAAC,MAAe;;IACrC,IAAM,OAAO,GAAG;QACf,GAAG,EAAE,IAAA,kBAAS,EAAC,MAAM,CAAC;QACtB,IAAI,EAAE;YACL,QAAQ,EAAE,MAAA,MAAM,CAAC,cAAc,mCAAI,EAAE;YACrC,MAAM,EAAE,MAAA,MAAM,CAAC,gBAAgB,mCAAI,EAAE;SACrC;QACD,OAAO,EAAE,yBAAW,CAAC,EAAE;QACvB,cAAc,EAAE,IAAA,6BAAoB,GAAE;KACtC,CAAC;IACF,OAAO,IAAI,iBAAO,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AACtC,CAAC,CAAC;AAEF,SAAe,kBAAkB,CAAC,OAAgB,EAAE,eAAuB;;;;;;;oBAElE,qBAAM,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,eAAe,iBAAA,EAAE,CAAC,EAAA;wBAAvD,sBAAO,SAAgD,EAAC;;;oBAExD,IAAI,GAAC,YAAY,6BAAmB,EAAE;wBACrC,MAAM,IAAI,KAAK,CAAC,mDAA4C,eAAK,CAAC,KAAK,CAAC,WAAW,CAAC,CAAE,CAAC,CAAC;qBACxF;yBAAM;wBACN,MAAM,IAAI,KAAK,CAAC,iBAAiB,GAAG,GAAC,CAAC,OAAO,CAAC,CAAC;qBAC/C;;;;;;CAEF;AAED,S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AnC,SAAmC,CAAC;oBACpC,sBAAO,WAAW,EAAC;;;;CACnB;AA9CD,kFA8CC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { IEmulator } from './IEmulator';
|
|
2
|
+
import { Development } from '@signageos/sdk/dist/Development/Development';
|
|
2
3
|
export interface ICreateEmulatorParams {
|
|
3
|
-
|
|
4
|
+
appletUid: string | undefined;
|
|
5
|
+
appletVersion: string | undefined;
|
|
4
6
|
appletPath: string;
|
|
5
7
|
entryFileRelativePath: string;
|
|
6
8
|
emulatorServerPort: number;
|
|
7
9
|
emulatorUid: string;
|
|
8
10
|
}
|
|
9
|
-
export declare function createEmulator(params: ICreateEmulatorParams, organizationUid: string): Promise<IEmulator>;
|
|
11
|
+
export declare function createEmulator(params: ICreateEmulatorParams, organizationUid: string, dev: Development): Promise<IEmulator>;
|