lucy-cli 2.0.0-alpha.9 → 2.0.0-beta.1

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 (451) hide show
  1. package/.yarnrc.yml +0 -1
  2. package/dist/args.d.ts +1 -6
  3. package/dist/args.js +62 -7
  4. package/dist/args.js.map +1 -0
  5. package/dist/commands/checks.d.ts +7 -0
  6. package/dist/commands/checks.js +47 -0
  7. package/dist/commands/checks.js.map +1 -0
  8. package/dist/commands/cleanup.d.ts +4 -0
  9. package/dist/commands/cleanup.js +10 -0
  10. package/dist/commands/cleanup.js.map +1 -0
  11. package/dist/commands/copy.d.ts +6 -0
  12. package/dist/commands/copy.js +20 -0
  13. package/dist/commands/copy.js.map +1 -0
  14. package/dist/commands/edit.d.ts +10 -0
  15. package/dist/commands/edit.js +67 -0
  16. package/dist/commands/edit.js.map +1 -0
  17. package/dist/commands/exec.d.ts +7 -0
  18. package/dist/commands/exec.js +67 -0
  19. package/dist/commands/exec.js.map +1 -0
  20. package/dist/commands/git.d.ts +8 -0
  21. package/dist/commands/git.js +104 -0
  22. package/dist/commands/git.js.map +1 -0
  23. package/dist/commands/home.d.ts +4 -0
  24. package/dist/commands/home.js +18 -0
  25. package/dist/commands/home.js.map +1 -0
  26. package/dist/commands/install.d.ts +8 -0
  27. package/dist/commands/install.js +165 -0
  28. package/dist/commands/install.js.map +1 -0
  29. package/dist/commands/read.d.ts +6 -0
  30. package/dist/commands/read.js +40 -0
  31. package/dist/commands/read.js.map +1 -0
  32. package/dist/commands/write.d.ts +7 -0
  33. package/dist/commands/write.js +28 -0
  34. package/dist/commands/write.js.map +1 -0
  35. package/dist/commands.js +1 -0
  36. package/dist/commands.js.map +1 -0
  37. package/dist/config.d.ts +29 -7
  38. package/dist/config.js +90 -26
  39. package/dist/config.js.map +1 -0
  40. package/dist/error.d.ts +1 -9
  41. package/dist/error.js +1 -2
  42. package/dist/error.js.map +1 -0
  43. package/dist/helpers.d.ts +9 -0
  44. package/dist/helpers.js +83 -0
  45. package/dist/helpers.js.map +1 -0
  46. package/dist/index.d.ts +1 -0
  47. package/dist/index.js +77 -9
  48. package/dist/index.js.map +1 -0
  49. package/dist/init/blocks.d.ts +5 -0
  50. package/dist/init/blocks.js +62 -0
  51. package/dist/init/blocks.js.map +1 -0
  52. package/dist/init/cargo.d.ts +2 -0
  53. package/dist/init/cargo.js +21 -0
  54. package/dist/init/cargo.js.map +1 -0
  55. package/dist/init/expo.d.ts +5 -0
  56. package/dist/init/expo.js +52 -0
  57. package/dist/init/expo.js.map +1 -0
  58. package/dist/init/gitModules.d.ts +2 -0
  59. package/dist/init/gitModules.js +13 -0
  60. package/dist/init/gitModules.js.map +1 -0
  61. package/dist/init/index.d.ts +4 -0
  62. package/dist/init/index.js +77 -0
  63. package/dist/init/index.js.map +1 -0
  64. package/dist/init/monorepo.d.ts +4 -0
  65. package/dist/init/monorepo.js +48 -0
  66. package/dist/init/monorepo.js.map +1 -0
  67. package/dist/init/prepareVelo.d.ts +2 -0
  68. package/dist/init/prepareVelo.js +16 -0
  69. package/dist/init/prepareVelo.js.map +1 -0
  70. package/dist/init/tauri.d.ts +5 -0
  71. package/dist/init/tauri.js +32 -0
  72. package/dist/init/tauri.js.map +1 -0
  73. package/dist/init/templates.d.ts +5 -0
  74. package/dist/init/templates.js +93 -0
  75. package/dist/init/templates.js.map +1 -0
  76. package/dist/init/velo.d.ts +5 -0
  77. package/dist/init/velo.js +60 -0
  78. package/dist/init/velo.js.map +1 -0
  79. package/dist/policy.js +1 -0
  80. package/dist/policy.js.map +1 -0
  81. package/dist/prepare.js +1 -0
  82. package/dist/prepare.js.map +1 -0
  83. package/dist/runtime.d.ts +1 -1
  84. package/dist/runtime.js +1 -0
  85. package/dist/runtime.js.map +1 -0
  86. package/dist/schemas/gulp.d.ts +25 -0
  87. package/dist/schemas/gulp.js +8 -0
  88. package/dist/schemas/gulp.js.map +1 -0
  89. package/dist/schemas/index.d.ts +10 -0
  90. package/dist/schemas/index.js +9 -0
  91. package/dist/schemas/index.js.map +1 -0
  92. package/dist/schemas/lucy.d.ts +29 -0
  93. package/dist/schemas/lucy.js +42 -0
  94. package/dist/schemas/lucy.js.map +1 -0
  95. package/dist/schemas/tsconfig.js +2 -0
  96. package/dist/schemas/tsconfig.js.map +1 -0
  97. package/dist/schemas/types.d.ts +33 -0
  98. package/dist/schemas/types.js +5 -1
  99. package/dist/schemas/types.js.map +1 -0
  100. package/dist/states.js +1 -0
  101. package/dist/states.js.map +1 -0
  102. package/dist/tasks/Gulpfile.d.ts +4 -0
  103. package/dist/tasks/Gulpfile.js +111 -0
  104. package/dist/tasks/Gulpfile.js.map +1 -0
  105. package/dist/tasks/gulp/backend.d.ts +4 -0
  106. package/dist/tasks/gulp/backend.js +92 -0
  107. package/dist/tasks/gulp/backend.js.map +1 -0
  108. package/dist/tasks/gulp/checks.d.ts +4 -0
  109. package/dist/tasks/gulp/checks.js +202 -0
  110. package/dist/tasks/gulp/checks.js.map +1 -0
  111. package/dist/tasks/gulp/clean.d.ts +3 -0
  112. package/dist/tasks/gulp/clean.js +33 -0
  113. package/dist/tasks/gulp/clean.js.map +1 -0
  114. package/dist/tasks/gulp/copy.d.ts +3 -0
  115. package/dist/tasks/gulp/copy.js +34 -0
  116. package/dist/tasks/gulp/copy.js.map +1 -0
  117. package/dist/tasks/gulp/helpers.d.ts +3 -0
  118. package/dist/tasks/gulp/helpers.js +19 -0
  119. package/dist/tasks/gulp/helpers.js.map +1 -0
  120. package/dist/tasks/gulp/pages.d.ts +2 -0
  121. package/dist/tasks/gulp/pages.js +39 -0
  122. package/dist/tasks/gulp/pages.js.map +1 -0
  123. package/dist/tasks/gulp/pipeline.d.ts +1 -0
  124. package/dist/tasks/gulp/pipeline.js +29 -0
  125. package/dist/tasks/gulp/pipeline.js.map +1 -0
  126. package/dist/tasks/gulp/public.d.ts +3 -0
  127. package/dist/tasks/gulp/public.js +50 -0
  128. package/dist/tasks/gulp/public.js.map +1 -0
  129. package/dist/tasks/gulp/styles.d.ts +3 -0
  130. package/dist/tasks/gulp/styles.js +40 -0
  131. package/dist/tasks/gulp/styles.js.map +1 -0
  132. package/dist/tasks/gulp/templates.d.ts +2 -0
  133. package/dist/tasks/gulp/templates.js +45 -0
  134. package/dist/tasks/gulp/templates.js.map +1 -0
  135. package/dist/tasks/gulp/types.d.ts +4 -0
  136. package/dist/tasks/gulp/types.js +293 -0
  137. package/dist/tasks/gulp/types.js.map +1 -0
  138. package/dist/tasks/gulp/watchers.d.ts +3 -0
  139. package/dist/tasks/gulp/watchers.js +59 -0
  140. package/dist/tasks/gulp/watchers.js.map +1 -0
  141. package/dist/tasks/index.d.ts +4 -0
  142. package/dist/tasks/index.js +23 -0
  143. package/dist/tasks/index.js.map +1 -0
  144. package/dist/tasks/syncSettings.d.ts +3 -0
  145. package/dist/tasks/syncSettings.js +18 -0
  146. package/dist/tasks/syncSettings.js.map +1 -0
  147. package/dist/utils/index.js +2 -0
  148. package/dist/utils/index.js.map +1 -0
  149. package/dist/utils/logger.d.ts +17 -0
  150. package/dist/utils/logger.js +37 -0
  151. package/dist/utils/logger.js.map +1 -0
  152. package/dist/wix-sdk/check.d.ts +4 -0
  153. package/dist/wix-sdk/check.js +23 -0
  154. package/dist/wix-sdk/check.js.map +1 -0
  155. package/dist/wix-sdk/client.d.ts +10 -0
  156. package/dist/wix-sdk/client.js +18 -0
  157. package/dist/wix-sdk/client.js.map +1 -0
  158. package/dist/wix-sdk/index.d.ts +4 -0
  159. package/dist/wix-sdk/index.js +15 -0
  160. package/dist/wix-sdk/index.js.map +1 -0
  161. package/dist/wix-sdk/init.d.ts +4 -0
  162. package/dist/wix-sdk/init.js +51 -0
  163. package/dist/wix-sdk/init.js.map +1 -0
  164. package/dist/wix-sdk/run.d.ts +4 -0
  165. package/dist/wix-sdk/run.js +53 -0
  166. package/dist/wix-sdk/run.js.map +1 -0
  167. package/dist/wix-sync/client.d.ts +3 -0
  168. package/dist/wix-sync/client.js +5 -0
  169. package/dist/wix-sync/client.js.map +1 -0
  170. package/dist/wix-sync/export.d.ts +4 -0
  171. package/dist/wix-sync/export.js +15 -0
  172. package/dist/wix-sync/export.js.map +1 -0
  173. package/dist/wix-sync/import.d.ts +4 -0
  174. package/dist/wix-sync/import.js +26 -0
  175. package/dist/wix-sync/import.js.map +1 -0
  176. package/dist/wix-sync/index.d.ts +4 -0
  177. package/dist/wix-sync/index.js +35 -0
  178. package/dist/wix-sync/index.js.map +1 -0
  179. package/dist/wix-sync/init.d.ts +4 -0
  180. package/dist/wix-sync/init.js +74 -0
  181. package/dist/wix-sync/init.js.map +1 -0
  182. package/dist/wix-sync/is-alive.d.ts +4 -0
  183. package/dist/wix-sync/is-alive.js +23 -0
  184. package/dist/wix-sync/is-alive.js.map +1 -0
  185. package/dist/wix-sync/migrate.d.ts +4 -0
  186. package/dist/wix-sync/migrate.js +21 -0
  187. package/dist/wix-sync/migrate.js.map +1 -0
  188. package/dist/wix-sync/sync.d.ts +4 -0
  189. package/dist/wix-sync/sync.js +26 -0
  190. package/dist/wix-sync/sync.js.map +1 -0
  191. package/files/sync-data/data/test.csv +17 -0
  192. package/files/sync-data/files/lucy.jpg +0 -0
  193. package/files/sync-data/schema/test.json +11 -0
  194. package/files/templates/block[D]/files/.stylelintrc.js +8 -0
  195. package/files/templates/block[D]/lucy.json +9 -0
  196. package/files/templates/cargo[D]/files/.env +1 -0
  197. package/files/templates/cargo[D]/files/Cargo.toml +238 -0
  198. package/files/templates/cargo[D]/files/Makefile.toml +4 -0
  199. package/files/templates/cargo[D]/files/build/main.rs +35 -0
  200. package/files/templates/cargo[D]/files/config/beta.json +19 -0
  201. package/files/templates/cargo[D]/files/config/ci.json +15 -0
  202. package/files/templates/cargo[D]/files/config/default.json +71 -0
  203. package/files/templates/cargo[D]/files/config/development.json +10 -0
  204. package/files/templates/cargo[D]/files/config/produktion.json +5 -0
  205. package/files/templates/cargo[D]/files/config/stage.json +4 -0
  206. package/files/templates/cargo[D]/files/locales/todo.yml +3 -0
  207. package/files/templates/cargo[D]/files/public/index.html +1 -0
  208. package/files/templates/cargo[D]/lucy.json +15 -0
  209. package/files/templates/expo[D]/files/.stylelintrc.js +8 -0
  210. package/files/{expo → templates/expo[D]/files}/eas.json +9 -3
  211. package/files/templates/expo[D]/files/lib/data.ts +197 -0
  212. package/files/{expo → templates/expo[D]/files}/metro.config.js +6 -0
  213. package/files/templates/expo[D]/files/pnpm-workspace.yaml +3 -0
  214. package/files/templates/expo[D]/lucy.json +86 -0
  215. package/files/templates/monorepo[D]/files/.editorconfig +10 -0
  216. package/files/templates/monorepo[D]/files/.nvmrc +1 -0
  217. package/files/templates/monorepo[D]/files/.prettierignore +23 -0
  218. package/files/templates/monorepo[D]/files/.prettierrc.json +15 -0
  219. package/files/templates/monorepo[D]/files/.stylelintrc.js +8 -0
  220. package/files/templates/monorepo[D]/files/.yarnrc +1 -0
  221. package/files/templates/monorepo[D]/files/.yarnrc.yml +3 -0
  222. package/files/templates/monorepo[D]/files/README.md +109 -0
  223. package/files/templates/monorepo[D]/files/currents.config.ts +5 -0
  224. package/files/templates/monorepo[D]/files/nx.json +25 -0
  225. package/files/templates/monorepo[D]/files/pnpm-workspace.yaml +11 -0
  226. package/files/templates/monorepo[D]/files/tsconfig.json +6 -0
  227. package/files/templates/monorepo[D]/files/typedoc.json +25 -0
  228. package/files/templates/monorepo[D]/files/vitest.config.ts +27 -0
  229. package/files/templates/monorepo[D]/lucy.json +69 -0
  230. package/files/templates/tauri[D]/lucy.json +9 -0
  231. package/files/templates/velo[D]/files/.prettierignore +23 -0
  232. package/files/templates/velo[D]/files/.prettierrc.js +16 -0
  233. package/files/templates/velo[D]/lucy.json +137 -0
  234. package/old/Gulpfile.d.ts +34 -0
  235. package/old/Gulpfile.js +116 -0
  236. package/old/Gulpfile.js.map +1 -0
  237. package/old/gulp/backend.d.ts +3 -0
  238. package/old/gulp/backend.js +92 -0
  239. package/old/gulp/backend.js.map +1 -0
  240. package/old/gulp/checks.d.ts +3 -0
  241. package/old/gulp/checks.js +205 -0
  242. package/old/gulp/checks.js.map +1 -0
  243. package/old/gulp/clean.d.ts +3 -0
  244. package/old/gulp/clean.js +29 -0
  245. package/old/gulp/clean.js.map +1 -0
  246. package/old/gulp/copy.d.ts +2 -0
  247. package/old/gulp/copy.js +34 -0
  248. package/old/gulp/copy.js.map +1 -0
  249. package/old/gulp/helpers.d.ts +2 -0
  250. package/old/gulp/helpers.js +25 -0
  251. package/old/gulp/helpers.js.map +1 -0
  252. package/old/gulp/pages.d.ts +2 -0
  253. package/old/gulp/pages.js +37 -0
  254. package/old/gulp/pages.js.map +1 -0
  255. package/old/gulp/pipeline.d.ts +1 -0
  256. package/old/gulp/pipeline.js +29 -0
  257. package/old/gulp/pipeline.js.map +1 -0
  258. package/old/gulp/public.d.ts +2 -0
  259. package/old/gulp/public.js +50 -0
  260. package/old/gulp/public.js.map +1 -0
  261. package/old/gulp/styles.d.ts +2 -0
  262. package/old/gulp/styles.js +40 -0
  263. package/old/gulp/styles.js.map +1 -0
  264. package/old/gulp/templates.d.ts +2 -0
  265. package/old/gulp/templates.js +33 -0
  266. package/old/gulp/templates.js.map +1 -0
  267. package/old/gulp/types.d.ts +4 -0
  268. package/old/gulp/types.js +289 -0
  269. package/old/gulp/types.js.map +1 -0
  270. package/old/gulp/watchers.d.ts +9 -0
  271. package/old/gulp/watchers.js +59 -0
  272. package/old/gulp/watchers.js.map +1 -0
  273. package/old/helpers.d.ts +32 -0
  274. package/old/helpers.js +267 -0
  275. package/old/helpers.js.map +1 -0
  276. package/{src copy/helpers.ts → old/helpers.ts} +1 -1
  277. package/old/index.d.ts +59 -0
  278. package/old/index.js +288 -0
  279. package/old/index.js.map +1 -0
  280. package/old/init.d.ts +8 -0
  281. package/old/init.js +165 -0
  282. package/old/init.js.map +1 -0
  283. package/old/models.d.ts +37 -0
  284. package/old/models.js +2 -0
  285. package/old/models.js.map +1 -0
  286. package/old/prepare.d.ts +8 -0
  287. package/old/prepare.js +20 -0
  288. package/old/prepare.js.map +1 -0
  289. package/old/schemas/index.js +2 -0
  290. package/old/schemas/index.js.map +1 -0
  291. package/old/schemas/index.ts +0 -0
  292. package/old/schemas/types.d.ts +0 -0
  293. package/old/schemas/types.js +2 -0
  294. package/old/schemas/types.js.map +1 -0
  295. package/old/schemas/types.ts +0 -0
  296. package/old/sync.d.ts +2 -0
  297. package/old/sync.js +88 -0
  298. package/old/sync.js.map +1 -0
  299. package/package.json +18 -19
  300. package/patches/velo-sync+0.0.9.patch +13 -0
  301. package/src/args.ts +62 -17
  302. package/src/commands/checks.ts +51 -0
  303. package/src/commands/cleanup.ts +11 -0
  304. package/src/commands/copy.ts +28 -0
  305. package/src/commands/edit.ts +81 -0
  306. package/src/commands/exec.ts +69 -0
  307. package/src/commands/git.ts +113 -0
  308. package/src/commands/home.ts +22 -0
  309. package/src/commands/install.ts +249 -0
  310. package/src/commands/read.ts +45 -0
  311. package/src/commands/write.ts +45 -0
  312. package/src/config.ts +116 -35
  313. package/src/error.ts +1 -2
  314. package/src/helpers.ts +92 -0
  315. package/src/index.ts +88 -13
  316. package/src/init/blocks.ts +85 -0
  317. package/src/init/cargo.ts +25 -0
  318. package/src/init/expo.ts +69 -0
  319. package/src/init/gitModules.ts +15 -0
  320. package/src/init/index.ts +81 -0
  321. package/src/init/monorepo.ts +72 -0
  322. package/src/init/prepareVelo.ts +19 -0
  323. package/src/init/tauri.ts +42 -0
  324. package/src/init/templates.ts +98 -0
  325. package/src/init/velo.ts +65 -0
  326. package/src/runtime.ts +1 -0
  327. package/src/schemas/gulp.ts +31 -0
  328. package/src/schemas/index.ts +13 -1
  329. package/src/schemas/lucy.ts +43 -0
  330. package/src/schemas/types.ts +40 -0
  331. package/src/tasks/Gulpfile.ts +207 -0
  332. package/src/tasks/gulp/backend.ts +113 -0
  333. package/src/tasks/gulp/checks.ts +218 -0
  334. package/src/tasks/gulp/clean.ts +38 -0
  335. package/src/tasks/gulp/copy.ts +38 -0
  336. package/src/tasks/gulp/helpers.ts +18 -0
  337. package/src/tasks/gulp/pages.ts +43 -0
  338. package/src/tasks/gulp/pipeline.ts +31 -0
  339. package/src/tasks/gulp/public.ts +61 -0
  340. package/src/tasks/gulp/styles.ts +47 -0
  341. package/src/tasks/gulp/templates.ts +53 -0
  342. package/src/tasks/gulp/types.ts +310 -0
  343. package/src/tasks/gulp/watchers.ts +97 -0
  344. package/src/tasks/index.ts +24 -0
  345. package/src/tasks/syncSettings.ts +21 -0
  346. package/src/types.d.ts +1 -1
  347. package/src/utils/index.ts +0 -0
  348. package/src/utils/logger.ts +40 -0
  349. package/src/wix-sdk/check.ts +24 -0
  350. package/src/wix-sdk/client.ts +18 -0
  351. package/src/wix-sdk/index.ts +17 -0
  352. package/src/wix-sdk/init.ts +54 -0
  353. package/src/wix-sdk/run.ts +56 -0
  354. package/src/wix-sync/client.ts +6 -0
  355. package/src/wix-sync/export.ts +19 -0
  356. package/src/wix-sync/import.ts +27 -0
  357. package/src/wix-sync/index.ts +36 -0
  358. package/src/wix-sync/init.ts +77 -0
  359. package/src/wix-sync/is-alive.ts +25 -0
  360. package/src/wix-sync/migrate.ts +23 -0
  361. package/src/wix-sync/sync.ts +27 -0
  362. package/tsconfig.json +6 -5
  363. package/dist/init.d.ts +0 -4
  364. package/dist/init.js +0 -275
  365. package/dist/models.js +0 -1
  366. package/dist/params.d.ts +0 -7
  367. package/dist/params.js +0 -23
  368. package/files/expo/lib/data.ts +0 -48
  369. package/files/expo/lucy.json +0 -8
  370. package/src/init.ts +0 -392
  371. /package/dist/{models.d.ts → schemas/tsconfig.d.ts} +0 -0
  372. /package/{files/expo/components/.gitkeep → dist/utils/index.d.ts} +0 -0
  373. /package/files/{expo → templates/expo[D]/files}/.nvmrc +0 -0
  374. /package/files/{expo → templates/expo[D]/files}/.prettierignore +0 -0
  375. /package/files/{expo → templates/expo[D]/files}/.prettierrc.js +0 -0
  376. /package/files/{expo → templates/expo[D]/files}/.yarnrc +0 -0
  377. /package/files/{expo → templates/expo[D]/files}/.yarnrc.yml +0 -0
  378. /package/files/{expo → templates/expo[D]/files}/README.md +0 -0
  379. /package/files/{expo → templates/expo[D]/files}/assets/fonts/SpaceMono-Regular.ttf +0 -0
  380. /package/files/{expo → templates/expo[D]/files}/assets/images/adaptive-icon.png +0 -0
  381. /package/files/{expo → templates/expo[D]/files}/assets/images/favicon.png +0 -0
  382. /package/files/{expo → templates/expo[D]/files}/assets/images/icon.png +0 -0
  383. /package/files/{expo → templates/expo[D]/files}/assets/images/splash-icon.png +0 -0
  384. /package/files/{expo → templates/expo[D]/files}/babel.config.js +0 -0
  385. /package/files/{expo/components/ui → templates/expo[D]/files/components}/.gitkeep +0 -0
  386. /package/files/{velo/typescript/__mocks__ → templates/expo[D]/files/components/ui}/.gitkeep +0 -0
  387. /package/files/{expo → templates/expo[D]/files}/constants/theme.ts +0 -0
  388. /package/files/{expo → templates/expo[D]/files}/eslint.config.mjs +0 -0
  389. /package/files/{expo → templates/expo[D]/files}/global.css +0 -0
  390. /package/files/{expo → templates/expo[D]/files}/hooks/useColorScheme.ts +0 -0
  391. /package/files/{expo → templates/expo[D]/files}/index.ts +0 -0
  392. /package/files/{expo → templates/expo[D]/files}/lib/utils/index.ts +0 -0
  393. /package/files/{expo → templates/expo[D]/files}/lib/utils/polyfills.ts +0 -0
  394. /package/files/{expo → templates/expo[D]/files}/lib/wix/client.ts +0 -0
  395. /package/files/{expo → templates/expo[D]/files}/lib/wix/error.ts +0 -0
  396. /package/files/{expo → templates/expo[D]/files}/lib/wix/index.ts +0 -0
  397. /package/files/{expo → templates/expo[D]/files}/nativewind-env.d.ts +0 -0
  398. /package/files/{expo → templates/expo[D]/files}/scripts/reset-project.ts +0 -0
  399. /package/files/{expo → templates/expo[D]/files}/tailwind.config.js +0 -0
  400. /package/files/{expo → templates/expo[D]/files}/tsconfig.json +0 -0
  401. /package/files/{expo → templates/expo[D]/files}/types/reset.d.ts +0 -0
  402. /package/files/{velo → templates/velo[D]/files}/.gitmodules +0 -0
  403. /package/files/{velo → templates/velo[D]/files}/.madgerc +0 -0
  404. /package/files/{velo → templates/velo[D]/files}/.nvmrc +0 -0
  405. /package/files/{velo → templates/velo[D]/files}/.stylelintrc.js +0 -0
  406. /package/files/{velo → templates/velo[D]/files}/.yarnrc.yml +0 -0
  407. /package/files/{velo → templates/velo[D]/files}/currents.config.js +0 -0
  408. /package/files/{velo → templates/velo[D]/files}/cypress/e2e/base/base.cy.ts +0 -0
  409. /package/files/{velo → templates/velo[D]/files}/cypress/fixtures/example.json +0 -0
  410. /package/files/{velo → templates/velo[D]/files}/cypress/support/commands.ts +0 -0
  411. /package/files/{velo → templates/velo[D]/files}/cypress/support/e2e.ts +0 -0
  412. /package/files/{velo → templates/velo[D]/files}/cypress/tsconfig.json +0 -0
  413. /package/files/{velo → templates/velo[D]/files}/cypress.config.mjs +0 -0
  414. /package/files/{velo → templates/velo[D]/files}/eslint.config.mjs +0 -0
  415. /package/files/{velo → templates/velo[D]/files}/local.tsconfig.json +0 -0
  416. /package/files/{velo → templates/velo[D]/files}/typedoc.json +0 -0
  417. /package/files/{velo/typescript/pages → templates/velo[D]/files/typescript/__mocks__}/.gitkeep +0 -0
  418. /package/files/{velo → templates/velo[D]/files}/typescript/backend/data.ts +0 -0
  419. /package/files/{velo → templates/velo[D]/files}/typescript/backend/events.ts +0 -0
  420. /package/files/{velo → templates/velo[D]/files}/typescript/backend/http-functions.ts +0 -0
  421. /package/files/{velo → templates/velo[D]/files}/typescript/backend/lib/http-functions/sync.ts +0 -0
  422. /package/files/{velo → templates/velo[D]/files}/typescript/backend/permissions.json +0 -0
  423. /package/files/{velo/typescript/public → templates/velo[D]/files/typescript/pages}/.gitkeep +0 -0
  424. /package/files/{velo/typescript/styles → templates/velo[D]/files/typescript/public}/.gitkeep +0 -0
  425. /package/files/{velo → templates/velo[D]/files}/typescript/public/scss/app.scss +0 -0
  426. /package/files/{velo/typescript/styles/global.scss → templates/velo[D]/files/typescript/styles/.gitkeep} +0 -0
  427. /package/{src copy/schemas/index.ts → files/templates/velo[D]/files/typescript/styles/global.scss} +0 -0
  428. /package/files/{velo → templates/velo[D]/files}/typescript/tsconfig.json +0 -0
  429. /package/files/{velo → templates/velo[D]/files}/vitest.config.ts +0 -0
  430. /package/{src copy → old}/Gulpfile.ts +0 -0
  431. /package/{src copy → old}/gulp/backend.ts +0 -0
  432. /package/{src copy → old}/gulp/checks.ts +0 -0
  433. /package/{src copy → old}/gulp/clean.ts +0 -0
  434. /package/{src copy → old}/gulp/copy.ts +0 -0
  435. /package/{src copy → old}/gulp/helpers.ts +0 -0
  436. /package/{src copy → old}/gulp/pages.ts +0 -0
  437. /package/{src copy → old}/gulp/pipeline.ts +0 -0
  438. /package/{src copy → old}/gulp/public.ts +0 -0
  439. /package/{src copy → old}/gulp/styles.ts +0 -0
  440. /package/{src copy → old}/gulp/templates.ts +0 -0
  441. /package/{src copy → old}/gulp/types.ts +0 -0
  442. /package/{src copy → old}/gulp/watchers.ts +0 -0
  443. /package/{src copy → old}/index.ts +0 -0
  444. /package/{src copy → old}/init.ts +0 -0
  445. /package/{src copy → old}/models.ts +0 -0
  446. /package/{src copy → old}/prepare.ts +0 -0
  447. /package/{src copy/schemas/types.ts → old/schemas/index.d.ts} +0 -0
  448. /package/{src copy → old}/settings.json +0 -0
  449. /package/{src copy → old}/sync.ts +0 -0
  450. /package/{src copy → old}/types.d.ts +0 -0
  451. /package/src/{models.ts → schemas/tsconfig.ts} +0 -0
