@typespec/http-client-csharp 0.1.9-alpha.20250214.3 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (274) hide show
  1. package/LICENSE +21 -0
  2. package/package.json +38 -38
  3. package/readme.md +10 -12
  4. package/dist/emitter/constants.d.ts +0 -11
  5. package/dist/emitter/constants.d.ts.map +0 -1
  6. package/dist/emitter/constants.js +0 -18
  7. package/dist/emitter/constants.js.map +0 -1
  8. package/dist/emitter/emitter.d.ts +0 -19
  9. package/dist/emitter/emitter.d.ts.map +0 -1
  10. package/dist/emitter/emitter.js +0 -239
  11. package/dist/emitter/emitter.js.map +0 -1
  12. package/dist/emitter/index.d.ts +0 -10
  13. package/dist/emitter/index.d.ts.map +0 -1
  14. package/dist/emitter/index.js +0 -11
  15. package/dist/emitter/index.js.map +0 -1
  16. package/dist/emitter/lib/client-model-builder.d.ts +0 -10
  17. package/dist/emitter/lib/client-model-builder.d.ts.map +0 -1
  18. package/dist/emitter/lib/client-model-builder.js +0 -161
  19. package/dist/emitter/lib/client-model-builder.js.map +0 -1
  20. package/dist/emitter/lib/decorators.d.ts +0 -10
  21. package/dist/emitter/lib/decorators.d.ts.map +0 -1
  22. package/dist/emitter/lib/decorators.js +0 -17
  23. package/dist/emitter/lib/decorators.js.map +0 -1
  24. package/dist/emitter/lib/example-converter.d.ts +0 -7
  25. package/dist/emitter/lib/example-converter.d.ts.map +0 -1
  26. package/dist/emitter/lib/example-converter.js +0 -131
  27. package/dist/emitter/lib/example-converter.js.map +0 -1
  28. package/dist/emitter/lib/lib.d.ts +0 -32
  29. package/dist/emitter/lib/lib.d.ts.map +0 -1
  30. package/dist/emitter/lib/lib.js +0 -110
  31. package/dist/emitter/lib/lib.js.map +0 -1
  32. package/dist/emitter/lib/logger-level.d.ts +0 -10
  33. package/dist/emitter/lib/logger-level.d.ts.map +0 -1
  34. package/dist/emitter/lib/logger-level.js +0 -13
  35. package/dist/emitter/lib/logger-level.js.map +0 -1
  36. package/dist/emitter/lib/logger.d.ts +0 -20
  37. package/dist/emitter/lib/logger.d.ts.map +0 -1
  38. package/dist/emitter/lib/logger.js +0 -54
  39. package/dist/emitter/lib/logger.js.map +0 -1
  40. package/dist/emitter/lib/model.d.ts +0 -8
  41. package/dist/emitter/lib/model.d.ts.map +0 -1
  42. package/dist/emitter/lib/model.js +0 -37
  43. package/dist/emitter/lib/model.js.map +0 -1
  44. package/dist/emitter/lib/operation-converter.d.ts +0 -8
  45. package/dist/emitter/lib/operation-converter.d.ts.map +0 -1
  46. package/dist/emitter/lib/operation-converter.js +0 -316
  47. package/dist/emitter/lib/operation-converter.js.map +0 -1
  48. package/dist/emitter/lib/service-authentication.d.ts +0 -5
  49. package/dist/emitter/lib/service-authentication.d.ts.map +0 -1
  50. package/dist/emitter/lib/service-authentication.js +0 -123
  51. package/dist/emitter/lib/service-authentication.js.map +0 -1
  52. package/dist/emitter/lib/type-converter.d.ts +0 -8
  53. package/dist/emitter/lib/type-converter.d.ts.map +0 -1
  54. package/dist/emitter/lib/type-converter.js +0 -332
  55. package/dist/emitter/lib/type-converter.js.map +0 -1
  56. package/dist/emitter/lib/typespec-server.d.ts +0 -10
  57. package/dist/emitter/lib/typespec-server.d.ts.map +0 -1
  58. package/dist/emitter/lib/typespec-server.js +0 -90
  59. package/dist/emitter/lib/typespec-server.js.map +0 -1
  60. package/dist/emitter/lib/utils.d.ts +0 -9
  61. package/dist/emitter/lib/utils.d.ts.map +0 -1
  62. package/dist/emitter/lib/utils.js +0 -30
  63. package/dist/emitter/lib/utils.js.map +0 -1
  64. package/dist/emitter/options.d.ts +0 -73
  65. package/dist/emitter/options.d.ts.map +0 -1
  66. package/dist/emitter/options.js +0 -87
  67. package/dist/emitter/options.js.map +0 -1
  68. package/dist/emitter/sdk-context-options.d.ts +0 -9
  69. package/dist/emitter/sdk-context-options.d.ts.map +0 -1
  70. package/dist/emitter/sdk-context-options.js +0 -31
  71. package/dist/emitter/sdk-context-options.js.map +0 -1
  72. package/dist/emitter/sdk-context.d.ts +0 -18
  73. package/dist/emitter/sdk-context.d.ts.map +0 -1
  74. package/dist/emitter/sdk-context.js +0 -4
  75. package/dist/emitter/sdk-context.js.map +0 -1
  76. package/dist/emitter/tsdoc-metadata.json +0 -11
  77. package/dist/emitter/type/body-media-type.d.ts +0 -12
  78. package/dist/emitter/type/body-media-type.d.ts.map +0 -1
  79. package/dist/emitter/type/body-media-type.js +0 -26
  80. package/dist/emitter/type/body-media-type.js.map +0 -1
  81. package/dist/emitter/type/client-kind.d.ts +0 -5
  82. package/dist/emitter/type/client-kind.d.ts.map +0 -1
  83. package/dist/emitter/type/client-kind.js +0 -8
  84. package/dist/emitter/type/client-kind.js.map +0 -1
  85. package/dist/emitter/type/code-model.d.ts +0 -12
  86. package/dist/emitter/type/code-model.d.ts.map +0 -1
  87. package/dist/emitter/type/code-model.js +0 -4
  88. package/dist/emitter/type/code-model.js.map +0 -1
  89. package/dist/emitter/type/collection-format.d.ts +0 -13
  90. package/dist/emitter/type/collection-format.d.ts.map +0 -1
  91. package/dist/emitter/type/collection-format.js +0 -22
  92. package/dist/emitter/type/collection-format.js.map +0 -1
  93. package/dist/emitter/type/configuration.d.ts +0 -7
  94. package/dist/emitter/type/configuration.d.ts.map +0 -1
  95. package/dist/emitter/type/configuration.js +0 -4
  96. package/dist/emitter/type/configuration.js.map +0 -1
  97. package/dist/emitter/type/external-docs.d.ts +0 -5
  98. package/dist/emitter/type/external-docs.d.ts.map +0 -1
  99. package/dist/emitter/type/external-docs.js +0 -4
  100. package/dist/emitter/type/external-docs.js.map +0 -1
  101. package/dist/emitter/type/http-response-header.d.ts +0 -9
  102. package/dist/emitter/type/http-response-header.d.ts.map +0 -1
  103. package/dist/emitter/type/http-response-header.js +0 -4
  104. package/dist/emitter/type/http-response-header.js.map +0 -1
  105. package/dist/emitter/type/input-api-key-auth.d.ts +0 -7
  106. package/dist/emitter/type/input-api-key-auth.d.ts.map +0 -1
  107. package/dist/emitter/type/input-api-key-auth.js +0 -4
  108. package/dist/emitter/type/input-api-key-auth.js.map +0 -1
  109. package/dist/emitter/type/input-auth.d.ts +0 -7
  110. package/dist/emitter/type/input-auth.d.ts.map +0 -1
  111. package/dist/emitter/type/input-auth.js +0 -4
  112. package/dist/emitter/type/input-auth.js.map +0 -1
  113. package/dist/emitter/type/input-client.d.ts +0 -16
  114. package/dist/emitter/type/input-client.d.ts.map +0 -1
  115. package/dist/emitter/type/input-client.js +0 -4
  116. package/dist/emitter/type/input-client.js.map +0 -1
  117. package/dist/emitter/type/input-constant.d.ts +0 -6
  118. package/dist/emitter/type/input-constant.d.ts.map +0 -1
  119. package/dist/emitter/type/input-constant.js +0 -4
  120. package/dist/emitter/type/input-constant.js.map +0 -1
  121. package/dist/emitter/type/input-examples.d.ts +0 -77
  122. package/dist/emitter/type/input-examples.d.ts.map +0 -1
  123. package/dist/emitter/type/input-examples.js +0 -4
  124. package/dist/emitter/type/input-examples.js.map +0 -1
  125. package/dist/emitter/type/input-oauth2-auth.d.ts +0 -4
  126. package/dist/emitter/type/input-oauth2-auth.d.ts.map +0 -1
  127. package/dist/emitter/type/input-oauth2-auth.js +0 -4
  128. package/dist/emitter/type/input-oauth2-auth.js.map +0 -1
  129. package/dist/emitter/type/input-operation-parameter-kind.d.ts +0 -9
  130. package/dist/emitter/type/input-operation-parameter-kind.d.ts.map +0 -1
  131. package/dist/emitter/type/input-operation-parameter-kind.js +0 -12
  132. package/dist/emitter/type/input-operation-parameter-kind.js.map +0 -1
  133. package/dist/emitter/type/input-operation.d.ts +0 -38
  134. package/dist/emitter/type/input-operation.d.ts.map +0 -1
  135. package/dist/emitter/type/input-operation.js +0 -4
  136. package/dist/emitter/type/input-operation.js.map +0 -1
  137. package/dist/emitter/type/input-parameter.d.ts +0 -30
  138. package/dist/emitter/type/input-parameter.d.ts.map +0 -1
  139. package/dist/emitter/type/input-parameter.js +0 -4
  140. package/dist/emitter/type/input-parameter.js.map +0 -1
  141. package/dist/emitter/type/input-type.d.ts +0 -120
  142. package/dist/emitter/type/input-type.d.ts.map +0 -1
  143. package/dist/emitter/type/input-type.js +0 -21
  144. package/dist/emitter/type/input-type.js.map +0 -1
  145. package/dist/emitter/type/literal-type-context.d.ts +0 -8
  146. package/dist/emitter/type/literal-type-context.d.ts.map +0 -1
  147. package/dist/emitter/type/literal-type-context.js +0 -4
  148. package/dist/emitter/type/literal-type-context.js.map +0 -1
  149. package/dist/emitter/type/operation-final-state-via.d.ts +0 -12
  150. package/dist/emitter/type/operation-final-state-via.d.ts.map +0 -1
  151. package/dist/emitter/type/operation-final-state-via.js +0 -36
  152. package/dist/emitter/type/operation-final-state-via.js.map +0 -1
  153. package/dist/emitter/type/operation-long-running.d.ts +0 -8
  154. package/dist/emitter/type/operation-long-running.d.ts.map +0 -1
  155. package/dist/emitter/type/operation-long-running.js +0 -4
  156. package/dist/emitter/type/operation-long-running.js.map +0 -1
  157. package/dist/emitter/type/operation-paging.d.ts +0 -8
  158. package/dist/emitter/type/operation-paging.d.ts.map +0 -1
  159. package/dist/emitter/type/operation-paging.js +0 -4
  160. package/dist/emitter/type/operation-paging.js.map +0 -1
  161. package/dist/emitter/type/operation-response.d.ts +0 -12
  162. package/dist/emitter/type/operation-response.d.ts.map +0 -1
  163. package/dist/emitter/type/operation-response.js +0 -4
  164. package/dist/emitter/type/operation-response.js.map +0 -1
  165. package/dist/emitter/type/protocols.d.ts +0 -3
  166. package/dist/emitter/type/protocols.d.ts.map +0 -1
  167. package/dist/emitter/type/protocols.js +0 -4
  168. package/dist/emitter/type/protocols.js.map +0 -1
  169. package/dist/emitter/type/request-location.d.ts +0 -12
  170. package/dist/emitter/type/request-location.d.ts.map +0 -1
  171. package/dist/emitter/type/request-location.js +0 -19
  172. package/dist/emitter/type/request-location.js.map +0 -1
  173. package/dist/emitter/type/request-method.d.ts +0 -13
  174. package/dist/emitter/type/request-method.d.ts.map +0 -1
  175. package/dist/emitter/type/request-method.js +0 -40
  176. package/dist/emitter/type/request-method.js.map +0 -1
  177. package/dist/emitter/type/validation-type.d.ts +0 -6
  178. package/dist/emitter/type/validation-type.d.ts.map +0 -1
  179. package/dist/emitter/type/validation-type.js +0 -9
  180. package/dist/emitter/type/validation-type.js.map +0 -1
  181. package/dist/generator/CommandLine.dll +0 -0
  182. package/dist/generator/Humanizer.dll +0 -0
  183. package/dist/generator/Microsoft.Bcl.AsyncInterfaces.dll +0 -0
  184. package/dist/generator/Microsoft.Build.Framework.dll +0 -0
  185. package/dist/generator/Microsoft.Build.dll +0 -0
  186. package/dist/generator/Microsoft.CodeAnalysis.CSharp.Workspaces.dll +0 -0
  187. package/dist/generator/Microsoft.CodeAnalysis.CSharp.dll +0 -0
  188. package/dist/generator/Microsoft.CodeAnalysis.Workspaces.dll +0 -0
  189. package/dist/generator/Microsoft.CodeAnalysis.dll +0 -0
  190. package/dist/generator/Microsoft.NET.StringTools.dll +0 -0
  191. package/dist/generator/Microsoft.TypeSpec.Generator +0 -0
  192. package/dist/generator/Microsoft.TypeSpec.Generator.ClientModel.StubLibrary.deps.json +0 -819
  193. package/dist/generator/Microsoft.TypeSpec.Generator.ClientModel.StubLibrary.dll +0 -0
  194. package/dist/generator/Microsoft.TypeSpec.Generator.ClientModel.StubLibrary.pdb +0 -0
  195. package/dist/generator/Microsoft.TypeSpec.Generator.ClientModel.deps.json +0 -802
  196. package/dist/generator/Microsoft.TypeSpec.Generator.ClientModel.dll +0 -0
  197. package/dist/generator/Microsoft.TypeSpec.Generator.ClientModel.pdb +0 -0
  198. package/dist/generator/Microsoft.TypeSpec.Generator.Input.dll +0 -0
  199. package/dist/generator/Microsoft.TypeSpec.Generator.Input.pdb +0 -0
  200. package/dist/generator/Microsoft.TypeSpec.Generator.deps.json +0 -758
  201. package/dist/generator/Microsoft.TypeSpec.Generator.dll +0 -0
  202. package/dist/generator/Microsoft.TypeSpec.Generator.pdb +0 -0
  203. package/dist/generator/Microsoft.TypeSpec.Generator.runtimeconfig.json +0 -12
  204. package/dist/generator/NuGet.Common.dll +0 -0
  205. package/dist/generator/NuGet.Configuration.dll +0 -0
  206. package/dist/generator/NuGet.Frameworks.dll +0 -0
  207. package/dist/generator/System.ClientModel.dll +0 -0
  208. package/dist/generator/System.ComponentModel.Composition.dll +0 -0
  209. package/dist/generator/System.Composition.AttributedModel.dll +0 -0
  210. package/dist/generator/System.Composition.Convention.dll +0 -0
  211. package/dist/generator/System.Composition.Hosting.dll +0 -0
  212. package/dist/generator/System.Composition.Runtime.dll +0 -0
  213. package/dist/generator/System.Composition.TypedParts.dll +0 -0
  214. package/dist/generator/System.Configuration.ConfigurationManager.dll +0 -0
  215. package/dist/generator/System.Diagnostics.EventLog.dll +0 -0
  216. package/dist/generator/System.IO.Pipelines.dll +0 -0
  217. package/dist/generator/System.Memory.Data.dll +0 -0
  218. package/dist/generator/System.Reflection.MetadataLoadContext.dll +0 -0
  219. package/dist/generator/System.Security.Cryptography.ProtectedData.dll +0 -0
  220. package/dist/generator/cs/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll +0 -0
  221. package/dist/generator/cs/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
  222. package/dist/generator/cs/Microsoft.CodeAnalysis.Workspaces.resources.dll +0 -0
  223. package/dist/generator/cs/Microsoft.CodeAnalysis.resources.dll +0 -0
  224. package/dist/generator/de/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll +0 -0
  225. package/dist/generator/de/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
  226. package/dist/generator/de/Microsoft.CodeAnalysis.Workspaces.resources.dll +0 -0
  227. package/dist/generator/de/Microsoft.CodeAnalysis.resources.dll +0 -0
  228. package/dist/generator/es/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll +0 -0
  229. package/dist/generator/es/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
  230. package/dist/generator/es/Microsoft.CodeAnalysis.Workspaces.resources.dll +0 -0
  231. package/dist/generator/es/Microsoft.CodeAnalysis.resources.dll +0 -0
  232. package/dist/generator/fr/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll +0 -0
  233. package/dist/generator/fr/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
  234. package/dist/generator/fr/Microsoft.CodeAnalysis.Workspaces.resources.dll +0 -0
  235. package/dist/generator/fr/Microsoft.CodeAnalysis.resources.dll +0 -0
  236. package/dist/generator/it/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll +0 -0
  237. package/dist/generator/it/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
  238. package/dist/generator/it/Microsoft.CodeAnalysis.Workspaces.resources.dll +0 -0
  239. package/dist/generator/it/Microsoft.CodeAnalysis.resources.dll +0 -0
  240. package/dist/generator/ja/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll +0 -0
  241. package/dist/generator/ja/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
  242. package/dist/generator/ja/Microsoft.CodeAnalysis.Workspaces.resources.dll +0 -0
  243. package/dist/generator/ja/Microsoft.CodeAnalysis.resources.dll +0 -0
  244. package/dist/generator/ko/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll +0 -0
  245. package/dist/generator/ko/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
  246. package/dist/generator/ko/Microsoft.CodeAnalysis.Workspaces.resources.dll +0 -0
  247. package/dist/generator/ko/Microsoft.CodeAnalysis.resources.dll +0 -0
  248. package/dist/generator/pl/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll +0 -0
  249. package/dist/generator/pl/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
  250. package/dist/generator/pl/Microsoft.CodeAnalysis.Workspaces.resources.dll +0 -0
  251. package/dist/generator/pl/Microsoft.CodeAnalysis.resources.dll +0 -0
  252. package/dist/generator/pt-BR/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll +0 -0
  253. package/dist/generator/pt-BR/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
  254. package/dist/generator/pt-BR/Microsoft.CodeAnalysis.Workspaces.resources.dll +0 -0
  255. package/dist/generator/pt-BR/Microsoft.CodeAnalysis.resources.dll +0 -0
  256. package/dist/generator/ru/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll +0 -0
  257. package/dist/generator/ru/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
  258. package/dist/generator/ru/Microsoft.CodeAnalysis.Workspaces.resources.dll +0 -0
  259. package/dist/generator/ru/Microsoft.CodeAnalysis.resources.dll +0 -0
  260. package/dist/generator/runtimes/win/lib/net8.0/System.Diagnostics.EventLog.Messages.dll +0 -0
  261. package/dist/generator/runtimes/win/lib/net8.0/System.Diagnostics.EventLog.dll +0 -0
  262. package/dist/generator/tr/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll +0 -0
  263. package/dist/generator/tr/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
  264. package/dist/generator/tr/Microsoft.CodeAnalysis.Workspaces.resources.dll +0 -0
  265. package/dist/generator/tr/Microsoft.CodeAnalysis.resources.dll +0 -0
  266. package/dist/generator/zh-Hans/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll +0 -0
  267. package/dist/generator/zh-Hans/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
  268. package/dist/generator/zh-Hans/Microsoft.CodeAnalysis.Workspaces.resources.dll +0 -0
  269. package/dist/generator/zh-Hans/Microsoft.CodeAnalysis.resources.dll +0 -0
  270. package/dist/generator/zh-Hant/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll +0 -0
  271. package/dist/generator/zh-Hant/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
  272. package/dist/generator/zh-Hant/Microsoft.CodeAnalysis.Workspaces.resources.dll +0 -0
  273. package/dist/generator/zh-Hant/Microsoft.CodeAnalysis.resources.dll +0 -0
  274. package/dist/typespec-http-client-csharp.d.ts +0 -458
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation. All rights reserved.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typespec/http-client-csharp",
3
- "version": "0.1.9-alpha.20250214.3",
3
+ "version": "0.1.9",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "The typespec library that can be used to generate C# models from a TypeSpec REST protocol binding",
6
6
  "homepage": "https://github.com/Microsoft/typespec",
@@ -21,24 +21,6 @@
21
21
  "exports": {
22
22
  ".": "./dist/emitter/index.js"
23
23
  },
24
- "scripts": {
25
- "clean": "rimraf ./dist ./emitter/temp && dotnet clean ./generator",
26
- "build:emitter": "tsc -p ./emitter/tsconfig.build.json",
27
- "build:generator": "dotnet build ./generator",
28
- "build": "npm run build:emitter && npm run build:generator && npm run extract-api",
29
- "watch": "tsc -p ./emitter/tsconfig.build.json --watch",
30
- "lint-typespec-library": "tsp compile . --warn-as-error --import @typespec/library-linter --no-emit",
31
- "test:emitter": "vitest run -c ./emitter/vitest.config.ts",
32
- "test:generator": "dotnet test ./generator",
33
- "test": "npm run test:emitter && npm run test:generator",
34
- "test:watch": "vitest -w -c ./emitter/vitest.config.ts",
35
- "test:ui": "vitest --ui -c ./emitter/vitest.config.ts",
36
- "test:ci": "vitest run -c ./emitter/vitest.config.ts --coverage --reporter=junit --reporter=default",
37
- "lint": "eslint . --max-warnings=0",
38
- "lint:fix": "eslint . --fix",
39
- "format": "pnpm -w format:dir packages/http-client-csharp",
40
- "extract-api": "npx api-extractor run --local --verbose"
41
- },
42
24
  "files": [
43
25
  "dist/**"
44
26
  ],
