Move pageinfo into src/article-api (#54620)
This commit is contained in:
7
.github/workflows/test.yml
vendored
7
.github/workflows/test.yml
vendored
@@ -66,7 +66,6 @@ jobs:
|
||||
# - links
|
||||
- observability
|
||||
# - open-source
|
||||
- pageinfo
|
||||
# - pages
|
||||
- products
|
||||
- redirects
|
||||
@@ -176,7 +175,7 @@ jobs:
|
||||
|
||||
- uses: ./.github/actions/precompute-pageinfo
|
||||
# Only the 'pageinfo' tests include end-to-end tests about this.
|
||||
if: ${{ matrix.name == 'pageinfo' }}
|
||||
if: ${{ matrix.name == 'article-api' }}
|
||||
env:
|
||||
ROOT: src/fixtures/fixtures
|
||||
|
||||
@@ -194,6 +193,6 @@ jobs:
|
||||
# tests run only in English. The exception is the
|
||||
# `languages` suite which needs all languages to be set up.
|
||||
ENABLED_LANGUAGES: ${{ matrix.name == 'languages' && 'all' || '' }}
|
||||
ROOT: ${{ (matrix.name == 'fixtures' || matrix.name == 'pageinfo' || matrix.name == 'landings' ) && 'src/fixtures/fixtures' || '' }}
|
||||
TRANSLATIONS_FIXTURE_ROOT: ${{ (matrix.name == 'fixtures' || matrix.name == 'pageinfo') && 'src/fixtures/fixtures/translations' || '' }}
|
||||
ROOT: ${{ (matrix.name == 'fixtures' || matrix.name == 'article-api' || matrix.name == 'landings' ) && 'src/fixtures/fixtures' || '' }}
|
||||
TRANSLATIONS_FIXTURE_ROOT: ${{ (matrix.name == 'fixtures' || matrix.name == 'article-api') && 'src/fixtures/fixtures/translations' || '' }}
|
||||
run: npm test -- src/${{ matrix.name }}/tests/
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
"playwright-test": "playwright test --config src/fixtures/playwright.config.ts --project=\"Google Chrome\"",
|
||||
"post-lints": "tsx src/content-linter/scripts/post-lints.js",
|
||||
"postinstall": "cp package-lock.json .installed.package-lock.json && echo \"Updated .installed.package-lock.json\" # see husky/post-checkout and husky/post-merge",
|
||||
"precompute-pageinfo": "tsx src/pageinfo/scripts/precompute-pageinfo.ts",
|
||||
"precompute-pageinfo": "tsx src/article-api/scripts/precompute-pageinfo.ts",
|
||||
"prepare": "husky src/workflows/husky",
|
||||
"prettier": "prettier -w \"**/*.{ts,tsx,js,mjs,scss,yml,yaml}\"",
|
||||
"prettier-check": "prettier -c \"**/*.{ts,tsx,js,mjs,scss,yml,yaml}\"",
|
||||
|
||||
@@ -34,7 +34,7 @@ import { program, Option } from 'commander'
|
||||
|
||||
import { languageKeys } from 'src/languages/lib/languages.js'
|
||||
import { loadPages, loadUnversionedTree } from 'src/frame/lib/page-data.js'
|
||||
import { CACHE_FILE_PATH, getPageInfo } from '../middleware'
|
||||
import { CACHE_FILE_PATH, getPageInfo } from '../middleware/pageinfo'
|
||||
|
||||
program
|
||||
.description('Generates a JSON file with precompute pageinfo data by pathname')
|
||||
@@ -5,7 +5,7 @@ import events from '@/events/middleware.js'
|
||||
import anchorRedirect from '@/rest/api/anchor-redirect.js'
|
||||
import aiSearch from '@/search/middleware/ai-search'
|
||||
import search from '@/search/middleware/search-routes.js'
|
||||
import pageInfo from '@/pageinfo/middleware'
|
||||
import pageInfo from '#src/article-api/middleware/pageinfo.ts'
|
||||
import pageList from '@/article-api/middleware/pagelist'
|
||||
import webhooks from '@/webhooks/middleware/webhooks.js'
|
||||
import { ExtendedRequest } from '@/types'
|
||||
|
||||
Reference in New Issue
Block a user