lucy-cli 1.2.4 → 2.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. package/README.md +4 -3
  2. package/dist/args.d.ts +7 -0
  3. package/dist/args.js +23 -0
  4. package/dist/commands.d.ts +3 -0
  5. package/dist/commands.js +18 -0
  6. package/dist/config.d.ts +20 -0
  7. package/dist/config.js +39 -0
  8. package/dist/error.d.ts +17 -0
  9. package/dist/error.js +5 -0
  10. package/dist/helpers.d.ts +1 -32
  11. package/dist/helpers.js +6 -261
  12. package/dist/index.d.ts +2 -52
  13. package/dist/index.js +25 -282
  14. package/dist/init.d.ts +4 -8
  15. package/dist/init.js +245 -160
  16. package/dist/params.d.ts +7 -0
  17. package/dist/params.js +23 -0
  18. package/dist/policy.d.ts +3 -0
  19. package/dist/policy.js +5 -0
  20. package/dist/prepare.d.ts +0 -8
  21. package/dist/prepare.js +20 -19
  22. package/dist/runtime.d.ts +5 -0
  23. package/dist/runtime.js +11 -0
  24. package/dist/schemas/index.d.ts +2 -0
  25. package/dist/schemas/index.js +2 -0
  26. package/dist/schemas/types.js +1 -0
  27. package/dist/states.d.ts +10 -0
  28. package/dist/states.js +7 -0
  29. package/files/expo/.env +1 -0
  30. package/files/expo/.nvmrc +1 -0
  31. package/files/expo/.prettierignore +23 -0
  32. package/files/expo/.prettierrc.json +16 -0
  33. package/files/expo/.yarnrc +1 -0
  34. package/files/expo/.yarnrc.yml +3 -0
  35. package/files/expo/app/(tabs)/_layout.tsx +45 -0
  36. package/files/expo/app/_layout.tsx +45 -0
  37. package/files/expo/babel.config.js +9 -0
  38. package/files/expo/constants/Colors.ts +27 -0
  39. package/files/expo/constants/theme.ts +18 -0
  40. package/files/expo/eas.json +26 -0
  41. package/files/expo/eslint.config.js +185 -0
  42. package/files/expo/global.css +47 -0
  43. package/files/expo/hooks/useColorScheme.ts +11 -0
  44. package/files/expo/hooks/useColorScheme.web.ts +21 -0
  45. package/files/expo/hooks/useColorSchemeRN.ts +1 -0
  46. package/files/expo/hooks/useThemeColor.ts +21 -0
  47. package/files/expo/lib/data.ts +45 -0
  48. package/files/expo/lib/utils/index.ts +6 -0
  49. package/files/expo/lib/utils/polyfills.ts +29 -0
  50. package/files/expo/lib/wix/client.ts +14 -0
  51. package/files/expo/lib/wix/index.ts +1 -0
  52. package/files/expo/lucy.json +8 -0
  53. package/files/expo/readme.md +45 -0
  54. package/files/expo/tailwind.config.js +198 -0
  55. package/files/expo/tsconfig.json +40 -0
  56. package/files/expo/types/nativewind-env.d.ts +1 -0
  57. package/files/expo/types/reset.d.ts +1 -0
  58. package/files/velo/typescript/styles/global.scss +0 -0
  59. package/package.json +14 -11
  60. package/src/args.ts +36 -0
  61. package/src/commands.ts +21 -0
  62. package/src/config.ts +61 -0
  63. package/src/error.ts +4 -0
  64. package/src/helpers.ts +7 -305
  65. package/src/index.ts +29 -362
  66. package/src/init.ts +345 -177
  67. package/src/policy.ts +6 -0
  68. package/src/prepare.ts +19 -19
  69. package/src/runtime.ts +20 -0
  70. package/src/schemas/index.ts +3 -0
  71. package/src/schemas/types.ts +0 -0
  72. package/src/states.ts +15 -0
  73. package/{src/Gulpfile.ts → src copy/Gulpfile.ts } +3 -1
  74. package/{src/gulp/backend.ts → src copy/gulp/backend.ts } +3 -12
  75. package/{src/gulp/checks.ts → src copy/gulp/checks.ts } +2 -6
  76. package/{src/gulp/copy.ts → src copy/gulp/copy.ts } +1 -6
  77. package/src copy/gulp/helpers.ts +26 -0
  78. package/{src/gulp/public.ts → src copy/gulp/public.ts } +1 -6
  79. package/{src/gulp/styles.ts → src copy/gulp/styles.ts } +2 -7
  80. package/{src/gulp/templates.ts → src copy/gulp/templates.ts } +1 -6
  81. package/src copy/helpers.ts +307 -0
  82. package/src copy/index.ts +379 -0
  83. package/src copy/init.ts +183 -0
  84. package/src copy/models.ts +35 -0
  85. package/src copy/prepare.ts +24 -0
  86. package/src copy/schemas/index.ts +0 -0
  87. package/src copy/schemas/types.ts +0 -0
  88. package/src copy/settings.json +67 -0
  89. package/src copy/types.d.ts +8 -0
  90. package/dist/Gulpfile.d.ts +0 -33
  91. package/dist/Gulpfile.js +0 -114
  92. package/dist/cli.d.ts +0 -2
  93. package/dist/cli.js +0 -44
  94. package/dist/dev.d.ts +0 -2
  95. package/dist/dev.js +0 -14
  96. package/dist/gulp/backend copy.d.ts +0 -4
  97. package/dist/gulp/backend copy.js +0 -50
  98. package/dist/gulp/backend.d.ts +0 -3
  99. package/dist/gulp/backend.js +0 -101
  100. package/dist/gulp/checks.d.ts +0 -3
  101. package/dist/gulp/checks.js +0 -209
  102. package/dist/gulp/clean copy.d.ts +0 -2
  103. package/dist/gulp/clean copy.js +0 -19
  104. package/dist/gulp/clean.d.ts +0 -3
  105. package/dist/gulp/clean.js +0 -28
  106. package/dist/gulp/copy.d.ts +0 -2
  107. package/dist/gulp/copy.js +0 -38
  108. package/dist/gulp/docs.d.ts +0 -2
  109. package/dist/gulp/docs.js +0 -27
  110. package/dist/gulp/helpers.d.ts +0 -1
  111. package/dist/gulp/helpers.js +0 -7
  112. package/dist/gulp/pages copy.d.ts +0 -3
  113. package/dist/gulp/pages copy.js +0 -22
  114. package/dist/gulp/pages.d.ts +0 -2
  115. package/dist/gulp/pages.js +0 -36
  116. package/dist/gulp/pipeline.d.ts +0 -1
  117. package/dist/gulp/pipeline.js +0 -28
  118. package/dist/gulp/public.d.ts +0 -2
  119. package/dist/gulp/public.js +0 -54
  120. package/dist/gulp/styles.d.ts +0 -2
  121. package/dist/gulp/styles.js +0 -44
  122. package/dist/gulp/templates.d.ts +0 -2
  123. package/dist/gulp/templates.js +0 -37
  124. package/dist/gulp/test.d.ts +0 -2
  125. package/dist/gulp/test.js +0 -26
  126. package/dist/gulp/types.d.ts +0 -4
  127. package/dist/gulp/types.js +0 -288
  128. package/dist/gulp/watchers.d.ts +0 -9
  129. package/dist/gulp/watchers.js +0 -58
  130. package/dist/init copy.d.ts +0 -8
  131. package/dist/init copy.js +0 -167
  132. package/dist/install.d.ts +0 -2
  133. package/dist/install.js +0 -53
  134. package/dist/settings.json +0 -67
  135. package/dist/start_gulp.d.ts +0 -2
  136. package/dist/start_gulp.js +0 -14
  137. package/dist/sync.d.ts +0 -2
  138. package/dist/sync.js +0 -87
  139. package/src/gulp/helpers.ts +0 -9
  140. /package/{files/.gitmodules → dist/schemas/types.d.ts} +0 -0
  141. /package/files/{typescript/__mocks__/.gitkeep → velo/.gitmodules} +0 -0
  142. /package/files/{.madgerc → velo/.madgerc} +0 -0
  143. /package/files/{.nvmrc → velo/.nvmrc} +0 -0
  144. /package/files/{.stylelintrc.js → velo/.stylelintrc.js} +0 -0
  145. /package/files/{.yarnrc.yml → velo/.yarnrc.yml} +0 -0
  146. /package/files/{currents.config.js → velo/currents.config.js} +0 -0
  147. /package/files/{cypress → velo/cypress}/e2e/base/base.cy.ts +0 -0
  148. /package/files/{cypress → velo/cypress}/fixtures/example.json +0 -0
  149. /package/files/{cypress → velo/cypress}/support/commands.ts +0 -0
  150. /package/files/{cypress → velo/cypress}/support/e2e.ts +0 -0
  151. /package/files/{cypress → velo/cypress}/tsconfig.json +0 -0
  152. /package/files/{cypress.config.mjs → velo/cypress.config.mjs} +0 -0
  153. /package/files/{eslint.config.mjs → velo/eslint.config.mjs} +0 -0
  154. /package/files/{local.tsconfig.json → velo/local.tsconfig.json} +0 -0
  155. /package/files/{typedoc.json → velo/typedoc.json} +0 -0
  156. /package/files/{typescript/pages → velo/typescript/__mocks__}/.gitkeep +0 -0
  157. /package/files/{typescript → velo/typescript}/backend/data.ts +0 -0
  158. /package/files/{typescript → velo/typescript}/backend/events.ts +0 -0
  159. /package/files/{typescript → velo/typescript}/backend/http-functions.ts +0 -0
  160. /package/files/{typescript → velo/typescript}/backend/lib/http-functions/sync.ts +0 -0
  161. /package/files/{typescript → velo/typescript}/backend/permissions.json +0 -0
  162. /package/files/{typescript/public → velo/typescript/pages}/.gitkeep +0 -0
  163. /package/files/{typescript/styles → velo/typescript/public}/.gitkeep +0 -0
  164. /package/files/{typescript → velo/typescript}/public/scss/app.scss +0 -0
  165. /package/files/{typescript/styles/global.scss → velo/typescript/styles/.gitkeep} +0 -0
  166. /package/files/{typescript → velo/typescript}/tsconfig.json +0 -0
  167. /package/files/{vitest.config.ts → velo/vitest.config.ts} +0 -0
  168. /package/{src → src copy}/gulp/clean.ts +0 -0
  169. /package/{src → src copy}/gulp/pages.ts +0 -0
  170. /package/{src → src copy}/gulp/pipeline.ts +0 -0
  171. /package/{src → src copy}/gulp/types.ts +0 -0
  172. /package/{src → src copy}/gulp/watchers.ts +0 -0
  173. /package/{src → src copy}/sync.ts +0 -0
