Skip to content

Commit 4dff449

Browse files
committed
Moved @tryghost/staff-service to Ghost core
fix https://linear.app/ghost/issue/ENG-2067/staff-service - this commit migrates the code and test for the staff service into Ghost core so we can keep all related code together and reduce overhead - as a result of this change, we can remove the package and associated references
1 parent de9093b commit 4dff449

28 files changed

+6
-72
lines changed

compose.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ services:
104104
- node_modules_ghost_session-service:/home/ghost/ghost/session-service/node_modules:delegated
105105
- node_modules_ghost_settings-path-manager:/home/ghost/ghost/settings-path-manager/node_modules:delegated
106106
- node_modules_ghost_slack-notifications:/home/ghost/ghost/slack-notifications/node_modules:delegated
107-
- node_modules_ghost_staff-service:/home/ghost/ghost/staff-service/node_modules:delegated
108107
- node_modules_ghost_stats-service:/home/ghost/ghost/stats-service/node_modules:delegated
109108
- node_modules_ghost_stripe:/home/ghost/ghost/stripe/node_modules:delegated
110109
- node_modules_ghost_tiers:/home/ghost/ghost/tiers/node_modules:delegated
@@ -275,7 +274,6 @@ volumes:
275274
node_modules_ghost_session-service: {}
276275
node_modules_ghost_settings-path-manager: {}
277276
node_modules_ghost_slack-notifications: {}
278-
node_modules_ghost_staff-service: {}
279277
node_modules_ghost_stats-service: {}
280278
node_modules_ghost_stripe: {}
281279
node_modules_ghost_tiers: {}

ghost/core/core/server/services/staff/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class StaffServiceWrapper {
88
return;
99
}
1010

11-
const StaffService = require('@tryghost/staff-service');
11+
const StaffService = require('./StaffService');
1212

1313
const logging = require('@tryghost/logging');
1414
const models = require('../../models');

ghost/core/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"test:browser:setup": "npx playwright install",
4141
"test:ci:e2e": "c8 -c ./.c8rc.e2e.json -o coverage-e2e yarn test:e2e -b --retries=2 --reporter=./test/utils/mocha-retry-reporter.js",
4242
"test:ci:regression": "yarn test:regression -b --retries=2 --reporter=./test/utils/mocha-retry-reporter.js",
43-
"test:ci:integration": "c8 -c ./.c8rc.e2e.json -o coverage-integration --lines 57 --functions 47 --branches 77 --statements 57 yarn test:integration -b --retries=2 --reporter=./test/utils/mocha-retry-reporter.js",
43+
"test:ci:integration": "c8 -c ./.c8rc.e2e.json -o coverage-integration --lines 57 --functions 47 --branches 76 --statements 57 yarn test:integration -b --retries=2 --reporter=./test/utils/mocha-retry-reporter.js",
4444
"test:unit:slow": "yarn test:unit --reporter=mocha-slow-test-reporter",
4545
"test:int:slow": "yarn test:integration --reporter=mocha-slow-test-reporter",
4646
"test:e2e:slow": "yarn test:e2e --reporter=mocha-slow-test-reporter",
@@ -84,6 +84,7 @@
8484
"@tryghost/debug": "0.1.32",
8585
"@tryghost/domain-events": "0.0.0",
8686
"@tryghost/donations": "0.0.0",
87+
"@tryghost/email-addresses": "0.0.0",
8788
"@tryghost/email-analytics-provider-mailgun": "0.0.0",
8889
"@tryghost/email-analytics-service": "0.0.0",
8990
"@tryghost/email-content-generator": "0.0.0",
@@ -150,7 +151,6 @@
150151
"@tryghost/settings-path-manager": "0.0.0",
151152
"@tryghost/slack-notifications": "0.0.0",
152153
"@tryghost/social-urls": "0.1.43",
153-
"@tryghost/staff-service": "0.0.0",
154154
"@tryghost/stats-service": "0.0.0",
155155
"@tryghost/string": "0.2.12",
156156
"@tryghost/tiers": "0.0.0",
@@ -189,6 +189,7 @@
189189
"glob": "8.1.0",
190190
"got": "11.8.6",
191191
"gscan": "4.47.0",
192+
"handlebars": "4.7.8",
192193
"human-number": "2.0.4",
193194
"iconv-lite": "0.6.3",
194195
"image-size": "1.2.0",
@@ -198,6 +199,7 @@
198199
"json-stable-stringify": "1.2.0",
199200
"jsonpath": "1.1.1",
200201
"jsonwebtoken": "8.5.1",
202+
"juice": "9.1.0",
201203
"keypair": "1.0.4",
202204
"knex": "2.4.2",
203205
"knex-migrator": "5.3.0",

ghost/staff-service/test/staff-service.test.js renamed to ghost/core/test/unit/server/services/staff/staff-service.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const {MilestoneCreatedEvent} = require('@tryghost/milestones');
88
const DomainEvents = require('@tryghost/domain-events');
99

1010
require('should');
11-
const StaffService = require('../index');
11+
const StaffService = require('../../../../../core/server/services/staff/StaffService');
1212

1313
function testCommonMailData({mailStub, getEmailAlertUsersStub}) {
1414
getEmailAlertUsersStub.calledWith(

ghost/staff-service/.eslintrc.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

ghost/staff-service/README.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

ghost/staff-service/index.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

ghost/staff-service/package.json

Lines changed: 0 additions & 32 deletions
This file was deleted.

ghost/staff-service/test/.eslintrc.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)