@fgv/ts-res 4.5.0-2 → 5.0.0-0
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 +4225 -324
- 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 +3 -2
- 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 +38 -13
- package/lib/packlets/qualifier-types/literalQualifierType.d.ts.map +1 -1
- package/lib/packlets/qualifier-types/literalQualifierType.js +44 -10
- package/lib/packlets/qualifier-types/literalQualifierType.js.map +1 -1
- package/lib/packlets/qualifier-types/literalValueHierarchy.d.ts +107 -0
- package/lib/packlets/qualifier-types/literalValueHierarchy.d.ts.map +1 -0
- package/lib/packlets/qualifier-types/literalValueHierarchy.js +215 -0
- package/lib/packlets/qualifier-types/literalValueHierarchy.js.map +1 -0
- package/lib/packlets/qualifier-types/qualifierType.d.ts +22 -18
- package/lib/packlets/qualifier-types/qualifierType.d.ts.map +1 -1
- package/lib/packlets/qualifier-types/qualifierType.js +9 -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 +33 -32
- 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
|
@@ -0,0 +1,179 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.QualifierDefaultValueTokens = void 0;
|
|
25
|
+
const ts_utils_1 = require("@fgv/ts-utils");
|
|
26
|
+
const common_1 = require("../common");
|
|
27
|
+
/**
|
|
28
|
+
* Helper class to parse and validate qualifier default value tokens.
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
class QualifierDefaultValueTokens {
|
|
32
|
+
/**
|
|
33
|
+
* Constructs a new {@link Qualifiers.QualifierDefaultValueTokens | QualifierDefaultValueTokens } instance.
|
|
34
|
+
* @param qualifiers - the {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} to use
|
|
35
|
+
*/
|
|
36
|
+
constructor(qualifiers) {
|
|
37
|
+
this.qualifiers = qualifiers;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Parses a {@link QualifierDefaultValueToken | qualifier default value token} string and validates the parts
|
|
41
|
+
* against the qualifiers present in the {@link Qualifiers.QualifierDefaultValueTokens.qualifiers | qualifier collector}.
|
|
42
|
+
* @param token - the token string to parse.
|
|
43
|
+
* @returns `Success` with the {@link Qualifiers.IValidatedQualifierDefaultValueDecl | validated qualifier default value declaration}
|
|
44
|
+
* if successful, `Failure` with an error message if not.
|
|
45
|
+
*/
|
|
46
|
+
parseQualifierDefaultValueToken(token) {
|
|
47
|
+
return QualifierDefaultValueTokens.parseQualifierDefaultValueToken(token, this.qualifiers);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Parses a {@link QualifierDefaultValuesToken | qualifier default values token} string and validates the parts
|
|
51
|
+
* against the qualifiers present in the {@link Qualifiers.QualifierDefaultValueTokens.qualifiers | qualifier collector}.
|
|
52
|
+
* @param token - the token string to parse.
|
|
53
|
+
* @returns `Success` with the array of {@link Qualifiers.IValidatedQualifierDefaultValueDecl | validated qualifier default value declarations}
|
|
54
|
+
* if successful, `Failure` with an error message if not.
|
|
55
|
+
*/
|
|
56
|
+
parseQualifierDefaultValuesToken(token) {
|
|
57
|
+
return QualifierDefaultValueTokens.parseQualifierDefaultValuesToken(token, this.qualifiers);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Validates the {@link Helpers.IQualifierDefaultValueTokenParts | parts} of a {@link QualifierDefaultValueToken | qualifier default value token}.
|
|
61
|
+
* @param parts - the parts to validate
|
|
62
|
+
* @returns `Success` with the validated declaration if successful, `Failure` with an error message if not.
|
|
63
|
+
*/
|
|
64
|
+
validateQualifierDefaultValueTokenParts(parts) {
|
|
65
|
+
return QualifierDefaultValueTokens.validateQualifierDefaultValueTokenParts(parts, this.qualifiers);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Converts a {@link QualifierDefaultValuesToken | qualifier default values token} to a validated qualifier default values declaration.
|
|
69
|
+
* @param token - the qualifier default values token to convert
|
|
70
|
+
* @returns `Success` with the validated qualifier default values declaration if successful, `Failure` with an error message if not.
|
|
71
|
+
*/
|
|
72
|
+
qualifierDefaultValuesTokenToDecl(token) {
|
|
73
|
+
return QualifierDefaultValueTokens.qualifierDefaultValuesTokenToDecl(token, this.qualifiers);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Converts a validated qualifier default values declaration to a {@link QualifierDefaultValuesToken | qualifier default values token}.
|
|
77
|
+
* @param decl - the validated qualifier default values declaration to convert
|
|
78
|
+
* @returns `Success` with the qualifier default values token if successful, `Failure` with an error message if not.
|
|
79
|
+
*/
|
|
80
|
+
declToQualifierDefaultValuesToken(decl) {
|
|
81
|
+
return QualifierDefaultValueTokens.declToQualifierDefaultValuesToken(decl);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Parses a {@link QualifierDefaultValueToken | qualifier default value token} and validates it against the qualifiers
|
|
85
|
+
* present in the supplied {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector}.
|
|
86
|
+
* @param token - the token string to parse.
|
|
87
|
+
* @param qualifiers - the {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} to use
|
|
88
|
+
* @returns `Success` with a {@link Qualifiers.IValidatedQualifierDefaultValueDecl | validated qualifier default value declaration} if successful,
|
|
89
|
+
* `Failure` with an error message if not.
|
|
90
|
+
*/
|
|
91
|
+
static parseQualifierDefaultValueToken(token, qualifiers) {
|
|
92
|
+
return common_1.Helpers.parseQualifierDefaultValueTokenParts(token).onSuccess((parts) => {
|
|
93
|
+
return QualifierDefaultValueTokens.validateQualifierDefaultValueTokenParts(parts, qualifiers);
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Parses a {@link QualifierDefaultValuesToken | qualifier default values token} and validates it against the qualifiers
|
|
98
|
+
* present in the supplied {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector}.
|
|
99
|
+
* @param token - the token string to parse.
|
|
100
|
+
* @param qualifiers - the {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} to use
|
|
101
|
+
* @returns `Success` with an array of {@link Qualifiers.IValidatedQualifierDefaultValueDecl | validated qualifier default value declarations}
|
|
102
|
+
* if successful, `Failure` with an error message if not
|
|
103
|
+
*/
|
|
104
|
+
static parseQualifierDefaultValuesToken(token, qualifiers) {
|
|
105
|
+
return common_1.Helpers.parseQualifierDefaultValuesTokenParts(token).onSuccess((parts) => {
|
|
106
|
+
return (0, ts_utils_1.mapResults)(parts.map((part) => QualifierDefaultValueTokens.validateQualifierDefaultValueTokenParts(part, qualifiers)));
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Validates the parts of a qualifier default value token against the qualifiers present in the supplied
|
|
111
|
+
* {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector}.
|
|
112
|
+
* @param parts - the {@link Helpers.IQualifierDefaultValueTokenParts | qualifier default value token parts} to validate.
|
|
113
|
+
* @param qualifiers - the {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} used to
|
|
114
|
+
* validate qualifier names and values.
|
|
115
|
+
* @returns `Success` with a {@link Qualifiers.IValidatedQualifierDefaultValueDecl | validated qualifier default value declaration} if successful,
|
|
116
|
+
* `Failure` with an error message if not.
|
|
117
|
+
*/
|
|
118
|
+
static validateQualifierDefaultValueTokenParts(parts, qualifiers) {
|
|
119
|
+
return qualifiers.getByNameOrToken(parts.qualifier).onSuccess((qualifier) => {
|
|
120
|
+
// Allow empty values to remove defaults
|
|
121
|
+
if (parts.value === '') {
|
|
122
|
+
return (0, ts_utils_1.succeed)({ qualifier, value: '' });
|
|
123
|
+
}
|
|
124
|
+
return qualifier.type
|
|
125
|
+
.validateContextValue(parts.value)
|
|
126
|
+
.onSuccess((value) => {
|
|
127
|
+
return (0, ts_utils_1.succeed)({ qualifier, value });
|
|
128
|
+
})
|
|
129
|
+
.withDetail('failure', 'success');
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Converts a {@link QualifierDefaultValuesToken | qualifier default values token} to a validated qualifier default values declaration.
|
|
134
|
+
* @param token - the qualifier default values token to convert
|
|
135
|
+
* @param qualifiers - the {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} to use
|
|
136
|
+
* @returns `Success` with the validated qualifier default values declaration if successful, `Failure` with an error message if not.
|
|
137
|
+
*/
|
|
138
|
+
static qualifierDefaultValuesTokenToDecl(token, qualifiers) {
|
|
139
|
+
return QualifierDefaultValueTokens.parseQualifierDefaultValuesToken(token, qualifiers).onSuccess((qualifierDefaultValues) => {
|
|
140
|
+
const defaultValues = {};
|
|
141
|
+
for (const { qualifier, value } of qualifierDefaultValues) {
|
|
142
|
+
const qualifierName = qualifier.name;
|
|
143
|
+
const contextValue = value;
|
|
144
|
+
// Check for duplicate qualifiers
|
|
145
|
+
if (qualifierName in defaultValues) {
|
|
146
|
+
return (0, ts_utils_1.fail)(`${qualifier.name}: duplicate qualifier in default values token`);
|
|
147
|
+
}
|
|
148
|
+
// Only add non-empty values (empty values remove defaults)
|
|
149
|
+
if (contextValue !== '') {
|
|
150
|
+
defaultValues[qualifierName] = contextValue;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
return (0, ts_utils_1.succeed)(defaultValues);
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Converts a validated qualifier default values declaration to a {@link QualifierDefaultValuesToken | qualifier default values token}.
|
|
158
|
+
* @param decl - the validated qualifier default values declaration to convert
|
|
159
|
+
* @returns `Success` with the qualifier default values token if successful, `Failure` with an error message if not.
|
|
160
|
+
*/
|
|
161
|
+
static declToQualifierDefaultValuesToken(decl) {
|
|
162
|
+
const tokens = [];
|
|
163
|
+
for (const [qualifierName, contextValue] of Object.entries(decl)) {
|
|
164
|
+
// Build token as "qualifier=value"
|
|
165
|
+
tokens.push(`${qualifierName}=${contextValue}`);
|
|
166
|
+
}
|
|
167
|
+
if (tokens.length === 0) {
|
|
168
|
+
return (0, ts_utils_1.succeed)('');
|
|
169
|
+
}
|
|
170
|
+
const tokenString = tokens.join('|');
|
|
171
|
+
// Validate the generated token
|
|
172
|
+
return common_1.Helpers.buildQualifierDefaultValuesToken(tokens.map((token) => {
|
|
173
|
+
const [qualifier, value] = token.split('=');
|
|
174
|
+
return { qualifier, value };
|
|
175
|
+
})).onSuccess(() => (0, ts_utils_1.succeed)(tokenString));
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
exports.QualifierDefaultValueTokens = QualifierDefaultValueTokens;
|
|
179
|
+
//# sourceMappingURL=qualifierDefaultValueToken.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qualifierDefaultValueToken.js","sourceRoot":"","sources":["../../../src/packlets/qualifiers/qualifierDefaultValueToken.ts"],"names":[],"mappings":"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","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport { mapResults, Result, fail, succeed } from '@fgv/ts-utils';\nimport { Helpers as CommonHelpers, QualifierName, QualifierContextValue } from '../common';\nimport {\n IValidatedQualifierDefaultValueDecl,\n IValidatedQualifierDefaultValuesDecl\n} from './qualifierDefaultValueDecls';\nimport { IReadOnlyQualifierCollector } from './qualifierCollector';\n\n/**\n * Helper class to parse and validate qualifier default value tokens.\n * @public\n */\nexport class QualifierDefaultValueTokens {\n /**\n * The {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} used to validate\n * qualifier names and values.\n */\n public readonly qualifiers: IReadOnlyQualifierCollector;\n\n /**\n * Constructs a new {@link Qualifiers.QualifierDefaultValueTokens | QualifierDefaultValueTokens } instance.\n * @param qualifiers - the {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} to use\n */\n public constructor(qualifiers: IReadOnlyQualifierCollector) {\n this.qualifiers = qualifiers;\n }\n\n /**\n * Parses a {@link QualifierDefaultValueToken | qualifier default value token} string and validates the parts\n * against the qualifiers present in the {@link Qualifiers.QualifierDefaultValueTokens.qualifiers | qualifier collector}.\n * @param token - the token string to parse.\n * @returns `Success` with the {@link Qualifiers.IValidatedQualifierDefaultValueDecl | validated qualifier default value declaration}\n * if successful, `Failure` with an error message if not.\n */\n public parseQualifierDefaultValueToken(token: string): Result<IValidatedQualifierDefaultValueDecl> {\n return QualifierDefaultValueTokens.parseQualifierDefaultValueToken(token, this.qualifiers);\n }\n\n /**\n * Parses a {@link QualifierDefaultValuesToken | qualifier default values token} string and validates the parts\n * against the qualifiers present in the {@link Qualifiers.QualifierDefaultValueTokens.qualifiers | qualifier collector}.\n * @param token - the token string to parse.\n * @returns `Success` with the array of {@link Qualifiers.IValidatedQualifierDefaultValueDecl | validated qualifier default value declarations}\n * if successful, `Failure` with an error message if not.\n */\n public parseQualifierDefaultValuesToken(token: string): Result<IValidatedQualifierDefaultValueDecl[]> {\n return QualifierDefaultValueTokens.parseQualifierDefaultValuesToken(token, this.qualifiers);\n }\n\n /**\n * Validates the {@link Helpers.IQualifierDefaultValueTokenParts | parts} of a {@link QualifierDefaultValueToken | qualifier default value token}.\n * @param parts - the parts to validate\n * @returns `Success` with the validated declaration if successful, `Failure` with an error message if not.\n */\n public validateQualifierDefaultValueTokenParts(\n parts: CommonHelpers.IQualifierDefaultValueTokenParts\n ): Result<IValidatedQualifierDefaultValueDecl> {\n return QualifierDefaultValueTokens.validateQualifierDefaultValueTokenParts(parts, this.qualifiers);\n }\n\n /**\n * Converts a {@link QualifierDefaultValuesToken | qualifier default values token} to a validated qualifier default values declaration.\n * @param token - the qualifier default values token to convert\n * @returns `Success` with the validated qualifier default values declaration if successful, `Failure` with an error message if not.\n */\n public qualifierDefaultValuesTokenToDecl(token: string): Result<IValidatedQualifierDefaultValuesDecl> {\n return QualifierDefaultValueTokens.qualifierDefaultValuesTokenToDecl(token, this.qualifiers);\n }\n\n /**\n * Converts a validated qualifier default values declaration to a {@link QualifierDefaultValuesToken | qualifier default values token}.\n * @param decl - the validated qualifier default values declaration to convert\n * @returns `Success` with the qualifier default values token if successful, `Failure` with an error message if not.\n */\n public declToQualifierDefaultValuesToken(decl: IValidatedQualifierDefaultValuesDecl): Result<string> {\n return QualifierDefaultValueTokens.declToQualifierDefaultValuesToken(decl);\n }\n\n /**\n * Parses a {@link QualifierDefaultValueToken | qualifier default value token} and validates it against the qualifiers\n * present in the supplied {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector}.\n * @param token - the token string to parse.\n * @param qualifiers - the {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} to use\n * @returns `Success` with a {@link Qualifiers.IValidatedQualifierDefaultValueDecl | validated qualifier default value declaration} if successful,\n * `Failure` with an error message if not.\n */\n public static parseQualifierDefaultValueToken(\n token: string,\n qualifiers: IReadOnlyQualifierCollector\n ): Result<IValidatedQualifierDefaultValueDecl> {\n return CommonHelpers.parseQualifierDefaultValueTokenParts(token).onSuccess((parts) => {\n return QualifierDefaultValueTokens.validateQualifierDefaultValueTokenParts(parts, qualifiers);\n });\n }\n\n /**\n * Parses a {@link QualifierDefaultValuesToken | qualifier default values token} and validates it against the qualifiers\n * present in the supplied {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector}.\n * @param token - the token string to parse.\n * @param qualifiers - the {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} to use\n * @returns `Success` with an array of {@link Qualifiers.IValidatedQualifierDefaultValueDecl | validated qualifier default value declarations}\n * if successful, `Failure` with an error message if not\n */\n public static parseQualifierDefaultValuesToken(\n token: string,\n qualifiers: IReadOnlyQualifierCollector\n ): Result<IValidatedQualifierDefaultValueDecl[]> {\n return CommonHelpers.parseQualifierDefaultValuesTokenParts(token).onSuccess((parts) => {\n return mapResults(\n parts.map((part) =>\n QualifierDefaultValueTokens.validateQualifierDefaultValueTokenParts(part, qualifiers)\n )\n );\n });\n }\n\n /**\n * Validates the parts of a qualifier default value token against the qualifiers present in the supplied\n * {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector}.\n * @param parts - the {@link Helpers.IQualifierDefaultValueTokenParts | qualifier default value token parts} to validate.\n * @param qualifiers - the {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} used to\n * validate qualifier names and values.\n * @returns `Success` with a {@link Qualifiers.IValidatedQualifierDefaultValueDecl | validated qualifier default value declaration} if successful,\n * `Failure` with an error message if not.\n */\n public static validateQualifierDefaultValueTokenParts(\n parts: CommonHelpers.IQualifierDefaultValueTokenParts,\n qualifiers: IReadOnlyQualifierCollector\n ): Result<IValidatedQualifierDefaultValueDecl> {\n return qualifiers.getByNameOrToken(parts.qualifier).onSuccess((qualifier) => {\n // Allow empty values to remove defaults\n if (parts.value === '') {\n return succeed({ qualifier, value: '' as QualifierContextValue });\n }\n\n return qualifier.type\n .validateContextValue(parts.value)\n .onSuccess((value) => {\n return succeed({ qualifier, value });\n })\n .withDetail('failure', 'success');\n });\n }\n\n /**\n * Converts a {@link QualifierDefaultValuesToken | qualifier default values token} to a validated qualifier default values declaration.\n * @param token - the qualifier default values token to convert\n * @param qualifiers - the {@link Qualifiers.IReadOnlyQualifierCollector | qualifier collector} to use\n * @returns `Success` with the validated qualifier default values declaration if successful, `Failure` with an error message if not.\n */\n public static qualifierDefaultValuesTokenToDecl(\n token: string,\n qualifiers: IReadOnlyQualifierCollector\n ): Result<IValidatedQualifierDefaultValuesDecl> {\n return QualifierDefaultValueTokens.parseQualifierDefaultValuesToken(token, qualifiers).onSuccess(\n (qualifierDefaultValues) => {\n const defaultValues: IValidatedQualifierDefaultValuesDecl = {};\n\n for (const { qualifier, value } of qualifierDefaultValues) {\n const qualifierName = qualifier.name as QualifierName;\n const contextValue = value as QualifierContextValue;\n\n // Check for duplicate qualifiers\n if (qualifierName in defaultValues) {\n return fail(`${qualifier.name}: duplicate qualifier in default values token`);\n }\n\n // Only add non-empty values (empty values remove defaults)\n if (contextValue !== '') {\n defaultValues[qualifierName] = contextValue;\n }\n }\n\n return succeed(defaultValues);\n }\n );\n }\n\n /**\n * Converts a validated qualifier default values declaration to a {@link QualifierDefaultValuesToken | qualifier default values token}.\n * @param decl - the validated qualifier default values declaration to convert\n * @returns `Success` with the qualifier default values token if successful, `Failure` with an error message if not.\n */\n public static declToQualifierDefaultValuesToken(\n decl: IValidatedQualifierDefaultValuesDecl\n ): Result<string> {\n const tokens: string[] = [];\n\n for (const [qualifierName, contextValue] of Object.entries(decl)) {\n // Build token as \"qualifier=value\"\n tokens.push(`${qualifierName}=${contextValue}`);\n }\n\n if (tokens.length === 0) {\n return succeed('');\n }\n\n const tokenString = tokens.join('|');\n\n // Validate the generated token\n return CommonHelpers.buildQualifierDefaultValuesToken(\n tokens.map((token) => {\n const [qualifier, value] = token.split('=');\n return { qualifier, value };\n })\n ).onSuccess(() => succeed(tokenString));\n }\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Options for controlling the compilation of resource objects.
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
export interface ICompiledResourceOptions {
|
|
6
|
+
/**
|
|
7
|
+
* Whether to include metadata in the compiled objects.
|
|
8
|
+
* Metadata includes human-readable information like semantic keys
|
|
9
|
+
* that can be useful for debugging or tooling.
|
|
10
|
+
* @defaultValue false
|
|
11
|
+
*/
|
|
12
|
+
includeMetadata?: boolean;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/packlets/resource-json/compiled/common.ts"],"names":[],"mappings":"AAsBA;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../src/packlets/resource-json/compiled/common.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n/**\n * Options for controlling the compilation of resource objects.\n * @public\n */\nexport interface ICompiledResourceOptions {\n /**\n * Whether to include metadata in the compiled objects.\n * Metadata includes human-readable information like semantic keys\n * that can be useful for debugging or tooling.\n * @defaultValue false\n */\n includeMetadata?: boolean;\n}\n"]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as Model from './json';
|
|
2
|
+
/**
|
|
3
|
+
* Converter for a {@link ResourceJson.Compiled.ICompiledConditionMetadata | compiled condition metadata}.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export declare const compiledConditionMetadata: import("@fgv/ts-utils").ObjectConverter<Model.ICompiledConditionMetadata, unknown>;
|
|
7
|
+
/**
|
|
8
|
+
* Converter for a {@link ResourceJson.Compiled.ICompiledConditionSetMetadata | compiled condition set metadata}.
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export declare const compiledConditionSetMetadata: import("@fgv/ts-utils").ObjectConverter<Model.ICompiledConditionSetMetadata, unknown>;
|
|
12
|
+
/**
|
|
13
|
+
* Converter for a {@link ResourceJson.Compiled.ICompiledDecisionMetadata | compiled decision metadata}.
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
export declare const compiledDecisionMetadata: import("@fgv/ts-utils").ObjectConverter<Model.ICompiledDecisionMetadata, unknown>;
|
|
17
|
+
/**
|
|
18
|
+
* Converter for a {@link ResourceJson.Compiled.ICompiledQualifierType | compiled qualifier type}.
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
export declare const compiledQualifierType: import("@fgv/ts-utils").ObjectConverter<Model.ICompiledQualifierType, unknown>;
|
|
22
|
+
/**
|
|
23
|
+
* Converter for a {@link ResourceJson.Compiled.ICompiledQualifier | compiled qualifier}.
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
export declare const compiledQualifier: import("@fgv/ts-utils").ObjectConverter<Model.ICompiledQualifier, unknown>;
|
|
27
|
+
/**
|
|
28
|
+
* Converter for a {@link ResourceJson.Compiled.ICompiledResourceType | compiled resource type}.
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export declare const compiledResourceType: import("@fgv/ts-utils").ObjectConverter<Model.ICompiledResourceType, unknown>;
|
|
32
|
+
/**
|
|
33
|
+
* Converter for a {@link ResourceJson.Compiled.ICompiledCondition | compiled condition}.
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
36
|
+
export declare const compiledCondition: import("@fgv/ts-utils").ObjectConverter<Model.ICompiledCondition, unknown>;
|
|
37
|
+
/**
|
|
38
|
+
* Converter for a {@link ResourceJson.Compiled.ICompiledConditionSet | compiled condition set}.
|
|
39
|
+
* @public
|
|
40
|
+
*/
|
|
41
|
+
export declare const compiledConditionSet: import("@fgv/ts-utils").ObjectConverter<Model.ICompiledConditionSet, unknown>;
|
|
42
|
+
/**
|
|
43
|
+
* Converter for a {@link ResourceJson.Compiled.ICompiledAbstractDecision | compiled abstract decision}.
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
export declare const compiledAbstractDecision: import("@fgv/ts-utils").ObjectConverter<Model.ICompiledAbstractDecision, unknown>;
|
|
47
|
+
/**
|
|
48
|
+
* Converter for a {@link ResourceJson.Compiled.ICompiledCandidate | compiled candidate}.
|
|
49
|
+
* @public
|
|
50
|
+
*/
|
|
51
|
+
export declare const compiledCandidate: import("@fgv/ts-utils").ObjectConverter<Model.ICompiledCandidate, unknown>;
|
|
52
|
+
/**
|
|
53
|
+
* Converter for a {@link ResourceJson.Compiled.ICompiledResource | compiled resource}.
|
|
54
|
+
* @public
|
|
55
|
+
*/
|
|
56
|
+
export declare const compiledResource: import("@fgv/ts-utils").ObjectConverter<Model.ICompiledResource, unknown>;
|
|
57
|
+
/**
|
|
58
|
+
* Converter for a {@link ResourceJson.Compiled.ICompiledResourceCollection | compiled resource collection}.
|
|
59
|
+
* This combines all the individual converters into a single converter for the entire resource collection.
|
|
60
|
+
* @public
|
|
61
|
+
*/
|
|
62
|
+
export declare const compiledResourceCollection: import("@fgv/ts-utils").ObjectConverter<Model.ICompiledResourceCollection, unknown>;
|
|
63
|
+
//# sourceMappingURL=convert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../../../../src/packlets/resource-json/compiled/convert.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,KAAK,MAAM,QAAQ,CAAC;AAIhC;;;GAGG;AACH,eAAO,MAAM,yBAAyB,oFAEpC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,4BAA4B,uFAEvC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,wBAAwB,mFAEnC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,qBAAqB,gFAEhC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,iBAAiB,4EAI5B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,oBAAoB,+EAE/B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,iBAAiB,4EAO5B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,oBAAoB,+EAG/B,CAAC;AACH;;;GAGG;AACH,eAAO,MAAM,wBAAwB,mFAGnC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,iBAAiB,4EAI5B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,gBAAgB,2EAK3B,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,qFAQrC,CAAC"}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.compiledResourceCollection = exports.compiledResource = exports.compiledCandidate = exports.compiledAbstractDecision = exports.compiledConditionSet = exports.compiledCondition = exports.compiledResourceType = exports.compiledQualifier = exports.compiledQualifierType = exports.compiledDecisionMetadata = exports.compiledConditionSetMetadata = exports.compiledConditionMetadata = void 0;
|
|
37
|
+
/*
|
|
38
|
+
* Copyright (c) 2025 Erik Fortune
|
|
39
|
+
*
|
|
40
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
41
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
42
|
+
* in the Software without restriction, including without limitation the rights
|
|
43
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
44
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
45
|
+
* furnished to do so, subject to the following conditions:
|
|
46
|
+
*
|
|
47
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
48
|
+
* copies or substantial portions of the Software.
|
|
49
|
+
*
|
|
50
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
51
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
52
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
53
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
54
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
55
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
56
|
+
* SOFTWARE.
|
|
57
|
+
*/
|
|
58
|
+
const Common = __importStar(require("../../common"));
|
|
59
|
+
const ts_utils_1 = require("@fgv/ts-utils");
|
|
60
|
+
const ts_json_base_1 = require("@fgv/ts-json-base");
|
|
61
|
+
/* eslint-disable @rushstack/typedef-var */
|
|
62
|
+
/**
|
|
63
|
+
* Converter for a {@link ResourceJson.Compiled.ICompiledConditionMetadata | compiled condition metadata}.
|
|
64
|
+
* @public
|
|
65
|
+
*/
|
|
66
|
+
exports.compiledConditionMetadata = ts_utils_1.Converters.strictObject({
|
|
67
|
+
key: Common.Convert.conditionKey
|
|
68
|
+
});
|
|
69
|
+
/**
|
|
70
|
+
* Converter for a {@link ResourceJson.Compiled.ICompiledConditionSetMetadata | compiled condition set metadata}.
|
|
71
|
+
* @public
|
|
72
|
+
*/
|
|
73
|
+
exports.compiledConditionSetMetadata = ts_utils_1.Converters.strictObject({
|
|
74
|
+
key: Common.Convert.conditionSetKey
|
|
75
|
+
});
|
|
76
|
+
/**
|
|
77
|
+
* Converter for a {@link ResourceJson.Compiled.ICompiledDecisionMetadata | compiled decision metadata}.
|
|
78
|
+
* @public
|
|
79
|
+
*/
|
|
80
|
+
exports.compiledDecisionMetadata = ts_utils_1.Converters.strictObject({
|
|
81
|
+
key: Common.Convert.decisionKey
|
|
82
|
+
});
|
|
83
|
+
/**
|
|
84
|
+
* Converter for a {@link ResourceJson.Compiled.ICompiledQualifierType | compiled qualifier type}.
|
|
85
|
+
* @public
|
|
86
|
+
*/
|
|
87
|
+
exports.compiledQualifierType = ts_utils_1.Converters.strictObject({
|
|
88
|
+
name: Common.Convert.qualifierTypeName
|
|
89
|
+
});
|
|
90
|
+
/**
|
|
91
|
+
* Converter for a {@link ResourceJson.Compiled.ICompiledQualifier | compiled qualifier}.
|
|
92
|
+
* @public
|
|
93
|
+
*/
|
|
94
|
+
exports.compiledQualifier = ts_utils_1.Converters.strictObject({
|
|
95
|
+
name: Common.Convert.qualifierName,
|
|
96
|
+
type: Common.Convert.qualifierTypeIndex,
|
|
97
|
+
defaultPriority: Common.Convert.conditionPriority
|
|
98
|
+
});
|
|
99
|
+
/**
|
|
100
|
+
* Converter for a {@link ResourceJson.Compiled.ICompiledResourceType | compiled resource type}.
|
|
101
|
+
* @public
|
|
102
|
+
*/
|
|
103
|
+
exports.compiledResourceType = ts_utils_1.Converters.strictObject({
|
|
104
|
+
name: Common.Convert.resourceTypeName
|
|
105
|
+
});
|
|
106
|
+
/**
|
|
107
|
+
* Converter for a {@link ResourceJson.Compiled.ICompiledCondition | compiled condition}.
|
|
108
|
+
* @public
|
|
109
|
+
*/
|
|
110
|
+
exports.compiledCondition = ts_utils_1.Converters.strictObject({
|
|
111
|
+
qualifierIndex: Common.Convert.qualifierIndex,
|
|
112
|
+
operator: Common.Convert.conditionOperator.optional(),
|
|
113
|
+
value: ts_utils_1.Converters.string,
|
|
114
|
+
priority: Common.Convert.conditionPriority,
|
|
115
|
+
scoreAsDefault: Common.Convert.qualifierMatchScore.optional(),
|
|
116
|
+
metadata: exports.compiledConditionMetadata.optional()
|
|
117
|
+
});
|
|
118
|
+
/**
|
|
119
|
+
* Converter for a {@link ResourceJson.Compiled.ICompiledConditionSet | compiled condition set}.
|
|
120
|
+
* @public
|
|
121
|
+
*/
|
|
122
|
+
exports.compiledConditionSet = ts_utils_1.Converters.strictObject({
|
|
123
|
+
conditions: ts_utils_1.Converters.arrayOf(Common.Convert.conditionIndex),
|
|
124
|
+
metadata: exports.compiledConditionSetMetadata.optional()
|
|
125
|
+
});
|
|
126
|
+
/**
|
|
127
|
+
* Converter for a {@link ResourceJson.Compiled.ICompiledAbstractDecision | compiled abstract decision}.
|
|
128
|
+
* @public
|
|
129
|
+
*/
|
|
130
|
+
exports.compiledAbstractDecision = ts_utils_1.Converters.strictObject({
|
|
131
|
+
conditionSets: ts_utils_1.Converters.arrayOf(Common.Convert.conditionSetIndex),
|
|
132
|
+
metadata: exports.compiledDecisionMetadata.optional()
|
|
133
|
+
});
|
|
134
|
+
/**
|
|
135
|
+
* Converter for a {@link ResourceJson.Compiled.ICompiledCandidate | compiled candidate}.
|
|
136
|
+
* @public
|
|
137
|
+
*/
|
|
138
|
+
exports.compiledCandidate = ts_utils_1.Converters.strictObject({
|
|
139
|
+
json: ts_json_base_1.Converters.jsonValue,
|
|
140
|
+
isPartial: ts_utils_1.Converters.boolean,
|
|
141
|
+
mergeMethod: Common.Convert.resourceValueMergeMethod
|
|
142
|
+
});
|
|
143
|
+
/**
|
|
144
|
+
* Converter for a {@link ResourceJson.Compiled.ICompiledResource | compiled resource}.
|
|
145
|
+
* @public
|
|
146
|
+
*/
|
|
147
|
+
exports.compiledResource = ts_utils_1.Converters.strictObject({
|
|
148
|
+
id: Common.Convert.resourceId,
|
|
149
|
+
type: Common.Convert.resourceTypeIndex,
|
|
150
|
+
decision: Common.Convert.decisionIndex,
|
|
151
|
+
candidates: ts_utils_1.Converters.arrayOf(exports.compiledCandidate)
|
|
152
|
+
});
|
|
153
|
+
/**
|
|
154
|
+
* Converter for a {@link ResourceJson.Compiled.ICompiledResourceCollection | compiled resource collection}.
|
|
155
|
+
* This combines all the individual converters into a single converter for the entire resource collection.
|
|
156
|
+
* @public
|
|
157
|
+
*/
|
|
158
|
+
exports.compiledResourceCollection = ts_utils_1.Converters.strictObject({
|
|
159
|
+
qualifiers: ts_utils_1.Converters.arrayOf(exports.compiledQualifier),
|
|
160
|
+
qualifierTypes: ts_utils_1.Converters.arrayOf(exports.compiledQualifierType),
|
|
161
|
+
resourceTypes: ts_utils_1.Converters.arrayOf(exports.compiledResourceType),
|
|
162
|
+
conditions: ts_utils_1.Converters.arrayOf(exports.compiledCondition),
|
|
163
|
+
conditionSets: ts_utils_1.Converters.arrayOf(exports.compiledConditionSet),
|
|
164
|
+
decisions: ts_utils_1.Converters.arrayOf(exports.compiledAbstractDecision),
|
|
165
|
+
resources: ts_utils_1.Converters.arrayOf(exports.compiledResource)
|
|
166
|
+
});
|
|
167
|
+
//# sourceMappingURL=convert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convert.js","sourceRoot":"","sources":["../../../../src/packlets/resource-json/compiled/convert.ts"],"names":[],"mappings":"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","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nimport * as Common from '../../common';\nimport { Converters } from '@fgv/ts-utils';\nimport { Converters as JsonConverters } from '@fgv/ts-json-base';\nimport * as Model from './json';\n\n/* eslint-disable @rushstack/typedef-var */\n\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledConditionMetadata | compiled condition metadata}.\n * @public\n */\nexport const compiledConditionMetadata = Converters.strictObject<Model.ICompiledConditionMetadata>({\n key: Common.Convert.conditionKey\n});\n\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledConditionSetMetadata | compiled condition set metadata}.\n * @public\n */\nexport const compiledConditionSetMetadata = Converters.strictObject<Model.ICompiledConditionSetMetadata>({\n key: Common.Convert.conditionSetKey\n});\n\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledDecisionMetadata | compiled decision metadata}.\n * @public\n */\nexport const compiledDecisionMetadata = Converters.strictObject<Model.ICompiledDecisionMetadata>({\n key: Common.Convert.decisionKey\n});\n\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledQualifierType | compiled qualifier type}.\n * @public\n */\nexport const compiledQualifierType = Converters.strictObject<Model.ICompiledQualifierType>({\n name: Common.Convert.qualifierTypeName\n});\n\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledQualifier | compiled qualifier}.\n * @public\n */\nexport const compiledQualifier = Converters.strictObject<Model.ICompiledQualifier>({\n name: Common.Convert.qualifierName,\n type: Common.Convert.qualifierTypeIndex,\n defaultPriority: Common.Convert.conditionPriority\n});\n\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledResourceType | compiled resource type}.\n * @public\n */\nexport const compiledResourceType = Converters.strictObject<Model.ICompiledResourceType>({\n name: Common.Convert.resourceTypeName\n});\n\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledCondition | compiled condition}.\n * @public\n */\nexport const compiledCondition = Converters.strictObject<Model.ICompiledCondition>({\n qualifierIndex: Common.Convert.qualifierIndex,\n operator: Common.Convert.conditionOperator.optional(),\n value: Converters.string,\n priority: Common.Convert.conditionPriority,\n scoreAsDefault: Common.Convert.qualifierMatchScore.optional(),\n metadata: compiledConditionMetadata.optional()\n});\n\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledConditionSet | compiled condition set}.\n * @public\n */\nexport const compiledConditionSet = Converters.strictObject<Model.ICompiledConditionSet>({\n conditions: Converters.arrayOf(Common.Convert.conditionIndex),\n metadata: compiledConditionSetMetadata.optional()\n});\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledAbstractDecision | compiled abstract decision}.\n * @public\n */\nexport const compiledAbstractDecision = Converters.strictObject<Model.ICompiledAbstractDecision>({\n conditionSets: Converters.arrayOf(Common.Convert.conditionSetIndex),\n metadata: compiledDecisionMetadata.optional()\n});\n\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledCandidate | compiled candidate}.\n * @public\n */\nexport const compiledCandidate = Converters.strictObject<Model.ICompiledCandidate>({\n json: JsonConverters.jsonValue,\n isPartial: Converters.boolean,\n mergeMethod: Common.Convert.resourceValueMergeMethod\n});\n\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledResource | compiled resource}.\n * @public\n */\nexport const compiledResource = Converters.strictObject<Model.ICompiledResource>({\n id: Common.Convert.resourceId,\n type: Common.Convert.resourceTypeIndex,\n decision: Common.Convert.decisionIndex,\n candidates: Converters.arrayOf(compiledCandidate)\n});\n\n/**\n * Converter for a {@link ResourceJson.Compiled.ICompiledResourceCollection | compiled resource collection}.\n * This combines all the individual converters into a single converter for the entire resource collection.\n * @public\n */\nexport const compiledResourceCollection = Converters.strictObject<Model.ICompiledResourceCollection>({\n qualifiers: Converters.arrayOf(compiledQualifier),\n qualifierTypes: Converters.arrayOf(compiledQualifierType),\n resourceTypes: Converters.arrayOf(compiledResourceType),\n conditions: Converters.arrayOf(compiledCondition),\n conditionSets: Converters.arrayOf(compiledConditionSet),\n decisions: Converters.arrayOf(compiledAbstractDecision),\n resources: Converters.arrayOf(compiledResource)\n});\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/packlets/resource-json/compiled/index.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAErC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
57
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
58
|
+
};
|
|
59
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
60
|
+
exports.Convert = void 0;
|
|
61
|
+
const Convert = __importStar(require("./convert"));
|
|
62
|
+
exports.Convert = Convert;
|
|
63
|
+
__exportStar(require("./common"), exports);
|
|
64
|
+
__exportStar(require("./json"), exports);
|
|
65
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/packlets/resource-json/compiled/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,mDAAqC;AAI5B,0BAAO;AAFhB,2CAAyB;AACzB,yCAAuB","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport * as Convert from './convert';\n\nexport * from './common';\nexport * from './json';\nexport { Convert };\n"]}
|