mirror of
https://github.com/fluencelabs/aqua.git
synced 2024-12-04 14:40:17 +00:00
feat(js-client)!: Move to new js-client interface (#855)
* js-client.api -> js.client * fix types * Update js-client * Remove redundant connect * Set latest js-client
This commit is contained in:
parent
2a0b207633
commit
0f9ede09fb
3
.github/workflows/tests.yml
vendored
3
.github/workflows/tests.yml
vendored
@ -102,8 +102,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
dependencies: |
|
dependencies: |
|
||||||
{
|
{
|
||||||
"@fluencelabs/js-client.node": "${{ fromJson(inputs.js-client-snapshots)['js-client.node'] }}",
|
"@fluencelabs/js-client": "${{ fromJson(inputs.js-client-snapshots)['js-client'] }}"
|
||||||
"@fluencelabs/js-client.api": "${{ fromJson(inputs.js-client-snapshots)['js-client.api'] }}"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- run: pnpm install --no-frozen-lockfile
|
- run: pnpm install --no-frozen-lockfile
|
||||||
|
@ -21,13 +21,13 @@ object Header {
|
|||||||
val callParams =
|
val callParams =
|
||||||
if (isJs) ""
|
if (isJs) ""
|
||||||
else
|
else
|
||||||
"import type { IFluenceClient as IFluenceClient$$, CallParams as CallParams$$ } from '@fluencelabs/js-client.api';"
|
"import type { IFluenceClient as IFluenceClient$$, CallParams as CallParams$$ } from '@fluencelabs/js-client';"
|
||||||
|
|
||||||
s"""$callParams
|
s"""$callParams
|
||||||
|import {
|
|import {
|
||||||
| v5_callFunction as callFunction$$$$,
|
| v5_callFunction as callFunction$$$$,
|
||||||
| v5_registerService as registerService$$$$,
|
| v5_registerService as registerService$$$$,
|
||||||
|} from '@fluencelabs/js-client.api';
|
|} from '@fluencelabs/js-client';
|
||||||
""".stripMargin
|
""".stripMargin
|
||||||
}
|
}
|
||||||
|
|
||||||
|
25998
integration-tests/package-lock.json
generated
25998
integration-tests/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -41,8 +41,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fluencelabs/fluence-network-environment": "1.1.2",
|
"@fluencelabs/fluence-network-environment": "1.1.2",
|
||||||
"@fluencelabs/js-client.api": "0.12.1",
|
"@fluencelabs/js-client": "0.1.0",
|
||||||
"@fluencelabs/js-client.node": "0.7.1",
|
|
||||||
"deep-equal": "2.2.1",
|
"deep-equal": "2.2.1",
|
||||||
"loglevel": "1.8.1"
|
"loglevel": "1.8.1"
|
||||||
},
|
},
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { Fluence, IFluenceClient, createClient } from '@fluencelabs/js-client.api';
|
import { Fluence, IFluenceClient, createClient } from '@fluencelabs/js-client';
|
||||||
import '@fluencelabs/js-client.node';
|
|
||||||
import { getObjAssignCall, getObjCall, getObjRelayCall } from '../examples/objectCall.js';
|
import { getObjAssignCall, getObjCall, getObjRelayCall } from '../examples/objectCall.js';
|
||||||
import { callArrowCall, reproArgsBug426Call } from '../examples/callArrowCall.js';
|
import { callArrowCall, reproArgsBug426Call } from '../examples/callArrowCall.js';
|
||||||
import { dataAliasCall } from '../examples/dataAliasCall.js';
|
import { dataAliasCall } from '../examples/dataAliasCall.js';
|
||||||
@ -88,18 +87,17 @@ async function start() {
|
|||||||
Fluence.onConnectionStateChange((s) => {
|
Fluence.onConnectionStateChange((s) => {
|
||||||
console.log(s);
|
console.log(s);
|
||||||
});
|
});
|
||||||
await Fluence.connect(relay1);
|
await Fluence.connect(relay1, {});
|
||||||
const cl = await Fluence.getClient();
|
const cl = await Fluence.getClient();
|
||||||
peer1 = cl;
|
peer1 = cl;
|
||||||
selfPeerId = cl.getPeerId();
|
selfPeerId = cl.getPeerId();
|
||||||
console.log('CONNECTED');
|
console.log('CONNECTED');
|
||||||
|
|
||||||
peer2 = await createClient(relay2);
|
peer2 = await createClient(relay2, {});
|
||||||
console.log('CONNECTING TO SECOND:');
|
console.log('CONNECTING TO SECOND:');
|
||||||
peer2.onConnectionStateChange((s) => {
|
peer2.onConnectionStateChange((s) => {
|
||||||
console.log(s);
|
console.log(s);
|
||||||
});
|
});
|
||||||
await peer2.connect();
|
|
||||||
console.log('CONNECTED');
|
console.log('CONNECTED');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import {IFluenceClient} from '@fluencelabs/js-client.api';
|
import {IFluenceClient} from '@fluencelabs/js-client';
|
||||||
import {registerTest, onPropagate, nestedOnPropagate, seqOnPropagate} from "../compiled/examples/onErrorPropagation.js"
|
import {registerTest, onPropagate, nestedOnPropagate, seqOnPropagate} from "../compiled/examples/onErrorPropagation.js"
|
||||||
|
|
||||||
export async function onPropagateCall(peer2: IFluenceClient, relay2: string): Promise<number> {
|
export async function onPropagateCall(peer2: IFluenceClient, relay2: string): Promise<number> {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { IFluenceClient } from '@fluencelabs/js-client.api';
|
import { IFluenceClient } from '@fluencelabs/js-client';
|
||||||
import {
|
import {
|
||||||
topologyTest,
|
topologyTest,
|
||||||
registerTesto,
|
registerTesto,
|
||||||
|
1057
pnpm-lock.yaml
generated
1057
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user