@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
@@ -1,152 +1,20 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
3
 
4
- import { PackageCommonInfoConfig, getCommonPackageDevDependencies } from "./package-common.js";
4
+ import { PackageCommonInfoConfig } from "./package-common.js";
5
5
 
6
6
  export interface AzurePackageInfoConfig extends PackageCommonInfoConfig {
7
7
  hasLro: boolean;
8
- specSource: "Swagger" | "TypeSpec";
9
8
  }
10
9
 
11
10
  /**
12
11
  * Build the common package.json config for an Azure package.
13
12
  */
14
- export function getAzureCommonPackageInfo(config: AzurePackageInfoConfig) {
13
+ export function getAzureCommonPackageInfo(_config: AzurePackageInfoConfig) {
15
14
  return {
16
15
  keywords: ["node", "azure", "cloud", "typescript", "browser", "isomorphic"],
17
16
  author: "Microsoft Corporation",
18
17
  license: "MIT",
19
- ...getAzureCjsCommonInfo(config),
20
- ...getAzureEsmCommonInfo(config),
21
- };
22
- }
23
-
24
- /**
25
- * Builds the common dependencies for an Azure package.
26
- */
27
- export function getAzurePackageDependencies({
28
- hasLro,
29
- specSource,
30
- dependencies,
31
- }: AzurePackageInfoConfig) {
32
- let azureDependencies: Record<string, string> = {
33
- ...dependencies,
34
- "@azure-rest/core-client": specSource === "Swagger" ? "^1.4.0" : "^2.3.1",
35
- "@azure/core-auth": "^1.6.0",
36
- "@azure/core-rest-pipeline": "^1.5.0",
37
- "@azure/logger": "^1.0.0",
38
- tslib: "^2.6.2",
39
- };
40
-
41
- if (hasLro) {
42
- azureDependencies = {
43
- ...azureDependencies,
44
- "@azure/core-lro": "^3.1.0",
45
- "@azure/abort-controller": "^2.1.2",
46
- };
47
- }
48
-
49
- return azureDependencies;
50
- }
51
-
52
- function getAzureCjsCommonInfo({
53
- withTests,
54
- withSamples,
55
- name,
56
- nameWithoutScope,
57
- moduleKind,
58
- }: AzurePackageInfoConfig) {
59
- if (moduleKind !== "cjs") {
60
- return {};
61
- }
62
-
63
- return {
64
- files: [
65
- "dist/",
66
- "!dist/**/*.d.*ts.map",
67
- withTests || withSamples ? "dist-esm/src/" : "dist-esm/",
68
- `types/${nameWithoutScope ?? name}.d.ts`,
69
- "README.md",
70
- "LICENSE",
71
- ],
72
- };
73
- }
74
-
75
- function getAzureEsmCommonInfo({ moduleKind }: AzurePackageInfoConfig) {
76
- if (moduleKind !== "esm") {
77
- return {};
78
- }
79
- return {
80
18
  files: ["dist/", "!dist/**/*.d.*ts.map", "README.md", "LICENSE"],
81
19
  };
82
20
  }
83
-
84
- function getAzurePackageCjsDevDependencies({ moduleKind, withTests }: AzurePackageInfoConfig) {
85
- if (moduleKind !== "cjs") {
86
- return {};
87
- }
88
- const testDevDependencies = {
89
- "@azure-tools/test-credential": "^1.1.0",
90
- "@azure-tools/test-recorder": "^3.0.0",
91
- nyc: "^15.1.0",
92
- mocha: "^11.0.2",
93
- "@types/mocha": "^10.0.0",
94
- "@types/chai": "^4.2.8",
95
- chai: "^4.2.0",
96
- "karma-chrome-launcher": "^3.0.0",
97
- "karma-coverage": "^2.0.0",
98
- "karma-env-preprocessor": "^0.1.1",
99
- "karma-firefox-launcher": "^2.1.3",
100
- "karma-junit-reporter": "^2.0.1",
101
- "karma-mocha-reporter": "^2.2.5",
102
- "karma-mocha": "^2.0.1",
103
- "karma-source-map-support": "~1.4.0",
104
- "karma-sourcemap-loader": "^0.4.0",
105
- karma: "^6.2.0",
106
- };
107
-
108
- return {
109
- ...(withTests && testDevDependencies),
110
- "source-map-support": "^0.5.9",
111
- };
112
- }
113
-
114
- function getAzurePackageEsmDevDependencies({ moduleKind, withTests }: AzurePackageInfoConfig) {
115
- if (moduleKind !== "esm") {
116
- return {};
117
- }
118
-
119
- let devDependencies: Record<string, string> = {};
120
-
121
- if (withTests) {
122
- devDependencies = {
123
- ...devDependencies,
124
- "@vitest/browser-playwright": "^4.0.6",
125
- "@vitest/coverage-istanbul": "^4.0.6",
126
- playwright: "^1.41.2",
127
- vitest: "^4.0.6",
128
- "@azure-tools/test-credential": "^2.0.0",
129
- "@azure-tools/test-recorder": "^4.0.0",
130
- };
131
- }
132
-
133
- return devDependencies;
134
- }
135
-
136
- export function getAzurePackageDevDependencies(config: AzurePackageInfoConfig) {
137
- const esmDevDependencies = getAzurePackageEsmDevDependencies(config);
138
- const cjsDevDependencies = getAzurePackageCjsDevDependencies(config);
139
-
140
- const testDevDependencies = {
141
- "@azure/identity": "^4.2.1",
142
- };
143
-
144
- return {
145
- dotenv: "^16.0.0",
146
- ...getCommonPackageDevDependencies(config),
147
- ...(config.withTests && testDevDependencies),
148
- ...(config.specSource === "Swagger" && { autorest: "latest" }),
149
- ...esmDevDependencies,
150
- ...cjsDevDependencies,
151
- };
152
- }
@@ -6,7 +6,6 @@ import { getCommonPackageScripts, getPackageCommonInfo } from "./package-common.
6
6
 
7
7
  export interface AzureMonorepoInfoConfig extends AzurePackageInfoConfig {
8
8
  monorepoPackageDirectory?: string;
9
- clientFilePaths: string[];
10
9
  clientContextPaths?: string[];
11
10
  }
12
11
 
@@ -74,9 +73,6 @@ export function getAzureMonorepoDependencies(config: AzureMonorepoInfoConfig) {
74
73
  eslint: "catalog:",
75
74
  prettier: "catalog:",
76
75
  rimraf: "catalog:",
77
- ...(config.specSource === "Swagger" && {
78
- autorest: "catalog:",
79
- }),
80
76
  ...testDeps,
81
77
  },
82
78
  };
