Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

newSession.js 920B

12345678910111213141516171819202122232425
  1. "use strict";
  2. var __importDefault = (this && this.__importDefault) || function (mod) {
  3. return (mod && mod.__esModule) ? mod : { "default": mod };
  4. };
  5. Object.defineProperty(exports, "__esModule", { value: true });
  6. const os_1 = __importDefault(require("os"));
  7. const uuid_1 = require("uuid");
  8. const launcher_1 = __importDefault(require("../launcher"));
  9. const index_1 = require("../index");
  10. async function newSession({ capabilities }) {
  11. const browser = await launcher_1.default(capabilities);
  12. const sessionId = uuid_1.v4();
  13. const [browserName, browserVersion] = (await browser.version()).split('/');
  14. index_1.sessionMap.set(sessionId, browser);
  15. return {
  16. sessionId,
  17. capabilities: {
  18. browserName,
  19. browserVersion,
  20. platformName: os_1.default.platform(),
  21. platformVersion: os_1.default.release()
  22. }
  23. };
  24. }
  25. exports.default = newSession;