@rsaglobaltech/specgate 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1016 -0
- package/README.md +148 -0
- package/bin/specgate.js +2 -0
- package/bin/specgate.ts +383 -0
- package/dist/bin/specgate.js +342 -0
- package/dist/bin/specgate.js.map +1 -0
- package/dist/packages/core/src/application/AddRequirementUseCase.js +24 -0
- package/dist/packages/core/src/application/AddRequirementUseCase.js.map +1 -0
- package/dist/packages/core/src/application/ArchiveChangeUseCase.js +185 -0
- package/dist/packages/core/src/application/ArchiveChangeUseCase.js.map +1 -0
- package/dist/packages/core/src/application/CheckAgainstLockUseCase.js +134 -0
- package/dist/packages/core/src/application/CheckAgainstLockUseCase.js.map +1 -0
- package/dist/packages/core/src/application/GenerateAgentPromptUseCase.js +25 -0
- package/dist/packages/core/src/application/GenerateAgentPromptUseCase.js.map +1 -0
- package/dist/packages/core/src/application/GeneratePlanUseCase.js +135 -0
- package/dist/packages/core/src/application/GeneratePlanUseCase.js.map +1 -0
- package/dist/packages/core/src/application/LinkRequirementUseCase.js +25 -0
- package/dist/packages/core/src/application/LinkRequirementUseCase.js.map +1 -0
- package/dist/packages/core/src/application/RemovePackUseCase.js +28 -0
- package/dist/packages/core/src/application/RemovePackUseCase.js.map +1 -0
- package/dist/packages/core/src/application/UpdateRequirementStatusUseCase.js +37 -0
- package/dist/packages/core/src/application/UpdateRequirementStatusUseCase.js.map +1 -0
- package/dist/packages/core/src/application/ValidateChangeUseCase.js +86 -0
- package/dist/packages/core/src/application/ValidateChangeUseCase.js.map +1 -0
- package/dist/packages/core/src/application/ValidateProjectUseCase.js +101 -0
- package/dist/packages/core/src/application/ValidateProjectUseCase.js.map +1 -0
- package/dist/packages/core/src/application/ports/IDomainPackRepository.js +3 -0
- package/dist/packages/core/src/application/ports/IDomainPackRepository.js.map +1 -0
- package/dist/packages/core/src/application/ports/IHarnessConfigRepository.js +3 -0
- package/dist/packages/core/src/application/ports/IHarnessConfigRepository.js.map +1 -0
- package/dist/packages/core/src/application/ports/ILockfileRepository.js +3 -0
- package/dist/packages/core/src/application/ports/ILockfileRepository.js.map +1 -0
- package/dist/packages/core/src/application/ports/IManifestRepository.js +3 -0
- package/dist/packages/core/src/application/ports/IManifestRepository.js.map +1 -0
- package/dist/packages/core/src/application/ports/IProjectRepository.js +3 -0
- package/dist/packages/core/src/application/ports/IProjectRepository.js.map +1 -0
- package/dist/packages/core/src/application/ports/IRequirementGraphRepository.js +3 -0
- package/dist/packages/core/src/application/ports/IRequirementGraphRepository.js.map +1 -0
- package/dist/packages/core/src/application/ports/ITraceabilityRepository.js +3 -0
- package/dist/packages/core/src/application/ports/ITraceabilityRepository.js.map +1 -0
- package/dist/packages/core/src/domain/AgentPrompt.js +79 -0
- package/dist/packages/core/src/domain/AgentPrompt.js.map +1 -0
- package/dist/packages/core/src/domain/ArchivePlan.js +26 -0
- package/dist/packages/core/src/domain/ArchivePlan.js.map +1 -0
- package/dist/packages/core/src/domain/AuthoringScope.js +48 -0
- package/dist/packages/core/src/domain/AuthoringScope.js.map +1 -0
- package/dist/packages/core/src/domain/ChangeTemplates.js +133 -0
- package/dist/packages/core/src/domain/ChangeTemplates.js.map +1 -0
- package/dist/packages/core/src/domain/CucumberMessages.js +256 -0
- package/dist/packages/core/src/domain/CucumberMessages.js.map +1 -0
- package/dist/packages/core/src/domain/DeclaredArtifacts.js +117 -0
- package/dist/packages/core/src/domain/DeclaredArtifacts.js.map +1 -0
- package/dist/packages/core/src/domain/DeltaSpec.js +219 -0
- package/dist/packages/core/src/domain/DeltaSpec.js.map +1 -0
- package/dist/packages/core/src/domain/Diagnostic.js +75 -0
- package/dist/packages/core/src/domain/Diagnostic.js.map +1 -0
- package/dist/packages/core/src/domain/DomainPack.js +62 -0
- package/dist/packages/core/src/domain/DomainPack.js.map +1 -0
- package/dist/packages/core/src/domain/EmptyAttempt.js +60 -0
- package/dist/packages/core/src/domain/EmptyAttempt.js.map +1 -0
- package/dist/packages/core/src/domain/FileChangeSet.js +37 -0
- package/dist/packages/core/src/domain/FileChangeSet.js.map +1 -0
- package/dist/packages/core/src/domain/Gherkin.js +272 -0
- package/dist/packages/core/src/domain/Gherkin.js.map +1 -0
- package/dist/packages/core/src/domain/GherkinDialects.js +97 -0
- package/dist/packages/core/src/domain/GherkinDialects.js.map +1 -0
- package/dist/packages/core/src/domain/GherkinQuality.js +160 -0
- package/dist/packages/core/src/domain/GherkinQuality.js.map +1 -0
- package/dist/packages/core/src/domain/GherkinTags.js +119 -0
- package/dist/packages/core/src/domain/GherkinTags.js.map +1 -0
- package/dist/packages/core/src/domain/GitSafety.js +77 -0
- package/dist/packages/core/src/domain/GitSafety.js.map +1 -0
- package/dist/packages/core/src/domain/HarnessConfig.js +58 -0
- package/dist/packages/core/src/domain/HarnessConfig.js.map +1 -0
- package/dist/packages/core/src/domain/HarnessReport.js +162 -0
- package/dist/packages/core/src/domain/HarnessReport.js.map +1 -0
- package/dist/packages/core/src/domain/HarnessRun.js +154 -0
- package/dist/packages/core/src/domain/HarnessRun.js.map +1 -0
- package/dist/packages/core/src/domain/InboundChange.js +127 -0
- package/dist/packages/core/src/domain/InboundChange.js.map +1 -0
- package/dist/packages/core/src/domain/Language.js +112 -0
- package/dist/packages/core/src/domain/Language.js.map +1 -0
- package/dist/packages/core/src/domain/Lockfile.js +64 -0
- package/dist/packages/core/src/domain/Lockfile.js.map +1 -0
- package/dist/packages/core/src/domain/PackContribution.js +106 -0
- package/dist/packages/core/src/domain/PackContribution.js.map +1 -0
- package/dist/packages/core/src/domain/PackDelta.js +298 -0
- package/dist/packages/core/src/domain/PackDelta.js.map +1 -0
- package/dist/packages/core/src/domain/PackSpec.js +481 -0
- package/dist/packages/core/src/domain/PackSpec.js.map +1 -0
- package/dist/packages/core/src/domain/ProfileMatch.js +87 -0
- package/dist/packages/core/src/domain/ProfileMatch.js.map +1 -0
- package/dist/packages/core/src/domain/Reconciliation.js +72 -0
- package/dist/packages/core/src/domain/Reconciliation.js.map +1 -0
- package/dist/packages/core/src/domain/RequirementGraph.js +197 -0
- package/dist/packages/core/src/domain/RequirementGraph.js.map +1 -0
- package/dist/packages/core/src/domain/RequirementPlan.js +85 -0
- package/dist/packages/core/src/domain/RequirementPlan.js.map +1 -0
- package/dist/packages/core/src/domain/RequirementReadiness.js +115 -0
- package/dist/packages/core/src/domain/RequirementReadiness.js.map +1 -0
- package/dist/packages/core/src/domain/RequirementSyntax.js +91 -0
- package/dist/packages/core/src/domain/RequirementSyntax.js.map +1 -0
- package/dist/packages/core/src/domain/ResumeState.js +115 -0
- package/dist/packages/core/src/domain/ResumeState.js.map +1 -0
- package/dist/packages/core/src/domain/RunBudget.js +103 -0
- package/dist/packages/core/src/domain/RunBudget.js.map +1 -0
- package/dist/packages/core/src/domain/SpecDiff.js +48 -0
- package/dist/packages/core/src/domain/SpecDiff.js.map +1 -0
- package/dist/packages/core/src/domain/SpecParser.js +406 -0
- package/dist/packages/core/src/domain/SpecParser.js.map +1 -0
- package/dist/packages/core/src/domain/SpecopsManifest.js +90 -0
- package/dist/packages/core/src/domain/SpecopsManifest.js.map +1 -0
- package/dist/packages/core/src/domain/TraceabilityFormat.js +317 -0
- package/dist/packages/core/src/domain/TraceabilityFormat.js.map +1 -0
- package/dist/packages/core/src/domain/TraceabilityMatrix.js +200 -0
- package/dist/packages/core/src/domain/TraceabilityMatrix.js.map +1 -0
- package/dist/packages/core/src/domain/TraceabilityMerge.js +180 -0
- package/dist/packages/core/src/domain/TraceabilityMerge.js.map +1 -0
- package/dist/packages/core/src/domain/ValidationReport.js +53 -0
- package/dist/packages/core/src/domain/ValidationReport.js.map +1 -0
- package/dist/packages/core/src/domain/ValueAnnotations.js +138 -0
- package/dist/packages/core/src/domain/ValueAnnotations.js.map +1 -0
- package/dist/packages/core/src/domain/WriteScope.js +155 -0
- package/dist/packages/core/src/domain/WriteScope.js.map +1 -0
- package/dist/packages/core/src/domain/YamlLite.js +226 -0
- package/dist/packages/core/src/domain/YamlLite.js.map +1 -0
- package/dist/packages/core/src/index.js +120 -0
- package/dist/packages/core/src/index.js.map +1 -0
- package/dist/packages/core/src/infrastructure/ChangeWorkspace.js +276 -0
- package/dist/packages/core/src/infrastructure/ChangeWorkspace.js.map +1 -0
- package/dist/packages/core/src/infrastructure/ConsoleReporter.js +19 -0
- package/dist/packages/core/src/infrastructure/ConsoleReporter.js.map +1 -0
- package/dist/packages/core/src/infrastructure/DirectorySnapshot.js +106 -0
- package/dist/packages/core/src/infrastructure/DirectorySnapshot.js.map +1 -0
- package/dist/packages/core/src/infrastructure/DiskDomainPackRepository.js +57 -0
- package/dist/packages/core/src/infrastructure/DiskDomainPackRepository.js.map +1 -0
- package/dist/packages/core/src/infrastructure/DiskHarnessConfigRepository.js +58 -0
- package/dist/packages/core/src/infrastructure/DiskHarnessConfigRepository.js.map +1 -0
- package/dist/packages/core/src/infrastructure/DiskLanguageRepository.js +69 -0
- package/dist/packages/core/src/infrastructure/DiskLanguageRepository.js.map +1 -0
- package/dist/packages/core/src/infrastructure/DiskLockfileRepository.js +64 -0
- package/dist/packages/core/src/infrastructure/DiskLockfileRepository.js.map +1 -0
- package/dist/packages/core/src/infrastructure/DiskManifestRepository.js +88 -0
- package/dist/packages/core/src/infrastructure/DiskManifestRepository.js.map +1 -0
- package/dist/packages/core/src/infrastructure/DiskPackDeltaRepository.js +138 -0
- package/dist/packages/core/src/infrastructure/DiskPackDeltaRepository.js.map +1 -0
- package/dist/packages/core/src/infrastructure/DiskPackRepository.js +130 -0
- package/dist/packages/core/src/infrastructure/DiskPackRepository.js.map +1 -0
- package/dist/packages/core/src/infrastructure/DiskProjectRepository.js +127 -0
- package/dist/packages/core/src/infrastructure/DiskProjectRepository.js.map +1 -0
- package/dist/packages/core/src/infrastructure/DiskRequirementGraphRepository.js +124 -0
- package/dist/packages/core/src/infrastructure/DiskRequirementGraphRepository.js.map +1 -0
- package/dist/packages/core/src/infrastructure/DiskTraceabilityRepository.js +53 -0
- package/dist/packages/core/src/infrastructure/DiskTraceabilityRepository.js.map +1 -0
- package/dist/packages/core/src/infrastructure/GitContributionStager.js +99 -0
- package/dist/packages/core/src/infrastructure/GitContributionStager.js.map +1 -0
- package/dist/packages/core/src/infrastructure/GitMergeDriver.js +103 -0
- package/dist/packages/core/src/infrastructure/GitMergeDriver.js.map +1 -0
- package/dist/packages/core/src/infrastructure/HarnessConfigFile.js +348 -0
- package/dist/packages/core/src/infrastructure/HarnessConfigFile.js.map +1 -0
- package/dist/packages/core/src/infrastructure/PackChangeDeposit.js +106 -0
- package/dist/packages/core/src/infrastructure/PackChangeDeposit.js.map +1 -0
- package/dist/packages/core/src/infrastructure/RemotePackResolver.js +181 -0
- package/dist/packages/core/src/infrastructure/RemotePackResolver.js.map +1 -0
- package/dist/packages/core/src/infrastructure/SpecopsConfigFile.js +94 -0
- package/dist/packages/core/src/infrastructure/SpecopsConfigFile.js.map +1 -0
- package/dist/packages/core/test/unit/authoring-scope.test.js +102 -0
- package/dist/packages/core/test/unit/authoring-scope.test.js.map +1 -0
- package/dist/packages/core/test/unit/change-templates.test.js +96 -0
- package/dist/packages/core/test/unit/change-templates.test.js.map +1 -0
- package/dist/packages/core/test/unit/cucumber-messages.test.js +232 -0
- package/dist/packages/core/test/unit/cucumber-messages.test.js.map +1 -0
- package/dist/packages/core/test/unit/declared-artifacts.test.js +124 -0
- package/dist/packages/core/test/unit/declared-artifacts.test.js.map +1 -0
- package/dist/packages/core/test/unit/empty-attempt.test.js +79 -0
- package/dist/packages/core/test/unit/empty-attempt.test.js.map +1 -0
- package/dist/packages/core/test/unit/gherkin-dialects.test.js +115 -0
- package/dist/packages/core/test/unit/gherkin-dialects.test.js.map +1 -0
- package/dist/packages/core/test/unit/gherkin-keyword-case.test.js +110 -0
- package/dist/packages/core/test/unit/gherkin-keyword-case.test.js.map +1 -0
- package/dist/packages/core/test/unit/gherkin-quality.test.js +151 -0
- package/dist/packages/core/test/unit/gherkin-quality.test.js.map +1 -0
- package/dist/packages/core/test/unit/gherkin-tags.test.js +127 -0
- package/dist/packages/core/test/unit/gherkin-tags.test.js.map +1 -0
- package/dist/packages/core/test/unit/git-safety.test.js +104 -0
- package/dist/packages/core/test/unit/git-safety.test.js.map +1 -0
- package/dist/packages/core/test/unit/harness-report.test.js +192 -0
- package/dist/packages/core/test/unit/harness-report.test.js.map +1 -0
- package/dist/packages/core/test/unit/harness-roles.test.js +86 -0
- package/dist/packages/core/test/unit/harness-roles.test.js.map +1 -0
- package/dist/packages/core/test/unit/inbound-change.test.js +145 -0
- package/dist/packages/core/test/unit/inbound-change.test.js.map +1 -0
- package/dist/packages/core/test/unit/matrix-dependencies.test.js +100 -0
- package/dist/packages/core/test/unit/matrix-dependencies.test.js.map +1 -0
- package/dist/packages/core/test/unit/profile-match.test.js +115 -0
- package/dist/packages/core/test/unit/profile-match.test.js.map +1 -0
- package/dist/packages/core/test/unit/reconciliation.test.js +112 -0
- package/dist/packages/core/test/unit/reconciliation.test.js.map +1 -0
- package/dist/packages/core/test/unit/requirement-readiness.test.js +161 -0
- package/dist/packages/core/test/unit/requirement-readiness.test.js.map +1 -0
- package/dist/packages/core/test/unit/resume-state.test.js +124 -0
- package/dist/packages/core/test/unit/resume-state.test.js.map +1 -0
- package/dist/packages/core/test/unit/run-budget.test.js +113 -0
- package/dist/packages/core/test/unit/run-budget.test.js.map +1 -0
- package/dist/packages/core/test/unit/traceability-merge.test.js +159 -0
- package/dist/packages/core/test/unit/traceability-merge.test.js.map +1 -0
- package/dist/packages/core/test/unit/validate-project.test.js +156 -0
- package/dist/packages/core/test/unit/validate-project.test.js.map +1 -0
- package/dist/packages/core/test/unit/value-annotations.test.js +149 -0
- package/dist/packages/core/test/unit/value-annotations.test.js.map +1 -0
- package/dist/packages/core/test/unit/write-scope.test.js +165 -0
- package/dist/packages/core/test/unit/write-scope.test.js.map +1 -0
- package/dist/packages/core/test/unit/yaml-lite.test.js +78 -0
- package/dist/packages/core/test/unit/yaml-lite.test.js.map +1 -0
- package/dist/scripts/adopt_project.js +11 -0
- package/dist/scripts/adopt_project.js.map +1 -0
- package/dist/scripts/agents/commands.js +100 -0
- package/dist/scripts/agents/commands.js.map +1 -0
- package/dist/scripts/agents/init.js +482 -0
- package/dist/scripts/agents/init.js.map +1 -0
- package/dist/scripts/alm/cli.js +154 -0
- package/dist/scripts/alm/cli.js.map +1 -0
- package/dist/scripts/alm/clients.js +30 -0
- package/dist/scripts/alm/clients.js.map +1 -0
- package/dist/scripts/alm/core.js +258 -0
- package/dist/scripts/alm/core.js.map +1 -0
- package/dist/scripts/alm/port.js +116 -0
- package/dist/scripts/alm/port.js.map +1 -0
- package/dist/scripts/alm/providers/azure.js +79 -0
- package/dist/scripts/alm/providers/azure.js.map +1 -0
- package/dist/scripts/alm/providers/github.js +124 -0
- package/dist/scripts/alm/providers/github.js.map +1 -0
- package/dist/scripts/alm/providers/http-client.js +47 -0
- package/dist/scripts/alm/providers/http-client.js.map +1 -0
- package/dist/scripts/alm/providers/index.js +107 -0
- package/dist/scripts/alm/providers/index.js.map +1 -0
- package/dist/scripts/alm/providers/jira.js +129 -0
- package/dist/scripts/alm/providers/jira.js.map +1 -0
- package/dist/scripts/bundle_pack.js +10 -0
- package/dist/scripts/bundle_pack.js.map +1 -0
- package/dist/scripts/change/archive.js +68 -0
- package/dist/scripts/change/archive.js.map +1 -0
- package/dist/scripts/change/artifacts.js +143 -0
- package/dist/scripts/change/artifacts.js.map +1 -0
- package/dist/scripts/change/cli.js +39 -0
- package/dist/scripts/change/cli.js.map +1 -0
- package/dist/scripts/change/delta.js +20 -0
- package/dist/scripts/change/delta.js.map +1 -0
- package/dist/scripts/change/instructions.js +339 -0
- package/dist/scripts/change/instructions.js.map +1 -0
- package/dist/scripts/ci_init.js +12 -0
- package/dist/scripts/ci_init.js.map +1 -0
- package/dist/scripts/cli/commands/alm/PullCommand.js +238 -0
- package/dist/scripts/cli/commands/alm/PullCommand.js.map +1 -0
- package/dist/scripts/cli/commands/change/ChangeCommand.js +867 -0
- package/dist/scripts/cli/commands/change/ChangeCommand.js.map +1 -0
- package/dist/scripts/cli/commands/config/CiInitCommand.js +144 -0
- package/dist/scripts/cli/commands/config/CiInitCommand.js.map +1 -0
- package/dist/scripts/cli/commands/config/CompletionCommand.js +160 -0
- package/dist/scripts/cli/commands/config/CompletionCommand.js.map +1 -0
- package/dist/scripts/cli/commands/config/ConfigInitCommand.js +108 -0
- package/dist/scripts/cli/commands/config/ConfigInitCommand.js.map +1 -0
- package/dist/scripts/cli/commands/config/ConfigSetCommand.js +166 -0
- package/dist/scripts/cli/commands/config/ConfigSetCommand.js.map +1 -0
- package/dist/scripts/cli/commands/config/GenAgentContractCommand.js +212 -0
- package/dist/scripts/cli/commands/config/GenAgentContractCommand.js.map +1 -0
- package/dist/scripts/cli/commands/harness/RunCommand.js +1922 -0
- package/dist/scripts/cli/commands/harness/RunCommand.js.map +1 -0
- package/dist/scripts/cli/commands/mcp/McpInstallCommand.js +114 -0
- package/dist/scripts/cli/commands/mcp/McpInstallCommand.js.map +1 -0
- package/dist/scripts/cli/commands/mcp/index.js +29 -0
- package/dist/scripts/cli/commands/mcp/index.js.map +1 -0
- package/dist/scripts/cli/commands/pack/BundlePackCommand.js +59 -0
- package/dist/scripts/cli/commands/pack/BundlePackCommand.js.map +1 -0
- package/dist/scripts/cli/commands/pack/ExpandDomainPackCommand.js +559 -0
- package/dist/scripts/cli/commands/pack/ExpandDomainPackCommand.js.map +1 -0
- package/dist/scripts/cli/commands/pack/InferPackCommand.js +304 -0
- package/dist/scripts/cli/commands/pack/InferPackCommand.js.map +1 -0
- package/dist/scripts/cli/commands/pack/InitPackCommand.js +368 -0
- package/dist/scripts/cli/commands/pack/InitPackCommand.js.map +1 -0
- package/dist/scripts/cli/commands/pack/LintPackCommand.js +631 -0
- package/dist/scripts/cli/commands/pack/LintPackCommand.js.map +1 -0
- package/dist/scripts/cli/commands/pack/pack-args.js +83 -0
- package/dist/scripts/cli/commands/pack/pack-args.js.map +1 -0
- package/dist/scripts/cli/commands/project/AdoptCommand.js +414 -0
- package/dist/scripts/cli/commands/project/AdoptCommand.js.map +1 -0
- package/dist/scripts/cli/commands/project/InitFromPackCommand.js +188 -0
- package/dist/scripts/cli/commands/project/InitFromPackCommand.js.map +1 -0
- package/dist/scripts/cli/commands/project/InitProjectCommand.js +791 -0
- package/dist/scripts/cli/commands/project/InitProjectCommand.js.map +1 -0
- package/dist/scripts/cli/commands/project/OnboardCommand.js +655 -0
- package/dist/scripts/cli/commands/project/OnboardCommand.js.map +1 -0
- package/dist/scripts/cli/commands/project/UpdateCommand.js +206 -0
- package/dist/scripts/cli/commands/project/UpdateCommand.js.map +1 -0
- package/dist/scripts/cli/commands/project/WizardCommand.js +166 -0
- package/dist/scripts/cli/commands/project/WizardCommand.js.map +1 -0
- package/dist/scripts/cli/commands/quality/DoctorCommand.js +553 -0
- package/dist/scripts/cli/commands/quality/DoctorCommand.js.map +1 -0
- package/dist/scripts/cli/commands/quality/FixCommand.js +201 -0
- package/dist/scripts/cli/commands/quality/FixCommand.js.map +1 -0
- package/dist/scripts/cli/commands/quality/LicenseCheckCommand.js +187 -0
- package/dist/scripts/cli/commands/quality/LicenseCheckCommand.js.map +1 -0
- package/dist/scripts/cli/commands/quality/ReportCommand.js +557 -0
- package/dist/scripts/cli/commands/quality/ReportCommand.js.map +1 -0
- package/dist/scripts/cli/commands/quality/ValidateSpecsCommand.js +764 -0
- package/dist/scripts/cli/commands/quality/ValidateSpecsCommand.js.map +1 -0
- package/dist/scripts/cli/commands/spec/DoneCommand.js +116 -0
- package/dist/scripts/cli/commands/spec/DoneCommand.js.map +1 -0
- package/dist/scripts/cli/commands/spec/PlanCommand.js +397 -0
- package/dist/scripts/cli/commands/spec/PlanCommand.js.map +1 -0
- package/dist/scripts/cli/commands/spec/ReqCommand.js +303 -0
- package/dist/scripts/cli/commands/spec/ReqCommand.js.map +1 -0
- package/dist/scripts/cli/commands/spec/StatusCommand.js +206 -0
- package/dist/scripts/cli/commands/spec/StatusCommand.js.map +1 -0
- package/dist/scripts/cli/commands/spec/StudioCommand.js +241 -0
- package/dist/scripts/cli/commands/spec/StudioCommand.js.map +1 -0
- package/dist/scripts/cli/commands/specops/ContributeCommand.js +313 -0
- package/dist/scripts/cli/commands/specops/ContributeCommand.js.map +1 -0
- package/dist/scripts/cli/commands/specops/DiffCommand.js +394 -0
- package/dist/scripts/cli/commands/specops/DiffCommand.js.map +1 -0
- package/dist/scripts/cli/commands/specops/SyncCommand.js +380 -0
- package/dist/scripts/cli/commands/specops/SyncCommand.js.map +1 -0
- package/dist/scripts/completion.js +24 -0
- package/dist/scripts/completion.js.map +1 -0
- package/dist/scripts/config_init.js +12 -0
- package/dist/scripts/config_init.js.map +1 -0
- package/dist/scripts/config_set.js +20 -0
- package/dist/scripts/config_set.js.map +1 -0
- package/dist/scripts/docs/blocks.js +137 -0
- package/dist/scripts/docs/blocks.js.map +1 -0
- package/dist/scripts/docs/build-site.js +425 -0
- package/dist/scripts/docs/build-site.js.map +1 -0
- package/dist/scripts/docs/nav.js +198 -0
- package/dist/scripts/docs/nav.js.map +1 -0
- package/dist/scripts/docs/record-terminal.js +477 -0
- package/dist/scripts/docs/record-terminal.js.map +1 -0
- package/dist/scripts/docs/terminal-storyboard.js +121 -0
- package/dist/scripts/docs/terminal-storyboard.js.map +1 -0
- package/dist/scripts/doctor.js +14 -0
- package/dist/scripts/doctor.js.map +1 -0
- package/dist/scripts/done.js +17 -0
- package/dist/scripts/done.js.map +1 -0
- package/dist/scripts/expand_domain_pack.js +18 -0
- package/dist/scripts/expand_domain_pack.js.map +1 -0
- package/dist/scripts/fix.js +12 -0
- package/dist/scripts/fix.js.map +1 -0
- package/dist/scripts/gen_agent_contract.js +14 -0
- package/dist/scripts/gen_agent_contract.js.map +1 -0
- package/dist/scripts/gen_mcp_tools.js +264 -0
- package/dist/scripts/gen_mcp_tools.js.map +1 -0
- package/dist/scripts/harness/init.js +358 -0
- package/dist/scripts/harness/init.js.map +1 -0
- package/dist/scripts/harness/prompt.js +18 -0
- package/dist/scripts/harness/prompt.js.map +1 -0
- package/dist/scripts/harness/report.js +323 -0
- package/dist/scripts/harness/report.js.map +1 -0
- package/dist/scripts/harness/run.js +33 -0
- package/dist/scripts/harness/run.js.map +1 -0
- package/dist/scripts/infer_pack.js +17 -0
- package/dist/scripts/infer_pack.js.map +1 -0
- package/dist/scripts/init_from_pack.js +16 -0
- package/dist/scripts/init_from_pack.js.map +1 -0
- package/dist/scripts/init_pack.js +16 -0
- package/dist/scripts/init_pack.js.map +1 -0
- package/dist/scripts/init_project.js +17 -0
- package/dist/scripts/init_project.js.map +1 -0
- package/dist/scripts/lib/agent.js +99 -0
- package/dist/scripts/lib/agent.js.map +1 -0
- package/dist/scripts/lib/capability-specs.js +80 -0
- package/dist/scripts/lib/capability-specs.js.map +1 -0
- package/dist/scripts/lib/command.js +17 -0
- package/dist/scripts/lib/command.js.map +1 -0
- package/dist/scripts/lib/diagnostics.js +62 -0
- package/dist/scripts/lib/diagnostics.js.map +1 -0
- package/dist/scripts/lib/monorepo-fanout.js +118 -0
- package/dist/scripts/lib/monorepo-fanout.js.map +1 -0
- package/dist/scripts/lib/placeholders.js +190 -0
- package/dist/scripts/lib/placeholders.js.map +1 -0
- package/dist/scripts/lib/project-root.js +124 -0
- package/dist/scripts/lib/project-root.js.map +1 -0
- package/dist/scripts/lib/requirement-graph.js +31 -0
- package/dist/scripts/lib/requirement-graph.js.map +1 -0
- package/dist/scripts/lib/surface.js +609 -0
- package/dist/scripts/lib/surface.js.map +1 -0
- package/dist/scripts/license_check.js +15 -0
- package/dist/scripts/license_check.js.map +1 -0
- package/dist/scripts/lint_pack.js +18 -0
- package/dist/scripts/lint_pack.js.map +1 -0
- package/dist/scripts/merge-traceability.js +106 -0
- package/dist/scripts/merge-traceability.js.map +1 -0
- package/dist/scripts/onboard.js +22 -0
- package/dist/scripts/onboard.js.map +1 -0
- package/dist/scripts/plan.js +17 -0
- package/dist/scripts/plan.js.map +1 -0
- package/dist/scripts/plugin/gate-hook.js +171 -0
- package/dist/scripts/plugin/gate-hook.js.map +1 -0
- package/dist/scripts/report.js +17 -0
- package/dist/scripts/report.js.map +1 -0
- package/dist/scripts/req.js +22 -0
- package/dist/scripts/req.js.map +1 -0
- package/dist/scripts/schema/cli.js +215 -0
- package/dist/scripts/schema/cli.js.map +1 -0
- package/dist/scripts/schema/registry.js +264 -0
- package/dist/scripts/schema/registry.js.map +1 -0
- package/dist/scripts/specops/add.js +180 -0
- package/dist/scripts/specops/add.js.map +1 -0
- package/dist/scripts/specops/against_lock.js +100 -0
- package/dist/scripts/specops/against_lock.js.map +1 -0
- package/dist/scripts/specops/as_change.js +49 -0
- package/dist/scripts/specops/as_change.js.map +1 -0
- package/dist/scripts/specops/contribute.js +24 -0
- package/dist/scripts/specops/contribute.js.map +1 -0
- package/dist/scripts/specops/diff.js +32 -0
- package/dist/scripts/specops/diff.js.map +1 -0
- package/dist/scripts/specops/lock.js +39 -0
- package/dist/scripts/specops/lock.js.map +1 -0
- package/dist/scripts/specops/manifest.js +90 -0
- package/dist/scripts/specops/manifest.js.map +1 -0
- package/dist/scripts/specops/remove.js +102 -0
- package/dist/scripts/specops/remove.js.map +1 -0
- package/dist/scripts/specops/sync.js +27 -0
- package/dist/scripts/specops/sync.js.map +1 -0
- package/dist/scripts/specops/verify.js +149 -0
- package/dist/scripts/specops/verify.js.map +1 -0
- package/dist/scripts/status.js +17 -0
- package/dist/scripts/status.js.map +1 -0
- package/dist/scripts/studio.js +14 -0
- package/dist/scripts/studio.js.map +1 -0
- package/dist/scripts/update.js +17 -0
- package/dist/scripts/update.js.map +1 -0
- package/dist/scripts/validate_specs.js +10 -0
- package/dist/scripts/validate_specs.js.map +1 -0
- package/examples/project.config.example +19 -0
- package/examples/project.yaml.example +17 -0
- package/package.json +105 -0
- package/templates/adopt/AI_RULES.md.tpl +27 -0
- package/templates/adopt/adr-readme.md.tpl +5 -0
- package/templates/adopt/baseline.feature.tpl +9 -0
- package/templates/adopt/spec.md.tpl +25 -0
- package/templates/adopt/traceability.md.tpl +11 -0
- package/templates/backend/AI_RULES.md.tpl +35 -0
- package/templates/backend/features/core/health.feature.tpl +7 -0
- package/templates/base/.devcontainer/devcontainer.json.tpl +18 -0
- package/templates/base/.dockerignore.tpl +11 -0
- package/templates/base/.env.dev.app.tpl +13 -0
- package/templates/base/.env.dev.infra.tpl +6 -0
- package/templates/base/.env.dev.tpl +16 -0
- package/templates/base/.env.example.tpl +17 -0
- package/templates/base/.env.feature.app.tpl +11 -0
- package/templates/base/.env.feature.infra.tpl +4 -0
- package/templates/base/.env.feature.tpl +16 -0
- package/templates/base/.env.prod.app.tpl +13 -0
- package/templates/base/.env.prod.infra.tpl +6 -0
- package/templates/base/.env.prod.tpl +16 -0
- package/templates/base/.github/workflows/specs.yml.tpl +26 -0
- package/templates/base/.gitignore.tpl +9 -0
- package/templates/base/.pre-commit-config.yaml.tpl +10 -0
- package/templates/base/AGENTS.md.tpl +32 -0
- package/templates/base/README.md.tpl +32 -0
- package/templates/base/docker-compose.yml.tpl +13 -0
- package/templates/base/docs/specs/adr/README.md.tpl +10 -0
- package/templates/base/docs/specs/aggregates.md.tpl +5 -0
- package/templates/base/docs/specs/commands.md.tpl +13 -0
- package/templates/base/docs/specs/domain-model.md.tpl +30 -0
- package/templates/base/docs/specs/events.md.tpl +5 -0
- package/templates/base/docs/specs/review-checklist.md.tpl +18 -0
- package/templates/base/docs/specs/runtime-environments.md.tpl +26 -0
- package/templates/base/docs/specs/status-model.md.tpl +16 -0
- package/templates/base/docs/specs/traceability.md.tpl +7 -0
- package/templates/base/docs/specs/use-cases.md.tpl +5 -0
- package/templates/base/spec.md.tpl +63 -0
- package/templates/ci/azure.yml.tpl +40 -0
- package/templates/ci/github.yml.tpl +40 -0
- package/templates/ci/gitlab.yml.tpl +21 -0
- package/templates/ci/jenkins.tpl +35 -0
- package/templates/contracts/AI_RULES.md.tpl +55 -0
- package/templates/contracts/asyncapi-stub.yaml.tpl +24 -0
- package/templates/contracts/contract-traceability.md.tpl +10 -0
- package/templates/contracts/openapi-stub.yaml.tpl +29 -0
- package/templates/contracts/pacts-gitkeep.tpl +0 -0
- package/templates/contracts/test-strategy.md.tpl +94 -0
- package/templates/frontend/AI_RULES.md.tpl +34 -0
- package/templates/frontend/features/core/health.feature.tpl +6 -0
- package/templates/harness/harness.config.yaml.tpl +74 -0
- package/templates/harness/prompt-prefix.md.tpl +60 -0
- package/templates/mobile/AI_RULES.md.tpl +56 -0
- package/templates/mobile/features/core/health.feature.tpl +7 -0
- package/templates/modules/auth/backend/registration_and_login.feature.tpl +10 -0
- package/templates/modules/auth/frontend/login.feature.tpl +5 -0
- package/templates/modules/billing/backend/billing_settlement.feature.tpl +5 -0
- package/templates/modules/billing/frontend/billing_summary.feature.tpl +5 -0
- package/templates/modules/dashboard/backend/dashboard_kpi.feature.tpl +5 -0
- package/templates/modules/dashboard/frontend/dashboard.feature.tpl +5 -0
- package/vendor/mermaid.min.js +3636 -0
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.detectDialect = detectDialect;
|
|
4
|
+
exports.parseGherkin = parseGherkin;
|
|
5
|
+
exports.findKeywordCaseIssues = findKeywordCaseIssues;
|
|
6
|
+
const GherkinDialects_1 = require("./GherkinDialects");
|
|
7
|
+
/** `# language: es` on one of the first lines, as Cucumber defines it. */
|
|
8
|
+
const LANGUAGE_RE = /^\s*#\s*language\s*:\s*([a-zA-Z-]+)\s*$/;
|
|
9
|
+
const STEP_KINDS = ["given", "when", "then", "and", "but"];
|
|
10
|
+
/**
|
|
11
|
+
* Does the line open a block whose keyword is one of `keywords`?
|
|
12
|
+
*
|
|
13
|
+
* Block keywords are followed by a colon (`Feature:`, `Scenario:`), which is
|
|
14
|
+
* what separates them from a step. Matching is exact and case-sensitive.
|
|
15
|
+
*/
|
|
16
|
+
function matchBlock(line, keywords) {
|
|
17
|
+
for (const keyword of keywords) {
|
|
18
|
+
if (line.startsWith(`${keyword}:`))
|
|
19
|
+
return line.slice(keyword.length + 1).trim();
|
|
20
|
+
}
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Does the line open a step?
|
|
25
|
+
*
|
|
26
|
+
* Step keywords carry their trailing space in the table — `"Given "`, `"* "` —
|
|
27
|
+
* because that space is what stops `Givenchy` from parsing as a `Given`. Kept
|
|
28
|
+
* as the table has it rather than trimmed and re-added.
|
|
29
|
+
*/
|
|
30
|
+
function matchStep(line, dialect) {
|
|
31
|
+
for (const kind of STEP_KINDS) {
|
|
32
|
+
for (const keyword of dialect[kind]) {
|
|
33
|
+
if (line.startsWith(keyword)) {
|
|
34
|
+
return { kind, raw: keyword.trim(), text: line.slice(keyword.length).trim() };
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
/** The dialect a document declares, or English. Unknown tags fall back rather than throw. */
|
|
41
|
+
function detectDialect(source) {
|
|
42
|
+
for (const raw of source.split("\n")) {
|
|
43
|
+
const line = raw.trim();
|
|
44
|
+
if (line === "")
|
|
45
|
+
continue;
|
|
46
|
+
const declared = LANGUAGE_RE.exec(line);
|
|
47
|
+
if (declared) {
|
|
48
|
+
const tag = declared[1];
|
|
49
|
+
return GherkinDialects_1.DIALECTS[tag] ? tag : GherkinDialects_1.DEFAULT_DIALECT;
|
|
50
|
+
}
|
|
51
|
+
// The language comment must precede everything but blank lines and other
|
|
52
|
+
// comments; once real content starts, there is no dialect to declare.
|
|
53
|
+
if (!line.startsWith("#"))
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
return GherkinDialects_1.DEFAULT_DIALECT;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Read a Gherkin document.
|
|
60
|
+
*
|
|
61
|
+
* Never throws: a malformed file yields whatever was recognisable, because
|
|
62
|
+
* every caller wants "what does this file contain" rather than "is this file
|
|
63
|
+
* perfect". Judging it is `pack lint`'s and `validate`'s job.
|
|
64
|
+
*/
|
|
65
|
+
function parseGherkin(source) {
|
|
66
|
+
const dialectTag = detectDialect(source);
|
|
67
|
+
const dialect = GherkinDialects_1.DIALECTS[dialectTag];
|
|
68
|
+
const lines = String(source).replace(/\r\n/g, "\n").split("\n");
|
|
69
|
+
let feature = null;
|
|
70
|
+
const featureTags = [];
|
|
71
|
+
const background = [];
|
|
72
|
+
const scenarios = [];
|
|
73
|
+
let pendingTags = [];
|
|
74
|
+
let currentRule = null;
|
|
75
|
+
let currentSteps = null;
|
|
76
|
+
let currentScenario = null;
|
|
77
|
+
let lastKind = null;
|
|
78
|
+
// Doc strings hold arbitrary text, including lines that look like keywords.
|
|
79
|
+
let inDocString = null;
|
|
80
|
+
const closeScenario = () => {
|
|
81
|
+
if (currentScenario)
|
|
82
|
+
scenarios.push(currentScenario);
|
|
83
|
+
currentScenario = null;
|
|
84
|
+
};
|
|
85
|
+
for (let i = 0; i < lines.length; i++) {
|
|
86
|
+
const raw = lines[i];
|
|
87
|
+
const line = raw.trim();
|
|
88
|
+
const lineNo = i + 1;
|
|
89
|
+
if (inDocString !== null) {
|
|
90
|
+
if (line === inDocString)
|
|
91
|
+
inDocString = null;
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
if (line.startsWith('"""') || line.startsWith("```")) {
|
|
95
|
+
inDocString = line.slice(0, 3);
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
if (line === "" || line.startsWith("#"))
|
|
99
|
+
continue;
|
|
100
|
+
if (line.startsWith("@")) {
|
|
101
|
+
pendingTags.push(...line.split(/\s+/).filter((t) => t.startsWith("@")));
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
const featureName = matchBlock(line, dialect.feature);
|
|
105
|
+
if (featureName !== null && feature === null) {
|
|
106
|
+
feature = featureName;
|
|
107
|
+
featureTags.push(...pendingTags);
|
|
108
|
+
pendingTags = [];
|
|
109
|
+
currentSteps = null;
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
112
|
+
const ruleName = matchBlock(line, dialect.rule);
|
|
113
|
+
if (ruleName !== null) {
|
|
114
|
+
closeScenario();
|
|
115
|
+
currentRule = ruleName;
|
|
116
|
+
currentSteps = null;
|
|
117
|
+
pendingTags = [];
|
|
118
|
+
continue;
|
|
119
|
+
}
|
|
120
|
+
if (matchBlock(line, dialect.background) !== null) {
|
|
121
|
+
closeScenario();
|
|
122
|
+
currentSteps = background;
|
|
123
|
+
lastKind = null;
|
|
124
|
+
pendingTags = [];
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
127
|
+
const outlineName = matchBlock(line, dialect.scenarioOutline);
|
|
128
|
+
const scenarioName = outlineName === null ? matchBlock(line, dialect.scenario) : null;
|
|
129
|
+
if (outlineName !== null || scenarioName !== null) {
|
|
130
|
+
closeScenario();
|
|
131
|
+
currentScenario = {
|
|
132
|
+
name: (outlineName ?? scenarioName ?? "").trim(),
|
|
133
|
+
tags: pendingTags.slice(),
|
|
134
|
+
steps: [],
|
|
135
|
+
outline: outlineName !== null,
|
|
136
|
+
hasExamples: false,
|
|
137
|
+
rule: currentRule,
|
|
138
|
+
line: lineNo,
|
|
139
|
+
};
|
|
140
|
+
currentSteps = currentScenario.steps;
|
|
141
|
+
lastKind = null;
|
|
142
|
+
pendingTags = [];
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
if (matchBlock(line, dialect.examples) !== null) {
|
|
146
|
+
if (currentScenario)
|
|
147
|
+
currentScenario.hasExamples = true;
|
|
148
|
+
currentSteps = null;
|
|
149
|
+
pendingTags = [];
|
|
150
|
+
continue;
|
|
151
|
+
}
|
|
152
|
+
const step = matchStep(line, dialect);
|
|
153
|
+
if (step && currentSteps) {
|
|
154
|
+
// `And`, `But` and `*` continue whatever came before them; a scenario
|
|
155
|
+
// opening with one has nothing to inherit, so it keeps its own kind.
|
|
156
|
+
const inherits = step.kind === "and" || step.kind === "but" || step.raw === "*";
|
|
157
|
+
const keyword = inherits && lastKind ? lastKind : step.kind;
|
|
158
|
+
if (!inherits)
|
|
159
|
+
lastKind = step.kind;
|
|
160
|
+
currentSteps.push({ keyword, rawKeyword: step.raw, text: step.text, line: lineNo });
|
|
161
|
+
pendingTags = [];
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
// A data-table row, or prose. Neither ends a scenario, but both mean any
|
|
165
|
+
// pending tags belonged to nothing.
|
|
166
|
+
pendingTags = [];
|
|
167
|
+
}
|
|
168
|
+
closeScenario();
|
|
169
|
+
return { dialect: dialectTag, feature, featureTags, background, scenarios };
|
|
170
|
+
}
|
|
171
|
+
/** Block keywords take a colon; step keywords take a space. */
|
|
172
|
+
const BLOCK_FIELDS = [
|
|
173
|
+
"feature",
|
|
174
|
+
"background",
|
|
175
|
+
"rule",
|
|
176
|
+
"scenario",
|
|
177
|
+
"scenarioOutline",
|
|
178
|
+
"examples",
|
|
179
|
+
];
|
|
180
|
+
/**
|
|
181
|
+
* Lines that were trying to be Gherkin and are not.
|
|
182
|
+
*
|
|
183
|
+
* Cucumber discards these in silence — `GIVEN a flag` is prose to it, and the
|
|
184
|
+
* scenario simply ends up with fewer steps than it looks like it has. That
|
|
185
|
+
* silence is what let H14 ship 27 scenarios which executed nothing, so this
|
|
186
|
+
* exists to say out loud what the parser would otherwise swallow.
|
|
187
|
+
*
|
|
188
|
+
* Two shapes are caught:
|
|
189
|
+
*
|
|
190
|
+
* - **wrong case** — `GIVEN`, `SCENARIO:`, `then` — matched
|
|
191
|
+
* case-insensitively against the dialect and reported with the canonical
|
|
192
|
+
* spelling, because "it must be `Given`" is a fix and "no steps found" is
|
|
193
|
+
* a riddle;
|
|
194
|
+
* - **a space before the colon** — `Feature :` — which reads as correct and
|
|
195
|
+
* is not.
|
|
196
|
+
*
|
|
197
|
+
* Deliberately conservative: only lines the parser did *not* already accept are
|
|
198
|
+
* considered, so a correct file yields nothing, and step text is never examined
|
|
199
|
+
* — `Given Givenchy launched` is a step, not a mistake.
|
|
200
|
+
*/
|
|
201
|
+
function findKeywordCaseIssues(source) {
|
|
202
|
+
const dialect = GherkinDialects_1.DIALECTS[detectDialect(source)];
|
|
203
|
+
const issues = [];
|
|
204
|
+
let inDocString = null;
|
|
205
|
+
const lines = String(source).replace(/\r\n/g, "\n").split("\n");
|
|
206
|
+
for (let i = 0; i < lines.length; i++) {
|
|
207
|
+
const line = lines[i].trim();
|
|
208
|
+
const lineNo = i + 1;
|
|
209
|
+
if (inDocString !== null) {
|
|
210
|
+
if (line === inDocString)
|
|
211
|
+
inDocString = null;
|
|
212
|
+
continue;
|
|
213
|
+
}
|
|
214
|
+
if (line.startsWith('"""') || line.startsWith("```")) {
|
|
215
|
+
inDocString = line.slice(0, 3);
|
|
216
|
+
continue;
|
|
217
|
+
}
|
|
218
|
+
if (line === "" || line.startsWith("#") || line.startsWith("@") || line.startsWith("|"))
|
|
219
|
+
continue;
|
|
220
|
+
// Anything the parser already accepts is correct by definition.
|
|
221
|
+
if (matchStep(line, dialect))
|
|
222
|
+
continue;
|
|
223
|
+
const isBlock = BLOCK_FIELDS.some((field) => matchBlock(line, dialect[field]) !== null);
|
|
224
|
+
if (isBlock)
|
|
225
|
+
continue;
|
|
226
|
+
const blockIssue = findBlockCaseIssue(line, lineNo, dialect);
|
|
227
|
+
if (blockIssue) {
|
|
228
|
+
issues.push(blockIssue);
|
|
229
|
+
continue;
|
|
230
|
+
}
|
|
231
|
+
const stepIssue = findStepCaseIssue(line, lineNo, dialect);
|
|
232
|
+
if (stepIssue)
|
|
233
|
+
issues.push(stepIssue);
|
|
234
|
+
}
|
|
235
|
+
return issues;
|
|
236
|
+
}
|
|
237
|
+
/** `SCENARIO: x` or `Feature : x` — a block keyword the parser refused. */
|
|
238
|
+
function findBlockCaseIssue(line, lineNo, dialect) {
|
|
239
|
+
const colon = line.indexOf(":");
|
|
240
|
+
if (colon <= 0)
|
|
241
|
+
return null;
|
|
242
|
+
const head = line.slice(0, colon);
|
|
243
|
+
const written = head.trimEnd();
|
|
244
|
+
for (const field of BLOCK_FIELDS) {
|
|
245
|
+
for (const keyword of dialect[field]) {
|
|
246
|
+
if (written.toLowerCase() !== keyword.toLowerCase())
|
|
247
|
+
continue;
|
|
248
|
+
// Matched ignoring case, so either the case is wrong, or the case is
|
|
249
|
+
// right and a space crept in before the colon. Both are silent failures.
|
|
250
|
+
return { line: lineNo, found: head, expected: keyword, text: line };
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
return null;
|
|
254
|
+
}
|
|
255
|
+
/** `GIVEN a flag` — a step keyword the parser refused. */
|
|
256
|
+
function findStepCaseIssue(line, lineNo, dialect) {
|
|
257
|
+
const firstWord = line.split(/\s+/)[0];
|
|
258
|
+
if (!firstWord || firstWord === "*")
|
|
259
|
+
return null;
|
|
260
|
+
for (const kind of STEP_KINDS) {
|
|
261
|
+
for (const keyword of dialect[kind]) {
|
|
262
|
+
const canonical = keyword.trim();
|
|
263
|
+
if (canonical === "*")
|
|
264
|
+
continue;
|
|
265
|
+
if (firstWord.toLowerCase() === canonical.toLowerCase() && firstWord !== canonical) {
|
|
266
|
+
return { line: lineNo, found: firstWord, expected: canonical, text: line };
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
return null;
|
|
271
|
+
}
|
|
272
|
+
//# sourceMappingURL=Gherkin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Gherkin.js","sourceRoot":"","sources":["../../../../../packages/core/src/domain/Gherkin.ts"],"names":[],"mappings":";;AAmHA,sCAcC;AASD,oCA6HC;AA6CD,sDAoCC;AAxVD,uDAA8E;AA0E9E,0EAA0E;AAC1E,MAAM,WAAW,GAAG,yCAAyC,CAAC;AAE9D,MAAM,UAAU,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAU,CAAC;AAGpE;;;;;GAKG;AACH,SAAS,UAAU,CAAC,IA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,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;YACjC,IAAI,SAAS,KAAK,GAAG;gBAAE,SAAS;YAChC,IAAI,SAAS,CAAC,WAAW,EAAE,KAAK,SAAS,CAAC,WAAW,EAAE,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;gBACnF,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;YAC7E,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* The Gherkin keyword table, for the dialects this CLI offers.
|
|
4
|
+
*
|
|
5
|
+
* **Vendored data, not a fork.** Copied verbatim from
|
|
6
|
+
* `@cucumber/gherkin`'s own `gherkin-languages.json` (MIT, Cucumber Ltd —
|
|
7
|
+
* see `THIRD-PARTY-NOTICES.md`), version 42.0.0, and generated from it
|
|
8
|
+
* rather than transcribed, because a table typed by hand is a table that
|
|
9
|
+
* silently disagrees with the runner.
|
|
10
|
+
*
|
|
11
|
+
* ## Why vendored at all
|
|
12
|
+
*
|
|
13
|
+
* `package.json` has **no runtime dependencies** and `AI_RULES.md` requires an
|
|
14
|
+
* ADR to add one. The CLI runs through `npx` on other people's machines, so
|
|
15
|
+
* that promise is structural rather than stylistic. Depending on
|
|
16
|
+
* `@cucumber/gherkin` at runtime to read three dialects would buy correctness
|
|
17
|
+
* at a price this product has decided not to pay.
|
|
18
|
+
*
|
|
19
|
+
* The real risk of vendoring is drift, and that is answered directly:
|
|
20
|
+
* `packages/core/test/unit/gherkin-dialects.test.ts` compares every entry here
|
|
21
|
+
* against the installed official table and fails if they diverge. Bumping
|
|
22
|
+
* Cucumber therefore either passes or tells you exactly what moved.
|
|
23
|
+
*
|
|
24
|
+
* ## Only three dialects, deliberately
|
|
25
|
+
*
|
|
26
|
+
* The official table carries eighty. This carries the three `specgate init`
|
|
27
|
+
* offers (`LANG`: en, es, pt). Adding a dialect is adding it here and
|
|
28
|
+
* regenerating; carrying eighty would be carrying seventy-seven we cannot test.
|
|
29
|
+
*/
|
|
30
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.DEFAULT_DIALECT = exports.DIALECTS = exports.DIALECT_TABLE_VERSION = void 0;
|
|
32
|
+
/**
|
|
33
|
+
* The version of `@cucumber/gherkin` this table was generated from.
|
|
34
|
+
*
|
|
35
|
+
* Bumped to 42.0.1 for #141 after the drift test confirmed the keyword data is
|
|
36
|
+
* byte-identical to 42.0.0 — only the stamp was stale. The two tests are
|
|
37
|
+
* deliberately separate: one compares every keyword against the installed
|
|
38
|
+
* table, the other records which version that comparison ran against. A patch
|
|
39
|
+
* release that changes no dialect still has to move this line, so the number in
|
|
40
|
+
* the file never claims more than it was checked against.
|
|
41
|
+
*/
|
|
42
|
+
exports.DIALECT_TABLE_VERSION = "42.0.1";
|
|
43
|
+
exports.DIALECTS = {
|
|
44
|
+
en: {
|
|
45
|
+
name: "English",
|
|
46
|
+
native: "English",
|
|
47
|
+
feature: ["Feature", "Business Need", "Ability"],
|
|
48
|
+
background: ["Background"],
|
|
49
|
+
rule: ["Rule"],
|
|
50
|
+
scenario: ["Example", "Scenario"],
|
|
51
|
+
scenarioOutline: ["Scenario Outline", "Scenario Template"],
|
|
52
|
+
examples: ["Examples", "Scenarios"],
|
|
53
|
+
given: ["* ", "Given "],
|
|
54
|
+
when: ["* ", "When "],
|
|
55
|
+
then: ["* ", "Then "],
|
|
56
|
+
and: ["* ", "And "],
|
|
57
|
+
but: ["* ", "But "],
|
|
58
|
+
},
|
|
59
|
+
es: {
|
|
60
|
+
name: "Spanish",
|
|
61
|
+
native: "español",
|
|
62
|
+
feature: ["Característica", "Necesidad del negocio", "Requisito"],
|
|
63
|
+
background: ["Antecedentes"],
|
|
64
|
+
rule: ["Regla", "Regla de negocio"],
|
|
65
|
+
scenario: ["Ejemplo", "Escenario"],
|
|
66
|
+
scenarioOutline: ["Esquema del escenario"],
|
|
67
|
+
examples: ["Ejemplos"],
|
|
68
|
+
given: ["* ", "Dado ", "Dada ", "Dados ", "Dadas "],
|
|
69
|
+
when: ["* ", "Cuando "],
|
|
70
|
+
then: ["* ", "Entonces "],
|
|
71
|
+
and: ["* ", "Y ", "E "],
|
|
72
|
+
but: ["* ", "Pero "],
|
|
73
|
+
},
|
|
74
|
+
pt: {
|
|
75
|
+
name: "Portuguese",
|
|
76
|
+
native: "português",
|
|
77
|
+
feature: ["Funcionalidade", "Característica", "Caracteristica"],
|
|
78
|
+
background: ["Contexto", "Cenário de Fundo", "Cenario de Fundo", "Fundo"],
|
|
79
|
+
rule: ["Regra"],
|
|
80
|
+
scenario: ["Exemplo", "Cenário", "Cenario"],
|
|
81
|
+
scenarioOutline: [
|
|
82
|
+
"Esquema do Cenário",
|
|
83
|
+
"Esquema do Cenario",
|
|
84
|
+
"Delineação do Cenário",
|
|
85
|
+
"Delineacao do Cenario",
|
|
86
|
+
],
|
|
87
|
+
examples: ["Exemplos", "Cenários", "Cenarios"],
|
|
88
|
+
given: ["* ", "Dado ", "Dada ", "Dados ", "Dadas "],
|
|
89
|
+
when: ["* ", "Quando "],
|
|
90
|
+
then: ["* ", "Então ", "Entao "],
|
|
91
|
+
and: ["* ", "E "],
|
|
92
|
+
but: ["* ", "Mas "],
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
/** The dialect a document uses when it declares none. */
|
|
96
|
+
exports.DEFAULT_DIALECT = "en";
|
|
97
|
+
//# sourceMappingURL=GherkinDialects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GherkinDialects.js","sourceRoot":"","sources":["../../../../../packages/core/src/domain/GherkinDialects.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;;;AAmBH;;;;;;;;;GASG;AACU,QAAA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CAAC;QACvB,GAAG,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC;KACrB;IACD,EAAE,EAAE;QACF,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,WAAW;QACnB,OAAO,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,gBAAgB,CAAC;QAC/D,UAAU,EAAE,CAAC,UAAU,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,OAAO,CAAC;QACzE,IAAI,EAAE,CAAC,OAAO,CAAC;QACf,QAAQ,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC;QAC3C,eAAe,EAAE;YACf,oBAAoB;YACpB,oBAAoB;YACpB,uBAAuB;YACvB,uBAAuB;SACxB;QACD,QAAQ,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC;QAC9C,KAAK,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC;QACnD,IAAI,EAAE,CAAC,IAAI,EAAE,SAAS,CAAC;QACvB,IAAI,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,CAAC;QAChC,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;QACjB,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC;KACpB;CACF,CAAC;AAEF,yDAAyD;AAC5C,QAAA,eAAe,GAAG,IAAI,CAAC"}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Whether a scenario is worth running — the rules, with nothing around them.
|
|
4
|
+
*
|
|
5
|
+
* ## Why this is its own module (A3)
|
|
6
|
+
*
|
|
7
|
+
* `docs/specs/harness.md` says it plainly: *the gate is only as strong as the
|
|
8
|
+
* scenarios in the pack*. Eight rules enforce that — no `When`, no `Then`, too
|
|
9
|
+
* few steps, a generic title, vague language, an Outline without Examples, and
|
|
10
|
+
* the two H14 rules — and until now all eight lived inside `pack lint` and
|
|
11
|
+
* applied to one thing: a `pack.yaml`.
|
|
12
|
+
*
|
|
13
|
+
* But the harness does not gate packs. It gates **projects**, and a project's
|
|
14
|
+
* features arrive by three routes that never touch `pack lint`: `change
|
|
15
|
+
* archive`, `req add`, and a person with an editor. The rule protecting the
|
|
16
|
+
* harness was not applied where the harness runs.
|
|
17
|
+
*
|
|
18
|
+
* So the rules live here, in the domain, knowing nothing about `pack.yaml`,
|
|
19
|
+
* files, or flags. `pack lint`, `validate --strict-scenarios`, `doctor` and
|
|
20
|
+
* `harness run` all read the same judgement instead of three drifting copies —
|
|
21
|
+
* which is the shape H14 taught: three hand-written parsers disagreeing is how
|
|
22
|
+
* a linter ends up approving what the runner ignores.
|
|
23
|
+
*
|
|
24
|
+
* ## Why `Diagnostic` and not a new shape
|
|
25
|
+
*
|
|
26
|
+
* ADR-0017 already fixes the envelope every machine-readable surface emits:
|
|
27
|
+
* `{ severity, code, message, target?, fix?, file?, line? }`. A3 asked for
|
|
28
|
+
* rules carrying a `code` and a `fix`; that is this envelope, so it is reused
|
|
29
|
+
* rather than reinvented. Callers branch on `code`, never on message text.
|
|
30
|
+
*
|
|
31
|
+
* ## Severity is not a matter of taste
|
|
32
|
+
*
|
|
33
|
+
* Two rules are errors and can never be demoted to style: `scenario_has_no_steps`
|
|
34
|
+
* and `keyword_case_invalid`. Cucumber reports an empty scenario as
|
|
35
|
+
* `1 scenario (1 passed) · 0 steps · exit 0` — a test that proves nothing and
|
|
36
|
+
* says it passed. 27 shipped scenarios were in that state while `--strict`
|
|
37
|
+
* called them fine (H14). The rest are warnings: a two-step scenario is weak,
|
|
38
|
+
* but it does run.
|
|
39
|
+
*/
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.QUALITY_CODES = void 0;
|
|
42
|
+
exports.isGenericTitle = isGenericTitle;
|
|
43
|
+
exports.analyseScenario = analyseScenario;
|
|
44
|
+
exports.analyseKeywordCase = analyseKeywordCase;
|
|
45
|
+
exports.analyseGherkinSource = analyseGherkinSource;
|
|
46
|
+
const Diagnostic_1 = require("./Diagnostic");
|
|
47
|
+
const Gherkin_1 = require("./Gherkin");
|
|
48
|
+
/**
|
|
49
|
+
* Language that describes nothing checkable.
|
|
50
|
+
*
|
|
51
|
+
* `Then it works correctly` is not falsifiable: it passes or fails on the
|
|
52
|
+
* implementer's mood, which makes the gate's verdict meaningless.
|
|
53
|
+
*/
|
|
54
|
+
const VAGUE_STEP_RE = /\b(works?|correctly|properly|as expected|should be fine|should work|somehow|something|some stuff|etc\.?|tbd|todo)\b|\.\.\./i;
|
|
55
|
+
/** Every code this module can emit. Callers branch on these, never on prose. */
|
|
56
|
+
exports.QUALITY_CODES = Object.freeze({
|
|
57
|
+
TITLE_GENERIC: "scenario_title_generic",
|
|
58
|
+
NO_STEPS: "scenario_has_no_steps",
|
|
59
|
+
TOO_FEW_STEPS: "scenario_too_few_steps",
|
|
60
|
+
NO_WHEN: "scenario_without_when",
|
|
61
|
+
NO_THEN: "scenario_without_then",
|
|
62
|
+
OUTLINE_WITHOUT_EXAMPLES: "scenario_outline_without_examples",
|
|
63
|
+
VAGUE_STEP: "vague_step",
|
|
64
|
+
KEYWORD_CASE: "keyword_case_invalid",
|
|
65
|
+
});
|
|
66
|
+
/**
|
|
67
|
+
* A title that names nothing: `Test`, `Scenario 1`, or fewer than three words.
|
|
68
|
+
*
|
|
69
|
+
* Exported because `pack lint` has always exposed it and its tests pin it.
|
|
70
|
+
*/
|
|
71
|
+
function isGenericTitle(title) {
|
|
72
|
+
if (!title)
|
|
73
|
+
return true;
|
|
74
|
+
if (/^(test|scenario|example|untitled)\b/i.test(title))
|
|
75
|
+
return true;
|
|
76
|
+
return title.split(/\s+/).filter(Boolean).length < 3;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* The eight rules, applied to one scenario.
|
|
80
|
+
*
|
|
81
|
+
* `target` is what the caller wants the reader to look at — a pack scenario id,
|
|
82
|
+
* a file path, whatever locates it. The domain does not invent it because the
|
|
83
|
+
* domain does not know which surface is asking.
|
|
84
|
+
*/
|
|
85
|
+
function analyseScenario(scenario, target, file) {
|
|
86
|
+
const found = [];
|
|
87
|
+
const at = (extra = {}) => ({
|
|
88
|
+
target,
|
|
89
|
+
...(file ? { file } : {}),
|
|
90
|
+
...(scenario.line ? { line: scenario.line } : {}),
|
|
91
|
+
...extra,
|
|
92
|
+
});
|
|
93
|
+
const kinds = new Set(scenario.steps.map((s) => s.keyword));
|
|
94
|
+
if (isGenericTitle(scenario.name)) {
|
|
95
|
+
found.push((0, Diagnostic_1.warning)(exports.QUALITY_CODES.TITLE_GENERIC, "scenario title is generic — name the behaviour under test.", at({ fix: "Title it after the behaviour, e.g. `Defining a flag emits FlagDefined`." })));
|
|
96
|
+
}
|
|
97
|
+
if (scenario.steps.length === 0) {
|
|
98
|
+
// Never a warning. See the module note: Cucumber passes this scenario.
|
|
99
|
+
found.push((0, Diagnostic_1.error)(exports.QUALITY_CODES.NO_STEPS, "scenario_has_no_steps — Cucumber sees no steps here, so this scenario " +
|
|
100
|
+
"passes without testing anything. If the steps look like they are there, " +
|
|
101
|
+
"check their keywords: Gherkin is case-sensitive.", at({ fix: "Write Given / When / Then steps, in that capitalisation." })));
|
|
102
|
+
}
|
|
103
|
+
else if (scenario.steps.length < 3) {
|
|
104
|
+
found.push((0, Diagnostic_1.warning)(exports.QUALITY_CODES.TOO_FEW_STEPS, `only ${scenario.steps.length} step(s) — a real scenario needs Given/When/Then.`, at({ fix: "Add the missing context, action or assertion." })));
|
|
105
|
+
}
|
|
106
|
+
if (!kinds.has("when")) {
|
|
107
|
+
found.push((0, Diagnostic_1.warning)(exports.QUALITY_CODES.NO_WHEN, "no When step — the scenario exercises no action.", at({ fix: "Add a `When` step naming the action under test." })));
|
|
108
|
+
}
|
|
109
|
+
if (!kinds.has("then")) {
|
|
110
|
+
found.push((0, Diagnostic_1.warning)(exports.QUALITY_CODES.NO_THEN, "no Then step — the scenario asserts nothing.", at({ fix: "Add a `Then` step stating the observable outcome." })));
|
|
111
|
+
}
|
|
112
|
+
if (scenario.outline && !scenario.hasExamples) {
|
|
113
|
+
found.push((0, Diagnostic_1.error)(exports.QUALITY_CODES.OUTLINE_WITHOUT_EXAMPLES, "Scenario Outline has no Examples table.", at({ fix: "Add an `Examples:` table, or make it a plain `Scenario`." })));
|
|
114
|
+
}
|
|
115
|
+
for (const step of scenario.steps) {
|
|
116
|
+
if (VAGUE_STEP_RE.test(step.text)) {
|
|
117
|
+
found.push((0, Diagnostic_1.warning)(exports.QUALITY_CODES.VAGUE_STEP, `vague step "${step.keyword} ${step.text}" — make it concrete and falsifiable.`, at({ fix: "State a checkable fact: a value, a state, an emitted event." })));
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return found;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Just the case check, for callers that label findings their own way.
|
|
124
|
+
*
|
|
125
|
+
* Split out because `pack lint` locates a finding by pack scenario id while
|
|
126
|
+
* `validate` locates it by path; the rule is the same, the address is not.
|
|
127
|
+
*/
|
|
128
|
+
/**
|
|
129
|
+
* The same rules over a whole Gherkin source, plus the case check.
|
|
130
|
+
*
|
|
131
|
+
* The case check runs on the raw text rather than the parse, because the
|
|
132
|
+
* failure it catches is invisible after parsing: `GIVEN a flag` is absorbed as
|
|
133
|
+
* the scenario's description, so a parsed document simply has no steps and
|
|
134
|
+
* cannot say why.
|
|
135
|
+
*/
|
|
136
|
+
/**
|
|
137
|
+
* Just the case check, for callers that label findings their own way.
|
|
138
|
+
*
|
|
139
|
+
* Split out because `pack lint` locates a finding by pack scenario id while
|
|
140
|
+
* `validate` locates it by path; the rule is the same, the address is not.
|
|
141
|
+
*/
|
|
142
|
+
function analyseKeywordCase(source, file) {
|
|
143
|
+
return (0, Gherkin_1.findKeywordCaseIssues)(source).map((issue) => (0, Diagnostic_1.error)(exports.QUALITY_CODES.KEYWORD_CASE, `\`${issue.found}\` is not a Gherkin keyword; write \`${issue.expected}\`. ` +
|
|
144
|
+
"Cucumber reads it as prose, so the line does nothing.", { file, line: issue.line, target: file, fix: `Write \`${issue.expected}\`.` }));
|
|
145
|
+
}
|
|
146
|
+
function analyseGherkinSource(source, file) {
|
|
147
|
+
const found = [...analyseKeywordCase(source, file)];
|
|
148
|
+
const doc = (0, Gherkin_1.parseGherkin)(source);
|
|
149
|
+
for (const scenario of doc.scenarios) {
|
|
150
|
+
found.push(...analyseScenario({
|
|
151
|
+
name: scenario.name,
|
|
152
|
+
steps: scenario.steps.map((s) => ({ keyword: s.keyword, text: s.text })),
|
|
153
|
+
outline: scenario.outline,
|
|
154
|
+
hasExamples: scenario.hasExamples,
|
|
155
|
+
line: scenario.line,
|
|
156
|
+
}, `${file} → "${scenario.name || "(no title)"}"`, file));
|
|
157
|
+
}
|
|
158
|
+
return found;
|
|
159
|
+
}
|
|
160
|
+
//# sourceMappingURL=GherkinQuality.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GherkinQuality.js","sourceRoot":"","sources":["../../../../../packages/core/src/domain/GherkinQuality.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;;;AAiDH,wCAIC;AASD,0CAuFC;AAsBD,gDASC;AAED,oDAqBC;AAxMD,6CAA8C;AAC9C,uCAAgE;AAmBhE;;;;;GAKG;AACH,MAAM,aAAa,GACjB,6HAA6H,CAAC;AAEhI,gFAAgF;AACnE,QAAA,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC;IACzC,aAAa,EAAE,wBAAwB;IACvC,QAAQ,EAAE,uBAAuB;IACjC,aAAa,EAAE,wBAAwB;IACvC,OAAO,EAAE,uBAAuB;IAChC,OAAO,EAAE,uBAAuB;IAChC,wBAAwB,EAAE,mCAAmC;IAC7D,UAAU,EAAE,YAAY;IACxB,YAAY,EAAE,sBAAsB;CACrC,CAAC,CAAC;AAEH;;;;GAIG;AACH,SAAgB,cAAc,CAAC,KAAa;IAC1C,IAAI,C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