@redocly/framework 1.0.0-next.6 → 1.0.0-next.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundler/build/run.js +1 -1
- package/dist/bundler/build/vite-config.js +2 -2
- package/dist/bundler/dev/dev-content-build.js +1 -0
- package/dist/bundler/dev/dev-problems.js +1 -1
- package/dist/bundler/dev/dev-reporter.js +1 -1
- package/dist/bundler/dev/routes/dev-content-build-route.js +1 -0
- package/dist/bundler/dev/routes/dev-problems-route.js +1 -1
- package/dist/bundler/dev/routes/source-sync-route.js +1 -1
- package/dist/bundler/dev/run.js +1 -1
- package/dist/bundler/dev/runtime-app.js +1 -1
- package/dist/bundler/dev/vite-chunk-url.js +1 -1
- package/dist/bundler/user-markdoc-schema.js +1 -1
- package/dist/bundler/vite-config.base.js +2 -2
- package/dist/cli/commands/build.js +1 -1
- package/dist/cli/commands/dev.js +1 -1
- package/dist/cli/commands/ingest.js +1 -1
- package/dist/cli/commands/translate.js +2 -2
- package/dist/cli/dev-console/{sweep.js → content-build.js} +1 -1
- package/dist/cli/dev-console/index.js +1 -1
- package/dist/cli/dev-console/lines.js +2 -2
- package/dist/cli/dev-console/plain.js +1 -1
- package/dist/cli/dev-console/tui.js +2 -2
- package/dist/cli/log-output/index.js +1 -1
- package/dist/cli/validate-react-pages.js +1 -1
- package/dist/client/ai-search/use-ai-search.js +1 -1
- package/dist/client/analytics-page-view.js +1 -1
- package/dist/client/app.js +3 -3
- package/dist/client/client-entry.js +1 -1
- package/dist/client/contexts.js +1 -1
- package/dist/client/dev-problems/ProblemsBar.js +61 -11
- package/dist/client/dev-problems/build-segment.js +1 -0
- package/dist/client/dev-problems/index.js +1 -1
- package/dist/client/dev-problems/use-dev-problems.js +1 -1
- package/dist/client/feedback.js +1 -1
- package/dist/client/l10n/ssr-l10n.js +1 -1
- package/dist/client/l10n/use-l10n-config.js +1 -1
- package/dist/client/products.js +1 -1
- package/dist/client/review/ReviewBar.js +50 -50
- package/dist/client/review/use-review.js +1 -1
- package/dist/client/sidebar/SidebarDataProvider.js +1 -1
- package/dist/client/sidebar/drilldown.js +1 -1
- package/dist/client/ssr.js +1 -1
- package/dist/client/telemetry/config.js +1 -1
- package/dist/client/theme-logo.js +1 -1
- package/dist/client/use-entity-revisions.js +1 -1
- package/dist/client/use-page-versions.js +1 -1
- package/dist/client/use-search.js +1 -1
- package/dist/client/webmcp/tools/shared.js +1 -1
- package/dist/client/webmcp/tools/site-tools.js +1 -1
- package/dist/client/webmcp/use-webmcp-tools.js +1 -1
- package/dist/content-layer/config.d.ts +2 -1
- package/dist/content-layer/config.js +1 -1
- package/dist/content-layer/database/invalidation.js +26 -26
- package/dist/content-layer/ingest/finalize-phase.js +1 -1
- package/dist/content-layer/ingest/git-last-modified.js +3 -3
- package/dist/content-layer/ingest/l10n-warnings.js +1 -1
- package/dist/content-layer/ingest/normalize-artifacts.js +1 -1
- package/dist/content-layer/ingest/run.js +1 -1
- package/dist/content-layer/ingest/search-sync.js +1 -1
- package/dist/content-layer/link-checker/load-view.js +1 -1
- package/dist/content-layer/link-checker/validate.js +1 -1
- package/dist/content-layer/markdown/client/markdown-text.js +1 -1
- package/dist/content-layer/markdown/constants/builtin-tags.js +1 -1
- package/dist/content-layer/markdown/constants/markdown-text-tag-set.js +1 -1
- package/dist/content-layer/markdown/constants/tag-sets.js +1 -1
- package/dist/content-layer/markdown/nodes/fence.js +1 -1
- package/dist/content-layer/markdown/nodes/heading.js +1 -1
- package/dist/content-layer/markdown/nodes/table.js +1 -1
- package/dist/content-layer/markdown/resolve/markdoc-resolvers/json-schema.js +1 -1
- package/dist/content-layer/markdown/resolve/markdoc-resolvers/operation-samples.js +1 -1
- package/dist/content-layer/markdown/resolve/markdoc.js +1 -1
- package/dist/content-layer/markdown/resolve/references.js +1 -1
- package/dist/content-layer/markdown/search/to-markdown.js +2 -2
- package/dist/content-layer/markdown/server/render.js +1 -1
- package/dist/content-layer/markdown/tags/variant.js +1 -1
- package/dist/content-layer/markdown/utils/parse-cache.js +1 -1
- package/dist/content-layer/materialization/static-files.js +1 -1
- package/dist/content-layer/plugins/index.js +1 -1
- package/dist/content-layer/plugins/internal/api-docs/client/template.js +2 -2
- package/dist/content-layer/plugins/internal/api-docs/index.js +1 -1
- package/dist/content-layer/plugins/internal/api-docs/server/markdown-docs.js +13 -13
- package/dist/content-layer/plugins/internal/api-docs/server/options.js +1 -1
- package/dist/content-layer/plugins/internal/api-docs/server/spec-download.js +1 -1
- package/dist/content-layer/plugins/internal/api-functions/server/dispatch.js +1 -1
- package/dist/content-layer/plugins/internal/app-data/banner.js +1 -1
- package/dist/content-layer/plugins/internal/app-data/index.js +1 -1
- package/dist/content-layer/plugins/internal/catalog-classic/client/use-catalog-classic.js +1 -1
- package/dist/content-layer/plugins/internal/catalog-classic/index.js +1 -1
- package/dist/content-layer/plugins/internal/index.js +1 -1
- package/dist/content-layer/plugins/internal/l10n/index.js +1 -1
- package/dist/content-layer/plugins/internal/markdoc/client/template.js +1 -1
- package/dist/content-layer/plugins/internal/markdoc/index.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/ignored-routes.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/agent-card.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/audit.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/auth.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/gateway/credentials-page/form-page.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/gateway/credentials-page/site-branding.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/gateway/credentials.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/gateway/elicitation.js +6 -6
- package/dist/content-layer/plugins/internal/mcp/server/gateway/index.js +2 -2
- package/dist/content-layer/plugins/internal/mcp/server/mcp-server.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/oauth/authorize.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/oauth/discovery.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/server-card.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/server-info.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/tools/pages-navigation.js +1 -1
- package/dist/content-layer/plugins/internal/mcp/server/tools/search.js +2 -2
- package/dist/content-layer/plugins/internal/mock/server/handler.js +1 -1
- package/dist/content-layer/plugins/internal/react-page/index.js +1 -1
- package/dist/content-layer/plugins/internal/scorecard-classic/index.js +1 -1
- package/dist/content-layer/plugins/internal/sidebar/bundle.js +1 -1
- package/dist/content-layer/plugins/internal/sidebar/index.js +2 -2
- package/dist/content-layer/plugins/internal/skills/index.js +1 -1
- package/dist/content-layer/plugins/project/load.js +2 -2
- package/dist/content-layer/plugins/utils/link-access.js +1 -1
- package/dist/content-layer/templates/template-set.js +1 -1
- package/dist/content-layer/versions/redirect.js +1 -1
- package/dist/content-layer/versions/resolve.js +1 -1
- package/dist/server/app.js +3 -3
- package/dist/server/ask-ai/route.js +1 -1
- package/dist/server/auth/middleware.js +1 -1
- package/dist/server/auth/request.js +1 -1
- package/dist/server/auth/routes.js +1 -1
- package/dist/server/content.js +12 -12
- package/dist/server/cors-proxy/handler.js +1 -1
- package/dist/server/feedback/route.js +1 -1
- package/dist/server/lambda-entry.js +1 -1
- package/dist/server/manifest-assets.js +4 -4
- package/dist/server/node-entry.js +1 -1
- package/dist/server/page-handlers.js +1 -1
- package/dist/server/plugin-context.js +1 -1
- package/dist/server/redirects.js +1 -1
- package/dist/server/search/route.js +1 -1
- package/dist/server/seo-tags.js +2 -2
- package/dist/server/sitemap.js +1 -1
- package/dist/server/static-files/serve.js +1 -1
- package/dist/server/telemetry/mock-server-events.js +1 -0
- package/dist/server/telemetry/redirect-event.js +1 -0
- package/dist/server/telemetry/sender.js +1 -1
- package/dist/shared/constants/content-update.js +1 -1
- package/dist/shared/constants/dev-content-build.js +1 -0
- package/dist/shared/constants/dev-problems.js +1 -1
- package/dist/shared/constants/dev-source-sync.js +1 -1
- package/dist/shared/constants/system-routes.js +1 -1
- package/dist/shared/rbac/l10n-rules.js +1 -1
- package/dist/shared/rbac/team-templates.js +1 -1
- package/dist/shared/types/search.d.ts +7 -2
- package/dist/shared/utils/l10n.js +1 -1
- package/dist/shared/utils/routes/file-path-to-route-slug.js +1 -1
- package/package.json +22 -2
- package/dist/bundler/dev/__tests__/reset-content-update-state.js +0 -1
- package/dist/bundler/dev/materialization-sweeper.js +0 -1
- package/dist/client/dev-problems/sweep-segment.js +0 -1
- package/dist/content-layer/plugins/internal/mcp/server/gateway/__tests__/fake-kv.js +0 -1
- package/dist/content-layer/plugins/internal/mcp/server/gateway/__tests__/secret-store-fixture.js +0 -1
- package/dist/server/__tests__/rbac-fixture.js +0 -1
- package/dist/server/__tests__/test-session.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=`runtime:data-update`,t=`/
|
|
1
|
+
const e=`runtime:data-update`,t=`/_realm/dev/content-state`;export{t as CONTENT_UPDATE_STATE_PATH,e as DATA_UPDATE_HMR_EVENT};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=`/_realm/dev/content-build`,t=`runtime:content-build-progress`;export{t as CONTENT_BUILD_PROGRESS_HMR_EVENT,e as DEV_CONTENT_BUILD_PATH};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=`/
|
|
1
|
+
const e=`/_realm/dev/problems`;export{e as DEV_PROBLEMS_PATH};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=`/
|
|
1
|
+
const e=`/_realm/dev/source-sync`,t=`${e}/page`,n=`${e}/source`;export{t as DEV_PAGE_FOR_SOURCE_PATH,n as DEV_SOURCE_FOR_PAGE_PATH};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CONTENT_ASSETS_URL_PREFIX as e}from"./content-assets.js";import{
|
|
1
|
+
import{CONTENT_ASSETS_URL_PREFIX as e}from"./content-assets.js";import{FEEDBACK_ROUTE_PATH as t}from"./feedback.js";import{SEARCH_FACETS_ROUTE_PATH as n,SEARCH_ROUTE_PATH as r}from"./search.js";import{AI_ASSISTANT_ESCALATIONS_ROUTE_PATH as i,AI_ASSISTANT_FEEDBACK_ROUTE_PATH as a,ASK_AI_ROUTE_PATH as o,SEMANTIC_SEARCH_ROUTE_PATH as s}from"./ask-ai.js";import{OTEL_TRACES_ROUTE_PATH as c}from"./telemetry.js";import{CORS_PROXY_ROUTE_PATH as l}from"./cors-proxy.js";import{BUILD_ASSETS_URL_PREFIX as u}from"./runtime-layout.js";import{REPLAY_OAUTH2_ROUTE_PATH as d}from"./replay.js";import{REVIEW_ROUTE_PATH as f}from"./review.js";const p=`/_realm`,m=`/page-data`,h=`/entity-data`,g=`/server-fn`,_=Object.freeze([p,`/_auth`,u,`/blob-data`,e,l,m,h,g]),v={Health:`/_health`,Favicon:`/favicon.ico`,Info:`/_info`,LlmsTxt:`/llms.txt`,LlmsFullTxt:`/llms-full.txt`,Search:r,SearchFacets:n,AskAi:o,AiAssistantEscalations:i,AiAssistantFeedback:a,SemanticSearch:s,Feedback:t,OtelTraces:c,CorsProxy:l,Review:f,Login:`/login`,Logout:`/logout`,PostLogout:`/post-logout`,AuthIdpLogin:`/_auth/idp-login`,AuthOidcCallback:`/_auth/oidc`,AuthRedoclyTokenLogin:`/_auth/redocly-token-login`,AuthDevAuthorize:`/_auth/authorize`,ReplayOAuth2Callback:d},y=Object.freeze(Object.values(v));export{u as BUILD_ASSETS_URL_PREFIX,_ as ENGINE_ROUTE_PREFIXES,p as RESERVED_NAMESPACE_PREFIX,h as RUNTIME_ENTITY_DATA_PATH_PREFIX,m as RUNTIME_PAGE_PATH_PREFIX,g as RUNTIME_SERVER_FN_PATH_PREFIX,y as SYSTEM_ROUTES,v as SystemRoute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L10N_DIR as e}from"../constants/l10n/defaults.js";import{
|
|
1
|
+
import{L10N_DIR as e}from"../constants/l10n/defaults.js";import{isObject as t}from"../utils/is-object.js";import{slugifySegment as n}from"../utils/routes/slugify-segment.js";import{resolveLocaleContext as r}from"../utils/l10n.js";import{stripLeadingSlash as i}from"../utils/strip-leading-slash.js";import{RBAC_L10N_RULES_KEY as a}from"./types.js";import{escapeGlobLiteral as o}from"./engine.js";function s(t,r){let a=r.locales;if(!r.enabled)return{content:t,l10nRules:{}};let s=a.map(e=>n(e)),c=a.map(t=>`${e}/${o(t)}`),l={...t},u={},d=new Set(Object.keys(t).map(i)),f=(e,t,n)=>{d.has(e)||(d.add(e),l[e]=t,u[e]={canonical:n,generated:!0})};for(let[e,n]of Object.entries(t)){let t=i(e),r=s.findIndex(e=>t.startsWith(`${e}/`));if(r===-1)continue;let a=t.slice(s[r].length+1);u[t]={canonical:a,generated:!1},f(`${c[r]}/${a}`,n,a)}for(let[e,n]of Object.entries(t)){let t=i(e);if(!t.startsWith(`@l10n/`)&&!s.some(e=>t===e||t.startsWith(`${e}/`)))for(let e=0;e<a.length;e+=1)f(`${c[e]}/${t}`,n,t),f(`${s[e]}/${t}`,n,t)}return{content:l,l10nRules:u}}function c(e,n){let r=a in e,i=e.content,o=t(i)?s(i,n):{content:i,l10nRules:{}},c=Object.keys(o.l10nRules).length>0;if(!c&&!r)return e;let{[a]:l,...u}=e;return c?{...u,content:o.content,[a]:o.l10nRules}:u}function l(e,n){let i=r(e.l10n,n),a=e.access;if(!t(a))return e;let o=a.rbac;if(!t(o))return e;let s=c(o,i);return s===o?e:{...e,access:{...a,rbac:s}}}export{l as expandConfigRbacForL10n,c as expandRbacForL10n};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{compareStrings as e}from"../utils/compare-strings.js";import{
|
|
1
|
+
import{compareStrings as e}from"../utils/compare-strings.js";import{isObject as t}from"../utils/is-object.js";import{listSubdirectories as n}from"../utils/list-subdirectories.js";import{stripLeadingSlash as r}from"../utils/strip-leading-slash.js";import{escapeGlobLiteral as i,hasGlobMetachar as a}from"./engine.js";const o=`{folder}`,s=[`teamNamePatterns`,`teamFolders`,`teamFoldersBaseRoles`];function c(n,r,i){let a=Object.keys(t(n.content)?n.content:{}).map(e=>f(e)).filter(e=>e.kind===`team`),o=s.some(e=>e in n);if(a.length===0&&!o&&!h(n))return n;let c=[...new Set(a.flatMap(e=>r[e.prefix]??[]))].sort(e),l={};for(let[e,a]of Object.entries(n))s.includes(e)?i({code:`configuration/ignored`,message:`access.rbac.${e} is ignored: Realm Plus derives team rules from directories. Write the rule with a {folder} segment, for example "apis/{folder}/**" with the team name "P-{folder}-WRITE".`}):l[e]=e===`content`&&t(a)?p(a,r,c,i):e===`features`&&t(a)?Object.fromEntries(Object.entries(a).map(([e,t])=>[e,m(t,c,`access.rbac.features.${e}`,i)])):e===`platform`?m(a,c,`access.rbac.platform`,i):a;return l}function l(e){if(!t(e.content))return[];let n=Object.keys(e.content).map(e=>f(e)).flatMap(e=>e.kind===`team`?[e.prefix]:[]);return[...new Set(n)]}async function u(e,t,r){let i={};for(let a of r)i[a]=(await n(a===``?e:`${e}/${a}`,t)).filter(e=>!e.startsWith(`.`)&&!e.startsWith(`@`));return i}function d(e,n,r){let i=e.access;if(!t(i))return e;let a=i.rbac;if(!t(a))return e;let o=c(a,n,r);return o===a?e:{...e,access:{...i,rbac:o}}}function f(e){let t=r(e).split(`/`),n=t.flatMap((e,t)=>e.includes(o)?[t]:[]);if(n.length===0)return{kind:`plain`};if(n.length>1)return{kind:`invalid`,reason:`only one path segment can be {folder}`};let[i]=n;if(t[i]!==o)return{kind:`invalid`,reason:`{folder} must be a whole path segment`};let s=t.slice(0,i);return s.some(e=>e===``||e.startsWith(`.`)||a(e))?{kind:`invalid`,reason:`the path before {folder} must be a plain directory path`}:{kind:`team`,prefix:s.join(`/`)}}function p(e,t,n,a){let s=new Set(Object.keys(e).filter(e=>f(e).kind===`plain`).map(r)),c={};for(let[l,u]of Object.entries(e)){let e=f(l),d=`access.rbac.content["${l}"]`;if(e.kind===`invalid`){a({code:`configuration/invalid`,message:`${d} is ignored: ${e.reason}, for example "apis/{folder}/**".`});continue}if(e.kind===`plain`){c[l]=m(u,n,d,a);continue}let p=t[e.prefix]??[];if(p.length===0){a({code:`configuration/ignored`,message:`${d} matched no directory under ${e.prefix===``?`the content root`:`"${e.prefix}/"`}, so it adds no rule.`});continue}for(let e of p){let t=l.replace(o,()=>i(e));s.has(r(t))||(c[t]=m(u,[e],d,a))}}return c}function m(e,n,r,i){if(!t(e))return e;let a={};for(let[t,s]of Object.entries(e))if(!t.includes(o))a[t]=s;else if(n.length===0)i({code:`configuration/invalid`,message:`${r}["${t}"] is ignored: {folder} has no values: no access.rbac.content key with a {folder} segment matched a directory.`});else for(let e of n)a[t.replaceAll(o,()=>e)]=s;return a}function h(e){return t(e)?Object.entries(e).some(([e,t])=>e.includes(o)||h(t)):!1}export{d as expandConfigRbacTeamTemplates,c as expandRbacTeamTemplates,u as listTeamDirs,l as teamTemplatePrefixes};
|
|
@@ -72,8 +72,13 @@ export type SearchResponseBody = {
|
|
|
72
72
|
documents: Record<string, SearchResultItem[]>;
|
|
73
73
|
facets: Record<string, SearchFacetCount[]>;
|
|
74
74
|
groupCounts: Record<string, number>;
|
|
75
|
-
/** Dev only:
|
|
76
|
-
partial?:
|
|
75
|
+
/** Dev only: dev indexes a page once it is built, so the index can miss pages. */
|
|
76
|
+
partial?: SearchIndexCoverage;
|
|
77
|
+
};
|
|
78
|
+
/** Searchable content items (pages, API descriptions) indexed so far, out of all of them. */
|
|
79
|
+
export type SearchIndexCoverage = {
|
|
80
|
+
indexed: number;
|
|
81
|
+
total: number;
|
|
77
82
|
};
|
|
78
83
|
/** `POST /_search-facets` request body: the panel's values, or one field's typeahead. */
|
|
79
84
|
export type SearchFacetsRequestBody = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{DEFAULT_LOCALE_PLACEHOLDER as e,L10N_DIR as t}from"../constants/l10n/defaults.js";import{compareStrings as n}from"./compare-strings.js";import{isObject as r}from"./is-object.js";import{listSubdirectories as i}from"./list-subdirectories.js";import{normalizeRouteSlug as a}from"./routes/normalize-route-slug.js";import{slugifySegment as o}from"./routes/slugify-segment.js";function s(e){return typeof e==`string`&&e!==``}function c(t){let n=r(t)?t:void 0,i=s(n?.defaultLocale)?n.defaultLocale:e;if(!Array.isArray(n?.locales))return{defaultLocale:i,locales:void 0};let a=[];for(let e of n.locales)r(e)&&s(e.code)&&a.push({code:e.code,name:s(e.name)?e.name:e.code,showMissingTranslationNotice:e.showMissingTranslationNotice===!0||void 0});return{defaultLocale:i,locales:a}}const l=`${t}/`;function u(e){return e.split(`/`).filter(e=>e!==``)}function d(e){if(!e.startsWith(l))return;let t=l.length,n=e.indexOf(`/`,t);if(n!==-1&&n!==t&&n!==e.length-1)return e.slice(t,n)}function f(e){let t=d(e);return t===void 0?void 0:e.slice(l.length+t.length+1)}function p(e,t){return t===``?e:a(`/${o(t)}${e}`)}function m(e,t){let n=`/${o(t)}`;return e===n?`/`:e.startsWith(`${n}/`)?e.slice(n.length):void 0}function h(e){let t=/* @__PURE__ */ new Set;for(let n of e){let e=d(n);e!==void 0&&t.add(e)}return[...t].sort(n)}async function g(e,n){return i(`${e}/${t}`,n)}var _=class{enabled;defaultLocale;locales;codes;slugSegmentToCode;constructor(e,t){this.enabled=t.length>0,this.defaultLocale=e,this.locales=t,this.codes=new Set(t),this.slugSegmentToCode=new Map(t.map(e=>[o(e),e]))}isLocale(e){return this.codes.has(e)}isL10nPath(e){return e.startsWith(l)}splitLocaleFromPath(e){if(!this.enabled)return{locale:``,canonicalPath:e};let t=u(e);return t[0]!==`@l10n`||t.length<2?{locale:this.defaultLocale,canonicalPath:e}:{locale:t[1],canonicalPath:t.slice(2).join(`/`)}}toL10nPath(e,n){return!this.enabled||n===this.defaultLocale?e:e===``?`${t}/${n}`:`${t}/${n}/${e}`}toL10nSlug(e,t){return!this.enabled||t===this.defaultLocale?e:p(e,t)}splitLocaleFromSlug(e){if(!this.enabled)return{locale:``,canonicalSlug:e};let t=a(e),n=t.split(`/`).filter(e=>e!==``),r=n.length>0?this.slugSegmentToCode.get(n[0]):void 0;return r===void 0||r===this.defaultLocale?{locale:this.defaultLocale,canonicalSlug:t}:{locale:r,canonicalSlug:a(`/${n.slice(1).join(`/`)}`)}}};function v(e,t){let{defaultLocale:r}=c(e);return new _(r,[...new Set(t)].filter(e=>e!==r).sort(n))}export{e as DEFAULT_LOCALE_PLACEHOLDER,t as L10N_DIR,_ as LocaleContext,h as collectL10nDirLocales,f as delocalizeL10nPath,m as delocalizeRouteSlug,s as isLocaleCode,d as l10nDirOf,g as listL10nDirs,c as normalizeL10nConfig,v as resolveLocaleContext,p as toLocaleSlug};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{normalizeRouteSlug as e}from"./normalize-route-slug.js";import{slugifySegment as t}from"./slugify-segment.js";import{toPosixPath as n}from"../to-posix-path.js";import{extname as r,posix as i}from"node:path";function a(a,o){let s=i.normalize(n(a)),c=o||r(s),l=(c===``?s:s.slice(0,-c.length)).split(`/`).filter(Boolean);l.at(-1)===`index`&&l.pop();let u=l.map(e=>t(e));return e(u.join(`/`))}export{a as filePathToRouteSlug};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/framework",
|
|
3
|
-
"version": "1.0.0-next.
|
|
3
|
+
"version": "1.0.0-next.7",
|
|
4
4
|
"description": "A modern hybrid CMS and API documentation platform",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"bin": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@hono/node-server": "^2.0.5",
|
|
28
28
|
"@jitl/quickjs-singlefile-mjs-release-sync": "0.32.0",
|
|
29
29
|
"@modelcontextprotocol/server": "2.3.1",
|
|
30
|
-
"@redocly/api-docs": "0.6.0-next.
|
|
30
|
+
"@redocly/api-docs": "0.6.0-next.6",
|
|
31
31
|
"@redocly/config": "0.74.0",
|
|
32
32
|
"@redocly/markdoc": "0.7.0-beta.2",
|
|
33
33
|
"@redocly/mock-server": "0.15.0-next.1",
|
|
@@ -110,6 +110,26 @@
|
|
|
110
110
|
"{projectRoot}/dist"
|
|
111
111
|
]
|
|
112
112
|
},
|
|
113
|
+
"e2e": {
|
|
114
|
+
"dependsOn": [
|
|
115
|
+
"...",
|
|
116
|
+
{
|
|
117
|
+
"projects": [
|
|
118
|
+
"@redocly/framework-plugin-apigee"
|
|
119
|
+
],
|
|
120
|
+
"target": "build"
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
"inputs": [
|
|
124
|
+
"...",
|
|
125
|
+
{
|
|
126
|
+
"projects": [
|
|
127
|
+
"@redocly/framework-plugin-apigee"
|
|
128
|
+
],
|
|
129
|
+
"input": "prod"
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
},
|
|
113
133
|
"engine:install": {
|
|
114
134
|
"cache": false,
|
|
115
135
|
"dependsOn": [
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{contentUpdateState as e}from"../routes/content-update-state-route.js";function t(){e.generation=0,e.updatedAt=0}export{t as resetContentUpdateState};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{compareStrings as e}from"../../shared/utils/compare-strings.js";import{createLogger as t}from"../../shared/logger.js";import{entities as n,staticFiles as r}from"../../content-layer/database/schema.js";import{MaterializationError as i}from"../../content-layer/problems/problem-error.js";import{loadAttachedRouteSlugs as a}from"../../content-layer/database/route-deps.js";import{and as o,count as s,eq as c,inArray as l,ne as u,notInArray as d,sql as f}from"drizzle-orm";function p(e){let n=(e.logger??t()).child(`runtime:sweeper`),r=`idle`,a=[],o=!1,s=!1,c=null,l=/* @__PURE__ */ new Set,u=()=>{c!==null||r!==`running`||s||(c=d().finally(()=>{c=null,u()}))},d=async()=>{try{for(;r===`running`&&!s;){if(!o){a=(await e.loadQueue()).filter(e=>!l.has(e)),o=!0;continue}let t=a.shift();if(t===void 0){r=`idle`,o=!1,e.onProgress?.({kind:`state`,state:r});break}try{await e.materialize(t)}catch(e){if(!(e instanceof i))throw e;l.add(t),n.debug(`Could not materialize "${t}"; recorded the problem and moved on`)}e.onProgress?.({kind:`entity`}),await new Promise(e=>setImmediate(e))}}catch(t){let i=t instanceof Error?t.message:String(t);n.error(`Stopped the materialization sweep: ${i}`),a=[],o=!1,r===`running`&&(r=`idle`,e.onProgress?.({kind:`state`,state:r}))}};return{start(){r!==`running`&&(r=`running`,e.onProgress?.({kind:`state`,state:r}),u())},pause(){r===`running`&&(r=`paused`,e.onProgress?.({kind:`state`,state:r}))},async status(){let t=await e.loadProgress([...l]);return{state:r,done:t.done,total:t.total,failed:t.failed}},onIngestCycleStart(){s=!0},onIngestCycleEnd(){s=!1,l.clear(),o=!1,u()}}}function m(e){let t=f`(select ${r.entityKey} from ${r} where ${r.kind} = 'producer' and ${r.entityKey} is not null)`;return o(u(n.kind,`inline`),c(n.isCurrent,1),l(n.loaderId,[...e]),d(n.key,t))}async function h(t){let r=t.entityLoaderIds();if(r.length===0)return[];let i=await t.database.db.select({key:n.key}).from(n).where(o(c(n.status,`stale`),m(r))).orderBy(n.key),s=await a(t.database,i.map(e=>e.key));return i.map(e=>({key:e.key,slug:s.get(e.key)})).sort((t,n)=>{if(t.slug===void 0||n.slug===void 0)return t.slug===n.slug?e(t.key,n.key):t.slug===void 0?1:-1;let r=e(t.slug,n.slug);return r===0?e(t.key,n.key):r}).map(e=>e.key)}async function g(e,t){let r=e.entityLoaderIds();if(r.length===0)return{done:0,total:0,failed:0};let i=m(r),a=await e.database.db.select({status:n.status,count:s()}).from(n).where(i).groupBy(n.status),c=0,d=0;for(let e of a)d+=e.count,e.status===`ready`&&(c+=e.count);let f=0;if(t.length>0){let r=new Set(t);f=(await e.database.db.select({key:n.key}).from(n).where(t.length>50?o(u(n.status,`ready`),i):o(l(n.key,[...r]),u(n.status,`ready`),i))).filter(e=>r.has(e.key)).length}return{done:c,total:d,failed:f}}export{p as createMaterializationSweeper,g as loadSweepProgress,h as loadSweepQueue};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e){if(!e)return null;switch(e.state){case`idle`:return e.pending===0&&e.failed===0?null:{label:[e.pending>0?`${e.pending} to prepare`:null,e.failed>0?`${e.failed} failed`:null].filter(e=>e!==null).join(`, `),spinner:!1,action:`start`,actionLabel:`Start`};case`running`:return{label:`${e.done}/${e.total} prepared`,spinner:!0,action:`pause`,actionLabel:`Pause`};case`paused`:return{label:`${e.done}/${e.total} prepared`,spinner:!1,action:`start`,actionLabel:`Resume`}}}export{e as getSweepSegmentModel};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e=0){let t=/* @__PURE__ */ new Map,n=e,r=Promise.resolve(),i=e=>JSON.stringify(e),a=e=>e.expiresAt===null||e.expiresAt>n,o=(e,t)=>t.length<=e.length&&t.every((t,n)=>e[n]===t),s={async get(e){let n=t.get(i(e));return!n||!a(n)?null:n.value},async getMany(e){return e.map(e=>{let n=t.get(i(e));return n&&a(n)?{key:e,value:n.value}:null})},async set(e,r,a){let o=a?.ttlInSeconds;return t.set(i(e),{key:e,value:r,expiresAt:typeof o==`number`?n+o*1e3:null}),{key:e,value:r}},async list(e,n){let r=`prefix`in e?e.prefix:[],i=n?.cursor,s=[...t].filter(([e,t])=>a(t)&&o(t.key,r)&&(i===void 0||e>i)).sort(([e],[t])=>e<t?-1:+(e>t)),c=s.slice(0,n?.limit??100),l=c.at(-1);return{items:c.map(([,e])=>({key:e.key,value:e.value})),total:s.length,cursor:l&&s.length>c.length?l[0]:null}},async delete(e){t.delete(i(e))},async transaction(e){let t=()=>e(s),n=r.then(t,t);return r=n.then(()=>void 0,()=>void 0),n}};return{kv:s,advance:e=>n+=e}}export{e as createFakeKv};
|
package/dist/content-layer/plugins/internal/mcp/server/gateway/__tests__/secret-store-fixture.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{SecretStore as e}from"../secret-store.js";const t=`test-gateway-secret-seed`,n=new e(t);export{t as TEST_GATEWAY_SECRET_SEED,n as secretStore};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createNodePlatformFs as e}from"../../platform/node/fs.js";import{entities as t,routeDeps as n}from"../../content-layer/database/schema.js";import{loadRedoclyConfig as r}from"../../content-layer/config.js";import{openContentLayerDatabase as i}from"../../content-layer/database/connection.js";import{invalidateAppDataCache as a}from"../content.js";import{registerLocalContentAssetRoute as o}from"../content-assets/serve-local.js";import{runContentEntityBuild as s}from"../../bundler/build/run.js";import{runContentIngest as c}from"../../content-layer/ingest/run.js";import{dirname as l,join as u}from"node:path";import{mkdir as d,mkdtemp as f,rm as p,writeFile as m}from"node:fs/promises";import{tmpdir as h}from"node:os";import{eq as g}from"drizzle-orm";async function _(e,t){let n=await v(e);try{await t(n)}finally{await n.dispose()}}async function v(t){let n=await f(u(h(),`realm-plus-rbac-`)),o=()=>p(n,{force:!0,recursive:!0});try{for(let[e,r]of Object.entries(t)){let t=u(n,e);await d(l(t),{recursive:!0}),typeof r==`string`?await m(t,r,`utf8`):await m(t,r)}await c({contentDir:n}),await s({contentDir:n});let{config:f}=await r(n,e()),p=await i({contentDir:n,runMigrations:!1});return{config:f,contentDir:n,database:p,dispose:async()=>{try{a(p),await p.close()}finally{await o()}}}}catch(e){throw await o(),e}}function y(e){return t=>o(t,{contentAssetsDir:u(e,`.realm`,`runtime`,`content-assets`)})}function b(e){return{headers:{},ip:`203.0.113.5`,method:`GET`,teams:e,url:`http://runtime.test/x`,userAgent:null}}async function x(e,n){let[r]=await e.db.select({data:t.data}).from(t).where(g(t.key,n)).limit(1);return r?.data??null}async function S(e,t){let[r]=await e.db.select({target:n.target}).from(n).where(g(n.routeSlug,t)).limit(1);if(!r)throw Error(`no route dep found for ${t}`);return r.target}async function C(e,t,n){let r=await S(e,t),i=await x(e,r),a=JSON.stringify(i),o=RegExp(`/content-assets/${n}-[a-f0-9]+(?:\\.a-[a-z0-9]+)?\\.[a-z]+`),s=a.match(o);if(!s)throw Error(`Could not find content-assets URL for "${n}" in page entity "${r}"`);return s[0]}export{v as createFixture,S as documentEntityKeyForRoute,C as extractContentAssetUrlFromPage,x as getEntityJsonData,y as registerContentAssetsRoute,b as requestWithTeams,_ as setupFixture};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{REALM_SESSION_COOKIE as e}from"../auth/constants.js";import{mintSessionToken as t}from"../auth/session.js";import{resolveAccessConfig as n}from"../auth/access-config.js";import{deriveAuthKeys as r,resolveAuthKeySeed as i}from"../auth/keys.js";import{createAuthRuntime as a}from"../auth/runtime.js";const o=(async()=>{let e=i({},{allowDevFallback:!0});if(e===null)throw Error(`dev fallback seed unavailable`);return r(e,`1`)})();async function s(n,i=`tester@example.com`,a){let s=a===void 0?await o:r(a,`1`),c=await t({sub:`dev|${i}`,email:i,name:i,teams:n,idpId:`dev`},s,Math.floor(Date.now()/1e3)+3600);return`${e}=${c}`}async function c(e){return{Cookie:await s(e)}}async function l(e){let t=await a({env:{},devLogin:!0,allowDevFallbackSeed:!0,allowInsecureCookies:!0,getAccessConfig:()=>n(e)});if(!t)throw Error(`test auth runtime failed to initialize`);return t}async function u(){let e=await a({env:{},devLogin:!0,allowDevFallbackSeed:!0,allowInsecureCookies:!0,getAccessConfig:()=>({requiresLogin:!1})});if(!e)throw Error(`test auth runtime failed to initialize`);return e}export{c as cookieFor,u as createStandaloneTestAuthRuntime,l as createTestAuthRuntime,s as sessionCookieFor};
|