matlab-proxy 0.25.1__tar.gz → 0.27.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of matlab-proxy might be problematic. Click here for more details.

Files changed (212) hide show
  1. matlab_proxy-0.27.0/.gitignore +16 -0
  2. {matlab_proxy-0.25.1/matlab_proxy.egg-info → matlab_proxy-0.27.0}/PKG-INFO +37 -24
  3. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/package-lock.json +20 -17
  4. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/App/index.jsx +7 -5
  5. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/selectors/index.js +17 -3
  6. matlab_proxy-0.27.0/hatch_build.py +73 -0
  7. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy/app.py +68 -16
  8. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy/app_state.py +8 -2
  9. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy/constants.py +1 -0
  10. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy/default_configuration.py +2 -2
  11. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy/settings.py +24 -2
  12. matlab_proxy-0.27.0/matlab_proxy/util/cookie_jar.py +72 -0
  13. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy/util/list_servers.py +2 -2
  14. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy/util/mwi/environment_variables.py +15 -0
  15. matlab_proxy-0.27.0/matlab_proxy/util/mwi/session_name.py +28 -0
  16. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy/util/mwi/validators.py +2 -4
  17. matlab_proxy-0.27.0/matlab_proxy_manager/README.md +85 -0
  18. matlab_proxy-0.27.0/matlab_proxy_manager/lib/README.md +53 -0
  19. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy_manager/lib/api.py +156 -114
  20. matlab_proxy-0.27.0/matlab_proxy_manager/storage/README.md +54 -0
  21. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy_manager/storage/server.py +5 -2
  22. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy_manager/utils/constants.py +2 -1
  23. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy_manager/utils/environment_variables.py +6 -1
  24. matlab_proxy-0.27.0/matlab_proxy_manager/utils/exceptions.py +45 -0
  25. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy_manager/utils/helpers.py +2 -2
  26. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy_manager/utils/logger.py +4 -1
  27. matlab_proxy-0.27.0/matlab_proxy_manager/web/README.md +37 -0
  28. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy_manager/web/app.py +71 -19
  29. matlab_proxy-0.27.0/pyproject.toml +106 -0
  30. matlab_proxy-0.27.0/tests/README.md +83 -0
  31. matlab_proxy-0.27.0/tests/integration/pytest.ini +16 -0
  32. matlab_proxy-0.27.0/tests/matlab-tests/TestEvaluateUserMatlabCodeScript.m +85 -0
  33. matlab_proxy-0.27.0/tests/unit/__init__.py +1 -0
  34. matlab_proxy-0.27.0/tests/unit/fixtures/fixture_auth.py +19 -0
  35. matlab_proxy-0.27.0/tests/unit/mocks/mock_client.py +42 -0
  36. matlab_proxy-0.27.0/tests/unit/proxy-manager/lib/test_api.py +311 -0
  37. matlab_proxy-0.27.0/tests/unit/proxy-manager/storage/test_file_repository.py +152 -0
  38. matlab_proxy-0.27.0/tests/unit/proxy-manager/storage/test_server.py +237 -0
  39. matlab_proxy-0.27.0/tests/unit/proxy-manager/web/test_app.py +687 -0
  40. matlab_proxy-0.27.0/tests/unit/proxy-manager/web/test_monitor.py +120 -0
  41. matlab_proxy-0.27.0/tests/unit/proxy-manager/web/test_watcher.py +69 -0
  42. matlab_proxy-0.27.0/tests/unit/pytest.ini +16 -0
  43. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/tests/unit/test_app.py +140 -20
  44. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/tests/unit/test_settings.py +55 -6
  45. matlab_proxy-0.27.0/tests/unit/util/test_cookie_jar.py +252 -0
  46. matlab_proxy-0.25.1/MANIFEST.in +0 -6
  47. matlab_proxy-0.25.1/PKG-INFO +0 -247
  48. matlab_proxy-0.25.1/matlab_proxy.egg-info/SOURCES.txt +0 -187
  49. matlab_proxy-0.25.1/matlab_proxy.egg-info/dependency_links.txt +0 -1
  50. matlab_proxy-0.25.1/matlab_proxy.egg-info/entry_points.txt +0 -7
  51. matlab_proxy-0.25.1/matlab_proxy.egg-info/not-zip-safe +0 -1
  52. matlab_proxy-0.25.1/matlab_proxy.egg-info/requires.txt +0 -20
  53. matlab_proxy-0.25.1/matlab_proxy.egg-info/top_level.txt +0 -3
  54. matlab_proxy-0.25.1/setup.cfg +0 -10
  55. matlab_proxy-0.25.1/setup.py +0 -126
  56. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/LICENSE.md +0 -0
  57. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/README.md +0 -0
  58. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/.eslintrc.json +0 -0
  59. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/.gitignore +0 -0
  60. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/README.md +0 -0
  61. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/eslint.config.js +0 -0
  62. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/index.css +0 -0
  63. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/index.html +0 -0
  64. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/package.json +0 -0
  65. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/public/favicon.ico +0 -0
  66. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/public/manifest.json +0 -0
  67. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/public/robots.txt +0 -0
  68. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/actionCreators/actionCreators.spec.js +0 -0
  69. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/actionCreators/index.js +0 -0
  70. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/actions/index.js +0 -0
  71. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/App/3p/css/bootstrap.min.css +0 -0
  72. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/App/3p/css/site7.min.css +0 -0
  73. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/App/3p/fonts/glyphicons-halflings-regular.eot +0 -0
  74. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/App/3p/fonts/glyphicons-halflings-regular.svg +0 -0
  75. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/App/3p/fonts/glyphicons-halflings-regular.ttf +0 -0
  76. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/App/3p/fonts/glyphicons-halflings-regular.woff +0 -0
  77. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/App/3p/fonts/glyphicons-halflings-regular.woff2 +0 -0
  78. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/App/3p/fonts/mathworks-eps.svg +0 -0
  79. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/App/3p/fonts/mathworks-eps.ttf +0 -0
  80. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/App/3p/fonts/mathworks-eps.woff +0 -0
  81. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/App/3p/fonts/mathworks-pictograms.svg +0 -0
  82. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/App/3p/fonts/mathworks-pictograms.ttf +0 -0
  83. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/App/3p/fonts/mathworks-pictograms.woff +0 -0
  84. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/App/3p/fonts/mathworks.svg +0 -0
  85. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/App/3p/fonts/mathworks.ttf +0 -0
  86. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/App/3p/fonts/mathworks.woff +0 -0
  87. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/App/3p/images/bug_reports/workaround.gif +0 -0
  88. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/App/3p/images/responsive/global/ico-header-account-hover.svg +0 -0
  89. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/App/3p/images/responsive/global/ico-header-account.svg +0 -0
  90. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/App/3p/images/responsive/global/ico-header-contact-hover.svg +0 -0
  91. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/App/3p/images/responsive/global/ico-header-contact.svg +0 -0
  92. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/App/3p/images/responsive/global/ico-sprite.png +0 -0
  93. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/App/App.css +0 -0
  94. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/App/App.spec.jsx +0 -0
  95. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/App/IdleBufferTimeouts.spec.jsx +0 -0
  96. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/App/MATLAB-env-blur.png +0 -0
  97. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/Confirmation/Confirmation.spec.jsx +0 -0
  98. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/Confirmation/index.jsx +0 -0
  99. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/Controls/Controls.css +0 -0
  100. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/Controls/Controls.spec.jsx +0 -0
  101. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/Controls/feedback.svg +0 -0
  102. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/Controls/help.svg +0 -0
  103. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/Controls/index.jsx +0 -0
  104. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/Controls/restart.svg +0 -0
  105. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/Controls/sign-out.svg +0 -0
  106. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/Controls/start.svg +0 -0
  107. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/Controls/stop.svg +0 -0
  108. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/Controls/terminate.svg +0 -0
  109. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/EntitlementSelector/EntitlementSelector.spec.jsx +0 -0
  110. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/EntitlementSelector/index.jsx +0 -0
  111. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/Error/Error.css +0 -0
  112. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/Error/Error.spec.jsx +0 -0
  113. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/Error/index.jsx +0 -0
  114. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/Help/Help.css +0 -0
  115. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/Help/Help.spec.jsx +0 -0
  116. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/Help/index.jsx +0 -0
  117. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/Information/Information.css +0 -0
  118. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/Information/Information.spec.jsx +0 -0
  119. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/Information/index.jsx +0 -0
  120. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/LicensingGatherer/ExistingLicense.css +0 -0
  121. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/LicensingGatherer/ExistingLicense.jsx +0 -0
  122. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/LicensingGatherer/LicenseGatherer.spec.jsx +0 -0
  123. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/LicensingGatherer/LicensingGatherer.css +0 -0
  124. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/LicensingGatherer/MHLM.jsx +0 -0
  125. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/LicensingGatherer/NLM.jsx +0 -0
  126. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/LicensingGatherer/index.jsx +0 -0
  127. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/MatlabJsd/MatlabJsd.css +0 -0
  128. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/MatlabJsd/MatlabJsd.spec.jsx +0 -0
  129. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/MatlabJsd/index.jsx +0 -0
  130. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/Overlay/Overlay.css +0 -0
  131. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/Overlay/Overlay.spec.jsx +0 -0
  132. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/Overlay/index.jsx +0 -0
  133. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/OverlayTrigger/OverlayTrigger.css +0 -0
  134. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/OverlayTrigger/OverlayTrigger.spec.jsx +0 -0
  135. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/OverlayTrigger/ResizeOverlayTrigger.spec.jsx +0 -0
  136. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/OverlayTrigger/arrow.svg +0 -0
  137. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/OverlayTrigger/gripper.svg +0 -0
  138. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/OverlayTrigger/index.jsx +0 -0
  139. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/OverlayTrigger/trigger-error.svg +0 -0
  140. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/OverlayTrigger/trigger-ok.svg +0 -0
  141. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/ShutdownWarning/ShutdownWarning.css +0 -0
  142. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/components/ShutdownWarning/index.jsx +0 -0
  143. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/constants.js +0 -0
  144. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/main.jsx +0 -0
  145. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/reducers/index.js +0 -0
  146. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/reducers/reducers.spec.js +0 -0
  147. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/selectors/selectors.spec.js +0 -0
  148. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/setupTests.js +0 -0
  149. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/test/utils/react-test.jsx +0 -0
  150. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/test/utils/responses.js +0 -0
  151. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/src/test/utils/state.js +0 -0
  152. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/gui/vite.config.js +0 -0
  153. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy/__init__.py +0 -0
  154. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy/devel.py +0 -0
  155. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy/icons/matlab.svg +0 -0
  156. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy/matlab/evaluateUserMatlabCode.m +0 -0
  157. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy/matlab/startup.m +0 -0
  158. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy/util/__init__.py +0 -0
  159. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy/util/event_loop.py +0 -0
  160. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy/util/mw.py +0 -0
  161. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy/util/mwi/__init__.py +0 -0
  162. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy/util/mwi/custom_http_headers.py +0 -0
  163. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy/util/mwi/download.py +0 -0
  164. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy/util/mwi/embedded_connector/__init__.py +0 -0
  165. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy/util/mwi/embedded_connector/helpers.py +0 -0
  166. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy/util/mwi/embedded_connector/request.py +0 -0
  167. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy/util/mwi/exceptions.py +0 -0
  168. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy/util/mwi/logger.py +0 -0
  169. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy/util/mwi/token_auth.py +0 -0
  170. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy/util/system.py +0 -0
  171. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy/util/windows.py +0 -0
  172. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy_manager/__init__.py +0 -0
  173. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy_manager/lib/__init__.py +0 -0
  174. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy_manager/storage/__init__.py +0 -0
  175. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy_manager/storage/file_repository.py +0 -0
  176. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy_manager/storage/interface.py +0 -0
  177. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy_manager/utils/__init__.py +0 -0
  178. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy_manager/utils/auth.py +0 -0
  179. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy_manager/web/__init__.py +0 -0
  180. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy_manager/web/monitor.py +0 -0
  181. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/matlab_proxy_manager/web/watcher.py +0 -0
  182. {matlab_proxy-0.25.1/tests/unit → matlab_proxy-0.27.0/tests}/__init__.py +0 -0
  183. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/tests/integration/__init__.py +0 -0
  184. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/tests/integration/integration_tests_with_license/__init__.py +0 -0
  185. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/tests/integration/integration_tests_with_license/conftest.py +0 -0
  186. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/tests/integration/integration_tests_with_license/test_http_end_points.py +0 -0
  187. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/tests/integration/integration_tests_without_license/__init__.py +0 -0
  188. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/tests/integration/integration_tests_without_license/conftest.py +0 -0
  189. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/tests/integration/integration_tests_without_license/test_matlab_is_down_if_unlicensed.py +0 -0
  190. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/tests/integration/utils/__init__.py +0 -0
  191. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/tests/integration/utils/integration_tests_utils.py +0 -0
  192. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/tests/integration/utils/licensing.py +0 -0
  193. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/tests/unit/conftest.py +0 -0
  194. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/tests/unit/test_app_state.py +0 -0
  195. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/tests/unit/test_constants.py +0 -0
  196. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/tests/unit/test_ddux.py +0 -0
  197. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/tests/unit/test_devel.py +0 -0
  198. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/tests/unit/test_non_dev_mode.py +0 -0
  199. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/tests/unit/util/__init__.py +0 -0
  200. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/tests/unit/util/mwi/__init__.py +0 -0
  201. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/tests/unit/util/mwi/embedded_connector/__init__.py +0 -0
  202. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/tests/unit/util/mwi/embedded_connector/test_helpers.py +0 -0
  203. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/tests/unit/util/mwi/embedded_connector/test_request.py +0 -0
  204. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/tests/unit/util/mwi/test_custom_http_headers.py +0 -0
  205. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/tests/unit/util/mwi/test_download.py +0 -0
  206. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/tests/unit/util/mwi/test_logger.py +0 -0
  207. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/tests/unit/util/mwi/test_token_auth.py +0 -0
  208. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/tests/unit/util/mwi/test_validators.py +0 -0
  209. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/tests/unit/util/test_mw.py +0 -0
  210. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/tests/unit/util/test_util.py +0 -0
  211. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/tests/utils/__init__.py +0 -0
  212. {matlab_proxy-0.25.1 → matlab_proxy-0.27.0}/tests/utils/logging_util.py +0 -0
