@nitro/app 7.1.0 → 7.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* }
|
|
23
23
|
*
|
|
24
24
|
*/
|
|
25
|
-
const
|
|
25
|
+
const clc = require('cli-color');
|
|
26
26
|
const fs = require('fs');
|
|
27
27
|
const globby = require('globby');
|
|
28
28
|
const Ajv = require('ajv');
|
|
@@ -72,12 +72,12 @@ globby.sync(patternGlobs, { onlyFiles: false }).forEach((patternPath) => {
|
|
|
72
72
|
|
|
73
73
|
if (!fs.existsSync(schemaFilePath)) {
|
|
74
74
|
if (logMissingSchemaAsError) {
|
|
75
|
-
console.log(`${
|
|
75
|
+
console.log(`${clc.red('Error')} (${patternPath}): no schema file found`);
|
|
76
76
|
errorCouter += 1;
|
|
77
77
|
return true;
|
|
78
78
|
}
|
|
79
79
|
if (logMissingSchemaAsWarning) {
|
|
80
|
-
console.log(`${
|
|
80
|
+
console.log(`${clc.yellow('Warn')} (${patternPath}): no schema file found`);
|
|
81
81
|
}
|
|
82
82
|
return true;
|
|
83
83
|
}
|
|
@@ -91,14 +91,14 @@ globby.sync(patternGlobs, { onlyFiles: false }).forEach((patternPath) => {
|
|
|
91
91
|
const valid = ajv.validate(schemaToUse, patternData);
|
|
92
92
|
if (!valid) {
|
|
93
93
|
errorCouter += 1;
|
|
94
|
-
console.log(`${
|
|
94
|
+
console.log(`${clc.red('Error')} (${patternDataFilePath}): ${ajv.errorsText()}`);
|
|
95
95
|
}
|
|
96
96
|
});
|
|
97
97
|
});
|
|
98
98
|
|
|
99
99
|
if (errorCouter <= 0) {
|
|
100
|
-
console.log(`${
|
|
100
|
+
console.log(`${clc.green('Success:')} all data from each of the ${patternCouter} patterns are valid!\n`);
|
|
101
101
|
} else {
|
|
102
|
-
console.log(`${
|
|
102
|
+
console.log(`${clc.red('Error:')} we detected ${errorCouter} errors in your data.\n`);
|
|
103
103
|
process.exitCode = 1;
|
|
104
104
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nitro/app",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.2",
|
|
4
4
|
"description": "Nitro server",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "merkle-open/generator-nitro",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"ajv": "8.11.0",
|
|
33
33
|
"body-parser": "1.20.1",
|
|
34
|
-
"
|
|
34
|
+
"cli-color": "2.0.3",
|
|
35
35
|
"compression": "1.7.4",
|
|
36
36
|
"cookie-session": "2.0.0",
|
|
37
37
|
"config": "3.3.8",
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
"globby": "11.1.0",
|
|
42
42
|
"hbs": "4.2.0",
|
|
43
43
|
"hbs-utils": "0.0.4",
|
|
44
|
-
"html-validate": "7.
|
|
45
|
-
"i18next": "22.0.
|
|
44
|
+
"html-validate": "7.7.1",
|
|
45
|
+
"i18next": "22.0.4",
|
|
46
46
|
"i18next-http-middleware": "3.2.1",
|
|
47
|
-
"i18next-fs-backend": "
|
|
47
|
+
"i18next-fs-backend": "2.0.0",
|
|
48
48
|
"i18next-sprintf-postprocessor": "0.2.2",
|
|
49
|
-
"jasmine": "4.
|
|
50
|
-
"jasmine-core": "4.
|
|
49
|
+
"jasmine": "4.5.0",
|
|
50
|
+
"jasmine-core": "4.5.0",
|
|
51
51
|
"lodash": "4.17.21",
|
|
52
52
|
"twig": "1.13.3",
|
|
53
53
|
"webpack": "4.46.0",
|