Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@azure-rest/ai-translation-text

Package Overview
Dependencies
Maintainers
1
Versions
151
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure-rest/ai-translation-text - npm Package Compare versions

Comparing version 1.0.0-alpha.20240115.1 to 1.0.0-alpha.20240117.1

14

dist-esm/src/customClient.js

@@ -11,6 +11,6 @@ // Copyright (c) Microsoft Corporation.

function isKeyCredential(credential) {
return credential?.key !== undefined;
return (credential === null || credential === void 0 ? void 0 : credential.key) !== undefined;
}
function isTranslatorKeyCredential(credential) {
return credential?.key !== undefined;
return (credential === null || credential === void 0 ? void 0 : credential.key) !== undefined;
}

@@ -41,2 +41,3 @@ /** Policy that sets the api-version (or equivalent) to reflect the library version. */

export default function createClient(endpoint, credential = undefined, options = {}) {
var _a;
let serviceEndpoint;

@@ -52,3 +53,3 @@ if (!endpoint) {

}
const baseUrl = options.baseUrl ?? `${serviceEndpoint}`;
const baseUrl = (_a = options.baseUrl) !== null && _a !== void 0 ? _a : `${serviceEndpoint}`;
const userAgentInfo = `azsdk-js-ai-translation-text-rest/1.0.0-beta.2`;

@@ -58,8 +59,5 @@ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix

: `${userAgentInfo}`;
options = {
...options,
userAgentOptions: {
options = Object.assign(Object.assign({}, options), { userAgentOptions: {
userAgentPrefix,
},
};
} });
const client = getClient(baseUrl, options);

@@ -66,0 +64,0 @@ client.pipeline.addPolicy(apiVersionPolicy);

@@ -13,3 +13,3 @@ // Copyright (c) Microsoft Corporation.

const lroOriginal = response.headers["x-ms-original-url"];
const url = new URL(lroOriginal ?? response.request.url);
const url = new URL(lroOriginal !== null && lroOriginal !== void 0 ? lroOriginal : response.request.url);
const method = response.request.method;

@@ -16,0 +16,0 @@ const pathDetails = responseMap[`${method} ${url.pathname}`];

@@ -60,6 +60,6 @@ 'use strict';

function isKeyCredential(credential) {
return credential?.key !== undefined;
return (credential === null || credential === void 0 ? void 0 : credential.key) !== undefined;
}
function isTranslatorKeyCredential(credential) {
return credential?.key !== undefined;
return (credential === null || credential === void 0 ? void 0 : credential.key) !== undefined;
}

@@ -90,2 +90,3 @@ /** Policy that sets the api-version (or equivalent) to reflect the library version. */

function createClient(endpoint, credential = undefined, options = {}) {
var _a;
let serviceEndpoint;

@@ -101,3 +102,3 @@ if (!endpoint) {

}
const baseUrl = options.baseUrl ?? `${serviceEndpoint}`;
const baseUrl = (_a = options.baseUrl) !== null && _a !== void 0 ? _a : `${serviceEndpoint}`;
const userAgentInfo = `azsdk-js-ai-translation-text-rest/1.0.0-beta.2`;

@@ -107,8 +108,5 @@ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix

: `${userAgentInfo}`;
options = {
...options,
userAgentOptions: {
options = Object.assign(Object.assign({}, options), { userAgentOptions: {
userAgentPrefix,
},
};
} });
const client = coreClient.getClient(baseUrl, options);

@@ -145,3 +143,3 @@ client.pipeline.addPolicy(apiVersionPolicy);

const lroOriginal = response.headers["x-ms-original-url"];
const url = new URL(lroOriginal ?? response.request.url);
const url = new URL(lroOriginal !== null && lroOriginal !== void 0 ? lroOriginal : response.request.url);
const method = response.request.method;

@@ -148,0 +146,0 @@ const pathDetails = responseMap[`${method} ${url.pathname}`];

@@ -5,3 +5,3 @@ {

"author": "Microsoft Corporation",
"version": "1.0.0-alpha.20240115.1",
"version": "1.0.0-alpha.20240117.1",
"description": "An isomorphic client library for the Azure Cognitive Translator Service",

@@ -8,0 +8,0 @@ "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/translation/ai-translation-text-rest/README.md",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc