Renamed API canary/ folder to endpoints/

- now we only have one API version, it doesn't make sense to keep
  "canary" around
- renaming it to `endpoints/` makes more sense for this
- this commit renames the `core/server/api/canary/` folder to
  `core/server/api/endpoints/`
- it also fixes the naming in test titles and the various other places
  we relied on this
This commit is contained in:
Daniel Lockyer 2022-07-04 10:27:55 +02:00
parent 911ce4f29e
commit c50658953c
182 changed files with 115 additions and 115 deletions

View File

@ -26,7 +26,7 @@
"!core/server/web/parent/middleware/**",
"core/server/web/shared/**",
"!core/server/web/shared/middleware/**",
"core/server/api/canary/**",
"!core/server/api/canary/utils"
"core/server/api/endpoints/**",
"!core/server/api/endpoints/utils"
]
}

View File

@ -1,4 +1,4 @@
const debug = require('@tryghost/debug')('api:canary:utils:permissions');
const debug = require('@tryghost/debug')('api:endpoints:utils:permissions');
const Promise = require('bluebird');
const _ = require('lodash');
const permissions = require('../../../services/permissions');
@ -79,7 +79,7 @@ const nonePublicAuth = (apiConfig, frame) => {
// @TODO: https://github.com/TryGhost/Ghost/issues/10735
module.exports = {
/**
* @description Handle permission stage for canary API.
* @description Handle permission stage for API.
*
* @param {Object} apiConfig - Docname & method of target ctrl.
* @param {Object} frame

View File

@ -1,4 +1,4 @@
const debug = require('@tryghost/debug')('api:canary:utils:serializers:input:authors');
const debug = require('@tryghost/debug')('api:endpoints:utils:serializers:input:authors');
const slugFilterOrder = require('./utils/slug-filter-order');
const utils = require('../../index');

View File

@ -1,5 +1,5 @@
const _ = require('lodash');
const debug = require('@tryghost/debug')('api:canary:utils:serializers:input:db');
const debug = require('@tryghost/debug')('api:endpoints:utils:serializers:input:db');
const optionsUtil = require('../../../../shared/utils/options');
const INTERNAL_OPTIONS = ['transacting', 'forUpdate'];

View File

@ -1,5 +1,5 @@
const _ = require('lodash');
const debug = require('@tryghost/debug')('api:canary:utils:serializers:input:integrations');
const debug = require('@tryghost/debug')('api:endpoints:utils:serializers:input:integrations');
function setDefaultFilter(frame) {
if (frame.options.filter) {

View File

@ -1,5 +1,5 @@
const _ = require('lodash');
const debug = require('@tryghost/debug')('api:canary:utils:serializers:input:members');
const debug = require('@tryghost/debug')('api:endpoints:utils:serializers:input:members');
const mapNQLKeyValues = require('@tryghost/nql').utils.mapKeyValues;
function defaultRelations(frame) {

View File

@ -1,5 +1,5 @@
const _ = require('lodash');
const debug = require('@tryghost/debug')('api:canary:utils:serializers:input:pages');
const debug = require('@tryghost/debug')('api:endpoints:utils:serializers:input:pages');
const mobiledoc = require('../../../../../lib/mobiledoc');
const url = require('./utils/url');
const slugFilterOrder = require('./utils/slug-filter-order');

View File

@ -1,5 +1,5 @@
const _ = require('lodash');
const debug = require('@tryghost/debug')('api:canary:utils:serializers:input:posts');
const debug = require('@tryghost/debug')('api:endpoints:utils:serializers:input:posts');
const url = require('./utils/url');
const slugFilterOrder = require('./utils/slug-filter-order');
const localUtils = require('../../index');

View File

@ -1,4 +1,4 @@
const debug = require('@tryghost/debug')('api:canary:utils:serializers:input:tags');
const debug = require('@tryghost/debug')('api:endpoints:utils:serializers:input:tags');
const url = require('./utils/url');
const slugFilterOrder = require('./utils/slug-filter-order');
const utils = require('../../index');

View File

@ -1,4 +1,4 @@
const debug = require('@tryghost/debug')('api:canary:utils:serializers:input:users');
const debug = require('@tryghost/debug')('api:endpoints:utils:serializers:input:users');
const url = require('./utils/url');
module.exports = {

View File

@ -1,5 +1,5 @@
const _ = require('lodash');
const debug = require('@tryghost/debug')('api:canary:utils:serializers:input:webhooks');
const debug = require('@tryghost/debug')('api:endpoints:utils:serializers:input:webhooks');
module.exports = {
add(apiConfig, frame) {

View File

@ -1,4 +1,4 @@
const debug = require('@tryghost/debug')('api:canary:utils:serializers:output:all');
const debug = require('@tryghost/debug')('api:endpoints:utils:serializers:output:all');
const _ = require('lodash');
const removeXBY = (object) => {

View File

@ -1,6 +1,6 @@
const tpl = require('@tryghost/tpl');
const mappers = require('./mappers');
const debug = require('@tryghost/debug')('api:canary:utils:serializers:output:authentication');
const debug = require('@tryghost/debug')('api:endpoints:utils:serializers:output:authentication');
const messages = {
checkEmailForInstructions: 'Check your email for further instructions.',

View File

@ -1,5 +1,5 @@
const _ = require('lodash');
const debug = require('@tryghost/debug')('api:canary:utils:serializers:output:config');
const debug = require('@tryghost/debug')('api:endpoints:utils:serializers:output:config');
module.exports = {
all(data, apiConfig, frame) {

View File

@ -1,4 +1,4 @@
const debug = require('@tryghost/debug')('api:canary:utils:serializers:output:db');
const debug = require('@tryghost/debug')('api:endpoints:utils:serializers:output:db');
module.exports = {
backupContent(filename, apiConfig, frame) {

View File

@ -1,4 +1,4 @@
const debug = require('@tryghost/debug')('api:canary:utils:serializers:output:default');
const debug = require('@tryghost/debug')('api:endpoints:utils:serializers:output:default');
const mappers = require('./mappers');
const mapResponse = (docName, mappable, frame) => {

View File

@ -1,4 +1,4 @@
const debug = require('@tryghost/debug')('api:canary:utils:serializers:output:images');
const debug = require('@tryghost/debug')('api:endpoints:utils:serializers:output:images');
const mappers = require('./mappers');
module.exports = {

View File

@ -1,5 +1,5 @@
const _ = require('lodash');
const debug = require('@tryghost/debug')('api:canary:utils:serializers:output:mail');
const debug = require('@tryghost/debug')('api:endpoints:utils:serializers:output:mail');
module.exports = {
all(response, apiConfig, frame) {

View File

@ -1,5 +1,5 @@
//@ts-check
const debug = require('@tryghost/debug')('api:canary:utils:serializers:output:members');
const debug = require('@tryghost/debug')('api:endpoints:utils:serializers:output:members');
const {unparse} = require('@tryghost/members-csv');
module.exports = {

View File

@ -1,4 +1,4 @@
const debug = require('@tryghost/debug')('api:canary:utils:serializers:output:notifications');
const debug = require('@tryghost/debug')('api:endpoints:utils:serializers:output:notifications');
module.exports = {
all(response, apiConfig, frame) {

View File

@ -1,4 +1,4 @@
const debug = require('@tryghost/debug')('api:canary:utils:serializers:output:oembed');
const debug = require('@tryghost/debug')('api:endpoints:utils:serializers:output:oembed');
module.exports = {
all(data, apiConfig, frame) {

View File

@ -1,4 +1,4 @@
const debug = require('@tryghost/debug')('api:canary:utils:serializers:output:offers');
const debug = require('@tryghost/debug')('api:endpoints:utils:serializers:output:offers');
const utils = require('../../index');
module.exports = {

View File

@ -1,4 +1,4 @@
const debug = require('@tryghost/debug')('api:canary:utils:serializers:output:pages');
const debug = require('@tryghost/debug')('api:endpoints:utils:serializers:output:pages');
const mappers = require('./mappers');
const membersService = require('../../../../../services/members');

View File

@ -1,4 +1,4 @@
const debug = require('@tryghost/debug')('api:canary:utils:serializers:output:posts');
const debug = require('@tryghost/debug')('api:endpoints:utils:serializers:output:posts');
const mappers = require('./mappers');
const membersService = require('../../../../../services/members');

Some files were not shown because too many files have changed in this diff Show More