@musakui/fedi
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -9,2 +9,9 @@ import type { | ||
/** @see https://w3id.org/security/v1 */ | ||
export interface SecPublicKey { | ||
id?: string | ||
owner?: string | ||
publicKeyPem?: string | ||
} | ||
/** @see https://www.w3.org/TR/activitypub/#actor-objects */ | ||
@@ -17,2 +24,3 @@ export interface Actor extends BaseObject<ActorTypes> { | ||
followers?: ObjectReference<Collection<Actor>> | ||
publicKey?: SecPublicKey | ||
} |
@@ -8,5 +8,16 @@ import { | ||
/** @see https://www.w3.org/ns/activitystreams#Object */ | ||
export interface BaseObject<T = string> { | ||
export type ContextValue = string | Record<string, string> | ||
/** @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-link */ | ||
export interface Link<T = 'Link'> { | ||
type: T | ||
rel?: string | string[] | ||
name?: string | ||
href?: string | ||
mediaType?: string | ||
} | ||
/** @see https://www.w3.org/TR/activitystreams-vocabulary/#dfn-object */ | ||
export interface BaseObject<T = string> extends WithContext { | ||
type: T | ||
id?: string | null | ||
@@ -19,2 +30,3 @@ name?: string | ||
cc?: ObjectReference | ObjectReference[] | ||
'@context'?: ContextValue | ContextValue[] | ||
} | ||
@@ -21,0 +33,0 @@ |
const PAD = '-----' | ||
/** @param {string} str */ | ||
export const toPEM = (str, type = 'PRIVATE KEY') => key.startsWith(PAD) ? str : `${PAD}BEGIN ${type}${PAD} | ||
export const toPEM = (str, type = 'PRIVATE KEY') => str.startsWith(PAD) ? str : `${PAD}BEGIN ${type}${PAD} | ||
${str} | ||
${PAD}END ${type}${PAD}` |
@@ -10,3 +10,3 @@ { | ||
"repository": "github:musakui/fedi", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"type": "module", | ||
@@ -13,0 +13,0 @@ "files": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20091
28
645