lucy-cli 2.0.0-alpha.2 → 2.0.0-alpha.21

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 (600) hide show
  1. package/.yarnrc.yml +0 -1
  2. package/dist/Gulpfile.d.ts +35 -0
  3. package/dist/Gulpfile.js +132 -0
  4. package/dist/Gulpfile.js.map +1 -0
  5. package/dist/args.d.ts +1 -6
  6. package/dist/args.js +62 -7
  7. package/dist/args.js.map +1 -0
  8. package/dist/commands/checks.d.ts +7 -0
  9. package/dist/commands/checks.js +47 -0
  10. package/dist/commands/checks.js.map +1 -0
  11. package/dist/commands/cleanup copy.d.ts +4 -0
  12. package/dist/commands/cleanup copy.js +10 -0
  13. package/dist/commands/cleanup copy.js.map +1 -0
  14. package/dist/commands/cleanup.d.ts +4 -0
  15. package/dist/commands/cleanup.js +10 -0
  16. package/dist/commands/cleanup.js.map +1 -0
  17. package/dist/commands/copy.d.ts +6 -0
  18. package/dist/commands/copy.js +20 -0
  19. package/dist/commands/copy.js.map +1 -0
  20. package/dist/commands/edit.d.ts +10 -0
  21. package/dist/commands/edit.js +67 -0
  22. package/dist/commands/edit.js.map +1 -0
  23. package/dist/commands/exec copy.d.ts +3 -0
  24. package/dist/commands/exec copy.js +20 -0
  25. package/dist/commands/exec copy.js.map +1 -0
  26. package/dist/commands/exec.d.ts +7 -0
  27. package/dist/commands/exec.js +66 -0
  28. package/dist/commands/exec.js.map +1 -0
  29. package/dist/commands/files.d.ts +7 -0
  30. package/dist/commands/files.js +28 -0
  31. package/dist/commands/files.js.map +1 -0
  32. package/dist/commands/git.d.ts +8 -0
  33. package/dist/commands/git.js +104 -0
  34. package/dist/commands/git.js.map +1 -0
  35. package/dist/commands/home.d.ts +4 -0
  36. package/dist/commands/home.js +18 -0
  37. package/dist/commands/home.js.map +1 -0
  38. package/dist/commands/install.d.ts +8 -0
  39. package/dist/commands/install.js +161 -0
  40. package/dist/commands/install.js.map +1 -0
  41. package/dist/commands/read.d.ts +6 -0
  42. package/dist/commands/read.js +40 -0
  43. package/dist/commands/read.js.map +1 -0
  44. package/dist/commands/write.d.ts +7 -0
  45. package/dist/commands/write.js +28 -0
  46. package/dist/commands/write.js.map +1 -0
  47. package/dist/commands.js +1 -0
  48. package/dist/commands.js.map +1 -0
  49. package/dist/config.d.ts +29 -7
  50. package/dist/config.js +90 -26
  51. package/dist/config.js.map +1 -0
  52. package/dist/error.d.ts +1 -9
  53. package/dist/error.js +1 -2
  54. package/dist/error.js.map +1 -0
  55. package/dist/gulp/backend.d.ts +3 -0
  56. package/dist/gulp/backend.js +92 -0
  57. package/dist/gulp/backend.js.map +1 -0
  58. package/dist/gulp/checks.d.ts +3 -0
  59. package/dist/gulp/checks.js +194 -0
  60. package/dist/gulp/checks.js.map +1 -0
  61. package/dist/gulp/clean.d.ts +3 -0
  62. package/dist/gulp/clean.js +33 -0
  63. package/dist/gulp/clean.js.map +1 -0
  64. package/dist/gulp/copy.d.ts +2 -0
  65. package/dist/gulp/copy.js +34 -0
  66. package/dist/gulp/copy.js.map +1 -0
  67. package/dist/gulp/helpers.d.ts +2 -0
  68. package/dist/gulp/helpers.js +21 -0
  69. package/dist/gulp/helpers.js.map +1 -0
  70. package/dist/gulp/pages.d.ts +2 -0
  71. package/dist/gulp/pages.js +39 -0
  72. package/dist/gulp/pages.js.map +1 -0
  73. package/dist/gulp/pipeline.d.ts +1 -0
  74. package/dist/gulp/pipeline.js +29 -0
  75. package/dist/gulp/pipeline.js.map +1 -0
  76. package/dist/gulp/public.d.ts +2 -0
  77. package/dist/gulp/public.js +50 -0
  78. package/dist/gulp/public.js.map +1 -0
  79. package/dist/gulp/styles.d.ts +2 -0
  80. package/dist/gulp/styles.js +40 -0
  81. package/dist/gulp/styles.js.map +1 -0
  82. package/dist/gulp/templates.d.ts +2 -0
  83. package/dist/gulp/templates.js +33 -0
  84. package/dist/gulp/templates.js.map +1 -0
  85. package/dist/gulp/types.d.ts +4 -0
  86. package/dist/gulp/types.js +289 -0
  87. package/dist/gulp/types.js.map +1 -0
  88. package/dist/gulp/watchers.d.ts +9 -0
  89. package/dist/gulp/watchers.js +57 -0
  90. package/dist/gulp/watchers.js.map +1 -0
  91. package/dist/helpers.d.ts +9 -0
  92. package/dist/helpers.js +83 -0
  93. package/dist/helpers.js.map +1 -0
  94. package/dist/index.d.ts +1 -0
  95. package/dist/index.js +77 -9
  96. package/dist/index.js.map +1 -0
  97. package/dist/init/blocks.d.ts +5 -0
  98. package/dist/init/blocks.js +60 -0
  99. package/dist/init/blocks.js.map +1 -0
  100. package/dist/init/cargo copy.d.ts +2 -0
  101. package/dist/init/cargo copy.js +16 -0
  102. package/dist/init/cargo copy.js.map +1 -0
  103. package/dist/init/cargo.d.ts +2 -0
  104. package/dist/init/cargo.js +19 -0
  105. package/dist/init/cargo.js.map +1 -0
  106. package/dist/init/expo copy.d.ts +5 -0
  107. package/dist/init/expo copy.js +48 -0
  108. package/dist/init/expo copy.js.map +1 -0
  109. package/dist/init/expo.d.ts +5 -0
  110. package/dist/init/expo.js +50 -0
  111. package/dist/init/expo.js.map +1 -0
  112. package/dist/init/gitModules.d.ts +2 -0
  113. package/dist/init/gitModules.js +13 -0
  114. package/dist/init/gitModules.js.map +1 -0
  115. package/dist/init/index.d.ts +4 -0
  116. package/dist/init/index.js +77 -0
  117. package/dist/init/index.js.map +1 -0
  118. package/dist/init/lucy.d.ts +1 -0
  119. package/dist/init/lucy.js +2 -0
  120. package/dist/init/monorepo copy.d.ts +4 -0
  121. package/dist/init/monorepo copy.js +28 -0
  122. package/dist/init/monorepo copy.js.map +1 -0
  123. package/dist/init/monorepo.d.ts +4 -0
  124. package/dist/init/monorepo.js +46 -0
  125. package/dist/init/monorepo.js.map +1 -0
  126. package/dist/init/prepare.d.ts +8 -0
  127. package/dist/init/prepare.js +20 -0
  128. package/dist/init/prepare.js.map +1 -0
  129. package/dist/init/prepareVelo.d.ts +2 -0
  130. package/dist/init/prepareVelo.js +16 -0
  131. package/dist/init/prepareVelo.js.map +1 -0
  132. package/dist/init/sync.d.ts +2 -0
  133. package/dist/init/sync.js +88 -0
  134. package/dist/init/sync.js.map +1 -0
  135. package/dist/init/tauri.d.ts +5 -0
  136. package/dist/init/tauri.js +29 -0
  137. package/dist/init/tauri.js.map +1 -0
  138. package/dist/init/templates.d.ts +5 -0
  139. package/dist/init/templates.js +93 -0
  140. package/dist/init/templates.js.map +1 -0
  141. package/dist/init/velo.d.ts +5 -0
  142. package/dist/init/velo.js +58 -0
  143. package/dist/init/velo.js.map +1 -0
  144. package/dist/init/write.d.ts +5 -0
  145. package/dist/init/write.js +15 -0
  146. package/dist/init.js +44 -18
  147. package/dist/models.js +1 -0
  148. package/dist/models.js.map +1 -0
  149. package/dist/policy.js +1 -0
  150. package/dist/policy.js.map +1 -0
  151. package/dist/prepare.js +1 -0
  152. package/dist/prepare.js.map +1 -0
  153. package/dist/runtime.d.ts +1 -1
  154. package/dist/runtime.js +1 -0
  155. package/dist/runtime.js.map +1 -0
  156. package/dist/schemas/gulp.d.ts +25 -0
  157. package/dist/schemas/gulp.js +8 -0
  158. package/dist/schemas/gulp.js.map +1 -0
  159. package/dist/schemas/index.d.ts +10 -0
  160. package/dist/schemas/index.js +9 -0
  161. package/dist/schemas/index.js.map +1 -0
  162. package/dist/schemas/lucy.d.ts +29 -0
  163. package/dist/schemas/lucy.js +42 -0
  164. package/dist/schemas/lucy.js.map +1 -0
  165. package/dist/schemas/models.d.ts +37 -0
  166. package/dist/schemas/models.js +2 -0
  167. package/dist/schemas/models.js.map +1 -0
  168. package/dist/schemas/tsconfig.d.ts +37 -0
  169. package/dist/schemas/tsconfig.js +2 -0
  170. package/dist/schemas/tsconfig.js.map +1 -0
  171. package/dist/schemas/types.d.ts +33 -0
  172. package/dist/schemas/types.js +5 -1
  173. package/dist/schemas/types.js.map +1 -0
  174. package/dist/states.js +1 -0
  175. package/dist/states.js.map +1 -0
  176. package/dist/sync/index.js +2 -0
  177. package/dist/sync/index.js.map +1 -0
  178. package/dist/sync/sync.d.ts +3 -0
  179. package/dist/sync/sync.js +92 -0
  180. package/dist/sync/sync.js.map +1 -0
  181. package/dist/tasks/Gulpfile.d.ts +4 -0
  182. package/dist/tasks/Gulpfile.js +111 -0
  183. package/dist/tasks/Gulpfile.js.map +1 -0
  184. package/dist/tasks/gitModules.d.ts +2 -0
  185. package/dist/tasks/gitModules.js +13 -0
  186. package/dist/tasks/gitModules.js.map +1 -0
  187. package/dist/tasks/gulp/backend.d.ts +4 -0
  188. package/dist/tasks/gulp/backend.js +92 -0
  189. package/dist/tasks/gulp/backend.js.map +1 -0
  190. package/dist/tasks/gulp/checks.d.ts +4 -0
  191. package/dist/tasks/gulp/checks.js +202 -0
  192. package/dist/tasks/gulp/checks.js.map +1 -0
  193. package/dist/tasks/gulp/clean.d.ts +3 -0
  194. package/dist/tasks/gulp/clean.js +33 -0
  195. package/dist/tasks/gulp/clean.js.map +1 -0
  196. package/dist/tasks/gulp/copy.d.ts +3 -0
  197. package/dist/tasks/gulp/copy.js +34 -0
  198. package/dist/tasks/gulp/copy.js.map +1 -0
  199. package/dist/tasks/gulp/helpers.d.ts +3 -0
  200. package/dist/tasks/gulp/helpers.js +19 -0
  201. package/dist/tasks/gulp/helpers.js.map +1 -0
  202. package/dist/tasks/gulp/pages.d.ts +2 -0
  203. package/dist/tasks/gulp/pages.js +39 -0
  204. package/dist/tasks/gulp/pages.js.map +1 -0
  205. package/dist/tasks/gulp/pipeline.d.ts +1 -0
  206. package/dist/tasks/gulp/pipeline.js +29 -0
  207. package/dist/tasks/gulp/pipeline.js.map +1 -0
  208. package/dist/tasks/gulp/public.d.ts +3 -0
  209. package/dist/tasks/gulp/public.js +50 -0
  210. package/dist/tasks/gulp/public.js.map +1 -0
  211. package/dist/tasks/gulp/styles.d.ts +3 -0
  212. package/dist/tasks/gulp/styles.js +40 -0
  213. package/dist/tasks/gulp/styles.js.map +1 -0
  214. package/dist/tasks/gulp/templates.d.ts +2 -0
  215. package/dist/tasks/gulp/templates.js +45 -0
  216. package/dist/tasks/gulp/templates.js.map +1 -0
  217. package/dist/tasks/gulp/types.d.ts +4 -0
  218. package/dist/tasks/gulp/types.js +293 -0
  219. package/dist/tasks/gulp/types.js.map +1 -0
  220. package/dist/tasks/gulp/watchers.d.ts +3 -0
  221. package/dist/tasks/gulp/watchers.js +59 -0
  222. package/dist/tasks/gulp/watchers.js.map +1 -0
  223. package/dist/tasks/index.d.ts +4 -0
  224. package/dist/tasks/index.js +23 -0
  225. package/dist/tasks/index.js.map +1 -0
  226. package/dist/tasks/sync.d.ts +2 -0
  227. package/dist/tasks/sync.js +88 -0
  228. package/dist/tasks/sync.js.map +1 -0
  229. package/dist/tasks/syncPkg.d.ts +3 -0
  230. package/dist/tasks/syncPkg.js +13 -0
  231. package/dist/tasks/syncPkg.js.map +1 -0
  232. package/dist/tasks/syncSettings.d.ts +3 -0
  233. package/dist/tasks/syncSettings.js +18 -0
  234. package/dist/tasks/syncSettings.js.map +1 -0
  235. package/dist/utils/index.js +2 -0
  236. package/dist/utils/index.js.map +1 -0
  237. package/dist/utils/install.js +1 -0
  238. package/dist/utils/logger.d.ts +17 -0
  239. package/dist/utils/logger.js +37 -0
  240. package/dist/utils/logger.js.map +1 -0
  241. package/dist/wix-sdk/check.d.ts +4 -0
  242. package/dist/wix-sdk/check.js +23 -0
  243. package/dist/wix-sdk/check.js.map +1 -0
  244. package/dist/wix-sdk/client.d.ts +10 -0
  245. package/dist/wix-sdk/client.js +18 -0
  246. package/dist/wix-sdk/client.js.map +1 -0
  247. package/dist/wix-sdk/import.d.ts +1 -0
  248. package/dist/wix-sdk/import.js +88 -0
  249. package/dist/wix-sdk/import.js.map +1 -0
  250. package/dist/wix-sdk/index.d.ts +4 -0
  251. package/dist/wix-sdk/index.js +15 -0
  252. package/dist/wix-sdk/index.js.map +1 -0
  253. package/dist/wix-sdk/init copy.d.ts +4 -0
  254. package/dist/wix-sdk/init copy.js +51 -0
  255. package/dist/wix-sdk/init copy.js.map +1 -0
  256. package/dist/wix-sdk/init.d.ts +4 -0
  257. package/dist/wix-sdk/init.js +51 -0
  258. package/dist/wix-sdk/init.js.map +1 -0
  259. package/dist/wix-sdk/is-allive.d.ts +4 -0
  260. package/dist/wix-sdk/is-allive.js +37 -0
  261. package/dist/wix-sdk/is-allive.js.map +1 -0
  262. package/dist/wix-sdk/run.d.ts +4 -0
  263. package/dist/wix-sdk/run.js +53 -0
  264. package/dist/wix-sdk/run.js.map +1 -0
  265. package/dist/wix-sdk/sync copy.d.ts +1 -0
  266. package/dist/wix-sdk/sync copy.js +88 -0
  267. package/dist/wix-sdk/sync copy.js.map +1 -0
  268. package/dist/wix-sdk/sync.d.ts +1 -0
  269. package/dist/wix-sdk/sync.js +88 -0
  270. package/dist/wix-sdk/sync.js.map +1 -0
  271. package/dist/wix-sdk/wix_sdk_check.d.ts +4 -0
  272. package/dist/wix-sdk/wix_sdk_check.js +37 -0
  273. package/dist/wix-sdk/wix_sdk_check.js.map +1 -0
  274. package/dist/wix-sync/client.d.ts +3 -0
  275. package/dist/wix-sync/client.js +5 -0
  276. package/dist/wix-sync/client.js.map +1 -0
  277. package/dist/wix-sync/export copy.d.ts +4 -0
  278. package/dist/wix-sync/export copy.js +21 -0
  279. package/dist/wix-sync/export copy.js.map +1 -0
  280. package/dist/wix-sync/export.d.ts +4 -0
  281. package/dist/wix-sync/export.js +15 -0
  282. package/dist/wix-sync/export.js.map +1 -0
  283. package/dist/wix-sync/import copy.d.ts +4 -0
  284. package/dist/wix-sync/import copy.js +21 -0
  285. package/dist/wix-sync/import copy.js.map +1 -0
  286. package/dist/wix-sync/import.d.ts +4 -0
  287. package/dist/wix-sync/import.js +26 -0
  288. package/dist/wix-sync/import.js.map +1 -0
  289. package/dist/wix-sync/index.d.ts +4 -0
  290. package/dist/wix-sync/index.js +35 -0
  291. package/dist/wix-sync/index.js.map +1 -0
  292. package/dist/wix-sync/init copy.d.ts +4 -0
  293. package/dist/wix-sync/init copy.js +54 -0
  294. package/dist/wix-sync/init copy.js.map +1 -0
  295. package/dist/wix-sync/init.d.ts +4 -0
  296. package/dist/wix-sync/init.js +74 -0
  297. package/dist/wix-sync/init.js.map +1 -0
  298. package/dist/wix-sync/is-alive.d.ts +4 -0
  299. package/dist/wix-sync/is-alive.js +23 -0
  300. package/dist/wix-sync/is-alive.js.map +1 -0
  301. package/dist/wix-sync/is-allive copy.d.ts +4 -0
  302. package/dist/wix-sync/is-allive copy.js +23 -0
  303. package/dist/wix-sync/is-allive copy.js.map +1 -0
  304. package/dist/wix-sync/is-allive.d.ts +4 -0
  305. package/dist/wix-sync/is-allive.js +23 -0
  306. package/dist/wix-sync/is-allive.js.map +1 -0
  307. package/dist/wix-sync/migrate.d.ts +4 -0
  308. package/dist/wix-sync/migrate.js +21 -0
  309. package/dist/wix-sync/migrate.js.map +1 -0
  310. package/dist/wix-sync/sync-od.js +100 -0
  311. package/dist/wix-sync/sync-od.js.map +1 -0
  312. package/dist/wix-sync/sync.d.ts +4 -0
  313. package/dist/wix-sync/sync.js +26 -0
  314. package/dist/wix-sync/sync.js.map +1 -0
  315. package/dist/wix-sync/sync2.d.ts +4 -0
  316. package/dist/wix-sync/sync2.js +25 -0
  317. package/dist/wix-sync/sync2.js.map +1 -0
  318. package/dist/wix-sync copy/index.d.ts +4 -0
  319. package/dist/wix-sync copy/index.js +17 -0
  320. package/dist/wix-sync copy/index.js.map +1 -0
  321. package/dist/wix-sync copy/init.d.ts +4 -0
  322. package/dist/wix-sync copy/init.js +58 -0
  323. package/dist/wix-sync copy/init.js.map +1 -0
  324. package/dist/wix-sync copy/is-allive.d.ts +4 -0
  325. package/dist/wix-sync copy/is-allive.js +36 -0
  326. package/dist/wix-sync copy/is-allive.js.map +1 -0
  327. package/dist/wix-sync copy/sync.d.ts +1 -0
  328. package/dist/wix-sync copy/sync.js +88 -0
  329. package/dist/wix-sync copy/sync.js.map +1 -0
  330. package/files/sync-data/data/test.csv +17 -0
  331. package/files/sync-data/files/lucy.jpg +0 -0
  332. package/files/sync-data/schema/test.json +11 -0
  333. package/files/templates/block[D]/files/.stylelintrc.js +8 -0
  334. package/files/templates/block[D]/lucy.json +9 -0
  335. package/files/templates/cargo[D]/files/.env +1 -0
  336. package/files/templates/cargo[D]/files/Cargo.toml +238 -0
  337. package/files/templates/cargo[D]/files/Makefile.toml +4 -0
  338. package/files/templates/cargo[D]/files/build/main.rs +35 -0
  339. package/files/templates/cargo[D]/files/config/beta.json +19 -0
  340. package/files/templates/cargo[D]/files/config/ci.json +15 -0
  341. package/files/templates/cargo[D]/files/config/default.json +71 -0
  342. package/files/templates/cargo[D]/files/config/development.json +10 -0
  343. package/files/templates/cargo[D]/files/config/produktion.json +5 -0
  344. package/files/templates/cargo[D]/files/config/stage.json +4 -0
  345. package/files/templates/cargo[D]/files/locales/todo.yml +3 -0
  346. package/files/templates/cargo[D]/files/public/index.html +1 -0
  347. package/files/templates/cargo[D]/lucy.json +15 -0
  348. package/files/templates/expo[D]/files/.prettierrc.js +16 -0
  349. package/files/templates/expo[D]/files/.stylelintrc.js +8 -0
  350. package/files/templates/expo[D]/files/.yarnrc.yml +3 -0
  351. package/files/templates/expo[D]/files/assets/fonts/SpaceMono-Regular.ttf +0 -0
  352. package/files/templates/expo[D]/files/assets/images/adaptive-icon.png +0 -0
  353. package/files/templates/expo[D]/files/assets/images/favicon.png +0 -0
  354. package/files/templates/expo[D]/files/assets/images/icon.png +0 -0
  355. package/files/templates/expo[D]/files/assets/images/splash-icon.png +0 -0
  356. package/files/templates/expo[D]/files/babel.config.js +10 -0
  357. package/files/templates/expo[D]/files/constants/theme.ts +18 -0
  358. package/files/{expo → templates/expo[D]/files}/eas.json +9 -3
  359. package/files/{expo/eslint.config.js → templates/expo[D]/files/eslint.config.mjs} +15 -19
  360. package/files/templates/expo[D]/files/hooks/useColorScheme.ts +17 -0
  361. package/files/templates/expo[D]/files/index.ts +11 -0
  362. package/files/templates/expo[D]/files/lib/data.ts +48 -0
  363. package/files/templates/expo[D]/files/lib/utils/index.ts +11 -0
  364. package/files/{expo → templates/expo[D]/files}/lib/utils/polyfills.ts +1 -1
  365. package/files/{expo → templates/expo[D]/files}/lib/wix/client.ts +3 -5
  366. package/files/templates/expo[D]/files/lib/wix/error.ts +3 -0
  367. package/files/templates/expo[D]/files/lib/wix/index.ts +2 -0
  368. package/files/templates/expo[D]/files/metro.config.js +57 -0
  369. package/files/templates/expo[D]/files/scripts/reset-project.ts +116 -0
  370. package/files/templates/expo[D]/files/tailwind.config.js +63 -0
  371. package/files/templates/expo[D]/files/tsconfig.json +46 -0
  372. package/files/templates/expo[D]/lucy.json +82 -0
  373. package/files/templates/monorepo[D]/files/.editorconfig +10 -0
  374. package/files/templates/monorepo[D]/files/.nvmrc +1 -0
  375. package/files/templates/monorepo[D]/files/.prettierignore +23 -0
  376. package/files/{expo → templates/monorepo[D]/files}/.prettierrc.json +0 -1
  377. package/files/templates/monorepo[D]/files/.stylelintrc.js +8 -0
  378. package/files/templates/monorepo[D]/files/.yarnrc +1 -0
  379. package/files/templates/monorepo[D]/files/README.md +109 -0
  380. package/files/templates/monorepo[D]/files/currents.config.ts +5 -0
  381. package/files/templates/monorepo[D]/files/nx.json +25 -0
  382. package/files/templates/monorepo[D]/files/pnpm-workspace.yaml +10 -0
  383. package/files/templates/monorepo[D]/files/tsconfig.json +6 -0
  384. package/files/templates/monorepo[D]/files/typedoc.json +25 -0
  385. package/files/templates/monorepo[D]/files/vitest.config.ts +27 -0
  386. package/files/templates/monorepo[D]/lucy.json +68 -0
  387. package/files/templates/tauri[D]/lucy.json +9 -0
  388. package/files/templates/velo[D]/files/.prettierignore +23 -0
  389. package/files/templates/velo[D]/files/.prettierrc.js +16 -0
  390. package/files/templates/velo[D]/files/typescript/public/.gitkeep +0 -0
  391. package/files/templates/velo[D]/files/typescript/public/scss/app.scss +0 -0
  392. package/files/templates/velo[D]/files/typescript/styles/.gitkeep +0 -0
  393. package/files/templates/velo[D]/files/typescript/styles/global.scss +0 -0
  394. package/files/templates/velo[D]/lucy.json +137 -0
  395. package/old/Gulpfile.d.ts +34 -0
  396. package/old/Gulpfile.js +116 -0
  397. package/old/Gulpfile.js.map +1 -0
  398. package/old/gulp/backend.d.ts +3 -0
  399. package/old/gulp/backend.js +92 -0
  400. package/old/gulp/backend.js.map +1 -0
  401. package/old/gulp/checks.d.ts +3 -0
  402. package/old/gulp/checks.js +205 -0
  403. package/old/gulp/checks.js.map +1 -0
  404. package/old/gulp/clean.d.ts +3 -0
  405. package/old/gulp/clean.js +29 -0
  406. package/old/gulp/clean.js.map +1 -0
  407. package/old/gulp/copy.d.ts +2 -0
  408. package/old/gulp/copy.js +34 -0
  409. package/old/gulp/copy.js.map +1 -0
  410. package/old/gulp/helpers.d.ts +2 -0
  411. package/old/gulp/helpers.js +25 -0
  412. package/old/gulp/helpers.js.map +1 -0
  413. package/old/gulp/pages.d.ts +2 -0
  414. package/old/gulp/pages.js +37 -0
  415. package/old/gulp/pages.js.map +1 -0
  416. package/old/gulp/pipeline.d.ts +1 -0
  417. package/old/gulp/pipeline.js +29 -0
  418. package/old/gulp/pipeline.js.map +1 -0
  419. package/old/gulp/public.d.ts +2 -0
  420. package/old/gulp/public.js +50 -0
  421. package/old/gulp/public.js.map +1 -0
  422. package/old/gulp/styles.d.ts +2 -0
  423. package/old/gulp/styles.js +40 -0
  424. package/old/gulp/styles.js.map +1 -0
  425. package/old/gulp/templates.d.ts +2 -0
  426. package/old/gulp/templates.js +33 -0
  427. package/old/gulp/templates.js.map +1 -0
  428. package/old/gulp/types.d.ts +4 -0
  429. package/old/gulp/types.js +289 -0
  430. package/old/gulp/types.js.map +1 -0
  431. package/old/gulp/watchers.d.ts +9 -0
  432. package/old/gulp/watchers.js +59 -0
  433. package/old/gulp/watchers.js.map +1 -0
  434. package/old/helpers.d.ts +32 -0
  435. package/old/helpers.js +267 -0
  436. package/old/helpers.js.map +1 -0
  437. package/{src copy/helpers.ts → old/helpers.ts} +1 -1
  438. package/old/index.d.ts +59 -0
  439. package/old/index.js +288 -0
  440. package/old/index.js.map +1 -0
  441. package/old/init.d.ts +8 -0
  442. package/old/init.js +165 -0
  443. package/old/init.js.map +1 -0
  444. package/old/models.d.ts +37 -0
  445. package/old/models.js +2 -0
  446. package/old/models.js.map +1 -0
  447. package/old/prepare.d.ts +8 -0
  448. package/old/prepare.js +20 -0
  449. package/old/prepare.js.map +1 -0
  450. package/old/schemas/index.d.ts +0 -0
  451. package/old/schemas/index.js +2 -0
  452. package/old/schemas/index.js.map +1 -0
  453. package/old/schemas/index.ts +0 -0
  454. package/old/schemas/types.d.ts +0 -0
  455. package/old/schemas/types.js +2 -0
  456. package/old/schemas/types.js.map +1 -0
  457. package/old/schemas/types.ts +0 -0
  458. package/old/sync.d.ts +2 -0
  459. package/old/sync.js +88 -0
  460. package/old/sync.js.map +1 -0
  461. package/package.json +17 -17
  462. package/patches/velo-sync+0.0.9.patch +13 -0
  463. package/src/args.ts +62 -17
  464. package/src/commands/checks.ts +51 -0
  465. package/src/commands/cleanup.ts +11 -0
  466. package/src/commands/copy.ts +28 -0
  467. package/src/commands/edit.ts +81 -0
  468. package/src/commands/exec.ts +68 -0
  469. package/src/commands/git.ts +113 -0
  470. package/src/commands/home.ts +22 -0
  471. package/src/commands/install.ts +242 -0
  472. package/src/commands/read.ts +45 -0
  473. package/src/commands/write.ts +45 -0
  474. package/src/config.ts +116 -35
  475. package/src/error.ts +1 -2
  476. package/src/helpers.ts +92 -0
  477. package/src/index.ts +88 -13
  478. package/src/init/blocks.ts +82 -0
  479. package/src/init/cargo.ts +22 -0
  480. package/src/init/expo.ts +66 -0
  481. package/src/init/gitModules.ts +15 -0
  482. package/src/init/index.ts +81 -0
  483. package/src/init/monorepo.ts +69 -0
  484. package/src/init/prepareVelo.ts +19 -0
  485. package/src/init/tauri.ts +38 -0
  486. package/src/init/templates.ts +98 -0
  487. package/src/init/velo.ts +62 -0
  488. package/src/runtime.ts +1 -0
  489. package/src/schemas/gulp.ts +31 -0
  490. package/src/schemas/index.ts +13 -1
  491. package/src/schemas/lucy.ts +43 -0
  492. package/src/schemas/types.ts +40 -0
  493. package/src/tasks/Gulpfile.ts +207 -0
  494. package/src/tasks/gulp/backend.ts +113 -0
  495. package/src/tasks/gulp/checks.ts +218 -0
  496. package/src/tasks/gulp/clean.ts +38 -0
  497. package/src/tasks/gulp/copy.ts +38 -0
  498. package/src/tasks/gulp/helpers.ts +18 -0
  499. package/src/tasks/gulp/pages.ts +43 -0
  500. package/src/tasks/gulp/pipeline.ts +31 -0
  501. package/src/tasks/gulp/public.ts +61 -0
  502. package/src/tasks/gulp/styles.ts +47 -0
  503. package/src/tasks/gulp/templates.ts +53 -0
  504. package/src/tasks/gulp/types.ts +310 -0
  505. package/src/tasks/gulp/watchers.ts +97 -0
  506. package/src/tasks/index.ts +24 -0
  507. package/src/tasks/syncSettings.ts +21 -0
  508. package/src/types.d.ts +1 -1
  509. package/src/utils/index.ts +0 -0
  510. package/src/utils/logger.ts +40 -0
  511. package/src/wix-sdk/check.ts +24 -0
  512. package/src/wix-sdk/client.ts +18 -0
  513. package/src/wix-sdk/index.ts +17 -0
  514. package/src/wix-sdk/init.ts +54 -0
  515. package/src/wix-sdk/run.ts +56 -0
  516. package/src/wix-sync/client.ts +6 -0
  517. package/src/wix-sync/export.ts +19 -0
  518. package/src/wix-sync/import.ts +27 -0
  519. package/src/wix-sync/index.ts +36 -0
  520. package/src/wix-sync/init.ts +77 -0
  521. package/src/wix-sync/is-alive.ts +25 -0
  522. package/src/wix-sync/migrate.ts +23 -0
  523. package/src/wix-sync/sync.ts +27 -0
  524. package/tsconfig.json +6 -5
  525. package/files/expo/.env +0 -1
  526. package/files/expo/app/(tabs)/_layout.tsx +0 -45
  527. package/files/expo/app/_layout.tsx +0 -45
  528. package/files/expo/babel.config.js +0 -9
  529. package/files/expo/constants/Colors.ts +0 -27
  530. package/files/expo/constants/theme.ts +0 -18
  531. package/files/expo/hooks/useColorScheme.ts +0 -11
  532. package/files/expo/hooks/useColorScheme.web.ts +0 -21
  533. package/files/expo/hooks/useColorSchemeRN.ts +0 -1
  534. package/files/expo/hooks/useThemeColor.ts +0 -21
  535. package/files/expo/lib/data.ts +0 -45
  536. package/files/expo/lib/utils/index.ts +0 -6
  537. package/files/expo/lib/wix/index.ts +0 -1
  538. package/files/expo/lucy.json +0 -8
  539. package/files/expo/tailwind.config.js +0 -198
  540. package/files/expo/tsconfig.json +0 -40
  541. package/src/init.ts +0 -352
  542. /package/{files/velo/.gitmodules → dist/sync/index.d.ts} +0 -0
  543. /package/{files/velo/typescript/__mocks__/.gitkeep → dist/utils/index.d.ts} +0 -0
  544. /package/{files/velo/typescript/backend/data.ts → dist/utils/install.d.ts} +0 -0
  545. /package/{files/velo/typescript/backend/events.ts → dist/wix-sync/sync-od.d.ts} +0 -0
  546. /package/files/{expo → templates/expo[D]/files}/.nvmrc +0 -0
  547. /package/files/{expo → templates/expo[D]/files}/.prettierignore +0 -0
  548. /package/files/{expo → templates/expo[D]/files}/.yarnrc +0 -0
  549. /package/files/{expo/readme.md → templates/expo[D]/files/README.md} +0 -0
  550. /package/files/{velo/typescript/pages → templates/expo[D]/files/components}/.gitkeep +0 -0
  551. /package/files/{velo/typescript/public → templates/expo[D]/files/components/ui}/.gitkeep +0 -0
  552. /package/files/{expo → templates/expo[D]/files}/global.css +0 -0
  553. /package/files/{expo/types → templates/expo[D]/files}/nativewind-env.d.ts +0 -0
  554. /package/files/{expo → templates/expo[D]/files}/types/reset.d.ts +0 -0
  555. /package/files/{expo → templates/monorepo[D]/files}/.yarnrc.yml +0 -0
  556. /package/files/{velo/typescript/public/scss/app.scss → templates/velo[D]/files/.gitmodules} +0 -0
  557. /package/files/{velo → templates/velo[D]/files}/.madgerc +0 -0
  558. /package/files/{velo → templates/velo[D]/files}/.nvmrc +0 -0
  559. /package/files/{velo → templates/velo[D]/files}/.stylelintrc.js +0 -0
  560. /package/files/{velo → templates/velo[D]/files}/.yarnrc.yml +0 -0
  561. /package/files/{velo → templates/velo[D]/files}/currents.config.js +0 -0
  562. /package/files/{velo → templates/velo[D]/files}/cypress/e2e/base/base.cy.ts +0 -0
  563. /package/files/{velo → templates/velo[D]/files}/cypress/fixtures/example.json +0 -0
  564. /package/files/{velo → templates/velo[D]/files}/cypress/support/commands.ts +0 -0
  565. /package/files/{velo → templates/velo[D]/files}/cypress/support/e2e.ts +0 -0
  566. /package/files/{velo → templates/velo[D]/files}/cypress/tsconfig.json +0 -0
  567. /package/files/{velo → templates/velo[D]/files}/cypress.config.mjs +0 -0
  568. /package/files/{velo → templates/velo[D]/files}/eslint.config.mjs +0 -0
  569. /package/files/{velo → templates/velo[D]/files}/local.tsconfig.json +0 -0
  570. /package/files/{velo → templates/velo[D]/files}/typedoc.json +0 -0
  571. /package/files/{velo/typescript/styles → templates/velo[D]/files/typescript/__mocks__}/.gitkeep +0 -0
  572. /package/files/{velo/typescript/styles/global.scss → templates/velo[D]/files/typescript/backend/data.ts} +0 -0
  573. /package/{src copy/schemas/index.ts → files/templates/velo[D]/files/typescript/backend/events.ts} +0 -0
  574. /package/files/{velo → templates/velo[D]/files}/typescript/backend/http-functions.ts +0 -0
  575. /package/files/{velo → templates/velo[D]/files}/typescript/backend/lib/http-functions/sync.ts +0 -0
  576. /package/files/{velo → templates/velo[D]/files}/typescript/backend/permissions.json +0 -0
  577. /package/{src copy/schemas/types.ts → files/templates/velo[D]/files/typescript/pages/.gitkeep} +0 -0
  578. /package/files/{velo → templates/velo[D]/files}/typescript/tsconfig.json +0 -0
  579. /package/files/{velo → templates/velo[D]/files}/vitest.config.ts +0 -0
  580. /package/{src copy → old}/Gulpfile.ts +0 -0
  581. /package/{src copy → old}/gulp/backend.ts +0 -0
  582. /package/{src copy → old}/gulp/checks.ts +0 -0
  583. /package/{src copy → old}/gulp/clean.ts +0 -0
  584. /package/{src copy → old}/gulp/copy.ts +0 -0
  585. /package/{src copy → old}/gulp/helpers.ts +0 -0
  586. /package/{src copy → old}/gulp/pages.ts +0 -0
  587. /package/{src copy → old}/gulp/pipeline.ts +0 -0
  588. /package/{src copy → old}/gulp/public.ts +0 -0
  589. /package/{src copy → old}/gulp/styles.ts +0 -0
  590. /package/{src copy → old}/gulp/templates.ts +0 -0
  591. /package/{src copy → old}/gulp/types.ts +0 -0
  592. /package/{src copy → old}/gulp/watchers.ts +0 -0
  593. /package/{src copy → old}/index.ts +0 -0
  594. /package/{src copy → old}/init.ts +0 -0
  595. /package/{src copy → old}/models.ts +0 -0
  596. /package/{src copy → old}/prepare.ts +0 -0
  597. /package/{src copy → old}/settings.json +0 -0
  598. /package/{src copy → old}/sync.ts +0 -0
  599. /package/{src copy → old}/types.d.ts +0 -0
  600. /package/src/{models.ts → schemas/tsconfig.ts} +0 -0
