New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rest-client-sdk

Package Overview
Dependencies
Maintainers
3
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rest-client-sdk - npm Package Compare versions

Comparing version 2.0.0-rc.13 to 2.0.0-rc.14

3

CHANGELOG.md

@@ -5,2 +5,5 @@ # Changelog

## 2.0.0-rc.14
Check relations in `isValidMapping`
## 2.0.0-rc.13

@@ -7,0 +10,0 @@ Fix issue when setting a ManyToOne relatossue when setting a ManyToOne relation to `null`n to `null`

{
"name": "rest-client-sdk",
"version": "2.0.0-rc.13",
"version": "2.0.0-rc.14",
"description": "Rest Client SDK for API",

@@ -43,2 +43,3 @@ "main": "dist/index.js",

"lint-staged": "^6.0.0",
"pluralize": "^7.0.0",
"prettier": "^1.9.2",

@@ -51,2 +52,5 @@ "rimraf": "^2.6.2",

},
"optionalDependencies": {
"pluralize": "^7.0.0"
},
"repository": {

@@ -53,0 +57,0 @@ "type": "git",

@@ -55,12 +55,45 @@ const DEFAULT_CONFIG = {

// relation name seems weird
if (
relation.isManyToOne() &&
attribute.attributeName.endsWith('List')
) {
return `"${classMetadata.key}.${
attribute.serializedKey
} is defined as a MANY_TO_ONE relation, but the attribute name ends with "List".`;
}
if (relation.isOneToMany()) {
const message = `"${classMetadata.key}.${
attribute.serializedKey
} is defined as a ONE_TO_MANY relation, but the attribute name is nor plural not ends with "List".`;
const endsWithList = attribute.attributeName.endsWith('List');
try {
// eslint-disable-next-line global-require, import/no-extraneous-dependencies
const pluralize = require('pluralize');
if (
!endsWithList &&
!pluralize.isPlural(attribute.attributeName)
) {
return message;
}
} catch (e) {
if (!endsWithList) {
return message;
}
}
}
// no error if there is metadata linked
if (relationMetadata) {
return false;
if (!relationMetadata) {
return `"${classMetadata.key}.${
attribute.serializedKey
}" defined a relation to the metadata named "${
relation.targetMetadataKey
}" but this metadata is not knowned by the mapping`;
}
return `"${classMetadata.key}.${
attribute.serializedKey
}" defined a relation to the metadata named "${
relation.targetMetadataKey
}" but this metadata is not knowned by the mapping`;
return false;
}

@@ -67,0 +100,0 @@ );

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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