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

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 (251) hide show
  1. package/dist/cjs/executors/deploy/helpers.cjs +26 -0
  2. package/dist/cjs/executors/deploy/helpers.d.cts +4 -0
  3. package/dist/cjs/executors/deploy/index.cjs +22 -0
  4. package/dist/cjs/executors/deploy/index.d.cts +11 -0
  5. package/dist/cjs/executors/environments/helpers.cjs +63 -0
  6. package/dist/{src/executors/environments/helpers.d.ts → cjs/executors/environments/helpers.d.cts} +4 -4
  7. package/dist/cjs/executors/environments/index.cjs +54 -0
  8. package/dist/{src/executors/environments/executor.d.ts → cjs/executors/environments/index.d.cts} +5 -5
  9. package/dist/cjs/executors/publish/helpers.cjs +51 -0
  10. package/dist/{src/executors/publish/helpers.d.ts → cjs/executors/publish/helpers.d.cts} +3 -3
  11. package/dist/cjs/executors/publish/index.cjs +53 -0
  12. package/dist/cjs/executors/publish/index.d.cts +12 -0
  13. package/dist/cjs/executors/shared/utils.cjs +78 -0
  14. package/dist/cjs/executors/shared/utils.d.cts +34 -0
  15. package/dist/cjs/executors/update-executors-file/helpers.cjs +64 -0
  16. package/dist/cjs/executors/update-executors-file/helpers.d.cts +17 -0
  17. package/dist/cjs/executors/update-executors-file/index.cjs +41 -0
  18. package/dist/{src/executors/update-executors-file/executor.d.ts → cjs/executors/update-executors-file/index.d.cts} +5 -5
  19. package/dist/cjs/executors/vtex-link/constants.cjs +9 -0
  20. package/dist/cjs/executors/vtex-link/constants.d.cts +4 -0
  21. package/dist/cjs/executors/vtex-link/helpers.cjs +206 -0
  22. package/dist/{src/executors/vtex-link/helpers.d.ts → cjs/executors/vtex-link/helpers.d.cts} +15 -15
  23. package/dist/cjs/executors/vtex-link/index.cjs +30 -0
  24. package/dist/cjs/executors/vtex-link/index.d.cts +5 -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.cjs +59 -0
  30. package/dist/cjs/index.d.cts +10 -0
  31. package/dist/cjs/index.d.cts.map +1 -0
  32. package/dist/cjs/scripts/changeset-pre-mode.cjs +41 -0
  33. package/dist/cjs/scripts/changeset-pre-mode.d.cts +2 -0
  34. package/dist/cjs/shared/logger.cjs +98 -0
  35. package/dist/{src/logger.d.ts → cjs/shared/logger.d.cts} +5 -6
  36. package/dist/cjs/shared/utils.cjs +25 -0
  37. package/dist/{src/shared/utils.d.ts → cjs/shared/utils.d.cts} +2 -2
  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.cjs +13 -0
  42. package/dist/cjs/vite/config-builder/configs/app.d.cts +4 -0
  43. package/dist/cjs/vite/config-builder/configs/base.cjs +57 -0
  44. package/dist/cjs/vite/config-builder/configs/base.d.cts +4 -0
  45. package/dist/cjs/vite/config-builder/configs/index.cjs +36 -0
  46. package/dist/cjs/vite/config-builder/configs/index.d.cts +7 -0
  47. package/dist/cjs/vite/config-builder/configs/lib.cjs +57 -0
  48. package/dist/cjs/vite/config-builder/configs/lib.d.cts +4 -0
  49. package/dist/cjs/vite/config-builder/configs/script.cjs +45 -0
  50. package/dist/cjs/vite/config-builder/configs/script.d.cts +4 -0
  51. package/dist/cjs/vite/config-builder/main.cjs +43 -0
  52. package/dist/cjs/vite/config-builder/main.d.cts +10 -0
  53. package/dist/cjs/vite/config-builder/plugins.cjs +95 -0
  54. package/dist/{src/vite/config-builder/plugins.d.ts → cjs/vite/config-builder/plugins.d.cts} +7 -7
  55. package/dist/cjs/vite/config-builder/shared/types.cjs +33 -0
  56. package/dist/{src/vite/config-builder/shared/types.d.ts → cjs/vite/config-builder/shared/types.d.cts} +17 -17
  57. package/dist/cjs/vite/config-builder/shared/utils/helpers.cjs +124 -0
  58. package/dist/{src/vite/config-builder/shared/utils/helpers.d.ts → cjs/vite/config-builder/shared/utils/helpers.d.cts} +10 -10
  59. package/dist/cjs/vite/config-builder/shared/utils/projectConfig.cjs +114 -0
  60. package/dist/{src/vite/config-builder/shared/utils/projectConfig.d.ts → cjs/vite/config-builder/shared/utils/projectConfig.d.cts} +8 -8
  61. package/dist/cjs/vite/config-builder/shared/utils/viteCommand.cjs +59 -0
  62. package/dist/{src/vite/config-builder/shared/utils/viteCommand.d.ts → cjs/vite/config-builder/shared/utils/viteCommand.d.cts} +4 -4
  63. package/dist/{src/vite/plugins/shadow-dom-inject-css/index.js → cjs/vite/plugins/shadow-dom-inject-css/index.cjs} +4 -19
  64. package/dist/cjs/vite/plugins/shadow-dom-inject-css/index.d.cts +7 -0
  65. package/dist/{src/vite/plugins/third-party-css-inject/main.js → cjs/vite/plugins/third-party-css-inject/main.cjs} +13 -14
  66. package/dist/cjs/vite/plugins/third-party-css-inject/main.d.cts +17 -0
  67. package/dist/{src/vite/plugins/third-party-css-inject/utils.js → cjs/vite/plugins/third-party-css-inject/utils.cjs} +8 -20
  68. package/dist/cjs/vite/plugins/third-party-css-inject/utils.d.cts +5 -0
  69. package/dist/esm/executors/deploy/helpers.d.mts +4 -0
  70. package/dist/esm/executors/deploy/helpers.mjs +22 -0
  71. package/dist/esm/executors/deploy/index.d.mts +11 -0
  72. package/dist/esm/executors/deploy/index.mjs +20 -0
  73. package/dist/esm/executors/deploy/schema.json +41 -0
  74. package/dist/esm/executors/environments/helpers.d.mts +21 -0
  75. package/dist/esm/executors/environments/helpers.mjs +59 -0
  76. package/dist/esm/executors/environments/index.d.mts +16 -0
  77. package/dist/{src/executors/environments/executor.js → esm/executors/environments/index.mjs} +23 -30
  78. package/dist/esm/executors/environments/schema.json +9 -0
  79. package/dist/esm/executors/publish/helpers.d.mts +19 -0
  80. package/dist/esm/executors/publish/helpers.mjs +48 -0
  81. package/dist/esm/executors/publish/index.d.mts +12 -0
  82. package/dist/esm/executors/publish/index.mjs +51 -0
  83. package/dist/esm/executors/publish/schema.json +19 -0
  84. package/dist/esm/executors/shared/utils.d.mts +34 -0
  85. package/dist/esm/executors/shared/utils.mjs +72 -0
  86. package/dist/esm/executors/update-executors-file/helpers.d.mts +17 -0
  87. package/dist/esm/executors/update-executors-file/helpers.mjs +59 -0
  88. package/dist/esm/executors/update-executors-file/index.d.mts +12 -0
  89. package/dist/esm/executors/update-executors-file/index.mjs +39 -0
  90. package/dist/esm/executors/update-executors-file/schema.json +9 -0
  91. package/dist/esm/executors/vtex-link/constants.d.mts +4 -0
  92. package/dist/esm/executors/vtex-link/constants.mjs +5 -0
  93. package/dist/esm/executors/vtex-link/helpers.d.mts +77 -0
  94. package/dist/esm/executors/vtex-link/helpers.mjs +192 -0
  95. package/dist/esm/executors/vtex-link/index.d.mts +5 -0
  96. package/dist/esm/executors/vtex-link/index.mjs +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.mts +10 -0
  103. package/dist/esm/index.d.mts.map +1 -0
  104. package/dist/esm/index.mjs +13 -0
  105. package/dist/esm/scripts/changeset-pre-mode.d.mts +2 -0
  106. package/dist/esm/scripts/changeset-pre-mode.mjs +39 -0
  107. package/dist/esm/shared/logger.d.mts +33 -0
  108. package/dist/{src/logger.js → esm/shared/logger.mjs} +28 -39
  109. package/dist/esm/shared/utils.d.mts +11 -0
  110. package/dist/esm/shared/utils.mjs +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.mts +4 -0
  115. package/dist/esm/vite/config-builder/configs/app.mjs +11 -0
  116. package/dist/esm/vite/config-builder/configs/base.d.mts +4 -0
  117. package/dist/{src/vite/config-builder/configs/base.js → esm/vite/config-builder/configs/base.mjs} +22 -22
  118. package/dist/esm/vite/config-builder/configs/index.d.mts +7 -0
  119. package/dist/esm/vite/config-builder/configs/index.mjs +30 -0
  120. package/dist/esm/vite/config-builder/configs/lib.d.mts +4 -0
  121. package/dist/{src/vite/config-builder/configs/lib.js → esm/vite/config-builder/configs/lib.mjs} +16 -18
  122. package/dist/esm/vite/config-builder/configs/script.d.mts +4 -0
  123. package/dist/esm/vite/config-builder/configs/script.mjs +43 -0
  124. package/dist/esm/vite/config-builder/main.d.mts +10 -0
  125. package/dist/esm/vite/config-builder/main.mjs +41 -0
  126. package/dist/esm/vite/config-builder/plugins.d.mts +30 -0
  127. package/dist/esm/vite/config-builder/plugins.mjs +89 -0
  128. package/dist/esm/vite/config-builder/shared/types.d.mts +155 -0
  129. package/dist/{src/vite/config-builder/shared/types.js → esm/vite/config-builder/shared/types.mjs} +2 -27
  130. package/dist/esm/vite/config-builder/shared/utils/helpers.d.mts +81 -0
  131. package/dist/esm/vite/config-builder/shared/utils/helpers.mjs +98 -0
  132. package/dist/esm/vite/config-builder/shared/utils/projectConfig.d.mts +60 -0
  133. package/dist/esm/vite/config-builder/shared/utils/projectConfig.mjs +109 -0
  134. package/dist/esm/vite/config-builder/shared/utils/viteCommand.d.mts +24 -0
  135. package/dist/esm/vite/config-builder/shared/utils/viteCommand.mjs +56 -0
  136. package/dist/esm/vite/plugins/shadow-dom-inject-css/index.d.mts +7 -0
  137. package/dist/esm/vite/plugins/shadow-dom-inject-css/index.mjs +27 -0
  138. package/dist/esm/vite/plugins/third-party-css-inject/main.d.mts +17 -0
  139. package/dist/esm/vite/plugins/third-party-css-inject/main.mjs +45 -0
  140. package/dist/esm/vite/plugins/third-party-css-inject/utils.d.mts +5 -0
  141. package/dist/esm/vite/plugins/third-party-css-inject/utils.mjs +97 -0
  142. package/dist/executors.json +29 -0
  143. package/package.json +37 -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 +0 -24
  171. package/dist/src/executors/update-executors-file/helpers.d.ts.map +0 -1
  172. package/dist/src/executors/update-executors-file/helpers.js +0 -70
  173. package/dist/src/executors/update-executors-file/types.d.ts +0 -14
  174. package/dist/src/executors/update-executors-file/types.d.ts.map +0 -1
  175. package/dist/src/executors/update-executors-file/types.js +0 -4
  176. package/dist/src/executors/vtex-link/constants.d.ts +0 -4
  177. package/dist/src/executors/vtex-link/constants.d.ts.map +0 -1
  178. package/dist/src/executors/vtex-link/constants.js +0 -24
  179. package/dist/src/executors/vtex-link/executor.d.ts +0 -5
  180. package/dist/src/executors/vtex-link/executor.d.ts.map +0 -1
  181. package/dist/src/executors/vtex-link/executor.js +0 -35
  182. package/dist/src/executors/vtex-link/helpers.d.ts.map +0 -1
  183. package/dist/src/executors/vtex-link/helpers.js +0 -187
  184. package/dist/src/executors/vtex-link/types.d.ts.map +0 -1
  185. package/dist/src/executors/vtex-link/types.js +0 -4
  186. package/dist/src/index.d.ts +0 -2
  187. package/dist/src/index.d.ts.map +0 -1
  188. package/dist/src/index.js +0 -6
  189. package/dist/src/logger.d.ts.map +0 -1
  190. package/dist/src/scripts/changeset-pre-mode.d.ts +0 -2
  191. package/dist/src/scripts/changeset-pre-mode.d.ts.map +0 -1
  192. package/dist/src/scripts/changeset-pre-mode.js +0 -41
  193. package/dist/src/shared/index.d.ts +0 -2
  194. package/dist/src/shared/index.d.ts.map +0 -1
  195. package/dist/src/shared/index.js +0 -6
  196. package/dist/src/shared/utils.d.ts.map +0 -1
  197. package/dist/src/shared/utils.js +0 -22
  198. package/dist/src/vite/config-builder/configs/app.d.ts +0 -4
  199. package/dist/src/vite/config-builder/configs/app.d.ts.map +0 -1
  200. package/dist/src/vite/config-builder/configs/app.js +0 -19
  201. package/dist/src/vite/config-builder/configs/base.d.ts +0 -4
  202. package/dist/src/vite/config-builder/configs/base.d.ts.map +0 -1
  203. package/dist/src/vite/config-builder/configs/index.d.ts +0 -7
  204. package/dist/src/vite/config-builder/configs/index.d.ts.map +0 -1
  205. package/dist/src/vite/config-builder/configs/index.js +0 -28
  206. package/dist/src/vite/config-builder/configs/lib.d.ts +0 -4
  207. package/dist/src/vite/config-builder/configs/lib.d.ts.map +0 -1
  208. package/dist/src/vite/config-builder/configs/script.d.ts +0 -4
  209. package/dist/src/vite/config-builder/configs/script.d.ts.map +0 -1
  210. package/dist/src/vite/config-builder/configs/script.js +0 -42
  211. package/dist/src/vite/config-builder/index.d.ts +0 -3
  212. package/dist/src/vite/config-builder/index.d.ts.map +0 -1
  213. package/dist/src/vite/config-builder/index.js +0 -7
  214. package/dist/src/vite/config-builder/main.d.ts +0 -10
  215. package/dist/src/vite/config-builder/main.d.ts.map +0 -1
  216. package/dist/src/vite/config-builder/main.js +0 -37
  217. package/dist/src/vite/config-builder/plugins.d.ts.map +0 -1
  218. package/dist/src/vite/config-builder/plugins.js +0 -88
  219. package/dist/src/vite/config-builder/shared/index.d.ts +0 -3
  220. package/dist/src/vite/config-builder/shared/index.d.ts.map +0 -1
  221. package/dist/src/vite/config-builder/shared/index.js +0 -7
  222. package/dist/src/vite/config-builder/shared/types.d.ts.map +0 -1
  223. package/dist/src/vite/config-builder/shared/utils/helpers.d.ts.map +0 -1
  224. package/dist/src/vite/config-builder/shared/utils/helpers.js +0 -61
  225. package/dist/src/vite/config-builder/shared/utils/index.d.ts +0 -4
  226. package/dist/src/vite/config-builder/shared/utils/index.d.ts.map +0 -1
  227. package/dist/src/vite/config-builder/shared/utils/index.js +0 -8
  228. package/dist/src/vite/config-builder/shared/utils/projectConfig.d.ts.map +0 -1
  229. package/dist/src/vite/config-builder/shared/utils/projectConfig.js +0 -85
  230. package/dist/src/vite/config-builder/shared/utils/viteCommand.d.ts.map +0 -1
  231. package/dist/src/vite/config-builder/shared/utils/viteCommand.js +0 -54
  232. package/dist/src/vite/index.d.ts +0 -3
  233. package/dist/src/vite/index.d.ts.map +0 -1
  234. package/dist/src/vite/index.js +0 -7
  235. package/dist/src/vite/plugins/index.d.ts +0 -3
  236. package/dist/src/vite/plugins/index.d.ts.map +0 -1
  237. package/dist/src/vite/plugins/index.js +0 -7
  238. package/dist/src/vite/plugins/shadow-dom-inject-css/index.d.ts +0 -8
  239. package/dist/src/vite/plugins/shadow-dom-inject-css/index.d.ts.map +0 -1
  240. package/dist/src/vite/plugins/third-party-css-inject/index.d.ts +0 -4
  241. package/dist/src/vite/plugins/third-party-css-inject/index.d.ts.map +0 -1
  242. package/dist/src/vite/plugins/third-party-css-inject/index.js +0 -13
  243. package/dist/src/vite/plugins/third-party-css-inject/main.d.ts +0 -17
  244. package/dist/src/vite/plugins/third-party-css-inject/main.d.ts.map +0 -1
  245. package/dist/src/vite/plugins/third-party-css-inject/utils.d.ts +0 -5
  246. package/dist/src/vite/plugins/third-party-css-inject/utils.d.ts.map +0 -1
  247. /package/dist/{src → cjs}/executors/deploy/schema.json +0 -0
  248. /package/dist/{src → cjs}/executors/environments/schema.json +0 -0
  249. /package/dist/{src → cjs}/executors/publish/schema.json +0 -0
  250. /package/dist/{src → cjs}/executors/update-executors-file/schema.json +0 -0
  251. /package/dist/{src → cjs}/executors/vtex-link/schema.json +0 -0
