You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP

cf-bindings-proxy

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cf-bindings-proxy - npm Package Compare versions

Comparing version

to
0.2.2-406efa5

@@ -1,7 +0,12 @@

import { createBindingProxy as r } from "./proxy.js";
import { createBindingProxy as n } from "./proxy.js";
import "./transform.js";
const s = (e) => process.env.ENABLE_BINDINGS_PROXY || !process.env.DISABLE_BINDINGS_PROXY && process.env.NODE_ENV === "development" ? r(e) : process.env[e];
const p = (e) => process.env.ENABLE_BINDINGS_PROXY || !process.env.DISABLE_BINDINGS_PROXY && process.env.NODE_ENV === "development" ? new Proxy(
{},
{
get: (o, r) => n(e)[r]
}
) : process.env[e];
export {
s as binding
p as binding
};
//# sourceMappingURL=index.js.map
{
"name": "cf-bindings-proxy",
"version": "0.2.1",
"description": "Experimental proxy for interfacing with bindings in projects targeting Cloudflare Pages",
"license": "MIT",
"author": "James",
"type": "module",
"bin": "./cli/index.js",
"exports": {
".": {
"import": "./index.js",
"require": "./index.cjs"
}
},
"publishConfig": {
"directory": "dist"
},
"repository": {
"type": "git",
"url": "https://github.com/james-elicx/cf-bindings-proxy"
},
"bugs": {
"url": "https://github.com/james-elicx/cf-bindings-proxy/issues"
},
"homepage": "https://github.com/james-elicx/cf-bindings-proxy#readme",
"scripts": {
"dev": "node ./cli/index.js",
"build": "vite build && node ./scripts/build.js",
"build:watch": "npm run build --watch",
"lint": "eslint \"./**/*.{cjs,js,jsx,ts,tsx}\"",
"prettier": "prettier --ignore-unknown --ignore-path=.gitignore --check .",
"prettier:format": "prettier --ignore-unknown --ignore-path=.gitignore --write .",
"tsc": "tsc --noEmit",
"test": "vitest run",
"test:kill": "sudo kill -9 `sudo lsof -i :8799 -t`",
"test:watch": "vitest",
"test:coverage": "vitest run --coverage",
"alter-version": "node ./scripts/alter-version.js",
"release": "changeset publish"
},
"devDependencies": {
"@changesets/cli": "^2.26.2",
"@cloudflare/workers-types": "^4",
"@tsconfig/strictest": "^2.0.1",
"@types/node": "^20.3.3",
"eslint": "^8.41.0",
"eslint-config-ixn": "^1.4.2",
"nodemon": "^2.0.22",
"prettier": "^2.8.8",
"typescript": "^5.0.4",
"vite": "^4.3.5",
"vite-plugin-dts": "^2.3.0",
"vite-plugin-externalize-deps": "^0.6.0",
"vitest": "^0.31.0",
"vitest-environment-miniflare": "^2.14.0",
"wrangler": "^3.0.0"
},
"peerDependencies": {
"@cloudflare/workers-types": ">=4",
"wrangler": ">=3.0.0"
}
"name": "cf-bindings-proxy",
"version": "0.2.2-406efa5",
"description": "Experimental proxy for interfacing with bindings in projects targeting Cloudflare Pages",
"license": "MIT",
"author": "James",
"type": "module",
"bin": "./cli/index.js",
"exports": {
".": {
"import": "./index.js",
"require": "./index.cjs"
}
},
"publishConfig": {
"directory": "dist"
},
"repository": {
"type": "git",
"url": "https://github.com/james-elicx/cf-bindings-proxy"
},
"bugs": {
"url": "https://github.com/james-elicx/cf-bindings-proxy/issues"
},
"homepage": "https://github.com/james-elicx/cf-bindings-proxy#readme",
"scripts": {
"dev": "node ./cli/index.js",
"build": "vite build && node ./scripts/build.js",
"build:watch": "npm run build --watch",
"lint": "eslint \"./**/*.{cjs,js,jsx,ts,tsx}\"",
"prettier": "prettier --ignore-unknown --ignore-path=.gitignore --check .",
"prettier:format": "prettier --ignore-unknown --ignore-path=.gitignore --write .",
"tsc": "tsc --noEmit",
"test": "vitest run",
"test:kill": "sudo kill -9 `sudo lsof -i :8799 -t`",
"test:watch": "vitest",
"test:coverage": "vitest run --coverage",
"alter-version": "node ./scripts/alter-version.js",
"release": "changeset publish"
},
"devDependencies": {
"@changesets/cli": "^2.26.2",
"@cloudflare/workers-types": "^4",
"@tsconfig/strictest": "^2.0.1",
"@types/node": "^20.3.3",
"eslint": "^8.41.0",
"eslint-config-ixn": "^1.4.2",
"nodemon": "^2.0.22",
"prettier": "^2.8.8",
"typescript": "^5.0.4",
"vite": "^4.3.5",
"vite-plugin-dts": "^2.3.0",
"vite-plugin-externalize-deps": "^0.6.0",
"vitest": "^0.31.0",
"vitest-environment-miniflare": "^2.14.0",
"wrangler": "^3.0.0"
},
"peerDependencies": {
"@cloudflare/workers-types": ">=4",
"wrangler": ">=3.0.0"
},
"versionMetadata": {
"type": "BETA"
}
}

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

import { transformData as _ } from "./transform.js";
import { transformData as a } from "./transform.js";
const c = async (e) => {

@@ -16,4 +16,4 @@ let s;

throw new Error(t || "Bad response from binding proxy");
return r ? _(t, r) : t;
}, a = (e, s, n) => new Proxy(n, {
return r ? a(t, r) : t;
}, _ = (e, s, n) => new Proxy(n, {
get(t, r) {

@@ -32,3 +32,3 @@ if (!n || ["then", Symbol.iterator, Symbol.toStringTag].includes(r))

if (t !== "toJSON" && !s) {
if (n.__chainUntil.length || (n.__chainUntil = u(t), n.__calls = []), n.__chainUntil.length && !n.__chainUntil.includes(t)) {
if (n.__chainUntil.length || (n.__chainUntil = u(t)), n.__chainUntil.length && !n.__chainUntil.includes(t)) {
const r = o(e);

@@ -40,3 +40,3 @@ return r.__chainUntil = n.__chainUntil, r.__calls = n.__calls, (...i) => (n.__calls.push({ prop: t, args: i }), r);

const i = await c(n);
return typeof i != "object" || !i ? i : a(e, n, i);
return typeof i != "object" || !i ? i : _(e, n, i);
};

@@ -43,0 +43,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet