@nizza/devkit 0.1.0-alpha.2 → 0.1.0-alpha.3

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 (250) hide show
  1. package/dist/cjs/executors/deploy/helpers.d.ts +4 -0
  2. package/dist/cjs/executors/deploy/helpers.js +26 -0
  3. package/dist/cjs/executors/deploy/index.d.ts +11 -0
  4. package/dist/cjs/executors/deploy/index.js +22 -0
  5. package/dist/{src → cjs}/executors/environments/helpers.d.ts +4 -4
  6. package/dist/cjs/executors/environments/helpers.js +63 -0
  7. package/dist/{src/executors/environments/executor.d.ts → cjs/executors/environments/index.d.ts} +5 -5
  8. package/dist/cjs/executors/environments/index.js +54 -0
  9. package/dist/{src → cjs}/executors/publish/helpers.d.ts +3 -3
  10. package/dist/cjs/executors/publish/helpers.js +51 -0
  11. package/dist/cjs/executors/publish/index.d.ts +12 -0
  12. package/dist/cjs/executors/publish/index.js +53 -0
  13. package/dist/cjs/executors/shared/utils.d.ts +34 -0
  14. package/dist/cjs/executors/shared/utils.js +78 -0
  15. package/dist/{src → cjs}/executors/update-executors-file/helpers.d.ts +7 -6
  16. package/dist/cjs/executors/update-executors-file/helpers.js +76 -0
  17. package/dist/{src/executors/update-executors-file/executor.d.ts → cjs/executors/update-executors-file/index.d.ts} +5 -5
  18. package/dist/cjs/executors/update-executors-file/index.js +41 -0
  19. package/dist/cjs/executors/vtex-link/constants.d.ts +4 -0
  20. package/dist/cjs/executors/vtex-link/constants.js +9 -0
  21. package/dist/{src → cjs}/executors/vtex-link/helpers.d.ts +15 -15
  22. package/dist/cjs/executors/vtex-link/helpers.js +206 -0
  23. package/dist/cjs/executors/vtex-link/index.d.ts +5 -0
  24. package/dist/cjs/executors/vtex-link/index.js +30 -0
  25. package/dist/cjs/index-0ce2daf7.d.ts +2 -0
  26. package/dist/cjs/index-17143e35.d.ts +2 -0
  27. package/dist/cjs/index-3080371d.d.ts +3 -0
  28. package/dist/cjs/index-f6330edc.d.ts +2 -0
  29. package/dist/cjs/index.d.ts +10 -0
  30. package/dist/cjs/index.d.ts.map +1 -0
  31. package/dist/cjs/index.js +59 -0
  32. package/dist/cjs/scripts/changeset-pre-mode.d.ts +2 -0
  33. package/dist/cjs/scripts/changeset-pre-mode.js +41 -0
  34. package/dist/{src → cjs/shared}/logger.d.ts +5 -6
  35. package/dist/cjs/shared/logger.js +98 -0
  36. package/dist/{src → cjs}/shared/utils.d.ts +2 -2
  37. package/dist/cjs/shared/utils.js +25 -0
  38. package/dist/{src/executors/vtex-link/types.d.ts → cjs/types-1282e639.d.ts} +3 -3
  39. package/dist/cjs/types-7377dcc9.d.ts +4 -0
  40. package/dist/cjs/types-763439e4.d.ts +14 -0
  41. package/dist/cjs/vite/config-builder/configs/app.d.ts +4 -0
  42. package/dist/cjs/vite/config-builder/configs/app.js +13 -0
  43. package/dist/cjs/vite/config-builder/configs/base.d.ts +4 -0
  44. package/dist/cjs/vite/config-builder/configs/base.js +57 -0
  45. package/dist/cjs/vite/config-builder/configs/index.d.ts +7 -0
  46. package/dist/cjs/vite/config-builder/configs/index.js +36 -0
  47. package/dist/cjs/vite/config-builder/configs/lib.d.ts +4 -0
  48. package/dist/cjs/vite/config-builder/configs/lib.js +57 -0
  49. package/dist/cjs/vite/config-builder/configs/script.d.ts +4 -0
  50. package/dist/cjs/vite/config-builder/configs/script.js +45 -0
  51. package/dist/cjs/vite/config-builder/main.d.ts +10 -0
  52. package/dist/cjs/vite/config-builder/main.js +43 -0
  53. package/dist/{src → cjs}/vite/config-builder/plugins.d.ts +7 -7
  54. package/dist/cjs/vite/config-builder/plugins.js +95 -0
  55. package/dist/{src → cjs}/vite/config-builder/shared/types.d.ts +17 -17
  56. package/dist/cjs/vite/config-builder/shared/types.js +33 -0
  57. package/dist/{src → cjs}/vite/config-builder/shared/utils/helpers.d.ts +10 -10
  58. package/dist/cjs/vite/config-builder/shared/utils/helpers.js +124 -0
  59. package/dist/{src → cjs}/vite/config-builder/shared/utils/projectConfig.d.ts +8 -8
  60. package/dist/cjs/vite/config-builder/shared/utils/projectConfig.js +114 -0
  61. package/dist/{src → cjs}/vite/config-builder/shared/utils/viteCommand.d.ts +4 -4
  62. package/dist/cjs/vite/config-builder/shared/utils/viteCommand.js +59 -0
  63. package/dist/cjs/vite/plugins/shadow-dom-inject-css/index.d.ts +7 -0
  64. package/dist/{src → cjs}/vite/plugins/shadow-dom-inject-css/index.js +4 -19
  65. package/dist/cjs/vite/plugins/third-party-css-inject/main.d.ts +17 -0
  66. package/dist/{src → cjs}/vite/plugins/third-party-css-inject/main.js +13 -14
  67. package/dist/cjs/vite/plugins/third-party-css-inject/utils.d.ts +5 -0
  68. package/dist/{src → cjs}/vite/plugins/third-party-css-inject/utils.js +8 -20
  69. package/dist/esm/executors/deploy/helpers.d.ts +4 -0
  70. package/dist/esm/executors/deploy/helpers.js +22 -0
  71. package/dist/esm/executors/deploy/index.d.ts +11 -0
  72. package/dist/esm/executors/deploy/index.js +20 -0
  73. package/dist/esm/executors/deploy/schema.json +41 -0
  74. package/dist/esm/executors/environments/helpers.d.ts +21 -0
  75. package/dist/esm/executors/environments/helpers.js +59 -0
  76. package/dist/esm/executors/environments/index.d.ts +16 -0
  77. package/dist/{src/executors/environments/executor.js → esm/executors/environments/index.js} +23 -30
  78. package/dist/esm/executors/environments/schema.json +9 -0
  79. package/dist/esm/executors/publish/helpers.d.ts +19 -0
  80. package/dist/esm/executors/publish/helpers.js +48 -0
  81. package/dist/esm/executors/publish/index.d.ts +12 -0
  82. package/dist/esm/executors/publish/index.js +51 -0
  83. package/dist/esm/executors/publish/schema.json +19 -0
  84. package/dist/esm/executors/shared/utils.d.ts +34 -0
  85. package/dist/esm/executors/shared/utils.js +72 -0
  86. package/dist/esm/executors/update-executors-file/helpers.d.ts +25 -0
  87. package/dist/esm/executors/update-executors-file/helpers.js +71 -0
  88. package/dist/esm/executors/update-executors-file/index.d.ts +12 -0
  89. package/dist/esm/executors/update-executors-file/index.js +39 -0
  90. package/dist/esm/executors/update-executors-file/schema.json +9 -0
  91. package/dist/esm/executors/vtex-link/constants.d.ts +4 -0
  92. package/dist/esm/executors/vtex-link/constants.js +5 -0
  93. package/dist/esm/executors/vtex-link/helpers.d.ts +77 -0
  94. package/dist/esm/executors/vtex-link/helpers.js +192 -0
  95. package/dist/esm/executors/vtex-link/index.d.ts +5 -0
  96. package/dist/esm/executors/vtex-link/index.js +28 -0
  97. package/dist/esm/executors/vtex-link/schema.json +25 -0
  98. package/dist/esm/index-0ce2daf7.d.ts +2 -0
  99. package/dist/esm/index-17143e35.d.ts +2 -0
  100. package/dist/esm/index-3080371d.d.ts +3 -0
  101. package/dist/esm/index-f6330edc.d.ts +2 -0
  102. package/dist/esm/index.d.ts +10 -0
  103. package/dist/esm/index.d.ts.map +1 -0
  104. package/dist/esm/index.js +13 -0
  105. package/dist/esm/scripts/changeset-pre-mode.d.ts +2 -0
  106. package/dist/esm/scripts/changeset-pre-mode.js +39 -0
  107. package/dist/esm/shared/logger.d.ts +33 -0
  108. package/dist/{src → esm/shared}/logger.js +28 -39
  109. package/dist/esm/shared/utils.d.ts +11 -0
  110. package/dist/esm/shared/utils.js +23 -0
  111. package/dist/esm/types-1282e639.d.ts +12 -0
  112. package/dist/esm/types-7377dcc9.d.ts +4 -0
  113. package/dist/esm/types-763439e4.d.ts +14 -0
  114. package/dist/esm/vite/config-builder/configs/app.d.ts +4 -0
  115. package/dist/esm/vite/config-builder/configs/app.js +11 -0
  116. package/dist/esm/vite/config-builder/configs/base.d.ts +4 -0
  117. package/dist/{src → esm}/vite/config-builder/configs/base.js +22 -22
  118. package/dist/esm/vite/config-builder/configs/index.d.ts +7 -0
  119. package/dist/esm/vite/config-builder/configs/index.js +30 -0
  120. package/dist/esm/vite/config-builder/configs/lib.d.ts +4 -0
  121. package/dist/{src → esm}/vite/config-builder/configs/lib.js +16 -18
  122. package/dist/esm/vite/config-builder/configs/script.d.ts +4 -0
  123. package/dist/esm/vite/config-builder/configs/script.js +43 -0
  124. package/dist/esm/vite/config-builder/main.d.ts +10 -0
  125. package/dist/esm/vite/config-builder/main.js +41 -0
  126. package/dist/esm/vite/config-builder/plugins.d.ts +30 -0
  127. package/dist/esm/vite/config-builder/plugins.js +89 -0
  128. package/dist/esm/vite/config-builder/shared/types.d.ts +155 -0
  129. package/dist/{src → esm}/vite/config-builder/shared/types.js +2 -27
  130. package/dist/esm/vite/config-builder/shared/utils/helpers.d.ts +81 -0
  131. package/dist/esm/vite/config-builder/shared/utils/helpers.js +98 -0
  132. package/dist/esm/vite/config-builder/shared/utils/projectConfig.d.ts +60 -0
  133. package/dist/esm/vite/config-builder/shared/utils/projectConfig.js +109 -0
  134. package/dist/esm/vite/config-builder/shared/utils/viteCommand.d.ts +24 -0
  135. package/dist/esm/vite/config-builder/shared/utils/viteCommand.js +56 -0
  136. package/dist/esm/vite/plugins/shadow-dom-inject-css/index.d.ts +7 -0
  137. package/dist/esm/vite/plugins/shadow-dom-inject-css/index.js +27 -0
  138. package/dist/esm/vite/plugins/third-party-css-inject/main.d.ts +17 -0
  139. package/dist/esm/vite/plugins/third-party-css-inject/main.js +45 -0
  140. package/dist/esm/vite/plugins/third-party-css-inject/utils.d.ts +5 -0
  141. package/dist/esm/vite/plugins/third-party-css-inject/utils.js +97 -0
  142. package/dist/executors.json +29 -0
  143. package/package.json +36 -5
  144. package/dist/package.json +0 -13
  145. package/dist/src/executors/deploy/executor.d.ts +0 -11
  146. package/dist/src/executors/deploy/executor.d.ts.map +0 -1
  147. package/dist/src/executors/deploy/executor.js +0 -27
  148. package/dist/src/executors/deploy/helpers.d.ts +0 -4
  149. package/dist/src/executors/deploy/helpers.d.ts.map +0 -1
  150. package/dist/src/executors/deploy/helpers.js +0 -40
  151. package/dist/src/executors/environments/executor.d.ts.map +0 -1
  152. package/dist/src/executors/environments/helpers.d.ts.map +0 -1
  153. package/dist/src/executors/environments/helpers.js +0 -63
  154. package/dist/src/executors/publish/executor.d.ts +0 -12
  155. package/dist/src/executors/publish/executor.d.ts.map +0 -1
  156. package/dist/src/executors/publish/executor.js +0 -58
  157. package/dist/src/executors/publish/helpers.d.ts.map +0 -1
  158. package/dist/src/executors/publish/helpers.js +0 -52
  159. package/dist/src/executors/shared/index.d.ts +0 -3
  160. package/dist/src/executors/shared/index.d.ts.map +0 -1
  161. package/dist/src/executors/shared/index.js +0 -7
  162. package/dist/src/executors/shared/types.d.ts +0 -4
  163. package/dist/src/executors/shared/types.d.ts.map +0 -1
  164. package/dist/src/executors/shared/types.js +0 -4
  165. package/dist/src/executors/shared/utils.d.ts +0 -34
  166. package/dist/src/executors/shared/utils.d.ts.map +0 -1
  167. package/dist/src/executors/shared/utils.js +0 -78
  168. package/dist/src/executors/update-executors-file/executor.d.ts.map +0 -1
  169. package/dist/src/executors/update-executors-file/executor.js +0 -46
  170. package/dist/src/executors/update-executors-file/helpers.d.ts.map +0 -1
  171. package/dist/src/executors/update-executors-file/helpers.js +0 -70
  172. package/dist/src/executors/update-executors-file/types.d.ts +0 -14
  173. package/dist/src/executors/update-executors-file/types.d.ts.map +0 -1
  174. package/dist/src/executors/update-executors-file/types.js +0 -4
  175. package/dist/src/executors/vtex-link/constants.d.ts +0 -4
  176. package/dist/src/executors/vtex-link/constants.d.ts.map +0 -1
  177. package/dist/src/executors/vtex-link/constants.js +0 -24
  178. package/dist/src/executors/vtex-link/executor.d.ts +0 -5
  179. package/dist/src/executors/vtex-link/executor.d.ts.map +0 -1
  180. package/dist/src/executors/vtex-link/executor.js +0 -35
  181. package/dist/src/executors/vtex-link/helpers.d.ts.map +0 -1
  182. package/dist/src/executors/vtex-link/helpers.js +0 -187
  183. package/dist/src/executors/vtex-link/types.d.ts.map +0 -1
  184. package/dist/src/executors/vtex-link/types.js +0 -4
  185. package/dist/src/index.d.ts +0 -2
  186. package/dist/src/index.d.ts.map +0 -1
  187. package/dist/src/index.js +0 -6
  188. package/dist/src/logger.d.ts.map +0 -1
  189. package/dist/src/scripts/changeset-pre-mode.d.ts +0 -2
  190. package/dist/src/scripts/changeset-pre-mode.d.ts.map +0 -1
  191. package/dist/src/scripts/changeset-pre-mode.js +0 -41
  192. package/dist/src/shared/index.d.ts +0 -2
  193. package/dist/src/shared/index.d.ts.map +0 -1
  194. package/dist/src/shared/index.js +0 -6
  195. package/dist/src/shared/utils.d.ts.map +0 -1
  196. package/dist/src/shared/utils.js +0 -22
  197. package/dist/src/vite/config-builder/configs/app.d.ts +0 -4
  198. package/dist/src/vite/config-builder/configs/app.d.ts.map +0 -1
  199. package/dist/src/vite/config-builder/configs/app.js +0 -19
  200. package/dist/src/vite/config-builder/configs/base.d.ts +0 -4
  201. package/dist/src/vite/config-builder/configs/base.d.ts.map +0 -1
  202. package/dist/src/vite/config-builder/configs/index.d.ts +0 -7
  203. package/dist/src/vite/config-builder/configs/index.d.ts.map +0 -1
  204. package/dist/src/vite/config-builder/configs/index.js +0 -28
  205. package/dist/src/vite/config-builder/configs/lib.d.ts +0 -4
  206. package/dist/src/vite/config-builder/configs/lib.d.ts.map +0 -1
  207. package/dist/src/vite/config-builder/configs/script.d.ts +0 -4
  208. package/dist/src/vite/config-builder/configs/script.d.ts.map +0 -1
  209. package/dist/src/vite/config-builder/configs/script.js +0 -42
  210. package/dist/src/vite/config-builder/index.d.ts +0 -3
  211. package/dist/src/vite/config-builder/index.d.ts.map +0 -1
  212. package/dist/src/vite/config-builder/index.js +0 -7
  213. package/dist/src/vite/config-builder/main.d.ts +0 -10
  214. package/dist/src/vite/config-builder/main.d.ts.map +0 -1
  215. package/dist/src/vite/config-builder/main.js +0 -37
  216. package/dist/src/vite/config-builder/plugins.d.ts.map +0 -1
  217. package/dist/src/vite/config-builder/plugins.js +0 -88
  218. package/dist/src/vite/config-builder/shared/index.d.ts +0 -3
  219. package/dist/src/vite/config-builder/shared/index.d.ts.map +0 -1
  220. package/dist/src/vite/config-builder/shared/index.js +0 -7
  221. package/dist/src/vite/config-builder/shared/types.d.ts.map +0 -1
  222. package/dist/src/vite/config-builder/shared/utils/helpers.d.ts.map +0 -1
  223. package/dist/src/vite/config-builder/shared/utils/helpers.js +0 -61
  224. package/dist/src/vite/config-builder/shared/utils/index.d.ts +0 -4
  225. package/dist/src/vite/config-builder/shared/utils/index.d.ts.map +0 -1
  226. package/dist/src/vite/config-builder/shared/utils/index.js +0 -8
  227. package/dist/src/vite/config-builder/shared/utils/projectConfig.d.ts.map +0 -1
  228. package/dist/src/vite/config-builder/shared/utils/projectConfig.js +0 -85
  229. package/dist/src/vite/config-builder/shared/utils/viteCommand.d.ts.map +0 -1
  230. package/dist/src/vite/config-builder/shared/utils/viteCommand.js +0 -54
  231. package/dist/src/vite/index.d.ts +0 -3
  232. package/dist/src/vite/index.d.ts.map +0 -1
  233. package/dist/src/vite/index.js +0 -7
  234. package/dist/src/vite/plugins/index.d.ts +0 -3
  235. package/dist/src/vite/plugins/index.d.ts.map +0 -1
  236. package/dist/src/vite/plugins/index.js +0 -7
  237. package/dist/src/vite/plugins/shadow-dom-inject-css/index.d.ts +0 -8
  238. package/dist/src/vite/plugins/shadow-dom-inject-css/index.d.ts.map +0 -1
  239. package/dist/src/vite/plugins/third-party-css-inject/index.d.ts +0 -4
  240. package/dist/src/vite/plugins/third-party-css-inject/index.d.ts.map +0 -1
  241. package/dist/src/vite/plugins/third-party-css-inject/index.js +0 -13
  242. package/dist/src/vite/plugins/third-party-css-inject/main.d.ts +0 -17
  243. package/dist/src/vite/plugins/third-party-css-inject/main.d.ts.map +0 -1
  244. package/dist/src/vite/plugins/third-party-css-inject/utils.d.ts +0 -5
  245. package/dist/src/vite/plugins/third-party-css-inject/utils.d.ts.map +0 -1
  246. /package/dist/{src → cjs}/executors/deploy/schema.json +0 -0
  247. /package/dist/{src → cjs}/executors/environments/schema.json +0 -0
  248. /package/dist/{src → cjs}/executors/publish/schema.json +0 -0
  249. /package/dist/{src → cjs}/executors/update-executors-file/schema.json +0 -0
  250. /package/dist/{src → cjs}/executors/vtex-link/schema.json +0 -0
