gscan 4.25.1 → 4.25.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.
- package/app/index.js +1 -1
- package/app/middlewares/upload-validation.js +1 -1
- package/lib/checker.js +2 -2
- package/lib/read-zip.js +1 -1
- package/package.json +2 -2
package/app/index.js
CHANGED
|
@@ -4,7 +4,7 @@ const hbs = require('express-hbs');
|
|
|
4
4
|
const multer = require('multer');
|
|
5
5
|
const server = require('@tryghost/server');
|
|
6
6
|
const config = require('@tryghost/config');
|
|
7
|
-
const errors = require('@tryghost/
|
|
7
|
+
const errors = require('@tryghost/errors');
|
|
8
8
|
const gscan = require('../lib');
|
|
9
9
|
const fs = require('fs-extra');
|
|
10
10
|
const logRequest = require('./middlewares/log-request');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// NOTE: this middleware was extracted from Ghost core validation for theme uploads
|
|
2
2
|
// might be useful to unify this logic in the future if it's extracted to separate module
|
|
3
3
|
const path = require('path');
|
|
4
|
-
const errors = require('@tryghost/
|
|
4
|
+
const errors = require('@tryghost/errors');
|
|
5
5
|
|
|
6
6
|
const checkFileExists = function checkFileExists(fileData) {
|
|
7
7
|
return !!(fileData.mimetype && fileData.path);
|
package/lib/checker.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const Promise = require('bluebird');
|
|
2
2
|
const _ = require('lodash');
|
|
3
3
|
const requireDir = require('require-dir');
|
|
4
|
-
const errors = require('@tryghost/
|
|
4
|
+
const errors = require('@tryghost/errors');
|
|
5
5
|
const versions = require('./utils').versions;
|
|
6
6
|
|
|
7
7
|
// An object containing helpers as keys and their labs flag as values
|
|
@@ -92,7 +92,7 @@ const checkZip = async function checkZip(path, options) {
|
|
|
92
92
|
return theme;
|
|
93
93
|
}
|
|
94
94
|
} catch (error) {
|
|
95
|
-
if (!errors.utils.
|
|
95
|
+
if (!errors.utils.isGhostError(error)) {
|
|
96
96
|
throw new errors.ValidationError({
|
|
97
97
|
message: 'Failed to check zip file',
|
|
98
98
|
help: 'Your zip file might be corrupted, try unzipping and zipping again.',
|
package/lib/read-zip.js
CHANGED
|
@@ -4,7 +4,7 @@ const Promise = require('bluebird');
|
|
|
4
4
|
const os = require('os');
|
|
5
5
|
const glob = require('glob');
|
|
6
6
|
const {extract} = require('@tryghost/zip');
|
|
7
|
-
const errors = require('@tryghost/
|
|
7
|
+
const errors = require('@tryghost/errors');
|
|
8
8
|
const uuid = require('uuid');
|
|
9
9
|
const _ = require('lodash');
|
|
10
10
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gscan",
|
|
3
|
-
"version": "4.25.
|
|
3
|
+
"version": "4.25.2",
|
|
4
4
|
"description": "Scans Ghost themes looking for errors, deprecations, features and compatibility",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ghost",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@sentry/node": "6.19.2",
|
|
44
44
|
"@tryghost/config": "0.2.2",
|
|
45
45
|
"@tryghost/debug": "0.1.11",
|
|
46
|
-
"@tryghost/
|
|
46
|
+
"@tryghost/errors": "1.2.6",
|
|
47
47
|
"@tryghost/logging": "2.1.0",
|
|
48
48
|
"@tryghost/pretty-cli": "1.2.24",
|
|
49
49
|
"@tryghost/server": "0.1.4",
|