Socket
Socket
Sign inDemoInstall

@shapediver/sdk.geometry-api-sdk-core

Package Overview
Dependencies
Maintainers
5
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shapediver/sdk.geometry-api-sdk-core - npm Package Compare versions

Comparing version 1.0.9 to 1.0.10

3

dist/api/ShapeDiverSdkApi.d.ts

@@ -10,3 +10,4 @@ import { SdkConfigInternal } from "../config/ShapeDiverSdkConfig";

JSON = "json",
DATA = "arraybuffer"
DATA = "arraybuffer",
TEXT = "text"
}

@@ -13,0 +14,0 @@ export declare class ShapeDiverSdkApi {

@@ -30,2 +30,3 @@ "use strict";

ShapeDiverSdkApiResponseType["DATA"] = "arraybuffer";
ShapeDiverSdkApiResponseType["TEXT"] = "text";
})(ShapeDiverSdkApiResponseType = exports.ShapeDiverSdkApiResponseType || (exports.ShapeDiverSdkApiResponseType = {}));

@@ -56,3 +57,3 @@ class ShapeDiverSdkApi {

// Set data and convert depending on content-type
if (options.contentType === "application/json") {
if (options.contentType === "application/json" && data) {
request.data = JSON.stringify(data);

@@ -66,3 +67,6 @@ }

buildUrl(uri) {
if (uri.startsWith("http")) {
if (typeof uri !== "string") {
throw new ShapeDiverErrors_1.ShapeDiverError("No URL or URI was specified");
}
else if (uri.startsWith("http")) {
return uri;

@@ -131,3 +135,10 @@ }

}
return JSON.parse(stringData);
try {
// This should work for the ShapeDiver backend
return JSON.parse(stringData);
}
catch (_) {
// This might be an XML when calling another system (e.g. S3)
return { message: stringData };
}
}

@@ -139,3 +150,3 @@ get(url, options = {

return __awaiter(this, void 0, void 0, function* () {
const config = this.buildRequestConfig(Method.GET, options, {});
const config = this.buildRequestConfig(Method.GET, options, undefined);
try {

@@ -142,0 +153,0 @@ const response = yield (0, axios_1.default)(this.buildUrl(url), config);

{
"name": "@shapediver/sdk.geometry-api-sdk-core",
"version": "1.0.9",
"version": "1.0.10",
"description": "Core-library for SDK-packages to communicate with the Geometry API",

@@ -38,3 +38,3 @@ "keywords": [],

"dependencies": {
"axios": "^0.25.0"
"axios": "^0.26.0"
},

@@ -41,0 +41,0 @@ "devDependencies": {

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