lucy-cli 2.0.0-alpha.11 → 2.0.0-alpha.13

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 (587) hide show
  1. package/dist/Gulpfile.d.ts +35 -0
  2. package/dist/Gulpfile.js +132 -0
  3. package/dist/Gulpfile.js.map +1 -0
  4. package/dist/args.d.ts +1 -6
  5. package/dist/args.js +57 -7
  6. package/dist/args.js.map +1 -0
  7. package/dist/commands/checks.d.ts +7 -0
  8. package/dist/commands/checks.js +47 -0
  9. package/dist/commands/checks.js.map +1 -0
  10. package/dist/commands/cleanup copy.d.ts +4 -0
  11. package/dist/commands/cleanup copy.js +10 -0
  12. package/dist/commands/cleanup copy.js.map +1 -0
  13. package/dist/commands/cleanup.d.ts +4 -0
  14. package/dist/commands/cleanup.js +10 -0
  15. package/dist/commands/cleanup.js.map +1 -0
  16. package/dist/commands/copy.d.ts +6 -0
  17. package/dist/commands/copy.js +20 -0
  18. package/dist/commands/copy.js.map +1 -0
  19. package/dist/commands/edit.d.ts +10 -0
  20. package/dist/commands/edit.js +69 -0
  21. package/dist/commands/edit.js.map +1 -0
  22. package/dist/commands/exec copy.d.ts +3 -0
  23. package/dist/commands/exec copy.js +20 -0
  24. package/dist/commands/exec copy.js.map +1 -0
  25. package/dist/commands/exec.d.ts +5 -0
  26. package/dist/commands/exec.js +40 -0
  27. package/dist/commands/exec.js.map +1 -0
  28. package/dist/commands/files.d.ts +7 -0
  29. package/dist/commands/files.js +28 -0
  30. package/dist/commands/files.js.map +1 -0
  31. package/dist/commands/git.d.ts +8 -0
  32. package/dist/commands/git.js +104 -0
  33. package/dist/commands/git.js.map +1 -0
  34. package/dist/commands/home.d.ts +4 -0
  35. package/dist/commands/home.js +18 -0
  36. package/dist/commands/home.js.map +1 -0
  37. package/dist/commands/install.d.ts +8 -0
  38. package/dist/commands/install.js +110 -0
  39. package/dist/commands/install.js.map +1 -0
  40. package/dist/commands/read.d.ts +6 -0
  41. package/dist/commands/read.js +41 -0
  42. package/dist/commands/read.js.map +1 -0
  43. package/dist/commands/write.d.ts +7 -0
  44. package/dist/commands/write.js +28 -0
  45. package/dist/commands/write.js.map +1 -0
  46. package/dist/commands.js +1 -0
  47. package/dist/commands.js.map +1 -0
  48. package/dist/config.d.ts +30 -7
  49. package/dist/config.js +89 -26
  50. package/dist/config.js.map +1 -0
  51. package/dist/error.d.ts +1 -9
  52. package/dist/error.js +1 -2
  53. package/dist/error.js.map +1 -0
  54. package/dist/gulp/backend.d.ts +3 -0
  55. package/dist/gulp/backend.js +92 -0
  56. package/dist/gulp/backend.js.map +1 -0
  57. package/dist/gulp/checks.d.ts +3 -0
  58. package/dist/gulp/checks.js +194 -0
  59. package/dist/gulp/checks.js.map +1 -0
  60. package/dist/gulp/clean.d.ts +3 -0
  61. package/dist/gulp/clean.js +33 -0
  62. package/dist/gulp/clean.js.map +1 -0
  63. package/dist/gulp/copy.d.ts +2 -0
  64. package/dist/gulp/copy.js +34 -0
  65. package/dist/gulp/copy.js.map +1 -0
  66. package/dist/gulp/helpers.d.ts +2 -0
  67. package/dist/gulp/helpers.js +21 -0
  68. package/dist/gulp/helpers.js.map +1 -0
  69. package/dist/gulp/pages.d.ts +2 -0
  70. package/dist/gulp/pages.js +39 -0
  71. package/dist/gulp/pages.js.map +1 -0
  72. package/dist/gulp/pipeline.d.ts +1 -0
  73. package/dist/gulp/pipeline.js +29 -0
  74. package/dist/gulp/pipeline.js.map +1 -0
  75. package/dist/gulp/public.d.ts +2 -0
  76. package/dist/gulp/public.js +50 -0
  77. package/dist/gulp/public.js.map +1 -0
  78. package/dist/gulp/styles.d.ts +2 -0
  79. package/dist/gulp/styles.js +40 -0
  80. package/dist/gulp/styles.js.map +1 -0
  81. package/dist/gulp/templates.d.ts +2 -0
  82. package/dist/gulp/templates.js +33 -0
  83. package/dist/gulp/templates.js.map +1 -0
  84. package/dist/gulp/types.d.ts +4 -0
  85. package/dist/gulp/types.js +289 -0
  86. package/dist/gulp/types.js.map +1 -0
  87. package/dist/gulp/watchers.d.ts +9 -0
  88. package/dist/gulp/watchers.js +57 -0
  89. package/dist/gulp/watchers.js.map +1 -0
  90. package/dist/helpers.d.ts +9 -0
  91. package/dist/helpers.js +87 -0
  92. package/dist/helpers.js.map +1 -0
  93. package/dist/index.d.ts +1 -0
  94. package/dist/index.js +78 -9
  95. package/dist/index.js.map +1 -0
  96. package/dist/init/blocks.d.ts +5 -0
  97. package/dist/init/blocks.js +60 -0
  98. package/dist/init/blocks.js.map +1 -0
  99. package/dist/init/cargo copy.d.ts +2 -0
  100. package/dist/init/cargo copy.js +16 -0
  101. package/dist/init/cargo copy.js.map +1 -0
  102. package/dist/init/cargo.d.ts +2 -0
  103. package/dist/init/cargo.js +19 -0
  104. package/dist/init/cargo.js.map +1 -0
  105. package/dist/init/expo copy.d.ts +5 -0
  106. package/dist/init/expo copy.js +48 -0
  107. package/dist/init/expo copy.js.map +1 -0
  108. package/dist/init/expo.d.ts +5 -0
  109. package/dist/init/expo.js +50 -0
  110. package/dist/init/expo.js.map +1 -0
  111. package/dist/init/gitModules.d.ts +2 -0
  112. package/dist/init/gitModules.js +13 -0
  113. package/dist/init/gitModules.js.map +1 -0
  114. package/dist/init/index.d.ts +4 -0
  115. package/dist/init/index.js +62 -0
  116. package/dist/init/index.js.map +1 -0
  117. package/dist/init/lucy.d.ts +1 -0
  118. package/dist/init/lucy.js +2 -0
  119. package/dist/init/monorepo copy.d.ts +4 -0
  120. package/dist/init/monorepo copy.js +28 -0
  121. package/dist/init/monorepo copy.js.map +1 -0
  122. package/dist/init/monorepo.d.ts +4 -0
  123. package/dist/init/monorepo.js +35 -0
  124. package/dist/init/monorepo.js.map +1 -0
  125. package/dist/init/prepare.d.ts +8 -0
  126. package/dist/init/prepare.js +20 -0
  127. package/dist/init/prepare.js.map +1 -0
  128. package/dist/init/prepareVelo.d.ts +2 -0
  129. package/dist/init/prepareVelo.js +16 -0
  130. package/dist/init/prepareVelo.js.map +1 -0
  131. package/dist/init/sync.d.ts +2 -0
  132. package/dist/init/sync.js +88 -0
  133. package/dist/init/sync.js.map +1 -0
  134. package/dist/init/tauri.d.ts +5 -0
  135. package/dist/init/tauri.js +29 -0
  136. package/dist/init/tauri.js.map +1 -0
  137. package/dist/init/templates.d.ts +5 -0
  138. package/dist/init/templates.js +93 -0
  139. package/dist/init/templates.js.map +1 -0
  140. package/dist/init/velo.d.ts +5 -0
  141. package/dist/init/velo.js +58 -0
  142. package/dist/init/velo.js.map +1 -0
  143. package/dist/init/write.d.ts +5 -0
  144. package/dist/init/write.js +15 -0
  145. package/dist/models.js +1 -0
  146. package/dist/models.js.map +1 -0
  147. package/dist/policy.js +1 -0
  148. package/dist/policy.js.map +1 -0
  149. package/dist/prepare.js +1 -0
  150. package/dist/prepare.js.map +1 -0
  151. package/dist/runtime.d.ts +1 -1
  152. package/dist/runtime.js +1 -0
  153. package/dist/runtime.js.map +1 -0
  154. package/dist/schemas/gulp.d.ts +26 -0
  155. package/dist/schemas/gulp.js +8 -0
  156. package/dist/schemas/gulp.js.map +1 -0
  157. package/dist/schemas/index.d.ts +10 -0
  158. package/dist/schemas/index.js +9 -0
  159. package/dist/schemas/index.js.map +1 -0
  160. package/dist/schemas/lucy.d.ts +26 -0
  161. package/dist/schemas/lucy.js +39 -0
  162. package/dist/schemas/lucy.js.map +1 -0
  163. package/dist/schemas/models.d.ts +37 -0
  164. package/dist/schemas/models.js +2 -0
  165. package/dist/schemas/models.js.map +1 -0
  166. package/dist/schemas/tsconfig.d.ts +37 -0
  167. package/dist/schemas/tsconfig.js +2 -0
  168. package/dist/schemas/tsconfig.js.map +1 -0
  169. package/dist/schemas/types.d.ts +31 -0
  170. package/dist/schemas/types.js +5 -1
  171. package/dist/schemas/types.js.map +1 -0
  172. package/dist/states.js +1 -0
  173. package/dist/states.js.map +1 -0
  174. package/dist/sync/index.js +2 -0
  175. package/dist/sync/index.js.map +1 -0
  176. package/dist/sync/sync.d.ts +3 -0
  177. package/dist/sync/sync.js +92 -0
  178. package/dist/sync/sync.js.map +1 -0
  179. package/dist/tasks/Gulpfile.d.ts +4 -0
  180. package/dist/tasks/Gulpfile.js +112 -0
  181. package/dist/tasks/Gulpfile.js.map +1 -0
  182. package/dist/tasks/gitModules.d.ts +2 -0
  183. package/dist/tasks/gitModules.js +13 -0
  184. package/dist/tasks/gitModules.js.map +1 -0
  185. package/dist/tasks/gulp/backend.d.ts +3 -0
  186. package/dist/tasks/gulp/backend.js +92 -0
  187. package/dist/tasks/gulp/backend.js.map +1 -0
  188. package/dist/tasks/gulp/checks.d.ts +3 -0
  189. package/dist/tasks/gulp/checks.js +196 -0
  190. package/dist/tasks/gulp/checks.js.map +1 -0
  191. package/dist/tasks/gulp/clean.d.ts +3 -0
  192. package/dist/tasks/gulp/clean.js +33 -0
  193. package/dist/tasks/gulp/clean.js.map +1 -0
  194. package/dist/tasks/gulp/copy.d.ts +2 -0
  195. package/dist/tasks/gulp/copy.js +33 -0
  196. package/dist/tasks/gulp/copy.js.map +1 -0
  197. package/dist/tasks/gulp/helpers.d.ts +3 -0
  198. package/dist/tasks/gulp/helpers.js +19 -0
  199. package/dist/tasks/gulp/helpers.js.map +1 -0
  200. package/dist/tasks/gulp/pages.d.ts +2 -0
  201. package/dist/tasks/gulp/pages.js +39 -0
  202. package/dist/tasks/gulp/pages.js.map +1 -0
  203. package/dist/tasks/gulp/pipeline.d.ts +1 -0
  204. package/dist/tasks/gulp/pipeline.js +29 -0
  205. package/dist/tasks/gulp/pipeline.js.map +1 -0
  206. package/dist/tasks/gulp/public.d.ts +2 -0
  207. package/dist/tasks/gulp/public.js +50 -0
  208. package/dist/tasks/gulp/public.js.map +1 -0
  209. package/dist/tasks/gulp/styles.d.ts +2 -0
  210. package/dist/tasks/gulp/styles.js +40 -0
  211. package/dist/tasks/gulp/styles.js.map +1 -0
  212. package/dist/tasks/gulp/templates.d.ts +2 -0
  213. package/dist/tasks/gulp/templates.js +45 -0
  214. package/dist/tasks/gulp/templates.js.map +1 -0
  215. package/dist/tasks/gulp/types.d.ts +4 -0
  216. package/dist/tasks/gulp/types.js +293 -0
  217. package/dist/tasks/gulp/types.js.map +1 -0
  218. package/dist/tasks/gulp/watchers.d.ts +2 -0
  219. package/dist/tasks/gulp/watchers.js +59 -0
  220. package/dist/tasks/gulp/watchers.js.map +1 -0
  221. package/dist/tasks/index.d.ts +4 -0
  222. package/dist/tasks/index.js +23 -0
  223. package/dist/tasks/index.js.map +1 -0
  224. package/dist/tasks/sync.d.ts +2 -0
  225. package/dist/tasks/sync.js +88 -0
  226. package/dist/tasks/sync.js.map +1 -0
  227. package/dist/tasks/syncPkg.d.ts +3 -0
  228. package/dist/tasks/syncPkg.js +13 -0
  229. package/dist/tasks/syncPkg.js.map +1 -0
  230. package/dist/tasks/syncSettings.d.ts +3 -0
  231. package/dist/tasks/syncSettings.js +18 -0
  232. package/dist/tasks/syncSettings.js.map +1 -0
  233. package/dist/utils/index.js +2 -0
  234. package/dist/utils/index.js.map +1 -0
  235. package/dist/utils/install.js +1 -0
  236. package/dist/utils/logger.d.ts +17 -0
  237. package/dist/utils/logger.js +37 -0
  238. package/dist/utils/logger.js.map +1 -0
  239. package/dist/wix-sdk/check.d.ts +4 -0
  240. package/dist/wix-sdk/check.js +23 -0
  241. package/dist/wix-sdk/check.js.map +1 -0
  242. package/dist/wix-sdk/client.d.ts +10 -0
  243. package/dist/wix-sdk/client.js +18 -0
  244. package/dist/wix-sdk/client.js.map +1 -0
  245. package/dist/wix-sdk/import.d.ts +1 -0
  246. package/dist/wix-sdk/import.js +88 -0
  247. package/dist/wix-sdk/import.js.map +1 -0
  248. package/dist/wix-sdk/index.d.ts +4 -0
  249. package/dist/wix-sdk/index.js +15 -0
  250. package/dist/wix-sdk/index.js.map +1 -0
  251. package/dist/wix-sdk/init copy.d.ts +4 -0
  252. package/dist/wix-sdk/init copy.js +51 -0
  253. package/dist/wix-sdk/init copy.js.map +1 -0
  254. package/dist/wix-sdk/init.d.ts +4 -0
  255. package/dist/wix-sdk/init.js +51 -0
  256. package/dist/wix-sdk/init.js.map +1 -0
  257. package/dist/wix-sdk/is-allive.d.ts +4 -0
  258. package/dist/wix-sdk/is-allive.js +37 -0
  259. package/dist/wix-sdk/is-allive.js.map +1 -0
  260. package/dist/wix-sdk/run.d.ts +4 -0
  261. package/dist/wix-sdk/run.js +53 -0
  262. package/dist/wix-sdk/run.js.map +1 -0
  263. package/dist/wix-sdk/sync copy.d.ts +1 -0
  264. package/dist/wix-sdk/sync copy.js +88 -0
  265. package/dist/wix-sdk/sync copy.js.map +1 -0
  266. package/dist/wix-sdk/sync.d.ts +1 -0
  267. package/dist/wix-sdk/sync.js +88 -0
  268. package/dist/wix-sdk/sync.js.map +1 -0
  269. package/dist/wix-sdk/wix_sdk_check.d.ts +4 -0
  270. package/dist/wix-sdk/wix_sdk_check.js +37 -0
  271. package/dist/wix-sdk/wix_sdk_check.js.map +1 -0
  272. package/dist/wix-sync/client.d.ts +3 -0
  273. package/dist/wix-sync/client.js +5 -0
  274. package/dist/wix-sync/client.js.map +1 -0
  275. package/dist/wix-sync/export copy.d.ts +4 -0
  276. package/dist/wix-sync/export copy.js +21 -0
  277. package/dist/wix-sync/export copy.js.map +1 -0
  278. package/dist/wix-sync/export.d.ts +4 -0
  279. package/dist/wix-sync/export.js +15 -0
  280. package/dist/wix-sync/export.js.map +1 -0
  281. package/dist/wix-sync/import copy.d.ts +4 -0
  282. package/dist/wix-sync/import copy.js +21 -0
  283. package/dist/wix-sync/import copy.js.map +1 -0
  284. package/dist/wix-sync/import.d.ts +4 -0
  285. package/dist/wix-sync/import.js +26 -0
  286. package/dist/wix-sync/import.js.map +1 -0
  287. package/dist/wix-sync/index.d.ts +4 -0
  288. package/dist/wix-sync/index.js +35 -0
  289. package/dist/wix-sync/index.js.map +1 -0
  290. package/dist/wix-sync/init copy.d.ts +4 -0
  291. package/dist/wix-sync/init copy.js +54 -0
  292. package/dist/wix-sync/init copy.js.map +1 -0
  293. package/dist/wix-sync/init.d.ts +4 -0
  294. package/dist/wix-sync/init.js +74 -0
  295. package/dist/wix-sync/init.js.map +1 -0
  296. package/dist/wix-sync/is-alive.d.ts +4 -0
  297. package/dist/wix-sync/is-alive.js +23 -0
  298. package/dist/wix-sync/is-alive.js.map +1 -0
  299. package/dist/wix-sync/is-allive copy.d.ts +4 -0
  300. package/dist/wix-sync/is-allive copy.js +23 -0
  301. package/dist/wix-sync/is-allive copy.js.map +1 -0
  302. package/dist/wix-sync/is-allive.d.ts +4 -0
  303. package/dist/wix-sync/is-allive.js +23 -0
  304. package/dist/wix-sync/is-allive.js.map +1 -0
  305. package/dist/wix-sync/migrate.d.ts +4 -0
  306. package/dist/wix-sync/migrate.js +21 -0
  307. package/dist/wix-sync/migrate.js.map +1 -0
  308. package/dist/wix-sync/sync-od.js +100 -0
  309. package/dist/wix-sync/sync-od.js.map +1 -0
  310. package/dist/wix-sync/sync.d.ts +4 -0
  311. package/dist/wix-sync/sync.js +26 -0
  312. package/dist/wix-sync/sync.js.map +1 -0
  313. package/dist/wix-sync/sync2.d.ts +4 -0
  314. package/dist/wix-sync/sync2.js +25 -0
  315. package/dist/wix-sync/sync2.js.map +1 -0
  316. package/dist/wix-sync copy/index.d.ts +4 -0
  317. package/dist/wix-sync copy/index.js +17 -0
  318. package/dist/wix-sync copy/index.js.map +1 -0
  319. package/dist/wix-sync copy/init.d.ts +4 -0
  320. package/dist/wix-sync copy/init.js +58 -0
  321. package/dist/wix-sync copy/init.js.map +1 -0
  322. package/dist/wix-sync copy/is-allive.d.ts +4 -0
  323. package/dist/wix-sync copy/is-allive.js +36 -0
  324. package/dist/wix-sync copy/is-allive.js.map +1 -0
  325. package/dist/wix-sync copy/sync.d.ts +1 -0
  326. package/dist/wix-sync copy/sync.js +88 -0
  327. package/dist/wix-sync copy/sync.js.map +1 -0
  328. package/files/sync-data/data/test.csv +17 -0
  329. package/files/sync-data/schema/test.json +11 -0
  330. package/files/templates/block[D]/files/.stylelintrc.js +8 -0
  331. package/files/templates/block[D]/lucy.json +8 -0
  332. package/files/templates/cargo[D]/files/.env +1 -0
  333. package/files/templates/cargo[D]/files/Cargo.toml +238 -0
  334. package/files/templates/cargo[D]/files/Makefile.toml +4 -0
  335. package/files/templates/cargo[D]/files/build/main.rs +35 -0
  336. package/files/templates/cargo[D]/files/config/beta.json +19 -0
  337. package/files/templates/cargo[D]/files/config/ci.json +15 -0
  338. package/files/templates/cargo[D]/files/config/default.json +71 -0
  339. package/files/templates/cargo[D]/files/config/development.json +10 -0
  340. package/files/templates/cargo[D]/files/config/produktion.json +5 -0
  341. package/files/templates/cargo[D]/files/config/stage.json +4 -0
  342. package/files/templates/cargo[D]/files/locales/todo.yml +3 -0
  343. package/files/templates/cargo[D]/files/public/index.html +1 -0
  344. package/files/templates/cargo[D]/lucy.json +14 -0
  345. package/files/templates/expo[D]/files/.stylelintrc.js +8 -0
  346. package/files/templates/expo[D]/files/components/ui/.gitkeep +0 -0
  347. package/files/templates/expo[D]/lucy.json +81 -0
  348. package/files/templates/monorepo[D]/files/.nvmrc +1 -0
  349. package/files/templates/monorepo[D]/files/.prettierignore +23 -0
  350. package/files/templates/monorepo[D]/files/.prettierrc.json +15 -0
  351. package/files/templates/monorepo[D]/files/.stylelintrc.js +8 -0
  352. package/files/templates/monorepo[D]/files/.yarnrc +1 -0
  353. package/files/templates/monorepo[D]/files/.yarnrc.yml +3 -0
  354. package/files/templates/monorepo[D]/files/README.md +137 -0
  355. package/files/templates/monorepo[D]/files/currents.config.ts +5 -0
  356. package/files/templates/monorepo[D]/files/package.json +39 -0
  357. package/files/templates/monorepo[D]/files/turbo.json +34 -0
  358. package/files/templates/monorepo[D]/files/typedoc.json +25 -0
  359. package/files/templates/monorepo[D]/files/vitest.config.ts +27 -0
  360. package/files/templates/monorepo[D]/lucy.json +45 -0
  361. package/files/templates/tauri[D]/lucy.json +8 -0
  362. package/files/templates/velo[D]/files/.gitmodules +0 -0
  363. package/files/templates/velo[D]/files/.prettierignore +23 -0
  364. package/files/templates/velo[D]/files/.prettierrc.js +16 -0
  365. package/files/templates/velo[D]/files/typescript/__mocks__/.gitkeep +0 -0
  366. package/files/templates/velo[D]/files/typescript/backend/data.ts +0 -0
  367. package/files/templates/velo[D]/files/typescript/backend/events.ts +0 -0
  368. package/files/templates/velo[D]/files/typescript/pages/.gitkeep +0 -0
  369. package/files/templates/velo[D]/files/typescript/public/.gitkeep +0 -0
  370. package/files/templates/velo[D]/files/typescript/public/scss/app.scss +0 -0
  371. package/files/templates/velo[D]/files/typescript/styles/.gitkeep +0 -0
  372. package/files/templates/velo[D]/files/typescript/styles/global.scss +0 -0
  373. package/files/templates/velo[D]/lucy.json +136 -0
  374. package/old/Gulpfile.d.ts +34 -0
  375. package/old/Gulpfile.js +116 -0
  376. package/old/Gulpfile.js.map +1 -0
  377. package/old/gulp/backend.d.ts +3 -0
  378. package/old/gulp/backend.js +92 -0
  379. package/old/gulp/backend.js.map +1 -0
  380. package/old/gulp/checks.d.ts +3 -0
  381. package/old/gulp/checks.js +205 -0
  382. package/old/gulp/checks.js.map +1 -0
  383. package/old/gulp/clean.d.ts +3 -0
  384. package/old/gulp/clean.js +29 -0
  385. package/old/gulp/clean.js.map +1 -0
  386. package/old/gulp/copy.d.ts +2 -0
  387. package/old/gulp/copy.js +34 -0
  388. package/old/gulp/copy.js.map +1 -0
  389. package/old/gulp/helpers.d.ts +2 -0
  390. package/old/gulp/helpers.js +25 -0
  391. package/old/gulp/helpers.js.map +1 -0
  392. package/old/gulp/pages.d.ts +2 -0
  393. package/old/gulp/pages.js +37 -0
  394. package/old/gulp/pages.js.map +1 -0
  395. package/old/gulp/pipeline.d.ts +1 -0
  396. package/old/gulp/pipeline.js +29 -0
  397. package/old/gulp/pipeline.js.map +1 -0
  398. package/old/gulp/public.d.ts +2 -0
  399. package/old/gulp/public.js +50 -0
  400. package/old/gulp/public.js.map +1 -0
  401. package/old/gulp/styles.d.ts +2 -0
  402. package/old/gulp/styles.js +40 -0
  403. package/old/gulp/styles.js.map +1 -0
  404. package/old/gulp/templates.d.ts +2 -0
  405. package/old/gulp/templates.js +33 -0
  406. package/old/gulp/templates.js.map +1 -0
  407. package/old/gulp/types.d.ts +4 -0
  408. package/old/gulp/types.js +289 -0
  409. package/old/gulp/types.js.map +1 -0
  410. package/old/gulp/watchers.d.ts +9 -0
  411. package/old/gulp/watchers.js +59 -0
  412. package/old/gulp/watchers.js.map +1 -0
  413. package/old/helpers.d.ts +32 -0
  414. package/old/helpers.js +267 -0
  415. package/old/helpers.js.map +1 -0
  416. package/{src copy/helpers.ts → old/helpers.ts} +1 -1
  417. package/old/index.d.ts +59 -0
  418. package/old/index.js +288 -0
  419. package/old/index.js.map +1 -0
  420. package/old/init.d.ts +8 -0
  421. package/old/init.js +165 -0
  422. package/old/init.js.map +1 -0
  423. package/old/models.d.ts +37 -0
  424. package/old/models.js +2 -0
  425. package/old/models.js.map +1 -0
  426. package/old/prepare.d.ts +8 -0
  427. package/old/prepare.js +20 -0
  428. package/old/prepare.js.map +1 -0
  429. package/old/schemas/index.d.ts +0 -0
  430. package/old/schemas/index.js +2 -0
  431. package/old/schemas/index.js.map +1 -0
  432. package/old/schemas/index.ts +0 -0
  433. package/old/schemas/types.d.ts +0 -0
  434. package/old/schemas/types.js +2 -0
  435. package/old/schemas/types.js.map +1 -0
  436. package/old/schemas/types.ts +0 -0
  437. package/old/sync.d.ts +2 -0
  438. package/old/sync.js +88 -0
  439. package/old/sync.js.map +1 -0
  440. package/package.json +7 -7
  441. package/src/args.ts +56 -18
  442. package/src/commands/checks.ts +51 -0
  443. package/src/commands/cleanup.ts +11 -0
  444. package/src/commands/copy.ts +28 -0
  445. package/src/commands/edit.ts +83 -0
  446. package/src/commands/exec.ts +37 -0
  447. package/src/commands/git.ts +113 -0
  448. package/src/commands/home.ts +22 -0
  449. package/src/commands/install.ts +186 -0
  450. package/src/commands/read.ts +46 -0
  451. package/src/commands/write.ts +45 -0
  452. package/src/config.ts +116 -35
  453. package/src/error.ts +1 -2
  454. package/src/helpers.ts +90 -0
  455. package/src/index.ts +89 -13
  456. package/src/init/blocks.ts +82 -0
  457. package/src/init/cargo.ts +22 -0
  458. package/src/init/expo.ts +66 -0
  459. package/src/init/gitModules.ts +15 -0
  460. package/src/init/index.ts +63 -0
  461. package/src/init/monorepo.ts +39 -0
  462. package/src/init/prepareVelo.ts +19 -0
  463. package/src/init/tauri.ts +40 -0
  464. package/src/init/templates.ts +98 -0
  465. package/src/init/velo.ts +62 -0
  466. package/src/runtime.ts +1 -0
  467. package/src/schemas/gulp.ts +32 -0
  468. package/src/schemas/index.ts +12 -1
  469. package/src/schemas/lucy.ts +40 -0
  470. package/src/schemas/types.ts +38 -0
  471. package/src/tasks/Gulpfile.ts +208 -0
  472. package/src/tasks/gulp/backend.ts +112 -0
  473. package/src/tasks/gulp/checks.ts +215 -0
  474. package/src/tasks/gulp/clean.ts +38 -0
  475. package/src/tasks/gulp/copy.ts +37 -0
  476. package/src/tasks/gulp/helpers.ts +18 -0
  477. package/src/tasks/gulp/pages.ts +43 -0
  478. package/src/tasks/gulp/pipeline.ts +31 -0
  479. package/src/tasks/gulp/public.ts +60 -0
  480. package/src/tasks/gulp/styles.ts +46 -0
  481. package/src/tasks/gulp/templates.ts +53 -0
  482. package/src/tasks/gulp/types.ts +310 -0
  483. package/src/tasks/gulp/watchers.ts +96 -0
  484. package/src/tasks/index.ts +26 -0
  485. package/src/tasks/syncSettings.ts +21 -0
  486. package/src/types.d.ts +1 -1
  487. package/src/utils/index.ts +0 -0
  488. package/src/utils/logger.ts +40 -0
  489. package/src/wix-sdk/check.ts +24 -0
  490. package/src/wix-sdk/client.ts +18 -0
  491. package/src/wix-sdk/index.ts +17 -0
  492. package/src/wix-sdk/init.ts +54 -0
  493. package/src/wix-sdk/run.ts +56 -0
  494. package/src/wix-sync/client.ts +6 -0
  495. package/src/wix-sync/export.ts +19 -0
  496. package/src/wix-sync/import.ts +27 -0
  497. package/src/wix-sync/index.ts +36 -0
  498. package/src/wix-sync/init.ts +77 -0
  499. package/src/wix-sync/is-alive.ts +25 -0
  500. package/src/wix-sync/migrate.ts +23 -0
  501. package/src/wix-sync/sync.ts +27 -0
  502. package/tsconfig.json +6 -5
  503. package/files/expo/lucy.json +0 -8
  504. package/src/init.ts +0 -392
  505. /package/{files/expo/components/.gitkeep → .turbo/cookies/1.cookie} +0 -0
  506. /package/{files/expo/components/ui/.gitkeep → .turbo/cookies/2.cookie} +0 -0
  507. /package/{files/velo/.gitmodules → .turbo/cookies/3.cookie} +0 -0
  508. /package/{files/velo/typescript/__mocks__/.gitkeep → .turbo/cookies/4.cookie} +0 -0
  509. /package/{files/velo/typescript/backend/data.ts → .turbo/cookies/5.cookie} +0 -0
  510. /package/{files/velo/typescript/backend/events.ts → .turbo/daemon/ee24a4f4ab6aa3c0-turbo.log.2025-07-31} +0 -0
  511. /package/{files/velo/typescript/pages/.gitkeep → .turbo/daemon/ee24a4f4ab6aa3c0-turbo.log.2025-08-01} +0 -0
  512. /package/{files/velo/typescript/public/.gitkeep → .turbo/daemon/ee24a4f4ab6aa3c0-turbo.log.2025-08-02} +0 -0
  513. /package/{files/velo/typescript/public/scss/app.scss → dist/sync/index.d.ts} +0 -0
  514. /package/{files/velo/typescript/styles/.gitkeep → dist/utils/index.d.ts} +0 -0
  515. /package/{files/velo/typescript/styles/global.scss → dist/utils/install.d.ts} +0 -0
  516. /package/{src copy/schemas/index.ts → dist/wix-sync/sync-od.d.ts} +0 -0
  517. /package/files/{expo → templates/expo[D]/files}/.nvmrc +0 -0
  518. /package/files/{expo → templates/expo[D]/files}/.prettierignore +0 -0
  519. /package/files/{expo → templates/expo[D]/files}/.prettierrc.js +0 -0
  520. /package/files/{expo → templates/expo[D]/files}/.yarnrc +0 -0
  521. /package/files/{expo → templates/expo[D]/files}/.yarnrc.yml +0 -0
  522. /package/files/{expo → templates/expo[D]/files}/README.md +0 -0
  523. /package/files/{expo → templates/expo[D]/files}/assets/fonts/SpaceMono-Regular.ttf +0 -0
  524. /package/files/{expo → templates/expo[D]/files}/assets/images/adaptive-icon.png +0 -0
  525. /package/files/{expo → templates/expo[D]/files}/assets/images/favicon.png +0 -0
  526. /package/files/{expo → templates/expo[D]/files}/assets/images/icon.png +0 -0
  527. /package/files/{expo → templates/expo[D]/files}/assets/images/splash-icon.png +0 -0
  528. /package/files/{expo → templates/expo[D]/files}/babel.config.js +0 -0
  529. /package/{src copy/schemas/types.ts → files/templates/expo[D]/files/components/.gitkeep} +0 -0
  530. /package/files/{expo → templates/expo[D]/files}/constants/theme.ts +0 -0
  531. /package/files/{expo → templates/expo[D]/files}/eas.json +0 -0
  532. /package/files/{expo → templates/expo[D]/files}/eslint.config.mjs +0 -0
  533. /package/files/{expo → templates/expo[D]/files}/global.css +0 -0
  534. /package/files/{expo → templates/expo[D]/files}/hooks/useColorScheme.ts +0 -0
  535. /package/files/{expo → templates/expo[D]/files}/index.ts +0 -0
  536. /package/files/{expo → templates/expo[D]/files}/lib/data.ts +0 -0
  537. /package/files/{expo → templates/expo[D]/files}/lib/utils/index.ts +0 -0
  538. /package/files/{expo → templates/expo[D]/files}/lib/utils/polyfills.ts +0 -0
  539. /package/files/{expo → templates/expo[D]/files}/lib/wix/client.ts +0 -0
  540. /package/files/{expo → templates/expo[D]/files}/lib/wix/error.ts +0 -0
  541. /package/files/{expo → templates/expo[D]/files}/lib/wix/index.ts +0 -0
  542. /package/files/{expo → templates/expo[D]/files}/metro.config.js +0 -0
  543. /package/files/{expo → templates/expo[D]/files}/nativewind-env.d.ts +0 -0
  544. /package/files/{expo → templates/expo[D]/files}/scripts/reset-project.ts +0 -0
  545. /package/files/{expo → templates/expo[D]/files}/tailwind.config.js +0 -0
  546. /package/files/{expo → templates/expo[D]/files}/tsconfig.json +0 -0
  547. /package/files/{expo → templates/expo[D]/files}/types/reset.d.ts +0 -0
  548. /package/files/{velo → templates/velo[D]/files}/.madgerc +0 -0
  549. /package/files/{velo → templates/velo[D]/files}/.nvmrc +0 -0
  550. /package/files/{velo → templates/velo[D]/files}/.stylelintrc.js +0 -0
  551. /package/files/{velo → templates/velo[D]/files}/.yarnrc.yml +0 -0
  552. /package/files/{velo → templates/velo[D]/files}/currents.config.js +0 -0
  553. /package/files/{velo → templates/velo[D]/files}/cypress/e2e/base/base.cy.ts +0 -0
  554. /package/files/{velo → templates/velo[D]/files}/cypress/fixtures/example.json +0 -0
  555. /package/files/{velo → templates/velo[D]/files}/cypress/support/commands.ts +0 -0
  556. /package/files/{velo → templates/velo[D]/files}/cypress/support/e2e.ts +0 -0
  557. /package/files/{velo → templates/velo[D]/files}/cypress/tsconfig.json +0 -0
  558. /package/files/{velo → templates/velo[D]/files}/cypress.config.mjs +0 -0
  559. /package/files/{velo → templates/velo[D]/files}/eslint.config.mjs +0 -0
  560. /package/files/{velo → templates/velo[D]/files}/local.tsconfig.json +0 -0
  561. /package/files/{velo → templates/velo[D]/files}/typedoc.json +0 -0
  562. /package/files/{velo → templates/velo[D]/files}/typescript/backend/http-functions.ts +0 -0
  563. /package/files/{velo → templates/velo[D]/files}/typescript/backend/lib/http-functions/sync.ts +0 -0
  564. /package/files/{velo → templates/velo[D]/files}/typescript/backend/permissions.json +0 -0
  565. /package/files/{velo → templates/velo[D]/files}/typescript/tsconfig.json +0 -0
  566. /package/files/{velo → templates/velo[D]/files}/vitest.config.ts +0 -0
  567. /package/{src copy → old}/Gulpfile.ts +0 -0
  568. /package/{src copy → old}/gulp/backend.ts +0 -0
  569. /package/{src copy → old}/gulp/checks.ts +0 -0
  570. /package/{src copy → old}/gulp/clean.ts +0 -0
  571. /package/{src copy → old}/gulp/copy.ts +0 -0
  572. /package/{src copy → old}/gulp/helpers.ts +0 -0
  573. /package/{src copy → old}/gulp/pages.ts +0 -0
  574. /package/{src copy → old}/gulp/pipeline.ts +0 -0
  575. /package/{src copy → old}/gulp/public.ts +0 -0
  576. /package/{src copy → old}/gulp/styles.ts +0 -0
  577. /package/{src copy → old}/gulp/templates.ts +0 -0
  578. /package/{src copy → old}/gulp/types.ts +0 -0
  579. /package/{src copy → old}/gulp/watchers.ts +0 -0
  580. /package/{src copy → old}/index.ts +0 -0
  581. /package/{src copy → old}/init.ts +0 -0
  582. /package/{src copy → old}/models.ts +0 -0
  583. /package/{src copy → old}/prepare.ts +0 -0
  584. /package/{src copy → old}/settings.json +0 -0
  585. /package/{src copy → old}/sync.ts +0 -0
  586. /package/{src copy → old}/types.d.ts +0 -0
  587. /package/src/{models.ts → schemas/tsconfig.ts} +0 -0
