@fgv/ts-res 5.1.0-2 → 5.1.0-20
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/dist/index.browser.js.map +1 -0
- package/dist/index.js.map +1 -0
- package/dist/packlets/bundle/bundleBuilder.js.map +1 -0
- package/dist/packlets/bundle/bundleLoader.js.map +1 -0
- package/dist/packlets/bundle/bundleNormalizer.js.map +1 -0
- package/dist/packlets/bundle/bundleUtils.js.map +1 -0
- package/dist/packlets/bundle/convert.js.map +1 -0
- package/dist/packlets/bundle/index.js.map +1 -0
- package/dist/packlets/bundle/model.js.map +1 -0
- package/dist/packlets/common/conditions.js.map +1 -0
- package/dist/packlets/common/convert.js.map +1 -0
- package/dist/packlets/common/helpers/conditions.js.map +1 -0
- package/dist/packlets/common/helpers/context.js.map +1 -0
- package/dist/packlets/common/helpers/index.js.map +1 -0
- package/dist/packlets/common/helpers/qualifierDefaultValues.js.map +1 -0
- package/dist/packlets/common/helpers/resources.js +2 -4
- package/dist/packlets/common/helpers/resources.js.map +1 -0
- package/dist/packlets/common/index.js.map +1 -0
- package/dist/packlets/common/resources.js.map +1 -0
- package/dist/packlets/common/validate/conditions.js +4 -4
- package/dist/packlets/common/validate/conditions.js.map +1 -0
- package/dist/packlets/common/validate/index.js.map +1 -0
- package/dist/packlets/common/validate/regularExpressions.js +2 -2
- package/dist/packlets/common/validate/regularExpressions.js.map +1 -0
- package/dist/packlets/common/validate/resources.js +1 -1
- package/dist/packlets/common/validate/resources.js.map +1 -0
- package/dist/packlets/conditions/condition.js +3 -7
- package/dist/packlets/conditions/condition.js.map +1 -0
- package/dist/packlets/conditions/conditionCollector.js.map +1 -0
- package/dist/packlets/conditions/conditionDecls.js.map +1 -0
- package/dist/packlets/conditions/conditionSet.js.map +1 -0
- package/dist/packlets/conditions/conditionSetCollector.js.map +1 -0
- package/dist/packlets/conditions/conditionSetDecls.js.map +1 -0
- package/dist/packlets/conditions/conditionToken.js.map +1 -0
- package/dist/packlets/conditions/convert/conditionSetDecls.js.map +1 -0
- package/dist/packlets/conditions/convert/decls.js.map +1 -0
- package/dist/packlets/conditions/convert/index.js.map +1 -0
- package/dist/packlets/conditions/index.js.map +1 -0
- package/dist/packlets/config/common.js +78 -0
- package/dist/packlets/config/common.js.map +1 -0
- package/dist/packlets/config/configInitFactory.js +258 -0
- package/dist/packlets/config/configInitFactory.js.map +1 -0
- package/dist/packlets/config/convert.js +56 -0
- package/dist/packlets/config/convert.js.map +1 -0
- package/dist/packlets/config/index.browser.js +34 -0
- package/dist/packlets/config/index.browser.js.map +1 -0
- package/dist/packlets/config/index.js +28 -0
- package/dist/packlets/config/index.js.map +1 -0
- package/dist/packlets/config/json.js +23 -0
- package/dist/packlets/config/json.js.map +1 -0
- package/dist/packlets/config/predefined/default.js +138 -0
- package/dist/packlets/config/predefined/default.js.map +1 -0
- package/dist/packlets/config/predefined/extended.js +190 -0
- package/dist/packlets/config/predefined/extended.js.map +1 -0
- package/dist/packlets/config/predefined/index.js +25 -0
- package/dist/packlets/config/predefined/index.js.map +1 -0
- package/dist/packlets/config/systemConfiguration.js +147 -0
- package/dist/packlets/config/systemConfiguration.js.map +1 -0
- package/dist/packlets/context/contextDecls.js.map +1 -0
- package/dist/packlets/context/contextToken.js.map +1 -0
- package/dist/packlets/context/convert/decls.js.map +1 -0
- package/dist/packlets/context/convert/index.js.map +1 -0
- package/dist/packlets/context/index.js.map +1 -0
- package/dist/packlets/decisions/abstractDecision.js.map +1 -0
- package/dist/packlets/decisions/abstractDecisionCollector.js.map +1 -0
- package/dist/packlets/decisions/candidate.js.map +1 -0
- package/dist/packlets/decisions/common.js.map +1 -0
- package/dist/packlets/decisions/concreteDecision.js.map +1 -0
- package/dist/packlets/decisions/decision.js +1 -1
- package/dist/packlets/decisions/decision.js.map +1 -0
- package/dist/packlets/decisions/index.js.map +1 -0
- package/dist/packlets/import/fsItem.js +1 -4
- package/dist/packlets/import/fsItem.js.map +1 -0
- package/dist/packlets/import/importContext.js +3 -3
- package/dist/packlets/import/importContext.js.map +1 -0
- package/dist/packlets/import/importManager.js +7 -3
- package/dist/packlets/import/importManager.js.map +1 -0
- package/dist/packlets/import/importable.js.map +1 -0
- package/dist/packlets/import/importers/collectionImporter.js +2 -2
- package/dist/packlets/import/importers/collectionImporter.js.map +1 -0
- package/dist/packlets/import/importers/fsItemImporter.js +30 -14
- package/dist/packlets/import/importers/fsItemImporter.js.map +1 -0
- package/dist/packlets/import/importers/importer.js.map +1 -0
- package/dist/packlets/import/importers/index.browser.js.map +1 -0
- package/dist/packlets/import/importers/index.js.map +1 -0
- package/dist/packlets/import/importers/jsonImporter.js +2 -2
- package/dist/packlets/import/importers/jsonImporter.js.map +1 -0
- package/dist/packlets/import/importers/pathImporter.js +1 -1
- package/dist/packlets/import/importers/pathImporter.js.map +1 -0
- package/dist/packlets/import/index.browser.js.map +1 -0
- package/dist/packlets/import/index.js.map +1 -0
- package/dist/packlets/qualifier-types/config/convert.js +124 -0
- package/dist/packlets/qualifier-types/config/convert.js.map +1 -0
- package/dist/packlets/qualifier-types/config/index.js +25 -0
- package/dist/packlets/qualifier-types/config/index.js.map +1 -0
- package/dist/packlets/qualifier-types/config/json.js +32 -0
- package/dist/packlets/qualifier-types/config/json.js.map +1 -0
- package/dist/packlets/qualifier-types/convert.js.map +1 -0
- package/dist/packlets/qualifier-types/helpers.js.map +1 -0
- package/dist/packlets/qualifier-types/index.js.map +1 -0
- package/dist/packlets/qualifier-types/languageQualifierType.js +6 -7
- package/dist/packlets/qualifier-types/languageQualifierType.js.map +1 -0
- package/dist/packlets/qualifier-types/literalQualifierType.js +7 -10
- package/dist/packlets/qualifier-types/literalQualifierType.js.map +1 -0
- package/dist/packlets/qualifier-types/literalValueHierarchy.js.map +1 -0
- package/dist/packlets/qualifier-types/qualifierType.js +12 -13
- package/dist/packlets/qualifier-types/qualifierType.js.map +1 -0
- package/dist/packlets/qualifier-types/qualifierTypeCollector.js.map +1 -0
- package/dist/packlets/qualifier-types/territoryQualifierType.js +5 -5
- package/dist/packlets/qualifier-types/territoryQualifierType.js.map +1 -0
- package/dist/packlets/qualifiers/convert/decls.js.map +1 -0
- package/dist/packlets/qualifiers/convert/index.js.map +1 -0
- package/dist/packlets/qualifiers/convert/qualifier.js.map +1 -0
- package/dist/packlets/qualifiers/index.js.map +1 -0
- package/dist/packlets/qualifiers/qualifier.js +6 -7
- package/dist/packlets/qualifiers/qualifier.js.map +1 -0
- package/dist/packlets/qualifiers/qualifierCollector.js +2 -2
- package/dist/packlets/qualifiers/qualifierCollector.js.map +1 -0
- package/dist/packlets/qualifiers/qualifierDecl.js.map +1 -0
- package/dist/packlets/qualifiers/qualifierDefaultValueDecls.js.map +1 -0
- package/dist/packlets/qualifiers/qualifierDefaultValueToken.js.map +1 -0
- package/dist/packlets/resource-json/compiled/common.js.map +1 -0
- package/dist/packlets/resource-json/compiled/convert.js.map +1 -0
- package/dist/packlets/resource-json/compiled/index.js.map +1 -0
- package/dist/packlets/resource-json/compiled/json.js.map +1 -0
- package/dist/packlets/resource-json/convert.js.map +1 -0
- package/dist/packlets/resource-json/helpers.js.map +1 -0
- package/dist/packlets/resource-json/index.js.map +1 -0
- package/dist/packlets/resource-json/json.js.map +1 -0
- package/dist/packlets/resource-json/normalized.js.map +1 -0
- package/dist/packlets/resource-json/resourceDeclCollection.js +1 -1
- package/dist/packlets/resource-json/resourceDeclCollection.js.map +1 -0
- package/dist/packlets/resource-json/resourceDeclContainer.js.map +1 -0
- package/dist/packlets/resource-json/resourceDeclTree.js +1 -1
- package/dist/packlets/resource-json/resourceDeclTree.js.map +1 -0
- package/dist/packlets/resource-types/config/convert.js +35 -0
- package/dist/packlets/resource-types/config/convert.js.map +1 -0
- package/dist/packlets/resource-types/config/index.js +25 -0
- package/dist/packlets/resource-types/config/index.js.map +1 -0
- package/dist/packlets/resource-types/config/json.js +23 -0
- package/dist/packlets/resource-types/config/json.js.map +1 -0
- package/dist/packlets/resource-types/helpers.js.map +1 -0
- package/dist/packlets/resource-types/index.js.map +1 -0
- package/dist/packlets/resource-types/jsonResourceType.js +2 -2
- package/dist/packlets/resource-types/jsonResourceType.js.map +1 -0
- package/dist/packlets/resource-types/resourceType.js +2 -2
- package/dist/packlets/resource-types/resourceType.js.map +1 -0
- package/dist/packlets/resource-types/resourceTypeCollector.js.map +1 -0
- package/dist/packlets/resources/candidateReducer.js.map +1 -0
- package/dist/packlets/resources/candidateValue.js.map +1 -0
- package/dist/packlets/resources/candidateValueCollector.js.map +1 -0
- package/dist/packlets/resources/common.js.map +1 -0
- package/dist/packlets/resources/deltaGenerator.js.map +1 -0
- package/dist/packlets/resources/index.js.map +1 -0
- package/dist/packlets/resources/resource.js.map +1 -0
- package/dist/packlets/resources/resourceBuilder.js +2 -2
- package/dist/packlets/resources/resourceBuilder.js.map +1 -0
- package/dist/packlets/resources/resourceCandidate.js.map +1 -0
- package/dist/packlets/resources/resourceManagerBuilder.js +5 -5
- package/dist/packlets/resources/resourceManagerBuilder.js.map +1 -0
- package/dist/packlets/runtime/cacheListener.js.map +1 -0
- package/dist/packlets/runtime/cacheMetrics.js.map +1 -0
- package/dist/packlets/runtime/compiledResourceCollection.js +5 -5
- package/dist/packlets/runtime/compiledResourceCollection.js.map +1 -0
- package/dist/packlets/runtime/conditionSetResolutionResult.js.map +1 -0
- package/dist/packlets/runtime/context/contextQualifierProvider.js.map +1 -0
- package/dist/packlets/runtime/context/contextQualifierProviderValidator.js.map +1 -0
- package/dist/packlets/runtime/context/index.js.map +1 -0
- package/dist/packlets/runtime/context/simpleContextQualifierProvider.js.map +1 -0
- package/dist/packlets/runtime/context/validatingSimpleContextQualifierProvider.js.map +1 -0
- package/dist/packlets/runtime/iResourceManager.js.map +1 -0
- package/dist/packlets/runtime/index.js.map +1 -0
- package/dist/packlets/runtime/resource-tree/common.js.map +1 -0
- package/dist/packlets/runtime/resource-tree/index.js.map +1 -0
- package/dist/packlets/runtime/resource-tree/readOnlyResourceTree.js.map +1 -0
- package/dist/packlets/runtime/resource-tree/resourceTreeChildren.js.map +1 -0
- package/dist/packlets/runtime/resource-tree/resourceTreeChildrenValidator.js.map +1 -0
- package/dist/packlets/runtime/resourceResolver.js.map +1 -0
- package/dist/packlets/runtime/resourceTreeResolver.js.map +1 -0
- package/dist/packlets/runtime/validate.js.map +1 -0
- package/dist/packlets/zip-archive/convert.js.map +1 -0
- package/dist/packlets/zip-archive/index.browser.js.map +1 -0
- package/dist/packlets/zip-archive/index.js.map +1 -0
- package/dist/packlets/zip-archive/json.js.map +1 -0
- package/dist/packlets/zip-archive/types.js.map +1 -0
- package/dist/packlets/zip-archive/zipArchiveCreator.js.map +1 -0
- package/dist/packlets/zip-archive/zipArchiveFormat.js.map +1 -0
- package/dist/packlets/zip-archive/zipArchiveLoader.js.map +1 -0
- package/dist/ts-res.d.ts +134 -112
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/index.browser.d.ts.map +1 -0
- package/lib/index.browser.js.map +1 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js.map +1 -0
- package/lib/packlets/bundle/bundleBuilder.d.ts.map +1 -0
- package/lib/packlets/bundle/bundleBuilder.js.map +1 -0
- package/lib/packlets/bundle/bundleLoader.d.ts.map +1 -0
- package/lib/packlets/bundle/bundleLoader.js.map +1 -0
- package/lib/packlets/bundle/bundleNormalizer.d.ts.map +1 -0
- package/lib/packlets/bundle/bundleNormalizer.js.map +1 -0
- package/lib/packlets/bundle/bundleUtils.d.ts.map +1 -0
- package/lib/packlets/bundle/bundleUtils.js.map +1 -0
- package/lib/packlets/bundle/convert.d.ts.map +1 -0
- package/lib/packlets/bundle/convert.js.map +1 -0
- package/lib/packlets/bundle/index.d.ts.map +1 -0
- package/lib/packlets/bundle/index.js.map +1 -0
- package/lib/packlets/bundle/model.d.ts.map +1 -0
- package/lib/packlets/bundle/model.js.map +1 -0
- package/lib/packlets/common/conditions.d.ts.map +1 -0
- package/lib/packlets/common/conditions.js.map +1 -0
- package/lib/packlets/common/convert.d.ts.map +1 -0
- package/lib/packlets/common/convert.js.map +1 -0
- package/lib/packlets/common/helpers/conditions.d.ts.map +1 -0
- package/lib/packlets/common/helpers/conditions.js.map +1 -0
- package/lib/packlets/common/helpers/context.d.ts.map +1 -0
- package/lib/packlets/common/helpers/context.js.map +1 -0
- package/lib/packlets/common/helpers/index.d.ts.map +1 -0
- package/lib/packlets/common/helpers/index.js.map +1 -0
- package/lib/packlets/common/helpers/qualifierDefaultValues.d.ts.map +1 -0
- package/lib/packlets/common/helpers/qualifierDefaultValues.js.map +1 -0
- package/lib/packlets/common/helpers/resources.d.ts +2 -4
- package/lib/packlets/common/helpers/resources.d.ts.map +1 -0
- package/lib/packlets/common/helpers/resources.js +2 -4
- package/lib/packlets/common/helpers/resources.js.map +1 -0
- package/lib/packlets/common/index.d.ts.map +1 -0
- package/lib/packlets/common/index.js.map +1 -0
- package/lib/packlets/common/resources.d.ts.map +1 -0
- package/lib/packlets/common/resources.js.map +1 -0
- package/lib/packlets/common/validate/conditions.d.ts +4 -4
- package/lib/packlets/common/validate/conditions.d.ts.map +1 -0
- package/lib/packlets/common/validate/conditions.js +4 -4
- package/lib/packlets/common/validate/conditions.js.map +1 -0
- package/lib/packlets/common/validate/index.d.ts.map +1 -0
- package/lib/packlets/common/validate/index.js.map +1 -0
- package/lib/packlets/common/validate/regularExpressions.d.ts +2 -2
- package/lib/packlets/common/validate/regularExpressions.d.ts.map +1 -0
- package/lib/packlets/common/validate/regularExpressions.js +2 -2
- package/lib/packlets/common/validate/regularExpressions.js.map +1 -0
- package/lib/packlets/common/validate/resources.d.ts +1 -1
- package/lib/packlets/common/validate/resources.d.ts.map +1 -0
- package/lib/packlets/common/validate/resources.js +1 -1
- package/lib/packlets/common/validate/resources.js.map +1 -0
- package/lib/packlets/conditions/condition.d.ts +3 -7
- package/lib/packlets/conditions/condition.d.ts.map +1 -0
- package/lib/packlets/conditions/condition.js +3 -7
- package/lib/packlets/conditions/condition.js.map +1 -0
- package/lib/packlets/conditions/conditionCollector.d.ts.map +1 -0
- package/lib/packlets/conditions/conditionCollector.js.map +1 -0
- package/lib/packlets/conditions/conditionDecls.d.ts.map +1 -0
- package/lib/packlets/conditions/conditionDecls.js.map +1 -0
- package/lib/packlets/conditions/conditionSet.d.ts.map +1 -0
- package/lib/packlets/conditions/conditionSet.js.map +1 -0
- package/lib/packlets/conditions/conditionSetCollector.d.ts.map +1 -0
- package/lib/packlets/conditions/conditionSetCollector.js.map +1 -0
- package/lib/packlets/conditions/conditionSetDecls.d.ts.map +1 -0
- package/lib/packlets/conditions/conditionSetDecls.js.map +1 -0
- package/lib/packlets/conditions/conditionToken.d.ts.map +1 -0
- package/lib/packlets/conditions/conditionToken.js.map +1 -0
- package/lib/packlets/conditions/convert/conditionSetDecls.d.ts.map +1 -0
- package/lib/packlets/conditions/convert/conditionSetDecls.js.map +1 -0
- package/lib/packlets/conditions/convert/decls.d.ts.map +1 -0
- package/lib/packlets/conditions/convert/decls.js.map +1 -0
- package/lib/packlets/conditions/convert/index.d.ts.map +1 -0
- package/lib/packlets/conditions/convert/index.js.map +1 -0
- package/lib/packlets/conditions/index.d.ts.map +1 -0
- package/lib/packlets/conditions/index.js.map +1 -0
- package/lib/packlets/config/common.d.ts +35 -0
- package/lib/packlets/config/common.d.ts.map +1 -0
- package/lib/packlets/config/common.js +97 -0
- package/lib/packlets/config/common.js.map +1 -0
- package/lib/packlets/config/configInitFactory.d.ts +217 -0
- package/lib/packlets/config/configInitFactory.d.ts.map +1 -0
- package/lib/packlets/config/configInitFactory.js +303 -0
- package/lib/packlets/config/configInitFactory.js.map +1 -0
- package/lib/packlets/config/convert.d.ts +23 -0
- package/lib/packlets/config/convert.d.ts.map +1 -0
- package/lib/packlets/config/convert.js +93 -0
- package/lib/packlets/config/convert.js.map +1 -0
- package/lib/packlets/config/index.browser.d.ts +7 -0
- package/lib/packlets/config/index.browser.d.ts.map +1 -0
- package/lib/packlets/config/index.browser.js +74 -0
- package/lib/packlets/config/index.browser.js.map +1 -0
- package/lib/packlets/config/index.d.ts +7 -0
- package/lib/packlets/config/index.d.ts.map +1 -0
- package/lib/packlets/config/index.js +68 -0
- package/lib/packlets/config/index.js.map +1 -0
- package/lib/packlets/config/json.d.ts +20 -0
- package/lib/packlets/config/json.d.ts.map +1 -0
- package/lib/packlets/config/json.js +24 -0
- package/lib/packlets/config/json.js.map +1 -0
- package/lib/packlets/config/predefined/default.d.ts +57 -0
- package/lib/packlets/config/predefined/default.d.ts.map +1 -0
- package/lib/packlets/config/predefined/default.js +141 -0
- package/lib/packlets/config/predefined/default.js.map +1 -0
- package/lib/packlets/config/predefined/extended.d.ts +25 -0
- package/lib/packlets/config/predefined/extended.d.ts.map +1 -0
- package/lib/packlets/config/predefined/extended.js +193 -0
- package/lib/packlets/config/predefined/extended.js.map +1 -0
- package/lib/packlets/config/predefined/index.d.ts +4 -0
- package/lib/packlets/config/predefined/index.d.ts.map +1 -0
- package/lib/packlets/config/predefined/index.js +62 -0
- package/lib/packlets/config/predefined/index.js.map +1 -0
- package/lib/packlets/config/systemConfiguration.d.ts +94 -0
- package/lib/packlets/config/systemConfiguration.d.ts.map +1 -0
- package/lib/packlets/config/systemConfiguration.js +152 -0
- package/lib/packlets/config/systemConfiguration.js.map +1 -0
- package/lib/packlets/context/contextDecls.d.ts.map +1 -0
- package/lib/packlets/context/contextDecls.js.map +1 -0
- package/lib/packlets/context/contextToken.d.ts.map +1 -0
- package/lib/packlets/context/contextToken.js.map +1 -0
- package/lib/packlets/context/convert/decls.d.ts.map +1 -0
- package/lib/packlets/context/convert/decls.js.map +1 -0
- package/lib/packlets/context/convert/index.d.ts.map +1 -0
- package/lib/packlets/context/convert/index.js.map +1 -0
- package/lib/packlets/context/index.d.ts.map +1 -0
- package/lib/packlets/context/index.js.map +1 -0
- package/lib/packlets/decisions/abstractDecision.d.ts.map +1 -0
- package/lib/packlets/decisions/abstractDecision.js.map +1 -0
- package/lib/packlets/decisions/abstractDecisionCollector.d.ts.map +1 -0
- package/lib/packlets/decisions/abstractDecisionCollector.js.map +1 -0
- package/lib/packlets/decisions/candidate.d.ts.map +1 -0
- package/lib/packlets/decisions/candidate.js.map +1 -0
- package/lib/packlets/decisions/common.d.ts.map +1 -0
- package/lib/packlets/decisions/common.js.map +1 -0
- package/lib/packlets/decisions/concreteDecision.d.ts.map +1 -0
- package/lib/packlets/decisions/concreteDecision.js.map +1 -0
- package/lib/packlets/decisions/decision.d.ts +1 -1
- package/lib/packlets/decisions/decision.d.ts.map +1 -0
- package/lib/packlets/decisions/decision.js +1 -1
- package/lib/packlets/decisions/decision.js.map +1 -0
- package/lib/packlets/decisions/index.d.ts.map +1 -0
- package/lib/packlets/decisions/index.js.map +1 -0
- package/lib/packlets/import/fsItem.d.ts +1 -4
- package/lib/packlets/import/fsItem.d.ts.map +1 -0
- package/lib/packlets/import/fsItem.js +1 -4
- package/lib/packlets/import/fsItem.js.map +1 -0
- package/lib/packlets/import/importContext.d.ts +5 -5
- package/lib/packlets/import/importContext.d.ts.map +1 -0
- package/lib/packlets/import/importContext.js +3 -3
- package/lib/packlets/import/importContext.js.map +1 -0
- package/lib/packlets/import/importManager.d.ts +15 -1
- package/lib/packlets/import/importManager.d.ts.map +1 -0
- package/lib/packlets/import/importManager.js +7 -3
- package/lib/packlets/import/importManager.js.map +1 -0
- package/lib/packlets/import/importable.d.ts.map +1 -0
- package/lib/packlets/import/importable.js.map +1 -0
- package/lib/packlets/import/importers/collectionImporter.d.ts +2 -2
- package/lib/packlets/import/importers/collectionImporter.d.ts.map +1 -0
- package/lib/packlets/import/importers/collectionImporter.js +2 -2
- package/lib/packlets/import/importers/collectionImporter.js.map +1 -0
- package/lib/packlets/import/importers/fsItemImporter.d.ts +16 -2
- package/lib/packlets/import/importers/fsItemImporter.d.ts.map +1 -0
- package/lib/packlets/import/importers/fsItemImporter.js +29 -13
- package/lib/packlets/import/importers/fsItemImporter.js.map +1 -0
- package/lib/packlets/import/importers/importer.d.ts.map +1 -0
- package/lib/packlets/import/importers/importer.js.map +1 -0
- package/lib/packlets/import/importers/index.browser.d.ts.map +1 -0
- package/lib/packlets/import/importers/index.browser.js.map +1 -0
- package/lib/packlets/import/importers/index.d.ts.map +1 -0
- package/lib/packlets/import/importers/index.js.map +1 -0
- package/lib/packlets/import/importers/jsonImporter.d.ts +2 -2
- package/lib/packlets/import/importers/jsonImporter.d.ts.map +1 -0
- package/lib/packlets/import/importers/jsonImporter.js +2 -2
- package/lib/packlets/import/importers/jsonImporter.js.map +1 -0
- package/lib/packlets/import/importers/pathImporter.d.ts +1 -1
- package/lib/packlets/import/importers/pathImporter.d.ts.map +1 -0
- package/lib/packlets/import/importers/pathImporter.js +1 -1
- package/lib/packlets/import/importers/pathImporter.js.map +1 -0
- package/lib/packlets/import/index.browser.d.ts.map +1 -0
- package/lib/packlets/import/index.browser.js.map +1 -0
- package/lib/packlets/import/index.d.ts.map +1 -0
- package/lib/packlets/import/index.js.map +1 -0
- package/lib/packlets/qualifier-types/config/convert.d.ts +65 -0
- package/lib/packlets/qualifier-types/config/convert.d.ts.map +1 -0
- package/lib/packlets/qualifier-types/config/convert.js +161 -0
- package/lib/packlets/qualifier-types/config/convert.js.map +1 -0
- package/lib/packlets/qualifier-types/config/index.d.ts +4 -0
- package/lib/packlets/qualifier-types/config/index.d.ts.map +1 -0
- package/lib/packlets/qualifier-types/config/index.js +64 -0
- package/lib/packlets/qualifier-types/config/index.js.map +1 -0
- package/lib/packlets/qualifier-types/config/json.d.ts +91 -0
- package/lib/packlets/qualifier-types/config/json.d.ts.map +1 -0
- package/lib/packlets/qualifier-types/config/json.js +35 -0
- package/lib/packlets/qualifier-types/config/json.js.map +1 -0
- package/lib/packlets/qualifier-types/convert.d.ts.map +1 -0
- package/lib/packlets/qualifier-types/convert.js.map +1 -0
- package/lib/packlets/qualifier-types/helpers.d.ts.map +1 -0
- package/lib/packlets/qualifier-types/helpers.js.map +1 -0
- package/lib/packlets/qualifier-types/index.d.ts.map +1 -0
- package/lib/packlets/qualifier-types/index.js.map +1 -0
- package/lib/packlets/qualifier-types/languageQualifierType.d.ts +6 -7
- package/lib/packlets/qualifier-types/languageQualifierType.d.ts.map +1 -0
- package/lib/packlets/qualifier-types/languageQualifierType.js +6 -7
- package/lib/packlets/qualifier-types/languageQualifierType.js.map +1 -0
- package/lib/packlets/qualifier-types/literalQualifierType.d.ts +7 -10
- package/lib/packlets/qualifier-types/literalQualifierType.d.ts.map +1 -0
- package/lib/packlets/qualifier-types/literalQualifierType.js +7 -10
- package/lib/packlets/qualifier-types/literalQualifierType.js.map +1 -0
- package/lib/packlets/qualifier-types/literalValueHierarchy.d.ts.map +1 -0
- package/lib/packlets/qualifier-types/literalValueHierarchy.js.map +1 -0
- package/lib/packlets/qualifier-types/qualifierType.d.ts +17 -18
- package/lib/packlets/qualifier-types/qualifierType.d.ts.map +1 -0
- package/lib/packlets/qualifier-types/qualifierType.js +12 -13
- package/lib/packlets/qualifier-types/qualifierType.js.map +1 -0
- package/lib/packlets/qualifier-types/qualifierTypeCollector.d.ts.map +1 -0
- package/lib/packlets/qualifier-types/qualifierTypeCollector.js.map +1 -0
- package/lib/packlets/qualifier-types/territoryQualifierType.d.ts +8 -8
- package/lib/packlets/qualifier-types/territoryQualifierType.d.ts.map +1 -0
- package/lib/packlets/qualifier-types/territoryQualifierType.js +5 -5
- package/lib/packlets/qualifier-types/territoryQualifierType.js.map +1 -0
- package/lib/packlets/qualifiers/convert/decls.d.ts.map +1 -0
- package/lib/packlets/qualifiers/convert/decls.js.map +1 -0
- package/lib/packlets/qualifiers/convert/index.d.ts.map +1 -0
- package/lib/packlets/qualifiers/convert/index.js.map +1 -0
- package/lib/packlets/qualifiers/convert/qualifier.d.ts.map +1 -0
- package/lib/packlets/qualifiers/convert/qualifier.js.map +1 -0
- package/lib/packlets/qualifiers/index.d.ts.map +1 -0
- package/lib/packlets/qualifiers/index.js.map +1 -0
- package/lib/packlets/qualifiers/qualifier.d.ts +6 -7
- package/lib/packlets/qualifiers/qualifier.d.ts.map +1 -0
- package/lib/packlets/qualifiers/qualifier.js +6 -7
- package/lib/packlets/qualifiers/qualifier.js.map +1 -0
- package/lib/packlets/qualifiers/qualifierCollector.d.ts +3 -3
- package/lib/packlets/qualifiers/qualifierCollector.d.ts.map +1 -0
- package/lib/packlets/qualifiers/qualifierCollector.js +2 -2
- package/lib/packlets/qualifiers/qualifierCollector.js.map +1 -0
- package/lib/packlets/qualifiers/qualifierDecl.d.ts.map +1 -0
- package/lib/packlets/qualifiers/qualifierDecl.js.map +1 -0
- package/lib/packlets/qualifiers/qualifierDefaultValueDecls.d.ts.map +1 -0
- package/lib/packlets/qualifiers/qualifierDefaultValueDecls.js.map +1 -0
- package/lib/packlets/qualifiers/qualifierDefaultValueToken.d.ts.map +1 -0
- package/lib/packlets/qualifiers/qualifierDefaultValueToken.js.map +1 -0
- package/lib/packlets/resource-json/compiled/common.d.ts.map +1 -0
- package/lib/packlets/resource-json/compiled/common.js.map +1 -0
- package/lib/packlets/resource-json/compiled/convert.d.ts.map +1 -0
- package/lib/packlets/resource-json/compiled/convert.js.map +1 -0
- package/lib/packlets/resource-json/compiled/index.d.ts.map +1 -0
- package/lib/packlets/resource-json/compiled/index.js.map +1 -0
- package/lib/packlets/resource-json/compiled/json.d.ts.map +1 -0
- package/lib/packlets/resource-json/compiled/json.js.map +1 -0
- package/lib/packlets/resource-json/convert.d.ts.map +1 -0
- package/lib/packlets/resource-json/convert.js.map +1 -0
- package/lib/packlets/resource-json/helpers.d.ts.map +1 -0
- package/lib/packlets/resource-json/helpers.js.map +1 -0
- package/lib/packlets/resource-json/index.d.ts.map +1 -0
- package/lib/packlets/resource-json/index.js.map +1 -0
- package/lib/packlets/resource-json/json.d.ts.map +1 -0
- package/lib/packlets/resource-json/json.js.map +1 -0
- package/lib/packlets/resource-json/normalized.d.ts.map +1 -0
- package/lib/packlets/resource-json/normalized.js.map +1 -0
- package/lib/packlets/resource-json/resourceDeclCollection.d.ts +1 -1
- package/lib/packlets/resource-json/resourceDeclCollection.d.ts.map +1 -0
- package/lib/packlets/resource-json/resourceDeclCollection.js +1 -1
- package/lib/packlets/resource-json/resourceDeclCollection.js.map +1 -0
- package/lib/packlets/resource-json/resourceDeclContainer.d.ts.map +1 -0
- package/lib/packlets/resource-json/resourceDeclContainer.js.map +1 -0
- package/lib/packlets/resource-json/resourceDeclTree.d.ts +1 -1
- package/lib/packlets/resource-json/resourceDeclTree.d.ts.map +1 -0
- package/lib/packlets/resource-json/resourceDeclTree.js +1 -1
- package/lib/packlets/resource-json/resourceDeclTree.js.map +1 -0
- package/lib/packlets/resource-types/config/convert.d.ts +8 -0
- package/lib/packlets/resource-types/config/convert.d.ts.map +1 -0
- package/lib/packlets/resource-types/config/convert.js +38 -0
- package/lib/packlets/resource-types/config/convert.js.map +1 -0
- package/lib/packlets/resource-types/config/index.d.ts +4 -0
- package/lib/packlets/resource-types/config/index.d.ts.map +1 -0
- package/lib/packlets/resource-types/config/index.js +64 -0
- package/lib/packlets/resource-types/config/index.js.map +1 -0
- package/lib/packlets/resource-types/config/json.d.ts +11 -0
- package/lib/packlets/resource-types/config/json.d.ts.map +1 -0
- package/lib/packlets/resource-types/config/json.js +24 -0
- package/lib/packlets/resource-types/config/json.js.map +1 -0
- package/lib/packlets/resource-types/helpers.d.ts.map +1 -0
- package/lib/packlets/resource-types/helpers.js.map +1 -0
- package/lib/packlets/resource-types/index.d.ts.map +1 -0
- package/lib/packlets/resource-types/index.js.map +1 -0
- package/lib/packlets/resource-types/jsonResourceType.d.ts +17 -5
- package/lib/packlets/resource-types/jsonResourceType.d.ts.map +1 -0
- package/lib/packlets/resource-types/jsonResourceType.js +2 -2
- package/lib/packlets/resource-types/jsonResourceType.js.map +1 -0
- package/lib/packlets/resource-types/resourceType.d.ts +5 -5
- package/lib/packlets/resource-types/resourceType.d.ts.map +1 -0
- package/lib/packlets/resource-types/resourceType.js +2 -2
- package/lib/packlets/resource-types/resourceType.js.map +1 -0
- package/lib/packlets/resource-types/resourceTypeCollector.d.ts.map +1 -0
- package/lib/packlets/resource-types/resourceTypeCollector.js.map +1 -0
- package/lib/packlets/resources/candidateReducer.d.ts.map +1 -0
- package/lib/packlets/resources/candidateReducer.js.map +1 -0
- package/lib/packlets/resources/candidateValue.d.ts.map +1 -0
- package/lib/packlets/resources/candidateValue.js.map +1 -0
- package/lib/packlets/resources/candidateValueCollector.d.ts.map +1 -0
- package/lib/packlets/resources/candidateValueCollector.js.map +1 -0
- package/lib/packlets/resources/common.d.ts.map +1 -0
- package/lib/packlets/resources/common.js.map +1 -0
- package/lib/packlets/resources/deltaGenerator.d.ts.map +1 -0
- package/lib/packlets/resources/deltaGenerator.js.map +1 -0
- package/lib/packlets/resources/index.d.ts.map +1 -0
- package/lib/packlets/resources/index.js.map +1 -0
- package/lib/packlets/resources/resource.d.ts.map +1 -0
- package/lib/packlets/resources/resource.js.map +1 -0
- package/lib/packlets/resources/resourceBuilder.d.ts +2 -2
- package/lib/packlets/resources/resourceBuilder.d.ts.map +1 -0
- package/lib/packlets/resources/resourceBuilder.js +2 -2
- package/lib/packlets/resources/resourceBuilder.js.map +1 -0
- package/lib/packlets/resources/resourceCandidate.d.ts.map +1 -0
- package/lib/packlets/resources/resourceCandidate.js.map +1 -0
- package/lib/packlets/resources/resourceManagerBuilder.d.ts +5 -5
- package/lib/packlets/resources/resourceManagerBuilder.d.ts.map +1 -0
- package/lib/packlets/resources/resourceManagerBuilder.js +5 -5
- package/lib/packlets/resources/resourceManagerBuilder.js.map +1 -0
- package/lib/packlets/runtime/cacheListener.d.ts.map +1 -0
- package/lib/packlets/runtime/cacheListener.js.map +1 -0
- package/lib/packlets/runtime/cacheMetrics.d.ts.map +1 -0
- package/lib/packlets/runtime/cacheMetrics.js.map +1 -0
- package/lib/packlets/runtime/compiledResourceCollection.d.ts +5 -5
- package/lib/packlets/runtime/compiledResourceCollection.d.ts.map +1 -0
- package/lib/packlets/runtime/compiledResourceCollection.js +5 -5
- package/lib/packlets/runtime/compiledResourceCollection.js.map +1 -0
- package/lib/packlets/runtime/conditionSetResolutionResult.d.ts.map +1 -0
- package/lib/packlets/runtime/conditionSetResolutionResult.js.map +1 -0
- package/lib/packlets/runtime/context/contextQualifierProvider.d.ts.map +1 -0
- package/lib/packlets/runtime/context/contextQualifierProvider.js.map +1 -0
- package/lib/packlets/runtime/context/contextQualifierProviderValidator.d.ts.map +1 -0
- package/lib/packlets/runtime/context/contextQualifierProviderValidator.js.map +1 -0
- package/lib/packlets/runtime/context/index.d.ts.map +1 -0
- package/lib/packlets/runtime/context/index.js.map +1 -0
- package/lib/packlets/runtime/context/simpleContextQualifierProvider.d.ts.map +1 -0
- package/lib/packlets/runtime/context/simpleContextQualifierProvider.js.map +1 -0
- package/lib/packlets/runtime/context/validatingSimpleContextQualifierProvider.d.ts.map +1 -0
- package/lib/packlets/runtime/context/validatingSimpleContextQualifierProvider.js.map +1 -0
- package/lib/packlets/runtime/iResourceManager.d.ts.map +1 -0
- package/lib/packlets/runtime/iResourceManager.js.map +1 -0
- package/lib/packlets/runtime/index.d.ts.map +1 -0
- package/lib/packlets/runtime/index.js.map +1 -0
- package/lib/packlets/runtime/resource-tree/common.d.ts.map +1 -0
- package/lib/packlets/runtime/resource-tree/common.js.map +1 -0
- package/lib/packlets/runtime/resource-tree/index.d.ts.map +1 -0
- package/lib/packlets/runtime/resource-tree/index.js.map +1 -0
- package/lib/packlets/runtime/resource-tree/readOnlyResourceTree.d.ts.map +1 -0
- package/lib/packlets/runtime/resource-tree/readOnlyResourceTree.js.map +1 -0
- package/lib/packlets/runtime/resource-tree/resourceTreeChildren.d.ts.map +1 -0
- package/lib/packlets/runtime/resource-tree/resourceTreeChildren.js.map +1 -0
- package/lib/packlets/runtime/resource-tree/resourceTreeChildrenValidator.d.ts.map +1 -0
- package/lib/packlets/runtime/resource-tree/resourceTreeChildrenValidator.js.map +1 -0
- package/lib/packlets/runtime/resourceResolver.d.ts.map +1 -0
- package/lib/packlets/runtime/resourceResolver.js.map +1 -0
- package/lib/packlets/runtime/resourceTreeResolver.d.ts.map +1 -0
- package/lib/packlets/runtime/resourceTreeResolver.js.map +1 -0
- package/lib/packlets/runtime/validate.d.ts.map +1 -0
- package/lib/packlets/runtime/validate.js.map +1 -0
- package/lib/packlets/zip-archive/convert.d.ts.map +1 -0
- package/lib/packlets/zip-archive/convert.js.map +1 -0
- package/lib/packlets/zip-archive/index.browser.d.ts.map +1 -0
- package/lib/packlets/zip-archive/index.browser.js.map +1 -0
- package/lib/packlets/zip-archive/index.d.ts.map +1 -0
- package/lib/packlets/zip-archive/index.js.map +1 -0
- package/lib/packlets/zip-archive/json.d.ts.map +1 -0
- package/lib/packlets/zip-archive/json.js.map +1 -0
- package/lib/packlets/zip-archive/types.d.ts.map +1 -0
- package/lib/packlets/zip-archive/types.js.map +1 -0
- package/lib/packlets/zip-archive/zipArchiveCreator.d.ts.map +1 -0
- package/lib/packlets/zip-archive/zipArchiveCreator.js.map +1 -0
- package/lib/packlets/zip-archive/zipArchiveFormat.d.ts.map +1 -0
- package/lib/packlets/zip-archive/zipArchiveFormat.js.map +1 -0
- package/lib/packlets/zip-archive/zipArchiveLoader.d.ts.map +1 -0
- package/lib/packlets/zip-archive/zipArchiveLoader.js.map +1 -0
- package/package.json +28 -26
- package/dist/test/data/sample.json +0 -32
- package/dist/test/unit/qualifier-types/testQualifierType.js +0 -76
- package/dist/test/unit/resource-types/testDerivedResourceType.js +0 -109
- package/dist/test/unit/resources/deltaGenerator.helpers.js +0 -282
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compiledResourceCollection.js","sourceRoot":"","sources":["../../../src/packlets/runtime/compiledResourceCollection.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4CASuB;AACvB,8CAKuB;AACvB,4CAA4F;AAC5F,8CAAgF;AAChF,sDAAuG;AACvG,wDAA2G;AAC3G,sCAAyD;AACzD,oDAAwE;AAExE,4CAAgD;AAChD,qDAAuC;AA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EACN,CAAC,OAAO,EAAE,EAAE,CAAC,mDAAmD,gBAAgB,CAAC,EAAE,KAAK,OAAO,EAAE,CAClG;iBACA,SAAS,EAAE,CAAC;YAEf,+EAA+E;YAC/E,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;gBACnC,SAAS;YACX,CAAC;YAED,MAAM,IAAI,GAAG,gBAAO,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,EAAE,CAAC;iBAC3D,cAAc,CACb,MAAM,EACN,CAAC,OAAO,EAAE,EAAE,CAAC,mCAAmC,gBAAgB,CAAC,EAAE,KAAK,OAAO,EAAE,CAClF;iBACA,SAAS,EAAE,CAAC;YAEf,gFAAgF;YAChF,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;gBACvB,SAAS;YACX,CAAC;YAED,oDAAoD;YACpD,MAAM,QAAQ,GAAc;gBAC1B,EAAE,EAAE,gBAAgB,CAAC,EAAE;gBACvB,IAAI;gBACJ,YAAY;gBACZ,QAAQ,EAAE,gBAAgB;gBAC1B,UAAU;aACX,CAAC;YAEF,WAAW;iBACR,GAAG,CAAC,gBAAgB,CAAC,EAAE,EAAE,QAAQ,CAAC;iBAClC,cAAc,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,0BAA0B,gBAAgB,CAAC,EAAE,KAAK,OAAO,EAAE,CAAC,CAAC;QACtG,CAAC;QAED,OAAO,MAAM,CAAC,cAAc,CAAC,IAAA,kBAAO,EAAC,WAAW,CAAC,CAAC,CAAC;IACrD,CAAC;CACF;AA5kBD,gEA4kBC","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport {\n captureResult,\n Collections,\n fail,\n mapResults,\n MessageAggregator,\n Result,\n succeed,\n ValidatingResultMap\n} from '@fgv/ts-utils';\nimport {\n ConditionCollector,\n ConditionSetCollector,\n ReadOnlyConditionCollector,\n ReadOnlyConditionSetCollector\n} from '../conditions';\nimport { AbstractDecisionCollector, ReadOnlyAbstractDecisionCollector } from '../decisions';\nimport { QualifierCollector, IReadOnlyQualifierCollector } from '../qualifiers';\nimport { ResourceType, ResourceTypeCollector, ReadOnlyResourceTypeCollector } from '../resource-types';\nimport { QualifierType, QualifierTypeCollector, ReadOnlyQualifierTypeCollector } from '../qualifier-types';\nimport { Convert, ResourceId, Helpers } from '../common';\nimport { JsonObject, JsonValue, isJsonObject } from '@fgv/ts-json-base';\nimport { IResourceManager, IResource, IResourceCandidate } from './iResourceManager';\nimport { ConcreteDecision } from '../decisions';\nimport * as Validate from './validate';\nimport * as ResourceJson from '../resource-json';\nimport { ReadOnlyResourceTreeRoot } from './resource-tree';\nimport * as Context from '../context';\n\n/**\n * Interface for parameters to create a {@link Runtime.CompiledResourceCollection | CompiledResourceCollection}.\n * @public\n */\nexport interface ICompiledResourceCollectionCreateParams {\n /**\n * The compiled resource collection data.\n */\n compiledCollection: ResourceJson.Compiled.ICompiledResourceCollection;\n /**\n * Map of qualifier type names to qualifier type objects.\n */\n qualifierTypes: Collections.IReadOnlyResultMap<string, QualifierType>;\n /**\n * Map of resource type names to resource type objects.\n */\n resourceTypes: Collections.IReadOnlyResultMap<string, ResourceType>;\n}\n\n/**\n * A compiled resource collection implements {@link Runtime.IResourceManager | IResourceManager}\n * by reconstructing runtime objects from compiled data. This provides an efficient way to load\n * and use pre-compiled resource collections without rebuilding them from scratch.\n * @public\n */\nexport class CompiledResourceCollection implements IResourceManager<IResource> {\n public readonly conditions: ReadOnlyConditionCollector;\n public readonly conditionSets: ReadOnlyConditionSetCollector;\n public readonly decisions: ReadOnlyAbstractDecisionCollector;\n\n private readonly _qualifierTypes: QualifierTypeCollector;\n private readonly _qualifiers: QualifierCollector;\n private readonly _resourceTypes: ResourceTypeCollector;\n private readonly _candidateValues: JsonValue[];\n private readonly _builtResources: ValidatingResultMap<ResourceId, IResource>;\n private _cachedResourceTree?: ReadOnlyResourceTreeRoot<IResource>;\n\n /**\n * A {@link QualifierTypes.ReadOnlyQualifierTypeCollector | ReadOnlyQualifierTypeCollector} which\n * contains the {@link QualifierTypes.QualifierType | qualifier types} used in this collection.\n */\n public get qualifierTypes(): ReadOnlyQualifierTypeCollector {\n return this._qualifierTypes;\n }\n\n /**\n * A {@link Qualifiers.IReadOnlyQualifierCollector | ReadOnlyQualifierCollector} which\n * contains the {@link Qualifiers.Qualifier | qualifiers} used in this collection.\n */\n public get qualifiers(): IReadOnlyQualifierCollector {\n return this._qualifiers;\n }\n\n /**\n * The resource IDs contained in this compiled resource collection.\n */\n public get resourceIds(): ReadonlyArray<ResourceId> {\n return Array.from(this._builtResources.keys()).sort();\n }\n\n /**\n * A {@link ResourceTypes.ResourceTypeCollector | ResourceTypeCollector} which\n * contains the {@link ResourceTypes.ResourceType | resource types} used in this collection.\n */\n public get resourceTypes(): ReadOnlyResourceTypeCollector {\n return this._resourceTypes;\n }\n\n /**\n * The candidate values in the collection.\n */\n public get candidateValues(): ReadonlyArray<JsonValue> {\n return this._candidateValues;\n }\n\n /**\n * {@inheritDoc Runtime.IResourceManager.builtResources}\n */\n public get builtResources(): Collections.IReadOnlyValidatingResultMap<ResourceId, IResource> {\n return this._builtResources;\n }\n\n /**\n * {@inheritDoc Runtime.IResourceManager.numResources}\n */\n public get numResources(): number {\n return this._builtResources.size;\n }\n\n protected _numCandidates?: number;\n\n /**\n * {@inheritDoc Runtime.IResourceManager.numCandidates}\n */\n public get numCandidates(): number {\n if (this._numCandidates === undefined) {\n this._numCandidates = [...this._builtResources.values()].reduce(\n (acc, resource) => acc + resource.candidates.length,\n 0\n );\n }\n return this._numCandidates;\n }\n\n /**\n * Constructor for a {@link Runtime.CompiledResourceCollection | CompiledResourceCollection} object.\n * @param params - Parameters to create a new {@link Runtime.CompiledResourceCollection | CompiledResourceCollection}.\n * @internal\n */\n protected constructor(params: ICompiledResourceCollectionCreateParams) {\n // Reconstruct collectors from compiled data\n this._qualifierTypes = this._buildQualifierTypes(\n params.compiledCollection,\n params.qualifierTypes\n ).orThrow();\n this._qualifiers = this._buildQualifiers(params.compiledCollection, this._qualifierTypes).orThrow();\n this._resourceTypes = this._buildResourceTypes(params.compiledCollection, params.resourceTypes).orThrow();\n\n // Build collectors from compiled data\n const conditionCollector = this._buildConditions(params.compiledCollection, this._qualifiers).orThrow();\n const conditionSetCollector = this._buildConditionSets(\n params.compiledCollection,\n conditionCollector\n ).orThrow();\n const decisionCollector = this._buildDecisions(\n params.compiledCollection,\n conditionSetCollector\n ).orThrow();\n\n this.conditions = conditionCollector;\n this.conditionSets = conditionSetCollector;\n this.decisions = decisionCollector;\n this._candidateValues = [...params.compiledCollection.candidateValues];\n\n // Build resources from compiled data\n this._builtResources = this._buildResources(\n params.compiledCollection,\n this._resourceTypes,\n decisionCollector\n ).orThrow();\n }\n\n /**\n * Creates a new {@link Runtime.CompiledResourceCollection | CompiledResourceCollection} object.\n * @param params - Parameters to create a new {@link Runtime.CompiledResourceCollection | CompiledResourceCollection}.\n * @returns `Success` with the new {@link Runtime.CompiledResourceCollection | CompiledResourceCollection} object if successful,\n * or `Failure` with an error message if not.\n * @public\n */\n public static create(params: ICompiledResourceCollectionCreateParams): Result<CompiledResourceCollection> {\n return captureResult(() => new CompiledResourceCollection(params));\n }\n\n /**\n * {@inheritDoc Runtime.IResourceManager.getBuiltResource}\n */\n public getBuiltResource(id: string): Result<IResource> {\n return this._builtResources.validating.get(id);\n }\n\n /**\n * {@inheritDoc Runtime.IResourceManager.validateContext}\n */\n public validateContext(context: Context.IContextDecl): Result<Context.IValidatedContextDecl> {\n return Context.Convert.validatedContextDecl.convert(context, {\n qualifiers: this._qualifiers\n });\n }\n\n /**\n * Gets a resource tree built from the resources in this collection.\n * The tree provides hierarchical access to resources based on their ResourceId structure.\n * For example, resources with IDs like \"app.messages.welcome\" create a tree structure\n * where \"app\" and \"messages\" are branch nodes, and \"welcome\" is a leaf containing the resource.\n *\n * String-based validation is available through the `children.validating` property,\n * allowing callers to use `tree.children.validating.getById(stringId)` for validated access.\n *\n * Uses lazy initialization with caching for performance.\n * @returns Result containing the resource tree root, or failure if tree construction fails\n * @public\n */\n public getBuiltResourceTree(): Result<ReadOnlyResourceTreeRoot<IResource>> {\n if (this._cachedResourceTree) {\n return succeed(this._cachedResourceTree);\n }\n\n // Convert all built resources to [ResourceId, IResource] pairs\n const resources: [ResourceId, IResource][] = [];\n for (const [id, resource] of this._builtResources.entries()) {\n resources.push([id, resource]);\n }\n\n // Create the resource tree with lazy initialization\n return ReadOnlyResourceTreeRoot.create(resources).onSuccess((tree) => {\n this._cachedResourceTree = tree;\n return succeed(tree);\n });\n }\n\n /**\n * Reconstructs a QualifierTypeCollector from compiled data.\n * @param compiled - The compiled resource collection\n * @param qualifierTypes - Map of qualifier type names to qualifier type objects\n * @returns The reconstructed QualifierTypeCollector\n * @internal\n */\n private _buildQualifierTypes(\n compiled: ResourceJson.Compiled.ICompiledResourceCollection,\n qualifierTypes: Collections.IReadOnlyResultMap<string, QualifierType>\n ): Result<QualifierTypeCollector> {\n return mapResults(\n compiled.qualifierTypes.map((compiledQualifierType) => qualifierTypes.get(compiledQualifierType.name))\n ).onSuccess((referencedQualifierTypes) => {\n return QualifierTypeCollector.create({\n qualifierTypes: referencedQualifierTypes\n });\n });\n }\n\n /**\n * Reconstructs a QualifierCollector from compiled data.\n * @param compiled - The compiled resource collection\n * @param qualifierTypes - The reconstructed QualifierTypeCollector\n * @returns The reconstructed QualifierCollector\n * @internal\n */\n private _buildQualifiers(\n compiled: ResourceJson.Compiled.ICompiledResourceCollection,\n qualifierTypes: QualifierTypeCollector\n ): Result<QualifierCollector> {\n return mapResults(\n compiled.qualifiers.map((compiledQualifier) => {\n return qualifierTypes.getAt(compiledQualifier.type).onSuccess((qualifierType) => {\n return succeed({\n name: compiledQualifier.name,\n typeName: qualifierType.name,\n defaultPriority: compiledQualifier.defaultPriority\n });\n });\n })\n ).onSuccess((qualifierDecls) => {\n return QualifierCollector.create({\n qualifierTypes,\n qualifiers: qualifierDecls\n });\n });\n }\n\n /**\n * Reconstructs a ResourceTypeCollector from compiled data.\n * @param compiled - The compiled resource collection\n * @param resourceTypes - Map of resource type names to resource type objects\n * @returns The reconstructed ResourceTypeCollector\n * @internal\n */\n private _buildResourceTypes(\n compiled: ResourceJson.Compiled.ICompiledResourceCollection,\n resourceTypes: Collections.IReadOnlyResultMap<string, ResourceType>\n ): Result<ResourceTypeCollector> {\n return mapResults(\n compiled.resourceTypes.map((compiledResourceType) => resourceTypes.get(compiledResourceType.name))\n ).onSuccess((referencedResourceTypes) => {\n return ResourceTypeCollector.create({\n resourceTypes: referencedResourceTypes\n });\n });\n }\n\n /**\n * Reconstructs a ConditionCollector from compiled data.\n * @param compiled - The compiled resource collection\n * @param qualifiers - The reconstructed QualifierCollector\n * @returns The reconstructed ConditionCollector\n * @internal\n */\n private _buildConditions(\n compiled: ResourceJson.Compiled.ICompiledResourceCollection,\n qualifiers: QualifierCollector\n ): Result<ConditionCollector> {\n const errors = new MessageAggregator();\n\n const conditionCollectorResult = ConditionCollector.create({ qualifiers });\n /* c8 ignore next 3 - defensive coding for ConditionCollector creation failure */\n if (conditionCollectorResult.isFailure()) {\n return conditionCollectorResult;\n }\n const conditionCollector = conditionCollectorResult.value;\n\n for (const [index, compiledCondition] of compiled.conditions.entries()) {\n const qualifierResult = qualifiers.getAt(compiledCondition.qualifierIndex);\n /* c8 ignore next 5 - defensive coding: invalid qualifier index should not occur in compiled data */\n if (qualifierResult.isFailure()) {\n errors.addMessage(\n `Invalid qualifier index ${compiledCondition.qualifierIndex} at condition ${index}: ${qualifierResult.message}`\n );\n continue;\n }\n const qualifier = qualifierResult.value;\n\n /* c8 ignore next 1 - not really testable atm as \"matches\" is the only supported operator */\n const operator = compiledCondition.operator ?? 'matches'; // Default to 'matches' if not provided\n const conditionDecl = {\n qualifierName: qualifier.name,\n value: compiledCondition.value,\n operator,\n priority: compiledCondition.priority,\n scoreAsDefault: compiledCondition.scoreAsDefault\n };\n\n const conditionResult = conditionCollector.validating.add(conditionDecl);\n /* c8 ignore next 4 - defensive coding for condition addition failure */\n if (conditionResult.isFailure()) {\n errors.addMessage(`Failed to add condition at index ${index}: ${conditionResult.message}`);\n continue;\n }\n const condition = conditionResult.value;\n\n // Validate that the assigned index matches our expected index\n const expectedIndexResult = Convert.conditionIndex.convert(index);\n /* c8 ignore next 4 - defensive coding for invalid condition index conversion */\n if (expectedIndexResult.isFailure()) {\n errors.addMessage(`Invalid condition index ${index}: ${expectedIndexResult.message}`);\n continue;\n }\n const expectedIndex = expectedIndexResult.value;\n\n /* c8 ignore next 5 - defensive coding for condition index mismatch */\n if (condition.index !== expectedIndex) {\n errors.addMessage(\n `Index mismatch at condition ${index}: expected ${expectedIndex}, got ${condition.index}`\n );\n }\n }\n\n return errors.hasMessages ? fail(errors.toString()) : succeed(conditionCollector);\n }\n\n /**\n * Reconstructs a ConditionSetCollector from compiled data.\n * @param compiled - The compiled resource collection\n * @param conditions - The reconstructed ConditionCollector\n * @returns The reconstructed ConditionSetCollector\n * @internal\n */\n private _buildConditionSets(\n compiled: ResourceJson.Compiled.ICompiledResourceCollection,\n conditions: ConditionCollector\n ): Result<ConditionSetCollector> {\n const errors = new MessageAggregator();\n\n const conditionSetCollectorResult = ConditionSetCollector.create({ conditions });\n /* c8 ignore next 3 - defensive coding for ConditionSetCollector creation failure */\n if (conditionSetCollectorResult.isFailure()) {\n return conditionSetCollectorResult;\n }\n const conditionSetCollector = conditionSetCollectorResult.value;\n\n for (const [index, compiledConditionSet] of compiled.conditionSets.entries()) {\n const referencedConditionsResult = mapResults(\n compiledConditionSet.conditions.map((conditionIndex) => conditions.getAt(conditionIndex))\n );\n if (referencedConditionsResult.isFailure()) {\n errors.addMessage(\n `Failed to resolve conditions for condition set ${index}: ${referencedConditionsResult.message}`\n );\n continue;\n }\n const referencedConditions = referencedConditionsResult.value;\n\n const conditionSetResult = conditionSetCollector.validating.getOrAdd(referencedConditions);\n /* c8 ignore next 4 - defensive coding for condition set addition failure */\n if (conditionSetResult.isFailure()) {\n errors.addMessage(`Failed to add condition set at index ${index}: ${conditionSetResult.message}`);\n continue;\n }\n const conditionSet = conditionSetResult.value;\n\n // Validate that the assigned index matches our expected index\n const expectedIndexResult = Convert.conditionSetIndex.convert(index);\n /* c8 ignore next 4 - defensive coding for invalid condition set index conversion */\n if (expectedIndexResult.isFailure()) {\n errors.addMessage(`Invalid condition set index ${index}: ${expectedIndexResult.message}`);\n continue;\n }\n const expectedIndex = expectedIndexResult.value;\n\n /* c8 ignore next 5 - defensive coding for condition set index mismatch */\n if (conditionSet.index !== expectedIndex) {\n errors.addMessage(\n `Index mismatch at condition set ${index}: expected ${expectedIndex}, got ${conditionSet.index}`\n );\n }\n }\n\n return errors.hasMessages ? fail(errors.toString()) : succeed(conditionSetCollector);\n }\n\n /**\n * Reconstructs an AbstractDecisionCollector from compiled data.\n * @param compiled - The compiled resource collection\n * @param conditionSets - The reconstructed ConditionSetCollector\n * @returns The reconstructed AbstractDecisionCollector\n * @internal\n */\n private _buildDecisions(\n compiled: ResourceJson.Compiled.ICompiledResourceCollection,\n conditionSets: ConditionSetCollector\n ): Result<AbstractDecisionCollector> {\n const errors = new MessageAggregator();\n\n const decisionCollectorResult = AbstractDecisionCollector.create({ conditionSets });\n /* c8 ignore next 3 - defensive coding for AbstractDecisionCollector creation failure */\n if (decisionCollectorResult.isFailure()) {\n return decisionCollectorResult;\n }\n const decisionCollector = decisionCollectorResult.value;\n\n for (const [index, compiledDecision] of compiled.decisions.entries()) {\n const referencedConditionSetsResult = mapResults(\n compiledDecision.conditionSets.map((conditionSetIndex) => conditionSets.getAt(conditionSetIndex))\n );\n /* c8 ignore next 5 - defensive coding: condition set resolution should not fail with valid compiled data */\n if (referencedConditionSetsResult.isFailure()) {\n errors.addMessage(\n `Failed to resolve condition sets for decision ${index}: ${referencedConditionSetsResult.message}`\n );\n continue;\n }\n const referencedConditionSets = referencedConditionSetsResult.value;\n\n const decisionResult = decisionCollector.validating.getOrAdd(referencedConditionSets);\n /* c8 ignore next 4 - defensive coding for decision addition failure */\n if (decisionResult.isFailure()) {\n errors.addMessage(`Failed to add decision at index ${index}: ${decisionResult.message}`);\n continue;\n }\n const decision = decisionResult.value;\n\n // Validate that the assigned index matches our expected index\n const expectedIndexResult = Convert.decisionIndex.convert(index);\n /* c8 ignore next 4 - defensive coding for invalid decision index conversion */\n if (expectedIndexResult.isFailure()) {\n errors.addMessage(`Invalid decision index ${index}: ${expectedIndexResult.message}`);\n continue;\n }\n const expectedIndex = expectedIndexResult.value;\n\n /* c8 ignore next 5 - defensive coding for decision index mismatch */\n if (decision.index !== expectedIndex) {\n errors.addMessage(\n `Index mismatch at decision ${index}: expected ${expectedIndex}, got ${decision.index}`\n );\n }\n }\n\n return errors.hasMessages ? fail(errors.toString()) : succeed(decisionCollector);\n }\n\n /**\n * Gets a candidate value from the collection.\n * @param valueIndex - The index of the candidate value to get.\n * @returns\n */\n private _getCandidateValue(valueIndex: number): Result<JsonObject> {\n /* c8 ignore next 3 - defensive coding: candidate value index should be valid in compiled data */\n if (valueIndex < 0 || valueIndex >= this._candidateValues.length) {\n return fail(`Invalid candidate value index ${valueIndex}`);\n }\n /* c8 ignore next 3 - defensive coding for invalid candidate value conversion */\n if (!isJsonObject(this._candidateValues[valueIndex])) {\n return fail(`${valueIndex}: candidate value not a JSON object.`);\n }\n return succeed(this._candidateValues[valueIndex]);\n }\n\n /**\n * Reconstructs a ValidatingResultMap of resources from compiled data.\n * @param compiled - The compiled resource collection\n * @param resourceTypes - The reconstructed ResourceTypeCollector\n * @param decisions - The reconstructed AbstractDecisionCollector\n * @returns The reconstructed ValidatingResultMap of resources\n * @internal\n */\n private _buildResources(\n compiled: ResourceJson.Compiled.ICompiledResourceCollection,\n resourceTypes: ResourceTypeCollector,\n decisions: AbstractDecisionCollector\n ): Result<ValidatingResultMap<ResourceId, IResource>> {\n const errors = new MessageAggregator();\n\n const resourceMap = new ValidatingResultMap<ResourceId, IResource>({\n converters: new Collections.KeyValueConverters<ResourceId, IResource>({\n key: Convert.resourceId,\n /* c8 ignore next 3 - covered but coverage is confused */\n value: (from: unknown): Result<IResource> => {\n return Validate.resource.validate(from);\n }\n })\n });\n\n for (const compiledResource of compiled.resources) {\n const resourceType = resourceTypes\n .getAt(compiledResource.type)\n .aggregateError(\n errors,\n (message) =>\n `Invalid resource type index ${compiledResource.type} for resource ${compiledResource.id}: ${message}`\n )\n .orDefault();\n\n /* c8 ignore next 3 - defensive coding: resource type index should be valid in compiled data */\n if (resourceType === undefined) {\n continue;\n }\n\n const decision = decisions\n .getAt(compiledResource.decision)\n .aggregateError(\n errors,\n (message) =>\n `Invalid decision index ${compiledResource.decision} for resource ${compiledResource.id}: ${message}`\n )\n .orDefault();\n\n /* c8 ignore next 3 - defensive coding: decision index should be valid in compiled data */\n if (decision === undefined) {\n continue;\n }\n\n // Build candidates from compiled data\n const candidateDecls = mapResults(\n compiledResource.candidates.map((compiledCandidate) =>\n this._getCandidateValue(compiledCandidate.valueIndex)\n .aggregateError(\n errors,\n (message) => `Failed to convert candidate JSON for resource ${compiledResource.id}: ${message}`\n )\n .onSuccess((json) => {\n return succeed({\n json,\n isPartial: compiledCandidate.isPartial,\n mergeMethod: compiledCandidate.mergeMethod\n });\n })\n )\n )\n .aggregateError(\n errors,\n (message) => `Failed to convert candidate JSON for resource ${compiledResource.id}: ${message}`\n )\n .orDefault();\n\n /* c8 ignore next 3 - defensive coding: candidate JSON conversion should not fail with valid compiled data */\n if (candidateDecls === undefined) {\n continue;\n }\n\n // Create minimal candidates that implement IResourceCandidate\n const candidates: IResourceCandidate[] = candidateDecls.map((candidateDecl) => ({\n json: candidateDecl.json,\n isPartial: candidateDecl.isPartial,\n mergeMethod: candidateDecl.mergeMethod\n }));\n\n const candidatesWithConditionSets = decision.candidates.map((baseCandidate, idx) => ({\n conditionSet: baseCandidate.conditionSet,\n value: candidates[idx].json\n }));\n\n const concreteDecision = ConcreteDecision.create({\n decisions,\n candidates: candidatesWithConditionSets\n })\n .aggregateError(\n errors,\n (message) => `Failed to create concrete decision for resource ${compiledResource.id}: ${message}`\n )\n .orDefault();\n\n /* c8 ignore next 3 - defensive coding for ConcreteDecision creation failure */\n if (concreteDecision === undefined) {\n continue;\n }\n\n const name = Helpers.getNameForResourceId(compiledResource.id)\n .aggregateError(\n errors,\n (message) => `Failed to get name for resource ${compiledResource.id}: ${message}`\n )\n .orDefault();\n\n /* c8 ignore next 3 - defensive coding: name should be valid in compiled data */\n if (name === undefined) {\n continue;\n }\n\n // Create minimal resource that implements IResource\n const resource: IResource = {\n id: compiledResource.id,\n name,\n resourceType,\n decision: concreteDecision,\n candidates\n };\n\n resourceMap\n .set(compiledResource.id, resource)\n .aggregateError(errors, (message) => `Failed to add resource ${compiledResource.id}: ${message}`);\n }\n\n return errors.returnOrReport(succeed(resourceMap));\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conditionSetResolutionResult.d.ts","sourceRoot":"","sources":["../../../src/packlets/runtime/conditionSetResolutionResult.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAiB,MAAM,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnE;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,gBAAgB,GAAG,SAAS,CAAC;AAExE;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACrC,QAAQ,CAAC,SAAS,EAAE,kBAAkB,CAAC;IACvC,QAAQ,CAAC,KAAK,EAAE,mBAAmB,CAAC;CACrC;AAED;;;;GAIG;AACH,qBAAa,4BAA4B;IACvC,SAAgB,SAAS,EAAE,kBAAkB,CAAC;IAC9C,SAAgB,OAAO,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;IAE9D;;;;OAIG;IACH,OAAO;IAKP;;;;;;OAMG;WACW,MAAM,CAClB,SAAS,EAAE,kBAAkB,EAC7B,OAAO,EAAE,aAAa,CAAC,qBAAqB,CAAC,GAC5C,MAAM,CAAC,4BAA4B,CAAC;IAIvC;;;;;;;;;;;;;;;;OAgBG;WACW,OAAO,CAAC,CAAC,EAAE,4BAA4B,EAAE,CAAC,EAAE,4BAA4B,GAAG,MAAM;IAgD/F;;;;OAIG;IACH,IAAW,WAAW,IAAI,iBAAiB,CAK1C;IAED;;;;OAIG;IACH,IAAW,UAAU,IAAI,mBAAmB,CAK3C;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conditionSetResolutionResult.js","sourceRoot":"","sources":["../../../src/packlets/runtime/conditionSetResolutionResult.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;AAEH,4CAAsD;AAmBtD;;;;GAIG;AACH,MAAa,4BAA4B;IAIvC;;;;OAIG;IACH,YAAoB,SAA6B,EAAE,OAA6C;QAC9F,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,C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C1F,CAAC;CACF;AApHD,oEAoHC","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport { captureResult, Result } from '@fgv/ts-utils';\nimport { QualifierMatchScore, ConditionPriority } from '../common';\n\n/**\n * The outcome of a condition match.\n * @public\n */\nexport type ConditionMatchType = 'match' | 'matchAsDefault' | 'noMatch';\n\n/**\n * Represents a single condition match result with priority and outcome.\n * @public\n */\nexport interface IConditionMatchResult {\n readonly priority: ConditionPriority;\n readonly matchType: ConditionMatchType;\n readonly score: QualifierMatchScore;\n}\n\n/**\n * Represents the result of resolving a condition set.\n * Contains either a failure indicator or a list of condition priority/score tuples sorted by priority then score.\n * @public\n */\nexport class ConditionSetResolutionResult {\n public readonly matchType: ConditionMatchType;\n public readonly matches: ReadonlyArray<IConditionMatchResult>;\n\n /**\n * Constructor for a {@link Runtime.ConditionSetResolutionResult | ConditionSetResolutionResult}.\n * @param success - Whether the condition set resolution was successful.\n * @param matches - Array of condition match results, if successful.\n */\n private constructor(matchType: ConditionMatchType, matches: ReadonlyArray<IConditionMatchResult>) {\n this.matchType = matchType;\n this.matches = [...matches];\n }\n\n /**\n * Creates a new condition set resolution result.\n * @param matchType - The type of match.\n * @param matches - Array of condition match results.\n * @returns A new {@link Runtime.ConditionSetResolutionResult | ConditionSetResolutionResult}.\n * @public\n */\n public static create(\n matchType: ConditionMatchType,\n matches: ReadonlyArray<IConditionMatchResult>\n ): Result<ConditionSetResolutionResult> {\n return captureResult(() => new ConditionSetResolutionResult(matchType, matches));\n }\n\n /**\n * Compares two condition set resolution results for sorting purposes.\n * The priority of a condition set result cannot be boiled down to a single number -\n * we have to examine each condition result in turn.\n *\n * Comparison logic:\n * - If priority differs, return the higher priority\n * - If priority matches but score is different, return the higher score\n * - If priority and score both match, proceed to the next condition\n * - Failed results are considered lower priority than successful results\n *\n * @param a - The first condition set resolution result to compare.\n * @param b - The second condition set resolution result to compare.\n * @returns A negative number if a should come before b, a positive number if a should\n * come after b, or zero if they are equivalent.\n * @public\n */\n public static compare(a: ConditionSetResolutionResult, b: ConditionSetResolutionResult): number {\n // Failed results are always lower priority than default match which are lower than match\n if (a.matchType === 'match') {\n if (b.matchType !== 'match') return -1;\n } else if (a.matchType === 'matchAsDefault') {\n /* c8 ignore next 5 - edge case comparison for matchAsDefault rarely hit in practice */\n if (b.matchType === 'match') {\n return 1;\n } else if (b.matchType === 'noMatch') {\n return -1;\n }\n } else {\n /* c8 ignore next 7 - edge case comparison for noMatch rarely hit in practice */\n // a.matchType === 'noMatch'\n if (b.matchType === 'noMatch') {\n return 0;\n } else {\n return 1; // noMatch comes after any other match type\n }\n }\n\n // Both are successful with the same match type - compare condition by condition\n const minLength = Math.min(a.matches.length, b.matches.length);\n\n for (let i = 0; i < minLength; i++) {\n const matchA = a.matches[i];\n const matchB = b.matches[i];\n\n // Compare priority first\n const priorityDiff = matchB.priority - matchA.priority;\n if (priorityDiff !== 0) {\n return priorityDiff;\n }\n\n // If priority matches, compare score\n const scoreDiff = matchB.score - matchA.score;\n /* c8 ignore next 3 - edge case: score comparison when priorities are equal */\n if (scoreDiff !== 0) {\n return scoreDiff;\n }\n\n // If both priority and score match, continue to next condition\n }\n\n // If all compared conditions are equal, the one with more conditions wins\n return b.matches.length - a.matches.length;\n }\n\n /**\n * Gets the highest priority among all condition matches.\n * @returns The highest priority, or 0 if no matches.\n * @public\n */\n public get maxPriority(): ConditionPriority {\n if (this.matchType === 'noMatch' || this.matches.length === 0) {\n return 0 as ConditionPriority;\n }\n return Math.max(...this.matches.map((m) => m.priority)) as ConditionPriority;\n }\n\n /**\n * Gets the total score by summing all condition match scores.\n * @returns The total score, or 0 if no matches.\n * @public\n */\n public get totalScore(): QualifierMatchScore {\n if (this.matchType === 'noMatch' || this.matches.length === 0) {\n return 0 as QualifierMatchScore;\n }\n return this.matches.reduce((sum, match) => sum + match.score, 0) as QualifierMatchScore;\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contextQualifierProvider.d.ts","sourceRoot":"","sources":["../../../../src/packlets/runtime/context/contextQualifierProvider.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACpF,OAAO,EAAE,2BAA2B,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE1E;;;;;GAKG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;;;;OAKG;IACH,GAAG,CAAC,sBAAsB,EAAE,aAAa,GAAG,cAAc,GAAG,SAAS,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC;IAEvG;;;;;OAKG;IACH,YAAY,CACV,sBAAsB,EAAE,aAAa,GAAG,cAAc,GAAG,SAAS,GACjE,MAAM,CAAC,qBAAqB,CAAC,CAAC;IAEjC;;;;;OAKG;IACH,GAAG,CAAC,IAAI,EAAE,aAAa,GAA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;CACjE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contextQualifierProvider.js","sourceRoot":"","sources":["../../../../src/packlets/runtime/context/contextQualifierProvider.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;AA0GH;;;;GAIG;AACH,MAAsB,wBAAwB;CAwC7C;AAxCD,4DAwCC","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport { Result } from '@fgv/ts-utils';\nimport { QualifierName, QualifierContextValue, QualifierIndex } from '../../common';\nimport { IReadOnlyQualifierCollector, Qualifier } from '../../qualifiers';\n\n/**\n * Base interface for providing qualifier values in an optimized runtime context.\n * Contains common read-only operations shared by both mutable and immutable providers.\n * Acts as a property bag using the Result pattern for qualifier value lookups.\n * @public\n */\nexport interface IContextQualifierProviderBase {\n /**\n * Gets a qualifier value by its name, index, or qualifier object.\n * @param nameOrIndexOrQualifier - The {@link QualifierName | qualifier name}, {@link QualifierIndex | index}, or {@link Qualifiers.Qualifier | qualifier object} to look up.\n * @returns `Success` with the {@link QualifierContextValue | qualifier context value} if found,\n * or `Failure` with an error message if not found or an error occurs.\n */\n get(nameOrIndexOrQualifier: QualifierName | QualifierIndex | Qualifier): Result<QualifierContextValue>;\n\n /**\n * Gets a validated qualifier context value by its name, index, or qualifier object.\n * @param nameOrIndexOrQualifier - The {@link QualifierName | qualifier name}, {@link QualifierIndex | index}, or {@link Qualifiers.Qualifier | qualifier object} to look up.\n * @returns `Success` with the validated {@link QualifierContextValue | qualifier context value} if found,\n * or `Failure` with an error message if not found, invalid, or an error occurs.\n */\n getValidated(\n nameOrIndexOrQualifier: QualifierName | QualifierIndex | Qualifier\n ): Result<QualifierContextValue>;\n\n /**\n * Checks if a qualifier value exists with the given name.\n * @param name - The {@link QualifierName | qualifier name} to check.\n * @returns `Success` with `true` if the qualifier value exists, `false` if it doesn't,\n * or `Failure` with an error message if an error occurs during the check.\n */\n has(name: QualifierName): Result<boolean>;\n\n /**\n * Gets all available qualifier names in this context.\n * @returns `Success` with an array of all {@link QualifierName | qualifier names},\n * or `Failure` with an error message if an error occurs.\n */\n getNames(): Result<ReadonlyArray<QualifierName>>;\n\n /**\n * The readonly qualifier collector that defines and validates the qualifiers for this context.\n */\n readonly qualifiers: IReadOnlyQualifierCollector;\n}\n\n/**\n * Read-only interface for providing qualifier values in an optimized runtime context.\n * Explicitly marked as immutable with compile-time type discrimination.\n * @public\n */\nexport interface IReadOnlyContextQualifierProvider extends IContextQualifierProviderBase {\n /**\n * Explicit mutability marker for compile-time type discrimination.\n * Always `false` for read-only providers.\n */\n readonly mutable: false;\n}\n\n/**\n * Mutable interface for providing qualifier values in an optimized runtime context.\n * Extends the base interface with mutation operations and explicit mutability marker.\n * @public\n */\nexport interface IMutableContextQualifierProvider extends IContextQualifierProviderBase {\n /**\n * Explicit mutability marker for compile-time type discrimination.\n * Always `true` for mutable providers.\n */\n readonly mutable: true;\n /**\n * Sets a qualifier value in this provider.\n * @param name - The {@link QualifierName | qualifier name} to set.\n * @param value - The {@link QualifierContextValue | qualifier context value} to set.\n * @returns `Success` with the set {@link QualifierContextValue | qualifier context value} if successful,\n * or `Failure` with an error message if not.\n */\n set(name: QualifierName, value: QualifierContextValue): Result<QualifierContextValue>;\n\n /**\n * Removes a qualifier value from this provider.\n * @param name - The {@link QualifierName | qualifier name} to remove.\n * @returns `Success` with the removed {@link QualifierContextValue | qualifier context value} if successful,\n * or `Failure` with an error message if not found or an error occurs.\n */\n remove(name: QualifierName): Result<QualifierContextValue>;\n\n /**\n * Clears all qualifier values from this provider.\n */\n clear(): void;\n}\n\n/**\n * Union type for context qualifier providers that can be either read-only or mutable.\n * Provides compile-time type discrimination via the `mutable` property.\n * @public\n */\nexport type IContextQualifierProvider = IReadOnlyContextQualifierProvider | IMutableContextQualifierProvider;\n\n/**\n * Abstract base class for implementing context qualifier providers.\n * Provides common functionality and enforces the contract for derived classes.\n * @public\n */\nexport abstract class ContextQualifierProvider implements IContextQualifierProviderBase {\n /**\n * The readonly qualifier collector that defines and validates the qualifiers for this context.\n */\n public abstract readonly qualifiers: IReadOnlyQualifierCollector;\n\n /**\n * Gets a qualifier value by its name, index, or qualifier object.\n * @param nameOrIndexOrQualifier - The {@link QualifierName | qualifier name}, {@link QualifierIndex | index}, or {@link Qualifiers.Qualifier | qualifier object} to look up.\n * @returns `Success` with the {@link QualifierContextValue | qualifier context value} if found,\n * or `Failure` with an error message if not found or an error occurs.\n */\n public abstract get(\n nameOrIndexOrQualifier: QualifierName | QualifierIndex | Qualifier\n ): Result<QualifierContextValue>;\n\n /**\n * Gets a validated qualifier context value by its name, index, or qualifier object.\n * @param nameOrIndexOrQualifier - The {@link QualifierName | qualifier name}, {@link QualifierIndex | index}, or {@link Qualifiers.Qualifier | qualifier object} to look up.\n * @returns `Success` with the validated {@link QualifierContextValue | qualifier context value} if found,\n * or `Failure` with an error message if not found, invalid, or an error occurs.\n */\n public abstract getValidated(\n nameOrIndexOrQualifier: QualifierName | QualifierIndex | Qualifier\n ): Result<QualifierContextValue>;\n\n /**\n * Checks if a qualifier value exists with the given name.\n * @param name - The {@link QualifierName | qualifier name} to check.\n * @returns `Success` with `true` if the qualifier value exists, `false` if it doesn't,\n * or `Failure` with an error message if an error occurs during the check.\n */\n public abstract has(name: QualifierName): Result<boolean>;\n\n /**\n * Gets all available qualifier names in this context.\n * @returns `Success` with an array of all {@link QualifierName | qualifier names},\n * or `Failure` with an error message if an error occurs.\n */\n public abstract getNames(): Result<ReadonlyArray<QualifierName>>;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contextQualifierProviderValidator.d.ts","sourceRoot":"","sources":["../../../../src/packlets/runtime/context/contextQualifierProviderValidator.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,MAAM,EAA6B,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAA+B,MAAM,cAAc,CAAC;AAClF,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EACL,yBAAyB,EACzB,iCAAiC,EACjC,gCAAgC,EACjC,MAAM,4BAA4B,CAAC;AAEpC;;;;GAIG;AACH,MAAM,WAAW,sCAAsC,CACrD,CAAC,SAAS,yBAAyB,GAAG,yBAAyB;IAE/D;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,2BAA2B,CAAC;IAEjD;;;;;OAKG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC;IAEjD;;;;;OAKG;IACH,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC;IAEzD;;;;;OAKG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC;IAE1D;;;;;OAKG;IACH,m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AC,CAAC,CAAC,SAAS,CACpF,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CACnB,CAAC;QACJ,CAAC,CAAC,CACH,CACF,CACF,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,IAAY;QACxB,OAAO,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,aAAa,EAAE,EAAE;YAC9E,OAAO,IAAA,wBAAa,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC;QAChG,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AApDD,4FAoDC","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport { Result, captureResult, Converters } from '@fgv/ts-utils';\nimport { QualifierContextValue, Convert as CommonConverters } from '../../common';\nimport { IReadOnlyQualifierCollector } from '../../qualifiers';\nimport {\n IContextQualifierProvider,\n IReadOnlyContextQualifierProvider,\n IMutableContextQualifierProvider\n} from './contextQualifierProvider';\n\n/**\n * Base interface for shared operations between read-only and mutable context qualifier provider validators.\n * Contains common methods that don't depend on provider mutability.\n * @public\n */\nexport interface IContextQualifierProviderValidatorBase<\n T extends IContextQualifierProvider = IContextQualifierProvider\n> {\n /**\n * The wrapped context qualifier provider.\n */\n readonly provider: T;\n\n /**\n * The readonly qualifier collector that defines and validates the qualifiers for this context.\n */\n readonly qualifiers: IReadOnlyQualifierCollector;\n\n /**\n * Gets a qualifier value by its string name, converting to strongly-typed QualifierName.\n * @param name - The string name to convert and look up.\n * @returns `Success` with the {@link QualifierContextValue | qualifier context value} if found,\n * or `Failure` with an error message if not found or an error occurs.\n */\n get(name: string): Result<QualifierContextValue>;\n\n /**\n * Gets a qualifier value by its number index, converting to strongly-typed QualifierIndex.\n * @param index - The number index to convert and look up.\n * @returns `Success` with the {@link QualifierContextValue | qualifier context value} if found,\n * or `Failure` with an error message if not found or an error occurs.\n */\n getByIndex(index: number): Result<QualifierContextValue>;\n\n /**\n * Gets a validated qualifier context value by its string name.\n * @param name - The string name to convert and look up.\n * @returns `Success` with the validated {@link QualifierContextValue | qualifier context value} if found,\n * or `Failure` with an error message if not found, invalid, or an error occurs.\n */\n getValidated(name: string): Result<QualifierContextValue>;\n\n /**\n * Gets a validated qualifier context value by its number index.\n * @param index - The number index to convert and look up.\n * @returns `Success` with the validated {@link QualifierContextValue | qualifier context value} if found,\n * or `Failure` with an error message if not found, invalid, or an error occurs.\n */\n getValidatedByIndex(index: number): Result<QualifierContextValue>;\n\n /**\n * Checks if a qualifier value exists with the given string name.\n * @param name - The string name to convert and check.\n * @returns `Success` with `true` if the qualifier value exists, `false` if it doesn't,\n * or `Failure` with an error message if an error occurs during the check.\n */\n has(name: string): Result<boolean>;\n}\n\n/**\n * A read-only interface for validators wrapping read-only context qualifier providers.\n * Only exposes read operations, providing compile-time type safety by excluding mutation methods.\n * @public\n */\nexport interface IReadOnlyContextQualifierProviderValidator<\n T extends IReadOnlyContextQualifierProvider = IReadOnlyContextQualifierProvider\n> {\n /**\n * The wrapped read-only context qualifier provider.\n */\n readonly provider: T;\n}\n\n/**\n * A mutable interface for validators wrapping mutable context qualifier providers.\n * Extends the base interface with mutation operations and provides compile-time type safety.\n * @public\n */\nexport interface IMutableContextQualifierProviderValidator<\n T extends IMutableContextQualifierProvider = IMutableContextQualifierProvider\n> extends IContextQualifierProviderValidatorBase<T> {\n /**\n * The wrapped mutable context qualifier provider.\n */\n readonly provider: T;\n\n /**\n * Sets a qualifier value using string inputs, converting to strongly-typed values.\n * @param name - The string name to convert.\n * @param value - The string value to convert.\n * @returns `Success` with the set {@link QualifierContextValue | qualifier context value} if successful,\n * or `Failure` with an error message if an error occurs.\n */\n set(name: string, value: string): Result<QualifierContextValue>;\n\n /**\n * Removes a qualifier value using string input, converting to strongly-typed QualifierName.\n * @param name - The string name to convert.\n * @returns `Success` with the removed {@link QualifierContextValue | qualifier context value} if successful,\n * or `Failure` with an error message if an error occurs.\n */\n remove(name: string): Result<QualifierContextValue>;\n}\n\n/**\n * Parameters for constructing a read-only context qualifier provider validator.\n * @public\n */\nexport interface IReadOnlyContextQualifierProviderValidatorCreateParams<\n T extends IReadOnlyContextQualifierProvider = IReadOnlyContextQualifierProvider\n> {\n provider: T;\n}\n\n/**\n * Parameters for constructing a mutable context qualifier provider validator.\n * @public\n */\nexport interface IMutableContextQualifierProviderValidatorCreateParams<\n T extends IMutableContextQualifierProvider = IMutableContextQualifierProvider\n> {\n provider: T;\n}\n\n/**\n * Union type for validator constructor parameters.\n * @public\n */\nexport type IContextQualifierProviderValidatorCreateParams =\n | IReadOnlyContextQualifierProviderValidatorCreateParams\n | IMutableContextQualifierProviderValidatorCreateParams;\n\n/**\n * Base implementation class containing shared validation logic for both read-only and mutable validators.\n * @internal\n */\nabstract class BaseContextQualifierProviderValidator<\n T extends IContextQualifierProvider = IContextQualifierProvider\n> implements IContextQualifierProviderValidatorBase<T>\n{\n /**\n * The wrapped context qualifier provider.\n */\n public abstract readonly provider: T;\n\n /**\n * The readonly qualifier collector that defines and validates the qualifiers for this context.\n */\n public get qualifiers(): IReadOnlyQualifierCollector {\n return this.provider.qualifiers;\n }\n\n /**\n * Gets a qualifier value by its string name, converting to strongly-typed QualifierName.\n * @param name - The string name to convert and look up.\n * @returns `Success` with the {@link QualifierContextValue | qualifier context value} if found,\n * or `Failure` with an error message if not found or an error occurs.\n */\n public get(name: string): Result<QualifierContextValue> {\n return CommonConverters.qualifierName.convert(name).onSuccess((qualifierName) => {\n return this.provider.get(qualifierName);\n });\n }\n\n /**\n * Gets a qualifier value by its number index, converting to strongly-typed QualifierIndex.\n * @param index - The number index to convert and look up.\n * @returns `Success` with the {@link QualifierContextValue | qualifier context value} if found,\n * or `Failure` with an error message if not found or an error occurs.\n */\n public getByIndex(index: number): Result<QualifierContextValue> {\n return CommonConverters.qualifierIndex.convert(index).onSuccess((qualifierIndex) => {\n return this.provider.get(qualifierIndex);\n });\n }\n\n /**\n * Gets a validated qualifier context value by its string name.\n * @param name - The string name to convert and look up.\n * @returns `Success` with the validated {@link QualifierContextValue | qualifier context value} if found,\n * or `Failure` with an error message if not found, invalid, or an error occurs.\n */\n public getValidated(name: string): Result<QualifierContextValue> {\n return CommonConverters.qualifierName.convert(name).onSuccess((qualifierName) => {\n return this.provider.getValidated(qualifierName);\n });\n }\n\n /**\n * Gets a validated qualifier context value by its number index.\n * @param index - The number index to convert and look up.\n * @returns `Success` with the validated {@link QualifierContextValue | qualifier context value} if found,\n * or `Failure` with an error message if not found, invalid, or an error occurs.\n */\n public getValidatedByIndex(index: number): Result<QualifierContextValue> {\n return CommonConverters.qualifierIndex.convert(index).onSuccess((qualifierIndex) => {\n return this.provider.getValidated(qualifierIndex);\n });\n }\n\n /**\n * Checks if a qualifier value exists with the given string name.\n * @param name - The string name to convert and check.\n * @returns `Success` with `true` if the qualifier value exists, `false` if it doesn't,\n * or `Failure` with an error message if an error occurs during the check.\n */\n public has(name: string): Result<boolean> {\n return CommonConverters.qualifierName.convert(name).onSuccess((qualifierName) => {\n return this.provider.has(qualifierName);\n });\n }\n}\n\n/**\n * A validator for read-only context qualifier providers that accepts string inputs\n * and converts them to strongly-typed values before calling the wrapped provider.\n * Only provides read operations for compile-time type safety.\n * @public\n */\nexport class ReadOnlyContextQualifierProviderValidator<\n T extends IReadOnlyContextQualifierProvider = IReadOnlyContextQualifierProvider\n >\n extends BaseContextQualifierProviderValidator<T>\n implements IReadOnlyContextQualifierProviderValidator<T>\n{\n /**\n * The wrapped read-only context qualifier provider.\n */\n public readonly provider: T;\n\n /**\n * Constructs a new {@link Runtime.Context.ReadOnlyContextQualifierProviderValidator | ReadOnlyContextQualifierProviderValidator}.\n * @param params - Required parameters for constructing the validator.\n */\n public constructor(params: IReadOnlyContextQualifierProviderValidatorCreateParams<T>) {\n super();\n this.provider = params.provider;\n }\n}\n\n/**\n * A validator for mutable context qualifier providers that accepts string inputs\n * and converts them to strongly-typed values before calling the wrapped provider.\n * Provides both read and mutation operations.\n * @public\n */\nexport class MutableContextQualifierProviderValidator<\n T extends IMutableContextQualifierProvider = IMutableContextQualifierProvider\n >\n extends BaseContextQualifierProviderValidator<T>\n implements IMutableContextQualifierProviderValidator<T>\n{\n /**\n * The wrapped mutable context qualifier provider.\n */\n public readonly provider: T;\n\n /**\n * Constructs a new {@link Runtime.Context.MutableContextQualifierProviderValidator | MutableContextQualifierProviderValidator}.\n * @param params - Required parameters for constructing the validator.\n */\n public constructor(params: IMutableContextQualifierProviderValidatorCreateParams<T>) {\n super();\n this.provider = params.provider;\n }\n\n /**\n * Sets a qualifier value using string inputs, converting to strongly-typed values.\n * @param name - The string name to convert.\n * @param value - The string value to convert.\n * @returns `Success` with the set {@link QualifierContextValue | qualifier context value} if successful,\n * or `Failure` with an error message if an error occurs.\n */\n public set(name: string, value: string): Result<QualifierContextValue> {\n return CommonConverters.qualifierName.convert(name).onSuccess((qualifierName) =>\n this.provider.qualifiers.validating.get(name).asResult.onSuccess((qualifier) =>\n Converters.string.convert(value).onSuccess((stringValue) =>\n qualifier.validateContextValue(stringValue).onSuccess((qualifierValue) => {\n return captureResult(() => this.provider.set(qualifierName, qualifierValue)).onSuccess(\n (result) => result\n );\n })\n )\n )\n );\n }\n\n /**\n * Removes a qualifier value using string input, converting to strongly-typed QualifierName.\n * @param name - The string name to convert.\n * @returns `Success` with the removed {@link QualifierContextValue | qualifier context value} if successful,\n * or `Failure` with an error message if an error occurs.\n */\n public remove(name: string): Result<QualifierContextValue> {\n return CommonConverters.qualifierName.convert(name).onSuccess((qualifierName) => {\n return captureResult(() => this.provider.remove(qualifierName)).onSuccess((result) => result);\n });\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/packlets/runtime/context/index.ts"],"names":[],"mappings":"AAsBA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qCAAqC,CAAC;AACpD,cAAc,kCAAkC,CAAC;AACjD,cAAc,4CAA4C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/packlets/runtime/context/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;AAEH,6DAA2C;AAC3C,sEAAoD;AACpD,mEAAiD;AACjD,6EAA2D","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nexport * from './contextQualifierProvider';\nexport * from './contextQualifierProviderValidator';\nexport * from './simpleContextQualifierProvider';\nexport * from './validatingSimpleContextQualifierProvider';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simpleContextQualifierProvider.d.ts","sourceRoot":"","sources":["../../../../src/packlets/runtime/context/simpleContextQualifierProvider.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,MAAM,EAAoE,MAAM,eAAe,CAAC;AACzG,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,cAAc,EAGf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,2BAA2B,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,wBAAwB,EAAE,gCAAgC,EAAE,MAAM,4BAA4B,CAAC;AAExG;;;GAGG;AACH,MAAM,WAAW,2CAA2C;IAC1D;;OAEG;IACH,UAAU,EAAE,2BAA2B,CAAC;IAExC;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;CACzD;AAED;;;;GAIG;AACH,qBAAa,8BACX,SAAQ,wBACR,YAAW,gCAAgC;IAE3C;;;OAGG;IACH,SAAgB,OAAO,EAAE,IAAI,CAAiB;IAE9C;;OAEG;IACH,SAAgB,UAAU,EAAE,2BAA2B,CAAC;IAExD;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAkD;IAEnF;;;OAGG;IACH,SAAS,aAAa,MAAM,EAAE,2CAA2C;IAazE;;;;;;OAMG;WACW,MAAM,CAClB,MAAM,EAAE,2CAA2C,GAClD,MAAM,CAAC,8BAA8B,CAAC;IAIzC;;;;;OAKG;IACI,GAAG,CACR,sBAAsB,EAAE,aAAa,GAAG,cAAc,GAAG,SAAS,GACjE,MAAM,CAAC,qBAAqB,CAAC;IAMhC;;;;;;OAMG;IACI,YAAY,CACjB,sBAAsB,EAAE,aAAa,GAAG,cAAc,GAAG,SAAS,GACjE,MAAM,CAAC,qBAAqB,CAAC;IAQhC;;;;;OAKG;IACI,GAAG,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC;IAIhD;;;;OAIG;IACI,QAAQ,IAAI,MAAM,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;IAIvD;;;;;;;OAOG;IACI,GAAG,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,qBAAqB,GAAG,MAAM,CAAC,qBAAqB,CAAC;IAK5F;;;;;;OAMG;IACI,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAAC,qBAAqB,CAAC;IAOjE;;;;OAIG;IACH,IAAW,IAAI,IAAI,MAAM,CAExB;IAED;;;OAGG;IACI,KAAK,IAAI,IAAI;IAIpB;;;;;;OAMG;IACH,OAAO,CAAC,iBAAiB;IAwBzB;;;;;;OAMG;IACH,OAAO,CAAC,qBAAqB;IAM7B;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,CAAC,+BAA+B;CAc/C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simpleContextQualifierProvider.js","sourceRoot":"","sources":["../../../../src/packlets/runtime/context/simpleContextQualifierProvider.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;AAEH,4CAAyG;AACzG,yCAMsB;A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ACV,MAAM,IAAI,CAAC;YACX,OAAQ,CAA6B,CAAC,IAAI,KAAK,QAAQ,CAC1D;aACE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;aAC1D,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACrC,CAAC;CACF;AAjND,wEAiNC","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport { Result, ResultMap, captureResult, succeed, succeedWithDetail, Converters } from '@fgv/ts-utils';\nimport {\n QualifierName,\n QualifierContextValue,\n QualifierIndex,\n Validate,\n Convert as CommonConverters\n} from '../../common';\nimport { IReadOnlyQualifierCollector, Qualifier } from '../../qualifiers';\nimport { ContextQualifierProvider, IMutableContextQualifierProvider } from './contextQualifierProvider';\n\n/**\n * Parameters for creating a {@link Runtime.SimpleContextQualifierProvider | SimpleContextQualifierProvider}.\n * @public\n */\nexport interface ISimpleContextQualifierProviderCreateParams {\n /**\n * The {@link Qualifiers.IReadOnlyQualifierCollector | readonly qualifier collector} that defines and validates qualifiers.\n */\n qualifiers: IReadOnlyQualifierCollector;\n\n /**\n * Optional record of initial qualifier name-value pairs to populate the provider.\n */\n qualifierValues?: Record<string, QualifierContextValue>;\n}\n\n/**\n * Simple concrete implementation of {@link Runtime.Context.IContextQualifierProvider | IContextQualifierProvider}\n * using a `ResultMap` for qualifier value storage.\n * @public\n */\nexport class SimpleContextQualifierProvider\n extends ContextQualifierProvider\n implements IMutableContextQualifierProvider\n{\n /**\n * Explicit mutability marker for compile-time type discrimination.\n * Always `true` for mutable providers.\n */\n public readonly mutable: true = true as const;\n\n /**\n * The readonly qualifier collector that defines and validates the qualifiers for this context.\n */\n public readonly qualifiers: IReadOnlyQualifierCollector;\n\n /**\n * Internal storage for qualifier values using a ResultMap.\n */\n private readonly _qualifierValues: ResultMap<QualifierName, QualifierContextValue>;\n\n /**\n * Constructor for a {@link Runtime.SimpleContextQualifierProvider | SimpleContextQualifierProvider} object.\n * @param params - {@link Runtime.ISimpleContextQualifierProviderCreateParams | Parameters} used to create the provider.\n */\n protected constructor(params: ISimpleContextQualifierProviderCreateParams) {\n super();\n this.qualifiers = params.qualifiers;\n this._qualifierValues = new ResultMap<QualifierName, QualifierContextValue>();\n\n if (params.qualifierValues) {\n for (const [name, value] of Object.entries(params.qualifierValues)) {\n const qualifierName = Validate.toQualifierName(name).orThrow();\n this._qualifierValues.set(qualifierName, value);\n }\n }\n }\n\n /**\n * Creates a new {@link Runtime.SimpleContextQualifierProvider | SimpleContextQualifierProvider} object.\n * @param params - {@link Runtime.ISimpleContextQualifierProviderCreateParams | Parameters} used to create the provider.\n * @returns `Success` with the new {@link Runtime.SimpleContextQualifierProvider | SimpleContextQualifierProvider} object if successful,\n * or `Failure` with an error message if not.\n * @public\n */\n public static create(\n params: ISimpleContextQualifierProviderCreateParams\n ): Result<SimpleContextQualifierProvider> {\n return captureResult(() => new SimpleContextQualifierProvider(params));\n }\n\n /**\n * Gets a qualifier value by its name, index, or qualifier object.\n * @param nameOrIndexOrQualifier - The {@link QualifierName | qualifier name}, {@link QualifierIndex | index}, or {@link Qualifiers.Qualifier | qualifier object} to look up.\n * @returns `Success` with the {@link QualifierContextValue | qualifier context value} if found,\n * or `Failure` with an error message if not found or an error occurs.\n */\n public get(\n nameOrIndexOrQualifier: QualifierName | QualifierIndex | Qualifier\n ): Result<QualifierContextValue> {\n return this._resolveQualifierName(nameOrIndexOrQualifier).onSuccess((qualifierName) => {\n return this._qualifierValues.get(qualifierName);\n });\n }\n\n /**\n * Gets a validated qualifier context value by its name, index, or qualifier object.\n * TODO: Implement validation logic using qualifier collectors.\n * @param nameOrIndexOrQualifier - The {@link QualifierName | qualifier name}, {@link QualifierIndex | index}, or {@link Qualifiers.Qualifier | qualifier object} to look up.\n * @returns `Success` with the validated {@link QualifierContextValue | qualifier context value} if found,\n * or `Failure` with an error message if not found, invalid, or an error occurs.\n */\n public getValidated(\n nameOrIndexOrQualifier: QualifierName | QualifierIndex | Qualifier\n ): Result<QualifierContextValue> {\n return this._resolveQualifier(nameOrIndexOrQualifier).onSuccess((qualifier) => {\n return this._qualifierValues.get(qualifier.name).asResult.onSuccess((value) => {\n return qualifier.validateContextValue(value);\n });\n });\n }\n\n /**\n * Checks if a qualifier value exists with the given name.\n * @param name - The {@link QualifierName | qualifier name} to check.\n * @returns `Success` with `true` if the qualifier value exists, `false` if it doesn't,\n * or `Failure` with an error message if an error occurs during the check.\n */\n public has(name: QualifierName): Result<boolean> {\n return succeed(this._qualifierValues.has(name));\n }\n\n /**\n * Gets all available qualifier names in this context.\n * @returns `Success` with an array of all {@link QualifierName | qualifier names},\n * or `Failure` with an error message if an error occurs.\n */\n public getNames(): Result<ReadonlyArray<QualifierName>> {\n return succeed(Array.from(this._qualifierValues.keys()));\n }\n\n /**\n * Sets a qualifier value in this provider.\n * @param name - The {@link QualifierName | qualifier name} to set.\n * @param value - The {@link QualifierContextValue | qualifier context value} to set.\n * @returns `Success` with the set {@link QualifierContextValue | qualifier context value} if successful,\n * or `Failure` with an error message if not.\n * @public\n */\n public set(name: QualifierName, value: QualifierContextValue): Result<QualifierContextValue> {\n this._qualifierValues.set(name, value);\n return succeed(value);\n }\n\n /**\n * Removes a qualifier value from this provider.\n * @param name - The {@link QualifierName | qualifier name} to remove.\n * @returns `Success` with the removed {@link QualifierContextValue | qualifier context value} if successful,\n * or `Failure` with an error message if not found or an error occurs.\n * @public\n */\n public remove(name: QualifierName): Result<QualifierContextValue> {\n return this._qualifierValues.get(name).onSuccess((value) => {\n this._qualifierValues.delete(name);\n return succeedWithDetail(value, 'success');\n });\n }\n\n /**\n * Gets the number of qualifier values in this provider.\n * @returns The count of qualifier values.\n * @public\n */\n public get size(): number {\n return this._qualifierValues.size;\n }\n\n /**\n * Clears all qualifier values from this provider.\n * @public\n */\n public clear(): void {\n this._qualifierValues.clear();\n }\n\n /**\n * Resolves a qualifier from a name, index, or qualifier object.\n * @param nameOrIndexOrQualifier - The input to resolve.\n * @returns `Success` with the {@link Qualifier | qualifier} if successful,\n * or `Failure` with an error message if not found or invalid.\n * @internal\n */\n private _resolveQualifier(\n nameOrIndexOrQualifier: QualifierName | QualifierIndex | Qualifier\n ): Result<Qualifier> {\n if (nameOrIndexOrQualifier instanceof Qualifier) {\n return succeed(nameOrIndexOrQualifier);\n }\n /* c8 ignore next 16 - functional code tested but coverage intermittently missed */\n if (typeof nameOrIndexOrQualifier === 'string') {\n return this.qualifiers.validating\n .get(nameOrIndexOrQualifier)\n .withErrorFormat((error) => `${nameOrIndexOrQualifier}: invalid qualifier name.`);\n }\n\n if (typeof nameOrIndexOrQualifier === 'number') {\n return this.qualifiers\n .getAt(nameOrIndexOrQualifier)\n .withErrorFormat((error) => `${nameOrIndexOrQualifier}: invalid qualifier index.`);\n }\n\n return SimpleContextQualifierProvider._qualifierNameFromQualifierLike(nameOrIndexOrQualifier)\n .onSuccess((qualifierName) => this.qualifiers.validating.get(qualifierName))\n .withErrorFormat((error) => `${nameOrIndexOrQualifier}: invalid Qualifier, name or index.`);\n }\n\n /**\n * Resolves a qualifier name from a name, index, or qualifier object.\n * @param nameOrIndexOrQualifier - The input to resolve.\n * @returns `Success` with the {@link QualifierName | qualifier name} if successful,\n * or `Failure` with an error message if not found or invalid.\n * @internal\n */\n private _resolveQualifierName(\n nameOrIndexOrQualifier: QualifierName | QualifierIndex | Qualifier\n ): Result<QualifierName> {\n return this._resolveQualifier(nameOrIndexOrQualifier).onSuccess((qualifier) => succeed(qualifier.name));\n }\n\n /**\n * Resolves a qualifier name from a qualifier-like object.\n * @param nameOrIndexOrQualifier - The input to resolve.\n * @returns `Success` with the {@link QualifierName | qualifier name} if successful,\n * or `Failure` with an error message if not found or invalid.\n * @internal\n */\n private static _qualifierNameFromQualifierLike(\n nameOrIndexOrQualifier: QualifierName | QualifierIndex | Qualifier\n ): Result<QualifierName> {\n return Converters.isA(\n 'Qualifier-like object',\n (v): v is { name: QualifierName } =>\n typeof v === 'object' &&\n v !== null &&\n 'name' in v &&\n typeof (v as Record<string, unknown>).name === 'string'\n )\n .map((v) => CommonConverters.qualifierName.convert(v.name))\n .convert(nameOrIndexOrQualifier);\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validatingSimpleContextQualifierProvider.d.ts","sourceRoot":"","sources":["../../../../src/packlets/runtime/context/validatingSimpleContextQualifierProvider.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,MAAM,EAAiB,MAAM,eAAe,CAAC;AAEtD,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EACL,yCAAyC,EAE1C,MAAM,qCAAqC,CAAC;AAE7C;;;GAGG;AACH,MAAM,WAAW,qDAAqD;IACpE;;OAEG;IACH,UAAU,EAAE,2BAA2B,CAAC;IAExC;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC1C;AAED;;;;;;GAMG;AACH,qBAAa,wCAAyC,SAAQ,8BAA8B;IAC1F;;;OAGG;IACH,SAAgB,UAAU,EAAE,yCAAyC,CAAC;IAEtE;;;OAGG;IACH,SAAS,aAAa,MAAM,EAAE,qDAAqD;IAiBnF;;;;;;OAMG;WACW,MAAM,CAClB,MAAM,EAAE,qDAAqD,GAC5D,MAAM,CAAC,wCAAwC,CAAC;CAGpD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validatingSimpleContextQualifierProvider.js","sourceRoot":"","sources":["../../../../src/packlets/runtime/context/validatingSimpleContextQualifierProvider.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;AAEH,4CAAsD;AAGtD,qFAAkF;AAClF,2FAG6C;AAmB7C;;;;;;GAMG;AACH,MAAa,wCAAyC,SAAQ,+DAA8B;IAO1F;;;OAGG;IACH,YAAsB,MAA6D;QACjF,oEAAoE;QACpE,uFAAuF;QACvF,MAAM,eAAe,GAAsD,MAAM,CAAC,eAAe;YAC/F,CAAC,CAAC,MAAM,CAAC,WAAW,CAChB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,KAA8B,CAAC,CAAC,CACpG;YACH,CAAC,CAAC,SAAS,CAAC;QAEd,KAAK,CAAC;YACJ,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,eAAe,EAAE,eAAe;SACjC,CAAC,CAAC;QAEH,IAAI,CAAC,UAAU,GAAG,IAAI,4EAAwC,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IACrF,CAAC;IAED;;;;;;OAMG;IACI,MAAM,CAAC,MAAM,CAClB,MAA6D;QAE7D,OAAO,IAAA,wBAAa,EAAC,GAAG,EAAE,CAAC,IAAI,wCAAwC,CAAC,MAAM,CAAC,CAAC,CAAC;IACnF,CAAC;CACF;AAxCD,4FAwCC","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport { Result, captureResult } from '@fgv/ts-utils';\nimport { QualifierContextValue } from '../../common';\nimport { IReadOnlyQualifierCollector } from '../../qualifiers';\nimport { SimpleContextQualifierProvider } from './simpleContextQualifierProvider';\nimport {\n IMutableContextQualifierProviderValidator,\n MutableContextQualifierProviderValidator\n} from './contextQualifierProviderValidator';\n\n/**\n * Parameters for creating a {@link Runtime.ValidatingSimpleContextQualifierProvider | ValidatingSimpleContextQualifierProvider}.\n * @public\n */\nexport interface IValidatingSimpleContextQualifierProviderCreateParams {\n /**\n * The {@link Qualifiers.IReadOnlyQualifierCollector | readonly qualifier collector} that defines and validates qualifiers.\n */\n qualifiers: IReadOnlyQualifierCollector;\n\n /**\n * Optional record of initial qualifier name-value pairs to populate the provider.\n * Accepts string keys and values which will be converted to strongly-typed values.\n */\n qualifierValues?: Record<string, string>;\n}\n\n/**\n * A {@link Runtime.SimpleContextQualifierProvider | SimpleContextQualifierProvider} with a\n * {@link Runtime.Context.MutableContextQualifierProviderValidator | validator} property that enables\n * validated use of the underlying provider with string keys and values.\n * This eliminates the need for type casting in consumer code.\n * @public\n */\nexport class ValidatingSimpleContextQualifierProvider extends SimpleContextQualifierProvider {\n /**\n * A {@link Runtime.Context.MutableContextQualifierProviderValidator | MutableContextQualifierProviderValidator} which validates\n * string inputs before passing them to this provider.\n */\n public readonly validating: IMutableContextQualifierProviderValidator;\n\n /**\n * Constructor for a {@link Runtime.ValidatingSimpleContextQualifierProvider | ValidatingSimpleContextQualifierProvider} object.\n * @param params - {@link Runtime.IValidatingSimpleContextQualifierProviderCreateParams | Parameters} used to create the provider.\n */\n protected constructor(params: IValidatingSimpleContextQualifierProviderCreateParams) {\n // Convert string values to QualifierContextValue for the base class\n /* c8 ignore next 5 - functional code path tested but coverage intermittently missed */\n const convertedValues: Record<string, QualifierContextValue> | undefined = params.qualifierValues\n ? Object.fromEntries(\n Object.entries(params.qualifierValues).map(([key, value]) => [key, value as QualifierContextValue])\n )\n : undefined;\n\n super({\n qualifiers: params.qualifiers,\n qualifierValues: convertedValues\n });\n\n this.validating = new MutableContextQualifierProviderValidator({ provider: this });\n }\n\n /**\n * Creates a new {@link Runtime.ValidatingSimpleContextQualifierProvider | ValidatingSimpleContextQualifierProvider} object.\n * @param params - {@link Runtime.IValidatingSimpleContextQualifierProviderCreateParams | Parameters} used to create the provider.\n * @returns `Success` with the new {@link Runtime.ValidatingSimpleContextQualifierProvider | ValidatingSimpleContextQualifierProvider} object if successful,\n * or `Failure` with an error message if not.\n * @public\n */\n public static create(\n params: IValidatingSimpleContextQualifierProviderCreateParams\n ): Result<ValidatingSimpleContextQualifierProvider> {\n return captureResult(() => new ValidatingSimpleContextQualifierProvider(params));\n }\n}\n"]}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,SAAS,GAAG,SAAS;IAChE;;;OAGG;IACH,QAAQ,CAAC,UAAU,EAAE,0BAA0B,CAAC;IAEhD;;;OAGG;IACH,QAAQ,CAAC,aAAa,EAAE,6BAA6B,CAAC;IAEtD;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,iCAAiC,CAAC;IAEtD;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC;IAEzC;;;OAGG;IACH,oBAAoB,IAAI,MAAM,CAAC,yBAAyB,CAAC,EAAE,CAAC,CAAC,CAAC;IAE9D;;;OAGG;IACH,QAAQ,CAAC,cAAc,EAAE,WAAW,CAAC,4BAA4B,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAElF;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IAEhD;;OAEG;IACH,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAE/B;;;;OAIG;IACH,eAAe,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC;CACvE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iResourceManager.js","sourceRoot":"","sources":["../../../src/packlets/runtime/iResourceManager.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport { Result, Collections } from '@fgv/ts-utils';\nimport { JsonObject } from '@fgv/ts-json-base';\nimport { ReadOnlyConditionCollector, ReadOnlyConditionSetCollector } from '../conditions';\nimport { ReadOnlyAbstractDecisionCollector, ConcreteDecision } from '../decisions';\nimport { ResourceId, ResourceValueMergeMethod } from '../common';\nimport { IResourceType } from '../resource-types';\nimport { IContextDecl, IValidatedContextDecl } from '../context';\nimport { IReadOnlyResourceTreeRoot } from './resource-tree';\n\n/**\n * Runtime representation of a resource candidate with the minimal data needed for resolution.\n * @public\n */\nexport interface IResourceCandidate {\n /** The JSON value for this candidate */\n readonly json: JsonObject;\n\n /**\n * Indicates if this candidate is a partial resource.\n */\n readonly isPartial: boolean;\n\n /**\n * Specifies the resource type of this candidate.\n */\n readonly mergeMethod: ResourceValueMergeMethod;\n}\n\n/**\n * Interface for a resource that can be used in the runtime layer.\n * This provides the minimal properties needed from a resource without requiring\n * the full Resources layer dependencies.\n * @public\n */\nexport interface IResource {\n /** The resource identifier */\n readonly id: string;\n /** The resource name */\n readonly name: string;\n /** The resource type */\n readonly resourceType: IResourceType;\n /** The decision used to select candidates */\n readonly decision: ConcreteDecision;\n /** The available candidates for this resource */\n readonly candidates: ReadonlyArray<IResourceCandidate>;\n}\n\n/**\n * Interface defining the read-only properties that the runtime resource resolver needs\n * from a resource manager. This abstraction allows the runtime to work with different\n * implementations without requiring the full ResourceManagerBuilder build mechanics.\n * @public\n */\nexport interface IResourceManager<TR extends IResource = IResource> {\n /**\n * A {@link Conditions.ReadOnlyConditionCollector | ReadOnlyConditionCollector} which\n * contains the {@link Conditions.Condition | conditions} used by resource candidates.\n */\n readonly conditions: ReadOnlyConditionCollector;\n\n /**\n * A {@link Conditions.ReadOnlyConditionSetCollector | ReadOnlyConditionSetCollector} which\n * contains the {@link Conditions.ConditionSet | condition sets} used by resource candidates.\n */\n readonly conditionSets: ReadOnlyConditionSetCollector;\n\n /**\n * A {@link Decisions.ReadOnlyAbstractDecisionCollector | ReadOnlyAbstractDecisionCollector} which\n * contains the {@link Decisions.Decision | abstract decisions} used by resource candidates.\n */\n readonly decisions: ReadOnlyAbstractDecisionCollector;\n\n /**\n * Gets a built resource by ID for runtime resolution.\n * @param id - The resource identifier\n * @returns Success with the runtime resource if found, Failure otherwise\n */\n getBuiltResource(id: string): Result<TR>;\n\n /**\n * Gets a resource tree built from the resources in this resource manager.\n * @returns Result containing the resource tree root, or failure if tree construction fails\n */\n getBuiltResourceTree(): Result<IReadOnlyResourceTreeRoot<TR>>;\n\n /**\n * A read-only result map of all built resources, keyed by resource ID.\n * Resources are built on-demand when accessed and returns Results for error handling.\n */\n readonly builtResources: Collections.IReadOnlyValidatingResultMap<ResourceId, TR>;\n\n /**\n * The number of resources in this resource manager.\n */\n readonly numResources: number;\n\n /**\n * The resource IDs that this resource manager can resolve.\n */\n readonly resourceIds: ReadonlyArray<ResourceId>;\n\n /**\n * The number of candidates in this resource manager.\n */\n readonly numCandidates: number;\n\n /**\n * Validates a context declaration against the qualifiers managed by this resource manager.\n * @param context - The context declaration to validate\n * @returns Success with the validated context if successful, Failure otherwise\n */\n validateContext(context: IContextDecl): Result<IValidatedContextDecl>;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packlets/runtime/index.ts"],"names":[],"mappings":"AAsBA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,0CAA0C,CAAC;AACzD,cAAc,oDAAoD,CAAC;AACnE,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAE/B,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,YAAY,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/packlets/runtime/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,+DAA6C;AAC7C,qDAAmC;AACnC,2EAAyD;AACzD,qFAAmE;AACnE,qDAAmC;AACnC,yDAAuC;AACvC,iEAA+C;AAC/C,kDAAgC;AAChC,iDAA+B;AAE/B,mDAAqC;AAG5B,0BAAO;AAFhB,8DAAgD;AAE9B,oCAAY","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nexport * from './compiledResourceCollection';\nexport * from './iResourceManager';\nexport * from './context/simpleContextQualifierProvider';\nexport * from './context/validatingSimpleContextQualifierProvider';\nexport * from './resourceResolver';\nexport * from './resourceTreeResolver';\nexport * from './conditionSetResolutionResult';\nexport * from './cacheListener';\nexport * from './cacheMetrics';\n\nimport * as Context from './context';\nimport * as ResourceTree from './resource-tree';\n\nexport { Context, ResourceTree };\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/packlets/runtime/resource-tree/common.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAExD;;;;;;GAMG;AACH,MAAM,WAAW,yBAAyB,CAAC,CAAC;IAC1C,QAAQ,CAAC,EAAE,EAAE,UAAU,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;IACrB,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC;CACxB;AAED;;;;;GAKG;AACH,MAAM,WAAW,2BAA2B,CAAC,CAAC;IAC5C,QAAQ,CAAC,EAAE,EAAE,UAAU,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,uCAAuC,CAAC,CAAC,CAAC,CAAC;IAC9D,QAAQ,CAAC,MAAM,EAA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;AAED;;;GAGG;AACH,MAAM,WAAW,uCAAuC,CAAC,CAAC,CAAE,SAAQ,6BAA6B,CAAC,CAAC,CAAC;IAClG,QAAQ,CAAC,UAAU,EAAE,6BAA6B,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CACvE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../src/packlets/runtime/resource-tree/common.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport { IReadOnlyResultMap, Result } from '@fgv/ts-utils';\nimport { ResourceId, ResourceName } from '../../common';\n\n/**\n * Interface for leaf nodes in a resource tree.\n * Leaf nodes contain resource values and cannot have child nodes.\n * In a valid resource tree, if a path has child resources (e.g., 'app.messages.welcome'),\n * then that path cannot itself be a resource (i.e., 'app' cannot be both a resource and have children).\n * @public\n */\nexport interface IReadOnlyResourceTreeLeaf<T> {\n readonly id: ResourceId;\n readonly name: ResourceName;\n readonly resource: T;\n readonly isLeaf: true;\n readonly isBranch: false;\n readonly isRoot: false;\n}\n\n/**\n * Interface for branch nodes in a resource tree that contain child nodes.\n * Branch nodes organize the tree structure and cannot have resource values.\n * If a path has child resources, it must be a branch and cannot itself be a resource.\n * @public\n */\nexport interface IReadOnlyResourceTreeBranch<T> {\n readonly id: ResourceId;\n readonly name: ResourceName;\n readonly children: IReadOnlyValidatingResourceTreeChildren<T>;\n readonly isLeaf: false;\n readonly isBranch: true;\n readonly isRoot: false;\n}\n\n/**\n * Interface for the root node of a resource tree.\n * @public\n */\nexport interface IReadOnlyResourceTreeRoot<T> {\n readonly children: IReadOnlyValidatingResourceTreeChildren<T>;\n readonly isRoot: true;\n readonly isLeaf: false;\n readonly isBranch: false;\n}\n\n/**\n * Union type representing any node in the resource tree, which can be a leaf or a branch.\n * This allows for flexible handling of different node types in the tree structure.\n * @public\n */\nexport type IReadOnlyResourceTreeNode<T> = IReadOnlyResourceTreeLeaf<T> | IReadOnlyResourceTreeBranch<T>;\n\n/**\n * Interface for a read-only result-based resource tree with navigation methods.\n * @public\n */\nexport interface IReadOnlyResourceTreeChildren<\n T,\n TID extends string = ResourceId,\n TNAME extends string = ResourceName\n> extends IReadOnlyResultMap<TNAME, IReadOnlyResourceTreeNode<T>> {\n /**\n * Gets a tree node by its full ResourceId path.\n * @param id - The ResourceId path to look up\n * @returns Result containing the node if found, or failure if not found\n */\n getById(id: TID): Result<IReadOnlyResourceTreeNode<T>>;\n\n /**\n * Gets a resource node by its direct name (single component).\n * @param name - The ResourceName to look up\n * @returns Result containing the node if it's a resource, or failure if not found or not a resource\n */\n getResource(name: TNAME): Result<IReadOnlyResourceTreeNode<T>>;\n\n /**\n * Gets a branch node by its direct name (single component).\n * @param name - The ResourceName to look up\n * @returns Result containing the node if it's a branch, or failure if not found or not a branch\n */\n getBranch(name: TNAME): Result<IReadOnlyResourceTreeNode<T>>;\n\n /**\n * Gets a resource leaf node by its full ResourceId path.\n * @param id - The ResourceId path to look up\n * @returns Result containing the leaf if found and is a resource, or failure otherwise\n */\n getResourceById(id: TID): Result<IReadOnlyResourceTreeLeaf<T>>;\n\n /**\n * Gets a branch node by its full ResourceId path.\n * @param id - The ResourceId path to look up\n * @returns Result containing the branch if found and has children, or failure otherwise\n */\n getBranchById(id: TID): Result<IReadOnlyResourceTreeBranch<T>>;\n}\n\n/**\n * A read-only interface for accessing resource tree children using weakly-typed string keys.\n * @public\n */\nexport interface IReadOnlyValidatingResourceTreeChildren<T> extends IReadOnlyResourceTreeChildren<T> {\n readonly validating: IReadOnlyResourceTreeChildren<T, string, string>;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/packlets/runtime/resource-tree/index.ts"],"names":[],"mappings":"AAsBA,cAAc,UAAU,CAAC;AACzB,cAAc,wBAAwB,CAAC;AACvC,cAAc,iCAAiC,CAAC;AAChD,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/packlets/runtime/resource-tree/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;AAEH,2CAAyB;AACzB,yDAAuC;AACvC,kEAAgD;AAChD,yDAAuC","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nexport * from './common';\nexport * from './resourceTreeChildren';\nexport * from './resourceTreeChildrenValidator';\nexport * from './readOnlyResourceTree';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readOnlyResourceTree.d.ts","sourceRoot":"","sources":["../../../../src/packlets/runtime/resource-tree/readOnlyResourceTree.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAqB,MAAM,EAAsC,MAAM,eAAe,CAAC;AAC9F,OAAO,EAAE,UAAU,EAAE,YAAY,EAAW,MAAM,cAAc,CAAC;AACjE,OAAO,EAEL,yBAAyB,EACzB,2BAA2B,EAC3B,yBAAyB,EACzB,uCAAuC,EACxC,MAAM,UAAU,CAAC;AAGlB;;;GAGG;AACH,MAAM,WAAW,qBAAqB,CAAC,CAAC;IACtC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,YAAY,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC;CAClE;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB,CAAC,CAAC;IACtC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAuB,CAAC,CAAC;IACxC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,YAAY,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC;CAClE;AAED;;;GAGG;AACH,MAAM,MAAM,oBAAoB,CAAC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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readOnlyResourceTree.js","sourceRoot":"","sources":["../../../../src/packlets/runtime/resource-tree/readOnlyResourceTree.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;AAkDH,oEAIC;AAQD,wDAEC;AA9DD,4CAA8F;AAC9F,yCAAiE;AAQjE,iEAAsE;AAgCtE,cAAc;AACd;;;;;GAKG;AACH,SAAgB,4BAA4B,CAC1C,IAAwD;IAExD,OAAO,UAAU,IAAI,IAAI,CAAC;AAC5B,CAAC;AAED;;;;;GAKG;AACH,SAAgB,sBAAsB,CAAI,IAA6B;IACrE,OAAO,UAAU,IAAI,IAAI,IAAI,CAAC,CAAC,UAAU,IAAI,IAAI,CAAC,CAAC;AACrD,CAAC;AAED;;;;GAIG;AACH,MAAa,wBAAwB;IAKnC,IAAW,MAAM;QACf,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAW,QAAQ;QACjB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAW,MAAM;QACf,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;OAKG;IACH,YAAsB,IAAkB,EAAE,UAAkC,EAAE,QAAW;QACvF,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,EAAE,GAAG,gBAAO,CAAC,eAAe,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;QAC9D,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED;;;;;;OAMG;IACI,MAAM,CAAC,MAAM,CAClB,IAAkB,EAClB,UAAkC,EAClC,QAAW;QAEX,OAAO,IAAA,wBAAa,EAAC,GAAG,EAAE,CAAC,IAAI,wBAAwB,CAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;IACvF,CAAC;CACF;AA3CD,4DA2CC;AAED;;;;GAIG;AACH,MAAa,0BAA0B;IAKrC,IAA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AAG,EAAE,uCAAuC,CAAC,CAAC;wBAChE,MAAM;oBACR,CAAC,CAAC,0EAA0E;yBAAM,CAAC;wBACjF,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,yCAAyC,CAAC,CAAC;oBACpE,CAAC;gBACH,CAAC;gBAED,IAAI,4BAA4B,CAAC,WAAW,CAAC,EAAE,CAAC;oBAC9C,IAAI,YAAY,IAAI,WAAW,CAAC,QAAQ,EAAE,CAAC;wBACzC,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,+BAA+B,CAAC,CAAC;oBAC1D,CAAC;yBAAM,CAAC;wBACN,WAAW,CAAC,QAAQ,CAAC,YAAY,CAAC,GAAG,EAAE,QAAQ,EAAE,CAAC;oBACpD,CAAC,CAAC,0EAA0E;gBAC9E,CAAC;qBAAM,CAAC;oBACN,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,uCAAuC,CAAC,CAAC;gBAClE,CAAC;gBACD,OAAO,IAAA,kBAAO,EAAC,WAAW,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC;YACrD,CAAC,CAAC;iBACD,cAAc,CAAC,MAAM,CAAC,CAAC;QAC5B,CAAC;QACD,OAAO,MAAM,CAAC,cAAc,CAAC,IAAA,kBAAO,EAAC,IAAI,CAAC,CAAC,CAAC;IAC9C,CAAC;CACF;AA1HD,4DA0HC","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport { MessageAggregator, Result, captureResult, mapResults, succeed } from '@fgv/ts-utils';\nimport { ResourceId, ResourceName, Helpers } from '../../common';\nimport {\n IReadOnlyResourceTreeNode,\n IReadOnlyResourceTreeLeaf,\n IReadOnlyResourceTreeBranch,\n IReadOnlyResourceTreeRoot,\n IReadOnlyValidatingResourceTreeChildren\n} from './common';\nimport { ReadOnlyResourceTreeChildren } from './resourceTreeChildren';\n\n/**\n * Interface for initializing a resource tree root with child nodes.\n * @public\n */\nexport interface IResourceTreeRootInit<T> {\n readonly children: Record<ResourceName, ResourceTreeNodeInit<T>>;\n}\n\n/**\n * Interface for initializing a leaf node with a resource value.\n * @public\n */\nexport interface IResourceTreeLeafInit<T> {\n readonly resource: T;\n}\n\n/**\n * Interface for initializing a branch node with child nodes.\n * @public\n */\nexport interface IResourceTreeBranchInit<T> {\n readonly children: Record<ResourceName, ResourceTreeNodeInit<T>>;\n}\n\n/**\n * Union type for tree node initialization data.\n * @public\n */\nexport type ResourceTreeNodeInit<T> = IResourceTreeLeafInit<T> | IResourceTreeBranchInit<T>;\n\n// Type guards\n/**\n * Type guard to determine if an init object represents a branch or root with children.\n * @param init - The initialization object to test\n * @returns True if the init object has children property\n * @public\n */\nexport function isResourceTreeRootOrNodeInit<T>(\n init: ResourceTreeNodeInit<T> | IResourceTreeRootInit<T>\n): init is IResourceTreeBranchInit<T> {\n return 'children' in init;\n}\n\n/**\n * Type guard to determine if an init object represents a leaf node with a resource.\n * @param init - The initialization object to test\n * @returns True if the init object has a resource but no children\n * @public\n */\nexport function isResourceTreeLeafInit<T>(init: ResourceTreeNodeInit<T>): init is IResourceTreeLeafInit<T> {\n return 'resource' in init && !('children' in init);\n}\n\n/**\n * Implementation of a read-only resource tree leaf node that contains a resource value.\n * Leaf nodes represent the actual resources in the tree and cannot have children.\n * @public\n */\nexport class ReadOnlyResourceTreeLeaf<T> implements IReadOnlyResourceTreeLeaf<T> {\n public readonly name: ResourceName;\n public readonly id: ResourceId;\n public readonly resource: T;\n\n public get isRoot(): false {\n return false;\n }\n\n public get isBranch(): false {\n return false;\n }\n\n public get isLeaf(): true {\n return true;\n }\n\n /**\n * Creates a new leaf node. Use the static create method instead.\n * @param name - The name of this node (last segment of the path)\n * @param parentPath - The path to the parent node (undefined for root-level nodes)\n * @param resource - The resource value stored in this leaf\n */\n protected constructor(name: ResourceName, parentPath: ResourceId | undefined, resource: T) {\n this.name = name;\n this.id = Helpers.joinResourceIds(parentPath, name).orThrow();\n this.resource = resource;\n }\n\n /**\n * Creates a new ReadOnlyResourceTreeLeaf instance.\n * @param name - The name of this node (last segment of the path)\n * @param parentPath - The path to the parent node (undefined for root-level nodes)\n * @param resource - The resource value to store in this leaf\n * @returns Result containing the new leaf node or failure if construction fails\n */\n public static create<T>(\n name: ResourceName,\n parentPath: ResourceId | undefined,\n resource: T\n ): Result<ReadOnlyResourceTreeLeaf<T>> {\n return captureResult(() => new ReadOnlyResourceTreeLeaf(name, parentPath, resource));\n }\n}\n\n/**\n * Implementation of a read-only resource tree branch node that contains child nodes.\n * Branch nodes organize other nodes in a hierarchical structure and may optionally contain a resource value.\n * @public\n */\nexport class ReadOnlyResourceTreeBranch<T> implements IReadOnlyResourceTreeBranch<T> {\n public readonly children: IReadOnlyValidatingResourceTreeChildren<T>;\n public readonly name: ResourceName;\n public readonly id: ResourceId;\n\n public get isRoot(): false {\n return false;\n }\n\n public get isBranch(): true {\n return true;\n }\n\n public get isLeaf(): false {\n return false;\n }\n\n /**\n * Creates a new branch node. Use the static create method instead.\n * @param name - The name of this node (last segment of the path)\n * @param parentPath - The path to the parent node (undefined for root-level nodes)\n * @param init - Initialization data containing child nodes\n */\n private constructor(\n name: ResourceName,\n parentPath: ResourceId | undefined,\n init: IResourceTreeBranchInit<T>\n ) {\n this.name = name;\n this.id = Helpers.joinResourceIds(parentPath, name).orThrow();\n\n const children = mapResults<IReadOnlyResourceTreeNode<T>>(\n (\n Array.from(Object.entries(init.children)) as [\n ResourceName,\n IResourceTreeBranchInit<T> | IResourceTreeLeafInit<T>\n ][]\n ).map(([childName, childInit]) => {\n if (isResourceTreeLeafInit(childInit)) {\n return ReadOnlyResourceTreeLeaf.create(childName, this.id, childInit.resource);\n }\n return ReadOnlyResourceTreeBranch.create(childName, this.id, childInit);\n })\n ).orThrow();\n\n this.children = new ReadOnlyResourceTreeChildren(\n this.id,\n children.map((c): [ResourceName, IReadOnlyResourceTreeNode<T>] => [c.name, c])\n );\n }\n\n /**\n * Creates a new ReadOnlyResourceTreeBranch instance.\n * @param childName - The name of this node (last segment of the path)\n * @param path - The path to the parent node (undefined for root-level nodes)\n * @param childInit - Initialization data containing child nodes\n * @returns Result containing the new branch node or failure if construction fails\n */\n public static create<T>(\n childName: ResourceName,\n path: ResourceId | undefined,\n childInit: IResourceTreeBranchInit<T>\n ): Result<ReadOnlyResourceTreeBranch<T>> {\n return captureResult(() => new ReadOnlyResourceTreeBranch(childName, path, childInit));\n }\n}\n\n/**\n * Union type representing any node in a read-only resource tree.\n * @public\n */\nexport type ReadOnlyResourceTreeNode<T> = ReadOnlyResourceTreeBranch<T> | ReadOnlyResourceTreeLeaf<T>;\n\n/**\n * Implementation of a read-only resource tree root that organizes resources hierarchically.\n * The root provides the entry point for tree navigation and resource access by ResourceId paths.\n * @public\n */\nexport class ReadOnlyResourceTreeRoot<T> implements IReadOnlyResourceTreeRoot<T> {\n public readonly children: IReadOnlyValidatingResourceTreeChildren<T>;\n\n public get isRoot(): true {\n return true;\n }\n\n public get isBranch(): false {\n return false;\n }\n\n public get isLeaf(): false {\n return false;\n }\n\n /**\n * Creates a new root node. Use the static create method instead.\n * @param init - Initialization data containing child nodes\n */\n protected constructor(init: IResourceTreeRootInit<T>) {\n const children = mapResults<ReadOnlyResourceTreeBranch<T> | ReadOnlyResourceTreeLeaf<T>>(\n (\n Array.from(Object.entries(init.children)) as [\n ResourceName,\n IResourceTreeBranchInit<T> | IResourceTreeLeafInit<T>\n ][]\n ).map(([childName, childInit]) => {\n if (isResourceTreeLeafInit(childInit)) {\n return ReadOnlyResourceTreeLeaf.create(childName, undefined, childInit.resource);\n }\n return ReadOnlyResourceTreeBranch.create(childName, undefined, childInit);\n })\n ).orThrow();\n\n this.children = new ReadOnlyResourceTreeChildren(\n undefined,\n children.map((c): [ResourceName, IReadOnlyResourceTreeNode<T>] => [c.name, c])\n );\n }\n\n /**\n * Creates a new ReadOnlyResourceTreeRoot from an array of resources.\n * @param resources - Array of [ResourceId, resource] pairs to build the tree from\n * @returns Result containing the new root or failure if construction fails\n */\n public static create<T>(resources: [ResourceId, T][]): Result<ReadOnlyResourceTreeRoot<T>>;\n\n /**\n * Creates a new ReadOnlyResourceTreeRoot from initialization data.\n * @param init - Tree initialization structure\n * @returns Result containing the new root or failure if construction fails\n */\n public static create<T>(init: IResourceTreeRootInit<T>): Result<ReadOnlyResourceTreeRoot<T>>;\n\n /**\n * Creates a new ReadOnlyResourceTreeRoot from either resources or initialization data.\n * @param init - Either an array of [ResourceId, resource] pairs or tree initialization structure\n * @returns Result containing the new root or failure if construction fails\n */\n public static create<T>(\n init: IResourceTreeRootInit<T> | [ResourceId, T][]\n ): Result<ReadOnlyResourceTreeRoot<T>> {\n if (Array.isArray(init)) {\n return ReadOnlyResourceTreeRoot.createResourceTreeInit(init).onSuccess((treeInit) =>\n captureResult(() => new ReadOnlyResourceTreeRoot(treeInit))\n );\n }\n return captureResult(() => new ReadOnlyResourceTreeRoot(init));\n }\n\n /**\n * Converts an array of resources into tree initialization data.\n * Validates that resource paths do not conflict - if a path has child resources,\n * it cannot itself be a resource (e.g., if 'app.messages.welcome' exists, then 'app' cannot be a resource).\n * @param resources - Array of [ResourceId, resource] pairs to convert\n * @returns Result containing the initialization structure or failure if validation fails\n */\n public static createResourceTreeInit<T>(resources: [ResourceId, T][]): Result<IResourceTreeRootInit<T>> {\n const errors: MessageAggregator = new MessageAggregator();\n const root: IResourceTreeRootInit<T> = { children: {} };\n\n for (const [id, resource] of resources) {\n Helpers.splitResourceId(id)\n .onSuccess((pathComponents) => {\n let currentNode: IResourceTreeBranchInit<T> | IResourceTreeRootInit<T> = root;\n const resourceName = pathComponents.pop()!;\n\n for (const nodeName of pathComponents) {\n if (isResourceTreeRootOrNodeInit(currentNode)) {\n if (!(nodeName in currentNode.children)) {\n currentNode.children[nodeName] = { children: {} };\n }\n if (isResourceTreeLeafInit(currentNode.children[nodeName])) {\n errors.addMessage(`${id}: Expected a branch but found a leaf at ${nodeName}.`);\n } else {\n currentNode = currentNode.children[nodeName];\n }\n } /* c8 ignore next 4 - defense in depth, not reachable without chicanery */ else if (\n isResourceTreeLeafInit(currentNode)\n ) {\n errors.addMessage(`${id}: Expected a branch but found a leaf.`);\n break;\n } /* c8 ignore next 3 - defense in depth, not reachable without chicanery */ else {\n errors.addMessage(`${id}: Unexpected structure in resource tree`);\n }\n }\n\n if (isResourceTreeRootOrNodeInit(currentNode)) {\n if (resourceName in currentNode.children) {\n errors.addMessage(`${id}: Duplicate resource at path.`);\n } else {\n currentNode.children[resourceName] = { resource };\n } /* c8 ignore next 3 - defense in depth, not reachable without chicanery */\n } else {\n errors.addMessage(`${id}: Expected a branch but found a leaf.`);\n }\n return succeed(currentNode.children[resourceName]);\n })\n .aggregateError(errors);\n }\n return errors.returnOrReport(succeed(root));\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resourceTreeChildren.d.ts","sourceRoot":"","sources":["../../../../src/packlets/runtime/resource-tree/resourceTreeChildren.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAe,MAAM,E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E,CAAC;gBAChB,OAAO,IAAA,kBAAO,EAAC,IAAoC,CAAC,CAAC,UAAU,CAC7D,SAAS,CACV,CAAC;YACJ,CAAC;YACD,OAAO,IAAA,eAAI,EACT,GAAG,EAAE,mBAAmB,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,CAC/D,CAAC,UAAU,CAAoC,SAAS,CAAC,CAAC;QAC7D,CAAC,CAAC,CAAC;IACL,CAAC;IAEM,aAAa,CAAC,EAAc;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE;YACzC,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAClB,OAAO,IAAA,kBAAO,EAAC,IAAsC,CAAC,CAAC,UAAU,CAC/D,SAAS,CACV,CAAC;YACJ,CAAC;YACD,kFAAkF;YAClF,OAAO,IAAA,eAAI,EACT,GAAG,EAAE,iBAAiB,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,CAC7D,CAAC,UAAU,CAAoC,SAAS,CAAC,CAAC;QAC7D,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAzFD,oEAyFC","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport { Collections, Result, ResultMap, fail, succeed } from '@fgv/ts-utils';\nimport { ResourceId, ResourceName, Helpers } from '../../common';\nimport {\n IReadOnlyResourceTreeBranch,\n IReadOnlyResourceTreeChildren,\n IReadOnlyResourceTreeLeaf,\n IReadOnlyResourceTreeNode,\n IReadOnlyValidatingResourceTreeChildren\n} from './common';\nimport { ResourceTreeChildrenValidator } from './resourceTreeChildrenValidator';\n\n/**\n * Implementation of a result-based resource tree that provides hierarchical access to resources.\n * Extends ResultMap to provide collection-like access while adding tree-specific navigation methods.\n * @public\n */\nexport class ReadOnlyResourceTreeChildren<T>\n extends ResultMap<ResourceName, IReadOnlyResourceTreeNode<T>>\n implements IReadOnlyValidatingResourceTreeChildren<T>\n{\n protected path: ResourceId | undefined;\n public validating: IReadOnlyResourceTreeChildren<T, string, string>;\n\n /**\n * Creates a new ReadOnlyResourceTreeChildren instance.\n * @param path - The path to this tree node (undefined for root)\n * @param entries - Array of [name, node] tuples to populate the tree\n */\n public constructor(path: ResourceId | undefined, entries: [ResourceName, IReadOnlyResourceTreeNode<T>][]) {\n super(entries);\n this.path = path;\n this.validating = new ResourceTreeChildrenValidator<T>(this);\n }\n\n public getResource(name: ResourceName): Result<IReadOnlyResourceTreeNode<T>> {\n return this.get(name).onSuccess((node) => {\n if (node.isLeaf) {\n return succeed(node).withDetail<Collections.ResultMapResultDetail>('success');\n }\n /* c8 ignore next 3 - functional code tested but coverage intermittently missed */\n return fail<IReadOnlyResourceTreeNode<T>>(\n `${name}: not a resource${this.path ? ` in ${this.path}` : ''}.`\n ).withDetail<Collections.ResultMapResultDetail>('failure');\n });\n }\n\n public getBranch(name: ResourceName): Result<IReadOnlyResourceTreeNode<T>> {\n return this.get(name).onSuccess((node) => {\n if (node.isBranch) {\n return succeed(node).withDetail<Collections.ResultMapResultDetail>('success');\n }\n /* c8 ignore next 3 - functional code tested but coverage intermittently missed */\n return fail<IReadOnlyResourceTreeNode<T>>(\n `${name}: not a branch${this.path ? ` in ${this.path}` : ''}.`\n ).withDetail<Collections.ResultMapResultDetail>('failure');\n });\n }\n\n public getById(id: ResourceId): Result<IReadOnlyResourceTreeNode<T>> {\n return Helpers.splitResourceId(id).onSuccess((names) => {\n let name = names.shift();\n if (name !== undefined) {\n let node = this.get(name).orDefault();\n while (node) {\n name = names.shift();\n if (name === undefined) {\n return succeed(node);\n }\n if (node.isLeaf) {\n /* c8 ignore next 1 - defense in depth */\n return fail(`${id}: resource not found${this.path ? ` in ${this.path}` : ''}.`);\n }\n node = (node as IReadOnlyResourceTreeBranch<T>).children.get(name).orDefault();\n }\n }\n return fail(`${id}: resource not found${this.path ? ` in ${this.path}` : ''}.`);\n });\n }\n\n public getResourceById(id: ResourceId): Result<IReadOnlyResourceTreeLeaf<T>> {\n return this.getById(id).onSuccess((node) => {\n if (node.isLeaf) {\n return succeed(node as IReadOnlyResourceTreeLeaf<T>).withDetail<Collections.ResultMapResultDetail>(\n 'success'\n );\n }\n return fail<IReadOnlyResourceTreeLeaf<T>>(\n `${id}: not a resource${this.path ? ` in ${this.path}` : ''}.`\n ).withDetail<Collections.ResultMapResultDetail>('failure');\n });\n }\n\n public getBranchById(id: ResourceId): Result<IReadOnlyResourceTreeBranch<T>> {\n return this.getById(id).onSuccess((node) => {\n if (node.isBranch) {\n return succeed(node as IReadOnlyResourceTreeBranch<T>).withDetail<Collections.ResultMapResultDetail>(\n 'success'\n );\n }\n /* c8 ignore next 3 - functional code tested but coverage intermittently missed */\n return fail<IReadOnlyResourceTreeBranch<T>>(\n `${id}: not a branch${this.path ? ` in ${this.path}` : ''}.`\n ).withDetail<Collections.ResultMapResultDetail>('failure');\n });\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resourceTreeChildrenValidator.d.ts","sourceRoot":"","sources":["../../../../src/packlets/runtime/resource-tree/resourceTreeChildrenValidator.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,cAAc,EAAE,WAAW,EAAkB,MAAM,eAAe,CAAC;AACxG,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EACL,2BAA2B,EAC3B,6BAA6B,EAC7B,yBAAyB,EACzB,yBAAyB,EAC1B,MAAM,UAAU,CAAC;AAElB;;;;;;;;;;;;;;GAcG;AACH,qBAAa,6BAA6B,CAAC,CAAC,CAAE,YAAW,6BAA6B,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC;IACvG,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmC;IAE1D;;;OAGG;gBACgB,KAAK,EAAE,6BAA6B,CAAC,CAAC,CAAC;IAI1D;;;;OAIG;IACI,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC;IAMhE;;;;OAIG;IACI,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC;IAMtE;;;;OAIG;IACI,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC;IAMpE;;;;OAIG;IACI,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC;IAMxE;;;;OAIG;IACI,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC,2BAA2B,CAAC,CAAC,CAAC,CAAC;IAMxE;;OAEG;IACH,IAAW,IAAI,IAAI,MAAM,CAExB;IAED;;;OAGG;IACI,OAAO,IAAI,gBAAgB,CAAC,CAAC,YAAY,EAAE,yBAAyB,CAAC,CAAC,CAAC,CAAC,CAAC;IAIhF;;;;OAIG;IACI,OAAO,CACZ,EAAE,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,kBAAkB,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,IAAI,EACtG,GAAG,CAAC,EAAE,OAAO,GACZ,IAAI;IAMP;;;;OAIG;IACI,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAAC,yBAAyB,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,qBAAqB,CAAC;IAOxG;;;;OAIG;IACI,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAIhC;;;OAGG;IACI,IAAI,IAAI,gBAAgB,CAAC,YAAY,CAAC;IAI7C;;;OAGG;IACI,MAAM,IAAI,gBAAgB,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC;IAI/D;;;OAGG;IACI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,gBAAgB,CAAC,CAAC,YAAY,EAAE,yBAAyB,CAAC,CAAC,CAAC,CAAC,CAAC;CAG3F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resourceTreeChildrenValidator.js","sourceRoot":"","sources":["../../../../src/packlets/runtime/resource-tree/resourceTreeChildrenValidator.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;AAEH,yCAAwC;AACxC,4CAAwG;AASxG;;;;;;;;;;;;;;GAcG;AACH,MAAa,6BAA6B;IAGxC;;;OAGG;IACH,YAAmB,KAAuC;QACxD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IAED;;;;OAIG;IACI,OAAO,CAAC,EAAU;QACvB,OAAO,iBAAQ,CAAC,YAAY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C,MAAM,CAAC,OAAO,EAAE,CAAC;IAC/B,CAAC;IAED;;;;OAIG;IACI,OAAO,CACZ,EAAsG,EACtG,GAAa;QAEb,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC;YACjD,EAAE,CAAC,KAAK,EAAE,GAAmB,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC;QAC5C,CAAC;IACH,CAAC;IAED;;;;OAIG;IACI,GAAG,CAAC,GAAW;QACpB,IAAI,iBAAQ,CAAC,mBAAmB,CAAC,GAAG,CAAC,EAAE,CAAC;YACtC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAC9B,CAAC;QACD,OAAO,IAAA,yBAAc,EAAC,GAAG,GAAG,0BAA0B,EAAE,aAAa,CAAC,CAAC;IACzE,CAAC;IAED;;;;OAIG;IACI,GAAG,CAAC,GAAW;QACpB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAmB,CAAC,CAAC;IAC9C,CAAC;IAED;;;OAGG;IACI,IAAI;QACT,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IAC5B,CAAC;IAED;;;OAGG;IACI,MAAM;QACX,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;IAC9B,CAAC;IAED;;;OAGG;IACI,CAAC,MAAM,CAAC,QAAQ,CAAC;QACtB,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;IACxC,CAAC;CACF;AA3ID,sEA2IC","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport { Validate } from '../../common';\nimport { Result, IReadOnlyResultMap, DetailedResult, Collections, failWithDetail } from '@fgv/ts-utils';\nimport { ResourceName } from '../../common';\nimport {\n IReadOnlyResourceTreeBranch,\n IReadOnlyResourceTreeChildren,\n IReadOnlyResourceTreeLeaf,\n IReadOnlyResourceTreeNode\n} from './common';\n\n/**\n * A validator wrapper for resource tree children that validates string inputs before\n * delegating to the underlying tree children collection.\n *\n * This class implements {@link Runtime.ResourceTree.IReadOnlyValidatingResourceTreeChildren | IReadOnlyValidatingResourceTreeChildren}\n * by wrapping an {@link Runtime.ResourceTree.IReadOnlyResourceTreeChildren | IReadOnlyResourceTreeChildren} instance and\n * providing string-based access to all tree operations. All string inputs are validated using the library's\n * validation utilities before being passed to the underlying collection.\n *\n * The validator acts as a bridge between string-based external APIs and the\n * strongly-typed internal tree operations, ensuring type safety and consistent\n * error handling throughout the resource tree navigation.\n *\n * @public\n */\nexport class ResourceTreeChildrenValidator<T> implements IReadOnlyResourceTreeChildren<T, string, string> {\n private readonly _inner: IReadOnlyResourceTreeChildren<T>;\n\n /**\n * Creates a new validator wrapper for resource tree children.\n * @param inner - The underlying resource tree children collection to wrap with validation\n */\n public constructor(inner: IReadOnlyResourceTreeChildren<T>) {\n this._inner = inner;\n }\n\n /**\n * Gets a tree node by its string ResourceId path, validating the input.\n * @param id - The string ResourceId path to validate and look up\n * @returns Result containing the node if found, or failure if validation fails or not found\n */\n public getById(id: string): Result<IReadOnlyResourceTreeNode<T>> {\n return Validate.toResourceId(id).onSuccess((resourceId) => {\n return this._inner.getById(resourceId);\n });\n }\n\n /**\n * Gets a resource node by its string name (single component), validating the input.\n * @param name - The string ResourceName to validate and look up\n * @returns Result containing the node if it's a resource, or failure if validation fails or not found\n */\n public getResource(name: string): Result<IReadOnlyResourceTreeNode<T>> {\n return Validate.toResourceName(name).onSuccess((resourceName) => {\n return this._inner.getResource(resourceName);\n });\n }\n\n /**\n * Gets a branch node by its string name (single component), validating the input.\n * @param name - The string ResourceName to validate and look up\n * @returns Result containing the node if it's a branch, or failure if validation fails or not found\n */\n public getBranch(name: string): Result<IReadOnlyResourceTreeNode<T>> {\n return Validate.toResourceName(name).onSuccess((resourceName) => {\n return this._inner.getBranch(resourceName);\n });\n }\n\n /**\n * Gets a resource leaf node by its string ResourceId path, validating the input.\n * @param id - The string ResourceId path to validate and look up\n * @returns Result containing the leaf if found and is a resource, or failure otherwise\n */\n public getResourceById(id: string): Result<IReadOnlyResourceTreeLeaf<T>> {\n return Validate.toResourceId(id).onSuccess((resourceId) => {\n return this._inner.getResourceById(resourceId);\n });\n }\n\n /**\n * Gets a branch node by its string ResourceId path, validating the input.\n * @param id - The string ResourceId path to validate and look up\n * @returns Result containing the branch if found and has children, or failure otherwise\n */\n public getBranchById(id: string): Result<IReadOnlyResourceTreeBranch<T>> {\n return Validate.toResourceId(id).onSuccess((resourceId) => {\n return this._inner.getBranchById(resourceId);\n });\n }\n\n /**\n * The number of direct child nodes in this collection.\n */\n public get size(): number {\n return this._inner.size;\n }\n\n /**\n * Returns an iterator of [ResourceName, node] pairs for all child nodes.\n * @returns Map iterator for all child nodes\n */\n public entries(): IterableIterator<[ResourceName, IReadOnlyResourceTreeNode<T>]> {\n return this._inner.entries();\n }\n\n /**\n * Executes a callback function for each child node in the collection.\n * @param cb - The callback function to execute for each child node\n * @param arg - Optional argument to pass to the callback\n */\n public forEach(\n cb: (value: unknown, key: string, map: IReadOnlyResultMap<string, unknown>, thisArg?: unknown) => void,\n arg?: unknown\n ): void {\n for (const [key, value] of this._inner.entries()) {\n cb(value, key as ResourceName, this, arg);\n }\n }\n\n /**\n * Gets a child node by its string key with detailed error information.\n * @param key - The string key to look up\n * @returns DetailedResult containing the node if found, or failure with details\n */\n public get(key: string): DetailedResult<IReadOnlyResourceTreeNode<T>, Collections.ResultMapResultDetail> {\n if (Validate.isValidResourceName(key)) {\n return this._inner.get(key);\n }\n return failWithDetail(`${key}: invalid resource name.`, 'invalid-key');\n }\n\n /**\n * Checks if a child node exists at the given string key.\n * @param key - The string key to check\n * @returns True if a child node exists at the key, false otherwise\n */\n public has(key: string): boolean {\n return this._inner.has(key as ResourceName);\n }\n\n /**\n * Returns an iterator of ResourceName keys for all child nodes.\n * @returns Map iterator for all child node keys\n */\n public keys(): IterableIterator<ResourceName> {\n return this._inner.keys();\n }\n\n /**\n * Returns an iterator of child node values.\n * @returns Map iterator for all child node values\n */\n public values(): IterableIterator<IReadOnlyResourceTreeNode<T>> {\n return this._inner.values();\n }\n\n /**\n * Returns an iterator for [ResourceName, node] pairs, enabling for...of iteration.\n * @returns Iterable iterator for all child nodes\n */\n public [Symbol.iterator](): IterableIterator<[ResourceName, IReadOnlyResourceTreeNode<T>]> {\n return this._inner[Symbol.iterator]();\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resourceResolver.d.ts","sourceRoot":"","sources":["../../../src/packlets/runtime/resourceResolver.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,MAAM,EAAgC,MAAM,eAAe,CAAC;AACrE,OAAO,EAAE,SAAS,EAA4B,MAAM,mBAAmB,CAAC;AAExE,OAAO,EAAE,iBAAiB,EAAW,UAAU,EAAE,MAAM,WAAW,CAAC;AACnE,OA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