Skip to content

Commit

Permalink
fix:Lint Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mac authored and mac committed Nov 22, 2024
1 parent ac28744 commit d29f753
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/commands/api-mesh/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class RunCommand extends Command {
}

//Generating unique mesh id
meshId = 'testMesh'
meshId = 'testMesh';

await validateMesh(data.meshConfig);
await buildMesh(meshId, data.meshConfig);
Expand Down
7 changes: 3 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export default {

async runServer(meshPath){
async runServer(meshPath) {
const meshArtifacts = await import(meshPath);
const { getBuiltMesh } = meshArtifacts;

Check failure on line 4 in src/index.js

View workflow job for this annotation

GitHub Actions / build

'getBuiltMesh' is assigned a value but never used

Expand All @@ -10,6 +9,6 @@ export default {
// TODO: Access mesh artifact and run yogaServer
async fetch(request, env, ctx) {

Check failure on line 10 in src/index.js

View workflow job for this annotation

GitHub Actions / build

'ctx' is defined but never used
await this.runServer(env.meshPath);
return new Response("Hello World!");
return new Response('Hello World!');
},
};
};
10 changes: 5 additions & 5 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,26 +93,26 @@ const getYogaServer = async () => {
meshConfig = readMeshConfig(meshId);

const serverPath = `${__dirname}/index.js`;

const command = `./node_modules/.bin/wrangler dev ${serverPath} --port 8788 --inspector-port 9788 --var meshPath:${meshArtifactsPath}`;
const server = exec(command);

server.stdout.on('data', data => {
console.log(data);

Check warning on line 101 in src/server.js

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
});

server.stderr.on('data', data => {
console.error(data);

Check warning on line 105 in src/server.js

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
});

server.on('close', code => {
console.log(`Server closed with code ${code}`);

Check warning on line 109 in src/server.js

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
});

server.on('exit', code => {
console.log(`Server exited with code ${code}`);

Check warning on line 113 in src/server.js

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
});

server.on('error', err => {
console.error(`Server exited with error ${err}`);

Check warning on line 117 in src/server.js

View workflow job for this annotation

GitHub Actions / build

Unexpected console statement
});
Expand Down

0 comments on commit d29f753

Please sign in to comment.