@@ -0,0 +1,198 @@
1
+ import gluestackPlugin from '@gluestack-ui/nativewind-utils/tailwind-plugin';
2
+
3
+ /** @type {import('tailwindcss').Config} */
4
+ module.exports = {
5
+ darkMode: "media",
6
+ content: ["app/**/*.{tsx,jsx,ts,js}", "components/**/*.{tsx,jsx,ts,js}"],
7
+ presets: [require('nativewind/preset')],
8
+ safelist: [
9
+ {
10
+ pattern:
11
+ /(bg|border|text|stroke|fill)-(primary|secondary|tertiary|error|success|warning|info|typography|outline|background|indicator)-(0|50|100|200|300|400|500|600|700|800|900|950|white|gray|black|error|warning|muted|success|info|light|dark|primary)/,
12
+ },
13
+ ],
14
+ theme: {
15
+ extend: {
16
+ colors: {
17
+ primary: {
18
+ 0: 'rgb(var(--color-primary-0)/<alpha-value>)',
19
+ 50: 'rgb(var(--color-primary-50)/<alpha-value>)',
20
+ 100: 'rgb(var(--color-primary-100)/<alpha-value>)',
21
+ 200: 'rgb(var(--color-primary-200)/<alpha-value>)',
22
+ 300: 'rgb(var(--color-primary-300)/<alpha-value>)',
23
+ 400: 'rgb(var(--color-primary-400)/<alpha-value>)',
24
+ 500: 'rgb(var(--color-primary-500)/<alpha-value>)',
25
+ 600: 'rgb(var(--color-primary-600)/<alpha-value>)',
26
+ 700: 'rgb(var(--color-primary-700)/<alpha-value>)',
27
+ 800: 'rgb(var(--color-primary-800)/<alpha-value>)',
28
+ 900: 'rgb(var(--color-primary-900)/<alpha-value>)',
29
+ 950: 'rgb(var(--color-primary-950)/<alpha-value>)',
30
+ },
31
+ secondary: {
32
+ 0: 'rgb(var(--color-secondary-0)/<alpha-value>)',
33
+ 50: 'rgb(var(--color-secondary-50)/<alpha-value>)',
34
+ 100: 'rgb(var(--color-secondary-100)/<alpha-value>)',
35
+ 200: 'rgb(var(--color-secondary-200)/<alpha-value>)',
36
+ 300: 'rgb(var(--color-secondary-300)/<alpha-value>)',
37
+ 400: 'rgb(var(--color-secondary-400)/<alpha-value>)',
38
+ 500: 'rgb(var(--color-secondary-500)/<alpha-value>)',
39
+ 600: 'rgb(var(--color-secondary-600)/<alpha-value>)',
40
+ 700: 'rgb(var(--color-secondary-700)/<alpha-value>)',
41
+ 800: 'rgb(var(--color-secondary-800)/<alpha-value>)',
42
+ 900: 'rgb(var(--color-secondary-900)/<alpha-value>)',
43
+ 950: 'rgb(var(--color-secondary-950)/<alpha-value>)',
44
+ },
45
+ tertiary: {
46
+ 50: 'rgb(var(--color-tertiary-50)/<alpha-value>)',
47
+ 100: 'rgb(var(--color-tertiary-100)/<alpha-value>)',
48
+ 200: 'rgb(var(--color-tertiary-200)/<alpha-value>)',
49
+ 300: 'rgb(var(--color-tertiary-300)/<alpha-value>)',
50
+ 400: 'rgb(var(--color-tertiary-400)/<alpha-value>)',
51
+ 500: 'rgb(var(--color-tertiary-500)/<alpha-value>)',
52
+ 600: 'rgb(var(--color-tertiary-600)/<alpha-value>)',
53
+ 700: 'rgb(var(--color-tertiary-700)/<alpha-value>)',
54
+ 800: 'rgb(var(--color-tertiary-800)/<alpha-value>)',
55
+ 900: 'rgb(var(--color-tertiary-900)/<alpha-value>)',
56
+ 950: 'rgb(var(--color-tertiary-950)/<alpha-value>)',
57
+ },
58
+ error: {
59
+ 0: 'rgb(var(--color-error-0)/<alpha-value>)',
60
+ 50: 'rgb(var(--color-error-50)/<alpha-value>)',
61
+ 100: 'rgb(var(--color-error-100)/<alpha-value>)',
62
+ 200: 'rgb(var(--color-error-200)/<alpha-value>)',
63
+ 300: 'rgb(var(--color-error-300)/<alpha-value>)',
64
+ 400: 'rgb(var(--color-error-400)/<alpha-value>)',
65
+ 500: 'rgb(var(--color-error-500)/<alpha-value>)',
66
+ 600: 'rgb(var(--color-error-600)/<alpha-value>)',
67
+ 700: 'rgb(var(--color-error-700)/<alpha-value>)',
68
+ 800: 'rgb(var(--color-error-800)/<alpha-value>)',
69
+ 900: 'rgb(var(--color-error-900)/<alpha-value>)',
70
+ 950: 'rgb(var(--color-error-950)/<alpha-value>)',
71
+ },
72
+ success: {
73
+ 0: 'rgb(var(--color-success-0)/<alpha-value>)',
74
+ 50: 'rgb(var(--color-success-50)/<alpha-value>)',
75
+ 100: 'rgb(var(--color-success-100)/<alpha-value>)',
76
+ 200: 'rgb(var(--color-success-200)/<alpha-value>)',
77
+ 300: 'rgb(var(--color-success-300)/<alpha-value>)',
78
+ 400: 'rgb(var(--color-success-400)/<alpha-value>)',
79
+ 500: 'rgb(var(--color-success-500)/<alpha-value>)',
80
+ 600: 'rgb(var(--color-success-600)/<alpha-value>)',
81
+ 700: 'rgb(var(--color-success-700)/<alpha-value>)',
82
+ 800: 'rgb(var(--color-success-800)/<alpha-value>)',
83
+ 900: 'rgb(var(--color-success-900)/<alpha-value>)',
84
+ 950: 'rgb(var(--color-success-950)/<alpha-value>)',
85
+ },
86
+ warning: {
87
+ 0: 'rgb(var(--color-warning-0)/<alpha-value>)',
88
+ 50: 'rgb(var(--color-warning-50)/<alpha-value>)',
89
+ 100: 'rgb(var(--color-warning-100)/<alpha-value>)',
90
+ 200: 'rgb(var(--color-warning-200)/<alpha-value>)',
91
+ 300: 'rgb(var(--color-warning-300)/<alpha-value>)',
92
+ 400: 'rgb(var(--color-warning-400)/<alpha-value>)',
93
+ 500: 'rgb(var(--color-warning-500)/<alpha-value>)',
94
+ 600: 'rgb(var(--color-warning-600)/<alpha-value>)',
95
+ 700: 'rgb(var(--color-warning-700)/<alpha-value>)',
96
+ 800: 'rgb(var(--color-warning-800)/<alpha-value>)',
97
+ 900: 'rgb(var(--color-warning-900)/<alpha-value>)',
98
+ 950: 'rgb(var(--color-warning-950)/<alpha-value>)',
99
+ },
100
+ info: {
101
+ 0: 'rgb(var(--color-info-0)/<alpha-value>)',
102
+ 50: 'rgb(var(--color-info-50)/<alpha-value>)',
103
+ 100: 'rgb(var(--color-info-100)/<alpha-value>)',
104
+ 200: 'rgb(var(--color-info-200)/<alpha-value>)',
105
+ 300: 'rgb(var(--color-info-300)/<alpha-value>)',
106
+ 400: 'rgb(var(--color-info-400)/<alpha-value>)',
107
+ 500: 'rgb(var(--color-info-500)/<alpha-value>)',
108
+ 600: 'rgb(var(--color-info-600)/<alpha-value>)',
109
+ 700: 'rgb(var(--color-info-700)/<alpha-value>)',
110
+ 800: 'rgb(var(--color-info-800)/<alpha-value>)',
111
+ 900: 'rgb(var(--color-info-900)/<alpha-value>)',
112
+ 950: 'rgb(var(--color-info-950)/<alpha-value>)',
113
+ },
114
+ typography: {
115
+ 0: 'rgb(var(--color-typography-0)/<alpha-value>)',
116
+ 50: 'rgb(var(--color-typography-50)/<alpha-value>)',
117
+ 100: 'rgb(var(--color-typography-100)/<alpha-value>)',
118
+ 200: 'rgb(var(--color-typography-200)/<alpha-value>)',
119
+ 300: 'rgb(var(--color-typography-300)/<alpha-value>)',
120
+ 400: 'rgb(var(--color-typography-400)/<alpha-value>)',
121
+ 500: 'rgb(var(--color-typography-500)/<alpha-value>)',
122
+ 600: 'rgb(var(--color-typography-600)/<alpha-value>)',
123
+ 700: 'rgb(var(--color-typography-700)/<alpha-value>)',
124
+ 800: 'rgb(var(--color-typography-800)/<alpha-value>)',
125
+ 900: 'rgb(var(--color-typography-900)/<alpha-value>)',
126
+ 950: 'rgb(var(--color-typography-950)/<alpha-value>)',
127
+ white: '#FFFFFF',
128
+ gray: '#D4D4D4',
129
+ black: '#181718',
130
+ },
131
+ outline: {
132
+ 0: 'rgb(var(--color-outline-0)/<alpha-value>)',
133
+ 50: 'rgb(var(--color-outline-50)/<alpha-value>)',
134
+ 100: 'rgb(var(--color-outline-100)/<alpha-value>)',
135
+ 200: 'rgb(var(--color-outline-200)/<alpha-value>)',
136
+ 300: 'rgb(var(--color-outline-300)/<alpha-value>)',
137
+ 400: 'rgb(var(--color-outline-400)/<alpha-value>)',
138
+ 500: 'rgb(var(--color-outline-500)/<alpha-value>)',
139
+ 600: 'rgb(var(--color-outline-600)/<alpha-value>)',
140
+ 700: 'rgb(var(--color-outline-700)/<alpha-value>)',
141
+ 800: 'rgb(var(--color-outline-800)/<alpha-value>)',
142
+ 900: 'rgb(var(--color-outline-900)/<alpha-value>)',
143
+ 950: 'rgb(var(--color-outline-950)/<alpha-value>)',
144
+ },
145
+ background: {
146
+ 0: 'rgb(var(--color-background-0)/<alpha-value>)',
147
+ 50: 'rgb(var(--color-background-50)/<alpha-value>)',
148
+ 100: 'rgb(var(--color-background-100)/<alpha-value>)',
149
+ 200: 'rgb(var(--color-background-200)/<alpha-value>)',
150
+ 300: 'rgb(var(--color-background-300)/<alpha-value>)',
151
+ 400: 'rgb(var(--color-background-400)/<alpha-value>)',
152
+ 500: 'rgb(var(--color-background-500)/<alpha-value>)',
153
+ 600: 'rgb(var(--color-background-600)/<alpha-value>)',
154
+ 700: 'rgb(var(--color-background-700)/<alpha-value>)',
155
+ 800: 'rgb(var(--color-background-800)/<alpha-value>)',
156
+ 900: 'rgb(var(--color-background-900)/<alpha-value>)',
157
+ 950: 'rgb(var(--color-background-950)/<alpha-value>)',
158
+ error: 'rgb(var(--color-background-error)/<alpha-value>)',
159
+ warning: 'rgb(var(--color-background-warning)/<alpha-value>)',
160
+ muted: 'rgb(var(--color-background-muted)/<alpha-value>)',
161
+ success: 'rgb(var(--color-background-success)/<alpha-value>)',
162
+ info: 'rgb(var(--color-background-info)/<alpha-value>)',
163
+ light: '#FBFBFB',
164
+ dark: '#181719',
165
+ },
166
+ indicator: {
167
+ primary: 'rgb(var(--color-indicator-primary)/<alpha-value>)',
168
+ info: 'rgb(var(--color-indicator-info)/<alpha-value>)',
169
+ error: 'rgb(var(--color-indicator-error)/<alpha-value>)',
170
+ },
171
+ },
172
+ fontFamily: {
173
+ heading: undefined,
174
+ body: undefined,
175
+ mono: undefined,
176
+ roboto: ['Roboto', 'sans-serif'],
177
+ },
178
+ fontWeight: {
179
+ extrablack: '950',
180
+ },
181
+ fontSize: {
182
+ '2xs': '10px',
183
+ },
184
+ boxShadow: {
185
+ 'hard-1': '-2px 2px 8px 0px rgba(38, 38, 38, 0.20)',
186
+ 'hard-2': '0px 3px 10px 0px rgba(38, 38, 38, 0.20)',
187
+ 'hard-3': '2px 2px 8px 0px rgba(38, 38, 38, 0.20)',
188
+ 'hard-4': '0px -3px 10px 0px rgba(38, 38, 38, 0.20)',
189
+ 'hard-5': '0px 2px 10px 0px rgba(38, 38, 38, 0.10)',
190
+ 'soft-1': '0px 0px 10px rgba(38, 38, 38, 0.1)',
191
+ 'soft-2': '0px 0px 20px rgba(38, 38, 38, 0.2)',
192
+ 'soft-3': '0px 0px 30px rgba(38, 38, 38, 0.1)',
193
+ 'soft-4': '0px 0px 40px rgba(38, 38, 38, 0.1)',
194
+ },
195
+ },
196
+ },
197
+ plugins: [gluestackPlugin],
198
+ };
@@ -0,0 +1,40 @@
1
+ {
2
+ "extends": "expo/tsconfig.base",
3
+ "compilerOptions": {
4
+ "strict": true,
5
+ "allowSyntheticDefaultImports": true,
6
+ "skipLibCheck": true,
7
+ "forceConsistentCasingInFileNames": true,
8
+ "alwaysStrict": false,
9
+ "noImplicitAny": true,
10
+ "noImplicitReturns": true,
11
+ "noImplicitThis": true,
12
+ "strictNullChecks": true,
13
+ "exactOptionalPropertyTypes": true,
14
+ "strictBindCallApply": true,
15
+ "strictFunctionTypes": true,
16
+ "strictPropertyInitialization": true,
17
+
18
+ // --- Advanced ---
19
+ "preserveConstEnums": true,
20
+ "plugins": [
21
+ {
22
+ "name": "@styled/typescript-styled-plugin"
23
+ },
24
+ {
25
+ "name": "typescript-eslint-language-service"
26
+ },
27
+ ],
28
+ "paths": {
29
+ "@/*": [
30
+ "./*"
31
+ ]
32
+ }
33
+ },
34
+ "include": [
35
+ "**/*.ts",
36
+ "**/*.tsx",
37
+ ".expo/types/**/*.ts",
38
+ "expo-env.d.ts"
39
+ ]
40
+ }
@@ -0,0 +1 @@
1
+ /// <reference types="nativewind/types" />
@@ -0,0 +1 @@
1
+ import "@total-typescript/ts-reset";
File without changes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "lucy-cli",
4
- "version": "1.2.4",
4
+ "version": "2.0.0-alpha.1",
5
5
  "description": "Lucy Framework for WIX Studio Editor",
