@anthonylzq/simba.js 2.0.2 → 2.0.6
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/README.md
CHANGED
|
@@ -138,8 +138,6 @@ Regardless of the option chosen, a new folder will be generated with the name of
|
|
|
138
138
|
┃ ┃ ┗ 📜index.ts
|
|
139
139
|
┃ ┣ 📜index.ts
|
|
140
140
|
┃ ┗ 📜user.ts
|
|
141
|
-
┣ 📂test
|
|
142
|
-
┃ ┗ 📜test.http
|
|
143
141
|
┣ 📂utils
|
|
144
142
|
┃ ┣ 📜docs.json
|
|
145
143
|
┃ ┗ 📜index.ts
|
|
@@ -155,6 +153,7 @@ Regardless of the option chosen, a new folder will be generated with the name of
|
|
|
155
153
|
📜nodemon.json
|
|
156
154
|
📜package.json
|
|
157
155
|
📜README.md
|
|
156
|
+
📜index.http
|
|
158
157
|
📜tsconfig.base.json
|
|
159
158
|
📜tsconfig.json
|
|
160
159
|
📜webpack.config.js
|
|
@@ -6,71 +6,71 @@ const writeFile = require('../utils/writeFile')
|
|
|
6
6
|
*/
|
|
7
7
|
module.exports = async projectName => {
|
|
8
8
|
const data = {
|
|
9
|
-
eslintContent: `
|
|
10
|
-
env: {
|
|
11
|
-
node: true
|
|
9
|
+
eslintContent: `{
|
|
10
|
+
"env": {
|
|
11
|
+
"node": true
|
|
12
12
|
},
|
|
13
|
-
root: true,
|
|
14
|
-
parser:
|
|
15
|
-
plugins: [
|
|
16
|
-
extends: [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
"root": true,
|
|
14
|
+
"parser": "@typescript-eslint/parser",
|
|
15
|
+
"plugins": ["@typescript-eslint", "import", "prettier"],
|
|
16
|
+
"extends": [
|
|
17
|
+
"standard",
|
|
18
|
+
"eslint:recommended",
|
|
19
|
+
"plugin:@typescript-eslint/eslint-recommended",
|
|
20
|
+
"plugin:@typescript-eslint/recommended",
|
|
21
|
+
"prettier"
|
|
22
22
|
],
|
|
23
|
-
rules: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
"rules": {
|
|
24
|
+
"@typescript-eslint/no-var-requires": "off",
|
|
25
|
+
"@typescript-eslint/no-empty-interface": "off",
|
|
26
|
+
"arrow-parens": ["error", "as-needed"],
|
|
27
|
+
"import/extensions": [
|
|
28
28
|
2,
|
|
29
29
|
{
|
|
30
|
-
ts:
|
|
31
|
-
js:
|
|
32
|
-
json:
|
|
30
|
+
"ts": "never",
|
|
31
|
+
"js": "always",
|
|
32
|
+
"json": "always"
|
|
33
33
|
}
|
|
34
34
|
],
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
"import/no-extraneous-dependencies": [
|
|
36
|
+
"error",
|
|
37
37
|
{
|
|
38
|
-
devDependencies: [
|
|
39
|
-
optionalDependencies: [
|
|
40
|
-
peerDependencies: [
|
|
38
|
+
"devDependencies": ["**/*.test.js", "webpack.config.js"],
|
|
39
|
+
"optionalDependencies": ["**/*.test.js"],
|
|
40
|
+
"peerDependencies": ["**/*.test.js"]
|
|
41
41
|
}
|
|
42
42
|
],
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
"max-len": [
|
|
44
|
+
"error",
|
|
45
45
|
{
|
|
46
|
-
code: 80,
|
|
47
|
-
ignoreComments: true,
|
|
48
|
-
ignoreRegExpLiterals: true,
|
|
49
|
-
ignoreTemplateLiterals: true,
|
|
50
|
-
ignoreTrailingComments: true,
|
|
51
|
-
ignoreStrings: true,
|
|
52
|
-
ignoreUrls: true
|
|
46
|
+
"code": 80,
|
|
47
|
+
"ignoreComments": true,
|
|
48
|
+
"ignoreRegExpLiterals": true,
|
|
49
|
+
"ignoreTemplateLiterals": true,
|
|
50
|
+
"ignoreTrailingComments": true,
|
|
51
|
+
"ignoreStrings": true,
|
|
52
|
+
"ignoreUrls": true
|
|
53
53
|
}
|
|
54
54
|
],
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
"newline-before-return": "error",
|
|
56
|
+
"object-curly-spacing": ["error", "always"],
|
|
57
57
|
"object-shorthand": ["error", "always"],
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
"prefer-const": "error",
|
|
59
|
+
"prettier/prettier": [
|
|
60
|
+
"error",
|
|
61
61
|
{
|
|
62
|
-
arrowParens:
|
|
63
|
-
bracketSpacing: true,
|
|
64
|
-
printWidth: 80,
|
|
65
|
-
quoteProps:
|
|
66
|
-
semi: false,
|
|
67
|
-
singleQuote: true,
|
|
68
|
-
tabWidth: 2,
|
|
69
|
-
trailingComma:
|
|
62
|
+
"arrowParens": "avoid",
|
|
63
|
+
"bracketSpacing": true,
|
|
64
|
+
"printWidth": 80,
|
|
65
|
+
"quoteProps": "as-needed",
|
|
66
|
+
"semi": false,
|
|
67
|
+
"singleQuote": true,
|
|
68
|
+
"tabWidth": 2,
|
|
69
|
+
"trailingComma": "none"
|
|
70
70
|
}
|
|
71
71
|
],
|
|
72
|
-
radix: [
|
|
73
|
-
|
|
72
|
+
"radix": ["error", "as-needed"],
|
|
73
|
+
"spaced-comment": ["error", "always"]
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
`,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const os = require('os')
|
|
1
2
|
const util = require('util')
|
|
2
3
|
const exec = util.promisify(require('child_process').exec)
|
|
3
4
|
const writeFile = require('../utils/writeFile')
|
|
@@ -40,13 +41,12 @@ const writeFile = require('../utils/writeFile')
|
|
|
40
41
|
* | | |- index: content, file
|
|
41
42
|
* | |- user: content, file
|
|
42
43
|
* | |- index: content, file
|
|
43
|
-
* |- test:
|
|
44
|
-
* | |- index.http: content, file
|
|
45
44
|
* |- utils:
|
|
46
45
|
* | |- docs.json: content, file
|
|
47
46
|
* | |- index: content, file
|
|
48
47
|
* |- .env: content, file
|
|
49
48
|
* |- index: content, file
|
|
49
|
+
* index.http: content, file
|
|
50
50
|
*/
|
|
51
51
|
|
|
52
52
|
/**
|
|
@@ -777,7 +777,7 @@ Content-Type: application/json
|
|
|
777
777
|
### Testing delete user
|
|
778
778
|
DELETE http://localhost:1996/api/user/60e7e3b93b01c1a7aa74cd6b
|
|
779
779
|
`,
|
|
780
|
-
file: `${projectName}/
|
|
780
|
+
file: `${projectName}/index.http`
|
|
781
781
|
}
|
|
782
782
|
},
|
|
783
783
|
utils: {
|
|
@@ -1219,7 +1219,7 @@ Server.start()
|
|
|
1219
1219
|
}
|
|
1220
1220
|
}
|
|
1221
1221
|
|
|
1222
|
-
|
|
1222
|
+
const createFoldersCommands = `mkdir ${projectName}/src \
|
|
1223
1223
|
${projectName}/src/@types \
|
|
1224
1224
|
${projectName}/src/@types/dto \
|
|
1225
1225
|
${projectName}/src/@types/custom \
|
|
@@ -1234,9 +1234,12 @@ ${projectName}/src/database/mongo/queries \
|
|
|
1234
1234
|
${projectName}/src/network \
|
|
1235
1235
|
${projectName}/src/network/routes \
|
|
1236
1236
|
${projectName}/src/network/routes/schemas \
|
|
1237
|
-
${projectName}/src/test \
|
|
1238
1237
|
${projectName}/src/utils
|
|
1239
|
-
`
|
|
1238
|
+
`
|
|
1239
|
+
|
|
1240
|
+
if (os.platform() === 'win32')
|
|
1241
|
+
await exec(createFoldersCommands.replaceAll('/', '\\'))
|
|
1242
|
+
else await exec(createFoldersCommands)
|
|
1240
1243
|
|
|
1241
1244
|
// /@types
|
|
1242
1245
|
await writeFile(data['@types'].index.file, data['@types'].index.content)
|
package/lib/src/installation.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anthonylzq/simba.js",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "set up a modern backend app by running one command",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"directories": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"colors": "^1.4.0",
|
|
35
35
|
"readline-sync": "^1.4.10",
|
|
36
36
|
"underscore": "^1.13.2",
|
|
37
|
-
"yargs": "^17.3.
|
|
37
|
+
"yargs": "^17.3.1"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"eslint": "^8.5.0",
|