lucy-cli 1.2.5 → 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.
- package/dist/args.d.ts +7 -0
- package/dist/args.js +23 -0
- package/dist/commands.d.ts +3 -0
- package/dist/commands.js +18 -0
- package/dist/config.d.ts +20 -0
- package/dist/config.js +39 -0
- package/dist/error.d.ts +17 -0
- package/dist/error.js +5 -0
- package/dist/helpers.d.ts +1 -32
- package/dist/helpers.js +6 -261
- package/dist/index.d.ts +2 -59
- package/dist/index.js +25 -282
- package/dist/init.d.ts +4 -8
- package/dist/init.js +245 -160
- package/dist/params.d.ts +7 -0
- package/dist/params.js +23 -0
- package/dist/policy.d.ts +3 -0
- package/dist/policy.js +5 -0
- package/dist/prepare.d.ts +0 -8
- package/dist/prepare.js +20 -19
- package/dist/runtime.d.ts +5 -0
- package/dist/runtime.js +11 -0
- package/dist/schemas/index.d.ts +2 -0
- package/dist/schemas/index.js +2 -0
- package/dist/schemas/types.js +1 -0
- package/dist/states.d.ts +10 -0
- package/dist/states.js +7 -0
- package/files/expo/.env +1 -0
- package/files/expo/.nvmrc +1 -0
- package/files/expo/.prettierignore +23 -0
- package/files/expo/.prettierrc.json +16 -0
- package/files/expo/.yarnrc +1 -0
- package/files/expo/.yarnrc.yml +3 -0
- package/files/expo/app/(tabs)/_layout.tsx +45 -0
- package/files/expo/app/_layout.tsx +45 -0
- package/files/expo/babel.config.js +9 -0
- package/files/expo/constants/Colors.ts +27 -0
- package/files/expo/constants/theme.ts +18 -0
- package/files/expo/eas.json +26 -0
- package/files/expo/eslint.config.js +185 -0
- package/files/expo/global.css +47 -0
- package/files/expo/hooks/useColorScheme.ts +11 -0
- package/files/expo/hooks/useColorScheme.web.ts +21 -0
- package/files/expo/hooks/useColorSchemeRN.ts +1 -0
- package/files/expo/hooks/useThemeColor.ts +21 -0
- package/files/expo/lib/data.ts +45 -0
- package/files/expo/lib/utils/index.ts +6 -0
- package/files/expo/lib/utils/polyfills.ts +29 -0
- package/files/expo/lib/wix/client.ts +14 -0
- package/files/expo/lib/wix/index.ts +1 -0
- package/files/expo/lucy.json +8 -0
- package/files/expo/readme.md +45 -0
- package/files/expo/tailwind.config.js +198 -0
- package/files/expo/tsconfig.json +40 -0
- package/files/expo/types/nativewind-env.d.ts +1 -0
- package/files/expo/types/reset.d.ts +1 -0
- package/files/velo/typescript/styles/global.scss +0 -0
- package/package.json +14 -11
- package/src/args.ts +36 -0
- package/src/commands.ts +21 -0
- package/src/config.ts +61 -0
- package/src/error.ts +4 -0
- package/src/helpers.ts +7 -305
- package/src/index.ts +29 -369
- package/src/init.ts +345 -177
- package/src/policy.ts +6 -0
- package/src/prepare.ts +19 -19
- package/src/runtime.ts +20 -0
- package/src/schemas/index.ts +3 -0
- package/src/schemas/types.ts +0 -0
- package/src/states.ts +15 -0
- package/src copy/helpers.ts +307 -0
- package/src copy/index.ts +379 -0
- package/src copy/init.ts +183 -0
- package/src copy/models.ts +35 -0
- package/src copy/prepare.ts +24 -0
- package/src copy/schemas/index.ts +0 -0
- package/src copy/schemas/types.ts +0 -0
- package/src copy/settings.json +67 -0
- package/src copy/types.d.ts +8 -0
- package/dist/Gulpfile.d.ts +0 -34
- package/dist/Gulpfile.js +0 -115
- package/dist/cli.d.ts +0 -2
- package/dist/cli.js +0 -44
- package/dist/dev.d.ts +0 -2
- package/dist/dev.js +0 -14
- package/dist/gulp/backend copy.d.ts +0 -4
- package/dist/gulp/backend copy.js +0 -50
- package/dist/gulp/backend.d.ts +0 -3
- package/dist/gulp/backend.js +0 -91
- package/dist/gulp/checks.d.ts +0 -3
- package/dist/gulp/checks.js +0 -204
- package/dist/gulp/clean copy.d.ts +0 -2
- package/dist/gulp/clean copy.js +0 -19
- package/dist/gulp/clean.d.ts +0 -3
- package/dist/gulp/clean.js +0 -28
- package/dist/gulp/copy.d.ts +0 -2
- package/dist/gulp/copy.js +0 -33
- package/dist/gulp/docs.d.ts +0 -2
- package/dist/gulp/docs.js +0 -27
- package/dist/gulp/helpers.d.ts +0 -2
- package/dist/gulp/helpers.js +0 -24
- package/dist/gulp/pages copy.d.ts +0 -3
- package/dist/gulp/pages copy.js +0 -22
- package/dist/gulp/pages.d.ts +0 -2
- package/dist/gulp/pages.js +0 -36
- package/dist/gulp/pipeline.d.ts +0 -1
- package/dist/gulp/pipeline.js +0 -28
- package/dist/gulp/public.d.ts +0 -2
- package/dist/gulp/public.js +0 -49
- package/dist/gulp/styles.d.ts +0 -2
- package/dist/gulp/styles.js +0 -39
- package/dist/gulp/templates.d.ts +0 -2
- package/dist/gulp/templates.js +0 -32
- package/dist/gulp/test.d.ts +0 -2
- package/dist/gulp/test.js +0 -26
- package/dist/gulp/types.d.ts +0 -4
- package/dist/gulp/types.js +0 -288
- package/dist/gulp/watchers.d.ts +0 -9
- package/dist/gulp/watchers.js +0 -58
- package/dist/init copy.d.ts +0 -8
- package/dist/init copy.js +0 -167
- package/dist/install.d.ts +0 -2
- package/dist/install.js +0 -53
- package/dist/settings.json +0 -67
- package/dist/start_gulp.d.ts +0 -2
- package/dist/start_gulp.js +0 -14
- package/dist/sync.d.ts +0 -2
- package/dist/sync.js +0 -87
- /package/{files/.gitmodules → dist/schemas/types.d.ts} +0 -0
- /package/files/{typescript/__mocks__/.gitkeep → velo/.gitmodules} +0 -0
- /package/files/{.madgerc → velo/.madgerc} +0 -0
- /package/files/{.nvmrc → velo/.nvmrc} +0 -0
- /package/files/{.stylelintrc.js → velo/.stylelintrc.js} +0 -0
- /package/files/{.yarnrc.yml → velo/.yarnrc.yml} +0 -0
- /package/files/{currents.config.js → velo/currents.config.js} +0 -0
- /package/files/{cypress → velo/cypress}/e2e/base/base.cy.ts +0 -0
- /package/files/{cypress → velo/cypress}/fixtures/example.json +0 -0
- /package/files/{cypress → velo/cypress}/support/commands.ts +0 -0
- /package/files/{cypress → velo/cypress}/support/e2e.ts +0 -0
- /package/files/{cypress → velo/cypress}/tsconfig.json +0 -0
- /package/files/{cypress.config.mjs → velo/cypress.config.mjs} +0 -0
- /package/files/{eslint.config.mjs → velo/eslint.config.mjs} +0 -0
- /package/files/{local.tsconfig.json → velo/local.tsconfig.json} +0 -0
- /package/files/{typedoc.json → velo/typedoc.json} +0 -0
- /package/files/{typescript/pages → velo/typescript/__mocks__}/.gitkeep +0 -0
- /package/files/{typescript → velo/typescript}/backend/data.ts +0 -0
- /package/files/{typescript → velo/typescript}/backend/events.ts +0 -0
- /package/files/{typescript → velo/typescript}/backend/http-functions.ts +0 -0
- /package/files/{typescript → velo/typescript}/backend/lib/http-functions/sync.ts +0 -0
- /package/files/{typescript → velo/typescript}/backend/permissions.json +0 -0
- /package/files/{typescript/public → velo/typescript/pages}/.gitkeep +0 -0
- /package/files/{typescript/styles → velo/typescript/public}/.gitkeep +0 -0
- /package/files/{typescript → velo/typescript}/public/scss/app.scss +0 -0
- /package/files/{typescript/styles/global.scss → velo/typescript/styles/.gitkeep} +0 -0
- /package/files/{typescript → velo/typescript}/tsconfig.json +0 -0
- /package/files/{vitest.config.ts → velo/vitest.config.ts} +0 -0
- /package/{src → src copy}/Gulpfile.ts +0 -0
- /package/{src → src copy}/gulp/backend.ts +0 -0
- /package/{src → src copy}/gulp/checks.ts +0 -0
- /package/{src → src copy}/gulp/clean.ts +0 -0
- /package/{src → src copy}/gulp/copy.ts +0 -0
- /package/{src → src copy}/gulp/helpers.ts +0 -0
- /package/{src → src copy}/gulp/pages.ts +0 -0
- /package/{src → src copy}/gulp/pipeline.ts +0 -0
- /package/{src → src copy}/gulp/public.ts +0 -0
- /package/{src → src copy}/gulp/styles.ts +0 -0
- /package/{src → src copy}/gulp/templates.ts +0 -0
- /package/{src → src copy}/gulp/types.ts +0 -0
- /package/{src → src copy}/gulp/watchers.ts +0 -0
- /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": "
|
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
|
-
"
|
40
|
-
"cypress-cloud": "^1.9.3",
|
41
|
+
"effect": "^3.17.1",
|
41
42
|
"enquirer": "^2.4.1",
|
42
|
-
"glob": "
|
43
|
-
"gulp": "
|
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": "
|
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": "
|
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": "
|
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": "
|
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": "
|
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
|
+
}
|
package/src/commands.ts
ADDED
@@ -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