feat: Support seeding pods and accounts

* feat(seeding): seed accounts and pods with seeded-pod-config.json

* feat(seeding): dry up SeededPodInitializer by using RegistrationManager directly and make compatible with version/3.0.0

* feat(seeding): update seed config files to version 3.0.0 context

* feat(seeding): simplify seeded-root config by importing pre-existing prefilled-root config

* feat(seeding): Add seeding as a default initializer, update seeded pod copy and guide, change seeded pod config to array

* feat(seeding): remove template info from seeded pod guide, use mockFs, code style nit, fix redlock test

* feat(seeding): remove old config file
This commit is contained in:
Adler Faulkner
2022-03-10 01:16:05 -08:00
committed by GitHub
parent 44dd56d4f6
commit c8d4bfec39
19 changed files with 192 additions and 6 deletions

20
guides/seeding-pods.md Normal file
View File

@@ -0,0 +1,20 @@
# How to seed Accounts and Pods
If you need to seed accounts and pods, set the `--seededPodConfigJson` option to a file such as `./seeded-pod-config.json` to set your desired accounts and pods. The contents of `./seeded-pod-config.json` (or whatever file name you choose) should be a JSON array whose entries are objects which include
`podName`, `email`, and `password`. For example:
```json
[
{
"podName": "example",
"email": "hello@example.com",
"password": "abc123"
}
]
```
You may optionally specify other parameters accepted by the `register` method of [RegistrationManager](https://github.com/solid/community-server/blob/3b353affb1f0919fdcb66172364234eb59c2e3f6/src/identity/interaction/email-password/util/RegistrationManager.ts#L173). For example:
To use a pre-existing wedId:
```json
createWebId: false,
webId: "https://pod.inrupt.com/example/profile/card#me"
```