diff --git a/src/generated/configuration.ts b/src/generated/configuration.ts index e0b6641..a58894b 100644 --- a/src/generated/configuration.ts +++ b/src/generated/configuration.ts @@ -6,6 +6,8 @@ * Do not edit the class manually. */ +const packageJson = require("../../package.json"); + export interface ConfigurationParameters { apiKey?: | string @@ -60,7 +62,7 @@ export class Configuration { if (!this.baseOptions) this.baseOptions = {}; if (!this.baseOptions.headers) this.baseOptions.headers = {}; this.baseOptions.headers = { - ["User-Agent"]: `CircleNodeJs/1.2.0`, + ["User-Agent"]: `CircleNodeJs/${packageJson.version}`, ...this.baseOptions.headers }; } diff --git a/templates/typescript-axios/configuration.mustache b/templates/typescript-axios/configuration.mustache index 4cbadce..4f8b8b9 100644 --- a/templates/typescript-axios/configuration.mustache +++ b/templates/typescript-axios/configuration.mustache @@ -1,6 +1,7 @@ /* tslint:disable */ /* eslint-disable */ {{>licenseInfo}} +const packageJson = require('../../package.json') export interface ConfigurationParameters { apiKey?: string | Promise | ((name: string) => string) | ((name: string) => Promise); @@ -49,7 +50,7 @@ export class Configuration { if (!this.baseOptions) this.baseOptions = {}; if (!this.baseOptions.headers) this.baseOptions.headers = {}; this.baseOptions.headers = { - ['User-Agent']: `CircleNodeJs/{{npmVersion}}`, + ['User-Agent']: `CircleNodeJs/${packageJson.version}`, ...this.baseOptions.headers, } }