@techspokes/typescript-wsdl-client 1.1.4 → 1.1.5
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 +49 -1
- package/dist/app/generateApp.d.ts.map +1 -1
- package/dist/app/generateApp.js +8 -6
- package/dist/cli.js +49 -5
- package/dist/client/checkedDirectRuntime.d.ts +59 -0
- package/dist/client/checkedDirectRuntime.d.ts.map +1 -0
- package/dist/client/checkedDirectRuntime.js +23 -0
- package/dist/client/directClientRuntime.d.ts +49 -0
- package/dist/client/directClientRuntime.d.ts.map +1 -0
- package/dist/client/directClientRuntime.js +112 -0
- package/dist/client/directClientVersion.d.ts +4 -0
- package/dist/client/directClientVersion.d.ts.map +1 -0
- package/dist/client/directClientVersion.js +3 -0
- package/dist/client/generateDirectClient.d.ts +14 -0
- package/dist/client/generateDirectClient.d.ts.map +1 -0
- package/dist/client/generateDirectClient.js +136 -0
- package/dist/compiler/buildCanonicalGraph.d.ts +7 -0
- package/dist/compiler/buildCanonicalGraph.d.ts.map +1 -0
- package/dist/compiler/buildCanonicalGraph.js +381 -0
- package/dist/compiler/canonicalGraph.d.ts +198 -0
- package/dist/compiler/canonicalGraph.d.ts.map +1 -0
- package/dist/compiler/canonicalGraph.js +37 -0
- package/dist/compiler/catalogErrors.d.ts +18 -0
- package/dist/compiler/catalogErrors.d.ts.map +1 -0
- package/dist/compiler/catalogErrors.js +86 -0
- package/dist/compiler/catalogProvenance.d.ts +15 -0
- package/dist/compiler/catalogProvenance.d.ts.map +1 -0
- package/dist/compiler/catalogProvenance.js +229 -0
- package/dist/compiler/checkedAssessment.d.ts +91 -0
- package/dist/compiler/checkedAssessment.d.ts.map +1 -0
- package/dist/compiler/checkedAssessment.js +300 -0
- package/dist/compiler/checkedSourcePreparation.d.ts +35 -0
- package/dist/compiler/checkedSourcePreparation.d.ts.map +1 -0
- package/dist/compiler/checkedSourcePreparation.js +131 -0
- package/dist/compiler/complexTypeContent.d.ts +59 -0
- package/dist/compiler/complexTypeContent.d.ts.map +1 -0
- package/dist/compiler/complexTypeContent.js +558 -0
- package/dist/compiler/composeCanonicalGraph.d.ts +69 -0
- package/dist/compiler/composeCanonicalGraph.d.ts.map +1 -0
- package/dist/compiler/composeCanonicalGraph.js +252 -0
- package/dist/compiler/dataOwnership.d.ts +22 -0
- package/dist/compiler/dataOwnership.d.ts.map +1 -0
- package/dist/compiler/dataOwnership.js +157 -0
- package/dist/compiler/datatypeValues.d.ts +47 -0
- package/dist/compiler/datatypeValues.d.ts.map +1 -0
- package/dist/compiler/datatypeValues.js +275 -0
- package/dist/compiler/directCodec.d.ts +59 -0
- package/dist/compiler/directCodec.d.ts.map +1 -0
- package/dist/compiler/directCodec.js +192 -0
- package/dist/compiler/directExecutionPolicy.d.ts +10 -0
- package/dist/compiler/directExecutionPolicy.d.ts.map +1 -0
- package/dist/compiler/directExecutionPolicy.js +17 -0
- package/dist/compiler/directOperation.d.ts +72 -0
- package/dist/compiler/directOperation.d.ts.map +1 -0
- package/dist/compiler/directOperation.js +282 -0
- package/dist/compiler/directSoap.d.ts +42 -0
- package/dist/compiler/directSoap.d.ts.map +1 -0
- package/dist/compiler/directSoap.js +298 -0
- package/dist/compiler/directSoapSource.d.ts +15 -0
- package/dist/compiler/directSoapSource.d.ts.map +1 -0
- package/dist/compiler/directSoapSource.js +86 -0
- package/dist/compiler/directSourceCapsule.d.ts +97 -0
- package/dist/compiler/directSourceCapsule.d.ts.map +1 -0
- package/dist/compiler/directSourceCapsule.js +305 -0
- package/dist/compiler/directStructure.d.ts +51 -0
- package/dist/compiler/directStructure.d.ts.map +1 -0
- package/dist/compiler/directStructure.js +252 -0
- package/dist/compiler/directStructurePlan.d.ts +16 -0
- package/dist/compiler/directStructurePlan.d.ts.map +1 -0
- package/dist/compiler/directStructurePlan.js +58 -0
- package/dist/compiler/directValues.d.ts +69 -0
- package/dist/compiler/directValues.d.ts.map +1 -0
- package/dist/compiler/directValues.js +282 -0
- package/dist/compiler/finiteRe01Verification.d.ts +140 -0
- package/dist/compiler/finiteRe01Verification.d.ts.map +1 -0
- package/dist/compiler/finiteRe01Verification.js +830 -0
- package/dist/compiler/graphTraversal.d.ts +11 -0
- package/dist/compiler/graphTraversal.d.ts.map +1 -0
- package/dist/compiler/graphTraversal.js +37 -0
- package/dist/compiler/hypotheticalScopedIdentity.d.ts +23 -0
- package/dist/compiler/hypotheticalScopedIdentity.d.ts.map +1 -0
- package/dist/compiler/hypotheticalScopedIdentity.js +81 -0
- package/dist/compiler/occurrenceAnalysis.d.ts +65 -0
- package/dist/compiler/occurrenceAnalysis.d.ts.map +1 -0
- package/dist/compiler/occurrenceAnalysis.js +300 -0
- package/dist/compiler/originalSourceMembership.d.ts +6 -0
- package/dist/compiler/originalSourceMembership.d.ts.map +1 -0
- package/dist/compiler/originalSourceMembership.js +31 -0
- package/dist/compiler/particleAttribution.d.ts +17 -0
- package/dist/compiler/particleAttribution.d.ts.map +1 -0
- package/dist/compiler/particleAttribution.js +474 -0
- package/dist/compiler/particleDeclarationConsistency.d.ts +24 -0
- package/dist/compiler/particleDeclarationConsistency.d.ts.map +1 -0
- package/dist/compiler/particleDeclarationConsistency.js +197 -0
- package/dist/compiler/particleExtension.d.ts +22 -0
- package/dist/compiler/particleExtension.d.ts.map +1 -0
- package/dist/compiler/particleExtension.js +119 -0
- package/dist/compiler/particleLocalAssessment.d.ts +20 -0
- package/dist/compiler/particleLocalAssessment.d.ts.map +1 -0
- package/dist/compiler/particleLocalAssessment.js +92 -0
- package/dist/compiler/particleRestriction.d.ts +24 -0
- package/dist/compiler/particleRestriction.d.ts.map +1 -0
- package/dist/compiler/particleRestriction.js +489 -0
- package/dist/compiler/particleSemanticView.d.ts +50 -0
- package/dist/compiler/particleSemanticView.d.ts.map +1 -0
- package/dist/compiler/particleSemanticView.js +297 -0
- package/dist/compiler/particleWildcardRelation.d.ts +88 -0
- package/dist/compiler/particleWildcardRelation.d.ts.map +1 -0
- package/dist/compiler/particleWildcardRelation.js +143 -0
- package/dist/compiler/re01CandidateCorrespondence.d.ts +64 -0
- package/dist/compiler/re01CandidateCorrespondence.d.ts.map +1 -0
- package/dist/compiler/re01CandidateCorrespondence.js +572 -0
- package/dist/compiler/re01TypeProperties.d.ts +71 -0
- package/dist/compiler/re01TypeProperties.d.ts.map +1 -0
- package/dist/compiler/re01TypeProperties.js +120 -0
- package/dist/compiler/re01TypePropertyValidation.d.ts +23 -0
- package/dist/compiler/re01TypePropertyValidation.d.ts.map +1 -0
- package/dist/compiler/re01TypePropertyValidation.js +161 -0
- package/dist/compiler/resolveCanonicalGraph.d.ts +38 -0
- package/dist/compiler/resolveCanonicalGraph.d.ts.map +1 -0
- package/dist/compiler/resolveCanonicalGraph.js +170 -0
- package/dist/compiler/scalarSchemaAssessment.d.ts +425 -0
- package/dist/compiler/scalarSchemaAssessment.d.ts.map +1 -0
- package/dist/compiler/scalarSchemaAssessment.js +5198 -0
- package/dist/compiler/schemaAttributeGroupProperties.d.ts +17 -0
- package/dist/compiler/schemaAttributeGroupProperties.d.ts.map +1 -0
- package/dist/compiler/schemaAttributeGroupProperties.js +53 -0
- package/dist/compiler/schemaAttributeProperties.d.ts +10 -0
- package/dist/compiler/schemaAttributeProperties.d.ts.map +1 -0
- package/dist/compiler/schemaAttributeProperties.js +11 -0
- package/dist/compiler/schemaAttributeUses.d.ts +90 -0
- package/dist/compiler/schemaAttributeUses.d.ts.map +1 -0
- package/dist/compiler/schemaAttributeUses.js +725 -0
- package/dist/compiler/schemaBinaryWordReconstruction.d.ts +10 -0
- package/dist/compiler/schemaBinaryWordReconstruction.d.ts.map +1 -0
- package/dist/compiler/schemaBinaryWordReconstruction.js +33 -0
- package/dist/compiler/schemaBuiltinFacets.d.ts +14 -0
- package/dist/compiler/schemaBuiltinFacets.d.ts.map +1 -0
- package/dist/compiler/schemaBuiltinFacets.js +51 -0
- package/dist/compiler/schemaCalendarImages.d.ts +8 -0
- package/dist/compiler/schemaCalendarImages.d.ts.map +1 -0
- package/dist/compiler/schemaCalendarImages.js +204 -0
- package/dist/compiler/schemaCalendarLanguage.d.ts +11 -0
- package/dist/compiler/schemaCalendarLanguage.d.ts.map +1 -0
- package/dist/compiler/schemaCalendarLanguage.js +227 -0
- package/dist/compiler/schemaComponentEquality.d.ts +28 -0
- package/dist/compiler/schemaComponentEquality.d.ts.map +1 -0
- package/dist/compiler/schemaComponentEquality.js +446 -0
- package/dist/compiler/schemaConstructionAssessment.d.ts +46 -0
- package/dist/compiler/schemaConstructionAssessment.d.ts.map +1 -0
- package/dist/compiler/schemaConstructionAssessment.js +663 -0
- package/dist/compiler/schemaDatatypeValues.d.ts +4 -0
- package/dist/compiler/schemaDatatypeValues.d.ts.map +1 -0
- package/dist/compiler/schemaDatatypeValues.js +2 -0
- package/dist/compiler/schemaDecimalLanguage.d.ts +7 -0
- package/dist/compiler/schemaDecimalLanguage.d.ts.map +1 -0
- package/dist/compiler/schemaDecimalLanguage.js +102 -0
- package/dist/compiler/schemaDeclarationPrimitives.d.ts +34 -0
- package/dist/compiler/schemaDeclarationPrimitives.d.ts.map +1 -0
- package/dist/compiler/schemaDeclarationPrimitives.js +194 -0
- package/dist/compiler/schemaDocumentSyntax.d.ts +55 -0
- package/dist/compiler/schemaDocumentSyntax.d.ts.map +1 -0
- package/dist/compiler/schemaDocumentSyntax.js +294 -0
- package/dist/compiler/schemaDurationLanguage.d.ts +11 -0
- package/dist/compiler/schemaDurationLanguage.d.ts.map +1 -0
- package/dist/compiler/schemaDurationLanguage.js +170 -0
- package/dist/compiler/schemaElementProperties.d.ts +16 -0
- package/dist/compiler/schemaElementProperties.d.ts.map +1 -0
- package/dist/compiler/schemaElementProperties.js +23 -0
- package/dist/compiler/schemaEndpointWordCapacity.d.ts +36 -0
- package/dist/compiler/schemaEndpointWordCapacity.d.ts.map +1 -0
- package/dist/compiler/schemaEndpointWordCapacity.js +39 -0
- package/dist/compiler/schemaExactCalendar.d.ts +73 -0
- package/dist/compiler/schemaExactCalendar.d.ts.map +1 -0
- package/dist/compiler/schemaExactCalendar.js +264 -0
- package/dist/compiler/schemaFacetAnnotation.d.ts +32 -0
- package/dist/compiler/schemaFacetAnnotation.d.ts.map +1 -0
- package/dist/compiler/schemaFacetAnnotation.js +199 -0
- package/dist/compiler/schemaGeneratedScalarShape.d.ts +35 -0
- package/dist/compiler/schemaGeneratedScalarShape.d.ts.map +1 -0
- package/dist/compiler/schemaGeneratedScalarShape.js +176 -0
- package/dist/compiler/schemaIdentityConstraints.d.ts +73 -0
- package/dist/compiler/schemaIdentityConstraints.d.ts.map +1 -0
- package/dist/compiler/schemaIdentityConstraints.js +362 -0
- package/dist/compiler/schemaIeeeLanguage.d.ts +43 -0
- package/dist/compiler/schemaIeeeLanguage.d.ts.map +1 -0
- package/dist/compiler/schemaIeeeLanguage.js +759 -0
- package/dist/compiler/schemaIntegerImages.d.ts +11 -0
- package/dist/compiler/schemaIntegerImages.d.ts.map +1 -0
- package/dist/compiler/schemaIntegerImages.js +113 -0
- package/dist/compiler/schemaLexicalPredicates.d.ts +29 -0
- package/dist/compiler/schemaLexicalPredicates.d.ts.map +1 -0
- package/dist/compiler/schemaLexicalPredicates.js +63 -0
- package/dist/compiler/schemaNotationProperties.d.ts +32 -0
- package/dist/compiler/schemaNotationProperties.d.ts.map +1 -0
- package/dist/compiler/schemaNotationProperties.js +84 -0
- package/dist/compiler/schemaNumericImageConditions.d.ts +24 -0
- package/dist/compiler/schemaNumericImageConditions.d.ts.map +1 -0
- package/dist/compiler/schemaNumericImageConditions.js +66 -0
- package/dist/compiler/schemaParticleWildcardProperties.d.ts +20 -0
- package/dist/compiler/schemaParticleWildcardProperties.d.ts.map +1 -0
- package/dist/compiler/schemaParticleWildcardProperties.js +43 -0
- package/dist/compiler/schemaPattern.d.ts +1062 -0
- package/dist/compiler/schemaPattern.d.ts.map +1 -0
- package/dist/compiler/schemaPattern.js +581 -0
- package/dist/compiler/schemaRegularLanguage.d.ts +67 -0
- package/dist/compiler/schemaRegularLanguage.d.ts.map +1 -0
- package/dist/compiler/schemaRegularLanguage.js +1166 -0
- package/dist/compiler/schemaScalarContext.d.ts +81 -0
- package/dist/compiler/schemaScalarContext.d.ts.map +1 -0
- package/dist/compiler/schemaScalarContext.js +78 -0
- package/dist/compiler/schemaScalarKernel.d.ts +182 -0
- package/dist/compiler/schemaScalarKernel.d.ts.map +1 -0
- package/dist/compiler/schemaScalarKernel.js +391 -0
- package/dist/compiler/schemaScalarWitnesses.d.ts +6 -0
- package/dist/compiler/schemaScalarWitnesses.d.ts.map +1 -0
- package/dist/compiler/schemaScalarWitnesses.js +118 -0
- package/dist/compiler/schemaSimpleTypeProperties.d.ts +95 -0
- package/dist/compiler/schemaSimpleTypeProperties.d.ts.map +1 -0
- package/dist/compiler/schemaSimpleTypeProperties.js +103 -0
- package/dist/compiler/schemaSourceGrammar.d.ts +27 -0
- package/dist/compiler/schemaSourceGrammar.d.ts.map +1 -0
- package/dist/compiler/schemaSourceGrammar.js +290 -0
- package/dist/compiler/schemaSourceLexical.d.ts +4 -0
- package/dist/compiler/schemaSourceLexical.d.ts.map +1 -0
- package/dist/compiler/schemaSourceLexical.js +12 -0
- package/dist/compiler/schemaSourceValues.d.ts +51 -0
- package/dist/compiler/schemaSourceValues.d.ts.map +1 -0
- package/dist/compiler/schemaSourceValues.js +225 -0
- package/dist/compiler/schemaSourceWildcards.d.ts +28 -0
- package/dist/compiler/schemaSourceWildcards.d.ts.map +1 -0
- package/dist/compiler/schemaSourceWildcards.js +247 -0
- package/dist/compiler/schemaSymbolicSequences.d.ts +16 -0
- package/dist/compiler/schemaSymbolicSequences.d.ts.map +1 -0
- package/dist/compiler/schemaSymbolicSequences.js +99 -0
- package/dist/compiler/schemaSymbolicValueSets.d.ts +32 -0
- package/dist/compiler/schemaSymbolicValueSets.d.ts.map +1 -0
- package/dist/compiler/schemaSymbolicValueSets.js +149 -0
- package/dist/compiler/schemaSyntaxAssessment.d.ts +25 -0
- package/dist/compiler/schemaSyntaxAssessment.d.ts.map +1 -0
- package/dist/compiler/schemaSyntaxAssessment.js +361 -0
- package/dist/compiler/schemaTemporalAliases.d.ts +6 -0
- package/dist/compiler/schemaTemporalAliases.d.ts.map +1 -0
- package/dist/compiler/schemaTemporalAliases.js +195 -0
- package/dist/compiler/schemaTokenImages.d.ts +9 -0
- package/dist/compiler/schemaTokenImages.d.ts.map +1 -0
- package/dist/compiler/schemaTokenImages.js +142 -0
- package/dist/compiler/schemaTypeIdentity.d.ts +39 -0
- package/dist/compiler/schemaTypeIdentity.d.ts.map +1 -0
- package/dist/compiler/schemaTypeIdentity.js +78 -0
- package/dist/compiler/schemaTypeRelations.d.ts +38 -0
- package/dist/compiler/schemaTypeRelations.d.ts.map +1 -0
- package/dist/compiler/schemaTypeRelations.js +576 -0
- package/dist/compiler/schemaUri.d.ts +13 -0
- package/dist/compiler/schemaUri.d.ts.map +1 -0
- package/dist/compiler/schemaUri.js +103 -0
- package/dist/compiler/schemaValueContext.d.ts +26 -0
- package/dist/compiler/schemaValueContext.d.ts.map +1 -0
- package/dist/compiler/schemaValueContext.js +1 -0
- package/dist/compiler/schemaValueImages.d.ts +10 -0
- package/dist/compiler/schemaValueImages.d.ts.map +1 -0
- package/dist/compiler/schemaValueImages.js +142 -0
- package/dist/compiler/schemaValueSequences.d.ts +15 -0
- package/dist/compiler/schemaValueSequences.d.ts.map +1 -0
- package/dist/compiler/schemaValueSequences.js +19 -0
- package/dist/compiler/semanticBudget.d.ts +50 -0
- package/dist/compiler/semanticBudget.d.ts.map +1 -0
- package/dist/compiler/semanticBudget.js +178 -0
- package/dist/compiler/semanticCatalog.d.ts +122 -0
- package/dist/compiler/semanticCatalog.d.ts.map +1 -0
- package/dist/compiler/semanticCatalog.js +160 -0
- package/dist/compiler/semanticContext.d.ts +172 -0
- package/dist/compiler/semanticContext.d.ts.map +1 -0
- package/dist/compiler/semanticContext.js +1168 -0
- package/dist/compiler/semanticTypeDependencies.d.ts +8 -0
- package/dist/compiler/semanticTypeDependencies.d.ts.map +1 -0
- package/dist/compiler/semanticTypeDependencies.js +64 -0
- package/dist/compiler/semanticTypeReference.d.ts +24 -0
- package/dist/compiler/semanticTypeReference.d.ts.map +1 -0
- package/dist/compiler/semanticTypeReference.js +36 -0
- package/dist/compiler/shapeResolver.d.ts +1 -0
- package/dist/compiler/shapeResolver.d.ts.map +1 -1
- package/dist/compiler/shapeResolver.js +7 -9
- package/dist/compiler/sourceSchemaBinding.d.ts +26 -0
- package/dist/compiler/sourceSchemaBinding.d.ts.map +1 -0
- package/dist/compiler/sourceSchemaBinding.js +39 -0
- package/dist/compiler/structuralCompanions.d.ts +16 -0
- package/dist/compiler/structuralCompanions.d.ts.map +1 -0
- package/dist/compiler/structuralCompanions.js +232 -0
- package/dist/compiler/validateSemanticGraph.d.ts +5 -0
- package/dist/compiler/validateSemanticGraph.d.ts.map +1 -0
- package/dist/compiler/validateSemanticGraph.js +376 -0
- package/dist/compiler/wildcardAlgebra.d.ts +26 -0
- package/dist/compiler/wildcardAlgebra.d.ts.map +1 -0
- package/dist/compiler/wildcardAlgebra.js +155 -0
- package/dist/gateway/generateGateway.d.ts.map +1 -1
- package/dist/gateway/generateGateway.js +2 -2
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/loader/orderedSyntax.d.ts +77 -0
- package/dist/loader/orderedSyntax.d.ts.map +1 -0
- package/dist/loader/orderedSyntax.js +202 -0
- package/dist/loader/resolutionDepth.d.ts +7 -0
- package/dist/loader/resolutionDepth.d.ts.map +1 -0
- package/dist/loader/resolutionDepth.js +65 -0
- package/dist/loader/schemaInput.d.ts +53 -0
- package/dist/loader/schemaInput.d.ts.map +1 -0
- package/dist/loader/schemaInput.js +212 -0
- package/dist/loader/schemaResources.d.ts +59 -0
- package/dist/loader/schemaResources.d.ts.map +1 -0
- package/dist/loader/schemaResources.js +292 -0
- package/dist/openapi/generateOpenAPI.d.ts.map +1 -1
- package/dist/openapi/generateOpenAPI.js +2 -2
- package/dist/test/generateTests.d.ts.map +1 -1
- package/dist/test/generateTests.js +2 -2
- package/dist/util/xmlWhitespace.d.ts +3 -0
- package/dist/util/xmlWhitespace.d.ts.map +1 -0
- package/dist/util/xmlWhitespace.js +4 -0
- package/docs/README.md +14 -1
- package/docs/architecture.md +9 -0
- package/docs/cli-reference.md +21 -1
- package/docs/content-model-analysis.md +92 -0
- package/docs/content-model-baseline.md +121 -0
- package/docs/content-model-catalog.md +116 -0
- package/docs/content-model-companions.md +90 -0
- package/docs/content-model-composition.md +103 -0
- package/docs/content-model-decisions.md +79 -0
- package/docs/content-model-gateway-feasibility.md +169 -0
- package/docs/content-model-graph.md +121 -0
- package/docs/content-model-loading.md +163 -0
- package/docs/content-model-matching.md +85 -0
- package/docs/content-model-readiness.md +144 -0
- package/docs/content-model-resolution.md +81 -0
- package/docs/content-model-s02-handoff.md +98 -0
- package/docs/content-model-s06-au-01.md +425 -0
- package/docs/content-model-s06-dt-01.md +386 -0
- package/docs/content-model-s06-pw-01.md +350 -0
- package/docs/content-model-s06-re-01-resolver-implementation.md +869 -0
- package/docs/content-model-s06-re-01-resolver.md +513 -0
- package/docs/content-model-s06-re-01-scalar-witnesses.md +1423 -0
- package/docs/content-model-s06-re-01-support-reconstruction.md +6337 -0
- package/docs/content-model-s06-re-01.md +7477 -0
- package/docs/content-model-s06-research-handoff.md +909 -0
- package/docs/content-model-shipped-fix.md +83 -0
- package/docs/content-model-soap-feasibility.md +165 -0
- package/docs/decisions/002-streamable-responses.md +2 -0
- package/docs/decisions/003-content-model-contracts.md +280 -0
- package/docs/direct-values.md +311 -0
- package/docs/reference-validation.md +243 -0
- package/docs/releases/v1.1.5.md +38 -0
- package/docs/roadmap/README.md +2 -2
- package/docs/supported-patterns.md +13 -5
- package/package.json +26 -13
- package/src/generation/preambles/direct-client/typescript.preamble +3 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export declare const DEFAULT_LOADING_LIMITS: Readonly<{
|
|
2
|
+
resources: 128;
|
|
3
|
+
resourceBytes: number;
|
|
4
|
+
totalBytes: number;
|
|
5
|
+
resolutionDepth: 32;
|
|
6
|
+
redirects: 5;
|
|
7
|
+
resourceMs: 15000;
|
|
8
|
+
totalIoMs: 120000;
|
|
9
|
+
syntaxDepth: 256;
|
|
10
|
+
}>;
|
|
11
|
+
export type LoadingLimits = Readonly<{
|
|
12
|
+
[K in keyof typeof DEFAULT_LOADING_LIMITS]: number;
|
|
13
|
+
}>;
|
|
14
|
+
export type SchemaResourcePolicy = Readonly<{
|
|
15
|
+
fileRoots?: readonly string[];
|
|
16
|
+
/** Exact HTTP(S) origins, including ports. No implicit host or scheme permission. */
|
|
17
|
+
allowedOrigins?: readonly string[];
|
|
18
|
+
}>;
|
|
19
|
+
export type OfflineSchemaResource = Readonly<{
|
|
20
|
+
bytes: Uint8Array;
|
|
21
|
+
digest: string;
|
|
22
|
+
}>;
|
|
23
|
+
export type ResourceMetadata = Readonly<{
|
|
24
|
+
uri: string;
|
|
25
|
+
digest: string;
|
|
26
|
+
byteLength: number;
|
|
27
|
+
}>;
|
|
28
|
+
export type FetchedSchemaResource = ResourceMetadata & Readonly<{
|
|
29
|
+
bytes: Uint8Array;
|
|
30
|
+
}>;
|
|
31
|
+
export declare function loadingLimits(overrides?: Partial<LoadingLimits>): LoadingLimits;
|
|
32
|
+
/** Canonical URL spelling; queries remain distinct, fragments are not retrieval identity. */
|
|
33
|
+
export declare function resolveResourceUri(reference: string, baseUri?: string): string;
|
|
34
|
+
/** One instance per compilation. Bytes and aliases are confined to this I/O boundary. */
|
|
35
|
+
export declare class SchemaResourceLoader {
|
|
36
|
+
private readonly roots;
|
|
37
|
+
private readonly lexicalRoots;
|
|
38
|
+
private readonly origins;
|
|
39
|
+
private readonly offline?;
|
|
40
|
+
private readonly charge?;
|
|
41
|
+
private readonly signal?;
|
|
42
|
+
readonly limits: LoadingLimits;
|
|
43
|
+
private readonly resources;
|
|
44
|
+
private readonly aliases;
|
|
45
|
+
private readonly resourceKeys;
|
|
46
|
+
private totalBytes;
|
|
47
|
+
private ioMs;
|
|
48
|
+
private constructor();
|
|
49
|
+
static create(policy: SchemaResourcePolicy, overrides?: Partial<LoadingLimits>, offline?: ReadonlyMap<string, OfflineSchemaResource>, charge?: (amount: number) => void, signal?: AbortSignal): Promise<SchemaResourceLoader>;
|
|
50
|
+
get metadata(): readonly ResourceMetadata[];
|
|
51
|
+
get metrics(): Readonly<{
|
|
52
|
+
resources: number;
|
|
53
|
+
totalBytes: number;
|
|
54
|
+
ioMs: number;
|
|
55
|
+
}>;
|
|
56
|
+
private authorize;
|
|
57
|
+
fetchResource(reference: string): Promise<FetchedSchemaResource>;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=schemaResources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemaResources.d.ts","sourceRoot":"","sources":["../../src/loader/schemaResources.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,sBAAsB;;;;;;;;;EAGjC,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC;KAAE,CAAC,IAAI,MAAM,OAAO,sBAAsB,GAAG,MAAM;CAAC,CAAC,CAAC;AAC3F,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC;IAC1C,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,qFAAqF;IACrF,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC,CAAC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC;IAAC,KAAK,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAC,CAAC,CAAC;AAClF,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAC,CAAC,CAAC;AAC3F,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,GAAG,QAAQ,CAAC;IAAC,KAAK,EAAE,UAAU,CAAA;CAAC,CAAC,CAAC;AAErF,wBAAgB,aAAa,CAAC,SAAS,GAAE,OAAO,CAAC,aAAa,CAAM,GAAG,aAAa,CAQnF;AAED,6FAA6F;AAC7F,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAgB9E;AAOD,yFAAyF;AACzF,qBAAa,oBAAoB;IAOX,OAAO,CAAC,QAAQ,CAAC,KAAK;IAAqB,OAAO,CAAC,QAAQ,CAAC,YAAY;IAAqB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAChH,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;IAA8C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;IACtH,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;IAR1B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA4C;IACtE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA6B;IACrD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA6B;IAC1D,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,IAAI,CAAK;IACjB,OAAO;WAIM,MAAM,CAAC,MAAM,EAAE,oBAAoB,EAAE,SAAS,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,qBAAqB,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAuBnO,IAAI,QAAQ,IAAI,SAAS,gBAAgB,EAAE,CAG1C;IACD,IAAI,OAAO,IAAI,QAAQ,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAC,CAAC,CAE7E;YAEa,SAAS;IAejB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;CA4HvE"}
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
/** Policy-checked, bounded I/O for schema inputs only. Legacy fetching is separate. */
|
|
2
|
+
import { createHash } from "node:crypto";
|
|
3
|
+
import { open, realpath, lstat } from "node:fs/promises";
|
|
4
|
+
import { constants } from "node:fs";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
7
|
+
import { SchemaLoadingError } from "./orderedSyntax.js";
|
|
8
|
+
export const DEFAULT_LOADING_LIMITS = Object.freeze({
|
|
9
|
+
resources: 128, resourceBytes: 8 * 1024 * 1024, totalBytes: 64 * 1024 * 1024,
|
|
10
|
+
resolutionDepth: 32, redirects: 5, resourceMs: 15_000, totalIoMs: 120_000, syntaxDepth: 256,
|
|
11
|
+
});
|
|
12
|
+
export function loadingLimits(overrides = {}) {
|
|
13
|
+
const limits = { ...DEFAULT_LOADING_LIMITS, ...overrides };
|
|
14
|
+
for (const [key, value] of Object.entries(limits)) {
|
|
15
|
+
if (!Number.isSafeInteger(value) || value < (['redirects', 'resourceMs', 'totalIoMs'].includes(key) ? 0 : 1)) {
|
|
16
|
+
throw new RangeError(`Invalid schema loading limit: ${key}`);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return Object.freeze(limits);
|
|
20
|
+
}
|
|
21
|
+
/** Canonical URL spelling; queries remain distinct, fragments are not retrieval identity. */
|
|
22
|
+
export function resolveResourceUri(reference, baseUri) {
|
|
23
|
+
let url;
|
|
24
|
+
try {
|
|
25
|
+
url = baseUri ? new URL(reference, baseUri)
|
|
26
|
+
: /^[a-z][a-z0-9+.-]*:/i.test(reference) && !/^[a-z]:[\\/]/i.test(reference)
|
|
27
|
+
? new URL(reference) : pathToFileURL(path.resolve(reference));
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
throw new SchemaLoadingError("invalid-schema", "Invalid schema resource URI");
|
|
31
|
+
}
|
|
32
|
+
if (!["file:", "http:", "https:"].includes(url.protocol)) {
|
|
33
|
+
throw new SchemaLoadingError("unsupported-capability", "Unsupported schema resource scheme");
|
|
34
|
+
}
|
|
35
|
+
if (url.username || url.password)
|
|
36
|
+
throw new SchemaLoadingError("unsupported-capability", "Credential-bearing resource URIs are forbidden");
|
|
37
|
+
if (url.protocol === "file:" && (url.search || (url.hostname && url.hostname !== "localhost"))) {
|
|
38
|
+
throw new SchemaLoadingError("unsupported-capability", "File URI queries and remote file authorities are forbidden");
|
|
39
|
+
}
|
|
40
|
+
url.hash = "";
|
|
41
|
+
return url.href;
|
|
42
|
+
}
|
|
43
|
+
function withinRoot(file, root) {
|
|
44
|
+
const relative = path.relative(root, file);
|
|
45
|
+
return relative === "" || (!path.isAbsolute(relative) && relative !== ".." && !relative.startsWith(`..${path.sep}`));
|
|
46
|
+
}
|
|
47
|
+
/** One instance per compilation. Bytes and aliases are confined to this I/O boundary. */
|
|
48
|
+
export class SchemaResourceLoader {
|
|
49
|
+
roots;
|
|
50
|
+
lexicalRoots;
|
|
51
|
+
origins;
|
|
52
|
+
offline;
|
|
53
|
+
charge;
|
|
54
|
+
signal;
|
|
55
|
+
limits;
|
|
56
|
+
resources = new Map();
|
|
57
|
+
aliases = new Map();
|
|
58
|
+
resourceKeys = new Map();
|
|
59
|
+
totalBytes = 0;
|
|
60
|
+
ioMs = 0;
|
|
61
|
+
constructor(roots, lexicalRoots, origins, limits, offline, charge, signal) {
|
|
62
|
+
this.roots = roots;
|
|
63
|
+
this.lexicalRoots = lexicalRoots;
|
|
64
|
+
this.origins = origins;
|
|
65
|
+
this.offline = offline;
|
|
66
|
+
this.charge = charge;
|
|
67
|
+
this.signal = signal;
|
|
68
|
+
this.limits = limits;
|
|
69
|
+
}
|
|
70
|
+
static async create(policy, overrides, offline, charge, signal) {
|
|
71
|
+
charge?.(1024 + (policy.fileRoots?.length ?? 0) * 128 + (policy.allowedOrigins?.length ?? 0) * 128 + (offline?.size ?? 0) * 256);
|
|
72
|
+
const configuredRoots = (policy.fileRoots ?? []).map(root => { charge?.(128 + root.length * 32); return path.resolve(root); });
|
|
73
|
+
let roots;
|
|
74
|
+
try {
|
|
75
|
+
roots = await Promise.all(configuredRoots.map(root => realpath(root)));
|
|
76
|
+
}
|
|
77
|
+
catch {
|
|
78
|
+
throw new SchemaLoadingError("transport", "An authorized schema root is unavailable");
|
|
79
|
+
}
|
|
80
|
+
const origins = new Set((policy.allowedOrigins ?? []).map(origin => {
|
|
81
|
+
charge?.(128 + origin.length * 32);
|
|
82
|
+
const url = new URL(origin);
|
|
83
|
+
if (!["http:", "https:"].includes(url.protocol) || url.username || url.password || url.pathname !== "/" || url.search || url.hash) {
|
|
84
|
+
throw new RangeError("allowedOrigins must contain HTTP(S) origins only");
|
|
85
|
+
}
|
|
86
|
+
return url.origin;
|
|
87
|
+
}));
|
|
88
|
+
// Copy the manifest; byte copies occur only after per-resource/aggregate checks.
|
|
89
|
+
const snapshots = offline ? new Map() : undefined;
|
|
90
|
+
if (offline)
|
|
91
|
+
for (const [uri, value] of offline) {
|
|
92
|
+
charge?.(256 + uri.length * 32);
|
|
93
|
+
snapshots.set(resolveResourceUri(uri), { bytes: value.bytes, digest: value.digest });
|
|
94
|
+
}
|
|
95
|
+
return new SchemaResourceLoader(roots, [...configuredRoots, ...roots], origins, loadingLimits(overrides), snapshots, charge, signal);
|
|
96
|
+
}
|
|
97
|
+
get metadata() {
|
|
98
|
+
this.charge?.(128 + this.resources.size * 256);
|
|
99
|
+
return Object.freeze([...this.resources.values()].map(({ uri, digest, byteLength }) => Object.freeze({ uri, digest, byteLength })));
|
|
100
|
+
}
|
|
101
|
+
get metrics() {
|
|
102
|
+
return Object.freeze({ resources: this.resources.size, totalBytes: this.totalBytes, ioMs: this.ioMs });
|
|
103
|
+
}
|
|
104
|
+
async authorize(uri) {
|
|
105
|
+
this.charge?.(1024 + uri.length * 32 + this.roots.length * 256);
|
|
106
|
+
const url = new URL(resolveResourceUri(uri));
|
|
107
|
+
if (url.protocol !== "file:") {
|
|
108
|
+
if (!this.origins.has(url.origin))
|
|
109
|
+
throw new SchemaLoadingError("unsupported-capability", "Schema resource origin is not authorized");
|
|
110
|
+
return url.href;
|
|
111
|
+
}
|
|
112
|
+
const file = fileURLToPath(url);
|
|
113
|
+
// Check lexical traversal before touching the filesystem, then symlink-resolved identity.
|
|
114
|
+
if (!this.lexicalRoots.some(root => withinRoot(file, root)))
|
|
115
|
+
throw new SchemaLoadingError("unsupported-capability", "Schema file is outside authorized roots");
|
|
116
|
+
const actual = await realpath(file);
|
|
117
|
+
if (!this.roots.some(root => withinRoot(actual, root)))
|
|
118
|
+
throw new SchemaLoadingError("unsupported-capability", "Schema symlink is outside authorized roots");
|
|
119
|
+
return pathToFileURL(actual).href;
|
|
120
|
+
}
|
|
121
|
+
async fetchResource(reference) {
|
|
122
|
+
this.charge?.(256 + reference.length * 4);
|
|
123
|
+
const requested = resolveResourceUri(reference);
|
|
124
|
+
// A previously authorized alias returns the compilation's pinned bytes without new I/O.
|
|
125
|
+
const pinned = this.resources.get(this.resourceKeys.get(this.aliases.get(requested) ?? requested) ?? "");
|
|
126
|
+
if (pinned)
|
|
127
|
+
return pinned;
|
|
128
|
+
const started = performance.now();
|
|
129
|
+
const remaining = this.limits.totalIoMs === 0 ? Infinity : this.limits.totalIoMs - this.ioMs;
|
|
130
|
+
if (remaining < 0)
|
|
131
|
+
throw new SchemaLoadingError("transport", "Total schema I/O deadline exhausted");
|
|
132
|
+
const budget = Math.min(this.limits.resourceMs === 0 ? Infinity : this.limits.resourceMs, remaining);
|
|
133
|
+
const controller = new AbortController();
|
|
134
|
+
const abort = () => controller.abort(this.signal?.reason);
|
|
135
|
+
this.signal?.addEventListener('abort', abort, { once: true });
|
|
136
|
+
if (this.signal?.aborted)
|
|
137
|
+
abort();
|
|
138
|
+
let timer;
|
|
139
|
+
let performedIo = new URL(requested).protocol === "file:";
|
|
140
|
+
const timeout = new Promise((_, reject) => {
|
|
141
|
+
// Limits are inclusive: an exactly-at-deadline completed resource is admitted.
|
|
142
|
+
if (Number.isFinite(budget))
|
|
143
|
+
timer = setTimeout(() => { controller.abort(); reject(new SchemaLoadingError("transport", "Schema resource or total I/O deadline exceeded")); }, budget + 1);
|
|
144
|
+
});
|
|
145
|
+
try {
|
|
146
|
+
const task = (async () => {
|
|
147
|
+
let uri = await this.authorize(requested);
|
|
148
|
+
if (controller.signal.aborted || performance.now() - started > budget)
|
|
149
|
+
throw new SchemaLoadingError("transport", "Schema I/O deadline exceeded");
|
|
150
|
+
const cached = this.resources.get(this.resourceKeys.get(this.aliases.get(uri) ?? uri) ?? "");
|
|
151
|
+
if (cached)
|
|
152
|
+
return cached;
|
|
153
|
+
const checkResourceCount = () => {
|
|
154
|
+
if (this.resources.size >= this.limits.resources)
|
|
155
|
+
throw new SchemaLoadingError("resource-limit", `Schema resource count exceeds ${this.limits.resources}`);
|
|
156
|
+
};
|
|
157
|
+
performedIo = true;
|
|
158
|
+
const redirectAliases = [requested, uri];
|
|
159
|
+
const chunks = [];
|
|
160
|
+
let byteLength = 0;
|
|
161
|
+
const accept = (chunk) => {
|
|
162
|
+
if (controller.signal.aborted || performance.now() - started > budget)
|
|
163
|
+
throw new SchemaLoadingError("transport", "Schema I/O deadline exceeded");
|
|
164
|
+
// Reserve copying, hashing, decoding and bounded syntax preparation before retaining bytes.
|
|
165
|
+
this.charge?.(64 + chunk.byteLength * 32);
|
|
166
|
+
byteLength += chunk.byteLength;
|
|
167
|
+
if (byteLength > this.limits.resourceBytes || this.totalBytes + byteLength > this.limits.totalBytes) {
|
|
168
|
+
throw new SchemaLoadingError("resource-limit", "Decompressed schema byte budget exceeded");
|
|
169
|
+
}
|
|
170
|
+
chunks.push(Uint8Array.from(chunk));
|
|
171
|
+
};
|
|
172
|
+
if (this.offline) {
|
|
173
|
+
checkResourceCount();
|
|
174
|
+
const snapshot = this.offline.get(uri);
|
|
175
|
+
if (!snapshot)
|
|
176
|
+
throw new SchemaLoadingError("transport", "Schema resource is absent from the offline snapshot");
|
|
177
|
+
accept(snapshot.bytes);
|
|
178
|
+
const digest = createHash("sha256").update(snapshot.bytes).digest("hex");
|
|
179
|
+
if (digest !== snapshot.digest)
|
|
180
|
+
throw new SchemaLoadingError("invalid-schema", "Offline schema digest mismatch");
|
|
181
|
+
}
|
|
182
|
+
else if (new URL(uri).protocol === "file:") {
|
|
183
|
+
checkResourceCount();
|
|
184
|
+
const localPath = fileURLToPath(uri);
|
|
185
|
+
if (!(await lstat(localPath)).isFile())
|
|
186
|
+
throw new SchemaLoadingError("unsupported-capability", "Schema resource must be a regular file");
|
|
187
|
+
const file = await open(localPath, constants.O_RDONLY | (constants.O_NOFOLLOW ?? 0) | (constants.O_NONBLOCK ?? 0));
|
|
188
|
+
try {
|
|
189
|
+
if (!(await file.stat()).isFile())
|
|
190
|
+
throw new SchemaLoadingError("unsupported-capability", "Schema resource must be a regular file");
|
|
191
|
+
const stream = file.createReadStream({ autoClose: false, signal: controller.signal });
|
|
192
|
+
try {
|
|
193
|
+
for await (const chunk of stream)
|
|
194
|
+
accept(chunk);
|
|
195
|
+
}
|
|
196
|
+
finally {
|
|
197
|
+
stream.destroy();
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
finally {
|
|
201
|
+
await file.close();
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
for (let redirects = 0;; redirects++) {
|
|
206
|
+
const response = await fetch(uri, { redirect: "manual", signal: controller.signal, headers: { Accept: "application/xml,text/xml" } });
|
|
207
|
+
if ([301, 302, 303, 307, 308].includes(response.status)) {
|
|
208
|
+
await response.body?.cancel();
|
|
209
|
+
if (redirects >= this.limits.redirects)
|
|
210
|
+
throw new SchemaLoadingError("resource-limit", `Schema redirects exceed ${this.limits.redirects}`);
|
|
211
|
+
const location = response.headers.get("location");
|
|
212
|
+
if (!location)
|
|
213
|
+
throw new SchemaLoadingError("transport", "Schema redirect has no location");
|
|
214
|
+
uri = await this.authorize(resolveResourceUri(location, uri));
|
|
215
|
+
if (new URL(uri).protocol === "file:")
|
|
216
|
+
throw new SchemaLoadingError("unsupported-capability", "HTTP redirects cannot select file resources");
|
|
217
|
+
redirectAliases.push(uri);
|
|
218
|
+
const redirectedCache = this.resources.get(this.resourceKeys.get(this.aliases.get(uri) ?? uri) ?? "");
|
|
219
|
+
if (redirectedCache) {
|
|
220
|
+
if (controller.signal.aborted || performance.now() - started > budget)
|
|
221
|
+
throw new SchemaLoadingError("transport", "Schema I/O deadline exceeded");
|
|
222
|
+
for (const alias of redirectAliases)
|
|
223
|
+
this.aliases.set(alias, redirectedCache.uri);
|
|
224
|
+
return redirectedCache;
|
|
225
|
+
}
|
|
226
|
+
continue;
|
|
227
|
+
}
|
|
228
|
+
if (!response.ok) {
|
|
229
|
+
await response.body?.cancel();
|
|
230
|
+
throw new SchemaLoadingError("transport", `Schema retrieval returned HTTP ${response.status}`);
|
|
231
|
+
}
|
|
232
|
+
if (this.resources.size >= this.limits.resources) {
|
|
233
|
+
await response.body?.cancel();
|
|
234
|
+
checkResourceCount();
|
|
235
|
+
}
|
|
236
|
+
// Manual fetch must preserve identity; an opaque/auto-following transport is rejected.
|
|
237
|
+
if (response.redirected || (response.url && resolveResourceUri(response.url) !== uri)) {
|
|
238
|
+
await response.body?.cancel();
|
|
239
|
+
throw new SchemaLoadingError("unsupported-capability", "Schema transport changed retrieval identity without policy checks");
|
|
240
|
+
}
|
|
241
|
+
const reader = response.body?.getReader();
|
|
242
|
+
if (reader) {
|
|
243
|
+
const abort = () => { void reader.cancel().catch(() => { }); };
|
|
244
|
+
controller.signal.addEventListener("abort", abort, { once: true });
|
|
245
|
+
try {
|
|
246
|
+
for (;;) {
|
|
247
|
+
const chunk = await reader.read();
|
|
248
|
+
if (chunk.done)
|
|
249
|
+
break;
|
|
250
|
+
accept(chunk.value);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
finally {
|
|
254
|
+
controller.signal.removeEventListener("abort", abort);
|
|
255
|
+
await reader.cancel().catch(() => { });
|
|
256
|
+
reader.releaseLock();
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
break;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
if (controller.signal.aborted || performance.now() - started > budget)
|
|
263
|
+
throw new SchemaLoadingError("transport", "Schema I/O deadline exceeded");
|
|
264
|
+
const bytes = Buffer.concat(chunks, byteLength);
|
|
265
|
+
const digest = createHash("sha256").update(bytes).digest("hex");
|
|
266
|
+
const resource = Object.freeze({ uri, digest, byteLength, bytes });
|
|
267
|
+
// Byte cache identity is (final canonical URI, digest); aliases never change context's final URI.
|
|
268
|
+
const resourceKey = JSON.stringify([uri, digest]);
|
|
269
|
+
this.resources.set(resourceKey, resource);
|
|
270
|
+
this.resourceKeys.set(uri, resourceKey);
|
|
271
|
+
for (const alias of redirectAliases)
|
|
272
|
+
this.aliases.set(alias, uri);
|
|
273
|
+
this.totalBytes += byteLength;
|
|
274
|
+
return resource;
|
|
275
|
+
})();
|
|
276
|
+
return await Promise.race([task, timeout]);
|
|
277
|
+
}
|
|
278
|
+
catch (error) {
|
|
279
|
+
controller.abort();
|
|
280
|
+
if (error instanceof SchemaLoadingError)
|
|
281
|
+
throw error;
|
|
282
|
+
// Do not expose filesystem paths, response text or credential-bearing transport errors.
|
|
283
|
+
throw new SchemaLoadingError("transport", "Unable to retrieve schema resource under the configured policy");
|
|
284
|
+
}
|
|
285
|
+
finally {
|
|
286
|
+
this.signal?.removeEventListener('abort', abort);
|
|
287
|
+
clearTimeout(timer);
|
|
288
|
+
if (performedIo)
|
|
289
|
+
this.ioMs += performance.now() - started;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateOpenAPI.d.ts","sourceRoot":"","sources":["../../src/openapi/generateOpenAPI.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH,OAAO,EAAiB,KAAK,eAAe,EAAC,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"generateOpenAPI.d.ts","sourceRoot":"","sources":["../../src/openapi/generateOpenAPI.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH,OAAO,EAAiB,KAAK,eAAe,EAAC,MAAM,+BAA+B,CAAC;AAMnF,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IAC3C,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAClC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC;IAC3E,GAAG,EAAE,GAAG,CAAC;IACT,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC,CA2TD"}
|
|
@@ -27,6 +27,7 @@ import * as path from "path";
|
|
|
27
27
|
import * as yaml from "js-yaml";
|
|
28
28
|
import { loadWsdl } from "../loader/wsdlLoader.js";
|
|
29
29
|
import { compileCatalog } from "../compiler/schemaCompiler.js";
|
|
30
|
+
import { readLegacyCatalogFile } from "../compiler/semanticCatalog.js";
|
|
30
31
|
import { generateSchemas } from "./generateSchemas.js";
|
|
31
32
|
import { generatePaths } from "./generatePaths.js";
|
|
32
33
|
import { error, info, warn } from "../util/cli.js";
|
|
@@ -50,8 +51,7 @@ export async function generateOpenAPI(opts) {
|
|
|
50
51
|
compiled = opts.compiledCatalog;
|
|
51
52
|
}
|
|
52
53
|
else if (opts.catalogFile) {
|
|
53
|
-
|
|
54
|
-
compiled = JSON.parse(raw);
|
|
54
|
+
compiled = readLegacyCatalogFile(opts.catalogFile);
|
|
55
55
|
}
|
|
56
56
|
else {
|
|
57
57
|
const wsdlCatalog = await loadWsdl(String(opts.wsdl));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateTests.d.ts","sourceRoot":"","sources":["../../src/test/generateTests.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generateTests.d.ts","sourceRoot":"","sources":["../../src/test/generateTests.ts"],"names":[],"mappings":"AAmCA;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAuBD;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgK7E"}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* 5. For each file: skip-if-exists check, then write
|
|
13
13
|
*/
|
|
14
14
|
import fs from "node:fs";
|
|
15
|
+
import { readLegacyCatalogFile } from "../compiler/semanticCatalog.js";
|
|
15
16
|
import { writeGeneratedSource } from "../generation/writeGeneratedSource.js";
|
|
16
17
|
import path from "node:path";
|
|
17
18
|
import { info, success } from "../util/cli.js";
|
|
@@ -63,8 +64,7 @@ export async function generateTests(opts) {
|
|
|
63
64
|
throw new Error(`Catalog file does not exist: ${catalogFile}`);
|
|
64
65
|
}
|
|
65
66
|
// Read and parse catalog
|
|
66
|
-
const
|
|
67
|
-
const catalog = JSON.parse(catalogRaw);
|
|
67
|
+
const catalog = readLegacyCatalogFile(catalogFile);
|
|
68
68
|
// Resolve client metadata
|
|
69
69
|
const clientMeta = resolveClientMeta({
|
|
70
70
|
clientDir,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xmlWhitespace.d.ts","sourceRoot":"","sources":["../../src/util/xmlWhitespace.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,CAEpG"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** XML Schema whiteSpace mapping; only the four XML whitespace characters. */
|
|
2
|
+
export function normalizeWhitespace(value, mode) {
|
|
3
|
+
return mode === "preserve" ? value : mode === "replace" ? value.replace(/[\t\r\n]/g, " ") : value.replace(/[\t\r\n ]+/g, " ").replace(/^ | $/g, "");
|
|
4
|
+
}
|
package/docs/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Human-maintained reference documents for `@techspokes/typescript-wsdl-client`. The root [README.md](../README.md) Documentation section is the authoritative index with descriptions; the list below is a quick local reference organized by reader intent.
|
|
4
4
|
|
|
5
|
+
The [S06 research handoff](content-model-s06-research-handoff.md) links the four rule investigations and their unresolved acceptance gates.
|
|
6
|
+
|
|
5
7
|
## Evaluate
|
|
6
8
|
|
|
7
9
|
- [start-here.md](start-here.md): what this is, who it is for, choose your path
|
|
@@ -30,7 +32,8 @@ Human-maintained reference documents for `@techspokes/typescript-wsdl-client`. T
|
|
|
30
32
|
- [architecture.md](architecture.md): internal pipeline for contributors
|
|
31
33
|
- [file-naming-and-path-organization.md](file-naming-and-path-organization.md): contributor convention for taxonomy paths and fixture retrieval
|
|
32
34
|
- [agent-skill.md](agent-skill.md): release ZIP for consumer-project AI agents
|
|
33
|
-
- [roadmap
|
|
35
|
+
- [Current roadmap](../ROADMAP.md): published baseline and active backlog
|
|
36
|
+
- [roadmap/README.md](roadmap/README.md): historical completed 1.0 implementation and qualification plan
|
|
34
37
|
- [decisions/002-streamable-responses.md](decisions/002-streamable-responses.md): opt-in streaming design (client `AsyncIterable`, gateway NDJSON or JSON array, `x-wsdl-tsc-stream` OpenAPI extension); shipped in 0.17.0 and extended in 0.28.0
|
|
35
38
|
- [migration.md](migration.md): upgrading between package versions
|
|
36
39
|
|
|
@@ -45,6 +48,16 @@ Human-maintained reference documents for `@techspokes/typescript-wsdl-client`. T
|
|
|
45
48
|
|
|
46
49
|
## Related
|
|
47
50
|
|
|
51
|
+
- [S02 handoff](content-model-s02-handoff.md): architecture decisions, feasibility evidence and S03 entry contracts
|
|
52
|
+
- [Ordered schema loading](content-model-loading.md): internal syntax, provenance and controlled resolution contracts
|
|
53
|
+
- [Canonical schema graph](content-model-graph.md): immutable declarations, use sites and lexical reference context
|
|
54
|
+
- [Semantic catalog format 2](content-model-catalog.md): deterministic persistence, validation and compatibility routing
|
|
55
|
+
- [RE01 research resolver implementation](content-model-s06-re-01-resolver-implementation.md): supplied-candidate and abstract wildcard checks, qualification limits and the future production adapter
|
|
56
|
+
- [RE01 support reconstruction](content-model-s06-re-01-support-reconstruction.md): conditional copy/bundle reductions, value/name palettes and open bounds
|
|
57
|
+
- [RE01 scalar witness construction](content-model-s06-re-01-scalar-witnesses.md): shared endpoint tuples and open materialization gates
|
|
58
|
+
|
|
59
|
+
- [Direct scalar values](direct-values.md): internal source mapping, fresh inverse and codec handoff.
|
|
60
|
+
|
|
48
61
|
- [Root README](../README.md): project overview, quick start, and authoritative Documentation section
|
|
49
62
|
- [CONTRIBUTING.md](../CONTRIBUTING.md): development setup and workflow
|
|
50
63
|
- [CHANGELOG.md](../CHANGELOG.md): version history
|
package/docs/architecture.md
CHANGED
|
@@ -4,6 +4,15 @@ Internal architecture of the wsdl-tsc code generator for contributors.
|
|
|
4
4
|
|
|
5
5
|
See [CONTRIBUTING](../CONTRIBUTING.md) for development setup and [README](../README.md) for user documentation.
|
|
6
6
|
|
|
7
|
+
## Planned Content Model Contracts
|
|
8
|
+
|
|
9
|
+
[Ordered schema loading](content-model-loading.md) documents S03's internal input adapter and its migration boundary.
|
|
10
|
+
[Canonical graph construction](content-model-graph.md) documents S04's immutable declarations and independent use-site particles.
|
|
11
|
+
[Semantic catalog persistence](content-model-catalog.md) documents format 2 validation and the explicit legacy-reader boundary.
|
|
12
|
+
Its controlled resource resolver supplies contextual syntax to S04 #173 while graph construction and downstream semantics remain separate owners.
|
|
13
|
+
|
|
14
|
+
[ADR-003](decisions/003-content-model-contracts.md) defines the intended faithful content-model path and [decision register](content-model-decisions.md) assigns its owners. The S02 feasibility records and [handoff](content-model-s02-handoff.md) distinguish executed adapter/dialect evidence from later production implementation. The pipeline below describes current legacy behavior; S02 does not activate new defaults.
|
|
15
|
+
|
|
7
16
|
## Generated Source Policy
|
|
8
17
|
|
|
9
18
|
Complete TypeScript writes pass through `src/generation/writeGeneratedSource.ts` after any scaffold ownership guard. Runtime/template loaders remain fragment loaders; provenance and documentation are preserved when the final body receives its preamble.
|
package/docs/cli-reference.md
CHANGED
|
@@ -6,7 +6,7 @@ Generation paths are explicit. Examples use the git-ignored `.generated/` direct
|
|
|
6
6
|
|
|
7
7
|
## Commands Overview
|
|
8
8
|
|
|
9
|
-
The tool provides six commands
|
|
9
|
+
The tool provides six generation commands and the assessment-only `assess` command.
|
|
10
10
|
|
|
11
11
|
TypeScript outputs automatically receive [generated preambles](generated-code.md#generated-preambles-and-eslint), including app/test scaffolds when actually written. Command syntax is unchanged and there is no preamble flag. `compile` and `openapi` data outputs remain unchanged.
|
|
12
12
|
|
|
@@ -18,6 +18,7 @@ TypeScript outputs automatically receive [generated preambles](generated-code.md
|
|
|
18
18
|
| gateway | Fastify gateway from OpenAPI spec | Production REST gateway with SOAP backend |
|
|
19
19
|
| app | Runnable Fastify app from client + gateway + OpenAPI | Local testing, demos |
|
|
20
20
|
| compile | Parse WSDL to catalog.json only | Debugging, multi-stage builds |
|
|
21
|
+
| assess | Source schema diagnostic report | Checked evidence and unresolved duties |
|
|
21
22
|
|
|
22
23
|
## pipeline
|
|
23
24
|
|
|
@@ -635,3 +636,22 @@ cat ./debug/catalog.json | jq '.types'
|
|
|
635
636
|
```bash
|
|
636
637
|
cat ./debug/catalog.json | jq '.operations'
|
|
637
638
|
```
|
|
639
|
+
|
|
640
|
+
## assess
|
|
641
|
+
|
|
642
|
+
Inspect source schema evidence without generating artifacts or dispatching SOAP. The [assurance contract](decisions/003-content-model-contracts.md#checked-product-assessment-amendment-p1-d01) defines the native scope and qualified correspondence route.
|
|
643
|
+
|
|
644
|
+
```bash
|
|
645
|
+
npx wsdl-tsc assess --wsdl-source examples/minimal/weather.wsdl --report .generated/assessment.json
|
|
646
|
+
```
|
|
647
|
+
|
|
648
|
+
| Flag | Purpose |
|
|
649
|
+
|---|---|
|
|
650
|
+
| `--wsdl-source` | Required local path or explicitly authorized URL |
|
|
651
|
+
| `--report` | Required diagnostic JSON output file; directory must exist |
|
|
652
|
+
| `--schema-root` | Repeated authorized local roots; defaults to the local source directory |
|
|
653
|
+
| `--schema-origin` | Repeated exact authorized HTTP(S) origins; no implicit network access |
|
|
654
|
+
| `--assessment-max-work` | Inclusive sticky request work limit, including report publication |
|
|
655
|
+
| `--assessment-max-nodes` | Inclusive cumulative preparation/context node limit |
|
|
656
|
+
|
|
657
|
+
Exit 0 requires established native scope and qualified dated-XSD correspondence. Exit 2 is inconclusive, 3 native scope disproved, 4 resource-limit, 5 cancellation and 1 operational failure; execution failure takes precedence over schema facts. SIGINT requests cooperative cancellation and a cancelled report. Runtime readiness and generation admission remain separate; no assessment report activates generation.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Exact Particle Analysis
|
|
2
|
+
|
|
3
|
+
Internal S06 occurrence and emptiness contracts over the immutable graph. See the root [README](../README.md).
|
|
4
|
+
|
|
5
|
+
## API and guarantees
|
|
6
|
+
|
|
7
|
+
[`analyzeOccurrences`](../src/compiler/occurrenceAnalysis.ts) consumes the `ComposedGraph` from [the common source/catalog entry](content-model-companions.md).
|
|
8
|
+
It returns `analyzed {analysis}` or `failure {diagnostic}` without partial success on exhaustion.
|
|
9
|
+
The analysis retains the original composed/resolved/canonical graph and the `requires-schema-assessment` gate.
|
|
10
|
+
|
|
11
|
+
Each particle summary records exact named-element and wildcard contributions, `nullable` and `hasRealization`.
|
|
12
|
+
It also records `effectiveTotalRange` and `schemaEmptiable`, the formal XSD schema predicates, using the same exact occurrence algebra.
|
|
13
|
+
Type summaries combine the ordered composed roots, preserving restriction replacement versus extension concatenation.
|
|
14
|
+
The particle table and original graph retain alternative-local guarantees and ordered relationships; object-wide intervals cannot replace them.
|
|
15
|
+
|
|
16
|
+
Finite bounds remain canonical decimal strings; `unbounded` is a distinct maximum.
|
|
17
|
+
The shared occurrence algebra uses exact `BigInt` after charging operand/result work.
|
|
18
|
+
Zero dominates multiplication in either position, including beneath unbounded descendants; finite repetitions are never expanded.
|
|
19
|
+
|
|
20
|
+
## Contributions and emptiness
|
|
21
|
+
|
|
22
|
+
Sequences and legal all groups add member contributions.
|
|
23
|
+
Choices take minima/maxima across realizable alternatives, inserting zero for absent members.
|
|
24
|
+
A single required branch stays required; a member in every branch retains their minimum guarantee.
|
|
25
|
+
Local repetition multiplies contributions without changing declared occurrences or group definitions.
|
|
26
|
+
|
|
27
|
+
An empty sequence or all group admits epsilon.
|
|
28
|
+
An empty required choice admits no sequence; an optional empty choice admits epsilon through zero repetitions.
|
|
29
|
+
A choice with an epsilon branch is nullable even with a positive occurrence minimum.
|
|
30
|
+
Unrealizable alternatives supply no accepted branch; `hasRealization` distinguishes empty language from epsilon.
|
|
31
|
+
|
|
32
|
+
Elements are atomic child events, independently of their type's child-content emptiness.
|
|
33
|
+
`hasRealization` describes the particle language with elements as terminals; it does not certify finite recursively nested values or scalar validity.
|
|
34
|
+
Scalar/mixed text, nil, attributes and defaults remain later owners' responsibilities.
|
|
35
|
+
|
|
36
|
+
Legal element/type recursion terminates without empty definition stubs.
|
|
37
|
+
Group/containment expansion uses iterative active/done traversal and memoization; S05 already rejects cycles in those edges.
|
|
38
|
+
No recursive emptiness equation crosses element type edges because an element is never epsilon.
|
|
39
|
+
S05's missing-reference and forbidden-cycle diagnostics remain applicable beneath zero bounds.
|
|
40
|
+
|
|
41
|
+
## Intervals and opaque scope
|
|
42
|
+
|
|
43
|
+
A repeated pair can have interval `2..4` while admitting only counts 2 and 4.
|
|
44
|
+
Order, gaps and correlated branches remain in the original grammar for #180/#181; summaries are not payload validators.
|
|
45
|
+
An opaque builtin contribution remains original data.
|
|
46
|
+
The scope `declared-particles-with-opaque-builtin` qualifies every child summary, including named/wildcard counts, effective total range and both emptiness predicates.
|
|
47
|
+
They describe declared contributions only; they cannot certify the counts or emptiness of the whole opaque content language.
|
|
48
|
+
Analysis never promotes builtin or skip/lax content to full concrete validation.
|
|
49
|
+
|
|
50
|
+
## Budgets and evidence
|
|
51
|
+
|
|
52
|
+
Analysis independently applies S05's inclusive 100,000-node and 1,000,000-work-step defaults.
|
|
53
|
+
Indexing, traversal, arithmetic digits, conservative multiplication work and contribution/provenance copying count before allocation.
|
|
54
|
+
Positive safe-integer overrides follow existing semantic policy; exhausted analysis returns `resource-limit` without partial success.
|
|
55
|
+
Later matcher, payload scalar and generated-output budgets retain their [ADR-003 D09 owners](decisions/003-content-model-contracts.md#provisional-resource-budgets-s02-d09).
|
|
56
|
+
|
|
57
|
+
[`analysis.xsd`](../test/conformance/fixtures/xsd/analysis/analysis.xsd) and [Node reference checks](../test/conformance/reference/analysis-contract.test.ts) retain historical qualification separately from current primary and scoped payload checks under [NT-CONT-01](reference-validation.md). Original huge-schema construction remains unqualified; the adjusted small copy is a separately hashed input.
|
|
58
|
+
The historical reference check raised xmlschema's model-depth setting from 15 to 32 and treated warnings as errors. Current libxml2 observations use the explicitly separate small copy; the original exact schema retains historical xmlschema qualification and current unsupported status.
|
|
59
|
+
|
|
60
|
+
### Nested empty-choice qualification
|
|
61
|
+
|
|
62
|
+
XSD 1.0 second-edition [Element Sequence Valid](https://www.w3.org/TR/2004/REC-xmlschema-1-20041028/#cvc-model-group) expressly states that no sequence is valid against an empty choice, while epsilon is valid against an empty sequence or all group.
|
|
63
|
+
[Particle validity](https://www.w3.org/TR/2004/REC-xmlschema-1-20041028/#cvc-particle) applies that rule to each repetition; an optional enclosing particle can choose zero repetitions.
|
|
64
|
+
The [restriction rule](https://www.w3.org/TR/2004/REC-xmlschema-1-20041028/#cos-particle-restrict) only calls an empty choice pointless when its minimum is zero, and does not remove a required empty choice during payload assessment.
|
|
65
|
+
The complete original second-edition XML source was read through a [pinned mirror](https://github.com/jacoelho/xsd/blob/142f25ee187e17f041af87b6bfcfc82385254520/docs/spec/xml/structures.xml), whose publication URI and October 2004 source header identify the Recommendation; direct W3C retrieval was unavailable in the managed network.
|
|
66
|
+
|
|
67
|
+
The executable `deadRequired`, `deadOptional`, `deadAndRequired` and `deadWildcard` cases retain a pinned-engine disagreement.
|
|
68
|
+
Xmlschema 4.2.0 skips the nested required empty choice and accepts the preceding child, although it rejects an isolated required empty choice.
|
|
69
|
+
Libxml2 2.14.6 rejects those children and accepts only zero enclosing repetitions where applicable, matching the primary rule.
|
|
70
|
+
The analysis follows that primary rule; the test records both engine observations without declaring the primary engine's acceptance normative.
|
|
71
|
+
#180/#181 must retain these cases when qualifying payload matching and independent enumeration; #179 retains schema validity separately.
|
|
72
|
+
|
|
73
|
+
The formal [Particle Emptiable](https://www.w3.org/TR/2004/REC-xmlschema-1-20041028/#cos-group-emptiable) predicate uses [effective total range](https://www.w3.org/TR/2004/REC-xmlschema-1-20041028/#cos-choice-range), which assigns an empty choice a zero range.
|
|
74
|
+
Consequently a required empty choice has `schemaEmptiable: true` and `nullable: false`.
|
|
75
|
+
#179 uses the former only where the specification invokes that formal schema predicate; #180 uses language nullability.
|
|
76
|
+
Formal ranges include unrealizable branches and are not accepted count intervals.
|
|
77
|
+
Declared zero-maximum particles remain in the graph for diagnostics and provenance; their range is zero as for the absent particle in the XSD component mapping, including an unbounded descendant.
|
|
78
|
+
Zero-bound children are omitted from their containing choice's alternatives, while an optional non-disabled empty sequence remains an epsilon alternative.
|
|
79
|
+
Root zero repetitions still admit epsilon.
|
|
80
|
+
The `disabledChoice` and `disabledElementChoice` cases record pinned-engine deviations from this mapping; the terminal case preserves the S01/#181 zero-bound attribution qualification.
|
|
81
|
+
|
|
82
|
+
### Commands and measurements
|
|
83
|
+
|
|
84
|
+
[Unit tests](../test/unit/occurrence-analysis.test.ts) cover arithmetic, zero, alternatives, recursion, immutability and configured boundaries.
|
|
85
|
+
Ignored measurements go to `tmp/conformance/analysis/measurements.json`; platform/broad qualification remains #208's responsibility.
|
|
86
|
+
S01/#181 and S05 oracle disagreements and [S02 security qualifications](content-model-decisions.md) remain assigned downstream.
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
npx vitest run test/unit/occurrence-analysis.test.ts
|
|
90
|
+
npx tsc -p test/unit/tsconfig.json
|
|
91
|
+
npm run test:reference:full
|
|
92
|
+
```
|