polen 0.11.0-next.12 → 0.11.0-next.14
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 +1 -1
- package/build/api/api.d.ts +1 -0
- package/build/api/api.d.ts.map +1 -1
- package/build/api/api.js +1 -0
- package/build/api/api.js.map +1 -1
- package/build/api/cache/$$.d.ts +2 -0
- package/build/api/cache/$$.d.ts.map +1 -0
- package/build/api/cache/$$.js +2 -0
- package/build/api/cache/$$.js.map +1 -0
- package/build/api/cache/$.d.ts +2 -0
- package/build/api/cache/$.d.ts.map +1 -0
- package/build/api/cache/$.js +2 -0
- package/build/api/cache/$.js.map +1 -0
- package/build/api/cache/cache.d.ts +40 -0
- package/build/api/cache/cache.d.ts.map +1 -0
- package/build/api/cache/cache.js +158 -0
- package/build/api/cache/cache.js.map +1 -0
- package/build/api/content/navbar.d.ts +1 -0
- package/build/api/content/navbar.d.ts.map +1 -1
- package/build/api/content/navbar.js +1 -0
- package/build/api/content/navbar.js.map +1 -1
- package/build/api/content/page.d.ts +1 -1
- package/build/api/content/page.d.ts.map +1 -1
- package/build/api/content/scan.d.ts +1 -1
- package/build/api/content/scan.d.ts.map +1 -1
- package/build/api/content/scan.js +1 -1
- package/build/api/content/scan.js.map +1 -1
- package/build/api/content/sidebar.js +1 -1
- package/build/api/content/sidebar.js.map +1 -1
- package/build/api/hooks/helpers.d.ts +5 -0
- package/build/api/hooks/helpers.d.ts.map +1 -0
- package/build/api/hooks/helpers.js +4 -0
- package/build/api/hooks/helpers.js.map +1 -0
- package/build/api/hooks/index.d.ts +3 -0
- package/build/api/hooks/index.d.ts.map +1 -0
- package/build/api/hooks/index.js +3 -0
- package/build/api/hooks/index.js.map +1 -0
- package/build/api/hooks/types.d.ts +11 -0
- package/build/api/hooks/types.d.ts.map +1 -0
- package/build/api/hooks/types.js +2 -0
- package/build/api/hooks/types.js.map +1 -0
- package/build/api/iso/schema/$$.d.ts +0 -1
- package/build/api/iso/schema/$$.d.ts.map +1 -1
- package/build/api/iso/schema/routing.js +1 -1
- package/build/api/iso/schema/routing.js.map +1 -1
- package/build/api/iso/schema/validation.js +1 -1
- package/build/api/iso/schema/validation.js.map +1 -1
- package/build/api/schema/data-sources/introspection/introspection.d.ts +4 -3
- package/build/api/schema/data-sources/introspection/introspection.d.ts.map +1 -1
- package/build/api/schema/data-sources/introspection/introspection.js +6 -5
- package/build/api/schema/data-sources/introspection/introspection.js.map +1 -1
- package/build/api/schema/data-sources/memory/memory.d.ts +2 -2
- package/build/api/schema/data-sources/memory/memory.d.ts.map +1 -1
- package/build/api/schema/data-sources/memory/memory.js +24 -12
- package/build/api/schema/data-sources/memory/memory.js.map +1 -1
- package/build/api/schema/data-sources/schema-directory/schema-directory.d.ts +2 -2
- package/build/api/schema/data-sources/schema-directory/schema-directory.d.ts.map +1 -1
- package/build/api/schema/data-sources/schema-directory/schema-directory.js +24 -12
- 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 +3 -3
- package/build/api/schema/data-sources/schema-file/schema-file.d.ts.map +1 -1
- package/build/api/schema/data-sources/schema-file/schema-file.js +5 -4
- package/build/api/schema/data-sources/schema-file/schema-file.js.map +1 -1
- package/build/api/schema/read.d.ts +4 -4
- package/build/api/schema/read.d.ts.map +1 -1
- package/build/api/schema/read.js +1 -1
- package/build/api/schema/read.js.map +1 -1
- package/build/api/schema/schema.d.ts +0 -10
- package/build/api/schema/schema.d.ts.map +1 -1
- package/build/api/schema/schema.js.map +1 -1
- package/build/api/schema-augmentation/augmentations/description.d.ts +1 -1
- package/build/api/schema-augmentation/augmentations/description.d.ts.map +1 -1
- package/build/api/schema-augmentation/schema-augmentation.d.ts +1 -1
- package/build/api/schema-augmentation/schema-augmentation.d.ts.map +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/schema-source/schema-source.d.ts +9 -5
- package/build/api/schema-source/schema-source.d.ts.map +1 -1
- package/build/api/schema-source/schema-source.js +37 -24
- package/build/api/schema-source/schema-source.js.map +1 -1
- package/build/api/vite/plugins/build.js +1 -1
- package/build/api/vite/plugins/build.js.map +1 -1
- package/build/api/vite/plugins/core.d.ts +2 -1
- package/build/api/vite/plugins/core.d.ts.map +1 -1
- package/build/api/vite/plugins/core.js +47 -9
- package/build/api/vite/plugins/core.js.map +1 -1
- package/build/api/vite/plugins/pages.js +1 -1
- package/build/api/vite/plugins/pages.js.map +1 -1
- package/build/api/vite/plugins/schema-assets.d.ts +1 -1
- package/build/api/vite/plugins/schema-assets.d.ts.map +1 -1
- package/build/api/vite/plugins/schema-assets.js +14 -5
- package/build/api/vite/plugins/schema-assets.js.map +1 -1
- package/build/api/vite/vi.d.ts +1 -1
- package/build/api/vite/vi.d.ts.map +1 -1
- package/build/api/vite/vi.js +1 -1
- package/build/api/vite/vi.js.map +1 -1
- package/build/cli/commands/cache/$default.d.ts +3 -0
- package/build/cli/commands/cache/$default.d.ts.map +1 -0
- package/build/cli/commands/cache/$default.js +10 -0
- package/build/cli/commands/cache/$default.js.map +1 -0
- package/build/cli/commands/cache/delete.d.ts +2 -0
- package/build/cli/commands/cache/delete.d.ts.map +1 -0
- package/build/cli/commands/cache/delete.js +22 -0
- package/build/cli/commands/cache/delete.js.map +1 -0
- package/build/cli/commands/cache/show.d.ts +2 -0
- package/build/cli/commands/cache/show.d.ts.map +1 -0
- package/build/cli/commands/cache/show.js +86 -0
- package/build/cli/commands/cache/show.js.map +1 -0
- package/build/cli/commands/cache.d.ts +3 -0
- package/build/cli/commands/cache.d.ts.map +1 -0
- package/build/cli/commands/cache.js +7 -0
- package/build/cli/commands/cache.js.map +1 -0
- package/build/cli/commands/config.js +2 -0
- package/build/cli/commands/config.js.map +1 -1
- package/build/cli/commands/open.js +2 -2
- package/build/cli/commands/open.js.map +1 -1
- package/build/cli/commands/static.js +2 -0
- package/build/cli/commands/static.js.map +1 -1
- package/build/exports/polen.d.ts +1 -0
- package/build/exports/polen.d.ts.map +1 -1
- package/build/exports/polen.js +1 -0
- package/build/exports/polen.js.map +1 -1
- package/build/exports/radix-ui/react-icons.d.ts +2 -0
- package/build/exports/radix-ui/react-icons.d.ts.map +1 -0
- package/build/exports/radix-ui/react-icons.js +4 -0
- package/build/exports/radix-ui/react-icons.js.map +1 -0
- package/build/exports/radix-ui/themes.d.ts +2 -0
- package/build/exports/radix-ui/themes.d.ts.map +1 -0
- package/build/exports/radix-ui/themes.js +4 -0
- package/build/exports/radix-ui/themes.js.map +1 -0
- package/build/lib/apple-touch-icon/{index.js → $.d.ts} +1 -1
- package/build/lib/apple-touch-icon/$.d.ts.map +1 -0
- package/build/lib/apple-touch-icon/{index.d.ts → $.js} +1 -1
- package/build/lib/apple-touch-icon/$.js.map +1 -0
- package/build/lib/errors/{errors.js → $$.d.ts} +1 -1
- package/build/lib/errors/$$.d.ts.map +1 -0
- package/build/lib/errors/{errors.d.ts → $$.js} +1 -1
- package/build/lib/errors/$$.js.map +1 -0
- package/build/lib/errors/$.d.ts +2 -0
- package/build/lib/errors/$.d.ts.map +1 -0
- package/build/lib/errors/$.js +2 -0
- package/build/lib/errors/$.js.map +1 -0
- package/build/lib/extensible-data/{index.js → $.d.ts} +1 -1
- package/build/lib/extensible-data/$.d.ts.map +1 -0
- package/build/lib/extensible-data/{index.d.ts → $.js} +1 -1
- package/build/lib/extensible-data/$.js.map +1 -0
- package/build/lib/favicon/{index.js → $.d.ts} +1 -1
- package/build/lib/favicon/$.d.ts.map +1 -0
- package/build/lib/favicon/{index.d.ts → $.js} +1 -1
- package/build/lib/favicon/$.js.map +1 -0
- package/build/lib/file-router/{file-router.js → $$.d.ts} +1 -1
- package/build/lib/file-router/$$.d.ts.map +1 -0
- package/build/lib/file-router/{file-router.d.ts → $$.js} +1 -1
- package/build/lib/file-router/$$.js.map +1 -0
- package/build/lib/file-router/$.d.ts +2 -0
- package/build/lib/file-router/$.d.ts.map +1 -0
- package/build/lib/file-router/$.js +2 -0
- package/build/lib/file-router/$.js.map +1 -0
- package/build/lib/grafaid/{grafaid.js → $$.d.ts} +1 -1
- package/build/lib/grafaid/$$.d.ts.map +1 -0
- package/build/lib/grafaid/{grafaid.d.ts → $$.js} +1 -1
- package/build/lib/grafaid/$$.js.map +1 -0
- package/build/lib/grafaid/$.d.ts +2 -0
- package/build/lib/grafaid/$.d.ts.map +1 -0
- package/build/lib/grafaid/$.js +2 -0
- package/build/lib/grafaid/$.js.map +1 -0
- package/build/lib/grafaid/schema/type.d.ts.map +1 -1
- package/build/lib/grafaid/schema/type.js.map +1 -1
- package/build/lib/grafaid-old/{index.js → $.d.ts} +1 -1
- package/build/lib/grafaid-old/$.d.ts.map +1 -0
- package/build/lib/grafaid-old/{index.d.ts → $.js} +1 -1
- package/build/lib/grafaid-old/$.js.map +1 -0
- package/build/lib/graphql-change/{graphql-change.d.ts → $$.d.ts} +2 -2
- package/build/lib/graphql-change/$$.d.ts.map +1 -0
- package/build/lib/graphql-change/{graphql-change.js → $$.js} +1 -1
- package/build/lib/graphql-change/$$.js.map +1 -0
- package/build/lib/graphql-change/$.d.ts +2 -0
- package/build/lib/graphql-change/$.d.ts.map +1 -0
- package/build/lib/graphql-change/$.js +2 -0
- package/build/lib/graphql-change/$.js.map +1 -0
- package/build/lib/graphql-change/change-groups.d.ts +5 -1
- package/build/lib/graphql-change/change-groups.d.ts.map +1 -1
- package/build/lib/graphql-change/change-groups.js.map +1 -1
- package/build/lib/graphql-changeset/$$.d.ts +4 -0
- package/build/lib/graphql-changeset/$$.d.ts.map +1 -0
- package/build/lib/graphql-changeset/$$.js +4 -0
- package/build/lib/graphql-changeset/$$.js.map +1 -0
- package/build/lib/graphql-changeset/$.d.ts +2 -0
- package/build/lib/graphql-changeset/$.d.ts.map +1 -0
- package/build/lib/graphql-changeset/$.js +2 -0
- package/build/lib/graphql-changeset/$.js.map +1 -0
- package/build/lib/graphql-changeset/changelog.d.ts +4 -0
- package/build/lib/graphql-changeset/changelog.d.ts.map +1 -0
- package/build/lib/graphql-changeset/changelog.js +2 -0
- package/build/lib/graphql-changeset/changelog.js.map +1 -0
- package/build/lib/graphql-changeset/changeset.d.ts +66 -0
- package/build/lib/graphql-changeset/changeset.d.ts.map +1 -0
- package/build/lib/graphql-changeset/changeset.js +139 -0
- package/build/lib/graphql-changeset/changeset.js.map +1 -0
- package/build/lib/graphql-changeset/versioned-schema.d.ts +31 -0
- package/build/lib/graphql-changeset/versioned-schema.d.ts.map +1 -0
- package/build/lib/graphql-changeset/versioned-schema.js +14 -0
- package/build/lib/graphql-changeset/versioned-schema.js.map +1 -0
- package/build/lib/graphql-path/$$.d.ts +42 -0
- package/build/lib/graphql-path/$$.d.ts.map +1 -0
- package/build/lib/graphql-path/$$.js +42 -0
- package/build/lib/graphql-path/$$.js.map +1 -0
- package/build/lib/graphql-path/$.d.ts +5 -0
- package/build/lib/graphql-path/$.d.ts.map +1 -0
- package/build/lib/graphql-path/$.js +5 -0
- package/build/lib/graphql-path/$.js.map +1 -0
- package/build/lib/graphql-path/constructors.d.ts +57 -0
- package/build/lib/graphql-path/constructors.d.ts.map +1 -0
- package/build/lib/graphql-path/constructors.js +73 -0
- package/build/lib/graphql-path/constructors.js.map +1 -0
- package/build/lib/graphql-path/definition.d.ts +152 -0
- package/build/lib/graphql-path/definition.d.ts.map +1 -0
- package/build/lib/graphql-path/definition.js +192 -0
- package/build/lib/graphql-path/definition.js.map +1 -0
- package/build/lib/graphql-path/query.d.ts +75 -0
- package/build/lib/graphql-path/query.d.ts.map +1 -0
- package/build/lib/graphql-path/query.js +111 -0
- package/build/lib/graphql-path/query.js.map +1 -0
- package/build/lib/graphql-path/types.d.ts +50 -0
- package/build/lib/graphql-path/types.d.ts.map +1 -0
- package/build/lib/graphql-path/types.js +5 -0
- package/build/lib/graphql-path/types.js.map +1 -0
- package/build/lib/graphql-schema-loader/{index.js → $.d.ts} +1 -1
- package/build/lib/graphql-schema-loader/$.d.ts.map +1 -0
- package/build/lib/graphql-schema-loader/{index.d.ts → $.js} +1 -1
- package/build/lib/graphql-schema-loader/$.js.map +1 -0
- 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/hono-aid/{index.js → $.d.ts} +1 -1
- package/build/lib/hono-aid/$.d.ts.map +1 -0
- package/build/lib/hono-aid/{index.d.ts → $.js} +1 -1
- package/build/lib/hono-aid/$.js.map +1 -0
- package/build/lib/html-utils/$$.d.ts +3 -0
- package/build/lib/html-utils/$$.d.ts.map +1 -0
- package/build/lib/html-utils/$$.js +3 -0
- package/build/lib/html-utils/$$.js.map +1 -0
- package/build/lib/html-utils/$.d.ts +2 -0
- package/build/lib/html-utils/$.d.ts.map +1 -0
- package/build/lib/html-utils/$.js +2 -0
- package/build/lib/html-utils/$.js.map +1 -0
- package/build/lib/kit-temp.d.ts +1 -0
- package/build/lib/kit-temp.d.ts.map +1 -1
- package/build/lib/react-router-aid/{react-router-aid.d.ts → $$.d.ts} +1 -1
- package/build/lib/react-router-aid/$$.d.ts.map +1 -0
- package/build/lib/react-router-aid/{react-router-aid.js → $$.js} +1 -1
- package/build/lib/react-router-aid/$$.js.map +1 -0
- package/build/lib/react-router-aid/$.d.ts +2 -0
- package/build/lib/react-router-aid/$.d.ts.map +1 -0
- package/build/lib/react-router-aid/$.js +2 -0
- package/build/lib/react-router-aid/$.js.map +1 -0
- package/build/lib/react-router-loader/{react-router-loader.d.ts → $$.d.ts} +1 -1
- package/build/lib/react-router-loader/$$.d.ts.map +1 -0
- package/build/lib/react-router-loader/{react-router-loader.js → $$.js} +1 -1
- package/build/lib/react-router-loader/$$.js.map +1 -0
- package/build/lib/react-router-loader/$.d.ts +2 -0
- package/build/lib/react-router-loader/$.d.ts.map +1 -0
- package/build/lib/react-router-loader/$.js +2 -0
- package/build/lib/react-router-loader/$.js.map +1 -0
- package/build/lib/schema-lifecycle/$$.d.ts +6 -0
- package/build/lib/schema-lifecycle/$$.d.ts.map +1 -0
- package/build/lib/schema-lifecycle/$$.js +6 -0
- package/build/lib/schema-lifecycle/$$.js.map +1 -0
- package/build/lib/schema-lifecycle/$.d.ts +2 -0
- package/build/lib/schema-lifecycle/$.d.ts.map +1 -0
- package/build/lib/schema-lifecycle/$.js +2 -0
- package/build/lib/schema-lifecycle/$.js.map +1 -0
- package/build/lib/schema-lifecycle/FieldLifecycle.d.ts +17 -0
- package/build/lib/schema-lifecycle/FieldLifecycle.d.ts.map +1 -0
- package/build/lib/schema-lifecycle/FieldLifecycle.js +2 -0
- package/build/lib/schema-lifecycle/FieldLifecycle.js.map +1 -0
- package/build/lib/schema-lifecycle/LifecycleEvent.d.ts +25 -0
- package/build/lib/schema-lifecycle/LifecycleEvent.d.ts.map +1 -0
- package/build/lib/schema-lifecycle/LifecycleEvent.js +2 -0
- package/build/lib/schema-lifecycle/LifecycleEvent.js.map +1 -0
- package/build/lib/schema-lifecycle/NamedTypeLifecycle.d.ts +59 -0
- package/build/lib/schema-lifecycle/NamedTypeLifecycle.d.ts.map +1 -0
- package/build/lib/schema-lifecycle/NamedTypeLifecycle.js +24 -0
- package/build/lib/schema-lifecycle/NamedTypeLifecycle.js.map +1 -0
- package/build/lib/schema-lifecycle/SchemaLifecycle.d.ts +25 -0
- package/build/lib/schema-lifecycle/SchemaLifecycle.d.ts.map +1 -0
- package/build/lib/schema-lifecycle/SchemaLifecycle.js +59 -0
- package/build/lib/schema-lifecycle/SchemaLifecycle.js.map +1 -0
- package/build/lib/schema-lifecycle/SchemaLink.d.ts +2 -0
- package/build/lib/schema-lifecycle/SchemaLink.d.ts.map +1 -0
- package/build/lib/schema-lifecycle/SchemaLink.js +38 -0
- package/build/lib/schema-lifecycle/SchemaLink.js.map +1 -0
- package/build/lib/schema-lifecycle/handlers.d.ts +20 -0
- package/build/lib/schema-lifecycle/handlers.d.ts.map +1 -0
- package/build/lib/schema-lifecycle/handlers.js +168 -0
- package/build/lib/schema-lifecycle/handlers.js.map +1 -0
- package/build/lib/schema-lifecycle/utils.d.ts +53 -0
- package/build/lib/schema-lifecycle/utils.d.ts.map +1 -0
- package/build/lib/schema-lifecycle/utils.js +160 -0
- package/build/lib/schema-lifecycle/utils.js.map +1 -0
- package/build/lib/stack-processor/{index.js → $.d.ts} +1 -1
- package/build/lib/stack-processor/$.d.ts.map +1 -0
- package/build/lib/stack-processor/{index.d.ts → $.js} +1 -1
- package/build/lib/stack-processor/$.js.map +1 -0
- package/build/lib/superjson-codec/{exports.js → $$.d.ts} +1 -1
- package/build/lib/superjson-codec/$$.d.ts.map +1 -0
- package/build/lib/superjson-codec/{exports.d.ts → $$.js} +1 -1
- package/build/lib/superjson-codec/$$.js.map +1 -0
- package/build/lib/superjson-codec/$.d.ts +2 -0
- package/build/lib/superjson-codec/$.d.ts.map +1 -0
- package/build/lib/superjson-codec/$.js +2 -0
- package/build/lib/superjson-codec/$.js.map +1 -0
- package/build/lib/superjson-codec/codecs/graphql-schema.d.ts +1 -1
- package/build/lib/superjson-codec/codecs/graphql-schema.d.ts.map +1 -1
- package/build/lib/superjson-codec/codecs/graphql-schema.js +1 -1
- package/build/lib/superjson-codec/codecs/graphql-schema.js.map +1 -1
- package/build/lib/theme/$$.d.ts +2 -0
- package/build/lib/theme/$$.d.ts.map +1 -0
- package/build/lib/theme/$$.js +2 -0
- package/build/lib/theme/$$.js.map +1 -0
- package/build/lib/theme/$.d.ts +1 -1
- package/build/lib/theme/$.d.ts.map +1 -1
- package/build/lib/theme/$.js +1 -1
- package/build/lib/theme/$.js.map +1 -1
- package/build/lib/vite-plugin-config/{vite-plugin-config.d.ts → $$.d.ts} +1 -1
- package/build/lib/vite-plugin-config/$$.d.ts.map +1 -0
- package/build/lib/vite-plugin-config/{vite-plugin-config.js → $$.js} +1 -1
- package/build/lib/vite-plugin-config/$$.js.map +1 -0
- package/build/lib/vite-plugin-config/$.d.ts +2 -0
- package/build/lib/vite-plugin-config/$.d.ts.map +1 -0
- package/build/lib/vite-plugin-config/$.js +2 -0
- package/build/lib/vite-plugin-config/$.js.map +1 -0
- package/build/lib/vite-plugin-json/{index.js → $.d.ts} +1 -1
- package/build/lib/vite-plugin-json/$.d.ts.map +1 -0
- package/build/lib/vite-plugin-json/{index.d.ts → $.js} +1 -1
- package/build/lib/vite-plugin-json/$.js.map +1 -0
- package/build/lib/vite-plugin-mdx/{index.js → $.d.ts} +1 -1
- package/build/lib/vite-plugin-mdx/$.d.ts.map +1 -0
- package/build/lib/vite-plugin-mdx/{index.d.ts → $.js} +1 -1
- package/build/lib/vite-plugin-mdx/$.js.map +1 -0
- package/build/lib/vite-plugin-reactive-data/{index.js → $.d.ts} +1 -1
- package/build/lib/vite-plugin-reactive-data/$.d.ts.map +1 -0
- package/build/lib/vite-plugin-reactive-data/{index.d.ts → $.js} +1 -1
- package/build/lib/vite-plugin-reactive-data/$.js.map +1 -0
- package/build/lib/vite-plugin-reactive-data/vite-plugin-reactive-data.d.ts +1 -1
- package/build/lib/vite-plugin-reactive-data/vite-plugin-reactive-data.d.ts.map +1 -1
- package/build/lib/vite-plugins/$$.d.ts +2 -0
- package/build/lib/vite-plugins/$$.d.ts.map +1 -0
- package/build/lib/vite-plugins/$$.js +2 -0
- package/build/lib/vite-plugins/$$.js.map +1 -0
- package/build/lib/vite-plugins/$.d.ts +5 -0
- package/build/lib/vite-plugins/$.d.ts.map +1 -0
- package/build/lib/vite-plugins/$.js +5 -0
- package/build/lib/vite-plugins/$.js.map +1 -0
- package/build/lib/vite-virtual/{vite-virtual.js → $$.d.ts} +1 -1
- package/build/lib/vite-virtual/$$.d.ts.map +1 -0
- package/build/lib/vite-virtual/{vite-virtual.d.ts → $$.js} +1 -1
- package/build/lib/vite-virtual/$$.js.map +1 -0
- package/build/lib/vite-virtual/$.d.ts +2 -0
- package/build/lib/vite-virtual/$.d.ts.map +1 -0
- package/build/lib/vite-virtual/$.js +2 -0
- package/build/lib/vite-virtual/$.js.map +1 -0
- package/build/lib/vite-virtual/identified-loader.js +1 -1
- package/build/lib/vite-virtual/identified-loader.js.map +1 -1
- package/build/sandbox.js +2 -40
- package/build/sandbox.js.map +1 -1
- package/build/singletons/superjson.js +1 -1
- package/build/singletons/superjson.js.map +1 -1
- package/build/template/components/ArgumentListAnnotation.js +1 -1
- package/build/template/components/ArgumentListAnnotation.js.map +1 -1
- package/build/template/components/Changelog/ChangeBase.d.ts +1 -1
- package/build/template/components/Changelog/ChangeBase.d.ts.map +1 -1
- package/build/template/components/Changelog/CriticalitySection.d.ts +1 -1
- package/build/template/components/Changelog/CriticalitySection.d.ts.map +1 -1
- package/build/template/components/Changelog/CriticalitySection.js.map +1 -1
- package/build/template/components/Changelog/groups/DirectiveArgument.d.ts +1 -1
- package/build/template/components/Changelog/groups/DirectiveArgument.d.ts.map +1 -1
- package/build/template/components/Changelog/groups/DirectiveArgumentDescription.d.ts +1 -1
- package/build/template/components/Changelog/groups/DirectiveArgumentDescription.d.ts.map +1 -1
- package/build/template/components/Changelog/groups/DirectiveArgumentOperation.d.ts +1 -1
- package/build/template/components/Changelog/groups/DirectiveArgumentOperation.d.ts.map +1 -1
- package/build/template/components/Changelog/groups/DirectiveDescription.d.ts +1 -1
- package/build/template/components/Changelog/groups/DirectiveDescription.d.ts.map +1 -1
- package/build/template/components/Changelog/groups/DirectiveLocationOperation.d.ts +1 -1
- package/build/template/components/Changelog/groups/DirectiveLocationOperation.d.ts.map +1 -1
- package/build/template/components/Changelog/groups/DirectiveOperation.d.ts +1 -1
- package/build/template/components/Changelog/groups/DirectiveOperation.d.ts.map +1 -1
- package/build/template/components/Changelog/groups/DirectiveUsage.d.ts +1 -1
- package/build/template/components/Changelog/groups/DirectiveUsage.d.ts.map +1 -1
- package/build/template/components/Changelog/groups/EnumValueDeprecationReason.d.ts +1 -1
- package/build/template/components/Changelog/groups/EnumValueDeprecationReason.d.ts.map +1 -1
- package/build/template/components/Changelog/groups/EnumValueDescription.d.ts +1 -1
- package/build/template/components/Changelog/groups/EnumValueDescription.d.ts.map +1 -1
- package/build/template/components/Changelog/groups/EnumValueOperation.d.ts +1 -1
- package/build/template/components/Changelog/groups/EnumValueOperation.d.ts.map +1 -1
- package/build/template/components/Changelog/groups/FieldArgument.d.ts +1 -1
- package/build/template/components/Changelog/groups/FieldArgument.d.ts.map +1 -1
- package/build/template/components/Changelog/groups/FieldArgumentDescription.d.ts +1 -1
- package/build/template/components/Changelog/groups/FieldArgumentDescription.d.ts.map +1 -1
- package/build/template/components/Changelog/groups/FieldArgumentOperation.d.ts +1 -1
- package/build/template/components/Changelog/groups/FieldArgumentOperation.d.ts.map +1 -1
- package/build/template/components/Changelog/groups/FieldDeprecation.d.ts +1 -1
- package/build/template/components/Changelog/groups/FieldDeprecation.d.ts.map +1 -1
- package/build/template/components/Changelog/groups/FieldDeprecationReason.d.ts +1 -1
- package/build/template/components/Changelog/groups/FieldDeprecationReason.d.ts.map +1 -1
- package/build/template/components/Changelog/groups/FieldDescription.d.ts +1 -1
- package/build/template/components/Changelog/groups/FieldDescription.d.ts.map +1 -1
- package/build/template/components/Changelog/groups/FieldOperation.d.ts +1 -1
- package/build/template/components/Changelog/groups/FieldOperation.d.ts.map +1 -1
- package/build/template/components/Changelog/groups/InputFieldDefaultValue.d.ts +1 -1
- package/build/template/components/Changelog/groups/InputFieldDefaultValue.d.ts.map +1 -1
- package/build/template/components/Changelog/groups/InputFieldDescription.d.ts +1 -1
- package/build/template/components/Changelog/groups/InputFieldDescription.d.ts.map +1 -1
- package/build/template/components/Changelog/groups/InputFieldOperation.d.ts +1 -1
- package/build/template/components/Changelog/groups/InputFieldOperation.d.ts.map +1 -1
- package/build/template/components/Changelog/groups/ObjectTypeInterfaceOperation.d.ts +1 -1
- package/build/template/components/Changelog/groups/ObjectTypeInterfaceOperation.d.ts.map +1 -1
- package/build/template/components/Changelog/groups/SchemaRootType.d.ts +1 -1
- package/build/template/components/Changelog/groups/SchemaRootType.d.ts.map +1 -1
- package/build/template/components/Changelog/groups/TypeDescription.d.ts +1 -1
- package/build/template/components/Changelog/groups/TypeDescription.d.ts.map +1 -1
- package/build/template/components/Changelog/groups/TypeOperation.d.ts +1 -1
- package/build/template/components/Changelog/groups/TypeOperation.d.ts.map +1 -1
- package/build/template/components/Changelog/groups/UnionMemberOperation.d.ts +1 -1
- package/build/template/components/Changelog/groups/UnionMemberOperation.d.ts.map +1 -1
- package/build/template/components/Changelog.d.ts +2 -2
- package/build/template/components/Changelog.d.ts.map +1 -1
- package/build/template/components/Changelog.js +11 -8
- package/build/template/components/Changelog.js.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 +2 -1
- package/build/template/components/Field.d.ts.map +1 -1
- package/build/template/components/Field.js +23 -4
- package/build/template/components/Field.js.map +1 -1
- package/build/template/components/FieldList.d.ts +2 -1
- package/build/template/components/FieldList.d.ts.map +1 -1
- package/build/template/components/FieldList.js +3 -3
- package/build/template/components/FieldList.js.map +1 -1
- package/build/template/components/FieldListSection.js +2 -2
- package/build/template/components/FieldListSection.js.map +1 -1
- package/build/template/components/HamburgerMenu.d.ts +1 -0
- package/build/template/components/HamburgerMenu.d.ts.map +1 -1
- package/build/template/components/HamburgerMenu.js +2 -2
- package/build/template/components/HamburgerMenu.js.map +1 -1
- package/build/template/components/NamedType.d.ts.map +1 -1
- package/build/template/components/NamedType.js +11 -2
- package/build/template/components/NamedType.js.map +1 -1
- package/build/template/components/TypeIndex.js +1 -1
- package/build/template/components/TypeIndex.js.map +1 -1
- package/build/template/components/graphql/type-kind-icon.d.ts +1 -1
- package/build/template/components/graphql/type-kind-icon.d.ts.map +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.js +1 -1
- package/build/template/components/graphql/type-link.js.map +1 -1
- package/build/template/components/navbar/DefaultNavbar.d.ts +4 -0
- package/build/template/components/navbar/DefaultNavbar.d.ts.map +1 -0
- package/build/template/components/navbar/DefaultNavbar.js +10 -0
- package/build/template/components/navbar/DefaultNavbar.js.map +1 -0
- package/build/template/components/navbar/Item.d.ts +7 -0
- package/build/template/components/navbar/Item.d.ts.map +1 -0
- package/build/template/components/navbar/Item.js +6 -0
- package/build/template/components/navbar/Item.js.map +1 -0
- package/build/template/components/sidebar/Sidebar.d.ts +2 -1
- package/build/template/components/sidebar/Sidebar.d.ts.map +1 -1
- package/build/template/components/sidebar/Sidebar.js +2 -2
- package/build/template/components/sidebar/Sidebar.js.map +1 -1
- package/build/template/contexts/SchemaLifecycleContext.d.ts +14 -0
- package/build/template/contexts/SchemaLifecycleContext.d.ts.map +1 -0
- package/build/template/contexts/SchemaLifecycleContext.js +15 -0
- package/build/template/contexts/SchemaLifecycleContext.js.map +1 -0
- package/build/template/layouts/ChangelogLayout.d.ts +1 -1
- package/build/template/layouts/ChangelogLayout.d.ts.map +1 -1
- package/build/template/layouts/ChangelogLayout.js +11 -3
- package/build/template/layouts/ChangelogLayout.js.map +1 -1
- package/build/template/layouts/SidebarLayout.d.ts +1 -0
- package/build/template/layouts/SidebarLayout.d.ts.map +1 -1
- package/build/template/layouts/SidebarLayout.js +2 -2
- package/build/template/layouts/SidebarLayout.js.map +1 -1
- package/build/template/routes/changelog.d.ts +4 -2
- package/build/template/routes/changelog.d.ts.map +1 -1
- package/build/template/routes/changelog.js.map +1 -1
- package/build/template/routes/reference.d.ts +6 -1
- package/build/template/routes/reference.d.ts.map +1 -1
- package/build/template/routes/reference.js +8 -4
- package/build/template/routes/reference.js.map +1 -1
- package/build/template/routes/root.d.ts.map +1 -1
- package/build/template/routes/root.js +12 -2
- package/build/template/routes/root.js.map +1 -1
- package/build/template/server/middleware/unsupported-assets.js +2 -2
- package/build/template/server/middleware/unsupported-assets.js.map +1 -1
- package/build/template/server/ssg/get-route-paths.js +1 -1
- package/build/template/server/ssg/get-route-paths.js.map +1 -1
- package/build/template/sources/schema-source.d.ts +6 -4
- package/build/template/sources/schema-source.d.ts.map +1 -1
- package/package.json +124 -4
- package/src/api/api.ts +1 -0
- package/src/api/cache/$$.ts +1 -0
- package/src/api/cache/$.ts +1 -0
- package/src/api/cache/cache.ts +210 -0
- package/src/api/content/navbar.test.ts +3 -3
- package/src/api/content/navbar.ts +2 -0
- package/src/api/content/page.ts +1 -1
- package/src/api/content/scan.ts +1 -1
- package/src/api/content/sidebar.ts +1 -1
- package/src/api/hooks/helpers.ts +5 -0
- package/src/api/hooks/index.ts +2 -0
- package/src/api/hooks/types.ts +8 -0
- package/src/api/iso/schema/$$.ts +0 -3
- package/src/api/iso/schema/routing.ts +1 -1
- package/src/api/iso/schema/validation.ts +1 -1
- package/src/api/schema/data-sources/introspection/introspection.ts +13 -10
- package/src/api/schema/data-sources/memory/memory.ts +26 -16
- package/src/api/schema/data-sources/schema-directory/schema-directory.ts +28 -18
- package/src/api/schema/data-sources/schema-file/schema-file.ts +10 -10
- package/src/api/schema/read.ts +5 -5
- package/src/api/schema/schema.ts +0 -14
- package/src/api/schema-augmentation/augmentations/description.ts +1 -1
- package/src/api/schema-augmentation/schema-augmentation.ts +1 -1
- package/src/api/schema-augmentation/target.ts +1 -1
- package/src/api/schema-source/schema-source.ts +59 -32
- package/src/api/vite/plugins/build.ts +1 -1
- package/src/api/vite/plugins/core.ts +51 -12
- package/src/api/vite/plugins/pages.ts +1 -1
- package/src/api/vite/plugins/schema-assets.ts +21 -7
- package/src/api/vite/vi.ts +1 -1
- package/src/cli/commands/cache/$default.ts +10 -0
- package/src/cli/commands/cache/delete.ts +27 -0
- package/src/cli/commands/cache/show.ts +99 -0
- package/src/cli/commands/cache.ts +9 -0
- package/src/cli/commands/config.ts +3 -0
- package/src/cli/commands/open.ts +2 -2
- package/src/cli/commands/static.ts +3 -0
- package/src/exports/polen.ts +1 -0
- package/src/exports/radix-ui/react-icons.ts +3 -0
- package/src/exports/radix-ui/themes.ts +3 -0
- package/src/lib/errors/$.ts +1 -0
- package/src/lib/file-router/$.ts +1 -0
- package/src/lib/file-router/index.test.ts +1 -1
- package/src/lib/grafaid/$.ts +1 -0
- package/src/lib/grafaid/schema/type.ts +1 -0
- package/src/lib/graphql-change/{graphql-change.ts → $$.ts} +1 -1
- package/src/lib/graphql-change/$.ts +1 -0
- package/src/lib/graphql-change/change-groups.ts +56 -26
- package/src/lib/graphql-changeset/$$.ts +3 -0
- package/src/lib/graphql-changeset/$.ts +1 -0
- package/src/lib/graphql-changeset/changelog.ts +9 -0
- package/src/lib/graphql-changeset/changeset.ts +190 -0
- package/src/lib/graphql-changeset/versioned-schema.ts +43 -0
- package/src/lib/graphql-path/$$.ts +42 -0
- package/src/lib/graphql-path/$.ts +4 -0
- package/src/lib/graphql-path/constructors.ts +81 -0
- package/src/lib/graphql-path/definition.ts +240 -0
- package/src/lib/graphql-path/query.ts +118 -0
- package/src/lib/graphql-path/types.ts +55 -0
- package/src/lib/graphql-schema-loader/graphql-schema-loader.ts +1 -1
- package/src/lib/html-utils/$$.ts +2 -0
- package/src/lib/html-utils/$.ts +1 -0
- package/src/lib/kit-temp.ts +3 -0
- package/src/lib/path-map/$.test.ts +4 -3
- package/src/lib/react-router-aid/$.ts +1 -0
- package/src/lib/react-router-loader/$.ts +1 -0
- package/src/lib/schema-lifecycle/$$.ts +19 -0
- package/src/lib/schema-lifecycle/$.test.ts +222 -0
- package/src/lib/schema-lifecycle/$.ts +1 -0
- package/src/lib/schema-lifecycle/FieldLifecycle.ts +18 -0
- package/src/lib/schema-lifecycle/LifecycleEvent.ts +27 -0
- package/src/lib/schema-lifecycle/NamedTypeLifecycle.ts +96 -0
- package/src/lib/schema-lifecycle/SchemaLifecycle.ts +85 -0
- package/src/lib/schema-lifecycle/SchemaLink.ts +40 -0
- package/src/lib/schema-lifecycle/handlers.ts +215 -0
- package/src/lib/schema-lifecycle/utils.ts +234 -0
- package/src/lib/superjson-codec/$.ts +1 -0
- package/src/lib/superjson-codec/codecs/graphql-schema.ts +1 -1
- package/src/lib/theme/$$.ts +1 -0
- package/src/lib/theme/$.ts +1 -1
- package/src/lib/vite-plugin-config/$.ts +1 -0
- package/src/lib/vite-plugin-reactive-data/vite-plugin-reactive-data.ts +1 -1
- package/src/lib/vite-plugins/$.ts +4 -0
- package/src/lib/vite-virtual/$.ts +1 -0
- package/src/lib/vite-virtual/identified-loader.ts +1 -1
- package/src/sandbox.ts +1 -43
- package/src/singletons/superjson.ts +1 -1
- package/src/template/components/ArgumentListAnnotation.tsx +1 -1
- package/src/template/components/Changelog/ChangeBase.tsx +1 -1
- package/src/template/components/Changelog/CriticalitySection.tsx +1 -1
- package/src/template/components/Changelog/groups/DirectiveArgument.tsx +1 -1
- package/src/template/components/Changelog/groups/DirectiveArgumentDescription.tsx +1 -1
- package/src/template/components/Changelog/groups/DirectiveArgumentOperation.tsx +1 -1
- package/src/template/components/Changelog/groups/DirectiveDescription.tsx +1 -1
- package/src/template/components/Changelog/groups/DirectiveLocationOperation.tsx +1 -1
- package/src/template/components/Changelog/groups/DirectiveOperation.tsx +1 -1
- package/src/template/components/Changelog/groups/DirectiveUsage.tsx +1 -1
- package/src/template/components/Changelog/groups/EnumValueDeprecationReason.tsx +1 -1
- package/src/template/components/Changelog/groups/EnumValueDescription.tsx +1 -1
- package/src/template/components/Changelog/groups/EnumValueOperation.tsx +1 -1
- package/src/template/components/Changelog/groups/FieldArgument.tsx +1 -1
- package/src/template/components/Changelog/groups/FieldArgumentDescription.tsx +1 -1
- package/src/template/components/Changelog/groups/FieldArgumentOperation.tsx +1 -1
- package/src/template/components/Changelog/groups/FieldDeprecation.tsx +1 -1
- package/src/template/components/Changelog/groups/FieldDeprecationReason.tsx +1 -1
- package/src/template/components/Changelog/groups/FieldDescription.tsx +1 -1
- package/src/template/components/Changelog/groups/FieldOperation.tsx +1 -1
- package/src/template/components/Changelog/groups/InputFieldDefaultValue.tsx +1 -1
- package/src/template/components/Changelog/groups/InputFieldDescription.tsx +1 -1
- package/src/template/components/Changelog/groups/InputFieldOperation.tsx +1 -1
- package/src/template/components/Changelog/groups/ObjectTypeInterfaceOperation.tsx +1 -1
- package/src/template/components/Changelog/groups/SchemaRootType.tsx +1 -1
- package/src/template/components/Changelog/groups/TypeDescription.tsx +1 -1
- package/src/template/components/Changelog/groups/TypeOperation.tsx +1 -1
- package/src/template/components/Changelog/groups/UnionMemberOperation.tsx +1 -1
- package/src/template/components/Changelog.tsx +12 -11
- package/src/template/components/DeprecationReason.tsx +1 -1
- package/src/template/components/Description.tsx +1 -1
- package/src/template/components/Field.tsx +48 -4
- package/src/template/components/FieldList.tsx +4 -2
- package/src/template/components/FieldListSection.tsx +2 -2
- package/src/template/components/HamburgerMenu.tsx +3 -1
- package/src/template/components/NamedType.tsx +31 -2
- package/src/template/components/TypeIndex.tsx +1 -1
- package/src/template/components/graphql/type-kind-icon.tsx +1 -1
- package/src/template/components/graphql/type-kind-tokens.ts +1 -1
- package/src/template/components/graphql/type-link.tsx +1 -1
- package/src/template/components/navbar/DefaultNavbar.tsx +22 -0
- package/src/template/components/navbar/Item.tsx +11 -0
- package/src/template/components/sidebar/Sidebar.tsx +7 -1
- package/src/template/contexts/SchemaLifecycleContext.tsx +30 -0
- package/src/template/layouts/ChangelogLayout.tsx +11 -4
- package/src/template/layouts/SidebarLayout.tsx +4 -2
- package/src/template/routes/changelog.tsx +4 -2
- package/src/template/routes/reference.tsx +26 -11
- package/src/template/routes/root.tsx +25 -18
- package/src/template/server/create-page-html-response.ts +1 -1
- package/src/template/server/middleware/unsupported-assets.ts +2 -2
- package/src/template/server/ssg/get-route-paths.ts +1 -1
- package/src/vite-env.d.ts +5 -0
- package/build/lib/apple-touch-icon/index.d.ts.map +0 -1
- package/build/lib/apple-touch-icon/index.js.map +0 -1
- package/build/lib/errors/errors.d.ts.map +0 -1
- package/build/lib/errors/errors.js.map +0 -1
- package/build/lib/errors/index.d.ts +0 -2
- package/build/lib/errors/index.d.ts.map +0 -1
- package/build/lib/errors/index.js +0 -2
- package/build/lib/errors/index.js.map +0 -1
- package/build/lib/extensible-data/index.d.ts.map +0 -1
- package/build/lib/extensible-data/index.js.map +0 -1
- package/build/lib/favicon/index.d.ts.map +0 -1
- package/build/lib/favicon/index.js.map +0 -1
- package/build/lib/file-router/file-router.d.ts.map +0 -1
- package/build/lib/file-router/file-router.js.map +0 -1
- package/build/lib/file-router/index.d.ts +0 -2
- package/build/lib/file-router/index.d.ts.map +0 -1
- package/build/lib/file-router/index.js +0 -2
- package/build/lib/file-router/index.js.map +0 -1
- package/build/lib/grafaid/grafaid.d.ts.map +0 -1
- package/build/lib/grafaid/grafaid.js.map +0 -1
- package/build/lib/grafaid/index.d.ts +0 -2
- package/build/lib/grafaid/index.d.ts.map +0 -1
- package/build/lib/grafaid/index.js +0 -2
- package/build/lib/grafaid/index.js.map +0 -1
- package/build/lib/grafaid-old/index.d.ts.map +0 -1
- package/build/lib/grafaid-old/index.js.map +0 -1
- package/build/lib/graphql-change/graphql-change.d.ts.map +0 -1
- package/build/lib/graphql-change/graphql-change.js.map +0 -1
- package/build/lib/graphql-change/index.d.ts +0 -2
- package/build/lib/graphql-change/index.d.ts.map +0 -1
- package/build/lib/graphql-change/index.js +0 -2
- package/build/lib/graphql-change/index.js.map +0 -1
- package/build/lib/graphql-changeset/graphql-changeset.d.ts +0 -9
- package/build/lib/graphql-changeset/graphql-changeset.d.ts.map +0 -1
- package/build/lib/graphql-changeset/graphql-changeset.js +0 -2
- package/build/lib/graphql-changeset/graphql-changeset.js.map +0 -1
- package/build/lib/graphql-changeset/index.d.ts +0 -2
- package/build/lib/graphql-changeset/index.d.ts.map +0 -1
- package/build/lib/graphql-changeset/index.js +0 -2
- package/build/lib/graphql-changeset/index.js.map +0 -1
- package/build/lib/graphql-schema-loader/index.d.ts.map +0 -1
- package/build/lib/graphql-schema-loader/index.js.map +0 -1
- package/build/lib/hono-aid/index.d.ts.map +0 -1
- package/build/lib/hono-aid/index.js.map +0 -1
- package/build/lib/react-router-aid/index.d.ts +0 -2
- package/build/lib/react-router-aid/index.d.ts.map +0 -1
- package/build/lib/react-router-aid/index.js +0 -2
- package/build/lib/react-router-aid/index.js.map +0 -1
- package/build/lib/react-router-aid/react-router-aid.d.ts.map +0 -1
- package/build/lib/react-router-aid/react-router-aid.js.map +0 -1
- package/build/lib/react-router-loader/react-router-loader.d.ts.map +0 -1
- package/build/lib/react-router-loader/react-router-loader.js.map +0 -1
- package/build/lib/stack-processor/index.d.ts.map +0 -1
- package/build/lib/stack-processor/index.js.map +0 -1
- package/build/lib/superjson-codec/exports.d.ts.map +0 -1
- package/build/lib/superjson-codec/exports.js.map +0 -1
- package/build/lib/superjson-codec/index.d.ts +0 -2
- package/build/lib/superjson-codec/index.d.ts.map +0 -1
- package/build/lib/superjson-codec/index.js +0 -2
- package/build/lib/superjson-codec/index.js.map +0 -1
- package/build/lib/vite-plugin-config/vite-plugin-config.d.ts.map +0 -1
- package/build/lib/vite-plugin-config/vite-plugin-config.js.map +0 -1
- package/build/lib/vite-plugin-json/index.d.ts.map +0 -1
- package/build/lib/vite-plugin-json/index.js.map +0 -1
- package/build/lib/vite-plugin-mdx/index.d.ts.map +0 -1
- package/build/lib/vite-plugin-mdx/index.js.map +0 -1
- package/build/lib/vite-plugin-reactive-data/index.d.ts.map +0 -1
- package/build/lib/vite-plugin-reactive-data/index.js.map +0 -1
- package/build/lib/vite-plugins/index.d.ts +0 -5
- package/build/lib/vite-plugins/index.d.ts.map +0 -1
- package/build/lib/vite-plugins/index.js +0 -5
- package/build/lib/vite-plugins/index.js.map +0 -1
- package/build/lib/vite-plugins/vite-plugins.d.ts +0 -2
- package/build/lib/vite-plugins/vite-plugins.d.ts.map +0 -1
- package/build/lib/vite-plugins/vite-plugins.js +0 -2
- package/build/lib/vite-plugins/vite-plugins.js.map +0 -1
- package/build/lib/vite-virtual/index.d.ts +0 -2
- package/build/lib/vite-virtual/index.d.ts.map +0 -1
- package/build/lib/vite-virtual/index.js +0 -2
- package/build/lib/vite-virtual/index.js.map +0 -1
- package/build/lib/vite-virtual/vite-virtual.d.ts.map +0 -1
- package/build/lib/vite-virtual/vite-virtual.js.map +0 -1
- package/src/lib/errors/index.ts +0 -1
- package/src/lib/file-router/index.ts +0 -1
- package/src/lib/grafaid/index.ts +0 -1
- package/src/lib/graphql-change/index.ts +0 -1
- package/src/lib/graphql-changeset/graphql-changeset.ts +0 -9
- package/src/lib/graphql-changeset/index.ts +0 -1
- package/src/lib/react-router-aid/index.ts +0 -1
- package/src/lib/superjson-codec/index.ts +0 -1
- package/src/lib/vite-plugins/index.ts +0 -4
- package/src/lib/vite-virtual/index.ts +0 -1
- /package/src/lib/apple-touch-icon/{index.ts → $.ts} +0 -0
- /package/src/lib/errors/{errors.ts → $$.ts} +0 -0
- /package/src/lib/extensible-data/{index.ts → $.ts} +0 -0
- /package/src/lib/favicon/{index.ts → $.ts} +0 -0
- /package/src/lib/file-router/{file-router.ts → $$.ts} +0 -0
- /package/src/lib/grafaid/{grafaid.ts → $$.ts} +0 -0
- /package/src/lib/grafaid-old/{index.ts → $.ts} +0 -0
- /package/src/lib/graphql-schema-loader/{index.ts → $.ts} +0 -0
- /package/src/lib/hono-aid/{index.ts → $.ts} +0 -0
- /package/src/lib/react-router-aid/{react-router-aid.ts → $$.ts} +0 -0
- /package/src/lib/react-router-loader/{react-router-loader.ts → $$.ts} +0 -0
- /package/src/lib/stack-processor/{index.ts → $.ts} +0 -0
- /package/src/lib/superjson-codec/{exports.ts → $$.ts} +0 -0
- /package/src/lib/vite-plugin-config/{vite-plugin-config.ts → $$.ts} +0 -0
- /package/src/lib/vite-plugin-json/{index.ts → $.ts} +0 -0
- /package/src/lib/vite-plugin-mdx/{index.ts → $.ts} +0 -0
- /package/src/lib/vite-plugin-reactive-data/{index.ts → $.ts} +0 -0
- /package/src/lib/vite-plugins/{vite-plugins.ts → $$.ts} +0 -0
- /package/src/lib/vite-virtual/{vite-virtual.ts → $$.ts} +0 -0
@@ -3,13 +3,13 @@ import { SchemaAugmentation } from '#api/schema-augmentation/index'
|
|
3
3
|
import { createSchemaSource } from '#api/schema-source/index'
|
4
4
|
import { Schema } from '#api/schema/index'
|
5
5
|
import type { Vite } from '#dep/vite/index'
|
6
|
-
import {
|
7
|
-
import {
|
6
|
+
import { GraphqlChangeset } from '#lib/graphql-changeset'
|
7
|
+
import { SchemaLifecycle } from '#lib/schema-lifecycle'
|
8
|
+
import { ViteVirtual } from '#lib/vite-virtual'
|
8
9
|
import { debugPolen } from '#singletons/debug'
|
9
10
|
import { Cache } from '@wollybeard/kit'
|
10
11
|
import * as NodeFs from 'node:fs/promises'
|
11
12
|
import * as NodePath from 'node:path'
|
12
|
-
import type { NonEmptyChangeSets } from '../../schema/schema.js'
|
13
13
|
import { polenVirtual } from '../vi.js'
|
14
14
|
|
15
15
|
export const viProjectSchemaMetadata = polenVirtual([`project`, `schema-metadata`])
|
@@ -52,7 +52,9 @@ export const SchemaAssets = (config: Config.Config): Vite.Plugin => {
|
|
52
52
|
|
53
53
|
// Apply augmentations
|
54
54
|
schemaResult.data.forEach(version => {
|
55
|
-
|
55
|
+
if (version.after) {
|
56
|
+
SchemaAugmentation.apply(version.after.data, config.schemaAugmentations)
|
57
|
+
}
|
56
58
|
})
|
57
59
|
|
58
60
|
// Build metadata
|
@@ -103,9 +105,17 @@ export const SchemaAssets = (config: Config.Config): Vite.Plugin => {
|
|
103
105
|
})
|
104
106
|
}
|
105
107
|
|
108
|
+
// Helper to create lifecycle data from schema data
|
109
|
+
const createLifecycleData = (
|
110
|
+
schemaData: GraphqlChangeset.ChangelogLinked,
|
111
|
+
metadata: Schema.SchemaMetadata,
|
112
|
+
): SchemaLifecycle.SchemaLifecycle => {
|
113
|
+
return SchemaLifecycle.create(schemaData)
|
114
|
+
}
|
115
|
+
|
106
116
|
// Helper to write assets using schema-source API
|
107
117
|
const writeDevAssets = async (
|
108
|
-
schemaData:
|
118
|
+
schemaData: GraphqlChangeset.ChangelogLinked,
|
109
119
|
metadata: Schema.SchemaMetadata,
|
110
120
|
) => {
|
111
121
|
// schemaData is now guaranteed to be non-null NonEmptyChangeSets
|
@@ -113,8 +123,10 @@ export const SchemaAssets = (config: Config.Config): Vite.Plugin => {
|
|
113
123
|
const devAssetsDir = config.paths.framework.devAssets.schemas
|
114
124
|
await NodeFs.mkdir(devAssetsDir, { recursive: true })
|
115
125
|
|
126
|
+
const lifecycle = createLifecycleData(schemaData, metadata)
|
127
|
+
|
116
128
|
const schemaSource = createDevSchemaSource(metadata)
|
117
|
-
await schemaSource.writeAllAssets(schemaData, metadata)
|
129
|
+
await schemaSource.writeAllAssets(schemaData, metadata, lifecycle)
|
118
130
|
debug(`devAssetsWritten`, { versionCount: schemaData.length })
|
119
131
|
}
|
120
132
|
|
@@ -288,8 +300,10 @@ export const SchemaAssets = (config: Config.Config): Vite.Plugin => {
|
|
288
300
|
assetsPath: config.paths.framework.devAssets.absolute,
|
289
301
|
})
|
290
302
|
|
303
|
+
const lifecycle = createLifecycleData(schemaData, metadata)
|
304
|
+
|
291
305
|
// Emit all assets using the high-level API
|
292
|
-
await schemaSource.writeAllAssets(schemaData, metadata)
|
306
|
+
await schemaSource.writeAllAssets(schemaData, metadata, lifecycle)
|
293
307
|
debug(`buildMode:allAssetsEmitted`, { versionCount: schemaData.length })
|
294
308
|
},
|
295
309
|
|
package/src/api/vite/vi.ts
CHANGED
@@ -0,0 +1,27 @@
|
|
1
|
+
import { Api } from '#api/index'
|
2
|
+
import { projectParameter } from '#cli/_/parameters'
|
3
|
+
import { ensureOptionalAbsoluteWithCwd } from '#lib/kit-temp'
|
4
|
+
import { Command } from '@molt/command'
|
5
|
+
import consola from 'consola'
|
6
|
+
|
7
|
+
const args = Command.create()
|
8
|
+
.parameter(
|
9
|
+
`--project -p`,
|
10
|
+
projectParameter,
|
11
|
+
)
|
12
|
+
.settings({
|
13
|
+
parameters: {
|
14
|
+
environment: {
|
15
|
+
$default: {
|
16
|
+
prefix: `POLEN_CACHE_`,
|
17
|
+
enabled: false,
|
18
|
+
},
|
19
|
+
},
|
20
|
+
},
|
21
|
+
})
|
22
|
+
.parse()
|
23
|
+
|
24
|
+
const dir = ensureOptionalAbsoluteWithCwd(args.project)
|
25
|
+
|
26
|
+
await Api.Cache.deleteAll(dir)
|
27
|
+
consola.success(`Polen caches deleted`)
|
@@ -0,0 +1,99 @@
|
|
1
|
+
import { Api } from '#api/index'
|
2
|
+
import { Command } from '@molt/command'
|
3
|
+
import { z } from 'zod'
|
4
|
+
|
5
|
+
const args = Command.create()
|
6
|
+
.parameter(
|
7
|
+
`--depth -d`,
|
8
|
+
z.number().min(0).max(5).default(2).describe(`Maximum depth for directory tree display`),
|
9
|
+
)
|
10
|
+
.settings({
|
11
|
+
parameters: {
|
12
|
+
environment: {
|
13
|
+
$default: {
|
14
|
+
prefix: `POLEN_CACHE_`,
|
15
|
+
enabled: false,
|
16
|
+
},
|
17
|
+
},
|
18
|
+
},
|
19
|
+
})
|
20
|
+
.parse()
|
21
|
+
|
22
|
+
// Helper to format bytes
|
23
|
+
const formatBytes = (bytes: number): string => {
|
24
|
+
if (bytes < 1024) return `${bytes} B`
|
25
|
+
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`
|
26
|
+
if (bytes < 1024 * 1024 * 1024) return `${(bytes / (1024 * 1024)).toFixed(1)} MB`
|
27
|
+
return `${(bytes / (1024 * 1024 * 1024)).toFixed(1)} GB`
|
28
|
+
}
|
29
|
+
|
30
|
+
// Helper to render directory tree
|
31
|
+
const renderTree = (nodes: Api.Cache.TreeNode[], prefix = ``, isLast = true): string[] => {
|
32
|
+
const lines: string[] = []
|
33
|
+
|
34
|
+
nodes.forEach((node, index) => {
|
35
|
+
const isLastNode = index === nodes.length - 1
|
36
|
+
const connector = isLastNode ? `└─` : `├─`
|
37
|
+
const extension = isLastNode ? ` ` : `│ `
|
38
|
+
|
39
|
+
let line = `${prefix}${connector} ${node.name}`
|
40
|
+
if (node.type === `file` && node.size !== undefined) {
|
41
|
+
line += ` (${formatBytes(node.size)})`
|
42
|
+
}
|
43
|
+
lines.push(line)
|
44
|
+
|
45
|
+
if (node.children && node.children.length > 0) {
|
46
|
+
const childLines = renderTree(node.children, prefix + extension, isLastNode)
|
47
|
+
lines.push(...childLines)
|
48
|
+
}
|
49
|
+
})
|
50
|
+
|
51
|
+
return lines
|
52
|
+
}
|
53
|
+
|
54
|
+
// Get cache info
|
55
|
+
const info = await Api.Cache.info({ depth: args.depth })
|
56
|
+
|
57
|
+
console.log(`Root: ${info.rootPath}`)
|
58
|
+
console.log()
|
59
|
+
|
60
|
+
// Development assets
|
61
|
+
console.log(`Development assets: ${info.developmentAssets.path.replace(info.rootPath + `/`, ``)}`)
|
62
|
+
if (info.developmentAssets.exists) {
|
63
|
+
const size = info.developmentAssets.size ? ` (${formatBytes(info.developmentAssets.size)})` : ``
|
64
|
+
console.log(` Status: exists${size}`)
|
65
|
+
|
66
|
+
if (info.developmentAssets.tree && info.developmentAssets.tree.length > 0) {
|
67
|
+
console.log(` Contents:`)
|
68
|
+
const treeLines = renderTree(info.developmentAssets.tree, ` `)
|
69
|
+
treeLines.forEach(line => console.log(line))
|
70
|
+
}
|
71
|
+
} else {
|
72
|
+
console.log(` Status: empty`)
|
73
|
+
}
|
74
|
+
|
75
|
+
console.log()
|
76
|
+
|
77
|
+
// Vite cache
|
78
|
+
console.log(`Vite:`)
|
79
|
+
if (info.vite.exists) {
|
80
|
+
const size = info.vite.size ? ` (${formatBytes(info.vite.size)})` : ``
|
81
|
+
console.log(` Status: exists${size}`)
|
82
|
+
|
83
|
+
if (info.vite.optimizedDependencies && info.vite.optimizedDependencies.length > 0) {
|
84
|
+
const deps = info.vite.optimizedDependencies
|
85
|
+
const showing = Math.min(10, deps.length)
|
86
|
+
const more = deps.length - showing
|
87
|
+
|
88
|
+
console.log(` Optimized dependencies (${deps.length}):`)
|
89
|
+
deps.slice(0, showing).forEach(dep => {
|
90
|
+
console.log(` ${dep.name} (${formatBytes(dep.size)})`)
|
91
|
+
})
|
92
|
+
|
93
|
+
if (more > 0) {
|
94
|
+
console.log(` ... (${more} more)`)
|
95
|
+
}
|
96
|
+
}
|
97
|
+
} else {
|
98
|
+
console.log(` Status: empty`)
|
99
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
#!/usr/bin/env node
|
2
|
+
|
3
|
+
import { Cli, Path } from '@wollybeard/kit'
|
4
|
+
|
5
|
+
// Remove the "cache" argument before dispatching to subcommands
|
6
|
+
process.argv = process.argv.slice(0, 2).concat(process.argv.slice(3))
|
7
|
+
|
8
|
+
const commandsDir = Path.join(import.meta.dirname, `cache`)
|
9
|
+
await Cli.dispatch(commandsDir)
|
@@ -2,5 +2,8 @@
|
|
2
2
|
|
3
3
|
import { Cli, Path } from '@wollybeard/kit'
|
4
4
|
|
5
|
+
// Remove the "config" argument before dispatching to subcommands
|
6
|
+
process.argv = process.argv.slice(0, 2).concat(process.argv.slice(3))
|
7
|
+
|
5
8
|
const commandsDir = Path.join(import.meta.dirname, `config`)
|
6
9
|
await Cli.dispatch(commandsDir)
|
package/src/cli/commands/open.ts
CHANGED
@@ -9,8 +9,8 @@
|
|
9
9
|
|
10
10
|
import { Api } from '#api/index'
|
11
11
|
import { Vite } from '#dep/vite/index'
|
12
|
-
import { Grafaid } from '#lib/grafaid
|
13
|
-
import { GraphqlSchemaLoader } from '#lib/graphql-schema-loader
|
12
|
+
import { Grafaid } from '#lib/grafaid'
|
13
|
+
import { GraphqlSchemaLoader } from '#lib/graphql-schema-loader'
|
14
14
|
import { Command } from '@molt/command'
|
15
15
|
import type { Fn } from '@wollybeard/kit'
|
16
16
|
import { Err, Fs, Json, Path, Rec } from '@wollybeard/kit'
|
@@ -2,5 +2,8 @@
|
|
2
2
|
|
3
3
|
import { Cli, Path } from '@wollybeard/kit'
|
4
4
|
|
5
|
+
// Remove the "static" argument before dispatching to subcommands
|
6
|
+
process.argv = process.argv.slice(0, 2).concat(process.argv.slice(3))
|
7
|
+
|
5
8
|
const commandsDir = Path.join(import.meta.dirname, `static`)
|
6
9
|
await Cli.dispatch(commandsDir)
|
package/src/exports/polen.ts
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
export * as Errors from './$$.js'
|
@@ -0,0 +1 @@
|
|
1
|
+
export * as FileRouter from './$$.js'
|
@@ -0,0 +1 @@
|
|
1
|
+
export * as Grafaid from './$$.js'
|
@@ -0,0 +1 @@
|
|
1
|
+
export * as GraphqlChange from './$$.js'
|
@@ -277,31 +277,61 @@ export type Type =
|
|
277
277
|
| 'SchemaRootType'
|
278
278
|
| 'DirectiveUsage'
|
279
279
|
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
280
|
+
/**
|
281
|
+
* Conditional type that maps each change type to its corresponding group type
|
282
|
+
*/
|
283
|
+
export type getType<$Change extends Change> = $Change extends TypeOperation ? 'TypeOperation'
|
284
|
+
: $Change extends TypeDescription ? 'TypeDescription'
|
285
|
+
: $Change extends FieldOperation ? 'FieldOperation'
|
286
|
+
: $Change extends FieldDescription ? 'FieldDescription'
|
287
|
+
: $Change extends FieldDeprecation ? 'FieldDeprecation'
|
288
|
+
: $Change extends FieldDeprecationReason ? 'FieldDeprecationReason'
|
289
|
+
: $Change extends FieldArgumentOperation ? 'FieldArgumentOperation'
|
290
|
+
: $Change extends FieldArgument ? 'FieldArgument'
|
291
|
+
: $Change extends FieldArgumentDescription ? 'FieldArgumentDescription'
|
292
|
+
: $Change extends EnumValueOperation ? 'EnumValueOperation'
|
293
|
+
: $Change extends EnumValueDescription ? 'EnumValueDescription'
|
294
|
+
: $Change extends EnumValueDeprecationReason ? 'EnumValueDeprecationReason'
|
295
|
+
: $Change extends InputFieldOperation ? 'InputFieldOperation'
|
296
|
+
: $Change extends InputFieldDescription ? 'InputFieldDescription'
|
297
|
+
: $Change extends InputFieldDefaultValue ? 'InputFieldDefaultValue'
|
298
|
+
: $Change extends UnionMemberOperation ? 'UnionMemberOperation'
|
299
|
+
: $Change extends ObjectTypeInterfaceOperation ? 'ObjectTypeInterfaceOperation'
|
300
|
+
: $Change extends DirectiveOperation ? 'DirectiveOperation'
|
301
|
+
: $Change extends DirectiveDescription ? 'DirectiveDescription'
|
302
|
+
: $Change extends DirectiveLocationOperation ? 'DirectiveLocationOperation'
|
303
|
+
: $Change extends DirectiveArgumentOperation ? 'DirectiveArgumentOperation'
|
304
|
+
: $Change extends DirectiveArgument ? 'DirectiveArgument'
|
305
|
+
: $Change extends DirectiveArgumentDescription ? 'DirectiveArgumentDescription'
|
306
|
+
: $Change extends SchemaRootType ? 'SchemaRootType'
|
307
|
+
: $Change extends DirectiveUsage ? 'DirectiveUsage'
|
308
|
+
: never
|
309
|
+
|
310
|
+
export const getType = <change extends Change>(change: change): getType<change> => {
|
311
|
+
if (isTypeOperation(change)) return 'TypeOperation' as getType<change>
|
312
|
+
if (isTypeDescription(change)) return 'TypeDescription' as getType<change>
|
313
|
+
if (isFieldOperation(change)) return 'FieldOperation' as getType<change>
|
314
|
+
if (isFieldDescription(change)) return 'FieldDescription' as getType<change>
|
315
|
+
if (isFieldDeprecation(change)) return 'FieldDeprecation' as getType<change>
|
316
|
+
if (isFieldDeprecationReason(change)) return 'FieldDeprecationReason' as getType<change>
|
317
|
+
if (isFieldArgumentOperation(change)) return 'FieldArgumentOperation' as getType<change>
|
318
|
+
if (isFieldArgument(change)) return 'FieldArgument' as getType<change>
|
319
|
+
if (isFieldArgumentDescription(change)) return 'FieldArgumentDescription' as getType<change>
|
320
|
+
if (isEnumValueOperation(change)) return 'EnumValueOperation' as getType<change>
|
321
|
+
if (isEnumValueDescription(change)) return 'EnumValueDescription' as getType<change>
|
322
|
+
if (isEnumValueDeprecationReason(change)) return 'EnumValueDeprecationReason' as getType<change>
|
323
|
+
if (isInputFieldOperation(change)) return 'InputFieldOperation' as getType<change>
|
324
|
+
if (isInputFieldDescription(change)) return 'InputFieldDescription' as getType<change>
|
325
|
+
if (isInputFieldDefaultValue(change)) return 'InputFieldDefaultValue' as getType<change>
|
326
|
+
if (isUnionMemberOperation(change)) return 'UnionMemberOperation' as getType<change>
|
327
|
+
if (isObjectTypeInterfaceOperation(change)) return 'ObjectTypeInterfaceOperation' as getType<change>
|
328
|
+
if (isDirectiveOperation(change)) return 'DirectiveOperation' as getType<change>
|
329
|
+
if (isDirectiveDescription(change)) return 'DirectiveDescription' as getType<change>
|
330
|
+
if (isDirectiveLocationOperation(change)) return 'DirectiveLocationOperation' as getType<change>
|
331
|
+
if (isDirectiveArgumentOperation(change)) return 'DirectiveArgumentOperation' as getType<change>
|
332
|
+
if (isDirectiveArgument(change)) return 'DirectiveArgument' as getType<change>
|
333
|
+
if (isDirectiveArgumentDescription(change)) return 'DirectiveArgumentDescription' as getType<change>
|
334
|
+
if (isSchemaRootType(change)) return 'SchemaRootType' as getType<change>
|
335
|
+
if (isDirectiveUsage(change)) return 'DirectiveUsage' as getType<change>
|
306
336
|
neverCase(change)
|
307
337
|
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * as GraphqlChangeset from './$$.js'
|
@@ -0,0 +1,190 @@
|
|
1
|
+
import type { GrafaidOld } from '#lib/grafaid-old'
|
2
|
+
import type { GraphqlChange } from '#lib/graphql-change'
|
3
|
+
import type { GraphQLSchema } from 'graphql'
|
4
|
+
import { SuperJSON } from 'superjson'
|
5
|
+
import type { VersionableSchema, VersionableSchemaLinked } from './versioned-schema.js'
|
6
|
+
|
7
|
+
const superjson = new SuperJSON()
|
8
|
+
|
9
|
+
superjson.registerCustom({
|
10
|
+
isApplicable: (v): v is GraphQLSchema => v?.constructor?.name === 'GraphQLSchema',
|
11
|
+
serialize: () => null,
|
12
|
+
deserialize: () => null,
|
13
|
+
}, 'GraphQLSchema')
|
14
|
+
|
15
|
+
// ChangeSet
|
16
|
+
|
17
|
+
export type ChangeSet = IntermediateChangeSet | InitialChangeSet
|
18
|
+
|
19
|
+
export interface IntermediateChangeSet {
|
20
|
+
type: 'IntermediateChangeSet'
|
21
|
+
changes: GraphqlChange.Change[]
|
22
|
+
date: Date
|
23
|
+
after: VersionableSchema
|
24
|
+
before: VersionableSchema
|
25
|
+
}
|
26
|
+
|
27
|
+
export interface InitialChangeSet {
|
28
|
+
type: 'InitialChangeSet'
|
29
|
+
date: Date
|
30
|
+
after: VersionableSchema
|
31
|
+
}
|
32
|
+
|
33
|
+
// Linked
|
34
|
+
|
35
|
+
export type ChangeSetLinked = InitialChangeSetLinked | IntermediateChangeSetLinked
|
36
|
+
|
37
|
+
export interface IntermediateChangeSetLinked extends IntermediateChangeSet {
|
38
|
+
after: VersionableSchemaLinked
|
39
|
+
before: VersionableSchemaLinked
|
40
|
+
}
|
41
|
+
|
42
|
+
export interface InitialChangeSetLinked extends InitialChangeSet {
|
43
|
+
after: VersionableSchemaLinked
|
44
|
+
}
|
45
|
+
|
46
|
+
// Predicate Functions
|
47
|
+
|
48
|
+
/**
|
49
|
+
* Type guard to check if a value is any type of ChangeSet
|
50
|
+
*/
|
51
|
+
export const isChangeSet = (value: unknown): value is ChangeSet => {
|
52
|
+
return value !== null
|
53
|
+
&& typeof value === 'object'
|
54
|
+
&& 'type' in value
|
55
|
+
&& ((value as any).type === 'InitialChangeSet' || (value as any).type === 'IntermediateChangeSet')
|
56
|
+
}
|
57
|
+
|
58
|
+
/**
|
59
|
+
* Type guard to check if a changeset is an InitialChangeSet
|
60
|
+
*/
|
61
|
+
export const isInitialChangeSet = (changeSet: ChangeSet): changeSet is InitialChangeSet => {
|
62
|
+
return changeSet.type === 'InitialChangeSet'
|
63
|
+
}
|
64
|
+
|
65
|
+
/**
|
66
|
+
* Type guard to check if a changeset is an IntermediateChangeSet
|
67
|
+
*/
|
68
|
+
export const isIntermediateChangeSet = (changeSet: ChangeSet): changeSet is IntermediateChangeSet => {
|
69
|
+
return changeSet.type === 'IntermediateChangeSet'
|
70
|
+
}
|
71
|
+
|
72
|
+
/**
|
73
|
+
* Type guard to check if a linked changeset is an InitialChangeSetLinked
|
74
|
+
*/
|
75
|
+
export const isInitialChangeSetLinked = (changeSet: ChangeSetLinked): changeSet is InitialChangeSetLinked => {
|
76
|
+
return changeSet.type === 'InitialChangeSet'
|
77
|
+
}
|
78
|
+
|
79
|
+
/**
|
80
|
+
* Type guard to check if a linked changeset is an IntermediateChangeSetLinked
|
81
|
+
*/
|
82
|
+
export const isIntermediateChangeSetLinked = (changeSet: ChangeSetLinked): changeSet is IntermediateChangeSetLinked => {
|
83
|
+
return changeSet.type === 'IntermediateChangeSet'
|
84
|
+
}
|
85
|
+
|
86
|
+
/**
|
87
|
+
* Type guard to check if a changeset is linked (has schema data)
|
88
|
+
*/
|
89
|
+
export const isLinked = (changeSet: ChangeSet | ChangeSetLinked): changeSet is ChangeSetLinked => {
|
90
|
+
if (isInitialChangeSet(changeSet)) {
|
91
|
+
return changeSet.after.data !== null
|
92
|
+
} else {
|
93
|
+
return changeSet.after.data !== null && changeSet.before.data !== null
|
94
|
+
}
|
95
|
+
}
|
96
|
+
|
97
|
+
// JSON Codecs
|
98
|
+
|
99
|
+
/**
|
100
|
+
* Convert an unlinked changeset to linked by adding schema references
|
101
|
+
*/
|
102
|
+
export const link = (
|
103
|
+
changeset: ChangeSet,
|
104
|
+
schemaResolver: (version: string | null) => GrafaidOld.Schema.Schema | null,
|
105
|
+
): ChangeSetLinked => {
|
106
|
+
if (isInitialChangeSet(changeset)) {
|
107
|
+
const afterSchema = schemaResolver(changeset.after.version)
|
108
|
+
if (!afterSchema) {
|
109
|
+
throw new Error(`Unable to resolve schema for version: ${changeset.after.version}`)
|
110
|
+
}
|
111
|
+
return {
|
112
|
+
type: 'InitialChangeSet',
|
113
|
+
date: changeset.date,
|
114
|
+
after: {
|
115
|
+
version: changeset.after.version,
|
116
|
+
data: afterSchema,
|
117
|
+
},
|
118
|
+
}
|
119
|
+
} else {
|
120
|
+
const afterSchema = schemaResolver(changeset.after.version)
|
121
|
+
const beforeSchema = schemaResolver(changeset.before.version)
|
122
|
+
if (!afterSchema || !beforeSchema) {
|
123
|
+
throw new Error(
|
124
|
+
`Unable to resolve schemas for versions: after=${changeset.after.version}, before=${changeset.before.version}`,
|
125
|
+
)
|
126
|
+
}
|
127
|
+
return {
|
128
|
+
type: 'IntermediateChangeSet',
|
129
|
+
changes: changeset.changes,
|
130
|
+
date: changeset.date,
|
131
|
+
after: {
|
132
|
+
version: changeset.after.version,
|
133
|
+
data: afterSchema,
|
134
|
+
},
|
135
|
+
before: {
|
136
|
+
version: changeset.before.version,
|
137
|
+
data: beforeSchema,
|
138
|
+
},
|
139
|
+
}
|
140
|
+
}
|
141
|
+
}
|
142
|
+
|
143
|
+
/**
|
144
|
+
* Convert a linked changeset to unlinked by removing schema references
|
145
|
+
*/
|
146
|
+
// export const unlink = (changeset: ChangeSetLinked): ChangeSet => {
|
147
|
+
// if (isInitialChangeSetLinked(changeset)) {
|
148
|
+
// return {
|
149
|
+
// type: 'InitialChangeSet',
|
150
|
+
// date: changeset.date,
|
151
|
+
// after: {
|
152
|
+
// version: changeset.after.version,
|
153
|
+
// data: null,
|
154
|
+
// },
|
155
|
+
// }
|
156
|
+
// } else {
|
157
|
+
// return {
|
158
|
+
// type: 'IntermediateChangeSet',
|
159
|
+
// changes: changeset.changes,
|
160
|
+
// date: changeset.date,
|
161
|
+
// after: {
|
162
|
+
// version: changeset.after.version,
|
163
|
+
// data: null,
|
164
|
+
// },
|
165
|
+
// before: {
|
166
|
+
// version: changeset.before.version,
|
167
|
+
// data: null,
|
168
|
+
// },
|
169
|
+
// }
|
170
|
+
// }
|
171
|
+
// }
|
172
|
+
|
173
|
+
/**
|
174
|
+
* Convert a changeset to JSON string (handles both linked and unlinked)
|
175
|
+
*/
|
176
|
+
export const toJson = (changeset: ChangeSet, options?: { pretty?: boolean }): string => {
|
177
|
+
const isPretty = options?.pretty ?? true
|
178
|
+
if (isPretty) {
|
179
|
+
const serialized = superjson.serialize(changeset)
|
180
|
+
return JSON.stringify(serialized, null, 2)
|
181
|
+
}
|
182
|
+
return superjson.stringify(changeset)
|
183
|
+
}
|
184
|
+
|
185
|
+
/**
|
186
|
+
* Parse changeset from JSON string
|
187
|
+
*/
|
188
|
+
export const fromJson = (json: string): ChangeSet => {
|
189
|
+
return superjson.parse(json)
|
190
|
+
}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import type { GrafaidOld } from '#lib/grafaid-old'
|
2
|
+
|
3
|
+
// VersionableSchema
|
4
|
+
|
5
|
+
export interface VersionableSchema {
|
6
|
+
/**
|
7
|
+
* `null` if schema is not versioned.
|
8
|
+
*/
|
9
|
+
version: string | null
|
10
|
+
/**
|
11
|
+
* `null` if schema has not been hydrated.
|
12
|
+
* Something external is resonsible for linking this.
|
13
|
+
* It should use `version` if not null to get the correct schema somehow.
|
14
|
+
* If `version` is null, it should use some schema singleton.
|
15
|
+
*/
|
16
|
+
data: GrafaidOld.Schema.Schema | null
|
17
|
+
}
|
18
|
+
|
19
|
+
export interface VersionableSchemaUnlinked {
|
20
|
+
version: string | null
|
21
|
+
data: null
|
22
|
+
}
|
23
|
+
|
24
|
+
export interface VersionableSchemaLinked {
|
25
|
+
version: string | null
|
26
|
+
data: GrafaidOld.Schema.Schema
|
27
|
+
}
|
28
|
+
|
29
|
+
// Predicate Functions
|
30
|
+
|
31
|
+
/**
|
32
|
+
* Type guard to check if a schema is linked (has data)
|
33
|
+
*/
|
34
|
+
export const isVersionableSchemaLinked = (schema: VersionableSchema): schema is VersionableSchemaLinked => {
|
35
|
+
return schema.data !== null
|
36
|
+
}
|
37
|
+
|
38
|
+
/**
|
39
|
+
* Type guard to check if a schema is unlinked (no data)
|
40
|
+
*/
|
41
|
+
export const isVersionableSchemaUnlinked = (schema: VersionableSchema): schema is VersionableSchemaUnlinked => {
|
42
|
+
return schema.data === null
|
43
|
+
}
|