@@ -0,0 +1,165 @@
1
+ import { Command } from "@effect/platform/index";
2
+ import { Effect, Schedule } from "effect/index";
3
+ import { Config } from "../config.js";
4
+ import { logger } from "../utils/logger.js";
5
+ export const installPackages = (workspace = false) => {
6
+ return Effect.gen(function* () {
7
+ const config = yield* Config;
8
+ const pkgs = [];
9
+ for (const [key, value] of Object.entries(config.config.lucySettings.dependencies)) {
10
+ if (value.length > 0) {
11
+ pkgs.push(`${key}@${value}`);
12
+ continue;
13
+ }
14
+ pkgs.push(key);
15
+ }
16
+ const devPkgs = [];
17
+ for (const [key, value] of Object.entries(config.config.lucySettings.devDependencies)) {
18
+ if (value.length > 0) {
19
+ devPkgs.push(`${key}@${value}`);
20
+ continue;
21
+ }
22
+ devPkgs.push(key);
23
+ }
24
+ const manager = config.config.lucySettings.packageManager;
25
+ function pkgMgrParamsInstall() {
26
+ if (manager === "npm") {
27
+ return ["install"];
28
+ }
29
+ if (manager === "pnpm") {
30
+ return ["install"];
31
+ }
32
+ return ["add"];
33
+ }
34
+ function pkgMgrParamsInstallDev() {
35
+ if (manager === "npm") {
36
+ return ["install", "-D"];
37
+ }
38
+ if (manager === "pnpm") {
39
+ return ["install", "-D"];
40
+ }
41
+ return ["add", "-D"];
42
+ }
43
+ function workspaceEnabled() {
44
+ if (config.config.lucySettings.packageManager === "pnpm" && workspace) {
45
+ return ["--workspace-root"];
46
+ }
47
+ return [];
48
+ }
49
+ logger.info("Installing dependencies");
50
+ const install = Command.make(manager, ...pkgMgrParamsInstall(), ...workspaceEnabled(), ...pkgs).pipe(Command.stdout("inherit"), // Stream stdout to process.stdout
51
+ Command.stderr("inherit"), // Stream stderr to process.stderr
52
+ Command.exitCode // Get the exit code
53
+ );
54
+ logger.info("Installing dev dependencies");
55
+ const installDev = Command.make(manager, ...pkgMgrParamsInstallDev(), ...workspaceEnabled(), ...devPkgs).pipe(Command.stdout("inherit"), // Stream stdout to process.stdout
56
+ Command.stderr("inherit"), // Stream stderr to process.stderr
57
+ Command.exitCode // Get the exit code
58
+ );
59
+ if (Object.keys(config.config.lucySettings.dependencies).length > 0) {
60
+ if ((yield* install) !== 0) {
61
+ return logger.error("Failed to install dependencies. Please check the error message above.");
62
+ }
63
+ }
64
+ if (Object.keys(config.config.lucySettings.devDependencies).length > 0) {
65
+ if ((yield* installDev) !== 0) {
66
+ return logger.error("Failed to install dev dependencies. Please check the error message above.");
67
+ }
68
+ }
69
+ });
70
+ };
71
+ export const runInstall = Effect.gen(function* () {
72
+ const config = yield* Config;
73
+ const manager = config.config.lucySettings.packageManager;
74
+ const install = Command.make(manager, "install").pipe(Command.stdout("inherit"), // Stream stdout to process.stdout
75
+ Command.stderr("inherit"), // Stream stderr to process.stderr
76
+ Command.exitCode // Get the exit code
77
+ );
78
+ yield* install;
79
+ });
80
+ // export const yarnSetVersion = Effect.gen(function*() {
81
+ // const yarnDev = Command.make(
82
+ // "yarn",
83
+ // "set",
84
+ // "version",
85
+ // "berry",
86
+ // ).pipe(
87
+ // Command.stdout("inherit"), // Stream stdout to process.stdout
88
+ // Command.exitCode // Get the exit code
89
+ // )
90
+ // yield* yarnDev;
91
+ // })
92
+ export const installVeloPackages = Effect.gen(function* () {
93
+ const config = yield* Config;
94
+ const simpleSchedule = Schedule.tapOutput(Schedule.fromDelays(50, 100, 200, 400, 800, 1600, 3200), (n) => Effect.succeed(logger.warning(`Failed to install WIX package. Retrying...`)));
95
+ const pkgs = [];
96
+ for (const [key, value] of Object.entries(config.config.lucySettings.dependencies)) {
97
+ if (value.length > 0) {
98
+ pkgs.push(`${key}@${value}`);
99
+ continue;
100
+ }
101
+ pkgs.push(key);
102
+ }
103
+ const wixPkgs = [];
104
+ const wixInstall = (cmd) => Effect.gen(function* () {
105
+ const code = yield* Effect.retryOrElse(Effect.gen(function* () {
106
+ const code = yield* cmd;
107
+ if (code !== 0) {
108
+ return yield* Effect.fail(code);
109
+ }
110
+ return yield* Effect.succeed(code);
111
+ }), simpleSchedule, () => Effect.succeed(0));
112
+ if (code !== 0) {
113
+ logger.error("Failed to install WIX package.");
114
+ }
115
+ return code;
116
+ });
117
+ for (const [key, value] of Object.entries(config.config.lucySettings.dependencies)) {
118
+ if (value.length > 0) {
119
+ wixPkgs.push(wixInstall(Command.make("wix", "install", `${key}@${value}`).pipe(Command.stdout("inherit"), Command.stderr("inherit"), Command.exitCode)));
120
+ continue;
121
+ }
122
+ wixPkgs.push(wixInstall(Command.make("wix", "install", `${key}`).pipe(Command.stdout("inherit"), Command.stderr("inherit"), Command.exitCode)));
123
+ }
124
+ const devPkgs = [];
125
+ for (const [key, value] of Object.entries(config.config.lucySettings.devDependencies)) {
126
+ if (value.length > 0) {
127
+ devPkgs.push(`${key}@${value}`);
128
+ continue;
129
+ }
130
+ devPkgs.push(key);
131
+ }
132
+ const yarn = Command.make("yarn", "add", ...pkgs).pipe(Command.stdout("inherit"), // Stream stdout to process.stdout
133
+ Command.exitCode // Get the exit code
134
+ );
135
+ const yarnDev = Command.make("yarn", "add", "-D", ...devPkgs).pipe(Command.stdout("inherit"), // Stream stdout to process.stdout
136
+ Command.exitCode // Get the exit code
137
+ );
138
+ logger.info("Installing dependencies with wix...");
139
+ const status = yield* Effect.all([...wixPkgs], { concurrency: 15 });
140
+ if (status.every((s) => s !== 0)) {
141
+ return logger.error("Failed to install WIX dependencies. Please check the error message above.");
142
+ }
143
+ logger.info("Installing dependencies");
144
+ if ((yield* yarn) !== 0) {
145
+ return logger.error("Failed to install dependencies. Please check the error message above.");
146
+ }
147
+ logger.info("Installing dev dependencies");
148
+ if ((yield* yarnDev) !== 0) {
149
+ return logger.error("Failed to install dev dependencies. Please check the error message above.");
150
+ }
151
+ });
152
+ export const approveBuilds = Effect.gen(function* () {
153
+ const config = yield* Config;
154
+ const manager = config.config.lucySettings.packageManager;
155
+ const approve = Command.make("pnpm", "approve-builds").pipe(Command.stdout("inherit"), // Stream stdout to process.stdout
156
+ Command.stderr("inherit"), // Stream stderr to process.stderr
157
+ Command.stdin("inherit"), Command.exitCode // Get the exit code
158
+ );
159
+ if (manager !== "pnpm") {
160
+ logger.warning("The 'approve-build' command is only available for pnpm. Skipping...");
161
+ return;
162
+ }
163
+ yield* approve;
164
+ });
165
+ //# sourceMappingURL=install.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/commands/install.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAChD,OA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AAM,CAAC,KAAK,CAAC,uEAAuE,CAAC,CAAC;IACjG,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;IAC3C,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,MAAM,CAAC,KAAK,CAAC,2EAA2E,CAAC,CAAC;IACrG,CAAC;AAEL,CAAC,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IACzC,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC;IAEjC,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,cAAc,CAAC;IAC1D,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CACxB,MAAM,EACN,gBAAgB,CACnB,CAAC,IAAI,CACF,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,kCAAkC;IAC7D,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,kCAAkC;IAC7D,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,EACxB,OAAO,CAAC,QAAQ,CAAC,oBAAoB;KACxC,CAAA;IACD,IAAI,OAAO,KAAK,MAAM,EAAE,CAAC;QACrB,MAAM,CAAC,OAAO,CAAC,qEAAqE,CAAC,CAAC;QACtF,OAAO;IACX,CAAC;IACD,KAAK,CAAC,CAAC,OAAO,CAAC;AACnB,CAAC,CAAC,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { Effect } from "effect/index";
2
+ import { FileSystem, Path } from "@effect/platform";
3
+ import { Config } from "../config.js";
4
+ export declare const readPackageJson: Effect.Effect<void, import("effect/ParseResult").ParseError | import("@effect/platform/Error").PlatformError, Config | FileSystem.FileSystem | Path.Path>;
5
+ export declare const readLucyJsonFromTemplate: Effect.Effect<void, import("effect/ParseResult").ParseError | import("@effect/platform/Error").PlatformError, Config | FileSystem.FileSystem | Path.Path>;
6
+ export declare const readVeloSyncSettings: Effect.Effect<void, import("effect/ParseResult").ParseError | import("@effect/platform/Error").PlatformError, Config | FileSystem.FileSystem>;
@@ -0,0 +1,40 @@
1
+ import { Effect, Schema } from "effect/index";
2
+ import { FileSystem, Path } from "@effect/platform";
3
+ import { Config, lucyJsonName, packageJsonPath, veloSyncJsonPath } from "../config.js";
4
+ import { JsonSchema, veloSyncSettings } from "../schemas/index.js";
5
+ import { lucySettings } from "../schemas/lucy.js";
6
+ import { logger } from "../utils/logger.js";
7
+ export const readPackageJson = Effect.gen(function* () {
8
+ const config = yield* Config;
9
+ const fs = yield* FileSystem.FileSystem;
10
+ const path = yield* Path.Path;
11
+ const packageJsonRaw = yield* fs.readFile(packageJsonPath);
12
+ config.config.packageJson = yield* Schema.decodeUnknown(JsonSchema)(packageJsonRaw.toString());
13
+ });
14
+ export const readLucyJsonFromTemplate = Effect.gen(function* () {
15
+ const config = yield* Config;
16
+ const fs = yield* FileSystem.FileSystem;
17
+ const path = yield* Path.Path;
18
+ const lucyRaw = yield* fs.readFileString(path.join(config.config.templateDir, lucyJsonName));
19
+ const lucySettingsJSON = yield* Schema.decodeUnknown(JsonSchema)(lucyRaw);
20
+ const lucySetting = yield* Schema.decodeUnknown(lucySettings)(lucySettingsJSON);
21
+ if (config.config.lucySettings.initialized) {
22
+ if (config.config.force) {
23
+ logger.warning(`${lucyJsonName} already exists in the target directory, but 'force' is set. Overwriting...`);
24
+ config.config.lucySettings = lucySetting;
25
+ return;
26
+ }
27
+ logger.warning(`${lucyJsonName} already exists in the target directory. Skipping reading ${lucyJsonName} from template.`);
28
+ return;
29
+ }
30
+ config.config.lucySettings = lucySetting;
31
+ });
32
+ export const readVeloSyncSettings = Effect.gen(function* () {
33
+ const config = yield* Config;
34
+ const fs = yield* FileSystem.FileSystem;
35
+ if (yield* fs.exists(veloSyncJsonPath)) {
36
+ const snyConfigRaw = yield* fs.readFileString(veloSyncJsonPath);
37
+ config.config.veloSyncSettings = yield* Schema.decodeUnknown(veloSyncSettings)(snyConfigRaw);
38
+ }
39
+ });
40
+ //# sourceMappingURL=read.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read.js","sourceRoot":"","sources":["../../src/commands/read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACvF,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAC/C,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC;IAC7B,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;IAE9B,MAAM,cAAc,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAA;IAC1D,MAAM,CAAC,MAAM,CAAC,WAAW,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,cAAc,CAAC,QAAQ,EAAE,CAAC,CAAC;AACnG,CAAC,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IACxD,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC;IAC7B,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,UAAU,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gBAAgB,CAAC,CAAA;QAC/D,MAAM,CAAC,MAAM,CAAC,gBAAgB,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC,YAAY,CAAC,CAAC;IACjG,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { Effect } from "effect/index";
2
+ import { FileSystem, Path } from "@effect/platform";
3
+ import { Config } from "../config.js";
4
+ export declare const writeLucySettings: Effect.Effect<void, import("@effect/platform/Error").PlatformError, Config | FileSystem.FileSystem | Path.Path>;
5
+ export declare const writePackageJson: Effect.Effect<void, import("@effect/platform/Error").PlatformError, Config | FileSystem.FileSystem | Path.Path>;
6
+ export declare const writeVeloSyncSettings: Effect.Effect<void, import("@effect/platform/Error").PlatformError, Config | FileSystem.FileSystem | Path.Path>;
7
+ export declare const writeWixSDKSettings: Effect.Effect<void, import("@effect/platform/Error").PlatformError, Config | FileSystem.FileSystem | Path.Path>;
@@ -0,0 +1,28 @@
1
+ import { Effect } from "effect/index";
2
+ import { FileSystem, Path } from "@effect/platform";
3
+ import { Config, lucyJsonPath, packageJsonPath, veloSyncJsonPath, wixSDKSettingsJsonPath } from "../config.js";
4
+ export const writeLucySettings = Effect.gen(function* (_) {
5
+ const fs = yield* FileSystem.FileSystem;
6
+ const path = yield* Path.Path;
7
+ const config = yield* Config;
8
+ yield* fs.writeFileString(lucyJsonPath, JSON.stringify(config.config.lucySettings, null, 2));
9
+ });
10
+ export const writePackageJson = Effect.gen(function* (_) {
11
+ const fs = yield* FileSystem.FileSystem;
12
+ const path = yield* Path.Path;
13
+ const config = yield* Config;
14
+ yield* fs.writeFileString(packageJsonPath, JSON.stringify(config.config.packageJson, null, 2));
15
+ });
16
+ export const writeVeloSyncSettings = Effect.gen(function* () {
17
+ const config = yield* Config;
18
+ const fs = yield* FileSystem.FileSystem;
19
+ const path = yield* Path.Path;
20
+ yield* fs.writeFileString(veloSyncJsonPath, JSON.stringify(config.config.veloSyncSettings, null, 2));
21
+ });
22
+ export const writeWixSDKSettings = Effect.gen(function* () {
23
+ const config = yield* Config;
24
+ const fs = yield* FileSystem.FileSystem;
25
+ const path = yield* Path.Path;
26
+ yield* fs.writeFileString(wixSDKSettingsJsonPath, JSON.stringify(config.config.wixSDKSettings, null, 2));
27
+ });
28
+ //# sourceMappingURL=write.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"write.js","sourceRoot":"","sources":["../../src/commands/write.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAW,UAAU,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAC5D,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAE/G,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;IACpD,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;IAC9B,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC;IAE7B,KAAK,CAAC,CAAC,EAAE,CAAC,eAAe,CACrB,YAAY,EACZ,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC,CACtD,CAAC;AACN,CAAC,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;IACnD,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;IAC9B,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC;IAC7B,KAAK,CAAC,CAAC,EAAE,CAAC,eAAe,CACrB,eAAe,EACf,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,CACrD,CAAC;AACN,CAAC,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IACrD,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC;IAC7B,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;IAC9B,KAAK,CAAC,CAAC,EAAE,CAAC,eAAe,CACrB,gBAAgB,EAChB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE,IAAI,EAAE,CAAC,CAAC,CAC1D,CAAC;AACN,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IACnD,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC;IAC7B,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;IAC9B,KAAK,CAAC,CAAC,EAAE,CAAC,eAAe,CACrB,sBAAsB,EACtB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,cAAc,EAAE,IAAI,EAAE,CAAC,CAAC,CACxD,CAAC;AACN,CAAC,CAAC,CAAC"}
package/dist/commands.js CHANGED
@@ -16,3 +16,4 @@ export const init_expo = () => Effect.gen(function* () {
16
16
  yield* Effect.logError(`Command "${command}" produced stderr: ${res.stderr}`);
17
17
  }
18
18
  });