@@ -0,0 +1,39 @@
1
+ import { Effect, Schema } from "effect/index"
2
+ import { Config } from "../config.js";
3
+ import { FileSystem, Path } from "@effect/platform"
4
+ import { logger } from "../utils/logger.js";
5
+ import { mergeAdditions, mergeLucySettings2PackageJson, setInitialized, setProjectName, stringReplace } from "../commands/edit.js";
6
+ import { writeLucySettings, writePackageJson } from "../commands/write.js";
7
+ import { copyTemplateFiles } from "../commands/copy.js";
8
+ import { readPackageJson } from "../commands/read.js";
9
+ import { runYarn, yarnSetVersion } from "../commands/install.js";
10
+ import { cleanup } from "../commands/cleanup.js";
11
+ import { gitInit } from "../commands/git.js";
12
+ import { checkForDirty } from "../commands/checks.js";
13
+
14
+ export const init_monorepo = () => {
15
+ return Effect.gen(function*() {
16
+ const config = yield* Config;
17
+ const path = yield* Path.Path;
18
+
19
+ logger.action("Initializing monorepo...");
20
+
21
+ yield* checkForDirty();
22
+
23
+ yield* copyTemplateFiles;
24
+ yield* stringReplace(path.join(config.config.cwd, 'currents.config.ts'), ['__ProjectName__'], [config.config.projectName]);
25
+ yield* readPackageJson;
26
+ yield* setProjectName;
27
+ yield* mergeLucySettings2PackageJson;
28
+ yield* mergeAdditions;
29
+ yield* writeLucySettings;
30
+ yield* writePackageJson;
31
+ yield* gitInit();
32
+ yield* yarnSetVersion;
33
+ yield* runYarn;
34
+ yield* cleanup;
35
+ yield* setInitialized;
36
+
37
+ logger.success("Monorepo initialized successfully!");
38
+ })
39
+ }
@@ -0,0 +1,19 @@
1
+ import { Effect } from 'effect/index';
2
+ import { logger } from '../utils/logger.js';
3
+ import { checkForVelo } from '../commands/checks.js';
4
+ import { gitInit } from '../commands/git.js';
5
+ import { installVeloPackages, yarnSetVersion } from '../commands/install.js';
6
+ import { setInitialized } from '../commands/edit.js';
7
+
8
+ export const prepareVelo = Effect.gen(function*() {
9
+ logger.action("Initializing Tauri project...");
10
+ yield* checkForVelo();
11
+
12
+ yield* gitInit(true);
13
+ yield* yarnSetVersion;
14
+ yield* installVeloPackages
15
+ yield* setInitialized;
16
+
17
+ logger.success("Velo Prepared initialized successfully!");
18
+
19
+ })
@@ -0,0 +1,40 @@
1
+ import { Effect, Schema } from "effect/index"
2
+ import { logger } from "../utils/logger.js";
3
+ import { writeLucySettings } from "../commands/write.js";
4
+ import { copyTemplateFiles } from "../commands/copy.js";
5
+ import { gitInit } from "../commands/git.js";
6
+ import { checkForDirty } from "../commands/checks.js";
7
+ import { setInitialized } from "../commands/edit.js";
8
+ import { Config } from "../config.js";
9
+ import { Command, FileSystem, Path } from "@effect/platform"
10
+ import { JsonSchema } from "../schemas/index.js";
11
+ import { AppError } from "../error.js";
12
+ import { installPackages } from "../commands/install.js";
13
+ import { Terminal } from "@effect/platform"
14
+
15
+ export const init_tauri = () => {
16
+ return Effect.gen(function*() {
17
+ const config = yield* Config;
18
+ logger.action("Initializing Tauri project...");
19
+
20
+ yield* checkForDirty();
21
+
22
+ const initTauri = Command.make("yarn", "create", "tauri-app", config.config.projectName).pipe(
23
+ Command.stdin("inherit"),
24
+ Command.stdout("inherit"),
25
+ Command.stderr("inherit"),
26
+ Command.runInShell(true),
27
+ Command.exitCode
28
+ )
29
+ if((yield* initTauri) !== 0) {
30
+ yield* Effect.fail(new AppError({ message: "Failed to initialize Tauri project. Please check the error message above.", cause: new Error("Failed to initialize Tauri project") }));
31
+ }
32
+ yield* copyTemplateFiles;
33
+ yield* installPackages;
34
+ yield* writeLucySettings;
35
+ yield* gitInit();
36
+ yield* setInitialized;
37
+
38
+ logger.success("Tauri project initialized successfully!");
39
+ })
40
+ }
@@ -0,0 +1,98 @@
1
+ import { Effect, Schema } from "effect/index";
2
+ import { Config, lucyJsonName, lucyJsonPath } from "../config.js";
3
+ import { orange, red, green, logger } from "../utils/logger.js";
4
+ import { FileSystem } from "@effect/platform"
5
+ import path, { join } from 'path';
6
+ import fsp from 'fs/promises';
7
+ import Enquirer from 'enquirer';
8
+ import { AppError } from "../error.js";
9
+ import { lucySettings } from "../schemas/lucy.js";
10
+ import { JsonSchema } from "../schemas/index.js";
11
+
12
+ export const selectTemplate = () => {
13
+ return Effect.gen(function*() {
14
+ const config = yield* Config
15
+ const fs = yield* FileSystem.FileSystem;
16
+ const templatesPath = join(config.config.lucyHome, 'templates');
17
+ const files = yield* Effect.tryPromise({
18
+ try: () => fsp.readdir(templatesPath, { withFileTypes: true }),
19
+ catch: (e) => {
20
+ console.log((`💩 ${red.underline.bold("=> Templates folder not found at =>")} ${orange(templatesPath)}`));
21
+ return new AppError({ cause: e, message: 'Templates folder not found' });
22
+ }
23
+ })
24
+
25
+ const templateChoices: string[] = [];
26
+ for (const dirent of files) {
27
+ if (dirent.isDirectory()) {
28
+ const lucyRaw = yield* fs.readFileString(lucyJsonPath);
29
+ const lucySettingsJSON = yield* Schema.decodeUnknown(JsonSchema)(lucyRaw);
30
+ const lucySetting = yield* Schema.decodeUnknown(lucySettings)(lucySettingsJSON)
31
+ if (lucySetting.type === config.config.action.initType) {
32
+ templateChoices.push(dirent.name);
33
+ }
34
+ }
35
+ }
36
+
37
+ if (templateChoices.length === 0) {
38
+ console.log((`💩 ${red.underline.bold("=> No templates found in =>")} ${orange(templatesPath)}`));
39
+ return;
40
+ }
41
+
42
+ const templateQuestion = new Enquirer();
43
+ const choice = yield* Effect.tryPromise({
44
+ try: () => templateQuestion.prompt({
45
+ type: 'select',
46
+ name: 'template',
47
+ message: 'Select a project template',
48
+ choices: templateChoices
49
+ }),
50
+ catch: (e) => {
51
+ return new AppError({ cause: e, message: 'Error selecting template' });
52
+ }
53
+ })
54
+
55
+ const selectedTemplate = yield* Schema.decodeUnknown(Schema.Struct({ template: Schema.String }))(choice)
56
+ const templateDir = join(templatesPath, selectedTemplate.template );
57
+ const templateFilesDir = join(templateDir, 'files');
58
+ config.config.templateDir = templateDir;
59
+ config.config.templateFiles = templateFilesDir;
60
+
61
+ const templateSettingsPath = join(templateDir, lucyJsonName);
62
+
63
+ if (!(yield* fs.exists(templateSettingsPath))) {
64
+ logger.warning((`💩 ${red.underline.bold(`Template is missing ${lucyJsonName} at =>`)} ${orange(templateSettingsPath)}`));
65
+ yield* Effect.fail(new AppError({ message: `Template is missing ${lucyJsonName}`, cause: templateSettingsPath }));
66
+ }
67
+ const lucySettingsRaw = yield* fs.readFileString(templateSettingsPath);
68
+ const newLucySettings = yield* Schema.decodeUnknown(lucySettings)(JSON.parse(lucySettingsRaw));
69
+ if( newLucySettings.type !== config.config.action.initType) return yield* Effect.fail(new AppError({
70
+ message: `Template type ${newLucySettings.type} does not match action type ${config.config.action.initType}`,
71
+ cause: newLucySettings.type
72
+ }));
73
+ if(config.config.lucySettings.initialized) {
74
+ const overwriteQuestion = new Enquirer();
75
+
76
+ const overwrite = yield* Effect.tryPromise({
77
+ try: () => overwriteQuestion.prompt({
78
+ type: 'confirm',
79
+ name: 'overwrite',
80
+ message: `Overwrite existing ${lucyJsonName} settings?`,
81
+ }),
82
+ catch: (e) => {
83
+ return new AppError({
84
+ cause: e,
85
+ message: "Error overwriting settings",
86
+ });
87
+ }
88
+ })
89
+ const choice = yield* Schema.decodeUnknown(Schema.Struct({ overwrite: Schema.Boolean }))(overwrite);
90
+ if (choice.overwrite) {
91
+ config.config.lucySettings = newLucySettings;
92
+ } else {
93
+ logger.info(`Existing ${lucyJsonName} settings will be used.`);
94
+ }
95
+ }
96
+ logger.success(`Selected template: ${green(selectedTemplate.template)}`);
97
+ });
98
+ }
@@ -0,0 +1,62 @@
1
+ import { Effect, Schema } from "effect/index"
2
+ import { Config } from "../config.js";
3
+ import { FileSystem, Path } from "@effect/platform"
4
+ import { logger } from "../utils/logger.js";
5
+ import { mergeAdditions, mergeLucySettings2PackageJson, setInitialized, setProjectName, stringReplace } from "../commands/edit.js";
6
+ import { writeLucySettings, writePackageJson } from "../commands/write.js";
7
+ import { copyTemplateFiles } from "../commands/copy.js";
8
+ import { readPackageJson } from "../commands/read.js";
9
+ import { installVeloPackages, runYarn, yarnSetVersion } from "../commands/install.js";
10
+ import { cleanup } from "../commands/cleanup.js";
11
+ import { gitInit } from "../commands/git.js";
12
+ import { checkForVelo } from "../commands/checks.js";
13
+ import { AppError } from "../error.js";
14
+ import Enquirer from "enquirer";
15
+ import { prepareVelo } from "./prepareVelo.js";
16
+
17
+ export const init_velo = () => {
18
+ return Effect.gen(function*() {
19
+ const config = yield* Config;
20
+ const path = yield* Path.Path;
21
+
22
+ logger.action("Initializing Velo...");
23
+
24
+ yield* checkForVelo();
25
+
26
+ if(config.config.lucySettings.initialized && !config.config.force) {
27
+ const question = new Enquirer();
28
+ const choice = yield* Effect.tryPromise({
29
+ try: () => question.prompt({
30
+ type: 'confirm',
31
+ name: 'prepare',
32
+ message: 'Do you want to prepare the velo project?(install packages, git init)',
33
+ }),
34
+ catch: (e) => {
35
+ return new AppError({ cause: e, message: 'Error selecting template' });
36
+ }
37
+ })
38
+ const prepare = yield* Schema.decodeUnknown(Schema.Struct({ prepare: Schema.Boolean }))(choice)
39
+ if(prepare.prepare) return yield* prepareVelo
40
+ }
41
+
42
+
43
+ if(config.config.lucySettings.initialized && !config.config.force) return yield* Effect.fail(new AppError({ message: "Lucy is already initialized in this directory. Use --force to reinitialize.", cause: new Error("Lucy is already initialized in this directory") }));
44
+ if ((config.config.lucySettings.initialized && config.config.force) || (config.config.lucySettings.initialized && config.config.force)) logger.alert("Forced initialization!");
45
+
46
+ yield* copyTemplateFiles;
47
+ yield* stringReplace(path.join(config.config.cwd, 'currents.config.js'), ['__ProjectName__'], [config.config.projectName]);
48
+ yield* readPackageJson;
49
+ yield* setProjectName;
50
+ yield* mergeLucySettings2PackageJson;
51
+ yield* mergeAdditions;
52
+ yield* writeLucySettings;
53
+ yield* writePackageJson;
54
+ yield* gitInit();
55
+ yield* yarnSetVersion;
56
+ yield* installVeloPackages;
57
+ yield* cleanup;
58
+ yield* setInitialized;
59
+
60
+ logger.success("Velo initialized successfully!");
61
+ })
62
+ }
package/src/runtime.ts CHANGED
@@ -18,3 +18,4 @@ export const build_runtime = (args: Awaited<ReturnType<typeof get_args>>) => {
18
18
  }))
19
19
  ))
20
20
  };
21
+
@@ -0,0 +1,32 @@
1
+ import { LucySettings } from "./lucy";
2
+ import * as dartSass from 'sass';
3
+ import gulpSass from 'gulp-sass';
4
+ import backendSettings from '../../settings/backend-settings.json' with { type: "json" };;
5
+ import masterSettings from '../../settings/master-settings.json' with { type: "json" };;
6
+ import pageSettings from '../../settings/page-settings.json' with { type: "json" };;
7
+ import publicSettings from '../../settings/public-settings.json' with { type: "json" };;
8
+
9
+ const sass = gulpSass(dartSass);
10
+
11
+ export type TaskOptions = {
12
+ enableIncrementalBuild: boolean;
13
+ outputDir: string;
14
+ sass: ReturnType<typeof gulpSass>;
15
+ replaceOptions: {
16
+ logs: {
17
+ enabled: boolean;
18
+ }
19
+ };
20
+ backendSettings: typeof backendSettings,
21
+ masterSettings: typeof masterSettings,
22
+ pageSettings: typeof pageSettings,
23
+ publicSettings: typeof publicSettings,
24
+ modulesSourcePaths: string[];
25
+ cwd: string;
26
+ isWatching?: boolean;
27
+ }
28
+
29
+ export interface File {
30
+ path: string;
31
+ dirname: string;
32
+ }
@@ -1,3 +1,14 @@
1
1
  import { Schema } from "effect/index";
