New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@azure-tools/rlc-common

Package Overview
Dependencies
Maintainers
1
Versions
424
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 0.15.0 to 0.16.0

2

.rush/temp/operation/build/state.json
{
"nonCachedDurationMs": 7584.272452000005
"nonCachedDurationMs": 6491.463529999994
}

@@ -6,14 +6,14 @@ {

"packages/rlc-common/.prettierrc": "83e03202b2f3ad5b8df166a965fea698eccb0f90",
"packages/rlc-common/CHANGELOG.md": "c240d8713b00212e893955c28fd3e7c9db4666f2",
"packages/rlc-common/CONTRIBUTING.md": "1e6cd52a747c7461956721c6d6b64466608a33ab",
"packages/rlc-common/README.md": "4089f33033d3351a176a9d9c6dcaff93cbe9514d",
"packages/rlc-common/package.json": "1d1ecbe89858f46fcc163e505984ca2d22d651de",
"packages/rlc-common/CHANGELOG.md": "3bb440b369028b669bcfcc3b4e37d6c003126e16",
"packages/rlc-common/CONTRIBUTING.md": "c2b29a8b2bcd9b156fa419c1291a56d90c6877b8",
"packages/rlc-common/README.md": "cf3a9e48211f34b1cda27882d2f3cf07078f001e",
"packages/rlc-common/package.json": "c93731724ff5d8c3f8a7de7273d81b3ddade0f9a",
"packages/rlc-common/publishPackage.js": "3512e26d1199937b1962f3b4189aa9c506d9da1a",
"packages/rlc-common/src/buildClient.ts": "eda594960abaa8e75f06017c2ce36c82eb744055",
"packages/rlc-common/src/buildClientDefinitions.ts": "bf75621520a625598926a892f920bd1199d88fe8",
"packages/rlc-common/src/buildIndexFile.ts": "cfc029164ebcd100cb5dddb0ff304f44484e45ce",
"packages/rlc-common/src/buildIndexFile.ts": "634b16039c36154df2aa46ed5823d133d559cec3",
"packages/rlc-common/src/buildIsUnexpectedHelper.ts": "e2b617ad98544a7646157e5027e761e07b63d048",
"packages/rlc-common/src/buildLogger.ts": "ee2ceec802a6cf786ea9167b9a789d20657de800",
"packages/rlc-common/src/buildMethodShortcuts.ts": "833a2b2965d7b71d5a696b358498a9f9e68d83d1",
"packages/rlc-common/src/buildObjectTypes.ts": "8657a24a0bf16ae26250c4adcc814ff5107f8295",
"packages/rlc-common/src/buildObjectTypes.ts": "052c20742e9a3738e8a4dd3f7c8228da91890b4b",
"packages/rlc-common/src/buildPaginateHelper.ts": "d1afe6e72d621385075d34d7dd076d78a66f8a23",

@@ -28,3 +28,3 @@ "packages/rlc-common/src/buildParameterTypes.ts": "99caa0918989011cad8b8444fdeca97631cb814a",

"packages/rlc-common/src/helpers/nameConstructors.ts": "1b5caa8937405c163320e4c32c615eb0f526349e",
"packages/rlc-common/src/helpers/nameUtils.ts": "e5afc4416bfb7c54348c36a665f2388c9718fe4e",
"packages/rlc-common/src/helpers/nameUtils.ts": "4764abdf9ffbbfc0451d594a0015ebefcf447159",
"packages/rlc-common/src/helpers/operationHelpers.ts": "b57a9a060e32c3795b90a4817d789eee474c278a",

@@ -35,7 +35,7 @@ "packages/rlc-common/src/helpers/pathUtils.ts": "d23effe48effd2e20631c76e097cd42452d0f7d3",

"packages/rlc-common/src/index.ts": "3d16dd6148dd3bd43d7b0e7132d81472f74ba27e",
"packages/rlc-common/src/interfaces.ts": "ed4f96d5c160a82957e12eefa2e4c2aeddf0b501",
"packages/rlc-common/src/interfaces.ts": "215c8cca615d13d7d5c3e4dacbdbe33cd98eff75",
"packages/rlc-common/src/metadata/buildApiExtractorConfig.ts": "0fbe8882f1fce82ca7adf2031823c82b9a10e1e1",
"packages/rlc-common/src/metadata/buildESLintConfig.ts": "cffd504b072b75b6d6ca1465e739d6fb458234d3",
"packages/rlc-common/src/metadata/buildLicenseFile.ts": "6d77c30f183b1eea64ee751a1738d59dad604c27",
"packages/rlc-common/src/metadata/buildPackageFile.ts": "d0cb9d9815ba4b85a37cb43751c5c888a84d0bce",
"packages/rlc-common/src/metadata/buildPackageFile.ts": "833d34ea870108c8dca7898c252553e714c9cdec",
"packages/rlc-common/src/metadata/buildReadmeFile.ts": "e8854290bde2ff7f35ba57a9a298d03e9034000d",

@@ -55,5 +55,5 @@ "packages/rlc-common/src/metadata/buildRollupConfig.ts": "baa08d7d1c9087ca768411691a968a385aaa87bc",

"packages/rlc-common/tsconfig.json": "2ce338052b40a33cef04fa132458b8630ae1a809",
"packages/rlc-common/.rush/temp/shrinkwrap-deps.json": "23af98ff4a1251c5cc562cc2a1c34144ff588742"
"packages/rlc-common/.rush/temp/shrinkwrap-deps.json": "9f72f95750219ec9610e7fb525fcc0c4863b790a"
},
"arguments": "rimraf dist/* dist-esm/* types/* && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json && node publishPackage.js "
"arguments": "rimraf --glob dist/* dist-esm/* types/* && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json && node publishPackage.js "
}
{
"../../packages/rlc-common": "../../packages/rlc-common:PxTYw9sLQNidhV4PhbFqkq+vVpXV19tKOxpbZFT/cIY=:",
"../../packages/rlc-common": "../../packages/rlc-common:AJRleHTitlqZdKtDDxtn2zQQ2QIiknkHEEYlC5IRdyY=:",
"/@aashutoshrathi/word-wrap/1.2.6": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==",

@@ -18,2 +18,3 @@ "/@cspotcode/source-map-support/0.8.1": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==",

"/@nodelib/fs.walk/1.2.8": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
"/@pkgjs/parseargs/0.11.0": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==",
"/@ts-morph/common/0.16.0": "sha512-SgJpzkTgZKLKqQniCjLaE3c2L2sdL7UShvmTmPBejAKd2OKV/yfMpQ2IWpAuA+VY5wy7PkSUaEObIqEK6afFuw==",

@@ -41,2 +42,3 @@ "/@tsconfig/node10/1.0.9": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==",

"/chalk/4.1.2": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"/cliui/8.0.1": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
"/code-block-writer/11.0.3": "sha512-NiujjUFB4SwScJq2bwbYUtXbZhBSlY6vYzm++3Q6oC+U+injTqfPYFK8wS9COOmb2lueqp0ZRB4nK1VYeHgNyw==",

@@ -52,2 +54,3 @@ "/color-convert/2.0.1": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",

"/doctrine/3.0.0": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==",
"/emoji-regex/8.0.0": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"/escape-string-regexp/4.0.0": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",

@@ -72,2 +75,3 @@ "/eslint-scope/7.2.2": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==",

"/flatted/3.2.7": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==",
"/foreground-child/3.1.1": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==",
"/fs-extra/10.1.0": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",

@@ -77,2 +81,3 @@ "/fs.realpath/1.0.0": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",

"/glob-parent/6.0.2": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
"/glob/10.3.3": "sha512-92vPiMb/iqpmEgsOoIDvTjc50wf9CCCvMzsi6W0JLPeUKE8TWP1a73PgqSrqy7iAZxaSD1YdzU7QZR5LF51MJw==",
"/glob/7.2.3": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",

@@ -90,2 +95,3 @@ "/globals/13.20.0": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==",

"/is-extglob/2.1.1": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
"/is-fullwidth-code-point/3.0.0": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"/is-glob/4.0.3": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",

@@ -95,2 +101,3 @@ "/is-number/7.0.0": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",

"/isexe/2.0.0": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
"/jackspeak/2.1.1": "sha512-juf9stUEwUaILepraGOWIJTLwg48bUnBmRqd2ln2Os1sW987zeoj/hzhbvRB95oMuS2ZTpjULmdwHNX4rzZIZw==",
"/js-yaml/4.1.0": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",

@@ -104,2 +111,3 @@ "/json-schema-traverse/0.4.1": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",

"/lodash/4.17.21": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"/lru-cache/10.0.0": "sha512-svTf/fzsKHffP42sujkO/Rjs37BCIsQVRCeNYIm9WN8rgT7ffoUnRtZCqU+6BqcSBdv8gwJeTz8knJpgACeQMw==",
"/make-error/1.3.6": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",

@@ -110,3 +118,5 @@ "/merge2/1.4.1": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",

"/minimatch/5.1.6": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
"/minimatch/9.0.3": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
"/minimist/1.2.8": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
"/minipass/7.0.2": "sha512-eL79dXrE1q9dBbDCLg7xfn/vl7MS4F1gvJAgjJrQli/jbQWdUttuVawphqpffoIYfRdq78LHx6GP4bU/EQ2ATA==",
"/mkdirp/1.0.4": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",

@@ -125,2 +135,3 @@ "/ms/2.1.2": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",

"/path-key/3.1.1": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
"/path-scurry/1.10.1": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==",
"/picomatch/2.3.1": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",

@@ -134,6 +145,9 @@ "/prelude-ls/1.2.1": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",

"/rimraf/3.0.2": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"/rimraf/5.0.1": "sha512-OfFZdwtd3lZ+XZzYP/6gTACubwFcHdLRqS9UX3UwpU2dnGQYkPFISRwvM3w9IiB2w7bW5qGo/uAwE4SmXXSKvg==",
"/run-parallel/1.2.0": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
"/shebang-command/2.0.0": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
"/shebang-regex/3.0.0": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
"/signal-exit/4.1.0": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
"/source-map/0.6.1": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"/string-width/4.2.3": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
"/strip-ansi/6.0.1": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",

@@ -155,2 +169,3 @@ "/strip-json-comments/3.1.1": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",

"/wordwrap/1.0.0": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==",
"/wrap-ansi/7.0.0": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
"/wrappy/1.0.2": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",

@@ -157,0 +172,0 @@ "/yn/3.1.1": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",

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

## 0.16.0 (2023-09-11)
- [Feature] Upgrade TypeSpec compiler version to v0.47.0. Please refer to pr [#1968](https://github.com/Azure/autorest.typescript/pull/1968).
- [Feature] Support bytes, datetime, duration encoding in Modular. Please refer to pr [#2006](https://github.com/Azure/autorest.typescript/pull/2006).
- [Feature] Support client request id in Modular. Please refer to pr [#1985](https://github.com/Azure/autorest.typescript/pull/1985).
- [Feature] Support collection format in Modular. Please refer to pr [#1983](https://github.com/Azure/autorest.typescript/pull/1983).
- [Feature] Remove client side default value in Modular. Please refer to pr [#1977](https://github.com/Azure/autorest.typescript/pull/2006).
- [Bugfix] Fix credential issue in high level client. Please refer to pr [#1956](https://github.com/Azure/autorest.typescript/pull/1956).
- [Bugfix] Fix some issues found in content safety Modular. Please refer to pr [#1975](https://github.com/Azure/autorest.typescript/pull/1975).
## 0.15.0 (2023-08-15)

@@ -2,0 +12,0 @@

# Contributing
we have a [interfaces.ts](./src/interfaces.ts) to define the RLCModel And RLCOptions that is export for both Autorest RLC generator and Cadl emitters.
we have a [interfaces.ts](./src/interfaces.ts) to define the RLCModel And RLCOptions that is export for both Autorest RLC generator and TypeSpec emitters.

@@ -5,0 +5,0 @@ The generated Typescript/Javascript Rest Level Client has the following structure:

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

hasPipeCollection(model) ||
hasTsvCollection(model)) {
hasTsvCollection(model) ||
hasCsvCollection(model)) {
file.addExportDeclarations([

@@ -219,0 +220,0 @@ {

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

for (const objectSchema of objectSchemas) {
if (objectSchema.alias || objectSchema.outputAlias) {
if (objectSchema.alias ||
objectSchema.outputAlias ||
objectSchema.fromCore) {
continue;

@@ -265,11 +267,30 @@ }

const description = property.description;
let type = generateForOutput(schemaUsage, property.usage) && property.outputTypeName
? property.outputTypeName
: property.typeName
? property.typeName
: property.type;
if (property.typeName && property.fromCore) {
importedModels.add(property.typeName);
let type;
const hasCoreInArray = property.type === "array" &&
property.items &&
property.items.fromCore;
const hasCoreInRecord = property.type === "dictionary" &&
property.additionalProperties &&
property.additionalProperties.fromCore;
if (hasCoreInArray && property.typeName) {
type = property.typeName;
importedModels.add(property.items.typeName ?? property.items.name);
}
else if (hasCoreInRecord && property.typeName) {
type = property.typeName;
importedModels.add(property.additionalProperties.typeName ??
property.additionalProperties.name);
}
else {
type =
generateForOutput(schemaUsage, property.usage) && property.outputTypeName
? property.outputTypeName
: property.typeName
? property.typeName
: property.type;
if (property.typeName && property.fromCore) {
importedModels.add(property.typeName);
type = property.typeName;
}
}
return {

@@ -276,0 +297,0 @@ name: propertyName,

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

{ name: "error", reservedFor: [NameType.Parameter, ...Newable] },
{ name: "export", reservedFor: [NameType.Parameter] },
{ name: "export", reservedFor: [NameType.Parameter, NameType.Operation] },
{ name: "extends", reservedFor: [NameType.Parameter] },

@@ -37,0 +37,0 @@ { name: "false", reservedFor: [NameType.Parameter] },

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

hasLRO = hasLRO || hasPollingOperations(model);
let { packageDetails, generateTest, generateSample, azureOutputDirectory, azureSdkForJs, isCadlTest, sourceFrom, multiClient, batch } = model.options;
let { packageDetails, generateTest, generateSample, azureOutputDirectory, azureSdkForJs, isTypeSpecTest, sourceFrom, multiClient, batch } = model.options;
if (multiClient &&

@@ -91,3 +91,3 @@ batch &&

"check-format": `prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore "src/**/*.ts" "*.{js,json}" ${appendPathWhenFormat(generateTest, generateSample)}`,
clean: "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log",
clean: "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"execute:samples": "echo skipped",

@@ -139,3 +139,3 @@ "extract-api": "rimraf review && mkdirp ./review && api-extractor run --local",

prettier: "^2.5.1",
rimraf: "^3.0.0",
rimraf: "^5.0.0",
"source-map-support": "^0.5.9",

@@ -186,3 +186,3 @@ typescript: "~5.0.0"

}
if (isCadlTest) {
if (isTypeSpecTest) {
packageInfo["type"] = "module";

@@ -189,0 +189,0 @@ }

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

{"name":"@azure-tools/rlc-common","version":"0.15.0","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":"~5.0.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"},"bugs":{"url":"https://github.com/Azure/autorest.typescript/issues"},"homepage":"https://github.com/Azure/autorest.typescript/tree/main/packages/rlc-common/"}
{"name":"@azure-tools/rlc-common","version":"0.16.0","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 --glob dist/* dist-esm/* types/* && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json && node publishPackage.js","build:cjs":"rimraf --glob dist/* dist-esm/* types/* && tsc -p tsconfig-cjs.json && node publishPackage.js","build:esm":"rimraf --glob 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":"~5.0.0","rimraf":"^5.0.0","@types/lodash":"^4.14.182","fs-extra":"^10.0.0","@types/fs-extra":"^8.1.0","ts-node":"^10.7.0"},"bugs":{"url":"https://github.com/Azure/autorest.typescript/issues"},"homepage":"https://github.com/Azure/autorest.typescript/tree/main/packages/rlc-common/"}

@@ -221,3 +221,4 @@ "use strict";

(0, operationHelpers_js_1.hasPipeCollection)(model) ||
(0, operationHelpers_js_1.hasTsvCollection)(model)) {
(0, operationHelpers_js_1.hasTsvCollection)(model) ||
(0, operationHelpers_js_1.hasCsvCollection)(model)) {
file.addExportDeclarations([

@@ -224,0 +225,0 @@ {

@@ -22,3 +22,5 @@ "use strict";

for (const objectSchema of objectSchemas) {
if (objectSchema.alias || objectSchema.outputAlias) {
if (objectSchema.alias ||
objectSchema.outputAlias ||
objectSchema.fromCore) {
continue;

@@ -268,13 +270,32 @@ }

function getPropertySignature(property, schemaUsage, importedModels) {
var _a, _b;
const propertyName = property.name;
const description = property.description;
let type = generateForOutput(schemaUsage, property.usage) && property.outputTypeName
? property.outputTypeName
: property.typeName
? property.typeName
: property.type;
if (property.typeName && property.fromCore) {
importedModels.add(property.typeName);
let type;
const hasCoreInArray = property.type === "array" &&
property.items &&
property.items.fromCore;
const hasCoreInRecord = property.type === "dictionary" &&
property.additionalProperties &&
property.additionalProperties.fromCore;
if (hasCoreInArray && property.typeName) {
type = property.typeName;
importedModels.add((_a = property.items.typeName) !== null && _a !== void 0 ? _a : property.items.name);
}
else if (hasCoreInRecord && property.typeName) {
type = property.typeName;
importedModels.add((_b = property.additionalProperties.typeName) !== null && _b !== void 0 ? _b : property.additionalProperties.name);
}
else {
type =
generateForOutput(schemaUsage, property.usage) && property.outputTypeName
? property.outputTypeName
: property.typeName
? property.typeName
: property.type;
if (property.typeName && property.fromCore) {
importedModels.add(property.typeName);
type = property.typeName;
}
}
return Object.assign(Object.assign({ name: propertyName }, (description && { docs: [{ description }] })), { hasQuestionToken: !property.required, isReadonly: generateForOutput(schemaUsage, property.usage) && property.readOnly, type, kind: ts_morph_1.StructureKind.PropertySignature });

@@ -281,0 +302,0 @@ }

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

{ name: "error", reservedFor: [NameType.Parameter, ...Newable] },
{ name: "export", reservedFor: [NameType.Parameter] },
{ name: "export", reservedFor: [NameType.Parameter, NameType.Operation] },
{ name: "extends", reservedFor: [NameType.Parameter] },

@@ -40,0 +40,0 @@ { name: "false", reservedFor: [NameType.Parameter] },

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

hasLRO = hasLRO || (0, operationHelpers_js_1.hasPollingOperations)(model);
let { packageDetails, generateTest, generateSample, azureOutputDirectory, azureSdkForJs, isCadlTest, sourceFrom, multiClient, batch } = model.options;
let { packageDetails, generateTest, generateSample, azureOutputDirectory, azureSdkForJs, isTypeSpecTest, sourceFrom, multiClient, batch } = model.options;
if (multiClient &&

@@ -96,3 +96,3 @@ batch &&

"check-format": `prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore "src/**/*.ts" "*.{js,json}" ${appendPathWhenFormat(generateTest, generateSample)}`,
clean: "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log",
clean: "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"execute:samples": "echo skipped",

@@ -135,3 +135,3 @@ "extract-api": "rimraf review && mkdirp ./review && api-extractor run --local",

prettier: "^2.5.1",
rimraf: "^3.0.0",
rimraf: "^5.0.0",
"source-map-support": "^0.5.9",

@@ -182,3 +182,3 @@ typescript: "~5.0.0"

}
if (isCadlTest) {
if (isTypeSpecTest) {
packageInfo["type"] = "module";

@@ -185,0 +185,0 @@ }

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

{"name":"@azure-tools/rlc-common","version":"0.15.0","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":"~5.0.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"},"bugs":{"url":"https://github.com/Azure/autorest.typescript/issues"},"homepage":"https://github.com/Azure/autorest.typescript/tree/main/packages/rlc-common/"}
{"name":"@azure-tools/rlc-common","version":"0.16.0","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 --glob dist/* dist-esm/* types/* && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json && node publishPackage.js","build:cjs":"rimraf --glob dist/* dist-esm/* types/* && tsc -p tsconfig-cjs.json && node publishPackage.js","build:esm":"rimraf --glob 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":"~5.0.0","rimraf":"^5.0.0","@types/lodash":"^4.14.182","fs-extra":"^10.0.0","@types/fs-extra":"^8.1.0","ts-node":"^10.7.0"},"bugs":{"url":"https://github.com/Azure/autorest.typescript/issues"},"homepage":"https://github.com/Azure/autorest.typescript/tree/main/packages/rlc-common/"}
{
"name": "@azure-tools/rlc-common",
"version": "0.15.0",
"version": "0.16.0",
"description": "",

@@ -29,3 +29,3 @@ "type": "module",

"typescript": "~5.0.0",
"rimraf": "^3.0.2",
"rimraf": "^5.0.0",
"@types/lodash": "^4.14.182",

@@ -46,7 +46,7 @@ "fs-extra": "^10.0.0",

"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",
"build": "rimraf --glob dist/* dist-esm/* types/* && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json && node publishPackage.js",
"build:cjs": "rimraf --glob dist/* dist-esm/* types/* && tsc -p tsconfig-cjs.json && node publishPackage.js",
"build:esm": "rimraf --glob dist/* dist-esm/* types/* && tsc -p tsconfig.json && node publishPackage.js",
"test": "echo \"Error: no test specified\" && exit 1"
}
}
# Introduction
In this library, we abstract the common generation logic for RLC generation from both swaggers and cadl. In this way, the autorest.typescript part will only need to transform the code model into RLCModel, and the cadl emitter will only need to transform the cadl program into RLCModel, then the rlc-common library will take the rest generation part to build the file content of from the RLCModel.
In this library, we abstract the common generation logic for RLC generation from both swaggers and typespec. In this way, the autorest.typescript part will only need to transform the code model into RLCModel, and the TypeSpec emitter will only need to transform the TypeSpec program into RLCModel, then the rlc-common library will take the rest generation part to build the file content of from the RLCModel.

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

hasPipeCollection(model) ||
hasTsvCollection(model)
hasTsvCollection(model) ||
hasCsvCollection(model)
) {

@@ -317,0 +318,0 @@ file.addExportDeclarations([

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

for (const objectSchema of objectSchemas) {
if (objectSchema.alias || objectSchema.outputAlias) {
if (
objectSchema.alias ||
objectSchema.outputAlias ||
objectSchema.fromCore
) {
continue;

@@ -421,14 +425,36 @@ }

const propertyName = property.name;
const description = property.description;
let type =
generateForOutput(schemaUsage, property.usage) && property.outputTypeName
? property.outputTypeName
: property.typeName
? property.typeName
: property.type;
if (property.typeName && property.fromCore) {
importedModels.add(property.typeName);
let type;
const hasCoreInArray =
property.type === "array" &&
(property as any).items &&
(property as any).items.fromCore;
const hasCoreInRecord =
property.type === "dictionary" &&
(property as any).additionalProperties &&
(property as any).additionalProperties.fromCore;
if (hasCoreInArray && property.typeName) {
type = property.typeName;
importedModels.add(
(property as any).items.typeName ?? (property as any).items.name
);
} else if (hasCoreInRecord && property.typeName) {
type = property.typeName;
importedModels.add(
(property as any).additionalProperties.typeName ??
(property as any).additionalProperties.name
);
} else {
type =
generateForOutput(schemaUsage, property.usage) && property.outputTypeName
? property.outputTypeName
: property.typeName
? property.typeName
: property.type;
if (property.typeName && property.fromCore) {
importedModels.add(property.typeName);
type = property.typeName;
}
}
return {

@@ -435,0 +461,0 @@ name: propertyName,

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

{ name: "error", reservedFor: [NameType.Parameter, ...Newable] },
{ name: "export", reservedFor: [NameType.Parameter] },
{ name: "export", reservedFor: [NameType.Parameter, NameType.Operation] },
{ name: "extends", reservedFor: [NameType.Parameter] },

@@ -44,0 +44,0 @@ { name: "false", reservedFor: [NameType.Parameter] },

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

azureOutputDirectory?: string;
isCadlTest?: boolean;
isTypeSpecTest?: boolean;
title?: string;

@@ -145,3 +145,3 @@ dependencyInfo?: DependencyInfo;

azureArm?: boolean;
sourceFrom?: "Cadl" | "Swagger";
sourceFrom?: "TypeSpec" | "Swagger";
isModularLibrary?: boolean;

@@ -148,0 +148,0 @@ enableOperationGroup?: boolean;

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

azureSdkForJs,
isCadlTest,
isTypeSpecTest,
sourceFrom,

@@ -126,3 +126,3 @@ multiClient,

clean:
"rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"execute:samples": "echo skipped",

@@ -183,3 +183,3 @@ "extract-api":

prettier: "^2.5.1",
rimraf: "^3.0.0",
rimraf: "^5.0.0",
"source-map-support": "^0.5.9",

@@ -234,3 +234,3 @@ typescript: "~5.0.0"

if (isCadlTest) {
if (isTypeSpecTest) {
packageInfo["type"] = "module";

@@ -237,0 +237,0 @@ }

@@ -121,3 +121,3 @@ export interface RLCModel {

azureOutputDirectory?: string;
isCadlTest?: boolean;
isTypeSpecTest?: boolean;
title?: string;

@@ -128,3 +128,3 @@ dependencyInfo?: DependencyInfo;

azureArm?: boolean;
sourceFrom?: "Cadl" | "Swagger";
sourceFrom?: "TypeSpec" | "Swagger";
isModularLibrary?: boolean;

@@ -131,0 +131,0 @@ enableOperationGroup?: boolean;

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

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

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