Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

Commit 9eeeb0f

Browse files
author
Akim
authored
feat(fluence-network-environment): Introduce fluence-network-environment package (#442)
* Introduce fluence-network-environment package * Refactor types * Fix type * Remove BC * Update CLI * Remove fluence local up from CI * Add configs * Add type module * Update e2e file * Remove lock file * Revert "Add configs" This reverts commit ade4476. * Revert "Remove fluence local up from CI" This reverts commit 477a12d.
1 parent aea5efb commit 9eeeb0f

File tree

47 files changed

+199
-64
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+199
-64
lines changed

.fluence/schemas/env.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,13 @@
1111
"enum": [
1212
"dar",
1313
"stage",
14-
"kras",
1514
"local",
1615
"custom"
1716
],
1817
"nullable": true
1918
},
2019
"version": {
21-
"type": "number",
20+
"type": "integer",
2221
"const": 0
2322
}
2423
},

.github/release-please/config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"packages/core/marine-worker": {},
1414
"packages/core/aqua-to-js": {},
1515
"packages/core/interfaces": {},
16-
"packages/core/npm-aqua-compiler": {}
16+
"packages/core/npm-aqua-compiler": {},
17+
"packages/core/fluence-network-environment": {}
1718
}
1819
}

.github/release-please/manifest.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
"packages/core/aqua-to-js": "0.3.13",
55
"packages/core/js-client-isomorphic": "0.6.0",
66
"packages/core/interfaces": "0.12.0",
7-
"packages/core/npm-aqua-compiler": "0.0.3"
7+
"packages/core/npm-aqua-compiler": "0.0.3",
8+
"packages/core/fluence-network-environment": "1.1.2"
89
}

.github/workflows/e2e.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,12 @@ jobs:
4343
uses: fluencelabs/aqua/.github/workflows/tests.yml@main
4444
with:
4545
js-client-snapshots: "${{ needs.js-client.outputs.js-client-snapshots }}"
46+
nox-image: "docker.fluence.dev/nox:feat-vm-425-aquavm-mem-limits-from-config-2_5056_1"
4647
flox:
4748
needs:
4849
- js-client
4950

5051
uses: fluencelabs/flox/.github/workflows/tests.yml@main
5152
with:
5253
js-client-snapshots: "${{ needs.js-client.outputs.js-client-snapshots }}"
54+
nox-image: "docker.fluence.dev/nox:feat-vm-425-aquavm-mem-limits-from-config-2_5056_1"

.github/workflows/run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ jobs:
2828
uses: ./.github/workflows/tests.yml
2929
with:
3030
ref: ${{ github.ref }}
31-
nox-image: "docker.fluence.dev/nox:renovate-avm_4905_1"
31+
nox-image: "docker.fluence.dev/nox:feat-vm-425-aquavm-mem-limits-from-config-2_5056_1"

.github/workflows/tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ jobs:
8181

8282
- name: Run nox network
8383
run: fluence local up
84+
env:
85+
FCLI_V_NOX: docker.fluence.dev/nox:feat-vm-425-aquavm-mem-limits-from-config-2_5056_1
8486

8587
- name: Setup pnpm
8688
uses: pnpm/action-setup@v2.2.4

packages/core/aqua-to-js/src/generate/service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { JSONValue, ServiceDef } from "@fluencelabs/interfaces";
17+
import { ServiceDef } from "@fluencelabs/interfaces";
1818

1919
import { recursiveRenameLaquaProps } from "../utils.js";
2020

@@ -63,6 +63,6 @@ function generateRegisterServiceOverload(
6363
}
6464

6565
function serviceToJson(service: ServiceDef): string {
66-
const record: Record<never, JSONValue> = service;
66+
const record: Record<never, unknown> = service;
6767
return JSON.stringify(recursiveRenameLaquaProps(record), null, 4);
6868
}