@@ -47,34 +29,52 @@
47
29
  "json-serialize-refs": "0.1.0-0"
48
30
  },
49
31
  "peerDependencies": {
50
- "@azure-tools/typespec-azure-core": ">=0.51.0 <1.0.0 || ~0.52.0-0",
51
- "@azure-tools/typespec-client-generator-core": ">=0.51.0 <1.0.0 || ~0.52.0-0",
52
- "@typespec/compiler": ">=0.65.0 <1.0.0 || ~0.66.0-0",
53
- "@typespec/http": ">=0.65.0 <1.0.0 || ~0.66.0-0",
54
- "@typespec/openapi": ">=0.65.0 <1.0.0 || ~0.66.0-0",
55
- "@typespec/rest": ">=0.65.0 <1.0.0 || ~0.66.0-0",
56
- "@typespec/versioning": ">=0.65.0 <1.0.0 || ~0.66.0-0"
32
+ "@azure-tools/typespec-azure-core": ">=0.50.0 <1.0.0 || ~0.51.0-0",
33
+ "@azure-tools/typespec-client-generator-core": ">=0.50.0 <1.0.0 || ~0.51.0-0",
34
+ "@typespec/compiler": ">=0.64.0 <1.0.0 || ~0.65.0-0",
35
+ "@typespec/http": ">=0.64.0 <1.0.0 || ~0.65.0-0",
36
+ "@typespec/openapi": ">=0.64.0 <1.0.0 || ~0.65.0-0",
37
+ "@typespec/rest": ">=0.64.0 <1.0.0 || ~0.65.0-0",
38
+ "@typespec/versioning": ">=0.64.0 <1.0.0 || ~0.65.0-0"
57
39
  },
