bluehalo / node-fhir-server-core

An Open Source secure REST implementation for the HL7 FHIR Specification. For API documentation, please see https://github.com/Asymmetrik/node-fhir-server-core/wiki.
https://asymmetrik.com/healthcare
MIT License
391 stars 120 forks source link

[feat] Prevent js file use from server configuration object #213

Open Ahryman40k opened 4 years ago

Ahryman40k commented 4 years ago

As discussed in Issue #212, please find here the corresponding pull request. So, if you agree with adding such feature, you could merge it.

Hope I did well according your contributing note and nothing were missed. Best regards, Ahry

zeevo commented 4 years ago

Thanks! Will be looking through this.

zeevo commented 4 years ago

Hi there. I've been pretty busy lately. However, I'm not sure about the idea of extending the config object to include functions. There is probably a better way, and I will be playing around with TypeScript project that includes node-fhir-server-core to really investigate this. I appreciate your analysis though!

Ahryman40k commented 4 years ago

I may understand your point of view and of course contrary to the sample I provided, people can provide metadata builder function instead of bare metadata object. It also means that we can dynamically create metadata, a functionality that is missing right now. We can only create them statically at server start. Moreover it's useful when including you're library into a typescript project not to reference JavaScript files, and it's the main point.

zeevo commented 4 years ago

@Ahryman40k Do you have a sample TypeScript project somewhere where I can see this fix in action?

Ahryman40k commented 4 years ago

I'm writing a typescript library that encapsulate your own as helper to produce FHIR microservices quickly, but it still under development. Capabilities route already works and metadata are dynamically added. I try to share you a sample next week because I'm currently in holiday until next year. Thank you for your interest.

Ahryman40k commented 4 years ago

Please find a sample there: https://github.com/Ahryman40k/asymmetrik-sample A README file is present to run sample.

Don't forget it's a POC and not a real development project.

zeevo commented 4 years ago

Thanks @Ahryman40k ! I'll be looking at this to really understand the problem.

Ahryman40k commented 4 years ago

@zeevosec Have you take a look ?

zeevo commented 4 years ago

Hi there @Ahryman40k

I have been super busy with other projects lately. I do understand the issue with dynamically requiring files within TypeScript projects. If I get around to it, we may write some kind of TypeScript compatible Server config mechanism, but until then you may have to just maintain a fork.

Sorry!

ZuSe commented 4 years ago

Would love to see this merged. We are using your great lib in one of our typescript based projects. Would help a lot to maintain a clean code base and setup tests.

Ahryman40k commented 4 years ago

Me too ;)

zeevo commented 4 years ago

Hey I am going to revisit this and probably merge it.

Ahryman40k commented 3 years ago

Do I need to sync with your repo then resubmit my work ? I know I did it long time ago.

luan-dev commented 2 years ago

Hi, I am happy to merge this PR if you can resolve the merge conflicts

finaldzn commented 1 year ago

Hello any updated for implemeting typescript to the project ?

Thank you