@kittycad/lib 4.3.30 → 4.3.31

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.
@@ -16,9 +16,19 @@ interface ModelingCommandsWsParams {
16
16
  pr?: number;
17
17
  }
18
18
  /**
19
- * Open a websocket which accepts modeling commands.
19
+ * Opens a WebSocket to a Zoo KittyCAD engine instance.
20
20
  *
21
- * Pass those commands to the engine via websocket, and pass responses back to the client. Basically, this is a websocket proxy between the frontend/client and the engine.
21
+ * **Note**: Currently it's recommended to set `webrtc=true` in the WebSocket query string, otherwise some features, such as opacity setting, will cause the engine to fail.
22
+ *
23
+ * Due to the long-lived nature of the instances, it's possible the resources on have been used and not freed entirely, or the instance is in a bad state. Thus it's good practice to expect to have to potentially reconnect at any moment -even almost immediately after the first connection!
24
+ *
25
+ * Authorization happens via a pseudo HTTP header over the WebSocket: `{ type: "headers", headers: { "Authorization": "Bearer xxxxxxxxx" }}`
26
+ *
27
+ * The very next thing recommended is to setup a ping-pong interval. The current timeout is 10s and has no documented guarantee, so use a conservative number below that. 5s should be sufficient. A ping-pong interval is sending `{ type: 'ping" }` when `{ request_id, success, resp: { type: "pong", data: {} } }` message is received.
28
+ *
29
+ * You're ready to start sending modeling commands!
30
+ *
31
+ * If you want to understand how to connect to the WebRTC video stream, https://github.com/KittyCAD/kittycad.ts/blob/main/src/webrtc.ts is a nice example to learn from.
22
32
  *
23
33
  * Tags: modeling
24
34
  *
@@ -1 +1 @@
1
- {"version":3,"file":"modeling_commands_ws.d.ts","sourceRoot":"","sources":["../../../../../src/api/modeling/modeling_commands_ws.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAc,MAAM,iBAAiB,CAAA;AAIpD,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,iBAAiB,CAAA;AAExB,UAAU,wBAAwB;IAChC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,WAAW,CAAC,EAAE,cAAc,CAAA;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,8BAA8B,CAAC,EAAE,OAAO,CAAA;IACxC,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,OAAO,kBAAkB;;IAGrC;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,wBAAwB,GAAG,GAAG;IA2B1E,MAAM,CAAC,YAAY,CACjB,kBAAkB,EAAE,wBAAwB,EAC5C,EAAE,EAAE,SAAS;IAqBf,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,gBAAgB,GAAG,UAAU;IAIjD;;;;OAIG;IACH,MAAM,CAAC,YAAY,CAAC,EAAE,EAAE,YAAY,GAAG,iBAAiB;CAgCzD"}
1
+ {"version":3,"file":"modeling_commands_ws.d.ts","sourceRoot":"","sources":["../../../../../src/api/modeling/modeling_commands_ws.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAc,MAAM,iBAAiB,CAAA;AAIpD,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,iBAAiB,CAAA;AAExB,UAAU,wBAAwB;IAChC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,WAAW,CAAC,EAAE,cAAc,CAAA;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,8BAA8B,CAAC,EAAE,OAAO,CAAA;IACxC,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,OAAO,OAAO,kBAAkB;;IAGrC;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,wBAAwB,GAAG,GAAG;IA2B1E,MAAM,CAAC,YAAY,CACjB,kBAAkB,EAAE,wBAAwB,EAC5C,EAAE,EAAE,SAAS;IAqBf,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,gBAAgB,GAAG,UAAU;IAIjD;;;;OAIG;IACH,MAAM,CAAC,YAAY,CAAC,EAAE,EAAE,YAAY,GAAG,iBAAiB;CAgCzD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kittycad/lib",
3
- "version": "4.3.30",
3
+ "version": "4.3.31",
4
4
  "description": "Javascript library for KittyCAD API",
5
5
  "type": "module",
6
6
  "keywords": [