@@ -0,0 +1,77 @@
1
+ import { SharedContext } from "../../types-1282e639.js";
2
+ /**
3
+ * Links the local package to the VTEX environment.
4
+ *
5
+ * @param {SharedContext} ctx - The shared context containing paths and configurations.
6
+ * @returns {Promise<void>} A promise that resolves when the package is linked or rejects on error.
7
+ */
8
+ declare function vtexLink(ctx: SharedContext): Promise<void>;
9
+ /**
10
+ * Updates the package.json file within the VTEX project to use the local version of the package.
11
+ *
12
+ * @param {SharedContext} ctx - The shared context containing paths and configurations.
13
+ * @param {string} packageName - The name of the package to link.
14
+ * @returns {Promise<void>} A promise that resolves when the package.json is updated.
15
+ */
16
+ declare function changePackageJsonFromVtexProject(ctx: SharedContext, packageName: string): Promise<void>;
17
+ /**
18
+ * Restores the original package.json from the backup created before modifications.
19
+ *
20
+ * @param {SharedContext} ctx - The shared context containing paths and configurations.
21
+ * @returns {Promise<void>} A promise that resolves when the package.json is restored.
22
+ */
23
+ declare function restorePackageJsonFromVtexProject(ctx: SharedContext): Promise<void>;
24
+ /**
25
+ * Renames the generated package file with a unique identifier.
26
+ *
27
+ * @param {SharedContext} ctx - The shared context containing paths and configurations.
28
+ * @returns {Promise<string>} A promise that resolves with the new name of the package.
29
+ */
30
+ declare function renamePackage(ctx: SharedContext): Promise<string>;
31
+ /**
32
+ * Creates a pnpm package for uploading to VTEX.
33
+ *
34
+ * @param {SharedContext} ctx - The shared context containing paths and configurations.
35
+ * @returns {Promise<string>} A promise that resolves with the name of the created package.
36
+ */
37
+ declare function createPackage(ctx: SharedContext): Promise<string>;
38
+ /**
39
+ * Searches for and lists all outdated packages in the VTEX project directory.
40
+ *
41
+ * @param {SharedContext} ctx - The shared context containing paths and configurations.
42
+ * @returns {Promise<string[]>} A promise that resolves with a list of deprecated package names.
43
+ */
44
+ declare function findLastPackages(ctx: SharedContext): Promise<string[]>;
45
+ /**
46
+ * Removes all outdated packages in the VTEX project directory.
47
+ *
48
+ * @param {SharedContext} ctx - The shared context containing paths and configurations.
49
+ * @returns {Promise<void>} A promise that resolves when the old packages are removed.
50
+ */
51
+ declare function removeOldPackages(ctx: SharedContext): Promise<void>;
52
+ /**
53
+ * Moves a package to the VTEX project directory.
54
+ *
55
+ * @param {SharedContext} ctx - The shared context containing paths and configurations.
56
+ * @param {string} packageName - The name of the package to move.
57
+ * @returns {Promise<void>} A promise that resolves when the package is moved successfully.
58
+ */
59
+ declare function movePackage(ctx: SharedContext, packageName: string): Promise<void>;
60
+ /**
61
+ * Builds the package, moves it to the VTEX project, and updates the project's package.json.
62
+ *
63
+ * @param {SharedContext} ctx - The shared context containing paths and configurations.
64
+ * @returns {Promise<void>} A promise that resolves when the build is complete.
65
+ */
66
+ declare function buildPackage(ctx: SharedContext): Promise<void>;
67
+ /**
68
+ * Cleans the VTEX project by removing old packages and restoring the original package.json.
69
+ *
70
+ * @param {SharedContext} ctx - The shared context containing paths and configurations.
71
+ * @returns {Promise<void>} A promise that resolves when the clean-up is complete.
72
+ */
73
+ declare function clean(ctx: SharedContext): Promise<void>;
74
+ declare function validateEnvironment(): void;
75
+ declare function performRollback(sharedContext: SharedContext): Promise<import("../../index-f6330edc.js").ExecutorResponse>;
76
+ declare function buildAndLink(sharedContext: SharedContext, skipLink?: boolean): Promise<void>;
77
+ export { vtexLink, changePackageJsonFromVtexProject, restorePackageJsonFromVtexProject, renamePackage, createPackage, findLastPackages, removeOldPackages, movePackage, buildPackage, clean, validateEnvironment, performRollback, buildAndLink };
@@ -0,0 +1,192 @@
1
+ import { logger } from '@nx/devkit';
2
+ import { exec, spawn } from 'child_process';
3
+ import { promises, existsSync } from 'fs';
4
+ import { join, resolve } from 'path';
5
+ import { promisify } from 'util';
6
+ import '../../shared/logger.js';
7
+ import { getPkgJson } from '../../shared/utils.js';
8
+ import { ok, shortId } from '../shared/utils.js';
9
+ import { VTEX_PROJECT_PATH, ERROR_LINKING_FLAG, SUCCESS_LINKING_FLAG } from './constants.js';
10
+
11
+ const execAsync = promisify(exec);
12
+ const getPkgJsonPath = (vtexProjectPath)=>resolve(vtexProjectPath, 'package.json');
13
+ /**
14
+ * Links the local package to the VTEX environment.
15
+ *
16
+ * @param {SharedContext} ctx - The shared context containing paths and configurations.
17
+ * @returns {Promise<void>} A promise that resolves when the package is linked or rejects on error.
18
+ */ function vtexLink(ctx) {
19
+ const { vtexProjectPath } = ctx;
20
+ return new Promise((resolve, reject)=>{
21
+ logger.info('🔗 Linking package to VTEX...');
22
+ const link = spawn('vtex', [
23
+ 'link',
24
+ '-u'
25
+ ], {
26
+ cwd: vtexProjectPath,
27
+ detached: true
28
+ });
29
+ link.stdout.on('data', (chunk)=>{
30
+ const data = chunk.toString('utf8');
31
+ if (data.includes(ERROR_LINKING_FLAG)) {
32
+ reject('could not link package in VTEX');
33
+ }
34
+ if (data.includes(SUCCESS_LINKING_FLAG)) {
35
+ link.pid && process.kill(-link.pid);
36
+ setTimeout(()=>{
37
+ link.kill();
38
+ logger.info('✅ Successfully linked package to VTEX.');
39
+ }, 200);
40
+ resolve();
41
+ }
42
+ logger.info(data);
43
+ });
44
+ link.on('error', (error)=>reject(error.message));
45
+ });
46
+ }
47
+ /**
48
+ * Updates the package.json file within the VTEX project to use the local version of the package.
49
+ *
50
+ * @param {SharedContext} ctx - The shared context containing paths and configurations.
51
+ * @param {string} packageName - The name of the package to link.
52
+ * @returns {Promise<void>} A promise that resolves when the package.json is updated.
53
+ */ async function changePackageJsonFromVtexProject(ctx, packageName) {
54
+ const { vtexProjectPath, projectName, packageOrg } = ctx;
55
+ const pkgJsonPath = getPkgJsonPath(vtexProjectPath);
56
+ // Make backup of package.json
57
+ await promises.copyFile(pkgJsonPath, join(vtexProjectPath, 'package.json.nxback'));
58
+ logger.info('🔃 Created package.json backup.');
59
+ // Find and edit value "@${packageOrg}/${projectName}" dependency
60
+ const packageJson = getPkgJson(vtexProjectPath);
61
+ const newPackageJson = {
62
+ ...packageJson,
63
+ dependencies: {
64
+ ...packageJson.dependencies,
65
+ [`@${packageOrg}/${projectName}`]: `file:./${packageName}`
66
+ }
67
+ };
68
+ await promises.unlink(pkgJsonPath);
69
+ await promises.writeFile(pkgJsonPath, JSON.stringify(newPackageJson, null, 2));
70
+ logger.info('📝 Updated package.json in VTEX project.');
71
+ }
72
+ /**
73
+ * Restores the original package.json from the backup created before modifications.
74
+ *
75
+ * @param {SharedContext} ctx - The shared context containing paths and configurations.
76
+ * @returns {Promise<void>} A promise that resolves when the package.json is restored.
77
+ */ async function restorePackageJsonFromVtexProject(ctx) {
78
+ const { vtexProjectPath } = ctx;
79
+ const pkgJsonPath = getPkgJsonPath(vtexProjectPath);
80
+ const backupFile = resolve(vtexProjectPath, 'package.json.nxback');
81
+ if (!existsSync(backupFile)) return;
82
+ await promises.unlink(pkgJsonPath);
83
+ await promises.copyFile(backupFile, pkgJsonPath);
84
+ await promises.unlink(backupFile);
85
+ logger.info('🔄 Restored package.json in VTEX project.');
86
+ }
87
+ /**
88
+ * Renames the generated package file with a unique identifier.
89
+ *
90
+ * @param {SharedContext} ctx - The shared context containing paths and configurations.
91
+ * @returns {Promise<string>} A promise that resolves with the new name of the package.
92
+ */ async function renamePackage(ctx) {
93
+ const { projectRoot, projectName, packageOrg } = ctx;
94
+ const packageJson = getPkgJson('./');
95
+ const oldName = `${packageOrg}-${projectName}-${packageJson.version}.tgz`;
96
+ const oldPath = join(projectRoot, oldName);
97
+ const newName = `${packageOrg}-${projectName}-${packageJson.version}-${shortId(8)}.tgz`;
98
+ const newPath = join(projectRoot, newName);
99
+ await promises.rename(oldPath, newPath);
100
+ logger.info(`🏷️ New package name: ${newName}`);
101
+ return newName;
102
+ }
103
+ /**
104
+ * Creates a pnpm package for uploading to VTEX.
105
+ *
106
+ * @param {SharedContext} ctx - The shared context containing paths and configurations.
107
+ * @returns {Promise<string>} A promise that resolves with the name of the created package.
108
+ */ async function createPackage(ctx) {
109
+ const command = 'pnpm pack';
110
+ const { stderr } = await execAsync(command);
111
+ if (stderr) logger.error(stderr);
112
+ logger.info('📦 Package generated successfully.');
113
+ return renamePackage(ctx);
114
+ }
115
+ /**
116
+ * Searches for and lists all outdated packages in the VTEX project directory.
117
+ *
118
+ * @param {SharedContext} ctx - The shared context containing paths and configurations.
119
+ * @returns {Promise<string[]>} A promise that resolves with a list of deprecated package names.
120
+ */ async function findLastPackages(ctx) {
121
+ const { vtexProjectPath, projectName, packageOrg } = ctx;
122
+ const matchedFiles = [];
123
+ const files = await promises.readdir(vtexProjectPath);
124
+ for (const file of files){
125
+ const regex = new RegExp(`^${packageOrg}-${projectName}-.*$`);
126
+ if (regex.test(file)) {
127
+ matchedFiles.push(file);
128
+ logger.info(`🔍 Found deprecated package: ${file}`);
129
+ }
130
+ }
131
+ return matchedFiles;
132
+ }
133
+ /**
134
+ * Removes all outdated packages in the VTEX project directory.
135
+ *
136
+ * @param {SharedContext} ctx - The shared context containing paths and configurations.
137
+ * @returns {Promise<void>} A promise that resolves when the old packages are removed.
138
+ */ async function removeOldPackages(ctx) {
139
+ const { vtexProjectPath } = ctx;
140
+ const files = await findLastPackages(ctx);
141
+ const toRemove = files.map((x)=>promises.unlink(resolve(vtexProjectPath, x)));
142
+ await Promise.all(toRemove);
143
+ logger.info('🗑️ Removed old packages in VTEX project.');
144
+ }
145
+ /**
146
+ * Moves a package to the VTEX project directory.
147
+ *
148
+ * @param {SharedContext} ctx - The shared context containing paths and configurations.
149
+ * @param {string} packageName - The name of the package to move.
150
+ * @returns {Promise<void>} A promise that resolves when the package is moved successfully.
151
+ */ async function movePackage(ctx, packageName) {
152
+ const { vtexProjectPath } = ctx;
153
+ await promises.rename(resolve(packageName), join(vtexProjectPath, packageName));
154
+ logger.info(`🚚 Moved package "${packageName}" to VTEX project.`);
155
+ }
156
+ /**
157
+ * Builds the package, moves it to the VTEX project, and updates the project's package.json.
158
+ *
159
+ * @param {SharedContext} ctx - The shared context containing paths and configurations.
160
+ * @returns {Promise<void>} A promise that resolves when the build is complete.
161
+ */ async function buildPackage(ctx) {
162
+ const packageName = await createPackage(ctx);
163
+ await Promise.all([
164
+ movePackage(ctx, packageName),
165
+ changePackageJsonFromVtexProject(ctx, packageName)
166
+ ]);
167
+ }
168
+ /**
169
+ * Cleans the VTEX project by removing old packages and restoring the original package.json.
170
+ *
171
+ * @param {SharedContext} ctx - The shared context containing paths and configurations.
172
+ * @returns {Promise<void>} A promise that resolves when the clean-up is complete.
173
+ */ async function clean(ctx) {
174
+ await Promise.all([
175
+ removeOldPackages(ctx),
176
+ restorePackageJsonFromVtexProject(ctx)
177
+ ]);
178
+ }
179
+ function validateEnvironment() {
180
+ if (!VTEX_PROJECT_PATH) throw new Error('The NZ_VTEX_PROJECT environment variable is missing. Set it in the project root in a .env.local file.');
181
+ }
182
+ async function performRollback(sharedContext) {
183
+ await clean(sharedContext);
184
+ return ok();
185
+ }
186
+ async function buildAndLink(sharedContext, skipLink = false) {
187
+ await clean(sharedContext);
188
+ await buildPackage(sharedContext);
189
+ if (!skipLink) await vtexLink(sharedContext);
190
+ }
191
+
192
+ export { buildAndLink, buildPackage, changePackageJsonFromVtexProject, clean, createPackage, findLastPackages, movePackage, performRollback, removeOldPackages, renamePackage, restorePackageJsonFromVtexProject, validateEnvironment, vtexLink };
@@ -0,0 +1,5 @@
1
+ import { ExecutorContext } from '@nx/devkit';
2
+ import { ExecutorResponse } from "../../index-f6330edc.js";
3
+ import { ExecutorOptions } from "../../types-1282e639.js";
4
+ declare function runExecutor(opts: ExecutorOptions, ctx: ExecutorContext): Promise<ExecutorResponse>;
5
+ export { runExecutor as default };
@@ -0,0 +1,28 @@
1
+ import { resolve } from 'path';
2
+ import { getProjectConfig, ok, err } from '../shared/utils.js';
3
+ import { validateEnvironment, performRollback, buildAndLink } from './helpers.js';
4
+
5
+ const VTEX_PROJECT_PATH = process.env.NZ_VTEX_PROJECT;
6
+ async function runExecutor(opts, ctx) {
7
+ try {
8
+ const { rollback, skipLink, packageOrg } = opts;
9
+ const projectName = ctx.projectName || '';
10
+ validateEnvironment();
11
+ const projectConfig = getProjectConfig(ctx);
12
+ const projectRoot = projectConfig.root;
13
+ const vtexProjectPath = resolve(VTEX_PROJECT_PATH, 'react');
14
+ const sharedContext = {
15
+ packageOrg,
16
+ projectRoot,
17
+ projectName,
18
+ vtexProjectPath
19
+ };
20
+ if (rollback) return await performRollback(sharedContext);
21
+ await buildAndLink(sharedContext, skipLink);
22
+ return ok();
23
+ } catch (error) {
24
+ return err(error);
25
+ }
26
+ }
27
+
28
+ export { runExecutor as default };
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "version": 2,
4
+ "title": "VtexLink executor",
5
+ "description": "",
6
+ "type": "object",
7
+ "properties": {
8
+ "packageOrg": {
9
+ "type": "string",
10
+ "description": "Name of the npm organization in which the packages are published"
11
+ },
12
+ "rollback": {
13
+ "type": "boolean",
14
+ "description": "Perform a rollback.",
15
+ "default": false
16
+ },
17
+ "skipLink": {
18
+ "type": "boolean",
19
+ "description": "Skip the linking step.",
20
+ "default": false
21
+ }
22
+ },
23
+ "required": [],
24
+ "additionalProperties": true
25
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./index-3080371d.js";
2
+ export * from "./vite/plugins/shadow-dom-inject-css/index.js";
@@ -0,0 +1,2 @@
1
+ export * from "./shared/logger.js";
2
+ export * from "./shared/utils.js";
@@ -0,0 +1,3 @@
1
+ import { thirdPartyCssInjectPlugin } from "./vite/plugins/third-party-css-inject/main.js";
2
+ export * from "./vite/plugins/third-party-css-inject/main.js";
3
+ export { thirdPartyCssInjectPlugin as default };
@@ -0,0 +1,2 @@
1
+ export * from "./types-7377dcc9.js";
2
+ export * from "./executors/shared/utils.js";
@@ -0,0 +1,10 @@
1
+ export { default as deployExecutor } from "./executors/deploy/index.js";
2
+ export { default as environmentsExecutor } from "./executors/environments/index.js";
3
+ export { default as publishExecutor } from "./executors/publish/index.js";
4
+ export { default as updateExecutorsFileExecutor } from "./executors/update-executors-file/index.js";
5
+ export { default as vtexLinkExecutor } from "./executors/vtex-link/index.js";
6
+ export * from "./scripts/changeset-pre-mode.js";
7
+ export * from "./vite/config-builder/main.js";
8
+ export * from "./index-f6330edc.js";
9
+ export * from "./index-0ce2daf7.js";
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts","../../src/executors/index.ts","../../src/scripts/index.ts","../../src/vite/config-builder/index.ts","../../src/vite/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ export { default as deployExecutor } from './executors/deploy/index.js';
2
+ export { default as environmentsExecutor } from './executors/environments/index.js';
3
+ export { default as publishExecutor } from './executors/publish/index.js';
4
+ export { default as updateExecutorsFileExecutor } from './executors/update-executors-file/index.js';
5
+ export { default as vtexLinkExecutor } from './executors/vtex-link/index.js';
6
+ export { main } from './scripts/changeset-pre-mode.js';
7
+ export { createConfigBuilder } from './vite/config-builder/main.js';
8
+ export { Flag, ProjectType, Stage, Target, ViteMode } from './vite/config-builder/shared/types.js';
9
+ export { chunkName, deepMerge, getNxTsConfigPaths, getPlugins, shortId, when } from './vite/config-builder/shared/utils/helpers.js';
10
+ export { getExternalDependencies, getInitials, initializeConfig, mergeConfigs } from './vite/config-builder/shared/utils/projectConfig.js';
11
+ export { getViteCmdFlags, getViteCommand } from './vite/config-builder/shared/utils/viteCommand.js';
12
+ export { thirdPartyCssInjectPlugin } from './vite/plugins/third-party-css-inject/main.js';
13
+ export { injectCssIntoShadowDom } from './vite/plugins/shadow-dom-inject-css/index.js';
@@ -0,0 +1,2 @@
1
+ declare function main(): Promise<void>;
2
+ export { main };
@@ -0,0 +1,39 @@
1
+ import { logger } from '@nx/devkit';
2
+ import { exec } from 'child_process';
3
+ import { readFile } from 'fs/promises';
4
+ import { resolve } from 'path';
5
+ import { promisify } from 'util';
6
+
7
+ const execAsync = promisify(exec);
8
+ const changesetDir = resolve('.changeset');
9
+ const preJsonPath = resolve(changesetDir, 'pre.json');
10
+ let preJson;
11
+ async function main() {
12
+ try {
13
+ const data = await readFile(preJsonPath, 'utf8');
14
+ preJson = JSON.parse(data);
15
+ } catch {
16
+ preJson = {
17
+ mode: 'exit'
18
+ };
19
+ }
20
+ // Execute "version" command using @changeset/cli
21
+ try {
22
+ const { mode } = preJson;
23
+ if (mode === 'exit') {
24
+ const command = `pnpm changeset pre enter beta`;
25
+ const { stdout, stderr } = await execAsync(command);
26
+ logger.info(stdout);
27
+ logger.info(stderr);
28
+ logger.info(`🚀 Successfully enter prerelease mode`);
29
+ } else {
30
+ logger.info(`🚀 Prerelease mode has been previously entered`);
31
+ }
32
+ } catch (error) {
33
+ logger.error('❌ An error occurred!');
34
+ throw error;
35
+ }
36
+ }
37
+ main();
38
+
39
+ export { main };
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Enum representing the different log levels.
3
+ */
4
+ declare enum LogLevel {
5
+ ERROR = 0,
6
+ WARN = 1,
7
+ INFO = 2,
8
+ DEBUG = 3
9
+ }
10
+ declare let currentLogLevel: LogLevel;
11
+ /**
12
+ * Sets the log level for the logger.
13
+ * Only logs at this level and above will be displayed.
14
+ *
15
+ * @param {LogLevel} level - The log level to set.
16
+ * @example
17
+ * // Set log level to WARN
18
+ * setLogLevel(LogLevel.WARN);
19
+ *
20
+ * // Now only WARN and ERROR logs will be displayed
21
+ * logger.debug('Debug message'); // Will not be logged
22
+ * logger.info('Info message'); // Will not be logged
23
+ * logger.warn('Warn message'); // Will be logged
24
+ * logger.error('Error message'); // Will be logged
25
+ */
26
+ declare const setLogLevel: (level: LogLevel) => void;
27
+ declare const logger: {
28
+ error: (message: string, ...rest: any[]) => void;
29
+ warn: (message: string, ...rest: any[]) => void;
30
+ info: (message: string, ...rest: any[]) => void;
31
+ debug: (message: string, ...rest: any[]) => void;
32
+ };
33
+ export { LogLevel, currentLogLevel, setLogLevel, logger };
@@ -1,33 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- function _export(target, all) {
6
- for(var name in all)Object.defineProperty(target, name, {
7
- enumerable: true,
8
- get: all[name]
9
- });
10
- }
11
- _export(exports, {
12
- LogLevel: function() {
13
- return LogLevel;
14
- },
15
- currentLogLevel: function() {
16
- return currentLogLevel;
17
- },
18
- default: function() {
19
- return _default;
20
- },
21
- logger: function() {
22
- return logger;
23
- },
24
- setLogLevel: function() {
25
- return setLogLevel;
26
- }
27
- });
28
- const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
29
- const _chalk = /*#__PURE__*/ _interop_require_default._(require("chalk"));
30
- const _ramda = require("ramda");
1
+ import chalk from 'chalk';
2
+ import { pipe, map, join } from 'ramda';
3
+
31
4
  var LogLevel;
