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

@prisma/extension-accelerate

Package Overview
Dependencies
Maintainers
2
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prisma/extension-accelerate - npm Package Compare versions

Comparing version 0.0.0-experimental-c97eb6d to 0.0.0-experimental-ccb98ba

3

dist/cjs/entry.node.js

@@ -7,4 +7,5 @@ "use strict";

function withAccelerate() {
return (0, extension_js_1.makeAccelerateExtension)(node_fetch_js_1.fetch);
const fetch = "fetch" in globalThis ? globalThis.fetch : node_fetch_js_1.fetch;
return (0, extension_js_1.makeAccelerateExtension)(fetch);
}
exports.withAccelerate = withAccelerate;

@@ -7,5 +7,9 @@ "use strict";

};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
var _NodeHeaders_headers;
Object.defineProperty(exports, "__esModule", { value: true });
exports.fetch = void 0;
const node_https_1 = __importDefault(require("node:https"));
/**

@@ -23,6 +27,5 @@ * Imitates `fetch` via `https` to only suit our needs, it does nothing more.

const { origin } = new URL(url);
const https = await import("node:https");
return new Promise((resolve, reject) => {
// we execute the https request and build a fetch response out of it
const request = https.request(url, httpsOptions, (response) => {
const request = node_https_1.default.request(url, httpsOptions, (response) => {
const { statusCode = 200, headers: { location }, } = response;

@@ -29,0 +32,0 @@ if (statusCode >= 301 && statusCode <= 399 && location) {

import { makeAccelerateExtension } from "./extension.js";
import { fetch } from "./node-fetch.js";
import { fetch as nodeFetch } from "./node-fetch.js";
export function withAccelerate() {
const fetch = "fetch" in globalThis ? globalThis.fetch : nodeFetch;
return makeAccelerateExtension(fetch);
}

@@ -0,1 +1,2 @@

import https from "node:https";
/**

@@ -13,3 +14,2 @@ * Imitates `fetch` via `https` to only suit our needs, it does nothing more.

const { origin } = new URL(url);
const https = await import("node:https");
return new Promise((resolve, reject) => {

@@ -16,0 +16,0 @@ // we execute the https request and build a fetch response out of it

{
"name": "@prisma/extension-accelerate",
"type": "module",
"version": "0.0.0-experimental-c97eb6d",
"version": "0.0.0-experimental-ccb98ba",
"description": "Prisma Client extension for Accelerate",

@@ -12,2 +12,3 @@ "sideEffects": false,

},
"import": "./dist/esm/entry.fetch.js",
"require": "./dist/cjs/entry.fetch.js",

@@ -14,0 +15,0 @@ "default": "./dist/esm/entry.fetch.js"

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