@geodedb/client 1.0.0-alpha.20 → 1.0.0-alpha.21

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
@@ -1436,8 +1436,18 @@ var init_grpc_transport = __esm({
1436
1436
  const packageDefinition = await protoLoader.load(PROTO_PATH2, PROTO_LOADER_OPTIONS);
1437
1437
  const protoDescriptor = grpc.loadPackageDefinition(packageDefinition);
1438
1438
  let credentials2;
1439
- if (cfg.tls === false || cfg.insecureSkipVerify) {
1439
+ if (cfg.tls === false) {
1440
1440
  credentials2 = grpc.credentials.createInsecure();
1441
+ } else if (cfg.insecureSkipVerify) {
1442
+ let rootCerts = null;
1443
+ if (cfg.tlsCA) {
1444
+ rootCerts = await import('fs').then((fs4) => fs4.promises.readFile(cfg.tlsCA));
1445
+ } else if (cfg.tlsCACert) {
1446
+ rootCerts = Buffer.from(cfg.tlsCACert);
1447
+ }
1448
+ credentials2 = grpc.credentials.createSsl(rootCerts, null, null, {
1449
+ checkServerIdentity: () => void 0
1450
+ });
1441
1451
  } else {
1442
1452
  const sslOptions = await buildGrpcSslOptions(cfg);
1443
1453
  credentials2 = grpc.credentials.createSsl(
@@ -4496,8 +4506,8 @@ var Connection = class _Connection {
4496
4506
  const pullMsg = buildPullRequest(this._requestId, pageSize, this._sessionId);
4497
4507
  await this._transport.sendProto(pullMsg, signal);
4498
4508
  const pullResponse = await this._transport.receiveProto(signal);
4499
- if (pullResponse.execute) {
4500
- const pullExec = pullResponse.execute;
4509
+ const pullExec = pullResponse.pull?.response ?? pullResponse.execute;
4510
+ if (pullExec) {
4501
4511
  if (isErrorResponse(pullExec)) {
4502
4512
  this._state = this._inTransaction ? "in_transaction" : "idle";
4503
4513
  throw protoErrorToDriverError(pullExec, pullExec.status?.statusClass);
@@ -4592,10 +4602,10 @@ var Connection = class _Connection {
4592
4602
  const pullMsg = buildPullRequest(this._requestId, pageSize, this._sessionId);
4593
4603
  await this._transport.sendProto(pullMsg, signal);
4594
4604
  const response = await this._transport.receiveProto(signal);
4595
- if (!response.execute) {
4605
+ const execResp = response.pull?.response ?? response.execute;
4606
+ if (!execResp) {
4596
4607
  return { rows: [], final: true };
4597
4608
  }
4598
- const execResp = response.execute;
4599
4609
  if (isErrorResponse(execResp)) {
4600
4610
  throw protoErrorToDriverError(execResp, execResp.status?.statusClass);
4601
4611
  }