Request for developer feedback: contacts data-module

Thanks for the updates @aveltens,

After tinkering with it, there are a couple of issues I’ve found:

  • I tried to use it with an empty POD, but it didn’t work and I think that’s because it expects the type index to exist. What do you think about that, is that an expectation apps should make? In my apps, I’m currently creating a type index if it doesn’t exist. Which brings me to the next point.
  • If the type index exists, but it’s declared in the profile, it doesn’t work. Now, I understand the rationale behind this, because I am declaring solid:privateTypeIndex in the profile which is probably not the best idea. I think I’m doing this because that’s how it worked before in SolidOS (the document itself is private though, so it shouldn’t be that much of a problem). What your library expects, which seems to be better, is that it’s declared in a pim:preferencesFile, which I assume should be private. The thing is that the type-indexes spec is still a draft, so I’m not sure if I should change the way my apps work until that’s stable :/. Also, there is already some data in the wild using that old approach, so maybe the library should support it as well; even if it’s just to read data and not to create new type indexes.
  • I wanted to debug using breakpoints, but I noticed that the source files are not included in the npm package. But the source maps are included, so you probably want to do something about that. I copy&pasted the sources manually and it seems to work, but it’s still not working perfectly. Maybe that has something to do with the minification; I’m not sure how you could improve it (to be honest, I don’t think my libraries are perfectly debuggable either :sweat_smile:). But at least including the TypeScript sources should be a better experience :).