Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explore replacing @tomic/cli with generating packages on the server #862

Open
Polleps opened this issue Mar 13, 2024 · 1 comment
Open
Labels
server atomic-server

Comments

@Polleps
Copy link
Member

Polleps commented Mar 13, 2024

Npm, pnpm and yarn can import packages from URLs meaning we should be able to dynamically generate packages on the server and show some UI on how to install them in your projects.

Some factors to consider:

  1. How will we handle versioning.
    Should we only use minor versions so the user doesn't have to update manually (only run npm i) or do we increment major versions (as there could be breaking changes).
    When do we even bump the version number, currently changes in an ontologies are saved automatically so do we want to change the version for every single small commit?

I think the versions are embeded in the url so we could just generate a new url for the newer packages and have the user manually update their package.json. We have to keep hosting older versions tho.

  1. Do we generate one package per ontology or group them together per drive?

  2. How do we deal with the settings currently in the atomic.config.json file
    Some settings like module alias and 'use namespaces' are configured in the atomic.config.json file. These settings are project specific and so it doesn't make sense to set these on a more global package level. Maybe integrate this into the url and generate the package at request time?

@Polleps Polleps added the server atomic-server label Mar 13, 2024
@Polleps
Copy link
Member Author

Polleps commented Mar 13, 2024

Now that i'm thinking about it, generating the package at request time seems like a good option. We could embed everything into the URL. e.g.
https://my-atomicserver.com/package/<commithash>?features=namespaces&alias=@tomic/react

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
server atomic-server
Projects
None yet
Development

No branches or pull requests

1 participant