- Have the axway and axway central cli already installed
npm install -g axway
axway pm install @axway/axway-central-cli
- Link your new/current extension to the central CLI
axway central config set extensions.<extension name> <path to the directory of your extension>
-
Under src/commands/config/set.ts add/remove any config options you want.
-
Under types.ts add/remove the corresponding config options to the ConfigKeys object. The formatting really seems to matter here.
Example: adding 'mySetting'
// set.ts
--my-setting [value]": "my setting"
// types.ts
MY_SETTING = "mySetting"
Under src/commands/resources/generate.ts is where you add/shoehorn the generate logic. We currently have this flow.
-
Get/validate the config
-
Fetch the apis from service
-
Create the files
There are several ways you can debug a new/current extension. Several extensions come with a launch file you can use to debug in vscode. Alternatively, you can use the below method:
-
Add your breakpoints with 'debugger' statements
-
Modify the axway cli
// get path to cli
which axway
// add debug setting to node
vim <path to cli>
#!/usr/bin/env node --inspect-brk
- Open this uri in chrome
chrome://inspect
-
click 'Open dedicated DevTools for Node'
-
Run the CLI command you're debugging
axway central azure-extension config list
-
Azure list config
axway central azure-extension config list
-
Azure set tenantid
axway central azure-extension config set --tenant-id=<tenant>
-
Azure generate resources
axway central azure-extension resources generate