lucy-cli 2.0.0-alpha.1 → 2.0.0-alpha.3

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 (51) hide show
  1. package/dist/init.js +29 -11
  2. package/files/expo/.prettierrc.js +16 -0
  3. package/files/expo/.yarnrc.yml +1 -1
  4. package/files/expo/app/(tabs)/_layout.tsx +38 -33
  5. package/files/expo/app/(tabs)/explore.tsx +114 -0
  6. package/files/expo/app/(tabs)/index.tsx +80 -0
  7. package/files/expo/app/+not-found.tsx +37 -0
  8. package/files/expo/app/_layout.tsx +39 -30
  9. package/files/expo/assets/fonts/SpaceMono-Regular.ttf +0 -0
  10. package/files/expo/assets/images/adaptive-icon.png +0 -0
  11. package/files/expo/assets/images/favicon.png +0 -0
  12. package/files/expo/assets/images/icon.png +0 -0
  13. package/files/expo/assets/images/partial-react-logo.png +0 -0
  14. package/files/expo/assets/images/react-logo.png +0 -0
  15. package/files/expo/assets/images/react-logo@2x.png +0 -0
  16. package/files/expo/assets/images/react-logo@3x.png +0 -0
  17. package/files/expo/assets/images/splash-icon.png +0 -0
  18. package/files/expo/babel.config.js +7 -6
  19. package/files/expo/components/Collapsible.tsx +52 -0
  20. package/files/expo/components/ExternalLink.tsx +32 -0
  21. package/files/expo/components/HapticTab.tsx +24 -0
  22. package/files/expo/components/HelloWave.tsx +35 -0
  23. package/files/expo/components/ParallaxScrollView.tsx +85 -0
  24. package/files/expo/components/ThemedText.tsx +70 -0
  25. package/files/expo/components/ThemedView.tsx +23 -0
  26. package/files/expo/components/ui/IconSymbol.ios.tsx +32 -0
  27. package/files/expo/components/ui/IconSymbol.tsx +41 -0
  28. package/files/expo/components/ui/TabBarBackground.ios.tsx +19 -0
  29. package/files/expo/components/ui/TabBarBackground.tsx +6 -0
  30. package/files/expo/constants/Colors.ts +17 -17
  31. package/files/expo/constants/theme.ts +17 -17
  32. package/files/expo/{eslint.config.js → eslint.config.mjs} +15 -19
  33. package/files/expo/hooks/useColorScheme.ts +13 -7
  34. package/files/expo/hooks/useColorScheme.web.ts +12 -9
  35. package/files/expo/hooks/useThemeColor.ts +19 -10
  36. package/files/expo/lib/data.ts +36 -33
  37. package/files/expo/lib/utils/index.ts +7 -2
  38. package/files/expo/lib/utils/polyfills.ts +1 -1
  39. package/files/expo/lib/wix/client.ts +3 -5
  40. package/files/expo/lib/wix/error.ts +3 -0
  41. package/files/expo/lib/wix/index.ts +1 -0
  42. package/files/expo/metro.config.js +31 -0
  43. package/files/expo/patches/@wix-sdk-npm-1.15.24-1adbec98e9.patch +20 -0
  44. package/files/expo/scripts/reset-project.ts +116 -0
  45. package/files/expo/tailwind.config.js +61 -196
  46. package/files/expo/tsconfig.json +31 -26
  47. package/package.json +1 -1
  48. package/src/init.ts +42 -16
  49. package/files/expo/.prettierrc.json +0 -16
  50. /package/files/expo/{readme.md → README.md} +0 -0
  51. /package/files/expo/{types/nativewind-env.d.ts → nativewind-env.d.ts} +0 -0
package/src/init.ts CHANGED
@@ -187,10 +187,6 @@ import { JsonSchema } from "./schemas/index.js";
187
187
  // console.log(blue.underline(`🐕 => Updated file ${orange(filePath)}`));
188
188
  // }
189
189
  // }
190
- const yarn = Command.make("yarn").pipe(
191
- Command.stdout("inherit"), // Stream stdout to process.stdout
192
- Command.exitCode // Get the exit code
193
- )
194
190
 