@@ -0,0 +1,98 @@
1
+ import { readCachedProjectGraph } from '@nx/devkit';
2
+ import { nanoid } from 'nanoid';
3
+ import { resolve } from 'path';
4
+ import * as R from 'ramda';
5
+
6
+ /**
7
+ * Generates a short ID string.
8
+ *
9
+ * @param {number} length - The length of the ID to generate.
10
+ * @returns {string} - The generated ID.
11
+ *
12
+ * @example
13
+ * const id = shortId(10); // Outputs: "Aj3_Dk7_2j"
14
+ */ const shortId = (length)=>nanoid(length);
15
+ /**
16
+ * Deeply merges two objects, combining their properties.
17
+ *
18
+ * @param {Record<string, any>} v1 - The first object.
19
+ * @param {Record<string, any>} v2 - The second object.
20
+ * @returns {Record<string, any>} - The merged object.
21
+ *
22
+ * @example
23
+ * const obj1 = { a: 1, b: { c: 2 } };
24
+ * const obj2 = { b: { d: 3 } };
25
+ * const merged = deepMerge(obj1, obj2); // Outputs: { a: 1, b: { c: 2, d: 3 } }
26
+ */ function deepMerge(v1, v2) {
27
+ if (Array.isArray(v1) && Array.isArray(v2)) {
28
+ return R.uniq(R.concat(v1, v2));
29
+ } else if (typeof v1 === 'object' && typeof v2 === 'object' && !R.isNil(v1) && !R.isNil(v2)) {
30
+ return R.mergeWith(deepMerge, v1, v2);
31
+ } else {
32
+ return v2;
33
+ }
34
+ }
35
+ /**
36
+ * Generates a name for js files.
37
+ *
38
+ * @param {string} [prefix] - An optional prefix for the chunk name.
39
+ * @returns - A function that takes an item and generates a chunk name.
40
+ *
41
+ * @example
42
+ * const generateChunkName = chunkName('prefix');
43
+ * const name = generateChunkName({ name: 'example' }); // Outputs: "prefix-example-Aj3_Dk7_2j.js"
44
+ */ const chunkName = (prefix)=>(x)=>{
45
+ const nameWithoutUnderscore = x.name.replace(/_/g, '');
46
+ const pre = prefix ? `${prefix}-` : '';
47
+ return `${pre}${nameWithoutUnderscore}-${shortId(8)}.js`;
48
+ };
49
+ /**
50
+ * Returns the given object if the condition is true, otherwise returns null.
51
+ *
52
+ * @param {any} condition - The condition to evaluate.
53
+ * @param {Record<string, any>} obj - The object to return if the condition is true.
54
+ * @returns {Record<string, any> | null} - The object or null based on the condition.
55
+ *
56
+ * @example
57
+ * const obj = { a: 1 };
58
+ * const result = when(true, obj); // Outputs: { a: 1 }
59
+ * const result2 = when(false, obj); // Outputs: {}
60
+ */ const when = (condition, obj)=>condition ? obj : {};
61
+ /**
62
+ * Filters and generates plugin configurations based on conditions and the provided context.
63
+ *
64
+ * @param {Context} ctx - The main configuration object.
65
+ * @returns {any[]} - An array of generated plugin configurations.
66
+ */ const getPlugins = (ctx, ...pluginConfigs)=>pluginConfigs // Filters the plugins based on conditions
67
+ .filter((p)=>!p.condition || p.condition(ctx)) // Generates the configuration of each plugin and flattens the resulting array
68
+ .flatMap((p)=>p.generate(ctx));
69
+ /**
70
+ * Gets the paths to the tsconfig files for all relevant projects.
71
+ *
72
+ * @returns {string[]} - An array containing paths to tsconfig files for both app and lib projects.
73
+ *
74
+ * @example
75
+ * const projects = {
76
+ * 'my-app': {
77
+ * type: 'app',
78
+ * data: { root: 'apps/my-app' }
79
+ * },
80
+ * 'my-lib': {
81
+ * type: 'lib',
82
+ * data: { root: 'libs/my-lib' }
83
+ * }
84
+ * };
85
+ *
86
+ * const tsConfigPaths = getTsConfigPaths(projects);
87
+ * console.log(tsConfigPaths);
88
+ * // Output:
89
+ * // ['apps/my-app/tsconfig.app.json', 'libs/my-lib/tsconfig.lib.json']
90
+ */ const getNxTsConfigPaths = ()=>{
91
+ const isValid = (p)=>p.data.root.startsWith('apps/') || p.data.root.startsWith('libs/');
92
+ const getTsConfigPath = (p)=>resolve(p.data.root, `tsconfig.${p.type === 'app' ? 'app' : 'lib'}.json`);
93
+ const graph = readCachedProjectGraph();
94
+ const projects = graph.nodes;
95
+ return Object.values(projects).filter(isValid).map(getTsConfigPath);
96
+ };
97
+
98
+ export { chunkName, deepMerge, getNxTsConfigPaths, getPlugins, shortId, when };
@@ -0,0 +1,60 @@
1
+ import { UserConfig } from 'vite';
2
+ import { CommonProjectConfig, ProjectConfig, ProjectConfigInitialized } from "../types.js";
3
+ /**
4
+ * Initializes the project configuration with default values.
5
+ *
6
+ * @example
7
+ * const config = { type: ProjectType.APP, path: '/path/to/project', viteEnv: { mode: ViteMode.DEV } };
8
+ * const initializedConfig = initializeConfig(config);
9
+ */
10
+ declare const initializeConfig: (ccfg: CommonProjectConfig, pcfg: ProjectConfig, localPkgJson: Record<string, any>) => {
11
+ viteCmd: import("../types.js").ViteCommand;
12
+ cfg: ProjectConfigInitialized;
13
+ };
14
+ /**
15
+ * Handles merging configurations and logs any errors.
16
+ *
17
+ * @param {UserConfig} defaultConfig - The default configuration.
18
+ * @param {UserConfig} overrides - The overrides configuration.
19
+ * @returns {UserConfig} - The merged configuration.
20
+ */
21
+ declare const mergeConfigs: (defaultConfig: UserConfig, overrides: UserConfig) => UserConfig;
22
+ /**
23
+ * Resolves glob patterns to actual package names found in package.json dependencies.
24
+ * This function is used to determine which packages should be treated as external
25
+ * in a Rollup or Vite build configuration.
26
+ *
27
+ * @param {string} path - The base path where package.json is located.
28
+ * @param {string | string[]} globs - A glob pattern or an array of glob patterns to match dependencies against.
29
+ * @returns {string[]} An array of package names that match the given glob patterns.
30
+ *
31
+ * @example
32
+ * // Example of using `getExternalDependencies` to find all dependencies starting with "my-lib" and "lodash"
33
+ * const projectPath = '/path/to/project';
34
+ * const globs = ['my-lib*', 'lodash'];
35
+ * const externalDependencies = getExternalDependencies(projectPath, globs);
36
+ * console.log(externalDependencies);
37
+ * // Output might be: ['my-lib/utils', 'my-lib/core', 'lodash']
38
+ */
39
+ declare const getExternalDependencies: (path: string, globs?: string | string[]) => string[];
40
+ /**
41
+ * Generates a string of initials based on the input string,
42
+ * following certain rules:
43
+ * 1. A word is considered as a sequence of characters
44
+ * separated by hyphens.
45
+ * 2. If the string contains '@', any characters before
46
+ * and including the next '/' are ignored.
47
+ * 3. The first character of each word is taken to form
48
+ * the initials.
49
+ *
50
+ * @param {string} input - The input string from which to generate the initials.
51
+ * @returns {string} The initials formed by taking the first character
52
+ * of each word, after applying the specified rules.
53
+ *
54
+ * @example
55
+ * getInitials("player-script"); // returns "ps"
56
+ * getInitials("ssv-admin"); // returns "sa"
57
+ * getInitials("@nizza/customize-live"); // returns "cl"
58
+ */
59
+ declare function getInitials(input: string): string;
60
+ export { initializeConfig, mergeConfigs, getExternalDependencies, getInitials };
@@ -0,0 +1,109 @@
1
+ import { minimatch } from 'minimatch';
2
+ import { LogLevel, logger, setLogLevel } from '../../../../shared/logger.mjs';
3
+ import { getPkgJson } from '../../../../shared/utils.mjs';
4
+ import { Flag } from '../types.mjs';
5
+ import { deepMerge } from './helpers.mjs';
6
+ import { getViteCommand } from './viteCommand.mjs';
7
+
8
+ /**
9
+ * Initializes the project configuration with default values.
10
+ *
11
+ * @example
12
+ * const config = { type: ProjectType.APP, path: '/path/to/project', viteEnv: { mode: ViteMode.DEV } };
13
+ * const initializedConfig = initializeConfig(config);
14
+ */ const initializeConfig = (ccfg, pcfg, localPkgJson)=>{
15
+ const { envPrefix } = ccfg;
16
+ const localPkgName = localPkgJson['name'];
17
+ const { name = localPkgName, overrides = {}, shadowDom = false, chunkPrefix = getInitials(localPkgName), resolveEnvs = {
18
+ default: true,
19
+ local: true
20
+ }, fileName = `${envPrefix}-${chunkPrefix}-index`, externalizeLibs = {
21
+ default: true,
22
+ glob: []
23
+ } } = pcfg;
24
+ const viteCmd = getViteCommand(pcfg.viteEnv.mode);
25
+ const isVerbose = Object.keys(viteCmd.flags).some((x)=>[
26
+ Flag.VERBOSE,
27
+ Flag.VERBOSE_ALIAS
28
+ ].includes(x));
29
+ const logLevel = isVerbose ? LogLevel.DEBUG : pcfg.logLevel ?? LogLevel.INFO;
30
+ setLogLevel(logLevel);
31
+ return {
32
+ viteCmd,
33
+ cfg: {
34
+ ...pcfg,
35
+ name,
36
+ fileName,
37
+ logLevel,
38
+ overrides,
39
+ chunkPrefix,
40
+ shadowDom,
41
+ resolveEnvs,
42
+ externalizeLibs: externalizeLibs
43
+ }
44
+ };
45
+ };
46
+ /**
47
+ * Handles merging configurations and logs any errors.
48
+ *
49
+ * @param {UserConfig} defaultConfig - The default configuration.
50
+ * @param {UserConfig} overrides - The overrides configuration.
51
+ * @returns {UserConfig} - The merged configuration.
52
+ */ const mergeConfigs = (defaultConfig, overrides)=>{
53
+ try {
54
+ return deepMerge(defaultConfig, overrides);
55
+ } catch (err) {
56
+ logger.error('Error merging vite configs: ', err);
57
+ return defaultConfig;
58
+ }
59
+ };
60
+ /**
61
+ * Resolves glob patterns to actual package names found in package.json dependencies.
62
+ * This function is used to determine which packages should be treated as external
63
+ * in a Rollup or Vite build configuration.
64
+ *
65
+ * @param {string} path - The base path where package.json is located.
66
+ * @param {string | string[]} globs - A glob pattern or an array of glob patterns to match dependencies against.
67
+ * @returns {string[]} An array of package names that match the given glob patterns.
68
+ *
69
+ * @example
70
+ * // Example of using `getExternalDependencies` to find all dependencies starting with "my-lib" and "lodash"
71
+ * const projectPath = '/path/to/project';
72
+ * const globs = ['my-lib*', 'lodash'];
73
+ * const externalDependencies = getExternalDependencies(projectPath, globs);
74
+ * console.log(externalDependencies);
75
+ * // Output might be: ['my-lib/utils', 'my-lib/core', 'lodash']
76
+ */ const getExternalDependencies = (path, globs = [])=>{
77
+ const pkgJson = getPkgJson(path); // Assumes getLocalPkgJson is a function that reads and parses package.json
78
+ const dependencies = Object.keys(pkgJson.dependencies || {});
79
+ const globPatterns = Array.isArray(globs) ? globs : [
80
+ globs
81
+ ];
82
+ return dependencies.filter((dep)=>globPatterns.some((pattern)=>minimatch(dep, pattern)));
83
+ };
84
+ /**
85
+ * Generates a string of initials based on the input string,
86
+ * following certain rules:
87
+ * 1. A word is considered as a sequence of characters
88
+ * separated by hyphens.
89
+ * 2. If the string contains '@', any characters before
90
+ * and including the next '/' are ignored.
91
+ * 3. The first character of each word is taken to form
92
+ * the initials.
93
+ *
94
+ * @param {string} input - The input string from which to generate the initials.
95
+ * @returns {string} The initials formed by taking the first character
96
+ * of each word, after applying the specified rules.
97
+ *
98
+ * @example
99
+ * getInitials("player-script"); // returns "ps"
100
+ * getInitials("ssv-admin"); // returns "sa"
101
+ * getInitials("@nizza/customize-live"); // returns "cl"
102
+ */ function getInitials(input) {
103
+ const cleanedInput = input.includes('@') ? input.split('/')[1] : input;
104
+ const words = cleanedInput?.split('-');
105
+ const initials = words?.map((word)=>word.charAt(0)).join('');
106
+ return initials ?? '';
107
+ }
108
+
109
+ export { getExternalDependencies, getInitials, initializeConfig, mergeConfigs };
@@ -0,0 +1,24 @@
1
+ import { ViteMode, ViteCommand } from "../types.js";
2
+ /**
3
+ * Retrieves the Vite command details.
4
+ *
5
+ * @param {ViteMode} mode - The Vite mode.
6
+ * @returns {ViteCommand} - The command details.
7
+ *
8
+ * @example
9
+ * const command = getViteCommand(ViteMode.PROD);
10
+ * // Outputs: { stage: Stage.PROD, target: 'build', flags: {} }
11
+ */
12
+ declare function getViteCommand(mode: ViteMode): ViteCommand;
13
+ /**
14
+ * Parses the command string to extract flags.
15
+ *
16
+ * @param {string | undefined} commandString - The command string.
17
+ * @returns {Record<string, string>} - The flags extracted from the command string.
18
+ *
19
+ * @example
20
+ * const flags = getViteCmdFlags('nx run core:build --source-maps');
21
+ * // Outputs: { 'source-maps: 'true' }
22
+ */
23
+ declare function getViteCmdFlags(commandString: string | undefined): Record<string, string>;
24
+ export { getViteCommand, getViteCmdFlags };
@@ -0,0 +1,56 @@
1
+ import chalk from 'chalk';
2
+ import argv from 'mri';
3
+ import { loadEnv } from 'vite';
4
+ import { ViteMode, Stage, Target } from '../types.mjs';
5
+
6
+ /**
7
+ * Retrieves the Vite command details.
8
+ *
9
+ * @param {ViteMode} mode - The Vite mode.
10
+ * @returns {ViteCommand} - The command details.
11
+ *
12
+ * @example
13
+ * const command = getViteCommand(ViteMode.PROD);
14
+ * // Outputs: { stage: Stage.PROD, target: 'build', flags: {} }
15
+ */ function getViteCommand(mode) {
16
+ const nxEnv = loadEnv(mode, process.cwd(), 'NX');
17
+ const nxCommandString = process?.env?.['npm_package_scripts_nx'];
18
+ const modeIsProd = mode === ViteMode.PROD;
19
+ const stage = (nxEnv?.['NX_TASK_TARGET_CONFIGURATION']) ?? (modeIsProd ? Stage.PROD : Stage.DEV);
20
+ const target = nxEnv?.['NX_TASK_TARGET_TARGET'] ?? Target.BUILD;
21
+ const flags = getViteCmdFlags(nxCommandString);
22
+ const showIn = {
23
+ prod: (...args)=>modeIsProd && console.log(...args),
24
+ dev: (...args)=>!modeIsProd && console.log(...args)
25
+ };
26
+ try {
27
+ showIn.prod(chalk.cyan('Build Stage:'), chalk.green(stage));
28
+ showIn.dev(chalk.green(' ➜ '), chalk.bold.white(`Stage: `), chalk.cyan(stage));
29
+ } catch {
30
+ showIn.prod(console.log('Build Stage:', stage));
31
+ showIn.dev(console.log(` ➜ Stage: `, stage));
32
+ }
33
+ return {
34
+ stage,
35
+ target,
36
+ flags
37
+ };
38
+ }
39
+ /**
40
+ * Parses the command string to extract flags.
41
+ *
42
+ * @param {string | undefined} commandString - The command string.
43
+ * @returns {Record<string, string>} - The flags extracted from the command string.
44
+ *
45
+ * @example
46
+ * const flags = getViteCmdFlags('nx run core:build --source-maps');
47
+ * // Outputs: { 'source-maps: 'true' }
48
+ */ function getViteCmdFlags(commandString) {
49
+ if (!commandString) return {};
50
+ const cleanedCommandString = commandString.replace(/"/g, '');
51
+ const args = argv(cleanedCommandString.split(' '));
52
+ delete args['_'];
53
+ return args;
54
+ }
55
+
56
+ export { getViteCmdFlags, getViteCommand };
@@ -0,0 +1,7 @@
1
+ import { ViteDevServer } from 'vite';
2
+ declare function injectCssIntoShadowDom(): {
3
+ name: string;
4
+ configureServer(_server: ViteDevServer): void;
5
+ transform(src: string, id: string): void;
6
+ };
7
+ export { injectCssIntoShadowDom };
@@ -0,0 +1,27 @@
1
+ function injectCssIntoShadowDom() {
2
+ const fileRegex = /\.(css)$/;
3
+ let server;
4
+ return {
5
+ name: 'nizza:inject-css-into-shadow-dom',
6
+ configureServer (_server) {
7
+ server = _server;
8
+ },
9
+ transform (src, id) {
10
+ if (server) {
11
+ const relativeId = /\/lib\/.*/.exec(id)?.[0].replace('/lib/', '');
12
+ if (fileRegex.test(id)) {
13
+ server.ws.send({
14
+ type: 'custom',
15
+ event: 'inject-css-into-shadow-dom:hot-updated',
16
+ data: {
17
+ id: relativeId,
18
+ content: src
19
+ }
20
+ });
21
+ }
22
+ }
23
+ }
24
+ };
25
+ }
26
+
27
+ export { injectCssIntoShadowDom };
@@ -0,0 +1,17 @@
1
+ import { Plugin } from 'vite';
2
+ interface Execute {
3
+ function: (data?: string) => void;
4
+ listen: string;
5
+ observer: string;
6
+ }
7
+ interface ThirdPartyCssInjectPlugin {
8
+ topExecutionPriority?: boolean;
9
+ execute?: Execute[];
10
+ }
11
+ /**
12
+ * Inject the CSS compiled with JS.
13
+ *
14
+ * @return {Plugin}
15
+ */
16
+ declare function thirdPartyCssInjectPlugin({ topExecutionPriority, execute }?: ThirdPartyCssInjectPlugin | undefined): Plugin;
17
+ export { Execute, ThirdPartyCssInjectPlugin, thirdPartyCssInjectPlugin };
@@ -0,0 +1,45 @@
1
+ import { removeLinkStyleSheets, buildCSSInjectionCode } from './utils.mjs';
2
+
3
+ /**
4
+ * Inject the CSS compiled with JS.
5
+ *
6
+ * @return {Plugin}
7
+ */ function thirdPartyCssInjectPlugin({ topExecutionPriority, execute } = {
8
+ topExecutionPriority: true,
9
+ execute: []
10
+ }) {
11
+ //Globally so we can add it to legacy and non-legacy bundle.
12
+ let config;
13
+ return {
14
+ apply: 'build',
15
+ enforce: 'post',
16
+ name: 'nizza:third-party-css-inject',
17
+ configResolved (_config) {
18
+ config = _config;
19
+ },
20
+ async generateBundle (opts, bundle) {
21
+ if (config.build.ssr) {
22
+ return;
23
+ }
24
+ const htmlFiles = Object.keys(bundle).filter((i)=>i.endsWith('.html'));
25
+ const cssAssets = Object.keys(bundle).filter((i)=>bundle[i]?.type == 'asset' && bundle[i]?.fileName.endsWith('.css'));
26
+ const jsAssets = Object.keys(bundle).filter((i)=>bundle[i]?.type == 'chunk' && bundle[i]?.fileName.match(/.[cm]?js$/) != null && !bundle[i]?.fileName.includes('polyfill'));
27
+ for (const name of htmlFiles){
28
+ const htmlChunk = bundle[name];
29
+ let replacedHtml = htmlChunk.source;
30
+ cssAssets.forEach((cssName)=>{
31
+ replacedHtml = removeLinkStyleSheets(replacedHtml, cssName);
32
+ htmlChunk.source = replacedHtml;
33
+ });
34
+ }
35
+ const jsAsset = bundle[jsAssets[0]];
36
+ const cssInjectionCode = await buildCSSInjectionCode(execute);
37
+ const appCode = jsAsset.code;
38
+ jsAsset.code = topExecutionPriority ? '' : appCode;
39
+ jsAsset.code += cssInjectionCode ? cssInjectionCode.code : '';
40
+ jsAsset.code += !topExecutionPriority ? '' : appCode;
41
+ }
42
+ };
43
+ }
44
+
45
+ export { thirdPartyCssInjectPlugin };
@@ -0,0 +1,5 @@
1
+ import { OutputChunk } from 'rollup';
2
+ import { Execute } from "../../../index-3080371d.js";
3
+ declare function buildCSSInjectionCode(execute?: Execute[]): Promise<OutputChunk | null | any>;
4
+ declare function removeLinkStyleSheets(html: string, cssFileName: string): string;
5
+ export { buildCSSInjectionCode, removeLinkStyleSheets };
@@ -0,0 +1,97 @@
1
+ import { build } from 'vite';
2
+
3
+ const cssInjectedByJsId = '\0vite/all-css';
4
+ const waitForElement = (selector, observerElementName = 'body')=>{
5
+ const getElement = (selector)=>document.querySelector(selector);
6
+ return new Promise((resolve)=>{
7
+ if (getElement(selector)) return resolve(getElement(selector));
8
+ const observer = new MutationObserver(()=>{
9
+ if (getElement(selector)) {
10
+ resolve(getElement(selector));
11
+ observer.disconnect();
12
+ }
13
+ });
14
+ let observerElement = document.body;
15
+ switch(observerElementName){
16
+ case 'body':
17
+ observerElement = document.body;
18
+ break;
19
+ case 'head':
20
+ observerElement = document.head;
21
+ break;
22
+ default:
23
+ observerElement = document.body;
24
+ break;
25
+ }
26
+ observer.observe(observerElement, {
27
+ childList: true,
28
+ subtree: true
29
+ });
30
+ });
31
+ };
32
+ async function buildCSSInjectionCode(execute) {
33
+ const res = await build({
34
+ root: '',
35
+ configFile: false,
36
+ logLevel: 'error',
37
+ plugins: [
38
+ injectionCSSCodePlugin(execute)
39
+ ],
40
+ build: {
41
+ write: false,
42
+ target: 'es2015',
43
+ minify: 'esbuild',
44
+ assetsDir: '',
45
+ rollupOptions: {
46
+ input: {
47
+ 'all-css': cssInjectedByJsId
48
+ },
49
+ output: {
50
+ format: 'iife',
51
+ manualChunks: undefined
52
+ }
53
+ }
54
+ }
55
+ });
56
+ const _cssChunk = Array.isArray(res) ? res[0] : res;
57
+ if (!('output' in _cssChunk)) return null;
58
+ return _cssChunk.output[0];
59
+ }
60
+ /**
61
+ * @param {string} cssToInject
62
+ * @param {string|null} styleId
63
+ * @return {Plugin}
64
+ */ function injectionCSSCodePlugin(execute) {
65
+ return {
66
+ name: 'vite:third-party-css-inject',
67
+ // @ts-ignore
68
+ resolveId (id) {
69
+ if (id == cssInjectedByJsId) {
70
+ return id;
71
+ }
72
+ },
73
+ // @ts-ignore
74
+ load (id) {
75
+ if (id == cssInjectedByJsId) {
76
+ let executeJs = [];
77
+ if (execute?.length) {
78
+ executeJs = execute.map((executeData, index)=>{
79
+ return `waitForElement('${executeData.observer}', '${executeData.listen}').then((elm)=>{
80
+ const extra${index}=${executeData.function};extra${index}(elm)
81
+ });`;
82
+ });
83
+ }
84
+ return `try{if(typeof document != 'undefined'){
85
+ const waitForElement=${waitForElement.toString()};
86
+ ${executeJs.join(' ')}
87
+ }}catch(e){console.error('vite-third-party-css-inject-plugin', e);}`;
88
+ }
89
+ }
90
+ };
91
+ }
92
+ function removeLinkStyleSheets(html, cssFileName) {
93
+ const removeCSS = new RegExp(`<link rel=".*"[^>]*?href=".*/?${cssFileName}"[^>]*?>`);
94
+ return html.replace(removeCSS, '');
95
+ }
96
+
97
+ export { buildCSSInjectionCode, removeLinkStyleSheets };
@@ -0,0 +1,29 @@
1
+ {
2
+ "executors": {
3
+ "environments": {
4
+ "implementation": "./cjs/executors/environments/index.cjs",
5
+ "schema": "./cjs/executors/environments/schema.json",
6
+ "description": "Configure project with custom environments"
7
+ },
8
+ "vtex-link": {
9
+ "implementation": "./cjs/executors/vtex-link/index.cjs",
10
+ "schema": "./cjs/executors/vtex-link/schema.json",
11
+ "description": "Links a package to a VTEX project."
12
+ },
13
+ "publish": {
14
+ "implementation": "./cjs/executors/publish/index.cjs",
15
+ "schema": "./cjs/executors/publish/schema.json",
16
+ "description": "publish executor"
17
+ },
18
+ "update-executors-file": {
19
+ "implementation": "./cjs/executors/update-executors-file/index.cjs",
20
+ "schema": "./cjs/executors/update-executors-file/schema.json",
21
+ "description": "update-executors-file executor"
22
+ },
23
+ "deploy": {
24
+ "implementation": "./cjs/executors/deploy/index.cjs",
25
+ "schema": "./cjs/executors/deploy/schema.json",
26
+ "description": "deploy executor"
27
+ }
28
+ }
29
+ }
package/package.json CHANGED
@@ -1,12 +1,44 @@
1
1
  {
2
2
  "name": "@nizza/devkit",
3
- "version": "0.1.0-alpha.2",
3
+ "version": "0.1.0-alpha.4",
4
+ "type": "module",
5
+ "main": "dist/cjs/index.cjs",
6
+ "module": "dist/esm/index.mjs",
4
7
  "source": "src/index.ts",
5
- "main": "dist/src/index.js",
6
- "types": "dist/src/index.d.ts",
8
+ "types": "dist/esm/index.d.ts",
7
9
  "files": [
8
10
  "dist"
9
11
  ],
10
- "dependencies": {},
11
- "executors": "./executors.json"
12
+ "dependencies": {
13
+ "chalk": "^4",
14
+ "minimatch": "^9.0.3",
15
+ "mri": "^1.2.0",
16
+ "nanoid": "^5.0.2",
17
+ "ramda": "^0.29.1",
18
+ "semver": "^7.5.4"
19
+ },
20
+ "executors": "./executors.json",
21
+ "devDependencies": {
22
+ "@rollup/plugin-commonjs": "^25.0.7",
23
+ "@rollup/plugin-json": "^6.0.1",
24
+ "@rollup/plugin-node-resolve": "^15.2.3",
25
+ "@types/semver": "^7.5.0",
26
+ "rollup": "^4.2.0",
27
+ "rollup-plugin-copy": "^3.5.0",
28
+ "rollup-plugin-delete": "^2.0.0",
29
+ "rollup-plugin-swc3": "^0.10.3",
30
+ "rollup-plugin-ts": "^3.4.5"
31
+ },
32
+ "peerDependencies": {
33
+ "@nx/devkit": "17.0.2",
34
+ "@originjs/vite-plugin-commonjs": "^1.0.3",
35
+ "@rollup/plugin-graphql": "^2.0.4",
36
+ "@vitejs/plugin-react-swc": "^3.4.1",
37
+ "rollup-plugin-visualizer": "^5.9.2",
38
+ "vite": "^4.5.0",
39
+ "vite-plugin-css-injected-by-js": "^3.3.0",
40
+ "vite-plugin-dts": "^3.6.3",
41
+ "vite-tsconfig-paths": "^4.2.1"
42
+ },
43
+ "scripts": {}
12
44
  }
package/dist/package.json DELETED
@@ -1,13 +0,0 @@
1
- {
2
- "name": "@nizza/devkit",
3
- "version": "0.1.0-alpha.2",
4
- "source": "src/index.ts",
5
- "main": "./src/index.js",
6
- "types": "dist/src/index.d.ts",
7
- "files": [
8
- "dist"
9
- ],
10
- "dependencies": {},
11
- "executors": "./executors.json",
12
- "type": "commonjs"
13
- }
@@ -1,11 +0,0 @@
1
- import { type ExecutorContext } from '@nx/devkit';
2
- import { type ExecutorResponse } from '../shared';
3
- export interface ExecutorOptions {
4
- s3BucketPath: string;
5
- cloudFrontDistributionId: string;
6
- cloudFrontInvalidationPaths: string[];
7
- buildTarget: string;
8
- skipBuild?: boolean;
9
- }
10
- export default function deployExecutor(opts: ExecutorOptions, ctx: ExecutorContext): Promise<ExecutorResponse>;
11
- //# sourceMappingURL=executor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../../../src/executors/deploy/executor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAKL,KAAK,gBAAgB,EACtB,MAAM,WAAW,CAAC;AAOnB,MAAM,WAAW,eAAe;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,wBAAwB,EAAE,MAAM,CAAC;IACjC,2BAA2B,EAAE,MAAM,EAAE,CAAC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAA8B,cAAc,CAC1C,IAAI,EAAE,eAAe,EACrB,GAAG,EAAE,eAAe,GACnB,OAAO,CAAC,gBAAgB,CAAC,CAyB3B"}