Ghost/package.json
Kevin Ansfield c36e749820
Added support for gating content by member labels and products (#12946)
refs https://github.com/TryGhost/Team/issues/581
closes https://github.com/TryGhost/Team/issues/582

Emails can now be sent to members with specific associated labels or products by specifying an NQL string. We want to bring the same members segment feature to content by allowing `visibility` to be an NQL filter string on top of the `public/members/paid` special-case strings.

As an example it's possible to set `posts.visibility` to `label:vip` to make a post available only to those members with the `vip` label.

- removed enum validations for `visibility` so it now accepts any string or `null`
    - bumped `@tryghost/admin-api-schema` for API-level validation changes
- added nql validation to API input validators by running the visibility query against the members model
- added transform of NQL to special-case visibility values when saving post model
    - ensures there's a single way of representing "members" and "paid" where NQL gives multiple ways of representing the same segment
    - useful for keeping theme-level checks such as `{{#has visibility="paid"}}` working as expected
- updated content-gating to parse nql from post's visibility and use it to query the currently logged in member to see if there's a match
    - bumped @tryghost/members-api to include label and product data when loading member
2021-05-10 19:32:11 +01:00

185 lines
5.7 KiB
JSON

{
"name": "ghost",
"version": "4.4.0",
"description": "The professional publishing platform",
"author": "Ghost Foundation",
"homepage": "https://ghost.org",
"keywords": [
"ghost",
"blog",
"cms",
"headless",
"content",
"markdown"
],
"repository": {
"type": "git",
"url": "git://github.com/TryGhost/Ghost.git"
},
"bugs": "https://github.com/TryGhost/Ghost/issues",
"contributors": "https://github.com/TryGhost/Ghost/graphs/contributors",
"license": "MIT",
"scripts": {
"start": "node index",
"dev": "DEBUG=ghost:* grunt dev",
"test": "grunt validate",
"ci": "grunt validate --verbose",
"ci:regression": "grunt test-regression --verbose",
"setup": "yarn install && knex-migrator init && grunt symlink && grunt init || (exit 0)",
"lint:server": "eslint --ignore-path .eslintignore 'core/server/**/*.js' 'core/*.js' '*.js'",
"lint:shared": "eslint --ignore-path .eslintignore 'core/shared/**/*.js'",
"lint:frontend": "eslint --ignore-path .eslintignore 'core/frontend/**/*.js'",
"lint:test": "eslint -c test/.eslintrc.js --ignore-path test/.eslintignore 'test/**/*.js'",
"lint:code": "yarn lint:server && yarn lint:shared && yarn lint:frontend",
"lint": "yarn lint:server && yarn lint:shared && yarn lint:frontend && yarn lint:test",
"posttest": "yarn lint",
"fixmodulenotdefined": "yarn cache clean && cd core/client && rm -rf node_modules tmp dist && yarn && cd ../../"
},
"engines": {
"node": "^12.22.1 || ^14.16.1",
"cli": "^1.17.0"
},
"dependencies": {
"@nexes/nql": "0.5.2",
"@sentry/node": "6.3.6",
"@tryghost/adapter-manager": "0.2.12",
"@tryghost/admin-api-schema": "2.2.1",
"@tryghost/bootstrap-socket": "0.2.8",
"@tryghost/constants": "0.1.7",
"@tryghost/email-analytics-provider-mailgun": "1.0.0",
"@tryghost/email-analytics-service": "1.0.0",
"@tryghost/errors": "0.2.11",
"@tryghost/helpers": "1.1.43",
"@tryghost/image-transform": "1.0.11",
"@tryghost/job-manager": "0.8.5",
"@tryghost/kg-card-factory": "2.2.2",
"@tryghost/kg-default-atoms": "2.0.4",
"@tryghost/kg-default-cards": "4.0.3",
"@tryghost/kg-markdown-html-renderer": "4.0.2",
"@tryghost/kg-mobiledoc-html-renderer": "4.0.0",
"@tryghost/limit-service": "0.5.0",
"@tryghost/magic-link": "1.0.2",
"@tryghost/members-api": "1.5.0",
"@tryghost/members-csv": "1.0.0",
"@tryghost/members-ssr": "1.0.2",
"@tryghost/mw-session-from-token": "0.1.20",
"@tryghost/package-json": "0.1.1",
"@tryghost/promise": "0.1.8",
"@tryghost/security": "0.2.8",
"@tryghost/session-service": "0.1.21",
"@tryghost/social-urls": "0.1.24",
"@tryghost/string": "0.1.19",
"@tryghost/url-utils": "1.1.3",
"@tryghost/vhost-middleware": "1.0.14",
"@tryghost/zip": "1.1.13",
"amperize": "0.6.1",
"analytics-node": "4.0.1",
"bluebird": "3.7.2",
"body-parser": "1.19.0",
"bookshelf": "0.15.2",
"bookshelf-relations": "1.4.1",
"brute-knex": "4.0.1",
"bson-objectid": "2.0.1",
"bthreads": "0.5.1",
"cheerio": "0.22.0",
"compression": "1.7.4",
"connect-slashes": "1.4.0",
"cookie-session": "1.4.0",
"cors": "2.8.5",
"downsize": "0.0.8",
"express": "4.17.1",
"express-brute": "1.0.1",
"express-hbs": "2.4.0",
"express-jwt": "6.0.0",
"express-query-boolean": "2.0.0",
"express-session": "1.17.1",
"fs-extra": "10.0.0",
"ghost-ignition": "4.6.2",
"ghost-storage-base": "0.0.4",
"glob": "7.1.7",
"got": "9.6.0",
"gscan": "4.0.2",
"html-to-text": "5.1.1",
"image-size": "1.0.0",
"intl": "1.2.5",
"intl-messageformat": "5.4.3",
"js-yaml": "4.1.0",
"jsonpath": "1.1.1",
"jsonwebtoken": "8.5.1",
"juice": "7.0.0",
"keypair": "1.0.3",
"knex": "0.21.19",
"knex-migrator": "4.0.4",
"lodash": "4.17.21",
"mailgun-js": "0.22.0",
"metascraper": "5.21.7",
"metascraper-author": "5.21.7",
"metascraper-description": "5.21.7",
"metascraper-image": "5.21.7",
"metascraper-logo": "5.21.7",
"metascraper-logo-favicon": "5.21.7",
"metascraper-publisher": "5.21.7",
"metascraper-title": "5.21.7",
"metascraper-url": "5.21.7",
"moment": "2.24.0",
"moment-timezone": "0.5.23",
"multer": "1.4.2",
"mysql": "2.18.1",
"nconf": "0.11.2",
"netjet": "1.4.0",
"node-jose": "2.0.0",
"nodemailer": "0.7.1",
"oembed-parser": "1.4.7",
"passport": "0.4.1",
"passport-google-oauth": "2.0.0",
"path-match": "1.2.4",
"probe-image-size": "5.0.0",
"rss": "1.2.2",
"sanitize-html": "2.3.3",
"semver": "7.3.5",
"stoppable": "1.1.0",
"tough-cookie": "4.0.0",
"uuid": "8.3.2",
"validator": "6.3.0",
"xml": "1.0.1"
},
"optionalDependencies": {
"@tryghost/html-to-mobiledoc": "0.7.15",
"sqlite3": "5.0.2"
},
"devDependencies": {
"@lodder/grunt-postcss": "3.0.1",
"coffeescript": "2.5.1",
"cssnano": "5.0.2",
"eslint": "7.26.0",
"eslint-plugin-ghost": "2.2.0",
"grunt": "1.4.0",
"grunt-bg-shell": "2.3.3",
"grunt-contrib-clean": "2.0.0",
"grunt-contrib-compress": "2.0.0",
"grunt-contrib-copy": "1.0.0",
"grunt-contrib-symlink": "1.0.0",
"grunt-contrib-watch": "1.1.0",
"grunt-express-server": "0.5.4",
"grunt-mocha-cli": "7.0.0",
"grunt-shell": "3.0.1",
"grunt-subgrunt": "1.3.0",
"grunt-update-submodules": "0.4.1",
"jwks-rsa": "2.0.3",
"mocha": "8.4.0",
"mock-knex": "0.4.9",
"nock": "13.0.11",
"papaparse": "5.3.0",
"proxyquire": "2.1.3",
"rewire": "5.0.0",
"should": "13.2.3",
"sinon": "10.0.0",
"supertest": "6.1.3",
"tmp": "0.2.1"
},
"resolutions": {
"moment": "2.24.0",
"moment-timezone": "0.5.23"
}
}