Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jhipster-core

Package Overview
Dependencies
Maintainers
3
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jhipster-core - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

18

lib/core/jhipster/field_types.js

@@ -24,3 +24,4 @@ 'use strict';

IMAGE_BLOB: 'ImageBlob',
TEXT_BLOB: 'TextBlob'
TEXT_BLOB: 'TextBlob',
INSTANT: 'Instant'
};

@@ -41,3 +42,4 @@ const SQL_VALIDATIONS = {

ImageBlob: new Set([VALIDATIONS.REQUIRED, VALIDATIONS.MINBYTES, VALIDATIONS.MAXBYTES]),
TextBlob: new Set([VALIDATIONS.REQUIRED, VALIDATIONS.MINBYTES, VALIDATIONS.MAXBYTES])
TextBlob: new Set([VALIDATIONS.REQUIRED, VALIDATIONS.MINBYTES, VALIDATIONS.MAXBYTES]),
Instant: new Set([VALIDATIONS.REQUIRED])
};

@@ -58,3 +60,4 @@ const MONGODB_TYPES = {

IMAGE_BLOB: 'ImageBlob',
TEXT_BLOB: 'TextBlob'
TEXT_BLOB: 'TextBlob',
INSTANT: 'Instant'
};

@@ -75,3 +78,4 @@ const MONGODB_VALIDATIONS = {

ImageBlob: new Set([VALIDATIONS.REQUIRED, VALIDATIONS.MINBYTES, VALIDATIONS.MAXBYTES]),
TextBlob: new Set([VALIDATIONS.REQUIRED, VALIDATIONS.MINBYTES, VALIDATIONS.MAXBYTES])
TextBlob: new Set([VALIDATIONS.REQUIRED, VALIDATIONS.MINBYTES, VALIDATIONS.MAXBYTES]),
Instant: new Set([VALIDATIONS.REQUIRED])
};

@@ -87,3 +91,4 @@ const CASSANDRA_TYPES = {

DATE: 'Date',
UUID: 'UUID'
UUID: 'UUID',
INSTANT: 'Instant'
};

@@ -99,3 +104,4 @@ const CASSANDRA_VALIDATIONS = {

Date: new Set([VALIDATIONS.REQUIRED]),
UUID: new Set([VALIDATIONS.REQUIRED])
UUID: new Set([VALIDATIONS.REQUIRED]),
Instant: new Set([VALIDATIONS.REQUIRED])
};

@@ -102,0 +108,0 @@ function isSQLType(type) {

@@ -14,2 +14,3 @@ 'use strict';

IllegalName: null,
IllegalOption: null,
InvalidObject: null,

@@ -16,0 +17,0 @@ MalformedAssociation: null,

@@ -14,2 +14,3 @@ 'use strict';

FieldTypes = require('../core/jhipster/field_types'),
DatabaseTypes = require('../core/jhipster/database_types'),
formatComment = require('../utils/format_utils').formatComment,

@@ -42,3 +43,3 @@ isReservedClassName = require('../core/jhipster/reserved_keywords').isReservedClassName,

fillAssociations();
fillOptions();
fillOptions(passedDatabaseType);
return jdlObject;

@@ -192,5 +193,5 @@ }

function fillOptions() {
function fillOptions(passedDatabaseType) {
fillUnaryOptions();
fillBinaryOptions();
fillBinaryOptions(passedDatabaseType);
}

@@ -237,5 +238,9 @@

function fillBinaryOptions() {
function fillBinaryOptions(passedDatabaseType) {
_.forEach(BinaryOptions.BINARY_OPTIONS, (optionValue) => {
_.forEach(document[optionValue], (documentOptionValue, documentOptionKey) => {
if (optionValue === BinaryOptions.BINARY_OPTIONS.PAGINATION
&& passedDatabaseType === DatabaseTypes.Types.cassandra) {
throw new buildException(exceptions.IllegalOption, "Pagination isn't allowed when the app uses Cassandra.");
}
addOption(optionValue, documentOptionKey);

@@ -242,0 +247,0 @@ });

{
"name": "jhipster-core",
"version": "1.3.0",
"version": "1.3.1",
"description": "JHipster's own domain language and core objects",

@@ -42,5 +42,5 @@ "main": "module/index.js",

"chai": "3.5.0",
"eslint": "3.18.0",
"eslint": "3.19.0",
"istanbul": "0.4.5",
"mocha": "3.2.0",
"mocha": "3.3.0",
"mocha-clean": "1.0.0",

@@ -47,0 +47,0 @@ "pegjs": "0.10.0"

@@ -568,4 +568,14 @@ 'use strict';

});
describe('when having a cassandra app with paginated entities', () => {
const input = parseFromFiles(['./test/test_files/cassandra_jdl.jdl']);
it('fails', () => {
try {
JDLParser.parse(input, 'cassandra');
} catch (error) {
expect(error.name).to.eq('IllegalOptionException');
}
});
});
});
});
});

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