19
+ //#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 -1,20 +1,42 @@
1
1
  import { Context, Layer } from "effect";
2
2
  import { get_args } from "./args.js";
3
- type Action = 'init';
4
- type Actions = {
5
- action: Action;
6
- type: 'velo' | 'expo' | 'blocks' | undefined;
7
- };
3
+ import { LucySettings } from "./schemas/lucy.js";
4
+ import { Actions } from "./schemas/types.js";
5
+ import { VeloSyncSettings, WixSDKSettings } from "./schemas/index.js";
8
6
  declare const Config_base: Context.TagClass<Config, "Config", {
9
7
  readonly config: {
10
8
  readonly action: Actions;
9
+ readonly force: boolean;
11
10
  readonly cwd: string;
12
11
  readonly packageRoot: string;
13
12
  readonly filesFolder: string;
14
- readonly packageJson: any;
13
+ readonly veloSyncArguments?: {
14
+ data?: string;
15
+ collection?: string;
16
+ schema?: string;
17
+ dry: boolean;
18
+ };
19
+ packageJson: any;
20
+ lucySettings: LucySettings;
21
+ readonly lucyHome: string;
22
+ templateDir: string;
23
+ templateFiles: string;
24
+ projectName: string;
25
+ veloSyncSettings?: VeloSyncSettings;
26
+ wixSDKSettings?: WixSDKSettings;
15
27
  };
16
28
  }>;
