mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
d6cedaae06
refs https://linear.app/ghost/issue/AP-500 We've got a new @tryghost/activitypub package, which is gonna handle all of the wiring between Ghost and ActivityPub. Currently that is just the configuration of webhooks for the internal ActivityPub integration. All this logic is run on the boot of Ghost, though notably in a non-blocking manner, it's initialised as part of the background services so it should not have an effect on the time to serving requests. having said that - it needs to be defensive against errors, which is why the entire network request is in a try/catch, as well as lookups for the integration able to handle missing data. Unit tests use an in-memory sqlite instance, which means we're testing a full flow, ideally there would be a way to get the schema from Ghost for this, but for now this is acceptable IMO.
40 lines
1.2 KiB
JSON
40 lines
1.2 KiB
JSON
{
|
|
"name": "@tryghost/activitypub",
|
|
"version": "0.0.0",
|
|
"repository": "https://github.com/TryGhost/Ghost/tree/main/packages/activitypub",
|
|
"author": "Ghost Foundation",
|
|
"private": true,
|
|
"main": "build/index.js",
|
|
"types": "build/index.d.ts",
|
|
"scripts": {
|
|
"dev": "tsc --watch --preserveWatchOutput --sourceMap",
|
|
"build": "tsc",
|
|
"build:ts": "tsc",
|
|
"prepare": "tsc",
|
|
"test:unit": "NODE_ENV=testing c8 --src src --all --check-coverage --100 --reporter text --reporter cobertura mocha -r ts-node/register './test/**/*.test.ts'",
|
|
"test": "yarn test:types && yarn test:unit",
|
|
"test:types": "tsc --noEmit",
|
|
"lint:code": "eslint src/ --ext .ts --cache",
|
|
"lint": "yarn lint:code && yarn lint:test",
|
|
"lint:test": "eslint -c test/.eslintrc.js test/ --ext .ts --cache"
|
|
},
|
|
"files": [
|
|
"build"
|
|
],
|
|
"devDependencies": {
|
|
"@tryghost/identity-token-service": "0.0.0",
|
|
"@tryghost/logging": "2.4.19",
|
|
"c8": "10.1.2",
|
|
"knex": "3.1.0",
|
|
"mocha": "10.8.2",
|
|
"nock": "13.5.5",
|
|
"sinon": "19.0.2",
|
|
"sqlite3": "5.1.7",
|
|
"ts-node": "10.9.2",
|
|
"typescript": "5.6.3"
|
|
},
|
|
"dependencies": {
|
|
"bson-objectid": "2.0.4"
|
|
}
|
|
}
|