@daugasauron/dolly 0.1.4 → 0.1.5-rc.0

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.
Files changed (60) hide show
  1. package/README.md +134 -14
  2. package/coi-serviceworker.js +28 -0
  3. package/dist/dolly-build-id.mjs +1 -1
  4. package/dist/dolly-dso-0.wasm +0 -0
  5. package/dist/dolly-image-build-id.mjs +1 -1
  6. package/dist/dolly-process-0.wasm +0 -0
  7. package/dist/dolly-process-abi.mjs +1 -1
  8. package/dist/dolly-process-dso.mjs +382 -53
  9. package/dist/dolly-process-gate-0.wasm +0 -0
  10. package/dist/dolly-process-worker.mjs +164 -35
  11. package/dist/dolly.wasm +0 -0
  12. package/host/dso/abi.mjs +3 -1
  13. package/host/dso/dso.mjs +1 -2
  14. package/host/http/abi.mjs +2 -2
  15. package/host/http/broker.mjs +18 -8
  16. package/host/http/http.mjs +0 -1
  17. package/host/http/policy.mjs +8 -4
  18. package/host/input/abi.mjs +47 -0
  19. package/host/modules.mjs +4 -3
  20. package/host/nena/abi.mjs +1 -1
  21. package/host/nena/nena.mjs +16 -18
  22. package/host/packages/service.mjs +35 -15
  23. package/host/packages/worker.mjs +21 -0
  24. package/host/runtime/abi.mjs +1 -0
  25. package/host/runtime/boot-files.mjs +8 -2
  26. package/host/runtime/grower.mjs +11 -8
  27. package/host/runtime/lease-bridge.mjs +8 -5
  28. package/host/runtime/module.json +1 -1
  29. package/host/runtime/runtime.mjs +37 -18
  30. package/host/snapshot/abi.mjs +7 -9
  31. package/host/snapshot/snapshot.mjs +14 -12
  32. package/host/snapshot/transport.mjs +4 -12
  33. package/host/snapshot/ui.mjs +17 -7
  34. package/host/stack/stack.mjs +1 -2
  35. package/host/threads/abi.mjs +1 -1
  36. package/host/threads/threads.mjs +2 -1
  37. package/package.json +1 -1
  38. package/src/browser.mjs +34 -37
  39. package/src/build-log.mjs +13 -2
  40. package/src/build-worker.mjs +182 -0
  41. package/src/custom-image.mjs +59 -0
  42. package/src/dollyfile-graph.mjs +127 -0
  43. package/src/dollyfile-view.mjs +335 -0
  44. package/src/image-artifact.mjs +248 -0
  45. package/src/image-build.mjs +89 -0
  46. package/src/image-builder.mjs +63 -0
  47. package/src/images.mjs +13 -2
  48. package/src/pack-store.mjs +141 -0
  49. package/src/packaged-snapshot.mjs +263 -91
  50. package/src/page-chords.mjs +4 -2
  51. package/src/process-constants.mjs +4 -2
  52. package/src/process-supervisor.mjs +209 -122
  53. package/src/runtime-worker.mjs +9 -10
  54. package/src/session-store.mjs +5 -7
  55. package/src/sha256.mjs +65 -0
  56. package/src/snapshot-records.mjs +135 -23
  57. package/src/static-asset.mjs +29 -2
  58. package/src/terminal-text.mjs +8 -5
  59. package/src/version.mjs +1 -1
  60. package/src/worker-image.mjs +3 -5
@@ -2,8 +2,9 @@ import { toggleIndicators } from "./page-indicators.mjs";
2
2
 
3
3
  // The page's own keys, taken before any host module or the guest reads them:
4
4
  // F11 toggles fullscreen and Ctrl+Shift+F the page's indicators. Listening
5
- // starts with the page, so they work while an image boots.
6
- export function pageChords(keyboard) {
5
+ // starts with the page, so they work while an image boots. Keys typed into an
6
+ // embedding's own controls, outside Dolly's element, are the embedding's.
7
+ export function pageChords(mount, keyboard) {
7
8
  async function toggleFullscreen() {
8
9
  try {
9
10
  if (document.fullscreenElement) {
@@ -27,6 +28,7 @@ export function pageChords(keyboard) {
27
28
  }
28
29
 
29
30
  function take(event) {
31
+ if (event.target !== document.body && !mount.contains(event.target)) return;
30
32
  const fullscreen = event.key === "F11";
31
33
  if (!fullscreen && !indicatorsChord(event)) return;
32
34
  event.preventDefault();
@@ -50,7 +50,7 @@ export const DOLLY_PROCESS_INFO = 67;
50
50
  export const DOLLY_PROCESS_SIGNAL = 68;
51
51
  export const DOLLY_PROCESS_SIGNAL_ACKNOWLEDGE = 69;
52
52
  export const DOLLY_PROCESS_ALARM = 70;
53
- export const DOLLY_PROCESS_ALARM_HANDLED = 71;
53
+ export const DOLLY_PROCESS_SIGNAL_DISPOSITIONS = 71;
54
54
  export const DOLLY_PROCESS_SPAWN_INHERIT_ENVIRONMENT = 1;
55
55
  export const DOLLY_PROCESS_SPAWN_FOREGROUND = 2;
56
56
  export const DOLLY_PROCESS_SPAWN_INTERACTIVE = 4;
@@ -116,6 +116,7 @@ export const DOLLY_PROCESS_TERMINAL_MODE_GET = 3;
116
116
  export const DOLLY_PROCESS_TERMINAL_MODE_SET = 4;
117
117
  export const DOLLY_PROCESS_TERMINAL_SIZE = 5;
118
118
  export const DOLLY_PROCESS_TERMINAL_PUBLISH_RESULT = 6;
119
+ export const DOLLY_PROCESS_TERMINAL_FOREGROUND = 7;
119
120
  export const DOLLY_PROCESS_LOCK_SHARED = 0;
120
121
  export const DOLLY_PROCESS_LOCK_EXCLUSIVE = 1;
121
122
  export const DOLLY_PROCESS_LOCK_UNLOCK = 2;
@@ -221,7 +222,7 @@ export const DOLLY_PROCESS_SIZEOF = Object.freeze({
221
222
  dolly_process_directory_request: 24,
222
223
  dolly_process_stat_response: 88,
223
224
  dolly_process_filesystem_stat_response: 96,
224
- dolly_process_spawn_request: 56,
225
+ dolly_process_spawn_request: 72,
225
226
  dolly_process_fd_mapping: 8,
226
227
  dolly_process_exec_state: 16,
227
228
  dolly_process_exec_request: 48,
@@ -236,6 +237,7 @@ export const DOLLY_PROCESS_SIZEOF = Object.freeze({
236
237
  dolly_process_wait_response: 16,
237
238
  dolly_process_signal_request: 8,
238
239
  dolly_process_alarm: 16,
240
+ dolly_process_signal_dispositions: 8,
239
241
  dolly_process_fd_seek_request: 16,
240
242
  dolly_process_clock_request: 16,
241
243
  dolly_process_path_request: 16,