Skip to content
New issue

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

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

Already on GitHub? # to your account

(feat) Add support for local configuration in development environment #1044

Merged
merged 2 commits into from
Jun 21, 2024

Conversation

chibongho
Copy link
Contributor

@chibongho chibongho commented Jun 14, 2024

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. Ensure your PR title includes a conventional commit label (such as feat, fix, or chore, among others). See existing PR titles for inspiration.

For changes to apps

If applicable

  • My work includes tests or is validated by existing tests.
  • I have updated the esm-framework mock to reflect any API changes I have made.

Summary

Screenshots

Related Issue

Other

Copy link
Contributor

github-actions bot commented Jun 14, 2024

Size Change: -507 kB (-12.59%) 👏

Total Size: 3.52 MB

Filename Size Change
packages/apps/esm-offline-tools-app/dist/922.js 0 B -91.1 kB (removed) 🏆
packages/shell/esm-app-shell/dist/openmrs.7d8e6cff4f2a2ea4.js 0 B -398 kB (removed) 🏆
ℹ️ View Unchanged
Filename Size Change
packages/apps/esm-devtools-app/dist/331.js 27.3 kB 0 B
packages/apps/esm-devtools-app/dist/630.js 0 B -2.69 kB (removed) 🏆
packages/apps/esm-devtools-app/dist/667.js 6.97 kB 0 B
packages/apps/esm-devtools-app/dist/735.js 2.63 kB 0 B
packages/apps/esm-devtools-app/dist/762.js 2.69 kB 0 B
packages/apps/esm-devtools-app/dist/788.js 42.9 kB 0 B
packages/apps/esm-devtools-app/dist/875.js 9.93 kB 0 B
packages/apps/esm-devtools-app/dist/884.js 15.2 kB 0 B
packages/apps/esm-devtools-app/dist/889.js 163 kB +23 B (+0.01%)
packages/apps/esm-devtools-app/dist/988.js 331 B 0 B
packages/apps/esm-devtools-app/dist/main.js 3.15 kB 0 B
packages/apps/esm-devtools-app/dist/openmrs-esm-devtools-app.js 3.19 kB 0 B
packages/apps/esm-implementer-tools-app/dist/271.js 723 B 0 B
packages/apps/esm-implementer-tools-app/dist/319.js 639 B 0 B
packages/apps/esm-implementer-tools-app/dist/426.js 24.9 kB 0 B
packages/apps/esm-implementer-tools-app/dist/460.js 748 B 0 B
packages/apps/esm-implementer-tools-app/dist/482.js 15.2 kB 0 B
packages/apps/esm-implementer-tools-app/dist/523.js 5.74 kB 0 B
packages/apps/esm-implementer-tools-app/dist/528.js 134 kB 0 B
packages/apps/esm-implementer-tools-app/dist/56.js 3.08 kB 0 B
packages/apps/esm-implementer-tools-app/dist/560.js 14.1 kB 0 B
packages/apps/esm-implementer-tools-app/dist/574.js 563 B 0 B
packages/apps/esm-implementer-tools-app/dist/587.js 2.93 kB 0 B
packages/apps/esm-implementer-tools-app/dist/620.js 126 kB 0 B
packages/apps/esm-implementer-tools-app/dist/625.js 564 B 0 B
packages/apps/esm-implementer-tools-app/dist/644.js 723 B 0 B
packages/apps/esm-implementer-tools-app/dist/657.js 7.03 kB 0 B
packages/apps/esm-implementer-tools-app/dist/71.js 6.98 kB 0 B
packages/apps/esm-implementer-tools-app/dist/735.js 2.63 kB 0 B
packages/apps/esm-implementer-tools-app/dist/757.js 563 B 0 B
packages/apps/esm-implementer-tools-app/dist/788.js 42.9 kB 0 B
packages/apps/esm-implementer-tools-app/dist/791.js 283 B 0 B
packages/apps/esm-implementer-tools-app/dist/803.js 61.4 kB 0 B
packages/apps/esm-implementer-tools-app/dist/807.js 562 B 0 B
packages/apps/esm-implementer-tools-app/dist/833.js 691 B 0 B
packages/apps/esm-implementer-tools-app/dist/889.js 163 kB +23 B (+0.01%)
packages/apps/esm-implementer-tools-app/dist/main.js 78.4 kB 0 B
packages/apps/esm-implementer-tools-app/dist/openmrs-esm-implementer-tools-app.js 3.33 kB 0 B
packages/apps/esm-login-app/dist/111.js 1.22 kB 0 B
packages/apps/esm-login-app/dist/126.js 2.5 kB 0 B
packages/apps/esm-login-app/dist/173.js 1.22 kB 0 B
packages/apps/esm-login-app/dist/224.js 258 B 0 B
packages/apps/esm-login-app/dist/236.js 272 B 0 B
packages/apps/esm-login-app/dist/240.js 366 B 0 B
packages/apps/esm-login-app/dist/271.js 761 B 0 B
packages/apps/esm-login-app/dist/272.js 266 B 0 B
packages/apps/esm-login-app/dist/290.js 22.3 kB 0 B
packages/apps/esm-login-app/dist/319.js 708 B 0 B
packages/apps/esm-login-app/dist/336.js 233 B 0 B
packages/apps/esm-login-app/dist/363.js 31.6 kB 0 B
packages/apps/esm-login-app/dist/460.js 782 B 0 B
packages/apps/esm-login-app/dist/539.js 300 B 0 B
packages/apps/esm-login-app/dist/56.js 3.07 kB 0 B
packages/apps/esm-login-app/dist/574.js 637 B 0 B
packages/apps/esm-login-app/dist/625.js 604 B 0 B
packages/apps/esm-login-app/dist/627.js 258 B 0 B
packages/apps/esm-login-app/dist/63.js 16.5 kB 0 B
packages/apps/esm-login-app/dist/644.js 761 B 0 B
packages/apps/esm-login-app/dist/667.js 6.97 kB 0 B
packages/apps/esm-login-app/dist/673.js 286 B 0 B
packages/apps/esm-login-app/dist/735.js 2.62 kB 0 B
packages/apps/esm-login-app/dist/757.js 738 B 0 B
packages/apps/esm-login-app/dist/788.js 42.9 kB 0 B
packages/apps/esm-login-app/dist/807.js 941 B 0 B
packages/apps/esm-login-app/dist/833.js 721 B 0 B
packages/apps/esm-login-app/dist/884.js 15.2 kB 0 B
packages/apps/esm-login-app/dist/889.js 163 kB +23 B (+0.01%)
packages/apps/esm-login-app/dist/main.js 57.8 kB 0 B
packages/apps/esm-login-app/dist/openmrs-esm-login-app.js 3.38 kB 0 B
packages/apps/esm-offline-tools-app/dist/271.js 1.19 kB 0 B
packages/apps/esm-offline-tools-app/dist/319.js 1.13 kB 0 B
packages/apps/esm-offline-tools-app/dist/460.js 1.3 kB 0 B
packages/apps/esm-offline-tools-app/dist/538.js 91.1 kB 0 B
packages/apps/esm-offline-tools-app/dist/56.js 3.08 kB 0 B
packages/apps/esm-offline-tools-app/dist/574.js 1.03 kB 0 B
packages/apps/esm-offline-tools-app/dist/625.js 1.03 kB 0 B
packages/apps/esm-offline-tools-app/dist/63.js 16.5 kB 0 B
packages/apps/esm-offline-tools-app/dist/644.js 1.19 kB 0 B
packages/apps/esm-offline-tools-app/dist/667.js 6.97 kB 0 B
packages/apps/esm-offline-tools-app/dist/735.js 2.63 kB 0 B
packages/apps/esm-offline-tools-app/dist/757.js 1.19 kB 0 B
packages/apps/esm-offline-tools-app/dist/788.js 42.9 kB 0 B
packages/apps/esm-offline-tools-app/dist/807.js 1.1 kB 0 B
packages/apps/esm-offline-tools-app/dist/833.js 1.21 kB 0 B
packages/apps/esm-offline-tools-app/dist/884.js 15.2 kB 0 B
packages/apps/esm-offline-tools-app/dist/889.js 163 kB +24 B (+0.01%)
packages/apps/esm-offline-tools-app/dist/975.js 57 kB 0 B
packages/apps/esm-offline-tools-app/dist/main.js 148 kB +2 B (0%)
packages/apps/esm-offline-tools-app/dist/openmrs-esm-offline-tools-app.js 3.31 kB -3 B (-0.09%)
packages/apps/esm-primary-navigation-app/dist/271.js 270 B 0 B
packages/apps/esm-primary-navigation-app/dist/319.js 232 B 0 B
packages/apps/esm-primary-navigation-app/dist/460.js 266 B 0 B
packages/apps/esm-primary-navigation-app/dist/567.js 23 kB 0 B
packages/apps/esm-primary-navigation-app/dist/574.js 231 B 0 B
packages/apps/esm-primary-navigation-app/dist/577.js 7.63 kB 0 B
packages/apps/esm-primary-navigation-app/dist/625.js 231 B 0 B
packages/apps/esm-primary-navigation-app/dist/63.js 16.5 kB 0 B
packages/apps/esm-primary-navigation-app/dist/644.js 270 B 0 B
packages/apps/esm-primary-navigation-app/dist/667.js 6.98 kB 0 B
packages/apps/esm-primary-navigation-app/dist/735.js 2.63 kB 0 B
packages/apps/esm-primary-navigation-app/dist/757.js 237 B 0 B
packages/apps/esm-primary-navigation-app/dist/762.js 0 B -7.65 kB (removed) 🏆
packages/apps/esm-primary-navigation-app/dist/788.js 42.9 kB 0 B
packages/apps/esm-primary-navigation-app/dist/807.js 291 B 0 B
packages/apps/esm-primary-navigation-app/dist/833.js 258 B 0 B
packages/apps/esm-primary-navigation-app/dist/884.js 15.2 kB 0 B
packages/apps/esm-primary-navigation-app/dist/889.js 163 kB +23 B (+0.01%)
packages/apps/esm-primary-navigation-app/dist/958.js 22.8 kB -1 B (0%)
packages/apps/esm-primary-navigation-app/dist/main.js 47.3 kB -1 B (0%)
packages/apps/esm-primary-navigation-app/dist/openmrs-esm-primary-navigation-app.js 3.24 kB 0 B
packages/framework/esm-api/dist/openmrs-esm-api.js 16.2 kB 0 B
packages/framework/esm-config/dist/openmrs-esm-module-config.js 8.05 kB 0 B
packages/framework/esm-context/dist/openmrs-esm-context.js 1.09 kB 0 B
packages/framework/esm-dynamic-loading/dist/openmrs-esm-dynamic-loading.js 2.89 kB 0 B
packages/framework/esm-error-handling/dist/openmrs-esm-error-handling.js 891 B 0 B
packages/framework/esm-extensions/dist/openmrs-esm-extensions.js 8.16 kB 0 B
packages/framework/esm-feature-flags/dist/openmrs-esm-feature-flags.js 1.66 kB 0 B
packages/framework/esm-framework/dist/126.openmrs-esm-framework.js 2.48 kB 0 B
packages/framework/esm-framework/dist/278.openmrs-esm-framework.js 14.5 kB 0 B
packages/framework/esm-framework/dist/530.openmrs-esm-framework.js 2.93 kB 0 B
packages/framework/esm-framework/dist/619.openmrs-esm-framework.js 6.49 kB 0 B
packages/framework/esm-framework/dist/645.openmrs-esm-framework.js 9.3 kB 0 B
packages/framework/esm-framework/dist/680.openmrs-esm-framework.js 6.14 kB 0 B
packages/framework/esm-framework/dist/735.openmrs-esm-framework.js 2.65 kB 0 B
packages/framework/esm-framework/dist/788.openmrs-esm-framework.js 42.9 kB 0 B
packages/framework/esm-framework/dist/openmrs-esm-framework.js 488 kB +33 B (+0.01%)
packages/framework/esm-globals/dist/openmrs-esm-globals.js 791 B 0 B
packages/framework/esm-navigation/dist/openmrs-esm-navigation.js 9.34 kB 0 B
packages/framework/esm-offline/dist/openmrs-esm-offline.js 34.4 kB 0 B
packages/framework/esm-react-utils/dist/openmrs-esm-react-utils.js 15.8 kB 0 B
packages/framework/esm-routes/dist/openmrs-esm-utils.js 1.49 kB 0 B
packages/framework/esm-state/dist/openmrs-esm-state.js 910 B 0 B
packages/framework/esm-styleguide/dist/openmrs-esm-styleguide.js 52 kB 0 B
packages/framework/esm-translations/dist/openmrs-esm-core-translations.js 1.77 kB +27 B (+1.55%)
packages/framework/esm-utils/dist/openmrs-esm-utils.js 18.3 kB 0 B
packages/shell/esm-app-shell/dist/06c1b95a262085a6.js 15.5 kB 0 B
packages/shell/esm-app-shell/dist/0cde40d2e8839319.js 1.59 kB 0 B
packages/shell/esm-app-shell/dist/0f85df5904268497.js 915 B 0 B
packages/shell/esm-app-shell/dist/2cfe9126327de16c.js 938 B 0 B
packages/shell/esm-app-shell/dist/4b73f4419b84a481.js 911 B 0 B
packages/shell/esm-app-shell/dist/799e972632b4712f.js 1.16 kB 0 B
packages/shell/esm-app-shell/dist/859727ff5754e10c.js 889 B 0 B
packages/shell/esm-app-shell/dist/92dbc0b97e4e3c82.js 1.15 kB 0 B
packages/shell/esm-app-shell/dist/93bd12957607928b.js 0 B -7.31 kB (removed) 🏆
packages/shell/esm-app-shell/dist/9d375d531fa7df90.js 1.15 kB 0 B
packages/shell/esm-app-shell/dist/cb238afacf4089e8.js 0 B -891 B (removed) 🏆
packages/shell/esm-app-shell/dist/cd16c20d7bc4688b.js 7.35 kB 0 B
packages/shell/esm-app-shell/dist/d3aa9eba5cb8c8fc.js 889 B 0 B
packages/shell/esm-app-shell/dist/d4c43826b842e4d9.js 889 B 0 B
packages/shell/esm-app-shell/dist/openmrs.9270c8a9abced099.js 398 kB 0 B
packages/shell/esm-app-shell/dist/service-worker.js 45.9 kB -63 B (-0.14%)
packages/tooling/openmrs/dist/cli.js 2.9 kB +30 B (+1.05%)
packages/tooling/openmrs/dist/commands/assemble.js 3.19 kB 0 B
packages/tooling/openmrs/dist/commands/build.js 1.32 kB 0 B
packages/tooling/openmrs/dist/commands/debug.js 543 B 0 B
packages/tooling/openmrs/dist/commands/develop.js 2.71 kB +136 B (+5.28%) 🔍
packages/tooling/openmrs/dist/commands/index.js 437 B 0 B
packages/tooling/openmrs/dist/commands/start.js 850 B 0 B
packages/tooling/openmrs/dist/index.js 517 B 0 B
packages/tooling/openmrs/dist/runner.js 640 B 0 B
packages/tooling/openmrs/dist/utils/config.js 726 B 0 B
packages/tooling/openmrs/dist/utils/debugger.js 575 B 0 B
packages/tooling/openmrs/dist/utils/dependencies.js 643 B 0 B
packages/tooling/openmrs/dist/utils/helpers.js 395 B 0 B
packages/tooling/openmrs/dist/utils/importmap.js 3.07 kB 0 B
packages/tooling/openmrs/dist/utils/index.js 443 B 0 B
packages/tooling/openmrs/dist/utils/logger.js 368 B 0 B
packages/tooling/openmrs/dist/utils/npmConfig.js 831 B 0 B
packages/tooling/openmrs/dist/utils/untar.js 725 B 0 B
packages/tooling/openmrs/dist/utils/variables.js 192 B 0 B
packages/tooling/openmrs/dist/utils/webpack.js 278 B 0 B
packages/tooling/webpack-config/dist/index.js 3.59 kB 0 B

