@fgv/ts-res 4.5.0-3 → 5.0.0-2
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/CHANGELOG.json +26 -0
- package/CHANGELOG.md +14 -0
- package/CLAUDE.md +186 -0
- package/EXAMPLE_INIT_PARAMS.md +88 -0
- package/PROGRESS_SUMMARY.md +48 -0
- package/README.md +535 -14
- package/dist/ts-res.d.ts +4241 -318
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/index.d.ts +4 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +7 -1
- package/lib/index.js.map +1 -1
- package/lib/packlets/common/conditions.d.ts +30 -0
- package/lib/packlets/common/conditions.d.ts.map +1 -1
- package/lib/packlets/common/conditions.js.map +1 -1
- package/lib/packlets/common/convert.d.ts +22 -2
- package/lib/packlets/common/convert.d.ts.map +1 -1
- package/lib/packlets/common/convert.js +21 -1
- package/lib/packlets/common/convert.js.map +1 -1
- package/lib/packlets/common/helpers/context.d.ts +39 -0
- package/lib/packlets/common/helpers/context.d.ts.map +1 -0
- package/lib/packlets/common/helpers/context.js +108 -0
- package/lib/packlets/common/helpers/context.js.map +1 -0
- package/lib/packlets/common/helpers/index.d.ts +2 -0
- package/lib/packlets/common/helpers/index.d.ts.map +1 -1
- package/lib/packlets/common/helpers/index.js +2 -0
- package/lib/packlets/common/helpers/index.js.map +1 -1
- package/lib/packlets/common/helpers/qualifierDefaultValues.d.ts +39 -0
- package/lib/packlets/common/helpers/qualifierDefaultValues.d.ts.map +1 -0
- package/lib/packlets/common/helpers/qualifierDefaultValues.js +105 -0
- package/lib/packlets/common/helpers/qualifierDefaultValues.js.map +1 -0
- package/lib/packlets/common/helpers/resources.d.ts.map +1 -1
- package/lib/packlets/common/helpers/resources.js +6 -2
- package/lib/packlets/common/helpers/resources.js.map +1 -1
- package/lib/packlets/common/validate/conditions.d.ts +69 -1
- package/lib/packlets/common/validate/conditions.d.ts.map +1 -1
- package/lib/packlets/common/validate/conditions.js +126 -0
- package/lib/packlets/common/validate/conditions.js.map +1 -1
- package/lib/packlets/common/validate/regularExpressions.d.ts +20 -0
- package/lib/packlets/common/validate/regularExpressions.d.ts.map +1 -1
- package/lib/packlets/common/validate/regularExpressions.js +21 -1
- package/lib/packlets/common/validate/regularExpressions.js.map +1 -1
- package/lib/packlets/conditions/condition.d.ts +37 -0
- package/lib/packlets/conditions/condition.d.ts.map +1 -1
- package/lib/packlets/conditions/condition.js +67 -1
- package/lib/packlets/conditions/condition.js.map +1 -1
- package/lib/packlets/conditions/conditionCollector.d.ts.map +1 -1
- package/lib/packlets/conditions/conditionCollector.js +1 -0
- package/lib/packlets/conditions/conditionCollector.js.map +1 -1
- package/lib/packlets/conditions/conditionSet.d.ts +34 -3
- package/lib/packlets/conditions/conditionSet.d.ts.map +1 -1
- package/lib/packlets/conditions/conditionSet.js +31 -3
- package/lib/packlets/conditions/conditionSet.js.map +1 -1
- package/lib/packlets/conditions/conditionSetCollector.d.ts.map +1 -1
- package/lib/packlets/conditions/conditionSetCollector.js +3 -0
- package/lib/packlets/conditions/conditionSetCollector.js.map +1 -1
- package/lib/packlets/conditions/conditionToken.d.ts.map +1 -1
- package/lib/packlets/conditions/conditionToken.js +2 -1
- package/lib/packlets/conditions/conditionToken.js.map +1 -1
- package/lib/packlets/conditions/convert/decls.js +1 -1
- package/lib/packlets/conditions/convert/decls.js.map +1 -1
- package/lib/packlets/config/common.d.ts +35 -0
- package/lib/packlets/config/common.d.ts.map +1 -0
- package/lib/packlets/config/common.js +96 -0
- package/lib/packlets/config/common.js.map +1 -0
- package/lib/packlets/config/convert.d.ts +14 -0
- package/lib/packlets/config/convert.d.ts.map +1 -0
- package/lib/packlets/config/convert.js +82 -0
- package/lib/packlets/config/convert.js.map +1 -0
- package/lib/packlets/config/index.d.ts +6 -0
- package/lib/packlets/config/index.d.ts.map +1 -0
- package/lib/packlets/config/index.js +67 -0
- package/lib/packlets/config/index.js.map +1 -0
- package/lib/packlets/config/json.d.ts +20 -0
- package/lib/packlets/config/json.d.ts.map +1 -0
- package/lib/packlets/config/json.js +24 -0
- package/lib/packlets/config/json.js.map +1 -0
- package/lib/packlets/config/predefined/default.d.ts +57 -0
- package/lib/packlets/config/predefined/default.d.ts.map +1 -0
- package/lib/packlets/config/predefined/default.js +141 -0
- package/lib/packlets/config/predefined/default.js.map +1 -0
- package/lib/packlets/config/predefined/extended.d.ts +25 -0
- package/lib/packlets/config/predefined/extended.d.ts.map +1 -0
- package/lib/packlets/config/predefined/extended.js +193 -0
- package/lib/packlets/config/predefined/extended.js.map +1 -0
- package/lib/packlets/config/predefined/index.d.ts +4 -0
- package/lib/packlets/config/predefined/index.d.ts.map +1 -0
- package/lib/packlets/config/predefined/index.js +62 -0
- package/lib/packlets/config/predefined/index.js.map +1 -0
- package/lib/packlets/config/systemConfiguration.d.ts +81 -0
- package/lib/packlets/config/systemConfiguration.d.ts.map +1 -0
- package/lib/packlets/config/systemConfiguration.js +172 -0
- package/lib/packlets/config/systemConfiguration.js.map +1 -0
- package/lib/packlets/context/contextDecls.d.ts +49 -0
- package/lib/packlets/context/contextDecls.d.ts.map +1 -0
- package/lib/packlets/context/contextDecls.js +24 -0
- package/lib/packlets/context/contextDecls.js.map +1 -0
- package/lib/packlets/context/contextToken.d.ts +111 -0
- package/lib/packlets/context/contextToken.d.ts.map +1 -0
- package/lib/packlets/context/contextToken.js +206 -0
- package/lib/packlets/context/contextToken.js.map +1 -0
- package/lib/packlets/context/convert/decls.d.ts +37 -0
- package/lib/packlets/context/convert/decls.d.ts.map +1 -0
- package/lib/packlets/context/convert/decls.js +94 -0
- package/lib/packlets/context/convert/decls.js.map +1 -0
- package/lib/packlets/context/convert/index.d.ts +2 -0
- package/lib/packlets/context/convert/index.d.ts.map +1 -0
- package/lib/packlets/context/convert/index.js +39 -0
- package/lib/packlets/context/convert/index.js.map +1 -0
- package/lib/packlets/context/index.d.ts +5 -0
- package/lib/packlets/context/index.d.ts.map +1 -0
- package/lib/packlets/context/index.js +65 -0
- package/lib/packlets/context/index.js.map +1 -0
- package/lib/packlets/decisions/abstractDecision.d.ts +8 -0
- package/lib/packlets/decisions/abstractDecision.d.ts.map +1 -1
- package/lib/packlets/decisions/abstractDecision.js +9 -0
- package/lib/packlets/decisions/abstractDecision.js.map +1 -1
- package/lib/packlets/decisions/abstractDecisionCollector.d.ts.map +1 -1
- package/lib/packlets/decisions/abstractDecisionCollector.js +2 -0
- package/lib/packlets/decisions/abstractDecisionCollector.js.map +1 -1
- package/lib/packlets/decisions/concreteDecision.d.ts.map +1 -1
- package/lib/packlets/decisions/concreteDecision.js +1 -0
- package/lib/packlets/decisions/concreteDecision.js.map +1 -1
- package/lib/packlets/decisions/decision.d.ts.map +1 -1
- package/lib/packlets/decisions/decision.js +4 -0
- package/lib/packlets/decisions/decision.js.map +1 -1
- package/lib/packlets/import/fsItem.d.ts.map +1 -1
- package/lib/packlets/import/fsItem.js +1 -0
- package/lib/packlets/import/fsItem.js.map +1 -1
- package/lib/packlets/import/importContext.d.ts +19 -0
- package/lib/packlets/import/importContext.d.ts.map +1 -1
- package/lib/packlets/import/importContext.js +39 -0
- package/lib/packlets/import/importContext.js.map +1 -1
- package/lib/packlets/import/importManager.d.ts +5 -5
- package/lib/packlets/import/importManager.d.ts.map +1 -1
- package/lib/packlets/import/importManager.js.map +1 -1
- package/lib/packlets/import/importers/collectionImporter.d.ts +11 -13
- package/lib/packlets/import/importers/collectionImporter.d.ts.map +1 -1
- package/lib/packlets/import/importers/collectionImporter.js +29 -20
- package/lib/packlets/import/importers/collectionImporter.js.map +1 -1
- package/lib/packlets/import/importers/fsItemImporter.d.ts +2 -2
- package/lib/packlets/import/importers/fsItemImporter.d.ts.map +1 -1
- package/lib/packlets/import/importers/fsItemImporter.js +2 -2
- package/lib/packlets/import/importers/fsItemImporter.js.map +1 -1
- package/lib/packlets/import/importers/importer.d.ts +3 -3
- package/lib/packlets/import/importers/importer.d.ts.map +1 -1
- package/lib/packlets/import/importers/importer.js.map +1 -1
- package/lib/packlets/import/importers/jsonImporter.d.ts +2 -3
- package/lib/packlets/import/importers/jsonImporter.d.ts.map +1 -1
- package/lib/packlets/import/importers/jsonImporter.js +10 -20
- package/lib/packlets/import/importers/jsonImporter.js.map +1 -1
- package/lib/packlets/import/importers/pathImporter.d.ts +2 -2
- package/lib/packlets/import/importers/pathImporter.d.ts.map +1 -1
- package/lib/packlets/import/importers/pathImporter.js.map +1 -1
- package/lib/packlets/qualifier-types/config/convert.d.ts +44 -0
- package/lib/packlets/qualifier-types/config/convert.d.ts.map +1 -0
- package/lib/packlets/qualifier-types/config/convert.js +96 -0
- package/lib/packlets/qualifier-types/config/convert.js.map +1 -0
- package/lib/packlets/qualifier-types/config/index.d.ts +4 -0
- package/lib/packlets/qualifier-types/config/index.d.ts.map +1 -0
- package/lib/packlets/qualifier-types/config/index.js +64 -0
- package/lib/packlets/qualifier-types/config/index.js.map +1 -0
- package/lib/packlets/qualifier-types/config/json.d.ts +69 -0
- package/lib/packlets/qualifier-types/config/json.d.ts.map +1 -0
- package/lib/packlets/qualifier-types/config/json.js +24 -0
- package/lib/packlets/qualifier-types/config/json.js.map +1 -0
- package/lib/packlets/qualifier-types/convert.d.ts +10 -2
- package/lib/packlets/qualifier-types/convert.d.ts.map +1 -1
- package/lib/packlets/qualifier-types/convert.js +15 -0
- package/lib/packlets/qualifier-types/convert.js.map +1 -1
- package/lib/packlets/qualifier-types/helpers.d.ts +27 -0
- package/lib/packlets/qualifier-types/helpers.d.ts.map +1 -0
- package/lib/packlets/qualifier-types/helpers.js +118 -0
- package/lib/packlets/qualifier-types/helpers.js.map +1 -0
- package/lib/packlets/qualifier-types/index.d.ts +4 -1
- package/lib/packlets/qualifier-types/index.d.ts.map +1 -1
- package/lib/packlets/qualifier-types/index.js +5 -1
- package/lib/packlets/qualifier-types/index.js.map +1 -1
- package/lib/packlets/qualifier-types/languageQualifierType.d.ts +19 -8
- package/lib/packlets/qualifier-types/languageQualifierType.d.ts.map +1 -1
- package/lib/packlets/qualifier-types/languageQualifierType.js +28 -9
- package/lib/packlets/qualifier-types/languageQualifierType.js.map +1 -1
- package/lib/packlets/qualifier-types/literalQualifierType.d.ts +42 -13
- package/lib/packlets/qualifier-types/literalQualifierType.d.ts.map +1 -1
- package/lib/packlets/qualifier-types/literalQualifierType.js +58 -10
- package/lib/packlets/qualifier-types/literalQualifierType.js.map +1 -1
- package/lib/packlets/qualifier-types/literalValueHierarchy.d.ts +114 -0
- package/lib/packlets/qualifier-types/literalValueHierarchy.d.ts.map +1 -0
- package/lib/packlets/qualifier-types/literalValueHierarchy.js +228 -0
- package/lib/packlets/qualifier-types/literalValueHierarchy.js.map +1 -0
- package/lib/packlets/qualifier-types/qualifierType.d.ts +33 -18
- package/lib/packlets/qualifier-types/qualifierType.d.ts.map +1 -1
- package/lib/packlets/qualifier-types/qualifierType.js +18 -4
- package/lib/packlets/qualifier-types/qualifierType.js.map +1 -1
- package/lib/packlets/qualifier-types/qualifierTypeCollector.d.ts +4 -2
- package/lib/packlets/qualifier-types/qualifierTypeCollector.d.ts.map +1 -1
- package/lib/packlets/qualifier-types/qualifierTypeCollector.js +2 -1
- package/lib/packlets/qualifier-types/qualifierTypeCollector.js.map +1 -1
- package/lib/packlets/qualifier-types/territoryQualifierType.d.ts +47 -11
- package/lib/packlets/qualifier-types/territoryQualifierType.d.ts.map +1 -1
- package/lib/packlets/qualifier-types/territoryQualifierType.js +61 -17
- package/lib/packlets/qualifier-types/territoryQualifierType.js.map +1 -1
- package/lib/packlets/qualifiers/convert/decls.d.ts.map +1 -1
- package/lib/packlets/qualifiers/convert/decls.js +17 -15
- package/lib/packlets/qualifiers/convert/decls.js.map +1 -1
- package/lib/packlets/qualifiers/index.d.ts +2 -0
- package/lib/packlets/qualifiers/index.d.ts.map +1 -1
- package/lib/packlets/qualifiers/index.js +2 -0
- package/lib/packlets/qualifiers/index.js.map +1 -1
- package/lib/packlets/qualifiers/qualifier.d.ts +22 -2
- package/lib/packlets/qualifiers/qualifier.d.ts.map +1 -1
- package/lib/packlets/qualifiers/qualifier.js +26 -1
- package/lib/packlets/qualifiers/qualifier.js.map +1 -1
- package/lib/packlets/qualifiers/qualifierCollector.d.ts.map +1 -1
- package/lib/packlets/qualifiers/qualifierCollector.js +4 -0
- package/lib/packlets/qualifiers/qualifierCollector.js.map +1 -1
- package/lib/packlets/qualifiers/qualifierDecl.d.ts +6 -1
- package/lib/packlets/qualifiers/qualifierDecl.d.ts.map +1 -1
- package/lib/packlets/qualifiers/qualifierDecl.js.map +1 -1
- package/lib/packlets/qualifiers/qualifierDefaultValueDecls.d.ts +32 -0
- package/lib/packlets/qualifiers/qualifierDefaultValueDecls.d.ts.map +1 -0
- package/lib/packlets/qualifiers/qualifierDefaultValueDecls.js +24 -0
- package/lib/packlets/qualifiers/qualifierDefaultValueDecls.js.map +1 -0
- package/lib/packlets/qualifiers/qualifierDefaultValueToken.d.ts +96 -0
- package/lib/packlets/qualifiers/qualifierDefaultValueToken.d.ts.map +1 -0
- package/lib/packlets/qualifiers/qualifierDefaultValueToken.js +179 -0
- package/lib/packlets/qualifiers/qualifierDefaultValueToken.js.map +1 -0
- package/lib/packlets/resource-json/compiled/common.d.ts +14 -0
- package/lib/packlets/resource-json/compiled/common.d.ts.map +1 -0
- package/lib/packlets/resource-json/compiled/common.js +24 -0
- package/lib/packlets/resource-json/compiled/common.js.map +1 -0
- package/lib/packlets/resource-json/compiled/convert.d.ts +63 -0
- package/lib/packlets/resource-json/compiled/convert.d.ts.map +1 -0
- package/lib/packlets/resource-json/compiled/convert.js +167 -0
- package/lib/packlets/resource-json/compiled/convert.js.map +1 -0
- package/lib/packlets/resource-json/compiled/index.d.ts +5 -0
- package/lib/packlets/resource-json/compiled/index.d.ts.map +1 -0
- package/lib/packlets/resource-json/compiled/index.js +65 -0
- package/lib/packlets/resource-json/compiled/index.js.map +1 -0
- package/lib/packlets/resource-json/compiled/json.d.ts +204 -0
- package/lib/packlets/resource-json/compiled/json.d.ts.map +1 -0
- package/lib/packlets/resource-json/compiled/json.js +3 -0
- package/lib/packlets/resource-json/compiled/json.js.map +1 -0
- package/lib/packlets/resource-json/convert.d.ts +16 -0
- package/lib/packlets/resource-json/convert.d.ts.map +1 -1
- package/lib/packlets/resource-json/convert.js +41 -6
- package/lib/packlets/resource-json/convert.js.map +1 -1
- package/lib/packlets/resource-json/helpers.d.ts +82 -3
- package/lib/packlets/resource-json/helpers.d.ts.map +1 -1
- package/lib/packlets/resource-json/helpers.js +185 -2
- package/lib/packlets/resource-json/helpers.js.map +1 -1
- package/lib/packlets/resource-json/index.d.ts +2 -1
- package/lib/packlets/resource-json/index.d.ts.map +1 -1
- package/lib/packlets/resource-json/index.js +3 -1
- package/lib/packlets/resource-json/index.js.map +1 -1
- package/lib/packlets/resource-json/json.d.ts +55 -3
- package/lib/packlets/resource-json/json.d.ts.map +1 -1
- package/lib/packlets/resource-json/json.js +16 -0
- package/lib/packlets/resource-json/json.js.map +1 -1
- package/lib/packlets/resource-json/normalized.d.ts +46 -3
- package/lib/packlets/resource-json/normalized.d.ts.map +1 -1
- package/lib/packlets/resource-json/normalized.js.map +1 -1
- package/lib/packlets/resource-json/resourceDeclCollection.d.ts +14 -10
- package/lib/packlets/resource-json/resourceDeclCollection.d.ts.map +1 -1
- package/lib/packlets/resource-json/resourceDeclCollection.js +18 -14
- package/lib/packlets/resource-json/resourceDeclCollection.js.map +1 -1
- package/lib/packlets/resource-json/resourceDeclContainer.d.ts +15 -2
- package/lib/packlets/resource-json/resourceDeclContainer.d.ts.map +1 -1
- package/lib/packlets/resource-json/resourceDeclContainer.js.map +1 -1
- package/lib/packlets/resource-json/resourceDeclTree.d.ts +6 -2
- package/lib/packlets/resource-json/resourceDeclTree.d.ts.map +1 -1
- package/lib/packlets/resource-json/resourceDeclTree.js +12 -3
- package/lib/packlets/resource-json/resourceDeclTree.js.map +1 -1
- package/lib/packlets/resource-types/config/convert.d.ts +8 -0
- package/lib/packlets/resource-types/config/convert.d.ts.map +1 -0
- package/lib/packlets/resource-types/config/convert.js +36 -0
- package/lib/packlets/resource-types/config/convert.js.map +1 -0
- package/lib/packlets/resource-types/config/index.d.ts +4 -0
- package/lib/packlets/resource-types/config/index.d.ts.map +1 -0
- package/lib/packlets/resource-types/config/index.js +64 -0
- package/lib/packlets/resource-types/config/index.js.map +1 -0
- package/lib/packlets/resource-types/config/json.d.ts +9 -0
- package/lib/packlets/resource-types/config/json.d.ts.map +1 -0
- package/lib/packlets/resource-types/config/json.js +24 -0
- package/lib/packlets/resource-types/config/json.js.map +1 -0
- package/lib/packlets/resource-types/helpers.d.ts +13 -0
- package/lib/packlets/resource-types/helpers.d.ts.map +1 -0
- package/lib/packlets/resource-types/helpers.js +44 -0
- package/lib/packlets/resource-types/helpers.js.map +1 -0
- package/lib/packlets/resource-types/index.d.ts +3 -0
- package/lib/packlets/resource-types/index.d.ts.map +1 -1
- package/lib/packlets/resource-types/index.js +26 -0
- package/lib/packlets/resource-types/index.js.map +1 -1
- package/lib/packlets/resource-types/jsonResourceType.d.ts +5 -13
- package/lib/packlets/resource-types/jsonResourceType.d.ts.map +1 -1
- package/lib/packlets/resource-types/jsonResourceType.js +5 -2
- package/lib/packlets/resource-types/jsonResourceType.js.map +1 -1
- package/lib/packlets/resource-types/resourceType.d.ts +31 -30
- package/lib/packlets/resource-types/resourceType.d.ts.map +1 -1
- package/lib/packlets/resource-types/resourceType.js.map +1 -1
- package/lib/packlets/resources/candidateReducer.d.ts +98 -0
- package/lib/packlets/resources/candidateReducer.d.ts.map +1 -0
- package/lib/packlets/resources/candidateReducer.js +247 -0
- package/lib/packlets/resources/candidateReducer.js.map +1 -0
- package/lib/packlets/resources/common.d.ts +60 -0
- package/lib/packlets/resources/common.d.ts.map +1 -0
- package/lib/packlets/resources/common.js +24 -0
- package/lib/packlets/resources/common.js.map +1 -0
- package/lib/packlets/resources/index.d.ts +3 -1
- package/lib/packlets/resources/index.d.ts.map +1 -1
- package/lib/packlets/resources/index.js +3 -1
- package/lib/packlets/resources/index.js.map +1 -1
- package/lib/packlets/resources/resource.d.ts +57 -5
- package/lib/packlets/resources/resource.d.ts.map +1 -1
- package/lib/packlets/resources/resource.js +96 -6
- package/lib/packlets/resources/resource.js.map +1 -1
- package/lib/packlets/resources/resourceBuilder.d.ts +14 -0
- package/lib/packlets/resources/resourceBuilder.d.ts.map +1 -1
- package/lib/packlets/resources/resourceBuilder.js +19 -1
- package/lib/packlets/resources/resourceBuilder.js.map +1 -1
- package/lib/packlets/resources/resourceCandidate.d.ts +42 -6
- package/lib/packlets/resources/resourceCandidate.d.ts.map +1 -1
- package/lib/packlets/resources/resourceCandidate.js +40 -1
- package/lib/packlets/resources/resourceCandidate.js.map +1 -1
- package/lib/packlets/resources/resourceManagerBuilder.d.ts +220 -0
- package/lib/packlets/resources/resourceManagerBuilder.d.ts.map +1 -0
- package/lib/packlets/resources/resourceManagerBuilder.js +451 -0
- package/lib/packlets/resources/resourceManagerBuilder.js.map +1 -0
- package/lib/packlets/runtime/cacheListener.d.ts +62 -0
- package/lib/packlets/runtime/cacheListener.d.ts.map +1 -0
- package/lib/packlets/runtime/cacheListener.js +56 -0
- package/lib/packlets/runtime/cacheListener.js.map +1 -0
- package/lib/packlets/runtime/cacheMetrics.d.ts +82 -0
- package/lib/packlets/runtime/cacheMetrics.d.ts.map +1 -0
- package/lib/packlets/runtime/cacheMetrics.js +143 -0
- package/lib/packlets/runtime/cacheMetrics.js.map +1 -0
- package/lib/packlets/runtime/compiledResourceCollection.d.ts +167 -0
- package/lib/packlets/runtime/compiledResourceCollection.d.ts.map +1 -0
- package/lib/packlets/runtime/compiledResourceCollection.js +466 -0
- package/lib/packlets/runtime/compiledResourceCollection.js.map +1 -0
- package/lib/packlets/runtime/conditionSetResolutionResult.d.ts +70 -0
- package/lib/packlets/runtime/conditionSetResolutionResult.d.ts.map +1 -0
- package/lib/packlets/runtime/conditionSetResolutionResult.js +135 -0
- package/lib/packlets/runtime/conditionSetResolutionResult.js.map +1 -0
- package/lib/packlets/runtime/context/contextQualifierProvider.d.ts +80 -0
- package/lib/packlets/runtime/context/contextQualifierProvider.d.ts.map +1 -0
- package/lib/packlets/runtime/context/contextQualifierProvider.js +33 -0
- package/lib/packlets/runtime/context/contextQualifierProvider.js.map +1 -0
- package/lib/packlets/runtime/context/contextQualifierProviderValidator.d.ts +165 -0
- package/lib/packlets/runtime/context/contextQualifierProviderValidator.d.ts.map +1 -0
- package/lib/packlets/runtime/context/contextQualifierProviderValidator.js +179 -0
- package/lib/packlets/runtime/context/contextQualifierProviderValidator.js.map +1 -0
- package/lib/packlets/runtime/context/index.d.ts +5 -0
- package/lib/packlets/runtime/context/index.d.ts.map +1 -0
- package/lib/packlets/runtime/context/index.js +42 -0
- package/lib/packlets/runtime/context/index.js.map +1 -0
- package/lib/packlets/runtime/context/simpleContextQualifierProvider.d.ts +111 -0
- package/lib/packlets/runtime/context/simpleContextQualifierProvider.d.ts.map +1 -0
- package/lib/packlets/runtime/context/simpleContextQualifierProvider.js +177 -0
- package/lib/packlets/runtime/context/simpleContextQualifierProvider.js.map +1 -0
- package/lib/packlets/runtime/context/validatingSimpleContextQualifierProvider.d.ts +47 -0
- package/lib/packlets/runtime/context/validatingSimpleContextQualifierProvider.d.ts.map +1 -0
- package/lib/packlets/runtime/context/validatingSimpleContextQualifierProvider.js +64 -0
- package/lib/packlets/runtime/context/validatingSimpleContextQualifierProvider.js.map +1 -0
- package/lib/packlets/runtime/iResourceManager.d.ts +88 -0
- package/lib/packlets/runtime/iResourceManager.d.ts.map +1 -0
- package/lib/packlets/runtime/iResourceManager.js +24 -0
- package/lib/packlets/runtime/iResourceManager.js.map +1 -0
- package/lib/packlets/runtime/index.d.ts +12 -0
- package/lib/packlets/runtime/index.d.ts.map +1 -0
- package/lib/packlets/runtime/index.js +73 -0
- package/lib/packlets/runtime/index.js.map +1 -0
- package/lib/packlets/runtime/resource-tree/common.d.ts +91 -0
- package/lib/packlets/runtime/resource-tree/common.d.ts.map +1 -0
- package/lib/packlets/runtime/resource-tree/common.js +24 -0
- package/lib/packlets/runtime/resource-tree/common.js.map +1 -0
- package/lib/packlets/runtime/resource-tree/index.d.ts +5 -0
- package/lib/packlets/runtime/resource-tree/index.d.ts.map +1 -0
- package/lib/packlets/runtime/resource-tree/index.js +42 -0
- package/lib/packlets/runtime/resource-tree/index.js.map +1 -0
- package/lib/packlets/runtime/resource-tree/readOnlyResourceTree.d.ts +141 -0
- package/lib/packlets/runtime/resource-tree/readOnlyResourceTree.d.ts.map +1 -0
- package/lib/packlets/runtime/resource-tree/readOnlyResourceTree.js +224 -0
- package/lib/packlets/runtime/resource-tree/readOnlyResourceTree.js.map +1 -0
- package/lib/packlets/runtime/resource-tree/resourceTreeChildren.d.ts +24 -0
- package/lib/packlets/runtime/resource-tree/resourceTreeChildren.d.ts.map +1 -0
- package/lib/packlets/runtime/resource-tree/resourceTreeChildren.js +98 -0
- package/lib/packlets/runtime/resource-tree/resourceTreeChildren.js.map +1 -0
- package/lib/packlets/runtime/resource-tree/resourceTreeChildrenValidator.d.ts +99 -0
- package/lib/packlets/runtime/resource-tree/resourceTreeChildrenValidator.d.ts.map +1 -0
- package/lib/packlets/runtime/resource-tree/resourceTreeChildrenValidator.js +165 -0
- package/lib/packlets/runtime/resource-tree/resourceTreeChildrenValidator.js.map +1 -0
- package/lib/packlets/runtime/resourceResolver.d.ts +196 -0
- package/lib/packlets/runtime/resourceResolver.d.ts.map +1 -0
- package/lib/packlets/runtime/resourceResolver.js +437 -0
- package/lib/packlets/runtime/resourceResolver.js.map +1 -0
- package/lib/packlets/runtime/validate.d.ts +13 -0
- package/lib/packlets/runtime/validate.d.ts.map +1 -0
- package/lib/packlets/runtime/validate.js +49 -0
- package/lib/packlets/runtime/validate.js.map +1 -0
- package/package.json +76 -75
- package/lib/packlets/resources/resourceManager.d.ts +0 -104
- package/lib/packlets/resources/resourceManager.d.ts.map +0 -1
- package/lib/packlets/resources/resourceManager.js +0 -201
- package/lib/packlets/resources/resourceManager.js.map +0 -1
package/dist/tsdoc-metadata.json
CHANGED
package/lib/index.d.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import * as QualifierTypes from './packlets/qualifier-types';
|
|
2
2
|
import * as Qualifiers from './packlets/qualifiers';
|
|
3
3
|
import * as Conditions from './packlets/conditions';
|
|
4
|
+
import * as Config from './packlets/config';
|
|
5
|
+
import * as Context from './packlets/context';
|
|
4
6
|
import * as Decisions from './packlets/decisions';
|
|
5
7
|
import * as ResourceJson from './packlets/resource-json';
|
|
6
8
|
import * as Resources from './packlets/resources';
|
|
7
9
|
import * as ResourceTypes from './packlets/resource-types';
|
|
8
10
|
import * as Import from './packlets/import';
|
|
11
|
+
import * as Runtime from './packlets/runtime';
|
|
9
12
|
export * from './packlets/common';
|
|
10
13
|
export * from './packlets/common';
|
|
11
|
-
export { Conditions, Decisions, Import, QualifierTypes, Qualifiers, ResourceJson, Resources, ResourceTypes };
|
|
14
|
+
export { Conditions, Config, Context, Decisions, Import, QualifierTypes, Qualifiers, ResourceJson, Resources, ResourceTypes, Runtime };
|
|
12
15
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,cAAc,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,YAAY,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,aAAa,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,cAAc,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,YAAY,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,aAAa,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAE9C,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAElC,OAAO,EACL,UAAU,EACV,MAAM,EACN,OAAO,EACP,SAAS,EACT,MAAM,EACN,cAAc,EACd,UAAU,EACV,YAAY,EACZ,SAAS,EACT,aAAa,EACb,OAAO,EACR,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -57,13 +57,17 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
57
57
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
58
58
|
};
|
|
59
59
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
60
|
-
exports.ResourceTypes = exports.Resources = exports.ResourceJson = exports.Qualifiers = exports.QualifierTypes = exports.Import = exports.Decisions = exports.Conditions = void 0;
|
|
60
|
+
exports.Runtime = exports.ResourceTypes = exports.Resources = exports.ResourceJson = exports.Qualifiers = exports.QualifierTypes = exports.Import = exports.Decisions = exports.Context = exports.Config = exports.Conditions = void 0;
|
|
61
61
|
const QualifierTypes = __importStar(require("./packlets/qualifier-types"));
|
|
62
62
|
exports.QualifierTypes = QualifierTypes;
|
|
63
63
|
const Qualifiers = __importStar(require("./packlets/qualifiers"));
|
|
64
64
|
exports.Qualifiers = Qualifiers;
|
|
65
65
|
const Conditions = __importStar(require("./packlets/conditions"));
|
|
66
66
|
exports.Conditions = Conditions;
|
|
67
|
+
const Config = __importStar(require("./packlets/config"));
|
|
68
|
+
exports.Config = Config;
|
|
69
|
+
const Context = __importStar(require("./packlets/context"));
|
|
70
|
+
exports.Context = Context;
|
|
67
71
|
const Decisions = __importStar(require("./packlets/decisions"));
|
|
68
72
|
exports.Decisions = Decisions;
|
|
69
73
|
const ResourceJson = __importStar(require("./packlets/resource-json"));
|
|
@@ -74,6 +78,8 @@ const ResourceTypes = __importStar(require("./packlets/resource-types"));
|
|
|
74
78
|
exports.ResourceTypes = ResourceTypes;
|
|
75
79
|
const Import = __importStar(require("./packlets/import"));
|
|
76
80
|
exports.Import = Import;
|
|
81
|
+
const Runtime = __importStar(require("./packlets/runtime"));
|
|
82
|
+
exports.Runtime = Runtime;
|
|
77
83
|
__exportStar(require("./packlets/common"), exports);
|
|
78
84
|
__exportStar(require("./packlets/common"), exports);
|
|
79
85
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,2EAA6D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,2EAA6D;AAqB3D,wCAAc;AApBhB,kEAAoD;AAqBlD,gCAAU;AApBZ,kEAAoD;AAclD,gCAAU;AAbZ,0DAA4C;AAc1C,wBAAM;AAbR,4DAA8C;AAc5C,0BAAO;AAbT,gEAAkD;AAchD,8BAAS;AAbX,uEAAyD;AAiBvD,oCAAY;AAhBd,gEAAkD;AAiBhD,8BAAS;AAhBX,yEAA2D;AAiBzD,sCAAa;AAhBf,0DAA4C;AAW1C,wBAAM;AAVR,4DAA8C;AAgB5C,0BAAO;AAdT,oDAAkC;AAClC,oDAAkC","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 QualifierTypes from './packlets/qualifier-types';\nimport * as Qualifiers from './packlets/qualifiers';\nimport * as Conditions from './packlets/conditions';\nimport * as Config from './packlets/config';\nimport * as Context from './packlets/context';\nimport * as Decisions from './packlets/decisions';\nimport * as ResourceJson from './packlets/resource-json';\nimport * as Resources from './packlets/resources';\nimport * as ResourceTypes from './packlets/resource-types';\nimport * as Import from './packlets/import';\nimport * as Runtime from './packlets/runtime';\n\nexport * from './packlets/common';\nexport * from './packlets/common';\n\nexport {\n Conditions,\n Config,\n Context,\n Decisions,\n Import,\n QualifierTypes,\n Qualifiers,\n ResourceJson,\n Resources,\n ResourceTypes,\n Runtime\n};\n"]}
|
|
@@ -145,4 +145,34 @@ export type DecisionKey = Brand<string, 'DecisionKey'>;
|
|
|
145
145
|
* @public
|
|
146
146
|
*/
|
|
147
147
|
export type DecisionIndex = Brand<number, 'DecisionIndex'>;
|
|
148
|
+
/**
|
|
149
|
+
* A string representing a validated context qualifier token. Context qualifier tokens are used
|
|
150
|
+
* for filtering resources by context criteria. A context qualifier token has the form
|
|
151
|
+
* `<qualifierName>=<value>` or `<value>`.
|
|
152
|
+
* @public
|
|
153
|
+
*/
|
|
154
|
+
export type ContextQualifierToken = Brand<string, 'ContextQualifierToken'>;
|
|
155
|
+
/**
|
|
156
|
+
* A string representing a validated context token. Context tokens are
|
|
157
|
+
* pipe-separated lists of one or more context qualifier tokens. Uses "|" as separator
|
|
158
|
+
* to avoid conflicts with comma-separated values within context values.
|
|
159
|
+
* Example: "language=en-US,de-DE|territory=US|role=admin"
|
|
160
|
+
* @public
|
|
161
|
+
*/
|
|
162
|
+
export type ContextToken = Brand<string, 'ContextToken'>;
|
|
163
|
+
/**
|
|
164
|
+
* A string representing a single qualifier default value assignment.
|
|
165
|
+
* Format: "qualifierName=defaultValue" or "qualifierName=" (to remove default)
|
|
166
|
+
* Example: "language=en-US,en-CA" or "territory=US"
|
|
167
|
+
* @public
|
|
168
|
+
*/
|
|
169
|
+
export type QualifierDefaultValueToken = Brand<string, 'QualifierDefaultValueToken'>;
|
|
170
|
+
/**
|
|
171
|
+
* A string representing a validated qualifier default values token. Default value tokens are
|
|
172
|
+
* pipe-separated lists of one or more qualifier default value tokens. Uses "|" as separator
|
|
173
|
+
* to avoid conflicts with comma-separated values within default values.
|
|
174
|
+
* Example: "language=en-US,en-CA|territory=US|device=desktop,tablet"
|
|
175
|
+
* @public
|
|
176
|
+
*/
|
|
177
|
+
export type QualifierDefaultValuesToken = Brand<string, 'QualifierDefaultValuesToken'>;
|
|
148
178
|
//# sourceMappingURL=conditions.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,GAAsB,IAAyB,CAAC;AAQjF;;;GAGG;AACU,QAAA,qBAAqB,GAAwB,CAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC,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 { Brand } from '@fgv/ts-utils';\n\n/**\n * Branded string representing a validated qualifier name.\n * @public\n */\nexport type QualifierName = Brand<string, 'QualifierName'>;\n\n/**\n * Branded number representing a validated qualifier index.\n * @public\n */\nexport type QualifierIndex = Brand<number, 'QualifierIndex'>;\n\n/**\n * Branded string representing a validated qualifier type name.\n * @public\n */\nexport type QualifierTypeName = Brand<string, 'QualifierTypeName'>;\n\n/**\n * Branded number representing a validated qualifier type index.\n * @public\n */\nexport type QualifierTypeIndex = Brand<number, 'QualifierTypeIndex'>;\n\n/**\n * Branded type for a validated qualifier condition value - i.e. a value\n * that has been determined to be valid for use in a condition attached\n * to some resource.\n *\n * @example\n * For a language qualifier type, it is likely that a single language\n * tag can be used for either a condition or a context value. However,\n * a list of languages would likely only be valid as a context value.\n * @public\n */\nexport type QualifierConditionValue = Brand<string, 'QualifierConditionValue'>;\n\n/**\n * Branded type for a validated qualifier context value - i.e. a value\n * that has been determined to be valid for use in some runtime context.\n * @example\n * For a language qualifier type, it is likely that a single language\n * tag can be used for either a condition or a context value. However,\n * a list of languages would likely only be valid as a context value.\n * @public\n */\nexport type QualifierContextValue = Brand<string, 'QualifierContextValue'>;\n\n/**\n * Branded number representing a score in the range 0.0 (no match) .. 1.0 (perfect match)\n * which results from evaluating some condition.\n * @public\n */\nexport type QualifierMatchScore = Brand<number, 'QualifierMatchScore'>;\n\n/**\n * {@link QualifierMatchScore | Match score} indicating no match.\n * @public\n */\nexport const NoMatch: QualifierMatchScore = 0.0 as QualifierMatchScore;\n\n/**\n * {@link QualifierMatchScore | Match score} indicating a perfect match.\n * @public\n */\nexport const PerfectMatch: QualifierMatchScore = 1.0 as QualifierMatchScore;\n\n/**\n * Branded number representing a validated condition priority.\n * @public\n */\nexport type ConditionPriority = Brand<number, 'ConditionPriority'>;\n\n/**\n * Minimum valid priority for a condition.\n * @public\n */\nexport const MinConditionPriority: ConditionPriority = 0 as ConditionPriority;\n\n/**\n * Maximum valid priority for a condition.\n * @public\n */\nexport const MaxConditionPriority: ConditionPriority = 1000 as ConditionPriority;\n\n/**\n * Condition operators for use in conditions.\n * @public\n */\nexport type ConditionOperator = 'always' | 'never' | 'matches';\n\n/**\n * Array of all valid condition operators.\n * @public\n */\nexport const allConditionOperators: ConditionOperator[] = ['always', 'never', 'matches'];\n\n/**\n * Branded number representing a validated condition index.\n * @public\n */\nexport type ConditionIndex = Brand<number, 'ConditionIndex'>;\n\n/**\n * A branded string representing a validated condition key. A condition key is a\n * string value which fully describes the condition apart from index. The condition\n * key can be used to quickly determine if two conditions are identical apart from\n * index, or for inspection.\n * @public\n */\nexport type ConditionKey = Brand<string, 'ConditionKey'>;\n\n/**\n * A string representing a validated condition token. Condition tokens are\n * typically extracted from the name of some resource (e.g. file or folder)\n * being imported. A condition token has the form `<qualifierName>=<value>`\n * or `<value>`.\n * @public\n */\nexport type ConditionToken = Brand<string, 'ConditionToken'>;\n\n/**\n * Branded number representing a validated condition set index.\n * @public\n */\nexport type ConditionSetIndex = Brand<number, 'ConditionSetIndex'>;\n\n/**\n * Branded string representing a validated condition set key. A condition set key\n * is a string value which fully describes the condition set apart from index. The\n * condition set key can be used to quickly determine if two condition sets are\n * identical apart from index, or for inspection.\n * @public\n */\nexport type ConditionSetKey = Brand<string, 'ConditionSetKey'>;\n\n/**\n * A string representing a validated condition set token. Condition set tokens are\n * typically extracted from the name of some resource (e.g. file or folder) being\n * imported. A condition set token is a comma-separated list of one or more\n * {@link ConditionToken | condition tokens}, where a condition token has either\n * the form `<qualifierName>=<value>` or `<value>`.\n * @public\n */\nexport type ConditionSetToken = Brand<string, 'ConditionSetToken'>;\n\n/**\n * Branded string representing a hash value for a condition set. The hash value\n * is an 8-character string derived from the crc32 hash of the condition set key\n * and is used to quickly and compactly identify a condition set or compare for\n * equality.\n * @public\n */\nexport type ConditionSetHash = Brand<string, 'ConditionSetHash'>;\n\n/**\n * Branded string representing a validated decision key. A decision key is a string\n * value which fully describes the decision apart from index. The decision key can\n * be used to quickly determine if two decisions are identical apart from index.\n * @public\n */\nexport type DecisionKey = Brand<string, 'DecisionKey'>;\n\n/**\n * Branded number representing a validated decision index.\n * @public\n */\nexport type DecisionIndex = Brand<number, 'DecisionIndex'>;\n"]}
|
|
1
|
+
{"version":3,"file":"conditions.js","sourceRoot":"","sources":["../../../src/packlets/common/conditions.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;AA2DH;;;GAGG;AACU,QAAA,OAAO,GAAwB,GAA0B,CAAC;AAEvE;;;GAGG;AACU,QAAA,YAAY,GAAwB,GAA0B,CAAC;AAQ5E;;;GAGG;AACU,QAAA,oBAAoB,GAAsB,CAAsB,CAAC;AAE9E;;;GAGG;AACU,QAAA,oBAAoB,GAAsB,IAAyB,CAAC;AAQjF;;;GAGG;AACU,QAAA,qBAAqB,GAAwB,CAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC,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 { Brand } from '@fgv/ts-utils';\n\n/**\n * Branded string representing a validated qualifier name.\n * @public\n */\nexport type QualifierName = Brand<string, 'QualifierName'>;\n\n/**\n * Branded number representing a validated qualifier index.\n * @public\n */\nexport type QualifierIndex = Brand<number, 'QualifierIndex'>;\n\n/**\n * Branded string representing a validated qualifier type name.\n * @public\n */\nexport type QualifierTypeName = Brand<string, 'QualifierTypeName'>;\n\n/**\n * Branded number representing a validated qualifier type index.\n * @public\n */\nexport type QualifierTypeIndex = Brand<number, 'QualifierTypeIndex'>;\n\n/**\n * Branded type for a validated qualifier condition value - i.e. a value\n * that has been determined to be valid for use in a condition attached\n * to some resource.\n *\n * @example\n * For a language qualifier type, it is likely that a single language\n * tag can be used for either a condition or a context value. However,\n * a list of languages would likely only be valid as a context value.\n * @public\n */\nexport type QualifierConditionValue = Brand<string, 'QualifierConditionValue'>;\n\n/**\n * Branded type for a validated qualifier context value - i.e. a value\n * that has been determined to be valid for use in some runtime context.\n * @example\n * For a language qualifier type, it is likely that a single language\n * tag can be used for either a condition or a context value. However,\n * a list of languages would likely only be valid as a context value.\n * @public\n */\nexport type QualifierContextValue = Brand<string, 'QualifierContextValue'>;\n\n/**\n * Branded number representing a score in the range 0.0 (no match) .. 1.0 (perfect match)\n * which results from evaluating some condition.\n * @public\n */\nexport type QualifierMatchScore = Brand<number, 'QualifierMatchScore'>;\n\n/**\n * {@link QualifierMatchScore | Match score} indicating no match.\n * @public\n */\nexport const NoMatch: QualifierMatchScore = 0.0 as QualifierMatchScore;\n\n/**\n * {@link QualifierMatchScore | Match score} indicating a perfect match.\n * @public\n */\nexport const PerfectMatch: QualifierMatchScore = 1.0 as QualifierMatchScore;\n\n/**\n * Branded number representing a validated condition priority.\n * @public\n */\nexport type ConditionPriority = Brand<number, 'ConditionPriority'>;\n\n/**\n * Minimum valid priority for a condition.\n * @public\n */\nexport const MinConditionPriority: ConditionPriority = 0 as ConditionPriority;\n\n/**\n * Maximum valid priority for a condition.\n * @public\n */\nexport const MaxConditionPriority: ConditionPriority = 1000 as ConditionPriority;\n\n/**\n * Condition operators for use in conditions.\n * @public\n */\nexport type ConditionOperator = 'always' | 'never' | 'matches';\n\n/**\n * Array of all valid condition operators.\n * @public\n */\nexport const allConditionOperators: ConditionOperator[] = ['always', 'never', 'matches'];\n\n/**\n * Branded number representing a validated condition index.\n * @public\n */\nexport type ConditionIndex = Brand<number, 'ConditionIndex'>;\n\n/**\n * A branded string representing a validated condition key. A condition key is a\n * string value which fully describes the condition apart from index. The condition\n * key can be used to quickly determine if two conditions are identical apart from\n * index, or for inspection.\n * @public\n */\nexport type ConditionKey = Brand<string, 'ConditionKey'>;\n\n/**\n * A string representing a validated condition token. Condition tokens are\n * typically extracted from the name of some resource (e.g. file or folder)\n * being imported. A condition token has the form `<qualifierName>=<value>`\n * or `<value>`.\n * @public\n */\nexport type ConditionToken = Brand<string, 'ConditionToken'>;\n\n/**\n * Branded number representing a validated condition set index.\n * @public\n */\nexport type ConditionSetIndex = Brand<number, 'ConditionSetIndex'>;\n\n/**\n * Branded string representing a validated condition set key. A condition set key\n * is a string value which fully describes the condition set apart from index. The\n * condition set key can be used to quickly determine if two condition sets are\n * identical apart from index, or for inspection.\n * @public\n */\nexport type ConditionSetKey = Brand<string, 'ConditionSetKey'>;\n\n/**\n * A string representing a validated condition set token. Condition set tokens are\n * typically extracted from the name of some resource (e.g. file or folder) being\n * imported. A condition set token is a comma-separated list of one or more\n * {@link ConditionToken | condition tokens}, where a condition token has either\n * the form `<qualifierName>=<value>` or `<value>`.\n * @public\n */\nexport type ConditionSetToken = Brand<string, 'ConditionSetToken'>;\n\n/**\n * Branded string representing a hash value for a condition set. The hash value\n * is an 8-character string derived from the crc32 hash of the condition set key\n * and is used to quickly and compactly identify a condition set or compare for\n * equality.\n * @public\n */\nexport type ConditionSetHash = Brand<string, 'ConditionSetHash'>;\n\n/**\n * Branded string representing a validated decision key. A decision key is a string\n * value which fully describes the decision apart from index. The decision key can\n * be used to quickly determine if two decisions are identical apart from index.\n * @public\n */\nexport type DecisionKey = Brand<string, 'DecisionKey'>;\n\n/**\n * Branded number representing a validated decision index.\n * @public\n */\nexport type DecisionIndex = Brand<number, 'DecisionIndex'>;\n\n/**\n * A string representing a validated context qualifier token. Context qualifier tokens are used\n * for filtering resources by context criteria. A context qualifier token has the form\n * `<qualifierName>=<value>` or `<value>`.\n * @public\n */\nexport type ContextQualifierToken = Brand<string, 'ContextQualifierToken'>;\n\n/**\n * A string representing a validated context token. Context tokens are\n * pipe-separated lists of one or more context qualifier tokens. Uses \"|\" as separator\n * to avoid conflicts with comma-separated values within context values.\n * Example: \"language=en-US,de-DE|territory=US|role=admin\"\n * @public\n */\nexport type ContextToken = Brand<string, 'ContextToken'>;\n\n/**\n * A string representing a single qualifier default value assignment.\n * Format: \"qualifierName=defaultValue\" or \"qualifierName=\" (to remove default)\n * Example: \"language=en-US,en-CA\" or \"territory=US\"\n * @public\n */\nexport type QualifierDefaultValueToken = Brand<string, 'QualifierDefaultValueToken'>;\n\n/**\n * A string representing a validated qualifier default values token. Default value tokens are\n * pipe-separated lists of one or more qualifier default value tokens. Uses \"|\" as separator\n * to avoid conflicts with comma-separated values within default values.\n * Example: \"language=en-US,en-CA|territory=US|device=desktop,tablet\"\n * @public\n */\nexport type QualifierDefaultValuesToken = Brand<string, 'QualifierDefaultValuesToken'>;\n"]}
|
|
@@ -32,7 +32,7 @@ export declare const conditionPriority: import("@fgv/ts-utils").Converter<import
|
|
|
32
32
|
* `Converter` which validates an `unknown` value as a {@link ConditionOperator | ConditionOperator}.
|
|
33
33
|
* @public
|
|
34
34
|
*/
|
|
35
|
-
export declare const conditionOperator: import("@fgv/ts-utils").Converter<import("./conditions").ConditionOperator, import("./conditions").ConditionOperator[]>;
|
|
35
|
+
export declare const conditionOperator: import("@fgv/ts-utils").Converter<import("./conditions").ConditionOperator, readonly import("./conditions").ConditionOperator[]>;
|
|
36
36
|
/**
|
|
37
37
|
* `Converter` which validates an `unknown` value as a {@link ConditionIndex | ConditionIndex}.
|
|
38
38
|
* @public
|
|
@@ -107,5 +107,25 @@ export declare const resourceTypeIndex: import("@fgv/ts-utils").Converter<import
|
|
|
107
107
|
* `Converter` for a resource value merge method.
|
|
108
108
|
* @public
|
|
109
109
|
*/
|
|
110
|
-
export declare const resourceValueMergeMethod: import("@fgv/ts-utils").Converter<import("./resources").ResourceValueMergeMethod, import("./resources").ResourceValueMergeMethod[]>;
|
|
110
|
+
export declare const resourceValueMergeMethod: import("@fgv/ts-utils").Converter<import("./resources").ResourceValueMergeMethod, readonly import("./resources").ResourceValueMergeMethod[]>;
|
|
111
|
+
/**
|
|
112
|
+
* `Converter` which validates an `unknown` value as a {@link ContextQualifierToken | ContextQualifierToken}.
|
|
113
|
+
* @public
|
|
114
|
+
*/
|
|
115
|
+
export declare const contextQualifierToken: import("@fgv/ts-utils").Converter<import("./conditions").ContextQualifierToken, unknown>;
|
|
116
|
+
/**
|
|
117
|
+
* `Converter` which validates an `unknown` value as a {@link ContextToken | ContextToken}.
|
|
118
|
+
* @public
|
|
119
|
+
*/
|
|
120
|
+
export declare const contextToken: import("@fgv/ts-utils").Converter<import("./conditions").ContextToken, unknown>;
|
|
121
|
+
/**
|
|
122
|
+
* `Converter` which validates an `unknown` value as a {@link QualifierDefaultValueToken | QualifierDefaultValueToken}.
|
|
123
|
+
* @public
|
|
124
|
+
*/
|
|
125
|
+
export declare const qualifierDefaultValueToken: import("@fgv/ts-utils").Converter<import("./conditions").QualifierDefaultValueToken, unknown>;
|
|
126
|
+
/**
|
|
127
|
+
* `Converter` which validates an `unknown` value as a {@link QualifierDefaultValuesToken | QualifierDefaultValuesToken}.
|
|
128
|
+
* @public
|
|
129
|
+
*/
|
|
130
|
+
export declare const qualifierDefaultValuesToken: import("@fgv/ts-utils").Converter<import("./conditions").QualifierDefaultValuesToken, unknown>;
|
|
111
131
|
//# sourceMappingURL=convert.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../../../src/packlets/common/convert.ts"],"names":[],"mappings":"AA6BA;;;GAGG;AACH,eAAO,MAAM,aAAa,kFAAkD,CAAC;AAE7E;;;GAGG;AACH,eAAO,MAAM,cAAc,mFAAmD,CAAC;AAE/E;;;GAGG;AACH,eAAO,MAAM,iBAAiB,sFAAsD,CAAC;AAErF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,uFAAuD,CAAC;AAEvF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,wFAAwD,CAAC;AAEzF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,sFAAsD,CAAC;AAErF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":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AAwB,8IAA2D,CAAC;AAEjG;;;GAGG;AACH,eAAO,MAAM,qBAAqB,0FAA0D,CAAC;AAE7F;;;GAGG;AACH,eAAO,MAAM,YAAY,iFAAiD,CAAC;AAE3E;;;GAGG;AACH,eAAO,MAAM,0BAA0B,+FAA+D,CAAC;AAEvG;;;GAGG;AACH,eAAO,MAAM,2BAA2B,gGAAgE,CAAC"}
|
|
@@ -54,7 +54,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
54
54
|
};
|
|
55
55
|
})();
|
|
56
56
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
57
|
-
exports.resourceValueMergeMethod = exports.resourceTypeIndex = exports.resourceTypeName = exports.resourceIndex = exports.resourceName = exports.resourceId = exports.decisionKey = exports.decisionIndex = exports.conditionSetHash = exports.conditionSetToken = exports.conditionSetKey = exports.conditionSetIndex = exports.conditionToken = exports.conditionKey = exports.conditionIndex = exports.conditionOperator = exports.conditionPriority = exports.qualifierMatchScore = exports.qualifierTypeIndex = exports.qualifierTypeName = exports.qualifierIndex = exports.qualifierName = void 0;
|
|
57
|
+
exports.qualifierDefaultValuesToken = exports.qualifierDefaultValueToken = exports.contextToken = exports.contextQualifierToken = exports.resourceValueMergeMethod = exports.resourceTypeIndex = exports.resourceTypeName = exports.resourceIndex = exports.resourceName = exports.resourceId = exports.decisionKey = exports.decisionIndex = exports.conditionSetHash = exports.conditionSetToken = exports.conditionSetKey = exports.conditionSetIndex = exports.conditionToken = exports.conditionKey = exports.conditionIndex = exports.conditionOperator = exports.conditionPriority = exports.qualifierMatchScore = exports.qualifierTypeIndex = exports.qualifierTypeName = exports.qualifierIndex = exports.qualifierName = void 0;
|
|
58
58
|
const ts_utils_1 = require("@fgv/ts-utils");
|
|
59
59
|
const Validate = __importStar(require("./validate"));
|
|
60
60
|
const conditions_1 = require("./conditions");
|
|
@@ -170,4 +170,24 @@ exports.resourceTypeIndex = ts_utils_1.Converters.number.map(Validate.toResource
|
|
|
170
170
|
* @public
|
|
171
171
|
*/
|
|
172
172
|
exports.resourceValueMergeMethod = ts_utils_1.Converters.enumeratedValue(resources_1.allResourceValueMergeMethods);
|
|
173
|
+
/**
|
|
174
|
+
* `Converter` which validates an `unknown` value as a {@link ContextQualifierToken | ContextQualifierToken}.
|
|
175
|
+
* @public
|
|
176
|
+
*/
|
|
177
|
+
exports.contextQualifierToken = ts_utils_1.Converters.string.map(Validate.toContextQualifierToken);
|
|
178
|
+
/**
|
|
179
|
+
* `Converter` which validates an `unknown` value as a {@link ContextToken | ContextToken}.
|
|
180
|
+
* @public
|
|
181
|
+
*/
|
|
182
|
+
exports.contextToken = ts_utils_1.Converters.string.map(Validate.toContextToken);
|
|
183
|
+
/**
|
|
184
|
+
* `Converter` which validates an `unknown` value as a {@link QualifierDefaultValueToken | QualifierDefaultValueToken}.
|
|
185
|
+
* @public
|
|
186
|
+
*/
|
|
187
|
+
exports.qualifierDefaultValueToken = ts_utils_1.Converters.string.map(Validate.toQualifierDefaultValueToken);
|
|
188
|
+
/**
|
|
189
|
+
* `Converter` which validates an `unknown` value as a {@link QualifierDefaultValuesToken | QualifierDefaultValuesToken}.
|
|
190
|
+
* @public
|
|
191
|
+
*/
|
|
192
|
+
exports.qualifierDefaultValuesToken = ts_utils_1.Converters.string.map(Validate.toQualifierDefaultValuesToken);
|
|
173
193
|
//# sourceMappingURL=convert.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convert.js","sourceRoot":"","sources":["../../../src/packlets/common/convert.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4CAA2C;AAC3C,qDAAuC;AACvC,6CAAqD;AACrD,2CAA2D;AAE3D,2CAA2C;AAE3C;;;GAGG;AACU,QAAA,aAAa,GAAG,qBAAU,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;AAE7E;;;GAGG;AACU,QAAA,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,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;AAErF;;;GAGG;AACU,QAAA,gBAAgB,GAAG,qBAAU,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;AAEnF;;;GAGG;AACU,QAAA,aAAa,GAAG,qBAAU,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;AAE7E;;;GAGG;AACU,QAAA,WAAW,GAAG,qBAAU,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;AAEzE;;;GAGG;AACU,QAAA,UAAU,GAAG,qBAAU,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;AAEvE;;;GAGG;AACU,QAAA,YAAY,GAAG,qBAAU,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;AAE3E;;;GAGG;AACU,QAAA,aAAa,GAAG,qBAAU,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;AAE7E;;;GAGG;AACU,QAAA,gBAAgB,GAAG,qBAAU,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;AAEnF;;;GAGG;AACU,QAAA,iBAAiB,GAAG,qBAAU,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;AAErF;;;GAGG;AACU,QAAA,wBAAwB,GAAG,qBAAU,CAAC,eAAe,CAAC,wCAA4B,CAAC,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 { Converters } from '@fgv/ts-utils';\nimport * as Validate from './validate';\nimport { allConditionOperators } from './conditions';\nimport { allResourceValueMergeMethods } from './resources';\n\n/* eslint-disable @rushstack/typedef-var */\n\n/**\n * `Converter` which validates an `unknown` value as a {@link QualifierName | QualifierName}.\n * @public\n */\nexport const qualifierName = Converters.string.map(Validate.toQualifierName);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link QualifierIndex | QualifierIndex}.\n * @public\n */\nexport const qualifierIndex = Converters.number.map(Validate.toQualifierIndex);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link QualifierTypeName | QualifierTypeName}.\n * @public\n */\nexport const qualifierTypeName = Converters.string.map(Validate.toQualifierTypeName);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link QualifierTypeIndex | QualifierTypeIndex}.\n * @public\n */\nexport const qualifierTypeIndex = Converters.number.map(Validate.toQualifierTypeIndex);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link QualifierConditionValue | QualifierConditionValue}.\n * @public\n */\nexport const qualifierMatchScore = Converters.number.map(Validate.toQualifierMatchScore);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ConditionPriority | ConditionPriority}.\n * @public\n */\nexport const conditionPriority = Converters.number.map(Validate.toConditionPriority);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ConditionOperator | ConditionOperator}.\n * @public\n */\nexport const conditionOperator = Converters.enumeratedValue(allConditionOperators);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ConditionIndex | ConditionIndex}.\n * @public\n */\nexport const conditionIndex = Converters.number.map(Validate.toConditionIndex);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ConditionKey | ConditionKey}.\n * @public\n */\nexport const conditionKey = Converters.string.map(Validate.toConditionKey);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ConditionToken | ConditionToken}.\n * @public\n */\nexport const conditionToken = Converters.string.map(Validate.toConditionToken);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ConditionSetIndex | ConditionSetIndex}.\n * @public\n */\nexport const conditionSetIndex = Converters.number.map(Validate.toConditionSetIndex);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ConditionSetKey | ConditionSetKey}.\n * @public\n */\nexport const conditionSetKey = Converters.string.map(Validate.toConditionSetKey);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ConditionSetToken | ConditionSetToken}.\n * @public\n */\nexport const conditionSetToken = Converters.string.map(Validate.toConditionSetToken);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ConditionSetHash | ConditionSetHash}.\n * @public\n */\nexport const conditionSetHash = Converters.string.map(Validate.toConditionSetHash);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link DecisionIndex | DecisionIndex}.\n * @public\n */\nexport const decisionIndex = Converters.number.map(Validate.toDecisionIndex);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link DecisionKey | DecisionKey}.\n * @public\n */\nexport const decisionKey = Converters.string.map(Validate.toDecisionKey);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ResourceId | ResourceId}.\n * @public\n */\nexport const resourceId = Converters.string.map(Validate.toResourceId);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ResourceName | ResourceName}.\n * @public\n */\nexport const resourceName = Converters.string.map(Validate.toResourceName);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ResourceIndex | ResourceIndex}.\n * @public\n */\nexport const resourceIndex = Converters.number.map(Validate.toResourceIndex);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ResourceTypeName | ResourceTypeName}.\n * @public\n */\nexport const resourceTypeName = Converters.string.map(Validate.toResourceTypeName);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ResourceTypeIndex | ResourceTypeIndex}.\n * @public\n */\nexport const resourceTypeIndex = Converters.number.map(Validate.toResourceTypeIndex);\n\n/**\n * `Converter` for a resource value merge method.\n * @public\n */\nexport const resourceValueMergeMethod = Converters.enumeratedValue(allResourceValueMergeMethods);\n"]}
|
|
1
|
+
{"version":3,"file":"convert.js","sourceRoot":"","sources":["../../../src/packlets/common/convert.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,4CAA2C;AAC3C,qDAAuC;AACvC,6CAAqD;AACrD,2CAA2D;AAE3D,2CAA2C;AAE3C;;;GAGG;AACU,QAAA,aAAa,GAAG,qBAAU,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;AAE7E;;;GAGG;AACU,QAAA,cAAc,GAAG,qBAAU,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC;AAE/E;;;GAGG;AACU,QAAA,iBAAiB,GAAG,qBAAU,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;AAErF;;;GAGG;AACU,QAAA,kBAAkB,GAAG,qBAAU,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC;AAEvF;;;GAGG;AACU,QAAA,mBAAmB,GAAG,qBAAU,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAC;AAEzF;;;GAGG;AACU,QAAA,iBAAiB,G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,YAAY,CAAC,CAAC;AAEvE;;;GAGG;AACU,QAAA,YAAY,GAAG,qBAAU,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;AAE3E;;;GAGG;AACU,QAAA,aAAa,GAAG,qBAAU,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;AAE7E;;;GAGG;AACU,QAAA,gBAAgB,GAAG,qBAAU,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;AAEnF;;;GAGG;AACU,QAAA,iBAAiB,GAAG,qBAAU,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;AAErF;;;GAGG;AACU,QAAA,wBAAwB,GAAG,qBAAU,CAAC,eAAe,CAAC,wCAA4B,CAAC,CAAC;AAEjG;;;GAGG;AACU,QAAA,qBAAqB,GAAG,qBAAU,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC;AAE7F;;;GAGG;AACU,QAAA,YAAY,GAAG,qBAAU,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;AAE3E;;;GAGG;AACU,QAAA,0BAA0B,GAAG,qBAAU,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,4BAA4B,CAAC,CAAC;AAEvG;;;GAGG;AACU,QAAA,2BAA2B,GAAG,qBAAU,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,6BAA6B,CAAC,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 { Converters } from '@fgv/ts-utils';\nimport * as Validate from './validate';\nimport { allConditionOperators } from './conditions';\nimport { allResourceValueMergeMethods } from './resources';\n\n/* eslint-disable @rushstack/typedef-var */\n\n/**\n * `Converter` which validates an `unknown` value as a {@link QualifierName | QualifierName}.\n * @public\n */\nexport const qualifierName = Converters.string.map(Validate.toQualifierName);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link QualifierIndex | QualifierIndex}.\n * @public\n */\nexport const qualifierIndex = Converters.number.map(Validate.toQualifierIndex);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link QualifierTypeName | QualifierTypeName}.\n * @public\n */\nexport const qualifierTypeName = Converters.string.map(Validate.toQualifierTypeName);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link QualifierTypeIndex | QualifierTypeIndex}.\n * @public\n */\nexport const qualifierTypeIndex = Converters.number.map(Validate.toQualifierTypeIndex);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link QualifierConditionValue | QualifierConditionValue}.\n * @public\n */\nexport const qualifierMatchScore = Converters.number.map(Validate.toQualifierMatchScore);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ConditionPriority | ConditionPriority}.\n * @public\n */\nexport const conditionPriority = Converters.number.map(Validate.toConditionPriority);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ConditionOperator | ConditionOperator}.\n * @public\n */\nexport const conditionOperator = Converters.enumeratedValue(allConditionOperators);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ConditionIndex | ConditionIndex}.\n * @public\n */\nexport const conditionIndex = Converters.number.map(Validate.toConditionIndex);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ConditionKey | ConditionKey}.\n * @public\n */\nexport const conditionKey = Converters.string.map(Validate.toConditionKey);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ConditionToken | ConditionToken}.\n * @public\n */\nexport const conditionToken = Converters.string.map(Validate.toConditionToken);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ConditionSetIndex | ConditionSetIndex}.\n * @public\n */\nexport const conditionSetIndex = Converters.number.map(Validate.toConditionSetIndex);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ConditionSetKey | ConditionSetKey}.\n * @public\n */\nexport const conditionSetKey = Converters.string.map(Validate.toConditionSetKey);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ConditionSetToken | ConditionSetToken}.\n * @public\n */\nexport const conditionSetToken = Converters.string.map(Validate.toConditionSetToken);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ConditionSetHash | ConditionSetHash}.\n * @public\n */\nexport const conditionSetHash = Converters.string.map(Validate.toConditionSetHash);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link DecisionIndex | DecisionIndex}.\n * @public\n */\nexport const decisionIndex = Converters.number.map(Validate.toDecisionIndex);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link DecisionKey | DecisionKey}.\n * @public\n */\nexport const decisionKey = Converters.string.map(Validate.toDecisionKey);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ResourceId | ResourceId}.\n * @public\n */\nexport const resourceId = Converters.string.map(Validate.toResourceId);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ResourceName | ResourceName}.\n * @public\n */\nexport const resourceName = Converters.string.map(Validate.toResourceName);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ResourceIndex | ResourceIndex}.\n * @public\n */\nexport const resourceIndex = Converters.number.map(Validate.toResourceIndex);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ResourceTypeName | ResourceTypeName}.\n * @public\n */\nexport const resourceTypeName = Converters.string.map(Validate.toResourceTypeName);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ResourceTypeIndex | ResourceTypeIndex}.\n * @public\n */\nexport const resourceTypeIndex = Converters.number.map(Validate.toResourceTypeIndex);\n\n/**\n * `Converter` for a resource value merge method.\n * @public\n */\nexport const resourceValueMergeMethod = Converters.enumeratedValue(allResourceValueMergeMethods);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ContextQualifierToken | ContextQualifierToken}.\n * @public\n */\nexport const contextQualifierToken = Converters.string.map(Validate.toContextQualifierToken);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link ContextToken | ContextToken}.\n * @public\n */\nexport const contextToken = Converters.string.map(Validate.toContextToken);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link QualifierDefaultValueToken | QualifierDefaultValueToken}.\n * @public\n */\nexport const qualifierDefaultValueToken = Converters.string.map(Validate.toQualifierDefaultValueToken);\n\n/**\n * `Converter` which validates an `unknown` value as a {@link QualifierDefaultValuesToken | QualifierDefaultValuesToken}.\n * @public\n */\nexport const qualifierDefaultValuesToken = Converters.string.map(Validate.toQualifierDefaultValuesToken);\n"]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Result } from '@fgv/ts-utils';
|
|
2
|
+
import { ContextToken, ContextQualifierToken } from '../conditions';
|
|
3
|
+
/**
|
|
4
|
+
* The values needed to create a {@link ContextQualifierToken | context qualifier token}.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export interface IContextTokenParts {
|
|
8
|
+
qualifier?: string;
|
|
9
|
+
value: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Converts a {@link Helpers.IContextTokenParts | the parts that make up a context qualifier token} into
|
|
13
|
+
* a syntactically validated {@link ContextQualifierToken | context qualifier token}.
|
|
14
|
+
* @param parts - the parts to convert
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
export declare function buildContextQualifierToken({ qualifier, value }: IContextTokenParts): Result<ContextQualifierToken>;
|
|
18
|
+
/**
|
|
19
|
+
* Converts an array of {@link Helpers.IContextTokenParts | context qualifier token parts} into a
|
|
20
|
+
* syntactically validated {@link ContextToken | context token}.
|
|
21
|
+
* @param parts - the parts to convert
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
export declare function buildContextToken(parts: ReadonlyArray<IContextTokenParts>): Result<ContextToken>;
|
|
25
|
+
/**
|
|
26
|
+
* Parses a context qualifier token string into its {@link Helpers.IContextTokenParts | parts}.
|
|
27
|
+
* @param token - the token string to parse.
|
|
28
|
+
* @returns `Success` with the parts if successful, `Failure` with an error message if not.
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export declare function parseContextQualifierTokenParts(token: string): Result<IContextTokenParts>;
|
|
32
|
+
/**
|
|
33
|
+
* Parses a context token string into an array of {@link Helpers.IContextTokenParts | context qualifier token parts}.
|
|
34
|
+
* @param token - the context token string to parse.
|
|
35
|
+
* @returns `Success` with the parts if successful, `Failure` with an error message if not.
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
38
|
+
export declare function parseContextTokenParts(token: string): Result<IContextTokenParts[]>;
|
|
39
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../src/packlets/common/helpers/context.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAc,MAAM,EAAW,MAAM,eAAe,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAEpE;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,EACzC,SAAS,EACT,KAAK,EACN,EAAE,kBAAkB,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAEpD;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,aAAa,CAAC,kBAAkB,CAAC,GAAG,MAAM,CAAC,YAAY,CAAC,CAIhG;AAED;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAQzF;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,kBAAkB,EAAE,CAAC,CAKlF"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2025 Erik Fortune
|
|
4
|
+
*
|
|
5
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
* in the Software without restriction, including without limitation the rights
|
|
8
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
* furnished to do so, subject to the following conditions:
|
|
11
|
+
*
|
|
12
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
* copies or substantial portions of the Software.
|
|
14
|
+
*
|
|
15
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
* SOFTWARE.
|
|
22
|
+
*/
|
|
23
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
24
|
+
if (k2 === undefined) k2 = k;
|
|
25
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
26
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
27
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
28
|
+
}
|
|
29
|
+
Object.defineProperty(o, k2, desc);
|
|
30
|
+
}) : (function(o, m, k, k2) {
|
|
31
|
+
if (k2 === undefined) k2 = k;
|
|
32
|
+
o[k2] = m[k];
|
|
33
|
+
}));
|
|
34
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
35
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
36
|
+
}) : function(o, v) {
|
|
37
|
+
o["default"] = v;
|
|
38
|
+
});
|
|
39
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
40
|
+
var ownKeys = function(o) {
|
|
41
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
42
|
+
var ar = [];
|
|
43
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
44
|
+
return ar;
|
|
45
|
+
};
|
|
46
|
+
return ownKeys(o);
|
|
47
|
+
};
|
|
48
|
+
return function (mod) {
|
|
49
|
+
if (mod && mod.__esModule) return mod;
|
|
50
|
+
var result = {};
|
|
51
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
52
|
+
__setModuleDefault(result, mod);
|
|
53
|
+
return result;
|
|
54
|
+
};
|
|
55
|
+
})();
|
|
56
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
57
|
+
exports.buildContextQualifierToken = buildContextQualifierToken;
|
|
58
|
+
exports.buildContextToken = buildContextToken;
|
|
59
|
+
exports.parseContextQualifierTokenParts = parseContextQualifierTokenParts;
|
|
60
|
+
exports.parseContextTokenParts = parseContextTokenParts;
|
|
61
|
+
const ts_utils_1 = require("@fgv/ts-utils");
|
|
62
|
+
const Validate = __importStar(require("../validate"));
|
|
63
|
+
/**
|
|
64
|
+
* Converts a {@link Helpers.IContextTokenParts | the parts that make up a context qualifier token} into
|
|
65
|
+
* a syntactically validated {@link ContextQualifierToken | context qualifier token}.
|
|
66
|
+
* @param parts - the parts to convert
|
|
67
|
+
* @public
|
|
68
|
+
*/
|
|
69
|
+
function buildContextQualifierToken({ qualifier, value }) {
|
|
70
|
+
return Validate.toContextQualifierToken(qualifier ? `${qualifier}=${value}` : value);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Converts an array of {@link Helpers.IContextTokenParts | context qualifier token parts} into a
|
|
74
|
+
* syntactically validated {@link ContextToken | context token}.
|
|
75
|
+
* @param parts - the parts to convert
|
|
76
|
+
* @public
|
|
77
|
+
*/
|
|
78
|
+
function buildContextToken(parts) {
|
|
79
|
+
return (0, ts_utils_1.mapResults)(parts.map(buildContextQualifierToken)).onSuccess((tokens) => Validate.toContextToken(tokens.join('|')));
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Parses a context qualifier token string into its {@link Helpers.IContextTokenParts | parts}.
|
|
83
|
+
* @param token - the token string to parse.
|
|
84
|
+
* @returns `Success` with the parts if successful, `Failure` with an error message if not.
|
|
85
|
+
* @public
|
|
86
|
+
*/
|
|
87
|
+
function parseContextQualifierTokenParts(token) {
|
|
88
|
+
return Validate.toContextQualifierToken(token).onSuccess((t) => {
|
|
89
|
+
const parts = t.split('=');
|
|
90
|
+
if (parts.length === 1) {
|
|
91
|
+
return (0, ts_utils_1.succeed)({ value: parts[0] });
|
|
92
|
+
}
|
|
93
|
+
return (0, ts_utils_1.succeed)({ qualifier: parts[0], value: parts[1] });
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Parses a context token string into an array of {@link Helpers.IContextTokenParts | context qualifier token parts}.
|
|
98
|
+
* @param token - the context token string to parse.
|
|
99
|
+
* @returns `Success` with the parts if successful, `Failure` with an error message if not.
|
|
100
|
+
* @public
|
|
101
|
+
*/
|
|
102
|
+
function parseContextTokenParts(token) {
|
|
103
|
+
if (token === '') {
|
|
104
|
+
return (0, ts_utils_1.succeed)([]);
|
|
105
|
+
}
|
|
106
|
+
return (0, ts_utils_1.mapResults)(token.split('|').map((part) => parseContextQualifierTokenParts(part.trim())));
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../../src/packlets/common/helpers/context.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBH,gEAKC;AAQD,8CAIC;AAQD,0EAQC;AAQD,wDAKC;AAjED,4CAA4D;AAC5D,sDAAwC;AAYxC;;;;;GAKG;AACH,SAAgB,0BAA0B,CAAC,EACzC,SAAS,EACT,KAAK,EACc;IACnB,OAAO,QAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AACvF,CAAC;AAED;;;;;GAKG;AACH,SAAgB,iBAAiB,CAAC,KAAwC;IACxE,OAAO,IAAA,qBAAU,EAAC,KAAK,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,EAAE,EAAE,CAC5E,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAC1C,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,SAAgB,+BAA+B,CAAC,KAAa;IAC3D,OAAO,QAAQ,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;QAC7D,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC3B,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACvB,OAAO,IAAA,kBAAO,EAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACtC,CAAC;QACD,OAAO,IAAA,kBAAO,EAAC,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;GAKG;AACH,SAAgB,sBAAsB,CAAC,KAAa;IAClD,IAAI,KAAK,KAAK,EAAE,EAAE,CAAC;QACjB,OAAO,IAAA,kBAAO,EAAC,EAAE,CAAC,CAAC;IACrB,CAAC;IACD,OAAO,IAAA,qBAAU,EAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,+BAA+B,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AAClG,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 { mapResults, Result, succeed } from '@fgv/ts-utils';\nimport * as Validate from '../validate';\nimport { ContextToken, ContextQualifierToken } from '../conditions';\n\n/**\n * The values needed to create a {@link ContextQualifierToken | context qualifier token}.\n * @public\n */\nexport interface IContextTokenParts {\n qualifier?: string;\n value: string;\n}\n\n/**\n * Converts a {@link Helpers.IContextTokenParts | the parts that make up a context qualifier token} into\n * a syntactically validated {@link ContextQualifierToken | context qualifier token}.\n * @param parts - the parts to convert\n * @public\n */\nexport function buildContextQualifierToken({\n qualifier,\n value\n}: IContextTokenParts): Result<ContextQualifierToken> {\n return Validate.toContextQualifierToken(qualifier ? `${qualifier}=${value}` : value);\n}\n\n/**\n * Converts an array of {@link Helpers.IContextTokenParts | context qualifier token parts} into a\n * syntactically validated {@link ContextToken | context token}.\n * @param parts - the parts to convert\n * @public\n */\nexport function buildContextToken(parts: ReadonlyArray<IContextTokenParts>): Result<ContextToken> {\n return mapResults(parts.map(buildContextQualifierToken)).onSuccess((tokens) =>\n Validate.toContextToken(tokens.join('|'))\n );\n}\n\n/**\n * Parses a context qualifier token string into its {@link Helpers.IContextTokenParts | parts}.\n * @param token - the token string to parse.\n * @returns `Success` with the parts if successful, `Failure` with an error message if not.\n * @public\n */\nexport function parseContextQualifierTokenParts(token: string): Result<IContextTokenParts> {\n return Validate.toContextQualifierToken(token).onSuccess((t) => {\n const parts = t.split('=');\n if (parts.length === 1) {\n return succeed({ value: parts[0] });\n }\n return succeed({ qualifier: parts[0], value: parts[1] });\n });\n}\n\n/**\n * Parses a context token string into an array of {@link Helpers.IContextTokenParts | context qualifier token parts}.\n * @param token - the context token string to parse.\n * @returns `Success` with the parts if successful, `Failure` with an error message if not.\n * @public\n */\nexport function parseContextTokenParts(token: string): Result<IContextTokenParts[]> {\n if (token === '') {\n return succeed([]);\n }\n return mapResults(token.split('|').map((part) => parseContextQualifierTokenParts(part.trim())));\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/packlets/common/helpers/index.ts"],"names":[],"mappings":"AAsBA,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/packlets/common/helpers/index.ts"],"names":[],"mappings":"AAsBA,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC"}
|
|
@@ -36,5 +36,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
};
|
|
37
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
38
|
__exportStar(require("./conditions"), exports);
|
|
39
|
+
__exportStar(require("./context"), exports);
|
|
40
|
+
__exportStar(require("./qualifierDefaultValues"), exports);
|
|
39
41
|
__exportStar(require("./resources"), exports);
|
|
40
42
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/packlets/common/helpers/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;AAEH,+CAA6B;AAC7B,8CAA4B","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nexport * from './conditions';\nexport * from './resources';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/packlets/common/helpers/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;AAEH,+CAA6B;AAC7B,4CAA0B;AAC1B,2DAAyC;AACzC,8CAA4B","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nexport * from './conditions';\nexport * from './context';\nexport * from './qualifierDefaultValues';\nexport * from './resources';\n"]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Result } from '@fgv/ts-utils';
|
|
2
|
+
import { QualifierDefaultValueToken, QualifierDefaultValuesToken } from '../conditions';
|
|
3
|
+
/**
|
|
4
|
+
* The values needed to create a {@link QualifierDefaultValueToken | qualifier default value token}.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export interface IQualifierDefaultValueTokenParts {
|
|
8
|
+
qualifier: string;
|
|
9
|
+
value: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Converts a {@link Helpers.IQualifierDefaultValueTokenParts | the parts that make up a qualifier default value token} into
|
|
13
|
+
* a syntactically validated {@link QualifierDefaultValueToken | qualifier default value token}.
|
|
14
|
+
* @param parts - the parts to convert
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
export declare function buildQualifierDefaultValueToken({ qualifier, value }: IQualifierDefaultValueTokenParts): Result<QualifierDefaultValueToken>;
|
|
18
|
+
/**
|
|
19
|
+
* Converts an array of {@link Helpers.IQualifierDefaultValueTokenParts | qualifier default value token parts} into a
|
|
20
|
+
* syntactically validated {@link QualifierDefaultValuesToken | qualifier default values token}.
|
|
21
|
+
* @param parts - the parts to convert
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
export declare function buildQualifierDefaultValuesToken(parts: ReadonlyArray<IQualifierDefaultValueTokenParts>): Result<QualifierDefaultValuesToken>;
|
|
25
|
+
/**
|
|
26
|
+
* Parses a qualifier default value token string into its {@link Helpers.IQualifierDefaultValueTokenParts | parts}.
|
|
27
|
+
* @param token - the token string to parse.
|
|
28
|
+
* @returns `Success` with the parts if successful, `Failure` with an error message if not.
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export declare function parseQualifierDefaultValueTokenParts(token: string): Result<IQualifierDefaultValueTokenParts>;
|
|
32
|
+
/**
|
|
33
|
+
* Parses a qualifier default values token string into an array of {@link Helpers.IQualifierDefaultValueTokenParts | qualifier default value token parts}.
|
|
34
|
+
* @param token - the qualifier default values token string to parse.
|
|
35
|
+
* @returns `Success` with the parts if successful, `Failure` with an error message if not.
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
38
|
+
export declare function parseQualifierDefaultValuesTokenParts(token: string): Result<IQualifierDefaultValueTokenParts[]>;
|
|
39
|
+
//# sourceMappingURL=qualifierDefaultValues.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qualifierDefaultValues.d.ts","sourceRoot":"","sources":["../../../../src/packlets/common/helpers/qualifierDefaultValues.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAc,MAAM,EAAW,MAAM,eAAe,CAAC;AAE5D,OAAO,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAExF;;;GAGG;AACH,MAAM,WAAW,gCAAgC;IAC/C,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAAC,EAC9C,SAAS,EACT,KAAK,EACN,EAAE,gCAAgC,GAAG,MAAM,CAAC,0BAA0B,CAAC,CAEvE;AAED;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,aAAa,CAAC,gCAAgC,CAAC,GACrD,MAAM,CAAC,2BAA2B,CAAC,CAIrC;AAED;;;;;GAKG;AACH,wBAAgB,oCAAoC,CAClD,KAAK,EAAE,MAAM,GACZ,MAAM,CAAC,gCAAgC,CAAC,CAK1C;AAED;;;;;GAKG;AACH,wBAAgB,qCAAqC,CACnD,KAAK,EAAE,MAAM,GACZ,MAAM,CAAC,gCAAgC,EAAE,CAAC,CAK5C"}
|