Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@xata.io/client

Package Overview
Dependencies
Maintainers
4
Versions
4351
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xata.io/client - npm Package Compare versions

Comparing version 0.0.0-alpha.2517c6d to 0.0.0-alpha.25d96f4

dist/util/errors.d.ts

23

dist/index.js

@@ -20,2 +20,3 @@ "use strict";

exports.XataError = exports.BaseClient = exports.RestRespositoryFactory = exports.RestRepository = exports.Repository = exports.Query = exports.includesAll = exports.includesPattern = exports.includesSubstring = exports.includes = exports.contains = exports.isNot = exports.is = exports.pattern = exports.endsWith = exports.startsWith = exports.notExists = exports.exists = exports.le = exports.lte = exports.lt = exports.gte = exports.ge = exports.gt = void 0;
const errors_1 = require("./util/errors");
const gt = (value) => ({ $gt: value });

@@ -169,21 +170,11 @@ exports.gt = gt;

this.client = client;
const { fetch } = client.options;
if (fetch) {
const doWeHaveFetch = typeof fetch !== 'undefined';
if (doWeHaveFetch) {
this.fetch = fetch;
}
else if (typeof window === 'object') {
this.fetch = window.fetch;
else if (this.client.options.fetch) {
this.fetch = this.client.options.fetch;
}
else if (typeof require === 'function') {
try {
this.fetch = require('node-fetch');
}
catch (err) {
try {
this.fetch = require('cross-fetch');
}
catch (err) {
throw new Error('No fetch implementation found. Please provide one in the constructor');
}
}
else {
throw errors_1.errors.noFetchImplementation;
}

@@ -190,0 +181,0 @@ Object.defineProperty(this, 'client', { enumerable: false });

{
"name": "@xata.io/client",
"version": "0.0.0-alpha.2517c6d",
"version": "0.0.0-alpha.25d96f4",
"description": "Xata.io SDK for TypeScript and JavaScript",

@@ -23,3 +23,3 @@ "main": "./dist/index.js",

"homepage": "https://github.com/xataio/client-ts/blob/main/client/README.md",
"gitHead": "2517c6de33bb2a66c0f4dbaa3feb71ff199d7ad3"
"gitHead": "25d96f40990055346976a3ccdc76e494fbc0132f"
}

@@ -0,1 +1,3 @@

import { errors } from './util/errors';
export interface XataRecord {

@@ -283,18 +285,10 @@ id: string;

const { fetch } = client.options;
const doWeHaveFetch = typeof fetch !== 'undefined';
if (fetch) {
if (doWeHaveFetch) {
this.fetch = fetch;
} else if (typeof window === 'object') {
this.fetch = window.fetch;
} else if (typeof require === 'function') {
try {
this.fetch = require('node-fetch');
} catch (err) {
try {
this.fetch = require('cross-fetch');
} catch (err) {
throw new Error('No fetch implementation found. Please provide one in the constructor');
}
}
} else if (this.client.options.fetch) {
this.fetch = this.client.options.fetch;
} else {
throw errors.noFetchImplementation;
}

@@ -301,0 +295,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc