Socket
Socket
Sign inDemoInstall

@shapediver/sdk.sdtf-v1

Package Overview
Dependencies
13
Maintainers
5
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.3 to 1.2.0

13

dist/validation/SdtfComponentValidator.js

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

.forEach((attribute) => {
// Validate required properties
if (!(0, sdk_sdtf_core_1.isUint)(attribute.typeHint))
throw new sdk_sdtf_core_1.SdtfError("Invalid attribute: Required property 'typeHint' must be an unsigned integer.");
// Validate optional properties
if (attribute.accessor && !(0, sdk_sdtf_core_1.isUint)(attribute.accessor)) {
if (attribute.accessor && !(0, sdk_sdtf_core_1.isUint)(attribute.accessor))
throw new sdk_sdtf_core_1.SdtfError("Invalid attribute: Optional property 'accessor' must be an unsigned integer.");
}
if (attribute.typeHint && !(0, sdk_sdtf_core_1.isUint)(attribute.typeHint))
throw new sdk_sdtf_core_1.SdtfError("Invalid attribute: Optional property 'typeHint' must be an unsigned integer.");
// Validate component references

@@ -75,2 +75,5 @@ if (attribute.accessor && attribute.accessor >= this.componentList.accessors.length)

validateDataItem(dataItem) {
// Validate required properties
if (!(0, sdk_sdtf_core_1.isUint)(dataItem.typeHint))
throw new sdk_sdtf_core_1.SdtfError("Invalid item: Required property 'typeHint' must be an unsigned integer.");
// Validate optional properties

@@ -81,4 +84,2 @@ if (dataItem.accessor && !(0, sdk_sdtf_core_1.isUint)(dataItem.accessor))

throw new sdk_sdtf_core_1.SdtfError("Invalid item: Optional property 'attributes' must be an unsigned integer.");
if (dataItem.typeHint && !(0, sdk_sdtf_core_1.isUint)(dataItem.typeHint))
throw new sdk_sdtf_core_1.SdtfError("Invalid item: Optional property 'typeHint' must be an unsigned integer.");
// Validate component references

@@ -85,0 +86,0 @@ if (dataItem.accessor && dataItem.accessor >= this.componentList.accessors.length)

{
"name": "@shapediver/sdk.sdtf-v1",
"version": "1.1.3",
"version": "1.2.0",
"description": "Official sdTF SDK for TypeScript",

@@ -51,5 +51,5 @@ "keywords": [

"dependencies": {
"@shapediver/sdk.sdtf-core": "^1.1.3",
"@shapediver/sdk.sdtf-primitives": "^1.1.3",
"@shapediver/sdk.sdtf-geometry": "^1.1.3",
"@shapediver/sdk.sdtf-core": "^1.2.0",
"@shapediver/sdk.sdtf-primitives": "^1.2.0",
"@shapediver/sdk.sdtf-geometry": "^1.2.0",
"axios": "0.27.2",

@@ -56,0 +56,0 @@ "browser-or-node": "^2.0.0"

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc