Skip to content

Commit

Permalink
[Fix] Format Everything (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevensJourney authored Feb 12, 2024
1 parent 417893d commit c18edd6
Show file tree
Hide file tree
Showing 27 changed files with 6,912 additions and 4,250 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
node-version-file: '.nvmrc'

- uses: pnpm/action-setup@v2
name: Install pnpm
Expand All @@ -27,7 +27,7 @@ jobs:
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ name: Deploy docs to GitHub Pages

on:
push:
branches: ["docs", "main"]
branches: ['docs', 'main']

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
group: 'pages'
cancel-in-progress: false

jobs:
Expand All @@ -31,7 +31,7 @@ jobs:
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
node-version-file: '.nvmrc'
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
Expand All @@ -40,7 +40,7 @@ jobs:
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dev-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
node-version-file: '.nvmrc'
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
Expand All @@ -26,7 +26,7 @@ jobs:
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
node-version-file: '.nvmrc'
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
Expand All @@ -26,7 +26,7 @@ jobs:
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,19 @@ PowerSync is a service and set of SDKs that keeps Postgres databases in sync wit
## Monorepo Structure: Packages

- [packages/powersync-sdk-react-native](./packages/powersync-sdk-react-native/README.md)

- React Native SDK implementation (extension of `packages/powersync-sdk-common`)

- [packages/powersync-sdk-web](./packages/powersync-sdk-web/README.md)

- JS Web SDK implementation (extension of `packages/powersync-sdk-common`)

- [packages/powersync-react](./packages/powersync-react/README.md)

- React integration for PowerSync.

- [packages/powersync-attachments](./packages/powersync-attachments/README.md)

- Attachments helper package for React Native.

- [packages/powersync-sdk-common](./packages/powersync-sdk-common/README.md)
Expand Down
2 changes: 1 addition & 1 deletion demos/example-vite/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ To see it in action:

1. Make sure to run `pnpm build:packages` in the root directory of this Git repo.
2. `pnpm start`
3. Open the localhost URL in the browser displayed in the terminal output.
3. Open the localhost URL in the browser displayed in the terminal output.
14 changes: 8 additions & 6 deletions demos/example-vite/src/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<script type="module" src="./index.js"></script>
</head>
<body>Vite bundling test: Check the console to see it in action!</body>
</html>
<head>
<script type="module" src="./index.js"></script>
</head>
<body>
Vite bundling test: Check the console to see it in action!
</body>
</html>
2 changes: 1 addition & 1 deletion demos/example-webpack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ To see it in action:

1. Make sure to run `pnpm build:packages` in the root directory of this Git repo.
2. `pnpm start`
3. Open the localhost URL in the browser displayed in the terminal output.
3. Open the localhost URL in the browser displayed in the terminal output.
8 changes: 4 additions & 4 deletions demos/example-webpack/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<html>

<body>Webpack bundling test: Check the console to see it in action!</body>

</html>
<body>
Webpack bundling test: Check the console to see it in action!
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ export const CameraWidget: React.FC<Props> = (props) => {
style={{ ...styles.camera, height: height, width: '100%' }}
type={CameraType.back}
onCameraReady={onReady}
ratio={isAndroid ? '16:9' : undefined}>
ratio={isAndroid ? '16:9' : undefined}
>
<TouchableOpacity onPress={props.onClose} style={styles.backButton}>
<Icon name={'chevron-left'} type={'font-awesome'} color={'white'} />
</TouchableOpacity>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ export const ListItemWidget: React.FC<ListItemWidgetProps> = (props) => {
);
}}
/>
}>
}
>
<Icon name="format-list-checks" type="material-community" color="grey" />
<ListItem.Content style={{ minHeight: 80 }}>
<ListItem.Title>{title}</ListItem.Title>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ export const TodoItemWidget: React.FC<TodoItemWidgetProps> = (props) => {
);
}}
/>
}>
}
>
{loading ? (
<ActivityIndicator />
) : (
Expand Down
4 changes: 2 additions & 2 deletions demos/yjs-nextjs-supabase-text-collab/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "next/core-web-vitals"
}
"extends": "next/core-web-vitals"
}
8 changes: 4 additions & 4 deletions demos/yjs-nextjs-supabase-text-collab/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ cp .env.local.template .env.local
```

2. Edit `.env.local` and populate the relevant values:
- Set `SUPABASE_URL` to your Supabase project URL. You can find this by going to the main page for the project on the Supabase dashboard and then look for "Project URL" in the "Project API" panel.
- Set `SUPABASE_ANON_KEY` to your Supabase API key. This can be found right below the Project URL on the Supabase dashboard.
- Set `POWERSYNC_URL` to your PowerSync instance URL (this is the same URL from step 5)
- Set `SUPABASE_URL` to your Supabase project URL. You can find this by going to the main page for the project on the Supabase dashboard and then look for "Project URL" in the "Project API" panel.
- Set `SUPABASE_ANON_KEY` to your Supabase API key. This can be found right below the Project URL on the Supabase dashboard.
- Set `POWERSYNC_URL` to your PowerSync instance URL (this is the same URL from step 5)

### 8. Run the demo app

Expand Down Expand Up @@ -130,7 +130,7 @@ To-do
- [ ] Add user sessions. For ease of demoing, still allow anonymously signing in (perhaps using [this Supabase workaround](https://github.com/supabase/gotrue/issues/68)), but keep track of session data so that each user has a unique `user_id` which we can associate with edits to the document.
- [ ] Improve sync rules: Use a many-to-many relationship between users and documents, so that all documents and their updates are not synced to all users. Dependent on user sessions.
- [ ] Add suggested RLS rules for Supabase. Dependent on user sessions.
- [ ] Add live cursor support; allow user to set their name, prepopulate with auto-generated name if none set. Dependent on user sessions.
- [ ] Add live cursor support; allow user to set their name, prepopulate with auto-generated name if none set. Dependent on user sessions.
- [ ] Show PowerSync connection status; allow user to toggle offline/online for testing purposes
- [ ] Add button to the UI allowing the user to merge the Yjs edits i.e. `document_update` rows. Invoke `merge-document-updates` edge function in Supabase.
- [ ] Prepopulate sample text into newly created documents.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
padding: 0 1rem;
}

p{
p {
margin: 0;
}

Expand All @@ -36,7 +36,7 @@
background: #0d0d0d;
border-radius: 0.5rem;
color: #fff;
font-family: "JetBrainsMono", monospace;
font-family: 'JetBrainsMono', monospace;
padding: 0.75rem 1rem;

code {
Expand Down Expand Up @@ -71,7 +71,7 @@
margin: 2rem 0;
}

ul[data-type="taskList"] {
ul[data-type='taskList'] {
list-style: none;
padding: 0;

Expand Down Expand Up @@ -100,7 +100,6 @@
flex-direction: column;
max-height: 26rem;


&__header {
align-items: center;
background: #0d0d0d;
Expand Down Expand Up @@ -143,7 +142,7 @@
&::before {
background: rgba(#0d0d0d, 0.5);
border-radius: 50%;
content: " ";
content: ' ';
display: inline-block;
flex: 0 0 auto;
height: 0.5rem;
Expand Down
2 changes: 1 addition & 1 deletion demos/yjs-nextjs-supabase-text-collab/src/app/globals.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ body {
margin: 0;
background: var(--background-rgb);
font-family: Lato !important;
font-weight: 400 !important;;
font-weight: 400 !important;
}
1 change: 0 additions & 1 deletion demos/yjs-nextjs-supabase-text-collab/sync-rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ bucket_definitions:
data:
- SELECT * FROM documents
- SELECT id, document_id, base64(update_data) as update_b64 FROM document_updates

4 changes: 1 addition & 3 deletions demos/yjs-nextjs-supabase-text-collab/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,5 @@
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules", "supabase/functions/**/*.ts"],
"references": [
{"path": "../../packages/powersync-sdk-web"}
]
"references": [{ "path": "../../packages/powersync-sdk-web" }]
}
Loading

0 comments on commit c18edd6

Please sign in to comment.