aqua/integration-tests
InversionSpaces 6be2a3d5da
feat(compiler): Services as abilities [fixes LNG-206] (#873)
* Refactor ServiceSem

* Refactor AbilityIdSem

* Remove tokens from state

* Refactor

* Add mangler

* Fix tests

* Refactor valueToRaw

* ServiceIdTag

* AbilityId -> ServiceId

* Add ServiceType

* Fix defineServiceType

* Refactor resolveArrowDef

* Refactor TypesHelper

* Add ServiceIdTag inlining

* Implement resolution

* Add service as ability passing

* Fix importing services

* Fix cli

* Implement default service

* Remove println

* Fix capture

* Add integration test

* Fix id

* Fix test

* Fix test

* Refactor test

* Do not resolve id

* Refactor FuncArrow creation

* Refactor FuncArrow wrapper creation

* Add named arguments

* Add comment

* ensureIsString -> valueToStringRaw, refactor OnSem

* Resolve services as abilities

* Add name to varNames

* Remove service hack

* Capture services, do not rename captured

* Rename arrows along with values

* Fix CallArrowRaw.map

* Fix unit tests

* Remove service case

* Refactor abilities state

* Propagate rootServiceIds

* Remove unused

* Add comments

* Refactor

* Refactor

* Add test

---------

Co-authored-by: Dima <dmitry.shakhtarin@fluence.ai>
2023-09-15 10:34:21 +02:00
..
aqua feat(compiler): Services as abilities [fixes LNG-206] (#873) 2023-09-15 10:34:21 +02:00
src feat(compiler): Services as abilities [fixes LNG-206] (#873) 2023-09-15 10:34:21 +02:00
.gitignore chore: move integration tests to repo [LNG-167] (#756) 2023-06-19 19:28:34 +03:00
.npmignore chore: move integration tests to repo [LNG-167] (#756) 2023-06-19 19:28:34 +03:00
.prettierrc.cjs feat(compiler): Add boolean algebra [fixes LNG-211] (#814) 2023-07-27 14:11:36 +03:00
jest.config.cjs chore: move integration tests to repo [LNG-167] (#756) 2023-06-19 19:28:34 +03:00
LICENSE chore: move integration tests to repo [LNG-167] (#756) 2023-06-19 19:28:34 +03:00
package.json fix(deps): update dependency @fluencelabs/js-client to v0.1.4 (#887) 2023-09-14 13:32:45 +00:00
README.md chore: move integration tests to repo [LNG-167] (#756) 2023-06-19 19:28:34 +03:00
tsconfig.json chore: Compile integration tests with aqua-api [fixes LNG-240] (#884) 2023-09-12 13:11:50 +03:00

Aqua playground

Repository demonstrating the how to start writing aqua and integrate it into a typescript application

Getting started

Install dependencies

npm install

To compile the aqua files execute

npm run compile-aqua

To start the index.ts execute

npm run run

To run all examples in example directory

npm run exec

If everything works correctly logs without errors will be printed on a screen:

Then you can add or modify aqua files in aqua directory, these files will be compiled into /src/compiled and you can use it in a TypeScript in your preferable way.

Project structure

Aqua source files are located in src/aquadirectory.

Aqua files are compiled into .ts located in /src/compiled directory.

Entry point to use aqua compiled files from TypeScript: /src/index.ts

Code that call all examples and check results: /src/run-examples.ts

References

Documentation for the compiler can be found in the official repo: https://github.com/fluencelabs/aqua