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:
|
||||
dependencies: |
|
||||
{
|
||||
"@fluencelabs/js-client.node": "${{ fromJson(inputs.js-client-snapshots)['js-client.node'] }}",
|
||||
"@fluencelabs/js-client.api": "${{ fromJson(inputs.js-client-snapshots)['js-client.api'] }}"
|
||||
"@fluencelabs/js-client": "${{ fromJson(inputs.js-client-snapshots)['js-client'] }}"
|
||||
}
|
||||
|
||||
- run: pnpm install --no-frozen-lockfile
|
||||
|
@ -21,13 +21,13 @@ object Header {
|
||||
val callParams =
|
||||
if (isJs) ""
|
||||
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
|
||||
|import {
|
||||
| v5_callFunction as callFunction$$$$,
|
||||
| v5_registerService as registerService$$$$,
|
||||
|} from '@fluencelabs/js-client.api';
|
||||
|} from '@fluencelabs/js-client';
|
||||
""".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": {
|
||||
"@fluencelabs/fluence-network-environment": "1.1.2",
|
||||
"@fluencelabs/js-client.api": "0.12.1",
|
||||
"@fluencelabs/js-client.node": "0.7.1",
|
||||
"@fluencelabs/js-client": "0.1.0",
|
||||
"deep-equal": "2.2.1",
|
||||
"loglevel": "1.8.1"
|
||||
},
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { Fluence, IFluenceClient, createClient } from '@fluencelabs/js-client.api';
|
||||
import '@fluencelabs/js-client.node';
|
||||
import { Fluence, IFluenceClient, createClient } from '@fluencelabs/js-client';
|
||||
import { getObjAssignCall, getObjCall, getObjRelayCall } from '../examples/objectCall.js';
|
||||
import { callArrowCall, reproArgsBug426Call } from '../examples/callArrowCall.js';
|
||||
import { dataAliasCall } from '../examples/dataAliasCall.js';
|
||||
@ -88,18 +87,17 @@ async function start() {
|
||||
Fluence.onConnectionStateChange((s) => {
|
||||
console.log(s);
|
||||
});
|
||||
await Fluence.connect(relay1);
|
||||
await Fluence.connect(relay1, {});
|
||||
const cl = await Fluence.getClient();
|
||||
peer1 = cl;
|
||||
selfPeerId = cl.getPeerId();
|
||||
console.log('CONNECTED');
|
||||
|
||||
peer2 = await createClient(relay2);
|
||||
peer2 = await createClient(relay2, {});
|
||||
console.log('CONNECTING TO SECOND:');
|
||||
peer2.onConnectionStateChange((s) => {
|
||||
console.log(s);
|
||||
});
|
||||
await peer2.connect();
|
||||
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"
|
||||
|
||||
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 {
|
||||
topologyTest,
|
||||
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