gcollazo / ember-cli-addon-search

This project is no longer maintained please visit Ember Observer

Home Page:https://emberobserver.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

private ember-addons

stefanpenner opened this issue · comments

maybe in the package.json we could add the following and then have you API server pre-filter?

emberAddon: {
  private: true | false
}

cc @machty

I don't have anything against this but think that if you publish to NPM you are already saying private: false. In which case would you publish to NPM and want it not to be listed on the addon search site?

@gcollazo I believe top level private: false prevents publishing to NPM

In the specific case, @machty published better-actions as a ember-addon but merely to go alongside an RFC but he would prefer it not to be display on ember-addons while still being accessible via npm install.

It seems entirely reasonable to want ^^, but I would love to hear your thoughts.

That makes sense. I'll just not serve private packages to the search site but I will keep saving them on the DB and counting them for stats. I would like to eventually show some sort of graph on the site. http://ember-addons-server.herokuapp.com/stats. I'll work on this tonight.

While we are at it, maybe we should use that emberAddon key to list categories for the search site as part of the solution for issue #2.

"emberAddon": {
  "private": false,
  "categories": ["mixin", "adapter", "serializer", "component"]
}

Actually I agree with @gcollazo: i shouldn't have published that to NPM; would have been sufficient to have people just point to GitHub if they wanted to try it out. We can add this private feature if it makes sense but maybe we should wait until someone else chimes in with a more legit use case than mine?

I've unpublished better-actions; not sure if you need to do something manual to remove it from the list

I have a scheduled task that runs every 10 minutes and updates the list from the NPM registry. If it's working according to plan, your package should be automatically removed pretty soon 🙏

@gcollazo famous last words :trollface:

Alright, so OBVIOUSLY it didn't work and had to remove it manually. I thought the server was deleting unpublished packages but it doesn't. I'll take care of it tonight.

don't ever let anyone tell you async is easy

We are going to keep ignoring "emberAddon":{"private": true} for now, but the server is now correctly removing modules that have been removed from npm.