lucy-cli 2.0.0-beta.1 → 2.0.0-beta.10

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 (241) hide show
  1. package/.cursorignore +4 -0
  2. package/.wix/debug.log +10 -0
  3. package/README.md +117 -102
  4. package/dist/args.js +41 -1
  5. package/dist/args.js.map +1 -1
  6. package/dist/commands/exec.d.ts +2 -2
  7. package/dist/commands/exec.js +15 -13
  8. package/dist/commands/exec.js.map +1 -1
  9. package/dist/commands/home.d.ts +2 -2
  10. package/dist/commands/home.js +25 -2
  11. package/dist/commands/home.js.map +1 -1
  12. package/dist/commands/install.d.ts +1 -0
  13. package/dist/commands/install.js +29 -16
  14. package/dist/commands/install.js.map +1 -1
  15. package/dist/helpers.d.ts +1 -1
  16. package/dist/helpers.js +1 -8
  17. package/dist/helpers.js.map +1 -1
  18. package/dist/index.d.ts +0 -1
  19. package/dist/index.js +4 -2
  20. package/dist/index.js.map +1 -1
  21. package/dist/init/blocks.d.ts +1 -1
  22. package/dist/init/blocks.js +2 -2
  23. package/dist/init/cargo.d.ts +1 -1
  24. package/dist/init/cargo.js +2 -2
  25. package/dist/init/expo.d.ts +1 -1
  26. package/dist/init/expo.js +2 -2
  27. package/dist/init/index.d.ts +1 -2
  28. package/dist/init/index.js +10 -1
  29. package/dist/init/index.js.map +1 -1
  30. package/dist/init/monorepo.d.ts +1 -1
  31. package/dist/init/monorepo.js +2 -2
  32. package/dist/init/tauri.d.ts +1 -1
  33. package/dist/init/tauri.js +2 -2
  34. package/dist/init/velo.d.ts +1 -1
  35. package/dist/init/velo.js +3 -2
  36. package/dist/init/velo.js.map +1 -1
  37. package/dist/schemas/index.d.ts +1 -0
  38. package/dist/schemas/index.js +1 -0
  39. package/dist/schemas/index.js.map +1 -1
  40. package/dist/schemas/lucy.d.ts +2 -2
  41. package/dist/schemas/lucy.js +1 -1
  42. package/dist/schemas/lucy.js.map +1 -1
  43. package/dist/tasks/Gulpfile.js +3 -3
  44. package/dist/tasks/Gulpfile.js.map +1 -1
  45. package/dist/tasks/gulp/checks.js +12 -11
  46. package/dist/tasks/gulp/checks.js.map +1 -1
  47. package/dist/tasks/gulp/watchers.js +3 -3
  48. package/dist/tasks/gulp/watchers.js.map +1 -1
  49. package/dist/tasks/index.d.ts +1 -1
  50. package/files/templates/block[D]/files/.cursorignore +4 -0
  51. package/files/templates/cargo[D]/files/.cursorignore +4 -0
  52. package/files/templates/expo verse[D]/files/.nvmrc +1 -0
  53. package/files/templates/expo verse[D]/files/.prettierignore +23 -0
  54. package/files/templates/expo verse[D]/files/.prettierrc.js +16 -0
  55. package/files/templates/expo verse[D]/files/.stylelintrc.json +8 -0
  56. package/files/templates/expo verse[D]/files/.vscode/extensions.json +10 -0
  57. package/files/templates/expo verse[D]/files/.vscode/launch.json +54 -0
  58. package/files/templates/expo verse[D]/files/.vscode/settings.json +30 -0
  59. package/files/templates/expo verse[D]/files/.vscode/tasks.json +0 -0
  60. package/files/templates/expo verse[D]/files/.yarnrc +1 -0
  61. package/files/templates/expo verse[D]/files/.yarnrc.yml +8 -0
  62. package/files/templates/expo verse[D]/files/App.tsx +63 -0
  63. package/files/templates/expo verse[D]/files/DEBUGGING.md +126 -0
  64. package/files/templates/expo verse[D]/files/README.md +45 -0
  65. package/files/templates/expo verse[D]/files/android/app/build.gradle +177 -0
  66. package/files/templates/expo verse[D]/files/android/app/debug.keystore +0 -0
  67. package/files/templates/expo verse[D]/files/android/app/proguard-rules.pro +14 -0
  68. package/files/templates/expo verse[D]/files/android/app/src/debug/AndroidManifest.xml +7 -0
  69. package/files/templates/expo verse[D]/files/android/app/src/main/AndroidManifest.xml +33 -0
  70. package/files/templates/expo verse[D]/files/android/app/src/main/java/so/sunnysideup/daily_verse/MainActivity.kt +65 -0
  71. package/files/templates/expo verse[D]/files/android/app/src/main/java/so/sunnysideup/daily_verse/MainApplication.kt +57 -0
  72. package/files/templates/expo verse[D]/files/android/app/src/main/res/drawable/ic_launcher_background.xml +6 -0
  73. package/files/templates/expo verse[D]/files/android/app/src/main/res/drawable/rn_edit_text_material.xml +37 -0
  74. package/files/templates/expo verse[D]/files/android/app/src/main/res/drawable-hdpi/splashscreen_logo.png +0 -0
  75. package/files/templates/expo verse[D]/files/android/app/src/main/res/drawable-mdpi/splashscreen_logo.png +0 -0
  76. package/files/templates/expo verse[D]/files/android/app/src/main/res/drawable-night-hdpi/splashscreen_logo.png +0 -0
  77. package/files/templates/expo verse[D]/files/android/app/src/main/res/drawable-night-mdpi/splashscreen_logo.png +0 -0
  78. package/files/templates/expo verse[D]/files/android/app/src/main/res/drawable-night-xhdpi/splashscreen_logo.png +0 -0
  79. package/files/templates/expo verse[D]/files/android/app/src/main/res/drawable-night-xxhdpi/splashscreen_logo.png +0 -0
  80. package/files/templates/expo verse[D]/files/android/app/src/main/res/drawable-night-xxxhdpi/splashscreen_logo.png +0 -0
  81. package/files/templates/expo verse[D]/files/android/app/src/main/res/drawable-xhdpi/splashscreen_logo.png +0 -0
  82. package/files/templates/expo verse[D]/files/android/app/src/main/res/drawable-xxhdpi/splashscreen_logo.png +0 -0
  83. package/files/templates/expo verse[D]/files/android/app/src/main/res/drawable-xxxhdpi/splashscreen_logo.png +0 -0
  84. package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +6 -0
  85. package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +6 -0
  86. package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp +0 -0
  87. package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp +0 -0
  88. package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.webp +0 -0
  89. package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp +0 -0
  90. package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp +0 -0
  91. package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp +0 -0
  92. package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.webp +0 -0
  93. package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp +0 -0
  94. package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp +0 -0
  95. package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp +0 -0
  96. package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.webp +0 -0
  97. package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp +0 -0
  98. package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp +0 -0
  99. package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp +0 -0
  100. package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.webp +0 -0
  101. package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp +0 -0
  102. package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp +0 -0
  103. package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp +0 -0
  104. package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.webp +0 -0
  105. package/files/templates/expo verse[D]/files/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp +0 -0
  106. package/files/templates/expo verse[D]/files/android/app/src/main/res/values/colors.xml +6 -0
  107. package/files/templates/expo verse[D]/files/android/app/src/main/res/values/strings.xml +7 -0
  108. package/files/templates/expo verse[D]/files/android/app/src/main/res/values/styles.xml +12 -0
  109. package/files/templates/expo verse[D]/files/android/app/src/main/res/values-night/colors.xml +3 -0
  110. package/files/templates/expo verse[D]/files/android/build.gradle +37 -0
  111. package/files/templates/expo verse[D]/files/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  112. package/files/templates/expo verse[D]/files/android/gradle/wrapper/gradle-wrapper.properties +7 -0
  113. package/files/templates/expo verse[D]/files/android/gradle.properties +59 -0
  114. package/files/templates/expo verse[D]/files/android/gradlew +251 -0
  115. package/files/templates/expo verse[D]/files/android/gradlew.bat +94 -0
  116. package/files/templates/expo verse[D]/files/android/settings.gradle +39 -0
  117. package/files/templates/expo verse[D]/files/app.config.ts +77 -0
  118. package/files/templates/expo verse[D]/files/assets/data/de.csv +949 -0
  119. package/files/templates/expo verse[D]/files/assets/data/en.csv +949 -0
  120. package/files/templates/expo verse[D]/files/assets/fonts/PlayfairDisplay-Black.ttf +0 -0
  121. package/files/templates/expo verse[D]/files/assets/fonts/PlayfairDisplay-BlackItalic.ttf +0 -0
  122. package/files/templates/expo verse[D]/files/assets/fonts/PlayfairDisplay-Bold.ttf +0 -0
  123. package/files/templates/expo verse[D]/files/assets/fonts/PlayfairDisplay-BoldItalic.ttf +0 -0
  124. package/files/templates/expo verse[D]/files/assets/fonts/PlayfairDisplay-ExtraBold.ttf +0 -0
  125. package/files/templates/expo verse[D]/files/assets/fonts/PlayfairDisplay-ExtraBoldItalic.ttf +0 -0
  126. package/files/templates/expo verse[D]/files/assets/fonts/PlayfairDisplay-Italic.ttf +0 -0
  127. package/files/templates/expo verse[D]/files/assets/fonts/PlayfairDisplay-Medium.ttf +0 -0
  128. package/files/templates/expo verse[D]/files/assets/fonts/PlayfairDisplay-MediumItalic.ttf +0 -0
  129. package/files/templates/expo verse[D]/files/assets/fonts/PlayfairDisplay-Regular.ttf +0 -0
  130. package/files/templates/expo verse[D]/files/assets/fonts/PlayfairDisplay-SemiBold.ttf +0 -0
  131. package/files/templates/expo verse[D]/files/assets/fonts/PlayfairDisplay-SemiBoldItalic.ttf +0 -0
  132. package/files/templates/expo verse[D]/files/assets/fonts/SpaceMono-Regular.ttf +0 -0
  133. package/files/templates/expo verse[D]/files/assets/images/andorid/background.png +0 -0
  134. package/files/templates/expo verse[D]/files/assets/images/android-dark.png +0 -0
  135. package/files/templates/expo verse[D]/files/assets/images/android-light.png +0 -0
  136. package/files/templates/expo verse[D]/files/assets/images/background.png +0 -0
  137. package/files/templates/expo verse[D]/files/assets/images/ios-dark.png +0 -0
  138. package/files/templates/expo verse[D]/files/assets/images/ios-light.png +0 -0
  139. package/files/templates/expo verse[D]/files/assets/images/ios-tinted.png +0 -0
  140. package/files/templates/expo verse[D]/files/assets/images/splash-icon-dark.png +0 -0
  141. package/files/templates/expo verse[D]/files/assets/images/splash-icon-light.png +0 -0
  142. package/files/templates/expo verse[D]/files/babel.config.js +10 -0
  143. package/files/templates/expo verse[D]/files/components/.gitkeep +0 -0
  144. package/files/templates/expo verse[D]/files/components/MainScreen.tsx +299 -0
  145. package/files/templates/expo verse[D]/files/components/Share.tsx +132 -0
  146. package/files/templates/expo verse[D]/files/components/ui/.gitkeep +0 -0
  147. package/files/templates/expo verse[D]/files/components/ui/dev.tsx +48 -0
  148. package/files/templates/expo verse[D]/files/constants/config.ts +30 -0
  149. package/files/templates/expo verse[D]/files/constants/theme.ts +18 -0
  150. package/files/templates/expo verse[D]/files/data/de.csv +219 -0
  151. package/files/templates/expo verse[D]/files/data/en.csv +219 -0
  152. package/files/templates/expo verse[D]/files/data/version.json +4 -0
  153. package/files/templates/expo verse[D]/files/eas.json +47 -0
  154. package/files/templates/expo verse[D]/files/eslint.config.mjs +185 -0
  155. package/files/templates/expo verse[D]/files/global.css +47 -0
  156. package/files/templates/expo verse[D]/files/hooks/useColorScheme.ts +17 -0
  157. package/files/templates/expo verse[D]/files/index.ts +28 -0
  158. package/files/templates/expo verse[D]/files/lib/content.ts +31 -0
  159. package/files/templates/expo verse[D]/files/lib/data.ts +180 -0
  160. package/files/templates/expo verse[D]/files/lib/helper.ts +54 -0
  161. package/files/templates/expo verse[D]/files/lib/index.ts +21 -0
  162. package/files/templates/expo verse[D]/files/lib/state.ts +128 -0
  163. package/files/templates/expo verse[D]/files/lib/storage.ts +17 -0
  164. package/files/templates/expo verse[D]/files/lib/taskManager/index.ts +38 -0
  165. package/files/templates/expo verse[D]/files/lib/taskManager/loadData.ts +14 -0
  166. package/files/templates/expo verse[D]/files/lib/utils/index.ts +11 -0
  167. package/files/templates/expo verse[D]/files/lib/utils/polyfills.ts +29 -0
  168. package/files/templates/expo verse[D]/files/lib/utils/screenshot.ts +77 -0
  169. package/files/templates/expo verse[D]/files/lucy.json +8 -0
  170. package/files/templates/expo verse[D]/files/metro.config.js +81 -0
  171. package/files/templates/expo verse[D]/files/models/index.ts +28 -0
  172. package/files/templates/expo verse[D]/files/nativewind-env.d.ts +1 -0
  173. package/files/templates/expo verse[D]/files/package.json +102 -0
  174. package/files/templates/expo verse[D]/files/pnpm-workspace.yaml +3 -0
  175. package/files/templates/expo verse[D]/files/scripts/convert-verses.ts +309 -0
  176. package/files/templates/expo verse[D]/files/scripts/move-artifacts.ts +83 -0
  177. package/files/templates/expo verse[D]/files/scripts/reset-project.ts +116 -0
  178. package/files/templates/expo verse[D]/files/tailwind.config.js +63 -0
  179. package/files/templates/expo verse[D]/files/tsconfig.json +45 -0
  180. package/files/templates/expo verse[D]/files/types/index.ts +4 -0
  181. package/files/templates/expo verse[D]/files/types/reset.d.ts +1 -0
  182. package/files/templates/expo verse[D]/lucy.json +86 -0
  183. package/files/templates/expo[D]/files/.cursorignore +4 -0
  184. package/files/templates/expo[D]/files/app.config.ts +69 -0
  185. package/files/templates/expo[D]/files/assets/fonts/SpaceMono-Regular.ttf +0 -0
  186. package/files/templates/expo[D]/files/scripts/reset-project.ts +0 -0
  187. package/files/templates/monorepo[D]/files/.cursorignore +4 -0
  188. package/files/templates/tauri[D]/files/.cursorignore +4 -0
  189. package/files/templates/velo[D]/files/.cursorignore +4 -0
  190. package/files/templates/velo[D]/files/.yarnrc.yml +1 -2
  191. package/files/templates/velo[D]/files/local.tsconfig.json +6 -5
  192. package/files/templates/velo[D]/files/typescript/backend/config/authz.ts +47 -0
  193. package/files/templates/velo[D]/files/typescript/backend/config/env.ts +8 -0
  194. package/files/templates/velo[D]/files/typescript/backend/config/index.ts +26 -0
  195. package/files/templates/velo[D]/files/typescript/backend/config/mail.ts +10 -0
  196. package/files/templates/velo[D]/files/typescript/backend/config/nats.ts +6 -0
  197. package/files/templates/velo[D]/files/typescript/public/config/env.ts +9 -0
  198. package/files/templates/velo[D]/files/typescript/public/config/index.ts +76 -0
  199. package/files/templates/velo[D]/files/typescript/public/config/locales.ts +30 -0
  200. package/files/templates/velo[D]/files/typescript/public/config/theme.ts +110 -0
  201. package/files/templates/velo[D]/files/typescript/public/i18n/default.ts +123 -0
  202. package/files/templates/velo[D]/files/typescript/public/i18n/en.ts +117 -0
  203. package/files/templates/velo[D]/files/typescript/public/models/collections/member_roles.mode.ts +21 -0
  204. package/files/templates/velo[D]/files/typescript/public/models/collections/organization.model.ts +38 -0
  205. package/files/templates/velo[D]/files/typescript/public/models/collections/plan.model.ts +94 -0
  206. package/files/templates/velo[D]/files/typescript/public/models/collections/stage.model.ts +14 -0
  207. package/files/templates/velo[D]/files/typescript/public/models/collections/subscriptions.model.ts +80 -0
  208. package/files/templates/velo[D]/files/typescript/public/models/collections/tag.model.ts +15 -0
  209. package/files/templates/velo[D]/files/typescript/public/models/collections/translations.model.ts +16 -0
  210. package/files/templates/velo[D]/files/typescript/public/models/modules/authz.model.ts +31 -0
  211. package/files/templates/velo[D]/files/typescript/public/models/modules/organization.ts +20 -0
  212. package/files/templates/velo[D]/files/typescript/public/models/splitwise.model.ts +18 -0
  213. package/files/templates/velo[D]/files/typescript/public/models/store/local.model.ts +10 -0
  214. package/files/templates/velo[D]/files/typescript/public/models/store/memory.model.ts +10 -0
  215. package/files/templates/velo[D]/files/typescript/public/models/store/session.model.ts +10 -0
  216. package/files/templates/velo[D]/files/typescript/public/models/wix/ecom/payment.ts +236 -0
  217. package/files/templates/velo[D]/lucy.json +1 -1
  218. package/lucy +4 -0
  219. package/lucy.jpg +0 -0
  220. package/mitarbeiter-login.html +188 -0
  221. package/old/index.ts +0 -0
  222. package/package.json +15 -14
  223. package/pnpm-workspace.yaml +6 -0
  224. package/src/args.ts +41 -1
  225. package/src/commands/exec.ts +22 -18
  226. package/src/commands/home.ts +36 -2
  227. package/src/commands/install.ts +41 -21
  228. package/src/helpers.ts +1 -9
  229. package/src/index.ts +4 -2
  230. package/src/init/blocks.ts +2 -2
  231. package/src/init/cargo.ts +2 -2
  232. package/src/init/expo.ts +2 -2
  233. package/src/init/index.ts +10 -2
  234. package/src/init/monorepo.ts +2 -2
  235. package/src/init/tauri.ts +2 -2
  236. package/src/init/velo.ts +4 -3
  237. package/src/schemas/index.ts +2 -0
  238. package/src/schemas/lucy.ts +1 -1
  239. package/src/tasks/Gulpfile.ts +3 -3
  240. package/src/tasks/gulp/checks.ts +15 -14
  241. package/src/tasks/gulp/watchers.ts +3 -3
