@inter-digital/wasm-client-sdk 3.8.4-patch.4 → 3.8.4-patch.6

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.
Binary file
@@ -14,7 +14,7 @@
14
14
  if (!globalThis.fs) {
15
15
  let outputBuf = "";
16
16
  globalThis.fs = {
17
- constants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1 }, // unused
17
+ constants: { O_WRONLY: -1, O_RDWR: -1, O_CREAT: -1, O_TRUNC: -1, O_APPEND: -1, O_EXCL: -1, O_DIRECTORY: -1 }, // unused
18
18
  writeSync(fd, buf) {
19
19
  outputBuf += decoder.decode(buf);
20
20
  const nl = outputBuf.lastIndexOf("\n");
@@ -73,6 +73,14 @@
73
73
  }
74
74
  }
75
75
 
76
+ if (!globalThis.path) {
77
+ globalThis.path = {
78
+ resolve(...pathSegments) {
79
+ return pathSegments.join("/");
80
+ }
81
+ }
82
+ }
83
+
76
84
  if (!globalThis.crypto) {
77
85
  throw new Error("globalThis.crypto is not available, polyfill required (crypto.getRandomValues only)");
78
86
  }
@@ -208,10 +216,16 @@
208
216
  return decoder.decode(new DataView(this._inst.exports.mem.buffer, saddr, len));
209
217
  }
210
218
 
219
+ const testCallExport = (a, b) => {
220
+ this._inst.exports.testExport0();
221
+ return this._inst.exports.testExport(a, b);
222
+ }
223
+
211
224
  const timeOrigin = Date.now() - performance.now();
212
225
  this.importObject = {
213
226
  _gotest: {
214
227
  add: (a, b) => a + b,
228
+ callExport: testCallExport,
215
229
  },
216
230
  gojs: {
217
231
  // Go's SP does not change as long as no Go code is running. Some operations (e.g. calls, getters and setters)
package/lib/index.es.js CHANGED
@@ -1334,7 +1334,7 @@ class SDK extends Emitter {
1334
1334
  });
1335
1335
  };
1336
1336
  this.createQuoteMessage = (params, operationID = v4()) => {
1337
- return this._invoker('createQuoteMessage', window.createQuoteMessage, [operationID, params.text, params.message], data => {
1337
+ return this._invoker('createQuoteMessage', window.createQuoteMessage, [operationID, params.text, JSON.stringify(params.message)], data => {
1338
1338
  // compitable with old version sdk
1339
1339
  return data[0];
1340
1340
  });
package/lib/index.js CHANGED
@@ -1338,7 +1338,7 @@ class SDK extends Emitter {
1338
1338
  });
1339
1339
  };
1340
1340
  this.createQuoteMessage = (params, operationID = v4()) => {
1341
- return this._invoker('createQuoteMessage', window.createQuoteMessage, [operationID, params.text, params.message], data => {
1341
+ return this._invoker('createQuoteMessage', window.createQuoteMessage, [operationID, params.text, JSON.stringify(params.message)], data => {
1342
1342
  // compitable with old version sdk
1343
1343
  return data[0];
1344
1344
  });
package/lib/index.umd.js CHANGED
@@ -1340,7 +1340,7 @@
1340
1340
  });
1341
1341
  };
1342
1342
  this.createQuoteMessage = (params, operationID = v4()) => {
1343
- return this._invoker('createQuoteMessage', window.createQuoteMessage, [operationID, params.text, params.message], data => {
1343
+ return this._invoker('createQuoteMessage', window.createQuoteMessage, [operationID, params.text, JSON.stringify(params.message)], data => {
1344
1344
  // compitable with old version sdk
1345
1345
  return data[0];
1346
1346
  });