@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
@@ -2,23 +2,10 @@
2
2
  // Licensed under the MIT License.
3
3
 
4
4
  import { Project, SourceFile } from "ts-morph";
5
- import { NameType, normalizeName } from "../helpers/name-utils.js";
6
5
  import { hasPollingOperations } from "../helpers/operation-helpers.js";
7
- import {
8
- isAzureMonorepoPackage,
9
- isAzurePackage,
10
- isAzureStandalonePackage,
11
- } from "../helpers/package-util.js";
12
- import { getRelativePartFromSrcPath } from "../helpers/path-utils.js";
13
6
  import { RLCModel } from "../interfaces.js";
14
7
  import { buildAzureMonorepoPackage } from "./package-json/build-azure-monorepo-package.js";
15
- import { buildAzureStandalonePackage } from "./package-json/build-azure-standalone-package.js";
16
- import { buildFlavorlessPackage } from "./package-json/build-flavorless-package.js";
17
- import {
18
- PackageCommonInfoConfig,
19
- getTshyConfig,
20
- resolveWarpExports,
21
- } from "./package-json/package-common.js";
8
+ import { PackageCommonInfoConfig, resolveWarpExports } from "./package-json/package-common.js";
22
9
  import { getPackageName } from "./utils.js";
23
10
 
