activitypub-actor-tester
TypeScript icon, indicating that this package has built-in type declarations

0.3.1 • Public • Published

activitypub-actor-tester

An HTML element that renders a tool for testing an ActivityPub Actor using activitypub-testing/test-actor

Usage

Use the element in your HTML wherever you want it to appear.

<activitypub-actor-tester></activitypub-actor-tester>

Add the custom element definition via a script tag, e.g.

<script
  src="https://cdn.jsdelivr.net/npm/activitypub-actor-tester@0.3.0/dist/activitypub-actor-tester.js"
  integrity="sha384-9NHj2SNo/5NV4TqAwk3t0TUht5KjF+Kscd3H3CK6DO56s/Y1qMa1VhDPpTKcfrhd"
  type="module"
  crossorigin="anonymous"
></script>

Attributes

Configure the <activitypub-actor-tester /> element by adding HTML Attributes.

actor

URL of the ActivityPub Actor that should be tested.

Default: The URL of the document the activitypub-actor-tester is contained within (i.e. globalThis.document.location.toString()).

Example

<activitypub-actor-tester
  actor="https://socialweb.coop"
></activitypub-actor-tester>

test

When set, tests will run automatically as soon as the activitypub-actor-tester is connected to a document. When unset, the tests are not run until the "Test..." button is clicked.

Default: unset

Example

<activitypub-actor-tester
  test
></activitypub-actor-tester>

Note: even if the value of the test attribute is false, the tests will run, because the string "false" is truthy. See Boolean attributes @lit.dev.

Development

Subresource Integrity (SRI)

Integrity checksums should be the same when generated using either of the following methods.

Using openssl

cat dist/activitypub-actor-tester.js | openssl dgst -sha384 -binary | openssl base64 -A

Using shasum

shasum -b -a 384 dist/activitypub-actor-tester.js | awk '{ print $1 }' | xxd -r -p | base64

Readme

Keywords

none

Package Sidebar

Install

npm i activitypub-actor-tester

Weekly Downloads

3

Version

0.3.1

License

AGPL-3.0

Unpacked Size

296 kB

Total Files

30

Last publish

Collaborators

  • gobengo