-
Notifications
You must be signed in to change notification settings - Fork 26
Particle lifecycle #21
Conversation
src/index.ts
Outdated
@@ -18,7 +18,7 @@ export { seedToPeerId, peerIdToSeed, generatePeerId } from './internal/peerIdUti | |||
export { FluenceClient } from './FluenceClient'; | |||
export { SecurityTetraplet, PeerIdB58 } from './internal/commonTypes'; | |||
export * from './api'; | |||
export { Particle } from './internal/particle'; | |||
export { RequestFlow as Particle } from './internal/particle'; |
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.
Is it intended?
e6826ab
to
4292c24
Compare
@@ -86,7 +71,7 @@ describe('Builtins usage suite', () => { | |||
|
|||
// FIXME:: there is no error on broken blueprint from a node | |||
it.skip('create_service', async function () { |
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.
fix and unskip this test
also add test with real service creation
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.
let's add the new test during a separate issue
}); | ||
}); | ||
|
||
it('Should work with overlapping function registration', () => { |
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.
let's add in API somewhere a comment, that last registered function wins
import log from 'loglevel'; | ||
import PeerId from 'peer-id'; | ||
import { PeerIdB58, SecurityTetraplet } from './internal/commonTypes'; | ||
import * as unstable from './api.unstable'; |
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.
maybe rename unstable
as new
? or some other positive term
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.
I think unstable
conveys the message better
src/internal/AquaHandler.ts
Outdated
@@ -0,0 +1,127 @@ | |||
import { CallServiceResult, ErrorCodes } from './commonTypes'; |
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.
docs on everything in this file
)`; | ||
}; | ||
|
||
export class RequestFlowBuilder { |
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.
docs
src/internal/RequestFlowBuilder.ts
Outdated
const msg = JSON.parse(args[0]); | ||
res.raiseError(msg); | ||
} catch (e) { | ||
log.warn("Error handling script didn't work", e); |
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.
if JSON.parse throws an error should we raise an error too?
No description provided.