diff --git a/package.json b/package.json index e092a261..14a6b4eb 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "eslint-plugin-jest": "^29.0.0", "eslint-plugin-jsdoc": "^48.11.0", "execa": "^4.0.0", - "jest": "^29.6.2", + "jest": "^29.7.0", "jest-junit": "^16.0.0", "neostandard": "^0", "oclif": "^4.0.0", diff --git a/src/RuntimeBaseCommand.js b/src/RuntimeBaseCommand.js index 70189ebd..5eb73e9b 100644 --- a/src/RuntimeBaseCommand.js +++ b/src/RuntimeBaseCommand.js @@ -85,6 +85,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) {