Skip to content

Commit 1a20c5e

Browse files
Alexander Karaulshchikovstefanogermano
authored andcommitted
Libraries update. Includes [email protected] crit update.
1 parent d619e14 commit 1a20c5e

File tree

4 files changed

+21
-24
lines changed

4 files changed

+21
-24
lines changed

app.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const resourcesPath = currentEnv == environment.prod ? path.dist : path.src
2727

2828
// System config loading
2929
var properties = require('./config/app-config.json');
30-
var loideUrl = properties.loide_url;
30+
var loideUrl = properties.loide_url;
3131
var httpPort = properties.port.http;
3232
var httpsPortP = properties.port.https;
3333
var key = properties.path.key;
@@ -38,7 +38,8 @@ var maxAge = properties.max_age;
3838
var servicesConfig = require('./config/services.json');
3939

4040
// This function validates the JSON schemas
41-
var Ajv = require('ajv');
41+
var Ajv = require('ajv');
42+
var formats = require('ajv-formats');
4243
validateJsonSchemas();
4344

4445
var pckg = require('./package.json');
@@ -185,11 +186,13 @@ function validateSchema(jsonPath, schemaPath) {
185186
var schema = require(schemaPath);
186187

187188
// Config
188-
var ajv = new Ajv({
189-
allErrors: true,
190-
jsonPointers: true
189+
var ajv = new Ajv.default({
190+
allErrors: true
191191
});
192192

193+
// Adding format support
194+
formats(ajv);
195+
193196
// Compiling the schema
194197
var compiledSchema = ajv.compile(schema);
195198
var validated = false;

config/app-config-schema.json

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
33
"$id": "app-config-schema.json",
4-
"self": {
5-
"vendor": "unical",
6-
"name": "app-config",
7-
"format": "jsonschema",
8-
"version": "1-0-0"
9-
},
4+
"title": "Configurations",
5+
"description": "LoIDE configurations",
106
"type": "object",
117
"properties": {
128
"loide_url": {
139
"title": "LoIDE URL",
1410
"description": "This is the URL where the application can be reached",
15-
"type": "string",
16-
"minimum": 0
11+
"type": "string"
1712
},
1813
"max_age": {
1914
"title": "HSTS max age",

config/services-schema.json

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
33
"$id": "services-schema.json",
4-
"self": {
5-
"vendor": "unical",
6-
"name": "services",
7-
"format": "jsonschema",
8-
"version": "1-0-0"
9-
},
4+
"title": "Services",
5+
"description": "Services tha LoIDE runs",
6+
"type": "object",
107
"properties": {
118
"languages": {
129
"title": "Supported languages.",
@@ -54,7 +51,8 @@
5451
"path": {
5552
"title": "Syntax-Highlighter path.",
5653
"description": "This property indicates the syntax-highlighter file path.",
57-
"type": "string"
54+
"type": "string",
55+
"format": "uri-reference"
5856
}
5957
},
6058
"required": [
@@ -181,7 +179,7 @@
181179
"title": "Executor path.",
182180
"description": "This property indicates the executor path relative to its URL.",
183181
"type": "string",
184-
"_comment": "Add the pattern to match with the 'path'."
182+
"format": "uri-reference"
185183
},
186184
"port": {
187185
"title": "Connection port number.",

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "loide",
3-
"version": "2.10.1",
3+
"version": "2.11.0",
44
"description": "Web-based IDE for Logic Programming",
55
"main": "app.js",
66
"scripts": {
@@ -44,12 +44,13 @@
4444
"url": "https://github.com/DeMaCS-UNICAL/LoIDE/issues"
4545
},
4646
"dependencies": {
47-
"ajv": "^6.12.4",
47+
"ajv": "^8.0.5",
48+
"ajv-formats": "^2.0.2",
4849
"express": "^4.17.1",
4950
"express-force-ssl": "^0.3.2",
5051
"helmet": "^3.21.1",
5152
"json-pointer": "^0.6.0",
52-
"pug": "^3.0.0",
53+
"pug": "^3.0.1",
5354
"socket.io": "^2.3.0",
5455
"websocket": "^1.0.32"
5556
},

0 commit comments

Comments
 (0)