@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.
Files changed (355) hide show
  1. package/README.md +49 -1
  2. package/dist/app/generateApp.d.ts.map +1 -1
  3. package/dist/app/generateApp.js +8 -6
  4. package/dist/cli.js +49 -5
  5. package/dist/client/checkedDirectRuntime.d.ts +59 -0
  6. package/dist/client/checkedDirectRuntime.d.ts.map +1 -0
  7. package/dist/client/checkedDirectRuntime.js +23 -0
  8. package/dist/client/directClientRuntime.d.ts +49 -0
  9. package/dist/client/directClientRuntime.d.ts.map +1 -0
  10. package/dist/client/directClientRuntime.js +112 -0
  11. package/dist/client/directClientVersion.d.ts +4 -0
  12. package/dist/client/directClientVersion.d.ts.map +1 -0
  13. package/dist/client/directClientVersion.js +3 -0
  14. package/dist/client/generateDirectClient.d.ts +14 -0
  15. package/dist/client/generateDirectClient.d.ts.map +1 -0
  16. package/dist/client/generateDirectClient.js +136 -0
  17. package/dist/compiler/buildCanonicalGraph.d.ts +7 -0
  18. package/dist/compiler/buildCanonicalGraph.d.ts.map +1 -0
  19. package/dist/compiler/buildCanonicalGraph.js +381 -0
  20. package/dist/compiler/canonicalGraph.d.ts +198 -0
  21. package/dist/compiler/canonicalGraph.d.ts.map +1 -0
  22. package/dist/compiler/canonicalGraph.js +37 -0
  23. package/dist/compiler/catalogErrors.d.ts +18 -0
  24. package/dist/compiler/catalogErrors.d.ts.map +1 -0
  25. package/dist/compiler/catalogErrors.js +86 -0
  26. package/dist/compiler/catalogProvenance.d.ts +15 -0
  27. package/dist/compiler/catalogProvenance.d.ts.map +1 -0
  28. package/dist/compiler/catalogProvenance.js +229 -0
  29. package/dist/compiler/checkedAssessment.d.ts +91 -0
  30. package/dist/compiler/checkedAssessment.d.ts.map +1 -0
  31. package/dist/compiler/checkedAssessment.js +300 -0
  32. package/dist/compiler/checkedSourcePreparation.d.ts +35 -0
  33. package/dist/compiler/checkedSourcePreparation.d.ts.map +1 -0
  34. package/dist/compiler/checkedSourcePreparation.js +131 -0
  35. package/dist/compiler/complexTypeContent.d.ts +59 -0
  36. package/dist/compiler/complexTypeContent.d.ts.map +1 -0
  37. package/dist/compiler/complexTypeContent.js +558 -0
  38. package/dist/compiler/composeCanonicalGraph.d.ts +69 -0
  39. package/dist/compiler/composeCanonicalGraph.d.ts.map +1 -0
  40. package/dist/compiler/composeCanonicalGraph.js +252 -0
  41. package/dist/compiler/dataOwnership.d.ts +22 -0
  42. package/dist/compiler/dataOwnership.d.ts.map +1 -0
  43. package/dist/compiler/dataOwnership.js +157 -0
  44. package/dist/compiler/datatypeValues.d.ts +47 -0
  45. package/dist/compiler/datatypeValues.d.ts.map +1 -0
  46. package/dist/compiler/datatypeValues.js +275 -0
  47. package/dist/compiler/directCodec.d.ts +59 -0
  48. package/dist/compiler/directCodec.d.ts.map +1 -0
  49. package/dist/compiler/directCodec.js +192 -0
  50. package/dist/compiler/directExecutionPolicy.d.ts +10 -0
  51. package/dist/compiler/directExecutionPolicy.d.ts.map +1 -0
  52. package/dist/compiler/directExecutionPolicy.js +17 -0
  53. package/dist/compiler/directOperation.d.ts +72 -0
  54. package/dist/compiler/directOperation.d.ts.map +1 -0
  55. package/dist/compiler/directOperation.js +282 -0
  56. package/dist/compiler/directSoap.d.ts +42 -0
  57. package/dist/compiler/directSoap.d.ts.map +1 -0
  58. package/dist/compiler/directSoap.js +298 -0
  59. package/dist/compiler/directSoapSource.d.ts +15 -0
  60. package/dist/compiler/directSoapSource.d.ts.map +1 -0
  61. package/dist/compiler/directSoapSource.js +86 -0
  62. package/dist/compiler/directSourceCapsule.d.ts +97 -0
  63. package/dist/compiler/directSourceCapsule.d.ts.map +1 -0
  64. package/dist/compiler/directSourceCapsule.js +305 -0
  65. package/dist/compiler/directStructure.d.ts +51 -0
  66. package/dist/compiler/directStructure.d.ts.map +1 -0
  67. package/dist/compiler/directStructure.js +252 -0
  68. package/dist/compiler/directStructurePlan.d.ts +16 -0
  69. package/dist/compiler/directStructurePlan.d.ts.map +1 -0
  70. package/dist/compiler/directStructurePlan.js +58 -0
  71. package/dist/compiler/directValues.d.ts +69 -0
  72. package/dist/compiler/directValues.d.ts.map +1 -0
  73. package/dist/compiler/directValues.js +282 -0
  74. package/dist/compiler/finiteRe01Verification.d.ts +140 -0
  75. package/dist/compiler/finiteRe01Verification.d.ts.map +1 -0
  76. package/dist/compiler/finiteRe01Verification.js +830 -0
  77. package/dist/compiler/graphTraversal.d.ts +11 -0
  78. package/dist/compiler/graphTraversal.d.ts.map +1 -0
  79. package/dist/compiler/graphTraversal.js +37 -0
  80. package/dist/compiler/hypotheticalScopedIdentity.d.ts +23 -0
  81. package/dist/compiler/hypotheticalScopedIdentity.d.ts.map +1 -0
  82. package/dist/compiler/hypotheticalScopedIdentity.js +81 -0
  83. package/dist/compiler/occurrenceAnalysis.d.ts +65 -0
  84. package/dist/compiler/occurrenceAnalysis.d.ts.map +1 -0
  85. package/dist/compiler/occurrenceAnalysis.js +300 -0
  86. package/dist/compiler/originalSourceMembership.d.ts +6 -0
  87. package/dist/compiler/originalSourceMembership.d.ts.map +1 -0
  88. package/dist/compiler/originalSourceMembership.js +31 -0
  89. package/dist/compiler/particleAttribution.d.ts +17 -0
  90. package/dist/compiler/particleAttribution.d.ts.map +1 -0
  91. package/dist/compiler/particleAttribution.js +474 -0
  92. package/dist/compiler/particleDeclarationConsistency.d.ts +24 -0
  93. package/dist/compiler/particleDeclarationConsistency.d.ts.map +1 -0
  94. package/dist/compiler/particleDeclarationConsistency.js +197 -0
  95. package/dist/compiler/particleExtension.d.ts +22 -0
  96. package/dist/compiler/particleExtension.d.ts.map +1 -0
  97. package/dist/compiler/particleExtension.js +119 -0
  98. package/dist/compiler/particleLocalAssessment.d.ts +20 -0
  99. package/dist/compiler/particleLocalAssessment.d.ts.map +1 -0
  100. package/dist/compiler/particleLocalAssessment.js +92 -0
  101. package/dist/compiler/particleRestriction.d.ts +24 -0
  102. package/dist/compiler/particleRestriction.d.ts.map +1 -0
  103. package/dist/compiler/particleRestriction.js +489 -0
  104. package/dist/compiler/particleSemanticView.d.ts +50 -0
  105. package/dist/compiler/particleSemanticView.d.ts.map +1 -0
  106. package/dist/compiler/particleSemanticView.js +297 -0
  107. package/dist/compiler/particleWildcardRelation.d.ts +88 -0
  108. package/dist/compiler/particleWildcardRelation.d.ts.map +1 -0
  109. package/dist/compiler/particleWildcardRelation.js +143 -0
  110. package/dist/compiler/re01CandidateCorrespondence.d.ts +64 -0
  111. package/dist/compiler/re01CandidateCorrespondence.d.ts.map +1 -0
  112. package/dist/compiler/re01CandidateCorrespondence.js +572 -0
  113. package/dist/compiler/re01TypeProperties.d.ts +71 -0
  114. package/dist/compiler/re01TypeProperties.d.ts.map +1 -0
  115. package/dist/compiler/re01TypeProperties.js +120 -0
  116. package/dist/compiler/re01TypePropertyValidation.d.ts +23 -0
  117. package/dist/compiler/re01TypePropertyValidation.d.ts.map +1 -0
  118. package/dist/compiler/re01TypePropertyValidation.js +161 -0
  119. package/dist/compiler/resolveCanonicalGraph.d.ts +38 -0
  120. package/dist/compiler/resolveCanonicalGraph.d.ts.map +1 -0
  121. package/dist/compiler/resolveCanonicalGraph.js +170 -0
  122. package/dist/compiler/scalarSchemaAssessment.d.ts +425 -0
  123. package/dist/compiler/scalarSchemaAssessment.d.ts.map +1 -0
  124. package/dist/compiler/scalarSchemaAssessment.js +5198 -0
  125. package/dist/compiler/schemaAttributeGroupProperties.d.ts +17 -0
  126. package/dist/compiler/schemaAttributeGroupProperties.d.ts.map +1 -0
  127. package/dist/compiler/schemaAttributeGroupProperties.js +53 -0
  128. package/dist/compiler/schemaAttributeProperties.d.ts +10 -0
  129. package/dist/compiler/schemaAttributeProperties.d.ts.map +1 -0
  130. package/dist/compiler/schemaAttributeProperties.js +11 -0
  131. package/dist/compiler/schemaAttributeUses.d.ts +90 -0
  132. package/dist/compiler/schemaAttributeUses.d.ts.map +1 -0
  133. package/dist/compiler/schemaAttributeUses.js +725 -0
  134. package/dist/compiler/schemaBinaryWordReconstruction.d.ts +10 -0
  135. package/dist/compiler/schemaBinaryWordReconstruction.d.ts.map +1 -0
  136. package/dist/compiler/schemaBinaryWordReconstruction.js +33 -0
  137. package/dist/compiler/schemaBuiltinFacets.d.ts +14 -0
  138. package/dist/compiler/schemaBuiltinFacets.d.ts.map +1 -0
  139. package/dist/compiler/schemaBuiltinFacets.js +51 -0
  140. package/dist/compiler/schemaCalendarImages.d.ts +8 -0
  141. package/dist/compiler/schemaCalendarImages.d.ts.map +1 -0
  142. package/dist/compiler/schemaCalendarImages.js +204 -0
  143. package/dist/compiler/schemaCalendarLanguage.d.ts +11 -0
  144. package/dist/compiler/schemaCalendarLanguage.d.ts.map +1 -0
  145. package/dist/compiler/schemaCalendarLanguage.js +227 -0
  146. package/dist/compiler/schemaComponentEquality.d.ts +28 -0
  147. package/dist/compiler/schemaComponentEquality.d.ts.map +1 -0
  148. package/dist/compiler/schemaComponentEquality.js +446 -0
  149. package/dist/compiler/schemaConstructionAssessment.d.ts +46 -0
  150. package/dist/compiler/schemaConstructionAssessment.d.ts.map +1 -0
  151. package/dist/compiler/schemaConstructionAssessment.js +663 -0
  152. package/dist/compiler/schemaDatatypeValues.d.ts +4 -0
  153. package/dist/compiler/schemaDatatypeValues.d.ts.map +1 -0
  154. package/dist/compiler/schemaDatatypeValues.js +2 -0
  155. package/dist/compiler/schemaDecimalLanguage.d.ts +7 -0
  156. package/dist/compiler/schemaDecimalLanguage.d.ts.map +1 -0
  157. package/dist/compiler/schemaDecimalLanguage.js +102 -0
  158. package/dist/compiler/schemaDeclarationPrimitives.d.ts +34 -0
  159. package/dist/compiler/schemaDeclarationPrimitives.d.ts.map +1 -0
  160. package/dist/compiler/schemaDeclarationPrimitives.js +194 -0
  161. package/dist/compiler/schemaDocumentSyntax.d.ts +55 -0
  162. package/dist/compiler/schemaDocumentSyntax.d.ts.map +1 -0
  163. package/dist/compiler/schemaDocumentSyntax.js +294 -0
  164. package/dist/compiler/schemaDurationLanguage.d.ts +11 -0
  165. package/dist/compiler/schemaDurationLanguage.d.ts.map +1 -0
  166. package/dist/compiler/schemaDurationLanguage.js +170 -0
  167. package/dist/compiler/schemaElementProperties.d.ts +16 -0
  168. package/dist/compiler/schemaElementProperties.d.ts.map +1 -0
  169. package/dist/compiler/schemaElementProperties.js +23 -0
  170. package/dist/compiler/schemaEndpointWordCapacity.d.ts +36 -0
  171. package/dist/compiler/schemaEndpointWordCapacity.d.ts.map +1 -0
  172. package/dist/compiler/schemaEndpointWordCapacity.js +39 -0
  173. package/dist/compiler/schemaExactCalendar.d.ts +73 -0
  174. package/dist/compiler/schemaExactCalendar.d.ts.map +1 -0
  175. package/dist/compiler/schemaExactCalendar.js +264 -0
  176. package/dist/compiler/schemaFacetAnnotation.d.ts +32 -0
  177. package/dist/compiler/schemaFacetAnnotation.d.ts.map +1 -0
  178. package/dist/compiler/schemaFacetAnnotation.js +199 -0
  179. package/dist/compiler/schemaGeneratedScalarShape.d.ts +35 -0
  180. package/dist/compiler/schemaGeneratedScalarShape.d.ts.map +1 -0
  181. package/dist/compiler/schemaGeneratedScalarShape.js +176 -0
  182. package/dist/compiler/schemaIdentityConstraints.d.ts +73 -0
  183. package/dist/compiler/schemaIdentityConstraints.d.ts.map +1 -0
  184. package/dist/compiler/schemaIdentityConstraints.js +362 -0
  185. package/dist/compiler/schemaIeeeLanguage.d.ts +43 -0
  186. package/dist/compiler/schemaIeeeLanguage.d.ts.map +1 -0
  187. package/dist/compiler/schemaIeeeLanguage.js +759 -0
  188. package/dist/compiler/schemaIntegerImages.d.ts +11 -0
  189. package/dist/compiler/schemaIntegerImages.d.ts.map +1 -0
  190. package/dist/compiler/schemaIntegerImages.js +113 -0
  191. package/dist/compiler/schemaLexicalPredicates.d.ts +29 -0
  192. package/dist/compiler/schemaLexicalPredicates.d.ts.map +1 -0
  193. package/dist/compiler/schemaLexicalPredicates.js +63 -0
  194. package/dist/compiler/schemaNotationProperties.d.ts +32 -0
  195. package/dist/compiler/schemaNotationProperties.d.ts.map +1 -0
  196. package/dist/compiler/schemaNotationProperties.js +84 -0
  197. package/dist/compiler/schemaNumericImageConditions.d.ts +24 -0
  198. package/dist/compiler/schemaNumericImageConditions.d.ts.map +1 -0
  199. package/dist/compiler/schemaNumericImageConditions.js +66 -0
  200. package/dist/compiler/schemaParticleWildcardProperties.d.ts +20 -0
  201. package/dist/compiler/schemaParticleWildcardProperties.d.ts.map +1 -0
  202. package/dist/compiler/schemaParticleWildcardProperties.js +43 -0
  203. package/dist/compiler/schemaPattern.d.ts +1062 -0
  204. package/dist/compiler/schemaPattern.d.ts.map +1 -0
  205. package/dist/compiler/schemaPattern.js +581 -0
  206. package/dist/compiler/schemaRegularLanguage.d.ts +67 -0
  207. package/dist/compiler/schemaRegularLanguage.d.ts.map +1 -0
  208. package/dist/compiler/schemaRegularLanguage.js +1166 -0
  209. package/dist/compiler/schemaScalarContext.d.ts +81 -0
  210. package/dist/compiler/schemaScalarContext.d.ts.map +1 -0
  211. package/dist/compiler/schemaScalarContext.js +78 -0
  212. package/dist/compiler/schemaScalarKernel.d.ts +182 -0
  213. package/dist/compiler/schemaScalarKernel.d.ts.map +1 -0
  214. package/dist/compiler/schemaScalarKernel.js +391 -0
  215. package/dist/compiler/schemaScalarWitnesses.d.ts +6 -0
  216. package/dist/compiler/schemaScalarWitnesses.d.ts.map +1 -0
  217. package/dist/compiler/schemaScalarWitnesses.js +118 -0
  218. package/dist/compiler/schemaSimpleTypeProperties.d.ts +95 -0
  219. package/dist/compiler/schemaSimpleTypeProperties.d.ts.map +1 -0
  220. package/dist/compiler/schemaSimpleTypeProperties.js +103 -0
  221. package/dist/compiler/schemaSourceGrammar.d.ts +27 -0
  222. package/dist/compiler/schemaSourceGrammar.d.ts.map +1 -0
  223. package/dist/compiler/schemaSourceGrammar.js +290 -0
  224. package/dist/compiler/schemaSourceLexical.d.ts +4 -0
  225. package/dist/compiler/schemaSourceLexical.d.ts.map +1 -0
  226. package/dist/compiler/schemaSourceLexical.js +12 -0
  227. package/dist/compiler/schemaSourceValues.d.ts +51 -0
  228. package/dist/compiler/schemaSourceValues.d.ts.map +1 -0
  229. package/dist/compiler/schemaSourceValues.js +225 -0
  230. package/dist/compiler/schemaSourceWildcards.d.ts +28 -0
  231. package/dist/compiler/schemaSourceWildcards.d.ts.map +1 -0
  232. package/dist/compiler/schemaSourceWildcards.js +247 -0
  233. package/dist/compiler/schemaSymbolicSequences.d.ts +16 -0
  234. package/dist/compiler/schemaSymbolicSequences.d.ts.map +1 -0
  235. package/dist/compiler/schemaSymbolicSequences.js +99 -0
  236. package/dist/compiler/schemaSymbolicValueSets.d.ts +32 -0
  237. package/dist/compiler/schemaSymbolicValueSets.d.ts.map +1 -0
  238. package/dist/compiler/schemaSymbolicValueSets.js +149 -0
  239. package/dist/compiler/schemaSyntaxAssessment.d.ts +25 -0
  240. package/dist/compiler/schemaSyntaxAssessment.d.ts.map +1 -0
  241. package/dist/compiler/schemaSyntaxAssessment.js +361 -0
  242. package/dist/compiler/schemaTemporalAliases.d.ts +6 -0
  243. package/dist/compiler/schemaTemporalAliases.d.ts.map +1 -0
  244. package/dist/compiler/schemaTemporalAliases.js +195 -0
  245. package/dist/compiler/schemaTokenImages.d.ts +9 -0
  246. package/dist/compiler/schemaTokenImages.d.ts.map +1 -0
  247. package/dist/compiler/schemaTokenImages.js +142 -0
  248. package/dist/compiler/schemaTypeIdentity.d.ts +39 -0
  249. package/dist/compiler/schemaTypeIdentity.d.ts.map +1 -0
  250. package/dist/compiler/schemaTypeIdentity.js +78 -0
  251. package/dist/compiler/schemaTypeRelations.d.ts +38 -0
  252. package/dist/compiler/schemaTypeRelations.d.ts.map +1 -0
  253. package/dist/compiler/schemaTypeRelations.js +576 -0
  254. package/dist/compiler/schemaUri.d.ts +13 -0
  255. package/dist/compiler/schemaUri.d.ts.map +1 -0
  256. package/dist/compiler/schemaUri.js +103 -0
  257. package/dist/compiler/schemaValueContext.d.ts +26 -0
  258. package/dist/compiler/schemaValueContext.d.ts.map +1 -0
  259. package/dist/compiler/schemaValueContext.js +1 -0
  260. package/dist/compiler/schemaValueImages.d.ts +10 -0
  261. package/dist/compiler/schemaValueImages.d.ts.map +1 -0
  262. package/dist/compiler/schemaValueImages.js +142 -0
  263. package/dist/compiler/schemaValueSequences.d.ts +15 -0
  264. package/dist/compiler/schemaValueSequences.d.ts.map +1 -0
  265. package/dist/compiler/schemaValueSequences.js +19 -0
  266. package/dist/compiler/semanticBudget.d.ts +50 -0
  267. package/dist/compiler/semanticBudget.d.ts.map +1 -0
  268. package/dist/compiler/semanticBudget.js +178 -0
  269. package/dist/compiler/semanticCatalog.d.ts +122 -0
  270. package/dist/compiler/semanticCatalog.d.ts.map +1 -0
  271. package/dist/compiler/semanticCatalog.js +160 -0
  272. package/dist/compiler/semanticContext.d.ts +172 -0
  273. package/dist/compiler/semanticContext.d.ts.map +1 -0
  274. package/dist/compiler/semanticContext.js +1168 -0
  275. package/dist/compiler/semanticTypeDependencies.d.ts +8 -0
  276. package/dist/compiler/semanticTypeDependencies.d.ts.map +1 -0
  277. package/dist/compiler/semanticTypeDependencies.js +64 -0
  278. package/dist/compiler/semanticTypeReference.d.ts +24 -0
  279. package/dist/compiler/semanticTypeReference.d.ts.map +1 -0
  280. package/dist/compiler/semanticTypeReference.js +36 -0
  281. package/dist/compiler/shapeResolver.d.ts +1 -0
  282. package/dist/compiler/shapeResolver.d.ts.map +1 -1
  283. package/dist/compiler/shapeResolver.js +7 -9
  284. package/dist/compiler/sourceSchemaBinding.d.ts +26 -0
  285. package/dist/compiler/sourceSchemaBinding.d.ts.map +1 -0
  286. package/dist/compiler/sourceSchemaBinding.js +39 -0
  287. package/dist/compiler/structuralCompanions.d.ts +16 -0
  288. package/dist/compiler/structuralCompanions.d.ts.map +1 -0
  289. package/dist/compiler/structuralCompanions.js +232 -0
  290. package/dist/compiler/validateSemanticGraph.d.ts +5 -0
  291. package/dist/compiler/validateSemanticGraph.d.ts.map +1 -0
  292. package/dist/compiler/validateSemanticGraph.js +376 -0
  293. package/dist/compiler/wildcardAlgebra.d.ts +26 -0
  294. package/dist/compiler/wildcardAlgebra.d.ts.map +1 -0
  295. package/dist/compiler/wildcardAlgebra.js +155 -0
  296. package/dist/gateway/generateGateway.d.ts.map +1 -1
  297. package/dist/gateway/generateGateway.js +2 -2
  298. package/dist/index.d.ts +3 -0
  299. package/dist/index.d.ts.map +1 -1
  300. package/dist/index.js +2 -0
  301. package/dist/loader/orderedSyntax.d.ts +77 -0
  302. package/dist/loader/orderedSyntax.d.ts.map +1 -0
  303. package/dist/loader/orderedSyntax.js +202 -0
  304. package/dist/loader/resolutionDepth.d.ts +7 -0
  305. package/dist/loader/resolutionDepth.d.ts.map +1 -0
  306. package/dist/loader/resolutionDepth.js +65 -0
  307. package/dist/loader/schemaInput.d.ts +53 -0
  308. package/dist/loader/schemaInput.d.ts.map +1 -0
  309. package/dist/loader/schemaInput.js +212 -0
  310. package/dist/loader/schemaResources.d.ts +59 -0
  311. package/dist/loader/schemaResources.d.ts.map +1 -0
  312. package/dist/loader/schemaResources.js +292 -0
  313. package/dist/openapi/generateOpenAPI.d.ts.map +1 -1
  314. package/dist/openapi/generateOpenAPI.js +2 -2
  315. package/dist/test/generateTests.d.ts.map +1 -1
  316. package/dist/test/generateTests.js +2 -2
  317. package/dist/util/xmlWhitespace.d.ts +3 -0
  318. package/dist/util/xmlWhitespace.d.ts.map +1 -0
  319. package/dist/util/xmlWhitespace.js +4 -0
  320. package/docs/README.md +14 -1
  321. package/docs/architecture.md +9 -0
  322. package/docs/cli-reference.md +21 -1
  323. package/docs/content-model-analysis.md +92 -0
  324. package/docs/content-model-baseline.md +121 -0
  325. package/docs/content-model-catalog.md +116 -0
  326. package/docs/content-model-companions.md +90 -0
  327. package/docs/content-model-composition.md +103 -0
  328. package/docs/content-model-decisions.md +79 -0
  329. package/docs/content-model-gateway-feasibility.md +169 -0
  330. package/docs/content-model-graph.md +121 -0
  331. package/docs/content-model-loading.md +163 -0
  332. package/docs/content-model-matching.md +85 -0
  333. package/docs/content-model-readiness.md +144 -0
  334. package/docs/content-model-resolution.md +81 -0
  335. package/docs/content-model-s02-handoff.md +98 -0
  336. package/docs/content-model-s06-au-01.md +425 -0
  337. package/docs/content-model-s06-dt-01.md +386 -0
  338. package/docs/content-model-s06-pw-01.md +350 -0
  339. package/docs/content-model-s06-re-01-resolver-implementation.md +869 -0
  340. package/docs/content-model-s06-re-01-resolver.md +513 -0
  341. package/docs/content-model-s06-re-01-scalar-witnesses.md +1423 -0
  342. package/docs/content-model-s06-re-01-support-reconstruction.md +6337 -0
  343. package/docs/content-model-s06-re-01.md +7477 -0
  344. package/docs/content-model-s06-research-handoff.md +909 -0
  345. package/docs/content-model-shipped-fix.md +83 -0
  346. package/docs/content-model-soap-feasibility.md +165 -0
  347. package/docs/decisions/002-streamable-responses.md +2 -0
  348. package/docs/decisions/003-content-model-contracts.md +280 -0
  349. package/docs/direct-values.md +311 -0
  350. package/docs/reference-validation.md +243 -0
  351. package/docs/releases/v1.1.5.md +38 -0
  352. package/docs/roadmap/README.md +2 -2
  353. package/docs/supported-patterns.md +13 -5
  354. package/package.json +26 -13
  355. package/src/generation/preambles/direct-client/typescript.preamble +3 -0
