@zaber/motion 2.13.0 → 2.14.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.
Files changed (126) hide show
  1. package/dist/binding/wasm/zaber-motion-lib.wasm +0 -0
  2. package/dist/lib/ascii/all_axes.d.ts +5 -0
  3. package/dist/lib/ascii/all_axes.js +25 -9
  4. package/dist/lib/ascii/all_axes.js.map +1 -1
  5. package/dist/lib/ascii/axis.d.ts +5 -0
  6. package/dist/lib/ascii/axis.js +39 -23
  7. package/dist/lib/ascii/axis.js.map +1 -1
  8. package/dist/lib/ascii/axis_settings.d.ts +26 -0
  9. package/dist/lib/ascii/axis_settings.js +67 -5
  10. package/dist/lib/ascii/axis_settings.js.map +1 -1
  11. package/dist/lib/ascii/connection.js +17 -13
  12. package/dist/lib/ascii/connection.js.map +1 -1
  13. package/dist/lib/ascii/conversion_factor.d.ts +21 -0
  14. package/dist/lib/ascii/conversion_factor.js +46 -0
  15. package/dist/lib/ascii/conversion_factor.js.map +1 -0
  16. package/dist/lib/ascii/device.js +21 -17
  17. package/dist/lib/ascii/device.js.map +1 -1
  18. package/dist/lib/ascii/device_io.js +10 -6
  19. package/dist/lib/ascii/device_io.js.map +1 -1
  20. package/dist/lib/ascii/device_settings.d.ts +19 -0
  21. package/dist/lib/ascii/device_settings.js +50 -5
  22. package/dist/lib/ascii/device_settings.js.map +1 -1
  23. package/dist/lib/ascii/index.d.ts +2 -1
  24. package/dist/lib/ascii/index.js +5 -3
  25. package/dist/lib/ascii/index.js.map +1 -1
  26. package/dist/lib/ascii/lockstep.js +18 -14
  27. package/dist/lib/ascii/lockstep.js.map +1 -1
  28. package/dist/lib/ascii/oscilloscope.js +10 -6
  29. package/dist/lib/ascii/oscilloscope.js.map +1 -1
  30. package/dist/lib/ascii/oscilloscope_data.d.ts +1 -7
  31. package/dist/lib/ascii/oscilloscope_data.js +14 -27
  32. package/dist/lib/ascii/oscilloscope_data.js.map +1 -1
  33. package/dist/lib/ascii/servo_tuner.d.ts +2 -2
  34. package/dist/lib/ascii/servo_tuner.js +14 -10
  35. package/dist/lib/ascii/servo_tuner.js.map +1 -1
  36. package/dist/lib/ascii/servo_tuning_param.js +5 -1
  37. package/dist/lib/ascii/servo_tuning_param.js.map +1 -1
  38. package/dist/lib/ascii/setting_constants.d.ts +4 -0
  39. package/dist/lib/ascii/setting_constants.js +4 -0
  40. package/dist/lib/ascii/setting_constants.js.map +1 -1
  41. package/dist/lib/ascii/{simple_tuning_param.d.ts → simple_tuning_param_definition.d.ts} +3 -3
  42. package/dist/lib/ascii/simple_tuning_param_definition.js +20 -0
  43. package/dist/lib/ascii/simple_tuning_param_definition.js.map +1 -0
  44. package/dist/lib/ascii/storage.d.ts +10 -0
  45. package/dist/lib/ascii/storage.js +38 -11
  46. package/dist/lib/ascii/storage.js.map +1 -1
  47. package/dist/lib/ascii/stream.js +25 -21
  48. package/dist/lib/ascii/stream.js.map +1 -1
  49. package/dist/lib/ascii/stream_axis_definition.js +5 -1
  50. package/dist/lib/ascii/stream_axis_definition.js.map +1 -1
  51. package/dist/lib/ascii/stream_buffer.js +5 -1
  52. package/dist/lib/ascii/stream_buffer.js.map +1 -1
  53. package/dist/lib/ascii/transport.js +7 -3
  54. package/dist/lib/ascii/transport.js.map +1 -1
  55. package/dist/lib/ascii/warnings.js +5 -1
  56. package/dist/lib/ascii/warnings.js.map +1 -1
  57. package/dist/lib/ascii_ns.d.ts +4 -2
  58. package/dist/lib/ascii_ns.js +7 -2
  59. package/dist/lib/ascii_ns.js.map +1 -1
  60. package/dist/lib/binary/binary_settings.d.ts +2 -1
  61. package/dist/lib/binary/binary_settings.js +2 -1
  62. package/dist/lib/binary/binary_settings.js.map +1 -1
  63. package/dist/lib/binary/command_code.d.ts +2 -1
  64. package/dist/lib/binary/command_code.js +1 -0
  65. package/dist/lib/binary/command_code.js.map +1 -1
  66. package/dist/lib/binary/connection.js +13 -9
  67. package/dist/lib/binary/connection.js.map +1 -1
  68. package/dist/lib/binary/device.js +37 -33
  69. package/dist/lib/binary/device.js.map +1 -1
  70. package/dist/lib/binary/device_settings.js +6 -2
  71. package/dist/lib/binary/device_settings.js.map +1 -1
  72. package/dist/lib/binary/reply_code.d.ts +1 -0
  73. package/dist/lib/binary/reply_code.js +1 -0
  74. package/dist/lib/binary/reply_code.js.map +1 -1
  75. package/dist/lib/binary_ns.js +5 -1
  76. package/dist/lib/binary_ns.js.map +1 -1
  77. package/dist/lib/can_set_state_axis_response.d.ts +1 -1
  78. package/dist/lib/can_set_state_axis_response.js.map +1 -1
  79. package/dist/lib/can_set_state_device_response.d.ts +2 -2
  80. package/dist/lib/can_set_state_device_response.js +1 -1
  81. package/dist/lib/can_set_state_device_response.js.map +1 -1
  82. package/dist/lib/exceptions/device_db_failed_exception.d.ts +8 -1
  83. package/dist/lib/exceptions/device_db_failed_exception.js +16 -1
  84. package/dist/lib/exceptions/device_db_failed_exception.js.map +1 -1
  85. package/dist/lib/exceptions/device_db_failed_exception_data.d.ts +12 -0
  86. package/dist/lib/exceptions/device_db_failed_exception_data.js +17 -0
  87. package/dist/lib/exceptions/device_db_failed_exception_data.js.map +1 -0
  88. package/dist/lib/exceptions/index.d.ts +1 -0
  89. package/dist/lib/exceptions/index.js +4 -2
  90. package/dist/lib/exceptions/index.js.map +1 -1
  91. package/dist/lib/gateway/convert_exceptions.js +5 -1
  92. package/dist/lib/gateway/convert_exceptions.js.map +1 -1
  93. package/dist/lib/gateway/index.js +5 -1
  94. package/dist/lib/gateway/index.js.map +1 -1
  95. package/dist/lib/gateway/wasm-exec.js +58 -53
  96. package/dist/lib/gateway/wasm-exec.js.map +1 -1
  97. package/dist/lib/gcode/axis_definition.js +5 -1
  98. package/dist/lib/gcode/axis_definition.js.map +1 -1
  99. package/dist/lib/gcode/axis_mapping.js +5 -1
  100. package/dist/lib/gcode/axis_mapping.js.map +1 -1
  101. package/dist/lib/gcode/axis_transformation.js +5 -1
  102. package/dist/lib/gcode/axis_transformation.js.map +1 -1
  103. package/dist/lib/gcode/device_definition.js +5 -1
  104. package/dist/lib/gcode/device_definition.js.map +1 -1
  105. package/dist/lib/gcode/offline_translator.js +8 -4
  106. package/dist/lib/gcode/offline_translator.js.map +1 -1
  107. package/dist/lib/gcode/translator.js +8 -4
  108. package/dist/lib/gcode/translator.js.map +1 -1
  109. package/dist/lib/gcode/translator_config.js +5 -1
  110. package/dist/lib/gcode/translator_config.js.map +1 -1
  111. package/dist/lib/gcode_ns.js +5 -1
  112. package/dist/lib/gcode_ns.js.map +1 -1
  113. package/dist/lib/index.js +5 -1
  114. package/dist/lib/index.js.map +1 -1
  115. package/dist/lib/library.js +5 -1
  116. package/dist/lib/library.js.map +1 -1
  117. package/dist/lib/measurement.js +5 -1
  118. package/dist/lib/measurement.js.map +1 -1
  119. package/dist/lib/protobufs/main_pb.d.ts +352 -1940
  120. package/dist/lib/protobufs/main_pb.js +11166 -23229
  121. package/dist/lib/protobufs/main_pb.js.map +1 -1
  122. package/dist/lib/tools.js +6 -2
  123. package/dist/lib/tools.js.map +1 -1
  124. package/package.json +2 -2
  125. package/dist/lib/ascii/simple_tuning_param.js +0 -20
  126. package/dist/lib/ascii/simple_tuning_param.js.map +0 -1
