@emailmaker/emailmaker 1.0.107-dev.3 → 1.0.107-dev.5

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 (325) hide show
  1. package/README.md +1 -1
  2. package/cli/dist/lib/cli/project.js +2 -16
  3. package/cli/dist/lib/config.js +20 -29
  4. package/cli/dist/lib/local-test.js +3 -19
  5. package/cli/dist/lib/paths.js +11 -0
  6. package/cli/dist/lib/resolveNpmSpawn.d.ts +20 -0
  7. package/cli/dist/lib/resolveNpmSpawn.js +71 -0
  8. package/cli/dist/lib/template-engine/context/pluginPackageJsonData.js +21 -19
  9. package/cli/dist/lib/template-engine/context/standVitePackageJsonData.js +7 -8
  10. package/cli/dist/lib/template-engine/resolveVariantDir.d.ts +5 -1
  11. package/cli/dist/lib/template-engine/resolveVariantDir.js +22 -0
  12. package/cli/dist/lib/templates/shared/i18n.js +2 -2
  13. package/cli/dist/lib/templates/shared/paths.js +3 -4
  14. package/cli/dist/lib/types/package-config.d.ts +1 -0
  15. package/cli/lib/cli/project.ts +2 -18
  16. package/cli/lib/config.ts +19 -30
  17. package/cli/lib/local-test.ts +3 -22
  18. package/cli/lib/paths.ts +15 -0
  19. package/cli/lib/resolveNpmSpawn.ts +72 -0
  20. package/cli/lib/template-engine/buildStandIndexHtml.test.ts +1 -0
  21. package/cli/lib/template-engine/context/pluginPackageJsonData.ts +23 -23
  22. package/cli/lib/template-engine/context/standVitePackageJsonData.ts +7 -12
  23. package/cli/lib/template-engine/pluginEtaParity.test.ts +1 -0
  24. package/cli/lib/template-engine/resolveVariantDir.ts +22 -0
  25. package/cli/lib/template-engine/standAdvancedViteDevHostEta.test.ts +4 -3
  26. package/cli/lib/template-engine/standWebpackDevHostEta.test.ts +7 -6
  27. package/cli/lib/templates/shared/i18n.ts +2 -2
  28. package/cli/lib/templates/shared/paths.ts +3 -4
  29. package/cli/lib/types/package-config.ts +1 -0
  30. package/cli/package.json +1 -1
  31. package/cli/project-templates/plugin/assets/vite/{plugin-build.config.mjs → plugin-build.config.ts} +7 -5
  32. package/cli/project-templates/plugin/assets/vite/{sandbox-build.config.mjs → sandbox-build.config.ts} +7 -5
  33. package/cli/project-templates/plugin/assets/webpack/{plugin-build.legacy.module.cjs → plugin-build.legacy.module.ts} +20 -7
  34. package/cli/project-templates/plugin/assets/webpack/{plugin-build.legacy.umd.cjs → plugin-build.legacy.umd.ts} +20 -7
  35. package/cli/project-templates/plugin/assets/webpack/{plugin-build.modern.module.cjs → plugin-build.modern.module.ts} +9 -4
  36. package/cli/project-templates/plugin/assets/webpack/{plugin-build.modern.umd.cjs → plugin-build.modern.umd.ts} +9 -4
  37. package/cli/project-templates/plugin/assets/webpack/{sandbox-build.config.cjs → sandbox-build.config.ts} +13 -3
  38. package/cli/project-templates/plugin/bundler-vite/release.html.eta +1 -0
  39. package/cli/project-templates/plugin/bundler-webpack/public/release.html.eta +1 -0
  40. package/cli/project-templates/plugin/shared-base/public/demo/product-1.svg +10 -0
  41. package/cli/project-templates/plugin/shared-base/public/demo/product-2.svg +10 -0
  42. package/cli/project-templates/plugin/shared-base/scripts/build-runner.ts +22 -0
  43. package/cli/project-templates/plugin/shared-base/scripts/build-types.ts +17 -0
  44. package/cli/project-templates/plugin/shared-base/scripts/clean.ts +16 -0
  45. package/cli/project-templates/plugin/shared-base/scripts/dev-runner.ts +52 -0
  46. package/cli/project-templates/plugin/shared-base/scripts/npmRun.ts +61 -0
  47. package/cli/project-templates/plugin/shared-base/scripts/release-runner.ts +18 -0
  48. package/cli/project-templates/plugin/shared-base/scripts/scriptRuntime.ts +10 -0
  49. package/cli/project-templates/plugin/shared-base/src/dev/hostApp.tsx.eta +1 -0
  50. package/cli/project-templates/plugin/shared-base/src/dev-release.tsx.eta +1 -0
  51. package/cli/project-templates/plugin/shared-base/src/dev.tsx.eta +1 -1
  52. package/cli/project-templates/shared/partials/plugin-dev-host-app-advanced.eta +93 -0
  53. package/cli/project-templates/shared/partials/plugin-dev-host-app-minimal.eta +54 -0
  54. package/cli/project-templates/shared/partials/plugin-dev-tsx-advanced.eta +3 -2
  55. package/cli/project-templates/shared/partials/plugin-dev-tsx-debug.eta +18 -0
  56. package/cli/project-templates/shared/partials/plugin-dev-tsx-release.eta +33 -0
  57. package/cli/project-templates/shared/partials/plugin-dev-tsx-runtime-helpers.eta +8 -8
  58. package/cli/project-templates/shared/partials/plugin-index-ts.eta +0 -1
  59. package/cli/project-templates/shared/partials/plugin-vite-dev-host.eta +9 -5
  60. package/cli/project-templates/shared/partials/plugin-vite-plugin-build.eta +7 -5
  61. package/cli/project-templates/shared/partials/plugin-vite-release-html.eta +12 -0
  62. package/cli/project-templates/shared/partials/plugin-vite-sandbox-build.eta +7 -5
  63. package/cli/project-templates/shared/partials/plugin-webpack-dev-host-legacy.eta +12 -5
  64. package/cli/project-templates/shared/partials/plugin-webpack-dev-host-modern.eta +13 -6
  65. package/cli/project-templates/shared/partials/plugin-webpack-release-html.eta +12 -0
  66. package/cli/project-templates/shared/partials/plugin-webpack-sandbox-build.eta +13 -3
  67. package/cli/project-templates/shared/partials/plugin-wp-legacy-module.eta +28 -10
  68. package/cli/project-templates/shared/partials/plugin-wp-legacy-umd.eta +28 -10
  69. package/cli/project-templates/shared/partials/plugin-wp-modern-module.eta +9 -4
  70. package/cli/project-templates/shared/partials/plugin-wp-modern-umd.eta +9 -4
  71. package/cli/project-templates/shared/partials/stand-dev-host-vite-memory.eta +3 -3
  72. package/cli/project-templates/shared/partials/stand-dev-host-vite-subpath.eta +8 -4
  73. package/cli/project-templates/shared/partials/stand-dev-host-vite-umd.eta +5 -5
  74. package/cli/project-templates/shared/partials/stand-dev-host-vite.eta +3 -3
  75. package/cli/project-templates/shared/partials/stand-dev-host-webpack-subpath.eta +8 -4
  76. package/cli/project-templates/shared/partials/stand-dev-host-webpack-umd.eta +9 -3
  77. package/cli/project-templates/shared/partials/stand-dev-host-webpack.eta +8 -4
  78. package/cli/project-templates/shared/partials/stand-dev-storage-middleware.eta +370 -0
  79. package/cli/project-templates/shared/stand-vite-base/config/lib/createViteStandConfig.ts +80 -0
  80. package/cli/project-templates/shared/stand-vite-base/scripts/devStorageMiddleware.ts.eta +1 -0
  81. package/cli/project-templates/shared/stand-webpack-base/config/lib/{createWebpackStandConfig.cjs → createWebpackStandConfig.ts} +31 -19
  82. package/cli/project-templates/{stand/advanced/umd/vite/config/lib/umdServeMiddleware.mjs → shared/stand-webpack-base/config/lib/umdServeMiddleware.ts} +19 -11
  83. package/cli/project-templates/shared/stand-webpack-base/scripts/devStorageMiddleware.ts.eta +1 -0
  84. package/cli/project-templates/stand/advanced/memory-usage/vite/config/lib/{createMemoryUsageStandConfig.mjs → createMemoryUsageStandConfig.ts} +25 -20
  85. package/cli/project-templates/stand/advanced/umd/vite/config/lib/umdServeMiddleware.ts +68 -0
  86. package/cli/project-templates/stand/react-adapter/webpack/README.md.eta +1 -0
  87. package/cli/project-templates/stand/react-adapter/webpack/config/dev-host.ts.eta +1 -0
  88. package/cli/project-templates/stand/react-adapter/webpack/package.json.eta +1 -0
  89. package/cli/project-templates/stand/react-adapter/webpack/public/index.html.eta +1 -0
  90. package/cli/project-templates/stand/react-adapter/webpack/src/dev/editorConfig.ts.eta +1 -0
  91. package/cli/project-templates/stand/react-adapter/webpack/src/dev/email.html.eta +1 -0
  92. package/cli/project-templates/stand/react-adapter/webpack/src/dev/getAuthToken.ts.eta +1 -0
  93. package/cli/project-templates/stand/react-adapter/webpack/src/dev/oauthCredentials.ts +9 -0
  94. package/cli/project-templates/stand/react-adapter/webpack/src/dev/storageProvider.ts.eta +1 -0
  95. package/cli/project-templates/stand/react-adapter/webpack/src/index.tsx.eta +1 -0
  96. package/cli/scripts/cli-matrix-smoke.ts +19 -10
  97. package/cli/scripts/verify-global-cli.ts +1 -1
  98. package/cli/scripts/vite-plugin-version-matrix.ts +299 -0
  99. package/cli/tsconfig.json +2 -2
  100. package/emailmaker-core.ed344c04.js +1 -0
  101. package/emailmaker-esm.js +788 -153
  102. package/emailmaker.d.ts +32 -0
  103. package/emailmaker.js +4 -4
  104. package/iframe/js/amp.BGJMqoms.js +1 -1
  105. package/iframe/js/chunk.oX6nCJbK.js +1 -1
  106. package/iframe/js/iframe-eblock.js +1 -1
  107. package/iframe/js/iframe.js +1 -1
  108. package/iframe/js/rules.BSaCN7eK.js +1 -1
  109. package/iframe/js/sanitize-html.Dy7Uwo8P.js +1 -1
  110. package/images/integrations/activecampaign.svg +4 -0
  111. package/images/integrations/bento.svg +9 -0
  112. package/images/integrations/brevo.svg +7 -0
  113. package/images/integrations/campaign_monitor.svg +10 -0
  114. package/images/integrations/constant_contact.svg +24 -0
  115. package/images/integrations/dotdigital.svg +144 -0
  116. package/images/integrations/getresponse.svg +23 -0
  117. package/images/integrations/hubspot.svg +3 -0
  118. package/images/integrations/klaviyo.svg +10 -0
  119. package/images/integrations/mailchimp.svg +9 -0
  120. package/images/integrations/salesforce.svg +20 -0
  121. package/js/browser-image-compression.js +9 -0
  122. package/package.json +2 -5
  123. package/runtime/@ant-design/cssinjs/index.js +1 -1
  124. package/runtime/@ant-design/icons/index.js +1 -1
  125. package/runtime/@ant-design/pro-layout/index.js +1 -1
  126. package/runtime/README.md +13 -13
  127. package/runtime/antd/index.js +1 -1
  128. package/runtime/app-core/index.js +1 -2
  129. package/runtime/classnames/index.js +1 -1
  130. package/runtime/core/index.js +6 -6
  131. package/runtime/dayjs/index.js +1 -1
  132. package/runtime/di/index.js +1 -2
  133. package/runtime/disposable/index.js +1 -2
  134. package/runtime/errors-runtime/index.js +1 -2
  135. package/runtime/guid/index.js +1 -2
  136. package/runtime/index.js +2 -4
  137. package/runtime/package.json +2 -3
  138. package/runtime/prop-types/index.js +1 -1
  139. package/runtime/react/index.js +1 -1
  140. package/runtime/react/jsx-dev-runtime/index.js +1 -1
  141. package/runtime/react/jsx-runtime/index.js +1 -1
  142. package/runtime/react-dom/client/index.js +1 -1
  143. package/runtime/react-dom/index.js +1 -1
  144. package/runtime/react-router-dom/index.js +1 -1
  145. package/runtime/uuid/index.js +1 -1
  146. package/static/amd/{8fc2a596.js → 19aeb269.js} +88 -88
  147. package/static/core/192ec827.js +1 -0
  148. package/static/core/22c1de2e2.js +1 -0
  149. package/static/core/24faedf0.js +1 -0
  150. package/static/core/29231645.js +1 -0
  151. package/static/core/2a3177fc2.js +1 -0
  152. package/static/core/346aabd2.js +3 -0
  153. package/static/core/3b800ed6.js +1 -0
  154. package/static/core/3e840e90.js +1 -0
  155. package/static/core/40cc9fd7.js +1 -0
  156. package/static/core/421bdec22.js +1 -0
  157. package/static/core/50ff48bc.js +4 -0
  158. package/static/core/5282795d2.js +6 -0
  159. package/static/core/555e2e2f2.js +903 -0
  160. package/static/core/563a283d.js +1 -0
  161. package/static/core/5d47e095.js +47 -0
  162. package/static/core/5f574386.js +1 -0
  163. package/static/core/67a41193.js +1 -0
  164. package/static/core/698dace4.js +7 -0
  165. package/static/core/6b648e2d.js +1 -0
  166. package/static/core/7629adfd.js +1 -0
  167. package/static/core/7717f2932.js +3 -0
  168. package/static/core/776cb34a.js +1 -0
  169. package/static/core/78a1e31e.js +1 -0
  170. package/static/core/7d56d643.js +1 -0
  171. package/static/core/841752212.js +40 -0
  172. package/static/core/8477e97e.js +1 -0
  173. package/static/core/8756d562.js +1 -0
  174. package/static/core/91d328d8.js +1 -0
  175. package/static/core/9270dbb6.js +6 -0
  176. package/static/core/96371334.js +566 -0
  177. package/static/core/9b9ddaef2.js +168 -0
  178. package/static/core/af1da4b4.js +1 -0
  179. package/static/core/b5096b152.js +471 -0
  180. package/static/core/bde6775a.js +1 -0
  181. package/static/core/bf1b888c.js +4 -0
  182. package/static/core/c3747df72.js +598 -0
  183. package/static/core/cec8d739.js +11 -0
  184. package/static/core/cfac3d32.js +1 -0
  185. package/static/core/d21c95cf2.js +1 -0
  186. package/static/core/dbd9ca52.js +1 -0
  187. package/static/core/dc590181.js +1 -0
  188. package/static/core/e0039d55.js +1 -0
  189. package/static/core/e4071c1a.js +4 -0
  190. package/static/core/ef87b75c.js +41 -0
  191. package/static/core/f47701f32.js +20 -0
  192. package/static/core/f83d7ac42.js +3 -0
  193. package/static/core/fcc67e6b.js +1 -0
  194. package/static/core/fd40d85c.js +1 -0
  195. package/static/core/fe638847.js +1 -0
  196. package/static/esm/{e8401d17.js → 203c9644.js} +3 -3
  197. package/static/esm/4b679053.js +27 -0
  198. package/static/esm/{b273a6c2.js → f31a26c6.js} +1 -1
  199. package/static/runtime/disposable-CD74igiJ.js +1 -0
  200. package/static/runtime/guid-C0wuVR8v.js +1 -0
  201. package/vite/index.d.ts +17 -6
  202. package/vite/index.js +315 -270
  203. package/vite/pluginDev/index.d.ts +10 -19
  204. package/vite/pluginDev/index.js +251 -204
  205. package/webpack/index.d.ts +24 -5
  206. package/webpack/index.js +168 -144
  207. package/webpack/pluginDev/index.d.ts +21 -22
  208. package/webpack/pluginDev/index.js +242 -177
  209. package/cli/dist/lib/template-engine/buildStandIndexHtml.test.d.ts +0 -2
  210. package/cli/dist/lib/template-engine/buildStandIndexHtml.test.js +0 -89
  211. package/cli/dist/lib/template-engine/emitEtaTree.test.d.ts +0 -2
  212. package/cli/dist/lib/template-engine/emitEtaTree.test.js +0 -34
  213. package/cli/dist/lib/template-engine/pluginEtaParity.test.d.ts +0 -2
  214. package/cli/dist/lib/template-engine/pluginEtaParity.test.js +0 -105
  215. package/cli/dist/lib/template-engine/resolveVariantDir.test.d.ts +0 -2
  216. package/cli/dist/lib/template-engine/resolveVariantDir.test.js +0 -52
  217. package/cli/dist/lib/template-engine/standAdvancedViteDevHostEta.test.d.ts +0 -2
  218. package/cli/dist/lib/template-engine/standAdvancedViteDevHostEta.test.js +0 -67
  219. package/cli/dist/lib/template-engine/standWebpackDevHostEta.test.d.ts +0 -2
  220. package/cli/dist/lib/template-engine/standWebpackDevHostEta.test.js +0 -83
  221. package/cli/dist/lib/template-engine/storageProviderEta.test.d.ts +0 -2
  222. package/cli/dist/lib/template-engine/storageProviderEta.test.js +0 -26
  223. package/cli/project-templates/plugin/shared-base/scripts/build-types.cjs +0 -8
  224. package/cli/project-templates/plugin/shared-base/scripts/clean.cjs +0 -6
  225. package/cli/project-templates/plugin/shared-base/scripts/dev-runner.cjs +0 -48
  226. package/cli/project-templates/plugin/shared-base/scripts/release-runner.cjs +0 -63
  227. package/cli/project-templates/shared/stand-vite-base/config/lib/createViteStandConfig.mjs +0 -80
  228. package/cli/project-templates/shared/stand-vite-base/scripts/devStorageMiddleware.cjs +0 -235
  229. package/cli/project-templates/shared/stand-webpack-base/config/lib/umdServeMiddleware.cjs +0 -38
  230. package/cli/project-templates/shared/stand-webpack-base/scripts/devStorageMiddleware.cjs +0 -235
  231. package/emailmaker-core.80d62b88.js +0 -569
  232. package/runtime/_core/app-core/index.js +0 -1
  233. package/runtime/_core/chunks/app-core-DphKKh8f.js +0 -1
  234. package/runtime/_core/chunks/chunk-oqAt0Dze.js +0 -1
  235. package/runtime/_core/chunks/di-BHUzE57z.js +0 -1
  236. package/runtime/_core/chunks/disposable-PhM3rJkj.js +0 -1
  237. package/runtime/_core/chunks/errors-runtime-VjCOXaQX.js +0 -1
  238. package/runtime/_core/chunks/guid-D2-FTZQG.js +0 -1
  239. package/runtime/_core/di/index.js +0 -1
  240. package/runtime/_core/disposable/index.js +0 -1
  241. package/runtime/_core/errors-runtime/index.js +0 -1
  242. package/runtime/_core/guid/index.js +0 -1
  243. package/runtime/_core/index.js +0 -1
  244. package/shared/hostBootstrap.js +0 -47
  245. package/shared/pluginDevOptions.js +0 -31
  246. package/shared/runtimeManifest.js +0 -72
  247. package/shared/stringCase.js +0 -16
  248. package/static/core/2360f32a.js +0 -3
  249. package/static/core/2687db56.js +0 -3
  250. package/static/core/2b250af6.js +0 -1261
  251. package/static/core/3469930c.js +0 -302
  252. package/static/core/34ce9042.js +0 -201
  253. package/static/core/4091ba5b.js +0 -25
  254. package/static/core/41ce3a6a.js +0 -173
  255. package/static/core/4ac4908c.js +0 -2213
  256. package/static/core/519096c1.js +0 -2597
  257. package/static/core/5fa1772b.js +0 -116550
  258. package/static/core/61312909.js +0 -3
  259. package/static/core/62a98c07.js +0 -75301
  260. package/static/core/6309c0f2.js +0 -3
  261. package/static/core/68d9f440.js +0 -3
  262. package/static/core/73b645ab.js +0 -2
  263. package/static/core/81019351.js +0 -280
  264. package/static/core/835b37ef.js +0 -591
  265. package/static/core/91242fb3.js +0 -3
  266. package/static/core/972b15b0.js +0 -92399
  267. package/static/core/974ef468.js +0 -493
  268. package/static/core/a17614422.js +0 -38078
  269. package/static/core/a2fa7b5b.js +0 -4232
  270. package/static/core/a513adfd.js +0 -89857
  271. package/static/core/a7c73a9b.js +0 -3813
  272. package/static/core/b64c7c90.js +0 -228
  273. package/static/core/cdc9ba92.js +0 -4711
  274. package/static/core/d1db685d.js +0 -2193
  275. package/static/core/d661febc.js +0 -3
  276. package/static/core/d6d2d2d0.js +0 -23
  277. package/static/core/df1a1225.js +0 -607
  278. package/static/core/e5bff179.js +0 -1302
  279. package/static/core/e5d602f5.js +0 -2
  280. package/static/core/eb029366.js +0 -1532
  281. package/static/core/f46c035a.js +0 -2
  282. package/static/core/f8b9d89a.js +0 -461
  283. package/static/core/fd897ad7.js +0 -3
  284. package/static/core/fdd890c7.js +0 -6168
  285. package/static/esm/29eb18ff.js +0 -164
  286. package/vite/mime-types.js +0 -179
  287. package/vite/utils.js +0 -44
  288. /package/cli/project-templates/plugin/bundler-vite/config/{dev-host.mjs.eta → dev-host.ts.eta} +0 -0
  289. /package/cli/project-templates/plugin/bundler-vite/config/{plugin-build.mjs.eta → plugin-build.ts.eta} +0 -0
  290. /package/cli/project-templates/plugin/bundler-vite/config/{sandbox-build.mjs.eta → sandbox-build.ts.eta} +0 -0
  291. /package/cli/project-templates/plugin/bundler-webpack/config/{dev-host.cjs.eta → dev-host.ts.eta} +0 -0
  292. /package/cli/project-templates/plugin/bundler-webpack/config/{plugin-build.cjs.eta → plugin-build.ts.eta} +0 -0
  293. /package/cli/project-templates/plugin/bundler-webpack/config/{sandbox-build.cjs.eta → sandbox-build.ts.eta} +0 -0
  294. /package/cli/project-templates/stand/advanced/memory-usage/vite/config/{dev-host.mjs.eta → dev-host.ts.eta} +0 -0
  295. /package/cli/project-templates/stand/advanced/shadow-dom/vite/config/{dev-host.mjs.eta → dev-host.ts.eta} +0 -0
  296. /package/cli/project-templates/stand/advanced/shadow-dom/webpack/config/{dev-host.cjs.eta → dev-host.ts.eta} +0 -0
  297. /package/cli/project-templates/stand/advanced/subpath/vite/config/{dev-host.mjs.eta → dev-host.ts.eta} +0 -0
  298. /package/cli/project-templates/stand/advanced/subpath/webpack/config/{dev-host.cjs.eta → dev-host.ts.eta} +0 -0
  299. /package/cli/project-templates/stand/advanced/umd/vite/config/{dev-host.mjs.eta → dev-host.ts.eta} +0 -0
  300. /package/cli/project-templates/stand/advanced/umd/webpack/config/{dev-host.cjs.eta → dev-host.ts.eta} +0 -0
  301. /package/cli/project-templates/stand/closed-loop/vite/config/{dev-host.mjs.eta → dev-host.ts.eta} +0 -0
  302. /package/cli/project-templates/stand/closed-loop/webpack/config/{dev-host.cjs.eta → dev-host.ts.eta} +0 -0
  303. /package/cli/project-templates/stand/oauth/vite/config/{dev-host.mjs.eta → dev-host.ts.eta} +0 -0
  304. /package/cli/project-templates/stand/oauth/webpack/config/{dev-host.cjs.eta → dev-host.ts.eta} +0 -0
  305. /package/cli/project-templates/stand/react-adapter/vite/config/{dev-host.mjs.eta → dev-host.ts.eta} +0 -0
  306. /package/iframe/{iframe-eblock.80d62b88.html → iframe-eblock.ed344c04.html} +0 -0
  307. /package/iframe/{iframe.80d62b88.html → iframe.ed344c04.html} +0 -0
  308. /package/{runtime/chunks → static/runtime}/DownloadOutlined-a2ZUz7zB.js +0 -0
  309. /package/{runtime/chunks → static/runtime}/chunk-D-iEO58U.js +0 -0
  310. /package/{runtime/chunks → static/runtime}/classnames-DBEldvch.js +0 -0
  311. /package/{runtime/chunks → static/runtime}/client-5XqXGmAI.js +0 -0
  312. /package/{runtime/chunks → static/runtime}/dayjs.min-CO3mzOeV.js +0 -0
  313. /package/{runtime/_core/chunks/defineProperty-BGJFuFMq.js → static/runtime/defineProperty-CGNmw-jw.js} +0 -0
  314. /package/{runtime/chunks → static/runtime}/dist-Cns8cA2n.js +0 -0
  315. /package/{runtime/chunks → static/runtime}/dist-Ct0xRt3Y.js +0 -0
  316. /package/{runtime/chunks → static/runtime}/es-0FFT3fCz.js +0 -0
  317. /package/{runtime/chunks → static/runtime}/es-BwJ3eGbx.js +0 -0
  318. /package/{runtime/chunks → static/runtime}/es-D8EsVtRL.js +0 -0
  319. /package/{runtime/chunks → static/runtime}/es-Da4O25Kw.js +0 -0
  320. /package/{runtime/chunks → static/runtime}/jsx-dev-runtime-V4_MuHNS.js +0 -0
  321. /package/{runtime/chunks → static/runtime}/jsx-runtime-DBeCoE0b.js +0 -0
  322. /package/{runtime/chunks → static/runtime}/objectWithoutProperties-Bk0EDksJ.js +0 -0
  323. /package/{runtime/chunks → static/runtime}/prop-types-DxD5wgQ0.js +0 -0
  324. /package/{runtime/chunks → static/runtime}/react-TEeeBWTl.js +0 -0
  325. /package/{runtime/chunks → static/runtime}/react-dom-BKKa1g6U.js +0 -0
