@techspokes/typescript-wsdl-client 1.1.5 → 1.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +64 -66
- package/dist/app/generateApp.d.ts +0 -1
- package/dist/app/generateApp.js +1 -1
- package/dist/app/generateCheckedApp.d.ts +38 -0
- package/dist/app/generateCheckedApp.js +108 -0
- package/dist/checkedPipeline.d.ts +155 -0
- package/dist/checkedPipeline.js +448 -0
- package/dist/checkedPlanning.d.ts +123 -0
- package/dist/checkedPlanning.js +245 -0
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +75 -1
- package/dist/client/checkedDirectRuntime.d.ts +40 -3
- package/dist/client/checkedDirectRuntime.js +28 -8
- package/dist/client/directClientRuntime.d.ts +27 -2
- package/dist/client/directClientRuntime.js +142 -89
- package/dist/client/directClientVersion.d.ts +3 -1
- package/dist/client/directClientVersion.js +3 -0
- package/dist/client/generateClient.d.ts +0 -1
- package/dist/client/generateClient.js +26 -12
- package/dist/client/generateDirectClient.d.ts +21 -3
- package/dist/client/generateDirectClient.js +138 -6
- package/dist/client/generateOperations.d.ts +0 -1
- package/dist/client/generateTypes.d.ts +0 -1
- package/dist/client/generateUtils.d.ts +0 -1
- package/dist/client/generateUtils.js +3 -1
- package/dist/compiler/applicationGroups.d.ts +53 -0
- package/dist/compiler/applicationGroups.js +403 -0
- package/dist/compiler/buildCanonicalGraph.d.ts +0 -1
- package/dist/compiler/canonicalGraph.d.ts +0 -1
- package/dist/compiler/catalogErrors.d.ts +0 -1
- package/dist/compiler/catalogProvenance.d.ts +0 -1
- package/dist/compiler/checkedAssessment.d.ts +0 -1
- package/dist/compiler/checkedAssessment.js +1 -1
- package/dist/compiler/checkedComponentSource.d.ts +16 -0
- package/dist/compiler/checkedComponentSource.js +31 -0
- package/dist/compiler/checkedSourcePreparation.d.ts +38 -1
- package/dist/compiler/checkedSourcePreparation.js +71 -0
- package/dist/compiler/complexTypeContent.d.ts +5 -6
- package/dist/compiler/complexTypeContent.js +2 -2
- package/dist/compiler/componentCorrespondence.d.ts +32 -0
- package/dist/compiler/componentCorrespondence.js +140 -0
- package/dist/compiler/componentRecordProjection.d.ts +109 -0
- package/dist/compiler/componentRecordProjection.js +319 -0
- package/dist/compiler/componentSoapPreparation.d.ts +20 -0
- package/dist/compiler/componentSoapPreparation.js +36 -0
- package/dist/compiler/composeCanonicalGraph.d.ts +0 -1
- package/dist/compiler/dataOwnership.d.ts +0 -1
- package/dist/compiler/dataOwnership.js +14 -4
- package/dist/compiler/datatypeValues.d.ts +0 -1
- package/dist/compiler/directCodec.d.ts +59 -2
- package/dist/compiler/directCodec.js +275 -90
- package/dist/compiler/directExecutionPolicy.d.ts +0 -1
- package/dist/compiler/directOperation.d.ts +46 -4
- package/dist/compiler/directOperation.js +105 -14
- package/dist/compiler/directSoap.d.ts +29 -5
- package/dist/compiler/directSoap.js +130 -37
- package/dist/compiler/directSoapSource.d.ts +24 -1
- package/dist/compiler/directSoapSource.js +166 -19
- package/dist/compiler/directSourceCapsule.d.ts +74 -2
- package/dist/compiler/directSourceCapsule.js +428 -6
- package/dist/compiler/directStructure.d.ts +83 -6
- package/dist/compiler/directStructure.js +349 -58
- package/dist/compiler/directStructurePlan.d.ts +135 -2
- package/dist/compiler/directStructurePlan.js +594 -29
- package/dist/compiler/directValues.d.ts +63 -4
- package/dist/compiler/directValues.js +950 -116
- package/dist/compiler/finiteRe01Construction.d.ts +69 -0
- package/dist/compiler/finiteRe01Construction.js +422 -0
- package/dist/compiler/finiteRe01Verification.d.ts +81 -3
- package/dist/compiler/finiteRe01Verification.js +391 -4
- package/dist/compiler/generateCatalog.d.ts +0 -1
- package/dist/compiler/graphTraversal.d.ts +0 -1
- package/dist/compiler/hypotheticalScopedIdentity.d.ts +0 -1
- package/dist/compiler/occurrenceAnalysis.d.ts +2 -1
- package/dist/compiler/occurrenceAnalysis.js +23 -7
- package/dist/compiler/originalSourceMembership.d.ts +0 -1
- package/dist/compiler/particleAttribution.d.ts +0 -1
- package/dist/compiler/particleAttribution.js +20 -0
- package/dist/compiler/particleDeclarationConsistency.d.ts +0 -1
- package/dist/compiler/particleDeclarationConsistency.js +9 -0
- package/dist/compiler/particleExtension.d.ts +0 -1
- package/dist/compiler/particleExtension.js +5 -1
- package/dist/compiler/particleLocalAssessment.d.ts +0 -1
- package/dist/compiler/particleRestriction.d.ts +0 -1
- package/dist/compiler/particleRestriction.js +6 -1
- package/dist/compiler/particleSemanticView.d.ts +2 -1
- package/dist/compiler/particleSemanticView.js +16 -3
- package/dist/compiler/particleWildcardRelation.d.ts +0 -1
- package/dist/compiler/projectionScalar.d.ts +32 -0
- package/dist/compiler/projectionScalar.js +184 -0
- package/dist/compiler/re01CandidateAssignments.d.ts +95 -0
- package/dist/compiler/re01CandidateAssignments.js +341 -0
- package/dist/compiler/re01CandidateCorrespondence.d.ts +22 -1
- package/dist/compiler/re01CandidateCorrespondence.js +167 -38
- package/dist/compiler/re01TypeProperties.d.ts +0 -1
- package/dist/compiler/re01TypePropertyValidation.d.ts +0 -1
- package/dist/compiler/resolveCanonicalGraph.d.ts +5 -2
- package/dist/compiler/resolveCanonicalGraph.js +77 -7
- package/dist/compiler/scalarSchemaAssessment.d.ts +0 -1
- package/dist/compiler/schemaAttributeGroupProperties.d.ts +0 -1
- package/dist/compiler/schemaAttributeProperties.d.ts +0 -1
- package/dist/compiler/schemaAttributeUses.d.ts +22 -2
- package/dist/compiler/schemaAttributeUses.js +86 -13
- package/dist/compiler/schemaBinaryWordReconstruction.d.ts +0 -1
- package/dist/compiler/schemaBuiltinFacets.d.ts +0 -1
- package/dist/compiler/schemaCalendarImages.d.ts +0 -1
- package/dist/compiler/schemaCalendarLanguage.d.ts +0 -1
- package/dist/compiler/schemaCompiler.d.ts +0 -1
- package/dist/compiler/schemaComponentEquality.d.ts +0 -1
- package/dist/compiler/schemaConstructionAssessment.d.ts +34 -1
- package/dist/compiler/schemaConstructionAssessment.js +88 -6
- package/dist/compiler/schemaDatatypeValues.d.ts +0 -1
- package/dist/compiler/schemaDecimalLanguage.d.ts +0 -1
- package/dist/compiler/schemaDeclarationPrimitives.d.ts +7 -2
- package/dist/compiler/schemaDeclarationPrimitives.js +18 -1
- package/dist/compiler/schemaDocumentSyntax.d.ts +0 -1
- package/dist/compiler/schemaDurationLanguage.d.ts +0 -1
- package/dist/compiler/schemaElementInstance.d.ts +30 -0
- package/dist/compiler/schemaElementInstance.js +45 -0
- package/dist/compiler/schemaElementProperties.d.ts +0 -1
- package/dist/compiler/schemaEndpointWordCapacity.d.ts +0 -1
- package/dist/compiler/schemaExactCalendar.d.ts +0 -1
- package/dist/compiler/schemaFacetAnnotation.d.ts +0 -1
- package/dist/compiler/schemaGeneratedScalarShape.d.ts +0 -1
- package/dist/compiler/schemaGeneratedScalarShape.js +2 -0
- package/dist/compiler/schemaIdentityConstraints.d.ts +0 -1
- package/dist/compiler/schemaIeeeLanguage.d.ts +0 -1
- package/dist/compiler/schemaIntegerImages.d.ts +0 -1
- package/dist/compiler/schemaLexicalPredicates.d.ts +0 -1
- package/dist/compiler/schemaNotationProperties.d.ts +0 -1
- package/dist/compiler/schemaNumericImageConditions.d.ts +0 -1
- package/dist/compiler/schemaParticleWildcardProperties.d.ts +0 -1
- package/dist/compiler/schemaPattern.d.ts +0 -1
- package/dist/compiler/schemaRegularLanguage.d.ts +0 -1
- package/dist/compiler/schemaScalarContext.d.ts +5 -1
- package/dist/compiler/schemaScalarKernel.d.ts +0 -1
- package/dist/compiler/schemaScalarWitnesses.d.ts +0 -1
- package/dist/compiler/schemaSimpleTypeProperties.d.ts +0 -1
- package/dist/compiler/schemaSourceGrammar.d.ts +0 -1
- package/dist/compiler/schemaSourceLexical.d.ts +0 -1
- package/dist/compiler/schemaSourceValues.d.ts +0 -1
- package/dist/compiler/schemaSourceWildcards.d.ts +1 -2
- package/dist/compiler/schemaSourceWildcards.js +3 -1
- package/dist/compiler/schemaSymbolicSequences.d.ts +0 -1
- package/dist/compiler/schemaSymbolicValueSets.d.ts +0 -1
- package/dist/compiler/schemaSyntaxAssessment.d.ts +0 -1
- package/dist/compiler/schemaTemporalAliases.d.ts +0 -1
- package/dist/compiler/schemaTokenImages.d.ts +0 -1
- package/dist/compiler/schemaTypeIdentity.d.ts +0 -1
- package/dist/compiler/schemaTypeIdentity.js +2 -0
- package/dist/compiler/schemaTypeRelations.d.ts +0 -1
- package/dist/compiler/schemaUri.d.ts +0 -1
- package/dist/compiler/schemaValueContext.d.ts +0 -1
- package/dist/compiler/schemaValueImages.d.ts +0 -1
- package/dist/compiler/schemaValueSequences.d.ts +0 -1
- package/dist/compiler/semanticBudget.d.ts +18 -1
- package/dist/compiler/semanticBudget.js +17 -2
- package/dist/compiler/semanticCatalog.d.ts +1 -2
- package/dist/compiler/semanticContext.d.ts +12 -1
- package/dist/compiler/semanticContext.js +39 -0
- package/dist/compiler/semanticTypeDependencies.d.ts +0 -1
- package/dist/compiler/semanticTypeReference.d.ts +0 -1
- package/dist/compiler/shapeResolver.d.ts +0 -1
- package/dist/compiler/soapHeaders.d.ts +16 -0
- package/dist/compiler/soapHeaders.js +42 -0
- package/dist/compiler/sourceSchemaBinding.d.ts +0 -1
- package/dist/compiler/standardSchemaComponents.d.ts +71 -0
- package/dist/compiler/standardSchemaComponents.js +74 -0
- package/dist/compiler/standardSchemaConstruction.d.ts +20 -0
- package/dist/compiler/standardSchemaConstruction.js +34 -0
- package/dist/compiler/structuralCompanions.d.ts +0 -1
- package/dist/compiler/validateSemanticGraph.d.ts +0 -1
- package/dist/compiler/wildcardAlgebra.d.ts +0 -1
- package/dist/compiler/wsdlPolicyRequirements.d.ts +43 -0
- package/dist/compiler/wsdlPolicyRequirements.js +239 -0
- package/dist/config.d.ts +0 -1
- package/dist/gateway/generateCheckedGateway.d.ts +32 -0
- package/dist/gateway/generateCheckedGateway.js +293 -0
- package/dist/gateway/generateGateway.d.ts +0 -1
- package/dist/gateway/generators.d.ts +0 -1
- package/dist/gateway/helpers.d.ts +0 -1
- package/dist/generation/componentShape.d.ts +14 -0
- package/dist/generation/componentShape.js +269 -0
- package/dist/generation/preamble.d.ts +0 -1
- package/dist/generation/sourceLayout.d.ts +13 -0
- package/dist/generation/sourceLayout.js +40 -0
- package/dist/generation/writeGeneratedSource.d.ts +0 -1
- package/dist/index.d.ts +7 -2
- package/dist/index.js +2 -1
- package/dist/loader/fetch.d.ts +0 -1
- package/dist/loader/orderedSyntax.d.ts +8 -1
- package/dist/loader/orderedSyntax.js +26 -6
- package/dist/loader/resolutionDepth.d.ts +0 -1
- package/dist/loader/schemaInput.d.ts +28 -1
- package/dist/loader/schemaInput.js +41 -4
- package/dist/loader/schemaResources.d.ts +2 -1
- package/dist/loader/schemaResources.js +45 -4
- package/dist/loader/wsdlLoader.d.ts +0 -1
- package/dist/openapi/casing.d.ts +0 -1
- package/dist/openapi/generateOpenAPI.d.ts +0 -1
- package/dist/openapi/generatePaths.d.ts +0 -1
- package/dist/openapi/generateSchemas.d.ts +0 -1
- package/dist/openapi/security.d.ts +0 -1
- package/dist/pipeline.d.ts +6 -2
- package/dist/pipeline.js +13 -0
- package/dist/test/generateCheckedTests.d.ts +17 -0
- package/dist/test/generateCheckedTests.js +60 -0
- package/dist/test/generateTests.d.ts +0 -1
- package/dist/test/generators.d.ts +0 -1
- package/dist/test/mockData.d.ts +0 -1
- package/dist/test/mockData.js +20 -14
- package/dist/util/attributeWildcards.d.ts +0 -1
- package/dist/util/builder.d.ts +0 -1
- package/dist/util/catalogMeta.d.ts +0 -1
- package/dist/util/checkedCliDiagnostics.d.ts +11 -0
- package/dist/util/checkedCliDiagnostics.js +22 -0
- package/dist/util/cli.d.ts +0 -1
- package/dist/util/errors.d.ts +0 -1
- package/dist/util/imports.d.ts +0 -1
- package/dist/util/runtimeSource.d.ts +0 -1
- package/dist/util/runtimeSource.js +3 -5
- package/dist/util/securityConfig.d.ts +0 -1
- package/dist/util/streamConfig.d.ts +0 -1
- package/dist/util/tools.d.ts +0 -1
- package/dist/util/xmlWhitespace.d.ts +0 -1
- package/dist/xsd/primitives.d.ts +0 -1
- package/docs/agent-skill.md +2 -0
- package/docs/api-reference.md +1 -1
- package/docs/checked-gateway.md +210 -0
- package/docs/checked-generation.md +161 -0
- package/docs/cli-reference.md +23 -1
- package/docs/concepts.md +136 -1
- package/docs/configuration.md +5 -1
- package/docs/corpus.md +33 -0
- package/docs/direct-values.md +13 -13
- package/docs/examples/checked-forecast.wsdl +19 -0
- package/docs/gateway-guide.md +1 -1
- package/docs/generated-code.md +10 -5
- package/docs/mapping-contract.md +114 -0
- package/docs/migration-playbook.md +1 -1
- package/docs/output-anatomy.md +1 -1
- package/docs/start-here.md +8 -2
- package/docs/supported-patterns.md +7 -3
- package/docs/testing.md +117 -31
- package/llms.txt +7 -7
- package/package.json +63 -22
- package/src/runtime/checkedGatewayHost.tpl.txt +157 -0
- package/src/runtime/streamXml.ts +1 -1
- package/dist/app/generateApp.d.ts.map +0 -1
- package/dist/cli.d.ts.map +0 -1
- package/dist/client/checkedDirectRuntime.d.ts.map +0 -1
- package/dist/client/directClientRuntime.d.ts.map +0 -1
- package/dist/client/directClientVersion.d.ts.map +0 -1
- package/dist/client/generateClient.d.ts.map +0 -1
- package/dist/client/generateDirectClient.d.ts.map +0 -1
- package/dist/client/generateOperations.d.ts.map +0 -1
- package/dist/client/generateTypes.d.ts.map +0 -1
- package/dist/client/generateUtils.d.ts.map +0 -1
- package/dist/compiler/buildCanonicalGraph.d.ts.map +0 -1
- package/dist/compiler/canonicalGraph.d.ts.map +0 -1
- package/dist/compiler/catalogErrors.d.ts.map +0 -1
- package/dist/compiler/catalogProvenance.d.ts.map +0 -1
- package/dist/compiler/checkedAssessment.d.ts.map +0 -1
- package/dist/compiler/checkedSourcePreparation.d.ts.map +0 -1
- package/dist/compiler/complexTypeContent.d.ts.map +0 -1
- package/dist/compiler/composeCanonicalGraph.d.ts.map +0 -1
- package/dist/compiler/dataOwnership.d.ts.map +0 -1
- package/dist/compiler/datatypeValues.d.ts.map +0 -1
- package/dist/compiler/directCodec.d.ts.map +0 -1
- package/dist/compiler/directExecutionPolicy.d.ts.map +0 -1
- package/dist/compiler/directOperation.d.ts.map +0 -1
- package/dist/compiler/directSoap.d.ts.map +0 -1
- package/dist/compiler/directSoapSource.d.ts.map +0 -1
- package/dist/compiler/directSourceCapsule.d.ts.map +0 -1
- package/dist/compiler/directStructure.d.ts.map +0 -1
- package/dist/compiler/directStructurePlan.d.ts.map +0 -1
- package/dist/compiler/directValues.d.ts.map +0 -1
- package/dist/compiler/finiteRe01Verification.d.ts.map +0 -1
- package/dist/compiler/generateCatalog.d.ts.map +0 -1
- package/dist/compiler/graphTraversal.d.ts.map +0 -1
- package/dist/compiler/hypotheticalScopedIdentity.d.ts.map +0 -1
- package/dist/compiler/occurrenceAnalysis.d.ts.map +0 -1
- package/dist/compiler/originalSourceMembership.d.ts.map +0 -1
- package/dist/compiler/particleAttribution.d.ts.map +0 -1
- package/dist/compiler/particleDeclarationConsistency.d.ts.map +0 -1
- package/dist/compiler/particleExtension.d.ts.map +0 -1
- package/dist/compiler/particleLocalAssessment.d.ts.map +0 -1
- package/dist/compiler/particleRestriction.d.ts.map +0 -1
- package/dist/compiler/particleSemanticView.d.ts.map +0 -1
- package/dist/compiler/particleWildcardRelation.d.ts.map +0 -1
- package/dist/compiler/re01CandidateCorrespondence.d.ts.map +0 -1
- package/dist/compiler/re01TypeProperties.d.ts.map +0 -1
- package/dist/compiler/re01TypePropertyValidation.d.ts.map +0 -1
- package/dist/compiler/resolveCanonicalGraph.d.ts.map +0 -1
- package/dist/compiler/scalarSchemaAssessment.d.ts.map +0 -1
- package/dist/compiler/schemaAttributeGroupProperties.d.ts.map +0 -1
- package/dist/compiler/schemaAttributeProperties.d.ts.map +0 -1
- package/dist/compiler/schemaAttributeUses.d.ts.map +0 -1
- package/dist/compiler/schemaBinaryWordReconstruction.d.ts.map +0 -1
- package/dist/compiler/schemaBuiltinFacets.d.ts.map +0 -1
- package/dist/compiler/schemaCalendarImages.d.ts.map +0 -1
- package/dist/compiler/schemaCalendarLanguage.d.ts.map +0 -1
- package/dist/compiler/schemaCompiler.d.ts.map +0 -1
- package/dist/compiler/schemaComponentEquality.d.ts.map +0 -1
- package/dist/compiler/schemaConstructionAssessment.d.ts.map +0 -1
- package/dist/compiler/schemaDatatypeValues.d.ts.map +0 -1
- package/dist/compiler/schemaDecimalLanguage.d.ts.map +0 -1
- package/dist/compiler/schemaDeclarationPrimitives.d.ts.map +0 -1
- package/dist/compiler/schemaDocumentSyntax.d.ts.map +0 -1
- package/dist/compiler/schemaDurationLanguage.d.ts.map +0 -1
- package/dist/compiler/schemaElementProperties.d.ts.map +0 -1
- package/dist/compiler/schemaEndpointWordCapacity.d.ts.map +0 -1
- package/dist/compiler/schemaExactCalendar.d.ts.map +0 -1
- package/dist/compiler/schemaFacetAnnotation.d.ts.map +0 -1
- package/dist/compiler/schemaGeneratedScalarShape.d.ts.map +0 -1
- package/dist/compiler/schemaIdentityConstraints.d.ts.map +0 -1
- package/dist/compiler/schemaIeeeLanguage.d.ts.map +0 -1
- package/dist/compiler/schemaIntegerImages.d.ts.map +0 -1
- package/dist/compiler/schemaLexicalPredicates.d.ts.map +0 -1
- package/dist/compiler/schemaNotationProperties.d.ts.map +0 -1
- package/dist/compiler/schemaNumericImageConditions.d.ts.map +0 -1
- package/dist/compiler/schemaParticleWildcardProperties.d.ts.map +0 -1
- package/dist/compiler/schemaPattern.d.ts.map +0 -1
- package/dist/compiler/schemaRegularLanguage.d.ts.map +0 -1
- package/dist/compiler/schemaScalarContext.d.ts.map +0 -1
- package/dist/compiler/schemaScalarKernel.d.ts.map +0 -1
- package/dist/compiler/schemaScalarWitnesses.d.ts.map +0 -1
- package/dist/compiler/schemaSimpleTypeProperties.d.ts.map +0 -1
- package/dist/compiler/schemaSourceGrammar.d.ts.map +0 -1
- package/dist/compiler/schemaSourceLexical.d.ts.map +0 -1
- package/dist/compiler/schemaSourceValues.d.ts.map +0 -1
- package/dist/compiler/schemaSourceWildcards.d.ts.map +0 -1
- package/dist/compiler/schemaSymbolicSequences.d.ts.map +0 -1
- package/dist/compiler/schemaSymbolicValueSets.d.ts.map +0 -1
- package/dist/compiler/schemaSyntaxAssessment.d.ts.map +0 -1
- package/dist/compiler/schemaTemporalAliases.d.ts.map +0 -1
- package/dist/compiler/schemaTokenImages.d.ts.map +0 -1
- package/dist/compiler/schemaTypeIdentity.d.ts.map +0 -1
- package/dist/compiler/schemaTypeRelations.d.ts.map +0 -1
- package/dist/compiler/schemaUri.d.ts.map +0 -1
- package/dist/compiler/schemaValueContext.d.ts.map +0 -1
- package/dist/compiler/schemaValueImages.d.ts.map +0 -1
- package/dist/compiler/schemaValueSequences.d.ts.map +0 -1
- package/dist/compiler/semanticBudget.d.ts.map +0 -1
- package/dist/compiler/semanticCatalog.d.ts.map +0 -1
- package/dist/compiler/semanticContext.d.ts.map +0 -1
- package/dist/compiler/semanticTypeDependencies.d.ts.map +0 -1
- package/dist/compiler/semanticTypeReference.d.ts.map +0 -1
- package/dist/compiler/shapeResolver.d.ts.map +0 -1
- package/dist/compiler/sourceSchemaBinding.d.ts.map +0 -1
- package/dist/compiler/structuralCompanions.d.ts.map +0 -1
- package/dist/compiler/validateSemanticGraph.d.ts.map +0 -1
- package/dist/compiler/wildcardAlgebra.d.ts.map +0 -1
- package/dist/config.d.ts.map +0 -1
- package/dist/gateway/generateGateway.d.ts.map +0 -1
- package/dist/gateway/generators.d.ts.map +0 -1
- package/dist/gateway/helpers.d.ts.map +0 -1
- package/dist/generation/preamble.d.ts.map +0 -1
- package/dist/generation/writeGeneratedSource.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/loader/fetch.d.ts.map +0 -1
- package/dist/loader/orderedSyntax.d.ts.map +0 -1
- package/dist/loader/resolutionDepth.d.ts.map +0 -1
- package/dist/loader/schemaInput.d.ts.map +0 -1
- package/dist/loader/schemaResources.d.ts.map +0 -1
- package/dist/loader/wsdlLoader.d.ts.map +0 -1
- package/dist/openapi/casing.d.ts.map +0 -1
- package/dist/openapi/generateOpenAPI.d.ts.map +0 -1
- package/dist/openapi/generatePaths.d.ts.map +0 -1
- package/dist/openapi/generateSchemas.d.ts.map +0 -1
- package/dist/openapi/security.d.ts.map +0 -1
- package/dist/pipeline.d.ts.map +0 -1
- package/dist/runtime/jsonArray.d.ts +0 -24
- package/dist/runtime/jsonArray.d.ts.map +0 -1
- package/dist/runtime/jsonArray.js +0 -52
- package/dist/runtime/ndjson.d.ts +0 -24
- package/dist/runtime/ndjson.d.ts.map +0 -1
- package/dist/runtime/ndjson.js +0 -30
- package/dist/runtime/streamXml.d.ts +0 -45
- package/dist/runtime/streamXml.d.ts.map +0 -1
- package/dist/runtime/streamXml.js +0 -212
- package/dist/test/generateTests.d.ts.map +0 -1
- package/dist/test/generators.d.ts.map +0 -1
- package/dist/test/mockData.d.ts.map +0 -1
- package/dist/util/attributeWildcards.d.ts.map +0 -1
- package/dist/util/builder.d.ts.map +0 -1
- package/dist/util/catalogMeta.d.ts.map +0 -1
- package/dist/util/cli.d.ts.map +0 -1
- package/dist/util/errors.d.ts.map +0 -1
- package/dist/util/imports.d.ts.map +0 -1
- package/dist/util/runtimeSource.d.ts.map +0 -1
- package/dist/util/securityConfig.d.ts.map +0 -1
- package/dist/util/streamConfig.d.ts.map +0 -1
- package/dist/util/tools.d.ts.map +0 -1
- package/dist/util/xmlWhitespace.d.ts.map +0 -1
- package/dist/xsd/primitives.d.ts.map +0 -1
- package/docs/AGENTS.md +0 -47
- package/docs/README.md +0 -69
- package/docs/architecture.md +0 -158
- package/docs/content-model-analysis.md +0 -92
- package/docs/content-model-baseline.md +0 -121
- package/docs/content-model-catalog.md +0 -116
- package/docs/content-model-companions.md +0 -90
- package/docs/content-model-composition.md +0 -103
- package/docs/content-model-decisions.md +0 -79
- package/docs/content-model-gateway-feasibility.md +0 -169
- package/docs/content-model-graph.md +0 -121
- package/docs/content-model-loading.md +0 -163
- package/docs/content-model-matching.md +0 -85
- package/docs/content-model-readiness.md +0 -144
- package/docs/content-model-resolution.md +0 -81
- package/docs/content-model-s02-handoff.md +0 -98
- package/docs/content-model-s06-au-01.md +0 -425
- package/docs/content-model-s06-dt-01.md +0 -386
- package/docs/content-model-s06-pw-01.md +0 -350
- package/docs/content-model-s06-re-01-resolver-implementation.md +0 -869
- package/docs/content-model-s06-re-01-resolver.md +0 -513
- package/docs/content-model-s06-re-01-scalar-witnesses.md +0 -1423
- package/docs/content-model-s06-re-01-support-reconstruction.md +0 -6337
- package/docs/content-model-s06-re-01.md +0 -7477
- package/docs/content-model-s06-research-handoff.md +0 -909
- package/docs/content-model-shipped-fix.md +0 -83
- package/docs/content-model-soap-feasibility.md +0 -165
- package/docs/decisions/001-test-generation.md +0 -36
- package/docs/decisions/002-streamable-responses.md +0 -332
- package/docs/decisions/003-content-model-contracts.md +0 -280
- package/docs/file-naming-and-path-organization.md +0 -213
- package/docs/reference-validation.md +0 -243
- package/docs/releases/README.md +0 -94
- package/docs/releases/v0.20.0.md +0 -22
- package/docs/releases/v0.21.0.md +0 -30
- package/docs/releases/v0.22.0.md +0 -30
- package/docs/releases/v0.23.0.md +0 -31
- package/docs/releases/v0.24.0.md +0 -38
- package/docs/releases/v0.25.0.md +0 -31
- package/docs/releases/v0.25.2.md +0 -32
- package/docs/releases/v0.26.0.md +0 -32
- package/docs/releases/v0.27.0.md +0 -31
- package/docs/releases/v0.28.0.md +0 -32
- package/docs/releases/v0.29.0.md +0 -32
- package/docs/releases/v0.30.0.md +0 -30
- package/docs/releases/v0.30.1.md +0 -31
- package/docs/releases/v0.30.2.md +0 -30
- package/docs/releases/v0.30.3.md +0 -33
- package/docs/releases/v0.31.0.md +0 -33
- package/docs/releases/v0.32.0.md +0 -33
- package/docs/releases/v0.33.0.md +0 -34
- package/docs/releases/v0.34.0.md +0 -30
- package/docs/releases/v0.35.0.md +0 -33
- package/docs/releases/v0.36.0.md +0 -32
- package/docs/releases/v0.37.0.md +0 -33
- package/docs/releases/v0.38.0.md +0 -35
- package/docs/releases/v0.39.0.md +0 -35
- package/docs/releases/v0.40.0.md +0 -45
- package/docs/releases/v0.40.1.md +0 -34
- package/docs/releases/v1.0.0.md +0 -42
- package/docs/releases/v1.0.1.md +0 -38
- package/docs/releases/v1.0.2.md +0 -51
- package/docs/releases/v1.0.3.md +0 -37
- package/docs/releases/v1.0.4.md +0 -45
- package/docs/releases/v1.0.5.md +0 -41
- package/docs/releases/v1.0.6.md +0 -35
- package/docs/releases/v1.0.7.md +0 -36
- package/docs/releases/v1.1.0.md +0 -42
- package/docs/releases/v1.1.1.md +0 -44
- package/docs/releases/v1.1.2.md +0 -42
- package/docs/releases/v1.1.3.md +0 -36
- package/docs/releases/v1.1.4.md +0 -36
- package/docs/releases/v1.1.5.md +0 -38
- package/docs/roadmap/README.md +0 -107
- package/docs/roadmap/v1.0-capability-conformance-framework.md +0 -582
- package/docs/roadmap/v1.0-choice-union-mode.md +0 -90
- package/docs/roadmap/v1.0-contract-audit.md +0 -75
- package/docs/roadmap/v1.0-json-array-streaming.md +0 -101
- package/docs/roadmap/v1.0-openapi-fastify-compatibility.md +0 -99
- package/docs/roadmap/v1.0-release-candidate-gates.md +0 -92
- package/docs/roadmap/v1.0-wsdl-coverage-matrix.md +0 -200
- package/docs/roadmap/v1.0-xs-anyattribute-wildcard-bag.md +0 -932
- package/src/runtime/jsonArray.ts +0 -55
- package/src/runtime/ndjson.ts +0 -32
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
/** Source-owned WS-Policy requirements; recognition never grants transport or message-security admission. */
|
|
2
|
+
import { assertLoadedSchemaInput } from '../loader/schemaInput.js';
|
|
3
|
+
import { syntaxAttribute, syntaxElements, isXmlNCName, WSDL_NAMESPACE } from '../loader/orderedSyntax.js';
|
|
4
|
+
import { normalizeWhitespace } from './datatypeValues.js';
|
|
5
|
+
export const POLICY_12 = 'http://schemas.xmlsoap.org/ws/2004/09/policy';
|
|
6
|
+
export const SECURITY_POLICY_11 = 'http://schemas.xmlsoap.org/ws/2005/07/securitypolicy';
|
|
7
|
+
const WSU = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd';
|
|
8
|
+
const suites = ['Basic256', 'Basic192', 'Basic128', 'TripleDes', 'Basic256Rsa15', 'Basic192Rsa15', 'Basic128Rsa15',
|
|
9
|
+
'TripleDesRsa15', 'Basic256Sha256', 'Basic192Sha256', 'Basic128Sha256', 'TripleDesSha256',
|
|
10
|
+
'Basic256Sha256Rsa15', 'Basic192Sha256Rsa15', 'Basic128Sha256Rsa15', 'TripleDesSha256Rsa15'];
|
|
11
|
+
const layouts = ['Strict', 'Lax', 'LaxTsFirst', 'LaxTsLast'];
|
|
12
|
+
const issued = new WeakMap();
|
|
13
|
+
class Stop extends Error {
|
|
14
|
+
result;
|
|
15
|
+
constructor(result) {
|
|
16
|
+
super(result.rule);
|
|
17
|
+
this.result = result;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
/** Authenticate the exact loaded snapshot; copied reports or source-shaped records confer no policy authority. */
|
|
21
|
+
export function assertWsdlPolicyRequirements(input, value) {
|
|
22
|
+
assertLoadedSchemaInput(input);
|
|
23
|
+
if (issued.get(value) !== input)
|
|
24
|
+
throw new TypeError('Fresh source-bound WSDL policy requirements required');
|
|
25
|
+
}
|
|
26
|
+
/** Interpret a closed single-alternative HTTPS transport-policy fragment and same-document binding references.
|
|
27
|
+
* @remarks Unknown assertions, external/nested references, multiple alternatives/attachments and digest references
|
|
28
|
+
* remain explicit refusals. No policy fetch, endpoint permission, algorithm execution or security-header emission occurs.
|
|
29
|
+
* The July 2005 defaults are Lax layout and no timestamp. Client-certificate omission is outside this qualified fragment.
|
|
30
|
+
* @returns Source-owned requirements or an explicit unsupported/invalid/resource result; enforcement remains false.
|
|
31
|
+
* @throws TypeError For unauthenticated source or foreign binding inspection. Caller cancellation propagates unchanged.
|
|
32
|
+
* @see https://www.w3.org/submissions/WS-Policy/
|
|
33
|
+
* @see https://specs.xmlsoap.org/ws/2005/07/securitypolicy/ws-securitypolicy.pdf
|
|
34
|
+
*/
|
|
35
|
+
export function prepareWsdlPolicyRequirements(input, budget, check) {
|
|
36
|
+
assertLoadedSchemaInput(input);
|
|
37
|
+
return budget.guard(() => {
|
|
38
|
+
const fail = (node, rule, kind = 'unsupported') => {
|
|
39
|
+
budget.chargeWork(64 + rule.length);
|
|
40
|
+
throw new Stop(Object.freeze({ kind, rule, source: node.source }));
|
|
41
|
+
};
|
|
42
|
+
const elements = (node) => {
|
|
43
|
+
check();
|
|
44
|
+
budget.chargeWork(32 + node.children.length * 8 + node.attributes.length * 16);
|
|
45
|
+
for (const child of node.children)
|
|
46
|
+
if (child.kind === 'text' && /[^\t\r\n ]/.test(child.value))
|
|
47
|
+
fail(node, 'policy-text', 'invalid-schema');
|
|
48
|
+
return syntaxElements(node);
|
|
49
|
+
};
|
|
50
|
+
const attrs = (node, allowed = [], id = false) => {
|
|
51
|
+
for (const attribute of node.attributes) {
|
|
52
|
+
check();
|
|
53
|
+
budget.chargeWork(32 + attribute.value.length * 4);
|
|
54
|
+
if (attribute.name.namespace === '' && allowed.includes(attribute.name.local))
|
|
55
|
+
continue;
|
|
56
|
+
if (id && attribute.name.namespace === WSU && attribute.name.local === 'Id')
|
|
57
|
+
continue;
|
|
58
|
+
fail(node, 'policy-attribute');
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
const is = (node, namespace, local) => node.name.namespace === namespace && node.name.local === local;
|
|
62
|
+
// Framework flattening is iterative and refuses choice instead of guessing an alternative.
|
|
63
|
+
const assertions = (policy) => {
|
|
64
|
+
const pending = [policy], result = [];
|
|
65
|
+
while (pending.length) {
|
|
66
|
+
check();
|
|
67
|
+
const node = pending.pop();
|
|
68
|
+
if (node.name.namespace === POLICY_12 && ['Policy', 'All', 'ExactlyOne'].includes(node.name.local)) {
|
|
69
|
+
attrs(node, [], node === policy && node.name.local === 'Policy');
|
|
70
|
+
const children = elements(node);
|
|
71
|
+
if (node.name.local === 'ExactlyOne' && children.length !== 1)
|
|
72
|
+
fail(node, 'policy-alternatives');
|
|
73
|
+
for (let i = children.length - 1; i >= 0; i--) {
|
|
74
|
+
check();
|
|
75
|
+
pending.push(children[i]);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
if (node.name.namespace === POLICY_12)
|
|
80
|
+
fail(node, 'nested-policy-reference-or-operator');
|
|
81
|
+
result.push(node);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return result;
|
|
85
|
+
};
|
|
86
|
+
const nested = (node) => {
|
|
87
|
+
attrs(node);
|
|
88
|
+
const children = elements(node);
|
|
89
|
+
if (children.length !== 1 || !is(children[0], POLICY_12, 'Policy'))
|
|
90
|
+
return fail(node, 'nested-policy-required');
|
|
91
|
+
return assertions(children[0]);
|
|
92
|
+
};
|
|
93
|
+
const leaf = (node) => { attrs(node); if (elements(node).length)
|
|
94
|
+
fail(node, 'policy-leaf-content'); };
|
|
95
|
+
const transport = (node) => {
|
|
96
|
+
const parts = nested(node), byName = new Map();
|
|
97
|
+
for (const part of parts) {
|
|
98
|
+
check();
|
|
99
|
+
if (part.name.namespace !== SECURITY_POLICY_11 || !['TransportToken', 'AlgorithmSuite', 'Layout', 'IncludeTimestamp'].includes(part.name.local))
|
|
100
|
+
fail(part, 'transport-policy-assertion');
|
|
101
|
+
if (byName.has(part.name.local))
|
|
102
|
+
fail(part, 'duplicate-transport-property', 'invalid-schema');
|
|
103
|
+
byName.set(part.name.local, part);
|
|
104
|
+
}
|
|
105
|
+
const token = byName.get('TransportToken'), suite = byName.get('AlgorithmSuite');
|
|
106
|
+
if (!token || !suite)
|
|
107
|
+
return fail(node, 'transport-token-and-algorithm-suite-required', 'invalid-schema');
|
|
108
|
+
const tokens = nested(token);
|
|
109
|
+
if (tokens.length !== 1 || !is(tokens[0], SECURITY_POLICY_11, 'HttpsToken'))
|
|
110
|
+
return fail(token, 'transport-token-kind');
|
|
111
|
+
const https = tokens[0];
|
|
112
|
+
attrs(https, ['RequireClientCertificate']);
|
|
113
|
+
if (elements(https).length)
|
|
114
|
+
fail(https, 'https-token-additional-policy');
|
|
115
|
+
const certificate = syntaxAttribute(https, 'RequireClientCertificate');
|
|
116
|
+
if (certificate === undefined)
|
|
117
|
+
return fail(https, 'https-token-client-certificate-default-unqualified');
|
|
118
|
+
const lexical = normalizeWhitespace(certificate, 'collapse');
|
|
119
|
+
if (!['true', '1', 'false', '0'].includes(lexical))
|
|
120
|
+
fail(https, 'https-token-client-certificate-boolean', 'invalid-schema');
|
|
121
|
+
const algorithms = nested(suite);
|
|
122
|
+
if (algorithms.length !== 1 || algorithms[0].name.namespace !== SECURITY_POLICY_11 || !suites.some(name => name === algorithms[0].name.local))
|
|
123
|
+
return fail(suite, 'algorithm-suite');
|
|
124
|
+
leaf(algorithms[0]);
|
|
125
|
+
let layout = 'Lax';
|
|
126
|
+
const layoutNode = byName.get('Layout');
|
|
127
|
+
if (layoutNode) {
|
|
128
|
+
const selected = nested(layoutNode);
|
|
129
|
+
if (selected.length !== 1 || selected[0].name.namespace !== SECURITY_POLICY_11 || !layouts.some(name => name === selected[0].name.local))
|
|
130
|
+
return fail(layoutNode, 'security-header-layout');
|
|
131
|
+
leaf(selected[0]);
|
|
132
|
+
layout = selected[0].name.local;
|
|
133
|
+
}
|
|
134
|
+
const timestamp = byName.get('IncludeTimestamp');
|
|
135
|
+
if (timestamp)
|
|
136
|
+
leaf(timestamp);
|
|
137
|
+
budget.chargeWork(128);
|
|
138
|
+
return Object.freeze({ kind: 'https-transport', requireClientCertificate: lexical === 'true' || lexical === '1',
|
|
139
|
+
algorithmSuite: algorithms[0].name.local, layout, includeTimestamp: timestamp !== undefined,
|
|
140
|
+
source: node.source, enforced: false });
|
|
141
|
+
};
|
|
142
|
+
try {
|
|
143
|
+
const metadata = new Set(), bindings = new Map();
|
|
144
|
+
const none = Object.freeze({ kind: 'none' });
|
|
145
|
+
for (const document of input.documents) {
|
|
146
|
+
check();
|
|
147
|
+
if (!is(document.root, WSDL_NAMESPACE, 'definitions'))
|
|
148
|
+
continue;
|
|
149
|
+
const ids = new Map(), pending = [document.root];
|
|
150
|
+
while (pending.length) {
|
|
151
|
+
check();
|
|
152
|
+
const node = pending.pop(), lexicalId = syntaxAttribute(node, 'Id', WSU);
|
|
153
|
+
if (lexicalId !== undefined) {
|
|
154
|
+
budget.chargeWork(32 + lexicalId.length * 4);
|
|
155
|
+
const id = normalizeWhitespace(lexicalId, 'collapse');
|
|
156
|
+
if (!isXmlNCName(id) || ids.has(id))
|
|
157
|
+
fail(node, 'policy-id-uniqueness', 'invalid-schema');
|
|
158
|
+
ids.set(id, node);
|
|
159
|
+
}
|
|
160
|
+
for (const child of syntaxElements(node)) {
|
|
161
|
+
check();
|
|
162
|
+
pending.push(child);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
const policies = new Map();
|
|
166
|
+
const parse = (policy) => {
|
|
167
|
+
const cached = policies.get(policy);
|
|
168
|
+
if (cached)
|
|
169
|
+
return cached;
|
|
170
|
+
const leaves = assertions(policy);
|
|
171
|
+
if (leaves.length > 1)
|
|
172
|
+
return fail(policy, 'policy-assertion-combination');
|
|
173
|
+
if (leaves.length && !is(leaves[0], SECURITY_POLICY_11, 'TransportBinding'))
|
|
174
|
+
return fail(leaves[0], 'policy-assertion');
|
|
175
|
+
const result = leaves.length ? transport(leaves[0]) : none;
|
|
176
|
+
policies.set(policy, result);
|
|
177
|
+
return result;
|
|
178
|
+
};
|
|
179
|
+
for (const node of syntaxElements(document.root))
|
|
180
|
+
if (is(node, POLICY_12, 'Policy')) {
|
|
181
|
+
parse(node);
|
|
182
|
+
metadata.add(node);
|
|
183
|
+
}
|
|
184
|
+
for (const binding of syntaxElements(document.root, WSDL_NAMESPACE, 'binding')) {
|
|
185
|
+
const attachments = syntaxElements(binding).filter(node => node.name.namespace === POLICY_12);
|
|
186
|
+
if (attachments.length > 1)
|
|
187
|
+
fail(binding, 'multiple-policy-attachments');
|
|
188
|
+
let result = none;
|
|
189
|
+
for (const attachment of attachments) {
|
|
190
|
+
if (is(attachment, POLICY_12, 'Policy'))
|
|
191
|
+
result = parse(attachment);
|
|
192
|
+
else if (is(attachment, POLICY_12, 'PolicyReference')) {
|
|
193
|
+
attrs(attachment, ['URI']);
|
|
194
|
+
if (elements(attachment).length)
|
|
195
|
+
fail(attachment, 'policy-reference-content');
|
|
196
|
+
const uri = syntaxAttribute(attachment, 'URI');
|
|
197
|
+
if (!uri?.startsWith('#'))
|
|
198
|
+
return fail(attachment, 'external-policy-reference');
|
|
199
|
+
if (new URL(attachment.baseUri).href.split('#')[0] !== new URL(document.uri).href.split('#')[0])
|
|
200
|
+
return fail(attachment, 'external-policy-reference');
|
|
201
|
+
let id;
|
|
202
|
+
try {
|
|
203
|
+
id = decodeURIComponent(uri.slice(1));
|
|
204
|
+
}
|
|
205
|
+
catch {
|
|
206
|
+
return fail(attachment, 'policy-reference-fragment', 'invalid-schema');
|
|
207
|
+
}
|
|
208
|
+
const target = ids.get(id);
|
|
209
|
+
if (!target || !is(target, POLICY_12, 'Policy'))
|
|
210
|
+
return fail(attachment, 'policy-reference-target', 'invalid-schema');
|
|
211
|
+
if (!metadata.has(target))
|
|
212
|
+
return fail(attachment, 'policy-reference-placement');
|
|
213
|
+
result = parse(target);
|
|
214
|
+
}
|
|
215
|
+
else
|
|
216
|
+
return fail(attachment, 'policy-attachment');
|
|
217
|
+
metadata.add(attachment);
|
|
218
|
+
}
|
|
219
|
+
bindings.set(binding, result);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
const owner = Object.freeze({ kind: 'wsdl-policy-requirements', admitted: false,
|
|
223
|
+
isPolicyMetadata(node) { return metadata.has(node); },
|
|
224
|
+
forBinding(binding) {
|
|
225
|
+
const value = bindings.get(binding);
|
|
226
|
+
if (!value)
|
|
227
|
+
throw new TypeError('Original source binding required for policy requirements');
|
|
228
|
+
return value;
|
|
229
|
+
} });
|
|
230
|
+
issued.set(owner, input);
|
|
231
|
+
return owner;
|
|
232
|
+
}
|
|
233
|
+
catch (error) {
|
|
234
|
+
if (error instanceof Stop)
|
|
235
|
+
return error.result;
|
|
236
|
+
throw error;
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
}
|
package/dist/config.d.ts
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ReconstructedComponentSource } from '../compiler/directSourceCapsule.js';
|
|
2
|
+
interface CheckedGatewayOptions {
|
|
3
|
+
/** Internal non-writing preparation; native qualification and lowering still run. */
|
|
4
|
+
readonly emit?: boolean;
|
|
5
|
+
readonly clientDir: string;
|
|
6
|
+
readonly gatewayDir: string;
|
|
7
|
+
readonly openapiFile: string;
|
|
8
|
+
readonly routePath: string;
|
|
9
|
+
readonly signal?: AbortSignal;
|
|
10
|
+
}
|
|
11
|
+
/** Lower component mappings through the existing checked gateway emitter, retaining native supplemental validation. */
|
|
12
|
+
export declare function generateComponentGateway(expected: ReconstructedComponentSource, options: CheckedGatewayOptions): Promise<{
|
|
13
|
+
doc: unknown;
|
|
14
|
+
emit: () => Promise<void>;
|
|
15
|
+
}>;
|
|
16
|
+
/** Compose per-operation checked routers without merging native source, service or binding identities.
|
|
17
|
+
* @returns One OpenAPI document and exact operation-to-route mapping, both descriptions rather than authority.
|
|
18
|
+
* @throws For mixed native handles, invalid/colliding paths, cancellation or filesystem failures.
|
|
19
|
+
*/
|
|
20
|
+
export declare function generateComponentServiceGateway(expected: readonly ReconstructedComponentSource[], options: {
|
|
21
|
+
clientDir: string;
|
|
22
|
+
gatewayDir: string;
|
|
23
|
+
openapiFile: string;
|
|
24
|
+
basePath: string;
|
|
25
|
+
signal?: AbortSignal;
|
|
26
|
+
emit?: boolean;
|
|
27
|
+
}): Promise<{
|
|
28
|
+
doc: unknown;
|
|
29
|
+
routes: Readonly<Record<string, string>>;
|
|
30
|
+
emit: () => Promise<void>;
|
|
31
|
+
}>;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lowers issued direct mappings into HTTP documentation and a checked gateway.
|
|
3
|
+
* @since 1.1.6
|
|
4
|
+
* @constraints Serialized descriptions never issue native source or execution authority.
|
|
5
|
+
*/
|
|
6
|
+
import { mkdir, writeFile } from 'node:fs/promises';
|
|
7
|
+
import path from 'node:path';
|
|
8
|
+
import { componentSourceCapsuleBytes, inspectReconstructedComponentSource, inspectComponentSourceService } from '../compiler/directSourceCapsule.js';
|
|
9
|
+
import { lowerComponentShape } from '../generation/componentShape.js';
|
|
10
|
+
import { checkSemanticBudget } from '../compiler/semanticBudget.js';
|
|
11
|
+
import { inspectDirectOperation } from '../compiler/directOperation.js';
|
|
12
|
+
import { inspectComponentValueMapping } from '../compiler/directValues.js';
|
|
13
|
+
import { composeGeneratedSource, resolvePreamble } from '../generation/preamble.js';
|
|
14
|
+
const draft07 = 'http://json-schema.org/draft-07/schema#';
|
|
15
|
+
/** Lower component mappings through the existing checked gateway emitter, retaining native supplemental validation. */
|
|
16
|
+
export async function generateComponentGateway(expected, options) {
|
|
17
|
+
inspectReconstructedComponentSource(expected);
|
|
18
|
+
return generateGatewayFromReconstruction(expected, options);
|
|
19
|
+
}
|
|
20
|
+
async function generateGatewayFromReconstruction(expected, options) {
|
|
21
|
+
if (options.signal?.aborted)
|
|
22
|
+
throw new Error('Checked gateway generation cancelled');
|
|
23
|
+
inspectReconstructedComponentSource(expected);
|
|
24
|
+
const capsule = { bytes: componentSourceCapsuleBytes(expected, options.signal) };
|
|
25
|
+
const runtime = 'checkedComponentRuntimeV1';
|
|
26
|
+
if (!options.routePath.startsWith('/') || options.routePath.split('/').slice(1)
|
|
27
|
+
.some(segment => !segment || !/^(?:[A-Za-z0-9._~-]|%[0-9A-Fa-f]{2})+$/.test(segment))) {
|
|
28
|
+
throw new TypeError('Checked routePath requires literal nonempty path segments');
|
|
29
|
+
}
|
|
30
|
+
const input = expected.mappings.find(mapping => mapping.direction.kind === 'input');
|
|
31
|
+
const output = expected.mappings.find(mapping => mapping.direction.kind === 'output');
|
|
32
|
+
if (!input || !output)
|
|
33
|
+
throw new TypeError('Issued input and output mappings required');
|
|
34
|
+
const schema = (mapping, role) => {
|
|
35
|
+
const { budget } = inspectDirectOperation(expected.contract).context;
|
|
36
|
+
return lowerComponentShape(expected.contract, mapping, role, () => {
|
|
37
|
+
checkSemanticBudget(budget);
|
|
38
|
+
if (options.signal?.aborted)
|
|
39
|
+
throw new Error('Checked gateway generation cancelled');
|
|
40
|
+
}).schema;
|
|
41
|
+
};
|
|
42
|
+
const request = schema(input, 'Request'), response = schema(output, 'Response');
|
|
43
|
+
const faults = expected.mappings.filter(mapping => mapping.direction.kind === 'fault').map(mapping => {
|
|
44
|
+
if (mapping.direction.kind !== 'fault')
|
|
45
|
+
throw new TypeError('Declared fault mapping required');
|
|
46
|
+
return { name: mapping.direction.name, value: schema(mapping, `Fault_${expected.mappings.filter(item => item.direction.kind === 'fault').indexOf(mapping)}`) };
|
|
47
|
+
});
|
|
48
|
+
const faultVariants = faults.map(fault => ({
|
|
49
|
+
type: 'object', additionalProperties: false, required: ['fault', 'value'],
|
|
50
|
+
properties: {
|
|
51
|
+
value: fault.value,
|
|
52
|
+
fault: {
|
|
53
|
+
type: 'object', additionalProperties: false, required: ['name', 'code', 'string'],
|
|
54
|
+
properties: {
|
|
55
|
+
name: { const: fault.name }, string: { type: 'string' }, actor: { type: 'string' },
|
|
56
|
+
code: { type: 'object', additionalProperties: false, required: ['namespace', 'local'],
|
|
57
|
+
properties: { namespace: { type: 'string' }, local: { type: 'string' } } },
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
}));
|
|
62
|
+
const fault = faultVariants.length ? { oneOf: faultVariants } : { not: {} };
|
|
63
|
+
const schemas = { request: { $schema: draft07, ...request }, response: { $schema: draft07, ...response }, fault: { $schema: draft07, ...fault } };
|
|
64
|
+
const grouped = expected.mappings.some(mapping => mapping.kind === 'component-mapping'
|
|
65
|
+
&& inspectComponentValueMapping(mapping, expected.contract).applicationGroups);
|
|
66
|
+
const components = Object.create(null);
|
|
67
|
+
const documented = (value, dictionary = false) => {
|
|
68
|
+
if (Array.isArray(value))
|
|
69
|
+
return value.map(item => documented(item));
|
|
70
|
+
if (!value || typeof value !== 'object')
|
|
71
|
+
return value;
|
|
72
|
+
const record = value, result = Object.create(null);
|
|
73
|
+
// @why Property names belong to the application; definitions and $id are keywords only at schema nodes.
|
|
74
|
+
if (dictionary) {
|
|
75
|
+
for (const [key, item] of Object.entries(record))
|
|
76
|
+
result[key] = documented(item);
|
|
77
|
+
return result;
|
|
78
|
+
}
|
|
79
|
+
if (Object.hasOwn(record, 'definitions'))
|
|
80
|
+
for (const [key, definition] of Object.entries(record.definitions)) {
|
|
81
|
+
const resolved = documented(definition);
|
|
82
|
+
if (components[key] && JSON.stringify(components[key]) !== JSON.stringify(resolved))
|
|
83
|
+
throw new TypeError(`applicationGroups OpenAPI component collision ${key}`);
|
|
84
|
+
components[key] = resolved;
|
|
85
|
+
}
|
|
86
|
+
for (const [key, item] of Object.entries(record)) {
|
|
87
|
+
if (key === 'definitions' || key === '$id')
|
|
88
|
+
continue;
|
|
89
|
+
result[key] = ['const', 'enum', 'default', 'examples'].includes(key) ? item
|
|
90
|
+
: key === '$ref' && typeof item === 'string' && item.startsWith('#/definitions/') ? item.replace('#/definitions/', '#/components/schemas/')
|
|
91
|
+
: documented(item, ['properties', 'patternProperties', 'dependencies', 'dependentSchemas'].includes(key));
|
|
92
|
+
}
|
|
93
|
+
return result;
|
|
94
|
+
};
|
|
95
|
+
const documentation = grouped ? { request: documented(request), response: documented(response), fault: documented(fault) } : { request, response, fault };
|
|
96
|
+
const doc = {
|
|
97
|
+
openapi: '3.1.1', jsonSchemaDialect: 'https://json-schema.org/draft/2020-12/schema',
|
|
98
|
+
info: { title: expected.selection.service.local, version: '1.0.0' },
|
|
99
|
+
...(grouped ? { components: { schemas: components } } : {}),
|
|
100
|
+
'x-checked-model': { model: 'checked-components-v1', scope: 'native-component-structured-soap11',
|
|
101
|
+
...(expected.responseProjection
|
|
102
|
+
? { responseProjection: { spec: expected.responseProjection.spec, delivery: 'buffered', retainedValue: 'complete-companion-payload' } } : {}),
|
|
103
|
+
documentationDialect: '2020-12', runtimeDialect: 'draft-07', jsonShapeComplete: false,
|
|
104
|
+
supplementalValidation: ['native-source-compatibility', 'native-xml-scalar-and-particle'], admitted: false,
|
|
105
|
+
selection: { selector: expected.contract.selector, ...expected.selection } },
|
|
106
|
+
paths: { [options.routePath]: { post: { operationId: expected.contract.selector.operation,
|
|
107
|
+
...(expected.responseProjection
|
|
108
|
+
? { 'x-response-projection': { spec: expected.responseProjection.spec, delivery: 'buffered', retainedValue: 'complete-companion-payload' } } : {}),
|
|
109
|
+
requestBody: { required: true, content: { 'application/json': { schema: documentation.request } } },
|
|
110
|
+
responses: { '200': { description: 'Independently validated SOAP response', content: { 'application/json': { schema: documentation.response } } },
|
|
111
|
+
'400': { description: 'Invalid HTTP request; no SOAP request is dispatched' },
|
|
112
|
+
'502': { description: 'Declared SOAP fault or refused upstream response', content: { 'application/json': { schema: { oneOf: [documentation.fault,
|
|
113
|
+
{ type: 'object', additionalProperties: false, required: ['kind', 'rule'], properties: { kind: { type: 'string' }, rule: { type: 'string' } } }] } } } },
|
|
114
|
+
'500': { description: 'Incompatible artifacts or gateway configuration' } } } } },
|
|
115
|
+
};
|
|
116
|
+
let clientImport = path.relative(options.gatewayDir, path.join(options.clientDir, 'client.js')).replace(/\\/g, '/');
|
|
117
|
+
if (!clientImport.startsWith('.'))
|
|
118
|
+
clientImport = './' + clientImport;
|
|
119
|
+
const literal = (value) => JSON.stringify(value).replace(/\u2028/g, '\\u2028').replace(/\u2029/g, '\\u2029');
|
|
120
|
+
// language=TypeScript
|
|
121
|
+
const body = `import type {FastifyPluginAsync} from 'fastify';
|
|
122
|
+
import {Ajv} from 'ajv';
|
|
123
|
+
import {types} from 'node:util';
|
|
124
|
+
import {${runtime}} from '@techspokes/typescript-wsdl-client';
|
|
125
|
+
import {createClient, expectedCapsuleBase64, type Options, type Request} from ${literal(clientImport)};
|
|
126
|
+
|
|
127
|
+
export interface CheckedGatewayOptions { readonly clientOptions: Options }
|
|
128
|
+
// @constraints JSON parsing preserves XML names such as __proto__ as ordinary own data properties.
|
|
129
|
+
export const schemas = JSON.parse(${literal(JSON.stringify(schemas))}) as {request: Record<string, unknown>; response: Record<string, unknown>; fault: Record<string, unknown>};
|
|
130
|
+
export const expectedOpenApiJson = ${literal(JSON.stringify(doc))};
|
|
131
|
+
|
|
132
|
+
// @constraints Read only data properties before composing per-request cancellation.
|
|
133
|
+
function dataCopy<T extends object>(value: T): T {
|
|
134
|
+
if (!value || typeof value !== 'object' || types.isProxy(value)
|
|
135
|
+
|| ![Object.prototype, null].includes(Object.getPrototypeOf(value) as object | null)) throw new TypeError('Data-only checked gateway options required');
|
|
136
|
+
const copy: Record<string, unknown> = Object.create(null) as Record<string, unknown>;
|
|
137
|
+
for (const key of Reflect.ownKeys(value)) {
|
|
138
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key)!;
|
|
139
|
+
if (typeof key !== 'string' || !Object.hasOwn(descriptor, 'value')) throw new TypeError('Data-only checked gateway options required');
|
|
140
|
+
copy[key] = descriptor.value;
|
|
141
|
+
}
|
|
142
|
+
return copy as T;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const plugin: FastifyPluginAsync<CheckedGatewayOptions> = async (fastify, options) => {
|
|
146
|
+
if (expectedCapsuleBase64 !== ${literal(Buffer.from(capsule.bytes).toString('base64'))}) throw new Error('incompatible-artifact: generated gateway/client mismatch; regenerate the complete project');
|
|
147
|
+
const client = createClient(${runtime});
|
|
148
|
+
const ajv = new Ajv({coerceTypes: false, useDefaults: false, removeAdditional: false, ownProperties: true, strict: true, allErrors: true});
|
|
149
|
+
const validateRequest = ajv.compile(schemas.request);
|
|
150
|
+
const validateResponse = ajv.compile(schemas.response);
|
|
151
|
+
const validateFault = ajv.compile(schemas.fault);
|
|
152
|
+
const base = dataCopy(options.clientOptions);
|
|
153
|
+
const soap = dataCopy(base.soap);
|
|
154
|
+
fastify.post(${literal(options.routePath)}, {
|
|
155
|
+
schema: {body: schemas.request},
|
|
156
|
+
validatorCompiler: () => validateRequest,
|
|
157
|
+
// @constraints Serialization preserves every validated member and never establishes validity.
|
|
158
|
+
serializerCompiler: () => value => JSON.stringify(value),
|
|
159
|
+
}, async (request, reply) => {
|
|
160
|
+
const controller = new AbortController();
|
|
161
|
+
const disconnected = () => {if (!reply.raw.writableEnded) controller.abort();};
|
|
162
|
+
request.raw.once('aborted', disconnected);
|
|
163
|
+
reply.raw.once('close', disconnected);
|
|
164
|
+
if (request.raw.aborted || reply.raw.destroyed) controller.abort();
|
|
165
|
+
try {
|
|
166
|
+
const signal = soap.signal ? AbortSignal.any([soap.signal, controller.signal]) : controller.signal;
|
|
167
|
+
const result = await client[${literal(expected.contract.selector.operation)}](request.body as Request,
|
|
168
|
+
{...base, soap: {...soap, signal}});
|
|
169
|
+
if (result.kind === 'soap-response') {
|
|
170
|
+
if (!validateResponse(result.value)) return reply.code(502).send({kind: 'value-invalid', rule: 'http-response-shape'});
|
|
171
|
+
return reply.type('application/json').serializer(value => JSON.stringify(value)).send(result.value);
|
|
172
|
+
}
|
|
173
|
+
if (result.kind === 'soap-fault') {
|
|
174
|
+
const fault = {name: result.fault.name, code: {namespace: result.fault.code.namespace, local: result.fault.code.local},
|
|
175
|
+
string: result.fault.string, ...(result.fault.actor === undefined ? {} : {actor: result.fault.actor})};
|
|
176
|
+
const value = {fault, value: result.value};
|
|
177
|
+
if (!validateFault(value)) return reply.code(502).send({kind: 'value-invalid', rule: 'http-fault-shape'});
|
|
178
|
+
return reply.code(502).type('application/json').serializer(value => JSON.stringify(value)).send(value);
|
|
179
|
+
}
|
|
180
|
+
const status = result.kind === 'incompatible-artifact' || result.kind === 'missing-authority' ? 500
|
|
181
|
+
: result.kind === 'cancelled' ? 499 : result.phase === 'input' ? 400 : 502;
|
|
182
|
+
return reply.code(status).send({kind: result.kind, rule: result.rule});
|
|
183
|
+
} finally {
|
|
184
|
+
request.raw.removeListener('aborted', disconnected);
|
|
185
|
+
reply.raw.removeListener('close', disconnected);
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
};
|
|
189
|
+
export default plugin;
|
|
190
|
+
`;
|
|
191
|
+
if (options.signal?.aborted)
|
|
192
|
+
throw new Error('Checked gateway generation cancelled');
|
|
193
|
+
const source = composeGeneratedSource(body, resolvePreamble('gateway'));
|
|
194
|
+
const emit = async () => {
|
|
195
|
+
inspectReconstructedComponentSource(expected);
|
|
196
|
+
checkSemanticBudget(inspectDirectOperation(expected.contract).context.budget);
|
|
197
|
+
if (options.signal?.aborted)
|
|
198
|
+
throw new Error('Checked gateway generation cancelled');
|
|
199
|
+
await mkdir(options.gatewayDir, { recursive: true });
|
|
200
|
+
await mkdir(path.dirname(options.openapiFile), { recursive: true });
|
|
201
|
+
await writeFile(path.join(options.gatewayDir, 'plugin.ts'), source, 'utf8');
|
|
202
|
+
await writeFile(path.join(options.gatewayDir, 'schemas.json'), JSON.stringify(schemas, null, 2) + '\n', 'utf8');
|
|
203
|
+
await writeFile(options.openapiFile, JSON.stringify(doc, null, 2) + '\n', 'utf8');
|
|
204
|
+
};
|
|
205
|
+
if (options.emit !== false)
|
|
206
|
+
await emit();
|
|
207
|
+
return { doc, emit };
|
|
208
|
+
}
|
|
209
|
+
/** Compose per-operation checked routers without merging native source, service or binding identities.
|
|
210
|
+
* @returns One OpenAPI document and exact operation-to-route mapping, both descriptions rather than authority.
|
|
211
|
+
* @throws For mixed native handles, invalid/colliding paths, cancellation or filesystem failures.
|
|
212
|
+
*/
|
|
213
|
+
export async function generateComponentServiceGateway(expected, options) {
|
|
214
|
+
const operations = inspectComponentSourceService(expected), routes = Object.create(null);
|
|
215
|
+
const paths = Object.create(null);
|
|
216
|
+
const documents = [];
|
|
217
|
+
const emissions = [];
|
|
218
|
+
const tick = () => {
|
|
219
|
+
checkSemanticBudget(inspectDirectOperation(operations[0].contract).context.budget);
|
|
220
|
+
if (options.signal?.aborted)
|
|
221
|
+
throw new Error('Checked gateway generation cancelled');
|
|
222
|
+
};
|
|
223
|
+
for (const [index, operation] of operations.entries()) {
|
|
224
|
+
tick();
|
|
225
|
+
const name = operation.contract.selector.operation, routePath = `${options.basePath}/${encodeURIComponent(name)}`;
|
|
226
|
+
const result = await generateComponentGateway(operation, { clientDir: path.join(options.clientDir, 'operations', String(index)),
|
|
227
|
+
gatewayDir: path.join(options.gatewayDir, 'routes', String(index)), openapiFile: path.join(options.gatewayDir, 'routes', String(index), 'openapi.json'), routePath, signal: options.signal, emit: false });
|
|
228
|
+
emissions.push(result.emit);
|
|
229
|
+
const doc = result.doc;
|
|
230
|
+
documents.push(doc);
|
|
231
|
+
routes[name] = routePath;
|
|
232
|
+
for (const [route, value] of Object.entries(doc.paths)) {
|
|
233
|
+
if (Object.hasOwn(paths, route))
|
|
234
|
+
throw new TypeError('Duplicate checked route');
|
|
235
|
+
paths[route] = value;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
const { responseProjection: firstProjection, ...serviceModel } = documents[0]['x-checked-model'];
|
|
239
|
+
void firstProjection;
|
|
240
|
+
const componentSchemas = Object.create(null);
|
|
241
|
+
for (const document of documents) {
|
|
242
|
+
const schemas = document.components?.schemas ?? {};
|
|
243
|
+
for (const [name, schema] of Object.entries(schemas)) {
|
|
244
|
+
if (componentSchemas[name] && JSON.stringify(componentSchemas[name]) !== JSON.stringify(schema))
|
|
245
|
+
throw new TypeError(`applicationGroups OpenAPI component collision ${name}`);
|
|
246
|
+
componentSchemas[name] = schema;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
const doc = { ...documents[0], ...(Object.keys(componentSchemas).length ? { components: { schemas: componentSchemas } } : {}), 'x-checked-model': { ...serviceModel,
|
|
250
|
+
selection: { service: operations[0].selection.service, port: operations[0].selection.port,
|
|
251
|
+
selectors: operations.map(operation => operation.contract.selector) } }, paths };
|
|
252
|
+
let clientImport = path.relative(options.gatewayDir, path.join(options.clientDir, 'client.js')).replaceAll('\\', '/');
|
|
253
|
+
if (!clientImport.startsWith('.'))
|
|
254
|
+
clientImport = './' + clientImport;
|
|
255
|
+
const literal = (value) => JSON.stringify(value).replace(/\u2028/g, '\\u2028').replace(/\u2029/g, '\\u2029');
|
|
256
|
+
const names = operations.map(operation => operation.contract.selector.operation);
|
|
257
|
+
const lines = ["import type {FastifyPluginAsync} from 'fastify';", "import {types} from 'node:util';",
|
|
258
|
+
`import type {Options} from ${literal(clientImport)};`,
|
|
259
|
+
...operations.map((_, index) => `import operation_${index} from './routes/${index}/plugin.js';`),
|
|
260
|
+
'export interface CheckedGatewayOptions {readonly clientOptions: Options; readonly capsules: Readonly<Record<string, Uint8Array>>}',
|
|
261
|
+
`export const expectedOpenApiJson = ${literal(JSON.stringify(doc))};`,
|
|
262
|
+
'function data(value: unknown, allowed: readonly string[]): Record<string, unknown> {',
|
|
263
|
+
" if (!value || typeof value !== 'object' || types.isProxy(value) || ![null, Object.prototype].includes(Object.getPrototypeOf(value) as object | null)) throw new TypeError('Data-only service options required');",
|
|
264
|
+
' const result: Record<string, unknown> = Object.create(null) as Record<string, unknown>;',
|
|
265
|
+
' for (const key of Reflect.ownKeys(value)) {',
|
|
266
|
+
' const descriptor = Object.getOwnPropertyDescriptor(value, key)!;',
|
|
267
|
+
" if (typeof key !== 'string' || !allowed.includes(key) || !Object.hasOwn(descriptor, 'value')) throw new TypeError('Unsupported service option');",
|
|
268
|
+
' result[key] = descriptor.value;', ' }', ' return result;', '}',
|
|
269
|
+
'const plugin: FastifyPluginAsync<CheckedGatewayOptions> = async (fastify, options) => {',
|
|
270
|
+
" const outer = data(options, ['clientOptions', 'capsules', 'prefix']);",
|
|
271
|
+
" const clientOptions = data(outer.clientOptions, ['localSource', 'fileRoots', 'sourceResources', 'sourceOrigins', 'sourceUri', 'namespaceLocations', 'standardLibraries', 'recordSources', 'soap']) as unknown as Options;",
|
|
272
|
+
` const capsules = data(outer.capsules, ${literal(names)});`,
|
|
273
|
+
...operations.map((operation, index) => ` if (!Object.hasOwn(capsules, ${literal(operation.contract.selector.operation)})) throw new TypeError('Missing operation capsule');
|
|
274
|
+
await fastify.register(operation_${index}, {clientOptions: {...clientOptions, capsule: capsules[${literal(operation.contract.selector.operation)}] as Uint8Array}});`),
|
|
275
|
+
'};', 'export default plugin;', '',
|
|
276
|
+
];
|
|
277
|
+
tick();
|
|
278
|
+
const source = composeGeneratedSource(lines.join('\n'), resolvePreamble('gateway'));
|
|
279
|
+
const emit = async () => {
|
|
280
|
+
tick();
|
|
281
|
+
for (const write of emissions) {
|
|
282
|
+
tick();
|
|
283
|
+
await write();
|
|
284
|
+
}
|
|
285
|
+
await mkdir(options.gatewayDir, { recursive: true });
|
|
286
|
+
await mkdir(path.dirname(options.openapiFile), { recursive: true });
|
|
287
|
+
await writeFile(path.join(options.gatewayDir, 'plugin.ts'), source, 'utf8');
|
|
288
|
+
await writeFile(options.openapiFile, JSON.stringify(doc, null, 2) + '\n', 'utf8');
|
|
289
|
+
};
|
|
290
|
+
if (options.emit !== false)
|
|
291
|
+
await emit();
|
|
292
|
+
return { doc, routes: Object.freeze(routes), emit };
|
|
293
|
+
}
|
|
@@ -170,4 +170,3 @@ export declare function emitTypeCheckFixture(outDir: string, clientMeta: ClientM
|
|
|
170
170
|
* @param {any} [catalog] - Compiled catalog for detecting ArrayOf* wrapper types to unwrap
|
|
171
171
|
*/
|
|
172
172
|
export declare function emitRouteFilesWithHandlers(outDir: string, routesDir: string, versionSlug: string, serviceSlug: string, operations: OperationMetadata[], importsMode: "js" | "ts" | "bare", clientMeta: ClientMeta, catalog?: any): void;
|
|
173
|
-
//# sourceMappingURL=generators.d.ts.map
|
|
@@ -256,4 +256,3 @@ export declare function resolveOperationMeta(operationId: string, operationSlug:
|
|
|
256
256
|
* @returns Number of unique schema components reachable via $ref
|
|
257
257
|
*/
|
|
258
258
|
export declare function measureSchemaRefComplexity(startSchemaName: string, allSchemas: Record<string, any>, limit?: number): number;
|
|
259
|
-
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { DirectOperationContract } from '../compiler/directOperation.js';
|
|
2
|
+
type Schema = Record<string, unknown>;
|
|
3
|
+
/** Lower an authenticated mapping to recursive TypeScript and JSON shape descriptions.
|
|
4
|
+
* @remarks Scalar restrictions, fixed/default semantics, ordered occurrence correlation and strict wildcard
|
|
5
|
+
* declaration membership require native validation. These descriptions never grant source/runtime authority.
|
|
6
|
+
* @returns Role-scoped definitions and root descriptions; no native handles or retrieval paths are emitted.
|
|
7
|
+
* @throws TypeError For foreign mappings or unsupported scalar representation. Caller cancellation propagates.
|
|
8
|
+
*/
|
|
9
|
+
export declare function lowerComponentShape(contract: DirectOperationContract, supplied: unknown, role: string, check: () => void): {
|
|
10
|
+
type: string;
|
|
11
|
+
declarations: readonly string[];
|
|
12
|
+
schema: Schema;
|
|
13
|
+
};
|
|
14
|
+
export {};
|