58
40
  "devDependencies": {
59
- "@azure-tools/azure-http-specs": "0.1.0-alpha.6",
60
- "@azure-tools/typespec-azure-core": "0.51.0",
61
- "@azure-tools/typespec-client-generator-core": "0.51.1",
41
+ "@azure-tools/azure-http-specs": "0.1.0-alpha.5",
42
+ "@azure-tools/typespec-azure-core": "0.50.0",
43
+ "@azure-tools/typespec-client-generator-core": "0.50.2",
62
44
  "@microsoft/api-extractor": "^7.47.11",
63
45
  "@types/node": "~22.7.5",
64
- "@typespec/compiler": "0.65.0",
65
- "@typespec/http": "0.65.0",
66
- "@typespec/http-specs": "0.1.0-alpha.9",
67
- "@typespec/json-schema": "0.65.0",
68
- "@typespec/library-linter": "0.65.0",
69
- "@typespec/openapi": "0.65.0",
70
- "@typespec/rest": "0.65.0",
71
- "@typespec/versioning": "0.65.0",
72
- "@typespec/xml": "^0.65.0",
46
+ "@typespec/compiler": "0.64.0",
47
+ "@typespec/http": "0.64.0",
48
+ "@typespec/http-specs": "0.1.0-alpha.7",
49
+ "@typespec/json-schema": "0.64.0",
50
+ "@typespec/library-linter": "0.64.0",
51
+ "@typespec/openapi": "0.64.0",
52
+ "@typespec/rest": "0.64.1",
53
+ "@typespec/versioning": "0.64.0",
54
+ "@typespec/xml": "^0.64.0",
73
55
  "@vitest/coverage-v8": "^3.0.5",
74
56
  "@vitest/ui": "^3.0.5",
75
57
  "c8": "^10.1.2",
76
58
  "rimraf": "~6.0.1",
77
59
  "typescript": "~5.6.3",
78
60
  "vitest": "^3.0.5"
61
+ },
62
+ "scripts": {
63
+ "clean": "rimraf ./dist ./emitter/temp && dotnet clean ./generator",
64
+ "build:emitter": "tsc -p ./emitter/tsconfig.build.json",
65
+ "build:generator": "dotnet build ./generator",
66
+ "build": "npm run build:emitter && npm run build:generator && npm run extract-api",
67
+ "watch": "tsc -p ./emitter/tsconfig.build.json --watch",
68
+ "lint-typespec-library": "tsp compile . --warn-as-error --import @typespec/library-linter --no-emit",
69
+ "test:emitter": "vitest run -c ./emitter/vitest.config.ts",
70
+ "test:generator": "dotnet test ./generator",
71
+ "test": "npm run test:emitter && npm run test:generator",
72
+ "test:watch": "vitest -w -c ./emitter/vitest.config.ts",
73
+ "test:ui": "vitest --ui -c ./emitter/vitest.config.ts",
74
+ "test:ci": "vitest run -c ./emitter/vitest.config.ts --coverage --reporter=junit --reporter=default",
75
+ "lint": "eslint . --max-warnings=0",
76
+ "lint:fix": "eslint . --fix",
77
+ "format": "pnpm -w format:dir packages/http-client-csharp",
78
+ "extract-api": "npx api-extractor run --local --verbose"
79
79
  }