6
6
  "main": ".dist/index.js",
7
7
  "scripts": {
@@ -32,15 +32,16 @@
32
32
  "registry": "https://registry.npmjs.org"
33
33
  },
34
34
  "dependencies": {
35
+ "@effect/platform": "^0.90.0",
36
+ "@effect/platform-node": "^0.94.0",
35
37
  "@swc/core": "^1.9.3",
36
38
  "@wix/cli": "^1.0.83",
37
39
  "@wix/eslint-plugin-cli": "^1.0.1",
38
40
  "chalk": "^5.3.0",
39
- "cypress": "13.15.2",
40
- "cypress-cloud": "^1.9.3",
41
+ "effect": "^3.17.1",
41
42
  "enquirer": "^2.4.1",
42
- "glob": "^7.2.3",
43
- "gulp": "4.0.2",
43
+ "glob": "11.0.3",
44
+ "gulp": "5.0.1",
44
45
  "gulp-clean": "^0.4.0",
45
46
  "gulp-cli": "3.0.0",
46
47
  "gulp-concat": "^2.6.1",
@@ -52,7 +53,7 @@
52
53
  "gulp-json-editor": "2.6.0",
53
54
  "gulp-plumber": "^1.2.1",
54
55
  "gulp-rename": "^2.0.0",
55
- "gulp-sass": "^5.1.0",
56
+ "gulp-sass": "6.0.1",
56
57
  "gulp-shell": "^0.8.0",
57
58
  "gulp-string-replace": "^1.1.2",
58
59
  "gulp-swc": "^2.2.0",
@@ -60,7 +61,7 @@
60
61
  "gulp-typedoc": "^3.0.2",
61
62
  "gulp-typescript": "5.0.1",
62
63
  "gulp-wait": "^0.0.2",
63
- "jest": "^29.7.0",
64
+ "jest": "30.0.5",
64
65
  "merge-stream": "^2.0.0",
65
66
  "merge2": "^1.4.1",
66
67
  "optimist": "^0.6.1",
@@ -71,11 +72,12 @@
71
72
  "ts-node": "^10.9.1",
72
73
  "typedoc": "0.26.11",
73
74
  "typescript": "^5.6.3",
74
- "velo-sync": "^0.0.9"
75
+ "velo-sync": "^0.0.9",
76
+ "yargs": "^18.0.0"
75
77
  },