packages/core/aqua-to-js/src/utils.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import { join } from "path";
2020
import {
2121
ArrowType,
2222
ArrowWithoutCallbacks,
23-
JSONValue,
2423
LabeledProductType,
2524
NilType,
2625
SimpleTypes,
@@ -67,7 +66,7 @@ export function getFuncArgs(
6766
}
6867
}
6968

70-
export function recursiveRenameLaquaProps(obj: JSONValue): unknown {
69+
export function recursiveRenameLaquaProps(obj: unknown): unknown {
7170
if (typeof obj !== "object" || obj === null) {
7271
return obj;
7372
}
@@ -78,7 +77,9 @@ export function recursiveRenameLaquaProps(obj: JSONValue): unknown {
7877
});
7978
}
8079

81-
return Object.getOwnPropertyNames(obj).reduce((acc, prop) => {
80+
const objType: Record<never, unknown> = obj;
81+
82+
return Object.getOwnPropertyNames(objType).reduce((acc, prop) => {
8283
let accessProp = prop;
8384

8485
if (prop.includes("Laqua_js")) {
@@ -89,12 +90,14 @@ export function recursiveRenameLaquaProps(obj: JSONValue): unknown {
8990
throw new Error(`Bad property name: ${prop}.`);
9091
}
9192

92-
if (refinedProperty in obj) {
93+
if (refinedProperty in objType) {
9394
accessProp = refinedProperty;
9495
}
9596
}
9697

97-
const laquaProp = obj[accessProp];
98+
const accessObj: Record<string, unknown> = objType;
99+
100+
const laquaProp = accessObj[accessProp];
98101

99102
if (laquaProp === undefined) {
100103
return acc;
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Compiled binary addons (https://nodejs.org/api/addons.html)
10+
build/Release
11+
bundle/
12+
dist/
13+
14+
# Dependency directories
15+
node_modules/
16+
jspm_packages/
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Changelog
2+
3+
## [1.1.2](https://github.com/fluencelabs/fluence-network-environment/compare/fluence-network-environment-v1.1.1...fluence-network-environment-v1.1.2) (2023-07-05)
4+
5+
6+
### Bug Fixes
7+
8+
* Update DNS records after kras migration to Nomad ([#11](https://github.com/fluencelabs/fluence-network-environment/issues/11)) ([446df4f](https://github.com/fluencelabs/fluence-network-environment/commit/446df4f5eaa64d8d5b803e23f73b8cf8e4331d2e))
9+
10+
## [1.1.1](https://github.com/fluencelabs/fluence-network-environment/compare/fluence-network-environment-v1.1.0...fluence-network-environment-v1.1.1) (2023-07-03)
11+
12+
13+
### Bug Fixes
14+
15+
* Actually build package ([#9](https://github.com/fluencelabs/fluence-network-environment/issues/9)) ([25ef57e](https://github.com/fluencelabs/fluence-network-environment/commit/25ef57e061d75abaa08d58a4fef89e71d9cfb4da))
16+
17+
## [1.1.0](https://github.com/fluencelabs/fluence-network-environment/compare/fluence-network-environment-v1.0.14...fluence-network-environment-v1.1.0) (2023-06-19)
18+
19+
20+
### Features
21+
22+
* Rename krasnodar to kras. Add functions to pick random nodes ([#4](https://github.com/fluencelabs/fluence-network-environment/issues/4)) ([a65217f](https://github.com/fluencelabs/fluence-network-environment/commit/a65217fd2e0d3c65f4ae54105b54018af778e92d))
23+
* Update stage multiaddr ([#7](https://github.com/fluencelabs/fluence-network-environment/issues/7)) ([3c0f1f8](https://github.com/fluencelabs/fluence-network-environment/commit/3c0f1f89a5f713e94ee0104bcf0fa9b66f8a5cca))
24+
25+
26+
### Bug Fixes
27+
28+
* Update testnet DNS records ([#8](https://github.com/fluencelabs/fluence-network-environment/issues/8)) ([2ed6209](https://github.com/fluencelabs/fluence-network-environment/commit/2ed6209c9c122fe2cd2b7811379c97163c64db88))

0 commit comments

Comments
 (0)