polen 0.8.0-next.9 → 0.8.1-next.1
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 +25 -0
- package/build/api/api.d.ts +3 -3
- package/build/api/api.js +3 -3
- package/build/api/builder/builder.d.ts +1 -1
- package/build/api/builder/builder.d.ts.map +1 -1
- package/build/api/builder/builder.js +12 -4
- package/build/api/builder/builder.js.map +1 -1
- package/build/api/builder/index.d.ts +1 -1
- package/build/api/builder/index.js +1 -1
- package/build/api/config/config.d.ts +4 -4
- package/build/api/config/config.js +4 -4
- package/build/api/config/configurator.d.ts +21 -4
- package/build/api/config/configurator.d.ts.map +1 -1
- package/build/api/config/configurator.js +6 -2
- package/build/api/config/configurator.js.map +1 -1
- package/build/api/config/define.d.ts +1 -1
- package/build/api/config/index.d.ts +1 -1
- package/build/api/config/index.js +1 -1
- package/build/api/config/load.d.ts +1 -1
- package/build/api/config/load.d.ts.map +1 -1
- package/build/api/config/load.js +71 -19
- package/build/api/config/load.js.map +1 -1
- package/build/api/config/merge.d.ts +1 -1
- package/build/api/config/merge.js +1 -1
- package/build/api/config/merge.js.map +1 -1
- package/build/api/config-resolver/config-resolver.d.ts +2 -2
- package/build/api/config-resolver/config-resolver.js +2 -2
- package/build/api/config-resolver/index.d.ts +1 -1
- package/build/api/config-resolver/index.js +1 -1
- package/build/api/config-resolver/resolve.d.ts +3 -3
- package/build/api/config-resolver/resolve.d.ts.map +1 -1
- package/build/api/config-resolver/resolve.js +8 -5
- package/build/api/config-resolver/resolve.js.map +1 -1
- package/build/api/config-resolver/vite.d.ts +2 -2
- package/build/api/config-resolver/vite.d.ts.map +1 -1
- package/build/api/config-resolver/vite.js +2 -2
- package/build/api/config-resolver/vite.js.map +1 -1
- package/build/api/index.d.ts +1 -1
- package/build/api/index.js +1 -1
- package/build/api/schema/data-sources/data-sources.d.ts +3 -3
- package/build/api/schema/data-sources/data-sources.js +3 -3
- package/build/api/schema/data-sources/index.d.ts +1 -1
- package/build/api/schema/data-sources/index.js +1 -1
- package/build/api/schema/data-sources/memory/memory.d.ts +1 -1
- package/build/api/schema/data-sources/memory/memory.js +2 -2
- package/build/api/schema/data-sources/memory/memory.js.map +1 -1
- package/build/api/schema/data-sources/schema-directory/file-name-expression/index.d.ts +1 -1
- package/build/api/schema/data-sources/schema-directory/file-name-expression/index.js +1 -1
- package/build/api/schema/data-sources/schema-directory/schema-directory.d.ts +1 -1
- package/build/api/schema/data-sources/schema-directory/schema-directory.js +5 -5
- package/build/api/schema/data-sources/schema-directory/schema-directory.js.map +1 -1
- package/build/api/schema/data-sources/schema-file/schema-file.d.ts +1 -1
- package/build/api/schema/data-sources/schema-file/schema-file.js +2 -2
- package/build/api/schema/data-sources/schema-file/schema-file.js.map +1 -1
- package/build/api/schema/index.d.ts +1 -1
- package/build/api/schema/index.js +1 -1
- package/build/api/schema/read.d.ts +2 -2
- package/build/api/schema/read.js +1 -1
- package/build/api/schema/schema.d.ts +3 -3
- package/build/api/schema/schema.d.ts.map +1 -1
- package/build/api/schema/schema.js +2 -2
- package/build/api/schema-augmentation/augmentations/description.d.ts +2 -2
- package/build/api/schema-augmentation/augmentations/description.d.ts.map +1 -1
- package/build/api/schema-augmentation/augmentations/description.js +1 -1
- package/build/api/schema-augmentation/index.d.ts +1 -1
- package/build/api/schema-augmentation/index.js +1 -1
- package/build/api/schema-augmentation/schema-augmentation.d.ts +2 -2
- package/build/api/schema-augmentation/schema-augmentation.d.ts.map +1 -1
- package/build/api/schema-augmentation/schema-augmentation.js +1 -1
- package/build/api/schema-augmentation/target.d.ts +1 -1
- package/build/api/schema-augmentation/target.d.ts.map +1 -1
- package/build/api/schema-augmentation/target.js +1 -1
- package/build/api/schema-augmentation/target.js.map +1 -1
- package/build/api/singletons/markdown/index.d.ts +1 -1
- package/build/api/singletons/markdown/index.js +1 -1
- package/build/api/vite/log-filters.d.ts +1 -1
- package/build/api/vite/log-filters.d.ts.map +1 -1
- package/build/api/vite/log-filters.js +1 -1
- package/build/api/vite/log-filters.js.map +1 -1
- package/build/api/vite/logger.d.ts +1 -1
- package/build/api/vite/logger.d.ts.map +1 -1
- package/build/api/vite/logger.js +21 -7
- package/build/api/vite/logger.js.map +1 -1
- package/build/api/vite/plugins/build.d.ts +2 -2
- package/build/api/vite/plugins/build.d.ts.map +1 -1
- package/build/api/vite/plugins/build.js +14 -6
- package/build/api/vite/plugins/build.js.map +1 -1
- package/build/api/vite/plugins/core.d.ts +3 -3
- package/build/api/vite/plugins/core.d.ts.map +1 -1
- package/build/api/vite/plugins/core.js +159 -208
- package/build/api/vite/plugins/core.js.map +1 -1
- package/build/api/vite/plugins/main.d.ts +2 -2
- package/build/api/vite/plugins/main.d.ts.map +1 -1
- package/build/api/vite/plugins/main.js +3 -3
- package/build/api/vite/plugins/pages-tree.d.ts +16 -0
- package/build/api/vite/plugins/pages-tree.d.ts.map +1 -0
- package/build/api/vite/plugins/pages-tree.js +152 -0
- package/build/api/vite/plugins/pages-tree.js.map +1 -0
- package/build/api/vite/plugins/serve.d.ts +2 -2
- package/build/api/vite/plugins/serve.d.ts.map +1 -1
- package/build/api/vite/plugins/serve.js +41 -26
- package/build/api/vite/plugins/serve.js.map +1 -1
- package/build/api/vite/vi.d.ts +2 -2
- package/build/api/vite/vi.d.ts.map +1 -1
- package/build/api/vite/vi.js +2 -2
- package/build/api/vite/vi.js.map +1 -1
- package/build/cli/_/self-contained-mode.d.ts +16 -0
- package/build/cli/_/self-contained-mode.d.ts.map +1 -0
- package/build/cli/_/self-contained-mode.js +58 -0
- package/build/cli/_/self-contained-mode.js.map +1 -0
- package/build/cli/commands/build.js +2 -2
- package/build/cli/commands/build.js.map +1 -1
- package/build/cli/commands/dev.js +3 -4
- package/build/cli/commands/dev.js.map +1 -1
- package/build/cli/commands/open.js +4 -4
- package/build/cli/commands/open.js.map +1 -1
- package/build/dep/graphql-inspector/index.d.ts +1 -1
- package/build/dep/graphql-inspector/index.js +1 -1
- package/build/dep/hono/hono.d.ts +1 -1
- package/build/dep/hono/hono.js +1 -1
- package/build/dep/hono/index.d.ts +1 -1
- package/build/dep/hono/index.js +1 -1
- package/build/dep/superjson/index.d.ts +1 -1
- package/build/dep/superjson/index.js +1 -1
- package/build/dep/tiny-globby/index.d.ts +1 -1
- package/build/dep/tiny-globby/index.js +1 -1
- package/build/dep/vite/index.d.ts +1 -1
- package/build/dep/vite/index.js +1 -1
- package/build/exports/index.d.ts +1 -1
- package/build/exports/index.js +1 -1
- package/build/exports/polen.d.ts +3 -3
- package/build/exports/polen.d.ts.map +1 -1
- package/build/exports/polen.js +3 -3
- package/build/exports/polen.js.map +1 -1
- package/build/lib/apple-touch-icon/index.d.ts +1 -1
- package/build/lib/apple-touch-icon/index.js +1 -1
- package/build/lib/debug/debug.d.ts +3 -3
- package/build/lib/debug/debug.d.ts.map +1 -1
- package/build/lib/debug/debug.js +39 -10
- package/build/lib/debug/debug.js.map +1 -1
- package/build/lib/debug/environment-variable.d.ts +2 -1
- package/build/lib/debug/environment-variable.d.ts.map +1 -1
- package/build/lib/debug/environment-variable.js +27 -7
- package/build/lib/debug/environment-variable.js.map +1 -1
- package/build/lib/debug/index.d.ts +1 -1
- package/build/lib/debug/index.js +1 -1
- package/build/lib/errors/ContextualAggregateError.d.ts +1 -1
- package/build/lib/errors/ContextualAggregateError.js +1 -1
- package/build/lib/errors/ContextualError.d.ts +1 -1
- package/build/lib/errors/ErrorInternal.d.ts +2 -2
- package/build/lib/errors/ErrorInternal.js +1 -1
- package/build/lib/errors/errors.d.ts +4 -4
- package/build/lib/errors/errors.js +4 -4
- package/build/lib/errors/index.d.ts +1 -1
- package/build/lib/errors/index.js +1 -1
- package/build/lib/errors/types.d.ts +1 -1
- package/build/lib/favicon/index.d.ts +1 -1
- package/build/lib/favicon/index.js +1 -1
- package/build/lib/file-router/diagnostic-reporter.d.ts +3 -0
- package/build/lib/file-router/diagnostic-reporter.d.ts.map +1 -0
- package/build/lib/file-router/diagnostic-reporter.js +18 -0
- package/build/lib/file-router/diagnostic-reporter.js.map +1 -0
- package/build/lib/file-router/file-router.d.ts +5 -3
- package/build/lib/file-router/file-router.d.ts.map +1 -1
- package/build/lib/file-router/file-router.js +5 -3
- package/build/lib/file-router/file-router.js.map +1 -1
- package/build/lib/file-router/index.d.ts +1 -1
- package/build/lib/file-router/index.js +1 -1
- package/build/lib/file-router/linter.d.ts +25 -2
- package/build/lib/file-router/linter.d.ts.map +1 -1
- package/build/lib/file-router/linter.js +44 -3
- package/build/lib/file-router/linter.js.map +1 -1
- package/build/lib/file-router/route.d.ts +1 -0
- package/build/lib/file-router/route.d.ts.map +1 -1
- package/build/lib/file-router/route.js +1 -1
- package/build/lib/file-router/route.js.map +1 -1
- package/build/lib/file-router/scan-tree.d.ts +20 -0
- package/build/lib/file-router/scan-tree.d.ts.map +1 -0
- package/build/lib/file-router/scan-tree.js +158 -0
- package/build/lib/file-router/scan-tree.js.map +1 -0
- package/build/lib/file-router/scan.d.ts +2 -2
- package/build/lib/file-router/scan.d.ts.map +1 -1
- package/build/lib/file-router/scan.js +26 -10
- package/build/lib/file-router/scan.js.map +1 -1
- package/build/lib/file-router/sidebar/index.d.ts +3 -0
- package/build/lib/file-router/sidebar/index.d.ts.map +1 -0
- package/build/lib/file-router/sidebar/index.js +4 -0
- package/build/lib/file-router/sidebar/index.js.map +1 -0
- package/build/lib/file-router/sidebar/sidebar-tree.d.ts +9 -0
- package/build/lib/file-router/sidebar/sidebar-tree.d.ts.map +1 -0
- package/build/lib/file-router/sidebar/sidebar-tree.js +85 -0
- package/build/lib/file-router/sidebar/sidebar-tree.js.map +1 -0
- package/build/lib/file-router/sidebar/types.d.ts +17 -0
- package/build/lib/file-router/sidebar/types.d.ts.map +1 -0
- package/build/lib/file-router/sidebar/types.js +2 -0
- package/build/lib/file-router/sidebar/types.js.map +1 -0
- package/build/lib/grafaid/_Nodes.d.ts +1 -1
- package/build/lib/grafaid/_Nodes.js +1 -1
- package/build/lib/grafaid/document/OperationTypeNode.d.ts +1 -1
- package/build/lib/grafaid/document/OperationTypeNode.js +1 -1
- package/build/lib/grafaid/document/kind.d.ts +1 -1
- package/build/lib/grafaid/document/kind.js +1 -1
- package/build/lib/grafaid/document.d.ts +4 -4
- package/build/lib/grafaid/document.js +6 -6
- package/build/lib/grafaid/grafaid.d.ts +4 -4
- package/build/lib/grafaid/grafaid.js +4 -4
- package/build/lib/grafaid/graphql.d.ts +2 -2
- package/build/lib/grafaid/graphql.js +2 -2
- package/build/lib/grafaid/http/__.d.ts +1 -1
- package/build/lib/grafaid/http/__.js +1 -1
- package/build/lib/grafaid/http/http.js +1 -1
- package/build/lib/grafaid/index.d.ts +1 -1
- package/build/lib/grafaid/index.js +1 -1
- package/build/lib/grafaid/schema/KindMap/_.d.ts +3 -3
- package/build/lib/grafaid/schema/KindMap/_.js +4 -4
- package/build/lib/grafaid/schema/KindMap/__.d.ts +2 -2
- package/build/lib/grafaid/schema/KindMap/__.js +1 -1
- package/build/lib/grafaid/schema/OperationType/__.d.ts +2 -2
- package/build/lib/grafaid/schema/OperationType/__.js +1 -1
- package/build/lib/grafaid/schema/RootDetails.d.ts +3 -3
- package/build/lib/grafaid/schema/RootDetails.js +2 -2
- package/build/lib/grafaid/schema/RootTypeMap.d.ts +2 -2
- package/build/lib/grafaid/schema/RootTypeMap.js +2 -2
- package/build/lib/grafaid/schema/nodes-like.d.ts +1 -1
- package/build/lib/grafaid/schema/nodes-like.js +1 -1
- package/build/lib/grafaid/schema/schema.d.ts +14 -14
- package/build/lib/grafaid/schema/schema.js +15 -15
- package/build/lib/grafaid/schema/type-kind-name.d.ts +1 -1
- package/build/lib/grafaid/schema/type-kind-name.js +1 -1
- package/build/lib/grafaid/schema/type.d.ts +1 -1
- package/build/lib/grafaid/schema/typeGuards.js +1 -1
- package/build/lib/grafaid-old/grafaid.d.ts +1 -1
- package/build/lib/grafaid-old/grafaid.js +1 -1
- package/build/lib/grafaid-old/index.d.ts +1 -1
- package/build/lib/grafaid-old/index.js +1 -1
- package/build/lib/graphql-change/graphql-change.d.ts +2 -2
- package/build/lib/graphql-change/graphql-change.d.ts.map +1 -1
- package/build/lib/graphql-change/graphql-change.js +1 -1
- package/build/lib/graphql-change/graphql-change.js.map +1 -1
- package/build/lib/graphql-change/index.d.ts +1 -1
- package/build/lib/graphql-change/index.js +1 -1
- package/build/lib/graphql-changeset/graphql-changeset.d.ts +2 -2
- package/build/lib/graphql-changeset/graphql-changeset.d.ts.map +1 -1
- package/build/lib/graphql-changeset/index.d.ts +1 -1
- package/build/lib/graphql-changeset/index.js +1 -1
- package/build/lib/graphql-schema-loader/graphql-schema-loader.d.ts +1 -1
- package/build/lib/graphql-schema-loader/graphql-schema-loader.d.ts.map +1 -1
- package/build/lib/graphql-schema-loader/graphql-schema-loader.js +1 -1
- package/build/lib/graphql-schema-loader/graphql-schema-loader.js.map +1 -1
- package/build/lib/graphql-schema-loader/index.d.ts +1 -1
- package/build/lib/graphql-schema-loader/index.js +1 -1
- package/build/lib/hono-aid/hono-aid.d.ts +1 -1
- package/build/lib/hono-aid/hono-aid.d.ts.map +1 -1
- package/build/lib/hono-aid/index.d.ts +1 -1
- package/build/lib/hono-aid/index.js +1 -1
- package/build/lib/kit-temp.d.ts +6 -0
- package/build/lib/kit-temp.d.ts.map +1 -1
- package/build/lib/kit-temp.js +3 -0
- package/build/lib/kit-temp.js.map +1 -1
- package/build/lib/react-router-aid/get-paths-patterns.d.ts +1 -1
- package/build/lib/react-router-aid/get-paths-patterns.d.ts.map +1 -1
- package/build/lib/react-router-aid/index.d.ts +1 -1
- package/build/lib/react-router-aid/index.js +1 -1
- package/build/lib/react-router-aid/react-router-aid.d.ts +2 -2
- package/build/lib/react-router-aid/react-router-aid.d.ts.map +1 -1
- package/build/lib/react-router-aid/react-router-aid.js +1 -1
- package/build/lib/react-router-loader/react-router-loader.js +1 -1
- package/build/lib/stack-processor/index.d.ts +1 -1
- package/build/lib/stack-processor/index.js +1 -1
- package/build/lib/superjson-codec/codec.d.ts +1 -1
- package/build/lib/superjson-codec/codec.d.ts.map +1 -1
- package/build/lib/superjson-codec/codecs/graphql-schema.d.ts +2 -2
- package/build/lib/superjson-codec/codecs/graphql-schema.d.ts.map +1 -1
- package/build/lib/superjson-codec/codecs/graphql-schema.js +2 -2
- package/build/lib/superjson-codec/codecs/graphql-schema.js.map +1 -1
- package/build/lib/superjson-codec/exports.d.ts +2 -2
- package/build/lib/superjson-codec/exports.js +2 -2
- package/build/lib/superjson-codec/index.d.ts +1 -1
- package/build/lib/superjson-codec/index.js +1 -1
- package/build/lib/tree/index.d.ts +3 -0
- package/build/lib/tree/index.d.ts.map +1 -0
- package/build/lib/tree/index.js +2 -0
- package/build/lib/tree/index.js.map +1 -0
- package/build/lib/tree/tree.d.ts +62 -0
- package/build/lib/tree/tree.d.ts.map +1 -0
- package/build/lib/tree/tree.js +134 -0
- package/build/lib/tree/tree.js.map +1 -0
- package/build/lib/vite-plugin-config/vite-plugin-config.d.ts +1 -1
- package/build/lib/vite-plugin-config/vite-plugin-config.d.ts.map +1 -1
- package/build/lib/vite-plugin-mdx/index.d.ts +1 -1
- package/build/lib/vite-plugin-mdx/index.d.ts.map +1 -1
- package/build/lib/vite-plugin-mdx/index.js +1 -3
- package/build/lib/vite-plugin-mdx/index.js.map +1 -1
- package/build/lib/vite-plugin-mdx/vite-plugin-mdx.d.ts +22 -0
- package/build/lib/vite-plugin-mdx/vite-plugin-mdx.d.ts.map +1 -1
- package/build/lib/vite-plugin-mdx/vite-plugin-mdx.js +55 -71
- package/build/lib/vite-plugin-mdx/vite-plugin-mdx.js.map +1 -1
- package/build/lib/vite-plugins/index.d.ts +1 -1
- package/build/lib/vite-plugins/index.js +1 -1
- package/build/lib/vite-plugins/vite-plugins.d.ts +1 -1
- package/build/lib/vite-plugins/vite-plugins.js +1 -1
- package/build/lib/vite-virtual/debug.d.ts +3 -0
- package/build/lib/vite-virtual/debug.d.ts.map +1 -0
- package/build/lib/vite-virtual/debug.js +3 -0
- package/build/lib/vite-virtual/debug.js.map +1 -0
- package/build/lib/vite-virtual/hooks.d.ts +1 -1
- package/build/lib/vite-virtual/hooks.d.ts.map +1 -1
- package/build/lib/vite-virtual/identified-loader.d.ts +3 -3
- package/build/lib/vite-virtual/identified-loader.d.ts.map +1 -1
- package/build/lib/vite-virtual/identified-loader.js +2 -2
- package/build/lib/vite-virtual/identified-loader.js.map +1 -1
- package/build/lib/vite-virtual/identifier.js +1 -1
- package/build/lib/vite-virtual/index.d.ts +1 -1
- package/build/lib/vite-virtual/index.js +1 -1
- package/build/lib/vite-virtual/vite-virtual.d.ts +3 -3
- package/build/lib/vite-virtual/vite-virtual.js +3 -3
- package/build/package-paths.d.ts +7 -0
- package/build/package-paths.d.ts.map +1 -1
- package/build/package-paths.js +12 -1
- package/build/package-paths.js.map +1 -1
- package/build/project-data.d.ts +4 -20
- package/build/project-data.d.ts.map +1 -1
- package/build/singletons/debug.d.ts +3 -0
- package/build/singletons/debug.d.ts.map +1 -0
- package/build/singletons/debug.js +3 -0
- package/build/singletons/debug.js.map +1 -0
- package/build/singletons/superjson.d.ts +1 -1
- package/build/singletons/superjson.d.ts.map +1 -1
- package/build/singletons/superjson.js +2 -2
- package/build/singletons/superjson.js.map +1 -1
- package/build/template/components/ArgumentListAnnotation.jsx +1 -1
- package/build/template/components/ArgumentListAnnotation.jsx.map +1 -1
- package/build/template/components/Changelog.d.ts +1 -1
- package/build/template/components/Changelog.jsx +2 -2
- package/build/template/components/Changelog.jsx.map +1 -1
- package/build/template/components/DeprecationReason.d.ts +1 -1
- package/build/template/components/DeprecationReason.d.ts.map +1 -1
- package/build/template/components/Description.d.ts +1 -1
- package/build/template/components/Description.d.ts.map +1 -1
- package/build/template/components/Field.d.ts +1 -1
- package/build/template/components/Field.d.ts.map +1 -1
- package/build/template/components/Field.jsx +1 -1
- package/build/template/components/Field.jsx.map +1 -1
- package/build/template/components/FieldList.d.ts +1 -1
- package/build/template/components/FieldList.d.ts.map +1 -1
- package/build/template/components/FieldList.jsx +1 -1
- package/build/template/components/FieldList.jsx.map +1 -1
- package/build/template/components/FieldListSection.jsx +1 -1
- package/build/template/components/FieldListSection.jsx.map +1 -1
- package/build/template/components/Markdown.jsx +1 -1
- package/build/template/components/Markdown.jsx.map +1 -1
- package/build/template/components/Sidebar.d.ts +2 -2
- package/build/template/components/Sidebar.d.ts.map +1 -1
- package/build/template/components/Sidebar.jsx +11 -7
- package/build/template/components/Sidebar.jsx.map +1 -1
- package/build/template/components/TypeIndex.jsx +1 -1
- package/build/template/components/TypeIndex.jsx.map +1 -1
- package/build/template/components/graphql/type-kind-icon.d.ts +2 -2
- package/build/template/components/graphql/type-kind-icon.d.ts.map +1 -1
- package/build/template/components/graphql/type-kind-icon.jsx +1 -1
- package/build/template/components/graphql/type-link.d.ts +1 -1
- package/build/template/components/graphql/type-link.d.ts.map +1 -1
- package/build/template/components/graphql/type-link.jsx +2 -2
- package/build/template/components/graphql/type-link.jsx.map +1 -1
- package/build/template/entry.client.jsx +1 -1
- package/build/template/entry.client.jsx.map +1 -1
- package/build/template/routes/changelog.d.ts +1 -1
- package/build/template/routes/changelog.jsx +2 -2
- package/build/template/routes/changelog.jsx.map +1 -1
- package/build/template/routes/index.d.ts +1 -1
- package/build/template/routes/index.d.ts.map +1 -1
- package/build/template/routes/index.jsx +1 -1
- package/build/template/routes/index.jsx.map +1 -1
- package/build/template/routes/reference.$type.$field.jsx +3 -3
- package/build/template/routes/reference.$type.$field.jsx.map +1 -1
- package/build/template/routes/reference.$type.jsx +2 -2
- package/build/template/routes/reference.$type.jsx.map +1 -1
- package/build/template/routes/reference.jsx +2 -2
- package/build/template/routes/reference.jsx.map +1 -1
- package/build/template/routes/root.d.ts +1 -1
- package/build/template/routes/root.d.ts.map +1 -1
- package/build/template/routes/root.jsx +3 -3
- package/build/template/routes/root.jsx.map +1 -1
- package/build/template/server/app.d.ts +1 -1
- package/build/template/server/app.d.ts.map +1 -1
- package/build/template/server/app.js +5 -4
- package/build/template/server/app.js.map +1 -1
- package/build/template/server/main.js +3 -3
- package/build/template/server/manifest.d.ts +1 -1
- package/build/template/server/manifest.d.ts.map +1 -1
- package/build/template/server/render-page.d.ts +1 -1
- package/build/template/server/render-page.d.ts.map +1 -1
- package/build/template/server/render-page.jsx +2 -2
- package/build/template/server/ssg/generate.d.ts +1 -1
- package/build/template/server/ssg/generate.d.ts.map +1 -1
- package/build/template/server/ssg/generate.js +3 -3
- package/build/template/server/ssg/generate.js.map +1 -1
- package/build/template/server/ssg/get-route-paths.js +2 -2
- package/build/template/server/ssg/get-route-paths.js.map +1 -1
- package/package.json +70 -54
- package/src/api/api.ts +3 -3
- package/src/api/builder/builder.ts +3 -3
- package/src/api/builder/index.ts +1 -1
- package/src/api/config/config.ts +4 -4
- package/src/api/config/configurator.ts +27 -5
- package/src/api/config/define.ts +1 -1
- package/src/api/config/index.ts +1 -1
- package/src/api/config/load.ts +74 -23
- package/src/api/config/merge.ts +2 -2
- package/src/api/config-resolver/config-resolver.ts +2 -2
- package/src/api/config-resolver/index.ts +1 -1
- package/src/api/config-resolver/resolve.ts +8 -5
- package/src/api/config-resolver/vite.ts +3 -3
- package/src/api/index.ts +1 -1
- package/src/api/schema/data-sources/data-sources.ts +3 -3
- package/src/api/schema/data-sources/index.ts +1 -1
- package/src/api/schema/data-sources/memory/memory.ts +4 -4
- package/src/api/schema/data-sources/schema-directory/file-name-expression/index.ts +1 -1
- package/src/api/schema/data-sources/schema-directory/schema-directory.ts +7 -7
- package/src/api/schema/data-sources/schema-file/schema-file.ts +4 -4
- package/src/api/schema/index.ts +1 -1
- package/src/api/schema/read.ts +2 -2
- package/src/api/schema/schema.ts +3 -3
- package/src/api/schema-augmentation/augmentations/description.ts +3 -3
- package/src/api/schema-augmentation/index.ts +1 -1
- package/src/api/schema-augmentation/schema-augmentation.ts +2 -2
- package/src/api/schema-augmentation/target.ts +1 -1
- package/src/api/singletons/markdown/index.ts +1 -1
- package/src/api/vite/log-filters.ts +1 -1
- package/src/api/vite/logger.ts +23 -7
- package/src/api/vite/plugins/build.ts +6 -6
- package/src/api/vite/plugins/core.ts +177 -245
- package/src/api/vite/plugins/main.ts +5 -5
- package/src/api/vite/plugins/pages-tree.ts +186 -0
- package/src/api/vite/plugins/serve.ts +52 -29
- package/src/api/vite/vi.ts +2 -2
- package/src/cli/_/self-contained-mode.ts +85 -0
- package/src/cli/commands/build.ts +2 -2
- package/src/cli/commands/dev.ts +3 -4
- package/src/cli/commands/open.ts +4 -4
- package/src/dep/graphql-inspector/index.ts +1 -1
- package/src/dep/hono/hono.ts +1 -1
- package/src/dep/hono/index.ts +1 -1
- package/src/dep/superjson/index.ts +1 -1
- package/src/dep/tiny-globby/index.ts +1 -1
- package/src/dep/vite/index.ts +1 -1
- package/src/exports/index.ts +1 -1
- package/src/exports/polen.ts +3 -3
- package/src/lib/apple-touch-icon/index.ts +1 -1
- package/src/lib/debug/debug.ts +45 -18
- package/src/lib/debug/environment-variable.ts +28 -7
- package/src/lib/debug/index.ts +1 -1
- package/src/lib/errors/ContextualAggregateError.ts +1 -1
- package/src/lib/errors/ContextualError.ts +1 -1
- package/src/lib/errors/ErrorInternal.ts +2 -2
- package/src/lib/errors/errors.ts +4 -4
- package/src/lib/errors/index.ts +1 -1
- package/src/lib/errors/types.ts +1 -1
- package/src/lib/favicon/index.ts +1 -1
- package/src/lib/file-router/diagnostic-reporter.ts +22 -0
- package/src/lib/file-router/file-router.ts +5 -3
- package/src/lib/file-router/index.test.ts +2 -2
- package/src/lib/file-router/index.ts +1 -1
- package/src/lib/file-router/linter.test.ts +115 -0
- package/src/lib/file-router/linter.ts +78 -4
- package/src/lib/file-router/route.ts +2 -1
- package/src/lib/file-router/scan-tree.test.ts +189 -0
- package/src/lib/file-router/scan-tree.ts +205 -0
- package/src/lib/file-router/scan.ts +27 -12
- package/src/lib/file-router/sidebar/index.ts +3 -0
- package/src/lib/file-router/sidebar/sidebar-tree.test.ts +123 -0
- package/src/lib/file-router/sidebar/sidebar-tree.ts +110 -0
- package/src/lib/file-router/sidebar/types.ts +19 -0
- package/src/lib/grafaid/_Nodes.ts +1 -1
- package/src/lib/grafaid/document/OperationTypeNode.ts +1 -1
- package/src/lib/grafaid/document/kind.ts +1 -1
- package/src/lib/grafaid/document.ts +6 -6
- package/src/lib/grafaid/grafaid.ts +4 -4
- package/src/lib/grafaid/graphql.ts +3 -3
- package/src/lib/grafaid/http/__.ts +1 -1
- package/src/lib/grafaid/http/http.ts +1 -1
- package/src/lib/grafaid/index.ts +1 -1
- package/src/lib/grafaid/schema/KindMap/_.ts +6 -6
- package/src/lib/grafaid/schema/KindMap/__.ts +2 -2
- package/src/lib/grafaid/schema/OperationType/__.ts +2 -2
- package/src/lib/grafaid/schema/RootDetails.ts +3 -3
- package/src/lib/grafaid/schema/RootTypeMap.ts +2 -2
- package/src/lib/grafaid/schema/nodes-like.ts +2 -2
- package/src/lib/grafaid/schema/schema.ts +15 -15
- package/src/lib/grafaid/schema/type-kind-name.ts +1 -1
- package/src/lib/grafaid/schema/type.ts +1 -1
- package/src/lib/grafaid/schema/typeGuards.ts +1 -1
- package/src/lib/grafaid-old/grafaid.ts +1 -1
- package/src/lib/grafaid-old/index.ts +1 -1
- package/src/lib/graphql-change/graphql-change.ts +2 -2
- package/src/lib/graphql-change/index.ts +1 -1
- package/src/lib/graphql-changeset/graphql-changeset.ts +2 -2
- package/src/lib/graphql-changeset/index.ts +1 -1
- package/src/lib/graphql-schema-loader/graphql-schema-loader.ts +1 -1
- package/src/lib/graphql-schema-loader/index.ts +1 -1
- package/src/lib/hono-aid/hono-aid.ts +1 -1
- package/src/lib/hono-aid/index.ts +1 -1
- package/src/lib/kit-temp.ts +10 -0
- package/src/lib/react-router-aid/get-paths-patterns.ts +1 -1
- package/src/lib/react-router-aid/index.ts +1 -1
- package/src/lib/react-router-aid/react-router-aid.ts +2 -2
- package/src/lib/react-router-loader/react-router-loader.ts +1 -1
- package/src/lib/stack-processor/index.ts +1 -1
- package/src/lib/superjson-codec/codec.ts +1 -1
- package/src/lib/superjson-codec/codecs/graphql-schema.ts +2 -2
- package/src/lib/superjson-codec/exports.ts +2 -2
- package/src/lib/superjson-codec/index.ts +1 -1
- package/src/lib/tree/index.ts +2 -0
- package/src/lib/tree/tree.test.ts +117 -0
- package/src/lib/tree/tree.ts +183 -0
- package/src/lib/vite-plugin-config/vite-plugin-config.ts +1 -1
- package/src/lib/vite-plugin-mdx/index.ts +1 -2
- package/src/lib/vite-plugin-mdx/vite-plugin-mdx.ts +80 -70
- package/src/lib/vite-plugins/index.ts +1 -1
- package/src/lib/vite-plugins/vite-plugins.ts +1 -1
- package/src/lib/vite-virtual/debug.ts +3 -0
- package/src/lib/vite-virtual/hooks.ts +1 -1
- package/src/lib/vite-virtual/identified-loader.ts +5 -5
- package/src/lib/vite-virtual/identifier.ts +1 -1
- package/src/lib/vite-virtual/index.ts +1 -1
- package/src/lib/vite-virtual/vite-virtual.ts +3 -3
- package/src/package-paths.ts +22 -1
- package/src/project-data.ts +4 -24
- package/src/singletons/debug.ts +3 -0
- package/src/singletons/superjson.ts +2 -2
- package/src/template/components/ArgumentListAnnotation.tsx +1 -1
- package/src/template/components/Changelog.tsx +6 -6
- package/src/template/components/DeprecationReason.tsx +1 -1
- package/src/template/components/Description.tsx +1 -1
- package/src/template/components/Field.tsx +1 -1
- package/src/template/components/FieldList.tsx +1 -1
- package/src/template/components/FieldListSection.tsx +1 -1
- package/src/template/components/Markdown.tsx +1 -1
- package/src/template/components/Sidebar.tsx +16 -11
- package/src/template/components/TypeIndex.tsx +1 -1
- package/src/template/components/graphql/type-kind-icon.tsx +3 -3
- package/src/template/components/graphql/type-kind-tokens.ts +1 -1
- package/src/template/components/graphql/type-link.tsx +2 -2
- package/src/template/entry.client.tsx +1 -1
- package/src/template/routes/changelog.tsx +2 -2
- package/src/template/routes/index.tsx +1 -1
- package/src/template/routes/reference.$type.$field.tsx +3 -3
- package/src/template/routes/reference.$type.tsx +2 -2
- package/src/template/routes/reference.tsx +2 -2
- package/src/template/routes/root.tsx +4 -5
- package/src/template/server/app.ts +6 -4
- package/src/template/server/main.ts +3 -3
- package/src/template/server/manifest.ts +1 -1
- package/src/template/server/render-page.tsx +4 -4
- package/src/template/server/ssg/generate.ts +4 -4
- package/src/template/server/ssg/get-route-paths.ts +2 -2
- package/build/lib/file-router/sidebar.d.ts +0 -2
- package/build/lib/file-router/sidebar.d.ts.map +0 -1
- package/build/lib/file-router/sidebar.js +0 -2
- package/build/lib/file-router/sidebar.js.map +0 -1
- package/src/lib/file-router/sidebar.ts +0 -0
@@ -1,108 +1,131 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import
|
4
|
-
import {
|
1
|
+
import { VitePluginSelfContainedMode } from '#cli/_/self-contained-mode';
|
2
|
+
import { reportDiagnostics } from '#lib/file-router/diagnostic-reporter';
|
3
|
+
import { FileRouter } from '#lib/file-router/index';
|
4
|
+
import { Tree } from '#lib/tree/index';
|
5
|
+
import { ViteVirtual } from '#lib/vite-virtual/index';
|
6
|
+
import { debug } from '#singletons/debug';
|
7
|
+
import { Json, Str } from '@wollybeard/kit';
|
5
8
|
import jsesc from 'jsesc';
|
6
|
-
import
|
7
|
-
import {
|
8
|
-
import {
|
9
|
-
import {
|
10
|
-
import {
|
11
|
-
import {
|
12
|
-
const
|
13
|
-
const
|
14
|
-
const
|
15
|
-
const
|
9
|
+
import { superjson } from "../../../singletons/superjson.js";
|
10
|
+
import { SchemaAugmentation } from "../../schema-augmentation/index.js";
|
11
|
+
import { Schema } from "../../schema/index.js";
|
12
|
+
import { logger } from "../logger.js";
|
13
|
+
import { polenVirtual } from "../vi.js";
|
14
|
+
import { createPagesTreePlugin, getRouteTree } from "./pages-tree.js";
|
15
|
+
const _debug = debug.sub(`vite-plugin-core`);
|
16
|
+
const viTemplateVariables = polenVirtual([`template`, `variables`]);
|
17
|
+
const viTemplateSchemaAugmentations = polenVirtual([`template`, `schema-augmentations`]);
|
18
|
+
const viProjectData = polenVirtual([`project`, `data`]);
|
16
19
|
export const Core = (config) => {
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
20
|
+
// State for current pages data (updated by pages plugin)
|
21
|
+
let currentPagesData = null;
|
22
|
+
let currentTreeData = null;
|
23
|
+
let viteDevServer = null;
|
24
|
+
// Schema cache management
|
25
|
+
let schemaCache = null;
|
26
|
+
const readSchema = async () => {
|
27
|
+
if (schemaCache === null) {
|
28
|
+
const schema = await Schema.readOrThrow({
|
29
|
+
...config.schema,
|
30
|
+
projectRoot: config.paths.project.rootDir,
|
31
|
+
});
|
32
|
+
// todo: augmentations scoped to a version
|
33
|
+
schema?.versions.forEach(version => {
|
34
|
+
SchemaAugmentation.apply(version.after, config.schemaAugmentations);
|
35
|
+
});
|
36
|
+
schemaCache = schema;
|
37
|
+
}
|
38
|
+
return schemaCache;
|
39
|
+
};
|
40
|
+
const plugins = [];
|
41
|
+
// Note: The main use for this right now is to resolve the react imports
|
42
|
+
// from the mdx vite plugin which have to go through the Polen exports since Polen keeps those deps bundled.
|
43
|
+
//
|
44
|
+
// If we manage to get the mdx vite plugin that defers JSX transform to Rolldown then we can remove this!
|
45
|
+
//
|
46
|
+
if (config.advanced.isSelfContainedMode) {
|
47
|
+
plugins.push(VitePluginSelfContainedMode({
|
48
|
+
projectDirPathExp: config.paths.project.rootDir,
|
49
|
+
}));
|
50
|
+
}
|
32
51
|
return [
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
// const htmlString = await Markdown.parse(markdownString)
|
63
|
-
// const code = `export default ${JSON.stringify(htmlString)}`
|
64
|
-
// return code
|
65
|
-
// }
|
66
|
-
// return null
|
67
|
-
// },
|
68
|
-
// },
|
52
|
+
...plugins,
|
53
|
+
// Self-contained pages plugin
|
54
|
+
...createPagesTreePlugin({
|
55
|
+
config,
|
56
|
+
onPagesChange: (pages) => {
|
57
|
+
currentPagesData = pages;
|
58
|
+
// Invalidate project data virtual module to regenerate navigation/sidebar
|
59
|
+
if (viteDevServer) {
|
60
|
+
const projectDataModule = viteDevServer.moduleGraph.getModuleById(viProjectData.resolved);
|
61
|
+
if (projectDataModule) {
|
62
|
+
viteDevServer.moduleGraph.invalidateModule(projectDataModule);
|
63
|
+
}
|
64
|
+
}
|
65
|
+
},
|
66
|
+
onTreeChange: (tree) => {
|
67
|
+
currentTreeData = tree;
|
68
|
+
},
|
69
|
+
}),
|
70
|
+
/**
|
71
|
+
* If a `polen*` import is encountered from the user's project, resolve it to the currently
|
72
|
+
* running source code of Polen rather than the user's node_modules.
|
73
|
+
*
|
74
|
+
* Useful for the following cases:
|
75
|
+
*
|
76
|
+
* 1. Main: Using Polen CLI from the source code against some local example/development project.
|
77
|
+
*
|
78
|
+
* 2. Secondary: Using Polen CLI on a project that does not have Polen installed.
|
79
|
+
* (User would likely not want to do this because they would not be able to achieve type safety)
|
80
|
+
*/
|
69
81
|
{
|
70
|
-
name: `polen:
|
82
|
+
name: `polen:internal-import-alias`,
|
71
83
|
resolveId(id, importer) {
|
72
|
-
|
84
|
+
const d = debug.sub(`vite-plugin:internal-import-alias`);
|
85
|
+
const isPolenImporter = Boolean(importer
|
86
|
+
&& (importer.startsWith(config.paths.framework.sourceDir)
|
87
|
+
|| polenVirtual.includes(importer)
|
88
|
+
/*
|
89
|
+
TODO: can we make index.html be in the source dir?
|
90
|
+
Example case:
|
91
|
+
|
92
|
+
POLEN VITE_PLUGIN_INTERNAL_IMPORT_ALIAS CHECK {
|
93
|
+
id: '#singletons/superjson',
|
94
|
+
importer: '/Users/jasonkuhrt/projects/the-guild-org/polen/index.html',
|
95
|
+
isPolenImporter: false
|
96
|
+
}
|
97
|
+
*/
|
98
|
+
|| (importer.startsWith(config.paths.framework.rootDir) && importer.endsWith(`index.html`))));
|
99
|
+
if (!isPolenImporter)
|
73
100
|
return null;
|
101
|
+
d(`check candidate`, { id, importer, isPolenImporter });
|
74
102
|
const find = Str.pattern(/^#(?<path>.+)/);
|
75
103
|
const match = Str.match(id, find);
|
76
104
|
if (!match)
|
77
105
|
return null;
|
78
|
-
const
|
79
|
-
|
106
|
+
const to = `${config.paths.framework.sourceDir}/${match.groups.path}${config.paths.framework.sourceExtension}`;
|
107
|
+
d(`did resolve`, { from: id, to });
|
108
|
+
return to;
|
80
109
|
},
|
81
110
|
},
|
82
111
|
{
|
83
112
|
name: `polen:core`,
|
113
|
+
configureServer(server) {
|
114
|
+
viteDevServer = server;
|
115
|
+
},
|
84
116
|
config(_, { command }) {
|
85
117
|
// isServing = command === `serve`
|
86
118
|
return {
|
87
119
|
root: config.paths.framework.rootDir,
|
88
120
|
define: {
|
89
|
-
__BUILDING__: Json.
|
90
|
-
__SERVING__: Json.
|
91
|
-
__COMMAND__: Json.
|
92
|
-
__BUILD_ARCHITECTURE__: Json.
|
93
|
-
__BUILD_ARCHITECTURE_SSG__: Json.
|
94
|
-
},
|
95
|
-
server: {
|
96
|
-
port: 3000,
|
121
|
+
__BUILDING__: Json.encode(command === `build`),
|
122
|
+
__SERVING__: Json.encode(command === `serve`),
|
123
|
+
__COMMAND__: Json.encode(command),
|
124
|
+
__BUILD_ARCHITECTURE__: Json.encode(config.build.architecture),
|
125
|
+
__BUILD_ARCHITECTURE_SSG__: Json.encode(config.build.architecture === `ssg`),
|
97
126
|
},
|
98
127
|
customLogger: logger,
|
99
128
|
esbuild: false,
|
100
|
-
// oxc: {
|
101
|
-
// jsx: {
|
102
|
-
// runtime: 'automatic',
|
103
|
-
// importSource: 'react',
|
104
|
-
// },
|
105
|
-
// },
|
106
129
|
build: {
|
107
130
|
target: `esnext`,
|
108
131
|
assetsDir: config.paths.project.relative.build.relative.assets,
|
@@ -135,49 +158,75 @@ export const Core = (config) => {
|
|
135
158
|
}, {
|
136
159
|
identifier: viProjectData,
|
137
160
|
async loader() {
|
161
|
+
_debug(`loadingViProjectDataVirtualModule`);
|
138
162
|
// todo: parallel
|
139
163
|
const schema = await readSchema();
|
140
|
-
|
164
|
+
// Get pages data from the pages plugin or load initially
|
165
|
+
if (!currentPagesData) {
|
166
|
+
_debug(`loadingPagesDataInitially`);
|
167
|
+
currentPagesData = await FileRouter.scan({
|
168
|
+
dir: config.paths.project.absolute.pages,
|
169
|
+
glob: `**/*.{md,mdx}`,
|
170
|
+
});
|
171
|
+
// Report any diagnostics from initial scan
|
172
|
+
reportDiagnostics(currentPagesData.diagnostics);
|
173
|
+
}
|
174
|
+
if (!currentTreeData) {
|
175
|
+
_debug(`loadingTreeDataInitially`);
|
176
|
+
currentTreeData = await getRouteTree(config);
|
177
|
+
}
|
178
|
+
const pagesScanResult = currentPagesData;
|
179
|
+
const routeTree = currentTreeData;
|
180
|
+
_debug(`usingPageRoutesFromPagesPlugin`, pagesScanResult.routes.length);
|
141
181
|
const siteNavigationItems = [];
|
142
182
|
//
|
143
183
|
// ━━ Build Navbar
|
144
184
|
//
|
145
|
-
//
|
146
|
-
const
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
185
|
+
// Process first-level children as navigation items
|
186
|
+
for (const child of routeTree.children) {
|
187
|
+
if (child.value.type === 'directory') {
|
188
|
+
// Check if this directory has an index file
|
189
|
+
const hasIndex = child.children.some(c => c.value.type === 'file' && c.value.name === 'index');
|
190
|
+
if (hasIndex) {
|
191
|
+
const pathExp = FileRouter.pathToExpression([child.value.name]);
|
192
|
+
const title = Str.titlizeSlug(child.value.name);
|
193
|
+
siteNavigationItems.push({
|
194
|
+
pathExp: pathExp.startsWith('/') ? pathExp.slice(1) : pathExp,
|
195
|
+
title,
|
196
|
+
});
|
197
|
+
}
|
198
|
+
}
|
199
|
+
else if (child.value.type === 'file' && child.value.name !== 'index') {
|
200
|
+
const pathExp = FileRouter.pathToExpression([child.value.name]);
|
201
|
+
const title = Str.titlizeSlug(child.value.name);
|
202
|
+
siteNavigationItems.push({
|
203
|
+
pathExp: pathExp.startsWith('/') ? pathExp.slice(1) : pathExp,
|
204
|
+
title,
|
205
|
+
});
|
165
206
|
}
|
166
207
|
}
|
167
208
|
// ━ Schema presence causes adding some navbar items
|
168
209
|
if (schema) {
|
169
|
-
siteNavigationItems.push({ pathExp:
|
210
|
+
siteNavigationItems.push({ pathExp: `reference`, title: `Reference` });
|
170
211
|
if (schema.versions.length > 1) {
|
171
|
-
siteNavigationItems.push({ pathExp:
|
212
|
+
siteNavigationItems.push({ pathExp: `changelog`, title: `Changelog` });
|
172
213
|
}
|
173
214
|
}
|
174
215
|
//
|
175
216
|
// ━━ Build Sidebar
|
176
217
|
//
|
177
218
|
const sidebarIndex = {};
|
178
|
-
|
179
|
-
|
180
|
-
|
219
|
+
// Build sidebar for each top-level directory
|
220
|
+
for (const child of routeTree.children) {
|
221
|
+
if (child.value.type === 'directory') {
|
222
|
+
const pathExp = `/${child.value.name}`;
|
223
|
+
// Create a subtree starting from this directory
|
224
|
+
const subtree = Tree.node(child.value, child.children);
|
225
|
+
// Pass the directory name as base path so paths are built correctly
|
226
|
+
const sidebar = FileRouter.Sidebar.buildFromTree(subtree, [child.value.name]);
|
227
|
+
_debug(`Built sidebar for ${pathExp}:`, sidebar);
|
228
|
+
sidebarIndex[pathExp] = sidebar;
|
229
|
+
}
|
181
230
|
}
|
182
231
|
//
|
183
232
|
// ━━ Put It All together
|
@@ -202,112 +251,14 @@ export const Core = (config) => {
|
|
202
251
|
};
|
203
252
|
const projectDataCode = jsesc(superjson.stringify(projectData));
|
204
253
|
const content = `
|
205
|
-
import { superjson } from '#singletons/superjson
|
254
|
+
import { superjson } from '#singletons/superjson'
|
206
255
|
|
207
256
|
export const PROJECT_DATA = superjson.parse('${projectDataCode}')
|
208
257
|
`;
|
209
258
|
return content;
|
210
259
|
},
|
211
|
-
}, {
|
212
|
-
identifier: viProjectPages,
|
213
|
-
async loader() {
|
214
|
-
const pagesScanResult = await scanPageRoutes();
|
215
|
-
const $ = {
|
216
|
-
pages: `pages`,
|
217
|
-
};
|
218
|
-
const s = Str.Builder();
|
219
|
-
s `export const ${$.pages} = []`;
|
220
|
-
// todo: kit fs should accept parsed file paths
|
221
|
-
for (const route of pagesScanResult.routes) {
|
222
|
-
const filePathExp = Path.format(route.file.path.absolute);
|
223
|
-
const pathExp = FileRouter.routeToPathExpression(route);
|
224
|
-
const ident = Str.Case.camel(`page ` + Str.titlizeSlug(pathExp));
|
225
|
-
s `
|
226
|
-
import ${ident} from '${filePathExp}'
|
227
|
-
|
228
|
-
${$.pages}.push({
|
229
|
-
path: '${pathExp}',
|
230
|
-
Component: ${ident}
|
231
|
-
})
|
232
|
-
`;
|
233
|
-
}
|
234
|
-
return s.render();
|
235
|
-
},
|
236
260
|
}),
|
237
261
|
},
|
238
262
|
];
|
239
263
|
};
|
240
|
-
/**
|
241
|
-
* Helper function to build sidebar items recursively
|
242
|
-
*/
|
243
|
-
const buildSidebar = (pages, basePath) => {
|
244
|
-
const navs = [];
|
245
|
-
const sections = Idx.create({ key: (item) => item.pathExp });
|
246
|
-
// Items
|
247
|
-
for (const page of pages) {
|
248
|
-
const pageRelative = FileRouter.makeRelativeUnsafe(page, basePath);
|
249
|
-
if (FileRouter.routeIsRootLevel(pageRelative)) {
|
250
|
-
continue;
|
251
|
-
}
|
252
|
-
if (FileRouter.routeIsTopLevel(pageRelative)) {
|
253
|
-
// Section (index)
|
254
|
-
if (FileRouter.routeIsFromIndexFile(pageRelative)) {
|
255
|
-
const sectionPath = page.logical.path;
|
256
|
-
const sectionPathExp = FileRouter.pathToExpression(sectionPath);
|
257
|
-
let section;
|
258
|
-
section = sections.getAt(sectionPathExp);
|
259
|
-
if (!section) {
|
260
|
-
const sectionTitle = Str.titlizeSlug(FileRouter.pathToExpression(pageRelative.logical.path));
|
261
|
-
section = {
|
262
|
-
type: `SidebarSection`,
|
263
|
-
title: sectionTitle,
|
264
|
-
pathExp: sectionPathExp,
|
265
|
-
isNavToo: false,
|
266
|
-
navs: [],
|
267
|
-
};
|
268
|
-
sections.set(section);
|
269
|
-
}
|
270
|
-
section.isNavToo = true;
|
271
|
-
continue;
|
272
|
-
}
|
273
|
-
// Nav
|
274
|
-
navs.push(pageToSidebarNav(page, basePath));
|
275
|
-
continue;
|
276
|
-
}
|
277
|
-
// Section (sub-page)
|
278
|
-
if (FileRouter.routeIsSubLevel(pageRelative)) {
|
279
|
-
const sectionRelativePath = [pageRelative.logical.path[0]];
|
280
|
-
const sectionPath = [...basePath, ...sectionRelativePath];
|
281
|
-
const sectionPathExp = FileRouter.pathToExpression(sectionPath);
|
282
|
-
let section;
|
283
|
-
section = sections.getAt(sectionPathExp);
|
284
|
-
if (!section) {
|
285
|
-
const sectionTitle = Str.titlizeSlug(FileRouter.pathToExpression(sectionRelativePath));
|
286
|
-
section = {
|
287
|
-
type: `SidebarSection`,
|
288
|
-
title: sectionTitle,
|
289
|
-
pathExp: sectionPathExp,
|
290
|
-
isNavToo: false,
|
291
|
-
navs: [],
|
292
|
-
};
|
293
|
-
sections.set(section);
|
294
|
-
}
|
295
|
-
section.navs.push(pageToSidebarNav(page, sectionPath));
|
296
|
-
}
|
297
|
-
}
|
298
|
-
const items = [...navs, ...sections.toArray()];
|
299
|
-
return {
|
300
|
-
items,
|
301
|
-
};
|
302
|
-
};
|
303
|
-
const pageToSidebarNav = (page, basePath) => {
|
304
|
-
const pagePathExp = FileRouter.routeToPathExpression(page);
|
305
|
-
const pageRelative = FileRouter.makeRelativeUnsafe(page, basePath);
|
306
|
-
const pageRelativePathExp = FileRouter.routeToPathExpression(pageRelative);
|
307
|
-
return {
|
308
|
-
type: `SidebarItem`,
|
309
|
-
pathExp: pagePathExp,
|
310
|
-
title: Str.titlizeSlug(pageRelativePathExp),
|
311
|
-
};
|
312
|
-
};
|
313
264
|
//# sourceMappingURL=core.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"core.js","sourceRoot":"","sources":["../../../../src/api/vite/plugins/core.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"core.js","sourceRoot":"","sources":["../../../../src/api/vite/plugins/core.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAA;AAGxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAA;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAA;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAA;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAErE,MAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAA;AAE5C,MAAM,mBAAmB,GAAG,YAAY,CAAC,CAAC,UAAU,EAAE,WAAW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AC,CAAA"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { Config } from '#api/config/index
|
2
|
-
import type { Vite } from '#dep/vite/index
|
1
|
+
import type { Config } from '#api/config/index';
|
2
|
+
import type { Vite } from '#dep/vite/index';
|
3
3
|
export declare const Main: (config: Config.Config) => Vite.PluginOption;
|
4
4
|
//# sourceMappingURL=main.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../../src/api/vite/plugins/main.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../../src/api/vite/plugins/main.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAS3C,eAAO,MAAM,IAAI,GACf,QAAQ,MAAM,CAAC,MAAM,KACpB,IAAI,CAAC,YA8BP,CAAA"}
|
@@ -2,9 +2,9 @@ import ViteReact from '@vitejs/plugin-react-oxc';
|
|
2
2
|
// import { Arr, Path } from '@wollybeard/kit'
|
3
3
|
// import Inspect from 'vite-plugin-inspect'
|
4
4
|
// import Restart from 'vite-plugin-restart'
|
5
|
-
import { Build } from
|
6
|
-
import { Core } from
|
7
|
-
import { Serve } from
|
5
|
+
import { Build } from "./build.js";
|
6
|
+
import { Core } from "./core.js";
|
7
|
+
import { Serve } from "./serve.js";
|
8
8
|
export const Main = (config) => {
|
9
9
|
const plugins = [];
|
10
10
|
// Optional Plugins based on config
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import type { Config } from '#api/config/index';
|
2
|
+
import type { Vite } from '#dep/vite/index';
|
3
|
+
import { FileRouter } from '#lib/file-router/index';
|
4
|
+
import { ViteVirtual } from '#lib/vite-virtual/index';
|
5
|
+
export declare const viProjectPages: ViteVirtual.Identifier.Identifier;
|
6
|
+
export interface PagesTreePluginOptions {
|
7
|
+
config: Config.Config;
|
8
|
+
onPagesChange?: (pages: FileRouter.ScanResult) => void;
|
9
|
+
onTreeChange?: (tree: FileRouter.RouteTreeNode) => void;
|
10
|
+
}
|
11
|
+
/**
|
12
|
+
* Pages plugin with tree support
|
13
|
+
*/
|
14
|
+
export declare const createPagesTreePlugin: ({ config, onPagesChange, onTreeChange }: PagesTreePluginOptions) => Vite.Plugin[];
|
15
|
+
export declare const getRouteTree: (config: Config.Config) => Promise<FileRouter.RouteTreeNode>;
|
16
|
+
//# sourceMappingURL=pages-tree.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"pages-tree.d.ts","sourceRoot":"","sources":["../../../../src/api/vite/plugins/pages-tree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAE/C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAQrD,eAAO,MAAM,cAAc,mCAA0E,CAAA;AAErG,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,UAAU,KAAK,IAAI,CAAA;IACtD,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,CAAC,aAAa,KAAK,IAAI,CAAA;CACxD;AAED;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAChC,yCAAyC,sBAAsB,KAC9D,IAAI,CAAC,MAAM,EAsJb,CAAA;AAGD,eAAO,MAAM,YAAY,GAAU,QAAQ,MAAM,CAAC,MAAM,KAAG,OAAO,CAAC,UAAU,CAAC,aAAa,CAM1F,CAAA"}
|