@@ -0,0 +1,73 @@
1
+ /** Shared exact schema calendar semantics: accepted DT01 A; no payload policy. */
2
+ export type Decimal = Readonly<{
3
+ coefficient: bigint;
4
+ scale: number;
5
+ digits: number;
6
+ }>;
7
+ export type ReducedFamily = "time" | "gYear" | "gYearMonth" | "gMonthDay" | "gDay" | "gMonth";
8
+ export type CalendarFamily = "date" | "dateTime" | ReducedFamily;
9
+ export type Calendar = Readonly<{
10
+ family: CalendarFamily;
11
+ year: bigint;
12
+ month: number;
13
+ day: number;
14
+ seconds: Decimal;
15
+ zoned: boolean;
16
+ lexical: string;
17
+ digits: number;
18
+ }>;
19
+ export type Duration = Readonly<{
20
+ months: bigint;
21
+ seconds: Decimal;
22
+ digits: number;
23
+ lexical: string;
24
+ }>;
25
+ export type Order = "less" | "equal" | "greater" | "indeterminate";
26
+ export declare class ProbeFailure extends Error {
27
+ readonly kind: "invalid-schema" | "resource-limit";
28
+ constructor(kind: "invalid-schema" | "resource-limit", message: string);
29
+ }
30
+ /** Inclusive limits; failures happen before the charged work or allocation. */
31
+ export interface CalendarBudget {
32
+ charge(work: number): void;
33
+ arithmetic(digits: number): void;
34
+ text(value: string): void;
35
+ }
36
+ export declare class Budget implements CalendarBudget {
37
+ readonly maxWork: number;
38
+ readonly maxNodes: number;
39
+ used: number;
40
+ constructor(maxWork?: number, maxNodes?: number);
41
+ nodes(count: number): void;
42
+ charge(work: number): void;
43
+ arithmetic(digits: number): void;
44
+ text(value: string): void;
45
+ }
46
+ export declare const isLeap: (year: bigint) => boolean;
47
+ /** Option A removes year zero; digits is a trusted, validated conservative bound. */
48
+ export declare function ordinal(year: bigint, month: number, day: number, budget: CalendarBudget, digits: number): bigint;
49
+ /** Invert by cycles; digits is a trusted, validated conservative operand bound. */
50
+ export declare function fromOrdinal(dayNumber: bigint, budget: CalendarBudget, digits: number): Readonly<{
51
+ year: bigint;
52
+ month: number;
53
+ day: number;
54
+ }>;
55
+ export declare function parseCalendar(family: "date" | "dateTime", lexical: string, budget: CalendarBudget): Calendar;
56
+ /** Exact schema comparison representatives; omitted fields remain type context. */
57
+ export declare function parseReduced(family: ReducedFamily, lexical: string, budget: CalendarBudget): Calendar;
58
+ /** Internal coordinate display, with the value timeline explicit and no zone suffix. */
59
+ export declare function showRepresentative(value: Calendar, budget: CalendarBudget): Readonly<{
60
+ family: CalendarFamily;
61
+ timeline: "zoned" | "local";
62
+ coordinate: string;
63
+ }>;
64
+ export declare function parseDuration(lexical: string, budget: CalendarBudget): Duration;
65
+ export declare function sameDuration(a: Duration, b: Duration, budget: CalendarBudget): boolean;
66
+ /** Calendar ordering and equality are distinct; different timelines never equal. */
67
+ export declare function sameCalendar(a: Calendar, b: Calendar, budget: CalendarBudget): boolean;
68
+ export declare function compareCalendar(a: Calendar, b: Calendar, budget: CalendarBudget): Order;
69
+ export declare function addDuration(start: Calendar, duration: Duration, budget: CalendarBudget): Decimal;
70
+ export declare function compareDuration(a: Duration, b: Duration, budget: CalendarBudget): Order;
71
+ /** Exact output for tests only; canonical strings never replace retained lexicals. */
72
+ export declare function showInstant(value: Decimal, budget: CalendarBudget): string;
73
+ //# sourceMappingURL=schemaExactCalendar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemaExactCalendar.d.ts","sourceRoot":"","sources":["../../src/compiler/schemaExactCalendar.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,MAAM,MAAM,OAAO,GAAG,QAAQ,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAC,CAAC,CAAC;AACrF,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,OAAO,GAAG,YAAY,GAAG,WAAW,GAAG,MAAM,GAAG,QAAQ,CAAC;AAC9F,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,UAAU,GAAG,aAAa,CAAC;AACjE,MAAM,MAAM,QAAQ,GAAG,QAAQ,CAAC;IAC9B,MAAM,EAAE,cAAc,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IACjE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;CACnE,CAAC,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,CAAC,CAAC;AACrG,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,OAAO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S1E"}
@@ -0,0 +1,264 @@
1
+ export class ProbeFailure extends Error {
2
+ kind;
3
+ constructor(kind, message) {
4
+ super(message);
5
+ this.kind = kind;
6
+ }
7
+ }
8
+ export class Budget {
9
+ maxWork;
10
+ maxNodes;
11
+ used = 0;
12
+ constructor(maxWork = 1_000_000, maxNodes = 100_000) {
13
+ this.maxWork = maxWork;
14
+ this.maxNodes = maxNodes;
15
+ if (!Number.isSafeInteger(maxWork) || maxWork < 1 || !Number.isSafeInteger(maxNodes) || maxNodes < 1) {
16
+ throw new Error("Budget limits must be positive exact safe integers");
17
+ }
18
+ }
19
+ nodes(count) {
20
+ if (!Number.isSafeInteger(count) || count < 0 || count > this.maxNodes) {
21
+ throw new ProbeFailure("resource-limit", "Input graph node budget exhausted");
22
+ }
23
+ this.charge(count);
24
+ }
25
+ charge(work) {
26
+ if (!Number.isSafeInteger(work) || work < 0 || work > this.maxWork - this.used) {
27
+ throw new ProbeFailure("resource-limit", "Exact calendar work budget exhausted");
28
+ }
29
+ this.used += work;
30
+ }
31
+ arithmetic(digits) { this.charge((digits + 2) ** 2); }
32
+ text(value) { this.charge(value.length * 4 + 8); }
33
+ }
34
+ const invalid = (message) => { throw new ProbeFailure("invalid-schema", message); };
35
+ const floor = (a, b) => a >= 0n ? a / b : (a - b + 1n) / b;
36
+ const mod = (a, b) => a - floor(a, b) * b;
37
+ export const isLeap = (year) => year % 4n === 0n && (year % 100n !== 0n || year % 400n === 0n);
38
+ const monthLengths = (year) => [31, isLeap(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
39
+ /** Option A removes year zero; digits is a trusted, validated conservative bound. */
40
+ export function ordinal(year, month, day, budget, digits) {
41
+ if (year === 0n)
42
+ return invalid("Option A has no year zero");
43
+ budget.arithmetic(digits + 8);
44
+ const y = year - 1n;
45
+ const prior = 365n * y + floor(y, 4n) - floor(y, 100n) + floor(y, 400n) + (year < 0n ? 366n : 0n);
46
+ const lengths = monthLengths(year);
47
+ let before = 0;
48
+ for (let m = 1; m < month; m++) {
49
+ budget.charge(1);
50
+ before += lengths[m - 1];
51
+ }
52
+ return prior + BigInt(before + day - 1);
53
+ }
54
+ /** Invert by cycles; digits is a trusted, validated conservative operand bound. */
55
+ export function fromOrdinal(dayNumber, budget, digits) {
56
+ budget.arithmetic(digits + 8);
57
+ const astronomical = dayNumber < 0n ? dayNumber - 366n : dayNumber;
58
+ const cycle = floor(astronomical, 146097n);
59
+ let rest = astronomical - cycle * 146097n;
60
+ const century = rest / 36524n > 3n ? 3n : rest / 36524n;
61
+ rest -= century * 36524n;
62
+ const quad = rest / 1461n;
63
+ rest -= quad * 1461n;
64
+ const single = rest / 365n > 3n ? 3n : rest / 365n;
65
+ rest -= single * 365n;
66
+ const year = cycle * 400n + century * 100n + quad * 4n + single + 1n;
67
+ let month = 1;
68
+ for (const length of monthLengths(year)) {
69
+ budget.charge(1);
70
+ if (rest < BigInt(length))
71
+ break;
72
+ rest -= BigInt(length);
73
+ month++;
74
+ }
75
+ return { year, month, day: Number(rest) + 1 };
76
+ }
77
+ function decimal(value, budget) {
78
+ budget.text(value);
79
+ if (!/^[0-9]+(?:\.[0-9]+)?$/.test(value))
80
+ return invalid("Invalid decimal seconds");
81
+ const dot = value.indexOf(".");
82
+ let scale = dot < 0 ? 0 : value.length - dot - 1;
83
+ budget.arithmetic(value.length);
84
+ let coefficient = BigInt(value.replace(".", ""));
85
+ while (scale && coefficient % 10n === 0n) {
86
+ budget.charge(value.length);
87
+ coefficient /= 10n;
88
+ scale--;
89
+ }
90
+ return { coefficient, scale, digits: value.length };
91
+ }
92
+ function scaled(value, target, budget) {
93
+ budget.arithmetic(value.digits + target - value.scale);
94
+ return value.coefficient * 10n ** BigInt(target - value.scale);
95
+ }
96
+ function sum(a, b, budget) {
97
+ const scale = Math.max(a.scale, b.scale);
98
+ return { coefficient: scaled(a, scale, budget) + scaled(b, scale, budget), scale,
99
+ digits: Math.max(a.digits + scale - a.scale, b.digits + scale - b.scale) + 1 };
100
+ }
101
+ function integer(value, digits) { return { coefficient: value, scale: 0, digits }; }
102
+ function compareDecimal(a, b, budget) {
103
+ const scale = Math.max(a.scale, b.scale);
104
+ const x = scaled(a, scale, budget), y = scaled(b, scale, budget);
105
+ return x < y ? "less" : x > y ? "greater" : "equal";
106
+ }
107
+ export function parseCalendar(family, lexical, budget) {
108
+ budget.text(lexical);
109
+ const value = lexical.replace(/[\t\r\n ]+/g, " ").replace(/^ | $/g, "");
110
+ const match = (family === "date" ? /^(-?[0-9]{4,})-([0-9]{2})-([0-9]{2})(Z|[+-][0-9]{2}:[0-9]{2})?$/
111
+ : /^(-?[0-9]{4,})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2}(?:\.[0-9]+)?)(Z|[+-][0-9]{2}:[0-9]{2})?$/).exec(value);
112
+ if (!match)
113
+ return invalid("Calendar lexical form is invalid");
114
+ const rawYear = match[1], unsigned = rawYear.replace(/^-/, "");
115
+ if (unsigned.length > 4 && unsigned[0] === "0")
116
+ return invalid("Extended years cannot have leading zeroes");
117
+ budget.arithmetic(rawYear.length);
118
+ const year = BigInt(rawYear), month = Number(match[2]), day = Number(match[3]);
119
+ if (!year || month < 1 || month > 12 || day < 1 || day > monthLengths(year)[month - 1])
120
+ return invalid("Calendar date is invalid");
121
+ const hour = family === "date" ? 0 : Number(match[4]), minute = family === "date" ? 0 : Number(match[5]);
122
+ const second = decimal(family === "date" ? "0" : match[6], budget);
123
+ // XSD 1.0 D.1 admits second 60; Appendix E treats it as overflow.
124
+ if (hour > 24 || minute > 59 || compareDecimal(second, integer(61n, 2), budget) !== "less"
125
+ || hour === 24 && (minute !== 0 || second.coefficient !== 0n))
126
+ return invalid("Calendar clock is invalid");
127
+ const zone = match[family === "date" ? 4 : 7];
128
+ let offset = 0;
129
+ if (zone && zone !== "Z") {
130
+ const hours = Number(zone.slice(1, 3)), minutes = Number(zone.slice(4));
131
+ if (hours > 14 || minutes > 59 || hours === 14 && minutes !== 0)
132
+ return invalid("Timezone is invalid");
133
+ offset = (zone[0] === "-" ? -1 : 1) * (hours * 60 + minutes);
134
+ }
135
+ const seconds = sum(integer(ordinal(year, month, day, budget, lexical.length) * 86400n + BigInt(hour * 3600 + minute * 60 - offset * 60), lexical.length + 8), second, budget);
136
+ budget.arithmetic(seconds.digits + seconds.scale);
137
+ // This API stores assessed value objects: section 3.2.7 places zoned values
138
+ // in UTC. Appendix E's raw field-tuple timezone conversion is a separate use.
139
+ const normalized = fromOrdinal(floor(seconds.coefficient, 86400n * 10n ** BigInt(seconds.scale)), budget, seconds.digits);
140
+ return { family, ...normalized, seconds, zoned: zone !== undefined, lexical, digits: lexical.length + 8 };
141
+ }
142
+ /** Exact schema comparison representatives; omitted fields remain type context. */
143
+ export function parseReduced(family, lexical, budget) {
144
+ budget.text(lexical);
145
+ const value = lexical.replace(/[\t\r\n ]+/g, " ").replace(/^ | $/g, "");
146
+ // Six fixed regex objects and their lookup record, before creation.
147
+ budget.charge(7);
148
+ const patterns = {
149
+ time: /^([0-9]{2}:[0-9]{2}:[0-9]{2}(?:\.[0-9]+)?)(Z|[+-][0-9]{2}:[0-9]{2})?$/,
150
+ gYear: /^(-?[0-9]{4,})(Z|[+-][0-9]{2}:[0-9]{2})?$/,
151
+ gYearMonth: /^(-?[0-9]{4,})-([0-9]{2})(Z|[+-][0-9]{2}:[0-9]{2})?$/,
152
+ gMonthDay: /^--([0-9]{2})-([0-9]{2})(Z|[+-][0-9]{2}:[0-9]{2})?$/,
153
+ gDay: /^---([0-9]{2})(Z|[+-][0-9]{2}:[0-9]{2})?$/,
154
+ gMonth: /^--([0-9]{2})(Z|[+-][0-9]{2}:[0-9]{2})?$/,
155
+ };
156
+ const match = patterns[family].exec(value);
157
+ if (!match)
158
+ return invalid("Reduced calendar lexical form is invalid");
159
+ const zone = match.at(-1) ?? "";
160
+ // Pay for constructing the fixed reference tuple before its allocation.
161
+ budget.charge(value.length + 32);
162
+ const reference = family === "time" ? `2000-01-01T${match[1]}${zone}`
163
+ : family === "gYear" ? `${match[1]}-01-01T00:00:00${zone}`
164
+ : family === "gYearMonth" ? `${match[1]}-${match[2]}-01T00:00:00${zone}`
165
+ : family === "gMonthDay" ? `2000-${match[1]}-${match[2]}T00:00:00${zone}`
166
+ : family === "gDay" ? `2000-01-${match[1]}T00:00:00${zone}`
167
+ : `2000-${match[1]}-01T00:00:00${zone}`;
168
+ const assessed = parseCalendar("dateTime", reference, budget);
169
+ if (family !== "time") {
170
+ budget.charge(10); // Returned record and its copied fixed-width fields.
171
+ return { ...assessed, family, lexical };
172
+ }
173
+ // Selected time law: normalize zoned clocks modulo one day and rebase on
174
+ // the common date. Unknown clocks retain their unshifted clock on that date;
175
+ // legal 24:00 and second-60 overflow use the selected midnight alias.
176
+ budget.arithmetic(assessed.seconds.digits + assessed.seconds.scale + 8);
177
+ const day = 86400n * 10n ** BigInt(assessed.seconds.scale);
178
+ budget.charge(3); // Decimal record copied before modulo-clock allocation.
179
+ const clock = { ...assessed.seconds, coefficient: mod(assessed.seconds.coefficient, day) };
180
+ const seconds = sum(integer(ordinal(2000n, 1, 1, budget, 4) * 86400n, 12), clock, budget);
181
+ budget.charge(10); // Returned reference record and copied fixed-width fields.
182
+ return { ...assessed, family, year: 2000n, month: 1, day: 1, seconds, lexical };
183
+ }
184
+ /** Internal coordinate display, with the value timeline explicit and no zone suffix. */
185
+ export function showRepresentative(value, budget) {
186
+ budget.charge(value.digits + value.seconds.scale + 32);
187
+ budget.charge(3); // Display record container, before allocation.
188
+ return { family: value.family, timeline: value.zoned ? "zoned" : "local",
189
+ coordinate: showInstant(value.seconds, budget).slice(0, -1) };
190
+ }
191
+ export function parseDuration(lexical, budget) {
192
+ budget.text(lexical);
193
+ const value = lexical.replace(/[\t\r\n ]+/g, " ").replace(/^ | $/g, "");
194
+ const match = /^(-)?P(?:([0-9]+)Y)?(?:([0-9]+)M)?(?:([0-9]+)D)?(?:T(?:([0-9]+)H)?(?:([0-9]+)M)?(?:([0-9]+(?:\.[0-9]+)?)S)?)?$/.exec(value);
195
+ if (!match || !match.slice(2).some(x => x !== undefined) || value.endsWith("T"))
196
+ return invalid("Duration lexical form is invalid");
197
+ budget.arithmetic(lexical.length + 8);
198
+ const sign = match[1] ? -1n : 1n;
199
+ const months = sign * (BigInt(match[2] ?? "0") * 12n + BigInt(match[3] ?? "0"));
200
+ const whole = BigInt(match[4] ?? "0") * 86400n + BigInt(match[5] ?? "0") * 3600n + BigInt(match[6] ?? "0") * 60n;
201
+ const seconds = sum(integer(whole, lexical.length + 8), decimal(match[7] ?? "0", budget), budget);
202
+ return { months, seconds: { ...seconds, coefficient: seconds.coefficient * sign }, digits: lexical.length + 8, lexical };
203
+ }
204
+ export function sameDuration(a, b, budget) {
205
+ budget.arithmetic(Math.max(a.digits, b.digits));
206
+ return a.months === b.months && compareDecimal(a.seconds, b.seconds, budget) === "equal";
207
+ }
208
+ /** Calendar ordering and equality are distinct; different timelines never equal. */
209
+ export function sameCalendar(a, b, budget) {
210
+ return a.family === b.family && a.zoned === b.zoned && compareDecimal(a.seconds, b.seconds, budget) === "equal";
211
+ }
212
+ export function compareCalendar(a, b, budget) {
213
+ if (a.family !== b.family)
214
+ return "indeterminate";
215
+ if (a.zoned === b.zoned)
216
+ return compareDecimal(a.seconds, b.seconds, budget);
217
+ const uncertain = a.zoned ? b : a, certain = a.zoned ? a : b;
218
+ const lower = sum(uncertain.seconds, integer(-50400n, 5), budget);
219
+ const upper = sum(uncertain.seconds, integer(50400n, 5), budget);
220
+ if (compareDecimal(certain.seconds, lower, budget) === "less")
221
+ return a.zoned ? "less" : "greater";
222
+ if (compareDecimal(certain.seconds, upper, budget) === "greater")
223
+ return a.zoned ? "greater" : "less";
224
+ return "indeterminate";
225
+ }
226
+ export function addDuration(start, duration, budget) {
227
+ if (start.family !== "dateTime")
228
+ return invalid("The narrow addition probe takes dateTime operands");
229
+ budget.arithmetic(duration.digits + start.digits + 8);
230
+ const continuousYear = start.year > 0n ? start.year - 1n : start.year;
231
+ const index = continuousYear * 12n + BigInt(start.month - 1) + duration.months;
232
+ const coordinate = floor(index, 12n), month = Number(mod(index, 12n)) + 1;
233
+ const year = coordinate >= 0n ? coordinate + 1n : coordinate;
234
+ const day = Math.min(start.day, monthLengths(year)[month - 1]);
235
+ const sourceDay = ordinal(start.year, start.month, start.day, budget, start.digits);
236
+ const targetDay = ordinal(year, month, day, budget, duration.digits + start.digits);
237
+ const shifted = sum(start.seconds, integer((targetDay - sourceDay) * 86400n, duration.digits + start.digits + 16), budget);
238
+ return sum(shifted, duration.seconds, budget);
239
+ }
240
+ const anchors = ["1696-09-01T00:00:00Z", "1697-02-01T00:00:00Z", "1903-03-01T00:00:00Z", "1903-07-01T00:00:00Z"];
241
+ export function compareDuration(a, b, budget) {
242
+ if (sameDuration(a, b, budget))
243
+ return "equal";
244
+ let order;
245
+ for (const anchor of anchors) {
246
+ const start = parseCalendar("dateTime", anchor, budget);
247
+ const current = compareDecimal(addDuration(start, a, budget), addDuration(start, b, budget), budget);
248
+ if (current === "equal" || order !== undefined && current !== order)
249
+ return "indeterminate";
250
+ order = current;
251
+ }
252
+ return order ?? "indeterminate";
253
+ }
254
+ /** Exact output for tests only; canonical strings never replace retained lexicals. */
255
+ export function showInstant(value, budget) {
256
+ budget.arithmetic(value.digits + value.scale + 24);
257
+ const power = 10n ** BigInt(value.scale);
258
+ const whole = floor(value.coefficient, power), fraction = mod(value.coefficient, power);
259
+ const date = fromOrdinal(floor(whole, 86400n), budget, value.digits), clock = Number(mod(whole, 86400n));
260
+ const year = (date.year < 0n ? "-" : "") + (date.year < 0n ? -date.year : date.year).toString().padStart(4, "0");
261
+ const two = (n) => n.toString().padStart(2, "0");
262
+ const suffix = value.scale && fraction ? "." + fraction.toString().padStart(value.scale, "0").replace(/0+$/, "") : "";
263
+ return `${year}-${two(date.month)}-${two(date.day)}T${two(Math.floor(clock / 3600))}:${two(Math.floor(clock / 60) % 60)}:${two(clock % 60)}${suffix}Z`;
264
+ }
@@ -0,0 +1,32 @@
1
+ /** Complete supplied facet annotation infoset, without source provenance. */
2
+ import type { SemanticBudget } from './semanticBudget.js';
3
+ import type { SyntaxElement } from '../loader/orderedSyntax.js';
4
+ export type FacetAnnotationNode = Readonly<{
5
+ kind: 'text';
6
+ value: string;
7
+ } | {
8
+ kind: 'element';
9
+ name: Readonly<{
10
+ namespace: string;
11
+ local: string;
12
+ }>;
13
+ attributes: readonly Readonly<{
14
+ name: Readonly<{
15
+ namespace: string;
16
+ local: string;
17
+ }>;
18
+ value: string;
19
+ }>[];
20
+ namespaces: Readonly<Record<string, string>>;
21
+ children: readonly FacetAnnotationNode[];
22
+ }>;
23
+ export type FacetAnnotation = 'absent' | Readonly<{
24
+ kind: 'present';
25
+ content: FacetAnnotationNode;
26
+ }>;
27
+ export declare function validateFacetAnnotation(value: unknown, budget: SemanticBudget): value is FacetAnnotation;
28
+ /** Preserve XML infoset content, omitting URI, digest, positions and element-name spelling. */
29
+ export declare function projectFacetAnnotation(node: SyntaxElement, budget: SemanticBudget): FacetAnnotation;
30
+ /** A structural mismatch that may share an abstract annotation is unresolved. */
31
+ export declare function compareFacetAnnotation(left: FacetAnnotation, right: FacetAnnotation, budget: SemanticBudget): 'equal' | 'different' | 'unresolved';
32
+ //# sourceMappingURL=schemaFacetAnnotation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemaFacetAnnotation.d.ts","sourceRoot":"","sources":["../../src/compiler/schemaFacetAnnotation.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AAExD,OAAO,KAAK,EAAC,aAAa,EAAa,MAAM,4BAA4B,CAAC;AAE1E,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CACxC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,GAC7B;IAAC,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,CAAC,CAAC;IACnE,UAAU,EAAE,SAAS,QAAQ,CAAC;QAAC,IAAI,EAAE,QAAQ,CAAC;YAAC,SAAS,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAC,CAAC,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,CAAC,EAAE,CAAC;IACrG,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAAC,QAAQ,EAAE,SAAS,mBAAmB,EAAE,CAAA;CAAC,CAC1F,CAAC;AACF,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAAC,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,mBAAmB,CAAA;CAAC,CAAC,CAAC;AAQnG,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,GAAG,KAAK,IAAI,eAAe,CAgCxG;AAED,+FAA+F;AAC/F,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,cAAc,GAAG,eAAe,CA+BnG;AAED,iFAAiF;AACjF,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,eAAe,EAClF,MAAM,EAAE,cAAc,GAAG,OAAO,GAAG,WAAW,GAAG,YAAY,CAwD9D"}
@@ -0,0 +1,199 @@
1
+ import { XSD_NAMESPACE } from '../loader/orderedSyntax.js';
2
+ const record = (value) => !!value && typeof value === 'object' && !Array.isArray(value);
3
+ const name = (value, budget) => {
4
+ if (!record(value) || typeof value.namespace !== 'string' || typeof value.local !== 'string')
5
+ return false;
6
+ budget.chargeWork(value.namespace.length + value.local.length + 2);
7
+ return true;
8
+ };
9
+ export function validateFacetAnnotation(value, budget) {
10
+ if (value === 'absent')
11
+ return true;
12
+ if (!record(value) || value.kind !== 'present' || !record(value.content))
13
+ return false;
14
+ if (value.content.kind !== 'element' || !record(value.content.name)
15
+ || value.content.name.namespace !== XSD_NAMESPACE || value.content.name.local !== 'annotation')
16
+ return false;
17
+ const stack = [value.content];
18
+ while (stack.length) {
19
+ const node = stack.pop();
20
+ budget.chargeWork(8);
21
+ if (!record(node))
22
+ return false;
23
+ if (node.kind === 'text') {
24
+ if (typeof node.value !== 'string')
25
+ return false;
26
+ budget.chargeWork(node.value.length);
27
+ continue;
28
+ }
29
+ if (node.kind !== 'element' || !name(node.name, budget) || !Array.isArray(node.attributes)
30
+ || !record(node.namespaces) || !Array.isArray(node.children))
31
+ return false;
32
+ budget.chargeWork(node.attributes.length * 4 + node.children.length * 2);
33
+ for (const attribute of node.attributes) {
34
+ if (!record(attribute) || !name(attribute.name, budget) || typeof attribute.value !== 'string')
35
+ return false;
36
+ budget.chargeWork(attribute.value.length);
37
+ }
38
+ for (let i = 0; i < node.attributes.length; i++)
39
+ for (let j = i + 1; j < node.attributes.length; j++) {
40
+ budget.chargeWork(2);
41
+ if (budget.compareText(node.attributes[i].name.namespace, node.attributes[j].name.namespace) === 0
42
+ && budget.compareText(node.attributes[i].name.local, node.attributes[j].name.local) === 0)
43
+ return false;
44
+ }
45
+ for (const prefix in node.namespaces) {
46
+ const uri = node.namespaces[prefix];
47
+ if (typeof uri !== 'string')
48
+ return false;
49
+ budget.chargeWork(prefix.length + uri.length + 1);
50
+ }
51
+ for (const child of node.children) {
52
+ budget.chargeWork();
53
+ stack.push(child);
54
+ }
55
+ }
56
+ return true;
57
+ }
58
+ /** Preserve XML infoset content, omitting URI, digest, positions and element-name spelling. */
59
+ export function projectFacetAnnotation(node, budget) {
60
+ const projectOne = (syntax) => {
61
+ budget.chargeWork(8);
62
+ if (syntax.kind === 'text') {
63
+ budget.chargeWork(syntax.value.length);
64
+ return { kind: 'text', value: syntax.value };
65
+ }
66
+ budget.chargeWork(syntax.name.namespace.length + syntax.name.local.length + syntax.attributes.length * 4 + syntax.children.length * 2);
67
+ const attributes = syntax.attributes.map(attribute => {
68
+ budget.chargeWork(attribute.name.namespace.length + attribute.name.local.length + attribute.value.length);
69
+ return { name: { namespace: attribute.name.namespace, local: attribute.name.local }, value: attribute.value };
70
+ });
71
+ const namespaces = Object.create(null);
72
+ for (const prefix in syntax.namespaces) {
73
+ const uri = syntax.namespaces[prefix];
74
+ budget.chargeWork(prefix.length + uri.length + 1);
75
+ namespaces[prefix] = uri;
76
+ }
77
+ budget.chargeWork(2);
78
+ return { kind: 'element', name: { namespace: syntax.name.namespace, local: syntax.name.local },
79
+ attributes, namespaces, children: [] };
80
+ };
81
+ const content = projectOne(node);
82
+ const stack = [[node, content]];
83
+ while (stack.length) {
84
+ budget.chargeWork(2);
85
+ const [source, target] = stack.pop();
86
+ for (const child of source.children) {
87
+ const copied = projectOne(child);
88
+ budget.chargeWork(2);
89
+ target.children.push(copied);
90
+ if (child.kind === 'element') {
91
+ budget.chargeWork();
92
+ stack.push([child, copied]);
93
+ }
94
+ }
95
+ }
96
+ return { kind: 'present', content };
97
+ }
98
+ /** A structural mismatch that may share an abstract annotation is unresolved. */
99
+ export function compareFacetAnnotation(left, right, budget) {
100
+ if (left === 'absent' || right === 'absent')
101
+ return left === right ? 'equal' : 'different';
102
+ const stack = [[left.content, right.content, false]];
103
+ let unresolved = false;
104
+ while (stack.length) {
105
+ const [a, b, ambiguousSibling] = stack.pop();
106
+ budget.chargeWork(8);
107
+ if (a.kind !== b.kind) {
108
+ unresolved = true;
109
+ continue;
110
+ }
111
+ if (a.kind === 'text' && b.kind === 'text') {
112
+ budget.chargeWork(a.value.length + b.value.length);
113
+ if (a.value !== b.value) {
114
+ if (ambiguousSibling)
115
+ unresolved = true;
116
+ else
117
+ return 'different';
118
+ }
119
+ continue;
120
+ }
121
+ if (a.kind !== 'element' || b.kind !== 'element')
122
+ return 'unresolved';
123
+ budget.chargeWork(a.name.namespace.length + a.name.local.length + b.name.namespace.length + b.name.local.length);
124
+ if (a.name.namespace !== b.name.namespace || a.name.local !== b.name.local) {
125
+ unresolved = true;
126
+ continue;
127
+ }
128
+ const wrapper = a.name.namespace === XSD_NAMESPACE && a.name.local === 'annotation';
129
+ if (a.attributes.length !== b.attributes.length) {
130
+ if (wrapper || ambiguousSibling)
131
+ unresolved = true;
132
+ else
133
+ return 'different';
134
+ }
135
+ for (const x of a.attributes) {
136
+ let found = false;
137
+ for (const y of b.attributes) {
138
+ budget.chargeWork(x.name.namespace.length + x.name.local.length + x.value.length
139
+ + y.name.namespace.length + y.name.local.length + y.value.length + 4);
140
+ if (x.name.namespace === y.name.namespace && x.name.local === y.name.local && x.value === y.value) {
141
+ found = true;
142
+ break;
143
+ }
144
+ }
145
+ if (!found) {
146
+ if (wrapper || ambiguousSibling)
147
+ unresolved = true;
148
+ else
149
+ return 'different';
150
+ }
151
+ }
152
+ let xCount = 0, yCount = 0;
153
+ for (const prefix in a.namespaces) {
154
+ xCount++;
155
+ budget.chargeWork(prefix.length + a.namespaces[prefix].length + 2);
156
+ if (!Object.hasOwn(b.namespaces, prefix) || a.namespaces[prefix] !== b.namespaces[prefix])
157
+ unresolved = true;
158
+ }
159
+ for (const prefix in b.namespaces) {
160
+ yCount++;
161
+ budget.chargeWork(prefix.length + 1);
162
+ }
163
+ if (xCount !== yCount)
164
+ unresolved = true;
165
+ if (a.children.length !== b.children.length) {
166
+ if (wrapper || ambiguousSibling)
167
+ unresolved = true;
168
+ else
169
+ return 'different';
170
+ }
171
+ budget.chargeWork(a.children.length * 2);
172
+ const repeated = (children, index) => {
173
+ const selected = children[index];
174
+ for (let j = 0; j < children.length; j++) {
175
+ budget.chargeWork(3);
176
+ if (j === index)
177
+ continue;
178
+ const other = children[j];
179
+ if (selected.kind !== other.kind)
180
+ continue;
181
+ if (selected.kind === 'text')
182
+ return true;
183
+ if (other.kind === 'element') {
184
+ budget.chargeWork(selected.name.namespace.length + selected.name.local.length
185
+ + other.name.namespace.length + other.name.local.length);
186
+ if (selected.name.namespace === other.name.namespace && selected.name.local === other.name.local)
187
+ return true;
188
+ }
189
+ }
190
+ return false;
191
+ };
192
+ for (let i = 0; i < Math.min(a.children.length, b.children.length); i++) {
193
+ const ambiguous = ambiguousSibling || repeated(a.children, i) || repeated(b.children, i);
194
+ budget.chargeWork();
195
+ stack.push([a.children[i], b.children[i], ambiguous]);
196
+ }
197
+ }
198
+ return unresolved ? 'unresolved' : 'equal';
199
+ }
@@ -0,0 +1,35 @@
1
+ /** Original-source scalar identity/shape mapping. No facet or validity engine. */
2
+ import type { NodeId } from './canonicalGraph.js';
3
+ import type { SemanticContext } from './semanticContext.js';
4
+ import type { ResourceLimitFailure } from './semanticBudget.js';
5
+ import type { OriginalGeneratedScalarReference, SemanticTypeIdentity, SemanticTypeReference } from './semanticTypeReference.js';
6
+ export type OriginalScalarShapeFailure = Readonly<{
7
+ kind: 'unresolved';
8
+ rule: string;
9
+ message: string;
10
+ contextId: string;
11
+ component?: NodeId;
12
+ }>;
13
+ export type OriginalScalarShapeResult<T> = Readonly<{
14
+ kind: 'checked';
15
+ value: T;
16
+ contextId: string;
17
+ authority: 'XSD10-original-scalar-shape-v1';
18
+ acceptance: 'structural-only';
19
+ sourceDependencies: readonly NodeId[];
20
+ }> | OriginalScalarShapeFailure | ResourceLimitFailure;
21
+ export type OriginalGeneratedScalarShape = Readonly<{
22
+ slot: OriginalGeneratedScalarReference;
23
+ name: undefined;
24
+ targetNamespace: string;
25
+ final: readonly [];
26
+ annotation: 'absent';
27
+ base: SemanticTypeReference;
28
+ variety: 'atomic' | 'list' | 'union';
29
+ primitive?: string;
30
+ item?: SemanticTypeReference;
31
+ members?: readonly SemanticTypeReference[];
32
+ }>;
33
+ export declare function resolveOriginalScalarIdentity(context: SemanticContext, reference: SemanticTypeReference): OriginalScalarShapeResult<SemanticTypeIdentity>;
34
+ export declare function originalGeneratedShape(context: SemanticContext, slot: OriginalGeneratedScalarReference): OriginalScalarShapeResult<OriginalGeneratedScalarShape>;
35
+ //# sourceMappingURL=schemaGenerat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