80
80
  }
package/readme.md CHANGED
@@ -49,25 +49,23 @@ options:
49
49
 
50
50
  **Supported Emitter options**:
51
51
 
52
- - `package-name` define the package name. If not specified, the first namespace defined in the TypeSpec is used as the package name.
53
- - `emitter-output-dir` define the output directory path which will store the generated code. If not specified, the `tsp-output` directory is used.
54
- - `generate-protocol-methods` indicate if you want to generate a **protocol method** for every operation or not. The default value is `true`.
55
- - `generate-convenience-methods` indicate if you want to generate a **convenience method** for every operation or not. The default value is `true`.
56
- - `unreferenced-types-handling` define the strategy how to handle unreferenced types. It can be `removeOrInternalize`, `internalize` or `keepAll`. The default value is `removeOrInternalize`.
57
- - `clear-output-folder` indicate if you want to clear up the output folder before generating. The default value is `true`.
58
- - `new-project` set to `true` to overwrite the csproj if it already exists. The default value is `false`.
59
- - `save-inputs` set to `true` to save the `tspCodeModel.json` and `Configuration.json` files that are emitted and used as inputs to the C# generator. The default value is `false`.
60
- - `debug` set to `true` to automatically attempt to attach to a debugger when executing the C# generator. The default value is `false`.
61
- - `plugin-name` by default this is set to `ClientModelPlugin`. Plugin authors can set this to the name of a plugin that inherits from `ClientModelPlugin`.
52
+ - `namespace` define the client library namespace. e.g. MyService.Namespace.
53
+ - `emitter-output-dir` define the output dire path which will store the generated code.
54
+ - `generate-protocol-methods` indicate if you want to generate **protocol method** for every operation or not. The default value is true.
55
+ - `generate-convenience-methods` indicate if you want to generate **convenience method** for every operation or not. The default value is true.
56
+ - `unreferenced-types-handling` define the strategy how to handle the unreferenced types. It can be `removeOrInternalize`, `internalize` or `keepAll`
57
+ - `model-namespace` indicate if we want to put the models in their own namespace which is a sub namespace of the client library namespace plus ".Models". if it is set `false`, the models will be put in the same namespace of the client. The default value is `true`.
58
+ - `clear-output-folder` indicate if you want to clear up the output folder.
59
+ - `package-name` define the package name.
62
60
 
