@azure-tools/typespec-ts 0.54.2 → 0.55.0-dev.10

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 (345) hide show
  1. package/CHANGELOG.md +0 -9
  2. package/README.md +68 -105
  3. package/dist/src/framework/hooks/binder.d.ts +1 -1
  4. package/dist/src/framework/hooks/binder.d.ts.map +1 -1
  5. package/dist/src/framework/hooks/binder.js +3 -4
  6. package/dist/src/framework/hooks/binder.js.map +1 -1
  7. package/dist/src/framework/hooks/sdk-types.d.ts +2 -3
  8. package/dist/src/framework/hooks/sdk-types.d.ts.map +1 -1
  9. package/dist/src/framework/hooks/sdk-types.js +2 -3
  10. package/dist/src/framework/hooks/sdk-types.js.map +1 -1
  11. package/dist/src/framework/load-static-helpers.d.ts +4 -1
  12. package/dist/src/framework/load-static-helpers.d.ts.map +1 -1
  13. package/dist/src/framework/load-static-helpers.js +26 -34
  14. package/dist/src/framework/load-static-helpers.js.map +1 -1
  15. package/dist/src/framework/sample.js +1 -1
  16. package/dist/src/framework/sample.js.map +1 -1
  17. package/dist/src/index.d.ts.map +1 -1
  18. package/dist/src/index.js +104 -170
  19. package/dist/src/index.js.map +1 -1
  20. package/dist/src/lib.d.ts +2 -18
  21. package/dist/src/lib.d.ts.map +1 -1
  22. package/dist/src/lib.js +30 -124
  23. package/dist/src/lib.js.map +1 -1
  24. package/dist/src/modular/build-classical-client.js +2 -2
  25. package/dist/src/modular/build-classical-client.js.map +1 -1
  26. package/dist/src/modular/build-client-context.d.ts.map +1 -1
  27. package/dist/src/modular/build-client-context.js +6 -15
  28. package/dist/src/modular/build-client-context.js.map +1 -1
  29. package/dist/src/modular/build-project-files.d.ts.map +1 -1
  30. package/dist/src/modular/build-project-files.js +4 -4
  31. package/dist/src/modular/build-project-files.js.map +1 -1
  32. package/dist/src/modular/build-restore-poller.js +2 -2
  33. package/dist/src/modular/build-restore-poller.js.map +1 -1
  34. package/dist/src/modular/build-root-index.d.ts.map +1 -1
  35. package/dist/src/modular/build-root-index.js +9 -13
  36. package/dist/src/modular/build-root-index.js.map +1 -1
  37. package/dist/src/modular/build-subpath-index.d.ts.map +1 -1
  38. package/dist/src/modular/build-subpath-index.js +4 -4
  39. package/dist/src/modular/build-subpath-index.js.map +1 -1
  40. package/dist/src/modular/emit-logger-file.d.ts.map +1 -1
  41. package/dist/src/modular/emit-logger-file.js +0 -3
  42. package/dist/src/modular/emit-logger-file.js.map +1 -1
  43. package/dist/src/modular/emit-models-options.js +2 -2
  44. package/dist/src/modular/emit-models-options.js.map +1 -1
  45. package/dist/src/modular/emit-models.d.ts.map +1 -1
  46. package/dist/src/modular/emit-models.js +7 -22
  47. package/dist/src/modular/emit-models.js.map +1 -1
  48. package/dist/src/modular/emit-samples.d.ts.map +1 -1
  49. package/dist/src/modular/emit-samples.js +10 -28
  50. package/dist/src/modular/emit-samples.js.map +1 -1
  51. package/dist/src/modular/emit-tests.d.ts +2 -1
  52. package/dist/src/modular/emit-tests.d.ts.map +1 -1
  53. package/dist/src/modular/emit-tests.js +21 -11
  54. package/dist/src/modular/emit-tests.js.map +1 -1
  55. package/dist/src/modular/helpers/client-helpers.d.ts.map +1 -1
  56. package/dist/src/modular/helpers/client-helpers.js +6 -16
  57. package/dist/src/modular/helpers/client-helpers.js.map +1 -1
  58. package/dist/src/modular/helpers/example-value-helpers.d.ts +1 -1
  59. package/dist/src/modular/helpers/example-value-helpers.d.ts.map +1 -1
  60. package/dist/src/modular/helpers/example-value-helpers.js +11 -28
  61. package/dist/src/modular/helpers/example-value-helpers.js.map +1 -1
  62. package/dist/src/modular/serialization/serialize-utils.js +2 -2
  63. package/dist/src/modular/serialization/serialize-utils.js.map +1 -1
  64. package/dist/src/rlc-common/helpers/imports-util.d.ts +3 -4
  65. package/dist/src/rlc-common/helpers/imports-util.d.ts.map +1 -1
  66. package/dist/src/rlc-common/helpers/imports-util.js +43 -56
  67. package/dist/src/rlc-common/helpers/imports-util.js.map +1 -1
  68. package/dist/src/rlc-common/helpers/name-constructors.d.ts +0 -9
  69. package/dist/src/rlc-common/helpers/name-constructors.d.ts.map +1 -1
  70. package/dist/src/rlc-common/helpers/name-constructors.js +1 -17
  71. package/dist/src/rlc-common/helpers/name-constructors.js.map +1 -1
  72. package/dist/src/rlc-common/index.d.ts +0 -18
  73. package/dist/src/rlc-common/index.d.ts.map +1 -1
  74. package/dist/src/rlc-common/index.js +0 -18
  75. package/dist/src/rlc-common/index.js.map +1 -1
  76. package/dist/src/rlc-common/interfaces.d.ts +2 -20
  77. package/dist/src/rlc-common/interfaces.d.ts.map +1 -1
  78. package/dist/src/rlc-common/interfaces.js.map +1 -1
  79. package/dist/src/rlc-common/metadata/build-api-extractor-config.d.ts +1 -1
  80. package/dist/src/rlc-common/metadata/build-api-extractor-config.d.ts.map +1 -1
  81. package/dist/src/rlc-common/metadata/build-api-extractor-config.js +5 -42
  82. package/dist/src/rlc-common/metadata/build-api-extractor-config.js.map +1 -1
  83. package/dist/src/rlc-common/metadata/build-es-lint-config.d.ts +2 -2
  84. package/dist/src/rlc-common/metadata/build-es-lint-config.d.ts.map +1 -1
  85. package/dist/src/rlc-common/metadata/build-es-lint-config.js +3 -41
  86. package/dist/src/rlc-common/metadata/build-es-lint-config.js.map +1 -1
  87. package/dist/src/rlc-common/metadata/build-package-file.d.ts.map +1 -1
  88. package/dist/src/rlc-common/metadata/build-package-file.js +25 -73
  89. package/dist/src/rlc-common/metadata/build-package-file.js.map +1 -1
  90. package/dist/src/rlc-common/metadata/build-readme-file.d.ts +2 -2
  91. package/dist/src/rlc-common/metadata/build-readme-file.d.ts.map +1 -1
  92. package/dist/src/rlc-common/metadata/build-readme-file.js +18 -108
  93. package/dist/src/rlc-common/metadata/build-readme-file.js.map +1 -1
  94. package/dist/src/rlc-common/metadata/build-sample-env-file.d.ts.map +1 -1
  95. package/dist/src/rlc-common/metadata/build-sample-env-file.js +1 -2
  96. package/dist/src/rlc-common/metadata/build-sample-env-file.js.map +1 -1
  97. package/dist/src/rlc-common/metadata/build-test-config.d.ts.map +1 -1
  98. package/dist/src/rlc-common/metadata/build-test-config.js +1 -4
  99. package/dist/src/rlc-common/metadata/build-test-config.js.map +1 -1
  100. package/dist/src/rlc-common/metadata/build-ts-config.d.ts +2 -2
  101. package/dist/src/rlc-common/metadata/build-ts-config.d.ts.map +1 -1
  102. package/dist/src/rlc-common/metadata/build-ts-config.js +19 -60
  103. package/dist/src/rlc-common/metadata/build-ts-config.js.map +1 -1
  104. package/dist/src/rlc-common/metadata/build-warp-config.d.ts +1 -1
  105. package/dist/src/rlc-common/metadata/build-warp-config.d.ts.map +1 -1
  106. package/dist/src/rlc-common/metadata/build-warp-config.js +0 -3
  107. package/dist/src/rlc-common/metadata/build-warp-config.js.map +1 -1
  108. package/dist/src/rlc-common/metadata/package-json/azure-package-common.d.ts +1 -38
  109. package/dist/src/rlc-common/metadata/package-json/azure-package-common.d.ts.map +1 -1
  110. package/dist/src/rlc-common/metadata/package-json/azure-package-common.js +1 -108
  111. package/dist/src/rlc-common/metadata/package-json/azure-package-common.js.map +1 -1
  112. package/dist/src/rlc-common/metadata/package-json/build-azure-monorepo-package.d.ts +0 -39
  113. package/dist/src/rlc-common/metadata/package-json/build-azure-monorepo-package.d.ts.map +1 -1
  114. package/dist/src/rlc-common/metadata/package-json/build-azure-monorepo-package.js +4 -20
  115. package/dist/src/rlc-common/metadata/package-json/build-azure-monorepo-package.js.map +1 -1
  116. package/dist/src/rlc-common/metadata/package-json/package-common.d.ts +1 -22
  117. package/dist/src/rlc-common/metadata/package-json/package-common.d.ts.map +1 -1
  118. package/dist/src/rlc-common/metadata/package-json/package-common.js +21 -98
  119. package/dist/src/rlc-common/metadata/package-json/package-common.js.map +1 -1
  120. package/dist/src/rlc-common/static/polling-content.d.ts +1 -1
  121. package/dist/src/rlc-common/static/polling-content.d.ts.map +1 -1
  122. package/dist/src/rlc-common/static/polling-content.js +1 -1
  123. package/dist/src/rlc-common/test/build-recorded-client.d.ts +1 -1
  124. package/dist/src/rlc-common/test/build-recorded-client.d.ts.map +1 -1
  125. package/dist/src/rlc-common/test/build-recorded-client.js +2 -5
  126. package/dist/src/rlc-common/test/build-recorded-client.js.map +1 -1
  127. package/dist/src/rlc-common/test/build-sample-test.d.ts +1 -1
  128. package/dist/src/rlc-common/test/build-sample-test.d.ts.map +1 -1
  129. package/dist/src/rlc-common/test/build-sample-test.js +2 -5
  130. package/dist/src/rlc-common/test/build-sample-test.js.map +1 -1
  131. package/dist/src/rlc-common/test/build-snippets.d.ts +1 -1
  132. package/dist/src/rlc-common/test/build-snippets.d.ts.map +1 -1
  133. package/dist/src/rlc-common/test/build-snippets.js +2 -6
  134. package/dist/src/rlc-common/test/build-snippets.js.map +1 -1
  135. package/dist/src/rlc-common/test/template.d.ts +3 -3
  136. package/dist/src/rlc-common/test/template.d.ts.map +1 -1
  137. package/dist/src/rlc-common/test/template.js +1 -35
  138. package/dist/src/rlc-common/test/template.js.map +1 -1
  139. package/dist/src/transform/transform-helper-function-details.d.ts +2 -2
  140. package/dist/src/transform/transform-helper-function-details.d.ts.map +1 -1
  141. package/dist/src/transform/transform-helper-function-details.js +1 -9
  142. package/dist/src/transform/transform-helper-function-details.js.map +1 -1
  143. package/dist/src/transform/transform-schemas.js +1 -1
  144. package/dist/src/transform/transform-schemas.js.map +1 -1
  145. package/dist/src/transform/transform.d.ts.map +1 -1
  146. package/dist/src/transform/transform.js +9 -16
  147. package/dist/src/transform/transform.js.map +1 -1
  148. package/dist/src/transform/transfrom-rlc-options.d.ts +2 -2
  149. package/dist/src/transform/transfrom-rlc-options.d.ts.map +1 -1
  150. package/dist/src/transform/transfrom-rlc-options.js +29 -94
  151. package/dist/src/transform/transfrom-rlc-options.js.map +1 -1
  152. package/dist/src/utils/client-utils.d.ts +1 -1
  153. package/dist/src/utils/client-utils.d.ts.map +1 -1
  154. package/dist/src/utils/client-utils.js +4 -5
  155. package/dist/src/utils/client-utils.js.map +1 -1
  156. package/dist/src/utils/emit-util.d.ts +0 -1
  157. package/dist/src/utils/emit-util.d.ts.map +1 -1
  158. package/dist/src/utils/emit-util.js +13 -24
  159. package/dist/src/utils/emit-util.js.map +1 -1
  160. package/dist/src/utils/file-system-utils.d.ts +4 -4
  161. package/dist/src/utils/file-system-utils.d.ts.map +1 -1
  162. package/dist/src/utils/file-system-utils.js +14 -16
  163. package/dist/src/utils/file-system-utils.js.map +1 -1
  164. package/dist/src/utils/import-helper.js +3 -3
  165. package/dist/src/utils/import-helper.js.map +1 -1
  166. package/dist/src/utils/model-utils.d.ts +1 -1
  167. package/dist/src/utils/model-utils.d.ts.map +1 -1
  168. package/dist/src/utils/model-utils.js +4 -11
  169. package/dist/src/utils/model-utils.js.map +1 -1
  170. package/dist/src/utils/resolve-project-root.d.ts +6 -4
  171. package/dist/src/utils/resolve-project-root.d.ts.map +1 -1
  172. package/dist/src/utils/resolve-project-root.js +11 -18
  173. package/dist/src/utils/resolve-project-root.js.map +1 -1
  174. package/dist/tsconfig.tsbuildinfo +1 -1
  175. package/package.json +44 -59
  176. package/src/framework/hooks/binder.ts +4 -5
  177. package/src/framework/hooks/sdk-types.ts +2 -3
  178. package/src/framework/load-static-helpers.ts +38 -41
  179. package/src/framework/sample.ts +1 -1
  180. package/src/index.ts +126 -204
  181. package/src/lib.ts +32 -143
  182. package/src/modular/build-classical-client.ts +2 -2
  183. package/src/modular/build-client-context.ts +6 -14
  184. package/src/modular/build-project-files.ts +11 -4
  185. package/src/modular/build-restore-poller.ts +2 -2
  186. package/src/modular/build-root-index.ts +9 -13
  187. package/src/modular/build-subpath-index.ts +4 -4
  188. package/src/modular/emit-logger-file.ts +0 -3
  189. package/src/modular/emit-models-options.ts +2 -2
  190. package/src/modular/emit-models.ts +7 -23
  191. package/src/modular/emit-samples.ts +10 -26
  192. package/src/modular/emit-tests.ts +28 -11
  193. package/src/modular/helpers/client-helpers.ts +7 -17
  194. package/src/modular/helpers/example-value-helpers.ts +11 -26
  195. package/src/modular/serialization/serialize-utils.ts +2 -2
  196. package/src/rlc-common/helpers/imports-util.ts +44 -56
  197. package/src/rlc-common/helpers/name-constructors.ts +1 -23
  198. package/src/rlc-common/index.ts +0 -18
  199. package/src/rlc-common/interfaces.ts +2 -23
  200. package/src/rlc-common/metadata/build-api-extractor-config.ts +5 -47
  201. package/src/rlc-common/metadata/build-es-lint-config.ts +3 -42
  202. package/src/rlc-common/metadata/build-package-file.ts +24 -86
  203. package/src/rlc-common/metadata/build-readme-file.ts +19 -121
  204. package/src/rlc-common/metadata/build-sample-env-file.ts +1 -4
  205. package/src/rlc-common/metadata/build-test-config.ts +1 -6
  206. package/src/rlc-common/metadata/build-ts-config.ts +30 -72
  207. package/src/rlc-common/metadata/build-warp-config.ts +0 -4
  208. package/src/rlc-common/metadata/package-json/azure-package-common.ts +2 -134
  209. package/src/rlc-common/metadata/package-json/build-azure-monorepo-package.ts +4 -24
  210. package/src/rlc-common/metadata/package-json/package-common.ts +22 -120
  211. package/src/rlc-common/static/polling-content.ts +1 -1
  212. package/src/rlc-common/test/build-recorded-client.ts +2 -5
  213. package/src/rlc-common/test/build-sample-test.ts +2 -5
  214. package/src/rlc-common/test/build-snippets.ts +2 -6
  215. package/src/rlc-common/test/template.ts +1 -35
  216. package/src/transform/transform-helper-function-details.ts +1 -10
  217. package/src/transform/transform-schemas.ts +1 -1
  218. package/src/transform/transform.ts +8 -19
  219. package/src/transform/transfrom-rlc-options.ts +29 -127
  220. package/src/utils/client-utils.ts +4 -5
  221. package/src/utils/emit-util.ts +14 -39
  222. package/src/utils/file-system-utils.ts +14 -15
  223. package/src/utils/import-helper.ts +3 -3
  224. package/src/utils/model-utils.ts +4 -17
  225. package/src/utils/resolve-project-root.ts +11 -24
  226. package/dist/src/rlc-common/build-client-definitions.d.ts +0 -6
  227. package/dist/src/rlc-common/build-client-definitions.d.ts.map +0 -1
  228. package/dist/src/rlc-common/build-client-definitions.js +0 -157
  229. package/dist/src/rlc-common/build-client-definitions.js.map +0 -1
  230. package/dist/src/rlc-common/build-client.d.ts +0 -9
  231. package/dist/src/rlc-common/build-client.d.ts.map +0 -1
  232. package/dist/src/rlc-common/build-client.js +0 -391
  233. package/dist/src/rlc-common/build-client.js.map +0 -1
  234. package/dist/src/rlc-common/build-index-file.d.ts +0 -6
  235. package/dist/src/rlc-common/build-index-file.d.ts.map +0 -1
  236. package/dist/src/rlc-common/build-index-file.js +0 -241
  237. package/dist/src/rlc-common/build-index-file.js.map +0 -1
  238. package/dist/src/rlc-common/build-is-unexpected-helper.d.ts +0 -6
  239. package/dist/src/rlc-common/build-is-unexpected-helper.d.ts.map +0 -1
  240. package/dist/src/rlc-common/build-is-unexpected-helper.js +0 -223
  241. package/dist/src/rlc-common/build-is-unexpected-helper.js.map +0 -1
  242. package/dist/src/rlc-common/build-logger.d.ts +0 -6
  243. package/dist/src/rlc-common/build-logger.d.ts.map +0 -1
  244. package/dist/src/rlc-common/build-logger.js +0 -31
  245. package/dist/src/rlc-common/build-logger.js.map +0 -1
  246. package/dist/src/rlc-common/build-method-shortcuts.d.ts +0 -5
  247. package/dist/src/rlc-common/build-method-shortcuts.d.ts.map +0 -1
  248. package/dist/src/rlc-common/build-method-shortcuts.js +0 -54
  249. package/dist/src/rlc-common/build-method-shortcuts.js.map +0 -1
  250. package/dist/src/rlc-common/build-object-types.d.ts +0 -29
  251. package/dist/src/rlc-common/build-object-types.d.ts.map +0 -1
  252. package/dist/src/rlc-common/build-object-types.js +0 -412
  253. package/dist/src/rlc-common/build-object-types.js.map +0 -1
  254. package/dist/src/rlc-common/build-paginate-helper.d.ts +0 -6
  255. package/dist/src/rlc-common/build-paginate-helper.d.ts.map +0 -1
  256. package/dist/src/rlc-common/build-paginate-helper.js +0 -27
  257. package/dist/src/rlc-common/build-paginate-helper.js.map +0 -1
  258. package/dist/src/rlc-common/build-parameter-types.d.ts +0 -14
  259. package/dist/src/rlc-common/build-parameter-types.d.ts.map +0 -1
  260. package/dist/src/rlc-common/build-parameter-types.js +0 -391
  261. package/dist/src/rlc-common/build-parameter-types.js.map +0 -1
  262. package/dist/src/rlc-common/build-polling-helper.d.ts +0 -6
  263. package/dist/src/rlc-common/build-polling-helper.d.ts.map +0 -1
  264. package/dist/src/rlc-common/build-polling-helper.js +0 -61
  265. package/dist/src/rlc-common/build-polling-helper.js.map +0 -1
  266. package/dist/src/rlc-common/build-response-types.d.ts +0 -6
  267. package/dist/src/rlc-common/build-response-types.d.ts.map +0 -1
  268. package/dist/src/rlc-common/build-response-types.js +0 -143
  269. package/dist/src/rlc-common/build-response-types.js.map +0 -1
  270. package/dist/src/rlc-common/build-samples.d.ts +0 -3
  271. package/dist/src/rlc-common/build-samples.d.ts.map +0 -1
  272. package/dist/src/rlc-common/build-samples.js +0 -30
  273. package/dist/src/rlc-common/build-samples.js.map +0 -1
  274. package/dist/src/rlc-common/build-schema-type.d.ts +0 -20
  275. package/dist/src/rlc-common/build-schema-type.d.ts.map +0 -1
  276. package/dist/src/rlc-common/build-schema-type.js +0 -71
  277. package/dist/src/rlc-common/build-schema-type.js.map +0 -1
  278. package/dist/src/rlc-common/build-serialize-helper.d.ts +0 -6
  279. package/dist/src/rlc-common/build-serialize-helper.d.ts.map +0 -1
  280. package/dist/src/rlc-common/build-serialize-helper.js +0 -36
  281. package/dist/src/rlc-common/build-serialize-helper.js.map +0 -1
  282. package/dist/src/rlc-common/build-top-level-index-file.d.ts +0 -6
  283. package/dist/src/rlc-common/build-top-level-index-file.d.ts.map +0 -1
  284. package/dist/src/rlc-common/build-top-level-index-file.js +0 -48
  285. package/dist/src/rlc-common/build-top-level-index-file.js.map +0 -1
  286. package/dist/src/rlc-common/helpers/package-util.d.ts +0 -7
  287. package/dist/src/rlc-common/helpers/package-util.d.ts.map +0 -1
  288. package/dist/src/rlc-common/helpers/package-util.js +0 -10
  289. package/dist/src/rlc-common/helpers/package-util.js.map +0 -1
  290. package/dist/src/rlc-common/helpers/path-utils.d.ts +0 -2
  291. package/dist/src/rlc-common/helpers/path-utils.d.ts.map +0 -1
  292. package/dist/src/rlc-common/helpers/path-utils.js +0 -10
  293. package/dist/src/rlc-common/helpers/path-utils.js.map +0 -1
  294. package/dist/src/rlc-common/helpers/shortcut-methods.d.ts +0 -4
  295. package/dist/src/rlc-common/helpers/shortcut-methods.d.ts.map +0 -1
  296. package/dist/src/rlc-common/helpers/shortcut-methods.js +0 -49
  297. package/dist/src/rlc-common/helpers/shortcut-methods.js.map +0 -1
  298. package/dist/src/rlc-common/helpers/value-generation-util.d.ts +0 -12
  299. package/dist/src/rlc-common/helpers/value-generation-util.d.ts.map +0 -1
  300. package/dist/src/rlc-common/helpers/value-generation-util.js +0 -161
  301. package/dist/src/rlc-common/helpers/value-generation-util.js.map +0 -1
  302. package/dist/src/rlc-common/metadata/build-rollup-config.d.ts +0 -6
  303. package/dist/src/rlc-common/metadata/build-rollup-config.d.ts.map +0 -1
  304. package/dist/src/rlc-common/metadata/build-rollup-config.js +0 -140
  305. package/dist/src/rlc-common/metadata/build-rollup-config.js.map +0 -1
  306. package/dist/src/rlc-common/metadata/package-json/build-azure-standalone-package.d.ts +0 -8
  307. package/dist/src/rlc-common/metadata/package-json/build-azure-standalone-package.d.ts.map +0 -1
  308. package/dist/src/rlc-common/metadata/package-json/build-azure-standalone-package.js +0 -101
  309. package/dist/src/rlc-common/metadata/package-json/build-azure-standalone-package.js.map +0 -1
  310. package/dist/src/rlc-common/metadata/package-json/build-flavorless-package.d.ts +0 -57
  311. package/dist/src/rlc-common/metadata/package-json/build-flavorless-package.d.ts.map +0 -1
  312. package/dist/src/rlc-common/metadata/package-json/build-flavorless-package.js +0 -53
  313. package/dist/src/rlc-common/metadata/package-json/build-flavorless-package.js.map +0 -1
  314. package/dist/src/rlc-common/transform-sample-groups.d.ts +0 -9
  315. package/dist/src/rlc-common/transform-sample-groups.d.ts.map +0 -1
  316. package/dist/src/rlc-common/transform-sample-groups.js +0 -313
  317. package/dist/src/rlc-common/transform-sample-groups.js.map +0 -1
  318. package/dist/src/utils/dirname.d.ts +0 -9
  319. package/dist/src/utils/dirname.d.ts.map +0 -1
  320. package/dist/src/utils/dirname.js +0 -12
  321. package/dist/src/utils/dirname.js.map +0 -1
  322. package/src/rlc-common/build-client-definitions.ts +0 -235
  323. package/src/rlc-common/build-client.ts +0 -490
  324. package/src/rlc-common/build-index-file.ts +0 -344
  325. package/src/rlc-common/build-is-unexpected-helper.ts +0 -248
  326. package/src/rlc-common/build-logger.ts +0 -43
  327. package/src/rlc-common/build-method-shortcuts.ts +0 -71
  328. package/src/rlc-common/build-object-types.ts +0 -603
  329. package/src/rlc-common/build-paginate-helper.ts +0 -31
  330. package/src/rlc-common/build-parameter-types.ts +0 -554
  331. package/src/rlc-common/build-polling-helper.ts +0 -83
  332. package/src/rlc-common/build-response-types.ts +0 -180
  333. package/src/rlc-common/build-samples.ts +0 -32
  334. package/src/rlc-common/build-schema-type.ts +0 -89
  335. package/src/rlc-common/build-serialize-helper.ts +0 -49
  336. package/src/rlc-common/build-top-level-index-file.ts +0 -58
  337. package/src/rlc-common/helpers/package-util.ts +0 -13
  338. package/src/rlc-common/helpers/path-utils.ts +0 -10
  339. package/src/rlc-common/helpers/shortcut-methods.ts +0 -58
  340. package/src/rlc-common/helpers/value-generation-util.ts +0 -234
  341. package/src/rlc-common/metadata/build-rollup-config.ts +0 -147
  342. package/src/rlc-common/metadata/package-json/build-azure-standalone-package.ts +0 -123
  343. package/src/rlc-common/metadata/package-json/build-flavorless-package.ts +0 -68
  344. package/src/rlc-common/transform-sample-groups.ts +0 -407
  345. package/src/utils/dirname.ts +0 -12
