@contractspec/bundle.library 3.8.10 → 3.8.11
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/.turbo/turbo-build.log +606 -594
- package/CHANGELOG.md +37 -0
- package/dist/application/context-storage/index.js +1 -28
- package/dist/application/index.js +13 -2133
- package/dist/application/mcp/cliMcp.js +4 -452
- package/dist/application/mcp/common.js +1 -193
- package/dist/application/mcp/contractsMcp.js +2 -549
- package/dist/application/mcp/contractsMcpResources.js +2 -123
- package/dist/application/mcp/contractsMcpTools.js +1 -199
- package/dist/application/mcp/docsMcp.catalog.js +3 -381
- package/dist/application/mcp/docsMcp.data.js +1 -147
- package/dist/application/mcp/docsMcp.js +6 -1039
- package/dist/application/mcp/docsMcp.prompts.js +6 -521
- package/dist/application/mcp/docsMcp.reference.js +3 -235
- package/dist/application/mcp/docsMcp.resources.js +3 -519
- package/dist/application/mcp/docsMcp.tools.js +3 -518
- package/dist/application/mcp/index.js +13 -2106
- package/dist/application/mcp/internalMcp.js +2 -410
- package/dist/application/mcp/normalizeMcpRequest.js +1 -21
- package/dist/application/mcp/providerRankingMcp.js +1 -530
- package/dist/bundles/LibraryBundle.js +1 -138
- package/dist/bundles/index.js +1 -138
- package/dist/components/docs/DocsIndexPage.js +2 -912
- package/dist/components/docs/advanced/AdvancedMCPPage.js +4 -271
- package/dist/components/docs/advanced/AdvancedOverlayEditorPage.js +1 -107
- package/dist/components/docs/advanced/AdvancedRenderersPage.js +2 -118
- package/dist/components/docs/advanced/AdvancedSpecExperimentsPage.js +4 -92
- package/dist/components/docs/advanced/AdvancedTelemetryPage.js +2 -373
- package/dist/components/docs/advanced/AdvancedWorkflowMonitoringPage.js +2 -99
- package/dist/components/docs/advanced/index.js +10 -1055
- package/dist/components/docs/architecture/ArchitectureAppConfigPage.js +6 -243
- package/dist/components/docs/architecture/ArchitectureControlPlanePage.js +3 -160
- package/dist/components/docs/architecture/ArchitectureIntegrationBindingPage.js +7 -259
- package/dist/components/docs/architecture/ArchitectureKnowledgeBindingPage.js +6 -374
- package/dist/components/docs/architecture/ArchitectureMultiTenancyPage.js +2 -166
- package/dist/components/docs/architecture/ArchitectureOverviewPage.js +1 -143
- package/dist/components/docs/architecture/index.js +20 -1340
- package/dist/components/docs/comparison/ComparisonAutomationPlatformsPage.js +1 -245
- package/dist/components/docs/comparison/ComparisonEnterprisePlatformsPage.js +1 -230
- package/dist/components/docs/comparison/ComparisonInternalToolBuildersPage.js +1 -245
- package/dist/components/docs/comparison/ComparisonOverviewPage.js +1 -202
- package/dist/components/docs/comparison/ComparisonWindmillPage.js +1 -254
- package/dist/components/docs/comparison/ComparisonWorkflowEnginesPage.js +1 -339
- package/dist/components/docs/comparison/index.js +1 -1510
- package/dist/components/docs/docsManifest.js +1 -611
- package/dist/components/docs/docsManifest.test.d.ts +1 -0
- package/dist/components/docs/ecosystem/IntegrationsPage.js +2 -103
- package/dist/components/docs/ecosystem/PluginsPage.js +13 -179
- package/dist/components/docs/ecosystem/RegistryPage.js +7 -100
- package/dist/components/docs/ecosystem/TemplatesPage.js +3 -141
- package/dist/components/docs/ecosystem/ecosystem.docblocks.js +2 -48
- package/dist/components/docs/ecosystem/index.js +23 -569
- package/dist/components/docs/examples/DocsExamplesPage.js +4 -124
- package/dist/components/docs/examples/ExampleShowcasePage.js +4 -244
- package/dist/components/docs/examples/exampleShowcaseData.js +4 -39
- package/dist/components/docs/examples/index.js +4 -330
- package/dist/components/docs/generated/docs-index.generated.js +1 -5
- package/dist/components/docs/generated/index.js +1 -74
- package/dist/components/docs/generated/loader.js +1 -74
- package/dist/components/docs/getting-started/CLIPage.js +4 -271
- package/dist/components/docs/getting-started/CompatibilityPage.js +1 -173
- package/dist/components/docs/getting-started/DataViewTutorialPage.js +4 -134
- package/dist/components/docs/getting-started/DeveloperToolsPage.js +1 -194
- package/dist/components/docs/getting-started/HelloWorldPage.js +5 -183
- package/dist/components/docs/getting-started/InstallationPage.js +3 -154
- package/dist/components/docs/getting-started/StartHerePage.js +2 -129
- package/dist/components/docs/getting-started/TroubleshootingPage.js +2 -168
- package/dist/components/docs/getting-started/VSCodeExtensionPage.js +1 -432
- package/dist/components/docs/getting-started/getting-started.docblocks.js +4 -41
- package/dist/components/docs/getting-started/index.js +18 -1869
- package/dist/components/docs/guides/GuideCIDiffGatingPage.js +2 -196
- package/dist/components/docs/guides/GuideConnectInRepoPage.d.ts +1 -0
- package/dist/components/docs/guides/GuideConnectInRepoPage.js +44 -0
- package/dist/components/docs/guides/GuideContractTypesPage.js +6 -541
- package/dist/components/docs/guides/GuideDocsPipelinePage.js +3 -207
- package/dist/components/docs/guides/GuideFirstModuleBundlePage.d.ts +1 -0
- package/dist/components/docs/guides/GuideFirstModuleBundlePage.js +76 -0
- package/dist/components/docs/guides/GuideGenerateDocsClientsSchemasPage.js +2 -209
- package/dist/components/docs/guides/GuideHostBuilderWorkbenchPage.d.ts +1 -0
- package/dist/components/docs/guides/GuideHostBuilderWorkbenchPage.js +70 -0
- package/dist/components/docs/guides/GuideImportExistingCodebasesPage.js +8 -754
- package/dist/components/docs/guides/GuideNextjsOneEndpointPage.js +6 -268
- package/dist/components/docs/guides/GuideSpecValidationTypingPage.js +4 -196
- package/dist/components/docs/guides/GuidesIndexPage.js +2 -169
- package/dist/components/docs/guides/guides.docblocks.js +11 -75
- package/dist/components/docs/guides/index.d.ts +3 -0
- package/dist/components/docs/guides/index.js +213 -2428
- package/dist/components/docs/index.js +542 -24310
- package/dist/components/docs/integrations/IntegrationsCircuitBreakersPage.js +2 -42
- package/dist/components/docs/integrations/IntegrationsElevenLabsPage.js +3 -105
- package/dist/components/docs/integrations/IntegrationsGithubPage.js +3 -142
- package/dist/components/docs/integrations/IntegrationsGmailPage.js +3 -109
- package/dist/components/docs/integrations/IntegrationsGoogleCalendarPage.js +3 -79
- package/dist/components/docs/integrations/IntegrationsHealthRoutingPage.js +3 -146
- package/dist/components/docs/integrations/IntegrationsMistralPage.js +5 -150
- package/dist/components/docs/integrations/IntegrationsOpenAIPage.js +5 -140
- package/dist/components/docs/integrations/IntegrationsOverviewPage.js +1 -160
- package/dist/components/docs/integrations/IntegrationsPostmarkPage.js +4 -218
- package/dist/components/docs/integrations/IntegrationsPowensPage.js +4 -300
- package/dist/components/docs/integrations/IntegrationsQdrantPage.js +5 -111
- package/dist/components/docs/integrations/IntegrationsResendPage.js +3 -102
- package/dist/components/docs/integrations/IntegrationsS3Page.js +4 -124
- package/dist/components/docs/integrations/IntegrationsSlackPage.js +3 -144
- package/dist/components/docs/integrations/IntegrationsSpecModelPage.js +7 -290
- package/dist/components/docs/integrations/IntegrationsStripePage.js +6 -327
- package/dist/components/docs/integrations/IntegrationsTwilioPage.js +3 -128
- package/dist/components/docs/integrations/IntegrationsWhatsappMetaPage.js +2 -146
- package/dist/components/docs/integrations/IntegrationsWhatsappTwilioPage.js +2 -156
- package/dist/components/docs/integrations/index.js +52 -3100
- package/dist/components/docs/intent/ContractFirstApiPage.js +2 -126
- package/dist/components/docs/intent/DeterministicCodegenPage.js +2 -148
- package/dist/components/docs/intent/GenerateClientFromSchemaPage.js +7 -207
- package/dist/components/docs/intent/OpenapiAlternativePage.js +3 -201
- package/dist/components/docs/intent/SchemaValidationTypescriptPage.js +4 -144
- package/dist/components/docs/intent/SpecDrivenDevelopmentPage.js +2 -126
- package/dist/components/docs/intent/index.js +15 -1135
- package/dist/components/docs/intent/intent-pages.docblocks.js +1 -201
- package/dist/components/docs/knowledge/KnowledgeCategoriesPage.js +6 -750
- package/dist/components/docs/knowledge/KnowledgeExamplesPage.js +4 -175
- package/dist/components/docs/knowledge/KnowledgeOverviewPage.js +1 -116
- package/dist/components/docs/knowledge/KnowledgeSourcesPage.js +8 -391
- package/dist/components/docs/knowledge/KnowledgeSpacesPage.js +6 -302
- package/dist/components/docs/knowledge/index.js +21 -1730
- package/dist/components/docs/libraries/LibrariesAccessibilityPage.js +3 -198
- package/dist/components/docs/libraries/LibrariesAiAgentPage.js +3 -141
- package/dist/components/docs/libraries/LibrariesAnalyticsPage.js +4 -80
- package/dist/components/docs/libraries/LibrariesContentGenPage.js +2 -100
- package/dist/components/docs/libraries/LibrariesContractsPage.js +2 -284
- package/dist/components/docs/libraries/LibrariesCostTrackingPage.js +3 -112
- package/dist/components/docs/libraries/LibrariesDataBackendPage.js +2 -166
- package/dist/components/docs/libraries/LibrariesDataViewsPage.js +3 -186
- package/dist/components/docs/libraries/LibrariesDesignSystemPage.js +4 -279
- package/dist/components/docs/libraries/LibrariesEvolutionPage.js +4 -127
- package/dist/components/docs/libraries/LibrariesGraphQLPage.js +2 -173
- package/dist/components/docs/libraries/LibrariesGrowthPage.js +3 -88
- package/dist/components/docs/libraries/LibrariesMultiTenancyPage.js +3 -108
- package/dist/components/docs/libraries/LibrariesObservabilityPage.js +5 -130
- package/dist/components/docs/libraries/LibrariesOverlayEnginePage.js +4 -110
- package/dist/components/docs/libraries/LibrariesOverviewPage.js +1 -170
- package/dist/components/docs/libraries/LibrariesPersonalizationPage.js +4 -114
- package/dist/components/docs/libraries/LibrariesProgressiveDeliveryPage.js +3 -132
- package/dist/components/docs/libraries/LibrariesResiliencePage.js +4 -120
- package/dist/components/docs/libraries/LibrariesRuntimePage.js +2 -200
- package/dist/components/docs/libraries/LibrariesSLOPage.js +3 -116
- package/dist/components/docs/libraries/LibrariesSchemaPage.js +3 -273
- package/dist/components/docs/libraries/LibrariesSupportBotPage.js +3 -134
- package/dist/components/docs/libraries/LibrariesTestingPage.js +3 -133
- package/dist/components/docs/libraries/LibrariesUIKitPage.js +2 -230
- package/dist/components/docs/libraries/LibrariesWorkflowComposerPage.js +3 -88
- package/dist/components/docs/libraries/LibrariesWorkflowsPage.js +2 -181
- package/dist/components/docs/libraries/index.js +54 -4147
- package/dist/components/docs/manifesto/ManifestoPage.js +1 -86
- package/dist/components/docs/ops/AutoEvolutionOpsPage.js +2 -132
- package/dist/components/docs/ops/DistributedTracingOpsPage.js +2 -71
- package/dist/components/docs/ops/index.js +3 -202
- package/dist/components/docs/ops/ops-lifecycle.docblocks.js +3 -38
- package/dist/components/docs/ops/ops-runbooks-a.docblocks.js +3 -94
- package/dist/components/docs/ops/ops-runbooks-b.docblocks.js +3 -76
- package/dist/components/docs/ops/ops-slo-tenant.docblocks.js +3 -76
- package/dist/components/docs/ops/ops-top.docs.js +2 -17
- package/dist/components/docs/ops/ops.docs.js +10 -302
- package/dist/components/docs/product/product.docblocks.js +5 -72
- package/dist/components/docs/reference/DocsMarkdownContent.js +2 -196
- package/dist/components/docs/reference/DocsReferenceContent.js +3 -256
- package/dist/components/docs/reference/DocsReferenceIndexClient.js +2 -127
- package/dist/components/docs/reference/DocsReferenceIndexPage.js +2 -206
- package/dist/components/docs/reference/DocsReferencePage.js +3 -265
- package/dist/components/docs/reference/docsMarkdownParser.js +2 -92
- package/dist/components/docs/reference/index.js +4 -470
- package/dist/components/docs/safety/SafetyAuditingPage.js +2 -350
- package/dist/components/docs/safety/SafetyMigrationsPage.js +2 -359
- package/dist/components/docs/safety/SafetyOverviewPage.js +1 -101
- package/dist/components/docs/safety/SafetyPDPPage.js +2 -301
- package/dist/components/docs/safety/SafetySecurityTrustPage.js +1 -206
- package/dist/components/docs/safety/SafetySigningPage.js +3 -90
- package/dist/components/docs/safety/SafetyTenantIsolationPage.js +2 -79
- package/dist/components/docs/safety/index.js +7 -1480
- package/dist/components/docs/shared/StudioPrompt.js +1 -31
- package/dist/components/docs/specs/SpecsBuilderControlPlanePage.d.ts +1 -0
- package/dist/components/docs/specs/SpecsBuilderControlPlanePage.js +34 -0
- package/dist/components/docs/specs/SpecsCapabilitiesPage.js +2 -158
- package/dist/components/docs/specs/SpecsConnectPage.d.ts +1 -0
- package/dist/components/docs/specs/SpecsConnectPage.js +8 -0
- package/dist/components/docs/specs/SpecsDataViewsPage.js +2 -260
- package/dist/components/docs/specs/SpecsModuleBundlesPage.d.ts +1 -0
- package/dist/components/docs/specs/SpecsModuleBundlesPage.js +67 -0
- package/dist/components/docs/specs/SpecsOverlaysPage.js +2 -372
- package/dist/components/docs/specs/SpecsOverviewPage.js +1 -186
- package/dist/components/docs/specs/SpecsPolicyPage.js +3 -420
- package/dist/components/docs/specs/SpecsWorkflowsPage.js +2 -325
- package/dist/components/docs/specs/index.d.ts +3 -0
- package/dist/components/docs/specs/index.js +109 -1715
- package/dist/components/docs/studio/StudioBYOKPage.js +1 -26
- package/dist/components/docs/studio/StudioDeploymentsPage.js +1 -26
- package/dist/components/docs/studio/StudioGettingStartedPage.js +1 -26
- package/dist/components/docs/studio/StudioIntegrationsPage.js +1 -26
- package/dist/components/docs/studio/StudioOverviewPage.js +1 -157
- package/dist/components/docs/studio/StudioVisualBuilderPage.js +1 -26
- package/dist/components/docs/studio/index.js +1 -282
- package/dist/components/docs/tech/contracts/tech-docs.docblocks.js +2 -19
- package/dist/components/integrations/index.js +2 -600
- package/dist/components/integrations/molecules/IntegrationCard.js +1 -100
- package/dist/components/integrations/organisms/IntegrationMarketplace.js +1 -214
- package/dist/components/integrations/organisms/IntegrationSettings.js +2 -284
- package/dist/components/integrations/organisms/KnowledgeSourceList.js +1 -103
- package/dist/components/legal/PrivacyTemplate.js +1 -1025
- package/dist/components/legal/TermsTemplate.js +1 -941
- package/dist/components/legal/index.js +1 -1963
- package/dist/components/shared/FeatureGateNotice.js +1 -38
- package/dist/components/shared/index.js +1 -38
- package/dist/components/shell/WorkspaceHeader.js +1 -100
- package/dist/components/shell/WorkspaceProjectShellLayout.js +1 -222
- package/dist/components/shell/WorkspaceShellRenderer.js +1 -228
- package/dist/components/shell/WorkspaceSidebar.js +1 -68
- package/dist/components/shell/index.js +1 -287
- package/dist/components/templates/engine/index.js +1 -39
- package/dist/components/templates/index.js +11 -965
- package/dist/components/templates/messaging/ConversationList.js +2 -83
- package/dist/components/templates/messaging/MessageComposer.js +4 -150
- package/dist/components/templates/messaging/MessageThread.js +3 -83
- package/dist/components/templates/messaging/MessagingWorkspace.js +5 -265
- package/dist/components/templates/messaging/index.js +5 -269
- package/dist/components/templates/recipes/LanguageSwitcher.js +1 -16
- package/dist/components/templates/recipes/RecipeCard.js +1 -80
- package/dist/components/templates/recipes/RecipeDetail.js +1 -74
- package/dist/components/templates/recipes/RecipeList.js +3 -245
- package/dist/components/templates/recipes/index.js +3 -248
- package/dist/components/templates/todos/FilterBar.js +1 -107
- package/dist/components/templates/todos/TaskForm.js +2 -158
- package/dist/components/templates/todos/TaskItem.js +1 -77
- package/dist/components/templates/todos/TaskList.js +5 -449
- package/dist/components/templates/todos/index.js +5 -452
- package/dist/config/contractspec-blueprint.js +1 -123
- package/dist/config/contractspec-branding.js +1 -44
- package/dist/config/contractspec-routes.js +1 -24
- package/dist/config/index.js +1 -126
- package/dist/features/contracts-registry.js +1 -178
- package/dist/features/docs/docs.contracts.js +1 -17
- package/dist/features/docs/index.js +1 -17
- package/dist/features/docs.feature.js +1 -33
- package/dist/features/index.js +1 -315
- package/dist/features/mcp.feature.js +1 -30
- package/dist/features/presentations.feature.js +1 -33
- package/dist/features/registry.js +1 -116
- package/dist/index.js +556 -28593
- package/dist/infrastructure/elysia/index.js +1 -35
- package/dist/infrastructure/elysia/logger.js +1 -35
- package/dist/infrastructure/index.js +1 -35
- package/dist/libs/email/client.js +1 -114
- package/dist/libs/email/contact.js +12 -165
- package/dist/libs/email/newsletter.js +6 -167
- package/dist/libs/email/types.js +0 -2
- package/dist/libs/email/utils.js +2 -8
- package/dist/libs/email/waitlist-application.js +28 -209
- package/dist/libs/email/waitlist.js +6 -167
- package/dist/libs/email.js +46 -363
- package/dist/libs/posthog/client.js +1 -63
- package/dist/libs/posthog/native.js +1 -23
- package/dist/libs/posthog/server.js +1 -13
- package/dist/libs/pricing-examples.js +1 -18
- package/dist/node/application/context-storage/index.js +1 -28
- package/dist/node/application/index.js +13 -2133
- package/dist/node/application/mcp/cliMcp.js +4 -452
- package/dist/node/application/mcp/common.js +1 -193
- package/dist/node/application/mcp/contractsMcp.js +2 -549
- package/dist/node/application/mcp/contractsMcpResources.js +2 -123
- package/dist/node/application/mcp/contractsMcpTools.js +1 -199
- package/dist/node/application/mcp/docsMcp.catalog.js +3 -381
- package/dist/node/application/mcp/docsMcp.data.js +1 -147
- package/dist/node/application/mcp/docsMcp.js +6 -1039
- package/dist/node/application/mcp/docsMcp.prompts.js +6 -521
- package/dist/node/application/mcp/docsMcp.reference.js +3 -235
- package/dist/node/application/mcp/docsMcp.resources.js +3 -519
- package/dist/node/application/mcp/docsMcp.tools.js +3 -518
- package/dist/node/application/mcp/index.js +13 -2106
- package/dist/node/application/mcp/internalMcp.js +2 -410
- package/dist/node/application/mcp/normalizeMcpRequest.js +1 -21
- package/dist/node/application/mcp/providerRankingMcp.js +1 -530
- package/dist/node/bundles/LibraryBundle.js +1 -138
- package/dist/node/bundles/index.js +1 -138
- package/dist/node/components/docs/DocsIndexPage.js +2 -912
- package/dist/node/components/docs/advanced/AdvancedMCPPage.js +4 -271
- package/dist/node/components/docs/advanced/AdvancedOverlayEditorPage.js +1 -107
- package/dist/node/components/docs/advanced/AdvancedRenderersPage.js +2 -118
- package/dist/node/components/docs/advanced/AdvancedSpecExperimentsPage.js +4 -92
- package/dist/node/components/docs/advanced/AdvancedTelemetryPage.js +2 -373
- package/dist/node/components/docs/advanced/AdvancedWorkflowMonitoringPage.js +2 -99
- package/dist/node/components/docs/advanced/index.js +10 -1055
- package/dist/node/components/docs/architecture/ArchitectureAppConfigPage.js +6 -243
- package/dist/node/components/docs/architecture/ArchitectureControlPlanePage.js +3 -160
- package/dist/node/components/docs/architecture/ArchitectureIntegrationBindingPage.js +7 -259
- package/dist/node/components/docs/architecture/ArchitectureKnowledgeBindingPage.js +6 -374
- package/dist/node/components/docs/architecture/ArchitectureMultiTenancyPage.js +2 -166
- package/dist/node/components/docs/architecture/ArchitectureOverviewPage.js +1 -143
- package/dist/node/components/docs/architecture/index.js +20 -1340
- package/dist/node/components/docs/comparison/ComparisonAutomationPlatformsPage.js +1 -245
- package/dist/node/components/docs/comparison/ComparisonEnterprisePlatformsPage.js +1 -230
- package/dist/node/components/docs/comparison/ComparisonInternalToolBuildersPage.js +1 -245
- package/dist/node/components/docs/comparison/ComparisonOverviewPage.js +1 -202
- package/dist/node/components/docs/comparison/ComparisonWindmillPage.js +1 -254
- package/dist/node/components/docs/comparison/ComparisonWorkflowEnginesPage.js +1 -339
- package/dist/node/components/docs/comparison/index.js +1 -1510
- package/dist/node/components/docs/docsManifest.js +1 -611
- package/dist/node/components/docs/ecosystem/IntegrationsPage.js +2 -103
- package/dist/node/components/docs/ecosystem/PluginsPage.js +13 -179
- package/dist/node/components/docs/ecosystem/RegistryPage.js +7 -100
- package/dist/node/components/docs/ecosystem/TemplatesPage.js +3 -141
- package/dist/node/components/docs/ecosystem/ecosystem.docblocks.js +2 -48
- package/dist/node/components/docs/ecosystem/index.js +23 -569
- package/dist/node/components/docs/examples/DocsExamplesPage.js +4 -124
- package/dist/node/components/docs/examples/ExampleShowcasePage.js +4 -244
- package/dist/node/components/docs/examples/exampleShowcaseData.js +4 -39
- package/dist/node/components/docs/examples/index.js +4 -330
- package/dist/node/components/docs/generated/docs-index.generated.js +1 -5
- package/dist/node/components/docs/generated/index.js +1 -74
- package/dist/node/components/docs/generated/loader.js +1 -74
- package/dist/node/components/docs/getting-started/CLIPage.js +4 -271
- package/dist/node/components/docs/getting-started/CompatibilityPage.js +1 -173
- package/dist/node/components/docs/getting-started/DataViewTutorialPage.js +4 -134
- package/dist/node/components/docs/getting-started/DeveloperToolsPage.js +1 -194
- package/dist/node/components/docs/getting-started/HelloWorldPage.js +5 -183
- package/dist/node/components/docs/getting-started/InstallationPage.js +3 -154
- package/dist/node/components/docs/getting-started/StartHerePage.js +2 -129
- package/dist/node/components/docs/getting-started/TroubleshootingPage.js +2 -168
- package/dist/node/components/docs/getting-started/VSCodeExtensionPage.js +1 -432
- package/dist/node/components/docs/getting-started/getting-started.docblocks.js +4 -41
- package/dist/node/components/docs/getting-started/index.js +18 -1869
- package/dist/node/components/docs/guides/GuideCIDiffGatingPage.js +2 -196
- package/dist/node/components/docs/guides/GuideConnectInRepoPage.js +43 -0
- package/dist/node/components/docs/guides/GuideContractTypesPage.js +6 -541
- package/dist/node/components/docs/guides/GuideDocsPipelinePage.js +3 -207
- package/dist/node/components/docs/guides/GuideFirstModuleBundlePage.js +75 -0
- package/dist/node/components/docs/guides/GuideGenerateDocsClientsSchemasPage.js +2 -209
- package/dist/node/components/docs/guides/GuideHostBuilderWorkbenchPage.js +69 -0
- package/dist/node/components/docs/guides/GuideImportExistingCodebasesPage.js +8 -754
- package/dist/node/components/docs/guides/GuideNextjsOneEndpointPage.js +6 -268
- package/dist/node/components/docs/guides/GuideSpecValidationTypingPage.js +4 -196
- package/dist/node/components/docs/guides/GuidesIndexPage.js +2 -169
- package/dist/node/components/docs/guides/guides.docblocks.js +11 -75
- package/dist/node/components/docs/guides/index.js +213 -2428
- package/dist/node/components/docs/index.js +542 -24310
- package/dist/node/components/docs/integrations/IntegrationsCircuitBreakersPage.js +2 -42
- package/dist/node/components/docs/integrations/IntegrationsElevenLabsPage.js +3 -105
- package/dist/node/components/docs/integrations/IntegrationsGithubPage.js +3 -142
- package/dist/node/components/docs/integrations/IntegrationsGmailPage.js +3 -109
- package/dist/node/components/docs/integrations/IntegrationsGoogleCalendarPage.js +3 -79
- package/dist/node/components/docs/integrations/IntegrationsHealthRoutingPage.js +3 -146
- package/dist/node/components/docs/integrations/IntegrationsMistralPage.js +5 -150
- package/dist/node/components/docs/integrations/IntegrationsOpenAIPage.js +5 -140
- package/dist/node/components/docs/integrations/IntegrationsOverviewPage.js +1 -160
- package/dist/node/components/docs/integrations/IntegrationsPostmarkPage.js +4 -218
- package/dist/node/components/docs/integrations/IntegrationsPowensPage.js +4 -300
- package/dist/node/components/docs/integrations/IntegrationsQdrantPage.js +5 -111
- package/dist/node/components/docs/integrations/IntegrationsResendPage.js +3 -102
- package/dist/node/components/docs/integrations/IntegrationsS3Page.js +4 -124
- package/dist/node/components/docs/integrations/IntegrationsSlackPage.js +3 -144
- package/dist/node/components/docs/integrations/IntegrationsSpecModelPage.js +7 -290
- package/dist/node/components/docs/integrations/IntegrationsStripePage.js +6 -327
- package/dist/node/components/docs/integrations/IntegrationsTwilioPage.js +3 -128
- package/dist/node/components/docs/integrations/IntegrationsWhatsappMetaPage.js +2 -146
- package/dist/node/components/docs/integrations/IntegrationsWhatsappTwilioPage.js +2 -156
- package/dist/node/components/docs/integrations/index.js +52 -3100
- package/dist/node/components/docs/intent/ContractFirstApiPage.js +2 -126
- package/dist/node/components/docs/intent/DeterministicCodegenPage.js +2 -148
- package/dist/node/components/docs/intent/GenerateClientFromSchemaPage.js +7 -207
- package/dist/node/components/docs/intent/OpenapiAlternativePage.js +3 -201
- package/dist/node/components/docs/intent/SchemaValidationTypescriptPage.js +4 -144
- package/dist/node/components/docs/intent/SpecDrivenDevelopmentPage.js +2 -126
- package/dist/node/components/docs/intent/index.js +15 -1135
- package/dist/node/components/docs/intent/intent-pages.docblocks.js +1 -201
- package/dist/node/components/docs/knowledge/KnowledgeCategoriesPage.js +6 -750
- package/dist/node/components/docs/knowledge/KnowledgeExamplesPage.js +4 -175
- package/dist/node/components/docs/knowledge/KnowledgeOverviewPage.js +1 -116
- package/dist/node/components/docs/knowledge/KnowledgeSourcesPage.js +8 -391
- package/dist/node/components/docs/knowledge/KnowledgeSpacesPage.js +6 -302
- package/dist/node/components/docs/knowledge/index.js +21 -1730
- package/dist/node/components/docs/libraries/LibrariesAccessibilityPage.js +3 -198
- package/dist/node/components/docs/libraries/LibrariesAiAgentPage.js +3 -141
- package/dist/node/components/docs/libraries/LibrariesAnalyticsPage.js +4 -80
- package/dist/node/components/docs/libraries/LibrariesContentGenPage.js +2 -100
- package/dist/node/components/docs/libraries/LibrariesContractsPage.js +2 -284
- package/dist/node/components/docs/libraries/LibrariesCostTrackingPage.js +3 -112
- package/dist/node/components/docs/libraries/LibrariesDataBackendPage.js +2 -166
- package/dist/node/components/docs/libraries/LibrariesDataViewsPage.js +3 -186
- package/dist/node/components/docs/libraries/LibrariesDesignSystemPage.js +4 -279
- package/dist/node/components/docs/libraries/LibrariesEvolutionPage.js +4 -127
- package/dist/node/components/docs/libraries/LibrariesGraphQLPage.js +2 -173
- package/dist/node/components/docs/libraries/LibrariesGrowthPage.js +3 -88
- package/dist/node/components/docs/libraries/LibrariesMultiTenancyPage.js +3 -108
- package/dist/node/components/docs/libraries/LibrariesObservabilityPage.js +5 -130
- package/dist/node/components/docs/libraries/LibrariesOverlayEnginePage.js +4 -110
- package/dist/node/components/docs/libraries/LibrariesOverviewPage.js +1 -170
- package/dist/node/components/docs/libraries/LibrariesPersonalizationPage.js +4 -114
- package/dist/node/components/docs/libraries/LibrariesProgressiveDeliveryPage.js +3 -132
- package/dist/node/components/docs/libraries/LibrariesResiliencePage.js +4 -120
- package/dist/node/components/docs/libraries/LibrariesRuntimePage.js +2 -200
- package/dist/node/components/docs/libraries/LibrariesSLOPage.js +3 -116
- package/dist/node/components/docs/libraries/LibrariesSchemaPage.js +3 -273
- package/dist/node/components/docs/libraries/LibrariesSupportBotPage.js +3 -134
- package/dist/node/components/docs/libraries/LibrariesTestingPage.js +3 -133
- package/dist/node/components/docs/libraries/LibrariesUIKitPage.js +2 -230
- package/dist/node/components/docs/libraries/LibrariesWorkflowComposerPage.js +3 -88
- package/dist/node/components/docs/libraries/LibrariesWorkflowsPage.js +2 -181
- package/dist/node/components/docs/libraries/index.js +54 -4147
- package/dist/node/components/docs/manifesto/ManifestoPage.js +1 -86
- package/dist/node/components/docs/ops/AutoEvolutionOpsPage.js +2 -132
- package/dist/node/components/docs/ops/DistributedTracingOpsPage.js +2 -71
- package/dist/node/components/docs/ops/index.js +3 -202
- package/dist/node/components/docs/ops/ops-lifecycle.docblocks.js +3 -38
- package/dist/node/components/docs/ops/ops-runbooks-a.docblocks.js +3 -94
- package/dist/node/components/docs/ops/ops-runbooks-b.docblocks.js +3 -76
- package/dist/node/components/docs/ops/ops-slo-tenant.docblocks.js +3 -76
- package/dist/node/components/docs/ops/ops-top.docs.js +2 -17
- package/dist/node/components/docs/ops/ops.docs.js +10 -302
- package/dist/node/components/docs/product/product.docblocks.js +5 -72
- package/dist/node/components/docs/reference/DocsMarkdownContent.js +2 -196
- package/dist/node/components/docs/reference/DocsReferenceContent.js +3 -256
- package/dist/node/components/docs/reference/DocsReferenceIndexClient.js +2 -127
- package/dist/node/components/docs/reference/DocsReferenceIndexPage.js +2 -206
- package/dist/node/components/docs/reference/DocsReferencePage.js +3 -265
- package/dist/node/components/docs/reference/docsMarkdownParser.js +2 -92
- package/dist/node/components/docs/reference/index.js +4 -470
- package/dist/node/components/docs/safety/SafetyAuditingPage.js +2 -350
- package/dist/node/components/docs/safety/SafetyMigrationsPage.js +2 -359
- package/dist/node/components/docs/safety/SafetyOverviewPage.js +1 -101
- package/dist/node/components/docs/safety/SafetyPDPPage.js +2 -301
- package/dist/node/components/docs/safety/SafetySecurityTrustPage.js +1 -206
- package/dist/node/components/docs/safety/SafetySigningPage.js +3 -90
- package/dist/node/components/docs/safety/SafetyTenantIsolationPage.js +2 -79
- package/dist/node/components/docs/safety/index.js +7 -1480
- package/dist/node/components/docs/shared/StudioPrompt.js +1 -31
- package/dist/node/components/docs/specs/SpecsBuilderControlPlanePage.js +33 -0
- package/dist/node/components/docs/specs/SpecsCapabilitiesPage.js +2 -158
- package/dist/node/components/docs/specs/SpecsConnectPage.js +7 -0
- package/dist/node/components/docs/specs/SpecsDataViewsPage.js +2 -260
- package/dist/node/components/docs/specs/SpecsModuleBundlesPage.js +66 -0
- package/dist/node/components/docs/specs/SpecsOverlaysPage.js +2 -372
- package/dist/node/components/docs/specs/SpecsOverviewPage.js +1 -186
- package/dist/node/components/docs/specs/SpecsPolicyPage.js +3 -420
- package/dist/node/components/docs/specs/SpecsWorkflowsPage.js +2 -325
- package/dist/node/components/docs/specs/index.js +109 -1715
- package/dist/node/components/docs/studio/StudioBYOKPage.js +1 -26
- package/dist/node/components/docs/studio/StudioDeploymentsPage.js +1 -26
- package/dist/node/components/docs/studio/StudioGettingStartedPage.js +1 -26
- package/dist/node/components/docs/studio/StudioIntegrationsPage.js +1 -26
- package/dist/node/components/docs/studio/StudioOverviewPage.js +1 -157
- package/dist/node/components/docs/studio/StudioVisualBuilderPage.js +1 -26
- package/dist/node/components/docs/studio/index.js +1 -282
- package/dist/node/components/docs/tech/contracts/tech-docs.docblocks.js +2 -19
- package/dist/node/components/integrations/index.js +2 -600
- package/dist/node/components/integrations/molecules/IntegrationCard.js +1 -100
- package/dist/node/components/integrations/organisms/IntegrationMarketplace.js +1 -214
- package/dist/node/components/integrations/organisms/IntegrationSettings.js +2 -284
- package/dist/node/components/integrations/organisms/KnowledgeSourceList.js +1 -103
- package/dist/node/components/legal/PrivacyTemplate.js +1 -1025
- package/dist/node/components/legal/TermsTemplate.js +1 -941
- package/dist/node/components/legal/index.js +1 -1963
- package/dist/node/components/shared/FeatureGateNotice.js +1 -38
- package/dist/node/components/shared/index.js +1 -38
- package/dist/node/components/shell/WorkspaceHeader.js +1 -100
- package/dist/node/components/shell/WorkspaceProjectShellLayout.js +1 -222
- package/dist/node/components/shell/WorkspaceShellRenderer.js +1 -228
- package/dist/node/components/shell/WorkspaceSidebar.js +1 -68
- package/dist/node/components/shell/index.js +1 -287
- package/dist/node/components/templates/engine/index.js +1 -39
- package/dist/node/components/templates/index.js +11 -965
- package/dist/node/components/templates/messaging/ConversationList.js +2 -83
- package/dist/node/components/templates/messaging/MessageComposer.js +4 -150
- package/dist/node/components/templates/messaging/MessageThread.js +3 -83
- package/dist/node/components/templates/messaging/MessagingWorkspace.js +5 -265
- package/dist/node/components/templates/messaging/index.js +5 -269
- package/dist/node/components/templates/recipes/LanguageSwitcher.js +1 -16
- package/dist/node/components/templates/recipes/RecipeCard.js +1 -80
- package/dist/node/components/templates/recipes/RecipeDetail.js +1 -74
- package/dist/node/components/templates/recipes/RecipeList.js +3 -245
- package/dist/node/components/templates/recipes/index.js +3 -248
- package/dist/node/components/templates/todos/FilterBar.js +1 -107
- package/dist/node/components/templates/todos/TaskForm.js +2 -158
- package/dist/node/components/templates/todos/TaskItem.js +1 -77
- package/dist/node/components/templates/todos/TaskList.js +5 -449
- package/dist/node/components/templates/todos/index.js +5 -452
- package/dist/node/config/contractspec-blueprint.js +1 -123
- package/dist/node/config/contractspec-branding.js +1 -44
- package/dist/node/config/contractspec-routes.js +1 -24
- package/dist/node/config/index.js +1 -126
- package/dist/node/features/contracts-registry.js +1 -178
- package/dist/node/features/docs/docs.contracts.js +1 -17
- package/dist/node/features/docs/index.js +1 -17
- package/dist/node/features/docs.feature.js +1 -33
- package/dist/node/features/index.js +1 -315
- package/dist/node/features/mcp.feature.js +1 -30
- package/dist/node/features/presentations.feature.js +1 -33
- package/dist/node/features/registry.js +1 -116
- package/dist/node/index.js +556 -28593
- package/dist/node/infrastructure/elysia/index.js +1 -35
- package/dist/node/infrastructure/elysia/logger.js +1 -35
- package/dist/node/infrastructure/index.js +1 -35
- package/dist/node/libs/email/client.js +1 -114
- package/dist/node/libs/email/contact.js +12 -165
- package/dist/node/libs/email/newsletter.js +6 -167
- package/dist/node/libs/email/types.js +0 -2
- package/dist/node/libs/email/utils.js +2 -8
- package/dist/node/libs/email/waitlist-application.js +28 -209
- package/dist/node/libs/email/waitlist.js +6 -167
- package/dist/node/libs/email.js +46 -363
- package/dist/node/libs/posthog/client.js +1 -63
- package/dist/node/libs/posthog/native.js +1 -23
- package/dist/node/libs/posthog/server.js +1 -13
- package/dist/node/libs/pricing-examples.js +1 -18
- package/dist/node/presentation/features/atoms/FeatureIcon/FeatureIcon.js +1 -97
- package/dist/node/presentation/features/atoms/FeatureIcon/index.js +1 -97
- package/dist/node/presentation/features/atoms/index.js +1 -97
- package/dist/node/presentation/features/hooks/index.js +1 -397
- package/dist/node/presentation/features/hooks/useContractsRegistry.js +1 -289
- package/dist/node/presentation/features/hooks/useFeatureFilters.js +1 -75
- package/dist/node/presentation/features/hooks/useFeatureRegistry.js +1 -147
- package/dist/node/presentation/features/hooks/useRelatedDocs.js +1 -28
- package/dist/node/presentation/features/index.js +1 -3063
- package/dist/node/presentation/features/molecules/FeatureCard/FeatureCard.js +1 -366
- package/dist/node/presentation/features/molecules/FeatureCard/index.js +1 -366
- package/dist/node/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.js +1 -50
- package/dist/node/presentation/features/molecules/FeatureCategoryHeader/index.js +1 -50
- package/dist/node/presentation/features/molecules/FeatureFilters/FeatureFilters.js +1 -92
- package/dist/node/presentation/features/molecules/FeatureFilters/index.js +1 -92
- package/dist/node/presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.js +1 -176
- package/dist/node/presentation/features/molecules/FeatureHoverPreview/index.js +1 -176
- package/dist/node/presentation/features/molecules/index.js +1 -505
- package/dist/node/presentation/features/organisms/FeatureDataViewsList.js +1 -304
- package/dist/node/presentation/features/organisms/FeatureDetail/FeatureDetail.js +1 -154
- package/dist/node/presentation/features/organisms/FeatureDetail/index.js +1 -154
- package/dist/node/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.js +1 -909
- package/dist/node/presentation/features/organisms/FeatureDiscovery/index.js +1 -909
- package/dist/node/presentation/features/organisms/FeatureEventsList.js +1 -302
- package/dist/node/presentation/features/organisms/FeatureFormsList.js +1 -302
- package/dist/node/presentation/features/organisms/FeatureOperationsList.js +1 -180
- package/dist/node/presentation/features/organisms/FeaturePresentationsList.js +1 -304
- package/dist/node/presentation/features/organisms/index.js +1 -1359
- package/dist/node/presentation/features/templates/FeatureDataViewDetailTemplate/FeatureDataViewDetailTemplate.js +1 -332
- package/dist/node/presentation/features/templates/FeatureDataViewDetailTemplate/index.js +1 -332
- package/dist/node/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.js +1 -342
- package/dist/node/presentation/features/templates/FeatureDataViewsTemplate/index.js +1 -342
- package/dist/node/presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.js +1 -303
- package/dist/node/presentation/features/templates/FeatureEventDetailTemplate/index.js +1 -303
- package/dist/node/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.js +1 -340
- package/dist/node/presentation/features/templates/FeatureEventsTemplate/index.js +1 -340
- package/dist/node/presentation/features/templates/FeatureFormDetailTemplate/FeatureFormDetailTemplate.js +1 -329
- package/dist/node/presentation/features/templates/FeatureFormDetailTemplate/index.js +1 -329
- package/dist/node/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js +1 -340
- package/dist/node/presentation/features/templates/FeatureFormsTemplate/index.js +1 -340
- package/dist/node/presentation/features/templates/FeatureOperationDetailTemplate/FeatureOperationDetailTemplate.js +1 -302
- package/dist/node/presentation/features/templates/FeatureOperationDetailTemplate/index.js +1 -302
- package/dist/node/presentation/features/templates/FeatureOperationsTemplate/FeatureOperationsTemplate.js +1 -218
- package/dist/node/presentation/features/templates/FeatureOperationsTemplate/index.js +1 -218
- package/dist/node/presentation/features/templates/FeatureOverviewTemplate/FeatureOverviewTemplate.js +1 -187
- package/dist/node/presentation/features/templates/FeatureOverviewTemplate/index.js +1 -187
- package/dist/node/presentation/features/templates/FeaturePresentationDetailTemplate/FeaturePresentationDetailTemplate.js +1 -306
- package/dist/node/presentation/features/templates/FeaturePresentationDetailTemplate/index.js +1 -306
- package/dist/node/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.js +1 -342
- package/dist/node/presentation/features/templates/FeaturePresentationsTemplate/index.js +1 -342
- package/dist/presentation/features/atoms/FeatureIcon/FeatureIcon.js +1 -97
- package/dist/presentation/features/atoms/FeatureIcon/index.js +1 -97
- package/dist/presentation/features/atoms/index.js +1 -97
- package/dist/presentation/features/hooks/index.js +1 -397
- package/dist/presentation/features/hooks/useContractsRegistry.js +1 -289
- package/dist/presentation/features/hooks/useFeatureFilters.js +1 -75
- package/dist/presentation/features/hooks/useFeatureRegistry.js +1 -147
- package/dist/presentation/features/hooks/useRelatedDocs.js +1 -28
- package/dist/presentation/features/index.js +1 -3063
- package/dist/presentation/features/molecules/FeatureCard/FeatureCard.js +1 -366
- package/dist/presentation/features/molecules/FeatureCard/index.js +1 -366
- package/dist/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.js +1 -50
- package/dist/presentation/features/molecules/FeatureCategoryHeader/index.js +1 -50
- package/dist/presentation/features/molecules/FeatureFilters/FeatureFilters.js +1 -92
- package/dist/presentation/features/molecules/FeatureFilters/index.js +1 -92
- package/dist/presentation/features/molecules/FeatureHoverPreview/FeatureHoverPreview.js +1 -176
- package/dist/presentation/features/molecules/FeatureHoverPreview/index.js +1 -176
- package/dist/presentation/features/molecules/index.js +1 -505
- package/dist/presentation/features/organisms/FeatureDataViewsList.js +1 -304
- package/dist/presentation/features/organisms/FeatureDetail/FeatureDetail.js +1 -154
- package/dist/presentation/features/organisms/FeatureDetail/index.js +1 -154
- package/dist/presentation/features/organisms/FeatureDiscovery/FeatureDiscovery.js +1 -909
- package/dist/presentation/features/organisms/FeatureDiscovery/index.js +1 -909
- package/dist/presentation/features/organisms/FeatureEventsList.js +1 -302
- package/dist/presentation/features/organisms/FeatureFormsList.js +1 -302
- package/dist/presentation/features/organisms/FeatureOperationsList.js +1 -180
- package/dist/presentation/features/organisms/FeaturePresentationsList.js +1 -304
- package/dist/presentation/features/organisms/index.js +1 -1359
- package/dist/presentation/features/templates/FeatureDataViewDetailTemplate/FeatureDataViewDetailTemplate.js +1 -332
- package/dist/presentation/features/templates/FeatureDataViewDetailTemplate/index.js +1 -332
- package/dist/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.js +1 -342
- package/dist/presentation/features/templates/FeatureDataViewsTemplate/index.js +1 -342
- package/dist/presentation/features/templates/FeatureEventDetailTemplate/FeatureEventDetailTemplate.js +1 -303
- package/dist/presentation/features/templates/FeatureEventDetailTemplate/index.js +1 -303
- package/dist/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.js +1 -340
- package/dist/presentation/features/templates/FeatureEventsTemplate/index.js +1 -340
- package/dist/presentation/features/templates/FeatureFormDetailTemplate/FeatureFormDetailTemplate.js +1 -329
- package/dist/presentation/features/templates/FeatureFormDetailTemplate/index.js +1 -329
- package/dist/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js +1 -340
- package/dist/presentation/features/templates/FeatureFormsTemplate/index.js +1 -340
- package/dist/presentation/features/templates/FeatureOperationDetailTemplate/FeatureOperationDetailTemplate.js +1 -302
- package/dist/presentation/features/templates/FeatureOperationDetailTemplate/index.js +1 -302
- package/dist/presentation/features/templates/FeatureOperationsTemplate/FeatureOperationsTemplate.js +1 -218
- package/dist/presentation/features/templates/FeatureOperationsTemplate/index.js +1 -218
- package/dist/presentation/features/templates/FeatureOverviewTemplate/FeatureOverviewTemplate.js +1 -187
- package/dist/presentation/features/templates/FeatureOverviewTemplate/index.js +1 -187
- package/dist/presentation/features/templates/FeaturePresentationDetailTemplate/FeaturePresentationDetailTemplate.js +1 -306
- package/dist/presentation/features/templates/FeaturePresentationDetailTemplate/index.js +1 -306
- package/dist/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.js +1 -342
- package/dist/presentation/features/templates/FeaturePresentationsTemplate/index.js +1 -342
- package/package.json +103 -31
- package/src/components/docs/DocsIndexPage.tsx +55 -0
- package/src/components/docs/architecture/ArchitectureControlPlanePage.tsx +19 -0
- package/src/components/docs/architecture/ArchitectureOverviewPage.tsx +34 -0
- package/src/components/docs/docsManifest.test.ts +70 -0
- package/src/components/docs/docsManifest.ts +71 -1
- package/src/components/docs/ecosystem/PluginsPage.tsx +24 -10
- package/src/components/docs/ecosystem/RegistryPage.tsx +11 -6
- package/src/components/docs/generated/docs-index._common.json +206 -273
- package/src/components/docs/generated/docs-index.control-plane.json +18 -0
- package/src/components/docs/generated/docs-index.defineExample.json +10 -0
- package/src/components/docs/generated/docs-index.manifest.json +22 -12
- package/src/components/docs/generated/docs-index.platform-acp.json +64 -0
- package/src/components/docs/generated/docs-index.platform-agent.json +89 -1
- package/src/components/docs/generated/docs-index.platform-context.json +48 -0
- package/src/components/docs/generated/docs-index.platform-control-plane.json +72 -0
- package/src/components/docs/generated/docs-index.platform-database.json +40 -0
- package/src/components/docs/generated/docs-index.platform-docs.json +64 -0
- package/src/components/docs/generated/docs-index.platform-provider-ranking.json +89 -1
- package/src/components/docs/generated/docs-index.pocket-family-office.json +8 -0
- package/src/components/docs/generated/docs-index.unknown.json +8 -0
- package/src/components/docs/guides/GuideConnectInRepoPage.tsx +184 -0
- package/src/components/docs/guides/GuideFirstModuleBundlePage.tsx +182 -0
- package/src/components/docs/guides/GuideHostBuilderWorkbenchPage.tsx +230 -0
- package/src/components/docs/guides/GuidesIndexPage.tsx +21 -0
- package/src/components/docs/guides/index.ts +3 -0
- package/src/components/docs/specs/SpecsBuilderControlPlanePage.tsx +210 -0
- package/src/components/docs/specs/SpecsConnectPage.tsx +162 -0
- package/src/components/docs/specs/SpecsModuleBundlesPage.tsx +223 -0
- package/src/components/docs/specs/SpecsOverlaysPage.tsx +20 -0
- package/src/components/docs/specs/SpecsOverviewPage.tsx +44 -0
- package/src/components/docs/specs/index.ts +3 -0
- package/src/components/docs/studio/StudioOverviewPage.tsx +26 -0
- package/src/infrastructure/elysia/logger.ts +11 -3
|
@@ -1,270 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
var contractFirstApiBrief = {
|
|
3
|
-
title: "Contract-first API",
|
|
4
|
-
summary: "Design APIs by writing contracts first, then generate consistent implementations across frameworks.",
|
|
5
|
-
problems: [
|
|
6
|
-
"API drift between frontend and backend",
|
|
7
|
-
"Inconsistent error handling across endpoints",
|
|
8
|
-
"Documentation becomes outdated quickly",
|
|
9
|
-
"Manual OpenAPI maintenance is error-prone"
|
|
10
|
-
],
|
|
11
|
-
solutions: [
|
|
12
|
-
"Single source of truth for API contracts",
|
|
13
|
-
"Generate OpenAPI and SDKs from contracts",
|
|
14
|
-
"Type-safe request/response validation",
|
|
15
|
-
"Always-in-sync documentation"
|
|
16
|
-
],
|
|
17
|
-
audience: {
|
|
18
|
-
role: "API developers",
|
|
19
|
-
industry: "Software development",
|
|
20
|
-
maturity: "scaleup"
|
|
21
|
-
},
|
|
22
|
-
callToAction: "Start with a simple operation contract",
|
|
23
|
-
references: [
|
|
24
|
-
{
|
|
25
|
-
label: "Next.js One Endpoint Guide",
|
|
26
|
-
url: "/docs/guides/nextjs-one-endpoint"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
label: "API Reference",
|
|
30
|
-
url: "/docs/api"
|
|
31
|
-
}
|
|
32
|
-
]
|
|
33
|
-
};
|
|
34
|
-
var specDrivenDevelopmentBrief = {
|
|
35
|
-
title: "Spec-driven development",
|
|
36
|
-
summary: "Build features by writing specifications first, then generate type-safe implementations.",
|
|
37
|
-
problems: [
|
|
38
|
-
"Feature requirements are ambiguous",
|
|
39
|
-
"Frontend and backend implementations diverge",
|
|
40
|
-
"Testing lacks clear contract definitions",
|
|
41
|
-
"Code reviews focus on style instead of behavior"
|
|
42
|
-
],
|
|
43
|
-
solutions: [
|
|
44
|
-
"Executable specifications as single source of truth",
|
|
45
|
-
"Generate type-safe clients from specs",
|
|
46
|
-
"Automated contract testing",
|
|
47
|
-
"Clear behavior contracts for teams"
|
|
48
|
-
],
|
|
49
|
-
audience: {
|
|
50
|
-
role: "Development teams",
|
|
51
|
-
industry: "Software engineering",
|
|
52
|
-
maturity: "enterprise"
|
|
53
|
-
},
|
|
54
|
-
callToAction: "Define your first feature spec",
|
|
55
|
-
references: [
|
|
56
|
-
{
|
|
57
|
-
label: "Spec Validation + Typing Guide",
|
|
58
|
-
url: "/docs/guides/spec-validation-and-typing"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
label: "Core Contracts",
|
|
62
|
-
url: "/docs/core-contracts"
|
|
63
|
-
}
|
|
64
|
-
]
|
|
65
|
-
};
|
|
66
|
-
var deterministicCodegenBrief = {
|
|
67
|
-
title: "Deterministic codegen",
|
|
68
|
-
summary: "Regenerate code from contracts without breaking existing functionality or losing customizations.",
|
|
69
|
-
problems: [
|
|
70
|
-
"Generated code conflicts with manual changes",
|
|
71
|
-
"Regeneration loses custom business logic",
|
|
72
|
-
"Teams avoid regeneration after customization",
|
|
73
|
-
"Code migration between versions is risky"
|
|
74
|
-
],
|
|
75
|
-
solutions: [
|
|
76
|
-
"Clear separation of generated vs hand-written code",
|
|
77
|
-
"Incremental regeneration with conflict detection",
|
|
78
|
-
"Protected zones for custom logic",
|
|
79
|
-
"Automatic migration paths"
|
|
80
|
-
],
|
|
81
|
-
audience: {
|
|
82
|
-
role: "Platform engineers",
|
|
83
|
-
industry: "Developer tools",
|
|
84
|
-
maturity: "scaleup"
|
|
85
|
-
},
|
|
86
|
-
callToAction: "Try deterministic regeneration",
|
|
87
|
-
references: [
|
|
88
|
-
{
|
|
89
|
-
label: "Generate Docs + Clients Guide",
|
|
90
|
-
url: "/docs/guides/generate-docs-clients-schemas"
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
label: "CLI Reference",
|
|
94
|
-
url: "/docs/getting-started/cli"
|
|
95
|
-
}
|
|
96
|
-
]
|
|
97
|
-
};
|
|
98
|
-
var schemaValidationTypescriptBrief = {
|
|
99
|
-
title: "Schema validation TypeScript",
|
|
100
|
-
summary: "Generate TypeScript types from contracts and validate data at runtime with zero overhead.",
|
|
101
|
-
problems: [
|
|
102
|
-
"Runtime type validation is boilerplate-heavy",
|
|
103
|
-
"Type definitions drift from schemas",
|
|
104
|
-
"Validation logic scattered across codebase",
|
|
105
|
-
"Poor error messages for invalid data"
|
|
106
|
-
],
|
|
107
|
-
solutions: [
|
|
108
|
-
"Auto-generated TypeScript from contracts",
|
|
109
|
-
"Zod schemas for runtime validation",
|
|
110
|
-
"Type-safe validation with clear errors",
|
|
111
|
-
"Single source of schema truth"
|
|
112
|
-
],
|
|
113
|
-
audience: {
|
|
114
|
-
role: "TypeScript developers",
|
|
115
|
-
industry: "Web development",
|
|
116
|
-
maturity: "early"
|
|
117
|
-
},
|
|
118
|
-
callToAction: "Generate typed contracts now",
|
|
119
|
-
references: [
|
|
120
|
-
{
|
|
121
|
-
label: "Type Safety Guide",
|
|
122
|
-
url: "/docs/guides/spec-validation-and-typing"
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
label: "Schema Reference",
|
|
126
|
-
url: "/docs/schemas"
|
|
127
|
-
}
|
|
128
|
-
]
|
|
129
|
-
};
|
|
130
|
-
var openapiAlternativeBrief = {
|
|
131
|
-
title: "OpenAPI alternative",
|
|
132
|
-
summary: "A spec-first approach that goes beyond OpenAPI with executable contracts and code generation.",
|
|
133
|
-
problems: [
|
|
134
|
-
"OpenAPI is documentation-only",
|
|
135
|
-
"No type safety from OpenAPI specs",
|
|
136
|
-
"Manual SDK generation is complex",
|
|
137
|
-
"Cannot validate implementations against OpenAPI"
|
|
138
|
-
],
|
|
139
|
-
solutions: [
|
|
140
|
-
"Executable contracts with validation",
|
|
141
|
-
"Generate multiple outputs from one spec",
|
|
142
|
-
"Type-safe by default",
|
|
143
|
-
"Built-in testing and validation"
|
|
144
|
-
],
|
|
145
|
-
audience: {
|
|
146
|
-
role: "API architects",
|
|
147
|
-
industry: "Enterprise software",
|
|
148
|
-
maturity: "enterprise"
|
|
149
|
-
},
|
|
150
|
-
callToAction: "Compare with OpenAPI approach",
|
|
151
|
-
references: [
|
|
152
|
-
{
|
|
153
|
-
label: "Generate OpenAPI from Contracts",
|
|
154
|
-
url: "/docs/guides/generate-docs-clients-schemas"
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
label: "Contract vs OpenAPI",
|
|
158
|
-
url: "/docs/comparison/openapi"
|
|
159
|
-
}
|
|
160
|
-
]
|
|
161
|
-
};
|
|
162
|
-
var generateClientFromSchemaBrief = {
|
|
163
|
-
title: "Generate client from schema",
|
|
164
|
-
summary: "Automatically generate type-safe API clients in any language from your contracts.",
|
|
165
|
-
problems: [
|
|
166
|
-
"Writing API clients is repetitive",
|
|
167
|
-
"Manual clients have type mismatches",
|
|
168
|
-
"Keeping clients in sync with APIs",
|
|
169
|
-
"Language-specific client maintenance"
|
|
170
|
-
],
|
|
171
|
-
solutions: [
|
|
172
|
-
"Generate clients for multiple languages",
|
|
173
|
-
"Type-safe request/response handling",
|
|
174
|
-
"Automatic client updates from contracts",
|
|
175
|
-
"Consistent error handling across languages"
|
|
176
|
-
],
|
|
177
|
-
audience: {
|
|
178
|
-
role: "Full-stack developers",
|
|
179
|
-
industry: "Software development",
|
|
180
|
-
maturity: "scaleup"
|
|
181
|
-
},
|
|
182
|
-
callToAction: "Generate your first API client",
|
|
183
|
-
references: [
|
|
184
|
-
{
|
|
185
|
-
label: "Client Generation Guide",
|
|
186
|
-
url: "/docs/guides/generate-docs-clients-schemas"
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
label: "Supported Languages",
|
|
190
|
-
url: "/docs/integrations"
|
|
191
|
-
}
|
|
192
|
-
]
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
// src/components/docs/intent/ContractFirstApiPage.tsx
|
|
196
|
-
import { contractFirstApiBrief as contractFirstApiBrief2 } from "@contractspec/bundle.library/components/docs/intent/intent-pages.docblocks";
|
|
197
|
-
import { SeoOptimizer } from "@contractspec/lib.content-gen/seo";
|
|
198
|
-
import { CodeBlock } from "@contractspec/lib.design-system";
|
|
199
|
-
import Link from "@contractspec/lib.ui-link";
|
|
200
|
-
import { ChevronRight } from "lucide-react";
|
|
201
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
202
|
-
var metadata = new SeoOptimizer().optimize(contractFirstApiBrief2);
|
|
203
|
-
function ContractFirstApiPage() {
|
|
204
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
205
|
-
className: "space-y-8",
|
|
206
|
-
children: [
|
|
207
|
-
/* @__PURE__ */ jsxs("div", {
|
|
208
|
-
className: "space-y-3",
|
|
209
|
-
children: [
|
|
210
|
-
/* @__PURE__ */ jsx("h1", {
|
|
211
|
-
className: "font-bold text-4xl",
|
|
212
|
-
children: contractFirstApiBrief2.title
|
|
213
|
-
}),
|
|
214
|
-
/* @__PURE__ */ jsx("p", {
|
|
215
|
-
className: "text-lg text-muted-foreground",
|
|
216
|
-
children: contractFirstApiBrief2.summary
|
|
217
|
-
})
|
|
218
|
-
]
|
|
219
|
-
}),
|
|
220
|
-
/* @__PURE__ */ jsxs("div", {
|
|
221
|
-
className: "card-subtle space-y-4 p-6",
|
|
222
|
-
children: [
|
|
223
|
-
/* @__PURE__ */ jsx("h2", {
|
|
224
|
-
className: "font-bold text-2xl",
|
|
225
|
-
children: "Problems Solved"
|
|
226
|
-
}),
|
|
227
|
-
/* @__PURE__ */ jsx("ul", {
|
|
228
|
-
className: "space-y-2 text-muted-foreground text-sm",
|
|
229
|
-
children: contractFirstApiBrief2.problems.map((problem, index) => /* @__PURE__ */ jsx("li", {
|
|
230
|
-
children: problem
|
|
231
|
-
}, index))
|
|
232
|
-
})
|
|
233
|
-
]
|
|
234
|
-
}),
|
|
235
|
-
/* @__PURE__ */ jsxs("div", {
|
|
236
|
-
className: "card-subtle space-y-4 p-6",
|
|
237
|
-
children: [
|
|
238
|
-
/* @__PURE__ */ jsx("h2", {
|
|
239
|
-
className: "font-bold text-2xl",
|
|
240
|
-
children: "Solutions"
|
|
241
|
-
}),
|
|
242
|
-
/* @__PURE__ */ jsx("ul", {
|
|
243
|
-
className: "space-y-2 text-muted-foreground text-sm",
|
|
244
|
-
children: contractFirstApiBrief2.solutions.map((solution, index) => /* @__PURE__ */ jsx("li", {
|
|
245
|
-
children: solution
|
|
246
|
-
}, index))
|
|
247
|
-
})
|
|
248
|
-
]
|
|
249
|
-
}),
|
|
250
|
-
/* @__PURE__ */ jsxs("div", {
|
|
251
|
-
className: "space-y-6",
|
|
252
|
-
children: [
|
|
253
|
-
/* @__PURE__ */ jsxs("div", {
|
|
254
|
-
className: "space-y-3",
|
|
255
|
-
children: [
|
|
256
|
-
/* @__PURE__ */ jsx("h2", {
|
|
257
|
-
className: "font-bold text-2xl",
|
|
258
|
-
children: "Quick Start"
|
|
259
|
-
}),
|
|
260
|
-
/* @__PURE__ */ jsx("p", {
|
|
261
|
-
className: "text-muted-foreground text-sm",
|
|
262
|
-
children: "Define your first API contract and generate consistent implementations."
|
|
263
|
-
}),
|
|
264
|
-
/* @__PURE__ */ jsx(CodeBlock, {
|
|
265
|
-
language: "typescript",
|
|
266
|
-
filename: "src/contracts/user-create.operation.ts",
|
|
267
|
-
code: `import { defineOperation } from '@contractspec/lib.contracts-spec/operations';
|
|
1
|
+
var B={title:"Contract-first API",summary:"Design APIs by writing contracts first, then generate consistent implementations across frameworks.",problems:["API drift between frontend and backend","Inconsistent error handling across endpoints","Documentation becomes outdated quickly","Manual OpenAPI maintenance is error-prone"],solutions:["Single source of truth for API contracts","Generate OpenAPI and SDKs from contracts","Type-safe request/response validation","Always-in-sync documentation"],audience:{role:"API developers",industry:"Software development",maturity:"scaleup"},callToAction:"Start with a simple operation contract",references:[{label:"Next.js One Endpoint Guide",url:"/docs/guides/nextjs-one-endpoint"},{label:"API Reference",url:"/docs/api"}]},s={title:"Spec-driven development",summary:"Build features by writing specifications first, then generate type-safe implementations.",problems:["Feature requirements are ambiguous","Frontend and backend implementations diverge","Testing lacks clear contract definitions","Code reviews focus on style instead of behavior"],solutions:["Executable specifications as single source of truth","Generate type-safe clients from specs","Automated contract testing","Clear behavior contracts for teams"],audience:{role:"Development teams",industry:"Software engineering",maturity:"enterprise"},callToAction:"Define your first feature spec",references:[{label:"Spec Validation + Typing Guide",url:"/docs/guides/spec-validation-and-typing"},{label:"Core Contracts",url:"/docs/core-contracts"}]},j={title:"Deterministic codegen",summary:"Regenerate code from contracts without breaking existing functionality or losing customizations.",problems:["Generated code conflicts with manual changes","Regeneration loses custom business logic","Teams avoid regeneration after customization","Code migration between versions is risky"],solutions:["Clear separation of generated vs hand-written code","Incremental regeneration with conflict detection","Protected zones for custom logic","Automatic migration paths"],audience:{role:"Platform engineers",industry:"Developer tools",maturity:"scaleup"},callToAction:"Try deterministic regeneration",references:[{label:"Generate Docs + Clients Guide",url:"/docs/guides/generate-docs-clients-schemas"},{label:"CLI Reference",url:"/docs/getting-started/cli"}]},x={title:"Schema validation TypeScript",summary:"Generate TypeScript types from contracts and validate data at runtime with zero overhead.",problems:["Runtime type validation is boilerplate-heavy","Type definitions drift from schemas","Validation logic scattered across codebase","Poor error messages for invalid data"],solutions:["Auto-generated TypeScript from contracts","Zod schemas for runtime validation","Type-safe validation with clear errors","Single source of schema truth"],audience:{role:"TypeScript developers",industry:"Web development",maturity:"early"},callToAction:"Generate typed contracts now",references:[{label:"Type Safety Guide",url:"/docs/guides/spec-validation-and-typing"},{label:"Schema Reference",url:"/docs/schemas"}]},ee={title:"OpenAPI alternative",summary:"A spec-first approach that goes beyond OpenAPI with executable contracts and code generation.",problems:["OpenAPI is documentation-only","No type safety from OpenAPI specs","Manual SDK generation is complex","Cannot validate implementations against OpenAPI"],solutions:["Executable contracts with validation","Generate multiple outputs from one spec","Type-safe by default","Built-in testing and validation"],audience:{role:"API architects",industry:"Enterprise software",maturity:"enterprise"},callToAction:"Compare with OpenAPI approach",references:[{label:"Generate OpenAPI from Contracts",url:"/docs/guides/generate-docs-clients-schemas"},{label:"Contract vs OpenAPI",url:"/docs/comparison/openapi"}]},te={title:"Generate client from schema",summary:"Automatically generate type-safe API clients in any language from your contracts.",problems:["Writing API clients is repetitive","Manual clients have type mismatches","Keeping clients in sync with APIs","Language-specific client maintenance"],solutions:["Generate clients for multiple languages","Type-safe request/response handling","Automatic client updates from contracts","Consistent error handling across languages"],audience:{role:"Full-stack developers",industry:"Software development",maturity:"scaleup"},callToAction:"Generate your first API client",references:[{label:"Client Generation Guide",url:"/docs/guides/generate-docs-clients-schemas"},{label:"Supported Languages",url:"/docs/integrations"}]};import{contractFirstApiBrief as p}from"@contractspec/bundle.library/components/docs/intent/intent-pages.docblocks";import{SeoOptimizer as W}from"@contractspec/lib.content-gen/seo";import{CodeBlock as T}from"@contractspec/lib.design-system";import b from"@contractspec/lib.ui-link";import{ChevronRight as Z}from"lucide-react";import{jsx as u,jsxs as d}from"react/jsx-runtime";var ie=new W().optimize(p);function H(){return d("div",{className:"space-y-8",children:[d("div",{className:"space-y-3",children:[u("h1",{className:"font-bold text-4xl",children:p.title}),u("p",{className:"text-lg text-muted-foreground",children:p.summary})]}),d("div",{className:"card-subtle space-y-4 p-6",children:[u("h2",{className:"font-bold text-2xl",children:"Problems Solved"}),u("ul",{className:"space-y-2 text-muted-foreground text-sm",children:p.problems.map((a,n)=>u("li",{children:a},n))})]}),d("div",{className:"card-subtle space-y-4 p-6",children:[u("h2",{className:"font-bold text-2xl",children:"Solutions"}),u("ul",{className:"space-y-2 text-muted-foreground text-sm",children:p.solutions.map((a,n)=>u("li",{children:a},n))})]}),d("div",{className:"space-y-6",children:[d("div",{className:"space-y-3",children:[u("h2",{className:"font-bold text-2xl",children:"Quick Start"}),u("p",{className:"text-muted-foreground text-sm",children:"Define your first API contract and generate consistent implementations."}),u(T,{language:"typescript",filename:"src/contracts/user-create.operation.ts",code:`import { defineOperation } from '@contractspec/lib.contracts-spec/operations';
|
|
268
2
|
import { SchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';
|
|
269
3
|
|
|
270
4
|
export const CreateUserOperation = defineOperation({
|
|
@@ -298,129 +32,7 @@ export const CreateUserOperation = defineOperation({
|
|
|
298
32
|
tags: ['users', 'auth'],
|
|
299
33
|
description: 'Create a new user account with email and password',
|
|
300
34
|
},
|
|
301
|
-
});`
|
|
302
|
-
})
|
|
303
|
-
]
|
|
304
|
-
}),
|
|
305
|
-
/* @__PURE__ */ jsxs("div", {
|
|
306
|
-
className: "space-y-3",
|
|
307
|
-
children: [
|
|
308
|
-
/* @__PURE__ */ jsx("h2", {
|
|
309
|
-
className: "font-bold text-2xl",
|
|
310
|
-
children: "Generate OpenAPI"
|
|
311
|
-
}),
|
|
312
|
-
/* @__PURE__ */ jsx("p", {
|
|
313
|
-
className: "text-muted-foreground text-sm",
|
|
314
|
-
children: "Export OpenAPI documentation directly from your contracts."
|
|
315
|
-
}),
|
|
316
|
-
/* @__PURE__ */ jsx(CodeBlock, {
|
|
317
|
-
language: "bash",
|
|
318
|
-
filename: "export-openapi",
|
|
319
|
-
code: `contractspec openapi export \\
|
|
320
|
-
--registry ./src/contracts/registry.ts \\
|
|
321
|
-
--out ./openapi.json`
|
|
322
|
-
})
|
|
323
|
-
]
|
|
324
|
-
})
|
|
325
|
-
]
|
|
326
|
-
}),
|
|
327
|
-
/* @__PURE__ */ jsxs("div", {
|
|
328
|
-
className: "flex items-center gap-4 pt-4",
|
|
329
|
-
children: [
|
|
330
|
-
/* @__PURE__ */ jsxs(Link, {
|
|
331
|
-
href: "/docs/guides/nextjs-one-endpoint",
|
|
332
|
-
className: "btn-primary",
|
|
333
|
-
children: [
|
|
334
|
-
"Next.js Guide ",
|
|
335
|
-
/* @__PURE__ */ jsx(ChevronRight, {
|
|
336
|
-
size: 16
|
|
337
|
-
})
|
|
338
|
-
]
|
|
339
|
-
}),
|
|
340
|
-
/* @__PURE__ */ jsx(Link, {
|
|
341
|
-
href: "/docs/intent/spec-driven-development",
|
|
342
|
-
className: "btn-ghost",
|
|
343
|
-
children: "Spec-driven Development"
|
|
344
|
-
})
|
|
345
|
-
]
|
|
346
|
-
})
|
|
347
|
-
]
|
|
348
|
-
});
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
// src/components/docs/intent/DeterministicCodegenPage.tsx
|
|
352
|
-
import { deterministicCodegenBrief as deterministicCodegenBrief2 } from "@contractspec/bundle.library/components/docs/intent/intent-pages.docblocks";
|
|
353
|
-
import { SeoOptimizer as SeoOptimizer2 } from "@contractspec/lib.content-gen/seo";
|
|
354
|
-
import { CodeBlock as CodeBlock2 } from "@contractspec/lib.design-system";
|
|
355
|
-
import Link2 from "@contractspec/lib.ui-link";
|
|
356
|
-
import { ChevronRight as ChevronRight2 } from "lucide-react";
|
|
357
|
-
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
358
|
-
var metadata2 = new SeoOptimizer2().optimize(deterministicCodegenBrief2);
|
|
359
|
-
function DeterministicCodegenPage() {
|
|
360
|
-
return /* @__PURE__ */ jsxs2("div", {
|
|
361
|
-
className: "space-y-8",
|
|
362
|
-
children: [
|
|
363
|
-
/* @__PURE__ */ jsxs2("div", {
|
|
364
|
-
className: "space-y-3",
|
|
365
|
-
children: [
|
|
366
|
-
/* @__PURE__ */ jsx2("h1", {
|
|
367
|
-
className: "font-bold text-4xl",
|
|
368
|
-
children: deterministicCodegenBrief2.title
|
|
369
|
-
}),
|
|
370
|
-
/* @__PURE__ */ jsx2("p", {
|
|
371
|
-
className: "text-lg text-muted-foreground",
|
|
372
|
-
children: deterministicCodegenBrief2.summary
|
|
373
|
-
})
|
|
374
|
-
]
|
|
375
|
-
}),
|
|
376
|
-
/* @__PURE__ */ jsxs2("div", {
|
|
377
|
-
className: "card-subtle space-y-4 p-6",
|
|
378
|
-
children: [
|
|
379
|
-
/* @__PURE__ */ jsx2("h2", {
|
|
380
|
-
className: "font-bold text-2xl",
|
|
381
|
-
children: "Regeneration Challenges"
|
|
382
|
-
}),
|
|
383
|
-
/* @__PURE__ */ jsx2("ul", {
|
|
384
|
-
className: "space-y-2 text-muted-foreground text-sm",
|
|
385
|
-
children: deterministicCodegenBrief2.problems.map((problem, index) => /* @__PURE__ */ jsx2("li", {
|
|
386
|
-
children: problem
|
|
387
|
-
}, index))
|
|
388
|
-
})
|
|
389
|
-
]
|
|
390
|
-
}),
|
|
391
|
-
/* @__PURE__ */ jsxs2("div", {
|
|
392
|
-
className: "card-subtle space-y-4 p-6",
|
|
393
|
-
children: [
|
|
394
|
-
/* @__PURE__ */ jsx2("h2", {
|
|
395
|
-
className: "font-bold text-2xl",
|
|
396
|
-
children: "Deterministic Solutions"
|
|
397
|
-
}),
|
|
398
|
-
/* @__PURE__ */ jsx2("ul", {
|
|
399
|
-
className: "space-y-2 text-muted-foreground text-sm",
|
|
400
|
-
children: deterministicCodegenBrief2.solutions.map((solution, index) => /* @__PURE__ */ jsx2("li", {
|
|
401
|
-
children: solution
|
|
402
|
-
}, index))
|
|
403
|
-
})
|
|
404
|
-
]
|
|
405
|
-
}),
|
|
406
|
-
/* @__PURE__ */ jsxs2("div", {
|
|
407
|
-
className: "space-y-6",
|
|
408
|
-
children: [
|
|
409
|
-
/* @__PURE__ */ jsxs2("div", {
|
|
410
|
-
className: "space-y-3",
|
|
411
|
-
children: [
|
|
412
|
-
/* @__PURE__ */ jsx2("h2", {
|
|
413
|
-
className: "font-bold text-2xl",
|
|
414
|
-
children: "Protected Zones"
|
|
415
|
-
}),
|
|
416
|
-
/* @__PURE__ */ jsx2("p", {
|
|
417
|
-
className: "text-muted-foreground text-sm",
|
|
418
|
-
children: "Separate generated code from hand-written business logic with clear boundaries."
|
|
419
|
-
}),
|
|
420
|
-
/* @__PURE__ */ jsx2(CodeBlock2, {
|
|
421
|
-
language: "typescript",
|
|
422
|
-
filename: "src/handlers/user-handlers.ts",
|
|
423
|
-
code: `// Hand-written business logic (protected from regeneration)
|
|
35
|
+
});`})]}),d("div",{className:"space-y-3",children:[u("h2",{className:"font-bold text-2xl",children:"Generate OpenAPI"}),u("p",{className:"text-muted-foreground text-sm",children:"Export OpenAPI documentation directly from your contracts."}),u(T,{language:"bash",filename:"export-openapi",code:"contractspec openapi export \\\n --registry ./src/contracts/registry.ts \\\n --out ./openapi.json"})]})]}),d("div",{className:"flex items-center gap-4 pt-4",children:[d(b,{href:"/docs/guides/nextjs-one-endpoint",className:"btn-primary",children:["Next.js Guide ",u(Z,{size:16})]}),u(b,{href:"/docs/intent/spec-driven-development",className:"btn-ghost",children:"Spec-driven Development"})]})]})}import{deterministicCodegenBrief as A}from"@contractspec/bundle.library/components/docs/intent/intent-pages.docblocks";import{SeoOptimizer as J}from"@contractspec/lib.content-gen/seo";import{CodeBlock as G}from"@contractspec/lib.design-system";import S from"@contractspec/lib.ui-link";import{ChevronRight as Q}from"lucide-react";import{jsx as r,jsxs as f}from"react/jsx-runtime";var me=new J().optimize(A);function R(){return f("div",{className:"space-y-8",children:[f("div",{className:"space-y-3",children:[r("h1",{className:"font-bold text-4xl",children:A.title}),r("p",{className:"text-lg text-muted-foreground",children:A.summary})]}),f("div",{className:"card-subtle space-y-4 p-6",children:[r("h2",{className:"font-bold text-2xl",children:"Regeneration Challenges"}),r("ul",{className:"space-y-2 text-muted-foreground text-sm",children:A.problems.map((a,n)=>r("li",{children:a},n))})]}),f("div",{className:"card-subtle space-y-4 p-6",children:[r("h2",{className:"font-bold text-2xl",children:"Deterministic Solutions"}),r("ul",{className:"space-y-2 text-muted-foreground text-sm",children:A.solutions.map((a,n)=>r("li",{children:a},n))})]}),f("div",{className:"space-y-6",children:[f("div",{className:"space-y-3",children:[r("h2",{className:"font-bold text-2xl",children:"Protected Zones"}),r("p",{className:"text-muted-foreground text-sm",children:"Separate generated code from hand-written business logic with clear boundaries."}),r(G,{language:"typescript",filename:"src/handlers/user-handlers.ts",code:`// Hand-written business logic (protected from regeneration)
|
|
424
36
|
export class UserService {
|
|
425
37
|
async createUser(input: CreateUserInput): Promise<CreateUserOutput> {
|
|
426
38
|
// Custom validation and business rules
|
|
@@ -457,151 +69,7 @@ export const createUserHandler = wrapOperationHandler(
|
|
|
457
69
|
operationName: 'createUser',
|
|
458
70
|
errorMapper: mapToStandardErrors,
|
|
459
71
|
}
|
|
460
|
-
);`
|
|
461
|
-
})
|
|
462
|
-
]
|
|
463
|
-
}),
|
|
464
|
-
/* @__PURE__ */ jsxs2("div", {
|
|
465
|
-
className: "space-y-3",
|
|
466
|
-
children: [
|
|
467
|
-
/* @__PURE__ */ jsx2("h2", {
|
|
468
|
-
className: "font-bold text-2xl",
|
|
469
|
-
children: "Incremental Regeneration"
|
|
470
|
-
}),
|
|
471
|
-
/* @__PURE__ */ jsx2("p", {
|
|
472
|
-
className: "text-muted-foreground text-sm",
|
|
473
|
-
children: "Regenerate only what changed while preserving custom logic."
|
|
474
|
-
}),
|
|
475
|
-
/* @__PURE__ */ jsx2(CodeBlock2, {
|
|
476
|
-
language: "bash",
|
|
477
|
-
filename: "incremental-regen",
|
|
478
|
-
code: `contractspec generate \\
|
|
479
|
-
--incremental \\
|
|
480
|
-
--preserve-zones ./src/handlers/*.ts \\
|
|
481
|
-
--input ./src/contracts/ \\
|
|
482
|
-
--output ./generated/`
|
|
483
|
-
})
|
|
484
|
-
]
|
|
485
|
-
}),
|
|
486
|
-
/* @__PURE__ */ jsxs2("div", {
|
|
487
|
-
className: "space-y-3",
|
|
488
|
-
children: [
|
|
489
|
-
/* @__PURE__ */ jsx2("h2", {
|
|
490
|
-
className: "font-bold text-2xl",
|
|
491
|
-
children: "Conflict Detection"
|
|
492
|
-
}),
|
|
493
|
-
/* @__PURE__ */ jsx2("p", {
|
|
494
|
-
className: "text-muted-foreground text-sm",
|
|
495
|
-
children: "Automatically detect and report conflicts during regeneration."
|
|
496
|
-
}),
|
|
497
|
-
/* @__PURE__ */ jsx2(CodeBlock2, {
|
|
498
|
-
language: "bash",
|
|
499
|
-
filename: "check-conflicts",
|
|
500
|
-
code: `contractspec generate \\
|
|
501
|
-
--check-conflicts \\
|
|
502
|
-
--report-conflicts ./conflicts.json`
|
|
503
|
-
})
|
|
504
|
-
]
|
|
505
|
-
})
|
|
506
|
-
]
|
|
507
|
-
}),
|
|
508
|
-
/* @__PURE__ */ jsxs2("div", {
|
|
509
|
-
className: "flex items-center gap-4 pt-4",
|
|
510
|
-
children: [
|
|
511
|
-
/* @__PURE__ */ jsxs2(Link2, {
|
|
512
|
-
href: "/docs/guides/generate-docs-clients-schemas",
|
|
513
|
-
className: "btn-primary",
|
|
514
|
-
children: [
|
|
515
|
-
"Client Generation ",
|
|
516
|
-
/* @__PURE__ */ jsx2(ChevronRight2, {
|
|
517
|
-
size: 16
|
|
518
|
-
})
|
|
519
|
-
]
|
|
520
|
-
}),
|
|
521
|
-
/* @__PURE__ */ jsx2(Link2, {
|
|
522
|
-
href: "/docs/intent/schema-validation-typescript",
|
|
523
|
-
className: "btn-ghost",
|
|
524
|
-
children: "Type Safety"
|
|
525
|
-
})
|
|
526
|
-
]
|
|
527
|
-
})
|
|
528
|
-
]
|
|
529
|
-
});
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
// src/components/docs/intent/GenerateClientFromSchemaPage.tsx
|
|
533
|
-
import { generateClientFromSchemaBrief as generateClientFromSchemaBrief2 } from "@contractspec/bundle.library/components/docs/intent/intent-pages.docblocks";
|
|
534
|
-
import { SeoOptimizer as SeoOptimizer3 } from "@contractspec/lib.content-gen/seo";
|
|
535
|
-
import { CodeBlock as CodeBlock3 } from "@contractspec/lib.design-system";
|
|
536
|
-
import Link3 from "@contractspec/lib.ui-link";
|
|
537
|
-
import { ChevronRight as ChevronRight3 } from "lucide-react";
|
|
538
|
-
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
539
|
-
var metadata3 = new SeoOptimizer3().optimize(generateClientFromSchemaBrief2);
|
|
540
|
-
function GenerateClientFromSchemaPage() {
|
|
541
|
-
return /* @__PURE__ */ jsxs3("div", {
|
|
542
|
-
className: "space-y-8",
|
|
543
|
-
children: [
|
|
544
|
-
/* @__PURE__ */ jsxs3("div", {
|
|
545
|
-
className: "space-y-3",
|
|
546
|
-
children: [
|
|
547
|
-
/* @__PURE__ */ jsx3("h1", {
|
|
548
|
-
className: "font-bold text-4xl",
|
|
549
|
-
children: generateClientFromSchemaBrief2.title
|
|
550
|
-
}),
|
|
551
|
-
/* @__PURE__ */ jsx3("p", {
|
|
552
|
-
className: "text-lg text-muted-foreground",
|
|
553
|
-
children: generateClientFromSchemaBrief2.summary
|
|
554
|
-
})
|
|
555
|
-
]
|
|
556
|
-
}),
|
|
557
|
-
/* @__PURE__ */ jsxs3("div", {
|
|
558
|
-
className: "card-subtle space-y-4 p-6",
|
|
559
|
-
children: [
|
|
560
|
-
/* @__PURE__ */ jsx3("h2", {
|
|
561
|
-
className: "font-bold text-2xl",
|
|
562
|
-
children: "Client Development Problems"
|
|
563
|
-
}),
|
|
564
|
-
/* @__PURE__ */ jsx3("ul", {
|
|
565
|
-
className: "space-y-2 text-muted-foreground text-sm",
|
|
566
|
-
children: generateClientFromSchemaBrief2.problems.map((problem, index) => /* @__PURE__ */ jsx3("li", {
|
|
567
|
-
children: problem
|
|
568
|
-
}, index))
|
|
569
|
-
})
|
|
570
|
-
]
|
|
571
|
-
}),
|
|
572
|
-
/* @__PURE__ */ jsxs3("div", {
|
|
573
|
-
className: "card-subtle space-y-4 p-6",
|
|
574
|
-
children: [
|
|
575
|
-
/* @__PURE__ */ jsx3("h2", {
|
|
576
|
-
className: "font-bold text-2xl",
|
|
577
|
-
children: "Automated Solutions"
|
|
578
|
-
}),
|
|
579
|
-
/* @__PURE__ */ jsx3("ul", {
|
|
580
|
-
className: "space-y-2 text-muted-foreground text-sm",
|
|
581
|
-
children: generateClientFromSchemaBrief2.solutions.map((solution, index) => /* @__PURE__ */ jsx3("li", {
|
|
582
|
-
children: solution
|
|
583
|
-
}, index))
|
|
584
|
-
})
|
|
585
|
-
]
|
|
586
|
-
}),
|
|
587
|
-
/* @__PURE__ */ jsxs3("div", {
|
|
588
|
-
className: "space-y-6",
|
|
589
|
-
children: [
|
|
590
|
-
/* @__PURE__ */ jsxs3("div", {
|
|
591
|
-
className: "space-y-3",
|
|
592
|
-
children: [
|
|
593
|
-
/* @__PURE__ */ jsx3("h2", {
|
|
594
|
-
className: "font-bold text-2xl",
|
|
595
|
-
children: "Contract Definition"
|
|
596
|
-
}),
|
|
597
|
-
/* @__PURE__ */ jsx3("p", {
|
|
598
|
-
className: "text-muted-foreground text-sm",
|
|
599
|
-
children: "Define your API contract once, generate clients for any language."
|
|
600
|
-
}),
|
|
601
|
-
/* @__PURE__ */ jsx3(CodeBlock3, {
|
|
602
|
-
language: "typescript",
|
|
603
|
-
filename: "src/contracts/api.contract.ts",
|
|
604
|
-
code: `import { defineContract } from '@contractspec/lib.contracts-spec';
|
|
72
|
+
);`})]}),f("div",{className:"space-y-3",children:[r("h2",{className:"font-bold text-2xl",children:"Incremental Regeneration"}),r("p",{className:"text-muted-foreground text-sm",children:"Regenerate only what changed while preserving custom logic."}),r(G,{language:"bash",filename:"incremental-regen",code:"contractspec generate \\\n --incremental \\\n --preserve-zones ./src/handlers/*.ts \\\n --input ./src/contracts/ \\\n --output ./generated/"})]}),f("div",{className:"space-y-3",children:[r("h2",{className:"font-bold text-2xl",children:"Conflict Detection"}),r("p",{className:"text-muted-foreground text-sm",children:"Automatically detect and report conflicts during regeneration."}),r(G,{language:"bash",filename:"check-conflicts",code:"contractspec generate \\\n --check-conflicts \\\n --report-conflicts ./conflicts.json"})]})]}),f("div",{className:"flex items-center gap-4 pt-4",children:[f(S,{href:"/docs/guides/generate-docs-clients-schemas",className:"btn-primary",children:["Client Generation ",r(Q,{size:16})]}),r(S,{href:"/docs/intent/schema-validation-typescript",className:"btn-ghost",children:"Type Safety"})]})]})}import{generateClientFromSchemaBrief as I}from"@contractspec/bundle.library/components/docs/intent/intent-pages.docblocks";import{SeoOptimizer as U}from"@contractspec/lib.content-gen/seo";import{CodeBlock as g}from"@contractspec/lib.design-system";import O from"@contractspec/lib.ui-link";import{ChevronRight as X}from"lucide-react";import{jsx as t,jsxs as i}from"react/jsx-runtime";var be=new U().optimize(I);function Y(){return i("div",{className:"space-y-8",children:[i("div",{className:"space-y-3",children:[t("h1",{className:"font-bold text-4xl",children:I.title}),t("p",{className:"text-lg text-muted-foreground",children:I.summary})]}),i("div",{className:"card-subtle space-y-4 p-6",children:[t("h2",{className:"font-bold text-2xl",children:"Client Development Problems"}),t("ul",{className:"space-y-2 text-muted-foreground text-sm",children:I.problems.map((a,n)=>t("li",{children:a},n))})]}),i("div",{className:"card-subtle space-y-4 p-6",children:[t("h2",{className:"font-bold text-2xl",children:"Automated Solutions"}),t("ul",{className:"space-y-2 text-muted-foreground text-sm",children:I.solutions.map((a,n)=>t("li",{children:a},n))})]}),i("div",{className:"space-y-6",children:[i("div",{className:"space-y-3",children:[t("h2",{className:"font-bold text-2xl",children:"Contract Definition"}),t("p",{className:"text-muted-foreground text-sm",children:"Define your API contract once, generate clients for any language."}),t(g,{language:"typescript",filename:"src/contracts/api.contract.ts",code:`import { defineContract } from '@contractspec/lib.contracts-spec';
|
|
605
73
|
import { SchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';
|
|
606
74
|
|
|
607
75
|
export const ApiContract = defineContract({
|
|
@@ -671,25 +139,7 @@ export const ApiContract = defineContract({
|
|
|
671
139
|
description: 'User management API with authentication',
|
|
672
140
|
tags: ['users', 'authentication'],
|
|
673
141
|
},
|
|
674
|
-
});`
|
|
675
|
-
})
|
|
676
|
-
]
|
|
677
|
-
}),
|
|
678
|
-
/* @__PURE__ */ jsxs3("div", {
|
|
679
|
-
className: "space-y-3",
|
|
680
|
-
children: [
|
|
681
|
-
/* @__PURE__ */ jsx3("h2", {
|
|
682
|
-
className: "font-bold text-2xl",
|
|
683
|
-
children: "Generate Multiple Clients"
|
|
684
|
-
}),
|
|
685
|
-
/* @__PURE__ */ jsx3("p", {
|
|
686
|
-
className: "text-muted-foreground text-sm",
|
|
687
|
-
children: "Generate type-safe clients for any language from the same contract."
|
|
688
|
-
}),
|
|
689
|
-
/* @__PURE__ */ jsx3(CodeBlock3, {
|
|
690
|
-
language: "bash",
|
|
691
|
-
filename: "generate-clients",
|
|
692
|
-
code: `# Generate all supported language clients
|
|
142
|
+
});`})]}),i("div",{className:"space-y-3",children:[t("h2",{className:"font-bold text-2xl",children:"Generate Multiple Clients"}),t("p",{className:"text-muted-foreground text-sm",children:"Generate type-safe clients for any language from the same contract."}),t(g,{language:"bash",filename:"generate-clients",code:`# Generate all supported language clients
|
|
693
143
|
contractspec generate clients \\
|
|
694
144
|
--contract ./src/contracts/api.contract.ts \\
|
|
695
145
|
--output ./generated/clients \\
|
|
@@ -706,35 +156,7 @@ contractspec generate clients \\
|
|
|
706
156
|
# --with-types: Include TypeScript definitions
|
|
707
157
|
# --with-tests: Generate client test suites
|
|
708
158
|
# --with-docs: Include client documentation
|
|
709
|
-
# --framework: Use specific HTTP client framework`
|
|
710
|
-
})
|
|
711
|
-
]
|
|
712
|
-
}),
|
|
713
|
-
/* @__PURE__ */ jsxs3("div", {
|
|
714
|
-
className: "space-y-3",
|
|
715
|
-
children: [
|
|
716
|
-
/* @__PURE__ */ jsx3("h2", {
|
|
717
|
-
className: "font-bold text-2xl",
|
|
718
|
-
children: "Generated Client Examples"
|
|
719
|
-
}),
|
|
720
|
-
/* @__PURE__ */ jsx3("p", {
|
|
721
|
-
className: "text-muted-foreground text-sm",
|
|
722
|
-
children: "Each generated client is fully type-safe and idiomatic."
|
|
723
|
-
}),
|
|
724
|
-
/* @__PURE__ */ jsxs3("div", {
|
|
725
|
-
className: "space-y-4",
|
|
726
|
-
children: [
|
|
727
|
-
/* @__PURE__ */ jsxs3("div", {
|
|
728
|
-
className: "card-subtle p-4",
|
|
729
|
-
children: [
|
|
730
|
-
/* @__PURE__ */ jsx3("h4", {
|
|
731
|
-
className: "font-semibold text-lg",
|
|
732
|
-
children: "TypeScript Client"
|
|
733
|
-
}),
|
|
734
|
-
/* @__PURE__ */ jsx3(CodeBlock3, {
|
|
735
|
-
language: "typescript",
|
|
736
|
-
filename: "generated/clients/typescript/index.ts",
|
|
737
|
-
code: `import { MyAPIClient } from './client';
|
|
159
|
+
# --framework: Use specific HTTP client framework`})]}),i("div",{className:"space-y-3",children:[t("h2",{className:"font-bold text-2xl",children:"Generated Client Examples"}),t("p",{className:"text-muted-foreground text-sm",children:"Each generated client is fully type-safe and idiomatic."}),i("div",{className:"space-y-4",children:[i("div",{className:"card-subtle p-4",children:[t("h4",{className:"font-semibold text-lg",children:"TypeScript Client"}),t(g,{language:"typescript",filename:"generated/clients/typescript/index.ts",code:`import { MyAPIClient } from './client';
|
|
738
160
|
|
|
739
161
|
const client = new MyAPIClient({
|
|
740
162
|
baseUrl: 'https://api.example.com',
|
|
@@ -754,21 +176,7 @@ const newUser = await client.createUser({
|
|
|
754
176
|
|
|
755
177
|
// Full type inference
|
|
756
178
|
// users: GetUsersResponse
|
|
757
|
-
// newUser: CreateUserResponse`
|
|
758
|
-
})
|
|
759
|
-
]
|
|
760
|
-
}),
|
|
761
|
-
/* @__PURE__ */ jsxs3("div", {
|
|
762
|
-
className: "card-subtle p-4",
|
|
763
|
-
children: [
|
|
764
|
-
/* @__PURE__ */ jsx3("h4", {
|
|
765
|
-
className: "font-semibold text-lg",
|
|
766
|
-
children: "Python Client"
|
|
767
|
-
}),
|
|
768
|
-
/* @__PURE__ */ jsx3(CodeBlock3, {
|
|
769
|
-
language: "python",
|
|
770
|
-
filename: "generated/clients/python/index.py",
|
|
771
|
-
code: `from myapi_client import MyAPIClient
|
|
179
|
+
// newUser: CreateUserResponse`})]}),i("div",{className:"card-subtle p-4",children:[t("h4",{className:"font-semibold text-lg",children:"Python Client"}),t(g,{language:"python",filename:"generated/clients/python/index.py",code:`from myapi_client import MyAPIClient
|
|
772
180
|
|
|
773
181
|
client = MyAPIClient(
|
|
774
182
|
base_url='https://api.example.com',
|
|
@@ -788,21 +196,7 @@ new_user = await client.create_user(
|
|
|
788
196
|
|
|
789
197
|
# Full type hints
|
|
790
198
|
# users: GetUsersResponse
|
|
791
|
-
# new_user: CreateUserResponse`
|
|
792
|
-
})
|
|
793
|
-
]
|
|
794
|
-
}),
|
|
795
|
-
/* @__PURE__ */ jsxs3("div", {
|
|
796
|
-
className: "card-subtle p-4",
|
|
797
|
-
children: [
|
|
798
|
-
/* @__PURE__ */ jsx3("h4", {
|
|
799
|
-
className: "font-semibold text-lg",
|
|
800
|
-
children: "Go Client"
|
|
801
|
-
}),
|
|
802
|
-
/* @__PURE__ */ jsx3(CodeBlock3, {
|
|
803
|
-
language: "go",
|
|
804
|
-
filename: "generated/clients/go/client.go",
|
|
805
|
-
code: `package main
|
|
199
|
+
# new_user: CreateUserResponse`})]}),i("div",{className:"card-subtle p-4",children:[t("h4",{className:"font-semibold text-lg",children:"Go Client"}),t(g,{language:"go",filename:"generated/clients/go/client.go",code:`package main
|
|
806
200
|
|
|
807
201
|
import (
|
|
808
202
|
"context"
|
|
@@ -829,29 +223,7 @@ func main() {
|
|
|
829
223
|
// Full type checking at compile time
|
|
830
224
|
// users: *GetUsersResponse
|
|
831
225
|
// newUser: *CreateUserResponse
|
|
832
|
-
}`
|
|
833
|
-
})
|
|
834
|
-
]
|
|
835
|
-
})
|
|
836
|
-
]
|
|
837
|
-
})
|
|
838
|
-
]
|
|
839
|
-
}),
|
|
840
|
-
/* @__PURE__ */ jsxs3("div", {
|
|
841
|
-
className: "space-y-3",
|
|
842
|
-
children: [
|
|
843
|
-
/* @__PURE__ */ jsx3("h2", {
|
|
844
|
-
className: "font-bold text-2xl",
|
|
845
|
-
children: "Advanced Features"
|
|
846
|
-
}),
|
|
847
|
-
/* @__PURE__ */ jsx3("p", {
|
|
848
|
-
className: "text-muted-foreground text-sm",
|
|
849
|
-
children: "Generated clients include enterprise-grade features out of the box."
|
|
850
|
-
}),
|
|
851
|
-
/* @__PURE__ */ jsx3(CodeBlock3, {
|
|
852
|
-
language: "typescript",
|
|
853
|
-
filename: "client-features.ts",
|
|
854
|
-
code: `// Advanced client features
|
|
226
|
+
}`})]})]})]}),i("div",{className:"space-y-3",children:[t("h2",{className:"font-bold text-2xl",children:"Advanced Features"}),t("p",{className:"text-muted-foreground text-sm",children:"Generated clients include enterprise-grade features out of the box."}),t(g,{language:"typescript",filename:"client-features.ts",code:`// Advanced client features
|
|
855
227
|
const client = new MyAPIClient({
|
|
856
228
|
baseUrl: 'https://api.example.com',
|
|
857
229
|
apiKey: 'your-api-key',
|
|
@@ -894,185 +266,7 @@ const user2 = client.getUser({ id: '123' }); // Uses cached result
|
|
|
894
266
|
// Request cancellation
|
|
895
267
|
const controller = new AbortController();
|
|
896
268
|
const promise = client.getUsers({ page: 1, signal: controller.signal });
|
|
897
|
-
controller.abort(); // Cancels the request`
|
|
898
|
-
})
|
|
899
|
-
]
|
|
900
|
-
})
|
|
901
|
-
]
|
|
902
|
-
}),
|
|
903
|
-
/* @__PURE__ */ jsxs3("div", {
|
|
904
|
-
className: "flex items-center gap-4 pt-4",
|
|
905
|
-
children: [
|
|
906
|
-
/* @__PURE__ */ jsxs3(Link3, {
|
|
907
|
-
href: "/docs/guides/generate-docs-clients-schemas",
|
|
908
|
-
className: "btn-primary",
|
|
909
|
-
children: [
|
|
910
|
-
"Client Generation Guide ",
|
|
911
|
-
/* @__PURE__ */ jsx3(ChevronRight3, {
|
|
912
|
-
size: 16
|
|
913
|
-
})
|
|
914
|
-
]
|
|
915
|
-
}),
|
|
916
|
-
/* @__PURE__ */ jsx3(Link3, {
|
|
917
|
-
href: "/docs/intent/contract-first-api",
|
|
918
|
-
className: "btn-ghost",
|
|
919
|
-
children: "Contract-first API"
|
|
920
|
-
})
|
|
921
|
-
]
|
|
922
|
-
})
|
|
923
|
-
]
|
|
924
|
-
});
|
|
925
|
-
}
|
|
926
|
-
|
|
927
|
-
// src/components/docs/intent/OpenapiAlternativePage.tsx
|
|
928
|
-
import { openapiAlternativeBrief as openapiAlternativeBrief2 } from "@contractspec/bundle.library/components/docs/intent/intent-pages.docblocks";
|
|
929
|
-
import { SeoOptimizer as SeoOptimizer4 } from "@contractspec/lib.content-gen/seo";
|
|
930
|
-
import { CodeBlock as CodeBlock4 } from "@contractspec/lib.design-system";
|
|
931
|
-
import Link4 from "@contractspec/lib.ui-link";
|
|
932
|
-
import { ChevronRight as ChevronRight4 } from "lucide-react";
|
|
933
|
-
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
934
|
-
var metadata4 = new SeoOptimizer4().optimize(openapiAlternativeBrief2);
|
|
935
|
-
function OpenapiAlternativePage() {
|
|
936
|
-
return /* @__PURE__ */ jsxs4("div", {
|
|
937
|
-
className: "space-y-8",
|
|
938
|
-
children: [
|
|
939
|
-
/* @__PURE__ */ jsxs4("div", {
|
|
940
|
-
className: "space-y-3",
|
|
941
|
-
children: [
|
|
942
|
-
/* @__PURE__ */ jsx4("h1", {
|
|
943
|
-
className: "font-bold text-4xl",
|
|
944
|
-
children: openapiAlternativeBrief2.title
|
|
945
|
-
}),
|
|
946
|
-
/* @__PURE__ */ jsx4("p", {
|
|
947
|
-
className: "text-lg text-muted-foreground",
|
|
948
|
-
children: openapiAlternativeBrief2.summary
|
|
949
|
-
})
|
|
950
|
-
]
|
|
951
|
-
}),
|
|
952
|
-
/* @__PURE__ */ jsxs4("div", {
|
|
953
|
-
className: "card-subtle space-y-4 p-6",
|
|
954
|
-
children: [
|
|
955
|
-
/* @__PURE__ */ jsx4("h2", {
|
|
956
|
-
className: "font-bold text-2xl",
|
|
957
|
-
children: "OpenAPI Limitations"
|
|
958
|
-
}),
|
|
959
|
-
/* @__PURE__ */ jsx4("ul", {
|
|
960
|
-
className: "space-y-2 text-muted-foreground text-sm",
|
|
961
|
-
children: openapiAlternativeBrief2.problems.map((problem, index) => /* @__PURE__ */ jsx4("li", {
|
|
962
|
-
children: problem
|
|
963
|
-
}, index))
|
|
964
|
-
})
|
|
965
|
-
]
|
|
966
|
-
}),
|
|
967
|
-
/* @__PURE__ */ jsxs4("div", {
|
|
968
|
-
className: "card-subtle space-y-4 p-6",
|
|
969
|
-
children: [
|
|
970
|
-
/* @__PURE__ */ jsx4("h2", {
|
|
971
|
-
className: "font-bold text-2xl",
|
|
972
|
-
children: "ContractSpec Advantages"
|
|
973
|
-
}),
|
|
974
|
-
/* @__PURE__ */ jsx4("ul", {
|
|
975
|
-
className: "space-y-2 text-muted-foreground text-sm",
|
|
976
|
-
children: openapiAlternativeBrief2.solutions.map((solution, index) => /* @__PURE__ */ jsx4("li", {
|
|
977
|
-
children: solution
|
|
978
|
-
}, index))
|
|
979
|
-
})
|
|
980
|
-
]
|
|
981
|
-
}),
|
|
982
|
-
/* @__PURE__ */ jsxs4("div", {
|
|
983
|
-
className: "space-y-6",
|
|
984
|
-
children: [
|
|
985
|
-
/* @__PURE__ */ jsxs4("div", {
|
|
986
|
-
className: "space-y-3",
|
|
987
|
-
children: [
|
|
988
|
-
/* @__PURE__ */ jsx4("h2", {
|
|
989
|
-
className: "font-bold text-2xl",
|
|
990
|
-
children: "Comparison: OpenAPI vs ContractSpec"
|
|
991
|
-
}),
|
|
992
|
-
/* @__PURE__ */ jsx4("p", {
|
|
993
|
-
className: "text-muted-foreground text-sm",
|
|
994
|
-
children: "Key differences between OpenAPI documentation and ContractSpec executable contracts."
|
|
995
|
-
}),
|
|
996
|
-
/* @__PURE__ */ jsxs4("div", {
|
|
997
|
-
className: "grid gap-6 md:grid-cols-2",
|
|
998
|
-
children: [
|
|
999
|
-
/* @__PURE__ */ jsxs4("div", {
|
|
1000
|
-
className: "card-subtle space-y-3 p-4",
|
|
1001
|
-
children: [
|
|
1002
|
-
/* @__PURE__ */ jsx4("h3", {
|
|
1003
|
-
className: "font-semibold text-lg",
|
|
1004
|
-
children: "OpenAPI"
|
|
1005
|
-
}),
|
|
1006
|
-
/* @__PURE__ */ jsxs4("ul", {
|
|
1007
|
-
className: "space-y-1 text-muted-foreground text-sm",
|
|
1008
|
-
children: [
|
|
1009
|
-
/* @__PURE__ */ jsx4("li", {
|
|
1010
|
-
children: "• Documentation specification only"
|
|
1011
|
-
}),
|
|
1012
|
-
/* @__PURE__ */ jsx4("li", {
|
|
1013
|
-
children: "• No runtime validation"
|
|
1014
|
-
}),
|
|
1015
|
-
/* @__PURE__ */ jsx4("li", {
|
|
1016
|
-
children: "• Manual code generation"
|
|
1017
|
-
}),
|
|
1018
|
-
/* @__PURE__ */ jsx4("li", {
|
|
1019
|
-
children: "• Type safety requires tools"
|
|
1020
|
-
}),
|
|
1021
|
-
/* @__PURE__ */ jsx4("li", {
|
|
1022
|
-
children: "• Separate schemas from documentation"
|
|
1023
|
-
})
|
|
1024
|
-
]
|
|
1025
|
-
})
|
|
1026
|
-
]
|
|
1027
|
-
}),
|
|
1028
|
-
/* @__PURE__ */ jsxs4("div", {
|
|
1029
|
-
className: "card-subtle space-y-3 p-4",
|
|
1030
|
-
children: [
|
|
1031
|
-
/* @__PURE__ */ jsx4("h3", {
|
|
1032
|
-
className: "font-semibold text-lg",
|
|
1033
|
-
children: "ContractSpec"
|
|
1034
|
-
}),
|
|
1035
|
-
/* @__PURE__ */ jsxs4("ul", {
|
|
1036
|
-
className: "space-y-1 text-muted-foreground text-sm",
|
|
1037
|
-
children: [
|
|
1038
|
-
/* @__PURE__ */ jsx4("li", {
|
|
1039
|
-
children: "• Executable contracts"
|
|
1040
|
-
}),
|
|
1041
|
-
/* @__PURE__ */ jsx4("li", {
|
|
1042
|
-
children: "• Built-in runtime validation"
|
|
1043
|
-
}),
|
|
1044
|
-
/* @__PURE__ */ jsx4("li", {
|
|
1045
|
-
children: "• Automatic code generation"
|
|
1046
|
-
}),
|
|
1047
|
-
/* @__PURE__ */ jsx4("li", {
|
|
1048
|
-
children: "• Type-safe by default"
|
|
1049
|
-
}),
|
|
1050
|
-
/* @__PURE__ */ jsx4("li", {
|
|
1051
|
-
children: "• Unified spec and implementation"
|
|
1052
|
-
})
|
|
1053
|
-
]
|
|
1054
|
-
})
|
|
1055
|
-
]
|
|
1056
|
-
})
|
|
1057
|
-
]
|
|
1058
|
-
})
|
|
1059
|
-
]
|
|
1060
|
-
}),
|
|
1061
|
-
/* @__PURE__ */ jsxs4("div", {
|
|
1062
|
-
className: "space-y-3",
|
|
1063
|
-
children: [
|
|
1064
|
-
/* @__PURE__ */ jsx4("h2", {
|
|
1065
|
-
className: "font-bold text-2xl",
|
|
1066
|
-
children: "Export from Contracts"
|
|
1067
|
-
}),
|
|
1068
|
-
/* @__PURE__ */ jsx4("p", {
|
|
1069
|
-
className: "text-muted-foreground text-sm",
|
|
1070
|
-
children: "Generate OpenAPI documentation from ContractSpec for existing tooling."
|
|
1071
|
-
}),
|
|
1072
|
-
/* @__PURE__ */ jsx4(CodeBlock4, {
|
|
1073
|
-
language: "bash",
|
|
1074
|
-
filename: "export-openapi",
|
|
1075
|
-
code: `# From ContractSpec contracts
|
|
269
|
+
controller.abort(); // Cancels the request`})]})]}),i("div",{className:"flex items-center gap-4 pt-4",children:[i(O,{href:"/docs/guides/generate-docs-clients-schemas",className:"btn-primary",children:["Client Generation Guide ",t(X,{size:16})]}),t(O,{href:"/docs/intent/contract-first-api",className:"btn-ghost",children:"Contract-first API"})]})]})}import{openapiAlternativeBrief as w}from"@contractspec/bundle.library/components/docs/intent/intent-pages.docblocks";import{SeoOptimizer as _}from"@contractspec/lib.content-gen/seo";import{CodeBlock as q}from"@contractspec/lib.design-system";import E from"@contractspec/lib.ui-link";import{ChevronRight as $}from"lucide-react";import{jsx as e,jsxs as c}from"react/jsx-runtime";var We=new _().optimize(w);function D(){return c("div",{className:"space-y-8",children:[c("div",{className:"space-y-3",children:[e("h1",{className:"font-bold text-4xl",children:w.title}),e("p",{className:"text-lg text-muted-foreground",children:w.summary})]}),c("div",{className:"card-subtle space-y-4 p-6",children:[e("h2",{className:"font-bold text-2xl",children:"OpenAPI Limitations"}),e("ul",{className:"space-y-2 text-muted-foreground text-sm",children:w.problems.map((a,n)=>e("li",{children:a},n))})]}),c("div",{className:"card-subtle space-y-4 p-6",children:[e("h2",{className:"font-bold text-2xl",children:"ContractSpec Advantages"}),e("ul",{className:"space-y-2 text-muted-foreground text-sm",children:w.solutions.map((a,n)=>e("li",{children:a},n))})]}),c("div",{className:"space-y-6",children:[c("div",{className:"space-y-3",children:[e("h2",{className:"font-bold text-2xl",children:"Comparison: OpenAPI vs ContractSpec"}),e("p",{className:"text-muted-foreground text-sm",children:"Key differences between OpenAPI documentation and ContractSpec executable contracts."}),c("div",{className:"grid gap-6 md:grid-cols-2",children:[c("div",{className:"card-subtle space-y-3 p-4",children:[e("h3",{className:"font-semibold text-lg",children:"OpenAPI"}),c("ul",{className:"space-y-1 text-muted-foreground text-sm",children:[e("li",{children:"• Documentation specification only"}),e("li",{children:"• No runtime validation"}),e("li",{children:"• Manual code generation"}),e("li",{children:"• Type safety requires tools"}),e("li",{children:"• Separate schemas from documentation"})]})]}),c("div",{className:"card-subtle space-y-3 p-4",children:[e("h3",{className:"font-semibold text-lg",children:"ContractSpec"}),c("ul",{className:"space-y-1 text-muted-foreground text-sm",children:[e("li",{children:"• Executable contracts"}),e("li",{children:"• Built-in runtime validation"}),e("li",{children:"• Automatic code generation"}),e("li",{children:"• Type-safe by default"}),e("li",{children:"• Unified spec and implementation"})]})]})]})]}),c("div",{className:"space-y-3",children:[e("h2",{className:"font-bold text-2xl",children:"Export from Contracts"}),e("p",{className:"text-muted-foreground text-sm",children:"Generate OpenAPI documentation from ContractSpec for existing tooling."}),e(q,{language:"bash",filename:"export-openapi",code:`# From ContractSpec contracts
|
|
1076
270
|
contractspec openapi export \\
|
|
1077
271
|
--registry ./src/contracts/registry.ts \\
|
|
1078
272
|
--format yaml \\
|
|
@@ -1080,25 +274,7 @@ contractspec openapi export \\
|
|
|
1080
274
|
|
|
1081
275
|
# Compare: Manual OpenAPI vs Generated
|
|
1082
276
|
# Manual: Write OpenAPI by hand, maintain separately
|
|
1083
|
-
# Generated: Single source of truth, always in sync`
|
|
1084
|
-
})
|
|
1085
|
-
]
|
|
1086
|
-
}),
|
|
1087
|
-
/* @__PURE__ */ jsxs4("div", {
|
|
1088
|
-
className: "space-y-3",
|
|
1089
|
-
children: [
|
|
1090
|
-
/* @__PURE__ */ jsx4("h2", {
|
|
1091
|
-
className: "font-bold text-2xl",
|
|
1092
|
-
children: "Beyond Documentation"
|
|
1093
|
-
}),
|
|
1094
|
-
/* @__PURE__ */ jsx4("p", {
|
|
1095
|
-
className: "text-muted-foreground text-sm",
|
|
1096
|
-
children: "ContractSpec provides more than just API documentation."
|
|
1097
|
-
}),
|
|
1098
|
-
/* @__PURE__ */ jsx4(CodeBlock4, {
|
|
1099
|
-
language: "typescript",
|
|
1100
|
-
filename: "multi-output-example.ts",
|
|
1101
|
-
code: `// One contract, multiple outputs
|
|
277
|
+
# Generated: Single source of truth, always in sync`})]}),c("div",{className:"space-y-3",children:[e("h2",{className:"font-bold text-2xl",children:"Beyond Documentation"}),e("p",{className:"text-muted-foreground text-sm",children:"ContractSpec provides more than just API documentation."}),e(q,{language:"typescript",filename:"multi-output-example.ts",code:`// One contract, multiple outputs
|
|
1102
278
|
import { UserApiContract } from './contracts/user-api.contract';
|
|
1103
279
|
|
|
1104
280
|
// Generated outputs
|
|
@@ -1128,109 +304,7 @@ export const outputs = {
|
|
|
1128
304
|
|
|
1129
305
|
// Type definitions
|
|
1130
306
|
types: UserApiContract.toTypescript(),
|
|
1131
|
-
};`
|
|
1132
|
-
})
|
|
1133
|
-
]
|
|
1134
|
-
})
|
|
1135
|
-
]
|
|
1136
|
-
}),
|
|
1137
|
-
/* @__PURE__ */ jsxs4("div", {
|
|
1138
|
-
className: "flex items-center gap-4 pt-4",
|
|
1139
|
-
children: [
|
|
1140
|
-
/* @__PURE__ */ jsxs4(Link4, {
|
|
1141
|
-
href: "/docs/guides/generate-docs-clients-schemas",
|
|
1142
|
-
className: "btn-primary",
|
|
1143
|
-
children: [
|
|
1144
|
-
"Generate from Contracts ",
|
|
1145
|
-
/* @__PURE__ */ jsx4(ChevronRight4, {
|
|
1146
|
-
size: 16
|
|
1147
|
-
})
|
|
1148
|
-
]
|
|
1149
|
-
}),
|
|
1150
|
-
/* @__PURE__ */ jsx4(Link4, {
|
|
1151
|
-
href: "/docs/intent/generate-client-from-schema",
|
|
1152
|
-
className: "btn-ghost",
|
|
1153
|
-
children: "Client Generation"
|
|
1154
|
-
})
|
|
1155
|
-
]
|
|
1156
|
-
})
|
|
1157
|
-
]
|
|
1158
|
-
});
|
|
1159
|
-
}
|
|
1160
|
-
|
|
1161
|
-
// src/components/docs/intent/SchemaValidationTypescriptPage.tsx
|
|
1162
|
-
import { schemaValidationTypescriptBrief as schemaValidationTypescriptBrief2 } from "@contractspec/bundle.library/components/docs/intent/intent-pages.docblocks";
|
|
1163
|
-
import { SeoOptimizer as SeoOptimizer5 } from "@contractspec/lib.content-gen/seo";
|
|
1164
|
-
import { CodeBlock as CodeBlock5 } from "@contractspec/lib.design-system";
|
|
1165
|
-
import Link5 from "@contractspec/lib.ui-link";
|
|
1166
|
-
import { ChevronRight as ChevronRight5 } from "lucide-react";
|
|
1167
|
-
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1168
|
-
var metadata5 = new SeoOptimizer5().optimize(schemaValidationTypescriptBrief2);
|
|
1169
|
-
function SchemaValidationTypescriptPage() {
|
|
1170
|
-
return /* @__PURE__ */ jsxs5("div", {
|
|
1171
|
-
className: "space-y-8",
|
|
1172
|
-
children: [
|
|
1173
|
-
/* @__PURE__ */ jsxs5("div", {
|
|
1174
|
-
className: "space-y-3",
|
|
1175
|
-
children: [
|
|
1176
|
-
/* @__PURE__ */ jsx5("h1", {
|
|
1177
|
-
className: "font-bold text-4xl",
|
|
1178
|
-
children: schemaValidationTypescriptBrief2.title
|
|
1179
|
-
}),
|
|
1180
|
-
/* @__PURE__ */ jsx5("p", {
|
|
1181
|
-
className: "text-lg text-muted-foreground",
|
|
1182
|
-
children: schemaValidationTypescriptBrief2.summary
|
|
1183
|
-
})
|
|
1184
|
-
]
|
|
1185
|
-
}),
|
|
1186
|
-
/* @__PURE__ */ jsxs5("div", {
|
|
1187
|
-
className: "card-subtle space-y-4 p-6",
|
|
1188
|
-
children: [
|
|
1189
|
-
/* @__PURE__ */ jsx5("h2", {
|
|
1190
|
-
className: "font-bold text-2xl",
|
|
1191
|
-
children: "Validation Pain Points"
|
|
1192
|
-
}),
|
|
1193
|
-
/* @__PURE__ */ jsx5("ul", {
|
|
1194
|
-
className: "space-y-2 text-muted-foreground text-sm",
|
|
1195
|
-
children: schemaValidationTypescriptBrief2.problems.map((problem, index) => /* @__PURE__ */ jsx5("li", {
|
|
1196
|
-
children: problem
|
|
1197
|
-
}, index))
|
|
1198
|
-
})
|
|
1199
|
-
]
|
|
1200
|
-
}),
|
|
1201
|
-
/* @__PURE__ */ jsxs5("div", {
|
|
1202
|
-
className: "card-subtle space-y-4 p-6",
|
|
1203
|
-
children: [
|
|
1204
|
-
/* @__PURE__ */ jsx5("h2", {
|
|
1205
|
-
className: "font-bold text-2xl",
|
|
1206
|
-
children: "Type-safe Solutions"
|
|
1207
|
-
}),
|
|
1208
|
-
/* @__PURE__ */ jsx5("ul", {
|
|
1209
|
-
className: "space-y-2 text-muted-foreground text-sm",
|
|
1210
|
-
children: schemaValidationTypescriptBrief2.solutions.map((solution, index) => /* @__PURE__ */ jsx5("li", {
|
|
1211
|
-
children: solution
|
|
1212
|
-
}, index))
|
|
1213
|
-
})
|
|
1214
|
-
]
|
|
1215
|
-
}),
|
|
1216
|
-
/* @__PURE__ */ jsxs5("div", {
|
|
1217
|
-
className: "space-y-6",
|
|
1218
|
-
children: [
|
|
1219
|
-
/* @__PURE__ */ jsxs5("div", {
|
|
1220
|
-
className: "space-y-3",
|
|
1221
|
-
children: [
|
|
1222
|
-
/* @__PURE__ */ jsx5("h2", {
|
|
1223
|
-
className: "font-bold text-2xl",
|
|
1224
|
-
children: "Contract Schema"
|
|
1225
|
-
}),
|
|
1226
|
-
/* @__PURE__ */ jsx5("p", {
|
|
1227
|
-
className: "text-muted-foreground text-sm",
|
|
1228
|
-
children: "Define data models with automatic TypeScript generation."
|
|
1229
|
-
}),
|
|
1230
|
-
/* @__PURE__ */ jsx5(CodeBlock5, {
|
|
1231
|
-
language: "typescript",
|
|
1232
|
-
filename: "src/contracts/user.schema.ts",
|
|
1233
|
-
code: `import { SchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';
|
|
307
|
+
};`})]})]}),c("div",{className:"flex items-center gap-4 pt-4",children:[c(E,{href:"/docs/guides/generate-docs-clients-schemas",className:"btn-primary",children:["Generate from Contracts ",e($,{size:16})]}),e(E,{href:"/docs/intent/generate-client-from-schema",className:"btn-ghost",children:"Client Generation"})]})]})}import{schemaValidationTypescriptBrief as P}from"@contractspec/bundle.library/components/docs/intent/intent-pages.docblocks";import{SeoOptimizer as z}from"@contractspec/lib.content-gen/seo";import{CodeBlock as v}from"@contractspec/lib.design-system";import K from"@contractspec/lib.ui-link";import{ChevronRight as V}from"lucide-react";import{jsx as o,jsxs as y}from"react/jsx-runtime";var Ye=new z().optimize(P);function F(){return y("div",{className:"space-y-8",children:[y("div",{className:"space-y-3",children:[o("h1",{className:"font-bold text-4xl",children:P.title}),o("p",{className:"text-lg text-muted-foreground",children:P.summary})]}),y("div",{className:"card-subtle space-y-4 p-6",children:[o("h2",{className:"font-bold text-2xl",children:"Validation Pain Points"}),o("ul",{className:"space-y-2 text-muted-foreground text-sm",children:P.problems.map((a,n)=>o("li",{children:a},n))})]}),y("div",{className:"card-subtle space-y-4 p-6",children:[o("h2",{className:"font-bold text-2xl",children:"Type-safe Solutions"}),o("ul",{className:"space-y-2 text-muted-foreground text-sm",children:P.solutions.map((a,n)=>o("li",{children:a},n))})]}),y("div",{className:"space-y-6",children:[y("div",{className:"space-y-3",children:[o("h2",{className:"font-bold text-2xl",children:"Contract Schema"}),o("p",{className:"text-muted-foreground text-sm",children:"Define data models with automatic TypeScript generation."}),o(v,{language:"typescript",filename:"src/contracts/user.schema.ts",code:`import { SchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';
|
|
1234
308
|
|
|
1235
309
|
export const UserSchema = new SchemaModel({
|
|
1236
310
|
type: 'object',
|
|
@@ -1272,25 +346,7 @@ export const UserSchema = new SchemaModel({
|
|
|
1272
346
|
name: 'User',
|
|
1273
347
|
description: 'User account information',
|
|
1274
348
|
},
|
|
1275
|
-
});`
|
|
1276
|
-
})
|
|
1277
|
-
]
|
|
1278
|
-
}),
|
|
1279
|
-
/* @__PURE__ */ jsxs5("div", {
|
|
1280
|
-
className: "space-y-3",
|
|
1281
|
-
children: [
|
|
1282
|
-
/* @__PURE__ */ jsx5("h2", {
|
|
1283
|
-
className: "font-bold text-2xl",
|
|
1284
|
-
children: "Generated Types"
|
|
1285
|
-
}),
|
|
1286
|
-
/* @__PURE__ */ jsx5("p", {
|
|
1287
|
-
className: "text-muted-foreground text-sm",
|
|
1288
|
-
children: "TypeScript types are automatically generated with proper validation."
|
|
1289
|
-
}),
|
|
1290
|
-
/* @__PURE__ */ jsx5(CodeBlock5, {
|
|
1291
|
-
language: "typescript",
|
|
1292
|
-
filename: "generated/types/user.ts",
|
|
1293
|
-
code: `// Auto-generated from UserSchema
|
|
349
|
+
});`})]}),y("div",{className:"space-y-3",children:[o("h2",{className:"font-bold text-2xl",children:"Generated Types"}),o("p",{className:"text-muted-foreground text-sm",children:"TypeScript types are automatically generated with proper validation."}),o(v,{language:"typescript",filename:"generated/types/user.ts",code:`// Auto-generated from UserSchema
|
|
1294
350
|
export interface User {
|
|
1295
351
|
id: string;
|
|
1296
352
|
email: string;
|
|
@@ -1315,25 +371,7 @@ export function validateUser(data: unknown): User {
|
|
|
1315
371
|
|
|
1316
372
|
export function isUser(data: unknown): data is User {
|
|
1317
373
|
return UserSchemaZod.safeParse(data).success;
|
|
1318
|
-
}`
|
|
1319
|
-
})
|
|
1320
|
-
]
|
|
1321
|
-
}),
|
|
1322
|
-
/* @__PURE__ */ jsxs5("div", {
|
|
1323
|
-
className: "space-y-3",
|
|
1324
|
-
children: [
|
|
1325
|
-
/* @__PURE__ */ jsx5("h2", {
|
|
1326
|
-
className: "font-bold text-2xl",
|
|
1327
|
-
children: "Runtime Validation"
|
|
1328
|
-
}),
|
|
1329
|
-
/* @__PURE__ */ jsx5("p", {
|
|
1330
|
-
className: "text-muted-foreground text-sm",
|
|
1331
|
-
children: "Use generated validation in your API handlers with zero boilerplate."
|
|
1332
|
-
}),
|
|
1333
|
-
/* @__PURE__ */ jsx5(CodeBlock5, {
|
|
1334
|
-
language: "typescript",
|
|
1335
|
-
filename: "src/handlers/user-handler.ts",
|
|
1336
|
-
code: `import { validateUser } from '../generated/types/user';
|
|
374
|
+
}`})]}),y("div",{className:"space-y-3",children:[o("h2",{className:"font-bold text-2xl",children:"Runtime Validation"}),o("p",{className:"text-muted-foreground text-sm",children:"Use generated validation in your API handlers with zero boilerplate."}),o(v,{language:"typescript",filename:"src/handlers/user-handler.ts",code:`import { validateUser } from '../generated/types/user';
|
|
1337
375
|
|
|
1338
376
|
export async function createUserHandler(request: Request) {
|
|
1339
377
|
try {
|
|
@@ -1361,109 +399,7 @@ export async function createUserHandler(request: Request) {
|
|
|
1361
399
|
|
|
1362
400
|
throw error;
|
|
1363
401
|
}
|
|
1364
|
-
}`
|
|
1365
|
-
})
|
|
1366
|
-
]
|
|
1367
|
-
})
|
|
1368
|
-
]
|
|
1369
|
-
}),
|
|
1370
|
-
/* @__PURE__ */ jsxs5("div", {
|
|
1371
|
-
className: "flex items-center gap-4 pt-4",
|
|
1372
|
-
children: [
|
|
1373
|
-
/* @__PURE__ */ jsxs5(Link5, {
|
|
1374
|
-
href: "/docs/guides/spec-validation-and-typing",
|
|
1375
|
-
className: "btn-primary",
|
|
1376
|
-
children: [
|
|
1377
|
-
"Type Safety Guide ",
|
|
1378
|
-
/* @__PURE__ */ jsx5(ChevronRight5, {
|
|
1379
|
-
size: 16
|
|
1380
|
-
})
|
|
1381
|
-
]
|
|
1382
|
-
}),
|
|
1383
|
-
/* @__PURE__ */ jsx5(Link5, {
|
|
1384
|
-
href: "/docs/intent/generate-client-from-schema",
|
|
1385
|
-
className: "btn-ghost",
|
|
1386
|
-
children: "Client Generation"
|
|
1387
|
-
})
|
|
1388
|
-
]
|
|
1389
|
-
})
|
|
1390
|
-
]
|
|
1391
|
-
});
|
|
1392
|
-
}
|
|
1393
|
-
|
|
1394
|
-
// src/components/docs/intent/SpecDrivenDevelopmentPage.tsx
|
|
1395
|
-
import { specDrivenDevelopmentBrief as specDrivenDevelopmentBrief2 } from "@contractspec/bundle.library/components/docs/intent/intent-pages.docblocks";
|
|
1396
|
-
import { SeoOptimizer as SeoOptimizer6 } from "@contractspec/lib.content-gen/seo";
|
|
1397
|
-
import { CodeBlock as CodeBlock6 } from "@contractspec/lib.design-system";
|
|
1398
|
-
import Link6 from "@contractspec/lib.ui-link";
|
|
1399
|
-
import { ChevronRight as ChevronRight6 } from "lucide-react";
|
|
1400
|
-
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1401
|
-
var metadata6 = new SeoOptimizer6().optimize(specDrivenDevelopmentBrief2);
|
|
1402
|
-
function SpecDrivenDevelopmentPage() {
|
|
1403
|
-
return /* @__PURE__ */ jsxs6("div", {
|
|
1404
|
-
className: "space-y-8",
|
|
1405
|
-
children: [
|
|
1406
|
-
/* @__PURE__ */ jsxs6("div", {
|
|
1407
|
-
className: "space-y-3",
|
|
1408
|
-
children: [
|
|
1409
|
-
/* @__PURE__ */ jsx6("h1", {
|
|
1410
|
-
className: "font-bold text-4xl",
|
|
1411
|
-
children: specDrivenDevelopmentBrief2.title
|
|
1412
|
-
}),
|
|
1413
|
-
/* @__PURE__ */ jsx6("p", {
|
|
1414
|
-
className: "text-lg text-muted-foreground",
|
|
1415
|
-
children: specDrivenDevelopmentBrief2.summary
|
|
1416
|
-
})
|
|
1417
|
-
]
|
|
1418
|
-
}),
|
|
1419
|
-
/* @__PURE__ */ jsxs6("div", {
|
|
1420
|
-
className: "card-subtle space-y-4 p-6",
|
|
1421
|
-
children: [
|
|
1422
|
-
/* @__PURE__ */ jsx6("h2", {
|
|
1423
|
-
className: "font-bold text-2xl",
|
|
1424
|
-
children: "Why Spec-driven?"
|
|
1425
|
-
}),
|
|
1426
|
-
/* @__PURE__ */ jsx6("ul", {
|
|
1427
|
-
className: "space-y-2 text-muted-foreground text-sm",
|
|
1428
|
-
children: specDrivenDevelopmentBrief2.problems.map((problem, index) => /* @__PURE__ */ jsx6("li", {
|
|
1429
|
-
children: problem
|
|
1430
|
-
}, index))
|
|
1431
|
-
})
|
|
1432
|
-
]
|
|
1433
|
-
}),
|
|
1434
|
-
/* @__PURE__ */ jsxs6("div", {
|
|
1435
|
-
className: "card-subtle space-y-4 p-6",
|
|
1436
|
-
children: [
|
|
1437
|
-
/* @__PURE__ */ jsx6("h2", {
|
|
1438
|
-
className: "font-bold text-2xl",
|
|
1439
|
-
children: "Benefits"
|
|
1440
|
-
}),
|
|
1441
|
-
/* @__PURE__ */ jsx6("ul", {
|
|
1442
|
-
className: "space-y-2 text-muted-foreground text-sm",
|
|
1443
|
-
children: specDrivenDevelopmentBrief2.solutions.map((solution, index) => /* @__PURE__ */ jsx6("li", {
|
|
1444
|
-
children: solution
|
|
1445
|
-
}, index))
|
|
1446
|
-
})
|
|
1447
|
-
]
|
|
1448
|
-
}),
|
|
1449
|
-
/* @__PURE__ */ jsxs6("div", {
|
|
1450
|
-
className: "space-y-6",
|
|
1451
|
-
children: [
|
|
1452
|
-
/* @__PURE__ */ jsxs6("div", {
|
|
1453
|
-
className: "space-y-3",
|
|
1454
|
-
children: [
|
|
1455
|
-
/* @__PURE__ */ jsx6("h2", {
|
|
1456
|
-
className: "font-bold text-2xl",
|
|
1457
|
-
children: "Feature Specification Example"
|
|
1458
|
-
}),
|
|
1459
|
-
/* @__PURE__ */ jsx6("p", {
|
|
1460
|
-
className: "text-muted-foreground text-sm",
|
|
1461
|
-
children: "Define a complete feature with operations, events, and data models."
|
|
1462
|
-
}),
|
|
1463
|
-
/* @__PURE__ */ jsx6(CodeBlock6, {
|
|
1464
|
-
language: "typescript",
|
|
1465
|
-
filename: "src/contracts/user-management.feature.ts",
|
|
1466
|
-
code: `import { defineFeature } from '@contractspec/lib.contracts-spec/features';
|
|
402
|
+
}`})]})]}),y("div",{className:"flex items-center gap-4 pt-4",children:[y(K,{href:"/docs/guides/spec-validation-and-typing",className:"btn-primary",children:["Type Safety Guide ",o(V,{size:16})]}),o(K,{href:"/docs/intent/generate-client-from-schema",className:"btn-ghost",children:"Client Generation"})]})]})}import{specDrivenDevelopmentBrief as h}from"@contractspec/bundle.library/components/docs/intent/intent-pages.docblocks";import{SeoOptimizer as L}from"@contractspec/lib.content-gen/seo";import{CodeBlock as M}from"@contractspec/lib.design-system";import N from"@contractspec/lib.ui-link";import{ChevronRight as C}from"lucide-react";import{jsx as l,jsxs as m}from"react/jsx-runtime";var Ce=new L().optimize(h);function k(){return m("div",{className:"space-y-8",children:[m("div",{className:"space-y-3",children:[l("h1",{className:"font-bold text-4xl",children:h.title}),l("p",{className:"text-lg text-muted-foreground",children:h.summary})]}),m("div",{className:"card-subtle space-y-4 p-6",children:[l("h2",{className:"font-bold text-2xl",children:"Why Spec-driven?"}),l("ul",{className:"space-y-2 text-muted-foreground text-sm",children:h.problems.map((a,n)=>l("li",{children:a},n))})]}),m("div",{className:"card-subtle space-y-4 p-6",children:[l("h2",{className:"font-bold text-2xl",children:"Benefits"}),l("ul",{className:"space-y-2 text-muted-foreground text-sm",children:h.solutions.map((a,n)=>l("li",{children:a},n))})]}),m("div",{className:"space-y-6",children:[m("div",{className:"space-y-3",children:[l("h2",{className:"font-bold text-2xl",children:"Feature Specification Example"}),l("p",{className:"text-muted-foreground text-sm",children:"Define a complete feature with operations, events, and data models."}),l(M,{language:"typescript",filename:"src/contracts/user-management.feature.ts",code:`import { defineFeature } from '@contractspec/lib.contracts-spec/features';
|
|
1467
403
|
import { defineOperation } from '@contractspec/lib.contracts-spec/operations';
|
|
1468
404
|
import { defineEvent } from '@contractspec/lib.contracts-spec/events';
|
|
1469
405
|
import { SchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';
|
|
@@ -1535,60 +471,4 @@ export const UserManagementFeature = defineFeature({
|
|
|
1535
471
|
version: '1.0.0',
|
|
1536
472
|
description: 'Complete user management with operations and events',
|
|
1537
473
|
},
|
|
1538
|
-
});`
|
|
1539
|
-
})
|
|
1540
|
-
]
|
|
1541
|
-
}),
|
|
1542
|
-
/* @__PURE__ */ jsxs6("div", {
|
|
1543
|
-
className: "space-y-3",
|
|
1544
|
-
children: [
|
|
1545
|
-
/* @__PURE__ */ jsx6("h2", {
|
|
1546
|
-
className: "font-bold text-2xl",
|
|
1547
|
-
children: "Generate Type-safe Implementations"
|
|
1548
|
-
}),
|
|
1549
|
-
/* @__PURE__ */ jsx6("p", {
|
|
1550
|
-
className: "text-muted-foreground text-sm",
|
|
1551
|
-
children: "Generate validation, types, and API handlers from your feature."
|
|
1552
|
-
}),
|
|
1553
|
-
/* @__PURE__ */ jsx6(CodeBlock6, {
|
|
1554
|
-
language: "bash",
|
|
1555
|
-
filename: "generate-from-feature",
|
|
1556
|
-
code: `contractspec generate \\
|
|
1557
|
-
--input ./src/contracts/user-management.feature.ts \\
|
|
1558
|
-
--output ./generated/user-management`
|
|
1559
|
-
})
|
|
1560
|
-
]
|
|
1561
|
-
})
|
|
1562
|
-
]
|
|
1563
|
-
}),
|
|
1564
|
-
/* @__PURE__ */ jsxs6("div", {
|
|
1565
|
-
className: "flex items-center gap-4 pt-4",
|
|
1566
|
-
children: [
|
|
1567
|
-
/* @__PURE__ */ jsxs6(Link6, {
|
|
1568
|
-
href: "/docs/guides/spec-validation-and-typing",
|
|
1569
|
-
className: "btn-primary",
|
|
1570
|
-
children: [
|
|
1571
|
-
"Type Safety Guide ",
|
|
1572
|
-
/* @__PURE__ */ jsx6(ChevronRight6, {
|
|
1573
|
-
size: 16
|
|
1574
|
-
})
|
|
1575
|
-
]
|
|
1576
|
-
}),
|
|
1577
|
-
/* @__PURE__ */ jsx6(Link6, {
|
|
1578
|
-
href: "/docs/intent/deterministic-codegen",
|
|
1579
|
-
className: "btn-ghost",
|
|
1580
|
-
children: "Deterministic Codegen"
|
|
1581
|
-
})
|
|
1582
|
-
]
|
|
1583
|
-
})
|
|
1584
|
-
]
|
|
1585
|
-
});
|
|
1586
|
-
}
|
|
1587
|
-
export {
|
|
1588
|
-
SpecDrivenDevelopmentPage,
|
|
1589
|
-
SchemaValidationTypescriptPage,
|
|
1590
|
-
OpenapiAlternativePage,
|
|
1591
|
-
GenerateClientFromSchemaPage,
|
|
1592
|
-
DeterministicCodegenPage,
|
|
1593
|
-
ContractFirstApiPage
|
|
1594
|
-
};
|
|
474
|
+
});`})]}),m("div",{className:"space-y-3",children:[l("h2",{className:"font-bold text-2xl",children:"Generate Type-safe Implementations"}),l("p",{className:"text-muted-foreground text-sm",children:"Generate validation, types, and API handlers from your feature."}),l(M,{language:"bash",filename:"generate-from-feature",code:"contractspec generate \\\n --input ./src/contracts/user-management.feature.ts \\\n --output ./generated/user-management"})]})]}),m("div",{className:"flex items-center gap-4 pt-4",children:[m(N,{href:"/docs/guides/spec-validation-and-typing",className:"btn-primary",children:["Type Safety Guide ",l(C,{size:16})]}),l(N,{href:"/docs/intent/deterministic-codegen",className:"btn-ghost",children:"Deterministic Codegen"})]})]})}export{k as SpecDrivenDevelopmentPage,F as SchemaValidationTypescriptPage,D as OpenapiAlternativePage,Y as GenerateClientFromSchemaPage,R as DeterministicCodegenPage,H as ContractFirstApiPage};
|