@bleedingdev/modern-js-app-tools 3.5.0-ultramodern.9 → 3.5.0-ultramodern.91

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 (258) hide show
  1. package/bin/modern.js +0 -0
  2. package/dist/cjs/builder/generator/getBuilderEnvironments.js +13 -16
  3. package/dist/cjs/builder/shared/builderPlugins/adapterPrecompress.js +13 -4
  4. package/dist/cjs/builder/shared/builderPlugins/adapterSSR.js +14 -11
  5. package/dist/cjs/builder/shared/bundlerPlugins/CssExtractRuntimePlugin.js +72 -0
  6. package/dist/cjs/builder/shared/bundlerPlugins/RouterPlugin.js +28 -11
  7. package/dist/cjs/builder/shared/bundlerPlugins/index.js +13 -6
  8. package/dist/cjs/builder/shared/lazyCompilation.js +2 -10
  9. package/dist/cjs/commands/index.js +0 -4
  10. package/dist/cjs/config/build-environment.js +268 -0
  11. package/dist/cjs/config/index.js +11 -4
  12. package/dist/cjs/config/public.js +46 -0
  13. package/dist/cjs/index.js +39 -62
  14. package/dist/cjs/plugins/analyze/getServerRoutes.js +19 -0
  15. package/dist/cjs/plugins/analyze/index.js +20 -12
  16. package/dist/cjs/plugins/backend-federation/codegen.js +255 -0
  17. package/dist/cjs/plugins/backend-federation/config.js +204 -0
  18. package/dist/cjs/plugins/backend-federation/emit.js +148 -0
  19. package/dist/cjs/plugins/backendFederationBuild.js +53 -0
  20. package/dist/cjs/plugins/deploy/index.js +4 -4
  21. package/dist/cjs/plugins/deploy/platforms/cloudflare/artifacts.js +127 -0
  22. package/dist/cjs/plugins/deploy/platforms/cloudflare/constants.js +141 -0
  23. package/dist/cjs/plugins/deploy/platforms/cloudflare/delivery-unit.js +139 -0
  24. package/dist/cjs/plugins/deploy/platforms/cloudflare/i18n-worker.js +135 -0
  25. package/dist/cjs/plugins/deploy/platforms/cloudflare/index.js +150 -0
  26. package/dist/cjs/plugins/deploy/platforms/cloudflare/security-policies.js +205 -0
  27. package/dist/cjs/plugins/deploy/platforms/cloudflare/types.js +18 -0
  28. package/dist/cjs/plugins/deploy/platforms/cloudflare/utils.js +66 -0
  29. package/dist/cjs/plugins/deploy/platforms/cloudflare/worker-manifest.js +208 -0
  30. package/dist/cjs/plugins/deploy/platforms/cloudflare/wrangler-config.js +204 -0
  31. package/dist/cjs/plugins/deploy/platforms/cloudflare-output-contract.js +108 -0
  32. package/dist/cjs/plugins/deploy/platforms/cloudflare-output-plan.js +93 -0
  33. package/dist/cjs/plugins/deploy/platforms/cloudflare-output-verifier/identity.js +83 -0
  34. package/dist/cjs/plugins/deploy/platforms/cloudflare-output-verifier/index.js +188 -0
  35. package/dist/cjs/{baseline.js → plugins/deploy/platforms/cloudflare-output-verifier/issues.js} +19 -10
  36. package/dist/cjs/plugins/deploy/platforms/cloudflare-output-verifier/manifest.js +89 -0
  37. package/dist/cjs/plugins/deploy/platforms/cloudflare-output-verifier/mutation-policy.js +151 -0
  38. package/dist/cjs/plugins/deploy/platforms/cloudflare-output-verifier/worker-bundles.js +302 -0
  39. package/dist/cjs/plugins/deploy/platforms/node.js +20 -2
  40. package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-entry.001-bootstrap-security.mjs +250 -0
  41. package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-entry.002-assets-routes.mjs +191 -0
  42. package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-entry.003-i18n-locales.mjs +514 -0
  43. package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-entry.004-rendering-css.mjs +1012 -0
  44. package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-entry.005-worker-dispatch.mjs +363 -0
  45. package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-entry.006-fetch-handler.mjs +93 -0
  46. package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-worker-fs-promises.mjs +8 -4
  47. package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-worker-loadable-server.mjs +251 -155
  48. package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-worker-path.mjs +78 -39
  49. package/dist/cjs/plugins/deploy/platforms/templates/netlify-entry.cjs +62 -41
  50. package/dist/cjs/plugins/deploy/platforms/templates/netlify-entry.mjs +63 -41
  51. package/dist/cjs/plugins/deploy/platforms/templates/node-entry.cjs +52 -35
  52. package/dist/cjs/plugins/deploy/platforms/templates/node-entry.mjs +53 -35
  53. package/dist/cjs/plugins/deploy/platforms/templates/vercel-entry.cjs +61 -41
  54. package/dist/cjs/plugins/deploy/platforms/templates/vercel-entry.mjs +61 -40
  55. package/dist/cjs/plugins/deploy/utils/npmAliases.js +226 -0
  56. package/dist/cjs/plugins/ultramodernReleaseEnvelope.js +100 -0
  57. package/dist/cjs/presetUltramodern.js +33 -2
  58. package/dist/cjs/ultramodern-release-envelope/canonical.js +68 -0
  59. package/dist/cjs/ultramodern-release-envelope/framework-output.js +597 -0
  60. package/dist/cjs/ultramodern-release-envelope/index.js +399 -0
  61. package/dist/cjs/ultramodern-release-envelope/types.js +51 -0
  62. package/dist/cjs/ultramodern-release-identity.js +110 -0
  63. package/dist/esm/builder/generator/getBuilderEnvironments.mjs +12 -15
  64. package/dist/esm/builder/shared/builderPlugins/adapterPrecompress.mjs +13 -4
  65. package/dist/esm/builder/shared/builderPlugins/adapterSSR.mjs +15 -12
  66. package/dist/esm/builder/shared/bundlerPlugins/CssExtractRuntimePlugin.mjs +30 -0
  67. package/dist/esm/builder/shared/bundlerPlugins/RouterPlugin.mjs +24 -10
  68. package/dist/esm/builder/shared/bundlerPlugins/index.mjs +1 -0
  69. package/dist/esm/builder/shared/lazyCompilation.mjs +1 -3
  70. package/dist/esm/commands/index.mjs +0 -1
  71. package/dist/esm/config/build-environment.mjs +224 -0
  72. package/dist/esm/config/index.mjs +1 -0
  73. package/dist/esm/config/public.mjs +1 -0
  74. package/dist/esm/index.mjs +5 -4
  75. package/dist/esm/plugins/analyze/getHtmlTemplate.mjs +2 -2
  76. package/dist/esm/plugins/analyze/getServerRoutes.mjs +17 -1
  77. package/dist/esm/plugins/analyze/index.mjs +20 -12
  78. package/dist/esm/plugins/analyze/isDefaultExportFunction.mjs +2 -2
  79. package/dist/esm/plugins/backend-federation/codegen.mjs +204 -0
  80. package/dist/esm/plugins/backend-federation/config.mjs +128 -0
  81. package/dist/esm/plugins/backend-federation/emit.mjs +97 -0
  82. package/dist/esm/plugins/backendFederationBuild.mjs +1 -0
  83. package/dist/esm/plugins/deploy/index.mjs +1 -1
  84. package/dist/esm/plugins/deploy/platforms/cloudflare/artifacts.mjs +64 -0
  85. package/dist/esm/plugins/deploy/platforms/cloudflare/constants.mjs +34 -0
  86. package/dist/esm/plugins/deploy/platforms/cloudflare/delivery-unit.mjs +88 -0
  87. package/dist/esm/plugins/deploy/platforms/cloudflare/i18n-worker.mjs +97 -0
  88. package/dist/esm/plugins/deploy/platforms/cloudflare/index.mjs +102 -0
  89. package/dist/esm/plugins/deploy/platforms/cloudflare/security-policies.mjs +167 -0
  90. package/dist/esm/plugins/deploy/platforms/cloudflare/types.mjs +0 -0
  91. package/dist/esm/plugins/deploy/platforms/cloudflare/utils.mjs +12 -0
  92. package/dist/esm/plugins/deploy/platforms/cloudflare/worker-manifest.mjs +148 -0
  93. package/dist/esm/plugins/deploy/platforms/cloudflare/wrangler-config.mjs +150 -0
  94. package/dist/esm/plugins/deploy/platforms/cloudflare-output-contract.mjs +31 -0
  95. package/dist/esm/plugins/deploy/platforms/cloudflare-output-plan.mjs +45 -0
  96. package/dist/esm/plugins/deploy/platforms/cloudflare-output-verifier/identity.mjs +45 -0
  97. package/dist/esm/plugins/deploy/platforms/cloudflare-output-verifier/index.mjs +133 -0
  98. package/dist/esm/plugins/deploy/platforms/cloudflare-output-verifier/issues.mjs +10 -0
  99. package/dist/esm/plugins/deploy/platforms/cloudflare-output-verifier/manifest.mjs +51 -0
  100. package/dist/esm/plugins/deploy/platforms/cloudflare-output-verifier/mutation-policy.mjs +99 -0
  101. package/dist/esm/plugins/deploy/platforms/cloudflare-output-verifier/worker-bundles.mjs +238 -0
  102. package/dist/esm/plugins/deploy/platforms/node.mjs +20 -2
  103. package/dist/esm/plugins/deploy/platforms/templates/cloudflare-entry.001-bootstrap-security.mjs +250 -0
  104. package/dist/esm/plugins/deploy/platforms/templates/cloudflare-entry.002-assets-routes.mjs +191 -0
  105. package/dist/esm/plugins/deploy/platforms/templates/cloudflare-entry.003-i18n-locales.mjs +514 -0
  106. package/dist/esm/plugins/deploy/platforms/templates/cloudflare-entry.004-rendering-css.mjs +1012 -0
  107. package/dist/esm/plugins/deploy/platforms/templates/cloudflare-entry.005-worker-dispatch.mjs +363 -0
  108. package/dist/esm/plugins/deploy/platforms/templates/cloudflare-entry.006-fetch-handler.mjs +93 -0
  109. package/dist/esm/plugins/deploy/platforms/templates/cloudflare-worker-fs-promises.mjs +8 -4
  110. package/dist/esm/plugins/deploy/platforms/templates/cloudflare-worker-loadable-server.mjs +251 -155
  111. package/dist/esm/plugins/deploy/platforms/templates/cloudflare-worker-path.mjs +78 -39
  112. package/dist/esm/plugins/deploy/platforms/templates/netlify-entry.cjs +62 -41
  113. package/dist/esm/plugins/deploy/platforms/templates/netlify-entry.mjs +63 -41
  114. package/dist/esm/plugins/deploy/platforms/templates/node-entry.cjs +52 -35
  115. package/dist/esm/plugins/deploy/platforms/templates/node-entry.mjs +53 -35
  116. package/dist/esm/plugins/deploy/platforms/templates/vercel-entry.cjs +61 -41
  117. package/dist/esm/plugins/deploy/platforms/templates/vercel-entry.mjs +61 -40
  118. package/dist/esm/plugins/deploy/utils/npmAliases.mjs +174 -0
  119. package/dist/esm/plugins/ultramodernReleaseEnvelope.mjs +52 -0
  120. package/dist/esm/presetUltramodern.mjs +33 -2
  121. package/dist/esm/ultramodern-release-envelope/canonical.mjs +21 -0
  122. package/dist/esm/ultramodern-release-envelope/framework-output.mjs +524 -0
  123. package/dist/esm/ultramodern-release-envelope/index.mjs +335 -0
  124. package/dist/esm/ultramodern-release-envelope/types.mjs +7 -0
  125. package/dist/esm/ultramodern-release-identity.mjs +66 -0
  126. package/dist/esm-node/builder/generator/getBuilderEnvironments.mjs +12 -15
  127. package/dist/esm-node/builder/shared/builderPlugins/adapterPrecompress.mjs +13 -4
  128. package/dist/esm-node/builder/shared/builderPlugins/adapterSSR.mjs +15 -12
  129. package/dist/esm-node/builder/shared/bundlerPlugins/CssExtractRuntimePlugin.mjs +31 -0
  130. package/dist/esm-node/builder/shared/bundlerPlugins/RouterPlugin.mjs +24 -10
  131. package/dist/esm-node/builder/shared/bundlerPlugins/index.mjs +1 -0
  132. package/dist/esm-node/builder/shared/lazyCompilation.mjs +1 -3
  133. package/dist/esm-node/commands/index.mjs +0 -1
  134. package/dist/esm-node/config/build-environment.mjs +225 -0
  135. package/dist/esm-node/config/index.mjs +1 -0
  136. package/dist/esm-node/config/public.mjs +2 -0
  137. package/dist/esm-node/index.mjs +5 -4
  138. package/dist/esm-node/plugins/analyze/getHtmlTemplate.mjs +2 -2
  139. package/dist/esm-node/plugins/analyze/getServerRoutes.mjs +17 -1
  140. package/dist/esm-node/plugins/analyze/index.mjs +20 -12
  141. package/dist/esm-node/plugins/analyze/isDefaultExportFunction.mjs +2 -2
  142. package/dist/esm-node/plugins/backend-federation/codegen.mjs +205 -0
  143. package/dist/esm-node/plugins/backend-federation/config.mjs +129 -0
  144. package/dist/esm-node/plugins/backend-federation/emit.mjs +98 -0
  145. package/dist/esm-node/plugins/backendFederationBuild.mjs +2 -0
  146. package/dist/esm-node/plugins/deploy/index.mjs +1 -1
  147. package/dist/esm-node/plugins/deploy/platforms/cloudflare/artifacts.mjs +65 -0
  148. package/dist/esm-node/plugins/deploy/platforms/cloudflare/constants.mjs +35 -0
  149. package/dist/esm-node/plugins/deploy/platforms/cloudflare/delivery-unit.mjs +89 -0
  150. package/dist/esm-node/plugins/deploy/platforms/cloudflare/i18n-worker.mjs +98 -0
  151. package/dist/esm-node/plugins/deploy/platforms/cloudflare/index.mjs +103 -0
  152. package/dist/esm-node/plugins/deploy/platforms/cloudflare/security-policies.mjs +168 -0
  153. package/dist/esm-node/plugins/deploy/platforms/cloudflare/types.mjs +1 -0
  154. package/dist/esm-node/plugins/deploy/platforms/cloudflare/utils.mjs +13 -0
  155. package/dist/esm-node/plugins/deploy/platforms/cloudflare/worker-manifest.mjs +149 -0
  156. package/dist/esm-node/plugins/deploy/platforms/cloudflare/wrangler-config.mjs +151 -0
  157. package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-contract.mjs +32 -0
  158. package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-plan.mjs +46 -0
  159. package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/identity.mjs +46 -0
  160. package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/index.mjs +134 -0
  161. package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/issues.mjs +11 -0
  162. package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/manifest.mjs +52 -0
  163. package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/mutation-policy.mjs +100 -0
  164. package/dist/esm-node/plugins/deploy/platforms/cloudflare-output-verifier/worker-bundles.mjs +239 -0
  165. package/dist/esm-node/plugins/deploy/platforms/node.mjs +20 -2
  166. package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-entry.001-bootstrap-security.mjs +250 -0
  167. package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-entry.002-assets-routes.mjs +191 -0
  168. package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-entry.003-i18n-locales.mjs +514 -0
  169. package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-entry.004-rendering-css.mjs +1012 -0
  170. package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-entry.005-worker-dispatch.mjs +363 -0
  171. package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-entry.006-fetch-handler.mjs +93 -0
  172. package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-worker-fs-promises.mjs +8 -4
  173. package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-worker-loadable-server.mjs +251 -155
  174. package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-worker-path.mjs +78 -39
  175. package/dist/esm-node/plugins/deploy/platforms/templates/netlify-entry.cjs +62 -41
  176. package/dist/esm-node/plugins/deploy/platforms/templates/netlify-entry.mjs +63 -41
  177. package/dist/esm-node/plugins/deploy/platforms/templates/node-entry.cjs +52 -35
  178. package/dist/esm-node/plugins/deploy/platforms/templates/node-entry.mjs +53 -35
  179. package/dist/esm-node/plugins/deploy/platforms/templates/vercel-entry.cjs +61 -41
  180. package/dist/esm-node/plugins/deploy/platforms/templates/vercel-entry.mjs +61 -40
  181. package/dist/esm-node/plugins/deploy/utils/npmAliases.mjs +175 -0
  182. package/dist/esm-node/plugins/ultramodernReleaseEnvelope.mjs +53 -0
  183. package/dist/esm-node/presetUltramodern.mjs +33 -2
  184. package/dist/esm-node/ultramodern-release-envelope/canonical.mjs +22 -0
  185. package/dist/esm-node/ultramodern-release-envelope/framework-output.mjs +525 -0
  186. package/dist/esm-node/ultramodern-release-envelope/index.mjs +336 -0
  187. package/dist/esm-node/ultramodern-release-envelope/types.mjs +8 -0
  188. package/dist/esm-node/ultramodern-release-identity.mjs +67 -0
  189. package/dist/types/builder/generator/createCopyPattern.d.ts +7 -5
  190. package/dist/types/builder/shared/bundlerPlugins/CssExtractRuntimePlugin.d.ts +6 -0
  191. package/dist/types/builder/shared/bundlerPlugins/RouterPlugin.d.ts +1 -0
  192. package/dist/types/builder/shared/bundlerPlugins/index.d.ts +1 -0
  193. package/dist/types/builder/shared/lazyCompilation.d.ts +2 -4
  194. package/dist/types/commands/index.d.ts +0 -1
  195. package/dist/types/config/build-environment.d.ts +22 -0
  196. package/dist/types/config/index.d.ts +1 -0
  197. package/dist/types/config/public.d.ts +2 -0
  198. package/dist/types/index.d.ts +0 -2
  199. package/dist/types/plugins/analyze/getServerRoutes.d.ts +1 -0
  200. package/dist/types/plugins/backend-federation/codegen.d.ts +83 -0
  201. package/dist/types/plugins/backend-federation/config.d.ts +103 -0
  202. package/dist/types/plugins/backend-federation/emit.d.ts +13 -0
  203. package/dist/types/plugins/backendFederationBuild.d.ts +2 -0
  204. package/dist/types/plugins/deploy/platforms/cloudflare/artifacts.d.ts +15 -0
  205. package/dist/types/plugins/deploy/platforms/cloudflare/constants.d.ts +24 -0
  206. package/dist/types/plugins/deploy/platforms/cloudflare/delivery-unit.d.ts +23 -0
  207. package/dist/types/plugins/deploy/platforms/cloudflare/i18n-worker.d.ts +22 -0
  208. package/dist/types/plugins/deploy/platforms/{cloudflare.d.ts → cloudflare/index.d.ts} +1 -1
  209. package/dist/types/plugins/deploy/platforms/cloudflare/security-policies.d.ts +51 -0
  210. package/dist/types/plugins/deploy/platforms/cloudflare/types.d.ts +5 -0
  211. package/dist/types/plugins/deploy/platforms/cloudflare/utils.d.ts +6 -0
  212. package/dist/types/plugins/deploy/platforms/cloudflare/worker-manifest.d.ts +122 -0
  213. package/dist/types/plugins/deploy/platforms/cloudflare/wrangler-config.d.ts +46 -0
  214. package/dist/types/plugins/deploy/platforms/cloudflare-output-contract.d.ts +14 -0
  215. package/dist/types/plugins/deploy/platforms/cloudflare-output-plan.d.ts +34 -0
  216. package/dist/types/plugins/deploy/platforms/cloudflare-output-verifier/identity.d.ts +4 -0
  217. package/dist/types/plugins/deploy/platforms/cloudflare-output-verifier/index.d.ts +18 -0
  218. package/dist/types/plugins/deploy/platforms/cloudflare-output-verifier/issues.d.ts +14 -0
  219. package/dist/types/plugins/deploy/platforms/cloudflare-output-verifier/manifest.d.ts +2 -0
  220. package/dist/types/plugins/deploy/platforms/cloudflare-output-verifier/mutation-policy.d.ts +14 -0
  221. package/dist/types/plugins/deploy/platforms/cloudflare-output-verifier/worker-bundles.d.ts +20 -0
  222. package/dist/types/plugins/deploy/platforms/templates/cloudflare-entry.001-bootstrap-security.d.mts +1 -0
  223. package/dist/types/plugins/deploy/platforms/templates/cloudflare-entry.002-assets-routes.d.mts +1 -0
  224. package/dist/types/plugins/deploy/platforms/templates/cloudflare-entry.003-i18n-locales.d.mts +1 -0
  225. package/dist/types/plugins/deploy/platforms/templates/cloudflare-entry.004-rendering-css.d.mts +1 -0
  226. package/dist/types/plugins/deploy/platforms/templates/cloudflare-entry.005-worker-dispatch.d.mts +1 -0
  227. package/dist/types/plugins/deploy/utils/npmAliases.d.ts +14 -0
  228. package/dist/types/plugins/ultramodernReleaseEnvelope.d.ts +3 -0
  229. package/dist/types/presetUltramodern.d.ts +10 -0
  230. package/dist/types/run/index.d.ts +1 -1
  231. package/dist/types/types/config/cloudflareDeploy.d.ts +41 -0
  232. package/dist/types/types/config/deploy.d.ts +15 -2
  233. package/dist/types/ultramodern-release-envelope/canonical.d.ts +5 -0
  234. package/dist/types/ultramodern-release-envelope/framework-output.d.ts +31 -0
  235. package/dist/types/ultramodern-release-envelope/index.d.ts +6 -0
  236. package/dist/types/ultramodern-release-envelope/types.d.ts +62 -0
  237. package/dist/types/ultramodern-release-identity.d.ts +16 -0
  238. package/lib/types.d.ts +2 -3
  239. package/package.json +38 -23
  240. package/rslib.config.mts +11 -12
  241. package/dist/cjs/commands/runtime.js +0 -196
  242. package/dist/cjs/plugins/deploy/platforms/cloudflare.js +0 -540
  243. package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-entry.mjs +0 -576
  244. package/dist/cjs/ultramodern/designSystem.js +0 -123
  245. package/dist/esm/baseline.mjs +0 -4
  246. package/dist/esm/commands/runtime.mjs +0 -146
  247. package/dist/esm/plugins/deploy/platforms/cloudflare.mjs +0 -492
  248. package/dist/esm/plugins/deploy/platforms/templates/cloudflare-entry.mjs +0 -576
  249. package/dist/esm/ultramodern/designSystem.mjs +0 -73
  250. package/dist/esm-node/baseline.mjs +0 -5
  251. package/dist/esm-node/commands/runtime.mjs +0 -147
  252. package/dist/esm-node/plugins/deploy/platforms/cloudflare.mjs +0 -493
  253. package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-entry.mjs +0 -576
  254. package/dist/esm-node/ultramodern/designSystem.mjs +0 -74
  255. package/dist/types/baseline.d.ts +0 -16
  256. package/dist/types/commands/runtime.d.ts +0 -12
  257. package/dist/types/ultramodern/designSystem.d.ts +0 -54
  258. /package/dist/types/plugins/deploy/platforms/templates/{cloudflare-entry.d.mts → cloudflare-entry.006-fetch-handler.d.mts} +0 -0