@@ -8,14 +8,13 @@ import {
8
8
  SdkModelPropertyType,
9
9
  SdkServiceOperation,
10
10
  } from "@azure-tools/typespec-client-generator-core";
11
- import { NoTarget } from "@typespec/compiler";
12
- import { join } from "path";
11
+ import { joinPaths, NoTarget } from "@typespec/compiler";
13
12
  import { FunctionDeclarationStructure, SourceFile, StructureKind } from "ts-morph";
14
13
  import { useContext } from "../context-manager.js";
15
14
  import { resolveReference } from "../framework/reference.js";
16
15
  import { reportDiagnostic } from "../index.js";
17
16
  import { AzureIdentityDependencies } from "../modular/external-dependencies.js";
18
- import { isAzurePackage, NameType, normalizeName } from "../rlc-common/index.js";
17
+ import { NameType, normalizeName } from "../rlc-common/index.js";
19
18
  import { getSubscriptionId } from "../transform/transfrom-rlc-options.js";
20
19
  import { hasKeyCredential, hasTokenCredential } from "../utils/credential-utils.js";
21
20
  import { SdkContext } from "../utils/interfaces.js";
@@ -105,13 +104,13 @@ function emitMethodSamples(
105
104
  }
106
105
  const project = useContext("outputProject");
