react-email 1.9.5 → 1.10.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 (418) hide show
  1. package/.eslintrc.js +5 -2
  2. package/dist/package.json +10 -13
  3. package/dist/source/commands/dev.d.ts +1 -0
  4. package/dist/source/commands/dev.d.ts.map +1 -0
  5. package/dist/source/commands/dev.js +72 -20
  6. package/dist/source/commands/export.d.ts +2 -1
  7. package/dist/source/commands/export.d.ts.map +1 -0
  8. package/dist/source/commands/export.js +137 -57
  9. package/dist/source/commands/preview.d.ts +1 -0
  10. package/dist/source/commands/preview.d.ts.map +1 -0
  11. package/dist/source/commands/preview.js +98 -30
  12. package/dist/source/index.d.ts +1 -0
  13. package/dist/source/index.d.ts.map +1 -0
  14. package/dist/source/index.js +11 -7
  15. package/dist/source/utils/close-ora-on-sigint.d.ts +2 -1
  16. package/dist/source/utils/close-ora-on-sigint.d.ts.map +1 -0
  17. package/dist/source/utils/close-ora-on-sigint.js +1 -1
  18. package/dist/source/utils/constants.d.ts +1 -0
  19. package/dist/source/utils/constants.d.ts.map +1 -0
  20. package/dist/source/utils/constants.js +6 -6
  21. package/dist/source/utils/convert-to-absolute-path.d.ts +1 -0
  22. package/dist/source/utils/convert-to-absolute-path.d.ts.map +1 -0
  23. package/dist/source/utils/convert-to-absolute-path.js +4 -2
  24. package/dist/source/utils/download-client.d.ts +1 -0
  25. package/dist/source/utils/download-client.d.ts.map +1 -0
  26. package/dist/source/utils/download-client.js +63 -18
  27. package/dist/source/utils/generate-email-preview.d.ts +1 -0
  28. package/dist/source/utils/generate-email-preview.d.ts.map +1 -0
  29. package/dist/source/utils/generate-email-preview.js +122 -63
  30. package/dist/source/utils/index.d.ts +1 -0
  31. package/dist/source/utils/index.d.ts.map +1 -0
  32. package/dist/source/utils/install-dependencies.d.ts +2 -1
  33. package/dist/source/utils/install-dependencies.d.ts.map +1 -0
  34. package/dist/source/utils/install-dependencies.js +10 -10
  35. package/dist/source/utils/run-server.d.ts +4 -3
  36. package/dist/source/utils/run-server.d.ts.map +1 -0
  37. package/dist/source/utils/run-server.js +90 -37
  38. package/dist/source/utils/start-server-command.d.ts +1 -0
  39. package/dist/source/utils/start-server-command.d.ts.map +1 -0
  40. package/dist/source/utils/start-server-command.js +17 -17
  41. package/dist/source/utils/sync-package.d.ts +1 -0
  42. package/dist/source/utils/sync-package.d.ts.map +1 -0
  43. package/dist/source/utils/sync-package.js +69 -16
  44. package/dist/source/utils/tree.d.ts +2 -0
  45. package/dist/source/utils/tree.d.ts.map +1 -0
  46. package/dist/source/utils/tree.js +58 -0
  47. package/dist/source/utils/watcher.d.ts +3 -2
  48. package/dist/source/utils/watcher.d.ts.map +1 -0
  49. package/dist/source/utils/watcher.js +21 -27
  50. package/package.json +10 -13
  51. package/source/commands/dev.ts +2 -2
  52. package/source/commands/export.ts +48 -20
  53. package/source/commands/preview.ts +1 -1
  54. package/source/index.ts +2 -1
  55. package/source/utils/close-ora-on-sigint.ts +2 -2
  56. package/source/utils/constants.ts +1 -1
  57. package/source/utils/convert-to-absolute-path.ts +1 -1
  58. package/source/utils/download-client.ts +3 -3
  59. package/source/utils/generate-email-preview.ts +32 -36
  60. package/source/utils/install-dependencies.ts +3 -3
  61. package/source/utils/run-server.ts +9 -9
  62. package/source/utils/start-server-command.ts +2 -2
  63. package/source/utils/sync-package.ts +2 -2
  64. package/source/utils/tree.ts +10 -0
  65. package/source/utils/watcher.ts +14 -22
  66. package/tsconfig.export.json +31 -0
  67. package/tsconfig.json +8 -31
  68. package/.yarn/cache/@babel-code-frame-npm-7.18.6-25229a7e34-195e2be317.zip +0 -0
  69. package/.yarn/cache/@babel-helper-validator-identifier-npm-7.19.1-d84f19e1dc-0eca5e86a7.zip +0 -0
  70. package/.yarn/cache/@babel-highlight-npm-7.18.6-9d35ad2e27-92d8ee6154.zip +0 -0
  71. package/.yarn/cache/@commander-js-extra-typings-npm-9.4.1-b0399e3b65-d69cd1c2b5.zip +0 -0
  72. package/.yarn/cache/@cspotcode-source-map-support-npm-0.8.1-964f2de99d-5718f26708.zip +0 -0
  73. package/.yarn/cache/@esbuild-darwin-arm64-npm-0.16.4-96d7e8a733-8.zip +0 -0
  74. package/.yarn/cache/@isaacs-cliui-npm-8.0.2-f4364666d5-4a473b9b32.zip +0 -0
  75. package/.yarn/cache/@jridgewell-resolve-uri-npm-3.1.0-6ff2351e61-b5ceaaf9a1.zip +0 -0
  76. package/.yarn/cache/@jridgewell-sourcemap-codec-npm-1.4.14-f5f0630788-61100637b6.zip +0 -0
  77. package/.yarn/cache/@jridgewell-trace-mapping-npm-0.3.9-91625cd7fb-d89597752f.zip +0 -0
  78. package/.yarn/cache/@manypkg-find-root-npm-2.2.1-6ca5d93706-7f31120c3e.zip +0 -0
  79. package/.yarn/cache/@manypkg-tools-npm-1.1.0-1975c91c51-f0228435c0.zip +0 -0
  80. package/.yarn/cache/@nodelib-fs.scandir-npm-2.1.5-89c67370dd-a970d595bd.zip +0 -0
  81. package/.yarn/cache/@nodelib-fs.stat-npm-2.0.5-01f4dd3030-012480b5ca.zip +0 -0
  82. package/.yarn/cache/@nodelib-fs.walk-npm-1.2.8-b4a89da548-190c643f15.zip +0 -0
  83. package/.yarn/cache/@npmcli-fs-npm-3.1.0-0844a57978-a50a6818de.zip +0 -0
  84. package/.yarn/cache/@octokit-auth-token-npm-3.0.3-6fba099166-9b3f569cec.zip +0 -0
  85. package/.yarn/cache/@octokit-core-npm-4.2.0-0f3a7f3979-5ac56e7f14.zip +0 -0
  86. package/.yarn/cache/@octokit-endpoint-npm-7.0.5-82841b7e23-81c9e9eabf.zip +0 -0
  87. package/.yarn/cache/@octokit-graphql-npm-5.0.5-0534ea7757-eb2d1a6305.zip +0 -0
  88. package/.yarn/cache/@octokit-openapi-types-npm-16.0.0-2fe91e346e-844f30a545.zip +0 -0
  89. package/.yarn/cache/@octokit-plugin-paginate-rest-npm-6.0.0-ccfed9f0b1-4ad89568d8.zip +0 -0
  90. package/.yarn/cache/@octokit-plugin-request-log-npm-1.0.4-9ab5a2f888-2086db0005.zip +0 -0
  91. package/.yarn/cache/@octokit-plugin-rest-endpoint-methods-npm-7.0.1-6524223f9b-cdb8734ec9.zip +0 -0
  92. package/.yarn/cache/@octokit-request-error-npm-3.0.3-cbba4d6220-5db0b51473.zip +0 -0
  93. package/.yarn/cache/@octokit-request-npm-6.2.3-1b72fec7bb-fef4097be8.zip +0 -0
  94. package/.yarn/cache/@octokit-rest-npm-19.0.7-f05ed3b2ee-1f970c4de2.zip +0 -0
  95. package/.yarn/cache/@octokit-types-npm-9.0.0-3a83131100-5c7f5cca8f.zip +0 -0
  96. package/.yarn/cache/@pkgjs-parseargs-npm-0.11.0-cd2a3fe948-6ad6a00fc4.zip +0 -0
  97. package/.yarn/cache/@react-email-render-npm-0.0.6-aba674abb4-fe1f044305.zip +0 -0
  98. package/.yarn/cache/@selderee-plugin-htmlparser2-npm-0.10.0-da625619f9-37b5e059f0.zip +0 -0
  99. package/.yarn/cache/@tootallnate-once-npm-2.0.0-e36cf4f140-ad87447820.zip +0 -0
  100. package/.yarn/cache/@tsconfig-node10-npm-1.0.9-f2e2d20feb-a33ae4dc2a.zip +0 -0
  101. package/.yarn/cache/@tsconfig-node12-npm-1.0.11-9710d1c61b-5ce29a41b1.zip +0 -0
  102. package/.yarn/cache/@tsconfig-node14-npm-1.0.3-15321421d2-19275fe80c.zip +0 -0
  103. package/.yarn/cache/@tsconfig-node16-npm-1.0.3-6a4a30eda2-3a8b657dd0.zip +0 -0
  104. package/.yarn/cache/@types-fs-extra-npm-11.0.1-f11620397b-3e930346e5.zip +0 -0
  105. package/.yarn/cache/@types-glob-npm-7.2.0-772334bf9a-6ae717fedf.zip +0 -0
  106. package/.yarn/cache/@types-jsonfile-npm-6.1.1-62ad833c58-0f8fe0a922.zip +0 -0
  107. package/.yarn/cache/@types-minimatch-npm-5.1.2-aab9c394d3-0391a28286.zip +0 -0
  108. package/.yarn/cache/@types-node-npm-18.11.10-cca0d46cb2-0f60cb090b.zip +0 -0
  109. package/.yarn/cache/@types-node-npm-18.11.9-d21dd6ec05-cc0aae109e.zip +0 -0
  110. package/.yarn/cache/@types-normalize-package-data-npm-2.4.1-c31c56ae6a-e87bccbf11.zip +0 -0
  111. package/.yarn/cache/@types-normalize-path-npm-3.0.0-a1f250f88f-19f49b1cef.zip +0 -0
  112. package/.yarn/cache/@types-shelljs-npm-0.8.12-cbc88427ef-ffb47809ab.zip +0 -0
  113. package/.yarn/cache/abbrev-npm-1.1.1-3659247eab-a4a97ec07d.zip +0 -0
  114. package/.yarn/cache/acorn-npm-8.8.1-20e4aea981-4079b67283.zip +0 -0
  115. package/.yarn/cache/acorn-walk-npm-8.2.0-2f2cac3177-1715e76c01.zip +0 -0
  116. package/.yarn/cache/agent-base-npm-6.0.2-428f325a93-f52b6872cc.zip +0 -0
  117. package/.yarn/cache/agentkeepalive-npm-4.5.0-f237b580b2-13278cd5b1.zip +0 -0
  118. package/.yarn/cache/aggregate-error-npm-3.1.0-415a406f4e-1101a33f21.zip +0 -0
  119. package/.yarn/cache/ansi-regex-npm-5.0.1-c963a48615-2aa4bb54ca.zip +0 -0
  120. package/.yarn/cache/ansi-regex-npm-6.0.1-8d663a607d-1ff8b7667c.zip +0 -0
  121. package/.yarn/cache/ansi-styles-npm-3.2.1-8cb8107983-d85ade01c1.zip +0 -0
  122. package/.yarn/cache/ansi-styles-npm-4.3.0-245c7d42c7-513b44c3b2.zip +0 -0
  123. package/.yarn/cache/ansi-styles-npm-6.2.1-d43647018c-ef940f2f0c.zip +0 -0
  124. package/.yarn/cache/anymatch-npm-3.1.3-bc81d103b1-3e044fd6d1.zip +0 -0
  125. package/.yarn/cache/aproba-npm-2.0.0-8716bcfde6-5615cadcfb.zip +0 -0
  126. package/.yarn/cache/are-we-there-yet-npm-3.0.1-3395b1512f-52590c2486.zip +0 -0
  127. package/.yarn/cache/arg-npm-4.1.3-1748b966a8-544af8dd3f.zip +0 -0
  128. package/.yarn/cache/argparse-npm-1.0.10-528934e59d-7ca6e45583.zip +0 -0
  129. package/.yarn/cache/array-union-npm-2.1.0-4e4852b221-5bee12395c.zip +0 -0
  130. package/.yarn/cache/balanced-match-npm-1.0.2-a53c126459-9706c088a2.zip +0 -0
  131. package/.yarn/cache/base64-js-npm-1.5.1-b2f7275641-669632eb37.zip +0 -0
  132. package/.yarn/cache/before-after-hook-npm-2.2.3-d79e3d6608-a1a2430976.zip +0 -0
  133. package/.yarn/cache/big-integer-npm-1.6.51-1a244d8e1f-3d444173d1.zip +0 -0
  134. package/.yarn/cache/binary-extensions-npm-2.2.0-180c33fec7-ccd267956c.zip +0 -0
  135. package/.yarn/cache/binary-npm-0.3.0-56515cf10f-b4699fda9e.zip +0 -0
  136. package/.yarn/cache/bl-npm-4.1.0-7f94cdcf3f-9e8521fa7e.zip +0 -0
  137. package/.yarn/cache/bluebird-npm-3.4.7-5dff099581-bffa9dee7d.zip +0 -0
  138. package/.yarn/cache/brace-expansion-npm-1.1.11-fb95eb05ad-faf34a7bb0.zip +0 -0
  139. package/.yarn/cache/brace-expansion-npm-2.0.1-17aa2616f9-a61e7cd2e8.zip +0 -0
  140. package/.yarn/cache/braces-npm-3.0.2-782240b28a-e2a8e769a8.zip +0 -0
  141. package/.yarn/cache/buffer-indexof-polyfill-npm-1.0.2-39d49d63c8-fbfb2d69c6.zip +0 -0
  142. package/.yarn/cache/buffer-npm-5.7.1-513ef8259e-e2cf8429e1.zip +0 -0
  143. package/.yarn/cache/buffers-npm-0.1.1-59dbe6d7fb-ad6f8e483e.zip +0 -0
  144. package/.yarn/cache/cacache-npm-17.1.4-51ef53d0a8-b7751df756.zip +0 -0
  145. package/.yarn/cache/chainsaw-npm-0.1.0-0d34a3db01-22a96b9fb0.zip +0 -0
  146. package/.yarn/cache/chalk-npm-2.4.2-3ea16dd91e-ec3661d38f.zip +0 -0
  147. package/.yarn/cache/chalk-npm-4.1.2-ba8b67ab80-fe75c9d5c7.zip +0 -0
  148. package/.yarn/cache/chokidar-npm-3.5.3-c5f9b0a56a-b49fcde401.zip +0 -0
  149. package/.yarn/cache/chownr-npm-2.0.0-638f1c9c61-c57cf9dd07.zip +0 -0
  150. package/.yarn/cache/clean-stack-npm-2.2.0-a8ce435a5c-2ac8cd2b2f.zip +0 -0
  151. package/.yarn/cache/cli-cursor-npm-3.1.0-fee1e46b5e-2692784c6c.zip +0 -0
  152. package/.yarn/cache/cli-spinners-npm-2.7.0-ace95632f5-a9afaf73f5.zip +0 -0
  153. package/.yarn/cache/clone-npm-1.0.4-a610fcbcf9-d06418b733.zip +0 -0
  154. package/.yarn/cache/color-convert-npm-1.9.3-1fe690075e-fd7a64a17c.zip +0 -0
  155. package/.yarn/cache/color-convert-npm-2.0.1-79730e935b-79e6bdb9fd.zip +0 -0
  156. package/.yarn/cache/color-name-npm-1.1.3-728b7b5d39-09c5d3e33d.zip +0 -0
  157. package/.yarn/cache/color-name-npm-1.1.4-025792b0ea-b044585952.zip +0 -0
  158. package/.yarn/cache/color-support-npm-1.1.3-3be5c53455-9b73568176.zip +0 -0
  159. package/.yarn/cache/commander-npm-2.20.3-d8dcbaa39b-ab8c07884e.zip +0 -0
  160. package/.yarn/cache/commander-npm-5.1.0-7e939e7832-0b7fec1712.zip +0 -0
  161. package/.yarn/cache/commander-npm-9.4.1-9deffb2749-bfb18e325a.zip +0 -0
  162. package/.yarn/cache/concat-map-npm-0.0.1-85a921b7ee-902a9f5d89.zip +0 -0
  163. package/.yarn/cache/condense-newlines-npm-0.2.1-016452195f-3c20ff6ee8.zip +0 -0
  164. package/.yarn/cache/config-chain-npm-1.1.13-82e06afbc4-828137a28e.zip +0 -0
  165. package/.yarn/cache/console-control-strings-npm-1.1.0-e3160e5275-8755d76787.zip +0 -0
  166. package/.yarn/cache/core-util-is-npm-1.0.3-ca74b76c90-9de8597363.zip +0 -0
  167. package/.yarn/cache/create-require-npm-1.1.1-839884ca2e-a9a1503d43.zip +0 -0
  168. package/.yarn/cache/cross-spawn-npm-7.0.3-e4ff3e65b3-671cc7c728.zip +0 -0
  169. package/.yarn/cache/debug-npm-4.3.4-4513954577-3dbad3f94e.zip +0 -0
  170. package/.yarn/cache/deepmerge-npm-4.2.2-112165ced2-a8c43a1ed8.zip +0 -0
  171. package/.yarn/cache/defaults-npm-1.0.4-f3fbaf2528-3a88b7a587.zip +0 -0
  172. package/.yarn/cache/delegates-npm-1.0.0-9b1942d75f-a51744d9b5.zip +0 -0
  173. package/.yarn/cache/deprecation-npm-2.3.1-e19c92d6e7-f56a05e182.zip +0 -0
  174. package/.yarn/cache/detect-package-manager-npm-2.0.1-e5377363d9-e72b910182.zip +0 -0
  175. package/.yarn/cache/diff-npm-4.0.2-73133c7102-f2c09b0ce4.zip +0 -0
  176. package/.yarn/cache/dir-glob-npm-3.0.1-1aea628b1b-fa05e18324.zip +0 -0
  177. package/.yarn/cache/dom-serializer-npm-2.0.0-378ebc7200-cd1810544f.zip +0 -0
  178. package/.yarn/cache/domelementtype-npm-2.3.0-02de7cbfba-ee837a318f.zip +0 -0
  179. package/.yarn/cache/domhandler-npm-5.0.3-3ede73dc10-0f58f4a6af.zip +0 -0
  180. package/.yarn/cache/domutils-npm-3.0.1-7937818218-23aa7a8405.zip +0 -0
  181. package/.yarn/cache/duplexer2-npm-0.1.4-6bca6bef12-744961f03c.zip +0 -0
  182. package/.yarn/cache/eastasianwidth-npm-0.2.0-c37eb16bd1-7d00d7cd8e.zip +0 -0
  183. package/.yarn/cache/editorconfig-npm-0.15.3-873be190a7-a94afeda19.zip +0 -0
  184. package/.yarn/cache/emoji-regex-npm-8.0.0-213764015c-d4c5c39d5a.zip +0 -0
  185. package/.yarn/cache/emoji-regex-npm-9.2.2-e6fac8d058-8487182da7.zip +0 -0
  186. package/.yarn/cache/encoding-npm-0.1.13-82a1837d30-bb98632f8f.zip +0 -0
  187. package/.yarn/cache/entities-npm-4.4.0-97635dc5cc-84d250329f.zip +0 -0
  188. package/.yarn/cache/env-paths-npm-2.2.1-7c7577428c-65b5df55a8.zip +0 -0
  189. package/.yarn/cache/err-code-npm-2.0.3-082e0ff9a7-8b7b1be20d.zip +0 -0
  190. package/.yarn/cache/error-ex-npm-1.3.2-5654f80c0f-c1c2b8b65f.zip +0 -0
  191. package/.yarn/cache/esbuild-npm-0.16.4-ac3d3897e5-c06e9b2e84.zip +0 -0
  192. package/.yarn/cache/escape-string-regexp-npm-1.0.5-3284de402f-6092fda75c.zip +0 -0
  193. package/.yarn/cache/esprima-npm-4.0.1-1084e98778-b45bc805a6.zip +0 -0
  194. package/.yarn/cache/execa-npm-5.1.1-191347acf5-fba9022c8c.zip +0 -0
  195. package/.yarn/cache/exponential-backoff-npm-3.1.1-04df458b30-3d21519a4f.zip +0 -0
  196. package/.yarn/cache/extend-shallow-npm-2.0.1-e6ef52b29c-8fb58d9d7a.zip +0 -0
  197. package/.yarn/cache/fast-folder-size-npm-1.6.1-2b11f9e719-3e85cb5960.zip +0 -0
  198. package/.yarn/cache/fast-glob-npm-3.2.12-162763bbae-0b1990f6ce.zip +0 -0
  199. package/.yarn/cache/fastq-npm-1.13.0-a45963881c-32cf15c29a.zip +0 -0
  200. package/.yarn/cache/fill-range-npm-7.0.1-b8b1817caa-cc283f4e65.zip +0 -0
  201. package/.yarn/cache/find-up-npm-4.1.0-c3ccf8d855-4c172680e8.zip +0 -0
  202. package/.yarn/cache/foreground-child-npm-3.1.1-77e78ed774-139d270bc8.zip +0 -0
  203. package/.yarn/cache/fs-extra-npm-11.1.1-ca44602180-fb883c6824.zip +0 -0
  204. package/.yarn/cache/fs-extra-npm-8.1.0-197473387f-bf44f0e6ce.zip +0 -0
  205. package/.yarn/cache/fs-minipass-npm-2.1.0-501ef87306-1b8d128dae.zip +0 -0
  206. package/.yarn/cache/fs-minipass-npm-3.0.3-d148d6ac19-8722a41109.zip +0 -0
  207. package/.yarn/cache/fs.realpath-npm-1.0.0-c8f05d8126-99ddea01a7.zip +0 -0
  208. package/.yarn/cache/fsevents-npm-2.3.2-a881d6ac9f-97ade64e75.zip +0 -0
  209. package/.yarn/cache/fsevents-patch-2882183fbf-8.zip +0 -0
  210. package/.yarn/cache/fstream-npm-1.0.12-db27e8a713-e6998651ae.zip +0 -0
  211. package/.yarn/cache/function-bind-npm-1.1.1-b56b322ae9-b32fbaebb3.zip +0 -0
  212. package/.yarn/cache/gauge-npm-4.0.4-8f878385e9-788b6bfe52.zip +0 -0
  213. package/.yarn/cache/get-stream-npm-6.0.1-83e51a4642-e04ecece32.zip +0 -0
  214. package/.yarn/cache/glob-npm-10.3.9-a41b2187b4-806a4ef571.zip +0 -0
  215. package/.yarn/cache/glob-npm-7.2.3-2d866d17a5-29452e97b3.zip +0 -0
  216. package/.yarn/cache/glob-npm-8.0.3-750f909025-50bcdea19d.zip +0 -0
  217. package/.yarn/cache/glob-parent-npm-5.1.2-021ab32634-f4f2bfe242.zip +0 -0
  218. package/.yarn/cache/globby-npm-11.1.0-bdcdf20c71-b4be8885e0.zip +0 -0
  219. package/.yarn/cache/graceful-fs-npm-4.2.10-79c70989ca-3f109d70ae.zip +0 -0
  220. package/.yarn/cache/graceful-fs-npm-4.2.11-24bb648a68-ac85f94da9.zip +0 -0
  221. package/.yarn/cache/has-flag-npm-3.0.0-16ac11fe05-4a15638b45.zip +0 -0
  222. package/.yarn/cache/has-flag-npm-4.0.0-32af9f0536-261a135703.zip +0 -0
  223. package/.yarn/cache/has-npm-1.0.3-b7f00631c1-b9ad53d53b.zip +0 -0
  224. package/.yarn/cache/has-unicode-npm-2.0.1-893adb4747-1eab07a743.zip +0 -0
  225. package/.yarn/cache/hosted-git-info-npm-2.8.9-62c44fa93f-c955394bda.zip +0 -0
  226. package/.yarn/cache/html-to-text-npm-9.0.3-27f776e12e-4509edd5c0.zip +0 -0
  227. package/.yarn/cache/htmlparser2-npm-8.0.1-b432299617-06d5c71e83.zip +0 -0
  228. package/.yarn/cache/http-cache-semantics-npm-4.1.1-1120131375-83ac0bc60b.zip +0 -0
  229. package/.yarn/cache/http-proxy-agent-npm-5.0.0-7f1f121b83-e2ee1ff165.zip +0 -0
  230. package/.yarn/cache/https-proxy-agent-npm-5.0.1-42d65f358e-571fccdf38.zip +0 -0
  231. package/.yarn/cache/human-signals-npm-2.1.0-f75815481d-b87fd89fce.zip +0 -0
  232. package/.yarn/cache/humanize-ms-npm-1.2.1-e942bd7329-9c7a74a282.zip +0 -0
  233. package/.yarn/cache/iconv-lite-npm-0.6.3-24b8aae27e-3f60d47a5c.zip +0 -0
  234. package/.yarn/cache/ieee754-npm-1.2.1-fb63b3caeb-5144c0c981.zip +0 -0
  235. package/.yarn/cache/ignore-npm-5.2.1-208dc99ae8-7251d00cba.zip +0 -0
  236. package/.yarn/cache/imurmurhash-npm-0.1.4-610c5068a0-7cae75c8cd.zip +0 -0
  237. package/.yarn/cache/indent-string-npm-4.0.0-7b717435b2-824cfb9929.zip +0 -0
  238. package/.yarn/cache/inflight-npm-1.0.6-ccedb4b908-f4f76aa072.zip +0 -0
  239. package/.yarn/cache/inherits-npm-2.0.4-c66b3957a0-4a48a73384.zip +0 -0
  240. package/.yarn/cache/ini-npm-1.3.8-fb5040b4c0-dfd98b0ca3.zip +0 -0
  241. package/.yarn/cache/interpret-npm-1.4.0-17b4b5b0a4-2e5f51268b.zip +0 -0
  242. package/.yarn/cache/ip-npm-2.0.0-204facb3cc-cfcfac6b87.zip +0 -0
  243. package/.yarn/cache/is-arrayish-npm-0.2.1-23927dfb15-eef4417e3c.zip +0 -0
  244. package/.yarn/cache/is-binary-path-npm-2.1.0-e61d46f557-84192eb88c.zip +0 -0
  245. package/.yarn/cache/is-buffer-npm-1.1.6-08199d9ccc-4a186d995d.zip +0 -0
  246. package/.yarn/cache/is-core-module-npm-2.11.0-70061e141a-f96fd490c6.zip +0 -0
  247. package/.yarn/cache/is-extendable-npm-0.1.1-322b4649ec-3875571d20.zip +0 -0
  248. package/.yarn/cache/is-extglob-npm-2.1.1-0870ea68b5-df033653d0.zip +0 -0
  249. package/.yarn/cache/is-fullwidth-code-point-npm-3.0.0-1ecf4ebee5-44a30c2945.zip +0 -0
  250. package/.yarn/cache/is-glob-npm-4.0.3-cb87bf1bdb-d381c1319f.zip +0 -0
  251. package/.yarn/cache/is-interactive-npm-1.0.0-7ff7c6e04a-824808776e.zip +0 -0
  252. package/.yarn/cache/is-lambda-npm-1.0.1-7ab55bc8a8-93a32f0194.zip +0 -0
  253. package/.yarn/cache/is-number-npm-7.0.0-060086935c-456ac6f8e0.zip +0 -0
  254. package/.yarn/cache/is-plain-object-npm-5.0.0-285b70faa3-e32d27061e.zip +0 -0
  255. package/.yarn/cache/is-stream-npm-2.0.1-c802db55e7-b8e05ccdf9.zip +0 -0
  256. package/.yarn/cache/is-unicode-supported-npm-0.1.0-0833e1bbfb-a2aab86ee7.zip +0 -0
  257. package/.yarn/cache/is-whitespace-npm-0.3.0-994f2b3b8c-dac8fc9a9b.zip +0 -0
  258. package/.yarn/cache/isarray-npm-1.0.0-db4f547720-f032df8e02.zip +0 -0
  259. package/.yarn/cache/isexe-npm-2.0.0-b58870bd2e-26bf6c5480.zip +0 -0
  260. package/.yarn/cache/jackspeak-npm-2.3.5-c631837bc0-c2c211f13c.zip +0 -0
  261. package/.yarn/cache/jju-npm-1.4.0-670678eaa3-3790481bd2.zip +0 -0
  262. package/.yarn/cache/js-beautify-npm-1.14.7-31d479fd5c-1950d0d3f0.zip +0 -0
  263. package/.yarn/cache/js-tokens-npm-4.0.0-0ac852e9e2-8a95213a5a.zip +0 -0
  264. package/.yarn/cache/js-yaml-npm-3.14.1-b968c6095e-bef146085f.zip +0 -0
  265. package/.yarn/cache/json-parse-even-better-errors-npm-2.3.1-144d62256e-798ed4cf33.zip +0 -0
  266. package/.yarn/cache/jsonfile-npm-4.0.0-10ce3aea15-6447d6224f.zip +0 -0
  267. package/.yarn/cache/jsonfile-npm-6.1.0-20a4796cee-7af3b8e1ac.zip +0 -0
  268. package/.yarn/cache/kind-of-npm-3.2.2-7deaffa5f9-e898df8ca2.zip +0 -0
  269. package/.yarn/cache/leac-npm-0.6.0-79f7890bc5-a7a722cfc2.zip +0 -0
  270. package/.yarn/cache/lines-and-columns-npm-1.2.4-d6c7cc5799-0c37f9f7fa.zip +0 -0
  271. package/.yarn/cache/listenercount-npm-1.0.1-01172e4210-0f1c9077cd.zip +0 -0
  272. package/.yarn/cache/locate-path-npm-5.0.0-46580c43e4-83e51725e6.zip +0 -0
  273. package/.yarn/cache/log-symbols-npm-4.1.0-0a13492d8b-fce1497b31.zip +0 -0
  274. package/.yarn/cache/loose-envify-npm-1.4.0-6307b72ccf-6517e24e0c.zip +0 -0
  275. package/.yarn/cache/lru-cache-npm-10.0.1-0e1abf4c13-06f8d0e1ce.zip +0 -0
  276. package/.yarn/cache/lru-cache-npm-4.1.5-ede304cc43-4bb4b58a36.zip +0 -0
  277. package/.yarn/cache/lru-cache-npm-6.0.0-b4c8668fe1-f97f499f89.zip +0 -0
  278. package/.yarn/cache/lru-cache-npm-7.18.3-e68be5b11c-e550d77238.zip +0 -0
  279. package/.yarn/cache/make-error-npm-1.3.6-ccb85d9458-b86e5e0e25.zip +0 -0
  280. package/.yarn/cache/make-fetch-happen-npm-11.1.1-f32b79aaaa-7268bf274a.zip +0 -0
  281. package/.yarn/cache/merge-stream-npm-2.0.0-2ac83efea5-6fa4dcc8d8.zip +0 -0
  282. package/.yarn/cache/merge2-npm-1.4.1-a2507bd06c-7268db63ed.zip +0 -0
  283. package/.yarn/cache/micromatch-npm-4.0.5-cfab5d7669-02a17b671c.zip +0 -0
  284. package/.yarn/cache/mimic-fn-npm-2.1.0-4fbeb3abb4-d2421a3444.zip +0 -0
  285. package/.yarn/cache/minimatch-npm-3.1.2-9405269906-c154e56640.zip +0 -0
  286. package/.yarn/cache/minimatch-npm-5.1.1-521233e3d2-215edd0978.zip +0 -0
  287. package/.yarn/cache/minimatch-npm-9.0.3-69d7d6fad5-253487976b.zip +0 -0
  288. package/.yarn/cache/minimist-npm-1.2.7-51d33b1371-7346574a10.zip +0 -0
  289. package/.yarn/cache/minipass-collect-npm-1.0.2-3b4676eab5-14df761028.zip +0 -0
  290. package/.yarn/cache/minipass-fetch-npm-3.0.4-200ac7c66d-af7aad15d5.zip +0 -0
  291. package/.yarn/cache/minipass-flush-npm-1.0.5-efe79d9826-56269a0b22.zip +0 -0
  292. package/.yarn/cache/minipass-npm-3.3.6-b8d93a945b-a30d083c80.zip +0 -0
  293. package/.yarn/cache/minipass-npm-5.0.0-c64fb63c92-425dab2887.zip +0 -0
  294. package/.yarn/cache/minipass-npm-7.0.3-3b57909ee9-6f1614f5b5.zip +0 -0
  295. package/.yarn/cache/minipass-pipeline-npm-1.2.4-5924cb077f-b14240dac0.zip +0 -0
  296. package/.yarn/cache/minipass-sized-npm-1.0.3-306d86f432-79076749fc.zip +0 -0
  297. package/.yarn/cache/minizlib-npm-2.1.2-ea89cd0cfb-f1fdeac0b0.zip +0 -0
  298. package/.yarn/cache/mkdirp-npm-0.5.6-dcd5a6b97b-0c91b721bb.zip +0 -0
  299. package/.yarn/cache/mkdirp-npm-1.0.4-37f6ef56b9-a96865108c.zip +0 -0
  300. package/.yarn/cache/ms-npm-2.1.2-ec0c1512ff-673cdb2c31.zip +0 -0
  301. package/.yarn/cache/ms-npm-2.1.3-81ff3cfac1-aa92de6080.zip +0 -0
  302. package/.yarn/cache/negotiator-npm-0.6.3-9d50e36171-b8ffeb1e26.zip +0 -0
  303. package/.yarn/cache/node-fetch-npm-2.6.8-ddb8bfc274-91f57be68e.zip +0 -0
  304. package/.yarn/cache/node-gyp-npm-9.4.0-ebf5f5573e-78b404e2e0.zip +0 -0
  305. package/.yarn/cache/nopt-npm-6.0.0-5ea8050815-82149371f8.zip +0 -0
  306. package/.yarn/cache/normalize-package-data-npm-2.5.0-af0345deed-7999112efc.zip +0 -0
  307. package/.yarn/cache/normalize-path-npm-3.0.0-658ba7d77f-88eeb4da89.zip +0 -0
  308. package/.yarn/cache/npm-run-path-npm-4.0.1-7aebd8bab3-5374c0cea4.zip +0 -0
  309. package/.yarn/cache/npmlog-npm-6.0.2-e0e69455c7-ae238cd264.zip +0 -0
  310. package/.yarn/cache/once-npm-1.4.0-ccf03ef07a-cd0a885013.zip +0 -0
  311. package/.yarn/cache/onetime-npm-5.1.2-3ed148fa42-2478859ef8.zip +0 -0
  312. package/.yarn/cache/ora-npm-5.4.1-4f0343adb7-28d476ee6c.zip +0 -0
  313. package/.yarn/cache/p-limit-npm-2.3.0-94a0310039-84ff17f1a3.zip +0 -0
  314. package/.yarn/cache/p-locate-npm-4.1.0-eec6872537-513bd14a45.zip +0 -0
  315. package/.yarn/cache/p-map-npm-4.0.0-4677ae07c7-cb0ab21ec0.zip +0 -0
  316. package/.yarn/cache/p-try-npm-2.2.0-e0390dbaf8-f8a8e9a769.zip +0 -0
  317. package/.yarn/cache/parse-json-npm-5.2.0-00a63b1199-62085b17d6.zip +0 -0
  318. package/.yarn/cache/parseley-npm-0.11.0-5969ada3fb-cbd4762bf7.zip +0 -0
  319. package/.yarn/cache/path-exists-npm-4.0.0-e9e4f63eb0-505807199d.zip +0 -0
  320. package/.yarn/cache/path-is-absolute-npm-1.0.1-31bc695ffd-060840f92c.zip +0 -0
  321. package/.yarn/cache/path-key-npm-3.1.1-0e66ea8321-55cd7a9dd4.zip +0 -0
  322. package/.yarn/cache/path-parse-npm-1.0.7-09564527b7-49abf3d811.zip +0 -0
  323. package/.yarn/cache/path-scurry-npm-1.10.1-52bd946f2e-e2557cff3a.zip +0 -0
  324. package/.yarn/cache/path-type-npm-4.0.0-10d47fc86a-5b1e2daa24.zip +0 -0
  325. package/.yarn/cache/peberminta-npm-0.8.0-24ccdcb8be-77d8c02b70.zip +0 -0
  326. package/.yarn/cache/picomatch-npm-2.3.1-c782cfd986-050c865ce8.zip +0 -0
  327. package/.yarn/cache/pify-npm-4.0.1-062756097b-9c4e34278c.zip +0 -0
  328. package/.yarn/cache/prettier-npm-3.0.0-7ffbcce680-6a832876a1.zip +0 -0
  329. package/.yarn/cache/pretty-bytes-npm-5.6.0-0061079c9f-9c082500d1.zip +0 -0
  330. package/.yarn/cache/pretty-npm-2.0.0-9c25795870-9c41ae0559.zip +0 -0
  331. package/.yarn/cache/process-nextick-args-npm-2.0.1-b8d7971609-1d38588e52.zip +0 -0
  332. package/.yarn/cache/promise-retry-npm-2.0.1-871f0b01b7-f96a3f6d90.zip +0 -0
  333. package/.yarn/cache/proto-list-npm-1.2.4-a96a43df28-4d4826e171.zip +0 -0
  334. package/.yarn/cache/pseudomap-npm-1.0.2-0d0e40fee0-856c0aae0f.zip +0 -0
  335. package/.yarn/cache/queue-microtask-npm-1.2.3-fcc98e4e2d-b676f8c040.zip +0 -0
  336. package/.yarn/cache/react-dom-npm-18.2.0-dd675bca1c-7d323310be.zip +0 -0
  337. package/.yarn/cache/react-npm-18.2.0-1eae08fee2-88e38092da.zip +0 -0
  338. package/.yarn/cache/read-pkg-npm-5.2.0-50426bd8dc-eb696e6052.zip +0 -0
  339. package/.yarn/cache/read-yaml-file-npm-1.1.0-52eaf1c9d4-41ee5f0755.zip +0 -0
  340. package/.yarn/cache/readable-stream-npm-2.3.7-77b22a9818-e4920cf754.zip +0 -0
  341. package/.yarn/cache/readable-stream-npm-3.6.0-23a4a5eb56-d4ea81502d.zip +0 -0
  342. package/.yarn/cache/readable-stream-npm-3.6.2-d2a6069158-bdcbe6c22e.zip +0 -0
  343. package/.yarn/cache/readdirp-npm-3.6.0-f950cc74ab-1ced032e6e.zip +0 -0
  344. package/.yarn/cache/rechoir-npm-0.6.2-0df5f171ec-fe76bf9c21.zip +0 -0
  345. package/.yarn/cache/resolve-npm-1.22.1-3980488690-07af5fc1e8.zip +0 -0
  346. package/.yarn/cache/resolve-patch-0c52e0e4f7-5656f4d0be.zip +0 -0
  347. package/.yarn/cache/restore-cursor-npm-3.1.0-52c5a4c98f-f877dd8741.zip +0 -0
  348. package/.yarn/cache/retry-npm-0.12.0-72ac7fb4cc-623bd7d2e5.zip +0 -0
  349. package/.yarn/cache/reusify-npm-1.0.4-95ac4aec11-c3076ebcc2.zip +0 -0
  350. package/.yarn/cache/rimraf-npm-2.7.1-9a71f3cc37-cdc7f6eacb.zip +0 -0
  351. package/.yarn/cache/rimraf-npm-3.0.2-2cb7dac69a-87f4164e39.zip +0 -0
  352. package/.yarn/cache/run-parallel-npm-1.2.0-3f47ff2034-cb4f97ad25.zip +0 -0
  353. package/.yarn/cache/safe-buffer-npm-5.1.2-c27fedf6c4-f2f1f7943c.zip +0 -0
  354. package/.yarn/cache/safe-buffer-npm-5.2.1-3481c8aa9b-b99c4b41fd.zip +0 -0
  355. package/.yarn/cache/safer-buffer-npm-2.1.2-8d5c0b705e-cab8f25ae6.zip +0 -0
  356. package/.yarn/cache/scheduler-npm-0.23.0-a379a6bc3b-d79192eeaa.zip +0 -0
  357. package/.yarn/cache/selderee-npm-0.10.0-c753260073-8ecd535fe8.zip +0 -0
  358. package/.yarn/cache/semver-npm-5.7.1-40bcea106b-57fd0acfd0.zip +0 -0
  359. package/.yarn/cache/semver-npm-7.5.4-c4ad957fcd-12d8ad952f.zip +0 -0
  360. package/.yarn/cache/set-blocking-npm-2.0.0-49e2cffa24-6e65a05f7c.zip +0 -0
  361. package/.yarn/cache/setimmediate-npm-1.0.5-54587459b6-c9a6f2c5b5.zip +0 -0
  362. package/.yarn/cache/shebang-command-npm-2.0.0-eb2b01921d-6b52fe8727.zip +0 -0
  363. package/.yarn/cache/shebang-regex-npm-3.0.0-899a0cd65e-1a2bcae50d.zip +0 -0
  364. package/.yarn/cache/shelljs-npm-0.8.5-44be43f84a-7babc46f73.zip +0 -0
  365. package/.yarn/cache/sigmund-npm-1.0.1-c0417d7c57-793f81f808.zip +0 -0
  366. package/.yarn/cache/signal-exit-npm-3.0.7-bd270458a3-a2f098f247.zip +0 -0
  367. package/.yarn/cache/signal-exit-npm-4.1.0-61fb957687-64c757b498.zip +0 -0
  368. package/.yarn/cache/slash-npm-3.0.0-b87de2279a-94a93fff61.zip +0 -0
  369. package/.yarn/cache/smart-buffer-npm-4.2.0-5ac3f668bb-b5167a7142.zip +0 -0
  370. package/.yarn/cache/socks-npm-2.7.1-17f2b53052-259d9e3e8e.zip +0 -0
  371. package/.yarn/cache/socks-proxy-agent-npm-7.0.0-7aacf32ea0-7205543701.zip +0 -0
  372. package/.yarn/cache/spdx-correct-npm-3.1.1-47f574c27a-77ce438344.zip +0 -0
  373. package/.yarn/cache/spdx-exceptions-npm-2.3.0-2b68dad75a-cb69a26fa3.zip +0 -0
  374. package/.yarn/cache/spdx-expression-parse-npm-3.0.1-b718cbb35a-a1c6e104a2.zip +0 -0
  375. package/.yarn/cache/spdx-license-ids-npm-3.0.12-750216a0df-92a4dddce6.zip +0 -0
  376. package/.yarn/cache/sprintf-js-npm-1.0.3-73f0a322fa-19d79aec21.zip +0 -0
  377. package/.yarn/cache/ssri-npm-10.0.5-1a7557d04d-0a31b65f21.zip +0 -0
  378. package/.yarn/cache/string-width-npm-4.2.3-2c27177bae-e52c10dc3f.zip +0 -0
  379. package/.yarn/cache/string-width-npm-5.1.2-bf60531341-7369deaa29.zip +0 -0
  380. package/.yarn/cache/string_decoder-npm-1.1.1-e46a6c1353-9ab7e56f9d.zip +0 -0
  381. package/.yarn/cache/string_decoder-npm-1.3.0-2422117fd0-8417646695.zip +0 -0
  382. package/.yarn/cache/strip-ansi-npm-6.0.1-caddc7cb40-f3cd25890a.zip +0 -0
  383. package/.yarn/cache/strip-ansi-npm-7.1.0-7453b80b79-859c73fcf2.zip +0 -0
  384. package/.yarn/cache/strip-bom-npm-3.0.0-71e8f81ff9-8d50ff27b7.zip +0 -0
  385. package/.yarn/cache/strip-final-newline-npm-2.0.0-340c4f7c66-69412b5e25.zip +0 -0
  386. package/.yarn/cache/supports-color-npm-5.5.0-183ac537bc-95f6f4ba5a.zip +0 -0
  387. package/.yarn/cache/supports-color-npm-7.2.0-606bfcf7da-3dda818de0.zip +0 -0
  388. package/.yarn/cache/supports-preserve-symlinks-flag-npm-1.0.0-f17c4d0028-53b1e247e6.zip +0 -0
  389. package/.yarn/cache/tar-npm-6.2.0-3eb25205a7-db4d9fe74a.zip +0 -0
  390. package/.yarn/cache/to-regex-range-npm-5.0.1-f1e8263b00-f76fa01b3d.zip +0 -0
  391. package/.yarn/cache/tr46-npm-0.0.3-de53018915-726321c5ea.zip +0 -0
  392. package/.yarn/cache/traverse-npm-0.3.9-913743c694-982982e4e2.zip +0 -0
  393. package/.yarn/cache/tree-node-cli-npm-1.6.0-b1b47ddc09-205422ccca.zip +0 -0
  394. package/.yarn/cache/ts-node-npm-10.9.1-6c268be7f4-090adff130.zip +0 -0
  395. package/.yarn/cache/type-fest-npm-0.6.0-76b229965b-b2188e6e4b.zip +0 -0
  396. package/.yarn/cache/typescript-npm-5.1.6-b157762de3-b2f2c35096.zip +0 -0
  397. package/.yarn/cache/typescript-patch-bd21d74a9d-f53bfe97f7.zip +0 -0
  398. package/.yarn/cache/unique-filename-npm-3.0.0-77d68e0a45-8e2f59b356.zip +0 -0
  399. package/.yarn/cache/unique-slug-npm-4.0.0-e6b08f28aa-0884b58365.zip +0 -0
  400. package/.yarn/cache/universal-user-agent-npm-6.0.0-b148fb997a-5092bbc80d.zip +0 -0
  401. package/.yarn/cache/universalify-npm-0.1.2-9b22d31d2d-40cdc60f6e.zip +0 -0
  402. package/.yarn/cache/universalify-npm-2.0.0-03b8b418a8-2406a4edf4.zip +0 -0
  403. package/.yarn/cache/unzipper-npm-0.10.11-7a1d871174-006cd43ec4.zip +0 -0
  404. package/.yarn/cache/util-deprecate-npm-1.0.2-e3fe1a219c-474acf1146.zip +0 -0
  405. package/.yarn/cache/v8-compile-cache-lib-npm-3.0.1-4886071ece-78089ad549.zip +0 -0
  406. package/.yarn/cache/validate-npm-package-license-npm-3.0.4-7af8adc7a8-35703ac889.zip +0 -0
  407. package/.yarn/cache/wcwidth-npm-1.0.1-05fa596453-814e9d1ddc.zip +0 -0
  408. package/.yarn/cache/webidl-conversions-npm-3.0.1-60310f6a2b-c92a0a6ab9.zip +0 -0
  409. package/.yarn/cache/whatwg-url-npm-5.0.0-374fb45e60-b8daed4ad3.zip +0 -0
  410. package/.yarn/cache/which-npm-2.0.2-320ddf72f7-1a5c563d3c.zip +0 -0
  411. package/.yarn/cache/wide-align-npm-1.1.5-889d77e592-d5fc37cd56.zip +0 -0
  412. package/.yarn/cache/wrap-ansi-npm-7.0.0-ad6e1a0554-a790b846fd.zip +0 -0
  413. package/.yarn/cache/wrap-ansi-npm-8.1.0-26a4e6ae28-371733296d.zip +0 -0
  414. package/.yarn/cache/wrappy-npm-1.0.2-916de4d4b3-159da4805f.zip +0 -0
  415. package/.yarn/cache/yallist-npm-2.1.2-2e38c366a3-9ba9940920.zip +0 -0
  416. package/.yarn/cache/yallist-npm-4.0.0-b493d9e907-343617202a.zip +0 -0
  417. package/.yarn/cache/yn-npm-3.1.1-8ad4259784-2c487b0e14.zip +0 -0
  418. package/.yarn/install-state.gz +0 -0
@@ -4,18 +4,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.PACKAGE_PUBLIC_PATH = exports.PACKAGE_EMAILS_PATH = exports.EVENT_FILE_DELETED = exports.REACT_EMAIL_ROOT = exports.USER_STATIC_FILES = exports.USER_PACKAGE_JSON = exports.CURRENT_PATH = exports.PACKAGE_NAME = exports.DEFAULT_EMAILS_DIRECTORY = void 0;
7
- const path_1 = __importDefault(require("path"));
7
+ var node_path_1 = __importDefault(require("node:path"));
8
8
  // Package variables
9
9
  exports.DEFAULT_EMAILS_DIRECTORY = 'emails';
10
10
  exports.PACKAGE_NAME = 'react-email';
11
11
  // Default paths
12
12
  exports.CURRENT_PATH = process.cwd();
13
13
  // User paths
14
- exports.USER_PACKAGE_JSON = path_1.default.join(exports.CURRENT_PATH, 'package.json');
15
- exports.USER_STATIC_FILES = path_1.default.join(exports.CURRENT_PATH, 'emails', 'static');
14
+ exports.USER_PACKAGE_JSON = node_path_1.default.join(exports.CURRENT_PATH, 'package.json');
15
+ exports.USER_STATIC_FILES = node_path_1.default.join(exports.CURRENT_PATH, 'emails', 'static');
16
16
  // React Email paths