32
5
  (function(LogLevel) {
33
6
  LogLevel[LogLevel["ERROR"] = 0] = "ERROR";
@@ -35,6 +8,7 @@ var LogLevel;
35
8
  LogLevel[LogLevel["INFO"] = 2] = "INFO";
36
9
  LogLevel[LogLevel["DEBUG"] = 3] = "DEBUG";
37
10
  })(LogLevel || (LogLevel = {}));
11
+ // Default log level
38
12
  let currentLogLevel = 2;
39
13
  /**
40
14
  * Object mapping log levels to console log functions.
@@ -51,15 +25,29 @@ let currentLogLevel = 2;
51
25
  *
52
26
  * @constant {Object} colorFunctions
53
27
  */ const colorFunctions = {
54
- [0]: _chalk.default.red,
55
- [1]: _chalk.default.yellow,
56
- [2]: _chalk.default.blue,
57
- [3]: _chalk.default.magenta
28
+ [0]: chalk.red,
29
+ [1]: chalk.yellow,
30
+ [2]: chalk.blue,
31
+ [3]: chalk.magenta
58
32
  };
59
33
  const getLogLevelKey = (value)=>{
60
34
  return Object.keys(LogLevel).find((key)=>LogLevel[key] === value);
61
35
  };
62
- const setLogLevel = (level)=>{
36
+ /**
37
+ * Sets the log level for the logger.
38
+ * Only logs at this level and above will be displayed.
39
+ *
40
+ * @param {LogLevel} level - The log level to set.
41
+ * @example
42
+ * // Set log level to WARN
43
+ * setLogLevel(LogLevel.WARN);
44
+ *
45
+ * // Now only WARN and ERROR logs will be displayed
46
+ * logger.debug('Debug message'); // Will not be logged
47
+ * logger.info('Info message'); // Will not be logged
48
+ * logger.warn('Warn message'); // Will be logged
49
+ * logger.error('Error message'); // Will be logged
50
+ */ const setLogLevel = (level)=>{
63
51
  currentLogLevel = level;
64
52
  };
65
53
  /**
@@ -68,7 +56,7 @@ const setLogLevel = (level)=>{
68
56
  *
69
57
  * @param {any[]} args - The arguments to process.
70
58
  * @returns {string} - The processed string.
71
- */ const processArgs = (0, _ramda.pipe)((0, _ramda.map)((arg)=>JSON.stringify(arg, null, 2)), (0, _ramda.join)('\n'));
59
+ */ const processArgs = pipe(map((arg)=>JSON.stringify(arg, null, 2)), join('\n'));
72
60
  /**
73
61
  * Formats the log message with a timestamp, log level, and any additional variables.
74
62
  *
@@ -89,8 +77,8 @@ const setLogLevel = (level)=>{
89
77
  * @returns - The log function.
90
78
  */ const log = (level)=>(message, ...rest)=>{
91
79
  if (level > currentLogLevel) return; // Skip logging if level is below the current log level
92
- const pipeline = (0, _ramda.pipe)(()=>formatMessage(level, message, ...rest), colorFunctions[level], logFunctions[level]);
93
- const errPipeline = (0, _ramda.pipe)((err)=>`Failed to log message: ${err.message}`, colorFunctions[0], logFunctions[0]);
80
+ const pipeline = pipe(()=>formatMessage(level, message, ...rest), colorFunctions[level], logFunctions[level]);
81
+ const errPipeline = pipe((err)=>`Failed to log message: ${err.message}`, colorFunctions[0], logFunctions[0]);
94
82
  try {
95
83
  pipeline();
96
84
  } catch (err) {
@@ -103,4 +91,5 @@ const logger = {
103
91
  info: log(2),
104
92
  debug: log(3)
105
93
  };
106
- const _default = logger;
94
+
95
+ export { LogLevel, currentLogLevel, logger, setLogLevel };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Reads and parses the package.json file from the given project path.
3
+ *
4
+ * @param {string} projectPath - The path to the project.
5
+ * @returns {Record<string, any>} - The parsed package.json data.
6
+ *
7
+ * @example
8
+ * const pkgJsonData = getPkgJson('/path/to/project');
9
+ */
10
+ declare const getPkgJson: (projectPath: string) => Record<string, any>;
11
+ export { getPkgJson };
@@ -0,0 +1,23 @@
1
+ import { logger } from '@nx/devkit';
2
+ import { readFileSync } from 'fs';
3
+ import { resolve } from 'path';
4
+
5
+ /**
6
+ * Reads and parses the package.json file from the given project path.
7
+ *
8
+ * @param {string} projectPath - The path to the project.
9
+ * @returns {Record<string, any>} - The parsed package.json data.
10
+ *
11
+ * @example
12
+ * const pkgJsonData = getPkgJson('/path/to/project');
13
+ */ const getPkgJson = (projectPath)=>{
14
+ try {
15
+ const data = readFileSync(resolve(projectPath, './package.json'), 'utf-8');
16
+ return JSON.parse(data);
17
+ } catch (err) {
18
+ logger.error('Error reading or parsing package.json');
19
+ throw err;
20
+ }
21
+ };
22
+
23
+ export { getPkgJson };
@@ -0,0 +1,12 @@
1
+ interface SharedContext {
2
+ vtexProjectPath: string;
3
+ projectRoot: string;
4
+ projectName: string;
5
+ packageOrg: string;
6
+ }
7
+ interface ExecutorOptions {
8
+ packageOrg: string;
9
+ rollback?: boolean;
10
+ skipLink?: boolean;
11
+ }
12
+ export { SharedContext, ExecutorOptions };
@@ -0,0 +1,4 @@
1
+ type ExecutorResponse = {
2
+ success: boolean;
3
+ };
4
+ export { ExecutorResponse };
@@ -0,0 +1,14 @@
1
+ interface ExecutorOptions {
2
+ }
3
+ interface ExecutorConfig {
4
+ implementation: string;
5
+ schema: string;
6
+ description: string;
7
+ }
8
+ interface Executors {
9
+ [executorName: string]: ExecutorConfig;
10
+ }
11
+ interface ExecutorsFile {
12
+ executors: Executors;
13
+ }
14
+ export { ExecutorOptions, ExecutorConfig, Executors, ExecutorsFile };
@@ -0,0 +1,4 @@
1
+ import { UserConfig } from 'vite';
2
+ import { Context } from "../../../index-f6330edc.js";
3
+ declare const getAppConfig: (ctx: Context) => UserConfig;
4
+ export { getAppConfig };
@@ -0,0 +1,11 @@
1
+ const getAppConfig = (ctx)=>{
2
+ const { port } = ctx.projectConfig;
3
+ return {
4
+ server: {
5
+ port,
6
+ host: true
7
+ }
8
+ };
9
+ };
10
+
11
+ export { getAppConfig };
@@ -0,0 +1,4 @@
1
+ import { UserConfig } from 'vite';
2
+ import { Context } from "../../../index-f6330edc.js";
3
+ declare const getBaseConfig: (ctx: Context) => UserConfig;
4
+ export { getBaseConfig };