Skip to content

Commit

Permalink
chore: Release v0.2.9-beta.0 (#2334)
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod authored Dec 27, 2024
2 parents e00d952 + 68b5547 commit f9314f4
Show file tree
Hide file tree
Showing 363 changed files with 19,739 additions and 1,164 deletions.
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ VITE_BUILD_TYPE=production
VITE_INBOXES_EMAIL=@follow.re
VITE_OPENPANEL_CLIENT_ID=
VITE_OPENPANEL_API_URL=

EXPO_PUBLIC_API_URL=https://api.follow.is
EXPO_PUBLIC_OPENPANEL_CLIENT_ID=
EXPO_PUBLIC_OPENPANEL_API_URL=
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ pnpm-lock.yaml
CHANGELOG.md

apps/external/postcss.config.cjs

apps/mobile/android
apps/mobile/ios
1 change: 1 addition & 0 deletions .prettierrc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ export default {
printWidth: 100,
tabWidth: 2,
trailingComma: "all",
plugins: ["prettier-plugin-tailwindcss"],
}
18 changes: 2 additions & 16 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
["[a-zA-Z]+[cC]lass[nN]ame[\"'`]?:\\s*[\"'`]([^\"'`]*)[\"'`]", "([^\"'`]*)"],
["[a-zA-Z]+[cC]lass[nN]ame\\s*=\\s*[\"'`]([^\"'`]*)[\"'`]", "([^\"'`]*)"]
],
"typescript.tsserver.maxTsServerMemory": 8096,
"typescript.tsserver.nodePath": "node",
// If you do not want to autofix some rules on save
// You can put this in your user settings or workspace settings
"eslint.codeActionsOnSave.rules": [
Expand Down Expand Up @@ -54,22 +56,6 @@
{
"rule": "unused-imports/no-unused-imports",
"severity": "off"
},
{
"rule": "@typescript-eslint/require-await",
"severity": "info"
},
{
"rule": "@typescript-eslint/await-thenable",
"severity": "info"
},
{
"rule": "@typescript-eslint/no-floating-promises",
"severity": "info"
},
{
"rule": "@typescript-eslint/no-misused-promises",
"severity": "info"
}
],
"cSpell.words": ["Hydable", "rsshub", "Русский"],
Expand Down
22 changes: 21 additions & 1 deletion CHANGELOG.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ You can also install using the following methods maintained by our community:
- If you are using Nix, you can install package [follow](https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/fo/follow/package.nix) that maintained by [iosmanthus](https://github.com/iosmanthus).
- If you are using macOS with [Homebrew](https://brew.sh), you can install cask [follow](https://formulae.brew.sh/cask/follow) (also [@alpha](https://formulae.brew.sh/cask/follow@alpha) and [@nightly](https://formulae.brew.sh/cask/follow@nightly)) that maintained by [realSunyz](https://github.com/realSunyz).

| [![Discord](https://img.shields.io/discord/1243823539426033696?color=5865F2&label=Discord&labelColor=black&logo=discord&logoColor=white&style=flat-square)](https://discord.gg/followapp) | Join our Discord server to connect with developers, request features, and receive support. |
| :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------- |
| [![](https://img.shields.io/badge/any_text-Follow-blue?color=2CA5E0&label=_&logo=x&labelColor=black&style=flat-square)](https://x.com/intent/follow?screen_name=follow_app_) | Follow us on X/Twitter for product updates and to join in on reward activities. |
| [![Discord](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fdiscord.com%2Fapi%2Finvites%2Ffollowapp%3Fwith_counts%3Dtrue&query=approximate_member_count&color=5865F2&label=Discord&labelColor=black&logo=discord&logoColor=white&style=flat-square)](https://discord.gg/followapp) | Join our Discord server to connect with developers, request features, and receive support. |
| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------- |
| [![](https://img.shields.io/badge/any_text-Follow-blue?color=2CA5E0&label=_&logo=x&labelColor=black&style=flat-square)](https://x.com/intent/follow?screen_name=follow_app_) | Follow us on X/Twitter for product updates and to join in on reward activities. |

> \[!IMPORTANT]
>
Expand Down
30 changes: 30 additions & 0 deletions apps/main/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,36 @@ function bootstrap() {
callback({ cancel: false, requestHeaders: details.requestHeaders })
})

// handle session cookie when sign in with email in electron
session.defaultSession.webRequest.onHeadersReceived(
{
urls: [`${apiURL}/better-auth/sign-in/email?*`],
},
(detail, callback) => {
const { responseHeaders } = detail
if (responseHeaders?.["set-cookie"]) {
const cookies = responseHeaders["set-cookie"] as string[]
cookies.forEach((cookie) => {
const cookieObj = parse(cookie)
Object.keys(cookieObj).forEach((name) => {
const value = cookieObj[name]
mainWindow.webContents.session.cookies.set({
url: apiURL,
name,
value,
secure: true,
httpOnly: true,
domain: new URL(apiURL).hostname,
sameSite: "no_restriction",
})
})
})
}

callback({ cancel: false, responseHeaders })
},
)

app.on("activate", () => {
// On macOS it's common to re-create a window in the app when the
// dock icon is clicked and there are no other windows open.
Expand Down
1 change: 1 addition & 0 deletions apps/mobile/.env
50 changes: 50 additions & 0 deletions apps/mobile/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Welcome to your Expo app 👋

This is an [Expo](https://expo.dev) project created with [`create-expo-app`](https://www.npmjs.com/package/create-expo-app).

## Get started

1. Install dependencies

```bash
npm install
```

2. Start the app

```bash
npx expo start
```

In the output, you'll find options to open the app in a

- [development build](https://docs.expo.dev/develop/development-builds/introduction/)
- [Android emulator](https://docs.expo.dev/workflow/android-studio-emulator/)
- [iOS simulator](https://docs.expo.dev/workflow/ios-simulator/)
- [Expo Go](https://expo.dev/go), a limited sandbox for trying out app development with Expo

You can start developing by editing the files inside the **app** directory. This project uses [file-based routing](https://docs.expo.dev/router/introduction).

## Get a fresh project

When you're ready, run:

```bash
npm run reset-project
```

This command will move the starter code to the **app-example** directory and create a blank **app** directory where you can start developing.

## Learn more

To learn more about developing your project with Expo, look at the following resources:

- [Expo documentation](https://docs.expo.dev/): Learn fundamentals, or go into advanced topics with our [guides](https://docs.expo.dev/guides).
- [Learn Expo tutorial](https://docs.expo.dev/tutorial/introduction/): Follow a step-by-step tutorial where you'll create a project that runs on Android, iOS, and the web.

## Join the community

Join our community of developers creating universal apps.

- [Expo on GitHub](https://github.com/expo/expo): View our open source platform and contribute.
- [Discord community](https://chat.expo.dev): Chat with Expo users and ask questions.
97 changes: 97 additions & 0 deletions apps/mobile/app.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
import { resolve } from "node:path"

import type { ConfigContext, ExpoConfig } from "expo/config"

// const roundedIconPath = resolve(__dirname, "../../resources/icon.png")
const iconPath = resolve(__dirname, "./assets/icon.png")
const adaptiveIconPath = resolve(__dirname, "./assets/adaptive-icon.png")

export default ({ config }: ConfigContext): ExpoConfig => ({
...config,
extra: {
eas: {
projectId: "a6335b14-fb84-45aa-ba80-6f6ab8926920",
},
},
owner: "follow",
updates: {
url: "https://u.expo.dev/a6335b14-fb84-45aa-ba80-6f6ab8926920",
},
runtimeVersion: {
policy: "appVersion",
},

name: "Follow",
slug: "follow",
version: "1.0.0",
orientation: "portrait",
icon: iconPath,
scheme: "follow",
userInterfaceStyle: "automatic",
newArchEnabled: true,
ios: {
supportsTablet: true,
bundleIdentifier: "is.follow",
usesAppleSignIn: true,
infoPlist: {
LSApplicationCategoryType: "public.app-category.news",
},
},
android: {
package: "is.follow",
adaptiveIcon: {
foregroundImage: adaptiveIconPath,
backgroundColor: "#FF5C00",
},
},
web: {
bundler: "metro",
output: "static",
favicon: iconPath,
},
plugins: [
[
"expo-router",
{
root: "./src/screens",
},
],
[
"expo-splash-screen",
{
backgroundColor: "#ffffff",
dark: {
backgroundColor: "#000000",
},
},
],
[
"expo-font",
{
fonts: [
"./assets/font/sn-pro/SNPro-Black.otf",
"./assets/font/sn-pro/SNPro-BlackItalic.otf",
"./assets/font/sn-pro/SNPro-Bold.otf",
"./assets/font/sn-pro/SNPro-BoldItalic.otf",
"./assets/font/sn-pro/SNPro-Heavy.otf",
"./assets/font/sn-pro/SNPro-HeavyItalic.otf",
"./assets/font/sn-pro/SNPro-Light.otf",
"./assets/font/sn-pro/SNPro-LightItalic.otf",
"./assets/font/sn-pro/SNPro-Medium.otf",
"./assets/font/sn-pro/SNPro-MediumItalic.otf",
"./assets/font/sn-pro/SNPro-Regular.otf",
"./assets/font/sn-pro/SNPro-RegularItalic.otf",
"./assets/font/sn-pro/SNPro-Semibold.otf",
"./assets/font/sn-pro/SNPro-SemiboldItalic.otf",
"./assets/font/sn-pro/SNPro-Thin.otf",
"./assets/font/sn-pro/SNPro-ThinItalic.otf",
],
},
],
"expo-apple-authentication",
[require("./scripts/with-follow-assets.js")],
],
experiments: {
typedRoutes: true,
},
})
Binary file added apps/mobile/assets/adaptive-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/mobile/assets/font/sn-pro/SNPro-Black.otf
Binary file not shown.
Binary file not shown.
Binary file added apps/mobile/assets/font/sn-pro/SNPro-Bold.otf
Binary file not shown.
Binary file not shown.
Binary file added apps/mobile/assets/font/sn-pro/SNPro-Book.otf
Binary file not shown.
Binary file not shown.
Binary file added apps/mobile/assets/font/sn-pro/SNPro-Heavy.otf
Binary file not shown.
Binary file not shown.
Binary file added apps/mobile/assets/font/sn-pro/SNPro-Light.otf
Binary file not shown.
Binary file not shown.
Binary file added apps/mobile/assets/font/sn-pro/SNPro-Medium.otf
Binary file not shown.
Binary file not shown.
Binary file added apps/mobile/assets/font/sn-pro/SNPro-Regular.otf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added apps/mobile/assets/font/sn-pro/SNPro-Thin.otf
Binary file not shown.
Binary file not shown.
Binary file added apps/mobile/assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions apps/mobile/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const path = require("node:path")

module.exports = function (api) {
api.cache(true)
return {
presets: [["babel-preset-expo", { jsxImportSource: "nativewind" }], "nativewind/babel"],
plugins: [
["inline-import", { extensions: [".sql"] }],
[
"module-resolver",
{
alias: {
"es-toolkit": path.resolve(__dirname, "../../node_modules/es-toolkit/dist/index.js"),
},
extensions: [".js", ".jsx", ".ts", ".tsx"],
},
],
"react-native-reanimated/plugin",
],
}
}
8 changes: 8 additions & 0 deletions apps/mobile/drizzle.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { defineConfig } from "drizzle-kit"

export default defineConfig({
dialect: "sqlite",
driver: "expo",
schema: "./src/database/schemas/index.ts",
out: "./drizzle",
})
43 changes: 43 additions & 0 deletions apps/mobile/drizzle/0000_harsh_shiva.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
CREATE TABLE `feeds` (
`id` text PRIMARY KEY NOT NULL,
`title` text,
`url` text NOT NULL,
`description` text,
`image` text,
`error_at` text,
`site_url` text,
`owner_user_id` text,
`error_message` text
);
--> statement-breakpoint
CREATE TABLE `inboxes` (
`id` text PRIMARY KEY NOT NULL,
`user_id` text NOT NULL,
`title` text
);
--> statement-breakpoint
CREATE TABLE `lists` (
`id` text PRIMARY KEY NOT NULL,
`user_id` text NOT NULL,
`title` text NOT NULL,
`feed_ids` text,
`description` text,
`view` integer NOT NULL,
`image` text,
`fee` integer,
`owner_user_id` text
);
--> statement-breakpoint
CREATE TABLE `subscriptions` (
`feed_id` text,
`list_id` text,
`inbox_id` text,
`user_id` text NOT NULL,
`view` integer NOT NULL,
`is_private` integer NOT NULL,
`title` text,
`category` text,
`created_at` text,
`type` text NOT NULL,
`id` text PRIMARY KEY NOT NULL
);
1 change: 1 addition & 0 deletions apps/mobile/drizzle/0001_bored_hobgoblin.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE `inboxes` DROP COLUMN `user_id`;
5 changes: 5 additions & 0 deletions apps/mobile/drizzle/0002_smart_power_man.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
CREATE TABLE `unread` (
`id` text PRIMARY KEY NOT NULL,
`subscription_id` text NOT NULL,
`count` integer NOT NULL
);
10 changes: 10 additions & 0 deletions apps/mobile/drizzle/0003_known_roland_deschain.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
PRAGMA foreign_keys=OFF;--> statement-breakpoint
CREATE TABLE `__new_unread` (
`subscription_id` text PRIMARY KEY NOT NULL,
`count` integer NOT NULL
);
--> statement-breakpoint
INSERT INTO `__new_unread`("subscription_id", "count") SELECT "subscription_id", "count" FROM `unread`;--> statement-breakpoint
DROP TABLE `unread`;--> statement-breakpoint
ALTER TABLE `__new_unread` RENAME TO `unread`;--> statement-breakpoint
PRAGMA foreign_keys=ON;
8 changes: 8 additions & 0 deletions apps/mobile/drizzle/0004_majestic_thunderbolt_ross.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CREATE TABLE `users` (
`id` text PRIMARY KEY NOT NULL,
`email` text NOT NULL,
`handle` text,
`name` text,
`image` text,
`is_me` integer NOT NULL
);
Loading

0 comments on commit f9314f4

Please sign in to comment.