@servicetitan/startup 38.0.0 → 38.1.0

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 (395) hide show
  1. package/bin/js-yaml.js +2 -2
  2. package/dist/cli/commands/build.d.ts.map +1 -1
  3. package/dist/cli/commands/build.js +22 -9
  4. package/dist/cli/commands/build.js.map +1 -1
  5. package/dist/cli/commands/bundle-package.d.ts +6 -0
  6. package/dist/cli/commands/bundle-package.d.ts.map +1 -0
  7. package/dist/cli/commands/bundle-package.js +59 -0
  8. package/dist/cli/commands/bundle-package.js.map +1 -0
  9. package/dist/cli/commands/bundle-vite.js +13 -4
  10. package/dist/cli/commands/bundle-vite.js.map +1 -1
  11. package/dist/cli/commands/bundle-webpack.js +13 -4
  12. package/dist/cli/commands/bundle-webpack.js.map +1 -1
  13. package/dist/cli/commands/clean.js +13 -4
  14. package/dist/cli/commands/clean.js.map +1 -1
  15. package/dist/cli/commands/command.d.ts +9 -0
  16. package/dist/cli/commands/command.d.ts.map +1 -0
  17. package/dist/cli/commands/command.js +35 -0
  18. package/dist/cli/commands/command.js.map +1 -0
  19. package/dist/cli/commands/convert-eslint-config.js +14 -7
  20. package/dist/cli/commands/convert-eslint-config.js.map +1 -1
  21. package/dist/cli/commands/eslint.js +13 -4
  22. package/dist/cli/commands/eslint.js.map +1 -1
  23. package/dist/cli/commands/init.js +13 -4
  24. package/dist/cli/commands/init.js.map +1 -1
  25. package/dist/cli/commands/install.js +13 -4
  26. package/dist/cli/commands/install.js.map +1 -1
  27. package/dist/cli/commands/kendo-ui-license.js +13 -4
  28. package/dist/cli/commands/kendo-ui-license.js.map +1 -1
  29. package/dist/cli/commands/lint.js +13 -4
  30. package/dist/cli/commands/lint.js.map +1 -1
  31. package/dist/cli/commands/mfe-check.d.ts.map +1 -1
  32. package/dist/cli/commands/mfe-check.js +15 -7
  33. package/dist/cli/commands/mfe-check.js.map +1 -1
  34. package/dist/cli/commands/mfe-generate-metadata.js +13 -4
  35. package/dist/cli/commands/mfe-generate-metadata.js.map +1 -1
  36. package/dist/cli/commands/mfe-list.js +13 -4
  37. package/dist/cli/commands/mfe-list.js.map +1 -1
  38. package/dist/cli/commands/mfe-package-clean.js +13 -4
  39. package/dist/cli/commands/mfe-package-clean.js.map +1 -1
  40. package/dist/cli/commands/mfe-package-publish.js +13 -4
  41. package/dist/cli/commands/mfe-package-publish.js.map +1 -1
  42. package/dist/cli/commands/mfe-package-rollback.js +13 -4
  43. package/dist/cli/commands/mfe-package-rollback.js.map +1 -1
  44. package/dist/cli/commands/mfe-publish.js +13 -4
  45. package/dist/cli/commands/mfe-publish.js.map +1 -1
  46. package/dist/cli/commands/mfe-purge-cache.js +13 -4
  47. package/dist/cli/commands/mfe-purge-cache.js.map +1 -1
  48. package/dist/cli/commands/prepare-package.js +13 -4
  49. package/dist/cli/commands/prepare-package.js.map +1 -1
  50. package/dist/cli/commands/registry/build.d.ts +1 -1
  51. package/dist/cli/commands/registry/build.d.ts.map +1 -1
  52. package/dist/cli/commands/registry/build.js +3 -5
  53. package/dist/cli/commands/registry/build.js.map +1 -1
  54. package/dist/cli/commands/registry/bundle-package.d.ts +41 -0
  55. package/dist/cli/commands/registry/bundle-package.d.ts.map +1 -0
  56. package/dist/cli/commands/registry/bundle-package.js +54 -0
  57. package/dist/cli/commands/registry/bundle-package.js.map +1 -0
  58. package/dist/cli/commands/registry/command-registry.d.ts +42 -2
  59. package/dist/cli/commands/registry/command-registry.d.ts.map +1 -1
  60. package/dist/cli/commands/registry/command-registry.js +10 -19
  61. package/dist/cli/commands/registry/command-registry.js.map +1 -1
  62. package/dist/cli/commands/registry/start.d.ts +1 -1
  63. package/dist/cli/commands/registry/start.d.ts.map +1 -1
  64. package/dist/cli/commands/registry/start.js +3 -5
  65. package/dist/cli/commands/registry/start.js.map +1 -1
  66. package/dist/cli/commands/review/review.js +14 -7
  67. package/dist/cli/commands/review/review.js.map +1 -1
  68. package/dist/cli/commands/review/rules/no-deprecated-content-base.js +1 -3
  69. package/dist/cli/commands/review/rules/no-deprecated-content-base.js.map +1 -1
  70. package/dist/cli/commands/review/rules/no-direct-peer-dependencies.js +1 -3
  71. package/dist/cli/commands/review/rules/no-direct-peer-dependencies.js.map +1 -1
  72. package/dist/cli/commands/review/rules/no-typescript-entry-point.js +1 -3
  73. package/dist/cli/commands/review/rules/no-typescript-entry-point.js.map +1 -1
  74. package/dist/cli/commands/review/rules/prefer-open-ended-peer-dependencies.js +5 -12
  75. package/dist/cli/commands/review/rules/prefer-open-ended-peer-dependencies.js.map +1 -1
  76. package/dist/cli/commands/review/rules/require-compatible-launch-darkly-sdk.js +5 -12
  77. package/dist/cli/commands/review/rules/require-compatible-launch-darkly-sdk.js.map +1 -1
  78. package/dist/cli/commands/review/rules/require-explicit-side-effects.js +1 -3
  79. package/dist/cli/commands/review/rules/require-explicit-side-effects.js.map +1 -1
  80. package/dist/cli/commands/review/rules/require-one-collection-version.js +1 -3
  81. package/dist/cli/commands/review/rules/require-one-collection-version.js.map +1 -1
  82. package/dist/cli/commands/review/rules/require-servicetitan-scope.js +1 -3
  83. package/dist/cli/commands/review/rules/require-servicetitan-scope.js.map +1 -1
  84. package/dist/cli/commands/review/rules/require-tsconfig-references.js +1 -3
  85. package/dist/cli/commands/review/rules/require-tsconfig-references.js.map +1 -1
  86. package/dist/cli/commands/review/utils/compare-version.js +8 -19
  87. package/dist/cli/commands/review/utils/compare-version.js.map +1 -1
  88. package/dist/cli/commands/run-task.d.ts +1 -0
  89. package/dist/cli/commands/run-task.d.ts.map +1 -1
  90. package/dist/cli/commands/run-task.js +20 -6
  91. package/dist/cli/commands/run-task.js.map +1 -1
  92. package/dist/cli/commands/start.d.ts.map +1 -1
  93. package/dist/cli/commands/start.js +28 -13
  94. package/dist/cli/commands/start.js.map +1 -1
  95. package/dist/cli/commands/stylelint.js +13 -4
  96. package/dist/cli/commands/stylelint.js.map +1 -1
  97. package/dist/cli/commands/styles-check.js +13 -4
  98. package/dist/cli/commands/styles-check.js.map +1 -1
  99. package/dist/cli/commands/test/runners/jest.js +1 -3
  100. package/dist/cli/commands/test/runners/jest.js.map +1 -1
  101. package/dist/cli/commands/test/tests.js +13 -4
  102. package/dist/cli/commands/test/tests.js.map +1 -1
  103. package/dist/cli/commands/types.d.ts +1 -6
  104. package/dist/cli/commands/types.d.ts.map +1 -1
  105. package/dist/cli/commands/types.js +2 -20
  106. package/dist/cli/commands/types.js.map +1 -1
  107. package/dist/cli/commands/upload-sourcemaps.js +17 -13
  108. package/dist/cli/commands/upload-sourcemaps.js.map +1 -1
  109. package/dist/cli/index.js +1 -0
  110. package/dist/cli/index.js.map +1 -1
  111. package/dist/cli/tasks/cli-task.d.ts +3 -0
  112. package/dist/cli/tasks/cli-task.d.ts.map +1 -1
  113. package/dist/cli/tasks/cli-task.js +41 -9
  114. package/dist/cli/tasks/cli-task.js.map +1 -1
  115. package/dist/cli/tasks/swc-compile-package/get-swc-options.d.ts +9 -1
  116. package/dist/cli/tasks/swc-compile-package/get-swc-options.d.ts.map +1 -1
  117. package/dist/cli/tasks/swc-compile-package/get-swc-options.js +18 -2
  118. package/dist/cli/tasks/swc-compile-package/get-swc-options.js.map +1 -1
  119. package/dist/cli/tasks/swc-compile-package/swc-compile-package.d.ts +3 -1
  120. package/dist/cli/tasks/swc-compile-package/swc-compile-package.d.ts.map +1 -1
  121. package/dist/cli/tasks/swc-compile-package/swc-compile-package.js +17 -3
  122. package/dist/cli/tasks/swc-compile-package/swc-compile-package.js.map +1 -1
  123. package/dist/cli/tasks/task.d.ts +2 -1
  124. package/dist/cli/tasks/task.d.ts.map +1 -1
  125. package/dist/cli/tasks/task.js +6 -3
  126. package/dist/cli/tasks/task.js.map +1 -1
  127. package/dist/cli/tasks/tsc-compile/tsc-compile.js +1 -3
  128. package/dist/cli/tasks/tsc-compile/tsc-compile.js.map +1 -1
  129. package/dist/cli/utils/cli-npm.d.ts.map +1 -1
  130. package/dist/cli/utils/cli-npm.js +8 -1
  131. package/dist/cli/utils/cli-npm.js.map +1 -1
  132. package/dist/cli/utils/cli-os.d.ts +1 -0
  133. package/dist/cli/utils/cli-os.d.ts.map +1 -1
  134. package/dist/cli/utils/cli-os.js +20 -0
  135. package/dist/cli/utils/cli-os.js.map +1 -1
  136. package/dist/cli/utils/compile.d.ts.map +1 -1
  137. package/dist/cli/utils/compile.js +7 -4
  138. package/dist/cli/utils/compile.js.map +1 -1
  139. package/dist/cli/utils/copy-files.js +1 -0
  140. package/dist/cli/utils/copy-files.js.map +1 -1
  141. package/dist/cli/utils/index.d.ts +1 -1
  142. package/dist/cli/utils/index.d.ts.map +1 -1
  143. package/dist/cli/utils/index.js +1 -1
  144. package/dist/cli/utils/index.js.map +1 -1
  145. package/dist/cli/utils/process-tree.js +2 -6
  146. package/dist/cli/utils/process-tree.js.map +1 -1
  147. package/dist/cli/utils/resolve-bundler.d.ts.map +1 -1
  148. package/dist/cli/utils/resolve-bundler.js +2 -1
  149. package/dist/cli/utils/resolve-bundler.js.map +1 -1
  150. package/dist/cli/utils/ts-config.d.ts +1 -1
  151. package/dist/cli/utils/ts-config.d.ts.map +1 -1
  152. package/dist/cli/utils/ts-config.js +1 -3
  153. package/dist/cli/utils/ts-config.js.map +1 -1
  154. package/dist/cli/utils/with-exponential-backoff.d.ts +7 -0
  155. package/dist/cli/utils/with-exponential-backoff.d.ts.map +1 -0
  156. package/dist/cli/utils/with-exponential-backoff.js +28 -0
  157. package/dist/cli/utils/with-exponential-backoff.js.map +1 -0
  158. package/dist/core/constants.d.ts +2 -0
  159. package/dist/core/constants.d.ts.map +1 -1
  160. package/dist/core/constants.js +6 -1
  161. package/dist/core/constants.js.map +1 -1
  162. package/dist/postinstall.js +118 -0
  163. package/dist/scripts/generate-bin-wrappers.js +203 -0
  164. package/dist/storybook-config/swc.d.ts +6 -0
  165. package/dist/storybook-config/swc.d.ts.map +1 -1
  166. package/dist/storybook-config/webpack-final.d.ts.map +1 -1
  167. package/dist/storybook-config/webpack-final.js +2 -1
  168. package/dist/storybook-config/webpack-final.js.map +1 -1
  169. package/dist/utils/exit-when-parent-exits.d.ts +6 -0
  170. package/dist/utils/exit-when-parent-exits.d.ts.map +1 -0
  171. package/dist/utils/exit-when-parent-exits.js +37 -0
  172. package/dist/utils/exit-when-parent-exits.js.map +1 -0
  173. package/dist/utils/find-up.d.ts +1 -1
  174. package/dist/utils/find-up.d.ts.map +1 -1
  175. package/dist/utils/find-up.js +2 -2
  176. package/dist/utils/find-up.js.map +1 -1
  177. package/dist/utils/get-configuration.d.ts +6 -3
  178. package/dist/utils/get-configuration.d.ts.map +1 -1
  179. package/dist/utils/get-configuration.js +10 -2
  180. package/dist/utils/get-configuration.js.map +1 -1
  181. package/dist/utils/index.d.ts +1 -0
  182. package/dist/utils/index.d.ts.map +1 -1
  183. package/dist/utils/index.js +1 -0
  184. package/dist/utils/index.js.map +1 -1
  185. package/dist/utils/log.js +1 -3
  186. package/dist/utils/log.js.map +1 -1
  187. package/dist/vite/build-shared-dependencies.d.ts.map +1 -1
  188. package/dist/vite/build-shared-dependencies.js +2 -0
  189. package/dist/vite/build-shared-dependencies.js.map +1 -1
  190. package/dist/vite/config/base-config.d.ts.map +1 -1
  191. package/dist/vite/config/base-config.js +12 -1
  192. package/dist/vite/config/base-config.js.map +1 -1
  193. package/dist/vite/config/create-vite-config.js +7 -2
  194. package/dist/vite/config/create-vite-config.js.map +1 -1
  195. package/dist/vite/config/load-config-file.js +8 -19
  196. package/dist/vite/config/load-config-file.js.map +1 -1
  197. package/dist/vite/index.d.ts +2 -0
  198. package/dist/vite/index.d.ts.map +1 -1
  199. package/dist/vite/index.html +2 -2
  200. package/dist/vite/index.js +16 -0
  201. package/dist/vite/index.js.map +1 -1
  202. package/dist/vite/plugins/chain-source-maps-plugin.js +1 -1
  203. package/dist/vite/plugins/chain-source-maps-plugin.js.map +1 -1
  204. package/dist/vite/plugins/clean-plugin.js +1 -1
  205. package/dist/vite/plugins/clean-plugin.js.map +1 -1
  206. package/dist/vite/plugins/css-injector-plugin.js +1 -1
  207. package/dist/vite/plugins/css-injector-plugin.js.map +1 -1
  208. package/dist/vite/plugins/design-system-guard-plugin.d.ts.map +1 -1
  209. package/dist/vite/plugins/design-system-guard-plugin.js +10 -5
  210. package/dist/vite/plugins/design-system-guard-plugin.js.map +1 -1
  211. package/dist/vite/plugins/dev-server-routing-plugin.js +1 -1
  212. package/dist/vite/plugins/dev-server-routing-plugin.js.map +1 -1
  213. package/dist/vite/plugins/externals-plugin.d.ts.map +1 -1
  214. package/dist/vite/plugins/externals-plugin.js +11 -5
  215. package/dist/vite/plugins/externals-plugin.js.map +1 -1
  216. package/dist/vite/plugins/html-plugin.d.ts.map +1 -1
  217. package/dist/vite/plugins/html-plugin.js +5 -3
  218. package/dist/vite/plugins/html-plugin.js.map +1 -1
  219. package/dist/vite/plugins/ignore-modules-plugin.d.ts +2 -2
  220. package/dist/vite/plugins/ignore-modules-plugin.d.ts.map +1 -1
  221. package/dist/vite/plugins/ignore-modules-plugin.js +36 -24
  222. package/dist/vite/plugins/ignore-modules-plugin.js.map +1 -1
  223. package/dist/vite/plugins/index.d.ts +3 -0
  224. package/dist/vite/plugins/index.d.ts.map +1 -1
  225. package/dist/vite/plugins/index.js +3 -0
  226. package/dist/vite/plugins/index.js.map +1 -1
  227. package/dist/vite/plugins/less-tilde-plugin.d.ts +8 -0
  228. package/dist/vite/plugins/less-tilde-plugin.d.ts.map +1 -0
  229. package/dist/vite/plugins/less-tilde-plugin.js +53 -0
  230. package/dist/vite/plugins/less-tilde-plugin.js.map +1 -0
  231. package/dist/vite/plugins/magic-comments-plugin/magic-comments-plugin.js +1 -1
  232. package/dist/vite/plugins/magic-comments-plugin/magic-comments-plugin.js.map +1 -1
  233. package/dist/vite/plugins/metadata-plugin.js +1 -1
  234. package/dist/vite/plugins/metadata-plugin.js.map +1 -1
  235. package/dist/vite/plugins/moment-locales-plugin.d.ts +1 -1
  236. package/dist/vite/plugins/moment-locales-plugin.d.ts.map +1 -1
  237. package/dist/vite/plugins/moment-locales-plugin.js +30 -14
  238. package/dist/vite/plugins/moment-locales-plugin.js.map +1 -1
  239. package/dist/vite/plugins/react-refresh-plugin/index.d.ts +2 -0
  240. package/dist/vite/plugins/react-refresh-plugin/index.d.ts.map +1 -0
  241. package/dist/vite/plugins/react-refresh-plugin/index.js +20 -0
  242. package/dist/vite/plugins/react-refresh-plugin/index.js.map +1 -0
  243. package/dist/vite/plugins/react-refresh-plugin/react-refresh-plugin.d.ts +4 -0
  244. package/dist/vite/plugins/react-refresh-plugin/react-refresh-plugin.d.ts.map +1 -0
  245. package/dist/vite/plugins/react-refresh-plugin/react-refresh-plugin.js +143 -0
  246. package/dist/vite/plugins/react-refresh-plugin/react-refresh-plugin.js.map +1 -0
  247. package/dist/vite/plugins/react-refresh-plugin/refresh-runtime.js +113 -0
  248. package/dist/vite/plugins/shared-dependencies-plugin/shared-dependencies-plugin.d.ts.map +1 -1
  249. package/dist/vite/plugins/shared-dependencies-plugin/shared-dependencies-plugin.js +14 -11
  250. package/dist/vite/plugins/shared-dependencies-plugin/shared-dependencies-plugin.js.map +1 -1
  251. package/dist/vite/plugins/style-urls-plugin.js +1 -1
  252. package/dist/vite/plugins/style-urls-plugin.js.map +1 -1
  253. package/dist/vite/plugins/virtual-modules-plugin.d.ts.map +1 -1
  254. package/dist/vite/plugins/virtual-modules-plugin.js +9 -6
  255. package/dist/vite/plugins/virtual-modules-plugin.js.map +1 -1
  256. package/dist/vite/plugins/window-externals-plugin.d.ts +22 -0
  257. package/dist/vite/plugins/window-externals-plugin.d.ts.map +1 -0
  258. package/dist/vite/plugins/window-externals-plugin.js +74 -0
  259. package/dist/vite/plugins/window-externals-plugin.js.map +1 -0
  260. package/dist/webpack/bundle-webpack.d.ts.map +1 -1
  261. package/dist/webpack/bundle-webpack.js +6 -1
  262. package/dist/webpack/bundle-webpack.js.map +1 -1
  263. package/dist/webpack/configs/optimization-config.js +4 -4
  264. package/dist/webpack/configs/optimization-config.js.map +1 -1
  265. package/dist/webpack/configs/output-config.js +1 -1
  266. package/dist/webpack/configs/output-config.js.map +1 -1
  267. package/dist/webpack/configs/plugins/ignore-plugin/ignore-plugin.js +1 -3
  268. package/dist/webpack/configs/plugins/ignore-plugin/ignore-plugin.js.map +1 -1
  269. package/dist/webpack/loaders/expose-loader/__tests__/__mocks__/configuration.expose-loader.js +13 -0
  270. package/dist/webpack/loaders/expose-loader/__tests__/__mocks__/index.js +1 -0
  271. package/dist/webpack/utils/index.d.ts +1 -0
  272. package/dist/webpack/utils/index.d.ts.map +1 -1
  273. package/dist/webpack/utils/index.js +1 -0
  274. package/dist/webpack/utils/index.js.map +1 -1
  275. package/dist/webpack/utils/normalize-proxy-config.d.ts +6 -0
  276. package/dist/webpack/utils/normalize-proxy-config.d.ts.map +1 -0
  277. package/dist/webpack/utils/normalize-proxy-config.js +52 -0
  278. package/dist/webpack/utils/normalize-proxy-config.js.map +1 -0
  279. package/package.json +24 -21
  280. package/src/cli/commands/__tests__/build.test.ts +33 -19
  281. package/src/cli/commands/__tests__/bundle-package.test.ts +65 -0
  282. package/src/cli/commands/__tests__/command.test.ts +42 -0
  283. package/src/cli/commands/__tests__/mfe-check.test.ts +26 -5
  284. package/src/cli/commands/__tests__/run-task.test.ts +20 -1
  285. package/src/cli/commands/__tests__/start.test.ts +35 -15
  286. package/src/cli/commands/build.ts +6 -5
  287. package/src/cli/commands/bundle-package.ts +20 -0
  288. package/src/cli/commands/command.ts +14 -0
  289. package/src/cli/commands/mfe-check.ts +6 -10
  290. package/src/cli/commands/registry/build.ts +3 -2
  291. package/src/cli/commands/registry/bundle-package.ts +22 -0
  292. package/src/cli/commands/registry/command-registry.ts +2 -0
  293. package/src/cli/commands/registry/start.ts +3 -2
  294. package/src/cli/commands/run-task.ts +8 -2
  295. package/src/cli/commands/start.ts +9 -5
  296. package/src/cli/commands/types.ts +2 -6
  297. package/src/cli/index.ts +3 -0
  298. package/src/cli/tasks/__tests__/cli-task.test.ts +181 -69
  299. package/src/cli/tasks/__tests__/task.test.ts +40 -45
  300. package/src/cli/tasks/cli-task.ts +43 -2
  301. package/src/cli/tasks/swc-compile-package/__tests__/get-swc-options.test.ts +46 -4
  302. package/src/cli/tasks/swc-compile-package/__tests__/swc-compile-package.test.ts +25 -4
  303. package/src/cli/tasks/swc-compile-package/get-swc-options.ts +14 -1
  304. package/src/cli/tasks/swc-compile-package/swc-compile-package.ts +6 -2
  305. package/src/cli/tasks/task.ts +8 -2
  306. package/src/cli/tasks/tsc-compile/__tests__/tsc-compile.test.ts +8 -32
  307. package/src/cli/tasks/tsc-compile-package/__tests__/tsc-compile-package.test.ts +10 -19
  308. package/src/cli/utils/__tests__/cli-npm.test.ts +33 -0
  309. package/src/cli/utils/__tests__/cli-os.test.ts +86 -3
  310. package/src/cli/utils/__tests__/compile.test.ts +37 -2
  311. package/src/cli/utils/__tests__/copy-files.test.ts +1 -1
  312. package/src/cli/utils/__tests__/with-exponential-backoff.test.ts +119 -0
  313. package/src/cli/utils/cli-npm.ts +19 -4
  314. package/src/cli/utils/cli-os.ts +14 -0
  315. package/src/cli/utils/compile.ts +8 -1
  316. package/src/cli/utils/copy-files.ts +1 -1
  317. package/src/cli/utils/index.ts +1 -1
  318. package/src/cli/utils/resolve-bundler.ts +2 -1
  319. package/src/cli/utils/ts-config.ts +1 -1
  320. package/src/cli/utils/with-exponential-backoff.ts +28 -0
  321. package/src/core/constants.ts +2 -0
  322. package/src/storybook-config/__tests__/vite-final.test.ts +6 -0
  323. package/src/storybook-config/__tests__/webpack-final.test.ts +26 -12
  324. package/src/storybook-config/webpack-final.ts +10 -4
  325. package/src/utils/__tests__/exit-when-parent-exits.test.ts +87 -0
  326. package/src/utils/__tests__/find-up.test.ts +49 -0
  327. package/src/utils/__tests__/get-configuration.test.ts +62 -0
  328. package/src/utils/exit-when-parent-exits.ts +33 -0
  329. package/src/utils/find-up.ts +2 -2
  330. package/src/utils/get-configuration.ts +14 -5
  331. package/src/utils/index.ts +1 -0
  332. package/src/vite/__tests__/build-shared-dependencies.test.ts +39 -5
  333. package/src/vite/build-shared-dependencies.ts +2 -1
  334. package/src/vite/config/__tests__/base-config.test.ts +12 -4
  335. package/src/vite/config/__tests__/create-css-config.test.ts +2 -6
  336. package/src/vite/config/__tests__/create-vite-config.test.ts +6 -3
  337. package/src/vite/config/base-config.ts +13 -1
  338. package/src/vite/config/create-vite-config.ts +6 -3
  339. package/src/vite/index.html +2 -2
  340. package/src/vite/index.ts +2 -0
  341. package/src/vite/plugins/__tests__/chain-source-maps-plugin.test.ts +1 -1
  342. package/src/vite/plugins/__tests__/clean-plugin.test.ts +1 -1
  343. package/src/vite/plugins/__tests__/css-injector-plugin.test.ts +1 -1
  344. package/src/vite/plugins/__tests__/design-system-guard-plugin.test.ts +15 -3
  345. package/src/vite/plugins/__tests__/dev-server-routing-plugin.test.ts +1 -1
  346. package/src/vite/plugins/__tests__/externals-plugin.test.ts +24 -3
  347. package/src/vite/plugins/__tests__/html-plugin.test.ts +10 -3
  348. package/src/vite/plugins/__tests__/html-template.test.ts +10 -2
  349. package/src/vite/plugins/__tests__/ignore-modules-plugin.test.ts +30 -6
  350. package/src/vite/plugins/__tests__/less-tilde-plugin.test.ts +91 -0
  351. package/src/vite/plugins/__tests__/metadata-plugin.test.ts +1 -1
  352. package/src/vite/plugins/__tests__/moment-locales-plugin.test.ts +35 -25
  353. package/src/vite/plugins/__tests__/style-urls-plugin.test.ts +1 -1
  354. package/src/vite/plugins/__tests__/virtual-modules-plugin.test.ts +20 -9
  355. package/src/vite/plugins/__tests__/window-externals-plugin.test.ts +128 -0
  356. package/src/vite/plugins/chain-source-maps-plugin.ts +1 -1
  357. package/src/vite/plugins/clean-plugin.ts +1 -1
  358. package/src/vite/plugins/css-injector-plugin.ts +1 -1
  359. package/src/vite/plugins/design-system-guard-plugin.ts +11 -8
  360. package/src/vite/plugins/dev-server-routing-plugin.ts +1 -1
  361. package/src/vite/plugins/externals-plugin.ts +15 -6
  362. package/src/vite/plugins/html-plugin.ts +4 -2
  363. package/src/vite/plugins/ignore-modules-plugin.ts +32 -23
  364. package/src/vite/plugins/index.ts +3 -0
  365. package/src/vite/plugins/less-tilde-plugin.ts +64 -0
  366. package/src/vite/plugins/magic-comments-plugin/magic-comments-plugin.ts +1 -1
  367. package/src/vite/plugins/metadata-plugin.ts +1 -1
  368. package/src/vite/plugins/moment-locales-plugin.ts +24 -14
  369. package/src/vite/plugins/react-refresh-plugin/README.md +165 -0
  370. package/src/vite/plugins/react-refresh-plugin/__tests__/react-refresh-plugin.test.ts +366 -0
  371. package/src/vite/plugins/react-refresh-plugin/__tests__/refresh-runtime.test.ts +193 -0
  372. package/src/vite/plugins/react-refresh-plugin/index.ts +1 -0
  373. package/src/vite/plugins/react-refresh-plugin/react-refresh-plugin.ts +144 -0
  374. package/src/vite/plugins/react-refresh-plugin/refresh-runtime.js +113 -0
  375. package/src/vite/plugins/shared-dependencies-plugin/__tests__/shared-dependencies-plugin.test.ts +21 -16
  376. package/src/vite/plugins/shared-dependencies-plugin/shared-dependencies-plugin.ts +13 -12
  377. package/src/vite/plugins/style-urls-plugin.ts +1 -1
  378. package/src/vite/plugins/virtual-modules-plugin.ts +8 -7
  379. package/src/vite/plugins/window-externals-plugin.ts +94 -0
  380. package/src/webpack/__tests__/bundle-webpack.test.ts +32 -0
  381. package/src/webpack/__tests__/create-webpack-config-web-component.test.ts +17 -5
  382. package/src/webpack/__tests__/create-webpack-config.test.ts +10 -6
  383. package/src/webpack/bundle-webpack.ts +7 -1
  384. package/src/webpack/configs/optimization-config.ts +3 -3
  385. package/src/webpack/configs/output-config.ts +1 -1
  386. package/src/webpack/utils/__tests__/normalize-proxy-config.test.ts +121 -0
  387. package/src/webpack/utils/index.ts +1 -0
  388. package/src/webpack/utils/normalize-proxy-config.ts +59 -0
  389. package/tsconfig/types.d.ts +10 -0
  390. package/dist/cli/utils/get-bundle-command.d.ts +0 -3
  391. package/dist/cli/utils/get-bundle-command.d.ts.map +0 -1
  392. package/dist/cli/utils/get-bundle-command.js +0 -16
  393. package/dist/cli/utils/get-bundle-command.js.map +0 -1
  394. package/src/cli/utils/__tests__/get-bundle-command.test.ts +0 -23
  395. package/src/cli/utils/get-bundle-command.ts +0 -5
