New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cf-bindings-proxy

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

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.7-0847c91

127

package.json
{
"name": "cf-bindings-proxy",
"version": "0.2.6",
"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": "rm -rf .wrangler; 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.20230710.1",
"@tsconfig/strictest": "^2.0.1",
"@types/node": "^20.3.3",
"eslint": "^8.41.0",
"eslint-config-ixn": "^1.4.2",
"kysely": "^0.26.1",
"kysely-d1": "^0.3.0",
"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.7-0847c91",
"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": "rm -rf .wrangler; 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.20230814.0",
"@tsconfig/strictest": "^2.0.1",
"@types/node": "^20.3.3",
"eslint": "^8.41.0",
"eslint-config-ixn": "^1.4.2",
"kysely": "^0.26.1",
"kysely-d1": "^0.3.0",
"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.5.1"
},
"peerDependencies": {
"@cloudflare/workers-types": ">=4",
"wrangler": ">=3.0.0"
},
"versionMetadata": {
"type": "BETA"
}
}

@@ -14,8 +14,8 @@ import { transformData as a } from "./transform.js";

}
const { success: n, data: e, transform: r } = await s.json();
const { success: n, data: t, transform: r } = await s.json();
if (!n)
throw new Error(e || "Bad response from binding proxy");
return r ? a(e, r) : e;
throw new Error(t || "Bad response from binding proxy");
return r ? a(t, r) : t;
}, _ = (i, s, n) => new Proxy(n, {
get(e, r) {
get(t, r) {
if (!n || ["then", Symbol.iterator, Symbol.toStringTag].includes(r))

@@ -27,18 +27,18 @@ return;

return n[Number(r)];
const t = o(i, !0);
return t.__original_call = s, async (...l) => (t.__calls.push({ prop: r, args: l }), c(t));
const e = o(i, !0);
return e.__original_call = s, async (...l) => (e.__calls.push({ prop: r, args: l }), c(e));
}
}), u = (i) => ["prepare"].includes(i) ? ["first", "run", "all", "raw"] : [], o = (i, s = !1) => new Proxy({ __bindingId: i, __calls: [], __chainUntil: [] }, {
get(n, e) {
if (e.startsWith("__"))
return n[e];
if (e !== "toJSON" && !s) {
if (n.__chainUntil.length || (n.__chainUntil = u(e)), n.__chainUntil.length && !n.__chainUntil.includes(e)) {
get(n, t) {
if (typeof t == "string" && t.startsWith("__"))
return n[t];
if (t !== "toJSON" && !s) {
if (n.__chainUntil.length || (n.__chainUntil = u(t)), n.__chainUntil.length && !n.__chainUntil.includes(t)) {
const r = o(i);
return r.__chainUntil = n.__chainUntil, r.__calls = n.__calls, (...t) => (n.__calls.push({ prop: e, args: t }), r);
return r.__chainUntil = n.__chainUntil, r.__calls = n.__calls, (...e) => (n.__calls.push({ prop: t, args: e }), r);
}
return async (...r) => {
n.__calls.push({ prop: e, args: r });
const t = await c(n);
return typeof t != "object" || !t ? t : _(i, n, t);
n.__calls.push({ prop: t, args: r });
const e = await c(n);
return typeof e != "object" || !e ? e : _(i, n, e);
};

@@ -45,0 +45,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