Skip to content

Commit

Permalink
big nasty merge
Browse files Browse the repository at this point in the history
  • Loading branch information
dholms committed Sep 14, 2023
2 parents c8f1d2e + 3877210 commit a17a589
Show file tree
Hide file tree
Showing 1,090 changed files with 57,909 additions and 25,687 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "bluesky-social/atproto" }],
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
6 changes: 6 additions & 0 deletions .changeset/seven-schools-switch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@atproto/api': patch
---

Adds a new method `app.bsky.graph.getSuggestedFollowsByActor`. This method
returns suggested follows for a given actor based on their likes and follows.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
packages/api/src/client
packages/bsky/src/lexicon
packages/pds/src/lexicon
8 changes: 6 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"plugin:prettier/recommended",
"prettier"
],
"ignorePatterns":[
"ignorePatterns": [
"dist",
"node_modules",
"jest.config.base.js",
Expand All @@ -26,7 +26,11 @@
"rules": {
"no-var": "error",
"prefer-const": "warn",
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
"no-misleading-character-class": "warn",
"@typescript-eslint/no-unused-vars": [
"warn",
{ "argsIgnorePattern": "^_" }
],
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**

<!-- A clear and concise description of what the bug is. -->

**To Reproduce**
Expand All @@ -22,8 +22,8 @@ Steps to reproduce the behavior:

**Details**

- Operating system:
- Node version:
- Operating system:
- Node version:

**Additional context**

Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ about: Suggest an idea for this project
title: ''
labels: feature-request
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build-and-push-bsky-aws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ env:

jobs:
bsky-container-aws:
if: github.repository == 'bluesky-social/atproto'
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down Expand Up @@ -47,7 +48,7 @@ jobs:
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
file: ./packages/bsky/Dockerfile
file: ./services/bsky/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build-and-push-bsky-ghcr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ env:

jobs:
bsky-container-ghcr:
if: github.repository == 'bluesky-social/atproto'
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down Expand Up @@ -49,7 +50,7 @@ jobs:
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
file: ./packages/bsky/Dockerfile
file: ./services/bsky/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build-and-push-pds-aws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ env:

jobs:
pds-container-aws:
if: github.repository == 'bluesky-social/atproto'
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down Expand Up @@ -46,7 +47,7 @@ jobs:
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
file: ./packages/pds/Dockerfile
file: ./services/pds/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build-and-push-pds-ghcr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ env:

jobs:
pds-container-ghcr:
if: github.repository == 'bluesky-social/atproto'
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down Expand Up @@ -48,7 +49,7 @@ jobs:
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
file: ./packages/pds/Dockerfile
file: ./services/pds/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish

on:
push:
branches:
- main

env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
build:
name: Build & Publish
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'
- run: pnpm i --frozen-lockfile
- run: pnpm verify
- name: Publish
id: changesets
uses: changesets/action@v1
with:
publish: pnpm release
version: pnpm version-packages
commit: 'Version packages'
title: 'Version packages'
40 changes: 27 additions & 13 deletions .github/workflows/repo.yaml
Original file line number Diff line number Diff line change
@@ -1,43 +1,57 @@
name: repo
name: Test

on:
pull_request:
push:
branches:
- main
- '*'

concurrency:
group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
- run: yarn install --frozen-lockfile
- run: yarn build
cache: 'pnpm'
- run: pnpm i --frozen-lockfile
- run: pnpm build
test:
name: Test
strategy:
matrix:
shard: [1/4, 2/4, 3/4, 4/4]
shard: [1/8, 2/8, 3/8, 4/8, 5/8, 6/8, 7/8, 8/8]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
- run: yarn install --frozen-lockfile
- run: yarn test:withFlags --maxWorkers=2 --shard=${{ matrix.shard }} --passWithNoTests
cache: 'pnpm'
- run: pnpm i --frozen-lockfile
- run: pnpm test:withFlags --maxWorkers=1 --shard=${{ matrix.shard }} --passWithNoTests
verify:
name: Verify
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
- run: yarn install --frozen-lockfile
- run: yarn verify
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm verify
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
enable-pre-post-scripts = true
10 changes: 10 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
node_modules
interop-test-files
dist
build
.nyc_output
coverage
pnpm-lock.yaml
.pnpm*
.changeset
*.d.ts
2 changes: 1 addition & 1 deletion CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ ATProto receives so many contributions that we could never list everyone who des

#### [TowhidKashem](https://github.com/TowhidKashem), Security disclosure, May 2023

#### [DavidBuchanan314](https://github.com/DavidBuchanan314), Security disclosure, May 2023
#### [DavidBuchanan314](https://github.com/DavidBuchanan314), Security disclosure, May 2023
28 changes: 14 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,46 +12,46 @@ help: ## Print info about all commands

.PHONY: build
build: ## Compile all modules
yarn build
pnpm build

.PHONY: test
test: ## Run all tests
yarn test
pnpm test

.PHONY: run-dev-env
run-dev-env: ## Run a "development environment" shell
cd packages/dev-env; yarn run start
cd packages/dev-env; pnpm run start

.PHONY: run-dev-pds
run-dev-pds: ## Run PDS locally
if [ ! -f "packages/pds/.dev.env" ]; then cp packages/pds/example.dev.env packages/pds/.dev.env; fi
cd packages/pds; ENV=dev yarn run start | yarn exec pino-pretty
cd packages/pds; ENV=dev pnpm run start | pnpm exec pino-pretty

.PHONY: run-dev-bsky
run-dev-bsky: ## Run appview ('bsky') locally
if [ ! -f "packages/bsky/.dev.env" ]; then cp packages/bsky/example.dev.env packages/bsky/.dev.env; fi
cd packages/bsky; ENV=dev yarn run start | yarn exec pino-pretty
cd packages/bsky; ENV=dev pnpm run start | pnpm exec pino-pretty

.PHONY: codegen
codegen: ## Re-generate packages from lexicon/ files
cd packages/api; yarn run codegen
cd packages/pds; yarn run codegen
cd packages/bsky; yarn run codegen
cd packages/api; pnpm run codegen
cd packages/pds; pnpm run codegen
cd packages/bsky; pnpm run codegen

.PHONY: lint
lint: ## Run style checks and verify syntax
yarn verify
pnpm verify

.PHONY: fmt
fmt: ## Run syntax re-formatting
yarn prettier
pnpm format

.PHONY: deps
deps: ## Installs dependent libs using 'yarn install'
yarn install --frozen-lockfile
deps: ## Installs dependent libs using 'pnpm install'
pnpm install --frozen-lockfile

.PHONY: nvm-setup
nvm-setup: ## Use NVM to install and activate node+yarn
nvm-setup: ## Use NVM to install and activate node+pnpm
nvm install 18
nvm use 18
npm install --global yarn
npm install --global pnpm
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# AT Protocol (Authenticated Transfer Protocol)

This is a working repository for the "AT Protocol," aka the Authenticated Transfer Protocol.
This is a working repository for the AT Protocol, aka the Authenticated Transfer Protocol.

---

Expand All @@ -10,7 +10,7 @@ This is a working repository for the "AT Protocol," aka the Authenticated Transf

## ℹ️ About this project

To learn more about ATP, see:
To learn more about atproto, see:

- [Protocol Documentation](https://atproto.com/docs)
- [Overview Guide](https://atproto.com/guides/overview) 👈 Good place to start
Expand All @@ -31,7 +31,7 @@ While we do accept contributions, we prioritize high-quality issues and pull req
- Check for existing issues before filing a new one, please.
- Open an issue and give some time for discussion before submitting a PR.
- If submitting a PR that includes a lexicon change, please get sign off on the lexicon change _before_ doing the implementation.
- Issues are for bugs & feature requests related to the Typescript implementation of atproto and related services. For high-level discussions, please you the [Discussion Forum](https://github.com/bluesky-social/atproto/discussions). For client issues, please use the relevant [social-app](https://github.com/bluesky-social/social-app) repo
- Issues are for bugs & feature requests related to the TypeScript implementation of atproto and related services. For high-level discussions, please you the [Discussion Forum](https://github.com/bluesky-social/atproto/discussions). For client issues, please use the relevant [social-app](https://github.com/bluesky-social/social-app) repo
- Stay away from PRs that:
- Refactor large parts of the codebase
- Add entirely new features without prior discussion
Expand All @@ -40,6 +40,12 @@ While we do accept contributions, we prioritize high-quality issues and pull req

Remember, we serve a wide community of users. Our day-to-day involves us constantly asking "which top priority is our top priority." If you submit well-written PRs that solve problems concisely, that's an awesome contribution. Otherwise, as much as we'd love to accept your ideas and contributions, we really don't have the bandwidth.

## Are you a developer interested in building on atproto?

Bluesky is an open social network built on the AT Protocol, a flexible technology that will never lock developers out of the ecosystems that they help build. With atproto, third-party can be as seamless as first-party through custom feeds, federated services, clients, and more.

If you're a developer interested in building on atproto, we'd love to email you a Bluesky invite code. Simply share your GitHub (or similar) profile with us via [this form](https://forms.gle/BF21oxVNZiDjDhXF9).

## Security disclosures

If you discover any security issues, please send an email to [email protected]. The email is automatically CCed to the entire team, and we'll respond promptly. See [SECURITY.md](https://github.com/bluesky-social/atproto/blob/main/SECURITY.md) for more info.
Expand Down
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

## Reporting a Vulnerability

Please do NOT report possible security vulnerabilities in public channels such as GitHub Issues. If you believe you have found a security vulnerability, please email us at `[email protected]` with a description of the issue.
Please do NOT report possible security vulnerabilities in public channels such as GitHub Issues. If you believe you have found a security vulnerability, please email us at `[email protected]` with a description of the issue.

We will acknowledge the vulnerability as soon as possible - within 3 business days - and follow up when a fix lands. Please avoid discussing the vulnerability until we do so.

With your consent, we will add you to the repository [CONTRIBUTORS](https://github.com/bluesky-social/atproto/blob/main/CONTRIBUTORS.md) file.
With your consent, we will add you to the repository [CONTRIBUTORS](https://github.com/bluesky-social/atproto/blob/main/CONTRIBUTORS.md) file.
Loading

0 comments on commit a17a589

Please sign in to comment.