-
Notifications
You must be signed in to change notification settings - Fork 26
Move non-relevant code from Marine repo into FluenceJS #227
Conversation
DXJ-135 Move relevant logic from MarineJS into FluenceJS
move as much logic as possible out of Marine repo into FJS (as a project of monorepo). I mean leaving only auto-generated code and the bare minimum interface to call to Marine directly. Also leaving only vital tests which check the Marine runtime code.
From practical POW it means
|
f0126fd
to
4ec2720
Compare
bd5c565
to
e1a1907
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please reply to comments and maybe add some changes
server = new WebpackDevServer(devServerOptions, compiler); | ||
await server.start(); | ||
// wait for webpack to load | ||
await new Promise((resolve) => setTimeout(resolve, 1000)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there must be a better way. It's just not cool. What happens if you don't do this? If there is some error maybe instead of timeout it's better to have an interval that is constantly checking if there is an error and when it dissapears - resolve the promise. But I hope there is some property or something that can help make sure it's loaded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
const res = await page.evaluate(async () => { | ||
// @ts-ignore | ||
return await window.MAIN(); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the equivalent is await page.eveluate(() => window.MAIN())
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
|
||
export const setLogLevel = (level: LogLevelDesc) => { | ||
log.setLevel(level); | ||
}; | ||
|
||
log.setDefaultLevel('WARN'); | ||
|
||
const defaultPeer = new FluencePeer(); | ||
let pkg: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please explain this package purpose in README. If it is temporary compatibility thing - I don't really understand how will it work with require in browser
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was a temporary compatibility thing. It didn't work though, so I've changed this logic a little bit
let server; | ||
const port = 8080; | ||
|
||
jest.setTimeout(10000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is that doing? I just don't know
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a lot of unfinished stuff, most of which is moved to separate tasks. Let's just move on from this 220 file PR and I hope it will all be solved in those separate tasks. Thanks!
Uh oh!
There was an error while loading. Please reload this page.