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

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 (464) 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 +18 -5
  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 +5 -0
  17. package/dist/commands/copy.js +12 -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/git.d.ts +8 -0
  29. package/dist/commands/git.js +104 -0
  30. package/dist/commands/git.js.map +1 -0
  31. package/dist/commands/home.d.ts +4 -0
  32. package/dist/commands/home.js +18 -0
  33. package/dist/commands/home.js.map +1 -0
  34. package/dist/commands/install.d.ts +8 -0
  35. package/dist/commands/install.js +110 -0
  36. package/dist/commands/install.js.map +1 -0
  37. package/dist/commands/read.d.ts +5 -0
  38. package/dist/commands/read.js +34 -0
  39. package/dist/commands/read.js.map +1 -0
  40. package/dist/commands/write.d.ts +5 -0
  41. package/dist/commands/write.js +16 -0
  42. package/dist/commands/write.js.map +1 -0
  43. package/dist/commands.js +1 -0
  44. package/dist/commands.js.map +1 -0
  45. package/dist/config.d.ts +11 -6
  46. package/dist/config.js +40 -4
  47. package/dist/config.js.map +1 -0
  48. package/dist/error.d.ts +1 -9
  49. package/dist/error.js +1 -2
  50. package/dist/error.js.map +1 -0
  51. package/dist/gulp/backend.d.ts +3 -0
  52. package/dist/gulp/backend.js +92 -0
  53. package/dist/gulp/backend.js.map +1 -0
  54. package/dist/gulp/checks.d.ts +3 -0
  55. package/dist/gulp/checks.js +194 -0
  56. package/dist/gulp/checks.js.map +1 -0
  57. package/dist/gulp/clean.d.ts +3 -0
  58. package/dist/gulp/clean.js +33 -0
  59. package/dist/gulp/clean.js.map +1 -0
  60. package/dist/gulp/copy.d.ts +2 -0
  61. package/dist/gulp/copy.js +34 -0
  62. package/dist/gulp/copy.js.map +1 -0
  63. package/dist/gulp/helpers.d.ts +2 -0
  64. package/dist/gulp/helpers.js +21 -0
  65. package/dist/gulp/helpers.js.map +1 -0
  66. package/dist/gulp/pages.d.ts +2 -0
  67. package/dist/gulp/pages.js +39 -0
  68. package/dist/gulp/pages.js.map +1 -0
  69. package/dist/gulp/pipeline.d.ts +1 -0
  70. package/dist/gulp/pipeline.js +29 -0
  71. package/dist/gulp/pipeline.js.map +1 -0
  72. package/dist/gulp/public.d.ts +2 -0
  73. package/dist/gulp/public.js +50 -0
  74. package/dist/gulp/public.js.map +1 -0
  75. package/dist/gulp/styles.d.ts +2 -0
  76. package/dist/gulp/styles.js +40 -0
  77. package/dist/gulp/styles.js.map +1 -0
  78. package/dist/gulp/templates.d.ts +2 -0
  79. package/dist/gulp/templates.js +33 -0
  80. package/dist/gulp/templates.js.map +1 -0
  81. package/dist/gulp/types.d.ts +4 -0
  82. package/dist/gulp/types.js +289 -0
  83. package/dist/gulp/types.js.map +1 -0
  84. package/dist/gulp/watchers.d.ts +9 -0
  85. package/dist/gulp/watchers.js +57 -0
  86. package/dist/gulp/watchers.js.map +1 -0
  87. package/dist/helpers.js +1 -0
  88. package/dist/helpers.js.map +1 -0
  89. package/dist/index.js +38 -7
  90. package/dist/index.js.map +1 -0
  91. package/dist/init/blocks.d.ts +5 -0
  92. package/dist/init/blocks.js +60 -0
  93. package/dist/init/blocks.js.map +1 -0
  94. package/dist/init/cargo copy.d.ts +2 -0
  95. package/dist/init/cargo copy.js +16 -0
  96. package/dist/init/cargo copy.js.map +1 -0
  97. package/dist/init/cargo.d.ts +2 -0
  98. package/dist/init/cargo.js +19 -0
  99. package/dist/init/cargo.js.map +1 -0
  100. package/dist/init/expo copy.d.ts +5 -0
  101. package/dist/init/expo copy.js +48 -0
  102. package/dist/init/expo copy.js.map +1 -0
  103. package/dist/init/expo.d.ts +5 -0
  104. package/dist/init/expo.js +50 -0
  105. package/dist/init/expo.js.map +1 -0
  106. package/dist/init/gitModules.d.ts +2 -0
  107. package/dist/init/gitModules.js +13 -0
  108. package/dist/init/gitModules.js.map +1 -0
  109. package/dist/init/index.d.ts +4 -0
  110. package/dist/init/index.js +64 -0
  111. package/dist/init/index.js.map +1 -0
  112. package/dist/init/lucy.d.ts +1 -0
  113. package/dist/init/lucy.js +2 -0
  114. package/dist/init/monorepo copy.d.ts +4 -0
  115. package/dist/init/monorepo copy.js +28 -0
  116. package/dist/init/monorepo copy.js.map +1 -0
  117. package/dist/init/monorepo.d.ts +4 -0
  118. package/dist/init/monorepo.js +35 -0
  119. package/dist/init/monorepo.js.map +1 -0
  120. package/dist/init/prepare.d.ts +8 -0
  121. package/dist/init/prepare.js +20 -0
  122. package/dist/init/prepare.js.map +1 -0
  123. package/dist/init/prepareVelo.d.ts +2 -0
  124. package/dist/init/prepareVelo.js +16 -0
  125. package/dist/init/prepareVelo.js.map +1 -0
  126. package/dist/init/sync.d.ts +2 -0
  127. package/dist/init/sync.js +88 -0
  128. package/dist/init/sync.js.map +1 -0
  129. package/dist/init/tauri.d.ts +5 -0
  130. package/dist/init/tauri.js +29 -0
  131. package/dist/init/tauri.js.map +1 -0
  132. package/dist/init/templates.d.ts +5 -0
  133. package/dist/init/templates.js +94 -0
  134. package/dist/init/templates.js.map +1 -0
  135. package/dist/init/velo.d.ts +5 -0
  136. package/dist/init/velo.js +58 -0
  137. package/dist/init/velo.js.map +1 -0
  138. package/dist/init/write.d.ts +5 -0
  139. package/dist/init/write.js +15 -0
  140. package/dist/models.js +1 -0
  141. package/dist/models.js.map +1 -0
  142. package/dist/policy.js +1 -0
  143. package/dist/policy.js.map +1 -0
  144. package/dist/prepare.js +1 -0
  145. package/dist/prepare.js.map +1 -0
  146. package/dist/runtime.d.ts +1 -1
  147. package/dist/runtime.js +1 -0
  148. package/dist/runtime.js.map +1 -0
  149. package/dist/schemas/gulp.d.ts +16 -0
  150. package/dist/schemas/gulp.js +4 -0
  151. package/dist/schemas/gulp.js.map +1 -0
  152. package/dist/schemas/index.js +1 -0
  153. package/dist/schemas/index.js.map +1 -0
  154. package/dist/schemas/lucy.d.ts +26 -0
  155. package/dist/schemas/lucy.js +39 -0
  156. package/dist/schemas/lucy.js.map +1 -0
  157. package/dist/schemas/models.d.ts +37 -0
  158. package/dist/schemas/models.js +2 -0
  159. package/dist/schemas/models.js.map +1 -0
  160. package/dist/schemas/tsconfig.d.ts +37 -0
  161. package/dist/schemas/tsconfig.js +2 -0
  162. package/dist/schemas/tsconfig.js.map +1 -0
  163. package/dist/schemas/types.d.ts +15 -0
  164. package/dist/schemas/types.js +3 -1
  165. package/dist/schemas/types.js.map +1 -0
  166. package/dist/states.js +1 -0
  167. package/dist/states.js.map +1 -0
  168. package/dist/sync/index.js +2 -0
  169. package/dist/sync/index.js.map +1 -0
  170. package/dist/sync/sync.js +88 -0
  171. package/dist/sync/sync.js.map +1 -0
  172. package/dist/tasks/Gulpfile.d.ts +35 -0
  173. package/dist/tasks/Gulpfile.js +135 -0
  174. package/dist/tasks/Gulpfile.js.map +1 -0
  175. package/dist/tasks/gulp/backend.d.ts +3 -0
  176. package/dist/tasks/gulp/backend.js +92 -0
  177. package/dist/tasks/gulp/backend.js.map +1 -0
  178. package/dist/tasks/gulp/checks.d.ts +3 -0
  179. package/dist/tasks/gulp/checks.js +195 -0
  180. package/dist/tasks/gulp/checks.js.map +1 -0
  181. package/dist/tasks/gulp/clean.d.ts +3 -0
  182. package/dist/tasks/gulp/clean.js +33 -0
  183. package/dist/tasks/gulp/clean.js.map +1 -0
  184. package/dist/tasks/gulp/copy.d.ts +2 -0
  185. package/dist/tasks/gulp/copy.js +34 -0
  186. package/dist/tasks/gulp/copy.js.map +1 -0
  187. package/dist/tasks/gulp/helpers.d.ts +2 -0
  188. package/dist/tasks/gulp/helpers.js +21 -0
  189. package/dist/tasks/gulp/helpers.js.map +1 -0
  190. package/dist/tasks/gulp/pages.d.ts +2 -0
  191. package/dist/tasks/gulp/pages.js +39 -0
  192. package/dist/tasks/gulp/pages.js.map +1 -0
  193. package/dist/tasks/gulp/pipeline.d.ts +1 -0
  194. package/dist/tasks/gulp/pipeline.js +29 -0
  195. package/dist/tasks/gulp/pipeline.js.map +1 -0
  196. package/dist/tasks/gulp/public.d.ts +2 -0
  197. package/dist/tasks/gulp/public.js +50 -0
  198. package/dist/tasks/gulp/public.js.map +1 -0
  199. package/dist/tasks/gulp/styles.d.ts +2 -0
  200. package/dist/tasks/gulp/styles.js +40 -0
  201. package/dist/tasks/gulp/styles.js.map +1 -0
  202. package/dist/tasks/gulp/templates.d.ts +2 -0
  203. package/dist/tasks/gulp/templates.js +45 -0
  204. package/dist/tasks/gulp/templates.js.map +1 -0
  205. package/dist/tasks/gulp/types.d.ts +4 -0
  206. package/dist/tasks/gulp/types.js +300 -0
  207. package/dist/tasks/gulp/types.js.map +1 -0
  208. package/dist/tasks/gulp/watchers.d.ts +9 -0
  209. package/dist/tasks/gulp/watchers.js +57 -0
  210. package/dist/tasks/gulp/watchers.js.map +1 -0
  211. package/dist/tasks/index.d.ts +4 -0
  212. package/dist/tasks/index.js +25 -0
  213. package/dist/tasks/index.js.map +1 -0
  214. package/dist/tasks/sync.d.ts +2 -0
  215. package/dist/tasks/sync.js +88 -0
  216. package/dist/tasks/sync.js.map +1 -0
  217. package/dist/utils/index.js +2 -0
  218. package/dist/utils/index.js.map +1 -0
  219. package/dist/utils/install.js +1 -0
  220. package/dist/utils/logger.d.ts +17 -0
  221. package/dist/utils/logger.js +37 -0
  222. package/dist/utils/logger.js.map +1 -0
  223. package/files/templates/block[D]/files/.stylelintrc.js +8 -0
  224. package/files/templates/block[D]/lucy.json +8 -0
  225. package/files/templates/cargo[D]/files/.env +1 -0
  226. package/files/templates/cargo[D]/files/Cargo.toml +238 -0
  227. package/files/templates/cargo[D]/files/Makefile.toml +4 -0
  228. package/files/templates/cargo[D]/files/build/main.rs +35 -0
  229. package/files/templates/cargo[D]/files/config/beta.json +19 -0
  230. package/files/templates/cargo[D]/files/config/ci.json +15 -0
  231. package/files/templates/cargo[D]/files/config/default.json +71 -0
  232. package/files/templates/cargo[D]/files/config/development.json +10 -0
  233. package/files/templates/cargo[D]/files/config/produktion.json +5 -0
  234. package/files/templates/cargo[D]/files/config/stage.json +4 -0
  235. package/files/templates/cargo[D]/files/locales/todo.yml +3 -0
  236. package/files/templates/cargo[D]/files/public/index.html +1 -0
  237. package/files/templates/cargo[D]/lucy.json +14 -0
  238. package/files/templates/expo[D]/files/.stylelintrc.js +8 -0
  239. package/files/templates/expo[D]/lucy.json +81 -0
  240. package/files/templates/monorepo[D]/files/.nvmrc +1 -0
  241. package/files/templates/monorepo[D]/files/.prettierignore +23 -0
  242. package/files/templates/monorepo[D]/files/.prettierrc.json +15 -0
  243. package/files/templates/monorepo[D]/files/.stylelintrc.js +8 -0
  244. package/files/templates/monorepo[D]/files/.yarnrc +1 -0
  245. package/files/templates/monorepo[D]/files/.yarnrc.yml +3 -0
  246. package/files/templates/monorepo[D]/files/README.md +137 -0
  247. package/files/templates/monorepo[D]/files/currents.config.ts +5 -0
  248. package/files/templates/monorepo[D]/files/package.json +39 -0
  249. package/files/templates/monorepo[D]/files/turbo.json +34 -0
  250. package/files/templates/monorepo[D]/files/typedoc.json +25 -0
  251. package/files/templates/monorepo[D]/files/vitest.config.ts +27 -0
  252. package/files/templates/monorepo[D]/lucy.json +45 -0
  253. package/files/templates/tauri[D]/lucy.json +8 -0
  254. package/files/templates/velo[D]/files/.prettierignore +23 -0
  255. package/files/templates/velo[D]/files/.prettierrc.js +16 -0
  256. package/files/templates/velo[D]/files/typescript/__mocks__/.gitkeep +0 -0
  257. package/files/templates/velo[D]/files/typescript/backend/data.ts +0 -0
  258. package/files/templates/velo[D]/files/typescript/backend/events.ts +0 -0
  259. package/files/templates/velo[D]/files/typescript/pages/.gitkeep +0 -0
  260. package/files/templates/velo[D]/files/typescript/public/.gitkeep +0 -0
  261. package/files/templates/velo[D]/files/typescript/public/scss/app.scss +0 -0
  262. package/files/templates/velo[D]/files/typescript/styles/.gitkeep +0 -0
  263. package/files/templates/velo[D]/files/typescript/styles/global.scss +0 -0
  264. package/files/templates/velo[D]/lucy.json +136 -0
  265. package/old/Gulpfile.d.ts +34 -0
  266. package/old/Gulpfile.js +116 -0
  267. package/old/Gulpfile.js.map +1 -0
  268. package/old/gulp/backend.d.ts +3 -0
  269. package/old/gulp/backend.js +92 -0
  270. package/old/gulp/backend.js.map +1 -0
  271. package/old/gulp/checks.d.ts +3 -0
  272. package/old/gulp/checks.js +205 -0
  273. package/old/gulp/checks.js.map +1 -0
  274. package/old/gulp/clean.d.ts +3 -0
  275. package/old/gulp/clean.js +29 -0
  276. package/old/gulp/clean.js.map +1 -0
  277. package/old/gulp/copy.d.ts +2 -0
  278. package/old/gulp/copy.js +34 -0
  279. package/old/gulp/copy.js.map +1 -0
  280. package/old/gulp/helpers.d.ts +2 -0
  281. package/old/gulp/helpers.js +25 -0
  282. package/old/gulp/helpers.js.map +1 -0
  283. package/old/gulp/pages.d.ts +2 -0
  284. package/old/gulp/pages.js +37 -0
  285. package/old/gulp/pages.js.map +1 -0
  286. package/old/gulp/pipeline.d.ts +1 -0
  287. package/old/gulp/pipeline.js +29 -0
  288. package/old/gulp/pipeline.js.map +1 -0
  289. package/old/gulp/public.d.ts +2 -0
  290. package/old/gulp/public.js +50 -0
  291. package/old/gulp/public.js.map +1 -0
  292. package/old/gulp/styles.d.ts +2 -0
  293. package/old/gulp/styles.js +40 -0
  294. package/old/gulp/styles.js.map +1 -0
  295. package/old/gulp/templates.d.ts +2 -0
  296. package/old/gulp/templates.js +33 -0
  297. package/old/gulp/templates.js.map +1 -0
  298. package/old/gulp/types.d.ts +4 -0
  299. package/old/gulp/types.js +289 -0
  300. package/old/gulp/types.js.map +1 -0
  301. package/old/gulp/watchers.d.ts +9 -0
  302. package/old/gulp/watchers.js +59 -0
  303. package/old/gulp/watchers.js.map +1 -0
  304. package/old/helpers.d.ts +32 -0
  305. package/old/helpers.js +267 -0
  306. package/old/helpers.js.map +1 -0
  307. package/{src copy/helpers.ts → old/helpers.ts} +1 -1
  308. package/old/index.d.ts +59 -0
  309. package/old/index.js +288 -0
  310. package/old/index.js.map +1 -0
  311. package/old/init.d.ts +8 -0
  312. package/old/init.js +165 -0
  313. package/old/init.js.map +1 -0
  314. package/old/models.d.ts +37 -0
  315. package/old/models.js +2 -0
  316. package/old/models.js.map +1 -0
  317. package/old/prepare.d.ts +8 -0
  318. package/old/prepare.js +20 -0
  319. package/old/prepare.js.map +1 -0
  320. package/old/schemas/index.d.ts +0 -0
  321. package/old/schemas/index.js +2 -0
  322. package/old/schemas/index.js.map +1 -0
  323. package/old/schemas/index.ts +0 -0
  324. package/old/schemas/types.d.ts +0 -0
  325. package/old/schemas/types.js +2 -0
  326. package/old/schemas/types.js.map +1 -0
  327. package/old/schemas/types.ts +0 -0
  328. package/old/sync.d.ts +2 -0
  329. package/old/sync.js +88 -0
  330. package/old/sync.js.map +1 -0
  331. package/package.json +3 -6
  332. package/src/args.ts +18 -17
  333. package/src/commands/checks.ts +51 -0
  334. package/src/commands/cleanup.ts +11 -0
  335. package/src/commands/copy.ts +16 -0
  336. package/src/commands/edit.ts +83 -0
  337. package/src/commands/exec.ts +37 -0
  338. package/src/commands/git.ts +113 -0
  339. package/src/commands/home.ts +22 -0
  340. package/src/commands/install.ts +186 -0
  341. package/src/commands/read.ts +37 -0
  342. package/src/commands/write.ts +24 -0
  343. package/src/config.ts +50 -10
  344. package/src/error.ts +1 -2
  345. package/src/index.ts +45 -9
  346. package/src/init/blocks.ts +82 -0
  347. package/src/init/cargo.ts +22 -0
  348. package/src/init/expo.ts +66 -0
  349. package/src/init/gitModules.ts +15 -0
  350. package/src/init/index.ts +69 -0
  351. package/src/init/monorepo.ts +39 -0
  352. package/src/init/prepareVelo.ts +19 -0
  353. package/src/init/tauri.ts +40 -0
  354. package/src/init/templates.ts +99 -0
  355. package/src/init/velo.ts +62 -0
  356. package/src/runtime.ts +1 -0
  357. package/src/schemas/gulp.ts +23 -0
  358. package/src/schemas/lucy.ts +39 -0
  359. package/src/schemas/types.ts +20 -0
  360. package/src/sync/index.ts +0 -0
  361. package/src/sync/sync.ts +96 -0
  362. package/src/tasks/Gulpfile.ts +252 -0
  363. package/src/tasks/gulp/backend.ts +112 -0
  364. package/src/tasks/gulp/checks.ts +214 -0
  365. package/src/tasks/gulp/clean.ts +38 -0
  366. package/src/tasks/gulp/copy.ts +43 -0
  367. package/src/tasks/gulp/helpers.ts +25 -0
  368. package/src/tasks/gulp/pages.ts +43 -0
  369. package/src/tasks/gulp/pipeline.ts +32 -0
  370. package/src/tasks/gulp/public.ts +60 -0
  371. package/src/tasks/gulp/styles.ts +46 -0
  372. package/src/tasks/gulp/templates.ts +53 -0
  373. package/src/tasks/gulp/types.ts +317 -0
  374. package/src/tasks/gulp/watchers.ts +100 -0
  375. package/src/tasks/index.ts +32 -0
  376. package/src/types.d.ts +1 -1
  377. package/src/utils/index.ts +0 -0
  378. package/src/utils/logger.ts +40 -0
  379. package/tsconfig.json +6 -5
  380. package/files/expo/lucy.json +0 -8
  381. package/src/init.ts +0 -392
  382. /package/{files/expo/components/.gitkeep → .turbo/cookies/1.cookie} +0 -0
  383. /package/{files/expo/components/ui/.gitkeep → .turbo/cookies/2.cookie} +0 -0
  384. /package/{files/velo/.gitmodules → .turbo/cookies/3.cookie} +0 -0
  385. /package/{files/velo/typescript/__mocks__/.gitkeep → .turbo/cookies/4.cookie} +0 -0
  386. /package/{files/velo/typescript/backend/data.ts → .turbo/cookies/5.cookie} +0 -0
  387. /package/{files/velo/typescript/backend/events.ts → .turbo/daemon/ee24a4f4ab6aa3c0-turbo.log.2025-07-31} +0 -0
  388. /package/{files/velo/typescript/pages/.gitkeep → dist/sync/index.d.ts} +0 -0
  389. /package/{files/velo/typescript/public/.gitkeep → dist/sync/sync.d.ts} +0 -0
  390. /package/{files/velo/typescript/public/scss/app.scss → dist/utils/index.d.ts} +0 -0
  391. /package/{files/velo/typescript/styles/.gitkeep → dist/utils/install.d.ts} +0 -0
  392. /package/files/{expo → templates/expo[D]/files}/.nvmrc +0 -0
  393. /package/files/{expo → templates/expo[D]/files}/.prettierignore +0 -0
  394. /package/files/{expo → templates/expo[D]/files}/.prettierrc.js +0 -0
  395. /package/files/{expo → templates/expo[D]/files}/.yarnrc +0 -0
  396. /package/files/{expo → templates/expo[D]/files}/.yarnrc.yml +0 -0
  397. /package/files/{expo → templates/expo[D]/files}/README.md +0 -0
  398. /package/files/{expo → templates/expo[D]/files}/assets/fonts/SpaceMono-Regular.ttf +0 -0
  399. /package/files/{expo → templates/expo[D]/files}/assets/images/adaptive-icon.png +0 -0
  400. /package/files/{expo → templates/expo[D]/files}/assets/images/favicon.png +0 -0
  401. /package/files/{expo → templates/expo[D]/files}/assets/images/icon.png +0 -0
  402. /package/files/{expo → templates/expo[D]/files}/assets/images/splash-icon.png +0 -0
  403. /package/files/{expo → templates/expo[D]/files}/babel.config.js +0 -0
  404. /package/files/{velo/typescript/styles/global.scss → templates/expo[D]/files/components/.gitkeep} +0 -0
  405. /package/{src copy/schemas/index.ts → files/templates/expo[D]/files/components/ui/.gitkeep} +0 -0
  406. /package/files/{expo → templates/expo[D]/files}/constants/theme.ts +0 -0
  407. /package/files/{expo → templates/expo[D]/files}/eas.json +0 -0
  408. /package/files/{expo → templates/expo[D]/files}/eslint.config.mjs +0 -0
  409. /package/files/{expo → templates/expo[D]/files}/global.css +0 -0
  410. /package/files/{expo → templates/expo[D]/files}/hooks/useColorScheme.ts +0 -0
  411. /package/files/{expo → templates/expo[D]/files}/index.ts +0 -0
  412. /package/files/{expo → templates/expo[D]/files}/lib/data.ts +0 -0
  413. /package/files/{expo → templates/expo[D]/files}/lib/utils/index.ts +0 -0
  414. /package/files/{expo → templates/expo[D]/files}/lib/utils/polyfills.ts +0 -0
  415. /package/files/{expo → templates/expo[D]/files}/lib/wix/client.ts +0 -0
  416. /package/files/{expo → templates/expo[D]/files}/lib/wix/error.ts +0 -0
  417. /package/files/{expo → templates/expo[D]/files}/lib/wix/index.ts +0 -0
  418. /package/files/{expo → templates/expo[D]/files}/metro.config.js +0 -0
  419. /package/files/{expo → templates/expo[D]/files}/nativewind-env.d.ts +0 -0
  420. /package/files/{expo → templates/expo[D]/files}/scripts/reset-project.ts +0 -0
  421. /package/files/{expo → templates/expo[D]/files}/tailwind.config.js +0 -0
  422. /package/files/{expo → templates/expo[D]/files}/tsconfig.json +0 -0
  423. /package/files/{expo → templates/expo[D]/files}/types/reset.d.ts +0 -0
  424. /package/{src copy/schemas/types.ts → files/templates/velo[D]/files/.gitmodules} +0 -0
  425. /package/files/{velo → templates/velo[D]/files}/.madgerc +0 -0
  426. /package/files/{velo → templates/velo[D]/files}/.nvmrc +0 -0
  427. /package/files/{velo → templates/velo[D]/files}/.stylelintrc.js +0 -0
  428. /package/files/{velo → templates/velo[D]/files}/.yarnrc.yml +0 -0
  429. /package/files/{velo → templates/velo[D]/files}/currents.config.js +0 -0
  430. /package/files/{velo → templates/velo[D]/files}/cypress/e2e/base/base.cy.ts +0 -0
  431. /package/files/{velo → templates/velo[D]/files}/cypress/fixtures/example.json +0 -0
  432. /package/files/{velo → templates/velo[D]/files}/cypress/support/commands.ts +0 -0
  433. /package/files/{velo → templates/velo[D]/files}/cypress/support/e2e.ts +0 -0
  434. /package/files/{velo → templates/velo[D]/files}/cypress/tsconfig.json +0 -0
  435. /package/files/{velo → templates/velo[D]/files}/cypress.config.mjs +0 -0
  436. /package/files/{velo → templates/velo[D]/files}/eslint.config.mjs +0 -0
  437. /package/files/{velo → templates/velo[D]/files}/local.tsconfig.json +0 -0
  438. /package/files/{velo → templates/velo[D]/files}/typedoc.json +0 -0
  439. /package/files/{velo → templates/velo[D]/files}/typescript/backend/http-functions.ts +0 -0
  440. /package/files/{velo → templates/velo[D]/files}/typescript/backend/lib/http-functions/sync.ts +0 -0
  441. /package/files/{velo → templates/velo[D]/files}/typescript/backend/permissions.json +0 -0
  442. /package/files/{velo → templates/velo[D]/files}/typescript/tsconfig.json +0 -0
  443. /package/files/{velo → templates/velo[D]/files}/vitest.config.ts +0 -0
  444. /package/{src copy → old}/Gulpfile.ts +0 -0
  445. /package/{src copy → old}/gulp/backend.ts +0 -0
  446. /package/{src copy → old}/gulp/checks.ts +0 -0
  447. /package/{src copy → old}/gulp/clean.ts +0 -0
  448. /package/{src copy → old}/gulp/copy.ts +0 -0
  449. /package/{src copy → old}/gulp/helpers.ts +0 -0
  450. /package/{src copy → old}/gulp/pages.ts +0 -0
  451. /package/{src copy → old}/gulp/pipeline.ts +0 -0
  452. /package/{src copy → old}/gulp/public.ts +0 -0
  453. /package/{src copy → old}/gulp/styles.ts +0 -0
  454. /package/{src copy → old}/gulp/templates.ts +0 -0
  455. /package/{src copy → old}/gulp/types.ts +0 -0
  456. /package/{src copy → old}/gulp/watchers.ts +0 -0
  457. /package/{src copy → old}/index.ts +0 -0
  458. /package/{src copy → old}/init.ts +0 -0
  459. /package/{src copy → old}/models.ts +0 -0
  460. /package/{src copy → old}/prepare.ts +0 -0
  461. /package/{src copy → old}/settings.json +0 -0
  462. /package/{src copy → old}/sync.ts +0 -0
  463. /package/{src copy → old}/types.d.ts +0 -0
  464. /package/src/{models.ts → schemas/tsconfig.ts} +0 -0
@@ -0,0 +1,25 @@
1
+ import { Effect } from "effect/index";
2
+ import { Config } from "../config.js";
3
+ import { AppError } from "../error.js";
4
+ import { runTask } from "./Gulpfile.js";
5
+ export const tasks = () => {
6
+ return Effect.gen(function* (_) {
7
+ const config = yield* Config;
8
+ if (config.config.action.task === undefined) {
9
+ return yield* Effect.fail(new AppError({ message: "No action task provided", cause: new Error("No action task provided") }));
10
+ }
11
+ if (config.config.action.task === 'dev'
12
+ || config.config.action.task === 'build'
13
+ || config.config.action.task === 'build-prod'
14
+ || config.config.action.task === 'build-pipeline') {
15
+ return yield* Effect.tryPromise({
16
+ try: () => runTask(config.config),
17
+ catch: (err) => {
18
+ return new AppError({ message: err.message, cause: err });
19
+ }
20
+ });
21
+ }
22
+ yield* Effect.fail(new AppError({ message: `Unsupported action type: ${config.config.action.type}`, cause: new Error(`Unsupported action type: ${config.config.action.type}`) }));
23
+ });
24
+ };
25
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tasks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAU,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGvC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAGxC,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,EAAE;IACtB,OAAO,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC1B,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC;QAC7B,IAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YACzC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,QAAQ,CAAC,EAAE,OAAO,EAAE,yBAAyB,EAAE,KAAK,EAAE,IAAI,KAAK,CAAC,yBAAyB,CAAC,EAAE,CAAC,CAAC,CAAC;QACjI,CAAC;QAED,IACI,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,KAAK;eAChC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,OAAO;eACrC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,YAAY;eAC1C,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,gBAAgB,EACnD,CAAC;YACC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC;gBAC5B,GAAG,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC;gBACjC,KAAK,EAAE,CAAC,GAAQ,EAAE,EAAE;oBAChB,OAAO,IAAI,QAAQ,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;gBAC9D,CAAC;aACJ,CAAC,CAAC;QACP,CAAC;QACD,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,QAAQ,CAAC,EAAE,OAAO,EAAE,4BAA4B,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,KAAK,CAAC,4BAA4B,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACtL,CAAC,CAAC,CAAA;AACN,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { ModuleSettings, ProjectSettings } from "./index.js";
2
+ export declare function sync(moduleSettings: ModuleSettings, projectSettings: ProjectSettings): Promise<void>;
@@ -0,0 +1,88 @@
1
+ import chalk from "chalk";
2
+ import { green, orange, red } from "./index.js";
3
+ import readline from 'node:readline';
4
+ import veloAPI from 'velo-sync/dist/velo/velo-api.js';
5
+ import syncTask from 'velo-sync/dist/tasks/sync-task.js';
6
+ import { readConfig, saveConfig } from "./helpers.js";
7
+ import optimist from 'optimist';
8
+ import migrateFileCache from 'velo-sync/dist/tasks/migrate-files-cache-task.js';
9
+ function printUsage() {
10
+ console.log('Usage: ');
11
+ console.log('');
12
+ console.log('Commands:');
13
+ console.log(' init generates a config file for the import / export / sync process');
14
+ console.log(' is-alive tests the config and the connection to the site');
15
+ console.log(' sync runs the sync process');
16
+ console.log(' import runs an import process');
17
+ console.log(' migrate migrate existing nedb cache to sqlite cache (.upload-cache.db => .upload-cache.sqlite.db)');
18
+ }
19
+ function syncOrImportTask(importOnly) {
20
+ let argv = optimist
21
+ .usage(`Usage: $0 ${importOnly ? 'import' : 'sync'} -f <scv filename> -c <collection>`)
22
+ .demand('f')
23
+ .alias('f', 'filename')
24
+ .describe('f', 'csv filename to import')
25
+ .demand('c')
26
+ .describe('c', 'the name of the collection to import into')
27
+ .alias('c', 'collection')
28
+ .demand('s')
29
+ .describe('s', 'schema file describing the fields of the collection')
30
+ .alias('s', 'schema')
31
+ .describe('dry', 'dry-run that does not upload any data or files, and does not remove or update anything on the site')
32
+ .alias('dry', 'dryrun')
33
+ .parse(process.argv.slice(3));
34
+ let filename = argv.filename;
35
+ let collection = argv.collection;
36
+ let schema = argv.schema;
37
+ let dryrun = argv.dryrun;
38
+ //@ts-ignore
39
+ syncTask.default(filename, collection, schema, importOnly, dryrun);
40
+ }
41
+ export async function sync(moduleSettings, projectSettings) {
42
+ if (moduleSettings.args.includes('-h') || moduleSettings.args.includes('help'))
43
+ return printUsage();
44
+ if (moduleSettings.args.includes('init')) {
45
+ const rl = readline.createInterface({
46
+ input: process.stdin,
47
+ output: process.stdout,
48
+ terminal: true
49
+ });
50
+ async function askQuestion(query) {
51
+ return new Promise((resolve) => rl.question(query, (answer) => resolve(answer)));
52
+ }
53
+ console.log(chalk.yellow('hello to velo-sync init'));
54
+ let siteUrl = await askQuestion(orange('what is the url of the site homepage? '));
55
+ let secret = await askQuestion(orange('what is the velo-sync secret? '));
56
+ rl.close();
57
+ let config = { siteUrl, secret };
58
+ await saveConfig(config, moduleSettings.veloConfigName);
59
+ return console.log(chalk.green("🐕" + ' => config saved!'));
60
+ }
61
+ if (moduleSettings.args.includes('is-alive')) {
62
+ try {
63
+ let config = await readConfig(moduleSettings.veloConfigName);
64
+ console.log("🐕" + green(` => checking if the API for site ${chalk.greenBright(config.siteUrl)} is alive...`));
65
+ await veloAPI.isAlive(config);
66
+ return console.log(chalk.green("🐕" + ` => API of site ${chalk.greenBright(config.siteUrl)} is working and alive!!!`));
67
+ }
68
+ catch (e) {
69
+ if (e instanceof Error) {
70
+ return console.log((`💩 ${red.underline.bold("=> Failed to check endpoint")} ${orange(e.message)}`));
71
+ }
72
+ }
73
+ }
74
+ if (moduleSettings.args.includes('sync')) {
75
+ return syncOrImportTask(false);
76
+ }
77
+ if (moduleSettings.args.includes('import')) {
78
+ return syncOrImportTask(true);
79
+ }
80
+ if (moduleSettings.args.includes('export')) {
81
+ return console.log((`💩 ${red.underline.bold("=> Not implemented")}`));
82
+ }
83
+ if (moduleSettings.args.includes('migrate')) {
84
+ //@ts-ignore
85
+ migrateFileCache.default();
86
+ }
87
+ }
88
+ //# sourceMappingURL=sync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.js","sourceRoot":"","sources":["../../src/tasks/sync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAQ,KAAK,EAAkB,MAAM,EAAmB,GAAG,EAAE,MAAM,YAAY,CAAC;AACvF,OAAO,QAAQ,MAAM,eAAe,CAAC;AAErC,OAAO,OAAO,MAAM,iCAAiC,CAAC;AACtD,OAAO,QAAQ,MAAM,mCAAmC,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAkB,MAAM,cAAc,CAAC;AACtE,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,O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AAG,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QACxC,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,oBAAoB,CAAC,EAAE,CAAC,CAAC,CAAC;IAC3E,CAAC;IAED,IAAG,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;QACzC,YAAY;QACZ,gBAAgB,CAAC,OAAO,EAAE,CAAC;IAC/B,CAAC;AAEL,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,17 @@
1
+ export declare const orange: import("chalk").ChalkInstance;
2
+ export declare const blue: import("chalk").ChalkInstance;
3
+ export declare const green: import("chalk").ChalkInstance;
4
+ export declare const red: import("chalk").ChalkInstance;
5
+ export declare const yellow: import("chalk").ChalkInstance;
6
+ export declare const magenta: import("chalk").ChalkInstance;
7
+ export declare const logger: {
8
+ success: (message: string, ...optionalParams: any[]) => void;
9
+ info: (message: string, ...optionalParams: any[]) => void;
10
+ action: (message: string, ...optionalParams: any[]) => void;
11
+ exception: (message: string, ...optionalParams: any[]) => void;
12
+ error: (message: string, ...optionalParams: any[]) => void;
13
+ warning: (message: string, ...optionalParams: any[]) => void;
14
+ alert: (message: string, ...optionalParams: any[]) => void;
15
+ report: (message: string, ...optionalParams: any[]) => void;
16
+ kill: (message: string, ...optionalParams: any[]) => void;
17
+ };
@@ -0,0 +1,37 @@
1
+ import chalk from "chalk";
2
+ export const orange = chalk.hex('#FFA500');
3
+ export const blue = chalk.blueBright;
4
+ export const green = chalk.greenBright;
5
+ export const red = chalk.redBright;
6
+ export const yellow = chalk.yellow;
7
+ export const magenta = chalk.magentaBright;
8
+ export const logger = {
9
+ success: (message, ...optionalParams) => {
10
+ console.log("🐶" + green.underline(' => ' + message + optionalParams.map(param => ' ' + param)), ' ✅');
11
+ },
12
+ info: (message, ...optionalParams) => {
13
+ console.log("🐶" + blue.underline(' => ' + message + optionalParams.map(param => ' ' + param)), ' ℹ️');
14
+ },
15
+ action: (message, ...optionalParams) => {
16
+ console.log("🐕" + blue.underline(' => ' + message + optionalParams.map(param => ' ' + param)));
17
+ },
18
+ exception: (message, ...optionalParams) => {
19
+ console.log("💥" + red(' => ' + message + optionalParams.map(param => ' ' + param)));
20
+ },
21
+ error: (message, ...optionalParams) => {
22
+ console.log("🛑" + red(' => ' + message + optionalParams.map(param => ' ' + param)));
23
+ },
24
+ warning: (message, ...optionalParams) => {
25
+ console.log("⚠️" + orange.underline(' => ' + message + optionalParams.map(param => ' ' + param)));
26
+ },
27
+ alert: (message, ...optionalParams) => {
28
+ console.log("🚨" + yellow.underline(' => ' + message + optionalParams.map(param => ' ' + param)));
29
+ },
30
+ report: (message, ...optionalParams) => {
31
+ console.log("📝" + magenta.underline(' => ' + message + optionalParams.map(param => ' ' + param)));
32
+ },
33
+ kill: (message, ...optionalParams) => {
34
+ console.log("🔪" + red.underline(' => ' + message + optionalParams.map(param => ' ' + param)));
35
+ }
36
+ };
37
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,CAAC,MAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AAC3C,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAAC;AACrC,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CAAC,WAAW,CAAC;AACvC,MAAM,CAAC,MAAM,GAAG,GAAG,KAAK,CAAC,SAAS,CAAC;AACnC,MAAM,CAAC,MAAM,M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ides: [
3
+ {
4
+ files: ["**/*.{ts,tsx}"],
5
+ customSyntax: "@stylelint/postcss-css-in-js",
6
+ },
7
+ ],
8
+ };
@@ -0,0 +1,8 @@
1
+ {
2
+ "modules": {},
3
+ "devDependencies": {},
4
+ "dependencies": {},
5
+ "scripts": {},
6
+ "initialized": false,
7
+ "type": "blocks"
8
+ }
@@ -0,0 +1 @@
1
+ # DATABASE_URL="postgresql://dev:dev@localhost:5432/shopping-trolley?schema=public"
@@ -0,0 +1,238 @@
1
+ [package]
2
+ name = "wiicle_backend"
3
+ version.workspace = true
4
+ authors.workspace = true
5
+ description.workspace = true
6
+ edition.workspace = true
7
+ license.workspace = true
8
+ repository.workspace = true
9
+ homepage.workspace = true
10
+ publish = false
11
+ build = "build/main.rs"
12
+
13
+ [workspace]
14
+ members = [
15
+ ".",
16
+ "./lib/core",
17
+ "./services/grpc",
18
+ "./services/http",
19
+ "./lib/common",
20
+ "./services/database",
21
+ "./lib/cli",
22
+ "./services/database/migrations",
23
+ "./lib/context",
24
+ "./features/auth",
25
+ "./features/authz",
26
+ "./lib/i18n",
27
+ "./lib/settings"
28
+ ]
29
+ resolver = "2"
30
+ exclude = ["target/*"]
31
+
32
+ [workspace.metadata]
33
+
34
+ [package.metadata.docs.rs]
35
+ # Set dependencies to false if you don't want docs from external crates
36
+ dependencies = false
37
+
38
+ [workspace.package]
39
+ authors = ["Gradlon von Känel"]
40
+ description = "Wiicle Backend"
41
+ edition = "2021"
42
+ license = "MIT"
43
+ repository = ""
44
+ version = "0.1.0"
45
+ homepage = "https://www.integral-systems.ch"
46
+
47
+ [workspace.lints.rust]
48
+ unsafe-code = "forbid"
49
+ # unused = "allow"
50
+ unused = "warn"
51
+ missing_docs = "warn"
52
+
53
+ [workspace.lints.rustdoc]
54
+ missing_crate_level_docs = "allow"
55
+
56
+ [workspace.lints.clippy]
57
+ unwrap_used = "warn"
58
+ cargo = "allow"
59
+ pedantic = "allow"
60
+ expect_used = "warn"
61
+ multiple_crate_versions = "allow"
62
+
63
+ [lints]
64
+ workspace = true
65
+
66
+ [build-dependencies]
67
+ serde.workspace = true
68
+ serde_json.workspace = true
69
+ config.workspace = true
70
+ once_cell.workspace = true
71
+ serde_derive.workspace = true
72
+ schemars.workspace = true
73
+ strum_macros.workspace = true
74
+ language-tags.workspace = true
75
+ thiserror.workspace = true
76
+ anyhow.workspace = true
77
+ color-eyre.workspace = true
78
+ settings.workspace = true
79
+
80
+ [dependencies]
81
+ # Crates
82
+ cli = { path = "./lib/cli" }
83
+ lucy_core.workspace = true
84
+ settings.workspace = true
85
+ i18n_lib.workspace = true
86
+ autometrics.workspace = true
87
+ http_service.workspace = true
88
+ grpc_service.workspace = true
89
+ tracing.workspace = true
90
+ anyhow_trace.workspace = true
91
+ tokio.workspace = true
92
+ tracing-subscriber.workspace = true
93
+ color-eyre.workspace = true
94
+ anyhow.workspace = true
95
+ http.workspace = true
96
+ database.workspace = true
97
+ common.workspace = true
98
+ rust-i18n.workspace = true
99
+ async-trait.workspace = true
100
+
101
+ [workspace.dependencies]
102
+ # Crates
103
+ lucy_core = { path = "./lib/core" } # depends on your needs
104
+ database = { path = "./services/database" } # depends on your needs
105
+ common = { path = "./lib/common" }
106
+ context = { path = "./lib/context" }
107
+ auth = { path = "./features/auth" }
108
+ authz = { path = "./features/authz" }
109
+ http_service = { path = "./services/http"}
110
+ grpc_service = { path = "./services/grpc"}
111
+ i18n_lib = { path = "./lib/i18n" }
112
+ settings = { path = "./lib/settings" }
113
+
114
+ # Base
115
+ tokio = { version = "1.36.0", features = ["full", "rt-multi-thread"] }
116
+ async-std = { version = "1", features = ["attributes", "tokio1"] }
117
+ async-trait = "0.1.57"
118
+ futures = "0.3"
119
+
120
+ # http
121
+ http = "1.1"
122
+ http-body = "1.0"
123
+
124
+ # hyper
125
+ hyper = { version = "1.0.0", features = ["full"] }
126
+ hyper-util = "0.1"
127
+
128
+ tower = { version = "0.5.1", features = ["steer", "util"] }
129
+ tower-http = { version = "0.5.2", features = ["cors", "trace", "fs"] }
130
+ tower-cookies = { version = "0.10.0" }
131
+ tower-service = "0.3.3"
132
+
133
+ # Axum
134
+ axum = { version = "0.7.5", features = ["ws", "macros", "multipart", "tracing"] }
135
+ axum-macros = "0.4.1"
136
+ axum-messages = "0.7.0"
137
+ axum-extra = "0.9.3"
138
+ axum-helmet = "0.1"
139
+
140
+ # Datatypes
141
+ axum-jsonschema = { version = "0.8.0", features = ["aide"] }
142
+ serde = { version = "1.0.144", features = ["derive", "rc"] }
143
+ serde_json = "1.0.113"
144
+ serde_yaml = "0.9"
145
+ serde_derive = "1.0.196"
146
+ schemars = { version = "0.8.16", features = ["uuid1"] }
147
+ schemars-zod = "0.1.5"
148
+
149
+ # Swagger
150
+ utoipa = {git = "https://github.com/juhaku/utoipa", branch = "master", features = ["axum_extras"]}
151
+ utoipa-scalar = {git = "https://github.com/juhaku/utoipa", branch = "master", features = ["axum"]}
152
+
153
+ # Tonic
154
+ tonic = "0.12.0"
155
+ tonic-middleware = "0.2.1"
156
+ tonic-web = "0.12.0"
157
+ tonic-reflection = "0.12.0"
158
+ tonic-async-interceptor = "0.12.0"
159
+ prost = "0.13.1"
160
+
161
+ # DB's
162
+ fred = { version = "9.1.2", features = ["mocks"] }
163
+ sea-orm = { version = "1.0.1", features = [ "sqlx-postgres", "runtime-tokio-rustls", "macros", "debug-print", "mock"] }
164
+ sea-orm-migration = { version = "1.0.1", features = ["sqlx-postgres", "runtime-tokio-rustls"]}
165
+ sqlx = { version = "0.7.4", features = ["sqlite", "time", "runtime-tokio"] }
166
+ surrealdb = "1.5.4"
167
+
168
+ # Tracing and Logging
169
+ autometrics = { version = "2.0.0", features = ["prometheus-exporter"] }
170
+ tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt", "chrono"] }
171
+ anyhow = { version = "1.0.82", features = ["backtrace"] }
172
+ thiserror = "1.0.50"
173
+ anyhow_trace = "0.1.3"
174
+ tracing = "0.1"
175
+ tower-otel = "0.2.0"
176
+ color-eyre = "0.6.3"
177
+
178
+ # I18N
179
+ language-tags = { version = "0.3.2", features = ["serde"] }
180
+ rust-i18n = "3.1.2"
181
+
182
+ # Auth/Authz
183
+ casdoor-rust-sdk = "1.3.0"
184
+ casbin = { version = "2.2.0", default-features = false, features = ["runtime-async-std", "logging", "incremental"] }
185
+
186
+ # Utils
187
+ uuid = { version = "1.8.0", features = ["v4", "v7","serde", "fast-rng"] }
188
+ lazy-regex = "3.1.0"
189
+ strum_macros = "0.26.2"
190
+ derive_more = { version = "1.0.0-beta", features = ["from"]}
191
+ serde_with = "3.8.1"
192
+ time = "0.3.30"
193
+ config = "0.14.0"
194
+ clap = { version = "4.5.3", features = ["derive"]}
195
+ reqwest = { version = "0.12.2", features = ["json"] }
196
+ structstruck ={ version = "0.4.1"}
197
+ rayon = "1.10.0"
198
+ figlet-rs = "0.1.5"
199
+ ansi_term = "0.12.1"
200
+ argon2 = "0.5.3"
201
+ lazy_static = "1.4.0"
202
+
203
+ # Time
204
+ chrono = "0.4.19"
205
+ chrono-tz = "0.10.0"
206
+
207
+ # Datatypes
208
+ once_cell = "1.19.0"
209
+
210
+ #testing
211
+ mockall ="0.13.0"
212
+ serial_test = "3.1.1"
213
+ tokio-test = "0.4.4"
214
+ pretty_assertions = "1.4.0"
215
+ tonic-mock = "0.3.0"
216
+
217
+ [workspace.dev-dependencies]
218
+ tokio = { version = "1", features = ["full"] }
219
+ testresult = "0.4.0"
220
+ pretty_assertions.workspace = true
221
+
222
+ [dev-dependencies]
223
+ anyhow.workspace = true
224
+ reqwest.workspace = true
225
+ tokio.workspace = true
226
+ serde_json.workspace = true
227
+ tokio-test.workspace = true
228
+ lucy_core.workspace = true
229
+ pretty_assertions.workspace = true
230
+
231
+ [profile.dev]
232
+ debug = true
233
+
234
+ [profile.release]
235
+ debug = false
236
+ lto = true
237
+ codegen-units = 1
238
+ panic = "abort"
@@ -0,0 +1,4 @@
1
+ [tasks.build]
2
+ command = "cargo"
3
+ args = ["build"]
4
+ dependencies = ["clean"]
@@ -0,0 +1,35 @@
1
+ //! This build script generates a JSON schema for the `Settings` struct.
2
+ //! The schema is used by the `config` crate to validate the configuration file.
3
+ //! The schema is written to `config/schema.json`.
4
+ macro_rules! p {
5
+ ($($tokens: tt)*) => {
6
+ println!("cargo:warning={}", format!($($tokens)*))
7
+ }
8
+ }
9
+
10
+ /// This build script generates a JSON schema for the `Settings` struct.
11
+ /// The schema is used by the `config` crate to validate the configuration file.
12
+ /// The schema is written to `../../config/schema.json`.
13
+ /// The build script is re-run if `src/lib.rs` changes.
14
+ fn main() {
15
+ p!("cargo:rerun-if-changed=src/lib.rs");
16
+ let schema = schemars::schema_for!(Settings);
17
+ let schema_file = Path::new("config/schema.json");
18
+ fs::write(
19
+ schema_file,
20
+ serde_json::to_string_pretty(&schema).unwrap_or_else(|error| {
21
+ p!("Error: {}", error);
22
+ String::new()
23
+ }),
24
+ )
25
+ .unwrap_or_else(|error| {
26
+ p!("Error: {}", error);
27
+ });
28
+
29
+ p!("Writing JSON schema to {:?}", schema_file);
30
+ }
31
+
32
+ // include!("src/lib.rs");
33
+ use std::fs;
34
+ use std::path::Path;
35
+ use settings::Settings;
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "schema.json",
3
+ "environment": "Beta",
4
+ "databases": {
5
+ "redis": {
6
+ "key_prefix": "wiicle_beta"
7
+ }
8
+ },
9
+ "security": {
10
+ "alias_session_expiry": 7200,
11
+ "session_expiry": 7200
12
+ },
13
+ "product": {
14
+ "name": "Wiicle(BETA)"
15
+ },
16
+ "app": {
17
+ "log_level": "Info"
18
+ }
19
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "$schema": "schema.json",
3
+ "message": "Wellcome to The Wiicle Backend",
4
+ "databases": {
5
+ "postgres": {
6
+ "url": "postgres://dev:dev@postgres/wiicle"
7
+ },
8
+ "redis": {
9
+ "url": "redis://default@redis:6379/0"
10
+ }
11
+ },
12
+ "product": {
13
+ "name": "Wiicle(CI)"
14
+ }
15
+ }
@@ -0,0 +1,71 @@
1
+ {
2
+ "$schema": "schema.json",
3
+ "message": "Wellcome to The Wiicle Backend",
4
+ "databases": {
5
+ "postgres": {
6
+ "url": "postgres://root:root@localhost:26257/wiicle_beta"
7
+ },
8
+ "mongo": {
9
+ "url": "mongodb://mongo:27017/api"
10
+ },
11
+ "redis": {
12
+ "url": "redis://default@127.0.0.1:6379/0",
13
+ "key_prefix": "wiicle",
14
+ "pool_size": 5
15
+ },
16
+ "meilisearch": {
17
+ "url": "http://localhost:7700",
18
+ "api_key": "dev"
19
+ },
20
+ "elasticsearch": {
21
+ "url": "http://127.0.0.1:9271"
22
+ }
23
+ },
24
+ "i18n": {
25
+ "default_locale": "en",
26
+ "supported_locales": ["en", "de", "fr"]
27
+ },
28
+ "security": {
29
+ "jwt_secret": "SuperSecretToken",
30
+ "jwt_expiry": 7200,
31
+ "session_expiry": 300,
32
+ "alias_session_expiry": 300,
33
+ "api_keys": ["ca03na188ame03u1d78620de67282882a84"],
34
+ "api_key_field": "api-key",
35
+ "cookie_name": "session",
36
+ "cookie_lifetime": 90,
37
+ "cors": {
38
+ "allowed_origins": ["http://localhost:8085", "http://192.168.1.87:8085"]
39
+ },
40
+ "admin": {
41
+ "username": "admin",
42
+ "password": "admin",
43
+ "password_hashed": "$2b$10$o4OYI2SOrkBZl17X1d2hg.gip6M5xNZPmpF0IsrpS62eXP4B/WoRy"
44
+ }
45
+ },
46
+ "app": {
47
+ "http_port": 3000,
48
+ "grpc_port": 3100,
49
+ "proto_out_dir": "../grpc",
50
+ "log_level": "Debug",
51
+ "lang_field": "lang",
52
+ "default_lang": "de-CH",
53
+ "context_field": "x-context",
54
+ "frontend_dir": "public"
55
+ },
56
+ "mail": {
57
+ "host": "smtp.gmail.com",
58
+ "port": 465,
59
+ "secure": true,
60
+ "auth": {
61
+ "user": "",
62
+ "pass": ""
63
+ }
64
+ },
65
+ "product": {
66
+ "name": "Wiicle",
67
+ "telegram_bot_token": "5386225720:AAEKgiysSjy-p6Z0yNgDcCl_QmqNjSSPPw4",
68
+ "telegram_chat_id": "-933647200",
69
+ "default_avatar": "https://cdn.vectorstock.com/i/1000v/45/94/default-avatar-profile-icon-grey-photo-vector-31934594.jpg"
70
+ }
71
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "schema.json",
3
+ "message": "Wellcome",
4
+ "app": {
5
+ "frontend_dir": "../app/dist"
6
+ },
7
+ "product": {
8
+ "name": "Wiicle(DEV)"
9
+ }
10
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "$schema": "schema.json",
3
+ "environment": "Production",
4
+ "message": "Integral Systems API"
5
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "$schema": "schema.json",
3
+ "message": "Integral Systems API"
4
+ }
@@ -0,0 +1,3 @@
1
+ Hello:
2
+ en: Hello
3
+