@techspokes/typescript-wsdl-client 1.1.4 → 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 +81 -35
- package/dist/app/generateApp.d.ts +0 -1
- package/dist/app/generateApp.js +8 -6
- 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 +123 -5
- package/dist/client/checkedDirectRuntime.d.ts +96 -0
- package/dist/client/checkedDirectRuntime.js +43 -0
- package/dist/client/directClientRuntime.d.ts +74 -0
- package/dist/client/directClientRuntime.js +165 -0
- package/dist/client/directClientVersion.d.ts +6 -0
- package/dist/client/directClientVersion.js +6 -0
- package/dist/client/generateClient.d.ts +0 -1
- package/dist/client/generateClient.js +26 -12
- package/dist/client/generateDirectClient.d.ts +32 -0
- package/dist/client/generateDirectClient.js +268 -0
- 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 +6 -0
- package/dist/compiler/buildCanonicalGraph.js +381 -0
- package/dist/compiler/canonicalGraph.d.ts +197 -0
- package/dist/compiler/canonicalGraph.js +37 -0
- package/dist/compiler/catalogErrors.d.ts +17 -0
- package/dist/compiler/catalogErrors.js +86 -0
- package/dist/compiler/catalogProvenance.d.ts +14 -0
- package/dist/compiler/catalogProvenance.js +229 -0
- package/dist/compiler/checkedAssessment.d.ts +90 -0
- package/dist/compiler/checkedAssessment.js +300 -0
- package/dist/compiler/checkedComponentSource.d.ts +16 -0
- package/dist/compiler/checkedComponentSource.js +31 -0
- package/dist/compiler/checkedSourcePreparation.d.ts +72 -0
- package/dist/compiler/checkedSourcePreparation.js +202 -0
- package/dist/compiler/complexTypeContent.d.ts +58 -0
- package/dist/compiler/complexTypeContent.js +558 -0
- 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 +68 -0
- package/dist/compiler/composeCanonicalGraph.js +252 -0
- package/dist/compiler/dataOwnership.d.ts +21 -0
- package/dist/compiler/dataOwnership.js +167 -0
- package/dist/compiler/datatypeValues.d.ts +46 -0
- package/dist/compiler/datatypeValues.js +275 -0
- package/dist/compiler/directCodec.d.ts +116 -0
- package/dist/compiler/directCodec.js +377 -0
- package/dist/compiler/directExecutionPolicy.d.ts +9 -0
- package/dist/compiler/directExecutionPolicy.js +17 -0
- package/dist/compiler/directOperation.d.ts +114 -0
- package/dist/compiler/directOperation.js +373 -0
- package/dist/compiler/directSoap.d.ts +66 -0
- package/dist/compiler/directSoap.js +391 -0
- package/dist/compiler/directSoapSource.d.ts +38 -0
- package/dist/compiler/directSoapSource.js +233 -0
- package/dist/compiler/directSourceCapsule.d.ts +169 -0
- package/dist/compiler/directSourceCapsule.js +727 -0
- package/dist/compiler/directStructure.d.ts +128 -0
- package/dist/compiler/directStructure.js +543 -0
- package/dist/compiler/directStructurePlan.d.ts +149 -0
- package/dist/compiler/directStructurePlan.js +623 -0
- package/dist/compiler/directValues.d.ts +128 -0
- package/dist/compiler/directValues.js +1116 -0
- package/dist/compiler/finiteRe01Construction.d.ts +69 -0
- package/dist/compiler/finiteRe01Construction.js +422 -0
- package/dist/compiler/finiteRe01Verification.d.ts +218 -0
- package/dist/compiler/finiteRe01Verification.js +1217 -0
- package/dist/compiler/generateCatalog.d.ts +0 -1
- package/dist/compiler/graphTraversal.d.ts +10 -0
- package/dist/compiler/graphTraversal.js +37 -0
- package/dist/compiler/hypotheticalScopedIdentity.d.ts +22 -0
- package/dist/compiler/hypotheticalScopedIdentity.js +81 -0
- package/dist/compiler/occurrenceAnalysis.d.ts +66 -0
- package/dist/compiler/occurrenceAnalysis.js +316 -0
- package/dist/compiler/originalSourceMembership.d.ts +5 -0
- package/dist/compiler/originalSourceMembership.js +31 -0
- package/dist/compiler/particleAttribution.d.ts +16 -0
- package/dist/compiler/particleAttribution.js +494 -0
- package/dist/compiler/particleDeclarationConsistency.d.ts +23 -0
- package/dist/compiler/particleDeclarationConsistency.js +206 -0
- package/dist/compiler/particleExtension.d.ts +21 -0
- package/dist/compiler/particleExtension.js +123 -0
- package/dist/compiler/particleLocalAssessment.d.ts +19 -0
- package/dist/compiler/particleLocalAssessment.js +92 -0
- package/dist/compiler/particleRestriction.d.ts +23 -0
- package/dist/compiler/particleRestriction.js +494 -0
- package/dist/compiler/particleSemanticView.d.ts +51 -0
- package/dist/compiler/particleSemanticView.js +310 -0
- package/dist/compiler/particleWildcardRelation.d.ts +87 -0
- package/dist/compiler/particleWildcardRelation.js +143 -0
- 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 +85 -0
- package/dist/compiler/re01CandidateCorrespondence.js +701 -0
- package/dist/compiler/re01TypeProperties.d.ts +70 -0
- package/dist/compiler/re01TypeProperties.js +120 -0
- package/dist/compiler/re01TypePropertyValidation.d.ts +22 -0
- package/dist/compiler/re01TypePropertyValidation.js +161 -0
- package/dist/compiler/resolveCanonicalGraph.d.ts +41 -0
- package/dist/compiler/resolveCanonicalGraph.js +240 -0
- package/dist/compiler/scalarSchemaAssessment.d.ts +424 -0
- package/dist/compiler/scalarSchemaAssessment.js +5198 -0
- package/dist/compiler/schemaAttributeGroupProperties.d.ts +16 -0
- package/dist/compiler/schemaAttributeGroupProperties.js +53 -0
- package/dist/compiler/schemaAttributeProperties.d.ts +9 -0
- package/dist/compiler/schemaAttributeProperties.js +11 -0
- package/dist/compiler/schemaAttributeUses.d.ts +110 -0
- package/dist/compiler/schemaAttributeUses.js +798 -0
- package/dist/compiler/schemaBinaryWordReconstruction.d.ts +9 -0
- package/dist/compiler/schemaBinaryWordReconstruction.js +33 -0
- package/dist/compiler/schemaBuiltinFacets.d.ts +13 -0
- package/dist/compiler/schemaBuiltinFacets.js +51 -0
- package/dist/compiler/schemaCalendarImages.d.ts +7 -0
- package/dist/compiler/schemaCalendarImages.js +204 -0
- package/dist/compiler/schemaCalendarLanguage.d.ts +10 -0
- package/dist/compiler/schemaCalendarLanguage.js +227 -0
- package/dist/compiler/schemaCompiler.d.ts +0 -1
- package/dist/compiler/schemaComponentEquality.d.ts +27 -0
- package/dist/compiler/schemaComponentEquality.js +446 -0
- package/dist/compiler/schemaConstructionAssessment.d.ts +79 -0
- package/dist/compiler/schemaConstructionAssessment.js +745 -0
- package/dist/compiler/schemaDatatypeValues.d.ts +3 -0
- package/dist/compiler/schemaDatatypeValues.js +2 -0
- package/dist/compiler/schemaDecimalLanguage.d.ts +6 -0
- package/dist/compiler/schemaDecimalLanguage.js +102 -0
- package/dist/compiler/schemaDeclarationPrimitives.d.ts +39 -0
- package/dist/compiler/schemaDeclarationPrimitives.js +211 -0
- package/dist/compiler/schemaDocumentSyntax.d.ts +54 -0
- package/dist/compiler/schemaDocumentSyntax.js +294 -0
- package/dist/compiler/schemaDurationLanguage.d.ts +10 -0
- package/dist/compiler/schemaDurationLanguage.js +170 -0
- package/dist/compiler/schemaElementInstance.d.ts +30 -0
- package/dist/compiler/schemaElementInstance.js +45 -0
- package/dist/compiler/schemaElementProperties.d.ts +15 -0
- package/dist/compiler/schemaElementProperties.js +23 -0
- package/dist/compiler/schemaEndpointWordCapacity.d.ts +35 -0
- package/dist/compiler/schemaEndpointWordCapacity.js +39 -0
- package/dist/compiler/schemaExactCalendar.d.ts +72 -0
- package/dist/compiler/schemaExactCalendar.js +264 -0
- package/dist/compiler/schemaFacetAnnotation.d.ts +31 -0
- package/dist/compiler/schemaFacetAnnotation.js +199 -0
- package/dist/compiler/schemaGeneratedScalarShape.d.ts +34 -0
- package/dist/compiler/schemaGeneratedScalarShape.js +178 -0
- package/dist/compiler/schemaIdentityConstraints.d.ts +72 -0
- package/dist/compiler/schemaIdentityConstraints.js +362 -0
- package/dist/compiler/schemaIeeeLanguage.d.ts +42 -0
- package/dist/compiler/schemaIeeeLanguage.js +759 -0
- package/dist/compiler/schemaIntegerImages.d.ts +10 -0
- package/dist/compiler/schemaIntegerImages.js +113 -0
- package/dist/compiler/schemaLexicalPredicates.d.ts +28 -0
- package/dist/compiler/schemaLexicalPredicates.js +63 -0
- package/dist/compiler/schemaNotationProperties.d.ts +31 -0
- package/dist/compiler/schemaNotationProperties.js +84 -0
- package/dist/compiler/schemaNumericImageConditions.d.ts +23 -0
- package/dist/compiler/schemaNumericImageConditions.js +66 -0
- package/dist/compiler/schemaParticleWildcardProperties.d.ts +19 -0
- package/dist/compiler/schemaParticleWildcardProperties.js +43 -0
- package/dist/compiler/schemaPattern.d.ts +1061 -0
- package/dist/compiler/schemaPattern.js +581 -0
- package/dist/compiler/schemaRegularLanguage.d.ts +66 -0
- package/dist/compiler/schemaRegularLanguage.js +1166 -0
- package/dist/compiler/schemaScalarContext.d.ts +85 -0
- package/dist/compiler/schemaScalarContext.js +78 -0
- package/dist/compiler/schemaScalarKernel.d.ts +181 -0
- package/dist/compiler/schemaScalarKernel.js +391 -0
- package/dist/compiler/schemaScalarWitnesses.d.ts +5 -0
- package/dist/compiler/schemaScalarWitnesses.js +118 -0
- package/dist/compiler/schemaSimpleTypeProperties.d.ts +94 -0
- package/dist/compiler/schemaSimpleTypeProperties.js +103 -0
- package/dist/compiler/schemaSourceGrammar.d.ts +26 -0
- package/dist/compiler/schemaSourceGrammar.js +290 -0
- package/dist/compiler/schemaSourceLexical.d.ts +3 -0
- package/dist/compiler/schemaSourceLexical.js +12 -0
- package/dist/compiler/schemaSourceValues.d.ts +50 -0
- package/dist/compiler/schemaSourceValues.js +225 -0
- package/dist/compiler/schemaSourceWildcards.d.ts +27 -0
- package/dist/compiler/schemaSourceWildcards.js +249 -0
- package/dist/compiler/schemaSymbolicSequences.d.ts +15 -0
- package/dist/compiler/schemaSymbolicSequences.js +99 -0
- package/dist/compiler/schemaSymbolicValueSets.d.ts +31 -0
- package/dist/compiler/schemaSymbolicValueSets.js +149 -0
- package/dist/compiler/schemaSyntaxAssessment.d.ts +24 -0
- package/dist/compiler/schemaSyntaxAssessment.js +361 -0
- package/dist/compiler/schemaTemporalAliases.d.ts +5 -0
- package/dist/compiler/schemaTemporalAliases.js +195 -0
- package/dist/compiler/schemaTokenImages.d.ts +8 -0
- package/dist/compiler/schemaTokenImages.js +142 -0
- package/dist/compiler/schemaTypeIdentity.d.ts +38 -0
- package/dist/compiler/schemaTypeIdentity.js +80 -0
- package/dist/compiler/schemaTypeRelations.d.ts +37 -0
- package/dist/compiler/schemaTypeRelations.js +576 -0
- package/dist/compiler/schemaUri.d.ts +12 -0
- package/dist/compiler/schemaUri.js +103 -0
- package/dist/compiler/schemaValueContext.d.ts +25 -0
- package/dist/compiler/schemaValueContext.js +1 -0
- package/dist/compiler/schemaValueImages.d.ts +9 -0
- package/dist/compiler/schemaValueImages.js +142 -0
- package/dist/compiler/schemaValueSequences.d.ts +14 -0
- package/dist/compiler/schemaValueSequences.js +19 -0
- package/dist/compiler/semanticBudget.d.ts +67 -0
- package/dist/compiler/semanticBudget.js +193 -0
- package/dist/compiler/semanticCatalog.d.ts +121 -0
- package/dist/compiler/semanticCatalog.js +160 -0
- package/dist/compiler/semanticContext.d.ts +183 -0
- package/dist/compiler/semanticContext.js +1207 -0
- package/dist/compiler/semanticTypeDependencies.d.ts +7 -0
- package/dist/compiler/semanticTypeDependencies.js +64 -0
- package/dist/compiler/semanticTypeReference.d.ts +23 -0
- package/dist/compiler/semanticTypeReference.js +36 -0
- package/dist/compiler/shapeResolver.d.ts +1 -1
- package/dist/compiler/shapeResolver.js +7 -9
- package/dist/compiler/soapHeaders.d.ts +16 -0
- package/dist/compiler/soapHeaders.js +42 -0
- package/dist/compiler/sourceSchemaBinding.d.ts +25 -0
- package/dist/compiler/sourceSchemaBinding.js +39 -0
- 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 +15 -0
- package/dist/compiler/structuralCompanions.js +232 -0
- package/dist/compiler/validateSemanticGraph.d.ts +4 -0
- package/dist/compiler/validateSemanticGraph.js +376 -0
- package/dist/compiler/wildcardAlgebra.d.ts +25 -0
- package/dist/compiler/wildcardAlgebra.js +155 -0
- 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/generateGateway.js +2 -2
- 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 +9 -1
- package/dist/index.js +3 -0
- package/dist/loader/fetch.d.ts +0 -1
- package/dist/loader/orderedSyntax.d.ts +84 -0
- package/dist/loader/orderedSyntax.js +222 -0
- package/dist/loader/resolutionDepth.d.ts +6 -0
- package/dist/loader/resolutionDepth.js +65 -0
- package/dist/loader/schemaInput.d.ts +80 -0
- package/dist/loader/schemaInput.js +249 -0
- package/dist/loader/schemaResources.d.ts +60 -0
- package/dist/loader/schemaResources.js +333 -0
- 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/generateOpenAPI.js +2 -2
- 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/generateTests.js +2 -2
- 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 +2 -0
- package/dist/util/xmlWhitespace.js +4 -0
- 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 +43 -1
- package/docs/concepts.md +136 -1
- package/docs/configuration.md +5 -1
- package/docs/corpus.md +33 -0
- package/docs/direct-values.md +311 -0
- 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 +17 -5
- package/docs/testing.md +117 -31
- package/llms.txt +7 -7
- package/package.json +79 -25
- package/src/generation/preambles/direct-client/typescript.preamble +3 -0
- 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/generateClient.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/generateCatalog.d.ts.map +0 -1
- package/dist/compiler/schemaCompiler.d.ts.map +0 -1
- package/dist/compiler/shapeResolver.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/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/xsd/primitives.d.ts.map +0 -1
- package/docs/AGENTS.md +0 -47
- package/docs/README.md +0 -56
- package/docs/architecture.md +0 -149
- package/docs/decisions/001-test-generation.md +0 -36
- package/docs/decisions/002-streamable-responses.md +0 -330
- package/docs/file-naming-and-path-organization.md +0 -213
- 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/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,300 @@
|
|
|
1
|
+
/** Assessment-only source API. Reports are diagnostics, never reusable admission tokens. */
|
|
2
|
+
import { deepFreeze } from './canonicalGraph.js';
|
|
3
|
+
import { createRequire } from 'node:module';
|
|
4
|
+
import { createHash } from 'node:crypto';
|
|
5
|
+
import { loadSemanticSchemaInput } from '../loader/schemaInput.js';
|
|
6
|
+
import { DEFAULT_LOADING_LIMITS, loadingLimits } from '../loader/schemaResources.js';
|
|
7
|
+
import { SchemaLoadingError, syntaxAttribute, syntaxElements, WSDL_NAMESPACE } from '../loader/orderedSyntax.js';
|
|
8
|
+
import { createSemanticBudget, DEFAULT_MAX_NODES, DEFAULT_MAX_WORK } from './semanticBudget.js';
|
|
9
|
+
import { qualifyDirectSource } from './checkedSourcePreparation.js';
|
|
10
|
+
const packageVersion = createRequire(import.meta.url)('../../package.json').version;
|
|
11
|
+
export const ASSESSMENT_REPORT_BYTES = 1024 * 1024;
|
|
12
|
+
export const ASSESSMENT_VERSION = 'checked-assessment-v1';
|
|
13
|
+
export const ASSESSMENT_BASIS = 'native-direct-premises-v1';
|
|
14
|
+
/** Explicit expected inventory prevents missing duties or empty reports from establishing scope. */
|
|
15
|
+
export function aggregateAssessment(required, facts) {
|
|
16
|
+
if ([...facts.values()].includes('disproved'))
|
|
17
|
+
return 'disproved';
|
|
18
|
+
return required.length > 0 && required.every(key => facts.get(key) === 'established') ? 'established' : 'inconclusive';
|
|
19
|
+
}
|
|
20
|
+
const published = new WeakMap();
|
|
21
|
+
export function serializeAssessmentReport(report) {
|
|
22
|
+
const text = published.get(report);
|
|
23
|
+
if (text === undefined)
|
|
24
|
+
throw new TypeError('Only source-issued assessment reports can be published');
|
|
25
|
+
return text;
|
|
26
|
+
}
|
|
27
|
+
export function assessmentExitCode(report) {
|
|
28
|
+
if (report.execution !== 'completed')
|
|
29
|
+
return { failed: 1, 'resource-limit': 4, cancelled: 5 }[report.execution];
|
|
30
|
+
if (report.schema === 'disproved')
|
|
31
|
+
return 3;
|
|
32
|
+
return report.schemaEligible ? 0 : 2;
|
|
33
|
+
}
|
|
34
|
+
export async function assessSchemaSource(source, options) {
|
|
35
|
+
const budget = createSemanticBudget(options.limits);
|
|
36
|
+
const effectiveLoadingLimits = loadingLimits(options.loading.limits);
|
|
37
|
+
const limits = { loading: effectiveLoadingLimits, maxReportBytes: ASSESSMENT_REPORT_BYTES, maxWork: options.limits?.maxWork ?? DEFAULT_MAX_WORK, maxNodes: options.limits?.maxNodes ?? DEFAULT_MAX_NODES };
|
|
38
|
+
const obligations = [];
|
|
39
|
+
const operations = [];
|
|
40
|
+
let components = [];
|
|
41
|
+
let resources = [], contexts = [], edges = [];
|
|
42
|
+
let input;
|
|
43
|
+
let execution = 'completed', category;
|
|
44
|
+
let inventory = 'unassessed';
|
|
45
|
+
let correspondence = 'inconclusive';
|
|
46
|
+
let knownFailure = false;
|
|
47
|
+
let identity = 'unassessed';
|
|
48
|
+
// Reserve bounded terminal copying/freezing/JSON publication before retaining any input facts.
|
|
49
|
+
let publicationRemaining = ASSESSMENT_REPORT_BYTES - 16_384;
|
|
50
|
+
const reservePublication = (bytes) => {
|
|
51
|
+
budget.chargeWork(16);
|
|
52
|
+
if (!Number.isSafeInteger(bytes) || bytes < 0 || bytes > publicationRemaining)
|
|
53
|
+
budget.chargeWork(limits.maxWork);
|
|
54
|
+
publicationRemaining -= bytes;
|
|
55
|
+
};
|
|
56
|
+
// Reserved terminal result carries unassessed closure even if publication itself exhausts.
|
|
57
|
+
const terminal = (state) => ({
|
|
58
|
+
tool: { version: packageVersion, node: process.version }, identity, reportVersion: ASSESSMENT_VERSION, scope: 'whole-actual-native-direct-v1', model: 'xsd10-faithful-v1', basis: ASSESSMENT_BASIS,
|
|
59
|
+
schema: knownFailure ? 'disproved' : 'inconclusive',
|
|
60
|
+
correspondence: 'inconclusive', execution: state, category,
|
|
61
|
+
obligations,
|
|
62
|
+
operations, operationInventory: inventory, resources, contexts, edges, components, limits, usage: { ...budget.usage() }, schemaEligible: false, admitted: false,
|
|
63
|
+
});
|
|
64
|
+
const check = () => { if (options.signal?.aborted)
|
|
65
|
+
throw new CancelledAssessment(); budget.chargeWork(1); };
|
|
66
|
+
const opaque = (value) => { budget.chargeWork(128 + value.length * 4); return createHash('sha256').update(value).digest('hex'); };
|
|
67
|
+
const add = (rule, component, status, reason, basis = ASSESSMENT_BASIS) => {
|
|
68
|
+
reservePublication(512 + 6 * (rule.length + component.length + reason.length));
|
|
69
|
+
budget.chargeWork(4096 + rule.length * 32 + component.length * 32 + reason.length * 32);
|
|
70
|
+
if (basis === ASSESSMENT_BASIS && status === 'disproved')
|
|
71
|
+
knownFailure = true;
|
|
72
|
+
obligations.push({ rule, component, context: 'actual', basis, status, reason });
|
|
73
|
+
};
|
|
74
|
+
try {
|
|
75
|
+
budget.chargeWork(ASSESSMENT_REPORT_BYTES * 16 + 4096);
|
|
76
|
+
check();
|
|
77
|
+
if (options.expectedBasis !== undefined && options.expectedBasis !== ASSESSMENT_BASIS) {
|
|
78
|
+
add('semantic-basis-match', 'actual', 'inconclusive', 'Requested semantic evidence basis is unavailable');
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
input = await loadSemanticSchemaInput(source, { ...options.loading, chargeWork: amount => { check(); budget.chargeWork(amount); } });
|
|
82
|
+
check();
|
|
83
|
+
const result = budget.guard(() => {
|
|
84
|
+
reservePublication(input.resources.length * 512 + input.schemas.length * 1024 + input.edges.length * 512);
|
|
85
|
+
budget.chargeWork(128 + input.resources.length * 256 + input.schemas.length * 512 + input.edges.length * 256);
|
|
86
|
+
const resourceId = (uri) => opaque(uri);
|
|
87
|
+
resources = budget.sorted(input.resources.map(r => ({ id: resourceId(r.uri), digest: r.digest, bytes: r.byteLength })), (a, b) => budget.compareText(a.id, b.id));
|
|
88
|
+
contexts = budget.sorted(input.schemas.map(s => ({ id: opaque(s.key), resource: resourceId(s.documentUri), digest: s.digest,
|
|
89
|
+
namespace: opaque(s.targetNamespace), base: opaque(s.baseUri), kind: s.context.kind })), (a, b) => budget.compareText(a.id, b.id));
|
|
90
|
+
edges = input.edges.map(e => ({ kind: e.kind, from: opaque(e.from), ...(e.to ? { to: opaque(e.to) } : {}), cycle: e.cycle }));
|
|
91
|
+
// Inventory precedes semantic preparation, so interrupted reports cannot silently omit operations.
|
|
92
|
+
for (const document of input.documents) {
|
|
93
|
+
const stack = [document.root];
|
|
94
|
+
while (stack.length) {
|
|
95
|
+
check();
|
|
96
|
+
const node = stack.pop();
|
|
97
|
+
budget.chargeWork(128 + node.children.length * 4);
|
|
98
|
+
if (node.name.namespace === WSDL_NAMESPACE && node.name.local === 'portType') {
|
|
99
|
+
for (const operation of syntaxElements(node, WSDL_NAMESPACE, 'operation')) {
|
|
100
|
+
const operationName = syntaxAttribute(operation, 'name') ?? '(unnamed)';
|
|
101
|
+
reservePublication(8192 + operationName.length * 6);
|
|
102
|
+
budget.chargeWork(1024 + operationName.length * 8);
|
|
103
|
+
operations.push({ id: opaque(`${document.digest ?? document.root.source.digest}:${operation.source.path}`), name: operationName, admitted: false,
|
|
104
|
+
capabilities: ['matcher', 'projection', 'scalar-payload', 'bundle', 'codec', 'buffered-transport', 'structured-generation'].map(name => ({ name, status: name === 'structured-generation' ? 'unsupported' : 'not-assessed',
|
|
105
|
+
reason: name === 'structured-generation' ? 'This narrow direct assessment does not assess component generation; use planCheckedComponents or pipeline --checked-report for component readiness' : 'This assessment does not qualify the downstream runtime owner' })) });
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
stack.push(...syntaxElements(node));
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
inventory = 'complete';
|
|
112
|
+
budget.chargeWork(1024 + resources.length * 512 + contexts.length * 1024);
|
|
113
|
+
identity = opaque(JSON.stringify({ resources, contexts, basis: ASSESSMENT_BASIS }));
|
|
114
|
+
if (options.expectedIdentity !== undefined && identity !== options.expectedIdentity)
|
|
115
|
+
add('source-context-match', 'actual', 'inconclusive', 'Expected source/context identity differs from the loaded closure');
|
|
116
|
+
const prepared = qualifyDirectSource(input, { budget, maxNodes: limits.maxNodes, check,
|
|
117
|
+
onPrepared: request => {
|
|
118
|
+
budget.chargeWork(256 + request.graph.nodes.length * 1024);
|
|
119
|
+
components = request.graph.nodes.map(node => {
|
|
120
|
+
reservePublication(2048 + node.context.source.path.length * 6 + (request.graph.origins[node.id]?.length ?? 0) * 512);
|
|
121
|
+
return ({ id: opaque(node.id), digest: node.context.source.digest, resource: resourceId(node.context.source.uri), path: node.context.source.path, contexts: (request.graph.origins[node.id] ?? []).map(origin => opaque(origin.interpretation)) });
|
|
122
|
+
});
|
|
123
|
+
},
|
|
124
|
+
onLocal: (id, checked) => {
|
|
125
|
+
const component = opaque(id);
|
|
126
|
+
if (checked.kind === 'checked') {
|
|
127
|
+
add('local-component-premises', component, 'established', 'Native local premises checked; dependencies remain in whole-actual-closure');
|
|
128
|
+
for (const debt of checked.obligations)
|
|
129
|
+
add(debt.rule, component, 'inconclusive', 'Required native dependency is discharged only by aggregate closure');
|
|
130
|
+
if (checked.re01 && !checked.re01.primitive)
|
|
131
|
+
add('RE01', component, 'inconclusive', 'Direct strategy supplies no nonprimitive construction; no negative search claim');
|
|
132
|
+
}
|
|
133
|
+
else
|
|
134
|
+
add(checked.rule, component, checked.kind === 'invalid-schema' ? 'disproved' : 'inconclusive', `Native ${checked.kind}; no dated-XSD invalidity claim`);
|
|
135
|
+
},
|
|
136
|
+
onClosure: closure => {
|
|
137
|
+
if (closure.kind === 'checked-direct' || closure.kind === 'inconclusive-direct') {
|
|
138
|
+
// Aggregate closure supersedes local dependency debts only after the native owner discharged them.
|
|
139
|
+
if (closure.kind === 'checked-direct') {
|
|
140
|
+
for (let i = 0; i < obligations.length; i++) {
|
|
141
|
+
budget.chargeWork(256);
|
|
142
|
+
const fact = obligations[i];
|
|
143
|
+
if (fact.status === 'inconclusive' && fact.reason === 'Required native dependency is discharged only by aggregate closure')
|
|
144
|
+
obligations[i] = { ...fact, status: 'established', reason: 'Native aggregate dependency discharge checked' };
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
add('whole-actual-closure', 'actual', closure.kind === 'checked-direct' ? 'established' : 'inconclusive', closure.kind === 'checked-direct' ? 'All native direct obligations and aggregate dependencies checked' : 'RE01 nonprimitive actual obligation remains unproved');
|
|
148
|
+
}
|
|
149
|
+
else
|
|
150
|
+
add('whole-actual-closure', 'actual', closure.kind === 'invalid-schema' ? 'disproved' : 'inconclusive', `Native ${closure.kind}: ${"rule" in closure ? closure.rule : "aggregate-closure"}`);
|
|
151
|
+
},
|
|
152
|
+
});
|
|
153
|
+
if (prepared.kind !== 'qualified-source') {
|
|
154
|
+
if (prepared.kind === 'resource-limit')
|
|
155
|
+
return prepared;
|
|
156
|
+
if (prepared.kind === 'source-preparation-failed') {
|
|
157
|
+
if (prepared.category === 'resource-limit')
|
|
158
|
+
execution = 'resource-limit';
|
|
159
|
+
add(prepared.stage, 'actual', prepared.category === 'invalid-schema' ? 'disproved' : 'inconclusive', `Native ${prepared.category}; source details redacted`);
|
|
160
|
+
}
|
|
161
|
+
else
|
|
162
|
+
add('source-preparation', 'actual', 'inconclusive', 'Native source context was not prepared');
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
correspondence = prepared.correspondence ? 'established' : 'inconclusive';
|
|
166
|
+
add('dated-XSD-correspondence', 'actual', correspondence, correspondence === 'established' ? 'Qualified distinct-name builtin scalar sequence route; Structures/Datatypes 2004' : 'Outside the independently qualified direct correspondence route', 'dated-XSD-2004-direct-v1');
|
|
167
|
+
});
|
|
168
|
+
if (result?.kind === 'resource-limit')
|
|
169
|
+
execution = 'resource-limit';
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
catch (error) {
|
|
173
|
+
if (budget.exhausted())
|
|
174
|
+
execution = 'resource-limit';
|
|
175
|
+
else if (options.signal?.aborted || error instanceof CancelledAssessment)
|
|
176
|
+
execution = 'cancelled';
|
|
177
|
+
else if (error instanceof SchemaLoadingError) {
|
|
178
|
+
execution = error.category === 'resource-limit' ? 'resource-limit' : 'failed';
|
|
179
|
+
category = error.category;
|
|
180
|
+
}
|
|
181
|
+
else
|
|
182
|
+
throw error;
|
|
183
|
+
}
|
|
184
|
+
if (budget.exhausted())
|
|
185
|
+
execution = 'resource-limit';
|
|
186
|
+
if (execution !== 'completed') {
|
|
187
|
+
obligations.push({ rule: 'unfinished-assessment', component: 'actual', context: 'actual', basis: ASSESSMENT_BASIS, status: 'inconclusive', reason: 'Required checking or publication work was not completed' });
|
|
188
|
+
const report = terminal(execution);
|
|
189
|
+
deepFreeze(report);
|
|
190
|
+
published.set(report, JSON.stringify(report, null, 2) + '\n');
|
|
191
|
+
return report;
|
|
192
|
+
}
|
|
193
|
+
const final = budget.guard(() => {
|
|
194
|
+
check();
|
|
195
|
+
if (!obligations.some(o => o.rule === 'whole-actual-closure'))
|
|
196
|
+
add('whole-actual-closure', 'actual', 'inconclusive', 'Required actual closure was not assessed');
|
|
197
|
+
const sorted = budget.sorted(obligations, (a, b) => budget.compareText(`${a.component}:${a.rule}:${a.reason}`, `${b.component}:${b.rule}:${b.reason}`));
|
|
198
|
+
const facts = new Map();
|
|
199
|
+
for (let index = 0; index < sorted.length; index++) {
|
|
200
|
+
budget.chargeWork(8);
|
|
201
|
+
if (sorted[index].basis === ASSESSMENT_BASIS)
|
|
202
|
+
facts.set(String(index), sorted[index].status);
|
|
203
|
+
}
|
|
204
|
+
const schema = aggregateAssessment([...facts.keys()], facts);
|
|
205
|
+
const report = { tool: { version: packageVersion, node: process.version }, identity, reportVersion: ASSESSMENT_VERSION, scope: 'whole-actual-native-direct-v1', model: 'xsd10-faithful-v1', basis: ASSESSMENT_BASIS,
|
|
206
|
+
schema, correspondence, execution, category, obligations: sorted, operations: budget.sorted(operations, (a, b) => budget.compareText(a.id, b.id)), operationInventory: inventory,
|
|
207
|
+
resources, contexts, edges, components, limits: { ...limits, ...(input ? { loading: input.limits } : {}) }, usage: { work: 0, nodes: 0 }, schemaEligible: schema === 'established' && correspondence === 'established', admitted: false };
|
|
208
|
+
const owned = budget.snapshot(report);
|
|
209
|
+
// Snapshot charges all text/fields. Reserve a conservative 12x JSON-escape and indentation envelope before serialization/publication.
|
|
210
|
+
const start = budget.usage().work;
|
|
211
|
+
budget.snapshot(owned);
|
|
212
|
+
budget.chargeWork((budget.usage().work - start) * 12 + 2048);
|
|
213
|
+
budget.freeze(owned);
|
|
214
|
+
budget.chargeWork(256);
|
|
215
|
+
const result = Object.freeze({ ...owned, usage: Object.freeze({ ...budget.usage() }) });
|
|
216
|
+
const text = JSON.stringify(result, null, 2) + '\n';
|
|
217
|
+
published.set(result, text);
|
|
218
|
+
return result;
|
|
219
|
+
});
|
|
220
|
+
if ('kind' in final) {
|
|
221
|
+
obligations.push({ rule: 'unfinished-publication', component: 'actual', context: 'actual', basis: ASSESSMENT_BASIS, status: 'inconclusive', reason: 'Report publication exhausted the shared request budget' });
|
|
222
|
+
const report = terminal('resource-limit');
|
|
223
|
+
published.set(report, JSON.stringify(report, null, 2) + '\n');
|
|
224
|
+
return report;
|
|
225
|
+
}
|
|
226
|
+
return final;
|
|
227
|
+
}
|
|
228
|
+
class CancelledAssessment extends Error {
|
|
229
|
+
}
|
|
230
|
+
/** Validate diagnostic JSON without treating it as authenticated semantic evidence. */
|
|
231
|
+
export function parseAssessmentReport(text) {
|
|
232
|
+
const bad = () => { throw new TypeError('Malformed or incompatible assessment report'); };
|
|
233
|
+
if (Buffer.byteLength(text) > ASSESSMENT_REPORT_BYTES)
|
|
234
|
+
return bad();
|
|
235
|
+
const value = JSON.parse(text);
|
|
236
|
+
const record = (v) => !!v && typeof v === 'object' && !Array.isArray(v);
|
|
237
|
+
const textField = (v) => typeof v === 'string';
|
|
238
|
+
const integer = (v) => typeof v === 'number' && Number.isSafeInteger(v) && v >= 0;
|
|
239
|
+
const digest = (v) => typeof v === 'string' && /^[a-f0-9]{64}$/.test(v);
|
|
240
|
+
const status = (s) => s === 'established' || s === 'disproved' || s === 'inconclusive';
|
|
241
|
+
if (!record(value))
|
|
242
|
+
return bad();
|
|
243
|
+
const r = value;
|
|
244
|
+
if (r.reportVersion !== ASSESSMENT_VERSION || r.scope !== 'whole-actual-native-direct-v1' || r.model !== 'xsd10-faithful-v1' || r.basis !== ASSESSMENT_BASIS || r.admitted !== false || !status(r.schema) || !status(r.correspondence) || !['completed', 'failed', 'cancelled', 'resource-limit'].includes(String(r.execution)))
|
|
245
|
+
return bad();
|
|
246
|
+
if (!record(r.tool) || !textField(r.tool.version) || !textField(r.tool.node) || !(r.identity === 'unassessed' || digest(r.identity)))
|
|
247
|
+
return bad();
|
|
248
|
+
if (!record(r.limits) || !integer(r.limits.maxWork) || r.limits.maxWork < 1 || !integer(r.limits.maxNodes) || r.limits.maxNodes < 1 || r.limits.maxReportBytes !== ASSESSMENT_REPORT_BYTES)
|
|
249
|
+
return bad();
|
|
250
|
+
if (r.category !== undefined && !textField(r.category))
|
|
251
|
+
return bad();
|
|
252
|
+
if (r.limits.loading !== undefined) {
|
|
253
|
+
if (!record(r.limits.loading))
|
|
254
|
+
return bad();
|
|
255
|
+
for (const key of Object.keys(DEFAULT_LOADING_LIMITS)) {
|
|
256
|
+
const v = r.limits.loading[key];
|
|
257
|
+
if (!integer(v) || (key !== 'redirects' && v < 1))
|
|
258
|
+
return bad();
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
if (!record(r.usage) || !integer(r.usage.work) || !integer(r.usage.nodes) || r.usage.work > r.limits.maxWork || r.usage.nodes > r.limits.maxNodes)
|
|
262
|
+
return bad();
|
|
263
|
+
if (!Array.isArray(r.obligations) || !r.obligations.length || !Array.isArray(r.operations) || !Array.isArray(r.resources) || !Array.isArray(r.contexts) || !Array.isArray(r.edges) || !Array.isArray(r.components) || !['complete', 'unassessed'].includes(String(r.operationInventory)))
|
|
264
|
+
return bad();
|
|
265
|
+
for (const o of r.obligations)
|
|
266
|
+
if (!record(o) || !status(o.status) || !textField(o.rule) || !textField(o.component) || !textField(o.context) || !textField(o.reason) || ![ASSESSMENT_BASIS, 'dated-XSD-2004-direct-v1'].includes(String(o.basis)))
|
|
267
|
+
return bad();
|
|
268
|
+
const obligations = r.obligations;
|
|
269
|
+
const nativeDisproved = obligations.some(o => o.basis === ASSESSMENT_BASIS && o.status === 'disproved');
|
|
270
|
+
if ((r.schema === 'disproved') !== nativeDisproved)
|
|
271
|
+
return bad();
|
|
272
|
+
if (!obligations.some(o => ['whole-actual-closure', 'unfinished-assessment', 'unfinished-publication'].includes(o.rule)))
|
|
273
|
+
return bad();
|
|
274
|
+
if (r.schema === 'established' && (r.execution !== 'completed' || !obligations.some(o => o.rule === 'whole-actual-closure' && o.basis === ASSESSMENT_BASIS && o.status === 'established') || obligations.some(o => o.basis === ASSESSMENT_BASIS && o.status !== 'established')))
|
|
275
|
+
return bad();
|
|
276
|
+
if (r.correspondence === 'established' && !obligations.some(o => o.rule === 'dated-XSD-correspondence' && o.basis === 'dated-XSD-2004-direct-v1' && o.status === 'established'))
|
|
277
|
+
return bad();
|
|
278
|
+
if (r.schemaEligible !== (r.execution === 'completed' && r.schema === 'established' && r.correspondence === 'established'))
|
|
279
|
+
return bad();
|
|
280
|
+
for (const o of r.operations) {
|
|
281
|
+
if (!record(o) || !digest(o.id) || !textField(o.name) || o.admitted !== false || !Array.isArray(o.capabilities))
|
|
282
|
+
return bad();
|
|
283
|
+
for (const c of o.capabilities)
|
|
284
|
+
if (!record(c) || !textField(c.name) || !textField(c.reason) || !['supported', 'unsupported', 'not-assessed'].includes(String(c.status)))
|
|
285
|
+
return bad();
|
|
286
|
+
}
|
|
287
|
+
for (const resource of r.resources)
|
|
288
|
+
if (!record(resource) || !digest(resource.id) || !digest(resource.digest) || !integer(resource.bytes))
|
|
289
|
+
return bad();
|
|
290
|
+
for (const context of r.contexts)
|
|
291
|
+
if (!record(context) || !digest(context.id) || !digest(context.resource) || !digest(context.digest) || !digest(context.namespace) || !digest(context.base) || !['root', 'inline', 'include', 'import'].includes(String(context.kind)))
|
|
292
|
+
return bad();
|
|
293
|
+
for (const edge of r.edges)
|
|
294
|
+
if (!record(edge) || !textField(edge.kind) || !digest(edge.from) || !(edge.to === undefined || digest(edge.to)) || typeof edge.cycle !== 'boolean')
|
|
295
|
+
return bad();
|
|
296
|
+
for (const component of r.components)
|
|
297
|
+
if (!record(component) || !digest(component.id) || !digest(component.digest) || !digest(component.resource) || !textField(component.path) || !Array.isArray(component.contexts) || component.contexts.some(c => !digest(c)))
|
|
298
|
+
return bad();
|
|
299
|
+
return deepFreeze(r);
|
|
300
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Additive schema qualification; operation/runtime admission remains a separate owner. */
|
|
2
|
+
import type { SchemaInput } from '../loader/schemaInput.js';
|
|
3
|
+
import { constructNativeSource } from './checkedSourcePreparation.js';
|
|
4
|
+
import type { NativeSourceConstruction } from './checkedSourcePreparation.js';
|
|
5
|
+
import type { ComponentCorrespondenceResult } from './componentCorrespondence.js';
|
|
6
|
+
export interface ComponentSourceQualification {
|
|
7
|
+
readonly kind: 'component-source';
|
|
8
|
+
readonly construction: NativeSourceConstruction;
|
|
9
|
+
readonly correspondence: ComponentCorrespondenceResult;
|
|
10
|
+
readonly schemaEligible: boolean;
|
|
11
|
+
readonly admitted: false;
|
|
12
|
+
}
|
|
13
|
+
/** Qualify through fresh native construction and the separate sufficient dated component route. */
|
|
14
|
+
export declare function qualifyComponentSource(input: SchemaInput, options: Parameters<typeof constructNativeSource>[1]): Exclude<ReturnType<typeof constructNativeSource>, NativeSourceConstruction> | ComponentSourceQualification;
|
|
15
|
+
/** Revalidate the exact source/receipt identities before a consumer uses schema eligibility. */
|
|
16
|
+
export declare function inspectComponentSourceQualification(value: ComponentSourceQualification, expectedSource?: SchemaInput): ComponentSourceQualification;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { constructNativeSource, inspectNativeSourceConstruction } from './checkedSourcePreparation.js';
|
|
2
|
+
import { checkComponentCorrespondence, inspectComponentCorrespondence } from './componentCorrespondence.js';
|
|
3
|
+
const issued = new WeakMap();
|
|
4
|
+
/** Qualify through fresh native construction and the separate sufficient dated component route. */
|
|
5
|
+
export function qualifyComponentSource(input, options) {
|
|
6
|
+
return options.budget.guard(() => {
|
|
7
|
+
const construction = constructNativeSource(input, { ...options, extensionChains: options.extensionChains ?? true,
|
|
8
|
+
simpleExtensions: options.simpleExtensions ?? options.extensionChains !== false });
|
|
9
|
+
if (construction.kind !== 'constructed-source')
|
|
10
|
+
return construction;
|
|
11
|
+
const correspondence = checkComponentCorrespondence(input, construction, options);
|
|
12
|
+
if (correspondence.kind === 'resource-limit')
|
|
13
|
+
return correspondence;
|
|
14
|
+
options.check?.();
|
|
15
|
+
options.budget.chargeWork(128);
|
|
16
|
+
const result = Object.freeze({ kind: 'component-source', construction, correspondence,
|
|
17
|
+
schemaEligible: construction.nativeEstablished && correspondence.kind === 'component-correspondence', admitted: false });
|
|
18
|
+
issued.set(result, input);
|
|
19
|
+
return result;
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
/** Revalidate the exact source/receipt identities before a consumer uses schema eligibility. */
|
|
23
|
+
export function inspectComponentSourceQualification(value, expectedSource) {
|
|
24
|
+
const source = issued.get(value);
|
|
25
|
+
if (!source || expectedSource !== undefined && source !== expectedSource)
|
|
26
|
+
throw new TypeError('Fresh component source qualification required');
|
|
27
|
+
inspectNativeSourceConstruction(value.construction, source);
|
|
28
|
+
if (value.correspondence.kind === 'component-correspondence')
|
|
29
|
+
inspectComponentCorrespondence(value.correspondence, value.construction);
|
|
30
|
+
return value;
|
|
31
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/** Shared source-owned native direct qualification. Diagnostic JSON is never input authority. */
|
|
2
|
+
import type { SchemaInput } from '../loader/schemaInput.js';
|
|
3
|
+
import type { SourceSchemaPreparation } from './schemaDocumentSyntax.js';
|
|
4
|
+
import type { ComponentConstructionResult } from './schemaConstructionAssessment.js';
|
|
5
|
+
import { verifyDirectActualSchema } from './finiteRe01Verification.js';
|
|
6
|
+
import type { SemanticRequest } from './semanticContext.js';
|
|
7
|
+
import type { SemanticBudget, ResourceLimitFailure } from './semanticBudget.js';
|
|
8
|
+
import type { FiniteCandidateReceipt, FinitePrimitiveReceipt, ExtensionChainReceipt } from './finiteRe01Verification.js';
|
|
9
|
+
import type { SimpleExtensionConstructionReceipt } from './finiteRe01Verification.js';
|
|
10
|
+
import type { StandardSchemaLibrary } from './standardSchemaComponents.js';
|
|
11
|
+
type Closure = Exclude<ReturnType<typeof verifyDirectActualSchema>, ResourceLimitFailure>;
|
|
12
|
+
type ConstructedClosure = Closure | FiniteCandidateReceipt | FinitePrimitiveReceipt | ExtensionChainReceipt | SimpleExtensionConstructionReceipt | Readonly<{
|
|
13
|
+
kind: 'inconclusive-construction';
|
|
14
|
+
reason: string;
|
|
15
|
+
}>;
|
|
16
|
+
export interface NativeSourceConstruction {
|
|
17
|
+
readonly kind: 'constructed-source';
|
|
18
|
+
readonly request: SemanticRequest;
|
|
19
|
+
readonly closure: ConstructedClosure;
|
|
20
|
+
readonly localEstablished: boolean;
|
|
21
|
+
readonly localDisproved: boolean;
|
|
22
|
+
readonly nativeEstablished: boolean;
|
|
23
|
+
readonly correspondence: 'unassessed';
|
|
24
|
+
readonly eligible: false;
|
|
25
|
+
}
|
|
26
|
+
/** Authenticate fresh source construction; neither fields nor saved reports grant this identity. */
|
|
27
|
+
export declare function inspectNativeSourceConstruction(value: NativeSourceConstruction, expectedSource?: SchemaInput): NativeSourceConstruction;
|
|
28
|
+
/** Construct and natively verify whole-source obligations without granting dated-XSD correspondence or generation.
|
|
29
|
+
* @remarks This additive route may propose finite constructions. The existing direct preview remains unchanged.
|
|
30
|
+
* Missing constructions are inconclusive, and unrelated actual failures are still checked.
|
|
31
|
+
* @returns Fresh native construction or preparation/resource failure; eligibility always remains false.
|
|
32
|
+
*/
|
|
33
|
+
export declare function constructNativeSource(input: SchemaInput, options: Readonly<{
|
|
34
|
+
budget: SemanticBudget;
|
|
35
|
+
maxNodes: number;
|
|
36
|
+
check?: () => void;
|
|
37
|
+
/** Explicit processor-acquired components; selection never substitutes for native application-source checks. */
|
|
38
|
+
standardLibraries?: readonly StandardSchemaLibrary[];
|
|
39
|
+
/** Try actual-only extension ancestry before finite construction; the legacy direct preview never sets this. */
|
|
40
|
+
extensionChains?: boolean;
|
|
41
|
+
/** Collect fresh-owned simple-extension premises; dated qualification remains a separate owner. */
|
|
42
|
+
simpleExtensions?: boolean;
|
|
43
|
+
onLocal?: (id: string, result: Exclude<ComponentConstructionResult, ResourceLimitFailure>) => void;
|
|
44
|
+
}>): Exclude<SourceSchemaPreparation, {
|
|
45
|
+
kind: 'prepared';
|
|
46
|
+
}> | NativeSourceConstruction;
|
|
47
|
+
export type DirectSourceQualification = Exclude<SourceSchemaPreparation, {
|
|
48
|
+
kind: 'prepared';
|
|
49
|
+
}> | Readonly<{
|
|
50
|
+
kind: 'qualified-source';
|
|
51
|
+
request: SemanticRequest;
|
|
52
|
+
closure: Closure;
|
|
53
|
+
correspondence: boolean;
|
|
54
|
+
localEstablished: boolean;
|
|
55
|
+
localDisproved: boolean;
|
|
56
|
+
eligible: boolean;
|
|
57
|
+
}>;
|
|
58
|
+
/**
|
|
59
|
+
* Consume one authentic loaded snapshot and the caller's existing sticky budget.
|
|
60
|
+
* All actual components are checked, including those unreachable from any WSDL
|
|
61
|
+
* operation. Report callbacks observe the same native results without replaying
|
|
62
|
+
* diagnostic data or substituting a second graph. Cancellation remains cooperative.
|
|
63
|
+
*/
|
|
64
|
+
export declare function qualifyDirectSource(input: SchemaInput, options: Readonly<{
|
|
65
|
+
budget: SemanticBudget;
|
|
66
|
+
maxNodes: number;
|
|
67
|
+
check?: () => void;
|
|
68
|
+
onPrepared?: (request: SemanticRequest) => void;
|
|
69
|
+
onLocal?: (id: string, result: Exclude<ComponentConstructionResult, ResourceLimitFailure>) => void;
|
|
70
|
+
onClosure?: (closure: Closure) => void;
|
|
71
|
+
}>): DirectSourceQualification;
|
|
72
|
+
export {};
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { syntaxAttribute, syntaxElements, XSD_NAMESPACE } from '../loader/orderedSyntax.js';
|
|
2
|
+
import { prepareSourceSchemaRequest } from './schemaDocumentSyntax.js';
|
|
3
|
+
import { checkComponentConstruction } from './schemaConstructionAssessment.js';
|
|
4
|
+
import { verifyDirectActualSchema } from './finiteRe01Verification.js';
|
|
5
|
+
import { buildRe01Evidence } from './finiteRe01Construction.js';
|
|
6
|
+
import { assertFiniteCandidateReceipt, assertFinitePrimitiveReceipt, assertExtensionChainReceipt, verifyExtensionChainActualSchema } from './finiteRe01Verification.js';
|
|
7
|
+
import { verifySimpleExtensionConstruction, assertSimpleExtensionConstruction } from './finiteRe01Verification.js';
|
|
8
|
+
const constructed = new WeakMap();
|
|
9
|
+
/** Authenticate fresh source construction; neither fields nor saved reports grant this identity. */
|
|
10
|
+
export function inspectNativeSourceConstruction(value, expectedSource) {
|
|
11
|
+
const source = constructed.get(value);
|
|
12
|
+
if (!source || expectedSource !== undefined && source !== expectedSource)
|
|
13
|
+
throw new TypeError('Fresh native source construction required');
|
|
14
|
+
if (value.closure.kind === 'checked-candidate')
|
|
15
|
+
assertFiniteCandidateReceipt(value.request.actual, value.closure);
|
|
16
|
+
if (value.closure.kind === 'checked-primitive')
|
|
17
|
+
assertFinitePrimitiveReceipt(value.request.actual, value.closure);
|
|
18
|
+
if (value.closure.kind === 'checked-extension-chain' || value.closure.kind === 'inconclusive-extension-chain')
|
|
19
|
+
assertExtensionChainReceipt(value.request.actual, value.closure);
|
|
20
|
+
if ('simple' in value.closure)
|
|
21
|
+
assertSimpleExtensionConstruction(value.request.actual, value.closure);
|
|
22
|
+
return value;
|
|
23
|
+
}
|
|
24
|
+
/** Construct and natively verify whole-source obligations without granting dated-XSD correspondence or generation.
|
|
25
|
+
* @remarks This additive route may propose finite constructions. The existing direct preview remains unchanged.
|
|
26
|
+
* Missing constructions are inconclusive, and unrelated actual failures are still checked.
|
|
27
|
+
* @returns Fresh native construction or preparation/resource failure; eligibility always remains false.
|
|
28
|
+
*/
|
|
29
|
+
export function constructNativeSource(input, options) {
|
|
30
|
+
const { budget } = options;
|
|
31
|
+
return budget.guard(() => {
|
|
32
|
+
options.check?.();
|
|
33
|
+
const prepared = prepareSourceSchemaRequest(input, { budget, accountPreparation: true,
|
|
34
|
+
sourceLimits: { maxNodes: options.maxNodes, standardLibraries: options.standardLibraries } });
|
|
35
|
+
if (prepared.kind !== 'prepared')
|
|
36
|
+
return prepared;
|
|
37
|
+
const { request } = prepared;
|
|
38
|
+
let localEstablished = true, localDisproved = false;
|
|
39
|
+
for (const id of request.actual.members) {
|
|
40
|
+
options.check?.();
|
|
41
|
+
const found = request.actual.lookup(id);
|
|
42
|
+
if (found.kind !== 'found' || found.node.kind === 'wsdl')
|
|
43
|
+
continue;
|
|
44
|
+
const checked = checkComponentConstruction(request.actual, id);
|
|
45
|
+
if (checked.kind === 'resource-limit')
|
|
46
|
+
return checked;
|
|
47
|
+
if (checked.kind !== 'checked')
|
|
48
|
+
localEstablished = false;
|
|
49
|
+
if (checked.kind === 'invalid-schema')
|
|
50
|
+
localDisproved = true;
|
|
51
|
+
options.onLocal?.(id, checked);
|
|
52
|
+
}
|
|
53
|
+
options.check?.();
|
|
54
|
+
let closure = options.simpleExtensions ? verifySimpleExtensionConstruction(request.actual)
|
|
55
|
+
: options.extensionChains ? verifyExtensionChainActualSchema(request.actual) : verifyDirectActualSchema(request.actual);
|
|
56
|
+
if (closure.kind === 'resource-limit')
|
|
57
|
+
return closure;
|
|
58
|
+
if ('simple' in closure && closure.simple.length === 0 && closure.unresolved.length === 0)
|
|
59
|
+
closure = closure.complex;
|
|
60
|
+
if ((closure.kind === 'inconclusive-direct' || closure.kind === 'inconclusive-extension-chain') && closure.unresolved.length) {
|
|
61
|
+
const result = buildRe01Evidence(request.actual, closure.unresolved[0]);
|
|
62
|
+
if (result.kind === 'resource-limit')
|
|
63
|
+
return result;
|
|
64
|
+
closure = result.kind === 'checked-witness' ? result.receipt : Object.freeze({ kind: 'inconclusive-construction',
|
|
65
|
+
reason: 'rule' in result ? result.rule : 'no-witness-in-delivered-families' });
|
|
66
|
+
}
|
|
67
|
+
options.check?.();
|
|
68
|
+
budget.chargeWork(128);
|
|
69
|
+
const value = Object.freeze({ kind: 'constructed-source', request, closure, localEstablished, localDisproved,
|
|
70
|
+
nativeEstablished: localEstablished && ['checked-direct', 'checked-extension-chain', 'checked-simple-extension-construction', 'checked-candidate', 'checked-primitive'].includes(closure.kind),
|
|
71
|
+
correspondence: 'unassessed', eligible: false });
|
|
72
|
+
constructed.set(value, input);
|
|
73
|
+
return value;
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Consume one authentic loaded snapshot and the caller's existing sticky budget.
|
|
78
|
+
* All actual components are checked, including those unreachable from any WSDL
|
|
79
|
+
* operation. Report callbacks observe the same native results without replaying
|
|
80
|
+
* diagnostic data or substituting a second graph. Cancellation remains cooperative.
|
|
81
|
+
*/
|
|
82
|
+
export function qualifyDirectSource(input, options) {
|
|
83
|
+
const { budget } = options;
|
|
84
|
+
return budget.guard(() => {
|
|
85
|
+
const prepared = prepareSourceSchemaRequest(input, { budget, accountPreparation: true, sourceLimits: { maxNodes: options.maxNodes } });
|
|
86
|
+
if (prepared.kind !== 'prepared')
|
|
87
|
+
return prepared;
|
|
88
|
+
const { request } = prepared;
|
|
89
|
+
options.onPrepared?.(request);
|
|
90
|
+
let localEstablished = true, localDisproved = false;
|
|
91
|
+
for (const id of request.actual.members) {
|
|
92
|
+
options.check?.();
|
|
93
|
+
const found = request.actual.lookup(id);
|
|
94
|
+
if (found.kind !== 'found' || found.node.kind === 'wsdl')
|
|
95
|
+
continue;
|
|
96
|
+
const checked = checkComponentConstruction(request.actual, id);
|
|
97
|
+
if (checked.kind === 'resource-limit')
|
|
98
|
+
return checked;
|
|
99
|
+
if (checked.kind !== 'checked' || checked.re01 && !checked.re01.primitive)
|
|
100
|
+
localEstablished = false;
|
|
101
|
+
if (checked.kind === 'invalid-schema')
|
|
102
|
+
localDisproved = true;
|
|
103
|
+
options.onLocal?.(id, checked);
|
|
104
|
+
}
|
|
105
|
+
options.check?.();
|
|
106
|
+
const closure = verifyDirectActualSchema(request.actual);
|
|
107
|
+
if (closure.kind === 'resource-limit')
|
|
108
|
+
return closure;
|
|
109
|
+
options.onClosure?.(closure);
|
|
110
|
+
const correspondence = datedDirect(input, amount => budget.chargeWork(amount));
|
|
111
|
+
budget.chargeWork(64);
|
|
112
|
+
return Object.freeze({ kind: 'qualified-source', request, closure, correspondence, localEstablished, localDisproved,
|
|
113
|
+
eligible: localEstablished && closure.kind === 'checked-direct' && correspondence });
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
/** A sufficient correspondence route, deliberately smaller than the eventual approved profile. */
|
|
117
|
+
function datedDirect(input, charge) {
|
|
118
|
+
const builtins = new Set(['xs:string', 'xs:boolean', 'xs:int']);
|
|
119
|
+
const complexTypes = new Map();
|
|
120
|
+
for (const schema of input.schemas) {
|
|
121
|
+
charge(128 + schema.targetNamespace.length * 4);
|
|
122
|
+
const names = complexTypes.get(schema.targetNamespace) ?? new Set();
|
|
123
|
+
for (const node of syntaxElements(schema.syntax)) {
|
|
124
|
+
charge(128 + node.attributes.length * 32);
|
|
125
|
+
if (node.name.namespace === XSD_NAMESPACE && node.name.local === 'complexType') {
|
|
126
|
+
const name = syntaxAttribute(node, 'name');
|
|
127
|
+
if (name) {
|
|
128
|
+
charge(name.length * 4);
|
|
129
|
+
names.add(name);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
complexTypes.set(schema.targetNamespace, names);
|
|
134
|
+
}
|
|
135
|
+
const allowed = (node, names) => {
|
|
136
|
+
for (const attr of node.attributes) {
|
|
137
|
+
charge(8 + attr.value.length + attr.name.local.length);
|
|
138
|
+
if (attr.name.namespace !== '' || !names.includes(attr.name.local))
|
|
139
|
+
return false;
|
|
140
|
+
}
|
|
141
|
+
return true;
|
|
142
|
+
};
|
|
143
|
+
const scalar = (node) => {
|
|
144
|
+
const type = syntaxAttribute(node, 'type');
|
|
145
|
+
if (!type)
|
|
146
|
+
return false;
|
|
147
|
+
const split = type.split(':');
|
|
148
|
+
charge(16 + type.length);
|
|
149
|
+
return split.length === 2 && node.namespaces[split[0]] === XSD_NAMESPACE && builtins.has(`xs:${split[1]}`);
|
|
150
|
+
};
|
|
151
|
+
for (const schema of input.schemas) {
|
|
152
|
+
charge(128);
|
|
153
|
+
if (!['root', 'inline'].includes(schema.context.kind))
|
|
154
|
+
return false;
|
|
155
|
+
if (!allowed(schema.syntax, ['targetNamespace', 'elementFormDefault', 'attributeFormDefault']))
|
|
156
|
+
return false;
|
|
157
|
+
for (const declaration of syntaxElements(schema.syntax)) {
|
|
158
|
+
charge(64);
|
|
159
|
+
if (declaration.name.namespace !== XSD_NAMESPACE)
|
|
160
|
+
return false;
|
|
161
|
+
if (declaration.name.local === 'element') {
|
|
162
|
+
if (!allowed(declaration, ['name', 'type']) || syntaxElements(declaration).length)
|
|
163
|
+
return false;
|
|
164
|
+
if (!scalar(declaration)) {
|
|
165
|
+
const type = syntaxAttribute(declaration, 'type');
|
|
166
|
+
if (!type)
|
|
167
|
+
return false;
|
|
168
|
+
const [prefix, local] = type.includes(':') ? type.split(':') : ['', type];
|
|
169
|
+
const ns = declaration.namespaces[prefix] ?? '';
|
|
170
|
+
if (ns !== schema.targetNamespace || !complexTypes.get(ns)?.has(local))
|
|
171
|
+
return false;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
else if (declaration.name.local === 'complexType') {
|
|
175
|
+
if (!allowed(declaration, ['name']))
|
|
176
|
+
return false;
|
|
177
|
+
const content = syntaxElements(declaration);
|
|
178
|
+
if (content.length !== 1)
|
|
179
|
+
return false;
|
|
180
|
+
const sequence = content[0];
|
|
181
|
+
if (sequence.name.namespace !== XSD_NAMESPACE || sequence.name.local !== 'sequence' || !allowed(sequence, []))
|
|
182
|
+
return false;
|
|
183
|
+
const names = new Set();
|
|
184
|
+
for (const element of syntaxElements(sequence)) {
|
|
185
|
+
charge(128);
|
|
186
|
+
if (element.name.namespace !== XSD_NAMESPACE || element.name.local !== 'element' || !allowed(element, ['name', 'type', 'minOccurs', 'maxOccurs', 'form']) || !scalar(element) || syntaxElements(element).length)
|
|
187
|
+
return false;
|
|
188
|
+
if (!['0', '1'].includes(syntaxAttribute(element, 'minOccurs') ?? '1') || !['1', 'unbounded'].includes(syntaxAttribute(element, 'maxOccurs') ?? '1'))
|
|
189
|
+
return false;
|
|
190
|
+
const name = syntaxAttribute(element, 'name');
|
|
191
|
+
// Distinct lexical local names are stronger than distinct expanded names.
|
|
192
|
+
if (!name || names.has(name))
|
|
193
|
+
return false;
|
|
194
|
+
names.add(name);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
else
|
|
198
|
+
return false;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
return input.schemas.length > 0;
|
|
202
|
+
}
|