mirror of
https://github.com/fluencelabs/fluence-js.git
synced 2025-04-25 17:52:13 +00:00
Compare commits
No commits in common. "master" and "js-client-isomorphic-v0.5.0" have entirely different histories.
master
...
js-client-
12
.github/release-please/manifest.json
vendored
12
.github/release-please/manifest.json
vendored
@ -1,8 +1,8 @@
|
||||
{
|
||||
"packages/core/js-client": "0.9.0",
|
||||
"packages/core/marine-worker": "0.6.0",
|
||||
"packages/core/aqua-to-js": "0.3.13",
|
||||
"packages/core/js-client-isomorphic": "0.6.0",
|
||||
"packages/core/interfaces": "0.12.0",
|
||||
"packages/core/npm-aqua-compiler": "0.0.3"
|
||||
"packages/core/js-client": "0.7.0",
|
||||
"packages/core/marine-worker": "0.5.1",
|
||||
"packages/core/aqua-to-js": "0.3.7",
|
||||
"packages/core/js-client-isomorphic": "0.5.0",
|
||||
"packages/core/interfaces": "0.11.0",
|
||||
"packages/core/npm-aqua-compiler": "0.0.2"
|
||||
}
|
||||
|
6
.github/workflows/e2e.yml
vendored
6
.github/workflows/e2e.yml
vendored
@ -15,7 +15,7 @@ on:
|
||||
- "reopened"
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
- "master"
|
||||
paths-ignore:
|
||||
- "**.md"
|
||||
- ".github/**"
|
||||
@ -43,7 +43,7 @@ jobs:
|
||||
uses: fluencelabs/aqua/.github/workflows/tests.yml@main
|
||||
with:
|
||||
js-client-snapshots: "${{ needs.js-client.outputs.js-client-snapshots }}"
|
||||
nox-image: "docker.fluence.dev/nox:renovate-avm_4905_1"
|
||||
nox-image: "fluencelabs/nox:unstable"
|
||||
flox:
|
||||
needs:
|
||||
- js-client
|
||||
@ -51,4 +51,4 @@ jobs:
|
||||
uses: fluencelabs/flox/.github/workflows/tests.yml@main
|
||||
with:
|
||||
js-client-snapshots: "${{ needs.js-client.outputs.js-client-snapshots }}"
|
||||
nox-image: "docker.fluence.dev/nox:renovate-avm_4905_1"
|
||||
nox-image: "fluencelabs/nox:unstable"
|
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@ -3,7 +3,7 @@ name: "release-please"
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
- "master"
|
||||
|
||||
concurrency:
|
||||
group: "${{ github.workflow }}-${{ github.ref }}"
|
||||
|
4
.github/workflows/run-tests.yml
vendored
4
.github/workflows/run-tests.yml
vendored
@ -10,7 +10,7 @@ on:
|
||||
- "!.github/workflows/snapshot.yml"
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
- "master"
|
||||
paths-ignore:
|
||||
- "**.md"
|
||||
- ".github/**"
|
||||
@ -28,4 +28,4 @@ jobs:
|
||||
uses: ./.github/workflows/tests.yml
|
||||
with:
|
||||
ref: ${{ github.ref }}
|
||||
nox-image: "docker.fluence.dev/nox:renovate-avm_4905_1"
|
||||
nox-image: "fluencelabs/nox:unstable"
|
||||
|
2
.github/workflows/snapshot.yml
vendored
2
.github/workflows/snapshot.yml
vendored
@ -14,7 +14,7 @@ on:
|
||||
ref:
|
||||
description: "git ref to checkout to"
|
||||
type: string
|
||||
default: "main"
|
||||
default: "master"
|
||||
outputs:
|
||||
js-client-snapshots:
|
||||
description: "js-client snapshots"
|
||||
|
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
@ -18,7 +18,7 @@ on:
|
||||
ref:
|
||||
description: "git ref to checkout to"
|
||||
type: string
|
||||
default: "main"
|
||||
default: "master"
|
||||
|
||||
env:
|
||||
NOX_IMAGE: "${{ inputs.nox-image }}"
|
||||
|
@ -57,43 +57,6 @@
|
||||
* @fluencelabs/interfaces bumped to 0.11.0
|
||||
* @fluencelabs/js-client bumped to 0.7.0
|
||||
|
||||
### Dependencies
|
||||
|
||||
* The following workspace dependencies were updated
|
||||
* devDependencies
|
||||
* @fluencelabs/js-client bumped to 0.8.0
|
||||
|
||||
### Dependencies
|
||||
|
||||
* The following workspace dependencies were updated
|
||||
* devDependencies
|
||||
* @fluencelabs/js-client bumped to 0.8.1
|
||||
|
||||
### Dependencies
|
||||
|
||||
* The following workspace dependencies were updated
|
||||
* devDependencies
|
||||
* @fluencelabs/js-client bumped to 0.8.2
|
||||
|
||||
### Dependencies
|
||||
|
||||
* The following workspace dependencies were updated
|
||||
* devDependencies
|
||||
* @fluencelabs/js-client bumped to 0.8.3
|
||||
|
||||
### Dependencies
|
||||
|
||||
* The following workspace dependencies were updated
|
||||
* devDependencies
|
||||
* @fluencelabs/js-client bumped to 0.8.4
|
||||
|
||||
### Dependencies
|
||||
|
||||
* The following workspace dependencies were updated
|
||||
* devDependencies
|
||||
* @fluencelabs/interfaces bumped to 0.12.0
|
||||
* @fluencelabs/js-client bumped to 0.9.0
|
||||
|
||||
## [0.3.5](https://github.com/fluencelabs/js-client/compare/aqua-to-js-v0.3.4...aqua-to-js-v0.3.5) (2023-12-15)
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@fluencelabs/aqua-to-js",
|
||||
"type": "module",
|
||||
"version": "0.3.13",
|
||||
"version": "0.3.7",
|
||||
"description": "Tool for generating aqua wrapper",
|
||||
"main": "dist/index.js",
|
||||
"files": [
|
||||
|
@ -1,16 +1,5 @@
|
||||
# Changelog
|
||||
|
||||
## [0.12.0](https://github.com/fluencelabs/js-client/compare/interfaces-v0.11.0...interfaces-v0.12.0) (2024-02-23)
|
||||
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* **deps:** Update avm to 0.62 ([#438](https://github.com/fluencelabs/js-client/issues/438))
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **deps:** Update avm to 0.62 ([#438](https://github.com/fluencelabs/js-client/issues/438)) ([702ad60](https://github.com/fluencelabs/js-client/commit/702ad605a8e9217f66d3992f31ae8461283ff0b1))
|
||||
|
||||
## [0.11.0](https://github.com/fluencelabs/js-client/compare/interfaces-v0.10.0...interfaces-v0.11.0) (2024-01-26)
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@fluencelabs/interfaces",
|
||||
"type": "module",
|
||||
"version": "0.12.0",
|
||||
"version": "0.11.0",
|
||||
"description": "Interfaces",
|
||||
"main": "./dist/index.js",
|
||||
"typings": "./dist/index.d.ts",
|
||||
@ -49,6 +49,8 @@
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@multiformats/multiaddr": "11.3.0",
|
||||
"@fluencelabs/avm": "0.59.0",
|
||||
"hotscript": "1.0.13"
|
||||
}
|
||||
}
|
||||
|
@ -14,8 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Call, Pipe, Objects, Tuples, Unions, Fn } from "hotscript";
|
||||
|
||||
import {
|
||||
ArrayType,
|
||||
ArrowType,
|
||||
@ -27,7 +25,8 @@ import {
|
||||
StructType,
|
||||
TopType,
|
||||
UnlabeledProductType,
|
||||
} from "./compilerSupport/aquaTypeDefinitions.js";
|
||||
} from "@fluencelabs/interfaces";
|
||||
import { Call, Pipe, Objects, Tuples, Unions, Fn } from "hotscript";
|
||||
|
||||
// Type definitions for inferring ts types from air json definition
|
||||
// In the future we may remove string type declaration and move to type inference.
|
||||
|
21
packages/core/interfaces/src/utils.ts
Normal file
21
packages/core/interfaces/src/utils.ts
Normal file
@ -0,0 +1,21 @@
|
||||
/**
|
||||
* 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 type InterfaceToType<T extends object> = {
|
||||
[K in keyof T]: T[K];
|
||||
};
|
||||
|
||||
export type MaybePromise<T> = T | Promise<T>;
|
@ -1,23 +1,5 @@
|
||||
# Changelog
|
||||
|
||||
## [0.6.0](https://github.com/fluencelabs/js-client/compare/js-client-isomorphic-v0.5.0...js-client-isomorphic-v0.6.0) (2024-02-23)
|
||||
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* **deps:** Update avm to 0.62 ([#438](https://github.com/fluencelabs/js-client/issues/438))
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **deps:** Update avm to 0.62 ([#438](https://github.com/fluencelabs/js-client/issues/438)) ([702ad60](https://github.com/fluencelabs/js-client/commit/702ad605a8e9217f66d3992f31ae8461283ff0b1))
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* The following workspace dependencies were updated
|
||||
* dependencies
|
||||
* @fluencelabs/marine-worker bumped from 0.5.1 to 0.6.0
|
||||
|
||||
## [0.5.0](https://github.com/fluencelabs/js-client/compare/js-client-isomorphic-v0.4.0...js-client-isomorphic-v0.5.0) (2024-01-26)
|
||||
|
||||
|
||||
|
@ -1,11 +1,12 @@
|
||||
{
|
||||
"type": "module",
|
||||
"name": "@fluencelabs/js-client-isomorphic",
|
||||
"version": "0.6.0",
|
||||
"version": "0.5.0",
|
||||
"description": "Isomorphic entities for js-client",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"prepare": "node createVersionFile.js"
|
||||
@ -22,9 +23,9 @@
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@fluencelabs/avm": "0.62.0",
|
||||
"@fluencelabs/marine-js": "0.13.0",
|
||||
"@fluencelabs/marine-worker": "0.6.0",
|
||||
"@fluencelabs/avm": "0.59.0",
|
||||
"@fluencelabs/marine-js": "0.8.0",
|
||||
"@fluencelabs/marine-worker": "0.5.1",
|
||||
"@fluencelabs/threads": "^2.0.0"
|
||||
},
|
||||
"keywords": [],
|
||||
|
@ -12,65 +12,6 @@
|
||||
* dependencies
|
||||
* @fluencelabs/interfaces bumped to 0.9.0
|
||||
|
||||
## [0.9.0](https://github.com/fluencelabs/js-client/compare/js-client-v0.8.4...js-client-v0.9.0) (2024-02-23)
|
||||
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* **deps:** Update avm to 0.62 ([#438](https://github.com/fluencelabs/js-client/issues/438))
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **deps:** Update avm to 0.62 ([#438](https://github.com/fluencelabs/js-client/issues/438)) ([702ad60](https://github.com/fluencelabs/js-client/commit/702ad605a8e9217f66d3992f31ae8461283ff0b1))
|
||||
|
||||
|
||||
### Dependencies
|
||||
|
||||
* The following workspace dependencies were updated
|
||||
* dependencies
|
||||
* @fluencelabs/interfaces bumped to 0.12.0
|
||||
* @fluencelabs/js-client-isomorphic bumped to 0.6.0
|
||||
* @fluencelabs/marine-worker bumped from 0.5.1 to 0.6.0
|
||||
|
||||
## [0.8.4](https://github.com/fluencelabs/js-client/compare/js-client-v0.8.3...js-client-v0.8.4) (2024-02-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Rename testnet to dar ([#433](https://github.com/fluencelabs/js-client/issues/433)) ([e8417d0](https://github.com/fluencelabs/js-client/commit/e8417d069a8cc2244f392b028e7464c9917ec063))
|
||||
|
||||
## [0.8.3](https://github.com/fluencelabs/js-client/compare/js-client-v0.8.2...js-client-v0.8.3) (2024-02-09)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **js-client:** Handle null as user input value ([#431](https://github.com/fluencelabs/js-client/issues/431)) ([d7070fd](https://github.com/fluencelabs/js-client/commit/d7070fd71ef8524bdc47c0c84afe0a62ae80dca6))
|
||||
|
||||
## [0.8.2](https://github.com/fluencelabs/js-client/compare/js-client-v0.8.1...js-client-v0.8.2) (2024-02-09)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **js-client:** Improve logging of conversion API ([#429](https://github.com/fluencelabs/js-client/issues/429)) ([2b1d0f7](https://github.com/fluencelabs/js-client/commit/2b1d0f7f05de237733ad6f6c5aeb1ba787313dd7))
|
||||
|
||||
## [0.8.1](https://github.com/fluencelabs/js-client/compare/js-client-v0.8.0...js-client-v0.8.1) (2024-01-31)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Dial interval ([#421](https://github.com/fluencelabs/js-client/issues/421)) ([fa38328](https://github.com/fluencelabs/js-client/commit/fa38328fddac076831ecd0a352d802a0281c4ab4))
|
||||
|
||||
## [0.8.0](https://github.com/fluencelabs/js-client/compare/js-client-v0.7.0...js-client-v0.8.0) (2024-01-29)
|
||||
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* **js-client:** Multiformat MsgPack for particle data ([#422](https://github.com/fluencelabs/js-client/issues/422))
|
||||
|
||||
### Features
|
||||
|
||||
* **js-client:** Multiformat MsgPack for particle data ([#422](https://github.com/fluencelabs/js-client/issues/422)) ([8ac029b](https://github.com/fluencelabs/js-client/commit/8ac029b6d336114a90559fb3fee18f7493beb1e0))
|
||||
|
||||
## [0.7.0](https://github.com/fluencelabs/js-client/compare/js-client-v0.6.0...js-client-v0.7.0) (2024-01-26)
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@fluencelabs/js-client",
|
||||
"version": "0.9.0",
|
||||
"version": "0.7.0",
|
||||
"description": "Client for interacting with Fluence network",
|
||||
"engines": {
|
||||
"node": ">=10",
|
||||
@ -30,12 +30,13 @@
|
||||
"author": "Fluence Labs",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@libp2p/utils": "5.2.2",
|
||||
"@chainsafe/libp2p-noise": "14.0.0",
|
||||
"@chainsafe/libp2p-yamux": "6.0.1",
|
||||
"@fluencelabs/avm": "0.62.0",
|
||||
"@fluencelabs/avm": "0.59.0",
|
||||
"@fluencelabs/interfaces": "workspace:*",
|
||||
"@fluencelabs/js-client-isomorphic": "workspace:*",
|
||||
"@fluencelabs/marine-worker": "0.6.0",
|
||||
"@fluencelabs/marine-worker": "0.5.1",
|
||||
"@fluencelabs/threads": "^2.0.0",
|
||||
"@libp2p/crypto": "4.0.1",
|
||||
"@libp2p/identify": "1.0.11",
|
||||
@ -43,12 +44,10 @@
|
||||
"@libp2p/peer-id": "4.0.5",
|
||||
"@libp2p/peer-id-factory": "4.0.5",
|
||||
"@libp2p/ping": "1.0.10",
|
||||
"@libp2p/utils": "5.2.2",
|
||||
"@libp2p/websockets": "8.0.12",
|
||||
"@multiformats/multiaddr": "12.1.12",
|
||||
"bs58": "5.0.0",
|
||||
"debug": "4.3.4",
|
||||
"int64-buffer": "1.0.1",
|
||||
"it-length-prefixed": "9.0.3",
|
||||
"it-map": "3.0.5",
|
||||
"it-pipe": "3.0.1",
|
||||
|
@ -102,7 +102,7 @@ export const v5_callFunction = async (
|
||||
);
|
||||
}
|
||||
|
||||
return [argName, wrapJsFunction(arg, argType, argName)];
|
||||
return [argName, wrapJsFunction(arg, argType)];
|
||||
}
|
||||
|
||||
if (typeof arg === "function") {
|
||||
@ -114,7 +114,7 @@ export const v5_callFunction = async (
|
||||
);
|
||||
}
|
||||
|
||||
return [argName, js2aqua(arg, argType, { path: [argName] })];
|
||||
return [argName, js2aqua(arg, argType, { path: [def.functionName] })];
|
||||
},
|
||||
),
|
||||
);
|
||||
@ -141,9 +141,7 @@ export const v5_callFunction = async (
|
||||
result = null;
|
||||
}
|
||||
|
||||
return aqua2js(result, returnSchema, {
|
||||
path: [`${def.functionName}ReturnValue`],
|
||||
});
|
||||
return aqua2js(result, returnSchema);
|
||||
};
|
||||
|
||||
const getDefaultPeer = (): FluencePeer => {
|
||||
@ -217,11 +215,7 @@ export const v5_registerService = (
|
||||
|
||||
return [
|
||||
schemaKey,
|
||||
wrapJsFunction(
|
||||
serviceImplValue.bind(serviceImpl),
|
||||
schemaValue,
|
||||
schemaKey,
|
||||
),
|
||||
wrapJsFunction(serviceImplValue.bind(serviceImpl), schemaValue),
|
||||
] as const;
|
||||
}),
|
||||
);
|
||||
|
@ -179,7 +179,6 @@ describe("Conversion from aqua to typescript", () => {
|
||||
test.each`
|
||||
aqua | ts | type
|
||||
${1} | ${1} | ${i32}
|
||||
${null} | ${null} | ${opt_i32}
|
||||
${[]} | ${null} | ${opt_i32}
|
||||
${[1]} | ${1} | ${opt_i32}
|
||||
${[1, 2, 3]} | ${[1, 2, 3]} | ${array_i32}
|
||||
@ -201,16 +200,12 @@ describe("Conversion from aqua to typescript", () => {
|
||||
// arrange
|
||||
|
||||
// act
|
||||
const tsFromAqua = aqua2js(aqua, type, { path: [] });
|
||||
const tsFromAqua = aqua2js(aqua, type);
|
||||
const aquaFromTs = js2aqua(ts, type, { path: [] });
|
||||
|
||||
// assert
|
||||
expect(tsFromAqua).toStrictEqual(ts);
|
||||
|
||||
// 'null' -> 'null' -> [] ; 'null' not equal []
|
||||
if (aqua !== null || ts !== null) {
|
||||
expect(aquaFromTs).toStrictEqual(aqua);
|
||||
}
|
||||
expect(aquaFromTs).toStrictEqual(aqua);
|
||||
},
|
||||
);
|
||||
});
|
||||
@ -237,7 +232,7 @@ describe("Conversion corner cases", () => {
|
||||
|
||||
// act
|
||||
const aqua = js2aqua(valueInTs, type, { path: [] });
|
||||
const ts = aqua2js(valueInAqua, type, { path: [] });
|
||||
const ts = aqua2js(valueInAqua, type);
|
||||
|
||||
// assert
|
||||
expect(aqua).toStrictEqual({
|
||||
|
@ -97,17 +97,16 @@ function isScalar(
|
||||
export function aqua2js(
|
||||
value: JSONValue,
|
||||
schema: NonArrowSimpleType,
|
||||
{ path }: ValidationContext,
|
||||
): JSONValue {
|
||||
if (schema.tag === "nil") {
|
||||
return null;
|
||||
} else if (schema.tag === "option") {
|
||||
if (!Array.isArray(value) && value !== null) {
|
||||
throw new SchemaValidationError(path, schema, "array or null", value);
|
||||
if (!Array.isArray(value)) {
|
||||
throw new SchemaValidationError([], schema, "array", value);
|
||||
}
|
||||
|
||||
if (value !== null && "0" in value) {
|
||||
return aqua2js(value[0], schema.type, { path: [...path, "?"] });
|
||||
if ("0" in value) {
|
||||
return aqua2js(value[0], schema.type);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
@ -122,16 +121,16 @@ export function aqua2js(
|
||||
throw new SchemaValidationError([], schema, "array", value);
|
||||
}
|
||||
|
||||
return value.map((y, i) => {
|
||||
return aqua2js(y, schema.type, { path: [...path, `[${i}]`] });
|
||||
return value.map((y) => {
|
||||
return aqua2js(y, schema.type);
|
||||
});
|
||||
} else if (schema.tag === "unlabeledProduct") {
|
||||
if (!Array.isArray(value)) {
|
||||
throw new SchemaValidationError([], schema, "array", value);
|
||||
}
|
||||
|
||||
return zip(value, schema.items).map(([v, s], i) => {
|
||||
return aqua2js(v, s, { path: [...path, `[${i}]`] });
|
||||
return zip(value, schema.items).map(([v, s]) => {
|
||||
return aqua2js(v, s);
|
||||
});
|
||||
} else if (["labeledProduct", "struct"].includes(schema.tag)) {
|
||||
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
||||
@ -146,7 +145,7 @@ export function aqua2js(
|
||||
v = null;
|
||||
}
|
||||
|
||||
const val = aqua2js(v, type, { path: [...path, key] });
|
||||
const val = aqua2js(v, type);
|
||||
return [key, val];
|
||||
}),
|
||||
);
|
||||
@ -168,9 +167,7 @@ export function js2aqua(
|
||||
return value;
|
||||
} else if (schema.tag === "option") {
|
||||
// option means 'type | null'
|
||||
return value === null
|
||||
? []
|
||||
: [js2aqua(value, schema.type, { path: [...path, "?"] })];
|
||||
return value === null ? [] : [js2aqua(value, schema.type, { path })];
|
||||
} else if (schema.tag === "topType") {
|
||||
// topType equals to 'any'
|
||||
return value;
|
||||
@ -224,7 +221,6 @@ export const wrapJsFunction = (
|
||||
schema:
|
||||
| ArrowWithoutCallbacks
|
||||
| ArrowType<LabeledProductType<SimpleTypes> | UnlabeledProductType>,
|
||||
funcName: string,
|
||||
): ServiceImpl[string] => {
|
||||
return async ({ args, context }) => {
|
||||
const schemaArgs =
|
||||
@ -240,8 +236,8 @@ export const wrapJsFunction = (
|
||||
);
|
||||
}
|
||||
|
||||
const jsArgs = zip(args, schemaArgs).map(([arg, schemaArg], i) => {
|
||||
return aqua2js(arg, schemaArg, { path: [`${funcName}Args`, `[${i}]`] });
|
||||
const jsArgs = zip(args, schemaArgs).map(([arg, schemaArg]) => {
|
||||
return aqua2js(arg, schemaArg);
|
||||
});
|
||||
|
||||
const returnTypeVoid =
|
||||
@ -260,6 +256,6 @@ export const wrapJsFunction = (
|
||||
result = null;
|
||||
}
|
||||
|
||||
return js2aqua(result, resultSchema, { path: [`${funcName}ReturnValue`] });
|
||||
return js2aqua(result, resultSchema, { path: [] });
|
||||
};
|
||||
};
|
||||
|
@ -29,13 +29,15 @@ import map from "it-map";
|
||||
import { pipe } from "it-pipe";
|
||||
import { createLibp2p, Libp2p } from "libp2p";
|
||||
import { Subject } from "rxjs";
|
||||
import { fromString } from "uint8arrays/from-string";
|
||||
import { toString } from "uint8arrays/to-string";
|
||||
|
||||
import { KeyPair } from "../keypair/index.js";
|
||||
import { IParticle } from "../particle/interfaces.js";
|
||||
import {
|
||||
buildParticleMessage,
|
||||
Particle,
|
||||
serializeParticle,
|
||||
serializeToString,
|
||||
} from "../particle/Particle.js";
|
||||
import { throwHasNoPeerId } from "../util/libp2pUtils.js";
|
||||
import { logger } from "../util/logger.js";
|
||||
@ -143,6 +145,7 @@ export class RelayConnection implements IConnection {
|
||||
...(this.config.dialTimeoutMs !== undefined
|
||||
? {
|
||||
dialTimeout: this.config.dialTimeoutMs,
|
||||
autoDialInterval: 0,
|
||||
}
|
||||
: {}),
|
||||
},
|
||||
@ -213,7 +216,7 @@ export class RelayConnection implements IConnection {
|
||||
|
||||
const sink = stream.sink;
|
||||
|
||||
await pipe([serializeParticle(particle)], encode, sink);
|
||||
await pipe([fromString(serializeToString(particle))], encode, sink);
|
||||
|
||||
log.trace(
|
||||
"particle %s sent to %s",
|
||||
@ -222,11 +225,11 @@ export class RelayConnection implements IConnection {
|
||||
);
|
||||
}
|
||||
|
||||
private async processIncomingMessage(msg: Uint8Array) {
|
||||
private async processIncomingMessage(msg: string) {
|
||||
let particle: Particle | undefined;
|
||||
|
||||
try {
|
||||
particle = Particle.deserialize(msg);
|
||||
particle = Particle.fromString(msg);
|
||||
|
||||
log.trace(
|
||||
"received particle %s from %s",
|
||||
@ -287,7 +290,7 @@ export class RelayConnection implements IConnection {
|
||||
decode,
|
||||
(source) => {
|
||||
return map(source, (buf) => {
|
||||
return buf.subarray();
|
||||
return toString(buf.subarray());
|
||||
});
|
||||
},
|
||||
async (source) => {
|
||||
|
@ -515,15 +515,6 @@ export abstract class FluencePeer {
|
||||
item.callResults,
|
||||
);
|
||||
|
||||
const [, , , forthParam] = args;
|
||||
|
||||
if (
|
||||
typeof forthParam === "object" &&
|
||||
"hard_limit_enabled" in forthParam
|
||||
) {
|
||||
forthParam["hard_limit_enabled"] = false;
|
||||
}
|
||||
|
||||
let avmCallResult: InterpreterResult | Error;
|
||||
|
||||
try {
|
||||
|
@ -52,57 +52,57 @@ export const stage: Relay[] = [
|
||||
export const testNet: Relay[] = [
|
||||
{
|
||||
multiaddr:
|
||||
"/dns4/0-dar.fluence.dev/tcp/9000/wss/p2p/12D3KooWMhVpgfQxBLkQkJed8VFNvgN4iE6MD7xCybb1ZYWW2Gtz",
|
||||
"/dns4/0-testnet.fluence.dev/tcp/9000/wss/p2p/12D3KooWMhVpgfQxBLkQkJed8VFNvgN4iE6MD7xCybb1ZYWW2Gtz",
|
||||
peerId: "12D3KooWMhVpgfQxBLkQkJed8VFNvgN4iE6MD7xCybb1ZYWW2Gtz",
|
||||
},
|
||||
{
|
||||
multiaddr:
|
||||
"/dns4/1-dar.fluence.dev/tcp/9000/wss/p2p/12D3KooWEXNUbCXooUwHrHBbrmjsrpHXoEphPwbjQXEGyzbqKnE9",
|
||||
"/dns4/1-testnet.fluence.dev/tcp/9000/wss/p2p/12D3KooWEXNUbCXooUwHrHBbrmjsrpHXoEphPwbjQXEGyzbqKnE9",
|
||||
peerId: "12D3KooWEXNUbCXooUwHrHBbrmjsrpHXoEphPwbjQXEGyzbqKnE9",
|
||||
},
|
||||
{
|
||||
multiaddr:
|
||||
"/dns4/2-dar.fluence.dev/tcp/9000/wss/p2p/12D3KooWHk9BjDQBUqnavciRPhAYFvqKBe4ZiPPvde7vDaqgn5er",
|
||||
"/dns4/2-testnet.fluence.dev/tcp/9000/wss/p2p/12D3KooWHk9BjDQBUqnavciRPhAYFvqKBe4ZiPPvde7vDaqgn5er",
|
||||
peerId: "12D3KooWHk9BjDQBUqnavciRPhAYFvqKBe4ZiPPvde7vDaqgn5er",
|
||||
},
|
||||
{
|
||||
multiaddr:
|
||||
"/dns4/3-dar.fluence.dev/tcp/9000/wss/p2p/12D3KooWBUJifCTgaxAUrcM9JysqCcS4CS8tiYH5hExbdWCAoNwb",
|
||||
"/dns4/3-testnet.fluence.dev/tcp/9000/wss/p2p/12D3KooWBUJifCTgaxAUrcM9JysqCcS4CS8tiYH5hExbdWCAoNwb",
|
||||
peerId: "12D3KooWBUJifCTgaxAUrcM9JysqCcS4CS8tiYH5hExbdWCAoNwb",
|
||||
},
|
||||
{
|
||||
multiaddr:
|
||||
"/dns4/4-dar.fluence.dev/tcp/9000/wss/p2p/12D3KooWJbJFaZ3k5sNd8DjQgg3aERoKtBAnirEvPV8yp76kEXHB",
|
||||
"/dns4/4-testnet.fluence.dev/tcp/9000/wss/p2p/12D3KooWJbJFaZ3k5sNd8DjQgg3aERoKtBAnirEvPV8yp76kEXHB",
|
||||
peerId: "12D3KooWJbJFaZ3k5sNd8DjQgg3aERoKtBAnirEvPV8yp76kEXHB",
|
||||
},
|
||||
{
|
||||
multiaddr:
|
||||
"/dns4/5-dar.fluence.dev/tcp/9000/wss/p2p/12D3KooWCKCeqLPSgMnDjyFsJuWqREDtKNHx1JEBiwaMXhCLNTRb",
|
||||
"/dns4/5-testnet.fluence.dev/tcp/9000/wss/p2p/12D3KooWCKCeqLPSgMnDjyFsJuWqREDtKNHx1JEBiwaMXhCLNTRb",
|
||||
peerId: "12D3KooWCKCeqLPSgMnDjyFsJuWqREDtKNHx1JEBiwaMXhCLNTRb",
|
||||
},
|
||||
{
|
||||
multiaddr:
|
||||
"/dns4/6-dar.fluence.dev/tcp/9000/wss/p2p/12D3KooWKnRcsTpYx9axkJ6d69LPfpPXrkVLe96skuPTAo76LLVH",
|
||||
"/dns4/6-testnet.fluence.dev/tcp/9000/wss/p2p/12D3KooWKnRcsTpYx9axkJ6d69LPfpPXrkVLe96skuPTAo76LLVH",
|
||||
peerId: "12D3KooWKnRcsTpYx9axkJ6d69LPfpPXrkVLe96skuPTAo76LLVH",
|
||||
},
|
||||
{
|
||||
multiaddr:
|
||||
"/dns4/7-dar.fluence.dev/tcp/9000/wss/p2p/12D3KooWBSdm6TkqnEFrgBuSkpVE3dR1kr6952DsWQRNwJZjFZBv",
|
||||
"/dns4/7-testnet.fluence.dev/tcp/9000/wss/p2p/12D3KooWBSdm6TkqnEFrgBuSkpVE3dR1kr6952DsWQRNwJZjFZBv",
|
||||
peerId: "12D3KooWBSdm6TkqnEFrgBuSkpVE3dR1kr6952DsWQRNwJZjFZBv",
|
||||
},
|
||||
{
|
||||
multiaddr:
|
||||
"/dns4/8-dar.fluence.dev/tcp/9000/wss/p2p/12D3KooWGzNvhSDsgFoHwpWHAyPf1kcTYCGeRBPfznL8J6qdyu2H",
|
||||
"/dns4/8-testnet.fluence.dev/tcp/9000/wss/p2p/12D3KooWGzNvhSDsgFoHwpWHAyPf1kcTYCGeRBPfznL8J6qdyu2H",
|
||||
peerId: "12D3KooWGzNvhSDsgFoHwpWHAyPf1kcTYCGeRBPfznL8J6qdyu2H",
|
||||
},
|
||||
{
|
||||
multiaddr:
|
||||
"/dns4/9-dar.fluence.dev/tcp/9000/wss/p2p/12D3KooWF7gjXhQ4LaKj6j7ntxsPpGk34psdQicN2KNfBi9bFKXg",
|
||||
"/dns4/9-testnet.fluence.dev/tcp/9000/wss/p2p/12D3KooWF7gjXhQ4LaKj6j7ntxsPpGk34psdQicN2KNfBi9bFKXg",
|
||||
peerId: "12D3KooWF7gjXhQ4LaKj6j7ntxsPpGk34psdQicN2KNfBi9bFKXg",
|
||||
},
|
||||
{
|
||||
multiaddr:
|
||||
"/dns4/10-dar.fluence.dev/tcp/9000/wss/p2p/12D3KooWB9P1xmV3c7ZPpBemovbwCiRRTKd3Kq2jsVPQN4ZukDfy",
|
||||
"/dns4/10-testnet.fluence.dev/tcp/9000/wss/p2p/12D3KooWB9P1xmV3c7ZPpBemovbwCiRRTKd3Kq2jsVPQN4ZukDfy",
|
||||
peerId: "12D3KooWB9P1xmV3c7ZPpBemovbwCiRRTKd3Kq2jsVPQN4ZukDfy",
|
||||
},
|
||||
];
|
||||
|
@ -14,13 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
CallResultsArray,
|
||||
MulticodecRepr,
|
||||
MsgPackRepr,
|
||||
} from "@fluencelabs/avm";
|
||||
import { CallResultsArray } from "@fluencelabs/avm";
|
||||
import { JSONValue } from "@fluencelabs/interfaces";
|
||||
import int64Buffer from "int64-buffer";
|
||||
import { fromUint8Array, toUint8Array } from "js-base64";
|
||||
import { concat } from "uint8arrays/concat";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
import { z } from "zod";
|
||||
@ -31,16 +27,14 @@ import { numberToLittleEndianBytes } from "../util/bytes.js";
|
||||
|
||||
import { IParticle } from "./interfaces.js";
|
||||
|
||||
const particleRepr = new MulticodecRepr(new MsgPackRepr());
|
||||
|
||||
const particleSchema = z.object({
|
||||
id: z.string(),
|
||||
timestamp: z.number().positive(),
|
||||
script: z.string(),
|
||||
data: z.instanceof(Uint8Array),
|
||||
data: z.string(),
|
||||
ttl: z.number().positive(),
|
||||
init_peer_id: z.string(),
|
||||
signature: z.instanceof(Uint8Array),
|
||||
signature: z.array(z.number()),
|
||||
});
|
||||
|
||||
export class Particle implements IParticle {
|
||||
@ -79,10 +73,10 @@ export class Particle implements IParticle {
|
||||
);
|
||||
}
|
||||
|
||||
static deserialize(bytes: Uint8Array): Particle {
|
||||
const obj = particleRepr.fromBinary(bytes);
|
||||
static fromString(str: string): Particle {
|
||||
const json = JSON.parse(str);
|
||||
|
||||
const res = particleSchema.safeParse(obj);
|
||||
const res = particleSchema.safeParse(json);
|
||||
|
||||
if (!res.success) {
|
||||
throw new Error(
|
||||
@ -98,10 +92,10 @@ export class Particle implements IParticle {
|
||||
data.id,
|
||||
data.timestamp,
|
||||
data.script,
|
||||
data.data,
|
||||
toUint8Array(data.data),
|
||||
data.ttl,
|
||||
data.init_peer_id,
|
||||
data.signature,
|
||||
new Uint8Array(data.signature),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -160,16 +154,16 @@ export const cloneWithNewData = (
|
||||
/**
|
||||
* Serializes particle into string suitable for sending through network
|
||||
*/
|
||||
export const serializeParticle = (particle: IParticle): Uint8Array => {
|
||||
return particleRepr.toBinary({
|
||||
export const serializeToString = (particle: IParticle): string => {
|
||||
return JSON.stringify({
|
||||
action: "Particle",
|
||||
id: particle.id,
|
||||
init_peer_id: particle.initPeerId,
|
||||
timestamp: new int64Buffer.Uint64BE(particle.timestamp),
|
||||
timestamp: particle.timestamp,
|
||||
ttl: particle.ttl,
|
||||
script: particle.script,
|
||||
signature: Array.from(particle.signature),
|
||||
data: Array.from(particle.data),
|
||||
data: fromUint8Array(particle.data),
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -55,7 +55,7 @@ export const allowServiceFn = (
|
||||
*/
|
||||
export const allowExactJsonPath = (jsonPath: string): SecurityGuard => {
|
||||
return allowTetraplet((t) => {
|
||||
return t.lens === jsonPath;
|
||||
return t.json_path === jsonPath;
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -221,7 +221,7 @@ export const makeTestTetraplet = (
|
||||
peer_pk: initPeerId,
|
||||
function_name: fnName,
|
||||
service_id: serviceId,
|
||||
lens: "",
|
||||
json_path: "",
|
||||
},
|
||||
],
|
||||
],
|
||||
|
@ -1,16 +1,5 @@
|
||||
# Changelog
|
||||
|
||||
## [0.6.0](https://github.com/fluencelabs/js-client/compare/marine-worker-v0.5.1...marine-worker-v0.6.0) (2024-02-23)
|
||||
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* **deps:** Update avm to 0.62 ([#438](https://github.com/fluencelabs/js-client/issues/438))
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **deps:** Update avm to 0.62 ([#438](https://github.com/fluencelabs/js-client/issues/438)) ([702ad60](https://github.com/fluencelabs/js-client/commit/702ad605a8e9217f66d3992f31ae8461283ff0b1))
|
||||
|
||||
## [0.5.1](https://github.com/fluencelabs/js-client/compare/marine-worker-v0.5.0...marine-worker-v0.5.1) (2023-12-15)
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"type": "module",
|
||||
"name": "@fluencelabs/marine-worker",
|
||||
"version": "0.6.0",
|
||||
"version": "0.5.1",
|
||||
"description": "Marine worker",
|
||||
"files": [
|
||||
"dist"
|
||||
@ -24,7 +24,7 @@
|
||||
"vitest": "0.34.6"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fluencelabs/marine-js": "0.13.0",
|
||||
"@fluencelabs/marine-js": "0.8.0",
|
||||
"observable-fns": "0.6.1",
|
||||
"@fluencelabs/threads": "^2.0.0"
|
||||
}
|
||||
|
@ -1,12 +1,5 @@
|
||||
# Changelog
|
||||
|
||||
## [0.0.3](https://github.com/fluencelabs/js-client/compare/npm-aqua-compiler-v0.0.2...npm-aqua-compiler-v0.0.3) (2024-01-31)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **npm-aqua-compiler:** Support aquaDir inside the project's node_nodules ([#427](https://github.com/fluencelabs/js-client/issues/427)) ([514663a](https://github.com/fluencelabs/js-client/commit/514663a4fde716e216f3112277d4bef6370dfdae))
|
||||
|
||||
## [0.0.2](https://github.com/fluencelabs/js-client/compare/npm-aqua-compiler-v0.0.1...npm-aqua-compiler-v0.0.2) (2023-12-15)
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"type": "module",
|
||||
"name": "@fluencelabs/npm-aqua-compiler",
|
||||
"version": "0.0.3",
|
||||
"version": "0.0.2",
|
||||
"description": "Tool for converting npm imports to aqua compiler input",
|
||||
"types": "./dist/imports.d.ts",
|
||||
"exports": {
|
||||
|
@ -14,67 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { join, resolve } from "path";
|
||||
import { join } from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
|
||||
import { assert, describe, expect, it } from "vitest";
|
||||
|
||||
import { gatherImportsFromNpm, GatherImportsResult } from "./imports.js";
|
||||
|
||||
const prefix = join(
|
||||
fileURLToPath(new URL("./", import.meta.url)),
|
||||
"..",
|
||||
"test",
|
||||
"transitive-deps",
|
||||
"project",
|
||||
);
|
||||
|
||||
function buildResolutionKey(str: string) {
|
||||
return str
|
||||
.slice(prefix.length)
|
||||
.split("/node_modules/")
|
||||
.filter(Boolean)
|
||||
.join("/");
|
||||
}
|
||||
|
||||
function matchTree(
|
||||
expected: GatherImportsResult,
|
||||
actual: GatherImportsResult,
|
||||
aquaToCompileDirPath: string | undefined,
|
||||
) {
|
||||
if (aquaToCompileDirPath !== undefined) {
|
||||
aquaToCompileDirPath = resolve(aquaToCompileDirPath);
|
||||
}
|
||||
|
||||
expect(Object.keys(actual).length).toBe(Object.keys(expected).length);
|
||||
|
||||
Object.entries(actual).forEach(([key, value]) => {
|
||||
const resolutionKey =
|
||||
key === aquaToCompileDirPath ? key : buildResolutionKey(key);
|
||||
|
||||
const resolutionValues = expected[resolutionKey];
|
||||
|
||||
assert(resolutionValues);
|
||||
|
||||
expect(Object.keys(value).length).toBe(
|
||||
Object.keys(resolutionValues).length,
|
||||
);
|
||||
|
||||
for (const [dep, path] of Object.entries(value)) {
|
||||
if (Array.isArray(path)) {
|
||||
expect(dep).toBe("");
|
||||
expect(expected[resolutionKey]).toHaveProperty(dep, path);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
expect(expected[resolutionKey]).toHaveProperty(
|
||||
dep,
|
||||
buildResolutionKey(path),
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
import { gatherImportsFromNpm } from "./imports.js";
|
||||
|
||||
describe("imports", () => {
|
||||
/**
|
||||
@ -90,90 +35,81 @@ describe("imports", () => {
|
||||
string,
|
||||
Record<string, string[] | string>
|
||||
> = {
|
||||
[resolve(aquaToCompileDirPath)]: {
|
||||
[aquaToCompileDirPath]: {
|
||||
"": globalImports,
|
||||
A: "A",
|
||||
B: "B",
|
||||
A: "./A",
|
||||
B: "./B",
|
||||
},
|
||||
A: {
|
||||
C: "C",
|
||||
D: "D",
|
||||
"./A": {
|
||||
C: "./C",
|
||||
D: "./D",
|
||||
},
|
||||
B: {
|
||||
C: "B/C",
|
||||
D: "B/D",
|
||||
"./B": {
|
||||
C: "./B/C",
|
||||
D: "./B/D",
|
||||
},
|
||||
C: {
|
||||
D: "C/D",
|
||||
"./C": {
|
||||
D: "./C/D",
|
||||
},
|
||||
"B/C": {
|
||||
D: "B/C/D",
|
||||
"./B/C": {
|
||||
D: "./B/C/D",
|
||||
},
|
||||
};
|
||||
|
||||
const prefix = join(
|
||||
fileURLToPath(new URL("./", import.meta.url)),
|
||||
"..",
|
||||
"test",
|
||||
"transitive-deps",
|
||||
"project",
|
||||
);
|
||||
|
||||
const buildResolutionKey = (str: string) => {
|
||||
return (
|
||||
"./" +
|
||||
str
|
||||
.slice(prefix.length)
|
||||
.split("/node_modules/")
|
||||
.filter(Boolean)
|
||||
.join("/")
|
||||
);
|
||||
};
|
||||
|
||||
const imports = await gatherImportsFromNpm({
|
||||
npmProjectDirPath,
|
||||
aquaToCompileDirPath,
|
||||
globalImports,
|
||||
});
|
||||
|
||||
matchTree(expectedResolution, imports, aquaToCompileDirPath);
|
||||
});
|
||||
expect(Object.keys(imports).length).toBe(
|
||||
Object.keys(expectedResolution).length,
|
||||
);
|
||||
|
||||
it("should resolve transitive dependencies and return a subtree when 'aquaToCompileDirPath' inside project 'node_modules' folder", async () => {
|
||||
const npmProjectDirPath = "./test/transitive-deps/project";
|
||||
Object.entries(imports).forEach(([key, value]) => {
|
||||
const resolutionKey =
|
||||
key === aquaToCompileDirPath ? key : buildResolutionKey(key);
|
||||
|
||||
const aquaToCompileDirPath =
|
||||
"./test/transitive-deps/project/node_modules/A";
|
||||
const resolutionValues = expectedResolution[resolutionKey];
|
||||
|
||||
const globalImports = ["./.fluence/aqua"];
|
||||
assert(resolutionValues);
|
||||
|
||||
const expectedResolution: Record<
|
||||
string,
|
||||
Record<string, string[] | string>
|
||||
> = {
|
||||
[resolve(aquaToCompileDirPath)]: {
|
||||
"": globalImports,
|
||||
C: "C",
|
||||
D: "D",
|
||||
},
|
||||
C: {
|
||||
D: "C/D",
|
||||
},
|
||||
};
|
||||
expect(Object.keys(value).length).toBe(
|
||||
Object.keys(resolutionValues).length,
|
||||
);
|
||||
|
||||
const imports = await gatherImportsFromNpm({
|
||||
npmProjectDirPath,
|
||||
aquaToCompileDirPath,
|
||||
globalImports,
|
||||
for (const [dep, path] of Object.entries(value)) {
|
||||
if (Array.isArray(path)) {
|
||||
expect(dep).toBe("");
|
||||
expect(expectedResolution[resolutionKey]).toHaveProperty(dep, path);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
expect(expectedResolution[resolutionKey]).toHaveProperty(
|
||||
dep,
|
||||
buildResolutionKey(path),
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
matchTree(expectedResolution, imports, aquaToCompileDirPath);
|
||||
});
|
||||
|
||||
it("should resolve transitive dependencies when project is empty", async () => {
|
||||
const npmProjectDirPath = "./test/transitive-deps/empty-project";
|
||||
|
||||
const aquaToCompileDirPath =
|
||||
"./test/transitive-deps/empty-project/node_modules/A";
|
||||
|
||||
const globalImports = ["./.fluence/aqua"];
|
||||
|
||||
const expectedResolution: Record<
|
||||
string,
|
||||
Record<string, string[] | string>
|
||||
> = {
|
||||
[resolve(aquaToCompileDirPath)]: {
|
||||
"": globalImports,
|
||||
},
|
||||
};
|
||||
|
||||
const imports = await gatherImportsFromNpm({
|
||||
npmProjectDirPath,
|
||||
aquaToCompileDirPath,
|
||||
globalImports,
|
||||
});
|
||||
|
||||
matchTree(expectedResolution, imports, aquaToCompileDirPath);
|
||||
});
|
||||
});
|
||||
|
@ -14,8 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { resolve } from "path";
|
||||
|
||||
import Arborist from "@npmcli/arborist";
|
||||
import { breadth } from "treeverse";
|
||||
|
||||
@ -42,9 +40,7 @@ export async function gatherImportsFromNpm({
|
||||
* Traverse dependency tree to construct map
|
||||
* (real path of a package) -> (real paths of its immediate dependencies)
|
||||
*/
|
||||
let result: Record<string, Record<string, string>> = {};
|
||||
const rootDepsKey = "";
|
||||
const aquaDepPath = resolve(aquaToCompileDirPath ?? npmProjectDirPath);
|
||||
const result: GatherImportsResult = {};
|
||||
|
||||
breadth({
|
||||
tree,
|
||||
@ -68,8 +64,15 @@ export async function gatherImportsFromNpm({
|
||||
|
||||
// Root node should have top-level property pointed to aqua dependency folder
|
||||
if (node.isRoot) {
|
||||
result[rootDepsKey] = {
|
||||
...result[rootDepsKey],
|
||||
const aquaDepPath = aquaToCompileDirPath ?? npmProjectDirPath;
|
||||
|
||||
result[aquaDepPath] = {
|
||||
...(result[aquaDepPath] ??
|
||||
(globalImports.length > 0
|
||||
? {
|
||||
"": globalImports,
|
||||
}
|
||||
: {})),
|
||||
[dep.name]: dep.realpath,
|
||||
};
|
||||
} else {
|
||||
@ -85,38 +88,5 @@ export async function gatherImportsFromNpm({
|
||||
},
|
||||
});
|
||||
|
||||
// In case 'aquaToCompileDirPath' points to any dependency inside current project
|
||||
// Only the subtree with 'aquaToCompileDirPath' as root node is returned
|
||||
if (aquaToCompileDirPath !== undefined && aquaDepPath in result) {
|
||||
// Other nodes which are not included in the subtree simply dropped
|
||||
const newResult: Record<string, Record<string, string>> = {};
|
||||
|
||||
breadth({
|
||||
tree: aquaDepPath,
|
||||
getChildren: (node) => {
|
||||
const deps = result[node];
|
||||
|
||||
if (deps === undefined) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const isRootNode = node === aquaDepPath;
|
||||
newResult[isRootNode ? rootDepsKey : node] = deps;
|
||||
return Object.values(deps);
|
||||
},
|
||||
});
|
||||
|
||||
result = newResult;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const { [rootDepsKey]: _, ...rest } = result;
|
||||
|
||||
return {
|
||||
...rest,
|
||||
[aquaDepPath]: {
|
||||
...result[rootDepsKey],
|
||||
"": globalImports,
|
||||
},
|
||||
};
|
||||
return result;
|
||||
}
|
||||
|
@ -1,12 +0,0 @@
|
||||
{
|
||||
"name": "empty-project",
|
||||
"version": "0.1.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "empty-project",
|
||||
"version": "0.1.0"
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
{
|
||||
"name": "empty-project",
|
||||
"version": "0.1.0",
|
||||
"dependencies": {}
|
||||
}
|
110
pnpm-lock.yaml
generated
110
pnpm-lock.yaml
generated
@ -196,6 +196,12 @@ importers:
|
||||
|
||||
packages/core/interfaces:
|
||||
devDependencies:
|
||||
'@fluencelabs/avm':
|
||||
specifier: 0.59.0
|
||||
version: 0.59.0
|
||||
'@multiformats/multiaddr':
|
||||
specifier: 11.3.0
|
||||
version: 11.3.0
|
||||
hotscript:
|
||||
specifier: 1.0.13
|
||||
version: 1.0.13
|
||||
@ -209,8 +215,8 @@ importers:
|
||||
specifier: 6.0.1
|
||||
version: 6.0.1
|
||||
'@fluencelabs/avm':
|
||||
specifier: 0.62.0
|
||||
version: 0.62.0
|
||||
specifier: 0.59.0
|
||||
version: 0.59.0
|
||||
'@fluencelabs/interfaces':
|
||||
specifier: workspace:*
|
||||
version: link:../interfaces
|
||||
@ -218,7 +224,7 @@ importers:
|
||||
specifier: workspace:*
|
||||
version: link:../js-client-isomorphic
|
||||
'@fluencelabs/marine-worker':
|
||||
specifier: 0.6.0
|
||||
specifier: 0.5.1
|
||||
version: link:../marine-worker
|
||||
'@fluencelabs/threads':
|
||||
specifier: ^2.0.0
|
||||
@ -256,9 +262,6 @@ importers:
|
||||
debug:
|
||||
specifier: 4.3.4
|
||||
version: 4.3.4
|
||||
int64-buffer:
|
||||
specifier: 1.0.1
|
||||
version: 1.0.1
|
||||
it-length-prefixed:
|
||||
specifier: 9.0.3
|
||||
version: 9.0.3
|
||||
@ -327,13 +330,13 @@ importers:
|
||||
packages/core/js-client-isomorphic:
|
||||
dependencies:
|
||||
'@fluencelabs/avm':
|
||||
specifier: 0.62.0
|
||||
version: 0.62.0
|
||||
specifier: 0.59.0
|
||||
version: 0.59.0
|
||||
'@fluencelabs/marine-js':
|
||||
specifier: 0.13.0
|
||||
version: 0.13.0
|
||||
specifier: 0.8.0
|
||||
version: 0.8.0
|
||||
'@fluencelabs/marine-worker':
|
||||
specifier: 0.6.0
|
||||
specifier: 0.5.1
|
||||
version: link:../marine-worker
|
||||
'@fluencelabs/threads':
|
||||
specifier: ^2.0.0
|
||||
@ -342,8 +345,8 @@ importers:
|
||||
packages/core/marine-worker:
|
||||
dependencies:
|
||||
'@fluencelabs/marine-js':
|
||||
specifier: 0.13.0
|
||||
version: 0.13.0
|
||||
specifier: 0.8.0
|
||||
version: 0.8.0
|
||||
'@fluencelabs/threads':
|
||||
specifier: ^2.0.0
|
||||
version: 2.0.0
|
||||
@ -1872,7 +1875,6 @@ packages:
|
||||
|
||||
/@chainsafe/is-ip@2.0.2:
|
||||
resolution: {integrity: sha512-ndGqEMG1W5WkGagaqOZHpPU172AGdxr+LD15sv3WIUvT5oCFUrG1Y0CW/v2Egwj4JXEvSibaIIIqImsm98y1nA==}
|
||||
dev: false
|
||||
|
||||
/@chainsafe/libp2p-noise@14.0.0:
|
||||
resolution: {integrity: sha512-/E7QnSL24APpfXTj/YRS/EVRvTATg09+AwqEUGs+OeLFcO/DwPal3W6pj7c4eyJFSgxnegbpbgiH8EBvTZ4Iwg==}
|
||||
@ -1896,8 +1898,6 @@ packages:
|
||||
uint8arraylist: 2.4.8
|
||||
uint8arrays: 4.0.10
|
||||
wherearewe: 2.0.1
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
/@chainsafe/libp2p-yamux@6.0.1:
|
||||
@ -2719,6 +2719,11 @@ packages:
|
||||
resolution: {integrity: sha512-NCC3zz2+nvYd+Ckfh87rA47zfu2QsQpvc6k1yzTk+b9KzRj0wkGa8LSoGOXN6Zv4lRf/EIoZ80biDh9HOI+RNQ==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
|
||||
/@fastify/busboy@2.1.0:
|
||||
resolution: {integrity: sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==}
|
||||
engines: {node: '>=14'}
|
||||
dev: true
|
||||
|
||||
/@fluencelabs/aqua-api@0.13.0:
|
||||
resolution: {integrity: sha512-AY6pXoK6xsFfgQHxhv6Lj+uPZKqiL3qPc2EVIZcl1RFX0Q+S0o1SmFlAVX2PrdA+31gbk9aAOtTXt+40GadooA==}
|
||||
dev: true
|
||||
@ -2739,15 +2744,14 @@ packages:
|
||||
resolution: {integrity: sha512-+JVbWmHeGB+X/BSqmk6/B0gwWJ4bEAxkepVTN8l0mVrJ5zRRmYaCKVplWy6Z3W012m3VVK3A1o3rm/fgfVrQkw==}
|
||||
dev: true
|
||||
|
||||
/@fluencelabs/avm@0.62.0:
|
||||
resolution: {integrity: sha512-6jV8Ix967VG7A8fhc0jP+nMT6heR9wQ8RpPyFzeorHZmILBszGwb/j02PW6WNA0E3bsAGZYyG5N0NanG9pH5tQ==}
|
||||
/@fluencelabs/avm@0.59.0:
|
||||
resolution: {integrity: sha512-dm6CMCAq5HLEInbYICd17PlhDiKR5kxVFL4v4O0BfQhKskSA4riC+E/6pcQqj8XK7I3bKkFZCoY4bq1q6LDarw==}
|
||||
dependencies:
|
||||
msgpack-lite: 0.1.26
|
||||
multicodec: 3.2.1
|
||||
dev: false
|
||||
|
||||
/@fluencelabs/marine-js@0.13.0:
|
||||
resolution: {integrity: sha512-/qGc6FkLAwgf4U1P8eSb3ECY6cNm77FjfGokva+Pme4VB9EAKDdWxpY/F+AcdUyJ7XUgl/I4eMebTDGpMto5bQ==}
|
||||
/@fluencelabs/marine-js@0.8.0:
|
||||
resolution: {integrity: sha512-exxp0T0Dk69dxnbpAiVc/qp66s8Jq/P71TRB9aeQZLZy3EQtVAMCBJvwQY8LzVVlYEyVjmqQkFG/N0rAeYU1vg==}
|
||||
dependencies:
|
||||
'@wasmer/wasi': 0.12.0
|
||||
'@wasmer/wasmfs': 0.12.0
|
||||
@ -3140,8 +3144,6 @@ packages:
|
||||
protons-runtime: 5.2.2
|
||||
uint8arraylist: 2.4.8
|
||||
uint8arrays: 4.0.10
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
/@libp2p/crypto@4.0.1:
|
||||
@ -3368,6 +3370,20 @@ packages:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
/@multiformats/multiaddr@11.3.0:
|
||||
resolution: {integrity: sha512-Inrmp986nHe92pgYyOWNVnB8QDmYe5EhR/7TStc46O4YEm87pbc1i4DWiTlEJ6tOpL8V6IBH5ol8BZsIaN+Tww==}
|
||||
engines: {node: '>=16.0.0', npm: '>=7.0.0'}
|
||||
dependencies:
|
||||
'@chainsafe/is-ip': 2.0.2
|
||||
dns-over-http-resolver: 2.1.3
|
||||
err-code: 3.0.1
|
||||
multiformats: 11.0.2
|
||||
uint8arrays: 4.0.10
|
||||
varint: 6.0.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@multiformats/multiaddr@12.1.12:
|
||||
resolution: {integrity: sha512-hrY4uN/oeYhn410jBSpVXn37eenn4djKOj6Dh20Yh4xzGgqmS6u+/X08zQfHgWNjk7NJejPUcRfHEfs8e/MOcw==}
|
||||
dependencies:
|
||||
@ -6819,6 +6835,17 @@ packages:
|
||||
resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==}
|
||||
dev: false
|
||||
|
||||
/dns-over-http-resolver@2.1.3:
|
||||
resolution: {integrity: sha512-zjRYFhq+CsxPAouQWzOsxNMvEN+SHisjzhX8EMxd2Y0EG3thvn6wXQgMJLnTDImkhe4jhLbOQpXtL10nALBOSA==}
|
||||
dependencies:
|
||||
debug: 4.3.4
|
||||
native-fetch: 4.0.2(undici@5.28.2)
|
||||
receptacle: 1.3.2
|
||||
undici: 5.28.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/dns-over-http-resolver@3.0.0:
|
||||
resolution: {integrity: sha512-5+BI+B7n8LKhNaEZBYErr+CBd9t5nYtjunByLhrLGtZ+i3TRgiU8yE87pCjEBu2KOwNsD9ljpSXEbZ4S8xih5g==}
|
||||
dependencies:
|
||||
@ -7031,7 +7058,6 @@ packages:
|
||||
|
||||
/err-code@3.0.1:
|
||||
resolution: {integrity: sha512-GiaH0KJUewYok+eeY05IIgjtAe4Yltygk9Wqp1V5yVWLdhf0hYZchRjNIT9bb0mSwRcIusT3cx7PJUf3zEIfUA==}
|
||||
dev: false
|
||||
|
||||
/error-ex@1.3.2:
|
||||
resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==}
|
||||
@ -7760,7 +7786,6 @@ packages:
|
||||
|
||||
/event-lite@0.1.3:
|
||||
resolution: {integrity: sha512-8qz9nOz5VeD2z96elrEKD2U433+L3DWdUdDkOINLGOJvx1GsMBbMn0aCeu28y8/e85A6mCigBiFlYMnTBEGlSw==}
|
||||
dev: false
|
||||
|
||||
/eventemitter3@4.0.7:
|
||||
resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==}
|
||||
@ -8739,12 +8764,6 @@ packages:
|
||||
|
||||
/int64-buffer@0.1.10:
|
||||
resolution: {integrity: sha512-v7cSY1J8ydZ0GyjUHqF+1bshJ6cnEVLo9EnjB8p+4HDRPZc9N5jjmvUV7NvEsqQOKyH0pmIBFWXVQbiS0+OBbA==}
|
||||
dev: false
|
||||
|
||||
/int64-buffer@1.0.1:
|
||||
resolution: {integrity: sha512-+3azY4pXrjAupJHU1V9uGERWlhoqNswJNji6aD/02xac7oxol508AsMC5lxKhEqyZeDFy3enq5OGWXF4u75hiw==}
|
||||
engines: {node: '>= 4.5.0'}
|
||||
dev: false
|
||||
|
||||
/interface-datastore@8.2.10:
|
||||
resolution: {integrity: sha512-D8RuxMdjOPB+j6WMDJ+I2aXTDzUT6DIVjgzo1E+ODL7w8WrSFl9FXD2SYmgj6vVzdb7Kb5qmAI9pEnDZJz7ifg==}
|
||||
@ -9028,7 +9047,6 @@ packages:
|
||||
|
||||
/isarray@1.0.0:
|
||||
resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==}
|
||||
dev: false
|
||||
|
||||
/isarray@2.0.5:
|
||||
resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==}
|
||||
@ -10526,7 +10544,6 @@ packages:
|
||||
ieee754: 1.2.1
|
||||
int64-buffer: 0.1.10
|
||||
isarray: 1.0.0
|
||||
dev: false
|
||||
|
||||
/multicast-dns@7.2.5:
|
||||
resolution: {integrity: sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg==}
|
||||
@ -10542,17 +10559,20 @@ packages:
|
||||
dependencies:
|
||||
uint8arrays: 3.1.1
|
||||
varint: 6.0.0
|
||||
dev: false
|
||||
|
||||
/multiformats@11.0.1:
|
||||
resolution: {integrity: sha512-atWruyH34YiknSdL5yeIir00EDlJRpHzELYQxG7Iy29eCyL+VrZHpPrX5yqlik3jnuqpLpRKVZ0SGVb9UzKaSA==}
|
||||
engines: {node: '>=16.0.0', npm: '>=7.0.0'}
|
||||
dev: false
|
||||
|
||||
/multiformats@11.0.2:
|
||||
resolution: {integrity: sha512-b5mYMkOkARIuVZCpvijFj9a6m5wMVLC7cf/jIPd5D/ARDOfLC5+IFkbgDXQgcU2goIsTD/O9NY4DI/Mt4OGvlg==}
|
||||
engines: {node: '>=16.0.0', npm: '>=7.0.0'}
|
||||
dev: true
|
||||
|
||||
/multiformats@12.1.3:
|
||||
resolution: {integrity: sha512-eajQ/ZH7qXZQR2AgtfpmSMizQzmyYVmCql7pdhldPuYQi4atACekbJaQplk6dWyIi10jCaFnd6pqvcEFXjbaJw==}
|
||||
engines: {node: '>=16.0.0', npm: '>=7.0.0'}
|
||||
dev: false
|
||||
|
||||
/multiformats@13.0.1:
|
||||
resolution: {integrity: sha512-bt3R5iXe2O8xpp3wkmQhC73b/lC4S2ihU8Dndwcsysqbydqb8N+bpP116qMcClZ17g58iSIwtXUTcg2zT4sniA==}
|
||||
@ -10560,7 +10580,6 @@ packages:
|
||||
|
||||
/multiformats@9.9.0:
|
||||
resolution: {integrity: sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg==}
|
||||
dev: false
|
||||
|
||||
/mz@2.7.0:
|
||||
resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==}
|
||||
@ -10575,6 +10594,14 @@ packages:
|
||||
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
|
||||
hasBin: true
|
||||
|
||||
/native-fetch@4.0.2(undici@5.28.2):
|
||||
resolution: {integrity: sha512-4QcVlKFtv2EYVS5MBgsGX5+NWKtbDbIECdUXDBGDMAZXq3Jkv9zf+y8iS7Ub8fEdga3GpYeazp9gauNqXHJOCg==}
|
||||
peerDependencies:
|
||||
undici: '*'
|
||||
dependencies:
|
||||
undici: 5.28.2
|
||||
dev: true
|
||||
|
||||
/natural-compare-lite@1.4.0:
|
||||
resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==}
|
||||
dev: false
|
||||
@ -12613,7 +12640,6 @@ packages:
|
||||
resolution: {integrity: sha512-HrsFvqZZheusncQRiEE7GatOAETrARKV/lnfYicIm8lbvp/JQOdADOfhjBd2DajvoszEyxSM6RlAAIZgEoeu/A==}
|
||||
dependencies:
|
||||
ms: 2.1.3
|
||||
dev: false
|
||||
|
||||
/recursive-readdir@2.2.3:
|
||||
resolution: {integrity: sha512-8HrF5ZsXk5FAH9dgsx3BlUer73nIhuj+9OrQwEbLTPOBzGkL1lsFCR01am+v+0m2Cmbs1nP12hLDl5FA7EszKA==}
|
||||
@ -14132,13 +14158,11 @@ packages:
|
||||
resolution: {integrity: sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg==}
|
||||
dependencies:
|
||||
multiformats: 9.9.0
|
||||
dev: false
|
||||
|
||||
/uint8arrays@4.0.10:
|
||||
resolution: {integrity: sha512-AnJNUGGDJAgFw/eWu/Xb9zrVKEGlwJJCaeInlf3BkecE/zcTobk5YXYIPNQJO1q5Hh1QZrQQHf0JvcHqz2hqoA==}
|
||||
dependencies:
|
||||
multiformats: 12.1.3
|
||||
dev: false
|
||||
|
||||
/uint8arrays@4.0.3:
|
||||
resolution: {integrity: sha512-b+aKlI2oTnxnfeSQWV1sMacqSNxqhtXySaH6bflvONGxF8V/fT3ZlYH7z2qgGfydsvpVo4JUgM/Ylyfl2YouCg==}
|
||||
@ -14176,6 +14200,13 @@ packages:
|
||||
resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==}
|
||||
dev: true
|
||||
|
||||
/undici@5.28.2:
|
||||
resolution: {integrity: sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w==}
|
||||
engines: {node: '>=14.0'}
|
||||
dependencies:
|
||||
'@fastify/busboy': 2.1.0
|
||||
dev: true
|
||||
|
||||
/unicode-canonical-property-names-ecmascript@2.0.0:
|
||||
resolution: {integrity: sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==}
|
||||
engines: {node: '>=4'}
|
||||
@ -14349,7 +14380,6 @@ packages:
|
||||
|
||||
/varint@6.0.0:
|
||||
resolution: {integrity: sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==}
|
||||
dev: false
|
||||
|
||||
/vary@1.1.2:
|
||||
resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==}
|
||||
|
Loading…
x
Reference in New Issue
Block a user