Compare commits
2 Commits
d85caaa68f
...
7787455844
| Author | SHA1 | Date | |
|---|---|---|---|
|
7787455844
|
|||
|
24bec71054
|
@@ -78,6 +78,7 @@ PATCH_FILES=(
|
|||||||
"152-indigo-newpds-dayper-limit-pr707.diff"
|
"152-indigo-newpds-dayper-limit-pr707.diff"
|
||||||
"190-bgs-disable-ratelimit.patch"
|
"190-bgs-disable-ratelimit.patch"
|
||||||
"200-feed-generator-custom-existing.patch"
|
"200-feed-generator-custom-existing.patch"
|
||||||
|
"210-pds-subscriberepos-no-auth.patch"
|
||||||
)
|
)
|
||||||
|
|
||||||
function at-repos-clone() {
|
function at-repos-clone() {
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
今回の./ios (social-app)開発の要点をまとめます。
|
今回の./ios (social-app)開発の要点をまとめます。
|
||||||
|
|
||||||
1. MITのライセンスを遵守すること、iosアプリとして出品しても問題ないようにすること
|
1. MITのライセンスを遵守すること、iosアプリとして出品しても問題ないようにすること
|
||||||
https://raw.githubusercontent.com/bluesky-social/social-app/refs/heads/main/LICENSE
|
|
||||||
|
|
||||||
2. "Bluesky"という名称を使用しないこと。アイコンの変更。リンクの変更
|
2. "Bluesky"という名称を使用しないこと。アイコンの変更。リンクの変更
|
||||||
|
3. selfhostでも動くこと。
|
||||||
|
|
||||||
3. selfhostでも動くこと。これはすでにpatchで実現しています。
|
https://raw.githubusercontent.com/bluesky-social/social-app/refs/heads/main/LICENSE
|
||||||
|
|
||||||
|
|||||||
@@ -78,11 +78,11 @@ function cleanup_build {
|
|||||||
|
|
||||||
# 3. CocoaPods
|
# 3. CocoaPods
|
||||||
echo "3. Installing CocoaPods..."
|
echo "3. Installing CocoaPods..."
|
||||||
# Ensure PATH includes Homebrew ruby gems if needed
|
if [ -z "$1" ];then
|
||||||
export PATH="/opt/homebrew/lib/ruby/gems/3.4.0/bin:$PATH"
|
cd ios
|
||||||
cd ios
|
pod install
|
||||||
pod install
|
cd ..
|
||||||
cd ..
|
fi
|
||||||
|
|
||||||
# 4. Signing (Automated)
|
# 4. Signing (Automated)
|
||||||
echo "4. Configuring Xcode Signing..."
|
echo "4. Configuring Xcode Signing..."
|
||||||
@@ -132,6 +132,9 @@ EOF
|
|||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
i)
|
i)
|
||||||
|
echo "Skipping cleanup_build..."
|
||||||
|
;;
|
||||||
|
*)
|
||||||
cleanup_build
|
cleanup_build
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -167,8 +170,15 @@ cp -R ${APP_NAME}.xcarchive/Products/Applications/${APP_NAME}.app Payload/
|
|||||||
# store.mobileprovisionの存在確認とコピー
|
# store.mobileprovisionの存在確認とコピー
|
||||||
# https://developer.apple.com/account/resources/profiles/list
|
# https://developer.apple.com/account/resources/profiles/list
|
||||||
if [ ! -f "$MOBILEPROVISION" ]; then
|
if [ ! -f "$MOBILEPROVISION" ]; then
|
||||||
echo "Error: store.mobileprovision not found at $MOBILEPROVISION"
|
# 親ディレクトリからコピーを試みる
|
||||||
exit 1
|
PARENT_MOBILEPROVISION="$SCRIPT_DIR/../embedded.mobileprovision"
|
||||||
|
if [ -f "$PARENT_MOBILEPROVISION" ]; then
|
||||||
|
echo "Copying mobileprovision from $PARENT_MOBILEPROVISION to $MOBILEPROVISION"
|
||||||
|
cp "$PARENT_MOBILEPROVISION" "$MOBILEPROVISION"
|
||||||
|
else
|
||||||
|
echo "Error: store.mobileprovision not found at $MOBILEPROVISION or $PARENT_MOBILEPROVISION"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cp "$MOBILEPROVISION" Payload/${APP_NAME}.app/embedded.mobileprovision
|
cp "$MOBILEPROVISION" Payload/${APP_NAME}.app/embedded.mobileprovision
|
||||||
|
|||||||
@@ -70,8 +70,6 @@ npx expo prebuild --platform ios --clean
|
|||||||
|
|
||||||
# 3. CocoaPods
|
# 3. CocoaPods
|
||||||
echo "3. Installing CocoaPods..."
|
echo "3. Installing CocoaPods..."
|
||||||
# Ensure PATH includes Homebrew ruby gems if needed
|
|
||||||
export PATH="/opt/homebrew/lib/ruby/gems/3.4.0/bin:$PATH"
|
|
||||||
cd ios
|
cd ios
|
||||||
pod install
|
pod install
|
||||||
cd ..
|
cd ..
|
||||||
|
|||||||
133
patching/210-pds-subscriberepos-no-auth.patch
Normal file
133
patching/210-pds-subscriberepos-no-auth.patch
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
diff --git a/packages/pds/src/api/com/atproto/sync/subscribeRepos.ts b/packages/pds/src/api/com/atproto/sync/subscribeRepos.ts
|
||||||
|
index c2418d343..f81789df0 100644
|
||||||
|
--- a/packages/pds/src/api/com/atproto/sync/subscribeRepos.ts
|
||||||
|
+++ b/packages/pds/src/api/com/atproto/sync/subscribeRepos.ts
|
||||||
|
@@ -5,68 +5,71 @@ import { httpLogger } from '../../../../logger'
|
||||||
|
import { Outbox } from '../../../../sequencer/outbox'
|
||||||
|
|
||||||
|
export default function (server: Server, ctx: AppContext) {
|
||||||
|
- server.com.atproto.sync.subscribeRepos(async function* ({ params, signal }) {
|
||||||
|
- const { cursor } = params
|
||||||
|
- const outbox = new Outbox(ctx.sequencer, {
|
||||||
|
- maxBufferSize: ctx.cfg.subscription.maxBuffer,
|
||||||
|
- })
|
||||||
|
- httpLogger.info({ cursor }, 'request to com.atproto.sync.subscribeRepos')
|
||||||
|
+ server.com.atproto.sync.subscribeRepos({
|
||||||
|
+ auth: undefined,
|
||||||
|
+ handler: async function* ({ params, signal }) {
|
||||||
|
+ const { cursor } = params
|
||||||
|
+ const outbox = new Outbox(ctx.sequencer, {
|
||||||
|
+ maxBufferSize: ctx.cfg.subscription.maxBuffer,
|
||||||
|
+ })
|
||||||
|
+ httpLogger.info({ cursor }, 'request to com.atproto.sync.subscribeRepos')
|
||||||
|
|
||||||
|
- const backfillTime = new Date(
|
||||||
|
- Date.now() - ctx.cfg.subscription.repoBackfillLimitMs,
|
||||||
|
- ).toISOString()
|
||||||
|
- let outboxCursor: number | undefined = undefined
|
||||||
|
- if (cursor !== undefined) {
|
||||||
|
- const [next, curr] = await Promise.all([
|
||||||
|
- ctx.sequencer.next(cursor),
|
||||||
|
- ctx.sequencer.curr(),
|
||||||
|
- ])
|
||||||
|
- if (cursor > (curr ?? 0)) {
|
||||||
|
- throw new InvalidRequestError('Cursor in the future.', 'FutureCursor')
|
||||||
|
- } else if (next && next.sequencedAt < backfillTime) {
|
||||||
|
- // if cursor is before backfill time, find earliest cursor from backfill window
|
||||||
|
- yield {
|
||||||
|
- $type: '#info',
|
||||||
|
- name: 'OutdatedCursor',
|
||||||
|
- message: 'Requested cursor exceeded limit. Possibly missing events',
|
||||||
|
+ const backfillTime = new Date(
|
||||||
|
+ Date.now() - ctx.cfg.subscription.repoBackfillLimitMs,
|
||||||
|
+ ).toISOString()
|
||||||
|
+ let outboxCursor: number | undefined = undefined
|
||||||
|
+ if (cursor !== undefined) {
|
||||||
|
+ const [next, curr] = await Promise.all([
|
||||||
|
+ ctx.sequencer.next(cursor),
|
||||||
|
+ ctx.sequencer.curr(),
|
||||||
|
+ ])
|
||||||
|
+ if (cursor > (curr ?? 0)) {
|
||||||
|
+ throw new InvalidRequestError('Cursor in the future.', 'FutureCursor')
|
||||||
|
+ } else if (next && next.sequencedAt < backfillTime) {
|
||||||
|
+ // if cursor is before backfill time, find earliest cursor from backfill window
|
||||||
|
+ yield {
|
||||||
|
+ $type: '#info',
|
||||||
|
+ name: 'OutdatedCursor',
|
||||||
|
+ message: 'Requested cursor exceeded limit. Possibly missing events',
|
||||||
|
+ }
|
||||||
|
+ const startEvt = await ctx.sequencer.earliestAfterTime(backfillTime)
|
||||||
|
+ outboxCursor = startEvt?.seq ? startEvt.seq - 1 : undefined
|
||||||
|
+ } else {
|
||||||
|
+ outboxCursor = cursor
|
||||||
|
}
|
||||||
|
- const startEvt = await ctx.sequencer.earliestAfterTime(backfillTime)
|
||||||
|
- outboxCursor = startEvt?.seq ? startEvt.seq - 1 : undefined
|
||||||
|
- } else {
|
||||||
|
- outboxCursor = cursor
|
||||||
|
}
|
||||||
|
- }
|
||||||
|
|
||||||
|
- for await (const evt of outbox.events(outboxCursor, signal)) {
|
||||||
|
- if (evt.type === 'commit') {
|
||||||
|
- yield {
|
||||||
|
- $type: '#commit',
|
||||||
|
- seq: evt.seq,
|
||||||
|
- time: evt.time,
|
||||||
|
- ...evt.evt,
|
||||||
|
- }
|
||||||
|
- } else if (evt.type === 'sync') {
|
||||||
|
- yield {
|
||||||
|
- $type: '#sync',
|
||||||
|
- seq: evt.seq,
|
||||||
|
- time: evt.time,
|
||||||
|
- ...evt.evt,
|
||||||
|
- }
|
||||||
|
- } else if (evt.type === 'identity') {
|
||||||
|
- yield {
|
||||||
|
- $type: '#identity',
|
||||||
|
- seq: evt.seq,
|
||||||
|
- time: evt.time,
|
||||||
|
- ...evt.evt,
|
||||||
|
- }
|
||||||
|
- } else if (evt.type === 'account') {
|
||||||
|
- yield {
|
||||||
|
- $type: '#account',
|
||||||
|
- seq: evt.seq,
|
||||||
|
- time: evt.time,
|
||||||
|
- ...evt.evt,
|
||||||
|
+ for await (const evt of outbox.events(outboxCursor, signal)) {
|
||||||
|
+ if (evt.type === 'commit') {
|
||||||
|
+ yield {
|
||||||
|
+ $type: '#commit',
|
||||||
|
+ seq: evt.seq,
|
||||||
|
+ time: evt.time,
|
||||||
|
+ ...evt.evt,
|
||||||
|
+ }
|
||||||
|
+ } else if (evt.type === 'sync') {
|
||||||
|
+ yield {
|
||||||
|
+ $type: '#sync',
|
||||||
|
+ seq: evt.seq,
|
||||||
|
+ time: evt.time,
|
||||||
|
+ ...evt.evt,
|
||||||
|
+ }
|
||||||
|
+ } else if (evt.type === 'identity') {
|
||||||
|
+ yield {
|
||||||
|
+ $type: '#identity',
|
||||||
|
+ seq: evt.seq,
|
||||||
|
+ time: evt.time,
|
||||||
|
+ ...evt.evt,
|
||||||
|
+ }
|
||||||
|
+ } else if (evt.type === 'account') {
|
||||||
|
+ yield {
|
||||||
|
+ $type: '#account',
|
||||||
|
+ seq: evt.seq,
|
||||||
|
+ time: evt.time,
|
||||||
|
+ ...evt.evt,
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- }
|
||||||
|
+ },
|
||||||
|
})
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user