195
191
  const init_expo = () => {
196
192
  return Effect.gen(function*() {
@@ -199,15 +195,22 @@ const init_expo = () => {
199
195
  const fs = yield* FileSystem.FileSystem;
200
196
  const path = yield* Path.Path;
201
197
 
198
+ const resolutions = {
199
+ "@wix/sdk@1.15.24": "patch:@wix/sdk@npm:1.15.24#./patches/@wix-sdk-npm-1.15.24-1adbec98e9.patch",
200
+ }
202
201
  const yarn = Command.make(
203
202
  "yarn",
204
203
  "add",
205
204
  "nativewind",
206
205
  "react-native-reanimated@~3.17.4",
207
206
  "react-native-safe-area-context@5.4.0",
208
- "@wix/sdk",
207
+ "@wix/sdk@1.15.24",
209
208
  "@wix/data",
210
- "expo-standard-web-crypto"
209
+ "expo-standard-web-crypto",
210
+ "effect",
211
+ "node-libs-react-native",
212
+ "util",
213
+ "events",
211
214
  ).pipe(
212
215
  Command.stdout("inherit"), // Stream stdout to process.stdout
213
216
  Command.exitCode // Get the exit code
@@ -235,6 +238,8 @@ const init_expo = () => {
235
238
  "typescript-eslint",
236
239
  "typescript-eslint-language-service",
237
240
  "@total-typescript/ts-reset",
241
+ "expo-doctor",
242
+ "tsx",
238
243
  ).pipe(
239
244
  Command.stdout("inherit"), // Stream stdout to process.stdout
240
245
  Command.exitCode // Get the exit code
@@ -296,6 +301,12 @@ const init_expo = () => {
296
301
 
297
302
  console.log("Expo project initialized with app.json:", projectName);
298
303
 
304
+ const baseFiles = yield* fs.readDirectory(config.config.filesFolder + '/expo')
305
+ yield* Effect.forEach(
306
+ baseFiles,
307
+ (file) => fs.copy(path.join(config.config.filesFolder, 'expo', file), path.join(config.config.cwd, file), { overwrite: true })
308
+ )
309
+
299
310
  let res = yield* npx
300
311
  res = yield* yarn
301
312
  res = yield* yarnDev
@@ -304,22 +315,20 @@ const init_expo = () => {
304
315
  return yield* Effect.logError("Failed to install Expo dependencies. Please check the error message above.");
305
316
  }
306
317
 
307
- const baseFiles = yield* fs.readDirectory(config.config.filesFolder + '/expo')
308
- yield* Effect.forEach(
309
- baseFiles,
310
- (file) => fs.copy(path.join(config.config.filesFolder, 'expo', file), path.join(config.config.cwd, file), { overwrite: true })
311
- )
312
-
313
318
  const newScripts = {
314
319
  "dev": "expo start",
315
320
  "start": "expo start",
316
321
  "android": "expo start --android",
317
322
  "ios": "expo start --ios",
318
323
  "web": "expo start --web",
324
+ "reset": "tsx ./scripts/reset-project.ts",
319
325
  "format": "prettier --write \"./*.json\" \"**/*.{ts,tsx,md,json,jsonc,json5}\"",
320
- "build:ios": "eas build --platform ios --local --profile preview",
321
- "build:android": "eas build --platform android --local --profile preview",
322
- "build:web": "eas build --platform web --local --profile preview",
326
+ "build:dev": "eas build --local --profile development",
327
+ "build:sim": "eas build --local --profile simulator",
328
+ "build:prev": "eas build --local --profile preview",
329
+ "build:prod": "eas build --local --profile production",
330
+ "build:web": "expo export --platform web",
331
+ "doctor": "expo-doctor"
323
332
  }
324
333
 
325
334
  const packageJsonPath = path.join(config.config.cwd, "package.json")
@@ -328,11 +337,28 @@ const init_expo = () => {
328
337
 
329
338
  packageJson.scripts = {
330
339
  ...packageJson.scripts,
331
- ...newScripts
340
+ ...newScripts,
332
341
  };
342
+ packageJson.resolutions = {
343
+ ...packageJson.resolutions,
344
+ ...resolutions,
345
+ };
346
+ packageJson.expo = {
347
+ doctor: {
348
+ reactNativeDirectoryCheck: {
349
+ listUnknownPackages: false,
350
+ },
351
+ }
352
+ }
353
+
333
354
  yield* fs.writeFileString(path.join(config.config.cwd, 'package.json'), JSON.stringify(packageJson, null, 2));
334
355
  yield* fs.remove(path.join(config.config.cwd, "package-lock.json"), { force: true })
335
356
 
357
+ yield* Command.make("yarn").pipe(
358
+ Command.stdout("inherit"), // Stream stdout to process.stdout
359
+ Command.exitCode // Get the exit code
360
+ )
361
+
336
362
  })
337
363
  }
338
364
 
@@ -1,16 +0,0 @@
1
- {
2
- "printWidth": 80,
3
- "tabWidth": 4,
4
- "useTabs": true,
5
- "singleQuote": true,
6
- "trailingComma": "all",
7
- "plugins": ["prettier-plugin-tailwindcss"],
8
- "overrides": [
9
- {
10
- "files": ["**/*.{json,jsonc,json5}", "*.{json,jsonc,json5}"],
11
- "options": {
12
- "useTabs": true
13
- }
14
- }
15
- ]
16
- }
File without changes