@alicloud/tea-util
Advanced tools
Comparing version 1.2.2 to 1.2.3
@@ -0,2 +1,5 @@ | ||
2020-03-03 Version: 1.2.3 | ||
1. Release version 1.2.3 | ||
2020-02-10 Version: 1.0.0 | ||
1. Release version 1.0.0 |
@@ -56,2 +56,3 @@ /// <reference types="node" /> | ||
}; | ||
static getUserAgent(userAgent: string): string; | ||
} |
@@ -16,2 +16,4 @@ "use strict"; | ||
const querystring_1 = __importDefault(require("querystring")); | ||
const os_1 = require("os"); | ||
const DEFAULT_USER_AGENT = `AlibabaCloud (${os_1.platform()}; ${os_1.arch()}) Node.js/${process.version} Core/1.0.1 TeaDSL/1`; | ||
class RuntimeOptions extends $tea.Model { | ||
@@ -172,4 +174,10 @@ constructor(map) { | ||
} | ||
static getUserAgent(userAgent) { | ||
if (!userAgent || !userAgent.length) { | ||
return DEFAULT_USER_AGENT; | ||
} | ||
return DEFAULT_USER_AGENT + " " + userAgent; | ||
} | ||
} | ||
exports.default = Client; | ||
//# sourceMappingURL=client.js.map |
{ | ||
"name": "@alicloud/tea-util", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "", | ||
@@ -13,3 +13,3 @@ "main": "dist/client.js", | ||
"author": "Jackson Tian", | ||
"license": "ISC", | ||
"license": "Apache-2.0", | ||
"devDependencies": { | ||
@@ -16,0 +16,0 @@ "@types/mocha": "^7.0.1", |
@@ -5,2 +5,4 @@ import { Readable } from 'stream'; | ||
import querystring from 'querystring'; | ||
import { platform, arch } from 'os'; | ||
const DEFAULT_USER_AGENT = `AlibabaCloud (${platform()}; ${arch()}) Node.js/${process.version} Core/1.0.1 TeaDSL/1`; | ||
@@ -205,2 +207,9 @@ export class RuntimeOptions extends $tea.Model { | ||
} | ||
static getUserAgent(userAgent: string): string { | ||
if(!userAgent || !userAgent.length){ | ||
return DEFAULT_USER_AGENT; | ||
} | ||
return DEFAULT_USER_AGENT + " " + userAgent; | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18509
415