@alva-ai/toolkit 0.20.0 → 0.21.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/dist/index.js CHANGED
@@ -20,6 +20,11 @@ var CliUsageError = class extends Error {
20
20
  }
21
21
  };
22
22
 
23
+ // src/arrayBuffer.ts
24
+ function isArrayBuffer(value) {
25
+ return Object.prototype.toString.call(value) === "[object ArrayBuffer]";
26
+ }
27
+
23
28
  // src/resources/fs.ts
24
29
  var WRITE_FLAG_APPEND = 1 << 0;
25
30
  function isValidUtf8(bytes) {
@@ -71,7 +76,7 @@ var FsResource = class {
71
76
  const result = await this.client._request("GET", "/api/v1/fs/read", {
72
77
  query: { path: params.path, offset: params.offset, size: params.size }
73
78
  });
74
- if (!(result instanceof ArrayBuffer)) return result;
79
+ if (!isArrayBuffer(result)) return result;
75
80
  if (!isValidUtf8(new Uint8Array(result))) {
76
81
  return result;
77
82
  }
@@ -3724,7 +3729,7 @@ var installPlaybookRuntime = (targetWindow) => {
3724
3729
  };
3725
3730
 
3726
3731
  // src/index.ts
3727
- var VERSION = true ? "0.20.0" : "dev";
3732
+ var VERSION = true ? "0.21.0" : "dev";
3728
3733
  export {
3729
3734
  AlertsResource,
3730
3735
  AlvaClient,