@stainless-api/docs 0.1.0-beta.7 → 0.1.0-beta.70
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/CHANGELOG.md +554 -0
- package/README.md +1 -1
- package/eslint-suppressions.json +52 -0
- package/locals.d.ts +17 -0
- package/package.json +51 -40
- package/plugin/assets/languages/csharp.svg +1 -0
- package/plugin/buildAlgoliaIndex.ts +32 -7
- package/plugin/cms/server.ts +130 -58
- package/plugin/cms/sidebar-builder.ts +7 -26
- package/plugin/cms/worker.ts +83 -5
- package/plugin/components/MethodDescription.tsx +54 -0
- package/plugin/components/SDKSelect.astro +7 -87
- package/plugin/components/SnippetCode.tsx +53 -8
- package/plugin/components/search/SearchAlgolia.astro +45 -28
- package/plugin/components/search/SearchIsland.tsx +38 -24
- package/plugin/create-playground.shim.tsx +3 -0
- package/plugin/generateAPIReferenceLink.ts +2 -2
- package/plugin/globalJs/ai-dropdown-options.ts +243 -0
- package/plugin/globalJs/code-snippets.ts +15 -8
- package/plugin/globalJs/copy.ts +81 -16
- package/plugin/globalJs/method-descriptions.ts +33 -0
- package/plugin/globalJs/navigation.ts +7 -4
- package/plugin/helpers/generateDocsRoutes.ts +27 -0
- package/plugin/index.ts +178 -35
- package/plugin/languages.ts +5 -2
- package/plugin/loadPluginConfig.ts +121 -32
- package/plugin/middlewareBuilder/stainlessMiddleware.d.ts +1 -1
- package/plugin/react/Routing.tsx +208 -129
- package/plugin/referencePlaceholderUtils.ts +1 -1
- package/plugin/replaceSidebarPlaceholderMiddleware.ts +5 -1
- package/plugin/routes/Docs.astro +62 -89
- package/plugin/routes/DocsStatic.astro +1 -1
- package/plugin/routes/Overview.astro +10 -16
- package/plugin/routes/markdown.ts +9 -8
- package/plugin/vendor/preview.worker.docs.js +19768 -17702
- package/plugin/vendor/templates/go.md +1 -1
- package/plugin/vendor/templates/python.md +1 -1
- package/resolveSrcFile.ts +10 -0
- package/scripts/vendor_deps.ts +5 -5
- package/shared/getProsePages.ts +42 -0
- package/shared/getSharedLogger.ts +15 -0
- package/shared/terminalUtils.ts +3 -0
- package/src/content.config.ts +9 -0
- package/stl-docs/components/AIDropdown.tsx +63 -0
- package/stl-docs/components/AiChatIsland.tsx +14 -0
- package/stl-docs/components/{content-panel/ContentBreadcrumbs.tsx → ContentBreadcrumbs.tsx} +10 -18
- package/stl-docs/components/Head.astro +16 -0
- package/stl-docs/components/Header.astro +6 -8
- package/stl-docs/components/PageFrame.astro +18 -0
- package/stl-docs/components/PageTitle.astro +82 -0
- package/stl-docs/components/TableOfContents.astro +34 -0
- package/stl-docs/components/ThemeProvider.astro +36 -0
- package/stl-docs/components/ThemeSelect.astro +84 -139
- package/stl-docs/components/content-panel/ContentPanel.astro +16 -25
- package/stl-docs/components/headers/SplashMobileMenuToggle.astro +17 -1
- package/stl-docs/components/headers/StackedHeader.astro +29 -24
- package/stl-docs/components/icons/chat-gpt.tsx +17 -0
- package/stl-docs/components/icons/claude.tsx +10 -0
- package/stl-docs/components/icons/cursor.tsx +10 -0
- package/stl-docs/components/icons/gemini.tsx +19 -0
- package/stl-docs/components/icons/markdown.tsx +10 -0
- package/stl-docs/components/index.ts +1 -0
- package/stl-docs/components/mintlify-compat/Accordion.astro +7 -5
- package/stl-docs/components/mintlify-compat/AccordionGroup.astro +7 -3
- package/stl-docs/components/mintlify-compat/Columns.astro +40 -42
- package/stl-docs/components/mintlify-compat/Frame.astro +16 -18
- package/stl-docs/components/mintlify-compat/callouts/Callout.astro +1 -1
- package/stl-docs/components/mintlify-compat/callouts/Check.astro +1 -1
- package/stl-docs/components/mintlify-compat/callouts/Danger.astro +1 -1
- package/stl-docs/components/mintlify-compat/callouts/Info.astro +1 -1
- package/stl-docs/components/mintlify-compat/callouts/Note.astro +1 -1
- package/stl-docs/components/mintlify-compat/callouts/Tip.astro +1 -1
- package/stl-docs/components/mintlify-compat/callouts/Warning.astro +1 -1
- package/stl-docs/components/mintlify-compat/card.css +33 -35
- package/stl-docs/components/mintlify-compat/index.ts +2 -4
- package/stl-docs/components/nav-tabs/NavDropdown.astro +31 -70
- package/stl-docs/components/nav-tabs/NavTabs.astro +78 -80
- package/stl-docs/components/nav-tabs/SecondaryNavTabs.astro +15 -8
- package/stl-docs/components/nav-tabs/buildNavLinks.ts +3 -2
- package/stl-docs/components/pagination/HomeLink.astro +10 -0
- package/stl-docs/components/pagination/Pagination.astro +175 -0
- package/stl-docs/components/pagination/PaginationLinkEmphasized.astro +22 -0
- package/stl-docs/components/pagination/PaginationLinkQuiet.astro +13 -0
- package/stl-docs/components/pagination/util.ts +71 -0
- package/stl-docs/components/scripts.ts +1 -0
- package/stl-docs/disableCalloutSyntax.ts +36 -0
- package/stl-docs/index.ts +141 -50
- package/stl-docs/loadStlDocsConfig.ts +45 -5
- package/stl-docs/proseMarkdown/proseMarkdownIntegration.ts +61 -0
- package/stl-docs/proseMarkdown/proseMarkdownMiddleware.ts +39 -0
- package/stl-docs/proseMarkdown/toMarkdown.ts +158 -0
- package/stl-docs/proseSearchIndexing.ts +450 -0
- package/stl-docs/tabsMiddleware.ts +11 -3
- package/styles/code.css +108 -140
- package/styles/fonts.css +32 -17
- package/styles/links.css +11 -48
- package/styles/method-descriptions.css +36 -0
- package/styles/overrides.css +48 -60
- package/styles/page.css +92 -52
- package/styles/sdk_select.css +9 -7
- package/styles/search.css +56 -69
- package/styles/sidebar.css +211 -131
- package/styles/{variables.css → sl-variables.css} +3 -2
- package/styles/stldocs-variables.css +6 -0
- package/styles/toc.css +41 -34
- package/theme.css +10 -10
- package/tsconfig.json +2 -5
- package/virtual-module.d.ts +26 -4
- package/components/variables.css +0 -135
- package/stl-docs/components/mintlify-compat/Step.astro +0 -58
- package/stl-docs/components/mintlify-compat/Steps.astro +0 -17
- /package/{plugin/assets → assets}/fonts/geist/OFL.txt +0 -0
- /package/{plugin/assets → assets}/fonts/geist/geist-italic-latin-ext.woff2 +0 -0
- /package/{plugin/assets → assets}/fonts/geist/geist-italic-latin.woff2 +0 -0
- /package/{plugin/assets → assets}/fonts/geist/geist-latin-ext.woff2 +0 -0
- /package/{plugin/assets → assets}/fonts/geist/geist-latin.woff2 +0 -0
- /package/{plugin/assets → assets}/fonts/geist/geist-mono-italic-latin-ext.woff2 +0 -0
- /package/{plugin/assets → assets}/fonts/geist/geist-mono-italic-latin.woff2 +0 -0
- /package/{plugin/assets → assets}/fonts/geist/geist-mono-latin-ext.woff2 +0 -0
- /package/{plugin/assets → assets}/fonts/geist/geist-mono-latin.woff2 +0 -0
package/plugin/routes/Docs.astro
CHANGED
|
@@ -1,24 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
import StarlightPage from
|
|
3
|
-
import { cmsClient } from
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import "@stainless-api/docs-ui/src/styles/snippets.css";
|
|
9
|
-
// TODO: fix variables.css import
|
|
10
|
-
// import "./variables.css";
|
|
11
|
-
|
|
12
|
-
import {
|
|
13
|
-
getReadmeContent,
|
|
14
|
-
generateDocsRoutes,
|
|
15
|
-
buildPageNavigation,
|
|
16
|
-
RenderSpec,
|
|
17
|
-
astroMarkdownRender,
|
|
18
|
-
} from "../react/Routing";
|
|
19
|
-
import { getResourceFromSpec } from "@stainless-api/docs-ui/src/utils";
|
|
20
|
-
import { BASE_PATH, CONTENT_PANEL_LAYOUT,MIDDLEWARE } from "virtual:stl-starlight-virtual-module";
|
|
21
|
-
|
|
2
|
+
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
|
|
3
|
+
import { cmsClient } from '../cms/client';
|
|
4
|
+
import { getReadmeContent, buildPageNavigation, RenderSpec, astroMarkdownRender } from '../react/Routing';
|
|
5
|
+
import { getResourceFromSpec } from '@stainless-api/docs-ui/utils';
|
|
6
|
+
import { BASE_PATH, CONTENT_PANEL_LAYOUT, MIDDLEWARE } from 'virtual:stl-starlight-virtual-module';
|
|
7
|
+
import { generateDocsRoutes } from '../helpers/generateDocsRoutes';
|
|
22
8
|
|
|
23
9
|
const spec = await cmsClient.getSpec();
|
|
24
10
|
const routes = generateDocsRoutes(spec);
|
|
@@ -26,62 +12,52 @@ const routes = generateDocsRoutes(spec);
|
|
|
26
12
|
const route = routes.find((r) => r.params.slug === Astro.params.slug);
|
|
27
13
|
|
|
28
14
|
if (!route) {
|
|
29
|
-
throw new Error(
|
|
15
|
+
throw new Error(`Could not find a route for slug '${Astro.params.slug}'`);
|
|
30
16
|
}
|
|
31
17
|
|
|
18
|
+
// PageTitle override will skip rendering the default Starlight title
|
|
19
|
+
Astro.locals._stlStarlightPage = {
|
|
20
|
+
skipRenderingStarlightTitle: route.props.kind === 'readme' ? false : true,
|
|
21
|
+
};
|
|
22
|
+
|
|
32
23
|
const readmeContent = await getReadmeContent(spec, route.props.language);
|
|
33
|
-
const readme =
|
|
34
|
-
route.props.kind === "readme"
|
|
35
|
-
? await astroMarkdownRender(readmeContent ?? "")
|
|
36
|
-
: null;
|
|
24
|
+
const readme = route.props.kind === 'readme' ? await astroMarkdownRender(readmeContent ?? '') : null;
|
|
37
25
|
|
|
38
|
-
const resource = route.props.stainlessPath
|
|
39
|
-
? getResourceFromSpec(route.props.stainlessPath, spec)
|
|
40
|
-
: null;
|
|
26
|
+
const resource = route.props.stainlessPath ? getResourceFromSpec(route.props.stainlessPath, spec) : null;
|
|
41
27
|
|
|
42
28
|
const pageNav =
|
|
43
|
-
route.props.kind ===
|
|
29
|
+
route.props.kind === 'resource' && resource
|
|
44
30
|
? buildPageNavigation(resource)
|
|
45
|
-
: route.props.kind ===
|
|
31
|
+
: route.props.kind === 'readme' && readme?.metadata
|
|
46
32
|
? readme?.metadata.headings
|
|
47
33
|
: [];
|
|
48
34
|
|
|
49
35
|
const props = route.props;
|
|
36
|
+
Astro.locals.language = props.language;
|
|
50
37
|
|
|
51
38
|
if (readme) {
|
|
52
39
|
const repo = spec.metadata?.[props.language]?.code_url;
|
|
53
|
-
readme.code = readme.code.replace(
|
|
54
|
-
|
|
55
|
-
`<a href="${repo}/$1"`);
|
|
56
|
-
props.title = readme.metadata.headings[0].text ?? "Overview";
|
|
40
|
+
readme.code = readme.code.replace(/<a href="(?!(?:https?:\/\/|\/\/))([^"]+)"/g, `<a href="${repo}/$1"`);
|
|
41
|
+
props.title = readme.metadata.headings[0]!.text ?? 'Overview';
|
|
57
42
|
}
|
|
58
|
-
|
|
59
43
|
---
|
|
60
44
|
|
|
61
|
-
|
|
62
45
|
<StarlightPage
|
|
63
46
|
headings={pageNav}
|
|
64
47
|
frontmatter={{
|
|
65
48
|
title: props?.title,
|
|
66
49
|
head: [
|
|
67
50
|
{
|
|
68
|
-
tag:
|
|
51
|
+
tag: 'link',
|
|
69
52
|
attrs: {
|
|
70
|
-
rel:
|
|
71
|
-
type:
|
|
72
|
-
href: `${BASE_PATH}/${Astro.params.slug}.md
|
|
73
|
-
}
|
|
74
|
-
}
|
|
53
|
+
rel: 'alternate',
|
|
54
|
+
type: 'text/markdown',
|
|
55
|
+
href: `${BASE_PATH}/${Astro.params.slug}.md`,
|
|
56
|
+
},
|
|
57
|
+
},
|
|
75
58
|
],
|
|
76
59
|
pagefind: false,
|
|
77
|
-
tableOfContents: [
|
|
78
|
-
? { maxHeadingLevel: 6 }
|
|
79
|
-
: false,
|
|
80
|
-
// @ts-ignore
|
|
81
|
-
stainlessStarlight: {
|
|
82
|
-
basePath: BASE_PATH,
|
|
83
|
-
...props,
|
|
84
|
-
},
|
|
60
|
+
tableOfContents: ['resource', 'readme'].includes(props.kind) ? { maxHeadingLevel: 6 } : false,
|
|
85
61
|
}}
|
|
86
62
|
>
|
|
87
63
|
{
|
|
@@ -97,7 +73,9 @@ if (readme) {
|
|
|
97
73
|
transformRequestSnippet={MIDDLEWARE.transformRequestSnippet}
|
|
98
74
|
/>
|
|
99
75
|
|
|
100
|
-
<style
|
|
76
|
+
<style
|
|
77
|
+
is:inline
|
|
78
|
+
set:text={`
|
|
101
79
|
#stldocs-snippet-title {
|
|
102
80
|
display: flex;
|
|
103
81
|
gap: 5px;
|
|
@@ -105,59 +83,53 @@ if (readme) {
|
|
|
105
83
|
|
|
106
84
|
.stldocs-snippet-code:not(.stldocs-snippet-response .stldocs-snippet-code) {
|
|
107
85
|
padding: 0 !important;
|
|
108
|
-
|
|
86
|
+
|
|
109
87
|
.astro-code {
|
|
110
88
|
padding: 1rem;
|
|
111
89
|
}
|
|
112
90
|
}
|
|
113
91
|
|
|
114
|
-
|
|
115
92
|
[data-has-sidebar]:not([data-has-toc]) .sl-container {
|
|
116
93
|
max-width: 1428px;
|
|
117
94
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
display: none;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.content-panel:nth-of-type(2) {
|
|
124
|
-
border: none;
|
|
125
|
-
padding: 0;
|
|
126
|
-
}
|
|
127
|
-
</style>
|
|
95
|
+
`}
|
|
96
|
+
/>
|
|
128
97
|
</div>
|
|
129
98
|
) : (
|
|
130
99
|
<>
|
|
131
100
|
<Fragment set:html={readme?.code} />
|
|
132
|
-
<style
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
101
|
+
<style
|
|
102
|
+
is:inline
|
|
103
|
+
set:text={`
|
|
104
|
+
.sl-markdown-content h1:first-of-type {
|
|
105
|
+
display: none;
|
|
106
|
+
}
|
|
136
107
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
108
|
+
.sl-markdown-content img {
|
|
109
|
+
display: inline-block;
|
|
110
|
+
vertical-align: text-bottom;
|
|
111
|
+
}
|
|
141
112
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
113
|
+
.sl-markdown-content .octicon {
|
|
114
|
+
margin-right: 0.2rem;
|
|
115
|
+
overflow: visible !important;
|
|
116
|
+
-webkit-mask: var(--oct-icon) no-repeat;
|
|
117
|
+
mask: var(--oct-icon) no-repeat;
|
|
118
|
+
-webkit-mask-size: 100% 100%;
|
|
119
|
+
mask-size: 100% 100%;
|
|
120
|
+
background-color: currentColor;
|
|
121
|
+
color: inherit;
|
|
122
|
+
display: inline-block;
|
|
123
|
+
vertical-align: text-bottom;
|
|
124
|
+
width: 1em;
|
|
125
|
+
height: 1em;
|
|
126
|
+
}
|
|
156
127
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
128
|
+
.sl-markdown-content code {
|
|
129
|
+
white-space: pre-wrap;
|
|
130
|
+
}
|
|
131
|
+
`}
|
|
132
|
+
/>
|
|
161
133
|
</>
|
|
162
134
|
)
|
|
163
135
|
}
|
|
@@ -167,3 +139,4 @@ if (readme) {
|
|
|
167
139
|
<script src="../globalJs/copy.ts"></script>
|
|
168
140
|
<script src="../globalJs/tooltip.ts"></script>
|
|
169
141
|
<script src="../globalJs/code-snippets.ts"></script>
|
|
142
|
+
<script src="../globalJs/method-descriptions.ts"></script>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { GetStaticPaths } from 'astro';
|
|
3
3
|
import Docs from './Docs.astro';
|
|
4
4
|
import { cmsClient } from '../cms/client';
|
|
5
|
-
import { generateDocsRoutes } from '../
|
|
5
|
+
import { generateDocsRoutes } from '../helpers/generateDocsRoutes';
|
|
6
6
|
|
|
7
7
|
export const getStaticPaths = (async () => {
|
|
8
8
|
const spec = await cmsClient.getSpec();
|
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
---
|
|
2
2
|
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
|
|
3
|
-
import {
|
|
3
|
+
import { EXCLUDE_LANGUAGES } from 'virtual:stl-starlight-virtual-module';
|
|
4
4
|
import { cmsClient } from '../cms/client';
|
|
5
|
-
import type { DocsLanguage } from '@stainless-api/docs-ui/
|
|
6
|
-
|
|
7
|
-
import '@stainless-api/docs-ui/src/styles/resets.css';
|
|
8
|
-
import '@stainless-api/docs-ui/src/styles/primitives.css';
|
|
9
|
-
import '@stainless-api/docs-ui/src/styles/main.css';
|
|
10
|
-
import '@stainless-api/docs-ui/src/styles/snippets.css';
|
|
11
|
-
// TODO: fix variables.css import
|
|
12
|
-
// import '../components/variables.css';
|
|
5
|
+
import type { DocsLanguage } from '@stainless-api/docs-ui/routing';
|
|
13
6
|
import { RenderLibraries, RenderSpecOverview, type SpecMetadata } from '../react/Routing';
|
|
14
7
|
|
|
15
8
|
const spec = await cmsClient.getSpec();
|
|
16
9
|
|
|
17
10
|
const languages: DocsLanguage[] = spec.docs!.languages ?? ['http'];
|
|
18
|
-
const metadata = languages
|
|
11
|
+
const metadata: SpecMetadata = languages
|
|
19
12
|
.filter((language) => !['http', 'terraform'].includes(language) && spec.metadata[language])
|
|
20
13
|
.filter((language) => !EXCLUDE_LANGUAGES.includes(language))
|
|
21
|
-
.map((language) => [language, spec.metadata[language]])
|
|
14
|
+
.map<SpecMetadata[number]>((language) => [language, spec.metadata[language]!]);
|
|
15
|
+
|
|
16
|
+
// PageTitle override will skip rendering the default Starlight title
|
|
17
|
+
Astro.locals._stlStarlightPage = {
|
|
18
|
+
hasMarkdownRoute: false,
|
|
19
|
+
};
|
|
22
20
|
---
|
|
23
21
|
|
|
24
22
|
<StarlightPage
|
|
@@ -26,15 +24,11 @@ const metadata = languages
|
|
|
26
24
|
title: 'API Reference',
|
|
27
25
|
pagefind: false,
|
|
28
26
|
tableOfContents: false,
|
|
29
|
-
stainlessStarlight: {
|
|
30
|
-
basePath: BASE_PATH,
|
|
31
|
-
language: 'http',
|
|
32
|
-
},
|
|
33
27
|
}}
|
|
34
28
|
>
|
|
35
29
|
<h3>Libraries</h3>
|
|
36
30
|
|
|
37
|
-
<div class="stldocs-root language-blocks stl-ui-not-prose">
|
|
31
|
+
<div class="stldocs-root language-blocks stl-ui-not-prose not-content">
|
|
38
32
|
<RenderLibraries metadata={metadata} />
|
|
39
33
|
</div>
|
|
40
34
|
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { APIRoute, GetStaticPaths } from 'astro';
|
|
2
2
|
import { cmsClient } from '../cms/client';
|
|
3
|
-
import {
|
|
4
|
-
import { getResourceFromSpec } from '@stainless-api/docs-ui/
|
|
3
|
+
import { getReadmeContent } from '../react/Routing';
|
|
4
|
+
import { getResourceFromSpec } from '@stainless-api/docs-ui/utils';
|
|
5
5
|
|
|
6
|
-
import { renderMarkdown } from '@stainless-api/docs-ui/
|
|
6
|
+
import { renderMarkdown } from '@stainless-api/docs-ui/markdown';
|
|
7
7
|
|
|
8
|
-
import { parseStainlessPath, type DocsLanguage } from '@stainless-api/docs-ui/
|
|
9
|
-
import type { EnvironmentType } from '@stainless-api/docs-ui/
|
|
8
|
+
import { parseStainlessPath, type DocsLanguage } from '@stainless-api/docs-ui/routing';
|
|
9
|
+
import type { EnvironmentType } from '@stainless-api/docs-ui/markdown/utils';
|
|
10
10
|
import { PROPERTY_SETTINGS, MIDDLEWARE } from 'virtual:stl-starlight-virtual-module';
|
|
11
|
+
import { generateDocsRoutes } from '../helpers/generateDocsRoutes';
|
|
11
12
|
|
|
12
13
|
type RouteProps = {
|
|
13
14
|
stainlessPath: string;
|
|
@@ -26,7 +27,7 @@ export const GET: APIRoute<RouteProps> = async ({ props }) => {
|
|
|
26
27
|
if (props.kind === 'readme') {
|
|
27
28
|
const readmeContent = await getReadmeContent(spec, props.language);
|
|
28
29
|
return new Response(readmeContent, {
|
|
29
|
-
headers: { 'Content-Type': 'text/
|
|
30
|
+
headers: { 'Content-Type': 'text/plain' },
|
|
30
31
|
});
|
|
31
32
|
}
|
|
32
33
|
|
|
@@ -47,11 +48,11 @@ export const GET: APIRoute<RouteProps> = async ({ props }) => {
|
|
|
47
48
|
},
|
|
48
49
|
};
|
|
49
50
|
|
|
50
|
-
const target = props.kind === 'http_method' && parsed?.method ? resource.methods[parsed.method] : resource;
|
|
51
|
+
const target = props.kind === 'http_method' && parsed?.method ? resource.methods[parsed.method]! : resource;
|
|
51
52
|
const output = renderMarkdown(env, target);
|
|
52
53
|
|
|
53
54
|
return new Response(output, {
|
|
54
|
-
headers: { 'Content-Type': 'text/
|
|
55
|
+
headers: { 'Content-Type': 'text/plain' },
|
|
55
56
|
});
|
|
56
57
|
};
|
|
57
58
|
|