@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,149 @@
|
|
|
1
|
+
import { schemaRegularLanguages } from './schemaRegularLanguage.js';
|
|
2
|
+
import { schemaNumericImageConditions } from './schemaNumericImageConditions.js';
|
|
3
|
+
import { schemaIeeeLanguages } from './schemaIeeeLanguage.js';
|
|
4
|
+
export function schemaSymbolicValueSets(c, regular, numeric, ieee, expression, parseIeee, encode) {
|
|
5
|
+
const quote = (text, owner) => { c.text(text, owner); c.step(owner, text.length * 2 + 1); return expression(text.replace(/[\\.\-^?*+{}()\[\]|]/g, '\\$&').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\t/g, '\\t'), owner); };
|
|
6
|
+
const inverse = (value, owner) => ({ intervals: ieee.inverseIntervals(value, owner),
|
|
7
|
+
literals: value.canonical === 'NaN' ? ['NaN'] : value.canonical === 'Infinity' ? ['INF'] : value.canonical === '-Infinity' ? ['-INF'] : [], nonNumeric: false });
|
|
8
|
+
const includes = (set, value, owner) => {
|
|
9
|
+
c.step(owner);
|
|
10
|
+
if (set.family !== value.family)
|
|
11
|
+
return false;
|
|
12
|
+
if (set.kind === 'singleton') {
|
|
13
|
+
c.text(set.value.canonical, owner);
|
|
14
|
+
c.text(value.canonical, owner);
|
|
15
|
+
return set.value.canonical === value.canonical;
|
|
16
|
+
}
|
|
17
|
+
if (set.kind === 'regular')
|
|
18
|
+
return numeric.exists(regular.intersect([set.language, quote(encode(value, owner), owner)], owner), set.numeric, owner);
|
|
19
|
+
const cell = inverse(value, owner);
|
|
20
|
+
for (const input of set.inputs)
|
|
21
|
+
if (numeric.exists(input.language, numeric.intersection(input.numeric, cell, owner), owner))
|
|
22
|
+
return true;
|
|
23
|
+
return false;
|
|
24
|
+
};
|
|
25
|
+
const singleton = (set, owner) => {
|
|
26
|
+
let value;
|
|
27
|
+
for (const branch of set.inputs) {
|
|
28
|
+
const word = numeric.numericWitness(branch.language, branch.numeric, owner);
|
|
29
|
+
if (word !== undefined) {
|
|
30
|
+
value = parseIeee(set.family, word, owner);
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
if (!value)
|
|
35
|
+
return undefined;
|
|
36
|
+
const cell = inverse(value, owner);
|
|
37
|
+
for (const branch of set.inputs)
|
|
38
|
+
if (numeric.exists(branch.language, numeric.difference(branch.numeric, cell, owner), owner))
|
|
39
|
+
return undefined;
|
|
40
|
+
return value;
|
|
41
|
+
};
|
|
42
|
+
const satisfiable = (positive, negative, owner) => {
|
|
43
|
+
if (!positive.length)
|
|
44
|
+
throw new TypeError('A typed token product needs a positive value-domain label');
|
|
45
|
+
c.step(owner, positive.length + negative.length + 3);
|
|
46
|
+
const family = positive[0].family;
|
|
47
|
+
if (positive.some(set => set.family !== family))
|
|
48
|
+
return false;
|
|
49
|
+
const excluded = negative.filter(set => set.family === family);
|
|
50
|
+
if (positive.some(set => excluded.includes(set)))
|
|
51
|
+
return false;
|
|
52
|
+
if (family === 'float' || family === 'double') {
|
|
53
|
+
for (const supplied of positive)
|
|
54
|
+
if (supplied.kind === 'ieee')
|
|
55
|
+
for (const inherited of excluded)
|
|
56
|
+
if (inherited.kind === 'ieee') {
|
|
57
|
+
let covered = true;
|
|
58
|
+
for (const input of supplied.inputs) {
|
|
59
|
+
c.step(owner, 3);
|
|
60
|
+
let residual = [input];
|
|
61
|
+
for (const prior of inherited.inputs) {
|
|
62
|
+
c.step(owner, residual.length * 2 + 4);
|
|
63
|
+
const next = [];
|
|
64
|
+
for (const branch of residual) {
|
|
65
|
+
next.push({ language: regular.intersect([branch.language, regular.negate(prior.language, owner)], owner), numeric: branch.numeric });
|
|
66
|
+
next.push({ language: regular.intersect([branch.language, prior.language], owner), numeric: numeric.difference(branch.numeric, prior.numeric, owner) });
|
|
67
|
+
}
|
|
68
|
+
residual = next;
|
|
69
|
+
}
|
|
70
|
+
if (residual.some(branch => numeric.exists(branch.language, branch.numeric, owner))) {
|
|
71
|
+
for (const branch of residual) {
|
|
72
|
+
const word = numeric.numericWitness(branch.language, branch.numeric, owner);
|
|
73
|
+
if (word !== undefined) {
|
|
74
|
+
const value = parseIeee(supplied.family, word, owner);
|
|
75
|
+
if (positive.every(set => includes(set, value, owner)) && excluded.every(set => !includes(set, value, owner)))
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
covered = false;
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
if (covered)
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
const exact = positive.find(set => set.kind === 'singleton');
|
|
88
|
+
const test = (value) => positive.every(set => includes(set, value, owner)) && excluded.every(set => !includes(set, value, owner));
|
|
89
|
+
if (exact?.kind === 'singleton')
|
|
90
|
+
return test(exact.value);
|
|
91
|
+
if (family === 'float' || family === 'double') {
|
|
92
|
+
for (const set of positive)
|
|
93
|
+
if (set.kind === 'ieee')
|
|
94
|
+
for (const branch of set.inputs) {
|
|
95
|
+
const word = numeric.numericWitness(branch.language, branch.numeric, owner);
|
|
96
|
+
if (word !== undefined && test(parseIeee(set.family, word, owner)))
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
for (const set of positive)
|
|
100
|
+
if (set.kind === 'ieee') {
|
|
101
|
+
const point = singleton(set, owner);
|
|
102
|
+
if (point)
|
|
103
|
+
return test(point);
|
|
104
|
+
}
|
|
105
|
+
const domain = positive.find(set => set.kind === 'ieee');
|
|
106
|
+
if (domain?.kind !== 'ieee')
|
|
107
|
+
throw new TypeError('An infinite IEEE image requires an IEEE input authority');
|
|
108
|
+
for (const branch of domain.inputs) {
|
|
109
|
+
let remaining = branch.numeric;
|
|
110
|
+
for (;;) {
|
|
111
|
+
const word = numeric.numericWitness(branch.language, remaining, owner);
|
|
112
|
+
if (word === undefined)
|
|
113
|
+
break;
|
|
114
|
+
const value = parseIeee(domain.family, word, owner);
|
|
115
|
+
if (test(value))
|
|
116
|
+
return true;
|
|
117
|
+
// A failed exact membership test excludes this whole rounding cell,
|
|
118
|
+
// rather than only this spelling. Each step removes one actual IEEE
|
|
119
|
+
// value; the finite format bounds termination. Only the complete
|
|
120
|
+
// numeric witness authority can prove that no cells remain.
|
|
121
|
+
remaining = numeric.difference(remaining, inverse(value, owner), owner);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
126
|
+
c.step(owner, 3);
|
|
127
|
+
let candidates = [{ language: regular.intersect([], owner), numeric: numeric.all() }];
|
|
128
|
+
for (const set of positive) {
|
|
129
|
+
if (set.kind !== 'regular')
|
|
130
|
+
throw new TypeError('A non-IEEE infinite image requires a regular canonical value authority');
|
|
131
|
+
candidates = candidates.map(branch => ({ language: regular.intersect([branch.language, set.language], owner), numeric: numeric.intersection(branch.numeric, set.numeric, owner) }));
|
|
132
|
+
}
|
|
133
|
+
for (const set of excluded) {
|
|
134
|
+
c.step(owner, candidates.length * 2 + 3);
|
|
135
|
+
const next = [];
|
|
136
|
+
for (const branch of candidates) {
|
|
137
|
+
const language = set.kind === 'singleton' ? quote(set.encoded, owner) : set.kind === 'regular' ? set.language : undefined;
|
|
138
|
+
if (!language)
|
|
139
|
+
throw new TypeError('A non-IEEE image label has an incompatible authority');
|
|
140
|
+
next.push({ language: regular.intersect([branch.language, regular.negate(language, owner)], owner), numeric: branch.numeric });
|
|
141
|
+
if (set.kind === 'regular')
|
|
142
|
+
next.push({ language: regular.intersect([branch.language, language], owner), numeric: numeric.difference(branch.numeric, set.numeric, owner) });
|
|
143
|
+
}
|
|
144
|
+
candidates = next;
|
|
145
|
+
}
|
|
146
|
+
return candidates.some(branch => numeric.exists(branch.language, branch.numeric, owner));
|
|
147
|
+
};
|
|
148
|
+
return { includes, singleton, satisfiable };
|
|
149
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** Original component XML syntax only; aggregate schema/candidate checking is separate. */
|
|
2
|
+
import type { NodeId } from "./canonicalGraph.js";
|
|
3
|
+
import type { SemanticContext } from "./semanticContext.js";
|
|
4
|
+
import type { ResourceLimitFailure } from "./semanticBudget.js";
|
|
5
|
+
import type { SyntaxSource } from "../loader/orderedSyntax.js";
|
|
6
|
+
export type ActualSyntaxResult = Readonly<{
|
|
7
|
+
kind: 'checked';
|
|
8
|
+
contextId: string;
|
|
9
|
+
component: NodeId;
|
|
10
|
+
authority: 'XSD10-original-component-syntax-v1';
|
|
11
|
+
scope: 'original-component-source-syntax';
|
|
12
|
+
remaining: readonly ['schema-document-syntax', 'child-component-syntax', 'semantic-construction'];
|
|
13
|
+
}> | Readonly<{
|
|
14
|
+
kind: 'invalid-schema' | 'unsupported-capability' | 'unresolved';
|
|
15
|
+
rule: string;
|
|
16
|
+
component: NodeId;
|
|
17
|
+
message: string;
|
|
18
|
+
source?: SyntaxSource;
|
|
19
|
+
}> | ResourceLimitFailure;
|
|
20
|
+
/**
|
|
21
|
+
* Checks the source slice retained by the canonical node. This is not a complete
|
|
22
|
+
* schema-for-schemas validator, and has no hypothetical-construction authority.
|
|
23
|
+
*/
|
|
24
|
+
export declare function checkActualSchemaSyntax(context: SemanticContext, nodeId: NodeId): ActualSyntaxResult;
|
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
import { schemaScalarContext, SchemaAssessmentError } from "./schemaScalarContext.js";
|
|
2
|
+
import { assertSemanticContext } from "./semanticContext.js";
|
|
3
|
+
import { isXmlNCName, XSD_NAMESPACE } from "../loader/orderedSyntax.js";
|
|
4
|
+
import { normalizeWhitespace } from "./schemaDatatypeValues.js";
|
|
5
|
+
import { declarationMethods, RelationProblem } from "./schemaTypeRelations.js";
|
|
6
|
+
import { schemaBooleanLexical, schemaNonNegativeIntegerLexical } from './schemaSourceLexical.js';
|
|
7
|
+
const facetNames = new Set(["length", "minLength", "maxLength", "pattern", "enumeration", "whiteSpace", "minInclusive", "maxInclusive", "minExclusive", "maxExclusive", "totalDigits", "fractionDigits"]);
|
|
8
|
+
const particleNames = new Set(["sequence", "choice", "all", "group"]);
|
|
9
|
+
const excluded = new Set(["key", "keyref", "unique", "assert", "assertion", "alternative", "openContent", "defaultOpenContent", "explicitTimezone", "redefine"]);
|
|
10
|
+
function sameSource(c, node, left, right) {
|
|
11
|
+
c.step(node, 12);
|
|
12
|
+
return c.budget.compareText(left.uri, right.uri) === 0 && c.budget.compareText(left.digest, right.digest) === 0
|
|
13
|
+
&& c.budget.compareText(left.path, right.path) === 0
|
|
14
|
+
&& left.start.offset === right.start.offset && left.end.offset === right.end.offset
|
|
15
|
+
&& left.start.line === right.start.line && left.start.column === right.start.column
|
|
16
|
+
&& left.end.line === right.end.line && left.end.column === right.end.column;
|
|
17
|
+
}
|
|
18
|
+
/** The builder represents one local element source as declaration and use.
|
|
19
|
+
* Its retained inline child belongs to the exact declaration's anonymous type.
|
|
20
|
+
*/
|
|
21
|
+
function particleInlineType(c, node) {
|
|
22
|
+
c.step(node, 12);
|
|
23
|
+
if (node.kind !== "particle" || node.term.kind !== "element" || node.term.declaration.kind !== "local"
|
|
24
|
+
|| node.identity.kind !== "scoped")
|
|
25
|
+
return;
|
|
26
|
+
const declaration = c.get(node.term.declaration.target);
|
|
27
|
+
if (declaration.kind !== "element" || declaration.identity.kind !== "scoped" || declaration.type.kind !== "local"
|
|
28
|
+
|| c.budget.compareText(declaration.identity.owner, node.identity.owner) !== 0
|
|
29
|
+
|| !sameSource(c, node, declaration.context.source, node.context.source))
|
|
30
|
+
return;
|
|
31
|
+
const type = c.get(declaration.type.target);
|
|
32
|
+
if ((type.kind !== "simpleType" && type.kind !== "complexType") || type.identity.kind !== "scoped"
|
|
33
|
+
|| c.budget.compareText(type.identity.owner, declaration.id) !== 0)
|
|
34
|
+
return;
|
|
35
|
+
const source = type.context.source, owner = declaration.context.source;
|
|
36
|
+
c.text(source.path, node);
|
|
37
|
+
c.text(owner.path, node);
|
|
38
|
+
c.step(node, 6);
|
|
39
|
+
const prefix = owner.path + "/";
|
|
40
|
+
if (c.budget.compareText(source.uri, owner.uri) !== 0 || c.budget.compareText(source.digest, owner.digest) !== 0
|
|
41
|
+
|| !source.path.startsWith(prefix) || source.path.slice(prefix.length).includes("/")
|
|
42
|
+
|| source.start.offset < owner.start.offset || source.end.offset > owner.end.offset)
|
|
43
|
+
return;
|
|
44
|
+
return type;
|
|
45
|
+
}
|
|
46
|
+
function checkSchemaSyntax(c, node) {
|
|
47
|
+
if (node.kind === "wsdl")
|
|
48
|
+
return;
|
|
49
|
+
// Fixed grammar tables/closures below are bounded per component; reserve them
|
|
50
|
+
// before allocation. Input-sized traversal and output are charged separately.
|
|
51
|
+
c.step(node, 300);
|
|
52
|
+
const fail = (message, source = node.context.source) => c.fail(node, "schema-for-schemas", message, source);
|
|
53
|
+
const attrs = (attributes, allowed, source, facet = false) => {
|
|
54
|
+
for (const a of attributes) {
|
|
55
|
+
c.step(node);
|
|
56
|
+
c.text(a.name.local, node);
|
|
57
|
+
c.text(a.value, node);
|
|
58
|
+
if (a.name.namespace === XSD_NAMESPACE || !a.name.namespace && !allowed.includes(a.name.local))
|
|
59
|
+
fail("Attribute is not permitted in this XSD syntax context", source);
|
|
60
|
+
if (!a.name.namespace && a.name.local === "id" && !isXmlNCName(normalizeWhitespace(a.value, "collapse")))
|
|
61
|
+
fail("Schema id must be an XML NCName", source);
|
|
62
|
+
if (!a.name.namespace && (["abstract", "nillable", "mixed"].includes(a.name.local) || facet && a.name.local === "fixed") && !schemaBooleanLexical(a.value))
|
|
63
|
+
fail("Invalid XML Schema boolean spelling", source);
|
|
64
|
+
if (!a.name.namespace && ["minOccurs", "maxOccurs"].includes(a.name.local)) {
|
|
65
|
+
const value = normalizeWhitespace(a.value, "collapse");
|
|
66
|
+
if (!(a.name.local === "maxOccurs" && value === "unbounded") && !schemaNonNegativeIntegerLexical(value))
|
|
67
|
+
fail("Occurrence requires an exact nonnegative integer", source);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
const global = node.identity.kind === "global", common = ["id"];
|
|
72
|
+
let allowed;
|
|
73
|
+
switch (node.kind) {
|
|
74
|
+
case "element":
|
|
75
|
+
allowed = [...common, "name", "type", "default", "fixed", "nillable", "block", ...(global ? ["abstract", "final", "substitutionGroup"] : ["form", "minOccurs", "maxOccurs"])];
|
|
76
|
+
break;
|
|
77
|
+
case "attribute":
|
|
78
|
+
allowed = [...common, "name", "type", "default", "fixed", ...(global ? [] : ["form", "use"])];
|
|
79
|
+
break;
|
|
80
|
+
case "complexType":
|
|
81
|
+
allowed = [...common, "mixed", ...(global ? ["name", "abstract", "final", "block"] : [])];
|
|
82
|
+
break;
|
|
83
|
+
case "simpleType":
|
|
84
|
+
allowed = [...common, ...(global ? ["name", "final"] : [])];
|
|
85
|
+
break;
|
|
86
|
+
case "group":
|
|
87
|
+
case "attributeGroup":
|
|
88
|
+
allowed = [...common, "name"];
|
|
89
|
+
break;
|
|
90
|
+
case "attributeGroupUse":
|
|
91
|
+
allowed = [...common, "ref"];
|
|
92
|
+
break;
|
|
93
|
+
case "attributeWildcard":
|
|
94
|
+
allowed = [...common, "namespace", "processContents"];
|
|
95
|
+
break;
|
|
96
|
+
case "attributeUse":
|
|
97
|
+
allowed = [...common, "name", "ref", "type", "default", "fixed", "form", "use"];
|
|
98
|
+
break;
|
|
99
|
+
case "particle": {
|
|
100
|
+
const bounds = [...common, "minOccurs", "maxOccurs"];
|
|
101
|
+
allowed = node.term.kind === "any" ? [...bounds, "namespace", "processContents"] : node.term.kind === "group" ? [...bounds, "ref"]
|
|
102
|
+
: node.term.kind !== "element" ? bounds : node.term.declaration.kind === "symbol" ? [...bounds, "ref"] : [...bounds, "name", "type", "default", "fixed", "nillable", "block", "form"];
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
c.step(node, allowed.length + common.length + 16);
|
|
107
|
+
attrs(node.declaredAttributes, allowed, node.context.source);
|
|
108
|
+
attrs(node.context.schemaAttributes, ["id", "attributeFormDefault", "elementFormDefault", "blockDefault", "finalDefault", "targetNamespace", "version"], node.context.source);
|
|
109
|
+
for (const a of node.context.schemaAttributes) {
|
|
110
|
+
c.step(node, 12);
|
|
111
|
+
c.text(a.value, node);
|
|
112
|
+
if (!a.name.namespace && ["attributeFormDefault", "elementFormDefault"].includes(a.name.local)
|
|
113
|
+
&& !["qualified", "unqualified"].includes(normalizeWhitespace(a.value, "collapse")))
|
|
114
|
+
fail("Invalid schema form default");
|
|
115
|
+
}
|
|
116
|
+
for (const a of node.declaredAttributes) {
|
|
117
|
+
c.step(node, 30);
|
|
118
|
+
c.text(a.value, node);
|
|
119
|
+
if (!a.name.namespace && ["form", "processContents", "use", "whiteSpace"].includes(a.name.local)) {
|
|
120
|
+
const domains = { form: ["qualified", "unqualified"], processContents: ["strict", "lax", "skip"], use: ["optional", "required", "prohibited"] };
|
|
121
|
+
if (domains[a.name.local] && !domains[a.name.local].includes(normalizeWhitespace(a.value, "collapse")))
|
|
122
|
+
fail("Invalid XSD token spelling");
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
// Graph construction retains roles and source positions rather than a
|
|
126
|
+
// second syntax tree. Reconstruct direct-child ordering from those original
|
|
127
|
+
// positions; do not infer it from composed/flattened properties.
|
|
128
|
+
c.step(node);
|
|
129
|
+
const children = [];
|
|
130
|
+
const child = (role, source) => {
|
|
131
|
+
c.step(node);
|
|
132
|
+
c.text(source.path, node);
|
|
133
|
+
c.text(node.context.source.path, node);
|
|
134
|
+
c.text(source.uri, node);
|
|
135
|
+
c.text(node.context.source.uri, node);
|
|
136
|
+
const prefix = node.context.source.path + "/";
|
|
137
|
+
if (source.uri === node.context.source.uri && source.path.startsWith(prefix) && !source.path.slice(prefix.length).includes("/")) {
|
|
138
|
+
c.step(node, 4);
|
|
139
|
+
children.push({ role, source });
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
for (const annotation of node.annotations)
|
|
143
|
+
child("annotation", annotation.source);
|
|
144
|
+
for (const syntax of node.syntaxDetails)
|
|
145
|
+
child("content", syntax.source);
|
|
146
|
+
if (node.kind === "complexType") {
|
|
147
|
+
if (node.content)
|
|
148
|
+
child("content", c.get(node.content).context.source);
|
|
149
|
+
for (const id of node.attributes) {
|
|
150
|
+
const n = c.get(id);
|
|
151
|
+
child(n.kind === "attributeWildcard" ? "wildcard" : "attribute", n.context.source);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
else if (node.kind === "attributeGroup") {
|
|
155
|
+
for (const id of node.attributes) {
|
|
156
|
+
const n = c.get(id);
|
|
157
|
+
child(n.kind === "attributeWildcard" ? "wildcard" : "attribute", n.context.source);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
else if (node.kind === "group")
|
|
161
|
+
child("content", c.get(node.content).context.source);
|
|
162
|
+
else if (node.kind === "particle" && "children" in node.term)
|
|
163
|
+
for (const id of node.term.children)
|
|
164
|
+
child("member", c.get(id).context.source);
|
|
165
|
+
else if (node.kind === "particle") {
|
|
166
|
+
const type = particleInlineType(c, node);
|
|
167
|
+
if (type)
|
|
168
|
+
child("content", type.context.source);
|
|
169
|
+
}
|
|
170
|
+
else if ((node.kind === "element" || node.kind === "attribute") && node.type.kind === "local")
|
|
171
|
+
child("content", c.get(node.type.target).context.source);
|
|
172
|
+
const ordered = c.budget.sorted(children, (a, b) => { c.step(node); return a.source.start.offset - b.source.start.offset; });
|
|
173
|
+
let seenAnnotation = false, seenContent = false, stage = 0;
|
|
174
|
+
for (const item of ordered) {
|
|
175
|
+
c.step(node);
|
|
176
|
+
if (item.role === "annotation") {
|
|
177
|
+
if (stage || seenAnnotation)
|
|
178
|
+
fail("Annotation must occur once before declaration content", item.source);
|
|
179
|
+
seenAnnotation = true;
|
|
180
|
+
continue;
|
|
181
|
+
}
|
|
182
|
+
const next = item.role === "content" || item.role === "member" ? 1 : item.role === "attribute" ? 2 : 3;
|
|
183
|
+
if (item.role === "content") {
|
|
184
|
+
if (seenContent)
|
|
185
|
+
fail("Declaration permits at most one content child", item.source);
|
|
186
|
+
seenContent = true;
|
|
187
|
+
}
|
|
188
|
+
if (next < stage || stage === 3)
|
|
189
|
+
fail("Declaration child violates the XSD source ordering", item.source);
|
|
190
|
+
stage = next;
|
|
191
|
+
}
|
|
192
|
+
c.step(node, node.declaredAttributes.length * 4);
|
|
193
|
+
if (node.kind === "attributeUse" && node.declaredAttributes.some(a => !a.name.namespace && a.name.local === "default")
|
|
194
|
+
&& node.use !== "optional")
|
|
195
|
+
c.fail(node, "src-attribute", "Attribute source default requires an optional use");
|
|
196
|
+
for (const attribute of node.context.schemaAttributes) {
|
|
197
|
+
c.step(node);
|
|
198
|
+
if (attribute.name.namespace || !["finalDefault", "blockDefault"].includes(attribute.name.local))
|
|
199
|
+
continue;
|
|
200
|
+
c.text(attribute.value, node);
|
|
201
|
+
const tokens = normalizeWhitespace(attribute.value, "collapse").split(" ").filter(Boolean);
|
|
202
|
+
const allowed = attribute.name.local === "finalDefault" ? ["extension", "restriction", "list", "union"] : ["extension", "restriction", "substitution"];
|
|
203
|
+
if (!(tokens.length === 1 && tokens[0] === "#all") && tokens.some(t => !allowed.includes(t)))
|
|
204
|
+
fail("Invalid schema default derivation set");
|
|
205
|
+
}
|
|
206
|
+
if (node.kind === "attribute" && (node.name.local === "xmlns" || node.name.namespace === "http://www.w3.org/2001/XMLSchema-instance"))
|
|
207
|
+
c.fail(node, "no-xmlns/no-xsi", "User attribute declaration uses a reserved XML Schema name");
|
|
208
|
+
if (node.kind === "simpleType" || node.kind === "complexType") {
|
|
209
|
+
for (const syntax of node.syntaxDetails) {
|
|
210
|
+
c.step(node, 40);
|
|
211
|
+
if (node.kind === "simpleType")
|
|
212
|
+
checkBody(syntax, "scalar");
|
|
213
|
+
else {
|
|
214
|
+
attrs(syntax.attributes, ["id", ...(syntax.name.local === "complexContent" ? ["mixed"] : [])], syntax.source);
|
|
215
|
+
const children = elements(syntax);
|
|
216
|
+
let body, annotation = false;
|
|
217
|
+
for (const child of children) {
|
|
218
|
+
c.step(node);
|
|
219
|
+
if (child.name.local === "annotation" && child.name.namespace === XSD_NAMESPACE && !body && !annotation) {
|
|
220
|
+
annotation = true;
|
|
221
|
+
continue;
|
|
222
|
+
}
|
|
223
|
+
if (body || child.name.namespace !== XSD_NAMESPACE || !["restriction", "extension"].includes(child.name.local))
|
|
224
|
+
fail("Content wrapper requires one restriction or extension after annotation", child.source);
|
|
225
|
+
body = child;
|
|
226
|
+
}
|
|
227
|
+
if (!body)
|
|
228
|
+
fail("Missing content derivation", syntax.source);
|
|
229
|
+
checkBody(body, syntax.name.local === "complexContent" ? "complex" : "simple");
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
function elements(syntax) {
|
|
234
|
+
c.step(node);
|
|
235
|
+
const result = [];
|
|
236
|
+
for (const child of syntax.children) {
|
|
237
|
+
c.step(node, 2);
|
|
238
|
+
if (child.kind === "element")
|
|
239
|
+
result.push(child);
|
|
240
|
+
else {
|
|
241
|
+
c.text(child.value, node);
|
|
242
|
+
if (/[^\t\r\n ]/.test(child.value))
|
|
243
|
+
fail("XSD declaration requires element-only syntax", child.source);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
return result;
|
|
247
|
+
}
|
|
248
|
+
function checkBody(body, context) {
|
|
249
|
+
c.step(node, 50);
|
|
250
|
+
attrs(body.attributes, ["id", body.name.local === "list" ? "itemType" : body.name.local === "union" ? "memberTypes" : "base"], body.source);
|
|
251
|
+
let stage = 0, annotation = false, scalarType = false, particle = false, wildcard = false;
|
|
252
|
+
for (const child of elements(body)) {
|
|
253
|
+
c.step(node, 40);
|
|
254
|
+
const name = child.name.local;
|
|
255
|
+
if (child.name.namespace !== XSD_NAMESPACE)
|
|
256
|
+
fail("Foreign child belongs in annotation/appinfo", child.source);
|
|
257
|
+
if (excluded.has(name))
|
|
258
|
+
c.unsupported(node, `xsd:${name}`, "Excluded schema feature is retained for capability diagnosis", child.source);
|
|
259
|
+
if (name === "annotation") {
|
|
260
|
+
if (stage || annotation)
|
|
261
|
+
fail("Annotation must occur once before the content", child.source);
|
|
262
|
+
annotation = true;
|
|
263
|
+
continue;
|
|
264
|
+
}
|
|
265
|
+
if (name === "simpleType" && (context === "scalar" || context === "simple" && body.name.local === "restriction")
|
|
266
|
+
&& stage <= 1 && (body.name.local === "union" || !scalarType)) {
|
|
267
|
+
scalarType = true;
|
|
268
|
+
stage = 1;
|
|
269
|
+
continue;
|
|
270
|
+
}
|
|
271
|
+
if (facetNames.has(name) && body.name.local === "restriction" && context !== "complex" && stage <= 2) {
|
|
272
|
+
stage = 2;
|
|
273
|
+
attrs(child.attributes, ["id", "value", ...(["enumeration", "pattern"].includes(name) ? [] : ["fixed"])], child.source, true);
|
|
274
|
+
const contents = elements(child);
|
|
275
|
+
if (contents.length > 1 || contents.some(n => n.name.namespace !== XSD_NAMESPACE || n.name.local !== "annotation"))
|
|
276
|
+
fail("Facet permits only an optional annotation", child.source);
|
|
277
|
+
continue;
|
|
278
|
+
}
|
|
279
|
+
if (context === "complex" && particleNames.has(name) && stage < 3 && !particle) {
|
|
280
|
+
particle = true;
|
|
281
|
+
stage = 3;
|
|
282
|
+
continue;
|
|
283
|
+
}
|
|
284
|
+
if (context !== "scalar" && ["attribute", "attributeGroup"].includes(name) && !wildcard) {
|
|
285
|
+
stage = 4;
|
|
286
|
+
continue;
|
|
287
|
+
}
|
|
288
|
+
if (context !== "scalar" && name === "anyAttribute" && !wildcard) {
|
|
289
|
+
stage = 5;
|
|
290
|
+
wildcard = true;
|
|
291
|
+
continue;
|
|
292
|
+
}
|
|
293
|
+
fail("Child is not permitted at this position in the XSD content grammar", child.source);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Checks the source slice retained by the canonical node. This is not a complete
|
|
299
|
+
* schema-for-schemas validator, and has no hypothetical-construction authority.
|
|
300
|
+
*/
|
|
301
|
+
export function checkActualSchemaSyntax(context, nodeId) {
|
|
302
|
+
assertSemanticContext(context);
|
|
303
|
+
return context.budget.guard(() => {
|
|
304
|
+
const b = context.budget;
|
|
305
|
+
b.chargeWork(200 + nodeId.length);
|
|
306
|
+
const publish = (result) => b.freeze(b.snapshot(result));
|
|
307
|
+
if (context.kind !== 'actual')
|
|
308
|
+
return publish({ kind: 'unresolved', rule: 'actual-source-only',
|
|
309
|
+
component: nodeId, message: 'Hypothetical components do not acquire XML source representation obligations' });
|
|
310
|
+
const found = context.lookup(nodeId);
|
|
311
|
+
if (found.kind !== 'found')
|
|
312
|
+
return publish({ kind: 'unresolved', rule: 'src-resolve',
|
|
313
|
+
component: nodeId, message: `Original component is ${found.kind}` });
|
|
314
|
+
const node = found.node;
|
|
315
|
+
if (node.kind === 'wsdl')
|
|
316
|
+
return publish({ kind: 'unresolved', rule: 'xsd-source-only',
|
|
317
|
+
component: node.id, source: node.context.source, message: 'WSDL representation is outside the XSD source owner' });
|
|
318
|
+
const c = schemaScalarContext(context);
|
|
319
|
+
c.setCurrent(node);
|
|
320
|
+
try {
|
|
321
|
+
checkSchemaSyntax(c, node);
|
|
322
|
+
declarationMethods(context, node, 'final');
|
|
323
|
+
declarationMethods(context, node, 'block');
|
|
324
|
+
const inline = node.retained.length ? particleInlineType(c, node) : undefined;
|
|
325
|
+
let inlineSeen = false;
|
|
326
|
+
for (const retained of node.retained) {
|
|
327
|
+
c.step(node);
|
|
328
|
+
c.text(retained.name.local, node);
|
|
329
|
+
if (!inlineSeen && inline && retained.name.namespace === XSD_NAMESPACE && retained.name.local === inline.kind
|
|
330
|
+
&& sameSource(c, node, retained.source, inline.context.source)) {
|
|
331
|
+
inlineSeen = true;
|
|
332
|
+
continue;
|
|
333
|
+
}
|
|
334
|
+
if (retained.name.namespace === XSD_NAMESPACE && ['key', 'unique', 'keyref'].includes(retained.name.local)
|
|
335
|
+
&& context.originalIdentityConstraints().ownsSyntax(node, retained))
|
|
336
|
+
continue;
|
|
337
|
+
if (retained.name.namespace === XSD_NAMESPACE && excluded.has(retained.name.local))
|
|
338
|
+
c.unsupported(node, `xsd:${retained.name.local}`, 'Retained feature needs its separate capability authority', retained.source);
|
|
339
|
+
c.fail(node, 'schema-for-schemas', 'Unexpected child in the declaration content grammar', retained.source);
|
|
340
|
+
}
|
|
341
|
+
if (node.kind === 'group') {
|
|
342
|
+
const content = c.get(node.content);
|
|
343
|
+
c.step(node, content.declaredAttributes.length);
|
|
344
|
+
if (content.kind !== 'particle' || content.declaredAttributes.some(a => !a.name.namespace && ['minOccurs', 'maxOccurs'].includes(a.name.local)))
|
|
345
|
+
c.fail(node, 'src-group', 'Named group compositors cannot declare occurrence attributes');
|
|
346
|
+
}
|
|
347
|
+
return publish({ kind: 'checked', contextId: context.contextId, component: node.id,
|
|
348
|
+
authority: 'XSD10-original-component-syntax-v1', scope: 'original-component-source-syntax',
|
|
349
|
+
remaining: ['schema-document-syntax', 'child-component-syntax', 'semantic-construction'] });
|
|
350
|
+
}
|
|
351
|
+
catch (error) {
|
|
352
|
+
if (error instanceof RelationProblem)
|
|
353
|
+
return publish({ kind: error.result.kind === 'invalid-input' ? 'invalid-schema' : 'unresolved',
|
|
354
|
+
rule: error.result.rule, component: node.id, message: error.result.message, source: node.context.source });
|
|
355
|
+
if (!(error instanceof SchemaAssessmentError))
|
|
356
|
+
throw error;
|
|
357
|
+
return publish({ kind: error.category === 'missing-prerequisite' || error.category === 'scalar-indeterminate'
|
|
358
|
+
? 'unresolved' : error.category, rule: error.rule, component: node.id, message: error.message, source: error.source });
|
|
359
|
+
}
|
|
360
|
+
});
|
|
361
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Calendar, Duration } from './schemaExactCalendar.js';
|
|
2
|
+
import type { SchemaPatternContext } from './schemaValueContext.js';
|
|
3
|
+
export declare function calendarAliasExpressions<Owner>(calendar: Calendar, owner: Owner, c: SchemaPatternContext<Owner>): Generator<string>;
|
|
4
|
+
/** Finite field decompositions, each with its complete infinite zero aliases. */
|
|
5
|
+
export declare function durationAliasExpressions<Owner>(duration: Duration, owner: Owner, c: SchemaPatternContext<Owner>, canMatch: (expression: string) => boolean): Generator<string>;
|