🚀 Socket Launch Week 🚀 Day 3: Socket Acquires Coana.Learn More →

@opendesign/api

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opendesign/api - npm Package Compare versions

Comparing version

to
0.2.0-rc.2

@@ -95,7 +95,12 @@ "use strict";

}, this._getAuthInfo(), Object.assign(Object.assign({ console: this._console }, options), { cancelToken }));
if (res.statusCode !== 200 && res.statusCode !== 202) {
const body = res.body;
const designSummaryOrProcessing = 'status' in body ? body : null;
if (!designSummaryOrProcessing ||
designSummaryOrProcessing['status'] === 'failed') {
this._console.error('OpenDesignApi#getDesignSummary()', { designId }, res);
throw new open_design_api_error_1.OpenDesignApiError(res, 'Cannot fetch design');
}
if (res.statusCode === 202) {
if (res.statusCode === 202 ||
designSummaryOrProcessing['status'] !== 'done' ||
!('artboards' in designSummaryOrProcessing)) {
yield sleep_1.sleep(1000);

@@ -105,3 +110,3 @@ cancelToken.throwIfCancelled();

}
return res.body;
return designSummaryOrProcessing;
});

@@ -108,0 +113,0 @@ }

@@ -8,3 +8,3 @@ "use strict";

const paramValue = pathParams[paramName];
return pathResult.replace(`{${paramName}}`, String(paramValue));
return pathResult.replace(`{${paramName}}`, encodeURIComponent(String(paramValue)));
}, pathPattern);

@@ -11,0 +11,0 @@ }

{
"name": "@opendesign/api",
"version": "0.2.0-rc.1",
"version": "0.2.0-rc.2",
"main": "dist",

@@ -11,3 +11,3 @@ "scripts": {

"devDependencies": {
"@opendesign/octopus-reader": "0.2.0-rc.1",
"@opendesign/octopus-reader": "0.2.0-rc.2",
"open-design-api-types": "0.3.4-rc.1",

@@ -14,0 +14,0 @@ "typescript": "4.1.2",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet