From 59416e4c3ddb891053c5cd989dcdf7f6dd2ab0f3 Mon Sep 17 00:00:00 2001 From: shamsartem Date: Fri, 18 Oct 2024 16:17:01 +0200 Subject: [PATCH] feat: add additional caching (#1062) * move cli * optimize * tmp * simplify and fix * fix actions, before build * return * fix * add dir * fix? * fix * fix * Apply automatic changes * fix * fix * fix * fix * Apply automatic changes * fix * move * fix * fix * fix * cache tests * move * remove * fix * fix * fix * fix * fix * sort and turn test groups back on * remove node binaries, add github cache action * fix --------- Co-authored-by: shamsartem --- .github/actions/replace-version/action.yml | 2 +- .github/actions/replace-version/dist/index.js | 2 + .github/actions/replace-version/index.js | 2 + .github/renovate.json | 13 +- .github/workflows/docs.yml | 7 - .github/workflows/pack.yml | 42 +- .github/workflows/promote.yml | 16 +- .github/workflows/snapshot.yml | 37 +- .github/workflows/tests.yml | 54 +- CONTRIBUTING.md | 11 +- README.md | 6 +- docs/README.md | 4 - docs/commands/README.md | 2026 ---------------- docs/configs/env.md | 11 - install.sh | 2 +- package.json | 21 + packages/cli-connector/package.json | 2 +- packages/cli/package.json | 26 + {cli => packages/cli/package}/.gitignore | 0 {cli => packages/cli/package}/.prettierignore | 0 .../patches/oclif-npm-4.1.0-9d1cce6fed.patch | 0 .../package}/.yarn/releases/yarn-4.2.2.cjs | 0 {cli => packages/cli/package}/.yarnrc.yml | 0 {cli => packages/cli/package}/CHANGELOG.md | 0 {cli => packages/cli/package}/bin/dev.js | 0 {cli => packages/cli/package}/bin/run.cmd | 0 {cli => packages/cli/package}/bin/run.js | 0 packages/cli/package/docs/commands/README.md | 2066 +++++++++++++++++ .../cli/package/docs}/configs/README.md | 0 .../cli/package/docs}/configs/config.md | 0 .../package/docs}/configs/docker-compose.md | 0 packages/cli/package/docs/configs/env.md | 29 + .../cli/package/docs}/configs/fluence.md | 37 +- .../cli/package/docs}/configs/module.md | 0 .../docs}/configs/provider-artifacts.md | 22 +- .../package/docs}/configs/provider-secrets.md | 0 .../cli/package/docs}/configs/provider.md | 210 +- .../cli/package/docs}/configs/service.md | 0 .../cli/package/docs}/configs/spell.md | 0 .../cli/package/docs}/configs/workers.md | 54 +- .../cli/package}/eslint.config.js | 0 {cli => packages/cli/package}/example.env | 0 .../nsis/Plugins/amd64-unicode/EnVar.dll | Bin .../package}/nsis/Plugins/x86-ansi/EnVar.dll | Bin .../nsis/Plugins/x86-unicode/EnVar.dll | Bin .../cli/package}/nsis/custom-installer.nsi | 0 .../cli/package}/nsis/include/.gitkeep | 0 {cli => packages/cli/package}/package.json | 6 +- .../cli/package}/resources/license-header.js | 0 .../cli/package}/src/baseCommand.ts | 0 .../cli/package}/src/beforeBuild.ts | 22 +- .../cli-aqua-dependencies/package-lock.json | 0 .../src/cli-aqua-dependencies/package.json | 0 .../cli/package}/src/commands/air/beautify.ts | 0 .../cli/package}/src/commands/aqua.ts | 0 .../cli/package}/src/commands/aqua/imports.ts | 0 .../cli/package}/src/commands/aqua/json.ts | 0 .../cli/package}/src/commands/aqua/yml.ts | 0 .../cli/package}/src/commands/build.ts | 0 .../cli/package}/src/commands/chain/info.ts | 0 .../package}/src/commands/deal/change-app.ts | 0 .../cli/package}/src/commands/deal/create.ts | 0 .../cli/package}/src/commands/deal/deploy.ts | 0 .../cli/package}/src/commands/deal/deposit.ts | 0 .../cli/package}/src/commands/deal/info.ts | 0 .../cli/package}/src/commands/deal/logs.ts | 0 .../cli/package}/src/commands/deal/stop.ts | 0 .../package}/src/commands/deal/withdraw.ts | 0 .../package}/src/commands/deal/workers-add.ts | 0 .../src/commands/deal/workers-remove.ts | 0 .../cli/package}/src/commands/default/env.ts | 0 .../package}/src/commands/default/peers.ts | 0 .../src/commands/delegator/collateral-add.ts | 0 .../commands/delegator/collateral-withdraw.ts | 0 .../src/commands/delegator/reward-withdraw.ts | 0 .../cli/package}/src/commands/dep/install.ts | 0 .../cli/package}/src/commands/dep/reset.ts | 0 .../package}/src/commands/dep/uninstall.ts | 0 .../cli/package}/src/commands/dep/versions.ts | 80 +- .../cli/package}/src/commands/deploy.ts | 0 .../cli/package}/src/commands/init.ts | 0 .../cli/package}/src/commands/key/default.ts | 0 .../cli/package}/src/commands/key/new.ts | 0 .../cli/package}/src/commands/key/remove.ts | 0 .../cli/package}/src/commands/local/down.ts | 0 .../cli/package}/src/commands/local/init.ts | 0 .../cli/package}/src/commands/local/logs.ts | 0 .../cli/package}/src/commands/local/ps.ts | 0 .../cli/package}/src/commands/local/up.ts | 0 .../cli/package}/src/commands/module/add.ts | 0 .../cli/package}/src/commands/module/build.ts | 0 .../cli/package}/src/commands/module/new.ts | 0 .../cli/package}/src/commands/module/pack.ts | 0 .../package}/src/commands/module/remove.ts | 0 .../src/commands/provider/cc-activate.ts | 0 .../provider/cc-collateral-withdraw.ts | 0 .../src/commands/provider/cc-create.ts | 0 .../src/commands/provider/cc-finish.ts | 0 .../package}/src/commands/provider/cc-info.ts | 0 .../src/commands/provider/cc-remove.ts | 0 .../commands/provider/cc-rewards-withdraw.ts | 0 .../src/commands/provider/deal-exit.ts | 0 .../src/commands/provider/deal-list.ts | 0 .../commands/provider/deal-rewards-info.ts | 0 .../provider/deal-rewards-withdraw.ts | 0 .../cli/package}/src/commands/provider/gen.ts | 0 .../package}/src/commands/provider/info.ts | 0 .../package}/src/commands/provider/init.ts | 0 .../src/commands/provider/offer-create.ts | 0 .../src/commands/provider/offer-info.ts | 0 .../src/commands/provider/offer-remove.ts | 0 .../src/commands/provider/offer-update.ts | 0 .../src/commands/provider/register.ts | 0 .../commands/provider/tokens-distribute.ts | 0 .../src/commands/provider/tokens-withdraw.ts | 0 .../package}/src/commands/provider/update.ts | 0 .../cli/package}/src/commands/run.ts | 0 .../cli/package}/src/commands/service/add.ts | 0 .../cli/package}/src/commands/service/new.ts | 0 .../package}/src/commands/service/remove.ts | 0 .../cli/package}/src/commands/service/repl.ts | 0 .../cli/package}/src/commands/spell/build.ts | 0 .../cli/package}/src/commands/spell/new.ts | 0 .../package}/src/commands/workers/deploy.ts | 0 .../cli/package}/src/commands/workers/logs.ts | 0 .../package}/src/commands/workers/remove.ts | 0 .../package}/src/commands/workers/upload.ts | 0 .../cli/package}/src/environment.d.ts | 0 .../cli/package}/src/errorInterceptor.js | 0 {cli => packages/cli/package}/src/fetch.d.ts | 0 .../cli/package}/src/genConfigDocs.ts | 0 {cli => packages/cli/package}/src/index.ts | 0 .../cli/package}/src/lib/addService.ts | 0 .../cli/package}/src/lib/ajvInstance.ts | 0 {cli => packages/cli/package}/src/lib/aqua.ts | 0 .../cli/package}/src/lib/build.ts | 0 .../cli/package}/src/lib/buildModules.ts | 0 .../cli/package}/src/lib/chain/chainConfig.ts | 0 .../package}/src/lib/chain/chainValidators.ts | 0 .../cli/package}/src/lib/chain/commitment.ts | 0 .../cli/package}/src/lib/chain/conversions.ts | 0 .../cli/package}/src/lib/chain/currencies.ts | 0 .../cli/package}/src/lib/chain/deals.ts | 0 .../src/lib/chain/depositCollateral.ts | 0 .../package}/src/lib/chain/depositToDeal.ts | 0 .../package}/src/lib/chain/distributeToNox.ts | 0 .../cli/package}/src/lib/chain/offer/offer.ts | 0 .../src/lib/chain/offer/updateOffers.ts | 0 .../package}/src/lib/chain/printDealInfo.ts | 0 .../package}/src/lib/chain/providerInfo.ts | 0 .../cli/package}/src/lib/chainFlags.ts | 0 .../cli/package}/src/lib/commandObj.ts | 0 .../package}/src/lib/compileAquaAndWatch.ts | 0 .../package}/src/lib/configs/globalConfigs.ts | 0 .../package}/src/lib/configs/initConfig.ts | 2 +- .../cli/package}/src/lib/configs/keyPair.ts | 0 .../lib/configs/project/compose.schema.json | 0 .../src/lib/configs/project/dockerCompose.ts | 0 .../package}/src/lib/configs/project/env.ts | 0 .../src/lib/configs/project/fluence.ts | 0 .../src/lib/configs/project/module.ts | 0 .../src/lib/configs/project/projectSecrets.ts | 0 .../src/lib/configs/project/provider.ts | 0 .../lib/configs/project/providerArtifacts.ts | 0 .../lib/configs/project/providerSecrets.ts | 0 .../src/lib/configs/project/service.ts | 0 .../package}/src/lib/configs/project/spell.ts | 0 .../src/lib/configs/project/workers.ts | 0 .../package}/src/lib/configs/user/config.ts | 0 .../src/lib/configs/user/userSecrets.ts | 0 .../cli/package}/src/lib/const.ts | 0 .../cli/package}/src/lib/countly.ts | 0 {cli => packages/cli/package}/src/lib/dbg.ts | 0 {cli => packages/cli/package}/src/lib/deal.ts | 0 .../cli/package}/src/lib/dealClient.ts | 0 .../cli/package}/src/lib/deploy.ts | 0 .../cli/package}/src/lib/deployWorkers.ts | 0 .../cli/package}/src/lib/dockerCompose.ts | 0 .../package}/src/lib/ensureChainNetwork.ts | 0 {cli => packages/cli/package}/src/lib/env.ts | 0 .../cli/package}/src/lib/execPromise.ts | 0 .../cli/package}/src/lib/generateNewModule.ts | 0 .../src/lib/generateUserProviderConfig.ts | 0 .../package}/src/lib/helpers/aquaImports.ts | 0 .../cli/package}/src/lib/helpers/bigintOps.ts | 0 .../package}/src/lib/helpers/downloadFile.ts | 0 .../src/lib/helpers/ensureFluenceProject.ts | 0 .../src/lib/helpers/formatAquaLogs.ts | 0 .../lib/helpers/generateServiceInterface.ts | 0 .../src/lib/helpers/getIsInteractive.ts | 0 .../src/lib/helpers/getPeerIdFromSecretKey.ts | 0 .../cli/package}/src/lib/helpers/jsToAqua.ts | 0 .../package}/src/lib/helpers/logAndFail.ts | 0 .../package}/src/lib/helpers/packModule.ts | 0 .../src/lib/helpers/recursivelyFindFile.ts | 0 .../src/lib/helpers/serviceConfigToml.ts | 0 .../cli/package}/src/lib/helpers/spinner.ts | 0 .../src/lib/helpers/typesafeStringify.ts | 0 .../cli/package}/src/lib/helpers/utils.ts | 0 .../package}/src/lib/helpers/validations.ts | 0 {cli => packages/cli/package}/src/lib/init.ts | 0 .../cli/package}/src/lib/jsClient.ts | 0 .../cli/package}/src/lib/keyPairs.ts | 0 .../cli/package}/src/lib/lifeCycle.ts | 0 .../package}/src/lib/localServices/ipfs.ts | 0 .../cli/package}/src/lib/marineCli.ts | 0 .../cli/package}/src/lib/multiaddres.ts | 0 .../src/lib/multiaddresWithoutLocal.ts | 0 {cli => packages/cli/package}/src/lib/npm.ts | 0 .../cli/package}/src/lib/paths.ts | 0 .../cli/package}/src/lib/prompt.ts | 0 .../src/lib/resolveComputePeersByNames.ts | 0 .../cli/package}/src/lib/resolveFluenceEnv.ts | 0 {cli => packages/cli/package}/src/lib/rust.ts | 0 .../cli/package}/src/lib/server.ts | 0 .../cli/package}/src/lib/setupEnvironment.ts | 0 .../cli/package}/src/lib/typeHelpers.ts | 0 {cli => packages/cli/package}/src/types.d.ts | 0 .../cli/package}/src/versions.json | 0 {cli => packages/cli/package}/src/versions.ts | 0 .../test/_resources/aqua/getSpellLogs.aqua | 0 .../_resources/aqua/runDeployedWorkers.aqua | 0 .../package}/test/_resources/aqua/smoke.aqua | 0 .../test/helpers/commonWithSetupTests.ts | 0 .../cli/package}/test/helpers/constants.ts | 0 .../package}/test/helpers/localNetAccounts.ts | 0 .../cli/package}/test/helpers/paths.ts | 0 .../cli/package}/test/helpers/sharedSteps.ts | 0 .../cli/package}/test/helpers/utils.ts | 0 .../test/setup/downloadMarineAndMrepl.ts | 0 .../package}/test/setup/generateTemplates.ts | 0 .../cli/package}/test/setup/localUp.ts | 0 .../tests/__snapshots__/jsToAqua.test.ts.snap | 0 .../test/tests/deal/dealDeploy.test.ts | 0 .../test/tests/deal/dealUpdate.test.ts | 0 .../cli/package}/test/tests/jsToAqua.test.ts | 0 .../cli/package}/test/tests/provider.test.ts | 0 .../cli/package}/test/tests/smoke.test.ts | 0 .../cli/package}/test/tsconfig.json | 0 .../package}/test/validators/ajvOptions.ts | 0 .../deployedServicesAnswerValidator.ts | 0 .../test/validators/spellLogsValidator.ts | 0 .../test/validators/workerServiceValidator.ts | 0 .../tmp/cache/18.20.3/SHASUMS256.txt.asc | 0 .../cli/package}/tsconfig.eslint.json | 0 {cli => packages/cli/package}/tsconfig.json | 0 .../cli/package}/vitest.config.ts | 0 {cli => packages/cli/package}/yarn.lock | 0 packages/common/package.json | 4 +- turbo.json | 82 +- yarn.lock | 11 +- 251 files changed, 2558 insertions(+), 2351 deletions(-) delete mode 100644 docs/README.md delete mode 100644 docs/commands/README.md delete mode 100644 docs/configs/env.md create mode 100644 packages/cli/package.json rename {cli => packages/cli/package}/.gitignore (100%) rename {cli => packages/cli/package}/.prettierignore (100%) rename {cli => packages/cli/package}/.yarn/patches/oclif-npm-4.1.0-9d1cce6fed.patch (100%) rename {cli => packages/cli/package}/.yarn/releases/yarn-4.2.2.cjs (100%) rename {cli => packages/cli/package}/.yarnrc.yml (100%) rename {cli => packages/cli/package}/CHANGELOG.md (100%) rename {cli => packages/cli/package}/bin/dev.js (100%) rename {cli => packages/cli/package}/bin/run.cmd (100%) rename {cli => packages/cli/package}/bin/run.js (100%) create mode 100644 packages/cli/package/docs/commands/README.md rename {docs => packages/cli/package/docs}/configs/README.md (100%) rename {docs => packages/cli/package/docs}/configs/config.md (100%) rename {docs => packages/cli/package/docs}/configs/docker-compose.md (100%) create mode 100644 packages/cli/package/docs/configs/env.md rename {docs => packages/cli/package/docs}/configs/fluence.md (95%) rename {docs => packages/cli/package/docs}/configs/module.md (100%) rename {docs => packages/cli/package/docs}/configs/provider-artifacts.md (86%) rename {docs => packages/cli/package/docs}/configs/provider-secrets.md (100%) rename {docs => packages/cli/package/docs}/configs/provider.md (73%) rename {docs => packages/cli/package/docs}/configs/service.md (100%) rename {docs => packages/cli/package/docs}/configs/spell.md (100%) rename {docs => packages/cli/package/docs}/configs/workers.md (95%) rename {cli => packages/cli/package}/eslint.config.js (100%) rename {cli => packages/cli/package}/example.env (100%) rename {cli => packages/cli/package}/nsis/Plugins/amd64-unicode/EnVar.dll (100%) rename {cli => packages/cli/package}/nsis/Plugins/x86-ansi/EnVar.dll (100%) rename {cli => packages/cli/package}/nsis/Plugins/x86-unicode/EnVar.dll (100%) rename {cli => packages/cli/package}/nsis/custom-installer.nsi (100%) rename {cli => packages/cli/package}/nsis/include/.gitkeep (100%) rename {cli => packages/cli/package}/package.json (93%) rename {cli => packages/cli/package}/resources/license-header.js (100%) rename {cli => packages/cli/package}/src/baseCommand.ts (100%) rename {cli => packages/cli/package}/src/beforeBuild.ts (85%) rename {cli => packages/cli/package}/src/cli-aqua-dependencies/package-lock.json (100%) rename {cli => packages/cli/package}/src/cli-aqua-dependencies/package.json (100%) rename {cli => packages/cli/package}/src/commands/air/beautify.ts (100%) rename {cli => packages/cli/package}/src/commands/aqua.ts (100%) rename {cli => packages/cli/package}/src/commands/aqua/imports.ts (100%) rename {cli => packages/cli/package}/src/commands/aqua/json.ts (100%) rename {cli => packages/cli/package}/src/commands/aqua/yml.ts (100%) rename {cli => packages/cli/package}/src/commands/build.ts (100%) rename {cli => packages/cli/package}/src/commands/chain/info.ts (100%) rename {cli => packages/cli/package}/src/commands/deal/change-app.ts (100%) rename {cli => packages/cli/package}/src/commands/deal/create.ts (100%) rename {cli => packages/cli/package}/src/commands/deal/deploy.ts (100%) rename {cli => packages/cli/package}/src/commands/deal/deposit.ts (100%) rename {cli => packages/cli/package}/src/commands/deal/info.ts (100%) rename {cli => packages/cli/package}/src/commands/deal/logs.ts (100%) rename {cli => packages/cli/package}/src/commands/deal/stop.ts (100%) rename {cli => packages/cli/package}/src/commands/deal/withdraw.ts (100%) rename {cli => packages/cli/package}/src/commands/deal/workers-add.ts (100%) rename {cli => packages/cli/package}/src/commands/deal/workers-remove.ts (100%) rename {cli => packages/cli/package}/src/commands/default/env.ts (100%) rename {cli => packages/cli/package}/src/commands/default/peers.ts (100%) rename {cli => packages/cli/package}/src/commands/delegator/collateral-add.ts (100%) rename {cli => packages/cli/package}/src/commands/delegator/collateral-withdraw.ts (100%) rename {cli => packages/cli/package}/src/commands/delegator/reward-withdraw.ts (100%) rename {cli => packages/cli/package}/src/commands/dep/install.ts (100%) rename {cli => packages/cli/package}/src/commands/dep/reset.ts (100%) rename {cli => packages/cli/package}/src/commands/dep/uninstall.ts (100%) rename {cli => packages/cli/package}/src/commands/dep/versions.ts (76%) rename {cli => packages/cli/package}/src/commands/deploy.ts (100%) rename {cli => packages/cli/package}/src/commands/init.ts (100%) rename {cli => packages/cli/package}/src/commands/key/default.ts (100%) rename {cli => packages/cli/package}/src/commands/key/new.ts (100%) rename {cli => packages/cli/package}/src/commands/key/remove.ts (100%) rename {cli => packages/cli/package}/src/commands/local/down.ts (100%) rename {cli => packages/cli/package}/src/commands/local/init.ts (100%) rename {cli => packages/cli/package}/src/commands/local/logs.ts (100%) rename {cli => packages/cli/package}/src/commands/local/ps.ts (100%) rename {cli => packages/cli/package}/src/commands/local/up.ts (100%) rename {cli => packages/cli/package}/src/commands/module/add.ts (100%) rename {cli => packages/cli/package}/src/commands/module/build.ts (100%) rename {cli => packages/cli/package}/src/commands/module/new.ts (100%) rename {cli => packages/cli/package}/src/commands/module/pack.ts (100%) rename {cli => packages/cli/package}/src/commands/module/remove.ts (100%) rename {cli => packages/cli/package}/src/commands/provider/cc-activate.ts (100%) rename {cli => packages/cli/package}/src/commands/provider/cc-collateral-withdraw.ts (100%) rename {cli => packages/cli/package}/src/commands/provider/cc-create.ts (100%) rename {cli => packages/cli/package}/src/commands/provider/cc-finish.ts (100%) rename {cli => packages/cli/package}/src/commands/provider/cc-info.ts (100%) rename {cli => packages/cli/package}/src/commands/provider/cc-remove.ts (100%) rename {cli => packages/cli/package}/src/commands/provider/cc-rewards-withdraw.ts (100%) rename {cli => packages/cli/package}/src/commands/provider/deal-exit.ts (100%) rename {cli => packages/cli/package}/src/commands/provider/deal-list.ts (100%) rename {cli => packages/cli/package}/src/commands/provider/deal-rewards-info.ts (100%) rename {cli => packages/cli/package}/src/commands/provider/deal-rewards-withdraw.ts (100%) rename {cli => packages/cli/package}/src/commands/provider/gen.ts (100%) rename {cli => packages/cli/package}/src/commands/provider/info.ts (100%) rename {cli => packages/cli/package}/src/commands/provider/init.ts (100%) rename {cli => packages/cli/package}/src/commands/provider/offer-create.ts (100%) rename {cli => packages/cli/package}/src/commands/provider/offer-info.ts (100%) rename {cli => packages/cli/package}/src/commands/provider/offer-remove.ts (100%) rename {cli => packages/cli/package}/src/commands/provider/offer-update.ts (100%) rename {cli => packages/cli/package}/src/commands/provider/register.ts (100%) rename {cli => packages/cli/package}/src/commands/provider/tokens-distribute.ts (100%) rename {cli => packages/cli/package}/src/commands/provider/tokens-withdraw.ts (100%) rename {cli => packages/cli/package}/src/commands/provider/update.ts (100%) rename {cli => packages/cli/package}/src/commands/run.ts (100%) rename {cli => packages/cli/package}/src/commands/service/add.ts (100%) rename {cli => packages/cli/package}/src/commands/service/new.ts (100%) rename {cli => packages/cli/package}/src/commands/service/remove.ts (100%) rename {cli => packages/cli/package}/src/commands/service/repl.ts (100%) rename {cli => packages/cli/package}/src/commands/spell/build.ts (100%) rename {cli => packages/cli/package}/src/commands/spell/new.ts (100%) rename {cli => packages/cli/package}/src/commands/workers/deploy.ts (100%) rename {cli => packages/cli/package}/src/commands/workers/logs.ts (100%) rename {cli => packages/cli/package}/src/commands/workers/remove.ts (100%) rename {cli => packages/cli/package}/src/commands/workers/upload.ts (100%) rename {cli => packages/cli/package}/src/environment.d.ts (100%) rename {cli => packages/cli/package}/src/errorInterceptor.js (100%) rename {cli => packages/cli/package}/src/fetch.d.ts (100%) rename {cli => packages/cli/package}/src/genConfigDocs.ts (100%) rename {cli => packages/cli/package}/src/index.ts (100%) rename {cli => packages/cli/package}/src/lib/addService.ts (100%) rename {cli => packages/cli/package}/src/lib/ajvInstance.ts (100%) rename {cli => packages/cli/package}/src/lib/aqua.ts (100%) rename {cli => packages/cli/package}/src/lib/build.ts (100%) rename {cli => packages/cli/package}/src/lib/buildModules.ts (100%) rename {cli => packages/cli/package}/src/lib/chain/chainConfig.ts (100%) rename {cli => packages/cli/package}/src/lib/chain/chainValidators.ts (100%) rename {cli => packages/cli/package}/src/lib/chain/commitment.ts (100%) rename {cli => packages/cli/package}/src/lib/chain/conversions.ts (100%) rename {cli => packages/cli/package}/src/lib/chain/currencies.ts (100%) rename {cli => packages/cli/package}/src/lib/chain/deals.ts (100%) rename {cli => packages/cli/package}/src/lib/chain/depositCollateral.ts (100%) rename {cli => packages/cli/package}/src/lib/chain/depositToDeal.ts (100%) rename {cli => packages/cli/package}/src/lib/chain/distributeToNox.ts (100%) rename {cli => packages/cli/package}/src/lib/chain/offer/offer.ts (100%) rename {cli => packages/cli/package}/src/lib/chain/offer/updateOffers.ts (100%) rename {cli => packages/cli/package}/src/lib/chain/printDealInfo.ts (100%) rename {cli => packages/cli/package}/src/lib/chain/providerInfo.ts (100%) rename {cli => packages/cli/package}/src/lib/chainFlags.ts (100%) rename {cli => packages/cli/package}/src/lib/commandObj.ts (100%) rename {cli => packages/cli/package}/src/lib/compileAquaAndWatch.ts (100%) rename {cli => packages/cli/package}/src/lib/configs/globalConfigs.ts (100%) rename {cli => packages/cli/package}/src/lib/configs/initConfig.ts (99%) rename {cli => packages/cli/package}/src/lib/configs/keyPair.ts (100%) rename {cli => packages/cli/package}/src/lib/configs/project/compose.schema.json (100%) rename {cli => packages/cli/package}/src/lib/configs/project/dockerCompose.ts (100%) rename {cli => packages/cli/package}/src/lib/configs/project/env.ts (100%) rename {cli => packages/cli/package}/src/lib/configs/project/fluence.ts (100%) rename {cli => packages/cli/package}/src/lib/configs/project/module.ts (100%) rename {cli => packages/cli/package}/src/lib/configs/project/projectSecrets.ts (100%) rename {cli => packages/cli/package}/src/lib/configs/project/provider.ts (100%) rename {cli => packages/cli/package}/src/lib/configs/project/providerArtifacts.ts (100%) rename {cli => packages/cli/package}/src/lib/configs/project/providerSecrets.ts (100%) rename {cli => packages/cli/package}/src/lib/configs/project/service.ts (100%) rename {cli => packages/cli/package}/src/lib/configs/project/spell.ts (100%) rename {cli => packages/cli/package}/src/lib/configs/project/workers.ts (100%) rename {cli => packages/cli/package}/src/lib/configs/user/config.ts (100%) rename {cli => packages/cli/package}/src/lib/configs/user/userSecrets.ts (100%) rename {cli => packages/cli/package}/src/lib/const.ts (100%) rename {cli => packages/cli/package}/src/lib/countly.ts (100%) rename {cli => packages/cli/package}/src/lib/dbg.ts (100%) rename {cli => packages/cli/package}/src/lib/deal.ts (100%) rename {cli => packages/cli/package}/src/lib/dealClient.ts (100%) rename {cli => packages/cli/package}/src/lib/deploy.ts (100%) rename {cli => packages/cli/package}/src/lib/deployWorkers.ts (100%) rename {cli => packages/cli/package}/src/lib/dockerCompose.ts (100%) rename {cli => packages/cli/package}/src/lib/ensureChainNetwork.ts (100%) rename {cli => packages/cli/package}/src/lib/env.ts (100%) rename {cli => packages/cli/package}/src/lib/execPromise.ts (100%) rename {cli => packages/cli/package}/src/lib/generateNewModule.ts (100%) rename {cli => packages/cli/package}/src/lib/generateUserProviderConfig.ts (100%) rename {cli => packages/cli/package}/src/lib/helpers/aquaImports.ts (100%) rename {cli => packages/cli/package}/src/lib/helpers/bigintOps.ts (100%) rename {cli => packages/cli/package}/src/lib/helpers/downloadFile.ts (100%) rename {cli => packages/cli/package}/src/lib/helpers/ensureFluenceProject.ts (100%) rename {cli => packages/cli/package}/src/lib/helpers/formatAquaLogs.ts (100%) rename {cli => packages/cli/package}/src/lib/helpers/generateServiceInterface.ts (100%) rename {cli => packages/cli/package}/src/lib/helpers/getIsInteractive.ts (100%) rename {cli => packages/cli/package}/src/lib/helpers/getPeerIdFromSecretKey.ts (100%) rename {cli => packages/cli/package}/src/lib/helpers/jsToAqua.ts (100%) rename {cli => packages/cli/package}/src/lib/helpers/logAndFail.ts (100%) rename {cli => packages/cli/package}/src/lib/helpers/packModule.ts (100%) rename {cli => packages/cli/package}/src/lib/helpers/recursivelyFindFile.ts (100%) rename {cli => packages/cli/package}/src/lib/helpers/serviceConfigToml.ts (100%) rename {cli => packages/cli/package}/src/lib/helpers/spinner.ts (100%) rename {cli => packages/cli/package}/src/lib/helpers/typesafeStringify.ts (100%) rename {cli => packages/cli/package}/src/lib/helpers/utils.ts (100%) rename {cli => packages/cli/package}/src/lib/helpers/validations.ts (100%) rename {cli => packages/cli/package}/src/lib/init.ts (100%) rename {cli => packages/cli/package}/src/lib/jsClient.ts (100%) rename {cli => packages/cli/package}/src/lib/keyPairs.ts (100%) rename {cli => packages/cli/package}/src/lib/lifeCycle.ts (100%) rename {cli => packages/cli/package}/src/lib/localServices/ipfs.ts (100%) rename {cli => packages/cli/package}/src/lib/marineCli.ts (100%) rename {cli => packages/cli/package}/src/lib/multiaddres.ts (100%) rename {cli => packages/cli/package}/src/lib/multiaddresWithoutLocal.ts (100%) rename {cli => packages/cli/package}/src/lib/npm.ts (100%) rename {cli => packages/cli/package}/src/lib/paths.ts (100%) rename {cli => packages/cli/package}/src/lib/prompt.ts (100%) rename {cli => packages/cli/package}/src/lib/resolveComputePeersByNames.ts (100%) rename {cli => packages/cli/package}/src/lib/resolveFluenceEnv.ts (100%) rename {cli => packages/cli/package}/src/lib/rust.ts (100%) rename {cli => packages/cli/package}/src/lib/server.ts (100%) rename {cli => packages/cli/package}/src/lib/setupEnvironment.ts (100%) rename {cli => packages/cli/package}/src/lib/typeHelpers.ts (100%) rename {cli => packages/cli/package}/src/types.d.ts (100%) rename {cli => packages/cli/package}/src/versions.json (100%) rename {cli => packages/cli/package}/src/versions.ts (100%) rename {cli => packages/cli/package}/test/_resources/aqua/getSpellLogs.aqua (100%) rename {cli => packages/cli/package}/test/_resources/aqua/runDeployedWorkers.aqua (100%) rename {cli => packages/cli/package}/test/_resources/aqua/smoke.aqua (100%) rename {cli => packages/cli/package}/test/helpers/commonWithSetupTests.ts (100%) rename {cli => packages/cli/package}/test/helpers/constants.ts (100%) rename {cli => packages/cli/package}/test/helpers/localNetAccounts.ts (100%) rename {cli => packages/cli/package}/test/helpers/paths.ts (100%) rename {cli => packages/cli/package}/test/helpers/sharedSteps.ts (100%) rename {cli => packages/cli/package}/test/helpers/utils.ts (100%) rename {cli => packages/cli/package}/test/setup/downloadMarineAndMrepl.ts (100%) rename {cli => packages/cli/package}/test/setup/generateTemplates.ts (100%) rename {cli => packages/cli/package}/test/setup/localUp.ts (100%) rename {cli => packages/cli/package}/test/tests/__snapshots__/jsToAqua.test.ts.snap (100%) rename {cli => packages/cli/package}/test/tests/deal/dealDeploy.test.ts (100%) rename {cli => packages/cli/package}/test/tests/deal/dealUpdate.test.ts (100%) rename {cli => packages/cli/package}/test/tests/jsToAqua.test.ts (100%) rename {cli => packages/cli/package}/test/tests/provider.test.ts (100%) rename {cli => packages/cli/package}/test/tests/smoke.test.ts (100%) rename {cli => packages/cli/package}/test/tsconfig.json (100%) rename {cli => packages/cli/package}/test/validators/ajvOptions.ts (100%) rename {cli => packages/cli/package}/test/validators/deployedServicesAnswerValidator.ts (100%) rename {cli => packages/cli/package}/test/validators/spellLogsValidator.ts (100%) rename {cli => packages/cli/package}/test/validators/workerServiceValidator.ts (100%) rename {cli => packages/cli/package}/tmp/cache/18.20.3/SHASUMS256.txt.asc (100%) rename {cli => packages/cli/package}/tsconfig.eslint.json (100%) rename {cli => packages/cli/package}/tsconfig.json (100%) rename {cli => packages/cli/package}/vitest.config.ts (100%) rename {cli => packages/cli/package}/yarn.lock (100%) diff --git a/.github/actions/replace-version/action.yml b/.github/actions/replace-version/action.yml index 02468e0af..8edc8e6f9 100644 --- a/.github/actions/replace-version/action.yml +++ b/.github/actions/replace-version/action.yml @@ -1,6 +1,6 @@ name: Replace version description: | - Replace version in cli/src/versions.json + Replace version in packages/cli/package/src/versions.json inputs: versions: diff --git a/.github/actions/replace-version/dist/index.js b/.github/actions/replace-version/dist/index.js index 33dee92b4..2298d7005 100644 --- a/.github/actions/replace-version/dist/index.js +++ b/.github/actions/replace-version/dist/index.js @@ -2816,7 +2816,9 @@ try { const versionsFilePath = (0,path__WEBPACK_IMPORTED_MODULE_2__.join)( process.env.GITHUB_WORKSPACE, + "packages", "cli", + "package", "src", "versions.json", ); diff --git a/.github/actions/replace-version/index.js b/.github/actions/replace-version/index.js index 83e9f1f94..7938102eb 100644 --- a/.github/actions/replace-version/index.js +++ b/.github/actions/replace-version/index.js @@ -15,7 +15,9 @@ try { const versionsFilePath = join( process.env.GITHUB_WORKSPACE, + "packages", "cli", + "package", "src", "versions.json", ); diff --git a/.github/renovate.json b/.github/renovate.json index b9dc24b24..cefdc1dca 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -1,12 +1,9 @@ { - "extends": [ - "github>fluencelabs/renovate", - "github>fluencelabs/renovate:npm" - ], + "extends": ["github>fluencelabs/renovate", "github>fluencelabs/renovate:npm"], "enabledManagers": ["npm", "regex"], "regexManagers": [ { - "fileMatch": ["^cli/src/versions\\.json$"], + "fileMatch": ["^packages/cli/package/src/versions\\.json$"], "matchStrings": [ "\"nox\": \"(?[^:]+):(?.*)\",\n" ], @@ -14,7 +11,7 @@ "depNameTemplate": "nox" }, { - "fileMatch": ["^cli/src/versions\\.json$"], + "fileMatch": ["^packages/cli/package/src/versions\\.json$"], "matchStrings": [ "\"chain-rpc\": \"(?[^:]+):(?.*)\",\n", "\"chain-deploy-script\": \"(?[^:]+):(?.*)\",\n", @@ -24,7 +21,7 @@ "depNameTemplate": "chain" }, { - "fileMatch": ["^cli/src/versions\\.json$"], + "fileMatch": ["^packages/cli/package/src/versions\\.json$"], "matchStrings": [ "\"(?@fluencelabs/[^\"]+)\": \"(?[^\"\n]+)\"" ], @@ -32,7 +29,7 @@ "datasourceTemplate": "npm" }, { - "fileMatch": ["^cli/src/versions\\.json$"], + "fileMatch": ["^packages/cli/package/src/versions\\.json$"], "matchStrings": [ "\"(?[marine|mrepl|marine\\-rs\\-sdk|marine\\-rs\\-sdk\\-test]+)\": \"(?[^\"\n]+)\"" ], diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 696db0357..5e1ee9053 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -36,9 +36,6 @@ jobs: - run: yarn install - - run: yarn install - working-directory: cli - - name: Setup golang uses: actions/setup-go@v5 @@ -56,10 +53,6 @@ jobs: - name: Run on each commit run: yarn on-each-commit - - name: Run on each commit CLI - run: yarn on-each-commit - working-directory: cli - - name: Format run: yarn format diff --git a/.github/workflows/pack.yml b/.github/workflows/pack.yml index ab45322af..febb65648 100644 --- a/.github/workflows/pack.yml +++ b/.github/workflows/pack.yml @@ -47,6 +47,10 @@ on: description: "aqua snapshots" type: string default: "null" + node-version: + description: "Node version" + type: string + default: "18.20.3" env: CI: true @@ -97,15 +101,12 @@ jobs: - name: Setup node with self-hosted npm registry uses: actions/setup-node@v4 with: - node-version: "18.20.3" + node-version: ${{ inputs.node-version }} registry-url: "https://npm.fluence.dev" cache: "yarn" - run: yarn install - - run: yarn install - working-directory: cli - - name: Set js-client version if: inputs.js-client-snapshots != 'null' uses: fluencelabs/github-actions/npm-set-dependency@main @@ -113,7 +114,7 @@ jobs: package: "@fluencelabs/js-client" version: ${{ fromJson(inputs.js-client-snapshots)['js-client'] }} package-manager: yarn - working-directory: cli + working-directory: packages/cli/package - name: Set aqua-api version if: inputs.aqua-snapshots != 'null' @@ -122,7 +123,7 @@ jobs: package: "@fluencelabs/aqua-api" version: "${{ fromJson(inputs.aqua-snapshots)['aqua-api'] }}" package-manager: yarn - working-directory: cli + working-directory: packages/cli/package - name: Update versions.json uses: ./.github/actions/replace-version @@ -153,35 +154,36 @@ jobs: restore-keys: | ${{ runner.os }}-turbo- - - name: Build - run: yarn build - - - name: Build CLI - run: yarn build - working-directory: cli + - name: Cache node binaries + id: cache-node-binaries + uses: actions/cache@v3 + env: + cache-name: cache-node-binaries + with: + path: packages/cli/package/tmp/cache/node-v${{ inputs.node-version }}-${{ inputs.platform }} + key: ${{ env.cache-name }}-${{ inputs.node-version }}-${{ inputs.platform }} - name: Pack fluence-cli run: yarn pack-${{ inputs.platform }} - working-directory: cli - name: Upload fluence-cli if: inputs.upload-to-s3 == true - working-directory: cli + working-directory: packages/cli/package run: yarn upload-${{ inputs.platform }} - name: Promote fluence-cli if: inputs.channel != 'null' && inputs.platform != 'win32-x64' - working-directory: cli + working-directory: packages/cli/package run: yarn oclif promote -t ${{ inputs.platform }} --version "$(jq .[] -r ../.github/release-please/manifest.json)" --sha "$(git rev-parse --short HEAD)" --channel ${{ inputs.channel }} --no-xz --indexes - name: Promote fluence-cli windows if: inputs.channel != 'null' && inputs.platform == 'win32-x64' - working-directory: cli + working-directory: packages/cli/package run: yarn oclif promote -t ${{ inputs.platform }} --version "$(jq .[] -r ../.github/release-please/manifest.json)" --sha "$(git rev-parse --short HEAD)" --channel ${{ inputs.channel }} --no-xz --win --indexes - name: Rename archive if: inputs.platform != 'win32-x64' - run: mv cli/dist/fluence-*${{ inputs.platform }}*.tar.gz fluence-cli-${{ inputs.platform }}.tar.gz + run: mv packages/cli/package/dist/fluence-*${{ inputs.platform }}*.tar.gz fluence-cli-${{ inputs.platform }}.tar.gz - name: Upload archive to CI if: inputs.platform != 'win32-x64' @@ -199,7 +201,7 @@ jobs: - name: Rename windows installer if: inputs.platform == 'win32-x64' - run: mv cli/dist/win32/fluence-*.exe fluence-cli-${{ inputs.platform }}.exe + run: mv packages/cli/package/dist/win32/fluence-*.exe fluence-cli-${{ inputs.platform }}.exe - name: Upload windows installer to CI if: inputs.platform == 'win32-x64' @@ -217,10 +219,10 @@ jobs: - name: Promote fluence-cli to unstable if: inputs.tag != 'null' && inputs.platform != 'win32-x64' - working-directory: cli + working-directory: packages/cli/package run: yarn oclif promote -t ${{ inputs.platform }} --version "$(jq .[] -r ../.github/release-please/manifest.json)" --sha "$(git rev-parse --short HEAD)" --channel unstable --no-xz --indexes - name: Promote fluence-cli windows to unstable if: inputs.tag != 'null' && inputs.platform == 'win32-x64' - working-directory: cli + working-directory: packages/cli/package run: yarn oclif promote -t ${{ inputs.platform }} --version "$(jq .[] -r ../.github/release-please/manifest.json)" --sha "$(git rev-parse --short HEAD)" --channel unstable --win --no-xz --indexes diff --git a/.github/workflows/promote.yml b/.github/workflows/promote.yml index b3a9b0a9a..ca8e29b6d 100644 --- a/.github/workflows/promote.yml +++ b/.github/workflows/promote.yml @@ -7,11 +7,11 @@ on: description: "Promote version to channel" type: choice options: - - main # latest build from main branch - - stage # version compatible with current stage env - - testnet # version compatible with current testnet env - - stable # latest stable version (same as mainnet) - - mainnet # version compatible with current mainnet env + - main # latest build from main branch + - stage # version compatible with current stage env + - testnet # version compatible with current testnet env + - stable # latest stable version (same as mainnet) + - mainnet # version compatible with current mainnet env - unstable # version used by all CI jobs; TODO: publish automatically on every release required: true @@ -57,12 +57,12 @@ jobs: cache: "yarn" - run: yarn install - working-directory: cli + working-directory: packages/cli/package - name: Promote fluence-cli - working-directory: cli + working-directory: packages/cli/package run: yarn oclif promote -t linux-x64,darwin-x64,darwin-arm64 --version "$(jq .[] -r ../.github/release-please/manifest.json)" --sha "$(git rev-parse --short HEAD)" --channel ${{ inputs.channel }} --no-xz --indexes - name: Promote fluence-cli windows - working-directory: cli + working-directory: packages/cli/package run: yarn oclif promote -t win32-x64 --version "$(jq .[] -r ../.github/release-please/manifest.json)" --sha "$(git rev-parse --short HEAD)" --channel ${{ inputs.channel }} --no-xz --win --indexes diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 395e96219..a466e013b 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -39,6 +39,10 @@ on: description: "@fluencelabs/installation-spell version" type: string default: "null" + node-version: + description: "Node version" + type: string + default: "18.20.3" env: CI: true @@ -99,9 +103,6 @@ jobs: - run: yarn install - - run: yarn install - working-directory: cli - - name: Set js-client version if: inputs.js-client-snapshots != 'null' uses: fluencelabs/github-actions/npm-set-dependency@main @@ -109,7 +110,7 @@ jobs: package: "@fluencelabs/js-client" version: ${{ fromJson(inputs.js-client-snapshots)['js-client'] }} package-manager: yarn - working-directory: cli + working-directory: packages/cli/package - name: Set aqua-api version if: inputs.aqua-snapshots != 'null' @@ -118,7 +119,7 @@ jobs: package: "@fluencelabs/aqua-api" version: "${{ fromJson(inputs.aqua-snapshots)['aqua-api'] }}" package-manager: yarn - working-directory: cli + working-directory: packages/cli/package - name: Set installation-spell version if: inputs.installation-spell-version != 'null' @@ -128,7 +129,7 @@ jobs: version: "${{ inputs.installation-spell-version }}" package-manager: yarn flags: "--dev" - working-directory: cli + working-directory: packages/cli/package - name: Update versions.json uses: ./.github/actions/replace-version @@ -158,16 +159,26 @@ jobs: restore-keys: | ${{ runner.os }}-turbo- - - name: Build - run: yarn build - - - name: Build CLI - run: yarn build - working-directory: cli + - name: Cache node binaries linux-x64 + id: cache-node-binaries-linux-x64 + uses: actions/cache@v3 + env: + cache-name: cache-node-binaries + with: + path: packages/cli/package/tmp/cache/node-v${{ inputs.node-version }}-linux-x64 + key: ${{ env.cache-name }}-${{ inputs.node-version }}-linux-x64 + + - name: Cache node binaries darwin-arm64 + id: cache-node-binaries-darwin-arm64 + uses: actions/cache@v3 + env: + cache-name: cache-node-binaries + with: + path: packages/cli/package/tmp/cache/node-v${{ inputs.node-version }}-darwin-arm64 + key: ${{ env.cache-name }}-${{ inputs.node-version }}-darwin-arm64 - name: Pack Fluence CLI for Linux and macOS run: yarn pack-ci - working-directory: cli - name: Upload linux-x64 to CI checks uses: actions/upload-artifact@v4 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 247808ab1..508d31bdb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -63,6 +63,14 @@ on: description: "@fluencelabs/installation-spell version" type: string default: "null" + node-version: + description: "Node version" + type: string + default: "18.20.3" + platform: + description: "OS and architecture" + type: string + default: "linux-x64" env: CI: true @@ -120,7 +128,7 @@ jobs: case ${{ inputs.nox-image }} in # if nox image is not passed from e2e read from versions.json 'null') - nox="$(jq .nox cli/src/versions.json -r)" + nox="$(jq .nox packages/cli/package/src/versions.json -r)" ;; # else set nox image to snapshot passed from e2e *) @@ -136,9 +144,9 @@ jobs: # set deal images case ${{ inputs.chain-rpc-image }} in 'null') - chain_rpc="$(jq '.["chain-rpc"]' cli/src/versions.json -r)" - chain_deploy_script="$(jq '.["chain-deploy-script"]' cli/src/versions.json -r)" - subgraph_deploy_script="$(jq '.["subgraph-deploy-script"]' cli/src/versions.json -r)" + chain_rpc="$(jq '.["chain-rpc"]' packages/cli/package/src/versions.json -r)" + chain_deploy_script="$(jq '.["chain-deploy-script"]' packages/cli/package/src/versions.json -r)" + subgraph_deploy_script="$(jq '.["subgraph-deploy-script"]' packages/cli/package/src/versions.json -r)" ;; # else set deal images to snapshots passed from e2e *) @@ -176,7 +184,7 @@ jobs: - name: Setup node with self-hosted npm registry uses: actions/setup-node@v4 with: - node-version: "18.20.3" + node-version: ${{ inputs.node-version }} registry-url: "https://npm.fluence.dev" cache: "yarn" @@ -188,9 +196,6 @@ jobs: - run: yarn install - - run: yarn install - working-directory: cli - - name: Set js-client version if: inputs.js-client-snapshots != 'null' uses: fluencelabs/github-actions/npm-set-dependency@main @@ -198,7 +203,7 @@ jobs: package: "@fluencelabs/js-client" version: ${{ fromJson(inputs.js-client-snapshots)['js-client'] }} package-manager: yarn - working-directory: cli + working-directory: packages/cli/package - name: Set aqua-api version if: inputs.aqua-snapshots != 'null' @@ -207,7 +212,7 @@ jobs: package: "@fluencelabs/aqua-api" version: "${{ fromJson(inputs.aqua-snapshots)['aqua-api'] }}" package-manager: yarn - working-directory: cli + working-directory: packages/cli/package - name: Set deal-ts-clients version if: inputs.deal-ts-clients-version != 'null' @@ -216,7 +221,7 @@ jobs: package: "@fluencelabs/deal-ts-clients" version: "${{ inputs.deal-ts-clients-version }}" package-manager: yarn - working-directory: cli + working-directory: packages/cli/package - name: Set installation-spell version if: inputs.installation-spell-version != 'null' @@ -226,7 +231,7 @@ jobs: version: "${{ inputs.installation-spell-version }}" package-manager: yarn flags: "--dev" - working-directory: cli + working-directory: packages/cli/package - name: Update versions.json uses: ./.github/actions/replace-version @@ -256,49 +261,42 @@ jobs: restore-keys: | ${{ runner.os }}-turbo- - - name: Build - run: yarn build - - - name: Build CLI - run: yarn build - working-directory: cli + - name: Cache node binaries + id: cache-node-binaries + uses: actions/cache@v3 + env: + cache-name: cache-node-binaries + with: + path: packages/cli/package/tmp/cache/node-v${{ inputs.node-version }}-${{ inputs.platform }} + key: ${{ env.cache-name }}-${{ inputs.node-version }}-${{ inputs.platform }} - name: Pack Fluence CLI for Linux - run: yarn pack-linux-x64 - working-directory: cli + run: yarn pack-${{ inputs.platform }} - name: Download Marine and Mrepl run: yarn download-marine-and-mrepl - working-directory: cli - name: Generate templates run: yarn generate-templates - working-directory: cli - name: Set up the environment (local up) if: inputs.fluence-env == 'local' run: yarn local-up - working-directory: cli - name: Run provider tests run: yarn vitest-provider - working-directory: cli - name: Run deal deploy tests run: yarn vitest-deal-deploy - working-directory: cli - name: Run deal update tests run: yarn vitest-deal-update - working-directory: cli - name: Run smoke tests run: yarn vitest-smoke - working-directory: cli - name: Run js-to-aqua tests run: yarn vitest-js-to-aqua - working-directory: cli - name: Show Runner Load Average run: uptime diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f7e1a961f..d8edc428c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,14 +14,13 @@ When you contribute, you have to be aware that your contribution is covered by * ## Guidelines for contributors -- CLI repo consists of a yarn monorepo (that uses turborepo for caching) which contains everything in the `./packages` dir + a separate yarn package for CLI itself is needed in the `./cli` dir (because oclif framework that doesn't work as part of the monorepo). To install yarn you need Node.js 18 installed and then run `corepack enable`. Then you run `yarn` to install all the dependencies for the monorepo and `yarn build` to build everything. You will also have to separately run `yarn` and `yarn build` inside `cli` directory +- CLI repo consists of a yarn monorepo (that uses turborepo for caching) which contains everything in the `./packages` dir + a separate yarn package for CLI itself is needed in the `./packages/cli/package` dir (because oclif framework that doesn't work as part of the monorepo). To install yarn you need Node.js 18 installed and then run `corepack enable`. Then you run `yarn` to install all the dependencies for the monorepo and `yarn build` to build everything. - To run tests locally you need to do the following: 1. Install and run [Docker](https://docs.docker.com/get-docker/) - 1. run `yarn` and `yarn build` top level and run `yarn` in `cli` dir - 1. run e.g. for linux in `cli` dir: `DEBUG=fcli:*,deal-ts-clients:* yarn test-linux-x64` which will lint and check the code, build it, package it, prepare the tests and run them. For fish shell: `env DEBUG="fcli:*,deal-ts-clients:*" yarn test-linux-x64`. `DEBUG` env variable is needed to see debug logs of Fluence CLI and deal-ts-clients lib (you can also inspect js-client logs like by adding `fluence:*`, libp2p also uses a similar system, check out their docs). -- **First** commit in your PR or PR title must use [Conventional Commits](https://www.conventionalcommits.org/) (optionally end your commit message with: `[fixes DXJ-000 DXJ-001]`. Where `DXJ-000` and `DXJ-001` are ids of the Linear issues that you were working on) -- To use Fluence CLI in the development mode, run: `./cli/bin/dev.js` (types are not checked in development mode because it's faster and more convenient to work with. Use typechecking provided by your IDE during development) -- To use Fluence CLI in the production mode, run `yarn build` first, then run: `./cli/bin/run.js`. If you want to make sure you are running the actual package the users will use, do `yarn pack-*` command for your platform and architecture (this is used for tests as well) + 1. run e.g. for linux: `DEBUG=fcli:*,deal-ts-clients:* yarn test-linux-x64` which will build cli, package it, prepare the tests and run them. For fish shell: `env DEBUG="fcli:*,deal-ts-clients:*" yarn test-linux-x64`. `DEBUG` env variable is needed to see debug logs of Fluence CLI and deal-ts-clients lib (you can also inspect js-client logs like by adding `fluence:*`, libp2p also uses a similar system, check out their docs). +- PR title must use [Conventional Commits](https://www.conventionalcommits.org/) (optionally end your commit message with: `[fixes DXJ-000 DXJ-001]`. Where `DXJ-000` and `DXJ-001` are ids of the Linear issues that you were working on) +- To use Fluence CLI in the development mode, run: `./packages/cli/package/bin/dev.js` (types are not checked in development mode because it's faster and more convenient to work with. Use typechecking provided by your IDE during development) +- To use Fluence CLI in the production mode, run `yarn build` first, then run: `./packages/cli/package/bin/run.js`. If you want to make sure you are running the actual package the users will use, do `yarn pack-*` command for your platform and architecture (this is used for tests as well) - Don't name arguments or flags with names that contain underscore symbols because autogenerated links in markdown will not work - Don't export anything from command files except for the command itself. If you need to share code between commands - create a separate file - Avoid using `this` in commands except for inside `initCli` function. This style is easier to understand and there will be less stuff to refactor if instead of using methods on command object you simply use separate functions which can later be moved outside into a separate module for reuse in other commands diff --git a/README.md b/README.md index 06d8cbef0..f5eef9f09 100644 --- a/README.md +++ b/README.md @@ -74,9 +74,9 @@ rm $(which fluence) ## Documentation -1. [A complete list of commands together with usage examples](./cli/docs/commands/README.md) -1. [Documentation for all Fluence CLI configs](./cli/docs/configs/README.md) -1. [Environment variables that affect Fluence CLI and are important for Fluence CLI maintainers](./cli/example.env) +1. [A complete list of commands together with usage examples](./packages/cli/package/docs/commands/README.md) +1. [Documentation for all Fluence CLI configs](./packages/cli/package/docs/configs/README.md) +1. [Environment variables that affect Fluence CLI and are important for Fluence CLI maintainers](./packages/cli/package/example.env) ## Support diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index 5eabcd218..000000000 --- a/docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -These are docs for older CLI versions that exist here just so the links still work -It can be safely removed later - -up-to-date docs are located [here](../cli/docs) and generated by the CI process on each commit diff --git a/docs/commands/README.md b/docs/commands/README.md deleted file mode 100644 index 67270fb64..000000000 --- a/docs/commands/README.md +++ /dev/null @@ -1,2026 +0,0 @@ -# Commands - -* [`fluence air beautify [PATH]`](#fluence-air-beautify-path) -* [`fluence aqua`](#fluence-aqua) -* [`fluence aqua imports`](#fluence-aqua-imports) -* [`fluence aqua json [INPUT] [OUTPUT]`](#fluence-aqua-json-input-output) -* [`fluence aqua yml [INPUT] [OUTPUT]`](#fluence-aqua-yml-input-output) -* [`fluence autocomplete [SHELL]`](#fluence-autocomplete-shell) -* [`fluence build`](#fluence-build) -* [`fluence chain info`](#fluence-chain-info) -* [`fluence deal change-app [DEAL-ADDRESS] [NEW-APP-CID]`](#fluence-deal-change-app-deal-address-new-app-cid) -* [`fluence deal create`](#fluence-deal-create) -* [`fluence deal deposit [AMOUNT] [DEPLOYMENT-NAMES]`](#fluence-deal-deposit-amount-deployment-names) -* [`fluence deal info [DEPLOYMENT-NAMES]`](#fluence-deal-info-deployment-names) -* [`fluence deal logs [DEPLOYMENT-NAMES]`](#fluence-deal-logs-deployment-names) -* [`fluence deal stop [DEPLOYMENT-NAMES]`](#fluence-deal-stop-deployment-names) -* [`fluence deal withdraw [AMOUNT] [DEPLOYMENT-NAMES]`](#fluence-deal-withdraw-amount-deployment-names) -* [`fluence deal workers-add [DEPLOYMENT-NAMES]`](#fluence-deal-workers-add-deployment-names) -* [`fluence deal workers-remove [UNIT-IDS]`](#fluence-deal-workers-remove-unit-ids) -* [`fluence default env [ENV]`](#fluence-default-env-env) -* [`fluence default peers [ENV]`](#fluence-default-peers-env) -* [`fluence delegator collateral-add [IDS]`](#fluence-delegator-collateral-add-ids) -* [`fluence delegator collateral-withdraw [IDS]`](#fluence-delegator-collateral-withdraw-ids) -* [`fluence delegator reward-withdraw [IDS]`](#fluence-delegator-reward-withdraw-ids) -* [`fluence dep install [PACKAGE-NAME | PACKAGE-NAME@VERSION]`](#fluence-dep-install-package-name--package-nameversion) -* [`fluence dep reset`](#fluence-dep-reset) -* [`fluence dep uninstall PACKAGE-NAME`](#fluence-dep-uninstall-package-name) -* [`fluence dep versions`](#fluence-dep-versions) -* [`fluence deploy [DEPLOYMENT-NAMES]`](#fluence-deploy-deployment-names) -* [`fluence help [COMMAND]`](#fluence-help-command) -* [`fluence init [PATH]`](#fluence-init-path) -* [`fluence key default [NAME]`](#fluence-key-default-name) -* [`fluence key new [NAME]`](#fluence-key-new-name) -* [`fluence key remove [NAME]`](#fluence-key-remove-name) -* [`fluence local down`](#fluence-local-down) -* [`fluence local init`](#fluence-local-init) -* [`fluence local logs`](#fluence-local-logs) -* [`fluence local ps`](#fluence-local-ps) -* [`fluence local up`](#fluence-local-up) -* [`fluence module add [PATH | URL]`](#fluence-module-add-path--url) -* [`fluence module build [PATH]`](#fluence-module-build-path) -* [`fluence module new [NAME]`](#fluence-module-new-name) -* [`fluence module pack [PATH]`](#fluence-module-pack-path) -* [`fluence module remove [NAME | PATH | URL]`](#fluence-module-remove-name--path--url) -* [`fluence provider cc-activate`](#fluence-provider-cc-activate) -* [`fluence provider cc-collateral-withdraw`](#fluence-provider-cc-collateral-withdraw) -* [`fluence provider cc-create`](#fluence-provider-cc-create) -* [`fluence provider cc-info`](#fluence-provider-cc-info) -* [`fluence provider cc-remove`](#fluence-provider-cc-remove) -* [`fluence provider cc-rewards-withdraw`](#fluence-provider-cc-rewards-withdraw) -* [`fluence provider deal-exit`](#fluence-provider-deal-exit) -* [`fluence provider deal-list`](#fluence-provider-deal-list) -* [`fluence provider deal-rewards-info [DEAL-ADDRESS] [UNIT-ID]`](#fluence-provider-deal-rewards-info-deal-address-unit-id) -* [`fluence provider deal-rewards-withdraw`](#fluence-provider-deal-rewards-withdraw) -* [`fluence provider gen`](#fluence-provider-gen) -* [`fluence provider info`](#fluence-provider-info) -* [`fluence provider init`](#fluence-provider-init) -* [`fluence provider offer-create`](#fluence-provider-offer-create) -* [`fluence provider offer-info`](#fluence-provider-offer-info) -* [`fluence provider offer-update`](#fluence-provider-offer-update) -* [`fluence provider register`](#fluence-provider-register) -* [`fluence provider tokens-distribute`](#fluence-provider-tokens-distribute) -* [`fluence provider tokens-withdraw`](#fluence-provider-tokens-withdraw) -* [`fluence provider update`](#fluence-provider-update) -* [`fluence run`](#fluence-run) -* [`fluence service add [PATH | URL]`](#fluence-service-add-path--url) -* [`fluence service new [NAME]`](#fluence-service-new-name) -* [`fluence service remove [NAME | PATH | URL]`](#fluence-service-remove-name--path--url) -* [`fluence service repl [NAME | PATH | URL]`](#fluence-service-repl-name--path--url) -* [`fluence spell build [SPELL-NAMES]`](#fluence-spell-build-spell-names) -* [`fluence spell new [NAME]`](#fluence-spell-new-name) -* [`fluence update [CHANNEL]`](#fluence-update-channel) - -## `fluence air beautify [PATH]` - -Prints AIR script in human-readable Python-like representation. This representation cannot be executed and is intended to be read by mere mortals. - -``` -USAGE - $ fluence air beautify [PATH] [--no-input] - -ARGUMENTS - PATH Path to an AIR file. Must be relative to the current working directory or absolute - -FLAGS - --no-input Don't interactively ask for any input from the user - -DESCRIPTION - Prints AIR script in human-readable Python-like representation. This representation cannot be executed and is intended - to be read by mere mortals. - -ALIASES - $ fluence air b -``` - -_See code: [src/commands/air/beautify.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/air/beautify.ts)_ - -## `fluence aqua` - -Compile aqua defined in 'compileAqua' property of fluence.yaml. If --input flag is used - then content of 'compileAqua' property in fluence.yaml will be ignored - -``` -USAGE - $ fluence aqua [-n ] [--no-input] [-w] [-o ] [--air | --js] [--import ...] [-i - ] [--const ...] [--log-level-compiler ] [--no-relay] [--no-xor] [--tracing] - [--no-empty-response] [--dry] - -FLAGS - -i, --input= Path to an aqua file or a directory that contains your aqua files - -n, --names= Comma-separated names of the configs from 'compileAqua' property of fluence.yaml to - compile. If not specified, all configs will be compiled - -o, --output= Path to the output directory. Must be relative to the current working directory or - absolute. Will be created if it doesn't exists - -w, --watch Watch aqua file or folder for changes and recompile - --air Generate .air file instead of .ts - --const=... Constants to be passed to the compiler - --dry Checks if compilation succeeded, without output - --import=... Path to a directory to import aqua files from. May be used several times - --js Generate .js file instead of .ts - --log-level-compiler= Set log level for the compiler. Must be one of: all, trace, debug, info, warn, - error, off - --no-empty-response Do not generate response call if there are no returned values - --no-input Don't interactively ask for any input from the user - --no-relay Do not generate a pass through the relay node - --no-xor Do not generate a wrapper that catches and displays errors - --tracing Compile aqua in tracing mode (for debugging purposes) - -DESCRIPTION - Compile aqua defined in 'compileAqua' property of fluence.yaml. If --input flag is used - then content of - 'compileAqua' property in fluence.yaml will be ignored - -EXAMPLES - $ fluence aqua -``` - -_See code: [src/commands/aqua.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/aqua.ts)_ - -## `fluence aqua imports` - -Returns a list of aqua imports that CLI produces - -``` -USAGE - $ fluence aqua imports [--no-input] - -FLAGS - --no-input Don't interactively ask for any input from the user - -DESCRIPTION - Returns a list of aqua imports that CLI produces -``` - -_See code: [src/commands/aqua/imports.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/aqua/imports.ts)_ - -## `fluence aqua json [INPUT] [OUTPUT]` - -Infers aqua types for an arbitrary json file, generates valid aqua code with a function call that returns an aqua object literal with the same structure as the json file. For valid generation please refer to aqua documentation https://fluence.dev/docs/aqua-book/language/ to learn about what kind of structures are valid in aqua language and what they translate into - -``` -USAGE - $ fluence aqua json [INPUT] [OUTPUT] [--no-input] [--f64] [--types ] - -ARGUMENTS - INPUT Path to json file - OUTPUT Path to the output dir - -FLAGS - --f64 Convert all numbers to f64. Useful for arrays objects that contain numbers of different types in them. - Without this flag, numbers will be converted to u64, i64 or f64 depending on their value - --no-input Don't interactively ask for any input from the user - --types= Experimental! Path to a file with custom types. Must be a list with objects that have 'name' and - 'properties'. 'properties' must be a list of all custom type properties - -DESCRIPTION - Infers aqua types for an arbitrary json file, generates valid aqua code with a function call that returns an aqua - object literal with the same structure as the json file. For valid generation please refer to aqua documentation - https://fluence.dev/docs/aqua-book/language/ to learn about what kind of structures are valid in aqua language and - what they translate into -``` - -_See code: [src/commands/aqua/json.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/aqua/json.ts)_ - -## `fluence aqua yml [INPUT] [OUTPUT]` - -Infers aqua types for an arbitrary yaml file, generates valid aqua code with a function call that returns an aqua object literal with the same structure as the yaml file. For valid generation please refer to aqua documentation https://fluence.dev/docs/aqua-book/language/ to learn about what kind of structures are valid in aqua language and what they translate into - -``` -USAGE - $ fluence aqua yml [INPUT] [OUTPUT] [--no-input] [--f64] [--types ] - -ARGUMENTS - INPUT Path to yaml file - OUTPUT Path to the output dir - -FLAGS - --f64 Convert all numbers to f64. Useful for arrays objects that contain numbers of different types in them. - Without this flag, numbers will be converted to u64, i64 or f64 depending on their value - --no-input Don't interactively ask for any input from the user - --types= Experimental! Path to a file with custom types. Must be a list with objects that have 'name' and - 'properties'. 'properties' must be a list of all custom type properties - -DESCRIPTION - Infers aqua types for an arbitrary yaml file, generates valid aqua code with a function call that returns an aqua - object literal with the same structure as the yaml file. For valid generation please refer to aqua documentation - https://fluence.dev/docs/aqua-book/language/ to learn about what kind of structures are valid in aqua language and - what they translate into - -ALIASES - $ fluence aqua yaml -``` - -_See code: [src/commands/aqua/yml.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/aqua/yml.ts)_ - -## `fluence autocomplete [SHELL]` - -Display autocomplete installation instructions. - -``` -USAGE - $ fluence autocomplete [SHELL] [-r] - -ARGUMENTS - SHELL (zsh|bash|powershell) Shell type - -FLAGS - -r, --refresh-cache Refresh cache (ignores displaying instructions) - -DESCRIPTION - Display autocomplete installation instructions. - -EXAMPLES - $ fluence autocomplete - - $ fluence autocomplete bash - - $ fluence autocomplete zsh - - $ fluence autocomplete powershell - - $ fluence autocomplete --refresh-cache -``` - -_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v3.0.17/src/commands/autocomplete/index.ts)_ - -## `fluence build` - -Build all application services, described in fluence.yaml and generate aqua interfaces for them - -``` -USAGE - $ fluence build [--no-input] [--marine-build-args <--flag arg>] [--import ...] [--env ] - -FLAGS - --env= Fluence Environment to use when running the command - --import=... Path to a directory to import aqua files from. May be used several times - --marine-build-args=<--flag arg> Space separated `cargo build` flags and args to pass to marine build. - Overrides 'marineBuildArgs' property in fluence.yaml. Default: --release - --no-input Don't interactively ask for any input from the user - -DESCRIPTION - Build all application services, described in fluence.yaml and generate aqua interfaces for them - -EXAMPLES - $ fluence build -``` - -_See code: [src/commands/build.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/build.ts)_ - -## `fluence chain info` - -Show contract addresses for the fluence environment and accounts for the local environment - -``` -USAGE - $ fluence chain info [--no-input] [--env ] [--priv-key ] - -FLAGS - --env= Fluence Environment to use when running the command - --no-input Don't interactively ask for any input from the user - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is - unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - -DESCRIPTION - Show contract addresses for the fluence environment and accounts for the local environment -``` - -_See code: [src/commands/chain/info.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/chain/info.ts)_ - -## `fluence deal change-app [DEAL-ADDRESS] [NEW-APP-CID]` - -Change app id in the deal - -``` -USAGE - $ fluence deal change-app [DEAL-ADDRESS] [NEW-APP-CID] [--no-input] [--env ] - [--priv-key ] - -ARGUMENTS - DEAL-ADDRESS Deal address - NEW-APP-CID New app CID for the deal - -FLAGS - --env= Fluence Environment to use when running the command - --no-input Don't interactively ask for any input from the user - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is - unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - -DESCRIPTION - Change app id in the deal -``` - -_See code: [src/commands/deal/change-app.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/deal/change-app.ts)_ - -## `fluence deal create` - -Create your deal with the specified parameters - -``` -USAGE - $ fluence deal create --app-cid --collateral-per-worker --min-workers --target-workers - --max-workers-per-provider --price-per-worker-epoch [--no-input] [--initial-balance ] - [--effectors ] [--whitelist | --blacklist ] [--protocol-version ] [--env ] [--priv-key ] - -FLAGS - --app-cid= (required) CID of the application that will be deployed - --blacklist= Comma-separated list of blacklisted providers - --collateral-per-worker= (required) Collateral per worker - --effectors= Comma-separated list of effector to be used in the deal - --env= Fluence Environment to use when running the command - --initial-balance= Initial balance - --max-workers-per-provider= (required) Max workers per provider - --min-workers= (required) Required workers to activate the deal - --no-input Don't interactively ask for any input from the user - --price-per-worker-epoch= (required) Price per worker epoch - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is - unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - --protocol-version= Protocol version - --target-workers= (required) Max workers in the deal - --whitelist= Comma-separated list of whitelisted providers - -DESCRIPTION - Create your deal with the specified parameters -``` - -_See code: [src/commands/deal/create.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/deal/create.ts)_ - -## `fluence deal deposit [AMOUNT] [DEPLOYMENT-NAMES]` - -Deposit do the deal - -``` -USAGE - $ fluence deal deposit [AMOUNT] [DEPLOYMENT-NAMES] [--no-input] [--env ] - [--priv-key ] [--deal-ids ] - -ARGUMENTS - AMOUNT Amount of USDC tokens to deposit - DEPLOYMENT-NAMES Comma separated names of deployments. Can't be used together with --deal-ids flag - -FLAGS - --deal-ids= Comma-separated deal ids - --env= Fluence Environment to use when running the command - --no-input Don't interactively ask for any input from the user - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is - unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - -DESCRIPTION - Deposit do the deal -``` - -_See code: [src/commands/deal/deposit.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/deal/deposit.ts)_ - -## `fluence deal info [DEPLOYMENT-NAMES]` - -Get info about the deal - -``` -USAGE - $ fluence deal info [DEPLOYMENT-NAMES] [--no-input] [--env ] [--priv-key - ] [--deal-ids ] - -ARGUMENTS - DEPLOYMENT-NAMES Comma separated names of deployments. Can't be used together with --deal-ids flag - -FLAGS - --deal-ids= Comma-separated deal ids - --env= Fluence Environment to use when running the command - --no-input Don't interactively ask for any input from the user - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is - unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - -DESCRIPTION - Get info about the deal -``` - -_See code: [src/commands/deal/info.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/deal/info.ts)_ - -## `fluence deal logs [DEPLOYMENT-NAMES]` - -Get logs from deployed workers for deals listed in workers.yaml - -``` -USAGE - $ fluence deal logs [DEPLOYMENT-NAMES] [--no-input] [-k ] [--relay ] [--ttl - ] [--dial-timeout ] [--particle-id] [--env ] - [--off-aqua-logs] [--tracing] [--deal-ids ] [--spell ] - -ARGUMENTS - DEPLOYMENT-NAMES Comma separated names of deployments. Can't be used together with --deal-ids flag - -FLAGS - -k, --sk= Name of the secret key for js-client inside CLI to use. If not - specified, will use the default key for the project. If there is no - fluence project or there is no default key, will use user's default - key - --deal-ids= Comma-separated deal ids - --dial-timeout= [default: 15000] Timeout for Fluence js-client to connect to relay - peer - --env= Fluence Environment to use when running the command - --no-input Don't interactively ask for any input from the user - --off-aqua-logs Turns off logs from Console.print in aqua and from IPFS service - --particle-id Print particle ids when running Fluence js-client - --relay= Relay for Fluence js-client to connect to - --spell= [default: worker-spell] Spell name to get logs for - --tracing Compile aqua in tracing mode (for debugging purposes) - --ttl= [default: 15000] Particle Time To Live since 'now'. After that, - particle is expired and not processed. - -DESCRIPTION - Get logs from deployed workers for deals listed in workers.yaml - -EXAMPLES - $ fluence deal logs -``` - -_See code: [src/commands/deal/logs.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/deal/logs.ts)_ - -## `fluence deal stop [DEPLOYMENT-NAMES]` - -Stop the deal - -``` -USAGE - $ fluence deal stop [DEPLOYMENT-NAMES] [--no-input] [--env ] [--priv-key - ] [--deal-ids ] - -ARGUMENTS - DEPLOYMENT-NAMES Comma separated names of deployments. Can't be used together with --deal-ids flag - -FLAGS - --deal-ids= Comma-separated deal ids - --env= Fluence Environment to use when running the command - --no-input Don't interactively ask for any input from the user - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is - unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - -DESCRIPTION - Stop the deal -``` - -_See code: [src/commands/deal/stop.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/deal/stop.ts)_ - -## `fluence deal withdraw [AMOUNT] [DEPLOYMENT-NAMES]` - -Withdraw tokens from the deal - -``` -USAGE - $ fluence deal withdraw [AMOUNT] [DEPLOYMENT-NAMES] [--no-input] [--env ] - [--priv-key ] [--deal-ids ] - -ARGUMENTS - AMOUNT Amount of USDC tokens to withdraw - DEPLOYMENT-NAMES Comma separated names of deployments. Can't be used together with --deal-ids flag - -FLAGS - --deal-ids= Comma-separated deal ids - --env= Fluence Environment to use when running the command - --no-input Don't interactively ask for any input from the user - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is - unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - -DESCRIPTION - Withdraw tokens from the deal -``` - -_See code: [src/commands/deal/withdraw.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/deal/withdraw.ts)_ - -## `fluence deal workers-add [DEPLOYMENT-NAMES]` - -Add missing workers to the deal - -``` -USAGE - $ fluence deal workers-add [DEPLOYMENT-NAMES] [--no-input] [--env ] [--priv-key - ] [--deal-ids ] - -ARGUMENTS - DEPLOYMENT-NAMES Comma separated names of deployments. Can't be used together with --deal-ids flag - -FLAGS - --deal-ids= Comma-separated deal ids - --env= Fluence Environment to use when running the command - --no-input Don't interactively ask for any input from the user - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is - unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - -DESCRIPTION - Add missing workers to the deal - -ALIASES - $ fluence deal wa -``` - -_See code: [src/commands/deal/workers-add.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/deal/workers-add.ts)_ - -## `fluence deal workers-remove [UNIT-IDS]` - -Remove unit from the deal - -``` -USAGE - $ fluence deal workers-remove [UNIT-IDS] [--no-input] [--env ] [--priv-key - ] - -ARGUMENTS - UNIT-IDS Comma-separated compute unit ids. You can get them using 'fluence deal info' command - -FLAGS - --env= Fluence Environment to use when running the command - --no-input Don't interactively ask for any input from the user - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is - unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - -DESCRIPTION - Remove unit from the deal - -ALIASES - $ fluence deal wr -``` - -_See code: [src/commands/deal/workers-remove.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/deal/workers-remove.ts)_ - -## `fluence default env [ENV]` - -Switch default Fluence Environment - -``` -USAGE - $ fluence default env [ENV] [--no-input] - -ARGUMENTS - ENV Fluence Environment to use when running the command - -FLAGS - --no-input Don't interactively ask for any input from the user - -DESCRIPTION - Switch default Fluence Environment - -EXAMPLES - $ fluence default env -``` - -_See code: [src/commands/default/env.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/default/env.ts)_ - -## `fluence default peers [ENV]` - -Print default Fluence network peer addresses - -``` -USAGE - $ fluence default peers [ENV] [--no-input] - -ARGUMENTS - ENV Fluence Environment to use when running the command - -FLAGS - --no-input Don't interactively ask for any input from the user - -DESCRIPTION - Print default Fluence network peer addresses - -EXAMPLES - $ fluence default peers -``` - -_See code: [src/commands/default/peers.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/default/peers.ts)_ - -## `fluence delegator collateral-add [IDS]` - -Add FLT collateral to capacity commitment - -``` -USAGE - $ fluence delegator collateral-add [IDS] [--no-input] [--env ] [--priv-key - ] - -ARGUMENTS - IDS Comma separated capacity commitment IDs - -FLAGS - --env= Fluence Environment to use when running the command - --no-input Don't interactively ask for any input from the user - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is - unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - -DESCRIPTION - Add FLT collateral to capacity commitment - -ALIASES - $ fluence delegator ca -``` - -_See code: [src/commands/delegator/collateral-add.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/delegator/collateral-add.ts)_ - -## `fluence delegator collateral-withdraw [IDS]` - -Withdraw FLT collateral from capacity commitment - -``` -USAGE - $ fluence delegator collateral-withdraw [IDS] [--no-input] [--env ] [--priv-key - ] [--max-cus ] - -ARGUMENTS - IDS Comma separated capacity commitment IDs - -FLAGS - --env= Fluence Environment to use when running the command - --max-cus= [default: 32] Maximum number of compute units to put in a batch when - signing a transaction - --no-input Don't interactively ask for any input from the user - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is - unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - -DESCRIPTION - Withdraw FLT collateral from capacity commitment - -ALIASES - $ fluence delegator cw -``` - -_See code: [src/commands/delegator/collateral-withdraw.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/delegator/collateral-withdraw.ts)_ - -## `fluence delegator reward-withdraw [IDS]` - -Withdraw FLT rewards from capacity commitment - -``` -USAGE - $ fluence delegator reward-withdraw [IDS] [--no-input] [--env ] [--priv-key - ] - -ARGUMENTS - IDS Comma separated capacity commitment IDs - -FLAGS - --env= Fluence Environment to use when running the command - --no-input Don't interactively ask for any input from the user - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is - unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - -DESCRIPTION - Withdraw FLT rewards from capacity commitment - -ALIASES - $ fluence delegator rw -``` - -_See code: [src/commands/delegator/reward-withdraw.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/delegator/reward-withdraw.ts)_ - -## `fluence dep install [PACKAGE-NAME | PACKAGE-NAME@VERSION]` - -Install aqua project dependencies (currently npm is used under the hood for managing aqua dependencies) - -``` -USAGE - $ fluence dep install [PACKAGE-NAME | PACKAGE-NAME@VERSION] [--no-input] - -ARGUMENTS - PACKAGE-NAME | PACKAGE-NAME@VERSION Valid argument for npm install command. If this argument is omitted all project - aqua dependencies will be installed and command will also make sure marine and - mrepl are installed - -FLAGS - --no-input Don't interactively ask for any input from the user - -DESCRIPTION - Install aqua project dependencies (currently npm is used under the hood for managing aqua dependencies) - -ALIASES - $ fluence dep i - -EXAMPLES - $ fluence dep install -``` - -_See code: [src/commands/dep/install.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/dep/install.ts)_ - -## `fluence dep reset` - -Reset all project dependencies to recommended versions - -``` -USAGE - $ fluence dep reset [--no-input] - -FLAGS - --no-input Don't interactively ask for any input from the user - -DESCRIPTION - Reset all project dependencies to recommended versions - -ALIASES - $ fluence dep r - -EXAMPLES - $ fluence dep reset -``` - -_See code: [src/commands/dep/reset.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/dep/reset.ts)_ - -## `fluence dep uninstall PACKAGE-NAME` - -Uninstall aqua project dependencies (currently npm is used under the hood for managing aqua dependencies) - -``` -USAGE - $ fluence dep uninstall PACKAGE-NAME [--no-input] - -ARGUMENTS - PACKAGE-NAME Aqua dependency name - -FLAGS - --no-input Don't interactively ask for any input from the user - -DESCRIPTION - Uninstall aqua project dependencies (currently npm is used under the hood for managing aqua dependencies) - -ALIASES - $ fluence dep un - -EXAMPLES - $ fluence dep uninstall -``` - -_See code: [src/commands/dep/uninstall.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/dep/uninstall.ts)_ - -## `fluence dep versions` - -Get versions of all cli dependencies, including aqua, marine, mrepl and internal - -``` -USAGE - $ fluence dep versions [--no-input] [--default] - -FLAGS - --default Display default npm and cargo dependencies and their versions for current CLI version. Default npm - dependencies are always available to be imported in Aqua - --no-input Don't interactively ask for any input from the user - -DESCRIPTION - Get versions of all cli dependencies, including aqua, marine, mrepl and internal - -ALIASES - $ fluence dep v - -EXAMPLES - $ fluence dep versions -``` - -_See code: [src/commands/dep/versions.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/dep/versions.ts)_ - -## `fluence deploy [DEPLOYMENT-NAMES]` - -Deploy according to 'deployments' property in fluence.yaml - -``` -USAGE - $ fluence deploy [DEPLOYMENT-NAMES] [--no-input] [--off-aqua-logs] [--env ] [--priv-key ] [-k ] [--relay ] [--ttl ] [--dial-timeout - ] [--particle-id] [--import ...] [--no-build] [--tracing] [--marine-build-args <--flag arg>] - [-u] - -ARGUMENTS - DEPLOYMENT-NAMES Comma separated names of deployments. Can't be used together with --deal-ids flag - -FLAGS - -k, --sk= Name of the secret key for js-client inside CLI to use. If not - specified, will use the default key for the project. If there is no - fluence project or there is no default key, will use user's default - key - -u, --update Update your previous deployment - --dial-timeout= [default: 15000] Timeout for Fluence js-client to connect to relay - peer - --env= Fluence Environment to use when running the command - --import=... Path to a directory to import aqua files from. May be used several - times - --marine-build-args=<--flag arg> Space separated `cargo build` flags and args to pass to marine build. - Overrides 'marineBuildArgs' property in fluence.yaml. Default: - --release - --no-build Don't build the project before running the command - --no-input Don't interactively ask for any input from the user - --off-aqua-logs Turns off logs from Console.print in aqua and from IPFS service - --particle-id Print particle ids when running Fluence js-client - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags - is unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - --relay= Relay for Fluence js-client to connect to - --tracing Compile aqua in tracing mode (for debugging purposes) - --ttl= [default: 15000] Particle Time To Live since 'now'. After that, - particle is expired and not processed. - -DESCRIPTION - Deploy according to 'deployments' property in fluence.yaml - -EXAMPLES - $ fluence deploy -``` - -_See code: [src/commands/deploy.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/deploy.ts)_ - -## `fluence help [COMMAND]` - -Display help for fluence. - -``` -USAGE - $ fluence help [COMMAND...] [-n] - -ARGUMENTS - COMMAND... Command to show help for. - -FLAGS - -n, --nested-commands Include all nested commands in the output. - -DESCRIPTION - Display help for fluence. -``` - -_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.0.21/src/commands/help.ts)_ - -## `fluence init [PATH]` - -Initialize fluence project - -``` -USAGE - $ fluence init [PATH] [--no-input] [-t ] [--env ] [--noxes - ] - -ARGUMENTS - PATH Project path - -FLAGS - -t, --template= Template to use for the project. One of: quickstart, minimal, ts, js - --env= Fluence Environment to use when running the command - --no-input Don't interactively ask for any input from the user - --noxes= Number of Compute Peers to generate when a new provider.yaml is - created - -DESCRIPTION - Initialize fluence project - -EXAMPLES - $ fluence init -``` - -_See code: [src/commands/init.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/init.ts)_ - -## `fluence key default [NAME]` - -Set default key-pair for user or project - -``` -USAGE - $ fluence key default [NAME] [--no-input] [--user] - -ARGUMENTS - NAME Key-pair name - -FLAGS - --no-input Don't interactively ask for any input from the user - --user Set default key-pair for current user instead of current project - -DESCRIPTION - Set default key-pair for user or project - -EXAMPLES - $ fluence key default -``` - -_See code: [src/commands/key/default.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/key/default.ts)_ - -## `fluence key new [NAME]` - -Generate key-pair and store it in user-secrets.yaml or project-secrets.yaml - -``` -USAGE - $ fluence key new [NAME] [--no-input] [--user] [--default] - -ARGUMENTS - NAME Key-pair name - -FLAGS - --default Set new key-pair as default for current project or user - --no-input Don't interactively ask for any input from the user - --user Generate key-pair for current user instead of generating key-pair for current project - -DESCRIPTION - Generate key-pair and store it in user-secrets.yaml or project-secrets.yaml - -EXAMPLES - $ fluence key new -``` - -_See code: [src/commands/key/new.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/key/new.ts)_ - -## `fluence key remove [NAME]` - -Remove key-pair from user-secrets.yaml or project-secrets.yaml - -``` -USAGE - $ fluence key remove [NAME] [--no-input] [--user] - -ARGUMENTS - NAME Key-pair name - -FLAGS - --no-input Don't interactively ask for any input from the user - --user Remove key-pair from current user instead of removing key-pair from current project - -DESCRIPTION - Remove key-pair from user-secrets.yaml or project-secrets.yaml - -EXAMPLES - $ fluence key remove -``` - -_See code: [src/commands/key/remove.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/key/remove.ts)_ - -## `fluence local down` - -Stop currently running docker-compose.yaml using docker compose - -``` -USAGE - $ fluence local down [--no-input] [-v] [--flags <--flag arg>] - -FLAGS - -v, --volumes Remove named volumes declared in the "volumes" section of the Compose file and anonymous - volumes attached to containers - --flags=<--flag arg> Space separated flags to pass to `docker compose` - --no-input Don't interactively ask for any input from the user - -DESCRIPTION - Stop currently running docker-compose.yaml using docker compose - -EXAMPLES - $ fluence local down -``` - -_See code: [src/commands/local/down.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/local/down.ts)_ - -## `fluence local init` - -Init docker-compose.yaml according to provider.yaml - -``` -USAGE - $ fluence local init [--no-input] [--env ] [--priv-key ] - -FLAGS - --env= Fluence Environment to use when running the command - --no-input Don't interactively ask for any input from the user - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is - unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - -DESCRIPTION - Init docker-compose.yaml according to provider.yaml - -EXAMPLES - $ fluence local init -``` - -_See code: [src/commands/local/init.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/local/init.ts)_ - -## `fluence local logs` - -Display docker-compose.yaml logs - -``` -USAGE - $ fluence local logs [--no-input] [--flags <--flag arg>] - -FLAGS - --flags=<--flag arg> Space separated flags to pass to `docker compose` - --no-input Don't interactively ask for any input from the user - -DESCRIPTION - Display docker-compose.yaml logs - -EXAMPLES - $ fluence local logs -``` - -_See code: [src/commands/local/logs.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/local/logs.ts)_ - -## `fluence local ps` - -List containers using docker compose - -``` -USAGE - $ fluence local ps [--no-input] [--flags <--flag arg>] - -FLAGS - --flags=<--flag arg> Space separated flags to pass to `docker compose` - --no-input Don't interactively ask for any input from the user - -DESCRIPTION - List containers using docker compose - -EXAMPLES - $ fluence local ps -``` - -_See code: [src/commands/local/ps.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/local/ps.ts)_ - -## `fluence local up` - -Run docker-compose.yaml using docker compose and set up provider using all the offers from the 'offers' section in provider.yaml config using default wallet key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 - -``` -USAGE - $ fluence local up [--no-input] [--noxes ] [--timeout ] [--priv-key ] - [--quiet-pull] [-d] [--build] [--flags <--flag arg>] [-r] - -FLAGS - -d, --detach Detached mode: Run containers in the background - -r, --[no-]reset Resets docker-compose.yaml to default, removes volumes and previous local deployments - --build Build images before starting containers - --flags=<--flag arg> Space separated flags to pass to `docker compose` - --no-input Don't interactively ask for any input from the user - --noxes= Number of Compute Peers to generate when a new provider.yaml is created - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is unsecure. On - local env 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used by - default when CLI is used in non-interactive mode - --quiet-pull Pull without printing progress information - --timeout= [default: 120] Timeout in seconds for attempting to register local network on local - peers - -DESCRIPTION - Run docker-compose.yaml using docker compose and set up provider using all the offers from the 'offers' section in - provider.yaml config using default wallet key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 - -EXAMPLES - $ fluence local up -``` - -_See code: [src/commands/local/up.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/local/up.ts)_ - -## `fluence module add [PATH | URL]` - -Add module to service.yaml - -``` -USAGE - $ fluence module add [PATH | URL] [--no-input] [--name ] [--service ] - -ARGUMENTS - PATH | URL Path to a module or url to .tar.gz archive - -FLAGS - --name= Override module name - --no-input Don't interactively ask for any input from the user - --service= Service name from fluence.yaml or path to the service config or directory that contains - service.yaml - -DESCRIPTION - Add module to service.yaml - -EXAMPLES - $ fluence module add -``` - -_See code: [src/commands/module/add.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/module/add.ts)_ - -## `fluence module build [PATH]` - -Build module - -``` -USAGE - $ fluence module build [PATH] [--no-input] [--marine-build-args <--flag arg>] - -ARGUMENTS - PATH Path to a module - -FLAGS - --marine-build-args=<--flag arg> Space separated `cargo build` flags and args to pass to marine build. Overrides - 'marineBuildArgs' property in fluence.yaml. Default: --release - --no-input Don't interactively ask for any input from the user - -DESCRIPTION - Build module - -EXAMPLES - $ fluence module build -``` - -_See code: [src/commands/module/build.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/module/build.ts)_ - -## `fluence module new [NAME]` - -Create new marine module template - -``` -USAGE - $ fluence module new [NAME] [--no-input] [--path ] [--service ] - -ARGUMENTS - NAME Module name - -FLAGS - --no-input Don't interactively ask for any input from the user - --path= Path to module dir (default: src/modules) - --service= Name or relative path to the service to add the created module to - -DESCRIPTION - Create new marine module template - -EXAMPLES - $ fluence module new -``` - -_See code: [src/commands/module/new.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/module/new.ts)_ - -## `fluence module pack [PATH]` - -Pack module into tar.gz archive - -``` -USAGE - $ fluence module pack [PATH] [--no-input] [--marine-build-args <--flag arg>] [-d ] [-b ] - -ARGUMENTS - PATH Path to a module - -FLAGS - -b, --binding-crate= Path to a directory with rust binding crate - -d, --destination= Path to a directory where you want archive to be saved. Default: current - directory - --marine-build-args=<--flag arg> Space separated `cargo build` flags and args to pass to marine build. Overrides - 'marineBuildArgs' property in fluence.yaml. Default: --release - --no-input Don't interactively ask for any input from the user - -DESCRIPTION - Pack module into tar.gz archive - -EXAMPLES - $ fluence module pack -``` - -_See code: [src/commands/module/pack.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/module/pack.ts)_ - -## `fluence module remove [NAME | PATH | URL]` - -Remove module from service.yaml - -``` -USAGE - $ fluence module remove [NAME | PATH | URL] [--no-input] [--service ] - -ARGUMENTS - NAME | PATH | URL Module name from service.yaml, path to a module or url to .tar.gz archive - -FLAGS - --no-input Don't interactively ask for any input from the user - --service= Service name from fluence.yaml or path to the service directory - -DESCRIPTION - Remove module from service.yaml - -EXAMPLES - $ fluence module remove -``` - -_See code: [src/commands/module/remove.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/module/remove.ts)_ - -## `fluence provider cc-activate` - -Add FLT collateral to capacity commitment to activate it - -``` -USAGE - $ fluence provider cc-activate [--no-input] [--env ] [--priv-key ] - [--nox-names | --cc-ids ] - -FLAGS - --cc-ids= Comma separated capacity commitment IDs - --env= Fluence Environment to use when running the command - --no-input Don't interactively ask for any input from the user - --nox-names= Comma-separated names of noxes from provider.yaml. To use all of your - noxes: --nox-names all - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is - unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - -DESCRIPTION - Add FLT collateral to capacity commitment to activate it - -ALIASES - $ fluence provider ca -``` - -_See code: [src/commands/provider/cc-activate.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/provider/cc-activate.ts)_ - -## `fluence provider cc-collateral-withdraw` - -Withdraw FLT collateral from capacity commitments - -``` -USAGE - $ fluence provider cc-collateral-withdraw [--no-input] [--nox-names | --cc-ids ] [--env ] [--priv-key ] [--max-cus ] - -FLAGS - --cc-ids= Comma separated capacity commitment IDs - --env= Fluence Environment to use when running the command - --max-cus= [default: 32] Maximum number of compute units to put in a batch when - signing a transaction - --no-input Don't interactively ask for any input from the user - --nox-names= Comma-separated names of noxes from provider.yaml. To use all of your - noxes: --nox-names all - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is - unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - -DESCRIPTION - Withdraw FLT collateral from capacity commitments - -ALIASES - $ fluence provider ccw -``` - -_See code: [src/commands/provider/cc-collateral-withdraw.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/provider/cc-collateral-withdraw.ts)_ - -## `fluence provider cc-create` - -Create Capacity commitment - -``` -USAGE - $ fluence provider cc-create [--no-input] [--env ] [--priv-key ] - [--nox-names ] [--offers ] - -FLAGS - --env= Fluence Environment to use when running the command - --no-input Don't interactively ask for any input from the user - --nox-names= Comma-separated names of noxes from provider.yaml. To use all of your - noxes: --nox-names all - --offers= Comma-separated list of offer names. To use all of your offers: --offers - all - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is - unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - -DESCRIPTION - Create Capacity commitment - -ALIASES - $ fluence provider cc -``` - -_See code: [src/commands/provider/cc-create.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/provider/cc-create.ts)_ - -## `fluence provider cc-info` - -Get info about capacity commitments - -``` -USAGE - $ fluence provider cc-info [--no-input] [--env ] [--priv-key ] - [--nox-names | --cc-ids ] [--json] - -FLAGS - --cc-ids= Comma separated capacity commitment IDs - --env= Fluence Environment to use when running the command - --json Output JSON - --no-input Don't interactively ask for any input from the user - --nox-names= Comma-separated names of noxes from provider.yaml. To use all of your - noxes: --nox-names all - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is - unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - -DESCRIPTION - Get info about capacity commitments - -ALIASES - $ fluence provider ci -``` - -_See code: [src/commands/provider/cc-info.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/provider/cc-info.ts)_ - -## `fluence provider cc-remove` - -Remove Capacity commitment. You can remove it only BEFORE you activated it by depositing collateral - -``` -USAGE - $ fluence provider cc-remove [--no-input] [--env ] [--priv-key ] - [--nox-names | --cc-ids ] - -FLAGS - --cc-ids= Comma separated capacity commitment IDs - --env= Fluence Environment to use when running the command - --no-input Don't interactively ask for any input from the user - --nox-names= Comma-separated names of noxes from provider.yaml. To use all of your - noxes: --nox-names all - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is - unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - -DESCRIPTION - Remove Capacity commitment. You can remove it only BEFORE you activated it by depositing collateral - -ALIASES - $ fluence provider cr -``` - -_See code: [src/commands/provider/cc-remove.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/provider/cc-remove.ts)_ - -## `fluence provider cc-rewards-withdraw` - -Withdraw FLT rewards from capacity commitments - -``` -USAGE - $ fluence provider cc-rewards-withdraw [--no-input] [--nox-names | --cc-ids ] [--env ] [--priv-key ] - -FLAGS - --cc-ids= Comma separated capacity commitment IDs - --env= Fluence Environment to use when running the command - --no-input Don't interactively ask for any input from the user - --nox-names= Comma-separated names of noxes from provider.yaml. To use all of your - noxes: --nox-names all - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is - unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - -DESCRIPTION - Withdraw FLT rewards from capacity commitments - -ALIASES - $ fluence provider crw -``` - -_See code: [src/commands/provider/cc-rewards-withdraw.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/provider/cc-rewards-withdraw.ts)_ - -## `fluence provider deal-exit` - -Exit from deal - -``` -USAGE - $ fluence provider deal-exit [--no-input] [--env ] [--priv-key ] - [--deal-ids ] [--all] - -FLAGS - --all To use all deal ids that indexer is aware of for your provider address - --deal-ids= Comma-separated deal ids - --env= Fluence Environment to use when running the command - --no-input Don't interactively ask for any input from the user - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is - unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - -DESCRIPTION - Exit from deal - -ALIASES - $ fluence provider de -``` - -_See code: [src/commands/provider/deal-exit.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/provider/deal-exit.ts)_ - -## `fluence provider deal-list` - -List all deals - -``` -USAGE - $ fluence provider deal-list [--no-input] [--env ] [--priv-key ] - -FLAGS - --env= Fluence Environment to use when running the command - --no-input Don't interactively ask for any input from the user - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is - unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - -DESCRIPTION - List all deals - -ALIASES - $ fluence provider dl -``` - -_See code: [src/commands/provider/deal-list.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/provider/deal-list.ts)_ - -## `fluence provider deal-rewards-info [DEAL-ADDRESS] [UNIT-ID]` - -Deal rewards info - -``` -USAGE - $ fluence provider deal-rewards-info [DEAL-ADDRESS] [UNIT-ID] [--no-input] [--env ] - [--priv-key ] - -ARGUMENTS - DEAL-ADDRESS Deal address - UNIT-ID Compute unit ID - -FLAGS - --env= Fluence Environment to use when running the command - --no-input Don't interactively ask for any input from the user - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is - unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - -DESCRIPTION - Deal rewards info - -ALIASES - $ fluence provider dri -``` - -_See code: [src/commands/provider/deal-rewards-info.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/provider/deal-rewards-info.ts)_ - -## `fluence provider deal-rewards-withdraw` - -Withdraw USDC rewards from deals - -``` -USAGE - $ fluence provider deal-rewards-withdraw [--no-input] [--env ] [--priv-key ] - [--deal-ids ] - -FLAGS - --deal-ids= Comma-separated deal ids - --env= Fluence Environment to use when running the command - --no-input Don't interactively ask for any input from the user - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is - unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - -DESCRIPTION - Withdraw USDC rewards from deals - -ALIASES - $ fluence provider drw -``` - -_See code: [src/commands/provider/deal-rewards-withdraw.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/provider/deal-rewards-withdraw.ts)_ - -## `fluence provider gen` - -Generate Config.toml files according to provider.yaml and secrets according to provider-secrets.yaml - -``` -USAGE - $ fluence provider gen [--no-input] [--env ] [--priv-key ] - -FLAGS - --env= Fluence Environment to use when running the command - --no-input Don't interactively ask for any input from the user - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is - unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - -DESCRIPTION - Generate Config.toml files according to provider.yaml and secrets according to provider-secrets.yaml - -EXAMPLES - $ fluence provider gen -``` - -_See code: [src/commands/provider/gen.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/provider/gen.ts)_ - -## `fluence provider info` - -Print nox signing wallets and peer ids - -``` -USAGE - $ fluence provider info [--no-input] [--env ] [--priv-key ] - [--nox-names ] [--json] - -FLAGS - --env= Fluence Environment to use when running the command - --json Output JSON - --no-input Don't interactively ask for any input from the user - --nox-names= Comma-separated names of noxes from provider.yaml. To use all of your - noxes: --nox-names all - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is - unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - -DESCRIPTION - Print nox signing wallets and peer ids - -ALIASES - $ fluence provider i -``` - -_See code: [src/commands/provider/info.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/provider/info.ts)_ - -## `fluence provider init` - -Init provider config. Creates a provider.yaml file - -``` -USAGE - $ fluence provider init [--no-input] [--noxes ] [--env ] [--priv-key - ] - -FLAGS - --env= Fluence Environment to use when running the command - --no-input Don't interactively ask for any input from the user - --noxes= Number of Compute Peers to generate when a new provider.yaml is created - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is - unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - -DESCRIPTION - Init provider config. Creates a provider.yaml file -``` - -_See code: [src/commands/provider/init.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/provider/init.ts)_ - -## `fluence provider offer-create` - -Create offers. You have to be registered as a provider to do that - -``` -USAGE - $ fluence provider offer-create [--no-input] [--env ] [--priv-key ] - [--offers ] - -FLAGS - --env= Fluence Environment to use when running the command - --no-input Don't interactively ask for any input from the user - --offers= Comma-separated list of offer names. To use all of your offers: --offers - all - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is - unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - -DESCRIPTION - Create offers. You have to be registered as a provider to do that - -ALIASES - $ fluence provider oc -``` - -_See code: [src/commands/provider/offer-create.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/provider/offer-create.ts)_ - -## `fluence provider offer-info` - -Get info about offers - -``` -USAGE - $ fluence provider offer-info [--no-input] [--offers | --offer-ids ] [--env ] [--priv-key ] - -FLAGS - --env= Fluence Environment to use when running the command - --no-input Don't interactively ask for any input from the user - --offer-ids= Comma-separated list of offer ids. Can't be used together with --offers - flag - --offers= Comma-separated list of offer names. To use all of your offers: --offers - all - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is - unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - -DESCRIPTION - Get info about offers - -ALIASES - $ fluence provider oi -``` - -_See code: [src/commands/provider/offer-info.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/provider/offer-info.ts)_ - -## `fluence provider offer-update` - -Update offers - -``` -USAGE - $ fluence provider offer-update [--no-input] [--offers ] [--env ] - [--priv-key ] - -FLAGS - --env= Fluence Environment to use when running the command - --no-input Don't interactively ask for any input from the user - --offers= Comma-separated list of offer names. To use all of your offers: --offers - all - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is - unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - -DESCRIPTION - Update offers - -ALIASES - $ fluence provider ou -``` - -_See code: [src/commands/provider/offer-update.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/provider/offer-update.ts)_ - -## `fluence provider register` - -Register as a provider - -``` -USAGE - $ fluence provider register [--no-input] [--env ] [--priv-key ] - -FLAGS - --env= Fluence Environment to use when running the command - --no-input Don't interactively ask for any input from the user - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is - unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - -DESCRIPTION - Register as a provider - -ALIASES - $ fluence provider r -``` - -_See code: [src/commands/provider/register.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/provider/register.ts)_ - -## `fluence provider tokens-distribute` - -Distribute FLT tokens to noxes - -``` -USAGE - $ fluence provider tokens-distribute [--no-input] [--env ] [--priv-key ] - [--nox-names ] [--amount ] - -FLAGS - --amount= Amount of FLT tokens to distribute to noxes - --env= Fluence Environment to use when running the command - --no-input Don't interactively ask for any input from the user - --nox-names= Comma-separated names of noxes from provider.yaml. To use all of your - noxes: --nox-names all - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is - unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - -DESCRIPTION - Distribute FLT tokens to noxes - -ALIASES - $ fluence provider td -``` - -_See code: [src/commands/provider/tokens-distribute.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/provider/tokens-distribute.ts)_ - -## `fluence provider tokens-withdraw` - -Withdraw FLT tokens from noxes - -``` -USAGE - $ fluence provider tokens-withdraw [--no-input] [--env ] [--priv-key ] - [--nox-names ] [--amount ] - -FLAGS - --amount= Amount of FLT tokens to withdraw from noxes. Use --amount max to withdraw - maximum possible amount - --env= Fluence Environment to use when running the command - --no-input Don't interactively ask for any input from the user - --nox-names= Comma-separated names of noxes from provider.yaml. To use all of your - noxes: --nox-names all - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is - unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - -DESCRIPTION - Withdraw FLT tokens from noxes - -ALIASES - $ fluence provider tw -``` - -_See code: [src/commands/provider/tokens-withdraw.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/provider/tokens-withdraw.ts)_ - -## `fluence provider update` - -Update provider info - -``` -USAGE - $ fluence provider update [--no-input] [--env ] [--priv-key ] - -FLAGS - --env= Fluence Environment to use when running the command - --no-input Don't interactively ask for any input from the user - --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is - unsecure. On local env - 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is - used by default when CLI is used in non-interactive mode - -DESCRIPTION - Update provider info - -ALIASES - $ fluence provider u -``` - -_See code: [src/commands/provider/update.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/provider/update.ts)_ - -## `fluence run` - -Run the first aqua function CLI is able to find and compile among all aqua files specified in 'compileAqua' property of fluence.yaml file. If --input flag is used - then content of 'compileAqua' property in fluence.yaml will be ignored - -``` -USAGE - $ fluence run [--no-input] [--data ] [--data-path ] [--quiet] [-f ] - [--print-air | -b] [--off-aqua-logs] [-k ] [--relay ] [--ttl ] [--dial-timeout - ] [--particle-id] [--env ] [--import ...] [-i ] - [--const ...] [--log-level-compiler ] [--no-relay] [--no-xor] [--tracing] [--no-empty-response] - -FLAGS - -b, --print-beautified-air Prints beautified AIR code instead of function execution - -f, --func= Function call. Example: funcName("stringArg") - -i, --input= Path to an aqua file or a directory that contains your aqua files - -k, --sk= Name of the secret key for js-client inside CLI to use. If not - specified, will use the default key for the project. If there is no - fluence project or there is no default key, will use user's default - key - --const=... Constants to be passed to the compiler - --data= JSON in { [argumentName]: argumentValue } format. You can call a - function using these argument names like this: -f - 'myFunc(argumentName)'. Arguments in this flag override arguments in - the --data-path flag - --data-path= Path to a JSON file in { [argumentName]: argumentValue } format. You - can call a function using these argument names like this: -f - 'myFunc(argumentName)'. Arguments in this flag can be overridden - using --data flag - --dial-timeout= [default: 15000] Timeout for Fluence js-client to connect to relay - peer - --env= Fluence Environment to use when running the command - --import=... Path to a directory to import aqua files from. May be used several - times - --log-level-compiler= Set log level for the compiler. Must be one of: all, trace, debug, - info, warn, error, off - --no-empty-response Do not generate response call if there are no returned values - --no-input Don't interactively ask for any input from the user - --no-relay Do not generate a pass through the relay node - --no-xor Do not generate a wrapper that catches and displays errors - --off-aqua-logs Turns off logs from Console.print in aqua and from IPFS service - --particle-id Print particle ids when running Fluence js-client - --print-air Prints generated AIR code instead of function execution - --quiet Print only execution result. Overrides all --log-level-* flags - --relay= Relay for Fluence js-client to connect to - --tracing Compile aqua in tracing mode (for debugging purposes) - --ttl= [default: 15000] Particle Time To Live since 'now'. After that, - particle is expired and not processed. - -DESCRIPTION - Run the first aqua function CLI is able to find and compile among all aqua files specified in 'compileAqua' property - of fluence.yaml file. If --input flag is used - then content of 'compileAqua' property in fluence.yaml will be ignored - -EXAMPLES - $ fluence run -f 'funcName("stringArg")' -``` - -_See code: [src/commands/run.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/run.ts)_ - -## `fluence service add [PATH | URL]` - -Add service to fluence.yaml - -``` -USAGE - $ fluence service add [PATH | URL] [--no-input] [--name ] [--marine-build-args <--flag arg>] - -ARGUMENTS - PATH | URL Path to a service or url to .tar.gz archive - -FLAGS - --marine-build-args=<--flag arg> Space separated `cargo build` flags and args to pass to marine build. Overrides - 'marineBuildArgs' property in fluence.yaml. Default: --release - --name= Override service name (must start with a lowercase letter and contain only letters, - numbers, and underscores) - --no-input Don't interactively ask for any input from the user - -DESCRIPTION - Add service to fluence.yaml - -EXAMPLES - $ fluence service add -``` - -_See code: [src/commands/service/add.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/service/add.ts)_ - -## `fluence service new [NAME]` - -Create new marine service template - -``` -USAGE - $ fluence service new [NAME] [--no-input] [--path ] - -ARGUMENTS - NAME Unique service name (must start with a lowercase letter and contain only letters, numbers, and underscores) - -FLAGS - --no-input Don't interactively ask for any input from the user - --path= Path to services dir (default: src/services) - -DESCRIPTION - Create new marine service template - -EXAMPLES - $ fluence service new -``` - -_See code: [src/commands/service/new.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/service/new.ts)_ - -## `fluence service remove [NAME | PATH | URL]` - -Remove service from fluence.yaml services property and from all of the workers - -``` -USAGE - $ fluence service remove [NAME | PATH | URL] [--no-input] - -ARGUMENTS - NAME | PATH | URL Service name from fluence.yaml, path to a service or url to .tar.gz archive - -FLAGS - --no-input Don't interactively ask for any input from the user - -DESCRIPTION - Remove service from fluence.yaml services property and from all of the workers - -EXAMPLES - $ fluence service remove -``` - -_See code: [src/commands/service/remove.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/service/remove.ts)_ - -## `fluence service repl [NAME | PATH | URL]` - -Open service inside repl (downloads and builds modules if necessary) - -``` -USAGE - $ fluence service repl [NAME | PATH | URL] [--no-input] [--marine-build-args <--flag arg>] - -ARGUMENTS - NAME | PATH | URL Service name from fluence.yaml, path to a service or url to .tar.gz archive - -FLAGS - --marine-build-args=<--flag arg> Space separated `cargo build` flags and args to pass to marine build. Overrides - 'marineBuildArgs' property in fluence.yaml. Default: --release - --no-input Don't interactively ask for any input from the user - -DESCRIPTION - Open service inside repl (downloads and builds modules if necessary) - -EXAMPLES - $ fluence service repl -``` - -_See code: [src/commands/service/repl.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/service/repl.ts)_ - -## `fluence spell build [SPELL-NAMES]` - -Check spells aqua is able to compile without any errors - -``` -USAGE - $ fluence spell build [SPELL-NAMES] [--no-input] [--import ...] - -ARGUMENTS - SPELL-NAMES Comma separated names of spells to build. Example: "spell1,spell2" (by default all spells from 'spells' - property in fluence.yaml will be built) - -FLAGS - --import=... Path to a directory to import aqua files from. May be used several times - --no-input Don't interactively ask for any input from the user - -DESCRIPTION - Check spells aqua is able to compile without any errors - -EXAMPLES - $ fluence spell build -``` - -_See code: [src/commands/spell/build.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/spell/build.ts)_ - -## `fluence spell new [NAME]` - -Create a new spell template - -``` -USAGE - $ fluence spell new [NAME] [--no-input] [--path ] - -ARGUMENTS - NAME Spell name - -FLAGS - --no-input Don't interactively ask for any input from the user - --path= Path to spells dir (default: src/spells) - -DESCRIPTION - Create a new spell template - -EXAMPLES - $ fluence spell new -``` - -_See code: [src/commands/spell/new.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.17.0/src/commands/spell/new.ts)_ - -## `fluence update [CHANNEL]` - -update the fluence CLI - -``` -USAGE - $ fluence update [CHANNEL] [-a] [--force] [-i | -v ] - -FLAGS - -a, --available See available versions. - -i, --interactive Interactively select version to install. This is ignored if a channel is provided. - -v, --version= Install a specific version. - --force Force a re-download of the requested version. - -DESCRIPTION - update the fluence CLI - -EXAMPLES - Update to the stable channel: - - $ fluence update stable - - Update to a specific version: - - $ fluence update --version 1.0.0 - - Interactively select version: - - $ fluence update --interactive - - See available versions: - - $ fluence update --available -``` - -_See code: [@oclif/plugin-update](https://github.com/oclif/plugin-update/blob/v4.2.11/src/commands/update.ts)_ - diff --git a/docs/configs/env.md b/docs/configs/env.md deleted file mode 100644 index b9c57cb84..000000000 --- a/docs/configs/env.md +++ /dev/null @@ -1,11 +0,0 @@ -# env.yaml - -Defines user project preferences - -## Properties - -| Property | Type | Required | Description | -|--------------|---------|----------|---------------------------------------------------------------------------------------------------| -| `version` | integer | **Yes** | | -| `fluenceEnv` | string | No | Fluence environment to connect to Possible values are: `dar`, `kras`, `stage`, `local`, `custom`. | - diff --git a/install.sh b/install.sh index 4e407d4d3..229a03599 100755 --- a/install.sh +++ b/install.sh @@ -76,7 +76,7 @@ mkdir -p "${FLUENCE_USER_DIR}/cli" curl --progress-bar -o "${TEMP}/${archive}" "$url" tar --strip-components=1 -xzf "${TEMP}/${archive}" -C "${FLUENCE_USER_DIR}/cli" -# Add Fluence CLI to path with symling +# Add Fluence CLI to path with symlink if echo $PATH | grep -q $HOME/.local/bin; then echo "Adding Fluence CLI symlink to ${HOME}/.local/fluence" mkdir -p $HOME/.local/bin diff --git a/package.json b/package.json index 2a551d3dd..c109acd28 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,28 @@ ], "scripts": { "build": "turbo run build --cache-dir=.turbo", + "install-yarn-dependencies": "turbo run install-yarn-dependencies --cache-dir=.turbo", + "install-npm-dependencies": "turbo run install-npm-dependencies --cache-dir=.turbo", + "pack-ci": "turbo run pack-ci --cache-dir=.turbo", + "pack-linux-x64": "turbo run pack-linux-x64 --cache-dir=.turbo", + "pack-darwin-x64": "turbo run pack-darwin-x64 --cache-dir=.turbo", + "pack-darwin-arm64": "turbo run pack-darwin-arm64 --cache-dir=.turbo", + "pack-win32-x64": "turbo run pack-win32-x64 --cache-dir=.turbo", "on-each-commit": "turbo run on-each-commit --cache-dir=.turbo", + "download-marine-and-mrepl": "yarn ./packages/cli/package download-marine-and-mrepl", + "generate-templates": "yarn ./packages/cli/package generate-templates", + "local-up": "yarn ./packages/cli/package local-up", + "vitest-provider": "yarn ./packages/cli/package vitest-provider", + "vitest-deal-deploy": "yarn ./packages/cli/package vitest-deal-deploy", + "vitest-deal-update": "yarn ./packages/cli/package vitest-deal-update", + "vitest-smoke": "yarn ./packages/cli/package vitest-smoke", + "vitest-js-to-aqua": "yarn ./packages/cli/package vitest-js-to-aqua", + "vitest": "yarn vitest-provider && yarn vitest-deal-deploy && yarn vitest-deal-update && yarn vitest-smoke && yarn vitest-js-to-aqua", + "test": "yarn download-marine-and-mrepl && yarn generate-templates && yarn local-up && yarn vitest", + "test-linux-x64": "yarn pack-linux-x64 && yarn test", + "test-darwin-x64": "yarn pack-darwin-x64 && yarn test", + "test-darwin-arm64": "yarn pack-darwin-arm64 && yarn test", + "test-win32-x64": "yarn pack-win32-x64 && yarn test", "format": "prettier --write \"**/*.{ts,js,tsx}\"" }, "devDependencies": { diff --git a/packages/cli-connector/package.json b/packages/cli-connector/package.json index 919b3dbc1..9b82903cc 100644 --- a/packages/cli-connector/package.json +++ b/packages/cli-connector/package.json @@ -17,7 +17,6 @@ "@rainbow-me/rainbowkit": "^2.1.6", "@repo/common": "*", "@tanstack/react-query": "5.56.2", - "@total-typescript/ts-reset": "0.6.1", "buffer": "^6.0.3", "react": "^18.3.1", "react-dom": "^18.3.1", @@ -27,6 +26,7 @@ }, "devDependencies": { "@repo/eslint-config": "*", + "@total-typescript/ts-reset": "0.6.1", "@tsconfig/strictest": "2.0.5", "@tsconfig/vite-react": "3.0.2", "@types/react": "^18.3.6", diff --git a/packages/cli/package.json b/packages/cli/package.json new file mode 100644 index 000000000..5187f0346 --- /dev/null +++ b/packages/cli/package.json @@ -0,0 +1,26 @@ +{ + "name": "@repo/cli", + "private": true, + "dependencies": { + "@repo/cli-connector": "*", + "@repo/common": "*" + }, + "scripts": { + "install-yarn-dependencies": "yarn ./package install", + "install-npm-dependencies": "npm --prefix ./package/src/cli-aqua-dependencies install", + "before-build": "yarn ./package before-build", + "build": "yarn ./package build", + "pack-ci": "yarn ./package pack-ci", + "pack-linux-x64": "yarn ./package pack-linux-x64", + "pack-darwin-x64": "yarn ./package pack-darwin-x64", + "pack-darwin-arm64": "yarn ./package pack-darwin-arm64", + "pack-win32-x64": "yarn ./package pack-win32-x64", + "on-each-commit": "yarn ./package on-each-commit", + "generate-templates": "yarn ./package generate-templates", + "vitest-provider": "yarn ./package vitest-provider", + "vitest-deal-deploy": "yarn ./package vitest-deal-deploy", + "vitest-deal-update": "yarn ./package vitest-deal-update", + "vitest-smoke": "yarn ./package vitest-smoke", + "vitest-js-to-aqua": "yarn ./package vitest-js-to-aqua" + } +} diff --git a/cli/.gitignore b/packages/cli/package/.gitignore similarity index 100% rename from cli/.gitignore rename to packages/cli/package/.gitignore diff --git a/cli/.prettierignore b/packages/cli/package/.prettierignore similarity index 100% rename from cli/.prettierignore rename to packages/cli/package/.prettierignore diff --git a/cli/.yarn/patches/oclif-npm-4.1.0-9d1cce6fed.patch b/packages/cli/package/.yarn/patches/oclif-npm-4.1.0-9d1cce6fed.patch similarity index 100% rename from cli/.yarn/patches/oclif-npm-4.1.0-9d1cce6fed.patch rename to packages/cli/package/.yarn/patches/oclif-npm-4.1.0-9d1cce6fed.patch diff --git a/cli/.yarn/releases/yarn-4.2.2.cjs b/packages/cli/package/.yarn/releases/yarn-4.2.2.cjs similarity index 100% rename from cli/.yarn/releases/yarn-4.2.2.cjs rename to packages/cli/package/.yarn/releases/yarn-4.2.2.cjs diff --git a/cli/.yarnrc.yml b/packages/cli/package/.yarnrc.yml similarity index 100% rename from cli/.yarnrc.yml rename to packages/cli/package/.yarnrc.yml diff --git a/cli/CHANGELOG.md b/packages/cli/package/CHANGELOG.md similarity index 100% rename from cli/CHANGELOG.md rename to packages/cli/package/CHANGELOG.md diff --git a/cli/bin/dev.js b/packages/cli/package/bin/dev.js similarity index 100% rename from cli/bin/dev.js rename to packages/cli/package/bin/dev.js diff --git a/cli/bin/run.cmd b/packages/cli/package/bin/run.cmd similarity index 100% rename from cli/bin/run.cmd rename to packages/cli/package/bin/run.cmd diff --git a/cli/bin/run.js b/packages/cli/package/bin/run.js similarity index 100% rename from cli/bin/run.js rename to packages/cli/package/bin/run.js diff --git a/packages/cli/package/docs/commands/README.md b/packages/cli/package/docs/commands/README.md new file mode 100644 index 000000000..1607e1ad8 --- /dev/null +++ b/packages/cli/package/docs/commands/README.md @@ -0,0 +1,2066 @@ +# Commands + +* [`fluence air beautify [PATH]`](#fluence-air-beautify-path) +* [`fluence aqua`](#fluence-aqua) +* [`fluence aqua imports`](#fluence-aqua-imports) +* [`fluence aqua json [INPUT] [OUTPUT]`](#fluence-aqua-json-input-output) +* [`fluence aqua yml [INPUT] [OUTPUT]`](#fluence-aqua-yml-input-output) +* [`fluence autocomplete [SHELL]`](#fluence-autocomplete-shell) +* [`fluence build`](#fluence-build) +* [`fluence chain info`](#fluence-chain-info) +* [`fluence deal change-app [DEAL-ADDRESS] [NEW-APP-CID]`](#fluence-deal-change-app-deal-address-new-app-cid) +* [`fluence deal create`](#fluence-deal-create) +* [`fluence deal deposit [AMOUNT] [DEPLOYMENT-NAMES]`](#fluence-deal-deposit-amount-deployment-names) +* [`fluence deal info [DEPLOYMENT-NAMES]`](#fluence-deal-info-deployment-names) +* [`fluence deal logs [DEPLOYMENT-NAMES]`](#fluence-deal-logs-deployment-names) +* [`fluence deal stop [DEPLOYMENT-NAMES]`](#fluence-deal-stop-deployment-names) +* [`fluence deal withdraw [AMOUNT] [DEPLOYMENT-NAMES]`](#fluence-deal-withdraw-amount-deployment-names) +* [`fluence deal workers-add [DEPLOYMENT-NAMES]`](#fluence-deal-workers-add-deployment-names) +* [`fluence deal workers-remove [WORKER-IDS]`](#fluence-deal-workers-remove-worker-ids) +* [`fluence default env [ENV]`](#fluence-default-env-env) +* [`fluence default peers [ENV]`](#fluence-default-peers-env) +* [`fluence delegator collateral-add [IDS]`](#fluence-delegator-collateral-add-ids) +* [`fluence delegator collateral-withdraw [IDS]`](#fluence-delegator-collateral-withdraw-ids) +* [`fluence delegator reward-withdraw [IDS]`](#fluence-delegator-reward-withdraw-ids) +* [`fluence dep install [PACKAGE-NAME | PACKAGE-NAME@VERSION]`](#fluence-dep-install-package-name--package-nameversion) +* [`fluence dep reset`](#fluence-dep-reset) +* [`fluence dep uninstall PACKAGE-NAME`](#fluence-dep-uninstall-package-name) +* [`fluence dep versions`](#fluence-dep-versions) +* [`fluence deploy [DEPLOYMENT-NAMES]`](#fluence-deploy-deployment-names) +* [`fluence help [COMMAND]`](#fluence-help-command) +* [`fluence init [PATH]`](#fluence-init-path) +* [`fluence key default [NAME]`](#fluence-key-default-name) +* [`fluence key new [NAME]`](#fluence-key-new-name) +* [`fluence key remove [NAME]`](#fluence-key-remove-name) +* [`fluence local down`](#fluence-local-down) +* [`fluence local init`](#fluence-local-init) +* [`fluence local logs`](#fluence-local-logs) +* [`fluence local ps`](#fluence-local-ps) +* [`fluence local up`](#fluence-local-up) +* [`fluence module add [PATH | URL]`](#fluence-module-add-path--url) +* [`fluence module build [PATH]`](#fluence-module-build-path) +* [`fluence module new [NAME]`](#fluence-module-new-name) +* [`fluence module pack [PATH]`](#fluence-module-pack-path) +* [`fluence module remove [NAME | PATH | URL]`](#fluence-module-remove-name--path--url) +* [`fluence provider cc-activate`](#fluence-provider-cc-activate) +* [`fluence provider cc-create`](#fluence-provider-cc-create) +* [`fluence provider cc-finish`](#fluence-provider-cc-finish) +* [`fluence provider cc-info`](#fluence-provider-cc-info) +* [`fluence provider cc-remove`](#fluence-provider-cc-remove) +* [`fluence provider cc-rewards-withdraw`](#fluence-provider-cc-rewards-withdraw) +* [`fluence provider deal-exit`](#fluence-provider-deal-exit) +* [`fluence provider deal-list`](#fluence-provider-deal-list) +* [`fluence provider deal-rewards-info [DEAL-ADDRESS] [ON-CHAIN-WORKER-ID]`](#fluence-provider-deal-rewards-info-deal-address-on-chain-worker-id) +* [`fluence provider deal-rewards-withdraw`](#fluence-provider-deal-rewards-withdraw) +* [`fluence provider gen`](#fluence-provider-gen) +* [`fluence provider info`](#fluence-provider-info) +* [`fluence provider init`](#fluence-provider-init) +* [`fluence provider offer-create`](#fluence-provider-offer-create) +* [`fluence provider offer-info`](#fluence-provider-offer-info) +* [`fluence provider offer-remove`](#fluence-provider-offer-remove) +* [`fluence provider offer-update`](#fluence-provider-offer-update) +* [`fluence provider register`](#fluence-provider-register) +* [`fluence provider tokens-distribute`](#fluence-provider-tokens-distribute) +* [`fluence provider tokens-withdraw`](#fluence-provider-tokens-withdraw) +* [`fluence provider update`](#fluence-provider-update) +* [`fluence run`](#fluence-run) +* [`fluence service add [PATH | URL]`](#fluence-service-add-path--url) +* [`fluence service new [NAME]`](#fluence-service-new-name) +* [`fluence service remove [NAME | PATH | URL]`](#fluence-service-remove-name--path--url) +* [`fluence service repl [NAME | PATH | URL]`](#fluence-service-repl-name--path--url) +* [`fluence spell build [SPELL-NAMES]`](#fluence-spell-build-spell-names) +* [`fluence spell new [NAME]`](#fluence-spell-new-name) +* [`fluence update [CHANNEL]`](#fluence-update-channel) + +## `fluence air beautify [PATH]` + +Prints AIR script in human-readable Python-like representation. This representation cannot be executed and is intended to be read by mere mortals. + +``` +USAGE + $ fluence air beautify [PATH] [--no-input] + +ARGUMENTS + PATH Path to an AIR file. Must be relative to the current working directory or absolute + +FLAGS + --no-input Don't interactively ask for any input from the user + +DESCRIPTION + Prints AIR script in human-readable Python-like representation. This representation cannot be executed and is intended + to be read by mere mortals. + +ALIASES + $ fluence air b +``` + +_See code: [src/commands/air/beautify.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/air/beautify.ts)_ + +## `fluence aqua` + +Compile aqua defined in 'compileAqua' property of fluence.yaml. If --input flag is used - then content of 'compileAqua' property in fluence.yaml will be ignored + +``` +USAGE + $ fluence aqua [-n ] [--no-input] [-w] [-o ] [--air | --js] [--import ...] [-i + ] [--const ...] [--log-level-compiler ] [--no-relay] [--no-xor] [--tracing] + [--no-empty-response] [--dry] + +FLAGS + -i, --input= Path to an aqua file or a directory that contains your aqua files + -n, --names= Comma-separated names of the configs from 'compileAqua' property of fluence.yaml to + compile. If not specified, all configs will be compiled + -o, --output= Path to the output directory. Must be relative to the current working directory or + absolute. Will be created if it doesn't exists + -w, --watch Watch aqua file or folder for changes and recompile + --air Generate .air file instead of .ts + --const=... Constants to be passed to the compiler + --dry Checks if compilation succeeded, without output + --import=... Path to a directory to import aqua files from. May be used several times + --js Generate .js file instead of .ts + --log-level-compiler= Set log level for the compiler. Must be one of: all, trace, debug, info, warn, + error, off + --no-empty-response Do not generate response call if there are no returned values + --no-input Don't interactively ask for any input from the user + --no-relay Do not generate a pass through the relay node + --no-xor Do not generate a wrapper that catches and displays errors + --tracing Compile aqua in tracing mode (for debugging purposes) + +DESCRIPTION + Compile aqua defined in 'compileAqua' property of fluence.yaml. If --input flag is used - then content of + 'compileAqua' property in fluence.yaml will be ignored + +EXAMPLES + $ fluence aqua +``` + +_See code: [src/commands/aqua.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/aqua.ts)_ + +## `fluence aqua imports` + +Returns a list of aqua imports that CLI produces + +``` +USAGE + $ fluence aqua imports [--no-input] + +FLAGS + --no-input Don't interactively ask for any input from the user + +DESCRIPTION + Returns a list of aqua imports that CLI produces +``` + +_See code: [src/commands/aqua/imports.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/aqua/imports.ts)_ + +## `fluence aqua json [INPUT] [OUTPUT]` + +Infers aqua types for an arbitrary json file, generates valid aqua code with a function call that returns an aqua object literal with the same structure as the json file. For valid generation please refer to aqua documentation https://fluence.dev/docs/aqua-book/language/ to learn about what kind of structures are valid in aqua language and what they translate into + +``` +USAGE + $ fluence aqua json [INPUT] [OUTPUT] [--no-input] [--f64] [--types ] + +ARGUMENTS + INPUT Path to json file + OUTPUT Path to the output dir + +FLAGS + --f64 Convert all numbers to f64. Useful for arrays objects that contain numbers of different types in them. + Without this flag, numbers will be converted to u64, i64 or f64 depending on their value + --no-input Don't interactively ask for any input from the user + --types= Experimental! Path to a file with custom types. Must be a list with objects that have 'name' and + 'properties'. 'properties' must be a list of all custom type properties + +DESCRIPTION + Infers aqua types for an arbitrary json file, generates valid aqua code with a function call that returns an aqua + object literal with the same structure as the json file. For valid generation please refer to aqua documentation + https://fluence.dev/docs/aqua-book/language/ to learn about what kind of structures are valid in aqua language and + what they translate into +``` + +_See code: [src/commands/aqua/json.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/aqua/json.ts)_ + +## `fluence aqua yml [INPUT] [OUTPUT]` + +Infers aqua types for an arbitrary yaml file, generates valid aqua code with a function call that returns an aqua object literal with the same structure as the yaml file. For valid generation please refer to aqua documentation https://fluence.dev/docs/aqua-book/language/ to learn about what kind of structures are valid in aqua language and what they translate into + +``` +USAGE + $ fluence aqua yml [INPUT] [OUTPUT] [--no-input] [--f64] [--types ] + +ARGUMENTS + INPUT Path to yaml file + OUTPUT Path to the output dir + +FLAGS + --f64 Convert all numbers to f64. Useful for arrays objects that contain numbers of different types in them. + Without this flag, numbers will be converted to u64, i64 or f64 depending on their value + --no-input Don't interactively ask for any input from the user + --types= Experimental! Path to a file with custom types. Must be a list with objects that have 'name' and + 'properties'. 'properties' must be a list of all custom type properties + +DESCRIPTION + Infers aqua types for an arbitrary yaml file, generates valid aqua code with a function call that returns an aqua + object literal with the same structure as the yaml file. For valid generation please refer to aqua documentation + https://fluence.dev/docs/aqua-book/language/ to learn about what kind of structures are valid in aqua language and + what they translate into + +ALIASES + $ fluence aqua yaml +``` + +_See code: [src/commands/aqua/yml.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/aqua/yml.ts)_ + +## `fluence autocomplete [SHELL]` + +Display autocomplete installation instructions. + +``` +USAGE + $ fluence autocomplete [SHELL] [-r] + +ARGUMENTS + SHELL (zsh|bash|powershell) Shell type + +FLAGS + -r, --refresh-cache Refresh cache (ignores displaying instructions) + +DESCRIPTION + Display autocomplete installation instructions. + +EXAMPLES + $ fluence autocomplete + + $ fluence autocomplete bash + + $ fluence autocomplete zsh + + $ fluence autocomplete powershell + + $ fluence autocomplete --refresh-cache +``` + +_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v3.0.17/src/commands/autocomplete/index.ts)_ + +## `fluence build` + +Build all application services, described in fluence.yaml and generate aqua interfaces for them + +``` +USAGE + $ fluence build [--no-input] [--marine-build-args <--flag arg>] [--import ...] [--env ] + +FLAGS + --env= Fluence Environment to use when running the command + --import=... Path to a directory to import aqua files from. May be used several times + --marine-build-args=<--flag arg> Space separated `cargo build` flags and args to pass to marine build. + Overrides 'marineBuildArgs' property in fluence.yaml. Default: --release + --no-input Don't interactively ask for any input from the user + +DESCRIPTION + Build all application services, described in fluence.yaml and generate aqua interfaces for them + +EXAMPLES + $ fluence build +``` + +_See code: [src/commands/build.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/build.ts)_ + +## `fluence chain info` + +Show contract addresses for the fluence environment and accounts for the local environment + +``` +USAGE + $ fluence chain info [--no-input] [--env ] [--priv-key ] + +FLAGS + --env= Fluence Environment to use when running the command + --no-input Don't interactively ask for any input from the user + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + +DESCRIPTION + Show contract addresses for the fluence environment and accounts for the local environment +``` + +_See code: [src/commands/chain/info.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/chain/info.ts)_ + +## `fluence deal change-app [DEAL-ADDRESS] [NEW-APP-CID]` + +Change app id in the deal + +``` +USAGE + $ fluence deal change-app [DEAL-ADDRESS] [NEW-APP-CID] [--no-input] [--env ] + [--priv-key ] + +ARGUMENTS + DEAL-ADDRESS Deal address + NEW-APP-CID New app CID for the deal + +FLAGS + --env= Fluence Environment to use when running the command + --no-input Don't interactively ask for any input from the user + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + +DESCRIPTION + Change app id in the deal +``` + +_See code: [src/commands/deal/change-app.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/deal/change-app.ts)_ + +## `fluence deal create` + +Create your deal with the specified parameters + +``` +USAGE + $ fluence deal create --app-cid --collateral-per-worker --min-workers --target-workers + --max-workers-per-provider --price-per-cu-per-epoch --cu-count-per-worker + [--no-input] [--initial-balance ] [--effectors ] [--whitelist | --blacklist ] + [--protocol-version ] [--env ] [--priv-key ] + +FLAGS + --app-cid= (required) CID of the application that will be deployed + --blacklist= Comma-separated list of blacklisted providers + --collateral-per-worker= (required) Collateral per worker + --cu-count-per-worker= (required) Compute unit count per worker + --effectors= Comma-separated list of effector to be used in the deal + --env= Fluence Environment to use when running the command + --initial-balance= Initial balance + --max-workers-per-provider= (required) Max workers per provider + --min-workers= (required) Required workers to activate the deal + --no-input Don't interactively ask for any input from the user + --price-per-cu-per-epoch= (required) Price per CU per epoch + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + --protocol-version= Protocol version + --target-workers= (required) Max workers in the deal + --whitelist= Comma-separated list of whitelisted providers + +DESCRIPTION + Create your deal with the specified parameters +``` + +_See code: [src/commands/deal/create.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/deal/create.ts)_ + +## `fluence deal deposit [AMOUNT] [DEPLOYMENT-NAMES]` + +Deposit do the deal + +``` +USAGE + $ fluence deal deposit [AMOUNT] [DEPLOYMENT-NAMES] [--no-input] [--env ] + [--priv-key ] [--deal-ids ] + +ARGUMENTS + AMOUNT Amount of USDC tokens to deposit + DEPLOYMENT-NAMES Comma separated names of deployments. Can't be used together with --deal-ids flag + +FLAGS + --deal-ids= Comma-separated deal ids + --env= Fluence Environment to use when running the command + --no-input Don't interactively ask for any input from the user + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + +DESCRIPTION + Deposit do the deal +``` + +_See code: [src/commands/deal/deposit.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/deal/deposit.ts)_ + +## `fluence deal info [DEPLOYMENT-NAMES]` + +Get info about the deal + +``` +USAGE + $ fluence deal info [DEPLOYMENT-NAMES] [--no-input] [--env ] [--priv-key + ] [--deal-ids ] + +ARGUMENTS + DEPLOYMENT-NAMES Comma separated names of deployments. Can't be used together with --deal-ids flag + +FLAGS + --deal-ids= Comma-separated deal ids + --env= Fluence Environment to use when running the command + --no-input Don't interactively ask for any input from the user + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + +DESCRIPTION + Get info about the deal +``` + +_See code: [src/commands/deal/info.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/deal/info.ts)_ + +## `fluence deal logs [DEPLOYMENT-NAMES]` + +Get logs from deployed workers for deals listed in workers.yaml + +``` +USAGE + $ fluence deal logs [DEPLOYMENT-NAMES] [--no-input] [-k ] [--relay ] [--ttl + ] [--dial-timeout ] [--particle-id] [--env ] + [--off-aqua-logs] [--tracing] [--deal-ids ] [--spell ] + +ARGUMENTS + DEPLOYMENT-NAMES Comma separated names of deployments. Can't be used together with --deal-ids flag + +FLAGS + -k, --sk= Name of the secret key for js-client inside CLI to use. If not + specified, will use the default key for the project. If there is no + fluence project or there is no default key, will use user's default key + --deal-ids= Comma-separated deal ids + --dial-timeout= [default: 15000] Timeout for Fluence js-client to connect to relay peer + --env= Fluence Environment to use when running the command + --no-input Don't interactively ask for any input from the user + --off-aqua-logs Turns off logs from Console.print in aqua and from IPFS service + --particle-id Print particle ids when running Fluence js-client + --relay= Relay for Fluence js-client to connect to + --spell= [default: worker-spell] Spell name to get logs for + --tracing Compile aqua in tracing mode (for debugging purposes) + --ttl= [default: 15000] Particle Time To Live since 'now'. After that, + particle is expired and not processed. + +DESCRIPTION + Get logs from deployed workers for deals listed in workers.yaml + +EXAMPLES + $ fluence deal logs +``` + +_See code: [src/commands/deal/logs.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/deal/logs.ts)_ + +## `fluence deal stop [DEPLOYMENT-NAMES]` + +Stop the deal + +``` +USAGE + $ fluence deal stop [DEPLOYMENT-NAMES] [--no-input] [--env ] [--priv-key + ] [--deal-ids ] + +ARGUMENTS + DEPLOYMENT-NAMES Comma separated names of deployments. Can't be used together with --deal-ids flag + +FLAGS + --deal-ids= Comma-separated deal ids + --env= Fluence Environment to use when running the command + --no-input Don't interactively ask for any input from the user + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + +DESCRIPTION + Stop the deal +``` + +_See code: [src/commands/deal/stop.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/deal/stop.ts)_ + +## `fluence deal withdraw [AMOUNT] [DEPLOYMENT-NAMES]` + +Withdraw tokens from the deal + +``` +USAGE + $ fluence deal withdraw [AMOUNT] [DEPLOYMENT-NAMES] [--no-input] [--env ] + [--priv-key ] [--deal-ids ] + +ARGUMENTS + AMOUNT Amount of USDC tokens to withdraw + DEPLOYMENT-NAMES Comma separated names of deployments. Can't be used together with --deal-ids flag + +FLAGS + --deal-ids= Comma-separated deal ids + --env= Fluence Environment to use when running the command + --no-input Don't interactively ask for any input from the user + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + +DESCRIPTION + Withdraw tokens from the deal +``` + +_See code: [src/commands/deal/withdraw.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/deal/withdraw.ts)_ + +## `fluence deal workers-add [DEPLOYMENT-NAMES]` + +Add missing workers to the deal + +``` +USAGE + $ fluence deal workers-add [DEPLOYMENT-NAMES] [--no-input] [--env ] [--priv-key + ] [--deal-ids ] + +ARGUMENTS + DEPLOYMENT-NAMES Comma separated names of deployments. Can't be used together with --deal-ids flag + +FLAGS + --deal-ids= Comma-separated deal ids + --env= Fluence Environment to use when running the command + --no-input Don't interactively ask for any input from the user + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + +DESCRIPTION + Add missing workers to the deal + +ALIASES + $ fluence deal wa +``` + +_See code: [src/commands/deal/workers-add.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/deal/workers-add.ts)_ + +## `fluence deal workers-remove [WORKER-IDS]` + +Remove unit from the deal + +``` +USAGE + $ fluence deal workers-remove [WORKER-IDS] [--no-input] [--env ] [--priv-key + ] [--deal-id ] [--name ] + +ARGUMENTS + WORKER-IDS Comma-separated compute unit ids. You can get them using 'fluence deal info' command + +FLAGS + --deal-id= Deal id. You can get it using 'fluence deal info' command + --env= Fluence Environment to use when running the command + --name= Name of the deployment from workers.yaml + --no-input Don't interactively ask for any input from the user + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + +DESCRIPTION + Remove unit from the deal + +ALIASES + $ fluence deal wr +``` + +_See code: [src/commands/deal/workers-remove.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/deal/workers-remove.ts)_ + +## `fluence default env [ENV]` + +Switch default Fluence Environment + +``` +USAGE + $ fluence default env [ENV] [--no-input] + +ARGUMENTS + ENV Fluence Environment to use when running the command + +FLAGS + --no-input Don't interactively ask for any input from the user + +DESCRIPTION + Switch default Fluence Environment + +EXAMPLES + $ fluence default env +``` + +_See code: [src/commands/default/env.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/default/env.ts)_ + +## `fluence default peers [ENV]` + +Print default Fluence network peer addresses + +``` +USAGE + $ fluence default peers [ENV] [--no-input] + +ARGUMENTS + ENV Fluence Environment to use when running the command + +FLAGS + --no-input Don't interactively ask for any input from the user + +DESCRIPTION + Print default Fluence network peer addresses + +EXAMPLES + $ fluence default peers +``` + +_See code: [src/commands/default/peers.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/default/peers.ts)_ + +## `fluence delegator collateral-add [IDS]` + +Add FLT collateral to capacity commitment + +``` +USAGE + $ fluence delegator collateral-add [IDS] [--no-input] [--env ] [--priv-key + ] + +ARGUMENTS + IDS Comma separated capacity commitment IDs + +FLAGS + --env= Fluence Environment to use when running the command + --no-input Don't interactively ask for any input from the user + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + +DESCRIPTION + Add FLT collateral to capacity commitment + +ALIASES + $ fluence delegator ca +``` + +_See code: [src/commands/delegator/collateral-add.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/delegator/collateral-add.ts)_ + +## `fluence delegator collateral-withdraw [IDS]` + +Withdraw FLT collateral from capacity commitment + +``` +USAGE + $ fluence delegator collateral-withdraw [IDS] [--no-input] [--env ] [--priv-key ] + [--finish] + +ARGUMENTS + IDS Comma separated capacity commitment IDs + +FLAGS + --env= Fluence Environment to use when running the command + --finish Finish capacity commitment after collateral withdrawal + --no-input Don't interactively ask for any input from the user + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + +DESCRIPTION + Withdraw FLT collateral from capacity commitment + +ALIASES + $ fluence delegator cw +``` + +_See code: [src/commands/delegator/collateral-withdraw.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/delegator/collateral-withdraw.ts)_ + +## `fluence delegator reward-withdraw [IDS]` + +Withdraw FLT rewards from capacity commitment + +``` +USAGE + $ fluence delegator reward-withdraw [IDS] [--no-input] [--env ] [--priv-key + ] + +ARGUMENTS + IDS Comma separated capacity commitment IDs + +FLAGS + --env= Fluence Environment to use when running the command + --no-input Don't interactively ask for any input from the user + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + +DESCRIPTION + Withdraw FLT rewards from capacity commitment + +ALIASES + $ fluence delegator rw +``` + +_See code: [src/commands/delegator/reward-withdraw.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/delegator/reward-withdraw.ts)_ + +## `fluence dep install [PACKAGE-NAME | PACKAGE-NAME@VERSION]` + +Install aqua project dependencies (currently npm is used under the hood for managing aqua dependencies) + +``` +USAGE + $ fluence dep install [PACKAGE-NAME | PACKAGE-NAME@VERSION] [--no-input] + +ARGUMENTS + PACKAGE-NAME | PACKAGE-NAME@VERSION Valid argument for npm install command. If this argument is omitted all project + aqua dependencies will be installed and command will also make sure marine and + mrepl are installed + +FLAGS + --no-input Don't interactively ask for any input from the user + +DESCRIPTION + Install aqua project dependencies (currently npm is used under the hood for managing aqua dependencies) + +ALIASES + $ fluence dep i + +EXAMPLES + $ fluence dep install +``` + +_See code: [src/commands/dep/install.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/dep/install.ts)_ + +## `fluence dep reset` + +Reset all project dependencies to recommended versions + +``` +USAGE + $ fluence dep reset [--no-input] + +FLAGS + --no-input Don't interactively ask for any input from the user + +DESCRIPTION + Reset all project dependencies to recommended versions + +ALIASES + $ fluence dep r + +EXAMPLES + $ fluence dep reset +``` + +_See code: [src/commands/dep/reset.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/dep/reset.ts)_ + +## `fluence dep uninstall PACKAGE-NAME` + +Uninstall aqua project dependencies (currently npm is used under the hood for managing aqua dependencies) + +``` +USAGE + $ fluence dep uninstall PACKAGE-NAME [--no-input] + +ARGUMENTS + PACKAGE-NAME Aqua dependency name + +FLAGS + --no-input Don't interactively ask for any input from the user + +DESCRIPTION + Uninstall aqua project dependencies (currently npm is used under the hood for managing aqua dependencies) + +ALIASES + $ fluence dep un + +EXAMPLES + $ fluence dep uninstall +``` + +_See code: [src/commands/dep/uninstall.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/dep/uninstall.ts)_ + +## `fluence dep versions` + +Get versions of all cli dependencies, including aqua, marine, mrepl and internal + +``` +USAGE + $ fluence dep versions [--no-input] [--default] [--json] + +FLAGS + --default Display default npm and cargo dependencies and their versions for current CLI version. Default npm + dependencies are always available to be imported in Aqua + --json Output JSON + --no-input Don't interactively ask for any input from the user + +DESCRIPTION + Get versions of all cli dependencies, including aqua, marine, mrepl and internal + +ALIASES + $ fluence dep v + +EXAMPLES + $ fluence dep versions +``` + +_See code: [src/commands/dep/versions.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/dep/versions.ts)_ + +## `fluence deploy [DEPLOYMENT-NAMES]` + +Deploy according to 'deployments' property in fluence.yaml + +``` +USAGE + $ fluence deploy [DEPLOYMENT-NAMES] [--no-input] [--env ] [--priv-key + ] [--import ...] [--no-build] [--marine-build-args <--flag arg>] [-u] [--peer-ids ] + +ARGUMENTS + DEPLOYMENT-NAMES Comma separated names of deployments. Can't be used together with --deal-ids flag + +FLAGS + -u, --update Update your previous deployment + --env= Fluence Environment to use when running the command + --import=... Path to a directory to import aqua files from. May be used several + times + --marine-build-args=<--flag arg> Space separated `cargo build` flags and args to pass to marine build. + Overrides 'marineBuildArgs' property in fluence.yaml. Default: + --release + --no-build Don't build the project before running the command + --no-input Don't interactively ask for any input from the user + --peer-ids= Comma separated list of peer ids to deploy to. Creates 1 worker for + each peer with 'cuCountPerWorker' number of compute units + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags + is unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is + used by default when CLI is used in non-interactive mode + +DESCRIPTION + Deploy according to 'deployments' property in fluence.yaml + +EXAMPLES + $ fluence deploy +``` + +_See code: [src/commands/deploy.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/deploy.ts)_ + +## `fluence help [COMMAND]` + +Display help for fluence. + +``` +USAGE + $ fluence help [COMMAND...] [-n] + +ARGUMENTS + COMMAND... Command to show help for. + +FLAGS + -n, --nested-commands Include all nested commands in the output. + +DESCRIPTION + Display help for fluence. +``` + +_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.0.21/src/commands/help.ts)_ + +## `fluence init [PATH]` + +Initialize fluence project + +``` +USAGE + $ fluence init [PATH] [--no-input] [-t ] [--env ] [--noxes + ] + +ARGUMENTS + PATH Project path + +FLAGS + -t, --template= Template to use for the project. One of: quickstart, minimal, ts, js + --env= Fluence Environment to use when running the command + --no-input Don't interactively ask for any input from the user + --noxes= Number of Compute Peers to generate when a new provider.yaml is created + +DESCRIPTION + Initialize fluence project + +EXAMPLES + $ fluence init +``` + +_See code: [src/commands/init.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/init.ts)_ + +## `fluence key default [NAME]` + +Set default key-pair for user or project + +``` +USAGE + $ fluence key default [NAME] [--no-input] [--user] + +ARGUMENTS + NAME Key-pair name + +FLAGS + --no-input Don't interactively ask for any input from the user + --user Set default key-pair for current user instead of current project + +DESCRIPTION + Set default key-pair for user or project + +EXAMPLES + $ fluence key default +``` + +_See code: [src/commands/key/default.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/key/default.ts)_ + +## `fluence key new [NAME]` + +Generate key-pair and store it in user-secrets.yaml or project-secrets.yaml + +``` +USAGE + $ fluence key new [NAME] [--no-input] [--user] [--default] + +ARGUMENTS + NAME Key-pair name + +FLAGS + --default Set new key-pair as default for current project or user + --no-input Don't interactively ask for any input from the user + --user Generate key-pair for current user instead of generating key-pair for current project + +DESCRIPTION + Generate key-pair and store it in user-secrets.yaml or project-secrets.yaml + +EXAMPLES + $ fluence key new +``` + +_See code: [src/commands/key/new.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/key/new.ts)_ + +## `fluence key remove [NAME]` + +Remove key-pair from user-secrets.yaml or project-secrets.yaml + +``` +USAGE + $ fluence key remove [NAME] [--no-input] [--user] + +ARGUMENTS + NAME Key-pair name + +FLAGS + --no-input Don't interactively ask for any input from the user + --user Remove key-pair from current user instead of removing key-pair from current project + +DESCRIPTION + Remove key-pair from user-secrets.yaml or project-secrets.yaml + +EXAMPLES + $ fluence key remove +``` + +_See code: [src/commands/key/remove.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/key/remove.ts)_ + +## `fluence local down` + +Stop and remove currently running docker-compose.yaml using docker compose + +``` +USAGE + $ fluence local down [--no-input] [-v] [--flags <--flag arg>] + +FLAGS + -v, --volumes Remove named volumes declared in the "volumes" section of the Compose file and anonymous + volumes attached to containers + --flags=<--flag arg> Space separated flags to pass to `docker compose` + --no-input Don't interactively ask for any input from the user + +DESCRIPTION + Stop and remove currently running docker-compose.yaml using docker compose + +EXAMPLES + $ fluence local down +``` + +_See code: [src/commands/local/down.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/local/down.ts)_ + +## `fluence local init` + +Init docker-compose.yaml according to provider.yaml + +``` +USAGE + $ fluence local init [--no-input] [--env ] [--priv-key ] + +FLAGS + --env= Fluence Environment to use when running the command + --no-input Don't interactively ask for any input from the user + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + +DESCRIPTION + Init docker-compose.yaml according to provider.yaml + +EXAMPLES + $ fluence local init +``` + +_See code: [src/commands/local/init.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/local/init.ts)_ + +## `fluence local logs` + +Display docker-compose.yaml logs + +``` +USAGE + $ fluence local logs [--no-input] [--flags <--flag arg>] + +FLAGS + --flags=<--flag arg> Space separated flags to pass to `docker compose` + --no-input Don't interactively ask for any input from the user + +DESCRIPTION + Display docker-compose.yaml logs + +EXAMPLES + $ fluence local logs +``` + +_See code: [src/commands/local/logs.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/local/logs.ts)_ + +## `fluence local ps` + +List containers using docker compose + +``` +USAGE + $ fluence local ps [--no-input] [--flags <--flag arg>] + +FLAGS + --flags=<--flag arg> Space separated flags to pass to `docker compose` + --no-input Don't interactively ask for any input from the user + +DESCRIPTION + List containers using docker compose + +EXAMPLES + $ fluence local ps +``` + +_See code: [src/commands/local/ps.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/local/ps.ts)_ + +## `fluence local up` + +Run docker-compose.yaml using docker compose and set up provider using all the offers from the 'offers' section in provider.yaml config using default wallet key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 + +``` +USAGE + $ fluence local up [--no-input] [--noxes ] [--timeout ] [--priv-key ] + [--quiet-pull] [-d] [--build] [--flags <--flag arg>] [-r] [--no-wait] [--no-set-up] + +FLAGS + -d, --detach Detached mode: Run containers in the background + -r, --no-reset Don't reset docker-compose.yaml to default, don't remove volumes and previous local + deployments + --build Build images before starting containers + --flags=<--flag arg> Space separated flags to pass to `docker compose` + --no-input Don't interactively ask for any input from the user + --no-set-up Don't set up provider, offer, commitments and deposit collateral, so there will be no + active offer on the network after command is finished + --no-wait Don't wait for services to be running|healthy + --noxes= Number of Compute Peers to generate when a new provider.yaml is created + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is unsecure. On + local env 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used by + default when CLI is used in non-interactive mode + --quiet-pull Pull without printing progress information + --timeout= [default: 120] Timeout in seconds for attempting to register local network on local + peers + +DESCRIPTION + Run docker-compose.yaml using docker compose and set up provider using all the offers from the 'offers' section in + provider.yaml config using default wallet key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 + +EXAMPLES + $ fluence local up +``` + +_See code: [src/commands/local/up.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/local/up.ts)_ + +## `fluence module add [PATH | URL]` + +Add module to service.yaml + +``` +USAGE + $ fluence module add [PATH | URL] [--no-input] [--name ] [--service ] + +ARGUMENTS + PATH | URL Path to a module or url to .tar.gz archive + +FLAGS + --name= Override module name + --no-input Don't interactively ask for any input from the user + --service= Service name from fluence.yaml or path to the service config or directory that contains + service.yaml + +DESCRIPTION + Add module to service.yaml + +EXAMPLES + $ fluence module add +``` + +_See code: [src/commands/module/add.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/module/add.ts)_ + +## `fluence module build [PATH]` + +Build module + +``` +USAGE + $ fluence module build [PATH] [--no-input] [--marine-build-args <--flag arg>] + +ARGUMENTS + PATH Path to a module + +FLAGS + --marine-build-args=<--flag arg> Space separated `cargo build` flags and args to pass to marine build. Overrides + 'marineBuildArgs' property in fluence.yaml. Default: --release + --no-input Don't interactively ask for any input from the user + +DESCRIPTION + Build module + +EXAMPLES + $ fluence module build +``` + +_See code: [src/commands/module/build.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/module/build.ts)_ + +## `fluence module new [NAME]` + +Create new marine module template + +``` +USAGE + $ fluence module new [NAME] [--no-input] [--path ] [--service ] + +ARGUMENTS + NAME Module name + +FLAGS + --no-input Don't interactively ask for any input from the user + --path= Path to module dir (default: src/modules) + --service= Name or relative path to the service to add the created module to + +DESCRIPTION + Create new marine module template + +EXAMPLES + $ fluence module new +``` + +_See code: [src/commands/module/new.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/module/new.ts)_ + +## `fluence module pack [PATH]` + +Pack module into tar.gz archive + +``` +USAGE + $ fluence module pack [PATH] [--no-input] [--marine-build-args <--flag arg>] [-d ] [-b ] + +ARGUMENTS + PATH Path to a module + +FLAGS + -b, --binding-crate= Path to a directory with rust binding crate + -d, --destination= Path to a directory where you want archive to be saved. Default: current + directory + --marine-build-args=<--flag arg> Space separated `cargo build` flags and args to pass to marine build. Overrides + 'marineBuildArgs' property in fluence.yaml. Default: --release + --no-input Don't interactively ask for any input from the user + +DESCRIPTION + Pack module into tar.gz archive + +EXAMPLES + $ fluence module pack +``` + +_See code: [src/commands/module/pack.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/module/pack.ts)_ + +## `fluence module remove [NAME | PATH | URL]` + +Remove module from service.yaml + +``` +USAGE + $ fluence module remove [NAME | PATH | URL] [--no-input] [--service ] + +ARGUMENTS + NAME | PATH | URL Module name from service.yaml, path to a module or url to .tar.gz archive + +FLAGS + --no-input Don't interactively ask for any input from the user + --service= Service name from fluence.yaml or path to the service directory + +DESCRIPTION + Remove module from service.yaml + +EXAMPLES + $ fluence module remove +``` + +_See code: [src/commands/module/remove.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/module/remove.ts)_ + +## `fluence provider cc-activate` + +Add FLT collateral to capacity commitment to activate it + +``` +USAGE + $ fluence provider cc-activate [--no-input] [--env ] [--priv-key ] + [--nox-names | --cc-ids ] [--offers ] + +FLAGS + --cc-ids= Comma separated capacity commitment IDs + --env= Fluence Environment to use when running the command + --no-input Don't interactively ask for any input from the user + --nox-names= Comma-separated names of noxes from provider.yaml. To use all of your + noxes: --nox-names all + --offers= Comma-separated list of offer names. To use all of your offers: --offers + all + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + +DESCRIPTION + Add FLT collateral to capacity commitment to activate it + +ALIASES + $ fluence provider ca +``` + +_See code: [src/commands/provider/cc-activate.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/provider/cc-activate.ts)_ + +## `fluence provider cc-create` + +Create Capacity commitment + +``` +USAGE + $ fluence provider cc-create [--no-input] [--env ] [--priv-key ] + [--nox-names ] [--offers ] + +FLAGS + --env= Fluence Environment to use when running the command + --no-input Don't interactively ask for any input from the user + --nox-names= Comma-separated names of noxes from provider.yaml. To use all of your + noxes: --nox-names all + --offers= Comma-separated list of offer names. To use all of your offers: --offers + all + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + +DESCRIPTION + Create Capacity commitment + +ALIASES + $ fluence provider cc +``` + +_See code: [src/commands/provider/cc-create.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/provider/cc-create.ts)_ + +## `fluence provider cc-finish` + +Move resources from deals, withdraw FLT collateral from capacity commitments, remove compute units from capacity commitments and finish capacity commitments + +``` +USAGE + $ fluence provider cc-finish [--no-input] [--nox-names | --cc-ids ] [--offers ] + [--env ] [--priv-key ] + +FLAGS + --cc-ids= Comma separated capacity commitment IDs + --env= Fluence Environment to use when running the command + --no-input Don't interactively ask for any input from the user + --nox-names= Comma-separated names of noxes from provider.yaml. To use all of your + noxes: --nox-names all + --offers= Comma-separated list of offer names. To use all of your offers: --offers + all + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + +DESCRIPTION + Move resources from deals, withdraw FLT collateral from capacity commitments, remove compute units from capacity + commitments and finish capacity commitments + +ALIASES + $ fluence provider ccf +``` + +_See code: [src/commands/provider/cc-finish.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/provider/cc-finish.ts)_ + +## `fluence provider cc-info` + +Get info about capacity commitments + +``` +USAGE + $ fluence provider cc-info [--no-input] [--env ] [--priv-key ] + [--nox-names | --cc-ids ] [--offers ] [--json] + +FLAGS + --cc-ids= Comma separated capacity commitment IDs + --env= Fluence Environment to use when running the command + --json Output JSON + --no-input Don't interactively ask for any input from the user + --nox-names= Comma-separated names of noxes from provider.yaml. To use all of your + noxes: --nox-names all + --offers= Comma-separated list of offer names. To use all of your offers: --offers + all + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + +DESCRIPTION + Get info about capacity commitments + +ALIASES + $ fluence provider ci +``` + +_See code: [src/commands/provider/cc-info.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/provider/cc-info.ts)_ + +## `fluence provider cc-remove` + +Remove Capacity commitment. You can remove it only BEFORE you activated it by depositing collateral + +``` +USAGE + $ fluence provider cc-remove [--no-input] [--env ] [--priv-key ] + [--nox-names | --cc-ids ] [--offers ] + +FLAGS + --cc-ids= Comma separated capacity commitment IDs + --env= Fluence Environment to use when running the command + --no-input Don't interactively ask for any input from the user + --nox-names= Comma-separated names of noxes from provider.yaml. To use all of your + noxes: --nox-names all + --offers= Comma-separated list of offer names. To use all of your offers: --offers + all + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + +DESCRIPTION + Remove Capacity commitment. You can remove it only BEFORE you activated it by depositing collateral + +ALIASES + $ fluence provider cr +``` + +_See code: [src/commands/provider/cc-remove.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/provider/cc-remove.ts)_ + +## `fluence provider cc-rewards-withdraw` + +Withdraw FLT rewards from capacity commitments + +``` +USAGE + $ fluence provider cc-rewards-withdraw [--no-input] [--nox-names | --cc-ids ] [--offers ] + [--env ] [--priv-key ] + +FLAGS + --cc-ids= Comma separated capacity commitment IDs + --env= Fluence Environment to use when running the command + --no-input Don't interactively ask for any input from the user + --nox-names= Comma-separated names of noxes from provider.yaml. To use all of your + noxes: --nox-names all + --offers= Comma-separated list of offer names. To use all of your offers: --offers + all + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + +DESCRIPTION + Withdraw FLT rewards from capacity commitments + +ALIASES + $ fluence provider crw +``` + +_See code: [src/commands/provider/cc-rewards-withdraw.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/provider/cc-rewards-withdraw.ts)_ + +## `fluence provider deal-exit` + +Exit from deal + +``` +USAGE + $ fluence provider deal-exit [--no-input] [--env ] [--priv-key ] + [--deal-ids ] [--all] + +FLAGS + --all To use all deal ids that indexer is aware of for your provider address + --deal-ids= Comma-separated deal ids + --env= Fluence Environment to use when running the command + --no-input Don't interactively ask for any input from the user + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + +DESCRIPTION + Exit from deal + +ALIASES + $ fluence provider de +``` + +_See code: [src/commands/provider/deal-exit.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/provider/deal-exit.ts)_ + +## `fluence provider deal-list` + +List all deals + +``` +USAGE + $ fluence provider deal-list [--no-input] [--env ] [--priv-key ] + +FLAGS + --env= Fluence Environment to use when running the command + --no-input Don't interactively ask for any input from the user + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + +DESCRIPTION + List all deals + +ALIASES + $ fluence provider dl +``` + +_See code: [src/commands/provider/deal-list.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/provider/deal-list.ts)_ + +## `fluence provider deal-rewards-info [DEAL-ADDRESS] [ON-CHAIN-WORKER-ID]` + +Deal rewards info + +``` +USAGE + $ fluence provider deal-rewards-info [DEAL-ADDRESS] [ON-CHAIN-WORKER-ID] [--no-input] [--env ] [--priv-key ] + +ARGUMENTS + DEAL-ADDRESS Deal address + ON-CHAIN-WORKER-ID On-chain worker id + +FLAGS + --env= Fluence Environment to use when running the command + --no-input Don't interactively ask for any input from the user + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + +DESCRIPTION + Deal rewards info + +ALIASES + $ fluence provider dri +``` + +_See code: [src/commands/provider/deal-rewards-info.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/provider/deal-rewards-info.ts)_ + +## `fluence provider deal-rewards-withdraw` + +Withdraw USDC rewards from deals + +``` +USAGE + $ fluence provider deal-rewards-withdraw [--no-input] [--env ] [--priv-key ] + [--deal-ids ] + +FLAGS + --deal-ids= Comma-separated deal ids + --env= Fluence Environment to use when running the command + --no-input Don't interactively ask for any input from the user + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + +DESCRIPTION + Withdraw USDC rewards from deals + +ALIASES + $ fluence provider drw +``` + +_See code: [src/commands/provider/deal-rewards-withdraw.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/provider/deal-rewards-withdraw.ts)_ + +## `fluence provider gen` + +Generate Config.toml files according to provider.yaml and secrets according to provider-secrets.yaml + +``` +USAGE + $ fluence provider gen [--no-input] [--env ] [--priv-key ] + [--reset-nox-secrets] [--no-withdraw] + +FLAGS + --env= Fluence Environment to use when running the command + --no-input Don't interactively ask for any input from the user + --no-withdraw Is used only when --reset-nox-secrets flag is present. Will not withdraw + tokens from noxes (if you don't need it or it fails for some reason) + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + --reset-nox-secrets Withdraw remaining tokens from your noxes, backup nox secrets from + .fluence/provider-secrets.yaml and .fluence/secrets (if they exist) to + .fluence/backups and generate new ones + +DESCRIPTION + Generate Config.toml files according to provider.yaml and secrets according to provider-secrets.yaml + +EXAMPLES + $ fluence provider gen +``` + +_See code: [src/commands/provider/gen.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/provider/gen.ts)_ + +## `fluence provider info` + +Print nox signing wallets and peer ids + +``` +USAGE + $ fluence provider info [--no-input] [--env ] [--priv-key ] + [--nox-names ] [--json] [--address
] + +FLAGS + --address=
Provider address + --env= Fluence Environment to use when running the command + --json Output JSON + --no-input Don't interactively ask for any input from the user + --nox-names= Comma-separated names of noxes from provider.yaml. To use all of your + noxes: --nox-names all + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + +DESCRIPTION + Print nox signing wallets and peer ids + +ALIASES + $ fluence provider i +``` + +_See code: [src/commands/provider/info.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/provider/info.ts)_ + +## `fluence provider init` + +Init provider config. Creates a provider.yaml file + +``` +USAGE + $ fluence provider init [--no-input] [--noxes ] [--env ] [--priv-key + ] [--no-vm] + +FLAGS + --env= Fluence Environment to use when running the command + --no-input Don't interactively ask for any input from the user + --no-vm Generate provider.yaml without vm configuration + --noxes= Number of Compute Peers to generate when a new provider.yaml is created + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + +DESCRIPTION + Init provider config. Creates a provider.yaml file +``` + +_See code: [src/commands/provider/init.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/provider/init.ts)_ + +## `fluence provider offer-create` + +Create offers. You have to be registered as a provider to do that + +``` +USAGE + $ fluence provider offer-create [--no-input] [--env ] [--priv-key ] + [--offers ] + +FLAGS + --env= Fluence Environment to use when running the command + --no-input Don't interactively ask for any input from the user + --offers= Comma-separated list of offer names. To use all of your offers: --offers + all + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + +DESCRIPTION + Create offers. You have to be registered as a provider to do that + +ALIASES + $ fluence provider oc +``` + +_See code: [src/commands/provider/offer-create.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/provider/offer-create.ts)_ + +## `fluence provider offer-info` + +Get info about offers + +``` +USAGE + $ fluence provider offer-info [--no-input] [--offers | --offer-ids ] [--env ] [--priv-key ] + +FLAGS + --env= Fluence Environment to use when running the command + --no-input Don't interactively ask for any input from the user + --offer-ids= Comma-separated list of offer ids. Can't be used together with --offers + flag + --offers= Comma-separated list of offer names. To use all of your offers: --offers + all + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + +DESCRIPTION + Get info about offers + +ALIASES + $ fluence provider oi +``` + +_See code: [src/commands/provider/offer-info.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/provider/offer-info.ts)_ + +## `fluence provider offer-remove` + +Remove offers + +``` +USAGE + $ fluence provider offer-remove [--no-input] [--offers | --offer-ids ] [--env ] [--priv-key ] + +FLAGS + --env= Fluence Environment to use when running the command + --no-input Don't interactively ask for any input from the user + --offer-ids= Comma-separated list of offer ids. Can't be used together with --offers + flag + --offers= Comma-separated list of offer names. To use all of your offers: --offers + all + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + +DESCRIPTION + Remove offers + +ALIASES + $ fluence provider or +``` + +_See code: [src/commands/provider/offer-remove.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/provider/offer-remove.ts)_ + +## `fluence provider offer-update` + +Update offers + +``` +USAGE + $ fluence provider offer-update [--no-input] [--offers ] [--env ] + [--priv-key ] + +FLAGS + --env= Fluence Environment to use when running the command + --no-input Don't interactively ask for any input from the user + --offers= Comma-separated list of offer names. To use all of your offers: --offers + all + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + +DESCRIPTION + Update offers + +ALIASES + $ fluence provider ou +``` + +_See code: [src/commands/provider/offer-update.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/provider/offer-update.ts)_ + +## `fluence provider register` + +Register as a provider + +``` +USAGE + $ fluence provider register [--no-input] [--env ] [--priv-key ] + +FLAGS + --env= Fluence Environment to use when running the command + --no-input Don't interactively ask for any input from the user + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + +DESCRIPTION + Register as a provider + +ALIASES + $ fluence provider r +``` + +_See code: [src/commands/provider/register.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/provider/register.ts)_ + +## `fluence provider tokens-distribute` + +Distribute FLT tokens to noxes + +``` +USAGE + $ fluence provider tokens-distribute [--no-input] [--env ] [--priv-key ] + [--nox-names ] [--offers ] [--amount ] + +FLAGS + --amount= Amount of FLT tokens to distribute to noxes + --env= Fluence Environment to use when running the command + --no-input Don't interactively ask for any input from the user + --nox-names= Comma-separated names of noxes from provider.yaml. To use all of your + noxes: --nox-names all + --offers= Comma-separated list of offer names. To use all of your offers: --offers + all + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + +DESCRIPTION + Distribute FLT tokens to noxes + +ALIASES + $ fluence provider td +``` + +_See code: [src/commands/provider/tokens-distribute.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/provider/tokens-distribute.ts)_ + +## `fluence provider tokens-withdraw` + +Withdraw FLT tokens from noxes + +``` +USAGE + $ fluence provider tokens-withdraw [--no-input] [--env ] [--priv-key ] + [--nox-names ] [--amount ] + +FLAGS + --amount= Amount of FLT tokens to withdraw from noxes. Use --amount max to withdraw + maximum possible amount + --env= Fluence Environment to use when running the command + --no-input Don't interactively ask for any input from the user + --nox-names= Comma-separated names of noxes from provider.yaml. To use all of your + noxes: --nox-names all + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + +DESCRIPTION + Withdraw FLT tokens from noxes + +ALIASES + $ fluence provider tw +``` + +_See code: [src/commands/provider/tokens-withdraw.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/provider/tokens-withdraw.ts)_ + +## `fluence provider update` + +Update provider info + +``` +USAGE + $ fluence provider update [--no-input] [--env ] [--priv-key ] + +FLAGS + --env= Fluence Environment to use when running the command + --no-input Don't interactively ask for any input from the user + --priv-key= !WARNING! for debug purposes only. Passing private keys through flags is + unsecure. On local env + 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 is used + by default when CLI is used in non-interactive mode + +DESCRIPTION + Update provider info + +ALIASES + $ fluence provider u +``` + +_See code: [src/commands/provider/update.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/provider/update.ts)_ + +## `fluence run` + +Run the first aqua function CLI is able to find and compile among all aqua files specified in 'compileAqua' property of fluence.yaml file. If --input flag is used - then content of 'compileAqua' property in fluence.yaml will be ignored + +``` +USAGE + $ fluence run [--no-input] [--data ] [--data-path ] [--quiet] [-f ] + [--print-air | -b] [--off-aqua-logs] [-k ] [--relay ] [--ttl ] [--dial-timeout + ] [--particle-id] [--env ] [--import ...] [-i ] + [--const ...] [--log-level-compiler ] [--no-relay] [--no-xor] [--tracing] [--no-empty-response] + +FLAGS + -b, --print-beautified-air Prints beautified AIR code instead of function execution + -f, --func= Function call. Example: funcName("stringArg") + -i, --input= Path to an aqua file or a directory that contains your aqua files + -k, --sk= Name of the secret key for js-client inside CLI to use. If not + specified, will use the default key for the project. If there is no + fluence project or there is no default key, will use user's default key + --const=... Constants to be passed to the compiler + --data= JSON in { [argumentName]: argumentValue } format. You can call a + function using these argument names like this: -f + 'myFunc(argumentName)'. Arguments in this flag override arguments in + the --data-path flag + --data-path= Path to a JSON file in { [argumentName]: argumentValue } format. You + can call a function using these argument names like this: -f + 'myFunc(argumentName)'. Arguments in this flag can be overridden using + --data flag + --dial-timeout= [default: 15000] Timeout for Fluence js-client to connect to relay peer + --env= Fluence Environment to use when running the command + --import=... Path to a directory to import aqua files from. May be used several + times + --log-level-compiler= Set log level for the compiler. Must be one of: all, trace, debug, + info, warn, error, off + --no-empty-response Do not generate response call if there are no returned values + --no-input Don't interactively ask for any input from the user + --no-relay Do not generate a pass through the relay node + --no-xor Do not generate a wrapper that catches and displays errors + --off-aqua-logs Turns off logs from Console.print in aqua and from IPFS service + --particle-id Print particle ids when running Fluence js-client + --print-air Prints generated AIR code instead of function execution + --quiet Print only execution result. Overrides all --log-level-* flags + --relay= Relay for Fluence js-client to connect to + --tracing Compile aqua in tracing mode (for debugging purposes) + --ttl= [default: 15000] Particle Time To Live since 'now'. After that, + particle is expired and not processed. + +DESCRIPTION + Run the first aqua function CLI is able to find and compile among all aqua files specified in 'compileAqua' property + of fluence.yaml file. If --input flag is used - then content of 'compileAqua' property in fluence.yaml will be ignored + +EXAMPLES + $ fluence run -f 'funcName("stringArg")' +``` + +_See code: [src/commands/run.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/run.ts)_ + +## `fluence service add [PATH | URL]` + +Add service to fluence.yaml + +``` +USAGE + $ fluence service add [PATH | URL] [--no-input] [--name ] [--marine-build-args <--flag arg>] + +ARGUMENTS + PATH | URL Path to a service or url to .tar.gz archive + +FLAGS + --marine-build-args=<--flag arg> Space separated `cargo build` flags and args to pass to marine build. Overrides + 'marineBuildArgs' property in fluence.yaml. Default: --release + --name= Override service name (must start with a lowercase letter and contain only letters, + numbers, and underscores) + --no-input Don't interactively ask for any input from the user + +DESCRIPTION + Add service to fluence.yaml + +EXAMPLES + $ fluence service add +``` + +_See code: [src/commands/service/add.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/service/add.ts)_ + +## `fluence service new [NAME]` + +Create new marine service template + +``` +USAGE + $ fluence service new [NAME] [--no-input] [--path ] + +ARGUMENTS + NAME Unique service name (must start with a lowercase letter and contain only letters, numbers, and underscores) + +FLAGS + --no-input Don't interactively ask for any input from the user + --path= Path to services dir (default: src/services) + +DESCRIPTION + Create new marine service template + +EXAMPLES + $ fluence service new +``` + +_See code: [src/commands/service/new.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/service/new.ts)_ + +## `fluence service remove [NAME | PATH | URL]` + +Remove service from fluence.yaml services property and from all of the workers + +``` +USAGE + $ fluence service remove [NAME | PATH | URL] [--no-input] + +ARGUMENTS + NAME | PATH | URL Service name from fluence.yaml, path to a service or url to .tar.gz archive + +FLAGS + --no-input Don't interactively ask for any input from the user + +DESCRIPTION + Remove service from fluence.yaml services property and from all of the workers + +EXAMPLES + $ fluence service remove +``` + +_See code: [src/commands/service/remove.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/service/remove.ts)_ + +## `fluence service repl [NAME | PATH | URL]` + +Open service inside repl (downloads and builds modules if necessary) + +``` +USAGE + $ fluence service repl [NAME | PATH | URL] [--no-input] [--marine-build-args <--flag arg>] + +ARGUMENTS + NAME | PATH | URL Service name from fluence.yaml, path to a service or url to .tar.gz archive + +FLAGS + --marine-build-args=<--flag arg> Space separated `cargo build` flags and args to pass to marine build. Overrides + 'marineBuildArgs' property in fluence.yaml. Default: --release + --no-input Don't interactively ask for any input from the user + +DESCRIPTION + Open service inside repl (downloads and builds modules if necessary) + +EXAMPLES + $ fluence service repl +``` + +_See code: [src/commands/service/repl.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/service/repl.ts)_ + +## `fluence spell build [SPELL-NAMES]` + +Check spells aqua is able to compile without any errors + +``` +USAGE + $ fluence spell build [SPELL-NAMES] [--no-input] [--import ...] + +ARGUMENTS + SPELL-NAMES Comma separated names of spells to build. Example: "spell1,spell2" (by default all spells from 'spells' + property in fluence.yaml will be built) + +FLAGS + --import=... Path to a directory to import aqua files from. May be used several times + --no-input Don't interactively ask for any input from the user + +DESCRIPTION + Check spells aqua is able to compile without any errors + +EXAMPLES + $ fluence spell build +``` + +_See code: [src/commands/spell/build.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/spell/build.ts)_ + +## `fluence spell new [NAME]` + +Create a new spell template + +``` +USAGE + $ fluence spell new [NAME] [--no-input] [--path ] + +ARGUMENTS + NAME Spell name + +FLAGS + --no-input Don't interactively ask for any input from the user + --path= Path to spells dir (default: src/spells) + +DESCRIPTION + Create a new spell template + +EXAMPLES + $ fluence spell new +``` + +_See code: [src/commands/spell/new.ts](https://github.com/fluencelabs/cli/blob/fluence-cli-v0.22.0/src/commands/spell/new.ts)_ + +## `fluence update [CHANNEL]` + +update the fluence CLI + +``` +USAGE + $ fluence update [CHANNEL] [-a] [--force] [-i | -v ] + +FLAGS + -a, --available See available versions. + -i, --interactive Interactively select version to install. This is ignored if a channel is provided. + -v, --version= Install a specific version. + --force Force a re-download of the requested version. + +DESCRIPTION + update the fluence CLI + +EXAMPLES + Update to the stable channel: + + $ fluence update stable + + Update to a specific version: + + $ fluence update --version 1.0.0 + + Interactively select version: + + $ fluence update --interactive + + See available versions: + + $ fluence update --available +``` + +_See code: [@oclif/plugin-update](https://github.com/oclif/plugin-update/blob/v4.2.11/src/commands/update.ts)_ + diff --git a/docs/configs/README.md b/packages/cli/package/docs/configs/README.md similarity index 100% rename from docs/configs/README.md rename to packages/cli/package/docs/configs/README.md diff --git a/docs/configs/config.md b/packages/cli/package/docs/configs/config.md similarity index 100% rename from docs/configs/config.md rename to packages/cli/package/docs/configs/config.md diff --git a/docs/configs/docker-compose.md b/packages/cli/package/docs/configs/docker-compose.md similarity index 100% rename from docs/configs/docker-compose.md rename to packages/cli/package/docs/configs/docker-compose.md diff --git a/packages/cli/package/docs/configs/env.md b/packages/cli/package/docs/configs/env.md new file mode 100644 index 000000000..2335d30e7 --- /dev/null +++ b/packages/cli/package/docs/configs/env.md @@ -0,0 +1,29 @@ +# env.yaml + +Defines user project preferences + +## Properties + +| Property | Type | Required | Description | +|-----------------|-----------------------|----------|------------------------------------------------------------------------------------------------| +| `version` | integer | **Yes** | | +| `blockScoutUrl` | string | No | BlockScout URL to use | +| `chainId` | number | No | Chain ID to use | +| `deployment` | [object](#deployment) | No | Deployed contract address overrides | +| `fluenceEnv` | string | No | Fluence environment to connect to Possible values are: `testnet`, `mainnet`, `stage`, `local`. | +| `relays` | string[] | No | List of custom relay multiaddresses to use when connecting to Fluence network | +| `rpcUrl` | string | No | RPC URL to use | +| `subgraphUrl` | string | No | Subgraph URL to use | + +## deployment + +Deployed contract address overrides + +### Properties + +| Property | Type | Required | Description | +|--------------|--------|----------|-------------| +| `diamond` | string | No | | +| `multicall3` | string | No | | +| `usdc` | string | No | | + diff --git a/docs/configs/fluence.md b/packages/cli/package/docs/configs/fluence.md similarity index 95% rename from docs/configs/fluence.md rename to packages/cli/package/docs/configs/fluence.md index 07b104c3a..d9af60f7b 100644 --- a/docs/configs/fluence.md +++ b/packages/cli/package/docs/configs/fluence.md @@ -76,10 +76,10 @@ Custom Fluence environment to use when connecting to Fluence network ### Properties -| Property | Type | Required | Description | -|----------------|----------|----------|-------------------------------------------------------------------------------------------------------------------------------------------------| -| `contractsEnv` | string | **Yes** | Contracts environment to use for this fluence network to sign contracts on the blockchain Possible values are: `dar`, `kras`, `stage`, `local`. | -| `relays` | string[] | **Yes** | List of custom relay multiaddresses to use when connecting to Fluence network | +| Property | Type | Required | Description | +|----------------|----------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------| +| `contractsEnv` | string | **Yes** | Contracts environment to use for this fluence network to sign contracts on the blockchain Possible values are: `testnet`, `mainnet`, `stage`, `local`. | +| `relays` | string[] | **Yes** | List of custom relay multiaddresses to use when connecting to Fluence network | ## deployments @@ -97,20 +97,21 @@ Deployment config #### Properties -| Property | Type | Required | Description | -|-------------------------|----------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `blacklist` | string[] | No | Blacklist of providers to deploy to. Can't be used together with whitelist | -| `computeUnits` | integer | No | Number of compute units you require. 1 compute unit = 2GB. Currently the only allowed value is 1. This will change in the future. Default: 1 | -| `effectors` | string[] | No | Effector CIDs to be used in the deal. Must be a valid CID | -| `initialBalance` | string | No | Initial balance after deploy in USDC. Default: targetWorkers * pricePerWorkerEpoch * minDealDepositedEpochs. For local environment: enough for deal to be active for 1 day | -| `maxWorkersPerProvider` | integer | No | Max workers per provider. Matches target workers by default | -| `minWorkers` | integer | No | Required workers to activate the deal. Matches target workers by default | -| `pricePerWorkerEpoch` | string | No | Price per worker epoch in USDC | -| `protocolVersion` | integer | No | Protocol version. Default: 1 | -| `services` | string[] | No | An array of service names to include in this worker. Service names must be listed in fluence.yaml | -| `spells` | string[] | No | An array of spell names to include in this worker. Spell names must be listed in fluence.yaml | -| `targetWorkers` | integer | No | Max workers in the deal | -| `whitelist` | string[] | No | Whitelist of providers to deploy to. Can't be used together with blacklist | +| Property | Type | Required | Description | +|-------------------------|----------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `blacklist` | string[] | No | Blacklist of providers to deploy to. Can't be used together with whitelist | +| `computeUnits` | integer | No | DEPRECATED. USE cuCountPerWorker INSTEAD. Number of compute units you require. 1 compute unit = 2GB. Currently the only allowed value is 1. This will change in the future. Default: 1 | +| `cuCountPerWorker` | integer | No | Number of compute units per worker. Default: 1 | +| `effectors` | string[] | No | Effector CIDs to be used in the deal. Must be a valid CID | +| `initialBalance` | string | No | Initial balance after deploy in USDC. Default: targetWorkers * pricePerCuPerEpoch * minDealDepositedEpochs. For local environment: enough for deal to be active for 1 day | +| `maxWorkersPerProvider` | integer | No | Max workers per provider. Matches target workers by default | +| `minWorkers` | integer | No | Required workers to activate the deal. Matches target workers by default | +| `pricePerCuPerEpoch` | string | No | Price per compute unit per epoch in USDC | +| `protocolVersion` | integer | No | Protocol version. Default: 1 | +| `services` | string[] | No | An array of service names to include in this worker. Service names must be listed in fluence.yaml | +| `spells` | string[] | No | An array of spell names to include in this worker. Spell names must be listed in fluence.yaml | +| `targetWorkers` | integer | No | Max workers in the deal | +| `whitelist` | string[] | No | Whitelist of providers to deploy to. Can't be used together with blacklist | ## hosts diff --git a/docs/configs/module.md b/packages/cli/package/docs/configs/module.md similarity index 100% rename from docs/configs/module.md rename to packages/cli/package/docs/configs/module.md diff --git a/docs/configs/provider-artifacts.md b/packages/cli/package/docs/configs/provider-artifacts.md similarity index 86% rename from docs/configs/provider-artifacts.md rename to packages/cli/package/docs/configs/provider-artifacts.md index 8f7aa3d4c..9e0caf48f 100644 --- a/docs/configs/provider-artifacts.md +++ b/packages/cli/package/docs/configs/provider-artifacts.md @@ -15,13 +15,13 @@ Created offers ### Properties -| Property | Type | Required | Description | -|----------|-------------------|----------|----------------| -| `custom` | [object](#custom) | No | Created offers | -| `dar` | [object](#dar) | No | Created offers | -| `kras` | [object](#kras) | No | Created offers | -| `local` | [object](#local) | No | Created offers | -| `stage` | [object](#stage) | No | Created offers | +| Property | Type | Required | Description | +|-----------|--------------------|----------|----------------| +| `custom` | [object](#custom) | No | Created offers | +| `local` | [object](#local) | No | Created offers | +| `mainnet` | [object](#mainnet) | No | Created offers | +| `stage` | [object](#stage) | No | Created offers | +| `testnet` | [object](#testnet) | No | Created offers | ### custom @@ -42,7 +42,7 @@ Created offers | `id` | string | **Yes** | Offer id | | `providerAddress` | string | **Yes** | Provider address | -### dar +### local Created offers @@ -61,7 +61,7 @@ Created offers | `id` | string | **Yes** | Offer id | | `providerAddress` | string | **Yes** | Provider address | -### kras +### mainnet Created offers @@ -80,7 +80,7 @@ Created offers | `id` | string | **Yes** | Offer id | | `providerAddress` | string | **Yes** | Provider address | -### local +### stage Created offers @@ -99,7 +99,7 @@ Created offers | `id` | string | **Yes** | Offer id | | `providerAddress` | string | **Yes** | Provider address | -### stage +### testnet Created offers diff --git a/docs/configs/provider-secrets.md b/packages/cli/package/docs/configs/provider-secrets.md similarity index 100% rename from docs/configs/provider-secrets.md rename to packages/cli/package/docs/configs/provider-secrets.md diff --git a/docs/configs/provider.md b/packages/cli/package/docs/configs/provider.md similarity index 73% rename from docs/configs/provider.md rename to packages/cli/package/docs/configs/provider.md index c949e1d04..5e450a093 100644 --- a/docs/configs/provider.md +++ b/packages/cli/package/docs/configs/provider.md @@ -30,11 +30,11 @@ Defines a capacity commitment #### Properties -| Property | Type | Required | Description | -|------------------------|--------|----------|-------------------------------------------------------------------------------| -| `duration` | string | **Yes** | Duration of the commitment in human-readable format. Example: 1 months 1 days | -| `rewardDelegationRate` | number | **Yes** | Reward delegation rate in percent | -| `delegator` | string | No | Delegator address | +| Property | Type | Required | Description | +|----------------|--------|----------|-------------------------------------------------------------------------------| +| `duration` | string | **Yes** | Duration of the commitment in human-readable format. Example: 1 months 1 days | +| `stakerReward` | number | **Yes** | Staker reward in percent | +| `delegator` | string | No | Delegator address | ## ccp @@ -58,7 +58,7 @@ Logs configuration | Property | Type | Required | Description | |------------------|---------|----------|---------------------------------| -| `logLevel` | string | No | Log level. Default: info | +| `logLevel` | string | No | Log level. Default: debug | | `reportHashrate` | boolean | No | Report hashrate. Default: false | ### prometheusEndpoint @@ -138,7 +138,7 @@ Logs configuration | Property | Type | Required | Description | |------------------|---------|----------|---------------------------------| -| `logLevel` | string | No | Log level. Default: info | +| `logLevel` | string | No | Log level. Default: debug | | `reportHashrate` | boolean | No | Report hashrate. Default: false | ##### prometheusEndpoint @@ -189,15 +189,16 @@ Configuration to pass to the nox compute peer. Config.toml files are generated f | `cpusRange` | string | No | Range of CPU cores to use. Default: 1-32 | | `effectors` | [object](#effectors) | No | Effectors to allow on the nox | | `externalMultiaddresses` | string[] | No | List of external multiaddresses | -| `httpPort` | integer | No | Both host and container HTTP port to use. Default: for each nox a unique port is assigned starting from 18080 | +| `httpPort` | integer | No | Both host and container HTTP port to use. Default: 918 (on local network ports will be generated by default) | | `ipfs` | [object](#ipfs) | No | IPFS config | | `listenIp` | string | No | IP to listen on | | `metrics` | [object](#metrics) | No | Metrics configuration | | `rawConfig` | string | No | Raw TOML config string to parse and merge with the rest of the config. Has the highest priority | | `systemCpuCount` | integer | No | Number of CPU cores to allocate for the Nox itself. Default: 1 | | `systemServices` | [object](#systemservices) | No | System services to run by default. aquaIpfs and decider are enabled by default | -| `tcpPort` | integer | No | Both host and container TCP port to use. Default: for each nox a unique port is assigned starting from 7771 | -| `websocketPort` | integer | No | Both host and container WebSocket port to use. Default: for each nox a unique port is assigned starting from 9991 | +| `tcpPort` | integer | No | Both host and container TCP port to use. Default: 977 (on local network ports will be generated by default) | +| `vm` | [object](#vm) | No | VM Configuration | +| `websocketPort` | integer | No | Both host and container WebSocket port to use. Default: 999 (on local network ports will be generated by default) | ##### ccp @@ -216,18 +217,19 @@ Chain config ###### Properties -| Property | Type | Required | Description | -|----------------------|---------|----------|-------------------------------------------------| -| `ccContract` | string | No | Capacity commitment contract address | -| `coreContract` | string | No | Core contract address | -| `dealSyncStartBlock` | string | No | Start block | -| `defaultBaseFee` | number | No | Default base fee | -| `defaultPriorityFee` | number | No | Default priority fee | -| `httpEndpoint` | string | No | HTTP endpoint of the chain | -| `marketContract` | string | No | Market contract address | -| `networkId` | integer | No | Network ID | -| `walletPrivateKey` | string | No | Nox wallet private key. Is generated by default | -| `wsEndpoint` | string | No | WebSocket endpoint of the chain | +| Property | Type | Required | Description | +|----------------------|---------|----------|---------------------------------------------------| +| `ccContract` | string | No | Capacity commitment contract address (deprecated) | +| `coreContract` | string | No | Core contract address (deprecated) | +| `dealSyncStartBlock` | string | No | Start block (deprecated) | +| `defaultBaseFee` | number | No | Default base fee | +| `defaultPriorityFee` | number | No | Default priority fee | +| `diamondContract` | string | No | Diamond contract address | +| `httpEndpoint` | string | No | HTTP endpoint of the chain | +| `marketContract` | string | No | Market contract address (deprecated) | +| `networkId` | integer | No | Network ID | +| `walletPrivateKey` | string | No | Nox wallet private key. Is generated by default | +| `wsEndpoint` | string | No | WebSocket endpoint of the chain | ##### effectors @@ -247,8 +249,8 @@ Effector configuration | Property | Type | Required | Description | |-------------------|----------------------------|----------|--------------------------| -| `allowedBinaries` | [object](#allowedbinaries) | **Yes** | Allowed binaries | | `wasmCID` | string | **Yes** | Wasm CID of the effector | +| `allowedBinaries` | [object](#allowedbinaries) | No | Allowed binaries | **allowedBinaries** @@ -315,15 +317,54 @@ Decider service configuration **Properties** -| Property | Type | Required | Description | -|-----------------------|---------|----------|----------------------------------| -| `deciderPeriodSec` | integer | No | Decider period in seconds | -| `matcherAddress` | string | No | Matcher address | -| `networkApiEndpoint` | string | No | Network API endpoint | -| `networkId` | integer | No | Network ID | -| `startBlock` | string | No | Start block | -| `walletKey` | string | No | Wallet key | -| `workerIpfsMultiaddr` | string | No | Multiaddress of worker IPFS node | +| Property | Type | Required | Description | +|-----------------------|---------|----------|-----------------------------------| +| `deciderPeriodSec` | integer | No | Decider period in seconds | +| `matcherAddress` | string | No | Matcher address (deprecated) | +| `networkApiEndpoint` | string | No | Network API endpoint (deprecated) | +| `networkId` | integer | No | Network ID (deprecated) | +| `startBlock` | string | No | Start block (deprecated) | +| `walletKey` | string | No | Wallet key (deprecated) | +| `workerIpfsMultiaddr` | string | No | Multiaddress of worker IPFS node | +| `workerPeriodSec` | integer | No | Worker period in seconds | + +##### vm + +VM Configuration + +###### Properties + +| Property | Type | Required | Description | +|--------------|--------------------|----------|--------------------------------------------| +| `network` | [object](#network) | **Yes** | VM Network Configuration | +| `allowGpu` | boolean | No | Whether to add info about GPUs to VM's XML | +| `libvirtUri` | string | No | QEMU Socket | + +###### network + +VM Network Configuration + +**Properties** + +| Property | Type | Required | Description | +|---------------|----------------------|----------|------------------------------------------------------------------| +| `publicIp` | string | **Yes** | Public IP address to assign the VM. Must be publicly accessible. | +| `bridgeName` | string | No | Name of the network bridge device | +| `hostSshPort` | integer | No | Host SSH port, default is 922 | +| `portRange` | [object](#portrange) | No | iptables-mapped port range from Host to VM | +| `vmIp` | string | No | Internal IP address to assign the VM | +| `vmSshPort` | integer | No | VM SSH port, default is 22 | + +**portRange** + +iptables-mapped port range from Host to VM + +**Properties** + +| Property | Type | Required | Description | +|----------|---------|----------|---------------------------------------------------------| +| `end` | integer | No | End of the iptables-mapped port range from Host to VM | +| `start` | integer | No | Start of the iptables-mapped port range from Host to VM | ## nox @@ -340,15 +381,16 @@ Configuration to pass to the nox compute peer. Config.toml files are generated f | `cpusRange` | string | No | Range of CPU cores to use. Default: 1-32 | | `effectors` | [object](#effectors) | No | Effectors to allow on the nox | | `externalMultiaddresses` | string[] | No | List of external multiaddresses | -| `httpPort` | integer | No | Both host and container HTTP port to use. Default: for each nox a unique port is assigned starting from 18080 | +| `httpPort` | integer | No | Both host and container HTTP port to use. Default: 918 (on local network ports will be generated by default) | | `ipfs` | [object](#ipfs) | No | IPFS config | | `listenIp` | string | No | IP to listen on | | `metrics` | [object](#metrics) | No | Metrics configuration | | `rawConfig` | string | No | Raw TOML config string to parse and merge with the rest of the config. Has the highest priority | | `systemCpuCount` | integer | No | Number of CPU cores to allocate for the Nox itself. Default: 1 | | `systemServices` | [object](#systemservices) | No | System services to run by default. aquaIpfs and decider are enabled by default | -| `tcpPort` | integer | No | Both host and container TCP port to use. Default: for each nox a unique port is assigned starting from 7771 | -| `websocketPort` | integer | No | Both host and container WebSocket port to use. Default: for each nox a unique port is assigned starting from 9991 | +| `tcpPort` | integer | No | Both host and container TCP port to use. Default: 977 (on local network ports will be generated by default) | +| `vm` | [object](#vm) | No | VM Configuration | +| `websocketPort` | integer | No | Both host and container WebSocket port to use. Default: 999 (on local network ports will be generated by default) | ### ccp @@ -367,18 +409,19 @@ Chain config #### Properties -| Property | Type | Required | Description | -|----------------------|---------|----------|-------------------------------------------------| -| `ccContract` | string | No | Capacity commitment contract address | -| `coreContract` | string | No | Core contract address | -| `dealSyncStartBlock` | string | No | Start block | -| `defaultBaseFee` | number | No | Default base fee | -| `defaultPriorityFee` | number | No | Default priority fee | -| `httpEndpoint` | string | No | HTTP endpoint of the chain | -| `marketContract` | string | No | Market contract address | -| `networkId` | integer | No | Network ID | -| `walletPrivateKey` | string | No | Nox wallet private key. Is generated by default | -| `wsEndpoint` | string | No | WebSocket endpoint of the chain | +| Property | Type | Required | Description | +|----------------------|---------|----------|---------------------------------------------------| +| `ccContract` | string | No | Capacity commitment contract address (deprecated) | +| `coreContract` | string | No | Core contract address (deprecated) | +| `dealSyncStartBlock` | string | No | Start block (deprecated) | +| `defaultBaseFee` | number | No | Default base fee | +| `defaultPriorityFee` | number | No | Default priority fee | +| `diamondContract` | string | No | Diamond contract address | +| `httpEndpoint` | string | No | HTTP endpoint of the chain | +| `marketContract` | string | No | Market contract address (deprecated) | +| `networkId` | integer | No | Network ID | +| `walletPrivateKey` | string | No | Nox wallet private key. Is generated by default | +| `wsEndpoint` | string | No | WebSocket endpoint of the chain | ### effectors @@ -398,8 +441,8 @@ Effector configuration | Property | Type | Required | Description | |-------------------|----------------------------|----------|--------------------------| -| `allowedBinaries` | [object](#allowedbinaries) | **Yes** | Allowed binaries | | `wasmCID` | string | **Yes** | Wasm CID of the effector | +| `allowedBinaries` | [object](#allowedbinaries) | No | Allowed binaries | ##### allowedBinaries @@ -466,15 +509,54 @@ Decider service configuration ##### Properties -| Property | Type | Required | Description | -|-----------------------|---------|----------|----------------------------------| -| `deciderPeriodSec` | integer | No | Decider period in seconds | -| `matcherAddress` | string | No | Matcher address | -| `networkApiEndpoint` | string | No | Network API endpoint | -| `networkId` | integer | No | Network ID | -| `startBlock` | string | No | Start block | -| `walletKey` | string | No | Wallet key | -| `workerIpfsMultiaddr` | string | No | Multiaddress of worker IPFS node | +| Property | Type | Required | Description | +|-----------------------|---------|----------|-----------------------------------| +| `deciderPeriodSec` | integer | No | Decider period in seconds | +| `matcherAddress` | string | No | Matcher address (deprecated) | +| `networkApiEndpoint` | string | No | Network API endpoint (deprecated) | +| `networkId` | integer | No | Network ID (deprecated) | +| `startBlock` | string | No | Start block (deprecated) | +| `walletKey` | string | No | Wallet key (deprecated) | +| `workerIpfsMultiaddr` | string | No | Multiaddress of worker IPFS node | +| `workerPeriodSec` | integer | No | Worker period in seconds | + +### vm + +VM Configuration + +#### Properties + +| Property | Type | Required | Description | +|--------------|--------------------|----------|--------------------------------------------| +| `network` | [object](#network) | **Yes** | VM Network Configuration | +| `allowGpu` | boolean | No | Whether to add info about GPUs to VM's XML | +| `libvirtUri` | string | No | QEMU Socket | + +#### network + +VM Network Configuration + +##### Properties + +| Property | Type | Required | Description | +|---------------|----------------------|----------|------------------------------------------------------------------| +| `publicIp` | string | **Yes** | Public IP address to assign the VM. Must be publicly accessible. | +| `bridgeName` | string | No | Name of the network bridge device | +| `hostSshPort` | integer | No | Host SSH port, default is 922 | +| `portRange` | [object](#portrange) | No | iptables-mapped port range from Host to VM | +| `vmIp` | string | No | Internal IP address to assign the VM | +| `vmSshPort` | integer | No | VM SSH port, default is 22 | + +##### portRange + +iptables-mapped port range from Host to VM + +###### Properties + +| Property | Type | Required | Description | +|----------|---------|----------|---------------------------------------------------------| +| `end` | integer | No | End of the iptables-mapped port range from Host to VM | +| `start` | integer | No | Start of the iptables-mapped port range from Host to VM | ## offers @@ -492,11 +574,11 @@ Defines a provider offer #### Properties -| Property | Type | Required | Description | -|--------------------------|----------|----------|------------------------------------------------------------------------------------| -| `computePeers` | string[] | **Yes** | Number of Compute Units for this Compute Peer | -| `minPricePerWorkerEpoch` | string | **Yes** | Minimum price per worker epoch in USDC | -| `effectors` | string[] | No | | -| `maxProtocolVersion` | integer | No | Max protocol version. Must be more then or equal to minProtocolVersion. Default: 1 | -| `minProtocolVersion` | integer | No | Min protocol version. Must be less then or equal to maxProtocolVersion. Default: 1 | +| Property | Type | Required | Description | +|-------------------------|----------|----------|------------------------------------------------------------------------------------| +| `computePeers` | string[] | **Yes** | Number of Compute Units for this Compute Peer | +| `minPricePerCuPerEpoch` | string | **Yes** | Minimum price per compute unit per epoch in USDC | +| `effectors` | string[] | No | | +| `maxProtocolVersion` | integer | No | Max protocol version. Must be more then or equal to minProtocolVersion. Default: 1 | +| `minProtocolVersion` | integer | No | Min protocol version. Must be less then or equal to maxProtocolVersion. Default: 1 | diff --git a/docs/configs/service.md b/packages/cli/package/docs/configs/service.md similarity index 100% rename from docs/configs/service.md rename to packages/cli/package/docs/configs/service.md diff --git a/docs/configs/spell.md b/packages/cli/package/docs/configs/spell.md similarity index 100% rename from docs/configs/spell.md rename to packages/cli/package/docs/configs/spell.md diff --git a/docs/configs/workers.md b/packages/cli/package/docs/configs/workers.md similarity index 95% rename from docs/configs/workers.md rename to packages/cli/package/docs/configs/workers.md index 75d642a2e..990d5894a 100644 --- a/docs/configs/workers.md +++ b/packages/cli/package/docs/configs/workers.md @@ -16,13 +16,13 @@ Info about deals created when deploying workers that is stored by environment th ### Properties -| Property | Type | Required | Description | -|----------|-------------------|----------|------------------------| -| `custom` | [object](#custom) | No | A map of created deals | -| `dar` | [object](#dar) | No | A map of created deals | -| `kras` | [object](#kras) | No | A map of created deals | -| `local` | [object](#local) | No | A map of created deals | -| `stage` | [object](#stage) | No | A map of created deals | +| Property | Type | Required | Description | +|-----------|--------------------|----------|------------------------| +| `custom` | [object](#custom) | No | A map of created deals | +| `local` | [object](#local) | No | A map of created deals | +| `mainnet` | [object](#mainnet) | No | A map of created deals | +| `stage` | [object](#stage) | No | A map of created deals | +| `testnet` | [object](#testnet) | No | A map of created deals | ### custom @@ -47,10 +47,10 @@ Contains data related to your deployment, including, most importantly, deal id, | `dealId` | string | **Yes** | Lowercased version of dealIdOriginal without 0x prefix. Currently unused. Was previously used to resolve workers in aqua | | `definition` | string | **Yes** | CID of uploaded to IPFS App Definition, which contains the data about everything that you are trying to deploy, including spells, service and module configs and CIDs for service wasms | | `timestamp` | string | **Yes** | ISO timestamp of the time when the worker was deployed | -| `chainNetwork` | string | No | DEPRECATED. Blockchain network name that was used when deploying workers Possible values are: `dar`, `kras`, `stage`, `local`. | +| `chainNetwork` | string | No | DEPRECATED. Blockchain network name that was used when deploying workers Possible values are: `kras`, `dar`, `stage`, `local`. | | `matched` | boolean | No | Is deal matched | -### dar +### local A map of created deals @@ -73,10 +73,10 @@ Contains data related to your deployment, including, most importantly, deal id, | `dealId` | string | **Yes** | Lowercased version of dealIdOriginal without 0x prefix. Currently unused. Was previously used to resolve workers in aqua | | `definition` | string | **Yes** | CID of uploaded to IPFS App Definition, which contains the data about everything that you are trying to deploy, including spells, service and module configs and CIDs for service wasms | | `timestamp` | string | **Yes** | ISO timestamp of the time when the worker was deployed | -| `chainNetwork` | string | No | DEPRECATED. Blockchain network name that was used when deploying workers Possible values are: `dar`, `kras`, `stage`, `local`. | +| `chainNetwork` | string | No | DEPRECATED. Blockchain network name that was used when deploying workers Possible values are: `kras`, `dar`, `stage`, `local`. | | `matched` | boolean | No | Is deal matched | -### kras +### mainnet A map of created deals @@ -99,10 +99,10 @@ Contains data related to your deployment, including, most importantly, deal id, | `dealId` | string | **Yes** | Lowercased version of dealIdOriginal without 0x prefix. Currently unused. Was previously used to resolve workers in aqua | | `definition` | string | **Yes** | CID of uploaded to IPFS App Definition, which contains the data about everything that you are trying to deploy, including spells, service and module configs and CIDs for service wasms | | `timestamp` | string | **Yes** | ISO timestamp of the time when the worker was deployed | -| `chainNetwork` | string | No | DEPRECATED. Blockchain network name that was used when deploying workers Possible values are: `dar`, `kras`, `stage`, `local`. | +| `chainNetwork` | string | No | DEPRECATED. Blockchain network name that was used when deploying workers Possible values are: `kras`, `dar`, `stage`, `local`. | | `matched` | boolean | No | Is deal matched | -### local +### stage A map of created deals @@ -125,10 +125,10 @@ Contains data related to your deployment, including, most importantly, deal id, | `dealId` | string | **Yes** | Lowercased version of dealIdOriginal without 0x prefix. Currently unused. Was previously used to resolve workers in aqua | | `definition` | string | **Yes** | CID of uploaded to IPFS App Definition, which contains the data about everything that you are trying to deploy, including spells, service and module configs and CIDs for service wasms | | `timestamp` | string | **Yes** | ISO timestamp of the time when the worker was deployed | -| `chainNetwork` | string | No | DEPRECATED. Blockchain network name that was used when deploying workers Possible values are: `dar`, `kras`, `stage`, `local`. | +| `chainNetwork` | string | No | DEPRECATED. Blockchain network name that was used when deploying workers Possible values are: `kras`, `dar`, `stage`, `local`. | | `matched` | boolean | No | Is deal matched | -### stage +### testnet A map of created deals @@ -151,7 +151,7 @@ Contains data related to your deployment, including, most importantly, deal id, | `dealId` | string | **Yes** | Lowercased version of dealIdOriginal without 0x prefix. Currently unused. Was previously used to resolve workers in aqua | | `definition` | string | **Yes** | CID of uploaded to IPFS App Definition, which contains the data about everything that you are trying to deploy, including spells, service and module configs and CIDs for service wasms | | `timestamp` | string | **Yes** | ISO timestamp of the time when the worker was deployed | -| `chainNetwork` | string | No | DEPRECATED. Blockchain network name that was used when deploying workers Possible values are: `dar`, `kras`, `stage`, `local`. | +| `chainNetwork` | string | No | DEPRECATED. Blockchain network name that was used when deploying workers Possible values are: `kras`, `dar`, `stage`, `local`. | | `matched` | boolean | No | Is deal matched | ## hosts @@ -160,13 +160,13 @@ Info about directly deployed workers that is stored by environment that you depl ### Properties -| Property | Type | Required | Description | -|----------|-------------------|----------|------------------------------------| -| `custom` | [object](#custom) | No | A map of directly deployed workers | -| `dar` | [object](#dar) | No | A map of directly deployed workers | -| `kras` | [object](#kras) | No | A map of directly deployed workers | -| `local` | [object](#local) | No | A map of directly deployed workers | -| `stage` | [object](#stage) | No | A map of directly deployed workers | +| Property | Type | Required | Description | +|-----------|--------------------|----------|------------------------------------| +| `custom` | [object](#custom) | No | A map of directly deployed workers | +| `local` | [object](#local) | No | A map of directly deployed workers | +| `mainnet` | [object](#mainnet) | No | A map of directly deployed workers | +| `stage` | [object](#stage) | No | A map of directly deployed workers | +| `testnet` | [object](#testnet) | No | A map of directly deployed workers | ### custom @@ -202,7 +202,7 @@ Contains data related to your direct deployment. Most importantly, it contains i | `spell_id` | string | **Yes** | id of the installation spell, can be used to e.g. print spell logs | | `worker_id` | string | **Yes** | Can be used to access worker in aqua: `on s.workerId via s.hostId` | -### dar +### local A map of directly deployed workers @@ -236,7 +236,7 @@ Contains data related to your direct deployment. Most importantly, it contains i | `spell_id` | string | **Yes** | id of the installation spell, can be used to e.g. print spell logs | | `worker_id` | string | **Yes** | Can be used to access worker in aqua: `on s.workerId via s.hostId` | -### kras +### mainnet A map of directly deployed workers @@ -270,7 +270,7 @@ Contains data related to your direct deployment. Most importantly, it contains i | `spell_id` | string | **Yes** | id of the installation spell, can be used to e.g. print spell logs | | `worker_id` | string | **Yes** | Can be used to access worker in aqua: `on s.workerId via s.hostId` | -### local +### stage A map of directly deployed workers @@ -304,7 +304,7 @@ Contains data related to your direct deployment. Most importantly, it contains i | `spell_id` | string | **Yes** | id of the installation spell, can be used to e.g. print spell logs | | `worker_id` | string | **Yes** | Can be used to access worker in aqua: `on s.workerId via s.hostId` | -### stage +### testnet A map of directly deployed workers diff --git a/cli/eslint.config.js b/packages/cli/package/eslint.config.js similarity index 100% rename from cli/eslint.config.js rename to packages/cli/package/eslint.config.js diff --git a/cli/example.env b/packages/cli/package/example.env similarity index 100% rename from cli/example.env rename to packages/cli/package/example.env diff --git a/cli/nsis/Plugins/amd64-unicode/EnVar.dll b/packages/cli/package/nsis/Plugins/amd64-unicode/EnVar.dll similarity index 100% rename from cli/nsis/Plugins/amd64-unicode/EnVar.dll rename to packages/cli/package/nsis/Plugins/amd64-unicode/EnVar.dll diff --git a/cli/nsis/Plugins/x86-ansi/EnVar.dll b/packages/cli/package/nsis/Plugins/x86-ansi/EnVar.dll similarity index 100% rename from cli/nsis/Plugins/x86-ansi/EnVar.dll rename to packages/cli/package/nsis/Plugins/x86-ansi/EnVar.dll diff --git a/cli/nsis/Plugins/x86-unicode/EnVar.dll b/packages/cli/package/nsis/Plugins/x86-unicode/EnVar.dll similarity index 100% rename from cli/nsis/Plugins/x86-unicode/EnVar.dll rename to packages/cli/package/nsis/Plugins/x86-unicode/EnVar.dll diff --git a/cli/nsis/custom-installer.nsi b/packages/cli/package/nsis/custom-installer.nsi similarity index 100% rename from cli/nsis/custom-installer.nsi rename to packages/cli/package/nsis/custom-installer.nsi diff --git a/cli/nsis/include/.gitkeep b/packages/cli/package/nsis/include/.gitkeep similarity index 100% rename from cli/nsis/include/.gitkeep rename to packages/cli/package/nsis/include/.gitkeep diff --git a/cli/package.json b/packages/cli/package/package.json similarity index 93% rename from cli/package.json rename to packages/cli/package/package.json index da14ea399..38bd7ab71 100644 --- a/cli/package.json +++ b/packages/cli/package/package.json @@ -23,8 +23,8 @@ "/oclif.manifest.json" ], "scripts": { - "before-build": "npm i --prefix \"./src/cli-aqua-dependencies\" && tsx src/beforeBuild.ts && npm i --prefix \"./src/aqua-dependencies\"", - "build": "yarn before-build && shx rm -rf dist && tsc -b && shx cp -r ./src/aqua-dependencies ./dist/aqua-dependencies && shx cp -r ../packages/cli-connector/dist ./dist/cli-connector", + "before-build": "tsx src/beforeBuild.ts && npm --prefix ./src/aqua-dependencies install", + "build": "shx rm -rf dist && tsc -b && shx cp -r ./src/aqua-dependencies ./dist && shx cp -r ../../cli-connector/dist ./dist/cli-connector", "type-check": "tsc --noEmit", "lint": "eslint .", "lint-fix": "eslint . --fix", @@ -50,7 +50,7 @@ "local-up": "node --loader ts-node/esm --no-warnings ./test/setup/localUp.ts", "test": "yarn download-marine-and-mrepl && yarn generate-templates && yarn local-up && yarn vitest", "circular": "madge --circular ./dist --exclude cli-connector", - "on-each-commit": "yarn build && yarn lint-fix && yarn circular && cd docs/commands && oclif readme --no-aliases && yarn gen-config-docs", + "on-each-commit": "yarn lint-fix && yarn circular && cd docs/commands && oclif readme --no-aliases && yarn gen-config-docs", "gen-config-docs": "shx rm -rf schemas && shx rm -rf docs/configs && tsx ./src/genConfigDocs.ts", "unused-exports": "ts-unused-exports tsconfig.json", "ncu": "ncu -x ethers -x @types/node -u && ncu -f \"@fluencelabs/*\" --target newest -u" diff --git a/cli/resources/license-header.js b/packages/cli/package/resources/license-header.js similarity index 100% rename from cli/resources/license-header.js rename to packages/cli/package/resources/license-header.js diff --git a/cli/src/baseCommand.ts b/packages/cli/package/src/baseCommand.ts similarity index 100% rename from cli/src/baseCommand.ts rename to packages/cli/package/src/baseCommand.ts diff --git a/cli/src/beforeBuild.ts b/packages/cli/package/src/beforeBuild.ts similarity index 85% rename from cli/src/beforeBuild.ts rename to packages/cli/package/src/beforeBuild.ts index e9854bc40..83ff5e32a 100644 --- a/cli/src/beforeBuild.ts +++ b/packages/cli/package/src/beforeBuild.ts @@ -15,8 +15,10 @@ * along with this program. If not, see . */ +// @ts-check import { cp, mkdir, rm, writeFile } from "node:fs/promises"; -import { join, resolve } from "node:path"; +import { join, resolve, dirname } from "node:path"; +import { fileURLToPath } from "node:url"; import { compileFromPath } from "@fluencelabs/aqua-api"; import aquaToJs from "@fluencelabs/aqua-to-js"; @@ -24,9 +26,13 @@ import { gatherImportsFromNpm } from "@fluencelabs/npm-aqua-compiler"; import { versions } from "./versions.js"; -const WORKSPACE_NODE_MODULES_PATH = resolve(".", "node_modules"); +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); +const root = resolve(__dirname, ".."); -const aquaDependenciesDirPath = join("src", "aqua-dependencies"); +const WORKSPACE_NODE_MODULES_PATH = resolve(root, "node_modules"); + +const aquaDependenciesDirPath = join(root, "src", "aqua-dependencies"); await mkdir(aquaDependenciesDirPath, { recursive: true }); await writeFile( @@ -35,8 +41,8 @@ await writeFile( "utf-8", ); -const VERSIONS_DIR_PATH = join("src", "versions"); -const SRC_LIB_PATH = join("src", "lib"); +const VERSIONS_DIR_PATH = join(root, "src", "versions"); +const SRC_LIB_PATH = join(root, "src", "lib"); const COMPILED_AQUA_PATH = join(SRC_LIB_PATH, "compiled-aqua"); const COMPILED_AQUA_WITH_TRACING_PATH = join( @@ -55,7 +61,7 @@ const COMPILED_INSTALLATION_SPELL_AQUA_WITH_TRACING_PATH = join( ); const CLI_AQUA_DEPENDENCIES_DIR_PATH = resolve( - join("src", "cli-aqua-dependencies"), + join(root, "src", "cli-aqua-dependencies"), ); const INSTALLATION_SPELL_DIR_PATH = join( @@ -131,8 +137,8 @@ await cp( ); await cp( - resolve("..", "packages", "common", "src", "index.ts"), - resolve(".", "src", "common.ts"), + resolve(root, "..", "..", "common", "src", "index.ts"), + resolve(root, "src", "common.ts"), ); await rm(COMPILED_AQUA_PATH, { recursive: true, force: true }); diff --git a/cli/src/cli-aqua-dependencies/package-lock.json b/packages/cli/package/src/cli-aqua-dependencies/package-lock.json similarity index 100% rename from cli/src/cli-aqua-dependencies/package-lock.json rename to packages/cli/package/src/cli-aqua-dependencies/package-lock.json diff --git a/cli/src/cli-aqua-dependencies/package.json b/packages/cli/package/src/cli-aqua-dependencies/package.json similarity index 100% rename from cli/src/cli-aqua-dependencies/package.json rename to packages/cli/package/src/cli-aqua-dependencies/package.json diff --git a/cli/src/commands/air/beautify.ts b/packages/cli/package/src/commands/air/beautify.ts similarity index 100% rename from cli/src/commands/air/beautify.ts rename to packages/cli/package/src/commands/air/beautify.ts diff --git a/cli/src/commands/aqua.ts b/packages/cli/package/src/commands/aqua.ts similarity index 100% rename from cli/src/commands/aqua.ts rename to packages/cli/package/src/commands/aqua.ts diff --git a/cli/src/commands/aqua/imports.ts b/packages/cli/package/src/commands/aqua/imports.ts similarity index 100% rename from cli/src/commands/aqua/imports.ts rename to packages/cli/package/src/commands/aqua/imports.ts diff --git a/cli/src/commands/aqua/json.ts b/packages/cli/package/src/commands/aqua/json.ts similarity index 100% rename from cli/src/commands/aqua/json.ts rename to packages/cli/package/src/commands/aqua/json.ts diff --git a/cli/src/commands/aqua/yml.ts b/packages/cli/package/src/commands/aqua/yml.ts similarity index 100% rename from cli/src/commands/aqua/yml.ts rename to packages/cli/package/src/commands/aqua/yml.ts diff --git a/cli/src/commands/build.ts b/packages/cli/package/src/commands/build.ts similarity index 100% rename from cli/src/commands/build.ts rename to packages/cli/package/src/commands/build.ts diff --git a/cli/src/commands/chain/info.ts b/packages/cli/package/src/commands/chain/info.ts similarity index 100% rename from cli/src/commands/chain/info.ts rename to packages/cli/package/src/commands/chain/info.ts diff --git a/cli/src/commands/deal/change-app.ts b/packages/cli/package/src/commands/deal/change-app.ts similarity index 100% rename from cli/src/commands/deal/change-app.ts rename to packages/cli/package/src/commands/deal/change-app.ts diff --git a/cli/src/commands/deal/create.ts b/packages/cli/package/src/commands/deal/create.ts similarity index 100% rename from cli/src/commands/deal/create.ts rename to packages/cli/package/src/commands/deal/create.ts diff --git a/cli/src/commands/deal/deploy.ts b/packages/cli/package/src/commands/deal/deploy.ts similarity index 100% rename from cli/src/commands/deal/deploy.ts rename to packages/cli/package/src/commands/deal/deploy.ts diff --git a/cli/src/commands/deal/deposit.ts b/packages/cli/package/src/commands/deal/deposit.ts similarity index 100% rename from cli/src/commands/deal/deposit.ts rename to packages/cli/package/src/commands/deal/deposit.ts diff --git a/cli/src/commands/deal/info.ts b/packages/cli/package/src/commands/deal/info.ts similarity index 100% rename from cli/src/commands/deal/info.ts rename to packages/cli/package/src/commands/deal/info.ts diff --git a/cli/src/commands/deal/logs.ts b/packages/cli/package/src/commands/deal/logs.ts similarity index 100% rename from cli/src/commands/deal/logs.ts rename to packages/cli/package/src/commands/deal/logs.ts diff --git a/cli/src/commands/deal/stop.ts b/packages/cli/package/src/commands/deal/stop.ts similarity index 100% rename from cli/src/commands/deal/stop.ts rename to packages/cli/package/src/commands/deal/stop.ts diff --git a/cli/src/commands/deal/withdraw.ts b/packages/cli/package/src/commands/deal/withdraw.ts similarity index 100% rename from cli/src/commands/deal/withdraw.ts rename to packages/cli/package/src/commands/deal/withdraw.ts diff --git a/cli/src/commands/deal/workers-add.ts b/packages/cli/package/src/commands/deal/workers-add.ts similarity index 100% rename from cli/src/commands/deal/workers-add.ts rename to packages/cli/package/src/commands/deal/workers-add.ts diff --git a/cli/src/commands/deal/workers-remove.ts b/packages/cli/package/src/commands/deal/workers-remove.ts similarity index 100% rename from cli/src/commands/deal/workers-remove.ts rename to packages/cli/package/src/commands/deal/workers-remove.ts diff --git a/cli/src/commands/default/env.ts b/packages/cli/package/src/commands/default/env.ts similarity index 100% rename from cli/src/commands/default/env.ts rename to packages/cli/package/src/commands/default/env.ts diff --git a/cli/src/commands/default/peers.ts b/packages/cli/package/src/commands/default/peers.ts similarity index 100% rename from cli/src/commands/default/peers.ts rename to packages/cli/package/src/commands/default/peers.ts diff --git a/cli/src/commands/delegator/collateral-add.ts b/packages/cli/package/src/commands/delegator/collateral-add.ts similarity index 100% rename from cli/src/commands/delegator/collateral-add.ts rename to packages/cli/package/src/commands/delegator/collateral-add.ts diff --git a/cli/src/commands/delegator/collateral-withdraw.ts b/packages/cli/package/src/commands/delegator/collateral-withdraw.ts similarity index 100% rename from cli/src/commands/delegator/collateral-withdraw.ts rename to packages/cli/package/src/commands/delegator/collateral-withdraw.ts diff --git a/cli/src/commands/delegator/reward-withdraw.ts b/packages/cli/package/src/commands/delegator/reward-withdraw.ts similarity index 100% rename from cli/src/commands/delegator/reward-withdraw.ts rename to packages/cli/package/src/commands/delegator/reward-withdraw.ts diff --git a/cli/src/commands/dep/install.ts b/packages/cli/package/src/commands/dep/install.ts similarity index 100% rename from cli/src/commands/dep/install.ts rename to packages/cli/package/src/commands/dep/install.ts diff --git a/cli/src/commands/dep/reset.ts b/packages/cli/package/src/commands/dep/reset.ts similarity index 100% rename from cli/src/commands/dep/reset.ts rename to packages/cli/package/src/commands/dep/reset.ts diff --git a/cli/src/commands/dep/uninstall.ts b/packages/cli/package/src/commands/dep/uninstall.ts similarity index 100% rename from cli/src/commands/dep/uninstall.ts rename to packages/cli/package/src/commands/dep/uninstall.ts diff --git a/cli/src/commands/dep/versions.ts b/packages/cli/package/src/commands/dep/versions.ts similarity index 76% rename from cli/src/commands/dep/versions.ts rename to packages/cli/package/src/commands/dep/versions.ts index a3bcb390d..f29ff5d97 100644 --- a/cli/src/commands/dep/versions.ts +++ b/packages/cli/package/src/commands/dep/versions.ts @@ -18,12 +18,11 @@ import { Flags } from "@oclif/core"; import { BaseCommand, baseFlags } from "../../baseCommand.js"; -import InternalAquaDependenciesPackageJSON from "../../cli-aqua-dependencies/package.json" assert { type: "json" }; +import internalAquaDependencies from "../../cli-aqua-dependencies/package.json" assert { type: "json" }; import { jsonStringify } from "../../common.js"; import { commandObj } from "../../lib/commandObj.js"; import { CLI_NAME_FULL, JSON_FLAG } from "../../lib/const.js"; import { initCli } from "../../lib/lifeCycle.js"; -import { ensureMarinePath, ensureMreplPath } from "../../lib/marineCli.js"; import { getRustToolchainToUse, getMarineOrMreplVersion, @@ -53,63 +52,56 @@ export default class Versions extends BaseCommand { const { yamlDiffPatch } = await import("yaml-diff-patch"); - if (flags.default) { - const defaultDeps = { - "cli version": commandObj.config.version, - [`default aqua dependencies`]: versions.npm, - tools: { - marine: versions.cargo.marine, - mrepl: versions.cargo.mrepl, - }, - "default rust toolchain": versions["rust-toolchain"], - }; - - commandObj.log( - flags.json - ? jsonStringify(defaultDeps) - : yamlDiffPatch("", {}, defaultDeps), - ); - - return; - } - const devDependencies = filterOutNonFluenceDependencies( CLIPackageJSON.devDependencies, ); - const deps = { + const defaultDeps = { [`${CLI_NAME_FULL} version`]: commandObj.config.version, + "internal aqua dependencies": internalAquaDependencies.dependencies, "nox version": versions["nox"], - "rust toolchain": await getRustToolchainToUse(), - "aqua dependencies": - maybeFluenceConfig === null - ? versions.npm - : maybeFluenceConfig.aquaDependencies, - tools: { - marine: { - version: await getMarineOrMreplVersion("marine"), - path: await ensureMarinePath(), - }, - mrepl: { - version: await getMarineOrMreplVersion("mrepl"), - path: await ensureMreplPath(), - }, - }, "internal dependencies": filterOutNonFluenceDependencies( CLIPackageJSON.dependencies, ), ...(Object.keys(devDependencies).length === 0 ? {} : { - "dev dependencies": filterOutNonFluenceDependencies( + "internal dev dependencies": filterOutNonFluenceDependencies( CLIPackageJSON.devDependencies, ), }), - "internal aqua dependencies": - InternalAquaDependenciesPackageJSON.dependencies, "js-client dependencies": filterOutNonFluenceDependencies( JSClientPackageJSON.dependencies, ), + [RUST_TOOLCHAIN]: versions["rust-toolchain"], + [AQUA_DEPENDENCIES]: versions.npm, + [TOOLS]: { + [MARINE]: versions.cargo.marine, + [MREPL]: versions.cargo.mrepl, + }, + }; + + if (flags.default) { + commandObj.log( + flags.json + ? jsonStringify(defaultDeps) + : yamlDiffPatch("", {}, defaultDeps), + ); + + return; + } + + const deps = { + ...defaultDeps, + [RUST_TOOLCHAIN]: await getRustToolchainToUse(), + [AQUA_DEPENDENCIES]: + maybeFluenceConfig === null + ? versions.npm + : maybeFluenceConfig.aquaDependencies, + [TOOLS]: { + [MARINE]: await getMarineOrMreplVersion("marine"), + [MREPL]: await getMarineOrMreplVersion("mrepl"), + }, }; commandObj.log( @@ -118,6 +110,12 @@ export default class Versions extends BaseCommand { } } +const RUST_TOOLCHAIN = "rust-toolchain"; +const AQUA_DEPENDENCIES = "aqua-dependencies"; +const TOOLS = "tools"; +const MARINE = "marine"; +const MREPL = "mrepl"; + const filterOutNonFluenceDependencies = ( dependencies: Record, ) => { diff --git a/cli/src/commands/deploy.ts b/packages/cli/package/src/commands/deploy.ts similarity index 100% rename from cli/src/commands/deploy.ts rename to packages/cli/package/src/commands/deploy.ts diff --git a/cli/src/commands/init.ts b/packages/cli/package/src/commands/init.ts similarity index 100% rename from cli/src/commands/init.ts rename to packages/cli/package/src/commands/init.ts diff --git a/cli/src/commands/key/default.ts b/packages/cli/package/src/commands/key/default.ts similarity index 100% rename from cli/src/commands/key/default.ts rename to packages/cli/package/src/commands/key/default.ts diff --git a/cli/src/commands/key/new.ts b/packages/cli/package/src/commands/key/new.ts similarity index 100% rename from cli/src/commands/key/new.ts rename to packages/cli/package/src/commands/key/new.ts diff --git a/cli/src/commands/key/remove.ts b/packages/cli/package/src/commands/key/remove.ts similarity index 100% rename from cli/src/commands/key/remove.ts rename to packages/cli/package/src/commands/key/remove.ts diff --git a/cli/src/commands/local/down.ts b/packages/cli/package/src/commands/local/down.ts similarity index 100% rename from cli/src/commands/local/down.ts rename to packages/cli/package/src/commands/local/down.ts diff --git a/cli/src/commands/local/init.ts b/packages/cli/package/src/commands/local/init.ts similarity index 100% rename from cli/src/commands/local/init.ts rename to packages/cli/package/src/commands/local/init.ts diff --git a/cli/src/commands/local/logs.ts b/packages/cli/package/src/commands/local/logs.ts similarity index 100% rename from cli/src/commands/local/logs.ts rename to packages/cli/package/src/commands/local/logs.ts diff --git a/cli/src/commands/local/ps.ts b/packages/cli/package/src/commands/local/ps.ts similarity index 100% rename from cli/src/commands/local/ps.ts rename to packages/cli/package/src/commands/local/ps.ts diff --git a/cli/src/commands/local/up.ts b/packages/cli/package/src/commands/local/up.ts similarity index 100% rename from cli/src/commands/local/up.ts rename to packages/cli/package/src/commands/local/up.ts diff --git a/cli/src/commands/module/add.ts b/packages/cli/package/src/commands/module/add.ts similarity index 100% rename from cli/src/commands/module/add.ts rename to packages/cli/package/src/commands/module/add.ts diff --git a/cli/src/commands/module/build.ts b/packages/cli/package/src/commands/module/build.ts similarity index 100% rename from cli/src/commands/module/build.ts rename to packages/cli/package/src/commands/module/build.ts diff --git a/cli/src/commands/module/new.ts b/packages/cli/package/src/commands/module/new.ts similarity index 100% rename from cli/src/commands/module/new.ts rename to packages/cli/package/src/commands/module/new.ts diff --git a/cli/src/commands/module/pack.ts b/packages/cli/package/src/commands/module/pack.ts similarity index 100% rename from cli/src/commands/module/pack.ts rename to packages/cli/package/src/commands/module/pack.ts diff --git a/cli/src/commands/module/remove.ts b/packages/cli/package/src/commands/module/remove.ts similarity index 100% rename from cli/src/commands/module/remove.ts rename to packages/cli/package/src/commands/module/remove.ts diff --git a/cli/src/commands/provider/cc-activate.ts b/packages/cli/package/src/commands/provider/cc-activate.ts similarity index 100% rename from cli/src/commands/provider/cc-activate.ts rename to packages/cli/package/src/commands/provider/cc-activate.ts diff --git a/cli/src/commands/provider/cc-collateral-withdraw.ts b/packages/cli/package/src/commands/provider/cc-collateral-withdraw.ts similarity index 100% rename from cli/src/commands/provider/cc-collateral-withdraw.ts rename to packages/cli/package/src/commands/provider/cc-collateral-withdraw.ts diff --git a/cli/src/commands/provider/cc-create.ts b/packages/cli/package/src/commands/provider/cc-create.ts similarity index 100% rename from cli/src/commands/provider/cc-create.ts rename to packages/cli/package/src/commands/provider/cc-create.ts diff --git a/cli/src/commands/provider/cc-finish.ts b/packages/cli/package/src/commands/provider/cc-finish.ts similarity index 100% rename from cli/src/commands/provider/cc-finish.ts rename to packages/cli/package/src/commands/provider/cc-finish.ts diff --git a/cli/src/commands/provider/cc-info.ts b/packages/cli/package/src/commands/provider/cc-info.ts similarity index 100% rename from cli/src/commands/provider/cc-info.ts rename to packages/cli/package/src/commands/provider/cc-info.ts diff --git a/cli/src/commands/provider/cc-remove.ts b/packages/cli/package/src/commands/provider/cc-remove.ts similarity index 100% rename from cli/src/commands/provider/cc-remove.ts rename to packages/cli/package/src/commands/provider/cc-remove.ts diff --git a/cli/src/commands/provider/cc-rewards-withdraw.ts b/packages/cli/package/src/commands/provider/cc-rewards-withdraw.ts similarity index 100% rename from cli/src/commands/provider/cc-rewards-withdraw.ts rename to packages/cli/package/src/commands/provider/cc-rewards-withdraw.ts diff --git a/cli/src/commands/provider/deal-exit.ts b/packages/cli/package/src/commands/provider/deal-exit.ts similarity index 100% rename from cli/src/commands/provider/deal-exit.ts rename to packages/cli/package/src/commands/provider/deal-exit.ts diff --git a/cli/src/commands/provider/deal-list.ts b/packages/cli/package/src/commands/provider/deal-list.ts similarity index 100% rename from cli/src/commands/provider/deal-list.ts rename to packages/cli/package/src/commands/provider/deal-list.ts diff --git a/cli/src/commands/provider/deal-rewards-info.ts b/packages/cli/package/src/commands/provider/deal-rewards-info.ts similarity index 100% rename from cli/src/commands/provider/deal-rewards-info.ts rename to packages/cli/package/src/commands/provider/deal-rewards-info.ts diff --git a/cli/src/commands/provider/deal-rewards-withdraw.ts b/packages/cli/package/src/commands/provider/deal-rewards-withdraw.ts similarity index 100% rename from cli/src/commands/provider/deal-rewards-withdraw.ts rename to packages/cli/package/src/commands/provider/deal-rewards-withdraw.ts diff --git a/cli/src/commands/provider/gen.ts b/packages/cli/package/src/commands/provider/gen.ts similarity index 100% rename from cli/src/commands/provider/gen.ts rename to packages/cli/package/src/commands/provider/gen.ts diff --git a/cli/src/commands/provider/info.ts b/packages/cli/package/src/commands/provider/info.ts similarity index 100% rename from cli/src/commands/provider/info.ts rename to packages/cli/package/src/commands/provider/info.ts diff --git a/cli/src/commands/provider/init.ts b/packages/cli/package/src/commands/provider/init.ts similarity index 100% rename from cli/src/commands/provider/init.ts rename to packages/cli/package/src/commands/provider/init.ts diff --git a/cli/src/commands/provider/offer-create.ts b/packages/cli/package/src/commands/provider/offer-create.ts similarity index 100% rename from cli/src/commands/provider/offer-create.ts rename to packages/cli/package/src/commands/provider/offer-create.ts diff --git a/cli/src/commands/provider/offer-info.ts b/packages/cli/package/src/commands/provider/offer-info.ts similarity index 100% rename from cli/src/commands/provider/offer-info.ts rename to packages/cli/package/src/commands/provider/offer-info.ts diff --git a/cli/src/commands/provider/offer-remove.ts b/packages/cli/package/src/commands/provider/offer-remove.ts similarity index 100% rename from cli/src/commands/provider/offer-remove.ts rename to packages/cli/package/src/commands/provider/offer-remove.ts diff --git a/cli/src/commands/provider/offer-update.ts b/packages/cli/package/src/commands/provider/offer-update.ts similarity index 100% rename from cli/src/commands/provider/offer-update.ts rename to packages/cli/package/src/commands/provider/offer-update.ts diff --git a/cli/src/commands/provider/register.ts b/packages/cli/package/src/commands/provider/register.ts similarity index 100% rename from cli/src/commands/provider/register.ts rename to packages/cli/package/src/commands/provider/register.ts diff --git a/cli/src/commands/provider/tokens-distribute.ts b/packages/cli/package/src/commands/provider/tokens-distribute.ts similarity index 100% rename from cli/src/commands/provider/tokens-distribute.ts rename to packages/cli/package/src/commands/provider/tokens-distribute.ts diff --git a/cli/src/commands/provider/tokens-withdraw.ts b/packages/cli/package/src/commands/provider/tokens-withdraw.ts similarity index 100% rename from cli/src/commands/provider/tokens-withdraw.ts rename to packages/cli/package/src/commands/provider/tokens-withdraw.ts diff --git a/cli/src/commands/provider/update.ts b/packages/cli/package/src/commands/provider/update.ts similarity index 100% rename from cli/src/commands/provider/update.ts rename to packages/cli/package/src/commands/provider/update.ts diff --git a/cli/src/commands/run.ts b/packages/cli/package/src/commands/run.ts similarity index 100% rename from cli/src/commands/run.ts rename to packages/cli/package/src/commands/run.ts diff --git a/cli/src/commands/service/add.ts b/packages/cli/package/src/commands/service/add.ts similarity index 100% rename from cli/src/commands/service/add.ts rename to packages/cli/package/src/commands/service/add.ts diff --git a/cli/src/commands/service/new.ts b/packages/cli/package/src/commands/service/new.ts similarity index 100% rename from cli/src/commands/service/new.ts rename to packages/cli/package/src/commands/service/new.ts diff --git a/cli/src/commands/service/remove.ts b/packages/cli/package/src/commands/service/remove.ts similarity index 100% rename from cli/src/commands/service/remove.ts rename to packages/cli/package/src/commands/service/remove.ts diff --git a/cli/src/commands/service/repl.ts b/packages/cli/package/src/commands/service/repl.ts similarity index 100% rename from cli/src/commands/service/repl.ts rename to packages/cli/package/src/commands/service/repl.ts diff --git a/cli/src/commands/spell/build.ts b/packages/cli/package/src/commands/spell/build.ts similarity index 100% rename from cli/src/commands/spell/build.ts rename to packages/cli/package/src/commands/spell/build.ts diff --git a/cli/src/commands/spell/new.ts b/packages/cli/package/src/commands/spell/new.ts similarity index 100% rename from cli/src/commands/spell/new.ts rename to packages/cli/package/src/commands/spell/new.ts diff --git a/cli/src/commands/workers/deploy.ts b/packages/cli/package/src/commands/workers/deploy.ts similarity index 100% rename from cli/src/commands/workers/deploy.ts rename to packages/cli/package/src/commands/workers/deploy.ts diff --git a/cli/src/commands/workers/logs.ts b/packages/cli/package/src/commands/workers/logs.ts similarity index 100% rename from cli/src/commands/workers/logs.ts rename to packages/cli/package/src/commands/workers/logs.ts diff --git a/cli/src/commands/workers/remove.ts b/packages/cli/package/src/commands/workers/remove.ts similarity index 100% rename from cli/src/commands/workers/remove.ts rename to packages/cli/package/src/commands/workers/remove.ts diff --git a/cli/src/commands/workers/upload.ts b/packages/cli/package/src/commands/workers/upload.ts similarity index 100% rename from cli/src/commands/workers/upload.ts rename to packages/cli/package/src/commands/workers/upload.ts diff --git a/cli/src/environment.d.ts b/packages/cli/package/src/environment.d.ts similarity index 100% rename from cli/src/environment.d.ts rename to packages/cli/package/src/environment.d.ts diff --git a/cli/src/errorInterceptor.js b/packages/cli/package/src/errorInterceptor.js similarity index 100% rename from cli/src/errorInterceptor.js rename to packages/cli/package/src/errorInterceptor.js diff --git a/cli/src/fetch.d.ts b/packages/cli/package/src/fetch.d.ts similarity index 100% rename from cli/src/fetch.d.ts rename to packages/cli/package/src/fetch.d.ts diff --git a/cli/src/genConfigDocs.ts b/packages/cli/package/src/genConfigDocs.ts similarity index 100% rename from cli/src/genConfigDocs.ts rename to packages/cli/package/src/genConfigDocs.ts diff --git a/cli/src/index.ts b/packages/cli/package/src/index.ts similarity index 100% rename from cli/src/index.ts rename to packages/cli/package/src/index.ts diff --git a/cli/src/lib/addService.ts b/packages/cli/package/src/lib/addService.ts similarity index 100% rename from cli/src/lib/addService.ts rename to packages/cli/package/src/lib/addService.ts diff --git a/cli/src/lib/ajvInstance.ts b/packages/cli/package/src/lib/ajvInstance.ts similarity index 100% rename from cli/src/lib/ajvInstance.ts rename to packages/cli/package/src/lib/ajvInstance.ts diff --git a/cli/src/lib/aqua.ts b/packages/cli/package/src/lib/aqua.ts similarity index 100% rename from cli/src/lib/aqua.ts rename to packages/cli/package/src/lib/aqua.ts diff --git a/cli/src/lib/build.ts b/packages/cli/package/src/lib/build.ts similarity index 100% rename from cli/src/lib/build.ts rename to packages/cli/package/src/lib/build.ts diff --git a/cli/src/lib/buildModules.ts b/packages/cli/package/src/lib/buildModules.ts similarity index 100% rename from cli/src/lib/buildModules.ts rename to packages/cli/package/src/lib/buildModules.ts diff --git a/cli/src/lib/chain/chainConfig.ts b/packages/cli/package/src/lib/chain/chainConfig.ts similarity index 100% rename from cli/src/lib/chain/chainConfig.ts rename to packages/cli/package/src/lib/chain/chainConfig.ts diff --git a/cli/src/lib/chain/chainValidators.ts b/packages/cli/package/src/lib/chain/chainValidators.ts similarity index 100% rename from cli/src/lib/chain/chainValidators.ts rename to packages/cli/package/src/lib/chain/chainValidators.ts diff --git a/cli/src/lib/chain/commitment.ts b/packages/cli/package/src/lib/chain/commitment.ts similarity index 100% rename from cli/src/lib/chain/commitment.ts rename to packages/cli/package/src/lib/chain/commitment.ts diff --git a/cli/src/lib/chain/conversions.ts b/packages/cli/package/src/lib/chain/conversions.ts similarity index 100% rename from cli/src/lib/chain/conversions.ts rename to packages/cli/package/src/lib/chain/conversions.ts diff --git a/cli/src/lib/chain/currencies.ts b/packages/cli/package/src/lib/chain/currencies.ts similarity index 100% rename from cli/src/lib/chain/currencies.ts rename to packages/cli/package/src/lib/chain/currencies.ts diff --git a/cli/src/lib/chain/deals.ts b/packages/cli/package/src/lib/chain/deals.ts similarity index 100% rename from cli/src/lib/chain/deals.ts rename to packages/cli/package/src/lib/chain/deals.ts diff --git a/cli/src/lib/chain/depositCollateral.ts b/packages/cli/package/src/lib/chain/depositCollateral.ts similarity index 100% rename from cli/src/lib/chain/depositCollateral.ts rename to packages/cli/package/src/lib/chain/depositCollateral.ts diff --git a/cli/src/lib/chain/depositToDeal.ts b/packages/cli/package/src/lib/chain/depositToDeal.ts similarity index 100% rename from cli/src/lib/chain/depositToDeal.ts rename to packages/cli/package/src/lib/chain/depositToDeal.ts diff --git a/cli/src/lib/chain/distributeToNox.ts b/packages/cli/package/src/lib/chain/distributeToNox.ts similarity index 100% rename from cli/src/lib/chain/distributeToNox.ts rename to packages/cli/package/src/lib/chain/distributeToNox.ts diff --git a/cli/src/lib/chain/offer/offer.ts b/packages/cli/package/src/lib/chain/offer/offer.ts similarity index 100% rename from cli/src/lib/chain/offer/offer.ts rename to packages/cli/package/src/lib/chain/offer/offer.ts diff --git a/cli/src/lib/chain/offer/updateOffers.ts b/packages/cli/package/src/lib/chain/offer/updateOffers.ts similarity index 100% rename from cli/src/lib/chain/offer/updateOffers.ts rename to packages/cli/package/src/lib/chain/offer/updateOffers.ts diff --git a/cli/src/lib/chain/printDealInfo.ts b/packages/cli/package/src/lib/chain/printDealInfo.ts similarity index 100% rename from cli/src/lib/chain/printDealInfo.ts rename to packages/cli/package/src/lib/chain/printDealInfo.ts diff --git a/cli/src/lib/chain/providerInfo.ts b/packages/cli/package/src/lib/chain/providerInfo.ts similarity index 100% rename from cli/src/lib/chain/providerInfo.ts rename to packages/cli/package/src/lib/chain/providerInfo.ts diff --git a/cli/src/lib/chainFlags.ts b/packages/cli/package/src/lib/chainFlags.ts similarity index 100% rename from cli/src/lib/chainFlags.ts rename to packages/cli/package/src/lib/chainFlags.ts diff --git a/cli/src/lib/commandObj.ts b/packages/cli/package/src/lib/commandObj.ts similarity index 100% rename from cli/src/lib/commandObj.ts rename to packages/cli/package/src/lib/commandObj.ts diff --git a/cli/src/lib/compileAquaAndWatch.ts b/packages/cli/package/src/lib/compileAquaAndWatch.ts similarity index 100% rename from cli/src/lib/compileAquaAndWatch.ts rename to packages/cli/package/src/lib/compileAquaAndWatch.ts diff --git a/cli/src/lib/configs/globalConfigs.ts b/packages/cli/package/src/lib/configs/globalConfigs.ts similarity index 100% rename from cli/src/lib/configs/globalConfigs.ts rename to packages/cli/package/src/lib/configs/globalConfigs.ts diff --git a/cli/src/lib/configs/initConfig.ts b/packages/cli/package/src/lib/configs/initConfig.ts similarity index 99% rename from cli/src/lib/configs/initConfig.ts rename to packages/cli/package/src/lib/configs/initConfig.ts index 37920773d..7e3fc56eb 100644 --- a/cli/src/lib/configs/initConfig.ts +++ b/packages/cli/package/src/lib/configs/initConfig.ts @@ -382,7 +382,7 @@ export function getReadonlyConfigInitFunction< } // If config file doesn't exist, create it with default config and schema path comment - const documentationLinkComment = `# Documentation for CLI v${commandObj.config.version}: https://github.com/fluencelabs/cli/tree/fluence-cli-v${commandObj.config.version}/cli/docs/configs/${name.replace( + const documentationLinkComment = `# Documentation for CLI v${commandObj.config.version}: https://github.com/fluencelabs/cli/tree/fluence-cli-v${commandObj.config.version}/packages/cli/package/docs/configs/${name.replace( `.${YAML_EXT}`, "", )}.md`; diff --git a/cli/src/lib/configs/keyPair.ts b/packages/cli/package/src/lib/configs/keyPair.ts similarity index 100% rename from cli/src/lib/configs/keyPair.ts rename to packages/cli/package/src/lib/configs/keyPair.ts diff --git a/cli/src/lib/configs/project/compose.schema.json b/packages/cli/package/src/lib/configs/project/compose.schema.json similarity index 100% rename from cli/src/lib/configs/project/compose.schema.json rename to packages/cli/package/src/lib/configs/project/compose.schema.json diff --git a/cli/src/lib/configs/project/dockerCompose.ts b/packages/cli/package/src/lib/configs/project/dockerCompose.ts similarity index 100% rename from cli/src/lib/configs/project/dockerCompose.ts rename to packages/cli/package/src/lib/configs/project/dockerCompose.ts diff --git a/cli/src/lib/configs/project/env.ts b/packages/cli/package/src/lib/configs/project/env.ts similarity index 100% rename from cli/src/lib/configs/project/env.ts rename to packages/cli/package/src/lib/configs/project/env.ts diff --git a/cli/src/lib/configs/project/fluence.ts b/packages/cli/package/src/lib/configs/project/fluence.ts similarity index 100% rename from cli/src/lib/configs/project/fluence.ts rename to packages/cli/package/src/lib/configs/project/fluence.ts diff --git a/cli/src/lib/configs/project/module.ts b/packages/cli/package/src/lib/configs/project/module.ts similarity index 100% rename from cli/src/lib/configs/project/module.ts rename to packages/cli/package/src/lib/configs/project/module.ts diff --git a/cli/src/lib/configs/project/projectSecrets.ts b/packages/cli/package/src/lib/configs/project/projectSecrets.ts similarity index 100% rename from cli/src/lib/configs/project/projectSecrets.ts rename to packages/cli/package/src/lib/configs/project/projectSecrets.ts diff --git a/cli/src/lib/configs/project/provider.ts b/packages/cli/package/src/lib/configs/project/provider.ts similarity index 100% rename from cli/src/lib/configs/project/provider.ts rename to packages/cli/package/src/lib/configs/project/provider.ts diff --git a/cli/src/lib/configs/project/providerArtifacts.ts b/packages/cli/package/src/lib/configs/project/providerArtifacts.ts similarity index 100% rename from cli/src/lib/configs/project/providerArtifacts.ts rename to packages/cli/package/src/lib/configs/project/providerArtifacts.ts diff --git a/cli/src/lib/configs/project/providerSecrets.ts b/packages/cli/package/src/lib/configs/project/providerSecrets.ts similarity index 100% rename from cli/src/lib/configs/project/providerSecrets.ts rename to packages/cli/package/src/lib/configs/project/providerSecrets.ts diff --git a/cli/src/lib/configs/project/service.ts b/packages/cli/package/src/lib/configs/project/service.ts similarity index 100% rename from cli/src/lib/configs/project/service.ts rename to packages/cli/package/src/lib/configs/project/service.ts diff --git a/cli/src/lib/configs/project/spell.ts b/packages/cli/package/src/lib/configs/project/spell.ts similarity index 100% rename from cli/src/lib/configs/project/spell.ts rename to packages/cli/package/src/lib/configs/project/spell.ts diff --git a/cli/src/lib/configs/project/workers.ts b/packages/cli/package/src/lib/configs/project/workers.ts similarity index 100% rename from cli/src/lib/configs/project/workers.ts rename to packages/cli/package/src/lib/configs/project/workers.ts diff --git a/cli/src/lib/configs/user/config.ts b/packages/cli/package/src/lib/configs/user/config.ts similarity index 100% rename from cli/src/lib/configs/user/config.ts rename to packages/cli/package/src/lib/configs/user/config.ts diff --git a/cli/src/lib/configs/user/userSecrets.ts b/packages/cli/package/src/lib/configs/user/userSecrets.ts similarity index 100% rename from cli/src/lib/configs/user/userSecrets.ts rename to packages/cli/package/src/lib/configs/user/userSecrets.ts diff --git a/cli/src/lib/const.ts b/packages/cli/package/src/lib/const.ts similarity index 100% rename from cli/src/lib/const.ts rename to packages/cli/package/src/lib/const.ts diff --git a/cli/src/lib/countly.ts b/packages/cli/package/src/lib/countly.ts similarity index 100% rename from cli/src/lib/countly.ts rename to packages/cli/package/src/lib/countly.ts diff --git a/cli/src/lib/dbg.ts b/packages/cli/package/src/lib/dbg.ts similarity index 100% rename from cli/src/lib/dbg.ts rename to packages/cli/package/src/lib/dbg.ts diff --git a/cli/src/lib/deal.ts b/packages/cli/package/src/lib/deal.ts similarity index 100% rename from cli/src/lib/deal.ts rename to packages/cli/package/src/lib/deal.ts diff --git a/cli/src/lib/dealClient.ts b/packages/cli/package/src/lib/dealClient.ts similarity index 100% rename from cli/src/lib/dealClient.ts rename to packages/cli/package/src/lib/dealClient.ts diff --git a/cli/src/lib/deploy.ts b/packages/cli/package/src/lib/deploy.ts similarity index 100% rename from cli/src/lib/deploy.ts rename to packages/cli/package/src/lib/deploy.ts diff --git a/cli/src/lib/deployWorkers.ts b/packages/cli/package/src/lib/deployWorkers.ts similarity index 100% rename from cli/src/lib/deployWorkers.ts rename to packages/cli/package/src/lib/deployWorkers.ts diff --git a/cli/src/lib/dockerCompose.ts b/packages/cli/package/src/lib/dockerCompose.ts similarity index 100% rename from cli/src/lib/dockerCompose.ts rename to packages/cli/package/src/lib/dockerCompose.ts diff --git a/cli/src/lib/ensureChainNetwork.ts b/packages/cli/package/src/lib/ensureChainNetwork.ts similarity index 100% rename from cli/src/lib/ensureChainNetwork.ts rename to packages/cli/package/src/lib/ensureChainNetwork.ts diff --git a/cli/src/lib/env.ts b/packages/cli/package/src/lib/env.ts similarity index 100% rename from cli/src/lib/env.ts rename to packages/cli/package/src/lib/env.ts diff --git a/cli/src/lib/execPromise.ts b/packages/cli/package/src/lib/execPromise.ts similarity index 100% rename from cli/src/lib/execPromise.ts rename to packages/cli/package/src/lib/execPromise.ts diff --git a/cli/src/lib/generateNewModule.ts b/packages/cli/package/src/lib/generateNewModule.ts similarity index 100% rename from cli/src/lib/generateNewModule.ts rename to packages/cli/package/src/lib/generateNewModule.ts diff --git a/cli/src/lib/generateUserProviderConfig.ts b/packages/cli/package/src/lib/generateUserProviderConfig.ts similarity index 100% rename from cli/src/lib/generateUserProviderConfig.ts rename to packages/cli/package/src/lib/generateUserProviderConfig.ts diff --git a/cli/src/lib/helpers/aquaImports.ts b/packages/cli/package/src/lib/helpers/aquaImports.ts similarity index 100% rename from cli/src/lib/helpers/aquaImports.ts rename to packages/cli/package/src/lib/helpers/aquaImports.ts diff --git a/cli/src/lib/helpers/bigintOps.ts b/packages/cli/package/src/lib/helpers/bigintOps.ts similarity index 100% rename from cli/src/lib/helpers/bigintOps.ts rename to packages/cli/package/src/lib/helpers/bigintOps.ts diff --git a/cli/src/lib/helpers/downloadFile.ts b/packages/cli/package/src/lib/helpers/downloadFile.ts similarity index 100% rename from cli/src/lib/helpers/downloadFile.ts rename to packages/cli/package/src/lib/helpers/downloadFile.ts diff --git a/cli/src/lib/helpers/ensureFluenceProject.ts b/packages/cli/package/src/lib/helpers/ensureFluenceProject.ts similarity index 100% rename from cli/src/lib/helpers/ensureFluenceProject.ts rename to packages/cli/package/src/lib/helpers/ensureFluenceProject.ts diff --git a/cli/src/lib/helpers/formatAquaLogs.ts b/packages/cli/package/src/lib/helpers/formatAquaLogs.ts similarity index 100% rename from cli/src/lib/helpers/formatAquaLogs.ts rename to packages/cli/package/src/lib/helpers/formatAquaLogs.ts diff --git a/cli/src/lib/helpers/generateServiceInterface.ts b/packages/cli/package/src/lib/helpers/generateServiceInterface.ts similarity index 100% rename from cli/src/lib/helpers/generateServiceInterface.ts rename to packages/cli/package/src/lib/helpers/generateServiceInterface.ts diff --git a/cli/src/lib/helpers/getIsInteractive.ts b/packages/cli/package/src/lib/helpers/getIsInteractive.ts similarity index 100% rename from cli/src/lib/helpers/getIsInteractive.ts rename to packages/cli/package/src/lib/helpers/getIsInteractive.ts diff --git a/cli/src/lib/helpers/getPeerIdFromSecretKey.ts b/packages/cli/package/src/lib/helpers/getPeerIdFromSecretKey.ts similarity index 100% rename from cli/src/lib/helpers/getPeerIdFromSecretKey.ts rename to packages/cli/package/src/lib/helpers/getPeerIdFromSecretKey.ts diff --git a/cli/src/lib/helpers/jsToAqua.ts b/packages/cli/package/src/lib/helpers/jsToAqua.ts similarity index 100% rename from cli/src/lib/helpers/jsToAqua.ts rename to packages/cli/package/src/lib/helpers/jsToAqua.ts diff --git a/cli/src/lib/helpers/logAndFail.ts b/packages/cli/package/src/lib/helpers/logAndFail.ts similarity index 100% rename from cli/src/lib/helpers/logAndFail.ts rename to packages/cli/package/src/lib/helpers/logAndFail.ts diff --git a/cli/src/lib/helpers/packModule.ts b/packages/cli/package/src/lib/helpers/packModule.ts similarity index 100% rename from cli/src/lib/helpers/packModule.ts rename to packages/cli/package/src/lib/helpers/packModule.ts diff --git a/cli/src/lib/helpers/recursivelyFindFile.ts b/packages/cli/package/src/lib/helpers/recursivelyFindFile.ts similarity index 100% rename from cli/src/lib/helpers/recursivelyFindFile.ts rename to packages/cli/package/src/lib/helpers/recursivelyFindFile.ts diff --git a/cli/src/lib/helpers/serviceConfigToml.ts b/packages/cli/package/src/lib/helpers/serviceConfigToml.ts similarity index 100% rename from cli/src/lib/helpers/serviceConfigToml.ts rename to packages/cli/package/src/lib/helpers/serviceConfigToml.ts diff --git a/cli/src/lib/helpers/spinner.ts b/packages/cli/package/src/lib/helpers/spinner.ts similarity index 100% rename from cli/src/lib/helpers/spinner.ts rename to packages/cli/package/src/lib/helpers/spinner.ts diff --git a/cli/src/lib/helpers/typesafeStringify.ts b/packages/cli/package/src/lib/helpers/typesafeStringify.ts similarity index 100% rename from cli/src/lib/helpers/typesafeStringify.ts rename to packages/cli/package/src/lib/helpers/typesafeStringify.ts diff --git a/cli/src/lib/helpers/utils.ts b/packages/cli/package/src/lib/helpers/utils.ts similarity index 100% rename from cli/src/lib/helpers/utils.ts rename to packages/cli/package/src/lib/helpers/utils.ts diff --git a/cli/src/lib/helpers/validations.ts b/packages/cli/package/src/lib/helpers/validations.ts similarity index 100% rename from cli/src/lib/helpers/validations.ts rename to packages/cli/package/src/lib/helpers/validations.ts diff --git a/cli/src/lib/init.ts b/packages/cli/package/src/lib/init.ts similarity index 100% rename from cli/src/lib/init.ts rename to packages/cli/package/src/lib/init.ts diff --git a/cli/src/lib/jsClient.ts b/packages/cli/package/src/lib/jsClient.ts similarity index 100% rename from cli/src/lib/jsClient.ts rename to packages/cli/package/src/lib/jsClient.ts diff --git a/cli/src/lib/keyPairs.ts b/packages/cli/package/src/lib/keyPairs.ts similarity index 100% rename from cli/src/lib/keyPairs.ts rename to packages/cli/package/src/lib/keyPairs.ts diff --git a/cli/src/lib/lifeCycle.ts b/packages/cli/package/src/lib/lifeCycle.ts similarity index 100% rename from cli/src/lib/lifeCycle.ts rename to packages/cli/package/src/lib/lifeCycle.ts diff --git a/cli/src/lib/localServices/ipfs.ts b/packages/cli/package/src/lib/localServices/ipfs.ts similarity index 100% rename from cli/src/lib/localServices/ipfs.ts rename to packages/cli/package/src/lib/localServices/ipfs.ts diff --git a/cli/src/lib/marineCli.ts b/packages/cli/package/src/lib/marineCli.ts similarity index 100% rename from cli/src/lib/marineCli.ts rename to packages/cli/package/src/lib/marineCli.ts diff --git a/cli/src/lib/multiaddres.ts b/packages/cli/package/src/lib/multiaddres.ts similarity index 100% rename from cli/src/lib/multiaddres.ts rename to packages/cli/package/src/lib/multiaddres.ts diff --git a/cli/src/lib/multiaddresWithoutLocal.ts b/packages/cli/package/src/lib/multiaddresWithoutLocal.ts similarity index 100% rename from cli/src/lib/multiaddresWithoutLocal.ts rename to packages/cli/package/src/lib/multiaddresWithoutLocal.ts diff --git a/cli/src/lib/npm.ts b/packages/cli/package/src/lib/npm.ts similarity index 100% rename from cli/src/lib/npm.ts rename to packages/cli/package/src/lib/npm.ts diff --git a/cli/src/lib/paths.ts b/packages/cli/package/src/lib/paths.ts similarity index 100% rename from cli/src/lib/paths.ts rename to packages/cli/package/src/lib/paths.ts diff --git a/cli/src/lib/prompt.ts b/packages/cli/package/src/lib/prompt.ts similarity index 100% rename from cli/src/lib/prompt.ts rename to packages/cli/package/src/lib/prompt.ts diff --git a/cli/src/lib/resolveComputePeersByNames.ts b/packages/cli/package/src/lib/resolveComputePeersByNames.ts similarity index 100% rename from cli/src/lib/resolveComputePeersByNames.ts rename to packages/cli/package/src/lib/resolveComputePeersByNames.ts diff --git a/cli/src/lib/resolveFluenceEnv.ts b/packages/cli/package/src/lib/resolveFluenceEnv.ts similarity index 100% rename from cli/src/lib/resolveFluenceEnv.ts rename to packages/cli/package/src/lib/resolveFluenceEnv.ts diff --git a/cli/src/lib/rust.ts b/packages/cli/package/src/lib/rust.ts similarity index 100% rename from cli/src/lib/rust.ts rename to packages/cli/package/src/lib/rust.ts diff --git a/cli/src/lib/server.ts b/packages/cli/package/src/lib/server.ts similarity index 100% rename from cli/src/lib/server.ts rename to packages/cli/package/src/lib/server.ts diff --git a/cli/src/lib/setupEnvironment.ts b/packages/cli/package/src/lib/setupEnvironment.ts similarity index 100% rename from cli/src/lib/setupEnvironment.ts rename to packages/cli/package/src/lib/setupEnvironment.ts diff --git a/cli/src/lib/typeHelpers.ts b/packages/cli/package/src/lib/typeHelpers.ts similarity index 100% rename from cli/src/lib/typeHelpers.ts rename to packages/cli/package/src/lib/typeHelpers.ts diff --git a/cli/src/types.d.ts b/packages/cli/package/src/types.d.ts similarity index 100% rename from cli/src/types.d.ts rename to packages/cli/package/src/types.d.ts diff --git a/cli/src/versions.json b/packages/cli/package/src/versions.json similarity index 100% rename from cli/src/versions.json rename to packages/cli/package/src/versions.json diff --git a/cli/src/versions.ts b/packages/cli/package/src/versions.ts similarity index 100% rename from cli/src/versions.ts rename to packages/cli/package/src/versions.ts diff --git a/cli/test/_resources/aqua/getSpellLogs.aqua b/packages/cli/package/test/_resources/aqua/getSpellLogs.aqua similarity index 100% rename from cli/test/_resources/aqua/getSpellLogs.aqua rename to packages/cli/package/test/_resources/aqua/getSpellLogs.aqua diff --git a/cli/test/_resources/aqua/runDeployedWorkers.aqua b/packages/cli/package/test/_resources/aqua/runDeployedWorkers.aqua similarity index 100% rename from cli/test/_resources/aqua/runDeployedWorkers.aqua rename to packages/cli/package/test/_resources/aqua/runDeployedWorkers.aqua diff --git a/cli/test/_resources/aqua/smoke.aqua b/packages/cli/package/test/_resources/aqua/smoke.aqua similarity index 100% rename from cli/test/_resources/aqua/smoke.aqua rename to packages/cli/package/test/_resources/aqua/smoke.aqua diff --git a/cli/test/helpers/commonWithSetupTests.ts b/packages/cli/package/test/helpers/commonWithSetupTests.ts similarity index 100% rename from cli/test/helpers/commonWithSetupTests.ts rename to packages/cli/package/test/helpers/commonWithSetupTests.ts diff --git a/cli/test/helpers/constants.ts b/packages/cli/package/test/helpers/constants.ts similarity index 100% rename from cli/test/helpers/constants.ts rename to packages/cli/package/test/helpers/constants.ts diff --git a/cli/test/helpers/localNetAccounts.ts b/packages/cli/package/test/helpers/localNetAccounts.ts similarity index 100% rename from cli/test/helpers/localNetAccounts.ts rename to packages/cli/package/test/helpers/localNetAccounts.ts diff --git a/cli/test/helpers/paths.ts b/packages/cli/package/test/helpers/paths.ts similarity index 100% rename from cli/test/helpers/paths.ts rename to packages/cli/package/test/helpers/paths.ts diff --git a/cli/test/helpers/sharedSteps.ts b/packages/cli/package/test/helpers/sharedSteps.ts similarity index 100% rename from cli/test/helpers/sharedSteps.ts rename to packages/cli/package/test/helpers/sharedSteps.ts diff --git a/cli/test/helpers/utils.ts b/packages/cli/package/test/helpers/utils.ts similarity index 100% rename from cli/test/helpers/utils.ts rename to packages/cli/package/test/helpers/utils.ts diff --git a/cli/test/setup/downloadMarineAndMrepl.ts b/packages/cli/package/test/setup/downloadMarineAndMrepl.ts similarity index 100% rename from cli/test/setup/downloadMarineAndMrepl.ts rename to packages/cli/package/test/setup/downloadMarineAndMrepl.ts diff --git a/cli/test/setup/generateTemplates.ts b/packages/cli/package/test/setup/generateTemplates.ts similarity index 100% rename from cli/test/setup/generateTemplates.ts rename to packages/cli/package/test/setup/generateTemplates.ts diff --git a/cli/test/setup/localUp.ts b/packages/cli/package/test/setup/localUp.ts similarity index 100% rename from cli/test/setup/localUp.ts rename to packages/cli/package/test/setup/localUp.ts diff --git a/cli/test/tests/__snapshots__/jsToAqua.test.ts.snap b/packages/cli/package/test/tests/__snapshots__/jsToAqua.test.ts.snap similarity index 100% rename from cli/test/tests/__snapshots__/jsToAqua.test.ts.snap rename to packages/cli/package/test/tests/__snapshots__/jsToAqua.test.ts.snap diff --git a/cli/test/tests/deal/dealDeploy.test.ts b/packages/cli/package/test/tests/deal/dealDeploy.test.ts similarity index 100% rename from cli/test/tests/deal/dealDeploy.test.ts rename to packages/cli/package/test/tests/deal/dealDeploy.test.ts diff --git a/cli/test/tests/deal/dealUpdate.test.ts b/packages/cli/package/test/tests/deal/dealUpdate.test.ts similarity index 100% rename from cli/test/tests/deal/dealUpdate.test.ts rename to packages/cli/package/test/tests/deal/dealUpdate.test.ts diff --git a/cli/test/tests/jsToAqua.test.ts b/packages/cli/package/test/tests/jsToAqua.test.ts similarity index 100% rename from cli/test/tests/jsToAqua.test.ts rename to packages/cli/package/test/tests/jsToAqua.test.ts diff --git a/cli/test/tests/provider.test.ts b/packages/cli/package/test/tests/provider.test.ts similarity index 100% rename from cli/test/tests/provider.test.ts rename to packages/cli/package/test/tests/provider.test.ts diff --git a/cli/test/tests/smoke.test.ts b/packages/cli/package/test/tests/smoke.test.ts similarity index 100% rename from cli/test/tests/smoke.test.ts rename to packages/cli/package/test/tests/smoke.test.ts diff --git a/cli/test/tsconfig.json b/packages/cli/package/test/tsconfig.json similarity index 100% rename from cli/test/tsconfig.json rename to packages/cli/package/test/tsconfig.json diff --git a/cli/test/validators/ajvOptions.ts b/packages/cli/package/test/validators/ajvOptions.ts similarity index 100% rename from cli/test/validators/ajvOptions.ts rename to packages/cli/package/test/validators/ajvOptions.ts diff --git a/cli/test/validators/deployedServicesAnswerValidator.ts b/packages/cli/package/test/validators/deployedServicesAnswerValidator.ts similarity index 100% rename from cli/test/validators/deployedServicesAnswerValidator.ts rename to packages/cli/package/test/validators/deployedServicesAnswerValidator.ts diff --git a/cli/test/validators/spellLogsValidator.ts b/packages/cli/package/test/validators/spellLogsValidator.ts similarity index 100% rename from cli/test/validators/spellLogsValidator.ts rename to packages/cli/package/test/validators/spellLogsValidator.ts diff --git a/cli/test/validators/workerServiceValidator.ts b/packages/cli/package/test/validators/workerServiceValidator.ts similarity index 100% rename from cli/test/validators/workerServiceValidator.ts rename to packages/cli/package/test/validators/workerServiceValidator.ts diff --git a/cli/tmp/cache/18.20.3/SHASUMS256.txt.asc b/packages/cli/package/tmp/cache/18.20.3/SHASUMS256.txt.asc similarity index 100% rename from cli/tmp/cache/18.20.3/SHASUMS256.txt.asc rename to packages/cli/package/tmp/cache/18.20.3/SHASUMS256.txt.asc diff --git a/cli/tsconfig.eslint.json b/packages/cli/package/tsconfig.eslint.json similarity index 100% rename from cli/tsconfig.eslint.json rename to packages/cli/package/tsconfig.eslint.json diff --git a/cli/tsconfig.json b/packages/cli/package/tsconfig.json similarity index 100% rename from cli/tsconfig.json rename to packages/cli/package/tsconfig.json diff --git a/cli/vitest.config.ts b/packages/cli/package/vitest.config.ts similarity index 100% rename from cli/vitest.config.ts rename to packages/cli/package/vitest.config.ts diff --git a/cli/yarn.lock b/packages/cli/package/yarn.lock similarity index 100% rename from cli/yarn.lock rename to packages/cli/package/yarn.lock diff --git a/packages/common/package.json b/packages/common/package.json index f5c86ddac..c213f320f 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -19,10 +19,8 @@ "lint-fix": "eslint . --fix", "on-each-commit": "yarn lint-fix" }, - "dependencies": { - "@total-typescript/ts-reset": "0.5.1" - }, "devDependencies": { + "@total-typescript/ts-reset": "0.5.1", "@tsconfig/strictest": "2.0.5", "eslint": "9.3.0", "ethers": "6.7.1", diff --git a/turbo.json b/turbo.json index 897f60761..fc743d34d 100644 --- a/turbo.json +++ b/turbo.json @@ -1,58 +1,66 @@ { "$schema": "https://turbo.build/schema.json", "tasks": { - "build": { - "outputs": [ - "dist/**", - "src/aqua-dependencies/**", - "src/cli-aqua-dependencies/**", - "src/lib/compiled-aqua/**", - "src/lib/compiled-aqua-with-tracing/**", - "src/versions/**" + "install-yarn-dependencies": { + "inputs": [ + "package/package.json", + "package/yarn.lock", + "package/.yarnrc.yml" ], - "inputs": ["bin/**", "src/**", "package.json", "tsconfig.json"], - "dependsOn": ["^build"] + "outputs": ["package/node_modules/**"] }, - "on-each-commit": { + "install-npm-dependencies": { + "inputs": [ + "package/src/cli-aqua-dependencies/package.json", + "package/src/cli-aqua-dependencies/package-lock.json" + ], + "outputs": ["package/src/cli-aqua-dependencies/node_modules/**"] + }, + "before-build": { + "dependsOn": [ + "install-yarn-dependencies", + "install-npm-dependencies", + "^build" + ], "inputs": [ - "bin/**", - "src/**", - "package.json", - "tsconfig.json", - "eslint.config.js" + "package/src/beforeBuild.ts", + "package/src/versions.json", + "package/src/versions.ts" ], + "outputs": [ + "package/src/lib/compiled-aqua/**", + "package/src/lib/compiled-aqua-with-tracing/**", + "package/src/aqua-dependencies/**", + "package/src/versions/**", + "package/src/common.ts" + ] + }, + "build": { + "dependsOn": ["^build", "before-build"], + "outputs": ["dist/**", "package/dist/**"] + }, + "on-each-commit": { "dependsOn": ["^build", "build"] }, "pack-ci": { - "outputs": ["dist/**"], - "inputs": ["bin/**", "src/**", "package.json", "tsconfig.json"], - "dependsOn": ["build"] + "dependsOn": ["build"], + "outputs": ["package/dist/**"] }, "pack-linux-x64": { - "outputs": ["dist/**"], - "inputs": ["bin/**", "src/**", "package.json", "tsconfig.json"], - "dependsOn": ["build"] + "dependsOn": ["build"], + "outputs": ["package/dist/**"] }, "pack-darwin-x64": { - "outputs": ["dist/**"], - "inputs": ["bin/**", "src/**", "package.json", "tsconfig.json"], - "dependsOn": ["build"] + "dependsOn": ["build"], + "outputs": ["package/dist/**"] }, "pack-darwin-arm64": { - "outputs": ["dist/**"], - "inputs": ["bin/**", "src/**", "package.json", "tsconfig.json"], - "dependsOn": ["build"] + "dependsOn": ["build"], + "outputs": ["package/dist/**"] }, "pack-win32-x64": { - "outputs": ["dist/**"], - "inputs": [ - "bin/**", - "src/**", - "package.json", - "tsconfig.json", - "nsis/**" - ], - "dependsOn": ["build"] + "dependsOn": ["build"], + "outputs": ["package/dist/**"] } } } diff --git a/yarn.lock b/yarn.lock index 3b569423e..6f57dad6f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -990,7 +990,7 @@ __metadata: languageName: node linkType: hard -"@repo/cli-connector@workspace:packages/cli-connector": +"@repo/cli-connector@npm:*, @repo/cli-connector@workspace:packages/cli-connector": version: 0.0.0-use.local resolution: "@repo/cli-connector@workspace:packages/cli-connector" dependencies: @@ -1019,6 +1019,15 @@ __metadata: languageName: unknown linkType: soft +"@repo/cli@workspace:packages/cli": + version: 0.0.0-use.local + resolution: "@repo/cli@workspace:packages/cli" + dependencies: + "@repo/cli-connector": "npm:*" + "@repo/common": "npm:*" + languageName: unknown + linkType: soft + "@repo/common@npm:*, @repo/common@workspace:packages/common": version: 0.0.0-use.local resolution: "@repo/common@workspace:packages/common"