MCPcopy Create free account
hub / github.com/ChinaSiro/claude-code-sourcemap / getStorages

Method getStorages

package/cli.js:2050–2050  ·  view source on GitHub ↗
(q)

Source from the content-addressed store, hash-verified

2048`;if(q.description!==K.description)_+=` - Description '${q.description}' does not match '${K.description}'
2049`;return _}Sm4.getIncompatibilityDetails=TWz;function Em4(q,K){return` - use valueType '${q.valueType}' on instrument creation or use an instrument name other than '${K.name}'`}Sm4.getValueTypeConflictResolutionRecipe=Em4;function Lm4(q,K){return` - use unit '${q.unit}' on instrument creation or use an instrument name other than '${K.name}'`}Sm4.getUnitConflictResolutionRecipe=Lm4;function Rm4(q,K){let _={name:K.name,type:K.type,unit:K.unit},z=JSON.stringify(_);return` - create a new view with a name other than '${q.name}' and InstrumentSelector '${z}'`}Sm4.getTypeConflictResolutionRecipe=Rm4;function hm4(q,K){let _={name:K.name,type:K.type,unit:K.unit},z=JSON.stringify(_);return` - create a new view with a name other than '${q.name}' and InstrumentSelector '${z}'
2050 - OR - create a new view with the name ${q.name} and description '${q.description}' and InstrumentSelector ${z}
2051 - OR - create a new view with the name ${K.name} and description '${q.description}' and InstrumentSelector ${z}`}Sm4.getDescriptionResolutionRecipe=hm4;function vWz(q,K){if(q.valueType!==K.valueType)return Em4(q,K);if(q.unit!==K.unit)return Lm4(q,K);if(q.type!==K.type)return Rm4(q,K);if(q.description!==K.description)return hm4(q,K);return""}Sm4.getConflictResolutionRecipe=vWz});var mm4=m((Im4)=>{Object.defineProperty(Im4,"__esModule",{value:!0});Im4.MetricStorageRegistry=void 0;var LWz=Ps6(),xm4=nK(),OR8=bm4();class fU1{_sharedRegistry=new Map;_perCollectorRegistry=new Map;static create(){return new fU1}getStorages(q){let K=[];for(let z of this._sharedRegistry.values())K=K.concat(z);let _=this._perCollectorRegistry.get(q);if(_!=null)for(let z of _.values())K=K.concat(z);return K}register(q){this._registerStorage(q,this._sharedRegistry)}registerForCollector(q,K){let _=this._perCollectorRegistry.get(q);if(_==null)_=new Map,this._perCollectorRegistry.set(q,_);this._registerStorage(K,_)}findOrUpdateCompatibleStorage(q){let K=this._sharedRegistry.get(q.name);if(K===void 0)return null;return this._findOrUpdateCompatibleStorage(q,K)}findOrUpdateCompatibleCollectorStorage(q,K){let _=this._perCollectorRegistry.get(q);if(_===void 0)return null;let z=_.get(K.name);if(z===void 0)return null;return this._findOrUpdateCompatibleStorage(K,z)}_registerStorage(q,K){let _=q.getInstrumentDescriptor(),z=K.get(_.name);if(z===void 0){K.set(_.name,[q]);return}z.push(q)}_findOrUpdateCompatibleStorage(q,K){let _=null;for(let z of K){let Y=z.getInstrumentDescriptor();if((0,LWz.isDescriptorCompatibleWith)(Y,q)){if(Y.description!==q.description){if(q.description.length>Y.description.length)z.updateDescription(q.description);xm4.diag.warn("A view or instrument with the name ",q.name,` has already been registered, but has a different description and is incompatible with another registered view.
2052`,`Details:
2053`,(0,OR8.getIncompatibilityDetails)(Y,q),`The longer description will be used.

Callers 1

collectMethod · 0.80

Calls 3

concatMethod · 0.80
valuesMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected