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

@azure-tools/rlc-common

Package Overview
Dependencies
Maintainers
1
Versions
386
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure-tools/rlc-common - npm Package Compare versions

Comparing version 1.0.0-alpha.7.20221226.1 to 1.0.0-alpha.8.20230109.1

10

.rush/temp/package-deps_build.json

@@ -7,8 +7,8 @@ {

"packages/rlc-common/.prettierrc": "83e03202b2f3ad5b8df166a965fea698eccb0f90",
"packages/rlc-common/CHANGELOG.md": "258096c36ecf0a635156f622698d3daea32cbf82",
"packages/rlc-common/CHANGELOG.md": "e8baef79074dec770e997c63b63cb723482ba776",
"packages/rlc-common/CONTRIBUTING.md": "e49bf8e171df33db3fbd8fde003be18e1b85c412",
"packages/rlc-common/README.md": "4089f33033d3351a176a9d9c6dcaff93cbe9514d",
"packages/rlc-common/package.json": "d07fb6bbf9c9e362959c4b19a252442e7b5cb180",
"packages/rlc-common/package.json": "e06f3b9b1ffade94a0d4d4e5955c25552751276c",
"packages/rlc-common/publishPackage.js": "3512e26d1199937b1962f3b4189aa9c506d9da1a",
"packages/rlc-common/src/buildClient.ts": "3e5633597e96f08e166414512c025e7cbd1aaca2",
"packages/rlc-common/src/buildClient.ts": "0c3122bc6173af28da228d42b663f8cf7e3365af",
"packages/rlc-common/src/buildClientDefinitions.ts": "9b497bd2683f45fb342f3d92ad885c8eed1576d8",

@@ -27,3 +27,3 @@ "packages/rlc-common/src/buildIndexFile.ts": "51d58678165108fc34e3e3a9fa23e6ec1f7be7a1",

"packages/rlc-common/src/helpers/nameUtils.ts": "bf86e9989a525846deee1389602a42f33bf525f6",
"packages/rlc-common/src/helpers/operationHelpers.ts": "5625d4411a0c2baf9cb7dd37e9641f732cf96e81",
"packages/rlc-common/src/helpers/operationHelpers.ts": "549c33986fbc227b66953aacdd59d3e7ec32b3d5",
"packages/rlc-common/src/helpers/schemaHelpers.ts": "722c52837218b8cfafdc36fe29e675e0df4acb09",

@@ -36,3 +36,3 @@ "packages/rlc-common/src/helpers/shortcutMethods.ts": "cd52b21e05192c7b3fce3ff26eae2ac03ab62679",

"packages/rlc-common/src/metadata/buildLicenseFile.ts": "ce4083770e48d3b0dd670f7efc324a7fed10dac4",
"packages/rlc-common/src/metadata/buildPackageFile.ts": "a7767fb2d66a810f26ded45c6a0812927e733a38",
"packages/rlc-common/src/metadata/buildPackageFile.ts": "11963f7add3bfedce9cfd0233c2bcb469a9f9caf",
"packages/rlc-common/src/metadata/buildReadmeFile.ts": "649510f75d04ba8438202b92b83a56d3d3206efe",

@@ -39,0 +39,0 @@ "packages/rlc-common/src/metadata/buildRollupConfig.ts": "56a0ac2b69266d8a3192981abc4c09fcde444634",

@@ -0,5 +1,10 @@

## 1.0.0-beta.8 (2023-01-09)
- [Feature] Normalize parameter in host template and path uri, Please refer to pr [#1714](https://github.com/Azure/autorest.typescript/pull/1714).
- [BugFix] Fix a few minor issues. Please refer to pr [#1715](https://github.com/Azure/autorest.typescript/pull/1715) for more details.
## 1.0.0-beta.7 (2022-12-21)
- [Feature] Support cadl compiler 0.38.0, Please refer to issue [#1704](https://github.com/Azure/autorest.typescript/pull/1704).
- [BugFix] Fix a few minor issues. Please refer to issue [#1700](https://github.com/Azure/autorest.typescript/pull/1700) for more details.
- [Feature] Support cadl compiler 0.38.0, Please refer to issue [#1704](https://github.com/Azure/autorest.typescript/pull/1704).
- [BugFix] Fix a few minor issues. Please refer to issue [#1700](https://github.com/Azure/autorest.typescript/pull/1700) for more details.

@@ -6,0 +11,0 @@ ## 1.0.0-beta.6 (2022-12-14)

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

: `${clientName}Client`;
normalizeUrlInfo(model);
const urlParameters = model?.urlInfo?.urlParameters?.filter(

@@ -146,3 +147,3 @@ // Do not include parameters with constant values in the signature, these should go in the options bag

}
const apiVersion = getApiVersion(model);
const apiVersion = getApiVersionInQueryParam(model);
let apiVersionStatement = "";

@@ -221,3 +222,3 @@ if (apiVersion) {

}
function getApiVersion(model) {
function getApiVersionInQueryParam(model) {
if (!model.apiVersionInQueryParam) {

@@ -232,2 +233,22 @@ return undefined;

}
function normalizeUrlInfo(model) {
if (!model ||
!model.urlInfo ||
!model.urlInfo.endpoint ||
!model.urlInfo.urlParameters ||
model.urlInfo.urlParameters.length === 0) {
return;
}
let parsedEndpoint = model.urlInfo.endpoint;
const urlParameters = model.urlInfo.urlParameters;
urlParameters.forEach((urlParameter) => {
const name = urlParameter.name;
const normalizedName = normalizeName(name, NameType.Parameter);
if (name !== normalizedName) {
urlParameter.name = normalizedName;
parsedEndpoint = parsedEndpoint.replace(`{${name}}`, `{${normalizedName}}`);
}
});
model.urlInfo.endpoint = parsedEndpoint;
}
//# sourceMappingURL=buildClient.js.map
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { SchemaContext } from "../interfaces.js";
import { pascalCase } from "./nameUtils.js";
import { NameType, normalizeName, pascalCase } from "./nameUtils.js";
import { isObjectSchema } from "./schemaHelpers.js";

@@ -33,3 +33,3 @@ export function buildMethodDefinitions(methods, pathParams = []) {

return {
name,
name: normalizeName(name, NameType.Parameter),
type,

@@ -36,0 +36,0 @@ description

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

packageInfo.devDependencies["karma"] = "^6.2.0";
packageInfo.devDependencies["nyc"] = "^14.0.0";
packageInfo.devDependencies["nyc"] = "^15.0.0";
packageInfo.devDependencies["source-map-support"] = "^0.5.9";

@@ -187,0 +187,0 @@ packageInfo.scripts["test"] =

@@ -1,1 +0,1 @@

{"name":"@azure-tools/rlc-common","version":"1.0.0-beta.7","description":"","type":"module","main":"dist/index.js","module":"dist-esm/index.js","exports":{".":{"types":"./types/index.d.ts","require":"./dist/index.js","import":"./dist-esm/index.js"}},"types":"./types/index.d.ts","scripts":{"lint":"eslint src --ext .ts --max-warnings=0","lint:fix":"eslint src --fix --ext .ts","format":"npm run -s prettier -- --write","check-format":"npm run prettier -- --check","prettier":"prettier --config ./.prettierrc src/**/*.ts","build":"rimraf dist/* dist-esm/* types/* && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json && node publishPackage.js","build:cjs":"rimraf dist/* dist-esm/* types/* && tsc -p tsconfig-cjs.json && node publishPackage.js","build:esm":"rimraf dist/* dist-esm/* types/* && tsc -p tsconfig.json && node publishPackage.js","test":"echo \"Error: no test specified\" && exit 1"},"keywords":[],"author":"","license":"ISC","dependencies":{"ts-morph":"^15.1.0","lodash":"^4.17.21","handlebars":"^4.7.7"},"devDependencies":{"@types/node":"^18.0.0","eslint":"^8.9.0","prettier":"~2.7.1","typescript":"~4.8.0","rimraf":"^3.0.2","@types/lodash":"^4.14.182","fs-extra":"^10.0.0","@types/fs-extra":"^8.1.0","ts-node":"^10.7.0"}}
{"name":"@azure-tools/rlc-common","version":"1.0.0-beta.8","description":"","type":"module","main":"dist/index.js","module":"dist-esm/index.js","exports":{".":{"types":"./types/index.d.ts","require":"./dist/index.js","import":"./dist-esm/index.js"}},"types":"./types/index.d.ts","scripts":{"lint":"eslint src --ext .ts --max-warnings=0","lint:fix":"eslint src --fix --ext .ts","format":"npm run -s prettier -- --write","check-format":"npm run prettier -- --check","prettier":"prettier --config ./.prettierrc src/**/*.ts","build":"rimraf dist/* dist-esm/* types/* && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json && node publishPackage.js","build:cjs":"rimraf dist/* dist-esm/* types/* && tsc -p tsconfig-cjs.json && node publishPackage.js","build:esm":"rimraf dist/* dist-esm/* types/* && tsc -p tsconfig.json && node publishPackage.js","test":"echo \"Error: no test specified\" && exit 1"},"keywords":[],"author":"","license":"ISC","dependencies":{"ts-morph":"^15.1.0","lodash":"^4.17.21","handlebars":"^4.7.7"},"devDependencies":{"@types/node":"^18.0.0","eslint":"^8.9.0","prettier":"~2.7.1","typescript":"~4.8.0","rimraf":"^3.0.2","@types/lodash":"^4.14.182","fs-extra":"^10.0.0","@types/fs-extra":"^8.1.0","ts-node":"^10.7.0"}}

@@ -43,2 +43,3 @@ "use strict";

: `${clientName}Client`;
normalizeUrlInfo(model);
const urlParameters = (_b = (_a = model === null || model === void 0 ? void 0 : model.urlInfo) === null || _a === void 0 ? void 0 : _a.urlParameters) === null || _b === void 0 ? void 0 : _b.filter(

@@ -153,3 +154,3 @@ // Do not include parameters with constant values in the signature, these should go in the options bag

}
const apiVersion = getApiVersion(model);
const apiVersion = getApiVersionInQueryParam(model);
let apiVersionStatement = "";

@@ -228,3 +229,3 @@ if (apiVersion) {

}
function getApiVersion(model) {
function getApiVersionInQueryParam(model) {
if (!model.apiVersionInQueryParam) {

@@ -239,2 +240,22 @@ return undefined;

}
function normalizeUrlInfo(model) {
if (!model ||
!model.urlInfo ||
!model.urlInfo.endpoint ||
!model.urlInfo.urlParameters ||
model.urlInfo.urlParameters.length === 0) {
return;
}
let parsedEndpoint = model.urlInfo.endpoint;
const urlParameters = model.urlInfo.urlParameters;
urlParameters.forEach((urlParameter) => {
const name = urlParameter.name;
const normalizedName = (0, nameUtils_js_1.normalizeName)(name, nameUtils_js_1.NameType.Parameter);
if (name !== normalizedName) {
urlParameter.name = normalizedName;
parsedEndpoint = parsedEndpoint.replace(`{${name}}`, `{${normalizedName}}`);
}
});
model.urlInfo.endpoint = parsedEndpoint;
}
//# sourceMappingURL=buildClient.js.map

@@ -32,3 +32,3 @@ "use strict";

return {
name,
name: (0, nameUtils_js_1.normalizeName)(name, nameUtils_js_1.NameType.Parameter),
type,

@@ -35,0 +35,0 @@ description

@@ -182,3 +182,3 @@ "use strict";

packageInfo.devDependencies["karma"] = "^6.2.0";
packageInfo.devDependencies["nyc"] = "^14.0.0";
packageInfo.devDependencies["nyc"] = "^15.0.0";
packageInfo.devDependencies["source-map-support"] = "^0.5.9";

@@ -185,0 +185,0 @@ packageInfo.scripts["test"] =

@@ -1,1 +0,1 @@

{"name":"@azure-tools/rlc-common","version":"1.0.0-beta.7","description":"","type":"commonjs","main":"dist/index.js","module":"dist-esm/index.js","exports":{".":{"types":"./types/index.d.ts","require":"./dist/index.js","import":"./dist-esm/index.js"}},"types":"./types/index.d.ts","scripts":{"lint":"eslint src --ext .ts --max-warnings=0","lint:fix":"eslint src --fix --ext .ts","format":"npm run -s prettier -- --write","check-format":"npm run prettier -- --check","prettier":"prettier --config ./.prettierrc src/**/*.ts","build":"rimraf dist/* dist-esm/* types/* && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json && node publishPackage.js","build:cjs":"rimraf dist/* dist-esm/* types/* && tsc -p tsconfig-cjs.json && node publishPackage.js","build:esm":"rimraf dist/* dist-esm/* types/* && tsc -p tsconfig.json && node publishPackage.js","test":"echo \"Error: no test specified\" && exit 1"},"keywords":[],"author":"","license":"ISC","dependencies":{"ts-morph":"^15.1.0","lodash":"^4.17.21","handlebars":"^4.7.7"},"devDependencies":{"@types/node":"^18.0.0","eslint":"^8.9.0","prettier":"~2.7.1","typescript":"~4.8.0","rimraf":"^3.0.2","@types/lodash":"^4.14.182","fs-extra":"^10.0.0","@types/fs-extra":"^8.1.0","ts-node":"^10.7.0"}}
{"name":"@azure-tools/rlc-common","version":"1.0.0-beta.8","description":"","type":"commonjs","main":"dist/index.js","module":"dist-esm/index.js","exports":{".":{"types":"./types/index.d.ts","require":"./dist/index.js","import":"./dist-esm/index.js"}},"types":"./types/index.d.ts","scripts":{"lint":"eslint src --ext .ts --max-warnings=0","lint:fix":"eslint src --fix --ext .ts","format":"npm run -s prettier -- --write","check-format":"npm run prettier -- --check","prettier":"prettier --config ./.prettierrc src/**/*.ts","build":"rimraf dist/* dist-esm/* types/* && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json && node publishPackage.js","build:cjs":"rimraf dist/* dist-esm/* types/* && tsc -p tsconfig-cjs.json && node publishPackage.js","build:esm":"rimraf dist/* dist-esm/* types/* && tsc -p tsconfig.json && node publishPackage.js","test":"echo \"Error: no test specified\" && exit 1"},"keywords":[],"author":"","license":"ISC","dependencies":{"ts-morph":"^15.1.0","lodash":"^4.17.21","handlebars":"^4.7.7"},"devDependencies":{"@types/node":"^18.0.0","eslint":"^8.9.0","prettier":"~2.7.1","typescript":"~4.8.0","rimraf":"^3.0.2","@types/lodash":"^4.14.182","fs-extra":"^10.0.0","@types/fs-extra":"^8.1.0","ts-node":"^10.7.0"}}
{
"name": "@azure-tools/rlc-common",
"version": "1.0.0-alpha.7.20221226.1",
"version": "1.0.0-alpha.8.20230109.1",
"description": "",

@@ -5,0 +5,0 @@ "type": "module",

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

normalizeUrlInfo(model);
const urlParameters = model?.urlInfo?.urlParameters?.filter(

@@ -208,3 +209,3 @@ // Do not include parameters with constant values in the signature, these should go in the options bag

const apiVersion = getApiVersion(model);
const apiVersion = getApiVersionInQueryParam(model);
let apiVersionStatement: string = "";

@@ -303,3 +304,3 @@ if (apiVersion) {

function getApiVersion(model: RLCModel): string | undefined {
function getApiVersionInQueryParam(model: RLCModel): string | undefined {
if (!model.apiVersionInQueryParam) {

@@ -318,1 +319,28 @@ return undefined;

}
function normalizeUrlInfo(model: RLCModel) {
if (
!model ||
!model.urlInfo ||
!model.urlInfo.endpoint ||
!model.urlInfo.urlParameters ||
model.urlInfo.urlParameters.length === 0
) {
return;
}
let parsedEndpoint = model.urlInfo.endpoint;
const urlParameters = model.urlInfo.urlParameters;
urlParameters.forEach((urlParameter) => {
const name = urlParameter.name;
const normalizedName = normalizeName(name, NameType.Parameter);
if (name !== normalizedName) {
urlParameter.name = normalizedName;
parsedEndpoint = parsedEndpoint.replace(
`{${name}}`,
`{${normalizedName}}`
);
}
});
model.urlInfo.endpoint = parsedEndpoint;
}

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

} from "../interfaces.js";
import { pascalCase } from "./nameUtils.js";
import { NameType, normalizeName, pascalCase } from "./nameUtils.js";
import { isObjectSchema } from "./schemaHelpers.js";

@@ -56,3 +56,3 @@

return {
name,
name: normalizeName(name, NameType.Parameter),
type,

@@ -59,0 +59,0 @@ description

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

packageInfo.devDependencies["karma"] = "^6.2.0";
packageInfo.devDependencies["nyc"] = "^14.0.0";
packageInfo.devDependencies["nyc"] = "^15.0.0";
packageInfo.devDependencies["source-map-support"] = "^0.5.9";

@@ -228,0 +228,0 @@ packageInfo.scripts["test"] =

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

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