@@ -0,0 +1,203 @@
1
+ #!/usr/bin/env node
2
+ /* eslint-disable no-console */
3
+
4
+ /**
5
+ * Generates bin wrapper scripts for all CLI tools exposed by startup's dependencies.
6
+ *
7
+ * pnpm uses strict node_modules isolation - only direct dependencies' bins are linked
8
+ * into a consumer's node_modules/.bin/. Since startup acts as a toolbox package, it
9
+ * needs to re-export its dependencies' bins so consumers get them automatically.
10
+ *
11
+ * Under npm these wrappers are harmless but redundant - npm links the original
12
+ * package's bins directly. Under pnpm, startup's wrappers are the only ones
13
+ * visible to consumers.
14
+ *
15
+ * This script:
16
+ * 1. Reads startup's dependencies from package.json
17
+ * 2. Resolves each dependency's `bin` entries
18
+ * 3. Generates thin wrapper scripts in bin/ (using shared bin/_run.js helper)
19
+ * 4. Removes obsolete wrappers from previous runs
20
+ * 5. Updates the `bin` field in startup's package.json
21
+ *
22
+ * Run: npm run prepare -w packages/startup
23
+ */
24
+
25
+ const fs = require('fs');
26
+ const path = require('path');
27
+
28
+ const GENERATED_MARKER = 'Auto-generated by scripts/generate-bin-wrappers.js';
29
+
30
+ // Packages whose bins should not be exposed to consumers
31
+ const SKIP_PACKAGES = new Set([
32
+ '@servicetitan/install', // consumers use @servicetitan/install directly
33
+ ]);
34
+
35
+ // Bins from transitive dependencies that startup needs to expose to consumers
36
+ const EXTRA_BINS = [
37
+ {
38
+ name: 'kendo-ui-license',
39
+ from: '@progress/kendo-licensing',
40
+ binPath: 'bin/kendo-ui-license.js',
41
+ },
42
+ { name: 'nx', from: 'nx', binPath: 'bin/nx.js' },
43
+ ];
44
+
45
+ /*
46
+ * Collect bin entries from each dependency's package.json. Skips packages in
47
+ * SKIP_PACKAGES, normalizes string-form bin fields to { name: path } objects,
48
+ * and appends EXTRA_BINS for transitive dependencies that need explicit exposure.
49
+ */
50
+ function discoverBins(startupDirectory, dependencies) {
51
+ const bins = [];
52
+
53
+ for (const packageName of dependencies) {
54
+ if (SKIP_PACKAGES.has(packageName)) {
55
+ continue;
56
+ }
57
+ let packageJson;
58
+ try {
59
+ const packageJsonPath = require.resolve(packageName + '/package.json', {
60
+ paths: [startupDirectory],
61
+ });
62
+ packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
63
+ } catch {
64
+ // Some packages block ./package.json in exports - read directly from node_modules
65
+ try {
66
+ const packageJsonPath = resolveNodeModulesPackageJson(
67
+ packageName,
68
+ startupDirectory
69
+ );
70
+ packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
71
+ } catch {
72
+ continue;
73
+ }
74
+ }
75
+
76
+ if (!packageJson.bin) {
77
+ continue;
78
+ }
79
+
80
+ /*
81
+ * When bin is a string the command name defaults to the package name.
82
+ * Strip the @scope/ prefix for scoped packages, matching npm's behavior.
83
+ */
84
+ const entries =
85
+ typeof packageJson.bin === 'string'
86
+ ? { [packageJson.name.replace(/^@.*\//, '')]: packageJson.bin }
87
+ : packageJson.bin;
88
+
89
+ for (const [name, binPath] of Object.entries(entries)) {
90
+ bins.push({ name, from: packageName, binPath });
91
+ }
92
+ }
93
+
94
+ bins.push(...EXTRA_BINS);
95
+ bins.sort((a, b) => a.name.localeCompare(b.name));
96
+ return bins;
97
+ }
98
+
99
+ /*
100
+ * Delete previously generated wrappers that no longer correspond to a
101
+ * dependency. Identifies generated files by the presence of GENERATED_MARKER
102
+ * and removes any that aren't in the current bin list.
103
+ */
104
+ function removeObsoleteWrappers(binDirectory, bins) {
105
+ const generatedNames = new Set(bins.map(bin => `${bin.name}.js`));
106
+ const removed = [];
107
+ for (const file of fs.readdirSync(binDirectory)) {
108
+ const filePath = path.join(binDirectory, file);
109
+ try {
110
+ const content = fs.readFileSync(filePath, 'utf8');
111
+ if (content.includes(GENERATED_MARKER) && !generatedNames.has(file)) {
112
+ fs.rmSync(filePath);
113
+ removed.push(file);
114
+ }
115
+ } catch {
116
+ continue;
117
+ }
118
+ }
119
+ return removed;
120
+ }
121
+
122
+ /*
123
+ * Write a thin wrapper script for each bin entry. Each wrapper delegates to
124
+ * bin/_run.js which locates and executes the real binary. Skips files whose
125
+ * content is already up to date. Returns the bin entries for package.json
126
+ * and the list of wrappers that were added or updated.
127
+ */
128
+ function generateWrappers(binDirectory, bins) {
129
+ const binEntries = {
130
+ startup: './bin/index.js',
131
+ };
132
+ const added = [];
133
+
134
+ for (const { name, from, binPath } of bins) {
135
+ const wrapperPath = path.join(binDirectory, `${name}.js`);
136
+ const wrapper = `#!/usr/bin/env node\n// ${GENERATED_MARKER} - wraps: ${from} -> ${binPath}\nrequire('./_run')('${from}', '${binPath}');\n`;
137
+ const existing = fs.existsSync(wrapperPath) && fs.readFileSync(wrapperPath, 'utf8');
138
+ const normalized = existing && existing.replace(/\r\n/g, '\n');
139
+ if (normalized !== wrapper) {
140
+ fs.writeFileSync(wrapperPath, wrapper);
141
+ fs.chmodSync(wrapperPath, 0o755);
142
+ added.push(name);
143
+ }
144
+ binEntries[name] = `./bin/${name}.js`;
145
+ }
146
+
147
+ return { binEntries, added };
148
+ }
149
+
150
+ /**
151
+ * Walk up node_modules directories to find a dependency's package.json,
152
+ * handling both hoisted and nested layouts.
153
+ */
154
+ function resolveNodeModulesPackageJson(packageName, fromDirectory) {
155
+ let directory = fromDirectory;
156
+ while (directory !== path.dirname(directory)) {
157
+ const candidate = path.join(directory, 'node_modules', packageName, 'package.json');
158
+ if (fs.existsSync(candidate)) {
159
+ return candidate;
160
+ }
161
+ directory = path.dirname(directory);
162
+ }
163
+ throw new Error(`Cannot find package.json for ${packageName}`);
164
+ }
165
+
166
+ function main() {
167
+ const startupDirectory = path.resolve(__dirname, '..', '..');
168
+ const packageJsonPath = path.join(startupDirectory, 'package.json');
169
+ const binDirectory = path.join(startupDirectory, 'bin');
170
+
171
+ console.log('Generating bin wrappers...');
172
+
173
+ const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
174
+ const dependencies = Object.keys(packageJson.dependencies ?? {});
175
+
176
+ const bins = discoverBins(startupDirectory, dependencies);
177
+ const removed = removeObsoleteWrappers(binDirectory, bins);
178
+ const { binEntries, added } = generateWrappers(binDirectory, bins);
179
+
180
+ if (JSON.stringify(packageJson.bin) !== JSON.stringify(binEntries)) {
181
+ packageJson.bin = binEntries;
182
+ fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 4) + '\n');
183
+ }
184
+
185
+ for (const name of added) {
186
+ console.log(` added: ${name}`);
187
+ }
188
+ for (const file of removed) {
189
+ console.log(` removed: ${file}`);
190
+ }
191
+ const upToDate = bins.length - added.length;
192
+ console.log(
193
+ ` ${added.length} added/updated, ${removed.length} removed, ${upToDate} up to date`
194
+ );
195
+ }
196
+
197
+ // Only run when executed directly (e.g., `node generate-bin-wrappers.js`), not when imported (e.g., in tests).
198
+ /* istanbul ignore next */
199
+ if (require.main === module) {
200
+ main();
201
+ }
202
+
203
+ module.exports = { main };
@@ -7,11 +7,17 @@ export declare function swc(config: SwcOptions): {
7
7
  decorators: true;
8
8
  };
9
9
  target: import("@swc/types").JscTarget | undefined;
10
+ baseUrl: string | undefined;
11
+ paths: {
12
+ [from: string]: string[];
13
+ } | undefined;
10
14
  transform: {
11
15
  legacyDecorator: boolean | undefined;
12
16
  decoratorMetadata: boolean | undefined;
13
17
  react: {
14
18
  runtime: "automatic";
19
+ refresh: boolean;
20
+ development: boolean;
15
21
  };
16
22
  };
17
23
  };