24
11
  interface PackageFileOptions {
@@ -33,7 +20,6 @@ export function buildPackageFile(
33
20
  ) {
34
21
  const config: PackageCommonInfoConfig = {
35
22
  description: getDescription(model),
36
- moduleKind: model.options?.moduleKind ?? "esm",
37
23
  name: getPackageName(model),
38
24
  version: getPackageVersion(model),
39
25
  withSamples: model.options?.generateSample === true,
@@ -41,32 +27,20 @@ export function buildPackageFile(
41
27
  nameWithoutScope: model.options?.packageDetails?.nameWithoutScope,
42
28
  exports,
43
29
  azureArm: model.options?.azureArm,
44
- isModularLibrary: model.options?.isModularLibrary ?? false,
45
- azureSdkForJs: model.options?.azureSdkForJs,
46
30
  generateReactNativeTarget: model.options?.generateReactNativeTarget,
47
31
  };
48
32
 
49
- let packageInfo: Record<string, any> = buildFlavorlessPackage(config);
50
-
51
33
  const extendedConfig = {
52
34
  ...config,
53
- clientFilePaths: [getClientFilePath(model)],
54
35
  hasLro: hasPollingOperations(model),
55
36
  monorepoPackageDirectory: model.options?.azureOutputDirectory,
56
- specSource: model.options?.sourceFrom ?? "TypeSpec",
57
37
  dependencies,
58
38
  clientContextPaths,
59
39
  };
60
40
 
61
- if (isAzureMonorepoPackage(model)) {
62
- packageInfo = buildAzureMonorepoPackage(extendedConfig);
63
- }
64
-
65
- if (isAzureStandalonePackage(model)) {
66
- packageInfo = buildAzureStandalonePackage(extendedConfig);
67
- }
41
+ const packageInfo: Record<string, any> = buildAzureMonorepoPackage(extendedConfig);
68
42
 
69
- const project = new Project();
43
+ const project = new Project({ useInMemoryFileSystem: true });
70
44
  const filePath = "package.json";
71
45
 
72
46
  if (!packageInfo) {
@@ -97,12 +71,9 @@ export function updatePackageFile(
97
71
  { exports, clientContextPaths }: PackageFileOptions = {},
98
72
  ) {
99
73
  const hasLro = hasPollingOperations(model);
100
- const isAzure = isAzurePackage(model);
101
- const needsLroUpdate = isAzure && hasLro;
74
+ const needsLroUpdate = hasLro;
102
75
  const needsExportsUpdate = exports;
103
76
  const needsConstantPathsUpdate = clientContextPaths && clientContextPaths.length > 0;
104
- const needsPlatformImportsUpdate =
105
- model.options?.azureSdkForJs && model.options?.moduleKind === "esm";
106
77
 
107
78
  let packageInfo;
108
79
  if (typeof existingFilePathOrContent === "string") {
@@ -128,57 +99,33 @@ export function updatePackageFile(
128
99
  needsCoreClientUpdate = true;
129
100
  }
130
101
 
131
- // Early return if nothing needs to be updated
132
- if (
133
- !needsLroUpdate &&
134
- !needsExportsUpdate &&
135
- !needsConstantPathsUpdate &&
136
- !needsPlatformImportsUpdate &&
137
- !needsCoreClientUpdate
138
- ) {
139
- return;
140
- }
141
-
142
102
  // Ensure warp packages have #platform/* imports for polyfill resolution.
143
103
  // The `react-native` condition is only added when explicitly opted in via
144
104
  // `generateReactNativeTarget`, matching the fresh-generation path in
145
105
  // `getEsmEntrypointInformation` (packageCommon.ts).
146
- if (needsPlatformImportsUpdate) {
147
- const platformImports: Record<string, string> = {
148
- browser: "./src/*-browser.mts",
149
- default: "./src/*.ts",
106
+ const platformImports: Record<string, string> = {
107
+ browser: "./src/*-browser.mts",
108
+ default: "./src/*.ts",
109
+ };
110
+ if (model.options?.generateReactNativeTarget) {
111
+ // Insert `react-native` before `default` so Node's conditional
112
+ // resolution order matches the fresh-generation output.
113
+ packageInfo.imports = {
114
+ "#platform/*": {
115
+ browser: platformImports["browser"],
116
+ "react-native": "./src/*-react-native.mts",
117
+ default: platformImports["default"],
118
+ },
119
+ };
120
+ } else {
121
+ packageInfo.imports = {
122
+ "#platform/*": platformImports,
150
123
  };
151
- if (model.options?.generateReactNativeTarget) {
152
- // Insert `react-native` before `default` so Node's conditional
153
- // resolution order matches the fresh-generation output.
154
- packageInfo.imports = {
155
- "#platform/*": {
156
- browser: platformImports["browser"],
157
- "react-native": "./src/*-react-native.mts",
158
- default: platformImports["default"],
159
- },
160
- };
161
- } else {
162
- packageInfo.imports = {
163
- "#platform/*": platformImports,
164
- };
165
- }
166
124
  }
167
125
 
168
- // Update exports based on build system (warp for monorepo, tshy for others)
126
+ // Update exports (warp: resolved exports in package.json)
169
127
  if (needsExportsUpdate) {
170
- if (model.options?.azureSdkForJs) {
171
- // Warp: update resolved exports in package.json
172
- packageInfo.exports = resolveWarpExports(exports, model.options?.generateReactNativeTarget);
173
- } else if (packageInfo.tshy) {
174
- // Tshy: update tshy.exports in package.json
175
- const newTshy = getTshyConfig({
176
- exports,
177
- azureSdkForJs: model.options?.azureSdkForJs,
178
- generateReactNativeTarget: model.options?.generateReactNativeTarget,
179
- } as PackageCommonInfoConfig);
180
- packageInfo.tshy["exports"] = newTshy["exports"];
181
- }
128
+ packageInfo.exports = resolveWarpExports(exports, model.options?.generateReactNativeTarget);
182
129
  }
183
130
 
184
131
  // Update Core Client dependency
@@ -200,7 +147,7 @@ export function updatePackageFile(
200
147
  }
201
148
 
202
149
  // Update constantPaths metadata for Azure packages
203
- if (needsConstantPathsUpdate && isAzure && packageInfo["//metadata"]) {
150
+ if (needsConstantPathsUpdate && packageInfo["//metadata"]) {
204
151
  const metadata = packageInfo["//metadata"];
205
152
  // Filter out existing userAgentInfo entries
206
153
  const nonUserAgentPaths = (metadata.constantPaths || []).filter(
@@ -231,12 +178,3 @@ function getDescription(model: RLCModel): string {
231
178
  }
232
179
  return description;
233
180
  }
234
-
235
- function getClientFilePath(model: RLCModel) {
236
- const { srcPath } = model;
237
- const sdkReletivePart = getRelativePartFromSrcPath(srcPath);
238
- const clientFilename = normalizeName(model.libraryName, NameType.File);
239
- return sdkReletivePart
240
- ? `src/${sdkReletivePart}/${clientFilename}.ts`
241
- : `src/${clientFilename}.ts`;
242
- }
@@ -1,88 +1,12 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
3
 
4
- import { RLCModel } from "../interfaces.js";
5
4
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
6
5
  // @ts-ignore: to fix the handlebars issue
7
- import { readFileSync } from "fs";
8
6
  import hbs from "handlebars";
9
7
  import { getClientName } from "../helpers/name-constructors.js";
10
8
  import { NameType, normalizeName } from "../helpers/name-utils.js";
11
- import { isAzurePackage } from "../helpers/package-util.js";
12
-
13
- const azureReadmeRLCTemplate = `# {{ clientDescriptiveName }} library for JavaScript
14
-
15
- {{ description }}
16
-
17
- {{#if azureArm}}
18
- **If you are not familiar with our REST client, please spend 5 minutes to take a look at {{#if serviceDocURL}}[the service's documentation]({{ serviceDocURL }}) and {{/if}}our [REST client docs](https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/rest-clients.md) to use this library, the REST client provides a light-weighted & developer friendly way to call azure rest api
19
- {{else}}
20
- **Please rely heavily on {{#if serviceDocURL}}[the service's documentation]({{ serviceDocURL }}) and {{/if}}our [REST client docs](https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/rest-clients.md) to use this library**
21
- {{/if}}
22
-
23
- Key links:
24
-
25
- {{#if packageSourceURL}}
26
- - [Source code]({{ packageSourceURL }})
27
- {{/if}}
28
- {{#if packageNPMURL}}
29
- - [Package (NPM)]({{ packageNPMURL }})
30
- {{/if}}
31
- {{#if apiRefURL}}
32
- - [API reference documentation]({{ apiRefURL }})
33
- {{/if}}
34
- {{#if serviceDocURL}}
35
- - [Product documentation]({{ serviceDocURL }})
36
- {{/if}}
37
- {{#if samplesURL}}
38
- - [Samples]({{ samplesURL }})
39
- {{/if}}
40
-
41
- ## Getting started
42
-
43
- ### Currently supported environments
44
-
45
- - LTS versions of Node.js
46
-
47
- ### Prerequisites
48
-
49
- - You must have an [Azure subscription](https://azure.microsoft.com/free/){{#if dependencyLink}} and follow [these]({{ dependencyLink }}) instructions{{/if}} to use this package.
50
-
51
- ### Install the \`{{ clientPackageName }}\` package
52
-
53
- Install the {{ clientDescriptiveName }} REST client library for JavaScript with \`npm\`:
54
-
55
- \`\`\`bash
56
- npm install {{ clientPackageName }}
57
- \`\`\`
58
-
59
- ### Create and authenticate a \`{{ clientClassName }}\`
60
-
61
- To use an [Azure Active Directory (AAD) token credential](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token),
62
- provide an instance of the desired credential type obtained from the
63
- [@azure/identity](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#credentials) library.
64
-
65
- To authenticate with AAD, you must first \`npm\` install [\`@azure/identity\`](https://www.npmjs.com/package/@azure/identity) {{#if dependencyLink}}and
66
- [{{dependencyDescription }}]({{ dependencyLink }}){{/if}}
67
-
68
- After setup, you can choose which type of [credential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#credentials) from \`@azure/identity\` to use.
69
- As an example, [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential)
70
- can be used to authenticate the client.
71
-
72
- ## Troubleshooting
73
-
74
- ### Logging
75
-
76
- Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the \`AZURE_LOG_LEVEL\` environment variable to \`info\`. Alternatively, logging can be enabled at runtime by calling \`setLogLevel\` in the \`@azure/logger\`:
77
-
78
- \`\`\`ts {{#if azureSdkForJs}}{{#if generateTest}}snippet:SetLogLevel{{/if}}{{/if}}
79
- import { setLogLevel } from "@azure/logger";
80
-
81
- setLogLevel("info");
82
- \`\`\`
83
-
84
- For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).
85
- `;
9
+ import { RLCModel } from "../interfaces.js";
86
10
 
87
11
  const azureReadmeModularTemplate = `# {{ clientDescriptiveName }} library for JavaScript
88
12
 
@@ -134,10 +58,10 @@ npm install {{ clientPackageName }}
134
58
  {{#if addCredentials}}
135
59
  ### Create and authenticate a \`{{ clientClassName}}\`
136
60
 
137
- To create a client object to access the {{ serviceName }} API, you will need the \`endpoint\` of your {{ serviceName }} resource and a \`credential\`. The {{ clientDescriptiveName }} can use Azure Active Directory credentials to authenticate.
61
+ To create a client object to access the {{ serviceName }} API, you will need the \`endpoint\` of your {{ serviceName }} resource and a \`credential\`. The {{ clientDescriptiveName }} can use Microsoft Entra credentials to authenticate.
138
62
  You can find the endpoint for your {{ serviceName }} resource in the [Azure Portal][azure_portal].
139
63
 
140
- You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).
64
+ You can authenticate with Microsoft Entra ID using a credential from the [@azure/identity][azure_identity] library or [an existing Microsoft Entra token](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).
141
65
 
142
66
  To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the \`@azure/identity\` package:
143
67
 
@@ -145,14 +69,14 @@ To use the [DefaultAzureCredential][defaultazurecredential] provider shown below
145
69
  npm install @azure/identity
146
70
  \`\`\`
147
71
 
148
- You will also need to **register a new AAD application and grant access to {{ serviceName}}** by assigning the suitable role to your service principal (note: roles such as \`"Owner"\` will not grant the necessary permissions).
72
+ You will also need to **register a new Microsoft Entra application and grant access to {{ serviceName}}** by assigning the suitable role to your service principal (note: roles such as \`"Owner"\` will not grant the necessary permissions).
149
73
 
150
- For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).
74
+ For more information about how to create a Microsoft Entra application check out [this guide](https://learn.microsoft.com/entra/identity-platform/howto-create-service-principal-portal).
151
75
 
152
76
  {{#if azureArm}}
153
77
  Using Node.js and Node-like environments, you can use the \`DefaultAzureCredential\` class to authenticate the client.
154
78
 
155
- \`\`\`ts {{#if azureSdkForJs}}{{#if generateTest}}snippet:ReadmeSampleCreateClient_Node{{/if}}{{/if}}
79
+ \`\`\`ts {{#if generateTest}}snippet:ReadmeSampleCreateClient_Node{{/if}}
156
80
  import { {{ clientClassName }} } from "{{ clientPackageName }}";
157
81
  import { DefaultAzureCredential } from "@azure/identity";
158
82
 
@@ -166,7 +90,7 @@ const client = new {{ clientClassName }}(new DefaultAzureCredential());
166
90
 
167
91
  For browser environments, use the \`InteractiveBrowserCredential\` from the \`@azure/identity\` package to authenticate.
168
92
 
169
- \`\`\`ts {{#if azureSdkForJs}}{{#if generateTest}}snippet:ReadmeSampleCreateClient_Browser{{/if}}{{/if}}
93
+ \`\`\`ts {{#if generateTest}}snippet:ReadmeSampleCreateClient_Browser{{/if}}
170
94
  import { InteractiveBrowserCredential } from "@azure/identity";
171
95
  import { {{ clientClassName }} } from "{{ clientPackageName }}";
172
96
 
@@ -185,7 +109,7 @@ const client = new {{ clientClassName }}(credential);
185
109
  {{else}}
186
110
  Using Node.js and Node-like environments, you can use the \`DefaultAzureCredential\` class to authenticate the client.
187
111
 
188
- \`\`\`ts {{#if azureSdkForJs}}{{#if generateTest}}snippet:ReadmeSampleCreateClient_Node{{/if}}{{/if}}
112
+ \`\`\`ts {{#if generateTest}}snippet:ReadmeSampleCreateClient_Node{{/if}}
189
113
  import { {{ clientClassName }} } from "{{ clientPackageName }}";
190
114
  import { DefaultAzureCredential } from "@azure/identity";
191
115
 
@@ -194,7 +118,7 @@ const client = new {{ clientClassName }}("<endpoint>", new DefaultAzureCredentia
194
118
 
195
119
  For browser environments, use the \`InteractiveBrowserCredential\` from the \`@azure/identity\` package to authenticate.
196
120
 
197
- \`\`\`ts {{#if azureSdkForJs}}{{#if generateTest}}snippet:ReadmeSampleCreateClient_Browser{{/if}}{{/if}}
121
+ \`\`\`ts {{#if generateTest}}snippet:ReadmeSampleCreateClient_Browser{{/if}}
198
122
  import { InteractiveBrowserCredential } from "@azure/identity";
199
123
  import { {{ clientClassName }} } from "{{ clientPackageName }}";
200
124
 
@@ -223,7 +147,7 @@ To use this client library in the browser, first you need to use a bundler. For
223
147
 
224
148
  Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the \`AZURE_LOG_LEVEL\` environment variable to \`info\`. Alternatively, logging can be enabled at runtime by calling \`setLogLevel\` in the \`@azure/logger\`:
225
149
 
226
- \`\`\`ts {{#if azureSdkForJs}}{{#if generateTest}}snippet:SetLogLevel{{/if}}{{/if}}
150
+ \`\`\`ts {{#if generateTest}}snippet:SetLogLevel{{/if}}
227
151
  import { setLogLevel } from "@azure/logger";
228
152
 
229
153
  setLogLevel("info");
@@ -339,8 +263,6 @@ interface Metadata {
339
263
  isReleasablePackage?: boolean;
340
264
  /** The link to the contributing guide in the repository */
341
265
  contributingGuideURL?: string;
342
- /** Indicates if the package is generated to azure-sdk-for-js repo */
343
- azureSdkForJs?: boolean;
344
266
  /** Indicates if the package need generate test files */
345
267
  generateTest?: boolean;
346
268
  /** Indicates if the package need SubscriptionId as the client parameter */
@@ -350,11 +272,7 @@ interface Metadata {
350
272
  export function buildReadmeFile(model: RLCModel) {
351
273
  const metadata = createMetadata(model) ?? {};
352
274
  const readmeFileContents = hbs.compile(
353
- model.options && isAzurePackage(model)
354
- ? model.options.isModularLibrary
355
- ? azureReadmeModularTemplate
356
- : azureReadmeRLCTemplate
357
- : nonBrandedReadmeTemplate,
275
+ model.options ? azureReadmeModularTemplate : nonBrandedReadmeTemplate,
358
276
  { noEscape: true },
359
277
  );
360
278
  return {
@@ -363,10 +281,9 @@ export function buildReadmeFile(model: RLCModel) {
363
281
  };
364
282
  }
365
283
 
366
- export function hasClientNameChanged(model: RLCModel, existingReadmeFilePath: string): boolean {
284
+ export function hasClientNameChanged(model: RLCModel, existingReadmeContent: string): boolean {
367
285
  try {
368
- const existingContent = readFileSync(existingReadmeFilePath, "utf8");
369
- const importMatch = existingContent.match(
286
+ const importMatch = existingReadmeContent.match(
370
287
  /import\s*\{\s*([A-Za-z0-9_]+)\s*\}\s*from\s*["'][^"']*["']/,
371
288
  );
372
289
  const existingClientName = importMatch?.[1];
@@ -379,21 +296,20 @@ export function hasClientNameChanged(model: RLCModel, existingReadmeFilePath: st
379
296
 
380
297
  export function updateReadmeFile(
381
298
  model: RLCModel,
382
- existingReadmeFilePath: string,
299
+ existingReadmeContent: string,
383
300
  ): { path: string; content: string } | undefined {
384
301
  try {
385
- const existingContent = readFileSync(existingReadmeFilePath, "utf8");
386
302
  const metadata = createMetadata(model) ?? {};
387
303
 
388
304
  const newApiRefLink = hbs.compile(apiReferenceTemplate, { noEscape: true })(metadata).trim();
389
305
 
390
306
  if (!newApiRefLink) {
391
- return { path: "README.md", content: existingContent };
307
+ return { path: "README.md", content: existingReadmeContent };
392
308
  }
393
309
 
394
310
  const apiRefRegex =
395
311
  /^- \[API reference documentation\]\(https:\/\/learn\.microsoft\.com\/javascript\/api\/[^)]+\)$/m;
396
- const updatedContent = existingContent.replace(apiRefRegex, (match) =>
312
+ const updatedContent = existingReadmeContent.replace(apiRefRegex, (match) =>
397
313
  match ? newApiRefLink : match,
398
314
  );
399
315
 
@@ -413,16 +329,7 @@ function createMetadata(model: RLCModel): Metadata | undefined {
413
329
  return;
414
330
  }
415
331
  // const packageDetails = model.options.packageDetails;
416
- const {
417
- packageDetails,
418
- azureOutputDirectory,
419
- productDocLink,
420
- dependencyInfo,
421
- multiClient,
422
- batch,
423
- serviceInfo,
424
- isTypeSpecTest,
425
- } = model.options;
332
+ const { packageDetails, azureOutputDirectory, serviceInfo, isTypeSpecTest } = model.options;
426
333
 
427
334
  const azureHuh =
428
335
  packageDetails?.scopeName === "azure" || packageDetails?.scopeName === "azure-rest";
@@ -450,11 +357,8 @@ function createMetadata(model: RLCModel): Metadata | undefined {
450
357
  serviceName,
451
358
  clientClassName,
452
359
  clientPackageName: clientPackageName,
453
- clientDescriptiveName: model.options.isModularLibrary
454
- ? `${serviceName} client`
455
- : `${serviceName} REST client`,
360
+ clientDescriptiveName: `${serviceName} client`,
456
361
  description: serviceInfo?.description ?? packageDetails.description,
457
- serviceDocURL: productDocLink,
458
362
  packageSourceURL: packageSourceURL,
459
363
  packageNPMURL: `https://www.npmjs.com/package/${clientPackageName}`,
460
364
  samplesURL:
@@ -462,9 +366,6 @@ function createMetadata(model: RLCModel): Metadata | undefined {
462
366
  apiRefURL: azureHuh
463
367
  ? `https://learn.microsoft.com/javascript/api/${clientPackageName}${apiRefUrlQueryParameter}`
464
368
  : undefined,
465
- dependencyDescription: dependencyInfo?.description,
466
- dependencyLink: dependencyInfo?.link,
467
- hasMultiClients: multiClient && batch && batch.length > 1,
468
369
  azureArm: Boolean(model.options.azureArm),
469
370
  azure: azureHuh,
470
371
  isReleasablePackage: !isTypeSpecTest,
@@ -473,7 +374,6 @@ function createMetadata(model: RLCModel): Metadata | undefined {
473
374
  identityPackageURL: repoURL && `${repoURL}/tree/main/sdk/identity/identity`,
474
375
  addCredentials: model.options.addCredentials,
475
376
  contributingGuideURL: repoURL && `${repoURL}/blob/main/CONTRIBUTING.md`,
476
- azureSdkForJs: model.options.azureSdkForJs,
477
377
  generateTest: model.options.generateTest,
478
378
  hasSubscriptionId: model.options.hasSubscriptionId,
479
379
  };
@@ -484,9 +384,7 @@ function getServiceName(model: RLCModel) {
484
384
  model?.options?.packageDetails?.scopeName === "azure" ||
485
385
  model?.options?.packageDetails?.scopeName === "azure-rest";
486
386
  const libraryName = model.libraryName;
487
- const serviceTitle = model.options?.isModularLibrary
488
- ? model.libraryName
489
- : (model.options?.serviceInfo?.title ?? model.libraryName);
387
+ const serviceTitle = model.libraryName;
490
388
  const batch = model?.options?.batch,
491
389
  packageDetails = model?.options?.packageDetails;
492
390
  let simpleServiceName =
@@ -7,10 +7,7 @@ const sampleEnvText = `
7
7
  `;
8
8
 
9
9
  export function buildSampleEnvFile(model: RLCModel) {
10
- if (
11
- (model.options?.generateMetadata === true || model.options?.generateSample === true) &&
12
- model.options?.flavor === "azure"
13
- ) {
10
+ if (model.options?.generateMetadata === true || model.options?.generateSample === true) {
14
11
  const filePath = "sample.env";
15
12
  return {
16
13
  path: filePath,
@@ -5,12 +5,7 @@ import { RLCModel } from "../interfaces.js";
5
5
  import { getPackageName } from "./utils.js";
6
6
 
7
7
  function shouldGenerateTestConfig(model: RLCModel): boolean {
8
- const isAzureSdkForJs = model.options?.azureSdkForJs ?? false;
9
- return !(
10
- model.options?.generateMetadata === false ||
11
- model.options?.generateTest === false ||
12
- isAzureSdkForJs !== true
13
- );
8
+ return !(model.options?.generateMetadata === false || model.options?.generateTest === false);
14
9
  }
15
10
 
16
11
  /**
@@ -7,83 +7,41 @@ import { RLCModel } from "../interfaces.js";
7
7
  /**
8
8
  * Builds the root tsconfig.json.
9
9
  *
10
- * For azureSdkForJs packages, emits project references pointing into the
11
- * `config/` subfolder (following the eng/tsconfigs pattern).
10
+ * Emits project references pointing into the `config/` subfolder
11
+ * (following the eng/tsconfigs pattern).
12
12
  */
13
13
  export function buildTsConfig(model: RLCModel) {
14
- const { packageDetails, azureSdkForJs } = model.options || {};
15
14
  const { generateTest, generateSample, generateReactNativeTarget } = model.options || {};
16
- const clientPackageName = packageDetails?.name ?? "";
17
- const project = new Project();
18
-
19
- let tsConfig: Record<string, any>;
20
-
21
- if (azureSdkForJs) {
22
- const references: { path: string }[] = [
23
- { path: "./config/tsconfig.src.esm.json" },
24
- { path: "./config/tsconfig.src.browser.json" },
25
- ];
26
-
27
- if (generateReactNativeTarget) {
28
- references.push({ path: "./config/tsconfig.src.react-native.json" });
29
- }
30
-
31
- references.push({ path: "./config/tsconfig.src.cjs.json" });
32
-
33
- if (generateTest) {
34
- references.push(
35
- { path: "./config/tsconfig.test.node.json" },
36
- { path: "./config/tsconfig.test.browser.json" },
37
- );
38
- }
39
-
40
- if (generateSample) {
41
- references.push({ path: "./config/tsconfig.samples.json" });
42
- }
43
-
44
- if (generateTest) {
45
- references.push({ path: "./config/tsconfig.snippets.json" });
46
- }
47
-
48
- tsConfig = { references, files: [] };
49
- } else {
50
- const { options } = model;
51
- tsConfig = {
52
- compilerOptions: {
53
- target: "ES2017",
54
- module: options?.moduleKind === "esm" ? "NodeNext" : "es6",
55
- lib: [],
56
- declaration: true,
57
- declarationMap: true,
58
- inlineSources: true,
59
- sourceMap: true,
60
- importHelpers: true,
61
- strict: true,
62
- alwaysStrict: true,
63
- noUnusedLocals: true,
64
- noUnusedParameters: true,
65
- noImplicitReturns: true,
66
- noFallthroughCasesInSwitch: true,
67
- forceConsistentCasingInFileNames: true,
68
- moduleResolution: options?.moduleKind === "esm" ? "NodeNext" : "node",
69
- allowSyntheticDefaultImports: true,
70
- esModuleInterop: true,
71
- outDir: options?.moduleKind === "cjs" ? "./dist-esm" : undefined,
72
- declarationDir: options?.moduleKind === "cjs" ? "./types" : undefined,
73
- },
74
- include: ["src/**/*.ts"],
75
- };
76
-
77
- if (generateTest) {
78
- tsConfig["include"].push("test/**/*.ts");
79
- }
80
- if (generateSample) {
81
- tsConfig["include"].push("samples-dev/**/*.ts");
82
- tsConfig["compilerOptions"]["paths"] = {};
83
- tsConfig["compilerOptions"]["paths"][clientPackageName] = ["./src/index"];
84
- }
15
+ const project = new Project({ useInMemoryFileSystem: true });
16
+
17
+ const references: { path: string }[] = [
18
+ { path: "./config/tsconfig.src.esm.json" },
19
+ { path: "./config/tsconfig.src.browser.json" },
20
+ ];
21
+
22
+ if (generateReactNativeTarget) {
23
+ references.push({ path: "./config/tsconfig.src.react-native.json" });
24
+ }
25
+
26
+ references.push({ path: "./config/tsconfig.src.cjs.json" });
27
+
28
+ if (generateTest) {
29
+ references.push(
30
+ { path: "./config/tsconfig.test.node.json" },
31
+ { path: "./config/tsconfig.test.browser.json" },
32
+ );
33
+ }
34
+
35
+ if (generateSample) {
36
+ references.push({ path: "./config/tsconfig.samples.json" });
85
37
  }
86
38
 
39
+ if (generateTest) {
40
+ references.push({ path: "./config/tsconfig.snippets.json" });
41
+ }
42
+
43
+ const tsConfig = { references, files: [] };
44
+
87
45
  const filePath = "tsconfig.json";
88
46
  const configFile = project.createSourceFile(filePath, JSON.stringify(tsConfig, null, 2), {
89
47
  overwrite: true,
@@ -68,10 +68,6 @@ targets:
68
68
  * in options to include it.
69
69
  */
70
70
  export function buildWarpConfig(model: RLCModel, { exports }: WarpConfigOptions = {}) {
71
- if (model.options?.moduleKind !== "esm") {
72
- return;
73
- }
74
-
75
71
  const allExports: Record<string, string> = {
76
72
  ...BASE_EXPORTS,
77
73
  ...exports,