Socket
Socket
Sign inDemoInstall

aspida

Package Overview
Dependencies
23
Maintainers
3
Versions
83
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.8.1 to 1.9.0

34

dist/createMethodsString.js

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

return ((_b = props.polymorph) === null || _b === void 0 ? void 0 : _b[index].reqBody)
? " body".concat(((_d = (_c = props.polymorph) === null || _c === void 0 ? void 0 : _c[index].reqBody) === null || _d === void 0 ? void 0 : _d.hasQuestion) ? '?' : '', ": ").concat(importName, "['").concat(name, "']['polymorph'][").concat(index, "]['reqBody'],")
? (function (opt) {
return " body".concat(opt ? '?' : '', ": ").concat(importName, "['").concat(name, "']['polymorph'][").concat(index, "]['reqBody']").concat(opt ? ' | undefined' : '', ",");
})((_d = (_c = props.polymorph) === null || _c === void 0 ? void 0 : _c[index].reqBody) === null || _d === void 0 ? void 0 : _d.hasQuestion)
: props.reqBody
? " body".concat(props.reqBody.hasQuestion ? '?' : '', ": ").concat(importName, "['").concat(name, "']['reqBody'],")
? (function (opt) {
return " body".concat(opt ? '?' : '', ": ").concat(importName, "['").concat(name, "']['reqBody']").concat(opt ? ' | undefined' : '', ",");
})(props.reqBody.hasQuestion)
: '';

@@ -57,5 +61,9 @@ };

return ((_b = props.polymorph) === null || _b === void 0 ? void 0 : _b[index].query)
? " query".concat(((_d = (_c = props.polymorph) === null || _c === void 0 ? void 0 : _c[index].query) === null || _d === void 0 ? void 0 : _d.hasQuestion) ? '?' : '', ": ").concat(importName, "['").concat(name, "']['polymorph'][").concat(index, "]['query'],")
? (function (opt) {
return " query".concat(opt ? '?' : '', ": ").concat(importName, "['").concat(name, "']['polymorph'][").concat(index, "]['query']").concat(opt ? ' | undefined' : '', ",");
})((_d = (_c = props.polymorph) === null || _c === void 0 ? void 0 : _c[index].query) === null || _d === void 0 ? void 0 : _d.hasQuestion)
: props.query
? " query".concat(props.query.hasQuestion ? '?' : '', ": ").concat(importName, "['").concat(name, "']['query'],")
? (function (opt) {
return " query".concat(opt ? '?' : '', ": ").concat(importName, "['").concat(name, "']['query']").concat(opt ? ' | undefined' : '', ",");
})(props.query.hasQuestion)
: '';

@@ -67,5 +75,9 @@ };

return ((_b = props.polymorph) === null || _b === void 0 ? void 0 : _b[index].reqHeaders)
? " headers".concat(((_d = (_c = props.polymorph) === null || _c === void 0 ? void 0 : _c[index].reqHeaders) === null || _d === void 0 ? void 0 : _d.hasQuestion) ? '?' : '', ": ").concat(importName, "['").concat(name, "']['polymorph'][").concat(index, "]['reqHeaders'],")
? (function (opt) {
return " headers".concat(opt ? '?' : '', ": ").concat(importName, "['").concat(name, "']['polymorph'][").concat(index, "]['reqHeaders']").concat(opt ? ' | undefined' : '', ",");
})((_d = (_c = props.polymorph) === null || _c === void 0 ? void 0 : _c[index].reqHeaders) === null || _d === void 0 ? void 0 : _d.hasQuestion)
: props.reqHeaders
? " headers".concat(props.reqHeaders.hasQuestion ? '?' : '', ": ").concat(importName, "['").concat(name, "']['reqHeaders'],")
? (function (opt) {
return " headers".concat(opt ? '?' : '', ": ").concat(importName, "['").concat(name, "']['reqHeaders']").concat(opt ? ' | undefined' : '', ",");
})(props.reqHeaders.hasQuestion)
: '';

@@ -84,3 +96,5 @@ };

((_g = poly.reqHeaders) === null || _g === void 0 ? void 0 : _g.hasQuestion) === false));
return "(option".concat(isOptionRequired ? '' : '?', ": {").concat(genReqBody(method, importName, index)).concat(genQuery(method, importName, index)).concat(genReqHeaders(method, importName, index), " config?: T })");
return (function (opt) {
return "(option".concat(opt ? '?' : '', ": {").concat(genReqBody(method, importName, index)).concat(genQuery(method, importName, index)).concat(genReqHeaders(method, importName, index), " config?: T | undefined }").concat(opt ? ' | undefined' : '', ")");
})(!isOptionRequired);
};

@@ -189,5 +203,7 @@ var genResBody = function (_a, importName) {

var name = _a.name;
return "{ method".concat(name === 'get' ? '?' : '', ": '").concat(name, "'; query: ").concat(importName, "['").concat(name, "']['query'] }");
return (function (opt) {
return "{ method".concat(opt ? '?' : '', ": '").concat(name, "'").concat(opt ? ' | undefined' : '', "; query: ").concat(importName, "['").concat(name, "']['query'] }");
})(name === 'get');
})
.join(' | '), ") =>\n").concat(indent, " `${prefix}${").concat(path.startsWith('`') ? path.slice(3, -2) : path, "}${option && option.query ? `?${dataToURLString(option.query)}` : ''}`")
.join(' | '), " | undefined) =>\n").concat(indent, " `${prefix}${").concat(path.startsWith('`') ? path.slice(3, -2) : path, "}${option && option.query ? `?${dataToURLString(option.query)}` : ''}`")
: "".concat(indent, " $path: () => `${prefix}${").concat(path.startsWith('`') ? path.slice(3, -2) : path, "}`"))

@@ -194,0 +210,0 @@ // eslint-disable-next-line no-template-curly-in-string

{
"name": "aspida",
"version": "1.8.1",
"version": "1.9.0",
"description": "TypeScript friendly HTTP client wrapper for the browser and node.js",

@@ -5,0 +5,0 @@ "author": "Solufa <solufa2020@gmail.com>",

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc