@aleleba/create-node-ts-graphql-server 1.6.2 → 1.6.4
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 +3 -3
- package/bin/cli.js +1 -1
- package/package.json +26 -26
- package/src/@types/custom.d.ts +5 -1
- package/src/index.ts +7 -8
package/README.md
CHANGED
|
@@ -4,9 +4,9 @@ This project aims to have a starter kit for creating a new Node with typescript,
|
|
|
4
4
|
|
|
5
5
|
Tech(Library or Framework) | Version |
|
|
6
6
|
--- | --- |
|
|
7
|
-
Jest (Testing) |
|
|
8
|
-
Typescript | 5.
|
|
9
|
-
GraphQL | 16.
|
|
7
|
+
Jest (Testing) | 30.2.0
|
|
8
|
+
Typescript | 5.9.3
|
|
9
|
+
GraphQL | 16.12.0
|
|
10
10
|
Type GraphQL | 2.0.0-rc.2
|
|
11
11
|
|
|
12
12
|
## Setup
|
package/bin/cli.js
CHANGED
|
@@ -67,7 +67,7 @@ if(!checkedOut) process.exit(-1);
|
|
|
67
67
|
|
|
68
68
|
const actualVersion = runCommandWithOutput(`cd ${repoName} && node -p "require('./package.json').version"`).toString().trim()
|
|
69
69
|
|
|
70
|
-
const installDepsCommand = `cd ${repoName} && npm i
|
|
70
|
+
const installDepsCommand = `cd ${repoName} && npm i`;
|
|
71
71
|
const cleanGitHistoryCommand = `cd ${repoName} && rm -rf .git && git init && git add --all -- ":!.github" ":!bin" && git commit -m "Initial commit"`
|
|
72
72
|
const cleanGitHistoryCommandWindows = `cd ${repoName} && rmdir .git /s /q && git init && git add --all -- ":!.github" ":!bin" && git commit -m "Initial commit"`
|
|
73
73
|
const deleteFoldersCommand = `cd ${repoName} && rm -rf .github && rm -rf bin`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aleleba/create-node-ts-graphql-server",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.4",
|
|
4
4
|
"description": "Node with Typescript and GraphQL Server",
|
|
5
5
|
"bin": "./bin/cli.js",
|
|
6
6
|
"main": "index.js",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"lint:fix": "eslint ./ --ext .js --ext .ts --fix",
|
|
14
14
|
"test": "jest",
|
|
15
15
|
"test:watch": "jest --watch",
|
|
16
|
-
"check-updates": "npx npm-check-updates -u && npm i
|
|
16
|
+
"check-updates": "npx npm-check-updates -u && npm i"
|
|
17
17
|
},
|
|
18
18
|
"repository": {
|
|
19
19
|
"type": "git",
|
|
@@ -33,58 +33,58 @@
|
|
|
33
33
|
},
|
|
34
34
|
"homepage": "https://github.com/aleleba/node-ts-graphql-server#readme",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@graphql-tools/schema": "^10.0.
|
|
37
|
-
"body-parser": "^2.2.
|
|
38
|
-
"class-validator": "^0.14.
|
|
36
|
+
"@graphql-tools/schema": "^10.0.31",
|
|
37
|
+
"body-parser": "^2.2.2",
|
|
38
|
+
"class-validator": "^0.14.3",
|
|
39
39
|
"cookie-parse": "^0.4.0",
|
|
40
40
|
"cookie-parser": "^1.4.7",
|
|
41
|
-
"cors": "^2.8.
|
|
41
|
+
"cors": "^2.8.6",
|
|
42
42
|
"dotenv": "^17.2.3",
|
|
43
|
-
"express": "^5.1
|
|
44
|
-
"graphql": "^16.
|
|
43
|
+
"express": "^5.2.1",
|
|
44
|
+
"graphql": "^16.12.0",
|
|
45
45
|
"graphql-http": "^1.22.4",
|
|
46
|
-
"graphql-playground-middleware-express": "^1.7.23",
|
|
47
46
|
"graphql-scalars": "^1.25.0",
|
|
47
|
+
"ruru": "^2.0.0-rc.4",
|
|
48
48
|
"graphql-subscriptions": "^3.0.0",
|
|
49
|
-
"graphql-tools": "^9.0.
|
|
49
|
+
"graphql-tools": "^9.0.26",
|
|
50
50
|
"graphql-ws": "^6.0.6",
|
|
51
51
|
"reflect-metadata": "^0.2.2",
|
|
52
52
|
"type-graphql": "^2.0.0-rc.2",
|
|
53
53
|
"web-push": "^3.6.7",
|
|
54
|
-
"ws": "^8.
|
|
54
|
+
"ws": "^8.19.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@babel/core": "^7.28.
|
|
58
|
-
"@babel/preset-env": "^7.28.
|
|
59
|
-
"@babel/preset-typescript": "^7.
|
|
60
|
-
"@babel/register": "^7.28.
|
|
57
|
+
"@babel/core": "^7.28.6",
|
|
58
|
+
"@babel/preset-env": "^7.28.6",
|
|
59
|
+
"@babel/preset-typescript": "^7.28.5",
|
|
60
|
+
"@babel/register": "^7.28.6",
|
|
61
61
|
"@types/body-parser": "^1.19.6",
|
|
62
|
-
"@types/cookie-parser": "^1.4.
|
|
62
|
+
"@types/cookie-parser": "^1.4.10",
|
|
63
63
|
"@types/cors": "^2.8.19",
|
|
64
|
-
"@types/express": "^5.0.
|
|
64
|
+
"@types/express": "^5.0.6",
|
|
65
65
|
"@types/jest": "^30.0.0",
|
|
66
|
-
"@types/node": "^
|
|
66
|
+
"@types/node": "^25.0.10",
|
|
67
67
|
"@types/supertest": "^6.0.3",
|
|
68
68
|
"@types/webpack": "^5.28.5",
|
|
69
69
|
"@types/webpack-node-externals": "^3.0.4",
|
|
70
70
|
"@types/ws": "^8.18.1",
|
|
71
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
72
|
-
"@typescript-eslint/parser": "^8.
|
|
71
|
+
"@typescript-eslint/eslint-plugin": "^8.53.1",
|
|
72
|
+
"@typescript-eslint/parser": "^8.53.1",
|
|
73
73
|
"babel-loader": "^10.0.0",
|
|
74
74
|
"clean-webpack-plugin": "^4.0.0",
|
|
75
75
|
"compression-webpack-plugin": "^11.1.0",
|
|
76
|
-
"eslint": "^9.
|
|
76
|
+
"eslint": "^9.39.2",
|
|
77
77
|
"eslint-webpack-plugin": "^5.0.2",
|
|
78
78
|
"jest": "^30.2.0",
|
|
79
|
-
"nodemon": "^3.1.
|
|
79
|
+
"nodemon": "^3.1.11",
|
|
80
80
|
"resolve-ts-aliases": "^1.0.1",
|
|
81
|
-
"supertest": "^7.
|
|
82
|
-
"ts-jest": "^29.4.
|
|
81
|
+
"supertest": "^7.2.2",
|
|
82
|
+
"ts-jest": "^29.4.6",
|
|
83
83
|
"ts-loader": "^9.5.4",
|
|
84
84
|
"typescript": "^5.9.3",
|
|
85
|
-
"webpack": "^5.
|
|
85
|
+
"webpack": "^5.104.1",
|
|
86
86
|
"webpack-cli": "^6.0.1",
|
|
87
|
-
"webpack-manifest-plugin": "^
|
|
87
|
+
"webpack-manifest-plugin": "^6.0.1",
|
|
88
88
|
"webpack-node-externals": "^3.0.0",
|
|
89
89
|
"webpack-shell-plugin-next": "^2.3.3"
|
|
90
90
|
}
|
package/src/@types/custom.d.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -8,7 +8,7 @@ import cookieParser from 'cookie-parser';
|
|
|
8
8
|
import { useServer } from 'graphql-ws/use/ws';
|
|
9
9
|
import { execute, subscribe } from 'graphql';
|
|
10
10
|
import GraphQLserver from '@GraphQL/server';// Server of GraphQL,
|
|
11
|
-
import
|
|
11
|
+
import { ruruHTML } from 'ruru/server';
|
|
12
12
|
import schema from '@GraphQL/schema';
|
|
13
13
|
import { config } from '@config';
|
|
14
14
|
import apiRouter from '@routes';
|
|
@@ -36,13 +36,12 @@ app
|
|
|
36
36
|
.use('/graphql', GraphQLserver);//Server of Graphql
|
|
37
37
|
|
|
38
38
|
if(config.PLAYGROUND_GRAPHQL === true){
|
|
39
|
-
app.get('/playground',
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}));
|
|
39
|
+
app.get('/playground', (_req, res) => {
|
|
40
|
+
res.type('html');
|
|
41
|
+
res.end(ruruHTML({
|
|
42
|
+
endpoint: '/graphql',
|
|
43
|
+
}));
|
|
44
|
+
});
|
|
46
45
|
}
|
|
47
46
|
|
|
48
47
|
// DO NOT DO app.listen() unless we're testing this directly
|