Sandbox local dev environment: new features and fixes

November 11, 2019 at 9:14pm

Sandbox local dev environment: new features and fixes

November 11, 2019 at 9:14pm
Begin's local dev environment, OpenJS Architect Sandbox has gotten a fair number of nice upgrades lately. If you haven't updated lately, definitely consider it! Here are a few highlights:
  • Auto-hydration updates
    • Hydration is the process by which your various functions' dependencies are installed, shared files are copied, etc.
    • Auto-hydration now detects changes to the state of your installed Node dependencies, and rehydrates if necessary; for example:
      • You're working on a project, and a teammate updates a dependency in get /foo from version 1.0.0 to 1.1.0
      • Upon your next git pull, Sandbox will detect the dependency update in get /foo and automatically install version 1.1.0 for you
    • Auto-hydration now has a rate limit of one change every 500ms to prevent recursive or aggressive file updates
    • Auto-hydration now has folder support
    • Auto-hydration now hydrates src/views and src/shared, and only the shared files necessary
      • For example: if you change a file in src/views, it will only update your functions, and not attempt to rehydrate all your project's functions with src/shared
  • Beta: Sandbox init script support!
    • Sandbox will now run the init script of your choosing upon startup after all subsystems have started up:
      • scripts/sandbox-startup.js - a CommonJS module, receives your parsed Arc project as a parameter, supports async/await
      • scripts/ - a Python script
      • scripts/sandbox-startup.rb - a Ruby script
  • Events now have a timestamp and improved formatting
  • Improvements to Sandbox's emulation of AWS integration, including requests to root
  • Improved error reporting in response formatting
  • Fixes
    • Fixed HTTP request with body and no Content-Type header; resolves #102, thanks !
    • Fixed issue where killed subprocesses would not trigger timeouts; resolves #30, /ht
    • Fixed issue where functions with legacy runtimes may not have been fully hydrated
Do let us know how local development could be further improved, this is an area we pay a lot of attention to!

November 28, 2019 at 12:01am
Was curious and posted before seeing this...

[solved] Watcher doesn't rehydrate all function code?

  • reply
  • like