feat: rest client worker for aries JS #1321
feat: rest client worker for aries JS #1321
Conversation
|
||
export function loadWorker(pending, notifications, paths) { | ||
const wasmJS = paths.wasmJS | ||
const wasm = paths.wasm |
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.
Not needed
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.
oops :) will remove it
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.
done
*/ | ||
|
||
export function loadWorker(pending, notifications, paths) { | ||
const wasmJS = paths.wasmJS |
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.
Not needed
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.
will remove it
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.
done
entry: path.join(PATHS.srcDir, "aries.js"), | ||
target: 'web', | ||
// enable below option during dev mode to get exact stacktrace during error | ||
devtool: 'inline-source-map', |
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.
You've left it enabled?
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.
will remove it.
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.
done
3fcd98c
to
147442b
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.
Commens
cmd/aries-js-worker/package.json
Outdated
@@ -37,12 +39,15 @@ | |||
"copy-webpack-plugin": "5.1.1", | |||
"file-loader": "5.0.2", | |||
"webpack": "4.41.5", | |||
"webpack-cli": "3.3.10", | |||
"webpack-cli": "^3.3.10", |
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.
Better leave it exact
cmd/aries-js-worker/package.json
Outdated
"webpack-merge": "4.2.2", | ||
"webpack-shell-plugin": "0.5.0" | ||
}, | ||
"engines": { | ||
"node": ">=12.14", | ||
"npm": ">=6.13" | ||
}, | ||
"dependencies": { | ||
"axios": "^0.19.2" |
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.
Better exact versions
@@ -7,8 +7,9 @@ | |||
"scripts": { | |||
"build:node": "webpack --config ./webpack.config.node.js --mode=production", | |||
"build:web": "webpack --config ./webpack.config.web.js --mode=production", |
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.
@llorllale @sudeshrshetty I wonder if web
and node
names should include that they are wasm. (followup).
@sudeshrshetty we should add support for WebSocket notifications (#471) and then connect to the WS endpoint for rest notifications. REST JS Wrapper notification support: |
- Switching JS source from `../dist/web` to `../dist/rest` will make aries js worker to run in rest agent client mode. - Web worker will be using agent rest client endpoints instead of aries wasm command handlers. - Except worker javascript, all the other functionalities and interfaces will remain same. - added switch (to REST/WASM worker) feature in presentation html for demonstration/testing. //TODO :Currently incoming topics/messages should be looked up in webhook URL of corresponding REST agent, javascript notifier listening to webhook URL will be added in future. Signed-off-by: sudesh.shetty <sudesh.shetty@securekey.com>
147442b
to
6bbc5a9
Compare
../dist/web
to../dist/rest
will makearies js worker to run in rest agent client mode.
aries wasm command handlers.
will remain same.
demonstration/testing.
//TODO :Currently incoming topics/messages should be looked up in
webhook URL of corresponding REST agent, javascript notifier listening
to webhook URL will be added in future.
Signed-off-by: sudesh.shetty sudesh.shetty@securekey.com