@@ -1,185 +1,281 @@
1
1
  import loadableComponent from '@loadable/component';
2
2
  import React from 'react';
3
- const internals = loadableComponent?.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED || {};
3
+
4
+ const internals =
5
+ loadableComponent?.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED || {};
4
6
  const LoadableContext = internals.Context || React.createContext(null);
5
- const getRequiredChunkKey = internals.getRequiredChunkKey || ((namespace)=>`${namespace}__LOADABLE_REQUIRED_CHUNKS__`);
6
- const scriptExtensions = new Set([
7
- '.js',
8
- '.mjs'
9
- ]);
10
- const styleExtensions = new Set([
11
- '.css'
12
- ]);
7
+ const getRequiredChunkKey =
8
+ internals.getRequiredChunkKey ||
9
+ (namespace => `${namespace}__LOADABLE_REQUIRED_CHUNKS__`);
10
+
11
+ const scriptExtensions = new Set(['.js', '.mjs']);
12
+ const styleExtensions = new Set(['.css']);
13
+
13
14
  function uniqByUrl(assets) {
14
- const seen = new Set();
15
- return assets.filter((asset)=>{
16
- if (seen.has(asset.url)) return false;
17
- seen.add(asset.url);
18
- return true;
19
- });
15
+ const seen = new Set();
16
+
17
+ return assets.filter(asset => {
18
+ if (seen.has(asset.url)) {
19
+ return false;
20
+ }
21
+
22
+ seen.add(asset.url);
23
+ return true;
24
+ });
20
25
  }