@@ -1,7 +1,14 @@
1
+ /// <reference types="node" />
1
2
  import { MotionLibException } from './motion_lib_exception';
3
+ import { DeviceDbFailedExceptionData } from './device_db_failed_exception_data';
2
4
  /**
3
5
  * Thrown when device information cannot be retrieved from the device database.
4
6
  */
5
7
  export declare class DeviceDbFailedException extends MotionLibException {
6
- constructor(message: string);
8
+ /**
9
+ * Additional data for DeviceDbFailedException
10
+ */
11
+ get details(): DeviceDbFailedExceptionData;
12
+ private _details;
13
+ constructor(message: string, customData: Buffer | DeviceDbFailedExceptionData);
7
14
  }
@@ -4,13 +4,28 @@
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.DeviceDbFailedException = void 0;
6
6
  const motion_lib_exception_1 = require("./motion_lib_exception");
7
+ const main_pb_1 = require("../protobufs/main_pb");
8
+ const device_db_failed_exception_data_1 = require("./device_db_failed_exception_data");
7
9
  /**
8
10
  * Thrown when device information cannot be retrieved from the device database.
9
11
  */
10
12
  class DeviceDbFailedException extends motion_lib_exception_1.MotionLibException {
11
- constructor(message) {
13
+ constructor(message, customData) {
12
14
  super(message);
13
15
  Object.setPrototypeOf(this, DeviceDbFailedException.prototype);
16
+ if (Buffer.isBuffer(customData)) {
17
+ const protobufObj = main_pb_1.DeviceDbFailedExceptionData.deserializeBinary(customData);
18
+ this._details = device_db_failed_exception_data_1.DeviceDbFailedExceptionData.fromProtobuf(protobufObj.toObject());
19
+ }
20
+ else {
21
+ this._details = customData;
22
+ }
23
+ }
24
+ /**
25
+ * Additional data for DeviceDbFailedException
26
+ */
27
+ get details() {
28
+ return this._details;
14
29
  }
15
30
  }
16
31
  exports.DeviceDbFailedException = DeviceDbFailedException;
@@ -1 +1 @@
1
- {"version":3,"file":"device_db_failed_exception.js","sourceRoot":"","sources":["../../../src/exceptions/device_db_failed_exception.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;AAEtD,iEAA4D;AAE5D;;GAEG;AACH,MAAa,uBAAwB,SAAQ,yCAAkB;IAE7D,YACE,OAAe;QAEf,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC;IACjE,CAAC;CACF;AARD,0DAQC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { MotionLibException } from './motion_lib_exception';\n\n/**\n * Thrown when device information cannot be retrieved from the device database.\n */\nexport class DeviceDbFailedException extends MotionLibException {\n\n constructor(\n message: string\n ) {\n super(message);\n Object.setPrototypeOf(this, DeviceDbFailedException.prototype);\n }\n}\n"]}
1
+ {"version":3,"file":"device_db_failed_exception.js","sourceRoot":"","sources":["../../../src/exceptions/device_db_failed_exception.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;AAEtD,iEAA4D;AAC5D,kDAAyF;AACzF,uFAAgF;AAEhF;;GAEG;AACH,MAAa,uBAAwB,SAAQ,yCAAkB;IAS7D,YACE,OAAe,EACf,UAAgD;QAEhD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC;QAE/D,IAAI,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE;YAC/B,MAAM,WAAW,GAAG,qCAAkB,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;YACrE,IAAI,CAAC,QAAQ,GAAG,6DAA2B,CAAC,YAAY,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,CAAC;SAClF;aAAM;YACL,IAAI,CAAC,QAAQ,GAAG,UAAU,CAAC;SAC5B;IACH,CAAC;IArBD;;OAEG;IACH,IAAW,OAAO;QAChB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;CAiBF;AAvBD,0DAuBC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { MotionLibException } from './motion_lib_exception';\nimport { DeviceDbFailedExceptionData as CustomDataProtobuf } from '../protobufs/main_pb';\nimport { DeviceDbFailedExceptionData } from './device_db_failed_exception_data';\n\n/**\n * Thrown when device information cannot be retrieved from the device database.\n */\nexport class DeviceDbFailedException extends MotionLibException {\n /**\n * Additional data for DeviceDbFailedException\n */\n public get details(): DeviceDbFailedExceptionData {\n return this._details;\n }\n private _details: DeviceDbFailedExceptionData;\n\n constructor(\n message: string,\n customData: Buffer | DeviceDbFailedExceptionData\n ) {\n super(message);\n Object.setPrototypeOf(this, DeviceDbFailedException.prototype);\n\n if (Buffer.isBuffer(customData)) {\n const protobufObj = CustomDataProtobuf.deserializeBinary(customData);\n this._details = DeviceDbFailedExceptionData.fromProtobuf(protobufObj.toObject());\n } else {\n this._details = customData;\n }\n }\n}\n"]}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Contains additional data for a DeviceDbFailedException.
3
+ */
4
+ export interface DeviceDbFailedExceptionData {
5
+ /**
6
+ * Code describing type of the error.
7
+ */
8
+ code: string;
9
+ }
10
+ export declare namespace DeviceDbFailedExceptionData {
11
+ const __type = "DeviceDbFailedExceptionData";
12
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ // ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //
3
+ // ============= DO NOT EDIT DIRECTLY ============= //
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.DeviceDbFailedExceptionData = void 0;
6
+ var DeviceDbFailedExceptionData;
7
+ (function (DeviceDbFailedExceptionData) {
8
+ DeviceDbFailedExceptionData.__type = 'DeviceDbFailedExceptionData';
9
+ /** @internal */
10
+ function fromProtobuf(pbData) {
11
+ return {
12
+ code: pbData.code,
13
+ };
14
+ }
15
+ DeviceDbFailedExceptionData.fromProtobuf = fromProtobuf;
16
+ })(DeviceDbFailedExceptionData = exports.DeviceDbFailedExceptionData || (exports.DeviceDbFailedExceptionData = {}));
17
+ //# sourceMappingURL=device_db_failed_exception_data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device_db_failed_exception_data.js","sourceRoot":"","sources":["../../../src/exceptions/device_db_failed_exception_data.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;AAetD,IAAiB,2BAA2B,CAS3C;AATD,WAAiB,2BAA2B;IAC7B,kCAAM,GAAG,6BAA6B,CAAC;IAEpD,gBAAgB;IAChB,SAAgB,YAAY,CAAC,MAAoD;QAC/E,OAAO;YACL,IAAI,EAAE,MAAM,CAAC,IAAI;SAClB,CAAC;IACJ,CAAC;IAJe,wCAAY,eAI3B,CAAA;AACH,CAAC,EATgB,2BAA2B,GAA3B,mCAA2B,KAA3B,mCAA2B,QAS3C","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport * as gateway from '../gateway';\n\n/**\n * Contains additional data for a DeviceDbFailedException.\n */\nexport interface DeviceDbFailedExceptionData {\n /**\n * Code describing type of the error.\n */\n code: string;\n\n}\n\nexport namespace DeviceDbFailedExceptionData {\n export const __type = 'DeviceDbFailedExceptionData';\n\n /** @internal */\n export function fromProtobuf(pbData: gateway.DeviceDbFailedExceptionData.AsObject): DeviceDbFailedExceptionData {\n return {\n code: pbData.code,\n };\n }\n}\n"]}
@@ -47,6 +47,7 @@ export { BinaryCommandFailedExceptionData } from './binary_command_failed_except
47
47
  export { CommandFailedExceptionData } from './command_failed_exception_data';
48
48
  export { CommandTooLongExceptionData } from './command_too_long_exception_data';
49
49
  export { DeviceAddressConflictExceptionData } from './device_address_conflict_exception_data';
50
+ export { DeviceDbFailedExceptionData } from './device_db_failed_exception_data';
50
51
  export { GCodeExecutionExceptionData } from './g_code_execution_exception_data';
51
52
  export { GCodeSyntaxExceptionData } from './g_code_syntax_exception_data';
52
53
  export { InvalidPacketExceptionData } from './invalid_packet_exception_data';
@@ -2,8 +2,8 @@
2
2
  // ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //
3
3
  // ============= DO NOT EDIT DIRECTLY ============= //
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.GCodeExecutionExceptionData = exports.DeviceAddressConflictExceptionData = exports.CommandTooLongExceptionData = exports.CommandFailedExceptionData = exports.BinaryCommandFailedExceptionData = exports.MotionLibException = exports.UnknownRequestException = exports.TransportAlreadyUsedException = exports.StreamSetupFailedException = exports.StreamMovementInterruptedException = exports.StreamMovementFailedException = exports.StreamModeException = exports.StreamExecutionException = exports.SettingNotFoundException = exports.SetPeripheralStateFailedException = exports.SetDeviceStateFailedException = exports.SerialPortBusyException = exports.RequestTimeoutException = exports.OutOfRequestIdsException = exports.OsFailedException = exports.NotSupportedException = exports.NoValueForKeyException = exports.NoDeviceFoundException = exports.MovementInterruptedException = exports.MovementFailedException = exports.LockstepNotEnabledException = exports.LockstepEnabledException = exports.IoFailedException = exports.IoChannelOutOfRangeException = exports.InvalidResponseException = exports.InvalidParkStateException = exports.InvalidPacketException = exports.InvalidOperationException = exports.InvalidDataException = exports.InvalidArgumentException = exports.InternalErrorException = exports.GCodeSyntaxException = exports.GCodeExecutionException = exports.DeviceNotIdentifiedException = exports.DeviceFailedException = exports.DeviceDbFailedException = exports.DeviceBusyException = exports.DeviceAddressConflictException = exports.ConversionFailedException = exports.ConnectionFailedException = exports.ConnectionClosedException = exports.CommandTooLongException = exports.CommandPreemptedException = exports.CommandFailedException = exports.BinaryCommandFailedException = void 0;
6
- exports.StreamMovementInterruptedExceptionData = exports.StreamMovementFailedExceptionData = exports.StreamExecutionExceptionData = exports.SetPeripheralStateExceptionData = exports.SetDeviceStateExceptionData = exports.MovementInterruptedExceptionData = exports.MovementFailedExceptionData = exports.InvalidResponseExceptionData = exports.InvalidPacketExceptionData = exports.GCodeSyntaxExceptionData = void 0;
5
+ exports.DeviceDbFailedExceptionData = exports.DeviceAddressConflictExceptionData = exports.CommandTooLongExceptionData = exports.CommandFailedExceptionData = exports.BinaryCommandFailedExceptionData = exports.MotionLibException = exports.UnknownRequestException = exports.TransportAlreadyUsedException = exports.StreamSetupFailedException = exports.StreamMovementInterruptedException = exports.StreamMovementFailedException = exports.StreamModeException = exports.StreamExecutionException = exports.SettingNotFoundException = exports.SetPeripheralStateFailedException = exports.SetDeviceStateFailedException = exports.SerialPortBusyException = exports.RequestTimeoutException = exports.OutOfRequestIdsException = exports.OsFailedException = exports.NotSupportedException = exports.NoValueForKeyException = exports.NoDeviceFoundException = exports.MovementInterruptedException = exports.MovementFailedException = exports.LockstepNotEnabledException = exports.LockstepEnabledException = exports.IoFailedException = exports.IoChannelOutOfRangeException = exports.InvalidResponseException = exports.InvalidParkStateException = exports.InvalidPacketException = exports.InvalidOperationException = exports.InvalidDataException = exports.InvalidArgumentException = exports.InternalErrorException = exports.GCodeSyntaxException = exports.GCodeExecutionException = exports.DeviceNotIdentifiedException = exports.DeviceFailedException = exports.DeviceDbFailedException = exports.DeviceBusyException = exports.DeviceAddressConflictException = exports.ConversionFailedException = exports.ConnectionFailedException = exports.ConnectionClosedException = exports.CommandTooLongException = exports.CommandPreemptedException = exports.CommandFailedException = exports.BinaryCommandFailedException = void 0;
6
+ exports.StreamMovementInterruptedExceptionData = exports.StreamMovementFailedExceptionData = exports.StreamExecutionExceptionData = exports.SetPeripheralStateExceptionData = exports.SetDeviceStateExceptionData = exports.MovementInterruptedExceptionData = exports.MovementFailedExceptionData = exports.InvalidResponseExceptionData = exports.InvalidPacketExceptionData = exports.GCodeSyntaxExceptionData = exports.GCodeExecutionExceptionData = void 0;
7
7
  var binary_command_failed_exception_1 = require("./binary_command_failed_exception");
8
8
  Object.defineProperty(exports, "BinaryCommandFailedException", { enumerable: true, get: function () { return binary_command_failed_exception_1.BinaryCommandFailedException; } });
9
9
  var command_failed_exception_1 = require("./command_failed_exception");
@@ -102,6 +102,8 @@ var command_too_long_exception_data_1 = require("./command_too_long_exception_da
102
102
  Object.defineProperty(exports, "CommandTooLongExceptionData", { enumerable: true, get: function () { return command_too_long_exception_data_1.CommandTooLongExceptionData; } });
103
103
  var device_address_conflict_exception_data_1 = require("./device_address_conflict_exception_data");
104
104
  Object.defineProperty(exports, "DeviceAddressConflictExceptionData", { enumerable: true, get: function () { return device_address_conflict_exception_data_1.DeviceAddressConflictExceptionData; } });
105
+ var device_db_failed_exception_data_1 = require("./device_db_failed_exception_data");
106
+ Object.defineProperty(exports, "DeviceDbFailedExceptionData", { enumerable: true, get: function () { return device_db_failed_exception_data_1.DeviceDbFailedExceptionData; } });
105
107
  var g_code_execution_exception_data_1 = require("./g_code_execution_exception_data");
106
108
  Object.defineProperty(exports, "GCodeExecutionExceptionData", { enumerable: true, get: function () { return g_code_execution_exception_data_1.GCodeExecutionExceptionData; } });
107
109
  var g_code_syntax_exception_data_1 = require("./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IAAA,2BAA2B,OAAA;AACpC,6FAAyF;AAAhF,uJAAA,gCAAgC,OAAA;AACzC,qFAAgF;AAAvE,8IAAA,2BAA2B,OAAA;AACpC,6FAAwF;AAA/E,sJAAA,+BAA+B,OAAA;AACxC,qFAAiF;AAAxE,+IAAA,4BAA4B,OAAA;AACrC,iGAA4F;AAAnF,0JAAA,iCAAiC,OAAA;AAC1C,2GAAsG;AAA7F,oKAAA,sCAAsC,OAAA","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nexport { BinaryCommandFailedException } from './binary_command_failed_exception';\nexport { CommandFailedException } from './command_failed_exception';\nexport { CommandPreemptedException } from './command_preempted_exception';\nexport { CommandTooLongException } from './command_too_long_exception';\nexport { ConnectionClosedException } from './connection_closed_exception';\nexport { ConnectionFailedException } from './connection_failed_exception';\nexport { ConversionFailedException } from './conversion_failed_exception';\nexport { DeviceAddressConflictException } from './device_address_conflict_exception';\nexport { DeviceBusyException } from './device_busy_exception';\nexport { DeviceDbFailedException } from './device_db_failed_exception';\nexport { DeviceFailedException } from './device_failed_exception';\nexport { DeviceNotIdentifiedException } from './device_not_identified_exception';\nexport { GCodeExecutionException } from './g_code_execution_exception';\nexport { GCodeSyntaxException } from './g_code_syntax_exception';\nexport { InternalErrorException } from './internal_error_exception';\nexport { InvalidArgumentException } from './invalid_argument_exception';\nexport { InvalidDataException } from './invalid_data_exception';\nexport { InvalidOperationException } from './invalid_operation_exception';\nexport { InvalidPacketException } from './invalid_packet_exception';\nexport { InvalidParkStateException } from './invalid_park_state_exception';\nexport { InvalidResponseException } from './invalid_response_exception';\nexport { IoChannelOutOfRangeException } from './io_channel_out_of_range_exception';\nexport { IoFailedException } from './io_failed_exception';\nexport { LockstepEnabledException } from './lockstep_enabled_exception';\nexport { LockstepNotEnabledException } from './lockstep_not_enabled_exception';\nexport { MovementFailedException } from './movement_failed_exception';\nexport { MovementInterruptedException } from './movement_interrupted_exception';\nexport { NoDeviceFoundException } from './no_device_found_exception';\nexport { NoValueForKeyException } from './no_value_for_key_exception';\nexport { NotSupportedException } from './not_supported_exception';\nexport { OsFailedException } from './os_failed_exception';\nexport { OutOfRequestIdsException } from './out_of_request_ids_exception';\nexport { RequestTimeoutException } from './request_timeout_exception';\nexport { SerialPortBusyException } from './serial_port_busy_exception';\nexport { SetDeviceStateFailedException } from './set_device_state_failed_exception';\nexport { SetPeripheralStateFailedException } from './set_peripheral_state_failed_exception';\nexport { SettingNotFoundException } from './setting_not_found_exception';\nexport { StreamExecutionException } from './stream_execution_exception';\nexport { StreamModeException } from './stream_mode_exception';\nexport { StreamMovementFailedException } from './stream_movement_failed_exception';\nexport { StreamMovementInterruptedException } from './stream_movement_interrupted_exception';\nexport { StreamSetupFailedException } from './stream_setup_failed_exception';\nexport { TransportAlreadyUsedException } from './transport_already_used_exception';\nexport { UnknownRequestException } from './unknown_request_exception';\nexport { MotionLibException } from './motion_lib_exception';\n\nexport { BinaryCommandFailedExceptionData } from './binary_command_failed_exception_data';\nexport { CommandFailedExceptionData } from './command_failed_exception_data';\nexport { CommandTooLongExceptionData } from './command_too_long_exception_data';\nexport { DeviceAddressConflictExceptionData } from './device_address_conflict_exception_data';\nexport { GCodeExecutionExceptionData } from './g_code_execution_exception_data';\nexport { GCodeSyntaxExceptionData } from './g_code_syntax_exception_data';\nexport { InvalidPacketExceptionData } from './invalid_packet_exception_data';\nexport { InvalidResponseExceptionData } from './invalid_response_exception_data';\nexport { MovementFailedExceptionData } from './movement_failed_exception_data';\nexport { MovementInterruptedExceptionData } from './movement_interrupted_exception_data';\nexport { SetDeviceStateExceptionData } from './set_device_state_exception_data';\nexport { SetPeripheralStateExceptionData } from './set_peripheral_state_exception_data';\nexport { StreamExecutionExceptionData } from './stream_execution_exception_data';\nexport { StreamMovementFailedExceptionData } from './stream_movement_failed_exception_data';\nexport { StreamMovementInterruptedExceptionData } from './stream_movement_interrupted_exception_data';\n"]}
1
+ {"version":3,"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IAAA,2BAA2B,OAAA;AACpC,6FAAyF;AAAhF,uJAAA,gCAAgC,OAAA;AACzC,qFAAgF;AAAvE,8IAAA,2BAA2B,OAAA;AACpC,6FAAwF;AAA/E,sJAAA,+BAA+B,OAAA;AACxC,qFAAiF;AAAxE,+IAAA,4BAA4B,OAAA;AACrC,iGAA4F;AAAnF,0JAAA,iCAAiC,OAAA;AAC1C,2GAAsG;AAA7F,oKAAA,sCAAsC,OAAA","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nexport { BinaryCommandFailedException } from './binary_command_failed_exception';\nexport { CommandFailedException } from './command_failed_exception';\nexport { CommandPreemptedException } from './command_preempted_exception';\nexport { CommandTooLongException } from './command_too_long_exception';\nexport { ConnectionClosedException } from './connection_closed_exception';\nexport { ConnectionFailedException } from './connection_failed_exception';\nexport { ConversionFailedException } from './conversion_failed_exception';\nexport { DeviceAddressConflictException } from './device_address_conflict_exception';\nexport { DeviceBusyException } from './device_busy_exception';\nexport { DeviceDbFailedException } from './device_db_failed_exception';\nexport { DeviceFailedException } from './device_failed_exception';\nexport { DeviceNotIdentifiedException } from './device_not_identified_exception';\nexport { GCodeExecutionException } from './g_code_execution_exception';\nexport { GCodeSyntaxException } from './g_code_syntax_exception';\nexport { InternalErrorException } from './internal_error_exception';\nexport { InvalidArgumentException } from './invalid_argument_exception';\nexport { InvalidDataException } from './invalid_data_exception';\nexport { InvalidOperationException } from './invalid_operation_exception';\nexport { InvalidPacketException } from './invalid_packet_exception';\nexport { InvalidParkStateException } from './invalid_park_state_exception';\nexport { InvalidResponseException } from './invalid_response_exception';\nexport { IoChannelOutOfRangeException } from './io_channel_out_of_range_exception';\nexport { IoFailedException } from './io_failed_exception';\nexport { LockstepEnabledException } from './lockstep_enabled_exception';\nexport { LockstepNotEnabledException } from './lockstep_not_enabled_exception';\nexport { MovementFailedException } from './movement_failed_exception';\nexport { MovementInterruptedException } from './movement_interrupted_exception';\nexport { NoDeviceFoundException } from './no_device_found_exception';\nexport { NoValueForKeyException } from './no_value_for_key_exception';\nexport { NotSupportedException } from './not_supported_exception';\nexport { OsFailedException } from './os_failed_exception';\nexport { OutOfRequestIdsException } from './out_of_request_ids_exception';\nexport { RequestTimeoutException } from './request_timeout_exception';\nexport { SerialPortBusyException } from './serial_port_busy_exception';\nexport { SetDeviceStateFailedException } from './set_device_state_failed_exception';\nexport { SetPeripheralStateFailedException } from './set_peripheral_state_failed_exception';\nexport { SettingNotFoundException } from './setting_not_found_exception';\nexport { StreamExecutionException } from './stream_execution_exception';\nexport { StreamModeException } from './stream_mode_exception';\nexport { StreamMovementFailedException } from './stream_movement_failed_exception';\nexport { StreamMovementInterruptedException } from './stream_movement_interrupted_exception';\nexport { StreamSetupFailedException } from './stream_setup_failed_exception';\nexport { TransportAlreadyUsedException } from './transport_already_used_exception';\nexport { UnknownRequestException } from './unknown_request_exception';\nexport { MotionLibException } from './motion_lib_exception';\n\nexport { BinaryCommandFailedExceptionData } from './binary_command_failed_exception_data';\nexport { CommandFailedExceptionData } from './command_failed_exception_data';\nexport { CommandTooLongExceptionData } from './command_too_long_exception_data';\nexport { DeviceAddressConflictExceptionData } from './device_address_conflict_exception_data';\nexport { DeviceDbFailedExceptionData } from './device_db_failed_exception_data';\nexport { GCodeExecutionExceptionData } from './g_code_execution_exception_data';\nexport { GCodeSyntaxExceptionData } from './g_code_syntax_exception_data';\nexport { InvalidPacketExceptionData } from './invalid_packet_exception_data';\nexport { InvalidResponseExceptionData } from './invalid_response_exception_data';\nexport { MovementFailedExceptionData } from './movement_failed_exception_data';\nexport { MovementInterruptedExceptionData } from './movement_interrupted_exception_data';\nexport { SetDeviceStateExceptionData } from './set_device_state_exception_data';\nexport { SetPeripheralStateExceptionData } from './set_peripheral_state_exception_data';\nexport { StreamExecutionExceptionData } from './stream_execution_exception_data';\nexport { StreamMovementFailedExceptionData } from './stream_movement_failed_exception_data';\nexport { StreamMovementInterruptedExceptionData } from './stream_movement_interrupted_exception_data';\n"]}
@@ -3,7 +3,11 @@
3
3
  // ============= DO NOT EDIT DIRECTLY ============= //
4
4
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
5
  if (k2 === undefined) k2 = k;
6
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
9
+ }
10
+ Object.defineProperty(o, k2, desc);
7
11
  }) : (function(o, m, k, k2) {
8
12
  if (k2 === undefined) k2 = k;
9
13
  o[k2] = m[k];
@@ -1 +1 @@
1
- {"version":3,"file":"convert_exceptions.js","sourceRoot":"","sources":["../../../src/gateway/convert_exceptions.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;AAEtD,kDAA0D;AAC1D,0DAA4C;AAE5C,MAAM,YAAY,GAAG,IAAI,GAAG,EAAwF,CAAC;AACrH,YAAY,CAAC,GAAG,CAAC,gBAAQ,CAAC,qBAAqB,EAAE,UAAU,CAAC,4BAA4B,CAAC,CAAC;AAC1F,YAAY,CAAC,GAAG,CAAC,gBAAQ,CAAC,cAAc,EAAE,UAAU,CAAC,sBAAsB,CAAC,CAAC;AAC7E,YAAY,CAAC,GAAG,CAAC,gBAAQ,CAAC,iBAAiB,EAAE,UAAU,CAAC,yBAAyB,CAAC,CAAC;AACnF,YAAY,CAAC,GAAG,CAAC,gBAAQ,CAAC,gBAAgB,EAAE,UAAU,CAAC,uBAAuB,CAAC,CAAC;AAChF,YAAY,CAAC,GAAG,CAAC,gBAAQ,CAAC,iBAAiB,EAAE,UAAU,CAAC,yBAAyB,CAAC,CAAC;AACnF,YAAY,CAAC,GAAG,CAAC,gBAAQ,CAAC,iBAAiB,EAAE,UAAU,CAAC,yBAAyB,CAAC,CAAC;AACnF,YAAY,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OAAO,IAAI,iBAAiB,CAAC,OAAO,EAAE,UAAW,CAAC,CAAC;AACrD,CAAC;AATD,gDASC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Errors as PbErrors } from '../protobufs/main_pb';\nimport * as exceptions from '../exceptions';\n\nconst errorMapping = new Map<PbErrors, new (message: string, customData: Buffer) => exceptions.MotionLibException>();\nerrorMapping.set(PbErrors.BINARY_COMMAND_FAILED, exceptions.BinaryCommandFailedException);\nerrorMapping.set(PbErrors.COMMAND_FAILED, exceptions.CommandFailedException);\nerrorMapping.set(PbErrors.COMMAND_PREEMPTED, exceptions.CommandPreemptedException);\nerrorMapping.set(PbErrors.COMMAND_TOO_LONG, exceptions.CommandTooLongException);\nerrorMapping.set(PbErrors.CONNECTION_CLOSED, exceptions.ConnectionClosedException);\nerrorMapping.set(PbErrors.CONNECTION_FAILED, exceptions.ConnectionFailedException);\nerrorMapping.set(PbErrors.CONVERSION_FAILED, exceptions.ConversionFailedException);\nerrorMapping.set(PbErrors.DEVICE_ADDRESS_CONFLICT, exceptions.DeviceAddressConflictException);\nerrorMapping.set(PbErrors.DEVICE_BUSY, exceptions.DeviceBusyException);\nerrorMapping.set(PbErrors.DEVICE_DB_FAILED, exceptions.DeviceDbFailedException);\nerrorMapping.set(PbErrors.DEVICE_FAILED, exceptions.DeviceFailedException);\nerrorMapping.set(PbErrors.DEVICE_NOT_IDENTIFIED, exceptions.DeviceNotIdentifiedException);\nerrorMapping.set(PbErrors.G_CODE_EXECUTION, exceptions.GCodeExecutionException);\nerrorMapping.set(PbErrors.G_CODE_SYNTAX, exceptions.GCodeSyntaxException);\nerrorMapping.set(PbErrors.INTERNAL_ERROR, exceptions.InternalErrorException);\nerrorMapping.set(PbErrors.INVALID_ARGUMENT, exceptions.InvalidArgumentException);\nerrorMapping.set(PbErrors.INVALID_DATA, exceptions.InvalidDataException);\nerrorMapping.set(PbErrors.INVALID_OPERATION, exceptions.InvalidOperationException);\nerrorMapping.set(PbErrors.INVALID_PACKET, exceptions.InvalidPacketException);\nerrorMapping.set(PbErrors.INVALID_PARK_STATE, exceptions.InvalidParkStateException);\nerrorMapping.set(PbErrors.INVALID_RESPONSE, exceptions.InvalidResponseException);\nerrorMapping.set(PbErrors.IO_CHANNEL_OUT_OF_RANGE, exceptions.IoChannelOutOfRangeException);\nerrorMapping.set(PbErrors.IO_FAILED, exceptions.IoFailedException);\nerrorMapping.set(PbErrors.LOCKSTEP_ENABLED, exceptions.LockstepEnabledException);\nerrorMapping.set(PbErrors.LOCKSTEP_NOT_ENABLED, exceptions.LockstepNotEnabledException);\nerrorMapping.set(PbErrors.MOVEMENT_FAILED, exceptions.MovementFailedException);\nerrorMapping.set(PbErrors.MOVEMENT_INTERRUPTED, exceptions.MovementInterruptedException);\nerrorMapping.set(PbErrors.NO_DEVICE_FOUND, exceptions.NoDeviceFoundException);\nerrorMapping.set(PbErrors.NO_VALUE_FOR_KEY, exceptions.NoValueForKeyException);\nerrorMapping.set(PbErrors.NOT_SUPPORTED, exceptions.NotSupportedException);\nerrorMapping.set(PbErrors.OS_FAILED, exceptions.OsFailedException);\nerrorMapping.set(PbErrors.OUT_OF_REQUEST_IDS, exceptions.OutOfRequestIdsException);\nerrorMapping.set(PbErrors.REQUEST_TIMEOUT, exceptions.RequestTimeoutException);\nerrorMapping.set(PbErrors.SERIAL_PORT_BUSY, exceptions.SerialPortBusyException);\nerrorMapping.set(PbErrors.SET_DEVICE_STATE_FAILED, exceptions.SetDeviceStateFailedException);\nerrorMapping.set(PbErrors.SET_PERIPHERAL_STATE_FAILED, exceptions.SetPeripheralStateFailedException);\nerrorMapping.set(PbErrors.SETTING_NOT_FOUND, exceptions.SettingNotFoundException);\nerrorMapping.set(PbErrors.STREAM_EXECUTION, exceptions.StreamExecutionException);\nerrorMapping.set(PbErrors.STREAM_MODE, exceptions.StreamModeException);\nerrorMapping.set(PbErrors.STREAM_MOVEMENT_FAILED, exceptions.StreamMovementFailedException);\nerrorMapping.set(PbErrors.STREAM_MOVEMENT_INTERRUPTED, exceptions.StreamMovementInterruptedException);\nerrorMapping.set(PbErrors.STREAM_SETUP_FAILED, exceptions.StreamSetupFailedException);\nerrorMapping.set(PbErrors.TRANSPORT_ALREADY_USED, exceptions.TransportAlreadyUsedException);\nerrorMapping.set(PbErrors.UNKNOWN_REQUEST, exceptions.UnknownRequestException);\n\nexport function convertToException(error: PbErrors, message: string, customData?: Buffer): exceptions.MotionLibException {\n const SpecificException = errorMapping.get(error);\n\n /* istanbul ignore if */\n if (!SpecificException) {\n return new exceptions.MotionLibException(message);\n }\n\n return new SpecificException(message, customData!);\n}\n"]}
1
+ {"version":3,"file":"convert_exceptions.js","sourceRoot":"","sources":["../../../src/gateway/convert_exceptions.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,kDAA0D;AAC1D,0DAA4C;AAE5C,MAAM,YAAY,GAAG,IAAI,GAAG,EAAwF,CAAC;AACrH,YAAY,CAAC,GAAG,CAAC,gBAAQ,CAAC,qBAAqB,EAAE,UAAU,CAAC,4BAA4B,CAAC,CAAC;AAC1F,YAAY,CAAC,GAAG,CAAC,gBAAQ,CAAC,cAAc,EAAE,UAAU,CAAC,sBAAsB,CAAC,CAAC;AAC7E,YAAY,CAAC,GAAG,CAAC,gBAAQ,CAAC,iBAAiB,EAAE,UAAU,CAAC,yBAAyB,CAAC,CAAC;AACnF,YAAY,CAAC,GAAG,CAAC,gBAAQ,CAAC,gBAAgB,EAAE,UAAU,CAAC,uBAAuB,CAAC,CAAC;AAChF,YAAY,CAAC,GAAG,CAAC,gBAAQ,CAAC,iBAAiB,EAAE,UAAU,CAAC,yBAAyB,CAAC,CAAC;AACnF,YAAY,CAAC,GAAG,CAAC,gBAAQ,CAAC,iBAAiB,EAAE,UAAU,CAAC,yBAAyB,CAAC,CAAC;AACnF,YAAY,CAAC,GAAG,CAAC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iB,CAAC,OAAO,EAAE,UAAW,CAAC,CAAC;AACrD,CAAC;AATD,gDASC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Errors as PbErrors } from '../protobufs/main_pb';\nimport * as exceptions from '../exceptions';\n\nconst errorMapping = new Map<PbErrors, new (message: string, customData: Buffer) => exceptions.MotionLibException>();\nerrorMapping.set(PbErrors.BINARY_COMMAND_FAILED, exceptions.BinaryCommandFailedException);\nerrorMapping.set(PbErrors.COMMAND_FAILED, exceptions.CommandFailedException);\nerrorMapping.set(PbErrors.COMMAND_PREEMPTED, exceptions.CommandPreemptedException);\nerrorMapping.set(PbErrors.COMMAND_TOO_LONG, exceptions.CommandTooLongException);\nerrorMapping.set(PbErrors.CONNECTION_CLOSED, exceptions.ConnectionClosedException);\nerrorMapping.set(PbErrors.CONNECTION_FAILED, exceptions.ConnectionFailedException);\nerrorMapping.set(PbErrors.CONVERSION_FAILED, exceptions.ConversionFailedException);\nerrorMapping.set(PbErrors.DEVICE_ADDRESS_CONFLICT, exceptions.DeviceAddressConflictException);\nerrorMapping.set(PbErrors.DEVICE_BUSY, exceptions.DeviceBusyException);\nerrorMapping.set(PbErrors.DEVICE_DB_FAILED, exceptions.DeviceDbFailedException);\nerrorMapping.set(PbErrors.DEVICE_FAILED, exceptions.DeviceFailedException);\nerrorMapping.set(PbErrors.DEVICE_NOT_IDENTIFIED, exceptions.DeviceNotIdentifiedException);\nerrorMapping.set(PbErrors.G_CODE_EXECUTION, exceptions.GCodeExecutionException);\nerrorMapping.set(PbErrors.G_CODE_SYNTAX, exceptions.GCodeSyntaxException);\nerrorMapping.set(PbErrors.INTERNAL_ERROR, exceptions.InternalErrorException);\nerrorMapping.set(PbErrors.INVALID_ARGUMENT, exceptions.InvalidArgumentException);\nerrorMapping.set(PbErrors.INVALID_DATA, exceptions.InvalidDataException);\nerrorMapping.set(PbErrors.INVALID_OPERATION, exceptions.InvalidOperationException);\nerrorMapping.set(PbErrors.INVALID_PACKET, exceptions.InvalidPacketException);\nerrorMapping.set(PbErrors.INVALID_PARK_STATE, exceptions.InvalidParkStateException);\nerrorMapping.set(PbErrors.INVALID_RESPONSE, exceptions.InvalidResponseException);\nerrorMapping.set(PbErrors.IO_CHANNEL_OUT_OF_RANGE, exceptions.IoChannelOutOfRangeException);\nerrorMapping.set(PbErrors.IO_FAILED, exceptions.IoFailedException);\nerrorMapping.set(PbErrors.LOCKSTEP_ENABLED, exceptions.LockstepEnabledException);\nerrorMapping.set(PbErrors.LOCKSTEP_NOT_ENABLED, exceptions.LockstepNotEnabledException);\nerrorMapping.set(PbErrors.MOVEMENT_FAILED, exceptions.MovementFailedException);\nerrorMapping.set(PbErrors.MOVEMENT_INTERRUPTED, exceptions.MovementInterruptedException);\nerrorMapping.set(PbErrors.NO_DEVICE_FOUND, exceptions.NoDeviceFoundException);\nerrorMapping.set(PbErrors.NO_VALUE_FOR_KEY, exceptions.NoValueForKeyException);\nerrorMapping.set(PbErrors.NOT_SUPPORTED, exceptions.NotSupportedException);\nerrorMapping.set(PbErrors.OS_FAILED, exceptions.OsFailedException);\nerrorMapping.set(PbErrors.OUT_OF_REQUEST_IDS, exceptions.OutOfRequestIdsException);\nerrorMapping.set(PbErrors.REQUEST_TIMEOUT, exceptions.RequestTimeoutException);\nerrorMapping.set(PbErrors.SERIAL_PORT_BUSY, exceptions.SerialPortBusyException);\nerrorMapping.set(PbErrors.SET_DEVICE_STATE_FAILED, exceptions.SetDeviceStateFailedException);\nerrorMapping.set(PbErrors.SET_PERIPHERAL_STATE_FAILED, exceptions.SetPeripheralStateFailedException);\nerrorMapping.set(PbErrors.SETTING_NOT_FOUND, exceptions.SettingNotFoundException);\nerrorMapping.set(PbErrors.STREAM_EXECUTION, exceptions.StreamExecutionException);\nerrorMapping.set(PbErrors.STREAM_MODE, exceptions.StreamModeException);\nerrorMapping.set(PbErrors.STREAM_MOVEMENT_FAILED, exceptions.StreamMovementFailedException);\nerrorMapping.set(PbErrors.STREAM_MOVEMENT_INTERRUPTED, exceptions.StreamMovementInterruptedException);\nerrorMapping.set(PbErrors.STREAM_SETUP_FAILED, exceptions.StreamSetupFailedException);\nerrorMapping.set(PbErrors.TRANSPORT_ALREADY_USED, exceptions.TransportAlreadyUsedException);\nerrorMapping.set(PbErrors.UNKNOWN_REQUEST, exceptions.UnknownRequestException);\n\nexport function convertToException(error: PbErrors, message: string, customData?: Buffer): exceptions.MotionLibException {\n const SpecificException = errorMapping.get(error);\n\n /* istanbul ignore if */\n if (!SpecificException) {\n return new exceptions.MotionLibException(message);\n }\n\n return new SpecificException(message, customData!);\n}\n"]}
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/gateway/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,uDAAqC;AACrC,+BAA6C;AAApC,iGAAA,SAAS,OAAA;AAAE,gGAAA,QAAQ,OAAA;AAC5B,mCAA+C;AAAtC,gGAAA,MAAM,OAAA;AAAE,qGAAA,WAAW,OAAA;AAC5B,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA","sourcesContent":["export * from '../protobufs/main_pb';\nexport { callAsync, callSync } from './call';\nexport { events, filterEvent } from './events';\nexport { convertToException } from './convert_exceptions';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/gateway/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,+BAA6C;AAApC,iGAAA,SAAS,OAAA;AAAE,gGAAA,QAAQ,OAAA;AAC5B,mCAA+C;AAAtC,gGAAA,MAAM,OAAA;AAAE,qGAAA,WAAW,OAAA;AAC5B,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA","sourcesContent":["export * from '../protobufs/main_pb';\nexport { callAsync, callSync } from './call';\nexport { events, filterEvent } from './events';\nexport { convertToException } from './convert_exceptions';\n"]}
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  /*
3
2
  IMPORTANT
4
3
  This file was copied from `https://github.com/golang/go/blob/release-branch.go1.15/misc/wasm/wasm_exec.js`.
@@ -7,35 +6,16 @@ It has been modified a bit to reduce webpack warnings about how the `require()`
7
6
  // Copyright 2018 The Go Authors. All rights reserved.
8
7
  // Use of this source code is governed by a BSD-style
9
8
  // license that can be found in the LICENSE file.
9
+ "use strict";
10
10
  const wasmExec = (() => {
11
- // Map multiple JavaScript environments to a single common API,
12
- // preferring web standards over Node.js API.
13
- //
14
- // Environments considered:
15
- // - Browsers
16
- // - Node.js
17
- // - Electron
18
- // - Parcel
19
- if (typeof global !== "undefined") {
20
- // global already exists
21
- }
22
- else if (typeof window !== "undefined") {
23
- window.global = window;
24
- }
25
- else if (typeof self !== "undefined") {
26
- self.global = self;
27
- }
28
- else {
29
- throw new Error("cannot export Go (neither global, window nor self is defined)");
30
- }
31
11
  const enosys = () => {
32
12
  const err = new Error("not implemented");
33
13
  err.code = "ENOSYS";
34
14
  return err;
35
15
  };
36
- if (!global.fs) {
16
+ if (!globalThis.fs) {
37
17
  let outputBuf = "";
38
- global.fs = {
18
+ globalThis.fs = {
39
19
  constants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 },
40
20
  writeSync(fd, buf) {
41
21
  outputBuf += decoder.decode(buf);
@@ -79,8 +59,8 @@ const wasmExec = (() => {
79
59
  utimes(path, atime, mtime, callback) { callback(enosys()); },
80
60
  };
81
61
  }
82
- if (!global.process) {
83
- global.process = {
62
+ if (!globalThis.process) {
63
+ globalThis.process = {
84
64
  getuid() { return -1; },
85
65
  getgid() { return -1; },
86
66
  geteuid() { return -1; },
@@ -93,32 +73,21 @@ const wasmExec = (() => {
93
73
  chdir() { throw enosys(); },
94
74
  };
95
75
  }
96
- if (!global.crypto) {
97
- const nodeCrypto = require("crypto");
98
- global.crypto = {
99
- getRandomValues(b) {
100
- nodeCrypto.randomFillSync(b);
101
- },
102
- };
76
+ if (!globalThis.crypto) {
77
+ throw new Error("globalThis.crypto is not available, polyfill required (crypto.getRandomValues only)");
103
78
  }
104
- if (!global.performance) {
105
- global.performance = {
106
- now() {
107
- const [sec, nsec] = process.hrtime();
108
- return sec * 1000 + nsec / 1000000;
109
- },
110
- };
79
+ if (!globalThis.performance) {
80
+ throw new Error("globalThis.performance is not available, polyfill required (performance.now only)");
111
81
  }
112
- if (!global.TextEncoder) {
113
- global.TextEncoder = require("util").TextEncoder;
82
+ if (!globalThis.TextEncoder) {
83
+ throw new Error("globalThis.TextEncoder is not available, polyfill required");
114
84
  }
115
- if (!global.TextDecoder) {
116
- global.TextDecoder = require("util").TextDecoder;
85
+ if (!globalThis.TextDecoder) {
86
+ throw new Error("globalThis.TextDecoder is not available, polyfill required");
117
87
  }
118
- // End of polyfills for common API.
119
88
  const encoder = new TextEncoder("utf-8");
120
89
  const decoder = new TextDecoder("utf-8");
121
- global.Go = class {
90
+ globalThis.Go = class {
122
91
  constructor() {
123
92
  this.argv = ["js"];
124
93
  this.env = {};
@@ -227,6 +196,7 @@ const wasmExec = (() => {
227
196
  // This changes the SP, thus we have to update the SP used by the imported function.
228
197
  // func wasmExit(code int32)
229
198
  "runtime.wasmExit": (sp) => {
199
+ sp >>>= 0;
230
200
  const code = this.mem.getInt32(sp + 8, true);
231
201
  this.exited = true;
232
202
  delete this._inst;
@@ -238,6 +208,7 @@ const wasmExec = (() => {
238
208
  },
239
209
  // func wasmWrite(fd uintptr, p unsafe.Pointer, n int32)
240
210
  "runtime.wasmWrite": (sp) => {
211
+ sp >>>= 0;
241
212
  const fd = getInt64(sp + 8);
242
213
  const p = getInt64(sp + 16);
243
214
  const n = this.mem.getInt32(sp + 24, true);
@@ -245,20 +216,24 @@ const wasmExec = (() => {
245
216
  },
246
217
  // func resetMemoryDataView()
247
218
  "runtime.resetMemoryDataView": (sp) => {
219
+ sp >>>= 0;
248
220
  this.mem = new DataView(this._inst.exports.mem.buffer);
249
221
  },
250
222
  // func nanotime1() int64
251
223
  "runtime.nanotime1": (sp) => {
224
+ sp >>>= 0;
252
225
  setInt64(sp + 8, (timeOrigin + performance.now()) * 1000000);
253
226
  },
254
- // func walltime1() (sec int64, nsec int32)
255
- "runtime.walltime1": (sp) => {
227
+ // func walltime() (sec int64, nsec int32)
228
+ "runtime.walltime": (sp) => {
229
+ sp >>>= 0;
256
230
  const msec = (new Date).getTime();
257
231
  setInt64(sp + 8, msec / 1000);
258
232
  this.mem.setInt32(sp + 16, (msec % 1000) * 1000000, true);
259
233
  },
260
234
  // func scheduleTimeoutEvent(delay int64) int32
261
235
  "runtime.scheduleTimeoutEvent": (sp) => {
236
+ sp >>>= 0;
262
237
  const id = this._nextCallbackTimeoutID;
263
238
  this._nextCallbackTimeoutID++;
264
239
  this._scheduledTimeouts.set(id, setTimeout(() => {
@@ -274,16 +249,19 @@ const wasmExec = (() => {
274
249
  },
275
250
  // func clearTimeoutEvent(id int32)
276
251
  "runtime.clearTimeoutEvent": (sp) => {
252
+ sp >>>= 0;
277
253
  const id = this.mem.getInt32(sp + 8, true);
278
254
  clearTimeout(this._scheduledTimeouts.get(id));
279
255
  this._scheduledTimeouts.delete(id);
280
256
  },
281
257
  // func getRandomData(r []byte)
282
258
  "runtime.getRandomData": (sp) => {
259
+ sp >>>= 0;
283
260
  crypto.getRandomValues(loadSlice(sp + 8));
284
261
  },
285
262
  // func finalizeRef(v ref)
286
263
  "syscall/js.finalizeRef": (sp) => {
264
+ sp >>>= 0;
287
265
  const id = this.mem.getUint32(sp + 8, true);
288
266
  this._goRefCounts[id]--;
289
267
  if (this._goRefCounts[id] === 0) {
@@ -295,97 +273,114 @@ const wasmExec = (() => {
295
273
  },
296
274
  // func stringVal(value string) ref
297
275
  "syscall/js.stringVal": (sp) => {
276
+ sp >>>= 0;
298
277
  storeValue(sp + 24, loadString(sp + 8));
299
278
  },
300
279
  // func valueGet(v ref, p string) ref
301
280
  "syscall/js.valueGet": (sp) => {
281
+ sp >>>= 0;
302
282
  const result = Reflect.get(loadValue(sp + 8), loadString(sp + 16));
303
- sp = this._inst.exports.getsp(); // see comment above
283
+ sp = this._inst.exports.getsp() >>> 0; // see comment above
304
284
  storeValue(sp + 32, result);
305
285
  },
306
286
  // func valueSet(v ref, p string, x ref)
307
287
  "syscall/js.valueSet": (sp) => {
288
+ sp >>>= 0;
308
289
  Reflect.set(loadValue(sp + 8), loadString(sp + 16), loadValue(sp + 32));
309
290
  },
310
291
  // func valueDelete(v ref, p string)
311
292
  "syscall/js.valueDelete": (sp) => {
293
+ sp >>>= 0;
312
294
  Reflect.deleteProperty(loadValue(sp + 8), loadString(sp + 16));
313
295
  },
314
296
  // func valueIndex(v ref, i int) ref
315
297
  "syscall/js.valueIndex": (sp) => {
298
+ sp >>>= 0;
316
299
  storeValue(sp + 24, Reflect.get(loadValue(sp + 8), getInt64(sp + 16)));
317
300
  },
318
301
  // valueSetIndex(v ref, i int, x ref)
319
302
  "syscall/js.valueSetIndex": (sp) => {
303
+ sp >>>= 0;
320
304
  Reflect.set(loadValue(sp + 8), getInt64(sp + 16), loadValue(sp + 24));
321
305
  },
322
306
  // func valueCall(v ref, m string, args []ref) (ref, bool)
323
307
  "syscall/js.valueCall": (sp) => {
308
+ sp >>>= 0;
324
309
  try {
325
310
  const v = loadValue(sp + 8);
326
311
  const m = Reflect.get(v, loadString(sp + 16));
327
312
  const args = loadSliceOfValues(sp + 32);
328
313
  const result = Reflect.apply(m, v, args);
329
- sp = this._inst.exports.getsp(); // see comment above
314
+ sp = this._inst.exports.getsp() >>> 0; // see comment above
330
315
  storeValue(sp + 56, result);
331
316
  this.mem.setUint8(sp + 64, 1);
332
317
  }
333
318
  catch (err) {
319
+ sp = this._inst.exports.getsp() >>> 0; // see comment above
334
320
  storeValue(sp + 56, err);
335
321
  this.mem.setUint8(sp + 64, 0);
336
322
  }
337
323
  },
338
324
  // func valueInvoke(v ref, args []ref) (ref, bool)
339
325
  "syscall/js.valueInvoke": (sp) => {
326
+ sp >>>= 0;
340
327
  try {
341
328
  const v = loadValue(sp + 8);
342
329
  const args = loadSliceOfValues(sp + 16);
343
330
  const result = Reflect.apply(v, undefined, args);
344
- sp = this._inst.exports.getsp(); // see comment above
331
+ sp = this._inst.exports.getsp() >>> 0; // see comment above
345
332
  storeValue(sp + 40, result);
346
333
  this.mem.setUint8(sp + 48, 1);
347
334
  }
348
335
  catch (err) {
336
+ sp = this._inst.exports.getsp() >>> 0; // see comment above
349
337
  storeValue(sp + 40, err);
350
338
  this.mem.setUint8(sp + 48, 0);
351
339
  }
352
340
  },
353
341
  // func valueNew(v ref, args []ref) (ref, bool)
354
342
  "syscall/js.valueNew": (sp) => {
343
+ sp >>>= 0;
355
344
  try {
356
345
  const v = loadValue(sp + 8);
357
346
  const args = loadSliceOfValues(sp + 16);
358
347
  const result = Reflect.construct(v, args);
359
- sp = this._inst.exports.getsp(); // see comment above
348
+ sp = this._inst.exports.getsp() >>> 0; // see comment above
360
349
  storeValue(sp + 40, result);
361
350
  this.mem.setUint8(sp + 48, 1);
362
351
  }
363
352
  catch (err) {
353
+ sp = this._inst.exports.getsp() >>> 0; // see comment above
364
354
  storeValue(sp + 40, err);
365
355
  this.mem.setUint8(sp + 48, 0);
366
356
  }
367
357
  },
368
358
  // func valueLength(v ref) int
369
359
  "syscall/js.valueLength": (sp) => {
360
+ sp >>>= 0;
370
361
  setInt64(sp + 16, parseInt(loadValue(sp + 8).length));
371
362
  },
372
363
  // valuePrepareString(v ref) (ref, int)
373
364
  "syscall/js.valuePrepareString": (sp) => {
365
+ sp >>>= 0;
374
366
  const str = encoder.encode(String(loadValue(sp + 8)));
375
367
  storeValue(sp + 16, str);
376
368
  setInt64(sp + 24, str.length);
377
369
  },
378
370
  // valueLoadString(v ref, b []byte)
379
371
  "syscall/js.valueLoadString": (sp) => {
372
+ sp >>>= 0;
380
373
  const str = loadValue(sp + 8);
381
374
  loadSlice(sp + 16).set(str);
382
375
  },
383
376
  // func valueInstanceOf(v ref, t ref) bool
384
377
  "syscall/js.valueInstanceOf": (sp) => {
378
+ sp >>>= 0;
385
379
  this.mem.setUint8(sp + 24, (loadValue(sp + 8) instanceof loadValue(sp + 16)) ? 1 : 0);
386
380
  },
387
381
  // func copyBytesToGo(dst []byte, src ref) (int, bool)
388
382
  "syscall/js.copyBytesToGo": (sp) => {
383
+ sp >>>= 0;
389
384
  const dst = loadSlice(sp + 8);
390
385
  const src = loadValue(sp + 32);
391
386
  if (!(src instanceof Uint8Array || src instanceof Uint8ClampedArray)) {
@@ -399,6 +394,7 @@ const wasmExec = (() => {
399
394
  },
400
395
  // func copyBytesToJS(dst ref, src []byte) (int, bool)
401
396
  "syscall/js.copyBytesToJS": (sp) => {
397
+ sp >>>= 0;
402
398
  const dst = loadValue(sp + 8);
403
399
  const src = loadSlice(sp + 16);
404
400
  if (!(dst instanceof Uint8Array || dst instanceof Uint8ClampedArray)) {
@@ -417,6 +413,9 @@ const wasmExec = (() => {
417
413
  };
418
414
  }
419
415
  async run(instance) {
416
+ if (!(instance instanceof WebAssembly.Instance)) {
417
+ throw new Error("Go.run: WebAssembly.Instance expected");
418
+ }
420
419
  this._inst = instance;
421
420
  this.mem = new DataView(this._inst.exports.mem.buffer);
422
421
  this._values = [
@@ -425,7 +424,7 @@ const wasmExec = (() => {
425
424
  null,
426
425
  true,
427
426
  false,
428
- global,
427
+ globalThis,
429
428
  this,
430
429
  ];
431
430
  this._goRefCounts = new Array(this._values.length).fill(Infinity); // number of references that Go has to a JS value, indexed by reference id
@@ -434,7 +433,7 @@ const wasmExec = (() => {
434
433
  [null, 2],
435
434
  [true, 3],
436
435
  [false, 4],
437
- [global, 5],
436
+ [globalThis, 5],
438
437
  [this, 6],
439
438
  ]);
440
439
  this._idPool = []; // unused ids that have been garbage collected
@@ -468,6 +467,12 @@ const wasmExec = (() => {
468
467
  this.mem.setUint32(offset + 4, 0, true);
469
468
  offset += 8;
470
469
  });
470
+ // The linker guarantees global data starts from at least wasmMinDataAddr.
471
+ // Keep in sync with cmd/link/internal/ld/data.go:wasmMinDataAddr.
472
+ const wasmMinDataAddr = 4096 + 8192;
473
+ if (offset >= wasmMinDataAddr) {
474
+ throw new Error("total length of command line and environment variables exceeds limit");
475
+ }
471
476
  this._inst.exports.run(argc, argv);
472
477
  if (this.exited) {
473
478
  this._resolveExitPromise();