Skip to main content

@ewam/cli

Installation

info

@ewam/cli is installed by default with your dev environment

If you need to add it manually: npm i @ewam/cli

"scripts": {
"ewam-cli": "ewam-cli"
}

Usage

Via npm script

  • npm run ewam:cli -- --ui => Interactive version
  • npm run ewam:cli -- --import ./src/wam-cloud
  • npm run ewam:cli -- --import ./export/aWAMContainer[toReport] --debug --origin ./feature/origin --rb
  • npm run ewam:cli -- --export aDeliveriesBundlePreparer[WFBS_BusinessService] --ef ./export/test2
  • npm run ewam:cli -- --browse /

Via a bat file

cli.bat
SET PATH=%PATH%;%~dp0node_modules/.bin

ewam-cli --import-folder ./src/wamcloud

CLI Arguments

Usage: <command> [options]

Commands:
cli.js npx @ewam/cli ewam cli

Options:
--version Show version number [boolean]
--interactive, --ui Use interactive mode [boolean]
--restore-backup, --rb Restore backed up tgvs before starting
operation [boolean] [default: false]
--import-folder, --import Import folder [string]
--import-origin, --origin Import folder origin : this will complete a
rebase from a given folder [string]
--mirror Git Mirroring [boolean] [default: false]
--mirror-size Log history size [number] [default: 10]
--export Export given entity [string] [default: ""]
--export-folder, --ef Folder to use for the export
[string] [default: "./export"]
--debug Debug trace [boolean] [default: false]
--browse Browse the virtual file system [string]
--format Console output format
[string] [choices: "table", "json"] [default: "table"]
--run Execute a method (className.methodName)[string]
--use-exit-code Execute method as exit code, an integer is
expected [boolean] [default: false]
--args Additional runtime arguments that we be passed
to ide [string]
--port Port to use to run the ide
[number] [default: 9966]
--export-format, --efo Format to specify how to export the entity:
- wam Gold or serialization
- doc Generate the documentation .md
- scenarios Scenarios and agents in wam format
- schema Schema in .json
[array] [choices: "wam", "doc", "scenarios", "schema", "agents"] [default:
"wam"]
-h Show help [boolean]

Limitations

Known limitations for import

The source code may not parse depending on the order the files are processed. For source code, 2 tries will be done => inter-class dependencies are not supported (A <-> B).

Example:

aClassDef[aTestImport]/index.wam will work
; aTestImport (aLightObject) (Def Version:2) (Implem Version:2)

class aTestImport (aLightObject)

function test(argument1: int4, argument2: int4, argument3: int4, argument4: int4) return CString
return '1.0.0'
endFunc