26
+
21
27
  function extname(filePath) {
22
- const basename = String(filePath).split('/').pop() || '';
23
- const index = basename.lastIndexOf('.');
24
- return index > 0 ? basename.slice(index) : '';
28
+ const basename = String(filePath).split('/').pop() || '';
29
+ const index = basename.lastIndexOf('.');
30
+
31
+ return index > 0 ? basename.slice(index) : '';
32
+ }
33
+
34
+ function isAutomaticPublicPath(publicPath) {
35
+ return publicPath === 'auto' || publicPath === 'auto/';
25
36
  }
37
+
26
38
  function joinUrl(publicPath, filename) {
27
- const base = publicPath || '/';
28
- return `${base.replace(/\/+$/u, '')}/${String(filename).replace(/^\/+/u, '')}`;
39
+ const base =
40
+ !publicPath || isAutomaticPublicPath(publicPath) ? '/' : publicPath;
41
+
42
+ return `${base.replace(/\/+$/u, '')}/${String(filename).replace(/^\/+/u, '')}`;
29
43
  }
44
+
30
45
  function extraPropsToString(extraProps = {}) {
31
- return Object.entries(extraProps).filter(([, value])=>void 0 !== value && false !== value).map(([key, value])=>true === value ? ` ${key}` : ` ${key}="${value}"`).join('');
46
+ return Object.entries(extraProps)
47
+ .filter(([, value]) => value !== undefined && value !== false)
48
+ .map(([key, value]) => (value === true ? ` ${key}` : ` ${key}="${value}"`))
49
+ .join('');
32
50
  }