17
29
  export declare class Config extends Config_base {
18
30
  }
19
- export declare const ConfigLayer: (args: Awaited<ReturnType<typeof get_args>>) => Layer.Layer<Config, never, never>;
31
+ export declare const packageJsonName = "package.json";
32
+ export declare const lucyJsonName = "lucy.json";
33
+ export declare const wixSyncJsonName = "wix-sync.json";
34
+ export declare const wixSDKSettingsJsonName = "wix-sdk-settings.json";
35
+ export declare const syncDataName = "sync-data";
36
+ export declare const packageJsonPath: string;
37
+ export declare const lucyJsonPath: string;
38
+ export declare const veloSyncJsonPath: string;
39
+ export declare const wixSDKSettingsJsonPath: string;
40
+ export declare const syncFilesSource: string;
41
+ export declare const ConfigLayer: (args: Awaited<ReturnType<typeof get_args>>) => Layer.Layer<Config, import("effect/ParseResult").ParseError | import("@effect/platform/Error").PlatformError, never>;
20
42
  export {};
package/dist/config.js CHANGED
@@ -1,39 +1,103 @@
1
- import { Context, Layer } from "effect";
1
+ import { Context, Effect, Layer, Schema } from "effect";
2
2
  import { dirname, join } from "path";
3
3
  import { fileURLToPath } from "url";
