@strapi/generators 4.2.0-alpha.0 → 4.2.0-alpha.1
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const validateAttributeInput = require('../utils/validate-attribute-input');
|
|
4
4
|
|
|
5
5
|
const DEFAULT_TYPES = [
|
|
6
6
|
// advanced types
|
|
@@ -50,7 +50,7 @@ module.exports = async inquirer => {
|
|
|
50
50
|
type: 'input',
|
|
51
51
|
name: 'attributeName',
|
|
52
52
|
message: 'Name of attribute',
|
|
53
|
-
validate: input =>
|
|
53
|
+
validate: input => validateAttributeInput(input),
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
type: 'list',
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
module.exports = input => {
|
|
3
|
+
module.exports = (input) => {
|
|
4
4
|
const regex = /^[A-Za-z-]+$/g;
|
|
5
5
|
|
|
6
6
|
if (!input) {
|
|
7
|
-
return
|
|
7
|
+
return "You must provide an input";
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
return regex.test(input) || "Please use only letters, '-' and no spaces";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/generators",
|
|
3
|
-
"version": "4.2.0-alpha.
|
|
3
|
+
"version": "4.2.0-alpha.1",
|
|
4
4
|
"description": "Interactive API generator.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"strapi",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"main": "lib/index.js",
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@sindresorhus/slugify": "1.1.0",
|
|
33
|
-
"@strapi/utils": "4.2.0-alpha.
|
|
33
|
+
"@strapi/utils": "4.2.0-alpha.1",
|
|
34
34
|
"chalk": "4.1.2",
|
|
35
35
|
"fs-extra": "10.0.0",
|
|
36
36
|
"node-plop": "0.26.3",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"node": ">=12.22.0 <=16.x.x",
|
|
42
42
|
"npm": ">=6.0.0"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "3a3567a85026c7685bbd826eed690044f602d876"
|
|
45
45
|
}
|