107
106
  const operationPrefix = `${options.classicalMethodPrefix ?? ""} ${method.oriName ?? method.name}`;
108
- const sampleFolder = join(
107
+ const sampleFolder = joinPaths(
109
108
  dpgContext.generationPathDetail?.rootDir ?? "",
110
109
  "samples-dev",
111
110
  options.subFolder ?? "",
112
111
  );
113
112
  const fileName = normalizeName(`${operationPrefix} Sample`, NameType.File);
114
- const sourceFile = project.createSourceFile(join(sampleFolder, `${fileName}.ts`), "", {
113
+ const sourceFile = project.createSourceFile(joinPaths(sampleFolder, `${fileName}.ts`), "", {
115
114
  overwrite: true,
116
115
  });
117
116
  const exampleFunctions = [];
@@ -465,7 +464,7 @@ function prepareExampleParameters(
465
464
  }
466
465
 
467
466
  function getCredentialExampleValue(
468
- dpgContext: SdkContext,
467
+ _dpgContext: SdkContext,
469
468
  initialization: SdkClientInitializationType,
470
469
  ): ExampleValue | undefined {
471
470
  const keyCredential = hasKeyCredential(initialization),
@@ -476,26 +475,11 @@ function getCredentialExampleValue(
476
475
  name: "credential",
477
476
  };
478
477
  if (keyCredential || tokenCredential) {
479
- if (isAzurePackage({ options: dpgContext.rlcOptions })) {
480
- // Support DefaultAzureCredential for Azure packages
481
- return {
482
- ...defaultSetting,
483
- value: `new ${resolveReference(AzureIdentityDependencies.DefaultAzureCredential)}()`,
484
- };
485
- } else if (keyCredential) {
486
- // Support ApiKeyCredential for non-Azure packages
487
- return {
488
- ...defaultSetting,
489
- value: `{ key: "INPUT_YOUR_KEY_HERE" }`,
490
- };
491
- } else if (tokenCredential) {
492
- // Support TokenCredential for non-Azure packages
493
- return {
494
- ...defaultSetting,
495
- value: `{ getToken: async () => {
496
- return { token: "INPUT_YOUR_TOKEN_HERE", expiresOnTimestamp: now() }; } }`,
497
- };
498
- }
478
+ // Support DefaultAzureCredential for Azure packages
479
+ return {
480
+ ...defaultSetting,
481
+ value: `new ${resolveReference(AzureIdentityDependencies.DefaultAzureCredential)}()`,
482
+ };
499
483
  }
500
484
  return undefined;
501
485
  }
@@ -1,5 +1,4 @@
1
- import { existsSync, rmSync } from "fs";
2
- import { join } from "path";
1
+ import { type CompilerHost, joinPaths } from "@typespec/compiler";
3
2
  import { SourceFile } from "ts-morph";
4
3
  import { resolveReference } from "../framework/reference.js";
5
4
  import { NameType, normalizeName } from "../rlc-common/index.js";
@@ -22,23 +21,36 @@ import { CreateRecorderHelpers } from "./static-helpers-metadata.js";
22
21
  /**
23
22
  * Clean up the test/generated folder before generating new tests
24
23
  */
25
- async function cleanupTestFolder(dpgContext: SdkContext) {
24
+ async function cleanupTestFolder(dpgContext: SdkContext, host: CompilerHost) {
26
25
  const clients = dpgContext.sdkPackage.clients;
27
- const baseTestFolder = join(dpgContext.generationPathDetail?.rootDir ?? "", "test", "generated");
26
+ const baseTestFolder = joinPaths(
27
+ dpgContext.generationPathDetail?.rootDir ?? "",
28
+ "test",
29
+ "generated",
30
+ );
31
+
32
+ async function dirExists(path: string): Promise<boolean> {
33
+ try {
34
+ const s = await host.stat(path);
35
+ return s.isDirectory();
36
+ } catch {
37
+ return false;
38
+ }
39
+ }
28
40
 
29
41
  // If there are multiple clients, clean up subfolders
30
42
  if (clients.length > 1) {
31
43
  for (const client of clients) {
32
44
  const subFolder = normalizeName(getClassicalClientName(client), NameType.File);
33
- const clientTestFolder = join(baseTestFolder, subFolder);
34
- if (existsSync(clientTestFolder)) {
35
- rmSync(clientTestFolder, { recursive: true, force: true });
45
+ const clientTestFolder = joinPaths(baseTestFolder, subFolder);
46
+ if (await dirExists(clientTestFolder)) {
47
+ await host.rm(clientTestFolder, { recursive: true });
36
48
  }
37
49
  }
38
50
  } else {
39
51
  // Single client, clean up the entire test/generated folder
40
- if (existsSync(baseTestFolder)) {
41
- rmSync(baseTestFolder, { recursive: true, force: true });
52
+ if (await dirExists(baseTestFolder)) {
53
+ await host.rm(baseTestFolder, { recursive: true });
42
54
  }
43
55
  }
44
56
  }
@@ -46,9 +58,14 @@ async function cleanupTestFolder(dpgContext: SdkContext) {
46
58
  /**
47
59
  * Helpers to emit tests similar to samples
48
60
  */
49
- export async function emitTests(dpgContext: SdkContext): Promise<SourceFile[]> {
61
+ export async function emitTests(
62
+ dpgContext: SdkContext,
63
+ host?: CompilerHost,
64
+ ): Promise<SourceFile[]> {
50
65
  // Clean up the test/generated folder before generating new tests
51
- await cleanupTestFolder(dpgContext);
66
+ if (host) {
67
+ await cleanupTestFolder(dpgContext, host);
68
+ }
52
69
 
53
70
  return iterateClientsAndMethods(dpgContext, emitMethodTests);
54
71
  }
@@ -10,7 +10,7 @@ import { OptionalKind, ParameterDeclarationStructure, StatementedNode } from "ts
10
10
  import { ModularEmitterOptions } from "../interfaces.js";
11
11
 
12
12
  import { resolveReference } from "../../framework/reference.js";
13
- import { NameType, normalizeName, PackageFlavor } from "../../rlc-common/index.js";
13
+ import { NameType, normalizeName } from "../../rlc-common/index.js";
14
14
  import { SdkContext } from "../../utils/interfaces.js";
15
15
  import { CloudSettingHelpers } from "../static-helpers-metadata.js";
16
16
  import { getTypeExpression } from "../type-expressions/get-type-expression.js";
@@ -169,16 +169,10 @@ export function buildGetClientEndpointParam(
169
169
  client: SdkClientType<SdkServiceOperation>,
170
170
  ): { endpointParamName: string; assignedOptionalParams?: Set<string> } {
171
171
  const assignedOptionalParams = new Set<string>();
172
- let coreEndpointParam: string;
173
- if (dpgContext.rlcOptions?.flavor === "azure") {
174
- const cloudSettingSuffix = dpgContext.arm
175
- ? ` ?? ${resolveReference(CloudSettingHelpers.getArmEndpoint)}(options.cloudSetting)`
176
- : "";
177
- coreEndpointParam = `options.endpoint${cloudSettingSuffix}`;
178
- } else {
179
- // unbranded does not have the deprecated baseUrl parameter
180
- coreEndpointParam = `options.endpoint`;
181
- }
172
+ const cloudSettingSuffix = dpgContext.arm
173
+ ? ` ?? ${resolveReference(CloudSettingHelpers.getArmEndpoint)}(options.cloudSetting)`
174
+ : "";
175
+ const coreEndpointParam = `options.endpoint${cloudSettingSuffix}`;
182
176
  // Special case: endpoint URL not defined
183
177
  const endpointParam = getClientParameters(client, dpgContext, {
184
178
  onClientOnly: true,
@@ -248,7 +242,7 @@ export function buildGetClientOptionsParam(
248
242
  apiVersionParamName?: string,
249
243
  ): string {
250
244
  const userAgentOptions = buildUserAgentOptions(context, emitterOptions, "azsdk-js-api");
251
- const loggingOptions = buildLoggingOptions(emitterOptions.options.flavor);
245
+ const loggingOptions = buildLoggingOptions();
252
246
  const credentials = buildCredentials(emitterOptions, endpointParam);
253
247
 
254
248
  // Use the actual api version parameter name for destructuring, defaulting to "apiVersion"
@@ -315,11 +309,7 @@ function buildCredentials(
315
309
  return `{ ${scopes}${apiKeyHeaderName} }`;
316
310
  }
317
311
 
318
- function buildLoggingOptions(flavor?: PackageFlavor): string | undefined {
319
- if (flavor !== "azure") {
320
- return undefined;
321
- }
322
-
312
+ function buildLoggingOptions(): string | undefined {
323
313
  return `{ logger: options.loggingOptions?.logger ?? logger.info }`;
324
314
  }
325
315
 
@@ -8,11 +8,11 @@ import {
8
8
  SdkModelPropertyType,
9
9
  SdkServiceOperation,
10
10
  } from "@azure-tools/typespec-client-generator-core";
11
- import { join } from "path";
11
+ import { joinPaths } from "@typespec/compiler";
12
12
  import { SourceFile } from "ts-morph";
13
13
  import { useContext } from "../../context-manager.js";
14
14
  import { resolveReference } from "../../framework/reference.js";
15
- import { isAzurePackage, NameType, normalizeName } from "../../rlc-common/index.js";
15
+ import { NameType, normalizeName } from "../../rlc-common/index.js";
16
16
  import { getSubscriptionId } from "../../transform/transfrom-rlc-options.js";
17
17
  import { hasKeyCredential, hasTokenCredential } from "../../utils/credential-utils.js";
18
18
  import { SdkContext } from "../../utils/interfaces.js";
@@ -73,7 +73,7 @@ export function prepareCommonValue(
73
73
  * Get credential value for samples
74
74
  */
75
75
  export function getCredentialSampleValue(
76
- dpgContext: SdkContext,
76
+ _dpgContext: SdkContext,
77
77
  initialization: SdkClientInitializationType,
78
78
  ): CommonValue | undefined {
79
79
  const keyCredential = hasKeyCredential(initialization),
@@ -84,26 +84,11 @@ export function getCredentialSampleValue(
84
84
  name: "credential",
85
85
  };
86
86
  if (keyCredential || tokenCredential) {
87
- if (isAzurePackage({ options: dpgContext.rlcOptions })) {
88
- // Support DefaultAzureCredential for Azure packages
89
- return {
90
- ...defaultSetting,
91
- value: `new ${resolveReference(AzureIdentityDependencies.DefaultAzureCredential)}()`,
92
- };
93
- } else if (keyCredential) {
94
- // Support ApiKeyCredential for non-Azure packages
95
- return {
96
- ...defaultSetting,
97
- value: `{ key: "INPUT_YOUR_KEY_HERE" }`,
98
- };
99
- } else if (tokenCredential) {
100
- // Support TokenCredential for non-Azure packages
101
- return {
102
- ...defaultSetting,
103
- value: `{ getToken: async () => {
104
- return { token: "INPUT_YOUR_TOKEN_HERE", expiresOnTimestamp: Date.now() }; } }`,
105
- };
106
- }
87
+ // Support DefaultAzureCredential for Azure packages
88
+ return {
89
+ ...defaultSetting,
90
+ value: `new ${resolveReference(AzureIdentityDependencies.DefaultAzureCredential)}()`,
91
+ };
107
92
  }
108
93
  return undefined;
109
94
  }
@@ -596,8 +581,8 @@ export function createSourceFile(
596
581
  ): SourceFile {
597
582
  const project = useContext("outputProject");
598
583
  const operationPrefix = `${options.classicalMethodPrefix ?? ""} ${method.oriName ?? method.name}`;
599
- const baseFolder = type === "sample" ? "samples-dev" : join("test", "generated");
600
- const folder = join(
584
+ const baseFolder = type === "sample" ? "samples-dev" : joinPaths("test", "generated");
585
+ const folder = joinPaths(
601
586
  dpgContext.generationPathDetail?.rootDir ?? "",
602
587
  baseFolder,
603
588
  options.subFolder ?? "",
@@ -605,7 +590,7 @@ export function createSourceFile(
605
590
  const fileExtension = type === "sample" ? ".ts" : ".spec.ts";
606
591
  const normalizedFileName = normalizeName(fileName || `${operationPrefix} ${type}`, NameType.File);
607
592
 
608
- return project.createSourceFile(join(folder, `${normalizedFileName}${fileExtension}`), "", {
593
+ return project.createSourceFile(joinPaths(folder, `${normalizedFileName}${fileExtension}`), "", {
609
594
  overwrite: true,
610
595
  });
611
596
  }
@@ -61,7 +61,7 @@ export function isSupportedSerializeType(type: SdkType): boolean {
61
61
  * 6. nested model i.e. model with property that is a model with one of the above three conditions.
62
62
  * If we consider array type, with all the above 6 types as the element types.
63
63
  */
64
- const specialVariantMap = new Map<SdkType, boolean>();
64
+ const specialVariantMap = new WeakMap<SdkType, boolean>();
65
65
  export function isSpecialUnionVariant(
66
66
  t: SdkType & { isNonExhaustive?: boolean },
67
67
  variantStack: SdkType[] = [],
@@ -146,7 +146,7 @@ export function isSpecialHandledUnion(t: SdkType & { isNonExhaustive?: boolean }
146
146
  return isDiscriminatedUnion(t!) || isPolymorphicUnion(t);
147
147
  }
148
148
 
149
- const polymorphicUnionMap = new Map<SdkType, boolean>();
149
+ const polymorphicUnionMap = new WeakMap<SdkType, boolean>();
150
150
  export function isPolymorphicUnion(t: SdkType): boolean {
151
151
  if (polymorphicUnionMap.has(t)) {
152
152
  return polymorphicUnionMap.get(t) ?? false;
@@ -1,64 +1,52 @@
1
1
  import { SourceFile } from "ts-morph";
2
- import { ImportType, Imports, PackageFlavor } from "../interfaces.js";
2
+ import { ImportType, Imports } from "../interfaces.js";
3
3
 
4
4
  /**
5
- * Build the common imports for generated SDK
6
- * @param flavor flavor of SDK to generate, if any. When set to "azure", Azure Core packages will be used. When unset, the generic `ts-http-runtime` package will be used.
5
+ * Build the common imports for generated SDK. Azure Core packages are always used.
7
6
  * @returns
8
7
  */
9
- export function buildRuntimeImports(flavor?: PackageFlavor): Imports {
10
- if (flavor === "azure") {
11
- return {
12
- restClient: {
13
- type: "restClient",
14
- specifier: "@azure-rest/core-client",
15
- version: "^2.0.0",
16
- },
17
- coreAuth: {
18
- type: "coreAuth",
19
- specifier: "@azure/core-auth",
20
- version: "^1.6.0",
21
- },
22
- restPipeline: {
23
- type: "restPipeline",
24
- specifier: "@azure/core-rest-pipeline",
25
- version: "^1.14.0",
26
- },
27
- coreUtil: {
28
- type: "coreUtil",
29
- specifier: "@azure/core-util",
30
- version: "^1.4.0",
31
- },
32
- coreLogger: {
33
- type: "coreLogger",
34
- specifier: "@azure/logger",
35
- version: "^1.0.4",
36
- },
37
- azureEslintPlugin: {
38
- type: "azureEslintPlugin",
39
- specifier: "@azure/eslint-plugin-azure-sdk",
40
- version: "^3.0.0",
41
- },
42
- azureTestRecorder: {
43
- type: "azureTestRecorder",
44
- specifier: "@azure-tools/test-recorder",
45
- version: "^3.0.0",
46
- },
47
- azureCoreLro: {
48
- type: "azureCoreLro",
49
- specifier: "@azure/core-lro",
50
- },
51
- } as Imports;
52
- } else {
53
- // In non-azure branded scope we only have one dependency that is ts-http-runtime
54
- return {
55
- commonFallback: {
56
- type: "commonFallback",
57
- specifier: "@typespec/ts-http-runtime",
58
- version: "0.1.0",
59
- },
60
- } as Imports;
61
- }
8
+ export function buildRuntimeImports(): Imports {
9
+ return {
10
+ restClient: {
11
+ type: "restClient",
12
+ specifier: "@azure-rest/core-client",
13
+ version: "^2.0.0",
14
+ },
15
+ coreAuth: {
16
+ type: "coreAuth",
17
+ specifier: "@azure/core-auth",
18
+ version: "^1.6.0",
19
+ },
20
+ restPipeline: {
21
+ type: "restPipeline",
22
+ specifier: "@azure/core-rest-pipeline",
23
+ version: "^1.14.0",
24
+ },
25
+ coreUtil: {
26
+ type: "coreUtil",
27
+ specifier: "@azure/core-util",
28
+ version: "^1.4.0",
29
+ },
30
+ coreLogger: {
31
+ type: "coreLogger",
32
+ specifier: "@azure/logger",
33
+ version: "^1.0.4",
34
+ },
35
+ azureEslintPlugin: {
36
+ type: "azureEslintPlugin",
37
+ specifier: "@azure/eslint-plugin-azure-sdk",
38
+ version: "^3.0.0",
39
+ },
40
+ azureTestRecorder: {
41
+ type: "azureTestRecorder",
42
+ specifier: "@azure-tools/test-recorder",
43
+ version: "^3.0.0",
44
+ },
45
+ azureCoreLro: {
46
+ type: "azureCoreLro",
47
+ specifier: "@azure/core-lro",
48
+ },
49
+ } as Imports;
62
50
  }
63
51
 
64
52
  /**
@@ -76,30 +76,8 @@ export function getParameterTypeName(baseNameOrOperationGroup: string, operation
76
76
  return normalizeName(`${baseNameOrOperationGroup}_Parameters`, NameType.Interface);
77
77
  }
78
78
 
79
- export interface ModuleName {
80
- esModulesName: string;
81
- cjsName: string;
82
- }
83
- /**
84
- * This is a helper function that gets the right import module depending on the type of
85
- * library being generated
86
- */
87
- export function getImportModuleName(name: ModuleName, codeModel: RLCModel) {
88
- if (codeModel.options?.moduleKind === "cjs") {
89
- return name.cjsName;
90
- }
91
- return name.esModulesName;
92
- }
93
-
94
79
  export function getClientName(model: RLCModel) {
95
- const clientName = model.libraryName;
96
- const clientInterfaceName = model.options?.isModularLibrary
97
- ? model.libraryName
98
- : clientName.endsWith("Client")
99
- ? `${clientName}`
100
- : `${clientName}Client`;
101
-
102
- return clientInterfaceName;
80
+ return model.libraryName;
103
81
  }
104
82
 
105
83
  export function getMultipartPartTypeName(schemaName: string, partName: string) {
@@ -1,28 +1,12 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
3
 
4
- export * from "./build-client-definitions.js";
5
- export * from "./build-client.js";
6
- export * from "./build-index-file.js";
7
- export * from "./build-is-unexpected-helper.js";
8
- export * from "./build-logger.js";
9
- export * from "./build-paginate-helper.js";
10
- export * from "./build-parameter-types.js";
11
- export * from "./build-polling-helper.js";
12
- export * from "./build-response-types.js";
13
- export * from "./build-samples.js";
14
- export * from "./build-schema-type.js";
15
- export * from "./build-serialize-helper.js";
16
- export * from "./build-top-level-index-file.js";
17
4
  export * from "./helpers/api-version-util.js";
18
5
  export * from "./helpers/imports-util.js";
19
6
  export * from "./helpers/name-constructors.js";
20
7
  export * from "./helpers/name-utils.js";
21
8
  export * from "./helpers/operation-helpers.js";
22
- export * from "./helpers/package-util.js";
23
9
  export * from "./helpers/schema-helpers.js";
24
- export * from "./helpers/shortcut-methods.js";
25
- export * from "./helpers/value-generation-util.js";
26
10
  export * from "./interfaces.js";
27
11
  export * from "./metadata/build-api-extractor-config.js";
28
12
  export * from "./metadata/build-changelog-file.js";
@@ -30,7 +14,6 @@ export * from "./metadata/build-es-lint-config.js";
30
14
  export * from "./metadata/build-license-file.js";
31
15
  export * from "./metadata/build-package-file.js";
32
16
  export * from "./metadata/build-readme-file.js";
33
- export * from "./metadata/build-rollup-config.js";
34
17
  export * from "./metadata/build-sample-env-file.js";
35
18
  export * from "./metadata/build-test-config.js";
36
19
  export * from "./metadata/build-ts-config.js";
@@ -40,4 +23,3 @@ export * from "./test/build-karma-config.js";
40
23
  export * from "./test/build-recorded-client.js";
41
24
  export * from "./test/build-sample-test.js";
42
25
  export * from "./test/build-snippets.js";
43
- export * from "./transform-sample-groups.js";
@@ -39,7 +39,6 @@ export type ImportType =
39
39
  | "coreUtil"
40
40
  | "coreLogger"
41
41
  // this is a fallback import if above imports are not available
42
- // mainly used in non-branded scope
43
42
  | "commonFallback"
44
43
  /**azure specific imports */
45
44
  | "azureEslintPlugin"
@@ -191,18 +190,11 @@ export interface OperationLroDetail {
191
190
  precedence?: number;
192
191
  }
193
192
 
194
- /**
195
- * Flavor of the package to generate. If "azure", an Azure-branded package should be generated. If left undefined, a package without Azure branding will be generated.
196
- */
197
- export type PackageFlavor = "azure" | undefined;
198
-
199
193
  export interface RLCOptions {
200
194
  /**
201
195
  * Whether to include response headers in the generated response types. If true, the generated response types will include headers as properties.
202
196
  */
203
197
  includeHeadersInResponse?: boolean;
204
- includeShortcuts?: boolean;
205
- multiClient?: boolean;
206
198
  batch?: any[];
207
199
  packageDetails?: PackageDetails;
208
200
  addCredentials?: boolean;
@@ -230,19 +222,11 @@ export interface RLCOptions {
230
222
  */
231
223
  generateTest?: boolean;
232
224
  generateSample?: boolean;
233
- azureSdkForJs?: boolean;
234
225
  azureOutputDirectory?: string;
235
226
  isTypeSpecTest?: boolean;
236
- title?: string;
237
- dependencyInfo?: DependencyInfo;
238
- productDocLink?: string;
239
227
  serviceInfo?: ServiceInfo;
240
228
  azureArm?: boolean;
241
- sourceFrom?: "TypeSpec" | "Swagger";
242
- isModularLibrary?: boolean;
243
- moduleKind?: "esm" | "cjs";
244
229
  enableOperationGroup?: boolean;
245
- flavor?: PackageFlavor;
246
230
  enableModelNamespace?: boolean;
247
231
  hierarchyClient?: boolean;
248
232
  compatibilityMode?: boolean;
@@ -259,7 +243,7 @@ export interface RLCOptions {
259
243
  /**
260
244
  * When set to true, non-model return types (arrays, scalars, enums, bytes with binary content type)
261
245
  * will be wrapped in an XxxResponse type to maintain backward compatibility with HLC.
262
- * This option defaults to true for Azure flavor and to false otherwise, unless explicitly set.
246
+ * This option defaults to true unless explicitly set.
263
247
  */
264
248
  wrapNonModelReturn?: boolean;
265
249
  /**
@@ -275,7 +259,7 @@ export interface RLCOptions {
275
259
  treatUnknownAsRecord?: boolean;
276
260
  /**
277
261
  * When set to true, generates React Native build targets (tsconfig, warp target, package.json exports).
278
- * Defaults to false. Only applicable when azureSdkForJs is true.
262
+ * Defaults to false.
279
263
  */
280
264
  generateReactNativeTarget?: boolean;
281
265
  }
@@ -285,11 +269,6 @@ export interface ServiceInfo {
285
269
  description?: string;
286
270
  }
287
271
 
288
- export interface DependencyInfo {
289
- link: string;
290
- description: string;
291
- }
292
-
293
272
  export interface File {
294
273
  path: string;
295
274
  content: string;
@@ -4,54 +4,12 @@
4
4
  import { Project } from "ts-morph";
5
5
  import { RLCModel } from "../interfaces.js";
6
6
 
7
- export function buildApiExtractorConfig(model: RLCModel) {
8
- const { packageDetails, isModularLibrary, generateTest, azureSdkForJs } = model.options || {};
9
- const project = new Project();
7
+ export function buildApiExtractorConfig(_model: RLCModel) {
8
+ const project = new Project({ useInMemoryFileSystem: true });
10
9
 
11
- let mainEntryPointFilePath = "dist/esm/index.d.ts";
12
-
13
- if (model.options?.moduleKind === "cjs") {
14
- mainEntryPointFilePath = `./types${generateTest || isModularLibrary ? "/src" : ""}/index.d.ts`;
15
- }
16
-
17
- const config = azureSdkForJs
18
- ? {
19
- extends: "../../../api-extractor-base.json",
20
- }
21
- : {
22
- $schema:
23
- "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
24
- mainEntryPointFilePath,
25
- docModel: {
26
- enabled: true,
27
- },
28
- apiReport: {
29
- enabled: true,
30
- reportFolder: "./review",
31
- },
32
- dtsRollup: {
33
- enabled: true,
34
- untrimmedFilePath: "",
35
- publicTrimmedFilePath: `dist/${
36
- packageDetails?.nameWithoutScope ?? packageDetails?.name
37
- }.d.ts`,
38
- },
39
- messages: {
40
- tsdocMessageReporting: {
41
- default: {
42
- logLevel: "none",
43
- },
44
- },
45
- extractorMessageReporting: {
46
- "ae-missing-release-tag": {
47
- logLevel: "none",
48
- },
49
- "ae-unresolved-link": {
50
- logLevel: "none",
51
- },
52
- },
53
- },
54
- };
10
+ const config = {
11
+ extends: "../../../api-extractor-base.json",
12
+ };
55
13
 
56
14
  const filePath = "api-extractor.json";
57
15
  const configFile = project.createSourceFile(filePath, JSON.stringify(config), {
@@ -4,36 +4,6 @@
4
4
  import { Project } from "ts-morph";
5
5
  import { RLCModel } from "../interfaces.js";
6
6
 
7
- const eslintConfig = `import azsdkEslint from "@azure/eslint-plugin-azure-sdk";
8
-
9
- export default azsdkEslint.config([
10
- {
11
- rules: {
12
- "@azure/azure-sdk/ts-modules-only-named": "warn",
13
- "@azure/azure-sdk/ts-package-json-types": "warn",
14
- "@azure/azure-sdk/ts-package-json-engine-is-present": "warn",
15
- "tsdoc/syntax": "warn"
16
- }
17
- }
18
- ]);
19
- `;
20
-
21
- const esLintConfigEsm = `import azsdkEslint from "@azure/eslint-plugin-azure-sdk";
22
-
23
- export default azsdkEslint.config([
24
- {
25
- rules: {
26
- "@azure/azure-sdk/ts-modules-only-named": "warn",
27
- "@azure/azure-sdk/ts-package-json-types": "warn",
28
- "@azure/azure-sdk/ts-package-json-engine-is-present": "warn",
29
- "@azure/azure-sdk/ts-package-json-files-required": "off",
30
- "@azure/azure-sdk/ts-package-json-main-is-cjs": "off",
31
- "tsdoc/syntax": "warn"
32
- }
33
- }
34
- ]);
35
- `;
36
-
37
7
  const esLintConfigEsmAzureSdk = `import azsdkEslint from "@azure/eslint-plugin-azure-sdk";
38
8
 
39
9
  export default [
@@ -61,20 +31,11 @@ export default [
61
31
  ];
62
32
  `;
63
33
 
64
- export function buildEsLintConfig(model: RLCModel) {
65
- if (model.options?.flavor !== "azure") {
66
- return;
67
- }
68
- const project = new Project();
34
+ export function buildEsLintConfig(_model: RLCModel) {
35
+ const project = new Project({ useInMemoryFileSystem: true });
69
36
  const filePath = "eslint.config.mjs";
70
37
 
71
- let template: string;
72
- if (model.options?.moduleKind === "esm") {
73
- template = model.options?.azureSdkForJs ? esLintConfigEsmAzureSdk : esLintConfigEsm;
74
- } else {
75
- template = eslintConfig;
76
- }
77
- const configFile = project.createSourceFile("eslint.config.mjs", template, {
38
+ const configFile = project.createSourceFile("eslint.config.mjs", esLintConfigEsmAzureSdk, {
78
39
  overwrite: true,
79
40
  });
80
41
  return {