lucy-cli 2.0.0-beta.11 → 2.0.0-beta.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/copy.js.map +1 -1
- package/dist/commands/git.d.ts +3 -2
- package/dist/commands/git.js +34 -0
- package/dist/commands/git.js.map +1 -1
- package/dist/commands/home.d.ts +1 -1
- package/dist/commands/home.js +2 -25
- package/dist/commands/home.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/init/cargo.d.ts +1 -1
- package/dist/init/git.d.ts +2 -0
- package/dist/init/git.js +13 -0
- package/dist/init/git.js.map +1 -0
- package/dist/init/gitModules.d.ts +1 -1
- package/dist/init/index.d.ts +2 -1
- package/dist/init/index.js +0 -1
- package/dist/init/index.js.map +1 -1
- package/dist/init/monorepo.d.ts +1 -1
- package/dist/init/prepareVelo.d.ts +1 -1
- package/dist/init/tauri.d.ts +1 -1
- package/dist/init/templates.d.ts +1 -1
- package/dist/init/templates.js +1 -1
- package/dist/init/templates.js.map +1 -1
- package/dist/init/velo.d.ts +1 -1
- package/package.json +1 -1
- package/src/commands/copy.ts +1 -0
- package/src/commands/git.ts +39 -0
- package/src/commands/home.ts +2 -38
- package/src/index.ts +1 -1
- package/src/init/index.ts +0 -1
- package/src/init/templates.ts +1 -1
- package/files/templates/Default[B]/files/.cursorignore +0 -4
- package/files/templates/Default[B]/files/.stylelintrc.js +0 -8
- package/files/templates/Default[B]/lucy.json +0 -9
- package/files/templates/Default[C]/files/.cursorignore +0 -4
- package/files/templates/Default[C]/files/.env +0 -1
- package/files/templates/Default[C]/files/Cargo.toml +0 -238
- package/files/templates/Default[C]/files/Makefile.toml +0 -4
- package/files/templates/Default[C]/files/build/main.rs +0 -35
- package/files/templates/Default[C]/files/config/beta.json +0 -19
- package/files/templates/Default[C]/files/config/ci.json +0 -15
- package/files/templates/Default[C]/files/config/default.json +0 -71
- package/files/templates/Default[C]/files/config/development.json +0 -10
- package/files/templates/Default[C]/files/config/produktion.json +0 -5
- package/files/templates/Default[C]/files/config/stage.json +0 -4
- package/files/templates/Default[C]/files/locales/todo.yml +0 -3
- package/files/templates/Default[C]/files/public/index.html +0 -1
- package/files/templates/Default[C]/lucy.json +0 -15
- package/files/templates/Default[E]/files/.cursorignore +0 -4
- package/files/templates/Default[E]/files/.nvmrc +0 -1
- package/files/templates/Default[E]/files/.prettierignore +0 -23
- package/files/templates/Default[E]/files/.prettierrc.js +0 -16
- package/files/templates/Default[E]/files/.stylelintrc.js +0 -8
- package/files/templates/Default[E]/files/.yarnrc +0 -1
- package/files/templates/Default[E]/files/.yarnrc.yml +0 -3
- package/files/templates/Default[E]/files/README.md +0 -45
- package/files/templates/Default[E]/files/app.config.ts +0 -69
- package/files/templates/Default[E]/files/assets/fonts/SpaceMono-Regular.ttf +0 -0
- package/files/templates/Default[E]/files/assets/images/adaptive-icon.png +0 -0
- package/files/templates/Default[E]/files/assets/images/favicon.png +0 -0
- package/files/templates/Default[E]/files/assets/images/icon.png +0 -0
- package/files/templates/Default[E]/files/assets/images/splash-icon.png +0 -0
- package/files/templates/Default[E]/files/babel.config.js +0 -10
- package/files/templates/Default[E]/files/components/.gitkeep +0 -0
- package/files/templates/Default[E]/files/components/ui/.gitkeep +0 -0
- package/files/templates/Default[E]/files/constants/theme.ts +0 -18
- package/files/templates/Default[E]/files/eas.json +0 -32
- package/files/templates/Default[E]/files/eslint.config.mjs +0 -181
- package/files/templates/Default[E]/files/global.css +0 -47
- package/files/templates/Default[E]/files/hooks/useColorScheme.ts +0 -17
- package/files/templates/Default[E]/files/index.ts +0 -11
- package/files/templates/Default[E]/files/lib/data.ts +0 -197
- package/files/templates/Default[E]/files/lib/utils/index.ts +0 -11
- package/files/templates/Default[E]/files/lib/utils/polyfills.ts +0 -29
- package/files/templates/Default[E]/files/lib/wix/client.ts +0 -12
- package/files/templates/Default[E]/files/lib/wix/error.ts +0 -3
- package/files/templates/Default[E]/files/lib/wix/index.ts +0 -2
- package/files/templates/Default[E]/files/metro.config.js +0 -63
- package/files/templates/Default[E]/files/nativewind-env.d.ts +0 -1
- package/files/templates/Default[E]/files/pnpm-workspace.yaml +0 -3
- package/files/templates/Default[E]/files/scripts/reset-project.ts +0 -116
- package/files/templates/Default[E]/files/tailwind.config.js +0 -63
- package/files/templates/Default[E]/files/tsconfig.json +0 -46
- package/files/templates/Default[E]/files/types/reset.d.ts +0 -1
- package/files/templates/Default[E]/lucy.json +0 -86
- package/files/templates/Default[M]/files/.cursorignore +0 -4
- package/files/templates/Default[M]/files/.editorconfig +0 -10
- package/files/templates/Default[M]/files/.nvmrc +0 -1
- package/files/templates/Default[M]/files/.prettierignore +0 -23
- package/files/templates/Default[M]/files/.prettierrc.json +0 -15
- package/files/templates/Default[M]/files/.stylelintrc.js +0 -8
- package/files/templates/Default[M]/files/.yarnrc +0 -1
- package/files/templates/Default[M]/files/.yarnrc.yml +0 -3
- package/files/templates/Default[M]/files/README.md +0 -109
- package/files/templates/Default[M]/files/currents.config.ts +0 -5
- package/files/templates/Default[M]/files/nx.json +0 -25
- package/files/templates/Default[M]/files/pnpm-workspace.yaml +0 -11
- package/files/templates/Default[M]/files/tsconfig.json +0 -6
- package/files/templates/Default[M]/files/typedoc.json +0 -25
- package/files/templates/Default[M]/files/vitest.config.ts +0 -27
- package/files/templates/Default[M]/lucy.json +0 -69
- package/files/templates/Default[T]/files/.cursorignore +0 -4
- package/files/templates/Default[T]/lucy.json +0 -9
- package/files/templates/expo verse[E]/files/.nvmrc +0 -1
- package/files/templates/expo verse[E]/files/.prettierignore +0 -23
- package/files/templates/expo verse[E]/files/.prettierrc.js +0 -16
- package/files/templates/expo verse[E]/files/.stylelintrc.json +0 -8
- package/files/templates/expo verse[E]/files/.vscode/extensions.json +0 -10
- package/files/templates/expo verse[E]/files/.vscode/launch.json +0 -54
- package/files/templates/expo verse[E]/files/.vscode/settings.json +0 -30
- package/files/templates/expo verse[E]/files/.vscode/tasks.json +0 -0
- package/files/templates/expo verse[E]/files/.yarnrc +0 -1
- package/files/templates/expo verse[E]/files/.yarnrc.yml +0 -8
- package/files/templates/expo verse[E]/files/App.tsx +0 -63
- package/files/templates/expo verse[E]/files/DEBUGGING.md +0 -126
- package/files/templates/expo verse[E]/files/README.md +0 -45
- package/files/templates/expo verse[E]/files/android/app/build.gradle +0 -177
- package/files/templates/expo verse[E]/files/android/app/debug.keystore +0 -0
- package/files/templates/expo verse[E]/files/android/app/proguard-rules.pro +0 -14
- package/files/templates/expo verse[E]/files/android/app/src/debug/AndroidManifest.xml +0 -7
- package/files/templates/expo verse[E]/files/android/app/src/main/AndroidManifest.xml +0 -33
- package/files/templates/expo verse[E]/files/android/app/src/main/java/so/sunnysideup/daily_verse/MainActivity.kt +0 -65
- package/files/templates/expo verse[E]/files/android/app/src/main/java/so/sunnysideup/daily_verse/MainApplication.kt +0 -57
- package/files/templates/expo verse[E]/files/android/app/src/main/res/drawable/ic_launcher_background.xml +0 -6
- package/files/templates/expo verse[E]/files/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -37
- package/files/templates/expo verse[E]/files/android/app/src/main/res/drawable-hdpi/splashscreen_logo.png +0 -0
- package/files/templates/expo verse[E]/files/android/app/src/main/res/drawable-mdpi/splashscreen_logo.png +0 -0
- package/files/templates/expo verse[E]/files/android/app/src/main/res/drawable-night-hdpi/splashscreen_logo.png +0 -0
- package/files/templates/expo verse[E]/files/android/app/src/main/res/drawable-night-mdpi/splashscreen_logo.png +0 -0
- package/files/templates/expo verse[E]/files/android/app/src/main/res/drawable-night-xhdpi/splashscreen_logo.png +0 -0
- package/files/templates/expo verse[E]/files/android/app/src/main/res/drawable-night-xxhdpi/splashscreen_logo.png +0 -0
- package/files/templates/expo verse[E]/files/android/app/src/main/res/drawable-night-xxxhdpi/splashscreen_logo.png +0 -0
- package/files/templates/expo verse[E]/files/android/app/src/main/res/drawable-xhdpi/splashscreen_logo.png +0 -0
- package/files/templates/expo verse[E]/files/android/app/src/main/res/drawable-xxhdpi/splashscreen_logo.png +0 -0
- package/files/templates/expo verse[E]/files/android/app/src/main/res/drawable-xxxhdpi/splashscreen_logo.png +0 -0
- package/files/templates/expo verse[E]/files/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +0 -6
- package/files/templates/expo verse[E]/files/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +0 -6
- package/files/templates/expo verse[E]/files/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp +0 -0
- package/files/templates/expo verse[E]/files/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp +0 -0
- package/files/templates/expo verse[E]/files/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.webp +0 -0
- package/files/templates/expo verse[E]/files/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp +0 -0
- package/files/templates/expo verse[E]/files/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp +0 -0
- package/files/templates/expo verse[E]/files/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp +0 -0
- package/files/templates/expo verse[E]/files/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.webp +0 -0
- package/files/templates/expo verse[E]/files/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp +0 -0
- package/files/templates/expo verse[E]/files/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp +0 -0
- package/files/templates/expo verse[E]/files/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp +0 -0
- package/files/templates/expo verse[E]/files/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.webp +0 -0
- package/files/templates/expo verse[E]/files/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp +0 -0
- package/files/templates/expo verse[E]/files/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp +0 -0
- package/files/templates/expo verse[E]/files/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp +0 -0
- package/files/templates/expo verse[E]/files/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.webp +0 -0
- package/files/templates/expo verse[E]/files/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp +0 -0
- package/files/templates/expo verse[E]/files/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp +0 -0
- package/files/templates/expo verse[E]/files/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp +0 -0
- package/files/templates/expo verse[E]/files/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.webp +0 -0
- package/files/templates/expo verse[E]/files/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp +0 -0
- package/files/templates/expo verse[E]/files/android/app/src/main/res/values/colors.xml +0 -6
- package/files/templates/expo verse[E]/files/android/app/src/main/res/values/strings.xml +0 -7
- package/files/templates/expo verse[E]/files/android/app/src/main/res/values/styles.xml +0 -12
- package/files/templates/expo verse[E]/files/android/app/src/main/res/values-night/colors.xml +0 -3
- package/files/templates/expo verse[E]/files/android/build.gradle +0 -37
- package/files/templates/expo verse[E]/files/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/files/templates/expo verse[E]/files/android/gradle/wrapper/gradle-wrapper.properties +0 -7
- package/files/templates/expo verse[E]/files/android/gradle.properties +0 -59
- package/files/templates/expo verse[E]/files/android/gradlew +0 -251
- package/files/templates/expo verse[E]/files/android/gradlew.bat +0 -94
- package/files/templates/expo verse[E]/files/android/settings.gradle +0 -39
- package/files/templates/expo verse[E]/files/app.config.ts +0 -77
- package/files/templates/expo verse[E]/files/assets/data/de.csv +0 -949
- package/files/templates/expo verse[E]/files/assets/data/en.csv +0 -949
- package/files/templates/expo verse[E]/files/assets/fonts/PlayfairDisplay-Black.ttf +0 -0
- package/files/templates/expo verse[E]/files/assets/fonts/PlayfairDisplay-BlackItalic.ttf +0 -0
- package/files/templates/expo verse[E]/files/assets/fonts/PlayfairDisplay-Bold.ttf +0 -0
- package/files/templates/expo verse[E]/files/assets/fonts/PlayfairDisplay-BoldItalic.ttf +0 -0
- package/files/templates/expo verse[E]/files/assets/fonts/PlayfairDisplay-ExtraBold.ttf +0 -0
- package/files/templates/expo verse[E]/files/assets/fonts/PlayfairDisplay-ExtraBoldItalic.ttf +0 -0
- package/files/templates/expo verse[E]/files/assets/fonts/PlayfairDisplay-Italic.ttf +0 -0
- package/files/templates/expo verse[E]/files/assets/fonts/PlayfairDisplay-Medium.ttf +0 -0
- package/files/templates/expo verse[E]/files/assets/fonts/PlayfairDisplay-MediumItalic.ttf +0 -0
- package/files/templates/expo verse[E]/files/assets/fonts/PlayfairDisplay-Regular.ttf +0 -0
- package/files/templates/expo verse[E]/files/assets/fonts/PlayfairDisplay-SemiBold.ttf +0 -0
- package/files/templates/expo verse[E]/files/assets/fonts/PlayfairDisplay-SemiBoldItalic.ttf +0 -0
- package/files/templates/expo verse[E]/files/assets/fonts/SpaceMono-Regular.ttf +0 -0
- package/files/templates/expo verse[E]/files/assets/images/andorid/background.png +0 -0
- package/files/templates/expo verse[E]/files/assets/images/android-dark.png +0 -0
- package/files/templates/expo verse[E]/files/assets/images/android-light.png +0 -0
- package/files/templates/expo verse[E]/files/assets/images/background.png +0 -0
- package/files/templates/expo verse[E]/files/assets/images/ios-dark.png +0 -0
- package/files/templates/expo verse[E]/files/assets/images/ios-light.png +0 -0
- package/files/templates/expo verse[E]/files/assets/images/ios-tinted.png +0 -0
- package/files/templates/expo verse[E]/files/assets/images/splash-icon-dark.png +0 -0
- package/files/templates/expo verse[E]/files/assets/images/splash-icon-light.png +0 -0
- package/files/templates/expo verse[E]/files/babel.config.js +0 -10
- package/files/templates/expo verse[E]/files/components/.gitkeep +0 -0
- package/files/templates/expo verse[E]/files/components/MainScreen.tsx +0 -299
- package/files/templates/expo verse[E]/files/components/Share.tsx +0 -132
- package/files/templates/expo verse[E]/files/components/ui/.gitkeep +0 -0
- package/files/templates/expo verse[E]/files/components/ui/dev.tsx +0 -48
- package/files/templates/expo verse[E]/files/constants/config.ts +0 -30
- package/files/templates/expo verse[E]/files/constants/theme.ts +0 -18
- package/files/templates/expo verse[E]/files/data/de.csv +0 -219
- package/files/templates/expo verse[E]/files/data/en.csv +0 -219
- package/files/templates/expo verse[E]/files/data/version.json +0 -4
- package/files/templates/expo verse[E]/files/eas.json +0 -47
- package/files/templates/expo verse[E]/files/eslint.config.mjs +0 -185
- package/files/templates/expo verse[E]/files/global.css +0 -47
- package/files/templates/expo verse[E]/files/hooks/useColorScheme.ts +0 -17
- package/files/templates/expo verse[E]/files/index.ts +0 -28
- package/files/templates/expo verse[E]/files/lib/content.ts +0 -31
- package/files/templates/expo verse[E]/files/lib/data.ts +0 -180
- package/files/templates/expo verse[E]/files/lib/helper.ts +0 -54
- package/files/templates/expo verse[E]/files/lib/index.ts +0 -21
- package/files/templates/expo verse[E]/files/lib/state.ts +0 -128
- package/files/templates/expo verse[E]/files/lib/storage.ts +0 -17
- package/files/templates/expo verse[E]/files/lib/taskManager/index.ts +0 -38
- package/files/templates/expo verse[E]/files/lib/taskManager/loadData.ts +0 -14
- package/files/templates/expo verse[E]/files/lib/utils/index.ts +0 -11
- package/files/templates/expo verse[E]/files/lib/utils/polyfills.ts +0 -29
- package/files/templates/expo verse[E]/files/lib/utils/screenshot.ts +0 -77
- package/files/templates/expo verse[E]/files/lucy.json +0 -8
- package/files/templates/expo verse[E]/files/metro.config.js +0 -81
- package/files/templates/expo verse[E]/files/models/index.ts +0 -28
- package/files/templates/expo verse[E]/files/nativewind-env.d.ts +0 -1
- package/files/templates/expo verse[E]/files/package.json +0 -102
- package/files/templates/expo verse[E]/files/pnpm-workspace.yaml +0 -3
- package/files/templates/expo verse[E]/files/scripts/convert-verses.ts +0 -309
- package/files/templates/expo verse[E]/files/scripts/move-artifacts.ts +0 -83
- package/files/templates/expo verse[E]/files/scripts/reset-project.ts +0 -116
- package/files/templates/expo verse[E]/files/tailwind.config.js +0 -63
- package/files/templates/expo verse[E]/files/tsconfig.json +0 -45
- package/files/templates/expo verse[E]/files/types/index.ts +0 -4
- package/files/templates/expo verse[E]/files/types/reset.d.ts +0 -1
- package/files/templates/expo verse[E]/lucy.json +0 -86
- package/files/templates/velo[D]/files/.cursorignore +0 -4
- package/files/templates/velo[D]/files/.gitmodules +0 -0
- package/files/templates/velo[D]/files/.madgerc +0 -8
- package/files/templates/velo[D]/files/.nvmrc +0 -1
- package/files/templates/velo[D]/files/.prettierignore +0 -23
- package/files/templates/velo[D]/files/.prettierrc.js +0 -16
- package/files/templates/velo[D]/files/.stylelintrc.js +0 -9
- package/files/templates/velo[D]/files/.yarnrc.yml +0 -2
- package/files/templates/velo[D]/files/currents.config.js +0 -5
- package/files/templates/velo[D]/files/cypress/e2e/base/base.cy.ts +0 -14
- package/files/templates/velo[D]/files/cypress/fixtures/example.json +0 -5
- package/files/templates/velo[D]/files/cypress/support/commands.ts +0 -37
- package/files/templates/velo[D]/files/cypress/support/e2e.ts +0 -24
- package/files/templates/velo[D]/files/cypress/tsconfig.json +0 -9
- package/files/templates/velo[D]/files/cypress.config.mjs +0 -19
- package/files/templates/velo[D]/files/eslint.config.mjs +0 -186
- package/files/templates/velo[D]/files/local.tsconfig.json +0 -61
- package/files/templates/velo[D]/files/typedoc.json +0 -25
- package/files/templates/velo[D]/files/typescript/__mocks__/.gitkeep +0 -0
- package/files/templates/velo[D]/files/typescript/backend/config/authz.ts +0 -47
- package/files/templates/velo[D]/files/typescript/backend/config/env.ts +0 -8
- package/files/templates/velo[D]/files/typescript/backend/config/index.ts +0 -26
- package/files/templates/velo[D]/files/typescript/backend/config/mail.ts +0 -10
- package/files/templates/velo[D]/files/typescript/backend/config/nats.ts +0 -6
- package/files/templates/velo[D]/files/typescript/backend/data.ts +0 -0
- package/files/templates/velo[D]/files/typescript/backend/events.ts +0 -0
- package/files/templates/velo[D]/files/typescript/backend/http-functions.ts +0 -81
- package/files/templates/velo[D]/files/typescript/backend/lib/http-functions/sync.ts +0 -270
- package/files/templates/velo[D]/files/typescript/backend/permissions.json +0 -17
- package/files/templates/velo[D]/files/typescript/pages/.gitkeep +0 -0
- package/files/templates/velo[D]/files/typescript/public/.gitkeep +0 -0
- package/files/templates/velo[D]/files/typescript/public/config/env.ts +0 -9
- package/files/templates/velo[D]/files/typescript/public/config/index.ts +0 -76
- package/files/templates/velo[D]/files/typescript/public/config/locales.ts +0 -30
- package/files/templates/velo[D]/files/typescript/public/config/theme.ts +0 -110
- package/files/templates/velo[D]/files/typescript/public/i18n/default.ts +0 -123
- package/files/templates/velo[D]/files/typescript/public/i18n/en.ts +0 -117
- package/files/templates/velo[D]/files/typescript/public/models/collections/member_roles.mode.ts +0 -21
- package/files/templates/velo[D]/files/typescript/public/models/collections/organization.model.ts +0 -38
- package/files/templates/velo[D]/files/typescript/public/models/collections/plan.model.ts +0 -94
- package/files/templates/velo[D]/files/typescript/public/models/collections/stage.model.ts +0 -14
- package/files/templates/velo[D]/files/typescript/public/models/collections/subscriptions.model.ts +0 -80
- package/files/templates/velo[D]/files/typescript/public/models/collections/tag.model.ts +0 -15
- package/files/templates/velo[D]/files/typescript/public/models/collections/translations.model.ts +0 -16
- package/files/templates/velo[D]/files/typescript/public/models/modules/authz.model.ts +0 -31
- package/files/templates/velo[D]/files/typescript/public/models/modules/organization.ts +0 -20
- package/files/templates/velo[D]/files/typescript/public/models/splitwise.model.ts +0 -18
- package/files/templates/velo[D]/files/typescript/public/models/store/local.model.ts +0 -10
- package/files/templates/velo[D]/files/typescript/public/models/store/memory.model.ts +0 -10
- package/files/templates/velo[D]/files/typescript/public/models/store/session.model.ts +0 -10
- package/files/templates/velo[D]/files/typescript/public/models/wix/ecom/payment.ts +0 -236
- package/files/templates/velo[D]/files/typescript/public/scss/app.scss +0 -0
- package/files/templates/velo[D]/files/typescript/styles/.gitkeep +0 -0
- package/files/templates/velo[D]/files/typescript/styles/global.scss +0 -0
- package/files/templates/velo[D]/files/typescript/tsconfig.json +0 -72
- package/files/templates/velo[D]/files/vitest.config.ts +0 -45
- package/files/templates/velo[D]/lucy.json +0 -147
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"cli": {
|
|
3
|
-
"appVersionSource": "remote"
|
|
4
|
-
},
|
|
5
|
-
"build": {
|
|
6
|
-
"development": {
|
|
7
|
-
"developmentClient": true,
|
|
8
|
-
"distribution": "internal",
|
|
9
|
-
"environment": "development",
|
|
10
|
-
"env": {}
|
|
11
|
-
},
|
|
12
|
-
"ios-simulator": {
|
|
13
|
-
"extends": "development",
|
|
14
|
-
"ios": {
|
|
15
|
-
"simulator": true
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
"preview": {
|
|
19
|
-
"distribution": "internal",
|
|
20
|
-
"environment": "preview",
|
|
21
|
-
"env": {}
|
|
22
|
-
},
|
|
23
|
-
"production": {
|
|
24
|
-
"autoIncrement": true,
|
|
25
|
-
"environment": "production",
|
|
26
|
-
"env": {}
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"submit": {
|
|
30
|
-
"production": {}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
2
|
-
// https://docs.expo.dev/guides/using-eslint/
|
|
3
|
-
import eslint from '@eslint/js';
|
|
4
|
-
import expoConfig from 'eslint-config-expo/flat.js';
|
|
5
|
-
// @ts-ignore
|
|
6
|
-
import jsdoc from 'eslint-plugin-jsdoc';
|
|
7
|
-
import namedImportSpacing from 'eslint-plugin-named-import-spacing';
|
|
8
|
-
import simpleImportSort from 'eslint-plugin-simple-import-sort';
|
|
9
|
-
import globals from 'globals';
|
|
10
|
-
import tseslint from 'typescript-eslint';
|
|
11
|
-
|
|
12
|
-
export default tseslint.config(
|
|
13
|
-
eslint.configs.recommended,
|
|
14
|
-
// eslint-disable-next-line import/no-named-as-default-member
|
|
15
|
-
tseslint.configs.recommendedTypeChecked,
|
|
16
|
-
jsdoc.configs['flat/recommended-typescript'],
|
|
17
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
18
|
-
expoConfig,
|
|
19
|
-
{
|
|
20
|
-
ignores: ['dist/*'],
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
plugins: {
|
|
24
|
-
'simple-import-sort': simpleImportSort,
|
|
25
|
-
'named-import-spacing': namedImportSpacing,
|
|
26
|
-
},
|
|
27
|
-
settings: {
|
|
28
|
-
'import/resolver': {
|
|
29
|
-
typescript: {
|
|
30
|
-
project: './tsconfig.json',
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
languageOptions: {
|
|
35
|
-
// eslint-disable-next-line import/no-named-as-default-member
|
|
36
|
-
parser: tseslint.parser,
|
|
37
|
-
parserOptions: {
|
|
38
|
-
projectService: true,
|
|
39
|
-
},
|
|
40
|
-
ecmaVersion: 2020,
|
|
41
|
-
sourceType: 'module',
|
|
42
|
-
globals: {
|
|
43
|
-
$w: 'readonly',
|
|
44
|
-
...globals.browser,
|
|
45
|
-
...globals.node,
|
|
46
|
-
// ...globals.es6,
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
rules: {
|
|
50
|
-
'no-console': ['error'],
|
|
51
|
-
'no-restricted-imports': [
|
|
52
|
-
'error',
|
|
53
|
-
{
|
|
54
|
-
'patterns': ['*/**/backend/*', '*/**/public/*']
|
|
55
|
-
}
|
|
56
|
-
],
|
|
57
|
-
'no-restricted-syntax': [
|
|
58
|
-
'warn',
|
|
59
|
-
{
|
|
60
|
-
selector: 'StaticBlock',
|
|
61
|
-
message: 'Static blocks are not allowed in classes.',
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
selector: "MemberExpression[object.name='globalThis'][property.name='console']",
|
|
65
|
-
message: 'Using globalThis.console is not allowed.'
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
selector: "CallExpression[callee.property.name='runPromise'][callee.object.name='runtime']",
|
|
69
|
-
message: 'Usage of runtime.runPromise() is discouraged.',
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
selector: "CallExpression[callee.property.name='runFork'][callee.object.name='runtime']",
|
|
73
|
-
message: 'Usage of runtime.runFork() is discouraged.',
|
|
74
|
-
}
|
|
75
|
-
],
|
|
76
|
-
'@typescript-eslint/no-unsafe-argument': 'error',
|
|
77
|
-
'@typescript-eslint/no-unsafe-assignment': 'off',
|
|
78
|
-
'@typescript-eslint/no-unsafe-call': 'error',
|
|
79
|
-
'@typescript-eslint/no-unsafe-member-access': 'off',
|
|
80
|
-
'@typescript-eslint/no-unsafe-return': 'error',
|
|
81
|
-
quotes: [2, 'single', { avoidEscape: true, allowTemplateLiterals: true }],
|
|
82
|
-
curly: ['error', 'multi-line'],
|
|
83
|
-
'simple-import-sort/imports': 'error',
|
|
84
|
-
'simple-import-sort/exports': 'error',
|
|
85
|
-
indent: ['error', 'tab'],
|
|
86
|
-
'no-tabs': 0,
|
|
87
|
-
'semi-style': ['error', 'last'],
|
|
88
|
-
semi: [2, 'always'],
|
|
89
|
-
'object-curly-spacing': ['error', 'always'],
|
|
90
|
-
'space-in-parens': ['error', 'never'],
|
|
91
|
-
'newline-before-return': 'error',
|
|
92
|
-
'space-before-blocks': ['error', { functions: 'always', keywords: 'always', classes: 'always' }],
|
|
93
|
-
'comma-spacing': ['error', { before: false, after: true }],
|
|
94
|
-
'no-multi-spaces': 'error',
|
|
95
|
-
'import/newline-after-import': ['error', { count: 1 }],
|
|
96
|
-
'named-import-spacing/named-import-spacing': 2,
|
|
97
|
-
'@typescript-eslint/no-unused-vars': 'warn',
|
|
98
|
-
'import/no-unresolved': [0],
|
|
99
|
-
'no-forbidden-relative-imports': [0],
|
|
100
|
-
'@typescript-eslint/triple-slash-reference': 'off',
|
|
101
|
-
'@typescript-eslint/member-ordering': [
|
|
102
|
-
'error',
|
|
103
|
-
{
|
|
104
|
-
classes: [
|
|
105
|
-
'constructor',
|
|
106
|
-
'private-instance-field',
|
|
107
|
-
'protected-instance-field',
|
|
108
|
-
'public-instance-field',
|
|
109
|
-
'public-instance-method',
|
|
110
|
-
'private-instance-method',
|
|
111
|
-
],
|
|
112
|
-
},
|
|
113
|
-
],
|
|
114
|
-
'@typescript-eslint/naming-convention': [
|
|
115
|
-
'error',
|
|
116
|
-
{
|
|
117
|
-
selector: ['variable'],
|
|
118
|
-
format: ['camelCase', 'UPPER_CASE'],
|
|
119
|
-
leadingUnderscore: 'allow',
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
selector: ['function'],
|
|
123
|
-
format: ['camelCase', 'PascalCase'],
|
|
124
|
-
leadingUnderscore: 'allow',
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
selector: ['objectLiteralMethod',],
|
|
128
|
-
format: ['camelCase', 'PascalCase'],
|
|
129
|
-
leadingUnderscore: 'allow',
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
selector: ['import',],
|
|
133
|
-
format: ['camelCase', 'PascalCase'],
|
|
134
|
-
leadingUnderscore: 'allow',
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
selector: ['objectLiteralProperty'],
|
|
138
|
-
format: null,
|
|
139
|
-
leadingUnderscore: 'allow',
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
selector: 'memberLike',
|
|
143
|
-
modifiers: ['private'],
|
|
144
|
-
format: ['camelCase'],
|
|
145
|
-
leadingUnderscore: 'require',
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
selector: 'memberLike',
|
|
149
|
-
modifiers: ['protected'],
|
|
150
|
-
format: ['camelCase'],
|
|
151
|
-
leadingUnderscore: 'require',
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
selector: 'memberLike',
|
|
155
|
-
modifiers: ['public'],
|
|
156
|
-
format: ['camelCase'],
|
|
157
|
-
leadingUnderscore: 'forbid',
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
selector: ['parameterProperty', 'parameter'],
|
|
161
|
-
format: ['camelCase'],
|
|
162
|
-
leadingUnderscore: 'forbid',
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
selector: 'default',
|
|
166
|
-
format: ['UPPER_CASE'],
|
|
167
|
-
leadingUnderscore: 'forbid',
|
|
168
|
-
trailingUnderscore: 'forbid',
|
|
169
|
-
custom: {
|
|
170
|
-
regex: '^[A-Z_]+$',
|
|
171
|
-
match: true,
|
|
172
|
-
},
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
selector: 'typeLike',
|
|
176
|
-
format: ['PascalCase'],
|
|
177
|
-
},
|
|
178
|
-
],
|
|
179
|
-
},
|
|
180
|
-
},
|
|
181
|
-
);
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
@tailwind base;
|
|
2
|
-
@tailwind components;
|
|
3
|
-
@tailwind utilities;
|
|
4
|
-
@layer base {
|
|
5
|
-
:root {
|
|
6
|
-
--background: 0 0% 100%;
|
|
7
|
-
--foreground: 240 10% 3.9%;
|
|
8
|
-
--card: 0 0% 100%;
|
|
9
|
-
--card-foreground: 240 10% 3.9%;
|
|
10
|
-
--popover: 0 0% 100%;
|
|
11
|
-
--popover-foreground: 240 10% 3.9%;
|
|
12
|
-
--primary: 240 5.9% 10%;
|
|
13
|
-
--primary-foreground: 0 0% 98%;
|
|
14
|
-
--secondary: 240 4.8% 95.9%;
|
|
15
|
-
--secondary-foreground: 240 5.9% 10%;
|
|
16
|
-
--muted: 240 4.8% 95.9%;
|
|
17
|
-
--muted-foreground: 240 3.8% 46.1%;
|
|
18
|
-
--accent: 240 4.8% 95.9%;
|
|
19
|
-
--accent-foreground: 240 5.9% 10%;
|
|
20
|
-
--destructive: 0 84.2% 60.2%;
|
|
21
|
-
--destructive-foreground: 0 0% 98%;
|
|
22
|
-
--border: 240 5.9% 90%;
|
|
23
|
-
--input: 240 5.9% 90%;
|
|
24
|
-
--ring: 240 5.9% 10%;
|
|
25
|
-
}
|
|
26
|
-
.dark:root {
|
|
27
|
-
--background: 240 10% 3.9%;
|
|
28
|
-
--foreground: 0 0% 98%;
|
|
29
|
-
--card: 240 10% 3.9%;
|
|
30
|
-
--card-foreground: 0 0% 98%;
|
|
31
|
-
--popover: 240 10% 3.9%;
|
|
32
|
-
--popover-foreground: 0 0% 98%;
|
|
33
|
-
--primary: 0 0% 98%;
|
|
34
|
-
--primary-foreground: 240 5.9% 10%;
|
|
35
|
-
--secondary: 240 3.7% 15.9%;
|
|
36
|
-
--secondary-foreground: 0 0% 98%;
|
|
37
|
-
--muted: 240 3.7% 15.9%;
|
|
38
|
-
--muted-foreground: 240 5% 64.9%;
|
|
39
|
-
--accent: 240 3.7% 15.9%;
|
|
40
|
-
--accent-foreground: 0 0% 98%;
|
|
41
|
-
--destructive: 0 72% 51%;
|
|
42
|
-
--destructive-foreground: 0 0% 98%;
|
|
43
|
-
--border: 240 3.7% 15.9%;
|
|
44
|
-
--input: 240 3.7% 15.9%;
|
|
45
|
-
--ring: 240 4.9% 83.9%;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { useColorScheme as useNativewindColorScheme } from 'nativewind';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Custom hook to get the current color scheme and provide methods to change it.
|
|
5
|
-
* This hook uses the nativewind's useColorScheme to access the color scheme.
|
|
6
|
-
* @returns An object containing the current color scheme, a method to set the color scheme,
|
|
7
|
-
*/
|
|
8
|
-
export function useColorScheme() {
|
|
9
|
-
const { colorScheme, setColorScheme, toggleColorScheme } = useNativewindColorScheme();
|
|
10
|
-
|
|
11
|
-
return {
|
|
12
|
-
colorScheme: colorScheme ?? 'dark',
|
|
13
|
-
isDarkColorScheme: colorScheme === 'dark',
|
|
14
|
-
setColorScheme,
|
|
15
|
-
toggleColorScheme,
|
|
16
|
-
};
|
|
17
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import '@/global.css';
|
|
2
|
-
import '@/lib/utils/polyfills';
|
|
3
|
-
|
|
4
|
-
import { registerRootComponent } from 'expo';
|
|
5
|
-
|
|
6
|
-
import App from './App';
|
|
7
|
-
|
|
8
|
-
// registerRootComponent calls AppRegistry.registerComponent('main', () => App);
|
|
9
|
-
// It also ensures that whether you load the app in Expo Go or in a native build,
|
|
10
|
-
// the environment is set up appropriately
|
|
11
|
-
registerRootComponent(App);
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
import { Data, DateTime, Effect, pipe, Schedule, Schema } from 'effect';
|
|
2
|
-
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
3
|
-
import * as FileSystem from 'expo-file-system';
|
|
4
|
-
import { Asset } from 'expo-asset';
|
|
5
|
-
import { getLocales } from 'expo-localization';
|
|
6
|
-
import Papa from 'papaparse';
|
|
7
|
-
|
|
8
|
-
export class StorageError extends Data.TaggedError('StorageError')<{reason: string}> {}
|
|
9
|
-
export class QuoteNotFoundError extends Data.TaggedError('QuoteNotFoundError')<{reason: string}> {}
|
|
10
|
-
export class DataError extends Data.TaggedError('DataError')<{reason: string}> {}
|
|
11
|
-
|
|
12
|
-
const assets = {
|
|
13
|
-
en: require('@/assets/data/en.csv'),
|
|
14
|
-
de: require('@/assets/data/de.csv'),
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
const supportedLocales = Object.keys(assets);
|
|
18
|
-
const fallbackLocale: keyof typeof assets = 'en';
|
|
19
|
-
const fallbackQuote: Quote = { source: 'The Lord', content: 'The ways of the Lord are inscrutable.' };
|
|
20
|
-
const storage_key = 'dailySpiritQuote';
|
|
21
|
-
|
|
22
|
-
const schema = Schema.parseJson()
|
|
23
|
-
const decode = Schema.decodeUnknown(schema)
|
|
24
|
-
|
|
25
|
-
const dataSchema = Schema.Struct({
|
|
26
|
-
source: Schema.String,
|
|
27
|
-
content: Schema.String,
|
|
28
|
-
_id: Schema.String,
|
|
29
|
-
_owner: Schema.String,
|
|
30
|
-
_createdDate: Schema.Any,
|
|
31
|
-
_updatedDate: Schema.Any,
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
const storageSchema = Schema.Struct({
|
|
35
|
-
index: Schema.Number,
|
|
36
|
-
date: Schema.DateTimeUtc,
|
|
37
|
-
})
|
|
38
|
-
type StorageSchema = typeof storageSchema.Type;
|
|
39
|
-
|
|
40
|
-
type Quote = {
|
|
41
|
-
source: string;
|
|
42
|
-
content: string;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// Type guard to check if a string is a valid locale key
|
|
46
|
-
function isSupportedLocale(locale: string): locale is keyof typeof assets {
|
|
47
|
-
return supportedLocales.includes(locale);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const clearStorage = Effect.gen(function* () {
|
|
51
|
-
yield* Effect.tryPromise({
|
|
52
|
-
try: () => AsyncStorage.removeItem(storage_key),
|
|
53
|
-
catch: (error) => {
|
|
54
|
-
console.error('Error clearing storage:', error);
|
|
55
|
-
return new StorageError({ reason: 'Failed to clear storage' });
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
const saveToStorage = (quote: StorageSchema) => Effect.gen(function* () {
|
|
61
|
-
yield* Effect.tryPromise({
|
|
62
|
-
try: () => AsyncStorage.setItem(storage_key, JSON.stringify(quote)),
|
|
63
|
-
catch: (error) => {
|
|
64
|
-
console.error('Error saving quote to storage:', error);
|
|
65
|
-
return new StorageError({ reason: 'Failed to save quote to storage' });
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
const getFromStorage = Effect.gen(function* () {
|
|
71
|
-
const quoteRaw = yield* Effect.tryPromise({
|
|
72
|
-
try: () => AsyncStorage.getItem(storage_key),
|
|
73
|
-
catch: (error) => {
|
|
74
|
-
console.error('Error fetching quote from storage:', error);
|
|
75
|
-
AsyncStorage.removeItem(storage_key)
|
|
76
|
-
return new StorageError({ reason: 'Failed to fetch quote from storage' });
|
|
77
|
-
}
|
|
78
|
-
}).pipe(Effect.catchAll((error) => {
|
|
79
|
-
console.error('Error fetching quote from storage:', error);
|
|
80
|
-
return Effect.succeed(null);
|
|
81
|
-
}));
|
|
82
|
-
|
|
83
|
-
const QuoteJSON = yield* Schema.decodeUnknown(Schema.parseJson())(quoteRaw).pipe(Effect.catchAll((error) => {
|
|
84
|
-
console.error('Error decoding quote from storage:', error);
|
|
85
|
-
return Effect.succeed(null);
|
|
86
|
-
}));
|
|
87
|
-
const data = yield* Schema.decodeUnknown(storageSchema)(QuoteJSON).pipe(
|
|
88
|
-
Effect.catchAll((error) => {
|
|
89
|
-
console.error('Failed to decode quote from storage:', error);
|
|
90
|
-
return Effect.gen(function* () {
|
|
91
|
-
yield* clearStorage.pipe(Effect.catchAll((error) => {
|
|
92
|
-
console.error('Error clearing storage:', error);
|
|
93
|
-
return Effect.succeed(null);
|
|
94
|
-
}));
|
|
95
|
-
return yield* Effect.succeed(null);
|
|
96
|
-
})
|
|
97
|
-
}
|
|
98
|
-
)
|
|
99
|
-
);
|
|
100
|
-
return data;
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
const getQuoteFromCSV = (index?: number) => Effect.gen(function* () {
|
|
104
|
-
const locale = getLocales()[0].languageTag.split('-')[0];
|
|
105
|
-
const asset = isSupportedLocale(locale) ? assets[locale] : assets[fallbackLocale];
|
|
106
|
-
|
|
107
|
-
const [{ localUri }] = yield* Effect.tryPromise({
|
|
108
|
-
try: () => Asset.loadAsync(asset),
|
|
109
|
-
catch: (error) => {
|
|
110
|
-
console.error('Error loading asset:', error);
|
|
111
|
-
return new DataError({ reason: 'Failed to load asset' });
|
|
112
|
-
}
|
|
113
|
-
})
|
|
114
|
-
const csv = yield* Effect.tryPromise({
|
|
115
|
-
try: () => FileSystem.readAsStringAsync(localUri || ''),
|
|
116
|
-
catch: (error) => {
|
|
117
|
-
console.error('Error loading asset:', error);
|
|
118
|
-
return new DataError({ reason: 'Failed to read CSV file' });
|
|
119
|
-
}
|
|
120
|
-
})
|
|
121
|
-
|
|
122
|
-
const { data: quotes, errors } = Papa.parse<{Verse: string, Reference: string, Topic: string}>(csv, { header: true, skipEmptyLines: true });
|
|
123
|
-
if (errors.length > 0) {
|
|
124
|
-
console.error('Error parsing CSV:', errors);
|
|
125
|
-
return yield* Effect.succeed(null);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
if (quotes.length === 0) {
|
|
129
|
-
return yield* Effect.succeed(null);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
if(index !== undefined) {
|
|
133
|
-
if(index <= quotes.length) {
|
|
134
|
-
const randomQuote = quotes[index];
|
|
135
|
-
return { source: randomQuote.Reference, content: randomQuote.Verse, index: index };
|
|
136
|
-
}
|
|
137
|
-
if(index < 0 || index <= quotes.length) {
|
|
138
|
-
yield* clearStorage
|
|
139
|
-
return yield* Effect.succeed(null);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
const randomIndex = Math.floor(Math.random() * quotes.length);
|
|
144
|
-
const randomQuote = quotes[randomIndex];
|
|
145
|
-
|
|
146
|
-
return { source: randomQuote.Reference, content: randomQuote.Verse, index: randomIndex };
|
|
147
|
-
})
|
|
148
|
-
|
|
149
|
-
export const getData = () => Effect.gen(function* () {
|
|
150
|
-
const currentTime = yield* DateTime.now;
|
|
151
|
-
const quoteTimestamp = DateTime.setParts(currentTime, {hours: 4, minutes: 30, seconds: 0});
|
|
152
|
-
const dataFromStorage = yield* getFromStorage
|
|
153
|
-
|
|
154
|
-
if(dataFromStorage !== null) {
|
|
155
|
-
const elapsed = DateTime.distance(dataFromStorage.date, currentTime);
|
|
156
|
-
if (elapsed <= 86400000) {
|
|
157
|
-
const quoteWithIndex = yield* getQuoteFromCSV(dataFromStorage.index);
|
|
158
|
-
if (quoteWithIndex !== null) {
|
|
159
|
-
const quoteDate: Quote = { source: quoteWithIndex.source, content: quoteWithIndex.content };
|
|
160
|
-
return quoteDate;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
const quoteWithIndex = yield* getQuoteFromCSV();
|
|
166
|
-
if (quoteWithIndex === null) {
|
|
167
|
-
console.warn('No quote found, returning fallback quote');
|
|
168
|
-
return yield* Effect.fail(new QuoteNotFoundError({ reason: 'No quote found' }));
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
const quoteDate: Quote = { source: quoteWithIndex.source, content: quoteWithIndex.content };
|
|
172
|
-
yield* saveToStorage({
|
|
173
|
-
index: quoteWithIndex.index,
|
|
174
|
-
date: quoteTimestamp,
|
|
175
|
-
})
|
|
176
|
-
|
|
177
|
-
return quoteDate;
|
|
178
|
-
}).pipe(Effect.catchTags({
|
|
179
|
-
QuoteNotFoundError: (error) => {
|
|
180
|
-
console.warn('Quote not found in storage, returning fallback quote');
|
|
181
|
-
return Effect.succeed(fallbackQuote);
|
|
182
|
-
},
|
|
183
|
-
DataError: (error) => {
|
|
184
|
-
console.error('Data error occurred:', error);
|
|
185
|
-
return Effect.succeed(fallbackQuote);
|
|
186
|
-
},
|
|
187
|
-
StorageError: (error) => {
|
|
188
|
-
console.error('Storage error occurred:', error);
|
|
189
|
-
return Effect.gen(function* () {
|
|
190
|
-
yield* clearStorage.pipe(Effect.catchAll((error) => {
|
|
191
|
-
console.error('Error clearing storage:', error);
|
|
192
|
-
return Effect.succeed(null);
|
|
193
|
-
}));
|
|
194
|
-
return yield* Effect.succeed(fallbackQuote);
|
|
195
|
-
})
|
|
196
|
-
}
|
|
197
|
-
}))
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type ClassValue, clsx } from 'clsx';
|
|
2
|
-
import { twMerge } from 'tailwind-merge';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Combines class names and merges Tailwind CSS classes.
|
|
6
|
-
* @param inputs - The class names to combine.
|
|
7
|
-
* @returns A string of combined class names.
|
|
8
|
-
*/
|
|
9
|
-
export function cn(...inputs: ClassValue[]) {
|
|
10
|
-
return twMerge(clsx(inputs));
|
|
11
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { polyfillWebCrypto } from 'expo-standard-web-crypto';
|
|
3
|
-
// import { Platform } from 'react-native';
|
|
4
|
-
// // import polyfill from 'react-native-polyfill-globals';
|
|
5
|
-
// import { TextDecoder, TextEncoder } from "text-encoding";
|
|
6
|
-
// // require('node-libs-react-native/globals');
|
|
7
|
-
// if (typeof TextEncoder === "undefined") {
|
|
8
|
-
// Object.defineProperty(window, "TextEncoder", {
|
|
9
|
-
// configurable: true,
|
|
10
|
-
// enumerable: true,
|
|
11
|
-
// get: () => TextEncoder,
|
|
12
|
-
// });
|
|
13
|
-
// }
|
|
14
|
-
|
|
15
|
-
// if (typeof TextDecoder === "undefined") {
|
|
16
|
-
// Object.defineProperty(window, "TextDecoder", {
|
|
17
|
-
// configurable: true,
|
|
18
|
-
// enumerable: true,
|
|
19
|
-
// get: () => TextDecoder,
|
|
20
|
-
// });
|
|
21
|
-
// }
|
|
22
|
-
// if (Platform.OS !== "web") {
|
|
23
|
-
// // require("react-native-polyfill-globals");
|
|
24
|
-
// // @ts-ignore
|
|
25
|
-
// (Symbol).asyncIterator = Symbol.asyncIterator || Symbol.for("Symbol.asyncIterator");
|
|
26
|
-
// // polyfill();
|
|
27
|
-
// }
|
|
28
|
-
|
|
29
|
-
polyfillWebCrypto();
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { items } from '@wix/data';
|
|
2
|
-
import { createClient, OAuthStrategy } from '@wix/sdk';
|
|
3
|
-
|
|
4
|
-
const clientId = process.env.EXPO_PUBLIC_WIX_CLIENT_ID || '';
|
|
5
|
-
|
|
6
|
-
//To access the Wix APIs, create a client with the createClient() function imported from the @wix/sdk package.
|
|
7
|
-
export const client = createClient({
|
|
8
|
-
modules: { items },
|
|
9
|
-
auth: OAuthStrategy({ clientId: clientId }),
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-require-imports */
|
|
2
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
3
|
-
// @ts-nocheck
|
|
4
|
-
const { getDefaultConfig } = require('expo/metro-config');
|
|
5
|
-
const { withNativeWind } = require('nativewind/metro');
|
|
6
|
-
const path = require('path');
|
|
7
|
-
|
|
8
|
-
const ALIASES_WEB = {
|
|
9
|
-
'@wix/sdk': path.resolve(__dirname, './node_modules/@wix/sdk/cjs/build/index.js'),
|
|
10
|
-
// Example: redirect imports of 'some-native-library' to a web-compatible mock
|
|
11
|
-
// 'some-native-library': path.resolve(__dirname, 'src/mocks/some-native-library.web.js'),
|
|
12
|
-
|
|
13
|
-
// You can add your @wix/sdk aliases here if needed
|
|
14
|
-
// '@wix/sdk-something': path.resolve(__dirname, 'src/wix/sdk-something-web.js'),
|
|
15
|
-
};
|
|
16
|
-
const config = (() => {
|
|
17
|
-
let config = getDefaultConfig(__dirname);
|
|
18
|
-
const { transformer, resolver } = config;
|
|
19
|
-
config.transformer = {
|
|
20
|
-
...transformer,
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
const assetExts = config.resolver.assetExts;
|
|
24
|
-
if (!assetExts.includes('csv')) {
|
|
25
|
-
assetExts.push('csv');
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
config.resolver = {
|
|
29
|
-
...resolver,
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
config.resolver.unstable_enablePackageExports = false;
|
|
33
|
-
// config.resolver.unstable_conditionsByPlatform = ['ios', 'android']
|
|
34
|
-
config.resolver.resolveRequest = (context, moduleName, platform) => {
|
|
35
|
-
if (platform === 'web') {
|
|
36
|
-
// Check if the module name is in our alias map
|
|
37
|
-
const alias = ALIASES_WEB[moduleName];
|
|
38
|
-
if (alias) {
|
|
39
|
-
console.log(`Aliasing '${moduleName}' to '${alias}'`);
|
|
40
|
-
// If it is, resolve to the new path
|
|
41
|
-
return context.resolveRequest(context, alias, platform);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
// Ensure you call the default resolver for everything else.
|
|
45
|
-
return context.resolveRequest(context, moduleName, platform);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
config.resolver.extraNodeModules = {
|
|
49
|
-
...config.resolver.extraNodeModules,
|
|
50
|
-
...require('node-libs-react-native'),
|
|
51
|
-
// 'node:buffer': require.resolve('buffer/'),
|
|
52
|
-
// 'node:crypto': require.resolve('react-native-crypto/'),
|
|
53
|
-
// 'node:util': require.resolve('util/'),
|
|
54
|
-
// 'node:http': require.resolve('stream-http/'),
|
|
55
|
-
// 'node:https': require.resolve('https-browserify/'),
|
|
56
|
-
// 'node:events': require.resolve('events/'),
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
return config;
|
|
60
|
-
})();
|
|
61
|
-
// console.log('Using Metro config:', JSON.stringify(config, null, 2));
|
|
62
|
-
module.exports = withNativeWind(config, { input: './global.css' });
|
|
63
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/// <reference types="nativewind/types" />
|