2
2
 
3
- export const JsonSchema = Schema.parseJson()
3
+ export const JsonSchema = Schema.parseJson()
4
+ export const veloSyncSettings = Schema.Struct({
5
+ siteUrl: Schema.String,
6
+ secret: Schema.String,
7
+ });
8
+ export type VeloSyncSettings = typeof veloSyncSettings.Type;
9
+
10
+ export const wixSDKSettings = Schema.Struct({
11
+ apiKey: Schema.String,
12
+ siteId: Schema.String,
13
+ });
14
+ export type WixSDKSettings = typeof wixSDKSettings.Type;
@@ -0,0 +1,40 @@
1
+ import { Schema } from "effect/index";
2
+ import { initTypes } from "./types.js";
3
+
4
+ export const lucySettings = Schema.mutable(Schema.Struct({
5
+ modules: Schema.Record({
6
+ key: Schema.String,
7
+ value: Schema.Struct({
8
+ source: Schema.String,
9
+ branch: Schema.String,
10
+ path: Schema.optional(Schema.String),
11
+ noCompile: Schema.optional(Schema.Boolean),
12
+ })}),
13
+ veloSettings: Schema.optional(Schema.NullOr(Schema.Struct({
14
+ compilerOptions: Schema.optional(Schema.Struct({
15
+ composite: Schema.Boolean,
16
+ noEmit: Schema.Boolean,
17
+ lib: Schema.Array(Schema.String),
18
+ jsx: Schema.String,
19
+ })),
20
+ exclude: Schema.optional(Schema.Array(Schema.String)),
21
+ }))),
22
+ initialized: Schema.Boolean,
23
+ type: Schema.Literal(...initTypes),
24
+ dependencies: Schema.mutable(Schema.Record({
25
+ key: Schema.String,
26
+ value: Schema.String,
27
+ })),
28
+ devDependencies: Schema.mutable(Schema.Record({
29
+ key: Schema.String,
30
+ value: Schema.String,
31
+ })),
32
+ scripts: Schema.Record({
33
+ key: Schema.String,
34
+ value: Schema.String,
35
+ }),
36
+ additionalCommands: Schema.optional(Schema.Array(Schema.Array(Schema.String))),
37
+ additionalPkgProps: Schema.optional(Schema.Object),
38
+ }));
39
+
40
+ export type LucySettings = typeof lucySettings.Type;
@@ -0,0 +1,38 @@
1
+ export const initTypes = ["velo", "expo", "blocks", "monorepo", "tauri", "cargo", 'submodules', 'wix-sdk'] as const;
2
+ export const taskNames = ["dev", "build", "build-prod", "build-pipeline", "sync-settings"] as const;
3
+ export const syncActions = ["sync", "import", "init", "is-alive", "migrate", "export"] as const;
4
+ export const WixSDKActions = ["init", ""] as const;
5
+ export type Action = 'init' | 'open' | 'task' | 'wix-sync';
6
+
7
+ export type SyncTaskType = (filename: string, collection: string, schemaFilename: string, importOnly: boolean, dryrun: boolean) => Promise<void>;
8
+ export type MigrateFileCache = () => Promise<void>;
9
+
10
+ export type Actions = {
11
+ action: Action;
12
+ initType?: typeof initTypes[number];
13
+ tasksName?: typeof taskNames[number];
14
+ syncAction?: typeof syncActions[number];
15
+ wixSDKAction?: typeof WixSDKActions[number];
16
+ }
17
+
18
+ export interface LucyArgs {
19
+ [x: string]: unknown;
20
+ // This will hold the command used, e.g., 'init'
21
+ _: Action[];
22
+ $0: string;
23
+ // Arguments for the 'init' command
24
+ initType?: Actions['initType'];
25
+ tasksName?: Actions['tasksName'];
26
+ syncAction?: Actions['syncAction'];
27
+ wixSDKAction?: Actions['wixSDKAction'];
28
+ // wix-sync options
29
+ input?: string; // Alias for -f
30
+ collection?: string; // Alias for -c
31
+ schema?: string; // Alias for -s
32
+ d?: boolean;
33
+ }
34
+
35
+ export interface VeloSyncConfig {
36
+ siteUrl: string;
37
+ secret: string;
38
+ }
@@ -0,0 +1,208 @@
1
+ import gulp from 'gulp';
2
+ import gulpSass from 'gulp-sass';
3
+ import shell from 'gulp-shell';
4
+ import * as os from 'os';
5
+ import * as dartSass from 'sass';
6
+ import { join } from "path";
7
+
8
+ import backendSettings from '../../settings/backend-settings.json' with { type: "json" };;
9
+ import masterSettings from '../../settings/master-settings.json' with { type: "json" };;
10
+ import pageSettings from '../../settings/page-settings.json' with { type: "json" };;
11
+ import publicSettings from '../../settings/public-settings.json' with { type: "json" };;
12
+
13
+ import { buildPublic } from './gulp/public.js';
14
+ import { buildBackend, buildBackendJSW } from './gulp/backend.js';
15
+ import { checkPages, checkTs } from './gulp/checks.js';
16
+ import { compileScss } from './gulp/styles.js';
17
+ import { buildPages } from './gulp/pages.js';
18
+ import { previewTemplates } from './gulp/templates.js';
19
+ import { copyFiles } from './gulp/copy.js';
20
+ import { cleanSrc, cleanWix } from './gulp/clean.js';
21
+ import { addTypes, updateWixTypes } from './gulp/types.js';
22
+ import { setProdConfig } from './gulp/pipeline.js';
23
+ import { watchAll } from './gulp/watchers.js';
24
+ import { getModulesSourcePaths } from './gulp/helpers.js';
25
+ import { logger } from '../utils/logger.js';
26
+ import { Effect } from 'effect/index';
27
+ import { Config } from '../config.js';
28
+ import { AppError } from '../error.js';
29
+ import { TaskOptions } from '../schemas/gulp.js';
30
+
31
+ const sass = gulpSass(dartSass);
32
+
33
+ export const task_runGulp = Effect.gen(function* (_) {
34
+ const config = (yield* Config).config;
35
+ const task = config.action.tasksName || "dev";
36
+
37
+ const taskOptions: TaskOptions = {
38
+ enableIncrementalBuild: config.action.tasksName === 'dev' ? true : false,
39
+ outputDir: './src',
40
+ sass,
41
+ pageSettings,
42
+ publicSettings,
43
+ backendSettings,
44
+ masterSettings,
45
+ replaceOptions: {
46
+ logs: {
47
+ enabled: false
48
+ }
49
+ },
50
+ cwd: process.cwd(),
51
+ modulesSourcePaths: yield* getModulesSourcePaths,
52
+ isWatching: config.action.tasksName === 'dev' ? true : false
53
+ };
54
+
55
+
56
+ logger.action(`Running task: ${task}`);
57
+
58
+ gulp.task('check-ts', gulp.parallel(
59
+ checkTs(taskOptions),
60
+ ));
61
+
62
+ gulp.task('scss', gulp.parallel(
63
+ compileScss(taskOptions),
64
+ ));
65
+
66
+ gulp.task('build-backend', gulp.parallel(
67
+ buildBackend(taskOptions),
68
+ buildBackendJSW(taskOptions),
69
+ // buildBackendHTTP(taskOptions),
70
+ ));
71
+
72
+ gulp.task('build-public', gulp.parallel(
73
+ buildPublic(taskOptions),
74
+ ));
75
+
76
+ gulp.task('preview-templates', gulp.parallel(
77
+ previewTemplates(taskOptions),
78
+ ));
79
+
80
+ gulp.task('copy-files', gulp.parallel(
81
+ copyFiles(taskOptions),
82
+ ));
83
+
84
+ gulp.task('test', function () {
85
+ return shell.task(
86
+ ['yarn test'],
87
+ { ignoreErrors: true }
88
+ )().then(() => {
89
+ logger.success("Tests completed successfully.");
90
+ }).catch(err => {
91
+ logger.error("Error in test task!");
92
+ });
93
+ });
94
+ gulp.task('test-ci', function () {
95
+ return shell.task(
96
+ ['yarn test --run'],
97
+ { ignoreErrors: true }
98
+ )().then(() => {
99
+ logger.success("Tests completed successfully.");
100
+ }).catch(err => {
101
+ logger.error("Error in test task!");
102
+ });
103
+ });
104
+
105
+ gulp.task('sync-types', shell.task([
106
+ 'yarn postinstall',
107
+ ]));
108
+
109
+ gulp.task('fix-wix-types', gulp.parallel(
110
+ updateWixTypes(taskOptions)
111
+ ));
112
+
113
+ gulp.task('add-wix-types', function(done: gulp.TaskFunctionCallback) {
114
+ return addTypes(taskOptions, done);
115
+ });
116
+
117
+ gulp.task('set-production', gulp.parallel(
118
+ setProdConfig()
119
+ ));
120
+
121
+ gulp.task('start-wix', shell.task([
122
+ 'yarn wix:dev',
123
+ ]));
124
+
125
+ gulp.task('gen-docs', shell.task([
126
+ 'yarn docs',
127
+ ]));
128
+
129
+ gulp.task('fix-wix', gulp.series(
130
+ cleanWix(),
131
+ 'sync-types',
132
+ 'fix-wix-types',
133
+ 'add-wix-types'
134
+ ));
135
+
136
+ gulp.task('build', gulp.parallel(
137
+ 'build-backend',
138
+ 'build-public',
139
+ 'preview-templates',
140
+ buildPages(taskOptions),
141
+ compileScss(taskOptions),
142
+ 'copy-files'
143
+ )
144
+ );
145
+
146
+ gulp.task('build-pipeline', gulp.series(
147
+ cleanSrc(taskOptions),
148
+ 'set-production',
149
+ 'check-ts',
150
+ 'fix-wix-types',
151
+ 'add-wix-types',
152
+ 'test-ci',
153
+ 'build',
154
+ ));
155
+
156
+ gulp.task('build-prod', gulp.series(
157
+ (done) => checkPages(true, false).then(() => done(), (err) => done(err)),
158
+ cleanSrc(taskOptions),
159
+ 'set-production',
160
+ 'fix-wix',
161
+ 'check-ts',
162
+ 'test-ci',
163
+ 'build-backend',
164
+ 'build-public',
165
+ buildPages(taskOptions),
166
+ 'copy-files',
167
+ compileScss(taskOptions),
168
+ // 'gen-docs'
169
+ ));
170
+
171
+ gulp.task('start-dev-env', gulp.parallel(
172
+ watchAll(taskOptions),
173
+ 'test',
174
+ 'start-wix',
175
+ 'check-ts',
176
+ (done) => checkPages(false, config.force).then(() => done(), (err) => done(err)),
177
+ ));
178
+
179
+ gulp.task('dev', gulp.series(
180
+ cleanSrc(taskOptions),
181
+ 'fix-wix',
182
+ 'build',
183
+ 'start-dev-env',
184
+ )
185
+ );
186
+
187
+ yield* Effect.tryPromise({
188
+ try: () => {
189
+ return new Promise(function (resolve, reject) {
190
+ gulp.series(task, (done) => {
191
+ resolve(true);
192
+ done();
193
+ })(function (err) {
194
+ if (err) {
195
+ logger.error("Error starting tasks:", err);
196
+ reject(err);
197
+ }
198
+ });
199
+ });
200
+ },
201
+ catch: (e) => {
202
+ logger.error("Error starting tasks:", e);
203
+ return new AppError({ message: 'Error starting tasks', cause: e });
204
+ }
205
+ })
206
+
207
+ logger.report("Task completed successfully:", task);
208
+ });