63
61
  ## Convenience API
64
62
 
65
63
  By default, TypeSpec csharp generates all protocol APIs and convenience APIs.
66
64
  A few exceptions are API of JSON Merge Patch, and API of long-running operation with ambiguous response type.
67
65
 
68
- You can configure whether to generate a convenience method for a specific operation via the `convenienceAPI` decorator.
66
+ You can configure whether generate convenience API or not via `convenienceAPI` decorator.
69
67
 
70
68
  ## Spector Tests
71
69
 
72
70
  We run the generator against the common set of test defined in https://github.com/microsoft/typespec/tree/main/packages/http-specs.
73
- For details on how to run and debug these tests see [Spector Testing](generator/docs/spector.md).
71
+ For details on how to run and debug these tests see [Spector Testing](generator/docs/spector.md)
@@ -1,11 +0,0 @@
1
- /**
2
- * The name of the file that contains the generated code model.
3
- * @beta
4
- */
5
- export declare const tspOutputFileName = "tspCodeModel.json";
6
- /**
7
- * The name of the file that contains the generated configuration file.
8
- * @beta
9
- */
10
- export declare const configurationFileName = "Configuration.json";
11
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../emitter/src/constants.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,iBAAiB,sBAAsB,CAAC;AACrD;;;GAGG;AACH,eAAO,MAAM,qBAAqB,uBAAuB,CAAC"}
@@ -1,18 +0,0 @@
1
- // Copyright (c) Microsoft Corporation. All rights reserved.
2
- // Licensed under the MIT License. See License.txt in the project root for license information.
3
- /**
4
- * The name of the file that contains the generated code model.
5
- * @beta
6
- */
7
- export const tspOutputFileName = "tspCodeModel.json";
8
- /**
9
- * The name of the file that contains the generated configuration file.
10
- * @beta
11
- */
12
- export const configurationFileName = "Configuration.json";
13
- /**
14
- * The minimum supported major version of the .NET SDK for invoking the generator.
15
- * @internal
16
- */
17
- export const _minSupportedDotNetSdkVersion = 8;
18
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../emitter/src/constants.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAE/F;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AACrD;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,oBAAoB,CAAC;AAE1D;;;GAGG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC"}
@@ -1,19 +0,0 @@
1
- import { EmitContext } from "@typespec/compiler";
2
- import { CSharpEmitterOptions } from "./options.js";
3
- import { CSharpEmitterContext } from "./sdk-context.js";
4
- import { CodeModel } from "./type/code-model.js";
5
- /**
6
- * The entry point for the emitter. This function is called by the typespec compiler.
7
- * @param context - The emit context
8
- * @beta
9
- */
10
- export declare function $onEmit(context: EmitContext<CSharpEmitterOptions>): Promise<void>;
11
- /**
12
- * Write the code model to the output folder.
13
- * @param context - The CSharp emitter context
14
- * @param codeModel - The code model
15
- * @param outputFolder - The output folder
16
- * @beta
17
- */
18
- export declare function writeCodeModel(context: CSharpEmitterContext, codeModel: CodeModel, outputFolder: string): Promise<void>;
19
- //# sourceMappingURL=emitter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"emitter.d.ts","sourceRoot":"","sources":["../../emitter/src/emitter.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,WAAW,EAOZ,MAAM,oBAAoB,CAAC;AAc5B,OAAO,EAAwB,oBAAoB,EAAkB,MAAM,cAAc,CAAC;AAE1F,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAuBjD;;;;GAIG;AACH,wBAAsB,OAAO,CAAC,OAAO,EAAE,WAAW,CAAC,oBAAoB,CAAC,iBAiHvE;AAED;;;;;;GAMG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,oBAAoB,EAC7B,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,MAAM,iBAMrB"}
@@ -1,239 +0,0 @@
1
- // Copyright (c) Microsoft Corporation. All rights reserved.
2
- // Licensed under the MIT License. See License.txt in the project root for license information.
3
- import { createSdkContext, UsageFlags } from "@azure-tools/typespec-client-generator-core";
4
- import { getDirectoryPath, joinPaths, logDiagnostics, NoTarget, resolvePath, } from "@typespec/compiler";
5
- import fs, { statSync } from "fs";
6
- import { PreserveType, stringifyRefs } from "json-serialize-refs";
7
- import { dirname } from "path";
8
- import { fileURLToPath } from "url";
9
- import { _minSupportedDotNetSdkVersion, configurationFileName, tspOutputFileName, } from "./constants.js";
10
- import { createModel } from "./lib/client-model-builder.js";
11
- import { LoggerLevel } from "./lib/logger-level.js";
12
- import { Logger } from "./lib/logger.js";
13
- import { execAsync } from "./lib/utils.js";
14
- import { _resolveOutputFolder, resolveOptions } from "./options.js";
15
- import { defaultSDKContextOptions } from "./sdk-context-options.js";
16
- /**
17
- * Look for the project root by looking up until a `package.json` is found.
18
- * @param path Path to start looking
19
- */
20
- function findProjectRoot(path) {
21
- let current = path;
22
- while (true) {
23
- const pkgPath = joinPaths(current, "package.json");
24
- const stats = checkFile(pkgPath);
25
- if (stats?.isFile()) {
26
- return current;
27
- }
28
- const parent = getDirectoryPath(current);
29
- if (parent === current) {
30
- return undefined;
31
- }
32
- current = parent;
33
- }
34
- }
35
- /**
36
- * The entry point for the emitter. This function is called by the typespec compiler.
37
- * @param context - The emit context
38
- * @beta
39
- */
40
- export async function $onEmit(context) {
41
- const program = context.program;
42
- const options = resolveOptions(context);
43
- const outputFolder = _resolveOutputFolder(context);
44
- /* set the loglevel. */
45
- const logger = new Logger(program, options.logLevel ?? LoggerLevel.INFO);
46
- if (!program.compilerOptions.noEmit && !program.hasError()) {
47
- // Write out the dotnet model to the output path
48
- const sdkContext = {
49
- ...(await createSdkContext(context, "@typespec/http-client-csharp", defaultSDKContextOptions)),
50
- logger: logger,
51
- __typeCache: {
52
- types: new Map(),
53
- models: new Map(),
54
- enums: new Map(),
55
- },
56
- };
57
- if (context.program.diagnostics.length > 0 &&
58
- context.program.diagnostics.filter((digs) => digs.severity === "error").length > 0) {
59
- logDiagnostics(context.program.diagnostics, context.program.host.logSink);
60
- process.exit(1);
61
- }
62
- const root = createModel(sdkContext);
63
- if (root) {
64
- const generatedFolder = resolvePath(outputFolder, "src", "Generated");
65
- if (!fs.existsSync(generatedFolder)) {
66
- fs.mkdirSync(generatedFolder, { recursive: true });
67
- }
68
- // emit tspCodeModel.json
69
- await writeCodeModel(sdkContext, root, outputFolder);
70
- const namespace = root.Name;
71
- const configurations = {
72
- "output-folder": ".",
73
- "package-name": options["package-name"] ?? namespace,
74
- "unreferenced-types-handling": options["unreferenced-types-handling"],
75
- "disable-xml-docs": options["disable-xml-docs"] === false ? undefined : options["disable-xml-docs"],
76
- };
77
- //emit configuration.json
78
- await program.host.writeFile(resolvePath(outputFolder, configurationFileName), prettierOutput(JSON.stringify(configurations, null, 2)));
79
- const csProjFile = resolvePath(outputFolder, "src", `${configurations["package-name"]}.csproj`);
80
- logger.info(`Checking if ${csProjFile} exists`);
81
- const newProjectOption = options["new-project"] || !checkFile(csProjFile) ? "--new-project" : "";
82
- const debugFlag = (options.debug ?? false) ? "--debug" : "";
83
- const emitterPath = options["emitter-extension-path"] ?? import.meta.url;
84
- const projectRoot = findProjectRoot(dirname(fileURLToPath(emitterPath)));
85
- const generatorPath = resolvePath(projectRoot + "/dist/generator/Microsoft.TypeSpec.Generator.dll");
86
- const command = `dotnet --roll-forward Major ${generatorPath} ${outputFolder} -p ${options["plugin-name"]}${constructCommandArg(newProjectOption)}${constructCommandArg(debugFlag)}`;
87
- logger.info(command);
88
- try {
89
- const result = await execAsync("dotnet", [
90
- "--roll-forward",
91
- "Major",
92
- generatorPath,
93
- outputFolder,
94
- "-p",
95
- options["plugin-name"],
96
- newProjectOption,
97
- debugFlag,
98
- ], { stdio: "inherit" });
99
- if (result.exitCode !== 0) {
100
- const isValid = await _validateDotNetSdk(sdkContext, _minSupportedDotNetSdkVersion);
101
- // if the dotnet sdk is valid, the error is not dependency issue, log it as normal
102
- if (isValid) {
103
- if (result.stderr)
104
- logger.error(result.stderr);
105
- if (result.stdout)
106
- logger.verbose(result.stdout);
107
- throw new Error(`Failed to generate the library. Exit code: ${result.exitCode}`);
108
- }
109
- }
110
- }
111
- catch (error) {
112
- const isValid = await _validateDotNetSdk(sdkContext, _minSupportedDotNetSdkVersion);
113
- // if the dotnet sdk is valid, the error is not dependency issue, log it as normal
114
- if (isValid)
115
- throw new Error(error);
116
- }
117
- if (!options["save-inputs"]) {
118
- // delete
119
- deleteFile(resolvePath(outputFolder, tspOutputFileName), logger);
120
- deleteFile(resolvePath(outputFolder, configurationFileName), logger);
121
- }
122
- }
123
- }
124
- }
125
- /**
126
- * Write the code model to the output folder.
127
- * @param context - The CSharp emitter context
128
- * @param codeModel - The code model
129
- * @param outputFolder - The output folder
130
- * @beta
131
- */
132
- export async function writeCodeModel(context, codeModel, outputFolder) {
133
- await context.program.host.writeFile(resolvePath(outputFolder, tspOutputFileName), prettierOutput(stringifyRefs(codeModel, transformJSONProperties, 1, PreserveType.Objects)));
134
- }
135
- /** check the dotnet sdk installation.
136
- * Report diagnostic if dotnet sdk is not installed or its version does not meet prerequisite
137
- * @param sdkContext - The SDK context
138
- * @param minVersionRequisite - The minimum required major version
139
- * @param logger - The logger
140
- * @internal
141
- */
142
- export async function _validateDotNetSdk(sdkContext, minMajorVersion) {
143
- try {
144
- const result = await execAsync("dotnet", ["--version"], { stdio: "pipe" });
145
- return validateDotNetSdkVersionCore(sdkContext, result.stdout, minMajorVersion);
146
- }
147
- catch (error) {
148
- if (error && "code" in error && error["code"] === "ENOENT") {
149
- sdkContext.logger.reportDiagnostic({
150
- code: "invalid-dotnet-sdk-dependency",
151
- messageId: "missing",
152
- format: {
153
- dotnetMajorVersion: `${minMajorVersion}`,
154
- downloadUrl: "https://dotnet.microsoft.com/",
155
- },
156
- target: NoTarget,
157
- });
158
- }
159
- return false;
160
- }
161
- }
162
- function validateDotNetSdkVersionCore(sdkContext, version, minMajorVersion) {
163
- if (version) {
164
- const dotIndex = version.indexOf(".");
165
- const firstPart = dotIndex === -1 ? version : version.substring(0, dotIndex);
166
- const major = Number(firstPart);
167
- if (isNaN(major)) {
168
- sdkContext.logger.error("Invalid .NET SDK version.");
169
- return false;
170
- }
171
- if (major < minMajorVersion) {
172
- sdkContext.logger.reportDiagnostic({
173
- code: "invalid-dotnet-sdk-dependency",
174
- messageId: "invalidVersion",
175
- format: {
176
- installedVersion: version,
177
- dotnetMajorVersion: `${minMajorVersion}`,
178
- downloadUrl: "https://dotnet.microsoft.com/",
179
- },
180
- target: NoTarget,
181
- });
182
- return false;
183
- }
184
- return true;
185
- }
186
- else {
187
- sdkContext.logger.error("Cannot get the installed .NET SDK version.");
188
- return false;
189
- }
190
- }
191
- function constructCommandArg(arg) {
192
- return arg !== "" ? ` ${arg}` : "";
193
- }
194
- function transformJSONProperties(key, value) {
195
- // convertUsageNumbersToStrings
196
- if (this["kind"] === "model" || this["kind"] === "enum") {
197
- if (key === "usage" && typeof value === "number") {
198
- if (value === 0) {
199
- return "None";
200
- }
201
- const result = [];
202
- for (const prop in UsageFlags) {
203
- if (!isNaN(Number(prop))) {
204
- if ((value & Number(prop)) !== 0) {
205
- result.push(UsageFlags[prop]);
206
- }
207
- }
208
- }
209
- return result.join(",");
210
- }
211
- }
212
- // skip __raw if there is one
213
- if (key === "__raw") {
214
- return undefined;
215
- }
216
- return value;
217
- }
218
- function deleteFile(filePath, logger) {
219
- fs.unlink(filePath, (err) => {
220
- if (err) {
221
- logger.error(`Failed to delete files: ${err}`);
222
- }
223
- else {
224
- logger.info(`File ${filePath} is deleted.`);
225
- }
226
- });
227
- }
228
- function prettierOutput(output) {
229
- return output + "\n";
230
- }
231
- function checkFile(pkgPath) {
232
- try {
233
- return statSync(pkgPath);
234
- }
235
- catch (error) {
236
- return undefined;
237
- }
238
- }
239
- //# sourceMappingURL=emitter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"emitter.js","sourceRoot":"","sources":["../../emitter/src/emitter.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAE/F,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,6CAA6C,CAAC;AAC3F,OAAO,EAEL,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,QAAQ,EAER,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAwB,cAAc,EAAE,MAAM,cAAc,CAAC;AAC1F,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAKpE;;;GAGG;AACH,SAAS,eAAe,CAAC,IAAY;IACnC,IAAI,OAAO,GAAG,IAAI,CAAC;IACnB,OAAO,IAAI,EAAE,CAAC;QACZ,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;QACnD,MAAM,K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AC1B,CAAC;IACH,CAAC;IAED,6BAA6B;IAC7B,IAAI,GAAG,KAAK,OAAO,EAAE,CAAC;QACpB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,UAAU,CAAC,QAAgB,EAAE,MAAc;IAClD,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,EAAE;QAC1B,IAAI,GAAG,EAAE,CAAC;YACR,MAAM,CAAC,KAAK,CAAC,2BAA2B,GAAG,EAAE,CAAC,CAAC;QACjD,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,QAAQ,QAAQ,cAAc,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,cAAc,CAAC,MAAc;IACpC,OAAO,MAAM,GAAG,IAAI,CAAC;AACvB,CAAC;AAED,SAAS,SAAS,CAAC,OAAe;IAChC,IAAI,CAAC;QACH,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC3B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC"}
@@ -1,10 +0,0 @@
1
- export { configurationFileName, tspOutputFileName } from "./constants.js";
2
- export { $onEmit, writeCodeModel } from "./emitter.js";
3
- export { createModel } from "./lib/client-model-builder.js";
4
- export { createDiagnostic, getTracer, reportDiagnostic } from "./lib/lib.js";
5
- export { LoggerLevel } from "./lib/logger-level.js";
6
- export { Logger } from "./lib/logger.js";
7
- export { CSharpEmitterOptions, CSharpEmitterOptionsSchema, defaultOptions, resolveOptions, } from "./options.js";
8
- export { setSDKContextOptions } from "./sdk-context-options.js";
9
- export { CSharpEmitterContext } from "./sdk-context.js";
10
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../emitter/src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,cAAc,EACd,cAAc,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,11 +0,0 @@
1
- // Copyright (c) Microsoft Corporation. All rights reserved.
2
- // Licensed under the MIT License. See License.txt in the project root for license information.
3
- export { configurationFileName, tspOutputFileName } from "./constants.js";
4
- export { $onEmit, writeCodeModel } from "./emitter.js";
5
- export { createModel } from "./lib/client-model-builder.js";
6
- export { createDiagnostic, getTracer, reportDiagnostic } from "./lib/lib.js";
7
- export { LoggerLevel } from "./lib/logger-level.js";
8
- export { Logger } from "./lib/logger.js";
9
- export { CSharpEmitterOptionsSchema, defaultOptions, resolveOptions, } from "./options.js";
10
- export { setSDKContextOptions } from "./sdk-context-options.js";
11
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../emitter/src/index.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAE/F,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAEL,0BAA0B,EAC1B,cAAc,EACd,cAAc,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1,10 +0,0 @@
1
- import { CSharpEmitterContext } from "../sdk-context.js";
2
- import { CodeModel } from "../type/code-model.js";
3
- /**
4
- * Creates the code model from the SDK context.
5
- * @param sdkContext - The SDK context
6
- * @returns The code model
7
- * @beta
8
- */
9
- export declare function createModel(sdkContext: CSharpEmitterContext): CodeModel;
10
- //# sourceMappingURL=client-model-builder.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client-model-builder.d.ts","sourceRoot":"","sources":["../../../emitter/src/lib/client-model-builder.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAWlD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,UAAU,EAAE,oBAAoB,GAAG,SAAS,CA4KvE"}