@aleleba/create-node-ts-graphql-server 1.5.14 → 1.5.16
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/.github/workflows/main-workflow.yml +1 -1
- package/README.md +3 -3
- package/bin/cli.js +1 -1
- package/config/index.ts +1 -1
- package/package.json +31 -31
- package/src/index.ts +10 -10
package/README.md
CHANGED
|
@@ -5,9 +5,9 @@ This project aims to have a starter kit for creating a new Node with typescript,
|
|
|
5
5
|
Tech(Library or Framework) | Version |
|
|
6
6
|
--- | --- |
|
|
7
7
|
Jest (Testing) | 29.7.0
|
|
8
|
-
Typescript | 5.
|
|
9
|
-
GraphQL | 16.
|
|
10
|
-
Type GraphQL | 2.0.0-beta.
|
|
8
|
+
Typescript | 5.5.4
|
|
9
|
+
GraphQL | 16.9.0
|
|
10
|
+
Type GraphQL | 2.0.0-beta.6
|
|
11
11
|
|
|
12
12
|
## Setup
|
|
13
13
|
To create a new project run in the terminal:
|
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 install`;
|
|
70
|
+
const installDepsCommand = `cd ${repoName} && npm install --legacy-peer-deps`;
|
|
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/config/index.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aleleba/create-node-ts-graphql-server",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.16",
|
|
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 --legacy-peer-deps"
|
|
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.
|
|
36
|
+
"@graphql-tools/schema": "^10.0.6",
|
|
37
37
|
"body-parser": "^1.20.2",
|
|
38
38
|
"class-validator": "^0.14.1",
|
|
39
39
|
"cookie-parse": "^0.4.0",
|
|
40
40
|
"cookie-parser": "^1.4.6",
|
|
41
41
|
"cors": "^2.8.5",
|
|
42
|
-
"dotenv": "^16.
|
|
43
|
-
"express": "^4.
|
|
44
|
-
"graphql": "^16.
|
|
45
|
-
"graphql-http": "^1.22.
|
|
42
|
+
"dotenv": "^16.4.5",
|
|
43
|
+
"express": "^4.19.2",
|
|
44
|
+
"graphql": "^16.9.0",
|
|
45
|
+
"graphql-http": "^1.22.1",
|
|
46
46
|
"graphql-playground-middleware-express": "^1.7.23",
|
|
47
47
|
"graphql-subscriptions": "^2.0.0",
|
|
48
|
-
"graphql-tools": "^9.0.
|
|
49
|
-
"graphql-ws": "^5.
|
|
50
|
-
"reflect-metadata": "^0.2.
|
|
51
|
-
"type-graphql": "^2.0.0-
|
|
48
|
+
"graphql-tools": "^9.0.1",
|
|
49
|
+
"graphql-ws": "^5.16.0",
|
|
50
|
+
"reflect-metadata": "^0.2.2",
|
|
51
|
+
"type-graphql": "^2.0.0-rc.2",
|
|
52
52
|
"web-push": "^3.6.7",
|
|
53
|
-
"ws": "^8.
|
|
53
|
+
"ws": "^8.18.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@babel/core": "^7.
|
|
57
|
-
"@babel/preset-env": "^7.
|
|
58
|
-
"@babel/preset-typescript": "^7.
|
|
59
|
-
"@babel/register": "^7.
|
|
56
|
+
"@babel/core": "^7.25.2",
|
|
57
|
+
"@babel/preset-env": "^7.25.4",
|
|
58
|
+
"@babel/preset-typescript": "^7.24.7",
|
|
59
|
+
"@babel/register": "^7.24.6",
|
|
60
60
|
"@types/body-parser": "^1.19.5",
|
|
61
|
-
"@types/cookie-parser": "^1.4.
|
|
61
|
+
"@types/cookie-parser": "^1.4.7",
|
|
62
62
|
"@types/cors": "^2.8.17",
|
|
63
63
|
"@types/express": "^4.17.21",
|
|
64
|
-
"@types/jest": "^29.5.
|
|
65
|
-
"@types/node": "^
|
|
64
|
+
"@types/jest": "^29.5.12",
|
|
65
|
+
"@types/node": "^22.5.1",
|
|
66
66
|
"@types/supertest": "^6.0.2",
|
|
67
67
|
"@types/webpack": "^5.28.5",
|
|
68
68
|
"@types/webpack-node-externals": "^3.0.4",
|
|
69
|
-
"@types/ws": "^8.5.
|
|
70
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
71
|
-
"@typescript-eslint/parser": "^
|
|
69
|
+
"@types/ws": "^8.5.12",
|
|
70
|
+
"@typescript-eslint/eslint-plugin": "^8.3.0",
|
|
71
|
+
"@typescript-eslint/parser": "^8.3.0",
|
|
72
72
|
"babel-loader": "^9.1.3",
|
|
73
73
|
"clean-webpack-plugin": "^4.0.0",
|
|
74
|
-
"compression-webpack-plugin": "^11.
|
|
75
|
-
"eslint": "^
|
|
76
|
-
"eslint-webpack-plugin": "^4.0
|
|
74
|
+
"compression-webpack-plugin": "^11.1.0",
|
|
75
|
+
"eslint": "^9.9.1",
|
|
76
|
+
"eslint-webpack-plugin": "^4.2.0",
|
|
77
77
|
"jest": "^29.7.0",
|
|
78
|
-
"nodemon": "^3.
|
|
78
|
+
"nodemon": "^3.1.4",
|
|
79
79
|
"resolve-ts-aliases": "^1.0.1",
|
|
80
|
-
"supertest": "^
|
|
81
|
-
"ts-jest": "^29.
|
|
80
|
+
"supertest": "^7.0.0",
|
|
81
|
+
"ts-jest": "^29.2.5",
|
|
82
82
|
"ts-loader": "^9.5.1",
|
|
83
|
-
"typescript": "^5.
|
|
84
|
-
"webpack": "^5.
|
|
83
|
+
"typescript": "^5.5.4",
|
|
84
|
+
"webpack": "^5.94.0",
|
|
85
85
|
"webpack-cli": "^5.1.4",
|
|
86
86
|
"webpack-manifest-plugin": "^5.0.0",
|
|
87
87
|
"webpack-node-externals": "^3.0.0",
|
|
88
|
-
"webpack-shell-plugin-next": "^2.3.
|
|
88
|
+
"webpack-shell-plugin-next": "^2.3.2"
|
|
89
89
|
}
|
|
90
90
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import 'reflect-metadata';
|
|
4
4
|
import ws from 'ws'; // yarn add ws
|
|
5
5
|
import express from 'express'; //express
|
|
6
6
|
import cors from 'cors';
|
|
@@ -35,15 +35,15 @@ app
|
|
|
35
35
|
.use(apiRouter)//Routes de App
|
|
36
36
|
.use('/graphql', GraphQLserver);//Server of Graphql
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
38
|
+
if(config.PLAYGROUND_GRAPHQL === true){
|
|
39
|
+
app.get('/playground', expressPlayground({
|
|
40
|
+
endpoint: '/graphql',
|
|
41
|
+
subscriptionEndpoint: '/graphql',
|
|
42
|
+
settings: {
|
|
43
|
+
'request.credentials': 'include', //Include Credentials for playground
|
|
44
|
+
},
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
47
47
|
|
|
48
48
|
// DO NOT DO app.listen() unless we're testing this directly
|
|
49
49
|
if (require.main === module) {
|