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

@cua.run/client

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cua.run/client - npm Package Compare versions

Comparing version 0.0.4-next.0 to 0.0.4

6

CHANGELOG.md
# @cua.run/client
## 0.0.4
### Patch Changes
- fetch
## 0.0.4-next.0

@@ -4,0 +10,0 @@

2

dist/cjs/constants.js
"use strict";
const DOMAIN = "";
const DOMAIN = "https://cua.run";
const PATH = "/push";
"use strict";
// import { fetch } from "@whatwg-node/fetch";
Object.defineProperty(exports, "__esModule", { value: true });
// let token: string;
const fetch_1 = require("@whatwg-node/fetch");
let token;
exports.default = {
init: ({}) => {
// token = apiToken;
init: ({ apiToken }) => {
token = apiToken;
},
push: (fn, args, _options) => {
console.log(`cua.push(${fn}, ${args})`);
// return fetch(`${DOMAIN}/${PATH}`, {
// method: "POST",
// body: JSON.stringify({
// fn,
// args,
// }),
// headers: {
// "Content-type": "application/json",
// Authorization: `Bearer ${token}`,
// },
// });
push: (fn, args, options) => {
const { apiToken = token } = options || {};
return (0, fetch_1.fetch)(`${DOMAIN}/${PATH}`, {
method: "POST",
body: JSON.stringify({
fn,
args,
}),
headers: {
"Content-type": "application/json",
Authorization: `Bearer ${apiToken}`,
},
});
},
};
"use strict";
const DOMAIN = "";
const DOMAIN = "https://cua.run";
const PATH = "/push";

@@ -1,21 +0,21 @@

// import { fetch } from "@whatwg-node/fetch";
// let token: string;
import { fetch } from "@whatwg-node/fetch";
let token;
export default {
init: ({}) => {
// token = apiToken;
init: ({ apiToken }) => {
token = apiToken;
},
push: (fn, args, _options) => {
console.log(`cua.push(${fn}, ${args})`);
// return fetch(`${DOMAIN}/${PATH}`, {
// method: "POST",
// body: JSON.stringify({
// fn,
// args,
// }),
// headers: {
// "Content-type": "application/json",
// Authorization: `Bearer ${token}`,
// },
// });
push: (fn, args, options) => {
const { apiToken = token } = options || {};
return fetch(`${DOMAIN}/${PATH}`, {
method: "POST",
body: JSON.stringify({
fn,
args,
}),
headers: {
"Content-type": "application/json",
Authorization: `Bearer ${apiToken}`,
},
});
},
};
{
"name": "@cua.run/client",
"version": "0.0.2",
"version": "0.0.4-next.0",
"description": "cua JavaScript client",

@@ -5,0 +5,0 @@ "dependencies": {

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

declare const DOMAIN = "";
declare const DOMAIN = "https://cua.run";
declare const PATH = "/push";

@@ -5,5 +5,5 @@ interface Options {

declare const _default: {
init: ({}: Options) => void;
push: (fn: string, args: Record<string, any>, _options: Options) => void;
init: ({ apiToken }: Options) => void;
push: (fn: string, args?: any[], options?: Options) => Promise<Response>;
};
export default _default;
{
"name": "@cua.run/client",
"version": "0.0.4-next.0",
"version": "0.0.4",
"description": "cua JavaScript client",

@@ -5,0 +5,0 @@ "main": "dist/cjs/index.js",

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

const DOMAIN = "";
const DOMAIN = "https://cua.run";
const PATH = "/push";

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

// import { fetch } from "@whatwg-node/fetch";
import { fetch } from "@whatwg-node/fetch";

@@ -7,22 +7,21 @@ interface Options {

// let token: string;
let token: string;
export default {
init: ({}: Options) => {
// token = apiToken;
init: ({ apiToken }: Options) => {
token = apiToken;
},
push: (fn: string, args: Record<string, any>, _options: Options) => {
console.log(`cua.push(${fn}, ${args})`);
// return fetch(`${DOMAIN}/${PATH}`, {
// method: "POST",
// body: JSON.stringify({
// fn,
// args,
// }),
// headers: {
// "Content-type": "application/json",
// Authorization: `Bearer ${token}`,
// },
// });
push: (fn: string, args?: any[], options?: Options) => {
const { apiToken = token } = options || {};
return fetch(`${DOMAIN}/${PATH}`, {
method: "POST",
body: JSON.stringify({
fn,
args,
}),
headers: {
"Content-type": "application/json",
Authorization: `Bearer ${apiToken}`,
},
});
},
};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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