зеркало из https://github.com/github/docs.git
Move files out of lib/ (#45506)
This commit is contained in:
Родитель
bea029991f
Коммит
d4f345e4af
|
@ -45,7 +45,6 @@ RUN npm prune --production
|
|||
FROM all_deps as builder
|
||||
|
||||
COPY components ./components
|
||||
COPY lib ./lib
|
||||
COPY src ./src
|
||||
# The star is because it's an optional directory
|
||||
COPY .remotejson-cache* ./.remotejson-cache
|
||||
|
@ -88,7 +87,6 @@ ENV BUILD_SHA=$BUILD_SHA
|
|||
COPY --chown=node:node package.json ./
|
||||
COPY --chown=node:node assets ./assets
|
||||
COPY --chown=node:node content ./content
|
||||
COPY --chown=node:node lib ./lib
|
||||
COPY --chown=node:node src ./src
|
||||
COPY --chown=node:node .remotejson-cache* ./.remotejson-cache
|
||||
COPY --chown=node:node middleware ./middleware
|
||||
|
@ -107,7 +105,7 @@ CMD ["node", "server.js"]
|
|||
FROM preview as production
|
||||
|
||||
# Override what was set for previews
|
||||
# Make this match the default of `Object.keys(languages)` in lib/languages.js
|
||||
# Make this match the default of `Object.keys(languages)` in src/languages/lib/languages.js
|
||||
ENV ENABLED_LANGUAGES "en,zh,es,pt,ru,ja,fr,de,ko"
|
||||
|
||||
# Copy in all translations
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { productMap } from '../lib/all-products.js'
|
||||
import { productMap } from '#src/products/lib/all-products.js'
|
||||
import { deprecated } from '#src/versions/lib/enterprise-server-releases.js'
|
||||
|
||||
const pathRegExps = [
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
import languages from '#src/languages/lib/languages.js'
|
||||
import enterpriseServerReleases from '#src/versions/lib/enterprise-server-releases.js'
|
||||
import { allVersions } from '#src/versions/lib/all-versions.js'
|
||||
import { productMap } from '../lib/all-products.js'
|
||||
import { productMap } from '#src/products/lib/all-products.js'
|
||||
import {
|
||||
getVersionStringFromPath,
|
||||
getProductStringFromPath,
|
||||
getCategoryStringFromPath,
|
||||
getPathWithoutLanguage,
|
||||
getPathWithoutVersion,
|
||||
} from '../lib/path-utils.js'
|
||||
import productNames from '../lib/product-names.js'
|
||||
import warmServer from '../lib/warm-server.js'
|
||||
} from '#src/frame/lib/path-utils.js'
|
||||
import productNames from '#src/products/lib/product-names.js'
|
||||
import warmServer from '#src/frame/lib/warm-server.js'
|
||||
import searchVersions from '#src/search/lib/versions.js'
|
||||
import nonEnterpriseDefaultVersion from '#src/versions/lib/non-enterprise-default-version.js'
|
||||
import { getDataByLanguage, getUIDataMerged } from '../lib/get-data.js'
|
||||
import { getDataByLanguage, getUIDataMerged } from '#src/data-directory/lib/get-data.js'
|
||||
|
||||
// This doesn't change just because the request changes, so compute it once.
|
||||
const enterpriseServerVersions = Object.keys(allVersions).filter((version) =>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import path from 'path'
|
||||
import { liquid } from '#src/content-render/index.js'
|
||||
import findPageInSiteTree from '../../lib/find-page-in-site-tree.js'
|
||||
import findPageInSiteTree from '#src/frame/lib/find-page-in-site-tree.js'
|
||||
import removeFPTFromPath from '#src/versions/lib/remove-fpt-from-path.js'
|
||||
import { executeWithFallback } from '../../lib/render-with-fallback.js'
|
||||
import { executeWithFallback } from '#src/languages/lib/render-with-fallback.js'
|
||||
|
||||
// This module adds currentProductTree to the context object for use in layouts.
|
||||
export default async function currentProductTree(req, res, next) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import findPageInSiteTree from '../../lib/find-page-in-site-tree.js'
|
||||
import findPageInSiteTree from '#src/frame/lib/find-page-in-site-tree.js'
|
||||
|
||||
// This module adds either flatTocItems or nestedTocItems to the context object for
|
||||
// product, categorie, and map topic TOCs that don't have other layouts specified.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { getDataByLanguage } from '../../lib/get-data.js'
|
||||
import { getDataByLanguage } from '#src/data-directory/lib/get-data.js'
|
||||
import { liquid } from '#src/content-render/index.js'
|
||||
import { executeWithFallback } from '../../lib/render-with-fallback.js'
|
||||
import { correctTranslatedContentStrings } from '../../lib/correct-translation-content.js'
|
||||
import { executeWithFallback } from '#src/languages/lib/render-with-fallback.js'
|
||||
import { correctTranslatedContentStrings } from '#src/languages/lib/correct-translation-content.js'
|
||||
|
||||
export default async function glossaries(req, res, next) {
|
||||
if (!req.pagePath.endsWith('get-started/quickstart/github-glossary')) return next()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getDataByLanguage } from '../../lib/get-data.js'
|
||||
import { getDataByLanguage } from '#src/data-directory/lib/get-data.js'
|
||||
|
||||
function getProductExampleData(product, key, language) {
|
||||
// Because getDataByLanguage() depends on reading data files from
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { getProductGroups } from '../../lib/get-product-groups.js'
|
||||
import warmServer from '../../lib/warm-server.js'
|
||||
import { getProductGroups } from '#src/products/lib/get-product-groups.js'
|
||||
import warmServer from '#src/frame/lib/warm-server.js'
|
||||
import { languageKeys } from '#src/languages/lib/languages.js'
|
||||
import { allVersionKeys } from '#src/versions/lib/all-versions.js'
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { getChangelogItems } from '../../lib/changelog.js'
|
||||
import { getChangelogItems } from '#src/changelogs/lib/changelog.js'
|
||||
import getApplicableVersions from '#src/versions/lib/get-applicable-versions.js'
|
||||
|
||||
export default async function whatsNewChangelog(req, res, next) {
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
import cookieParser from 'cookie-parser'
|
||||
import cookieSettings from '../lib/cookie-settings.js'
|
||||
import cookieSettings from '#src/frame/lib/cookie-settings.js'
|
||||
export default cookieParser(process.env.COOKIE_SECRET, cookieSettings)
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import path from 'path'
|
||||
import { existsSync } from 'fs'
|
||||
|
||||
import { ROOT } from '../lib/constants.js'
|
||||
import Page from '../lib/page.js'
|
||||
import { ROOT } from '#src/frame/lib/constants.js'
|
||||
import Page from '#src/frame/lib/page.js'
|
||||
import { languagePrefixPathRegex } from '#src/languages/lib/languages.js'
|
||||
|
||||
const englishPrefixRegex = /^\/en(\/|$)/
|
||||
|
|
|
@ -17,9 +17,9 @@
|
|||
import path from 'path'
|
||||
|
||||
import languages, { languageKeys } from '#src/languages/lib/languages.js'
|
||||
import createTree from '../lib/create-tree.js'
|
||||
import warmServer from '../lib/warm-server.js'
|
||||
import { loadSiteTree, loadPages, loadPageMap } from '../lib/page-data.js'
|
||||
import createTree from '#src/frame/lib/create-tree.js'
|
||||
import warmServer from '#src/frame/lib/warm-server.js'
|
||||
import { loadSiteTree, loadPages, loadPageMap } from '#src/frame/lib/page-data.js'
|
||||
import loadRedirects from '#src/redirects/lib/precompile.js'
|
||||
|
||||
const languagePrefixRegex = new RegExp(`^/(${languageKeys.join('|')})(/|$)`)
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { get } from 'lodash-es'
|
||||
|
||||
import FailBot from '#src/observability/lib/failbot.js'
|
||||
import patterns from '../lib/patterns.js'
|
||||
import getMiniTocItems from '../lib/get-mini-toc-items.js'
|
||||
import patterns from '#src/frame/lib/patterns.js'
|
||||
import getMiniTocItems from '#src/frame/lib/get-mini-toc-items.js'
|
||||
import { pathLanguagePrefixed } from '#src/languages/lib/languages.js'
|
||||
import statsd from '#src/observability/lib/statsd.js'
|
||||
import { allVersions } from '#src/versions/lib/all-versions.js'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import timeout from 'express-timeout-handler'
|
||||
|
||||
import statsd from '#src/observability/lib/statsd.js'
|
||||
import { MAX_REQUEST_TIMEOUT } from '../lib/constants.js'
|
||||
import { MAX_REQUEST_TIMEOUT } from '#src/frame/lib/constants.js'
|
||||
|
||||
export default timeout.handler({
|
||||
// Default timeout for all endpoints
|
||||
|
|
|
@ -3,7 +3,7 @@ import path from 'path'
|
|||
|
||||
import frontmatter from 'gray-matter'
|
||||
import { languageKeys } from '#src/languages/lib/languages.js'
|
||||
import { ROOT } from './lib/constants.js'
|
||||
import { ROOT } from '#src/frame/lib/constants.js'
|
||||
|
||||
const homepage = path.posix.join(ROOT, 'content/index.md')
|
||||
const { data } = frontmatter(fs.readFileSync(homepage, 'utf8'))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import patterns from '../../../lib/patterns.js'
|
||||
import patterns from '#src/frame/lib/patterns.js'
|
||||
import { deprecated } from '#src/versions/lib/enterprise-server-releases.js'
|
||||
|
||||
export default function isArchivedVersion(req) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import path from 'path'
|
||||
import { supported, latest } from '#src/versions/lib/enterprise-server-releases.js'
|
||||
import patterns from '../../../lib/patterns.js'
|
||||
import patterns from '#src/frame/lib/patterns.js'
|
||||
import nonEnterpriseDefaultVersion from '#src/versions/lib/non-enterprise-default-version.js'
|
||||
import { allVersions } from '#src/versions/lib/all-versions.js'
|
||||
const latestNewVersion = `enterprise-server@${latest}`
|
||||
|
|
|
@ -2,7 +2,7 @@ import path from 'path'
|
|||
|
||||
import got from 'got'
|
||||
|
||||
import patterns from '../../../lib/patterns.js'
|
||||
import patterns from '#src/frame/lib/patterns.js'
|
||||
import isArchivedVersion from '#src/archives/lib/is-archived-version.js'
|
||||
import {
|
||||
setFastlySurrogateKey,
|
||||
|
|
|
@ -7,7 +7,7 @@ import {
|
|||
deprecatedWithFunctionalRedirects,
|
||||
firstReleaseStoredInBlobStorage,
|
||||
} from '#src/versions/lib/enterprise-server-releases.js'
|
||||
import patterns from '../../../lib/patterns.js'
|
||||
import patterns from '#src/frame/lib/patterns.js'
|
||||
import versionSatisfiesRange from '#src/versions/lib/version-satisfies-range.js'
|
||||
import isArchivedVersion from '#src/archives/lib/is-archived-version.js'
|
||||
import {
|
||||
|
@ -15,7 +15,7 @@ import {
|
|||
SURROGATE_ENUMS,
|
||||
} from '../../../middleware/set-fastly-surrogate-key.js'
|
||||
import got from 'got'
|
||||
import { readCompressedJsonFileFallbackLazily } from '../../../lib/read-json-file.js'
|
||||
import { readCompressedJsonFileFallbackLazily } from '#src/frame/lib/read-json-file.js'
|
||||
import { archivedCacheControl, languageCacheControl } from '../../../middleware/cache-control.js'
|
||||
import { pathLanguagePrefixed, languagePrefixPathRegex } from '#src/languages/lib/languages.js'
|
||||
import getRedirect, { splitPathByLanguage } from '#src/redirects/lib/get-redirect.js'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import path from 'path'
|
||||
|
||||
import { readCompressedJsonFileFallback } from '../../../lib/read-json-file.js'
|
||||
import { readCompressedJsonFileFallback } from '#src/frame/lib/read-json-file.js'
|
||||
import { getOpenApiVersion } from '#src/versions/lib/all-versions.js'
|
||||
|
||||
export const AUDIT_LOG_DATA_DIR = 'src/audit-logs/data'
|
||||
|
|
|
@ -46,7 +46,7 @@ export default function AuditLogEvents({
|
|||
}
|
||||
|
||||
export const getServerSideProps: GetServerSideProps<Props> = async (context) => {
|
||||
const { getAutomatedPageMiniTocItems } = await import('lib/get-mini-toc-items')
|
||||
const { getAutomatedPageMiniTocItems } = await import('src/frame/lib/get-mini-toc-items')
|
||||
const { getAuditLogEvents } = await import('src/audit-logs/lib')
|
||||
|
||||
const req = context.req as object
|
||||
|
|
|
@ -3,7 +3,7 @@ import { readFileSync } from 'fs'
|
|||
import cheerio from 'cheerio'
|
||||
import { jest, test } from '@jest/globals'
|
||||
|
||||
import { loadPages } from '../../../lib/page-data.js'
|
||||
import { loadPages } from '#src/frame/lib/page-data.js'
|
||||
import { get } from '../../../tests/helpers/e2etest.js'
|
||||
|
||||
// Get a list of the autogenerated pages
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { schema } from '../../../lib/frontmatter.js'
|
||||
import { schema } from '#src/frame/lib/frontmatter.js'
|
||||
|
||||
// Copy the properties from the frontmatter schema.
|
||||
const featureVersions = {
|
||||
|
|
|
@ -3,8 +3,8 @@ import { intersection } from 'lodash-es'
|
|||
|
||||
import { getFrontmatter } from '../helpers/utils.js'
|
||||
import { formatAjvErrors } from '../helpers/schema-utils.js'
|
||||
import { frontmatter, deprecatedProperties } from '../../../../lib/frontmatter.js'
|
||||
import readFrontmatter from '../../../../lib/read-frontmatter.js'
|
||||
import { frontmatter, deprecatedProperties } from '#src/frame/lib/frontmatter.js'
|
||||
import readFrontmatter from '#src/frame/lib/read-frontmatter.js'
|
||||
|
||||
export const frontmatterSchema = {
|
||||
names: ['GHD012', 'frontmatter-schema'],
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { addError, ellipsify } from 'markdownlint-rule-helpers'
|
||||
|
||||
import { getRange } from '../helpers/utils.js'
|
||||
import frontmatter from '../../../../lib/read-frontmatter.js'
|
||||
import frontmatter from '#src/frame/lib/read-frontmatter.js'
|
||||
|
||||
/*
|
||||
This rule currently only checks for one hardcoded string but
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { TokenKind } from 'liquidjs'
|
||||
import { addError } from 'markdownlint-rule-helpers'
|
||||
|
||||
import { getDataByLanguage } from '../../../../lib/get-data.js'
|
||||
import { getDataByLanguage } from '#src/data-directory/lib/get-data.js'
|
||||
import { getLiquidTokens, getPositionData } from '../helpers/liquid-utils.js'
|
||||
|
||||
/*
|
||||
|
|
|
@ -2,7 +2,7 @@ import { addError } from 'markdownlint-rule-helpers'
|
|||
|
||||
import { getFrontmatter } from '../helpers/utils.js'
|
||||
import { liquid } from '#src/content-render/index.js'
|
||||
import { isLiquidError } from '../../../../lib/render-with-fallback.js'
|
||||
import { isLiquidError } from '#src/languages/lib/render-with-fallback.js'
|
||||
|
||||
/*
|
||||
Attempts to parse all liquid in the frontmatter of a file
|
||||
|
|
|
@ -10,7 +10,7 @@ import {
|
|||
deprecated,
|
||||
} from '#src/versions/lib/enterprise-server-releases.js'
|
||||
import allowedVersionOperators from '#src/content-render/liquid/ifversion-supported-operators.js'
|
||||
import { getDeepDataByLanguage } from '../../../../lib/get-data.js'
|
||||
import { getDeepDataByLanguage } from '#src/data-directory/lib/get-data.js'
|
||||
import { getLiquidTokens, getPositionData } from '../helpers/liquid-utils.js'
|
||||
|
||||
const getAllPossibleVersionNames = memoize(() => {
|
||||
|
|
|
@ -5,12 +5,12 @@ import { zip, difference } from 'lodash-es'
|
|||
import GithubSlugger from 'github-slugger'
|
||||
import { decode } from 'html-entities'
|
||||
|
||||
import matter from '../../../lib/read-frontmatter.js'
|
||||
import matter from '#src/frame/lib/read-frontmatter.js'
|
||||
import { renderContent } from '#src/content-render/index.js'
|
||||
import getApplicableVersions from '#src/versions/lib/get-applicable-versions.js'
|
||||
import contextualize from '../../../middleware/context.js'
|
||||
import shortVersions from '#src/versions/middleware/short-versions.js'
|
||||
import { ROOT } from '../../../lib/constants.js'
|
||||
import { ROOT } from '#src/frame/lib/constants.js'
|
||||
|
||||
const slugger = new GithubSlugger()
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { loadPages, loadPageMap } from '../../../lib/page-data.js'
|
||||
import { loadPages, loadPageMap } from '#src/frame/lib/page-data.js'
|
||||
import loadRedirects from '#src/redirects/lib/precompile.js'
|
||||
import { checkURL } from '../../../tests/helpers/check-url.js'
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import addErrors from 'ajv-errors'
|
|||
import semver from 'semver'
|
||||
|
||||
import featureVersionsSchema from '../lib/feature-versions-schema.js'
|
||||
import { getDeepDataByLanguage } from '../../../lib/get-data.js'
|
||||
import { getDeepDataByLanguage } from '#src/data-directory/lib/get-data.js'
|
||||
import { formatAjvErrors } from '../../../tests/helpers/schemas.js'
|
||||
|
||||
/*
|
||||
|
|
|
@ -2,8 +2,8 @@ import path from 'path'
|
|||
import { isEqual, uniqWith } from 'lodash-es'
|
||||
import { jest } from '@jest/globals'
|
||||
|
||||
import patterns from '../../../lib/patterns.js'
|
||||
import { getDataByLanguage, getDeepDataByLanguage } from '../../../lib/get-data.js'
|
||||
import patterns from '#src/frame/lib/patterns.js'
|
||||
import { getDataByLanguage, getDeepDataByLanguage } from '#src/data-directory/lib/get-data.js'
|
||||
|
||||
// Given syntax like {% data foo.bar %} or {% indented_data_reference foo.bar spaces=3 %},
|
||||
// the following regex returns just the dotted path: foo.bar
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { TokenizationError } from 'liquidjs'
|
||||
|
||||
import { THROW_ON_EMPTY, DataReferenceError } from './error-handling.js'
|
||||
import { getDataByLanguage } from '../../../lib/get-data.js'
|
||||
import { getDataByLanguage } from '#src/data-directory/lib/get-data.js'
|
||||
|
||||
const Syntax = /([a-z0-9/\\_.\-[\]]+)/i
|
||||
const SyntaxHelp = "Syntax Error in 'data' - Valid syntax: data [path]"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import assert from 'assert'
|
||||
|
||||
import { THROW_ON_EMPTY, IndentedDataReferenceError } from './error-handling.js'
|
||||
import { getDataByLanguage } from '../../../lib/get-data.js'
|
||||
import { getDataByLanguage } from '#src/data-directory/lib/get-data.js'
|
||||
|
||||
// This class supports a tag that expects two parameters, a data reference and `spaces=NUMBER`:
|
||||
//
|
||||
|
|
|
@ -11,7 +11,7 @@ import path from 'path'
|
|||
import { mkdirp } from 'mkdirp'
|
||||
import { program } from 'commander'
|
||||
import { execSync } from 'child_process'
|
||||
import frontmatter from '../../../lib/read-frontmatter.js'
|
||||
import frontmatter from '#src/frame/lib/read-frontmatter.js'
|
||||
import addRedirectToFrontmatter from '#src/redirects/scripts/helpers/add-redirect-to-frontmatter.js'
|
||||
import walkFiles from '#src/workflows/walk-files.js'
|
||||
|
||||
|
|
|
@ -28,8 +28,8 @@ import chalk from 'chalk'
|
|||
import walk from 'walk-sync'
|
||||
import yaml from 'js-yaml'
|
||||
|
||||
import fm from '../../../lib/frontmatter.js'
|
||||
import readFrontmatter from '../../../lib/read-frontmatter.js'
|
||||
import fm from '#src/frame/lib/frontmatter.js'
|
||||
import readFrontmatter from '#src/frame/lib/read-frontmatter.js'
|
||||
|
||||
const CONTENT_ROOT = path.resolve('content')
|
||||
const DATA_ROOT = path.resolve('data')
|
||||
|
|
|
@ -16,10 +16,10 @@ import chalk from 'chalk'
|
|||
import GithubSlugger from 'github-slugger'
|
||||
import { decode } from 'html-entities'
|
||||
|
||||
import frontmatter from '../../../lib/read-frontmatter.js'
|
||||
import frontmatter from '#src/frame/lib/read-frontmatter.js'
|
||||
import { renderContent } from '#src/content-render/index.js'
|
||||
import { allVersions } from '#src/versions/lib/all-versions.js'
|
||||
import { ROOT } from '../../../lib/constants.js'
|
||||
import { ROOT } from '#src/frame/lib/constants.js'
|
||||
|
||||
const slugger = new GithubSlugger()
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ import path from 'path'
|
|||
import walk from 'walk-sync'
|
||||
import GithubSlugger from 'github-slugger'
|
||||
import { decode } from 'html-entities'
|
||||
import frontmatter from '../../../lib/read-frontmatter.js'
|
||||
import frontmatter from '#src/frame/lib/read-frontmatter.js'
|
||||
import { execSync } from 'child_process'
|
||||
import addRedirectToFrontmatter from '#src/redirects/scripts/helpers/add-redirect-to-frontmatter.js'
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import { execSync } from 'child_process'
|
|||
import { renderLiquid } from '#src/content-render/liquid/index.js'
|
||||
import shortVersionsMiddleware from '#src/versions/middleware/short-versions.js'
|
||||
|
||||
const { loadPages } = await import('../../../lib/page-data.js')
|
||||
const { loadPages } = await import('#src/frame/lib/page-data.js')
|
||||
const { allVersions } = await import('#src/versions/lib/all-versions.js')
|
||||
|
||||
const contentCopilotDir = path.join(process.cwd(), 'content-copilot')
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { afterAll, beforeAll, expect, describe, it } from '@jest/globals'
|
||||
|
||||
import Page from '../../../lib/page.js'
|
||||
import Page from '#src/frame/lib/page.js'
|
||||
import languages from '#src/languages/lib/languages.js'
|
||||
import nonEnterpriseDefaultVersion from '#src/versions/lib/non-enterprise-default-version.js'
|
||||
import { DataDirectory } from '../../../tests/helpers/data-directory.js'
|
||||
|
|
|
@ -34,7 +34,7 @@ import path from 'path'
|
|||
import { jest } from '@jest/globals'
|
||||
|
||||
import { head, get } from '../../../tests/helpers/e2etest.js'
|
||||
import { loadPages } from '../../../lib/page-data.js'
|
||||
import { loadPages } from '#src/frame/lib/page-data.js'
|
||||
|
||||
const EMPTY = Symbol('EMPTY')
|
||||
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
import path from 'path'
|
||||
import { visit } from 'unist-util-visit'
|
||||
import { distance } from 'fastest-levenshtein'
|
||||
import { getPathWithoutLanguage, getVersionStringFromPath } from '../../../lib/path-utils.js'
|
||||
import { getPathWithoutLanguage, getVersionStringFromPath } from '#src/frame/lib/path-utils.js'
|
||||
import { getNewVersionedPath } from '#src/archives/lib/old-versions-utils.js'
|
||||
import patterns from '../../../lib/patterns.js'
|
||||
import patterns from '#src/frame/lib/patterns.js'
|
||||
import { deprecated, latest } from '#src/versions/lib/enterprise-server-releases.js'
|
||||
import nonEnterpriseDefaultVersion from '#src/versions/lib/non-enterprise-default-version.js'
|
||||
import { allVersions } from '#src/versions/lib/all-versions.js'
|
||||
import removeFPTFromPath from '#src/versions/lib/remove-fpt-from-path.js'
|
||||
import readJsonFile from '../../../lib/read-json-file.js'
|
||||
import findPage from '../../../lib/find-page.js'
|
||||
import readJsonFile from '#src/frame/lib/read-json-file.js'
|
||||
import findPage from '#src/frame/lib/find-page.js'
|
||||
|
||||
const isProd = process.env.NODE_ENV === 'production'
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import matter from 'gray-matter'
|
|||
import { merge, get } from 'lodash-es'
|
||||
|
||||
import languages from '#src/languages/lib/languages.js'
|
||||
import { correctTranslatedContentStrings } from './correct-translation-content.js'
|
||||
import { correctTranslatedContentStrings } from '#src/languages/lib/correct-translation-content.js'
|
||||
|
||||
// If you run `export DEBUG_JIT_DATA_READS=true` in your terminal,
|
||||
// next time it will mention every file it reads from disk.
|
|
@ -12,8 +12,8 @@ import yaml from 'js-yaml'
|
|||
import { last } from 'lodash-es'
|
||||
import { program } from 'commander'
|
||||
import { execFileSync } from 'child_process'
|
||||
import frontmatter from '../../../lib/read-frontmatter.js'
|
||||
import patterns from '../../../lib/patterns.js'
|
||||
import frontmatter from '#src/frame/lib/read-frontmatter.js'
|
||||
import patterns from '#src/frame/lib/patterns.js'
|
||||
import addRedirectToFrontmatter from '#src/redirects/scripts/helpers/add-redirect-to-frontmatter.js'
|
||||
import walkFiles from '#src/workflows/walk-files.js'
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import path from 'path'
|
|||
import { program } from 'commander'
|
||||
import walkFiles from '#src/workflows/walk-files.js'
|
||||
import { escapeRegExp } from 'lodash-es'
|
||||
import patterns from '../../../lib/patterns.js'
|
||||
import patterns from '#src/frame/lib/patterns.js'
|
||||
|
||||
program
|
||||
.description('Update data and image paths.')
|
||||
|
|
|
@ -4,7 +4,7 @@ import got from 'got'
|
|||
import { isNil } from 'lodash-es'
|
||||
import statsd from '#src/observability/lib/statsd.js'
|
||||
import { report } from '#src/observability/lib/failbot.js'
|
||||
import { MAX_REQUEST_TIMEOUT } from '../../../lib/constants.js'
|
||||
import { MAX_REQUEST_TIMEOUT } from '#src/frame/lib/constants.js'
|
||||
|
||||
const TIME_OUT_TEXT = 'ms has passed since batch creation'
|
||||
const SERVER_DISCONNECT_TEXT = 'The server disconnected before a response was received'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { languageKeys } from '#src/languages/lib/languages.js'
|
||||
import { allVersionKeys } from '#src/versions/lib/all-versions.js'
|
||||
import { productIds } from '../../../lib/all-products.js'
|
||||
import { productIds } from '#src/products/lib/all-products.js'
|
||||
import { allTools } from '#src/tools/lib/all-tools.js'
|
||||
|
||||
const versionPattern = '^\\d+(\\.\\d+)?(\\.\\d+)?$' // eslint-disable-line
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import express from 'express'
|
||||
import middleware from '../middleware/index.js'
|
||||
import middleware from '../../../middleware/index.js'
|
||||
|
||||
function createApp() {
|
||||
const app = express()
|
|
@ -1,7 +1,7 @@
|
|||
import parse from './read-frontmatter.js'
|
||||
import { allVersions } from '#src/versions/lib/all-versions.js'
|
||||
import { allTools } from '#src/tools/lib/all-tools.js'
|
||||
import { getDeepDataByLanguage } from './get-data.js'
|
||||
import { getDeepDataByLanguage } from '#src/data-directory/lib/get-data.js'
|
||||
|
||||
const layoutNames = [
|
||||
'default',
|
|
@ -1,4 +1,4 @@
|
|||
import { productMap } from './all-products.js'
|
||||
import { productMap } from '#src/products/lib/all-products.js'
|
||||
const productTOCs = Object.values(productMap)
|
||||
.filter((product) => !product.external)
|
||||
.map((product) => product.toc.replace('content/', ''))
|
|
@ -7,7 +7,7 @@ import nonEnterpriseDefaultVersion from '#src/versions/lib/non-enterprise-defaul
|
|||
import readFileContents from './read-file-contents.js'
|
||||
import Page from './page.js'
|
||||
import frontmatterSchema from './frontmatter.js'
|
||||
import { correctTranslatedContentStrings } from './correct-translation-content.js'
|
||||
import { correctTranslatedContentStrings } from '#src/languages/lib/correct-translation-content.js'
|
||||
|
||||
// If you run `export DEBUG_TRANSLATION_FALLBACKS=true` in your terminal,
|
||||
// every time a translation file fails to initialize we fall back to English
|
|
@ -3,19 +3,19 @@ import path from 'path'
|
|||
import cheerio from 'cheerio'
|
||||
import getApplicableVersions from '#src/versions/lib/get-applicable-versions.js'
|
||||
import generateRedirectsForPermalinks from '#src/redirects/lib/permalinks.js'
|
||||
import getEnglishHeadings from './get-english-headings.js'
|
||||
import getEnglishHeadings from '#src/languages/lib/get-english-headings.js'
|
||||
import getTocItems from './get-toc-items.js'
|
||||
import Permalink from './permalink.js'
|
||||
import { renderContent } from '#src/content-render/index.js'
|
||||
import processLearningTracks from '#src/learning-track/lib/process-learning-tracks.js'
|
||||
import { productMap } from './all-products.js'
|
||||
import { productMap } from '#src/products/lib/all-products.js'
|
||||
import slash from 'slash'
|
||||
import readFileContents from './read-file-contents.js'
|
||||
import getLinkData from '#src/learning-track/lib/get-link-data.js'
|
||||
import getDocumentType from '#src/events/lib/get-document-type.js'
|
||||
import { union } from 'lodash-es'
|
||||
import { allTools } from '#src/tools/lib/all-tools.js'
|
||||
import { renderContentWithFallback } from './render-with-fallback.js'
|
||||
import { renderContentWithFallback } from '#src/languages/lib/render-with-fallback.js'
|
||||
import { deprecated, supported } from '#src/versions/lib/enterprise-server-releases.js'
|
||||
import { allPlatforms } from '#src/tools/lib/all-platforms.js'
|
||||
|
|
@ -2,7 +2,7 @@ import slash from 'slash'
|
|||
import path from 'path'
|
||||
import patterns from './patterns.js'
|
||||
import { latest } from '#src/versions/lib/enterprise-server-releases.js'
|
||||
import { productIds } from './all-products.js'
|
||||
import { productIds } from '#src/products/lib/all-products.js'
|
||||
import { allVersions } from '#src/versions/lib/all-versions.js'
|
||||
import nonEnterpriseDefaultVersion from '#src/versions/lib/non-enterprise-default-version.js'
|
||||
const supportedVersions = new Set(Object.keys(allVersions))
|
|
@ -15,10 +15,10 @@ import { program } from 'commander'
|
|||
import { rimraf } from 'rimraf'
|
||||
import http from 'http'
|
||||
|
||||
import createApp from '../../../lib/app.js'
|
||||
import createApp from '#src/frame/lib/app.js'
|
||||
import EnterpriseServerReleases from '#src/versions/lib/enterprise-server-releases.js'
|
||||
import loadRedirects from '#src/redirects/lib/precompile.js'
|
||||
import { loadPageMap } from '../../../lib/page-data.js'
|
||||
import { loadPageMap } from '#src/frame/lib/page-data.js'
|
||||
import { languageKeys } from '#src/languages/lib/languages.js'
|
||||
|
||||
const port = '4001'
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
import fs from 'fs'
|
||||
import { program } from 'commander'
|
||||
|
||||
import frontmatter from '../../../lib/read-frontmatter.js'
|
||||
import frontmatter from '#src/frame/lib/read-frontmatter.js'
|
||||
import removeLiquidStatements from './remove-liquid-statements.js'
|
||||
import removeDeprecatedFrontmatter from './remove-deprecated-frontmatter.js'
|
||||
import { all, getNextReleaseNumber } from '#src/versions/lib/enterprise-server-releases.js'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import path from 'path'
|
||||
import { readFile } from 'fs/promises'
|
||||
|
||||
import { readCompressedJsonFileFallback } from '../../../lib/read-json-file.js'
|
||||
import { readCompressedJsonFileFallback } from '#src/frame/lib/read-json-file.js'
|
||||
import { getOpenApiVersion } from '#src/versions/lib/all-versions.js'
|
||||
import { categoriesWithoutSubcategories } from '../../rest/lib/index.js'
|
||||
|
||||
|
@ -31,9 +31,9 @@ export async function getAppsData(pageType, docsVersion, apiVersion) {
|
|||
}
|
||||
|
||||
export async function getAppsServerSideProps(context, pageType, { useDisplayTitle = false }) {
|
||||
const { getAutomatedPageMiniTocItems } = await import('lib/get-mini-toc-items')
|
||||
const { getAutomatedPageMiniTocItems } = await import('#src/frame/lib/get-mini-toc-items')
|
||||
const { getAutomatedPageContextFromRequest } = await import(
|
||||
'src/automated-pipelines/components/AutomatedPageContext'
|
||||
'#src/automated-pipelines/components/AutomatedPageContext'
|
||||
)
|
||||
const currentVersion = context.query.versionId
|
||||
const allVersions = context.req.context.allVersions
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import {
|
||||
readCompressedJsonFileFallbackLazily,
|
||||
readCompressedJsonFileFallback,
|
||||
} from '../../../lib/read-json-file.js'
|
||||
import { getAutomatedPageMiniTocItems } from '../../../lib/get-mini-toc-items.js'
|
||||
} from '#src/frame/lib/read-json-file.js'
|
||||
import { getAutomatedPageMiniTocItems } from '#src/frame/lib/get-mini-toc-items.js'
|
||||
import languages from '#src/languages/lib/languages.js'
|
||||
import { allVersions } from '#src/versions/lib/all-versions.js'
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ export default function GraphqlBreakingChanges({
|
|||
|
||||
export const getServerSideProps: GetServerSideProps<Props> = async (context) => {
|
||||
const { getGraphqlBreakingChanges } = await import('src/graphql/lib/index.js')
|
||||
const { getAutomatedPageMiniTocItems } = await import('lib/get-mini-toc-items.js')
|
||||
const { getAutomatedPageMiniTocItems } = await import('src/frame/lib/get-mini-toc-items.js')
|
||||
|
||||
const req = context.req as any
|
||||
const res = context.res as any
|
||||
|
|
|
@ -30,7 +30,7 @@ export default function GraphqlChangelog({ mainContext, schema, automatedPageCon
|
|||
|
||||
export const getServerSideProps: GetServerSideProps<Props> = async (context) => {
|
||||
const { getGraphqlChangelog } = await import('src/graphql/lib/index.js')
|
||||
const { getAutomatedPageMiniTocItems } = await import('lib/get-mini-toc-items.js')
|
||||
const { getAutomatedPageMiniTocItems } = await import('src/frame/lib/get-mini-toc-items.js')
|
||||
|
||||
const req = context.req as any
|
||||
const res = context.res as any
|
||||
|
|
|
@ -35,7 +35,7 @@ export default function GraphqlPreviews({ mainContext, schema, automatedPageCont
|
|||
|
||||
export const getServerSideProps: GetServerSideProps<Props> = async (context) => {
|
||||
const { getPreviews } = await import('src/graphql/lib/index.js')
|
||||
const { getAutomatedPageMiniTocItems } = await import('lib/get-mini-toc-items.js')
|
||||
const { getAutomatedPageMiniTocItems } = await import('src/frame/lib/get-mini-toc-items.js')
|
||||
|
||||
const req = context.req as any
|
||||
const res = context.res as any
|
||||
|
|
|
@ -8,7 +8,7 @@ import {
|
|||
previewAnchor,
|
||||
prependDatedEntry,
|
||||
} from '../scripts/build-changelog.js'
|
||||
import readJsonFile from '../../../lib/read-json-file.js'
|
||||
import readJsonFile from '#src/frame/lib/read-json-file.js'
|
||||
|
||||
const expectedChangelogEntry = readJsonFile('src/graphql/tests/fixtures/changelog-entry.json')
|
||||
const expectedUpdatedChangelogFile = readJsonFile(
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { jest } from '@jest/globals'
|
||||
import Ajv from 'ajv'
|
||||
|
||||
import readJsonFile from '../../../lib/read-json-file.js'
|
||||
import readJsonFile from '#src/frame/lib/read-json-file.js'
|
||||
import { schemaValidator, previewsValidator, upcomingChangesValidator } from '../lib/validator.js'
|
||||
import { formatAjvErrors } from '../../../tests/helpers/schemas.js'
|
||||
import { allVersions } from '#src/versions/lib/all-versions.js'
|
||||
|
|
|
@ -3,7 +3,7 @@ import Cookies from 'components/lib/cookies'
|
|||
import { useRouter } from 'next/router'
|
||||
|
||||
import { useLanguages } from 'src/languages/components/LanguagesContext'
|
||||
import { USER_LANGUAGE_COOKIE_NAME } from '../../../lib/constants.js'
|
||||
import { USER_LANGUAGE_COOKIE_NAME } from 'src/frame/lib/constants.js'
|
||||
|
||||
export function useUserLanguage() {
|
||||
const { locale } = useRouter()
|
||||
|
|
|
@ -2,8 +2,8 @@ import { fromMarkdown } from 'mdast-util-from-markdown'
|
|||
import { toString } from 'mdast-util-to-string'
|
||||
import { visit } from 'unist-util-visit'
|
||||
|
||||
import findPage from './find-page.js'
|
||||
import { getDataByLanguage } from './get-data.js'
|
||||
import findPage from '#src/frame/lib/find-page.js'
|
||||
import { getDataByLanguage } from '#src/data-directory/lib/get-data.js'
|
||||
|
||||
// for any translated page, first get corresponding English markdown
|
||||
// then get the headings on both the translated and English pageMap
|
|
@ -6,7 +6,7 @@ import fs from 'fs'
|
|||
|
||||
import dotenv from 'dotenv'
|
||||
|
||||
import { ROOT, TRANSLATIONS_ROOT, TRANSLATIONS_FIXTURE_ROOT } from '../../../lib/constants.js'
|
||||
import { ROOT, TRANSLATIONS_ROOT, TRANSLATIONS_FIXTURE_ROOT } from '#src/frame/lib/constants.js'
|
||||
|
||||
dotenv.config()
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { renderContent } from '#src/content-render/index.js'
|
||||
import Page from './page.js'
|
||||
import Page from '#src/frame/lib/page.js'
|
||||
import { TitleFromAutotitleError } from '#src/content-render/unified/rewrite-local-links.js'
|
||||
|
||||
class EmptyTitleError extends Error {}
|
|
@ -1,7 +1,7 @@
|
|||
import languages, { languageKeys } from '#src/languages/lib/languages.js'
|
||||
import parser from 'accept-language-parser'
|
||||
|
||||
import { USER_LANGUAGE_COOKIE_NAME } from '../../../lib/constants.js'
|
||||
import { USER_LANGUAGE_COOKIE_NAME } from '#src/frame/lib/constants.js'
|
||||
|
||||
const chineseRegions = [
|
||||
'CN', // Mainland
|
||||
|
|
|
@ -60,10 +60,10 @@ console.warn = console.error = (...args) => {
|
|||
|
||||
// Weird import syntax, but forces it to load after process.env... changes
|
||||
const { languageKeys } = await import('#src/languages/lib/languages.js')
|
||||
const { loadPages, loadPageMap } = await import('../../../lib/page-data.js')
|
||||
const { loadPages, loadPageMap } = await import('#src/frame/lib/page-data.js')
|
||||
const { precompileRedirects } = await import('#src/redirects/lib/precompile.js')
|
||||
const { allVersions, allVersionKeys } = await import('#src/versions/lib/all-versions.js')
|
||||
const { getProductStringFromPath } = await import('../../../lib/path-utils.js')
|
||||
const { getProductStringFromPath } = await import('#src/frame/lib/path-utils.js')
|
||||
|
||||
// Check that the language is valid
|
||||
const { language, gitref } = program.opts()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { languageKeys } from '#src/languages/lib/languages.js'
|
||||
import { blockIndex } from '../../../middleware/block-robots.js'
|
||||
import { get, getDOMCached as getDOM } from '../../../tests/helpers/e2etest.js'
|
||||
import Page from '../../../lib/page.js'
|
||||
import Page from '#src/frame/lib/page.js'
|
||||
import { jest } from '@jest/globals'
|
||||
|
||||
const langs = languageKeys.filter((lang) => lang !== 'en')
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { languageKeys } from '#src/languages/lib/languages.js'
|
||||
import { get } from '../../../tests/helpers/e2etest.js'
|
||||
import { USER_LANGUAGE_COOKIE_NAME } from '../../../lib/constants.js'
|
||||
import { USER_LANGUAGE_COOKIE_NAME } from '#src/frame/lib/constants.js'
|
||||
|
||||
const langs = languageKeys.filter((lang) => lang !== 'en')
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import path from 'path'
|
||||
import findPage from '../../../lib/find-page.js'
|
||||
import findPage from '#src/frame/lib/find-page.js'
|
||||
import nonEnterpriseDefaultVersion from '#src/versions/lib/non-enterprise-default-version.js'
|
||||
import removeFPTFromPath from '#src/versions/lib/remove-fpt-from-path.js'
|
||||
import { renderContent } from '#src/content-render/index.js'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { schema } from '../../../lib/frontmatter.js'
|
||||
import { schema } from '#src/frame/lib/frontmatter.js'
|
||||
|
||||
// Some learning tracks have `versions` blocks that match `versions` frontmatter,
|
||||
// so we can import that part of the FM schema.
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { renderContent } from '#src/content-render/index.js'
|
||||
import getLinkData from './get-link-data.js'
|
||||
import getApplicableVersions from '#src/versions/lib/get-applicable-versions.js'
|
||||
import { getDataByLanguage } from '../../../lib/get-data.js'
|
||||
import { executeWithFallback } from '../../../lib/render-with-fallback.js'
|
||||
import { getDataByLanguage } from '#src/data-directory/lib/get-data.js'
|
||||
import { executeWithFallback } from '#src/languages/lib/render-with-fallback.js'
|
||||
|
||||
const renderOpts = { textOnly: true }
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { getPathWithoutLanguage, getPathWithoutVersion } from '../../../lib/path-utils.js'
|
||||
import { getPathWithoutLanguage, getPathWithoutVersion } from '#src/frame/lib/path-utils.js'
|
||||
import getLinkData from '../lib/get-link-data.js'
|
||||
import { renderContent } from '#src/content-render/index.js'
|
||||
import { getDeepDataByLanguage } from '../../../lib/get-data.js'
|
||||
import { getDeepDataByLanguage } from '#src/data-directory/lib/get-data.js'
|
||||
|
||||
export default async function learningTrack(req, res, next) {
|
||||
const noTrack = () => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { loadPages, loadPageMap } from '../../../lib/page-data.js'
|
||||
import { loadPages, loadPageMap } from '#src/frame/lib/page-data.js'
|
||||
import loadRedirects from '#src/redirects/lib/precompile.js'
|
||||
import { getDeepDataByLanguage } from '../../../lib/get-data.js'
|
||||
import { getDeepDataByLanguage } from '#src/data-directory/lib/get-data.js'
|
||||
import { checkURL } from '../../../tests/helpers/check-url.js'
|
||||
|
||||
const pageList = await loadPages(undefined, ['en'])
|
||||
|
|
|
@ -6,7 +6,7 @@ import { jest } from '@jest/globals'
|
|||
import { liquid } from '#src/content-render/index.js'
|
||||
import learningTracksSchema from '../lib/learning-tracks-schema.js'
|
||||
import { formatAjvErrors } from '../../../tests/helpers/schemas.js'
|
||||
import { ajvValidate } from '../../../lib/ajv-validate.js'
|
||||
import { ajvValidate } from '#src/tests/lib/ajv-validate.js'
|
||||
|
||||
const learningTrackRootPath = 'data/learning-tracks'
|
||||
const jsonValidator = ajvValidate(learningTracksSchema)
|
||||
|
|
|
@ -6,16 +6,16 @@ import { fromMarkdown } from 'mdast-util-from-markdown'
|
|||
import { toMarkdown } from 'mdast-util-to-markdown'
|
||||
import yaml from 'js-yaml'
|
||||
|
||||
import frontmatter from '../../../lib/read-frontmatter.js'
|
||||
import frontmatter from '#src/frame/lib/read-frontmatter.js'
|
||||
import {
|
||||
getPathWithLanguage,
|
||||
getPathWithoutLanguage,
|
||||
getPathWithoutVersion,
|
||||
getVersionStringFromPath,
|
||||
} from '../../../lib/path-utils.js'
|
||||
} from '#src/frame/lib/path-utils.js'
|
||||
import loadRedirects from '#src/redirects/lib/precompile.js'
|
||||
import patterns from '../../../lib/patterns.js'
|
||||
import { loadUnversionedTree, loadPages, loadPageMap } from '../../../lib/page-data.js'
|
||||
import patterns from '#src/frame/lib/patterns.js'
|
||||
import { loadUnversionedTree, loadPages, loadPageMap } from '#src/frame/lib/page-data.js'
|
||||
import getRedirect, { splitPathByLanguage } from '#src/redirects/lib/get-redirect.js'
|
||||
import nonEnterpriseDefaultVersion from '#src/versions/lib/non-enterprise-default-version.js'
|
||||
import { deprecated } from '#src/versions/lib/enterprise-server-releases.js'
|
||||
|
|
|
@ -13,7 +13,7 @@ import shortVersions from '#src/versions/middleware/short-versions.js'
|
|||
import contextualize from '../../../middleware/context.js'
|
||||
import features from '#src/versions/middleware/features.js'
|
||||
import getRedirect from '#src/redirects/lib/get-redirect.js'
|
||||
import warmServer from '../../../lib/warm-server.js'
|
||||
import warmServer from '#src/frame/lib/warm-server.js'
|
||||
import { liquid } from '#src/content-render/index.js'
|
||||
import { deprecated } from '#src/versions/lib/enterprise-server-releases.js'
|
||||
import excludedLinks from '#src/links/lib/excluded-links.js'
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
import walk from 'walk-sync'
|
||||
import frontmatter from '../../../lib/read-frontmatter.js'
|
||||
import { loadPages, loadPageMap } from '../../../lib/page-data.js'
|
||||
import patterns from '../../../lib/patterns.js'
|
||||
import frontmatter from '#src/frame/lib/read-frontmatter.js'
|
||||
import { loadPages, loadPageMap } from '#src/frame/lib/page-data.js'
|
||||
import patterns from '#src/frame/lib/patterns.js'
|
||||
import loadRedirects from '#src/redirects/lib/precompile.js'
|
||||
import { allVersionKeys } from '#src/versions/lib/all-versions.js'
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ import chalk from 'chalk'
|
|||
import yaml from 'js-yaml'
|
||||
|
||||
import { updateInternalLinks } from '#src/links/lib/update-internal-links.js'
|
||||
import frontmatter from '../../../lib/read-frontmatter.js'
|
||||
import frontmatter from '#src/frame/lib/read-frontmatter.js'
|
||||
import walkFiles from '#src/workflows/walk-files.js'
|
||||
|
||||
program
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import fs from 'fs/promises'
|
||||
import path from 'path'
|
||||
import frontmatter from './read-frontmatter.js'
|
||||
import frontmatter from '#src/frame/lib/read-frontmatter.js'
|
||||
import getApplicableVersions from '#src/versions/lib/get-applicable-versions.js'
|
||||
import removeFPTFromPath from '#src/versions/lib/remove-fpt-from-path.js'
|
||||
import { ROOT } from './constants.js'
|
||||
import { ROOT } from '#src/frame/lib/constants.js'
|
||||
|
||||
// Both internal and external products are specified in content/index.md
|
||||
const homepage = path.posix.join(ROOT, 'content/index.md')
|
|
@ -1,7 +1,7 @@
|
|||
import path from 'path'
|
||||
|
||||
import { productMap, data } from './all-products.js'
|
||||
import { renderContentWithFallback } from './render-with-fallback.js'
|
||||
import { renderContentWithFallback } from '#src/languages/lib/render-with-fallback.js'
|
||||
import removeFPTFromPath from '#src/versions/lib/remove-fpt-from-path.js'
|
||||
|
||||
async function getPage(id, lang, pageMap, context) {
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче