localUtils.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. "use strict";
  2. var __defProp = Object.defineProperty;
  3. var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  4. var __getOwnPropNames = Object.getOwnPropertyNames;
  5. var __hasOwnProp = Object.prototype.hasOwnProperty;
  6. var __export = (target, all) => {
  7. for (var name in all)
  8. __defProp(target, name, { get: all[name], enumerable: true });
  9. };
  10. var __copyProps = (to, from, except, desc) => {
  11. if (from && typeof from === "object" || typeof from === "function") {
  12. for (let key of __getOwnPropNames(from))
  13. if (!__hasOwnProp.call(to, key) && key !== except)
  14. __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  15. }
  16. return to;
  17. };
  18. var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
  19. var localUtils_exports = {};
  20. __export(localUtils_exports, {
  21. LocalUtils: () => LocalUtils
  22. });
  23. module.exports = __toCommonJS(localUtils_exports);
  24. var import_channelOwner = require("./channelOwner");
  25. class LocalUtils extends import_channelOwner.ChannelOwner {
  26. constructor(parent, type, guid, initializer) {
  27. super(parent, type, guid, initializer);
  28. this.devices = {};
  29. for (const { name, descriptor } of initializer.deviceDescriptors)
  30. this.devices[name] = descriptor;
  31. }
  32. async zip(params) {
  33. return await this._channel.zip(params);
  34. }
  35. async harOpen(params) {
  36. return await this._channel.harOpen(params);
  37. }
  38. async harLookup(params) {
  39. return await this._channel.harLookup(params);
  40. }
  41. async harClose(params) {
  42. return await this._channel.harClose(params);
  43. }
  44. async harUnzip(params) {
  45. return await this._channel.harUnzip(params);
  46. }
  47. async tracingStarted(params) {
  48. return await this._channel.tracingStarted(params);
  49. }
  50. async traceDiscarded(params) {
  51. return await this._channel.traceDiscarded(params);
  52. }
  53. async addStackToTracingNoReply(params) {
  54. return await this._channel.addStackToTracingNoReply(params);
  55. }
  56. }
  57. // Annotate the CommonJS export names for ESM import in node:
  58. 0 && (module.exports = {
  59. LocalUtils
  60. });