From 15f0ebb4a1bfe29325643ba5542f11f4724a73fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Zi=C3=B3=C5=82kowski?= Date: Fri, 6 Dec 2024 21:17:26 +0100 Subject: [PATCH] feat: Expo Update support + Inspector Beta + CLI / SDK refactor (#42) Co-authored-by: Dawid Krajewski Co-authored-by: Sherlo Bot --- .github/workflows/async.yml | 126 - .github/workflows/device_testing.yml | 49 - .../{eas_hooks.yml => expo-cloud.yml} | 33 +- .github/workflows/expo-remote-builds.yml | 25 - .github/workflows/expo-update.yml | 107 + .github/workflows/expo-updates.yml | 25 - .github/workflows/expo_local-builds.yml | 52 +- .github/workflows/node_testing.yml | 79 - .github/workflows/release.yml | 9 + .github/workflows/rn_local-builds.yml | 28 +- .github/workflows/sherlo_builds.yml | 37 + .github/workflows/sherlo_testing.yml | 107 +- .github/workflows/stress_testing.yml | 21 +- .github/workflows/sync.yml | 48 - README.md | 8 +- action.yml | 26 +- .../{device-testing.json => all-devices.json} | 1 + configs/async.storybook.json | 20 - ...ress-testing.json => default-devices.json} | 7 +- configs/eas.preview.json | 20 - .../{demo.preview.json => many-stories.json} | 17 +- configs/sync.preview.json | 20 - examples/README.md | 37 + examples/expo-cloud-builds/.github/sherlo.yml | 28 + .../.gitignore | 0 .../.storybook/index.tsx | 8 +- .../.storybook/main.ts | 0 .../expo-cloud-builds/.storybook/preview.ts | 5 + .../.storybook/storybook.requires.ts | 16 +- examples/expo-cloud-builds/App.tsx | 13 + examples/expo-cloud-builds/app.config.js | 38 + examples/expo-cloud-builds/babel.config.js | 6 + examples/expo-cloud-builds/eas.json | 15 + .../index.ts | 0 examples/expo-cloud-builds/metro.config.js | 14 + examples/expo-cloud-builds/package.json | 33 + examples/expo-cloud-builds/src/HomeScreen.tsx | 32 + .../ExcludedStory/ExcludedStory.stories.tsx | 20 + .../ExcludedStory/ExcludedStory.tsx | 7 + .../PlatformSpecificComponent.stories.tsx | 20 + .../PlatformSpecificComponent.tsx | 24 + .../WithFigmaComparison.stories.tsx | 33 + .../WithFigmaComparison.tsx | 65 + .../tsconfig.json | 0 examples/expo-example/.env.sample | 1 - examples/expo-example/.storybook-web/main.ts | 34 - .../expo-example/.storybook-web/preview.tsx | 17 - examples/expo-example/.storybook/preview.ts | 24 - examples/expo-example/App.tsx | 70 - examples/expo-example/README.md | 57 - examples/expo-example/app.json | 56 - .../assets/Images/AirPurifier.png | Bin 76807 -> 0 bytes .../assets/Images/AvatarImage.png | Bin 47321 -> 0 bytes .../expo-example/assets/Images/Bathroom.png | Bin 90986 -> 0 bytes .../expo-example/assets/Images/Bedroom.png | Bin 64886 -> 0 bytes .../assets/Images/BedsideLamp.png | Bin 53183 -> 0 bytes .../expo-example/assets/Images/Heating.png | Bin 49540 -> 0 bytes .../expo-example/assets/Images/LivingRoom.png | Bin 64521 -> 0 bytes .../expo-example/assets/Images/Office.png | Bin 50631 -> 0 bytes .../expo-example/assets/Images/Speaker.png | Bin 68214 -> 0 bytes .../expo-example/assets/Images/TopLights.png | Bin 47751 -> 0 bytes .../assets/Images/VacuumCleaner.png | Bin 56551 -> 0 bytes .../expo-example/assets/adaptive-icon.png | Bin 17547 -> 0 bytes examples/expo-example/assets/favicon.png | Bin 1466 -> 0 bytes examples/expo-example/assets/icon.png | Bin 22380 -> 0 bytes examples/expo-example/assets/splash.png | Bin 47346 -> 0 bytes examples/expo-example/babel.config.js | 16 - .../builds/development/android.apk | 3 - .../builds/development/ios.tar.gz | 3 - .../expo-example/builds/preview/android.apk | 3 - .../expo-example/builds/preview/ios.tar.gz | 3 - .../builds/production/android.apk | 3 - .../expo-example/builds/storybook/android.apk | 3 - .../expo-example/builds/storybook/ios.tar.gz | 3 - examples/expo-example/eas.json | 49 - examples/expo-example/metro.config.js | 16 - examples/expo-example/package.json | 97 - examples/expo-example/react-native.config.js | 18 - .../scripts/setDevEnvOnExpoServer.js | 7 - examples/expo-example/sherlo.config.json | 12 - .../components/base/Avatar/Avatar.stories.tsx | 24 - .../src/components/base/Avatar/Avatar.tsx | 25 - .../src/components/base/Avatar/index.ts | 1 - .../src/components/base/Icon/Icon.stories.tsx | 96 - .../src/components/base/Icon/Icon.tsx | 82 - .../base/Icon/Icons/AccountIcon.tsx | 26 - .../base/Icon/Icons/ArrowDownIcon.tsx | 20 - .../base/Icon/Icons/ArrowLeftIcon.tsx | 21 - .../base/Icon/Icons/ArrowRightIcon.tsx | 21 - .../components/base/Icon/Icons/CogIcon.tsx | 21 - .../components/base/Icon/Icons/Connect.tsx | 22 - .../src/components/base/Icon/Icons/Dot.tsx | 26 - .../components/base/Icon/Icons/MinusIcon.tsx | 13 - .../base/Icon/Icons/PlusBoxIcon.tsx | 26 - .../components/base/Icon/Icons/PlusIcon.tsx | 13 - .../components/base/Icon/Icons/SaveEnergy.tsx | 32 - .../base/Icon/Icons/SlidersIcon.tsx | 21 - .../base/Icon/Icons/SplotchIcon.tsx | 21 - .../src/components/base/Icon/Icons/types.ts | 6 - .../src/components/base/Icon/index.ts | 2 - .../base/IconButton/IconButton.stories.tsx | 16 - .../components/base/IconButton/IconButton.tsx | 16 - .../src/components/base/IconButton/index.ts | 1 - .../components/base/Switch/Switch.stories.tsx | 35 - .../src/components/base/Switch/Switch.tsx | 46 - .../src/components/base/Switch/index.ts | 1 - .../src/components/base/Text/Text.stories.tsx | 38 - .../src/components/base/Text/Text.tsx | 118 - .../src/components/base/Text/index.ts | 1 - .../TutorialIcon/TutorialIcon.stories.tsx | 26 - .../base/TutorialIcon/TutorialIcon.tsx | 32 - .../src/components/base/TutorialIcon/index.ts | 0 .../ButtonPlusMinus.stories.tsx | 16 - .../ButtonPlusMinus/ButtonPlusMinus.tsx | 51 - .../partials/ButtonPlusMinus/index.ts | 2 - .../partials/CardItem/CardItem.data.ts | 18 - .../components/partials/CardItem/CardItem.tsx | 83 - .../src/components/partials/CardItem/index.ts | 1 - .../DevicesList/DevicesList.stories.tsx | 19 - .../partials/DevicesList/DevicesList.tsx | 63 - .../DevicesListItem/DevicesListItem.data.ts | 60 - .../DevicesListItem.stories.tsx | 61 - .../DevicesListItem/DevicesListItem.tsx | 51 - .../DevicesList/DevicesListItem/index.ts | 2 - .../components/partials/DevicesList/index.ts | 2 - .../partials/Footer/Footer.stories.tsx | 14 - .../src/components/partials/Footer/Footer.tsx | 42 - .../src/components/partials/Footer/index.ts | 1 - .../partials/Header/Header.stories.tsx | 27 - .../src/components/partials/Header/Header.tsx | 47 - .../src/components/partials/Header/index.ts | 1 - .../InfoDisplay/InfoDisplay.stories.tsx | 24 - .../partials/InfoDisplay/InfoDisplay.tsx | 45 - .../InfoDisplay/components/InfoDisplayBox.tsx | 61 - .../partials/InfoDisplay/components/index.ts | 1 - .../components/partials/InfoDisplay/index.ts | 1 - .../partials/RoomsList/RoomsList.stories.tsx | 19 - .../partials/RoomsList/RoomsList.tsx | 29 - .../RoomsListItem/RoomsListItem.data.ts | 29 - .../RoomsListItem/RoomsListItem.stories.tsx | 53 - .../RoomsList/RoomsListItem/RoomsListItem.tsx | 40 - .../partials/RoomsList/RoomsListItem/index.ts | 2 - .../components/partials/RoomsList/index.ts | 1 - .../ScrollOverlay/ScrollOverlay.stories.tsx | 28 - .../partials/ScrollOverlay/ScrollOverlay.tsx | 48 - .../partials/ScrollOverlay/index.ts | 1 - .../SettingsButton/SettingsButton.stories.tsx | 12 - .../SettingsButton/SettingsButton.tsx | 36 - .../partials/SettingsButton/index.ts | 1 - .../SettingsTime/SettingsTime.stories.tsx | 14 - .../partials/SettingsTime/SettingsTime.tsx | 34 - .../SettingsTime/components/TimeBox.tsx | 61 - .../partials/SettingsTime/components/index.ts | 1 - .../components/partials/SettingsTime/index.ts | 1 - .../TabComponent/TabBar/TabBar.stories.tsx | 19 - .../partials/TabComponent/TabBar/TabBar.tsx | 49 - .../partials/TabComponent/TabBar/index.ts | 1 - .../TabComponent/TabComponent.stories.tsx | 19 - .../partials/TabComponent/TabComponent.tsx | 30 - .../TabComponent/Tabs/Tabs.stories.tsx | 24 - .../partials/TabComponent/Tabs/Tabs.tsx | 36 - .../partials/TabComponent/Tabs/index.ts | 1 - .../components/partials/TabComponent/index.ts | 1 - .../partials/TabDevice/TabDevice.stories.tsx | 13 - .../partials/TabDevice/TabDevice.tsx | 47 - .../components/TabBarDevice.stories.tsx | 8 - .../TabDevice/components/TabBarDevice.tsx | 48 - .../components/TabsDevice.stories.tsx | 8 - .../TabDevice/components/TabsDevice.tsx | 73 - .../components/partials/TabDevice/types.ts | 22 - .../TutorialControl.stories.tsx | 26 - .../TutorialControll/TutorialControl.tsx | 53 - .../partials/TutorialControll/index.ts | 1 - .../src/components/partials/index.ts | 2 - .../screens/ControllScreen/ControlScreen.tsx | 33 - .../ControllScreen/ControllScreen.stories.tsx | 34 - .../screens/MainScreen/MainScreen.stories.tsx | 34 - .../screens/MainScreen/MainScreen.tsx | 38 - .../RadialBackground/RadialBackground.tsx | 79 - .../MainScreen/RadialBackground/index.ts | 1 - .../components/screens/Test/Test.stories.tsx | 10 - .../src/components/screens/Test/Test.tsx | 54 - .../src/components/screens/Test/index.ts | 1 - .../TutorialScreen/TutorialScreen.stories.tsx | 34 - .../screens/TutorialScreen/TutorialScreen.tsx | 44 - .../src/decorators/StoryDecorator.tsx | 43 - .../expo-example/src/fixtures/TabRooms.ts | 20 - examples/expo-example/src/fixtures/devices.ts | 36 - .../expo-example/src/fixtures/devicesRooms.ts | 66 - examples/expo-example/src/fixtures/rooms.ts | 20 - .../src/hooks/useScrollOverlays.tsx | 26 - examples/expo-example/src/theme/colors.ts | 39 - examples/expo-example/src/theme/dimensions.ts | 55 - examples/expo-example/src/theme/flex.ts | 75 - examples/expo-example/src/theme/shadows.ts | 22 - .../expo-example/src/utils/breakIntoLines.ts | 5 - examples/expo-update/.gitignore | 36 + examples/expo-update/.storybook/index.tsx | 12 + examples/expo-update/.storybook/main.ts | 14 + examples/expo-update/.storybook/preview.ts | 5 + .../.storybook/storybook.requires.ts | 51 + examples/expo-update/App.tsx | 13 + examples/expo-update/app.config.js | 38 + examples/expo-update/babel.config.js | 6 + examples/expo-update/eas.json | 16 + examples/expo-update/index.ts | 8 + examples/expo-update/metro.config.js | 14 + examples/expo-update/package.json | 36 + examples/expo-update/src/HomeScreen.tsx | 32 + .../ExcludedStory/ExcludedStory.stories.tsx | 20 + .../ExcludedStory/ExcludedStory.tsx | 7 + .../PlatformSpecificComponent.stories.tsx | 20 + .../PlatformSpecificComponent.tsx | 24 + .../WithFigmaComparison.stories.tsx | 33 + .../WithFigmaComparison.tsx | 65 + examples/expo-update/tsconfig.json | 11 + examples/local-builds/.gitignore | 36 + examples/local-builds/.storybook/index.tsx | 12 + examples/local-builds/.storybook/main.ts | 14 + examples/local-builds/.storybook/preview.ts | 5 + .../.storybook/storybook.requires.ts | 51 + examples/local-builds/App.tsx | 13 + examples/local-builds/app.config.js | 38 + examples/local-builds/babel.config.js | 6 + examples/local-builds/eas.json | 15 + examples/local-builds/index.ts | 8 + examples/local-builds/metro.config.js | 14 + examples/local-builds/package.json | 33 + examples/local-builds/src/HomeScreen.tsx | 32 + .../ExcludedStory/ExcludedStory.stories.tsx | 20 + .../ExcludedStory/ExcludedStory.tsx | 7 + .../PlatformSpecificComponent.stories.tsx | 20 + .../PlatformSpecificComponent.tsx | 24 + .../WithFigmaComparison.stories.tsx | 33 + .../WithFigmaComparison.tsx | 65 + examples/local-builds/tsconfig.json | 11 + lerna.json | 2 +- package.json | 5 +- packages/action/package.json | 4 +- packages/action/release/getGitInfo.js | 82 + packages/action/release/index copy.js | 81 + packages/action/release/index.js | 111726 +++------------ packages/action/src/getGitInfo.ts | 62 + packages/action/src/index.ts | 85 +- packages/cli/README.md | 4 +- .../{react-native-storybook => cli}/cli.js | 2 +- packages/cli/package.json | 41 +- packages/cli/sdk-compatibility.json | 3 + .../cli/src/commands/easBuildOnComplete.ts | 224 - .../commands/easBuildOnComplete/constants.ts | 4 + .../easBuildOnComplete/easBuildOnComplete.ts | 99 + .../asyncUploadBuildAndRunTests.ts | 73 + .../getBuildPath.ts | 89 + .../asyncUploadBuildAndRunTests/index.ts | 1 + .../helpers/getSherloTempData.ts | 52 + .../easBuildOnComplete/helpers/index.ts | 2 + .../src/commands/easBuildOnComplete/index.ts | 1 + .../src/commands/expoCloudBuilds/constants.ts | 4 + .../expoCloudBuilds/expoCloudBuilds.ts | 100 + .../helpers/createSherloTempDirectory.ts | 62 + .../commands/expoCloudBuilds/helpers/index.ts | 4 + .../helpers/removeSherloTempDirectory.ts | 13 + .../expoCloudBuilds/helpers/runScript.ts | 100 + .../helpers/validatePackageJsonScripts.ts | 106 + .../cli/src/commands/expoCloudBuilds/index.ts | 1 + .../cli/src/commands/expoUpdate/constants.ts | 4 + .../cli/src/commands/expoUpdate/expoUpdate.ts | 34 + .../getExpoMetadata.ts | 53 + .../getExpoUpdateData/getExpoUpdateData.ts | 28 + .../getExpoUpdateData/getUpdateUrls.ts | 22 + .../getExpoUpdateData/index.ts | 1 + .../parseUpdateInfoMessageString.ts | 45 + .../getExpoUpdateInfo.ts | 38 + .../getValidatedExpoUpdateData.ts | 20 + .../getValidatedExpoUpdateData/index.ts | 1 + .../shared/getUpdatePlatformsArray.ts | 8 + .../shared/index.ts | 1 + .../validateExpoUpdateInfo.ts | 48 + .../src/commands/expoUpdate/helpers/index.ts | 1 + packages/cli/src/commands/expoUpdate/index.ts | 1 + packages/cli/src/commands/index.ts | 4 +- .../cli/src/commands/localBuilds/constants.ts | 4 + .../cli/src/commands/localBuilds/index.ts | 1 + .../src/commands/localBuilds/localBuilds.ts | 19 + .../src/commands/main/helpers/getArguments.ts | 268 - .../cli/src/commands/main/helpers/index.ts | 1 - .../commands/main/helpers/utils/getGitInfo.ts | 22 - .../src/commands/main/helpers/utils/index.ts | 7 - .../main/helpers/utils/parseConfigFile.ts | 60 - .../helpers/utils/validateConfigDevices.ts | 74 - .../utils/validateConfigPlatformPath.ts | 47 - .../helpers/utils/validateConfigPlatforms.ts | 82 - .../main/helpers/utils/validateConfigToken.ts | 28 - packages/cli/src/commands/main/index.ts | 1 - packages/cli/src/commands/main/main.ts | 28 - .../src/commands/main/modes/asyncInitMode.ts | 280 - .../commands/main/modes/asyncUploadMode.ts | 47 - packages/cli/src/commands/main/modes/index.ts | 3 - .../cli/src/commands/main/modes/syncMode.ts | 78 - .../main/modes/utils/getBuildUploadUrls.ts | 16 - .../main/modes/utils/getPlatformsToTest.ts | 18 - .../src/commands/main/modes/utils/index.ts | 5 - .../main/modes/utils/uploadMobileBuilds.ts | 169 - packages/cli/src/commands/main/types.ts | 32 - packages/cli/src/commands/main/utils/index.ts | 1 - .../commands/main/utils/throwConfigError.ts | 12 - .../cli/src/commands/utils/getTokenParts.ts | 15 - .../src/commands/utils/handleClientError.ts | 16 - packages/cli/src/commands/utils/index.ts | 2 - packages/cli/src/constants.ts | 50 +- .../modes/utils => helpers}/getAppBuildUrl.ts | 2 +- .../utils => helpers}/getBuildRunConfig.ts | 30 +- packages/cli/src/helpers/getGitInfo.ts | 22 + .../cli/src/helpers/getPlatformsToTest.ts | 17 + packages/cli/src/helpers/getTokenParts.ts | 15 + .../getBinariesInfoAndNextBuildIndex.ts | 77 + .../getBinaryInfo.ts | 108 + .../accessFileInArchive.ts | 114 + .../accessFileInDirectory.ts | 38 + .../getLocalBinariesInfo.ts | 191 + .../getLocalBinariesInfo/index.ts | 1 + .../getBinariesInfoAndNextBuildIndex/index.ts | 1 + ...tValidatedBinariesInfoAndNextBuildIndex.ts | 71 + .../index.ts | 1 + .../types.ts | 14 + .../validateBinariesInfo.ts | 197 + .../getCommandParams.ts | 30 + .../getConfigWithNormalizedDevices.ts | 75 + .../getNormalizedConfig.ts | 16 + .../getNormalizedConfig/index.ts | 1 + .../getNormalizedConfig/parseConfigFile.ts | 69 + .../getOptionsWithDefaults.ts | 14 + .../getValidatedCommandParams.ts | 25 + .../getValidatedCommandParams/index.ts | 1 + .../validateCommandParams/index.ts | 1 + .../validateCommandParams.ts | 40 + .../validateConfigProperties.ts | 11 +- .../validateCommandParams/validateDevices.ts | 128 + .../validateCommandParams/validateToken.ts | 47 + .../validateRequiredOptions.ts | 64 + packages/cli/src/helpers/handleClientError.ts | 20 + packages/cli/src/helpers/index.ts | 23 +- .../countDevicesByPlatform.ts | 21 + .../src/helpers/logBuildIntroMessage/index.ts | 1 + .../logBuildIntroMessage.ts | 30 + packages/cli/src/helpers/logBuildMessage.ts | 20 + .../cli/src/helpers/logBuildPlatformLabel.ts | 9 + packages/cli/src/helpers/logInfo.ts | 16 + packages/cli/src/helpers/logResultsUrl.ts | 7 + .../{printHeader.ts => logSherloIntro.ts} | 17 +- packages/cli/src/helpers/logWarning.ts | 16 + packages/cli/src/helpers/reporting.ts | 21 + packages/cli/src/helpers/runShellCommand.ts | 30 + .../{utils => helpers/shared}/getLogLink.ts | 0 packages/cli/src/helpers/shared/index.ts | 3 + .../shared/isPackageVersionCompatible.ts | 33 + .../helpers/shared/validatePlatformPaths.ts | 182 + packages/cli/src/helpers/throwError.ts | 82 + .../helpers/uploadOrLogBinaryReuse/index.ts | 1 + .../logBuildReuse/getTimeAgo.ts | 27 + .../logBuildReuse/index.ts | 1 + .../logBuildReuse/logBuildReuse.ts | 30 + .../compressDirectoryToTarGzip.ts | 34 + .../getBuildData/compressFileToGzip.ts | 10 + .../uploadBuild/getBuildData/getBuildData.ts | 48 + .../uploadBuild/getBuildData/index.ts | 1 + .../uploadBuild/index.ts | 1 + .../uploadBuild/uploadBuild.ts | 38 + .../uploadOrLogBinaryReuse.ts | 40 + .../helpers/uploadOrReuseBuildsAndRunTests.ts | 88 + .../getPackageErrorMessage.ts | 29 + .../validatePackages/getPackageVersion.ts | 11 + .../cli/src/helpers/validatePackages/index.ts | 1 + .../cli/src/helpers/validatePackages/types.ts | 4 + .../validatePackageRequirement.ts | 42 + .../validatePackages/validatePackages.ts | 56 + packages/cli/src/index.ts | 5 +- packages/cli/src/start.ts | 143 +- packages/cli/src/types.ts | 136 + packages/cli/src/utils/index.ts | 3 - packages/cli/src/utils/logWarning.ts | 30 - packages/cli/src/utils/throwError.ts | 32 - packages/cli/tsconfig.json | 3 +- .../android/build.gradle | 6 + .../android/src/main/AndroidManifest.xml | 12 +- .../android/src/main/assets/sherlo.json | 3 + .../FileSystemHelper.java | 72 + .../storybookreactnative/InspectorHelper.java | 154 + .../storybookreactnative/RestartHelper.java | 59 + .../storybookreactnative/SherloModule.java | 298 +- .../SherloStorybookActivity.java | 36 - .../StorybookErrorHelper.java | 34 + .../react-native-storybook/ios/ConfigHelper.h | 8 + .../react-native-storybook/ios/ConfigHelper.m | 50 + .../ios/ExpoUpdateHelper.h | 9 + .../ios/ExpoUpdateHelper.m | 28 + .../ios/FileSystemHelper.h | 9 + .../ios/FileSystemHelper.m | 46 + .../ios/InspectorHelper.h | 8 + .../ios/InspectorHelper.m | 225 + .../ios/Resources/assets/sherlo.json | 3 + .../ios/RestartHelper.h | 8 + .../ios/RestartHelper.m | 16 + .../react-native-storybook/ios/SherloModule.m | 436 +- .../ios/StorybookErrorHelper.h | 8 + .../ios/StorybookErrorHelper.m | 31 + .../ios/VerificationHelper.h | 9 + .../ios/VerificationHelper.m | 50 + packages/react-native-storybook/package.json | 10 +- .../sherlo-react-native-storybook.podspec | 1 + .../src/addStorybookToDevMenu.ts | 27 + .../getStorybook/components/ErrorBoundary.tsx | 20 - .../src/getStorybook/components/Layout.tsx | 6 +- .../src/getStorybook/components/index.ts | 2 +- .../generateStorybookComponent.ts | 8 + .../src/getStorybook/getStorybook.tsx | 69 +- .../src/getStorybook/hooks/index.ts | 1 - .../hooks/useKeyboardStatusEffect.tsx | 96 - .../src/getStorybook/hooks/useTestingMode.ts | 18 +- .../RunnerBridge/actions/getLastState.ts | 71 + .../helpers/RunnerBridge/actions/getState.ts | 20 - .../src/helpers/RunnerBridge/actions/index.ts | 2 +- .../src/helpers/RunnerBridge/actions/log.ts | 4 +- .../src/helpers/RunnerBridge/actions/send.ts | 1 - .../src/helpers/RunnerBridge/runnerBridge.ts | 8 +- .../src/helpers/RunnerBridge/types.ts | 9 +- .../src/helpers/SherloModule.ts | 31 +- packages/react-native-storybook/src/index.ts | 6 +- .../src/isRunningVisualTests.ts | 2 +- .../src/isStorybookMode.ts | 17 + .../src/registerStorybook.ts | 33 - .../react-native-storybook/src/types/types.ts | 19 +- .../src/verifyIntegration.ts | 9 + scripts/updateExamples.sh | 39 + testing/expo-storybook-7/.env.sample | 1 - .../expo-storybook-7/.storybook-web/main.ts | 34 - .../.storybook-web/preview.tsx | 17 - testing/expo-storybook-7/.storybook/index.tsx | 8 +- testing/expo-storybook-7/.storybook/main.ts | 2 +- .../.storybook/storybook.requires.ts | 16 +- testing/expo-storybook-7/App.tsx | 53 +- testing/expo-storybook-7/app.config.js | 38 + testing/expo-storybook-7/app.json | 31 +- .../expo-storybook-7/assets/adaptive-icon.png | Bin 17547 -> 0 bytes testing/expo-storybook-7/assets/favicon.png | Bin 1466 -> 0 bytes testing/expo-storybook-7/assets/icon.png | Bin 22380 -> 0 bytes testing/expo-storybook-7/assets/splash.png | Bin 47346 -> 0 bytes testing/expo-storybook-7/babel.config.js | 10 - .../builds/development/android.apk | 3 - .../builds/development/ios.tar.gz | 3 - .../builds/preview/android.apk | 3 - .../builds/preview/ios.tar.gz | 3 - .../builds/production/android.apk | 3 - .../builds/storybook/android.apk | 3 - .../builds/storybook/ios.tar.gz | 3 - testing/expo-storybook-7/eas.json | 16 +- testing/expo-storybook-7/metro.config.js | 18 +- testing/expo-storybook-7/package.json | 90 +- .../expo-storybook-7/react-native.config.js | 18 - testing/expo-storybook-7/src/AppRoot.tsx | 21 - testing/expo-storybook-7/src/HomeScreen.tsx | 32 + .../ExcludedStory/ExcludedStory.stories.tsx | 20 + .../ExcludedStory/ExcludedStory.tsx | 7 + .../PlatformSpecificComponent.stories.tsx | 20 + .../PlatformSpecificComponent.tsx | 24 + .../src/components/Test/Test.stories.tsx | 10 - .../src/components/Test/Test.tsx | 54 - .../src/components/Test/index.ts | 1 - .../WithFigmaComparison.stories.tsx | 33 + .../WithFigmaComparison.tsx | 65 + .../ExpoUpdateInfo/ExpoUpdateInfo.stories.tsx | 16 + .../FocusedInput/FocusedInput.stories.tsx | 10 + .../FocusedInput/FocusedInput.tsx | 33 + .../GradientStory/GradientStory.stories.tsx | 22 + .../GradientStory/GradientStory.tsx | 32 + .../ManyStories/ManyStories.stories.tsx | 416 + .../NativeCrashStory.stories.tsx | 8 + .../NativeCrashStory/NativeCrashStory.tsx | 13 + .../NoSafeArea/NoSafeArea.stories.tsx | 14 + .../NoSafeArea/NoSafeArea.tsx | 7 + .../RenderErrorStory.stories.tsx | 8 + .../RenderErrorStory/RenderErrorStory.tsx | 5 + .../TestInfo/TestInfo.stories.tsx | 16 + .../UnstableStory/UnstableStory.stories.tsx | 10 + .../UnstableStory/UnstableStory.tsx | 7 + testing/expo-storybook-8/.env.sample | 1 - .../expo-storybook-8/.storybook-web/main.ts | 34 - .../.storybook-web/preview.tsx | 17 - testing/expo-storybook-8/.storybook/index.tsx | 8 +- testing/expo-storybook-8/.storybook/main.ts | 2 +- .../expo-storybook-8/.storybook/preview.ts | 21 +- .../.storybook/storybook.requires.ts | 2 + testing/expo-storybook-8/App.tsx | 53 +- testing/expo-storybook-8/app.config.js | 38 + testing/expo-storybook-8/app.json | 56 - .../expo-storybook-8/assets/adaptive-icon.png | Bin 17547 -> 0 bytes testing/expo-storybook-8/assets/favicon.png | Bin 1466 -> 0 bytes testing/expo-storybook-8/assets/icon.png | Bin 22380 -> 0 bytes testing/expo-storybook-8/assets/splash.png | Bin 47346 -> 0 bytes testing/expo-storybook-8/babel.config.js | 10 - .../builds/development/android.apk | 4 +- .../builds/development/ios.tar.gz | 4 +- .../builds/preview/android.apk | 4 +- .../builds/preview/ios.tar.gz | 4 +- .../builds/production/android.apk | 3 - .../builds/storybook/android.apk | 3 - .../builds/storybook/ios.tar.gz | 3 - testing/expo-storybook-8/eas.json | 16 +- testing/expo-storybook-8/metro.config.js | 4 - testing/expo-storybook-8/package.json | 94 +- .../expo-storybook-8/react-native.config.js | 18 - testing/expo-storybook-8/src/AppRoot.tsx | 21 - testing/expo-storybook-8/src/HomeScreen.tsx | 32 + .../ExcludedStory/ExcludedStory.stories.tsx | 20 + .../ExcludedStory/ExcludedStory.tsx | 7 + .../PlatformSpecificComponent.stories.tsx | 20 + .../PlatformSpecificComponent.tsx | 24 + .../src/components/Test/Test.stories.tsx | 12 - .../src/components/Test/Test.tsx | 61 - .../src/components/Test/index.ts | 1 - .../WithFigmaComparison.stories.tsx | 33 + .../WithFigmaComparison.tsx | 65 + .../src/decorators/StoryDecorator.tsx | 43 - .../ExpoUpdateInfo/ExpoUpdateInfo.stories.tsx | 16 + .../FocusedInput/FocusedInput.stories.tsx | 10 + .../FocusedInput/FocusedInput.tsx | 33 + .../GradientStory/GradientStory.stories.tsx | 22 + .../GradientStory/GradientStory.tsx | 32 + .../ManyStories/ManyStories.stories.tsx | 416 + .../NativeCrashStory.stories.tsx | 8 + .../NativeCrashStory/NativeCrashStory.tsx | 13 + .../NoSafeArea/NoSafeArea.stories.tsx | 14 + .../NoSafeArea/NoSafeArea.tsx | 7 + .../RenderErrorStory.stories.tsx | 8 + .../RenderErrorStory/RenderErrorStory.tsx | 5 + .../TestInfo/TestInfo.stories.tsx | 16 + .../UnstableStory/UnstableStory.stories.tsx | 10 + .../UnstableStory/UnstableStory.tsx | 7 + testing/testing-components/package.json | 19 + .../src/components/ExpoUpdateInfo.tsx | 47 + .../src/components/InfoItem.tsx | 32 + .../src/components/TestInfo.tsx | 54 + .../src/components/index.ts | 2 + .../src/decorators/GridDecorator.tsx | 0 .../src/decorators/StoryDecorator.tsx | 21 +- .../src/decorators/index.ts | 2 + testing/testing-components/src/index.ts | 2 + testing/testing-components/tsconfig.json | 19 + yarn.lock | 14081 +- 549 files changed, 33825 insertions(+), 108620 deletions(-) delete mode 100644 .github/workflows/async.yml delete mode 100644 .github/workflows/device_testing.yml rename .github/workflows/{eas_hooks.yml => expo-cloud.yml} (59%) delete mode 100644 .github/workflows/expo-remote-builds.yml create mode 100644 .github/workflows/expo-update.yml delete mode 100644 .github/workflows/expo-updates.yml delete mode 100644 .github/workflows/node_testing.yml create mode 100644 .github/workflows/sherlo_builds.yml delete mode 100644 .github/workflows/sync.yml rename configs/{device-testing.json => all-devices.json} (99%) delete mode 100644 configs/async.storybook.json rename configs/{stress-testing.json => default-devices.json} (79%) delete mode 100644 configs/eas.preview.json rename configs/{demo.preview.json => many-stories.json} (60%) delete mode 100644 configs/sync.preview.json create mode 100644 examples/README.md create mode 100644 examples/expo-cloud-builds/.github/sherlo.yml rename examples/{expo-example => expo-cloud-builds}/.gitignore (100%) rename examples/{expo-example => expo-cloud-builds}/.storybook/index.tsx (61%) rename examples/{expo-example => expo-cloud-builds}/.storybook/main.ts (100%) create mode 100644 examples/expo-cloud-builds/.storybook/preview.ts rename examples/{expo-example => expo-cloud-builds}/.storybook/storybook.requires.ts (73%) create mode 100644 examples/expo-cloud-builds/App.tsx create mode 100644 examples/expo-cloud-builds/app.config.js create mode 100644 examples/expo-cloud-builds/babel.config.js create mode 100644 examples/expo-cloud-builds/eas.json rename examples/{expo-example => expo-cloud-builds}/index.ts (100%) create mode 100644 examples/expo-cloud-builds/metro.config.js create mode 100644 examples/expo-cloud-builds/package.json create mode 100644 examples/expo-cloud-builds/src/HomeScreen.tsx create mode 100644 examples/expo-cloud-builds/src/components/ExcludedStory/ExcludedStory.stories.tsx create mode 100644 examples/expo-cloud-builds/src/components/ExcludedStory/ExcludedStory.tsx create mode 100644 examples/expo-cloud-builds/src/components/PlatformSpecificComponent/PlatformSpecificComponent.stories.tsx create mode 100644 examples/expo-cloud-builds/src/components/PlatformSpecificComponent/PlatformSpecificComponent.tsx create mode 100644 examples/expo-cloud-builds/src/components/WithFigmaComparison/WithFigmaComparison.stories.tsx create mode 100644 examples/expo-cloud-builds/src/components/WithFigmaComparison/WithFigmaComparison.tsx rename examples/{expo-example => expo-cloud-builds}/tsconfig.json (100%) delete mode 100644 examples/expo-example/.env.sample delete mode 100644 examples/expo-example/.storybook-web/main.ts delete mode 100644 examples/expo-example/.storybook-web/preview.tsx delete mode 100644 examples/expo-example/.storybook/preview.ts delete mode 100644 examples/expo-example/App.tsx delete mode 100644 examples/expo-example/README.md delete mode 100644 examples/expo-example/app.json delete mode 100644 examples/expo-example/assets/Images/AirPurifier.png delete mode 100644 examples/expo-example/assets/Images/AvatarImage.png delete mode 100644 examples/expo-example/assets/Images/Bathroom.png delete mode 100644 examples/expo-example/assets/Images/Bedroom.png delete mode 100644 examples/expo-example/assets/Images/BedsideLamp.png delete mode 100644 examples/expo-example/assets/Images/Heating.png delete mode 100644 examples/expo-example/assets/Images/LivingRoom.png delete mode 100644 examples/expo-example/assets/Images/Office.png delete mode 100644 examples/expo-example/assets/Images/Speaker.png delete mode 100644 examples/expo-example/assets/Images/TopLights.png delete mode 100644 examples/expo-example/assets/Images/VacuumCleaner.png delete mode 100644 examples/expo-example/assets/adaptive-icon.png delete mode 100644 examples/expo-example/assets/favicon.png delete mode 100644 examples/expo-example/assets/icon.png delete mode 100644 examples/expo-example/assets/splash.png delete mode 100644 examples/expo-example/babel.config.js delete mode 100644 examples/expo-example/builds/development/android.apk delete mode 100644 examples/expo-example/builds/development/ios.tar.gz delete mode 100644 examples/expo-example/builds/preview/android.apk delete mode 100644 examples/expo-example/builds/preview/ios.tar.gz delete mode 100644 examples/expo-example/builds/production/android.apk delete mode 100644 examples/expo-example/builds/storybook/android.apk delete mode 100644 examples/expo-example/builds/storybook/ios.tar.gz delete mode 100644 examples/expo-example/eas.json delete mode 100644 examples/expo-example/metro.config.js delete mode 100644 examples/expo-example/package.json delete mode 100644 examples/expo-example/react-native.config.js delete mode 100644 examples/expo-example/scripts/setDevEnvOnExpoServer.js delete mode 100644 examples/expo-example/sherlo.config.json delete mode 100644 examples/expo-example/src/components/base/Avatar/Avatar.stories.tsx delete mode 100644 examples/expo-example/src/components/base/Avatar/Avatar.tsx delete mode 100644 examples/expo-example/src/components/base/Avatar/index.ts delete mode 100644 examples/expo-example/src/components/base/Icon/Icon.stories.tsx delete mode 100644 examples/expo-example/src/components/base/Icon/Icon.tsx delete mode 100644 examples/expo-example/src/components/base/Icon/Icons/AccountIcon.tsx delete mode 100644 examples/expo-example/src/components/base/Icon/Icons/ArrowDownIcon.tsx delete mode 100644 examples/expo-example/src/components/base/Icon/Icons/ArrowLeftIcon.tsx delete mode 100644 examples/expo-example/src/components/base/Icon/Icons/ArrowRightIcon.tsx delete mode 100644 examples/expo-example/src/components/base/Icon/Icons/CogIcon.tsx delete mode 100644 examples/expo-example/src/components/base/Icon/Icons/Connect.tsx delete mode 100644 examples/expo-example/src/components/base/Icon/Icons/Dot.tsx delete mode 100644 examples/expo-example/src/components/base/Icon/Icons/MinusIcon.tsx delete mode 100644 examples/expo-example/src/components/base/Icon/Icons/PlusBoxIcon.tsx delete mode 100644 examples/expo-example/src/components/base/Icon/Icons/PlusIcon.tsx delete mode 100644 examples/expo-example/src/components/base/Icon/Icons/SaveEnergy.tsx delete mode 100644 examples/expo-example/src/components/base/Icon/Icons/SlidersIcon.tsx delete mode 100644 examples/expo-example/src/components/base/Icon/Icons/SplotchIcon.tsx delete mode 100644 examples/expo-example/src/components/base/Icon/Icons/types.ts delete mode 100644 examples/expo-example/src/components/base/Icon/index.ts delete mode 100644 examples/expo-example/src/components/base/IconButton/IconButton.stories.tsx delete mode 100644 examples/expo-example/src/components/base/IconButton/IconButton.tsx delete mode 100644 examples/expo-example/src/components/base/IconButton/index.ts delete mode 100644 examples/expo-example/src/components/base/Switch/Switch.stories.tsx delete mode 100644 examples/expo-example/src/components/base/Switch/Switch.tsx delete mode 100644 examples/expo-example/src/components/base/Switch/index.ts delete mode 100644 examples/expo-example/src/components/base/Text/Text.stories.tsx delete mode 100644 examples/expo-example/src/components/base/Text/Text.tsx delete mode 100644 examples/expo-example/src/components/base/Text/index.ts delete mode 100644 examples/expo-example/src/components/base/TutorialIcon/TutorialIcon.stories.tsx delete mode 100644 examples/expo-example/src/components/base/TutorialIcon/TutorialIcon.tsx delete mode 100644 examples/expo-example/src/components/base/TutorialIcon/index.ts delete mode 100644 examples/expo-example/src/components/partials/ButtonPlusMinus/ButtonPlusMinus.stories.tsx delete mode 100644 examples/expo-example/src/components/partials/ButtonPlusMinus/ButtonPlusMinus.tsx delete mode 100644 examples/expo-example/src/components/partials/ButtonPlusMinus/index.ts delete mode 100644 examples/expo-example/src/components/partials/CardItem/CardItem.data.ts delete mode 100644 examples/expo-example/src/components/partials/CardItem/CardItem.tsx delete mode 100644 examples/expo-example/src/components/partials/CardItem/index.ts delete mode 100644 examples/expo-example/src/components/partials/DevicesList/DevicesList.stories.tsx delete mode 100644 examples/expo-example/src/components/partials/DevicesList/DevicesList.tsx delete mode 100644 examples/expo-example/src/components/partials/DevicesList/DevicesListItem/DevicesListItem.data.ts delete mode 100644 examples/expo-example/src/components/partials/DevicesList/DevicesListItem/DevicesListItem.stories.tsx delete mode 100644 examples/expo-example/src/components/partials/DevicesList/DevicesListItem/DevicesListItem.tsx delete mode 100644 examples/expo-example/src/components/partials/DevicesList/DevicesListItem/index.ts delete mode 100644 examples/expo-example/src/components/partials/DevicesList/index.ts delete mode 100644 examples/expo-example/src/components/partials/Footer/Footer.stories.tsx delete mode 100644 examples/expo-example/src/components/partials/Footer/Footer.tsx delete mode 100644 examples/expo-example/src/components/partials/Footer/index.ts delete mode 100644 examples/expo-example/src/components/partials/Header/Header.stories.tsx delete mode 100644 examples/expo-example/src/components/partials/Header/Header.tsx delete mode 100644 examples/expo-example/src/components/partials/Header/index.ts delete mode 100644 examples/expo-example/src/components/partials/InfoDisplay/InfoDisplay.stories.tsx delete mode 100644 examples/expo-example/src/components/partials/InfoDisplay/InfoDisplay.tsx delete mode 100644 examples/expo-example/src/components/partials/InfoDisplay/components/InfoDisplayBox.tsx delete mode 100644 examples/expo-example/src/components/partials/InfoDisplay/components/index.ts delete mode 100644 examples/expo-example/src/components/partials/InfoDisplay/index.ts delete mode 100644 examples/expo-example/src/components/partials/RoomsList/RoomsList.stories.tsx delete mode 100644 examples/expo-example/src/components/partials/RoomsList/RoomsList.tsx delete mode 100644 examples/expo-example/src/components/partials/RoomsList/RoomsListItem/RoomsListItem.data.ts delete mode 100644 examples/expo-example/src/components/partials/RoomsList/RoomsListItem/RoomsListItem.stories.tsx delete mode 100644 examples/expo-example/src/components/partials/RoomsList/RoomsListItem/RoomsListItem.tsx delete mode 100644 examples/expo-example/src/components/partials/RoomsList/RoomsListItem/index.ts delete mode 100644 examples/expo-example/src/components/partials/RoomsList/index.ts delete mode 100644 examples/expo-example/src/components/partials/ScrollOverlay/ScrollOverlay.stories.tsx delete mode 100644 examples/expo-example/src/components/partials/ScrollOverlay/ScrollOverlay.tsx delete mode 100644 examples/expo-example/src/components/partials/ScrollOverlay/index.ts delete mode 100644 examples/expo-example/src/components/partials/SettingsButton/SettingsButton.stories.tsx delete mode 100644 examples/expo-example/src/components/partials/SettingsButton/SettingsButton.tsx delete mode 100644 examples/expo-example/src/components/partials/SettingsButton/index.ts delete mode 100644 examples/expo-example/src/components/partials/SettingsTime/SettingsTime.stories.tsx delete mode 100644 examples/expo-example/src/components/partials/SettingsTime/SettingsTime.tsx delete mode 100644 examples/expo-example/src/components/partials/SettingsTime/components/TimeBox.tsx delete mode 100644 examples/expo-example/src/components/partials/SettingsTime/components/index.ts delete mode 100644 examples/expo-example/src/components/partials/SettingsTime/index.ts delete mode 100644 examples/expo-example/src/components/partials/TabComponent/TabBar/TabBar.stories.tsx delete mode 100644 examples/expo-example/src/components/partials/TabComponent/TabBar/TabBar.tsx delete mode 100644 examples/expo-example/src/components/partials/TabComponent/TabBar/index.ts delete mode 100644 examples/expo-example/src/components/partials/TabComponent/TabComponent.stories.tsx delete mode 100644 examples/expo-example/src/components/partials/TabComponent/TabComponent.tsx delete mode 100644 examples/expo-example/src/components/partials/TabComponent/Tabs/Tabs.stories.tsx delete mode 100644 examples/expo-example/src/components/partials/TabComponent/Tabs/Tabs.tsx delete mode 100644 examples/expo-example/src/components/partials/TabComponent/Tabs/index.ts delete mode 100644 examples/expo-example/src/components/partials/TabComponent/index.ts delete mode 100644 examples/expo-example/src/components/partials/TabDevice/TabDevice.stories.tsx delete mode 100644 examples/expo-example/src/components/partials/TabDevice/TabDevice.tsx delete mode 100644 examples/expo-example/src/components/partials/TabDevice/components/TabBarDevice.stories.tsx delete mode 100644 examples/expo-example/src/components/partials/TabDevice/components/TabBarDevice.tsx delete mode 100644 examples/expo-example/src/components/partials/TabDevice/components/TabsDevice.stories.tsx delete mode 100644 examples/expo-example/src/components/partials/TabDevice/components/TabsDevice.tsx delete mode 100644 examples/expo-example/src/components/partials/TabDevice/types.ts delete mode 100644 examples/expo-example/src/components/partials/TutorialControll/TutorialControl.stories.tsx delete mode 100644 examples/expo-example/src/components/partials/TutorialControll/TutorialControl.tsx delete mode 100644 examples/expo-example/src/components/partials/TutorialControll/index.ts delete mode 100644 examples/expo-example/src/components/partials/index.ts delete mode 100644 examples/expo-example/src/components/screens/ControllScreen/ControlScreen.tsx delete mode 100644 examples/expo-example/src/components/screens/ControllScreen/ControllScreen.stories.tsx delete mode 100644 examples/expo-example/src/components/screens/MainScreen/MainScreen.stories.tsx delete mode 100644 examples/expo-example/src/components/screens/MainScreen/MainScreen.tsx delete mode 100644 examples/expo-example/src/components/screens/MainScreen/RadialBackground/RadialBackground.tsx delete mode 100644 examples/expo-example/src/components/screens/MainScreen/RadialBackground/index.ts delete mode 100644 examples/expo-example/src/components/screens/Test/Test.stories.tsx delete mode 100644 examples/expo-example/src/components/screens/Test/Test.tsx delete mode 100644 examples/expo-example/src/components/screens/Test/index.ts delete mode 100644 examples/expo-example/src/components/screens/TutorialScreen/TutorialScreen.stories.tsx delete mode 100644 examples/expo-example/src/components/screens/TutorialScreen/TutorialScreen.tsx delete mode 100644 examples/expo-example/src/decorators/StoryDecorator.tsx delete mode 100644 examples/expo-example/src/fixtures/TabRooms.ts delete mode 100644 examples/expo-example/src/fixtures/devices.ts delete mode 100644 examples/expo-example/src/fixtures/devicesRooms.ts delete mode 100644 examples/expo-example/src/fixtures/rooms.ts delete mode 100644 examples/expo-example/src/hooks/useScrollOverlays.tsx delete mode 100644 examples/expo-example/src/theme/colors.ts delete mode 100644 examples/expo-example/src/theme/dimensions.ts delete mode 100644 examples/expo-example/src/theme/flex.ts delete mode 100644 examples/expo-example/src/theme/shadows.ts delete mode 100644 examples/expo-example/src/utils/breakIntoLines.ts create mode 100644 examples/expo-update/.gitignore create mode 100644 examples/expo-update/.storybook/index.tsx create mode 100644 examples/expo-update/.storybook/main.ts create mode 100644 examples/expo-update/.storybook/preview.ts create mode 100644 examples/expo-update/.storybook/storybook.requires.ts create mode 100644 examples/expo-update/App.tsx create mode 100644 examples/expo-update/app.config.js create mode 100644 examples/expo-update/babel.config.js create mode 100644 examples/expo-update/eas.json create mode 100644 examples/expo-update/index.ts create mode 100644 examples/expo-update/metro.config.js create mode 100644 examples/expo-update/package.json create mode 100644 examples/expo-update/src/HomeScreen.tsx create mode 100644 examples/expo-update/src/components/ExcludedStory/ExcludedStory.stories.tsx create mode 100644 examples/expo-update/src/components/ExcludedStory/ExcludedStory.tsx create mode 100644 examples/expo-update/src/components/PlatformSpecificComponent/PlatformSpecificComponent.stories.tsx create mode 100644 examples/expo-update/src/components/PlatformSpecificComponent/PlatformSpecificComponent.tsx create mode 100644 examples/expo-update/src/components/WithFigmaComparison/WithFigmaComparison.stories.tsx create mode 100644 examples/expo-update/src/components/WithFigmaComparison/WithFigmaComparison.tsx create mode 100644 examples/expo-update/tsconfig.json create mode 100644 examples/local-builds/.gitignore create mode 100644 examples/local-builds/.storybook/index.tsx create mode 100644 examples/local-builds/.storybook/main.ts create mode 100644 examples/local-builds/.storybook/preview.ts create mode 100644 examples/local-builds/.storybook/storybook.requires.ts create mode 100644 examples/local-builds/App.tsx create mode 100644 examples/local-builds/app.config.js create mode 100644 examples/local-builds/babel.config.js create mode 100644 examples/local-builds/eas.json create mode 100644 examples/local-builds/index.ts create mode 100644 examples/local-builds/metro.config.js create mode 100644 examples/local-builds/package.json create mode 100644 examples/local-builds/src/HomeScreen.tsx create mode 100644 examples/local-builds/src/components/ExcludedStory/ExcludedStory.stories.tsx create mode 100644 examples/local-builds/src/components/ExcludedStory/ExcludedStory.tsx create mode 100644 examples/local-builds/src/components/PlatformSpecificComponent/PlatformSpecificComponent.stories.tsx create mode 100644 examples/local-builds/src/components/PlatformSpecificComponent/PlatformSpecificComponent.tsx create mode 100644 examples/local-builds/src/components/WithFigmaComparison/WithFigmaComparison.stories.tsx create mode 100644 examples/local-builds/src/components/WithFigmaComparison/WithFigmaComparison.tsx create mode 100644 examples/local-builds/tsconfig.json create mode 100644 packages/action/release/getGitInfo.js create mode 100644 packages/action/release/index copy.js create mode 100644 packages/action/src/getGitInfo.ts rename packages/{react-native-storybook => cli}/cli.js (50%) create mode 100644 packages/cli/sdk-compatibility.json delete mode 100755 packages/cli/src/commands/easBuildOnComplete.ts create mode 100644 packages/cli/src/commands/easBuildOnComplete/constants.ts create mode 100755 packages/cli/src/commands/easBuildOnComplete/easBuildOnComplete.ts create mode 100755 packages/cli/src/commands/easBuildOnComplete/helpers/asyncUploadBuildAndRunTests/asyncUploadBuildAndRunTests.ts create mode 100755 packages/cli/src/commands/easBuildOnComplete/helpers/asyncUploadBuildAndRunTests/getBuildPath.ts create mode 100644 packages/cli/src/commands/easBuildOnComplete/helpers/asyncUploadBuildAndRunTests/index.ts create mode 100755 packages/cli/src/commands/easBuildOnComplete/helpers/getSherloTempData.ts create mode 100644 packages/cli/src/commands/easBuildOnComplete/helpers/index.ts create mode 100644 packages/cli/src/commands/easBuildOnComplete/index.ts create mode 100644 packages/cli/src/commands/expoCloudBuilds/constants.ts create mode 100644 packages/cli/src/commands/expoCloudBuilds/expoCloudBuilds.ts create mode 100644 packages/cli/src/commands/expoCloudBuilds/helpers/createSherloTempDirectory.ts create mode 100644 packages/cli/src/commands/expoCloudBuilds/helpers/index.ts create mode 100644 packages/cli/src/commands/expoCloudBuilds/helpers/removeSherloTempDirectory.ts create mode 100644 packages/cli/src/commands/expoCloudBuilds/helpers/runScript.ts create mode 100644 packages/cli/src/commands/expoCloudBuilds/helpers/validatePackageJsonScripts.ts create mode 100644 packages/cli/src/commands/expoCloudBuilds/index.ts create mode 100644 packages/cli/src/commands/expoUpdate/constants.ts create mode 100644 packages/cli/src/commands/expoUpdate/expoUpdate.ts create mode 100644 packages/cli/src/commands/expoUpdate/helpers/getValidatedExpoUpdateData/getExpoMetadata.ts create mode 100644 packages/cli/src/commands/expoUpdate/helpers/getValidatedExpoUpdateData/getExpoUpdateData/getExpoUpdateData.ts create mode 100644 packages/cli/src/commands/expoUpdate/helpers/getValidatedExpoUpdateData/getExpoUpdateData/getUpdateUrls.ts create mode 100644 packages/cli/src/commands/expoUpdate/helpers/getValidatedExpoUpdateData/getExpoUpdateData/index.ts create mode 100644 packages/cli/src/commands/expoUpdate/helpers/getValidatedExpoUpdateData/getExpoUpdateData/parseUpdateInfoMessageString.ts create mode 100644 packages/cli/src/commands/expoUpdate/helpers/getValidatedExpoUpdateData/getExpoUpdateInfo.ts create mode 100644 packages/cli/src/commands/expoUpdate/helpers/getValidatedExpoUpdateData/getValidatedExpoUpdateData.ts create mode 100644 packages/cli/src/commands/expoUpdate/helpers/getValidatedExpoUpdateData/index.ts create mode 100644 packages/cli/src/commands/expoUpdate/helpers/getValidatedExpoUpdateData/shared/getUpdatePlatformsArray.ts create mode 100644 packages/cli/src/commands/expoUpdate/helpers/getValidatedExpoUpdateData/shared/index.ts create mode 100644 packages/cli/src/commands/expoUpdate/helpers/getValidatedExpoUpdateData/validateExpoUpdateInfo.ts create mode 100644 packages/cli/src/commands/expoUpdate/helpers/index.ts create mode 100644 packages/cli/src/commands/expoUpdate/index.ts create mode 100644 packages/cli/src/commands/localBuilds/constants.ts create mode 100644 packages/cli/src/commands/localBuilds/index.ts create mode 100644 packages/cli/src/commands/localBuilds/localBuilds.ts delete mode 100644 packages/cli/src/commands/main/helpers/getArguments.ts delete mode 100644 packages/cli/src/commands/main/helpers/index.ts delete mode 100644 packages/cli/src/commands/main/helpers/utils/getGitInfo.ts delete mode 100644 packages/cli/src/commands/main/helpers/utils/index.ts delete mode 100644 packages/cli/src/commands/main/helpers/utils/parseConfigFile.ts delete mode 100644 packages/cli/src/commands/main/helpers/utils/validateConfigDevices.ts delete mode 100644 packages/cli/src/commands/main/helpers/utils/validateConfigPlatformPath.ts delete mode 100644 packages/cli/src/commands/main/helpers/utils/validateConfigPlatforms.ts delete mode 100644 packages/cli/src/commands/main/helpers/utils/validateConfigToken.ts delete mode 100644 packages/cli/src/commands/main/index.ts delete mode 100644 packages/cli/src/commands/main/main.ts delete mode 100644 packages/cli/src/commands/main/modes/asyncInitMode.ts delete mode 100644 packages/cli/src/commands/main/modes/asyncUploadMode.ts delete mode 100644 packages/cli/src/commands/main/modes/index.ts delete mode 100644 packages/cli/src/commands/main/modes/syncMode.ts delete mode 100644 packages/cli/src/commands/main/modes/utils/getBuildUploadUrls.ts delete mode 100644 packages/cli/src/commands/main/modes/utils/getPlatformsToTest.ts delete mode 100644 packages/cli/src/commands/main/modes/utils/index.ts delete mode 100644 packages/cli/src/commands/main/modes/utils/uploadMobileBuilds.ts delete mode 100644 packages/cli/src/commands/main/types.ts delete mode 100644 packages/cli/src/commands/main/utils/index.ts delete mode 100644 packages/cli/src/commands/main/utils/throwConfigError.ts delete mode 100644 packages/cli/src/commands/utils/getTokenParts.ts delete mode 100644 packages/cli/src/commands/utils/handleClientError.ts delete mode 100644 packages/cli/src/commands/utils/index.ts rename packages/cli/src/{commands/main/modes/utils => helpers}/getAppBuildUrl.ts (86%) rename packages/cli/src/{commands/main/modes/utils => helpers}/getBuildRunConfig.ts (51%) create mode 100644 packages/cli/src/helpers/getGitInfo.ts create mode 100644 packages/cli/src/helpers/getPlatformsToTest.ts create mode 100644 packages/cli/src/helpers/getTokenParts.ts create mode 100644 packages/cli/src/helpers/getValidatedBinariesInfoAndNextBuildIndex/getBinariesInfoAndNextBuildIndex/getBinariesInfoAndNextBuildIndex.ts create mode 100644 packages/cli/src/helpers/getValidatedBinariesInfoAndNextBuildIndex/getBinariesInfoAndNextBuildIndex/getBinaryInfo.ts create mode 100644 packages/cli/src/helpers/getValidatedBinariesInfoAndNextBuildIndex/getBinariesInfoAndNextBuildIndex/getLocalBinariesInfo/accessFileInArchive.ts create mode 100644 packages/cli/src/helpers/getValidatedBinariesInfoAndNextBuildIndex/getBinariesInfoAndNextBuildIndex/getLocalBinariesInfo/accessFileInDirectory.ts create mode 100644 packages/cli/src/helpers/getValidatedBinariesInfoAndNextBuildIndex/getBinariesInfoAndNextBuildIndex/getLocalBinariesInfo/getLocalBinariesInfo.ts create mode 100644 packages/cli/src/helpers/getValidatedBinariesInfoAndNextBuildIndex/getBinariesInfoAndNextBuildIndex/getLocalBinariesInfo/index.ts create mode 100644 packages/cli/src/helpers/getValidatedBinariesInfoAndNextBuildIndex/getBinariesInfoAndNextBuildIndex/index.ts create mode 100644 packages/cli/src/helpers/getValidatedBinariesInfoAndNextBuildIndex/getValidatedBinariesInfoAndNextBuildIndex.ts create mode 100644 packages/cli/src/helpers/getValidatedBinariesInfoAndNextBuildIndex/index.ts create mode 100644 packages/cli/src/helpers/getValidatedBinariesInfoAndNextBuildIndex/types.ts create mode 100644 packages/cli/src/helpers/getValidatedBinariesInfoAndNextBuildIndex/validateBinariesInfo.ts create mode 100644 packages/cli/src/helpers/getValidatedCommandParams/getCommandParams.ts create mode 100644 packages/cli/src/helpers/getValidatedCommandParams/getNormalizedConfig/getConfigWithNormalizedDevices.ts create mode 100644 packages/cli/src/helpers/getValidatedCommandParams/getNormalizedConfig/getNormalizedConfig.ts create mode 100644 packages/cli/src/helpers/getValidatedCommandParams/getNormalizedConfig/index.ts create mode 100644 packages/cli/src/helpers/getValidatedCommandParams/getNormalizedConfig/parseConfigFile.ts create mode 100644 packages/cli/src/helpers/getValidatedCommandParams/getOptionsWithDefaults.ts create mode 100644 packages/cli/src/helpers/getValidatedCommandParams/getValidatedCommandParams.ts create mode 100644 packages/cli/src/helpers/getValidatedCommandParams/index.ts create mode 100644 packages/cli/src/helpers/getValidatedCommandParams/validateCommandParams/index.ts create mode 100644 packages/cli/src/helpers/getValidatedCommandParams/validateCommandParams/validateCommandParams.ts rename packages/cli/src/{commands/main/helpers/utils => helpers/getValidatedCommandParams/validateCommandParams}/validateConfigProperties.ts (52%) create mode 100644 packages/cli/src/helpers/getValidatedCommandParams/validateCommandParams/validateDevices.ts create mode 100644 packages/cli/src/helpers/getValidatedCommandParams/validateCommandParams/validateToken.ts create mode 100644 packages/cli/src/helpers/getValidatedCommandParams/validateRequiredOptions.ts create mode 100644 packages/cli/src/helpers/handleClientError.ts create mode 100644 packages/cli/src/helpers/logBuildIntroMessage/countDevicesByPlatform.ts create mode 100644 packages/cli/src/helpers/logBuildIntroMessage/index.ts create mode 100644 packages/cli/src/helpers/logBuildIntroMessage/logBuildIntroMessage.ts create mode 100644 packages/cli/src/helpers/logBuildMessage.ts create mode 100644 packages/cli/src/helpers/logBuildPlatformLabel.ts create mode 100644 packages/cli/src/helpers/logInfo.ts create mode 100644 packages/cli/src/helpers/logResultsUrl.ts rename packages/cli/src/helpers/{printHeader.ts => logSherloIntro.ts} (57%) create mode 100644 packages/cli/src/helpers/logWarning.ts create mode 100644 packages/cli/src/helpers/reporting.ts create mode 100644 packages/cli/src/helpers/runShellCommand.ts rename packages/cli/src/{utils => helpers/shared}/getLogLink.ts (100%) create mode 100644 packages/cli/src/helpers/shared/index.ts create mode 100644 packages/cli/src/helpers/shared/isPackageVersionCompatible.ts create mode 100644 packages/cli/src/helpers/shared/validatePlatformPaths.ts create mode 100644 packages/cli/src/helpers/throwError.ts create mode 100644 packages/cli/src/helpers/uploadOrLogBinaryReuse/index.ts create mode 100644 packages/cli/src/helpers/uploadOrLogBinaryReuse/logBuildReuse/getTimeAgo.ts create mode 100644 packages/cli/src/helpers/uploadOrLogBinaryReuse/logBuildReuse/index.ts create mode 100644 packages/cli/src/helpers/uploadOrLogBinaryReuse/logBuildReuse/logBuildReuse.ts create mode 100644 packages/cli/src/helpers/uploadOrLogBinaryReuse/uploadBuild/getBuildData/compressDirectoryToTarGzip.ts create mode 100644 packages/cli/src/helpers/uploadOrLogBinaryReuse/uploadBuild/getBuildData/compressFileToGzip.ts create mode 100644 packages/cli/src/helpers/uploadOrLogBinaryReuse/uploadBuild/getBuildData/getBuildData.ts create mode 100644 packages/cli/src/helpers/uploadOrLogBinaryReuse/uploadBuild/getBuildData/index.ts create mode 100644 packages/cli/src/helpers/uploadOrLogBinaryReuse/uploadBuild/index.ts create mode 100644 packages/cli/src/helpers/uploadOrLogBinaryReuse/uploadBuild/uploadBuild.ts create mode 100644 packages/cli/src/helpers/uploadOrLogBinaryReuse/uploadOrLogBinaryReuse.ts create mode 100644 packages/cli/src/helpers/uploadOrReuseBuildsAndRunTests.ts create mode 100644 packages/cli/src/helpers/validatePackages/getPackageErrorMessage.ts create mode 100644 packages/cli/src/helpers/validatePackages/getPackageVersion.ts create mode 100644 packages/cli/src/helpers/validatePackages/index.ts create mode 100644 packages/cli/src/helpers/validatePackages/types.ts create mode 100644 packages/cli/src/helpers/validatePackages/validatePackageRequirement.ts create mode 100644 packages/cli/src/helpers/validatePackages/validatePackages.ts create mode 100644 packages/cli/src/types.ts delete mode 100644 packages/cli/src/utils/index.ts delete mode 100644 packages/cli/src/utils/logWarning.ts delete mode 100644 packages/cli/src/utils/throwError.ts create mode 100644 packages/react-native-storybook/android/src/main/assets/sherlo.json create mode 100644 packages/react-native-storybook/android/src/main/java/io/sherlo/storybookreactnative/FileSystemHelper.java create mode 100644 packages/react-native-storybook/android/src/main/java/io/sherlo/storybookreactnative/InspectorHelper.java create mode 100644 packages/react-native-storybook/android/src/main/java/io/sherlo/storybookreactnative/RestartHelper.java delete mode 100644 packages/react-native-storybook/android/src/main/java/io/sherlo/storybookreactnative/SherloStorybookActivity.java create mode 100644 packages/react-native-storybook/android/src/main/java/io/sherlo/storybookreactnative/StorybookErrorHelper.java create mode 100644 packages/react-native-storybook/ios/ConfigHelper.h create mode 100644 packages/react-native-storybook/ios/ConfigHelper.m create mode 100644 packages/react-native-storybook/ios/ExpoUpdateHelper.h create mode 100644 packages/react-native-storybook/ios/ExpoUpdateHelper.m create mode 100644 packages/react-native-storybook/ios/FileSystemHelper.h create mode 100644 packages/react-native-storybook/ios/FileSystemHelper.m create mode 100644 packages/react-native-storybook/ios/InspectorHelper.h create mode 100644 packages/react-native-storybook/ios/InspectorHelper.m create mode 100644 packages/react-native-storybook/ios/Resources/assets/sherlo.json create mode 100644 packages/react-native-storybook/ios/RestartHelper.h create mode 100644 packages/react-native-storybook/ios/RestartHelper.m create mode 100644 packages/react-native-storybook/ios/StorybookErrorHelper.h create mode 100644 packages/react-native-storybook/ios/StorybookErrorHelper.m create mode 100644 packages/react-native-storybook/ios/VerificationHelper.h create mode 100644 packages/react-native-storybook/ios/VerificationHelper.m create mode 100644 packages/react-native-storybook/src/addStorybookToDevMenu.ts delete mode 100644 packages/react-native-storybook/src/getStorybook/components/ErrorBoundary.tsx delete mode 100644 packages/react-native-storybook/src/getStorybook/hooks/useKeyboardStatusEffect.tsx create mode 100644 packages/react-native-storybook/src/helpers/RunnerBridge/actions/getLastState.ts delete mode 100644 packages/react-native-storybook/src/helpers/RunnerBridge/actions/getState.ts create mode 100644 packages/react-native-storybook/src/isStorybookMode.ts delete mode 100644 packages/react-native-storybook/src/registerStorybook.ts create mode 100644 packages/react-native-storybook/src/verifyIntegration.ts create mode 100755 scripts/updateExamples.sh delete mode 100644 testing/expo-storybook-7/.env.sample delete mode 100644 testing/expo-storybook-7/.storybook-web/main.ts delete mode 100644 testing/expo-storybook-7/.storybook-web/preview.tsx create mode 100644 testing/expo-storybook-7/app.config.js delete mode 100644 testing/expo-storybook-7/assets/adaptive-icon.png delete mode 100644 testing/expo-storybook-7/assets/favicon.png delete mode 100644 testing/expo-storybook-7/assets/icon.png delete mode 100644 testing/expo-storybook-7/assets/splash.png delete mode 100644 testing/expo-storybook-7/builds/development/android.apk delete mode 100644 testing/expo-storybook-7/builds/development/ios.tar.gz delete mode 100644 testing/expo-storybook-7/builds/preview/android.apk delete mode 100644 testing/expo-storybook-7/builds/preview/ios.tar.gz delete mode 100644 testing/expo-storybook-7/builds/production/android.apk delete mode 100644 testing/expo-storybook-7/builds/storybook/android.apk delete mode 100644 testing/expo-storybook-7/builds/storybook/ios.tar.gz delete mode 100644 testing/expo-storybook-7/react-native.config.js delete mode 100644 testing/expo-storybook-7/src/AppRoot.tsx create mode 100644 testing/expo-storybook-7/src/HomeScreen.tsx create mode 100644 testing/expo-storybook-7/src/components/ExcludedStory/ExcludedStory.stories.tsx create mode 100644 testing/expo-storybook-7/src/components/ExcludedStory/ExcludedStory.tsx create mode 100644 testing/expo-storybook-7/src/components/PlatformSpecificComponent/PlatformSpecificComponent.stories.tsx create mode 100644 testing/expo-storybook-7/src/components/PlatformSpecificComponent/PlatformSpecificComponent.tsx delete mode 100644 testing/expo-storybook-7/src/components/Test/Test.stories.tsx delete mode 100644 testing/expo-storybook-7/src/components/Test/Test.tsx delete mode 100644 testing/expo-storybook-7/src/components/Test/index.ts create mode 100644 testing/expo-storybook-7/src/components/WithFigmaComparison/WithFigmaComparison.stories.tsx create mode 100644 testing/expo-storybook-7/src/components/WithFigmaComparison/WithFigmaComparison.tsx create mode 100644 testing/expo-storybook-7/src/testing-components/ExpoUpdateInfo/ExpoUpdateInfo.stories.tsx create mode 100644 testing/expo-storybook-7/src/testing-components/FocusedInput/FocusedInput.stories.tsx create mode 100644 testing/expo-storybook-7/src/testing-components/FocusedInput/FocusedInput.tsx create mode 100644 testing/expo-storybook-7/src/testing-components/GradientStory/GradientStory.stories.tsx create mode 100644 testing/expo-storybook-7/src/testing-components/GradientStory/GradientStory.tsx create mode 100644 testing/expo-storybook-7/src/testing-components/ManyStories/ManyStories.stories.tsx create mode 100644 testing/expo-storybook-7/src/testing-components/NativeCrashStory/NativeCrashStory.stories.tsx create mode 100644 testing/expo-storybook-7/src/testing-components/NativeCrashStory/NativeCrashStory.tsx create mode 100644 testing/expo-storybook-7/src/testing-components/NoSafeArea/NoSafeArea.stories.tsx create mode 100644 testing/expo-storybook-7/src/testing-components/NoSafeArea/NoSafeArea.tsx create mode 100644 testing/expo-storybook-7/src/testing-components/RenderErrorStory/RenderErrorStory.stories.tsx create mode 100644 testing/expo-storybook-7/src/testing-components/RenderErrorStory/RenderErrorStory.tsx create mode 100644 testing/expo-storybook-7/src/testing-components/TestInfo/TestInfo.stories.tsx create mode 100644 testing/expo-storybook-7/src/testing-components/UnstableStory/UnstableStory.stories.tsx create mode 100644 testing/expo-storybook-7/src/testing-components/UnstableStory/UnstableStory.tsx delete mode 100644 testing/expo-storybook-8/.env.sample delete mode 100644 testing/expo-storybook-8/.storybook-web/main.ts delete mode 100644 testing/expo-storybook-8/.storybook-web/preview.tsx create mode 100644 testing/expo-storybook-8/app.config.js delete mode 100644 testing/expo-storybook-8/app.json delete mode 100644 testing/expo-storybook-8/assets/adaptive-icon.png delete mode 100644 testing/expo-storybook-8/assets/favicon.png delete mode 100644 testing/expo-storybook-8/assets/icon.png delete mode 100644 testing/expo-storybook-8/assets/splash.png delete mode 100644 testing/expo-storybook-8/builds/production/android.apk delete mode 100644 testing/expo-storybook-8/builds/storybook/android.apk delete mode 100644 testing/expo-storybook-8/builds/storybook/ios.tar.gz delete mode 100644 testing/expo-storybook-8/react-native.config.js delete mode 100644 testing/expo-storybook-8/src/AppRoot.tsx create mode 100644 testing/expo-storybook-8/src/HomeScreen.tsx create mode 100644 testing/expo-storybook-8/src/components/ExcludedStory/ExcludedStory.stories.tsx create mode 100644 testing/expo-storybook-8/src/components/ExcludedStory/ExcludedStory.tsx create mode 100644 testing/expo-storybook-8/src/components/PlatformSpecificComponent/PlatformSpecificComponent.stories.tsx create mode 100644 testing/expo-storybook-8/src/components/PlatformSpecificComponent/PlatformSpecificComponent.tsx delete mode 100644 testing/expo-storybook-8/src/components/Test/Test.stories.tsx delete mode 100644 testing/expo-storybook-8/src/components/Test/Test.tsx delete mode 100644 testing/expo-storybook-8/src/components/Test/index.ts create mode 100644 testing/expo-storybook-8/src/components/WithFigmaComparison/WithFigmaComparison.stories.tsx create mode 100644 testing/expo-storybook-8/src/components/WithFigmaComparison/WithFigmaComparison.tsx delete mode 100644 testing/expo-storybook-8/src/decorators/StoryDecorator.tsx create mode 100644 testing/expo-storybook-8/src/testing-components/ExpoUpdateInfo/ExpoUpdateInfo.stories.tsx create mode 100644 testing/expo-storybook-8/src/testing-components/FocusedInput/FocusedInput.stories.tsx create mode 100644 testing/expo-storybook-8/src/testing-components/FocusedInput/FocusedInput.tsx create mode 100644 testing/expo-storybook-8/src/testing-components/GradientStory/GradientStory.stories.tsx create mode 100644 testing/expo-storybook-8/src/testing-components/GradientStory/GradientStory.tsx create mode 100644 testing/expo-storybook-8/src/testing-components/ManyStories/ManyStories.stories.tsx create mode 100644 testing/expo-storybook-8/src/testing-components/NativeCrashStory/NativeCrashStory.stories.tsx create mode 100644 testing/expo-storybook-8/src/testing-components/NativeCrashStory/NativeCrashStory.tsx create mode 100644 testing/expo-storybook-8/src/testing-components/NoSafeArea/NoSafeArea.stories.tsx create mode 100644 testing/expo-storybook-8/src/testing-components/NoSafeArea/NoSafeArea.tsx create mode 100644 testing/expo-storybook-8/src/testing-components/RenderErrorStory/RenderErrorStory.stories.tsx create mode 100644 testing/expo-storybook-8/src/testing-components/RenderErrorStory/RenderErrorStory.tsx create mode 100644 testing/expo-storybook-8/src/testing-components/TestInfo/TestInfo.stories.tsx create mode 100644 testing/expo-storybook-8/src/testing-components/UnstableStory/UnstableStory.stories.tsx create mode 100644 testing/expo-storybook-8/src/testing-components/UnstableStory/UnstableStory.tsx create mode 100644 testing/testing-components/package.json create mode 100644 testing/testing-components/src/components/ExpoUpdateInfo.tsx create mode 100644 testing/testing-components/src/components/InfoItem.tsx create mode 100644 testing/testing-components/src/components/TestInfo.tsx create mode 100644 testing/testing-components/src/components/index.ts rename {examples/expo-example => testing/testing-components}/src/decorators/GridDecorator.tsx (100%) rename testing/{expo-storybook-7 => testing-components}/src/decorators/StoryDecorator.tsx (60%) create mode 100644 testing/testing-components/src/decorators/index.ts create mode 100644 testing/testing-components/src/index.ts create mode 100644 testing/testing-components/tsconfig.json diff --git a/.github/workflows/async.yml b/.github/workflows/async.yml deleted file mode 100644 index 5bf26ce6..00000000 --- a/.github/workflows/async.yml +++ /dev/null @@ -1,126 +0,0 @@ -name: Run Sherlo with Async Upload - -on: - workflow_call: - inputs: - env: - description: 'Environment (dev, test, prod)' - required: true - type: string - workflow_dispatch: - inputs: - env: - description: 'Environment (dev, test, prod)' - required: true - default: 'dev' - type: string - -jobs: - ## Sherlo - run_sherlo_async: - name: Run Sherlo in async mode - environment: ${{ inputs.env }} - runs-on: ubuntu-latest - outputs: - buildIndex: ${{ steps.sherlo_action.outputs.buildIndex }} # Map step output to job output - steps: - - uses: actions/checkout@v2 - with: - ref: ${{ github.ref }} - - - name: Set up Node.js - uses: actions/setup-node@v2 - with: - node-version: '18.18.0' - - - name: Install dependencies - run: yarn - - - name: Build dependencies - run: yarn switch-env:${{ inputs.env }} - env: - PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }} - - - name: Run Sherlo Action in async mode - id: sherlo_action # This ID is used to reference the output - uses: ./. - with: - projectRoot: testing/expo-storybook-8 - config: ../../configs/async.storybook.json - async: true - env: - SHERLO_TOKEN: ${{ secrets.SHERLO_INTEGRATION_TESTING_ASYNC_TOKEN }} - - android_preview_build_upload: - name: Upload Android Preview Build to Sherlo - environment: ${{ inputs.env }} - needs: [run_sherlo_async] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - ref: ${{ github.ref }} - lfs: true - - - name: Set up Node.js - uses: actions/setup-node@v2 - with: - node-version: '18.18.0' - - - name: Install dependencies - run: yarn - - - name: Build dependencies - run: yarn switch-env:dev - env: - PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }} - - - name: Upload Android to Sherlo - uses: ./. - with: - # TODO: project root is not respected for some reason when looking for the Android build - # projectRoot: testing/expo-storybook-8 - # config: ../../configs/async.storybook.json - # android: builds/storybook/android.apk - config: configs/async.storybook.json - android: testing/expo-storybook-8/builds/storybook/android.apk - asyncBuildIndex: ${{ needs.run_sherlo_async.outputs.buildIndex }} - env: - SHERLO_TOKEN: ${{ secrets.SHERLO_INTEGRATION_TESTING_ASYNC_TOKEN }} - - ios_preview_build_upload: - name: Upload iOS Preview Build to Sherlo - environment: ${{ inputs.env }} - needs: [run_sherlo_async] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - ref: ${{ github.ref }} - lfs: true - - - name: Set up Node.js - uses: actions/setup-node@v2 - with: - node-version: '18.18.0' - - - name: Install dependencies - run: yarn - - - name: Build dependencies - run: yarn switch-env:dev - env: - PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }} - - - name: Upload iOS to Sherlo - uses: ./. - with: - # TODO: project root is not respected for some reason when looking for the ios build - # projectRoot: testing/expo-storybook-8 - # config: ../../configs/async.storybook.json - # ios: builds/storybook/ios.tar.gz - config: configs/async.storybook.json - ios: testing/expo-storybook-8/builds/storybook/ios.tar.gz - asyncBuildIndex: ${{ needs.run_sherlo_async.outputs.buildIndex }} - env: - SHERLO_TOKEN: ${{ secrets.SHERLO_INTEGRATION_TESTING_ASYNC_TOKEN }} diff --git a/.github/workflows/device_testing.yml b/.github/workflows/device_testing.yml deleted file mode 100644 index 1ae6ca47..00000000 --- a/.github/workflows/device_testing.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Device Testing - -on: - workflow_call: - inputs: - env: - description: 'Environment (dev, test, prod)' - required: true - type: string - workflow_dispatch: - inputs: - env: - description: 'Environment (dev, test, prod)' - required: true - default: 'dev' - type: string - -jobs: - run: - name: Run - environment: ${{ inputs.env }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - ref: ${{ github.ref }} - lfs: true - - - name: Set up Node.js - uses: actions/setup-node@v2 - with: - node-version: '18.18.0' - - - name: Install dependencies - run: yarn - - - name: Build dependencies - run: yarn switch-env:${{ inputs.env }} - env: - PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }} - - - name: Run Sherlo Action - uses: ./. - with: - ios: testing/expo-storybook-8/builds/preview/ios.tar.gz - android: testing/expo-storybook-8/builds/preview/android.apk - config: configs/device-testing.json - env: - SHERLO_TOKEN: ${{ secrets.SHERLO_DEVICE_TESTING_TOKEN }} diff --git a/.github/workflows/eas_hooks.yml b/.github/workflows/expo-cloud.yml similarity index 59% rename from .github/workflows/eas_hooks.yml rename to .github/workflows/expo-cloud.yml index 03359aec..d66f1be0 100644 --- a/.github/workflows/eas_hooks.yml +++ b/.github/workflows/expo-cloud.yml @@ -1,4 +1,4 @@ -name: Run Sherlo with EAS hooks +name: TEST - expo-cloud-builds mode on: workflow_call: @@ -7,6 +7,11 @@ on: description: 'Environment (dev, test, prod)' required: true type: string + use_github_action: + description: 'Use Sherlo Github Action' + required: false + type: boolean + default: false workflow_dispatch: inputs: env: @@ -14,9 +19,14 @@ on: required: true default: 'dev' type: string + use_github_action: + description: 'Use Sherlo Github Action' + required: false + type: boolean + default: false jobs: - start_sherlo_and_make_builds_with_eas: + start_sherlo_expo_cloud: if: > (github.event_name == 'pull_request' && github.event.action == 'labeled' && startsWith(github.event.label.name, 'sherlo:eas')) || (github.event_name != 'pull_request') @@ -42,14 +52,25 @@ jobs: # It's important to run Sherlo in the same job as the EAS build, # because we're pushing temporary files to .expo directory used during the build - - name: Run Sherlo in async mode + - name: Run sherlo expo-cloud-builds with CLI + if: inputs.use_github_action == false + working-directory: testing/expo-storybook-8 + run: | + yarn sherlo expo-cloud-builds \ + --waitForEasBuild \ + --config ../../configs/default-devices.json \ + --token ${{ secrets.SHERLO_EXPO_CLOUD_TOKEN }} + + - name: Run sherlo expo-cloud-builds with Github Action + if: inputs.use_github_action == true uses: ./. with: + command: expo-cloud-builds projectRoot: testing/expo-storybook-8 - config: ../../configs/eas.preview.json - remoteExpo: true + waitForEasBuild: true + config: ../../configs/default-devices.json env: - SHERLO_TOKEN: ${{ secrets.SHERLO_INTEGRATION_TESTING_EAS_TOKEN }} + SHERLO_TOKEN: ${{ secrets.SHERLO_EXPO_CLOUD_TOKEN }} - name: Trigger EAS builds for both platforms working-directory: testing/expo-storybook-8 diff --git a/.github/workflows/expo-remote-builds.yml b/.github/workflows/expo-remote-builds.yml deleted file mode 100644 index 02e4aedc..00000000 --- a/.github/workflows/expo-remote-builds.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Test expo-remote-builds flow - -on: - workflow_call: - inputs: - env: - description: 'Environment (dev, test, prod)' - required: true - type: string - workflow_dispatch: - inputs: - env: - description: 'Environment (dev, test, prod)' - required: true - default: 'dev' - type: string - -jobs: - dummy_job: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - ref: ${{ github.ref }} - lfs: true diff --git a/.github/workflows/expo-update.yml b/.github/workflows/expo-update.yml new file mode 100644 index 00000000..4acff315 --- /dev/null +++ b/.github/workflows/expo-update.yml @@ -0,0 +1,107 @@ +name: TEST - expo-update mode + +on: + workflow_call: + inputs: + env: + description: 'Environment (dev, test, prod)' + required: true + type: string + config: + description: 'Config (default-devices, all-devices, many-stories)' + required: false + default: 'default-devices' + type: string + use_github_action: + description: 'Use Sherlo Github Action' + required: false + default: false + type: boolean + project: + description: 'Project (expo-update, device-testing, many-stories)' + required: true + type: string + with_builds: + description: 'With builds' + required: false + default: false + type: boolean + +jobs: + run_sherlo_expo_update: + name: Run Sherlo in expo-update mode + environment: ${{ inputs.env }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + ref: ${{ github.ref }} + lfs: true + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '18.18.0' + + - name: Install dependencies + run: yarn + + - name: Build dependencies + run: yarn switch-env:${{ inputs.env }} + env: + PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }} + + - name: Setup EAS + uses: expo/expo-github-action@v8 + with: + eas-version: latest + token: ${{ secrets.EXPO_TOKEN }} + + - name: Trigger EAS update and capture manifest URLs + working-directory: testing/expo-storybook-8 + run: | + eas update --channel 'development' --message 'Expo Update' --json --non-interactive + + - name: Run sherlo expo-update (with native builds) with CLI + if: inputs.with_builds == true && inputs.use_github_action == false + working-directory: testing/expo-storybook-8 + run: | + yarn sherlo expo-update \ + --config ../../configs/${{ inputs.config }}.json \ + --android builds/development/android.apk \ + --ios builds/development/ios.tar.gz \ + --branch development \ + --token ${{ inputs.project == 'expo-update' && secrets.SHERLO_EXPO_UPDATE_TOKEN || inputs.project == 'many-stories' && secrets.SHERLO_MANY_STORIES_TOKEN || inputs.project == 'device-testing' && secrets.SHERLO_ALL_DEVICES_TOKEN }} + + - name: Run sherlo expo-update (with native builds) with Github Action + if: inputs.with_builds == true && inputs.use_github_action == true + uses: ./. + with: + command: expo-update + projectRoot: testing/expo-storybook-8 + config: ../../configs/${{ inputs.config }}.json + android: builds/development/android.apk + ios: builds/development/ios.tar.gz + branch: development + env: + SHERLO_TOKEN: ${{ inputs.project == 'expo-update' && secrets.SHERLO_EXPO_UPDATE_TOKEN || inputs.project == 'many-stories' && secrets.SHERLO_MANY_STORIES_TOKEN || inputs.project == 'device-testing' && secrets.SHERLO_ALL_DEVICES_TOKEN }} + + - name: Run sherlo expo-update (without native builds) with CLI + if: inputs.with_builds == false && inputs.use_github_action == false + working-directory: testing/expo-storybook-8 + run: | + yarn sherlo expo-update \ + --config ../../configs/${{ inputs.config }}.json \ + --branch development \ + --token ${{ inputs.project == 'expo-update' && secrets.SHERLO_EXPO_UPDATE_TOKEN || inputs.project == 'many-stories' && secrets.SHERLO_MANY_STORIES_TOKEN || inputs.project == 'device-testing' && secrets.SHERLO_ALL_DEVICES_TOKEN }} + + - name: Run sherlo expo-update (without native builds) with Github Action + if: inputs.with_builds == false && inputs.use_github_action == true + uses: ./. + with: + command: expo-update + projectRoot: testing/expo-storybook-8 + config: ../../configs/${{ inputs.config }}.json + branch: development + env: + SHERLO_TOKEN: ${{ inputs.project == 'expo-update' && secrets.SHERLO_EXPO_UPDATE_TOKEN || inputs.project == 'many-stories' && secrets.SHERLO_MANY_STORIES_TOKEN || inputs.project == 'device-testing' && secrets.SHERLO_ALL_DEVICES_TOKEN }} diff --git a/.github/workflows/expo-updates.yml b/.github/workflows/expo-updates.yml deleted file mode 100644 index a359776e..00000000 --- a/.github/workflows/expo-updates.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Test expo-updates flow - -on: - workflow_call: - inputs: - env: - description: 'Environment (dev, test, prod)' - required: true - type: string - workflow_dispatch: - inputs: - env: - description: 'Environment (dev, test, prod)' - required: true - default: 'dev' - type: string - -jobs: - dummy_job: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - ref: ${{ github.ref }} - lfs: true diff --git a/.github/workflows/expo_local-builds.yml b/.github/workflows/expo_local-builds.yml index 193cfe3c..7af9980d 100644 --- a/.github/workflows/expo_local-builds.yml +++ b/.github/workflows/expo_local-builds.yml @@ -1,4 +1,4 @@ -name: Test expo local-builds flow +name: TEST - local-builds mode (Expo) on: workflow_call: @@ -7,6 +7,11 @@ on: description: 'Environment (dev, test, prod)' required: true type: string + use_github_action: + description: 'Use Sherlo Github Action' + required: false + type: boolean + default: false workflow_dispatch: inputs: env: @@ -14,12 +19,53 @@ on: required: true default: 'dev' type: string - + use_github_action: + description: 'Use Sherlo Github Action' + required: false + type: boolean + default: false jobs: - dummy_job: + sherlo_local_builds: + name: Run sherlo local-builds (expo) + environment: ${{ inputs.env }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: ref: ${{ github.ref }} lfs: true + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '18.18.0' + + - name: Install dependencies + run: yarn + + - name: Build dependencies + run: yarn switch-env:${{ inputs.env }} + env: + PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }} + + - name: Run sherlo local-builds with CLI + if: inputs.use_github_action == false + working-directory: testing/expo-storybook-8 + run: | + yarn sherlo local-builds \ + --config ../../configs/default-devices.json \ + --android builds/preview/android.apk \ + --ios builds/preview/ios.tar.gz \ + --token ${{ secrets.SHERLO_LOCAL_BUILDS_EXPO_TOKEN }} + + - name: Run sherlo local-builds with Github Action + if: inputs.use_github_action == true + uses: ./. + with: + command: local-builds + projectRoot: testing/expo-storybook-8 + config: ../../configs/default-devices.json + android: builds/preview/android.apk + ios: builds/preview/ios.tar.gz + env: + SHERLO_TOKEN: ${{ secrets.SHERLO_LOCAL_BUILDS_EXPO_TOKEN }} diff --git a/.github/workflows/node_testing.yml b/.github/workflows/node_testing.yml deleted file mode 100644 index 11cd1873..00000000 --- a/.github/workflows/node_testing.yml +++ /dev/null @@ -1,79 +0,0 @@ -name: Node Testing - -on: - workflow_call: - workflow_dispatch: - -jobs: - run_sherlo_sync: - name: Run Sherlo in sync mode - runs-on: ubuntu-latest - strategy: - matrix: - node-version: - [ - '22.3.0', - '21.7.3', - '20.14.0', - '19.9.0', - '18.20.3', - '17.9.1', - '16.20.2', - '15.14.0', - '14.21.3', - '13.14.0', - '12.22.12', - '11.15.0', - '10.24.1', - ] - steps: - - uses: actions/checkout@v2 - with: - ref: ${{ github.ref }} - lfs: true - - - name: Set up Node.js - uses: actions/setup-node@v2 - with: - node-version: '18.18.0' # Default version - - - name: Install dependencies - run: yarn - - - name: Build dependencies - run: yarn switch-env:dev - env: - PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }} - - - name: Set up Node.js for testing - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - - - name: Run Sherlo Action - uses: ./. - with: - ios: testing/expo-storybook-8/builds/preview/ios.tar.gz - android: testing/expo-storybook-8/builds/preview/android.apk - config: configs/sync.preview.json - env: - SHERLO_TOKEN: ${{ secrets.SHERLO_NODE_TESTING_TOKEN }} - continue-on-error: true # Continue even if this step fails - id: sherlo - - - name: Record result - run: echo "sherlo_sync_result=${{ steps.sherlo.outcome }}" >> $GITHUB_ENV - - fail_check: - name: Fail Check - runs-on: ubuntu-latest - needs: [run_sherlo_sync] - steps: - - name: Check for failures - run: | - if grep -q "failure" <<< "${{ needs.run_sherlo_sync.outputs.sherlo_sync_result }}"; then - echo "One or more instances failed" - exit 1 - else - echo "All instances passed" - fi diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index aef093d8..eeae695d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,6 +39,15 @@ jobs: - name: Bump Version run: npx lerna version $NEW_VERSION_NUMBER --yes --no-git-tag-version --no-push + - name: Save version number to native dependencies + run: | + echo "{\"version\": \"$NEW_VERSION_NUMBER\"}" > packages/react-native-storybook/android/src/main/assets/sherlo.json + echo "{\"version\": \"$NEW_VERSION_NUMBER\"}" > packages/react-native-storybook/ios/Resources/assets/sherlo.json + + - name: Bump minimum required native dependencies version + run: | + echo "{\"REQUIRED_MIN_SDK_VERSION\": \"$NEW_VERSION_NUMBER\"}" > packages/cli/sdk-compatibility.json + - name: Build packages run: yarn switch-env:prod env: diff --git a/.github/workflows/rn_local-builds.yml b/.github/workflows/rn_local-builds.yml index 64be2ec2..664bce89 100644 --- a/.github/workflows/rn_local-builds.yml +++ b/.github/workflows/rn_local-builds.yml @@ -1,4 +1,4 @@ -name: Test react-native local-builds flow +name: TEST - local-builds mode (React Native) on: workflow_call: @@ -14,12 +14,34 @@ on: required: true default: 'dev' type: string - jobs: - dummy_job: + run_sherlo_sync: + name: Run Sherlo in sync mode + environment: ${{ inputs.env }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: ref: ${{ github.ref }} lfs: true + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '18.18.0' + + - name: Install dependencies + run: yarn + + - name: Build dependencies + run: yarn switch-env:${{ inputs.env }} + env: + PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }} + + - name: Run sherlo local-builds + run: | + yarn sherlo local-builds \ + --config configs/default-devices.json \ + --android testing/expo-storybook-8/builds/preview/android.apk \ + --ios testing/expo-storybook-8/builds/preview/ios.tar.gz \ + --token ${{ secrets.SHERLO_INTEGRATION_TESTING_SYNC_TOKEN }} diff --git a/.github/workflows/sherlo_builds.yml b/.github/workflows/sherlo_builds.yml new file mode 100644 index 00000000..1cdaf42b --- /dev/null +++ b/.github/workflows/sherlo_builds.yml @@ -0,0 +1,37 @@ +name: 'Sherlo Testing' + +on: + workflow_dispatch: + inputs: + env: + description: 'Environment (dev, test, prod)' + required: true + default: 'dev' + type: string + preview_builds: + description: 'Builds: Preview' + required: false + default: false + type: boolean + development_builds: + description: 'Builds: Development' + required: false + default: false + type: boolean + +jobs: + update_preview_builds: + uses: ./.github/workflows/update_builds.yml + if: ${{ github.event.inputs.preview_builds == 'true'}} + name: Update Preview Builds + secrets: inherit + with: + profile: 'preview' + + update_development_builds: + uses: ./.github/workflows/update_builds.yml + if: ${{ github.event.inputs.development_builds == 'true'}} + name: Update Development Builds + secrets: inherit + with: + profile: 'development' diff --git a/.github/workflows/sherlo_testing.yml b/.github/workflows/sherlo_testing.yml index 939a85d5..ac5b8456 100644 --- a/.github/workflows/sherlo_testing.yml +++ b/.github/workflows/sherlo_testing.yml @@ -8,100 +8,103 @@ on: required: true default: 'dev' type: string - skip_preview_builds: - description: 'Skip Preview builds' + use_github_action: + description: 'Use Sherlo Github Action' required: false default: false type: boolean - skip_storybook_builds: - description: 'Skip Storybook builds' + device_testing: + description: 'Test: All Devices' required: false default: false type: boolean - skip_device_testing: - description: 'Skip Device Testing' + many_stories: + description: 'Test: Many Stories' required: false default: false type: boolean - skip_stress_testing: - description: 'Skip Stress Testing' + expo_local_builds: + description: 'Test: local-builds (Expo)' required: false default: false type: boolean - skip_integration_testing_sync: - description: 'Skip Integration Testing - Sync' + expo_cloud: + description: 'Test: expo-cloud-builds' required: false default: false type: boolean - skip_integration_testing_async: - description: 'Skip Integration Testing - Async' + expo_update_with_builds: + description: 'Test: expo-update (with builds)' required: false default: false type: boolean - skip_integration_testing_eas: - description: 'Skip Integration Testing - EAS' + expo_update: + description: 'Test: expo-update' required: false default: false type: boolean jobs: - update_preview_builds: - uses: ./.github/workflows/update_builds.yml - if: ${{ github.event.inputs.skip_preview_builds != 'true'}} - name: Update Preview Builds - secrets: inherit - with: - profile: 'preview' - - update_storybook_builds: - uses: ./.github/workflows/update_builds.yml - if: ${{ github.event.inputs.skip_storybook_builds != 'true'}} - name: Update Storybook Builds + device_testing: + uses: ./.github/workflows/expo-update.yml + if: ${{ github.event.inputs.device_testing == 'true' && always() && !failure() && !cancelled() }} + name: Device Testing secrets: inherit with: - profile: 'storybook' + env: ${{ github.event.inputs.env }} + config: 'all-devices' + project: 'device-testing' + with_builds: true + use_github_action: ${{ github.event.inputs.use_github_action == 'true' }} - device_testing: - uses: ./.github/workflows/device_testing.yml - needs: [update_preview_builds, update_storybook_builds] - if: ${{ github.event.inputs.skip_device_testing != 'true' && always() && !failure() && !cancelled() }} - name: Device Testing + many_stories: + uses: ./.github/workflows/expo-update.yml + if: ${{ github.event.inputs.many_stories == 'true' && always() && !failure() && !cancelled() }} + name: Many Stories secrets: inherit with: env: ${{ github.event.inputs.env }} + config: 'many-stories' + with_builds: true + project: 'many-stories' + use_github_action: ${{ github.event.inputs.use_github_action == 'true' }} - stress_testing: - uses: ./.github/workflows/stress_testing.yml - needs: [update_preview_builds, update_storybook_builds] - if: ${{ github.event.inputs.skip_stress_testing != 'true' && always() && !failure() && !cancelled() }} - name: Stress Testing + expo_local_builds: + uses: ./.github/workflows/expo_local-builds.yml + if: ${{ github.event.inputs.expo_local_builds == 'true' && always() && !failure() && !cancelled() }} + name: local-builds (Expo) secrets: inherit with: env: ${{ github.event.inputs.env }} + use_github_action: ${{ github.event.inputs.use_github_action == 'true' }} - integration_testing_sync: - uses: ./.github/workflows/sync.yml - needs: [update_preview_builds, update_storybook_builds] - if: ${{ github.event.inputs.skip_integration_testing_sync != 'true' && always() && !failure() && !cancelled() }} - name: Integration Testing - Sync + expo_cloud: + uses: ./.github/workflows/expo-cloud.yml + if: ${{ github.event.inputs.expo_cloud == 'true' && always() && !failure() && !cancelled() }} + name: expo-cloud-builds secrets: inherit with: env: ${{ github.event.inputs.env }} + use_github_action: ${{ github.event.inputs.use_github_action == 'true' }} - integration_testing_async: - uses: ./.github/workflows/async.yml - needs: [update_preview_builds, update_storybook_builds] - if: ${{ github.event.inputs.skip_integration_testing_async != 'true' && always() && !failure() && !cancelled() }} - name: Integration Testing - Async + expo_update_with_builds: + uses: ./.github/workflows/expo-update.yml + if: ${{ github.event.inputs.expo_update_with_builds == 'true' && always() && !failure() && !cancelled() }} + name: expo-update (with native builds) secrets: inherit with: env: ${{ github.event.inputs.env }} + use_github_action: ${{ github.event.inputs.use_github_action == 'true' }} + with_builds: true + project: 'expo-update' - integration_testing_eas: - uses: ./.github/workflows/eas_hooks.yml - needs: [update_preview_builds, update_storybook_builds] - if: ${{ github.event.inputs.skip_integration_testing_eas != 'true' && always() && !failure() && !cancelled() }} - name: Integration Testing - EAS + expo_update: + uses: ./.github/workflows/expo-update.yml + if: ${{ github.event.inputs.expo_update == 'true' && always() && !failure() && !cancelled() }} + name: expo-update (without native builds) secrets: inherit with: env: ${{ github.event.inputs.env }} + use_github_action: ${{ github.event.inputs.use_github_action == 'true' }} + with_builds: false + project: 'expo-update' diff --git a/.github/workflows/stress_testing.yml b/.github/workflows/stress_testing.yml index 1ca03e5f..e3c0acf6 100644 --- a/.github/workflows/stress_testing.yml +++ b/.github/workflows/stress_testing.yml @@ -1,4 +1,4 @@ -name: Stress Testing +name: TEST - Stress Testing (20 builds) on: workflow_call: @@ -42,12 +42,13 @@ jobs: env: PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }} - - name: Run Sherlo Action - uses: ./. - with: - ios: testing/expo-storybook-8/builds/preview/ios.tar.gz - android: testing/expo-storybook-8/builds/preview/android.apk - config: configs/stress-testing.json - commitName: Attempt ${{ matrix.attemptNumber }} - env: - SHERLO_TOKEN: ${{ secrets.SHERLO_STRESS_TESTING_TOKEN }} + - name: Add delay based on attempt number + run: sleep $(( 10 * ${{ matrix.attemptNumber }} )) + + - name: Run sherlo local-builds + run: | + yarn sherlo local-builds \ + --config configs/default-devices.json \ + --android testing/expo-storybook-8/builds/preview/android.apk \ + --ios testing/expo-storybook-8/builds/preview/ios.tar.gz \ + --token ${{ secrets.SHERLO_STRESS_TESTING_TOKEN }} diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml deleted file mode 100644 index ffcce098..00000000 --- a/.github/workflows/sync.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Run Sherlo with Sync Upload - -on: - workflow_call: - inputs: - env: - description: 'Environment (dev, test, prod)' - required: true - type: string - workflow_dispatch: - inputs: - env: - description: 'Environment (dev, test, prod)' - required: true - default: 'dev' - type: string -jobs: - run_sherlo_sync: - name: Run Sherlo in sync mode - environment: ${{ inputs.env }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - ref: ${{ github.ref }} - lfs: true - - - name: Set up Node.js - uses: actions/setup-node@v2 - with: - node-version: '18.18.0' - - - name: Install dependencies - run: yarn - - - name: Build dependencies - run: yarn switch-env:${{ inputs.env }} - env: - PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }} - - - name: Run Sherlo Action - uses: ./. - with: - ios: testing/expo-storybook-8/builds/preview/ios.tar.gz - android: testing/expo-storybook-8/builds/preview/android.apk - config: configs/sync.preview.json - env: - SHERLO_TOKEN: ${{ secrets.SHERLO_INTEGRATION_TESTING_SYNC_TOKEN }} diff --git a/README.md b/README.md index 58e09ec0..605aacb5 100644 --- a/README.md +++ b/README.md @@ -37,14 +37,8 @@ projects. ## 📦 Packages - [@sherlo/react-native-storybook](packages/react-native-storybook): Integration with React Native Storybook -- [@sherlo/cli](packages/cli): Command-line tool for running Sherlo tests - [@sherlo/action](packages/action): GitHub Action for automating Sherlo tests - -
- -## 💡 Examples - -- [expo-example](examples/expo-example): Expo project with Sherlo integration +- [sherlo](packages/cli): Command-line tool for running Sherlo tests
diff --git a/action.yml b/action.yml index 49d5c8b6..5d3c5cf0 100644 --- a/action.yml +++ b/action.yml @@ -10,29 +10,31 @@ runs: main: 'packages/action/release/index.js' inputs: + command: + description: 'command to execute ("local-builds", "expo-update", "expo-cloud-builds")' + required: true android: - description: 'path to android build (.apk file)' + description: 'Path to android build (.apk file)' required: false ios: - description: 'path to ios simulator build (.app directory or .tar/.tar.gz file)' + description: 'Path to ios build (.app or .tar.gz/.tar)' required: false config: - description: 'path to your sherlo.config.ts file' + description: 'Path to the config file (default: "sherlo.config.json")' required: false projectRoot: - description: 'use this option to specify the root of the react native project when working with monorepo' - default: '.' + description: 'Root directory of the React Native project (default: ".")' required: false - async: - description: "if 'true' you don't need to provide android and ios builds, they can be uploaded independently with separate action" - default: 'false' + branch: + description: 'EAS Update branch name' required: false - asyncBuildIndex: - description: 'if you want to upload android or ios build to existing sherlo build in async mode, you need to provide index of build you want to update' + easBuildScriptName: + description: 'Package.json script name that triggers EAS build' + required: false + waitForEasBuild: + description: 'Wait for manually triggered EAS build' required: false outputs: - buildIndex: - description: 'The index of the created Sherlo build' url: description: 'URL to Sherlo test results' diff --git a/configs/device-testing.json b/configs/all-devices.json similarity index 99% rename from configs/device-testing.json rename to configs/all-devices.json index e95daf5b..a5d4b3ef 100644 --- a/configs/device-testing.json +++ b/configs/all-devices.json @@ -1,4 +1,5 @@ { + "include": ["TestInfo", "FocusedInput"], "devices": [ { "id": "pixel.7.pro", diff --git a/configs/async.storybook.json b/configs/async.storybook.json deleted file mode 100644 index 76dd75ae..00000000 --- a/configs/async.storybook.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "devices": [ - { - "id": "pixel.7.pro", - "osVersion": "13" - }, - { - "id": "pixel.tablet", - "osVersion": "13" - }, - { - "id": "iphone.15.pro", - "osVersion": "17" - }, - { - "id": "ipad.pro.13.m4", - "osVersion": "17" - } - ] -} diff --git a/configs/stress-testing.json b/configs/default-devices.json similarity index 79% rename from configs/stress-testing.json rename to configs/default-devices.json index 6a88876e..3ed9411a 100644 --- a/configs/stress-testing.json +++ b/configs/default-devices.json @@ -1,4 +1,5 @@ { + "exclude": ["ManyStories"], "devices": [ { "id": "pixel.7.pro", @@ -13,10 +14,10 @@ "osTheme": "dark" }, { - "id": "iphone.15.pro", - "osVersion": "17", + "id": "iphone.13.mini", + "osVersion": "15", "osLocale": "en_US", - "osTheme": "light" + "osTheme": "dark" }, { "id": "ipad.pro.13.m4", diff --git a/configs/eas.preview.json b/configs/eas.preview.json deleted file mode 100644 index 76dd75ae..00000000 --- a/configs/eas.preview.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "devices": [ - { - "id": "pixel.7.pro", - "osVersion": "13" - }, - { - "id": "pixel.tablet", - "osVersion": "13" - }, - { - "id": "iphone.15.pro", - "osVersion": "17" - }, - { - "id": "ipad.pro.13.m4", - "osVersion": "17" - } - ] -} diff --git a/configs/demo.preview.json b/configs/many-stories.json similarity index 60% rename from configs/demo.preview.json rename to configs/many-stories.json index eaf32f46..9c484756 100644 --- a/configs/demo.preview.json +++ b/configs/many-stories.json @@ -1,11 +1,6 @@ { + "include": ["ManyStories"], "devices": [ - { - "id": "pixel.4a", - "osVersion": "13", - "osLocale": "en_US", - "osTheme": "light" - }, { "id": "pixel.7.pro", "osVersion": "13", @@ -22,18 +17,12 @@ "id": "iphone.13.mini", "osVersion": "15", "osLocale": "en_US", - "osTheme": "light" - }, - { - "id": "iphone.15.pro", - "osVersion": "17", - "osLocale": "en_US", - "osTheme": "light" + "osTheme": "dark" }, { "id": "ipad.pro.13.m4", "osVersion": "17", - "osLocale": "en_US", + "osLocale": "de_DE", "osTheme": "light" } ] diff --git a/configs/sync.preview.json b/configs/sync.preview.json deleted file mode 100644 index 76dd75ae..00000000 --- a/configs/sync.preview.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "devices": [ - { - "id": "pixel.7.pro", - "osVersion": "13" - }, - { - "id": "pixel.tablet", - "osVersion": "13" - }, - { - "id": "iphone.15.pro", - "osVersion": "17" - }, - { - "id": "ipad.pro.13.m4", - "osVersion": "17" - } - ] -} diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 00000000..30bfd2b2 --- /dev/null +++ b/examples/README.md @@ -0,0 +1,37 @@ +# Sherlo Examples + +This directory contains examples for different build strategies and app delivery methods for Sherlo testing. Choose the example that best matches your project setup and requirements. + +## Available Examples + +### 1. Expo Cloud Builds +**[expo-cloud-builds](./expo-cloud-builds)** + +Use this example if you want to build your app through remote EAS (Expo Application Services) builds. + +### 2. Local Builds +**[local-builds](./local-builds)** + +This example is suitable for: +- Building your Expo app locally +- Bare React Native apps + +### 3. Expo Update +**[expo-update](./expo-update)** + +Ideal for testing without creating a new native build each time. This example demonstrates how to use Expo Update for efficient testing cycles. + +## Choosing the Right Example + +Consider the following factors when selecting an example: +1. Your current build strategy +2. How you plan to deliver the app to Sherlo for testing +3. Your development workflow and preferences + +Each example provides specific instructions and configurations tailored to its use case. +Additionally, these examples showcase various Sherlo features that can be applied across different setups. +Explore the example directories for detailed setup instructions and usage information. + +## Need Help? + +If you're unsure which example to use or need further assistance, please refer to our documentation or reach out to our support team. diff --git a/examples/expo-cloud-builds/.github/sherlo.yml b/examples/expo-cloud-builds/.github/sherlo.yml new file mode 100644 index 00000000..5b606392 --- /dev/null +++ b/examples/expo-cloud-builds/.github/sherlo.yml @@ -0,0 +1,28 @@ +name: Example of a Sherlo workflow for expo-cloud-builds + +on: + workflow_dispatch: + +jobs: + sherlo_expo_cloud: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install dependencies + run: yarn + + - name: Setup EAS + uses: expo/expo-github-action@v8 + with: + eas-version: latest + token: ${{ secrets.EXPO_TOKEN }} + + # It's important to run Sherlo in the same job as the EAS build, + # because we're pushing temporary files to .expo directory used during the build + - name: Run sherlo expo-cloud-builds + run: yarn sherlo expo-cloud-builds --manual --token ${{ secrets.SHERLO_TOKEN }} + + - name: Trigger EAS builds for both platforms + run: eas build --profile=preview --platform=all --non-interactive --no-wait diff --git a/examples/expo-example/.gitignore b/examples/expo-cloud-builds/.gitignore similarity index 100% rename from examples/expo-example/.gitignore rename to examples/expo-cloud-builds/.gitignore diff --git a/examples/expo-example/.storybook/index.tsx b/examples/expo-cloud-builds/.storybook/index.tsx similarity index 61% rename from examples/expo-example/.storybook/index.tsx rename to examples/expo-cloud-builds/.storybook/index.tsx index a4be21b9..8a9b9e43 100644 --- a/examples/expo-example/.storybook/index.tsx +++ b/examples/expo-cloud-builds/.storybook/index.tsx @@ -2,15 +2,11 @@ import AsyncStorage from '@react-native-async-storage/async-storage'; import { getStorybook } from '@sherlo/react-native-storybook'; import { view } from './storybook.requires'; -const StorybookUIRoot = getStorybook(view, { +const Storybook = getStorybook(view, { storage: { getItem: AsyncStorage.getItem, setItem: AsyncStorage.setItem, }, - shouldPersistSelection: true, - enableWebsockets: true, - host: 'localhost', - port: 7007, }); -export default StorybookUIRoot; +export default Storybook; diff --git a/examples/expo-example/.storybook/main.ts b/examples/expo-cloud-builds/.storybook/main.ts similarity index 100% rename from examples/expo-example/.storybook/main.ts rename to examples/expo-cloud-builds/.storybook/main.ts diff --git a/examples/expo-cloud-builds/.storybook/preview.ts b/examples/expo-cloud-builds/.storybook/preview.ts new file mode 100644 index 00000000..9cc3da73 --- /dev/null +++ b/examples/expo-cloud-builds/.storybook/preview.ts @@ -0,0 +1,5 @@ +import type { Preview } from '@storybook/react'; + +const preview: Preview = {}; + +export default preview; diff --git a/examples/expo-example/.storybook/storybook.requires.ts b/examples/expo-cloud-builds/.storybook/storybook.requires.ts similarity index 73% rename from examples/expo-example/.storybook/storybook.requires.ts rename to examples/expo-cloud-builds/.storybook/storybook.requires.ts index e5ca5b9f..559e9ca7 100644 --- a/examples/expo-example/.storybook/storybook.requires.ts +++ b/examples/expo-cloud-builds/.storybook/storybook.requires.ts @@ -1,10 +1,6 @@ /* do not change this file, it is auto generated by storybook. */ -import { - start, - prepareStories, - getProjectAnnotations, -} from "@storybook/react-native"; +import { start, updateView } from "@storybook/react-native"; import "@storybook/addon-ondevice-notes/register"; import "@storybook/addon-ondevice-controls/register"; @@ -49,15 +45,7 @@ if (!global.view) { storyEntries: normalizedStories, }); } else { - const { importMap } = prepareStories({ storyEntries: normalizedStories }); - - global.view._preview.onStoriesChanged({ - importFn: async (importPath: string) => importMap[importPath], - }); - - global.view._preview.onGetProjectAnnotationsChanged({ - getProjectAnnotations: getProjectAnnotations(global.view, annotations), - }); + updateView(global.view, annotations, normalizedStories); } export const view = global.view; diff --git a/examples/expo-cloud-builds/App.tsx b/examples/expo-cloud-builds/App.tsx new file mode 100644 index 00000000..cc38650a --- /dev/null +++ b/examples/expo-cloud-builds/App.tsx @@ -0,0 +1,13 @@ +import { isStorybookMode, addStorybookToDevMenu } from '@sherlo/react-native-storybook'; +import Storybook from './.storybook'; +import HomeScreen from './src/HomeScreen'; + +addStorybookToDevMenu(); + +export default function App() { + if (isStorybookMode) { + return ; + } + + return ; +} diff --git a/examples/expo-cloud-builds/app.config.js b/examples/expo-cloud-builds/app.config.js new file mode 100644 index 00000000..da1553c7 --- /dev/null +++ b/examples/expo-cloud-builds/app.config.js @@ -0,0 +1,38 @@ +module.exports = () => ({ + expo: { + owner: 'sherlo', + name: 'Sherlo Expo Example', + slug: 'sherlo-expo-example', + version: '1.0.0', + orientation: 'portrait', + userInterfaceStyle: 'automatic', + splash: { + resizeMode: 'contain', + backgroundColor: '#ffffff', + }, + androidStatusBar: { + translucent: true, + }, + updates: { + enabled: true, + fallbackToCacheTimeout: 300000, + url: 'https://u.expo.dev/4cb166d7-f774-49a9-9aa0-e5533347bcd1', + }, + ios: { + supportsTablet: true, + bundleIdentifier: 'com.sherlo.example', + }, + android: { + package: 'com.sherlo.example', + }, + runtimeVersion: { + policy: 'appVersion', + }, + plugins: ['expo-localization'], + extra: { + eas: { + projectId: '4cb166d7-f774-49a9-9aa0-e5533347bcd1', + }, + }, + }, +}); diff --git a/examples/expo-cloud-builds/babel.config.js b/examples/expo-cloud-builds/babel.config.js new file mode 100644 index 00000000..9d89e131 --- /dev/null +++ b/examples/expo-cloud-builds/babel.config.js @@ -0,0 +1,6 @@ +module.exports = function (api) { + api.cache(true); + return { + presets: ['babel-preset-expo'], + }; +}; diff --git a/examples/expo-cloud-builds/eas.json b/examples/expo-cloud-builds/eas.json new file mode 100644 index 00000000..59b97864 --- /dev/null +++ b/examples/expo-cloud-builds/eas.json @@ -0,0 +1,15 @@ +{ + "cli": { + "version": ">= 5.9.3" + }, + "build": { + "preview": { + "android": { + "buildType": "apk" + }, + "ios": { + "simulator": true + } + } + } +} diff --git a/examples/expo-example/index.ts b/examples/expo-cloud-builds/index.ts similarity index 100% rename from examples/expo-example/index.ts rename to examples/expo-cloud-builds/index.ts diff --git a/examples/expo-cloud-builds/metro.config.js b/examples/expo-cloud-builds/metro.config.js new file mode 100644 index 00000000..1eb0fee3 --- /dev/null +++ b/examples/expo-cloud-builds/metro.config.js @@ -0,0 +1,14 @@ +const path = require('path'); +const { getDefaultConfig } = require('expo/metro-config'); +const withStorybook = require('@storybook/react-native/metro/withStorybook'); + +/** @type {import('expo/metro-config').MetroConfig} */ +const config = getDefaultConfig(__dirname); + +module.exports = withStorybook(config, { + // set to false to disable storybook specific settings + // you can use a env variable to toggle this + enabled: true, + // path to your storybook config folder + configPath: path.resolve(__dirname, './.storybook'), +}); diff --git a/examples/expo-cloud-builds/package.json b/examples/expo-cloud-builds/package.json new file mode 100644 index 00000000..9306142c --- /dev/null +++ b/examples/expo-cloud-builds/package.json @@ -0,0 +1,33 @@ +{ + "name": "@sherlo/example-expo-cloud-builds", + "version": "1.0.34", + "private": true, + "main": "index.ts", + "scripts": { + "build:eas": "eas build --platform ios --profile=preview", + "sherlo": "sherlo expo-cloud-builds --buildScript build:eas", + "eas-build-on-complete": "sherlo eas-build-on-complete --profile=preview" + }, + "dependencies": { + "@gorhom/bottom-sheet": "^5.0.2", + "@react-native-async-storage/async-storage": "1.23.1", + "@react-native-community/datetimepicker": "8.0.1", + "@react-native-community/slider": "4.5.2", + "@sherlo/testing-components": "1.0.0", + "expo": "^51.0.38", + "react": "18.2.0", + "react-dom": "18.2.0", + "react-native": "0.74.5", + "react-native-gesture-handler": "~2.16.1", + "react-native-reanimated": "~3.10.1", + "react-native-svg": "15.2.0" + }, + "devDependencies": { + "@babel/core": "^7.20.0", + "@sherlo/react-native-storybook": "^1.0.34", + "@storybook/react-native": "^8.3.9", + "babel-loader": "^8.2.3", + "storybook": "^8.3.6", + "typescript": "~5.3.3" + } +} diff --git a/examples/expo-cloud-builds/src/HomeScreen.tsx b/examples/expo-cloud-builds/src/HomeScreen.tsx new file mode 100644 index 00000000..5b6f5d31 --- /dev/null +++ b/examples/expo-cloud-builds/src/HomeScreen.tsx @@ -0,0 +1,32 @@ +import { View, Text, Button, StyleSheet } from 'react-native'; +import { verifyIntegration, openStorybook } from '@sherlo/react-native-storybook'; + +const HomeScreen = () => { + return ( + + + {'Open Dev Menu and select "Toggle Storybook" \nor click the button below'} + + + {/** + * This button will reload the app + * and open it again in Storybook mode + */} +