Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@adobe/aio-lib-core-config": "^5",
"@adobe/aio-lib-core-networking": "^5",
"@adobe/aio-lib-runtime": "^6",
"@oclif/core": "^1.3.0",
"@oclif/core": "^2.16.0",
"@types/jest": "^29.5.3",
"chalk": "^4.1.2",
"dayjs": "^1.10.4",
Expand Down Expand Up @@ -42,7 +42,7 @@
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.1.1",
"execa": "^4.0.0",
"jest": "^29.6.2",
"jest": "^29.7.0",
"jest-junit": "^16.0.0",
"jest-plugin-fs": "^2.9.0",
"oclif": "^3.2.0",
Expand Down
9 changes: 9 additions & 0 deletions src/RuntimeBaseCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,15 @@ class RuntimeBaseCommand extends Command {
} else if (flags.debug) {
createDebug.enable(flags.debug)
}

// set User-Agent for runtime calls
// ex. aio-cli-plugin-runtime/@adobe/aio-cli/10.3.1 (darwin-arm64; node-v18.20.4; zsh)
const vs = this.config.versionDetails
// console.log('init ', this.config.versionDetails)
process.env.__OW_USER_AGENT =
`aio-cli-plugin-runtime/${vs?.cliVersion} (${vs?.architecture}; ${vs?.nodeVersion}; ${vs?.shell})`

console.log('init ', process.env.__OW_USER_AGENT)
}

async handleError (msg, err) {
Expand Down
4 changes: 2 additions & 2 deletions src/commands/runtime/action/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ governing permissions and limitations under the License.
const moment = require('dayjs')
const RuntimeBaseCommand = require('../../../RuntimeBaseCommand')
const { parsePackageName } = require('@adobe/aio-lib-runtime').utils
const { Flags, CliUx: cli } = require('@oclif/core')
const { Flags, ux } = require('@oclif/core')
const decorators = require('../../../decorators').decorators()

class ActionList extends RuntimeBaseCommand {
Expand Down Expand Up @@ -86,7 +86,7 @@ class ActionList extends RuntimeBaseCommand {
}
}
}
cli.ux.table(result, columns)
ux.table(result, columns)
}
} catch (err) {
await this.handleError('failed to list the actions', err)
Expand Down
4 changes: 2 additions & 2 deletions src/commands/runtime/activation/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ governing permissions and limitations under the License.

const moment = require('dayjs')
const RuntimeBaseCommand = require('../../../RuntimeBaseCommand')
const { Flags, CliUx: cli } = require('@oclif/core')
const { Flags, ux } = require('@oclif/core')
const decorators = require('../../../decorators').decorators()
const statusStrings = ['success', 'app error', 'dev error', 'sys error']

Expand Down Expand Up @@ -187,7 +187,7 @@ class ActivationList extends RuntimeBaseCommand {
}
}
if (listActivation) {
cli.ux.table(listActivation, columns, {
ux.table(listActivation, columns, {
'no-truncate': true
})
}
Expand Down