@@ -1 +1 @@
1
- {"version":3,"file":"swc.d.ts","sourceRoot":"","sources":["../../src/storybook-config/swc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAM3C,wBAAgB,GAAG,CAAC,MAAM,EAAE,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;EAiBrC"}
1
+ {"version":3,"file":"swc.d.ts","sourceRoot":"","sources":["../../src/storybook-config/swc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAM3C,wBAAgB,GAAG,CAAC,MAAM,EAAE,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBrC"}
@@ -1 +1 @@
1
- {"version":3,"file":"webpack-final.d.ts","sourceRoot":"","sources":["../../src/storybook-config/webpack-final.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAI7C,OAAO,EAAE,SAAS,EAAuB,MAAM,kBAAkB,CAAC;AAElE,wBAAgB,YAAY,CAAC,MAAM,EAAE,aAAa,EAAE,SAAS,GAAE,SAAc,GAAG,aAAa,CAgB5F"}
1
+ {"version":3,"file":"webpack-final.d.ts","sourceRoot":"","sources":["../../src/storybook-config/webpack-final.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAQ7C,OAAO,EAAE,SAAS,EAAuB,MAAM,kBAAkB,CAAC;AAElE,wBAAgB,YAAY,CAAC,MAAM,EAAE,aAAa,EAAE,SAAS,GAAE,SAAc,GAAG,aAAa,CAgB5F"}
@@ -65,7 +65,8 @@ function getContext(config) {
65
65
  function getPlugins(context, overrides) {
66
66
  return [
67
67
  (0, _plugins.miniCssExtractPlugin)(context, overrides),
68
- (0, _plugins.ignorePlugin)(context, {})
68
+ (0, _plugins.ignorePlugin)(context, {}),
69
+ (0, _plugins.filterWarningsPlugin)(context, {})
69
70
  ].filter((plugin)=>!!plugin);
70
71
  }
71
72
  function getRules(context, overrides) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/storybook-config/webpack-final.ts"],"sourcesContent":["import { getPackageManager } from '@servicetitan/install';\nimport { inspect } from 'node:util';\nimport type { Configuration } from 'webpack';\nimport { log } from '../utils';\nimport { rulesConfig } from '../webpack/configs';\nimport { ignorePlugin, miniCssExtractPlugin } from '../webpack/configs/plugins';\nimport { Overrides, WebpackBuildContext } from '../webpack/types';\n\nexport function webpackFinal(config: Configuration, overrides: Overrides = {}): Configuration {\n const context = getContext(config);\n const rules = getRules(context, overrides);\n const plugins = getPlugins(context, overrides);\n\n /* istanbul ignore next: debug only */\n log.debug('storybook-config:webpack-final', () => inspect({ rules, plugins }, { depth: null }));\n\n return {\n ...config,\n module: {\n ...config.module,\n rules: [...transformDefaultRules(config.module?.rules), ...rules],\n },\n plugins: [...(config.plugins ?? []), ...plugins],\n };\n}\n\nfunction getContext(config: Configuration): WebpackBuildContext {\n return {\n package: {\n name: '',\n version: '',\n destination: '',\n source: '',\n dependencies: {},\n sharedDependencies: {},\n isWebComponent: false,\n isLegacyRoot: false,\n isExposeSharedDependencies: false,\n packageManager: getPackageManager(),\n },\n build: {\n name: '',\n isProduction: config.mode === 'production',\n },\n options: {},\n bundlerConfig: {},\n };\n}\n\nfunction getPlugins(context: WebpackBuildContext, overrides: Overrides) {\n return [miniCssExtractPlugin(context, overrides), ignorePlugin(context, {})].filter(\n plugin => !!plugin\n );\n}\n\nfunction getRules(context: WebpackBuildContext, overrides: Overrides) {\n const include = ['.module.css', '.module.less', '.less', '.module.scss', '.scss', '.svg'];\n const exclude = ['.css'];\n\n const { rules } = rulesConfig(context, overrides);\n\n return rules.filter(\n ({ test }) =>\n !(test instanceof RegExp) ||\n include.some(ext => test.exec(ext) && !exclude.some(ext => test.exec(ext)))\n );\n}\n\nfunction transformDefaultRules(rules: NonNullable<Configuration['module']>['rules'] = []) {\n const result = rules.map(rule => {\n if (rule && typeof rule === 'object' && rule.test instanceof RegExp) {\n if (rule.test.test('.css')) {\n return { ...rule, exclude: /\\.module.css$/ };\n }\n if (rule.test.test('.svg')) {\n return { ...rule, exclude: /\\.svg$/i };\n }\n }\n return rule;\n });\n\n /* istanbul ignore next: debug only */\n log.debug('storybook-config:transform-default-rules', () =>\n inspect({ result }, { depth: null })\n );\n\n return result;\n}\n"],"names":["webpackFinal","config","overrides","context","getContext","rules","getRules","plugins","getPlugins","log","debug","inspect","depth","module","transformDefaultRules","package","name","version","destination","source","dependencies","sharedDependencies","isWebComponent","isLegacyRoot","isExposeSharedDependencies","packageManager","getPackageManager","build","isProduction","mode","options","bundlerConfig","miniCssExtractPlugin","ignorePlugin","filter","plugin","include","exclude","rulesConfig","test","RegExp","some","ext","exec","result","map","rule"],"mappings":";;;;+BAQgBA;;;eAAAA;;;yBARkB;0BACV;uBAEJ;yBACQ;yBACuB;AAG5C,SAASA,aAAaC,MAAqB,EAAEC,YAAuB,CAAC,CAAC;QAcvDD;QAFuBA;IAXzC,MAAME,UAAUC,WAAWH;IAC3B,MAAMI,QAAQC,SAASH,SAASD;IAChC,MAAMK,UAAUC,WAAWL,SAASD;IAEpC,oCAAoC,GACpCO,UAAG,CAACC,KAAK,CAAC,kCAAkC,IAAMC,IAAAA,iBAAO,EAAC;YAAEN;YAAOE;QAAQ,GAAG;YAAEK,OAAO;QAAK;IAE5F,OAAO;QACH,GAAGX,MAAM;QACTY,QAAQ;YACJ,GAAGZ,OAAOY,MAAM;YAChBR,OAAO;mBAAIS,uBAAsBb,iBAAAA,OAAOY,MAAM,cAAbZ,qCAAAA,eAAeI,KAAK;mBAAMA;aAAM;QACrE;QACAE,SAAS;gBAAKN,kBAAAA,OAAOM,OAAO,cAAdN,6BAAAA,kBAAkB,EAAE;eAAMM;SAAQ;IACpD;AACJ;AAEA,SAASH,WAAWH,MAAqB;IACrC,OAAO;QACHc,SAAS;YACLC,MAAM;YACNC,SAAS;YACTC,aAAa;YACbC,QAAQ;YACRC,cAAc,CAAC;YACfC,oBAAoB,CAAC;YACrBC,gBAAgB;YAChBC,cAAc;YACdC,4BAA4B;YAC5BC,gBAAgBC,IAAAA,0BAAiB;QACrC;QACAC,OAAO;YACHX,MAAM;YACNY,cAAc3B,OAAO4B,IAAI,KAAK;QAClC;QACAC,SAAS,CAAC;QACVC,eAAe,CAAC;IACpB;AACJ;AAEA,SAASvB,WAAWL,OAA4B,EAAED,SAAoB;IAClE,OAAO;QAAC8B,IAAAA,6BAAoB,EAAC7B,SAASD;QAAY+B,IAAAA,qBAAY,EAAC9B,SAAS,CAAC;KAAG,CAAC+B,MAAM,CAC/EC,CAAAA,SAAU,CAAC,CAACA;AAEpB;AAEA,SAAS7B,SAASH,OAA4B,EAAED,SAAoB;IAChE,MAAMkC,UAAU;QAAC;QAAe;QAAgB;QAAS;QAAgB;QAAS;KAAO;IACzF,MAAMC,UAAU;QAAC;KAAO;IAExB,MAAM,EAAEhC,KAAK,EAAE,GAAGiC,IAAAA,oBAAW,EAACnC,SAASD;IAEvC,OAAOG,MAAM6B,MAAM,CACf,CAAC,EAAEK,IAAI,EAAE,GACL,CAAEA,CAAAA,gBAAgBC,MAAK,KACvBJ,QAAQK,IAAI,CAACC,CAAAA,MAAOH,KAAKI,IAAI,CAACD,QAAQ,CAACL,QAAQI,IAAI,CAACC,CAAAA,MAAOH,KAAKI,IAAI,CAACD;AAEjF;AAEA,SAAS5B,sBAAsBT,QAAuD,EAAE;IACpF,MAAMuC,SAASvC,MAAMwC,GAAG,CAACC,CAAAA;QACrB,IAAIA,QAAQ,OAAOA,SAAS,YAAYA,KAAKP,IAAI,YAAYC,QAAQ;YACjE,IAAIM,KAAKP,IAAI,CAACA,IAAI,CAAC,SAAS;gBACxB,OAAO;oBAAE,GAAGO,IAAI;oBAAET,SAAS;gBAAgB;YAC/C;YACA,IAAIS,KAAKP,IAAI,CAACA,IAAI,CAAC,SAAS;gBACxB,OAAO;oBAAE,GAAGO,IAAI;oBAAET,SAAS;gBAAU;YACzC;QACJ;QACA,OAAOS;IACX;IAEA,oCAAoC,GACpCrC,UAAG,CAACC,KAAK,CAAC,4CAA4C,IAClDC,IAAAA,iBAAO,EAAC;YAAEiC;QAAO,GAAG;YAAEhC,OAAO;QAAK;IAGtC,OAAOgC;AACX"}
1
+ {"version":3,"sources":["../../src/storybook-config/webpack-final.ts"],"sourcesContent":["import { getPackageManager } from '@servicetitan/install';\nimport { inspect } from 'node:util';\nimport type { Configuration } from 'webpack';\nimport { log } from '../utils';\nimport { rulesConfig } from '../webpack/configs';\nimport {\n filterWarningsPlugin,\n ignorePlugin,\n miniCssExtractPlugin,\n} from '../webpack/configs/plugins';\nimport { Overrides, WebpackBuildContext } from '../webpack/types';\n\nexport function webpackFinal(config: Configuration, overrides: Overrides = {}): Configuration {\n const context = getContext(config);\n const rules = getRules(context, overrides);\n const plugins = getPlugins(context, overrides);\n\n /* istanbul ignore next: debug only */\n log.debug('storybook-config:webpack-final', () => inspect({ rules, plugins }, { depth: null }));\n\n return {\n ...config,\n module: {\n ...config.module,\n rules: [...transformDefaultRules(config.module?.rules), ...rules],\n },\n plugins: [...(config.plugins ?? []), ...plugins],\n };\n}\n\nfunction getContext(config: Configuration): WebpackBuildContext {\n return {\n package: {\n name: '',\n version: '',\n destination: '',\n source: '',\n dependencies: {},\n sharedDependencies: {},\n isWebComponent: false,\n isLegacyRoot: false,\n isExposeSharedDependencies: false,\n packageManager: getPackageManager(),\n },\n build: {\n name: '',\n isProduction: config.mode === 'production',\n },\n options: {},\n bundlerConfig: {},\n };\n}\n\nfunction getPlugins(context: WebpackBuildContext, overrides: Overrides) {\n return [\n miniCssExtractPlugin(context, overrides),\n ignorePlugin(context, {}),\n filterWarningsPlugin(context, {}),\n ].filter(plugin => !!plugin);\n}\n\nfunction getRules(context: WebpackBuildContext, overrides: Overrides) {\n const include = ['.module.css', '.module.less', '.less', '.module.scss', '.scss', '.svg'];\n const exclude = ['.css'];\n\n const { rules } = rulesConfig(context, overrides);\n\n return rules.filter(\n ({ test }) =>\n !(test instanceof RegExp) ||\n include.some(ext => test.exec(ext) && !exclude.some(ext => test.exec(ext)))\n );\n}\n\nfunction transformDefaultRules(rules: NonNullable<Configuration['module']>['rules'] = []) {\n const result = rules.map(rule => {\n if (rule && typeof rule === 'object' && rule.test instanceof RegExp) {\n if (rule.test.test('.css')) {\n return { ...rule, exclude: /\\.module.css$/ };\n }\n if (rule.test.test('.svg')) {\n return { ...rule, exclude: /\\.svg$/i };\n }\n }\n return rule;\n });\n\n /* istanbul ignore next: debug only */\n log.debug('storybook-config:transform-default-rules', () =>\n inspect({ result }, { depth: null })\n );\n\n return result;\n}\n"],"names":["webpackFinal","config","overrides","context","getContext","rules","getRules","plugins","getPlugins","log","debug","inspect","depth","module","transformDefaultRules","package","name","version","destination","source","dependencies","sharedDependencies","isWebComponent","isLegacyRoot","isExposeSharedDependencies","packageManager","getPackageManager","build","isProduction","mode","options","bundlerConfig","miniCssExtractPlugin","ignorePlugin","filterWarningsPlugin","filter","plugin","include","exclude","rulesConfig","test","RegExp","some","ext","exec","result","map","rule"],"mappings":";;;;+BAYgBA;;;eAAAA;;;yBAZkB;0BACV;uBAEJ;yBACQ;yBAKrB;AAGA,SAASA,aAAaC,MAAqB,EAAEC,YAAuB,CAAC,CAAC;QAcvDD;QAFuBA;IAXzC,MAAME,UAAUC,WAAWH;IAC3B,MAAMI,QAAQC,SAASH,SAASD;IAChC,MAAMK,UAAUC,WAAWL,SAASD;IAEpC,oCAAoC,GACpCO,UAAG,CAACC,KAAK,CAAC,kCAAkC,IAAMC,IAAAA,iBAAO,EAAC;YAAEN;YAAOE;QAAQ,GAAG;YAAEK,OAAO;QAAK;IAE5F,OAAO;QACH,GAAGX,MAAM;QACTY,QAAQ;YACJ,GAAGZ,OAAOY,MAAM;YAChBR,OAAO;mBAAIS,uBAAsBb,iBAAAA,OAAOY,MAAM,cAAbZ,qCAAAA,eAAeI,KAAK;mBAAMA;aAAM;QACrE;QACAE,SAAS;gBAAKN,kBAAAA,OAAOM,OAAO,cAAdN,6BAAAA,kBAAkB,EAAE;eAAMM;SAAQ;IACpD;AACJ;AAEA,SAASH,WAAWH,MAAqB;IACrC,OAAO;QACHc,SAAS;YACLC,MAAM;YACNC,SAAS;YACTC,aAAa;YACbC,QAAQ;YACRC,cAAc,CAAC;YACfC,oBAAoB,CAAC;YACrBC,gBAAgB;YAChBC,cAAc;YACdC,4BAA4B;YAC5BC,gBAAgBC,IAAAA,0BAAiB;Q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AC,4CAA4C,IAClDC,IAAAA,iBAAO,EAAC;YAAEkC;QAAO,GAAG;YAAEjC,OAAO;QAAK;IAGtC,OAAOiC;AACX"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Exits current process when the parent identified by process.env.STARTUP_PARENT_PID
3
+ * is no longer running. Use `callback` to override default behavior.
4
+ */
5
+ export declare function exitWhenParentExits(command: string, callback?: () => void): void;
6
+ //# sourceMappingURL=exit-when-parent-exits.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exit-when-parent-exits.d.ts","sourceRoot":"","sources":["../../src/utils/exit-when-parent-exits.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAM,IAA4B,QAchG"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "exitWhenParentExits", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return exitWhenParentExits;
9
+ }
10
+ });
11
+ const _log = require("./log");
12
+ const POLL_INTERVAL_MS = 1000;
13
+ function exitWhenParentExits(command, callback = ()=>process.exit(0)) {
14
+ const parentPid = Number(process.env.STARTUP_PARENT_PID);
15
+ if (!parentPid) {
16
+ return;
17
+ }
18
+ const interval = setInterval(()=>{
19
+ if (!isRunning(parentPid)) {
20
+ clearInterval(interval);
21
+ _log.log.info(`${command} shutting down`);
22
+ callback();
23
+ }
24
+ }, POLL_INTERVAL_MS);
25
+ interval.unref();
26
+ }
27
+ function isRunning(pid) {
28
+ try {
29
+ // signal 0 sends nothing; it only checks whether the pid exists
30
+ process.kill(pid, 0);
31
+ return true;
32
+ } catch (unused) {
33
+ return false;
34
+ }
35
+ }
36
+
37
+ //# sourceMappingURL=exit-when-parent-exits.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/utils/exit-when-parent-exits.ts"],"sourcesContent":["import { log } from './log';\n\nconst POLL_INTERVAL_MS = 1000;\n\n/**\n * Exits current process when the parent identified by process.env.STARTUP_PARENT_PID\n * is no longer running. Use `callback` to override default behavior.\n */\nexport function exitWhenParentExits(command: string, callback: () => void = () => process.exit(0)) {\n const parentPid = Number(process.env.STARTUP_PARENT_PID);\n if (!parentPid) {\n return;\n }\n\n const interval = setInterval(() => {\n if (!isRunning(parentPid)) {\n clearInterval(interval);\n log.info(`${command} shutting down`);\n callback();\n }\n }, POLL_INTERVAL_MS);\n interval.unref();\n}\n\nfunction isRunning(pid: number) {\n try {\n // signal 0 sends nothing; it only checks whether the pid exists\n process.kill(pid, 0);\n return true;\n } catch {\n return false;\n }\n}\n"],"names":["exitWhenParentExits","POLL_INTERVAL_MS","command","callback","process","exit","parentPid","Number","env","STARTUP_PARENT_PID","interval","setInterval","isRunning","clearInterval","log","info","unref","pid","kill"],"mappings":";;;;+BAQgBA;;;eAAAA;;;qBARI;AAEpB,MAAMC,mBAAmB;AAMlB,SAASD,oBAAoBE,OAAe,EAAEC,WAAuB,IAAMC,QAAQC,IAAI,CAAC,EAAE;IAC7F,MAAMC,YAAYC,OAAOH,QAAQI,GAAG,CAACC,kBAAkB;IACvD,IAAI,CAACH,WAAW;QACZ;IACJ;IAEA,MAAMI,WAAWC,YAAY;QACzB,IAAI,CAACC,UAAUN,YAAY;YACvBO,cAAcH;YACdI,QAAG,CAACC,IAAI,CAAC,GAAGb,QAAQ,cAAc,CAAC;YACnCC;QACJ;IACJ,GAAGF;IACHS,SAASM,KAAK;AAClB;AAEA,SAASJ,UAAUK,GAAW;IAC1B,IAAI;QACA,gEAAgE;QAChEb,QAAQc,IAAI,CAACD,KAAK;QAClB,OAAO;IACX,EAAE,eAAM;QACJ,OAAO;IACX;AACJ"}
@@ -1,2 +1,2 @@
1
- export declare function findUp<T>(callback: (directory: string) => T | undefined): NonNullable<T> | undefined;
1
+ export declare function findUp<T>(callback: (directory: string) => T | undefined, from?: string): NonNullable<T> | undefined;
2
2
  //# sourceMappingURL=find-up.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"find-up.d.ts","sourceRoot":"","sources":["../../src/utils/find-up.ts"],"names":[],"mappings":"AAEA,wBAAgB,MAAM,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,CAAC,GAAG,SAAS,8BASvE"}
1
+ {"version":3,"file":"find-up.d.ts","sourceRoot":"","sources":["../../src/utils/find-up.ts"],"names":[],"mappings":"AAEA,wBAAgB,MAAM,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,CAAC,GAAG,SAAS,EAAE,IAAI,SAAO,8BASpF"}
@@ -14,8 +14,8 @@ function _interop_require_default(obj) {
14
14
  default: obj
15
15
  };
16
16
  }
17
- function findUp(callback) {
18
- let directory = _nodepath.default.resolve('./');
17
+ function findUp(callback, from = './') {
18
+ let directory = _nodepath.default.resolve(from);
19
19
  do {
20
20
  const result = callback(directory);
21
21
  if (result) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/find-up.ts"],"sourcesContent":["import path from 'node:path';\n\nexport function findUp<T>(callback: (directory: string) => T | undefined) {\n let directory = path.resolve('./');\n do {\n const result = callback(directory);\n if (result) {\n return result;\n }\n directory = path.resolve(path.join(directory, '../'));\n } while (path.parse(directory).name);\n}\n"],"names":["findUp","callback","directory","path","resolve","result","join","parse","name"],"mappings":";;;;+BAEgBA;;;eAAAA;;;iEAFC;;;;;;AAEV,SAASA,OAAUC,QAA8C;IACpE,IAAIC,YAAYC,iBAAI,CAACC,OAAO,CAAC;IAC7B,GAAG;QACC,MAAMC,SAASJ,SAASC;QACxB,IAAIG,QAAQ;YACR,OAAOA;QACX;QACAH,YAAYC,iBAAI,CAACC,OAAO,CAACD,iBAAI,CAACG,IAAI,CAACJ,WAAW;IAClD,QAASC,iBAAI,CAACI,KAAK,CAACL,WAAWM,IAAI,CAAE;AACzC"}
1
+ {"version":3,"sources":["../../src/utils/find-up.ts"],"sourcesContent":["import path from 'node:path';\n\nexport function findUp<T>(callback: (directory: string) => T | undefined, from = './') {\n let directory = path.resolve(from);\n do {\n const result = callback(directory);\n if (result) {\n return result;\n }\n directory = path.resolve(path.join(directory, '../'));\n } while (path.parse(directory).name);\n}\n"],"names":["findUp","callback","from","directory","path","resolve","result","join","parse","name"],"mappings":";;;;+BAEgBA;;;eAAAA;;;iEAFC;;;;;;AAEV,SAASA,OAAUC,QAA8C,EAAEC,OAAO,IAAI;IACjF,IAAIC,YAAYC,iBAAI,CAACC,OAAO,CAACH;IAC7B,GAAG;QACC,MAAMI,SAASL,SAASE;QACxB,IAAIG,QAAQ;YACR,OAAOA;QACX;QACAH,YAAYC,iBAAI,CAACC,OAAO,CAACD,iBAAI,CAACG,IAAI,CAACJ,WAAW;IAClD,QAASC,iBAAI,CAACI,KAAK,CAACL,WAAWM,IAAI,CAAE;AACzC"}
@@ -6,10 +6,11 @@ import type svgr from 'vite-plugin-svgr';
6
6
  import type { ViteUserConfig } from 'vitest/config';
7
7
  import type { Configuration as WebpackDevServerConfiguration } from 'webpack-dev-server';
8
8
  import type { ReviewConfiguration } from '../cli/commands/review';
9
+ import { bundleConstants } from '../core/constants';
9
10
  import { LocationOrJson } from './types';
10
11
  type VitePluginSvgrOptions = NonNullable<Parameters<typeof svgr>[0]>;
11
12
  type ElementType<T> = T extends readonly (infer ElementType)[] ? ElementType : never;
12
- export type Bundler = 'vite' | 'webpack';
13
+ export type Bundler = ElementType<typeof bundleConstants.bundlers>;
13
14
  export declare const allowedWebpackDevServerOptions: readonly ["headers", "port", "proxy", "static"];
14
15
  export interface MinifyJSOptions {
15
16
  compress?: boolean;
@@ -46,6 +47,7 @@ export interface NodeConfiguration {
46
47
  }
47
48
  export declare enum CommandName {
48
49
  'build' = "build",
50
+ 'bundle-package' = "bundle-package",
49
51
  'bundle-vite' = "bundle-vite",
50
52
  'bundle-webpack' = "bundle-webpack",
51
53
  'clean' = "clean",
@@ -111,7 +113,7 @@ interface WebComponentOptions {
111
113
  */
112
114
  branches?: Record<string, WebComponentBranchConfigs>;
113
115
  }
114
- type Configuration = {
116
+ export type Configuration = {
115
117
  'bundler'?: Bundler;
116
118
  'jest'?: JestConfiguration;
117
119
  'legacy'?: boolean;
@@ -152,7 +154,8 @@ export declare function getSwcCompilePackageConfiguration(): import("@swc/cli").
152
154
  export declare function isBundle(locationOrJson?: LocationOrJson): boolean;
153
155
  export declare function isDevServerDisabled(): boolean;
154
156
  export declare function isViteDevServerDisabled(): boolean;
155
- export declare function isExposeSharedDependencies(): boolean;
157
+ export declare function getSharedDependencies(locationOrJson?: LocationOrJson): Record<string, string> | undefined;
158
+ export declare function isExposeSharedDependencies(locationOrJson?: LocationOrJson): boolean;
156
159
  export declare function isLegacy(locationOrJson?: LocationOrJson): boolean;
157
160
  export declare function isLegacyRoot(): boolean;
158
161
  export declare function isStyleCheckDisabled(): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"get-configuration.d.ts","sourceRoot":"","sources":["../../src/utils/get-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGrC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,KAAK,IAAI,MAAM,kBAAkB,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,IAAI,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AACzF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAKlE,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,KAAK,qBAAqB,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,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
+ get getSharedDependencies () {
37
+ return getSharedDependencies;
38
+ },
36
39
  get getStylelintConfiguration () {
37
40
  return getStylelintConfiguration;
38
41
  },
@@ -101,6 +104,7 @@ const allowedWebpackDevServerOptions = [
101
104
  ];
102
105
  var CommandName = /*#__PURE__*/ function(CommandName) {
103
106
  CommandName["build"] = "build";
107
+ CommandName["bundle-package"] = "bundle-package";
104
108
  CommandName["bundle-vite"] = "bundle-vite";
105
109
  CommandName["bundle-webpack"] = "bundle-webpack";
106
110
  CommandName["clean"] = "clean";
@@ -220,9 +224,13 @@ function isDevServerDisabled() {
220
224
  function isViteDevServerDisabled() {
221
225
  return getViteConfiguration().devServer === false;
222
226
  }
223
- function isExposeSharedDependencies() {
227
+ function getSharedDependencies(locationOrJson) {
228
+ var _getConfiguration_shareddependencies;
229
+ return (_getConfiguration_shareddependencies = getConfiguration(locationOrJson)['shared-dependencies']) !== null && _getConfiguration_shareddependencies !== void 0 ? _getConfiguration_shareddependencies : getWebpackConfiguration(locationOrJson)['shared-dependencies'];
230
+ }
231
+ function isExposeSharedDependencies(locationOrJson) {
224
232
  var _getConfiguration_exposeshareddependencies;
225
- return ((_getConfiguration_exposeshareddependencies = getConfiguration()['expose-shared-dependencies']) !== null && _getConfiguration_exposeshareddependencies !== void 0 ? _getConfiguration_exposeshareddependencies : getWebpackConfiguration()['expose-shared-dependencies']) === true;
233
+ return ((_getConfiguration_exposeshareddependencies = getConfiguration(locationOrJson)['expose-shared-dependencies']) !== null && _getConfiguration_exposeshareddependencies !== void 0 ? _getConfiguration_exposeshareddependencies : getWebpackConfiguration(locationOrJson)['expose-shared-dependencies']) === true;
226
234
  }
227
235
  function isLegacy(locationOrJson) {
228
236
  return getConfiguration(locationOrJson).legacy === true;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/get-configuration.ts"],"sourcesContent":["import type { Config } from '@jest/types';\nimport type { swcDir } from '@swc/cli';\nimport type { ESLint } from 'eslint';\nimport fs from 'fs';\nimport path from 'path';\nimport type { LinterOptions } from 'stylelint';\nimport type svgr from 'vite-plugin-svgr';\nimport type { ViteUserConfig } from 'vitest/config';\nimport type { Configuration as WebpackDevServerConfiguration } from 'webpack-dev-server';\nimport type { ReviewConfiguration } from '../cli/commands/review';\nimport { getFolders } from './get-folders';\nimport { getPackageName } from './get-package-name';\nimport { log } from './log';\nimport { readJson, readJsonSafe } from './read-json';\nimport { LocationOrJson } from './types';\n\ntype VitePluginSvgrOptions = NonNullable<Parameters<typeof svgr>[0]>;\n\ntype ElementType<T> = T extends readonly (infer ElementType)[] ? ElementType : never;\n\nexport type Bundler = 'vite' | 'webpack';\n\nexport const allowedWebpackDevServerOptions = ['headers', 'port', 'proxy', 'static'] as const;\n\nexport interface MinifyJSOptions {\n compress?: boolean;\n mangle?: boolean;\n}\n\nexport interface MinifyCssOptions {}\n\nexport interface MinifyOptions {\n css?: boolean | MinifyCssOptions;\n js?: boolean | MinifyJSOptions;\n}\n\nexport interface WebpackConfiguration extends Omit<\n Pick<WebpackDevServerConfiguration, ElementType<typeof allowedWebpackDevServerOptions>>,\n 'proxy'\n> {\n 'contentBase'?: boolean | string | string[] | number; // deprecated 2024-07\n 'custom-style-rules'?: boolean;\n 'expose-shared-dependencies'?: boolean;\n 'devServer'?: false | WebpackDevServerConfiguration;\n 'disable-style-check'?: boolean;\n 'minify'?: MinifyOptions;\n 'proxy'?: WebpackDevServerConfiguration['proxy'] | string;\n 'shared-dependencies'?: Record<string, string>;\n}\n\nexport interface ESLintConfiguration extends ESLint.Options {\n disabled?: boolean;\n}\n\nexport interface StylelintConfiguration extends Partial<LinterOptions> {\n ignorePattern?: string[];\n disabled?: boolean;\n}\n\nexport interface JestConfiguration extends Omit<Config.Argv, '_' | '$0'> {\n omitDefault?: string[];\n}\n\nexport interface NodeConfiguration {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n NODE_OPTIONS?: string[];\n}\n\n/* eslint-disable @typescript-eslint/naming-convention */\nexport enum CommandName {\n 'build' = 'build',\n 'bundle-vite' = 'bundle-vite',\n 'bundle-webpack' = 'bundle-webpack',\n 'clean' = 'clean',\n 'convert-eslint-config' = 'convert-eslint-config',\n 'eslint' = 'eslint',\n 'init' = 'init',\n 'install' = 'install',\n 'kendo-ui-license' = 'kendo-ui-license',\n 'lint' = 'lint',\n 'mfe-check' = 'mfe-check',\n 'mfe-generate-metadata' = 'mfe-generate-metadata',\n 'mfe-list' = 'mfe-list',\n 'mfe-package-clean' = 'mfe-package-clean',\n 'mfe-package-publish' = 'mfe-package-publish',\n 'mfe-package-rollback' = 'mfe-package-rollback',\n 'mfe-publish' = 'mfe-publish',\n 'mfe-purge-cache' = 'mfe-purge-cache',\n 'prepare-package' = 'prepare-package',\n 'review' = 'review',\n 'start' = 'start',\n 'stylelint' = 'stylelint',\n 'styles-check' = 'styles-check',\n 'test' = 'test',\n 'task' = 'task',\n 'upload-sourcemaps' = 'upload-sourcemaps',\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\nexport type VitestConfiguration = ViteUserConfig['test'] & {\n omitDefault?: string[];\n};\n\nexport interface HtmlPluginOptions {\n title?: string;\n favicon?: string;\n template?: string;\n}\n\nexport interface SvgrPluginOptions {\n include?: VitePluginSvgrOptions['include'];\n exclude?: VitePluginSvgrOptions['exclude'];\n svgrOptions?: VitePluginSvgrOptions['svgrOptions'];\n}\n\nexport interface PluginOverrides {\n html?: HtmlPluginOptions;\n svgr?: SvgrPluginOptions;\n}\n\nexport interface ViteBundlerConfig {\n port?: number;\n omitDefault?: string[];\n minify?: MinifyOptions;\n pluginOverrides?: PluginOverrides;\n}\n\nexport interface VitePackageJsonOverride extends ViteBundlerConfig {\n config?: Omit<import('vite').UserConfig, 'plugins'>;\n devServer?: false;\n}\n\nexport interface WebComponentBranchConfigs {\n publishTag?: string;\n uploadSourcemaps?: boolean;\n}\n\ninterface WebComponentOptions {\n legacyRoot?: boolean;\n /**\n * mapping of git branches to configs.\n * Used to separate configs (ex publish tag) depending on current branch\n */\n branches?: Record<string, WebComponentBranchConfigs>;\n}\n\ntype Configuration = {\n 'bundler'?: Bundler;\n 'jest'?: JestConfiguration;\n 'legacy'?: boolean;\n 'lint'?: { eslint: ESLintConfiguration; stylelint: StylelintConfiguration };\n 'review'?: ReviewConfiguration;\n 'swc-compile-package'?: Parameters<typeof swcDir>[0];\n 'test'?: JestConfiguration; // for backward-compatibility\n 'testRunner'?: string;\n 'expose-process-env'?: string[];\n 'expose-shared-dependencies'?: boolean;\n 'shared-dependencies'?: Record<string, string>;\n 'vite'?: false | VitePackageJsonOverride;\n 'vitest'?: VitestConfiguration;\n 'web-component'?: boolean | string | WebComponentOptions;\n 'webpack'?: false | WebpackConfiguration;\n} & {\n [key in CommandName]?: NodeConfiguration;\n} & NodeConfiguration;\n\nexport function getConfiguration(locationOrJson: LocationOrJson = './'): Configuration {\n const json =\n typeof locationOrJson === 'string'\n ? readJson(path.join(locationOrJson, 'package.json'))\n : locationOrJson;\n return json?.cli ?? {};\n}\n\nexport function getConfigurationSafe(locationOrJson: LocationOrJson = './'): Configuration {\n const json =\n typeof locationOrJson === 'string'\n ? readJsonSafe(path.join(locationOrJson, 'package.json'))\n : locationOrJson;\n return json?.cli ?? {};\n}\n\nexport function getESLintConfiguration() {\n return getConfiguration().lint?.eslint ?? {};\n}\n\nexport function getJestConfiguration() {\n const configuration = getConfiguration();\n return configuration.jest ?? configuration.test ?? {};\n}\n\nexport function getReviewConfiguration() {\n return getConfiguration().review ?? {};\n}\n\nexport function getStylelintConfiguration() {\n return getConfiguration().lint?.stylelint ?? {};\n}\n\nexport function getExposeProcessEnv(): string[] {\n return getConfiguration()['expose-process-env'] ?? [];\n}\n\nexport function getViteConfiguration(): VitePackageJsonOverride {\n const { vite } = getConfiguration();\n return typeof vite === 'object' ? vite : {};\n}\n\nexport function getVitestConfiguration() {\n return getConfiguration().vitest ?? {};\n}\n\nexport function getWebpackConfiguration(locationOrJson?: LocationOrJson) {\n const { webpack } = getConfiguration(locationOrJson);\n return typeof webpack === 'object' ? webpack : {};\n}\n\nexport function getWebComponentConfiguration(\n locationOrJson: LocationOrJson = './'\n): WebComponentOptions | undefined {\n const config = getConfigurationSafe(locationOrJson)['web-component'];\n\n if (config === true) {\n return {};\n }\n\n if (typeof config === 'object') {\n return config;\n }\n\n if (typeof config === 'string') {\n const configPath = path.resolve(\n typeof locationOrJson === 'string' ? path.join(locationOrJson, config) : config\n );\n if (fs.existsSync(configPath)) {\n return require(path.resolve(configPath));\n }\n log.warning(`could not find web-component configuration: \"${config}\"`);\n\n return undefined;\n }\n}\n\nexport function getWebComponentBranchConfigs(locationOrJson: LocationOrJson = './') {\n const config = getWebComponentConfiguration(locationOrJson);\n\n return config?.branches;\n}\n\nexport function hasHeadlessBundle() {\n let source: string;\n try {\n source = getFolders().source;\n } catch {\n return false;\n }\n const headlessPath = path.join(source, 'headless.ts');\n return fs.existsSync(headlessPath);\n}\n\nexport function getSwcCompilePackageConfiguration() {\n return getConfiguration()['swc-compile-package'] ?? {};\n}\n\nexport function isBundle(locationOrJson?: LocationOrJson) {\n const { webpack, vite } = getConfiguration(locationOrJson);\n assertBundlersAgree(webpack, vite, locationOrJson);\n return webpack !== false && vite !== false;\n}\n\nexport function isDevServerDisabled() {\n const webpackConfiguration = getWebpackConfiguration();\n return webpackConfiguration.devServer === false;\n}\n\nexport function isViteDevServerDisabled() {\n return getViteConfiguration().devServer === false;\n}\n\nexport function isExposeSharedDependencies() {\n return (\n (getConfiguration()['expose-shared-dependencies'] ??\n getWebpackConfiguration()['expose-shared-dependencies']) === true\n );\n}\n\nexport function isLegacy(locationOrJson?: LocationOrJson) {\n return getConfiguration(locationOrJson).legacy === true;\n}\n\nexport function isLegacyRoot() {\n return getWebComponentConfiguration()?.legacyRoot === true;\n}\n\nexport function isStyleCheckDisabled() {\n return getWebpackConfiguration()['disable-style-check'] === true;\n}\n\nexport function isWebComponent(locationOrJson: LocationOrJson = './') {\n return !!getWebComponentConfiguration(locationOrJson);\n}\n\n/*\n * Require that Vite and Webpack configurations agree whether package is a bundle.\n */\nfunction assertBundlersAgree(\n webpack: Configuration['webpack'],\n vite: Configuration['vite'],\n locationOrJson?: LocationOrJson\n) {\n if (webpack === undefined || vite === undefined || !!webpack === !!vite) {\n return;\n }\n\n const mismatch =\n webpack === false\n ? { falsy: 'cli.webpack', truthy: 'cli.vite' }\n : { falsy: 'cli.vite', truthy: 'cli.webpack' };\n\n throw new Error(\n `package ${getPackageName(locationOrJson)} has conflicting webpack ` +\n `and vite configurations: ${mismatch.falsy} is false but ` +\n `${mismatch.truthy} is not`\n );\n}\n"],"names":["CommandName","allowedWebpackDevServerOptions","getConfiguration","getConfigurationSafe","getESLintConfiguration","getExposeProcessEnv","getJestConfiguration","getReviewConfiguration","getStylelintConfiguration","getSwcCompilePackageConfiguration","getViteConfiguration","getVitestConfiguration","getWebComponentBranchConfigs","getWebComponentConfiguration","getWebpackConfiguration","hasHeadlessBundle","isBundle","isDevServerDisabled","isExposeSharedDependencies","isLegacy","isLegacyRoot","isStyleCheckDisabled","isViteDevServerDisabled","isWebComponent","locationOrJson","json","readJson","path","join","cli","readJsonSafe","lint","eslint","configuration","jest","test","review","stylelint","vite","vitest","webpack","config","configPath","resolve","fs","existsSync","require","log","warning","undefined","branches","source","getFolders","headlessPath","assertBundlersAgree","webpackConfiguration","devServer","legacy","legacyRoot","mismatch","falsy","truthy","Error","getPackageName"],"mappings":";;;;;;;;;;;QAqEYA;eAAAA;;QA/CCC;eAAAA;;QAgJGC;eAAAA;;QAQAC;eAAAA;;QAQAC;eAAAA;;QAiBAC;eAAAA;;QAbAC;eAAAA;;QAKAC;eAAAA;;QAIAC;eAAAA;;QAiEAC;eAAAA;;QAzDAC;eAAAA;;QAKAC;eAAAA;;QAmCAC;eAAAA;;QA1BAC;eAAAA;;QALAC;eAAAA;;QAqCAC;eAAAA;;QAeAC;eAAAA;;QAMAC;eAAAA;;QASAC;eAAAA;;QAOAC;eAAAA;;QAIAC;eAAAA;;QAIAC;eAAAA;;QAnBAC;eAAAA;;QAuBA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,CAAC;AAEvC"}
1
+ {"version":3,"sources":["../../src/utils/get-configuration.ts"],"sourcesContent":["import type { Config } from '@jest/types';\nimport type { swcDir } from '@swc/cli';\nimport type { ESLint } from 'eslint';\nimport fs from 'fs';\nimport path from 'path';\nimport type { LinterOptions } from 'stylelint';\nimport type svgr from 'vite-plugin-svgr';\nimport type { ViteUserConfig } from 'vitest/config';\nimport type { Configuration as WebpackDevServerConfiguration } from 'webpack-dev-server';\nimport type { ReviewConfiguration } from '../cli/commands/review';\nimport { bundleConstants } from '../core/constants';\nimport { getFolders } from './get-folders';\nimport { getPackageName } from './get-package-name';\nimport { log } from './log';\nimport { readJson, readJsonSafe } from './read-json';\nimport { LocationOrJson } from './types';\n\ntype VitePluginSvgrOptions = NonNullable<Parameters<typeof svgr>[0]>;\n\ntype ElementType<T> = T extends readonly (infer ElementType)[] ? ElementType : never;\n\nexport type Bundler = ElementType<typeof bundleConstants.bundlers>;\n\nexport const allowedWebpackDevServerOptions = ['headers', 'port', 'proxy', 'static'] as const;\n\nexport interface MinifyJSOptions {\n compress?: boolean;\n mangle?: boolean;\n}\n\nexport interface MinifyCssOptions {}\n\nexport interface MinifyOptions {\n css?: boolean | MinifyCssOptions;\n js?: boolean | MinifyJSOptions;\n}\n\nexport interface WebpackConfiguration extends Omit<\n Pick<WebpackDevServerConfiguration, ElementType<typeof allowedWebpackDevServerOptions>>,\n 'proxy'\n> {\n 'contentBase'?: boolean | string | string[] | number; // deprecated 2024-07\n 'custom-style-rules'?: boolean;\n 'expose-shared-dependencies'?: boolean;\n 'devServer'?: false | WebpackDevServerConfiguration;\n 'disable-style-check'?: boolean;\n 'minify'?: MinifyOptions;\n 'proxy'?: WebpackDevServerConfiguration['proxy'] | string;\n 'shared-dependencies'?: Record<string, string>;\n}\n\nexport interface ESLintConfiguration extends ESLint.Options {\n disabled?: boolean;\n}\n\nexport interface StylelintConfiguration extends Partial<LinterOptions> {\n ignorePattern?: string[];\n disabled?: boolean;\n}\n\nexport interface JestConfiguration extends Omit<Config.Argv, '_' | '$0'> {\n omitDefault?: string[];\n}\n\nexport interface NodeConfiguration {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n NODE_OPTIONS?: string[];\n}\n\n/* eslint-disable @typescript-eslint/naming-convention */\nexport enum CommandName {\n 'build' = 'build',\n 'bundle-package' = 'bundle-package',\n 'bundle-vite' = 'bundle-vite',\n 'bundle-webpack' = 'bundle-webpack',\n 'clean' = 'clean',\n 'convert-eslint-config' = 'convert-eslint-config',\n 'eslint' = 'eslint',\n 'init' = 'init',\n 'install' = 'install',\n 'kendo-ui-license' = 'kendo-ui-license',\n 'lint' = 'lint',\n 'mfe-check' = 'mfe-check',\n 'mfe-generate-metadata' = 'mfe-generate-metadata',\n 'mfe-list' = 'mfe-list',\n 'mfe-package-clean' = 'mfe-package-clean',\n 'mfe-package-publish' = 'mfe-package-publish',\n 'mfe-package-rollback' = 'mfe-package-rollback',\n 'mfe-publish' = 'mfe-publish',\n 'mfe-purge-cache' = 'mfe-purge-cache',\n 'prepare-package' = 'prepare-package',\n 'review' = 'review',\n 'start' = 'start',\n 'stylelint' = 'stylelint',\n 'styles-check' = 'styles-check',\n 'test' = 'test',\n 'task' = 'task',\n 'upload-sourcemaps' = 'upload-sourcemaps',\n}\n/* eslint-enable @typescript-eslint/naming-convention */\n\nexport type VitestConfiguration = ViteUserConfig['test'] & {\n omitDefault?: string[];\n};\n\nexport interface HtmlPluginOptions {\n title?: string;\n favicon?: string;\n template?: string;\n}\n\nexport interface SvgrPluginOptions {\n include?: VitePluginSvgrOptions['include'];\n exclude?: VitePluginSvgrOptions['exclude'];\n svgrOptions?: VitePluginSvgrOptions['svgrOptions'];\n}\n\nexport interface PluginOverrides {\n html?: HtmlPluginOptions;\n svgr?: SvgrPluginOptions;\n}\n\nexport interface ViteBundlerConfig {\n port?: number;\n omitDefault?: string[];\n minify?: MinifyOptions;\n pluginOverrides?: PluginOverrides;\n}\n\nexport interface VitePackageJsonOverride extends ViteBundlerConfig {\n config?: Omit<import('vite').UserConfig, 'plugins'>;\n devServer?: false;\n}\n\nexport interface WebComponentBranchConfigs {\n publishTag?: string;\n uploadSourcemaps?: boolean;\n}\n\ninterface WebComponentOptions {\n legacyRoot?: boolean;\n /**\n * mapping of git branches to configs.\n * Used to separate configs (ex publish tag) depending on current branch\n */\n branches?: Record<string, WebComponentBranchConfigs>;\n}\n\nexport type Configuration = {\n 'bundler'?: Bundler;\n 'jest'?: JestConfiguration;\n 'legacy'?: boolean;\n 'lint'?: { eslint: ESLintConfiguration; stylelint: StylelintConfiguration };\n 'review'?: ReviewConfiguration;\n 'swc-compile-package'?: Parameters<typeof swcDir>[0];\n 'test'?: JestConfiguration; // for backward-compatibility\n 'testRunner'?: string;\n 'expose-process-env'?: string[];\n 'expose-shared-dependencies'?: boolean;\n 'shared-dependencies'?: Record<string, string>;\n 'vite'?: false | VitePackageJsonOverride;\n 'vitest'?: VitestConfiguration;\n 'web-component'?: boolean | string | WebComponentOptions;\n 'webpack'?: false | WebpackConfiguration;\n} & {\n [key in CommandName]?: NodeConfiguration;\n} & NodeConfiguration;\n\nexport function getConfiguration(locationOrJson: LocationOrJson = './'): Configuration {\n const json =\n typeof locationOrJson === 'string'\n ? readJson(path.join(locationOrJson, 'package.json'))\n : locationOrJson;\n return json?.cli ?? {};\n}\n\nexport function getConfigurationSafe(locationOrJson: LocationOrJson = './'): Configuration {\n const json =\n typeof locationOrJson === 'string'\n ? readJsonSafe(path.join(locationOrJson, 'package.json'))\n : locationOrJson;\n return json?.cli ?? {};\n}\n\nexport function getESLintConfiguration() {\n return getConfiguration().lint?.eslint ?? {};\n}\n\nexport function getJestConfiguration() {\n const configuration = getConfiguration();\n return configuration.jest ?? configuration.test ?? {};\n}\n\nexport function getReviewConfiguration() {\n return getConfiguration().review ?? {};\n}\n\nexport function getStylelintConfiguration() {\n return getConfiguration().lint?.stylelint ?? {};\n}\n\nexport function getExposeProcessEnv(): string[] {\n return getConfiguration()['expose-process-env'] ?? [];\n}\n\nexport function getViteConfiguration(): VitePackageJsonOverride {\n const { vite } = getConfiguration();\n return typeof vite === 'object' ? vite : {};\n}\n\nexport function getVitestConfiguration() {\n return getConfiguration().vitest ?? {};\n}\n\nexport function getWebpackConfiguration(locationOrJson?: LocationOrJson) {\n const { webpack } = getConfiguration(locationOrJson);\n return typeof webpack === 'object' ? webpack : {};\n}\n\nexport function getWebComponentConfiguration(\n locationOrJson: LocationOrJson = './'\n): WebComponentOptions | undefined {\n const config = getConfigurationSafe(locationOrJson)['web-component'];\n\n if (config === true) {\n return {};\n }\n\n if (typeof config === 'object') {\n return config;\n }\n\n if (typeof config === 'string') {\n const configPath = path.resolve(\n typeof locationOrJson === 'string' ? path.join(locationOrJson, config) : config\n );\n if (fs.existsSync(configPath)) {\n return require(path.resolve(configPath));\n }\n log.warning(`could not find web-component configuration: \"${config}\"`);\n\n return undefined;\n }\n}\n\nexport function getWebComponentBranchConfigs(locationOrJson: LocationOrJson = './') {\n const config = getWebComponentConfiguration(locationOrJson);\n\n return config?.branches;\n}\n\nexport function hasHeadlessBundle() {\n let source: string;\n try {\n source = getFolders().source;\n } catch {\n return false;\n }\n const headlessPath = path.join(source, 'headless.ts');\n return fs.existsSync(headlessPath);\n}\n\nexport function getSwcCompilePackageConfiguration() {\n return getConfiguration()['swc-compile-package'] ?? {};\n}\n\nexport function isBundle(locationOrJson?: LocationOrJson) {\n const { webpack, vite } = getConfiguration(locationOrJson);\n assertBundlersAgree(webpack, vite, locationOrJson);\n return webpack !== false && vite !== false;\n}\n\nexport function isDevServerDisabled() {\n const webpackConfiguration = getWebpackConfiguration();\n return webpackConfiguration.devServer === false;\n}\n\nexport function isViteDevServerDisabled() {\n return getViteConfiguration().devServer === false;\n}\n\nexport function getSharedDependencies(locationOrJson?: LocationOrJson) {\n return (\n getConfiguration(locationOrJson)['shared-dependencies'] ??\n getWebpackConfiguration(locationOrJson)['shared-dependencies']\n );\n}\n\nexport function isExposeSharedDependencies(locationOrJson?: LocationOrJson) {\n return (\n (getConfiguration(locationOrJson)['expose-shared-dependencies'] ??\n getWebpackConfiguration(locationOrJson)['expose-shared-dependencies']) === true\n );\n}\n\nexport function isLegacy(locationOrJson?: LocationOrJson) {\n return getConfiguration(locationOrJson).legacy === true;\n}\n\nexport function isLegacyRoot() {\n return getWebComponentConfiguration()?.legacyRoot === true;\n}\n\nexport function isStyleCheckDisabled() {\n return getWebpackConfiguration()['disable-style-check'] === true;\n}\n\nexport function isWebComponent(locationOrJson: LocationOrJson = './') {\n return !!getWebComponentConfiguration(locationOrJson);\n}\n\n/*\n * Require that Vite and Webpack configurations agree whether package is a bundle.\n */\nfunction assertBundlersAgree(\n webpack: Configuration['webpack'],\n vite: Configuration['vite'],\n locationOrJson?: LocationOrJson\n) {\n if (webpack === undefined || vite === undefined || !!webpack === !!vite) {\n return;\n }\n\n const mismatch =\n webpack === false\n ? { falsy: 'cli.webpack', truthy: 'cli.vite' }\n : { falsy: 'cli.vite', truthy: 'cli.webpack' };\n\n throw new Error(\n `package ${getPackageName(locationOrJson)} has conflicting webpack ` +\n `and vite configurations: ${mismatch.falsy} is false but ` +\n `${mismatch.truthy} is not`\n );\n}\n"],"names":["CommandName","allowedWebpackDevServerOptions","getConfiguration","getConfigurationSafe","getESLintConfiguration","getExposeProcessEnv","getJestConfiguration","getReviewConfiguration","getSharedDependencies","getStylelintConfiguration","getSwcCompilePackageConfiguration","getViteConfiguration","getVitestConfiguration","getWebComponentBranchConfigs","getWebComponentConfiguration","getWebpackConfiguration","hasHeadlessBundle","isBundle","isDevServerDisabled","isExposeSharedDependencies","isLegacy","isLegacyRoot","isStyleCheckDisabled","isViteDevServerDisabled","isWebComponent","locationOrJson","json","readJson","path","join","cli","readJsonSafe","lint","eslint","configuration","jest","test","review","stylelint","vite","vitest","webpack","config","configPath","resolve","fs","existsSync","require","log","warning","undefined","branches","source","getFolders","headlessPath","assertBundlersAgree","webpackConfiguration","devServer","legacy","legacyRoot","mismatch","falsy","truthy","Error","getPackageName"],"mappings":";;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C1D;AAEO,SAASrC;IACZ,OAAOP,yBAAyB,CAAC,sBAAsB,KAAK;AAChE;AAEO,SAASS,eAAeC,iBAAiC,IAAI;IAChE,OAAO,CAAC,CAACX,6BAA6BW;AAC1C;AAEA;;CAEC,GACD,SAAS8B,oBACLd,OAAiC,EACjCF,IAA2B,EAC3Bd,cAA+B;IAE/B,IAAIgB,YAAYS,aAAaX,SAASW,aAAa,CAAC,CAACT,YAAY,CAAC,CAACF,MAAM;QACrE;IACJ;IAEA,MAAMqB,WACFnB,YAAY,QACN;QAAEoB,OAAO;QAAeC,QAAQ;IAAW,IAC3C;QAAED,OAAO;QAAYC,QAAQ;IAAc;IAErD,MAAM,IAAIC,MACN,CAAC,QAAQ,EAAEC,IAAAA,8BAAc,EAACvC,gBAAgB,yBAAyB,CAAC,GAChE,CAAC,yBAAyB,EAAEmC,SAASC,KAAK,CAAC,cAAc,CAAC,GAC1D,GAAGD,SAASE,MAAM,CAAC,OAAO,CAAC;AAEvC"}
@@ -1,3 +1,4 @@
1
+ export * from './exit-when-parent-exits';
1
2
  export * from './find-packages';
2
3
  export * from './find-up';
3
4
  export * from './format-duration';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,mBAAmB,SAAS,CAAC;AAC7B,cAAc,gCAAgC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,mBAAmB,SAAS,CAAC;AAC7B,cAAc,gCAAgC,CAAC"}
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
+ _export_star(require("./exit-when-parent-exits"), exports);
5
6
  _export_star(require("./find-packages"), exports);
6
7
  _export_star(require("./find-up"), exports);
7
8
  _export_star(require("./format-duration"), exports);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/index.ts"],"sourcesContent":["export * from './find-packages';\nexport * from './find-up';\nexport * from './format-duration';\nexport * from './format-relative-date';\nexport * from './get-base-tsconfig';\nexport * from './get-branch-configs';\nexport * from './get-configuration';\nexport * from './get-default-test-excludes';\nexport * from './get-destination-folders';\nexport * from './get-folders';\nexport * from './get-jest-config';\nexport * from './get-package-data';\nexport * from './get-package-name';\nexport * from './get-packages';\nexport * from './get-tsconfig';\nexport * from './get-tsconfig-with-fallback';\nexport * from './load-shared-dependencies';\nexport * from './log';\nexport * from './log-errors';\nexport * from './omit';\nexport * from './pick';\nexport * from './prettify';\nexport * from './read-json';\nexport * from './to-array';\nexport type * from './types';\nexport * from './validate-shared-dependencies';\n"],"names":[],"mappings":";;;;qBAAc;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBAEA"}
1
+ {"version":3,"sources":["../../src/utils/index.ts"],"sourcesContent":["export * from './exit-when-parent-exits';\nexport * from './find-packages';\nexport * from './find-up';\nexport * from './format-duration';\nexport * from './format-relative-date';\nexport * from './get-base-tsconfig';\nexport * from './get-branch-configs';\nexport * from './get-configuration';\nexport * from './get-default-test-excludes';\nexport * from './get-destination-folders';\nexport * from './get-folders';\nexport * from './get-jest-config';\nexport * from './get-package-data';\nexport * from './get-package-name';\nexport * from './get-packages';\nexport * from './get-tsconfig';\nexport * from './get-tsconfig-with-fallback';\nexport * from './load-shared-dependencies';\nexport * from './log';\nexport * from './log-errors';\nexport * from './omit';\nexport * from './pick';\nexport * from './prettify';\nexport * from './read-json';\nexport * from './to-array';\nexport type * from './types';\nexport * from './validate-shared-dependencies';\n"],"names":[],"mappings":";;;;qBAAc;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBACA;qBAEA"}
package/dist/utils/log.js CHANGED
@@ -18,9 +18,7 @@ function _define_property(obj, key, value) {
18
18
  configurable: true,
19
19
  writable: true
20
20
  });
21
- } else {
22
- obj[key] = value;
23
- }
21
+ } else obj[key] = value;
24
22
  return obj;
25
23
  }
26
24
  function _interop_require_default(obj) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/log.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { createDebug } from './debug';\n\ntype Debugger = ReturnType<typeof createDebug>;\n\nclass Log {\n private readonly debugMap: Map<string, Debugger>;\n\n constructor() {\n this.debugMap = new Map<string, Debugger>();\n }\n\n get timestamp() {\n return new Date().toLocaleTimeString(undefined, {\n hour12: false,\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n fractionalSecondDigits: 3,\n });\n }\n\n text(...text: string[]) {\n process.stdout.write(chalk(...text) + '\\n');\n }\n\n info(...text: string[]) {\n process.stdout.write(chalk.bold.cyan(...text) + '\\n');\n }\n\n success(...text: string[]) {\n process.stdout.write(chalk.bold.green(...text) + '\\n');\n }\n\n warning(...text: string[]) {\n process.stdout.write(chalk.bold.yellow(...text) + '\\n');\n }\n\n error(...text: string[]) {\n process.stdout.write(chalk.bold.red(...text) + '\\n');\n }\n\n debug(namespace: string, ...text: any[]) {\n let dbg = this.debugMap.get(namespace);\n if (!dbg) {\n dbg = createDebug(namespace);\n this.debugMap.set(namespace, dbg);\n }\n if (dbg.enabled && text.length) {\n const [formatter, ...args] = text.map(str => (typeof str === 'function' ? str() : str));\n dbg(formatter, ...args);\n }\n return dbg;\n }\n}\n\nexport const log = new Log();\n"],"names":["log","Log","timestamp","Date","toLocaleTimeString","undefined","hour12","hour","minute","second","fractionalSecondDigits","text","process","stdout","write","chalk","info","bold","cyan","success","green","warning","yellow","error","red","debug","namespace","dbg","debugMap","get","createDebug","set","enabled","length","formatter","args","map","str","Map"],"mappings":";;;;+BAwDa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AOR;IACX;IA7CA,aAAc;QAFd,uBAAiBC,YAAjB,KAAA;QAGI,IAAI,CAACA,QAAQ,GAAG,IAAIU;IACxB;AA4CJ;AAEO,MAAMtC,MAAM,IAAIC"}
1
+ {"version":3,"sources":["../../src/utils/log.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { createDebug } from './debug';\n\ntype Debugger = ReturnType<typeof createDebug>;\n\nclass Log {\n private readonly debugMap: Map<string, Debugger>;\n\n constructor() {\n this.debugMap = new Map<string, Debugger>();\n }\n\n get timestamp() {\n return new Date().toLocaleTimeString(undefined, {\n hour12: false,\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n fractionalSecondDigits: 3,\n });\n }\n\n text(...text: string[]) {\n process.stdout.write(chalk(...text) + '\\n');\n }\n\n info(...text: string[]) {\n process.stdout.write(chalk.bold.cyan(...text) + '\\n');\n }\n\n success(...text: string[]) {\n process.stdout.write(chalk.bold.green(...text) + '\\n');\n }\n\n warning(...text: string[]) {\n process.stdout.write(chalk.bold.yellow(...text) + '\\n');\n }\n\n error(...text: string[]) {\n process.stdout.write(chalk.bold.red(...text) + '\\n');\n }\n\n debug(namespace: string, ...text: any[]) {\n let dbg = this.debugMap.get(namespace);\n if (!dbg) {\n dbg = createDebug(namespace);\n this.debugMap.set(namespace, dbg);\n }\n if (dbg.enabled && text.length) {\n const [formatter, ...args] = text.map(str => (typeof str === 'function' ? str() : str));\n dbg(formatter, ...args);\n }\n return dbg;\n }\n}\n\nexport const log = new Log();\n"],"names":["log","Log","timestamp","Date","toLocaleTimeString","undefined","hour12","hour","minute","second","fractionalSecondDigits","text","process","stdout","write","chalk","info","bold","cyan","success","green","warning","yellow","error","red","debug","namespace","dbg","debugMap","get","createDebug","set","enabled","length","formatter","args","map","str","Map"],"mappings":";;;;+BAwDaA;;;eAAAA;;;8DAxDK;uBACU;;;;;;;;;;;;;;;;;AAI5B,MAAMC;IAOF,IAAIC,YAAY;QACZ,OAAO,IAAIC,OAAOC,kBAAkB,C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AAM,IAAIC"}
@@ -1 +1 @@
1
- {"version":3,"file":"build-shared-dependencies.d.ts","sourceRoot":"","sources":["../../src/vite/build-shared-dependencies.ts"],"names":[],"mappings":"AACA,OAAO,EAEH,mBAAmB,EAItB,MAAM,SAAS,CAAC;AAIjB,wBAAsB,uBAAuB,CAAC,OAAO,EAAE,mBAAmB,iBAmBzE"}
1
+ {"version":3,"file":"build-shared-dependencies.d.ts","sourceRoot":"","sources":["../../src/vite/build-shared-dependencies.ts"],"names":[],"mappings":"AACA,OAAO,EAEH,mBAAmB,EAItB,MAAM,SAAS,CAAC;AAKjB,wBAAsB,uBAAuB,CAAC,OAAO,EAAE,mBAAmB,iBAmBzE"}