51
+
33
52
  function assetScriptType(filename) {
34
- const extension = extname(filename);
35
- if (scriptExtensions.has(extension)) return "script";
36
- if (styleExtensions.has(extension)) return 'style';
53
+ const extension = extname(filename);
54
+
55
+ if (scriptExtensions.has(extension)) {
56
+ return 'script';
57
+ }
58
+
59
+ if (styleExtensions.has(extension)) {
60
+ return 'style';
61
+ }
37
62
  }
63
+
38
64
  function getAssetName(asset) {
39
- return 'object' == typeof asset && asset?.name ? asset.name : asset;
65
+ return typeof asset === 'object' && asset?.name ? asset.name : asset;
40
66
  }
67
+
41
68
  function getAssetIntegrity(asset) {
42
- return 'object' == typeof asset && asset?.integrity ? asset.integrity : null;
69
+ return typeof asset === 'object' && asset?.integrity ? asset.integrity : null;
43
70
  }
71
+
44
72
  function getChunkGroupAssets(chunkGroup) {
45
- const assets = chunkGroup?.assets;
46
- if (Array.isArray(assets)) return assets;
47
- if (assets && 'object' == typeof assets) return [
48
- ...assets.js || [],
49
- ...assets.css || []
50
- ];
51
- return [];
73
+ const assets = chunkGroup?.assets;
74
+
75
+ if (Array.isArray(assets)) {
76
+ return assets;
77
+ }
78
+
79
+ if (assets && typeof assets === 'object') {
80
+ return [...(assets.js || []), ...(assets.css || [])];
81
+ }
82
+
83
+ return [];
52
84
  }
85
+
53
86
  function getChunkGroupChildAssets(chunkGroup, type) {
54
- const childAssets = chunkGroup?.childAssets?.[type];
55
- return Array.isArray(childAssets) ? childAssets : [];
87
+ const childAssets = chunkGroup?.childAssets?.[type];
88
+
89
+ return Array.isArray(childAssets) ? childAssets : [];
56
90
  }
91
+
57
92
  function chunkIncludesJs(chunkInfo) {
58
- return (chunkInfo?.files || []).some((file)=>scriptExtensions.has(extname(file)));
93
+ return (chunkInfo?.files || []).some(file =>
94
+ scriptExtensions.has(extname(file)),
95
+ );
59
96
  }
97
+
60
98
  export function ChunkExtractorManager({ extractor, children }) {
61
- return React.createElement(LoadableContext.Provider, {
62
- value: extractor
63
- }, children);
99
+ return React.createElement(
100
+ LoadableContext.Provider,
101
+ { value: extractor },
102
+ children,
103
+ );
64
104
  }
105
+
65
106
  export class ChunkExtractor {
66
- constructor({ stats, entrypoints = [
67
- 'main'
68
- ], namespace = '', outputPath = '/', publicPath } = {}){
69
- this.namespace = namespace;
70
- this.stats = stats || {};
71
- this.publicPath = publicPath || this.stats.publicPath || '/';
72
- this.outputPath = outputPath || this.stats.outputPath || '/';
73
- this.entrypoints = Array.isArray(entrypoints) ? entrypoints : [
74
- entrypoints
75
- ];
76
- this.chunks = [];
77
- }
78
- addChunk(chunk) {
79
- if (!this.chunks.includes(chunk)) this.chunks.push(chunk);
80
- }
81
- collectChunks(app) {
82
- return React.createElement(ChunkExtractorManager, {
83
- extractor: this
84
- }, app);
107
+ constructor({
108
+ stats,
109
+ entrypoints = ['main'],
110
+ namespace = '',
111
+ outputPath = '/',
112
+ publicPath,
113
+ } = {}) {
114
+ this.namespace = namespace;
115
+ this.stats = stats || {};
116
+ const configuredPublicPath = publicPath || this.stats.publicPath;
117
+ this.publicPath =
118
+ !configuredPublicPath || isAutomaticPublicPath(configuredPublicPath)
119
+ ? '/'
120
+ : configuredPublicPath;
121
+ this.outputPath = outputPath || this.stats.outputPath || '/';
122
+ this.entrypoints = Array.isArray(entrypoints) ? entrypoints : [entrypoints];
123
+ this.chunks = [];
124
+ }
125
+
126
+ addChunk(chunk) {
127
+ if (!this.chunks.includes(chunk)) {
128
+ this.chunks.push(chunk);
85
129
  }
86
- getChunkGroup(chunk) {
87
- return this.stats.namedChunkGroups?.[chunk] || {
88
- assets: [],
89
- childAssets: {},
90
- chunks: []
91
- };
130
+ }
131
+
132
+ collectChunks(app) {
133
+ return React.createElement(ChunkExtractorManager, { extractor: this }, app);
134
+ }
135
+
136
+ getChunkGroup(chunk) {
137
+ return (
138
+ this.stats.namedChunkGroups?.[chunk] || {
139
+ assets: [],
140
+ childAssets: {},
141
+ chunks: [],
142
+ }
143
+ );
144
+ }
145
+
146
+ getChunkInfo(chunkId) {
147
+ return (this.stats.chunks || []).find(chunk => chunk.id === chunkId);
148
+ }
149
+
150
+ resolvePublicUrl(filename) {
151
+ return joinUrl(this.publicPath, filename);
152
+ }
153
+
154
+ createChunkAsset({ filename, chunk, type, linkType }) {
155
+ const resolvedFilename = getAssetName(filename);
156
+ const scriptType = assetScriptType(resolvedFilename);
157
+
158
+ if (!scriptType) {
159
+ return undefined;
92
160
  }
93
- getChunkInfo(chunkId) {
94
- return (this.stats.chunks || []).find((chunk)=>chunk.id === chunkId);
95
- }
96
- resolvePublicUrl(filename) {
97
- return joinUrl(this.publicPath, filename);
98
- }
99
- createChunkAsset({ filename, chunk, type, linkType }) {
100
- const resolvedFilename = getAssetName(filename);
101
- const scriptType = assetScriptType(resolvedFilename);
102
- if (!scriptType) return;
103
- return {
104
- filename: resolvedFilename,
105
- integrity: getAssetIntegrity(filename),
106
- scriptType,
161
+
162
+ return {
163
+ filename: resolvedFilename,
164
+ integrity: getAssetIntegrity(filename),
165
+ scriptType,
166
+ chunk,
167
+ url: this.resolvePublicUrl(resolvedFilename),
168
+ path: String(resolvedFilename).replace(/^\/+/u, ''),
169
+ type,
170
+ linkType,
171
+ };
172
+ }
173
+
174
+ getChunkAssets(chunks) {
175
+ const one = chunk =>
176
+ getChunkGroupAssets(this.getChunkGroup(chunk))
177
+ .map(filename =>
178
+ this.createChunkAsset({
179
+ filename,
107
180
  chunk,
108
- url: this.resolvePublicUrl(resolvedFilename),
109
- path: String(resolvedFilename).replace(/^\/+/u, ''),
110
- type,
111
- linkType
112
- };
113
- }
114
- getChunkAssets(chunks) {
115
- const one = (chunk)=>getChunkGroupAssets(this.getChunkGroup(chunk)).map((filename)=>this.createChunkAsset({
116
- filename,
117
- chunk,
118
- type: 'mainAsset',
119
- linkType: 'preload'
120
- })).filter(Boolean);
121
- return Array.isArray(chunks) ? uniqByUrl(chunks.flatMap(one)) : one(chunks);
122
- }
123
- getChunkChildAssets(chunks, type) {
124
- const one = (chunk)=>getChunkGroupChildAssets(this.getChunkGroup(chunk), type).map((filename)=>this.createChunkAsset({
125
- filename,
126
- chunk,
127
- type: 'childAsset',
128
- linkType: type
129
- })).filter(Boolean);
130
- return Array.isArray(chunks) ? uniqByUrl(chunks.flatMap(one)) : one(chunks);
131
- }
132
- getChunkDependencies(chunks) {
133
- const one = (chunk)=>(this.getChunkGroup(chunk).chunks || []).filter((chunkId)=>chunkIncludesJs(this.getChunkInfo(chunkId)));
134
- return Array.isArray(chunks) ? [
135
- ...new Set(chunks.flatMap(one))
136
- ] : one(chunks);
137
- }
138
- getRequiredChunksScriptContent() {
139
- return JSON.stringify(this.getChunkDependencies(this.chunks));
140
- }
141
- getRequiredChunksNamesScriptContent() {
142
- return JSON.stringify({
143
- namedChunks: this.chunks
144
- });
145
- }
146
- getRequiredChunksScriptTag(extraProps = {}) {
147
- const id = getRequiredChunkKey(this.namespace);
148
- const props = `type="application/json"${extraPropsToString(extraProps)}`;
149
- return [
150
- `<script id="${id}" ${props}>${this.getRequiredChunksScriptContent()}</script>`,
151
- `<script id="${id}_ext" ${props}>${this.getRequiredChunksNamesScriptContent()}</script>`
152
- ].join('');
153
- }
154
- getMainAssets(scriptType) {
155
- const assets = this.getChunkAssets([
156
- ...this.entrypoints,
157
- ...this.chunks
158
- ]);
159
- return scriptType ? assets.filter((asset)=>asset.scriptType === scriptType) : assets;
160
- }
161
- getScriptTags(extraProps = {}) {
162
- const scripts = this.getMainAssets("script").map((asset)=>`<script async data-chunk="${asset.chunk}" src="${asset.url}"${extraPropsToString(extraProps)}></script>`);
163
- return [
164
- this.getRequiredChunksScriptTag(extraProps),
165
- ...scripts
166
- ].join('');
167
- }
168
- getStyleTags(extraProps = {}) {
169
- return this.getMainAssets('style').map((asset)=>`<link data-chunk="${asset.chunk}" rel="stylesheet" href="${asset.url}"${extraPropsToString(extraProps)}>`).join('');
170
- }
171
- getLinkTags(extraProps = {}) {
172
- const assets = [
173
- ...this.getMainAssets(),
174
- ...this.getChunkChildAssets([
175
- ...this.entrypoints,
176
- ...this.chunks
177
- ], 'preload'),
178
- ...this.getChunkChildAssets([
179
- ...this.entrypoints,
180
- ...this.chunks
181
- ], 'prefetch')
182
- ];
183
- return uniqByUrl(assets).map((asset)=>`<link data-chunk="${asset.chunk}" rel="${asset.linkType}" as="${asset.scriptType}" href="${asset.url}"${extraPropsToString(extraProps)}>`).join('');
184
- }
181
+ type: 'mainAsset',
182
+ linkType: 'preload',
183
+ }),
184
+ )
185
+ .filter(Boolean);
186
+
187
+ return Array.isArray(chunks) ? uniqByUrl(chunks.flatMap(one)) : one(chunks);
188
+ }
189
+
190
+ getChunkChildAssets(chunks, type) {
191
+ const one = chunk =>
192
+ getChunkGroupChildAssets(this.getChunkGroup(chunk), type)
193
+ .map(filename =>
194
+ this.createChunkAsset({
195
+ filename,
196
+ chunk,
197
+ type: 'childAsset',
198
+ linkType: type,
199
+ }),
200
+ )
201
+ .filter(Boolean);
202
+
203
+ return Array.isArray(chunks) ? uniqByUrl(chunks.flatMap(one)) : one(chunks);
204
+ }
205
+
206
+ getChunkDependencies(chunks) {
207
+ const one = chunk =>
208
+ (this.getChunkGroup(chunk).chunks || []).filter(chunkId =>
209
+ chunkIncludesJs(this.getChunkInfo(chunkId)),
210
+ );
211
+
212
+ return Array.isArray(chunks)
213
+ ? [...new Set(chunks.flatMap(one))]
214
+ : one(chunks);
215
+ }
216
+
217
+ getRequiredChunksScriptContent() {
218
+ return JSON.stringify(this.getChunkDependencies(this.chunks));
219
+ }
220
+
221
+ getRequiredChunksNamesScriptContent() {
222
+ return JSON.stringify({ namedChunks: this.chunks });
223
+ }
224
+
225
+ getRequiredChunksScriptTag(extraProps = {}) {
226
+ const id = getRequiredChunkKey(this.namespace);
227
+ const props = `type="application/json"${extraPropsToString(extraProps)}`;
228
+
229
+ return [
230
+ `<script id="${id}" ${props}>${this.getRequiredChunksScriptContent()}</script>`,
231
+ `<script id="${id}_ext" ${props}>${this.getRequiredChunksNamesScriptContent()}</script>`,
232
+ ].join('');
233
+ }
234
+
235
+ getMainAssets(scriptType) {
236
+ const assets = this.getChunkAssets([...this.entrypoints, ...this.chunks]);
237
+
238
+ return scriptType
239
+ ? assets.filter(asset => asset.scriptType === scriptType)
240
+ : assets;
241
+ }
242
+
243
+ getScriptTags(extraProps = {}) {
244
+ const scripts = this.getMainAssets('script').map(
245
+ asset =>
246
+ `<script async data-chunk="${asset.chunk}" src="${asset.url}"${extraPropsToString(extraProps)}></script>`,
247
+ );
248
+
249
+ return [this.getRequiredChunksScriptTag(extraProps), ...scripts].join('');
250
+ }
251
+
252
+ getStyleTags(extraProps = {}) {
253
+ return this.getMainAssets('style')
254
+ .map(
255
+ asset =>
256
+ `<link data-chunk="${asset.chunk}" rel="stylesheet" href="${asset.url}"${extraPropsToString(extraProps)}>`,
257
+ )
258
+ .join('');
259
+ }
260
+
261
+ getLinkTags(extraProps = {}) {
262
+ const assets = [
263
+ ...this.getMainAssets(),
264
+ ...this.getChunkChildAssets(
265
+ [...this.entrypoints, ...this.chunks],
266
+ 'preload',
267
+ ),
268
+ ...this.getChunkChildAssets(
269
+ [...this.entrypoints, ...this.chunks],
270
+ 'prefetch',
271
+ ),
272
+ ];
273
+
274
+ return uniqByUrl(assets)
275
+ .map(
276
+ asset =>
277
+ `<link data-chunk="${asset.chunk}" rel="${asset.linkType}" as="${asset.scriptType}" href="${asset.url}"${extraPropsToString(extraProps)}>`,
278
+ )
279
+ .join('');
280
+ }
185
281
  }
@@ -1,59 +1,98 @@
1
- const trimSlashes = (value)=>String(value).replace(/^\/+|\/+$/gu, '');
2
- const normalizeSeparators = (value)=>String(value).replace(/\\+/gu, '/');
1
+ const trimSlashes = value => String(value).replace(/^\/+|\/+$/gu, '');
2
+ const normalizeSeparators = value => String(value).replace(/\\+/gu, '/');
3
+
3
4
  export const sep = '/';
4
5
  export const delimiter = ':';
6
+
5
7
  export function isAbsolute(filePath) {
6
- return normalizeSeparators(filePath).startsWith('/');
8
+ return normalizeSeparators(filePath).startsWith('/');
7
9
  }
10
+
8
11
  export function normalize(filePath) {
9
- const normalized = normalizeSeparators(filePath);
10
- const absolute = isAbsolute(normalized);
11
- const parts = [];
12
- for (const part of normalized.split('/'))if (part && '.' !== part) {
13
- if ('..' === part) {
14
- if (parts.length > 0 && '..' !== parts[parts.length - 1]) parts.pop();
15
- else if (!absolute) parts.push(part);
16
- continue;
17
- }
12
+ const normalized = normalizeSeparators(filePath);
13
+ const absolute = isAbsolute(normalized);
14
+ const parts = [];
15
+
16
+ for (const part of normalized.split('/')) {
17
+ if (!part || part === '.') {
18
+ continue;
19
+ }
20
+
21
+ if (part === '..') {
22
+ if (parts.length > 0 && parts[parts.length - 1] !== '..') {
23
+ parts.pop();
24
+ } else if (!absolute) {
18
25
  parts.push(part);
26
+ }
27
+ continue;
19
28
  }
20
- const joined = parts.join('/');
21
- if (absolute) return joined ? `/${joined}` : '/';
22
- return joined || '.';
29
+
30
+ parts.push(part);
31
+ }
32
+
33
+ const joined = parts.join('/');
34
+
35
+ if (absolute) {
36
+ return joined ? `/${joined}` : '/';
37
+ }
38
+
39
+ return joined || '.';
23
40
  }
41
+
24
42
  export function join(...segments) {
25
- const joined = segments.map(normalizeSeparators).filter(Boolean).map((segment, index)=>0 === index ? segment : trimSlashes(segment)).filter(Boolean).join('/');
26
- return joined ? normalize(joined) : '.';
43
+ const joined = segments
44
+ .map(normalizeSeparators)
45
+ .filter(Boolean)
46
+ .map((segment, index) => (index === 0 ? segment : trimSlashes(segment)))
47
+ .filter(Boolean)
48
+ .join('/');
49
+
50
+ return joined ? normalize(joined) : '.';
27
51
  }
52
+
28
53
  export function resolve(...segments) {
29
- const joined = join(...segments);
30
- return joined.startsWith('/') ? joined : `/${joined}`;
54
+ const joined = join(...segments);
55
+
56
+ return joined.startsWith('/') ? joined : `/${joined}`;
31
57
  }
58
+
32
59
  export function dirname(filePath) {
33
- const normalized = normalizeSeparators(filePath).replace(/\/+$/u, '');
34
- const index = normalized.lastIndexOf('/');
35
- if (index <= 0) return '/';
36
- return normalized.slice(0, index);
60
+ const normalized = normalizeSeparators(filePath).replace(/\/+$/u, '');
61
+ const index = normalized.lastIndexOf('/');
62
+
63
+ if (index <= 0) {
64
+ return '/';
65
+ }
66
+
67
+ return normalized.slice(0, index);
37
68
  }
69
+
38
70
  export function basename(filePath, suffix = '') {
39
- const normalized = normalizeSeparators(filePath).replace(/\/+$/u, '');
40
- const base = normalized.slice(normalized.lastIndexOf('/') + 1);
41
- return suffix && base.endsWith(suffix) ? base.slice(0, -suffix.length) : base;
71
+ const normalized = normalizeSeparators(filePath).replace(/\/+$/u, '');
72
+ const base = normalized.slice(normalized.lastIndexOf('/') + 1);
73
+
74
+ return suffix && base.endsWith(suffix) ? base.slice(0, -suffix.length) : base;
42
75
  }
76
+
43
77
  export function extname(filePath) {
44
- const base = basename(filePath);
45
- const index = base.lastIndexOf('.');
46
- if (index <= 0) return '';
47
- return base.slice(index);
78
+ const base = basename(filePath);
79
+ const index = base.lastIndexOf('.');
80
+
81
+ if (index <= 0) {
82
+ return '';
83
+ }
84
+
85
+ return base.slice(index);
48
86
  }
87
+
49
88
  export default {
50
- basename,
51
- delimiter,
52
- dirname,
53
- extname,
54
- isAbsolute,
55
- join,
56
- normalize,
57
- resolve,
58
- sep
89
+ basename,
90
+ delimiter,
91
+ dirname,
92
+ extname,
93
+ isAbsolute,
94
+ join,
95
+ normalize,
96
+ resolve,
97
+ sep,
59
98
  };