diff --git a/README.md b/README.md index 89f1d950..6caf2f37 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,23 @@ name of the current branch from which the preview is run. Modifications can be made to the docs while the dev server is running, and the preview will live-reload. +#### Mermaid image generation + +```shell +pnpm run mermaid +``` + +This command generates svg images from [Mermaid](https://github.com/mermaid-js/mermaid) code. + +Mermaid code should be stored in `docs/_mermaid/` with their path being relative to the markdown files where the diagrams are used. + +The images are generated in `docs/_mermaid/_images/` in their respective relative paths, from where they can be referenced. The mermaid generator generates .svg out of [mermaid].md files. The generated .svg get a -[n].svg postfix, more than one diagram can be described in one [mermaid].md file. + +Example: + +- [docs/\_mermaid/developer/adr/adr-how-to-trigger-activities.md](docs/_mermaid/developer/adr/adr-how-to-trigger-activities.md) generates +- [docs/\_mermaid/\_images/developer/adr/adr-how-to-trigger-activities-_n_.svg](docs/_mermaid/_images/developer/adr/) + #### Linting and formatting We use two linters to check that all content is formatted in a consistent way. diff --git a/docs/_mermaid/_images/developer/adr/adr-how-to-trigger-activities-1.svg b/docs/_mermaid/_images/developer/adr/adr-how-to-trigger-activities-1.svg new file mode 100644 index 00000000..10d395f7 --- /dev/null +++ b/docs/_mermaid/_images/developer/adr/adr-how-to-trigger-activities-1.svg @@ -0,0 +1 @@ +Press Star on UIUserA: repository - follow C by incidentB: follow AC: follow B \ No newline at end of file diff --git a/docs/_mermaid/_images/developer/adr/adr-how-to-trigger-activities-2.svg b/docs/_mermaid/_images/developer/adr/adr-how-to-trigger-activities-2.svg new file mode 100644 index 00000000..720c0d69 --- /dev/null +++ b/docs/_mermaid/_images/developer/adr/adr-how-to-trigger-activities-2.svg @@ -0,0 +1 @@ +Press Star on UIfederate Like Activityfederate Like Activityfederate Like ActivityUserA: repository - follow C by incidentB: follow AC: follow B \ No newline at end of file diff --git a/docs/_mermaid/_images/developer/adr/adr-how-to-trigger-activities-3.svg b/docs/_mermaid/_images/developer/adr/adr-how-to-trigger-activities-3.svg new file mode 100644 index 00000000..0ca68570 --- /dev/null +++ b/docs/_mermaid/_images/developer/adr/adr-how-to-trigger-activities-3.svg @@ -0,0 +1 @@ +Press Star on UIfederate Like Activityfederate Like ActivityUserA: repository - follow C not allowedB: follow AC: follow B not allowed, has to follow A \ No newline at end of file diff --git a/docs/_mermaid/_images/developer/adr/adr-map-federated-person-1.svg b/docs/_mermaid/_images/developer/adr/adr-map-federated-person-1.svg new file mode 100644 index 00000000..e8bd070c --- /dev/null +++ b/docs/_mermaid/_images/developer/adr/adr-map-federated-person-1.svg @@ -0,0 +1 @@ +activitypubforgefedforgejoActormapped by AsLoginName() == LoginNamelinks toLikeID IDType ActivityVocabularyType // LikeActor ItemObject ItemActorIDURL ItemType ActivityVocabularyType // PersonName NaturalLanguageValuesPreferredUsername NaturalLanguageValuesInbox ItemOutbox ItemPublicKey PublicKeyForgePersonForgeLikeActor PersonIDActorIDID stringSchema stringPath stringHost stringPort stringUnvalidatedInput stringPersonIDAsLoginName() : string // "ID-Host"«Aggregate Root»UserID int64LowerName stringName stringEmail stringPasswd stringLoginName stringType UserTypeIsActive boolIsAdmin bool \ No newline at end of file diff --git a/docs/_mermaid/_images/developer/adr/adr-map-federated-person-2.svg b/docs/_mermaid/_images/developer/adr/adr-map-federated-person-2.svg new file mode 100644 index 00000000..addaa781 --- /dev/null +++ b/docs/_mermaid/_images/developer/adr/adr-map-federated-person-2.svg @@ -0,0 +1 @@ +activitypubforgefeduserauthActorlinks tomapped by AsLoginName() == ExternalIDExternalLoginUser.UserIDLikeID IDType ActivityVocabularyType // LikeActor ItemObject ItemActorIDURL ItemType ActivityVocabularyType // PersonName NaturalLanguageValuesPreferredUsername NaturalLanguageValuesInbox ItemOutbox ItemPublicKey PublicKeyForgePersonForgeLikeActor PersonIDActorIDID stringSchema stringPath stringHost stringPort stringUnvalidatedInput stringPersonIDAsWebfinger() : string // "ID@Host"«Aggregate Root»UserID int64LoginSource int64LowerName stringName stringEmail stringPasswd stringLoginName stringType UserTypeIsActive boolIsAdmin boolExternalLoginUserExternalID stringLoginSourceID int64RawData map[string]anyProvider string«Aggregate Root»SourceID int64Type TypeName stringIsActive boolIsSyncEnabled bool \ No newline at end of file diff --git a/docs/_mermaid/_images/developer/adr/adr-map-federated-person-3.svg b/docs/_mermaid/_images/developer/adr/adr-map-federated-person-3.svg new file mode 100644 index 00000000..7a0f939e --- /dev/null +++ b/docs/_mermaid/_images/developer/adr/adr-map-federated-person-3.svg @@ -0,0 +1 @@ +activitypubforgefeduserActorlinks toFederatedUser.UserIDmapped by PersonID.asWebfinger() == FederatedUser.externalIDLikeID IDType ActivityVocabularyType // LikeActor ItemObject ItemActorIDType ActivityVocabularyType // PersonName NaturalLanguageValuesPreferredUsername NaturalLanguageValuesInbox ItemOutbox ItemPublicKey PublicKeyForgePersonForgeLikeActor PersonIDActorIDID stringSchema stringPath stringHost stringPort stringUnvalidatedInput stringPersonIDAsLoginName() : string // "ID-Host"AsWebfinger() : string // "@ID@Host"«Aggregate Root»FederationHostID int64HostFqdn stringNodeInfoSource string«Aggregate Root»UserID int64LowerName stringName stringEmail stringPasswd stringLoginName stringType UserTypeIsActive boolIsAdmin boolFederatedUserID int64UserID int64ExternalID stringFederationHost int64 \ No newline at end of file diff --git a/docs/_mermaid/_images/developer/adr/adr-map-federated-person-4.svg b/docs/_mermaid/_images/developer/adr/adr-map-federated-person-4.svg new file mode 100644 index 00000000..009c512a --- /dev/null +++ b/docs/_mermaid/_images/developer/adr/adr-map-federated-person-4.svg @@ -0,0 +1 @@ +activitypubforgefeduserActorlinks tomapped by PersonID.asWebfinger() == FederatedPerson.externalIDLikeID IDType ActivityVocabularyType // LikeActor ItemObject ItemActorIDURL ItemType ActivityVocabularyType // PersonName NaturalLanguageValuesPreferredUsername NaturalLanguageValuesInbox ItemOutbox ItemPublicKey PublicKeyForgePersonForgeLikeActor PersonIDActorIDID stringSchema stringPath stringHost stringPort stringUnvalidatedInput stringPersonIDAsLoginName() : string // "ID-Host"AsWebfinger() : string // "@ID@Host"«Aggregate Root»FederatedPersonID int64UserID int64RawData map[string]anyExternalID stringFederationHost int64«Aggregate Root»FederationHostID int64HostFqdn stringNodeInfoSource string«Interface»CommonUserUser \ No newline at end of file diff --git a/docs/_mermaid/_images/developer/federation-architecture-1.svg b/docs/_mermaid/_images/developer/federation-architecture-1.svg new file mode 100644 index 00000000..ab08f784 --- /dev/null +++ b/docs/_mermaid/_images/developer/federation-architecture-1.svg @@ -0,0 +1 @@ +activitypubforgefeduserrepositoryActorlinks toFederatedUser.UserID11mapped by PersonID.ID == FederatedUser.externalID & FederationHost.IDmapped by PersonID.Host == FederationHost.HostFqdnFollowingRepository.RepositoryID1nActivityID IDType ActivityVocabularyType // LikeActor ItemObject ItemActorIDType ActivityVocabularyType // PersonName NaturalLanguageValuesPreferredUsername NaturalLanguageValuesInbox ItemOutbox ItemPublicKey PublicKeyForgePersonValidate() : []stringForgeLikeActor PersonIDValidate() : []stringActorIDID stringSchema stringPath stringHost stringPort stringSource stringUnvalidatedInput stringValidate() : []stringPersonIDAsLoginName() : string // "ID-Host"AsWebfinger() : string // "@ID@Host"Validate() : []stringRepositoryIDValidate() : []string«Aggregate Root»FederationHostID int64HostFqdn stringValidate() : []stringNodeInfoSource stringValidate() : []string«Aggregate Root»UserID int64LowerName stringName stringEmail stringPasswd stringLoginName stringType UserTypeIsActive boolIsAdmin boolNormalizedFederatedURI stringValidate() : []stringFederatedUserID int64UserID int64ExternalID stringFederationHost int64Validate() : []string«Aggregate Root»RepositoryID int64FollowingRepositoryID int64RepositoryID int64ExternalID stringFederationHost int64Validate() : []string \ No newline at end of file diff --git a/docs/_mermaid/_images/developer/threat-analysis/threat-analysis-like-activity-1.svg b/docs/_mermaid/_images/developer/threat-analysis/threat-analysis-like-activity-1.svg new file mode 100644 index 00000000..14ebb8b3 --- /dev/null +++ b/docs/_mermaid/_images/developer/threat-analysis/threat-analysis-like-activity-1.svg @@ -0,0 +1 @@ +ForgePersonuserForgeLikeNodeInfoNodeInfoWellKnownFederationInforepositoryour_repository_serverforeign_repository_serverForgePersonuserForgeLikeNodeInfoNodeInfoWellKnownFederationInforepositoryour_repository_serverforeign_repository_serverpost /api/activitypub/repository-id/1/inbox {Like-Activity}load "1"validate actor id inputsget by Hostif FederatonInfo not foundget .well-known/nodeinfocreate & validateget api/v1/nodeinfocreate & validatecreatevalidatesearch for user with actor-idcreate user if not foundget /api/activitypub/user-id/{id from actor}validatecreate user from ForgePersonexecute starupdate latest activity200 ok \ No newline at end of file diff --git a/docs/_mermaid/_images/developer/threat-analysis/threat-analysis-like-activity-2.svg b/docs/_mermaid/_images/developer/threat-analysis/threat-analysis-like-activity-2.svg new file mode 100644 index 00000000..d8c59aa8 --- /dev/null +++ b/docs/_mermaid/_images/developer/threat-analysis/threat-analysis-like-activity-2.svg @@ -0,0 +1 @@ +stars a federated repositoryLike Activityget NodeInfoWellKnownget NodeInfoget Person Actorcache/create federated user locallycache/create NodeInfo locallyadd star to repo locallyUserforeign repository serverour repository serverour database \ No newline at end of file diff --git a/docs/_mermaid/_images/developer/threat-analysis/threat-analysis-remote-login-propagation-1.svg b/docs/_mermaid/_images/developer/threat-analysis/threat-analysis-remote-login-propagation-1.svg new file mode 100644 index 00000000..14ebb8b3 --- /dev/null +++ b/docs/_mermaid/_images/developer/threat-analysis/threat-analysis-remote-login-propagation-1.svg @@ -0,0 +1 @@ +ForgePersonuserForgeLikeNodeInfoNodeInfoWellKnownFederationInforepositoryour_repository_serverforeign_repository_serverForgePersonuserForgeLikeNodeInfoNodeInfoWellKnownFederationInforepositoryour_repository_serverforeign_repository_serverpost /api/activitypub/repository-id/1/inbox {Like-Activity}load "1"validate actor id inputsget by Hostif FederatonInfo not foundget .well-known/nodeinfocreate & validateget api/v1/nodeinfocreate & validatecreatevalidatesearch for user with actor-idcreate user if not foundget /api/activitypub/user-id/{id from actor}validatecreate user from ForgePersonexecute starupdate latest activity200 ok \ No newline at end of file diff --git a/docs/_mermaid/_images/developer/threat-analysis/threat-analysis-remote-login-propagation-2.svg b/docs/_mermaid/_images/developer/threat-analysis/threat-analysis-remote-login-propagation-2.svg new file mode 100644 index 00000000..d8c59aa8 --- /dev/null +++ b/docs/_mermaid/_images/developer/threat-analysis/threat-analysis-remote-login-propagation-2.svg @@ -0,0 +1 @@ +stars a federated repositoryLike Activityget NodeInfoWellKnownget NodeInfoget Person Actorcache/create federated user locallycache/create NodeInfo locallyadd star to repo locallyUserforeign repository serverour repository serverour database \ No newline at end of file diff --git a/docs/_mermaid/developer/adr/adr-how-to-trigger-activities.md b/docs/_mermaid/developer/adr/adr-how-to-trigger-activities.md new file mode 100644 index 00000000..c7c028f3 --- /dev/null +++ b/docs/_mermaid/developer/adr/adr-how-to-trigger-activities.md @@ -0,0 +1,22 @@ +```mermaid +flowchart TD + U(User) -->|Press Star on UI| A(A: repository - follow C by incident) + A ~~~ B(B: follow A) + B ~~~ C(C: follow B) + C ~~~ A +``` + +```mermaid +flowchart TD + U(User) -->|Press Star on UI| A(A: repository - follow C by incident) + A -->|federate Like Activity| B(B: follow A) + B -->|federate Like Activity| C(C: follow B) + C -->|federate Like Activity| A +``` + +```mermaid +flowchart TD + U(User) -->|Press Star on UI| A(A: repository - follow C not allowed) + A -->|federate Like Activity| B(B: follow A) + A -->|federate Like Activity| C(C: follow B not allowed, has to follow A) +``` diff --git a/docs/_mermaid/developer/adr/adr-map-federated-person.md b/docs/_mermaid/developer/adr/adr-map-federated-person.md new file mode 100644 index 00000000..9d1b8f38 --- /dev/null +++ b/docs/_mermaid/developer/adr/adr-map-federated-person.md @@ -0,0 +1,317 @@ +```mermaid +classDiagram + namespace activitypub { + class Like { + ID ID + Type ActivityVocabularyType // Like + Actor Item + Object Item + } + class Actor { + ID + URL Item + Type ActivityVocabularyType // Person + Name NaturalLanguageValues + PreferredUsername NaturalLanguageValues + Inbox Item + Outbox Item + PublicKey PublicKey + } + } + namespace forgefed { + class ForgePerson { + } + class ForgeLike { + Actor PersonID + } + class ActorID { + ID string + Schema string + Path string + Host string + Port string + UnvalidatedInput string + } + class PersonID { + AsLoginName() string // "ID-Host" + } + } + + namespace forgejo { + class User { + <> + ID int64 + LowerName string + Name string + Email string + Passwd string + LoginName string + Type UserType + IsActive bool + IsAdmin bool + } + } + + Actor <|-- ForgePerson + Like <|-- ForgeLike + ActorID <|-- PersonID + + ForgeLike *-- PersonID: Actor + + PersonID -- User: mapped by AsLoginName() == LoginName + PersonID -- ForgePerson: links to +``` + +```mermaid +classDiagram + namespace activitypub { + class Like { + ID ID + Type ActivityVocabularyType // Like + Actor Item + Object Item + } + class Actor { + ID + URL Item + Type ActivityVocabularyType // Person + Name NaturalLanguageValues + PreferredUsername NaturalLanguageValues + Inbox Item + Outbox Item + PublicKey PublicKey + } + } + + namespace forgefed { + class ForgePerson { + } + class ForgeLike { + Actor PersonID + } + class ActorID { + ID string + Schema string + Path string + Host string + Port string + UnvalidatedInput string + } + class PersonID { + AsWebfinger() string // "ID@Host" + } + } + + namespace user { + class User { + <> + ID int64 + LoginSource int64 + LowerName string + Name string + Email string + Passwd string + LoginName string + Type UserType + IsActive bool + IsAdmin bool + } + + class ExternalLoginUser { + ExternalID string + LoginSourceID int64 + RawData map[string]any + Provider string + } + } + + namespace auth { + class Source { + <> + ID int64 + Type Type + Name string + IsActive bool + IsSyncEnabled bool + } + } + + Actor <|-- ForgePerson + Like <|-- ForgeLike + + ActorID <|-- PersonID + ForgeLike *-- PersonID: Actor + PersonID -- ForgePerson: links to + PersonID -- ExternalLoginUser: mapped by AsLoginName() == ExternalID + + User *-- ExternalLoginUser: ExternalLoginUser.UserID + User -- Source + ExternalLoginUser -- Source +``` + +```mermaid +classDiagram + namespace activitypub { + class Like { + ID ID + Type ActivityVocabularyType // Like + Actor Item + Object Item + } + class Actor { + ID + Type ActivityVocabularyType // Person + Name NaturalLanguageValues + PreferredUsername NaturalLanguageValues + Inbox Item + Outbox Item + PublicKey PublicKey + } + } + + namespace forgefed { + class ForgePerson { + } + class ForgeLike { + Actor PersonID + } + class ActorID { + ID string + Schema string + Path string + Host string + Port string + UnvalidatedInput string + } + class PersonID { + AsLoginName() string // "ID-Host" + AsWebfinger() string // "@ID@Host" + } + class FederationHost { + <> + ID int64 + HostFqdn string + } + + class NodeInfo { + Source string + } + } + + namespace user { + class User { + <> + ID int64 + LowerName string + Name string + Email string + Passwd string + LoginName string + Type UserType + IsActive bool + IsAdmin bool + } + + class FederatedUser { + ID int64 + UserID int64 + ExternalID string + FederationHost int64 + } + } + + Actor <|-- ForgePerson + Like <|-- ForgeLike + + ActorID <|-- PersonID + ForgeLike *-- PersonID: Actor + ForgePerson -- PersonID: links to + FederationHost *-- NodeInfo + + User *-- FederatedUser: FederatedUser.UserID + PersonID -- FederatedUser : mapped by PersonID.asWebfinger() == FederatedUser.externalID + FederatedUser -- FederationHost + +``` + +```mermaid +classDiagram + namespace activitypub { + class Like { + ID ID + Type ActivityVocabularyType // Like + Actor Item + Object Item + } + class Actor { + ID + URL Item + Type ActivityVocabularyType // Person + Name NaturalLanguageValues + PreferredUsername NaturalLanguageValues + Inbox Item + Outbox Item + PublicKey PublicKey + } + } + + namespace forgefed { + class ForgePerson { + } + class ForgeLike { + Actor PersonID + } + class ActorID { + ID string + Schema string + Path string + Host string + Port string + UnvalidatedInput string + } + class PersonID { + AsLoginName() string // "ID-Host" + AsWebfinger() string // "@ID@Host" + } + class FederatedPerson { + <> + ID int64 + UserID int64 + RawData map[string]any + ExternalID string + FederationHost int64 + } + + class FederationHost { + <> + ID int64 + HostFqdn string + } + + class NodeInfo { + Source string + } + } + + namespace user { + class CommonUser { + <> + } + class User { + + } + } + User ..<| CommonUser + + Actor <|-- ForgePerson + Like <|-- ForgeLike + + ActorID <|-- PersonID + ForgeLike *-- PersonID: Actor + + PersonID -- ForgePerson: links to + PersonID -- FederatedPerson : mapped by PersonID.asWebfinger() == FederatedPerson.externalID + FederationHost *-- NodeInfo + FederatedPerson -- FederationHost + FederatedPerson ..<| CommonUser +``` diff --git a/docs/_mermaid/developer/federation-architecture.md b/docs/_mermaid/developer/federation-architecture.md new file mode 100644 index 00000000..b1b5944b --- /dev/null +++ b/docs/_mermaid/developer/federation-architecture.md @@ -0,0 +1,116 @@ +```mermaid +classDiagram + namespace activitypub { + class Activity { + ID ID + Type ActivityVocabularyType // Like + Actor Item + Object Item + } + class Actor { + ID + Type ActivityVocabularyType // Person + Name NaturalLanguageValues + PreferredUsername NaturalLanguageValues + Inbox Item + Outbox Item + PublicKey PublicKey + } + } + + namespace forgefed { + class ForgePerson { + Validate() []string + } + class ForgeLike { + Actor PersonID + Validate() []string + } + class ActorID { + ID string + Schema string + Path string + Host string + Port string + Source string + UnvalidatedInput string + Validate() []string + } + class PersonID { + AsLoginName() string // "ID-Host" + AsWebfinger() string // "@ID@Host" + Validate() []string + } + class RepositoryID { + Validate() []string + } + class FederationHost { + <> + ID int64 + HostFqdn string + Validate() []string + } + + class NodeInfo { + Source string + Validate() []string + } + } + + Actor <|-- ForgePerson + Activity <|-- ForgeLike + + ActorID <|-- PersonID + ActorID <|-- RepositoryID + ForgeLike *-- PersonID: Actor + ForgePerson -- PersonID: links to + FederationHost *-- NodeInfo + + namespace user { + class User { + <> + ID int64 + LowerName string + Name string + Email string + Passwd string + LoginName string + Type UserType + IsActive bool + IsAdmin bool + NormalizedFederatedURI string + Validate() []string + } + + class FederatedUser { + ID int64 + UserID int64 + ExternalID string + FederationHost int64 + Validate() []string + } + } + + namespace repository { + class Repository { + <> + ID int64 + } + + class FollowingRepository { + ID int64 + RepositoryID int64 + ExternalID string + FederationHost int64 + Validate() []string + } + } + + User "1" *-- "1" FederatedUser: FederatedUser.UserID + PersonID -- FederatedUser : mapped by PersonID.ID == FederatedUser.externalID & FederationHost.ID + PersonID -- FederationHost : mapped by PersonID.Host == FederationHost.HostFqdn + FederatedUser -- FederationHost + + Repository "1" *-- "n" FollowingRepository: FollowingRepository.RepositoryID + FollowingRepository -- FederationHost +``` diff --git a/docs/_mermaid/developer/threat-analysis/threat-analysis-like-activity.md b/docs/_mermaid/developer/threat-analysis/threat-analysis-like-activity.md new file mode 100644 index 00000000..11eb82a1 --- /dev/null +++ b/docs/_mermaid/developer/threat-analysis/threat-analysis-like-activity.md @@ -0,0 +1,46 @@ +```mermaid +sequenceDiagram + participant fs as foreign_repository_server + participant os as our_repository_server + + fs ->> os: post /api/activitypub/repository-id/1/inbox {Like-Activity} + activate os + os ->> repository: load "1" + os ->> os: validate actor id inputs + activate os + os ->> FederationInfo: get by Host + os ->> os: if FederatonInfo not found + activate os + os ->> fs: get .well-known/nodeinfo + os ->> NodeInfoWellKnown: create & validate + os ->> fs: get api/v1/nodeinfo + os ->> NodeInfo: create & validate + os ->> FederationInfo: create + deactivate os + os ->> ForgeLike: validate + deactivate os + + os ->> user: search for user with actor-id + os ->> os: create user if not found + activate os + os ->> fs: get /api/activitypub/user-id/{id from actor} + os ->> ForgePerson: validate + os ->> user: create user from ForgePerson + deactivate os + os ->> repository: execute star + os ->> FederationInfo: update latest activity + os -->> fs: 200 ok + deactivate os +``` + +```mermaid +flowchart TD + A(User) --> |stars a federated repository| B(foreign repository server) + B --> |Like Activity| C(our repository server) + C --> |get NodeInfoWellKnown| B + C --> |get NodeInfo| B + C --> |get Person Actor| B + C --> |cache/create federated user locally| D(our database) + C --> |cache/create NodeInfo locally| D(our database) + C --> |add star to repo locally| D +``` diff --git a/docs/_mermaid/developer/threat-analysis/threat-analysis-remote-login-propagation.md b/docs/_mermaid/developer/threat-analysis/threat-analysis-remote-login-propagation.md new file mode 100644 index 00000000..11eb82a1 --- /dev/null +++ b/docs/_mermaid/developer/threat-analysis/threat-analysis-remote-login-propagation.md @@ -0,0 +1,46 @@ +```mermaid +sequenceDiagram + participant fs as foreign_repository_server + participant os as our_repository_server + + fs ->> os: post /api/activitypub/repository-id/1/inbox {Like-Activity} + activate os + os ->> repository: load "1" + os ->> os: validate actor id inputs + activate os + os ->> FederationInfo: get by Host + os ->> os: if FederatonInfo not found + activate os + os ->> fs: get .well-known/nodeinfo + os ->> NodeInfoWellKnown: create & validate + os ->> fs: get api/v1/nodeinfo + os ->> NodeInfo: create & validate + os ->> FederationInfo: create + deactivate os + os ->> ForgeLike: validate + deactivate os + + os ->> user: search for user with actor-id + os ->> os: create user if not found + activate os + os ->> fs: get /api/activitypub/user-id/{id from actor} + os ->> ForgePerson: validate + os ->> user: create user from ForgePerson + deactivate os + os ->> repository: execute star + os ->> FederationInfo: update latest activity + os -->> fs: 200 ok + deactivate os +``` + +```mermaid +flowchart TD + A(User) --> |stars a federated repository| B(foreign repository server) + B --> |Like Activity| C(our repository server) + C --> |get NodeInfoWellKnown| B + C --> |get NodeInfo| B + C --> |get Person Actor| B + C --> |cache/create federated user locally| D(our database) + C --> |cache/create NodeInfo locally| D(our database) + C --> |add star to repo locally| D +``` diff --git a/docs/developer/adr/adr-activity-for-like.md b/docs/developer/adr/adr-activity-for-like.md new file mode 100644 index 00000000..cc5d2fb6 --- /dev/null +++ b/docs/developer/adr/adr-activity-for-like.md @@ -0,0 +1,93 @@ +--- +title: 'ADR: Activity for Like' +license: 'CC-BY-SA-4.0' +--- + +## Status + +Active + +## Context + +While implementing the star activity we have to take several decisions which will impact all other activities. Due to this relevance we will discuss decision with as many federation contributors as possible. + +## Decision + +We decided to use "2. Like Activity while source information comes from NodeInfo" + +## Choices + +### 1. Star Activity derived from AP Like with additional source information + +```edn +# edn notation +{@context [ + "as": "https://www.w3.org/ns/activitystreams#", + "forge": "https://forgefed.org/ns#",], + ::as/id "https://repo.prod.meissa.de/api/v1/activitypub/user-id/1/outbox/12345", + ::as/type "Star", + ::forge/source "forgejo", + ::as/actor "https://repo.prod.meissa.de/api/v1/activitypub/user-id/1", + ::as/object "https://codeberg.org/api/v1/activitypub/repository-id/12" +} +``` + +```json +# json notation +{"id": "https://repo.prod.meissa.de/api/v1/activitypub/user-id/1/outbox/12345", + "type": "Star", + "source": "forgejo", + "actor": "https://repo.prod.meissa.de/api/v1/activitypub/user-id/1", + "object": "https://codeberg.org/api/v1/activitypub/repository-id/1", + "startTime": "2014-12-31T23:00:00-08:00", +} +``` + +This way of expressing stars will have the following features: + +1. Actor & object may be dereferenced by (ap-)api +2. The activity can be referenced itself (e.g. in order to express a result of the triggered action) +3. Star is a special case of a Like. Star only happens in ForgeFed context. Different things should be named different ... +4. With the `source` given it would be more easy to distinguish the uri layout for object and actor id's and make implementation more straight forward + 1. The `source` field reflects the software sending an activity. Values of it may be forgejo, gitlab, ... + 2. Knowing the sending system will make it easier to interact with: + 1. We know exactly how the actor can be dereferenced - names may be filled & used different (see: https://codeberg.org/meissa/forgejo/src/commit/7cac9806f8247963b1cdce3f2c5f5d1bc3763fbe/routers/api/v1/activitypub/repository.go#L180) + 2. We know how we can validate the given references - valid uris will be different in details (see: https://codeberg.org/meissa/forgejo/src/commit/7cac9806f8247963b1cdce3f2c5f5d1bc3763fbe/models/forgefed/actor.go#L121) +5. startTime protects against The Reply Attack discussed in [threat-analysis][threat-analysis] + +### 2. Like Activity while source information comes from NodeInfo + +```json +# NodeInfo +{ + "version": "2.1", + "software": { + "name": "gitea", + "version": "1.20.0+dev-2539-g5840cc6d3", + }, + "protocols": [ + "activitypub" + ], +} + +# Like Activity +{"id": "https://repo.prod.meissa.de/api/v1/activitypub/user-id/1/outbox/12345", + "type": "Like", + "actor": "https://repo.prod.meissa.de/api/v1/activitypub/user-id/1", + "object": "https://codeberg.org/api/v1/activitypub/repository-id/1", + "startTime": "2014-12-31T23:00:00-08:00" +} +``` + +This way of expressing stars will have the following features: + +1. Actor & object may be dereferenced by (ap-)api +2. The activity can be referenced itself (e.g. in order to express a result of the triggered action) +3. With NodeInfo given it would be more easy to distinguish the uri layout for object and actor id's and make implementation more straight forward + 1. The NodeInfo field reflects the software & version sending an activity. Values of may be gitea, forgejo, gitlab, ... + 2. Knowing the sending system will it make easier to interact with: + 1. We know exactly how the actor can be derefernced - names maybe filled & used different (see: https://codeberg.org/meissa/forgejo/src/commit/7cac9806f8247963b1cdce3f2c5f5d1bc3763fbe/routers/api/v1/activitypub/repository.go#L180) + 2. We know how we can validate the given references - valid uris will be different in details (see: https://codeberg.org/meissa/forgejo/src/commit/7cac9806f8247963b1cdce3f2c5f5d1bc3763fbe/models/forgefed/actor.go#L121) +4. startTime protects against The Reply Attack discussed in [threat-analysis][threat-analysis] + +5. [threat-analysis]: ../threat-analysis/threat-analysis-like-activity/ diff --git a/docs/developer/adr/adr-ddd-for-federation.md b/docs/developer/adr/adr-ddd-for-federation.md new file mode 100644 index 00000000..1c437493 --- /dev/null +++ b/docs/developer/adr/adr-ddd-for-federation.md @@ -0,0 +1,54 @@ +--- +title: 'ADR: DDD for Federation' +license: 'CC-BY-SA-4.0' +--- + +## Status + +WIP + +## Context + +With federation we introduced a topic independent to existing gitea. This will give us the chance to choose other architecture principles. + +Discussion see: https://codeberg.org/forgejo/discussions/issues/179 + +## Decision + +tbd + +## Choices + +### 1. Do federation stuff following Domain Driven Design in combination with Dependency Injection + +**Let's do federation related stuff following DDD as whole. But let's keep the existing codebase as is.** + +Reason for this proposal are: + +1. Federation is new, so it might be possible to adjust the architecture for the new code. For existing (f3 code) we might find a way of migration and I offer help :-) +2. Keep the existing functionality in existing layout will keep compatibility for gitea contributions - as long as we can use them. + +Code-Example can be found here: https://codeberg.org/forgejo/forgejo/pulls/4193 + +#### 1.1 Aspects and Properties + +1. Entities and value structs: they contain as much domain logic as possible. +2. Aggregates: they are atomary units in terms of persistence. This, however, has still some room for improvement :) +3. Interfaces for infrastructure: infrastructure is encapsulated from domain logic by interfaces. This allows unit testing in combination with mocks. +4. Service: services provide logic that does not belong to a single aggregate or entity, or is using infrastructure. +5. Poor man's dependency injection: services contain infrastructure implementations. This allows to differentiate composition of used infrastructure between production or test usage. This also has room for improvement, because we do not have an application context singleton (as in Spring Boot). + +#### 1.2 Expected Benefit + +1. We can unittest all paths in service. Integration test has only to cover the most important paths like "Happy Path" or "Failure Path". +2. We can decide to separate `domain` from `domain_test` +3. We can split up the (in future probable) huge federation service along the domain aggregates `FederationHost`, `User`. This will lead to packages `domain/FederationHost` having a `FederationService` or `domain/User` having a `UserService`. This will help to keep the services focussed around one domain. +4. Refactorings of domain stays simple, as we have all paths under unit tests. +5. Aggregates are way to model out meaningful submodules in terms of domain. We can improve & sharpen this model in a iterative way. Therefor are Aggregates also the point defining the shape of used repositories and apis. +6. Aggregates bring the chance of performance improvements: If accessing db multiple times for one use case in my experience often leads to bad performance compared to "load all on start & save all at the end". But minimizing the times of accessing db stands against amount of data being loaded every time. A good & sharp modelled aggregate might reflect the sweet spot between both bad performing borders. + +#### 1.3 See also + +1. Wiki: https://en.wikipedia.org/wiki/Domain-driven_design +2. MartinFowler: https://martinfowler.com/bliki/DomainDrivenDesign.html +3. Distilled eBook: https://dl.ebooksworld.ir/motoman/AW.Domain-Driven.Design.Distilled.www.EBooksWorld.ir.pdf diff --git a/docs/developer/adr/adr-how-to-trigger-activities.md b/docs/developer/adr/adr-how-to-trigger-activities.md new file mode 100644 index 00000000..851356f8 --- /dev/null +++ b/docs/developer/adr/adr-how-to-trigger-activities.md @@ -0,0 +1,87 @@ +--- +title: 'ADR: Trigger Activities' +license: 'CC-BY-SA-4.0' +--- + +# How to Trigger Activities + +- [How to Trigger Activities](#how-to-trigger-activities) + - [Status](#status) + - [Context](#context) + - [Decision](#decision) + - [Choices](#choices) + - [1. Transient Federation without Constraints](#1-transient-federation-without-constraints) + - [Problem - Circularity And Inconsistency](#problem---circularity-and-inconsistency) + - [2. Direct Federation only](#2-direct-federation-only) + - [Discussion for option 2.](#discussion-for-option-2) + - [3. Transient Federation and Remember Processed](#3-transient-federation-and-remember-processed) + - [See also](#see-also) + +## Status + +Proposal + +## Context + +While implementing the trigger of federated stars we have to handle the distribution of corresponding Like-Activities to the federated repositories. + +This must be done consistently and without circularity, such that a repository starring by a user leads to exactly one added star in every federated repository. + +![diagram](../../_mermaid/_images/developer/adr/adr-how-to-trigger-activities-1.svg) + +## Decision + +## Choices + +### 1. Transient Federation without Constraints + +In this case the star federation process would look like: + +1. Repo on an instance receives a star (regardless of whether via UI or federation) +2. Instance federates star to all repos that are set as federated repositories. + +#### Problem - Circularity And Inconsistency + +Circular federation would lead to a infinite circular distribution of Like-Activities: + +![diagram](../../_mermaid/_images/developer/adr/adr-how-to-trigger-activities-2.svg) + +1. Given a repo on the 3 instances A, B, C. + Repo on instance A has set repo on instance B as federation repo. + Repo on instance B has set repo on instance C as federation repo. + Repo on instance C has set repo on instance A as federation repo. +2. User stars repo on instance A via UI. +3. Instance A sends Like-Activity to repo on instance B. +4. Instance B creates local FederatedUser, stars the repo and sends Like-Activity to repo on instance C. +5. Instance C creates local FederatedUser, stars the repo and sends Like-Activity to repo on instance A. +6. Instance A creates local FederatedUser, since the Actor of the Like-Activity is the local FederatedUser created on instance C. + Thus, the repo on instance A gets another star by this user and sends Like-Activity to the repo on instance C. +7. The circular distribution of Like-Activities continues, since the actor is always the local FederatedUser of the sending instance. + +### 2. Direct Federation only + +![diagram](../../_mermaid/_images/developer/adr/adr-how-to-trigger-activities-3.svg) + +In this case the star federation process would look like: + +1. Case: Repo on an instance receives a star by an authenticated user via UI/API: + 1. Repository gets starred by the authenticated User. + 2. Instance federates star to all repos that are set as federated repositories. +2. Case: Repo on an instance receives a star via a Like-Activity: + 1. Instance creates FederatedUser and stars the repository. + 2. No further star federation to federated repos is triggered. + +#### Discussion for option 2. + +1. pro + 1. Prevent circular communication + 2. Clear semantic also in case of "Who should authorize a digital signature" + +### 3. Transient Federation and Remember Processed + +In this case the star federation process would look like: + +1. Repo on an instance receives a star (regardless of whether via UI or federation) +2. If this activity was not operated already in this instance, federate star to all repos that are set as federated repositories. + +## See also diff --git a/docs/developer/adr/adr-map-federated-person.md b/docs/developer/adr/adr-map-federated-person.md new file mode 100644 index 00000000..d18467e8 --- /dev/null +++ b/docs/developer/adr/adr-map-federated-person.md @@ -0,0 +1,159 @@ +--- +title: 'ADR: Map federated Person' +license: 'CC-BY-SA-4.0' +--- + +# Map federated Person + +- [Map federated Person](#map-federated-person) + - [Status](#status) + - [Context](#context) + - [Decision](#decision) + - [Choices](#choices) + - [1. Map to plain Forgejo User](#1-map-to-plain-forgejo-user) + - [1. Pro](#1-pro) + - [1. Con](#1-con) + - [2. Map to User-\&-ExternalLoginUser](#2-map-to-user--externalloginuser) + - [2. Pro](#2-pro) + - [2. Con](#2-con) + - [3. Map to User-\&-FederatedUser](#3-map-to-user--federateduser) + - [3. Pro](#3-pro) + - [3. Con](#3-con) + - [4. Map to new FederatedPerson and introduce a common User interface](#4-map-to-new-federatedperson-and-introduce-a-common-user-interface) + - [4. Pro](#4-pro) + - [4. Con](#4-con) + +## Status + +Active + +## Context + +While implementing federation we have to represent federated persons on a local instance. + +A federated person should be able to execute local actions (as if he was a local user), ideally without too many code changes. + +For being able to map the federated person reliable, the local representation has to carry a clear mapping to the original federated person. + +We get actor information as `{"actor": "https://repo.prod.meissa.de/api/v1/activitypub/user-id/1",}`. To find out whether this user is available locally without dereferencing the federated person every time is important for performance & system resilience. + +## Decision + +We decided to use option 3 "Map to User & FederatedUser". + +Discussion can be found here: https://codeberg.org/forgejo/discussions/issues/101 + +## Choices + +### 1. Map to plain Forgejo User + +1. We map PersonId AsLoginName() (e.g. 13-some.instan.ce) to User.LoginName. Due to limitations of User.LoginName validation mapping may be affected by invalid characters. +2. Created User is limited: + 1. non functional email is generated, email notification is false. At the moment we have problems with email whitelists at this point. + 2. strong password is generated silently + 3. User.Type is UserTypeRemoteUser + 4. User is not Admin + 5. User is not Active + +#### 1. Pro + +1. We can use Forgejo code (like star / unstar fkt.) without changes. +2. No new model & persistence is introduced, architectural change is small. + +#### 1. Con + +1. But we use fields against their semantic and see some problems / limitations for mapping arise. + 1. generating email having the source fqdn is impacted by email whitelists. + 2. loginName is used for mapping, but e.g. @ is not allowed. + 3. password is generated headless. +2. Maybe the large User table gets even larger (see https://git.exozy.me/a/gitea/issues/2) +3. Occasional contributors may not understand the difference in level of trust implied by federated user. This may promote errors with security impact. +4. Understanding federated users entries being kind of cache would conflict with user table entries. +5. LoginNames may be occupied by federated users. This may leak information and increase attack surface. + +![diagram](../../_mermaid/_images/developer/adr/adr-map-federated-person-1.svg) + +### 2. Map to User-&-ExternalLoginUser + +1. We map PersonId.AsWebfinger() (e.g. 13@some.instan.ce) to ExternalLoginUser.ExternalID. LoginSourceID may be left Empty. +2. Created User is limited: + 1. non functional email is generated, email notification is false. + 2. strong password is generated silently + 3. User.Type is UserTypeRemoteUser + 4. User is not Admin + 5. User is not Active +3. Created ExternalLoginUser is limited + 1. Login via fediverse is not intended and will not work. This is distinct to the F3 usecase. + +#### 2. Pro + +1. We can use Forgejo code (like star / unstar fkt.) without changes. +2. No new model & persistence is introduced, architectural change is small. Comparable to option 1. +3. This option was taken by the F3-Export/Import-Feature +4. Mapping may be more reliable compared to option 1. + +#### 2. Con + +1. We use fields against their semantic (User.EMail, User.Password, User.LoginSource, ExternalLoginUser.Login\*) and see some problems / limitations for login functionality arise. Situation is worse than option 1. + 1. generating email having the source fqdn is impacted by email whitelists. + 2. password is generated headless. + 3. TODO: How would we map/generate User.LoginName ? + 4. TODO: How would we generate ExternalLoginUser.Login\* fields? +2. Getting a larger User table applies to this solution comparable to option 1. +3. Occasional contributors may not understand the difference in level of trust implied by federated user, this may promote errors with security impact. +4. Understanding federated users entries being kind of cache would conflict with user table entries. +5. LoginNames may be occupied by federated users. This may leak information and increase attack surface. + +![diagram](../../_mermaid/_images/developer/adr/adr-map-federated-person-2.svg) + +### 3. Map to User-&-FederatedUser + +1. We map PersonId.asWbfinger() to FederatedPerson.ExternalID (e.g. 13@some.instan.ce). +2. Created User is limited: + 1. non functional email is generated, email notification is false. + 2. strong password is generated silently + 3. User.Type is UserTypeRemoteUser + 4. User is not Admin + 5. User is not Active + +#### 3. Pro + +1. We can use Forgejo code (like star / unstar fkt.) without changes. +2. Introduce FederatedUser as new model & persistence, architectural change is medium. +3. We will be able to have a reliable mapping. Better than option 1 & 2. + +#### 3. Con + +1. But we use fields (User.EMail, User.Password) against their semantic, but we probably can handle the problems arising. Situation is comparable to option 1. + 1. generating email having the source fqdn is impacted by email whitelists. + 2. password is generated headless. + 3. TODO: How would we map/generate User.LoginName ? +2. Getting a larger User table applies to this solution comparable to option 1. +3. Occasional contributors may not understand the difference in level of trust implied by federated user, this may promote errors with security impact, comparable to option 1. +4. Getting a larger User table applies to this solution comparable to option 1. +5. Understanding federated users entries being kind of cache would conflict with user table entries. +6. LoginNames may be occupied by federated users. This may leak information and increase attack surface. + +![diagram](../../_mermaid/_images/developer/adr/adr-map-federated-person-3.svg) + +### 4. Map to new FederatedPerson and introduce a common User interface + +1. We map PersonId.asWbfinger() to FederatedPerson.ExternalID (e.g. 13@some.instan.ce). +2. We will have no semantic mismatch. + +#### 4. Pro + +1. We will be able to have a reliable mapping. +2. We will not use fields against their semantics. +3. We do not enhance user table with "cache entries". Forgejo stays scalable, no additional DOS surface. +4. Occasional contributors may understand a clear difference between user and federated user. +5. No LoginNames where occupied +6. Caching aspects of federated users (like refresh, evict) may be easier to implement. + +#### 4. Con + +1. We can use Forgejo code (like star / unstar fkt.) after refactorings only. +2. At every place of interaction we have to enhance persistence (e.g. a find may have to query two tables now) & introduce a common User interface. +3. We introduce new model & persistence. + +![diagram](../../_mermaid/_images/developer/adr/adr-map-federated-person-4.svg) diff --git a/docs/developer/adr/index.md b/docs/developer/adr/index.md new file mode 100644 index 00000000..378efa5d --- /dev/null +++ b/docs/developer/adr/index.md @@ -0,0 +1,7 @@ +--- +title: 'Federation Architectural Decision Records' +--- + +- [ADR: Activity for Like](./adr-activity-for-like/) +- [ADR: Trigger Activities](./adr-how-to-trigger-activities/) +- [ADR: Map federated Person](./adr-map-federated-person/) diff --git a/docs/developer/federation-architecture.md b/docs/developer/federation-architecture.md new file mode 100644 index 00000000..1a77de7d --- /dev/null +++ b/docs/developer/federation-architecture.md @@ -0,0 +1,34 @@ +--- +title: Federation Architecture +license: 'CC-BY-SA-4.0' +--- + +While implementing federation in Forgejo we introduced some concepts from DomainDrivenDesign: + +1. **Aggregate**: Aggregates are clusters of objects (entities or values) which are handled atomic when it comes to persistence. +2. **Validation**: Every object should express it's own validity, whenever someone is interested in + 1. we collect as many invalidity information as possible in one shoot - so we return a list of validation issues if there are some. + 2. Objects entering the lifetime are checked for validity on the borders (after loaded from and before stored to DB, after being newly created (New\* functions) or after loaded via web / REST). + +Objects in forgefed package reflect Objects from ap or f3 lib but add some Forgejo specific enhancements like more specific validation. + +## Federation Model + +![diagram](../_mermaid/_images/developer/federation-architecture-1.svg) + +## Normalized URI used as ID + +In order to use URIs as ID we've to normalize URIs. + +A normalized user URI looks like: `https://federated-repo.prod.meissa.de/api/v1/activitypub/user-id/1` + +In order to normalize URIs we care: + +1. Case (all to lower case): `https://federated-REPO.prod.meissa.de/api/v1/activitypub/user-id/1` +2. No relative path: `https://federated-repo.prod.meissa.de/api/v1/activitypub/user-id/../user-id/1` +3. No parameters: `https://federated-repo.prod.meissa.de/api/v1/activitypub/user-id/1?some-parameters=1` +4. No Webfinger: `https://user1@federated-repo.prod.meissa.de` (with following redirects) +5. No default api: `https://federated-repo.prod.meissa.de/api/activitypub/user-id/1` +6. No autorization: `https://user:password@federated-repo.prod.meissa.de/api/v1/activitypub/user-id/1` +7. No default ports: `https://federated-repo.prod.meissa.de:443/api/v1/activitypub/user-id/1` +8. Accept non default ports: `http://localhost:3000/api/v1/activitypub/user-id/1` diff --git a/docs/developer/index.md b/docs/developer/index.md index 167557b5..6a401a02 100644 --- a/docs/developer/index.md +++ b/docs/developer/index.md @@ -16,6 +16,9 @@ their needs. - [Development environment](./development-environment/) - [Interface customization](./customization/) - [Architecture overview](./architecture/) + - [Federation Architecture](./federation-architecture/) + - [Federation Architectural Decision Records](./adr/) + - [Threat Analysis](./threat-analysis/) - [Developer Certificate of Origin (DCO)](./dco/) - [code.forgejo.org](./code-forgejo-org/) - [next.forgejo.org](./next-forgejo-org/) diff --git a/docs/developer/threat-analysis/index.md b/docs/developer/threat-analysis/index.md new file mode 100644 index 00000000..9ea2dd32 --- /dev/null +++ b/docs/developer/threat-analysis/index.md @@ -0,0 +1,6 @@ +--- +title: 'Threat Analysis' +--- + +- [Threat Analysis: Federated Like Activity](./threat-analysis-like-activity/) +- [Threat Analysis: Remote Login Propagation](./threat-analysis-remote-login-propagation/) diff --git a/docs/developer/threat-analysis/threat-analysis-like-activity.md b/docs/developer/threat-analysis/threat-analysis-like-activity.md new file mode 100644 index 00000000..caee8e20 --- /dev/null +++ b/docs/developer/threat-analysis/threat-analysis-like-activity.md @@ -0,0 +1,113 @@ +--- +title: 'Threat Analysis: Federated Like Activity' +license: 'CC-BY-SA-4.0' +--- + +## Technical Background + +### Control Flow + +![diagram](../../_mermaid/_images/developer/threat-analysis/threat-analysis-like-activity-1.svg) + +### Data transferred + +``` +# NodeInfoWellKnown +{"links":[ + {"href":"https://federated-repo.prod.meissa.de/api/v1/nodeinfo", + "rel":"http://nodeinfo.diaspora.software/ns/schema/2.1"}]} + +# NodeInfo +{"version":"2.1", + "software":{"name":"gitea", + ...}} + +# LikeActivity +{"id": "https://repo.prod.meissa.de/api/v1/activitypub/user-id/1/outbox/12345", + "type": "Like", + "actor": "https://repo.prod.meissa.de/api/v1/activitypub/user-id/1", + "object": "https://codeberg.org/api/v1/activitypub/repository-id/12" + "startTime": "2014-12-31T23:00:00-08:00" +} + +# Person +{"id":"https://federated-repo.prod.meissa.de/api/v1/activitypub/user-id/10", + "type":"Person", + "preferredUsername":"stargoose9", + "name": "goose going to star the repo", + "publicKey":{"id":"https://federated-repo.prod.meissa.de/api/v1/activitypub/user-id/10#main-key", + "owner":"https://federated-repo.prod.meissa.de/api/v1/activitypub/user-id/10", + "publicKeyPem":"-----BEGIN PUBLIC KEY-----\nMIIBoj...XAgMBAAE=\n-----END PUBLIC KEY-----\n"}} +``` + +### Data Flow + +![diagram](../../_mermaid/_images/developer/threat-analysis/threat-analysis-like-activity-2.svg) + +## Analysis + +### Assets + +1. **Service Availability**: The availability of our or foreign servers. +2. **Instance Reputation**: We hope our project does not live on a spam instance. +3. **Project Reputation**: The reputation of an individual project. + +### Actors + +1. **Script Kiddies**: Boored teens, willing to do some illegal stuff without deep knowledge of tech details but broad knowledge across internet discussions. Able to do some bash / python scripting. +2. **Experienced Hacker**: Hacker with deep knowledge. +3. **Hacker**: Hacker with some knowledge. +4. **Malicious Fediverse Member**: Malicious Members of the fediverse, able to operate malicious forge instances. +5. **Malicious Forge Admin**: Admin of good reputation forge instance in the fediverse. +6. **Federated User**: Members of good reputation forge instance in the fediverse. + +### Threat + +1. **Knock foreign http server**: Script Kiddi sends a Like Activity containing an attack actor url `http://attacked.target/very/special/path` in place of actor. Our repository server sends a `get Person Actor` request to this url. The target receives a DenialdOfService attack. We loose CPU & instance reputation. +2. **Sql injection**: Experienced hacker sends a Like Activity containing an actor url pointing to an evil forgejo instance. Our repository server sends an `get Person Actor` request to this instance and gets a person having sth. like `; drop database;` in its name. If our server tries to create a new user out of this person, the db might be dropped. +3. **Malicious Activities**: Malicious Fediverse Member sends Star Activities containing non authorized Person Actors. The Actors listed as stargazer might get angry about this. The project may loose project reputation. +4. **DOS by Rate**: Experienced Hacker records activities sent and replays some of them. Without order of activities (i.e. timestamp) we can not decide wether we should execute the activity again. If the replayed activities are UnLike Activity we might loose stars. +5. **Replay**: Experienced Hacker records activities sends a massive amount of activities which leads to new user creation & storage loss. Our instance might fall out of service. See also [replay attack@wikipedia][2]. +6. **Replay out of Order**: Experienced Hacker records activities sends again Unlike Activities happened but was succeeded by an Like. Our instance accept the Unlike and removes a star. Our repository gets rated unintended bad. +7. **DOS by Slowlories**: Experienced Hacker may craft their malicious server to keep connections open. Then they send a Like Activity with the actor URL pointing to that malicious server, and your background job keeps waiting for data. Then they send more such requests, until you exhaust your limit of file descriptors openable for your system and cause a DoS (by causing cascading failures all over the system, given file descriptors are used for about everything, from files, to sockets, to pipes). See also [Slowloris@wikipedia][1]. +8. **Saturate by future StartTime**: Hacker sends an Activity having `startTime` in far future. Our Instance does no longer accept Activities till they have far far future `startTime` from the actors instance. +9. **Malicious Forge**: If a "Malicious Fediverse Member" deploys an 'federated' forge that sends the right amount of Like activities to not hit the rate limiter, an malicious user can modify the code of any 'federated' forge to ensure that if an foreign server tries to verify and activity, it will always succeed (such as creating users on demand, or simply mocking the data). +10. **Malicious Controlled Forge**: A "Malicious Forge Admin" of a good reputation instance may impersonate users on his instance and trigger federated activities. +11. **Side Chanel Malicious Activities**: A Owner of a good reputation instance may craft malicious activities with the hope not to get moderated. + +### Mitigations + +1. Validate object uri in order to send only requests to well defined endpoints. +2. xorm global SQL injection protection. +3. We accept only signed Activities +4. We accept only activities having an startTime & remember the last executed activity startTime. +5. We introduce (or have) rate limiting per IP. +6. We ensure, that outgoing HTTP requests have a reasonable timeout (if you didn't get that 500b JSON response after 10 seconds, you probably won't get it). +7. **Instance Level Moderation** (such as blocking other federated forges) can mitigate "Malicious Forge" +8. **User Level Moderation** (such as blocking other federated users) can mitigate "Side Chanel Malicious Activities" + +### DREAD-Score + +| Threat | Damage | Reproducibility | Exploitability | Affected Users | Discoverability | Mitigations | +| :----- | :------ | :-------------- | :------------- | :------------- | :-------------- | :---------- | +| 1. | ... tbd | | | | | | +| 2. | ... tbd | | | | | | + +Threat Score with values between 1 - 6 + +- Damage – how severe would the damage be if the attack is successful? 6 is a very bad damage. +- Reproducibility – how easy would the attack be reproducible? 6 is very easy to reproduce. +- Exploitability – How much time, effort and experience are necessary to exploit the threat? 6 is very easy to make. +- Affected Users – if a threat were exploited, how many percentage of users would be affected? +- Discoverability – How easy can an attack be discovered? Does the attacker have to expect prosecution? 6 is very hard to discover / is not illegal + +## Contributors + +In addition to direct committer our special thanks goes to the experts joining our discussions: + +- [kik](https://codeberg.org/oelmekki) + +## Reference + +[1]: https://en.wikipedia.org/wiki/Slowloris_(computer_security) +[2]: https://en.wikipedia.org/wiki/Replay_attack diff --git a/docs/developer/threat-analysis/threat-analysis-remote-login-propagation.md b/docs/developer/threat-analysis/threat-analysis-remote-login-propagation.md new file mode 100644 index 00000000..7dc33472 --- /dev/null +++ b/docs/developer/threat-analysis/threat-analysis-remote-login-propagation.md @@ -0,0 +1,93 @@ +--- +title: 'Threat Analysis: Remote Login Propagation' +license: 'CC-BY-SA-4.0' +--- + +See also [blog: geballte sicherheit][1] for getting an idea about the analysis. + +## Technical Background + +### Control Flow + +![diagram](../../_mermaid/_images/developer/threat-analysis/threat-analysis-remote-login-propagation-1.svg) + +### Data transferred + +``` +# NodeInfoWellKnown +{"links":[ + {"href":"https://federated-repo.prod.meissa.de/api/v1/nodeinfo", + "rel":"http://nodeinfo.diaspora.software/ns/schema/2.1"}]} + +# NodeInfo +{"version":"2.1", + "software":{"name":"gitea", + ...}} + +# LikeActivity +{"id": "https://repo.prod.meissa.de/api/v1/activitypub/user-id/1/outbox/12345", + "type": "Like", + "actor": "https://repo.prod.meissa.de/api/v1/activitypub/user-id/1", + "object": "https://codeberg.org/api/v1/activitypub/repository-id/12" + "startTime": "2014-12-31T23:00:00-08:00" +} + +# Person +{"id":"https://federated-repo.prod.meissa.de/api/v1/activitypub/user-id/10", + "type":"Person", + "preferredUsername":"stargoose9", + "name": "goose going to star the repo", + "publicKey":{"id":"https://federated-repo.prod.meissa.de/api/v1/activitypub/user-id/10#main-key", + "owner":"https://federated-repo.prod.meissa.de/api/v1/activitypub/user-id/10", + "publicKeyPem":"-----BEGIN PUBLIC KEY-----\nMIIBoj...XAgMBAAE=\n-----END PUBLIC KEY-----\n"}} +``` + +### Data Flow + +![diagram](../../_mermaid/_images/developer/threat-analysis/threat-analysis-remote-login-propagation-2.svg) + +## Analysis + +### Assets + +1. **Service Availability**: The availability of our or foreign servers. +2. **Instance Reputation**: We hope our project does not live on a spam instance. +3. **Project Reputation**: The reputation of an individual project. + +### Actors + +1. **Script Kiddies**: Boored teens, willing to do some illegal stuff without deep knowledge of tech details but broad knowledge across internet discussions. Able to do some bash / python scripting. +2. **Experienced Hacker**: Hacker with deep knowledge. +3. **Hacker**: Hacker with some knowledge. +4. **Malicious Fediverse Member**: Malicious Members of the fediverse, able to operate malicious forge instances. +5. **Malicious Forge Admin**: Admin of good reputation forge instance in the fediverse. +6. **Federated User**: Members of good reputation forge instance in the fediverse. + +### Threat + +1. tbd + +### Mitigations + +1. tbd + +### DREAD-Score + +| Threat | Damage | Reproducibility | Exploitability | Affected Users | Discoverability | Mitigations | +| :----- | :------ | :-------------- | :------------- | :------------- | :-------------- | :---------- | +| 1. | ... tbd | | | | | | +| 2. | ... tbd | | | | | | + +Threat Score with values between 1 - 6 + +- Damage – how severe would the damage be if the attack is successful? 6 is a very bad damage. +- Reproducibility – how easy would the attack be reproducible? 6 is very easy to reproduce. +- Exploitability – How much time, effort and experience are necessary to exploit the threat? 6 is very easy to make. +- Affected Users – if a threat were exploited, how many percentage of users would be affected? +- Discoverability – How easy can an attack be discovered? Does the attacker have to expect prosecution? 6 is very hard to discover / is not illegal + +## Contributors + +## Reference + +[1]: https://owasp.org/www-community/Threat_Modeling_Process diff --git a/package.json b/package.json index dfe71466..fdfaae11 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,8 @@ "lint:prettier": "prettier --check .", "format:remark": "remark . --quiet --frail --output", "format:prettier": "prettier -w --cache .", - "prepare": "husky install" + "prepare": "husky install", + "mermaid": "./scripts/mermaid_image_generate.sh" }, "lint-staged": { "*.md": "remark --quiet --frail", @@ -39,6 +40,7 @@ ] }, "devDependencies": { + "@mermaid-js/mermaid-cli": "^10.9.1", "husky": "^8.0.3", "lint-staged": "^14.0.0", "prettier": "^3.0.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 694df972..46fad34d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,9 @@ importers: .: devDependencies: + '@mermaid-js/mermaid-cli': + specifier: ^10.9.1 + version: 10.9.1 husky: specifier: ^8.0.3 version: 8.0.3 @@ -53,10 +56,18 @@ packages: resolution: {integrity: sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ==} engines: {node: '>=6.9.0'} + '@braintree/sanitize-url@6.0.4': + resolution: {integrity: sha512-s3jaWicZd0pkP0jf5ysyHUI/RE7MHos6qlToFcGWXVp+ykHOy77OUMrfbgJ9it2C5bow7OIQwYYaHjk9XlBQ2A==} + '@isaacs/cliui@8.0.2': resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} engines: {node: '>=12'} + '@mermaid-js/mermaid-cli@10.9.1': + resolution: {integrity: sha512-ajpGUKmB5YbRRzrFR+0dbykF9mTvce4FpHWGYPYTry8ZsOgP6h7SUnojyCJDGgbReCnArODCM8L212qIcxshIw==} + engines: {node: ^14.13 || >=16.0} + hasBin: true + '@npmcli/config@6.2.1': resolution: {integrity: sha512-Cj/OrSbrLvnwWuzquFCDTwFN8QmR+SWH6qLNCBttUreDkKM5D5p36SeSMbcEUiCGdwjUrVy2yd8C0REwwwDPEw==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -73,9 +84,28 @@ packages: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} + '@puppeteer/browsers@0.5.0': + resolution: {integrity: sha512-Uw6oB7VvmPRLE4iKsjuOh8zgDabhNX67dzo8U/BB0f9527qx+4eeUs+korU98OhG5C4ubg7ufBgVi63XYwS6TQ==} + engines: {node: '>=14.1.0'} + hasBin: true + peerDependencies: + typescript: '>= 4.7.4' + peerDependenciesMeta: + typescript: + optional: true + '@types/concat-stream@2.0.0': resolution: {integrity: sha512-t3YCerNM7NTVjLuICZo5gYAXYoDvpuuTceCcFQWcDQz26kxUR5uIWolxbIR5jRNIXpMqhOpW/b8imCR1LEmuJw==} + '@types/d3-scale-chromatic@3.0.3': + resolution: {integrity: sha512-laXM4+1o5ImZv3RpFAsTRn3TEkzqkytiOY0Dz0sq5cnd1dtNlk6sHLon4OvqaiJb28T0S/TdsBI3Sjsy+keJrw==} + + '@types/d3-scale@4.0.8': + resolution: {integrity: sha512-gkK1VVTr5iNiYJ7vWDI+yUFFlszhNMtVeneJ6lUTKPjprsvLLI9/tgEGiXJOnlINJA8FyA88gfnQsHbybVZrYQ==} + + '@types/d3-time@3.0.3': + resolution: {integrity: sha512-2p6olUZ4w3s+07q3Tm2dbiMZy5pCDfYwtLXXHUnVzXgQlZ/OyPtUz6OL382BkOuGlLXqfT+wqv8Fw2v8/0geBw==} + '@types/debug@4.1.8': resolution: {integrity: sha512-/vPO1EPOs306Cvhwv7KfVfYvOJqA/S/AXjaHQiJboCZzcNDb+TIJFN9/2C9DZ//ijSKWioNyUxD792QmDJ+HKQ==} @@ -109,10 +139,17 @@ packages: '@types/unist@2.0.7': resolution: {integrity: sha512-cputDpIbFgLUaGQn6Vqg3/YsJwxUwHLO13v3i5ouxT4lat0khip9AEWxtERujXV9wxIB1EyF97BSJFt6vpdI8g==} + '@types/yauzl@2.10.3': + resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} + abbrev@2.0.0: resolution: {integrity: sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + agent-base@6.0.2: + resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} + engines: {node: '>= 6.0.0'} + ansi-escapes@5.0.0: resolution: {integrity: sha512-5GFMVX8HqE/TB+FuBJGuO5XG0WrsA6ptUqoODaT/n9mmUaZFkqnBueB4leqGBCmrUHnCnC4PCZTCd0E7QQ83bA==} engines: {node: '>=12'} @@ -141,16 +178,25 @@ packages: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + bail@2.0.2: resolution: {integrity: sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==} balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + base64-js@1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + binary-extensions@2.2.0: resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} engines: {node: '>=8'} + bl@4.1.0: + resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} + brace-expansion@2.0.1: resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} @@ -158,9 +204,19 @@ packages: resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} engines: {node: '>=8'} + buffer-crc32@0.2.13: + resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} + buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + buffer@5.7.1: + resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} + + callsites@3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + camelcase@7.0.1: resolution: {integrity: sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==} engines: {node: '>=14.16'} @@ -180,6 +236,14 @@ packages: resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} engines: {node: '>= 8.10.0'} + chownr@1.1.4: + resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} + + chromium-bidi@0.4.7: + resolution: {integrity: sha512-6+mJuFXwTMU6I3vYLs6IL8A1DyQTPjCfIL971X0aMPVGRbGnNfl6i6Cl0NMbxi2bRYLGESt9T2ZIMRM5PAEcIQ==} + peerDependencies: + devtools-protocol: '*' + ci-info@3.8.0: resolution: {integrity: sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==} engines: {node: '>=8'} @@ -192,6 +256,10 @@ packages: resolution: {integrity: sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} @@ -208,18 +276,194 @@ packages: colorette@2.0.20: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} + commander@10.0.1: + resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} + engines: {node: '>=14'} + commander@11.0.0: resolution: {integrity: sha512-9HMlXtt/BNoYr8ooyjjNRdIilOTkVJXB+GhxMTtOKwk0R4j4lS4NpjuqmRxroBfnfTSHQIHQB7wryHhXarNjmQ==} engines: {node: '>=16'} + commander@7.2.0: + resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==} + engines: {node: '>= 10'} + + commander@8.3.0: + resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==} + engines: {node: '>= 12'} + concat-stream@2.0.0: resolution: {integrity: sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==} engines: {'0': node >= 6.0} + cose-base@1.0.3: + resolution: {integrity: sha512-s9whTXInMSgAp/NVXVNuVxVKzGH2qck3aQlVHxDCdAEPgtMKwc4Wq6/QKhgdEdgbLSi9rBTAcPoRa6JpiG4ksg==} + + cosmiconfig@8.1.3: + resolution: {integrity: sha512-/UkO2JKI18b5jVMJUp0lvKFMpa/Gye+ZgZjKD+DGEN9y7NRcf/nK1A0sp67ONmKtnDCNMS44E6jrk0Yc3bDuUw==} + engines: {node: '>=14'} + + cross-fetch@3.1.5: + resolution: {integrity: sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==} + cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} + cytoscape-cose-bilkent@4.1.0: + resolution: {integrity: sha512-wgQlVIUJF13Quxiv5e1gstZ08rnZj2XaLHGoFMYXz7SkNfCDOOteKBE6SYRfA9WxxI/iBc3ajfDoc6hb/MRAHQ==} + peerDependencies: + cytoscape: ^3.2.0 + + cytoscape@3.29.2: + resolution: {integrity: sha512-2G1ycU28Nh7OHT9rkXRLpCDP30MKH1dXJORZuBhtEhEW7pKwgPi77ImqlCWinouyE1PNepIOGZBOrE84DG7LyQ==} + engines: {node: '>=0.10'} + + d3-array@2.12.1: + resolution: {integrity: sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ==} + + d3-array@3.2.4: + resolution: {integrity: sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==} + engines: {node: '>=12'} + + d3-axis@3.0.0: + resolution: {integrity: sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw==} + engines: {node: '>=12'} + + d3-brush@3.0.0: + resolution: {integrity: sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ==} + engines: {node: '>=12'} + + d3-chord@3.0.1: + resolution: {integrity: sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g==} + engines: {node: '>=12'} + + d3-color@3.1.0: + resolution: {integrity: sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==} + engines: {node: '>=12'} + + d3-contour@4.0.2: + resolution: {integrity: sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA==} + engines: {node: '>=12'} + + d3-delaunay@6.0.4: + resolution: {integrity: sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A==} + engines: {node: '>=12'} + + d3-dispatch@3.0.1: + resolution: {integrity: sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==} + engines: {node: '>=12'} + + d3-drag@3.0.0: + resolution: {integrity: sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==} + engines: {node: '>=12'} + + d3-dsv@3.0.1: + resolution: {integrity: sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q==} + engines: {node: '>=12'} + hasBin: true + + d3-ease@3.0.1: + resolution: {integrity: sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==} + engines: {node: '>=12'} + + d3-fetch@3.0.1: + resolution: {integrity: sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw==} + engines: {node: '>=12'} + + d3-force@3.0.0: + resolution: {integrity: sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==} + engines: {node: '>=12'} + + d3-format@3.1.0: + resolution: {integrity: sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==} + engines: {node: '>=12'} + + d3-geo@3.1.1: + resolution: {integrity: sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q==} + engines: {node: '>=12'} + + d3-hierarchy@3.1.2: + resolution: {integrity: sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA==} + engines: {node: '>=12'} + + d3-interpolate@3.0.1: + resolution: {integrity: sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==} + engines: {node: '>=12'} + + d3-path@1.0.9: + resolution: {integrity: sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg==} + + d3-path@3.1.0: + resolution: {integrity: sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==} + engines: {node: '>=12'} + + d3-polygon@3.0.1: + resolution: {integrity: sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg==} + engines: {node: '>=12'} + + d3-quadtree@3.0.1: + resolution: {integrity: sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==} + engines: {node: '>=12'} + + d3-random@3.0.1: + resolution: {integrity: sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ==} + engines: {node: '>=12'} + + d3-sankey@0.12.3: + resolution: {integrity: sha512-nQhsBRmM19Ax5xEIPLMY9ZmJ/cDvd1BG3UVvt5h3WRxKg5zGRbvnteTyWAbzeSvlh3tW7ZEmq4VwR5mB3tutmQ==} + + d3-scale-chromatic@3.1.0: + resolution: {integrity: sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ==} + engines: {node: '>=12'} + + d3-scale@4.0.2: + resolution: {integrity: sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==} + engines: {node: '>=12'} + + d3-selection@3.0.0: + resolution: {integrity: sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==} + engines: {node: '>=12'} + + d3-shape@1.3.7: + resolution: {integrity: sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==} + + d3-shape@3.2.0: + resolution: {integrity: sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==} + engines: {node: '>=12'} + + d3-time-format@4.1.0: + resolution: {integrity: sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==} + engines: {node: '>=12'} + + d3-time@3.1.0: + resolution: {integrity: sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==} + engines: {node: '>=12'} + + d3-timer@3.0.1: + resolution: {integrity: sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==} + engines: {node: '>=12'} + + d3-transition@3.0.1: + resolution: {integrity: sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==} + engines: {node: '>=12'} + peerDependencies: + d3-selection: 2 - 3 + + d3-zoom@3.0.0: + resolution: {integrity: sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==} + engines: {node: '>=12'} + + d3@7.9.0: + resolution: {integrity: sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA==} + engines: {node: '>=12'} + + dagre-d3-es@7.0.10: + resolution: {integrity: sha512-qTCQmEhcynucuaZgY5/+ti3X/rnszKZhEQH/ZdWdtP1tA/y3VoHJzcVrO9pjjJCNpigfscAtoUB5ONcd2wNn0A==} + + dayjs@1.11.11: + resolution: {integrity: sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==} + debug@4.3.4: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -232,26 +476,45 @@ packages: decode-named-character-reference@1.0.2: resolution: {integrity: sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==} + delaunator@5.0.1: + resolution: {integrity: sha512-8nvh+XBe96aCESrGOqMp/84b13H9cdKbG5P2ejQCh4d4sK9RL4371qou9drQjMhvnPmhWl5hnmqbEE0fXr9Xnw==} + dequal@2.0.3: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} engines: {node: '>=6'} + devtools-protocol@0.0.1107588: + resolution: {integrity: sha512-yIR+pG9x65Xko7bErCUSQaDLrO/P1p3JUzEk7JCU4DowPcGHkTGUGQapcfcLc4qj0UaALwZ+cr0riFgiqpixcg==} + diff@5.1.0: resolution: {integrity: sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==} engines: {node: '>=0.3.1'} + dompurify@3.1.5: + resolution: {integrity: sha512-lwG+n5h8QNpxtyrJW/gJWckL+1/DQiYMX8f7t8Z2AZTPw1esVrqjI63i7Zc2Gz0aKzLVMYC1V1PL/ky+aY/NgA==} + eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + elkjs@0.9.3: + resolution: {integrity: sha512-f/ZeWvW/BCXbhGEf1Ujp29EASo/lk1FDnETgNKwJrsVvGZhUWCZyg3xLJjAsxfOmt8KjswHmI5EwCQcPMpOYhQ==} + emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} emoji-regex@9.2.2: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + end-of-stream@1.4.4: + resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} + error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} + escalade@3.1.2: + resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} + engines: {node: '>=6'} + escape-string-regexp@1.0.5: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} @@ -266,9 +529,17 @@ packages: extend@3.0.2: resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} + extract-zip@2.0.1: + resolution: {integrity: sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==} + engines: {node: '>= 10.17.0'} + hasBin: true + fault@2.0.1: resolution: {integrity: sha512-WtySTkS4OKev5JtpHXnib4Gxiurzh5NCGvWrFaZ34m6JehfTUhKZvn9njTfw48t6JumVQOmrKqpmGcdwxnhqBQ==} + fd-slicer@1.1.0: + resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==} + fill-range@7.0.1: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} @@ -281,6 +552,9 @@ packages: resolution: {integrity: sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==} engines: {node: '>=0.4.x'} + fs-constants@1.0.0: + resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} + fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} @@ -289,6 +563,14 @@ packages: engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + + get-stream@5.2.0: + resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} + engines: {node: '>=8'} + get-stream@6.0.1: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} @@ -310,6 +592,10 @@ packages: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} + https-proxy-agent@5.0.1: + resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} + engines: {node: '>= 6'} + human-signals@4.3.1: resolution: {integrity: sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==} engines: {node: '>=14.18.0'} @@ -319,10 +605,21 @@ packages: engines: {node: '>=14'} hasBin: true + iconv-lite@0.6.3: + resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} + engines: {node: '>=0.10.0'} + + ieee754@1.2.1: + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + ignore@5.2.4: resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} engines: {node: '>= 4'} + import-fresh@3.3.0: + resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} + engines: {node: '>=6'} + import-meta-resolve@2.2.2: resolution: {integrity: sha512-f8KcQ1D80V7RnqVm+/lirO9zkOxjGxhaTC1IPrBGd3MEfNgmNG67tSUO9gTi2F3Blr2Az6g1vocaxzkVnWl9MA==} @@ -336,6 +633,13 @@ packages: resolution: {integrity: sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + internmap@1.0.1: + resolution: {integrity: sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw==} + + internmap@2.0.3: + resolution: {integrity: sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==} + engines: {node: '>=12'} + is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} @@ -388,6 +692,10 @@ packages: js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + js-yaml@4.1.0: + resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} + hasBin: true + json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} @@ -400,14 +708,27 @@ packages: engines: {node: '>=6'} hasBin: true + katex@0.16.10: + resolution: {integrity: sha512-ZiqaC04tp2O5utMsl2TEZTXxa6WSC4yo0fv5ML++D3QZv/vx2Mct0mTlRx3O+uUkjfuAgOkzsCmq5MiUEsDDdA==} + hasBin: true + + khroma@2.1.0: + resolution: {integrity: sha512-Ls993zuzfayK269Svk9hzpeGUKob/sIgZzyHYdjQoAdQetRKpOLj+k/QQQ/6Qi0Yz65mlROrfd+Ev+1+7dz9Kw==} + kleur@4.1.5: resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} engines: {node: '>=6'} + layout-base@1.0.2: + resolution: {integrity: sha512-8h2oVEZNktL4BH2JCOI90iD1yXwL6iNW7KcCKT2QZgQJR2vbqDsldCTPRU9NifTCqHZci57XvQQ15YTu+sTYPg==} + lilconfig@2.1.0: resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} engines: {node: '>=10'} + lines-and-columns@1.2.4: + resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + lines-and-columns@2.0.3: resolution: {integrity: sha512-cNOjgCnLB+FnvWWtyRTzmB3POJ+cXxTA81LoW7u8JdmhfXzriropYwpjShnz1QLLWsQwY7nIxoDmcPTwphDK9w==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -429,6 +750,9 @@ packages: load-plugin@5.1.0: resolution: {integrity: sha512-Lg1CZa1CFj2CbNaxijTL6PCbzd4qGTlZov+iH2p5Xwy/ApcZJh+i6jMN2cYePouTfjJfrNu3nXFdEw8LvbjPFQ==} + lodash-es@4.17.21: + resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==} + log-update@5.0.1: resolution: {integrity: sha512-5UtUDQ/6edw4ofyljDNcOVJQ4c7OjDro4h3y8e1GQL5iYElYclVHJ3zeWchylvMaKnDbDilC8irOVyexnA/Slw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -471,6 +795,9 @@ packages: merge-stream@2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} + mermaid@10.9.1: + resolution: {integrity: sha512-Mx45Obds5W1UkW1nv/7dHRsbfMM1aOKA2+Pxs/IGHNonygDHwmng8xTHyS9z4KWVi0rbko8gjiBmuwwXQ7tiNA==} + micromark-core-commonmark@1.1.0: resolution: {integrity: sha512-BgHO1aRbolh2hcrzL2d1La37V0Aoz73ymF8rAcKnohLy93titmv62E0gP8Hrx9PKcKrqCZ1BbLGbP3bEhoXYlw==} @@ -564,6 +891,12 @@ packages: resolution: {integrity: sha512-LhbbwCfz3vsb12j/WkWQPZfKTsgqIe1Nf/ti1pKjYESGLHIVjWU96G9/ljLH4F9mWNVhlQOm0VySdAWzf05dpg==} engines: {node: '>=16 || 14 >=14.17'} + mitt@3.0.0: + resolution: {integrity: sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ==} + + mkdirp-classic@0.5.3: + resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==} + mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} @@ -571,6 +904,18 @@ packages: ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} + node-fetch@2.6.7: + resolution: {integrity: sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + + non-layered-tidy-tree-layout@2.0.2: + resolution: {integrity: sha512-gkXMxRzUH+PB0ax9dUN0yYF0S25BqeAYqhgMaLUFmpXLEk7Fcu8f4emJuOAY0V8kjDICxROIKsTAKsV/v355xw==} + nopt@7.2.0: resolution: {integrity: sha512-CVDtwCdhYIvnAzFoJ6NJ6dX3oga9/HyciQDnG1vQDjSLMeKLJ4A93ZqYKDrgYSr1FBY5/hMYC+2VCi24pgpkGA==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -599,6 +944,14 @@ packages: resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} engines: {node: '>=12'} + parent-module@1.0.1: + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} + + parse-json@5.2.0: + resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} + engines: {node: '>=8'} + parse-json@6.0.2: resolution: {integrity: sha512-SA5aMiaIjXkAiBrW/yPgLgQAQg42f7K3ACO+2l/zOvtQBwX58DMUsFJXelW2fx3yMBmWOVkR6j1MGsdSbCA4UA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -615,6 +968,13 @@ packages: resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==} engines: {node: '>=16 || 14 >=14.17'} + path-type@4.0.0: + resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} + engines: {node: '>=8'} + + pend@1.2.0: + resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} + picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} @@ -637,6 +997,29 @@ packages: resolution: {integrity: sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + progress@2.0.3: + resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==} + engines: {node: '>=0.4.0'} + + proxy-from-env@1.1.0: + resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} + + pump@3.0.0: + resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} + + puppeteer-core@19.11.1: + resolution: {integrity: sha512-qcuC2Uf0Fwdj9wNtaTZ2OvYRraXpAK+puwwVW8ofOhOgLPZyz1c68tsorfIZyCUOpyBisjr+xByu7BMbEYMepA==} + engines: {node: '>=14.14.0'} + peerDependencies: + typescript: '>= 4.7.4' + peerDependenciesMeta: + typescript: + optional: true + + puppeteer@19.11.1: + resolution: {integrity: sha512-39olGaX2djYUdhaQQHDZ0T0GwEp+5f9UB9HmEP0qHfdQHIq0xGQZuAZ5TLnJIc/88SrPLpEflPC+xUqOTv3c5g==} + deprecated: < 22.5.0 is no longer supported + read-package-json-fast@3.0.2: resolution: {integrity: sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -752,6 +1135,14 @@ packages: remark@14.0.3: resolution: {integrity: sha512-bfmJW1dmR2LvaMJuAnE88pZP9DktIFYXazkTfOIKZzi3Knk9lT0roItIA24ydOucI3bV/g/tXBA6hzqq3FV9Ew==} + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + + resolve-from@4.0.0: + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} + restore-cursor@4.0.0: resolution: {integrity: sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -759,6 +1150,12 @@ packages: rfdc@1.3.0: resolution: {integrity: sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==} + robust-predicates@3.0.2: + resolution: {integrity: sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==} + + rw@1.3.3: + resolution: {integrity: sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==} + sade@1.8.1: resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==} engines: {node: '>=6'} @@ -766,6 +1163,9 @@ packages: safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + semver@7.5.4: resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} engines: {node: '>=10'} @@ -817,6 +1217,9 @@ packages: resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} engines: {node: '>=12'} + stylis@4.3.2: + resolution: {integrity: sha512-bhtUjWd/z6ltJiQwg0dUfxEJ+W+jdqQd8TbWLWyeIJHlnsqmGLRFFd8e5mA0AZi/zx90smXRlN66YMTcaSFifg==} + supports-color@5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} @@ -825,9 +1228,19 @@ packages: resolution: {integrity: sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==} engines: {node: '>=12'} + tar-fs@2.1.1: + resolution: {integrity: sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==} + + tar-stream@2.2.0: + resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} + engines: {node: '>=6'} + text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} + through@2.3.8: + resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} + to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} @@ -835,9 +1248,16 @@ packages: to-vfile@7.2.4: resolution: {integrity: sha512-2eQ+rJ2qGbyw3senPI0qjuM7aut8IYXK6AEoOWb+fJx/mQYzviTckm1wDjq91QYHAPBTYzmdJXxMFA6Mk14mdw==} + tr46@0.0.3: + resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + trough@2.1.0: resolution: {integrity: sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g==} + ts-dedent@2.2.0: + resolution: {integrity: sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==} + engines: {node: '>=6.10'} + type-fest@1.4.0: resolution: {integrity: sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==} engines: {node: '>=10'} @@ -845,6 +1265,9 @@ packages: typedarray@0.0.6: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} + unbzip2-stream@1.4.3: + resolution: {integrity: sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==} + unified-args@10.0.0: resolution: {integrity: sha512-PqsqxwkXpGSLiMkbjNnKU33Ffm6gso6rAvz1TlBGzMBx3gpx7ewIhViBX8HEWmy0v7pebA5PM6RkRWWaYmtfYw==} @@ -890,6 +1313,10 @@ packages: util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + uuid@9.0.1: + resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} + hasBin: true + uvu@0.5.6: resolution: {integrity: sha512-+g8ENReyr8YsOc6fv/NVJs2vFdHBnBNdfE49rshrTzDWOlUx4Gq7KOS2GD8eqhy2j+Ejq29+SbKH8yjkAqXqoA==} engines: {node: '>=8'} @@ -916,6 +1343,15 @@ packages: walk-up-path@3.0.1: resolution: {integrity: sha512-9YlCL/ynK3CTlrSRrDxZvUauLzAswPCrsaCgilqFevUYpeEW0/3ScEjaa3kbW/T0ghhkEr7mv+fpjqn1Y1YuTA==} + web-worker@1.3.0: + resolution: {integrity: sha512-BSR9wyRsy/KOValMgd5kMyr3JzpdeoR9KVId8u5GVlTTAtNChlsE4yTxeY7zMdNSyOmoKBv8NH2qeRY9Tg+IaA==} + + webidl-conversions@3.0.1: + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + + whatwg-url@5.0.0: + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} @@ -932,6 +1368,22 @@ packages: wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + ws@8.13.0: + resolution: {integrity: sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} @@ -939,6 +1391,17 @@ packages: resolution: {integrity: sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==} engines: {node: '>= 14'} + yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + + yargs@17.7.1: + resolution: {integrity: sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==} + engines: {node: '>=12'} + + yauzl@2.10.0: + resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} + zwitch@2.0.4: resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} @@ -957,6 +1420,8 @@ snapshots: chalk: 2.4.2 js-tokens: 4.0.0 + '@braintree/sanitize-url@6.0.4': {} + '@isaacs/cliui@8.0.2': dependencies: string-width: 5.1.2 @@ -966,6 +1431,19 @@ snapshots: wrap-ansi: 8.1.0 wrap-ansi-cjs: wrap-ansi@7.0.0 + '@mermaid-js/mermaid-cli@10.9.1': + dependencies: + chalk: 5.3.0 + commander: 10.0.1 + mermaid: 10.9.1 + puppeteer: 19.11.1 + transitivePeerDependencies: + - bufferutil + - encoding + - supports-color + - typescript + - utf-8-validate + '@npmcli/config@6.2.1': dependencies: '@npmcli/map-workspaces': 3.0.4 @@ -989,10 +1467,31 @@ snapshots: '@pkgjs/parseargs@0.11.0': optional: true + '@puppeteer/browsers@0.5.0': + dependencies: + debug: 4.3.4 + extract-zip: 2.0.1 + https-proxy-agent: 5.0.1 + progress: 2.0.3 + proxy-from-env: 1.1.0 + tar-fs: 2.1.1 + unbzip2-stream: 1.4.3 + yargs: 17.7.1 + transitivePeerDependencies: + - supports-color + '@types/concat-stream@2.0.0': dependencies: '@types/node': 18.17.5 + '@types/d3-scale-chromatic@3.0.3': {} + + '@types/d3-scale@4.0.8': + dependencies: + '@types/d3-time': 3.0.3 + + '@types/d3-time@3.0.3': {} + '@types/debug@4.1.8': dependencies: '@types/ms': 0.7.31 @@ -1023,8 +1522,19 @@ snapshots: '@types/unist@2.0.7': {} + '@types/yauzl@2.10.3': + dependencies: + '@types/node': 18.17.5 + optional: true + abbrev@2.0.0: {} + agent-base@6.0.2: + dependencies: + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + ansi-escapes@5.0.0: dependencies: type-fest: 1.4.0 @@ -1048,12 +1558,22 @@ snapshots: normalize-path: 3.0.0 picomatch: 2.3.1 + argparse@2.0.1: {} + bail@2.0.2: {} balanced-match@1.0.2: {} + base64-js@1.5.1: {} + binary-extensions@2.2.0: {} + bl@4.1.0: + dependencies: + buffer: 5.7.1 + inherits: 2.0.4 + readable-stream: 3.6.2 + brace-expansion@2.0.1: dependencies: balanced-match: 1.0.2 @@ -1062,8 +1582,17 @@ snapshots: dependencies: fill-range: 7.0.1 + buffer-crc32@0.2.13: {} + buffer-from@1.1.2: {} + buffer@5.7.1: + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + + callsites@3.1.0: {} + camelcase@7.0.1: {} chalk@2.4.2: @@ -1088,6 +1617,13 @@ snapshots: optionalDependencies: fsevents: 2.3.2 + chownr@1.1.4: {} + + chromium-bidi@0.4.7(devtools-protocol@0.0.1107588): + dependencies: + devtools-protocol: 0.0.1107588 + mitt: 3.0.0 + ci-info@3.8.0: {} cli-cursor@4.0.0: @@ -1099,6 +1635,12 @@ snapshots: slice-ansi: 5.0.0 string-width: 5.1.2 + cliui@8.0.1: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + color-convert@1.9.3: dependencies: color-name: 1.1.3 @@ -1113,8 +1655,14 @@ snapshots: colorette@2.0.20: {} + commander@10.0.1: {} + commander@11.0.0: {} + commander@7.2.0: {} + + commander@8.3.0: {} + concat-stream@2.0.0: dependencies: buffer-from: 1.1.2 @@ -1122,12 +1670,210 @@ snapshots: readable-stream: 3.6.2 typedarray: 0.0.6 + cose-base@1.0.3: + dependencies: + layout-base: 1.0.2 + + cosmiconfig@8.1.3: + dependencies: + import-fresh: 3.3.0 + js-yaml: 4.1.0 + parse-json: 5.2.0 + path-type: 4.0.0 + + cross-fetch@3.1.5: + dependencies: + node-fetch: 2.6.7 + transitivePeerDependencies: + - encoding + cross-spawn@7.0.3: dependencies: path-key: 3.1.1 shebang-command: 2.0.0 which: 2.0.2 + cytoscape-cose-bilkent@4.1.0(cytoscape@3.29.2): + dependencies: + cose-base: 1.0.3 + cytoscape: 3.29.2 + + cytoscape@3.29.2: {} + + d3-array@2.12.1: + dependencies: + internmap: 1.0.1 + + d3-array@3.2.4: + dependencies: + internmap: 2.0.3 + + d3-axis@3.0.0: {} + + d3-brush@3.0.0: + dependencies: + d3-dispatch: 3.0.1 + d3-drag: 3.0.0 + d3-interpolate: 3.0.1 + d3-selection: 3.0.0 + d3-transition: 3.0.1(d3-selection@3.0.0) + + d3-chord@3.0.1: + dependencies: + d3-path: 3.1.0 + + d3-color@3.1.0: {} + + d3-contour@4.0.2: + dependencies: + d3-array: 3.2.4 + + d3-delaunay@6.0.4: + dependencies: + delaunator: 5.0.1 + + d3-dispatch@3.0.1: {} + + d3-drag@3.0.0: + dependencies: + d3-dispatch: 3.0.1 + d3-selection: 3.0.0 + + d3-dsv@3.0.1: + dependencies: + commander: 7.2.0 + iconv-lite: 0.6.3 + rw: 1.3.3 + + d3-ease@3.0.1: {} + + d3-fetch@3.0.1: + dependencies: + d3-dsv: 3.0.1 + + d3-force@3.0.0: + dependencies: + d3-dispatch: 3.0.1 + d3-quadtree: 3.0.1 + d3-timer: 3.0.1 + + d3-format@3.1.0: {} + + d3-geo@3.1.1: + dependencies: + d3-array: 3.2.4 + + d3-hierarchy@3.1.2: {} + + d3-interpolate@3.0.1: + dependencies: + d3-color: 3.1.0 + + d3-path@1.0.9: {} + + d3-path@3.1.0: {} + + d3-polygon@3.0.1: {} + + d3-quadtree@3.0.1: {} + + d3-random@3.0.1: {} + + d3-sankey@0.12.3: + dependencies: + d3-array: 2.12.1 + d3-shape: 1.3.7 + + d3-scale-chromatic@3.1.0: + dependencies: + d3-color: 3.1.0 + d3-interpolate: 3.0.1 + + d3-scale@4.0.2: + dependencies: + d3-array: 3.2.4 + d3-format: 3.1.0 + d3-interpolate: 3.0.1 + d3-time: 3.1.0 + d3-time-format: 4.1.0 + + d3-selection@3.0.0: {} + + d3-shape@1.3.7: + dependencies: + d3-path: 1.0.9 + + d3-shape@3.2.0: + dependencies: + d3-path: 3.1.0 + + d3-time-format@4.1.0: + dependencies: + d3-time: 3.1.0 + + d3-time@3.1.0: + dependencies: + d3-array: 3.2.4 + + d3-timer@3.0.1: {} + + d3-transition@3.0.1(d3-selection@3.0.0): + dependencies: + d3-color: 3.1.0 + d3-dispatch: 3.0.1 + d3-ease: 3.0.1 + d3-interpolate: 3.0.1 + d3-selection: 3.0.0 + d3-timer: 3.0.1 + + d3-zoom@3.0.0: + dependencies: + d3-dispatch: 3.0.1 + d3-drag: 3.0.0 + d3-interpolate: 3.0.1 + d3-selection: 3.0.0 + d3-transition: 3.0.1(d3-selection@3.0.0) + + d3@7.9.0: + dependencies: + d3-array: 3.2.4 + d3-axis: 3.0.0 + d3-brush: 3.0.0 + d3-chord: 3.0.1 + d3-color: 3.1.0 + d3-contour: 4.0.2 + d3-delaunay: 6.0.4 + d3-dispatch: 3.0.1 + d3-drag: 3.0.0 + d3-dsv: 3.0.1 + d3-ease: 3.0.1 + d3-fetch: 3.0.1 + d3-force: 3.0.0 + d3-format: 3.1.0 + d3-geo: 3.1.1 + d3-hierarchy: 3.1.2 + d3-interpolate: 3.0.1 + d3-path: 3.1.0 + d3-polygon: 3.0.1 + d3-quadtree: 3.0.1 + d3-random: 3.0.1 + d3-scale: 4.0.2 + d3-scale-chromatic: 3.1.0 + d3-selection: 3.0.0 + d3-shape: 3.2.0 + d3-time: 3.1.0 + d3-time-format: 4.1.0 + d3-timer: 3.0.1 + d3-transition: 3.0.1(d3-selection@3.0.0) + d3-zoom: 3.0.0 + + dagre-d3-es@7.0.10: + dependencies: + d3: 7.9.0 + lodash-es: 4.17.21 + + dayjs@1.11.11: {} + debug@4.3.4: dependencies: ms: 2.1.2 @@ -1136,20 +1882,36 @@ snapshots: dependencies: character-entities: 2.0.2 + delaunator@5.0.1: + dependencies: + robust-predicates: 3.0.2 + dequal@2.0.3: {} + devtools-protocol@0.0.1107588: {} + diff@5.1.0: {} + dompurify@3.1.5: {} + eastasianwidth@0.2.0: {} + elkjs@0.9.3: {} + emoji-regex@8.0.0: {} emoji-regex@9.2.2: {} + end-of-stream@1.4.4: + dependencies: + once: 1.4.0 + error-ex@1.3.2: dependencies: is-arrayish: 0.2.1 + escalade@3.1.2: {} + escape-string-regexp@1.0.5: {} eventemitter3@5.0.1: {} @@ -1168,10 +1930,24 @@ snapshots: extend@3.0.2: {} + extract-zip@2.0.1: + dependencies: + debug: 4.3.4 + get-stream: 5.2.0 + yauzl: 2.10.0 + optionalDependencies: + '@types/yauzl': 2.10.3 + transitivePeerDependencies: + - supports-color + fault@2.0.1: dependencies: format: 0.2.2 + fd-slicer@1.1.0: + dependencies: + pend: 1.2.0 + fill-range@7.0.1: dependencies: to-regex-range: 5.0.1 @@ -1183,11 +1959,19 @@ snapshots: format@0.2.2: {} + fs-constants@1.0.0: {} + fs.realpath@1.0.0: {} fsevents@2.3.2: optional: true + get-caller-file@2.0.5: {} + + get-stream@5.2.0: + dependencies: + pump: 3.0.0 + get-stream@6.0.1: {} glob-parent@5.1.2: @@ -1212,12 +1996,30 @@ snapshots: has-flag@3.0.0: {} + https-proxy-agent@5.0.1: + dependencies: + agent-base: 6.0.2 + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + human-signals@4.3.1: {} husky@8.0.3: {} + iconv-lite@0.6.3: + dependencies: + safer-buffer: 2.1.2 + + ieee754@1.2.1: {} + ignore@5.2.4: {} + import-fresh@3.3.0: + dependencies: + parent-module: 1.0.1 + resolve-from: 4.0.0 + import-meta-resolve@2.2.2: {} inflight@1.0.6: @@ -1229,6 +2031,10 @@ snapshots: ini@4.1.1: {} + internmap@1.0.1: {} + + internmap@2.0.3: {} + is-arrayish@0.2.1: {} is-binary-path@2.1.0: @@ -1265,16 +2071,30 @@ snapshots: js-tokens@4.0.0: {} + js-yaml@4.1.0: + dependencies: + argparse: 2.0.1 + json-parse-even-better-errors@2.3.1: {} json-parse-even-better-errors@3.0.0: {} json5@2.2.3: {} + katex@0.16.10: + dependencies: + commander: 8.3.0 + + khroma@2.1.0: {} + kleur@4.1.5: {} + layout-base@1.0.2: {} + lilconfig@2.1.0: {} + lines-and-columns@1.2.4: {} + lines-and-columns@2.0.3: {} lint-staged@14.0.0: @@ -1307,6 +2127,8 @@ snapshots: '@npmcli/config': 6.2.1 import-meta-resolve: 2.2.2 + lodash-es@4.17.21: {} + log-update@5.0.1: dependencies: ansi-escapes: 5.0.0 @@ -1389,6 +2211,31 @@ snapshots: merge-stream@2.0.0: {} + mermaid@10.9.1: + dependencies: + '@braintree/sanitize-url': 6.0.4 + '@types/d3-scale': 4.0.8 + '@types/d3-scale-chromatic': 3.0.3 + cytoscape: 3.29.2 + cytoscape-cose-bilkent: 4.1.0(cytoscape@3.29.2) + d3: 7.9.0 + d3-sankey: 0.12.3 + dagre-d3-es: 7.0.10 + dayjs: 1.11.11 + dompurify: 3.1.5 + elkjs: 0.9.3 + katex: 0.16.10 + khroma: 2.1.0 + lodash-es: 4.17.21 + mdast-util-from-markdown: 1.3.1 + non-layered-tidy-tree-layout: 2.0.2 + stylis: 4.3.2 + ts-dedent: 2.2.0 + uuid: 9.0.1 + web-worker: 1.3.0 + transitivePeerDependencies: + - supports-color + micromark-core-commonmark@1.1.0: dependencies: decode-named-character-reference: 1.0.2 @@ -1550,10 +2397,20 @@ snapshots: minipass@7.0.3: {} + mitt@3.0.0: {} + + mkdirp-classic@0.5.3: {} + mri@1.2.0: {} ms@2.1.2: {} + node-fetch@2.6.7: + dependencies: + whatwg-url: 5.0.0 + + non-layered-tidy-tree-layout@2.0.2: {} + nopt@7.2.0: dependencies: abbrev: 2.0.0 @@ -1578,6 +2435,17 @@ snapshots: dependencies: mimic-fn: 4.0.0 + parent-module@1.0.1: + dependencies: + callsites: 3.1.0 + + parse-json@5.2.0: + dependencies: + '@babel/code-frame': 7.22.10 + error-ex: 1.3.2 + json-parse-even-better-errors: 2.3.1 + lines-and-columns: 1.2.4 + parse-json@6.0.2: dependencies: '@babel/code-frame': 7.22.10 @@ -1594,6 +2462,10 @@ snapshots: lru-cache: 10.0.1 minipass: 7.0.3 + path-type@4.0.0: {} + + pend@1.2.0: {} + picomatch@2.3.1: {} pidtree@0.6.0: {} @@ -1604,6 +2476,49 @@ snapshots: proc-log@3.0.0: {} + progress@2.0.3: {} + + proxy-from-env@1.1.0: {} + + pump@3.0.0: + dependencies: + end-of-stream: 1.4.4 + once: 1.4.0 + + puppeteer-core@19.11.1: + dependencies: + '@puppeteer/browsers': 0.5.0 + chromium-bidi: 0.4.7(devtools-protocol@0.0.1107588) + cross-fetch: 3.1.5 + debug: 4.3.4 + devtools-protocol: 0.0.1107588 + extract-zip: 2.0.1 + https-proxy-agent: 5.0.1 + proxy-from-env: 1.1.0 + tar-fs: 2.1.1 + unbzip2-stream: 1.4.3 + ws: 8.13.0 + transitivePeerDependencies: + - bufferutil + - encoding + - supports-color + - utf-8-validate + + puppeteer@19.11.1: + dependencies: + '@puppeteer/browsers': 0.5.0 + cosmiconfig: 8.1.3 + https-proxy-agent: 5.0.1 + progress: 2.0.3 + proxy-from-env: 1.1.0 + puppeteer-core: 19.11.1 + transitivePeerDependencies: + - bufferutil + - encoding + - supports-color + - typescript + - utf-8-validate + read-package-json-fast@3.0.2: dependencies: json-parse-even-better-errors: 3.0.0 @@ -1938,6 +2853,10 @@ snapshots: transitivePeerDependencies: - supports-color + require-directory@2.1.1: {} + + resolve-from@4.0.0: {} + restore-cursor@4.0.0: dependencies: onetime: 5.1.2 @@ -1945,12 +2864,18 @@ snapshots: rfdc@1.3.0: {} + robust-predicates@3.0.2: {} + + rw@1.3.3: {} + sade@1.8.1: dependencies: mri: 1.2.0 safe-buffer@5.2.1: {} + safer-buffer@2.1.2: {} + semver@7.5.4: dependencies: lru-cache: 6.0.0 @@ -1998,14 +2923,33 @@ snapshots: strip-final-newline@3.0.0: {} + stylis@4.3.2: {} + supports-color@5.5.0: dependencies: has-flag: 3.0.0 supports-color@9.4.0: {} + tar-fs@2.1.1: + dependencies: + chownr: 1.1.4 + mkdirp-classic: 0.5.3 + pump: 3.0.0 + tar-stream: 2.2.0 + + tar-stream@2.2.0: + dependencies: + bl: 4.1.0 + end-of-stream: 1.4.4 + fs-constants: 1.0.0 + inherits: 2.0.4 + readable-stream: 3.6.2 + text-table@0.2.0: {} + through@2.3.8: {} + to-regex-range@5.0.1: dependencies: is-number: 7.0.0 @@ -2015,12 +2959,21 @@ snapshots: is-buffer: 2.0.5 vfile: 5.3.7 + tr46@0.0.3: {} + trough@2.1.0: {} + ts-dedent@2.2.0: {} + type-fest@1.4.0: {} typedarray@0.0.6: {} + unbzip2-stream@1.4.3: + dependencies: + buffer: 5.7.1 + through: 2.3.8 + unified-args@10.0.0: dependencies: '@types/text-table': 0.2.2 @@ -2130,6 +3083,8 @@ snapshots: util-deprecate@1.0.2: {} + uuid@9.0.1: {} + uvu@0.5.6: dependencies: dequal: 2.0.3 @@ -2177,6 +3132,15 @@ snapshots: walk-up-path@3.0.1: {} + web-worker@1.3.0: {} + + webidl-conversions@3.0.1: {} + + whatwg-url@5.0.0: + dependencies: + tr46: 0.0.3 + webidl-conversions: 3.0.1 + which@2.0.2: dependencies: isexe: 2.0.0 @@ -2195,8 +3159,29 @@ snapshots: wrappy@1.0.2: {} + ws@8.13.0: {} + + y18n@5.0.8: {} + yallist@4.0.0: {} yaml@2.3.1: {} + yargs-parser@21.1.1: {} + + yargs@17.7.1: + dependencies: + cliui: 8.0.1 + escalade: 3.1.2 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + + yauzl@2.10.0: + dependencies: + buffer-crc32: 0.2.13 + fd-slicer: 1.1.0 + zwitch@2.0.4: {} diff --git a/scripts/mermaid_image_generate.sh b/scripts/mermaid_image_generate.sh new file mode 100755 index 00000000..2abacaa0 --- /dev/null +++ b/scripts/mermaid_image_generate.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env sh + +current_branch=$(git branch --show-current) +repo_path=$(pwd) +mermaid_path=$repo_path/docs/_mermaid +mermaid_img_path=$repo_path/docs/_mermaid/_images + +# Clean generated svg files +for file in $(find $mermaid_img_path -type f -name "*.svg" -printf "%p\n") +do + rm $file +done + +# Generate svg files +for file in $(find $mermaid_path -path $mermaid_img_path -prune -o -type f -name "*.md" -printf "%p\n") +do + echo "MD FILE: $file" + dir_md=$(dirname "$file") + dir_relative=${dir_md#*docs/_mermaid/} + dir_output=$(echo "$mermaid_img_path/$dir_relative") + mkdir -p $dir_output + name=$(basename "$file" ".md") + $repo_path/node_modules/.bin/mmdc -i $file -o $(echo "$dir_output/$name.svg") +done \ No newline at end of file diff --git a/scripts/preview.sh b/scripts/preview.sh index 8f22a387..0c1ba13e 100755 --- a/scripts/preview.sh +++ b/scripts/preview.sh @@ -3,6 +3,9 @@ current_branch=$(git branch --show-current) repo_path=$(pwd) +# Generate mermaid images +./scripts/mermaid_image_generate.sh + # Clone the website repo, or make sure the current clone is up to date if [ ! -e "./.preview" ];then git clone https://codeberg.org/forgejo/website.git .preview