17
- exports.REACT_EMAIL_ROOT = path_1.default.join(exports.CURRENT_PATH, '.react-email');
17
+ exports.REACT_EMAIL_ROOT = node_path_1.default.join(exports.CURRENT_PATH, '.react-email');
18
18
  // Events
19
19
  exports.EVENT_FILE_DELETED = 'unlink';
20
- exports.PACKAGE_EMAILS_PATH = path_1.default.join(exports.REACT_EMAIL_ROOT, exports.DEFAULT_EMAILS_DIRECTORY);
21
- exports.PACKAGE_PUBLIC_PATH = path_1.default.join(exports.REACT_EMAIL_ROOT, 'public');
20
+ exports.PACKAGE_EMAILS_PATH = node_path_1.default.join(exports.REACT_EMAIL_ROOT, exports.DEFAULT_EMAILS_DIRECTORY);
21
+ exports.PACKAGE_PUBLIC_PATH = node_path_1.default.join(exports.REACT_EMAIL_ROOT, 'public');
@@ -1 +1,2 @@
1
1
  export declare const convertToAbsolutePath: (dir: string) => string;
2
+ //# sourceMappingURL=convert-to-absolute-path.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convert-to-absolute-path.d.ts","sourceRoot":"","sources":["../../../source/utils/convert-to-absolute-path.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB,QAAS,MAAM,KAAG,MACQ,CAAC"}
@@ -4,6 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.convertToAbsolutePath = void 0;
7
- const path_1 = __importDefault(require("path"));
8
- const convertToAbsolutePath = (dir) => path_1.default.isAbsolute(dir) ? dir : path_1.default.join(process.cwd(), dir);
7
+ var node_path_1 = __importDefault(require("node:path"));
8
+ var convertToAbsolutePath = function (dir) {
9
+ return node_path_1.default.isAbsolute(dir) ? dir : node_path_1.default.join(process.cwd(), dir);
10
+ };
9
11
  exports.convertToAbsolutePath = convertToAbsolutePath;
