fix spawn server

pull/5168/head
bunsenstraat 3 months ago committed by Aniket
parent 64bec7b787
commit 3abc8451c3
  1. 6
      apps/remix-ide-e2e/src/githttpbackend/package.json
  2. 0
      apps/remix-ide-e2e/src/githttpbackend/src/server.ts
  3. 25
      apps/remix-ide-e2e/src/githttpbackend/tsconfig.json
  4. 17
      apps/remix-ide-e2e/src/githttpbackend/yarn.lock
  5. 2
      apps/remix-ide-e2e/src/tests/dgit_local.test.ts

@ -1,6 +1,6 @@
{
"scripts": {
"start:server": "npx ts-node server.ts"
"start:server": "tsc && node ./dist/server.js"
},
"dependencies": {
"body-parser": "^1.20.2",
@ -9,5 +9,9 @@
"git-http-backend": "^1.1.2",
"path": "^0.12.7",
"zlib": "^1.0.5"
},
"devDependencies": {
"@types/node": "^22.5.4",
"typescript": "^5.6.2"
}
}

@ -0,0 +1,25 @@
{
"compilerOptions": {
"target": "ES6", // Set the ECMAScript target version
"module": "commonjs", // Specify module code generation
"strict": true,
"noImplicitAny": false, // Enable all strict type-checking options
"esModuleInterop": true, // Emit additional code to make commonJS and ES modules work together
"skipLibCheck": true, // Skip type checking of all declaration files (.d.ts)
"forceConsistentCasingInFileNames": true, // Ensure file names are treated with case sensitivity
"outDir": "./dist", // Redirect output structure to the 'dist' directory
"rootDir": "./src", // Specify the root directory of input files
"sourceMap": true, // Create source map files
"types": [
"node"
], // Add node types
"moduleResolution": "node", // Ensure TypeScript resolves modules like Node.js
},
"include": [
"src/**/*" // Include all TypeScript files in the src directory
],
"exclude": [
"node_modules", // Exclude the node_modules folder
"**/*.test.ts" // Exclude test files
]
}

@ -2,6 +2,13 @@
# yarn lockfile v1
"@types/node@^22.5.4":
version "22.5.4"
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.5.4.tgz#83f7d1f65bc2ed223bdbf57c7884f1d5a4fa84e8"
integrity sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg==
dependencies:
undici-types "~6.19.2"
accepts@~1.3.8:
version "1.3.8"
resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e"
@ -483,6 +490,16 @@ type-is@~1.6.18:
media-typer "0.3.0"
mime-types "~2.1.24"
typescript@^5.6.2:
version "5.6.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.2.tgz#d1de67b6bef77c41823f822df8f0b3bcff60a5a0"
integrity sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==
undici-types@~6.19.2:
version "6.19.8"
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02"
integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==
unpipe@1.0.0, unpipe@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"

@ -606,7 +606,7 @@ async function createCommitOnLocalServer(path: string, message: string) {
async function spawnGitServer(path: string): Promise<ChildProcess> {
console.log(process.cwd())
try {
const server = spawn('yarn && sh setup.sh && npx ts-node server.ts', [`${path}`], { cwd: process.cwd() + '/apps/remix-ide-e2e/src/githttpbackend/', shell: true, detached: true })
const server = spawn('yarn && sh setup.sh && yarn start:server', [`${path}`], { cwd: process.cwd() + '/apps/remix-ide-e2e/src/githttpbackend/', shell: true, detached: true })
console.log('spawned', server.stdout.closed, server.stderr.closed)
return new Promise((resolve, reject) => {
server.stdout.on('data', function (data) {

Loading…
Cancel
Save