@myvitalrx/metadata-runtime 1.20.5 → 1.20.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -7411,16 +7411,21 @@ var RuntimeMetadataService = class {
7411
7411
  let provider;
7412
7412
  try {
7413
7413
  provider = await this.activeProvider();
7414
- const guard = this.currentWriteGuard();
7415
7414
  const listed = await provider.listTypeValues(typeCode, options);
7415
+ if (listed?.type && !this.cache.getSnapshot() && listed.releaseId) {
7416
+ this.installExtensionManifest(listed.releaseId, [listed.type.metadataType], {
7417
+ forceReset: true
7418
+ });
7419
+ }
7420
+ const guard = this.currentWriteGuard();
7416
7421
  this.hydrateProviderValues(listed?.values ?? [], guard);
7417
- if (listed?.type) {
7418
- const typeCode2 = listed.type.metadataType;
7422
+ if (listed?.type && this.cache.getSnapshot()) {
7423
+ const listedTypeCode = listed.type.metadataType;
7419
7424
  this.cache.mergeTypeCatalog(
7420
7425
  {
7421
- [typeCode2]: {
7422
- typeCode: typeCode2,
7423
- projectionFile: `${typeCode2}.json`,
7426
+ [listedTypeCode]: {
7427
+ typeCode: listedTypeCode,
7428
+ projectionFile: `${listedTypeCode}.json`,
7424
7429
  valueDataType: listed.type.valueDataType,
7425
7430
  multiSelectAllowed: listed.type.multiSelectAllowed,
7426
7431
  ...listed.type.displayName ? {