@@ -0,0 +1,236 @@
1
+ import { z } from 'zod';
2
+
3
+ const addressSchema = z.object({
4
+ addressLine1: z.string().optional(),
5
+ addressLine2: z.string().optional(),
6
+ city: z.string().optional(),
7
+ country: z.string().optional(),
8
+ postalCode: z.string().optional(),
9
+ streetAddress: z.object({
10
+ name: z.string().optional(),
11
+ number: z.string().optional(),
12
+ }).optional(),
13
+ subdivision: z.string().optional(),
14
+ });
15
+
16
+ const fullAddressContactDetailsSchema = z.object({
17
+ company: z.string().optional(),
18
+ firstName: z.string().optional(),
19
+ lastName: z.string().optional(),
20
+ phone: z.string().optional(),
21
+ vatId: z.object({
22
+ _id: z.string().optional(),
23
+ type: z.enum(['CNPJ', 'CPF', 'UNSPECIFIED']).optional(),
24
+ }).optional(),
25
+ });
26
+
27
+ const itemTaxFullDetailsSchema = z.object({
28
+ taxRate: z.string().optional(),
29
+ taxableAmount: z.object({
30
+ amount: z.string(),
31
+ }).optional(),
32
+ totalTax: z.object({
33
+ amount: z.string(),
34
+ }).optional(),
35
+ });
36
+
37
+ const priceSchema = z.object({
38
+ amount: z.string(),
39
+ formattedAmount: z.string().optional(),
40
+ });
41
+
42
+ const lineItemSchema = z.object({
43
+ productName: z.object({
44
+ original: z.string(),
45
+ translated: z.string().optional(),
46
+ }),
47
+ catalogReference: z.object({
48
+ catalogItemId: z.string(),
49
+ appId: z.string(),
50
+ options: z.object({
51
+ options: z.record(z.unknown()),
52
+ variantId: z.string().optional(),
53
+ }).optional(),
54
+ }),
55
+ quantity: z.number(),
56
+ totalDiscount: priceSchema.optional(),
57
+ descriptionLines: z.array(z.string()).optional(),
58
+ image: z.string().optional(),
59
+ physicalProperties: z.object({
60
+ sku: z.string(),
61
+ shippable: z.boolean(),
62
+ }).optional(),
63
+ itemType: z.object({
64
+ preset: z.string(),
65
+ }).optional(),
66
+ price: priceSchema,
67
+ priceBeforeDiscounts: priceSchema.optional(),
68
+ totalPriceBeforeTax: priceSchema.optional(),
69
+ totalPriceAfterTax: priceSchema.optional(),
70
+ paymentOption: z.string().optional(),
71
+ taxDetails: itemTaxFullDetailsSchema.optional(),
72
+ taxInfo: z.object({
73
+ taxAmount: priceSchema.optional(),
74
+ taxableAmount: priceSchema.optional(),
75
+ taxRate: z.string(),
76
+ taxIncludedInPrice: z.boolean().optional(),
77
+ taxBreakdown: z.array(z.unknown()).optional(),
78
+ }).optional(),
79
+ digitalFile: z.object({
80
+ fileId: z.string(),
81
+ expirationDate: z.union([z.string(), z.date()]), // Accepts either a string or a date
82
+ }).optional(),
83
+ locations: z.array(z.unknown()).optional(),
84
+ lineItemPrice: priceSchema.optional(),
85
+ customLineItem: z.boolean().optional(),
86
+ rootCatalogItemId: z.string().optional(),
87
+ taxableAddress: z.object({
88
+ addressType: z.string(),
89
+ }).optional(),
90
+ _id: z.string(),
91
+ });
92
+
93
+ const appliedDiscountSchema = z.object({
94
+ _id: z.string(),
95
+ discountType: z.enum(['GLOBAL', 'SHIPPING', 'SPECIFIC_ITEMS']),
96
+ lineItemIds: z.array(z.string()).optional(),
97
+ coupon: z.object({
98
+ _id: z.string().optional(),
99
+ amount: priceSchema.optional(),
100
+ code: z.string().optional(),
101
+ name: z.string().optional(),
102
+ }).optional(),
103
+ discountRule: z.object({
104
+ _id: z.string().optional(),
105
+ amount: priceSchema.optional(),
106
+ name: z.object({
107
+ original: z.string(),
108
+ translated: z.string(),
109
+ }),
110
+ }).optional(),
111
+ merchantDiscount: z.object({
112
+ amount: priceSchema,
113
+ description: z.string().optional(),
114
+ discountReason: z.enum(['EXCHANGED_ITEMS', 'UNSPECIFIED']).optional(),
115
+ }).optional(),
116
+ });
117
+
118
+ const additionalFeeSchema = z.object({
119
+ _id: z.string(),
120
+ code: z.string(),
121
+ lineItemIds: z.array(z.string()).optional(),
122
+ name: z.string(),
123
+ price: priceSchema,
124
+ priceAfterTax: priceSchema.optional(),
125
+ priceBeforeTax: priceSchema.optional(),
126
+ providerAppId: z.string().optional(),
127
+ taxDetails: itemTaxFullDetailsSchema.optional(),
128
+ });
129
+
130
+ const eventMetadataSchema = z.object({
131
+ id: z.string(),
132
+ entityId: z.string(),
133
+ eventTime: z.string(),
134
+ triggeredByAnonymizeRequest: z.boolean().optional(),
135
+ });
136
+
137
+ const orderSchema = z.object({
138
+ number: z.string(),
139
+ lineItems: z.array(lineItemSchema),
140
+ buyerInfo: z.object({
141
+ contactId: z.string(),
142
+ email: z.string(),
143
+ memberId: z.string().optional(),
144
+ visitorId: z.string().optional(),
145
+ buyerLanguage: z.string().optional(), // Made optional to avoid the error
146
+ buyerNote: z.string().optional(),
147
+ }),
148
+ paymentStatus: z.enum(['FULLY_REFUNDED', 'NOT_PAID', 'PAID', 'PARTIALLY_PAID', 'PARTIALLY_REFUNDED', 'PENDING', 'UNSPECIFIED']),
149
+ fulfillmentStatus: z.string().optional(),
150
+ currency: z.string(),
151
+ taxIncludedInPrices: z.boolean(),
152
+ siteLanguage: z.string().optional(),
153
+ priceSummary: z.object({
154
+ subtotal: priceSchema,
155
+ shipping: priceSchema.optional(),
156
+ tax: priceSchema.optional(),
157
+ discount: priceSchema.optional(),
158
+ totalPrice: priceSchema,
159
+ total: priceSchema,
160
+ totalWithGiftCard: priceSchema.optional(),
161
+ totalWithoutGiftCard: priceSchema.optional(),
162
+ totalAdditionalFees: priceSchema.optional(),
163
+ }),
164
+ billingInfo: z.object({
165
+ address: addressSchema.optional(),
166
+ contactDetails: fullAddressContactDetailsSchema,
167
+ }).optional(),
168
+ status: z.enum(['APPROVED', 'CANCELED', 'INITIALIZED']),
169
+ archived: z.boolean(),
170
+ taxSummary: z.object({
171
+ totalTax: priceSchema.optional(),
172
+ manualTaxRate: z.string().optional(),
173
+ }).optional(),
174
+ taxInfo: z.object({
175
+ totalTax: priceSchema.optional(),
176
+ taxBreakdown: z.array(z.unknown()).optional(),
177
+ manualTaxRate: z.string().optional(),
178
+ }).optional(),
179
+ appliedDiscounts: z.array(appliedDiscountSchema).optional(),
180
+ activities: z.array(
181
+ z.object({
182
+ type: z.string(),
183
+ _id: z.string(),
184
+ _createdDate: z.union([z.string(), z.date()]), // Accepts either a string or a date
185
+ })
186
+ ),
187
+ attributionSource: z.enum(['FACEBOOK_ADS', 'UNSPECIFIED']).optional(),
188
+ createdBy: z.record(z.unknown()).optional(),
189
+ channelInfo: z.object({
190
+ type: z.enum([
191
+ 'AMAZON', 'BACKOFFICE_MERCHANT', 'CLASS_PASS', 'EBAY', 'ETSY',
192
+ 'FACEBOOK', 'FAIRE_COM', 'GLOBAL_E', 'OTHER_PLATFORM', 'POS',
193
+ 'TIKTOK', 'UNSPECIFIED', 'WEB', 'WISH', 'WIX_APP_STORE', 'WIX_INVOICES'
194
+ ]),
195
+ }).optional(),
196
+ seenByAHuman: z.boolean().optional(),
197
+ checkoutId: z.string().optional(),
198
+ customFields: z.array(z.unknown()).optional(),
199
+ cartId: z.string().optional(),
200
+ isInternalOrderCreate: z.boolean().optional(),
201
+ payNow: z.object({
202
+ subtotal: priceSchema,
203
+ shipping: priceSchema.optional(),
204
+ tax: priceSchema.optional(),
205
+ discount: priceSchema.optional(),
206
+ totalPrice: priceSchema,
207
+ total: priceSchema,
208
+ totalWithGiftCard: priceSchema.optional(),
209
+ totalWithoutGiftCard: priceSchema.optional(),
210
+ totalAdditionalFees: priceSchema.optional(),
211
+ }).optional(),
212
+ balanceSummary: z.object({
213
+ balance: priceSchema,
214
+ paid: priceSchema,
215
+ refunded: priceSchema.optional(),
216
+ authorized: priceSchema.optional(),
217
+ pendingRefund: priceSchema.optional(),
218
+ }).optional(),
219
+ additionalFees: z.array(additionalFeeSchema).optional(),
220
+ purchaseFlowId: z.string().optional(),
221
+ recipientInfo: z.object({
222
+ address: addressSchema.optional(), // Made optional to avoid the error
223
+ contactDetails: fullAddressContactDetailsSchema,
224
+ }).optional(),
225
+ });
226
+
227
+ export const orderPaymentStatusUpdatedSchema = z.object({
228
+ metadata: eventMetadataSchema,
229
+ data: z.object({
230
+ order: orderSchema,
231
+ previousPaymentStatus: z.enum(['FULLY_REFUNDED', 'NOT_PAID', 'PAID', 'PARTIALLY_PAID', 'PARTIALLY_REFUNDED', 'PENDING', 'UNSPECIFIED']).optional(),
232
+ }),
233
+ });
234
+
235
+ export type OrderPaymentStatusUpdated = z.infer<typeof orderPaymentStatusUpdatedSchema>;
236
+ export type OrderSchema = z.infer<typeof orderSchema>;
@@ -133,5 +133,5 @@
133
133
  "e2e": "cypress-cloud run --parallel --record"
134
134
  },
135
135
  "type": "velo",
136
- "packageManager": "pnpm"
136
+ "packageManager": "yarn"
137
137
  }
package/lucy ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node --no-warnings
2
+
3
+ // This is a wrapper script that runs the lucy-cli with warnings suppressed
4
+ import('./dist/index.js').catch(console.error);
package/lucy.jpg CHANGED
Binary file
@@ -0,0 +1,188 @@
1
+ <!DOCTYPE html>
2
+ <html lang="de">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Mitarbeiter Login</title>
7
+ <style>
8
+ @import url('https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed&display=swap');
9
+
10
+ * {
11
+ margin: 0;
12
+ padding: 0;
13
+ box-sizing: border-box;
14
+ }
15
+
16
+ body {
17
+ font-family: 'Barlow Semi Condensed', sans-serif;
18
+ height: 100vh;
19
+ display: flex;
20
+ justify-content: center;
21
+ align-items: center;
22
+ background-color: #f0f0f0;
23
+ }
24
+
25
+ .login-container {
26
+ position: relative;
27
+ width: 1200px;
28
+ height: 1920px;
29
+ border-radius: 20px;
30
+ overflow: hidden;
31
+ background: radial-gradient(ellipse at center,
32
+ rgba(122,206,255,1) 0%,
33
+ rgba(92,187,243,1) 10.677%,
34
+ rgba(61,168,231,1) 21.354%,
35
+ rgba(31,148,218,1) 32.031%,
36
+ rgba(15,139,212,1) 37.37%,
37
+ rgba(0,129,206,1) 42.708%,
38
+ rgba(14,111,169,1) 51.563%,
39
+ rgba(28,93,132,1) 60.417%,
40
+ rgba(41,74,94,1) 69.271%,
41
+ rgba(55,56,57,1) 78.125%);
42
+ }
43
+
44
+ .login-button {
45
+ position: absolute;
46
+ top: 50%;
47
+ left: 50%;
48
+ transform: translate(-50%, -50%);
49
+ width: 440px;
50
+ height: 440px;
51
+ background-color: #ffffff;
52
+ border-radius: 9999px;
53
+ display: flex;
54
+ align-items: center;
55
+ justify-content: center;
56
+ padding: 10px 24px;
57
+ box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
58
+ }
59
+
60
+ .login-text {
61
+ font-family: 'Barlow Semi Condensed', sans-serif;
62
+ font-size: 56px;
63
+ font-weight: 400;
64
+ color: #363839;
65
+ text-align: center;
66
+ line-height: 1;
67
+ }
68
+
69
+ .instruction-text {
70
+ position: absolute;
71
+ top: 608px;
72
+ left: 50%;
73
+ transform: translateX(-50%);
74
+ width: 1030px;
75
+ height: 102px;
76
+ display: flex;
77
+ align-items: center;
78
+ justify-content: center;
79
+ font-family: 'Barlow Semi Condensed', sans-serif;
80
+ font-size: 56px;
81
+ font-weight: 400;
82
+ color: #ffffff;
83
+ text-align: center;
84
+ line-height: 1;
85
+ }
86
+
87
+ .icon-button {
88
+ position: absolute;
89
+ bottom: 20px;
90
+ left: 14px;
91
+ width: 80px;
92
+ height: 80px;
93
+ background-color: #363839;
94
+ border-radius: 100px;
95
+ display: flex;
96
+ align-items: center;
97
+ justify-content: center;
98
+ border: 4px solid #ffffff;
99
+ }
100
+
101
+ .icon {
102
+ width: 50px;
103
+ height: 50px;
104
+ position: relative;
105
+ }
106
+
107
+ .icon-inner {
108
+ position: absolute;
109
+ top: 16.667%;
110
+ left: 16.667%;
111
+ width: 66.666%;
112
+ height: 66.666%;
113
+ background-color: #ffffff;
114
+ border-radius: 8px;
115
+ }
116
+
117
+ .logo {
118
+ position: absolute;
119
+ bottom: 95px;
120
+ right: 98px;
121
+ width: 600px;
122
+ height: 125px;
123
+ background-color: rgba(255, 255, 255, 0.1);
124
+ border-radius: 10px;
125
+ display: flex;
126
+ align-items: center;
127
+ justify-content: center;
128
+ color: #ffffff;
129
+ font-size: 24px;
130
+ }
131
+
132
+ /* Responsive adjustments */
133
+ @media (max-width: 1200px) {
134
+ .login-container {
135
+ width: 100vw;
136
+ height: 100vh;
137
+ border-radius: 0;
138
+ }
139
+
140
+ .login-button {
141
+ width: 300px;
142
+ height: 300px;
143
+ }
144
+
145
+ .login-text {
146
+ font-size: 40px;
147
+ }
148
+
149
+ .instruction-text {
150
+ width: 90%;
151
+ font-size: 40px;
152
+ }
153
+
154
+ .logo {
155
+ width: 400px;
156
+ height: 80px;
157
+ right: 20px;
158
+ bottom: 60px;
159
+ }
160
+ }
161
+ </style>
162
+ </head>
163
+ <body>
164
+ <div class="login-container">
165
+ <!-- Main Login Button -->
166
+ <div class="login-button">
167
+ <div class="login-text">LOGIN</div>
168
+ </div>
169
+
170
+ <!-- Instruction Text -->
171
+ <div class="instruction-text">
172
+ <p>Mitarbeiterausweis an das Gerät halten.</p>
173
+ </div>
174
+
175
+ <!-- Icon Button -->
176
+ <div class="icon-button">
177
+ <div class="icon">
178
+ <div class="icon-inner"></div>
179
+ </div>
180
+ </div>
181
+
182
+ <!-- Logo Placeholder -->
183
+ <div class="logo">
184
+ [Logo Placeholder]
185
+ </div>
186
+ </div>
187
+ </body>
188
+ </html>
package/old/index.ts CHANGED
File without changes
package/package.json CHANGED
@@ -1,17 +1,12 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "lucy-cli",
4
- "version": "2.0.0-beta.1",
4
+ "version": "2.0.0-beta.10",
5
5
  "description": "Lucy Framework for WIX Studio Editor",