@@ -129,20 +125,9 @@ function getSampleMetadata({ name, version, withSamples }: AzureMonorepoInfoConf
129
125
  };
130
126
  }
131
127
 
132
- function addSwaggerMetadata(metadata: Record<string, any>, specSource: "Swagger" | "TypeSpec") {
133
- if (specSource !== "Swagger") {
134
- return;
135
- }
136
-
137
- metadata["constantPaths"].push({
138
- path: "swagger/README.md",
139
- prefix: "package-version",
140
- });
141
- }
142
-
143
128
  function getAzureMonorepoScripts(config: AzureMonorepoInfoConfig) {
144
- const esmScripts = getEsmScripts(config);
145
- const skipLinting = config.azureArm && config.isModularLibrary;
129
+ const esmScripts = getEsmScripts();
130
+ const skipLinting = config.azureArm;
146
131
  const buildSampleScripts = config.azureArm
147
132
  ? "tsc -p config/tsconfig.samples.json && dev-tool samples publish -f"
148
133
  : "tsc -p config/tsconfig.samples.json";
@@ -170,11 +155,7 @@ function getAzureMonorepoScripts(config: AzureMonorepoInfoConfig) {
170
155
  };
171
156
  }
172
157
 
173
- function getEsmScripts({ moduleKind }: AzureMonorepoInfoConfig) {
174
- if (moduleKind !== "esm") {
175
- return {};
176
- }
177
-
158
+ function getEsmScripts() {
178
159
  return {
179
160
  build: "npm run clean && dev-tool run build-package && dev-tool run extract-api",
180
161
  "test:node": "dev-tool run test:vitest",
@@ -186,8 +167,7 @@ function getMetadataInfo(config: AzureMonorepoInfoConfig) {
186
167
  const metadata: Record<string, any> = {
187
168
  constantPaths: [],
188
169
  };
189
- const paths = config.isModularLibrary ? config.clientContextPaths : config.clientFilePaths;
190
- addSwaggerMetadata(metadata, config.specSource);
170
+ const paths = config.clientContextPaths;
191
171
  for (const path of paths ?? []) {
192
172
  metadata["constantPaths"].push({
193
173
  path: path,
@@ -6,17 +6,14 @@ export interface PackageCommonInfoConfig {
6
6
  nameWithoutScope?: string;
7
7
  version: string;
8
8
  description: string;
9
- moduleKind: "esm" | "cjs";
10
9
  withTests: boolean;
11
10
  withSamples: boolean;
12
11
  exports?: Record<string, any>;
13
12
  dependencies?: Record<string, string>;
14
13
  azureArm?: boolean;
15
- isModularLibrary?: boolean;
16
- azureSdkForJs?: boolean;
17
14
  /**
18
15
  * When true, generates React Native build targets (dist/react-native, exports condition).
19
- * Defaults to false. Only applicable when azureSdkForJs is true.
16
+ * Defaults to false.
20
17
  */
21
18
  generateReactNativeTarget?: boolean;
22
19
  }
@@ -32,7 +29,7 @@ export function getPackageCommonInfo(config: PackageCommonInfoConfig) {
32
29
  version,
33
30
  description,
34
31
  engines: {
35
- node: ">=20.0.0",
32
+ node: ">=22.0.0",
36
33
  },
37
34
  sideEffects: false,
38
35
  autoPublish: false,
@@ -40,110 +37,34 @@ export function getPackageCommonInfo(config: PackageCommonInfoConfig) {
40
37
  };
41
38
  }
42
39
 
43
- export const commonPackageDependencies = {
44
- tslib: "^2.6.2",
45
- };
46
-
47
- export function getCommonPackageDevDependencies(config: PackageCommonInfoConfig) {
48
- return {
49
- "@types/node": "^20.0.0",
50
- eslint: "^9.9.0",
51
- typescript: "~5.8.2",
52
- ...getEsmDevDependencies(config),
53
- };
54
- }
55
-
56
- function getEsmDevDependencies({ moduleKind, azureSdkForJs }: PackageCommonInfoConfig) {
57
- if (moduleKind !== "esm") {
58
- return {};
59
- }
60
- // Azure monorepo packages use warp (invoked via dev-tool), no tshy needed
61
- if (azureSdkForJs) {
62
- return {};
63
- }
64
- return {
65
- tshy: "^2.0.0",
66
- };
67
- }
68
-
69
40
  function getEntryPointInformation(config: PackageCommonInfoConfig) {
70
- return {
71
- ...getCjsEntrypointInformation(config),
72
- ...getEsmEntrypointInformation(config),
73
- };
74
- }
75
-
76
- function getCjsEntrypointInformation({
77
- name,
78
- nameWithoutScope,
79
- moduleKind,
80
- withTests,
81
- withSamples,
82
- }: PackageCommonInfoConfig) {
83
- if (moduleKind !== "cjs") {
84
- return;
85
- }
86
-
87
- const types =
88
- withTests || withSamples
89
- ? `./types/src/${nameWithoutScope ?? name}.d.ts`
90
- : `./types/${nameWithoutScope ?? name}.d.ts`;
91
- const main = withTests || withSamples ? "dist/src/index.js" : "dist/index.js";
92
- return {
93
- main,
94
- module: withTests || withSamples ? "./dist-esm/src/index.js" : "./dist-esm/index.js",
95
- types,
96
- };
97
- }
98
-
99
- function getEsmEntrypointInformation(config: PackageCommonInfoConfig) {
100
- if (config.moduleKind !== "esm") {
101
- return;
102
- }
103
-
104
- // Azure monorepo packages use warp instead of tshy
105
- if (config.azureSdkForJs) {
106
- const result: Record<string, any> = {
107
- type: "module",
108
- main: "./dist/commonjs/index.js",
109
- module: "./dist/esm/index.js",
110
- types: "./dist/commonjs/index.d.ts",
111
- browser: "./dist/browser/index.js",
112
- imports: {
113
- "#platform/*": {
114
- browser: "./src/*-browser.mts",
115
- default: "./src/*.ts",
116
- } as Record<string, string>,
117
- },
118
- exports: resolveWarpExports(config.exports, config.generateReactNativeTarget),
119
- };
120
-
121
- if (config.generateReactNativeTarget) {
122
- result["react-native"] = "./dist/react-native/index.js";
123
- (result["imports"]["#platform/*"] as Record<string, string>)["react-native"] =
124
- "./src/*-react-native.mts";
125
- // Reorder so react-native comes before default
126
- const importsEntry = result["imports"]["#platform/*"] as Record<string, string>;
127
- result["imports"]["#platform/*"] = {
128
- browser: importsEntry["browser"],
129
- "react-native": importsEntry["react-native"],
130
- default: importsEntry["default"],
131
- };
132
- }
133
-
134
- return result;
135
- }
136
-
137
- // Non-monorepo packages use tshy which manages polyfill resolution
138
- // via esmDialects — do NOT add imports here.
41
+ // Azure monorepo packages use warp.
139
42
  const result: Record<string, any> = {
140
- tshy: getTshyConfig(config),
141
43
  type: "module",
44
+ main: "./dist/commonjs/index.js",
45
+ module: "./dist/esm/index.js",
46
+ types: "./dist/commonjs/index.d.ts",
142
47
  browser: "./dist/browser/index.js",
48
+ imports: {
49
+ "#platform/*": {
50
+ browser: "./src/*-browser.mts",
51
+ default: "./src/*.ts",
52
+ } as Record<string, string>,
53
+ },
54
+ exports: resolveWarpExports(config.exports, config.generateReactNativeTarget),
143
55
  };
144
56
 
145
57
  if (config.generateReactNativeTarget) {
146
58
  result["react-native"] = "./dist/react-native/index.js";
59
+ (result["imports"]["#platform/*"] as Record<string, string>)["react-native"] =
60
+ "./src/*-react-native.mts";
61
+ // Reorder so react-native comes before default
62
+ const importsEntry = result["imports"]["#platform/*"] as Record<string, string>;
63
+ result["imports"]["#platform/*"] = {
64
+ browser: importsEntry["browser"],
65
+ "react-native": importsEntry["react-native"],
66
+ default: importsEntry["default"],
67
+ };
147
68
  }
148
69
 
149
70
  return result;
@@ -205,25 +126,6 @@ export function resolveWarpExports(
205
126
  return exports;
206
127
  }
207
128
 
208
- export function getTshyConfig(config: PackageCommonInfoConfig) {
209
- const { exports = {} } = config;
210
- const esmDialects = config.generateReactNativeTarget ? ["browser", "react-native"] : ["browser"];
211
- const tshyConfig: Record<string, any> = {
212
- exports: {
213
- "./package.json": "./package.json",
214
- ".": "./src/index.ts",
215
- ...exports,
216
- },
217
- dialects: ["esm", "commonjs"],
218
- esmDialects,
219
- selfLink: false,
220
- };
221
- if (config.azureSdkForJs) {
222
- tshyConfig["project"] = "../../../tsconfig.src.build.json";
223
- }
224
- return tshyConfig;
225
- }
226
-
227
129
  export function getCommonPackageScripts() {
228
130
  return {
229
131
  clean: "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
@@ -17,7 +17,7 @@ import type {
17
17
  {{#each importedResponses}}
18
18
  {{this}},
19
19
  {{/each}}
20
- } from "./responses{{#if isEsm}}.js{{/if}}";
20
+ } from "./responses.js";
21
21
  {{/if}}
22
22
 
23
23
  /**
@@ -4,15 +4,12 @@ import hbs from "handlebars";
4
4
  import { RLCModel } from "../interfaces.js";
5
5
  import { recordedClientContent } from "./template.js";
6
6
 
7
- export function buildRecordedClientFile(model: RLCModel) {
7
+ export function buildRecordedClientFile(_model: RLCModel) {
8
8
  const recordedClientFileContents = hbs.compile(recordedClientContent, {
9
9
  noEscape: true,
10
10
  });
11
11
  return {
12
12
  path: "test/public/utils/recordedClient.ts",
13
- content: recordedClientFileContents({
14
- isEsm: model.options?.moduleKind === "esm",
15
- isCjs: model.options?.moduleKind === "cjs",
16
- }),
13
+ content: recordedClientFileContents({}),
17
14
  };
18
15
  }
@@ -4,12 +4,9 @@ import hbs from "handlebars";
4
4
  import { RLCModel } from "../interfaces.js";
5
5
  import { sampleTestContent } from "./template.js";
6
6
 
7
- export function buildSampleTest(model: RLCModel) {
7
+ export function buildSampleTest(_model: RLCModel) {
8
8
  return {
9
9
  path: "test/public/sampleTest.spec.ts",
10
- content: hbs.compile(sampleTestContent, { noEscape: true })({
11
- isEsm: model.options?.moduleKind === "esm",
12
- isCjs: model.options?.moduleKind === "cjs",
13
- }),
10
+ content: hbs.compile(sampleTestContent, { noEscape: true })({}),
14
11
  };
15
12
  }
@@ -5,22 +5,18 @@ import { getClientName } from "../helpers/name-constructors.js";
5
5
  import { RLCModel } from "../interfaces.js";
6
6
  import { snippetsContent } from "./template.js";
7
7
 
8
- export function buildSnippets(model: RLCModel, clientName?: string, azureSdkForJs?: boolean) {
9
- const azureSdkForJsInfo = azureSdkForJs ? azureSdkForJs : model.options?.azureSdkForJs;
8
+ export function buildSnippets(model: RLCModel, clientName?: string) {
10
9
  // to keep the same config for azure scope in buildReadmeFile.ts
11
10
  if (
12
11
  (model?.options?.packageDetails?.scopeName === "azure" ||
13
12
  model?.options?.packageDetails?.scopeName === "azure-rest") &&
14
- model.options.addCredentials &&
15
- azureSdkForJsInfo
13
+ model.options.addCredentials
16
14
  ) {
17
15
  return {
18
16
  path: "test/snippets.spec.ts",
19
17
  content: hbs.compile(snippetsContent, { noEscape: true })({
20
18
  clientClassName: clientName ? clientName : getClientName(model),
21
19
  azureArm: model.options?.azureArm,
22
- azureSdkForJs: azureSdkForJsInfo,
23
- isModularLibrary: model.options.isModularLibrary,
24
20
  hasSubscriptionId: model.options.hasSubscriptionId,
25
21
  }),
26
22
  };
@@ -128,18 +128,11 @@ module.exports = function (config) {
128
128
 
129
129
  export const recordedClientContent = `
130
130
 
131
- {{#if isEsm}}
132
131
  import {
133
132
  Recorder,
134
133
  RecorderStartOptions,
135
134
  VitestTestContext,
136
135
  } from "@azure-tools/test-recorder";
137
- {{/if}}
138
-
139
- {{#if isCjs}}
140
- import { Context } from "mocha";
141
- import { Recorder, RecorderStartOptions } from "@azure-tools/test-recorder";
142
- {{/if}}
143
136
 
144
137
  const replaceableVariables: Record<string, string> = {
145
138
  SUBSCRIPTION_ID: "azure_subscription_id"
@@ -154,25 +147,14 @@ const recorderEnvSetup: RecorderStartOptions = {
154
147
  * Should be called first in the test suite to make sure environment variables are
155
148
  * read before they are being used.
156
149
  */
157
- {{#if isEsm}}
158
150
  export async function createRecorder(context: VitestTestContext): Promise<Recorder> {
159
151
  const recorder = new Recorder(context);
160
152
  await recorder.start(recorderEnvSetup);
161
153
  return recorder;
162
154
  }
163
- {{/if}}
164
-
165
- {{#if isCjs}}
166
- export async function createRecorder(context: Context): Promise<Recorder> {
167
- const recorder = new Recorder(context.currentTest);
168
- await recorder.start(recorderEnvSetup);
169
- return recorder;
170
- }
171
- {{/if}}
172
155
  `;
173
156
 
174
157
  export const sampleTestContent = `
175
- {{#if isEsm}}
176
158
  // import { Recorder } from "@azure-tools/test-recorder";
177
159
  // import { createRecorder } from "./utils/recordedClient.js";
178
160
  import { assert,
@@ -181,24 +163,12 @@ import { assert,
181
163
  it,
182
164
  describe
183
165
  } from "vitest";
184
- {{/if}}
185
-
186
- {{#if isCjs}}
187
- // import { Recorder } from "@azure-tools/test-recorder";
188
- import { assert } from "chai";
189
- // import { createRecorder } from "./utils/recordedClient{{#if isModularLibrary}}.js{{/if}}";
190
- // import { Context } from "mocha";
191
- {{/if}}
192
166
 
193
167
  describe("My test", () => {
194
168
  // let recorder: Recorder;
195
169
 
196
- // beforeEach(async function({{#if isCjs}}this: Context{{else}}ctx{{/if}}) {
197
- {{#if isEsm}}
170
+ // beforeEach(async function(ctx) {
198
171
  // recorder = await createRecorder(ctx);
199
- {{else}}
200
- // recorder = await createRecorder(this);
201
- {{/if}}
202
172
  // });
203
173
 
204
174
  // afterEach(async function() {
@@ -212,15 +182,12 @@ describe("My test", () => {
212
182
  `;
213
183
 
214
184
  export const snippetsContent = `
215
- {{#if isModularLibrary}}
216
185
  import { {{ clientClassName }} } from "../src/index.js";
217
186
  import { DefaultAzureCredential, InteractiveBrowserCredential } from "@azure/identity";
218
- {{/if}}
219
187
  import { setLogLevel } from "@azure/logger";
220
188
  import { describe, it } from "vitest";
221
189
 
222
190
  describe("snippets", () => {
223
- {{#if isModularLibrary}}
224
191
  it("ReadmeSampleCreateClient_Node", async () => {
225
192
  {{#if azureArm}}
226
193
  {{#if hasSubscriptionId}}
@@ -254,7 +221,6 @@ describe("snippets", () => {
254
221
  const client = new {{ clientClassName }}("<endpoint>", credential);
255
222
  {{/if}}
256
223
  });
257
- {{/if}}
258
224
 
259
225
  it("SetLogLevel", async () => {
260
226
  setLogLevel("info");
@@ -1,5 +1,5 @@
1
1
  import { getHttpOperationWithCache, SdkClient } from "@azure-tools/typespec-client-generator-core";
2
- import { HelperFunctionDetails, PackageFlavor } from "../rlc-common/index.js";
2
+ import { HelperFunctionDetails } from "../rlc-common/index.js";
3
3
  import { listOperationsUnderRLCClient } from "../utils/client-utils.js";
4
4
  import { SdkContext } from "../utils/interfaces.js";
5
5
  import { getCollectionFormat } from "../utils/model-utils.js";
@@ -13,17 +13,8 @@ import {
13
13
  export function transformHelperFunctionDetails(
14
14
  client: SdkClient,
15
15
  dpgContext: SdkContext,
16
- flavor?: PackageFlavor,
17
16
  ): HelperFunctionDetails {
18
17
  const serializeInfo = extractSpecialSerializeInfo(client, dpgContext);
19
- // Disable paging and long running for non-Azure clients.
20
- if (flavor !== "azure") {
21
- return {
22
- hasLongRunning: false,
23
- hasPaging: false,
24
- ...serializeInfo,
25
- };
26
- }
27
18
 
28
19
  const annotationDetails = {
29
20
  hasLongRunning: hasPollingOperations(client, dpgContext),
@@ -78,7 +78,7 @@ export function transformSchemas(client: SdkClient, dpgContext: SdkContext) {
78
78
  }
79
79
  }
80
80
  function transformHostParameters() {
81
- const serviceNs = getDefaultService(program, dpgContext.rlcOptions?.isModularLibrary)?.type;
81
+ const serviceNs = getDefaultService(program)?.type;
82
82
  if (serviceNs) {
83
83
  const host = getServers(program, serviceNs);
84
84
  if (host && host?.[0] && host?.[0]?.parameters) {
@@ -2,9 +2,8 @@
2
2
  // Licensed under the MIT License.
3
3
 
4
4
  import { SdkClient } from "@azure-tools/typespec-client-generator-core";
5
- import { getDoc } from "@typespec/compiler";
5
+ import { getDoc, joinPaths } from "@typespec/compiler";
6
6
  import { getServers } from "@typespec/http";
7
- import * as path from "path";
8
7
  import {
9
8
  buildRuntimeImports,
10
9
  Imports,
@@ -19,7 +18,6 @@ import {
19
18
  RLCOptions,
20
19
  Schema,
21
20
  SchemaContext,
22
- transformSampleGroups,
23
21
  UrlInfo,
24
22
  } from "../rlc-common/index.js";
25
23
  import { SdkContext } from "../utils/interfaces.js";
@@ -47,19 +45,14 @@ export async function transformRLCModel(
47
45
  const program = dpgContext.program;
48
46
  const options: RLCOptions = dpgContext.rlcOptions!;
49
47
  const rlcSourceDir = dpgContext.generationPathDetail?.rlcSourcesDir;
50
- const srcPath = path.join(
48
+ const srcPath = joinPaths(
51
49
  dpgContext.generationPathDetail?.rlcSourcesDir ?? "",
52
50
  options.batch && options.batch.length > 1
53
51
  ? normalizeName(client.name.replace("Client", ""), NameType.File)
54
52
  : "",
55
53
  );
56
54
  const libraryName = normalizeName(
57
- options.batch && (options.isModularLibrary || options.batch.length > 1)
58
- ? client.name
59
- : (options?.title ??
60
- client.name ??
61
- getDefaultService(program, options.isModularLibrary)?.title ??
62
- ""),
55
+ options.batch ? client.name : (client.name ?? getDefaultService(program)?.title ?? ""),
63
56
  NameType.Class,
64
57
  );
65
58
  const importSet = initInternalImports();
@@ -73,7 +66,7 @@ export async function transformRLCModel(
73
66
  importSet,
74
67
  urlInfo?.apiVersionInfo,
75
68
  );
76
- const helperDetails = transformHelperFunctionDetails(client, dpgContext, options.flavor);
69
+ const helperDetails = transformHelperFunctionDetails(client, dpgContext);
77
70
  // Enrich client-level annotation detail
78
71
  helperDetails.clientLroOverload = getClientLroOverload(paths);
79
72
 
@@ -92,17 +85,13 @@ export async function transformRLCModel(
92
85
  telemetryOptions,
93
86
  importInfo: {
94
87
  internalImports: importSet,
95
- runtimeImports: buildRuntimeImports(options.flavor),
88
+ runtimeImports: buildRuntimeImports(),
96
89
  },
97
90
  rlcSourceDir,
98
91
  };
99
- model.sampleGroups = transformSampleGroups(
100
- model,
101
- options?.generateSample === true /* Enable mock sample content if generateSample === true */,
102
- );
103
- options.generateSample =
104
- (options.generateSample === true || options.generateSample === undefined) &&
105
- (model.sampleGroups ?? []).length > 0;
92
+ // RLC sample generation has been removed; modular samples are emitted separately,
93
+ // so the RLC model never carries sample groups.
94
+ options.generateSample = false;
106
95
  return model;
107
96
  }
108
97