PR-594489: Updating packages and changing playground.

This commit is contained in:
2026-01-24 02:43:48 +00:00
parent 4876077ae1
commit 3b5bbd2a9a
5 changed files with 5061 additions and 165 deletions

View File

@@ -67,7 +67,7 @@ if(!checkedOut) process.exit(-1);
const actualVersion = runCommandWithOutput(`cd ${repoName} && node -p "require('./package.json').version"`).toString().trim()
const installDepsCommand = `cd ${repoName} && npm i --legacy-peer-deps`;
const installDepsCommand = `cd ${repoName} && npm i`;
const cleanGitHistoryCommand = `cd ${repoName} && rm -rf .git && git init && git add --all -- ":!.github" ":!bin" && git commit -m "Initial commit"`
const cleanGitHistoryCommandWindows = `cd ${repoName} && rmdir .git /s /q && git init && git add --all -- ":!.github" ":!bin" && git commit -m "Initial commit"`
const deleteFoldersCommand = `cd ${repoName} && rm -rf .github && rm -rf bin`

5195
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "@aleleba/create-node-ts-graphql-server",
"version": "1.6.3",
"version": "1.6.4",
"description": "Node with Typescript and GraphQL Server",
"bin": "./bin/cli.js",
"main": "index.js",
@@ -13,7 +13,7 @@
"lint:fix": "eslint ./ --ext .js --ext .ts --fix",
"test": "jest",
"test:watch": "jest --watch",
"check-updates": "npx npm-check-updates -u && npm i --legacy-peer-deps"
"check-updates": "npx npm-check-updates -u && npm i"
},
"repository": {
"type": "git",
@@ -43,8 +43,8 @@
"express": "^5.2.1",
"graphql": "^16.12.0",
"graphql-http": "^1.22.4",
"graphql-playground-middleware-express": "^1.7.23",
"graphql-scalars": "^1.25.0",
"ruru": "^2.0.0-rc.4",
"graphql-subscriptions": "^3.0.0",
"graphql-tools": "^9.0.26",
"graphql-ws": "^6.0.6",

View File

@@ -12,3 +12,7 @@ declare module 'cookie-parse' {
declare module 'graphql-ws/use/ws' {
export * from 'graphql-ws/dist/use/ws';
}
declare module 'ruru/server' {
export * from 'ruru/dist/server';
}

View File

@@ -8,7 +8,7 @@ import cookieParser from 'cookie-parser';
import { useServer } from 'graphql-ws/use/ws';
import { execute, subscribe } from 'graphql';
import GraphQLserver from '@GraphQL/server';// Server of GraphQL,
import expressPlayground from 'graphql-playground-middleware-express';
import { ruruHTML } from 'ruru/server';
import schema from '@GraphQL/schema';
import { config } from '@config';
import apiRouter from '@routes';
@@ -36,13 +36,12 @@ app
.use('/graphql', GraphQLserver);//Server of Graphql
if(config.PLAYGROUND_GRAPHQL === true){
app.get('/playground', expressPlayground({
app.get('/playground', (_req, res) => {
res.type('html');
res.end(ruruHTML({
endpoint: '/graphql',
subscriptionEndpoint: '/graphql',
settings: {
'request.credentials': 'include', //Include Credentials for playground
},
}));
});
}
// DO NOT DO app.listen() unless we're testing this directly