6
6
  "main": ".dist/index.js",
7
- "scripts": {
8
- "build": "tsc",
9
- "dev": "tsc -w",
10
- "postinstall": "patch-package"
11
- },
12
7
  "repository": {
13
8
  "type": "git",
14
- "url": "git+https://github.com/Integral-Systems/wix-lucy-cli.git"
9
+ "url": "git+https://github.com/Sunnyside-UP-GmbH/lucy-cli.git"
15
10
  },
16
11
  "keywords": [
17
12
  "WIX",
@@ -24,16 +19,16 @@
24
19
  "author": "Gradlon von Känel",
25
20
  "license": "GPL-3.0-or-later",
26
21
  "bugs": {
27
- "url": "https://github.com/Integral-Systems/wix-lucy-cli/issues"
22
+ "url": "https://github.com/Sunnyside-UP-GmbH/lucy-cli/issues"
28
23
  },
29
- "homepage": "https://github.com/Integral-Systems/wix-lucy-cli#readme",
30
- "bin": "./dist/index.js",
24
+ "homepage": "https://github.com/Sunnyside-UP-GmbH/lucy-cli#readme",
25
+ "bin": "./lucy",
31
26
  "publishConfig": {
32
27
  "registry": "https://registry.npmjs.org"
33
28
  },
34
29
  "dependencies": {
35
- "@effect/platform": "^0.90.0",
36
- "@effect/platform-node": "^0.94.0",
30
+ "@effect/platform": "0.92.1",
31
+ "@effect/platform-node": "0.98.3",
37
32
  "@swc/core": "^1.9.3",
38
33
  "@wix/cli": "^1.0.83",
39
34
  "@wix/data": "^1.0.270",
@@ -98,9 +93,15 @@
98
93
  "@typescript-eslint/utils": "8.39.0",
99
94
  "eslint": "9.32.0",
100
95
  "eslint-plugin-import": "^2.27.5",
101
- "eslint-plugin-jsdoc": "52.0.4",
96
+ "eslint-plugin-jsdoc": "60.8.2",
102
97
  "eslint-plugin-named-import-spacing": "^1.0.3",
103
98
  "eslint-plugin-simple-import-sort": "12.1.1",
104
99
  "ts-node": "10.9.2"
100
+ },
101
+ "scripts": {
102
+ "build": "tsc",
103
+ "dev": "tsc -w",
104
+ "postinstall": "patch-package",
105
+ "start": "NODE_OPTIONS='--no-warnings' node dist/index.js"
105
106
  }
106
- }
107
+ }
@@ -0,0 +1,6 @@
1
+ onlyBuiltDependencies:
2
+ - '@parcel/watcher'
3
+ - '@swc/core'
4
+ - msgpackr-extract
5
+ - sqlite3
6
+ - unrs-resolver
package/src/args.ts CHANGED
@@ -72,7 +72,47 @@ export async function get_args(): Promise<LucyArgs> {
72
72
  .alias('h', 'help')
73
73
  .strict()
74
74
  .wrap(yargs().terminalWidth())
75
- .epilogue('For more information, visit https://github.com/your-repo/wix-lucy-cli')
75
+ .epilogue(`
76
+ 🦮 Lucy CLI - Complete Command Overview
77
+
78
+ 📋 Available Commands:
79
+ init <type> Initialize a new Lucy project (types: ${initTypes.join(', ')})
80
+ open Open the Lucy home directory
81
+ task <name> Run a task (tasks: ${taskNames.join(', ')})
82
+ wix-sync <action> Run velo-sync actions (actions: ${syncActions.join(', ')})
83
+ wix-sdk <action> Run Wix SDK actions
84
+
85
+ 🔧 Available Tasks:
86
+ dev Start development environment
87
+ build Build the project
88
+ build-prod Build for production
89
+ build-pipeline Build pipeline
90
+ sync-settings Sync settings
91
+
92
+ 🔄 Wix Sync Actions:
93
+ sync Synchronize collections
94
+ import Import data from CSV
95
+ init Initialize sync configuration
96
+ is-alive Check if sync is alive
97
+ migrate Migrate data
98
+ export Export data
99
+
100
+ ⚙️ Global Options:
101
+ -h, --help Show this help message
102
+ -v, --version Show version number
103
+ -f, --force Force execution (use with caution)
104
+
105
+ 📁 Project Types:
106
+ velo Wix Velo project
107
+ expo React Native with Expo
108
+ blocks Wix Blocks
109
+ monorepo Monorepo setup
110
+ tauri Tauri desktop app
111
+ cargo Rust project
112
+ wix-sdk Wix SDK setup
113
+
114
+ For more information, visit https://github.com/Sunnyside-UP-GmbH/lucy-cli
115
+ `)
76
116
  .parseAsync();
77
117
 
78
118
  // The cast is now safer with the defined interface.
@@ -5,6 +5,7 @@ import { logger } from "../utils/logger.js";
5
5
  import { FileSystem } from "@effect/platform"
6
6
  import Enquirer from "enquirer";
7
7
  import { AppError } from "../error.js";
8
+ import { editors } from "../schemas/index.js";
8
9
 
9
10
  export const execCommand = Effect.gen(function*() {
10
11
  const config = yield* Config;
@@ -38,22 +39,16 @@ export const open = Effect.scoped(Effect.gen(function*() {
38
39
  yield* command.pipe().pipe(Command.stdout("inherit"), Command.stderr("inherit"), Command.exitCode);
39
40
  }))
40
41
 
41
- export const openVSCode = Effect.gen(function*() {
42
+ export const openEditor = Effect.gen(function*() {
42
43
  const config = yield* Config;
43
- const open = Command.make(
44
- "code",
45
- config.config.cwd,
46
- ).pipe(
47
- Command.stdout("inherit"), // Stream stdout to process.stdout
48
- Command.stderr("inherit"), // Stream stderr to process.stderr
49
- Command.exitCode // Get the exit code
50
- )
51
- const overwriteQuestion = new Enquirer();
52
- const openVScodeQuestion = yield* Effect.tryPromise({
53
- try: () => overwriteQuestion.prompt({
54
- type: 'confirm',
55
- name: 'openVSCode',
56
- message: `Do you want to open the project in VSCode?`,
44
+
45
+ const editorQuestion = new Enquirer();
46
+ const openEditorQuestion = yield* Effect.tryPromise({
47
+ try: () => editorQuestion.prompt({
48
+ type: 'select',
49
+ name: 'openEditor',
50
+ message: `Do you want to open the project in a supported editor?`,
51
+ choices: [...editors, 'No'],
57
52
  }),
58
53
  catch: (e) => {
59
54
  return new AppError({
@@ -62,8 +57,17 @@ export const openVSCode = Effect.gen(function*() {
62
57
  });
63
58
  }
64
59
  })
65
- const choice = yield* Schema.decodeUnknown(Schema.Struct({ openVSCode: Schema.Boolean }))(openVScodeQuestion);
66
- if (choice.openVSCode) {
60
+ const choice = yield* Schema.decodeUnknown(Schema.Struct({ openEditor: Schema.Literal(...editors, 'No') }))(openEditorQuestion);
61
+
62
+ const open = Command.make(
63
+ choice.openEditor,
64
+ config.config.cwd,
65
+ ).pipe(
66
+ Command.stdout("inherit"), // Stream stdout to process.stdout
67
+ Command.stderr("inherit"), // Stream stderr to process.stderr
68
+ Command.exitCode // Get the exit code
69
+ )
70
+ if (choice.openEditor !== 'No') {
67
71
  yield* open
68
72
  }
69
- })
73
+ })
@@ -1,6 +1,6 @@
1
1
  import { Effect } from "effect/index";
2
2
  import { Config } from "../config.js";
3
- import { FileSystem } from "@effect/platform"
3
+ import { FileSystem, Path } from "@effect/platform"
4
4
  import { logger, orange } from "../utils/logger.js";
5
5
  import path, { join } from 'path';
6
6
 
@@ -8,15 +8,49 @@ export const createLucyHome = () => {
8
8
  return Effect.gen(function*() {
9
9
  const config = yield* Config
10
10
  const fs = yield* FileSystem.FileSystem
11
+ const p = yield* Path.Path
11
12
 
12
13
  if(!(yield* fs.exists(config.config.lucyHome))) {
13
14
  logger.action(`Creating Lucy home directory at ${orange(config.config.lucyHome)}`);
14
15
  yield* fs.makeDirectory(config.config.lucyHome, { recursive: true });
15
16
  }
16
17
  const templateFiles = yield* fs.readDirectory(config.config.filesFolder)
18
+
19
+ const shouldExclude = (relativePath: string): boolean => {
20
+ const segments = relativePath.split(/[/\\]/)
21
+ return segments.includes("node_modules") || segments.includes("Pods")
22
+ }
23
+
24
+ const copyDirFiltered = (src: string, dest: string, base?: string): Effect.Effect<void, any> =>
25
+ Effect.gen(function*() {
26
+ const entries = yield* fs.readDirectory(src)
27
+ yield* fs.makeDirectory(dest, { recursive: true })
28
+ yield* Effect.forEach(
29
+ entries,
30
+ (entry) => Effect.gen(function*() {
31
+ const from = p.join(src, entry)
32
+ const to = p.join(dest, entry)
33
+ const rel = base ? p.relative(base, from) : entry
34
+
35
+ if (shouldExclude(rel)) {
36
+ return
37
+ }
38
+
39
+ const stat = yield* fs.stat(from)
40
+ if (stat.type === "Directory") {
41
+ yield* copyDirFiltered(from, to, base ?? src)
42
+ return
43
+ }
44
+ yield* fs.copyFile(from, to)
45
+ }),
46
+ { discard: true }
47
+ )
48
+ })
49
+
17
50
  yield* Effect.forEach(
18
51
  templateFiles,
19
- (file) => fs.copy(path.join(config.config.filesFolder, file), path.join(config.config.lucyHome, file), { overwrite: true })
52
+ (file) => copyDirFiltered(path.join(config.config.filesFolder, file), path.join(config.config.lucyHome, file)),
53
+ { discard: true }
20
54
  )
21
55
  });
22
56
  }