Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Solid support #1319

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
fa80bb4
Developing Solid storage
yasharpm Oct 24, 2023
3a7eb40
Documentation for Solid
yasharpm Nov 2, 2023
3abd9a1
Refactored Solid provider specification
yasharpm Nov 2, 2023
128728e
Login process completed. Next it choosing a pod
yasharpm Dec 19, 2023
710d302
Login done (without error handling)
yasharpm Mar 4, 2024
c1b14bc
Fixed state management between rs and inrupt
yasharpm Apr 30, 2024
aea6948
Get, Put, Delete implemented
yasharpm Jun 27, 2024
2294ae5
Kickstart workflows!
yasharpm Jul 15, 2024
3b3d4f9
Kickstart workflows
yasharpm Jul 15, 2024
2a7f9fe
add: workflow dispatch for test-and-lint.yml
MahdiBaghbani Jul 15, 2024
9fe0db1
Clean up
yasharpm Jul 17, 2024
6075b69
Merge branch 'master' of https://github.com/pondersource/remotestorag…
yasharpm Jul 17, 2024
818f0ce
Merged with upstream
yasharpm Jul 20, 2024
555b565
Merge branch 'master' of https://github.com/remotestorage/remotestora…
yasharpm Jul 20, 2024
4a55b71
Base tests for solid
yasharpm Aug 5, 2024
07bcf1c
Tests done for solid backend
yasharpm Aug 11, 2024
8facb19
Fixed lint issues
yasharpm Aug 15, 2024
c11defb
Fixed TODOs
yasharpm Aug 21, 2024
495baab
merged with upstream
yasharpm Aug 22, 2024
8273b92
Added code documentation
yasharpm Aug 23, 2024
e6e92e0
Updated readme
yasharpm Aug 23, 2024
ba000bc
Updated docs
yasharpm Aug 29, 2024
e813dbb
Merge branch 'master' of https://github.com/remotestorage/remotestora…
yasharpm Aug 29, 2024
afdfcf9
Updated documentation
yasharpm Aug 30, 2024
f6a95f6
Mocha tests for Solid backend
yasharpm Sep 2, 2024
04c5720
Merge branch 'master' into HEAD
michielbdejong Dec 11, 2024
5f168a8
Allow 'solid' as a value for backendType
michielbdejong Dec 11, 2024
869a0f7
Resolve peer dependency version mismatch for typedoc, fix alphabetic …
michielbdejong Dec 11, 2024
89f1655
npm install ; npm run build:release
michielbdejong Dec 11, 2024
bfa89a1
Console.log statements; this.getPodURLs() might be null
michielbdejong Dec 12, 2024
c15323f
getPodURLs may return null
michielbdejong Dec 12, 2024
7972cc9
Use mtime as ETag; convert response Blob to text
michielbdejong Dec 12, 2024
fb82cd4
remove console.log statements
michielbdejong Dec 12, 2024
fbc3bfc
npm run build:release
michielbdejong Dec 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/test-and-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
branches: [ master, stable ]
pull_request:
branches: [ master, stable ]
# Allows you to run this workflow manually from the Actions tab.
workflow_dispatch:

jobs:
build:
name: node.js
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
remoteStorage.js is a JavaScript library for storing user data locally in the
browser, as well as connecting to [remoteStorage](http://remotestorage.io)
servers and syncing data across devices and applications. It is also capable of
connecting and syncing data with a person's Dropbox or Google Drive account
(optional).
connecting and syncing data with a person's Dropbox, Google Drive or Solid
account (optional).

The library is well-tested and actively maintained. It is safe to use in
production.
Expand Down
2 changes: 1 addition & 1 deletion docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default defineConfig({
{ text: 'Usage with Node.js', link: '/nodejs' },
{ text: 'Usage in Cordova apps', link: '/cordova' },
{ text: 'Usage with TypeScript', link: '/typescript' },
{ text: 'Dropbox and Google Drive', link: '/dropbox-and-google-drive' },
{ text: 'Dropbox, Google Drive and Solid', link: '/dropbox-googledrive-solid' },
]
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Offering Dropbox and Google Drive storage options
# Offering Dropbox, Google Drive, and Solid storage options

![Screenshot of the connect-widget choose-backend screen](./images/screenshot-widget-choose.png){width="50%"}

rs.js has optional support for syncing data with Dropbox and Google
Drive instead of a RemoteStorage server.
rs.js has optional support for syncing data with Dropbox, Google
Drive, and Solid instead of a RemoteStorage server.

There are a few drawbacks, mostly sync performance and the lack of a
permission model. So apps can usually access all of a user's storage
Expand All @@ -29,6 +29,23 @@ only the available storage options, based on the presence of the Dropbox and
Google Drive API keys. RemoteStorage is always enabled.
:::

For the Solid backend you have to specify the available authentication URLs
for the user to choose from on the connect widget's configurations. Once
configured, it will also show Solid as an available storage option. Like so:

```js
const config = {
solidProviders: {
providers: [
Widget.SOLID_COMMUNITY,
Widget.INRUPT
],
allowAnyProvider: true
}
};
const widget = new Widget(remoteStorage, config);
```

## Dropbox

An app key can be obtained by [registering your
Expand Down Expand Up @@ -75,3 +92,23 @@ Console](https://console.developers.google.com/flows/enableapi?apiid=drive).

- Sharing public files is not supported yet (see issue 1051)
- `getItemURL` is not implemented yet (see issue 1054)

## Solid

An authentication URL must always have been set on the Solid backend before
calling `connect()`. You can do so by calling `setAuthURL()` first.

The connect widget accepts a list of authentication URLs as configuration
and automatically sets it on the Solid backend when selected.

Each option consists of two keys: `authURL` which is the authentication URL
to connect to. And a `name` to be displayed on the widget. The
`allowAnyProvider` option if set to `true`, adds an input box to the widget
to allow the user to type any authentication URL of their choosing.

::: info
The Solid backend exposes the connected session. It is the `Session` object
from the [Inrupt](https://docs.inrupt.com/developer-tools/javascript/client-libraries/)
Solid library. It can be accessed by calling `remoteStorage.solid.getSession()`
only after the backend is connected.
:::
Binary file modified docs/images/screenshot-widget-choose.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Welcome to the remoteStorage.js documentation!
remoteStorage.js is a JavaScript/TypeScript library for storing user data
locally in the browser, as well as connecting to [remoteStorage](/) servers and
syncing data across devices and applications. It is also capable of connecting
and syncing data with a person\'s Dropbox or Google Drive account (optional).
and syncing data with a person\'s Dropbox, Google Drive, or Solid account (optional).

> [!NOTE]
> For brevity\'s sake, we will also use the short name **rs.js** across these docs.
Expand Down
6 changes: 3 additions & 3 deletions docs/why.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ critical bug, there\'s a team of people who will help with fixing it.

## One JS API for multiple storage options

rs.js optionally supports Dropbox and Google Drive as storage backends which
users can connect. Conveniently, as an app developer you don\'t have to
rs.js optionally supports Dropbox, Google Drive and Solid as storage backends
which users can connect. Conveniently, as an app developer you don\'t have to
implement anything special in order for these backends to work with your code.
Just [configure OAuth app keys](./dropbox-and-google-drive), and
Just [configure OAuth app keys](./dropbox-googledrive-solid), and
your users can choose between 3 different backends to connect. If you're not
using the [connect widget](./getting-started/connect-widget), you may need to
create additional UI for these alternate backends.
Loading