@@ -0,0 +1,40 @@
1
+ import chalk from "chalk";
2
+ import { error } from "effect/Brand";
3
+ import { info } from "sass";
4
+
5
+ export const orange = chalk.hex('#FFA500');
6
+ export const blue = chalk.blueBright;
7
+ export const green = chalk.greenBright;
8
+ export const red = chalk.redBright;
9
+ export const yellow = chalk.yellow;
10
+ export const magenta = chalk.magentaBright;
11
+
12
+ export const logger = {
13
+ success: (message: string, ...optionalParams: any[]) => {
14
+ console.log("🐶" + green.underline(' => ' + message + optionalParams.map(param => ' ' + param)), ' ✅');
15
+ },
16
+ info: (message: string, ...optionalParams: any[]) => {
17
+ console.log("🐶" + blue.underline(' => ' + message + optionalParams.map(param => ' ' + param)), ' ℹ️');
18
+ },
19
+ action: (message: string, ...optionalParams: any[]) => {
20
+ console.log("🐕" + blue.underline(' => ' + message + optionalParams.map(param => ' ' + param)));
21
+ },
22
+ exception: (message: string, ...optionalParams: any[]) => {
23
+ console.log("💥" + red(' => ' + message + optionalParams.map(param => ' ' + param)));
24
+ },
25
+ error: (message: string, ...optionalParams: any[]) => {
26
+ console.log("🛑" + red(' => ' + message + optionalParams.map(param => ' ' + param)));
27
+ },
28
+ warning: (message: string, ...optionalParams: any[]) => {
29
+ console.log("⚠️" + orange.underline(' => ' + message + optionalParams.map(param => ' ' + param)));
30
+ },
31
+ alert: (message: string, ...optionalParams: any[]) => {
32
+ console.log("🚨" + yellow.underline(' => ' + message + optionalParams.map(param => ' ' + param)));
33
+ },
34
+ report : (message: string, ...optionalParams: any[]) => {
35
+ console.log("📝" + magenta.underline(' => ' + message + optionalParams.map(param => ' ' + param)));
36
+ },
37
+ kill : (message: string, ...optionalParams: any[]) => {
38
+ console.log("🔪" + red.underline(' => ' + message + optionalParams.map(param => ' ' + param)));
39
+ }
40
+ };
@@ -0,0 +1,24 @@
1
+ import { Effect, Schema } from "effect/index";
2
+ import { Config } from "../config.js";
3
+ import { AppError } from "../error.js";
4
+ import { logger } from "../utils/logger.js";
5
+ import { createSDKClient } from "./client.js";
6
+
7
+ export const wix_sdk_check = Effect.gen(function* (_) {
8
+ const config = yield* Config;
9
+ const wixSDKSettings = config.config.wixSDKSettings;
10
+ if (!wixSDKSettings) return yield* Effect.fail(new AppError({ message: 'Wix SDK settings not found', cause: new Error('Wix SDK settings not found') }));
11
+ const client = yield* createSDKClient;
12
+
13
+ logger.action(`Checking if the SDK is working`);
14
+
15
+ const res = yield* Effect.tryPromise({
16
+ try: () => client.sites.countSites(),
17
+ catch: (e) => {
18
+ return new AppError({ cause: e, message: 'Error checking if the SDK is working' });
19
+ }
20
+ })
21
+ if(res.count) {
22
+ return logger.success(`SDK for site ${wixSDKSettings.siteId} is alive and working!`);
23
+ }
24
+ })
@@ -0,0 +1,18 @@
1
+ import { items, collections } from '@wix/data';
2
+ import { sites } from "@wix/sites";
3
+ import { createClient, ApiKeyStrategy } from '@wix/sdk';
4
+ import { Effect } from 'effect/index';
5
+ import { Config } from '../config.js';
6
+ import { AppError } from '../error.js';
7
+
8
+ export const createSDKClient = Effect.gen(function* (_) {
9
+ const config = yield* Config;
10
+ const wixSDKSettings = config.config.wixSDKSettings;
11
+ if (wixSDKSettings) {
12
+ return createClient({
13
+ modules: { items, collections, sites },
14
+ auth: ApiKeyStrategy(wixSDKSettings),
15
+ });
16
+ }
17
+ return yield* Effect.fail(new AppError({ message: "No API key provided", cause: new Error("No API key provided") }));
18
+ });
@@ -0,0 +1,17 @@
1
+ import { Effect, Schema } from "effect/index"
2
+ import { Config } from "../config.js";
3
+ import { AppError } from "../error.js";
4
+ import { wix_sdk_init } from "./init.js";
5
+
6
+
7
+ export const wix_sdk = Effect.gen(function* (_) {
8
+ const config = yield* Config;
9
+ if(config.config.action.wixSDKAction === undefined) {
10
+ return yield* Effect.fail(new AppError({ message: "No wix-sdk action provided", cause: new Error("No wix-sdk action provided") }));
11
+ }
12
+ if(config.config.action.wixSDKAction === 'init')
13
+ {
14
+ return yield* wix_sdk_init;
15
+ }
16
+ yield* Effect.fail(new AppError({ message: `Unsupported wix-sdk action type: ${config.config.action.syncAction}`, cause: new Error(`Unsupported wix-sdk action type: ${config.config.action.syncAction}`) }));
17
+ })
@@ -0,0 +1,54 @@
1
+ import { Effect, Schema } from "effect/index";
2
+ import { Config } from "../config.js";
3
+ import Enquirer from "enquirer";
4
+ import { AppError } from "../error.js";
5
+ import { writeWixSDKSettings } from "../commands/write.js";
6
+ import { wixSDKSettings } from "../schemas/index.js";
7
+ import { logger } from "../utils/logger.js";
8
+ import { wix_sdk_check } from "./check.js";
9
+
10
+ export const wix_sdk_init = Effect.gen(function* (_) {
11
+ const config = yield* Config;
12
+ const prompter = new Enquirer();
13
+
14
+ const choice = yield* Effect.tryPromise({
15
+ try: () => prompter.prompt([
16
+ {
17
+ type: 'input',
18
+ name: 'siteId',
19
+ message: 'Enter the Wix SDK site ID',
20
+ initial: config.config.wixSDKSettings?.siteId || 'siteId',
21
+ validate: (value: string) => value.trim() !== '' ? true : 'Site ID cannot be empty'
22
+ },
23
+ {
24
+ type: 'input',
25
+ name: 'apiKey',
26
+ message: 'Enter the Wix SDK API key',
27
+ initial: config.config.wixSDKSettings?.apiKey || 'apiKey',
28
+ validate: (value: string) => value.trim() !== '' ? true : 'API key cannot be empty'
29
+ }
30
+ ]),
31
+ catch: (e) => {
32
+ return new AppError({ cause: e, message: 'Error initializing wix-sdk settings' });
33
+ }
34
+ });
35
+
36
+ config.config.wixSDKSettings = yield* Schema.decodeUnknown(wixSDKSettings)(choice)
37
+ yield* writeWixSDKSettings
38
+
39
+ const question = new Enquirer();
40
+ const verify = yield* Effect.tryPromise({
41
+ try: () => question.prompt({
42
+ type: 'confirm',
43
+ name: 'verify',
44
+ message: 'Do you want to verify the wix-sdk settings?',
45
+ }),
46
+ catch: (e) => {
47
+ return new AppError({ cause: e, message: 'Error setting up wix-sdk settings' });
48
+ }
49
+ })
50
+ const verifySDK = yield* Schema.decodeUnknown(Schema.Struct({ verify: Schema.Boolean }))(verify)
51
+ if (verifySDK.verify) yield* wix_sdk_check
52
+
53
+ logger.success(`Velo-sync settings initialized successfully!`);
54
+ })
@@ -0,0 +1,56 @@
1
+ import { Effect, Schema } from "effect/index";
2
+ import { Config } from "../config.js";
3
+ import Enquirer from "enquirer";
4
+ import { AppError } from "../error.js";
5
+ import { writeWixSDKSettings } from "../commands/write.js";
6
+ import { wixSDKSettings } from "../schemas/index.js";
7
+ import { logger } from "../utils/logger.js";
8
+ import { wix_sdk_check } from "./check.js";
9
+
10
+ export const wix_sdk_run = (program: Effect.Effect<never, AppError, never>) => {
11
+ return Effect.gen(function* (_) {
12
+ const config = yield* Config;
13
+ const prompter = new Enquirer();
14
+
15
+ const choice = yield* Effect.tryPromise({
16
+ try: () => prompter.prompt([
17
+ {
18
+ type: 'input',
19
+ name: 'siteId',
20
+ message: 'Enter the Wix SDK site ID',
21
+ initial: config.config.wixSDKSettings?.siteId || 'siteId',
22
+ validate: (value: string) => value.trim() !== '' ? true : 'Site ID cannot be empty'
23
+ },
24
+ {
25
+ type: 'input',
26
+ name: 'apiKey',
27
+ message: 'Enter the Wix SDK API key',
28
+ initial: config.config.wixSDKSettings?.apiKey || 'apiKey',
29
+ validate: (value: string) => value.trim() !== '' ? true : 'API key cannot be empty'
30
+ }
31
+ ]),
32
+ catch: (e) => {
33
+ return new AppError({ cause: e, message: 'Error initializing wix-sdk settings' });
34
+ }
35
+ });
36
+
37
+ config.config.wixSDKSettings = yield* Schema.decodeUnknown(wixSDKSettings)(choice)
38
+ yield* writeWixSDKSettings
39
+
40
+ const question = new Enquirer();
41
+ const verify = yield* Effect.tryPromise({
42
+ try: () => question.prompt({
43
+ type: 'confirm',
44
+ name: 'verify',
45
+ message: 'Do you want to verify the wix-sdk settings?',
46
+ }),
47
+ catch: (e) => {
48
+ return new AppError({ cause: e, message: 'Error setting up wix-sdk settings' });
49
+ }
50
+ })
51
+ const verifySDK = yield* Schema.decodeUnknown(Schema.Struct({ verify: Schema.Boolean }))(verify)
52
+ if (verifySDK.verify) yield* wix_sdk_check
53
+
54
+ logger.success(`Velo-sync settings initialized successfully!`);
55
+ })
56
+ }
@@ -0,0 +1,6 @@
1
+ import syncTask from 'velo-sync/dist/tasks/sync-task.js';
2
+ import { MigrateFileCache, SyncTaskType } from "../schemas/types";
3
+ import migrateFileCache from 'velo-sync/dist/tasks/migrate-files-cache-task.js';
4
+
5
+ export const runSyncTask = (syncTask as unknown as { default: SyncTaskType }).default;
6
+ export const migrateFileCacheTask = (migrateFileCache as unknown as { default: MigrateFileCache }).default;
@@ -0,0 +1,19 @@
1
+ import { Effect, Schema } from "effect/index";
2
+ import { Config } from "../config.js";
3
+ import Enquirer from "enquirer";
4
+ import { AppError } from "../error.js";
5
+ import { logger } from "../utils/logger.js";
6
+ import veloAPI from 'velo-sync/dist/velo/velo-api.js';
7
+
8
+ export const exportData = Effect.gen(function* (_) {
9
+ const config = yield* Config;
10
+ const veloSyncSettings = config.config.veloSyncSettings;
11
+ if (!veloSyncSettings) return yield* Effect.fail(new AppError({ message: 'Velo-sync settings not found', cause: new Error('Velo-sync settings not found') }));
12
+
13
+ logger.action(`Exporting data for site ${veloSyncSettings.siteUrl}...`);
14
+
15
+ logger.warning('Not implemented yet, please use the Velo Sync CLI for now.');
16
+
17
+ // logger.success(`Data for site ${veloSyncSettings.siteUrl} exported successfully!`);
18
+ return
19
+ })
@@ -0,0 +1,27 @@
1
+ import { Effect, Schema } from "effect/index";
2
+ import { Config } from "../config.js";
3
+ import { AppError } from "../error.js";
4
+ import { logger } from "../utils/logger.js";
5
+ import { runSyncTask } from "./client.js";
6
+
7
+ export const importData = Effect.gen(function* (_) {
8
+ const config = yield* Config;
9
+ const veloSyncSettings = config.config.veloSyncSettings;
10
+ if (!veloSyncSettings) return yield* Effect.fail(new AppError({ message: 'Velo-sync settings not found', cause: new Error('Velo-sync settings not found') }));
11
+
12
+ logger.action(`Importing data for site ${veloSyncSettings.siteUrl}...`);
13
+ let filename = config.config.veloSyncArguments?.data || '';
14
+ let collection = config.config.veloSyncArguments?.collection || '';
15
+ let schema = config.config.veloSyncArguments?.schema || '';
16
+ let dryrun = config.config.veloSyncArguments?.dry || false;
17
+ let importOnly = true
18
+ const res = yield* Effect.tryPromise({
19
+ try: () => runSyncTask(filename, collection, schema, importOnly, dryrun),
20
+ catch: (e) => {
21
+ return new AppError({ cause: e, message: 'Error syncing data' });
22
+ }
23
+ })
24
+
25
+ logger.success(`Data for site ${veloSyncSettings.siteUrl} imported successfully!`);
26
+ return
27
+ })
@@ -0,0 +1,36 @@
1
+ import { Effect, Schema } from "effect/index"
2
+ import { Config } from "../config.js";
3
+ import { AppError } from "../error.js";
4
+ import { init } from "./init.js";
5
+ import { sync } from "./sync.js";
6
+ import { migrate } from "./migrate.js";
7
+ import { importData } from "./import.js";
8
+ import { exportData } from "./export.js";
9
+ import { is_alive } from "./is-alive.js";
10
+
11
+
12
+ export const wix_sync = Effect.gen(function* (_) {
13
+ const config = yield* Config;
14
+ if(config.config.action.syncAction === undefined) {
15
+ return yield* Effect.fail(new AppError({ message: "No sync action provided", cause: new Error("No sync action provided") }));
16
+ }
17
+ if(config.config.action.syncAction === 'init') {
18
+ return yield* init;
19
+ }
20
+ if(config.config.action.syncAction === 'sync') {
21
+ return yield* sync;
22
+ }
23
+ if(config.config.action.syncAction === 'migrate') {
24
+ return yield* migrate;
25
+ }
26
+ if(config.config.action.syncAction === 'import') {
27
+ return yield* importData;
28
+ }
29
+ if(config.config.action.syncAction === 'export') {
30
+ return yield* exportData;
31
+ }
32
+ if(config.config.action.syncAction === 'is-alive') {
33
+ return yield* is_alive;
34
+ }
35
+ yield* Effect.fail(new AppError({ message: `Unsupported sync action type: ${config.config.action.syncAction}`, cause: new Error(`Unsupported sync action type: ${config.config.action.syncAction}`) }));
36
+ })
@@ -0,0 +1,77 @@
1
+ import { Effect, Schema } from "effect/index";
2
+ import { Config } from "../config.js";
3
+ import Enquirer from "enquirer";
4
+ import { AppError } from "../error.js";
5
+ import { writeVeloSyncSettings } from "../commands/write.js";
6
+ import { veloSyncSettings } from "../schemas/index.js";
7
+ import { logger } from "../utils/logger.js";
8
+ import { is_alive } from "./is-alive.js";
9
+ import { copySyncFiles } from "../commands/copy.js";
10
+
11
+ export const init = Effect.gen(function* (_) {
12
+ const config = yield* Config;
13
+ const prompter = new Enquirer();
14
+
15
+ const choice = yield* Effect.tryPromise({
16
+ try: () => prompter.prompt([
17
+ {
18
+ type: 'input',
19
+ name: 'siteUrl',
20
+ message: 'Enter a project URL',
21
+ initial: config.config.veloSyncSettings?.siteUrl || 'https://example.com',
22
+ validate: (value: string) => {
23
+ const urlPattern = /^https:\/\/[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
24
+ if (!value.trim()) return 'Project URL cannot be empty';
25
+ if (!urlPattern.test(value.trim())) return 'URL must be in the format https://domain.com';
26
+ return true;
27
+ }
28
+ },
29
+ {
30
+ type: 'input',
31
+ name: 'secret',
32
+ message: 'Enter the velo-sync secret',
33
+ initial: config.config.veloSyncSettings?.secret || 'secret',
34
+ validate: (value: string) => value.trim() !== '' ? true : 'Secret cannot be empty'
35
+ }
36
+ ]),
37
+ catch: (e) => {
38
+ return new AppError({ cause: e, message: 'Error initializing velo-sync settings' });
39
+ }
40
+ });
41
+
42
+ config.config.veloSyncSettings = yield* Schema.decodeUnknown(veloSyncSettings)(choice)
43
+ yield* writeVeloSyncSettings
44
+
45
+ const copyFilesQuestion = new Enquirer();
46
+ const copyFiles = yield* Effect.tryPromise({
47
+ try: () => copyFilesQuestion.prompt({
48
+ type: 'confirm',
49
+ name: 'copyFiles',
50
+ message: 'Do you want to copy the velo-sync files to your project?',
51
+ }),
52
+ catch: (e) => {
53
+ return new AppError({ cause: e, message: 'Error copying velo-sync files' });
54
+ }
55
+ })
56
+ const copy = yield* Schema.decodeUnknown(Schema.Struct({ copyFiles: Schema.Boolean }))(copyFiles)
57
+ if (copy.copyFiles) {
58
+ yield* copySyncFiles
59
+ }
60
+
61
+
62
+ const question = new Enquirer();
63
+ const verify = yield* Effect.tryPromise({
64
+ try: () => question.prompt({
65
+ type: 'confirm',
66
+ name: 'verify',
67
+ message: 'Do you want to verify the velo-sync settings?',
68
+ }),
69
+ catch: (e) => {
70
+ return new AppError({ cause: e, message: 'Error setting up velo-sync settings' });
71
+ }
72
+ })
73
+ const verifySync = yield* Schema.decodeUnknown(Schema.Struct({ verify: Schema.Boolean }))(verify)
74
+ if (verifySync.verify) yield* is_alive
75
+
76
+ logger.success(`Velo-sync settings initialized successfully!`);
77
+ })
@@ -0,0 +1,25 @@
1
+ import { Effect, Schema } from "effect/index";
2
+ import { Config } from "../config.js";
3
+ import Enquirer from "enquirer";
4
+ import { AppError } from "../error.js";
5
+ import { logger } from "../utils/logger.js";
6
+ import veloAPI from 'velo-sync/dist/velo/velo-api.js';
7
+
8
+ export const is_alive = Effect.gen(function* (_) {
9
+ const config = yield* Config;
10
+ const prompter = new Enquirer();
11
+ const veloSyncSettings = config.config.veloSyncSettings;
12
+ if (!veloSyncSettings) return yield* Effect.fail(new AppError({ message: 'Velo-sync settings not found', cause: new Error('Velo-sync settings not found') }));
13
+
14
+ logger.action(`Checking if the API for site ${veloSyncSettings.siteUrl} is alive...`);
15
+
16
+ const res = yield* Effect.tryPromise({
17
+ try: () => veloAPI.isAlive(veloSyncSettings),
18
+ catch: (e) => {
19
+ return new AppError({ cause: e, message: 'Error checking if the API is alive' });
20
+ }
21
+ })
22
+
23
+ logger.success(`API for site ${veloSyncSettings.siteUrl} is alive and working!`);
24
+ return
25
+ })
@@ -0,0 +1,23 @@
1
+ import { Effect, Schema } from "effect/index";
2
+ import { Config } from "../config.js";
3
+ import { AppError } from "../error.js";
4
+ import { logger } from "../utils/logger.js";
5
+ import { migrateFileCacheTask } from "./client.js";
6
+
7
+ export const migrate = Effect.gen(function* (_) {
8
+ const config = yield* Config;
9
+ const veloSyncSettings = config.config.veloSyncSettings;
10
+ if (!veloSyncSettings) return yield* Effect.fail(new AppError({ message: 'Velo-sync settings not found', cause: new Error('Velo-sync settings not found') }));
11
+
12
+ logger.action(`Migrating file cache for site ${veloSyncSettings.siteUrl}...`);
13
+
14
+ const res = yield* Effect.tryPromise({
15
+ try: () => migrateFileCacheTask(),
16
+ catch: (e) => {
17
+ return new AppError({ cause: e, message: 'Error migrating file cache' });
18
+ }
19
+ })
20
+
21
+ logger.success(`File cache for site ${veloSyncSettings.siteUrl} migrated successfully!`);
22
+ return
23
+ })
@@ -0,0 +1,27 @@
1
+ import { Effect, Schema } from "effect/index";
2
+ import { Config } from "../config.js";
3
+ import { AppError } from "../error.js";
4
+ import { logger } from "../utils/logger.js";
5
+ import { runSyncTask } from "./client.js";
6
+
7
+ export const sync = Effect.gen(function* (_) {
8
+ const config = yield* Config;
9
+ const veloSyncSettings = config.config.veloSyncSettings;
10
+ if (!veloSyncSettings) return yield* Effect.fail(new AppError({ message: 'Velo-sync settings not found', cause: new Error('Velo-sync settings not found') }));
11
+
12
+ logger.action(`Syncing data for site ${veloSyncSettings.siteUrl}...`);
13
+ let filename = config.config.veloSyncArguments?.data || '';
14
+ let collection = config.config.veloSyncArguments?.collection || '';
15
+ let schema = config.config.veloSyncArguments?.schema || '';
16
+ let dryrun = config.config.veloSyncArguments?.dry || false;
17
+ let importOnly = false
18
+ const res = yield* Effect.tryPromise({
19
+ try: () => runSyncTask(filename, collection, schema, importOnly, dryrun),
20
+ catch: (e) => {
21
+ return new AppError({ cause: e, message: 'Error syncing data' });
22
+ }
23
+ })
24
+
25
+ logger.success(`Data for site ${veloSyncSettings.siteUrl} synced successfully!`);
26
+ return
27
+ })
package/tsconfig.json CHANGED
@@ -14,6 +14,7 @@
14
14
  "declaration": true,
15
15
  "strict": true,
16
16
  "noEmitOnError": false,
17
+ "sourceMap": true,
17
18
  "strictNullChecks": true,
18
19
  "noImplicitAny": true,
19
20
  "noImplicitReturns": true,
@@ -24,10 +25,10 @@
24
25
  "strictPropertyInitialization": true,
25
26
  "experimentalDecorators": true,
26
27
  "esModuleInterop": true,
27
- "resolveJsonModule": true,
28
+ "resolveJsonModule": true
28
29
  },
29
- "exclude": ["../node_modules"],
30
- "include":[
31
- "src/**/*.ts"
32
- ],
30
+ "exclude": ["node_modules", "old/**/*", "files/**/*", "dist/**/*"],
31
+ "include": [
32
+ "src/**/*.ts",
33
+ ]
33
34
  }
package/files/expo/.env DELETED
@@ -1 +0,0 @@
1
- EXPO_PUBLIC_WIX_CLIENT_ID=
@@ -1,45 +0,0 @@
1
- import { Tabs } from 'expo-router';
2
- import React from 'react';
3
- import { Platform } from 'react-native';
4
-
5
- import { HapticTab } from '@/components/HapticTab';
6
- import { IconSymbol } from '@/components/ui/IconSymbol';
7
- import TabBarBackground from '@/components/ui/TabBarBackground.ios';
8
- import { Colors } from '@/constants/Colors';
9
- import { useColorScheme } from '@/hooks/useColorSchemeRN';
10
-
11
- export default function TabLayout() {
12
- const colorScheme = useColorScheme();
13
-
14
- return (
15
- <Tabs
16
- screenOptions={{
17
- tabBarActiveTintColor: Colors[colorScheme ?? 'light'].tint,
18
- headerShown: false,
19
- tabBarButton: HapticTab,
20
- tabBarBackground: TabBarBackground,
21
- tabBarStyle: Platform.select({
22
- ios: {
23
- // Use a transparent background on iOS to show the blur effect
24
- position: 'absolute',
25
- },
26
- default: {},
27
- }),
28
- }}>
29
- <Tabs.Screen
30
- name="index"
31
- options={{
32
- title: 'Home',
33
- tabBarIcon: ({ color }) => <IconSymbol size={28} name="house.fill" color={color} />,
34
- }}
35
- />
36
- <Tabs.Screen
37
- name="explore"
38
- options={{
39
- title: 'Explore',
40
- tabBarIcon: ({ color }) => <IconSymbol size={28} name="paperplane.fill" color={color} />,
41
- }}
42
- />
43
- </Tabs>
44
- );
45
- }
@@ -1,45 +0,0 @@
1
- import '@/global.css';
2
- import "@/lib/utils/polyfills";
3
-
4
- import { NAV_THEME } from '@/constants/theme';
5
- import { useColorScheme } from '@/hooks/useColorScheme';
6
- import { DarkTheme, DefaultTheme, Theme, ThemeProvider } from '@react-navigation/native';
7
- import { Stack } from 'expo-router';
8
- import { StatusBar } from 'expo-status-bar';
9
- import * as React from 'react';
10
- import { Platform } from 'react-native';
11
- const LIGHT_THEME: Theme = {
12
- ...DefaultTheme,
13
- colors: NAV_THEME.light,
14
- };
15
- const DARK_THEME: Theme = {
16
- ...DarkTheme,
17
- colors: NAV_THEME.dark,
18
- };
19
- export { ErrorBoundary } from 'expo-router';
20
- export default function RootLayout() {
21
- const hasMounted = React.useRef(false);
22
- const { colorScheme, isDarkColorScheme } = useColorScheme();
23
- const [isColorSchemeLoaded, setIsColorSchemeLoaded] = React.useState(false);
24
- useIsomorphicLayoutEffect(() => {
25
- if (hasMounted.current) {
26
- return;
27
- }
28
- if (Platform.OS === 'web') {
29
- // Adds the background color to the html element to prevent white background on overscroll.
30
- document.documentElement.classList.add('bg-background');
31
- }
32
- setIsColorSchemeLoaded(true);
33
- hasMounted.current = true;
34
- }, []);
35
- if (!isColorSchemeLoaded) {
36
- return null;
37
- }
38
- return (
39
- <ThemeProvider value={isDarkColorScheme ? DARK_THEME : LIGHT_THEME}>
40
- <StatusBar style={isDarkColorScheme ? 'light' : 'dark'} />
41
- <Stack />
42
- </ThemeProvider>
43
- );
44
- }
45
- const useIsomorphicLayoutEffect = Platform.OS === 'web' && typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;
@@ -1,9 +0,0 @@
1
- module.exports = function(api) {
2
- api.cache(true);
3
-
4
- return {
5
- presets: [["babel-preset-expo", {
6
- jsxImportSource: "nativewind"
7
- }], "nativewind/babel"],
8
- };
9
- };
@@ -1,27 +0,0 @@
1
- /**
2
- * Below are the colors that are used in the app. The colors are defined in the light and dark mode.
3
- * There are many other ways to style your app. For example, [Nativewind](https://www.nativewind.dev/), [Tamagui](https://tamagui.dev/), [unistyles](https://reactnativeunistyles.vercel.app), etc.
4
- */
5
-
6
- const tintColorLight = '#0a7ea4';
7
- const tintColorDark = '#fff';
8
-
9
- export const Colors = {
10
- light: {
11
- text: '#11181C',
12
- background: '#fff',
13
- tint: tintColorLight,
14
- icon: '#687076',
15
- tabIconDefault: '#687076',
16
- tabIconSelected: tintColorLight,
17
- },
18
- dark: {
19
- text: '#ECEDEE',
20
- background: '#151718',
21
- tint: tintColorDark,
22
- icon: '#9BA1A6',
23
- tabIconDefault: '#9BA1A6',
24
- tabIconSelected: tintColorDark,
25
- },
26
- };
27
-
@@ -1,18 +0,0 @@
1
- export const NAV_THEME = {
2
- light: {
3
- background: 'hsl(0 0% 100%)', // background
4
- border: 'hsl(240 5.9% 90%)', // border
5
- card: 'hsl(0 0% 100%)', // card
6
- notification: 'hsl(0 84.2% 60.2%)', // destructive
7
- primary: 'hsl(240 5.9% 10%)', // primary
8
- text: 'hsl(240 10% 3.9%)', // foreground
9
- },
10
- dark: {
11
- background: 'hsl(240 10% 3.9%)', // background
12
- border: 'hsl(240 3.7% 15.9%)', // border
13
- card: 'hsl(240 10% 3.9%)', // card
14
- notification: 'hsl(0 72% 51%)', // destructive
15
- primary: 'hsl(0 0% 98%)', // primary
16
- text: 'hsl(0 0% 98%)', // foreground
17
- },
18
- };
@@ -1,11 +0,0 @@
1
- import { useColorScheme as useNativewindColorScheme } from 'nativewind';
2
-
3
- export function useColorScheme() {
4
- const { colorScheme, setColorScheme, toggleColorScheme } = useNativewindColorScheme();
5
- return {
6
- colorScheme: colorScheme ?? 'dark',
7
- isDarkColorScheme: colorScheme === 'dark',
8
- setColorScheme,
9
- toggleColorScheme,
10
- };
11
- }