mirror of
https://github.com/fluencelabs/fluence-js.git
synced 2024-12-05 02:10:18 +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:
parent
18a972b573
commit
e7e617661f
2
.github/release-please/config.json
vendored
2
.github/release-please/config.json
vendored
@ -8,9 +8,7 @@
|
||||
}
|
||||
],
|
||||
"packages": {
|
||||
"packages/client/api": {},
|
||||
"packages/core/js-client": {},
|
||||
"packages/core/interfaces": {},
|
||||
"packages/core/marine-worker": {}
|
||||
}
|
||||
}
|
||||
|
4
.github/release-please/manifest.json
vendored
4
.github/release-please/manifest.json
vendored
@ -1,6 +1,4 @@
|
||||
{
|
||||
"packages/client/api": "0.13.1",
|
||||
"packages/core/js-client": "0.1.1",
|
||||
"packages/core/marine-worker": "0.3.0",
|
||||
"packages/core/interfaces": "0.8.2"
|
||||
"packages/core/marine-worker": "0.3.0"
|
||||
}
|
||||
|
@ -17,12 +17,11 @@
|
||||
"author": "Fluence Labs",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@fluencelabs/js-client.api": "workspace:^",
|
||||
"@fluencelabs/js-client": "workspace:^",
|
||||
"base64-js": "1.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@fluencelabs/cli": "0.3.9",
|
||||
"@fluencelabs/cli": "0.7.2",
|
||||
"@fluencelabs/registry": "0.8.2",
|
||||
"@fluencelabs/aqua-lib": "0.6.0",
|
||||
"@fluencelabs/trust-graph": "3.1.2"
|
||||
|
@ -8,11 +8,11 @@
|
||||
* Aqua version: 0.10.2
|
||||
*
|
||||
*/
|
||||
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';
|
||||
import {
|
||||
v5_callFunction as callFunction$$,
|
||||
v5_registerService as registerService$$,
|
||||
} from '@fluencelabs/js-client.api';
|
||||
} from '@fluencelabs/js-client';
|
||||
|
||||
|
||||
|
||||
|
@ -4,7 +4,6 @@
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@fluencelabs/js-client.api": "workspace:^",
|
||||
"@test/aqua_for_test": "workspace:^",
|
||||
"@testing-library/jest-dom": "5.16.5",
|
||||
"@testing-library/react": "13.4.0",
|
||||
|
22
packages/client/api/.gitignore
vendored
22
packages/client/api/.gitignore
vendored
@ -1,22 +0,0 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
lerna-debug.log*
|
||||
|
||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
bundle/
|
||||
tmp/
|
||||
|
||||
dist
|
||||
esm
|
||||
types
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
jspm_packages/
|
||||
|
||||
.idea
|
@ -1,160 +0,0 @@
|
||||
# Changelog
|
||||
|
||||
### Dependencies
|
||||
|
||||
* The following workspace dependencies were updated
|
||||
* dependencies
|
||||
* @fluencelabs/interfaces bumped from 0.7.1 to 0.7.2
|
||||
|
||||
### Dependencies
|
||||
|
||||
* The following workspace dependencies were updated
|
||||
* dependencies
|
||||
* @fluencelabs/interfaces bumped from 0.7.3 to 0.7.4
|
||||
|
||||
### Dependencies
|
||||
|
||||
* The following workspace dependencies were updated
|
||||
* dependencies
|
||||
* @fluencelabs/js-client bumped from 0.1.0 to 0.1.1
|
||||
|
||||
## [0.13.0](https://github.com/fluencelabs/js-client/compare/js-client.api-v0.12.1...js-client.api-v0.13.0) (2023-08-24)
|
||||
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* Unify all packages ([#327](https://github.com/fluencelabs/js-client/issues/327))
|
||||
|
||||
### Features
|
||||
|
||||
* Unify all packages ([#327](https://github.com/fluencelabs/js-client/issues/327)) ([97c2491](https://github.com/fluencelabs/js-client/commit/97c24918d84b34e7ac58337838dc8343cbd44b19))
|
||||
* use marine-js 0.7.2 ([#321](https://github.com/fluencelabs/js-client/issues/321)) ([c99a509](https://github.com/fluencelabs/js-client/commit/c99a509c8743471856b0beb25696ffe7357d5399))
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* The following workspace dependencies were updated
|
||||
* dependencies
|
||||
* @fluencelabs/js-client bumped from 0.0.10 to 0.1.0
|
||||
* devDependencies
|
||||
* @fluencelabs/interfaces bumped to 0.8.2
|
||||
|
||||
## [0.12.1](https://github.com/fluencelabs/js-client/compare/js-client.api-v0.12.0...js-client.api-v0.12.1) (2023-08-08)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **deps:** update dependency @fluencelabs/avm to v0.43.1 ([#322](https://github.com/fluencelabs/js-client/issues/322)) ([c1d1fa6](https://github.com/fluencelabs/js-client/commit/c1d1fa6659b6dc2c6707786748b3410fab7f1bcd))
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* The following workspace dependencies were updated
|
||||
* dependencies
|
||||
* @fluencelabs/interfaces bumped from 0.8.0 to 0.8.1
|
||||
|
||||
## [0.12.0](https://github.com/fluencelabs/js-client/compare/js-client.api-v0.11.7...js-client.api-v0.12.0) (2023-06-29)
|
||||
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* **avm:** avm 0.40.0 (https://github.com/fluencelabs/js-client/pull/315)
|
||||
|
||||
### Features
|
||||
|
||||
* **avm:** avm 0.40.0 (https://github.com/fluencelabs/js-client/pull/315) ([8bae6e2](https://github.com/fluencelabs/js-client/commit/8bae6e24e62153b567f320ccecc7bce76bc826d1))
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* The following workspace dependencies were updated
|
||||
* dependencies
|
||||
* @fluencelabs/interfaces bumped from 0.7.6 to 0.8.0
|
||||
|
||||
## [0.11.7](https://github.com/fluencelabs/js-client/compare/js-client.api-v0.11.6...js-client.api-v0.11.7) (2023-06-20)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* support signatures [fixes DXJ-389] ([#310](https://github.com/fluencelabs/js-client/issues/310)) ([a60dfe0](https://github.com/fluencelabs/js-client/commit/a60dfe0d680b4d9ac5092dec64e2ebf478bf80eb))
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* The following workspace dependencies were updated
|
||||
* dependencies
|
||||
* @fluencelabs/interfaces bumped from 0.7.5 to 0.7.6
|
||||
|
||||
## [0.11.6](https://github.com/fluencelabs/js-client/compare/js-client.api-v0.11.5...js-client.api-v0.11.6) (2023-04-04)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* Cleaning up technical debts ([#295](https://github.com/fluencelabs/js-client/issues/295)) ([0b2f12d](https://github.com/fluencelabs/js-client/commit/0b2f12d8ac223db341d6c30ff403166b3eae2e56))
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* The following workspace dependencies were updated
|
||||
* dependencies
|
||||
* @fluencelabs/interfaces bumped from 0.7.4 to 0.7.5
|
||||
|
||||
## [0.11.4](https://github.com/fluencelabs/js-client/compare/js-client.api-v0.11.3...js-client.api-v0.11.4) (2023-03-03)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **docs:** Use link to specific page in error message about incorrect JS Client library installation [DXJ 271] ([#278](https://github.com/fluencelabs/js-client/issues/278)) ([9ed1e2e](https://github.com/fluencelabs/js-client/commit/9ed1e2eafcad47e1a37367128d12a36bb63496f3))
|
||||
|
||||
## [0.11.3](https://github.com/fluencelabs/js-client/compare/js-client.api-v0.11.2...js-client.api-v0.11.3) (2023-02-16)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Trigger release to publish packages that were built ([#262](https://github.com/fluencelabs/js-client/issues/262)) ([47abf38](https://github.com/fluencelabs/js-client/commit/47abf3882956ffbdc52df372db26ba6252e8306b))
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* The following workspace dependencies were updated
|
||||
* dependencies
|
||||
* @fluencelabs/interfaces bumped from 0.7.2 to 0.7.3
|
||||
|
||||
## [0.11.1](https://github.com/fluencelabs/js-client/compare/js-client.api-v0.11.0...js-client.api-v0.11.1) (2023-02-16)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* Simplify JS Client public API ([#257](https://github.com/fluencelabs/js-client/issues/257)) ([9daaf41](https://github.com/fluencelabs/js-client/commit/9daaf410964d43228192c829c7ff785db6e88081))
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* The following workspace dependencies were updated
|
||||
* dependencies
|
||||
* @fluencelabs/interfaces bumped from 0.7.0 to 0.7.1
|
||||
|
||||
## [0.11.0](https://github.com/fluencelabs/fluence-js/compare/js-client.api-v0.10.0...js-client.api-v0.11.0) (2023-02-15)
|
||||
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* Expose updated JS Client API via `js-client.api` package ([#246](https://github.com/fluencelabs/fluence-js/issues/246))
|
||||
* Standalone web JS Client ([#243](https://github.com/fluencelabs/fluence-js/issues/243))
|
||||
|
||||
### Features
|
||||
|
||||
* Expose updated JS Client API via `js-client.api` package ([#246](https://github.com/fluencelabs/fluence-js/issues/246)) ([d4bb8fb](https://github.com/fluencelabs/fluence-js/commit/d4bb8fb42964b3ba25154232980b9ae82c21e627))
|
||||
* Standalone web JS Client ([#243](https://github.com/fluencelabs/fluence-js/issues/243)) ([9667c4f](https://github.com/fluencelabs/fluence-js/commit/9667c4fec6868f984bba13249f3c47d293396406))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* NodeJS package building ([#248](https://github.com/fluencelabs/fluence-js/issues/248)) ([0d05e51](https://github.com/fluencelabs/fluence-js/commit/0d05e517d89529af513fcb96cfa6c722ccc357a7))
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* The following workspace dependencies were updated
|
||||
* dependencies
|
||||
* @fluencelabs/interfaces bumped from 0.6.0 to 0.7.0
|
@ -1,16 +0,0 @@
|
||||
# JS Client web
|
||||
|
||||
This package is a part of FluenceJS, the official implementation of the Fluence Peer in typescript. See the [FluenceJS repo](https://github.com/fluencelabs/fluence-js) for more info
|
||||
|
||||
## Notes
|
||||
|
||||
This package just reexports everything from main library for backward compatibility
|
||||
`export * from '@fluencelabs/js-client';`
|
||||
|
||||
## Contributing
|
||||
|
||||
While the project is still in the early stages of development, you are welcome to track progress and contribute. As the project is undergoing rapid changes, interested contributors should contact the team before embarking on larger pieces of work. All contributors should consult with and agree to our [basic contributing rules](CONTRIBUTING.md).
|
||||
|
||||
## License
|
||||
|
||||
[Apache 2.0](LICENSE)
|
@ -1,33 +0,0 @@
|
||||
// @ts-check
|
||||
|
||||
// If won't use `@ts-check` - just remove that comments (with `@type` JSDoc below).
|
||||
|
||||
/** @type import('dts-bundle-generator/config-schema').OutputOptions */
|
||||
const commonOutputParams = {
|
||||
inlineDeclareGlobals: false,
|
||||
sortNodes: true,
|
||||
};
|
||||
|
||||
/** @type import('dts-bundle-generator/config-schema').BundlerConfig */
|
||||
const config = {
|
||||
compilationOptions: {
|
||||
preferredConfigPath: './tsconfig.json',
|
||||
},
|
||||
|
||||
entries: [
|
||||
{
|
||||
filePath: './src/index.ts',
|
||||
outFile: './dist/index.d.ts',
|
||||
noCheck: false,
|
||||
|
||||
libraries: {
|
||||
importedLibraries: ['node', '@types/node'],
|
||||
inlinedLibraries: ['@fluencelabs/avm', '@fluencelabs/marine-js'],
|
||||
},
|
||||
|
||||
output: commonOutputParams,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
module.exports = config;
|
@ -1,37 +0,0 @@
|
||||
{
|
||||
"name": "@fluencelabs/js-client.api",
|
||||
"version": "0.13.1",
|
||||
"description": "JS Client API",
|
||||
"engines": {
|
||||
"node": ">=10",
|
||||
"pnpm": ">=3"
|
||||
},
|
||||
"type": "module",
|
||||
"source": "src/index.js",
|
||||
"main": "dist/index.js",
|
||||
"umd:main": "dist/index.umd.js",
|
||||
"module": "dist/index.mjs",
|
||||
"exports": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"require": "./dist/index.js",
|
||||
"default": "./dist/index.modern.mjs"
|
||||
},
|
||||
"types": "dist/index.d.ts",
|
||||
"typings": "dist/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "microbundle --generateTypes false src/index.ts && dts-bundle-generator --config dtsbundle.cjs"
|
||||
},
|
||||
"repository": "https://github.com/fluencelabs/fluence-js",
|
||||
"author": "Fluence Labs",
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"@fluencelabs/avm": "0.43.1",
|
||||
"@fluencelabs/interfaces": "workspace:*",
|
||||
"@fluencelabs/marine-js": "0.7.2",
|
||||
"dts-bundle-generator": "7.2.0",
|
||||
"microbundle": "0.15.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fluencelabs/js-client": "0.1.1"
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
/*
|
||||
* Copyright 2023 Fluence Labs Limited
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export * from '@fluencelabs/js-client';
|
@ -1,9 +0,0 @@
|
||||
{
|
||||
"extends": "../../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist",
|
||||
"skipLibCheck": false
|
||||
},
|
||||
"include": ["./src/**/*"],
|
||||
"exclude": ["node_modules", "dist"]
|
||||
}
|
@ -146,24 +146,6 @@ export interface IFluenceClient extends IFluenceInternalApi {
|
||||
getRelayPeerId(): string;
|
||||
}
|
||||
|
||||
/**
|
||||
* For internal use. Checks if the object is a Fluence Peer
|
||||
*/
|
||||
export const asFluencePeer = (fluencePeerCandidate: unknown): IFluenceClient => {
|
||||
if (isFluencePeer(fluencePeerCandidate)) {
|
||||
return fluencePeerCandidate;
|
||||
}
|
||||
|
||||
throw new Error(`Argument ${fluencePeerCandidate} is not a Fluence Peer`);
|
||||
};
|
||||
|
||||
/**
|
||||
* For internal use. Checks if the object is a Fluence Peer
|
||||
*/
|
||||
export const isFluencePeer = (fluencePeerCandidate: unknown): fluencePeerCandidate is IFluenceClient => {
|
||||
if (fluencePeerCandidate && (fluencePeerCandidate as any).__isFluenceAwesome) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
@ -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';
|
||||
|
1596
pnpm-lock.yaml
generated
1596
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user