mirror of
https://github.com/fluencelabs/fluence-js.git
synced 2025-06-12 07:31:21 +00:00
feat: remove obsolete packages [fixes DXJ-462] (#337)
* Remove api package * Not publish interface package * Refactoring of interface package * Fix aqua imports * Change impl of isFluencePeer * Remove unused property
This commit is contained in:
@ -27,7 +27,7 @@
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@chainsafe/libp2p-noise": "13.0.0",
|
||||
"@fluencelabs/interfaces": "0.8.2",
|
||||
"@fluencelabs/interfaces": "workspace:*",
|
||||
"@libp2p/crypto": "2.0.3",
|
||||
"@libp2p/interface": "0.1.2",
|
||||
"@libp2p/mplex": "9.0.4",
|
||||
|
@ -17,8 +17,12 @@
|
||||
import type { FnConfig, FunctionCallDef, ServiceDef } from '@fluencelabs/interfaces';
|
||||
import type { IFluenceClient } from '@fluencelabs/interfaces';
|
||||
import { getArgumentTypes } from '@fluencelabs/interfaces';
|
||||
import { isFluencePeer } from '@fluencelabs/interfaces';
|
||||
import { callAquaFunction, Fluence, registerService } from './index.js';
|
||||
import { FluencePeer } from './jsPeer/FluencePeer.js';
|
||||
|
||||
export const isFluencePeer = (fluencePeerCandidate: unknown): fluencePeerCandidate is IFluenceClient => {
|
||||
return fluencePeerCandidate instanceof FluencePeer;
|
||||
};
|
||||
|
||||
/**
|
||||
* Convenience function to support Aqua `func` generation backend
|
||||
|
@ -96,14 +96,6 @@ export abstract class FluencePeer {
|
||||
this._initServices();
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal contract to cast unknown objects to IFluenceClient.
|
||||
* If an unknown object has this property then we assume it is in fact a Peer and it implements IFluenceClient
|
||||
* Check against this variable MUST NOT be coupled with any `FluencePeer` because otherwise it might get bundled
|
||||
* brining a lot of unnecessary stuff alongside with it
|
||||
*/
|
||||
__isFluenceAwesome = true;
|
||||
|
||||
async start(): Promise<void> {
|
||||
log_peer.trace('starting Fluence peer');
|
||||
if (this.config?.debug?.printParticleId) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { it, describe, expect } from 'vitest';
|
||||
|
||||
import { isFluencePeer } from '@fluencelabs/interfaces';
|
||||
import { isFluencePeer } from '../../api.js';
|
||||
import { mkTestPeer, registerHandlersHelper, withPeer } from '../../util/testUtils.js';
|
||||
import { handleTimeout } from '../../particle/Particle.js';
|
||||
import { FluencePeer } from '../FluencePeer.js';
|
||||
|
Reference in New Issue
Block a user