@@ -0,0 +1,16 @@
1
+ *.egg-info/
2
+ .eggs/
3
+ __pycache__/
4
+ build/
5
+ dist/
6
+ .venv*/
7
+ htmlcov/
8
+ .coverage
9
+ *.key
10
+ *.pem
11
+ .python-version
12
+ coverage.xml
13
+ .ipynb_checkpoints/
14
+ *.ipynb
15
+ .env
16
+ matlab_proxy/gui
@@ -1,12 +1,14 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: matlab-proxy
3
- Version: 0.25.1
3
+ Version: 0.27.0
4
4
  Summary: Python® package enables you to launch MATLAB® and access it from a web browser.
5
- Home-page: https://github.com/mathworks/matlab-proxy/
6
- Author: The MathWorks, Inc.
7
- Author-email: cloud@mathworks.com
8
- License: MATHWORKS CLOUD REFERENCE ARCHITECTURE LICENSE
9
- Keywords: Proxy,MATLAB Proxy,MATLAB,MATLAB Javascript Desktop,MATLAB Web Desktop,Remote MATLAB Web Access
5
+ Project-URL: Homepage, https://github.com/mathworks/matlab-proxy/
6
+ Project-URL: Documentation, https://github.com/mathworks/matlab-proxy/blob/main/README.md
7
+ Project-URL: Issues, https://github.com/mathworks/matlab-proxy/issues
8
+ Author-email: "The MathWorks Inc." <cloud@mathworks.com>
9
+ License-Expression: LicenseRef-MATHWORKS-CLOUD-REFERENCE-ARCHITECTURE-LICENSE
10
+ License-File: LICENSE.md
11
+ Keywords: MATLAB,MATLAB Javascript Desktop,MATLAB Proxy,MATLAB Web Desktop,Proxy,Remote MATLAB Web Access
10
12
  Classifier: Intended Audience :: Developers
