Setup spell check and fix issues in markdown, ts and changelogs (#1000)
This commit is contained in:
Родитель
47893dc035
Коммит
90d84de1fb
|
@ -1,3 +1,7 @@
|
|||
{
|
||||
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
|
||||
"recommendations": [
|
||||
"dbaeumer.vscode-eslint",
|
||||
"esbenp.prettier-vscode",
|
||||
"streetsidesoftware.code-spell-checker"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ Rush change will ask for the following questions for each modified packages:
|
|||
- message: This should be a good description of what the changes are to this package
|
||||
- type:
|
||||
- `major`: For a breaking change. **DO NOT USE All versions remain in 0.x stage until GA.**
|
||||
- `minor`: A new funtionality.
|
||||
- `minor`: A new functionality.
|
||||
- `patch`: A bug fix.
|
||||
- `none`: Not relevant to the consumer of the packages. For example some added tests.
|
||||
|
||||
|
@ -140,11 +140,14 @@ your PR. Carefully review whether the changes are intentional.
|
|||
|
||||
## Recommended extensions
|
||||
|
||||
1. [Mocha Test
|
||||
Explorer](https://marketplace.visualstudio.com/items?itemName=hbenl.vscode-mocha-test-adapter):
|
||||
1. [Mocha Test Explorer](https://marketplace.visualstudio.com/items?itemName=hbenl.vscode-mocha-test-adapter):
|
||||
Run tests from the IDE.
|
||||
2. [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode):
|
||||
Automatically keep code formatted correctly on save.
|
||||
3. [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint):
|
||||
Show eslint errors in warnings in UI.
|
||||
4. [Code Spell Checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker):
|
||||
Show spell check errors in document.
|
||||
|
||||
## Opening the repo as workspace
|
||||
|
||||
|
@ -163,10 +166,10 @@ at a time in the IDE.
|
|||
This will setup a an incremental watching build for the whole
|
||||
repo. From there on, your changes will be built whenever you save.
|
||||
|
||||
Problems will be reported in the Problems pane auotomatically and the
|
||||
Problems will be reported in the Problems pane automatically and the
|
||||
Terminal pane will have three parallel watch tasks running:
|
||||
|
||||
- `watch-source`: tsc process that recompiles on TypeScript changes
|
||||
- `watch-source`: tsc process that recompile on TypeScript changes
|
||||
- `watch-spec`: process that regenerates spec.html when
|
||||
spec.emu.html changes
|
||||
- `watch-tmlanguage`: process that regenerates cadl.tmlanguage when
|
||||
|
@ -194,7 +197,7 @@ debug the last one you chose.
|
|||
|
||||
1. **VS Code Extension**: This will run and debug an experimental
|
||||
instance of VS Code with the Cadl extension for VS Code and Cadl
|
||||
language serever running live with any of your changes. It will
|
||||
language server running live with any of your changes. It will
|
||||
attach to both the VS Code client process and the language server
|
||||
process automatically.
|
||||
2. **Compile Scratch**: Use this to debug compiling
|
||||
|
@ -250,7 +253,7 @@ of the Cadl extension for VS Code running live with any of your changes
|
|||
to the extension or the Cadl language server.
|
||||
|
||||
The VS debugger will attach only to the VS client process. Use "Attach
|
||||
to Lanugage Server" described above to debug the language server in
|
||||
to Language Server" described above to debug the language server in
|
||||
VS Code.
|
||||
|
||||
# Installing your build
|
||||
|
|
|
@ -171,8 +171,8 @@ cadl format <patterns...>
|
|||
cadl format **/*.cadl
|
||||
|
||||
# Exclude certain patterns. Either use `!` prefix or pass it via the `--exclude` or `-x` option.
|
||||
cadl format **/*.cadl "!mytestfolder/**/*"
|
||||
cadl format **/*.cadl --exclude "mytestfolder/**/*"
|
||||
cadl format **/*.cadl "!my-test-folder/**/*"
|
||||
cadl format **/*.cadl --exclude "my-test-folder/**/*"
|
||||
```
|
||||
|
||||
### Installing VS Code Extension
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"changes": [
|
||||
{
|
||||
"packageName": "@cadl-lang/compiler",
|
||||
"comment": "",
|
||||
"type": "none"
|
||||
}
|
||||
],
|
||||
"packageName": "@cadl-lang/compiler"
|
||||
}
|
|
@ -2,9 +2,9 @@
|
|||
"changes": [
|
||||
{
|
||||
"packageName": "@cadl-lang/compiler",
|
||||
"comment": "**Breaking** Model `extends` or `is` canot reference a model expression.",
|
||||
"comment": "**Breaking** Model `extends` or `is` cannot reference a model expression.",
|
||||
"type": "minor"
|
||||
}
|
||||
],
|
||||
"packageName": "@cadl-lang/compiler"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"changes": [
|
||||
{
|
||||
"packageName": "@cadl-lang/eslint-config-cadl",
|
||||
"comment": "",
|
||||
"type": "none"
|
||||
}
|
||||
],
|
||||
"packageName": "@cadl-lang/eslint-config-cadl"
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"changes": [
|
||||
{
|
||||
"packageName": "@cadl-lang/internal-build-utils",
|
||||
"comment": "",
|
||||
"type": "none"
|
||||
}
|
||||
],
|
||||
"packageName": "@cadl-lang/internal-build-utils"
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"changes": [
|
||||
{
|
||||
"packageName": "@cadl-lang/openapi",
|
||||
"comment": "",
|
||||
"type": "none"
|
||||
}
|
||||
],
|
||||
"packageName": "@cadl-lang/openapi"
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"changes": [
|
||||
{
|
||||
"packageName": "@cadl-lang/openapi3",
|
||||
"comment": "",
|
||||
"type": "none"
|
||||
}
|
||||
],
|
||||
"packageName": "@cadl-lang/openapi3"
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"changes": [
|
||||
{
|
||||
"packageName": "@cadl-lang/prettier-plugin-cadl",
|
||||
"comment": "",
|
||||
"type": "none"
|
||||
}
|
||||
],
|
||||
"packageName": "@cadl-lang/prettier-plugin-cadl"
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"changes": [
|
||||
{
|
||||
"packageName": "@cadl-lang/rest",
|
||||
"comment": "",
|
||||
"type": "none"
|
||||
}
|
||||
],
|
||||
"packageName": "@cadl-lang/rest"
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"changes": [
|
||||
{
|
||||
"packageName": "@cadl-lang/versioning",
|
||||
"comment": "",
|
||||
"type": "none"
|
||||
}
|
||||
],
|
||||
"packageName": "@cadl-lang/versioning"
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"changes": [
|
||||
{
|
||||
"packageName": "cadl-vs",
|
||||
"comment": "",
|
||||
"type": "none"
|
||||
}
|
||||
],
|
||||
"packageName": "cadl-vs"
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"changes": [
|
||||
{
|
||||
"packageName": "cadl-vscode",
|
||||
"comment": "",
|
||||
"type": "none"
|
||||
}
|
||||
],
|
||||
"packageName": "cadl-vscode"
|
||||
}
|
|
@ -54,6 +54,12 @@
|
|||
"summary": "(CUSTOM) Regenerate samples.",
|
||||
"shellCommand": "node eng/scripts/npm-run.js regen-samples"
|
||||
},
|
||||
{
|
||||
"commandKind": "global",
|
||||
"name": "cspell",
|
||||
"summary": "(CUSTOM) Check spelling.",
|
||||
"shellCommand": "node eng/scripts/cspell.js"
|
||||
},
|
||||
{
|
||||
"commandKind": "global",
|
||||
"safeForSimultaneousRushProcesses": true,
|
||||
|
|
|
@ -606,6 +606,237 @@ packages:
|
|||
resolution: {integrity: sha512-mgmE7XBYY/21erpzhexk4Cj1cyTQ9LzvnTxtzM17BJ7ERMNE6W72mQRo0I1Ud8eFJ+RVVIcBNhLFZ3GX4XFz5w==}
|
||||
dev: false
|
||||
|
||||
/@cspell/cspell-bundled-dicts/6.8.1:
|
||||
resolution: {integrity: sha512-hZCAtUeEsQ16f9SvruKYB9nFDjt+VXtZ/yJHONo6+dev9A6JpsUGWGL2oja6fD4j+mvFoMc/Dm1wzhtTYeSvhA==}
|
||||
engines: {node: '>=14'}
|
||||
dependencies:
|
||||
'@cspell/dict-ada': 2.0.1
|
||||
'@cspell/dict-aws': 2.0.0
|
||||
'@cspell/dict-bash': 2.0.4
|
||||
'@cspell/dict-companies': 2.0.13
|
||||
'@cspell/dict-cpp': 3.2.1
|
||||
'@cspell/dict-cryptocurrencies': 2.0.0
|
||||
'@cspell/dict-csharp': 3.0.1
|
||||
'@cspell/dict-css': 2.1.0
|
||||
'@cspell/dict-dart': 1.1.1
|
||||
'@cspell/dict-django': 2.0.0
|
||||
'@cspell/dict-docker': 1.1.1
|
||||
'@cspell/dict-dotnet': 2.0.1
|
||||
'@cspell/dict-elixir': 2.0.1
|
||||
'@cspell/dict-en_us': 2.3.3
|
||||
'@cspell/dict-en-gb': 1.1.33
|
||||
'@cspell/dict-filetypes': 2.1.1
|
||||
'@cspell/dict-fonts': 2.1.0
|
||||
'@cspell/dict-fullstack': 2.0.6
|
||||
'@cspell/dict-git': 1.0.1
|
||||
'@cspell/dict-golang': 3.0.1
|
||||
'@cspell/dict-haskell': 2.0.1
|
||||
'@cspell/dict-html': 3.3.1
|
||||
'@cspell/dict-html-symbol-entities': 3.0.0
|
||||
'@cspell/dict-java': 3.0.7
|
||||
'@cspell/dict-latex': 2.0.9
|
||||
'@cspell/dict-lorem-ipsum': 2.0.1
|
||||
'@cspell/dict-lua': 2.0.0
|
||||
'@cspell/dict-node': 3.0.1
|
||||
'@cspell/dict-npm': 3.1.2
|
||||
'@cspell/dict-php': 2.0.0
|
||||
'@cspell/dict-powershell': 2.0.0
|
||||
'@cspell/dict-public-licenses': 1.0.6
|
||||
'@cspell/dict-python': 3.0.6
|
||||
'@cspell/dict-r': 1.0.3
|
||||
'@cspell/dict-ruby': 2.0.2
|
||||
'@cspell/dict-rust': 2.0.1
|
||||
'@cspell/dict-scala': 2.0.0
|
||||
'@cspell/dict-software-terms': 2.2.6
|
||||
'@cspell/dict-sql': 1.0.4
|
||||
'@cspell/dict-swift': 1.0.3
|
||||
'@cspell/dict-typescript': 2.0.1
|
||||
'@cspell/dict-vue': 2.0.2
|
||||
dev: false
|
||||
|
||||
/@cspell/cspell-pipe/6.8.1:
|
||||
resolution: {integrity: sha512-FbpYK58PlrGIOjZxu51/dFkFv7iaPhKWrkQ/q/9vW82g2ovouFeql0S7X9g4Dnn75Pd5P/pYPgFubCSawtp3pA==}
|
||||
engines: {node: '>=14'}
|
||||
dev: false
|
||||
|
||||
/@cspell/cspell-service-bus/6.8.1:
|
||||
resolution: {integrity: sha512-lpr+5TntZdneLxmhSGT3pKOsxLJ40KahJDyNqM+91ssqIczeqrm7jZ2hZCdx4XqQM2dOAMvsB0ZyZuuDjQ+ptg==}
|
||||
engines: {node: '>=14'}
|
||||
dev: false
|
||||
|
||||
/@cspell/cspell-types/6.8.1:
|
||||
resolution: {integrity: sha512-Yo/SJZEG3SbcIfxqdQat70LW5SwXoox2L+G8y0VCtdYu+hFr5ouSUInlfItgiFBgDKNSF0w1u2oOZeNkFZ1Aiw==}
|
||||
engines: {node: '>=14'}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-ada/2.0.1:
|
||||
resolution: {integrity: sha512-vopTJ1oHrrFYV5GU55Sr+AzItR78Uj5YbCaspYABmYKlq4NRrcUAUsr4bWgymDcspMIHO7e7IFcj48OKs1fndA==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-aws/2.0.0:
|
||||
resolution: {integrity: sha512-NKz7pDZ7pwj/b33i3f4WLpC1rOOUMmENwYgftxU+giU2YBeKM2wZbMTSEIzsrel56r0UlQYmdIVlP/B4nnVaoQ==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-bash/2.0.4:
|
||||
resolution: {integrity: sha512-uK/ehmp5LYrmRH2Gv3nbvdPswpkybJUn34WYKLpeuYHQktmi+pOI1A9uPdBPnSbMDffSvwQlQohIyKawz+X8Ag==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-companies/2.0.13:
|
||||
resolution: {integrity: sha512-EacGH6Yjd2u+sNRLd6+3jxbzWBSsmF4g52Xfxfv2T48qzRWJ1zqpX89ijihgYTwvZbf8H/6Lu+z1VU4e1gUp0g==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-cpp/3.2.1:
|
||||
resolution: {integrity: sha512-XcmzrKIghqFfrYLLaHtWKOp9rupiuGdc5ODONk+emsq0W5CIc3Abn27IQHwUzxzF+Cm5IfKAIJ5Kpe6hkzm0HQ==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-cryptocurrencies/2.0.0:
|
||||
resolution: {integrity: sha512-nREysmmfOp7L2YCRAUufQahwD5/Punzb5AZ6eyg4zUamdRWHgBFphb5/9h2flt1vgdUfhc6hZcML21Ci7iXjaA==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-csharp/3.0.1:
|
||||
resolution: {integrity: sha512-xkfQu03F388w4sdVQSSjrVMkxAxpTYB2yW7nw0XYtTjl3L/jBgvTr/j1BTjdFbQhdNf10Lg0Ak1kXOjmHodVqA==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-css/2.1.0:
|
||||
resolution: {integrity: sha512-glASAELcGhh4Ru0rTQ4G9mTQxSyPwsZOON/5BYflB6Kks8YC8nUvKrtMCoo5W7CPKPfSEa8zUNctFQ1+IUYDHA==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-dart/1.1.1:
|
||||
resolution: {integrity: sha512-XBOCpezXrgFN18kGEwqMpTUGZdw4BjCoJrNOo6qBdcdZySCrEHLwELraLOkcSba2kM4stmTp0t59FkwtP8TKOA==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-django/2.0.0:
|
||||
resolution: {integrity: sha512-GkJdJv6cmzrKcmq2/oxTXjKF5uv71r4eTqnFmgPbNBW1t+G4VYpzOf0QrVQrhx2RC4DdW5XfcTf+iS0FxHOTmw==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-docker/1.1.1:
|
||||
resolution: {integrity: sha512-UEYoeRDm7oUN9yz1mYSozz6D4+2N14S/cd2Re9et6Xzq6yi62s4ky3knF92Of2weelADjnN41UA22VBhRAf7Sw==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-dotnet/2.0.1:
|
||||
resolution: {integrity: sha512-b1n4crJRW0WZVf9Gp/52j/tDtjYiZ3N81fIyfqPlBrjsh/5AivfA697DYwQ2mr8ngNX7RsqRtYNQjealA1rEnQ==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-elixir/2.0.1:
|
||||
resolution: {integrity: sha512-eTTTxZt1FqGkM780yFDxsGHvTbWqvlK8YISSccK8FyrB6ULW+uflQlNS5AnWg3uWKC48b7pQott+odYCsPJ+Ow==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-en-gb/1.1.33:
|
||||
resolution: {integrity: sha512-tKSSUf9BJEV+GJQAYGw5e+ouhEe2ZXE620S7BLKe3ZmpnjlNG9JqlnaBhkIMxKnNFkLY2BP/EARzw31AZnOv4g==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-en_us/2.3.3:
|
||||
resolution: {integrity: sha512-csyKeaNktfpvMkmE2GOPTwsrQm3wWhLKVaDRaGU0qTcIjDiCvqv/iYgrVrKRkoddA3kdNTZ8YNCcix7lb6VkOg==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-filetypes/2.1.1:
|
||||
resolution: {integrity: sha512-Oo0/mUbFHzsaATqRLdkV1RMoYns3aGzeKFIpVJg415GYtJ8EABXtEArYTXeMwlboyGTPvEk+PR2hBSTSfQTqmg==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-fonts/2.1.0:
|
||||
resolution: {integrity: sha512-hk7xsbfWEUhc136Xj7I2TD7ouKAfWwzCVAQaHBxcVXAsVxu7bDOGj4FvE2jBzlkSUY8A9Ww8qS0GOFvowJshVg==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-fullstack/2.0.6:
|
||||
resolution: {integrity: sha512-R2E2xvbHvvRwwurxfpBJDRIJjXBMfEPF5WNV3LTOEMRqkZtoYCeJK9aqc8LHlmJMtAbnN1cx//BCDIyTJ0rO0A==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-git/1.0.1:
|
||||
resolution: {integrity: sha512-Rk+eTof/9inF11lvxmkCRK+gODatA3qai8kSASv6OG/JfPvpj7fTHErx/rdgPw/LOTDUafnoTjTYmj7B2MOQXg==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-golang/3.0.1:
|
||||
resolution: {integrity: sha512-0KNfXTbxHW2l8iVjxeOf+KFv9Qrw3z5cyKnkuYJWlBTSB5KcUBfeKCb4fsds26VdANqiy6U91b4gDx5kNEmBjQ==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-haskell/2.0.1:
|
||||
resolution: {integrity: sha512-ooA23qIG7InOOxlLm67CNH5O2J85QsPHEAzEU9KEqVfYG5ovFs5tx6n9pHekDVk3MpQULpqfNUYDR0KigPLg5g==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-html-symbol-entities/3.0.0:
|
||||
resolution: {integrity: sha512-04K7cPTcbYXmHICfiob4gZA1yaj4hpfM+Nl5WIJ1EAZsSGHdqmGEF28GuCjyQ8ZeKiJAsPt/vXuLBbjxkHqZyQ==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-html/3.3.1:
|
||||
resolution: {integrity: sha512-zPcqMJEVG2CaUcd48haZm3AAC6TXDB9RTy800iAaZgYThvU43jE/1YnvmFIlDNXH8Pmlx7iTpo36DmnHnBP5XQ==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-java/3.0.7:
|
||||
resolution: {integrity: sha512-IL7ubsRvKX6dZSx++TplJCfhiS7kkEGpbTPG0gMEP50DTNAVM4icZS8zmer2UBCU5PTwF85abJjdX7mRADWKVg==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-latex/2.0.9:
|
||||
resolution: {integrity: sha512-d1kTK6dJb5z6UcfASQWjqQlsjZvnoVOvMWxYtLpGksYf6gM4IgqoPVNMLYYK6xBS4T/uAnLIj975A6YuAeyZpg==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-lorem-ipsum/2.0.1:
|
||||
resolution: {integrity: sha512-s7Ft8UiloUJwgz4z8uLeFvCkeTcZ43HQl7mSAlZd76eW+keLSsdeGmLDx2zaciqo+MftPGyzygVCwaJjTGxiew==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-lua/2.0.0:
|
||||
resolution: {integrity: sha512-7WUEBEspSKtsq104WdIys1+DLqAxpJPzw74Py1TuE3fI5GvlzeSZkRFP2ya54GB2lCO4C3mq4M8EnitpibVDfw==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-node/3.0.1:
|
||||
resolution: {integrity: sha512-sK2cpuV0EAc43Amd5xeQXkI9MeRTECMw+yjap06gKSModbgI7BqJUHeKZed+0Hii+LpaJ4TYpLGiRVsO+qSk0w==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-npm/3.1.2:
|
||||
resolution: {integrity: sha512-dg4M38nrCCeBOYKVqPG91JPJ67j9LygPeNnu5fa7E9Z1eho3fkYHvfKlF3t4EZyAOxEobp0ZB0iXaCuX2YknlA==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-php/2.0.0:
|
||||
resolution: {integrity: sha512-29WgU77eTO985LvMHwPi1pcpfopfCWfTdffDyqya0JIfOSaFUrlYKzGPkE4mRxcz2G3hXsaM0SRvBNdIRwEdUg==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-powershell/2.0.0:
|
||||
resolution: {integrity: sha512-6uvEhLiGmG3u9TFkM1TYcky6aL9Yk7Sk3KJwoTYBaQJY2KqrprgyQtW6yxIw9oU52VRHlq3KKvSAA9Q26+SIkQ==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-public-licenses/1.0.6:
|
||||
resolution: {integrity: sha512-Z9IUFPkkOpOsEdgPUfQOJNQ+qU6+iBAZWS/CR5sUqTX+s5VkPNVwQyVC2kdmgmE2U5qwzAPewG6nVKr2MVogwg==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-python/3.0.6:
|
||||
resolution: {integrity: sha512-tzxJ4sd9ZGhAUKg/WJJpQGDNtoHvM8Wn+iS2+PnQj2/LTHBW4mnaCogsGsBtYu8C4b2+BEQs+tc5808AeEfLug==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-r/1.0.3:
|
||||
resolution: {integrity: sha512-u2qeXd4cx/TvTVcmkvA+sK6f4K1uMAMO6QPMSr1pSvqGElPRP1mIBXmuiSuBzLO3LbsJuUEHw5Cp3/bxIB6rNA==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-ruby/2.0.2:
|
||||
resolution: {integrity: sha512-vVnUpSmGDbPjs7MHq741DsLHhQcoA4CnUCM9wsTorQ9AQRDAkDTbK/LcY8nM19MoXCb3eF8PFku5Jq+gqH0u7w==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-rust/2.0.1:
|
||||
resolution: {integrity: sha512-ATDpIh0VWpQdUIZa8zqqJY4wQz3q00BTXlQCodeOmObYSb23+L6KWWzJ8mKLgpbc1lqTkogWrqxiCxlrCmqNmg==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-scala/2.0.0:
|
||||
resolution: {integrity: sha512-MUwA2YKpqaQOSR4V1/CVGRNk8Ii5kf6I8Ch+4/BhRZRQXuwWbi21rDRYWPqdQWps7VNzAbbMA+PQDWsD5YY38g==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-software-terms/2.2.6:
|
||||
resolution: {integrity: sha512-681Js+9CO3OsQCS/+MRbYXyP17yv8jWDrI22/d31hgmSA+E6m37xbaqwy+0LYhczlA3ZPWQxR988kt7x6q9u+Q==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-sql/1.0.4:
|
||||
resolution: {integrity: sha512-+9nMcwsCzdYH0tyv2LeuVvQ+DdecS2C1N+hw6sl0FTHWI5GwULHAGW840RBwcKw0s+dl7sc0WpZhS1EW7b0pXg==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-swift/1.0.3:
|
||||
resolution: {integrity: sha512-yOBLSaRD0AnkkkndJ8PuB82Evp6lA2xItf2AWsnPfCCgxp5Ojk6uUBC/WQBSkzkCAOGbXyHsu9D97tsOx2c6cw==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-typescript/2.0.1:
|
||||
resolution: {integrity: sha512-YXH6nEH4thcD7lNffdNsKgDDZA5JVX4aKCuNIGE7qWSS9kBVgIvSU9/WH64R59rEzAPe1VwXwXyoZ7y4fAufww==}
|
||||
dev: false
|
||||
|
||||
/@cspell/dict-vue/2.0.2:
|
||||
resolution: {integrity: sha512-/MB0RS0Gn01s4pgmjy0FvsLfr3RRMrRphEuvTRserNcM8XVtoIVAtrjig/Gg0DPwDrN8Clm0L1j7iQay6S8D0g==}
|
||||
dev: false
|
||||
|
||||
/@emotion/is-prop-valid/1.2.0:
|
||||
resolution: {integrity: sha512-3aDpDprjM0AwaxGE09bOPkNxHpBd+kA6jty3RnaEXdweX1DF1U3VQpPYb0g1IStAuK7SVQ1cy+bNBBKp4W3Fjg==}
|
||||
dependencies:
|
||||
|
@ -1005,6 +1236,10 @@ packages:
|
|||
resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==}
|
||||
dev: false
|
||||
|
||||
/@types/parse-json/4.0.0:
|
||||
resolution: {integrity: sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==}
|
||||
dev: false
|
||||
|
||||
/@types/plist/3.0.2:
|
||||
resolution: {integrity: sha512-ULqvZNGMv0zRFvqn8/4LSPtnmN4MfhlPNtJCTpKuIIxGVGZ2rYWzFXrvEBoh9CVyqSE7D6YFRJ1hydLHI6kbWw==}
|
||||
dependencies:
|
||||
|
@ -1452,6 +1687,10 @@ packages:
|
|||
engines: {node: '>=8'}
|
||||
dev: false
|
||||
|
||||
/array-timsort/1.0.3:
|
||||
resolution: {integrity: sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==}
|
||||
dev: false
|
||||
|
||||
/array-union/1.0.2:
|
||||
resolution: {integrity: sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
@ -1916,6 +2155,14 @@ packages:
|
|||
escape-string-regexp: 1.0.5
|
||||
dev: false
|
||||
|
||||
/clear-module/4.1.2:
|
||||
resolution: {integrity: sha512-LWAxzHqdHsAZlPlEyJ2Poz6AIs384mPeqLVCru2p0BrP9G/kVGuhNyZYClLO6cXlnuJjzC8xtsJIuMjKqLXoAw==}
|
||||
engines: {node: '>=8'}
|
||||
dependencies:
|
||||
parent-module: 2.0.0
|
||||
resolve-from: 5.0.0
|
||||
dev: false
|
||||
|
||||
/cliui/7.0.4:
|
||||
resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==}
|
||||
dependencies:
|
||||
|
@ -1995,6 +2242,22 @@ packages:
|
|||
engines: {node: '>= 10'}
|
||||
dev: false
|
||||
|
||||
/commander/9.4.0:
|
||||
resolution: {integrity: sha512-sRPT+umqkz90UA8M1yqYfnHlZA7fF6nSphDtxeywPZ49ysjxDQybzk13CL+mXekDRG92skbcqCLVovuCusNmFw==}
|
||||
engines: {node: ^12.20.0 || >=14}
|
||||
dev: false
|
||||
|
||||
/comment-json/4.2.3:
|
||||
resolution: {integrity: sha512-SsxdiOf064DWoZLH799Ata6u7iV658A11PlWtZATDlXPpKGJnbJZ5Z24ybixAi+LUUqJ/GKowAejtC5GFUG7Tw==}
|
||||
engines: {node: '>= 6'}
|
||||
dependencies:
|
||||
array-timsort: 1.0.3
|
||||
core-util-is: 1.0.3
|
||||
esprima: 4.0.1
|
||||
has-own-prop: 2.0.0
|
||||
repeat-string: 1.6.1
|
||||
dev: false
|
||||
|
||||
/commondir/1.0.1:
|
||||
resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==}
|
||||
dev: false
|
||||
|
@ -2023,6 +2286,18 @@ packages:
|
|||
proto-list: 1.2.4
|
||||
dev: false
|
||||
|
||||
/configstore/5.0.1:
|
||||
resolution: {integrity: sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==}
|
||||
engines: {node: '>=8'}
|
||||
dependencies:
|
||||
dot-prop: 5.3.0
|
||||
graceful-fs: 4.2.10
|
||||
make-dir: 3.1.0
|
||||
unique-string: 2.0.0
|
||||
write-file-atomic: 3.0.3
|
||||
xdg-basedir: 4.0.0
|
||||
dev: false
|
||||
|
||||
/connect-history-api-fallback/1.6.0:
|
||||
resolution: {integrity: sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==}
|
||||
engines: {node: '>=0.8'}
|
||||
|
@ -2085,6 +2360,10 @@ packages:
|
|||
requiresBuild: true
|
||||
dev: false
|
||||
|
||||
/core-util-is/1.0.3:
|
||||
resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==}
|
||||
dev: false
|
||||
|
||||
/cors/2.8.5:
|
||||
resolution: {integrity: sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==}
|
||||
engines: {node: '>= 0.10'}
|
||||
|
@ -2093,6 +2372,17 @@ packages:
|
|||
vary: 1.1.2
|
||||
dev: false
|
||||
|
||||
/cosmiconfig/7.0.1:
|
||||
resolution: {integrity: sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ==}
|
||||
engines: {node: '>=10'}
|
||||
dependencies:
|
||||
'@types/parse-json': 4.0.0
|
||||
import-fresh: 3.3.0
|
||||
parse-json: 5.2.0
|
||||
path-type: 4.0.0
|
||||
yaml: 1.10.2
|
||||
dev: false
|
||||
|
||||
/cross-env/7.0.3:
|
||||
resolution: {integrity: sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==}
|
||||
engines: {node: '>=10.14', npm: '>=6', yarn: '>=1'}
|
||||
|
@ -2122,6 +2412,108 @@ packages:
|
|||
resolution: {integrity: sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==}
|
||||
dev: false
|
||||
|
||||
/crypto-random-string/2.0.0:
|
||||
resolution: {integrity: sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==}
|
||||
engines: {node: '>=8'}
|
||||
dev: false
|
||||
|
||||
/cspell-gitignore/6.8.1:
|
||||
resolution: {integrity: sha512-GpLr0xoQQHk8IpDGhMY76EyThwSwfAOe5er5iDYlEFRsCp0sUnllXVSJunb4QZIcMl2zbj5lGgPuCvzKcjy3SQ==}
|
||||
engines: {node: '>=14'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
cspell-glob: 6.8.1
|
||||
find-up: 5.0.0
|
||||
dev: false
|
||||
|
||||
/cspell-glob/6.8.1:
|
||||
resolution: {integrity: sha512-LSiGN9ht4cJdr/zIuh6GlV0soYKPBNvQovhjYPFZZjvCbH7iIkTNxCuXBKylF1iorsH1jrTY88fmNBeYqkwuFA==}
|
||||
engines: {node: '>=14'}
|
||||
dependencies:
|
||||
micromatch: 4.0.5
|
||||
dev: false
|
||||
|
||||
/cspell-grammar/6.8.1:
|
||||
resolution: {integrity: sha512-VudDZLEplSlJeQwOtznfhj4gdVpKsQ2+I7zMMx9w4t6newDD8Ts6nUMg9BFC1j5LggBzuKAgo/QNMo5vU9MhGA==}
|
||||
engines: {node: '>=14'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@cspell/cspell-pipe': 6.8.1
|
||||
'@cspell/cspell-types': 6.8.1
|
||||
dev: false
|
||||
|
||||
/cspell-io/6.8.1:
|
||||
resolution: {integrity: sha512-rk6FOmehbeX4xE3uKNMTl0bZJkcuL17sB807uQCxp5CRfKvdv51nV1Sz7u1gVYiNy6UYBj7VO0V2w7TftqR24A==}
|
||||
engines: {node: '>=14'}
|
||||
dependencies:
|
||||
'@cspell/cspell-service-bus': 6.8.1
|
||||
node-fetch: 2.6.7
|
||||
transitivePeerDependencies:
|
||||
- encoding
|
||||
dev: false
|
||||
|
||||
/cspell-lib/6.8.1:
|
||||
resolution: {integrity: sha512-FzLSOg/IRClx9JfN2STg9KaoNwQsvKICviKjk0kdrRJywDUUA/uNL7KqI0khSWGPRVjPK2Itu9NpgB66Ux4xEA==}
|
||||
engines: {node: '>=14'}
|
||||
dependencies:
|
||||
'@cspell/cspell-bundled-dicts': 6.8.1
|
||||
'@cspell/cspell-pipe': 6.8.1
|
||||
'@cspell/cspell-types': 6.8.1
|
||||
clear-module: 4.1.2
|
||||
comment-json: 4.2.3
|
||||
configstore: 5.0.1
|
||||
cosmiconfig: 7.0.1
|
||||
cspell-glob: 6.8.1
|
||||
cspell-grammar: 6.8.1
|
||||
cspell-io: 6.8.1
|
||||
cspell-trie-lib: 6.8.1
|
||||
fast-equals: 4.0.3
|
||||
find-up: 5.0.0
|
||||
fs-extra: 10.1.0
|
||||
gensequence: 3.1.1
|
||||
import-fresh: 3.3.0
|
||||
resolve-from: 5.0.0
|
||||
resolve-global: 1.0.0
|
||||
vscode-languageserver-textdocument: 1.0.5
|
||||
vscode-uri: 3.0.3
|
||||
transitivePeerDependencies:
|
||||
- encoding
|
||||
dev: false
|
||||
|
||||
/cspell-trie-lib/6.8.1:
|
||||
resolution: {integrity: sha512-mCxs99615eGXc306M0ocWI+h74MKdr0rdZawNGg8k8r7K14dQAur79FBDWGgTR4ThlZ1KLV3p/5tulxP89nJSA==}
|
||||
engines: {node: '>=14'}
|
||||
dependencies:
|
||||
'@cspell/cspell-pipe': 6.8.1
|
||||
'@cspell/cspell-types': 6.8.1
|
||||
fs-extra: 10.1.0
|
||||
gensequence: 3.1.1
|
||||
dev: false
|
||||
|
||||
/cspell/6.8.1:
|
||||
resolution: {integrity: sha512-w+MCy9a7uMu0bwwDuFJy85SbF6pikCc6fzQo3B/hXuu+xrz12TCbjsXsdezTXl9YqPsUDN0A8A6AwHEN7t7GFw==}
|
||||
engines: {node: '>=14'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@cspell/cspell-pipe': 6.8.1
|
||||
chalk: 4.1.2
|
||||
commander: 9.4.0
|
||||
cspell-gitignore: 6.8.1
|
||||
cspell-glob: 6.8.1
|
||||
cspell-lib: 6.8.1
|
||||
fast-json-stable-stringify: 2.1.0
|
||||
file-entry-cache: 6.0.1
|
||||
fs-extra: 10.1.0
|
||||
get-stdin: 8.0.0
|
||||
glob: 8.0.3
|
||||
imurmurhash: 0.1.4
|
||||
semver: 7.3.7
|
||||
strip-ansi: 6.0.1
|
||||
vscode-uri: 3.0.3
|
||||
transitivePeerDependencies:
|
||||
- encoding
|
||||
dev: false
|
||||
|
||||
/css-color-keywords/1.0.0:
|
||||
resolution: {integrity: sha512-FyyrDHZKEjXDpNJYvVsV960FiqQyXc/LlYmsxl2BcdMb2WPx0OGRVgTg55rPSyLSNMqP52R9r8geSp7apN3Ofg==}
|
||||
engines: {node: '>=4'}
|
||||
|
@ -2913,6 +3305,13 @@ packages:
|
|||
tslib: 2.4.0
|
||||
dev: false
|
||||
|
||||
/dot-prop/5.3.0:
|
||||
resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==}
|
||||
engines: {node: '>=8'}
|
||||
dependencies:
|
||||
is-obj: 2.0.0
|
||||
dev: false
|
||||
|
||||
/drange/1.1.1:
|
||||
resolution: {integrity: sha512-pYxfDYpued//QpnLIm4Avk7rsNtAtQkUES2cwAYSvD/wd2pKD71gN2Ebj3e7klzXwjocvE8c5vx/1fxwpqmSxA==}
|
||||
engines: {node: '>=4'}
|
||||
|
@ -3561,6 +3960,10 @@ packages:
|
|||
resolution: {integrity: sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==}
|
||||
dev: false
|
||||
|
||||
/fast-equals/4.0.3:
|
||||
resolution: {integrity: sha512-G3BSX9cfKttjr+2o1O22tYMLq0DPluZnYtq1rXumE1SpL/F/SLIfHx08WYQoWSIpeMYf8sRbJ8++71+v6Pnxfg==}
|
||||
dev: false
|
||||
|
||||
/fast-glob/3.2.11:
|
||||
resolution: {integrity: sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==}
|
||||
engines: {node: '>=8.6.0'}
|
||||
|
@ -3752,6 +4155,15 @@ packages:
|
|||
resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==}
|
||||
dev: false
|
||||
|
||||
/fs-extra/10.1.0:
|
||||
resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==}
|
||||
engines: {node: '>=12'}
|
||||
dependencies:
|
||||
graceful-fs: 4.2.10
|
||||
jsonfile: 6.1.0
|
||||
universalify: 2.0.0
|
||||
dev: false
|
||||
|
||||
/fs-extra/3.0.1:
|
||||
resolution: {integrity: sha512-V3Z3WZWVUYd8hoCL5xfXJCaHWYzmtwW5XWYSlLgERi8PWd8bx1kUHUk8L1BT57e49oKnDDD180mjfrHc1yA9rg==}
|
||||
dependencies:
|
||||
|
@ -3780,6 +4192,11 @@ packages:
|
|||
resolution: {integrity: sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==}
|
||||
dev: false
|
||||
|
||||
/gensequence/3.1.1:
|
||||
resolution: {integrity: sha512-ys3h0hiteRwmY6BsvSttPmkhC0vEQHPJduANBRtH/dlDPZ0UBIb/dXy80IcckXyuQ6LKg+PloRqvGER9IS7F7g==}
|
||||
engines: {node: '>=10.0.0'}
|
||||
dev: false
|
||||
|
||||
/gensync/1.0.0-beta.2:
|
||||
resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
|
@ -3798,6 +4215,11 @@ packages:
|
|||
has-symbols: 1.0.3
|
||||
dev: false
|
||||
|
||||
/get-stdin/8.0.0:
|
||||
resolution: {integrity: sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==}
|
||||
engines: {node: '>=10'}
|
||||
dev: false
|
||||
|
||||
/github-from-package/0.0.0:
|
||||
resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==}
|
||||
dev: false
|
||||
|
@ -3849,6 +4271,13 @@ packages:
|
|||
once: 1.4.0
|
||||
dev: false
|
||||
|
||||
/global-dirs/0.1.1:
|
||||
resolution: {integrity: sha512-NknMLn7F2J7aflwFOlGdNIuCDpN3VGoSoB+aap3KABFWbHVn1TCgFC+np23J8W2BiZbjfEw3BFBycSMv1AFblg==}
|
||||
engines: {node: '>=4'}
|
||||
dependencies:
|
||||
ini: 1.3.8
|
||||
dev: false
|
||||
|
||||
/globals/11.12.0:
|
||||
resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==}
|
||||
engines: {node: '>=4'}
|
||||
|
@ -3963,6 +4392,11 @@ packages:
|
|||
engines: {node: '>=8'}
|
||||
dev: false
|
||||
|
||||
/has-own-prop/2.0.0:
|
||||
resolution: {integrity: sha512-Pq0h+hvsVm6dDEa8x82GnLSYHOzNDt7f0ddFa3FqcQlgzEiptPqL+XrOJNavjOzSYiYWIrgeVYYgGlLmnxwilQ==}
|
||||
engines: {node: '>=8'}
|
||||
dev: false
|
||||
|
||||
/has-symbols/1.0.3:
|
||||
resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
@ -4304,6 +4738,11 @@ packages:
|
|||
engines: {node: '>=0.12.0'}
|
||||
dev: false
|
||||
|
||||
/is-obj/2.0.0:
|
||||
resolution: {integrity: sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==}
|
||||
engines: {node: '>=8'}
|
||||
dev: false
|
||||
|
||||
/is-object/1.0.2:
|
||||
resolution: {integrity: sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==}
|
||||
dev: false
|
||||
|
@ -4340,6 +4779,10 @@ packages:
|
|||
has-tostringtag: 1.0.0
|
||||
dev: false
|
||||
|
||||
/is-typedarray/1.0.0:
|
||||
resolution: {integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==}
|
||||
dev: false
|
||||
|
||||
/is-unicode-supported/0.1.0:
|
||||
resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==}
|
||||
engines: {node: '>=10'}
|
||||
|
@ -4517,6 +4960,14 @@ packages:
|
|||
graceful-fs: 4.2.10
|
||||
dev: false
|
||||
|
||||
/jsonfile/6.1.0:
|
||||
resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==}
|
||||
dependencies:
|
||||
universalify: 2.0.0
|
||||
optionalDependencies:
|
||||
graceful-fs: 4.2.10
|
||||
dev: false
|
||||
|
||||
/jstransformer/1.0.0:
|
||||
resolution: {integrity: sha512-C9YK3Rf8q6VAPDCCU9fnqo3mAfOH6vUGnMcP4AQAYIEpWtfGLpwOTmZ+igtdK5y+VvI2n3CyYSzy4Qh34eq24A==}
|
||||
dependencies:
|
||||
|
@ -5237,6 +5688,13 @@ packages:
|
|||
callsites: 3.1.0
|
||||
dev: false
|
||||
|
||||
/parent-module/2.0.0:
|
||||
resolution: {integrity: sha512-uo0Z9JJeWzv8BG+tRcapBKNJ0dro9cLyczGzulS6EfeyAdeC9sbojtW6XwvYxJkEne9En+J2XEl4zyglVeIwFg==}
|
||||
engines: {node: '>=8'}
|
||||
dependencies:
|
||||
callsites: 3.1.0
|
||||
dev: false
|
||||
|
||||
/parse-entities/2.0.0:
|
||||
resolution: {integrity: sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==}
|
||||
dependencies:
|
||||
|
@ -5981,6 +6439,18 @@ packages:
|
|||
engines: {node: '>=4'}
|
||||
dev: false
|
||||
|
||||
/resolve-from/5.0.0:
|
||||
resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==}
|
||||
engines: {node: '>=8'}
|
||||
dev: false
|
||||
|
||||
/resolve-global/1.0.0:
|
||||
resolution: {integrity: sha512-zFa12V4OLtT5XUX/Q4VLvTfBf+Ok0SPc1FNGM/z9ctUdiU618qwKpWnd0CHs3+RqROfyEg/DhuHbMWYqcgljEw==}
|
||||
engines: {node: '>=8'}
|
||||
dependencies:
|
||||
global-dirs: 0.1.1
|
||||
dev: false
|
||||
|
||||
/resolve/1.22.1:
|
||||
resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==}
|
||||
hasBin: true
|
||||
|
@ -6798,6 +7268,12 @@ packages:
|
|||
underscore: 1.13.4
|
||||
dev: false
|
||||
|
||||
/typedarray-to-buffer/3.1.5:
|
||||
resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==}
|
||||
dependencies:
|
||||
is-typedarray: 1.0.0
|
||||
dev: false
|
||||
|
||||
/typescript/4.8.2:
|
||||
resolution: {integrity: sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==}
|
||||
engines: {node: '>=4.2.0'}
|
||||
|
@ -6838,11 +7314,23 @@ packages:
|
|||
resolution: {integrity: sha512-BQFnUDuAQ4Yf/cYY5LNrK9NCJFKriaRbD9uR1fTeXnBeoa97W0i41qkZfGO9pSo8I5KzjAcSY2XYtdf0oKd7KQ==}
|
||||
dev: false
|
||||
|
||||
/unique-string/2.0.0:
|
||||
resolution: {integrity: sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==}
|
||||
engines: {node: '>=8'}
|
||||
dependencies:
|
||||
crypto-random-string: 2.0.0
|
||||
dev: false
|
||||
|
||||
/universalify/0.1.2:
|
||||
resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==}
|
||||
engines: {node: '>= 4.0.0'}
|
||||
dev: false
|
||||
|
||||
/universalify/2.0.0:
|
||||
resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==}
|
||||
engines: {node: '>= 10.0.0'}
|
||||
dev: false
|
||||
|
||||
/unpipe/1.0.0:
|
||||
resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==}
|
||||
engines: {node: '>= 0.8'}
|
||||
|
@ -7045,6 +7533,10 @@ packages:
|
|||
resolution: {integrity: sha512-gu73tuZfJgu+mvCSy4UZwd2JXykjK9zAZsfmDeut5dx/1a7FeTk0XwJsSuqQn+cuMCGVbIBfl+s53X4T19DnzQ==}
|
||||
dev: false
|
||||
|
||||
/vscode-uri/3.0.3:
|
||||
resolution: {integrity: sha512-EcswR2S8bpR7fD0YPeS7r2xXExrScVMxg4MedACaWHEtx9ftCF/qHG1xGkolzTPcEmjTavCQgbVzHUIdTMzFGA==}
|
||||
dev: false
|
||||
|
||||
/w3c-hr-time/1.0.2:
|
||||
resolution: {integrity: sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==}
|
||||
dependencies:
|
||||
|
@ -7173,6 +7665,15 @@ packages:
|
|||
resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==}
|
||||
dev: false
|
||||
|
||||
/write-file-atomic/3.0.3:
|
||||
resolution: {integrity: sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==}
|
||||
dependencies:
|
||||
imurmurhash: 0.1.4
|
||||
is-typedarray: 1.0.0
|
||||
signal-exit: 3.0.7
|
||||
typedarray-to-buffer: 3.1.5
|
||||
dev: false
|
||||
|
||||
/ws/8.2.3:
|
||||
resolution: {integrity: sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==}
|
||||
engines: {node: '>=10.0.0'}
|
||||
|
@ -7199,6 +7700,11 @@ packages:
|
|||
optional: true
|
||||
dev: false
|
||||
|
||||
/xdg-basedir/4.0.0:
|
||||
resolution: {integrity: sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==}
|
||||
engines: {node: '>=8'}
|
||||
dev: false
|
||||
|
||||
/xml-but-prettier/1.0.1:
|
||||
resolution: {integrity: sha512-C2CJaadHrZTqESlH03WOyw0oZTtoy2uEg6dSDF6YRg+9GnYNub53RRemLpnvtbHDFelxMx4LajiFsYeR6XJHgQ==}
|
||||
dependencies:
|
||||
|
@ -7263,6 +7769,11 @@ packages:
|
|||
resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==}
|
||||
dev: false
|
||||
|
||||
/yaml/1.10.2:
|
||||
resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==}
|
||||
engines: {node: '>= 6'}
|
||||
dev: false
|
||||
|
||||
/yargs-parser/20.2.4:
|
||||
resolution: {integrity: sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==}
|
||||
engines: {node: '>=10'}
|
||||
|
@ -7536,7 +8047,7 @@ packages:
|
|||
dev: false
|
||||
|
||||
file:projects/internal-build-utils.tgz:
|
||||
resolution: {integrity: sha512-5aS803ocYT+hD2ohP9g5O59k9ms2YUYe9WWZ5fBqP+eMFK5zbrj8aSl5CpuhPbrCQ2yJZUVgurUtS6RdorX9/A==, tarball: file:projects/internal-build-utils.tgz}
|
||||
resolution: {integrity: sha512-CTTuoXt20viB4UCT3CU0IApsfXRvxhyuSjBEA/lYk+hO4qzjUjT411p3GXux3RTh3tkf0zgglGBQ1a4ZPf0F1w==, tarball: file:projects/internal-build-utils.tgz}
|
||||
name: '@rush-temp/internal-build-utils'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
|
@ -7545,6 +8056,7 @@ packages:
|
|||
'@types/watch': 1.0.3
|
||||
'@types/yargs': 17.0.10
|
||||
c8: 7.11.3
|
||||
cspell: 6.8.1
|
||||
eslint: 8.21.0
|
||||
mocha: 9.2.2
|
||||
mocha-junit-reporter: 2.0.2_mocha@9.2.2
|
||||
|
@ -7555,6 +8067,7 @@ packages:
|
|||
watch: 1.0.2
|
||||
yargs: 17.3.1
|
||||
transitivePeerDependencies:
|
||||
- encoding
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
|
|
|
@ -0,0 +1,75 @@
|
|||
version: "0.2"
|
||||
language: en
|
||||
allowCompoundWords: true
|
||||
dictionaries:
|
||||
- node
|
||||
- typescript
|
||||
words:
|
||||
- autorest
|
||||
- azsdkengsys
|
||||
- azurecr
|
||||
- blockful
|
||||
- blockless
|
||||
- cadl
|
||||
- Contoso
|
||||
- CRUDL
|
||||
- dogfood
|
||||
- eastus
|
||||
- ecmarkup
|
||||
- esbuild
|
||||
- globby
|
||||
- inmemory
|
||||
- instanceid
|
||||
- intrinsics
|
||||
- jsyaml
|
||||
- msbuild
|
||||
- MSRC
|
||||
- munge
|
||||
- mylib
|
||||
- nostdlib
|
||||
- oapi
|
||||
- oneof
|
||||
- onig
|
||||
- onigasm
|
||||
- onwarn
|
||||
- openapi
|
||||
- openapiv
|
||||
- picocolors
|
||||
- proto
|
||||
- protobuf
|
||||
- protoc
|
||||
- regen
|
||||
- rpaas
|
||||
- rushx
|
||||
- safeint
|
||||
- strs
|
||||
- TRYIT
|
||||
- TSES
|
||||
- Uhoh
|
||||
- unassignable
|
||||
- Uncapitalize
|
||||
- uninstantiated
|
||||
- unioned
|
||||
- unprojected
|
||||
- unsourced
|
||||
- unversioned
|
||||
- vsix
|
||||
- vswhere
|
||||
- westus
|
||||
- xplat
|
||||
ignorePaths:
|
||||
- "**/node_modules/**"
|
||||
- "**/dist/**"
|
||||
- "**/dist-dev/**"
|
||||
- "**/CHANGELOG.md"
|
||||
- "common/scripts/*"
|
||||
enableFiletypes:
|
||||
- cadl
|
||||
patterns:
|
||||
- name: cursortest
|
||||
pattern: /(.*)┆(.*)/g
|
||||
- name: base64
|
||||
pattern: /\b(.*)==/g
|
||||
ignoreRegExpList:
|
||||
- cursortest
|
||||
- base64
|
|
@ -32,7 +32,7 @@ Update uses of the type names on the left with the type names on the right. The
|
|||
## [CADL] Rename `Page` to `CollectionWithNextLink`
|
||||
|
||||
In library `@cadl-lang/rest` in `Cadl.Rest.Resources` namespace the `Page` model was renamed to `CollectionWithNextLink`.
|
||||
This resolve an issue with `Page` being to generic of a name for this very opiniated model.
|
||||
This resolve an issue with `Page` being to generic of a name for this very opinionated model.
|
||||
|
||||
Before
|
||||
|
||||
|
|
|
@ -198,7 +198,7 @@ API authors often need to describe API shapes in terms of specific literal value
|
|||
|
||||
```cadl
|
||||
model BestDog {
|
||||
name: "Suki";
|
||||
name: "Max";
|
||||
age: 14;
|
||||
best: true;
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ String literal types can also be created using the triple-quote syntax which ena
|
|||
```cadl
|
||||
model Dog {
|
||||
favoriteFoods: """
|
||||
McDonalds
|
||||
McDonald's
|
||||
Chipotle
|
||||
And so on
|
||||
""";
|
||||
|
@ -655,7 +655,7 @@ Consider the following example:
|
|||
|
||||
```cadl
|
||||
model Dog {
|
||||
// the service will generate an ID, so you dont need to send it.
|
||||
// the service will generate an ID, so you don't need to send it.
|
||||
@visibility("read") id: int32;
|
||||
// the service will store this secret name, but won't ever return it
|
||||
@visibility("write") secretName: string;
|
||||
|
@ -942,7 +942,7 @@ namespace PetToys {
|
|||
|
||||
#### Request & response bodies
|
||||
|
||||
Request and response bodies can be declared explictly using the `@body` decorator. Let's add an endpoint to create a pet. Let's also use this decorator for the responses, although this doesn't change anything about the API.
|
||||
Request and response bodies can be declared explicitly using the `@body` decorator. Let's add an endpoint to create a pet. Let's also use this decorator for the responses, although this doesn't change anything about the API.
|
||||
|
||||
```cadl
|
||||
@route("/pets")
|
||||
|
@ -981,7 +981,7 @@ A pattern often used in REST APIs is to define a request or response body as hav
|
|||
"discriminator" indicating which actual shape is used for a particular instance.
|
||||
Cadl supports this pattern with the `@discriminator` decorator of the Rest library.
|
||||
|
||||
The `@discrminator` decorator takes one argument, the name of the discriminator property, and should be placed on the
|
||||
The `@discriminator` decorator takes one argument, the name of the discriminator property, and should be placed on the
|
||||
model for the request or response body. The different shapes are then defined by separate models that `extend` this request or response model.
|
||||
The discriminator property is defined in the "child" models with the value or values that indicate an instance that conforms to its shape.
|
||||
|
||||
|
|
|
@ -74,6 +74,10 @@ steps:
|
|||
- script: node eng/scripts/check-for-changed-files.js
|
||||
displayName: Check Git Status For Changed Files
|
||||
|
||||
- script: rush cspell
|
||||
displayName: Spell check
|
||||
condition: ne(variables['Agent.OS'], 'Windows_NT')
|
||||
|
||||
- script: rush e2e
|
||||
displayName: E2E Tests
|
||||
# Skipping e2e test on windows node 16.x as there is a bug with npm and it doesn't seem to want to update correctly.
|
||||
|
|
|
@ -3,7 +3,7 @@ import { execSync } from "child_process";
|
|||
import https from "https";
|
||||
|
||||
const AZP_USERID = "azure-pipelines[bot]";
|
||||
const TRYID_COMMENT_IDENTIFIER = "_CADL_TRYIT_COMMENT_";
|
||||
const TRY_ID_COMMENT_IDENTIFIER = "_CADL_TRYIT_COMMENT_";
|
||||
main().catch((e) => {
|
||||
console.error(e);
|
||||
// @ts-ignore
|
||||
|
@ -33,7 +33,7 @@ async function main() {
|
|||
const azoComments = data.filter((x) => x.user?.login === AZP_USERID);
|
||||
console.log(`Found ${azoComments.length} comment(s) from Azure Pipelines.`);
|
||||
|
||||
const tryItComments = data.filter((x) => x.body.includes(TRYID_COMMENT_IDENTIFIER));
|
||||
const tryItComments = data.filter((x) => x.body.includes(TRY_ID_COMMENT_IDENTIFIER));
|
||||
console.log(`Found ${azoComments.length} Cadl Try It comment(s)`);
|
||||
if (tryItComments.length > 0) {
|
||||
console.log("##vso[task.setvariable variable=SKIP_COMMENT;]true");
|
||||
|
@ -41,7 +41,7 @@ async function main() {
|
|||
}
|
||||
|
||||
const comment = [
|
||||
`<!-- ${TRYID_COMMENT_IDENTIFIER} -->`,
|
||||
`<!-- ${TRY_ID_COMMENT_IDENTIFIER} -->`,
|
||||
`You can try these changes at https://cadlplayground.z22.web.core.windows.net${folderName}/prs/${prNumber}/`,
|
||||
"",
|
||||
`Check the website changes at https://cadlwebsite.z1.web.core.windows.net${folderName}/prs/${prNumber}/`,
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
// @ts-check
|
||||
import { resolve } from "path";
|
||||
import { repoRoot } from "./helpers.js";
|
||||
import { run, xplatCmd } from "../../packages/internal-build-utils/dist/src/index.js";
|
||||
export const cspell = xplatCmd(
|
||||
resolve(repoRoot, "packages/internal-build-utils/node_modules/.bin/cspell")
|
||||
);
|
||||
|
||||
await run(
|
||||
cspell,
|
||||
["**/*.md", "**/*.ts", "**/*.js", "**/changelog.json", "common/changes/**/*.json"],
|
||||
{
|
||||
cwd: repoRoot,
|
||||
}
|
||||
);
|
|
@ -13,7 +13,7 @@ See https://github.com/microsoft/cadl#installing-visual-studio-extension for ins
|
|||
|
||||
```json
|
||||
{
|
||||
"cadl.cadl-server.path": "${workspaceFolder}/mynestedproject/node_modules/@cadl-lang/compiler"
|
||||
"cadl.cadl-server.path": "${workspaceFolder}/my-nested-project/node_modules/@cadl-lang/compiler"
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -21,4 +21,4 @@ Cadl wil interpolate a few variables using this pattern `${<name>}`. For example
|
|||
|
||||
Available variables:
|
||||
|
||||
- `workspaceFolder`: Corespond to the root of your Visual Studio workspace.
|
||||
- `workspaceFolder`: Correspond to the root of your Visual Studio workspace.
|
||||
|
|
|
@ -21,6 +21,6 @@ This setting provides the ability to configure where the cadl compiler is locate
|
|||
|
||||
```json
|
||||
{
|
||||
"cadl.cadl-server.path": "${workspaceFolder}/mynestedproject/node_modules/@cadl-lang/compiler"
|
||||
"cadl.cadl-server.path": "${workspaceFolder}/my-nested-project/node_modules/@cadl-lang/compiler"
|
||||
}
|
||||
```
|
||||
|
|
|
@ -56,14 +56,14 @@ async function launchLanguageClient(context: ExtensionContext) {
|
|||
if (typeof e === "string" && e.startsWith("Launching server using command")) {
|
||||
client?.error(
|
||||
[
|
||||
`Cadl server exectuable was not found: '${exe.command}' is not found. Make sure either:`,
|
||||
`Cadl server executable was not found: '${exe.command}' is not found. Make sure either:`,
|
||||
" - cadl is installed globally with `npm install -g @cadl-lang/compiler'.",
|
||||
" - cadl server path is configured with https://github.com/microsoft/cadl#installing-vs-code-extension.",
|
||||
].join("\n"),
|
||||
undefined,
|
||||
false
|
||||
);
|
||||
throw `Cadl server exectuable was not found: '${exe.command}' is not found.`;
|
||||
throw `Cadl server executable was not found: '${exe.command}' is not found.`;
|
||||
} else {
|
||||
throw e;
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"comment": "Internal: Facilitate adding new tokens to scanner.\""
|
||||
},
|
||||
{
|
||||
"comment": "Formatter: Cadl doesn't include blank line at the end of embeded markdown codeblock"
|
||||
"comment": "Formatter: Cadl doesn't include blank line at the end of embedded markdown codeblock"
|
||||
},
|
||||
{
|
||||
"comment": "Fix issue with ever-increasing duplicate symbol errors in IDE"
|
||||
|
@ -26,7 +26,7 @@
|
|||
"comment": "Fix additional issues for decorators not running in projections in templated type instance"
|
||||
},
|
||||
{
|
||||
"comment": "Internal: Fix some functionatliy not compatible in the browser"
|
||||
"comment": "Internal: Fix some functionally not compatible in the browser"
|
||||
},
|
||||
{
|
||||
"comment": "Fix issue where decorators would get called on uninstantiated template declarations"
|
||||
|
@ -155,7 +155,7 @@
|
|||
"comment": "Add DefaultKeyVisibility<T, Visibility> and @withDefaultKeyVisibility to assign a default visibility value to model @key properties in specific operation signatures"
|
||||
},
|
||||
{
|
||||
"comment": "Fix: Referencing previous template parameter in template parameter defaul"
|
||||
"comment": "Fix: Referencing previous template parameter in template parameter default"
|
||||
},
|
||||
{
|
||||
"comment": "Fix bug in finding effective type"
|
||||
|
@ -185,7 +185,7 @@
|
|||
"comment": "Fix: Couldn't use operation defined inside interfaces as signature."
|
||||
},
|
||||
{
|
||||
"comment": "Fix uninitialzed parent namespaces in projections"
|
||||
"comment": "Fix uninitialized parent namespaces in projections"
|
||||
},
|
||||
{
|
||||
"comment": "Run projections on types returned from getEffectiveType"
|
||||
|
@ -273,7 +273,7 @@
|
|||
"comment": "Improve error message when loading library with invalid `main` file"
|
||||
},
|
||||
{
|
||||
"comment": "Added new decorator signatgure validation helper"
|
||||
"comment": "Added new decorator signature validation helper"
|
||||
},
|
||||
{
|
||||
"comment": "Allow empty tuples"
|
||||
|
@ -501,7 +501,7 @@
|
|||
"comment": "Fix formatting of comment between decorator and property"
|
||||
},
|
||||
{
|
||||
"comment": "Fix using `&` with tempalte parameters"
|
||||
"comment": "Fix using `&` with template parameters"
|
||||
},
|
||||
{
|
||||
"comment": "Support browser builds"
|
||||
|
@ -524,7 +524,7 @@
|
|||
"comment": "Prevent decorators from running if arguments are errors."
|
||||
},
|
||||
{
|
||||
"comment": "Handle unknown identfier/error types used in spread operator."
|
||||
"comment": "Handle unknown identifier/error types used in spread operator."
|
||||
},
|
||||
{
|
||||
"comment": "Add parent .model to ModelTypeProperty"
|
||||
|
@ -687,7 +687,7 @@
|
|||
"comment": "Fix error with file ending with mutline comment"
|
||||
},
|
||||
{
|
||||
"comment": "**Fix** issue when loading cadl using a different casing than the actual casing in a case insenstivie file system"
|
||||
"comment": "**Fix** issue when loading cadl using a different casing than the actual casing in a case insensitive file system"
|
||||
},
|
||||
{
|
||||
"comment": "Add @friendlyName decorator to customize model names for emitters"
|
||||
|
@ -713,7 +713,7 @@
|
|||
"comment": "Add @error decorator in core"
|
||||
},
|
||||
{
|
||||
"comment": "**Added** --emit flag to configure the emitter(s) to use and seperate library imports from emitters"
|
||||
"comment": "**Added** --emit flag to configure the emitter(s) to use and separate library imports from emitters"
|
||||
},
|
||||
{
|
||||
"comment": "Add directory manipulation to CompilerHost"
|
||||
|
@ -769,7 +769,7 @@
|
|||
"comment": "**Formatter** fix issues with empty model and interface with comments being moved outside."
|
||||
},
|
||||
{
|
||||
"comment": "**Formatter** fix crash when having a comment in anynoymous empty model."
|
||||
"comment": "**Formatter** fix crash when having a comment in anonymous empty model."
|
||||
},
|
||||
{
|
||||
"comment": "**Formatter** fix crash when using multi-line comment without each line starting with `*`."
|
||||
|
@ -778,7 +778,7 @@
|
|||
"comment": "**Formatter** Tweak formatting of interface mixes that overflow."
|
||||
},
|
||||
{
|
||||
"comment": "**Formatter** Keep single value decroator inline."
|
||||
"comment": "**Formatter** Keep single value decorator inline."
|
||||
},
|
||||
{
|
||||
"comment": "**Formatter** Keep empty line seperation in interface similar to namespace (Only keeps 1 max between operation)."
|
||||
|
@ -1057,7 +1057,7 @@
|
|||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "Add support for discovering updatabale properties using visibility"
|
||||
"comment": "Add support for discovering updatable properties using visibility"
|
||||
},
|
||||
{
|
||||
"comment": "Fix error in `cadl vs uninstall` command"
|
||||
|
@ -1290,7 +1290,7 @@
|
|||
"comment": "Fix issue where dynamic namespaces were not evaluated"
|
||||
},
|
||||
{
|
||||
"comment": "Virtualize writting to filesytem to enable programtic usage of adl"
|
||||
"comment": "Virtualize writting to filesystem to enable programtic usage of adl"
|
||||
}
|
||||
],
|
||||
"minor": [
|
||||
|
|
|
@ -62,7 +62,7 @@ Thu, 11 Aug 2022 19:05:23 GMT
|
|||
- Fix: Allow omiting optional properties
|
||||
- Improve `cloneType` implementation to duplicate decorator lists correctly
|
||||
- Add DefaultKeyVisibility<T, Visibility> and @withDefaultKeyVisibility to assign a default visibility value to model @key properties in specific operation signatures
|
||||
- Fix: Referencing previous template parameter in template parameter defaul
|
||||
- Fix: Referencing previous template parameter in template parameter default
|
||||
- Fix bug in finding effective type
|
||||
- Fix issue with required parentheses being dropped with union, intersection and array expressions
|
||||
- Fix issue with formatting multi line tuple adding trailing comma.
|
||||
|
@ -72,7 +72,7 @@ Thu, 11 Aug 2022 19:05:23 GMT
|
|||
- Fix issue with projection of nested namespace passing partial projected element to decorators
|
||||
- Fix: Operation signature with circular reference causing crash and updated message+code to be relevant to operations.
|
||||
- Fix: Couldn't use operation defined inside interfaces as signature.
|
||||
- Fix uninitialzed parent namespaces in projections
|
||||
- Fix uninitialized parent namespaces in projections
|
||||
- Run projections on types returned from getEffectiveType
|
||||
- Fix: Issue with Nested namespace in projection causing versioning library to fail when Service is using nested namespace
|
||||
- Internal: union variant type has reference to parent union.
|
||||
|
@ -106,7 +106,7 @@ Mon, 13 Jun 2022 23:42:28 GMT
|
|||
### Minor changes
|
||||
|
||||
- Improve error message when loading library with invalid `main` file
|
||||
- Added new decorator signatgure validation helper
|
||||
- Added new decorator signature validation helper
|
||||
- Allow empty tuples
|
||||
- Add helper functions to work with diagnostics in accessor functions
|
||||
- Add diagnostics target to decorator context
|
||||
|
@ -182,7 +182,7 @@ Thu, 31 Mar 2022 17:10:49 GMT
|
|||
- Add new helper `cadlTypeToJson` to convert cadl type to a Json serializable type
|
||||
- Add helper methods to detect `void` and `never` types
|
||||
- Prevent decorators from running if arguments are errors.
|
||||
- Handle unknown identfier/error types used in spread operator.
|
||||
- Handle unknown identifier/error types used in spread operator.
|
||||
- Add parent .model to ModelTypeProperty
|
||||
- Add validation that template params cannot use latter params as default
|
||||
|
||||
|
@ -193,7 +193,7 @@ Thu, 31 Mar 2022 17:10:49 GMT
|
|||
- Fix formatting of comment between decorator and statement
|
||||
- Fix resolving location for diagnostic in js files
|
||||
- Fix formatting of comment between decorator and property
|
||||
- Fix using `&` with tempalte parameters
|
||||
- Fix using `&` with template parameters
|
||||
- Support browser builds
|
||||
- Fix issues with mishandled promises
|
||||
- Fix cascade of error when having unexpected token in directive
|
||||
|
@ -258,7 +258,7 @@ Fri, 04 Feb 2022 18:00:18 GMT
|
|||
|
||||
- Validate for `@doc` decorator argument is a string
|
||||
- Add @error decorator in core
|
||||
- **Added** --emit flag to configure the emitter(s) to use and seperate library imports from emitters
|
||||
- **Added** --emit flag to configure the emitter(s) to use and separate library imports from emitters
|
||||
- Add directory manipulation to CompilerHost
|
||||
- Update to syntax tree to be readonly
|
||||
- Formatter: Separate Enum members with decorator with new lines
|
||||
|
@ -274,7 +274,7 @@ Fri, 04 Feb 2022 18:00:18 GMT
|
|||
- **Fix** Diagnostic location for invalid use of templated models
|
||||
- Fix path normalization issue that caused diagnostics from language server to be dropped.
|
||||
- Fix error with file ending with mutline comment
|
||||
- **Fix** issue when loading cadl using a different casing than the actual casing in a case insenstivie file system
|
||||
- **Fix** issue when loading cadl using a different casing than the actual casing in a case insensitive file system
|
||||
- Add @friendlyName decorator to customize model names for emitters
|
||||
- Fix issue where identifiers could be confused with keywords when they had common endings.
|
||||
- Renaming @format decorator to @pattern.
|
||||
|
@ -299,10 +299,10 @@ Thu, 16 Dec 2021 08:02:20 GMT
|
|||
- **Fix** Circular reference in `alias` now emit a diagnostic instead of crashing
|
||||
- **Fix** Circular reference between template model and non template model causing unresolved types issues.
|
||||
- **Formatter** fix issues with empty model and interface with comments being moved outside.
|
||||
- **Formatter** fix crash when having a comment in anynoymous empty model.
|
||||
- **Formatter** fix crash when having a comment in anonymous empty model.
|
||||
- **Formatter** fix crash when using multi-line comment without each line starting with `*`.
|
||||
- **Formatter** Tweak formatting of interface mixes that overflow.
|
||||
- **Formatter** Keep single value decroator inline.
|
||||
- **Formatter** Keep single value decorator inline.
|
||||
- **Formatter** Keep empty line seperation in interface similar to namespace (Only keeps 1 max between operation).
|
||||
- Add support for `interface` as a `@tag` decorator target
|
||||
- Reintroduce @list decorator to assist with collection operations
|
||||
|
@ -437,7 +437,7 @@ Fri, 13 Aug 2021 19:10:21 GMT
|
|||
|
||||
### Patches
|
||||
|
||||
- Add support for discovering updatabale properties using visibility
|
||||
- Add support for discovering updatable properties using visibility
|
||||
- Fix error in `cadl vs uninstall` command
|
||||
|
||||
## 0.17.0
|
||||
|
@ -558,7 +558,7 @@ Tue, 20 Apr 2021 15:23:29 GMT
|
|||
### Patches
|
||||
|
||||
- Fix issue where dynamic namespaces were not evaluated
|
||||
- Virtualize writting to filesytem to enable programtic usage of adl
|
||||
- Virtualize writting to filesystem to enable programtic usage of adl
|
||||
|
||||
## 0.8.0
|
||||
Tue, 06 Apr 2021 01:23:07 GMT
|
||||
|
|
|
@ -163,7 +163,7 @@ export interface Checker {
|
|||
* Check if the source type can be assigned to the target type.
|
||||
* @param source Source type, should be assignable to the target.
|
||||
* @param target Target type
|
||||
* @param diagnosticTarget Target for the diagnostic, unless something better can be inffered.
|
||||
* @param diagnosticTarget Target for the diagnostic, unless something better can be inferred.
|
||||
* @returns [related, list of diagnostics]
|
||||
*/
|
||||
isTypeAssignableTo(
|
||||
|
@ -3682,7 +3682,7 @@ export function createChecker(program: Program): Checker {
|
|||
* Check if the source type can be assigned to the target type and emit diagnostics
|
||||
* @param source Source type
|
||||
* @param target Target type
|
||||
* @param diagnosticTarget Target for the diagnostic, unless something better can be inffered.
|
||||
* @param diagnosticTarget Target for the diagnostic, unless something better can be inferred.
|
||||
*/
|
||||
function checkTypeAssignable(
|
||||
source: Type,
|
||||
|
@ -3700,7 +3700,7 @@ export function createChecker(program: Program): Checker {
|
|||
* Check if the source type can be assigned to the target type.
|
||||
* @param source Source type
|
||||
* @param target Target type
|
||||
* @param diagnosticTarget Target for the diagnostic, unless something better can be inffered.
|
||||
* @param diagnosticTarget Target for the diagnostic, unless something better can be inferred.
|
||||
*/
|
||||
function isTypeAssignableTo(
|
||||
source: Type,
|
||||
|
@ -3790,7 +3790,7 @@ export function createChecker(program: Program): Checker {
|
|||
|
||||
function isNumericLiteralRelatedTo(
|
||||
source: NumericLiteral,
|
||||
targetInstrinsicType:
|
||||
targetIntrinsicType:
|
||||
| "int64"
|
||||
| "int32"
|
||||
| "int16"
|
||||
|
@ -3806,12 +3806,12 @@ export function createChecker(program: Program): Checker {
|
|||
| "integer"
|
||||
| "float"
|
||||
) {
|
||||
if (targetInstrinsicType === "numeric") return true;
|
||||
if (targetIntrinsicType === "numeric") return true;
|
||||
const isInt = Number.isInteger(source.value);
|
||||
if (targetInstrinsicType === "integer") return isInt;
|
||||
if (targetInstrinsicType === "float") return true;
|
||||
if (targetIntrinsicType === "integer") return isInt;
|
||||
if (targetIntrinsicType === "float") return true;
|
||||
|
||||
const [low, high, options] = numericRanges[targetInstrinsicType];
|
||||
const [low, high, options] = numericRanges[targetIntrinsicType];
|
||||
return source.value >= low && source.value <= high && (!options.int || isInt);
|
||||
}
|
||||
|
||||
|
@ -3893,7 +3893,7 @@ export function createChecker(program: Program): Checker {
|
|||
/**
|
||||
* @param constraintType Type of the constraints(All properties must have this type).
|
||||
* @param type Type of the model that should be respecting the constraint.
|
||||
* @param diagnosticTarget Diagnostic target unless something better can be inffered.
|
||||
* @param diagnosticTarget Diagnostic target unless something better can be inferred.
|
||||
*/
|
||||
function isIndexConstraintValid(
|
||||
constraintType: Type,
|
||||
|
|
|
@ -414,7 +414,7 @@ function resolveEmitters(
|
|||
options: Record<string | "miscOptions", Record<string, unknown>>,
|
||||
args: CompileCliArgs
|
||||
): Record<string, Record<string, unknown> | boolean> {
|
||||
const emitters = resovleSelectedEmittersFromConfig(config, args.emit);
|
||||
const emitters = resolveSelectedEmittersFromConfig(config, args.emit);
|
||||
|
||||
const configuredEmitters: Record<string, Record<string, unknown> | boolean> = {};
|
||||
|
||||
|
@ -434,7 +434,7 @@ function resolveEmitters(
|
|||
return configuredEmitters;
|
||||
}
|
||||
|
||||
function resovleSelectedEmittersFromConfig(
|
||||
function resolveSelectedEmittersFromConfig(
|
||||
config: CadlConfig,
|
||||
selectedEmitters: string[] | undefined
|
||||
): Record<string, Record<string, unknown> | boolean> {
|
||||
|
|
|
@ -396,7 +396,7 @@ export interface DiagnosticCollector {
|
|||
/**
|
||||
* Wrap the given value in a tuple including the diagnostics following the Cadl accessor pattern.
|
||||
* @param value Accessor value to return
|
||||
* @exmaple return diagnostics.wrap(routes);
|
||||
* @example return diagnostics.wrap(routes);
|
||||
*/
|
||||
wrap<T>(value: T): DiagnosticResult<T>;
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ if ((globalThis as any)[globalLibraryUrlsLoadedSym] === undefined) {
|
|||
const loadedUrls = (globalThis as any)[globalLibraryUrlsLoadedSym];
|
||||
|
||||
/**
|
||||
* @internal List of urls that used `createCadlLibary`. Used to keep track of the loaded version of library and make sure they are compatible.
|
||||
* @internal List of urls that used `createCadlLibrary`. Used to keep track of the loaded version of library and make sure they are compatible.
|
||||
*/
|
||||
export function getLibraryUrlsLoaded(): Set<string> {
|
||||
return loadedUrls;
|
||||
|
|
|
@ -1968,9 +1968,9 @@ export function parse(code: string | SourceFile, options: ParseOptions = {}): Ca
|
|||
// reach the close token.
|
||||
break;
|
||||
} else if (atEndOfListWithError(kind)) {
|
||||
// Error recovery: If a list *is* surrounded by punctionation, then
|
||||
// Error recovery: If a list *is* surrounded by punctuation, then
|
||||
// the list ends at statement keyword or end-of-file under the
|
||||
// assumption that the closing delimter is missing. This check is
|
||||
// assumption that the closing delimiter is missing. This check is
|
||||
// duplicated from above to preempt the parseExpected(delimeter)
|
||||
// below.
|
||||
parseExpected(kind.close);
|
||||
|
|
|
@ -705,7 +705,7 @@ export async function createProgram(
|
|||
|
||||
/**
|
||||
* Resolve the path to the main file
|
||||
* @param path path to the entrypoint of the program. Can be the main.cadl, folder containg main.cadl or a project/library root.
|
||||
* @param path path to the entrypoint of the program. Can be the main.cadl, folder containing main.cadl or a project/library root.
|
||||
* @returns Absolute path to the entrypoint.
|
||||
*/
|
||||
async function resolveCadlEntrypoint(path: string): Promise<string | undefined> {
|
||||
|
|
|
@ -144,7 +144,7 @@ export function createProjectionMembers(checker: Checker): {
|
|||
renameVariant(base) {
|
||||
return createFunctionType((oldNameT: Type, newNameT: Type) => {
|
||||
assertType("old variant name", oldNameT, "String");
|
||||
assertType("new vaariant name", newNameT, "String");
|
||||
assertType("new variant name", newNameT, "String");
|
||||
const oldName = oldNameT.value;
|
||||
const newName = newNameT.value;
|
||||
|
||||
|
|
|
@ -775,7 +775,7 @@ export function createScanner(
|
|||
if (pos < end) {
|
||||
if (isCrlf(pos, start, end)) {
|
||||
// CRLF in multi-line string is normalized to LF in string value.
|
||||
// This keeps program behavior unchanged by line-eding conversion.
|
||||
// This keeps program behavior unchanged by line-ending conversion.
|
||||
result += input.substring(start, pos);
|
||||
result += "\n";
|
||||
pos += 2;
|
||||
|
|
|
@ -1190,7 +1190,7 @@ export interface SourceFile {
|
|||
*
|
||||
* This is used only for diagnostics. The command line compiler will populate
|
||||
* it with the actual path from which the file was read, but it can actually
|
||||
* be an aribitrary name for other scenarios.
|
||||
* be an arbitrary name for other scenarios.
|
||||
*/
|
||||
readonly path: string;
|
||||
|
||||
|
@ -1505,7 +1505,7 @@ export interface DecoratorContext {
|
|||
/**
|
||||
* Helper to call out to another decorator
|
||||
* @param decorator Other decorator function
|
||||
* @param args Args to pass to other decorator funciton
|
||||
* @param args Args to pass to other decorator function
|
||||
*/
|
||||
call<T extends Type, A extends any[], R>(
|
||||
decorator: (context: DecoratorContext, target: T, ...args: A) => R,
|
||||
|
|
|
@ -89,7 +89,7 @@ export function printCadl(
|
|||
if (node.kind === SyntaxKind.CadlScript) {
|
||||
// For CadlScript(root of cadl document) we had a new line at the end.
|
||||
// This must be done here so the hardline entry can be the last item of the doc array returned by the printer
|
||||
// so the markdown(and other embeded formatter) can omit that extra line.
|
||||
// so the markdown(and other embedded formatter) can omit that extra line.
|
||||
parts.push(hardline);
|
||||
}
|
||||
return parts;
|
||||
|
|
|
@ -13,7 +13,7 @@ import { InitTemplate, InitTemplateDefinitionsSchema, InitTemplateFile } from ".
|
|||
|
||||
interface ScaffoldingConfig extends InitTemplate {
|
||||
/**
|
||||
* Path where this template was laoded from.
|
||||
* Path where this template was loaded from.
|
||||
*/
|
||||
templateUri: string;
|
||||
|
||||
|
|
|
@ -193,7 +193,7 @@ export function $numeric(context: DecoratorContext, target: Type) {
|
|||
program.reportDiagnostic(
|
||||
createDiagnostic({
|
||||
code: "decorator-wrong-target",
|
||||
format: { decorator: "@numeric", to: "non-instrinsic type" },
|
||||
format: { decorator: "@numeric", to: "non-intrinsic type" },
|
||||
target,
|
||||
})
|
||||
);
|
||||
|
|
|
@ -46,6 +46,7 @@ export type CadlScope =
|
|||
|
||||
const meta: typeof tm.meta = tm.meta;
|
||||
const identifierStart = "[_$[:alpha:]]";
|
||||
// cspell:disable-next-line
|
||||
const identifierContinue = "[_$[:alnum:]]";
|
||||
const beforeIdentifier = `(?=${identifierStart})`;
|
||||
const identifier = `\\b${identifierStart}${identifierContinue}*\\b`;
|
||||
|
|
|
@ -121,7 +121,7 @@ describe("compiler: enums", () => {
|
|||
});
|
||||
|
||||
// Issue here was the same EnumType was create twice for each decorator on different namespaces causing equality issues when comparing the enum or enum member
|
||||
it("enums can be refernced from decorator on namespace", async () => {
|
||||
it("enums can be referenced from decorator on namespace", async () => {
|
||||
let refViaMyService: Enum | undefined;
|
||||
let refViaMyLib: Enum | undefined;
|
||||
testHost.addJsFile("lib.js", {
|
||||
|
|
|
@ -149,7 +149,7 @@ describe("compiler: models", () => {
|
|||
}
|
||||
});
|
||||
|
||||
it(`doesn't emit unsuported-default diagnostic when type is an error`, async () => {
|
||||
it(`doesn't emit unsupported-default diagnostic when type is an error`, async () => {
|
||||
testHost.addCadlFile(
|
||||
"main.cadl",
|
||||
`
|
||||
|
@ -237,7 +237,7 @@ describe("compiler: models", () => {
|
|||
match(diagnostics[0].message, /Model has an inherited property/);
|
||||
});
|
||||
|
||||
it("keeps reference of childrens", async () => {
|
||||
it("keeps reference of children", async () => {
|
||||
testHost.addCadlFile(
|
||||
"main.cadl",
|
||||
`
|
||||
|
@ -265,7 +265,7 @@ describe("compiler: models", () => {
|
|||
strictEqual(Pet.derivedModels[1], Dog);
|
||||
});
|
||||
|
||||
it("keeps reference of childrens with templates", async () => {
|
||||
it("keeps reference of children with templates", async () => {
|
||||
testHost.addCadlFile(
|
||||
"main.cadl",
|
||||
`
|
||||
|
@ -362,7 +362,7 @@ describe("compiler: models", () => {
|
|||
);
|
||||
});
|
||||
|
||||
it("emit error when extends ciruclar reference", async () => {
|
||||
it("emit error when extends circular reference", async () => {
|
||||
testHost.addCadlFile(
|
||||
"main.cadl",
|
||||
`
|
||||
|
@ -548,7 +548,7 @@ describe("compiler: models", () => {
|
|||
);
|
||||
});
|
||||
|
||||
it("emit single error when is itself as a templated with mutliple instantiations", async () => {
|
||||
it("emit single error when is itself as a templated with multiple instantiations", async () => {
|
||||
testHost.addCadlFile(
|
||||
"main.cadl",
|
||||
`
|
||||
|
|
|
@ -169,7 +169,7 @@ describe("compiler: checker: type relations", () => {
|
|||
await expectTypeAssignable({ source: `"foo"`, target: "string" });
|
||||
});
|
||||
|
||||
it("emit diagnostic when assigning numericl literal", async () => {
|
||||
it("emit diagnostic when assigning numeric literal", async () => {
|
||||
await expectTypeNotAssignable(
|
||||
{ source: "123", target: "string" },
|
||||
{
|
||||
|
@ -452,7 +452,7 @@ describe("compiler: checker: type relations", () => {
|
|||
await expectTypeAssignable({ source: "{}", target: "object" });
|
||||
});
|
||||
|
||||
it("can assign object with proprety", async () => {
|
||||
it("can assign object with property", async () => {
|
||||
await expectTypeAssignable({ source: "{foo: string}", target: "object" });
|
||||
});
|
||||
|
||||
|
@ -577,7 +577,7 @@ describe("compiler: checker: type relations", () => {
|
|||
target: "Aging",
|
||||
commonCode: `
|
||||
model Pet { name: string; age: int32 }
|
||||
model Cat extends Pet { moew: boolean }
|
||||
model Cat extends Pet { meow: boolean }
|
||||
|
||||
model Aging { age: int32 }
|
||||
`,
|
||||
|
@ -700,7 +700,7 @@ describe("compiler: checker: type relations", () => {
|
|||
});
|
||||
});
|
||||
|
||||
it("can a memeber of the enum", async () => {
|
||||
it("can a member of the enum", async () => {
|
||||
await expectTypeAssignable({
|
||||
source: "Foo.a",
|
||||
target: "Foo",
|
||||
|
|
|
@ -38,7 +38,7 @@ describe("compiler: spread", () => {
|
|||
}
|
||||
});
|
||||
|
||||
it("doesn't emit additional diagnostic if spread reference is unknown-identitfier", async () => {
|
||||
it("doesn't emit additional diagnostic if spread reference is unknown-identifier", async () => {
|
||||
const diagnostics = await runner.diagnose(`
|
||||
model Foo {
|
||||
...NotDefined
|
||||
|
|
|
@ -241,7 +241,7 @@ describe("compiler: using statements", () => {
|
|||
]);
|
||||
});
|
||||
|
||||
it("ambigous use doesn't affect other files", async () => {
|
||||
it("ambiguous use doesn't affect other files", async () => {
|
||||
testHost.addCadlFile(
|
||||
"main.cadl",
|
||||
`
|
||||
|
@ -278,7 +278,7 @@ describe("compiler: using statements", () => {
|
|||
`
|
||||
using N;
|
||||
|
||||
model NotAmiguous extends A {}
|
||||
model NotAmbiguous extends A {}
|
||||
`
|
||||
);
|
||||
const diagnostics = await testHost.diagnose("./");
|
||||
|
|
|
@ -288,7 +288,7 @@ model Foo {
|
|||
});
|
||||
});
|
||||
|
||||
it("remove unncessary quotes", () => {
|
||||
it("remove unnecessary quotes", () => {
|
||||
assertFormat({
|
||||
code: `
|
||||
model Foo {
|
||||
|
@ -406,7 +406,7 @@ model Foo {
|
|||
});
|
||||
});
|
||||
|
||||
it("format empty anynymous model with comment inside", () => {
|
||||
it("format empty anonymous model with comment inside", () => {
|
||||
assertFormat({
|
||||
code: `
|
||||
model Foo {
|
||||
|
@ -524,7 +524,7 @@ model Bar {}
|
|||
});
|
||||
});
|
||||
|
||||
it("comment preceeding decorators hug decorators", () => {
|
||||
it("comment preceding decorators hug decorators", () => {
|
||||
assertFormat({
|
||||
code: `
|
||||
// comment
|
||||
|
@ -665,7 +665,7 @@ alias Bar = One & Two;
|
|||
});
|
||||
});
|
||||
|
||||
it("format intersection of anoymous models", () => {
|
||||
it("format intersection of anonymous models", () => {
|
||||
assertFormat({
|
||||
code: `
|
||||
alias Foo = { foo: string } & {bar: string};
|
||||
|
@ -745,7 +745,7 @@ enum Bar {
|
|||
});
|
||||
});
|
||||
|
||||
it("seperate members if there is decorators", () => {
|
||||
it("separate members if there is decorators", () => {
|
||||
assertFormat({
|
||||
code: `
|
||||
enum Foo {
|
||||
|
@ -1209,7 +1209,7 @@ model Foo<T extends string, K extends {foo: int32}> {}`,
|
|||
});
|
||||
});
|
||||
|
||||
it("format parameter declarations with constraints and defauls", () => {
|
||||
it("format parameter declarations with constraints and defaults", () => {
|
||||
assertFormat({
|
||||
code: `
|
||||
model Foo<T extends string =
|
||||
|
@ -1585,7 +1585,7 @@ projection model#proj {
|
|||
});
|
||||
});
|
||||
|
||||
describe("when embeded", () => {
|
||||
describe("when embedded", () => {
|
||||
it("doesn't include blank line at the end (in markdown)", () => {
|
||||
assertFormat({
|
||||
parser: "markdown",
|
||||
|
|
|
@ -33,7 +33,7 @@ describe("compiler: syntax", () => {
|
|||
|
||||
`model Car {
|
||||
optional?: number;
|
||||
withDefault?: string = "mydefault";
|
||||
withDefault?: string = "my-default";
|
||||
};`,
|
||||
|
||||
`model Car {
|
||||
|
@ -311,11 +311,14 @@ describe("compiler: syntax", () => {
|
|||
});
|
||||
|
||||
describe("BOM", () => {
|
||||
// cspell:disable-next-line
|
||||
parseEach(["\u{FEFF}/*<--BOM*/ model M {}"]);
|
||||
// cspell:disable-next-line
|
||||
parseErrorEach([["model\u{FEFF}/*<--BOM*/ M {}", [/Statement expected/]]]);
|
||||
});
|
||||
|
||||
describe("unterminated tokens", () => {
|
||||
// cspell:disable-next-line
|
||||
parseErrorEach([["/* Yada yada yada", [/Unterminated multi-line comment/]]]);
|
||||
|
||||
const strings = [
|
||||
|
@ -416,6 +419,7 @@ describe("compiler: syntax", () => {
|
|||
});
|
||||
|
||||
describe("identifiers", () => {
|
||||
// cspell:disable
|
||||
const good = [
|
||||
"short",
|
||||
"short42",
|
||||
|
@ -461,6 +465,7 @@ describe("compiler: syntax", () => {
|
|||
["42", /Identifier expected/],
|
||||
["true", /Keyword cannot be used as identifier/],
|
||||
];
|
||||
// cspell:enable
|
||||
|
||||
parseEach(
|
||||
good.map((entry) => {
|
||||
|
|
|
@ -9,7 +9,7 @@ describe("compiler: projected-names", () => {
|
|||
runner = await createTestRunner();
|
||||
});
|
||||
|
||||
it("@projectName updates the name when runnning projection", async () => {
|
||||
it("@projectName updates the name when running projection", async () => {
|
||||
const { expireAt } = (await runner.compile(`
|
||||
model Foo {
|
||||
@projectedName("json", "exp")
|
||||
|
|
|
@ -423,12 +423,13 @@ describe("compiler: scanner", () => {
|
|||
`U+${codePoint.toString(16)} should be allowed to continue identifier.`
|
||||
);
|
||||
}
|
||||
|
||||
// cspell:disable-next-line
|
||||
assert(isIdentifierContinue(0x200c), "U+200C (ZWNJ) should be allowed to continue identifier.");
|
||||
assert(isIdentifierContinue(0x200d), "U+200D (ZWJ) should be allowed to continue identifier.");
|
||||
});
|
||||
|
||||
describe("keyword collision", () => {
|
||||
// cspell:disable-next-line
|
||||
for (const identifier of ["outerface", "famespace", "notanamespace", "notaninterface"]) {
|
||||
it(`does not think ${identifier} is a keyword`, () => {
|
||||
const [[token]] = tokens(identifier);
|
||||
|
|
|
@ -8,6 +8,8 @@ import {
|
|||
} from "vscode-languageserver/node.js";
|
||||
import { createTestServerHost, extractCursor } from "../../testing/test-server-host.js";
|
||||
|
||||
// cspell:ignore 𐌰𐌲
|
||||
|
||||
describe("compiler: server: completion", () => {
|
||||
it("completes globals", async () => {
|
||||
const completions = await complete(
|
||||
|
@ -38,7 +40,7 @@ describe("compiler: server: completion", () => {
|
|||
"test/package.json": JSON.stringify({
|
||||
dependencies: {
|
||||
"@cadl-lang/library1": "~0.1.0",
|
||||
noncadllibrary: "~0.1.0",
|
||||
"non-cadl-library": "~0.1.0",
|
||||
},
|
||||
peerDependencies: {
|
||||
"@cadl-lang/library2": "~0.1.0",
|
||||
|
@ -47,7 +49,7 @@ describe("compiler: server: completion", () => {
|
|||
"test/node_modules/@cadl-lang/library1/package.json": JSON.stringify({
|
||||
cadlMain: "./foo.js",
|
||||
}),
|
||||
"test/node_modules/noncadllibrary/package.json": JSON.stringify({}),
|
||||
"test/node_modules/non-cadl-library/package.json": JSON.stringify({}),
|
||||
"test/node_modules/@cadl-lang/library2/package.json": JSON.stringify({
|
||||
cadlMain: "./foo.js",
|
||||
}),
|
||||
|
|
|
@ -8,7 +8,7 @@ import {
|
|||
} from "../../testing/index.js";
|
||||
|
||||
describe("server: reuse", () => {
|
||||
it("reuses uchanged programs", async () => {
|
||||
it("reuses unchanged programs", async () => {
|
||||
const host = await createTestServerHost();
|
||||
const document = host.addOrUpdateDocument("main.cadl", "model M {}");
|
||||
const oldProgram = await host.server.compile(document);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "Add warning when using `.only` to remmeber to remove before pushing"
|
||||
"comment": "Add warning when using `.only` to remember to remove before pushing"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -40,7 +40,8 @@
|
|||
],
|
||||
"dependencies": {
|
||||
"yargs": "~17.3.1",
|
||||
"strip-json-comments": "~4.0.0"
|
||||
"strip-json-comments": "~4.0.0",
|
||||
"cspell": "~6.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/mocha": "~9.1.0",
|
||||
|
|
|
@ -42,7 +42,7 @@ op foo(): MyNonErrorResponse;
|
|||
|
||||
### `@extension`
|
||||
|
||||
This decorator lets you sepecify custom key(starting with `x-`) value pair that will be added to the OpenAPI document.
|
||||
This decorator lets you specify custom key(starting with `x-`) value pair that will be added to the OpenAPI document.
|
||||
[OpenAPI reference on extensions](https://swagger.io/docs/specification/openapi-extensions/)
|
||||
|
||||
Arguments:
|
||||
|
@ -69,7 +69,7 @@ model Foo {}
|
|||
### `@externalDocs`
|
||||
|
||||
Decorator that can be used to provide the `externalDocs` property on OpenAPI elements.
|
||||
[OpenAPI spec for extenalDocs](https://swagger.io/specification/#external-documentation-object)
|
||||
[OpenAPI spec for externalDocs](https://swagger.io/specification/#external-documentation-object)
|
||||
|
||||
Arguments:
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ const operationIdDecorator = createDecoratorDefinition({
|
|||
args: [{ kind: "String" }],
|
||||
} as const);
|
||||
/**
|
||||
* Set a sepecific operation ID.
|
||||
* Set a specific operation ID.
|
||||
* @param context Decorator Context
|
||||
* @param entity Decorator target
|
||||
* @param opId Operation ID.
|
||||
|
|
|
@ -74,16 +74,16 @@ export function getTypeName(
|
|||
*/
|
||||
export function getParameterKey(
|
||||
program: Program,
|
||||
propery: ModelProperty,
|
||||
property: ModelProperty,
|
||||
newParam: unknown,
|
||||
existingParams: Record<string, unknown>,
|
||||
options: TypeNameOptions
|
||||
): string {
|
||||
const parent = propery.model!;
|
||||
const parent = property.model!;
|
||||
let key = getTypeName(program, parent, options);
|
||||
|
||||
if (parent.properties.size > 1) {
|
||||
key += `.${propery.name}`;
|
||||
key += `.${property.name}`;
|
||||
}
|
||||
|
||||
// JSON check is workaround for https://github.com/microsoft/cadl/issues/462
|
||||
|
@ -94,7 +94,7 @@ export function getParameterKey(
|
|||
format: {
|
||||
value: key,
|
||||
},
|
||||
target: propery,
|
||||
target: property,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@ export function getParameterKey(
|
|||
* Resolve the OpenAPI operation ID for the given operation using the following logic:
|
||||
* - If @operationId was specified use that value
|
||||
* - If operation is defined at the root or under the service namespace return <operation.name>
|
||||
* - Otherwise(operation is under another namespace or interface) return <namespace/interface.name>_<opration.name>
|
||||
* - Otherwise(operation is under another namespace or interface) return <namespace/interface.name>_<operation.name>
|
||||
*
|
||||
* @param program Cadl Program
|
||||
* @param operation Operation
|
||||
|
|
|
@ -30,7 +30,7 @@ describe("OpenAPI3 Helpers", () => {
|
|||
strictEqual(id, "foo");
|
||||
});
|
||||
|
||||
it("return group name and operaiton name if operation is defined under interface", async () => {
|
||||
it("return group name and operation name if operation is defined under interface", async () => {
|
||||
const id = await testResolveOperationId(`
|
||||
interface Bar {
|
||||
@test op foo(): string;
|
||||
|
|
|
@ -580,7 +580,7 @@
|
|||
"comment": "Uptake changes in @cadl-lang/rest library improving operation parameter handling"
|
||||
},
|
||||
{
|
||||
"comment": "Update cadl depdendencies to peerDependencies"
|
||||
"comment": "Update cadl dependencies to peerDependencies"
|
||||
},
|
||||
{
|
||||
"comment": "Add support for versioned services"
|
||||
|
|
|
@ -153,7 +153,7 @@ Fri, 04 Feb 2022 18:00:18 GMT
|
|||
- Internals: switch to internal path manipulation
|
||||
- Extracted decorators into own library `@cadl-lang/openapi`
|
||||
- Uptake changes in @cadl-lang/rest library improving operation parameter handling
|
||||
- Update cadl depdendencies to peerDependencies
|
||||
- Update cadl dependencies to peerDependencies
|
||||
- Add support for versioned services
|
||||
- Add statusCode decorator for http status code
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ export interface OpenAPI3EmitterOptions {
|
|||
"new-line"?: "crlf" | "lf";
|
||||
}
|
||||
|
||||
const EmiterOptionsSchema: JSONSchemaType<OpenAPI3EmitterOptions> = {
|
||||
const EmitterOptionsSchema: JSONSchemaType<OpenAPI3EmitterOptions> = {
|
||||
type: "object",
|
||||
additionalProperties: false,
|
||||
properties: {
|
||||
|
@ -111,7 +111,7 @@ export const libDef = {
|
|||
},
|
||||
},
|
||||
emitter: {
|
||||
options: EmiterOptionsSchema as JSONSchemaType<OpenAPI3EmitterOptions>,
|
||||
options: EmitterOptionsSchema as JSONSchemaType<OpenAPI3EmitterOptions>,
|
||||
},
|
||||
} as const;
|
||||
|
||||
|
|
|
@ -1031,7 +1031,7 @@ function createOAPIEmitter(program: Program, options: ResolvedOpenAPI3EmitterOpt
|
|||
childModels: readonly Model[]
|
||||
): boolean {
|
||||
const { propertyName } = discriminator;
|
||||
const retVals = childModels.map((t) => {
|
||||
const retValues = childModels.map((t) => {
|
||||
const prop = getProperty(t, propertyName);
|
||||
if (!prop) {
|
||||
reportDiagnostic(program, { code: "discriminator", messageId: "missing", target: t });
|
||||
|
@ -1062,8 +1062,8 @@ function createOAPIEmitter(program: Program, options: ResolvedOpenAPI3EmitterOpt
|
|||
});
|
||||
}
|
||||
if (prop) {
|
||||
const vals = getStringValues(prop.type);
|
||||
vals.forEach((val) => {
|
||||
const values = getStringValues(prop.type);
|
||||
values.forEach((val) => {
|
||||
if (discriminatorValues.has(val)) {
|
||||
reportDiagnostic(program, {
|
||||
code: "discriminator",
|
||||
|
@ -1071,14 +1071,14 @@ function createOAPIEmitter(program: Program, options: ResolvedOpenAPI3EmitterOpt
|
|||
format: { val: val, model1: discriminatorValues.get(val)!, model2: t.name },
|
||||
target: prop,
|
||||
});
|
||||
retVals.push(false);
|
||||
retValues.push(false);
|
||||
} else {
|
||||
discriminatorValues.set(val, t.name);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
return retVals.every((v) => v);
|
||||
return retValues.every((v) => v);
|
||||
}
|
||||
|
||||
function getDiscriminatorMapping(
|
||||
|
|
|
@ -260,7 +260,7 @@ describe("openapi3: models", () => {
|
|||
);
|
||||
ok(
|
||||
!("TParent_string" in res.components.schemas),
|
||||
"Parent instantiated templated type shouldn't be includd in OpenAPI"
|
||||
"Parent instantiated templated type shouldn't be included in OpenAPI"
|
||||
);
|
||||
});
|
||||
|
||||
|
|
|
@ -18,10 +18,10 @@ describe("openapi3: parameters", () => {
|
|||
it("@doc set the description on the parameter not its schema", async () => {
|
||||
const res = await openApiFor(
|
||||
`
|
||||
op test(@query @doc("mydoc") arg1: string): void;
|
||||
op test(@query @doc("my-doc") arg1: string): void;
|
||||
`
|
||||
);
|
||||
strictEqual(res.paths["/"].get.parameters[0].description, "mydoc");
|
||||
strictEqual(res.paths["/"].get.parameters[0].description, "my-doc");
|
||||
strictEqual(res.paths["/"].get.parameters[0].schema.description, undefined);
|
||||
});
|
||||
|
||||
|
@ -76,7 +76,7 @@ describe("openapi3: parameters", () => {
|
|||
strictEqual(oapi.components.parameters["Pet$Id"].name, "petId");
|
||||
});
|
||||
|
||||
it("inlines spread of parameters from anonymous model", async () => {
|
||||
it("inline spread of parameters from anonymous model", async () => {
|
||||
const oapi = await openApiFor(
|
||||
`
|
||||
op template<TParameters, TReturn>(...TParameters): TReturn;
|
||||
|
|
|
@ -13,6 +13,7 @@ test("compiled http sample", async ({ page }) => {
|
|||
|
||||
test("shared link works", async ({ page }) => {
|
||||
// Pass code "op sharedCode(): string;"
|
||||
// cspell:disable-next-line
|
||||
await page.goto(`${host}/?c=b3Agc2hhcmVkQ29kZSgpOiBzdHJpbmc7`);
|
||||
const outputContainer = page.locator(".output-content");
|
||||
await expect(outputContainer).toContainText(`"operationId": "sharedCode"`);
|
||||
|
@ -25,6 +26,7 @@ test("save code with ctrl/cmd+S", async ({ page }) => {
|
|||
await cadlEditorContainer.type("op sharedCode(): string;");
|
||||
await Promise.all([
|
||||
// It is important to call waitForNavigation before click to set up waiting.
|
||||
// cspell:disable-next-line
|
||||
page.waitForNavigation({ url: `${host}/?c=b3Agc2hhcmVkQ29kZSgpOiBzdHJpbmc7` }),
|
||||
page.keyboard.press(`${ctrlOrCmd}+KeyS`),
|
||||
]);
|
||||
|
|
|
@ -5,7 +5,7 @@ export async function importCadlCompiler(): Promise<typeof import("@cadl-lang/co
|
|||
}
|
||||
|
||||
/**
|
||||
* Dynamic imports with importmap unfotunately do not work on all browsers.
|
||||
* Dynamic imports with importmap unfortunately do not work on all browsers.
|
||||
* Safari and Firefox lack support https://caniuse.com/import-maps.
|
||||
*
|
||||
* A polyfill for importmap is loaded but required calling importShim instead of the native import https://github.com/guybedford/es-module-shims
|
||||
|
|
|
@ -18,7 +18,7 @@ export default defineConfig({
|
|||
external: ["fs/promises", "prettier"],
|
||||
treeshake: {
|
||||
// Ignore those 2 modules are they aren't used in the code needed for the formatter.
|
||||
// Otherwise rollup think they have side effect and to include a lot of unncessary code in the bundle.
|
||||
// Otherwise rollup think they have side effect and to include a lot of unnecessary code in the bundle.
|
||||
moduleSideEffects: ["ajv", "js-yaml"],
|
||||
},
|
||||
plugins: [
|
||||
|
|
|
@ -394,19 +394,19 @@
|
|||
"comment": "Add support for discriminator decorator"
|
||||
},
|
||||
{
|
||||
"comment": "Internals: switch to internal path manipulatio"
|
||||
"comment": "Internals: switch to internal path manipulation"
|
||||
},
|
||||
{
|
||||
"comment": "Added shared logic to resolve http operation parameters and validate compatibility(duplicate bodies)"
|
||||
},
|
||||
{
|
||||
"comment": "**Added** Validation for uniquness of operation by verb and path"
|
||||
"comment": "**Added** Validation for uniqueness of operation by verb and path"
|
||||
},
|
||||
{
|
||||
"comment": "**Added** `@head` decorator to describe `head` http verb operation"
|
||||
},
|
||||
{
|
||||
"comment": "Validate http verb decorators(`@get`, `@post`, etc.) do not recieve any argument"
|
||||
"comment": "Validate http verb decorators(`@get`, `@post`, etc.) do not receive any argument"
|
||||
},
|
||||
{
|
||||
"comment": "Expose response template in Http library and refactor"
|
||||
|
@ -418,7 +418,7 @@
|
|||
"comment": "**Validate `@route` decorator is used only once"
|
||||
},
|
||||
{
|
||||
"comment": "Update cadl depdendencies to peerDependencies"
|
||||
"comment": "Update cadl dependencies to peerDependencies"
|
||||
}
|
||||
],
|
||||
"dependency": [
|
||||
|
@ -588,7 +588,7 @@
|
|||
"comments": {
|
||||
"patch": [
|
||||
{
|
||||
"comment": "Add isHeader functionality to discover if a proprty is a header property"
|
||||
"comment": "Add isHeader functionality to discover if a property is a header property"
|
||||
}
|
||||
],
|
||||
"dependency": [
|
||||
|
|
|
@ -138,15 +138,15 @@ Fri, 04 Feb 2022 18:00:18 GMT
|
|||
### Minor changes
|
||||
|
||||
- Add support for discriminator decorator
|
||||
- Internals: switch to internal path manipulatio
|
||||
- Internals: switch to internal path manipulation
|
||||
- Added shared logic to resolve http operation parameters and validate compatibility(duplicate bodies)
|
||||
- **Added** Validation for uniquness of operation by verb and path
|
||||
- **Added** Validation for uniqueness of operation by verb and path
|
||||
- **Added** `@head` decorator to describe `head` http verb operation
|
||||
- Validate http verb decorators(`@get`, `@post`, etc.) do not recieve any argument
|
||||
- Validate http verb decorators(`@get`, `@post`, etc.) do not receive any argument
|
||||
- Expose response template in Http library and refactor
|
||||
- Add statusCode decorator for http status code
|
||||
- **Validate `@route` decorator is used only once
|
||||
- Update cadl depdendencies to peerDependencies
|
||||
- Update cadl dependencies to peerDependencies
|
||||
|
||||
### Patches
|
||||
|
||||
|
@ -223,7 +223,7 @@ Fri, 13 Aug 2021 19:10:21 GMT
|
|||
|
||||
### Patches
|
||||
|
||||
- Add isHeader functionality to discover if a proprty is a header property
|
||||
- Add isHeader functionality to discover if a property is a header property
|
||||
|
||||
## 0.5.0
|
||||
Tue, 10 Aug 2021 20:23:04 GMT
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Cadl HTTP/Rest Library
|
||||
|
||||
This package provides [Cadl](htps://github.com/microsoft/Cadl) decorators, models, and interfaces to describe HTTP and REST API. With fundamental models and decorators defined in Cadl.Http namespace, you will be able describe basic http level operations. Cadl.Rest namespace adds additional predefined models and interfaces. These building blocks make defining REST resources and operations based on standard patterns extremely simple.
|
||||
This package provides [Cadl](https://github.com/microsoft/Cadl) decorators, models, and interfaces to describe HTTP and REST API. With fundamental models and decorators defined in Cadl.Http namespace, you will be able describe basic http level operations. Cadl.Rest namespace adds additional predefined models and interfaces. These building blocks make defining REST resources and operations based on standard patterns extremely simple.
|
||||
|
||||
## Install
|
||||
|
||||
|
@ -107,7 +107,7 @@ The `@cadl-lang/rest` library defines the following decorators in `Cadl.Rest` na
|
|||
| @deletesResource | operations | Syntax:<br> `@deletesResource(modelType)` <br><br>Note:<br> This decorator is to used to signal the operation that is the Delete operation for a particular resource. |
|
||||
| @listsResource | operations | Syntax:<br> `@listsResource(modelType)` <br><br>Note:<br> This decorator is to used to signal the operation that is the List operation for a particular resource. |
|
||||
| @parentResource | models | Syntax:<br> `@parentResource(parentModelTypeReference)` <br><br>Note:<br> `@parentResource` marks a model property with a reference to its parent resource type. The first argument should be a reference to a model type which will be treated as the parent type of the target model type. This will cause the `@key` properties of all parent types of the target type to show up in operations of the `Resource*<T>` interfaces defined in this library. |
|
||||
| @segment | model properties, operation parameters | Syntax:<br> `@segment(segmentString)` <br><br>Note:<br>`@segment` defines the preceding path segment for a `@path` parameter in auto-generated routes. The first argument should be a string that will be inserted into the operation route before the path parameter's name field. For exmaple: <br> `op getUser(@path @segment("users") userId: string): User` <br> will produce the route `/users/{userId}`. |
|
||||
| @segment | model properties, operation parameters | Syntax:<br> `@segment(segmentString)` <br><br>Note:<br>`@segment` defines the preceding path segment for a `@path` parameter in auto-generated routes. The first argument should be a string that will be inserted into the operation route before the path parameter's name field. For example: <br> `op getUser(@path @segment("users") userId: string): User` <br> will produce the route `/users/{userId}`. |
|
||||
| @segmentOf | models | Syntax:<br> `@segment(segmentString)` <br><br>Note:<br>`@segmentOf` returns the URL segment of a given model if it has `@segment` and `@key` decorator. |
|
||||
| @segmentSeparator | model properties, operation parameters, or operations | Syntax:<br> `@segmentSeparator(separatorString)` <br><br>Note:<br> `@segmentSeparator` defines the separator string that is inserted between the target's `@segment` and the preceding route path in auto-generated routes. <br> The first argument should be a string that will be inserted into the operation route before the target's `@segment` value. Can be a string of any length. Defaults to `/`. |
|
||||
| @autoRoute | operations | Syntax:<br> `@autoRoute()` <br><br>Note:<br>`@autoRoute` enables automatic route generation for an operation, namespace, or interface. <br> When applied to an operation, it automatically generates the operation's route based on path parameter metadata. When applied to a namespace or interface, it causes all operations under that scope to have auto-generated routes. |
|
||||
|
|
|
@ -52,7 +52,7 @@ For example, to authorize as demo / p@55w0rd the client would send
|
|||
### `BearerAuth`
|
||||
|
||||
Bearer authentication (also called token authentication) is an HTTP authentication scheme that involves security tokens called bearer tokens.
|
||||
The name “Bearer authentication” can be understood as “give access to the bearer of this token.” The bearer token is a cryptic string, usually generated by the server in response to a ogin request.
|
||||
The name “Bearer authentication” can be understood as “give access to the bearer of this token.” The bearer token is a cryptic string, usually generated by the server in response to a login request.
|
||||
The client must send this token in the Authorization header when making requests to protected resources:
|
||||
|
||||
```
|
||||
|
|
|
@ -482,7 +482,7 @@ const externalInterfaces = createStateSymbol("externalInterfaces");
|
|||
* @depreacted DO NOT USE. For internal use only as a workaround.
|
||||
* @param program Program
|
||||
* @param target Target namespace
|
||||
* @param interf Interface that should be included in namespace.
|
||||
* @param sourceInterface Interface that should be included in namespace.
|
||||
*/
|
||||
export function includeInterfaceRoutesInNamespace(
|
||||
program: Program,
|
||||
|
|
|
@ -469,7 +469,7 @@ describe("rest: http decorators", () => {
|
|||
});
|
||||
});
|
||||
|
||||
it("can specify OAauth2", async () => {
|
||||
it("can specify OAuth2", async () => {
|
||||
const { Foo } = (await runner.compile(`
|
||||
model MyFlow {
|
||||
type: OAuth2FlowType.implicit;
|
||||
|
|
|
@ -105,7 +105,7 @@ describe("cadl: rest: responses", () => {
|
|||
});
|
||||
|
||||
// Regression test for https://github.com/microsoft/cadl/issues/328
|
||||
it("empty response model becomes body if it has childrens", async () => {
|
||||
it("empty response model becomes body if it has children", async () => {
|
||||
const [routes, diagnostics] = await getOperationsWithServiceNamespace(
|
||||
`
|
||||
@route("/") op read(): A;
|
||||
|
|
|
@ -81,7 +81,7 @@ rpc CreateBook(CreateBookRequest) returns (Book) {
|
|||
|
||||
### Using `...` in Request parameters
|
||||
|
||||
In this example and the Library example we see a few different patterns on how a gRPC `rpc` definiton uses different `message`. While some directly use things that look like Cadl models as request and response messages, a more general patter is that a gRPC op `Foo` usually has `FooRequest` and `FooResponse` messages which embed models inside, e.g.
|
||||
In this example and the Library example we see a few different patterns on how a gRPC `rpc` definition uses different `message`. While some directly use things that look like Cadl models as request and response messages, a more general patter is that a gRPC op `Foo` usually has `FooRequest` and `FooResponse` messages which embed models inside, e.g.
|
||||
|
||||
a natural direct mapping of:
|
||||
|
||||
|
@ -111,7 +111,7 @@ model GetKioskRequest {
|
|||
op GetKiosk(... GetKioskRequest): Kiosk | RpcStatus;
|
||||
```
|
||||
|
||||
This produces slightly different, but functionaly equivalent swagger in that the gRPC generator inlines the parameter id, while Cadl create a `"$ref": "#/parameters/GetKioskRequest"` which points to a single parameter, `id`.
|
||||
This produces slightly different, but functionality equivalent swagger in that the gRPC generator inline the parameter id, while Cadl create a `"$ref": "#/parameters/GetKioskRequest"` which points to a single parameter, `id`.
|
||||
|
||||
If we wrote the Cadl directly with the id specified in the `op` parameters we get equivalent to the gRPC version:
|
||||
|
||||
|
@ -122,4 +122,4 @@ If we wrote the Cadl directly with the id specified in the `op` parameters we ge
|
|||
op GetKiosk(@path id: int32): Kiosk | RpcStatus;
|
||||
```
|
||||
|
||||
the downside with this approach is that it's not as convient to add documentation inside the parameter. Could we perhaps add a new decorator @parameter_doc("id","This is a unique identified") that we add to the `op` ?
|
||||
the downside with this approach is that it's not as convenient to add documentation inside the parameter. Could we perhaps add a new decorator @parameter_doc("id","This is a unique identified") that we add to the `op` ?
|
||||
|
|
|
@ -22,6 +22,6 @@ npm install --save-dev @cadl-lang/compiler
|
|||
- Set `cadl.cadl-server.path` to `${workspaceFolder}/node_modules/.bin/cadl-server`
|
||||
|
||||
(NOTE: If the Cadl project is not at the root of the workspace, adjust the path accordingly.
|
||||
For example, `${workspaceFolder}/path/from/workspace/to/project/node_modulues/.bin/cadl-server`)
|
||||
For example, `${workspaceFolder}/path/from/workspace/to/project/node_modules/.bin/cadl-server`)
|
||||
|
||||
### 3. Commit settings.json and package.json changes
|
||||
|
|
|
@ -5,12 +5,12 @@ import { readFile, writeFile } from "fs/promises";
|
|||
import { resolve } from "path";
|
||||
|
||||
async function build() {
|
||||
const infile = resolve("src/spec.emu.html");
|
||||
const inFile = resolve("src/spec.emu.html");
|
||||
const outfile = resolve("../../docs/spec.html");
|
||||
const fetch = (path) => readFile(path, "utf-8");
|
||||
|
||||
try {
|
||||
const spec = await ecmarkup.build(infile, fetch, {
|
||||
const spec = await ecmarkup.build(inFile, fetch, {
|
||||
outfile,
|
||||
warn,
|
||||
});
|
||||
|
@ -18,12 +18,12 @@ async function build() {
|
|||
await writeFile(file, contents);
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(`${infile}(1,1): error EMU0001: Error generating spec: ${err.message}`);
|
||||
console.log(`${inFile}(1,1): error EMU0001: Error generating spec: ${err.message}`);
|
||||
throw err;
|
||||
}
|
||||
|
||||
function warn(warning) {
|
||||
const file = warning.file ?? infile;
|
||||
const file = warning.file ?? inFile;
|
||||
const line = warning.line ?? 1;
|
||||
const col = warning.column ?? 1;
|
||||
const id = "EMU0002" + (warning.ruleId ? `: ${warning.ruleId}` : "");
|
||||
|
|
|
@ -177,7 +177,7 @@ model Foo {
|
|||
|
||||
### `@renamedFrom`
|
||||
|
||||
Sepcify which version an entity was renamed and what is is old name.
|
||||
Specify which version an entity was renamed and what is is old name.
|
||||
|
||||
Version enum member **MUST** be from the version enum for the containing namespace.
|
||||
|
||||
|
@ -188,7 +188,7 @@ op newName(): void;
|
|||
|
||||
### `@madeOptional`
|
||||
|
||||
Sepcify which version a property was made optional
|
||||
Specify which version a property was made optional
|
||||
|
||||
Version enum member **MUST** be from the version enum for the containing namespace.
|
||||
|
||||
|
@ -203,7 +203,7 @@ model Foo {
|
|||
|
||||
## Consuming versioning library from an emitter
|
||||
|
||||
### Get the service represenation at a given version
|
||||
### Get the service representation at a given version
|
||||
|
||||
Versioning library works with projection to project the service at a given version.
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ function validateReference(program: Program, source: Type, target: Type) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Validate the target versioning is compatible with the versioning of the soruce.
|
||||
* Validate the target versioning is compatible with the versioning of the source.
|
||||
* e.g. The target cannot be added after the source was added.
|
||||
* @param source Source type referencing the target type.
|
||||
* @param target Type being referenced from the source
|
||||
|
|
|
@ -486,7 +486,7 @@ export function getVersionForEnumMember(program: Program, member: EnumMember): V
|
|||
}
|
||||
|
||||
/**
|
||||
* returns either null, which means unversioned, or true or false dependnig
|
||||
* returns either null, which means unversioned, or true or false depending
|
||||
* on whether the change is active or not at that particular version
|
||||
*/
|
||||
function appliesAtVersion(
|
||||
|
|
|
@ -134,7 +134,7 @@ describe("versioning: validate incompatible references", () => {
|
|||
});
|
||||
});
|
||||
|
||||
it("emit diagnostic when nodel property was removed after return type", async () => {
|
||||
it("emit diagnostic when model property was removed after return type", async () => {
|
||||
const diagnostics = await runner.diagnose(`
|
||||
@removed(Versions.v2)
|
||||
model Foo {}
|
||||
|
|
|
@ -54,7 +54,7 @@ describe("cadl: versioning", () => {
|
|||
const v1 = project(Test, "1");
|
||||
ok(v1.properties.has("a"), "v1 has a");
|
||||
ok(!v1.properties.has("b"), "v1 doesn't have b");
|
||||
ok(!v1.properties.has("c"), "v1 desn't have c");
|
||||
ok(!v1.properties.has("c"), "v1 doesn't have c");
|
||||
const v2 = project(Test, "version two");
|
||||
ok(v2.properties.has("a"), "v2 has a");
|
||||
ok(v2.properties.has("b"), "v2 has b");
|
||||
|
|
|
@ -8,7 +8,7 @@ Support libraries that enable the demo features are in the `packages/` directory
|
|||
|
||||
### Running the website
|
||||
|
||||
To get started with the webiste, run the following npm commands
|
||||
To get started with the website, run the following npm commands
|
||||
|
||||
To build for production:
|
||||
|
||||
|
@ -38,7 +38,7 @@ There are some basic layout already developed in this repo. Check out some layou
|
|||
|
||||
> The "container.njk" layout has the exact same content as the base layout, except that it designed for the container files that are not already included in the template folder `(/_include)`
|
||||
|
||||
> The `continer.njk` layout uses the container layout and create the layout for tutorial page/ container of the website.
|
||||
> The `container.njk` layout uses the container layout and create the layout for tutorial page/ container of the website.
|
||||
|
||||
To create a new layout, add a new file in the \_include folder, and build from existing layouts or create whole new layout.
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ title: Projected names
|
|||
|
||||
# Projected Names
|
||||
|
||||
There is some cases where the name you have in Cadl might difer from the name over the wire or for a certain language.
|
||||
There is some cases where the name you have in Cadl might differ from the name over the wire or for a certain language.
|
||||
|
||||
## Known targets
|
||||
|
||||
|
@ -31,7 +31,7 @@ List of known targets.
|
|||
To update the name of a Cadl entity you can use the `@projectedName` decorator. This decorator takes 2 parameters:
|
||||
|
||||
- `string` target name. See [known targets](#known-targets)
|
||||
- `string` projected name. Watever the name should be in the given target.
|
||||
- `string` projected name. Whatever the name should be in the given target.
|
||||
|
||||
Example:
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ title: Aliases
|
|||
|
||||
# Alias
|
||||
|
||||
Aliases can be defined for types. This can be helpeful to reuse a complex expression.
|
||||
Aliases can be defined for types. This can be helpful to reuse a complex expression.
|
||||
|
||||
Alias is only a syntax helper, and it has no representation in the type graph. This means that aliases cannot be decorated. Use [`model is`]({{"/docs/language-basics/models" | url}}) to provide an alternate name for a model.
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ Enums allow a developer to define a set of named constants. Using enums can make
|
|||
## Basics
|
||||
|
||||
Enums are declared using the `enum` keyword.
|
||||
The enums members are comma `,` seperated and can be cadl `identifier`s or `string literal`s.
|
||||
The enums members are comma `,` separated and can be cadl `identifier`s or `string literal`s.
|
||||
|
||||
```cadl
|
||||
enum Direction {
|
||||
|
|
|
@ -40,7 +40,7 @@ which result in `./node_modules/@cadl-lang/rest/lib/main.cadl` to be imported
|
|||
|
||||
## Import a directory
|
||||
|
||||
If the import value is a directory it will lookup if that directoy is a node package and follow the npm package [lookup logic](#import-a-library) or if the directory contains a `main.cadl`.
|
||||
If the import value is a directory it will lookup if that directory is a node package and follow the npm package [lookup logic](#import-a-library) or if the directory contains a `main.cadl`.
|
||||
|
||||
```cadl
|
||||
import "./models"; // same as `import "./models/main.cadl";
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace Foo.Bar.Baz {
|
|||
}
|
||||
```
|
||||
|
||||
The subnamespace can then be used from other places using the fully qualified name.
|
||||
The sub-namespace can then be used from other places using the fully qualified name.
|
||||
|
||||
```cadl
|
||||
model A {
|
||||
|
|
|
@ -5,7 +5,7 @@ title: Type relations
|
|||
|
||||
# Types Relations
|
||||
|
||||
## Type hierachy
|
||||
## Type hierarchy
|
||||
|
||||
```mermaid
|
||||
graph RL
|
||||
|
|
|
@ -53,7 +53,7 @@ cadl install
|
|||
You should now have a basic Cadl project setup with a structure looking like
|
||||
|
||||
```
|
||||
package.json # Package manfifest defining your cadl project as a node package.
|
||||
package.json # Package manifest defining your cadl project as a node package.
|
||||
cadl-project.yaml # Cadl project configuration letting you configure emitters, emitter options, compiler options, etc.
|
||||
main.cadl # Cadl entrypoint
|
||||
```
|
||||
|
|
Загрузка…
Ссылка в новой задаче