@apimatic/cli 2.0.0-beta.2 → 2.0.0-beta.4
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/README.md +22 -9
- package/lib/actions/plugin/generate.d.ts +0 -2
- package/lib/actions/plugin/generate.js +5 -8
- package/lib/actions/plugin/generate.js.map +1 -1
- package/lib/actions/plugin/record-metadata.js +1 -1
- package/lib/actions/plugin/record-metadata.js.map +1 -1
- package/lib/actions/portal/serve.js +4 -3
- package/lib/actions/portal/serve.js.map +1 -1
- package/lib/actions/sdk/generate.js +16 -3
- package/lib/actions/sdk/generate.js.map +1 -1
- package/lib/actions/sdk/publish.js +6 -2
- package/lib/actions/sdk/publish.js.map +1 -1
- package/lib/commands/quickstart.d.ts +1 -1
- package/lib/commands/quickstart.js +1 -1
- package/lib/commands/quickstart.js.map +1 -1
- package/lib/commands/sdk/generate.d.ts +1 -1
- package/lib/commands/sdk/generate.js +4 -2
- package/lib/commands/sdk/generate.js.map +1 -1
- package/lib/infrastructure/service-error.js +15 -15
- package/lib/infrastructure/service-error.js.map +1 -1
- package/lib/infrastructure/services/portal-artifacts-service.js +6 -5
- package/lib/infrastructure/services/portal-artifacts-service.js.map +1 -1
- package/lib/infrastructure/zip-service.d.ts +6 -2
- package/lib/infrastructure/zip-service.js +42 -24
- package/lib/infrastructure/zip-service.js.map +1 -1
- package/lib/prompts/plugin/generate.d.ts +3 -3
- package/lib/prompts/plugin/generate.js +19 -11
- package/lib/prompts/plugin/generate.js.map +1 -1
- package/lib/prompts/plugin/record-metadata.d.ts +1 -1
- package/lib/prompts/plugin/record-metadata.js +2 -2
- package/lib/prompts/portal/serve.js +1 -1
- package/lib/prompts/portal/serve.js.map +1 -1
- package/lib/prompts/portal/source.d.ts +4 -2
- package/lib/prompts/portal/source.js +42 -8
- package/lib/prompts/portal/source.js.map +1 -1
- package/lib/prompts/publishing/links.d.ts +1 -1
- package/lib/prompts/publishing/links.js +1 -1
- package/lib/prompts/publishing/links.js.map +1 -1
- package/lib/prompts/quickstart.js +1 -2
- package/lib/prompts/quickstart.js.map +1 -1
- package/lib/prompts/sdk/generate.d.ts +5 -0
- package/lib/prompts/sdk/generate.js +10 -0
- package/lib/prompts/sdk/generate.js.map +1 -1
- package/lib/prompts/sdk/publish.d.ts +3 -0
- package/lib/prompts/sdk/publish.js +3 -0
- package/lib/prompts/sdk/publish.js.map +1 -1
- package/lib/types/apimatic-config-context.d.ts +1 -1
- package/lib/types/apimatic-config-context.js +1 -1
- package/lib/types/apimatic-config-context.js.map +1 -1
- package/lib/types/file/file-problem.d.ts +4 -0
- package/lib/types/file/file-problem.js +2 -0
- package/lib/types/file/file-problem.js.map +1 -0
- package/lib/types/plugin/generation-problem.d.ts +10 -0
- package/lib/types/plugin/generation-problem.js +2 -0
- package/lib/types/plugin/generation-problem.js.map +1 -0
- package/lib/types/plugin-config-context.js +2 -1
- package/lib/types/plugin-config-context.js.map +1 -1
- package/lib/types/plugin-context.d.ts +3 -1
- package/lib/types/plugin-context.js +2 -1
- package/lib/types/plugin-context.js.map +1 -1
- package/lib/types/portal/content-notices.d.ts +11 -3
- package/lib/types/portal/content-tree.d.ts +4 -2
- package/lib/types/portal/content-tree.js +42 -12
- package/lib/types/portal/content-tree.js.map +1 -1
- package/lib/types/portal/generated-pages.d.ts +6 -6
- package/lib/types/portal/generated-pages.js +3 -3
- package/lib/types/portal/generated-pages.js.map +1 -1
- package/lib/types/portal/portal-navigation.d.ts +83 -12
- package/lib/types/portal/portal-navigation.js +276 -100
- package/lib/types/portal/portal-navigation.js.map +1 -1
- package/lib/types/portal/preview-content.js +15 -2
- package/lib/types/portal/preview-content.js.map +1 -1
- package/lib/types/portal-context.d.ts +1 -0
- package/lib/types/portal-context.js +17 -12
- package/lib/types/portal-context.js.map +1 -1
- package/lib/types/portal-source-context.js +7 -4
- package/lib/types/portal-source-context.js.map +1 -1
- package/lib/types/project-context.d.ts +2 -1
- package/lib/types/project-context.js +2 -2
- package/lib/types/project-context.js.map +1 -1
- package/lib/types/sdk/generate.d.ts +1 -4
- package/lib/types/sdk/generate.js +6 -6
- package/lib/types/sdk/generate.js.map +1 -1
- package/lib/types/sdk-context.d.ts +7 -2
- package/lib/types/sdk-context.js +8 -6
- package/lib/types/sdk-context.js.map +1 -1
- package/lib/types/spec-context.d.ts +3 -1
- package/lib/types/spec-context.js +5 -4
- package/lib/types/spec-context.js.map +1 -1
- package/lib/types/temp-context.d.ts +5 -3
- package/lib/types/temp-context.js +7 -7
- package/lib/types/temp-context.js.map +1 -1
- package/oclif.manifest.json +166 -166
- package/package.json +8 -7
- package/portal-template/dependency-directories.ts +54 -0
- package/portal-template/src/components/api-page.tsx +2 -6
- package/portal-template/src/components/example-layout.tsx +7 -7
- package/portal-template/src/components/markdown-copy-button.tsx +60 -0
- package/portal-template/src/components/usage-tabs.tsx +16 -36
- package/portal-template/src/lib/copy-markdown.ts +12 -0
- package/portal-template/src/lib/media-adapters.ts +3 -3
- package/portal-template/src/lib/navigation-schema.ts +13 -0
- package/portal-template/src/lib/navigation.ts +60 -117
- package/portal-template/src/lib/request-examples.ts +12 -28
- package/portal-template/src/lib/source.ts +3 -2
- package/portal-template/src/lib/tabs.ts +3 -2
- package/portal-template/src/routes/$.tsx +4 -9
- package/portal-template/vite.config.ts +13 -0
- package/portal-template/src/components/code-block.tsx +0 -9
|
@@ -4,6 +4,7 @@ import { tanstackStart } from '@tanstack/react-start/plugin/vite';
|
|
|
4
4
|
import { defineConfig } from 'vite';
|
|
5
5
|
import tailwindcss from '@tailwindcss/vite';
|
|
6
6
|
import { fumadocsMdx } from 'fumadocs-mdx/vite';
|
|
7
|
+
import { dependencyDirectories } from './dependency-directories.ts';
|
|
7
8
|
import { downloads } from './downloads.ts';
|
|
8
9
|
import { generatedPagesReload } from './generated-pages-reload.ts';
|
|
9
10
|
import { readBuildPaths, readPortalIdentity } from './portal-config.ts';
|
|
@@ -14,6 +15,7 @@ export default defineConfig(async () => {
|
|
|
14
15
|
const [paths, identity] = await Promise.all([readBuildPaths(), readPortalIdentity()]);
|
|
15
16
|
const pages = await prerenderPages(paths, identity.siteUrl);
|
|
16
17
|
const publicDir: string | false = paths.staticDir ?? false;
|
|
18
|
+
const projectDirectory = fileURLToPath(new URL('.', import.meta.url));
|
|
17
19
|
|
|
18
20
|
return {
|
|
19
21
|
publicDir,
|
|
@@ -55,6 +57,17 @@ export default defineConfig(async () => {
|
|
|
55
57
|
// listens on `::1` alone, a connect that stalls under load falls back to 127.0.0.1 and is
|
|
56
58
|
// refused, failing the build; binding IPv4 leaves the fetch a single address to reach.
|
|
57
59
|
preview: { host: '127.0.0.1' },
|
|
60
|
+
// Spelled out because the default, the project alone, misses the CLI installation the
|
|
61
|
+
// dependencies are linked from, and the static directory pages import images from.
|
|
62
|
+
server: {
|
|
63
|
+
fs: {
|
|
64
|
+
allow: [
|
|
65
|
+
projectDirectory,
|
|
66
|
+
...dependencyDirectories(projectDirectory),
|
|
67
|
+
...(paths.staticDir === null ? [] : [paths.staticDir])
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
},
|
|
58
71
|
resolve: {
|
|
59
72
|
tsconfigPaths: true,
|
|
60
73
|
alias: [
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { DynamicCodeBlock } from 'fumadocs-ui/components/dynamic-codeblock.core';
|
|
2
|
-
import { useRenderContext } from 'fumadocs-openapi/ui';
|
|
3
|
-
|
|
4
|
-
// Fumadocs passes `JSON.stringify(example.value)`, which is undefined for an example with no `value`.
|
|
5
|
-
export function CodeBlock({ lang, code }: Readonly<{ lang: string; code: string | undefined }>) {
|
|
6
|
-
const { shiki, shikiOptions } = useRenderContext();
|
|
7
|
-
if (code === undefined) return null;
|
|
8
|
-
return <DynamicCodeBlock lang={lang} code={code} highlighter={() => shiki.getOrInit()} options={shikiOptions} />;
|
|
9
|
-
}
|