@@ -1 +1,2 @@
1
1
  export declare const downloadClient: () => Promise<void>;
2
+ //# sourceMappingURL=download-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"download-client.d.ts","sourceRoot":"","sources":["../../../source/utils/download-client.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,cAAc,qBAqB1B,CAAC"}
@@ -1,26 +1,71 @@
1
1
  "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
2
38
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
39
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
40
  };
5
41
  Object.defineProperty(exports, "__esModule", { value: true });
6
42
  exports.downloadClient = void 0;
7
- const rest_1 = require("@octokit/rest");
8
- const fs_extra_1 = __importDefault(require("fs-extra"));
9
- const fs_1 = __importDefault(require("fs"));
10
- const shelljs_1 = __importDefault(require("shelljs"));
11
- const path_1 = __importDefault(require("path"));
12
- const downloadClient = async () => {
13
- const octokit = new rest_1.Octokit();
14
- const downloadRes = await octokit.repos.downloadTarballArchive({
15
- owner: 'resendlabs',
16
- repo: 'react-email',
17
- ref: 'v0.0.14',
43
+ var node_fs_1 = __importDefault(require("node:fs"));
44
+ var node_path_1 = __importDefault(require("node:path"));
45
+ var rest_1 = require("@octokit/rest");
46
+ var fs_extra_1 = __importDefault(require("fs-extra"));
47
+ var shelljs_1 = __importDefault(require("shelljs"));
48
+ var downloadClient = function () { return __awaiter(void 0, void 0, void 0, function () {
49
+ var octokit, downloadRes, TAR_PATH;
50
+ return __generator(this, function (_a) {
51
+ switch (_a.label) {
52
+ case 0:
53
+ octokit = new rest_1.Octokit();
54
+ return [4 /*yield*/, octokit.repos.downloadTarballArchive({
55
+ owner: 'resendlabs',
56
+ repo: 'react-email',
57
+ ref: 'v0.0.14',
58
+ })];
59
+ case 1:
60
+ downloadRes = _a.sent();
61
+ node_fs_1.default.mkdirSync('.react-email-temp');
62
+ TAR_PATH = node_path_1.default.join('.react-email-temp', 'react-email.tar.gz');
63
+ node_fs_1.default.writeFileSync(TAR_PATH, Buffer.from(downloadRes.data));
64
+ shelljs_1.default.exec("tar -xzvf .react-email-temp/react-email.tar.gz -C .react-email-temp --strip-components 1", { silent: true });
65
+ fs_extra_1.default.moveSync(node_path_1.default.join('.react-email-temp', 'client'), node_path_1.default.join('.react-email'));
66
+ fs_extra_1.default.removeSync('.react-email-temp');
67
+ return [2 /*return*/];
68
+ }
18
69
  });
19
- fs_1.default.mkdirSync('.react-email-temp');
20
- const TAR_PATH = path_1.default.join('.react-email-temp', 'react-email.tar.gz');
21
- fs_1.default.writeFileSync(TAR_PATH, Buffer.from(downloadRes.data));
22
- shelljs_1.default.exec(`tar -xzvf .react-email-temp/react-email.tar.gz -C .react-email-temp --strip-components 1`, { silent: true });
23
- fs_extra_1.default.moveSync(path_1.default.join('.react-email-temp', 'client'), path_1.default.join('.react-email'));
24
- fs_extra_1.default.removeSync('.react-email-temp');
25
- };
70
+ }); };
26
71
  exports.downloadClient = downloadClient;
@@ -1 +1,2 @@
1
1
  export declare const generateEmailsPreview: (emailDir: string, type?: 'all' | 'static' | 'templates') => Promise<void>;
2
+ //# sourceMappingURL=generate-email-preview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-email-preview.d.ts","sourceRoot":"","sources":["../../../source/utils/generate-email-preview.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,qBAAqB,aACtB,MAAM,SACV,KAAK,GAAG,QAAQ,GAAG,WAAW,kBAoBrC,CAAC"}
@@ -1,89 +1,148 @@
1
1
  "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
2
38
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
39
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
40
  };
5
41
  Object.defineProperty(exports, "__esModule", { value: true });
6
42
  exports.generateEmailsPreview = void 0;
7
- const log_symbols_1 = __importDefault(require("log-symbols"));
8
- const constants_1 = require("./constants");
9
- const fs_1 = __importDefault(require("fs"));
10
- const ora_1 = __importDefault(require("ora"));
11
- const shelljs_1 = __importDefault(require("shelljs"));
12
- const path_1 = __importDefault(require("path"));
13
- const fs_extra_1 = __importDefault(require("fs-extra"));
14
- const glob_1 = __importDefault(require("glob"));
15
- const close_ora_on_sigint_1 = require("./close-ora-on-sigint");
43
+ var node_fs_1 = __importDefault(require("node:fs"));
44
+ var node_path_1 = __importDefault(require("node:path"));
45
+ var ora_1 = __importDefault(require("ora"));
46
+ var shelljs_1 = __importDefault(require("shelljs"));
47
+ var log_symbols_1 = __importDefault(require("log-symbols"));
48
+ var fs_extra_1 = __importDefault(require("fs-extra"));
49
+ var glob_1 = require("glob");
50
+ var constants_1 = require("./constants");
51
+ var close_ora_on_sigint_1 = require("./close-ora-on-sigint");
16
52
  /**
17
- * Node.js and imports are requiring all imports to be /, while some functions (like glob) return paths with \ for path separation on windows
53
+ * Node.js and imports are requiring all imports to be /, while some functions (like glob) return paths with \\ for path separation on windows
18
54
  */
19
55
  function osIndependentPath(p) {
20
- return p.split(path_1.default.sep).join('/');
56
+ return p.split(node_path_1.default.sep).join('/');
21
57
  }
22
- const generateEmailsPreview = async (emailDir, type = 'all') => {
23
- try {
24
- const spinner = (0, ora_1.default)('Generating emails preview').start();
25
- (0, close_ora_on_sigint_1.closeOraOnSIGNIT)(spinner);
26
- if (type === 'all' || type === 'templates') {
27
- await createEmailPreviews(emailDir);
28
- }
29
- if (type === 'all' || type === 'static') {
30
- await createStaticFiles();
31
- }
32
- spinner.stopAndPersist({
33
- symbol: log_symbols_1.default.success,
34
- text: 'Emails preview generated',
58
+ var generateEmailsPreview = function (emailDir, type) {
59
+ if (type === void 0) { type = 'all'; }
60
+ return __awaiter(void 0, void 0, void 0, function () {
61
+ var spinner, error_1;
62
+ return __generator(this, function (_a) {
63
+ switch (_a.label) {
64
+ case 0:
65
+ _a.trys.push([0, 3, , 4]);
66
+ spinner = (0, ora_1.default)('Generating emails preview').start();
67
+ (0, close_ora_on_sigint_1.closeOraOnSIGNIT)(spinner);
68
+ if (type === 'all' || type === 'templates') {
69
+ createEmailPreviews(emailDir);
70
+ }
71
+ if (!(type === 'all' || type === 'static')) return [3 /*break*/, 2];
72
+ return [4 /*yield*/, createStaticFiles()];
73
+ case 1:
74
+ _a.sent();
75
+ _a.label = 2;
76
+ case 2:
77
+ spinner.stopAndPersist({
78
+ symbol: log_symbols_1.default.success,
79
+ text: 'Emails preview generated',
80
+ });
81
+ return [3 /*break*/, 4];
82
+ case 3:
83
+ error_1 = _a.sent();
84
+ console.log({ error: error_1 });
85
+ return [3 /*break*/, 4];
86
+ case 4: return [2 /*return*/];
87
+ }
35
88
  });
36
- }
37
- catch (error) {
38
- console.log({ error });
39
- }
89
+ });
40
90
  };
41
91
  exports.generateEmailsPreview = generateEmailsPreview;
42
- const createEmailPreviews = async (emailDir) => {
43
- const hasEmailsDirectory = fs_1.default.existsSync(constants_1.PACKAGE_EMAILS_PATH);
44
- if (hasEmailsDirectory) {
45
- await fs_1.default.promises.rm(constants_1.PACKAGE_EMAILS_PATH, { recursive: true });
92
+ var packageEmailsPath = osIndependentPath(constants_1.PACKAGE_EMAILS_PATH);
93
+ var createEmailPreviews = function (emailDir) {
94
+ if (node_fs_1.default.existsSync(constants_1.PACKAGE_EMAILS_PATH)) {
95
+ node_fs_1.default.rmSync(constants_1.PACKAGE_EMAILS_PATH, { recursive: true });
46
96
  }
47
- const list = glob_1.default.sync(osIndependentPath(path_1.default.join(emailDir, '/*.{jsx,tsx}')), {
97
+ node_fs_1.default.mkdirSync(packageEmailsPath);
98
+ var list = (0, glob_1.sync)(osIndependentPath(node_path_1.default.join(emailDir, '/*.{jsx,tsx}')), {
48
99
  absolute: true,
49
100
  });
50
101
  /**
51
102
  * instead of copying all files, which would break and js/ts imports,
52
103
  * we create placeholder files which just contain the following code:
53
104
  *
54
- * import Mail from '../../path/to/emails/my-template.tsx`
105
+ * import Mail from `../../path/to/emails/my-template.tsx`
55
106
  * export default Mail
56
107
  */
57
- for (const _absoluteSrcFilePath of list) {
58
- const absoluteSrcFilePath = osIndependentPath(_absoluteSrcFilePath);
59
- const fileName = absoluteSrcFilePath.split('/').pop();
60
- const targetFile = path_1.default.join(osIndependentPath(constants_1.PACKAGE_EMAILS_PATH), absoluteSrcFilePath.replace(osIndependentPath(emailDir), ''));
61
- const importPath = path_1.default.relative(path_1.default.dirname(targetFile), path_1.default.dirname(absoluteSrcFilePath));
62
- const importFile = osIndependentPath(path_1.default.join(importPath, fileName));
63
- // if this import is changed, you also need to update `client/src/app/preview/[slug]/page.tsx`
64
- const sourceCode = `import Mail from '${importFile}';export default Mail;`.replace(';', ';\n');
65
- await fs_extra_1.default.ensureDir(path_1.default.dirname(targetFile));
66
- if (fs_extra_1.default.existsSync(targetFile)) {
67
- if (fs_extra_1.default.readFileSync(targetFile, 'utf8') === sourceCode) {
68
- // file already exists, no need to trigger a rebuild.
69
- // can otherwise trigger the next.js rebuild multiple times
70
- continue;
71
- }
108
+ for (var _i = 0, list_1 = list; _i < list_1.length; _i++) {
109
+ var _absoluteSrcFilePath = list_1[_i];
110
+ var absoluteSrcFilePath = osIndependentPath(_absoluteSrcFilePath);
111
+ var fileName = absoluteSrcFilePath.split('/').pop();
112
+ if (fileName === undefined) {
113
+ throw new Error("Could not get file name from ".concat(absoluteSrcFilePath));
72
114
  }
73
- await fs_extra_1.default.writeFile(targetFile, sourceCode);
115
+ var targetFile = node_path_1.default.join(packageEmailsPath, absoluteSrcFilePath.replace(osIndependentPath(emailDir), ''));
116
+ var dirWithTargetFile = node_path_1.default.dirname(targetFile);
117
+ var importPath = node_path_1.default.relative(dirWithTargetFile, node_path_1.default.dirname(absoluteSrcFilePath));
118
+ var importFile = osIndependentPath(node_path_1.default.join(importPath, fileName));
119
+ // if this import is changed, you also need to update `client/src/app/preview/[slug]/page.tsx`
120
+ var sourceCode = "import Mail from '".concat(importFile, "';\nexport default Mail;\n");
121
+ node_fs_1.default.writeFileSync(targetFile, sourceCode);
74
122
  }
75
123
  };
76
- const createStaticFiles = async () => {
77
- const hasPublicDirectory = fs_1.default.existsSync(constants_1.PACKAGE_PUBLIC_PATH);
78
- if (hasPublicDirectory) {
79
- await fs_1.default.promises.rm(constants_1.PACKAGE_PUBLIC_PATH, { recursive: true });
80
- }
81
- await fs_extra_1.default.ensureDir(path_1.default.join(constants_1.PACKAGE_PUBLIC_PATH, 'static'));
82
- const userHasStaticDirectory = fs_1.default.existsSync(path_1.default.join(constants_1.CURRENT_PATH, 'static'));
83
- if (userHasStaticDirectory) {
84
- const result = shelljs_1.default.cp('-r', path_1.default.join(constants_1.CURRENT_PATH, 'static'), path_1.default.join(constants_1.PACKAGE_PUBLIC_PATH));
85
- if (result.code > 0) {
86
- throw new Error(`Something went wrong while copying the file to ${path_1.default.join(constants_1.CURRENT_PATH, 'static')}, ${result.cat()}`);
124
+ var createStaticFiles = function () { return __awaiter(void 0, void 0, void 0, function () {
125
+ var hasPublicDirectory, userHasStaticDirectory, result;
126
+ return __generator(this, function (_a) {
127
+ switch (_a.label) {
128
+ case 0:
129
+ hasPublicDirectory = node_fs_1.default.existsSync(constants_1.PACKAGE_PUBLIC_PATH);
130
+ if (!hasPublicDirectory) return [3 /*break*/, 2];
131
+ return [4 /*yield*/, node_fs_1.default.promises.rm(constants_1.PACKAGE_PUBLIC_PATH, { recursive: true })];
132
+ case 1:
133
+ _a.sent();
134
+ _a.label = 2;
135
+ case 2: return [4 /*yield*/, fs_extra_1.default.ensureDir(node_path_1.default.join(constants_1.PACKAGE_PUBLIC_PATH, 'static'))];
136
+ case 3:
137
+ _a.sent();
138
+ userHasStaticDirectory = node_fs_1.default.existsSync(node_path_1.default.join(constants_1.CURRENT_PATH, 'static'));
139
+ if (userHasStaticDirectory) {
140
+ result = shelljs_1.default.cp('-r', node_path_1.default.join(constants_1.CURRENT_PATH, 'static'), node_path_1.default.join(constants_1.PACKAGE_PUBLIC_PATH));
141
+ if (result.code > 0) {
142
+ throw new Error("Something went wrong while copying the file to ".concat(node_path_1.default.join(constants_1.CURRENT_PATH, 'static'), ", ").concat(result.cat()));
143
+ }
144
+ }
145
+ return [2 /*return*/];
87
146
  }
88
- }
89
- };
147
+ });
148
+ }); };
@@ -6,3 +6,4 @@ export * from './install-dependencies';
6
6
  export * from './start-server-command';
7
7
  export * from './sync-package';
8
8
  export * from './watcher';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export type PackageManager = 'yarn' | 'npm' | 'pnpm';
2
- export declare const installDependencies: (packageManager: PackageManager) => Promise<void>;
2
+ export declare const installDependencies: (packageManager: PackageManager) => void;
3
+ //# sourceMappingURL=install-dependencies.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install-dependencies.d.ts","sourceRoot":"","sources":["../../../source/utils/install-dependencies.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;AAErD,eAAO,MAAM,mBAAmB,mBAAoB,cAAc,SAUjE,CAAC"}
@@ -4,17 +4,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.installDependencies = void 0;
7
- const shelljs_1 = __importDefault(require("shelljs"));
8
- const path_1 = __importDefault(require("path"));
9
- const constants_1 = require("./constants");
10
- const ora_1 = __importDefault(require("ora"));
11
- const log_symbols_1 = __importDefault(require("log-symbols"));
12
- const close_ora_on_sigint_1 = require("./close-ora-on-sigint");
13
- const installDependencies = async (packageManager) => {
14
- const spinner = (0, ora_1.default)('Installing dependencies...\n').start();
7
+ var node_path_1 = __importDefault(require("node:path"));
8
+ var shelljs_1 = __importDefault(require("shelljs"));
9
+ var ora_1 = __importDefault(require("ora"));
10
+ var log_symbols_1 = __importDefault(require("log-symbols"));
11
+ var constants_1 = require("./constants");
12
+ var close_ora_on_sigint_1 = require("./close-ora-on-sigint");
13
+ var installDependencies = function (packageManager) {
14
+ var spinner = (0, ora_1.default)('Installing dependencies...\n').start();
15
15
  (0, close_ora_on_sigint_1.closeOraOnSIGNIT)(spinner);
16
- shelljs_1.default.cd(path_1.default.join(constants_1.REACT_EMAIL_ROOT));
17
- shelljs_1.default.exec(`${packageManager} install`);
16
+ shelljs_1.default.cd(node_path_1.default.join(constants_1.REACT_EMAIL_ROOT));
17
+ shelljs_1.default.exec("".concat(packageManager, " install"));
18
18
  spinner.stopAndPersist({
19
19
  symbol: log_symbols_1.default.success,
20
20
  text: 'Dependencies installed',
@@ -1,8 +1,9 @@
1
1
  /**
2
2
  * Utility function to run init/sync for the server in dev, build or start mode.
3
3
  *
4
- * @param type dev | build | start
5
- * @param dir Directory in which the emails are located, only for dev and build, unused for start.
6
- * @param port The port on which the server will run, only for dev and start, unused for build.
4
+ * @param type - dev | build | start
5
+ * @param dir - Directory in which the emails are located, only for dev and build, unused for start.
6
+ * @param port - The port on which the server will run, only for dev and start, unused for build.
7
7
  */
8
8
  export declare const setupServer: (type: 'dev' | 'build' | 'start', dir: string, port: string, skipInstall?: boolean) => Promise<void>;
9
+ //# sourceMappingURL=run-server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-server.d.ts","sourceRoot":"","sources":["../../../source/utils/run-server.ts"],"names":[],"mappings":"AAkBA;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,SAChB,KAAK,GAAG,OAAO,GAAG,OAAO,OAC1B,MAAM,QACL,MAAM,yCAgCb,CAAC"}
@@ -1,49 +1,102 @@
1
1
  "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
2
38
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
39
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
40
  };
5
41
  Object.defineProperty(exports, "__esModule", { value: true });
6
42
  exports.setupServer = void 0;
7
- const watcher_1 = require("./watcher");
8
- const detect_package_manager_1 = require("detect-package-manager");
9
- const find_root_1 = require("@manypkg/find-root");
10
- const _1 = require(".");
11
- const path_1 = __importDefault(require("path"));
12
- const shelljs_1 = __importDefault(require("shelljs"));
43
+ var node_path_1 = __importDefault(require("node:path"));
44
+ var detect_package_manager_1 = require("detect-package-manager");
45
+ var find_root_1 = require("@manypkg/find-root");
46
+ var shelljs_1 = __importDefault(require("shelljs"));
47
+ var watcher_1 = require("./watcher");
48
+ var _1 = require(".");
13
49
  /**
14
50
  * Utility function to run init/sync for the server in dev, build or start mode.
15
51
  *
16
- * @param type dev | build | start
17
- * @param dir Directory in which the emails are located, only for dev and build, unused for start.
18
- * @param port The port on which the server will run, only for dev and start, unused for build.
52
+ * @param type - dev | build | start
53
+ * @param dir - Directory in which the emails are located, only for dev and build, unused for start.
54
+ * @param port - The port on which the server will run, only for dev and start, unused for build.
19
55
  */
20
- const setupServer = async (type, dir, port, skipInstall = false) => {
21
- const cwd = await (0, find_root_1.findRoot)(_1.CURRENT_PATH).catch(() => ({
22
- rootDir: _1.CURRENT_PATH,
23
- }));
24
- const emailDir = (0, _1.convertToAbsolutePath)(dir);
25
- const packageManager = await (0, detect_package_manager_1.detect)({
26
- cwd: cwd.rootDir,
27
- }).catch(() => 'npm');
28
- // when starting, we dont need to worry about these because it should've already happened during the build stage.
29
- if (type !== 'start') {
30
- await (0, _1.generateEmailsPreview)(emailDir);
31
- await (0, _1.syncPkg)();
32
- if (!skipInstall) {
33
- await (0, _1.installDependencies)(packageManager);
34
- }
35
- }
36
- if (type === 'dev') {
37
- const watcherInstance = (0, watcher_1.createWatcherInstance)(emailDir);
38
- (0, _1.startDevServer)(packageManager, port);
39
- (0, watcher_1.watcher)(watcherInstance, emailDir);
40
- }
41
- else if (type === 'build') {
42
- (0, _1.buildProdServer)(packageManager);
43
- }
44
- else {
45
- shelljs_1.default.cd(path_1.default.join(_1.REACT_EMAIL_ROOT));
46
- (0, _1.startProdServer)(packageManager, port);
47
- }
56
+ var setupServer = function (type, dir, port, skipInstall) {
57
+ if (skipInstall === void 0) { skipInstall = false; }
58
+ return __awaiter(void 0, void 0, void 0, function () {
59
+ var cwd, emailDir, packageManager, watcherInstance;
60
+ return __generator(this, function (_a) {
61
+ switch (_a.label) {
62
+ case 0: return [4 /*yield*/, (0, find_root_1.findRoot)(_1.CURRENT_PATH).catch(function () { return ({
63
+ rootDir: _1.CURRENT_PATH,
64
+ }); })];
65
+ case 1:
66
+ cwd = _a.sent();
67
+ emailDir = (0, _1.convertToAbsolutePath)(dir);
68
+ return [4 /*yield*/, (0, detect_package_manager_1.detect)({
69
+ cwd: cwd.rootDir,
70
+ }).catch(function () { return 'npm'; })];
71
+ case 2:
72
+ packageManager = _a.sent();
73
+ if (!(type !== 'start')) return [3 /*break*/, 5];
74
+ return [4 /*yield*/, (0, _1.generateEmailsPreview)(emailDir)];
75
+ case 3:
76
+ _a.sent();
77
+ return [4 /*yield*/, (0, _1.syncPkg)()];
78
+ case 4:
79
+ _a.sent();
80
+ if (!skipInstall) {
81
+ (0, _1.installDependencies)(packageManager);
82
+ }
83
+ _a.label = 5;
84
+ case 5:
85
+ if (type === 'dev') {
86
+ watcherInstance = (0, watcher_1.createWatcherInstance)(emailDir);
87
+ (0, _1.startDevServer)(packageManager, port);
88
+ (0, watcher_1.watcher)(watcherInstance, emailDir);
89
+ }
90
+ else if (type === 'build') {
91
+ (0, _1.buildProdServer)(packageManager);
92
+ }
93
+ else {
94
+ shelljs_1.default.cd(node_path_1.default.join(_1.REACT_EMAIL_ROOT));
95
+ (0, _1.startProdServer)(packageManager, port);
96
+ }
97
+ return [2 /*return*/];
98
+ }
99
+ });
100
+ });
48
101
  };
49
102
  exports.setupServer = setupServer;
@@ -1,3 +1,4 @@
1
1
  export declare const startDevServer: (packageManager: string, port: string) => void;
2
2
  export declare const startProdServer: (packageManager: string, port: string) => void;
3
3
  export declare const buildProdServer: (packageManager: string) => void;
4
+ //# sourceMappingURL=start-server-command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start-server-command.d.ts","sourceRoot":"","sources":["../../../source/utils/start-server-command.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,cAAc,mBAAoB,MAAM,QAAQ,MAAM,SAElE,CAAC;AAEF,eAAO,MAAM,eAAe,mBAAoB,MAAM,QAAQ,MAAM,SAEnE,CAAC;AAEF,eAAO,MAAM,eAAe,mBAAoB,MAAM,SAOrD,CAAC"}