jamdesk 1.0.0
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/LICENSE +21 -0
- package/README.md +323 -0
- package/bin/jamdesk.js +76 -0
- package/dist/__tests__/integration/deprecated-components.integration.test.d.ts +8 -0
- package/dist/__tests__/integration/deprecated-components.integration.test.d.ts.map +1 -0
- package/dist/__tests__/integration/deprecated-components.integration.test.js +165 -0
- package/dist/__tests__/integration/deprecated-components.integration.test.js.map +1 -0
- package/dist/__tests__/integration/migrate.integration.test.d.ts +2 -0
- package/dist/__tests__/integration/migrate.integration.test.d.ts.map +1 -0
- package/dist/__tests__/integration/migrate.integration.test.js +64 -0
- package/dist/__tests__/integration/migrate.integration.test.js.map +1 -0
- package/dist/__tests__/integration/prepublish.integration.test.d.ts +2 -0
- package/dist/__tests__/integration/prepublish.integration.test.d.ts.map +1 -0
- package/dist/__tests__/integration/prepublish.integration.test.js +27 -0
- package/dist/__tests__/integration/prepublish.integration.test.js.map +1 -0
- package/dist/__tests__/integration/validate.integration.test.d.ts +2 -0
- package/dist/__tests__/integration/validate.integration.test.d.ts.map +1 -0
- package/dist/__tests__/integration/validate.integration.test.js +56 -0
- package/dist/__tests__/integration/validate.integration.test.js.map +1 -0
- package/dist/__tests__/unit/deploy-templates.test.d.ts +2 -0
- package/dist/__tests__/unit/deploy-templates.test.d.ts.map +1 -0
- package/dist/__tests__/unit/deploy-templates.test.js +124 -0
- package/dist/__tests__/unit/deploy-templates.test.js.map +1 -0
- package/dist/__tests__/unit/deprecated-components-sync.test.d.ts +2 -0
- package/dist/__tests__/unit/deprecated-components-sync.test.d.ts.map +1 -0
- package/dist/__tests__/unit/deprecated-components-sync.test.js +69 -0
- package/dist/__tests__/unit/deprecated-components-sync.test.js.map +1 -0
- package/dist/__tests__/unit/deps-sync.test.d.ts +14 -0
- package/dist/__tests__/unit/deps-sync.test.d.ts.map +1 -0
- package/dist/__tests__/unit/deps-sync.test.js +166 -0
- package/dist/__tests__/unit/deps-sync.test.js.map +1 -0
- package/dist/__tests__/unit/docs-config.test.d.ts +2 -0
- package/dist/__tests__/unit/docs-config.test.d.ts.map +1 -0
- package/dist/__tests__/unit/docs-config.test.js +288 -0
- package/dist/__tests__/unit/docs-config.test.js.map +1 -0
- package/dist/__tests__/unit/errors.test.d.ts +2 -0
- package/dist/__tests__/unit/errors.test.d.ts.map +1 -0
- package/dist/__tests__/unit/errors.test.js +27 -0
- package/dist/__tests__/unit/errors.test.js.map +1 -0
- package/dist/__tests__/unit/extract-hooks.test.d.ts +5 -0
- package/dist/__tests__/unit/extract-hooks.test.d.ts.map +1 -0
- package/dist/__tests__/unit/extract-hooks.test.js +205 -0
- package/dist/__tests__/unit/extract-hooks.test.js.map +1 -0
- package/dist/__tests__/unit/frontmatter-sync.test.d.ts +8 -0
- package/dist/__tests__/unit/frontmatter-sync.test.d.ts.map +1 -0
- package/dist/__tests__/unit/frontmatter-sync.test.js +26 -0
- package/dist/__tests__/unit/frontmatter-sync.test.js.map +1 -0
- package/dist/__tests__/unit/mdx-validator.test.d.ts +2 -0
- package/dist/__tests__/unit/mdx-validator.test.d.ts.map +1 -0
- package/dist/__tests__/unit/mdx-validator.test.js +264 -0
- package/dist/__tests__/unit/mdx-validator.test.js.map +1 -0
- package/dist/__tests__/unit/migrate-convert.test.d.ts +2 -0
- package/dist/__tests__/unit/migrate-convert.test.d.ts.map +1 -0
- package/dist/__tests__/unit/migrate-convert.test.js +297 -0
- package/dist/__tests__/unit/migrate-convert.test.js.map +1 -0
- package/dist/__tests__/unit/migrate-detect.test.d.ts +2 -0
- package/dist/__tests__/unit/migrate-detect.test.d.ts.map +1 -0
- package/dist/__tests__/unit/migrate-detect.test.js +35 -0
- package/dist/__tests__/unit/migrate-detect.test.js.map +1 -0
- package/dist/__tests__/unit/migrate-mdx.test.d.ts +2 -0
- package/dist/__tests__/unit/migrate-mdx.test.d.ts.map +1 -0
- package/dist/__tests__/unit/migrate-mdx.test.js +158 -0
- package/dist/__tests__/unit/migrate-mdx.test.js.map +1 -0
- package/dist/__tests__/unit/openapi.test.d.ts +2 -0
- package/dist/__tests__/unit/openapi.test.d.ts.map +1 -0
- package/dist/__tests__/unit/openapi.test.js +52 -0
- package/dist/__tests__/unit/openapi.test.js.map +1 -0
- package/dist/__tests__/unit/package-config.test.d.ts +2 -0
- package/dist/__tests__/unit/package-config.test.d.ts.map +1 -0
- package/dist/__tests__/unit/package-config.test.js +63 -0
- package/dist/__tests__/unit/package-config.test.js.map +1 -0
- package/dist/__tests__/unit/port.test.d.ts +2 -0
- package/dist/__tests__/unit/port.test.d.ts.map +1 -0
- package/dist/__tests__/unit/port.test.js +20 -0
- package/dist/__tests__/unit/port.test.js.map +1 -0
- package/dist/__tests__/unit/vendored-sync.test.d.ts +14 -0
- package/dist/__tests__/unit/vendored-sync.test.d.ts.map +1 -0
- package/dist/__tests__/unit/vendored-sync.test.js +90 -0
- package/dist/__tests__/unit/vendored-sync.test.js.map +1 -0
- package/dist/commands/broken-links.d.ts +11 -0
- package/dist/commands/broken-links.d.ts.map +1 -0
- package/dist/commands/broken-links.js +95 -0
- package/dist/commands/broken-links.js.map +1 -0
- package/dist/commands/clean.d.ts +7 -0
- package/dist/commands/clean.d.ts.map +1 -0
- package/dist/commands/clean.js +59 -0
- package/dist/commands/clean.js.map +1 -0
- package/dist/commands/deploy/cloudflare.d.ts +12 -0
- package/dist/commands/deploy/cloudflare.d.ts.map +1 -0
- package/dist/commands/deploy/cloudflare.js +409 -0
- package/dist/commands/deploy/cloudflare.js.map +1 -0
- package/dist/commands/deploy/templates.d.ts +23 -0
- package/dist/commands/deploy/templates.d.ts.map +1 -0
- package/dist/commands/deploy/templates.js +179 -0
- package/dist/commands/deploy/templates.js.map +1 -0
- package/dist/commands/deploy/types.d.ts +19 -0
- package/dist/commands/deploy/types.d.ts.map +1 -0
- package/dist/commands/deploy/types.js +5 -0
- package/dist/commands/deploy/types.js.map +1 -0
- package/dist/commands/dev.d.ts +14 -0
- package/dist/commands/dev.d.ts.map +1 -0
- package/dist/commands/dev.js +817 -0
- package/dist/commands/dev.js.map +1 -0
- package/dist/commands/doctor.d.ts +7 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +159 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/init.d.ts +7 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +96 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/migrate/convert-mdx.d.ts +50 -0
- package/dist/commands/migrate/convert-mdx.d.ts.map +1 -0
- package/dist/commands/migrate/convert-mdx.js +108 -0
- package/dist/commands/migrate/convert-mdx.js.map +1 -0
- package/dist/commands/migrate/convert.d.ts +80 -0
- package/dist/commands/migrate/convert.d.ts.map +1 -0
- package/dist/commands/migrate/convert.js +158 -0
- package/dist/commands/migrate/convert.js.map +1 -0
- package/dist/commands/migrate/detect.d.ts +31 -0
- package/dist/commands/migrate/detect.d.ts.map +1 -0
- package/dist/commands/migrate/detect.js +62 -0
- package/dist/commands/migrate/detect.js.map +1 -0
- package/dist/commands/migrate/extract-hooks.d.ts +71 -0
- package/dist/commands/migrate/extract-hooks.d.ts.map +1 -0
- package/dist/commands/migrate/extract-hooks.js +473 -0
- package/dist/commands/migrate/extract-hooks.js.map +1 -0
- package/dist/commands/migrate/index.d.ts +17 -0
- package/dist/commands/migrate/index.d.ts.map +1 -0
- package/dist/commands/migrate/index.js +282 -0
- package/dist/commands/migrate/index.js.map +1 -0
- package/dist/commands/migrate/prompts.d.ts +22 -0
- package/dist/commands/migrate/prompts.d.ts.map +1 -0
- package/dist/commands/migrate/prompts.js +67 -0
- package/dist/commands/migrate/prompts.js.map +1 -0
- package/dist/commands/migrate/types.d.ts +22 -0
- package/dist/commands/migrate/types.d.ts.map +1 -0
- package/dist/commands/migrate/types.js +26 -0
- package/dist/commands/migrate/types.js.map +1 -0
- package/dist/commands/openapi-check.d.ts +11 -0
- package/dist/commands/openapi-check.d.ts.map +1 -0
- package/dist/commands/openapi-check.js +88 -0
- package/dist/commands/openapi-check.js.map +1 -0
- package/dist/commands/rename.d.ts +10 -0
- package/dist/commands/rename.d.ts.map +1 -0
- package/dist/commands/rename.js +125 -0
- package/dist/commands/rename.js.map +1 -0
- package/dist/commands/update.d.ts +10 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +57 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/commands/validate.d.ts +12 -0
- package/dist/commands/validate.d.ts.map +1 -0
- package/dist/commands/validate.js +163 -0
- package/dist/commands/validate.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +334 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/config.d.ts +7 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +18 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/deprecated-components.d.ts +72 -0
- package/dist/lib/deprecated-components.d.ts.map +1 -0
- package/dist/lib/deprecated-components.js +138 -0
- package/dist/lib/deprecated-components.js.map +1 -0
- package/dist/lib/deps.d.ts +17 -0
- package/dist/lib/deps.d.ts.map +1 -0
- package/dist/lib/deps.js +186 -0
- package/dist/lib/deps.js.map +1 -0
- package/dist/lib/docs-config.d.ts +67 -0
- package/dist/lib/docs-config.d.ts.map +1 -0
- package/dist/lib/docs-config.js +294 -0
- package/dist/lib/docs-config.js.map +1 -0
- package/dist/lib/errors.d.ts +23 -0
- package/dist/lib/errors.d.ts.map +1 -0
- package/dist/lib/errors.js +32 -0
- package/dist/lib/errors.js.map +1 -0
- package/dist/lib/frontmatter-utils.d.ts +25 -0
- package/dist/lib/frontmatter-utils.d.ts.map +1 -0
- package/dist/lib/frontmatter-utils.js +64 -0
- package/dist/lib/frontmatter-utils.js.map +1 -0
- package/dist/lib/mdx-validator.d.ts +27 -0
- package/dist/lib/mdx-validator.d.ts.map +1 -0
- package/dist/lib/mdx-validator.js +148 -0
- package/dist/lib/mdx-validator.js.map +1 -0
- package/dist/lib/navigation-validator.d.ts +31 -0
- package/dist/lib/navigation-validator.d.ts.map +1 -0
- package/dist/lib/navigation-validator.js +75 -0
- package/dist/lib/navigation-validator.js.map +1 -0
- package/dist/lib/normalize-config.d.ts +57 -0
- package/dist/lib/normalize-config.d.ts.map +1 -0
- package/dist/lib/normalize-config.js +63 -0
- package/dist/lib/normalize-config.js.map +1 -0
- package/dist/lib/openapi/cache.d.ts +40 -0
- package/dist/lib/openapi/cache.d.ts.map +1 -0
- package/dist/lib/openapi/cache.js +76 -0
- package/dist/lib/openapi/cache.js.map +1 -0
- package/dist/lib/openapi/errors.d.ts +36 -0
- package/dist/lib/openapi/errors.d.ts.map +1 -0
- package/dist/lib/openapi/errors.js +162 -0
- package/dist/lib/openapi/errors.js.map +1 -0
- package/dist/lib/openapi/index.d.ts +10 -0
- package/dist/lib/openapi/index.d.ts.map +1 -0
- package/dist/lib/openapi/index.js +12 -0
- package/dist/lib/openapi/index.js.map +1 -0
- package/dist/lib/openapi/types.d.ts +198 -0
- package/dist/lib/openapi/types.d.ts.map +1 -0
- package/dist/lib/openapi/types.js +8 -0
- package/dist/lib/openapi/types.js.map +1 -0
- package/dist/lib/openapi/validator.d.ts +45 -0
- package/dist/lib/openapi/validator.d.ts.map +1 -0
- package/dist/lib/openapi/validator.js +128 -0
- package/dist/lib/openapi/validator.js.map +1 -0
- package/dist/lib/openapi.d.ts +7 -0
- package/dist/lib/openapi.d.ts.map +1 -0
- package/dist/lib/openapi.js +7 -0
- package/dist/lib/openapi.js.map +1 -0
- package/dist/lib/output.d.ts +14 -0
- package/dist/lib/output.d.ts.map +1 -0
- package/dist/lib/output.js +19 -0
- package/dist/lib/output.js.map +1 -0
- package/dist/lib/path-security.d.ts +23 -0
- package/dist/lib/path-security.d.ts.map +1 -0
- package/dist/lib/path-security.js +35 -0
- package/dist/lib/path-security.js.map +1 -0
- package/dist/lib/port.d.ts +18 -0
- package/dist/lib/port.d.ts.map +1 -0
- package/dist/lib/port.js +65 -0
- package/dist/lib/port.js.map +1 -0
- package/dist/lib/spinner.d.ts +4 -0
- package/dist/lib/spinner.d.ts.map +1 -0
- package/dist/lib/spinner.js +16 -0
- package/dist/lib/spinner.js.map +1 -0
- package/dist/lib/version.d.ts +2 -0
- package/dist/lib/version.d.ts.map +1 -0
- package/dist/lib/version.js +49 -0
- package/dist/lib/version.js.map +1 -0
- package/dist/utils/update-checker.d.ts +34 -0
- package/dist/utils/update-checker.d.ts.map +1 -0
- package/dist/utils/update-checker.js +142 -0
- package/dist/utils/update-checker.js.map +1 -0
- package/package.json +125 -0
- package/templates/docs.json +11 -0
- package/templates/introduction.mdx +19 -0
- package/templates/quickstart.mdx +20 -0
- package/vendored/app/[[...slug]]/error.tsx +103 -0
- package/vendored/app/[[...slug]]/page.tsx +690 -0
- package/vendored/app/api/assets/[...path]/route.ts +78 -0
- package/vendored/app/api/ev/route.ts +61 -0
- package/vendored/app/api/isr-health/route.ts +66 -0
- package/vendored/app/api/mcp/[project]/route.ts +435 -0
- package/vendored/app/api/og/route.tsx +167 -0
- package/vendored/app/api/r2/[project]/[...path]/route.ts +214 -0
- package/vendored/app/api/revalidate/route.ts +76 -0
- package/vendored/app/globals.css +37 -0
- package/vendored/app/layout.tsx +571 -0
- package/vendored/app/not-found.tsx +47 -0
- package/vendored/components/CodeBlockCopyButton.tsx +146 -0
- package/vendored/components/HeaderLinkCopy.tsx +135 -0
- package/vendored/components/errors/NotFoundContent.tsx +147 -0
- package/vendored/components/layout/LayoutWrapper.tsx +128 -0
- package/vendored/components/mdx/Accordion.tsx +91 -0
- package/vendored/components/mdx/ApiCodePanel.tsx +51 -0
- package/vendored/components/mdx/ApiEndpoint.tsx +104 -0
- package/vendored/components/mdx/ApiPage.tsx +379 -0
- package/vendored/components/mdx/Badge.tsx +169 -0
- package/vendored/components/mdx/Callouts.tsx +140 -0
- package/vendored/components/mdx/Card.tsx +214 -0
- package/vendored/components/mdx/CodeGroup.tsx +136 -0
- package/vendored/components/mdx/Color.tsx +244 -0
- package/vendored/components/mdx/Columns.tsx +37 -0
- package/vendored/components/mdx/Expandable.tsx +37 -0
- package/vendored/components/mdx/Frame.tsx +51 -0
- package/vendored/components/mdx/Icon.tsx +132 -0
- package/vendored/components/mdx/Latex.tsx +75 -0
- package/vendored/components/mdx/MDXComponents.tsx +414 -0
- package/vendored/components/mdx/Mermaid.tsx +35 -0
- package/vendored/components/mdx/MermaidInner.tsx +342 -0
- package/vendored/components/mdx/OpenApiEndpoint.tsx +971 -0
- package/vendored/components/mdx/Panel.tsx +26 -0
- package/vendored/components/mdx/PanelWrapper.tsx +100 -0
- package/vendored/components/mdx/ParamField.tsx +75 -0
- package/vendored/components/mdx/RequestExample.tsx +91 -0
- package/vendored/components/mdx/ResponseExample.tsx +145 -0
- package/vendored/components/mdx/ResponseField.tsx +109 -0
- package/vendored/components/mdx/Steps.tsx +173 -0
- package/vendored/components/mdx/Table.tsx +352 -0
- package/vendored/components/mdx/Tabs.tsx +147 -0
- package/vendored/components/mdx/Tile.tsx +127 -0
- package/vendored/components/mdx/Tooltip.tsx +111 -0
- package/vendored/components/mdx/Tree.tsx +484 -0
- package/vendored/components/mdx/Update.tsx +90 -0
- package/vendored/components/mdx/View.tsx +354 -0
- package/vendored/components/mdx/YouTube.tsx +35 -0
- package/vendored/components/mdx/ZoomableImage.tsx +83 -0
- package/vendored/components/navigation/Breadcrumb.tsx +241 -0
- package/vendored/components/navigation/DefaultLogo.tsx +81 -0
- package/vendored/components/navigation/Header.tsx +512 -0
- package/vendored/components/navigation/LanguageSelector.tsx +249 -0
- package/vendored/components/navigation/PageNavigation.tsx +174 -0
- package/vendored/components/navigation/Sidebar.tsx +713 -0
- package/vendored/components/navigation/SocialFooter.tsx +186 -0
- package/vendored/components/navigation/TableOfContents.tsx +435 -0
- package/vendored/components/navigation/TabsNav.tsx +182 -0
- package/vendored/components/search/LazySearchModal.tsx +19 -0
- package/vendored/components/search/SearchModal.tsx +573 -0
- package/vendored/components/snippets/ProjectSnippets.tsx +4 -0
- package/vendored/components/theme/ThemeProvider.tsx +31 -0
- package/vendored/components/theme/ThemeToggle.tsx +134 -0
- package/vendored/components/ui/CodePanel.tsx +517 -0
- package/vendored/components/ui/CodePanelModal.tsx +342 -0
- package/vendored/contexts/TabSyncContext.tsx +30 -0
- package/vendored/hooks/useFocusTrap.ts +42 -0
- package/vendored/hooks/useHashNavigation.ts +39 -0
- package/vendored/hooks/useShikiHighlight.ts +101 -0
- package/vendored/lib/analytics-client.ts +77 -0
- package/vendored/lib/build/cache.ts +138 -0
- package/vendored/lib/build/error-parser.ts +690 -0
- package/vendored/lib/build/estimation.ts +113 -0
- package/vendored/lib/build/index.ts +17 -0
- package/vendored/lib/build/page-file-map.ts +48 -0
- package/vendored/lib/build/r2-upload.ts +179 -0
- package/vendored/lib/cache-keys.ts +117 -0
- package/vendored/lib/code-utils.ts +42 -0
- package/vendored/lib/content-loader.ts +176 -0
- package/vendored/lib/deprecated-components.ts +185 -0
- package/vendored/lib/docs-isr.ts +180 -0
- package/vendored/lib/docs-types.ts +874 -0
- package/vendored/lib/docs.ts +203 -0
- package/vendored/lib/domain-helpers.ts +107 -0
- package/vendored/lib/email-notifier.ts +102 -0
- package/vendored/lib/email-templates/build-failure.tsx +193 -0
- package/vendored/lib/email-templates/components/base-layout.tsx +150 -0
- package/vendored/lib/email-templates/components/error-box.tsx +88 -0
- package/vendored/lib/email-templates/components/info-row.tsx +63 -0
- package/vendored/lib/email-templates/index.ts +13 -0
- package/vendored/lib/empty-polyfill.js +3 -0
- package/vendored/lib/extract-highlights.ts +124 -0
- package/vendored/lib/fonts.ts +227 -0
- package/vendored/lib/frontmatter-utils.ts +77 -0
- package/vendored/lib/fs-utils.ts +20 -0
- package/vendored/lib/git-utils.ts +87 -0
- package/vendored/lib/health-checks.ts +224 -0
- package/vendored/lib/icon-utils.ts +492 -0
- package/vendored/lib/infer-page-type.ts +14 -0
- package/vendored/lib/isr-build-executor.ts +185 -0
- package/vendored/lib/language-icons.ts +152 -0
- package/vendored/lib/language-utils.ts +338 -0
- package/vendored/lib/latex-config.ts +64 -0
- package/vendored/lib/link-prefix-context.tsx +32 -0
- package/vendored/lib/logger.ts +63 -0
- package/vendored/lib/mcp-search.ts +255 -0
- package/vendored/lib/mdx-inline-components.ts +155 -0
- package/vendored/lib/mdx.ts +100 -0
- package/vendored/lib/middleware-helpers.ts +519 -0
- package/vendored/lib/navigation-resolver.ts +621 -0
- package/vendored/lib/navigation-utils.ts +103 -0
- package/vendored/lib/normalize-config.ts +94 -0
- package/vendored/lib/openapi/cache.ts +92 -0
- package/vendored/lib/openapi/code-examples.ts +389 -0
- package/vendored/lib/openapi/errors.ts +253 -0
- package/vendored/lib/openapi/generator.ts +230 -0
- package/vendored/lib/openapi/index.ts +84 -0
- package/vendored/lib/openapi/parser.ts +474 -0
- package/vendored/lib/openapi/types.ts +232 -0
- package/vendored/lib/openapi/validator.ts +156 -0
- package/vendored/lib/openapi-isr.ts +121 -0
- package/vendored/lib/page-isr-helpers.ts +137 -0
- package/vendored/lib/path-safety.ts +130 -0
- package/vendored/lib/paths.ts +35 -0
- package/vendored/lib/preprocess-mdx.ts +951 -0
- package/vendored/lib/process-mdx-with-exports.ts +75 -0
- package/vendored/lib/project-resolver.ts +165 -0
- package/vendored/lib/r2-content.ts +60 -0
- package/vendored/lib/r2-manifest.ts +84 -0
- package/vendored/lib/recent-searches.ts +41 -0
- package/vendored/lib/recma-compound-components.ts +84 -0
- package/vendored/lib/redirect-compiler.ts +160 -0
- package/vendored/lib/redirect-matcher.ts +296 -0
- package/vendored/lib/redis.ts +23 -0
- package/vendored/lib/rehype-class-to-classname.ts +31 -0
- package/vendored/lib/rehype-code-meta.ts +275 -0
- package/vendored/lib/rehype-nozoom-to-data.ts +45 -0
- package/vendored/lib/remark-extract-exports.ts +104 -0
- package/vendored/lib/resilience.ts +260 -0
- package/vendored/lib/revalidation-helpers.ts +200 -0
- package/vendored/lib/revalidation-trigger.ts +150 -0
- package/vendored/lib/screenshot-capture.ts +229 -0
- package/vendored/lib/search-client.ts +91 -0
- package/vendored/lib/search-suggestions.ts +38 -0
- package/vendored/lib/search.ts +158 -0
- package/vendored/lib/seo.ts +264 -0
- package/vendored/lib/shiki-client.ts +131 -0
- package/vendored/lib/shiki-config.ts +289 -0
- package/vendored/lib/shiki-css-theme.ts +46 -0
- package/vendored/lib/shiki-highlighter.ts +62 -0
- package/vendored/lib/shiki-transformers.ts +337 -0
- package/vendored/lib/slack-notifier.ts +248 -0
- package/vendored/lib/snippet-compiler-isr.ts +114 -0
- package/vendored/lib/snippet-loader-isr.ts +276 -0
- package/vendored/lib/static-artifacts.ts +375 -0
- package/vendored/lib/static-file-route.ts +72 -0
- package/vendored/lib/tracking-script.ts +19 -0
- package/vendored/lib/typography-config.ts +42 -0
- package/vendored/lib/validate-config.ts +268 -0
- package/vendored/next.config.js +45 -0
- package/vendored/postcss.config.js +6 -0
- package/vendored/schema/README.md +28 -0
- package/vendored/schema/docs-schema.json +4631 -0
- package/vendored/scripts/build-project.cjs +174 -0
- package/vendored/scripts/build-search-index.cjs +347 -0
- package/vendored/scripts/compile-snippets.cjs +488 -0
- package/vendored/scripts/copy-files.cjs +295 -0
- package/vendored/scripts/dev-project.cjs +534 -0
- package/vendored/scripts/enhance-navigation.cjs +354 -0
- package/vendored/scripts/validate-links.cjs +423 -0
- package/vendored/shared/constants.ts +6 -0
- package/vendored/shared/index.ts +19 -0
- package/vendored/shared/logger.ts +62 -0
- package/vendored/shared/memory-monitor.ts +190 -0
- package/vendored/shared/navigation-validator.ts +101 -0
- package/vendored/shared/path-security.ts +39 -0
- package/vendored/shared/status-reporter.ts +199 -0
- package/vendored/shared/timer.ts +51 -0
- package/vendored/shared/types.ts +102 -0
- package/vendored/tailwind.config.ts +39 -0
- package/vendored/themes/base.css +1311 -0
- package/vendored/themes/index.ts +119 -0
- package/vendored/themes/jam/variables.css +835 -0
- package/vendored/themes/nebula/variables.css +282 -0
- package/vendored/themes/pulsar/variables.css +1009 -0
- package/vendored/themes/types.ts +89 -0
- package/vendored/tsconfig.json +48 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openapi.js","sourceRoot":"","sources":["../../src/lib/openapi.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,GAGf,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare function success(text: string): void;
|
|
2
|
+
declare function error(text: string): void;
|
|
3
|
+
export declare const output: {
|
|
4
|
+
header: (text: string) => void;
|
|
5
|
+
success: typeof success;
|
|
6
|
+
error: typeof error;
|
|
7
|
+
warn: (text: string) => void;
|
|
8
|
+
info: (text: string) => void;
|
|
9
|
+
hint: (text: string) => void;
|
|
10
|
+
check: typeof success;
|
|
11
|
+
fail: typeof error;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=output.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../src/lib/output.ts"],"names":[],"mappings":"AAEA,iBAAS,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAEnC;AAED,iBAAS,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAEjC;AAED,eAAO,MAAM,MAAM;mBACF,MAAM;;;iBAGR,MAAM;iBACN,MAAM;iBACN,MAAM;;;CAIpB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
function success(text) {
|
|
3
|
+
console.log(chalk.green(`✓ ${text}`));
|
|
4
|
+
}
|
|
5
|
+
function error(text) {
|
|
6
|
+
console.log(chalk.red(`✗ ${text}`));
|
|
7
|
+
}
|
|
8
|
+
export const output = {
|
|
9
|
+
header: (text) => console.log(`\n${chalk.bold(text)}\n`),
|
|
10
|
+
success,
|
|
11
|
+
error,
|
|
12
|
+
warn: (text) => console.log(chalk.yellow(`⚠ ${text}`)),
|
|
13
|
+
info: (text) => console.log(chalk.blue(`ℹ ${text}`)),
|
|
14
|
+
hint: (text) => console.log(chalk.gray(` ${text}`)),
|
|
15
|
+
// Aliases for semantic clarity
|
|
16
|
+
check: success,
|
|
17
|
+
fail: error,
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=output.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.js","sourceRoot":"","sources":["../../src/lib/output.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,SAAS,OAAO,CAAC,IAAY;IAC3B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC;AACxC,CAAC;AAED,SAAS,KAAK,CAAC,IAAY;IACzB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,MAAM,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;IAChE,OAAO;IACP,KAAK;IACL,IAAI,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;IAC9D,IAAI,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;IAC5D,IAAI,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;IAC5D,+BAA+B;IAC/B,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,KAAK;CACZ,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Path Security Utilities
|
|
3
|
+
*
|
|
4
|
+
* Validates that file paths stay within the project directory
|
|
5
|
+
* to prevent path traversal attacks.
|
|
6
|
+
*
|
|
7
|
+
* Used by both CLI and build-service.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Check if a path stays within the project directory.
|
|
11
|
+
* Returns true if path is within project, false otherwise.
|
|
12
|
+
*/
|
|
13
|
+
export declare function isPathWithinProject(filePath: string, projectDir: string): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Validates that a path stays within the project directory.
|
|
16
|
+
* Throws Error if path would escape the project.
|
|
17
|
+
*/
|
|
18
|
+
export declare function validatePathWithinProject(filePath: string, projectDir: string): void;
|
|
19
|
+
/**
|
|
20
|
+
* Validates both source and target paths for rename operations.
|
|
21
|
+
*/
|
|
22
|
+
export declare function validateRenamePaths(from: string, to: string, projectDir: string): void;
|
|
23
|
+
//# sourceMappingURL=path-security.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-security.d.ts","sourceRoot":"","sources":["../../src/lib/path-security.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAKjF;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAIpF;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAGtF"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Path Security Utilities
|
|
3
|
+
*
|
|
4
|
+
* Validates that file paths stay within the project directory
|
|
5
|
+
* to prevent path traversal attacks.
|
|
6
|
+
*
|
|
7
|
+
* Used by both CLI and build-service.
|
|
8
|
+
*/
|
|
9
|
+
import path from 'path';
|
|
10
|
+
/**
|
|
11
|
+
* Check if a path stays within the project directory.
|
|
12
|
+
* Returns true if path is within project, false otherwise.
|
|
13
|
+
*/
|
|
14
|
+
export function isPathWithinProject(filePath, projectDir) {
|
|
15
|
+
const absolutePath = path.resolve(projectDir, filePath);
|
|
16
|
+
const normalizedProject = path.resolve(projectDir);
|
|
17
|
+
return absolutePath.startsWith(normalizedProject + path.sep) || absolutePath === normalizedProject;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Validates that a path stays within the project directory.
|
|
21
|
+
* Throws Error if path would escape the project.
|
|
22
|
+
*/
|
|
23
|
+
export function validatePathWithinProject(filePath, projectDir) {
|
|
24
|
+
if (!isPathWithinProject(filePath, projectDir)) {
|
|
25
|
+
throw new Error(`Path escapes project directory: ${filePath}`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Validates both source and target paths for rename operations.
|
|
30
|
+
*/
|
|
31
|
+
export function validateRenamePaths(from, to, projectDir) {
|
|
32
|
+
validatePathWithinProject(from, projectDir);
|
|
33
|
+
validatePathWithinProject(to, projectDir);
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=path-security.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-security.js","sourceRoot":"","sources":["../../src/lib/path-security.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,QAAgB,EAAE,UAAkB;IACtE,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;IACxD,MAAM,iBAAiB,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAEnD,OAAO,YAAY,CAAC,UAAU,CAAC,iBAAiB,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,YAAY,KAAK,iBAAiB,CAAC;AACrG,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,yBAAyB,CAAC,QAAgB,EAAE,UAAkB;IAC5E,IAAI,CAAC,mBAAmB,CAAC,QAAQ,EAAE,UAAU,CAAC,EAAE,CAAC;QAC/C,MAAM,IAAI,KAAK,CAAC,mCAAmC,QAAQ,EAAE,CAAC,CAAC;IACjE,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAY,EAAE,EAAU,EAAE,UAAkB;IAC9E,yBAAyB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IAC5C,yBAAyB,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Port Detection Utilities
|
|
3
|
+
*
|
|
4
|
+
* Cross-platform port availability checking using Node's net module.
|
|
5
|
+
* Works on Windows, macOS, and Linux without external dependencies.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Check if a port is in use using Node's net module.
|
|
9
|
+
* Checks both IPv4 (0.0.0.0) and IPv6 (::) since Next.js binds to both.
|
|
10
|
+
* This is cross-platform (works on Windows, macOS, Linux).
|
|
11
|
+
*/
|
|
12
|
+
export declare function isPortInUse(port: number): Promise<boolean>;
|
|
13
|
+
/**
|
|
14
|
+
* Find an available port starting from the preferred port.
|
|
15
|
+
* Tries up to maxAttempts sequential ports.
|
|
16
|
+
*/
|
|
17
|
+
export declare function findAvailablePort(preferredPort: number, maxAttempts?: number): Promise<number>;
|
|
18
|
+
//# sourceMappingURL=port.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"port.d.ts","sourceRoot":"","sources":["../../src/lib/port.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA+BH;;;;GAIG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAahE;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,aAAa,EAAE,MAAM,EAAE,WAAW,SAAK,GAAG,OAAO,CAAC,MAAM,CAAC,CAahG"}
|
package/dist/lib/port.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Port Detection Utilities
|
|
3
|
+
*
|
|
4
|
+
* Cross-platform port availability checking using Node's net module.
|
|
5
|
+
* Works on Windows, macOS, and Linux without external dependencies.
|
|
6
|
+
*/
|
|
7
|
+
import net from 'net';
|
|
8
|
+
/**
|
|
9
|
+
* Check if a port is in use on a specific host.
|
|
10
|
+
*/
|
|
11
|
+
function checkPort(port, host) {
|
|
12
|
+
return new Promise((resolve) => {
|
|
13
|
+
const server = net.createServer();
|
|
14
|
+
server.once('error', (err) => {
|
|
15
|
+
// EADDRNOTAVAIL means the address family isn't available (e.g., IPv6 disabled)
|
|
16
|
+
// In that case, don't count as "in use"
|
|
17
|
+
if (err.code === 'EADDRNOTAVAIL') {
|
|
18
|
+
resolve(false);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
resolve(true); // Port in use or other error
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
server.once('listening', () => {
|
|
25
|
+
server.close(() => {
|
|
26
|
+
resolve(false); // Port available
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
server.listen(port, host);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Check if a port is in use using Node's net module.
|
|
34
|
+
* Checks both IPv4 (0.0.0.0) and IPv6 (::) since Next.js binds to both.
|
|
35
|
+
* This is cross-platform (works on Windows, macOS, Linux).
|
|
36
|
+
*/
|
|
37
|
+
export async function isPortInUse(port) {
|
|
38
|
+
// Validate port range
|
|
39
|
+
if (!Number.isInteger(port) || port < 1 || port > 65535) {
|
|
40
|
+
return true; // Invalid port, treat as in use
|
|
41
|
+
}
|
|
42
|
+
// Check both IPv4 and IPv6 - port must be free on both
|
|
43
|
+
const [ipv4InUse, ipv6InUse] = await Promise.all([
|
|
44
|
+
checkPort(port, '0.0.0.0'),
|
|
45
|
+
checkPort(port, '::'),
|
|
46
|
+
]);
|
|
47
|
+
return ipv4InUse || ipv6InUse;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Find an available port starting from the preferred port.
|
|
51
|
+
* Tries up to maxAttempts sequential ports.
|
|
52
|
+
*/
|
|
53
|
+
export async function findAvailablePort(preferredPort, maxAttempts = 10) {
|
|
54
|
+
let port = preferredPort;
|
|
55
|
+
for (let i = 0; i < maxAttempts; i++) {
|
|
56
|
+
const inUse = await isPortInUse(port);
|
|
57
|
+
if (!inUse) {
|
|
58
|
+
return port;
|
|
59
|
+
}
|
|
60
|
+
port++;
|
|
61
|
+
}
|
|
62
|
+
// If all ports in range are taken, return the preferred and let it fail with a clear error
|
|
63
|
+
return preferredPort;
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=port.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"port.js","sourceRoot":"","sources":["../../src/lib/port.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,GAAG,MAAM,KAAK,CAAC;AAEtB;;GAEG;AACH,SAAS,SAAS,CAAC,IAAY,EAAE,IAAY;IAC3C,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,MAAM,MAAM,GAAG,GAAG,CAAC,YAAY,EAAE,CAAC;QAElC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,GAA0B,EAAE,EAAE;YAClD,+EAA+E;YAC/E,wCAAwC;YACxC,IAAI,GAAG,CAAC,IAAI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ACtC,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,OAAO,IAAI,CAAC;QACd,CAAC;QACD,IAAI,EAAE,CAAC;IACT,CAAC;IAED,2FAA2F;IAC3F,OAAO,aAAa,CAAC;AACvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../src/lib/spinner.ts"],"names":[],"mappings":"AAAA,OAAY,EAAE,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAIpC,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAMzC;AAED,wBAAgB,WAAW,IAAI,IAAI,CAKlC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import ora from 'ora';
|
|
2
|
+
let currentSpinner = null;
|
|
3
|
+
export function spinner(text) {
|
|
4
|
+
if (currentSpinner) {
|
|
5
|
+
currentSpinner.stop();
|
|
6
|
+
}
|
|
7
|
+
currentSpinner = ora(text).start();
|
|
8
|
+
return currentSpinner;
|
|
9
|
+
}
|
|
10
|
+
export function stopSpinner() {
|
|
11
|
+
if (currentSpinner) {
|
|
12
|
+
currentSpinner.stop();
|
|
13
|
+
currentSpinner = null;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=spinner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner.js","sourceRoot":"","sources":["../../src/lib/spinner.ts"],"names":[],"mappings":"AAAA,OAAO,GAAiB,MAAM,KAAK,CAAC;AAEpC,IAAI,cAAc,GAAe,IAAI,CAAC;AAEtC,MAAM,UAAU,OAAO,CAAC,IAAY;IAClC,IAAI,cAAc,EAAE,CAAC;QACnB,cAAc,CAAC,IAAI,EAAE,CAAC;IACxB,CAAC;IACD,cAAc,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC;IACnC,OAAO,cAAc,CAAC;AACxB,CAAC;AAED,MAAM,UAAU,WAAW;IACzB,IAAI,cAAc,EAAE,CAAC;QACnB,cAAc,CAAC,IAAI,EAAE,CAAC;QACtB,cAAc,GAAG,IAAI,CAAC;IACxB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/lib/version.ts"],"names":[],"mappings":"AAYA,wBAAsB,eAAe,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA+C3E"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { homedir } from 'os';
|
|
4
|
+
const CACHE_FILE = path.join(homedir(), '.jamdesk', 'version-cache.json');
|
|
5
|
+
const CACHE_TTL = 24 * 60 * 60 * 1000; // 24 hours
|
|
6
|
+
export async function checkForUpdates(currentVersion) {
|
|
7
|
+
try {
|
|
8
|
+
// Check cache first
|
|
9
|
+
if (fs.existsSync(CACHE_FILE)) {
|
|
10
|
+
const cacheContent = fs.readFileSync(CACHE_FILE, 'utf-8');
|
|
11
|
+
const cache = JSON.parse(cacheContent);
|
|
12
|
+
if (Date.now() - cache.timestamp < CACHE_TTL) {
|
|
13
|
+
// Only show update if cache has valid version and it differs
|
|
14
|
+
if (cache.latest && cache.latest !== currentVersion) {
|
|
15
|
+
console.log(`\nUpdate available: ${currentVersion} → ${cache.latest}`);
|
|
16
|
+
console.log('Run `jamdesk update` to update\n');
|
|
17
|
+
}
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
// Fetch latest version from npm (with timeout)
|
|
22
|
+
const controller = new AbortController();
|
|
23
|
+
const timeout = setTimeout(() => controller.abort(), 3000);
|
|
24
|
+
const res = await fetch('https://registry.npmjs.org/jamdesk/latest', {
|
|
25
|
+
signal: controller.signal,
|
|
26
|
+
});
|
|
27
|
+
clearTimeout(timeout);
|
|
28
|
+
const data = await res.json();
|
|
29
|
+
const latest = data.version;
|
|
30
|
+
// Skip if package not found on npm (not published yet)
|
|
31
|
+
if (!latest) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
// Cache result
|
|
35
|
+
const cacheDir = path.dirname(CACHE_FILE);
|
|
36
|
+
if (!fs.existsSync(cacheDir)) {
|
|
37
|
+
fs.mkdirSync(cacheDir, { recursive: true });
|
|
38
|
+
}
|
|
39
|
+
fs.writeFileSync(CACHE_FILE, JSON.stringify({ latest, timestamp: Date.now() }));
|
|
40
|
+
if (latest !== currentVersion) {
|
|
41
|
+
console.log(`\nUpdate available: ${currentVersion} → ${latest}`);
|
|
42
|
+
console.log('Run `jamdesk update` to update\n');
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
// Silently fail - don't block CLI for version check
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/lib/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAE7B,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,oBAAoB,CAAC,CAAC;AAC1E,MAAM,SAAS,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,WAAW;AAOlD,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,cAAsB;IAC1D,IAAI,CAAC;QACH,oBAAoB;QACpB,IAAI,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YAC9B,MAAM,YAAY,GAAG,EAAE,CAAC,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;YAC1D,MAAM,KAAK,GAAiB,IAAI,CAAC,KAAK,CAAC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CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC;QAEhF,IAAI,MAAM,KAAK,cAAc,EAAE,CAAC;YAC9B,OAAO,CAAC,GAAG,CAAC,uBAAuB,cAAc,MAAM,MAAM,EAAE,CAAC,CAAC;YACjE,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;QAClD,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,oDAAoD;IACtD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Update Checker
|
|
3
|
+
*
|
|
4
|
+
* Automatically checks for CLI updates and notifies users.
|
|
5
|
+
* Features:
|
|
6
|
+
* - 24-hour cache to avoid excessive network calls
|
|
7
|
+
* - Non-blocking with 3-second timeout
|
|
8
|
+
* - Respects CI and JAMDESK_NO_UPDATE_CHECK environments
|
|
9
|
+
* - Shows styled update notice when new version available
|
|
10
|
+
*/
|
|
11
|
+
export interface CheckOptions {
|
|
12
|
+
force?: boolean;
|
|
13
|
+
silent?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Compare semantic versions
|
|
17
|
+
* Returns true if latest is newer than current
|
|
18
|
+
*/
|
|
19
|
+
export declare function isNewerVersion(latest: string, current: string): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Check for updates and optionally display notice
|
|
22
|
+
*
|
|
23
|
+
* @param currentVersion - Current CLI version
|
|
24
|
+
* @param options - Check options (force, silent)
|
|
25
|
+
*/
|
|
26
|
+
export declare function checkForUpdates(currentVersion: string, options?: CheckOptions): Promise<{
|
|
27
|
+
hasUpdate: boolean;
|
|
28
|
+
latestVersion: string | null;
|
|
29
|
+
}>;
|
|
30
|
+
/**
|
|
31
|
+
* Clear update cache (useful for testing)
|
|
32
|
+
*/
|
|
33
|
+
export declare function clearUpdateCache(): void;
|
|
34
|
+
//# sourceMappingURL=update-checker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-checker.d.ts","sourceRoot":"","sources":["../../src/utils/update-checker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAiBH,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAWvE;AA2CD;;;;;GAKG;AACH,wBAAsB,eAAe,CACnC,cAAc,EAAE,MAAM,EACtB,OAAO,GAAE,YAAiB,GACzB,OAAO,CAAC;IAAE,SAAS,EAAE,OAAO,CAAC;IAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC,CAqD/D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CASvC"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Update Checker
|
|
3
|
+
*
|
|
4
|
+
* Automatically checks for CLI updates and notifies users.
|
|
5
|
+
* Features:
|
|
6
|
+
* - 24-hour cache to avoid excessive network calls
|
|
7
|
+
* - Non-blocking with 3-second timeout
|
|
8
|
+
* - Respects CI and JAMDESK_NO_UPDATE_CHECK environments
|
|
9
|
+
* - Shows styled update notice when new version available
|
|
10
|
+
*/
|
|
11
|
+
import { readFileSync, writeFileSync, existsSync, mkdirSync } from 'fs';
|
|
12
|
+
import { homedir } from 'os';
|
|
13
|
+
import { join } from 'path';
|
|
14
|
+
import chalk from 'chalk';
|
|
15
|
+
const CACHE_DIR = join(homedir(), '.jamdesk');
|
|
16
|
+
const CACHE_FILE = join(CACHE_DIR, 'update-cache.json');
|
|
17
|
+
const CHECK_INTERVAL = 24 * 60 * 60 * 1000; // 24 hours
|
|
18
|
+
const NPM_REGISTRY = 'https://registry.npmjs.org/jamdesk';
|
|
19
|
+
/**
|
|
20
|
+
* Compare semantic versions
|
|
21
|
+
* Returns true if latest is newer than current
|
|
22
|
+
*/
|
|
23
|
+
export function isNewerVersion(latest, current) {
|
|
24
|
+
const latestParts = latest.split('.').map(Number);
|
|
25
|
+
const currentParts = current.split('.').map(Number);
|
|
26
|
+
for (let i = 0; i < 3; i++) {
|
|
27
|
+
const l = latestParts[i] || 0;
|
|
28
|
+
const c = currentParts[i] || 0;
|
|
29
|
+
if (l > c)
|
|
30
|
+
return true;
|
|
31
|
+
if (l < c)
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Print styled update notice
|
|
38
|
+
*/
|
|
39
|
+
function printUpdateNotice(current, latest) {
|
|
40
|
+
console.log();
|
|
41
|
+
console.log(chalk.yellow('╭─────────────────────────────────────────────────────────╮'));
|
|
42
|
+
console.log(chalk.yellow('│') + ' Update available: ' + chalk.gray(current) + ' → ' + chalk.green(latest) + ' ' + chalk.yellow('│'));
|
|
43
|
+
console.log(chalk.yellow('│') + ' Run: ' + chalk.cyan('curl -fsSL https://get.jamdesk.com/upgrade | bash') + ' ' + chalk.yellow('│'));
|
|
44
|
+
console.log(chalk.yellow('│') + ' Or: ' + chalk.cyan('npm install -g jamdesk@latest') + ' ' + chalk.yellow('│'));
|
|
45
|
+
console.log(chalk.yellow('╰─────────────────────────────────────────────────────────╯'));
|
|
46
|
+
console.log();
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Read cached version info
|
|
50
|
+
*/
|
|
51
|
+
function readCache() {
|
|
52
|
+
try {
|
|
53
|
+
if (existsSync(CACHE_FILE)) {
|
|
54
|
+
return JSON.parse(readFileSync(CACHE_FILE, 'utf-8'));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
catch {
|
|
58
|
+
// Ignore cache read errors
|
|
59
|
+
}
|
|
60
|
+
return { lastCheck: 0, latestVersion: null };
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Write version info to cache
|
|
64
|
+
*/
|
|
65
|
+
function writeCache(cache) {
|
|
66
|
+
try {
|
|
67
|
+
if (!existsSync(CACHE_DIR)) {
|
|
68
|
+
mkdirSync(CACHE_DIR, { recursive: true });
|
|
69
|
+
}
|
|
70
|
+
writeFileSync(CACHE_FILE, JSON.stringify(cache));
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
// Ignore cache write errors
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Check for updates and optionally display notice
|
|
78
|
+
*
|
|
79
|
+
* @param currentVersion - Current CLI version
|
|
80
|
+
* @param options - Check options (force, silent)
|
|
81
|
+
*/
|
|
82
|
+
export async function checkForUpdates(currentVersion, options = {}) {
|
|
83
|
+
const { force = false, silent = false } = options;
|
|
84
|
+
// Skip in CI environments
|
|
85
|
+
if (process.env.CI || process.env.JAMDESK_NO_UPDATE_CHECK) {
|
|
86
|
+
return { hasUpdate: false, latestVersion: null };
|
|
87
|
+
}
|
|
88
|
+
const cache = readCache();
|
|
89
|
+
const now = Date.now();
|
|
90
|
+
// Check cache unless forced
|
|
91
|
+
if (!force && cache.lastCheck && (now - cache.lastCheck) < CHECK_INTERVAL) {
|
|
92
|
+
if (cache.latestVersion && isNewerVersion(cache.latestVersion, currentVersion)) {
|
|
93
|
+
if (!silent) {
|
|
94
|
+
printUpdateNotice(currentVersion, cache.latestVersion);
|
|
95
|
+
}
|
|
96
|
+
return { hasUpdate: true, latestVersion: cache.latestVersion };
|
|
97
|
+
}
|
|
98
|
+
return { hasUpdate: false, latestVersion: cache.latestVersion };
|
|
99
|
+
}
|
|
100
|
+
// Fetch latest version (non-blocking, with timeout)
|
|
101
|
+
try {
|
|
102
|
+
const controller = new AbortController();
|
|
103
|
+
const timeout = setTimeout(() => controller.abort(), 3000); // 3s timeout
|
|
104
|
+
const response = await fetch(NPM_REGISTRY, {
|
|
105
|
+
signal: controller.signal,
|
|
106
|
+
headers: { 'Accept': 'application/json' }
|
|
107
|
+
});
|
|
108
|
+
clearTimeout(timeout);
|
|
109
|
+
if (response.ok) {
|
|
110
|
+
const data = await response.json();
|
|
111
|
+
const latestVersion = data['dist-tags']?.latest || null;
|
|
112
|
+
writeCache({ lastCheck: now, latestVersion });
|
|
113
|
+
if (latestVersion && isNewerVersion(latestVersion, currentVersion)) {
|
|
114
|
+
if (!silent) {
|
|
115
|
+
printUpdateNotice(currentVersion, latestVersion);
|
|
116
|
+
}
|
|
117
|
+
return { hasUpdate: true, latestVersion };
|
|
118
|
+
}
|
|
119
|
+
return { hasUpdate: false, latestVersion };
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
catch {
|
|
123
|
+
// Silently fail - don't block CLI usage
|
|
124
|
+
writeCache({ lastCheck: now, latestVersion: cache.latestVersion });
|
|
125
|
+
}
|
|
126
|
+
return { hasUpdate: false, latestVersion: null };
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Clear update cache (useful for testing)
|
|
130
|
+
*/
|
|
131
|
+
export function clearUpdateCache() {
|
|
132
|
+
try {
|
|
133
|
+
if (existsSync(CACHE_FILE)) {
|
|
134
|
+
const { unlinkSync } = require('fs');
|
|
135
|
+
unlinkSync(CACHE_FILE);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
catch {
|
|
139
|
+
// Ignore errors
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
//# sourceMappingURL=update-checker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-checker.js","sourceRoot":"","sources":["../../src/utils/update-checker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,MAAM,SAAS,GA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AAC;QACP,gBAAgB;IAClB,CAAC;AACH,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "jamdesk",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "CLI for Jamdesk — build, preview, and deploy documentation sites from MDX. Dev server with hot reload, 50+ components, OpenAPI support, AI search, and Mintlify migration",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"jamdesk",
|
|
7
|
+
"documentation",
|
|
8
|
+
"documentation-generator",
|
|
9
|
+
"documentation-platform",
|
|
10
|
+
"docs",
|
|
11
|
+
"docs-as-code",
|
|
12
|
+
"mdx",
|
|
13
|
+
"markdown",
|
|
14
|
+
"cli",
|
|
15
|
+
"dev-server",
|
|
16
|
+
"hot-reload",
|
|
17
|
+
"turbopack",
|
|
18
|
+
"developer-tools",
|
|
19
|
+
"api-documentation",
|
|
20
|
+
"openapi",
|
|
21
|
+
"api-reference",
|
|
22
|
+
"static-site",
|
|
23
|
+
"nextjs",
|
|
24
|
+
"technical-writing",
|
|
25
|
+
"mintlify",
|
|
26
|
+
"mintlify-alternative",
|
|
27
|
+
"documentation-hosting",
|
|
28
|
+
"documentation-site",
|
|
29
|
+
"developer-documentation",
|
|
30
|
+
"api-docs",
|
|
31
|
+
"react-components",
|
|
32
|
+
"docs-site-generator",
|
|
33
|
+
"ai-search"
|
|
34
|
+
],
|
|
35
|
+
"homepage": "https://jamdesk.com",
|
|
36
|
+
"bugs": {
|
|
37
|
+
"url": "https://github.com/jamdesk/jamdesk/issues",
|
|
38
|
+
"email": "support@jamdesk.com"
|
|
39
|
+
},
|
|
40
|
+
"repository": {
|
|
41
|
+
"type": "git",
|
|
42
|
+
"url": "https://github.com/jamdesk/jamdesk.git",
|
|
43
|
+
"directory": "builder/cli"
|
|
44
|
+
},
|
|
45
|
+
"license": "MIT",
|
|
46
|
+
"author": {
|
|
47
|
+
"name": "Jamdesk",
|
|
48
|
+
"email": "hello@jamdesk.com",
|
|
49
|
+
"url": "https://jamdesk.com"
|
|
50
|
+
},
|
|
51
|
+
"type": "module",
|
|
52
|
+
"bin": {
|
|
53
|
+
"jamdesk": "./bin/jamdesk.js"
|
|
54
|
+
},
|
|
55
|
+
"main": "./dist/index.js",
|
|
56
|
+
"types": "./dist/index.d.ts",
|
|
57
|
+
"files": [
|
|
58
|
+
"bin/",
|
|
59
|
+
"dist/",
|
|
60
|
+
"templates/",
|
|
61
|
+
"vendored/components/",
|
|
62
|
+
"vendored/contexts/",
|
|
63
|
+
"vendored/hooks/",
|
|
64
|
+
"vendored/themes/",
|
|
65
|
+
"vendored/lib/",
|
|
66
|
+
"vendored/shared/",
|
|
67
|
+
"vendored/scripts/",
|
|
68
|
+
"vendored/app/",
|
|
69
|
+
"vendored/public/images/jamdesk/",
|
|
70
|
+
"vendored/public/fonts/fontawesome/",
|
|
71
|
+
"vendored/schema/",
|
|
72
|
+
"vendored/next.config.js",
|
|
73
|
+
"vendored/tailwind.config.ts",
|
|
74
|
+
"vendored/postcss.config.js",
|
|
75
|
+
"vendored/tsconfig.json",
|
|
76
|
+
"README.md",
|
|
77
|
+
"LICENSE"
|
|
78
|
+
],
|
|
79
|
+
"scripts": {
|
|
80
|
+
"build": "tsc",
|
|
81
|
+
"prepare": "npm run build",
|
|
82
|
+
"vendor": "node scripts/vendor.js",
|
|
83
|
+
"security-check": "node scripts/security-check.js",
|
|
84
|
+
"prepublishOnly": "npm run vendor && npm run build && npm run security-check",
|
|
85
|
+
"publish:npm": "node scripts/publish.js npm",
|
|
86
|
+
"publish:github": "node scripts/publish.js github",
|
|
87
|
+
"publish:dry": "node scripts/publish.js npm --dry-run",
|
|
88
|
+
"test": "vitest",
|
|
89
|
+
"test:local": "node scripts/test-local.js",
|
|
90
|
+
"lint": "eslint src/",
|
|
91
|
+
"dev": "tsc --watch"
|
|
92
|
+
},
|
|
93
|
+
"dependencies": {
|
|
94
|
+
"@apidevtools/swagger-parser": "^12.1.0",
|
|
95
|
+
"@inquirer/prompts": "^8.1.0",
|
|
96
|
+
"ajv": "^8.17.1",
|
|
97
|
+
"chalk": "^5.3.0",
|
|
98
|
+
"commander": "^12.1.0",
|
|
99
|
+
"fastest-levenshtein": "^1.0.16",
|
|
100
|
+
"fs-extra": "^11.2.0",
|
|
101
|
+
"glob": "^11.0.0",
|
|
102
|
+
"json5": "^2.2.3",
|
|
103
|
+
"ora": "^8.0.0"
|
|
104
|
+
},
|
|
105
|
+
"devDependencies": {
|
|
106
|
+
"@mdx-js/mdx": "^3.1.1",
|
|
107
|
+
"@types/fs-extra": "^11.0.0",
|
|
108
|
+
"@types/node": "^20.0.0",
|
|
109
|
+
"gray-matter": "^4.0.3",
|
|
110
|
+
"typescript": "^5.3.0",
|
|
111
|
+
"vitest": "^1.0.0"
|
|
112
|
+
},
|
|
113
|
+
"engines": {
|
|
114
|
+
"node": ">=20.0.0"
|
|
115
|
+
},
|
|
116
|
+
"os": [
|
|
117
|
+
"darwin",
|
|
118
|
+
"linux",
|
|
119
|
+
"win32"
|
|
120
|
+
],
|
|
121
|
+
"cpu": [
|
|
122
|
+
"x64",
|
|
123
|
+
"arm64"
|
|
124
|
+
]
|
|
125
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Introduction
|
|
3
|
+
description: Welcome to your documentation
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Welcome to {{PROJECT_NAME}}
|
|
7
|
+
|
|
8
|
+
This is your new documentation site powered by Jamdesk.
|
|
9
|
+
|
|
10
|
+
## Getting Started
|
|
11
|
+
|
|
12
|
+
Edit this file to customize your documentation. Add new MDX files and update `docs.json` to add them to the navigation.
|
|
13
|
+
|
|
14
|
+
## Features
|
|
15
|
+
|
|
16
|
+
- **MDX Support** - Write documentation with React components
|
|
17
|
+
- **Hot Reload** - See changes instantly during development
|
|
18
|
+
- **Search** - Full-text search built in
|
|
19
|
+
- **Themes** - Choose from multiple themes
|