@techspokes/typescript-wsdl-client 1.1.5 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +80 -68
- 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 +268 -0
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +92 -2
- 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 +98 -28
- 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/generateOperations.js +30 -11
- package/dist/client/generateTypes.d.ts +0 -1
- package/dist/client/generateUtils.d.ts +0 -1
- package/dist/client/generateUtils.js +7 -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 +4 -16
- package/dist/compiler/canonicalGraph.js +1 -8
- 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 +112 -0
- package/dist/compiler/componentRecordProjection.js +329 -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/declarationIdentity.d.ts +22 -0
- package/dist/compiler/declarationIdentity.js +9 -0
- package/dist/compiler/directCodec.d.ts +79 -2
- package/dist/compiler/directCodec.js +310 -92
- package/dist/compiler/directExecutionPolicy.d.ts +0 -1
- package/dist/compiler/directOperation.d.ts +72 -8
- package/dist/compiler/directOperation.js +164 -19
- package/dist/compiler/directSoap.d.ts +29 -5
- package/dist/compiler/directSoap.js +154 -44
- 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 +484 -6
- package/dist/compiler/directStructure.d.ts +83 -6
- package/dist/compiler/directStructure.js +353 -58
- package/dist/compiler/directStructurePlan.d.ts +144 -2
- package/dist/compiler/directStructurePlan.js +615 -30
- package/dist/compiler/directValues.d.ts +76 -5
- package/dist/compiler/directValues.js +967 -117
- 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/legacyDeclarations.d.ts +26 -0
- package/dist/compiler/legacyDeclarations.js +144 -0
- 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 +49 -0
- package/dist/compiler/projectionScalar.js +218 -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/rpcStringValues.d.ts +30 -0
- package/dist/compiler/rpcStringValues.js +196 -0
- package/dist/compiler/rpcTypedValues.d.ts +48 -0
- package/dist/compiler/rpcTypedValues.js +190 -0
- 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/schemaCompiler.js +44 -109
- 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 +2 -3
- 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/generateComposedGateway.d.ts +16 -0
- package/dist/gateway/generateComposedGateway.js +65 -0
- package/dist/gateway/generateGateway.d.ts +0 -1
- package/dist/gateway/generateGateway.js +1 -0
- package/dist/gateway/generators.d.ts +0 -1
- package/dist/gateway/generators.js +19 -4
- package/dist/gateway/helpers.d.ts +1 -1
- package/dist/gateway/helpers.js +15 -0
- package/dist/generation/componentShape.d.ts +14 -0
- package/dist/generation/componentShape.js +293 -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 +11 -2
- package/dist/index.js +4 -1
- package/dist/loader/fetch.d.ts +0 -1
- package/dist/loader/orderedSyntax.d.ts +12 -1
- package/dist/loader/orderedSyntax.js +40 -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/multiServicePipeline.d.ts +41 -0
- package/dist/multiServicePipeline.js +287 -0
- package/dist/openapi/casing.d.ts +0 -1
- package/dist/openapi/composeOpenAPI.d.ts +29 -0
- package/dist/openapi/composeOpenAPI.js +322 -0
- 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 +7 -3
- package/dist/pipeline.js +15 -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 +12 -1
- package/docs/api-reference.md +127 -9
- package/docs/checked-gateway.md +212 -0
- package/docs/checked-generation.md +167 -0
- package/docs/cli-reference.md +48 -6
- package/docs/concepts.md +139 -5
- package/docs/configuration.md +15 -4
- 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 +104 -27
- package/docs/generated-code.md +22 -11
- package/docs/mapping-contract.md +114 -0
- package/docs/migration-playbook.md +5 -1
- package/docs/migration.md +124 -6
- package/docs/output-anatomy.md +21 -18
- package/docs/production.md +7 -5
- package/docs/start-here.md +19 -3
- package/docs/supported-patterns.md +24 -3
- package/docs/testing.md +119 -31
- package/docs/troubleshooting.md +3 -1
- package/llms.txt +16 -8
- package/package.json +64 -23
- package/src/runtime/checkedGatewayHost.tpl.txt +157 -0
- package/src/runtime/clientStreamMethods.tpl.txt +156 -148
- package/src/runtime/operationsStreamHelper.tpl.txt +6 -6
- package/src/runtime/streamXml.ts +49 -21
- 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,293 @@
|
|
|
1
|
+
/** Documentation/static shape lowering only; source, scalar facets and particle languages remain native duties. */
|
|
2
|
+
import { inspectDirectOperation } from '../compiler/directOperation.js';
|
|
3
|
+
import { inspectComponentValueMapping } from '../compiler/directValues.js';
|
|
4
|
+
import { projectionScalarRepresentation, inspectOrderedProjectionWildcards, inspectUnassessedProjectionWildcards } from '../compiler/directStructurePlan.js';
|
|
5
|
+
import { createHash } from 'node:crypto';
|
|
6
|
+
import { isComponentRecordProjection, inspectComponentRecordProjection } from '../compiler/componentRecordProjection.js';
|
|
7
|
+
import { applicationRecordName } from '../compiler/applicationGroups.js';
|
|
8
|
+
const literal = (value) => JSON.stringify(value).replace(/\u2028/g, '\\u2028').replace(/\u2029/g, '\\u2029');
|
|
9
|
+
/** Lower an authenticated mapping to recursive TypeScript and JSON shape descriptions.
|
|
10
|
+
* @remarks Scalar restrictions, fixed/default semantics, ordered occurrence correlation and strict wildcard
|
|
11
|
+
* declaration membership require native validation. These descriptions never grant source/runtime authority.
|
|
12
|
+
* @returns Role-scoped definitions and root descriptions; no native handles or retrieval paths are emitted.
|
|
13
|
+
* @throws TypeError For foreign mappings or unsupported scalar representation. Caller cancellation propagates.
|
|
14
|
+
*/
|
|
15
|
+
export function lowerComponentShape(contract, supplied, role, check) {
|
|
16
|
+
if (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(role))
|
|
17
|
+
throw new TypeError('TypeScript role identifier required');
|
|
18
|
+
if (isComponentRecordProjection(supplied)) {
|
|
19
|
+
const owned = inspectComponentRecordProjection(supplied, contract);
|
|
20
|
+
return lowerComponentShape(owned.companion, owned.mapping, role, check);
|
|
21
|
+
}
|
|
22
|
+
const { mapping, projection, applicationGroups, rpcParts } = inspectComponentValueMapping(supplied, contract), { context } = inspectDirectOperation(contract);
|
|
23
|
+
if ('parts' in mapping.root) {
|
|
24
|
+
const properties = Object.create(null);
|
|
25
|
+
const required = [], members = [];
|
|
26
|
+
for (const part of mapping.root.parts) {
|
|
27
|
+
check();
|
|
28
|
+
const plan = rpcParts?.find(plan => plan.name === part.name)?.projection;
|
|
29
|
+
let type = 'string';
|
|
30
|
+
if (plan?.root.kind === 'record') {
|
|
31
|
+
const record = plan.records[0];
|
|
32
|
+
const fields = Object.fromEntries(record.slots.map(slot => [slot.element.name.local, { type: 'boolean' }]));
|
|
33
|
+
properties[part.name] = { type: 'object', properties: fields, required: Object.keys(fields), additionalProperties: false };
|
|
34
|
+
type = `{${record.slots.map(slot => `readonly ${literal(slot.element.name.local)}: boolean`).join('; ')}}`;
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
type = plan?.root.kind === 'scalar' && plan.root.builtin.local === 'boolean' ? 'boolean' : 'string';
|
|
38
|
+
properties[part.name] = { type };
|
|
39
|
+
}
|
|
40
|
+
required.push(part.name);
|
|
41
|
+
members.push(`readonly ${literal(part.name)}: ${type}`);
|
|
42
|
+
}
|
|
43
|
+
return { type: `{${members.join('; ')}}`, declarations: [], schema: { type: 'object', additionalProperties: false, properties, required } };
|
|
44
|
+
}
|
|
45
|
+
if (!projection)
|
|
46
|
+
throw new TypeError('Native document projection required');
|
|
47
|
+
const names = new Map(projection.records.map((record, index) => [record.type.id, applicationGroups
|
|
48
|
+
? applicationRecordName(record.type.id) : `${role}_Record_${index}`]));
|
|
49
|
+
const definitions = Object.create(null);
|
|
50
|
+
const declarations = [];
|
|
51
|
+
const lexicalAttribute = { type: 'object', minProperties: 1, maxProperties: 1, additionalProperties: { anyOf: [
|
|
52
|
+
{ type: 'string' }, { type: 'number' }, { type: 'boolean' }, { type: 'array', items: { anyOf: [{ type: 'string' }, { type: 'number' }, { type: 'boolean' }] } },
|
|
53
|
+
{ type: 'object', additionalProperties: false, required: ['$namespace', '$value'], properties: {
|
|
54
|
+
$namespace: { type: 'string', minLength: 1 }, $value: {}
|
|
55
|
+
} }
|
|
56
|
+
] } };
|
|
57
|
+
const lexicalAttributeType = 'Readonly<Record<string, string | number | boolean | readonly (string | number | boolean)[] | {readonly "$namespace": string; readonly "$value": unknown}>>';
|
|
58
|
+
const openName = applicationGroups ? 'ApplicationOpenValue' : `${role}_OpenValue`;
|
|
59
|
+
let openDeclared = false;
|
|
60
|
+
const openShape = () => {
|
|
61
|
+
if (!openDeclared) {
|
|
62
|
+
openDeclared = true;
|
|
63
|
+
const attribute = { type: 'object', minProperties: 1, maxProperties: 1, additionalProperties: { anyOf: [{ type: 'string' },
|
|
64
|
+
{ type: 'object', additionalProperties: false, required: ['$namespace', '$value'], properties: { $namespace: { type: 'string', minLength: 1 }, $value: { type: 'string' } } }] } };
|
|
65
|
+
definitions[openName] = { type: 'object', additionalProperties: false, required: ['$namespace', '$content'], properties: {
|
|
66
|
+
$namespace: { type: 'string' }, $namespaces: { type: 'object', additionalProperties: { type: 'string' } }, $attributes: { type: 'array', items: attribute },
|
|
67
|
+
$content: { type: 'array', items: { anyOf: [
|
|
68
|
+
{ type: 'object', additionalProperties: false, required: ['$value'], properties: { $value: { type: 'string' } } },
|
|
69
|
+
{ type: 'object', minProperties: 1, maxProperties: 1, additionalProperties: { $ref: '#/definitions/' + openName } },
|
|
70
|
+
] } },
|
|
71
|
+
} };
|
|
72
|
+
declarations.push(`export type ${openName} = {readonly "$namespace": string; readonly "$namespaces"?: Readonly<Record<string, string>>; `
|
|
73
|
+
+ 'readonly "$attributes"?: readonly Readonly<Record<string, string | {readonly "$namespace": string; readonly "$value": string}>>[]; '
|
|
74
|
+
+ `readonly "$content": readonly ({readonly "$value": string} | Readonly<Record<string, ${openName}>>)[]};`);
|
|
75
|
+
}
|
|
76
|
+
return { type: `Readonly<Record<string, ${openName}>>`, schema: { type: 'object', minProperties: 1, maxProperties: 1,
|
|
77
|
+
additionalProperties: { $ref: '#/definitions/' + openName } } };
|
|
78
|
+
};
|
|
79
|
+
const scalar = (value) => {
|
|
80
|
+
check();
|
|
81
|
+
// @why A list-level pattern retains one lexical witness; its HTTP value is a string rather than an item array.
|
|
82
|
+
const item = value.retainLexical ? value : value.list ?? value;
|
|
83
|
+
const type = item.retainLexical ? 'string' : projectionScalarRepresentation(item.builtin);
|
|
84
|
+
if (!type)
|
|
85
|
+
throw new TypeError('Unsupported native scalar representation');
|
|
86
|
+
const schema = type === 'number' ? { type: 'integer', minimum: -2147483648, maximum: 2147483647 }
|
|
87
|
+
: type === 'string' ? { type, pattern: '^[\\u0009\\u000A\\u000D\\u0020-\\uD7FF\\uE000-\\uFFFD\\u{10000}-\\u{10FFFF}]*$' } : { type };
|
|
88
|
+
return value.list && !value.retainLexical ? { type: `readonly ${type}[]`, schema: { type: 'array', items: schema } } : { type, schema };
|
|
89
|
+
};
|
|
90
|
+
const shape = (value) => {
|
|
91
|
+
check();
|
|
92
|
+
const ordinary = (() => {
|
|
93
|
+
if (value.kind === 'scalar')
|
|
94
|
+
return scalar(value);
|
|
95
|
+
const name = names.get(value.type);
|
|
96
|
+
if (!name)
|
|
97
|
+
throw new TypeError('Missing native projection record');
|
|
98
|
+
return { type: name, schema: { $ref: '#/definitions/' + name } };
|
|
99
|
+
})();
|
|
100
|
+
if (!value.nillable || value.constraint?.kind === 'fixed')
|
|
101
|
+
return ordinary;
|
|
102
|
+
const record = value.kind === 'record' ? projection.records.find(record => record.type.id === value.type) : undefined;
|
|
103
|
+
const attributes = record?.attributes ?? [];
|
|
104
|
+
const properties = Object.create(null);
|
|
105
|
+
properties.$nil = { const: true };
|
|
106
|
+
const required = ['$nil'], members = ['readonly "$nil": true'];
|
|
107
|
+
for (const attribute of attributes) {
|
|
108
|
+
if (attribute.bag)
|
|
109
|
+
continue;
|
|
110
|
+
check();
|
|
111
|
+
const key = attribute.declaration.name.local, description = scalar(attribute);
|
|
112
|
+
properties[key] = description.schema;
|
|
113
|
+
if (attribute.required)
|
|
114
|
+
required.push(key);
|
|
115
|
+
members.push(`readonly ${literal(key)}${attribute.required ? '' : '?'}: ${description.type}`);
|
|
116
|
+
}
|
|
117
|
+
const bag = attributeBag(attributes, !!record?.attributeWildcard);
|
|
118
|
+
if (bag) {
|
|
119
|
+
properties.$attributes = bag.schema;
|
|
120
|
+
members.push(`readonly "$attributes"${bag.required ? '' : '?'}: ${bag.type}`);
|
|
121
|
+
if (bag.required)
|
|
122
|
+
required.push('$attributes');
|
|
123
|
+
}
|
|
124
|
+
if (record?.contextual) {
|
|
125
|
+
properties.$namespaces = { type: 'object', additionalProperties: { type: 'string' } };
|
|
126
|
+
members.push('readonly "$namespaces"?: Readonly<Record<string, string>>');
|
|
127
|
+
}
|
|
128
|
+
// @why Nil and ordinary values are disjoint: source data cannot use reserved $nil, and nil has no content fields.
|
|
129
|
+
return { type: `(${ordinary.type} | {${members.join('; ')}})`, schema: { anyOf: [ordinary.schema,
|
|
130
|
+
{ type: 'object', additionalProperties: false, properties, required }] } };
|
|
131
|
+
};
|
|
132
|
+
const attributeBag = (attributes, open = false) => {
|
|
133
|
+
const entries = attributes.filter(attribute => attribute.bag).map(attribute => {
|
|
134
|
+
const key = attribute.declaration.name.local, description = scalar(attribute);
|
|
135
|
+
const ambiguous = !!attribute.declaration.name.namespace && (open || attributes.some(other => other !== attribute && other.declaration.name.local === key));
|
|
136
|
+
const value = ambiguous ? { type: `{readonly "$namespace": ${literal(attribute.declaration.name.namespace)}; readonly "$value": ${description.type}}`,
|
|
137
|
+
schema: { type: 'object', additionalProperties: false, required: ['$namespace', '$value'], properties: {
|
|
138
|
+
$namespace: { const: attribute.declaration.name.namespace }, $value: description.schema
|
|
139
|
+
} } } : description;
|
|
140
|
+
return { type: `{readonly ${literal(key)}: ${value.type}}`, schema: { type: 'object', additionalProperties: false,
|
|
141
|
+
required: [key], properties: { [key]: value.schema } } };
|
|
142
|
+
});
|
|
143
|
+
if (open)
|
|
144
|
+
entries.push({ type: lexicalAttributeType, schema: lexicalAttribute });
|
|
145
|
+
return entries.length ? { type: `readonly (${entries.map(entry => entry.type).join(' | ')})[]`,
|
|
146
|
+
schema: { type: 'array', items: { anyOf: entries.map(entry => entry.schema) } }, required: attributes.some(attribute => attribute.bag && attribute.required) } : undefined;
|
|
147
|
+
};
|
|
148
|
+
const groupObject = (nodes) => {
|
|
149
|
+
const properties = Object.create(null);
|
|
150
|
+
const required = [], members = [];
|
|
151
|
+
const visit = (node) => {
|
|
152
|
+
check();
|
|
153
|
+
if (!node.slot && !node.target) {
|
|
154
|
+
for (const child of node.children)
|
|
155
|
+
visit(child);
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
const key = node.slot?.element.name.local ?? node.target.resolved.propertyName;
|
|
159
|
+
let description;
|
|
160
|
+
if (node.slot)
|
|
161
|
+
description = shape(node.slot.value);
|
|
162
|
+
else {
|
|
163
|
+
const name = node.target.resolved.typeName;
|
|
164
|
+
if (node.alternatives) {
|
|
165
|
+
const alternatives = node.children.map((child, index) => {
|
|
166
|
+
const alternative = node.alternatives[index].resolved.typeName, body = groupObject(child.children);
|
|
167
|
+
definitions[alternative] = body.schema;
|
|
168
|
+
declarations.push(`export type ${alternative} = ${body.type};`);
|
|
169
|
+
return { type: alternative, schema: { $ref: '#/definitions/' + alternative } };
|
|
170
|
+
});
|
|
171
|
+
definitions[name] = { anyOf: alternatives.map(a => a.schema) };
|
|
172
|
+
declarations.push(`export type ${name} = ${alternatives.map(a => a.type).join(' | ')};`);
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
const body = groupObject(node.children);
|
|
176
|
+
definitions[name] = body.schema;
|
|
177
|
+
declarations.push(`export type ${name} = ${body.type};`);
|
|
178
|
+
}
|
|
179
|
+
description = { type: name, schema: { $ref: '#/definitions/' + name } };
|
|
180
|
+
}
|
|
181
|
+
const repeated = node.particle.occurs.max !== '1', mandatory = node.particle.occurs.min !== '0';
|
|
182
|
+
if (repeated)
|
|
183
|
+
description = { type: `readonly (${description.type})[]`, schema: { type: 'array', items: description.schema,
|
|
184
|
+
minItems: Number(node.particle.occurs.min), ...(node.particle.occurs.max === 'unbounded' ? {} : { maxItems: Number(node.particle.occurs.max) }) } };
|
|
185
|
+
properties[key] = description.schema;
|
|
186
|
+
if (mandatory)
|
|
187
|
+
required.push(key);
|
|
188
|
+
members.push(`readonly ${literal(key)}${mandatory ? '' : '?'}: ${description.type}`);
|
|
189
|
+
};
|
|
190
|
+
for (const node of nodes)
|
|
191
|
+
visit(node);
|
|
192
|
+
return { type: `{${members.join('; ')}}`, schema: { type: 'object', properties, required, additionalProperties: false } };
|
|
193
|
+
};
|
|
194
|
+
for (const record of projection.records) {
|
|
195
|
+
check();
|
|
196
|
+
const name = names.get(record.type.id);
|
|
197
|
+
const properties = Object.create(null);
|
|
198
|
+
const required = [], members = [];
|
|
199
|
+
const member = (key, value, mandatory) => {
|
|
200
|
+
check();
|
|
201
|
+
properties[key] = value.schema;
|
|
202
|
+
if (mandatory)
|
|
203
|
+
required.push(key);
|
|
204
|
+
members.push(` readonly ${literal(key)}${mandatory ? '' : '?'}: ${value.type};`);
|
|
205
|
+
};
|
|
206
|
+
for (const attribute of record.attributes)
|
|
207
|
+
if (!attribute.bag)
|
|
208
|
+
member(attribute.declaration.name.local, scalar(attribute), attribute.required);
|
|
209
|
+
const bag = attributeBag(record.attributes, !!record.attributeWildcard);
|
|
210
|
+
if (bag)
|
|
211
|
+
member('$attributes', bag, bag.required);
|
|
212
|
+
if (record.contextual)
|
|
213
|
+
member('$namespaces', { type: 'Readonly<Record<string, string>>', schema: { type: 'object', additionalProperties: { type: 'string' } } }, false);
|
|
214
|
+
if (record.text)
|
|
215
|
+
member('$value', scalar(record.text), true);
|
|
216
|
+
const group = applicationGroups?.records[record.type.id];
|
|
217
|
+
if (group) {
|
|
218
|
+
const description = groupObject(group.children);
|
|
219
|
+
const schema = description.schema;
|
|
220
|
+
Object.assign(properties, schema.properties);
|
|
221
|
+
required.push(...schema.required);
|
|
222
|
+
members.push(description.type.slice(1, -1));
|
|
223
|
+
}
|
|
224
|
+
else if (record.ordered) {
|
|
225
|
+
const variants = new Map();
|
|
226
|
+
for (const slot of record.slots) {
|
|
227
|
+
check();
|
|
228
|
+
const value = shape(slot.value), expanded = slot.element.name, key = literal(expanded);
|
|
229
|
+
if (record.keyed) {
|
|
230
|
+
const ambiguous = !record.fixedOrder && record.slots.some(other => other !== slot && other.element.name.local === expanded.local);
|
|
231
|
+
const scalarValue = slot.value.kind === 'scalar' ? scalar(slot.value) : value;
|
|
232
|
+
const holder = ambiguous ? { type: slot.value.kind === 'scalar'
|
|
233
|
+
? `{readonly "$namespace": ${literal(expanded.namespace)}; readonly "$value": ${scalarValue.type}}`
|
|
234
|
+
: `(${value.type} & {readonly "$namespace": ${literal(expanded.namespace)}})`,
|
|
235
|
+
schema: slot.value.kind === 'scalar' ? { type: 'object', additionalProperties: false, required: ['$namespace', '$value'], properties: {
|
|
236
|
+
$namespace: { const: expanded.namespace }, $value: scalarValue.schema
|
|
237
|
+
} }
|
|
238
|
+
// @why Native validation owns the record's fixed fields; this structural superset must preserve the identity holder.
|
|
239
|
+
: { type: 'object', required: ['$namespace'], properties: { $namespace: { const: expanded.namespace } }, additionalProperties: true } } : value;
|
|
240
|
+
if (ambiguous && slot.value.kind === 'scalar' && slot.value.nillable && slot.value.constraint?.kind !== 'fixed') {
|
|
241
|
+
holder.type = `(${holder.type} | {readonly "$namespace": ${literal(expanded.namespace)}; readonly "$nil": true})`;
|
|
242
|
+
holder.schema = { anyOf: [holder.schema, { type: 'object', additionalProperties: false, required: ['$namespace', '$nil'], properties: {
|
|
243
|
+
$namespace: { const: expanded.namespace }, $nil: { const: true }
|
|
244
|
+
} }] };
|
|
245
|
+
}
|
|
246
|
+
variants.set(key, { type: `{readonly ${literal(expanded.local)}: ${holder.type}}`, schema: {
|
|
247
|
+
type: 'object', additionalProperties: false, required: [expanded.local], properties: { [expanded.local]: holder.schema }
|
|
248
|
+
} });
|
|
249
|
+
continue;
|
|
250
|
+
}
|
|
251
|
+
variants.set(key, { type: `{readonly name: {readonly namespace: ${literal(expanded.namespace)}; readonly local: ${literal(expanded.local)}}; readonly value: ${value.type}}`,
|
|
252
|
+
schema: { type: 'object', additionalProperties: false, required: ['name', 'value'], properties: {
|
|
253
|
+
name: { type: 'object', additionalProperties: false, required: ['namespace', 'local'], properties: { namespace: { const: expanded.namespace }, local: { const: expanded.local } } }, value: value.schema
|
|
254
|
+
} } });
|
|
255
|
+
}
|
|
256
|
+
if (record.content === 'mixed')
|
|
257
|
+
variants.set('$value', { type: '{readonly "$value": string}', schema: {
|
|
258
|
+
type: 'object', additionalProperties: false, required: ['$value'], properties: { $value: { type: 'string' } }
|
|
259
|
+
} });
|
|
260
|
+
if (inspectOrderedProjectionWildcards(context, record))
|
|
261
|
+
variants.set('*', record.keyed ? {
|
|
262
|
+
type: 'Readonly<Record<string, Readonly<{"$namespace": string; [key: string]: unknown}>>>',
|
|
263
|
+
schema: { type: 'object', minProperties: 1, maxProperties: 1, additionalProperties: { type: 'object',
|
|
264
|
+
required: ['$namespace'], properties: { $namespace: { type: 'string' }, $namespaces: { type: 'object', additionalProperties: { type: 'string' } },
|
|
265
|
+
$attributes: { type: 'array', items: lexicalAttribute }, $content: { type: 'array', items: { type: 'object' } }, $value: {} }, additionalProperties: true } },
|
|
266
|
+
} : {
|
|
267
|
+
type: '{readonly name: {readonly namespace: string; readonly local: string}; readonly value: unknown}',
|
|
268
|
+
schema: { type: 'object', additionalProperties: false, required: ['name', 'value'], properties: { name: { type: 'object', additionalProperties: false,
|
|
269
|
+
required: ['namespace', 'local'], properties: { namespace: { type: 'string' }, local: { type: 'string' } } }, value: {} } },
|
|
270
|
+
});
|
|
271
|
+
if (record.keyed && inspectUnassessedProjectionWildcards(context, record))
|
|
272
|
+
variants.set('*', openShape());
|
|
273
|
+
const entries = [...variants.values()];
|
|
274
|
+
member('$content', { type: `readonly (${entries.map(entry => entry.type).join(' | ') || 'never'})[]`,
|
|
275
|
+
schema: { type: 'array', items: entries.length ? { anyOf: entries.map(entry => entry.schema) } : { not: {} } } }, true);
|
|
276
|
+
}
|
|
277
|
+
else
|
|
278
|
+
for (const slot of record.slots) {
|
|
279
|
+
check();
|
|
280
|
+
const value = shape(slot.value), repeated = slot.particle.occurs.max !== '1';
|
|
281
|
+
member(slot.element.name.local, repeated ? { type: slot.particle.occurs.min === '1'
|
|
282
|
+
? `readonly [${value.type}, ...(${value.type})[]]` : `readonly (${value.type})[]`, schema: { type: 'array', items: value.schema,
|
|
283
|
+
minItems: Number(slot.particle.occurs.min) } } : value, repeated || slot.particle.occurs.min === '1');
|
|
284
|
+
}
|
|
285
|
+
declarations.push(`export type ${name} = ${members.length ? '{\n' + members.join('\n') + '\n}' : 'Readonly<Record<string, never>>'};`);
|
|
286
|
+
definitions[name] = { type: 'object', properties, required, additionalProperties: false };
|
|
287
|
+
}
|
|
288
|
+
const root = shape(projection.root);
|
|
289
|
+
const id = 'urn:checked-component:shape:' + createHash('sha256').update(JSON.stringify({ selector: contract.selector, role })).digest('hex');
|
|
290
|
+
// @why Nested identified fault schemas must not expose a root-only $ref that recurses during Ajv resource resolution.
|
|
291
|
+
const rootSchema = root.schema.$ref ? { allOf: [root.schema] } : root.schema;
|
|
292
|
+
return { type: root.type, declarations, schema: { $id: id, ...rootSchema, definitions } };
|
|
293
|
+
}
|
|
@@ -14,4 +14,3 @@ export declare const resolvePreamble: (artifact: string) => string;
|
|
|
14
14
|
* @constraints Embedded fragments must not pass through this composer separately.
|
|
15
15
|
*/
|
|
16
16
|
export declare function composeGeneratedSource(body: string, preamble: string): string;
|
|
17
|
-
//# sourceMappingURL=preamble.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Physical layout checks only; source interpretation and eligibility remain native responsibilities. */
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import type { SchemaInput } from '../loader/schemaInput.js';
|
|
4
|
+
/** Find a finite common directory using complete parent segments, including valid names beginning with two dots.
|
|
5
|
+
* @throws Error For cross-volume inputs, cancellation or an impossible ancestor search.
|
|
6
|
+
*/
|
|
7
|
+
export declare function commonSourceDirectory(root: string, files: readonly string[], check: () => void, paths?: Pick<typeof path, 'dirname' | 'parse' | 'relative' | 'isAbsolute' | 'sep'>): string;
|
|
8
|
+
/** Refuse local retrieval aliases that cannot be copied as a relocatable physical tree.
|
|
9
|
+
* @remarks HTTP aliases use generated offline URI records. Local symlink aliases remain unsupported;
|
|
10
|
+
* this scaffold does not invent filesystem links or rewrite original source bytes.
|
|
11
|
+
* @throws TypeError For unowned source input. Error For a nonrelocatable authenticated dependency or cancellation.
|
|
12
|
+
*/
|
|
13
|
+
export declare function assertCanonicalSourceLayout(input: SchemaInput, check: () => void): void;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/** Physical layout checks only; source interpretation and eligibility remain native responsibilities. */
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { assertLoadedSchemaInput } from '../loader/schemaInput.js';
|
|
4
|
+
/** Find a finite common directory using complete parent segments, including valid names beginning with two dots.
|
|
5
|
+
* @throws Error For cross-volume inputs, cancellation or an impossible ancestor search.
|
|
6
|
+
*/
|
|
7
|
+
export function commonSourceDirectory(root, files, check, paths = path) {
|
|
8
|
+
let common = paths.dirname(root);
|
|
9
|
+
for (const file of files) {
|
|
10
|
+
check();
|
|
11
|
+
if (paths.parse(file).root.toLowerCase() !== paths.parse(common).root.toLowerCase())
|
|
12
|
+
throw new Error('Cross-volume source relocation requires explicit consumer source configuration');
|
|
13
|
+
for (;;) {
|
|
14
|
+
check();
|
|
15
|
+
const relative = paths.relative(common, file);
|
|
16
|
+
if (relative !== '..' && !relative.startsWith('..' + paths.sep) && !paths.isAbsolute(relative))
|
|
17
|
+
break;
|
|
18
|
+
const parent = paths.dirname(common);
|
|
19
|
+
if (parent === common)
|
|
20
|
+
throw new Error('Unable to find common source directory');
|
|
21
|
+
common = parent;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return common;
|
|
25
|
+
}
|
|
26
|
+
/** Refuse local retrieval aliases that cannot be copied as a relocatable physical tree.
|
|
27
|
+
* @remarks HTTP aliases use generated offline URI records. Local symlink aliases remain unsupported;
|
|
28
|
+
* this scaffold does not invent filesystem links or rewrite original source bytes.
|
|
29
|
+
* @throws TypeError For unowned source input. Error For a nonrelocatable authenticated dependency or cancellation.
|
|
30
|
+
*/
|
|
31
|
+
export function assertCanonicalSourceLayout(input, check) {
|
|
32
|
+
assertLoadedSchemaInput(input);
|
|
33
|
+
const schemas = new Map(input.schemas.map(schema => [schema.key, schema.documentUri]));
|
|
34
|
+
for (const edge of input.edges) {
|
|
35
|
+
check();
|
|
36
|
+
if (edge.to && edge.referenceUri && new URL(edge.referenceUri).protocol === 'file:' && edge.referenceUri !== (schemas.get(edge.to) ?? edge.to)) {
|
|
37
|
+
throw new Error('Source relocation refuses import retrieval aliases; supply canonical source references or independently configured runtime inputs');
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,9 +4,18 @@ export { generateGateway } from "./gateway/generateGateway.js";
|
|
|
4
4
|
export { buildSecurity, loadSecurityConfigFile, parseSecurityConfig, SecurityConfigError, type SecurityConfig, } from "./util/securityConfig.js";
|
|
5
5
|
export { generateTests } from "./test/generateTests.js";
|
|
6
6
|
export { runGenerationPipeline } from "./pipeline.js";
|
|
7
|
+
export type { PipelineOptions } from './pipeline.js';
|
|
8
|
+
export { runMultiServicePipeline, loadMultiServiceConfig } from './multiServicePipeline.js';
|
|
9
|
+
export type { MultiServicePipelineOptions, MultiServicePipelineResult, MultiServiceEntry } from './multiServicePipeline.js';
|
|
10
|
+
export { composeOpenApiDocuments } from './openapi/composeOpenAPI.js';
|
|
11
|
+
export type { ComposedOpenApiDocument, OpenApiCompositionEntry, OpenApiCompositionOptions } from './openapi/composeOpenAPI.js';
|
|
12
|
+
export type { CheckedComponentOptions, CheckedInventory } from './checkedPipeline.js';
|
|
13
|
+
export { planCheckedComponents, formatCheckedComponentPlan, writeCheckedPlanningFile, CheckedPlanningError } from './checkedPlanning.js';
|
|
14
|
+
export type { CheckedComponentPlan, ComponentPlanBlocker } from './checkedPlanning.js';
|
|
15
|
+
export type { ComponentRecordProjectionSpec, ComponentRecordProjectionAssociation } from './compiler/componentRecordProjection.js';
|
|
7
16
|
export { loadStreamConfigFile, parseStreamConfig, StreamConfigError, type OperationStreamMetadata, type ShapeCatalogRef, type StreamConfig, } from "./util/streamConfig.js";
|
|
8
17
|
export { applyShapeCatalogs, type ApplyShapeCatalogsOptions } from "./compiler/shapeResolver.js";
|
|
9
|
-
export { checkedDirectRuntimeV1 } from './client/checkedDirectRuntime.js';
|
|
18
|
+
export { checkedDirectRuntimeV1, checkedComponentRuntimeV1 } from './client/checkedDirectRuntime.js';
|
|
10
19
|
/**
|
|
11
20
|
* Compiles a WSDL file to TypeScript client code
|
|
12
21
|
*
|
|
@@ -37,5 +46,5 @@ export declare function compileWsdlToProject(input: {
|
|
|
37
46
|
streamConfig?: import("./util/streamConfig.js").StreamConfig;
|
|
38
47
|
}): Promise<void>;
|
|
39
48
|
export { assessSchemaSource, serializeAssessmentReport, parseAssessmentReport, assessmentExitCode, ASSESSMENT_VERSION, ASSESSMENT_BASIS } from './compiler/checkedAssessment.js';
|
|
49
|
+
export type { ApplicationGroupsOptions, ApplicationGroupName } from './compiler/applicationGroups.js';
|
|
40
50
|
export type { CheckedAssessmentReport, AssessmentObligation, AssessedOperation, AssessmentStatus } from './compiler/checkedAssessment.js';
|
|
41
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -27,9 +27,12 @@ export { generateGateway } from "./gateway/generateGateway.js";
|
|
|
27
27
|
export { buildSecurity, loadSecurityConfigFile, parseSecurityConfig, SecurityConfigError, } from "./util/securityConfig.js";
|
|
28
28
|
export { generateTests } from "./test/generateTests.js";
|
|
29
29
|
export { runGenerationPipeline } from "./pipeline.js";
|
|
30
|
+
export { runMultiServicePipeline, loadMultiServiceConfig } from './multiServicePipeline.js';
|
|
31
|
+
export { composeOpenApiDocuments } from './openapi/composeOpenAPI.js';
|
|
32
|
+
export { planCheckedComponents, formatCheckedComponentPlan, writeCheckedPlanningFile, CheckedPlanningError } from './checkedPlanning.js';
|
|
30
33
|
export { loadStreamConfigFile, parseStreamConfig, StreamConfigError, } from "./util/streamConfig.js";
|
|
31
34
|
export { applyShapeCatalogs } from "./compiler/shapeResolver.js";
|
|
32
|
-
export { checkedDirectRuntimeV1 } from './client/checkedDirectRuntime.js';
|
|
35
|
+
export { checkedDirectRuntimeV1, checkedComponentRuntimeV1 } from './client/checkedDirectRuntime.js';
|
|
33
36
|
// noinspection JSUnusedGlobalSymbols
|
|
34
37
|
/**
|
|
35
38
|
* Compiles a WSDL file to TypeScript client code
|
package/dist/loader/fetch.d.ts
CHANGED
|
@@ -62,8 +62,20 @@ export declare const isXmlNCName: (value: string) => boolean;
|
|
|
62
62
|
export declare const isXmlName: (value: string) => boolean;
|
|
63
63
|
export declare const isXmlNmtoken: (value: string) => boolean;
|
|
64
64
|
export declare function resolveLexicalQName(lexical: string, node: SyntaxElement): ExpandedName;
|
|
65
|
+
/** Decode private metadata text; original bytes remain the digest and snapshot authority.
|
|
66
|
+
* @remarks ISO-8859-1 maps every byte to the same code point, including C1 controls.
|
|
67
|
+
* HTTP charset headers are not encoding authority here. Runtime XML uses its existing policy.
|
|
68
|
+
* @throws SchemaLoadingError For malformed bytes or incompatible/unsupported declarations.
|
|
69
|
+
*/
|
|
70
|
+
export declare function decodeMetadataXml(bytes: Uint8Array): string;
|
|
65
71
|
/** Positions are one-based lines/columns and zero-based UTF-16 offsets in decoded XML. */
|
|
66
72
|
export interface OrderedSyntaxOptions {
|
|
73
|
+
/** Explicit component SOAP response policy; source and shipped direct decoding remain separate. */
|
|
74
|
+
componentResponseEncoding?: {
|
|
75
|
+
charset?: string;
|
|
76
|
+
};
|
|
77
|
+
/** Internal metadata boundary; payload/capsule callers retain the existing encoding policy. */
|
|
78
|
+
metadataEncoding?: boolean;
|
|
67
79
|
maxDepth?: number;
|
|
68
80
|
/** Optional bounded runtime boundary; legacy schema callers retain their policy. */
|
|
69
81
|
maxBytes?: number;
|
|
@@ -74,4 +86,3 @@ export interface OrderedSyntaxOptions {
|
|
|
74
86
|
reserveNode?: () => void;
|
|
75
87
|
}
|
|
76
88
|
export declare function parseOrderedSyntax(bytes: Uint8Array, uri: string, options?: OrderedSyntaxOptions): SyntaxDocument;
|
|
77
|
-
//# sourceMappingURL=orderedSyntax.d.ts.map
|
|
@@ -46,15 +46,49 @@ export function resolveLexicalQName(lexical, node) {
|
|
|
46
46
|
throw new SchemaLoadingError("invalid-schema", "Unbound QName prefix", node.source);
|
|
47
47
|
return Object.freeze({ namespace: namespace ?? "", local: parts.at(-1) });
|
|
48
48
|
}
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
const xmlEncodingDeclaration = /^<\?xml\s[^?]*encoding\s*=\s*["']([^"']+)["']/i;
|
|
50
|
+
/** Decode private metadata text; original bytes remain the digest and snapshot authority.
|
|
51
|
+
* @remarks ISO-8859-1 maps every byte to the same code point, including C1 controls.
|
|
52
|
+
* HTTP charset headers are not encoding authority here. Runtime XML uses its existing policy.
|
|
53
|
+
* @throws SchemaLoadingError For malformed bytes or incompatible/unsupported declarations.
|
|
54
|
+
*/
|
|
55
|
+
export function decodeMetadataXml(bytes) {
|
|
56
|
+
return decodeXml(bytes, true, true);
|
|
57
|
+
}
|
|
58
|
+
function decodeXml(bytes, strictBom = false, metadata = false, response) {
|
|
59
|
+
let encoding = bytes[0] === 0xff && bytes[1] === 0xfe ? "utf-16le"
|
|
51
60
|
: bytes[0] === 0xfe && bytes[1] === 0xff ? "utf-16be" : "utf-8";
|
|
52
61
|
try {
|
|
53
|
-
const
|
|
62
|
+
const buffer = Buffer.from(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
63
|
+
// @why Sniff only an ASCII declaration, never guess Latin1 after UTF-8 failure.
|
|
64
|
+
// A BOM fixes the encoding and must agree with the decoded declaration.
|
|
65
|
+
const bom = encoding !== 'utf-8' || bytes[0] === 0xef && bytes[1] === 0xbb && bytes[2] === 0xbf;
|
|
66
|
+
const canonical = (label) => label.toLowerCase() === 'utf8' ? 'utf-8' : label.toLowerCase();
|
|
67
|
+
const agrees = (label) => canonical(label) === encoding || canonical(label) === 'utf-16' && encoding.startsWith('utf-16');
|
|
68
|
+
if ((metadata || response) && !bom) {
|
|
69
|
+
const end = buffer.indexOf('>');
|
|
70
|
+
const declaration = xmlEncodingDeclaration.exec(buffer.toString('latin1', 0, end < 0 ? 0 : end + 1))?.[1].toLowerCase();
|
|
71
|
+
if (response) {
|
|
72
|
+
const asserted = response.charset ?? declaration;
|
|
73
|
+
if (asserted) {
|
|
74
|
+
const selected = canonical(asserted);
|
|
75
|
+
if (!['utf-8', 'iso-8859-1'].includes(selected))
|
|
76
|
+
throw new SchemaLoadingError('unsupported-capability', 'Unsupported XML byte encoding');
|
|
77
|
+
encoding = selected;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
else if (declaration === 'iso-8859-1')
|
|
81
|
+
encoding = 'iso-8859-1';
|
|
82
|
+
}
|
|
83
|
+
if (response?.charset && !agrees(response.charset))
|
|
84
|
+
throw new SchemaLoadingError('unsupported-capability', 'HTTP charset disagrees with XML bytes');
|
|
85
|
+
// TextDecoder's ISO label aliases Windows-1252; Buffer supplies actual ISO byte identity.
|
|
86
|
+
const text = encoding === 'iso-8859-1' ? buffer.toString('latin1') : new TextDecoder(encoding, { fatal: true }).decode(bytes);
|
|
54
87
|
if (strictBom && text.startsWith('\ufeff'))
|
|
55
88
|
throw new SchemaLoadingError('invalid-schema', 'Multiple XML byte order marks');
|
|
56
|
-
const declared =
|
|
57
|
-
|
|
89
|
+
const declared = xmlEncodingDeclaration.exec(text)?.[1].toLowerCase();
|
|
90
|
+
const allowed = encoding === 'iso-8859-1' ? [encoding] : encoding === 'utf-8' ? ['utf-8', 'utf8'] : ['utf-16', encoding];
|
|
91
|
+
if (declared && !allowed.includes(declared)) {
|
|
58
92
|
throw new SchemaLoadingError("unsupported-capability", "Unsupported XML byte encoding");
|
|
59
93
|
}
|
|
60
94
|
return text;
|
|
@@ -87,7 +121,7 @@ export function parseOrderedSyntax(bytes, uri, options = {}) {
|
|
|
87
121
|
const charge = (amount) => options.chargeWork?.(amount);
|
|
88
122
|
charge(4096 + bytes.byteLength * 64);
|
|
89
123
|
const digest = createHash("sha256").update(bytes).digest("hex");
|
|
90
|
-
const text = decodeXml(bytes, options.xml10Only);
|
|
124
|
+
const text = options.metadataEncoding ? decodeMetadataXml(bytes) : decodeXml(bytes, options.xml10Only, false, options.componentResponseEncoding);
|
|
91
125
|
const lines = [0];
|
|
92
126
|
for (let i = 0; i < text.length; i++) {
|
|
93
127
|
if (text[i] === "\r") {
|
|
@@ -26,6 +26,7 @@ export type SchemaInput = Readonly<{
|
|
|
26
26
|
documents: readonly SyntaxDocument[];
|
|
27
27
|
schemas: readonly SchemaInterpretation[];
|
|
28
28
|
resources: readonly ResourceMetadata[];
|
|
29
|
+
resourceAliases: ReadonlyMap<string, string>;
|
|
29
30
|
edges: readonly ResolutionEdge[];
|
|
30
31
|
limits: LoadingLimits;
|
|
31
32
|
metrics: Readonly<{
|
|
@@ -39,15 +40,41 @@ export declare function copyOriginalSchemaResource(input: SchemaInput, uri: stri
|
|
|
39
40
|
export declare function assertLoadedSchemaInput(input: SchemaInput): void;
|
|
40
41
|
export declare function schemaInterpretationKey(node: SyntaxElement, targetNamespace: string, context: SchemaContext): string;
|
|
41
42
|
export type SchemaInputOptions = {
|
|
43
|
+
/** Generated logical root for independently authorized physical snapshots; confers no I/O authority. */
|
|
44
|
+
sourceUri?: string;
|
|
45
|
+
/** Diagnostic observation only; partial documents never establish loading completeness or eligibility. */
|
|
46
|
+
onDocument?: (document: SyntaxDocument) => void;
|
|
42
47
|
signal?: AbortSignal;
|
|
43
48
|
/** Optional request accounting used by the additive assessment boundary. */
|
|
44
49
|
chargeWork?: (amount: number) => void;
|
|
45
50
|
policy: SchemaResourcePolicy;
|
|
46
51
|
limits?: Partial<LoadingLimits>;
|
|
47
52
|
offlineResources?: ReadonlyMap<string, OfflineSchemaResource>;
|
|
53
|
+
/**
|
|
54
|
+
* Explicit resource locations for XSD imports without schemaLocation.
|
|
55
|
+
* @remarks Keys are exact namespace names (including the empty namespace).
|
|
56
|
+
* Locations resolve against the caller's working directory, never the importing
|
|
57
|
+
* document. Explicit schemaLocation attributes take precedence. Resource policy,
|
|
58
|
+
* digests, namespace matching and loading limits still apply; no namespace is fetched implicitly.
|
|
59
|
+
* @see https://www.w3.org/TR/2004/REC-xmlschema-1-20041028/#composition-schemaImport
|
|
60
|
+
*/
|
|
61
|
+
namespaceLocations?: ReadonlyMap<string, string>;
|
|
48
62
|
};
|
|
63
|
+
/** Prepare a closed input set from independently authorized physical metadata snapshots.
|
|
64
|
+
* @remarks Logical import URIs never initiate I/O here. The later native loader still checks their explicit origin/root
|
|
65
|
+
* permissions. Missing snapshots refuse rather than falling back to network or to artifact-embedded bytes.
|
|
66
|
+
* @returns The actual physical root URI and complete offline loading configuration.
|
|
67
|
+
* @throws SchemaLoadingError For non-file physical inputs, duplicates, denied roots or unavailable files.
|
|
68
|
+
*/
|
|
69
|
+
export declare function prepareSchemaSnapshotFiles(root: string, files: readonly {
|
|
70
|
+
readonly uri: string;
|
|
71
|
+
readonly file: string;
|
|
72
|
+
readonly canonicalUri?: string;
|
|
73
|
+
}[], options: Omit<SchemaInputOptions, 'offlineResources'>): Promise<{
|
|
74
|
+
source: string;
|
|
75
|
+
loading: SchemaInputOptions;
|
|
76
|
+
}>;
|
|
49
77
|
/** A fresh compilation-scoped snapshot, with no implicit network or filesystem permission. */
|
|
50
78
|
export declare function loadSchemaInput(source: string, options: SchemaInputOptions): Promise<SchemaInput>;
|
|
51
79
|
/** Internal faithful source entry; preserves syntax and the legacy public entry. */
|
|
52
80
|
export declare function loadSemanticSchemaInput(source: string, options: SchemaInputOptions): Promise<SchemaInput>;
|
|
53
|
-
//# sourceMappingURL=schemaInput.d.ts.map
|