-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement experimental support for ActivityPods
A report with more details about this will be published in https://github.com/noeldemartin/ramen
- Loading branch information
1 parent
f7d78a2
commit c8e5162
Showing
12 changed files
with
235 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
const experimental: ExperimentalFlags = { | ||
activityPods: false, | ||
}; | ||
|
||
export interface ExperimentalFlags { | ||
activityPods: boolean; | ||
} | ||
|
||
export function getExperimentalFlag(flag: keyof ExperimentalFlags): boolean { | ||
return experimental[flag]; | ||
} | ||
|
||
/** | ||
* Experimental features can be enabled or disabled using this function, | ||
* but they are unstable and they could be removed or modified without conforming | ||
* with Semantic Versioning. | ||
*/ | ||
export function setExperimentalFlags(flags: Partial<ExperimentalFlags>): void { | ||
Object.assign(experimental, flags); | ||
} | ||
|
||
export function usingExperimentalActivityPods(): boolean { | ||
return getExperimentalFlag('activityPods'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,18 @@ | ||
import { FieldType } from 'soukai'; | ||
|
||
import { defineSolidModelSchema } from '@/models/schema'; | ||
|
||
export default defineSolidModelSchema({ | ||
rdfContext: 'http://www.w3.org/ns/solid/terms#', | ||
rdfsClass: 'TypeIndex', | ||
timestamps: false, | ||
fields: { | ||
registrationUrls: { | ||
type: FieldType.Array, | ||
items: FieldType.Key, | ||
|
||
// Note: This term is actually missing from the vocab, but it is used in ActivityPods. | ||
rdfProperty: 'hasTypeRegistration', | ||
}, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.