11
13
  Classifier: Natural Language :: English
12
14
  Classifier: Programming Language :: Python
@@ -14,29 +16,40 @@ Classifier: Programming Language :: Python :: 3.8
14
16
  Classifier: Programming Language :: Python :: 3.9
15
17
  Classifier: Programming Language :: Python :: 3.10
16
18
  Classifier: Programming Language :: Python :: 3.11
17
- Requires-Python: ~=3.8
18
- Description-Content-Type: text/markdown
19
- License-File: LICENSE.md
19
+ Requires-Python: >=3.8
20
+ Requires-Dist: aiohttp-session[secure]
20
21
  Requires-Dist: aiohttp>=3.7.4
21
- Requires-Dist: aiohttp_session[secure]
22
22
  Requires-Dist: importlib-metadata
23
23
  Requires-Dist: importlib-resources
24
24
  Requires-Dist: psutil
25
- Requires-Dist: watchdog
26
25
  Requires-Dist: requests
26
+ Requires-Dist: watchdog
27
27
  Provides-Extra: dev
28
- Requires-Dist: aiohttp-devtools; extra == "dev"
29
- Requires-Dist: black; extra == "dev"
30
- Requires-Dist: pytest; extra == "dev"
31
- Requires-Dist: pytest-env; extra == "dev"
32
- Requires-Dist: pytest-cov; extra == "dev"
33
- Requires-Dist: pytest-timeout; extra == "dev"
34
- Requires-Dist: pytest-mock; extra == "dev"
35
- Requires-Dist: pytest-aiohttp; extra == "dev"
36
- Requires-Dist: pytest-timeout; extra == "dev"
37
- Requires-Dist: psutil; extra == "dev"
38
- Requires-Dist: urllib3; extra == "dev"
39
- Requires-Dist: pytest-playwright; extra == "dev"
28
+ Requires-Dist: aiohttp-devtools; extra == 'dev'
29
+ Requires-Dist: black; extra == 'dev'
30
+ Requires-Dist: psutil; extra == 'dev'
31
+ Requires-Dist: pytest; extra == 'dev'
32
+ Requires-Dist: pytest-aiohttp; extra == 'dev'
33
+ Requires-Dist: pytest-asyncio==0.24.0; extra == 'dev'
34
+ Requires-Dist: pytest-cov; extra == 'dev'
35
+ Requires-Dist: pytest-env; extra == 'dev'
36
+ Requires-Dist: pytest-mock; extra == 'dev'
37
+ Requires-Dist: pytest-playwright; extra == 'dev'
38
+ Requires-Dist: pytest-timeout; extra == 'dev'
39
+ Requires-Dist: ruff; extra == 'dev'
40
+ Requires-Dist: urllib3; extra == 'dev'
41
+ Provides-Extra: test
42
+ Requires-Dist: psutil; extra == 'test'
43
+ Requires-Dist: pytest; extra == 'test'
44
+ Requires-Dist: pytest-aiohttp; extra == 'test'
45
+ Requires-Dist: pytest-asyncio==0.24.0; extra == 'test'
46
+ Requires-Dist: pytest-cov; extra == 'test'
47
+ Requires-Dist: pytest-env; extra == 'test'
48
+ Requires-Dist: pytest-mock; extra == 'test'
49
+ Requires-Dist: pytest-playwright; extra == 'test'
50
+ Requires-Dist: pytest-timeout; extra == 'test'
51
+ Requires-Dist: urllib3; extra == 'test'
52
+ Description-Content-Type: text/markdown
40
53
 
