@shapediver/sdk.sdtf-v1
Advanced tools
Comparing version 1.4.2 to 1.5.0
@@ -59,4 +59,4 @@ "use strict"; | ||
getBuffer(uri, offset, length) { | ||
var _a; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
var _a; | ||
const cacheKey = this.calcCacheKey(uri); | ||
@@ -63,0 +63,0 @@ return (_a = this.loadFromCache(cacheKey, offset, length)) !== null && _a !== void 0 ? _a : yield this.acquireBuffer(uri, length, offset); |
@@ -68,4 +68,4 @@ "use strict"; | ||
fetch(url, offset, length) { | ||
var _a, _b; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
var _a, _b; | ||
let response; | ||
@@ -107,5 +107,9 @@ try { | ||
throw new sdk_sdtf_core_1.SdtfError("Invalid range requested."); | ||
if (response.status !== 206) | ||
if (response.status !== 200 && response.status !== 206) | ||
throw new sdk_sdtf_core_1.SdtfError(`Received HTTP status ${response.status}.`); | ||
return response.data; | ||
const data = response.data; | ||
const buffer = (data instanceof ArrayBuffer) ? data : Uint8Array.from(data).buffer; | ||
return (buffer.byteLength > length) ? | ||
buffer.slice(offset, offset + length) : | ||
buffer; | ||
}); | ||
@@ -112,0 +116,0 @@ } |
{ | ||
"name": "@shapediver/sdk.sdtf-v1", | ||
"version": "1.4.2", | ||
"version": "1.5.0", | ||
"description": "Official sdTF SDK for TypeScript", | ||
@@ -53,6 +53,6 @@ "keywords": [ | ||
"dependencies": { | ||
"@shapediver/sdk.sdtf-core": "~1.4.2", | ||
"@shapediver/sdk.sdtf-primitives": "~1.4.2", | ||
"@shapediver/sdk.sdtf-geometry": "~1.4.2", | ||
"axios": "~1.6.7", | ||
"@shapediver/sdk.sdtf-core": "~1.5.0", | ||
"@shapediver/sdk.sdtf-primitives": "~1.5.0", | ||
"@shapediver/sdk.sdtf-geometry": "~1.5.0", | ||
"axios": "~1.7.2", | ||
"browser-or-node": "2.1.1" | ||
@@ -64,7 +64,7 @@ }, | ||
"lerna": "~7.4.2", | ||
"typescript": "~5.3.3", | ||
"webpack": "~5.90.1", | ||
"typescript": "~5.4.5", | ||
"webpack": "~5.91.0", | ||
"webpack-cli": "~4.10.0", | ||
"webpack-dev-server": "~4.15.1" | ||
"webpack-dev-server": "~4.15.2" | ||
} | ||
} |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
335438
3313
+ Added@shapediver/sdk.sdtf-core@1.5.3(transitive)
+ Added@shapediver/sdk.sdtf-geometry@1.5.3(transitive)
+ Added@shapediver/sdk.sdtf-primitives@1.5.3(transitive)
+ Addedaxios@1.7.7(transitive)
- Removed@shapediver/sdk.sdtf-core@1.4.2(transitive)
- Removed@shapediver/sdk.sdtf-geometry@1.4.2(transitive)
- Removed@shapediver/sdk.sdtf-primitives@1.4.2(transitive)
- Removedaxios@1.6.8(transitive)
Updatedaxios@~1.7.2