Ghost/ghost/member-events
Daniel Lockyer 54aa9f016b Fixed full Admin test suite running during unit tests
- because of how the npm scripts were set up, we were running the full
  Admin integration tests during the unit tests phase of CI
- this commit renames the majority of `test` to `test:unit` in the
  package.json files, and aliases `test` to `test:unit`
- special packages like Admin have no-op'd `test:unit` scripts so we
  don't end up running its tests
2022-08-15 15:34:52 +02:00
..
lib Added members.last_commented_at and last_seen_at update when commenting (#15088) 2022-07-25 17:35:46 +02:00
test Added @tryghost/member-events 2021-09-17 15:22:08 +02:00
.eslintrc.js Added @tryghost/member-events 2021-09-17 15:22:08 +02:00
index.js Added members.last_commented_at and last_seen_at update when commenting (#15088) 2022-07-25 17:35:46 +02:00
package.json Fixed full Admin test suite running during unit tests 2022-08-15 15:34:52 +02:00
README.md Tidied up package READMEs 2022-07-25 15:17:12 +02:00

Member Events

Usage

const {MemberEntryViewEvent} = require('@tryghost/member-events');

const event = MemberEntryViewEvent.create({
    memberId: member.id,
    memberStatus: member.status,
    entryId: post.id,
    entryUrl: post.url
});

const DomainEvents = require('@tryghost/domain-events');

DomainEvents.dispatch(event);