polen 0.8.0-next.8 → 0.8.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/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 +155 -203
- 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 +22 -21
- package/build/api/vite/plugins/main.js.map +1 -1
- 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/cli/index.js +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 +46 -5
- 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 +2 -0
- package/build/lib/vite-plugin-mdx/index.d.ts.map +1 -0
- package/build/lib/vite-plugin-mdx/index.js +2 -0
- package/build/lib/vite-plugin-mdx/index.js.map +1 -0
- package/build/lib/vite-plugin-mdx/vite-plugin-mdx.d.ts +24 -0
- package/build/lib/vite-plugin-mdx/vite-plugin-mdx.d.ts.map +1 -0
- package/build/lib/vite-plugin-mdx/vite-plugin-mdx.js +58 -0
- package/build/lib/vite-plugin-mdx/vite-plugin-mdx.js.map +1 -0
- 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 -2
- package/build/lib/vite-plugins/vite-plugins.d.ts.map +1 -1
- package/build/lib/vite-plugins/vite-plugins.js +1 -2
- package/build/lib/vite-plugins/vite-plugins.js.map +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 +6 -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 +2 -2
- 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 +3 -3
- package/build/template/server/render-page.jsx.map +1 -1
- 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 +77 -56
- 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 +172 -240
- package/src/api/vite/plugins/main.ts +24 -23
- 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/cli/index.ts +1 -1
- 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 +80 -6
- 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 -0
- package/src/lib/vite-plugin-mdx/vite-plugin-mdx.ts +91 -0
- package/src/lib/vite-plugins/index.ts +1 -1
- package/src/lib/vite-plugins/vite-plugins.ts +1 -2
- 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 +9 -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 +7 -6
- 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 +5 -5
- 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/build/lib/vite-plugins/output-logger.d.ts +0 -3
- package/build/lib/vite-plugins/output-logger.d.ts.map +0 -1
- package/build/lib/vite-plugins/output-logger.js +0 -13
- package/build/lib/vite-plugins/output-logger.js.map +0 -1
- package/src/lib/file-router/sidebar.ts +0 -0
- package/src/lib/vite-plugins/output-logger.ts +0 -14
@@ -0,0 +1,158 @@
|
|
1
|
+
import { TinyGlobby } from '#dep/tiny-globby/index';
|
2
|
+
import { Tree } from '#lib/tree/index';
|
3
|
+
import { Path, Str } from '@wollybeard/kit';
|
4
|
+
//
|
5
|
+
// Constants
|
6
|
+
//
|
7
|
+
const conventions = {
|
8
|
+
index: {
|
9
|
+
name: `index`,
|
10
|
+
},
|
11
|
+
numberedPrefix: {
|
12
|
+
pattern: Str.pattern(/^(?<order>\d+)[_-](?<name>.+)$/),
|
13
|
+
},
|
14
|
+
};
|
15
|
+
//
|
16
|
+
// Helpers
|
17
|
+
//
|
18
|
+
const parseSegment = (segment) => {
|
19
|
+
const match = Str.match(segment, conventions.numberedPrefix.pattern);
|
20
|
+
if (match) {
|
21
|
+
return {
|
22
|
+
name: match.groups.name,
|
23
|
+
order: parseInt(match.groups.order, 10),
|
24
|
+
};
|
25
|
+
}
|
26
|
+
return { name: segment };
|
27
|
+
};
|
28
|
+
const buildRouteTreeFromPaths = async (paths, rootDir) => {
|
29
|
+
// Root node (represents the pages directory itself)
|
30
|
+
const root = Tree.node({
|
31
|
+
name: 'root',
|
32
|
+
type: 'directory',
|
33
|
+
});
|
34
|
+
// Process each file path
|
35
|
+
for (const filePath of paths) {
|
36
|
+
const relativePath = Path.relative(rootDir, filePath);
|
37
|
+
// Split the path into segments
|
38
|
+
const segments = relativePath.split(Path.sep).filter(s => s.length > 0);
|
39
|
+
if (segments.length === 0)
|
40
|
+
continue; // Skip root directory
|
41
|
+
// Navigate/create path in tree
|
42
|
+
let currentNode = root;
|
43
|
+
for (let i = 0; i < segments.length; i++) {
|
44
|
+
const segment = segments[i];
|
45
|
+
const isLast = i === segments.length - 1;
|
46
|
+
// Parse segment for ordering
|
47
|
+
let segmentName = segment;
|
48
|
+
// Strip extension for files
|
49
|
+
if (isLast && (segment.endsWith('.md') || segment.endsWith('.mdx'))) {
|
50
|
+
segmentName = segment.replace(/\.(md|mdx)$/, '');
|
51
|
+
}
|
52
|
+
const parsed = parseSegment(segmentName);
|
53
|
+
// Find existing child
|
54
|
+
const existingChildIndex = currentNode.children.findIndex(child => child.value.name === parsed.name);
|
55
|
+
let childNode = existingChildIndex >= 0 ? currentNode.children[existingChildIndex] : undefined;
|
56
|
+
if (!childNode) {
|
57
|
+
// Create new node
|
58
|
+
if (isLast) {
|
59
|
+
// This is a file
|
60
|
+
const route = filePathToRoute(filePath, rootDir);
|
61
|
+
childNode = Tree.node({
|
62
|
+
name: parsed.name,
|
63
|
+
order: parsed.order,
|
64
|
+
type: 'file',
|
65
|
+
route,
|
66
|
+
});
|
67
|
+
}
|
68
|
+
else {
|
69
|
+
// This is a directory (implicit from file path)
|
70
|
+
childNode = Tree.node({
|
71
|
+
name: parsed.name,
|
72
|
+
order: parsed.order,
|
73
|
+
type: 'directory',
|
74
|
+
});
|
75
|
+
}
|
76
|
+
currentNode.children.push(childNode);
|
77
|
+
}
|
78
|
+
else if (isLast && childNode.value.type === 'file') {
|
79
|
+
// Handle collision for files with same name
|
80
|
+
// If new file has higher or equal order, replace the existing one (last wins for ties)
|
81
|
+
if (parsed.order !== undefined
|
82
|
+
&& (childNode.value.order === undefined || parsed.order >= childNode.value.order)) {
|
83
|
+
const route = filePathToRoute(filePath, rootDir);
|
84
|
+
const newNode = Tree.node({
|
85
|
+
name: parsed.name,
|
86
|
+
order: parsed.order,
|
87
|
+
type: 'file',
|
88
|
+
route,
|
89
|
+
});
|
90
|
+
currentNode.children[existingChildIndex] = newNode;
|
91
|
+
childNode = newNode;
|
92
|
+
}
|
93
|
+
// Otherwise keep the existing node (when existing has higher order)
|
94
|
+
}
|
95
|
+
currentNode = childNode;
|
96
|
+
}
|
97
|
+
}
|
98
|
+
// Sort the tree
|
99
|
+
return sortRouteTree(root);
|
100
|
+
};
|
101
|
+
const sortRouteTree = (tree) => {
|
102
|
+
return Tree.sort(tree, (a, b) => {
|
103
|
+
// If both have orders, sort by order
|
104
|
+
if (a.order !== undefined && b.order !== undefined) {
|
105
|
+
return a.order - b.order;
|
106
|
+
}
|
107
|
+
// If only one has order, it comes first
|
108
|
+
if (a.order !== undefined)
|
109
|
+
return -1;
|
110
|
+
if (b.order !== undefined)
|
111
|
+
return 1;
|
112
|
+
// Otherwise sort alphabetically
|
113
|
+
return a.name.localeCompare(b.name);
|
114
|
+
});
|
115
|
+
};
|
116
|
+
//
|
117
|
+
// Main scan function
|
118
|
+
//
|
119
|
+
export const scanTree = async (parameters) => {
|
120
|
+
const { dir, glob = `**/*` } = parameters;
|
121
|
+
// Get all files
|
122
|
+
const filePaths = await TinyGlobby.glob(glob, {
|
123
|
+
absolute: true,
|
124
|
+
cwd: dir,
|
125
|
+
onlyFiles: true,
|
126
|
+
});
|
127
|
+
// Build tree structure (directories will be created implicitly)
|
128
|
+
const routeTree = await buildRouteTreeFromPaths(filePaths, dir);
|
129
|
+
// TODO: Implement tree-based linting
|
130
|
+
const diagnostics = [];
|
131
|
+
return {
|
132
|
+
routeTree,
|
133
|
+
diagnostics,
|
134
|
+
};
|
135
|
+
};
|
136
|
+
// Reuse existing route creation logic
|
137
|
+
const filePathToRoute = (filePathExpression, rootDir) => {
|
138
|
+
const file = {
|
139
|
+
path: {
|
140
|
+
absolute: Path.parse(filePathExpression),
|
141
|
+
relative: Path.parse(Path.relative(rootDir, filePathExpression)),
|
142
|
+
},
|
143
|
+
};
|
144
|
+
const dirPath = Str.split(Str.removeSurrounding(file.path.relative.dir, Path.sep), Path.sep);
|
145
|
+
// Parse numbered prefix from filename
|
146
|
+
const prefixMatch = file.path.relative.name.match(conventions.numberedPrefix.pattern);
|
147
|
+
const order = prefixMatch?.groups?.[`order`] ? parseInt(prefixMatch.groups[`order`], 10) : undefined;
|
148
|
+
const nameWithoutPrefix = prefixMatch?.groups?.[`name`] ?? file.path.relative.name;
|
149
|
+
const logical = {
|
150
|
+
path: nameWithoutPrefix === conventions.index.name ? dirPath : dirPath.concat(nameWithoutPrefix),
|
151
|
+
order,
|
152
|
+
};
|
153
|
+
return {
|
154
|
+
logical,
|
155
|
+
file,
|
156
|
+
};
|
157
|
+
};
|
158
|
+
//# sourceMappingURL=scan-tree.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"scan-tree.js","sourceRoot":"","sources":["../../../src/lib/file-router/scan-tree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,IAAI,EAAiB,MAAM,iBAAiB,CAAA;AACrD,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA;AAwB3C,EAAE;AACF,YAAY;AACZ,EAAE;AAEF,MAAM,WAAW,GAAG;IAClB,KAAK,EAAE;QACL,IAAI,EAAE,OAAO;KACd;IACD,cAAc,EAAE;QACd,OAAO,EAAE,GAAG,CAAC,OAAO,CAAgC,gCAAgC,CAAC;KACtF;CACF,CAAA;AAED,EAAE;AACF,UAAU;AACV,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AE,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAA;IAE5F,sCAAsC;IACtC,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,cAAc,CAAC,OAAO,CAAC,CAAA;IACrF,MAAM,KAAK,GAAG,WAAW,EAAE,MAAM,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IACpG,MAAM,iBAAiB,GAAG,WAAW,EAAE,MAAM,EAAE,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAA;IAElF,MAAM,OAAO,GAAG;QACd,IAAI,EAAE,iBAAiB,KAAK,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC;QAChG,KAAK;KACN,CAAA;IAED,OAAO;QACL,OAAO;QACP,IAAI;KACL,CAAA;AACH,CAAC,CAAA"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Path } from '@wollybeard/kit';
|
2
|
-
import { type Diagnostic } from './linter.
|
3
|
-
import type
|
2
|
+
import { type Diagnostic } from './linter.ts';
|
3
|
+
import { type Route, type RouteLogical } from './route.ts';
|
4
4
|
export interface ScanResult {
|
5
5
|
routes: Route[];
|
6
6
|
diagnostics: Diagnostic[];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"scan.d.ts","sourceRoot":"","sources":["../../../src/lib/file-router/scan.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"scan.d.ts","sourceRoot":"","sources":["../../../src/lib/file-router/scan.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAO,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,aAAa,CAAA;AACnD,OAAO,EAAE,KAAK,KAAK,EAAkB,KAAK,YAAY,EAAyB,MAAM,YAAY,CAAA;AA4BjG,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,WAAW,EAAE,UAAU,EAAE,CAAA;CAC1B;AAUD,eAAO,MAAM,IAAI,GAAU,YAAY;IACrC,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,KAAG,OAAO,CAAC,UAAU,CAiBrB,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,oBAAoB,MAAM,EAAE,SAAS,MAAM,KAAG,KAa7E,CAAA;AAED,eAAO,MAAM,sBAAsB,GAAI,UAAU,IAAI,CAAC,MAAM,KAAG,YAqB9D,CAAA"}
|
@@ -1,6 +1,9 @@
|
|
1
|
-
import { TinyGlobby } from '#dep/tiny-globby/index
|
1
|
+
import { TinyGlobby } from '#dep/tiny-globby/index';
|
2
|
+
import { Tree } from '#lib/tree/index';
|
2
3
|
import { Path, Str } from '@wollybeard/kit';
|
3
|
-
import { lint } from
|
4
|
+
import { lint } from "./linter.js";
|
5
|
+
import { routeToPathExpression } from "./route.js";
|
6
|
+
import { scanTree } from "./scan-tree.js";
|
4
7
|
//
|
5
8
|
//
|
6
9
|
//
|
@@ -12,6 +15,9 @@ const conventions = {
|
|
12
15
|
index: {
|
13
16
|
name: `index`,
|
14
17
|
},
|
18
|
+
numberedPrefix: {
|
19
|
+
pattern: Str.pattern(/^(?<order>\d+)[_-](?<name>.+)$/),
|
20
|
+
},
|
15
21
|
};
|
16
22
|
//
|
17
23
|
//
|
@@ -21,14 +27,18 @@ const conventions = {
|
|
21
27
|
//
|
22
28
|
//
|
23
29
|
export const scan = async (parameters) => {
|
24
|
-
|
25
|
-
const
|
26
|
-
|
27
|
-
|
28
|
-
|
30
|
+
// Use tree-based scanner
|
31
|
+
const treeResult = await scanTree(parameters);
|
32
|
+
// Flatten tree to get routes
|
33
|
+
const routes = [];
|
34
|
+
Tree.visit(treeResult.routeTree, (node) => {
|
35
|
+
if (node.value.type === 'file' && node.value.route) {
|
36
|
+
routes.push(node.value.route);
|
37
|
+
}
|
29
38
|
});
|
30
|
-
|
39
|
+
// Apply linting
|
31
40
|
const lintResult = lint(routes);
|
41
|
+
// Routes are already sorted by the tree structure
|
32
42
|
return lintResult;
|
33
43
|
};
|
34
44
|
export const filePathToRoute = (filePathExpression, rootDir) => {
|
@@ -46,15 +56,21 @@ export const filePathToRoute = (filePathExpression, rootDir) => {
|
|
46
56
|
};
|
47
57
|
export const filePathToRouteLogical = (filePath) => {
|
48
58
|
const dirPath = Str.split(Str.removeSurrounding(filePath.dir, Path.sep), Path.sep);
|
49
|
-
|
59
|
+
// Parse numbered prefix from filename
|
60
|
+
const prefixMatch = Str.match(filePath.name, conventions.numberedPrefix.pattern);
|
61
|
+
const order = prefixMatch ? parseInt(prefixMatch.groups.order, 10) : undefined;
|
62
|
+
const nameWithoutPrefix = prefixMatch?.groups.name ?? filePath.name;
|
63
|
+
if (nameWithoutPrefix === conventions.index.name) {
|
50
64
|
const path = dirPath;
|
51
65
|
return {
|
52
66
|
path,
|
67
|
+
order,
|
53
68
|
};
|
54
69
|
}
|
55
|
-
const path = dirPath.concat(
|
70
|
+
const path = dirPath.concat(nameWithoutPrefix);
|
56
71
|
return {
|
57
72
|
path,
|
73
|
+
order,
|
58
74
|
};
|
59
75
|
};
|
60
76
|
//# sourceMappingURL=scan.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"scan.js","sourceRoot":"","sources":["../../../src/lib/file-router/scan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"scan.js","sourceRoot":"","sources":["../../../src/lib/file-router/scan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAC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L,IAAI;QACJ,KAAK;KACN,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/file-router/sidebar/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,mBAAmB,CAAA;AAEhD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/file-router/sidebar/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,mBAAmB,CAAA;AAChD,8DAA8D;AAC9D,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAA"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import * as FileRouter from '../file-router.ts';
|
2
|
+
import type { RouteTreeNode } from '../scan-tree.ts';
|
3
|
+
import type { Sidebar } from './types.ts';
|
4
|
+
export * from './types.ts';
|
5
|
+
/**
|
6
|
+
* Build sidebar from tree structure
|
7
|
+
*/
|
8
|
+
export declare const buildFromTree: (routeTree: RouteTreeNode, basePath: FileRouter.Path) => Sidebar;
|
9
|
+
//# sourceMappingURL=sidebar-tree.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"sidebar-tree.d.ts","sourceRoot":"","sources":["../../../../src/lib/file-router/sidebar/sidebar-tree.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAA;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAsB,MAAM,iBAAiB,CAAA;AACxE,OAAO,KAAK,EAAyB,OAAO,EAAE,MAAM,YAAY,CAAA;AAEhE,cAAc,YAAY,CAAA;AAE1B;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,WAAW,aAAa,EAAE,UAAU,UAAU,CAAC,IAAI,KAAG,OAcnF,CAAA"}
|
@@ -0,0 +1,85 @@
|
|
1
|
+
import { Tree } from '#lib/tree/index';
|
2
|
+
import { Str } from '@wollybeard/kit';
|
3
|
+
import * as FileRouter from "../file-router.js";
|
4
|
+
export * from "./types.js";
|
5
|
+
/**
|
6
|
+
* Build sidebar from tree structure
|
7
|
+
*/
|
8
|
+
export const buildFromTree = (routeTree, basePath) => {
|
9
|
+
const navs = [];
|
10
|
+
const sections = [];
|
11
|
+
// Process only the children of the root node
|
12
|
+
for (const child of routeTree.children) {
|
13
|
+
processNode(child, basePath, [], navs, sections);
|
14
|
+
}
|
15
|
+
const items = [...navs, ...sections];
|
16
|
+
return {
|
17
|
+
items,
|
18
|
+
};
|
19
|
+
};
|
20
|
+
const processNode = (node, basePath, parentPath, navs, sections) => {
|
21
|
+
const currentPath = [...parentPath, node.value.name];
|
22
|
+
if (node.value.type === 'directory') {
|
23
|
+
// This is a directory - create a section
|
24
|
+
const sectionPath = [...basePath, ...currentPath];
|
25
|
+
const sectionPathExp = FileRouter.pathToExpression(sectionPath);
|
26
|
+
const sectionTitle = Str.titlizeSlug(node.value.name);
|
27
|
+
const section = {
|
28
|
+
type: `ItemSection`,
|
29
|
+
title: sectionTitle,
|
30
|
+
pathExp: sectionPathExp.startsWith('/') ? sectionPathExp.slice(1) : sectionPathExp,
|
31
|
+
isNavToo: false,
|
32
|
+
navs: [],
|
33
|
+
};
|
34
|
+
// Check if this directory has an index file
|
35
|
+
const indexChild = node.children.find(child => child.value.type === 'file' && child.value.name === 'index');
|
36
|
+
if (indexChild) {
|
37
|
+
section.isNavToo = true;
|
38
|
+
}
|
39
|
+
// Process all non-index children as navs for this section
|
40
|
+
for (const child of node.children) {
|
41
|
+
if (child.value.type === 'file' && child.value.name !== 'index' && child.value.route) {
|
42
|
+
// Pass the parent path of the route, not the section path
|
43
|
+
const routeParentPath = child.value.route.logical.path.slice(0, -1);
|
44
|
+
section.navs.push(routeToItemLink(child.value.route, routeParentPath));
|
45
|
+
}
|
46
|
+
else if (child.value.type === 'directory') {
|
47
|
+
// Recursively process subdirectories
|
48
|
+
// Note: This creates nested sections which the original implementation doesn't support
|
49
|
+
// For now, we'll just add the files from subdirectories to the parent section
|
50
|
+
collectFilesFromDirectory(child, child.value.route?.logical.path || [], section.navs);
|
51
|
+
}
|
52
|
+
}
|
53
|
+
sections.push(section);
|
54
|
+
}
|
55
|
+
else if (node.value.type === 'file' && node.value.route) {
|
56
|
+
// This is a top-level file - add as nav
|
57
|
+
if (node.value.name !== 'index') {
|
58
|
+
navs.push(routeToItemLink(node.value.route, basePath));
|
59
|
+
}
|
60
|
+
}
|
61
|
+
};
|
62
|
+
const collectFilesFromDirectory = (node, basePath, navs) => {
|
63
|
+
Tree.visit(node, (n) => {
|
64
|
+
if (n.value.type === 'file' && n.value.route && n.value.name !== 'index') {
|
65
|
+
// Use the route's parent path for relative title generation
|
66
|
+
const routeParentPath = n.value.route.logical.path.slice(0, -1);
|
67
|
+
navs.push(routeToItemLink(n.value.route, routeParentPath));
|
68
|
+
}
|
69
|
+
});
|
70
|
+
};
|
71
|
+
const routeToItemLink = (route, basePath) => {
|
72
|
+
const pagePathExp = FileRouter.routeToPathExpression(route);
|
73
|
+
const pageRelative = FileRouter.makeRelativeUnsafe(route, basePath);
|
74
|
+
const pageRelativePathExp = FileRouter.routeToPathExpression(pageRelative);
|
75
|
+
// Remove leading slash for title generation
|
76
|
+
const titlePath = pageRelativePathExp.startsWith('/') ? pageRelativePathExp.slice(1) : pageRelativePathExp;
|
77
|
+
// Use only the last segment for the title
|
78
|
+
const titleSegment = pageRelative.logical.path[pageRelative.logical.path.length - 1] || titlePath;
|
79
|
+
return {
|
80
|
+
type: `ItemLink`,
|
81
|
+
pathExp: pagePathExp.startsWith('/') ? pagePathExp.slice(1) : pagePathExp,
|
82
|
+
title: Str.titlizeSlug(titleSegment),
|
83
|
+
};
|
84
|
+
};
|
85
|
+
//# sourceMappingURL=sidebar-tree.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"sidebar-tree.js","sourceRoot":"","sources":["../../../../src/lib/file-router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AC,CAAA;IACnE,MAAM,mBAAmB,GAAG,UAAU,CAAC,qBAAqB,CAAC,YAAY,CAAC,CAAA;IAE1E,4CAA4C;IAC5C,MAAM,SAAS,GAAG,mBAAmB,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAA;IAE1G,0CAA0C;IAC1C,MAAM,YAAY,GAAG,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,SAAS,CAAA;IAEjG,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,WAAW,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW;QACzE,KAAK,EAAE,GAAG,CAAC,WAAW,CAAC,YAAY,CAAC;KACrC,CAAA;AACH,CAAC,CAAA"}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
export interface Sidebar {
|
2
|
+
items: Item[];
|
3
|
+
}
|
4
|
+
export type Item = ItemLink | ItemSection;
|
5
|
+
export interface ItemLink {
|
6
|
+
type: `ItemLink`;
|
7
|
+
title: string;
|
8
|
+
pathExp: string;
|
9
|
+
}
|
10
|
+
export interface ItemSection {
|
11
|
+
type: `ItemSection`;
|
12
|
+
title: string;
|
13
|
+
pathExp: string;
|
14
|
+
isNavToo: boolean;
|
15
|
+
navs: ItemLink[];
|
16
|
+
}
|
17
|
+
//# sourceMappingURL=types.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/file-router/sidebar/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,IAAI,EAAE,CAAA;CACd;AAED,MAAM,MAAM,IAAI,GAAG,QAAQ,GAAG,WAAW,CAAA;AAEzC,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,UAAU,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,aAAa,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,OAAO,CAAA;IACjB,IAAI,EAAE,QAAQ,EAAE,CAAA;CACjB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/lib/file-router/sidebar/types.ts"],"names":[],"mappings":""}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export * as Nodes from './document.
|
1
|
+
export * as Nodes from './document.ts';
|
2
2
|
//# sourceMappingURL=_Nodes.d.ts.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export * as Nodes from
|
1
|
+
export * as Nodes from "./document.js";
|
2
2
|
//# sourceMappingURL=_Nodes.js.map
|
@@ -3,5 +3,5 @@
|
|
3
3
|
*/
|
4
4
|
import type { OperationTypeNode as GraphQLOperationTypeNode } from 'graphql';
|
5
5
|
export type OperationTypeNode = GraphQLOperationTypeNode;
|
6
|
-
export * as OperationTypeNode from './OperationTypeNodes.
|
6
|
+
export * as OperationTypeNode from './OperationTypeNodes.ts';
|
7
7
|
//# sourceMappingURL=OperationTypeNode.d.ts.map
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
2
|
* This is a tree-shakable version of https://github.com/graphql/graphql-js/blob/16.x.x/src/language/kinds.ts
|
3
3
|
*/
|
4
|
-
export * as OperationTypeNode from
|
4
|
+
export * as OperationTypeNode from "./OperationTypeNodes.js";
|
5
5
|
//# sourceMappingURL=OperationTypeNode.js.map
|
@@ -2,6 +2,6 @@
|
|
2
2
|
* This is a tree-shakable version of https://github.com/graphql/graphql-js/blob/16.x.x/src/language/kinds.ts
|
3
3
|
*/
|
4
4
|
import type { Kind as GraphQLKind } from 'graphql';
|
5
|
-
export * as Kind from './kinds.
|
5
|
+
export * as Kind from './kinds.ts';
|
6
6
|
export type Kind = GraphQLKind;
|
7
7
|
//# sourceMappingURL=kind.d.ts.map
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { type ArgumentNode, type BooleanValueNode, type DirectiveNode, type DocumentNode, type EnumValueNode, type FieldNode, type FloatValueNode, type FragmentSpreadNode, type InlineFragmentNode, type IntValueNode, type ListValueNode, type NamedTypeNode, type NameNode, type NullValueNode, type ObjectFieldNode, type ObjectValueNode, type OperationDefinitionNode, type SelectionSetNode, type StringValueNode, type TypeNode, type ValueNode, type VariableDefinitionNode, type VariableNode } from 'graphql';
|
2
2
|
import type { HasRequiredKeys } from 'type-fest';
|
3
|
-
import { Kind } from './document/kind.
|
4
|
-
export { OperationType } from './schema/OperationType/__.
|
3
|
+
import { Kind } from './document/kind.ts';
|
4
|
+
export { OperationType } from './schema/OperationType/__.ts';
|
5
5
|
export type { ArgumentNode, BooleanValueNode, DefinitionNode, DirectiveNode, DocumentNode, FieldNode, FloatValueNode, FragmentSpreadNode, InlineFragmentNode, IntValueNode, ListValueNode, NameNode, NullValueNode, ObjectFieldNode, ObjectValueNode, OperationDefinitionNode, OperationTypeDefinitionNode, SelectionNode, SelectionSetNode, StringValueNode, ValueNode, VariableDefinitionNode, VariableNode, } from 'graphql';
|
6
|
-
export { OperationTypeNode } from './document/OperationTypeNode.
|
7
|
-
export { Kind } from './document/kind.
|
6
|
+
export { OperationTypeNode } from './document/OperationTypeNode.ts';
|
7
|
+
export { Kind } from './document/kind.ts';
|
8
8
|
export type $Any = DirectiveNode | NameNode | ValueNode | VariableDefinitionNode | SelectionSetNode | InlineFragmentNode | OperationDefinitionNode | NamedTypeNode | FieldNode | FragmentSpreadNode | DocumentNode | ArgumentNode | EnumValueNode | ListValueNode | NullValueNode | ObjectValueNode | ObjectFieldNode | VariableNode | StringValueNode | IntValueNode | FloatValueNode | BooleanValueNode;
|
9
9
|
export declare namespace $KindGroups {
|
10
10
|
type StandardScalar = typeof Kind.STRING | typeof Kind.INT | typeof Kind.BOOLEAN | typeof Kind.FLOAT;
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import {} from 'graphql';
|
2
|
-
import { Kind } from
|
3
|
-
import { OperationTypeNode } from
|
4
|
-
// import type { RequestDocumentNodeInput } from './request.
|
5
|
-
export { OperationType } from
|
6
|
-
export { OperationTypeNode } from
|
7
|
-
export { Kind } from
|
2
|
+
import { Kind } from "./document/kind.js";
|
3
|
+
import { OperationTypeNode } from "./document/OperationTypeNode.js";
|
4
|
+
// import type { RequestDocumentNodeInput } from './request.ts'
|
5
|
+
export { OperationType } from "./schema/OperationType/__.js";
|
6
|
+
export { OperationTypeNode } from "./document/OperationTypeNode.js";
|
7
|
+
export { Kind } from "./document/kind.js";
|
8
8
|
export const Directive = directive => {
|
9
9
|
return {
|
10
10
|
kind: Kind.DIRECTIVE,
|
@@ -1,5 +1,5 @@
|
|
1
|
-
export * as Document from './document.
|
2
|
-
export * from './graphql.
|
3
|
-
export * as HTTP from './http/http.
|
4
|
-
export * as Schema from './schema/schema.
|
1
|
+
export * as Document from './document.ts';
|
2
|
+
export * from './graphql.ts';
|
3
|
+
export * as HTTP from './http/http.ts';
|
4
|
+
export * as Schema from './schema/schema.ts';
|
5
5
|
//# sourceMappingURL=grafaid.d.ts.map
|
@@ -1,5 +1,5 @@
|
|
1
|
-
export * as Document from
|
2
|
-
export * from
|
3
|
-
export * as HTTP from
|
4
|
-
export * as Schema from
|
1
|
+
export * as Document from "./document.js";
|
2
|
+
export * from "./graphql.js";
|
3
|
+
export * as HTTP from "./http/http.js";
|
4
|
+
export * as Schema from "./schema/schema.js";
|
5
5
|
//# sourceMappingURL=grafaid.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import type { GraphQLNamedType, GraphQLScalarType } from 'graphql';
|
2
|
-
import type { KindMap } from './schema/schema.
|
2
|
+
import type { KindMap } from './schema/schema.ts';
|
3
3
|
export { type ExecutionResult, type FormattedExecutionResult, GraphQLError, type GraphQLFormattedError as FormattedExecutionResultError, } from 'graphql';
|
4
|
-
export * from './_Nodes.
|
4
|
+
export * from './_Nodes.ts';
|
5
5
|
export declare const StandardScalarTypeNames: {
|
6
6
|
String: string;
|
7
7
|
ID: string;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { neverCase } from '@wollybeard/kit/language';
|
2
2
|
import { isEnumType, isInputObjectType, isInterfaceType, isObjectType, isScalarType, isUnionType } from 'graphql';
|
3
|
-
import { isScalarTypeCustom } from
|
3
|
+
import { isScalarTypeCustom } from "./schema/schema.js";
|
4
4
|
export { GraphQLError, } from 'graphql';
|
5
|
-
export * from
|
5
|
+
export * from "./_Nodes.js";
|
6
6
|
export const StandardScalarTypeNames = {
|
7
7
|
String: `String`,
|
8
8
|
ID: `ID`,
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export * as GraphQLHTTP from './http.
|
1
|
+
export * as GraphQLHTTP from './http.ts';
|
2
2
|
//# sourceMappingURL=__.d.ts.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export * as GraphQLHTTP from
|
1
|
+
export * as GraphQLHTTP from "./http.js";
|
2
2
|
//# sourceMappingURL=__.js.map
|
@@ -1,4 +1,4 @@
|
|
1
|
-
// import { CONTENT_TYPE_GQL, CONTENT_TYPE_JSON } from '../../http.
|
1
|
+
// import { CONTENT_TYPE_GQL, CONTENT_TYPE_JSON } from '../../http.ts'
|
2
2
|
import { Rec } from '@wollybeard/kit';
|
3
3
|
export const parseExecutionResult = (result) => {
|
4
4
|
if (typeof result !== `object` || result === null) {
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export * as Grafaid from './grafaid.
|
1
|
+
export * as Grafaid from './grafaid.ts';
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export * as Grafaid from
|
1
|
+
export * as Grafaid from "./grafaid.js";
|
2
2
|
//# sourceMappingURL=index.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import type { GraphQLInterfaceType } from 'graphql';
|
2
|
-
import type { Schema } from '../schema.
|
3
|
-
import * as Type from '../type.
|
4
|
-
import type { KindMap } from './__.
|
2
|
+
import type { Schema } from '../schema.ts';
|
3
|
+
import * as Type from '../type.ts';
|
4
|
+
import type { KindMap } from './__.ts';
|
5
5
|
export declare const Name: {
|
6
6
|
Root: "Root";
|
7
7
|
ScalarCustom: "ScalarCustom";
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { getRootTypeMap } from
|
2
|
-
import * as Type from
|
3
|
-
import { isRoot } from
|
4
|
-
import { isScalarTypeCustom } from
|
1
|
+
import { getRootTypeMap } from "../RootTypeMap.js";
|
2
|
+
import * as Type from "../type.js";
|
3
|
+
import { isRoot } from "../type.js";
|
4
|
+
import { isScalarTypeCustom } from "../typeGuards.js";
|
5
5
|
export const Name = {
|
6
6
|
Root: `Root`,
|
7
7
|
ScalarCustom: `ScalarCustom`,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { GraphQLEnumType, GraphQLInputObjectType, GraphQLInterfaceType, GraphQLObjectType, GraphQLScalarType, GraphQLUnionType } from 'graphql';
|
2
|
-
import type { RootTypeMap } from '../RootTypeMap.
|
3
|
-
export * as KindMap from './_.
|
2
|
+
import type { RootTypeMap } from '../RootTypeMap.ts';
|
3
|
+
export * as KindMap from './_.ts';
|
4
4
|
export interface KindMap {
|
5
5
|
root: RootTypeMap;
|
6
6
|
index: {
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export * as KindMap from
|
1
|
+
export * as KindMap from "./_.js";
|
2
2
|
//# sourceMappingURL=__.js.map
|