41
54
  # MATLAB Proxy
42
55
  [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/mathworks/matlab-proxy/run-tests.yml?branch=main&logo=github)](https://github.com/mathworks/matlab-proxy/actions) &nbsp; [![PyPI badge](https://img.shields.io/pypi/v/matlab-proxy.svg?logo=pypi)](https://pypi.python.org/pypi/matlab-proxy) &nbsp; [![codecov](https://codecov.io/gh/mathworks/matlab-proxy/branch/main/graph/badge.svg?token=ZW3SESKCSS)](https://codecov.io/gh/mathworks/matlab-proxy) &nbsp; [![Downloads](https://static.pepy.tech/personalized-badge/matlab-proxy?period=month&units=international_system&left_color=grey&right_color=blue&left_text=PyPI%20downloads/month)](https://pepy.tech/project/matlab-proxy)
@@ -3881,9 +3881,9 @@
3881
3881
  "license": "MIT"
3882
3882
  },
3883
3883
  "node_modules/brace-expansion": {
3884
- "version": "1.1.11",
3885
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
3886
- "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
3884
+ "version": "1.1.12",
3885
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
3886
+ "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
3887
3887
  "dev": true,
3888
3888
  "license": "MIT",
3889
3889
  "dependencies": {
@@ -4670,15 +4670,16 @@
4670
4670
  }
4671
4671
  },
4672
4672
  "node_modules/es-set-tostringtag": {
4673
- "version": "2.0.3",
4674
- "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz",
4675
- "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==",
4673
+ "version": "2.1.0",
4674
+ "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz",
4675
+ "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==",
4676
4676
  "dev": true,
4677
4677
  "license": "MIT",
4678
4678
  "dependencies": {
4679
- "get-intrinsic": "^1.2.4",
4679
+ "es-errors": "^1.3.0",
4680
+ "get-intrinsic": "^1.2.6",
4680
4681
  "has-tostringtag": "^1.0.2",
4681
- "hasown": "^2.0.1"
4682
+ "hasown": "^2.0.2"
4682
4683
  },
4683
4684
  "engines": {
4684
4685
  "node": ">= 0.4"
@@ -5095,9 +5096,9 @@
5095
5096
  }
5096
5097
  },
5097
5098
  "node_modules/eslint-plugin-vitest/node_modules/brace-expansion": {
5098
- "version": "2.0.1",
5099
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
5100
- "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
5099
+ "version": "2.0.2",
5100
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
5101
+ "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
5101
5102
  "dev": true,
5102
5103
  "license": "MIT",
5103
5104
  "dependencies": {
@@ -5523,14 +5524,16 @@
5523
5524
  }
5524
5525
  },
5525
5526
  "node_modules/form-data": {
5526
- "version": "4.0.1",
5527
- "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz",
5528
- "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==",
5527
+ "version": "4.0.4",
5528
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz",
5529
+ "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==",
5529
5530
  "dev": true,
5530
5531
  "license": "MIT",
5531
5532
  "dependencies": {
5532
5533
  "asynckit": "^0.4.0",
5533
5534
  "combined-stream": "^1.0.8",
5535
+ "es-set-tostringtag": "^2.1.0",
5536
+ "hasown": "^2.0.2",
5534
5537
  "mime-types": "^2.1.12"
5535
5538
  },
5536
5539
  "engines": {
@@ -8918,9 +8921,9 @@
8918
8921
  }
8919
8922
  },
8920
8923
  "node_modules/test-exclude/node_modules/brace-expansion": {
8921
- "version": "2.0.1",
8922
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
8923
- "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
8924
+ "version": "2.0.2",
8925
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
8926
+ "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
8924
8927
  "dev": true,
8925
8928
  "license": "MIT",
8926
8929
  "dependencies": {
@@ -40,6 +40,7 @@ import {
40
40
  selectMatlabStarting,
41
41
  selectIsIdleTimeoutEnabled,
42
42
  selectMatlabStopping,
43
+ selectBrowserTitle,
43
44
  selectIntegrationName
44
45
  } from '../../selectors';
45
46
 
@@ -54,7 +55,7 @@ import blurredBackground from './MATLAB-env-blur.png';
54
55
  import EntitlementSelector from '../EntitlementSelector';
55
56
  import { BUFFER_TIMEOUT_DURATION, MWI_AUTH_TOKEN_NAME_FOR_HTTP } from '../../constants';
56
57
 
57
- function App () {
58
+ function App() {
58
59
  const dispatch = useDispatch();
59
60
 
60
61
  const overlayVisible = useSelector(selectOverlayVisible);
@@ -76,6 +77,7 @@ function App () {
76
77
  const isConcurrencyEnabled = useSelector(selectIsConcurrencyEnabled);
77
78
  const wasEverActive = useSelector(selectWasEverActive);
78
79
  const integrationName = useSelector(selectIntegrationName);
80
+ const browserTitle = useSelector(selectBrowserTitle);
79
81
 
80
82
  // Timeout duration is specified in seconds, but useTimeoutFn accepts timeout values in ms.
81
83
  const idleTimeoutDurationInMS = useSelector(selectIdleTimeoutDurationInMS);
@@ -93,7 +95,7 @@ function App () {
93
95
 
94
96
 
95
97
  // callback that will fire once the IDLE timer expires
96
- function terminationFn () {
98
+ function terminationFn() {
97
99
  // Reset the timer if MATLAB is either starting or stopping or is busy
98
100
  if (isMatlabStarting || isMatlabStopping || isMatlabBusy) {
99
101
  idleTimerReset();
@@ -303,7 +305,7 @@ function App () {
303
305
  if (hasFetchedEnvConfig) {
304
306
  const queryParams = parseQueryParams(window.location);
305
307
  const token = queryParams.get(MWI_AUTH_TOKEN_NAME_FOR_HTTP);
306
-
308
+ document.title = `${browserTitle}`;
307
309
  if (token) {
308
310
  dispatch(updateAuthStatus(token));
309
311
  }
@@ -331,7 +333,7 @@ function App () {
331
333
  overlayContent = <ShutdownWarning
332
334
  bufferTimeout={BUFFER_TIMEOUT_DURATION}
333
335
  resumeCallback={() => {
334
- // Restart IDLE timer
336
+ // Restart IDLE timer
335
337
  idleTimerReset();
336
338
  setIdleTimerHasExpired(false);
337
339
 
@@ -386,7 +388,7 @@ function App () {
386
388
  if (matlabUp) {
387
389
  matlabJsd = (!authEnabled || isAuthenticated)
388
390
  ? (<MatlabJsd handleUserInteraction={handleUserInteraction} url={matlabUrl} iFrameRef={MatlabJsdIframeRef} shouldListenForEvents={shouldListenForEvents} />)
389
- : <img style={{ objectFit: 'fill' }}src={blurredBackground} alt='Blurred MATLAB environment'/>;
391
+ : <img style={{ objectFit: 'fill' }} src={blurredBackground} alt='Blurred MATLAB environment' />;
390
392
  }
391
393
 
392
394
  const overlayTrigger = overlayVisible
@@ -260,9 +260,23 @@ export const selectIsIdleTimeoutEnabled = createSelector(
260
260
  export const selectIdleTimeoutDurationInMS = createSelector(
261
261
  selectIsIdleTimeoutEnabled,
262
262
  selectIdleTimeoutDuration,
263
- (isTimeoutEnabled, idleTimeoutDuration) => { return isTimeoutEnabled
264
- ? idleTimeoutDuration * 1000
265
- : undefined; }
263
+ (isTimeoutEnabled, idleTimeoutDuration) => {
264
+ return isTimeoutEnabled
265
+ ? idleTimeoutDuration * 1000
266
+ : undefined;
267
+ }
268
+ );
269
+
270
+ export const selectBrowserTitle = createSelector(
271
+ selectHasFetchedEnvConfig,
272
+ selectEnvConfig,
273
+ (hasFetchedEnvConfig, envConfig) => {
274
+ if (hasFetchedEnvConfig) {
275
+ return envConfig.browserTitle;
276
+ } else {
277
+ return 'MATLAB';
278
+ }
279
+ }
266
280
  );
267
281
 
268
282
  export const selectIntegrationName = createSelector(
@@ -0,0 +1,73 @@
1
+ # Copyright 2025 The MathWorks, Inc.
2
+
3
+ import os
4
+ import subprocess
5
+ from pathlib import Path
6
+ from shutil import which, copytree
7
+ from typing import Any, Dict
8
+
9
+ from hatchling.builders.hooks.plugin.interface import BuildHookInterface
10
+
11
+
12
+ class CustomBuildHook(BuildHookInterface):
13
+ # Identifier that connects this Python hook class to pyproject.toml configuration
14
+ PLUGIN_NAME = "custom"
15
+
16
+ def initialize(self, version: str, build_data: Dict[str, Any]) -> None:
17
+ """Run npm install and build, then copy files to package."""
18
+
19
+ # Ensure npm is present
20
+ npm_path = which("npm")
21
+ if not npm_path:
22
+ raise Exception(
23
+ "npm must be installed and on the path during package build!"
24
+ )
25
+
26
+ npm_install = [npm_path, "install"]
27
+ npm_build = [npm_path, "run", "build"]
28
+
29
+ pwd = Path.cwd()
30
+ gui_path = pwd / "gui"
31
+ gui_build_path = gui_path / "build"
32
+
33
+ if not gui_path.exists():
34
+ raise Exception(f"GUI directory not found: {gui_path}")
35
+
36
+ # Cleanup the build folder to ensure latest artifacts are generated
37
+ if gui_build_path.exists():
38
+ import shutil
39
+
40
+ shutil.rmtree(gui_build_path)
41
+
42
+ # Change to directory where GUI files are present
43
+ original_cwd = str(pwd)
44
+ os.chdir(gui_path)
45
+
46
+ try:
47
+ # Install dependencies and build GUI files
48
+ subprocess.run(npm_install, check=True)
49
+ subprocess.run(npm_build, check=True)
50
+ finally:
51
+ os.chdir(original_cwd)
52
+
53
+ if not gui_build_path.exists():
54
+ raise Exception(f"GUI build directory not found: {gui_build_path}")
55
+
56
+ # Copy built files to a temporary location that will be included in wheel
57
+ temp_gui_path = pwd / "matlab_proxy" / "gui"
58
+ temp_gui_path.mkdir(parents=True, exist_ok=True)
59
+
60
+ # Cleanup pre-existing gui files
61
+ if temp_gui_path.exists():
62
+ import shutil
63
+
64
+ shutil.rmtree(temp_gui_path)
65
+
66
+ copytree(gui_build_path, temp_gui_path)
67
+
68
+ # Create __init__.py files to make directories into Python modules
69
+ (temp_gui_path / "__init__.py").touch(exist_ok=True)
70
+ for root, dirs, _ in os.walk(temp_gui_path):
71
+ for directory in dirs:
72
+ (Path(root) / directory / "__init__.py").touch(exist_ok=True)
73
+ print("Build hook step completed!")
@@ -209,6 +209,8 @@ async def get_env_config(req):
209
209
  "supportedVersions": constants.SUPPORTED_MATLAB_VERSIONS,
210
210
  }
211
211
 
212
+ config["browserTitle"] = state.settings["browser_title"]
213
+
212
214
  # Send timeout duration for the idle timer as part of the response
213
215
  config["idleTimeoutDuration"] = state.settings["mwi_idle_timeout"]
214
216
 
@@ -283,6 +285,10 @@ async def start_matlab(req):
283
285
  JSONResponse: JSONResponse object containing updated information on the state of MATLAB among other information.
284
286
  """
285
287
  state = req.app["state"]
288
+ cookie_jar = req.app["settings"]["cookie_jar"]
289
+
290
+ if cookie_jar:
291
+ cookie_jar.clear()
286
292
 
287
293
  # Start MATLAB
288
294
  await state.start_matlab(restart_matlab=True)
@@ -349,7 +355,7 @@ async def set_licensing_info(req):
349
355
  raise Exception(
350
356
  'License type must be "NLM" or "MHLM" or "ExistingLicense"!'
351
357
  )
352
- except Exception as e:
358
+ except Exception:
353
359
  raise web.HTTPBadRequest(text="Error with licensing!")
354
360
 
355
361
  # This is true for a user who has only one license associated with their account
@@ -493,7 +499,7 @@ def make_static_route_table(app):
493
499
  Returns:
494
500
  Dict: Containing information about the static files and header information.
495
501
  """
496
- import importlib_resources
502
+ import importlib_resources as resources
497
503
 
498
504
  from matlab_proxy import gui
499
505
  from matlab_proxy.gui import static
@@ -505,14 +511,14 @@ def make_static_route_table(app):
505
511
 
506
512
  for mod, parent in [
507
513
  (gui.__name__, ""),
508
- (gui.static.__name__, "/static"),
509
- (gui.static.css.__name__, "/static/css"),
510
- (gui.static.js.__name__, "/static/js"),
511
- (gui.static.media.__name__, "/static/media"),
514
+ (static.__name__, "/static"),
515
+ (css.__name__, "/static/css"),
516
+ (js.__name__, "/static/js"),
517
+ (media.__name__, "/static/media"),
512
518
  ]:
513
- for entry in importlib_resources.files(mod).iterdir():
519
+ for entry in resources.files(mod).iterdir():
514
520
  name = entry.name
515
- if not importlib_resources.files(mod).joinpath(name).is_dir():
521
+ if not resources.files(mod).joinpath(name).is_dir():
516
522
  if name != "__init__.py":
517
523
  # Special case for manifest.json
518
524
  if "manifest.json" in name:
@@ -557,6 +563,9 @@ async def matlab_view(req):
557
563
  matlab_protocol = req.app["settings"]["matlab_protocol"]
558
564
  mwapikey = req.app["settings"]["mwapikey"]
559
565
  matlab_base_url = f"{matlab_protocol}://127.0.0.1:{matlab_port}"
566
+ cookie_jar = req.app["settings"]["cookie_jar"]
567
+
568
+ cookies_from_jar = cookie_jar.get_dict() if cookie_jar else None
560
569
 
561
570
  # If we are trying to send request to matlab while the matlab_port is still not assigned
562
571
  # by embedded connector, return service not available and log a message
@@ -575,17 +584,23 @@ async def matlab_view(req):
575
584
  and reqH.get(UPGRADE, "").lower() == "websocket"
576
585
  and req.method == "GET"
577
586
  ):
578
- ws_server = web.WebSocketResponse()
587
+ ws_server = web.WebSocketResponse(
588
+ max_msg_size=constants.MAX_WEBSOCKET_MESSAGE_SIZE_IN_MB, compress=True
589
+ )
579
590
  await ws_server.prepare(req)
580
591
 
581
592
  async with aiohttp.ClientSession(
593
+ cookies=(
594
+ cookies_from_jar if cookie_jar else req.cookies
595
+ ), # If cookie jar is not provided, use the cookies from the incoming request
582
596
  trust_env=True,
583
- cookies=req.cookies,
584
597
  connector=aiohttp.TCPConnector(ssl=False),
585
598
  ) as client_session:
586
599
  try:
587
600
  async with client_session.ws_connect(
588
601
  matlab_base_url + req.path_qs,
602
+ max_msg_size=constants.MAX_WEBSOCKET_MESSAGE_SIZE_IN_MB, # max websocket message size from MATLAB to browser
603
+ compress=12, # enable websocket messages compression
589
604
  ) as ws_client:
590
605
 
591
606
  async def wsforward(ws_from, ws_to):
@@ -617,16 +632,28 @@ async def matlab_view(req):
617
632
  await ws_to.close(
618
633
  code=ws_to.close_code, message=msg.extra
619
634
  )
635
+ elif mt == aiohttp.WSMsgType.ERROR:
636
+ logger.error(f"WebSocket error received: {msg}")
637
+ if "exceeds limit" in str(msg.data):
638
+ logger.error(
639
+ f"Message too large: {msg.data}. Please refresh browser tab to reconnect."
640
+ )
641
+ break
620
642
  else:
621
643
  raise ValueError(f"Unexpected message type: {msg}")
622
644
 
623
645
  await asyncio.wait(
624
646
  [
625
- asyncio.create_task(wsforward(ws_server, ws_client)),
626
- asyncio.create_task(wsforward(ws_client, ws_server)),
647
+ asyncio.create_task(
648
+ wsforward(ws_server, ws_client)
649
+ ), # browser to MATLAB
650
+ asyncio.create_task(
651
+ wsforward(ws_client, ws_server)
652
+ ), # MATLAB to browser
627
653
  ],
628
654
  return_when=asyncio.FIRST_COMPLETED,
629
655
  )
656
+
630
657
  return ws_server
631
658
 
632
659
  except Exception as err:
@@ -666,11 +693,37 @@ async def matlab_view(req):
666
693
  allow_redirects=False,
667
694
  data=req_body,
668
695
  params=None,
696
+ cookies=cookies_from_jar, # Pass cookies from cookie_jar for HTTP requests to MATLAB. This value will
697
+ # be none if cookie jar is not enabled
669
698
  ) as res:
670
699
  headers = res.headers.copy()
671
700
  body = await res.read()
672
- headers.update(req.app["settings"]["mwi_custom_http_headers"])
673
- return web.Response(headers=headers, status=res.status, body=body)
701
+
702
+ response = web.Response(
703
+ status=res.status, headers=headers, body=body
704
+ )
705
+
706
+ # Purpose of the cookie-jar in matlab-proxy is to:
707
+ # 1) Update the cookies within it when the Embedded Connector sends back Set-Cookie headers in the response.
708
+ # 2) Read these cookies from the cookie jar and insert them into subsequent requests to the Embedded Connector.
709
+
710
+ # Due to matlab-proxy's PING requests to EC, the number cookies present in the cookie-jar and their
711
+ # value will be more than the ones present on the browser side.
712
+ # Example: The JSESSIONID cookie will be present in the cookie-jar but not on the browser side.
713
+ # This inconsistency of cookies between the browser and matlab-proxy's cookie-jar is expected and okay
714
+ # as these cookies are HttpOnly cookies.
715
+
716
+ # Incase the Embedded Connector sends cookies which are not HttpOnly, then additional logic needs to be written
717
+ # to update the response with cookies from the cookie jar before it is forwarded to the browser.
718
+ if cookie_jar:
719
+ # Update the cookies in the cookie jar with the Set-Cookie headers in the response.
720
+ cookie_jar.update_from_response_headers(headers)
721
+
722
+ response.headers.update(
723
+ req.app["settings"]["mwi_custom_http_headers"]
724
+ )
725
+
726
+ return response
674
727
 
675
728
  # Handles any pending HTTP requests from the browser when the MATLAB process is terminated before responding to them.
676
729
  except (
@@ -852,7 +905,7 @@ def configure_and_start(app):
852
905
 
853
906
  logger.debug("Starting MATLAB proxy app")
854
907
  logger.debug(
855
- f' with base_url: {app["settings"]["base_url"]} and app_port:{app["settings"]["app_port"]}.'
908
+ f" with base_url: {app['settings']['base_url']} and app_port:{app['settings']['app_port']}."
856
909
  )
857
910
 
858
911
  app["state"].create_server_info_file()
@@ -987,7 +1040,6 @@ def print_version_and_exit():
987
1040
 
988
1041
  def main():
989
1042
  """Starting point of the integration. Creates the web app and runs indefinitely."""
990
-
991
1043
  if util.parse_cli_args()["version"]:
992
1044
  print_version_and_exit()
993
1045
 
@@ -896,8 +896,14 @@ class AppState:
896
896
 
897
897
  mwi_server_info_file = mwi_logs_dir / "mwi_server.info"
898
898
  mwi_auth_token_str = token_auth.get_mwi_auth_token_access_str(self.settings)
899
- with open(mwi_server_info_file, "w") as fh:
900
- fh.write(self.settings["mwi_server_url"] + mwi_auth_token_str + "\n")
899
+ with open(mwi_server_info_file, "w", encoding="utf-8") as fh:
900
+ fh.write(
901
+ self.settings["mwi_server_url"]
902
+ + mwi_auth_token_str
903
+ + "\n"
904
+ + self.settings["browser_title"]
905
+ + "\n"
906
+ )
901
907
  self.mwi_server_session_files["mwi_server_info_file"] = mwi_server_info_file
902
908
  logger.debug(f"Server info stored into: {mwi_server_info_file}")
903
909
 
@@ -6,6 +6,7 @@ from typing import Final, List
6
6
  CONNECTOR_SECUREPORT_FILENAME: Final[str] = "connector.securePort"
7
7
  VERSION_INFO_FILE_NAME: Final[str] = "VersionInfo.xml"
8
8
  MAX_HTTP_REQUEST_SIZE: Final[int] = 500_000_000 # 500MB
9
+ MAX_WEBSOCKET_MESSAGE_SIZE_IN_MB: Final[int] = 500_000_000 # 500MB
9
10
  MATLAB_LOGS_FILE_NAME: Final[str] = "matlab_logs.txt"
10
11
  USER_CODE_OUTPUT_FILE_NAME: Final[str] = "startup_code_output.txt"
11
12
 
@@ -1,4 +1,4 @@
1
- # Copyright 2020-2024 The MathWorks, Inc.
1
+ # Copyright 2020-2025 The MathWorks, Inc.
2
2
  from enum import Enum
3
3
  from typing import List
4
4
 
@@ -45,7 +45,7 @@ def get_required_config() -> List[str]:
45
45
  list: A list of strings representing the required
46
46
  configuration keys.
47
47
  """
48
- required_keys: List[str] = [
48
+ required_keys: List[ConfigKeys] = [
49
49
  ConfigKeys.DOC_URL,
50
50
  ConfigKeys.EXT_NAME,
51
51
  ConfigKeys.EXT_NAME_DESC,
@@ -19,8 +19,9 @@ import matlab_proxy
19
19
  from matlab_proxy import constants
20
20
  from matlab_proxy.constants import MWI_AUTH_TOKEN_NAME_FOR_HTTP
21
21
  from matlab_proxy.util import mwi, system
22
+ from matlab_proxy.util.cookie_jar import HttpOnlyCookieJar
22
23
  from matlab_proxy.util.mwi import environment_variables as mwi_env
23
- from matlab_proxy.util.mwi import token_auth
24
+ from matlab_proxy.util.mwi import token_auth, session_name
24
25
  from matlab_proxy.util.mwi.exceptions import (
25
26
  FatalError,
26
27
  MatlabInstallError,
@@ -159,7 +160,7 @@ def get_mwi_config_folder(dev=False):
159
160
  config_folder_path = config_folder_path / "hosts" / hostname
160
161
 
161
162
  logger.debug(
162
- f"{'Hostname could not be determined. ' if not hostname else '' }Using the folder: {config_folder_path} for storing all matlab-proxy related session information"
163
+ f"{'Hostname could not be determined. ' if not hostname else ''}Using the folder: {config_folder_path} for storing all matlab-proxy related session information"
163
164
  )
164
165
 
165
166
  return config_folder_path
@@ -220,6 +221,8 @@ def get_dev_settings(config):
220
221
  "is_xvfb_available": False,
221
222
  "is_windowmanager_available": False,
222
223
  "mwi_idle_timeout": None,
224
+ "cookie_jar": _get_cookie_jar(),
225
+ "browser_title": session_name.get_browser_title("R2020b"),
223
226
  }
224
227
 
225
228
 
@@ -321,6 +324,7 @@ def get_server_settings(config_name):
321
324
  else f"{short_desc} - MATLAB Integration"
322
325
  )
323
326
 
327
+ cookie_jar = _get_cookie_jar()
324
328
  return {
325
329
  "create_xvfb_cmd": create_xvfb_cmd,
326
330
  "base_url": mwi.validators.validate_base_url(
@@ -359,6 +363,7 @@ def get_server_settings(config_name):
359
363
  "mwi_idle_timeout": mwi.validators.validate_idle_timeout(
360
364
  os.getenv(mwi_env.get_env_name_shutdown_on_idle_timeout())
361
365
  ),
366
+ "cookie_jar": cookie_jar,
362
367
  }
363
368
 
364
369
 
@@ -401,6 +406,7 @@ def get_matlab_settings():
401
406
  **mw_licensing_urls,
402
407
  "nlm_conn_str": nlm_conn_str,
403
408
  "has_custom_code_to_execute": has_custom_code_to_execute,
409
+ "browser_title": session_name.get_browser_title(matlab_version),
404
410
  }
405
411
 
406
412
 
@@ -700,3 +706,19 @@ def _get_matlab_cmd(matlab_executable_path, code_to_execute, nlm_conn_str):
700
706
  "-r",
701
707
  code_to_execute,
702
708
  ]
709
+
710
+
711
+ def _get_cookie_jar():
712
+ """Returns an instance of HttpOnly cookie jar if MWI_USE_COOKIE_CACHE environment variable is set to True
713
+
714
+ Returns:
715
+ HttpOnlyCookieJar: An instance of HttpOnly cookie jar if MWI_USE_COOKIE_CACHE environment variable is set to True, otherwise None.
716
+ """
717
+ cookie_jar = None
718
+ if mwi_env.Experimental.should_use_cookie_cache():
719
+ logger.info(
720
+ f"Environment variable {mwi_env.Experimental.get_env_name_use_cookie_cache()} is set. matlab-proxy server will cache cookies from MATLAB"
721
+ )
722
+ cookie_jar = HttpOnlyCookieJar()
723
+
724
+ return cookie_jar