compressed-size-action

@denniskigen denniskigen requested a review from brandones June 20, 2024 10:53
Copy link
Collaborator

@brandones brandones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks @chibongho !

@chibongho
Copy link
Contributor Author

chibongho commented Jun 20, 2024

Looks good, thanks @chibongho !

Thanks @brandones . I made this a few months ago, but can no longer test it as npx openmrs develop no longer works on my machine for some reason. I made this draft PR to have @ibacher try to get it over the finish line.

I'll keep this unmerged for now until someone verifies that it still works fine.

@ibacher ibacher marked this pull request as ready for review June 21, 2024 13:37
@ibacher
Copy link
Member

ibacher commented Jun 21, 2024

I made some other adjustments (renaming path -> file), but AFAICT, the only thing we really needed here was this:

-     res.contentType('application/json').send(readFileSync(resolve(path)));
+     res.contentType('application/json').send(readFileSync(resolve(process.cwd(), file)));

@ibacher
Copy link
Member

ibacher commented Jun 21, 2024

PS I think from core yarn openmrs develop works better than npx

@denniskigen denniskigen changed the title add support for local config when developing (feat) Add support for local configuration in development environment Jun 21, 2024
@ibacher ibacher merged commit b6cf234 into main Jun 21, 2024
11 checks passed
@ibacher ibacher deleted the local-config branch June 21, 2024 14:11
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants