@fgv/ts-res 5.1.0-3 → 5.1.0-31
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 +14 -5
- 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 +50 -6
- package/dist/packlets/conditions/convert/conditionSetDecls.js.map +1 -0
- package/dist/packlets/conditions/convert/decls.js +61 -5
- 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.map +1 -0
- package/dist/packlets/config/configInitFactory.js.map +1 -0
- package/dist/packlets/config/convert.js.map +1 -0
- package/dist/packlets/config/index.browser.js.map +1 -0
- package/dist/packlets/config/index.js.map +1 -0
- package/dist/packlets/config/json.js.map +1 -0
- package/dist/packlets/config/predefined/default.js.map +1 -0
- package/dist/packlets/config/predefined/extended.js.map +1 -0
- package/dist/packlets/config/predefined/index.js.map +1 -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.map +1 -0
- package/dist/packlets/qualifier-types/config/index.js.map +1 -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 +153 -9
- 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 +225 -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 +2 -2
- 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.map +1 -0
- package/dist/packlets/resource-types/config/index.js.map +1 -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 +3 -0
- package/dist/packlets/runtime/context/simpleContextQualifierProvider.js.map +1 -0
- package/dist/packlets/runtime/context/validatingSimpleContextQualifierProvider.js +3 -5
- 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 +576 -164
- 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 +6 -1
- 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 +14 -5
- 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 +7 -2
- 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 +30 -2
- package/lib/packlets/conditions/convert/conditionSetDecls.d.ts.map +1 -0
- package/lib/packlets/conditions/convert/conditionSetDecls.js +51 -5
- package/lib/packlets/conditions/convert/conditionSetDecls.js.map +1 -0
- package/lib/packlets/conditions/convert/decls.d.ts +39 -3
- package/lib/packlets/conditions/convert/decls.d.ts.map +1 -0
- package/lib/packlets/conditions/convert/decls.js +63 -5
- 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.map +1 -0
- package/lib/packlets/config/common.js.map +1 -0
- package/lib/packlets/config/configInitFactory.d.ts.map +1 -0
- package/lib/packlets/config/configInitFactory.js.map +1 -0
- package/lib/packlets/config/convert.d.ts.map +1 -0
- package/lib/packlets/config/convert.js.map +1 -0
- package/lib/packlets/config/index.browser.d.ts.map +1 -0
- package/lib/packlets/config/index.browser.js.map +1 -0
- package/lib/packlets/config/index.d.ts.map +1 -0
- package/lib/packlets/config/index.js.map +1 -0
- package/lib/packlets/config/json.d.ts.map +1 -0
- package/lib/packlets/config/json.js.map +1 -0
- package/lib/packlets/config/predefined/default.d.ts.map +1 -0
- package/lib/packlets/config/predefined/default.js.map +1 -0
- package/lib/packlets/config/predefined/extended.d.ts.map +1 -0
- package/lib/packlets/config/predefined/extended.js.map +1 -0
- package/lib/packlets/config/predefined/index.d.ts.map +1 -0
- package/lib/packlets/config/predefined/index.js.map +1 -0
- package/lib/packlets/config/systemConfiguration.d.ts.map +1 -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.map +1 -0
- package/lib/packlets/qualifier-types/config/convert.js.map +1 -0
- package/lib/packlets/qualifier-types/config/index.d.ts.map +1 -0
- package/lib/packlets/qualifier-types/config/index.js.map +1 -0
- package/lib/packlets/qualifier-types/config/json.d.ts.map +1 -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 +107 -9
- package/lib/packlets/qualifiers/qualifierCollector.d.ts.map +1 -0
- package/lib/packlets/qualifiers/qualifierCollector.js +152 -8
- 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 +85 -0
- package/lib/packlets/resource-json/convert.d.ts.map +1 -0
- package/lib/packlets/resource-json/convert.js +237 -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 +128 -39
- package/lib/packlets/resource-json/json.d.ts.map +1 -0
- package/lib/packlets/resource-json/json.js +2 -2
- 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.map +1 -0
- package/lib/packlets/resource-types/config/convert.js.map +1 -0
- package/lib/packlets/resource-types/config/index.d.ts.map +1 -0
- package/lib/packlets/resource-types/config/index.js.map +1 -0
- package/lib/packlets/resource-types/config/json.d.ts.map +1 -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 +9 -2
- package/lib/packlets/runtime/context/simpleContextQualifierProvider.d.ts.map +1 -0
- package/lib/packlets/runtime/context/simpleContextQualifierProvider.js +3 -0
- package/lib/packlets/runtime/context/simpleContextQualifierProvider.js.map +1 -0
- package/lib/packlets/runtime/context/validatingSimpleContextQualifierProvider.d.ts +8 -1
- package/lib/packlets/runtime/context/validatingSimpleContextQualifierProvider.d.ts.map +1 -0
- package/lib/packlets/runtime/context/validatingSimpleContextQualifierProvider.js +3 -5
- 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 +12 -10
- 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":"qualifierDecl.js","sourceRoot":"","sources":["../../../src/packlets/qualifiers/qualifierDecl.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 { ConditionPriority, QualifierContextValue, QualifierIndex, QualifierName } from '../common';\nimport { QualifierType } from '../qualifier-types';\n\n/**\n * Simple declaration for a {@link Qualifiers.Qualifier | Qualifier}.\n * @public\n */\nexport interface IQualifierDecl {\n name: string;\n typeName: string;\n defaultPriority: number;\n token?: string;\n tokenIsOptional?: boolean;\n defaultValue?: string;\n}\n\n/**\n * Validated declaration for a {@link Qualifiers.Qualifier | Qualifier}.\n * @public\n */\nexport interface IValidatedQualifierDecl {\n /**\n * The name of the qualifier.\n */\n name: QualifierName;\n\n /**\n * The token used to identify the qualifier in the name or\n * path of a resource being imported.\n */\n token: QualifierName;\n\n /**\n * The {@link QualifierTypes.QualifierType | type} of the qualifier.\n */\n type: QualifierType;\n\n /**\n * The default {@link ConditionPriority | priority} of conditions\n * that depend on this qualifier.\n */\n defaultPriority: ConditionPriority;\n\n /**\n * Indicates whether the token is optional when parsing a resource token.\n */\n tokenIsOptional: boolean;\n\n /**\n * Optional default value for the qualifier.\n */\n defaultValue?: QualifierContextValue;\n\n /**\n * Index of the qualifier.\n */\n index: QualifierIndex | undefined;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qualifierDefaultValueDecls.d.ts","sourceRoot":"","sources":["../../../src/packlets/qualifiers/qualifierDefaultValueDecls.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEjE;;;GAGG;AACH,MAAM,WAAW,mCAAmC;IAClD,SAAS,EAAE,SAAS,CAAC;IACrB,KAAK,EAAE,qBAAqB,CAAC;CAC9B;AAED;;;;;GAKG;AACH,MAAM,MAAM,oCAAoC,GAAG,MAAM,CAAC,aAAa,EAAE,qBAAqB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qualifierDefaultValueDecls.js","sourceRoot":"","sources":["../../../src/packlets/qualifiers/qualifierDefaultValueDecls.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 { QualifierContextValue, QualifierName } from '../common';\nimport { Qualifier } from './qualifier';\n\n/**\n * Non-validated declaration of a single qualifier default value.\n * @public\n */\nexport interface IQualifierDefaultValueDecl {\n qualifier: string;\n value: string;\n}\n\n/**\n * Non-validated declaration of qualifier default values, consisting of named\n * default values.\n * @public\n */\nexport type IQualifierDefaultValuesDecl = Record<string, string>;\n\n/**\n * Validated declaration of a single qualifier default value.\n * @public\n */\nexport interface IValidatedQualifierDefaultValueDecl {\n qualifier: Qualifier;\n value: QualifierContextValue;\n}\n\n/**\n * Validated declaration of qualifier default values, a record with strongly-typed\n * {@link QualifierName | qualifier names} as keys and\n * {@link QualifierContextValue | qualifier context values} as values.\n * @public\n */\nexport type IValidatedQualifierDefaultValuesDecl = Record<QualifierName, QualifierContextValue>;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qualifierDefaultValueToken.d.ts","sourceRoot":"","sources":["../../../src/packlets/qualifiers/qualifierDefaultValueToken.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAc,MAAM,EAAiB,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAwC,MAAM,WAAW,CAAC;AAC3F,OAAO,EACL,mCAAmC,EACnC,oCAAoC,EACrC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAEnE;;;GAGG;AACH,qBAAa,2BAA2B;IACtC;;;OAGG;IACH,SAAgB,UAAU,EAAE,2BAA2B,CAAC;IAExD;;;OAGG;gBACgB,UAAU,EAAE,2BAA2B;IAI1D;;;;;;OAMG;IACI,+BAA+B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,mCAAmC,CAAC;IAIlG;;;;;;OAMG;IACI,gCAAgC,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,mCAAmC,EAAE,CAAC;IAIrG;;;;OAIG;IACI,uCAAuC,CAC5C,KAAK,EAAE,aAAa,CAAC,gCAAgC,GACpD,MAAM,CAAC,mCAAmC,CAAC;IAI9C;;;;OAIG;IACI,iCAAiC,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,oCAAoC,CAAC;IAIrG;;;;OAIG;IACI,iCAAiC,CAAC,IAAI,EAAE,oCAAoC,GAAG,MAAM,CAAC,MAAM,CAAC;IAIpG;;;;;;;OAOG;WACW,+BAA+B,CAC3C,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,2BAA2B,GACtC,MAAM,CAAC,mCAAmC,CAAC;IAM9C;;;;;;;OAOG;WACW,gCAAgC,CAC5C,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,2BAA2B,GACtC,MAAM,CAAC,mCAAmC,EAAE,CAAC;IAUhD;;;;;;;;OAQG;WACW,uCAAuC,CACnD,KAAK,EAAE,aAAa,CAAC,gCAAgC,EACrD,UAAU,EAAE,2BAA2B,GACtC,MAAM,CAAC,mCAAmC,CAAC;IAgB9C;;;;;OAKG;WACW,iCAAiC,CAC7C,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,2BAA2B,GACtC,MAAM,CAAC,oCAAoC,CAAC;IAyB/C;;;;OAIG;WACW,iCAAiC,CAC7C,IAAI,EAAE,oCAAoC,GACzC,MAAM,CAAC,MAAM,CAAC;CAsBlB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qualifierDefaultValueToken.js","sourceRoot":"","sources":["../../../src/packlets/qualifiers/qualifierDefaultValueToken.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;AAEH,4CAAkE;AAClE,sCAA2F;AAO3F;;;GAGG;AACH,MAAa,2BAA2B;IAOtC;;;OAGG;IACH,YAAmB,UAAuC;QACxD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAED;;;;;;OAMG;IACI,+BAA+B,CAAC,KAAa;QAClD,OAAO,2BAA2B,CAAC,+BAA+B,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IAC7F,CAAC;IAED;;;;;;OAMG;IACI,gCAAgC,CAAC,KAAa;QACnD,OAAO,2BAA2B,CAAC,gCAAgC,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IAC9F,CAAC;IAED;;;;OAIG;IACI,uCAAuC,CAC5C,KAAqD;QAErD,OAAO,2BAA2B,CAAC,uCAAuC,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IACrG,CAAC;IAED;;;;OAIG;IACI,iCAAiC,CAAC,KAAa;QACpD,OAAO,2BAA2B,CAAC,iCAAiC,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IAC/F,CAAC;IAED;;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ACxB,OAAO,IAAA,kBAAO,EAAC,EAAE,CAAC,CAAC;QACrB,CAAC;QAED,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAErC,+BAA+B;QAC/B,OAAO,gBAAa,CAAC,gCAAgC,CACnD,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;YACnB,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC5C,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;QAC9B,CAAC,CAAC,CACH,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,IAAA,kBAAO,EAAC,WAAW,CAAC,CAAC,CAAC;IAC1C,CAAC;CACF;AAnMD,kEAmMC","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 { mapResults, Result, fail, succeed } from '@fgv/ts-utils';\nimport { Helpers as CommonHelpers, QualifierName, QualifierContextValue } from '../common';\nimport {\n IValidatedQualifierDefaultValueDecl,\n IValidatedQualifierDefaultValuesDecl\n} from './qualifierDefaultValueDecls';\nimport { IReadOnlyQualifierCollector } from './qualifierCollector';\n\n/**\n * Helper class to parse and validate qualifier default value tokens.\n * @public\n */\nexport class QualifierDefaultValueTokens {\n /**\n * The {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} used to validate\n * qualifier names and values.\n */\n public readonly qualifiers: IReadOnlyQualifierCollector;\n\n /**\n * Constructs a new {@link Qualifiers.QualifierDefaultValueTokens | QualifierDefaultValueTokens } instance.\n * @param qualifiers - the {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} to use\n */\n public constructor(qualifiers: IReadOnlyQualifierCollector) {\n this.qualifiers = qualifiers;\n }\n\n /**\n * Parses a {@link QualifierDefaultValueToken | qualifier default value token} string and validates the parts\n * against the qualifiers present in the {@link Qualifiers.QualifierDefaultValueTokens.qualifiers | qualifier collector}.\n * @param token - the token string to parse.\n * @returns `Success` with the {@link Qualifiers.IValidatedQualifierDefaultValueDecl | validated qualifier default value declaration}\n * if successful, `Failure` with an error message if not.\n */\n public parseQualifierDefaultValueToken(token: string): Result<IValidatedQualifierDefaultValueDecl> {\n return QualifierDefaultValueTokens.parseQualifierDefaultValueToken(token, this.qualifiers);\n }\n\n /**\n * Parses a {@link QualifierDefaultValuesToken | qualifier default values token} string and validates the parts\n * against the qualifiers present in the {@link Qualifiers.QualifierDefaultValueTokens.qualifiers | qualifier collector}.\n * @param token - the token string to parse.\n * @returns `Success` with the array of {@link Qualifiers.IValidatedQualifierDefaultValueDecl | validated qualifier default value declarations}\n * if successful, `Failure` with an error message if not.\n */\n public parseQualifierDefaultValuesToken(token: string): Result<IValidatedQualifierDefaultValueDecl[]> {\n return QualifierDefaultValueTokens.parseQualifierDefaultValuesToken(token, this.qualifiers);\n }\n\n /**\n * Validates the {@link Helpers.IQualifierDefaultValueTokenParts | parts} of a {@link QualifierDefaultValueToken | qualifier default value token}.\n * @param parts - the parts to validate\n * @returns `Success` with the validated declaration if successful, `Failure` with an error message if not.\n */\n public validateQualifierDefaultValueTokenParts(\n parts: CommonHelpers.IQualifierDefaultValueTokenParts\n ): Result<IValidatedQualifierDefaultValueDecl> {\n return QualifierDefaultValueTokens.validateQualifierDefaultValueTokenParts(parts, this.qualifiers);\n }\n\n /**\n * Converts a {@link QualifierDefaultValuesToken | qualifier default values token} to a validated qualifier default values declaration.\n * @param token - the qualifier default values token to convert\n * @returns `Success` with the validated qualifier default values declaration if successful, `Failure` with an error message if not.\n */\n public qualifierDefaultValuesTokenToDecl(token: string): Result<IValidatedQualifierDefaultValuesDecl> {\n return QualifierDefaultValueTokens.qualifierDefaultValuesTokenToDecl(token, this.qualifiers);\n }\n\n /**\n * Converts a validated qualifier default values declaration to a {@link QualifierDefaultValuesToken | qualifier default values token}.\n * @param decl - the validated qualifier default values declaration to convert\n * @returns `Success` with the qualifier default values token if successful, `Failure` with an error message if not.\n */\n public declToQualifierDefaultValuesToken(decl: IValidatedQualifierDefaultValuesDecl): Result<string> {\n return QualifierDefaultValueTokens.declToQualifierDefaultValuesToken(decl);\n }\n\n /**\n * Parses a {@link QualifierDefaultValueToken | qualifier default value token} and validates it against the qualifiers\n * present in the supplied {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector}.\n * @param token - the token string to parse.\n * @param qualifiers - the {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} to use\n * @returns `Success` with a {@link Qualifiers.IValidatedQualifierDefaultValueDecl | validated qualifier default value declaration} if successful,\n * `Failure` with an error message if not.\n */\n public static parseQualifierDefaultValueToken(\n token: string,\n qualifiers: IReadOnlyQualifierCollector\n ): Result<IValidatedQualifierDefaultValueDecl> {\n return CommonHelpers.parseQualifierDefaultValueTokenParts(token).onSuccess((parts) => {\n return QualifierDefaultValueTokens.validateQualifierDefaultValueTokenParts(parts, qualifiers);\n });\n }\n\n /**\n * Parses a {@link QualifierDefaultValuesToken | qualifier default values token} and validates it against the qualifiers\n * present in the supplied {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector}.\n * @param token - the token string to parse.\n * @param qualifiers - the {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} to use\n * @returns `Success` with an array of {@link Qualifiers.IValidatedQualifierDefaultValueDecl | validated qualifier default value declarations}\n * if successful, `Failure` with an error message if not\n */\n public static parseQualifierDefaultValuesToken(\n token: string,\n qualifiers: IReadOnlyQualifierCollector\n ): Result<IValidatedQualifierDefaultValueDecl[]> {\n return CommonHelpers.parseQualifierDefaultValuesTokenParts(token).onSuccess((parts) => {\n return mapResults(\n parts.map((part) =>\n QualifierDefaultValueTokens.validateQualifierDefaultValueTokenParts(part, qualifiers)\n )\n );\n });\n }\n\n /**\n * Validates the parts of a qualifier default value token against the qualifiers present in the supplied\n * {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector}.\n * @param parts - the {@link Helpers.IQualifierDefaultValueTokenParts | qualifier default value token parts} to validate.\n * @param qualifiers - the {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} used to\n * validate qualifier names and values.\n * @returns `Success` with a {@link Qualifiers.IValidatedQualifierDefaultValueDecl | validated qualifier default value declaration} if successful,\n * `Failure` with an error message if not.\n */\n public static validateQualifierDefaultValueTokenParts(\n parts: CommonHelpers.IQualifierDefaultValueTokenParts,\n qualifiers: IReadOnlyQualifierCollector\n ): Result<IValidatedQualifierDefaultValueDecl> {\n return qualifiers.getByNameOrToken(parts.qualifier).onSuccess((qualifier) => {\n // Allow empty values to remove defaults\n if (parts.value === '') {\n return succeed({ qualifier, value: '' as QualifierContextValue });\n }\n\n return qualifier.type\n .validateContextValue(parts.value)\n .onSuccess((value) => {\n return succeed({ qualifier, value });\n })\n .withDetail('failure', 'success');\n });\n }\n\n /**\n * Converts a {@link QualifierDefaultValuesToken | qualifier default values token} to a validated qualifier default values declaration.\n * @param token - the qualifier default values token to convert\n * @param qualifiers - the {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} to use\n * @returns `Success` with the validated qualifier default values declaration if successful, `Failure` with an error message if not.\n */\n public static qualifierDefaultValuesTokenToDecl(\n token: string,\n qualifiers: IReadOnlyQualifierCollector\n ): Result<IValidatedQualifierDefaultValuesDecl> {\n return QualifierDefaultValueTokens.parseQualifierDefaultValuesToken(token, qualifiers).onSuccess(\n (qualifierDefaultValues) => {\n const defaultValues: IValidatedQualifierDefaultValuesDecl = {};\n\n for (const { qualifier, value } of qualifierDefaultValues) {\n const qualifierName = qualifier.name as QualifierName;\n const contextValue = value as QualifierContextValue;\n\n // Check for duplicate qualifiers\n if (qualifierName in defaultValues) {\n return fail(`${qualifier.name}: duplicate qualifier in default values token`);\n }\n\n // Only add non-empty values (empty values remove defaults)\n if (contextValue !== '') {\n defaultValues[qualifierName] = contextValue;\n }\n }\n\n return succeed(defaultValues);\n }\n );\n }\n\n /**\n * Converts a validated qualifier default values declaration to a {@link QualifierDefaultValuesToken | qualifier default values token}.\n * @param decl - the validated qualifier default values declaration to convert\n * @returns `Success` with the qualifier default values token if successful, `Failure` with an error message if not.\n */\n public static declToQualifierDefaultValuesToken(\n decl: IValidatedQualifierDefaultValuesDecl\n ): Result<string> {\n const tokens: string[] = [];\n\n for (const [qualifierName, contextValue] of Object.entries(decl)) {\n // Build token as \"qualifier=value\"\n tokens.push(`${qualifierName}=${contextValue}`);\n }\n\n if (tokens.length === 0) {\n return succeed('');\n }\n\n const tokenString = tokens.join('|');\n\n // Validate the generated token\n return CommonHelpers.buildQualifierDefaultValuesToken(\n tokens.map((token) => {\n const [qualifier, value] = token.split('=');\n return { qualifier, value };\n })\n ).onSuccess(() => succeed(tokenString));\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/packlets/resource-json/compiled/common.ts"],"names":[],"mappings":"AAsBA;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../src/packlets/resource-json/compiled/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\n/**\n * Options for controlling the compilation of resource objects.\n * @public\n */\nexport interface ICompiledResourceOptions {\n /**\n * Whether to include metadata in the compiled objects.\n * Metadata includes human-readable information like semantic keys\n * that can be useful for debugging or tooling.\n * @defaultValue false\n */\n includeMetadata?: boolean;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../../../../src/packlets/resource-json/compiled/convert.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,KAAK,MAAM,QAAQ,CAAC;AAIhC;;;GAGG;AACH,eAAO,MAAM,yBAAyB,oFAEpC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,4BAA4B,uFAEvC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,wBAAwB,mFAEnC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,qBAAqB,gFAEhC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,iBAAiB,4EAI5B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,oBAAoB,+EAE/B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,iBAAiB,4EAO5B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,oBAAoB,+EAG/B,CAAC;AACH;;;GAGG;AACH,eAAO,MAAM,wBAAwB,mFAGnC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,iBAAiB,4EAI5B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,gBAAgB,2EAK3B,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,qFASrC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convert.js","sourceRoot":"","sources":["../../../../src/packlets/resource-json/compiled/convert.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qDAAuC;AACvC,4CAA2C;AAC3C,oDAAiE;AAGjE,2CAA2C;AAE3C;;;GAGG;AACU,QAAA,yBAAyB,GAAG,qBAAU,CAAC,YAAY,CAAmC;IACjG,GAAG,EAAE,MAAM,CAAC,OAAO,CAAC,YAAY;CACjC,CAAC,CAAC;AAEH;;;GAGG;AACU,QAAA,4BAA4B,GAAG,qBAAU,CAAC,YAAY,CAAsC;IACvG,GAAG,EAAE,MAAM,CAAC,OAAO,CAAC,eAAe;CACpC,CAAC,CAAC;AAEH;;;GAGG;AACU,QAAA,wBAAwB,GAAG,qBAAU,CAAC,YAAY,CAAkC;IAC/F,GAAG,EAAE,MAAM,CAAC,OAA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\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 */\nimport * as Common from '../../common';\nimport { Converters } from '@fgv/ts-utils';\nimport { Converters as JsonConverters } from '@fgv/ts-json-base';\nimport * as Model from './json';\n\n/* eslint-disable @rushstack/typedef-var */\n\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledConditionMetadata | compiled condition metadata}.\n * @public\n */\nexport const compiledConditionMetadata = Converters.strictObject<Model.ICompiledConditionMetadata>({\n key: Common.Convert.conditionKey\n});\n\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledConditionSetMetadata | compiled condition set metadata}.\n * @public\n */\nexport const compiledConditionSetMetadata = Converters.strictObject<Model.ICompiledConditionSetMetadata>({\n key: Common.Convert.conditionSetKey\n});\n\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledDecisionMetadata | compiled decision metadata}.\n * @public\n */\nexport const compiledDecisionMetadata = Converters.strictObject<Model.ICompiledDecisionMetadata>({\n key: Common.Convert.decisionKey\n});\n\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledQualifierType | compiled qualifier type}.\n * @public\n */\nexport const compiledQualifierType = Converters.strictObject<Model.ICompiledQualifierType>({\n name: Common.Convert.qualifierTypeName\n});\n\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledQualifier | compiled qualifier}.\n * @public\n */\nexport const compiledQualifier = Converters.strictObject<Model.ICompiledQualifier>({\n name: Common.Convert.qualifierName,\n type: Common.Convert.qualifierTypeIndex,\n defaultPriority: Common.Convert.conditionPriority\n});\n\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledResourceType | compiled resource type}.\n * @public\n */\nexport const compiledResourceType = Converters.strictObject<Model.ICompiledResourceType>({\n name: Common.Convert.resourceTypeName\n});\n\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledCondition | compiled condition}.\n * @public\n */\nexport const compiledCondition = Converters.strictObject<Model.ICompiledCondition>({\n qualifierIndex: Common.Convert.qualifierIndex,\n operator: Common.Convert.conditionOperator.optional(),\n value: Converters.string,\n priority: Common.Convert.conditionPriority,\n scoreAsDefault: Common.Convert.qualifierMatchScore.optional(),\n metadata: compiledConditionMetadata.optional()\n});\n\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledConditionSet | compiled condition set}.\n * @public\n */\nexport const compiledConditionSet = Converters.strictObject<Model.ICompiledConditionSet>({\n conditions: Converters.arrayOf(Common.Convert.conditionIndex),\n metadata: compiledConditionSetMetadata.optional()\n});\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledAbstractDecision | compiled abstract decision}.\n * @public\n */\nexport const compiledAbstractDecision = Converters.strictObject<Model.ICompiledAbstractDecision>({\n conditionSets: Converters.arrayOf(Common.Convert.conditionSetIndex),\n metadata: compiledDecisionMetadata.optional()\n});\n\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledCandidate | compiled candidate}.\n * @public\n */\nexport const compiledCandidate = Converters.strictObject<Model.ICompiledCandidate>({\n valueIndex: Common.Convert.candidateValueIndex,\n isPartial: Converters.boolean,\n mergeMethod: Common.Convert.resourceValueMergeMethod\n});\n\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledResource | compiled resource}.\n * @public\n */\nexport const compiledResource = Converters.strictObject<Model.ICompiledResource>({\n id: Common.Convert.resourceId,\n type: Common.Convert.resourceTypeIndex,\n decision: Common.Convert.decisionIndex,\n candidates: Converters.arrayOf(compiledCandidate)\n});\n\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledResourceCollection | compiled resource collection}.\n * This combines all the individual converters into a single converter for the entire resource collection.\n * @public\n */\nexport const compiledResourceCollection = Converters.strictObject<Model.ICompiledResourceCollection>({\n qualifiers: Converters.arrayOf(compiledQualifier),\n qualifierTypes: Converters.arrayOf(compiledQualifierType),\n resourceTypes: Converters.arrayOf(compiledResourceType),\n conditions: Converters.arrayOf(compiledCondition),\n conditionSets: Converters.arrayOf(compiledConditionSet),\n decisions: Converters.arrayOf(compiledAbstractDecision),\n candidateValues: Converters.arrayOf(JsonConverters.jsonValue),\n resources: Converters.arrayOf(compiledResource)\n});\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/packlets/resource-json/compiled/index.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAErC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/packlets/resource-json/compiled/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,mDAAqC;AAI5B,0BAAO;AAFhB,2CAAyB;AACzB,yCAAuB","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 * as Convert from './convert';\n\nexport * from './common';\nexport * from './json';\nexport { Convert };\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../../src/packlets/resource-json/compiled/json.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC,YAAY,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC,eAAe,CAAC;CAC7B;AAED;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC,WAAW,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAsB;I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;IACnB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC,wBAAwB,CAAC;CAC9C;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC,UAAU,CAAC;IAEtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC,iBAAiB,CAAC;IAE/B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC,aAAa,CAAC;IAC/B;;OAEG;IACH,UAAU,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;CAC/C;AAED;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,cAAc,EAAE,aAAa,CAAC,sBAAsB,CAAC,CAAC;IACtD;;OAEG;IACH,UAAU,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;IAC9C;;OAEG;IACH,aAAa,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;IACpD;;OAEG;IACH,UAAU,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;IAC9C;;OAEG;IACH,aAAa,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;IACpD;;OAEG;IACH,SAAS,EAAE,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACpD;;OAEG;IACH,eAAe,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IAC1C;;OAEG;IACH,SAAS,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;CAC7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json.js","sourceRoot":"","sources":["../../../../src/packlets/resource-json/compiled/json.ts"],"names":[],"mappings":"","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 */\nimport * as Common from '../../common';\nimport { JsonValue } from '@fgv/ts-json-base';\n\n/**\n * Metadata for a compiled condition, containing human-readable information.\n * @public\n */\nexport interface ICompiledConditionMetadata {\n /**\n * The semantic key of the condition (e.g., \"language=en-US\").\n */\n key: Common.ConditionKey;\n}\n\n/**\n * Metadata for a compiled condition set, containing human-readable information.\n * @public\n */\nexport interface ICompiledConditionSetMetadata {\n /**\n * The semantic key of the condition set (e.g., \"language=en-US,territory=US\").\n */\n key: Common.ConditionSetKey;\n}\n\n/**\n * Metadata for a compiled decision, containing human-readable information.\n * @public\n */\nexport interface ICompiledDecisionMetadata {\n /**\n * The semantic key of the decision (e.g., \"language=en-US,territory=US OR language=fr,territory=CA\").\n */\n key: Common.DecisionKey;\n}\n\n/**\n * Represents a compiled qualifier type with a name.\n * @public\n */\nexport interface ICompiledQualifierType {\n /**\n * The name of the qualifier type.\n */\n name: Common.QualifierTypeName;\n}\n\n/**\n * Represents a compiled qualifier with a name and type reference.\n * @public\n */\nexport interface ICompiledQualifier {\n /**\n * The name of the qualifier.\n */\n name: Common.QualifierName;\n /**\n * Index reference to the qualifier type.\n */\n type: Common.QualifierTypeIndex;\n\n /**\n * The token used to identify the qualifier in resource names or paths.\n */\n defaultPriority: Common.ConditionPriority;\n}\n\n/**\n * Represents a compiled resource type with a name.\n * @public\n */\nexport interface ICompiledResourceType {\n /**\n * The name of the resource type.\n */\n name: Common.ResourceTypeName;\n}\n\n/**\n * Represents a compiled condition used for resource selection.\n * @public\n */\nexport interface ICompiledCondition {\n /**\n * Index reference to the qualifier being evaluated.\n */\n qualifierIndex: Common.QualifierIndex;\n /**\n * Optional operator to apply in the condition evaluation.\n */\n operator?: Common.ConditionOperator;\n /**\n * The value to compare against when evaluating the condition.\n */\n value: string;\n /**\n * The priority of the condition when multiple conditions match.\n */\n priority: Common.ConditionPriority;\n /**\n * Optional score to use when treating this condition as a default.\n */\n scoreAsDefault?: Common.QualifierMatchScore;\n /**\n * Optional metadata containing human-readable information about this condition.\n */\n metadata?: ICompiledConditionMetadata;\n}\n\n/**\n * Represents a compiled set of conditions that must be satisfied together.\n * @public\n */\nexport interface ICompiledConditionSet {\n /**\n * Array of indices referencing the conditions in this set.\n */\n conditions: ReadonlyArray<Common.ConditionIndex>;\n /**\n * Optional metadata containing human-readable information about this condition set.\n */\n metadata?: ICompiledConditionSetMetadata;\n}\n\n/**\n * Represents a compiled abstract decision with condition sets.\n * @public\n */\nexport interface ICompiledAbstractDecision {\n /**\n * Array of indices referencing the condition sets for this decision.\n */\n conditionSets: ReadonlyArray<Common.ConditionSetIndex>;\n /**\n * Optional metadata containing human-readable information about this decision.\n */\n metadata?: ICompiledDecisionMetadata;\n}\n\n/**\n * Represents a compiled resource candidate with JSON value and merge properties.\n * @public\n */\nexport interface ICompiledCandidate {\n /**\n * The global index of the JSON value of the candidate.\n */\n valueIndex: Common.CandidateValueIndex;\n /**\n * Indicates if this is a partial resource that needs to be merged.\n */\n isPartial: boolean;\n /**\n * The method to use when merging this candidate with others.\n */\n mergeMethod: Common.ResourceValueMergeMethod;\n}\n\n/**\n * Represents a compiled resource with an identifier and associated candidates.\n * @public\n */\nexport interface ICompiledResource {\n /**\n * The unique identifier of the resource.\n */\n id: Common.ResourceId;\n\n /**\n * Index reference to the resource type of this resource.\n */\n type: Common.ResourceTypeIndex;\n\n /**\n * Index reference to the decision that determines when this resource applies.\n */\n decision: Common.DecisionIndex;\n /**\n * Array of candidate values for this resource.\n */\n candidates: ReadonlyArray<ICompiledCandidate>;\n}\n\n/**\n * Represents a complete compiled collection of resources with their associated\n * qualifiers, types, conditions, and decisions.\n * @public\n */\nexport interface ICompiledResourceCollection {\n /**\n * Array of all qualifier types in the collection.\n */\n qualifierTypes: ReadonlyArray<ICompiledQualifierType>;\n /**\n * Array of all qualifiers in the collection.\n */\n qualifiers: ReadonlyArray<ICompiledQualifier>;\n /**\n * Array of all resource types in the collection.\n */\n resourceTypes: ReadonlyArray<ICompiledResourceType>;\n /**\n * Array of all conditions in the collection.\n */\n conditions: ReadonlyArray<ICompiledCondition>;\n /**\n * Array of all condition sets in the collection.\n */\n conditionSets: ReadonlyArray<ICompiledConditionSet>;\n /**\n * Array of all decisions in the collection.\n */\n decisions: ReadonlyArray<ICompiledAbstractDecision>;\n /**\n * Array of all candidate values in the collection.\n */\n candidateValues: ReadonlyArray<JsonValue>;\n /**\n * Array of all resources in the collection.\n */\n resources: ReadonlyArray<ICompiledResource>;\n}\n"]}
|
|
@@ -67,4 +67,89 @@ export declare const resourceCollectionDecl: Converter<Normalized.IResourceColle
|
|
|
67
67
|
* @public
|
|
68
68
|
*/
|
|
69
69
|
export declare const importerResourceCollectionDecl: Converter<Normalized.IImporterResourceCollectionDecl>;
|
|
70
|
+
/**
|
|
71
|
+
* Returns a `Converter` for a `Json.ILooseConditionDecl<TQualifierNames>`
|
|
72
|
+
* narrowed on a supplied `qualifierName` converter.
|
|
73
|
+
*
|
|
74
|
+
* @public
|
|
75
|
+
*/
|
|
76
|
+
export declare function typedLooseConditionDecl<TQualifierNames extends string>(qualifierNameConverter: Converter<TQualifierNames>): Converter<Json.ILooseConditionDecl<TQualifierNames>>;
|
|
77
|
+
/**
|
|
78
|
+
* Returns a `Converter` for a `Json.ConditionSetDecl<TQualifierNames>`
|
|
79
|
+
* (either array form or record form) narrowed on a supplied `qualifierName`
|
|
80
|
+
* converter.
|
|
81
|
+
*
|
|
82
|
+
* @public
|
|
83
|
+
*/
|
|
84
|
+
export declare function typedConditionSetDecl<TQualifierNames extends string>(qualifierNameConverter: Converter<TQualifierNames>): Converter<Json.ConditionSetDecl<TQualifierNames>>;
|
|
85
|
+
/**
|
|
86
|
+
* Returns a `Converter` for a `Json.ILooseResourceCandidateDecl<TQualifierNames>`
|
|
87
|
+
* narrowed on a supplied `qualifierName` converter.
|
|
88
|
+
*
|
|
89
|
+
* @public
|
|
90
|
+
*/
|
|
91
|
+
export declare function typedLooseResourceCandidateDecl<TQualifierNames extends string>(qualifierNameConverter: Converter<TQualifierNames>): Converter<Json.ILooseResourceCandidateDecl<TQualifierNames>>;
|
|
92
|
+
/**
|
|
93
|
+
* Returns a `Converter` for a `Json.IImporterResourceCandidateDecl<TQualifierNames>`
|
|
94
|
+
* narrowed on a supplied `qualifierName` converter.
|
|
95
|
+
*
|
|
96
|
+
* @public
|
|
97
|
+
*/
|
|
98
|
+
export declare function typedImporterResourceCandidateDecl<TQualifierNames extends string>(qualifierNameConverter: Converter<TQualifierNames>): Converter<Json.IImporterResourceCandidateDecl<TQualifierNames>>;
|
|
99
|
+
/**
|
|
100
|
+
* Returns a `Converter` for a `Json.IChildResourceCandidateDecl<TQualifierNames>`
|
|
101
|
+
* narrowed on a supplied `qualifierName` converter.
|
|
102
|
+
*
|
|
103
|
+
* @public
|
|
104
|
+
*/
|
|
105
|
+
export declare function typedChildResourceCandidateDecl<TQualifierNames extends string>(qualifierNameConverter: Converter<TQualifierNames>): Converter<Json.IChildResourceCandidateDecl<TQualifierNames>>;
|
|
106
|
+
/**
|
|
107
|
+
* Returns a `Converter` for a `Json.ILooseResourceDecl<TQualifierNames>`
|
|
108
|
+
* narrowed on a supplied `qualifierName` converter.
|
|
109
|
+
*
|
|
110
|
+
* @public
|
|
111
|
+
*/
|
|
112
|
+
export declare function typedLooseResourceDecl<TQualifierNames extends string>(qualifierNameConverter: Converter<TQualifierNames>): Converter<Json.ILooseResourceDecl<TQualifierNames>>;
|
|
113
|
+
/**
|
|
114
|
+
* Returns a `Converter` for a `Json.IChildResourceDecl<TQualifierNames>`
|
|
115
|
+
* narrowed on a supplied `qualifierName` converter.
|
|
116
|
+
*
|
|
117
|
+
* @public
|
|
118
|
+
*/
|
|
119
|
+
export declare function typedChildResourceDecl<TQualifierNames extends string>(qualifierNameConverter: Converter<TQualifierNames>): Converter<Json.IChildResourceDecl<TQualifierNames>>;
|
|
120
|
+
/**
|
|
121
|
+
* Returns a `Converter` for a `Json.IContainerContextDecl<TQualifierNames>`
|
|
122
|
+
* narrowed on a supplied `qualifierName` converter.
|
|
123
|
+
*
|
|
124
|
+
* @public
|
|
125
|
+
*/
|
|
126
|
+
export declare function typedContainerContextDecl<TQualifierNames extends string>(qualifierNameConverter: Converter<TQualifierNames>): Converter<Json.IContainerContextDecl<TQualifierNames>>;
|
|
127
|
+
/**
|
|
128
|
+
* Returns a `Converter` for a `Json.IResourceTreeChildNodeDecl<TQualifierNames>`
|
|
129
|
+
* narrowed on a supplied `qualifierName` converter.
|
|
130
|
+
*
|
|
131
|
+
* @public
|
|
132
|
+
*/
|
|
133
|
+
export declare function typedResourceTreeChildNodeDecl<TQualifierNames extends string>(qualifierNameConverter: Converter<TQualifierNames>): Converter<Json.IResourceTreeChildNodeDecl<TQualifierNames>>;
|
|
134
|
+
/**
|
|
135
|
+
* Returns a `Converter` for a `Json.IResourceTreeRootDecl<TQualifierNames>`
|
|
136
|
+
* narrowed on a supplied `qualifierName` converter.
|
|
137
|
+
*
|
|
138
|
+
* @public
|
|
139
|
+
*/
|
|
140
|
+
export declare function typedResourceTreeRootDecl<TQualifierNames extends string>(qualifierNameConverter: Converter<TQualifierNames>): Converter<Json.IResourceTreeRootDecl<TQualifierNames>>;
|
|
141
|
+
/**
|
|
142
|
+
* Returns a `Converter` for a `Json.IResourceCollectionDecl<TQualifierNames>`
|
|
143
|
+
* narrowed on a supplied `qualifierName` converter.
|
|
144
|
+
*
|
|
145
|
+
* @public
|
|
146
|
+
*/
|
|
147
|
+
export declare function typedResourceCollectionDecl<TQualifierNames extends string>(qualifierNameConverter: Converter<TQualifierNames>): Converter<Json.IResourceCollectionDecl<TQualifierNames>>;
|
|
148
|
+
/**
|
|
149
|
+
* Returns a `Converter` for a `Json.IImporterResourceCollectionDecl<TQualifierNames>`
|
|
150
|
+
* narrowed on a supplied `qualifierName` converter.
|
|
151
|
+
*
|
|
152
|
+
* @public
|
|
153
|
+
*/
|
|
154
|
+
export declare function typedImporterResourceCollectionDecl<TQualifierNames extends string>(qualifierNameConverter: Converter<TQualifierNames>): Converter<Json.IImporterResourceCollectionDecl<TQualifierNames>>;
|
|
70
155
|
//# sourceMappingURL=convert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../../../src/packlets/resource-json/convert.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,SAAS,EAAwC,MAAM,eAAe,CAAC;AAGhF,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAE3C;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAAS,CAAC,IAAI,CAAC,mBAAmB,CAO/D,CAAC;AAEL;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAAS,CAAC,IAAI,CAAC,mBAAmB,CAM/D,CAAC;AA+BL;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,CAAC,UAAU,CAAC,gBAAgB,CACoC,CAAC;AAEzG;;;GAGG;AACH,eAAO,MAAM,0BAA0B,EAAE,SAAS,CAAC,UAAU,CAAC,2BAA2B,CAQrF,CAAC;AAEL;;;GAGG;AACH,eAAO,MAAM,6BAA6B,EAAE,SAAS,CAAC,UAAU,CAAC,8BAA8B,CAQ3F,CAAC;AAEL;;;GAGG;A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AAC,eAAe,CAAC,CAAC,CAMxD;AAED;;;;;GAKG;AAEH,wBAAgB,2BAA2B,CAAC,eAAe,SAAS,MAAM,EACxE,sBAAsB,EAAE,SAAS,CAAC,eAAe,CAAC,GACjD,SAAS,CAAC,IAAI,CAAC,uBAAuB,CAAC,eAAe,CAAC,CAAC,CAmB1D;AAED;;;;;GAKG;AAEH,wBAAgB,mCAAmC,CAAC,eAAe,SAAS,MAAM,EAChF,sBAAsB,EAAE,SAAS,CAAC,eAAe,CAAC,GACjD,SAAS,CAAC,IAAI,CAAC,+BAA+B,CAAC,eAAe,CAAC,CAAC,CAoBlE"}
|
|
@@ -22,6 +22,18 @@
|
|
|
22
22
|
*/
|
|
23
23
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
24
|
exports.importerResourceCollectionDecl = exports.resourceCollectionDecl = exports.resourceTreeRootDecl = exports.resourceTreeChildNodeDecl = exports.containerContextDecl = exports.childResourceDecl = exports.looseResourceDecl = exports.childResourceCandidateDecl = exports.importerResourceCandidateDecl = exports.looseResourceCandidateDecl = exports.conditionSetDecl = exports.childConditionDecl = exports.looseConditionDecl = void 0;
|
|
25
|
+
exports.typedLooseConditionDecl = typedLooseConditionDecl;
|
|
26
|
+
exports.typedConditionSetDecl = typedConditionSetDecl;
|
|
27
|
+
exports.typedLooseResourceCandidateDecl = typedLooseResourceCandidateDecl;
|
|
28
|
+
exports.typedImporterResourceCandidateDecl = typedImporterResourceCandidateDecl;
|
|
29
|
+
exports.typedChildResourceCandidateDecl = typedChildResourceCandidateDecl;
|
|
30
|
+
exports.typedLooseResourceDecl = typedLooseResourceDecl;
|
|
31
|
+
exports.typedChildResourceDecl = typedChildResourceDecl;
|
|
32
|
+
exports.typedContainerContextDecl = typedContainerContextDecl;
|
|
33
|
+
exports.typedResourceTreeChildNodeDecl = typedResourceTreeChildNodeDecl;
|
|
34
|
+
exports.typedResourceTreeRootDecl = typedResourceTreeRootDecl;
|
|
35
|
+
exports.typedResourceCollectionDecl = typedResourceCollectionDecl;
|
|
36
|
+
exports.typedImporterResourceCollectionDecl = typedImporterResourceCollectionDecl;
|
|
25
37
|
const ts_utils_1 = require("@fgv/ts-utils");
|
|
26
38
|
const common_1 = require("../common");
|
|
27
39
|
const ts_json_base_1 = require("@fgv/ts-json-base");
|
|
@@ -171,4 +183,229 @@ exports.importerResourceCollectionDecl = ts_utils_1.Converters.generic((from, se
|
|
|
171
183
|
metadata: ts_json_base_1.Converters.jsonObject.optional()
|
|
172
184
|
}).convert(from, context);
|
|
173
185
|
});
|
|
186
|
+
// --- Typed sibling converters (Phase B-2) -----------------------------------
|
|
187
|
+
//
|
|
188
|
+
// Each `typed*<TQualifierNames>(qualifierNameConverter)` returns a converter
|
|
189
|
+
// whose result type is narrowed on `TQualifierNames`. The existing untyped
|
|
190
|
+
// exports above remain unchanged at the signature and behavior level; consumers
|
|
191
|
+
// opt in by calling a typed sibling. Internally each typed factory composes
|
|
192
|
+
// lower-level typed factories so a single `qualifierNameConverter` flows
|
|
193
|
+
// end-to-end through the converter tree.
|
|
194
|
+
//
|
|
195
|
+
// DRIFT HAZARD: each typed sibling duplicates the field list of its untyped
|
|
196
|
+
// twin (the duplication exists to preserve `ObjectConverter` return types on
|
|
197
|
+
// the defaults — see phase-b2-result.md). If a field is added, removed, or
|
|
198
|
+
// re-typed on an untyped converter above, the typed sibling MUST be updated
|
|
199
|
+
// in lockstep. The per-pair `keep in sync with X` markers below flag each
|
|
200
|
+
// pair at the call site.
|
|
201
|
+
/**
|
|
202
|
+
* Returns a `Converter` for a `Json.ILooseConditionDecl<TQualifierNames>`
|
|
203
|
+
* narrowed on a supplied `qualifierName` converter.
|
|
204
|
+
*
|
|
205
|
+
* @public
|
|
206
|
+
*/
|
|
207
|
+
// Keep in sync with `looseConditionDecl` above.
|
|
208
|
+
function typedLooseConditionDecl(qualifierNameConverter) {
|
|
209
|
+
return ts_utils_1.Converters.strictObject({
|
|
210
|
+
qualifierName: qualifierNameConverter,
|
|
211
|
+
value: ts_utils_1.Converters.string,
|
|
212
|
+
operator: common_1.Convert.conditionOperator.optional(),
|
|
213
|
+
priority: common_1.Convert.conditionPriority.optional(),
|
|
214
|
+
scoreAsDefault: ts_utils_1.Converters.number.optional()
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
function _typedConditionSetDeclFromArray(innerLooseConditionDecl) {
|
|
218
|
+
return ts_utils_1.Converters.arrayOf(innerLooseConditionDecl);
|
|
219
|
+
}
|
|
220
|
+
function _typedConditionSetDeclFromRecord(innerLooseConditionDecl) {
|
|
221
|
+
return ts_utils_1.Converters.generic((from, __self, context) => {
|
|
222
|
+
/* c8 ignore next 3 - branch covered by underlying record check */
|
|
223
|
+
if (!_isConditionSetRecord(from)) {
|
|
224
|
+
return (0, ts_utils_1.fail)('Expected an object');
|
|
225
|
+
}
|
|
226
|
+
return (0, ts_utils_1.mapResults)(Array.from(Object.entries(from)).map(([qualifierName, value]) => {
|
|
227
|
+
const toConvert = typeof value === 'string' ? { qualifierName, value } : Object.assign({ qualifierName }, value);
|
|
228
|
+
return innerLooseConditionDecl.convert(toConvert, context);
|
|
229
|
+
}));
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Returns a `Converter` for a `Json.ConditionSetDecl<TQualifierNames>`
|
|
234
|
+
* (either array form or record form) narrowed on a supplied `qualifierName`
|
|
235
|
+
* converter.
|
|
236
|
+
*
|
|
237
|
+
* @public
|
|
238
|
+
*/
|
|
239
|
+
// Keep in sync with `conditionSetDecl` (and its two private feeder converters
|
|
240
|
+
// `conditionSetDeclFromArray` / `conditionSetDeclFromRecord`) above.
|
|
241
|
+
function typedConditionSetDecl(qualifierNameConverter) {
|
|
242
|
+
const inner = typedLooseConditionDecl(qualifierNameConverter);
|
|
243
|
+
return ts_utils_1.Converters.oneOf([
|
|
244
|
+
_typedConditionSetDeclFromArray(inner),
|
|
245
|
+
_typedConditionSetDeclFromRecord(inner)
|
|
246
|
+
]);
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Returns a `Converter` for a `Json.ILooseResourceCandidateDecl<TQualifierNames>`
|
|
250
|
+
* narrowed on a supplied `qualifierName` converter.
|
|
251
|
+
*
|
|
252
|
+
* @public
|
|
253
|
+
*/
|
|
254
|
+
// Keep in sync with `looseResourceCandidateDecl` above.
|
|
255
|
+
function typedLooseResourceCandidateDecl(qualifierNameConverter) {
|
|
256
|
+
return ts_utils_1.Converters.strictObject({
|
|
257
|
+
id: common_1.Convert.resourceId,
|
|
258
|
+
json: ts_json_base_1.Converters.jsonObject,
|
|
259
|
+
conditions: typedConditionSetDecl(qualifierNameConverter).optional(),
|
|
260
|
+
mergeMethod: common_1.Convert.resourceValueMergeMethod.optional(),
|
|
261
|
+
isPartial: ts_utils_1.Converters.boolean.optional(),
|
|
262
|
+
resourceTypeName: common_1.Convert.resourceTypeName.optional()
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Returns a `Converter` for a `Json.IImporterResourceCandidateDecl<TQualifierNames>`
|
|
267
|
+
* narrowed on a supplied `qualifierName` converter.
|
|
268
|
+
*
|
|
269
|
+
* @public
|
|
270
|
+
*/
|
|
271
|
+
// Keep in sync with `importerResourceCandidateDecl` above.
|
|
272
|
+
function typedImporterResourceCandidateDecl(qualifierNameConverter) {
|
|
273
|
+
return ts_utils_1.Converters.strictObject({
|
|
274
|
+
id: common_1.Convert.resourceId.optional(),
|
|
275
|
+
json: ts_json_base_1.Converters.jsonObject,
|
|
276
|
+
conditions: typedConditionSetDecl(qualifierNameConverter).optional(),
|
|
277
|
+
mergeMethod: common_1.Convert.resourceValueMergeMethod.optional(),
|
|
278
|
+
isPartial: ts_utils_1.Converters.boolean.optional(),
|
|
279
|
+
resourceTypeName: common_1.Convert.resourceTypeName.optional()
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Returns a `Converter` for a `Json.IChildResourceCandidateDecl<TQualifierNames>`
|
|
284
|
+
* narrowed on a supplied `qualifierName` converter.
|
|
285
|
+
*
|
|
286
|
+
* @public
|
|
287
|
+
*/
|
|
288
|
+
// Keep in sync with `childResourceCandidateDecl` above.
|
|
289
|
+
function typedChildResourceCandidateDecl(qualifierNameConverter) {
|
|
290
|
+
return ts_utils_1.Converters.strictObject({
|
|
291
|
+
json: ts_json_base_1.Converters.jsonObject,
|
|
292
|
+
conditions: typedConditionSetDecl(qualifierNameConverter).optional(),
|
|
293
|
+
isPartial: ts_utils_1.Converters.boolean.optional(),
|
|
294
|
+
mergeMethod: common_1.Convert.resourceValueMergeMethod.optional()
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Returns a `Converter` for a `Json.ILooseResourceDecl<TQualifierNames>`
|
|
299
|
+
* narrowed on a supplied `qualifierName` converter.
|
|
300
|
+
*
|
|
301
|
+
* @public
|
|
302
|
+
*/
|
|
303
|
+
// Keep in sync with `looseResourceDecl` above.
|
|
304
|
+
function typedLooseResourceDecl(qualifierNameConverter) {
|
|
305
|
+
return ts_utils_1.Converters.strictObject({
|
|
306
|
+
id: common_1.Convert.resourceId,
|
|
307
|
+
resourceTypeName: common_1.Convert.resourceTypeName,
|
|
308
|
+
candidates: ts_utils_1.Converters.arrayOf(typedChildResourceCandidateDecl(qualifierNameConverter)).optional()
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* Returns a `Converter` for a `Json.IChildResourceDecl<TQualifierNames>`
|
|
313
|
+
* narrowed on a supplied `qualifierName` converter.
|
|
314
|
+
*
|
|
315
|
+
* @public
|
|
316
|
+
*/
|
|
317
|
+
// Keep in sync with `childResourceDecl` above.
|
|
318
|
+
function typedChildResourceDecl(qualifierNameConverter) {
|
|
319
|
+
return ts_utils_1.Converters.strictObject({
|
|
320
|
+
resourceTypeName: common_1.Convert.resourceTypeName,
|
|
321
|
+
candidates: ts_utils_1.Converters.arrayOf(typedChildResourceCandidateDecl(qualifierNameConverter)).optional()
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Returns a `Converter` for a `Json.IContainerContextDecl<TQualifierNames>`
|
|
326
|
+
* narrowed on a supplied `qualifierName` converter.
|
|
327
|
+
*
|
|
328
|
+
* @public
|
|
329
|
+
*/
|
|
330
|
+
// Keep in sync with `containerContextDecl` above.
|
|
331
|
+
function typedContainerContextDecl(qualifierNameConverter) {
|
|
332
|
+
return ts_utils_1.Converters.strictObject({
|
|
333
|
+
baseId: ts_utils_1.Converters.oneOf([common_1.Convert.resourceId, ts_utils_1.Converters.literal('')]).optional(),
|
|
334
|
+
conditions: typedConditionSetDecl(qualifierNameConverter).optional(),
|
|
335
|
+
mergeMethod: common_1.Convert.resourceValueMergeMethod.optional()
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Returns a `Converter` for a `Json.IResourceTreeChildNodeDecl<TQualifierNames>`
|
|
340
|
+
* narrowed on a supplied `qualifierName` converter.
|
|
341
|
+
*
|
|
342
|
+
* @public
|
|
343
|
+
*/
|
|
344
|
+
// Keep in sync with `resourceTreeChildNodeDecl` above.
|
|
345
|
+
function typedResourceTreeChildNodeDecl(qualifierNameConverter) {
|
|
346
|
+
const childResource = typedChildResourceDecl(qualifierNameConverter);
|
|
347
|
+
return ts_utils_1.Converters.generic((from, self, context) => {
|
|
348
|
+
return ts_utils_1.Converters.strictObject({
|
|
349
|
+
resources: ts_utils_1.Converters.recordOf(childResource).optional(),
|
|
350
|
+
children: ts_utils_1.Converters.recordOf(self).optional()
|
|
351
|
+
}).convert(from, context);
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* Returns a `Converter` for a `Json.IResourceTreeRootDecl<TQualifierNames>`
|
|
356
|
+
* narrowed on a supplied `qualifierName` converter.
|
|
357
|
+
*
|
|
358
|
+
* @public
|
|
359
|
+
*/
|
|
360
|
+
// Keep in sync with `resourceTreeRootDecl` above.
|
|
361
|
+
function typedResourceTreeRootDecl(qualifierNameConverter) {
|
|
362
|
+
return ts_utils_1.Converters.strictObject({
|
|
363
|
+
context: typedContainerContextDecl(qualifierNameConverter).optional(),
|
|
364
|
+
resources: ts_utils_1.Converters.recordOf(typedChildResourceDecl(qualifierNameConverter)).optional(),
|
|
365
|
+
children: ts_utils_1.Converters.recordOf(typedResourceTreeChildNodeDecl(qualifierNameConverter)).optional()
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* Returns a `Converter` for a `Json.IResourceCollectionDecl<TQualifierNames>`
|
|
370
|
+
* narrowed on a supplied `qualifierName` converter.
|
|
371
|
+
*
|
|
372
|
+
* @public
|
|
373
|
+
*/
|
|
374
|
+
// Keep in sync with `resourceCollectionDecl` above.
|
|
375
|
+
function typedResourceCollectionDecl(qualifierNameConverter) {
|
|
376
|
+
const containerContext = typedContainerContextDecl(qualifierNameConverter);
|
|
377
|
+
const looseCandidate = typedLooseResourceCandidateDecl(qualifierNameConverter);
|
|
378
|
+
const looseResource = typedLooseResourceDecl(qualifierNameConverter);
|
|
379
|
+
return ts_utils_1.Converters.generic((from, self, context) => {
|
|
380
|
+
return ts_utils_1.Converters.strictObject({
|
|
381
|
+
context: containerContext.optional(),
|
|
382
|
+
candidates: ts_utils_1.Converters.arrayOf(looseCandidate).optional(),
|
|
383
|
+
resources: ts_utils_1.Converters.arrayOf(looseResource).optional(),
|
|
384
|
+
collections: ts_utils_1.Converters.arrayOf(self).optional(),
|
|
385
|
+
metadata: ts_json_base_1.Converters.jsonObject.optional()
|
|
386
|
+
}).convert(from, context);
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* Returns a `Converter` for a `Json.IImporterResourceCollectionDecl<TQualifierNames>`
|
|
391
|
+
* narrowed on a supplied `qualifierName` converter.
|
|
392
|
+
*
|
|
393
|
+
* @public
|
|
394
|
+
*/
|
|
395
|
+
// Keep in sync with `importerResourceCollectionDecl` above.
|
|
396
|
+
function typedImporterResourceCollectionDecl(qualifierNameConverter) {
|
|
397
|
+
const containerContext = typedContainerContextDecl(qualifierNameConverter);
|
|
398
|
+
const importerCandidate = typedImporterResourceCandidateDecl(qualifierNameConverter);
|
|
399
|
+
const looseResource = typedLooseResourceDecl(qualifierNameConverter);
|
|
400
|
+
const childResource = typedChildResourceDecl(qualifierNameConverter);
|
|
401
|
+
return ts_utils_1.Converters.generic((from, self, context) => {
|
|
402
|
+
return ts_utils_1.Converters.strictObject({
|
|
403
|
+
context: containerContext.optional(),
|
|
404
|
+
candidates: ts_utils_1.Converters.arrayOf(importerCandidate).optional(),
|
|
405
|
+
resources: ts_utils_1.Converters.arrayOf(ts_utils_1.Converters.oneOf([looseResource, childResource])).optional(),
|
|
406
|
+
collections: ts_utils_1.Converters.arrayOf(self).optional(),
|
|
407
|
+
metadata: ts_json_base_1.Converters.jsonObject.optional()
|
|
408
|
+
}).convert(from, context);
|
|
409
|
+
});
|
|
410
|
+
}
|
|
174
411
|
//# sourceMappingURL=convert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convert.js","sourceRoot":"","sources":["../../../src/packlets/resource-json/convert.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;AAgPH,0DAUC;AAyCD,sDAQC;AASD,0EAWC;AASD,gFAWC;AASD,0EASC;AASD,wDAQC;AASD,wDAOC;AASD,8DAQC;AASD,wEAgBC;AASD,8DAQC;AASD,kEAqBC;AASD,kFAsBC;AA5fD,4CAAgF;AAChF,sCAAqD;AACrD,oDAA+E;AAI/E;;;GAGG;AACU,QAAA,kBAAkB,GAC7B,qBAAU,CAAC,YAAY,CAA2B;IAChD,aAAa,EAAE,gBAAa,CAAC,aAAa;IAC1C,KAAK,EAAE,qBAAU,CAAC,MAAM;IACxB,QAAQ,EAAE,gBAAa,CAAC,iBAAiB,CAAC,QAAQ,EAAE;IACpD,QAAQ,EAAE,gBAAa,CAAC,iBAAiB,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ACE,IAAa,EACb,IAA+E,EAC/E,OAAiB,EAC8C,EAAE;QACjE,OAAO,qBAAU,CAAC,YAAY,CAAwD;YACpF,OAAO,EAAE,gBAAgB,CAAC,QAAQ,EAAE;YACpC,UAAU,EAAE,qBAAU,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,QAAQ,EAAE;YAC5D,SAAS,EAAE,qBAAU,CAAC,OAAO,CAAC,qBAAU,CAAC,KAAK,CAAC,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;YAC1F,WAAW,EAAE,qBAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;YAChD,QAAQ,EAAE,yBAAc,CAAC,UAAU,CAAC,QAAQ,EAAE;SAC/C,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC5B,CAAC,CACF,CAAC;AACJ,CAAC","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 { Converter, Converters, mapResults, Result, fail } from '@fgv/ts-utils';\nimport { Convert as CommonConvert } from '../common';\nimport { isJsonObject, Converters as JsonConverters } from '@fgv/ts-json-base';\nimport * as Json from './json';\nimport * as Normalized from './normalized';\n\n/**\n * `Converter` for a normalized {@link ResourceJson.Json.ILooseConditionDecl | loose condition declaration}.\n * @public\n */\nexport const looseConditionDecl: Converter<Json.ILooseConditionDecl> =\n Converters.strictObject<Json.ILooseConditionDecl>({\n qualifierName: CommonConvert.qualifierName,\n value: Converters.string,\n operator: CommonConvert.conditionOperator.optional(),\n priority: CommonConvert.conditionPriority.optional(),\n scoreAsDefault: Converters.number.optional()\n });\n\n/**\n * `Converter` for a normalized {@link ResourceJson.Json.IChildConditionDecl | child condition declaration}.\n * @public\n */\nexport const childConditionDecl: Converter<Json.IChildConditionDecl> =\n Converters.strictObject<Json.IChildConditionDecl>({\n value: Converters.string,\n operator: CommonConvert.conditionOperator.optional(),\n priority: CommonConvert.conditionPriority.optional(),\n scoreAsDefault: Converters.number.optional()\n });\n\nfunction _isConditionSetRecord(from: unknown): from is Record<string, string | Json.IChildConditionDecl> {\n return isJsonObject(from);\n}\n\nconst conditionSetDeclFromArray: Converter<Normalized.ConditionSetDecl> =\n Converters.arrayOf(looseConditionDecl);\nconst conditionSetDeclFromRecord: Converter<Normalized.ConditionSetDecl> = Converters.generic<\n Normalized.ConditionSetDecl,\n unknown\n>(\n (\n from: unknown,\n __self: Converter<Normalized.ConditionSetDecl, unknown>,\n context?: unknown\n ): Result<Normalized.ConditionSetDecl> => {\n /* c8 ignore next 3 - this is tested but coverage is confused */\n if (!_isConditionSetRecord(from)) {\n return fail('Expected an object');\n }\n return mapResults(\n Array.from(Object.entries(from)).map(([qualifierName, value]) => {\n const toConvert: Json.ILooseConditionDecl =\n typeof value === 'string' ? { qualifierName, value } : { qualifierName, ...value };\n return looseConditionDecl.convert(toConvert, context);\n })\n );\n }\n);\n\n/**\n * `Converter` for a normalized {@link ResourceJson.Normalized.ConditionSetDecl | condition set declaration}.\n * @public\n */\nexport const conditionSetDecl: Converter<Normalized.ConditionSetDecl> =\n Converters.oneOf<Normalized.ConditionSetDecl>([conditionSetDeclFromArray, conditionSetDeclFromRecord]);\n\n/**\n * `Converter` for a normalized {@link ResourceJson.Json.ILooseResourceCandidateDecl | loose resource candidate declaration}.\n * @public\n */\nexport const looseResourceCandidateDecl: Converter<Normalized.ILooseResourceCandidateDecl> =\n Converters.strictObject<Normalized.ILooseResourceCandidateDecl>({\n id: CommonConvert.resourceId,\n json: JsonConverters.jsonObject,\n conditions: conditionSetDecl.optional(),\n mergeMethod: CommonConvert.resourceValueMergeMethod.optional(),\n isPartial: Converters.boolean.optional(),\n resourceTypeName: CommonConvert.resourceTypeName.optional()\n });\n\n/**\n * `Converter` for a normalized {@link ResourceJson.Normalized.IImporterResourceCandidateDecl | importer resource candidate declaration}.\n * @public\n */\nexport const importerResourceCandidateDecl: Converter<Normalized.IImporterResourceCandidateDecl> =\n Converters.strictObject<Normalized.IImporterResourceCandidateDecl>({\n id: CommonConvert.resourceId.optional(),\n json: JsonConverters.jsonObject,\n conditions: conditionSetDecl.optional(),\n mergeMethod: CommonConvert.resourceValueMergeMethod.optional(),\n isPartial: Converters.boolean.optional(),\n resourceTypeName: CommonConvert.resourceTypeName.optional()\n });\n\n/**\n * `Converter` for a normalized {@link ResourceJson.Json.IChildResourceCandidateDecl | child resource candidate declaration}.\n * @public\n */\nexport const childResourceCandidateDecl: Converter<Normalized.IChildResourceCandidateDecl> =\n Converters.strictObject<Normalized.IChildResourceCandidateDecl>({\n json: JsonConverters.jsonObject,\n conditions: conditionSetDecl.optional(),\n isPartial: Converters.boolean.optional(),\n mergeMethod: CommonConvert.resourceValueMergeMethod.optional()\n });\n\n/**\n * `Converter` for a normalized {@link ResourceJson.Normalized.ILooseResourceDecl | loose resource declaration}.\n * @public\n */\nexport const looseResourceDecl: Converter<Normalized.ILooseResourceDecl> =\n Converters.strictObject<Normalized.ILooseResourceDecl>({\n id: CommonConvert.resourceId,\n resourceTypeName: CommonConvert.resourceTypeName,\n candidates: Converters.arrayOf(childResourceCandidateDecl).optional()\n });\n\n/**\n * `Converter` for a normalized {@link ResourceJson.Normalized.IChildResourceDecl | child resource declaration}.\n * @public\n */\nexport const childResourceDecl: Converter<Normalized.IChildResourceDecl> =\n Converters.strictObject<Normalized.IChildResourceDecl>({\n resourceTypeName: CommonConvert.resourceTypeName,\n candidates: Converters.arrayOf(childResourceCandidateDecl).optional()\n });\n\n/**\n * `Converter` for a normalized {@link ResourceJson.Normalized.IContainerContextDecl | resource context declaration}.\n * @public\n */\nexport const containerContextDecl: Converter<Normalized.IContainerContextDecl> =\n Converters.strictObject<Normalized.IContainerContextDecl>({\n baseId: Converters.oneOf([CommonConvert.resourceId, Converters.literal('')]).optional(),\n conditions: conditionSetDecl.optional(),\n mergeMethod: CommonConvert.resourceValueMergeMethod.optional()\n });\n\n/**\n * `Converter` for a normalized {@link ResourceJson.Normalized.IResourceTreeChildNodeDecl | resource tree child node declaration}.\n * @public\n */\nexport const resourceTreeChildNodeDecl: Converter<Normalized.IResourceTreeChildNodeDecl> = Converters.generic<\n Normalized.IResourceTreeChildNodeDecl,\n unknown\n>(\n (\n from: unknown,\n self: Converter<Normalized.IResourceTreeChildNodeDecl, unknown>,\n context?: unknown\n ): Result<Normalized.IResourceTreeChildNodeDecl> => {\n return Converters.strictObject<Normalized.IResourceTreeChildNodeDecl>({\n resources: Converters.recordOf(childResourceDecl).optional(),\n children: Converters.recordOf(self).optional()\n }).convert(from, context);\n }\n);\n\n/**\n * `Converter` for a normalized {@link ResourceJson.Normalized.IResourceTreeRootDecl | resource tree root declaration}.\n * @public\n */\nexport const resourceTreeRootDecl: Converter<Normalized.IResourceTreeRootDecl> =\n Converters.strictObject<Normalized.IResourceTreeRootDecl>({\n context: containerContextDecl.optional(),\n resources: Converters.recordOf(childResourceDecl).optional(),\n children: Converters.recordOf(resourceTreeChildNodeDecl).optional()\n });\n\n/**\n * `Converter` for a normalized {@link ResourceJson.Normalized.IResourceCollectionDecl | resource collection declaration}.\n * @public\n */\nexport const resourceCollectionDecl: Converter<Normalized.IResourceCollectionDecl> = Converters.generic<\n Normalized.IResourceCollectionDecl,\n unknown\n>(\n (\n from: unknown,\n self: Converter<Normalized.IResourceCollectionDecl, unknown>,\n context?: unknown\n ): Result<Normalized.IResourceCollectionDecl> => {\n return Converters.strictObject<Normalized.IResourceCollectionDecl>({\n context: containerContextDecl.optional(),\n candidates: Converters.arrayOf(looseResourceCandidateDecl).optional(),\n resources: Converters.arrayOf(looseResourceDecl).optional(),\n collections: Converters.arrayOf(self).optional(),\n metadata: JsonConverters.jsonObject.optional()\n }).convert(from, context);\n }\n);\n\n/**\n * `Converter` for a normalized {@link ResourceJson.Normalized.IImporterResourceCollectionDecl | importer resource collection declaration}.\n * This allows for a mix of loose and child resource declarations.\n * @public\n */\nexport const importerResourceCollectionDecl: Converter<Normalized.IImporterResourceCollectionDecl> =\n Converters.generic<Normalized.IImporterResourceCollectionDecl, unknown>(\n (\n from: unknown,\n self: Converter<Normalized.IImporterResourceCollectionDecl, unknown>,\n context?: unknown\n ): Result<Normalized.IImporterResourceCollectionDecl> => {\n return Converters.strictObject<Normalized.IImporterResourceCollectionDecl>({\n context: containerContextDecl.optional(),\n candidates: Converters.arrayOf(importerResourceCandidateDecl).optional(),\n resources: Converters.arrayOf(Converters.oneOf([looseResourceDecl, childResourceDecl])).optional(),\n collections: Converters.arrayOf(self).optional(),\n metadata: JsonConverters.jsonObject.optional()\n }).convert(from, context);\n }\n );\n\n// --- Typed sibling converters (Phase B-2) -----------------------------------\n//\n// Each `typed*<TQualifierNames>(qualifierNameConverter)` returns a converter\n// whose result type is narrowed on `TQualifierNames`. The existing untyped\n// exports above remain unchanged at the signature and behavior level; consumers\n// opt in by calling a typed sibling. Internally each typed factory composes\n// lower-level typed factories so a single `qualifierNameConverter` flows\n// end-to-end through the converter tree.\n//\n// DRIFT HAZARD: each typed sibling duplicates the field list of its untyped\n// twin (the duplication exists to preserve `ObjectConverter` return types on\n// the defaults — see phase-b2-result.md). If a field is added, removed, or\n// re-typed on an untyped converter above, the typed sibling MUST be updated\n// in lockstep. The per-pair `keep in sync with X` markers below flag each\n// pair at the call site.\n\n/**\n * Returns a `Converter` for a `Json.ILooseConditionDecl<TQualifierNames>`\n * narrowed on a supplied `qualifierName` converter.\n *\n * @public\n */\n// Keep in sync with `looseConditionDecl` above.\nexport function typedLooseConditionDecl<TQualifierNames extends string>(\n qualifierNameConverter: Converter<TQualifierNames>\n): Converter<Json.ILooseConditionDecl<TQualifierNames>> {\n return Converters.strictObject<Json.ILooseConditionDecl<TQualifierNames>>({\n qualifierName: qualifierNameConverter,\n value: Converters.string,\n operator: CommonConvert.conditionOperator.optional(),\n priority: CommonConvert.conditionPriority.optional(),\n scoreAsDefault: Converters.number.optional()\n });\n}\n\nfunction _typedConditionSetDeclFromArray<TQualifierNames extends string>(\n innerLooseConditionDecl: Converter<Json.ILooseConditionDecl<TQualifierNames>>\n): Converter<Json.ConditionSetDeclAsArray<TQualifierNames>> {\n return Converters.arrayOf(innerLooseConditionDecl);\n}\n\nfunction _typedConditionSetDeclFromRecord<TQualifierNames extends string>(\n innerLooseConditionDecl: Converter<Json.ILooseConditionDecl<TQualifierNames>>\n): Converter<Json.ConditionSetDecl<TQualifierNames>> {\n return Converters.generic<Json.ConditionSetDecl<TQualifierNames>, unknown>(\n (\n from: unknown,\n __self: Converter<Json.ConditionSetDecl<TQualifierNames>, unknown>,\n context?: unknown\n ): Result<Json.ConditionSetDecl<TQualifierNames>> => {\n /* c8 ignore next 3 - branch covered by underlying record check */\n if (!_isConditionSetRecord(from)) {\n return fail('Expected an object');\n }\n return mapResults(\n Array.from(Object.entries(from)).map(([qualifierName, value]) => {\n const toConvert: Json.ILooseConditionDecl =\n typeof value === 'string' ? { qualifierName, value } : { qualifierName, ...value };\n return innerLooseConditionDecl.convert(toConvert, context);\n })\n );\n }\n );\n}\n\n/**\n * Returns a `Converter` for a `Json.ConditionSetDecl<TQualifierNames>`\n * (either array form or record form) narrowed on a supplied `qualifierName`\n * converter.\n *\n * @public\n */\n// Keep in sync with `conditionSetDecl` (and its two private feeder converters\n// `conditionSetDeclFromArray` / `conditionSetDeclFromRecord`) above.\nexport function typedConditionSetDecl<TQualifierNames extends string>(\n qualifierNameConverter: Converter<TQualifierNames>\n): Converter<Json.ConditionSetDecl<TQualifierNames>> {\n const inner = typedLooseConditionDecl(qualifierNameConverter);\n return Converters.oneOf<Json.ConditionSetDecl<TQualifierNames>>([\n _typedConditionSetDeclFromArray(inner),\n _typedConditionSetDeclFromRecord(inner)\n ]);\n}\n\n/**\n * Returns a `Converter` for a `Json.ILooseResourceCandidateDecl<TQualifierNames>`\n * narrowed on a supplied `qualifierName` converter.\n *\n * @public\n */\n// Keep in sync with `looseResourceCandidateDecl` above.\nexport function typedLooseResourceCandidateDecl<TQualifierNames extends string>(\n qualifierNameConverter: Converter<TQualifierNames>\n): Converter<Json.ILooseResourceCandidateDecl<TQualifierNames>> {\n return Converters.strictObject<Json.ILooseResourceCandidateDecl<TQualifierNames>>({\n id: CommonConvert.resourceId,\n json: JsonConverters.jsonObject,\n conditions: typedConditionSetDecl(qualifierNameConverter).optional(),\n mergeMethod: CommonConvert.resourceValueMergeMethod.optional(),\n isPartial: Converters.boolean.optional(),\n resourceTypeName: CommonConvert.resourceTypeName.optional()\n });\n}\n\n/**\n * Returns a `Converter` for a `Json.IImporterResourceCandidateDecl<TQualifierNames>`\n * narrowed on a supplied `qualifierName` converter.\n *\n * @public\n */\n// Keep in sync with `importerResourceCandidateDecl` above.\nexport function typedImporterResourceCandidateDecl<TQualifierNames extends string>(\n qualifierNameConverter: Converter<TQualifierNames>\n): Converter<Json.IImporterResourceCandidateDecl<TQualifierNames>> {\n return Converters.strictObject<Json.IImporterResourceCandidateDecl<TQualifierNames>>({\n id: CommonConvert.resourceId.optional(),\n json: JsonConverters.jsonObject,\n conditions: typedConditionSetDecl(qualifierNameConverter).optional(),\n mergeMethod: CommonConvert.resourceValueMergeMethod.optional(),\n isPartial: Converters.boolean.optional(),\n resourceTypeName: CommonConvert.resourceTypeName.optional()\n });\n}\n\n/**\n * Returns a `Converter` for a `Json.IChildResourceCandidateDecl<TQualifierNames>`\n * narrowed on a supplied `qualifierName` converter.\n *\n * @public\n */\n// Keep in sync with `childResourceCandidateDecl` above.\nexport function typedChildResourceCandidateDecl<TQualifierNames extends string>(\n qualifierNameConverter: Converter<TQualifierNames>\n): Converter<Json.IChildResourceCandidateDecl<TQualifierNames>> {\n return Converters.strictObject<Json.IChildResourceCandidateDecl<TQualifierNames>>({\n json: JsonConverters.jsonObject,\n conditions: typedConditionSetDecl(qualifierNameConverter).optional(),\n isPartial: Converters.boolean.optional(),\n mergeMethod: CommonConvert.resourceValueMergeMethod.optional()\n });\n}\n\n/**\n * Returns a `Converter` for a `Json.ILooseResourceDecl<TQualifierNames>`\n * narrowed on a supplied `qualifierName` converter.\n *\n * @public\n */\n// Keep in sync with `looseResourceDecl` above.\nexport function typedLooseResourceDecl<TQualifierNames extends string>(\n qualifierNameConverter: Converter<TQualifierNames>\n): Converter<Json.ILooseResourceDecl<TQualifierNames>> {\n return Converters.strictObject<Json.ILooseResourceDecl<TQualifierNames>>({\n id: CommonConvert.resourceId,\n resourceTypeName: CommonConvert.resourceTypeName,\n candidates: Converters.arrayOf(typedChildResourceCandidateDecl(qualifierNameConverter)).optional()\n });\n}\n\n/**\n * Returns a `Converter` for a `Json.IChildResourceDecl<TQualifierNames>`\n * narrowed on a supplied `qualifierName` converter.\n *\n * @public\n */\n// Keep in sync with `childResourceDecl` above.\nexport function typedChildResourceDecl<TQualifierNames extends string>(\n qualifierNameConverter: Converter<TQualifierNames>\n): Converter<Json.IChildResourceDecl<TQualifierNames>> {\n return Converters.strictObject<Json.IChildResourceDecl<TQualifierNames>>({\n resourceTypeName: CommonConvert.resourceTypeName,\n candidates: Converters.arrayOf(typedChildResourceCandidateDecl(qualifierNameConverter)).optional()\n });\n}\n\n/**\n * Returns a `Converter` for a `Json.IContainerContextDecl<TQualifierNames>`\n * narrowed on a supplied `qualifierName` converter.\n *\n * @public\n */\n// Keep in sync with `containerContextDecl` above.\nexport function typedContainerContextDecl<TQualifierNames extends string>(\n qualifierNameConverter: Converter<TQualifierNames>\n): Converter<Json.IContainerContextDecl<TQualifierNames>> {\n return Converters.strictObject<Json.IContainerContextDecl<TQualifierNames>>({\n baseId: Converters.oneOf([CommonConvert.resourceId, Converters.literal('')]).optional(),\n conditions: typedConditionSetDecl(qualifierNameConverter).optional(),\n mergeMethod: CommonConvert.resourceValueMergeMethod.optional()\n });\n}\n\n/**\n * Returns a `Converter` for a `Json.IResourceTreeChildNodeDecl<TQualifierNames>`\n * narrowed on a supplied `qualifierName` converter.\n *\n * @public\n */\n// Keep in sync with `resourceTreeChildNodeDecl` above.\nexport function typedResourceTreeChildNodeDecl<TQualifierNames extends string>(\n qualifierNameConverter: Converter<TQualifierNames>\n): Converter<Json.IResourceTreeChildNodeDecl<TQualifierNames>> {\n const childResource = typedChildResourceDecl(qualifierNameConverter);\n return Converters.generic<Json.IResourceTreeChildNodeDecl<TQualifierNames>, unknown>(\n (\n from: unknown,\n self: Converter<Json.IResourceTreeChildNodeDecl<TQualifierNames>, unknown>,\n context?: unknown\n ): Result<Json.IResourceTreeChildNodeDecl<TQualifierNames>> => {\n return Converters.strictObject<Json.IResourceTreeChildNodeDecl<TQualifierNames>>({\n resources: Converters.recordOf(childResource).optional(),\n children: Converters.recordOf(self).optional()\n }).convert(from, context);\n }\n );\n}\n\n/**\n * Returns a `Converter` for a `Json.IResourceTreeRootDecl<TQualifierNames>`\n * narrowed on a supplied `qualifierName` converter.\n *\n * @public\n */\n// Keep in sync with `resourceTreeRootDecl` above.\nexport function typedResourceTreeRootDecl<TQualifierNames extends string>(\n qualifierNameConverter: Converter<TQualifierNames>\n): Converter<Json.IResourceTreeRootDecl<TQualifierNames>> {\n return Converters.strictObject<Json.IResourceTreeRootDecl<TQualifierNames>>({\n context: typedContainerContextDecl(qualifierNameConverter).optional(),\n resources: Converters.recordOf(typedChildResourceDecl(qualifierNameConverter)).optional(),\n children: Converters.recordOf(typedResourceTreeChildNodeDecl(qualifierNameConverter)).optional()\n });\n}\n\n/**\n * Returns a `Converter` for a `Json.IResourceCollectionDecl<TQualifierNames>`\n * narrowed on a supplied `qualifierName` converter.\n *\n * @public\n */\n// Keep in sync with `resourceCollectionDecl` above.\nexport function typedResourceCollectionDecl<TQualifierNames extends string>(\n qualifierNameConverter: Converter<TQualifierNames>\n): Converter<Json.IResourceCollectionDecl<TQualifierNames>> {\n const containerContext = typedContainerContextDecl(qualifierNameConverter);\n const looseCandidate = typedLooseResourceCandidateDecl(qualifierNameConverter);\n const looseResource = typedLooseResourceDecl(qualifierNameConverter);\n return Converters.generic<Json.IResourceCollectionDecl<TQualifierNames>, unknown>(\n (\n from: unknown,\n self: Converter<Json.IResourceCollectionDecl<TQualifierNames>, unknown>,\n context?: unknown\n ): Result<Json.IResourceCollectionDecl<TQualifierNames>> => {\n return Converters.strictObject<Json.IResourceCollectionDecl<TQualifierNames>>({\n context: containerContext.optional(),\n candidates: Converters.arrayOf(looseCandidate).optional(),\n resources: Converters.arrayOf(looseResource).optional(),\n collections: Converters.arrayOf(self).optional(),\n metadata: JsonConverters.jsonObject.optional()\n }).convert(from, context);\n }\n );\n}\n\n/**\n * Returns a `Converter` for a `Json.IImporterResourceCollectionDecl<TQualifierNames>`\n * narrowed on a supplied `qualifierName` converter.\n *\n * @public\n */\n// Keep in sync with `importerResourceCollectionDecl` above.\nexport function typedImporterResourceCollectionDecl<TQualifierNames extends string>(\n qualifierNameConverter: Converter<TQualifierNames>\n): Converter<Json.IImporterResourceCollectionDecl<TQualifierNames>> {\n const containerContext = typedContainerContextDecl(qualifierNameConverter);\n const importerCandidate = typedImporterResourceCandidateDecl(qualifierNameConverter);\n const looseResource = typedLooseResourceDecl(qualifierNameConverter);\n const childResource = typedChildResourceDecl(qualifierNameConverter);\n return Converters.generic<Json.IImporterResourceCollectionDecl<TQualifierNames>, unknown>(\n (\n from: unknown,\n self: Converter<Json.IImporterResourceCollectionDecl<TQualifierNames>, unknown>,\n context?: unknown\n ): Result<Json.IImporterResourceCollectionDecl<TQualifierNames>> => {\n return Converters.strictObject<Json.IImporterResourceCollectionDecl<TQualifierNames>>({\n context: containerContext.optional(),\n candidates: Converters.arrayOf(importerCandidate).optional(),\n resources: Converters.arrayOf(Converters.oneOf([looseResource, childResource])).optional(),\n collections: Converters.arrayOf(self).optional(),\n metadata: JsonConverters.jsonObject.optional()\n }).convert(from, context);\n }\n );\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/packlets/resource-json/helpers.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAc,MAAM,EAAiB,MAAM,eAAe,CAAC;AAClE,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAI/B;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,CAAC,EAAE,UAAU,CAAC,qBAAqB,EACvC,UAAU,CAAC,EAAE,MAAM,EACnB,gBAAgB,CAAC,EAAE,aAAa,CAAC,IAAI,CAAC,mBAAmB,CAAC,GACzD,MAAM,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAsB1C;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,UAAU,CAAC,8BAA8B,EACpD,QAAQ,CAAC,EAAE,MAAM,EACjB,cAAc,CAAC,EAAE,aAAa,CAAC,IAAI,CAAC,mBAAmB,CAAC,GACvD,MAAM,CAAC,UAAU,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