76
78
  "devDependencies": {
77
79
  "@types/fs-extra": "^11.0.4",
78
- "@types/glob": "^8.1.0",
80
+ "@types/glob": "9.0.0",
79
81
  "@types/gulp": "^4.0.17",
80
82
  "@types/gulp-concat": "^0.0.37",
81
83
  "@types/gulp-insert": "^0.5.13",
@@ -84,16 +86,17 @@
84
86
  "@types/gulp-rename": "^2.0.6",
85
87
  "@types/gulp-sass": "^5.0.4",
86
88
  "@types/gulp-tap": "^1.0.5",
87
- "@types/jest": "^29.5.3",
89
+ "@types/jest": "30.0.0",
88
90
  "@types/merge-stream": "2.0.0",
89
91
  "@types/merge2": "^1.4.4",
90
92
  "@types/optimist": "^0.0.33",
93
+ "@types/yargs": "^17.0.33",
91
94
  "@typescript-eslint/eslint-plugin": "8.14.0",
92
95
  "@typescript-eslint/parser": "8.14.0",
93
96
  "@typescript-eslint/utils": "8.14.0",
94
97
  "eslint": "9.14.0",
95
98
  "eslint-plugin-import": "^2.27.5",
96
- "eslint-plugin-jsdoc": "50.5.0",
99
+ "eslint-plugin-jsdoc": "51.4.1",
97
100
  "eslint-plugin-named-import-spacing": "^1.0.3",
98
101
  "eslint-plugin-simple-import-sort": "12.1.1",
99
102
  "i": "^0.3.7",
package/src/args.ts ADDED
@@ -0,0 +1,36 @@
1
+ import yargs from "yargs";
2
+ import { hideBin } from "yargs/helpers";
3
+
4
+ // It's a good practice to define an interface for your arguments
5
+ // for type safety throughout your application.
6
+ export interface LucyArgs {
7
+ [x: string]: unknown;
8
+ // This will hold the command used, e.g., 'init'
9
+ _: (string | number)[];
10
+ $0: string;
11
+ // Arguments for the 'init' command
12
+ type?: 'velo' | 'expo' | 'blocks';
13
+ }
14
+
15
+ export async function get_args(): Promise<LucyArgs> {
16
+ const argv = await yargs(hideBin(process.argv))
17
+ .usage('Usage: $0 <command> [options]')
18
+ .command('init <type>', 'Initialize a new Lucy project', (yargs) => {
19
+ return yargs.positional('type', {
20
+ describe: 'The type of project to initialize',
21
+ choices: ['velo', 'expo', 'blocks'] as const,
22
+ demandOption: true, // Makes this positional argument required
23
+ });
24
+ })
25
+ // Enforce that a command must be provided (e.g., 'init')
26
+ .demandCommand(1, 'You need to provide a command. Use --help for a list of commands.')
27
+ .help()
28
+ .alias('h', 'help')
29
+ .strict()
30
+ .wrap(yargs().terminalWidth()) // Wrap help text to terminal width
31
+ .epilogue('For more information, visit https://github.com/your-repo/wix-lucy-cli') // Example of a relevant epilogue
32
+ .parseAsync();
33
+
34
+ // The cast is now safer with the defined interface.
35
+ return argv as LucyArgs;
36
+ }
@@ -0,0 +1,21 @@
1
+ import { Effect, Schema } from "effect";
2
+ import { execSync, exec as execCallback } from "child_process";
3
+ import { AppError } from "./error.js";
4
+ import { parse_error } from "./helpers.js";
5
+ import { promisify } from 'util';
6
+ import { default_docker_retry } from "./policy.js";
7
+
8
+ const exec = promisify(execCallback);
9
+
10
+ export const init_expo = () => Effect.gen(function* () {
11
+ const format = "{{.ID}}\\t{{.Name}}\\t{{.Mode}}\\t{{.Replicas}}\\t{{.Image}}\\t{{.Ports}}";
12
+ const command = `docker service ls --format "${format}"`;
13
+ const res =yield* Effect.retry(Effect.tryPromise({
14
+ try: () => exec(command, { encoding: 'utf8'}),
15
+ catch: (error) => new AppError({cause: parse_error(error), message: "Error getting services"})
16
+ }), default_docker_retry);
17
+ if (res.stderr) {
18
+ yield* Effect.logError(`Command "${command}" produced stderr: ${res.stderr}`);
19
+ }
20
+
21
+ })
package/src/config.ts ADDED
@@ -0,0 +1,61 @@
1
+ import { Context, Layer } from "effect"
2
+ import { get_args } from "./args.js";
3
+ import { dirname, join } from "path";
4
+ import { fileURLToPath } from "url";
5
+ import { readFileSync, existsSync } from "fs";
6
+ type Action = 'init';
7
+
8
+ type Actions = {
9
+ action: Action;
10
+ type: 'velo' | 'expo' | 'blocks' | undefined;
11
+ }
12
+ export class Config extends Context.Tag("Config")<
13
+ Config,
14
+ {
15
+ readonly config: {
16
+ readonly action: Actions;
17
+ readonly cwd: string;
18
+ readonly packageRoot: string;
19
+ readonly filesFolder: string;
20
+ readonly packageJson: any;
21
+ }
22
+ }
23
+ >() {}
24
+
25
+ // In an ES module, `__dirname` is not available by default.
26
+ // We can replicate it using `import.meta.url`.
27
+ const __filename = fileURLToPath(import.meta.url);
28
+ const __dirname = dirname(__filename);
29
+
30
+ // Assuming your compiled output is in a 'dist' folder at the project root,
31
+ // and your source `config.ts` is in `src`, the running `config.js` will be
32
+ // in something like `dist/src`. To get to the package root, we go up two levels.
33
+ const packageRoot = join(__dirname, "..");
34
+
35
+ export const ConfigLayer = (args: Awaited<ReturnType<typeof get_args>>) => {
36
+ let packageJson = '{}';
37
+ const packageJsonPath = join(process.cwd(), 'package.json');
38
+ try {
39
+ if (existsSync(packageJsonPath)) {
40
+ const raw = readFileSync(packageJsonPath, 'utf-8');
41
+ packageJson = JSON.parse(raw);
42
+ }
43
+ } catch (error) {
44
+ console.error("Error reading package.json:", error);
45
+ }
46
+ return Layer.succeed(
47
+ Config,
48
+ Config.of({
49
+ config: {
50
+ action: {
51
+ type: args.type,
52
+ action: args._[0] as Action
53
+ },
54
+ cwd: process.cwd(),
55
+ packageRoot: packageRoot,
56
+ filesFolder: join(packageRoot, 'files'),
57
+ packageJson
58
+ }
59
+ })
60
+ );
61
+ }
package/src/error.ts ADDED
@@ -0,0 +1,4 @@
1
+ import { Data } from "effect";
2
+
3
+ export class AppError extends Data.TaggedError('AppError')<{cause: Error, message: string}> {}
4
+ export class ScaleError extends Data.TaggedError('ScaleError')<{cause: Error, message: string}> {}