@milaboratories/pl-drivers 1.5.69 → 1.5.71

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.mjs CHANGED
@@ -832,7 +832,7 @@ class Ke extends Error {
832
832
  class an {
833
833
  constructor(e, t, n, o) {
834
834
  h(this, "grpcClient");
835
- this.grpcTransport = e, this.httpClient = t, this.logger = o, this.grpcClient = new sn(this.grpcTransport);
835
+ this.httpClient = t, this.logger = o, this.grpcClient = e.createGrpcClientProvider((r) => new sn(r));
836
836
  }
837
837
  close() {
838
838
  }
@@ -887,16 +887,16 @@ class an {
887
887
  return n;
888
888
  }
889
889
  async grpcInit(e, t, n) {
890
- return await this.grpcClient.init({ resourceId: e }, S(t, n)).response;
890
+ return await this.grpcClient.get().init({ resourceId: e }, S(t, n)).response;
891
891
  }
892
892
  async grpcGetPartUrl({ id: e, type: t }, n, o, r) {
893
- return await this.grpcClient.getPartURL(
893
+ return await this.grpcClient.get().getPartURL(
894
894
  { resourceId: e, partNumber: n, uploadedPartSize: o },
895
895
  S(t, r)
896
896
  ).response;
897
897
  }
898
898
  async grpcUpdateProgress({ id: e, type: t }, n, o) {
899
- await this.grpcClient.updateProgress(
899
+ await this.grpcClient.get().updateProgress(
900
900
  {
901
901
  resourceId: e,
902
902
  bytesProcessed: n
@@ -905,7 +905,7 @@ class an {
905
905
  ).response;
906
906
  }
907
907
  async grpcFinalize({ id: e, type: t }, n) {
908
- return await this.grpcClient.finalize({ resourceId: e }, S(t, n)).response;
908
+ return await this.grpcClient.get().finalize({ resourceId: e }, S(t, n)).response;
909
909
  }
910
910
  }
911
911
  async function ln(s, e, t) {
@@ -1516,13 +1516,13 @@ class Rn {
1516
1516
  class Un {
1517
1517
  constructor(e, t, n, o) {
1518
1518
  h(this, "grpcClient");
1519
- this.grpcTransport = e, this.client = n, this.logger = o, this.grpcClient = new Rn(this.grpcTransport);
1519
+ this.client = n, this.logger = o, this.grpcClient = e.createGrpcClientProvider((r) => new Rn(r));
1520
1520
  }
1521
1521
  close() {
1522
1522
  }
1523
1523
  /** getStatus gets a progress status by given rId and rType. */
1524
1524
  async getStatus({ id: e, type: t }, n) {
1525
- const o = await this.grpcClient.getStatus(
1525
+ const o = await this.grpcClient.get().getStatus(
1526
1526
  { resourceId: e },
1527
1527
  S(t, n)
1528
1528
  ), r = q(o.response.report);
@@ -1542,7 +1542,7 @@ class Un {
1542
1542
  nanos: a
1543
1543
  });
1544
1544
  try {
1545
- const { responses: c } = this.grpcClient.realtimeStatus(
1545
+ const { responses: c } = this.grpcClient.get().realtimeStatus(
1546
1546
  {
1547
1547
  resourceId: e,
1548
1548
  updateInterval: i
@@ -1884,7 +1884,7 @@ class On {
1884
1884
  h(this, "remoteFileDownloader");
1885
1885
  /** Helps to find a storage root directory by a storage id from URL scheme. */
1886
1886
  h(this, "localStorageIdsToRoot");
1887
- this.grpcTransport = e, this.httpClient = t, this.logger = n, this.grpcClient = new En(this.grpcTransport), this.remoteFileDownloader = new Xe(t), this.localStorageIdsToRoot = An(o);
1887
+ this.httpClient = t, this.logger = n, this.grpcClient = e.createGrpcClientProvider((r) => new En(r)), this.remoteFileDownloader = new Xe(t), this.localStorageIdsToRoot = An(o);
1888
1888
  }
1889
1889
  close() {
1890
1890
  }
@@ -1906,7 +1906,7 @@ class On {
1906
1906
  }
1907
1907
  async grpcGetDownloadUrl({ id: e, type: t }, n, o) {
1908
1908
  const r = n ?? {};
1909
- return r.abort = o, await this.grpcClient.getDownloadURL(
1909
+ return r.abort = o, await this.grpcClient.get().getDownloadURL(
1910
1910
  { resourceId: e },
1911
1911
  S(t, r)
1912
1912
  ).response;
@@ -2413,12 +2413,12 @@ class Qn {
2413
2413
  class Kn {
2414
2414
  constructor(e, t) {
2415
2415
  h(this, "grpcClient");
2416
- this.logger = t, this.grpcClient = new Qn(e);
2416
+ this.logger = t, this.grpcClient = e.createGrpcClientProvider((n) => new Qn(n));
2417
2417
  }
2418
2418
  close() {
2419
2419
  }
2420
2420
  async list(e, t, n) {
2421
- return await this.grpcClient.list(
2421
+ return await this.grpcClient.get().list(
2422
2422
  {
2423
2423
  resourceId: e.id,
2424
2424
  location: t
@@ -3147,7 +3147,7 @@ class ho {
3147
3147
  class uo {
3148
3148
  constructor(e, t, n) {
3149
3149
  h(this, "grpcClient");
3150
- this.grpcTransport = e, this.httpClient = t, this.logger = n, this.grpcClient = new ho(this.grpcTransport);
3150
+ this.httpClient = t, this.logger = n, this.grpcClient = e.createGrpcClientProvider((o) => new ho(o));
3151
3151
  }
3152
3152
  close() {
3153
3153
  }
@@ -3155,7 +3155,7 @@ class uo {
3155
3155
  * the new offset
3156
3156
  * and the total size of the (currently existing) file. */
3157
3157
  async lastLines({ id: e, type: t }, n, o = 0n, r, a) {
3158
- return (await this.grpcClient.lastLines(
3158
+ return (await this.grpcClient.get().lastLines(
3159
3159
  {
3160
3160
  resourceId: e,
3161
3161
  lineCount: n,
@@ -3169,7 +3169,7 @@ class uo {
3169
3169
  * the new offset
3170
3170
  * and the total size of the (currently existing) file. */
3171
3171
  async readText({ id: e, type: t }, n, o = 0n, r, a) {
3172
- return (await this.grpcClient.readText(
3172
+ return (await this.grpcClient.get().readText(
3173
3173
  {
3174
3174
  resourceId: q(e),
3175
3175
  readLimit: BigInt(n),