@meshagent/meshagent 0.21.0 → 0.22.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/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## [0.22.0]
2
+ - JS/TS entrypoints now use base-64 encode/decode helpers instead of browser btoa/atob for Node compatibility.
3
+
1
4
  ## [0.21.0]
2
5
  - Stability
3
6
 
@@ -49714,10 +49714,10 @@ export var ServerXmlDocument: {
49714
49714
  export function applyBackendChanges(documentID: any, base64Changes: any): void;
49715
49715
  export function applyChanges(update: any): void;
49716
49716
  export function base64ToUint8Array(base642: any): Uint8Array<any>;
49717
- declare function getState2(documentID: any, vector: any): string;
49718
- declare function getStateVector2(documentID: any): string;
49717
+ declare function getState2(documentID: any, vector: any): any;
49718
+ declare function getStateVector2(documentID: any): any;
49719
49719
  export function registerDocument(id2: any, base64Data: any, undo: boolean | undefined, sendUpdateToBackend: any, sendUpdateToClient: any): void;
49720
- export function uint8ArrayToBase64(bytes: any): string;
49720
+ export function uint8ArrayToBase64(bytes: any): any;
49721
49721
  export function unregisterDocument(id2: any): void;
49722
49722
  declare var AbstractType: {
49723
49723
  };
@@ -9420,16 +9420,17 @@ var ServerXmlDocument = class {
9420
9420
 
9421
9421
  // src/entrypoint.ts
9422
9422
  var import_base_64 = __toESM(require_base64());
9423
+ var import_base_642 = __toESM(require_base64());
9423
9424
  function uint8ArrayToBase64(bytes) {
9424
9425
  let binary = "";
9425
9426
  const chunkSize = 32768;
9426
9427
  for (let i = 0; i < bytes.length; i += chunkSize) {
9427
9428
  binary += String.fromCharCode(...bytes.subarray(i, i + chunkSize));
9428
9429
  }
9429
- return btoa(binary);
9430
+ return (0, import_base_642.encode)(binary);
9430
9431
  }
9431
9432
  function base64ToUint8Array(base642) {
9432
- const binary = atob(base642);
9433
+ const binary = (0, import_base_642.decode)(base642);
9433
9434
  const len = binary.length;
9434
9435
  const bytes = new Uint8Array(len);
9435
9436
  for (let i = 0; i < len; i++) {
@@ -49714,10 +49714,10 @@ export var ServerXmlDocument: {
49714
49714
  export function applyBackendChanges(documentID: any, base64Changes: any): void;
49715
49715
  export function applyChanges(update: any): void;
49716
49716
  export function base64ToUint8Array(base642: any): Uint8Array<any>;
49717
- declare function getState2(documentID: any, vector: any): string;
49718
- declare function getStateVector2(documentID: any): string;
49717
+ declare function getState2(documentID: any, vector: any): any;
49718
+ declare function getStateVector2(documentID: any): any;
49719
49719
  export function registerDocument(id2: any, base64Data: any, undo: boolean | undefined, sendUpdateToBackend: any, sendUpdateToClient: any): void;
49720
- export function uint8ArrayToBase64(bytes: any): string;
49720
+ export function uint8ArrayToBase64(bytes: any): any;
49721
49721
  export function unregisterDocument(id2: any): void;
49722
49722
  declare var AbstractType: {
49723
49723
  };
@@ -6771,16 +6771,17 @@ var ServerXmlDocument = class {
6771
6771
  }
6772
6772
  };
6773
6773
  var import_base_64 = __toESM(require_base64());
6774
+ var import_base_642 = __toESM(require_base64());
6774
6775
  function uint8ArrayToBase64(bytes) {
6775
6776
  let binary = "";
6776
6777
  const chunkSize = 32768;
6777
6778
  for (let i = 0; i < bytes.length; i += chunkSize) {
6778
6779
  binary += String.fromCharCode(...bytes.subarray(i, i + chunkSize));
6779
6780
  }
6780
- return btoa(binary);
6781
+ return (0, import_base_642.encode)(binary);
6781
6782
  }
6782
6783
  function base64ToUint8Array(base642) {
6783
- const binary = atob(base642);
6784
+ const binary = (0, import_base_642.decode)(base642);
6784
6785
  const len = binary.length;
6785
6786
  const bytes = new Uint8Array(len);
6786
6787
  for (let i = 0; i < len; i++) {
@@ -49714,10 +49714,10 @@ export var ServerXmlDocument: {
49714
49714
  export function applyBackendChanges(documentID: any, base64Changes: any): void;
49715
49715
  export function applyChanges(update: any): void;
49716
49716
  export function base64ToUint8Array(base642: any): Uint8Array<any>;
49717
- declare function getState2(documentID: any, vector: any): string;
49718
- declare function getStateVector2(documentID: any): string;
49717
+ declare function getState2(documentID: any, vector: any): any;
49718
+ declare function getStateVector2(documentID: any): any;
49719
49719
  export function registerDocument(id2: any, base64Data: any, undo: boolean | undefined, sendUpdateToBackend: any, sendUpdateToClient: any): void;
49720
- export function uint8ArrayToBase64(bytes: any): string;
49720
+ export function uint8ArrayToBase64(bytes: any): any;
49721
49721
  export function unregisterDocument(id2: any): void;
49722
49722
  declare var AbstractType: {
49723
49723
  };
@@ -6783,16 +6783,17 @@ var ServerXmlDocument = class {
6783
6783
  };
6784
6784
  exports.ServerXmlDocument = ServerXmlDocument;
6785
6785
  var import_base_64 = __toESM(require_base64());
6786
+ var import_base_642 = __toESM(require_base64());
6786
6787
  function uint8ArrayToBase64(bytes) {
6787
6788
  let binary = "";
6788
6789
  const chunkSize = 32768;
6789
6790
  for (let i = 0; i < bytes.length; i += chunkSize) {
6790
6791
  binary += String.fromCharCode(...bytes.subarray(i, i + chunkSize));
6791
6792
  }
6792
- return btoa(binary);
6793
+ return (0, import_base_642.encode)(binary);
6793
6794
  }
6794
6795
  function base64ToUint8Array(base642) {
6795
- const binary = atob(base642);
6796
+ const binary = (0, import_base_642.decode)(base642);
6796
6797
  const len = binary.length;
6797
6798
  const bytes = new Uint8Array(len);
6798
6799
  for (let i = 0; i < len; i++) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meshagent/meshagent",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "description": "Meshagent Client",
5
5
  "homepage": "https://github.com/meshagent/meshagent-ts",
6
6
  "scripts": {