mirror of
https://github.com/fluencelabs/examples
synced 2025-04-25 02:32:16 +00:00
update aqua, versions
This commit is contained in:
parent
0eafaa67ec
commit
e8e033de75
6549
quickstart/1-browser-to-browser/package-lock.json
generated
6549
quickstart/1-browser-to-browser/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,7 @@
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@fluencelabs/fluence": "0.9.53",
|
||||
"@fluencelabs/fluence": "0.10.1",
|
||||
"@fluencelabs/fluence-network-environment": "1.0.10",
|
||||
"@testing-library/jest-dom": "^5.14.1",
|
||||
"@testing-library/react": "^11.2.7",
|
||||
@ -23,7 +23,7 @@
|
||||
"build": "react-scripts build",
|
||||
"test": "react-scripts test",
|
||||
"eject": "react-scripts eject",
|
||||
"compile-aqua": "aqua-cli -i ./aqua/ -o ./src/_aqua",
|
||||
"compile-aqua": "aqua -i ./aqua/ -o ./src/_aqua",
|
||||
"watch-aqua": "chokidar \"**/*.aqua\" -c \"npm run compile-aqua\""
|
||||
},
|
||||
"eslintConfig": {
|
||||
@ -45,8 +45,8 @@
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@fluencelabs/aqua-cli": "0.1.9-162",
|
||||
"@fluencelabs/aqua-lib": "0.1.9",
|
||||
"@fluencelabs/aqua": "0.2.2-221",
|
||||
"@fluencelabs/aqua-lib": "0.1.14",
|
||||
"chokidar-cli": "^2.1.0",
|
||||
"node-sass": "^6.0.1"
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
* This file is auto-generated. Do not edit manually: changes may be erased.
|
||||
* Generated by Aqua compiler: https://github.com/fluencelabs/aqua/.
|
||||
* If you find any bugs, please write an issue on GitHub: https://github.com/fluencelabs/aqua/issues
|
||||
* Aqua version: 0.1.9-162
|
||||
* Aqua version: 0.2.2-221
|
||||
*
|
||||
*/
|
||||
import { FluenceClient, PeerIdB58 } from '@fluencelabs/fluence';
|
||||
@ -11,6 +11,17 @@ import { RequestFlowBuilder } from '@fluencelabs/fluence/dist/api.unstable';
|
||||
import { RequestFlow } from '@fluencelabs/fluence/dist/internal/RequestFlow';
|
||||
|
||||
|
||||
// Services
|
||||
|
||||
//HelloPeer
|
||||
//defaultId = "HelloPeer"
|
||||
|
||||
//hello: (from: string) => string
|
||||
//END HelloPeer
|
||||
|
||||
|
||||
|
||||
// Functions
|
||||
|
||||
export async function sayHello(client: FluenceClient, targetPeerId: string, targetRelayPeerId: string, config?: {ttl?: number}): Promise<string> {
|
||||
let request: RequestFlow;
|
||||
@ -72,7 +83,7 @@ export async function sayHello(client: FluenceClient, targetPeerId: string, targ
|
||||
h.on('getDataSrv', 'targetPeerId', () => {return targetPeerId;});
|
||||
h.on('getDataSrv', 'targetRelayPeerId', () => {return targetRelayPeerId;});
|
||||
h.onEvent('callbackSrv', 'response', (args) => {
|
||||
const [res] = args;
|
||||
const [res] = args;
|
||||
resolve(res);
|
||||
});
|
||||
|
||||
@ -86,7 +97,7 @@ h.on('getDataSrv', 'targetRelayPeerId', () => {return targetRelayPeerId;});
|
||||
.handleTimeout(() => {
|
||||
reject('Request timed out for sayHello');
|
||||
})
|
||||
if(config?.ttl) {
|
||||
if(config && config.ttl) {
|
||||
r.withTTL(config.ttl)
|
||||
}
|
||||
request = r.build();
|
||||
@ -94,4 +105,4 @@ h.on('getDataSrv', 'targetRelayPeerId', () => {return targetRelayPeerId;});
|
||||
await client.initiateFlow(request!);
|
||||
return promise;
|
||||
}
|
||||
|
||||
|
||||
|
6543
quickstart/3-browser-to-service/package-lock.json
generated
6543
quickstart/3-browser-to-service/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,7 @@
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@fluencelabs/fluence": "0.9.53",
|
||||
"@fluencelabs/fluence": "0.10.1",
|
||||
"@fluencelabs/fluence-network-environment": "1.0.10",
|
||||
"@testing-library/jest-dom": "^5.14.1",
|
||||
"@testing-library/react": "^11.2.7",
|
||||
@ -23,7 +23,7 @@
|
||||
"build": "react-scripts build",
|
||||
"test": "react-scripts test",
|
||||
"eject": "react-scripts eject",
|
||||
"compile-aqua": "aqua-cli -i ./aqua/ -o ./src/_aqua",
|
||||
"compile-aqua": "aqua -i ./aqua/ -o ./src/_aqua",
|
||||
"watch-aqua": "chokidar \"**/*.aqua\" -c \"npm run compile-aqua\""
|
||||
},
|
||||
"eslintConfig": {
|
||||
@ -45,8 +45,8 @@
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@fluencelabs/aqua-cli": "0.1.9-162",
|
||||
"@fluencelabs/aqua-lib": "0.1.9",
|
||||
"@fluencelabs/aqua": "0.2.2-221",
|
||||
"@fluencelabs/aqua-lib": "0.1.14",
|
||||
"chokidar-cli": "^2.1.0",
|
||||
"node-sass": "^6.0.1"
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
* This file is auto-generated. Do not edit manually: changes may be erased.
|
||||
* Generated by Aqua compiler: https://github.com/fluencelabs/aqua/.
|
||||
* If you find any bugs, please write an issue on GitHub: https://github.com/fluencelabs/aqua/issues
|
||||
* Aqua version: 0.1.9-162
|
||||
* Aqua version: 0.2.2-221
|
||||
*
|
||||
*/
|
||||
import { FluenceClient, PeerIdB58 } from '@fluencelabs/fluence';
|
||||
@ -11,6 +11,26 @@ import { RequestFlowBuilder } from '@fluencelabs/fluence/dist/api.unstable';
|
||||
import { RequestFlow } from '@fluencelabs/fluence/dist/internal/RequestFlow';
|
||||
|
||||
|
||||
// Services
|
||||
|
||||
//HelloWorld
|
||||
//defaultId = undefined
|
||||
|
||||
//hello: (from: string) => {msg:string;reply:string}
|
||||
//END HelloWorld
|
||||
|
||||
|
||||
|
||||
|
||||
//HelloPeer
|
||||
//defaultId = "HelloPeer"
|
||||
|
||||
//hello: (message: string) => string
|
||||
//END HelloPeer
|
||||
|
||||
|
||||
|
||||
// Functions
|
||||
|
||||
export async function sayHello(client: FluenceClient, targetPeerId: string, targetRelayPeerId: string, config?: {ttl?: number}): Promise<string> {
|
||||
let request: RequestFlow;
|
||||
@ -81,7 +101,7 @@ export async function sayHello(client: FluenceClient, targetPeerId: string, targ
|
||||
h.on('getDataSrv', 'targetPeerId', () => {return targetPeerId;});
|
||||
h.on('getDataSrv', 'targetRelayPeerId', () => {return targetRelayPeerId;});
|
||||
h.onEvent('callbackSrv', 'response', (args) => {
|
||||
const [res] = args;
|
||||
const [res] = args;
|
||||
resolve(res);
|
||||
});
|
||||
|
||||
@ -95,7 +115,7 @@ h.on('getDataSrv', 'targetRelayPeerId', () => {return targetRelayPeerId;});
|
||||
.handleTimeout(() => {
|
||||
reject('Request timed out for sayHello');
|
||||
})
|
||||
if(config?.ttl) {
|
||||
if(config && config.ttl) {
|
||||
r.withTTL(config.ttl)
|
||||
}
|
||||
request = r.build();
|
||||
@ -103,4 +123,4 @@ h.on('getDataSrv', 'targetRelayPeerId', () => {return targetRelayPeerId;});
|
||||
await client.initiateFlow(request!);
|
||||
return promise;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user