@@ -1,7 +1,6 @@
1
1
  import fs from 'fs';
2
2
  import path from 'path';
3
3
  import { spawnSync } from 'child_process';
4
- import { createRequire } from 'module';
5
4
  import prompts from 'prompts';
6
5
  import {
7
6
  loadLocalEnvironment,
@@ -18,8 +17,8 @@ import type {
18
17
  ValidatedProjectOptions,
19
18
  } from '../types';
20
19
 
21
- const requireNode = createRequire(__filename);
22
20
  import { createLocalPackageTarballs } from '../local-test';
21
+ import { resolveSpawnCommand } from '../resolveNpmSpawn';
23
22
  import { generateFiles } from '../template-engine';
24
23
  import { getRuntimeCliMessages } from './runtimeMessages';
25
24
  import { normalizeLegacyKind, resolveTargetDir, isStandaloneDemoStand } from './shared';
@@ -40,21 +39,6 @@ function writeFiles(targetDir: string, files: GeneratedFilesMap): void {
40
39
  }
41
40
  }
42
41
 
43
- function resolveCommand(command: string): { executable: string; argsPrefix: string[] } {
44
- if (process.platform === 'win32' && command === 'npm') {
45
- const npmPackageJson = requireNode.resolve('npm/package.json');
46
- return {
47
- executable: process.execPath,
48
- argsPrefix: [path.join(path.dirname(npmPackageJson), 'bin', 'npm-cli.js')],
49
- };
50
- }
51
-
52
- return {
53
- executable: command,
54
- argsPrefix: [],
55
- };
56
- }
57
-
58
42
  function createProjectCommandEnv(): NodeJS.ProcessEnv {
59
43
  const env: NodeJS.ProcessEnv = { ...process.env };
60
44
  for (const key of Object.keys(env)) {
@@ -87,7 +71,7 @@ function createProjectCommandEnv(): NodeJS.ProcessEnv {
87
71
 
88
72
  function runProjectCommand(targetDir: string, command: string, args: string[] = []): void {
89
73
  const runtimeMessages = getRuntimeCliMessages();
90
- const { executable, argsPrefix } = resolveCommand(command);
74
+ const { executable, argsPrefix } = resolveSpawnCommand(command);
91
75
 
92
76
  const result = spawnSync(executable, [...argsPrefix, ...args], {
93
77
  cwd: targetDir,
package/cli/lib/config.ts CHANGED
@@ -2,14 +2,12 @@ import fs from 'fs';
2
2
  import path from 'path';
3
3
  import dotenv from 'dotenv';
4
4
  import { spawnSync } from 'child_process';
5
- import { createRequire } from 'module';
6
5
  import { getBuildToolsRoot } from './paths';
6
+ import { resolveSpawnCommand } from './resolveNpmSpawn';
7
7
  import { getRuntimeCliMessages } from './cli/runtimeMessages';
8
8
  import type { LocalPublishedNames, PackageConfig, ToolVersions } from './types';
9
9
  import { isJsonArray, isJsonObject, parseJsonValue, type JsonValue } from './types/json';
10
10
 
11
- const requireNode = createRequire(__filename);
12
-
13
11
  const MODE_TO_FILE: Record<string, string> = {
14
12
  dev: '.env.dev',
15
13
  prod: '.env.prod',
@@ -27,20 +25,19 @@ const VERSIONS_CONFIG_PATH = path.resolve(getBuildToolsRoot(), 'versions.json');
27
25
  const DEFAULT_APP_NAME = '$$APP_NAME$$';
28
26
  const DEFAULT_ENV_MODE = '$$ENV_MODE$$';
29
27
  const DEFAULT_PACKAGE_NAME = '$$PACKAGE_NAME$$';
30
- const DEFAULT_RUNTIME_PACKAGE = '$$RUNTIME_PACKAGE$$';
31
28
  const DEFAULT_UI_KIT_PACKAGE = '$$UIKIT_PACKAGE$$';
32
29
  const DEFAULT_EXTENSIONS_API_PACKAGE = '$$EXTENSIONS_API_PACKAGE$$';
33
30
  const DEFAULT_EXTENSIONS_REACT_PACKAGE = '$$EXTENSIONS_REACT_PACKAGE$$';
34
31
  const DEFAULT_EXTENSIONS_SANDBOX_PACKAGE = '$$EXTENSIONS_SANDBOX_PACKAGE$$';
35
32
  const DEFAULT_CLI_PACKAGE = '$$CLI_PACKAGE$$';
36
33
  const DEFAULT_VERSION = '$$APP_VERSION$$';
37
- const DEFAULT_RUNTIME_VERSION = '$$RUNTIME_VERSION$$';
38
34
  const DEFAULT_UI_KIT_VERSION = '$$UIKIT_VERSION$$';
39
35
  const DEFAULT_OPENAPI_BASE_URL = '$$OPENAPI_BASE_URL$$';
40
36
 
41
37
  const TOOL_VERSIONS: ToolVersions = {
42
38
  vite: '^7',
43
39
  typescript: '^5',
40
+ tsx: '^4.21.0',
44
41
  webpack: '^5',
45
42
  webpackCli: '^6',
46
43
  webpackDevServer: '^5',
@@ -59,6 +56,14 @@ function resolveEmbeddedValue(value: string): string {
59
56
  return value;
60
57
  }
61
58
 
59
+ function getRuntimePackageName(mainPackageName: string): string {
60
+ const normalized = String(mainPackageName || '').replace(/\/+$/, '');
61
+ if (!normalized) {
62
+ throw new Error('[runtime-package] mainPackageName is empty');
63
+ }
64
+ return `${normalized}/runtime`;
65
+ }
66
+
62
67
  function loadEnvFile(filePath: string, override: boolean): void {
63
68
  if (!fs.existsSync(filePath)) {
64
69
  return;
@@ -144,7 +149,7 @@ function applyVersionsOverlay(envMode: string): void {
144
149
  }
145
150
 
146
151
  process.env.REACT_APP_VERSION = channelVersions.host;
147
- process.env.REACT_APP_RUNTIME_VERSION = channelVersions.runtime;
152
+ process.env.REACT_APP_RUNTIME_VERSION = channelVersions.host;
148
153
  process.env.REACT_APP_UI_KIT_VERSION = channelVersions.uiKit;
149
154
  process.env.REACT_APP_EXTENSIONS_API_VERSION = channelVersions.extensionsApi;
150
155
  process.env.REACT_APP_EXTENSIONS_REACT_VERSION = channelVersions.extensionsReact;
@@ -154,21 +159,6 @@ function applyVersionsOverlay(envMode: string): void {
154
159
  process.env.RELEASE_CHANNEL = releaseChannel;
155
160
  }
156
161
 
157
- function resolveCommand(command: string): { executable: string; argsPrefix: string[] } {
158
- if (process.platform === 'win32' && (command === 'npm' || command === 'npx')) {
159
- const npmPackageJson = requireNode.resolve('npm/package.json');
160
- return {
161
- executable: process.execPath,
162
- argsPrefix: [path.join(path.dirname(npmPackageJson), 'bin', `${command}-cli.js`)],
163
- };
164
- }
165
-
166
- return {
167
- executable: command,
168
- argsPrefix: [],
169
- };
170
- }
171
-
172
162
  function resolveEnvDir(cwd: string, appName: string): string {
173
163
  if (!appName) {
174
164
  return cwd;
@@ -248,14 +238,12 @@ function loadLocalEnvironment(options: LoadLocalEnvironmentOptions = {}): void {
248
238
  function getMissingConfigNames(config: PackageConfig): string[] {
249
239
  const requiredFields: [string, string][] = [
250
240
  ['REACT_APP_PACKAGE_NAME', config.packageName],
251
- ['REACT_APP_RUNTIME_PACKAGE', config.runtimePackageName],
252
241
  ['REACT_APP_UI_KIT_PACKAGE', config.uiKitPackageName],
253
242
  ['REACT_APP_EXTENSIONS_API_PACKAGE', config.extensionsApiPackageName],
254
243
  ['REACT_APP_EXTENSIONS_REACT_PACKAGE', config.extensionsReactPackageName],
255
244
  ['REACT_APP_EXTENSIONS_SANDBOX_PACKAGE', config.extensionsSandboxPackageName],
256
245
  ['REACT_APP_CLI_PACKAGE', config.cliPackageName],
257
246
  ['REACT_APP_VERSION', config.version],
258
- ['REACT_APP_RUNTIME_VERSION', config.runtimeVersion],
259
247
  ['REACT_APP_UI_KIT_VERSION', config.uiKitVersion],
260
248
  ];
261
249
 
@@ -269,9 +257,11 @@ export interface ResolvePackageConfigOptions {
269
257
  }
270
258
 
271
259
  function resolvePackageConfig(options: ResolvePackageConfigOptions = {}): PackageConfig {
260
+ const packageName = readEmbeddedProductIdentity('REACT_APP_PACKAGE_NAME', DEFAULT_PACKAGE_NAME);
261
+ const version = readConfiguredValue('REACT_APP_VERSION', DEFAULT_VERSION);
272
262
  const config: PackageConfig = {
273
- packageName: readEmbeddedProductIdentity('REACT_APP_PACKAGE_NAME', DEFAULT_PACKAGE_NAME),
274
- runtimePackageName: readEmbeddedProductIdentity('REACT_APP_RUNTIME_PACKAGE', DEFAULT_RUNTIME_PACKAGE),
263
+ packageName,
264
+ runtimePackageName: getRuntimePackageName(packageName),
275
265
  uiKitPackageName: readEmbeddedProductIdentity('REACT_APP_UI_KIT_PACKAGE', DEFAULT_UI_KIT_PACKAGE),
276
266
  extensionsApiPackageName: readEmbeddedProductIdentity(
277
267
  'REACT_APP_EXTENSIONS_API_PACKAGE',
@@ -286,8 +276,8 @@ function resolvePackageConfig(options: ResolvePackageConfigOptions = {}): Packag
286
276
  DEFAULT_EXTENSIONS_SANDBOX_PACKAGE,
287
277
  ),
288
278
  cliPackageName: readEmbeddedProductIdentity('REACT_APP_CLI_PACKAGE', DEFAULT_CLI_PACKAGE),
289
- version: readConfiguredValue('REACT_APP_VERSION', DEFAULT_VERSION),
290
- runtimeVersion: readConfiguredValue('REACT_APP_RUNTIME_VERSION', DEFAULT_RUNTIME_VERSION),
279
+ version,
280
+ runtimeVersion: version,
291
281
  uiKitVersion: readConfiguredValue('REACT_APP_UI_KIT_VERSION', DEFAULT_UI_KIT_VERSION),
292
282
  extensionsApiVersion: process.env.REACT_APP_EXTENSIONS_API_VERSION || readConfiguredValue('REACT_APP_VERSION', DEFAULT_VERSION),
293
283
  extensionsReactVersion: process.env.REACT_APP_EXTENSIONS_REACT_VERSION || readConfiguredValue('REACT_APP_VERSION', DEFAULT_VERSION),
@@ -327,7 +317,7 @@ function npmViewVersionToString(parsed: JsonValue): string {
327
317
  }
328
318
 
329
319
  function readLatestRegistryVersion(packageName: string, distTag = 'latest'): string {
330
- const { executable, argsPrefix } = resolveCommand('npm');
320
+ const { executable, argsPrefix } = resolveSpawnCommand('npm');
331
321
  const packageSpec = distTag && distTag !== 'latest'
332
322
  ? `${packageName}@${distTag}`
333
323
  : packageName;
@@ -382,7 +372,6 @@ function resolveLatestPackageConfig(
382
372
  };
383
373
 
384
374
  const latestPackageVersion = resolveOrFallback(config.packageName, config.version);
385
- const latestRuntimeVersion = resolveOrFallback(config.runtimePackageName, config.runtimeVersion);
386
375
  const latestUiKitVersion = resolveOrFallback(config.uiKitPackageName, config.uiKitVersion);
387
376
  const latestExtensionsApiVersion = resolveOrFallback(config.extensionsApiPackageName, config.version);
388
377
  const latestExtensionsReactVersion = resolveOrFallback(config.extensionsReactPackageName, config.version);
@@ -392,7 +381,7 @@ function resolveLatestPackageConfig(
392
381
  return {
393
382
  ...config,
394
383
  version: latestPackageVersion,
395
- runtimeVersion: latestRuntimeVersion,
384
+ runtimeVersion: latestPackageVersion,
396
385
  uiKitVersion: latestUiKitVersion,
397
386
  extensionsApiVersion: latestExtensionsApiVersion,
398
387
  extensionsReactVersion: latestExtensionsReactVersion,
@@ -1,8 +1,8 @@
1
1
  import fs from 'fs';
2
2
  import path from 'path';
3
3
  import { spawnSync } from 'child_process';
4
- import { createRequire } from 'module';
5
4
  import { getMonorepoRoot } from './paths';
5
+ import { resolveNpmSpawnCommand } from './resolveNpmSpawn';
6
6
  import { getRuntimeCliMessages } from './cli/runtimeMessages';
7
7
  import type {
8
8
  BuildLocalTestPackagesOptions,
@@ -14,8 +14,6 @@ import type {
14
14
  } from './types';
15
15
  import { isJsonObject, parseJsonValue } from './types';
16
16
 
17
- const requireNode = createRequire(__filename);
18
-
19
17
  const PROJECT_ROOT = getMonorepoRoot();
20
18
  const DEFAULT_BUILD_DIR = path.resolve(PROJECT_ROOT, 'build');
21
19
 
@@ -23,24 +21,9 @@ function ensureDirectory(dirPath: string): void {
23
21
  fs.mkdirSync(dirPath, { recursive: true });
24
22
  }
25
23
 
26
- function resolveCommand(command: 'npm' | 'npx'): { executable: string; argsPrefix: string[] } {
27
- if (process.platform === 'win32' && (command === 'npm' || command === 'npx')) {
28
- const npmPackageJson = requireNode.resolve('npm/package.json');
29
- return {
30
- executable: process.execPath,
31
- argsPrefix: [path.join(path.dirname(npmPackageJson), 'bin', `${command}-cli.js`)],
32
- };
33
- }
34
-
35
- return {
36
- executable: command,
37
- argsPrefix: [],
38
- };
39
- }
40
-
41
24
  function packPackage(packageDir: string, destinationDir: string): string {
42
25
  const runtimeMessages = getRuntimeCliMessages();
43
- const { executable, argsPrefix } = resolveCommand('npm');
26
+ const { executable, argsPrefix } = resolveNpmSpawnCommand('npm');
44
27
  const result = spawnSync(executable, [...argsPrefix, 'pack', '--pack-destination', destinationDir], {
45
28
  cwd: packageDir,
46
29
  encoding: 'utf8',
@@ -75,7 +58,7 @@ function buildLocalTestPackages(normalizedBuildDir: string, options: BuildLocalT
75
58
 
76
59
  const targets = includeUmdBundle ? 'esm,react-adapter,umd' : 'esm,react-adapter';
77
60
  console.log(`[cli] ${runtimeMessages.localTestBuildStarting(targets)}`);
78
- const { executable, argsPrefix } = resolveCommand('npx');
61
+ const { executable, argsPrefix } = resolveNpmSpawnCommand('npx');
79
62
  const result = spawnSync(
80
63
  executable,
81
64
  [...argsPrefix, 'tsx', 'build-tools/pipeline.ts', '--targets', targets, '--mode', 'production', '--lint=false', '--type-check=false'],
@@ -135,11 +118,9 @@ function createLocalPackageTarballs(options: CreateLocalTarballsOptions): LocalP
135
118
  const packageDirs: Record<string, string> = standOnlyPackages
136
119
  ? {
137
120
  packageName: normalizedBuildDir,
138
- runtimePackageName: path.resolve(normalizedBuildDir, 'runtime'),
139
121
  }
140
122
  : {
141
123
  packageName: normalizedBuildDir,
142
- runtimePackageName: path.resolve(normalizedBuildDir, 'runtime'),
143
124
  uiKitPackageName: path.resolve(normalizedBuildDir, 'ui-kit'),
144
125
  extensionsApiPackageName: path.resolve(normalizedBuildDir, 'extensions/api'),
145
126
  extensionsReactPackageName: path.resolve(normalizedBuildDir, 'extensions/react'),
package/cli/lib/paths.ts CHANGED
@@ -1,9 +1,24 @@
1
+ import fs from 'fs';
1
2
  import path from 'path';
2
3
 
3
4
  /**
4
5
  * Корень npm-пакета `build-tools/cli` (корректно и из исходников `lib/…`, и из `dist/lib/…` после tsc).
5
6
  */
6
7
  export function getCliPackageRoot(): string {
8
+ const candidates = [
9
+ path.resolve(__dirname, '..'),
10
+ path.resolve(__dirname, '..', '..'),
11
+ ];
12
+
13
+ for (const candidate of candidates) {
14
+ if (
15
+ fs.existsSync(path.join(candidate, 'package.json'))
16
+ && fs.existsSync(path.join(candidate, 'project-templates'))
17
+ ) {
18
+ return candidate;
19
+ }
20
+ }
21
+
7
22
  return path.resolve(__dirname, '..', '..');
8
23
  }
9
24
 
@@ -0,0 +1,72 @@
1
+ import fs from 'fs';
2
+ import path from 'path';
3
+ import { createRequire } from 'module';
4
+
5
+ const requireNode = createRequire(__filename);
6
+
7
+ /**
8
+ * Путь к npm-cli.js / npx-cli.js для spawn через node.exe (нужно на Windows без shell).
9
+ * `require.resolve('npm/package.json')` работает только если пакет `npm` в дереве зависимостей;
10
+ * у типичной установки Node он лежит рядом с node.exe (см. fallback).
11
+ */
12
+ export function findNpmCliJs(command: 'npm' | 'npx'): string | null {
13
+ const binaryName = `${command}-cli.js`;
14
+
15
+ try {
16
+ const npmPackageJson = requireNode.resolve('npm/package.json');
17
+ const p = path.join(path.dirname(npmPackageJson), 'bin', binaryName);
18
+ if (fs.existsSync(p)) {
19
+ return p;
20
+ }
21
+ } catch {
22
+ /* npm не в node_modules CLI-пакета — ищем рядом с текущим node */
23
+ }
24
+
25
+ const binDir = path.dirname(process.execPath);
26
+ const npmRootCandidates = [
27
+ path.join(binDir, 'node_modules', 'npm'),
28
+ path.join(binDir, '..', 'lib', 'node_modules', 'npm'),
29
+ ];
30
+
31
+ for (const npmRoot of npmRootCandidates) {
32
+ const p = path.join(npmRoot, 'bin', binaryName);
33
+ if (fs.existsSync(p)) {
34
+ return p;
35
+ }
36
+ }
37
+
38
+ return null;
39
+ }
40
+
41
+ export type NpmSpawnArgs = { executable: string; argsPrefix: string[] };
42
+
43
+ /**
44
+ * Запуск npm/npx на Windows без shell: через node.exe и *-cli.js из установки Node.
45
+ * Если путь не найден — откат на имя команды в PATH.
46
+ */
47
+ export function resolveNpmSpawnCommand(command: 'npm' | 'npx'): NpmSpawnArgs {
48
+ if (process.platform === 'win32' && (command === 'npm' || command === 'npx')) {
49
+ const cliJs = findNpmCliJs(command);
50
+ if (cliJs) {
51
+ return {
52
+ executable: process.execPath,
53
+ argsPrefix: [cliJs],
54
+ };
55
+ }
56
+ }
57
+
58
+ return {
59
+ executable: command,
60
+ argsPrefix: [],
61
+ };
62
+ }
63
+
64
+ /**
65
+ * Только `npm` / `npx` нормализуются на Windows; остальные команды — как есть.
66
+ */
67
+ export function resolveSpawnCommand(command: string): NpmSpawnArgs {
68
+ if (command === 'npm' || command === 'npx') {
69
+ return resolveNpmSpawnCommand(command);
70
+ }
71
+ return { executable: command, argsPrefix: [] };
72
+ }
@@ -31,6 +31,7 @@ function mockPackageConfig(appName = 'verifyapp'): PackageConfig {
31
31
  uiLanguage: 'en',
32
32
  versions: {
33
33
  typescript: '5.0.0',
34
+ tsx: '4.21.0',
34
35
  vite: '5.0.0',
35
36
  webpack: '5.0.0',
36
37
  webpackCli: '5.0.0',
@@ -20,18 +20,12 @@ function buildPluginPackageJsonData(options: TemplateOptions): Record<string, un
20
20
  const usesModuleType = pluginFormat !== 'umd';
21
21
 
22
22
  const appPackageVersion = localTarballs ? localTarballs.packageName : packageConfig.version;
23
- const runtimePackageVersion = localTarballs ? localTarballs.runtimePackageName : packageConfig.runtimeVersion;
24
23
  const extensionsApiVersion = localTarballs ? localTarballs.extensionsApiPackageName : packageConfig.extensionsApiVersion;
25
24
  const extensionsSandboxVersion = localTarballs ? localTarballs.extensionsSandboxPackageName : packageConfig.extensionsSandboxVersion;
26
25
  const extensionsReactVersion = localTarballs?.extensionsReactPackageName || packageConfig.extensionsReactVersion;
27
26
  const uiKitVersion = localTarballs?.uiKitPackageName || packageConfig.uiKitVersion;
28
27
 
29
28
  const mainPkgKey = resolveLocalPublishedPackageKey(localPublishedNames, 'packageName', packageConfig.packageName);
30
- const runtimePkgKey = resolveLocalPublishedPackageKey(
31
- localPublishedNames,
32
- 'runtimePackageName',
33
- packageConfig.runtimePackageName,
34
- );
35
29
  const extApiKey = resolveLocalPublishedPackageKey(
36
30
  localPublishedNames,
37
31
  'extensionsApiPackageName',
@@ -49,9 +43,11 @@ function buildPluginPackageJsonData(options: TemplateOptions): Record<string, un
49
43
  );
50
44
  const uiKitKey = resolveLocalPublishedPackageKey(localPublishedNames, 'uiKitPackageName', packageConfig.uiKitPackageName);
51
45
 
52
- const peerDependencies = {
46
+ const dependencies = {
53
47
  [mainPkgKey]: appPackageVersion,
54
- [runtimePkgKey]: runtimePackageVersion,
48
+ };
49
+
50
+ const peerDependencies = {
55
51
  [extApiKey]: extensionsApiVersion,
56
52
  [extReactKey]: extensionsReactVersion,
57
53
  [extSandboxKey]: extensionsSandboxVersion,
@@ -62,12 +58,11 @@ function buildPluginPackageJsonData(options: TemplateOptions): Record<string, un
62
58
  }
63
59
 
64
60
  const devDependencies: Record<string, string> = {
65
- [mainPkgKey]: appPackageVersion,
66
- [runtimePkgKey]: runtimePackageVersion,
67
61
  [extApiKey]: extensionsApiVersion,
68
62
  [extReactKey]: extensionsReactVersion,
69
63
  [extSandboxKey]: extensionsSandboxVersion,
70
64
  typescript: String(packageConfig.versions.typescript),
65
+ tsx: packageConfig.versions.tsx,
71
66
  ...LEGACY_REACT_DEPENDENCIES,
72
67
  };
73
68
 
@@ -88,6 +83,8 @@ function buildPluginPackageJsonData(options: TemplateOptions): Record<string, un
88
83
  devDependencies['ts-loader'] = packageConfig.versions.tsLoader;
89
84
  }
90
85
 
86
+ const webpackCliCommand = 'tsx ./node_modules/webpack-cli/bin/cli.js';
87
+
91
88
  return {
92
89
  name: pluginPackageName,
93
90
  version: '0.1.0',
@@ -100,25 +97,28 @@ function buildPluginPackageJsonData(options: TemplateOptions): Record<string, un
100
97
  scripts:
101
98
  bundler === 'vite'
102
99
  ? {
103
- start: 'node ./scripts/dev-runner.cjs',
104
- 'start:release': 'node ./scripts/release-runner.cjs',
105
- 'dev:app': `vite --config ./${generatedPaths.devConfig}`,
100
+ start: 'npm run dev:app',
101
+ 'start:release': 'tsx ./scripts/release-runner.ts',
102
+ 'dev:app': 'tsx ./scripts/dev-runner.ts',
103
+ 'dev:host': `vite --config ./${generatedPaths.devConfig}`,
106
104
  'dev:sandbox': `vite build --config ./${generatedPaths.sandboxBuildConfig} --watch --mode development`,
107
- build: 'node ./scripts/clean.cjs && npm run build:types && npm run build:app && npm run build:sandbox',
108
- 'build:types': 'node ./scripts/build-types.cjs',
105
+ build: 'tsx ./scripts/build-runner.ts',
106
+ 'build:types': 'tsx ./scripts/build-types.ts',
109
107
  'build:app': `vite build --config ./${generatedPaths.pluginBuildConfig}`,
110
108
  'build:sandbox': `vite build --config ./${generatedPaths.sandboxBuildConfig} --mode production`,
111
109
  }
112
110
  : {
113
- start: 'node ./scripts/dev-runner.cjs',
114
- 'start:release': 'node ./scripts/release-runner.cjs',
115
- 'dev:app': `webpack serve --config ./${generatedPaths.devConfig} --mode development`,
116
- 'dev:sandbox': `webpack --config ./${generatedPaths.sandboxBuildConfig} --mode development --watch`,
117
- build: 'node ./scripts/clean.cjs && npm run build:types && npm run build:app && npm run build:sandbox',
118
- 'build:types': 'node ./scripts/build-types.cjs',
119
- 'build:app': `webpack --config ./${generatedPaths.pluginBuildConfig} --mode production`,
120
- 'build:sandbox': `webpack --config ./${generatedPaths.sandboxBuildConfig} --mode production`,
111
+ start: 'npm run dev:app',
112
+ 'start:release': 'tsx ./scripts/release-runner.ts',
113
+ 'dev:app': 'tsx ./scripts/dev-runner.ts',
114
+ 'dev:host': `${webpackCliCommand} serve --config ./${generatedPaths.devConfig} --mode development`,
115
+ 'dev:sandbox': `${webpackCliCommand} --config ./${generatedPaths.sandboxBuildConfig} --mode development --watch`,
116
+ build: 'tsx ./scripts/build-runner.ts',
117
+ 'build:types': 'tsx ./scripts/build-types.ts',
118
+ 'build:app': `${webpackCliCommand} --config ./${generatedPaths.pluginBuildConfig} --mode production`,
119
+ 'build:sandbox': `${webpackCliCommand} --config ./${generatedPaths.sandboxBuildConfig} --mode production`,
121
120
  },
121
+ dependencies,
122
122
  peerDependencies,
123
123
  devDependencies,
124
124
  };
@@ -25,19 +25,13 @@ function buildStandVitePackageJsonData(options: TemplateOptions): Record<string,
25
25
  const isMemoryUsageStand = standMode === 'advanced' && advancedProfile === 'memory-usage';
26
26
 
27
27
  const appPackageVersion = localTarballs?.packageName || packageConfig.version;
28
- const runtimePackageVersion = localTarballs?.runtimePackageName || packageConfig.runtimeVersion;
29
28
 
30
29
  const mainPkgKey = resolveLocalPublishedPackageKey(localPublishedNames, 'packageName', packageConfig.packageName);
31
- const runtimePkgKey = resolveLocalPublishedPackageKey(
32
- localPublishedNames,
33
- 'runtimePackageName',
34
- packageConfig.runtimePackageName,
35
- );
36
30
 
37
31
  const devDependencies: Record<string, string> = {
38
32
  [mainPkgKey]: appPackageVersion,
39
- [runtimePkgKey]: runtimePackageVersion,
40
33
  typescript: String(packageConfig.versions.typescript),
34
+ tsx: packageConfig.versions.tsx,
41
35
  formidable: '^3.5.2',
42
36
  ...LEGACY_REACT_DEPENDENCIES,
43
37
  };
@@ -59,12 +53,13 @@ function buildStandVitePackageJsonData(options: TemplateOptions): Record<string,
59
53
  devDependencies['ts-loader'] = packageConfig.versions.tsLoader;
60
54
  }
61
55
 
56
+ const webpackCliCommand = 'tsx ./node_modules/webpack-cli/bin/cli.js';
62
57
  const scripts = bundler === 'vite'
63
58
  ? isMemoryUsageStand
64
59
  ? {
65
- start: `cross-env NODE_OPTIONS=--max-old-space-size=256 vite --config ./${generatedPaths.devConfig}`,
66
- build: `cross-env NODE_OPTIONS=--max-old-space-size=256 vite build --config ./${generatedPaths.devConfig}`,
67
- preview: `cross-env NODE_OPTIONS=--max-old-space-size=256 vite preview --config ./${generatedPaths.devConfig}`,
60
+ start: `cross-env NODE_OPTIONS=--max-old-space-size=512 vite --config ./${generatedPaths.devConfig}`,
61
+ build: `cross-env NODE_OPTIONS=--max-old-space-size=512 vite build --config ./${generatedPaths.devConfig}`,
62
+ preview: `cross-env NODE_OPTIONS=--max-old-space-size=512 vite preview --config ./${generatedPaths.devConfig}`,
68
63
  }
69
64
  : {
70
65
  start: `vite --config ./${generatedPaths.devConfig}`,
@@ -72,8 +67,8 @@ function buildStandVitePackageJsonData(options: TemplateOptions): Record<string,
72
67
  preview: `vite preview --config ./${generatedPaths.devConfig}`,
73
68
  }
74
69
  : {
75
- start: `webpack serve --config ./${generatedPaths.devConfig} --mode development`,
76
- build: `webpack --config ./${generatedPaths.devConfig} --mode production`,
70
+ start: `${webpackCliCommand} serve --config ./${generatedPaths.devConfig} --mode development`,
71
+ build: `${webpackCliCommand} --config ./${generatedPaths.devConfig} --mode production`,
77
72
  };
78
73
 
79
74
  return {
@@ -36,6 +36,7 @@ function mockPackageConfig(): PackageConfig {
36
36
  uiLanguage: 'en',
37
37
  versions: {
38
38
  typescript: '^5',
39
+ tsx: '^4.21.0',
39
40
  vite: '^7',
40
41
  webpack: '^5',
41
42
  webpackCli: '^6',
@@ -123,6 +123,10 @@ function resolveStandReactAdapterViteVariantDir(cliRoot = getCliPackageRoot()) {
123
123
  return path.join(cliRoot, 'project-templates', 'stand', 'react-adapter', 'vite');
124
124
  }
125
125
 
126
+ function resolveStandReactAdapterWebpackVariantDir(cliRoot = getCliPackageRoot()) {
127
+ return path.join(cliRoot, 'project-templates', 'stand', 'react-adapter', 'webpack');
128
+ }
129
+
126
130
  function resolveStandAdvancedViteVariantDir(profile: AdvancedProfile, cliRoot: string = getCliPackageRoot()): string {
127
131
  return path.join(cliRoot, 'project-templates', 'stand', 'advanced', profile, 'vite');
128
132
  }
@@ -146,6 +150,13 @@ function shouldUseEtaStandReactAdapterVite(options: StandEtaRoutingInput) {
146
150
  return getDemoStandMode(options) === 'react-adapter';
147
151
  }
148
152
 
153
+ /** demo-stand react-adapter + webpack */
154
+ function shouldUseEtaStandReactAdapterWebpack(options: StandEtaRoutingInput) {
155
+ if (!isDemoStandKind(options.kind)) return false;
156
+ if (options.bundler !== 'webpack') return false;
157
+ return getDemoStandMode(options) === 'react-adapter';
158
+ }
159
+
149
160
  /** advanced + vite (shadow-dom | umd | memory-usage | subpath) */
150
161
  function getStandAdvancedViteEtaLayerRoots(templateOptions: StandEtaRoutingInput, cliRoot: string = getCliPackageRoot()): string[] | null {
151
162
  if (templateOptions.bundler !== 'vite') return null;
@@ -191,6 +202,11 @@ function getStandReactAdapterViteEtaLayerRoots(templateOptions: StandEtaRoutingI
191
202
  return [resolveStandViteBaseLayerDir(cliRoot), resolveStandReactAdapterViteVariantDir(cliRoot)];
192
203
  }
193
204
 
205
+ function getStandReactAdapterWebpackEtaLayerRoots(templateOptions: StandEtaRoutingInput, cliRoot: string = getCliPackageRoot()): string[] | null {
206
+ if (!shouldUseEtaStandReactAdapterWebpack(templateOptions)) return null;
207
+ return [resolveStandWebpackBaseLayerDir(cliRoot), resolveStandReactAdapterWebpackVariantDir(cliRoot)];
208
+ }
209
+
194
210
  /** Stand + Eta: простые slug, react-adapter, advanced-ветки. */
195
211
  function getStandEtaLayerRoots(templateOptions: StandEtaRoutingInput, cliRoot: string = getCliPackageRoot()): string[] | null {
196
212
  const simpleVite = getStandViteEtaLayerRoots(templateOptions, cliRoot);
@@ -202,6 +218,9 @@ function getStandEtaLayerRoots(templateOptions: StandEtaRoutingInput, cliRoot: s
202
218
  const reactVite = getStandReactAdapterViteEtaLayerRoots(templateOptions, cliRoot);
203
219
  if (reactVite) return reactVite;
204
220
 
221
+ const reactWebpack = getStandReactAdapterWebpackEtaLayerRoots(templateOptions, cliRoot);
222
+ if (reactWebpack) return reactWebpack;
223
+
205
224
  const advVite = getStandAdvancedViteEtaLayerRoots(templateOptions, cliRoot);
206
225
  if (advVite) return advVite;
207
226
 
@@ -229,10 +248,13 @@ export {
229
248
  getStandViteEtaLayerRoots,
230
249
  getStandWebpackEtaLayerRoots,
231
250
  getStandReactAdapterViteEtaLayerRoots,
251
+ getStandReactAdapterWebpackEtaLayerRoots,
232
252
  getStandAdvancedViteEtaLayerRoots,
233
253
  getStandAdvancedWebpackEtaLayerRoots,
234
254
  shouldUseEtaStandReactAdapterVite,
255
+ shouldUseEtaStandReactAdapterWebpack,
235
256
  resolveStandReactAdapterViteVariantDir,
257
+ resolveStandReactAdapterWebpackVariantDir,
236
258
  resolveStandAdvancedUmdWebpackVariantDir,
237
259
  resolveStandAdvancedShadowDomWebpackVariantDir,
238
260
  getStandEtaLayerRoots,
@@ -31,6 +31,7 @@ function mockPackageConfig(): PackageConfig {
31
31
  uiLanguage: 'en',
32
32
  versions: {
33
33
  typescript: '5.0.0',
34
+ tsx: '4.21.0',
34
35
  vite: '5.0.0',
35
36
  webpack: '5.0.0',
36
37
  webpackCli: '5.0.0',
@@ -65,7 +66,7 @@ test('advanced memory-usage vite dev-host uses literal api values', () => {
65
66
  advancedProfile: 'memory-usage',
66
67
  });
67
68
  const { files } = generateFiles(options);
68
- const devHost = utf8(files['config/dev-host.mjs']);
69
+ const devHost = utf8(files['config/dev-host.ts']);
69
70
  assert.match(devHost, /apiBaseUrl: "http:\/\/localhost:3000"/);
70
71
  assert.match(devHost, /apiOrigin: "http:\/\/localhost:3000"/);
71
72
  assert.match(devHost, /createMemoryUsageStandConfig/);
@@ -77,7 +78,7 @@ test('advanced umd vite dev-host uses eta middleware setup', () => {
77
78
  advancedProfile: 'umd',
78
79
  });
79
80
  const { files } = generateFiles(options);
80
- const devHost = utf8(files['config/dev-host.mjs']);
81
+ const devHost = utf8(files['config/dev-host.ts']);
81
82
  assert.match(devHost, /createUmdServeMiddleware/);
82
83
  assert.match(devHost, /publicPath: "\/MyApp\/"/);
83
84
  assert.match(devHost, /apiBaseUrl: "http:\/\/localhost:3000"/);
@@ -89,7 +90,7 @@ test('advanced subpath vite dev-host contains outputFolder and literal api value
89
90
  advancedProfile: 'subpath',
90
91
  });
91
92
  const { files } = generateFiles(options);
92
- const devHost = utf8(files['config/dev-host.mjs']);
93
+ const devHost = utf8(files['config/dev-host.ts']);
93
94
  assert.match(devHost, /outputFolder: "\/advanced\/subpath\/editor"/);
94
95
  assert.match(devHost, /apiBaseUrl: "http:\/\/localhost:3000"/);
95
96
  assert.match(devHost, /apiOrigin: "http:\/\/localhost:3000"/);