4
- import { readFileSync, existsSync } from "fs";
4
+ import { lucySettings } from "./schemas/lucy.js";
5
+ import os from 'os';
6
+ import { JsonSchema, veloSyncSettings, wixSDKSettings } from "./schemas/index.js";
7
+ import { FileSystem, Path } from "@effect/platform";
8
+ import { NodeContext } from "@effect/platform-node/index";
5
9
  export class Config extends Context.Tag("Config")() {
6
10
  }
7
11
  // In an ES module, `__dirname` is not available by default.
8
12
  // We can replicate it using `import.meta.url`.
9
13
  const __filename = fileURLToPath(import.meta.url);
10
14
  const __dirname = dirname(__filename);
11
- // Assuming your compiled output is in a 'dist' folder at the project root,
12
- // and your source `config.ts` is in `src`, the running `config.js` will be
13
- // in something like `dist/src`. To get to the package root, we go up two levels.
14
15
  const packageRoot = join(__dirname, "..");
16
+ export const packageJsonName = "package.json";
17
+ export const lucyJsonName = "lucy.json";
18
+ export const wixSyncJsonName = "wix-sync.json";
19
+ export const wixSDKSettingsJsonName = "wix-sdk-settings.json";
20
+ export const syncDataName = 'sync-data';
21
+ export const packageJsonPath = join(process.cwd(), packageJsonName);
22
+ export const lucyJsonPath = join(process.cwd(), lucyJsonName);
23
+ export const veloSyncJsonPath = join(process.cwd(), wixSyncJsonName);
24
+ export const wixSDKSettingsJsonPath = join(process.cwd(), wixSDKSettingsJsonName);
25
+ export const syncFilesSource = join(packageRoot, 'files', syncDataName);
15
26
  export const ConfigLayer = (args) => {
16
- let packageJson = '{}';
17
- const packageJsonPath = join(process.cwd(), 'package.json');
18
- try {
19
- if (existsSync(packageJsonPath)) {
20
- const raw = readFileSync(packageJsonPath, 'utf-8');
21
- packageJson = JSON.parse(raw);
27
+ return Layer.effect(Config, Effect.gen(function* () {
28
+ const fs = yield* FileSystem.FileSystem;
29
+ const path = yield* Path.Path;
30
+ let packageJson = {};
31
+ let lucyJson = undefined;
32
+ let veloSyncJson = undefined;
33
+ let wixSDKSettingsJson = undefined;
34
+ // Read package.json
35
+ if (yield* fs.exists(packageJsonPath)) {
36
+ const raw = yield* fs.readFileString(packageJsonPath, 'utf-8');
37
+ packageJson = yield* Schema.decodeUnknown(JsonSchema)(raw);
22
38
  }
23
- }
24
- catch (error) {
25
- console.error("Error reading package.json:", error);
26
- }
27
- return Layer.succeed(Config, Config.of({
28
- config: {
29
- action: {
30
- type: args.type,
31
- action: args._[0]
32
- },
33
- cwd: process.cwd(),
34
- packageRoot: packageRoot,
35
- filesFolder: join(packageRoot, 'files'),
36
- packageJson
39
+ // Read lucy.json
40
+ if (yield* fs.exists(lucyJsonPath)) {
41
+ const raw = yield* fs.readFileString(lucyJsonPath, 'utf-8');
42
+ const lucyJsonRaw = yield* Schema.decodeUnknown(JsonSchema)(raw);
43
+ lucyJson = yield* Schema.decodeUnknown(lucySettings)(lucyJsonRaw);
37
44
  }
38
- }));
45
+ // Read wix-sync.json
46
+ if (yield* fs.exists(veloSyncJsonPath)) {
47
+ const raw = yield* fs.readFileString(veloSyncJsonPath, 'utf-8');
48
+ const veloSyncSettingsRaw = yield* Schema.decodeUnknown(JsonSchema)(raw);
49
+ veloSyncJson = yield* Schema.decodeUnknown(veloSyncSettings)(veloSyncSettingsRaw);
50
+ }
51
+ // Read wix-sdk-settings.json
52
+ if (yield* fs.exists(wixSDKSettingsJsonPath)) {
53
+ const raw = yield* fs.readFileString(wixSDKSettingsJsonPath, 'utf-8');
54
+ const wixSDKSettingsRaw = yield* Schema.decodeUnknown(JsonSchema)(raw);
55
+ wixSDKSettingsJson = yield* Schema.decodeUnknown(wixSDKSettings)(wixSDKSettingsRaw);
56
+ }
57
+ const defaultModulePath = () => {
58
+ if (args.type === 'monorepo') {
59
+ return 'packages';
60
+ }
61
+ return '';
62
+ };
63
+ return Config.of({
64
+ config: {
65
+ action: {
66
+ initType: args.initType,
67
+ action: args._[0],
68
+ tasksName: args.tasksName,
69
+ syncAction: args.syncAction,
70
+ wixSDKAction: args.wixSDKAction,
71
+ },
72
+ force: args.force === true ? true : false,
73
+ cwd: process.cwd(),
74
+ projectName: process.cwd().split('/').pop() || 'lucy-project',
75
+ packageRoot,
76
+ filesFolder: join(packageRoot, 'files'),
77
+ packageJson,
78
+ lucyHome: join(os.homedir(), '.lucy-cli'),
79
+ veloSyncSettings: veloSyncJson,
80
+ veloSyncArguments: {
81
+ data: path.join(process.cwd(), args.input || ''),
82
+ collection: args.collection,
83
+ schema: path.join(process.cwd(), args.schema || ''),
84
+ dry: args.d || false,
85
+ },
86
+ wixSDKSettings: wixSDKSettingsJson,
87
+ lucySettings: lucyJson || {
88
+ modules: {},
89
+ devDependencies: {},
90
+ dependencies: {},
91
+ scripts: {},
92
+ initialized: false,
93
+ type: args.initType || 'velo',
94
+ packageManager: 'npm',
95
+ defaultModulePath: ''
96
+ },
97
+ templateFiles: '',
98
+ templateDir: '',
99
+ }
100
+ });
101
+ }).pipe(Effect.provide(NodeContext.layer)));
39
102
  };
103
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAEvD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,YAAY,EAAgB,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAoC,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpH,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,MAAM,OAAO,MAAO,SAAQ,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,EAyB9C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AC;gBACvC,WAAW;gBACX,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,CAAC;gBACzC,gBAAgB,EAAE,YAAY;gBAC9B,iBAAiB,EAAE;oBACf,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;oBAChD,UAAU,EAAE,IAAI,CAAC,UAAU;oBAC3B,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC;oBACnD,GAAG,EAAE,IAAI,CAAC,CAAC,IAAI,KAAK;iBACvB;gBACD,cAAc,EAAE,kBAAkB;gBAClC,YAAY,EAAE,QAAQ,IAAI;oBACtB,OAAO,EAAE,EAAE;oBACX,eAAe,EAAE,EAAE;oBACnB,YAAY,EAAE,EAAE;oBAChB,OAAO,EAAE,EAAE;oBACX,WAAW,EAAE,KAAK;oBAClB,IAAI,EAAE,IAAI,CAAC,QAAQ,IAAI,MAAM;oBAC7B,cAAc,EAAE,KAAK;oBACrB,iBAAiB,EAAE,EAAE;iBACxB;gBACD,aAAa,EAAE,EAAE;gBACjB,WAAW,EAAE,EAAE;aAClB;SACJ,CAAC,CAAC;IACP,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAC7C,CAAC;AACN,CAAC,CAAA"}
package/dist/error.d.ts CHANGED
@@ -2,15 +2,7 @@ declare const AppError_base: new <A extends Record<string, any> = {}>(args: impo
2
2
  readonly _tag: "AppError";
3
3
  } & Readonly<A>;
4
4
  export declare class AppError extends AppError_base<{
5
- cause: Error;
6
- message: string;
7
- }> {
8
- }
9
- declare const ScaleError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & {
10
- readonly _tag: "ScaleError";
11
- } & Readonly<A>;
12
- export declare class ScaleError extends ScaleError_base<{
13
- cause: Error;
5
+ cause: unknown;
14
6
  message: string;
15
7
  }> {
16
8
  }
package/dist/error.js CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Data } from "effect";
2
2
  export class AppError extends Data.TaggedError('AppError') {
3
3
  }
4
- export class ScaleError extends Data.TaggedError('ScaleError') {
5
- }
4
+ //# sourceMappingURL=error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,MAAM,OAAO,QAAS,SAAQ,IAAI,CAAC,WAAW,CAAC,UAAU,CAAoC;CAAG"}
package/dist/helpers.d.ts CHANGED
@@ -1 +1,10 @@
1
1
  export declare function parse_error(error: unknown): Error;
2
+ /**
3
+ * Kill all processes matching a specific substring in their command, with a fallback for Windows.
4
+ * @param {string} processPattern - The substring to match (e.g., "wix:dev" or "@wix/cli/bin/wix.cjs").
5
+ */
6
+ export declare function killAllProcesses(processPattern: string): void;
7
+ /**
8
+ * Clean up and run a command before exiting the process.
9
+ */
10
+ export declare function cleanupWatchers(): void;
package/dist/helpers.js CHANGED
@@ -1,3 +1,6 @@
1
+ import os from 'os';
2
+ import { spawnSync } from 'child_process';
3
+ import { logger } from './utils/logger.js';
1
4
  export function parse_error(error) {
2
5
  if (error instanceof Error) {
3
6
  return error;
@@ -9,3 +12,83 @@ export function parse_error(error) {
9
12
  return new Error('Unknown error');
10
13
  }
11
14
  }
15
+ /**
16
+ * Kill all processes matching a specific substring in their command, with a fallback for Windows.
17
+ * @param {string} processPattern - The substring to match (e.g., "wix:dev" or "@wix/cli/bin/wix.cjs").
18
+ */
19
+ export function killAllProcesses(processPattern) {
20
+ const isWindows = os.platform() === 'win32';
21
+ const command = isWindows
22
+ ? `tasklist /FI "IMAGENAME eq node.exe" /FO CSV | findstr "${processPattern}"`
23
+ : `ps -eo pid,command | grep "${processPattern}" | grep -v grep`;
24
+ logger.action(`Cleaning up processes...`);
25
+ const result = spawnSync(command, { shell: true, encoding: 'utf-8' });
26
+ if (result.error) {
27
+ logger.error(`spawnSync error: ${result.error.message}`);
28
+ return;
29
+ }
30
+ // if (!result.stdout.trim()) {
31
+ // logger.info(`No processes found matching pattern: ${processPattern}`);
32
+ // return;
33
+ // }
34
+ const lines = result.stdout.trim().split('\n');
35
+ const pids = isWindows
36
+ ? lines.map(line => line.match(/"(\d+)"/)?.[1])
37
+ : lines.map(line => line.trim().split(/\s+/)[0]).filter(pid => !isNaN(Number(pid)));
38
+ logger.action(`Extracted PIDs: ${JSON.stringify(pids)}`);
39
+ pids.forEach(pid => {
40
+ if (!pid)
41
+ return;
42
+ try {
43
+ const killCommand = isWindows
44
+ ? `taskkill /PID ${pid} /T /F`
45
+ : `kill -9 ${pid}`;
46
+ logger.info(`Running kill command: ${killCommand}`);
47
+ const killResult = spawnSync(killCommand, { shell: true, encoding: 'utf-8' });
48
+ if (killResult.error) {
49
+ logger.error(`Failed to kill process with PID ${pid}: ${killResult.error.message}`);
50
+ }
51
+ else {
52
+ logger.success(`Killed process with PID: ${pid}`);
53
+ }
54
+ if (!isWindows) {
55
+ setTimeout(() => {
56
+ try {
57
+ process.kill(parseInt(pid, 10), 'SIGKILL');
58
+ logger.info(`Sent SIGKILL to process with PID: ${pid}`);
59
+ }
60
+ catch (killError) {
61
+ if (killError.code === 'ESRCH') {
62
+ logger.info(`Process with PID ${pid} already terminated.`);
63
+ }
64
+ else {
65
+ logger.error(`Failed to send SIGKILL to process with PID ${pid}: ${killError.message}`);
66
+ }
67
+ }
68
+ }, 10000);
69
+ }
70
+ }
71
+ catch (err) {
72
+ logger.error(`Failed to kill process with PID ${pid}: ${err.message}`);
73
+ }
74
+ });
75
+ }
76
+ /**
77
+ * Clean up and run a command before exiting the process.
78
+ */
79
+ export function cleanupWatchers() {
80
+ logger.info(`🧹 Cleaning up Watchman watchers...`);
81
+ const cwd = process.cwd();
82
+ const command = `watchman watch-del "${cwd}"`; // Adjust for Windows paths
83
+ logger.info(`Cleaning watchers for directory: ${cwd}`);
84
+ const result = spawnSync(command, { shell: true, encoding: 'utf-8' });
85
+ // if (result.stderr) {
86
+ // logger.error(`spawnSync error: ${result.stderr}`);
87
+ // return;
88
+ // }
89
+ // if (!result.stdout.trim()) {
90
+ // logger.info(`No watchers found to clean up.`);
91
+ // return;
92
+ // }
93
+ }
94
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,SAAS,EAAQ,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,MAAM,UAAU,WAAW,CAAC,KAAc;IACtC,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC;IACjB,CAAC;SAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACnC,OAAO,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;SAAM,CAAC;QACJ,OAAO,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;IACtC,CAAC;AACL,CAAC;AAGD;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,cAAsB;IACnD,MAAM,SAAS,GAAG,EAAE,CAAC,QAAQ,EAAE,KAAK,OAAO,CAAC;IAC5C,MAAM,OAAO,GAAG,SAAS;QACrB,CAAC,CAAC,2DAA2D,cAAc,GAAG;QAC9E,CAAC,CAAC,8BAA8B,cAAc,kBAAkB,CAAC;IAErE,MAAM,CAAC,MAAM,CAAC,0BAA0B,CAAC,CAAC;IAE1C,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,EAAE,EAAE,KAA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